aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/Passes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/Passes.h')
-rw-r--r--include/llvm/CodeGen/Passes.h49
1 files changed, 29 insertions, 20 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 9b6f61e..ae4a2fa 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -21,19 +21,22 @@
namespace llvm {
- class FunctionPass;
- class MachineFunctionPass;
- class PassInfo;
- class PassManagerBase;
- class TargetLoweringBase;
- class TargetLowering;
- class TargetRegisterClass;
- class raw_ostream;
-}
-
-namespace llvm {
-
+class FunctionPass;
+class MachineFunctionPass;
class PassConfigImpl;
+class PassInfo;
+class ScheduleDAGInstrs;
+class TargetLowering;
+class TargetLoweringBase;
+class TargetRegisterClass;
+class raw_ostream;
+struct MachineSchedContext;
+
+// The old pass manager infrastructure is hidden in a legacy namespace now.
+namespace legacy {
+class PassManagerBase;
+}
+using legacy::PassManagerBase;
/// Discriminated union of Pass ID types.
///
@@ -204,6 +207,20 @@ public:
/// Fully developed targets will not generally override this.
virtual void addMachinePasses();
+ /// createTargetScheduler - Create an instance of ScheduleDAGInstrs to be run
+ /// within the standard MachineScheduler pass for this function and target at
+ /// the current optimization level.
+ ///
+ /// This can also be used to plug a new MachineSchedStrategy into an instance
+ /// of the standard ScheduleDAGMI:
+ /// return new ScheduleDAGMI(C, new MyStrategy(C))
+ ///
+ /// Return NULL to select the default (generic) machine scheduler.
+ virtual ScheduleDAGInstrs *
+ createMachineScheduler(MachineSchedContext *C) const {
+ return 0;
+ }
+
protected:
// Helper to verify the analysis is really immutable.
void setOpt(bool &Opt, bool Val);
@@ -365,14 +382,6 @@ namespace llvm {
/// these register allocator like this: AU.addRequiredID(PHIEliminationID);
extern char &PHIEliminationID;
- /// StrongPHIElimination - This pass eliminates machine instruction PHI
- /// nodes by inserting copy instructions. This destroys SSA information, but
- /// is the desired input for some register allocators. This pass is
- /// "required" by these register allocator like this:
- /// AU.addRequiredID(PHIEliminationID);
- /// This pass is still in development
- extern char &StrongPHIEliminationID;
-
/// LiveIntervals - This analysis keeps track of the live ranges of virtual
/// and physical registers.
extern char &LiveIntervalsID;