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::TargetFrameInfo Class Reference

#include <TargetFrameInfo.h>

Inheritance diagram for llvm::TargetFrameInfo:

Inheritance graph
[legend]
Collaboration diagram for llvm::TargetFrameInfo:

Collaboration graph
[legend]
List of all members.

Public Types

enum  StackDirection { StackGrowsUp, StackGrowsDown }

Public Member Functions

 TargetFrameInfo (StackDirection D, unsigned StackAl, int LAO)
StackDirection getStackGrowthDirection () const
unsigned getStackAlignment () const
int getOffsetOfLocalArea () const
virtual const std::pair< unsigned,
int > * 
getCalleeSaveSpillSlots (unsigned &NumEntries) const
virtual int adjustAlignment (int unalignedOffset, bool growUp, unsigned align) const
virtual int getIncomingArgOffset (MachineFunction &mcInfo, unsigned argNum) const
virtual int getOutgoingArgOffset (MachineFunction &mcInfo, unsigned argNum) const
virtual int getFirstAutomaticVarOffset (MachineFunction &mcInfo, bool &growUp) const
virtual int getRegSpillAreaOffset (MachineFunction &mcInfo, bool &growUp) const
virtual int getTmpAreaOffset (MachineFunction &mcInfo, bool &growUp) const
virtual int getDynamicAreaOffset (MachineFunction &mcInfo, bool &growUp) const

Detailed Description

Information about stack frame layout on the target. It holds the direction of stack growth, the known stack alignment on entry to each function, and the offset to the locals area.

The offset to the local area is the offset from the stack pointer on function entry to the first location where function data (local variables, spill locations) can be stored.

Definition at line 30 of file TargetFrameInfo.h.


Member Enumeration Documentation

enum llvm::TargetFrameInfo::StackDirection
 

Enumerator:
StackGrowsUp 
StackGrowsDown 

Definition at line 32 of file TargetFrameInfo.h.


Constructor & Destructor Documentation

llvm::TargetFrameInfo::TargetFrameInfo StackDirection  D,
unsigned  StackAl,
int  LAO
[inline]
 

Definition at line 41 of file TargetFrameInfo.h.


Member Function Documentation

int TargetFrameInfo::adjustAlignment int  unalignedOffset,
bool  growUp,
unsigned  align
const [virtual]
 

Definition at line 26 of file TargetFrameInfo.cpp.

References abort().

Referenced by llvm::SparcV9FunctionInfo::allocateSpilledValue(), llvm::SparcV9FunctionInfo::computeOffsetforLocalVar(), and llvm::SparcV9FunctionInfo::pushTempValue().

virtual const std::pair<unsigned, int>* llvm::TargetFrameInfo::getCalleeSaveSpillSlots unsigned &  NumEntries  )  const [inline, virtual]
 

getCalleeSaveSpillSlots - This method returns a pointer to an array of pairs, that contains an entry for each callee save register that must be spilled to a particular stack location if it is spilled.

Each entry in this array contains a <register,offset> pair, indicating the fixed offset from the incoming stack pointer that each register should be spilled at. If a register is not listed here, the code generator is allowed to spill it anywhere it chooses.

Reimplemented in llvm::PowerPCFrameInfo.

Definition at line 72 of file TargetFrameInfo.h.

int TargetFrameInfo::getDynamicAreaOffset MachineFunction mcInfo,
bool &  growUp
const [virtual]
 

Reimplemented in llvm::SparcV9FrameInfo.

Definition at line 55 of file TargetFrameInfo.cpp.

References abort().

int TargetFrameInfo::getFirstAutomaticVarOffset MachineFunction mcInfo,
bool &  growUp
const [virtual]
 

Reimplemented in llvm::SparcV9FrameInfo.

Definition at line 43 of file TargetFrameInfo.cpp.

References abort().

Referenced by llvm::SparcV9FunctionInfo::computeOffsetforLocalVar().

int TargetFrameInfo::getIncomingArgOffset MachineFunction mcInfo,
unsigned  argNum
const [virtual]
 

Reimplemented in llvm::SparcV9FrameInfo.

Definition at line 35 of file TargetFrameInfo.cpp.

References abort().

Referenced by llvm::SparcV9RegInfo::colorMethodArgs().

int llvm::TargetFrameInfo::getOffsetOfLocalArea  )  const [inline]
 

getOffsetOfLocalArea - This method returns the offset of the local area from the stack pointer on entrance to a function.

Definition at line 60 of file TargetFrameInfo.h.

Referenced by llvm::MachineFrameInfo::print().

int TargetFrameInfo::getOutgoingArgOffset MachineFunction mcInfo,
unsigned  argNum
const [virtual]
 

Reimplemented in llvm::SparcV9FrameInfo.

Definition at line 39 of file TargetFrameInfo.cpp.

References abort().

int TargetFrameInfo::getRegSpillAreaOffset MachineFunction mcInfo,
bool &  growUp
const [virtual]
 

Reimplemented in llvm::SparcV9FrameInfo.

Definition at line 47 of file TargetFrameInfo.cpp.

References abort().

Referenced by llvm::SparcV9FunctionInfo::allocateSpilledValue().

unsigned llvm::TargetFrameInfo::getStackAlignment  )  const [inline]
 

getStackAlignment - This method returns the number of bytes that the stack pointer must be aligned to. Typically, this is the largest alignment for any data object in the target.

Definition at line 55 of file TargetFrameInfo.h.

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

StackDirection llvm::TargetFrameInfo::getStackGrowthDirection  )  const [inline]
 

getStackGrowthDirection - Return the direction the stack grows

Definition at line 49 of file TargetFrameInfo.h.

int TargetFrameInfo::getTmpAreaOffset MachineFunction mcInfo,
bool &  growUp
const [virtual]
 

Reimplemented in llvm::SparcV9FrameInfo.

Definition at line 51 of file TargetFrameInfo.cpp.

References abort().

Referenced by llvm::SparcV9FunctionInfo::pushTempValue().


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