LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::Hexagon_CCState Class Reference

#include <HexagonCallingConvLower.h>

Public Member Functions

 Hexagon_CCState (CallingConv::ID CC, bool isVarArg, const TargetMachine &TM, SmallVectorImpl< CCValAssign > &locs, LLVMContext &c)
 
void addLoc (const CCValAssign &V)
 
LLVMContextgetContext () const
 
const TargetMachinegetTarget () const
 
unsigned getCallingConv () const
 
bool isVarArg () const
 
unsigned getNextStackOffset () const
 
bool isAllocated (unsigned Reg) const
 
void AnalyzeFormalArguments (const SmallVectorImpl< ISD::InputArg > &Ins, Hexagon_CCAssignFn Fn, unsigned SretValueInRegs)
 
void AnalyzeReturn (const SmallVectorImpl< ISD::OutputArg > &Outs, Hexagon_CCAssignFn Fn, unsigned SretValueInRegs)
 
void AnalyzeCallOperands (const SmallVectorImpl< ISD::OutputArg > &Outs, Hexagon_CCAssignFn Fn, int NonVarArgsParams, unsigned SretValueSize)
 
void AnalyzeCallOperands (SmallVectorImpl< EVT > &ArgVTs, SmallVectorImpl< ISD::ArgFlagsTy > &Flags, Hexagon_CCAssignFn Fn)
 
void AnalyzeCallResult (const SmallVectorImpl< ISD::InputArg > &Ins, Hexagon_CCAssignFn Fn, unsigned SretValueInRegs)
 
void AnalyzeCallResult (EVT VT, Hexagon_CCAssignFn Fn)
 
unsigned getFirstUnallocated (const unsigned *Regs, unsigned NumRegs) const
 
unsigned AllocateReg (unsigned Reg)
 
unsigned AllocateReg (unsigned Reg, unsigned ShadowReg)
 Version of AllocateReg with extra register to be shadowed. More...
 
unsigned AllocateReg (const unsigned *Regs, unsigned NumRegs)
 
unsigned AllocateReg (const unsigned *Regs, const unsigned *ShadowRegs, unsigned NumRegs)
 Version of AllocateReg with list of registers to be shadowed. More...
 
unsigned AllocateStack (unsigned Size, unsigned Align)
 
void HandleByVal (unsigned ValNo, EVT ValVT, EVT LocVT, CCValAssign::LocInfo LocInfo, int MinSize, int MinAlign, ISD::ArgFlagsTy ArgFlags)
 

Detailed Description

CCState - This class holds information needed while lowering arguments and return values. It captures which registers are already assigned and which stack slots are used. It provides accessors to allocate these values.

Definition at line 47 of file HexagonCallingConvLower.h.

Constructor & Destructor Documentation

Hexagon_CCState::Hexagon_CCState ( CallingConv::ID  CC,
bool  isVarArg,
const TargetMachine TM,
SmallVectorImpl< CCValAssign > &  locs,
LLVMContext c 
)

Member Function Documentation

void llvm::Hexagon_CCState::addLoc ( const CCValAssign V)
inline

Definition at line 60 of file HexagonCallingConvLower.h.

Referenced by AnalyzeReturn(), and HandleByVal().

unsigned llvm::Hexagon_CCState::AllocateReg ( unsigned  Reg)
inline

AllocateReg - Attempt to allocate one register. If it is not available, return zero. Otherwise, return the register, marking it and any aliases as allocated.

Definition at line 120 of file HexagonCallingConvLower.h.

References isAllocated().

unsigned llvm::Hexagon_CCState::AllocateReg ( unsigned  Reg,
unsigned  ShadowReg 
)
inline

Version of AllocateReg with extra register to be shadowed.

Definition at line 127 of file HexagonCallingConvLower.h.

References isAllocated().

unsigned llvm::Hexagon_CCState::AllocateReg ( const unsigned Regs,
unsigned  NumRegs 
)
inline

AllocateReg - Attempt to allocate one of the specified registers. If none are available, return zero. Otherwise, return the first one available, marking it and any aliases as allocated.

Definition at line 137 of file HexagonCallingConvLower.h.

References getFirstUnallocated().

unsigned llvm::Hexagon_CCState::AllocateReg ( const unsigned Regs,
const unsigned ShadowRegs,
unsigned  NumRegs 
)
inline

Version of AllocateReg with list of registers to be shadowed.

Definition at line 149 of file HexagonCallingConvLower.h.

References getFirstUnallocated().

unsigned llvm::Hexagon_CCState::AllocateStack ( unsigned  Size,
unsigned  Align 
)
inline

AllocateStack - Allocate a chunk of stack space with the specified size and alignment.

Definition at line 164 of file HexagonCallingConvLower.h.

