31#include "llvm/IR/IntrinsicsAArch64.h"
36#define GET_TARGET_REGBANK_IMPL
37#include "AArch64GenRegisterBank.inc"
40#include "AArch64GenRegisterBankInfo.def"
48 static auto InitializeRegisterBankOnce = [&]() {
57 assert(&AArch64::GPRRegBank == &RBGPR &&
58 "The order in RegBanks is messed up");
62 assert(&AArch64::FPRRegBank == &RBFPR &&
63 "The order in RegBanks is messed up");
67 assert(&AArch64::CCRegBank == &RBCCR &&
68 "The order in RegBanks is messed up");
73 "Subclass not added?");
75 "GPRs should hold up to 128-bit");
80 "Subclass not added?");
82 "Subclass not added?");
84 "FPRs should hold up to 512-bit via QQQQ sequence");
89 "CCR should hold up to 32-bit");
95 "PartialMappingIdx's are incorrectly ordered");
99 "PartialMappingIdx's are incorrectly ordered");
102#define CHECK_PARTIALMAP(Idx, ValStartIdx, ValLength, RB) \
105 checkPartialMap(PartialMappingIdx::Idx, ValStartIdx, ValLength, RB) && \
106 #Idx " is incorrectly initialized"); \
120#define CHECK_VALUEMAP_IMPL(RBName, Size, Offset) \
122 assert(checkValueMapImpl(PartialMappingIdx::PMI_##RBName##Size, \
123 PartialMappingIdx::PMI_First##RBName, Size, \
125 #RBName #Size " " #Offset " is incorrectly initialized"); \
128#define CHECK_VALUEMAP(RBName, Size) CHECK_VALUEMAP_IMPL(RBName, Size, 0)
142#define CHECK_VALUEMAP_3OPS(RBName, Size) \
144 CHECK_VALUEMAP_IMPL(RBName, Size, 0); \
145 CHECK_VALUEMAP_IMPL(RBName, Size, 1); \
146 CHECK_VALUEMAP_IMPL(RBName, Size, 2); \
158#define CHECK_VALUEMAP_CROSSREGCPY(RBNameDst, RBNameSrc, Size) \
160 unsigned PartialMapDstIdx = PMI_##RBNameDst##Size - PMI_Min; \
161 unsigned PartialMapSrcIdx = PMI_##RBNameSrc##Size - PMI_Min; \
162 (void)PartialMapDstIdx; \
163 (void)PartialMapSrcIdx; \
164 const ValueMapping *Map = getCopyMapping( \
165 AArch64::RBNameDst##RegBankID, AArch64::RBNameSrc##RegBankID, Size); \
167 assert(Map[0].BreakDown == \
168 &AArch64GenRegisterBankInfo::PartMappings[PartialMapDstIdx] && \
169 Map[0].NumBreakDowns == 1 && #RBNameDst #Size \
170 " Dst is incorrectly initialized"); \
171 assert(Map[1].BreakDown == \
172 &AArch64GenRegisterBankInfo::PartMappings[PartialMapSrcIdx] && \
173 Map[1].NumBreakDowns == 1 && #RBNameSrc #Size \
174 " Src is incorrectly initialized"); \
187#define CHECK_VALUEMAP_FPEXT(DstSize, SrcSize) \
189 unsigned PartialMapDstIdx = PMI_FPR##DstSize - PMI_Min; \
190 unsigned PartialMapSrcIdx = PMI_FPR##SrcSize - PMI_Min; \
191 (void)PartialMapDstIdx; \
192 (void)PartialMapSrcIdx; \
193 const ValueMapping *Map = getFPExtMapping(DstSize, SrcSize); \
195 assert(Map[0].BreakDown == \
196 &AArch64GenRegisterBankInfo::PartMappings[PartialMapDstIdx] && \
197 Map[0].NumBreakDowns == 1 && "FPR" #DstSize \
198 " Dst is incorrectly initialized"); \
199 assert(Map[1].BreakDown == \
200 &AArch64GenRegisterBankInfo::PartMappings[PartialMapSrcIdx] && \
201 Map[1].NumBreakDowns == 1 && "FPR" #SrcSize \
202 " Src is incorrectly initialized"); \
214 llvm::call_once(InitializeRegisterBankFlag, InitializeRegisterBankOnce);
219 unsigned Size)
const {
228 if (&
A == &AArch64::GPRRegBank && &
B == &AArch64::FPRRegBank)
231 if (&
A == &AArch64::FPRRegBank && &
B == &AArch64::GPRRegBank)
241 switch (RC.
getID()) {
242 case AArch64::FPR8RegClassID:
243 case AArch64::FPR16RegClassID:
244 case AArch64::FPR16_loRegClassID:
245 case AArch64::FPR32_with_hsub_in_FPR16_loRegClassID:
246 case AArch64::FPR32RegClassID:
247 case AArch64::FPR64RegClassID:
248 case AArch64::FPR64_loRegClassID:
249 case AArch64::FPR128RegClassID:
250 case AArch64::FPR128_loRegClassID:
251 case AArch64::DDRegClassID:
252 case AArch64::DDDRegClassID:
253 case AArch64::DDDDRegClassID:
254 case AArch64::QQRegClassID:
255 case AArch64::QQQRegClassID:
256 case AArch64::QQQQRegClassID:
258 case AArch64::GPR32commonRegClassID:
259 case AArch64::GPR32RegClassID:
260 case AArch64::GPR32spRegClassID:
261 case AArch64::GPR32sponlyRegClassID:
262 case AArch64::GPR32argRegClassID:
263 case AArch64::GPR32allRegClassID:
264 case AArch64::GPR64commonRegClassID:
265 case AArch64::GPR64RegClassID:
266 case AArch64::GPR64spRegClassID:
267 case AArch64::GPR64sponlyRegClassID:
268 case AArch64::GPR64argRegClassID:
269 case AArch64::GPR64allRegClassID:
270 case AArch64::GPR64noipRegClassID:
271 case AArch64::GPR64common_and_GPR64noipRegClassID:
272 case AArch64::GPR64noip_and_tcGPR64RegClassID:
273 case AArch64::tcGPR64RegClassID:
274 case AArch64::rtcGPR64RegClassID:
275 case AArch64::WSeqPairsClassRegClassID:
276 case AArch64::XSeqPairsClassRegClassID:
277 case AArch64::MatrixIndexGPR32_8_11RegClassID:
278 case AArch64::MatrixIndexGPR32_12_15RegClassID:
279 case AArch64::GPR64_with_sub_32_in_MatrixIndexGPR32_8_11RegClassID:
280 case AArch64::GPR64_with_sub_32_in_MatrixIndexGPR32_12_15RegClassID:
282 case AArch64::CCRRegClassID:
297 switch (
MI.getOpcode()) {
298 case TargetOpcode::G_OR: {
307 if (
MI.getNumOperands() != 3)
321 case TargetOpcode::G_BITCAST: {
328 if (
MI.getNumOperands() != 2)
342 copyCost(AArch64::GPRRegBank, AArch64::FPRRegBank,
Size),
347 copyCost(AArch64::GPRRegBank, AArch64::FPRRegBank,
Size),
357 case TargetOpcode::G_LOAD: {
364 if (
MI.getNumOperands() != 2)
391void AArch64RegisterBankInfo::applyMappingImpl(
392 const OperandsMapper &OpdMapper)
const {
393 switch (OpdMapper.getMI().getOpcode()) {
394 case TargetOpcode::G_OR:
395 case TargetOpcode::G_BITCAST:
396 case TargetOpcode::G_LOAD:
398 assert((OpdMapper.getInstrMapping().getID() >= 1 &&
399 OpdMapper.getInstrMapping().getID() <= 4) &&
400 "Don't know how to handle that ID");
411 case TargetOpcode::G_FADD:
412 case TargetOpcode::G_FSUB:
413 case TargetOpcode::G_FMUL:
414 case TargetOpcode::G_FMA:
415 case TargetOpcode::G_FDIV:
416 case TargetOpcode::G_FCONSTANT:
417 case TargetOpcode::G_FPEXT:
418 case TargetOpcode::G_FPTRUNC:
419 case TargetOpcode::G_FCEIL:
420 case TargetOpcode::G_FFLOOR:
421 case TargetOpcode::G_FNEARBYINT:
422 case TargetOpcode::G_FNEG:
423 case TargetOpcode::G_FCOS:
424 case TargetOpcode::G_FSIN:
425 case TargetOpcode::G_FLOG10:
426 case TargetOpcode::G_FLOG:
427 case TargetOpcode::G_FLOG2:
428 case TargetOpcode::G_FSQRT:
429 case TargetOpcode::G_FABS:
430 case TargetOpcode::G_FEXP:
431 case TargetOpcode::G_FRINT:
432 case TargetOpcode::G_INTRINSIC_TRUNC:
433 case TargetOpcode::G_INTRINSIC_ROUND:
434 case TargetOpcode::G_FMAXNUM:
435 case TargetOpcode::G_FMINNUM:
436 case TargetOpcode::G_FMAXIMUM:
437 case TargetOpcode::G_FMINIMUM:
444AArch64RegisterBankInfo::getSameKindOfOperandsMapping(
446 const unsigned Opc =
MI.getOpcode();
450 unsigned NumOperands =
MI.getNumOperands();
451 assert(NumOperands <= 3 &&
452 "This code is for instructions with 3 or less operands");
454 LLT Ty =
MRI.getType(
MI.getOperand(0).getReg());
469 for (
unsigned Idx = 1;
Idx != NumOperands; ++
Idx) {
470 LLT OpTy =
MRI.getType(
MI.getOperand(
Idx).getReg());
475 "Operand has incompatible size");
478 assert(IsFPR == OpIsFPR &&
"Operand has incompatible type");
489 assert(
MI.getOpcode() == TargetOpcode::G_INTRINSIC);
491 switch (
MI.getIntrinsicID()) {
494 case Intrinsic::aarch64_neon_uaddlv:
495 case Intrinsic::aarch64_neon_uaddv:
496 case Intrinsic::aarch64_neon_umaxv:
497 case Intrinsic::aarch64_neon_uminv:
498 case Intrinsic::aarch64_neon_fmaxv:
499 case Intrinsic::aarch64_neon_fminv:
500 case Intrinsic::aarch64_neon_fmaxnmv:
501 case Intrinsic::aarch64_neon_fminnmv:
503 case Intrinsic::aarch64_neon_saddlv: {
504 const LLT SrcTy =
MRI.getType(
MI.getOperand(2).getReg());
508 case Intrinsic::aarch64_neon_saddv:
509 case Intrinsic::aarch64_neon_smaxv:
510 case Intrinsic::aarch64_neon_sminv: {
511 const LLT SrcTy =
MRI.getType(
MI.getOperand(2).getReg());
518bool AArch64RegisterBankInfo::hasFPConstraints(
const MachineInstr &
MI,
521 unsigned Depth)
const {
522 unsigned Op =
MI.getOpcode();
532 if (Op != TargetOpcode::COPY && !
MI.isPHI() &&
538 if (RB == &AArch64::FPRRegBank)
540 if (RB == &AArch64::GPRRegBank)
547 if (!
MI.isPHI() ||
Depth > MaxFPRSearchDepth)
552 onlyDefinesFP(*MRI.getVRegDef(Op.getReg()), MRI, TRI, Depth + 1);
559 unsigned Depth)
const {
560 switch (
MI.getOpcode()) {
561 case TargetOpcode::G_FPTOSI:
562 case TargetOpcode::G_FPTOUI:
563 case TargetOpcode::G_FCMP:
564 case TargetOpcode::G_LROUND:
565 case TargetOpcode::G_LLROUND:
573bool AArch64RegisterBankInfo::onlyDefinesFP(
const MachineInstr &
MI,
576 unsigned Depth)
const {
577 switch (
MI.getOpcode()) {
579 case TargetOpcode::G_SITOFP:
580 case TargetOpcode::G_UITOFP:
581 case TargetOpcode::G_EXTRACT_VECTOR_ELT:
582 case TargetOpcode::G_INSERT_VECTOR_ELT:
583 case TargetOpcode::G_BUILD_VECTOR:
584 case TargetOpcode::G_BUILD_VECTOR_TRUNC:
594 const unsigned Opc =
MI.getOpcode();
599 Opc == TargetOpcode::G_PHI) {
614 case TargetOpcode::G_ADD:
615 case TargetOpcode::G_SUB:
616 case TargetOpcode::G_PTR_ADD:
617 case TargetOpcode::G_MUL:
618 case TargetOpcode::G_SDIV:
619 case TargetOpcode::G_UDIV:
621 case TargetOpcode::G_AND:
622 case TargetOpcode::G_OR:
623 case TargetOpcode::G_XOR:
625 case TargetOpcode::G_FADD:
626 case TargetOpcode::G_FSUB:
627 case TargetOpcode::G_FMUL:
628 case TargetOpcode::G_FDIV:
629 case TargetOpcode::G_FMAXIMUM:
630 case TargetOpcode::G_FMINIMUM:
631 return getSameKindOfOperandsMapping(
MI);
632 case TargetOpcode::G_FPEXT: {
633 LLT DstTy =
MRI.getType(
MI.getOperand(0).getReg());
634 LLT SrcTy =
MRI.getType(
MI.getOperand(1).getReg());
641 case TargetOpcode::G_SHL:
642 case TargetOpcode::G_LSHR:
643 case TargetOpcode::G_ASHR: {
644 LLT ShiftAmtTy =
MRI.getType(
MI.getOperand(2).getReg());
645 LLT SrcTy =
MRI.getType(
MI.getOperand(1).getReg());
649 return getSameKindOfOperandsMapping(
MI);
651 case TargetOpcode::COPY: {
655 if ((DstReg.
isPhysical() || !
MRI.getType(DstReg).isValid()) ||
665 assert(DstRB && SrcRB &&
"Both RegBank were nullptr");
676 case TargetOpcode::G_BITCAST: {
677 LLT DstTy =
MRI.getType(
MI.getOperand(0).getReg());
678 LLT SrcTy =
MRI.getType(
MI.getOperand(1).getReg());
683 DstIsGPR ? AArch64::GPRRegBank : AArch64::FPRRegBank;
685 SrcIsGPR ? AArch64::GPRRegBank : AArch64::FPRRegBank;
690 Opc == TargetOpcode::G_BITCAST ? 2 : 1);
696 unsigned NumOperands =
MI.getNumOperands();
701 for (
unsigned Idx = 0;
Idx < NumOperands; ++
Idx) {
702 auto &MO =
MI.getOperand(
Idx);
703 if (!MO.isReg() || !MO.getReg())
706 LLT Ty =
MRI.getType(MO.getReg());
724 case AArch64::G_DUP: {
725 Register ScalarReg =
MI.getOperand(1).getReg();
726 LLT ScalarTy =
MRI.getType(ScalarReg);
727 auto ScalarDef =
MRI.getVRegDef(ScalarReg);
731 onlyDefinesFP(*ScalarDef,
MRI,
TRI)))
737 case TargetOpcode::G_TRUNC: {
738 LLT SrcTy =
MRI.getType(
MI.getOperand(1).getReg());
743 case TargetOpcode::G_SITOFP:
744 case TargetOpcode::G_UITOFP: {
745 if (
MRI.getType(
MI.getOperand(0).getReg()).isVector())
756 case TargetOpcode::G_FPTOSI:
757 case TargetOpcode::G_FPTOUI:
758 if (
MRI.getType(
MI.getOperand(0).getReg()).isVector())
762 case TargetOpcode::G_FCMP: {
767 OpRegBankIdx = {Idx0,
771 case TargetOpcode::G_BITCAST:
773 if (OpRegBankIdx[0] != OpRegBankIdx[1])
779 case TargetOpcode::G_LOAD: {
791 if (cast<GLoad>(
MI).isAtomic()) {
798 const auto &MMO = **
MI.memoperands_begin();
799 const Value *LdVal = MMO.getValue();
801 Type *EltTy =
nullptr;
802 if (
const GlobalValue *GV = dyn_cast<GlobalValue>(LdVal)) {
803 EltTy = GV->getValueType();
807 for (
const auto *LdUser : LdVal->
users()) {
808 if (isa<LoadInst>(LdUser)) {
809 EltTy = LdUser->getType();
812 if (isa<StoreInst>(LdUser) && LdUser->getOperand(1) == LdVal) {
813 EltTy = LdUser->getOperand(0)->getType();
827 if (
any_of(
MRI.use_nodbg_instructions(
MI.getOperand(0).getReg()),
836 return onlyUsesFP(UseMI, MRI, TRI) ||
837 onlyDefinesFP(UseMI, MRI, TRI);
842 case TargetOpcode::G_STORE:
854 case TargetOpcode::G_SELECT: {
861 LLT SrcTy =
MRI.getType(
MI.getOperand(2).getReg());
878 if (
any_of(
MRI.use_nodbg_instructions(
MI.getOperand(0).getReg()),
910 case TargetOpcode::G_UNMERGE_VALUES: {
916 LLT SrcTy =
MRI.getType(
MI.getOperand(
MI.getNumOperands()-1).getReg());
920 any_of(
MRI.use_nodbg_instructions(
MI.getOperand(0).getReg()),
923 for (
unsigned Idx = 0, NumOperands =
MI.getNumOperands();
929 case TargetOpcode::G_EXTRACT_VECTOR_ELT:
937 case TargetOpcode::G_INSERT_VECTOR_ELT:
950 case TargetOpcode::G_EXTRACT: {
952 auto Src =
MI.getOperand(1).getReg();
953 LLT SrcTy =
MRI.getType(
MI.getOperand(1).getReg());
956 auto Idx =
MRI.getRegClassOrNull(Src) == &AArch64::XSeqPairsClassRegClass
959 OpRegBankIdx[0] =
Idx;
960 OpRegBankIdx[1] =
Idx;
963 case TargetOpcode::G_BUILD_VECTOR: {
979 const LLT SrcTy =
MRI.getType(VReg);
981 return Op.isDef() || MRI.getVRegDef(Op.getReg())->getOpcode() ==
982 TargetOpcode::G_CONSTANT;
990 unsigned NumOperands =
MI.getNumOperands();
991 for (
unsigned Idx = 0;
Idx < NumOperands; ++
Idx)
996 case TargetOpcode::G_VECREDUCE_FADD:
997 case TargetOpcode::G_VECREDUCE_FMUL:
998 case TargetOpcode::G_VECREDUCE_FMAX:
999 case TargetOpcode::G_VECREDUCE_FMIN:
1000 case TargetOpcode::G_VECREDUCE_ADD:
1001 case TargetOpcode::G_VECREDUCE_MUL:
1002 case TargetOpcode::G_VECREDUCE_AND:
1003 case TargetOpcode::G_VECREDUCE_OR:
1004 case TargetOpcode::G_VECREDUCE_XOR:
1005 case TargetOpcode::G_VECREDUCE_SMAX:
1006 case TargetOpcode::G_VECREDUCE_SMIN:
1007 case TargetOpcode::G_VECREDUCE_UMAX:
1008 case TargetOpcode::G_VECREDUCE_UMIN:
1013 case TargetOpcode::G_VECREDUCE_SEQ_FADD:
1014 case TargetOpcode::G_VECREDUCE_SEQ_FMUL:
1019 case TargetOpcode::G_INTRINSIC: {
1025 for (
const auto &Op :
MI.explicit_operands()) {
1032 case TargetOpcode::G_LROUND:
1033 case TargetOpcode::G_LLROUND: {
1042 for (
unsigned Idx = 0;
Idx < NumOperands; ++
Idx) {
1043 if (
MI.getOperand(
Idx).isReg() &&
MI.getOperand(
Idx).getReg()) {
1044 LLT Ty =
MRI.getType(
MI.getOperand(
Idx).getReg());
1048 if (!Mapping->isValid())
1051 OpdsMapping[
Idx] = Mapping;
unsigned const MachineRegisterInfo * MRI
MachineInstrBuilder & UseMI
MachineInstrBuilder MachineInstrBuilder & DefMI
#define CHECK_VALUEMAP(RBName, Size)
static bool isFPIntrinsic(const MachineRegisterInfo &MRI, const MachineInstr &MI)
#define CHECK_VALUEMAP_3OPS(RBName, Size)
static bool isPreISelGenericFloatingPointOpcode(unsigned Opc)
Returns whether opcode Opc is a pre-isel generic floating-point opcode, having only floating-point op...
#define CHECK_PARTIALMAP(Idx, ValStartIdx, ValLength, RB)
#define CHECK_VALUEMAP_CROSSREGCPY(RBNameDst, RBNameSrc, Size)
#define CHECK_VALUEMAP_FPEXT(DstSize, SrcSize)
This file declares the targeting of the RegisterBankInfo class for AArch64.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
Declares convenience wrapper classes for interpreting MachineInstr instances as specific generic oper...
Implement a low-level type suitable for MachineInstr level instruction selection.
unsigned const TargetRegisterInfo * TRI
static const MCPhysReg FPR[]
FPR - The set of FP registers that should be allocated for arguments on Darwin and AIX.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
static RegisterBankInfo::PartialMapping PartMappings[]
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.
static bool checkPartialMappingIdx(PartialMappingIdx FirstAlias, PartialMappingIdx LastAlias, ArrayRef< PartialMappingIdx > Order)
static RegisterBankInfo::ValueMapping ValMappings[]
static unsigned getRegBankBaseIdxOffset(unsigned RBIdx, unsigned Size)
static const RegisterBankInfo::ValueMapping * getFPExtMapping(unsigned DstSize, unsigned SrcSize)
Get the instruction mapping for G_FPEXT.
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...
const RegisterBank & getRegBankFromRegClass(const TargetRegisterClass &RC, LLT) const override
Get a register bank that covers RC.
InstructionMappings getInstrAlternativeMappings(const MachineInstr &MI) const override
Get the alternative mappings for MI.
AArch64RegisterBankInfo(const TargetRegisterInfo &TRI)
const InstructionMapping & getInstrMapping(const MachineInstr &MI) const override
Get the mapping of the different operands of MI on the register bank.
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 constexpr LLT scalar(unsigned SizeInBits)
Get a low-level scalar or aggregate "bag of bits".
constexpr bool isValid() const
constexpr bool isVector() const
constexpr TypeSize getSizeInBits() const
Returns the total size of the type. Must only be called on sized types.
constexpr LLT getElementType() const
Returns the vector's element type. Only valid for vector types.
constexpr ElementCount getElementCount() const
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
Representation of each machine instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Helper class that represents how the value of an instruction may be mapped and what is the related co...
bool isValid() const
Check whether this object is valid.
unsigned getSizeInBits(Register Reg, const MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI) const
Get the size in bits of Reg.
virtual InstructionMappings getInstrAlternativeMappings(const MachineInstr &MI) const
Get the alternative mappings for MI.
const InstructionMapping & getInstructionMapping(unsigned ID, unsigned Cost, const ValueMapping *OperandsMapping, unsigned NumOperands) const
Method to get a uniquely generated InstructionMapping.
static void applyDefaultMapping(const OperandsMapper &OpdMapper)
Helper method to apply something that is like the default mapping.
const InstructionMapping & getInvalidInstructionMapping() const
Method to get a uniquely generated invalid InstructionMapping.
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.
const RegisterBank & getRegBank(unsigned ID)
Get the register bank identified by ID.
unsigned getMaximumSize(unsigned RegBankID) const
Get the maximum size in bits that fits in the given register bank.
const ValueMapping * getOperandsMapping(Iterator Begin, Iterator End) const
Get the uniquely generated array of ValueMapping for the elements of between Begin and End.
static const unsigned DefaultMappingID
Identifier used when the related instruction mapping instance is generated by target independent code...
const InstructionMapping & getInstrMappingImpl(const MachineInstr &MI) const
Try to get the mapping of MI.
This class implements the register bank concept.
bool covers(const TargetRegisterClass &RC) const
Check whether this register bank covers RC.
unsigned getID() const
Get the identifier of this register bank.
Wrapper class representing virtual and physical registers.
constexpr bool isPhysical() const
Return true if the specified register number is in the physical register namespace.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
unsigned getID() const
Return the register class ID number.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
TargetSubtargetInfo - Generic base class for all target subtargets.
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
The instances of the Type class are immutable: once they are created, they are never changed.
bool isFPOrFPVectorTy() const
Return true if this is a FP type or a vector of FP.
LLVM Value Representation.
iterator_range< user_iterator > users()
constexpr ScalarTy getFixedValue() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
bool isPreISelGenericOpcode(unsigned Opcode)
Check whether the given Opcode is a generic opcode that is not supposed to appear after ISel.
bool isPreISelGenericOptimizationHint(unsigned Opcode)
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
void call_once(once_flag &flag, Function &&F, Args &&... ArgList)
Execute the function specified as a parameter once.
The llvm::once_flag structure.