mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
spillPhysRegAroundRegDefsUses() may have invalidated iterators stored in fixed_ IntervalPtrs. Reset them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -978,6 +978,15 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
|
||||
li_->getApproximateInstructionCount(*cur) == 0) {
|
||||
// Spill a physical register around defs and uses.
|
||||
if (li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_)) {
|
||||
// spillPhysRegAroundRegDefsUses may have invalidated iterator stored
|
||||
// in fixed_. Reset them.
|
||||
for (unsigned i = 0, e = fixed_.size(); i != e; ++i) {
|
||||
IntervalPtr &IP = fixed_[i];
|
||||
LiveInterval *I = IP.first;
|
||||
if (I->reg == minReg || tri_->isSubRegister(minReg, I->reg))
|
||||
IP.second = I->advanceTo(I->begin(), StartPosition);
|
||||
}
|
||||
|
||||
DowngradedRegs.clear();
|
||||
assignRegOrStackSlotAtInterval(cur);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user