aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ScheduleDAG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/ScheduleDAG.cpp')
-rw-r--r--lib/CodeGen/ScheduleDAG.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/CodeGen/ScheduleDAG.cpp b/lib/CodeGen/ScheduleDAG.cpp
index c2d291dadd..730080d0fa 100644
--- a/lib/CodeGen/ScheduleDAG.cpp
+++ b/lib/CodeGen/ScheduleDAG.cpp
@@ -77,8 +77,10 @@ void SUnit::addPred(const SDep &D) {
++N->NumSuccsLeft;
N->Succs.push_back(P);
Preds.push_back(D);
- this->setDepthDirty();
- N->setHeightDirty();
+ if (P.getLatency() != 0) {
+ this->setDepthDirty();
+ N->setHeightDirty();
+ }
}
/// removePred - This removes the specified edge as a pred of the current
@@ -112,8 +114,10 @@ void SUnit::removePred(const SDep &D) {
--NumPredsLeft;
if (!isScheduled)
--N->NumSuccsLeft;
- this->setDepthDirty();
- N->setHeightDirty();
+ if (P.getLatency() != 0) {
+ this->setDepthDirty();
+ N->setHeightDirty();
+ }
return;
}
}