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
This commit is contained in:
Dan Gohman 2008-11-24 17:33:52 +00:00
parent d2b10368ed
commit 5cc12a8e31
3 changed files with 5 additions and 4 deletions

View File

@ -164,7 +164,7 @@ namespace llvm {
return true; 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(); for (SmallVector<SDep, 4>::iterator I = Preds.begin(), E = Preds.end();
I != E; ++I) I != E; ++I)
if (I->Dep == N && I->isCtrl == isCtrl && I->isArtificial == isArtificial) { 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(), for (SmallVector<SDep, 4>::iterator II = N->Succs.begin(),
EE = N->Succs.end(); II != EE; ++II) EE = N->Succs.end(); II != EE; ++II)
if (II->Dep == this && if (II->Dep == this &&
II->isCtrl == isCtrl && II->isArtificial == isArtificial) { II->isCtrl == isCtrl && II->isArtificial == isArtificial &&
II->isAntiDep == isAntiDep) {
FoundSucc = true; FoundSucc = true;
N->Succs.erase(II); N->Succs.erase(II);
break; break;

View File

@ -198,7 +198,7 @@ bool ScheduleDAGFast::AddPred(SUnit *Y, SUnit *X, bool isCtrl,
/// the current node M. /// the current node M.
bool ScheduleDAGFast::RemovePred(SUnit *M, SUnit *N, bool ScheduleDAGFast::RemovePred(SUnit *M, SUnit *N,
bool isCtrl, bool isArtificial) { 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 /// CopyAndMoveSuccessors - Clone the specified node and move its scheduled

View File

@ -506,7 +506,7 @@ bool ScheduleDAGRRList::AddPred(SUnit *Y, SUnit *X, bool isCtrl,
bool ScheduleDAGRRList::RemovePred(SUnit *M, SUnit *N, bool ScheduleDAGRRList::RemovePred(SUnit *M, SUnit *N,
bool isCtrl, bool isArtificial) { bool isCtrl, bool isArtificial) {
// InitDAGTopologicalSorting(); // 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 /// DFS - Make a DFS traversal to mark all nodes reachable from SU and mark