LLVM 20.0.0git
|
#include "SIFrameLowering.h"
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIMachineFunctionInfo.h"
#include "llvm/CodeGen/LiveRegUnits.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/Target/TargetMachine.h"
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" |
Variables | |
static cl::opt< bool > | EnableSpillVGPRToAGPR ("amdgpu-spill-vgpr-to-agpr", cl::desc("Enable spilling VGPRs to AGPRs"), cl::ReallyHidden, cl::init(true)) |
#define DEBUG_TYPE "frame-info" |
Definition at line 21 of file SIFrameLowering.cpp.
|
static |
Definition at line 1308 of file SIFrameLowering.cpp.
References llvm::SIMachineFunctionInfo::checkIndexInPrologEpilogSGPRSpills(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getObjectIndexBegin(), llvm::MachineFrameInfo::getObjectIndexEnd(), llvm::MachineFrameInfo::getStackID(), I, llvm::MachineFrameInfo::isDeadObjectIndex(), and llvm::TargetStackID::SGPRSpill.
Referenced by llvm::SIFrameLowering::processFunctionBeforeFrameFinalized().
|
static |
Definition at line 526 of file SIFrameLowering.cpp.
References llvm::MachineFrameInfo::getObjectIndexBegin(), llvm::MachineFrameInfo::getObjectIndexEnd(), I, and llvm::MachineFrameInfo::isDeadObjectIndex().
Referenced by llvm::SIFrameLowering::determinePrologEpilogSGPRSaves(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), and llvm::SIFrameLowering::processFunctionBeforeFrameFinalized().
|
static |
Definition at line 157 of file SIFrameLowering.cpp.
References DL, llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), I, MBB, llvm::MachineMemOperand::MOLoad, and TRI.
Referenced by llvm::SIFrameLowering::emitCSRSpillRestores().
|
static |
Definition at line 177 of file SIFrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineRegisterInfo::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::SIMachineFunctionInfo::getGITPtrHigh(), llvm::SIMachineFunctionInfo::getGITPtrLoReg(), llvm::MachineFunction::getInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), I, llvm::RegState::ImplicitDefine, MBB, TII, and TRI.
|
static |
Definition at line 134 of file SIFrameLowering.cpp.
References llvm::LiveRegUnits::addReg(), DL, llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), I, llvm::MachineBasicBlock::isLiveIn(), MBB, llvm::MachineMemOperand::MOStore, llvm::LiveRegUnits::removeReg(), and TRI.
Referenced by llvm::SIFrameLowering::emitCSRSpillStores().
|
static |
Definition at line 887 of file SIFrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::LiveRegUnits::addReg(), llvm::BuildMI(), DL, findScratchNonCalleeSaveRegister(), llvm::MachineFunction::getInfo(), llvm::MachineInstr::getOperand(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), initLiveUnits(), MBB, MBBI, MRI, llvm::report_fatal_error(), llvm::MachineOperand::setIsDead(), TII, and TRI.
Referenced by llvm::SIFrameLowering::emitCSRSpillRestores(), and llvm::SIFrameLowering::emitCSRSpillStores().
|
static |
Definition at line 49 of file SIFrameLowering.cpp.
References llvm::LiveRegUnits::addReg(), llvm::LiveRegUnits::available(), findUnusedRegister(), and MRI.
|
static |
Definition at line 34 of file SIFrameLowering.cpp.
References llvm::LiveRegUnits::available(), and MRI.
Referenced by llvm::SIFrameLowering::determinePrologEpilogSGPRSaves(), findScratchNonCalleeSaveRegister(), and getVGPRSpillLaneOrTempRegister().
|
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 1807 of file SIFrameLowering.cpp.
References llvm::MachineFrameInfo::hasPatchPoint(), llvm::MachineFrameInfo::hasStackMap(), and llvm::MachineFrameInfo::hasVarSizedObjects().
Referenced by llvm::SIFrameLowering::hasFP(), and llvm::SIFrameLowering::requiresStackPointerReference().
|
static |
Definition at line 590 of file SIFrameLowering.cpp.
Referenced by llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::SIFrameLowering::emitEpilogue(), and llvm::SIFrameLowering::emitPrologue().
|
static |
Query target location for spilling SGPRs IncludeScratchCopy
: Also look for free scratch SGPRs.
Definition at line 72 of file SIFrameLowering.cpp.
References llvm::LiveRegUnits::addReg(), llvm::SIMachineFunctionInfo::addToPrologEpilogSGPRSpills(), llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPRLane(), llvm::dbgs(), findUnusedRegister(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getRegInfo(), llvm::SIMachineFunctionInfo::getSGPRSpillToPhysicalVGPRLanes(), llvm::MachineFunction::getSubtarget(), LLVM_DEBUG, llvm::printReg(), llvm::MachineFrameInfo::RemoveStackObject(), llvm::TargetStackID::SGPRSpill, Size, and TRI.
Referenced by llvm::SIFrameLowering::determinePrologEpilogSGPRSaves().
|
static |
Definition at line 202 of file SIFrameLowering.cpp.
References llvm::LiveRegUnits::addLiveIns(), llvm::LiveRegUnits::addLiveOuts(), llvm::LiveRegUnits::empty(), llvm::LiveRegUnits::init(), MBB, MBBI, llvm::LiveRegUnits::stepBackward(), and TRI.
Referenced by buildScratchExecCopy(), llvm::SIFrameLowering::emitEpilogue(), and llvm::SIFrameLowering::emitPrologue().