diff options
| author | Dan Gohman <gohman@apple.com> | 2009-01-05 22:40:26 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-01-05 22:40:26 +0000 |
| commit | 52d4d8244b7c39c5cdbcb0a918872806f7c9b6e0 (patch) | |
| tree | e06905e4abf0cf615b6ccdb4dbcc5848bac32dda /llvm/lib/CodeGen/ScheduleDAG.cpp | |
| parent | ced65244371fd516b7c450954e098576406b3a06 (diff) | |
| download | bcm5719-llvm-52d4d8244b7c39c5cdbcb0a918872806f7c9b6e0.tar.gz bcm5719-llvm-52d4d8244b7c39c5cdbcb0a918872806f7c9b6e0.zip | |
Don't call setDepthDirty/setHeightDirty when adding an edge
with latency 0, since it doesn't affect the depth or height.
llvm-svn: 61762
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAG.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/ScheduleDAG.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAG.cpp b/llvm/lib/CodeGen/ScheduleDAG.cpp index c2d291dadd3..730080d0fa4 100644 --- a/llvm/lib/CodeGen/ScheduleDAG.cpp +++ b/llvm/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; } } |

