1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Add handle to TargetMachine object in all Machine...Info classes.

llvm-svn: 1197
This commit is contained in:
Vikram S. Adve 2001-11-08 05:15:08 +00:00
parent 347a3cab9e
commit 2bb61e90a3
2 changed files with 8 additions and 5 deletions

View File

@ -49,10 +49,12 @@ TargetMachine::findOptimalStorageSize(const Type* ty) const
/*ctor*/
MachineInstrInfo::MachineInstrInfo(const MachineInstrDescriptor* _desc,
MachineInstrInfo::MachineInstrInfo(const TargetMachine& tgt,
const MachineInstrDescriptor* _desc,
unsigned int _descSize,
unsigned int _numRealOpCodes)
: desc(_desc), descSize(_descSize), numRealOpCodes(_numRealOpCodes)
: target(tgt),
desc(_desc), descSize(_descSize), numRealOpCodes(_numRealOpCodes)
{
// FIXME: TargetInstrDescriptors should not be global
assert(TargetInstrDescriptors == NULL && desc != NULL);

View File

@ -78,14 +78,15 @@ ComputeMinGap(const InstrRUsage &fromRU,
// Interface to machine description for instruction scheduling
//---------------------------------------------------------------------------
MachineSchedInfo::MachineSchedInfo(int NumSchedClasses,
const MachineInstrInfo* Mii,
MachineSchedInfo::MachineSchedInfo(const TargetMachine& tgt,
int NumSchedClasses,
const InstrClassRUsage* ClassRUsages,
const InstrRUsageDelta* UsageDeltas,
const InstrIssueDelta* IssueDeltas,
unsigned int NumUsageDeltas,
unsigned int NumIssueDeltas)
: numSchedClasses(NumSchedClasses), mii(Mii),
: target(tgt),
numSchedClasses(NumSchedClasses), mii(& tgt.getInstrInfo()),
classRUsages(ClassRUsages), usageDeltas(UsageDeltas),
issueDeltas(IssueDeltas), numUsageDeltas(NumUsageDeltas),
numIssueDeltas(NumIssueDeltas)