diff options
| author | Andrew Trick <atrick@apple.com> | 2012-11-13 02:35:06 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2012-11-13 02:35:06 +0000 |
| commit | 4b1f9e3bac97f66a2eacba28b9cc859555b4862a (patch) | |
| tree | 924bfc8b695cbc40199d2e026e77e4cb2e7b1353 /llvm/lib | |
| parent | 2415b3b6b0c4eeb47c53cc0f908040d106b4d024 (diff) | |
| download | bcm5719-llvm-4b1f9e3bac97f66a2eacba28b9cc859555b4862a.tar.gz bcm5719-llvm-4b1f9e3bac97f66a2eacba28b9cc859555b4862a.zip | |
misched: Don't consider artificial edges weak edges.
For now be more conservative in case other out-of-tree schedulers rely
on the old behavior of artificial edges.
llvm-svn: 167808
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/PostRASchedulerList.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/ScheduleDAG.cpp | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp index 4284c42eb26..f37fc82b2a9 100644 --- a/llvm/lib/CodeGen/PostRASchedulerList.cpp +++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp @@ -581,7 +581,7 @@ void SchedulePostRATDList::FixupKills(MachineBasicBlock *MBB) { void SchedulePostRATDList::ReleaseSucc(SUnit *SU, SDep *SuccEdge) { SUnit *SuccSU = SuccEdge->getSUnit(); - if (SuccEdge->isArtificial()) { + if (SuccEdge->isWeak()) { --SuccSU->WeakPredsLeft; return; } diff --git a/llvm/lib/CodeGen/ScheduleDAG.cpp b/llvm/lib/CodeGen/ScheduleDAG.cpp index 62240366637..0c50db8d345 100644 --- a/llvm/lib/CodeGen/ScheduleDAG.cpp +++ b/llvm/lib/CodeGen/ScheduleDAG.cpp @@ -100,11 +100,8 @@ bool SUnit::addPred(const SDep &D, bool Required) { ++NumPreds; ++N->NumSuccs; } - // SD scheduler relies on artificial edges to enforce physreg - // antidependence, so it doesn't treat them as weak edges. - bool isWeak = D.isWeak() && N->isInstr(); if (!N->isScheduled) { - if (isWeak) { + if (D.isWeak()) { ++WeakPredsLeft; } else { @@ -113,7 +110,7 @@ bool SUnit::addPred(const SDep &D, bool Required) { } } if (!isScheduled) { - if (isWeak) { + if (D.isWeak()) { ++N->WeakSuccsLeft; } else { @@ -160,9 +157,8 @@ void SUnit::removePred(const SDep &D) { --NumPreds; --N->NumSuccs; } - bool isWeak = D.isWeak() && N->isInstr(); if (!N->isScheduled) { - if (isWeak) + if (D.isWeak()) --WeakPredsLeft; else { assert(NumPredsLeft > 0 && "NumPredsLeft will underflow!"); @@ -170,7 +166,7 @@ void SUnit::removePred(const SDep &D) { } } if (!isScheduled) { - if (isWeak) + if (D.isWeak()) --N->WeakSuccsLeft; else { assert(N->NumSuccsLeft > 0 && "NumSuccsLeft will underflow!"); |

