aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-30 17:19:22 +0000
committerChris Lattner <sabre@nondot.org>2005-09-30 17:19:22 +0000
commit8fb040e584606f048b85d87363a52baf5ff9c1c7 (patch)
treecc7c425f3312cc0daa3055829cdd1eb03e310702 /lib/CodeGen/PrologEpilogInserter.cpp
parent5802be13e0eb0f6730b75fee2ea0b3cf6cb148a4 (diff)
now that we have a reg class to spill with, get this info from the regclass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index 6fcf423f7c..e38c740e8d 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -165,6 +165,7 @@ void PEI::calculateCallerSavedRegisters(MachineFunction &Fn) {
// stack slots for them.
for (unsigned i = 0, e = RegsToSave.size(); i != e; ++i) {
unsigned Reg = RegsToSave[i].first;
+ const TargetRegisterClass *RC = RegsToSave[i].second;
// Check to see if this physreg must be spilled to a particular stack slot
// on this target.
@@ -176,12 +177,10 @@ void PEI::calculateCallerSavedRegisters(MachineFunction &Fn) {
int FrameIdx;
if (FixedSlot == FixedSpillSlots+NumFixedSpillSlots) {
// Nope, just spill it anywhere convenient.
- FrameIdx = FFI->CreateStackObject(RegInfo->getSpillSize(Reg)/8,
- RegInfo->getSpillAlignment(Reg)/8);
+ FrameIdx = FFI->CreateStackObject(RC->getSize(), RC->getAlignment());
} else {
// Spill it to the stack where we must.
- FrameIdx = FFI->CreateFixedObject(RegInfo->getSpillSize(Reg)/8,
- FixedSlot->second);
+ FrameIdx = FFI->CreateFixedObject(RC->getSize(), FixedSlot->second);
}
StackSlots.push_back(FrameIdx);
}