[llvm-commits] [llvm] r167808 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/PostRASchedulerList.cpp lib/CodeGen/ScheduleDAG.cpp

Andrew Trick atrick at apple.com
Mon Nov 12 18:35:06 PST 2012


Author: atrick
Date: Mon Nov 12 20:35:06 2012
New Revision: 167808

URL: http://llvm.org/viewvc/llvm-project?rev=167808&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
    llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
    llvm/trunk/lib/CodeGen/ScheduleDAG.cpp

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=167808&r1=167807&r2=167808&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon Nov 12 20:35:06 2012
@@ -206,8 +206,7 @@
     /// 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

Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=167808&r1=167807&r2=167808&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Mon Nov 12 20:35:06 2012
@@ -581,7 +581,7 @@
 void SchedulePostRATDList::ReleaseSucc(SUnit *SU, SDep *SuccEdge) {
   SUnit *SuccSU = SuccEdge->getSUnit();
 
-  if (SuccEdge->isArtificial()) {
+  if (SuccEdge->isWeak()) {
     --SuccSU->WeakPredsLeft;
     return;
   }

Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=167808&r1=167807&r2=167808&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Mon Nov 12 20:35:06 2012
@@ -100,11 +100,8 @@
     ++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 @@
     }
   }
   if (!isScheduled) {
-    if (isWeak) {
+    if (D.isWeak()) {
       ++N->WeakSuccsLeft;
     }
     else {
@@ -160,9 +157,8 @@
         --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 @@
         }
       }
       if (!isScheduled) {
-        if (isWeak)
+        if (D.isWeak())
           --N->WeakSuccsLeft;
         else {
           assert(N->NumSuccsLeft > 0 && "NumSuccsLeft will underflow!");





More information about the llvm-commits mailing list