LLVM API Documentation
#include <MachineFrameInfo.h>
Collaboration diagram for llvm::MachineFrameInfo:
Public Member Functions | |
MachineFrameInfo () | |
bool | hasStackObjects () const |
bool | hasVarSizedObjects () const |
int | getObjectIndexBegin () const |
int | getObjectIndexEnd () const |
int | getObjectSize (int ObjectIdx) const |
int | getObjectAlignment (int ObjectIdx) const |
getObjectAlignment - Return the alignment of the specified stack object... | |
int | getObjectOffset (int ObjectIdx) const |
void | setObjectOffset (int ObjectIdx, int SPOffset) |
unsigned | getStackSize () const |
void | setStackSize (unsigned Size) |
unsigned | getMaxAlignment () const |
void | setMaxAlignment (unsigned Align) |
bool | hasCalls () const |
void | setHasCalls (bool V) |
unsigned | getMaxCallFrameSize () const |
void | setMaxCallFrameSize (unsigned S) |
int | CreateFixedObject (unsigned Size, int SPOffset) |
int | CreateStackObject (unsigned Size, unsigned Alignment) |
int | CreateVariableSizedObject () |
MachineDebugInfo * | getMachineDebugInfo () const |
void | setMachineDebugInfo (MachineDebugInfo *DI) |
void | print (const MachineFunction &MF, std::ostream &OS) const |
void | dump (const MachineFunction &MF) const |
dump - Call print(MF, std::cerr) to be called from the debugger. | |
Classes | |
struct | StackObject |
Definition at line 50 of file MachineFrameInfo.h.
llvm::MachineFrameInfo::MachineFrameInfo | ( | ) | [inline] |
Definition at line 119 of file MachineFrameInfo.h.
int llvm::MachineFrameInfo::CreateFixedObject | ( | unsigned | Size, | |
int | SPOffset | |||
) | [inline] |
CreateFixedObject - Create a new object at a fixed location on the stack. All fixed objects should be created before other objects are created for efficiency. This returns an index with a negative value.
Definition at line 213 of file MachineFrameInfo.h.
Referenced by llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::PPCTargetLowering::LowerArguments(), llvm::IA64TargetLowering::LowerArguments(), llvm::AlphaTargetLowering::LowerArguments(), and llvm::X86RegisterInfo::processFunctionBeforeFrameFinalized().
int llvm::MachineFrameInfo::CreateStackObject | ( | unsigned | Size, | |
unsigned | Alignment | |||
) | [inline] |
CreateStackObject - Create a new statically sized stack object, returning a postive identifier to represent it.
Definition at line 222 of file MachineFrameInfo.h.
Referenced by llvm::VirtRegMap::assignVirt2StackSlot(), EmitSpecialCodeForMain(), llvm::FunctionLoweringInfo::FunctionLoweringInfo(), llvm::X86TargetLowering::LowerOperation(), llvm::PPCTargetLowering::LowerOperation(), and llvm::AlphaTargetLowering::LowerOperation().
int llvm::MachineFrameInfo::CreateVariableSizedObject | ( | ) | [inline] |
CreateVariableSizedObject - Notify the MachineFrameInfo object that a variable sized object has been created. This must be created whenever a variable sized object is created, whether or not the index returned is actually used.
Definition at line 236 of file MachineFrameInfo.h.
Referenced by llvm::SelectionDAGLowering::visitAlloca().
void MachineFrameInfo::dump | ( | const MachineFunction & | MF | ) | const |
dump - Call print(MF, std::cerr) to be called from the debugger.
Definition at line 331 of file MachineFunction.cpp.
MachineDebugInfo* llvm::MachineFrameInfo::getMachineDebugInfo | ( | ) | const [inline] |
getMachineDebugInfo - Used by a prologue/epilogue emitter (MRegisterInfo) to provide frame layout information.
Definition at line 245 of file MachineFrameInfo.h.
Referenced by llvm::PPCRegisterInfo::emitPrologue().
unsigned llvm::MachineFrameInfo::getMaxAlignment | ( | ) | const [inline] |
getMaxAlignment - Return the alignment in bytes that this function must be aligned to, which is greater than the default stack alignment provided by the target.
Definition at line 189 of file MachineFrameInfo.h.
Referenced by llvm::PPCRegisterInfo::emitPrologue().
unsigned llvm::MachineFrameInfo::getMaxCallFrameSize | ( | ) | const [inline] |
getMaxCallFrameSize - Return the maximum size of a call frame that must be allocated for an outgoing function call. This is only available if CallFrameSetup/Destroy pseudo instructions are used by the target, and then only during or after prolog/epilog code insertion.
Definition at line 206 of file MachineFrameInfo.h.
Referenced by llvm::X86RegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), and llvm::AlphaRegisterInfo::emitPrologue().
int llvm::MachineFrameInfo::getObjectAlignment | ( | int | ObjectIdx | ) | const [inline] |
getObjectAlignment - Return the alignment of the specified stack object...
Definition at line 154 of file MachineFrameInfo.h.
int llvm::MachineFrameInfo::getObjectIndexBegin | ( | ) | const [inline] |
getObjectIndexBegin - Return the minimum frame object index...
Definition at line 140 of file MachineFrameInfo.h.
Referenced by llvm::X86RegisterInfo::emitPrologue(), and llvm::X86RegisterInfo::processFunctionBeforeFrameFinalized().
int llvm::MachineFrameInfo::getObjectIndexEnd | ( | ) | const [inline] |
getObjectIndexEnd - Return one past the maximum frame object index...
Definition at line 144 of file MachineFrameInfo.h.
Referenced by llvm::X86RegisterInfo::emitEpilogue().
int llvm::MachineFrameInfo::getObjectOffset | ( | int | ObjectIdx | ) | const [inline] |
getObjectOffset - Return the assigned stack offset of the specified object from the incoming stack pointer.
Definition at line 162 of file MachineFrameInfo.h.
Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitPrologue(), and llvm::MRegisterInfo::getLocation().
int llvm::MachineFrameInfo::getObjectSize | ( | int | ObjectIdx | ) | const [inline] |
getObjectSize - Return the size of the specified object
Definition at line 148 of file MachineFrameInfo.h.
unsigned llvm::MachineFrameInfo::getStackSize | ( | ) | const [inline] |
getStackSize - Return the number of bytes that must be allocated to hold all of the fixed size frame objects. This is only valid after Prolog/Epilog code insertion has finalized the stack frame layout.
Definition at line 179 of file MachineFrameInfo.h.
Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), llvm::IA64RegisterInfo::emitEpilogue(), llvm::AlphaRegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitPrologue(), llvm::SparcRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), and llvm::MRegisterInfo::getLocation().
bool llvm::MachineFrameInfo::hasCalls | ( | ) | const [inline] |
hasCalls - Return true if the current function has no function calls. This is only valid during or after prolog/epilog code emission.
Definition at line 198 of file MachineFrameInfo.h.
Referenced by llvm::X86RegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), and llvm::AlphaRegisterInfo::emitPrologue().
bool llvm::MachineFrameInfo::hasStackObjects | ( | ) | const [inline] |
hasStackObjects - Return true if there are any stack objects in this function.
Definition at line 130 of file MachineFrameInfo.h.
bool llvm::MachineFrameInfo::hasVarSizedObjects | ( | ) | const [inline] |
hasVarSizedObjects - This method may be called any time after instruction selection is complete to determine if the stack frame for this function contains any variable sized objects.
Definition at line 136 of file MachineFrameInfo.h.
Referenced by hasFP().
void MachineFrameInfo::print | ( | const MachineFunction & | MF, | |
std::ostream & | OS | |||
) | const |
print - Used by the MachineFunction printer to print information about stack objects. Implemented in MachineFunction.cpp
Definition at line 300 of file MachineFunction.cpp.
References llvm::TargetMachine::getFrameInfo(), llvm::TargetFrameInfo::getOffsetOfLocalArea(), llvm::MachineFunction::getTarget(), MF, and Objects.
Referenced by dump(), and llvm::MachineFunction::print().
void llvm::MachineFrameInfo::setHasCalls | ( | bool | V | ) | [inline] |
Definition at line 199 of file MachineFrameInfo.h.
void llvm::MachineFrameInfo::setMachineDebugInfo | ( | MachineDebugInfo * | DI | ) | [inline] |
setMachineDebugInfo - Used by a debug consumer (DwarfWriter) to indicate that frame layout information should be gathered.
Definition at line 249 of file MachineFrameInfo.h.
void llvm::MachineFrameInfo::setMaxAlignment | ( | unsigned | Align | ) | [inline] |
setMaxAlignment - Set the preferred alignment.
Definition at line 193 of file MachineFrameInfo.h.
void llvm::MachineFrameInfo::setMaxCallFrameSize | ( | unsigned | S | ) | [inline] |
Definition at line 207 of file MachineFrameInfo.h.
void llvm::MachineFrameInfo::setObjectOffset | ( | int | ObjectIdx, | |
int | SPOffset | |||
) | [inline] |
setObjectOffset - Set the stack frame offset of the specified object. The offset is relative to the stack pointer on entry to the function.
Definition at line 170 of file MachineFrameInfo.h.
void llvm::MachineFrameInfo::setStackSize | ( | unsigned | Size | ) | [inline] |
setStackSize - Set the size of the stack...
Definition at line 183 of file MachineFrameInfo.h.
Referenced by llvm::X86RegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), and llvm::AlphaRegisterInfo::emitPrologue().