When reserving a preallocated register spill the aliases of this

register too.

llvm-svn: 10450
This commit is contained in:
Alkis Evlogimenos 2003-12-13 11:58:10 +00:00
parent 7dbdf3839c
commit 4f7f017ab5
1 changed files with 16 additions and 0 deletions

View File

@ -628,6 +628,22 @@ void RA::reservePhysReg(unsigned physReg)
assignVirt2StackSlot(virtReg);
}
p2vMap_[physReg] = physReg; // this denotes a reserved physical register
// if it also aliases any other registers with values spill them too
for (const unsigned* as = mri_->getAliasSet(physReg); *as; ++as) {
unsigned virtReg = p2vMap_[*as];
if (virtReg != 0 && virtReg != *as) {
// remove interval from active
for (IntervalPtrs::iterator i = active_.begin(), e = active_.end();
i != e; ++i) {
if ((*i)->reg == virtReg) {
active_.erase(i);
break;
}
}
assignVirt2StackSlot(virtReg);
}
}
}
void RA::clearReservedPhysReg(unsigned physReg)