[llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp PrologEpilogInserter.cpp RegAllocLocal.cpp RegAllocSimple.cpp VirtRegMap.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 15 15:02:33 PDT 2004
Changes in directory llvm/lib/CodeGen:
MachineFunction.cpp updated: 1.67 -> 1.68
PrologEpilogInserter.cpp updated: 1.31 -> 1.32
RegAllocLocal.cpp updated: 1.65 -> 1.66
RegAllocSimple.cpp updated: 1.59 -> 1.60
VirtRegMap.cpp updated: 1.17 -> 1.18
---
Log message:
Stop using CreateStackObject(RegClass*)
---
Diffs of the changes: (+8 -9)
Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.67 llvm/lib/CodeGen/MachineFunction.cpp:1.68
--- llvm/lib/CodeGen/MachineFunction.cpp:1.67 Thu Aug 12 13:10:18 2004
+++ llvm/lib/CodeGen/MachineFunction.cpp Sun Aug 15 17:02:22 2004
@@ -261,10 +261,6 @@
return CreateStackObject(TD.getTypeSize(Ty), TD.getTypeAlignment(Ty));
}
-int MachineFrameInfo::CreateStackObject(const TargetRegisterClass *RC) {
- return CreateStackObject(RC->getSize(), RC->getAlignment());
-}
-
void MachineFrameInfo::print(const MachineFunction &MF, std::ostream &OS) const{
int ValOffset = MF.getTarget().getFrameInfo()->getOffsetOfLocalArea();
Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.31 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.32
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.31 Sun Aug 15 16:56:44 2004
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Sun Aug 15 17:02:22 2004
@@ -182,7 +182,7 @@
if (FixedSlot == FixedSpillSlots+NumFixedSpillSlots) {
// Nope, just spill it anywhere convenient.
- FrameIdx = FFI->CreateStackObject(RC);
+ FrameIdx = FFI->CreateStackObject(RC->getSize(), RC->getAlignment());
} else {
// Spill it to the stack where we must.
FrameIdx = FFI->CreateFixedObject(RC->getSize(), FixedSlot->second);
Index: llvm/lib/CodeGen/RegAllocLocal.cpp
diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.65 llvm/lib/CodeGen/RegAllocLocal.cpp:1.66
--- llvm/lib/CodeGen/RegAllocLocal.cpp:1.65 Sun Aug 15 16:56:44 2004
+++ llvm/lib/CodeGen/RegAllocLocal.cpp Sun Aug 15 17:02:22 2004
@@ -225,7 +225,8 @@
return I->second; // Already has space allocated?
// Allocate a new stack object for this spill location...
- int FrameIdx = MF->getFrameInfo()->CreateStackObject(RC);
+ int FrameIdx = MF->getFrameInfo()->CreateStackObject(RC->getSize(),
+ RC->getAlignment());
// Assign the slot...
StackSlotForVirtReg.insert(I, std::make_pair(VirtReg, FrameIdx));
Index: llvm/lib/CodeGen/RegAllocSimple.cpp
diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.59 llvm/lib/CodeGen/RegAllocSimple.cpp:1.60
--- llvm/lib/CodeGen/RegAllocSimple.cpp:1.59 Sun Aug 15 16:56:44 2004
+++ llvm/lib/CodeGen/RegAllocSimple.cpp Sun Aug 15 17:02:22 2004
@@ -99,7 +99,8 @@
return I->second; // Already has space allocated?
// Allocate a new stack object for this spill location...
- int FrameIdx = MF->getFrameInfo()->CreateStackObject(RC);
+ int FrameIdx = MF->getFrameInfo()->CreateStackObject(RC->getSize(),
+ RC->getAlignment());
// Assign the slot...
StackSlotForVirtReg.insert(I, std::make_pair(VirtReg, FrameIdx));
Index: llvm/lib/CodeGen/VirtRegMap.cpp
diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.17 llvm/lib/CodeGen/VirtRegMap.cpp:1.18
--- llvm/lib/CodeGen/VirtRegMap.cpp:1.17 Sun Aug 15 16:56:44 2004
+++ llvm/lib/CodeGen/VirtRegMap.cpp Sun Aug 15 17:02:22 2004
@@ -52,9 +52,10 @@
assert(MRegisterInfo::isVirtualRegister(virtReg));
assert(v2ssMap_[virtReg] == NO_STACK_SLOT &&
"attempt to assign stack slot to already spilled register");
- const TargetRegisterClass* rc =
+ const TargetRegisterClass* RC =
mf_->getSSARegMap()->getRegClass(virtReg);
- int frameIndex = mf_->getFrameInfo()->CreateStackObject(rc);
+ int frameIndex = mf_->getFrameInfo()->CreateStackObject(RC->getSize(),
+ RC->getAlignment());
v2ssMap_[virtReg] = frameIndex;
++numSpills;
return frameIndex;
More information about the llvm-commits
mailing list