diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 330ec560f88..d7ecec4163a 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -484,6 +484,8 @@ void ScheduleDAGMI::releaseRoots() { void ScheduleDAGMI::schedule() { buildDAGWithRegPressure(); + postprocessDAG(); + DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su) SUnits[su].dumpAll(this)); @@ -522,6 +524,13 @@ void ScheduleDAGMI::buildDAGWithRegPressure() { initRegPressure(); } +/// Apply each ScheduleDAGMutation step in order. +void ScheduleDAGMI::postprocessDAG() { + for (unsigned i = 0, e = Mutations.size(); i < e; ++i) { + Mutations[i]->apply(this); + } +} + /// Identify DAG roots and setup scheduler queues. void ScheduleDAGMI::initQueues() { // Initialize the strategy before modifying the DAG. |