summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-15 22:02:22 +0000
committerChris Lattner <sabre@nondot.org>2004-08-15 22:02:22 +0000
commitc66f27fd29535cd3f97d4ab89014c54c697b8ed7 (patch)
tree2154712bc41e7c79215ee3791feab477ef1a196e /llvm/lib
parent98de1d7795ae84e70f3ddb8af7b0e167f97a9576 (diff)
downloadbcm5719-llvm-c66f27fd29535cd3f97d4ab89014c54c697b8ed7.tar.gz
bcm5719-llvm-c66f27fd29535cd3f97d4ab89014c54c697b8ed7.zip
Stop using CreateStackObject(RegClass*)
llvm-svn: 15775
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp4
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp2
-rw-r--r--llvm/lib/CodeGen/RegAllocLocal.cpp3
-rw-r--r--llvm/lib/CodeGen/RegAllocSimple.cpp3
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp5
5 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 10ffa68b2ef..b9462db6664 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -261,10 +261,6 @@ int MachineFrameInfo::CreateStackObject(const Type *Ty, const TargetData &TD) {
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();
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index d9443c83e75..e997ead86f8 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -182,7 +182,7 @@ void PEI::calculateCallerSavedRegisters(MachineFunction &Fn) {
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);
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp
index 68d5fd95eed..c23b68e7c56 100644
--- a/llvm/lib/CodeGen/RegAllocLocal.cpp
+++ b/llvm/lib/CodeGen/RegAllocLocal.cpp
@@ -225,7 +225,8 @@ int RA::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) {
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));
diff --git a/llvm/lib/CodeGen/RegAllocSimple.cpp b/llvm/lib/CodeGen/RegAllocSimple.cpp
index 320b2679337..6f6c2c6352e 100644
--- a/llvm/lib/CodeGen/RegAllocSimple.cpp
+++ b/llvm/lib/CodeGen/RegAllocSimple.cpp
@@ -99,7 +99,8 @@ int RegAllocSimple::getStackSpaceFor(unsigned VirtReg,
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));
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index e84652ece06..c235aada9f4 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -52,9 +52,10 @@ int VirtRegMap::assignVirt2StackSlot(unsigned virtReg)
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;
OpenPOWER on IntegriCloud