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();
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);
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));
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));
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;