[llvm-commits] [llvm] r61762 - /llvm/trunk/lib/CodeGen/ScheduleDAG.cpp

Dan Gohman gohman at apple.com
Mon Jan 5 14:40:26 PST 2009


Author: djg
Date: Mon Jan  5 16:40:26 2009
New Revision: 61762

URL: http://llvm.org/viewvc/llvm-project?rev=61762&view=rev
Log:
Don't call setDepthDirty/setHeightDirty when adding an edge
with latency 0, since it doesn't affect the depth or height.

Modified:
    llvm/trunk/lib/CodeGen/ScheduleDAG.cpp

Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=61762&r1=61761&r2=61762&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Mon Jan  5 16:40:26 2009
@@ -77,8 +77,10 @@
     ++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 @@
         --NumPredsLeft;
       if (!isScheduled)
         --N->NumSuccsLeft;
-      this->setDepthDirty();
-      N->setHeightDirty();
+      if (P.getLatency() != 0) {
+        this->setDepthDirty();
+        N->setHeightDirty();
+      }
       return;
     }
 }





More information about the llvm-commits mailing list