13#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64INSTRINFO_H
14#define LLVM_LIB_TARGET_AARCH64_AARCH64INSTRINFO_H
22#define GET_INSTRINFO_HEADER
23#include "AArch64GenInstrInfo.inc"
27class AArch64Subtarget;
34#define FALKOR_STRIDED_ACCESS_MD "falkor.strided.access"
194 return &AArch64::GPR64spRegClass;
202 Register &DstReg,
unsigned &SubIdx)
const override;
209 int &FrameIndex)
const override;
211 int &FrameIndex)
const override;
216 int &FrameIndex)
const override;
220 int &FrameIndex)
const override;
315 std::optional<ExtAddrMode>
337 int64_t &
Offset,
bool &OffsetIsScalable,
352 int64_t &MinOffset, int64_t &MaxOffset);
355 int64_t Offset1,
bool OffsetIsScalable1,
357 int64_t Offset2,
bool OffsetIsScalable2,
358 unsigned ClusterSize,
359 unsigned NumBytes)
const override;
367 bool KillSrc,
unsigned Opcode,
unsigned ZeroReg,
371 bool KillSrc,
bool RenamableDest =
false,
372 bool RenamableSrc =
false)
const;
375 bool KillSrc,
bool RenamableDest =
false,
376 bool RenamableSrc =
false)
const override;
403 int64_t BrOffset)
const override;
415 bool AllowModify =
false)
const override;
417 MachineBranchPredicate &MBP,
418 bool AllowModify)
const override;
420 int *BytesRemoved =
nullptr)
const override;
424 int *BytesAdded =
nullptr)
const override;
434 std::unique_ptr<TargetInstrInfo::PipelinerLoopInfo>
441 int &)
const override;
460 Register &SrcReg2, int64_t &CmpMask,
461 int64_t &CmpValue)
const override;
465 Register SrcReg2, int64_t CmpMask, int64_t CmpValue,
479 bool DoRegPressureReduce)
const override;
483 bool isAssociativeAndCommutative(
const MachineInstr &Inst,
484 bool Invert)
const override;
488 bool isAccumulationOpcode(
unsigned Opcode)
const override;
491 unsigned getAccumulationStartOpcode(
unsigned Opcode)
const override;
494 getReduceOpcodeForAccumulator(
unsigned int AccumulatorOpCode)
const override;
499 void genAlternativeCodeSequence(
505 bool useMachineCombiner()
const override;
509 std::pair<unsigned, unsigned>
510 decomposeMachineOperandsTargetFlags(
unsigned TF)
const override;
512 getSerializableDirectMachineOperandTargetFlags()
const override;
514 getSerializableBitmaskMachineOperandTargetFlags()
const override;
516 getSerializableMachineMemOperandTargetFlags()
const override;
519 bool OutlineFromLinkOnceODRs)
const override;
520 std::optional<std::unique_ptr<outliner::OutlinedFunction>>
521 getOutliningCandidateInfo(
523 std::vector<outliner::Candidate> &RepeatedSequenceLocs,
524 unsigned MinRepeats)
const override;
525 void mergeOutliningCandidateAttributes(
526 Function &
F, std::vector<outliner::Candidate> &Candidates)
const override;
529 unsigned Flags)
const override;
531 std::pair<MachineBasicBlock::iterator, MachineBasicBlock::iterator>>
539 bool shouldOutlineFromFunctionByDefault(
MachineFunction &MF)
const override;
543 bool AllowSideEffects =
true)
const override;
546 uint64_t getElementSizeForOpcode(
unsigned Opc)
const;
550 bool isPTestLikeOpcode(
unsigned Opc)
const;
552 bool isWhileOpcode(
unsigned Opc)
const;
567 std::optional<ParamLoadedValue>
570 unsigned int getTailDuplicateSize(
CodeGenOptLevel OptLevel)
const override;
577 int64_t &NumPredicateVectors,
578 int64_t &NumDataVectors);
586 bool isLegalAddressingMode(
unsigned NumBytes, int64_t
Offset,
587 unsigned Scale)
const;
594 bool FrameSetup)
const;
597 findCondCodeUseOperandIdxForBranchOrSelect(
const MachineInstr &Instr);
608#define GET_INSTRINFO_HELPER_DECLS
609#include "AArch64GenInstrInfo.inc"
615 std::optional<DestSourcePair>
617 std::optional<DestSourcePair>
625 void fixupPostOutline(MachineBasicBlock &
MBB)
const;
627 void instantiateCondBranch(MachineBasicBlock &
MBB,
const DebugLoc &
DL,
628 MachineBasicBlock *
TBB,
630 bool substituteCmpToZero(MachineInstr &CmpInstr,
unsigned SrcReg,
631 const MachineRegisterInfo &MRI)
const;
632 bool removeCmpToZeroOrOne(MachineInstr &CmpInstr,
unsigned SrcReg,
633 int CmpValue,
const MachineRegisterInfo &MRI)
const;
637 Register findRegisterToSaveLRTo(outliner::Candidate &
C)
const;
641 bool optimizePTestInstr(MachineInstr *PTest,
unsigned MaskReg,
643 const MachineRegisterInfo *MRI)
const;
644 std::optional<unsigned>
645 canRemovePTestInstr(MachineInstr *PTest, MachineInstr *Mask,
646 MachineInstr *Pred,
const MachineRegisterInfo *MRI)
const;
649 bool verifyInstruction(
const MachineInstr &
MI,
650 StringRef &ErrInfo)
const override;
662 this->N |= UsedFlags.
N;
663 this->Z |= UsedFlags.
Z;
664 this->C |= UsedFlags.
C;
665 this->V |= UsedFlags.
V;
675std::optional<UsedNZCV>
677 const TargetRegisterInfo &
TRI,
678 SmallVectorImpl<MachineInstr *> *CCUseInstrs =
nullptr);
683 const MachineInstr &
UseMI,
684 const TargetRegisterInfo *
TRI);
686MCCFIInstruction
createDefCFA(
const TargetRegisterInfo &
TRI,
unsigned FrameReg,
688 bool LastAdjustmentWasScalable =
true);
691 const StackOffset &OffsetFromDefCFA,
692 std::optional<int64_t> IncomingVGOffsetFromDefCFA);
699 const DebugLoc &
DL,
unsigned DestReg,
unsigned SrcReg,
700 StackOffset
Offset,
const TargetInstrInfo *
TII,
702 bool SetNZCV =
false,
bool NeedsWinCFI =
false,
703 bool *HasWinCFI =
nullptr,
bool EmitCFAOffset =
false,
704 StackOffset InitialOffset = {},
705 unsigned FrameReg = AArch64::SP);
736 bool *OutUseUnscaledOp =
nullptr,
737 unsigned *OutUnscaledOp =
nullptr,
738 int64_t *EmittableOffset =
nullptr);
755 case AArch64::CBWPri:
756 case AArch64::CBXPri:
757 case AArch64::CBBAssertExt:
758 case AArch64::CBHAssertExt:
759 case AArch64::CBWPrr:
760 case AArch64::CBXPrr:
784 case AArch64::BLRAAZ:
785 case AArch64::BLRABZ:
794 case AArch64::PTRUE_B:
795 case AArch64::PTRUE_H:
796 case AArch64::PTRUE_S:
797 case AArch64::PTRUE_D:
811 case IA:
case IB:
return AArch64::XPACI;
812 case DA:
case DB:
return AArch64::XPACD;
822 case IA:
return Zero ? AArch64::AUTIZA : AArch64::AUTIA;
823 case IB:
return Zero ? AArch64::AUTIZB : AArch64::AUTIB;
824 case DA:
return Zero ? AArch64::AUTDZA : AArch64::AUTDA;
825 case DB:
return Zero ? AArch64::AUTDZB : AArch64::AUTDB;
835 case IA:
return Zero ? AArch64::PACIZA : AArch64::PACIA;
836 case IB:
return Zero ? AArch64::PACIZB : AArch64::PACIB;
837 case DA:
return Zero ? AArch64::PACDZA : AArch64::PACDA;
838 case DB:
return Zero ? AArch64::PACDZB : AArch64::PACDB;
849 static const unsigned BranchOpcode[2][2] = {
850 {AArch64::BRAA, AArch64::BRAAZ},
851 {AArch64::BRAB, AArch64::BRABZ},
853 static const unsigned CallOpcode[2][2] = {
854 {AArch64::BLRAA, AArch64::BLRAAZ},
855 {AArch64::BLRAB, AArch64::BLRABZ},
858 assert((
K == IA ||
K == IB) &&
"B(L)RA* instructions require IA or IB key");
860 return CallOpcode[
K == IB][Zero];
861 return BranchOpcode[
K == IB][Zero];
865#define TSFLAG_ELEMENT_SIZE_TYPE(X) (X)
866#define TSFLAG_DESTRUCTIVE_INST_TYPE(X) ((X) << 3)
867#define TSFLAG_FALSE_LANE_TYPE(X) ((X) << 7)
868#define TSFLAG_INSTR_FLAGS(X) ((X) << 9)
869#define TSFLAG_SME_MATRIX_TYPE(X) ((X) << 11)
924#undef TSFLAG_ELEMENT_SIZE_TYPE
925#undef TSFLAG_DESTRUCTIVE_INST_TYPE
926#undef TSFLAG_FALSE_LANE_TYPE
927#undef TSFLAG_INSTR_FLAGS
928#undef TSFLAG_SME_MATRIX_TYPE
MachineInstrBuilder & UseMI
MachineInstrBuilder MachineInstrBuilder & DefMI
#define TSFLAG_DESTRUCTIVE_INST_TYPE(X)
#define TSFLAG_SME_MATRIX_TYPE(X)
#define TSFLAG_FALSE_LANE_TYPE(X)
#define TSFLAG_INSTR_FLAGS(X)
#define TSFLAG_ELEMENT_SIZE_TYPE(X)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
const HexagonInstrInfo * TII
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]
Register const TargetRegisterInfo * TRI
Promote Memory to Register
const SmallVectorImpl< MachineOperand > MachineBasicBlock * TBB
const SmallVectorImpl< MachineOperand > & Cond
static bool isHForm(const MachineInstr &MI)
Returns whether the instruction is in H form (16 bit operands)
void insertSelect(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, Register DstReg, ArrayRef< MachineOperand > Cond, Register TrueReg, Register FalseReg) const override
static bool hasBTISemantics(const MachineInstr &MI)
Returns whether the instruction can be compatible with non-zero BTYPE.
static bool isQForm(const MachineInstr &MI)
Returns whether the instruction is in Q form (128 bit operands)
static bool getMemOpInfo(unsigned Opcode, TypeSize &Scale, TypeSize &Width, int64_t &MinOffset, int64_t &MaxOffset)
Returns true if opcode Opc is a memory operation.
static bool isTailCallReturnInst(const MachineInstr &MI)
Returns true if MI is one of the TCRETURN* instructions.
static bool isFPRCopy(const MachineInstr &MI)
Does this instruction rename an FPR without modifying bits?
MachineInstr * emitLdStWithAddr(MachineInstr &MemI, const ExtAddrMode &AM) const override
std::optional< DestSourcePair > isCopyInstrImpl(const MachineInstr &MI) const override
If the specific machine instruction is an instruction that moves/copies value from one register to an...
static int getMemScale(const MachineInstr &MI)
MachineBasicBlock * getBranchDestBlock(const MachineInstr &MI) const override
bool isSubregFoldable() const override
unsigned getInstSizeInBytes(const MachineInstr &MI) const override
GetInstSize - Return the number of bytes of code the specified instruction may be.
static bool isZExtLoad(const MachineInstr &MI)
Returns whether the instruction is a zero-extending load.
bool areMemAccessesTriviallyDisjoint(const MachineInstr &MIa, const MachineInstr &MIb) const override
void copyPhysRegImpl(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register DestReg, Register SrcReg, bool KillSrc, bool RenamableDest=false, bool RenamableSrc=false) const override
static bool isGPRCopy(const MachineInstr &MI)
Does this instruction rename a GPR without modifying bits?
static unsigned convertToFlagSettingOpc(unsigned Opc)
Return the opcode that set flags when possible.
void createPauthEpilogueInstr(MachineBasicBlock &MBB, DebugLoc DL) const
Return true when there is potentially a faster code sequence for an instruction chain ending in Root.
bool isBranchOffsetInRange(unsigned BranchOpc, int64_t BrOffset) const override
bool canInsertSelect(const MachineBasicBlock &, ArrayRef< MachineOperand > Cond, Register, Register, Register, int &, int &, int &) const override
Register isLoadFromStackSlotPostFE(const MachineInstr &MI, int &FrameIndex) const override
Check for post-frame ptr elimination stack locations as well.
static const MachineOperand & getLdStOffsetOp(const MachineInstr &MI)
Returns the immediate offset operator of a load/store.
bool isCoalescableExtInstr(const MachineInstr &MI, Register &SrcReg, Register &DstReg, unsigned &SubIdx) const override
static std::optional< unsigned > getUnscaledLdSt(unsigned Opc)
Returns the unscaled load/store for the scaled load/store opcode, if there is a corresponding unscale...
static bool hasUnscaledLdStOffset(unsigned Opc)
Return true if it has an unscaled load/store offset.
static const MachineOperand & getLdStAmountOp(const MachineInstr &MI)
Returns the shift amount operator of a load/store.
static bool hasUnscaledLdStOffset(MachineInstr &MI)
static bool isPreLdSt(const MachineInstr &MI)
Returns whether the instruction is a pre-indexed load/store.
std::optional< ExtAddrMode > getAddrModeFromMemoryOp(const MachineInstr &MemI, const TargetRegisterInfo *TRI) const override
bool getMemOperandsWithOffsetWidth(const MachineInstr &MI, SmallVectorImpl< const MachineOperand * > &BaseOps, int64_t &Offset, bool &OffsetIsScalable, LocationSize &Width, const TargetRegisterInfo *TRI) const override
bool analyzeBranchPredicate(MachineBasicBlock &MBB, MachineBranchPredicate &MBP, bool AllowModify) const override
void insertIndirectBranch(MachineBasicBlock &MBB, MachineBasicBlock &NewDestBB, MachineBasicBlock &RestoreBB, const DebugLoc &DL, int64_t BrOffset, RegScavenger *RS) const override
const TargetRegisterClass * getInlineAsmMemoryOperandRegClass(InlineAsm::ConstraintCode C) const override
void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, Register VReg, unsigned SubReg=0, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
static bool isPairableLdStInst(const MachineInstr &MI)
Return true if pairing the given load or store may be paired with another.
void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, Register SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, Register VReg, MachineInstr::MIFlag Flags=MachineInstr::NoFlags) const override
static bool isSExtLoad(const MachineInstr &MI)
Returns whether the instruction is a sign-extending load.
const AArch64RegisterInfo & getRegisterInfo() const
getRegisterInfo - TargetInstrInfo is a superset of MRegister info.
static bool isPreSt(const MachineInstr &MI)
Returns whether the instruction is a pre-indexed store.
void insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override
AArch64InstrInfo(const AArch64Subtarget &STI)
static bool isPairedLdSt(const MachineInstr &MI)
Returns whether the instruction is a paired load/store.
MachineInstr * foldMemoryOperandImpl(MachineFunction &MF, MachineInstr &MI, ArrayRef< unsigned > Ops, int FrameIndex, MachineInstr *&CopyMI, LiveIntervals *LIS=nullptr, VirtRegMap *VRM=nullptr) const override
bool getMemOperandWithOffsetWidth(const MachineInstr &MI, const MachineOperand *&BaseOp, int64_t &Offset, bool &OffsetIsScalable, TypeSize &Width, const TargetRegisterInfo *TRI) const
If OffsetIsScalable is set to 'true', the offset is scaled by vscale.
Register isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex) const override
bool reverseBranchCondition(SmallVectorImpl< MachineOperand > &Cond) const override
static bool isStridedAccess(const MachineInstr &MI)
Return true if the given load or store is a strided memory access.
bool shouldClusterMemOps(ArrayRef< const MachineOperand * > BaseOps1, int64_t Offset1, bool OffsetIsScalable1, ArrayRef< const MachineOperand * > BaseOps2, int64_t Offset2, bool OffsetIsScalable2, unsigned ClusterSize, unsigned NumBytes) const override
Detect opportunities for ldp/stp formation.
unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
bool isThroughputPattern(unsigned Pattern) const override
Return true when a code sequence can improve throughput.
MachineOperand & getMemOpBaseRegImmOfsOffsetOperand(MachineInstr &LdSt) const
Return the immediate offset of the base register in a load/store LdSt.
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify=false) const override
bool canFoldIntoAddrMode(const MachineInstr &MemI, Register Reg, const MachineInstr &AddrI, ExtAddrMode &AM) const override
static bool isLdStPairSuppressed(const MachineInstr &MI)
Return true if pairing the given load or store is hinted to be unprofitable.
Register isStoreToStackSlotPostFE(const MachineInstr &MI, int &FrameIndex) const override
Check for post-frame ptr elimination stack locations as well.
std::unique_ptr< TargetInstrInfo::PipelinerLoopInfo > analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const override
void copyPhysRegTuple(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc, llvm::ArrayRef< unsigned > Indices) const
bool isSchedulingBoundary(const MachineInstr &MI, const MachineBasicBlock *MBB, const MachineFunction &MF) const override
unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
AArch64CC::CondCode insertCmpForCondBr(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, ArrayRef< MachineOperand > Cond) const
Inserts the compare instruction needed to un-fuse a fused conditional branch instruction and returns ...
bool optimizeCompareInstr(MachineInstr &CmpInstr, Register SrcReg, Register SrcReg2, int64_t CmpMask, int64_t CmpValue, const MachineRegisterInfo *MRI) const override
optimizeCompareInstr - Convert the instruction supplying the argument to the comparison into one that...
static unsigned getLoadStoreImmIdx(unsigned Opc)
Returns the index for the immediate for a given instruction.
static bool isGPRZero(const MachineInstr &MI)
Does this instruction set its full destination register to zero?
void copyGPRRegTuple(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc, unsigned Opcode, unsigned ZeroReg, llvm::ArrayRef< unsigned > Indices) const
bool analyzeCompare(const MachineInstr &MI, Register &SrcReg, Register &SrcReg2, int64_t &CmpMask, int64_t &CmpValue) const override
analyzeCompare - For a comparison instruction, return the source registers in SrcReg and SrcReg2,...
CombinerObjective getCombinerObjective(unsigned Pattern) const override
static bool isFpOrNEON(Register Reg)
Returns whether the physical register is FP or NEON.
bool isAsCheapAsAMove(const MachineInstr &MI) const override
std::optional< DestSourcePair > isCopyLikeInstrImpl(const MachineInstr &MI) const override
static void suppressLdStPair(MachineInstr &MI)
Hint that pairing the given load or store is unprofitable.
Register isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex) const override
static bool isPreLd(const MachineInstr &MI)
Returns whether the instruction is a pre-indexed load.
bool optimizeCondBranch(MachineInstr &MI) const override
Replace csincr-branch sequence by simple conditional branch.
static int getMemScale(unsigned Opc)
Scaling factor for (scaled or unscaled) load or store.
bool isCandidateToMergeOrPair(const MachineInstr &MI) const
Return true if this is a load/store that can be potentially paired/merged.
MCInst getNop() const override
static const MachineOperand & getLdStBaseOp(const MachineInstr &MI)
Returns the base register operator of a load/store.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Instances of this class represent a single low-level machine instruction.
Wrapper class representing physical registers. Should be passed by value.
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
Flags
Flags values. These may be or'd together.
This class contains meta information specific to a module.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
A Module instance is used to store all the information related to an LLVM module.
Wrapper class representing virtual and physical registers.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StackOffset holds a fixed and a scalable offset in bytes.
virtual MachineInstr * foldMemoryOperandImpl(MachineFunction &MF, MachineInstr &MI, ArrayRef< unsigned > Ops, int FrameIndex, MachineInstr *&CopyMI, LiveIntervals *LIS=nullptr, VirtRegMap *VRM=nullptr) const
Target-dependent implementation for foldMemoryOperand.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static const uint64_t InstrFlagIsWhile
static const uint64_t InstrFlagIsPTestLike
@ Destructive2xRegImmUnpred
@ DestructiveBinaryShImmUnpred
@ DestructiveInstTypeMask
@ DestructiveUnaryPassthru
@ DestructiveBinaryImmUnpred
@ DestructiveTernaryCommWithRev
@ DestructiveBinaryCommWithRev
int32_t getSVERevInstr(uint32_t Opcode)
int32_t getSMEPseudoMap(uint32_t Opcode)
int32_t getSVENonRevInstr(uint32_t Opcode)
int32_t getSVEPseudoMap(uint32_t Opcode)
InstrType
Represents how an instruction should be mapped by the outliner.
This is an optimization pass for GlobalISel generic memory operations.
static bool isCondBranchOpcode(int Opc)
MCCFIInstruction createDefCFA(const TargetRegisterInfo &TRI, unsigned FrameReg, unsigned Reg, const StackOffset &Offset, bool LastAdjustmentWasScalable=true)
static bool isPTrueOpcode(unsigned Opc)
int isAArch64FrameOffsetLegal(const MachineInstr &MI, StackOffset &Offset, bool *OutUseUnscaledOp=nullptr, unsigned *OutUnscaledOp=nullptr, int64_t *EmittableOffset=nullptr)
Check if the Offset is a valid frame offset for MI.
static bool isIndirectBranchOpcode(int Opc)
static unsigned getXPACOpcodeForKey(AArch64PACKey::ID K)
Return XPAC opcode to be used for a ptrauth strip using the given key.
unsigned getBLRCallOpcode(const MachineFunction &MF)
Return opcode to be used for indirect calls.
AArch64FrameOffsetStatus
Use to report the frame offset status in isAArch64FrameOffsetLegal.
@ AArch64FrameOffsetIsLegal
Offset is legal.
@ AArch64FrameOffsetCanUpdate
Offset can apply, at least partly.
@ AArch64FrameOffsetCannotUpdate
Offset cannot apply.
static unsigned getBranchOpcodeForKey(bool IsCall, AArch64PACKey::ID K, bool Zero)
Return B(L)RA opcode to be used for an authenticated branch or call using the given key,...
static bool isSEHInstruction(const MachineInstr &MI)
static bool isIndirectCallOpcode(unsigned Opc)
AArch64MachineCombinerPattern
@ MULSUBv2i32_indexed_OP1
@ MULADDv4i16_indexed_OP2
@ MULSUBv8i16_indexed_OP2
@ MULSUBv4i16_indexed_OP2
@ MULSUBv4i32_indexed_OP2
@ MULADDv2i32_indexed_OP1
@ MULADDv4i32_indexed_OP1
@ MULADDv2i32_indexed_OP2
@ MULSUBv4i16_indexed_OP1
@ MULADDv4i32_indexed_OP2
@ MULSUBv8i16_indexed_OP1
@ MULSUBv2i32_indexed_OP2
@ MULADDv8i16_indexed_OP1
@ MULSUBv4i32_indexed_OP1
@ MULADDv8i16_indexed_OP2
@ MULADDv4i16_indexed_OP1
void emitFrameOffset(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, StackOffset Offset, const TargetInstrInfo *TII, MachineInstr::MIFlag=MachineInstr::NoFlags, bool SetNZCV=false, bool NeedsWinCFI=false, bool *HasWinCFI=nullptr, bool EmitCFAOffset=false, StackOffset InitialOffset={}, unsigned FrameReg=AArch64::SP)
emitFrameOffset - Emit instructions as needed to set DestReg to SrcReg plus Offset.
CombinerObjective
The combiner's goal may differ based on which pattern it is attempting to optimize.
std::optional< UsedNZCV > examineCFlagsUse(MachineInstr &MI, MachineInstr &CmpInstr, const TargetRegisterInfo &TRI, SmallVectorImpl< MachineInstr * > *CCUseInstrs=nullptr)
CodeGenOptLevel
Code generation optimization level.
MCCFIInstruction createCFAOffset(const TargetRegisterInfo &MRI, unsigned Reg, const StackOffset &OffsetFromDefCFA, std::optional< int64_t > IncomingVGOffsetFromDefCFA)
ArrayRef(const T &OneElt) -> ArrayRef< T >
static bool isUncondBranchOpcode(int Opc)
static unsigned getPACOpcodeForKey(AArch64PACKey::ID K, bool Zero)
Return PAC opcode to be used for a ptrauth sign using the given key, or its PAC*Z variant that doesn'...
bool rewriteAArch64FrameIndex(MachineInstr &MI, unsigned FrameRegIdx, unsigned FrameReg, StackOffset &Offset, const AArch64InstrInfo *TII)
rewriteAArch64FrameIndex - Rewrite MI to access 'Offset' bytes from the FP.
static const MachineMemOperand::Flags MOSuppressPair
bool optimizeTerminators(MachineBasicBlock *MBB, const TargetInstrInfo &TII)
bool isNZCVTouchedInInstructionRange(const MachineInstr &DefMI, const MachineInstr &UseMI, const TargetRegisterInfo *TRI)
Return true if there is an instruction /after/ DefMI and before UseMI which either reads or clobbers ...
static const MachineMemOperand::Flags MOStridedAccess
static unsigned getAUTOpcodeForKey(AArch64PACKey::ID K, bool Zero)
Return AUT opcode to be used for a ptrauth auth using the given key, or its AUT*Z variant that doesn'...
MCRegisterClass TargetRegisterClass
Used to describe addressing mode similar to ExtAddrMode in CodeGenPrepare.
UsedNZCV & operator|=(const UsedNZCV &UsedFlags)
An individual sequence of instructions to be replaced with a call to an outlined function.
The information necessary to create an outlined function for some class of candidate.