Referenced by HandleByVal().

void Hexagon_CCState::AnalyzeCallOperands ( const SmallVectorImpl< ISD::OutputArg > &  Outs,
Hexagon_CCAssignFn  Fn,
int  NonVarArgsParams,
unsigned  SretValueSize 
)

AnalyzeCallOperands - Analyze an ISD::CALL node, incorporating info about the passed values into this state.

Definition at line 131 of file HexagonCallingConvLower.cpp.

References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), and llvm::SmallVectorTemplateCommon< T, typename >::size().

void Hexagon_CCState::AnalyzeCallOperands ( SmallVectorImpl< EVT > &  ArgVTs,
SmallVectorImpl< ISD::ArgFlagsTy > &  Flags,
Hexagon_CCAssignFn  Fn 
)

AnalyzeCallOperands - Same as above except it takes vectors of types and argument flags.

Definition at line 161 of file HexagonCallingConvLower.cpp.

References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), and llvm::SmallVectorTemplateCommon< T >::size().

void Hexagon_CCState::AnalyzeCallResult ( const SmallVectorImpl< ISD::InputArg > &  Ins,
Hexagon_CCAssignFn  Fn,
unsigned  SretValueInRegs 
)

AnalyzeCallResult - Analyze the return values of an ISD::CALL node, incorporating info about the passed values into this state.

Definition at line 180 of file HexagonCallingConvLower.cpp.

References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), and llvm::SmallVectorTemplateCommon< T, typename >::size().

void Hexagon_CCState::AnalyzeCallResult ( EVT  VT,
Hexagon_CCAssignFn  Fn 
)

AnalyzeCallResult - Same as above except it's specialized for calls which produce a single value.

Definition at line 197 of file HexagonCallingConvLower.cpp.

References llvm::dbgs(), llvm::CCValAssign::Full, and llvm::EVT::getEVTString().

void Hexagon_CCState::AnalyzeFormalArguments ( const SmallVectorImpl< ISD::InputArg > &  Ins,
Hexagon_CCAssignFn  Fn,
unsigned  SretValueInRegs 
)

AnalyzeFormalArguments - Analyze an ISD::FORMAL_ARGUMENTS node, incorporating info about the formals into this state.

Definition at line 66 of file HexagonCallingConvLower.cpp.

References llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), and llvm::SmallVectorTemplateCommon< T, typename >::size().

void Hexagon_CCState::AnalyzeReturn ( const SmallVectorImpl< ISD::OutputArg > &  Outs,
Hexagon_CCAssignFn  Fn,
unsigned  SretValueInRegs 
)

AnalyzeReturn - Analyze the returned values of an ISD::RET node, incorporating info about the result values into this state.

Definition at line 94 of file HexagonCallingConvLower.cpp.

References addLoc(), llvm::dbgs(), llvm::CCValAssign::Full, llvm::EVT::getEVTString(), llvm::CCValAssign::getReg(), llvm::MVT::i32, llvm::MVT::i64, and llvm::SmallVectorTemplateCommon< T, typename >::size().

unsigned llvm::Hexagon_CCState::getCallingConv ( ) const
inline

Definition at line 66 of file HexagonCallingConvLower.h.

LLVMContext& llvm::Hexagon_CCState::getContext ( ) const
inline

Definition at line 64 of file HexagonCallingConvLower.h.

unsigned llvm::Hexagon_CCState::getFirstUnallocated ( const unsigned Regs,
unsigned  NumRegs 
) const
inline

getFirstUnallocated - Return the first unallocated register in the set, or NumRegs if they are all allocated.

Definition at line 110 of file HexagonCallingConvLower.h.

References isAllocated().

Referenced by AllocateReg().

unsigned llvm::Hexagon_CCState::getNextStackOffset ( ) const
inline

Definition at line 69 of file HexagonCallingConvLower.h.

const TargetMachine& llvm::Hexagon_CCState::getTarget ( ) const
inline

Definition at line 65 of file HexagonCallingConvLower.h.

void Hexagon_CCState::HandleByVal ( unsigned  ValNo,
EVT  ValVT,
EVT  LocVT,
CCValAssign::LocInfo  LocInfo,
int  MinSize,
int  MinAlign,
ISD::ArgFlagsTy  ArgFlags 
)
bool llvm::Hexagon_CCState::isAllocated ( unsigned  Reg) const
inline

isAllocated - Return true if the specified register (or an alias) is allocated.

Definition at line 73 of file HexagonCallingConvLower.h.

Referenced by AllocateReg(), and getFirstUnallocated().

bool llvm::Hexagon_CCState::isVarArg ( ) const
inline

Definition at line 67 of file HexagonCallingConvLower.h.


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