LLVM 24.0.0git
llvm::RISCVMachineFunctionInfo Class Reference

RISCVMachineFunctionInfo - This class is derived from MachineFunctionInfo and contains private RISCV-specific information for each MachineFunction. More...

#include "Target/RISCV/RISCVMachineFunctionInfo.h"

Inheritance diagram for llvm::RISCVMachineFunctionInfo:
[legend]

Public Types

enum class  ShadowStackKind { None = 0 , Hardware , Software }
enum class  PushPopKind { None = 0 , StdExtZcmp , VendorXqccmp }
enum class  InterruptStackKind {
  None = 0 , ACLICPreemptible , ACLICSupervisorPreemptible , ACLICPushPop ,
  ACLICSupervisorPushPop , ACLICPreemptiblePushPop , ACLICSupervisorPreemptiblePushPop , QCINest ,
  QCINoNest , SiFiveCLICPreemptible , SiFiveCLICStackSwap , SiFiveCLICPreemptibleStackSwap
}

Public Member Functions

 RISCVMachineFunctionInfo (const Function &F, const RISCVSubtarget *STI)
MachineFunctionInfo * clone (BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
 Make a functionally equivalent copy of this MachineFunctionInfo in MF.
int getVarArgsFrameIndex () const
void setVarArgsFrameIndex (int Index)
unsigned getVarArgsSaveSize () const
void setVarArgsSaveSize (int Size)
int getMoveF64FrameIndex (MachineFunction &MF)
int getBranchRelaxationScratchFrameIndex () const
void setBranchRelaxationScratchFrameIndex (int Index)
unsigned getReservedSpillsSize () const
unsigned getLibCallStackSize () const
void setLibCallStackSize (unsigned Size)
bool useSaveRestoreLibCalls (const MachineFunction &MF) const
uint64_t getRVVStackSize () const
void setRVVStackSize (uint64_t Size)
Align getRVVStackAlign () const
void setRVVStackAlign (Align StackAlign)
uint64_t getRVVPadding () const
void setRVVPadding (uint64_t Padding)
unsigned getCalleeSavedStackSize () const
void setCalleeSavedStackSize (unsigned Size)
void setIncomingIndirectArg (unsigned ArgIndex, Register Reg)
Register getIncomingIndirectArg (unsigned ArgIndex) const
ShadowStackKind getShadowStackKind (const MachineFunction &MF) const
bool hasShadowStack (const MachineFunction &MF) const
PushPopKind getPushPopKind (const MachineFunction &MF) const
bool isPushable (const MachineFunction &MF) const
unsigned getRVPushRegs () const
void setRVPushRegs (unsigned Regs)
unsigned getRVPushStackSize () const
void setRVPushStackSize (unsigned Size)
InterruptStackKind getInterruptStackKind (const MachineFunction &MF) const
bool useQCIInterrupt (const MachineFunction &MF) const
unsigned getQCIInterruptStackSize () const
void setQCIInterruptStackSize (unsigned Size)
unsigned getACLICInterruptStackSize () const
void setACLICInterruptStackSize (unsigned Size)
bool useSiFiveInterrupt (const MachineFunction &MF) const
bool isSiFivePreemptibleInterrupt (const MachineFunction &MF) const
bool isSiFiveStackSwapInterrupt (const MachineFunction &MF) const
bool isACLICPreemptibleInterrupt (const MachineFunction &MF) const
bool isACLICPushPopInterrupt (const MachineFunction &MF) const
bool isACLICSupervisorInterrupt (const MachineFunction &MF) const
void pushInterruptCSRFrameIndex (int FI)
int getInterruptCSRFrameIndex (size_t Idx) const
bool isInterruptCSRFrameIndex (int FI) const
bool hasImplicitFPUpdates (const MachineFunction &MF) const
void initializeBaseYamlFields (const yaml::RISCVMachineFunctionInfo &YamlMFI)
void addSExt32Register (Register Reg)
bool isSExt32Register (Register Reg) const
bool isVectorCall () const
void setIsVectorCall ()
bool hasDynamicAllocation () const
void setDynamicAllocation ()
bool hasCFProtectionBranch () const
Public Member Functions inherited from llvm::MachineFunctionInfo
virtual ~MachineFunctionInfo ()

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

RISCVMachineFunctionInfo - This class is derived from MachineFunctionInfo and contains private RISCV-specific information for each MachineFunction.

Definition at line 48 of file RISCVMachineFunctionInfo.h.

Member Enumeration Documentation

◆ InterruptStackKind

Enumerator
None 
ACLICPreemptible 
ACLICSupervisorPreemptible 
ACLICPushPop 
ACLICSupervisorPushPop 
ACLICPreemptiblePushPop 
ACLICSupervisorPreemptiblePushPop 
QCINest 
QCINoNest 
SiFiveCLICPreemptible 
SiFiveCLICStackSwap 
SiFiveCLICPreemptibleStackSwap 

Definition at line 191 of file RISCVMachineFunctionInfo.h.

◆ PushPopKind

Enumerator
None 
StdExtZcmp 
VendorXqccmp 

Definition at line 177 of file RISCVMachineFunctionInfo.h.

◆ ShadowStackKind

Enumerator
None 
Hardware 
Software 

Definition at line 170 of file RISCVMachineFunctionInfo.h.

Constructor & Destructor Documentation

◆ RISCVMachineFunctionInfo()

Member Function Documentation

◆ addSExt32Register()

void RISCVMachineFunctionInfo::addSExt32Register ( Register Reg)

Definition at line 176 of file RISCVMachineFunctionInfo.cpp.

Referenced by markSExt32Registers(), and unpackFromRegLoc().

◆ clone()

MachineFunctionInfo * RISCVMachineFunctionInfo::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 23 of file RISCVMachineFunctionInfo.cpp.

References llvm::MachineFunction::cloneInfo(), and RISCVMachineFunctionInfo().

◆ getACLICInterruptStackSize()

unsigned llvm::RISCVMachineFunctionInfo::getACLICInterruptStackSize ( ) const
inline

Definition at line 217 of file RISCVMachineFunctionInfo.h.

◆ getBranchRelaxationScratchFrameIndex()

int llvm::RISCVMachineFunctionInfo::getBranchRelaxationScratchFrameIndex ( ) const
inline

◆ getCalleeSavedStackSize()

unsigned llvm::RISCVMachineFunctionInfo::getCalleeSavedStackSize ( ) const
inline

Definition at line 158 of file RISCVMachineFunctionInfo.h.

◆ getIncomingIndirectArg()

Register llvm::RISCVMachineFunctionInfo::getIncomingIndirectArg ( unsigned ArgIndex) const
inline

Definition at line 164 of file RISCVMachineFunctionInfo.h.

References assert().

Referenced by llvm::RISCVTargetLowering::LowerCall().

◆ getInterruptCSRFrameIndex()

int llvm::RISCVMachineFunctionInfo::getInterruptCSRFrameIndex ( size_t Idx) const
inline

Definition at line 270 of file RISCVMachineFunctionInfo.h.

◆ getInterruptStackKind()

◆ getLibCallStackSize()

unsigned llvm::RISCVMachineFunctionInfo::getLibCallStackSize ( ) const
inline

Definition at line 137 of file RISCVMachineFunctionInfo.h.

◆ getMoveF64FrameIndex()

int llvm::RISCVMachineFunctionInfo::getMoveF64FrameIndex ( MachineFunction & MF)
inline

◆ getPushPopKind()

◆ getQCIInterruptStackSize()

unsigned llvm::RISCVMachineFunctionInfo::getQCIInterruptStackSize ( ) const
inline

Definition at line 214 of file RISCVMachineFunctionInfo.h.

◆ getReservedSpillsSize()

unsigned llvm::RISCVMachineFunctionInfo::getReservedSpillsSize ( ) const
inline

Definition at line 132 of file RISCVMachineFunctionInfo.h.

◆ getRVPushRegs()

unsigned llvm::RISCVMachineFunctionInfo::getRVPushRegs ( ) const
inline

◆ getRVPushStackSize()

unsigned llvm::RISCVMachineFunctionInfo::getRVPushStackSize ( ) const
inline

Definition at line 188 of file RISCVMachineFunctionInfo.h.

◆ getRVVPadding()

uint64_t llvm::RISCVMachineFunctionInfo::getRVVPadding ( ) const
inline

Definition at line 155 of file RISCVMachineFunctionInfo.h.

References uint64_t.

◆ getRVVStackAlign()

Align llvm::RISCVMachineFunctionInfo::getRVVStackAlign ( ) const
inline

Definition at line 152 of file RISCVMachineFunctionInfo.h.

◆ getRVVStackSize()

uint64_t llvm::RISCVMachineFunctionInfo::getRVVStackSize ( ) const
inline

Definition at line 149 of file RISCVMachineFunctionInfo.h.

References uint64_t.

◆ getShadowStackKind()

◆ getVarArgsFrameIndex()

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

Definition at line 112 of file RISCVMachineFunctionInfo.h.

◆ getVarArgsSaveSize()

unsigned llvm::RISCVMachineFunctionInfo::getVarArgsSaveSize ( ) const
inline

Definition at line 115 of file RISCVMachineFunctionInfo.h.

◆ hasCFProtectionBranch()

◆ hasDynamicAllocation()

bool llvm::RISCVMachineFunctionInfo::hasDynamicAllocation ( ) const
inline

Definition at line 291 of file RISCVMachineFunctionInfo.h.

◆ hasImplicitFPUpdates()

bool RISCVMachineFunctionInfo::hasImplicitFPUpdates ( const MachineFunction & MF) const

◆ hasShadowStack()

bool llvm::RISCVMachineFunctionInfo::hasShadowStack ( const MachineFunction & MF) const
inline

◆ initializeBaseYamlFields()

void RISCVMachineFunctionInfo::initializeBaseYamlFields ( const yaml::RISCVMachineFunctionInfo & YamlMFI)

◆ isACLICPreemptibleInterrupt()

◆ isACLICPushPopInterrupt()

bool llvm::RISCVMachineFunctionInfo::isACLICPushPopInterrupt ( const MachineFunction & MF) const
inline

◆ isACLICSupervisorInterrupt()

bool llvm::RISCVMachineFunctionInfo::isACLICSupervisorInterrupt ( const MachineFunction & MF) const
inline

◆ isInterruptCSRFrameIndex()

bool llvm::RISCVMachineFunctionInfo::isInterruptCSRFrameIndex ( int FI) const
inline

Definition at line 273 of file RISCVMachineFunctionInfo.h.

References llvm::is_contained().

◆ isPushable()

bool llvm::RISCVMachineFunctionInfo::isPushable ( const MachineFunction & MF) const
inline

◆ isSExt32Register()

bool RISCVMachineFunctionInfo::isSExt32Register ( Register Reg) const

Definition at line 180 of file RISCVMachineFunctionInfo.cpp.

References llvm::is_contained().

Referenced by isSignExtendedW().

◆ isSiFivePreemptibleInterrupt()

bool llvm::RISCVMachineFunctionInfo::isSiFivePreemptibleInterrupt ( const MachineFunction & MF) const
inline

◆ isSiFiveStackSwapInterrupt()

bool llvm::RISCVMachineFunctionInfo::isSiFiveStackSwapInterrupt ( const MachineFunction & MF) const
inline

◆ isVectorCall()

bool llvm::RISCVMachineFunctionInfo::isVectorCall ( ) const
inline

Definition at line 288 of file RISCVMachineFunctionInfo.h.

◆ pushInterruptCSRFrameIndex()

void llvm::RISCVMachineFunctionInfo::pushInterruptCSRFrameIndex ( int FI)
inline

Definition at line 267 of file RISCVMachineFunctionInfo.h.

Referenced by createPreemptibleInterruptFrameEntries().

◆ setACLICInterruptStackSize()

void llvm::RISCVMachineFunctionInfo::setACLICInterruptStackSize ( unsigned Size)
inline

Definition at line 221 of file RISCVMachineFunctionInfo.h.

References llvm::Size.

◆ setBranchRelaxationScratchFrameIndex()

void llvm::RISCVMachineFunctionInfo::setBranchRelaxationScratchFrameIndex ( int Index)
inline

Definition at line 128 of file RISCVMachineFunctionInfo.h.

◆ setCalleeSavedStackSize()

void llvm::RISCVMachineFunctionInfo::setCalleeSavedStackSize ( unsigned Size)
inline

Definition at line 159 of file RISCVMachineFunctionInfo.h.

References llvm::Size.

◆ setDynamicAllocation()

void llvm::RISCVMachineFunctionInfo::setDynamicAllocation ( )
inline

Definition at line 292 of file RISCVMachineFunctionInfo.h.

◆ setIncomingIndirectArg()

void llvm::RISCVMachineFunctionInfo::setIncomingIndirectArg ( unsigned ArgIndex,
Register Reg )
inline

Definition at line 161 of file RISCVMachineFunctionInfo.h.

References Reg.

Referenced by llvm::RISCVTargetLowering::LowerFormalArguments().

◆ setIsVectorCall()

◆ setLibCallStackSize()

void llvm::RISCVMachineFunctionInfo::setLibCallStackSize ( unsigned Size)
inline

Definition at line 138 of file RISCVMachineFunctionInfo.h.

References llvm::Size.

◆ setQCIInterruptStackSize()

void llvm::RISCVMachineFunctionInfo::setQCIInterruptStackSize ( unsigned Size)
inline

Definition at line 215 of file RISCVMachineFunctionInfo.h.

References llvm::Size.

◆ setRVPushRegs()

void llvm::RISCVMachineFunctionInfo::setRVPushRegs ( unsigned Regs)
inline

Definition at line 186 of file RISCVMachineFunctionInfo.h.

◆ setRVPushStackSize()

void llvm::RISCVMachineFunctionInfo::setRVPushStackSize ( unsigned Size)
inline

Definition at line 189 of file RISCVMachineFunctionInfo.h.

References llvm::Size.

◆ setRVVPadding()

void llvm::RISCVMachineFunctionInfo::setRVVPadding ( uint64_t Padding)
inline

Definition at line 156 of file RISCVMachineFunctionInfo.h.

References uint64_t.

◆ setRVVStackAlign()

void llvm::RISCVMachineFunctionInfo::setRVVStackAlign ( Align StackAlign)
inline

Definition at line 153 of file RISCVMachineFunctionInfo.h.

◆ setRVVStackSize()

void llvm::RISCVMachineFunctionInfo::setRVVStackSize ( uint64_t Size)
inline

Definition at line 150 of file RISCVMachineFunctionInfo.h.

References llvm::Size, and uint64_t.

◆ setVarArgsFrameIndex()

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

◆ setVarArgsSaveSize()

void llvm::RISCVMachineFunctionInfo::setVarArgsSaveSize ( int Size)
inline

Definition at line 116 of file RISCVMachineFunctionInfo.h.

References llvm::Size.

Referenced by llvm::RISCVTargetLowering::LowerFormalArguments().

◆ useQCIInterrupt()

◆ useSaveRestoreLibCalls()

◆ useSiFiveInterrupt()

bool llvm::RISCVMachineFunctionInfo::useSiFiveInterrupt ( const MachineFunction & MF) const
inline

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