[llvm-commits] [llvm] r153827 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAGInstrs.h lib/CodeGen/MachineScheduler.cpp

Andrew Trick atrick at apple.com
Sun Apr 1 00:24:23 PDT 2012


Author: atrick
Date: Sun Apr  1 02:24:23 2012
New Revision: 153827

URL: http://llvm.org/viewvc/llvm-project?rev=153827&view=rev
Log:
misched: Add finalizeScheduler to complete the target interface.

Modified:
    llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h
    llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h?rev=153827&r1=153826&r2=153827&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h Sun Apr  1 02:24:23 2012
@@ -296,6 +296,10 @@
     /// 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.

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=153827&r1=153826&r2=153827&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Sun Apr  1 02:24:23 2012
@@ -227,6 +227,7 @@
     assert(RemainingCount == 0 && "Instruction count mismatch!");
     Scheduler->finishBlock();
   }
+  Scheduler->finalizeSchedule();
   DEBUG(LIS->print(dbgs()));
   return true;
 }





More information about the llvm-commits mailing list