summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-05 22:40:26 +0000
committerDan Gohman <gohman@apple.com>2009-01-05 22:40:26 +0000
commita80c859df377908c687d59e9c0fc65006796b719 (patch)
tree93acee7b2519d3136de9cfdecd214d1f8391941a /lib/CodeGen/ScheduleDAG.cpp
parent8526cc03a51347ab29737d1e5682aa6a7d095b9b (diff)
downloadllvm-a80c859df377908c687d59e9c0fc65006796b719.tar.gz
llvm-a80c859df377908c687d59e9c0fc65006796b719.tar.bz2
llvm-a80c859df377908c687d59e9c0fc65006796b719.tar.xz
Don't call setDepthDirty/setHeightDirty when adding an edge
with latency 0, since it doesn't affect the depth or height. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61762 91177308-0d34-0410-b5e6-96231b3b80d8
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;
}
}