MachineScheduler: enable biasCriticalPath for all DAGs.
authorAndrew Trick <atrick@apple.com>
Thu, 24 Jan 2013 02:09:57 +0000 (02:09 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 24 Jan 2013 02:09:57 +0000 (02:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173318 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineScheduler.cpp

index c949266b8b2686e60d6d18dc3972102167feffa2..b9198e8fc6c3c477202eb8bf12d20709df584796 100644 (file)
@@ -563,6 +563,10 @@ void ScheduleDAGMI::releaseRoots() {
   for (std::vector<SUnit>::iterator
          I = SUnits.begin(), E = SUnits.end(); I != E; ++I) {
     SUnit *SU = &(*I);
+
+    // Order predecessors so DFSResult follows the critical path.
+    SU->biasCriticalPath();
+
     // A SUnit is ready to top schedule if it has no predecessors.
     if (!I->NumPredsLeft && SU != &EntrySU)
       SchedImpl->releaseTopNode(SU);