[llvm-commits] CVS: llvm/lib/CodeGen/PrologEpilogInserter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Aug 21 12:45:21 PDT 2004
Changes in directory llvm/lib/CodeGen:
PrologEpilogInserter.cpp updated: 1.32 -> 1.33
---
Log message:
Now that we have per-register spill size/alignment info, remove more uses
of getRegClass
---
Diffs of the changes: (+5 -4)
Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.32 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.33
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.32 Sun Aug 15 17:02:22 2004
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Sat Aug 21 14:45:10 2004
@@ -170,8 +170,6 @@
// stack slots for them.
for (unsigned i = 0, e = RegsToSave.size(); i != e; ++i) {
unsigned Reg = RegsToSave[i];
- int FrameIdx;
- const TargetRegisterClass *RC = RegInfo->getRegClass(Reg);
// Check to see if this physreg must be spilled to a particular stack slot
// on this target.
@@ -180,12 +178,15 @@
FixedSlot->first != Reg)
++FixedSlot;
+ int FrameIdx;
if (FixedSlot == FixedSpillSlots+NumFixedSpillSlots) {
// Nope, just spill it anywhere convenient.
- FrameIdx = FFI->CreateStackObject(RC->getSize(), RC->getAlignment());
+ FrameIdx = FFI->CreateStackObject(RegInfo->getSpillSize(Reg),
+ RegInfo->getSpillAlignment(Reg));
} else {
// Spill it to the stack where we must.
- FrameIdx = FFI->CreateFixedObject(RC->getSize(), FixedSlot->second);
+ FrameIdx = FFI->CreateFixedObject(RegInfo->getSpillSize(Reg),
+ FixedSlot->second);
}
StackSlots.push_back(FrameIdx);
}
More information about the llvm-commits
mailing list