misched: Add finalizeScheduler to complete the target interface.
authorAndrew Trick <atrick@apple.com>
Sun, 1 Apr 2012 07:24:23 +0000 (07:24 +0000)
committerAndrew Trick <atrick@apple.com>
Sun, 1 Apr 2012 07:24:23 +0000 (07:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153827 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/ScheduleDAGInstrs.h
lib/CodeGen/MachineScheduler.cpp

index a08f6cc7f702c7bea2224e8d69d19c1ddb97dfa9..c8de7bc8f8922aba49bb38ddf060b9fea6e76f3c 100644 (file)
@@ -296,6 +296,10 @@ namespace llvm {
     /// overriding enterRegion() or exitRegion().
     virtual void schedule() = 0;
 
+    /// finalizeSchedule - Allow targets to perform final scheduling actions at
+    /// the level of the whole MachineFunction. By default does nothing.
+    virtual void finalizeSchedule() {}
+
     virtual void dumpNode(const SUnit *SU) const;
 
     /// Return a label for a DAG node that points to an instruction.
index 364a2442759a62035027dd28304605aa2aac6ac4..1d3241b8cc6b2d5361f20e203f2adf2bfb5848f5 100644 (file)
@@ -227,6 +227,7 @@ bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {
     assert(RemainingCount == 0 && "Instruction count mismatch!");
     Scheduler->finishBlock();
   }
+  Scheduler->finalizeSchedule();
   DEBUG(LIS->print(dbgs()));
   return true;
 }