LLVM
15.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.
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 1079 of file SIFrameLowering.cpp.
References llvm::SIMachineFunctionInfo::BasePointerSaveIndex, E, llvm::SIMachineFunctionInfo::FramePointerSaveIndex, 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 336 of file SIFrameLowering.cpp.
References E, llvm::MachineFrameInfo::getObjectIndexBegin(), llvm::MachineFrameInfo::getObjectIndexEnd(), I, and llvm::MachineFrameInfo::isDeadObjectIndex().
Referenced by llvm::SIFrameLowering::determineCalleeSaves(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), and llvm::SIFrameLowering::processFunctionBeforeFrameFinalized().
|
static |
Definition at line 145 of file SIFrameLowering.cpp.
References DL, llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), I, MBB, llvm::MachineMemOperand::MOLoad, llvm::ARM_MB::ST, and TRI.
Referenced by llvm::SIFrameLowering::emitEpilogue().
|
static |
Definition at line 165 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(), llvm::TargetRegisterInfo::getSubReg(), 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(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), I, MBB, llvm::MachineMemOperand::MOStore, llvm::LivePhysRegs::removeReg(), llvm::ARM_MB::ST, and TRI.
Referenced by llvm::SIFrameLowering::emitPrologue().
|
static |
Definition at line 706 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(), llvm::ARM_MB::ST, TII, and TRI.
Referenced by llvm::SIFrameLowering::emitEpilogue(), and llvm::SIFrameLowering::emitPrologue().
|
static |
Definition at line 33 of file SIFrameLowering.cpp.
References llvm::LivePhysRegs::addReg(), llvm::LivePhysRegs::available(), llvm::MachineRegisterInfo::getCalleeSavedRegs(), i, llvm::MachineRegisterInfo::isPhysRegUsed(), and MRI.
Referenced by buildScratchExecCopy(), llvm::SIFrameLowering::emitEpilogue(), llvm::SIFrameLowering::emitPrologue(), 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 1454 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 399 of file SIFrameLowering.cpp.
References llvm::ARM_MB::ST.
Referenced by llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::SIFrameLowering::emitEpilogue(), and llvm::SIFrameLowering::emitPrologue().
|
static |
Definition at line 59 of file SIFrameLowering.cpp.
References Align, llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPR(), llvm::dbgs(), findScratchNonCalleeSaveRegister(), llvm::ISD::FrameIndex, llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getRegInfo(), llvm::SIMachineFunctionInfo::getSGPRToVGPRSpills(), llvm::MachineFunction::getSubtarget(), llvm::SIMachineFunctionInfo::haveFreeLanesForSGPRSpill(), LLVM_DEBUG, llvm_unreachable, llvm::printReg(), llvm::MachineFrameInfo::RemoveStackObject(), llvm::TargetStackID::SGPRSpill, llvm::ARM_MB::ST, and TRI.
Referenced by llvm::SIFrameLowering::determineCalleeSaves().
|
static |
Definition at line 689 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().
|
static |
Definition at line 739 of file SIFrameLowering.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getStackID(), and llvm::TargetStackID::SGPRSpill.
Referenced by llvm::SIFrameLowering::emitEpilogue(), and llvm::SIFrameLowering::emitPrologue().