aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-09-27 07:29:27 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-09-27 07:29:27 +0000
commitdc07d96051f41a0b30c911e32ff67f8a53a5bdf8 (patch)
tree5ab18b3db9dde2bcd8f2fc5ba49424837c2135ee /lib
parent01f82cade49881cf4e294ede4fe688c07650b487 (diff)
downloadexternal_llvm-dc07d96051f41a0b30c911e32ff67f8a53a5bdf8.zip
external_llvm-dc07d96051f41a0b30c911e32ff67f8a53a5bdf8.tar.gz
external_llvm-dc07d96051f41a0b30c911e32ff67f8a53a5bdf8.tar.bz2
Boogs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 6cf5a41..6127ab6 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -427,20 +427,20 @@ SUnit *ScheduleDAGRRList::CopyAndMoveSuccessors(SUnit *SU) {
// Only copy scheduled successors. Cut them from old node's successor
// list and move them over.
- SmallVector<SDep*, 2> DelDeps;
+ SmallVector<std::pair<SUnit*, bool>, 4> DelDeps;
for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
I != E; ++I) {
if (I->isSpecial)
continue;
- NewSU->Height = std::max(NewSU->Height, I->Dep->Height+1);
if (I->Dep->isScheduled) {
+ NewSU->Height = std::max(NewSU->Height, I->Dep->Height+1);
I->Dep->addPred(NewSU, I->isCtrl, false, I->Reg, I->Cost);
- DelDeps.push_back(I);
+ DelDeps.push_back(std::make_pair(I->Dep, I->isCtrl));
}
}
for (unsigned i = 0, e = DelDeps.size(); i != e; ++i) {
- SUnit *Succ = DelDeps[i]->Dep;
- bool isCtrl = DelDeps[i]->isCtrl;
+ SUnit *Succ = DelDeps[i].first;
+ bool isCtrl = DelDeps[i].second;
Succ->removePred(SU, isCtrl, false);
}
@@ -469,20 +469,20 @@ void ScheduleDAGRRList::InsertCCCopiesAndMoveSuccs(SUnit *SU, unsigned Reg,
// Only copy scheduled successors. Cut them from old node's successor
// list and move them over.
- SmallVector<SDep*, 2> DelDeps;
+ SmallVector<std::pair<SUnit*, bool>, 4> DelDeps;
for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
I != E; ++I) {
if (I->isSpecial)
continue;
- CopyToSU->Height = std::max(CopyToSU->Height, I->Dep->Height+1);
if (I->Dep->isScheduled) {
+ CopyToSU->Height = std::max(CopyToSU->Height, I->Dep->Height+1);
I->Dep->addPred(CopyToSU, I->isCtrl, false, I->Reg, I->Cost);
- DelDeps.push_back(I);
+ DelDeps.push_back(std::make_pair(I->Dep, I->isCtrl));
}
}
for (unsigned i = 0, e = DelDeps.size(); i != e; ++i) {
- SUnit *Succ = DelDeps[i]->Dep;
- bool isCtrl = DelDeps[i]->isCtrl;
+ SUnit *Succ = DelDeps[i].first;
+ bool isCtrl = DelDeps[i].second;
Succ->removePred(SU, isCtrl, false);
}