LLVM  10.0.0svn
Macros | Typedefs | Functions | Variables
SILowerSGPRSpills.cpp File Reference
#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "SIInstrInfo.h"
#include "SIMachineFunctionInfo.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/Target/TargetMachine.h"
Include dependency graph for SILowerSGPRSpills.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "si-lower-sgpr-spills"
 

Typedefs

using MBBVector = SmallVector< MachineBasicBlock *, 4 >
 

Functions

 INITIALIZE_PASS_BEGIN (SILowerSGPRSpills, DEBUG_TYPE, "SI lower SGPR spill instructions", false, false) INITIALIZE_PASS_END(SILowerSGPRSpills
 
static void insertCSRSaves (MachineBasicBlock &SaveBlock, ArrayRef< CalleeSavedInfo > CSI, LiveIntervals *LIS)
 Insert restore code for the callee-saved registers used in the function. More...
 
static void insertCSRRestores (MachineBasicBlock &RestoreBlock, std::vector< CalleeSavedInfo > &CSI, LiveIntervals *LIS)
 Insert restore code for the callee-saved registers used in the function. More...
 

Variables

 DEBUG_TYPE
 
SI lower SGPR spill instructions
 
SI lower SGPR spill false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "si-lower-sgpr-spills"

Definition at line 34 of file SILowerSGPRSpills.cpp.

Typedef Documentation

◆ MBBVector

Definition at line 36 of file SILowerSGPRSpills.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( SILowerSGPRSpills  ,
DEBUG_TYPE  ,
"SI lower SGPR spill instructions ,
false  ,
false   
)

◆ insertCSRRestores()

static void insertCSRRestores ( MachineBasicBlock RestoreBlock,
std::vector< CalleeSavedInfo > &  CSI,
LiveIntervals LIS 
)
static

Insert restore code for the callee-saved registers used in the function.

Definition at line 119 of file SILowerSGPRSpills.cpp.

References llvm::SIMachineFunctionInfo::allocateSGPRSpillToVGPR(), llvm::SIMachineFunctionInfo::allocateVGPRSpillToAGPR(), assert(), llvm::MachineBasicBlock::begin(), llvm::MachineFrameInfo::CreateStackObject(), E, llvm::TargetRegisterInfo::eliminateFrameIndex(), F(), llvm::MachineFunction::front(), llvm::SIMachineFunctionInfo::getAGPRSpillVGPRs(), llvm::MachineRegisterInfo::getCalleeSavedRegs(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::GCNSubtarget::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getIndex(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::GCNSubtarget::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::GCNSubtarget::getRegisterInfo(), llvm::MachineFrameInfo::getRestorePoint(), llvm::MachineFrameInfo::getSavePoint(), llvm::SIMachineFunctionInfo::getSGPRSpillVGPRs(), llvm::TargetRegisterInfo::getSpillAlignment(), llvm::TargetRegisterInfo::getSpillSize(), llvm::MachineFrameInfo::getStackID(), llvm::MachineFunction::getSubtarget(), llvm::SIMachineFunctionInfo::getVGPRSpillAGPRs(), llvm::Function::hasFnAttribute(), llvm::GCNSubtarget::hasMAIInsts(), llvm::SIMachineFunctionInfo::hasSpilledSGPRs(), llvm::SIMachineFunctionInfo::hasSpilledVGPRs(), llvm::MachineFrameInfo::hasStackObjects(), I, insertCSRSaves(), llvm::LiveIntervals::InsertMachineInstrInMaps(), llvm::TargetInstrInfo::loadRegFromStackSlot(), MI, MRI, llvm::MachineBasicBlock::push_back(), Reg, llvm::LiveIntervals::removeAllRegUnitsForPhysReg(), llvm::TargetFrameLowering::restoreCalleeSavedRegisters(), llvm::reverse(), llvm::MachineFrameInfo::setCalleeSavedInfoValid(), llvm::TargetStackID::SGPRSpill, llvm::ARM_MB::ST, llvm::BitVector::test(), and TRI.

◆ insertCSRSaves()

static void insertCSRSaves ( MachineBasicBlock SaveBlock,
ArrayRef< CalleeSavedInfo CSI,
LiveIntervals LIS 
)
static

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 81 of file SILowerSGPRSpills.cpp.

◆ false

SI lower SGPR spill false

Definition at line 81 of file SILowerSGPRSpills.cpp.

◆ instructions

SI lower SGPR spill instructions

Definition at line 81 of file SILowerSGPRSpills.cpp.