LLVM 22.0.0git
SIFrameLowering.cpp File Reference

Go to the source code of this file.

Classes

class  llvm::PrologEpilogSGPRSpillBuilder

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define DEBUG_TYPE   "frame-info"

Functions

static MCRegister findUnusedRegister (MachineRegisterInfo &MRI, const LiveRegUnits &LiveUnits, const TargetRegisterClass &RC)
static MCRegister findScratchNonCalleeSaveRegister (MachineRegisterInfo &MRI, LiveRegUnits &LiveUnits, const TargetRegisterClass &RC, bool Unused=false)
static void getVGPRSpillLaneOrTempRegister (MachineFunction &MF, LiveRegUnits &LiveUnits, Register SGPR, const TargetRegisterClass &RC=AMDGPU::SReg_32_XM0_XEXECRegClass, bool IncludeScratchCopy=true)
 Query target location for spilling SGPRs IncludeScratchCopy : Also look for free scratch SGPRs.
static void buildPrologSpill (const GCNSubtarget &ST, const SIRegisterInfo &TRI, const SIMachineFunctionInfo &FuncInfo, LiveRegUnits &LiveUnits, MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register SpillReg, int FI, Register FrameReg, int64_t DwordOff=0)
static void buildEpilogRestore (const GCNSubtarget &ST, const SIRegisterInfo &TRI, const SIMachineFunctionInfo &FuncInfo, LiveRegUnits &LiveUnits, MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register SpillReg, int FI, Register FrameReg, int64_t DwordOff=0)
static void buildGitPtr (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, const SIInstrInfo *TII, Register TargetReg)
static void initLiveUnits (LiveRegUnits &LiveUnits, const SIRegisterInfo &TRI, const SIMachineFunctionInfo *FuncInfo, MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, bool IsProlog)
static bool allStackObjectsAreDead (const MachineFrameInfo &MFI)
static unsigned getScratchScaleFactor (const GCNSubtarget &ST)
static Register buildScratchExecCopy (LiveRegUnits &LiveUnits, MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, bool IsProlog, bool EnableInactiveLanes)
static bool allSGPRSpillsAreDead (const MachineFunction &MF)
static void assignSlotsUsingVGPRBlocks (MachineFunction &MF, const GCNSubtarget &ST, std::vector< CalleeSavedInfo > &CSI, unsigned &MinCSFrameIndex, unsigned &MaxCSFrameIndex)
static bool frameTriviallyRequiresSP (const MachineFrameInfo &MFI)
 Returns true if the frame will require a reference to the stack pointer.

Variables

static cl::opt< boolEnableSpillVGPRToAGPR ("amdgpu-spill-vgpr-to-agpr", cl::desc("Enable spilling VGPRs to AGPRs"), cl::ReallyHidden, cl::init(true))

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "frame-info"

Definition at line 22 of file SIFrameLowering.cpp.

Function Documentation

◆ allSGPRSpillsAreDead()

◆ allStackObjectsAreDead()

◆ assignSlotsUsingVGPRBlocks()

◆ buildEpilogRestore()

◆ buildGitPtr()

◆ buildPrologSpill()

◆ buildScratchExecCopy()

◆ findScratchNonCalleeSaveRegister()

◆ findUnusedRegister()

◆ frameTriviallyRequiresSP()

bool frameTriviallyRequiresSP ( const MachineFrameInfo & MFI)
static

Returns true if the frame will require a reference to the stack pointer.

This is the set of conditions common to setting up the stack pointer in a kernel, and for using a frame pointer in a callable function.

FIXME: Should also check hasOpaqueSPAdjustment and if any inline asm references SP.

Definition at line 2146 of file SIFrameLowering.cpp.

References llvm::MachineFrameInfo::hasPatchPoint(), llvm::MachineFrameInfo::hasStackMap(), and llvm::MachineFrameInfo::hasVarSizedObjects().

Referenced by llvm::SIFrameLowering::hasFPImpl(), and llvm::SIFrameLowering::requiresStackPointerReference().

◆ getScratchScaleFactor()

◆ getVGPRSpillLaneOrTempRegister()

◆ initLiveUnits()

Variable Documentation

◆ EnableSpillVGPRToAGPR

cl::opt< bool > EnableSpillVGPRToAGPR("amdgpu-spill-vgpr-to-agpr", cl::desc("Enable spilling VGPRs to AGPRs"), cl::ReallyHidden, cl::init(true)) ( "amdgpu-spill-vgpr-to-agpr" ,
cl::desc("Enable spilling VGPRs to AGPRs") ,
cl::ReallyHidden ,
cl::init(true)  )
static