[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocIterativeScan.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Jul 21 05:00:20 PDT 2004
Changes in directory llvm/lib/CodeGen:
RegAllocIterativeScan.cpp updated: 1.3 -> 1.4
---
Log message:
Clear spilled list at once. Remove unused vector.
---
Diffs of the changes: (+2 -3)
Index: llvm/lib/CodeGen/RegAllocIterativeScan.cpp
diff -u llvm/lib/CodeGen/RegAllocIterativeScan.cpp:1.3 llvm/lib/CodeGen/RegAllocIterativeScan.cpp:1.4
--- llvm/lib/CodeGen/RegAllocIterativeScan.cpp:1.3 Wed Jul 21 04:46:55 2004
+++ llvm/lib/CodeGen/RegAllocIterativeScan.cpp Wed Jul 21 07:00:10 2004
@@ -161,14 +161,14 @@
// the spill code and restart the algorithm
std::set<unsigned> spilledRegs;
for (IntervalPtrs::iterator
- i = spilled_.begin(); i != spilled_.end(); ) {
+ i = spilled_.begin(); i != spilled_.end(); ++i) {
int slot = vrm_->assignVirt2StackSlot((*i)->reg);
std::vector<LiveInterval*> added =
li_->addIntervalsForSpills(**i, *vrm_, slot);
std::copy(added.begin(), added.end(), std::back_inserter(handled_));
spilledRegs.insert((*i)->reg);
- i = spilled_.erase(i);
}
+ spilled_.clear();
for (IntervalPtrs::iterator
i = handled_.begin(); i != handled_.end(); )
if (spilledRegs.count((*i)->reg))
@@ -415,7 +415,6 @@
// otherwise we spill all intervals aliasing the register with
// minimum weight, assigned the newly cleared register to the
// current interval and continue
- std::vector<LiveInterval*> added;
assert(MRegisterInfo::isPhysicalRegister(minReg) &&
"did not choose a register to spill?");
std::vector<bool> toSpill(mri_->getNumRegs(), false);
More information about the llvm-commits
mailing list