LLVM  10.0.0svn
Macros | Functions
SIFrameLowering.cpp File Reference
#include "SIFrameLowering.h"
#include "AMDGPUSubtarget.h"
#include "SIInstrInfo.h"
#include "SIMachineFunctionInfo.h"
#include "SIRegisterInfo.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "llvm/CodeGen/LivePhysRegs.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/RegisterScavenging.h"
Include dependency graph for SIFrameLowering.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "frame-info"
 

Functions

static ArrayRef< MCPhysReggetAllSGPR128 (const GCNSubtarget &ST, const MachineFunction &MF)
 
static ArrayRef< MCPhysReggetAllSGPRs (const GCNSubtarget &ST, const MachineFunction &MF)
 
static unsigned findScratchNonCalleeSaveRegister (MachineRegisterInfo &MRI, LivePhysRegs &LiveRegs, const TargetRegisterClass &RC, bool Unused=false)
 
static MCPhysReg findUnusedSGPRNonCalleeSaved (MachineRegisterInfo &MRI)
 
static void buildPrologSpill (LivePhysRegs &LiveRegs, MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const SIInstrInfo *TII, unsigned SpillReg, unsigned ScratchRsrcReg, unsigned SPReg, int FI)
 
static void buildEpilogReload (LivePhysRegs &LiveRegs, MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const SIInstrInfo *TII, unsigned SpillReg, unsigned ScratchRsrcReg, unsigned SPReg, int FI)
 
static bool allStackObjectsAreDead (const MachineFrameInfo &MFI)
 
static bool allSGPRSpillsAreDead (const MachineFrameInfo &MFI, Optional< int > FramePointerSaveIndex)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "frame-info"

Definition at line 24 of file SIFrameLowering.cpp.

Function Documentation

◆ allSGPRSpillsAreDead()

static bool allSGPRSpillsAreDead ( const MachineFrameInfo MFI,
Optional< int >  FramePointerSaveIndex 
)
static

◆ allStackObjectsAreDead()

static bool allStackObjectsAreDead ( const MachineFrameInfo MFI)
static

◆ buildEpilogReload()

static void buildEpilogReload ( LivePhysRegs LiveRegs,
MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
const SIInstrInfo TII,
unsigned  SpillReg,
unsigned  ScratchRsrcReg,
unsigned  SPReg,
int  FI 
)
static

Definition at line 140 of file SIFrameLowering.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineRegisterInfo::addLiveIn(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::ArrayRef< T >::drop_back(), findScratchNonCalleeSaveRegister(), llvm::AMDGPUFunctionArgInfo::FLAT_SCRATCH_INIT, llvm::GCNSubtarget::flatScratchIsPointer(), getAllSGPR128(), getAllSGPRs(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::GCNSubtarget::getGeneration(), llvm::MachineFunction::getInfo(), llvm::GCNSubtarget::getInstrInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::SIMachineFunctionInfo::getNumPreloadedSGPRs(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineBasicBlock::getParent(), llvm::SIMachineFunctionInfo::getPreloadedReg(), llvm::MachineFunction::getRegInfo(), llvm::SIInstrInfo::getRegisterInfo(), llvm::SIMachineFunctionInfo::getScratchRSrcReg(), llvm::SIMachineFunctionInfo::getScratchWaveOffsetReg(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), llvm::AMDGPUSubtarget::GFX10, llvm::SIFrameLowering::hasFP(), llvm::GCNSubtarget::hasSGPRInitBug(), I, llvm::AMDGPU::Hwreg::ID_FLAT_SCR_HI, llvm::AMDGPU::Hwreg::ID_FLAT_SCR_LO, llvm::MachineRegisterInfo::isAllocatable(), llvm::AMDGPUMachineFunction::isEntryFunction(), llvm::MachineRegisterInfo::isPhysRegUsed(), llvm::RegState::Kill, llvm::MachineMemOperand::MOLoad, MRI, Reg, llvm::MachineRegisterInfo::replaceRegWith(), llvm::SIRegisterInfo::reservedPrivateSegmentBufferReg(), llvm::SIRegisterInfo::reservedPrivateSegmentWaveByteOffsetReg(), llvm::SIMachineFunctionInfo::setFrameOffsetReg(), llvm::SIMachineFunctionInfo::setScratchRSrcReg(), llvm::SIMachineFunctionInfo::setScratchWaveOffsetReg(), llvm::SIMachineFunctionInfo::setStackPtrOffsetReg(), llvm::ArrayRef< T >::size(), llvm::ArrayRef< T >::slice(), llvm::ARM_MB::ST, TII, TRI, and llvm::AMDGPU::Hwreg::WIDTH_M1_SHIFT_.

Referenced by llvm::SIFrameLowering::emitEpilogue().

◆ buildPrologSpill()

static void buildPrologSpill ( LivePhysRegs LiveRegs,
MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
const SIInstrInfo TII,
unsigned  SpillReg,
unsigned  ScratchRsrcReg,
unsigned  SPReg,
int  FI 
)
static

◆ findScratchNonCalleeSaveRegister()

static unsigned findScratchNonCalleeSaveRegister ( MachineRegisterInfo MRI,
LivePhysRegs LiveRegs,
const TargetRegisterClass RC,
bool  Unused = false 
)
static

◆ findUnusedSGPRNonCalleeSaved()

static MCPhysReg findUnusedSGPRNonCalleeSaved ( MachineRegisterInfo MRI)
static

◆ getAllSGPR128()

static ArrayRef<MCPhysReg> getAllSGPR128 ( const GCNSubtarget ST,
const MachineFunction MF 
)
static

◆ getAllSGPRs()

static ArrayRef<MCPhysReg> getAllSGPRs ( const GCNSubtarget ST,
const MachineFunction MF 
)
static