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 | cf6b6131dd0da37903a6e3a5173ea12aa8263713 (patch) | |
tree | bd340b29599c75a0b067d01c723cb7b7d27addb8 | |
parent | e7ff4c14b157746b3e0228d2dce9f70712d1c126 (diff) | |
download | external_llvm-cf6b6131dd0da37903a6e3a5173ea12aa8263713.zip external_llvm-cf6b6131dd0da37903a6e3a5173ea12aa8263713.tar.gz external_llvm-cf6b6131dd0da37903a6e3a5173ea12aa8263713.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167808 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/ScheduleDAG.h | 3 | ||||
-rw-r--r-- | lib/CodeGen/PostRASchedulerList.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/ScheduleDAG.cpp | 12 |
3 files changed, 6 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index 2b6429f..016722e 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -206,8 +206,7 @@ namespace llvm { /// not force ordering. Breaking a weak edge may require the scheduler to /// compensate, for example by inserting a copy. bool isWeak() const { - return getKind() == Order - && (Contents.OrdKind == Artificial || Contents.OrdKind == Cluster); + return getKind() == Order && Contents.OrdKind == Cluster; } /// isArtificial - Test if this is an Order dependence that is marked diff --git a/lib/CodeGen/PostRASchedulerList.cpp b/lib/CodeGen/PostRASchedulerList.cpp index 4284c42..f37fc82 100644 --- a/lib/CodeGen/PostRASchedulerList.cpp +++ b/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/lib/CodeGen/ScheduleDAG.cpp b/lib/CodeGen/ScheduleDAG.cpp index 6224036..0c50db8 100644 --- a/lib/CodeGen/ScheduleDAG.cpp +++ b/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!"); |