13 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUREGISTERBANKINFO_H 14 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUREGISTERBANKINFO_H 21 #define GET_REGBANK_DECLARATIONS 22 #include "AMDGPUGenRegisterBank.inc" 23 #undef GET_REGBANK_DECLARATIONS 29 class MachineIRBuilder;
32 class TargetRegisterInfo;
39 #define GET_TARGET_REGBANK_CLASS 40 #include "AMDGPUGenRegisterBank.inc" 50 bool collectWaterfallOperands(
56 bool executeInWaterfallLoop(
71 unsigned OpIdx)
const;
85 std::pair<Register, unsigned>
99 unsigned Default = AMDGPU::VGPRRegBankID)
const;
123 template <
unsigned NumOps>
129 template <
unsigned NumOps>
132 const std::array<unsigned, NumOps> RegSrcOpIdx,
136 getInstrAlternativeMappingsIntrinsic(
140 getInstrAlternativeMappingsIntrinsicWSideEffects(
158 unsigned Size)
const override;
This class represents lattice values for constants.
Helper class that represents how the value of an instruction may be mapped and what is the related co...
Helper class used to get/create the virtual registers that will be used to replace the MachineOperand...
Holds all the information related to register banks.
virtual unsigned getBreakDownCost(const ValueMapping &ValMapping, const RegisterBank *CurBank=nullptr) const
Get the cost of using ValMapping to decompose a register.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
unsigned const MachineRegisterInfo * MRI
virtual const InstructionMapping & getInstrMapping(const MachineInstr &MI) const
Get the mapping of the different operands of MI on the register bank.
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
Helper class to build MachineInstr.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
const SIRegisterInfo * TRI
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
This class implements the register bank concept.
Helper struct that represents how a value is mapped through different register banks.
A range adaptor for a pair of iterators.
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
const GCNSubtarget & Subtarget
Representation of each machine instruction.
virtual void applyMappingImpl(const OperandsMapper &OpdMapper) const
See applyMapping.
virtual InstructionMappings getInstrAlternativeMappings(const MachineInstr &MI) const
Get the alternative mappings for MI.
virtual unsigned copyCost(const RegisterBank &A, const RegisterBank &B, unsigned Size) const
Get the cost of a copy from B to A, or put differently, get the cost of A = COPY B.
This class provides the information for the target register banks.
virtual const RegisterBank & getRegBankFromRegClass(const TargetRegisterClass &RC, LLT Ty) const
Get a register bank that covers RC.
RegisterBank ** RegBanks
Hold the set of supported register banks.
Wrapper class representing virtual and physical registers.