Check in the rest of this change. The isAntiDep flag needs to be passed
authorDan Gohman <gohman@apple.com>
Mon, 24 Nov 2008 17:33:52 +0000 (17:33 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 24 Nov 2008 17:33:52 +0000 (17:33 +0000)
to removePred because an SUnit can both data-depend and anti-depend
on the same SUnit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59969 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 4b65bd23e37027be716bb2c9839b5128aa61f2ca..e120e08593e85274afdbee6df039ba9b8bfe1667 100644 (file)
@@ -164,7 +164,7 @@ namespace llvm {
       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 @@ namespace llvm {
           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;
index 55fd7e4abc0c68703d879e1e143d11ab82459b39..d0b8927abeb0fd61358e00550fb53a24ee0f154a 100644 (file)
@@ -198,7 +198,7 @@ bool ScheduleDAGFast::AddPred(SUnit *Y, SUnit *X, bool isCtrl,
 /// 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
index 03a91cffdeea1ef5dacfcf01f6d7990749503b42..16f9950295153ed140691f2d1511351e45b11fb0 100644 (file)
@@ -506,7 +506,7 @@ bool ScheduleDAGRRList::AddPred(SUnit *Y, SUnit *X, bool isCtrl,
 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