summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-01-24 02:09:57 +0000
committerAndrew Trick <atrick@apple.com>2013-01-24 02:09:57 +0000
commitdb4170697f866dc8620946c77828ef0804996c3d (patch)
treed60c982e7dda6157bc1e7413b3820742d658d3bb /lib/CodeGen/MachineScheduler.cpp
parent66658dd9a1ffe00a5f6e0afca7afb16ec6704ed3 (diff)
downloadllvm-db4170697f866dc8620946c77828ef0804996c3d.tar.gz
llvm-db4170697f866dc8620946c77828ef0804996c3d.tar.bz2
llvm-db4170697f866dc8620946c77828ef0804996c3d.tar.xz
MachineScheduler: enable biasCriticalPath for all DAGs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--lib/CodeGen/MachineScheduler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp
index c949266b8b..b9198e8fc6 100644
--- a/lib/CodeGen/MachineScheduler.cpp
+++ b/lib/CodeGen/MachineScheduler.cpp
@@ -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);