LLVM 20.0.0git
Public Types | Public Member Functions | List of all members
llvm::PPCFunctionInfo Class Reference

PPCFunctionInfo - This class is derived from MachineFunction private PowerPC target-specific information for each MachineFunction. More...

#include "Target/PowerPC/PPCMachineFunctionInfo.h"

Inheritance diagram for llvm::PPCFunctionInfo:
Inheritance graph
[legend]

Public Types

enum  ParamType {
  FixedType , ShortFloatingPoint , LongFloatingPoint , VectorChar ,
  VectorShort , VectorInt , VectorFloat
}
 

Public Member Functions

 PPCFunctionInfo (const Function &F, const TargetSubtargetInfo *STI)
 
MachineFunctionInfoclone (BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
 Make a functionally equivalent copy of this MachineFunctionInfo in MF.
 
int getFramePointerSaveIndex () const
 
void setFramePointerSaveIndex (int Idx)
 
int getReturnAddrSaveIndex () const
 
void setReturnAddrSaveIndex (int idx)
 
int getBasePointerSaveIndex () const
 
void setBasePointerSaveIndex (int Idx)
 
int getPICBasePointerSaveIndex () const
 
void setPICBasePointerSaveIndex (int Idx)
 
int getROPProtectionHashSaveIndex () const
 
void setROPProtectionHashSaveIndex (int Idx)
 
unsigned getMinReservedArea () const
 
void setMinReservedArea (unsigned size)
 
int getTailCallSPDelta () const
 
void setTailCallSPDelta (int size)
 
void setMustSaveLR (bool U)
 MustSaveLR - This is set when the prolog/epilog inserter does its initial scan of the function.
 
bool mustSaveLR () const
 
void setMustSaveTOC (bool U)
 
bool mustSaveTOC () const
 
void setShrinkWrapDisabled (bool U)
 We certainly don't want to shrink wrap functions if we've emitted a MovePCtoLR8 as that has to go into the entry, so the prologue definitely has to go into the entry block.
 
bool shrinkWrapDisabled () const
 
void setHasSpills ()
 
bool hasSpills () const
 
void setHasNonRISpills ()
 
bool hasNonRISpills () const
 
void setSpillsCR ()
 
bool isCRSpilled () const
 
void setDisableNonVolatileCR ()
 
bool isNonVolatileCRDisabled () const
 
void setLRStoreRequired ()
 
bool isLRStoreRequired () const
 
void setUsesTOCBasePtr ()
 
bool usesTOCBasePtr () const
 
void setHasFastCall ()
 
bool hasFastCall () const
 
void setAIXFuncTLSModelOptInitDone ()
 
bool isAIXFuncTLSModelOptInitDone () const
 
void setAIXFuncUseTLSIEForLD ()
 
bool isAIXFuncUseTLSIEForLD () const
 
int getVarArgsFrameIndex () const
 
void setVarArgsFrameIndex (int Index)
 
int getVarArgsStackOffset () const
 
void setVarArgsStackOffset (int Offset)
 
unsigned getVarArgsNumGPR () const
 
void setVarArgsNumGPR (unsigned Num)
 
unsigned getFixedParmsNum () const
 
unsigned getFloatingPointParmsNum () const
 
unsigned getVectorParmsNum () const
 
bool hasVectorParms () const
 
uint32_t getParmsType () const
 
uint32_t getVecExtParmsType () const
 
void appendParameterType (ParamType Type)
 
unsigned getVarArgsNumFPR () const
 
void setVarArgsNumFPR (unsigned Num)
 
void addLiveInAttr (Register VReg, ISD::ArgFlagsTy Flags)
 This function associates attributes for each live-in virtual register.
 
bool isLiveInSExt (Register VReg) const
 This function returns true if the specified vreg is a live-in register and sign-extended.
 
bool isLiveInZExt (Register VReg) const
 This function returns true if the specified vreg is a live-in register and zero-extended.
 
int getCRSpillFrameIndex () const
 
void setCRSpillFrameIndex (int idx)
 
const SmallVectorImpl< Register > & getMustSaveCRs () const
 
void addMustSaveCR (Register Reg)
 
void setUsesPICBase (bool uses)
 
bool usesPICBase () const
 
MCSymbolgetPICOffsetSymbol (MachineFunction &MF) const
 
MCSymbolgetGlobalEPSymbol (MachineFunction &MF) const
 
MCSymbolgetLocalEPSymbol (MachineFunction &MF) const
 
MCSymbolgetTOCOffsetSymbol (MachineFunction &MF) const
 
- Public Member Functions inherited from llvm::MachineFunctionInfo
virtual ~MachineFunctionInfo ()
 
virtual MachineFunctionInfoclone (BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const
 Make a functionally equivalent copy of this MachineFunctionInfo in MF.
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::MachineFunctionInfo
template<typename FuncInfoTy , typename SubtargetTy = TargetSubtargetInfo>
static FuncInfoTy * create (BumpPtrAllocator &Allocator, const Function &F, const SubtargetTy *STI)
 Factory function: default behavior is to call new using the supplied allocator.
 
template<typename Ty >
static Ty * create (BumpPtrAllocator &Allocator, const Ty &MFI)
 

Detailed Description

PPCFunctionInfo - This class is derived from MachineFunction private PowerPC target-specific information for each MachineFunction.

Definition at line 24 of file PPCMachineFunctionInfo.h.

Member Enumeration Documentation

◆ ParamType

Enumerator
FixedType 
ShortFloatingPoint 
LongFloatingPoint 
VectorChar 
VectorShort 
VectorInt 
VectorFloat 

Definition at line 26 of file PPCMachineFunctionInfo.h.

Constructor & Destructor Documentation

◆ PPCFunctionInfo()

PPCFunctionInfo::PPCFunctionInfo ( const Function F,
const TargetSubtargetInfo STI 
)
explicit

Definition at line 23 of file PPCMachineFunctionInfo.cpp.

Member Function Documentation

◆ addLiveInAttr()

void llvm::PPCFunctionInfo::addLiveInAttr ( Register  VReg,
ISD::ArgFlagsTy  Flags 
)
inline

This function associates attributes for each live-in virtual register.

Definition at line 260 of file PPCMachineFunctionInfo.h.

◆ addMustSaveCR()

void llvm::PPCFunctionInfo::addMustSaveCR ( Register  Reg)
inline

◆ appendParameterType()

void PPCFunctionInfo::appendParameterType ( ParamType  Type)

◆ clone()

MachineFunctionInfo * PPCFunctionInfo::clone ( BumpPtrAllocator Allocator,
MachineFunction DestMF,
const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &  Src2DstMBB 
) const
overridevirtual

Make a functionally equivalent copy of this MachineFunctionInfo in MF.

This requires remapping MachineBasicBlock references from the original parent to values in the new function. Targets may assume that virtual register and frame index values are preserved in the new function.

Reimplemented from llvm::MachineFunctionInfo.

Definition at line 28 of file PPCMachineFunctionInfo.cpp.

References llvm::MachineFunction::cloneInfo().

◆ getBasePointerSaveIndex()

int llvm::PPCFunctionInfo::getBasePointerSaveIndex ( ) const
inline

◆ getCRSpillFrameIndex()

int llvm::PPCFunctionInfo::getCRSpillFrameIndex ( ) const
inline

Definition at line 272 of file PPCMachineFunctionInfo.h.

◆ getFixedParmsNum()

unsigned llvm::PPCFunctionInfo::getFixedParmsNum ( ) const
inline

Definition at line 245 of file PPCMachineFunctionInfo.h.

◆ getFloatingPointParmsNum()

unsigned llvm::PPCFunctionInfo::getFloatingPointParmsNum ( ) const
inline

Definition at line 246 of file PPCMachineFunctionInfo.h.

◆ getFramePointerSaveIndex()

int llvm::PPCFunctionInfo::getFramePointerSaveIndex ( ) const
inline

◆ getGlobalEPSymbol()

MCSymbol * PPCFunctionInfo::getGlobalEPSymbol ( MachineFunction MF) const

◆ getLocalEPSymbol()

MCSymbol * PPCFunctionInfo::getLocalEPSymbol ( MachineFunction MF) const

◆ getMinReservedArea()

unsigned llvm::PPCFunctionInfo::getMinReservedArea ( ) const
inline

◆ getMustSaveCRs()

const SmallVectorImpl< Register > & llvm::PPCFunctionInfo::getMustSaveCRs ( ) const
inline

◆ getParmsType()

uint32_t PPCFunctionInfo::getParmsType ( ) const

◆ getPICBasePointerSaveIndex()

int llvm::PPCFunctionInfo::getPICBasePointerSaveIndex ( ) const
inline

◆ getPICOffsetSymbol()

MCSymbol * PPCFunctionInfo::getPICOffsetSymbol ( MachineFunction MF) const

◆ getReturnAddrSaveIndex()

int llvm::PPCFunctionInfo::getReturnAddrSaveIndex ( ) const
inline

Definition at line 169 of file PPCMachineFunctionInfo.h.

◆ getROPProtectionHashSaveIndex()

int llvm::PPCFunctionInfo::getROPProtectionHashSaveIndex ( ) const
inline

◆ getTailCallSPDelta()

int llvm::PPCFunctionInfo::getTailCallSPDelta ( ) const
inline

◆ getTOCOffsetSymbol()

MCSymbol * PPCFunctionInfo::getTOCOffsetSymbol ( MachineFunction MF) const

◆ getVarArgsFrameIndex()

int llvm::PPCFunctionInfo::getVarArgsFrameIndex ( ) const
inline

Definition at line 236 of file PPCMachineFunctionInfo.h.

◆ getVarArgsNumFPR()

unsigned llvm::PPCFunctionInfo::getVarArgsNumFPR ( ) const
inline

Definition at line 256 of file PPCMachineFunctionInfo.h.

◆ getVarArgsNumGPR()

unsigned llvm::PPCFunctionInfo::getVarArgsNumGPR ( ) const
inline

Definition at line 242 of file PPCMachineFunctionInfo.h.

◆ getVarArgsStackOffset()

int llvm::PPCFunctionInfo::getVarArgsStackOffset ( ) const
inline

Definition at line 239 of file PPCMachineFunctionInfo.h.

◆ getVecExtParmsType()

uint32_t PPCFunctionInfo::getVecExtParmsType ( ) const

◆ getVectorParmsNum()

unsigned llvm::PPCFunctionInfo::getVectorParmsNum ( ) const
inline

Definition at line 247 of file PPCMachineFunctionInfo.h.

◆ hasFastCall()

bool llvm::PPCFunctionInfo::hasFastCall ( ) const
inline

Definition at line 227 of file PPCMachineFunctionInfo.h.

Referenced by llvm::PPCFrameLowering::emitEpilogue().

◆ hasNonRISpills()

bool llvm::PPCFunctionInfo::hasNonRISpills ( ) const
inline

Definition at line 212 of file PPCMachineFunctionInfo.h.

Referenced by hasNonRISpills().

◆ hasSpills()

bool llvm::PPCFunctionInfo::hasSpills ( ) const
inline

Definition at line 209 of file PPCMachineFunctionInfo.h.

Referenced by hasSpills().

◆ hasVectorParms()

bool llvm::PPCFunctionInfo::hasVectorParms ( ) const
inline

Definition at line 248 of file PPCMachineFunctionInfo.h.

Referenced by getParmsType(), and getVecExtParmsType().

◆ isAIXFuncTLSModelOptInitDone()

bool llvm::PPCFunctionInfo::isAIXFuncTLSModelOptInitDone ( ) const
inline

Definition at line 230 of file PPCMachineFunctionInfo.h.

Referenced by updateForAIXShLibTLSModelOpt().

◆ isAIXFuncUseTLSIEForLD()

bool llvm::PPCFunctionInfo::isAIXFuncUseTLSIEForLD ( ) const
inline

Definition at line 234 of file PPCMachineFunctionInfo.h.

Referenced by GetSymbolRef(), and updateForAIXShLibTLSModelOpt().

◆ isCRSpilled()

bool llvm::PPCFunctionInfo::isCRSpilled ( ) const
inline

Definition at line 215 of file PPCMachineFunctionInfo.h.

Referenced by spillsCR().

◆ isLiveInSExt()

bool PPCFunctionInfo::isLiveInSExt ( Register  VReg) const

This function returns true if the specified vreg is a live-in register and sign-extended.

Definition at line 62 of file PPCMachineFunctionInfo.cpp.

Referenced by llvm::PPCInstrInfo::isSignOrZeroExtended().

◆ isLiveInZExt()

bool PPCFunctionInfo::isLiveInZExt ( Register  VReg) const

This function returns true if the specified vreg is a live-in register and zero-extended.

Definition at line 69 of file PPCMachineFunctionInfo.cpp.

Referenced by llvm::PPCInstrInfo::isSignOrZeroExtended().

◆ isLRStoreRequired()

bool llvm::PPCFunctionInfo::isLRStoreRequired ( ) const
inline

Definition at line 221 of file PPCMachineFunctionInfo.h.

Referenced by MustSaveLR().

◆ isNonVolatileCRDisabled()

bool llvm::PPCFunctionInfo::isNonVolatileCRDisabled ( ) const
inline

Definition at line 218 of file PPCMachineFunctionInfo.h.

◆ mustSaveLR()

bool llvm::PPCFunctionInfo::mustSaveLR ( ) const
inline

◆ mustSaveTOC()

bool llvm::PPCFunctionInfo::mustSaveTOC ( ) const
inline

◆ setAIXFuncTLSModelOptInitDone()

void llvm::PPCFunctionInfo::setAIXFuncTLSModelOptInitDone ( )
inline

Definition at line 229 of file PPCMachineFunctionInfo.h.

Referenced by updateForAIXShLibTLSModelOpt().

◆ setAIXFuncUseTLSIEForLD()

void llvm::PPCFunctionInfo::setAIXFuncUseTLSIEForLD ( )
inline

Definition at line 233 of file PPCMachineFunctionInfo.h.

Referenced by updateForAIXShLibTLSModelOpt().

◆ setBasePointerSaveIndex()

void llvm::PPCFunctionInfo::setBasePointerSaveIndex ( int  Idx)
inline

Definition at line 173 of file PPCMachineFunctionInfo.h.

References Idx.

Referenced by llvm::PPCFrameLowering::determineCalleeSaves().

◆ setCRSpillFrameIndex()

void llvm::PPCFunctionInfo::setCRSpillFrameIndex ( int  idx)
inline

◆ setDisableNonVolatileCR()

void llvm::PPCFunctionInfo::setDisableNonVolatileCR ( )
inline

Definition at line 217 of file PPCMachineFunctionInfo.h.

◆ setFramePointerSaveIndex()

void llvm::PPCFunctionInfo::setFramePointerSaveIndex ( int  Idx)
inline

Definition at line 167 of file PPCMachineFunctionInfo.h.

References Idx.

Referenced by llvm::PPCFrameLowering::determineCalleeSaves().

◆ setHasFastCall()

void llvm::PPCFunctionInfo::setHasFastCall ( )
inline

Definition at line 226 of file PPCMachineFunctionInfo.h.

◆ setHasNonRISpills()

void llvm::PPCFunctionInfo::setHasNonRISpills ( )
inline

Definition at line 211 of file PPCMachineFunctionInfo.h.

Referenced by fixupFuncForFI().

◆ setHasSpills()

void llvm::PPCFunctionInfo::setHasSpills ( )
inline

Definition at line 208 of file PPCMachineFunctionInfo.h.

◆ setLRStoreRequired()

void llvm::PPCFunctionInfo::setLRStoreRequired ( )
inline

Definition at line 220 of file PPCMachineFunctionInfo.h.

◆ setMinReservedArea()

void llvm::PPCFunctionInfo::setMinReservedArea ( unsigned  size)
inline

Definition at line 186 of file PPCMachineFunctionInfo.h.

References llvm::size().

◆ setMustSaveLR()

void llvm::PPCFunctionInfo::setMustSaveLR ( bool  U)
inline

MustSaveLR - This is set when the prolog/epilog inserter does its initial scan of the function.

It is true if the LR/LR8 register is ever explicitly defined/clobbered in the machine function (e.g. by calls and movpctolr, which is used in PIC generation), or if the LR stack slot is explicitly referenced by builtin_return_address.

Definition at line 196 of file PPCMachineFunctionInfo.h.

Referenced by llvm::PPCFrameLowering::determineCalleeSaves().

◆ setMustSaveTOC()

void llvm::PPCFunctionInfo::setMustSaveTOC ( bool  U)
inline

Definition at line 199 of file PPCMachineFunctionInfo.h.

◆ setPICBasePointerSaveIndex()

void llvm::PPCFunctionInfo::setPICBasePointerSaveIndex ( int  Idx)
inline

Definition at line 176 of file PPCMachineFunctionInfo.h.

References Idx.

Referenced by llvm::PPCFrameLowering::determineCalleeSaves().

◆ setReturnAddrSaveIndex()

void llvm::PPCFunctionInfo::setReturnAddrSaveIndex ( int  idx)
inline

Definition at line 170 of file PPCMachineFunctionInfo.h.

◆ setROPProtectionHashSaveIndex()

void llvm::PPCFunctionInfo::setROPProtectionHashSaveIndex ( int  Idx)
inline

Definition at line 181 of file PPCMachineFunctionInfo.h.

References Idx.

◆ setShrinkWrapDisabled()

void llvm::PPCFunctionInfo::setShrinkWrapDisabled ( bool  U)
inline

We certainly don't want to shrink wrap functions if we've emitted a MovePCtoLR8 as that has to go into the entry, so the prologue definitely has to go into the entry block.

Definition at line 205 of file PPCMachineFunctionInfo.h.

◆ setSpillsCR()

void llvm::PPCFunctionInfo::setSpillsCR ( )
inline

◆ setTailCallSPDelta()

void llvm::PPCFunctionInfo::setTailCallSPDelta ( int  size)
inline

Definition at line 189 of file PPCMachineFunctionInfo.h.

References llvm::size().

Referenced by CalculateTailCallSPDiff().

◆ setUsesPICBase()

void llvm::PPCFunctionInfo::setUsesPICBase ( bool  uses)
inline

Definition at line 279 of file PPCMachineFunctionInfo.h.

References uses().

◆ setUsesTOCBasePtr()

void llvm::PPCFunctionInfo::setUsesTOCBasePtr ( )
inline

Definition at line 223 of file PPCMachineFunctionInfo.h.

Referenced by setUsesTOCBasePtr().

◆ setVarArgsFrameIndex()

void llvm::PPCFunctionInfo::setVarArgsFrameIndex ( int  Index)
inline

Definition at line 237 of file PPCMachineFunctionInfo.h.

◆ setVarArgsNumFPR()

void llvm::PPCFunctionInfo::setVarArgsNumFPR ( unsigned  Num)
inline

Definition at line 257 of file PPCMachineFunctionInfo.h.

◆ setVarArgsNumGPR()

void llvm::PPCFunctionInfo::setVarArgsNumGPR ( unsigned  Num)
inline

Definition at line 243 of file PPCMachineFunctionInfo.h.

◆ setVarArgsStackOffset()

void llvm::PPCFunctionInfo::setVarArgsStackOffset ( int  Offset)
inline

Definition at line 240 of file PPCMachineFunctionInfo.h.

References llvm::Offset.

◆ shrinkWrapDisabled()

bool llvm::PPCFunctionInfo::shrinkWrapDisabled ( ) const
inline

◆ usesPICBase()

bool llvm::PPCFunctionInfo::usesPICBase ( ) const
inline

◆ usesTOCBasePtr()

bool llvm::PPCFunctionInfo::usesTOCBasePtr ( ) const
inline

Definition at line 224 of file PPCMachineFunctionInfo.h.

Referenced by llvm::PPCRegisterInfo::getReservedRegs().


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