Correctly set the isCtrl flag for chain dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-11-21 19:17:25 +00:00
parent fc626b62b8
commit 37d8b3193d

View File

@ -85,18 +85,18 @@ void ScheduleDAGInstrs::BuildSchedUnits() {
bool True = true;
if (!MI->isSafeToMove(TII, False)) {
if (Chain)
Chain->addPred(SU, /*isCtrl=*/false, /*isArtificial=*/false);
Chain->addPred(SU, /*isCtrl=*/true, /*isArtificial=*/false);
for (unsigned k = 0, m = PendingLoads.size(); k != m; ++k)
PendingLoads[k]->addPred(SU, /*isCtrl=*/false, /*isArtificial=*/false);
PendingLoads[k]->addPred(SU, /*isCtrl=*/true, /*isArtificial=*/false);
PendingLoads.clear();
Chain = SU;
} else if (!MI->isSafeToMove(TII, True)) {
if (Chain)
Chain->addPred(SU, /*isCtrl=*/false, /*isArtificial=*/false);
Chain->addPred(SU, /*isCtrl=*/true, /*isArtificial=*/false);
PendingLoads.push_back(SU);
}
if (Terminator && SU->Succs.empty())
Terminator->addPred(SU, /*isCtrl=*/false, /*isArtificial=*/false);
Terminator->addPred(SU, /*isCtrl=*/true, /*isArtificial=*/false);
if (MI->getDesc().isTerminator() || MI->isLabel())
Terminator = SU;