30#define DEBUG_TYPE "ir"
31STATISTIC(NumInstrRenumberings,
"Number of renumberings across all blocks");
34 "experimental-debuginfo-iterators",
35 cl::desc(
"Enable communicating debuginfo positions through iterators, "
36 "eliminating intrinsics. Has no effect if "
37 "--preserve-input-debuginfo-format=true."),
41 cl::desc(
"When set to true, IR files will be processed and printed in "
42 "their current debug info format, regardless of default behaviour "
43 "or other flags passed. Has no effect if input IR does not "
44 "contain debug records or intrinsics. Ignored in llvm-link, "
45 "llvm-lto, and llvm-lto2."));
49 "write-experimental-debuginfo-iterators-to-bitcode",
cl::Hidden,
54 "Tried to create a marker in a non new debug-info block!");
56 return I->DebugMarker;
59 I->DebugMarker = Marker;
65 "Tried to create a marker in a non new debug-info block!");
85 assert(!
I.DebugMarker &&
"DebugMarker already set on old-format instrs?");
90 DVI->eraseFromParent();
97 DLI->eraseFromParent();
101 if (DbgVarRecs.
empty())
122 for (
auto &Inst : *
this) {
123 if (!Inst.DebugMarker)
128 InstList.
insert(Inst.getIterator(),
129 DR.createDebugIntrinsic(
getModule(),
nullptr));
142 for (
auto &Inst : *
this) {
143 if (!Inst.DebugMarker)
146 dbgs() <<
"@ " << Inst.DebugMarker <<
" ";
147 Inst.DebugMarker->dump();
164 return F->getValueSymbolTable();
187 insertInto(NewParent, InsertBefore);
190 "Cannot insert block before another block with no function!");
192 end().getNodePtr()->setParent(
this);
199 assert(NewParent &&
"Expected a parent");
200 assert(!Parent &&
"Already has a parent");
205 NewParent->
insert(NewParent->
end(),
this);
231 assert(
getParent() ==
nullptr &&
"BasicBlock still linked into the program!");
233 for (
auto &Inst : *
this) {
234 if (!Inst.DebugMarker)
236 Inst.DebugMarker->eraseFromParent();
241void BasicBlock::setParent(
Function *parent) {
243 if (Parent != parent)
244 Number = parent ? parent->NextBlockNum++ : -1u;
245 InstList.setSymTabObject(&Parent, parent);
252 return !isa<DbgInfoIntrinsic>(
I) &&
253 !(SkipPseudoOp && isa<PseudoProbeInst>(
I));
262 return !isa<DbgInfoIntrinsic>(
I) &&
263 !(SkipPseudoOp && isa<PseudoProbeInst>(
I));
301 if (InstList.empty())
303 const ReturnInst *RI = dyn_cast<ReturnInst>(&InstList.back());
304 if (!RI || RI == &InstList.front())
316 if (
auto *BI = dyn_cast<BitCastInst>(Prev)) {
319 if (!Prev || RV != Prev)
324 if (
auto *CI = dyn_cast<CallInst>(Prev)) {
325 if (CI->isMustTailCall())
332 if (InstList.empty())
334 auto *RI = dyn_cast<ReturnInst>(&InstList.back());
335 if (!RI || RI == &InstList.front())
338 if (
auto *CI = dyn_cast_or_null<CallInst>(RI->getPrevNode()))
339 if (
Function *
F = CI->getCalledFunction())
340 if (
F->getIntrinsicID() == Intrinsic::experimental_deoptimize)
351 if (!Visited.
insert(Succ).second)
359 if (InstList.empty())
362 if (isa<LoadInst>(
I) || isa<StoreInst>(
I) || isa<CallBase>(
I))
369 if (!isa<PHINode>(
I))
388 if (isa<PHINode>(
I) || isa<DbgInfoIntrinsic>(
I))
391 if (SkipPseudoOp && isa<PseudoProbeInst>(
I))
402 if (isa<PHINode>(
I) || isa<DbgInfoIntrinsic>(
I))
405 if (
I.isLifetimeStartOrEnd())
408 if (SkipPseudoOp && isa<PseudoProbeInst>(
I))
422 if (InsertPt->isEHPad()) ++InsertPt;
426 InsertPt.setHeadBit(
true);
436 if (InsertPt->isEHPad())
441 while (InsertPt !=
End &&
442 (isa<AllocaInst>(*InsertPt) || isa<DbgInfoIntrinsic>(*InsertPt) ||
443 isa<PseudoProbeInst>(*InsertPt))) {
444 if (
const AllocaInst *AI = dyn_cast<AllocaInst>(&*InsertPt)) {
445 if (!AI->isStaticAlloca())
456 I.dropAllReferences();
461 if (PI == E)
return nullptr;
464 return (PI == E) ? ThePred :
nullptr ;
469 if (PI == E)
return nullptr;
472 for (;PI != E; ++PI) {
491 if (SI == E)
return nullptr;
494 return (SI == E) ? TheSucc :
nullptr ;
499 if (SI == E)
return nullptr;
502 for (;SI != E; ++SI) {
513 return make_range<phi_iterator>(
P,
nullptr);
517 bool KeepOneInputPHIs) {
520 "Pred is not a predecessor!");
526 unsigned NumPreds = cast<PHINode>(
front()).getNumIncomingValues();
528 Phi.removeIncomingValue(Pred, !KeepOneInputPHIs);
529 if (KeepOneInputPHIs)
538 if (
Value *PhiConstant = Phi.hasConstantValue()) {
539 Phi.replaceAllUsesWith(PhiConstant);
540 Phi.eraseFromParent();
547 if (isa<LandingPadInst>(FirstNonPHI))
564 assert(Term->getNumSuccessors() > 0);
568 return !Term->isSpecialTerminator();
573 assert(
F &&
"Block must have a parent function to use this API");
574 return this == &
F->getEntryBlock();
584 "Trying to get me to create degenerate basic block!");
593 New->splice(New->end(),
this,
I,
end());
604 New->replaceSuccessorsPhiUsesWith(
this, New);
610 "Can't use splitBasicBlockBefore on degenerate BB!");
612 "Trying to get me to create degenerate basic block!");
615 "cannot split on multi incoming phis");
622 New->splice(New->end(),
this,
begin(),
I);
655 PHINode *PN = dyn_cast<PHINode>(&
I);
670 Succ->replacePhiUsesWith(Old, New);
687 if (
MDNode *MDIrrLoopHeader =
689 MDString *MDName = cast<MDString>(MDIrrLoopHeader->getOperand(0));
690 if (MDName->
getString() ==
"loop_header_weight") {
691 auto *CI = mdconst::extract<ConstantInt>(MDIrrLoopHeader->getOperand(1));
692 return std::optional<uint64_t>(CI->getValue().getZExtValue());
699 while (isa<DbgInfoIntrinsic>(It))
710 BasicBlockBits Bits = getBasicBlockBits();
711 Bits.InstrOrderValid =
true;
712 setBasicBlockBits(Bits);
714 NumInstrRenumberings++;
738 if (!TrailingDbgRecords)
743 Term->DebugMarker->absorbDebugValues(*TrailingDbgRecords,
false);
772 bool InsertAtHead = Dest.getHeadBit();
773 bool ReadFromHead =
First.getHeadBit();
780 DbgMarker *SrcTrailingDbgRecords = Src->getTrailingDbgRecords();
781 if (!SrcTrailingDbgRecords)
784 Dest->adoptDbgRecords(Src, Src->end(), InsertAtHead);
786 assert(!Src->getTrailingDbgRecords());
793 if (Src->empty() ||
First != Src->begin() || !ReadFromHead)
797 if (!
First->hasDbgRecords())
842 DbgMarker *MoreDanglingDbgRecords =
nullptr;
844 if (Dest ==
end() && !Dest.getHeadBit() && OurTrailingDbgRecords) {
847 if (!
First.getHeadBit() &&
First->hasDbgRecords()) {
848 MoreDanglingDbgRecords = Src->getMarker(
First);
852 if (
First->hasDbgRecords()) {
860 First->adoptDbgRecords(
this,
end(),
true);
869 First.setHeadBit(
true);
873 spliceDebugInfoImpl(Dest, Src,
First,
Last);
877 if (!MoreDanglingDbgRecords)
893 bool InsertAtHead = Dest.getHeadBit();
894 bool ReadFromHead =
First.getHeadBit();
897 bool ReadFromTail = !
Last.getTailBit();
898 bool LastIsEnd = (
Last == Src->end());
971 if (ReadFromTail && Src->getMarker(
Last)) {
974 Dest->adoptDbgRecords(Src,
Last,
true);
976 assert(!Src->getTrailingDbgRecords());
987 if (!ReadFromHead &&
First->hasDbgRecords()) {
988 if (
Last != Src->end()) {
1012 }
else if (Dest ==
end() && !InsertAtHead) {
1018 if (TrailingDbgRecords) {
1031#ifdef EXPENSIVE_CHECKS
1033 auto FromBBEnd = Src->end();
1035 assert(It != FromBBEnd &&
"FromBeginIt not before FromEndIt!");
1041 spliceDebugInfoEmptyBlock(Dest, Src,
First,
Last);
1047 spliceDebugInfo(Dest, Src,
First,
Last);
1057 assert(
I->getParent() ==
this);
1059 iterator NextIt = std::next(
I->getIterator());
1066 assert(Where ==
end() || Where->getParent() ==
this);
1067 bool InsertAtHead = Where.getHeadBit();
1069 M->insertDbgRecord(DR, InsertAtHead);
1073 return getMarker(std::next(
I->getIterator()));
1081 return It->DebugMarker;
1085 Instruction *
I, std::optional<DbgRecord::self_iterator> Pos) {
1147 "cached instruction ordering is incorrect");
cl::opt< bool, true > WriteNewDbgInfoFormatToBitcode2("write-experimental-debuginfo-iterators-to-bitcode", cl::Hidden, cl::location(WriteNewDbgInfoFormatToBitcode), cl::init(true))
cl::opt< bool > UseNewDbgInfoFormat("experimental-debuginfo-iterators", cl::desc("Enable communicating debuginfo positions through iterators, " "eliminating intrinsics. Has no effect if " "--preserve-input-debuginfo-format=true."), cl::init(true))
bool WriteNewDbgInfoFormatToBitcode
cl::opt< cl::boolOrDefault > PreserveInputDbgFormat("preserve-input-debuginfo-format", cl::Hidden, cl::desc("When set to true, IR files will be processed and printed in " "their current debug info format, regardless of default behaviour " "or other flags passed. Has no effect if input IR does not " "contain debug records or intrinsics. Ignored in llvm-link, " "llvm-lto, and llvm-lto2."))
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static RegisterPass< DebugifyModulePass > DM("debugify", "Attach debug info to everything")
This file provides various utilities for inspecting and working with the control flow graph in LLVM I...
ConstantRange Range(APInt(BitWidth, Low), APInt(BitWidth, High))
llvm::cl::opt< bool > UseNewDbgInfoFormat
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
an instruction to allocate memory on the stack
LLVM Basic Block Representation.
BasicBlock::iterator erase(BasicBlock::iterator FromIt, BasicBlock::iterator ToIt)
Erases a range of instructions from FromIt to (not including) ToIt.
void replaceSuccessorsPhiUsesWith(BasicBlock *Old, BasicBlock *New)
Update all phi nodes in this basic block's successors to refer to basic block New instead of basic bl...
iterator begin()
Instruction iterator methods.
void deleteTrailingDbgRecords()
Delete any trailing DbgRecords at the end of this block, see setTrailingDbgRecords.
iterator_range< const_phi_iterator > phis() const
Returns a range that iterates over the phis in the basic block.
const LandingPadInst * getLandingPadInst() const
Return the landingpad instruction associated with the landing pad.
void setTrailingDbgRecords(DbgMarker *M)
Record that the collection of DbgRecords in M "trails" after the last instruction of this block.
const_iterator getFirstInsertionPt() const
Returns an iterator to the first instruction in this block that is suitable for inserting a non-PHI i...
void renumberInstructions()
Renumber instructions and mark the ordering as valid.
iterator_range< filter_iterator< BasicBlock::const_iterator, std::function< bool(const Instruction &)> > > instructionsWithoutDebug(bool SkipPseudoOp=true) const
Return a const iterator range over the instructions in the block, skipping any debug instructions.
DbgMarker * createMarker(Instruction *I)
Attach a DbgMarker to the given instruction.
BasicBlock * splitBasicBlockBefore(iterator I, const Twine &BBName="")
Split the basic block into two basic blocks at the specified instruction and insert the new basic blo...
bool hasAddressTaken() const
Returns true if there are any uses of this basic block other than direct branches,...
InstListType::const_iterator getFirstNonPHIIt() const
Iterator returning form of getFirstNonPHI.
void insertDbgRecordBefore(DbgRecord *DR, InstListType::iterator Here)
Insert a DbgRecord into a block at the position given by Here.
void invalidateOrders()
Mark instruction ordering invalid. Done on every instruction insert.
friend void Instruction::removeFromParent()
void convertToNewDbgValues()
Convert variable location debugging information stored in dbg.value intrinsics into DbgMarkers / DbgR...
InstListType::const_iterator const_iterator
void setIsNewDbgInfoFormat(bool NewFlag)
Ensure the block is in "old" dbg.value format (NewFlag == false) or in the new format (NewFlag == tru...
const Instruction * getFirstNonPHI() const
Returns a pointer to the first instruction in this block that is not a PHINode instruction.
const Instruction & front() const
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
friend BasicBlock::iterator Instruction::eraseFromParent()
void setNewDbgInfoFormatFlag(bool NewFlag)
bool isEntryBlock() const
Return true if this is the entry block of the containing function.
ValueSymbolTable * getValueSymbolTable()
Returns a pointer to the symbol table if one exists.
void moveAfter(BasicBlock *MovePos)
Unlink this basic block from its current function and insert it right after MovePos in the function M...
bool hasNPredecessors(unsigned N) const
Return true if this block has exactly N predecessors.
BasicBlock * splitBasicBlock(iterator I, const Twine &BBName="", bool Before=false)
Split the basic block into two basic blocks at the specified instruction.
void convertFromNewDbgValues()
Convert variable location debugging information stored in DbgMarkers and DbgRecords into the dbg....
const BasicBlock * getUniqueSuccessor() const
Return the successor of this block if it has a unique successor.
const BasicBlock * getSinglePredecessor() const
Return the predecessor of this block if it has a single predecessor block.
std::optional< uint64_t > getIrrLoopHeaderWeight() const
void dumpDbgValues() const
const CallInst * getTerminatingDeoptimizeCall() const
Returns the call instruction calling @llvm.experimental.deoptimize prior to the terminating return in...
void replacePhiUsesWith(BasicBlock *Old, BasicBlock *New)
Update all phi nodes in this basic block to refer to basic block New instead of basic block Old.
const Instruction * getFirstNonPHIOrDbgOrLifetime(bool SkipPseudoOp=true) const
Returns a pointer to the first instruction in this block that is not a PHINode, a debug intrinsic,...
const BasicBlock * getUniquePredecessor() const
Return the predecessor of this block if it has a unique predecessor block.
const BasicBlock * getSingleSuccessor() const
Return the successor of this block if it has a single successor.
void flushTerminatorDbgRecords()
Eject any debug-info trailing at the end of a block.
const Function * getParent() const
Return the enclosing method, or null if none.
const DataLayout & getDataLayout() const
Get the data layout of the module this basic block belongs to.
void insertDbgRecordAfter(DbgRecord *DR, Instruction *I)
Insert a DbgRecord into a block at the position given by I.
void validateInstrOrdering() const
Asserts that instruction order numbers are marked invalid, or that they are in ascending order.
const Instruction * getFirstNonPHIOrDbg(bool SkipPseudoOp=true) const
Returns a pointer to the first instruction in this block that is not a PHINode or a debug intrinsic,...
DbgMarker * getMarker(InstListType::iterator It)
Return the DbgMarker for the position given by It, so that DbgRecords can be inserted there.
filter_iterator< BasicBlock::const_iterator, std::function< bool(constInstruction &)> >::difference_type sizeWithoutDebug() const
Return the size of the basic block ignoring debug instructions.
InstListType::iterator iterator
Instruction iterators...
LLVMContext & getContext() const
Get the context in which this basic block lives.
const_iterator getFirstNonPHIOrDbgOrAlloca() const
Returns an iterator to the first instruction in this block that is not a PHINode, a debug intrinsic,...
bool IsNewDbgInfoFormat
Flag recording whether or not this block stores debug-info in the form of intrinsic instructions (fal...
void dropAllReferences()
Cause all subinstructions to "let go" of all the references that said subinstructions are maintaining...
void reinsertInstInDbgRecords(Instruction *I, std::optional< DbgRecord::self_iterator > Pos)
In rare circumstances instructions can be speculatively removed from blocks, and then be re-inserted ...
void moveBefore(BasicBlock *MovePos)
Unlink this basic block from its current function and insert it into the function that MovePos lives ...
bool isLandingPad() const
Return true if this basic block is a landing pad.
DbgMarker * getTrailingDbgRecords()
Fetch the collection of DbgRecords that "trail" after the last instruction of this block,...
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
bool canSplitPredecessors() const
const CallInst * getTerminatingMustTailCall() const
Returns the call instruction marked 'musttail' prior to the terminating return instruction of this ba...
friend BasicBlock::iterator Instruction::insertInto(BasicBlock *BB, BasicBlock::iterator It)
bool isLegalToHoistInto() const
Return true if it is legal to hoist instructions into this block.
bool hasNPredecessorsOrMore(unsigned N) const
Return true if this block has N predecessors or more.
bool isInstrOrderValid() const
Returns true if the Order field of child Instructions is valid.
const CallInst * getPostdominatingDeoptimizeCall() const
Returns the call instruction calling @llvm.experimental.deoptimize that is present either in current ...
DbgMarker * getNextMarker(Instruction *I)
Return the DbgMarker for the position that comes after I.
const Instruction * getFirstMayFaultInst() const
Returns the first potential AsynchEH faulty instruction currently it checks for loads/stores (which m...
void splice(BasicBlock::iterator ToIt, BasicBlock *FromBB)
Transfer all instructions from FromBB to this basic block at ToIt.
const Module * getModule() const
Return the module owning the function this basic block belongs to, or nullptr if the function does no...
void removePredecessor(BasicBlock *Pred, bool KeepOneInputPHIs=false)
Update PHI nodes in this BasicBlock before removal of predecessor Pred.
The address of a basic block.
Conditional or Unconditional Branch instruction.
static BranchInst * Create(BasicBlock *IfTrue, InsertPosition InsertBefore=nullptr)
This class represents a function call, abstracting a target machine's calling convention.
static Constant * getIntToPtr(Constant *C, Type *Ty, bool OnlyIfReduced=false)
This is an important base class in LLVM.
void destroyConstant()
Called if some element of this constant is no longer valid.
A parsed version of the target data layout string in and methods for querying it.
This represents the llvm.dbg.label instruction.
Records a position in IR for a source label (DILabel).
Per-instruction record of debug-info.
Instruction * MarkedInstr
Link back to the Instruction that owns this marker.
void absorbDebugValues(DbgMarker &Src, bool InsertAtHead)
Transfer any DbgRecords from Src into this DbgMarker.
iterator_range< simple_ilist< DbgRecord >::iterator > getDbgRecordRange()
Produce a range over all the DbgRecords in this Marker.
simple_ilist< DbgRecord > StoredDbgRecords
List of DbgRecords, the non-instruction equivalent of llvm.dbg.
void insertDbgRecord(DbgRecord *New, bool InsertAtHead)
Insert a DbgRecord into this DbgMarker, at the end of the list.
Base class for non-instruction debug metadata records that have positions within IR.
This is the common base class for debug info intrinsics for variables.
Record of a variable value-assignment, aka a non instruction representation of the dbg....
void splice(Function::iterator ToIt, Function *FromF)
Transfer all blocks from FromF to this function at ToIt.
bool IsNewDbgInfoFormat
Is this function using intrinsics to record the position of debugging information,...
Function::iterator insert(Function::iterator Position, BasicBlock *BB)
Insert BB in the basic block list at Position.
Module * getParent()
Get the module that this global value is contained inside of...
bool isEHPad() const
Return true if the instruction is a variety of EH-block.
void replaceSuccessorWith(BasicBlock *OldBB, BasicBlock *NewBB)
Replace specified successor OldBB to point at the provided block.
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
bool comesBefore(const Instruction *Other) const
Given an instruction Other in the same basic block as this instruction, return true if this instructi...
void setDebugLoc(DebugLoc Loc)
Set the debug location information for this instruction.
DbgMarker * getTrailingDbgRecords(BasicBlock *B)
void deleteTrailingDbgRecords(BasicBlock *B)
void setTrailingDbgRecords(BasicBlock *B, DbgMarker *M)
This is an important class for using LLVM in a threaded context.
LLVMContextImpl *const pImpl
The landingpad instruction holds all of the information necessary to generate correct exception handl...
StringRef getString() const
A Module instance is used to store all the information related to an LLVM module.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
void replaceIncomingBlockWith(const BasicBlock *Old, BasicBlock *New)
Replace every incoming basic block Old to basic block New.
Return a value (possibly void), from a function.
Value * getReturnValue() const
Convenience accessor. Returns null if there is no return value.
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
static IntegerType * getInt32Ty(LLVMContext &C)
Value * getOperand(unsigned i) const
This class provides a symbol table of name/value pairs.
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
bool hasNUsesOrMore(unsigned N) const
Return true if this value has N uses or more.
Specialization of filter_iterator_base for forward iteration only.
self_iterator getIterator()
BasicBlock * getNextNode()
Get the next node, or nullptr for the list tail.
void splice(iterator where, iplist_impl &L2)
base_list_type::iterator iterator
iterator erase(iterator where)
pointer remove(iterator &IT)
iterator insert(iterator where, pointer New)
A range adaptor for a pair of iterators.
@ C
The default llvm calling convention, compatible with C.
initializer< Ty > init(const Ty &Val)
LocationClass< Ty > location(Ty &L)
This is an optimization pass for GlobalISel generic memory operations.
pred_iterator pred_end(BasicBlock *BB)
auto successors(const MachineBasicBlock *BB)
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
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 hasNItemsOrMore(IterTy &&Begin, IterTy &&End, unsigned N, Pred &&ShouldBeCounted=[](const decltype(*std::declval< IterTy >()) &) { return true;}, std::enable_if_t< !std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< std::remove_reference_t< decltype(Begin)> >::iterator_category >::value, void > *=nullptr)
Return true if the sequence [Begin, End) has N or more items.
pred_iterator pred_begin(BasicBlock *BB)
BasicBlock::iterator skipDebugIntrinsics(BasicBlock::iterator It)
Advance It while it points to a debug instruction and return the result.
bool hasNItems(IterTy &&Begin, IterTy &&End, unsigned N, Pred &&ShouldBeCounted=[](const decltype(*std::declval< IterTy >()) &) { return true;}, std::enable_if_t< !std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< std::remove_reference_t< decltype(Begin)> >::iterator_category >::value, void > *=nullptr)
Return true if the sequence [Begin, End) has exactly N items.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
iterator_range< filter_iterator< detail::IterOfRange< RangeT >, PredicateT > > make_filter_range(RangeT &&Range, PredicateT Pred)
Convenience function that takes a range of elements and a predicate, and return a new filter_iterator...
RNSuccIterator< NodeRef, BlockT, RegionT > succ_begin(NodeRef Node)
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
RNSuccIterator< NodeRef, BlockT, RegionT > succ_end(NodeRef Node)
void invalidateParentIListOrdering(ParentClass *Parent)
Notify basic blocks when an instruction is inserted.
auto predecessors(const MachineBasicBlock *BB)
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
Option to add extra bits to the ilist_iterator.
Option to add a pointer to this list's owner in every node.