summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-24 17:33:52 +0000
committerDan Gohman <gohman@apple.com>2008-11-24 17:33:52 +0000
commit5cc12a8e31832165dfec8e631d7efa85ea337dc5 (patch)
treeafae12f9a08d133197d65466aaf89e173fbaa545 /llvm
parentd2b10368ed56a6e14db7cbc0e8a2c79774b44fb1 (diff)
downloadbcm5719-llvm-5cc12a8e31832165dfec8e631d7efa85ea337dc5.tar.gz
bcm5719-llvm-5cc12a8e31832165dfec8e631d7efa85ea337dc5.zip
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. llvm-svn: 59969
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/ScheduleDAG.h5
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/llvm/include/llvm/CodeGen/ScheduleDAG.h b/llvm/include/llvm/CodeGen/ScheduleDAG.h
index 4b65bd23e37..e120e08593e 100644
--- a/llvm/include/llvm/CodeGen/ScheduleDAG.h
+++ b/llvm/include/llvm/CodeGen/ScheduleDAG.h
@@ -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;
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
index 55fd7e4abc0..d0b8927abeb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
@@ -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
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 03a91cffdee..16f99502951 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -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
OpenPOWER on IntegriCloud