48#define DEBUG_TYPE "tailduplication"
51STATISTIC(NumTailDups,
"Number of tail duplicated blocks");
53 "Number of instructions added due to tail duplication");
55 "Number of instructions removed due to tail duplication");
56STATISTIC(NumDeadBlocks,
"Number of dead blocks removed");
63 bool LayoutModeIn,
unsigned TailDupSizeIn) {
68 MRI = &MF->getRegInfo();
72 TailDupSize = TailDupSizeIn;
74 assert(MBPI !=
nullptr &&
"Machine Branch Probability Info required");
76 LayoutMode = LayoutModeIn;
77 this->PreRegAlloc = PreRegAlloc;
85 while (
MI !=
MBB.end()) {
90 for (
unsigned i = 1, e =
MI->getNumOperands(); i != e; i += 2) {
92 if (PHIBB == PredBB) {
100 dbgs() <<
" missing input from predecessor "
106 for (
unsigned i = 1, e =
MI->getNumOperands(); i != e; i += 2) {
108 if (CheckExtra && !Preds.count(PHIBB)) {
111 dbgs() <<
" extra input from predecessor "
147 if (!tailDuplicate(IsSimple,
MBB, ForcedLayoutPred,
148 TDBBs,
Copies, CandidatePtr))
159 bool isDead =
MBB->pred_empty() && !
MBB->hasAddressTaken();
161 updateSuccessorsPHIs(
MBB,
isDead, TDBBs, Succs);
165 NumTailDupRemoved +=
MBB->size();
166 removeDeadBlock(
MBB, RemovalCallback);
171 if (!SSAUpdateVRs.empty()) {
172 for (
Register VReg : SSAUpdateVRs) {
182 auto LI = SSAUpdateVals.find(VReg);
183 for (std::pair<MachineBasicBlock *, Register> &J : LI->second) {
198 if (
UseMI->isDebugValue()) {
202 if (
UseMI->getParent() == DefBB && !
UseMI->isPHI())
206 for (
auto *UseMO : DebugUses) {
213 SSAUpdateVRs.clear();
214 SSAUpdateVals.clear();
222 Register Dst = Copy->getOperand(0).getReg();
223 Register Src = Copy->getOperand(1).getReg();
224 if (MRI->hasOneNonDBGUse(Src) &&
225 MRI->constrainRegClass(Src, MRI->getRegClass(Dst))) {
227 MRI->replaceRegWith(Dst, Src);
228 Copy->eraseFromParent();
233 NumAddedPHIs += NewPHIs.
size();
236 *DuplicatedPreds = std::move(TDBBs);
245 bool MadeChange =
false;
247 if (PreRegAlloc && Opts->tail_dup_verify) {
254 if (NumTails == Opts->tail_dup_limit)
265 if (PreRegAlloc && Opts->tail_dup_verify)
274 if (
UseMI.isDebugValue())
276 if (
UseMI.getParent() != BB)
283 for (
unsigned i = 1, e =
MI->getNumOperands(); i != e; i += 2)
284 if (
MI->getOperand(i + 1).getMBB() == SrcBB)
294 for (
const auto &
MI : BB) {
297 for (
unsigned i = 1, e =
MI.getNumOperands(); i != e; i += 2) {
299 UsedByPhi->
insert(SrcReg);
307 auto LI = SSAUpdateVals.find(OrigReg);
308 if (LI != SSAUpdateVals.end())
309 LI->second.push_back(std::make_pair(BB, NewReg));
311 AvailableValsTy Vals;
312 Vals.push_back(std::make_pair(BB, NewReg));
313 SSAUpdateVals.
insert(std::make_pair(OrigReg, Vals));
314 SSAUpdateVRs.push_back(OrigReg);
320void TailDuplicator::processPHI(
327 assert(SrcOpIdx &&
"Unable to find matching PHI source?");
328 Register SrcReg =
MI->getOperand(SrcOpIdx).getReg();
329 unsigned SrcSubReg =
MI->getOperand(SrcOpIdx).getSubReg();
335 Register NewDef = MRI->createVirtualRegister(RC);
341 MI->getOperand(SrcOpIdx).setReg(NewDef);
342 MI->getOperand(SrcOpIdx).setSubReg(0);
346 addSSAUpdateEntry(DefReg, NewDef, PredBB);
348 MI->removePHIIncomingValueFor(*PredBB);
351 MI->eraseFromParent();
352 else if (
MI->getNumOperands() == 1)
353 MI->setDesc(TII->get(TargetOpcode::IMPLICIT_DEF));
358void TailDuplicator::duplicateInstruction(
363 if (
MI->isCFIInstruction()) {
365 TII->
get(TargetOpcode::CFI_INSTRUCTION))
370 MachineInstr &NewMI = TII->duplicate(*PredBB, PredBB->
end(), *
MI);
382 Register NewReg = MRI->createVirtualRegister(RC);
386 addSSAUpdateEntry(
Reg, NewReg, PredBB);
390 if (VI == LocalVRMap.
end())
395 auto *OrigRC = MRI->getRegClass(
Reg);
396 auto *MappedRC = MRI->getRegClass(
VI->second.Reg);
398 if (
VI->second.SubReg != 0) {
400 TRI->getMatchingSuperRegClass(MappedRC, OrigRC,
VI->second.SubReg);
405 MRI->setRegClass(
VI->second.Reg, ConstrRC);
416 : MRI->constrainRegClass(
VI->second.Reg, OrigRC);
426 TRI->composeSubRegIndices(
VI->second.SubReg, MO.
getSubReg()));
431 Register NewReg = MRI->createVirtualRegister(OrigRC);
434 .
addReg(
VI->second.Reg, {},
VI->second.SubReg);
435 LocalVRMap.
erase(VI);
452void TailDuplicator::updateSuccessorsPHIs(
456 for (MachineBasicBlock *SuccBB : Succs) {
457 for (MachineInstr &
MI : *SuccBB) {
462 for (
unsigned i = 1, e =
MI.getNumOperands(); i != e; i += 2) {
463 MachineOperand &MO =
MI.getOperand(i + 1);
464 if (MO.
getMBB() == FromBB) {
471 MachineOperand &MO0 =
MI.getOperand(Idx);
477 for (
unsigned i =
MI.getNumOperands() - 2; i != Idx; i -= 2) {
478 MachineOperand &MO =
MI.getOperand(i + 1);
479 if (MO.
getMBB() == FromBB) {
480 MI.removeOperand(i + 1);
490 auto LI = SSAUpdateVals.find(
Reg);
491 if (LI != SSAUpdateVals.end()) {
493 for (
const std::pair<MachineBasicBlock *, Register> &J : LI->second) {
494 MachineBasicBlock *SrcBB = J.first;
504 MI.getOperand(Idx).setReg(SrcReg);
505 MI.getOperand(Idx + 1).setMBB(SrcBB);
508 MIB.addReg(SrcReg).addMBB(SrcBB);
513 for (MachineBasicBlock *SrcBB : TDBBs) {
515 MI.getOperand(Idx).setReg(
Reg);
516 MI.getOperand(Idx + 1).setMBB(SrcBB);
519 MIB.addReg(
Reg).addMBB(SrcBB);
524 MI.removeOperand(Idx + 1);
525 MI.removeOperand(Idx);
547 unsigned MaxDuplicateCount;
548 if (TailDupSize == 0)
549 MaxDuplicateCount = Opts->tail_dup_size;
551 MaxDuplicateCount = TailDupSize;
553 MaxDuplicateCount = 1;
561 if (TII->analyzeBranch(TailBB, PredTBB, PredFBB, PredCond) &&
571 bool HasIndirectbr =
false;
572 bool HasComputedGoto =
false;
573 if (!TailBB.
empty()) {
578 if (HasIndirectbr && PreRegAlloc)
579 MaxDuplicateCount = Opts->tail_dup_indirect_size;
587 if (HasComputedGoto && !PreRegAlloc)
588 MaxDuplicateCount = std::max(MaxDuplicateCount, 10u);
593 unsigned NumPhis = 0;
605 !
MI.isCFIInstruction()))
610 if (
MI.isConvergent())
616 if (PreRegAlloc &&
MI.isReturn())
622 if (PreRegAlloc &&
MI.isCall())
630 if (
MI.getOpcode() == TargetOpcode::INLINEASM_BR)
635 else if (!
MI.isPHI() && !
MI.isMetaInstruction())
640 NumPhis +=
MI.isPHI();
646 if (PreRegAlloc && TailBB.
pred_size() > Opts->tail_dup_pred_size &&
647 TailBB.
succ_size() > Opts->tail_dup_succ_size) {
651 return any_of(*MBB, [](MachineInstr &MI) { return MI.isPHI(); });
666 for (
auto &
I : *SB) {
677 if (HasIndirectbr && PreRegAlloc)
686 return canCompletelyDuplicateBB(TailBB);
696 if (
I == TailBB->
end())
698 return I->isUnconditionalBranch();
715 MachineBasicBlock *PredTBB =
nullptr, *PredFBB =
nullptr;
716 SmallVector<MachineOperand, 4> PredCond;
717 if (TII->analyzeBranch(*PredBB, PredTBB, PredFBB, PredCond))
720 if (!PredCond.
empty())
726bool TailDuplicator::duplicateSimpleBB(
733 for (MachineBasicBlock *PredBB : Preds) {
740 MachineBasicBlock *PredTBB =
nullptr, *PredFBB =
nullptr;
741 SmallVector<MachineOperand, 4> PredCond;
742 if (TII->analyzeBranch(*PredBB, PredTBB, PredFBB, PredCond))
746 LLVM_DEBUG(
dbgs() <<
"\nTail-duplicating into PredBB: " << *PredBB
747 <<
"From simple Succ: " << *TailBB);
749 MachineBasicBlock *NewTarget = *TailBB->
succ_begin();
753 if (PredCond.
empty())
763 if (PredFBB == TailBB)
765 if (PredTBB == TailBB)
769 if (PredTBB == PredFBB) {
775 if (PredFBB == NextBB)
777 if (PredTBB == NextBB && PredFBB ==
nullptr)
781 TII->removeBranch(*PredBB);
791 TII->insertBranch(*PredBB, PredTBB, PredFBB, PredCond,
DL);
806 if (TII->analyzeBranch(*PredBB, PredTBB, PredFBB, PredCond))
808 if (!PredCond.
empty())
846 return duplicateSimpleBB(TailBB, TDBBs, UsedByPhi);
859 assert(TailBB != PredBB &&
860 "Single-block loop should have been rejected earlier!");
869 bool IsLayoutSuccessor =
false;
870 if (ForcedLayoutPred)
871 IsLayoutSuccessor = (ForcedLayoutPred == PredBB);
873 IsLayoutSuccessor =
true;
874 if (IsLayoutSuccessor)
878 LLVM_DEBUG(
dbgs() <<
"\nTail-duplicating into PredBB: " << *PredBB
879 <<
"From Succ: " << *TailBB);
884 TII->removeBranch(*PredBB);
893 processPHI(&
MI, TailBB, PredBB, LocalVRMap, CopyInfos, UsedByPhi,
true);
897 duplicateInstruction(&
MI, TailBB, PredBB, LocalVRMap, UsedByPhi);
900 appendCopies(PredBB, CopyInfos,
Copies);
902 NumTailDupAdded += TailBB->
size() - 1;
907 "TailDuplicate called on block with multiple successors!");
908 for (MachineBasicBlock *Succ : TailBB->
successors())
909 PredBB->
addSuccessor(Succ, MBPI->getEdgeProbability(TailBB, Succ));
912 if (ShouldUpdateTerminators)
922 MachineBasicBlock *PrevBB = ForcedLayoutPred;
925 MachineBasicBlock *PriorTBB =
nullptr, *PriorFBB =
nullptr;
926 SmallVector<MachineOperand, 4> PriorCond;
932 !TII->analyzeBranch(*PrevBB, PriorTBB, PriorFBB, PriorCond) &&
934 (!PriorTBB || PriorTBB == TailBB) &&
938 <<
"From MBB: " << *TailBB);
942 bool RemovedBranches = TII->removeBranch(*PrevBB) != 0;
947 DenseMap<Register, RegSubRegPair> LocalVRMap;
951 while (
I != TailBB->
end() &&
I->isPHI()) {
954 MachineInstr *
MI = &*
I++;
955 processPHI(
MI, TailBB, PrevBB, LocalVRMap, CopyInfos, UsedByPhi,
960 while (
I != TailBB->
end()) {
963 MachineInstr *
MI = &*
I++;
964 assert(!
MI->isBundle() &&
"Not expecting bundles before regalloc!");
965 duplicateInstruction(
MI, TailBB, PrevBB, LocalVRMap, UsedByPhi);
966 MI->eraseFromParent();
968 appendCopies(PrevBB, CopyInfos,
Copies);
970 TII->removeBranch(*PrevBB);
979 if (ShouldUpdateTerminators)
985 LLVM_DEBUG(
dbgs() <<
"Abort merging blocks, the predecessor still "
986 "contains terminator instructions");
989 return RemovedBranches;
1016 for (MachineBasicBlock *PredBB : Preds) {
1024 DenseMap<Register, RegSubRegPair> LocalVRMap;
1030 processPHI(&
MI, TailBB, PredBB, LocalVRMap, CopyInfos, UsedByPhi,
false);
1032 appendCopies(PredBB, CopyInfos,
Copies);
1044 const MCInstrDesc &CopyD = TII->get(TargetOpcode::COPY);
1045 for (
auto &CI : CopyInfos) {
1047 .
addReg(CI.second.Reg, {}, CI.second.SubReg);
1054void TailDuplicator::removeDeadBlock(
1062 for (
const MachineInstr &
MI : *
MBB)
1063 if (
MI.shouldUpdateAdditionalCallInfo())
1066 if (RemovalCallback)
1067 (*RemovalCallback)(
MBB);
MachineInstrBuilder & UseMI
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static unsigned InstrCount
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
const HexagonInstrInfo * TII
Module.h This file contains the declarations for the Module class.
TargetInstrInfo::RegSubRegPair RegSubRegPair
Promote Memory to Register
MachineRegisterInfo & MRI
bool isDead(const MachineInstr &MI, const MachineRegisterInfo &MRI)
This file implements a set that has insertion order iteration characteristics.
This file defines the SmallPtrSet class.
This file defines the SmallVector class.
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
static void VerifyPHIs(MachineFunction &MF, bool CheckExtra)
static bool bothUsedInPHI(const MachineBasicBlock &A, const SmallPtrSet< MachineBasicBlock *, 8 > &SuccsB)
static unsigned getPHISrcRegOpIdx(MachineInstr *MI, MachineBasicBlock *SrcBB)
static void getRegsUsedByPHIs(const MachineBasicBlock &BB, DenseSet< Register > *UsedByPhi)
static bool isDefLiveOut(Register Reg, MachineBasicBlock *BB, const MachineRegisterInfo *MRI)
iterator find(const_arg_type_t< KeyT > Val)
bool erase(const KeyT &Val)
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&...Args)
Implements a dense probed hash-table based set.
bool hasProfileData() const
Return true if the function is annotated with profile data.
Module * getParent()
Get the module that this global value is contained inside of...
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
bool isInlineAsmBrIndirectTarget() const
Returns true if this is the indirect dest of an INLINEASM_BR.
unsigned pred_size() const
LLVM_ABI bool hasEHPadSuccessor() const
LLVM_ABI void replaceSuccessor(MachineBasicBlock *Old, MachineBasicBlock *New)
Replace successor OLD with NEW and update probability info.
LLVM_ABI void transferSuccessors(MachineBasicBlock *FromMBB)
Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors Fr...
iterator_range< iterator > phis()
Returns a range that iterates over the phis in the basic block.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
LLVM_ABI void updateTerminator(MachineBasicBlock *PreviousLayoutSuccessor)
Update the terminator instructions in block to account for changes to block layout which may have bee...
LLVM_ABI bool canFallThrough()
Return true if the block can implicitly transfer control to the block after it by falling off the end...
LLVM_ABI iterator getFirstNonDebugInstr(bool SkipPseudoOp=true)
Returns an iterator to the first non-debug instruction in the basic block, or end().
succ_iterator succ_begin()
bool terminatorIsComputedGotoWithSuccessors() const
Returns true if the original IR terminator is an indirectbr with successor blocks.
LLVM_ABI iterator getFirstTerminator()
Returns an iterator to the first terminator instruction of this basic block.
unsigned succ_size() const
bool hasAddressTaken() const
Test whether this block is used as something other than the target of a terminator,...
LLVM_ABI void addSuccessor(MachineBasicBlock *Succ, BranchProbability Prob=BranchProbability::getUnknown())
Add Succ as a successor of this MachineBasicBlock.
LLVM_ABI void removeSuccessor(MachineBasicBlock *Succ, bool NormalizeSuccProbs=false)
Remove successor from the successors list of this MachineBasicBlock.
LLVM_ABI DebugLoc findDebugLoc(instr_iterator MBBI)
Find the next valid DebugLoc starting at MBBI, skipping any debug instructions.
LLVM_ABI bool isLayoutSuccessor(const MachineBasicBlock *MBB) const
Return true if the specified MBB will be emitted immediately after this block, such that if this bloc...
LLVM_ABI void eraseFromParent()
This method unlinks 'this' from the containing function and deletes it.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
LLVM_ABI DebugLoc findBranchDebugLoc()
Find and return the merged DebugLoc of the branch instructions of the block.
iterator_range< succ_iterator > successors()
LLVM_ABI bool isSuccessor(const MachineBasicBlock *MBB) const
Return true if the specified MBB is a successor of this block.
iterator_range< pred_iterator > predecessors()
void splice(iterator Where, MachineBasicBlock *Other, iterator From)
Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before '...
MachineInstrBundleIterator< MachineInstr > iterator
LLVM_ABI bool mayHaveInlineAsmBr() const
Returns true if this block may have an INLINEASM_BR (overestimate, by checking if any of the successo...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Function & getFunction()
Return the LLVM function that this machine code represents.
void eraseAdditionalCallInfo(const MachineInstr *MI)
Following functions update call site info.
const MachineInstrBuilder & addCFIIndex(unsigned CFIIndex) const
const MachineInstrBuilder & addReg(Register RegNo, RegState Flags={}, unsigned SubReg=0) const
Add a new virtual register operand.
const MachineInstrBuilder & setMIFlags(unsigned Flags) const
Representation of each machine instruction.
bool isDebugInstr() const
unsigned getNumOperands() const
Retuns the total number of operands.
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
const MachineOperand & getOperand(unsigned i) const
bool isIndirectBranch(QueryType Type=AnyInBundle) const
Return true if this is an indirect branch, such as a branch through a register.
MachineOperand class - Representation of each machine instruction operand.
void setSubReg(unsigned subReg)
unsigned getSubReg() const
bool isReg() const
isReg - Tests if this is a MO_Register operand.
MachineBasicBlock * getMBB() const
LLVM_ABI void setReg(Register Reg)
Change the register this operand corresponds to.
void setIsKill(bool Val=true)
Register getReg() const
getReg - Returns the register number.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
MachineSSAUpdater - This class updates SSA form for a set of virtual registers defined in multiple bl...
LLVM_ABI void Initialize(Register V)
Initialize - Reset this object to get ready for a new set of SSA updates.
LLVM_ABI Register GetValueInMiddleOfBlock(MachineBasicBlock *BB, bool ExistingValueOnly=false)
GetValueInMiddleOfBlock - Construct SSA form, materializing a value that is live in the middle of the...
LLVM_ABI void RewriteUse(MachineOperand &U)
RewriteUse - Rewrite a use of the symbolic value.
LLVM_ABI void AddAvailableValue(MachineBasicBlock *BB, Register V)
AddAvailableValue - Indicate that a rewritten value is available at the end of the specified block wi...
const Triple & getTargetTriple() const
Get the target triple which is a string describing the target host.
Analysis providing profile information.
Wrapper class representing virtual and physical registers.
constexpr bool isVirtual() const
Return true if the specified register number is in the virtual register namespace.
void insert_range(Range &&R)
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
A SetVector that performs no allocations if smaller than a certain size.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
LLVM_ABI void initMF(MachineFunction &MF, bool PreRegAlloc, const MachineBranchProbabilityInfo *MBPI, MBFIWrapper *MBFI, ProfileSummaryInfo *PSI, bool LayoutMode, unsigned TailDupSize=0)
Prepare to run on a specific machine function.
LLVM_ABI bool tailDuplicateBlocks()
Look for small blocks that are unconditionally branched to and do not fall through.
LLVM_ABI bool tailDuplicateAndUpdate(bool IsSimple, MachineBasicBlock *MBB, MachineBasicBlock *ForcedLayoutPred, SmallVectorImpl< MachineBasicBlock * > *DuplicatedPreds=nullptr, function_ref< void(MachineBasicBlock *)> *RemovalCallback=nullptr, SmallVectorImpl< MachineBasicBlock * > *CandidatePtr=nullptr)
Tail duplicate a single basic block into its predecessors, and then clean up.
static LLVM_ABI bool isSimpleBB(MachineBasicBlock *TailBB)
True if this BB has only one unconditional jump.
LLVM_ABI bool canTailDuplicate(MachineBasicBlock *TailBB, MachineBasicBlock *PredBB)
Returns true if TailBB can successfully be duplicated into PredBB.
LLVM_ABI bool shouldTailDuplicate(bool IsSimple, MachineBasicBlock &TailBB)
Determine if it is profitable to duplicate this block.
const TargetRegisterInfo & getRegisterInfo() const
virtual const TargetInstrInfo * getInstrInfo() const
bool isOSDarwin() const
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, DriverKit, XROS, or bridgeOS).
std::pair< iterator, bool > insert(const ValueT &V)
size_type count(const_arg_type_t< ValueT > V) const
Return 1 if the specified key is in the set, 0 otherwise.
An efficient, type-erasing, non-owning reference to a callable.
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.
This is an optimization pass for GlobalISel generic memory operations.
auto drop_begin(T &&RangeOrContainer, size_t N=1)
Return a range covering RangeOrContainer with the first N elements excluded.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
auto successors(const MachineBasicBlock *BB)
constexpr from_range_t from_range
LLVM_ABI bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo *BFI, PGSOQueryType QueryType=PGSOQueryType::Other)
Returns true if machine function MF is suggested to be size-optimized based on the profile.
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...
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.
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
LLVM_ABI Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
const CodeGenOptions & getCodeGenOptions(const LLVMContext &C)
MCRegisterClass TargetRegisterClass