LLVM  10.0.0
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 "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIMachineFunctionInfo.h"
#include "SIRegisterInfo.h"
#include "llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h"
#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.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 bool isVectorRegisterBank (const RegisterBank &Bank)
 
static bool memOpHasNoClobbered (const MachineMemOperand *MMO)
 
static bool isScalarLoadLegal (const MachineInstr &MI)
 
static void setRegsToType (MachineRegisterInfo &MRI, ArrayRef< Register > Regs, LLT NewTy)
 Replace the current type each register in Regs has with NewTy. More...
 
static LLT getHalfSizedType (LLT Ty)
 
static MachineInstr * getOtherVRegDef (const MachineRegisterInfo &MRI, Register Reg, const MachineInstr &MI)
 
static CmpInst::Predicate minMaxToCompare (unsigned Opc)
 
static void substituteSimpleCopyRegs (const AMDGPURegisterBankInfo::OperandsMapper &OpdMapper, unsigned OpIdx)
 
static std::pair< Register, unsigned > getBaseWithConstantOffset (MachineRegisterInfo &MRI, Register Reg)
 
static bool isZero (Register Reg, MachineRegisterInfo &MRI)
 
static unsigned extractGLC (unsigned CachePolicy)
 
static unsigned extractSLC (unsigned CachePolicy)
 
static unsigned extractDLC (unsigned CachePolicy)
 
static unsigned regBankUnion (unsigned RB0, unsigned RB1)
 
static int regBankBoolUnion (int RB0, int RB1)
 

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 30 of file AMDGPURegisterBankInfo.cpp.

Function Documentation

◆ extractDLC()

static unsigned extractDLC ( unsigned  CachePolicy)
static

◆ extractGLC()

static unsigned extractGLC ( unsigned  CachePolicy)
static

◆ extractSLC()

static unsigned extractSLC ( unsigned  CachePolicy)
static

◆ getBaseWithConstantOffset()

static std::pair<Register, unsigned> getBaseWithConstantOffset ( MachineRegisterInfo &  MRI,
Register  Reg 
)
static

◆ getHalfSizedType()

static LLT getHalfSizedType ( LLT  Ty)
static

◆ getOtherVRegDef()

static MachineInstr* getOtherVRegDef ( const MachineRegisterInfo &  MRI,
Register  Reg,
const MachineInstr &  MI 
)
static

◆ isScalarLoadLegal()

static bool isScalarLoadLegal ( const MachineInstr &  MI)
static

◆ isVectorRegisterBank()

static bool isVectorRegisterBank ( const RegisterBank &  Bank)
static

◆ isZero()

static bool isZero ( Register  Reg,
MachineRegisterInfo &  MRI 
)
static

◆ memOpHasNoClobbered()

static bool memOpHasNoClobbered ( const MachineMemOperand *  MMO)
static

◆ minMaxToCompare()

static CmpInst::Predicate minMaxToCompare ( unsigned  Opc)
static

◆ regBankBoolUnion()

static int regBankBoolUnion ( int  RB0,
int  RB1 
)
static

◆ regBankUnion()

static unsigned regBankUnion ( unsigned  RB0,
unsigned  RB1 
)
static

◆ setRegsToType()

static void setRegsToType ( MachineRegisterInfo &  MRI,
ArrayRef< Register >  Regs,
LLT  NewTy 
)
static

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

Definition at line 698 of file AMDGPURegisterBankInfo.cpp.

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

Referenced by llvm::AMDGPURegisterBankInfo::applyMappingImpl().

◆ substituteSimpleCopyRegs()

static void substituteSimpleCopyRegs ( const AMDGPURegisterBankInfo::OperandsMapper &  OpdMapper,
unsigned  OpIdx 
)
static

Definition at line 1248 of file AMDGPURegisterBankInfo.cpp.

References assert().

Referenced by llvm::AMDGPURegisterBankInfo::applyMappingImpl().