[llvm-commits] [llvm] r59969 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Dan Gohman gohman at apple.com
Mon Nov 24 09:33:53 PST 2008


Author: djg
Date: Mon Nov 24 11:33:52 2008
New Revision: 59969

URL: http://llvm.org/viewvc/llvm-project?rev=59969&view=rev
Log:
Check in the rest of this change. The isAntiDep flag needs to be passed
to removePred because an SUnit can both data-depend and anti-depend
on the same SUnit.

Modified:
    llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=59969&r1=59968&r2=59969&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon Nov 24 11:33:52 2008
@@ -164,7 +164,7 @@
       return true;
     }
 
-    bool removePred(SUnit *N, bool isCtrl, bool isArtificial) {
+    bool removePred(SUnit *N, bool isCtrl, bool isArtificial, bool isAntiDep) {
       for (SmallVector<SDep, 4>::iterator I = Preds.begin(), E = Preds.end();
            I != E; ++I)
         if (I->Dep == N && I->isCtrl == isCtrl && I->isArtificial == isArtificial) {
@@ -172,7 +172,8 @@
           for (SmallVector<SDep, 4>::iterator II = N->Succs.begin(),
                  EE = N->Succs.end(); II != EE; ++II)
             if (II->Dep == this &&
-                II->isCtrl == isCtrl && II->isArtificial == isArtificial) {
+                II->isCtrl == isCtrl && II->isArtificial == isArtificial &&
+                II->isAntiDep == isAntiDep) {
               FoundSucc = true;
               N->Succs.erase(II);
               break;

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp?rev=59969&r1=59968&r2=59969&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp Mon Nov 24 11:33:52 2008
@@ -198,7 +198,7 @@
 /// the current node M.
 bool ScheduleDAGFast::RemovePred(SUnit *M, SUnit *N, 
                                  bool isCtrl, bool isArtificial) {
-  return M->removePred(N, isCtrl, isArtificial);
+  return M->removePred(N, isCtrl, isArtificial, false);
 }
 
 /// CopyAndMoveSuccessors - Clone the specified node and move its scheduled

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=59969&r1=59968&r2=59969&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Mon Nov 24 11:33:52 2008
@@ -506,7 +506,7 @@
 bool ScheduleDAGRRList::RemovePred(SUnit *M, SUnit *N, 
                                    bool isCtrl, bool isArtificial) {
   // InitDAGTopologicalSorting();
-  return M->removePred(N, isCtrl, isArtificial);
+  return M->removePred(N, isCtrl, isArtificial, false);
 }
 
 /// DFS - Make a DFS traversal to mark all nodes reachable from SU and mark





More information about the llvm-commits mailing list