diff options
author | Andrew Trick <atrick@apple.com> | 2012-04-01 07:24:23 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-04-01 07:24:23 +0000 |
commit | 830da405fa32ab4f2a8378a658e1429a9ffd4d65 (patch) | |
tree | d08e0ef8dd33dace9a626b2422b8ac4ceca2c8fb | |
parent | d9182d6caed782a290a1bc5b826976b3ba0baa2c (diff) |
misched: Add finalizeScheduler to complete the target interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153827 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/ScheduleDAGInstrs.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/MachineScheduler.cpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAGInstrs.h b/include/llvm/CodeGen/ScheduleDAGInstrs.h index a08f6cc7f7..c8de7bc8f8 100644 --- a/include/llvm/CodeGen/ScheduleDAGInstrs.h +++ b/include/llvm/CodeGen/ScheduleDAGInstrs.h @@ -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. diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp index 364a244275..1d3241b8cc 100644 --- a/lib/CodeGen/MachineScheduler.cpp +++ b/lib/CodeGen/MachineScheduler.cpp @@ -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; } |