[llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.h VirtRegMap.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat May 29 15:42:01 PDT 2004
Changes in directory llvm/lib/CodeGen:
VirtRegMap.h updated: 1.10 -> 1.11
VirtRegMap.cpp updated: 1.11 -> 1.12
---
Log message:
Add method to assign stack slot to virtual register without creating a
new one.
---
Diffs of the changes: (+9 -0)
Index: llvm/lib/CodeGen/VirtRegMap.h
diff -u llvm/lib/CodeGen/VirtRegMap.h:1.10 llvm/lib/CodeGen/VirtRegMap.h:1.11
--- llvm/lib/CodeGen/VirtRegMap.h:1.10 Sat May 29 14:03:29 2004
+++ llvm/lib/CodeGen/VirtRegMap.h Sat May 29 15:38:05 2004
@@ -97,6 +97,7 @@
}
int assignVirt2StackSlot(unsigned virtReg);
+ void assignVirt2StackSlot(unsigned virtReg, int frameIndex);
void virtFolded(unsigned virtReg,
MachineInstr* oldMI,
Index: llvm/lib/CodeGen/VirtRegMap.cpp
diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.11 llvm/lib/CodeGen/VirtRegMap.cpp:1.12
--- llvm/lib/CodeGen/VirtRegMap.cpp:1.11 Tue Mar 9 02:35:13 2004
+++ llvm/lib/CodeGen/VirtRegMap.cpp Sat May 29 15:38:05 2004
@@ -61,6 +61,14 @@
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)
More information about the llvm-commits
mailing list