Add method to assign stack slot to virtual register without creating a

new one.

llvm-svn: 13895
This commit is contained in:
Alkis Evlogimenos 2004-05-29 20:38:05 +00:00
parent c5923ac8b1
commit 516e16441b
2 changed files with 9 additions and 0 deletions

View File

@ -61,6 +61,14 @@ int VirtRegMap::assignVirt2StackSlot(unsigned virtReg)
return frameIndex;
}
void VirtRegMap::assignVirt2StackSlot(unsigned virtReg, int frameIndex)
{
assert(MRegisterInfo::isVirtualRegister(virtReg));
assert(v2ssMap_[virtReg] == NO_STACK_SLOT &&
"attempt to assign stack slot to already spilled register");
v2ssMap_[virtReg] = frameIndex;
}
void VirtRegMap::virtFolded(unsigned virtReg,
MachineInstr* oldMI,
MachineInstr* newMI)

View File

@ -97,6 +97,7 @@ namespace llvm {
}
int assignVirt2StackSlot(unsigned virtReg);
void assignVirt2StackSlot(unsigned virtReg, int frameIndex);
void virtFolded(unsigned virtReg,
MachineInstr* oldMI,