LLVM  9.0.0svn
Macros | Functions
AMDGPURegisterBankInfo.cpp File Reference

This file implements the targeting of the RegisterBankInfo class for AMDGPU. More...

#include "AMDGPURegisterBankInfo.h"
#include "AMDGPUInstrInfo.h"
#include "AMDGPUSubtarget.h"
#include "SIMachineFunctionInfo.h"
#include "SIRegisterInfo.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/GlobalISel/RegisterBank.h"
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/Constants.h"
#include "AMDGPUGenRegisterBank.inc"
#include "AMDGPUGenRegisterBankInfo.def"
Include dependency graph for AMDGPURegisterBankInfo.cpp:

Go to the source code of this file.

Macros

#define GET_TARGET_REGBANK_IMPL
 

Functions

static void setRegsToType (MachineRegisterInfo &MRI, ArrayRef< unsigned > Regs, LLT NewTy)
 Replace the current type each register in Regs has with NewTy. More...
 
static LLT getHalfSizedType (LLT Ty)
 
static bool isInstrUniform (const MachineInstr &MI)
 

Detailed Description

This file implements the targeting of the RegisterBankInfo class for AMDGPU.

Todo:
This should be generated by TableGen.

Definition in file AMDGPURegisterBankInfo.cpp.

Macro Definition Documentation

◆ GET_TARGET_REGBANK_IMPL

#define GET_TARGET_REGBANK_IMPL

Definition at line 28 of file AMDGPURegisterBankInfo.cpp.

Function Documentation

◆ getHalfSizedType()

static LLT getHalfSizedType ( LLT  Ty)
static

Definition at line 407 of file AMDGPURegisterBankInfo.cpp.

References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::addSuccessor(), llvm::MachineInstrBuilder::addUse(), llvm::RegisterBankInfo::applyDefaultMapping(), assert(), B, llvm::MachineBasicBlock::begin(), llvm::MachineIRBuilder::buildBuildVector(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildMerge(), llvm::BuildMI(), llvm::MachineIRBuilder::buildSelect(), llvm::MachineIRBuilder::buildUndef(), llvm::MachineIRBuilder::buildUnmerge(), llvm::RegisterBankInfo::constrainGenericRegister(), llvm::SmallSet< T, N, C >::count(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::tgtok::Def, llvm::MachineInstr::defs(), llvm::SmallSet< T, N, C >::empty(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), llvm::MDNode::get(), llvm::MachineInstr::getDebugLoc(), llvm::LLT::getElementType(), llvm::RegisterBank::getID(), llvm::GCNSubtarget::getInstrInfo(), getIntrinsicID(), OperandsMapper::getMI(), OperandsMapper::getMRI(), llvm::LLT::getNumElements(), llvm::MachineInstr::getNumExplicitDefs(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineInstrBuilder::getReg(), llvm::MachineOperand::getReg(), getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::LLT::getScalarSizeInBits(), llvm::LLT::getSizeInBits(), llvm::MachineFunction::getSubtarget(), llvm::MachineRegisterInfo::getType(), OperandsMapper::getVRegs(), I, llvm::SmallSet< T, N, C >::insert(), llvm::MachineFunction::insert(), llvm::MachineOperand::isUse(), llvm::LLT::isVector(), llvm::RegState::Kill, Merge, MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::LLT::scalar(), llvm::LLT::scalarOrVector(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineIRBuilder::setInstr(), llvm::MachineIRBuilder::setMBB(), llvm::MachineRegisterInfo::setRegBank(), llvm::MachineRegisterInfo::setRegClass(), setRegsToType(), llvm::MachineRegisterInfo::setSimpleHint(), llvm::MachineRegisterInfo::setType(), llvm::MachineBasicBlock::splice(), llvm::ARM_MB::ST, TII, llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs(), llvm::MachineInstr::uses(), and llvm::zip().

◆ isInstrUniform()

static bool isInstrUniform ( const MachineInstr MI)
static

◆ setRegsToType()

static void setRegsToType ( MachineRegisterInfo MRI,
ArrayRef< unsigned Regs,
LLT  NewTy 
)
static

Replace the current type each register in Regs has with NewTy.

Definition at line 399 of file AMDGPURegisterBankInfo.cpp.

References assert(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), and llvm::MachineRegisterInfo::setType().

Referenced by getHalfSizedType().