misched: allow the default scheduler to be one chosen by the target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152360 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick
2012-03-09 00:52:20 +00:00
parent f91a330329
commit d04ec0c855
2 changed files with 41 additions and 19 deletions

View File

@@ -15,8 +15,12 @@
// return new CustomMachineScheduler(C);
// }
// static MachineSchedRegistry
// SchedDefaultRegistry("custom", "Run my target's custom scheduler",
// createCustomMachineSched);
// SchedCustomRegistry("custom", "Run my target's custom scheduler",
// createCustomMachineSched);
//
// Inside <Target>PassConfig:
// enablePass(MachineSchedulerID);
// MachineSchedRegistry::setDefault(createCustomMachineSched);
//
//===----------------------------------------------------------------------===//
@@ -39,10 +43,11 @@ struct MachineSchedContext {
MachineFunction *MF;
const MachineLoopInfo *MLI;
const MachineDominatorTree *MDT;
const TargetPassConfig *PassConfig;
AliasAnalysis *AA;
LiveIntervals *LIS;
MachineSchedContext(): MF(0), MLI(0), MDT(0), AA(0), LIS(0) {}
MachineSchedContext(): MF(0), MLI(0), MDT(0), PassConfig(0), AA(0), LIS(0) {}
};
/// MachineSchedRegistry provides a selection of available machine instruction