mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Clear spilled list at once. Remove unused vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15073 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -161,14 +161,14 @@ bool RA::runOnMachineFunction(MachineFunction &fn) {
|
|||||||
// the spill code and restart the algorithm
|
// the spill code and restart the algorithm
|
||||||
std::set<unsigned> spilledRegs;
|
std::set<unsigned> spilledRegs;
|
||||||
for (IntervalPtrs::iterator
|
for (IntervalPtrs::iterator
|
||||||
i = spilled_.begin(); i != spilled_.end(); ) {
|
i = spilled_.begin(); i != spilled_.end(); ++i) {
|
||||||
int slot = vrm_->assignVirt2StackSlot((*i)->reg);
|
int slot = vrm_->assignVirt2StackSlot((*i)->reg);
|
||||||
std::vector<LiveInterval*> added =
|
std::vector<LiveInterval*> added =
|
||||||
li_->addIntervalsForSpills(**i, *vrm_, slot);
|
li_->addIntervalsForSpills(**i, *vrm_, slot);
|
||||||
std::copy(added.begin(), added.end(), std::back_inserter(handled_));
|
std::copy(added.begin(), added.end(), std::back_inserter(handled_));
|
||||||
spilledRegs.insert((*i)->reg);
|
spilledRegs.insert((*i)->reg);
|
||||||
i = spilled_.erase(i);
|
|
||||||
}
|
}
|
||||||
|
spilled_.clear();
|
||||||
for (IntervalPtrs::iterator
|
for (IntervalPtrs::iterator
|
||||||
i = handled_.begin(); i != handled_.end(); )
|
i = handled_.begin(); i != handled_.end(); )
|
||||||
if (spilledRegs.count((*i)->reg))
|
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
|
// otherwise we spill all intervals aliasing the register with
|
||||||
// minimum weight, assigned the newly cleared register to the
|
// minimum weight, assigned the newly cleared register to the
|
||||||
// current interval and continue
|
// current interval and continue
|
||||||
std::vector<LiveInterval*> added;
|
|
||||||
assert(MRegisterInfo::isPhysicalRegister(minReg) &&
|
assert(MRegisterInfo::isPhysicalRegister(minReg) &&
|
||||||
"did not choose a register to spill?");
|
"did not choose a register to spill?");
|
||||||
std::vector<bool> toSpill(mri_->getNumRegs(), false);
|
std::vector<bool> toSpill(mri_->getNumRegs(), false);
|
||||||
|
Reference in New Issue
Block a user