LLVM 17.0.0git
|
#include "SIFrameLowering.h"
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIMachineFunctionInfo.h"
#include "llvm/CodeGen/LivePhysRegs.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 1282 of file SIFrameLowering.cpp.
References E, 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 515 of file SIFrameLowering.cpp.
References E, 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 147 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 167 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 124 of file SIFrameLowering.cpp.
References llvm::LivePhysRegs::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::LivePhysRegs::removeReg(), and TRI.
Referenced by llvm::SIFrameLowering::emitCSRSpillStores().
|
static |
Definition at line 870 of file SIFrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::LivePhysRegs::addReg(), llvm::BuildMI(), DL, findScratchNonCalleeSaveRegister(), llvm::MachineFunction::getInfo(), llvm::MachineInstr::getOperand(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), initLiveRegs(), 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 45 of file SIFrameLowering.cpp.
References llvm::LivePhysRegs::addReg(), llvm::LivePhysRegs::available(), findUnusedRegister(), and MRI.
|
static |
Definition at line 31 of file SIFrameLowering.cpp.
References llvm::LivePhysRegs::available(), and MRI.
Referenced by 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 1702 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 578 of file SIFrameLowering.cpp.
Referenced by llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::SIFrameLowering::emitEpilogue(), and llvm::SIFrameLowering::emitPrologue().
|
static |
Definition at line 67 of file SIFrameLowering.cpp.
References llvm::LivePhysRegs::addReg(), llvm::SIMachineFunctionInfo::addToPrologEpilogSGPRSpills(), llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPRLane(), llvm::dbgs(), findUnusedRegister(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::SIMachineFunctionInfo::getPrologEpilogSGPRSpillToVGPRLanes(), llvm::MachineFunction::getRegInfo(), 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 192 of file SIFrameLowering.cpp.
References llvm::LivePhysRegs::addLiveIns(), llvm::LivePhysRegs::addLiveOuts(), llvm::LivePhysRegs::empty(), llvm::LivePhysRegs::init(), MBB, MBBI, llvm::LivePhysRegs::stepBackward(), and TRI.
Referenced by buildScratchExecCopy(), llvm::SIFrameLowering::emitEpilogue(), and llvm::SIFrameLowering::emitPrologue().