33#define DEBUG_TYPE "si-pre-emit-peephole"
37class SIPreEmitPeephole {
101 auto *MLIWrapper = getAnalysisIfAvailable<MachineLoopInfoWrapperPass>();
103 return SIPreEmitPeephole().run(MF, MLI);
110 "SI peephole optimizations",
false,
false)
112char SIPreEmitPeepholeLegacy::
ID = 0;
116void SIPreEmitPeephole::updateMLIBeforeRemovingEdge(
127 unsigned BackEdgeCount = 0;
129 if (Loop->contains(Pred))
133 if (BackEdgeCount > 1)
140 if (MLI->getLoopFor(BB) == Loop)
141 MLI->changeLoopFor(BB, ParentLoop);
146 MachineLoop *Child = Loop->removeChildLoop(std::prev(Loop->end()));
148 ParentLoop->addChildLoop(Child);
150 MLI->addTopLevelLoop(Child);
161bool SIPreEmitPeephole::optimizeVccBranch(
MachineInstr &
MI)
const {
181 MachineBasicBlock &
MBB = *
MI.getParent();
183 const bool IsWave32 =
ST.isWave32();
184 const unsigned CondReg =
TRI->getVCC();
185 const unsigned ExecReg = IsWave32 ? AMDGPU::EXEC_LO : AMDGPU::EXEC;
186 const unsigned And = IsWave32 ? AMDGPU::S_AND_B32 : AMDGPU::S_AND_B64;
187 const unsigned AndN2 = IsWave32 ? AMDGPU::S_ANDN2_B32 : AMDGPU::S_ANDN2_B64;
188 const unsigned Mov = IsWave32 ? AMDGPU::S_MOV_B32 : AMDGPU::S_MOV_B64;
192 bool ReadsCond =
false;
193 unsigned Threshold = 5;
194 for (++
A;
A !=
E; ++
A) {
197 if (
A->modifiesRegister(ExecReg,
TRI))
199 if (
A->modifiesRegister(CondReg,
TRI)) {
200 if (!
A->definesRegister(CondReg,
TRI) ||
201 (
A->getOpcode() !=
And &&
A->getOpcode() != AndN2))
205 ReadsCond |=
A->readsRegister(CondReg,
TRI);
210 MachineOperand &Op1 =
A->getOperand(1);
211 MachineOperand &Op2 =
A->getOperand(2);
213 Op2.
getReg() == ExecReg) {
214 TII->commuteInstruction(*
A);
222 int64_t MaskValue = 0;
226 auto M = std::next(
A);
227 bool ReadsSreg =
false;
228 bool ModifiesExec =
false;
229 for (;
M !=
E; ++
M) {
230 if (
M->definesRegister(SReg,
TRI))
232 if (
M->modifiesRegister(SReg,
TRI))
234 ReadsSreg |=
M->readsRegister(SReg,
TRI);
235 ModifiesExec |=
M->modifiesRegister(ExecReg,
TRI);
243 if (
A->getOpcode() ==
And && SReg == CondReg && !ModifiesExec &&
245 A->eraseFromParent();
248 if (!
M->isMoveImmediate() || !
M->getOperand(1).isImm() ||
249 (
M->getOperand(1).getImm() != -1 &&
M->getOperand(1).getImm() != 0))
251 MaskValue =
M->getOperand(1).getImm();
254 if (!ReadsSreg && Op2.
isKill()) {
255 A->getOperand(2).ChangeToImmediate(MaskValue);
256 M->eraseFromParent();
258 }
else if (Op2.
isImm()) {
265 assert(MaskValue == 0 || MaskValue == -1);
266 if (
A->getOpcode() == AndN2)
267 MaskValue = ~MaskValue;
269 if (!ReadsCond &&
A->registerDefIsDead(AMDGPU::SCC,
nullptr)) {
270 if (!
MI.killsRegister(CondReg,
TRI)) {
272 if (MaskValue == 0) {
273 BuildMI(*
A->getParent(), *
A,
A->getDebugLoc(),
TII->get(Mov), CondReg)
276 BuildMI(*
A->getParent(), *
A,
A->getDebugLoc(),
TII->get(Mov), CondReg)
281 A->eraseFromParent();
284 bool IsVCCZ =
MI.getOpcode() == AMDGPU::S_CBRANCH_VCCZ;
285 if (SReg == ExecReg) {
288 MI.eraseFromParent();
291 MI.setDesc(
TII->get(AMDGPU::S_BRANCH));
292 }
else if (IsVCCZ && MaskValue == 0) {
295 MachineBasicBlock *Parent =
MI.getParent();
296 SmallVector<MachineInstr *, 4>
ToRemove;
303 Found =
Term.isIdenticalTo(
MI);
306 assert(Found &&
"conditional branch is not terminator");
308 MachineOperand &Dst = BranchMI->getOperand(0);
309 assert(Dst.isMBB() &&
"destination is not basic block");
310 updateMLIBeforeRemovingEdge(Parent, Dst.getMBB());
312 BranchMI->eraseFromParent();
316 updateMLIBeforeRemovingEdge(Parent, Succ);
321 MI.setDesc(
TII->get(AMDGPU::S_BRANCH));
322 }
else if (!IsVCCZ && MaskValue == 0) {
324 MachineOperand &Dst =
MI.getOperand(0);
325 assert(Dst.isMBB() &&
"destination is not basic block");
326 MachineBasicBlock *Parent =
MI.getParent();
327 updateMLIBeforeRemovingEdge(Parent, Dst.getMBB());
329 MI.eraseFromParent();
331 }
else if (MaskValue == -1) {
334 TII->get(IsVCCZ ? AMDGPU::S_CBRANCH_EXECZ : AMDGPU::S_CBRANCH_EXECNZ));
337 MI.removeOperand(
MI.findRegisterUseOperandIdx(CondReg,
TRI,
false ));
343bool SIPreEmitPeephole::optimizeSetGPR(MachineInstr &
First,
344 MachineInstr &
MI)
const {
345 MachineBasicBlock &
MBB = *
MI.getParent();
348 MachineOperand *Idx =
TII->getNamedOperand(
MI, AMDGPU::OpName::src0);
350 SmallVector<MachineInstr *, 4>
ToRemove;
358 E =
MI.getIterator();
360 if (
I->isBundle() ||
I->isDebugInstr())
362 switch (
I->getOpcode()) {
363 case AMDGPU::S_SET_GPR_IDX_MODE:
365 case AMDGPU::S_SET_GPR_IDX_OFF:
370 if (
I->modifiesRegister(AMDGPU::M0,
TRI))
372 if (IdxReg &&
I->modifiesRegister(IdxReg,
TRI))
375 return MO.isReg() && TRI->isVectorRegister(MRI, MO.getReg());
379 if (!IdxOn || !(
I->getOpcode() == AMDGPU::V_MOV_B32_indirect_write ||
380 I->getOpcode() == AMDGPU::V_MOV_B32_indirect_read))
386 MI.eraseFromBundle();
388 RI->eraseFromBundle();
392bool SIPreEmitPeephole::getBlockDestinations(
393 MachineBasicBlock &SrcMBB, MachineBasicBlock *&TrueMBB,
394 MachineBasicBlock *&FalseMBB, SmallVectorImpl<MachineOperand> &
Cond) {
405class BranchWeightCostModel {
406 const SIInstrInfo &
TII;
407 const TargetSchedModel &SchedModel;
408 BranchProbability BranchProb;
409 static constexpr uint64_t BranchNotTakenCost = 1;
410 uint64_t BranchTakenCost;
411 uint64_t ThenCyclesCost = 0;
414 BranchWeightCostModel(
const SIInstrInfo &
TII,
const MachineInstr &Branch,
415 const MachineBasicBlock &Succ)
416 :
TII(
TII), SchedModel(
TII.getSchedModel()) {
417 const MachineBasicBlock &Head = *
Branch.getParent();
424 BranchTakenCost = SchedModel.computeInstrLatency(&Branch);
428 if (
TII.isWaitcnt(
MI.getOpcode()))
431 ThenCyclesCost += SchedModel.computeInstrLatency(&
MI);
443 return (Denominator - Numerator) * ThenCyclesCost <=
444 ((Denominator - Numerator) * BranchTakenCost +
445 Numerator * BranchNotTakenCost);
449bool SIPreEmitPeephole::mustRetainExeczBranch(
450 const MachineInstr &Branch,
const MachineBasicBlock &From,
451 const MachineBasicBlock &To)
const {
453 BranchWeightCostModel CostModel{*
TII,
Branch, From};
455 const MachineFunction *MF = From.
getParent();
458 const MachineBasicBlock &
MBB = *
MBBI;
460 for (
const MachineInstr &
MI :
MBB) {
464 if (
MI.isConditionalBranch())
467 if (
MI.isUnconditionalBranch() &&
471 if (
MI.isMetaInstruction())
474 if (
TII->hasUnwantedEffectsWhenEXECEmpty(
MI))
477 if (!CostModel.isProfitable(
MI))
487bool SIPreEmitPeephole::removeExeczBranch(MachineInstr &
MI,
488 MachineBasicBlock &SrcMBB) {
490 if (!
TII->getSchedModel().hasInstrSchedModel())
493 MachineBasicBlock *TrueMBB =
nullptr;
494 MachineBasicBlock *FalseMBB =
nullptr;
497 if (!getBlockDestinations(SrcMBB, TrueMBB, FalseMBB,
Cond))
505 if (mustRetainExeczBranch(
MI, *FalseMBB, *TrueMBB))
509 MI.eraseFromParent();
515bool SIPreEmitPeephole::canUnpackingClobberRegister(
const MachineInstr &
MI) {
525 Register UnpackedDstReg =
TRI->getSubReg(DstReg, AMDGPU::sub0);
527 const MachineOperand *Src0MO =
TII->getNamedOperand(
MI, AMDGPU::OpName::src0);
528 if (Src0MO && Src0MO->
isReg()) {
531 TII->getNamedOperand(
MI, AMDGPU::OpName::src0_modifiers)->getImm();
533 ?
TRI->getSubReg(SrcReg0, AMDGPU::sub1)
534 :
TRI->getSubReg(SrcReg0, AMDGPU::sub0);
537 if (
TRI->regsOverlap(UnpackedDstReg, HiSrc0Reg))
541 const MachineOperand *Src1MO =
TII->getNamedOperand(
MI, AMDGPU::OpName::src1);
542 if (Src1MO && Src1MO->
isReg()) {
545 TII->getNamedOperand(
MI, AMDGPU::OpName::src1_modifiers)->getImm();
547 ?
TRI->getSubReg(SrcReg1, AMDGPU::sub1)
548 :
TRI->getSubReg(SrcReg1, AMDGPU::sub0);
549 if (
TRI->regsOverlap(UnpackedDstReg, HiSrc1Reg))
556 const MachineOperand *Src2MO =
557 TII->getNamedOperand(
MI, AMDGPU::OpName::src2);
558 if (Src2MO && Src2MO->
isReg()) {
561 TII->getNamedOperand(
MI, AMDGPU::OpName::src2_modifiers)->getImm();
563 ?
TRI->getSubReg(SrcReg2, AMDGPU::sub1)
564 :
TRI->getSubReg(SrcReg2, AMDGPU::sub0);
565 if (
TRI->regsOverlap(UnpackedDstReg, HiSrc2Reg))
572uint32_t SIPreEmitPeephole::mapToUnpackedOpcode(MachineInstr &
I) {
573 unsigned Opcode =
I.getOpcode();
578 case AMDGPU::V_PK_ADD_F32:
579 return AMDGPU::V_ADD_F32_e64;
580 case AMDGPU::V_PK_MUL_F32:
581 return AMDGPU::V_MUL_F32_e64;
582 case AMDGPU::V_PK_FMA_F32:
583 return AMDGPU::V_FMA_F32_e64;
585 return std::numeric_limits<uint32_t>::max();
590void SIPreEmitPeephole::addOperandAndMods(MachineInstrBuilder &NewMI,
591 unsigned SrcMods,
bool IsHiBits,
592 const MachineOperand &SrcMO) {
593 unsigned NewSrcMods = 0;
605 if (SrcMods & NegModifier)
616 Register UnpackedSrcReg = (SrcMods & OpSelModifier)
617 ?
TRI->getSubReg(SrcMO.
getReg(), AMDGPU::sub1)
618 :
TRI->getSubReg(SrcMO.
getReg(), AMDGPU::sub0);
620 MachineOperand UnpackedSrcMO =
637 bool KillState =
true;
638 if ((OpSel == OpSelHi) && !IsHiBits)
642 NewMI.
add(UnpackedSrcMO);
645void SIPreEmitPeephole::collectUnpackingCandidates(
646 MachineInstr &BeginMI, SetVector<MachineInstr *> &InstrsToUnpack,
647 uint16_t NumMFMACycles) {
650 int TotalCyclesBetweenCandidates = 0;
651 auto SchedModel =
TII->getSchedModel();
656 uint32_t UnpackedOpCode = mapToUnpackedOpcode(Instr);
658 !(UnpackedOpCode == std::numeric_limits<uint32_t>::max());
659 if (
Instr.isMetaInstruction())
661 if ((
Instr.isTerminator()) ||
662 (
TII->isNeverCoissue(Instr) && !IsUnpackable) ||
664 Instr.modifiesRegister(AMDGPU::EXEC,
TRI)))
667 const MCSchedClassDesc *InstrSchedClassDesc =
671 TotalCyclesBetweenCandidates +=
Latency;
673 if (TotalCyclesBetweenCandidates >= NumMFMACycles - 1)
680 for (
const MachineOperand &InstrMO :
Instr.operands()) {
681 if (!InstrMO.isReg() || !InstrMO.getReg().isValid())
683 if (
TRI->regsOverlap(MFMADef, InstrMO.getReg()))
689 if (canUnpackingClobberRegister(Instr))
694 TotalCyclesBetweenCandidates -=
Latency;
696 TotalCyclesBetweenCandidates += 2;
698 if (TotalCyclesBetweenCandidates < NumMFMACycles - 1)
699 InstrsToUnpack.
insert(&Instr);
703void SIPreEmitPeephole::performF32Unpacking(MachineInstr &
I) {
704 const MachineOperand &DstOp =
I.getOperand(0);
706 uint32_t UnpackedOpcode = mapToUnpackedOpcode(
I);
707 assert(UnpackedOpcode != std::numeric_limits<uint32_t>::max() &&
708 "Unsupported Opcode");
710 MachineInstrBuilder Op0LOp1L =
711 createUnpackedMI(
I, UnpackedOpcode,
false);
712 MachineOperand LoDstOp = Op0LOp1L->
getOperand(0);
716 MachineInstrBuilder Op0HOp1H =
717 createUnpackedMI(
I, UnpackedOpcode,
true);
718 MachineOperand HiDstOp = Op0HOp1H->
getOperand(0);
720 uint32_t
IFlags =
I.getFlags();
729MachineInstrBuilder SIPreEmitPeephole::createUnpackedMI(MachineInstr &
I,
730 uint32_t UnpackedOpcode,
734 const MachineOperand *SrcMO0 =
TII->getNamedOperand(
I, AMDGPU::OpName::src0);
735 const MachineOperand *SrcMO1 =
TII->getNamedOperand(
I, AMDGPU::OpName::src1);
736 Register DstReg =
I.getOperand(0).getReg();
737 unsigned OpCode =
I.getOpcode();
738 Register UnpackedDstReg = IsHiBits ?
TRI->getSubReg(DstReg, AMDGPU::sub1)
739 :
TRI->getSubReg(DstReg, AMDGPU::sub0);
741 int64_t ClampVal =
TII->getNamedOperand(
I, AMDGPU::OpName::clamp)->getImm();
743 TII->getNamedOperand(
I, AMDGPU::OpName::src0_modifiers)->getImm();
745 TII->getNamedOperand(
I, AMDGPU::OpName::src1_modifiers)->getImm();
748 NewMI.
addDef(UnpackedDstReg);
749 addOperandAndMods(NewMI, Src0Mods, IsHiBits, *SrcMO0);
750 addOperandAndMods(NewMI, Src1Mods, IsHiBits, *SrcMO1);
753 const MachineOperand *SrcMO2 =
754 TII->getNamedOperand(
I, AMDGPU::OpName::src2);
756 TII->getNamedOperand(
I, AMDGPU::OpName::src2_modifiers)->getImm();
757 addOperandAndMods(NewMI, Src2Mods, IsHiBits, *SrcMO2);
772 SIPreEmitPeephole Impl;
774 if (Impl.run(MF, MLI)) {
781 MDT->updateBlockNumbers();
783 MPDT->updateBlockNumbers();
789 TII = ST.getInstrInfo();
790 TRI = &
TII->getRegisterInfo();
799 if (TermI !=
MBB.end()) {
801 switch (
MI.getOpcode()) {
802 case AMDGPU::S_CBRANCH_VCCZ:
803 case AMDGPU::S_CBRANCH_VCCNZ:
806 case AMDGPU::S_CBRANCH_EXECZ:
812 if (!
ST.hasVGPRIndexMode())
815 MachineInstr *SetGPRMI =
nullptr;
816 const unsigned Threshold = 20;
824 if (
Count == Threshold)
829 if (
MI.getOpcode() != AMDGPU::S_SET_GPR_IDX_ON)
838 if (optimizeSetGPR(*SetGPRMI,
MI))
849 if (!
ST.hasGFX940Insts())
851 for (MachineBasicBlock &
MBB : MF) {
854 auto SchedModel =
TII->getSchedModel();
855 SetVector<MachineInstr *> InstrsToUnpack;
859 const MCSchedClassDesc *SchedClassDesc =
861 uint16_t NumMFMACycles =
863 collectUnpackingCandidates(
MI, InstrsToUnpack, NumMFMACycles);
865 for (MachineInstr *
MI : InstrsToUnpack) {
866 performF32Unpacking(*
MI);
unsigned const MachineRegisterInfo * MRI
for(const MachineOperand &MO :llvm::drop_begin(OldMI.operands(), Desc.getNumOperands()))
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Provides AMDGPU specific target descriptions.
ReachingDefInfo InstSet & ToRemove
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
MachineBasicBlock MachineBasicBlock::iterator MBBI
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
AMD GCN specific subclass of TargetSubtarget.
const HexagonInstrInfo * TII
Register const TargetRegisterInfo * TRI
Promote Memory to Register
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
const SmallVectorImpl< MachineOperand > & Cond
This file implements a set that has insertion order iteration characteristics.
static bool isProfitable(const StableFunctionMap::StableFunctionEntries &SFS)
PassT::Result * getCachedResult(IRUnitT &IR) const
Get the cached result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
AnalysisUsage & addUsedIfAvailable()
Add the specified Pass class to the set of analyses used by this pass.
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
static uint32_t getDenominator()
uint32_t getNumerator() const
static BranchProbability getZero()
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
Analyze the branching code at the end of MBB, returning true if it cannot be understood (e....
bool contains(const LoopT *L) const
Return true if the specified loop is contained within in this loop.
bool isInnermost() const
Return true if the loop does not contain any (natural) loops.
BlockT * getHeader() const
iterator_range< block_iterator > blocks() const
LoopT * getParentLoop() const
Return the parent loop if it exists or nullptr for top level loops.
LoopT * removeChildLoop(iterator I)
This removes the specified child from being a subloop of this loop.
Represents a single loop in the control flow graph.
LLVM_ABI MachineBasicBlock * getFallThrough(bool JumpToFallThrough=true)
Return the fallthrough block if the block can implicitly transfer control to the block after it by fa...
LLVM_ABI BranchProbability getSuccProbability(const_succ_iterator Succ) const
Return probability of the edge from this block to MBB.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
LLVM_ABI void removeSuccessor(MachineBasicBlock *Succ, bool NormalizeSuccProbs=false)
Remove successor from the successors list of this MachineBasicBlock.
Instructions::iterator instr_iterator
MachineInstrBundleIterator< MachineInstr, true > reverse_iterator
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
iterator_range< iterator > terminators()
iterator_range< succ_iterator > successors()
iterator_range< pred_iterator > predecessors()
MachineInstrBundleIterator< MachineInstr > iterator
Analysis pass which computes a MachineDominatorTree.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
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.
void RenumberBlocks(MachineBasicBlock *MBBFrom=nullptr)
RenumberBlocks - This discards all of the MachineBasicBlock numbers and recomputes them.
BasicBlockListType::const_iterator const_iterator
const MachineInstrBuilder & addReg(Register RegNo, RegState Flags={}, unsigned SubReg=0) const
Add a new virtual register operand.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
const MachineInstrBuilder & add(const MachineOperand &MO) const
const MachineInstrBuilder & addDef(Register RegNo, RegState Flags={}, unsigned SubReg=0) const
Add a virtual register definition operand.
Representation of each machine instruction.
const MachineBasicBlock * getParent() const
void setFlags(unsigned flags)
const MachineOperand & getOperand(unsigned i) const
Analysis pass that exposes the MachineLoopInfo for a machine function.
MachineOperand class - Representation of each machine instruction operand.
LLVM_ABI void setIsRenamable(bool Val=true)
bool isReg() const
isReg - Tests if this is a MO_Register operand.
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
void setIsKill(bool Val=true)
LLVM_ABI bool isRenamable() const
isRenamable - Returns true if this register may be renamed, i.e.
void setIsUndef(bool Val=true)
Register getReg() const
getReg - Returns the register number.
static MachineOperand CreateReg(Register Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isEarlyClobber=false, unsigned SubReg=0, bool isDebug=false, bool isInternalRead=false, bool isRenamable=false)
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
static bool isMFMA(const MachineInstr &MI)
static bool modifiesModeRegister(const MachineInstr &MI)
Return true if the instruction modifies the mode register.q.
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
A vector that has set insertion semantics.
bool insert(const value_type &X)
Insert a new element into the SetVector.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
LLVM_ABI const MCSchedClassDesc * resolveSchedClass(const MachineInstr *MI) const
Return the MCSchedClassDesc for this instruction.
ProcResIter getWriteProcResBegin(const MCSchedClassDesc *SC) const
self_iterator getIterator()
NodeTy * getNextNode()
Get the next node, or nullptr for the list tail.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVM_READONLY bool hasNamedOperand(uint64_t Opcode, OpName NamedIdx)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
NodeAddr< InstrNode * > Instr
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionAddr VTableAddr Count
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
char & SIPreEmitPeepholeID
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
@ And
Bitwise or logical AND of integers.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
uint16_t ReleaseAtCycle
Cycle at which the resource will be released by an instruction, relatively to the cycle in which the ...