14 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64REGISTERBANKINFO_H
15 #define LLVM_LIB_TARGET_AARCH64_AARCH64REGISTERBANKINFO_H
19 #define GET_REGBANK_DECLARATIONS
20 #include "AArch64GenRegisterBank.inc"
24 class TargetRegisterInfo;
85 #define GET_TARGET_REGBANK_CLASS
86 #include "AArch64GenRegisterBank.inc"
92 void applyMappingImpl(
const OperandsMapper &OpdMapper)
const override;
108 unsigned Size)
const override;
AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
static const RegisterBankInfo::ValueMapping * getCopyMapping(unsigned DstBankID, unsigned SrcBankID, unsigned Size)
Get the pointer to the ValueMapping of the operands of a copy instruction from the SrcBankID register...
Helper class that represents how the value of an instruction may be mapped and what is the related co...
static bool checkPartialMappingIdx(PartialMappingIdx FirstAlias, PartialMappingIdx LastAlias, ArrayRef< PartialMappingIdx > Order)
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.
static RegisterBankInfo::ValueMapping ValMappings[]
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static bool checkPartialMap(unsigned Idx, unsigned ValStartIdx, unsigned ValLength, const RegisterBank &RB)
Helper struct that represents how a value is partially mapped into a register.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
InstructionMappings getInstrAlternativeMappings(const MachineInstr &MI) const override
Get the alternative mappings for MI.
unsigned copyCost(const RegisterBank &A, const RegisterBank &B, unsigned Size) const override
Get the cost of a copy from B to A, or put differently, get the cost of A = COPY B.
static unsigned getRegBankBaseIdxOffset(unsigned RBIdx, unsigned Size)
This class implements the register bank concept.
Helper struct that represents how a value is mapped through different register banks.
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
static const RegisterBankInfo::ValueMapping * getValueMapping(PartialMappingIdx RBIdx, unsigned Size)
Get the pointer to the ValueMapping representing the RegisterBank at RBIdx with a size of Size...
Representation of each machine instruction.
This class provides the information for the target register banks.
const InstructionMapping & getInstrMapping(const MachineInstr &MI) const override
Get the mapping of the different operands of MI on the register bank.
static bool checkValueMapImpl(unsigned Idx, unsigned FirstInBank, unsigned Size, unsigned Offset)
static PartialMappingIdx BankIDToCopyMapIdx[]
const RegisterBank & getRegBankFromRegClass(const TargetRegisterClass &RC) const override
Get a register bank that covers RC.
static RegisterBankInfo::PartialMapping PartMappings[]