LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::MachineFrameInfo Class Reference

#include <MachineFrameInfo.h>

Collaboration diagram for llvm::MachineFrameInfo:

Collaboration graph
[legend]
List of all members.

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)
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 CreateStackObject (const Type *Ty, const TargetData &TD)
int CreateVariableSizedObject ()
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

Detailed Description

Definition at line 49 of file MachineFrameInfo.h.


Constructor & Destructor Documentation

llvm::MachineFrameInfo::MachineFrameInfo  )  [inline]
 

Definition at line 101 of file MachineFrameInfo.h.


Member Function Documentation

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 184 of file MachineFrameInfo.h.

Referenced by llvm::X86RegisterInfo::processFunctionBeforeFrameFinalized().

int MachineFrameInfo::CreateStackObject const Type Ty,
const TargetData TD
 

CreateStackObject - Create a stack object for a value of the specified LLVM type.

Definition at line 258 of file MachineFunction.cpp.

References CreateStackObject(), llvm::TargetData::getTypeAlignment(), and llvm::TargetData::getTypeSize().

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 193 of file MachineFrameInfo.h.

Referenced by llvm::VirtRegMap::assignVirt2StackSlot(), and CreateStackObject().

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 209 of file MachineFrameInfo.h.

void MachineFrameInfo::dump const MachineFunction MF  )  const
 

dump - Call print(MF, std::cerr) to be called from the debugger.

Definition at line 292 of file MachineFunction.cpp.

References print().

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 177 of file MachineFrameInfo.h.

Referenced by llvm::X86RegisterInfo::emitPrologue(), llvm::PPC64RegisterInfo::emitPrologue(), and llvm::PPC32RegisterInfo::emitPrologue().

int llvm::MachineFrameInfo::getObjectAlignment int  ObjectIdx  )  const [inline]
 

getObjectAlignment - Return the alignment of the specified stack object...

Definition at line 135 of file MachineFrameInfo.h.

int llvm::MachineFrameInfo::getObjectIndexBegin  )  const [inline]
 

getObjectIndexBegin - Return the minimum frame object index...

Definition at line 121 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 125 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 143 of file MachineFrameInfo.h.

Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPC64RegisterInfo::eliminateFrameIndex(), llvm::PPC32RegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), and llvm::X86RegisterInfo::emitPrologue().

int llvm::MachineFrameInfo::getObjectSize int  ObjectIdx  )  const [inline]
 

getObjectSize - Return the size of the specified object

Definition at line 129 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 160 of file MachineFrameInfo.h.

Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPC64RegisterInfo::eliminateFrameIndex(), llvm::PPC32RegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitEpilogue(), llvm::PPC64RegisterInfo::emitEpilogue(), llvm::PPC32RegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitPrologue(), llvm::PPC64RegisterInfo::emitPrologue(), and llvm::PPC32RegisterInfo::emitPrologue().

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 169 of file MachineFrameInfo.h.

Referenced by llvm::X86RegisterInfo::emitPrologue(), llvm::PPC64RegisterInfo::emitPrologue(), and llvm::PPC32RegisterInfo::emitPrologue().

bool llvm::MachineFrameInfo::hasStackObjects  )  const [inline]
 

hasStackObjects - Return true if there are any stack objects in this function.

Definition at line 111 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 117 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 263 of file MachineFunction.cpp.

References llvm::TargetMachine::getFrameInfo(), llvm::TargetFrameInfo::getOffsetOfLocalArea(), llvm::MachineFunction::getTarget(), and Objects.

Referenced by dump(), and llvm::MachineFunction::print().

void llvm::MachineFrameInfo::setHasCalls bool  V  )  [inline]
 

Definition at line 170 of file MachineFrameInfo.h.

void llvm::MachineFrameInfo::setMaxCallFrameSize unsigned  S  )  [inline]
 

Definition at line 178 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 151 of file MachineFrameInfo.h.

void llvm::MachineFrameInfo::setStackSize unsigned  Size  )  [inline]
 

setStackSize - Set the size of the stack...

Definition at line 164 of file MachineFrameInfo.h.

Referenced by llvm::X86RegisterInfo::emitPrologue(), llvm::PPC64RegisterInfo::emitPrologue(), and llvm::PPC32RegisterInfo::emitPrologue().


The documentation for this class was generated from the following files: