diff options
| author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-21 12:00:10 +0000 |
|---|---|---|
| committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-21 12:00:10 +0000 |
| commit | 701071a144410d32e34c46226ce354cc2031cbb8 (patch) | |
| tree | 13bd02df547905a28a01f57d8bf91e3d77d8efb1 /llvm/lib/CodeGen | |
| parent | a3efc0373134eef33138bf13a7cc144af8bc17ca (diff) | |
| download | bcm5719-llvm-701071a144410d32e34c46226ce354cc2031cbb8.tar.gz bcm5719-llvm-701071a144410d32e34c46226ce354cc2031cbb8.zip | |
Clear spilled list at once. Remove unused vector.
llvm-svn: 15073
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocIterativeScan.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocIterativeScan.cpp b/llvm/lib/CodeGen/RegAllocIterativeScan.cpp index 63fd358451f..3f380aaf9de 100644 --- a/llvm/lib/CodeGen/RegAllocIterativeScan.cpp +++ b/llvm/lib/CodeGen/RegAllocIterativeScan.cpp @@ -161,14 +161,14 @@ bool RA::runOnMachineFunction(MachineFunction &fn) { // 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 @@ void RA::assignRegOrSpillAtInterval(IntervalPtrs::value_type cur) // 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); |

