diff options
-rw-r--r-- | lib/CodeGen/VirtRegMap.cpp | 8 | ||||
-rw-r--r-- | lib/CodeGen/VirtRegMap.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 7e8e416..5cec9e9 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -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) diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index c4188bc..e9bfe76 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -97,6 +97,7 @@ namespace llvm { } int assignVirt2StackSlot(unsigned virtReg); + void assignVirt2StackSlot(unsigned virtReg, int frameIndex); void virtFolded(unsigned virtReg, MachineInstr* oldMI, |