LLVM 20.0.0git |
#include "llvm/CodeGen/MachineBasicBlock.h"
Classes | |
class | liveout_iterator |
struct | RegisterMaskPair |
Pair of physical register and lane mask.More... | |
Public Member Functions | |
constBasicBlock * | getBasicBlock ()const |
Return the LLVM basic block that this instance corresponded to originally. | |
void | clearBasicBlock () |
Remove the reference to the underlying IRBasicBlock. | |
bool | hasName ()const |
Check if there is a name of corresponding LLVM basic block. | |
StringRef | getName ()const |
Return the name of the corresponding LLVM basic block, or an empty string. | |
std::string | getFullName ()const |
Return a formatted string to identify this block and its parent function. | |
bool | hasAddressTaken ()const |
Test whether this block is used as something other than the target of a terminator, exception-handling target, or jump table. | |
bool | isMachineBlockAddressTaken ()const |
Test whether this block is used as something other than the target of a terminator, exception-handling target, jump table, or IR blockaddress. | |
bool | isIRBlockAddressTaken ()const |
Test whether this block is the target of an IRBlockAddress. | |
BasicBlock * | getAddressTakenIRBlock ()const |
Retrieves theBasicBlock which corresponds to thisMachineBasicBlock. | |
void | setMachineBlockAddressTaken () |
Set this block to indicate that its address is used as something other than the target of a terminator, exception-handling target, jump table, or IR-level "blockaddress". | |
void | setAddressTakenIRBlock (BasicBlock *BB) |
Set this block to reflect that it corresponds to an IR-level basic block with aBlockAddress. | |
bool | hasLabelMustBeEmitted ()const |
Test whether this block must have its label emitted. | |
void | setLabelMustBeEmitted () |
Set this block to reflect that, regardless how we flow to it, we need its label be emitted. | |
constMachineFunction * | getParent ()const |
Return theMachineFunction containing this basic block. | |
MachineFunction * | getParent () |
unsigned | size ()const |
bool | sizeWithoutDebugLargerThan (unsigned Limit)const |
bool | empty ()const |
MachineInstr & | instr_front () |
MachineInstr & | instr_back () |
constMachineInstr & | instr_front ()const |
constMachineInstr & | instr_back ()const |
MachineInstr & | front () |
MachineInstr & | back () |
constMachineInstr & | front ()const |
constMachineInstr & | back ()const |
instr_iterator | instr_begin () |
const_instr_iterator | instr_begin ()const |
instr_iterator | instr_end () |
const_instr_iterator | instr_end ()const |
reverse_instr_iterator | instr_rbegin () |
const_reverse_instr_iterator | instr_rbegin ()const |
reverse_instr_iterator | instr_rend () |
const_reverse_instr_iterator | instr_rend ()const |
instr_range | instrs () |
const_instr_range | instrs ()const |
iterator | begin () |
const_iterator | begin ()const |
iterator | end () |
const_iterator | end ()const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin ()const |
reverse_iterator | rend () |
const_reverse_iterator | rend ()const |
iterator_range<iterator > | terminators () |
iterator_range<const_iterator > | terminators ()const |
iterator_range<iterator > | phis () |
Returns a range that iterates over the phis in the basic block. | |
iterator_range<const_iterator > | phis ()const |
pred_iterator | pred_begin () |
const_pred_iterator | pred_begin ()const |
pred_iterator | pred_end () |
const_pred_iterator | pred_end ()const |
pred_reverse_iterator | pred_rbegin () |
const_pred_reverse_iterator | pred_rbegin ()const |
pred_reverse_iterator | pred_rend () |
const_pred_reverse_iterator | pred_rend ()const |
unsigned | pred_size ()const |
bool | pred_empty ()const |
succ_iterator | succ_begin () |
const_succ_iterator | succ_begin ()const |
succ_iterator | succ_end () |
const_succ_iterator | succ_end ()const |
succ_reverse_iterator | succ_rbegin () |
const_succ_reverse_iterator | succ_rbegin ()const |
succ_reverse_iterator | succ_rend () |
const_succ_reverse_iterator | succ_rend ()const |
unsigned | succ_size ()const |
bool | succ_empty ()const |
iterator_range<pred_iterator > | predecessors () |
iterator_range<const_pred_iterator > | predecessors ()const |
iterator_range<succ_iterator > | successors () |
iterator_range<const_succ_iterator > | successors ()const |
void | addLiveIn (MCRegister PhysReg,LaneBitmask LaneMask=LaneBitmask::getAll()) |
Adds the specified register as a live in. | |
void | addLiveIn (constRegisterMaskPair &RegMaskPair) |
void | sortUniqueLiveIns () |
Sorts and uniques the LiveIns vector. | |
void | clearLiveIns () |
Clear live in list. | |
void | clearLiveIns (std::vector<RegisterMaskPair > &OldLiveIns) |
Clear the live in list, and return the removed live in's inOldLiveIns . | |
Register | addLiveIn (MCRegister PhysReg,constTargetRegisterClass *RC) |
Add PhysReg as live in to this block, and ensure that there is a copy of PhysReg to a virtual register of class RC. | |
void | removeLiveIn (MCRegisterReg,LaneBitmask LaneMask=LaneBitmask::getAll()) |
Remove the specified register from the live in set. | |
bool | isLiveIn (MCRegisterReg,LaneBitmask LaneMask=LaneBitmask::getAll())const |
Return true if the specified register is in the live in set. | |
livein_iterator | livein_begin_dbg ()const |
Unlike livein_begin, this method does not check that the liveness information is accurate. | |
iterator_range<livein_iterator > | liveins_dbg ()const |
livein_iterator | livein_begin ()const |
livein_iterator | livein_end ()const |
bool | livein_empty ()const |
iterator_range<livein_iterator > | liveins ()const |
livein_iterator | removeLiveIn (livein_iteratorI) |
Remove entry from the livein set and return iterator to the next. | |
const std::vector<RegisterMaskPair > & | getLiveIns ()const |
liveout_iterator | liveout_begin ()const |
Iterator scanning successor basic blocks' liveins to determine the registers potentially live at the end of this block. | |
liveout_iterator | liveout_end ()const |
iterator_range<liveout_iterator > | liveouts ()const |
constuint32_t * | getBeginClobberMask (constTargetRegisterInfo *TRI)const |
Get the clobber mask for the start of this basic block. | |
constuint32_t * | getEndClobberMask (constTargetRegisterInfo *TRI)const |
Get the clobber mask for the end of the basic block. | |
Align | getAlignment ()const |
Return alignment of the basic block. | |
void | setAlignment (AlignA) |
Set alignment of the basic block. | |
void | setAlignment (AlignA,unsigned MaxBytes) |
unsigned | getMaxBytesForAlignment ()const |
Return the maximum amount of padding allowed for aligning the basic block. | |
void | setMaxBytesForAlignment (unsigned MaxBytes) |
Set the maximum amount of padding allowed for aligning the basic block. | |
bool | isEHPad ()const |
Returns true if the block is a landing pad. | |
void | setIsEHPad (bool V=true) |
Indicates the block is a landing pad. | |
bool | hasEHPadSuccessor ()const |
bool | isEntryBlock ()const |
Returns true if this is the entry block of the function. | |
bool | isEHScopeEntry ()const |
Returns true if this is the entry block of an EH scope, i.e., the block that used to have a catchpad or cleanuppad instruction in the LLVM IR. | |
void | setIsEHScopeEntry (bool V=true) |
Indicates if this is the entry block of an EH scope, i.e., the block that that used to have a catchpad or cleanuppad instruction in the LLVM IR. | |
bool | isEHCatchretTarget ()const |
Returns true if this is a target block of a catchret. | |
void | setIsEHCatchretTarget (bool V=true) |
Indicates if this is a target block of a catchret. | |
bool | isEHFuncletEntry ()const |
Returns true if this is the entry block of an EH funclet. | |
void | setIsEHFuncletEntry (bool V=true) |
Indicates if this is the entry block of an EH funclet. | |
bool | isCleanupFuncletEntry ()const |
Returns true if this is the entry block of a cleanup funclet. | |
void | setIsCleanupFuncletEntry (bool V=true) |
Indicates if this is the entry block of a cleanup funclet. | |
bool | isBeginSection ()const |
Returns true if this block begins any section. | |
bool | isEndSection ()const |
Returns true if this block ends any section. | |
void | setIsBeginSection (bool V=true) |
void | setIsEndSection (bool V=true) |
std::optional<UniqueBBID > | getBBID ()const |
MBBSectionID | getSectionID ()const |
Returns the section ID of this basic block. | |
void | setBBID (constUniqueBBID &V) |
Sets the fixed BBID of this basic block. | |
void | setSectionID (MBBSectionID V) |
Sets the section ID for this basic block. | |
MCSymbol * | getEndSymbol ()const |
Returns theMCSymbol marking the end of this basic block. | |
bool | mayHaveInlineAsmBr ()const |
Returns true if this block may have an INLINEASM_BR (overestimate, by checking if any of the successors are indirect targets of any inlineasm_br in the function). | |
bool | isInlineAsmBrIndirectTarget ()const |
Returns true if this is the indirect dest of an INLINEASM_BR. | |
void | setIsInlineAsmBrIndirectTarget (bool V=true) |
Indicates if this is the indirect dest of an INLINEASM_BR. | |
bool | isLegalToHoistInto ()const |
Returns true if it is legal to hoist instructions into this block. | |
void | moveBefore (MachineBasicBlock *NewAfter) |
Move 'this' block before or after the specified block. | |
void | moveAfter (MachineBasicBlock *NewBefore) |
bool | sameSection (constMachineBasicBlock *MBB)const |
Returns true if this and MBB belong to the same section. | |
void | updateTerminator (MachineBasicBlock *PreviousLayoutSuccessor) |
Update the terminator instructions in block to account for changes to block layout which may have been made. | |
void | addSuccessor (MachineBasicBlock *Succ,BranchProbability Prob=BranchProbability::getUnknown()) |
Add Succ as a successor of thisMachineBasicBlock. | |
void | addSuccessorWithoutProb (MachineBasicBlock *Succ) |
Add Succ as a successor of thisMachineBasicBlock. | |
void | setSuccProbability (succ_iteratorI,BranchProbability Prob) |
Set successor probability of a given iterator. | |
void | normalizeSuccProbs () |
Normalize probabilities of all successors so that the sum of them becomes one. | |
void | validateSuccProbs ()const |
Validate successors' probabilities and check if the sum of them is approximate one. | |
void | removeSuccessor (MachineBasicBlock *Succ,bool NormalizeSuccProbs=false) |
Remove successor from the successors list of thisMachineBasicBlock. | |
succ_iterator | removeSuccessor (succ_iteratorI,bool NormalizeSuccProbs=false) |
Remove specified successor from the successors list of thisMachineBasicBlock. | |
void | replaceSuccessor (MachineBasicBlock *Old,MachineBasicBlock *New) |
Replace successor OLD with NEW and update probability info. | |
void | copySuccessor (constMachineBasicBlock *Orig,succ_iteratorI) |
Copy a successor (and any probability info) from original block to this block's. | |
void | splitSuccessor (MachineBasicBlock *Old,MachineBasicBlock *New,bool NormalizeSuccProbs=false) |
Split the old successor into old plus new and updates the probability info. | |
void | transferSuccessors (MachineBasicBlock *FromMBB) |
Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors FromMBB and remove all the successors from FromMBB). | |
void | transferSuccessorsAndUpdatePHIs (MachineBasicBlock *FromMBB) |
Transfers all the successors, as in transferSuccessors, and update PHI operands in the successor blocks which refer to FromMBB to refer to this. | |
bool | hasSuccessorProbabilities ()const |
Return true if any of the successors have probabilities attached to them. | |
bool | isPredecessor (constMachineBasicBlock *MBB)const |
Return true if the specified MBB is a predecessor of this block. | |
bool | isSuccessor (constMachineBasicBlock *MBB)const |
Return true if the specified MBB is a successor of this block. | |
bool | isLayoutSuccessor (constMachineBasicBlock *MBB)const |
Return true if the specified MBB will be emitted immediately after this block, such that if this block exits by falling through, control will transfer to the specified MBB. | |
constMachineBasicBlock * | getSingleSuccessor ()const |
Return the successor of this block if it has a single successor. | |
MachineBasicBlock * | getSingleSuccessor () |
constMachineBasicBlock * | getSinglePredecessor ()const |
Return the predecessor of this block if it has a single predecessor. | |
MachineBasicBlock * | getSinglePredecessor () |
MachineBasicBlock * | getFallThrough (bool JumpToFallThrough=true) |
Return the fallthrough block if the block can implicitly transfer control to the block after it by falling off the end of it. | |
MachineBasicBlock * | getLogicalFallThrough () |
Return the fallthrough block if the block can implicitly transfer control to it's successor, whether by a branch or a fallthrough. | |
bool | canFallThrough () |
Return true if the block can implicitly transfer control to the block after it by falling off the end of it. | |
iterator | getFirstNonPHI () |
Returns a pointer to the first instruction in this block that is not aPHINode instruction. | |
const_iterator | getFirstNonPHI ()const |
iterator | SkipPHIsAndLabels (iteratorI) |
Return the first instruction in MBB after I that is not a PHI or a label. | |
iterator | SkipPHIsLabelsAndDebug (iteratorI,RegisterReg=Register(),bool SkipPseudoOp=true) |
Return the first instruction in MBB after I that is not a PHI, label or debug. | |
iterator | getFirstTerminator () |
Returns an iterator to the first terminator instruction of this basic block. | |
const_iterator | getFirstTerminator ()const |
instr_iterator | getFirstInstrTerminator () |
Same getFirstTerminator but it ignores bundles and return an instr_iterator instead. | |
iterator | getFirstTerminatorForward () |
Finds the first terminator in a block by scanning forward. | |
iterator | getFirstNonDebugInstr (bool SkipPseudoOp=true) |
Returns an iterator to the first non-debug instruction in the basic block, orend(). | |
const_iterator | getFirstNonDebugInstr (bool SkipPseudoOp=true)const |
iterator | getLastNonDebugInstr (bool SkipPseudoOp=true) |
Returns an iterator to the last non-debug instruction in the basic block, orend(). | |
const_iterator | getLastNonDebugInstr (bool SkipPseudoOp=true)const |
bool | isReturnBlock ()const |
Convenience function that returns true if the block ends in a return instruction. | |
bool | isEHScopeReturnBlock ()const |
Convenience function that returns true if the bock ends in a EH scope return instruction. | |
MachineBasicBlock * | splitAt (MachineInstr &SplitInst,bool UpdateLiveIns=true,LiveIntervals *LIS=nullptr) |
Split a basic block into 2 pieces atSplitPoint . | |
MachineBasicBlock * | SplitCriticalEdge (MachineBasicBlock *Succ,Pass &P, std::vector<SparseBitVector<> > *LiveInSets=nullptr,MachineDomTreeUpdater *MDTU=nullptr) |
Split the critical edge from this block to the given successor block, and return the newly created block, or null if splitting is not possible. | |
MachineBasicBlock * | SplitCriticalEdge (MachineBasicBlock *Succ,MachineFunctionAnalysisManager &MFAM, std::vector<SparseBitVector<> > *LiveInSets=nullptr,MachineDomTreeUpdater *MDTU=nullptr) |
MachineBasicBlock * | SplitCriticalEdge (MachineBasicBlock *Succ,Pass *P,MachineFunctionAnalysisManager *MFAM, std::vector<SparseBitVector<> > *LiveInSets,MachineDomTreeUpdater *MDTU) |
bool | canSplitCriticalEdge (constMachineBasicBlock *Succ)const |
Check if the edge between this block and the given successorSucc , can be split. | |
void | pop_front () |
void | pop_back () |
void | push_back (MachineInstr *MI) |
instr_iterator | insert (instr_iteratorI,MachineInstr *M) |
Insert MI into the instruction list before I, possibly inside a bundle. | |
template<typenameIT > | |
void | insert (iteratorI,IT S,ITE) |
Insert a range of instructions into the instruction list before I. | |
iterator | insert (iteratorI,MachineInstr *MI) |
Insert MI into the instruction list before I. | |
iterator | insertAfter (iteratorI,MachineInstr *MI) |
Insert MI into the instruction list after I. | |
instr_iterator | insertAfterBundle (instr_iteratorI,MachineInstr *MI) |
If I is bundled then insert MI into the instruction list after the end of the bundle, otherwise insert MI immediately after I. | |
instr_iterator | erase (instr_iteratorI) |
Remove an instruction from the instruction list and delete it. | |
instr_iterator | erase_instr (MachineInstr *I) |
Remove an instruction from the instruction list and delete it. | |
iterator | erase (iteratorI,iteratorE) |
Remove a range of instructions from the instruction list and delete them. | |
iterator | erase (iteratorI) |
Remove an instruction or bundle from the instruction list and delete it. | |
iterator | erase (MachineInstr *I) |
Remove an instruction from the instruction list and delete it. | |
MachineInstr * | remove (MachineInstr *I) |
Remove the unbundled instruction from the instruction list without deleting it. | |
MachineInstr * | remove_instr (MachineInstr *I) |
Remove the possibly bundled instruction from the instruction list without deleting it. | |
void | clear () |
void | splice (iterator Where,MachineBasicBlock *Other,iteratorFrom) |
Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before 'Where'. | |
void | splice (iterator Where,MachineBasicBlock *Other,iteratorFrom,iterator To) |
Take a block of instructions from MBB 'Other' in the range [From, To), and insert them into this MBB right before 'Where'. | |
MachineBasicBlock * | removeFromParent () |
This method unlinks 'this' from the containing function, and returns it, but does not delete it. | |
void | eraseFromParent () |
This method unlinks 'this' from the containing function and deletes it. | |
void | ReplaceUsesOfBlockWith (MachineBasicBlock *Old,MachineBasicBlock *New) |
Given a machine basic block that branched to 'Old', change the code and CFG so that it branches to 'New' instead. | |
void | replacePhiUsesWith (MachineBasicBlock *Old,MachineBasicBlock *New) |
Update all phi nodes in this basic block to refer to basic blockNew instead of basic blockOld . | |
DebugLoc | findDebugLoc (instr_iteratorMBBI) |
Find the next validDebugLoc starting at MBBI, skipping any debug instructions. | |
DebugLoc | findDebugLoc (iteratorMBBI) |
DebugLoc | rfindDebugLoc (reverse_instr_iteratorMBBI) |
Has exact same behavior asfindDebugLoc (it also searches towards the end of this MBB) except that this function takes a reverse iterator to identify the starting MI. | |
DebugLoc | rfindDebugLoc (reverse_iteratorMBBI) |
DebugLoc | findPrevDebugLoc (instr_iteratorMBBI) |
Find the previous validDebugLoc preceding MBBI, skipping any debug instructions. | |
DebugLoc | findPrevDebugLoc (iteratorMBBI) |
DebugLoc | rfindPrevDebugLoc (reverse_instr_iteratorMBBI) |
Has exact same behavior asfindPrevDebugLoc (it also searches towards the beginning of this MBB) except that this function takes reverse iterator to identify the starting MI. | |
DebugLoc | rfindPrevDebugLoc (reverse_iteratorMBBI) |
DebugLoc | findBranchDebugLoc () |
Find and return the mergedDebugLoc of the branch instructions of the block. | |
LivenessQueryResult | computeRegisterLiveness (constTargetRegisterInfo *TRI,MCRegisterReg,const_iteratorBefore,unsigned Neighborhood=10)const |
Return whether (physical) registerReg has been defined and not killed as of just beforeBefore . | |
void | dump ()const |
void | print (raw_ostream &OS,constSlotIndexes *=nullptr,bool IsStandalone=true)const |
void | print (raw_ostream &OS,ModuleSlotTracker &MST,constSlotIndexes *=nullptr,bool IsStandalone=true)const |
void | printName (raw_ostream &os,unsigned printNameFlags=PrintNameIr,ModuleSlotTracker *moduleSlotTracker=nullptr)const |
Print the basic block's name as: | |
void | printAsOperand (raw_ostream &OS,bool PrintType=true)const |
int | getNumber ()const |
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in aMachineFunction yet, in which case this will return -1. | |
void | setNumber (intN) |
unsigned | getCallFrameSize ()const |
Return the call frame size on entry to this basic block. | |
void | setCallFrameSize (unsignedN) |
Set the call frame size on entry to this basic block. | |
MCSymbol * | getSymbol ()const |
Return theMCSymbol for this basic block. | |
MCSymbol * | getEHCatchretSymbol ()const |
Return the EHCatchret Symbol for this basic block. | |
std::optional<uint64_t > | getIrrLoopHeaderWeight ()const |
void | setIrrLoopHeaderWeight (uint64_t Weight) |
BranchProbability | getSuccProbability (const_succ_iterator Succ)const |
Return probability of the edge from this block to MBB. | |
![]() | |
MachineBasicBlock * | getPrevNode () |
constMachineBasicBlock * | getPrevNode ()const |
Get the previous node, ornullptr for the list head. | |
MachineBasicBlock * | getNextNode () |
Get the next node, ornullptr for the list tail. | |
constMachineBasicBlock * | getNextNode ()const |
Get the next node, ornullptr for the list tail. | |
![]() | |
self_iterator | getIterator () |
const_self_iterator | getIterator ()const |
reverse_self_iterator | getReverseIterator () |
const_reverse_self_iterator | getReverseIterator ()const |
bool | isSentinel ()const |
Check whether this is the sentinel node. | |
![]() | |
const ParentTy * | getParent ()const |
ParentTy * | getParent () |
void | setParent (ParentTy *Parent) |
Static Public Member Functions | |
staticInstructions MachineBasicBlock::* | getSublistAccess (MachineInstr *) |
Support forMachineInstr::getNextNode(). | |
Friends | |
class | MachineFunction |
class | MachineBranchProbabilityInfo |
class | MIPrinter |
struct | ilist_callback_traits< MachineBasicBlock > |
Definition at line124 of fileMachineBasicBlock.h.
Definition at line315 of fileMachineBasicBlock.h.
Definition at line349 of fileMachineBasicBlock.h.
Definition at line320 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::const_pred_iterator =SmallVectorImpl<MachineBasicBlock *>::const_iterator |
Definition at line392 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::const_pred_reverse_iterator =SmallVectorImpl<MachineBasicBlock *>::const_reverse_iterator |
Definition at line399 of fileMachineBasicBlock.h.
Definition at line317 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::const_reverse_iterator =MachineInstrBundleIterator<constMachineInstr,true> |
Definition at line322 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::const_succ_iterator =SmallVectorImpl<MachineBasicBlock *>::const_iterator |
Definition at line395 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::const_succ_reverse_iterator =SmallVectorImpl<MachineBasicBlock *>::const_reverse_iterator |
Definition at line403 of fileMachineBasicBlock.h.
Definition at line314 of fileMachineBasicBlock.h.
Definition at line348 of fileMachineBasicBlock.h.
Definition at line319 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::livein_iterator = LiveInVector::const_iterator |
Definition at line491 of fileMachineBasicBlock.h.
Definition at line391 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::pred_reverse_iterator =SmallVectorImpl<MachineBasicBlock *>::reverse_iterator |
Definition at line397 of fileMachineBasicBlock.h.
Definition at line316 of fileMachineBasicBlock.h.
Definition at line321 of fileMachineBasicBlock.h.
Definition at line394 of fileMachineBasicBlock.h.
usingllvm::MachineBasicBlock::succ_reverse_iterator =SmallVectorImpl<MachineBasicBlock *>::reverse_iterator |
Definition at line401 of fileMachineBasicBlock.h.
Possible outcome of a register liveness query tocomputeRegisterLiveness()
Enumerator | |
---|---|
LQR_Live | Register is known to be (at least partially) live. |
LQR_Dead | Register is known to be fully dead. |
LQR_Unknown | Register liveness not decidable from local neighborhood. |
Definition at line1178 of fileMachineBasicBlock.h.
Enumerator | |
---|---|
PrintNameIr | Add IR name where available. |
PrintNameAttributes | Print attributes. |
Definition at line1204 of fileMachineBasicBlock.h.
| inline |
Definition at line460 of fileMachineBasicBlock.h.
Register MachineBasicBlock::addLiveIn | ( | MCRegister | PhysReg, |
constTargetRegisterClass * | RC | ||
) |
Add PhysReg as live in to this block, and ensure that there is a copy of PhysReg to a virtual register of class RC.
Return the virtual register that is a copy of the live in PhysReg.
Definition at line645 of fileMachineBasicBlock.cpp.
ReferencesaddLiveIn(),llvm::MachineInstrBuilder::addReg(),assert(),begin(),llvm::BuildMI(),end(),front(),llvm::TargetSubtargetInfo::getInstrInfo(),getParent(),llvm::MachineFunction::getRegInfo(),llvm::MachineFunction::getSubtarget(),I,isEHPad(),isLiveIn(),llvm::MCRegister::isPhysical(),llvm::RegState::Kill,llvm_unreachable,MRI,SkipPHIsAndLabels(), andTII.
| inline |
Adds the specified register as a live in.
Note that it is an error to add the same register to the same set more than once unless the intention is to call sortUniqueLiveIns after all registers are added.
Definition at line456 of fileMachineBasicBlock.h.
Referenced byaddLiveIn(),addLiveInRegs(),llvm::addLiveIns(),addSavedGPR(),llvm::X86FrameLowering::adjustForHiPEPrologue(),llvm::X86FrameLowering::adjustForSegmentedStacks(),buildGitPtr(),llvm::AArch64InstrInfo::buildOutlinedFrame(),llvm::ARMBaseInstrInfo::buildOutlinedFrame(),llvm::RISCVInstrInfo::buildOutlinedFrame(),emitAlignedDPRCS2Spills(),llvm::SIFrameLowering::emitCSRSpillStores(),llvm::SIFrameLowering::emitEntryFunctionPrologue(),llvm::SparcFrameLowering::emitEpilogue(),llvm::AArch64TargetLowering::EmitF128CSEL(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::X86TargetLowering::EmitInstrWithCustomInserter(),llvm::MachineRegisterInfo::EmitLiveInCopies(),llvm::AArch64FrameLowering::emitPrologue(),llvm::MipsSEFrameLowering::emitPrologue(),llvm::SystemZXPLINKFrameLowering::emitPrologue(),llvm::X86FrameLowering::emitPrologue(),llvm::XCoreFrameLowering::emitPrologue(),emitShadowCallStackPrologue(),emitXBegin(),llvm::getFunctionLiveInPhysReg(),handleMustTailForwardedRegisters(),llvm::MipsFunctionInfo::initGlobalBaseReg(),INITIALIZE_PASS(),llvm::AArch64InstrInfo::insertOutlinedCall(),llvm::ARMBaseInstrInfo::insertOutlinedCall(),llvm::MipsCallLowering::lowerFormalArguments(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(),pushRegsToStack(),llvm::IRTranslator::runOnMachineFunction(),llvm::SystemZELFFrameLowering::spillCalleeSavedRegisters(),llvm::SystemZXPLINKFrameLowering::spillCalleeSavedRegisters(),llvm::AArch64FrameLowering::spillCalleeSavedRegisters(),llvm::M68kFrameLowering::spillCalleeSavedRegisters(),llvm::Mips16FrameLowering::spillCalleeSavedRegisters(),llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(),llvm::MSP430FrameLowering::spillCalleeSavedRegisters(),llvm::PPCFrameLowering::spillCalleeSavedRegisters(),llvm::RISCVFrameLowering::spillCalleeSavedRegisters(),llvm::X86FrameLowering::spillCalleeSavedRegisters(),llvm::XCoreFrameLowering::spillCalleeSavedRegisters(),llvm::XtensaFrameLowering::spillCalleeSavedRegisters(),SplitCriticalEdge(),splitEdge(),tryToSplitRestore(),updateLiveIn(), andupdateLiveness().
void MachineBasicBlock::addSuccessor | ( | MachineBasicBlock * | Succ, |
BranchProbability | Prob =BranchProbability::getUnknown() | ||
) |
Add Succ as a successor of thisMachineBasicBlock.
The Predecessors list of Succ is automatically updated. PROB parameter is stored in Probabilities list. The default probability is set as unknown. Mixing known and unknown probabilities in successor list is not allowed. When all successors have unknown probabilities, 1 / N is returned as the probability for each successor, where N is the number of successors.
Note that duplicate Machine CFG edges are not allowed.
Definition at line798 of fileMachineBasicBlock.cpp.
Referenced byllvm::X86FrameLowering::adjustForHiPEPrologue(),llvm::ARMFrameLowering::adjustForSegmentedStacks(),llvm::X86FrameLowering::adjustForSegmentedStacks(),copySuccessor(),createDedicatedExit(),llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(),llvm::PPCTargetLowering::EmitAtomicBinary(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::PPCTargetLowering::emitEHSjLjSetJmp(),llvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(),llvm::AArch64TargetLowering::EmitF128CSEL(),emitFROUND(),llvm::SITargetLowering::EmitInstrWithCustomInserter(),llvm::BPFTargetLowering::EmitInstrWithCustomInserter(),llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::AVRTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(),EmitLoweredCascadedSelect(),llvm::PPCTargetLowering::EmitPartwordAtomicBinary(),llvm::PPCTargetLowering::emitProbedAlloca(),emitReadCounterWidePseudo(),emitSelectPseudo(),llvm::MSP430TargetLowering::EmitShiftInstr(),llvm::VETargetLowering::emitSjLjDispatchBlock(),emitStackProbeInline(),emitVecCondBranchPseudo(),emitXBegin(),llvm::AMDGPURegisterBankInfo::executeInWaterfallLoop(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::SparcTargetLowering::expandSelectCC(),llvm::FastISel::fastEmitBranch(),llvm::FastISel::finishCondBranch(),INITIALIZE_PASS(),llvm::PPCFrameLowering::inlineStackProbe(),llvm::SystemZELFFrameLowering::inlineStackProbe(),llvm::SystemZXPLINKFrameLowering::inlineStackProbe(),insertDivByZeroTrap(),llvm::SIInstrInfo::insertSimulatedTrap(),llvm::AMDGPULegalizerInfo::legalizeTrapEndpgm(),loadM0FromVGPR(),loadMBUFScalarOperandsFromVGPR(),LowerFPToInt(),LowerMemcpy(),LowerMemset(),llvm::PeelSingleBlockLoop(),llvm::AArch64InstrInfo::probedStackAlloc(),llvm::TargetInstrInfo::ReplaceTailWithBranchTo(),llvm::ARMBlockPlacement::revertWhileToDoLoop(),splitAt(),splitBlockForLoop(),SplitCriticalEdge(),splitEdge(),splitMBB(),splitSuccessor(),transferSuccessors(),transferSuccessorsAndUpdatePHIs(),tryToSplitRestore(), andllvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
void MachineBasicBlock::addSuccessorWithoutProb | ( | MachineBasicBlock * | Succ | ) |
Add Succ as a successor of thisMachineBasicBlock.
The Predecessors list of Succ is automatically updated. The probability is not provided because BPI is not available (e.g. -O0 is used), in which case edge probabilities won't be used. Using this interface can save some space.
Definition at line808 of fileMachineBasicBlock.cpp.
Referenced bycopySuccessor(),llvm::FastISel::fastEmitBranch(),llvm::FastISel::finishCondBranch(),transferSuccessors(), andtransferSuccessorsAndUpdatePHIs().
| inline |
Definition at line335 of fileMachineBasicBlock.h.
Referencesend().
Referenced byllvm::ARMBaseInstrInfo::analyzeBranch(),BBIsJumpedOver(),bbIsJumpedOver(),blockEndsInUnreachable(),llvm::calculateDbgEntityHistory(),cannotInsertTailCall(),llvm::ARMBasicBlockUtils::computeBlockSize(),getBBAddrMapMetadata(),getFallThrough(),llvm::XtensaInstrInfo::insertIndirectBranch(),llvm::LoongArchInstrInfo::insertIndirectBranch(),llvm::RISCVInstrInfo::insertIndirectBranch(),isEHScopeReturnBlock(),llvm::ARMBaseInstrInfo::isMBBSafeToOutlineFrom(),isReturnBlock(),ProfitableToMerge(),llvm::HexagonInstrInfo::removeBranch(),llvm::ARMBlockPlacement::revertWhileToDoLoop(),llvm::TailDuplicator::shouldTailDuplicate(), andllvm::FastISel::startNewBlock().
| inline |
Definition at line337 of fileMachineBasicBlock.h.
Referencesend().
| inline |
Definition at line355 of fileMachineBasicBlock.h.
Referencesinstr_begin().
Referenced byaddLiveIn(),llvm::LiveVariables::addNewBlock(),addUnreachableAfterTryTables(),llvm::R600InstrInfo::analyzeBranch(),llvm::ARCInstrInfo::analyzeBranch(),llvm::BPFInstrInfo::analyzeBranch(),llvm::MSP430InstrInfo::analyzeBranch(),llvm::NVPTXInstrInfo::analyzeBranch(),llvm::PPCInstrInfo::analyzeBranch(),llvm::SystemZInstrInfo::analyzeBranch(),llvm::XCoreInstrInfo::analyzeBranch(),llvm::XtensaInstrInfo::analyzeBranch(),llvm::AArch64InstrInfo::analyzeBranch(),llvm::SparcInstrInfo::analyzeBranch(),llvm::VEInstrInfo::analyzeBranch(),llvm::LanaiInstrInfo::analyzeBranch(),llvm::avoidZeroOffsetLandingPad(),bothUsedInPHI(),llvm::AArch64InstrInfo::buildOutlinedFrame(),llvm::ARMBaseInstrInfo::buildOutlinedFrame(),llvm::RISCVInstrInfo::buildOutlinedFrame(),llvm::GCNDownwardRPTracker::bumpDownwardPressure(),llvm::ErrataWorkaround::checkSeqTN0010(),llvm::ErrataWorkaround::checkSeqTN0010First(),llvm::ErrataWorkaround::checkSeqTN0012(),cloneCfiPrologue(),computeRegisterLiveness(),copyDebugInfoToSuccessor(),CountTerminators(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(),llvm::SIInstrInfo::createPHIDestinationCopy(),createPHIsForCMOVsInSinkBB(),createPHIsForSelects(),llvm::MachineDominatorTree::dominates(),dominates(),llvm::M68kFrameLowering::eliminateCallFramePseudoInstr(),llvm::X86FrameLowering::eliminateCallFramePseudoInstr(),llvm::PPCTargetLowering::EmitAtomicBinary(),llvm::LiveDebugVariables::LDVImpl::emitDebugValues(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::PPCTargetLowering::emitEHSjLjSetJmp(),llvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(),llvm::SIFrameLowering::emitEntryFunctionPrologue(),llvm::AArch64FrameLowering::emitEpilogue(),llvm::ARMFrameLowering::emitEpilogue(),llvm::Thumb1FrameLowering::emitEpilogue(),llvm::M68kFrameLowering::emitEpilogue(),llvm::MSP430FrameLowering::emitEpilogue(),llvm::RISCVFrameLowering::emitEpilogue(),llvm::X86FrameLowering::emitEpilogue(),llvm::AArch64TargetLowering::EmitF128CSEL(),emitFROUND(),llvm::AsmPrinter::emitFunctionBody(),emitGPDisp(),llvm::BPFTargetLowering::EmitInstrWithCustomInserter(),llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::AVRTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(),llvm::MachineRegisterInfo::EmitLiveInCopies(),emitLoadM0FromVGPRLoop(),emitLoadScalarOpsFromVGPRLoop(),EmitLoweredCascadedSelect(),emitLpad(),llvm::PPCTargetLowering::EmitPartwordAtomicBinary(),llvm::XtensaFrameLowering::emitPrologue(),llvm::AArch64FrameLowering::emitPrologue(),llvm::SIFrameLowering::emitPrologue(),llvm::ARCFrameLowering::emitPrologue(),llvm::ARMFrameLowering::emitPrologue(),llvm::Thumb1FrameLowering::emitPrologue(),llvm::CSKYFrameLowering::emitPrologue(),llvm::LanaiFrameLowering::emitPrologue(),llvm::LoongArchFrameLowering::emitPrologue(),llvm::M68kFrameLowering::emitPrologue(),llvm::Mips16FrameLowering::emitPrologue(),llvm::MipsSEFrameLowering::emitPrologue(),llvm::MSP430FrameLowering::emitPrologue(),llvm::NVPTXFrameLowering::emitPrologue(),llvm::PPCFrameLowering::emitPrologue(),llvm::RISCVFrameLowering::emitPrologue(),llvm::SparcFrameLowering::emitPrologue(),llvm::SystemZELFFrameLowering::emitPrologue(),llvm::SystemZXPLINKFrameLowering::emitPrologue(),llvm::VEFrameLowering::emitPrologue(),llvm::WebAssemblyFrameLowering::emitPrologue(),llvm::X86FrameLowering::emitPrologue(),llvm::XCoreFrameLowering::emitPrologue(),emitReadCounterWidePseudo(),llvm::ScheduleDAGSDNodes::EmitSchedule(),emitSelectPseudo(),llvm::MSP430TargetLowering::EmitShiftInstr(),emitVecCondBranchPseudo(),emitXBegin(),ensureEntrySetPrio(),llvm::RegScavenger::enterBasicBlock(),llvm::AMDGPURegisterBankInfo::executeInWaterfallLoop(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::AArch64InstrInfo::expandPostRAPseudo(),llvm::SparcTargetLowering::expandSelectCC(),llvm::SPIRVTargetLowering::finalizeLowering(),llvm::WebAssembly::findCatch(),llvm::findCMPToFoldIntoCBZ(),findFirstPredicateSetterFrom(),findHoistingInsertPosAndDeps(),findIncDecBefore(),findInsertLocation(),llvm::findPHICopyInsertPoint(),llvm::findSplitPointForStackProtector(),findSurvivorBackwards(),TransferTracker::flushDbgValues(),llvm::SystemZInstrInfo::foldMemoryOperandImpl(),generateAssignInstrs(),llvm::rdf::Liveness::getAllReachingDefs(),getEarliestInsertPos(),getFirstNonDebugInstr(),getFirstTerminator(),llvm::getFunctionLiveInPhysReg(),llvm::CSKYInstrInfo::getGlobalBaseReg(),llvm::SparcInstrInfo::getGlobalBaseReg(),llvm::VEInstrInfo::getGlobalBaseReg(),llvm::ARMHazardRecognizerFPMLx::getHazardType(),llvm::getInsertPtValidEnd(),getLatestInsertPos(),getNextMachineInstr(),llvm::ARMBasicBlockUtils::getOffsetOf(),llvm::getOpVariableMBBIt(),llvm::SITargetLowering::getPrefLoopAlignment(),getPreviousInstr(),llvm::RISCVRegisterInfo::getRegAllocationHints(),llvm::PhiLoweringHelper::getSaluInsertionAtEnd(),getSchedRegions(),llvm::WindowScheduler::getScheduleRange(),llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(),indirectCopyToAGPR(),llvm::MipsFunctionInfo::initGlobalBaseReg(),INITIALIZE_PASS(),initMBBRange(),llvm::PPCFrameLowering::inlineStackProbe(),llvm::SystemZELFFrameLowering::inlineStackProbe(),llvm::SystemZXPLINKFrameLowering::inlineStackProbe(),insertCSRRestores(),insertCSRSaves(),insertSEHRange(),insertSpeculationBarrier(),isConvertibleToVMV_V_V(),isEFLAGSLive(),jumpTableFollowsTB(),llvm::SplitEditor::leaveIntvAtTop(),llvm::FastISel::leaveLocalValueArea(),TransferTracker::loadInlocs(),loadM0FromVGPR(),loadMBUFScalarOperandsFromVGPR(),LookForIdenticalPHI(),llvm::AMDGPUCallLowering::lowerFormalArguments(),llvm::AArch64CallLowering::lowerFormalArguments(),llvm::ARMCallLowering::lowerFormalArguments(),llvm::X86CallLowering::lowerFormalArguments(),LowerFPToInt(),LowerMemcpy(),LowerMemset(),llvm::CombinerHelper::matchOptBrCondByInvertingCond(),llvm::AArch64RegisterInfo::materializeFrameBaseRegister(),llvm::SIRegisterInfo::materializeFrameBaseRegister(),llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(),llvm::PPCRegisterInfo::materializeFrameBaseRegister(),llvm::RISCVRegisterInfo::materializeFrameBaseRegister(),llvm::M68kFrameLowering::mergeSPUpdates(),llvm::X86FrameLowering::mergeSPUpdates(),llvm::ARMBaseInstrInfo::optimizeCompareInstr(),llvm::LanaiInstrInfo::optimizeCompareInstr(),llvm::PPCInstrInfo::optimizeCompareInstr(),llvm::PeelingModuloScheduleExpander::peelKernel(),llvm::PeelSingleBlockLoop(),phis(),llvm::WindowScheduler::preProcess(),PrevCrossBBInst(),llvm::AArch64InstrInfo::probedStackAlloc(),llvm::AArch64FrameLowering::processFunctionBeforeFrameFinalized(),ProfitableToMerge(),llvm::RegPressureTracker::recede(),llvm::RegPressureTracker::recedeSkipDebugValues(),llvm::AArch64InstrInfo::removeBranch(),llvm::R600InstrInfo::removeBranch(),llvm::ARCInstrInfo::removeBranch(),llvm::ARMBaseInstrInfo::removeBranch(),llvm::BPFInstrInfo::removeBranch(),llvm::CSKYInstrInfo::removeBranch(),llvm::HexagonInstrInfo::removeBranch(),llvm::LanaiInstrInfo::removeBranch(),llvm::LoongArchInstrInfo::removeBranch(),llvm::M68kInstrInfo::removeBranch(),llvm::MSP430InstrInfo::removeBranch(),llvm::NVPTXInstrInfo::removeBranch(),llvm::PPCInstrInfo::removeBranch(),llvm::RISCVInstrInfo::removeBranch(),llvm::SparcInstrInfo::removeBranch(),llvm::SystemZInstrInfo::removeBranch(),llvm::VEInstrInfo::removeBranch(),llvm::X86InstrInfo::removeBranch(),llvm::XCoreInstrInfo::removeBranch(),llvm::XtensaInstrInfo::removeBranch(),llvm::SlotIndexes::repairIndexesInRange(),llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(),llvm::LiveIntervals::repairIntervalsInRange(),llvm::X86InstrInfo::replaceBranchWithTailCall(),llvm::PPCFrameLowering::replaceFPWithRealFP(),llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(),rescheduleCanonically(),llvm::AArch64FrameLowering::resetCFIToInitialState(),llvm::CSKYFrameLowering::restoreCalleeSavedRegisters(),llvm::PPCFrameLowering::restoreCalleeSavedRegisters(),llvm::RISCVFrameLowering::restoreCalleeSavedRegisters(),llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(),llvm::WindowScheduler::restoreTripleMBB(),llvm::X86FrameLowering::restoreWinEHStackPointersInParent(),rollbackRestoreSplit(),runImpl(),llvm::SelectionDAGISel::runOnMachineFunction(),llvm::CFIFixup::runOnMachineFunction(),llvm::IRTranslator::runOnMachineFunction(),llvm::InsertNOPLoad::runOnMachineFunction(),llvm::FixAllFDIVSQRT::runOnMachineFunction(),scavengeFrameVirtualRegsInBlock(),signOutlinedFunction(),sizeWithoutDebugLargerThan(),skipBackwardPastNonInstructions(),llvm::X86FrameLowering::spillFPBP(),splitAt(),llvm::SystemZ::splitBlockAfter(),llvm::SystemZ::splitBlockBefore(),splitBlockForLoop(),splitEndLoopBB(),llvm::WindowScheduler::updateLiveIntervals(),llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(),verifyCTRBranch(),llvm::MemorySSA::verifyOrderingDominationAndDefUses(), andVerifyPHIs().
| inline |
Definition at line356 of fileMachineBasicBlock.h.
Referencesinstr_begin().
bool MachineBasicBlock::canFallThrough | ( | ) |
Return true if the block can implicitly transfer control to the block after it by falling off the end of it.
This should return false if it can reach the block after it, but it uses an explicit branch to do so (e.g., a table jump). True is a conservative answer.
Definition at line1021 of fileMachineBasicBlock.cpp.
ReferencesgetFallThrough().
Referenced byAlignBlocks(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),isImplicitFallthrough(),ProfitableToMerge(), andllvm::TailDuplicator::shouldTailDuplicate().
bool MachineBasicBlock::canSplitCriticalEdge | ( | constMachineBasicBlock * | Succ | ) | const |
Check if the edge between this block and the given successorSucc
, can be split.
If this returns true a subsequent call to SplitCriticalEdge is guaranteed to return a valid basic block if no changes occurred in the meantime.
Definition at line1384 of fileMachineBasicBlock.cpp.
Referencesllvm::HexagonInstrInfo::analyzeBranch(),Cond,llvm::dbgs(),findJumpTableIndex(),llvm::TargetSubtargetInfo::getInstrInfo(),getParent(),llvm::MachineFunction::getSubtarget(),llvm::MachineFunction::getTarget(),isEHPad(),isInlineAsmBrIndirectTarget(),jumpTableHasOtherUses(),LLVM_DEBUG,llvm::printMBBReference(),llvm::TargetMachine::requiresStructuredCFG(),TBB, andTII.
Referenced bySplitCriticalEdge().
| inline |
Definition at line1101 of fileMachineBasicBlock.h.
Referenced byllvm::InstructionSelect::selectMachineFunction(), andllvm::TailDuplicator::tailDuplicateAndUpdate().
| inline |
Remove the reference to the underlying IRBasicBlock.
This is for reduction tools and should generally not be used.
Definition at line260 of fileMachineBasicBlock.h.
void MachineBasicBlock::clearLiveIns | ( | ) |
Clear live in list.
Definition at line1743 of fileMachineBasicBlock.cpp.
Referenced byllvm::recomputeLiveIns().
void MachineBasicBlock::clearLiveIns | ( | std::vector<RegisterMaskPair > & | OldLiveIns | ) |
Clear the live in list, and return the removed live in's inOldLiveIns
.
Requires that the vectorOldLiveIns
is empty.
Definition at line1747 of fileMachineBasicBlock.cpp.
Referencesassert(), andstd::swap().
MachineBasicBlock::LivenessQueryResult MachineBasicBlock::computeRegisterLiveness | ( | constTargetRegisterInfo * | TRI, |
MCRegister | Reg, | ||
const_iterator | Before, | ||
unsigned | Neighborhood =10 | ||
) | const |
Return whether (physical) registerReg
has been defined and not killed as of just beforeBefore
.
Return whether (physical) register "Reg" has been <def>ined and not <kill>ed as of just before "MI".
Search is localised to a neighborhood ofNeighborhood
instructions before (searching for defs or kills) andNeighborhood
instructions after (searching just for defs)Before
.
Reg
must be a physical register.
Search is localised to a neighborhood of Neighborhood instructions before (searching for defs or kills) and N instructions after (searching just for defs) MI.
Definition at line1632 of fileMachineBasicBlock.cpp.
Referencesllvm::AnalyzePhysRegInBundle(),Before,begin(),end(),I,Info,liveins(),LQR_Dead,LQR_Live,LQR_Unknown,N,successors(), andTRI.
Referenced byloadMBUFScalarOperandsFromVGPR(), andllvm::X86InstrInfo::reMaterialize().
void MachineBasicBlock::copySuccessor | ( | constMachineBasicBlock * | Orig, |
succ_iterator | I | ||
) |
Copy a successor (and any probability info) from original block to this block's.
Uses an iterator into the original blocks successors.
This is useful when doing a partial clone of successors. Afterward, the probabilities may need to be normalized.
Definition at line899 of fileMachineBasicBlock.cpp.
ReferencesaddSuccessor(),addSuccessorWithoutProb(),getSuccProbability(), andI.
LLVM_DUMP_METHOD void MachineBasicBlock::dump | ( | ) | const |
Definition at line301 of fileMachineBasicBlock.cpp.
Referencesllvm::dbgs(), andprint().
Referenced byllvm::PPCRegisterInfo::emitAccCopyInfo(),emitAccSpillRestoreInfo(),emitWAccSpillRestoreInfo(),runOnBasicBlock(), andsplitMBB().
| inline |
Definition at line327 of fileMachineBasicBlock.h.
Referenced byblockEndsInUnreachable(),bothUsedInPHI(),llvm::calculateDbgEntityHistory(),llvm::ARMBasicBlockUtils::computeBlockSize(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(),dominatesAllUsesOf(),llvm::MipsAsmPrinter::emitBasicBlockEnd(),llvm::SIFrameLowering::emitEpilogue(),llvm::CSKYFrameLowering::emitEpilogue(),llvm::RISCVFrameLowering::emitEpilogue(),llvm::AsmPrinter::emitFunctionBody(),llvm::DwarfDebug::emitInitialLocDirective(),llvm::findPHICopyInsertPoint(),generateAssignInstrs(),getBBAddrMapMetadata(),getFallThrough(),getNextMachineInstr(),llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(),llvm::XtensaInstrInfo::insertIndirectBranch(),llvm::AArch64InstrInfo::insertIndirectBranch(),llvm::SIInstrInfo::insertIndirectBranch(),llvm::LoongArchInstrInfo::insertIndirectBranch(),llvm::RISCVInstrInfo::insertIndirectBranch(),llvm::SlotIndexes::insertMBBInMaps(),llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(),isEHScopeReturnBlock(),isImplicitFallthrough(),llvm::ARMBaseInstrInfo::isProfitableToIfCvt(),isReturnBlock(),jumpTableFollowsTB(),llvm::Legalizer::legalizeMachineFunction(),LookForIdenticalPHI(),llvm::AMDGPUCallLowering::lowerFormalArguments(),llvm::AArch64CallLowering::lowerFormalArguments(),llvm::ARMCallLowering::lowerFormalArguments(),llvm::X86CallLowering::lowerFormalArguments(),performSink(),llvm::MIPrinter::print(),llvm::GCNRegPressurePrinter::runOnMachineFunction(),llvm::scavengeFrameVirtualRegs(),llvm::InstructionSelect::selectMachineFunction(),llvm::TailDuplicator::shouldTailDuplicate(),llvm::FastISel::startNewBlock(), andllvm::UpgradeDataLayoutString().
| inline |
Definition at line357 of fileMachineBasicBlock.h.
Referencesinstr_end().
Referenced byaddLiveIn(),llvm::LiveVariables::addNewBlock(),llvm::ScheduleDAGInstrs::addSchedBarrierDeps(),llvm::ARMFrameLowering::adjustForSegmentedStacks(),llvm::XtensaInstrInfo::adjustStackPtr(),llvm::RegPressureTracker::advance(),llvm::R600InstrInfo::analyzeBranch(),llvm::ARCInstrInfo::analyzeBranch(),llvm::BPFInstrInfo::analyzeBranch(),llvm::LoongArchInstrInfo::analyzeBranch(),llvm::MSP430InstrInfo::analyzeBranch(),llvm::NVPTXInstrInfo::analyzeBranch(),llvm::PPCInstrInfo::analyzeBranch(),llvm::RISCVInstrInfo::analyzeBranch(),llvm::SystemZInstrInfo::analyzeBranch(),llvm::XCoreInstrInfo::analyzeBranch(),llvm::XtensaInstrInfo::analyzeBranch(),llvm::AArch64InstrInfo::analyzeBranch(),llvm::SIInstrInfo::analyzeBranch(),llvm::CSKYInstrInfo::analyzeBranch(),llvm::SparcInstrInfo::analyzeBranch(),llvm::VEInstrInfo::analyzeBranch(),llvm::LanaiInstrInfo::analyzeBranch(),llvm::SIInstrInfo::analyzeBranchImpl(),llvm::AArch64InstrInfo::analyzeBranchPredicate(),llvm::ARMBaseInstrInfo::analyzeLoopForPipelining(),llvm::HexagonInstrInfo::analyzeLoopForPipelining(),llvm::PPCInstrInfo::analyzeLoopForPipelining(),appendEndToFunction(),llvm::CombinerHelper::applyExtendThroughPhis(),back(),blockEndIsUnreachable(),llvm::BuildMI(),llvm::AArch64InstrInfo::buildOutlinedFrame(),llvm::ARMBaseInstrInfo::buildOutlinedFrame(),llvm::RISCVInstrInfo::buildOutlinedFrame(),llvm::X86InstrInfo::buildOutlinedFrame(),llvm::SIRegisterInfo::buildSpillLoadStore(),llvm::GCNDownwardRPTracker::bumpDownwardPressure(),checkAndUpdateCCRKill(),checkAndUpdateCPSRKill(),checkCCKill(),checkEFLAGSLive(),llvm::ErrataWorkaround::checkSeqTN0010(),llvm::ErrataWorkaround::checkSeqTN0010First(),llvm::ErrataWorkaround::checkSeqTN0012(),clearKillFlags(),cloneCfiPrologue(),ComputeCommonTailLength(),computeRegisterLiveness(),llvm::Thumb1InstrInfo::copyPhysReg(),CountTerminators(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(),llvm::SIInstrInfo::createPHIDestinationCopy(),llvm::SIInstrInfo::createPHISourceCopy(),dominates(),llvm::X86FrameLowering::eliminateCallFramePseudoInstr(),llvm::X86RegisterInfo::eliminateFrameIndex(),emitAlignedDPRCS2Restores(),emitAlignedDPRCS2Spills(),llvm::PPCTargetLowering::EmitAtomicBinary(),llvm::X86AsmPrinter::emitBasicBlockEnd(),llvm::AsmPrinter::emitCFIInstruction(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::PPCTargetLowering::emitEHSjLjSetJmp(),llvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(),llvm::AArch64FrameLowering::emitEpilogue(),llvm::SIFrameLowering::emitEpilogue(),llvm::ARMFrameLowering::emitEpilogue(),llvm::Thumb1FrameLowering::emitEpilogue(),llvm::CSKYFrameLowering::emitEpilogue(),llvm::LoongArchFrameLowering::emitEpilogue(),llvm::M68kFrameLowering::emitEpilogue(),llvm::Mips16FrameLowering::emitEpilogue(),llvm::MipsSEFrameLowering::emitEpilogue(),llvm::MSP430FrameLowering::emitEpilogue(),llvm::PPCFrameLowering::emitEpilogue(),llvm::RISCVFrameLowering::emitEpilogue(),llvm::WebAssemblyFrameLowering::emitEpilogue(),llvm::X86FrameLowering::emitEpilogue(),llvm::AArch64TargetLowering::EmitF128CSEL(),emitFROUND(),llvm::AsmPrinter::emitFunctionBody(),llvm::R600TargetLowering::EmitInstrWithCustomInserter(),llvm::SITargetLowering::EmitInstrWithCustomInserter(),llvm::BPFTargetLowering::EmitInstrWithCustomInserter(),llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(),emitLoadScalarOpsFromVGPRLoop(),EmitLoweredCascadedSelect(),llvm::PPCTargetLowering::EmitPartwordAtomicBinary(),llvm::PPCTargetLowering::emitProbedAlloca(),llvm::XtensaFrameLowering::emitPrologue(),llvm::AArch64FrameLowering::emitPrologue(),llvm::ARMFrameLowering::emitPrologue(),llvm::Thumb1FrameLowering::emitPrologue(),llvm::M68kFrameLowering::emitPrologue(),llvm::MSP430FrameLowering::emitPrologue(),llvm::RISCVFrameLowering::emitPrologue(),llvm::SystemZELFFrameLowering::emitPrologue(),llvm::SystemZXPLINKFrameLowering::emitPrologue(),llvm::WebAssemblyFrameLowering::emitPrologue(),llvm::X86FrameLowering::emitPrologue(),emitReadCounterWidePseudo(),llvm::ScheduleDAGSDNodes::EmitSchedule(),emitSelectPseudo(),llvm::MSP430TargetLowering::EmitShiftInstr(),llvm::VETargetLowering::emitSjLjDispatchBlock(),emitStackProbeInline(),emitVecCondBranchPseudo(),emitXBegin(),ensureEntrySetPrio(),llvm::RegScavenger::enterBasicBlockEnd(),llvm::ScheduleDAGMILive::enterRegion(),llvm::AMDGPURegisterBankInfo::executeInWaterfallLoop(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::SparcTargetLowering::expandSelectCC(),llvm::SPIRVTargetLowering::finalizeLowering(),findBranchDebugLoc(),llvm::WebAssembly::findCatch(),llvm::X86RegisterInfo::findDeadCallerSavedReg(),findDeadCallerSavedReg(),findHoistingInsertPosAndDeps(),findIncDecAfter(),findIncDecBefore(),findInsertLocation(),findJumpTableIndex(),FindLastAluClause(),findNextInsertLocation(),findSurvivorBackwards(),llvm::fixStackStores(),fixupPHIOpBanks(),forEachJumpTableBranch(),generateAssignInstrs(),llvm::rdf::Liveness::getAllReachingDefs(),getArgumentStackToRestore(),llvm::RegPressureTracker::getCurrSlot(),getEarliestInsertPos(),llvm::getEHScopeMembership(),getFallThrough(),getFirstNonDebugInstr(),getFirstNonPrologue(),getFirstTerminator(),llvm::getInsertPtValidEnd(),llvm::InsertPointAnalysis::getLastInsertPointIter(),getLastNonDebugInstr(),getLatestInsertPos(),llvm::ReachingDefAnalysis::getLiveInUses(),llvm::ReachingDefAnalysis::getLocalLiveOutMIDef(),getNextFPInstruction(),getNextMachineInstr(),llvm::ARMBasicBlockUtils::getOffsetOf(),llvm::getOpVariableMBBIt(),getOrCreateFrameHelper(),getPreviousInstr(),llvm::ReachingDefAnalysis::getReachingLocalUses(),llvm::PhiLoweringHelper::getSaluInsertionAtEnd(),getSchedRegions(),llvm::X86InstrInfo::getSPAdjust(),llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(),llvm::guessSuccessors(),handleADRP(),HashEndOfMBB(),hasTailCall(),llvm::GCNSchedStage::initGCNRegion(),INITIALIZE_PASS(),llvm::PPCFrameLowering::inlineStackProbe(),llvm::SystemZELFFrameLowering::inlineStackProbe(),llvm::X86FrameLowering::inlineStackProbe(),insert(),insertAfter(),llvm::R600InstrInfo::insertBranch(),llvm::HexagonInstrInfo::insertBranch(),llvm::XtensaInstrInfo::insertBranch(),insertDivByZeroTrap(),llvm::XtensaInstrInfo::insertIndirectBranch(),llvm::AArch64InstrInfo::insertIndirectBranch(),llvm::SIInstrInfo::insertIndirectBranch(),llvm::LoongArchInstrInfo::insertIndirectBranch(),llvm::RISCVInstrInfo::insertIndirectBranch(),llvm::SIInstrInfo::insertReturn(),llvm::SIInstrInfo::insertSimulatedTrap(),insertSpeculationBarrier(),IsBetterFallthrough(),IsBranchOnlyBlock(),isEFLAGSLiveAfter(),IsEmptyBlock(),isInvoke(),llvm::Thumb2InstrInfo::isLegalToSplitMBBAt(),llvm::TargetInstrInfo::isMBBSafeToOutlineFrom(),llvm::CombinerHelper::isPredecessor(),llvm::ReachingDefAnalysis::isReachingDefLiveOut(),llvm::ReachingDefAnalysis::isRegDefinedAfter(),llvm::ReachingDefAnalysis::isSafeToDefRegAt(),isSafeToMove(),llvm::AArch64InstrInfo::isSchedulingBoundary(),llvm::ARMBaseInstrInfo::isSchedulingBoundary(),llvm::LoongArchInstrInfo::isSchedulingBoundary(),llvm::TailDuplicator::isSimpleBB(),llvm::SIInstrInfo::legalizeOperands(),llvm::AMDGPULegalizerInfo::legalizeTrapEndpgm(),llvm::XtensaInstrInfo::loadImmediate(),llvm::SystemZInstrInfo::loadImmediate(),llvm::XCoreInstrInfo::loadImmediate(),loadMBUFScalarOperandsFromVGPR(),llvm::Mips16InstrInfo::loadRegFromStack(),llvm::MipsSEInstrInfo::loadRegFromStack(),llvm::SystemZInstrInfo::loadRegFromStackSlot(),llvm::XtensaInstrInfo::loadRegFromStackSlot(),llvm::ARMBaseInstrInfo::loadRegFromStackSlot(),llvm::Thumb1InstrInfo::loadRegFromStackSlot(),llvm::Thumb2InstrInfo::loadRegFromStackSlot(),llvm::BPFInstrInfo::loadRegFromStackSlot(),llvm::SparcInstrInfo::loadRegFromStackSlot(),llvm::VEInstrInfo::loadRegFromStackSlot(),llvm::LoongArchInstrInfo::loadRegFromStackSlot(),llvm::MSP430InstrInfo::loadRegFromStackSlot(),llvm::CSKYInstrInfo::loadRegFromStackSlot(),llvm::XCoreInstrInfo::loadRegFromStackSlot(),llvm::LanaiInstrInfo::loadRegFromStackSlot(),llvm::PPCInstrInfo::loadRegFromStackSlotNoUpd(),LookForIdenticalPHI(),LowerFPToInt(),LowerMemcpy(),LowerMemset(),lowerWaveReduce(),llvm::MachineInstrSpan::MachineInstrSpan(),llvm::CombinerHelper::matchOptBrCondByInvertingCond(),llvm::AArch64RegisterInfo::materializeFrameBaseRegister(),llvm::SIRegisterInfo::materializeFrameBaseRegister(),llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(),llvm::PPCRegisterInfo::materializeFrameBaseRegister(),llvm::RISCVRegisterInfo::materializeFrameBaseRegister(),maybeRewriteToFallthrough(),mergeOperations(),llvm::M68kFrameLowering::mergeSPUpdates(),llvm::X86FrameLowering::mergeSPUpdates(),llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(),MoveVPNOTBeforeFirstUser(),llvm::ARMBaseInstrInfo::optimizeCompareInstr(),llvm::LanaiInstrInfo::optimizeCompareInstr(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::PPCInstrInfo::optimizeCompareInstr(),llvm::PeelSingleBlockLoop(),performSink(),llvm::ScheduleDAGMI::placeDebugValues(),popRegsFromStack(),llvm::SystemZInstrInfo::prepareCompareSwapOperands(),PrevCrossBBInst(),llvm::AArch64InstrInfo::probedStackAlloc(),llvm::AArch64FrameLowering::processFunctionBeforeFrameFinalized(),ProfitableToMerge(),llvm::SIInstrInfo::reMaterialize(),llvm::AArch64InstrInfo::removeBranch(),llvm::R600InstrInfo::removeBranch(),llvm::ARCInstrInfo::removeBranch(),llvm::ARMBaseInstrInfo::removeBranch(),llvm::BPFInstrInfo::removeBranch(),llvm::CSKYInstrInfo::removeBranch(),llvm::HexagonInstrInfo::removeBranch(),llvm::LanaiInstrInfo::removeBranch(),llvm::LoongArchInstrInfo::removeBranch(),llvm::M68kInstrInfo::removeBranch(),llvm::MSP430InstrInfo::removeBranch(),llvm::NVPTXInstrInfo::removeBranch(),llvm::PPCInstrInfo::removeBranch(),llvm::RISCVInstrInfo::removeBranch(),llvm::SparcInstrInfo::removeBranch(),llvm::SPIRVInstrInfo::removeBranch(),llvm::SystemZInstrInfo::removeBranch(),llvm::VEInstrInfo::removeBranch(),llvm::X86InstrInfo::removeBranch(),llvm::XCoreInstrInfo::removeBranch(),llvm::XtensaInstrInfo::removeBranch(),removeImplicitFallthroughs(),llvm::SlotIndexes::repairIndexesInRange(),llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(),llvm::LiveIntervals::repairIntervalsInRange(),llvm::X86InstrInfo::replaceBranchWithTailCall(),llvm::PPCFrameLowering::replaceFPWithRealFP(),llvm::TargetInstrInfo::ReplaceTailWithBranchTo(),llvm::SystemZELFFrameLowering::restoreCalleeSavedRegisters(),llvm::SystemZXPLINKFrameLowering::restoreCalleeSavedRegisters(),llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(),llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(),llvm::CSKYFrameLowering::restoreCalleeSavedRegisters(),llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(),llvm::RISCVFrameLowering::restoreCalleeSavedRegisters(),llvm::X86FrameLowering::restoreCalleeSavedRegisters(),llvm::Mips16InstrInfo::restoreFrame(),llvm::ARMBlockPlacement::revertWhileToDoLoop(),rollbackRestoreSplit(),runImpl(),llvm::SelectionDAGISel::runOnMachineFunction(),llvm::InsertNOPLoad::runOnMachineFunction(),llvm::FixAllFDIVSQRT::runOnMachineFunction(),scavengeFrameVirtualRegsInBlock(),llvm::RegScavenger::scavengeRegisterBackwards(),setInsertPtAfterDef(),llvm::PPCInstrInfo::shouldReduceRegisterPressure(),shouldUseFrameHelper(),sizeWithoutDebugLargerThan(),skipBackwardPastNonInstructions(),SkipPHIsAndLabels(),SkipPHIsLabelsAndDebug(),llvm::CSKYFrameLowering::spillCalleeSavedRegisters(),llvm::MSP430FrameLowering::spillCalleeSavedRegisters(),llvm::RISCVFrameLowering::spillCalleeSavedRegisters(),llvm::XCoreFrameLowering::spillCalleeSavedRegisters(),llvm::SIRegisterInfo::spillEmergencySGPR(),splitAt(),llvm::SystemZ::splitBlockAfter(),llvm::SystemZ::splitBlockBefore(),splitBlockForLoop(),SplitCriticalEdge(),splitMBB(),llvm::Mips16InstrInfo::storeRegToStack(),llvm::Thumb1InstrInfo::storeRegToStackSlot(),llvm::Thumb2InstrInfo::storeRegToStackSlot(),llvm::BPFInstrInfo::storeRegToStackSlot(),llvm::SparcInstrInfo::storeRegToStackSlot(),llvm::SystemZInstrInfo::storeRegToStackSlot(),llvm::VEInstrInfo::storeRegToStackSlot(),llvm::XtensaInstrInfo::storeRegToStackSlot(),llvm::CSKYInstrInfo::storeRegToStackSlot(),llvm::MSP430InstrInfo::storeRegToStackSlot(),llvm::XCoreInstrInfo::storeRegToStackSlot(),llvm::LanaiInstrInfo::storeRegToStackSlot(),terminators(),updateGetPCBundle(),llvm::WindowScheduler::updateLiveIntervals(),llvm::ScheduleDAGMILive::updatePressureDiffs(),llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(),verifyCFIntrinsic(),verifyCTRBranch(),llvm::MemorySSA::verifyOrderingDominationAndDefUses(), andVerifyPHIs().
| inline |
Definition at line358 of fileMachineBasicBlock.h.
Referencesinstr_end().
MachineBasicBlock::instr_iterator MachineBasicBlock::erase | ( | MachineBasicBlock::instr_iterator | I | ) |
Remove an instruction from the instruction list and delete it.
If the instruction is part of a bundle, the other instructions in the bundle will still be bundled after removing the single instruction.
Definition at line1443 of fileMachineBasicBlock.cpp.
Referencesllvm::iplist_impl< IntrusiveListT, TraitsT >::erase(),I, andunbundleSingleMI().
Referenced byllvm::BPFInstrInfo::analyzeBranch(),llvm::MSP430InstrInfo::analyzeBranch(),llvm::SystemZInstrInfo::analyzeBranch(),llvm::LanaiInstrInfo::analyzeBranch(),convertCalleeSaveRestoreToSPPrePostIncDec(),llvm::AArch64FrameLowering::eliminateCallFramePseudoInstr(),llvm::ARCFrameLowering::eliminateCallFramePseudoInstr(),llvm::HexagonFrameLowering::eliminateCallFramePseudoInstr(),llvm::LanaiFrameLowering::eliminateCallFramePseudoInstr(),llvm::MipsFrameLowering::eliminateCallFramePseudoInstr(),llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(),llvm::NVPTXFrameLowering::eliminateCallFramePseudoInstr(),llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(),llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(),llvm::VEFrameLowering::eliminateCallFramePseudoInstr(),llvm::WebAssemblyFrameLowering::eliminateCallFramePseudoInstr(),llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(),llvm::XtensaFrameLowering::eliminateCallFramePseudoInstr(),llvm::SIFrameLowering::eliminateCallFramePseudoInstr(),llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(),llvm::CSKYFrameLowering::eliminateCallFramePseudoInstr(),llvm::LoongArchFrameLowering::eliminateCallFramePseudoInstr(),llvm::M68kFrameLowering::eliminateCallFramePseudoInstr(),llvm::RISCVFrameLowering::eliminateCallFramePseudoInstr(),llvm::X86FrameLowering::eliminateCallFramePseudoInstr(),llvm::XCoreRegisterInfo::eliminateFrameIndex(),llvm::CSKYRegisterInfo::eliminateFrameIndex(),llvm::AArch64FrameLowering::emitEpilogue(),llvm::XCoreFrameLowering::emitEpilogue(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),erase(),erase_instr(),llvm::MachineInstr::eraseFromParent(),llvm::AArch64InstrInfo::expandPostRAPseudo(),llvm::R600InstrInfo::expandPostRAPseudo(),llvm::HexagonInstrInfo::expandPostRAPseudo(),llvm::Mips16InstrInfo::expandPostRAPseudo(),llvm::MipsSEInstrInfo::expandPostRAPseudo(),llvm::HexagonInstrInfo::expandVGatherPseudo(),INITIALIZE_PASS(),insertSEH(),llvm::PPCRegisterInfo::lowerACCRestore(),llvm::PPCRegisterInfo::lowerACCSpilling(),llvm::PPCRegisterInfo::lowerCRBitRestore(),llvm::PPCRegisterInfo::lowerCRBitSpilling(),llvm::PPCRegisterInfo::lowerCRRestore(),llvm::PPCRegisterInfo::lowerCRSpilling(),llvm::PPCRegisterInfo::lowerDynamicAlloc(),llvm::PPCRegisterInfo::lowerDynamicAreaOffset(),llvm::PPCRegisterInfo::lowerOctWordSpilling(),llvm::PPCRegisterInfo::lowerPrepareProbedAlloca(),llvm::PPCRegisterInfo::lowerQuadwordRestore(),llvm::PPCRegisterInfo::lowerQuadwordSpilling(),llvm::PPCRegisterInfo::lowerWACCRestore(),llvm::PPCRegisterInfo::lowerWACCSpilling(),llvm::M68kFrameLowering::mergeSPUpdates(),llvm::X86FrameLowering::mergeSPUpdates(),popRegsFromStack(),llvm::HexagonInstrInfo::removeBranch(),removeDebugInstrs(),replaceFrameIndex(),llvm::TargetInstrInfo::ReplaceTailWithBranchTo(),llvm::ThumbRegisterInfo::rewriteFrameIndex(), androllbackRestoreSplit().
Remove an instruction or bundle from the instruction list and delete it.
If I points to a bundle of instructions, they are all erased.
Definition at line1072 of fileMachineBasicBlock.h.
Remove a range of instructions from the instruction list and delete them.
Definition at line1065 of fileMachineBasicBlock.h.
| inline |
Remove an instruction from the instruction list and delete it.
If I is the head of a bundle of instructions, the whole bundle will be erased.
Definition at line1080 of fileMachineBasicBlock.h.
| inline |
Remove an instruction from the instruction list and delete it.
If the instruction is part of a bundle, the other instructions in the bundle will still be bundled after removing the single instruction.
Definition at line1060 of fileMachineBasicBlock.h.
Referenced byllvm::MachineInstr::eraseFromBundle().
void MachineBasicBlock::eraseFromParent | ( | ) |
This method unlinks 'this' from the containing function and deletes it.
This method unlinks 'this' from the containing function, and deletes it.
Definition at line1476 of fileMachineBasicBlock.cpp.
Referencesassert(),llvm::MachineFunction::erase(), andgetParent().
Referenced byllvm::XtensaInstrInfo::analyzeBranch(),llvm::VPBasicBlock::connectToPredecessors(),llvm::MachineDomTreeUpdater::deleteBB(),llvm::X86TargetLowering::EmitKCFICheck(),eraseDeadBBsAndChildren(),llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(),rollbackRestoreSplit(), andGCEmptyBasicBlocks::runOnMachineFunction().
DebugLoc MachineBasicBlock::findBranchDebugLoc | ( | ) |
Find and return the mergedDebugLoc of the branch instructions of the block.
Return UnknownLoc if there is none.
Definition at line1559 of fileMachineBasicBlock.cpp.
ReferencesDL,end(),getFirstTerminator(), andllvm::DILocation::getMergedLocation().
Referenced byFixTail(),llvm::MIRProfileLoader::setBranchProbs(),SplitCriticalEdge(),updateBranches(),updateTerminator(), andupdateTerminator().
DebugLoc MachineBasicBlock::findDebugLoc | ( | instr_iterator | MBBI | ) |
Find the next validDebugLoc starting at MBBI, skipping any debug instructions.
Return UnknownLoc if there is none.
Definition at line1516 of fileMachineBasicBlock.cpp.
Referencesinstr_end(),MBBI, andllvm::skipDebugInstructionsForward().
Referenced byllvm::R600InstrInfo::buildDefaultInstruction(),emitCalleeSavedRestores(),llvm::AArch64TargetLowering::EmitDynamicProbedAlloc(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::ARCFrameLowering::emitEpilogue(),emitGPDisp(),llvm::R600TargetLowering::EmitInstrWithCustomInserter(),emitLpad(),llvm::M68kFrameLowering::emitSPUpdate(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::VEInstrInfo::expandGetStackTopPseudo(),llvm::SIInstrInfo::expandMovDPP64(),llvm::SIInstrInfo::expandPostRAPseudo(),findDebugLoc(),llvm::PPCFrameLowering::inlineStackProbe(),llvm::X86FrameLowering::inlineStackProbe(),llvm::SIInstrInfo::insertNoops(),llvm::SIInstrInfo::legalizeOpWithMove(),llvm::ARCInstrInfo::loadImmediate(),llvm::HexagonInstrInfo::loadRegFromStackSlot(),llvm::RISCVInstrInfo::loadRegFromStackSlot(),llvm::SIInstrInfo::loadRegFromStackSlot(),llvm::ARCInstrInfo::loadRegFromStackSlot(),llvm::M68kInstrInfo::loadRegFromStackSlot(),llvm::AArch64InstrInfo::probedStackAlloc(),llvm::X86InstrInfo::replaceBranchWithTailCall(),llvm::M68kFrameLowering::restoreCalleeSavedRegisters(),llvm::X86FrameLowering::restoreCalleeSavedRegisters(),rfindDebugLoc(),llvm::M68kFrameLowering::spillCalleeSavedRegisters(),llvm::X86FrameLowering::spillCalleeSavedRegisters(),llvm::HexagonInstrInfo::storeRegToStackSlot(),llvm::SIInstrInfo::storeRegToStackSlot(),llvm::ARCInstrInfo::storeRegToStackSlot(), andllvm::M68kInstrInfo::storeRegToStackSlot().
Definition at line1144 of fileMachineBasicBlock.h.
ReferencesfindDebugLoc(), andMBBI.
DebugLoc MachineBasicBlock::findPrevDebugLoc | ( | instr_iterator | MBBI | ) |
Find the previous validDebugLoc preceding MBBI, skipping any debug instructions.
It is possible to find the lastDebugLoc in the MBB using findPrevDebugLoc(instr_end()). Return UnknownLoc if there is none.
Return UnknownLoc if there is none.
Definition at line1536 of fileMachineBasicBlock.cpp.
Referencesinstr_begin(),MBBI, andllvm::prev_nodbg().
Referenced byappendEndToFunction(), andfindPrevDebugLoc().
Definition at line1160 of fileMachineBasicBlock.h.
ReferencesfindPrevDebugLoc(), andMBBI.
| inline |
Definition at line334 of fileMachineBasicBlock.h.
Referenced byaddLiveIn(),llvm::Thumb1FrameLowering::emitEpilogue(),llvm::X86AsmPrinter::emitInstruction(),llvm::SlotIndexes::insertMBBInMaps(),insertNopBeforeInstruction(),llvm::GCNRegPressurePrinter::runOnMachineFunction(), andscavengeFrameVirtualRegsInBlock().
| inline |
Definition at line336 of fileMachineBasicBlock.h.
| inline |
Retrieves theBasicBlock which corresponds to thisMachineBasicBlock.
Definition at line292 of fileMachineBasicBlock.h.
Referenced byllvm::AsmPrinter::emitBasicBlockStart(), andprintName().
| inline |
Return alignment of the basic block.
Definition at line614 of fileMachineBasicBlock.h.
Referenced byllvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(),llvm::DwarfDebug::beginCodeAlignment(),llvm::WinException::beginFunclet(),llvm::AsmPrinter::emitBasicBlockStart(),llvm::MachineFunction::estimateFunctionSizeInBytes(),llvm::SITargetLowering::getPrefLoopAlignment(),llvm::dxil::ResourceTypeInfo::getStruct(), andprintName().
| inline |
Return the LLVM basic block that this instance corresponded to originally.
Note that this may be NULL if this instance does not correspond directly to an LLVM basic block.
Definition at line256 of fileMachineBasicBlock.h.
Referenced byllvm::MachineFunction::addLandingPad(),llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(),llvm::PPCTargetLowering::EmitAtomicBinary(),llvm::AsmPrinter::emitBasicBlockStart(),llvm::SystemZ::emitBlockAfter(),llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::PPCTargetLowering::emitEHSjLjSetJmp(),llvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(),llvm::AArch64TargetLowering::EmitF128CSEL(),emitFROUND(),llvm::BPFTargetLowering::EmitInstrWithCustomInserter(),llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(),EmitLoweredCascadedSelect(),llvm::PPCTargetLowering::EmitPartwordAtomicBinary(),llvm::PPCTargetLowering::emitProbedAlloca(),emitReadCounterWidePseudo(),emitSelectPseudo(),llvm::MSP430TargetLowering::EmitShiftInstr(),emitStackProbeInline(),emitVecCondBranchPseudo(),emitXBegin(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::SparcTargetLowering::expandSelectCC(),llvm::FastISel::fastEmitBranch(),llvm::SelectionDAGBuilder::FindMergedConditions(),llvm::FastISel::finishCondBranch(),getBranchHint(),getFullName(),llvm::MachineLoop::getLoopID(),getName(),hasName(),INITIALIZE_PASS(),llvm::PPCFrameLowering::inlineStackProbe(),llvm::SystemZXPLINKFrameLowering::inlineStackProbe(),insertDivByZeroTrap(),LowerFPToInt(),LowerMemcpy(),LowerMemset(),llvm::WebAssemblyException::print(),printName(),llvm::AArch64InstrInfo::probedStackAlloc(),processBlockAddr(),llvm::ARMBlockPlacement::revertWhileToDoLoop(),llvm::SelectionDAG::shouldOptForSize(),llvm::GIMatchTableExecutor::shouldOptForSize(),splitAt(), andsplitMBB().
| inline |
Definition at line681 of fileMachineBasicBlock.h.
Referenced byassignSections(),llvm::AsmPrinter::emitBBAddrMapSection(), andprintName().
constuint32_t * MachineBasicBlock::getBeginClobberMask | ( | constTargetRegisterInfo * | TRI | ) | const |
Get the clobber mask for the start of this basic block.
Funclets use this to prevent register allocation across funclet transitions.
Definition at line1730 of fileMachineBasicBlock.cpp.
ReferencesisEHFuncletEntry(), andTRI.
| inline |
Return the call frame size on entry to this basic block.
Definition at line1221 of fileMachineBasicBlock.h.
Referenced byllvm::TargetInstrInfo::getCallFrameSizeAt(), andSplitCriticalEdge().
MCSymbol * MachineBasicBlock::getEHCatchretSymbol | ( | ) | const |
Return the EHCatchret Symbol for this basic block.
Definition at line95 of fileMachineBasicBlock.cpp.
Referencesllvm::MachineFunction::getContext(),llvm::MachineFunction::getFunctionNumber(),getNumber(),llvm::MCContext::getOrCreateSymbol(), andgetParent().
Referenced byllvm::AsmPrinter::emitBasicBlockStart().
constuint32_t * MachineBasicBlock::getEndClobberMask | ( | constTargetRegisterInfo * | TRI | ) | const |
Get the clobber mask for the end of the basic block.
Definition at line1736 of fileMachineBasicBlock.cpp.
ReferencesisReturnBlock(),succ_empty(), andTRI.
MCSymbol * MachineBasicBlock::getEndSymbol | ( | ) | const |
Returns theMCSymbol marking the end of this basic block.
Definition at line106 of fileMachineBasicBlock.cpp.
Referencesllvm::MCContext::createBlockSymbol(),llvm::MachineFunction::getContext(),llvm::MachineFunction::getFunctionNumber(),getNumber(), andgetParent().
Referenced byllvm::AsmPrinter::emitBBAddrMapSection(),llvm::AsmPrinter::emitFunctionBody(), andllvm::DebugHandlerBase::endInstruction().
MachineBasicBlock * MachineBasicBlock::getFallThrough | ( | bool | JumpToFallThrough =true | ) |
Return the fallthrough block if the block can implicitly transfer control to the block after it by falling off the end of it.
If an explicit branch to the fallthrough block is not allowed, set JumpToFallThrough to be false. Non-null return is a conservative answer.
Definition at line977 of fileMachineBasicBlock.cpp.
Referencesllvm::HexagonInstrInfo::analyzeBranch(),back(),Cond,empty(),end(),llvm::TargetSubtargetInfo::getInstrInfo(),llvm::ilist_node_impl< ilist_detail::compute_node_options< T, Options... >::type >::getIterator(),getParent(),llvm::MachineFunction::getSubtarget(),llvm::HexagonInstrInfo::isPredicated(),isSuccessor(),TBB, andTII.
Referenced bycanFallThrough(),llvm::RISCVFrameLowering::canUseAsEpilogue(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),getLogicalFallThrough(),INITIALIZE_PASS(), andllvm::sortBasicBlocksAndUpdateBranches().
MachineBasicBlock::instr_iterator MachineBasicBlock::getFirstInstrTerminator | ( | ) |
Same getFirstTerminator but it ignores bundles and return an instr_iterator instead.
Definition at line253 of fileMachineBasicBlock.cpp.
ReferencesB,I,instr_begin(), andinstr_end().
Referenced byllvm::PeelingModuloScheduleExpander::filterInstructions(),signOutlinedFunction(), andSplitCriticalEdge().
MachineBasicBlock::iterator MachineBasicBlock::getFirstNonDebugInstr | ( | bool | SkipPseudoOp =true | ) |
Returns an iterator to the first non-debug instruction in the basic block, orend().
Skip any pseudo probe operation ifSkipPseudoOp
is true. Pseudo probes are like debug instructions which do not turn into real machine code. We try to use the function to skip both debug instructions and pseudo probe operations to avoid API proliferation. This should work most of the time when considering optimizing the rest of code in the block, except for certain cases where pseudo probes are designed to block the optimizations. For example, code merge like optimizations are supposed to be blocked by pseudo probes for better AutoFDO profile quality. Therefore, they should be considered as a valid instruction when this function is called in a context of such optimizations. On the other hand,SkipPseudoOp
should be true when it's used in optimizations that unlikely hurt profile quality, e.g., without block merging. The default value ofSkipPseudoOp
is set to true to maximize code quality in general, with an explict false value passed in in a few places like branch folding and if-conversion to favor profile quality.
Definition at line267 of fileMachineBasicBlock.cpp.
Referencesbegin(),end(), andllvm::skipDebugInstructionsForward().
Referenced bygetFirstNonDebugInstr(),IsBranchOnlyBlock(),IsEmptyBlock(),llvm::TargetInstrInfo::isMBBSafeToOutlineFrom(), andllvm::TailDuplicator::isSimpleBB().
| inline |
Definition at line919 of fileMachineBasicBlock.h.
ReferencesgetFirstNonDebugInstr().
MachineBasicBlock::iterator MachineBasicBlock::getFirstNonPHI | ( | ) |
Returns a pointer to the first instruction in this block that is not aPHINode instruction.
When adding instructions to the beginning of the basic block, they should be added before the returned value, not before the first instruction, which might be PHI. Returnsend() is there's no non-PHI instruction.
Definition at line202 of fileMachineBasicBlock.cpp.
Referencesassert(),I,instr_begin(), andinstr_end().
Referenced byllvm::CombinerHelper::applyExtendThroughPhis(),llvm::SwiftErrorValueTracking::createEntriesInEntryBlock(),llvm::ScheduleDAGSDNodes::EmitSchedule(),llvm::LegalizerHelper::fewerElementsVectorPhi(),llvm::PeelingModuloScheduleExpander::filterInstructions(),fixupPHIOpBanks(),getFirstNonPHI(),getFirstNonPrologue(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetPoisonVal(),llvm::LegalizerHelper::moreElementsVectorPhi(),llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(),llvm::LegalizerHelper::narrowScalar(),llvm::PeelSingleBlockLoop(),phis(),llvm::SwiftErrorValueTracking::propagateVRegs(),llvm::FastISel::recomputeInsertPt(),llvm::MachineSSAUpdater::RewriteUse(),llvm::MachineFunction::salvageCopySSAImpl(),llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), andllvm::LegalizerHelper::widenScalar().
| inline |
Definition at line870 of fileMachineBasicBlock.h.
ReferencesgetFirstNonPHI().
MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator | ( | ) |
Returns an iterator to the first terminator instruction of this basic block.
If a terminator does not exist, it returnsend().
Definition at line244 of fileMachineBasicBlock.cpp.
ReferencesB,begin(),end(), andI.
Referenced byllvm::SIInstrInfo::analyzeBranch(),llvm::AArch64InstrInfo::analyzeLoopForPipelining(),llvm::ARMBaseInstrInfo::analyzeLoopForPipelining(),llvm::HexagonInstrInfo::analyzeLoopForPipelining(),llvm::PPCInstrInfo::analyzeLoopForPipelining(),llvm::AMDGPURegisterBankInfo::applyMappingImpl(),copyDebugInfoToPredecessor(),llvm::X86RegisterInfo::eliminateFrameIndex(),llvm::LiveDebugVariables::LDVImpl::emitDebugValues(),llvm::AArch64FrameLowering::emitEpilogue(),llvm::SIFrameLowering::emitEpilogue(),llvm::ARCFrameLowering::emitEpilogue(),llvm::ARMFrameLowering::emitEpilogue(),llvm::Thumb1FrameLowering::emitEpilogue(),llvm::CSKYFrameLowering::emitEpilogue(),llvm::LoongArchFrameLowering::emitEpilogue(),llvm::M68kFrameLowering::emitEpilogue(),llvm::Mips16FrameLowering::emitEpilogue(),llvm::MipsSEFrameLowering::emitEpilogue(),llvm::PPCFrameLowering::emitEpilogue(),llvm::RISCVFrameLowering::emitEpilogue(),llvm::WebAssemblyFrameLowering::emitEpilogue(),llvm::X86FrameLowering::emitEpilogue(),llvm::AArch64FrameLowering::emitPrologue(),llvm::ScheduleDAGSDNodes::EmitSchedule(),llvm::SPIRVTargetLowering::finalizeLowering(),findBranchDebugLoc(),findHoistingInsertPosAndDeps(),findInsertLocation(),findJumpTableIndex(),llvm::findPHICopyInsertPoint(),llvm::findSplitPointForStackProtector(),forEachJumpTableBranch(),llvm::getEHScopeMembership(),getFirstTerminator(),llvm::SITargetLowering::getPrefLoopAlignment(),llvm::PhiLoweringHelper::getSaluInsertionAtEnd(),llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(),llvm::HexagonInstrInfo::insertBranch(),insertCSRRestores(),llvm::SIInstrInfo::insertReturn(),insertUndefLaneMask(),llvm::SystemZPostRASchedStrategy::leaveMBB(),llvm::SIInstrInfo::legalizeOperands(),llvm::LegalizerHelper::moreElementsVectorPhi(),llvm::WindowScheduler::preProcess(),llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(),llvm::SelectionDAGISel::runOnMachineFunction(),llvm::X86FrameLowering::spillFPBP(),SplitCriticalEdge(),splitMBB(), andterminators().
| inline |
Definition at line889 of fileMachineBasicBlock.h.
ReferencesgetFirstTerminator().
MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminatorForward | ( | ) |
Finds the first terminator in a block by scanning forward.
This can handle cases in GlobalISel where there may be non-terminator instructions between terminators, for whichgetFirstTerminator() will not work correctly.
Definition at line262 of fileMachineBasicBlock.cpp.
Referencesllvm::find_if(),II, andinstrs().
Referenced byllvm::LegalizerHelper::fewerElementsVectorPhi(),llvm::LegalizerHelper::narrowScalar(), andllvm::LegalizerHelper::widenScalar().
std::string MachineBasicBlock::getFullName | ( | ) | const |
Return a formatted string to identify this block and its parent function.
Return a hopefully unique identifier for this block.
Definition at line334 of fileMachineBasicBlock.cpp.
ReferencesgetBasicBlock(),llvm::MachineFunction::getName(),llvm::Value::getName(),getNumber(),getParent(), andName.
Referenced byllvm::ARMBlockPlacement::fixBackwardsWLS(),llvm::ScheduleDAGInstrs::getDAGName(),llvm::ScheduleDAGSDNodes::getDAGName(), andverifyCTRBranch().
| inline |
Definition at line1231 of fileMachineBasicBlock.h.
MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr | ( | bool | SkipPseudoOp =true | ) |
Returns an iterator to the last non-debug instruction in the basic block, orend().
Skip any pseudo operation ifSkipPseudoOp
is true. Pseudo probes are like debug instructions which do not turn into real machine code. We try to use the function to skip both debug instructions and pseudo probe operations to avoid API proliferation. This should work most of the time when considering optimizing the rest of code in the block, except for certain cases where pseudo probes are designed to block the optimizations. For example, code merge like optimizations are supposed to be blocked by pseudo probes for better AutoFDO profile quality. Therefore, they should be considered as a valid instruction when this function is called in a context of such optimizations. On the other hand,SkipPseudoOp
should be true when it's used in optimizations that unlikely hurt profile quality, e.g., without block merging. The default value ofSkipPseudoOp
is set to true to maximize code quality in general, with an explict false value passed in in a few places like branch folding and if-conversion to favor profile quality.
Definition at line273 of fileMachineBasicBlock.cpp.
ReferencesB,end(),I,instr_begin(), andinstr_end().
Referenced byllvm::R600InstrInfo::analyzeBranch(),llvm::LoongArchInstrInfo::analyzeBranch(),llvm::PPCInstrInfo::analyzeBranch(),llvm::RISCVInstrInfo::analyzeBranch(),llvm::XCoreInstrInfo::analyzeBranch(),llvm::AArch64InstrInfo::analyzeBranch(),llvm::CSKYInstrInfo::analyzeBranch(),llvm::SparcInstrInfo::analyzeBranch(),llvm::VEInstrInfo::analyzeBranch(),llvm::AArch64InstrInfo::analyzeBranchPredicate(),llvm::X86AsmPrinter::emitBasicBlockEnd(),llvm::AArch64FrameLowering::emitEpilogue(),llvm::SIFrameLowering::emitEpilogue(),llvm::CSKYFrameLowering::emitEpilogue(),llvm::LanaiFrameLowering::emitEpilogue(),llvm::MSP430FrameLowering::emitEpilogue(),llvm::RISCVFrameLowering::emitEpilogue(),llvm::SparcFrameLowering::emitEpilogue(),llvm::SystemZELFFrameLowering::emitEpilogue(),llvm::SystemZXPLINKFrameLowering::emitEpilogue(),llvm::VEFrameLowering::emitEpilogue(),llvm::XCoreFrameLowering::emitEpilogue(),llvm::XtensaFrameLowering::emitEpilogue(),getArgumentStackToRestore(),getLastNonDebugInstr(),llvm::ReachingDefAnalysis::getLiveInUses(),llvm::ReachingDefAnalysis::getLocalLiveOutMIDef(),llvm::guessSuccessors(),HashEndOfMBB(),hasTailCall(),IsBetterFallthrough(),llvm::TargetInstrInfo::isMBBSafeToOutlineFrom(),llvm::SystemZInstrInfo::isProfitableToIfCvt(),llvm::ReachingDefAnalysis::isReachingDefLiveOut(),llvm::ReachingDefAnalysis::isRegDefinedAfter(),llvm::AArch64InstrInfo::removeBranch(),llvm::ARCInstrInfo::removeBranch(),llvm::ARMBaseInstrInfo::removeBranch(),llvm::CSKYInstrInfo::removeBranch(),llvm::LoongArchInstrInfo::removeBranch(),llvm::PPCInstrInfo::removeBranch(),llvm::RISCVInstrInfo::removeBranch(),llvm::SPIRVInstrInfo::removeBranch(),llvm::XCoreInstrInfo::removeBranch(),llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(),llvm::restoreStatusRegister(), andverifyCTRBranch().
| inline |
Definition at line941 of fileMachineBasicBlock.h.
ReferencesgetLastNonDebugInstr().
| inline |
Definition at line512 of fileMachineBasicBlock.h.
Referenced byllvm::recomputeLiveIns().
| inline |
Return the fallthrough block if the block can implicitly transfer control to it's successor, whether by a branch or a fallthrough.
Non-null return is a conservative answer.
Definition at line855 of fileMachineBasicBlock.h.
ReferencesgetFallThrough().
| inline |
Return the maximum amount of padding allowed for aligning the basic block.
Definition at line625 of fileMachineBasicBlock.h.
Referenced byllvm::AsmPrinter::emitBasicBlockStart().
StringRef MachineBasicBlock::getName | ( | ) | const |
Return the name of the corresponding LLVM basic block, or an empty string.
Definition at line326 of fileMachineBasicBlock.cpp.
ReferencesgetBasicBlock().
Referenced byllvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(),llvm::ARMBasicBlockUtils::computeBlockSize(),llvm::AsmPrinter::emitFunctionBody(),getBlockName(),getBranchHint(),getCallStackHashV0(),llvm::GCNSchedStage::initGCNRegion(),llvm::ARMBlockPlacement::moveBasicBlock(),runOnBasicBlock(),GCEmptyBasicBlocks::runOnMachineFunction(),llvm::scavengeFrameVirtualRegs(),llvm::VLIWMachineScheduler::schedule(), andsplitEdge().
| inline |
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in aMachineFunction yet, in which case this will return -1.
Definition at line1217 of fileMachineBasicBlock.h.
ReferencesNumber.
Referenced byllvm::LiveVariables::addNewBlock(),llvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(),assignSections(),llvm::SwitchCG::SwitchLowering::buildBitTests(),llvm::LiveIntervals::checkRegMaskInterference(),llvm::ARMBasicBlockUtils::computeBlockSize(),llvm::AsmPrinter::emitBasicBlockStart(),llvm::AMDGPUAsmPrinter::emitBasicBlockStart(),llvm::SwitchCG::SwitchLowering::findBitTestClusters(),llvm::WebAssembly::SortRegionInfo::getBottom(),llvm::MachineTraceMetrics::Ensemble::getDepthResources(),getEHCatchretSymbol(),llvm::getEHScopeMembership(),getEndSymbol(),getFullName(),llvm::MachineTraceMetrics::Ensemble::getHeightResources(),getMCSymbolForMBB(),llvm::GraphTraits< const MachineBasicBlock * >::getNumber(),llvm::GraphTraits< Inverse< const MachineBasicBlock * > >::getNumber(),llvm::GraphTraits< MachineBasicBlock * >::getNumber(),llvm::GraphTraits< Inverse< MachineBasicBlock * > >::getNumber(),llvm::ARMBasicBlockUtils::getOffsetOf(),llvm::MachineTraceMetrics::Trace::getResourceLength(),llvm::MachineTraceMetrics::getResources(),getSymbol(),llvm::MachineTraceMetrics::Ensemble::getTrace(),llvm::LiveVariables::HandleVirtRegUse(),llvm::po_iterator_storage< LoopBounds, true >::insertEdge(),llvm::SlotIndexes::insertMBBInMaps(),llvm::MachineTraceMetrics::Ensemble::invalidate(),llvm::MachineTraceMetrics::invalidate(),llvm::ARMBasicBlockUtils::isBBInRange(),llvm::LiveRangeCalc::isJointlyDominated(),llvm::LiveVariables::VarInfo::isLiveIn(),TransferTracker::loadVarInloc(),llvm::LiveVariables::MarkVirtRegAliveInBlock(),maybeUpdateTerminator(),llvm::MIPrinter::print(),llvm::CSKYConstantPoolMBB::print(),llvm::XtensaConstantPoolMBB::print(),llvm::WebAssemblyException::print(),printName(),llvm::SwiftErrorValueTracking::propagateVRegs(),llvm::LiveVariables::recomputeForSingleDefVirtReg(),llvm::MachineFunction::RenumberBlocks(),llvm::CFIFixup::runOnMachineFunction(),llvm::MIRProfileLoader::setBranchProbs(),llvm::sortBasicBlocksAndUpdateBranches(),sortBlocks(),llvm::LoopTraversal::traverse(),updateBranches(),llvm::MachineTraceMetrics::Ensemble::updateDepth(),llvm::MachineTraceMetrics::Ensemble::verify(),VerifyPHIs(), andllvm::WriteGraph().
| inline |
Definition at line312 of fileMachineBasicBlock.h.
| inline |
Return theMachineFunction containing this basic block.
Definition at line311 of fileMachineBasicBlock.h.
Referenced byaddLiveIn(),addLiveInRegs(),llvm::LivePhysRegs::addLiveIns(),llvm::LiveRegUnits::addLiveIns(),llvm::addLiveIns(),llvm::LivePhysRegs::addLiveOuts(),llvm::LiveRegUnits::addLiveOuts(),llvm::LivePhysRegs::addLiveOutsNoPristines(),llvm::MachineInstr::addOperand(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::AddPHIOperand(),addSavedGPR(),llvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(),llvm::RISCVRegisterInfo::adjustReg(),llvm::XtensaInstrInfo::adjustStackPtr(),llvm::ARMBaseInstrInfo::analyzeBranch(),llvm::WebAssemblyInstrInfo::analyzeBranch(),analyzeCompressibleUses(),llvm::ARMBaseInstrInfo::analyzeLoopForPipelining(),llvm::PPCInstrInfo::analyzeLoopForPipelining(),llvm::RISCVInstrInfo::analyzeLoopForPipelining(),llvm::CombinerHelper::applyExtendThroughPhis(),llvm::AMDGPURegisterBankInfo::applyMappingImpl(),assignSections(),bbHasFallthrough(),BBHasFallthrough(),llvm::DwarfCFIException::beginBasicBlockSection(),llvm::DwarfDebug::beginCodeAlignment(),buildCFAOffs(),llvm::MSP430FrameLowering::BuildCFI(),llvm::X86FrameLowering::BuildCFI(),llvm::AArch64InstrInfo::buildClearRegister(),llvm::X86InstrInfo::buildClearRegister(),buildDefCFAReg(),buildGitPtr(),llvm::BuildMI(),BuildPACM(),llvm::SIRegisterInfo::buildSpillLoadStore(),llvm::ModuloScheduleExpanderMVE::canApply(),canCombine(),canFallThroughTo(),llvm::AArch64InstrInfo::canInsertSelect(),llvm::PPCInstrInfo::canInsertSelect(),llvm::SystemZInstrInfo::canInsertSelect(),llvm::X86InstrInfo::canInsertSelect(),llvm::SIInstrInfo::canInsertSelect(),cannotInsertTailCall(),canSplitCriticalEdge(),llvm::Thumb1FrameLowering::canUseAsEpilogue(),llvm::RISCVFrameLowering::canUseAsEpilogue(),llvm::X86FrameLowering::canUseAsEpilogue(),llvm::AArch64FrameLowering::canUseAsPrologue(),llvm::RISCVFrameLowering::canUseAsPrologue(),llvm::X86FrameLowering::canUseAsPrologue(),cloneCfiPrologue(),cloneInstr(),llvm::WebAssemblyDebugValueManager::cloneSink(),CombineCVTAToLocal(),llvm::ARMBasicBlockUtils::computeBlockSize(),llvm::HexagonBlockRanges::computeDeadMap(),llvm::computeLiveIns(),llvm::constrainSelectedInstRegOperands(),convertCalleeSaveRestoreToSPPrePostIncDec(),llvm::SIInstrInfo::convertToThreeAddress(),llvm::Thumb1InstrInfo::copyPhysReg(),llvm::NVPTXInstrInfo::copyPhysReg(),llvm::SystemZInstrInfo::copyPhysReg(),llvm::M68kInstrInfo::copyPhysReg(),llvm::WebAssemblyInstrInfo::copyPhysReg(),llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(),createPHIsForCMOVsInSinkBB(),createPHIsForSelects(),llvm::MachineFunction::deleteMachineBasicBlock(),llvm::ilist_alloc_traits< MachineBasicBlock >::deleteNode(),llvm::LexicalScopes::dominates(),llvm::TargetInstrInfo::duplicate(),llvm::ARMBaseInstrInfo::duplicate(),llvm::AArch64RegisterInfo::eliminateFrameIndex(),llvm::ARMBaseRegisterInfo::eliminateFrameIndex(),llvm::ThumbRegisterInfo::eliminateFrameIndex(),llvm::HexagonRegisterInfo::eliminateFrameIndex(),llvm::MSP430RegisterInfo::eliminateFrameIndex(),llvm::PPCRegisterInfo::eliminateFrameIndex(),llvm::SystemZRegisterInfo::eliminateFrameIndex(),llvm::BPFRegisterInfo::eliminateFrameIndex(),llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(),llvm::X86RegisterInfo::eliminateFrameIndex(),llvm::XtensaRegisterInfo::eliminateFrameIndex(),emitAlignedDPRCS2Restores(),emitAlignedDPRCS2Spills(),llvm::AArch64TargetLowering::EmitAllocateSMESaveBuffer(),llvm::AArch64TargetLowering::EmitAllocateZABuffer(),llvm::PPCTargetLowering::EmitAtomicBinary(),llvm::SystemZ::emitBlockAfter(),emitBuildPairF64Pseudo(),llvm::MSP430FrameLowering::emitCalleeSavedFrameMoves(),llvm::X86FrameLowering::emitCalleeSavedFrameMoves(),llvm::X86FrameLowering::emitCalleeSavedFrameMovesFullCFA(),emitCalleeSavedRestores(),llvm::AsmPrinter::emitCFIInstruction(),EmitCfiOffset(),EmitDefCfaOffset(),llvm::AArch64TargetLowering::EmitDynamicProbedAlloc(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::PPCTargetLowering::emitEHSjLjLongJmp(),llvm::SystemZTargetLowering::emitEHSjLjLongJmp(),llvm::VETargetLowering::emitEHSjLjLongJmp(),llvm::PPCTargetLowering::emitEHSjLjSetJmp(),llvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(),llvm::AArch64TargetLowering::EmitF128CSEL(),llvm::emitFrameOffset(),emitFrameOffsetAdj(),emitFROUND(),llvm::AArch64TargetLowering::EmitGetSMESaveSize(),llvm::SITargetLowering::emitGWSMemViolTestLoop(),emitIndirectDst(),emitIndirectSrc(),llvm::AArch64TargetLowering::EmitInitTPIDR2Object(),llvm::R600TargetLowering::EmitInstrWithCustomInserter(),llvm::SITargetLowering::EmitInstrWithCustomInserter(),llvm::BPFTargetLowering::EmitInstrWithCustomInserter(),llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),llvm::X86TargetLowering::EmitInstrWithCustomInserter(),llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(),llvm::X86TargetLowering::EmitKCFICheck(),llvm::ARMBaseRegisterInfo::emitLoadConstPool(),llvm::ThumbRegisterInfo::emitLoadConstPool(),emitLoadM0FromVGPRLoop(),emitLoadScalarOpsFromVGPRLoop(),EmitLoweredCascadedSelect(),llvm::AArch64TargetLowering::EmitLoweredCatchRet(),emitPACCFI(),llvm::PPCTargetLowering::EmitPartwordAtomicBinary(),llvm::PPCTargetLowering::emitProbedAlloca(),emitPrologueEpilogueSPUpdate(),emitPseudoCTPOP(),emitPseudoXVINSGR2VR(),emitQuietFCMP(),emitReadCounterWidePseudo(),llvm::ScheduleDAGSDNodes::EmitSchedule(),emitSelectPseudo(),llvm::MSP430TargetLowering::EmitShiftInstr(),llvm::VETargetLowering::emitSjLjDispatchBlock(),emitSplitF64Pseudo(),llvm::X86FrameLowering::emitSPUpdate(),emitThumb1LoadConstPool(),emitThumb2LoadConstPool(),emitThumbRegPlusImmInReg(),emitVecCondBranchPseudo(),emitVFROUND_NOEXCEPT_MASK(),emitVGSaveRestore(),emitXBegin(),llvm::SIInstrInfo::enforceOperandRCAlignment(),eraseFromParent(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::VEInstrInfo::expandGetStackTopPseudo(),expandLoadStackGuard(),llvm::ARMBaseInstrInfo::expandLoadStackGuardBase(),llvm::SIInstrInfo::expandMovDPP64(),ExpandMOVImmSExti8(),llvm::AArch64InstrInfo::expandPostRAPseudo(),llvm::SIInstrInfo::expandPostRAPseudo(),llvm::HexagonInstrInfo::expandPostRAPseudo(),llvm::PPCInstrInfo::expandPostRAPseudo(),llvm::SparcTargetLowering::expandSelectCC(),expandXorFP(),extractRsrcPtr(),llvm::finalizeBundle(),llvm::X86RegisterInfo::findDeadCallerSavedReg(),findDeadCallerSavedReg(),findIncDecAfter(),findIncDecBefore(),findJumpTableIndex(),llvm::SelectionDAGBuilder::FindMergedConditions(),llvm::findPHICopyInsertPoint(),findRenameRegForSameLdStRegPair(),findScratchNonCalleeSaveRegister(),FixTail(),fixupPHIOpBanks(),llvm::SystemZInstrInfo::foldImmediate(),llvm::TargetInstrInfo::foldMemoryOperand(),forceReg(),llvm::AArch64InstrInfo::genAlternativeCodeSequence(),generateEndPgm(),llvm::SIInstrInfo::getAddNoCarry(),getBBAddrMapMetadata(),getBBFallenThrough(),llvm::MachineLoop::getBottomBlock(),llvm::MachineInstr::getDebugInstrNum(),getEHCatchretSymbol(),getEndSymbol(),getFallThrough(),llvm::PPCInstrInfo::getFMAPatterns(),getFMULPatterns(),getFNEGPatterns(),getFoldableImm(),getFrameIndexMMO(),getFullName(),getImmedFromMO(),getIndVarInfo(),llvm::AArch64InstrInfo::getInstSizeInBytes(),llvm::ARMBaseInstrInfo::getInstSizeInBytes(),getLayoutSuccessorProbThreshold(),getLiveRegsForEntryMBB(),getLoadStoreOffsetSizeInBits(),getMCSymbolForMBB(),llvm::MipsInstrInfo::GetMemOperand(),llvm::MachineInstr::getMF(),getMFIfAvailable(),getNextBlock(),llvm::AArch64InstrInfo::getOutlinableRanges(),llvm::RISCVInstrInfo::getOutliningTypeImpl(),llvm::AArch64InstrInfo::getOutliningTypeImpl(),getSchedRegions(),llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(),llvm::HexagonInstrInfo::getSize(),llvm::LiveIntervals::getSpillWeight(),getSymbol(),GetSymbolRef(),llvm::MachineLoop::getTopBlock(),llvm::TargetInstrInfo::hasReassociableOperands(),llvm::RISCVInstrInfo::hasReassociableOperands(),llvm::TargetInstrInfo::hasReassociableSibling(),hoistAndMergeSGPRInits(),indirectCopyToAGPR(),INITIALIZE_PASS(),llvm::PPCFrameLowering::inlineStackProbe(),llvm::ARMBaseInstrInfo::insertBranch(),llvm::VEInstrInfo::insertBranch(),insertCSRRestores(),insertCSRSaves(),insertDivByZeroTrap(),llvm::SIInstrInfo::insertEQ(),llvm::XtensaInstrInfo::insertIndirectBranch(),llvm::AArch64InstrInfo::insertIndirectBranch(),llvm::SIInstrInfo::insertIndirectBranch(),llvm::LoongArchInstrInfo::insertIndirectBranch(),llvm::RISCVInstrInfo::insertIndirectBranch(),llvm::SlotIndexes::insertMBBInMaps(),llvm::insertMultibyteShift(),llvm::SIInstrInfo::insertNE(),insertRememberRestorePair(),llvm::SIInstrInfo::insertReturn(),InsertSEH(),insertSEH(),llvm::SIInstrInfo::insertSelect(),llvm::AArch64InstrInfo::insertSelect(),llvm::PPCInstrInfo::insertSelect(),llvm::SystemZInstrInfo::insertSelect(),llvm::X86InstrInfo::insertSelect(),llvm::SIInstrInfo::insertSimulatedTrap(),insertUndefLaneMask(),llvm::SIInstrInfo::insertVectorSelect(),llvm::InstrEmitter::InstrEmitter(),isAlwaysIndirectTarget(),llvm::AArch64InstrInfo::isAssociativeAndCommutative(),isCandidatePatchable(),isCombineInstrCandidateFP(),isCVTAToLocalCombinationCandidate(),isDefinedOutside(),llvm::MachineInstr::isDereferenceableInvariantLoad(),isEntryBlock(),llvm::LiveRangeCalc::isJointlyDominated(),llvm::SIInstrInfo::isLegalRegOperand(),isLibCallInTailPosition(),llvm::ARMBaseInstrInfo::isMBBSafeToOutlineFrom(),llvm::AArch64InstrInfo::isMBBSafeToSplitToCold(),isNoReturnDef(),llvm::ARMBaseInstrInfo::isProfitableToIfCvt(),jumpTableFollowsTB(),llvm::SIInstrInfo::legalizeOpWithMove(),llvm::AMDGPULegalizerInfo::legalizeTrapEndpgm(),livein_begin(),liveout_begin(),llvm::MipsSEInstrInfo::loadImmediate(),llvm::XtensaInstrInfo::loadImmediate(),llvm::SystemZInstrInfo::loadImmediate(),llvm::XCoreInstrInfo::loadImmediate(),loadM0FromVGPR(),loadMBUFScalarOperandsFromVGPR(),llvm::MipsSEInstrInfo::loadRegFromStack(),llvm::AArch64InstrInfo::loadRegFromStackSlot(),llvm::ARMBaseInstrInfo::loadRegFromStackSlot(),llvm::Thumb1InstrInfo::loadRegFromStackSlot(),llvm::Thumb2InstrInfo::loadRegFromStackSlot(),llvm::HexagonInstrInfo::loadRegFromStackSlot(),llvm::SparcInstrInfo::loadRegFromStackSlot(),llvm::VEInstrInfo::loadRegFromStackSlot(),llvm::LoongArchInstrInfo::loadRegFromStackSlot(),llvm::RISCVInstrInfo::loadRegFromStackSlot(),llvm::MSP430InstrInfo::loadRegFromStackSlot(),llvm::SIInstrInfo::loadRegFromStackSlot(),llvm::ARCInstrInfo::loadRegFromStackSlot(),llvm::CSKYInstrInfo::loadRegFromStackSlot(),llvm::M68kInstrInfo::loadRegFromStackSlot(),llvm::X86InstrInfo::loadRegFromStackSlot(),llvm::XCoreInstrInfo::loadRegFromStackSlot(),llvm::PPCInstrInfo::loadRegFromStackSlotNoUpd(),llvm::X86InstrInfo::loadStoreTileReg(),llvm::PPCRegisterInfo::lowerACCRestore(),llvm::PPCRegisterInfo::lowerACCSpilling(),LowerCallResults(),llvm::PPCRegisterInfo::lowerCRBitRestore(),llvm::PPCRegisterInfo::lowerCRBitSpilling(),llvm::PPCRegisterInfo::lowerCRRestore(),llvm::PPCRegisterInfo::lowerCRSpilling(),llvm::VETargetLowering::LowerCustomJumpTableEntry(),llvm::PPCRegisterInfo::lowerDynamicAlloc(),llvm::PPCRegisterInfo::lowerDynamicAreaOffset(),LowerFPToInt(),LowerMemcpy(),LowerMemset(),llvm::PPCRegisterInfo::lowerOctWordSpilling(),llvm::PPCRegisterInfo::lowerPrepareProbedAlloca(),llvm::PPCRegisterInfo::lowerQuadwordRestore(),llvm::PPCRegisterInfo::lowerQuadwordSpilling(),lowerRISCVVMachineInstrToMCInst(),llvm::AArch64MCInstLower::lowerSymbolOperandELF(),llvm::RISCVRegisterInfo::lowerVRELOAD(),llvm::RISCVRegisterInfo::lowerVSPILL(),llvm::PPCRegisterInfo::lowerWACCRestore(),llvm::PPCRegisterInfo::lowerWACCSpilling(),lowerWaveReduce(),llvm::Mips16InstrInfo::makeFrame(),mapWasmLandingPadIndex(),llvm::AArch64RegisterInfo::materializeFrameBaseRegister(),llvm::SIRegisterInfo::materializeFrameBaseRegister(),llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(),llvm::PPCRegisterInfo::materializeFrameBaseRegister(),llvm::RISCVRegisterInfo::materializeFrameBaseRegister(),llvm::SIInstrInfo::materializeImmediate(),llvm::PPCInstrInfo::materializeImmPostRA(),maybeUpdateTerminator(),mergeOperations(),llvm::X86FrameLowering::mergeSPUpdates(),moveAfter(),llvm::ARMBlockPlacement::moveBasicBlock(),moveBefore(),llvm::SIInstrInfo::moveToVALUImpl(),llvm::CSKYInstrInfo::movImm(),llvm::PPCRegisterInfo::needsFrameBaseReg(),llvm::PPCInstrInfo::optimizeCmpPostRA(),llvm::AArch64InstrInfo::optimizeCondBranch(),llvm::RISCVInstrInfo::optimizeCondBranch(),popRegsFromStack(),llvm::SystemZInstrInfo::prepareCompareSwapOperands(),llvm::PPCRegisterInfo::prepareDynamicAlloca(),llvm::VETargetLowering::prepareMBB(),llvm::VETargetLowering::prepareSymbol(),PrevCrossBBInst(),llvm::MIPrinter::print(),print(),llvm::AArch64InstrInfo::probedStackAlloc(),llvm::ARMBaseInstrInfo::produceSameValue(),ProfitableToMerge(),propagateLocalCopies(),pushRegsToStack(),llvm::recomputeLivenessFlags(),reduceDbgValsForwardScan(),llvm::TargetInstrInfo::reMaterialize(),llvm::SIInstrInfo::reMaterialize(),llvm::ARMBaseInstrInfo::reMaterialize(),llvm::X86InstrInfo::reMaterialize(),removeFromParent(),replaceDominatedUses(),replaceFrameIndex(),llvm::TargetInstrInfo::ReplaceTailWithBranchTo(),llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(),reportIllegalCopy(),rescheduleCanonically(),llvm::AArch64FrameLowering::resetCFIToInitialState(),llvm::SIRegisterInfo::resolveFrameIndex(),llvm::ARMBaseRegisterInfo::resolveFrameIndex(),llvm::PPCRegisterInfo::resolveFrameIndex(),llvm::SystemZELFFrameLowering::restoreCalleeSavedRegisters(),llvm::SystemZXPLINKFrameLowering::restoreCalleeSavedRegisters(),llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(),llvm::ARCFrameLowering::restoreCalleeSavedRegisters(),llvm::ARMFrameLowering::restoreCalleeSavedRegisters(),llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(),llvm::CSKYFrameLowering::restoreCalleeSavedRegisters(),llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(),llvm::PPCFrameLowering::restoreCalleeSavedRegisters(),llvm::RISCVFrameLowering::restoreCalleeSavedRegisters(),llvm::X86FrameLowering::restoreCalleeSavedRegisters(),llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(),restoreCRs(),llvm::Mips16InstrInfo::restoreFrame(),llvm::X86FrameLowering::restoreWin32EHStackPointers(),llvm::ARMBlockPlacement::revertWhileToDoLoop(),llvm::ThumbRegisterInfo::rewriteFrameIndex(),llvm::MachineFunction::salvageCopySSAImpl(),llvm::Mips16RegisterInfo::saveScavengerRegister(),llvm::RegScavenger::scavengeRegisterBackwards(),scavengeVReg(),llvm::VLIWMachineScheduler::schedule(),setCallTargetReg(),llvm::SGPRSpillBuilder::setMI(),llvm::AArch64InstrInfo::shouldClusterMemOps(),llvm::ARMBaseRegisterInfo::shouldCoalesce(),llvm::shouldOptimizeForSize(),llvm::PPCInstrInfo::shouldReduceRegisterPressure(),llvm::TailDuplicator::shouldTailDuplicate(),shouldUseFrameHelper(),llvm::WebAssemblyDebugValueManager::sink(),SkipPHIsAndLabels(),SkipPHIsLabelsAndDebug(),llvm::SystemZELFFrameLowering::spillCalleeSavedRegisters(),llvm::SystemZXPLINKFrameLowering::spillCalleeSavedRegisters(),llvm::AArch64FrameLowering::spillCalleeSavedRegisters(),llvm::ARCFrameLowering::spillCalleeSavedRegisters(),llvm::ARMFrameLowering::spillCalleeSavedRegisters(),llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(),llvm::CSKYFrameLowering::spillCalleeSavedRegisters(),llvm::LoongArchFrameLowering::spillCalleeSavedRegisters(),llvm::M68kFrameLowering::spillCalleeSavedRegisters(),llvm::Mips16FrameLowering::spillCalleeSavedRegisters(),llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(),llvm::MSP430FrameLowering::spillCalleeSavedRegisters(),llvm::PPCFrameLowering::spillCalleeSavedRegisters(),llvm::RISCVFrameLowering::spillCalleeSavedRegisters(),llvm::X86FrameLowering::spillCalleeSavedRegisters(),llvm::XCoreFrameLowering::spillCalleeSavedRegisters(),llvm::XtensaFrameLowering::spillCalleeSavedRegisters(),spillVGPRtoAGPR(),splitAt(),splitBlock(),splitBlockForLoop(),SplitCriticalEdge(),splitEdge(),splitEndLoopBB(),splitMBB(),llvm::stableHashValue(),llvm::MipsSEInstrInfo::storeRegToStack(),llvm::AArch64InstrInfo::storeRegToStackSlot(),llvm::ARMBaseInstrInfo::storeRegToStackSlot(),llvm::Thumb1InstrInfo::storeRegToStackSlot(),llvm::Thumb2InstrInfo::storeRegToStackSlot(),llvm::HexagonInstrInfo::storeRegToStackSlot(),llvm::LoongArchInstrInfo::storeRegToStackSlot(),llvm::RISCVInstrInfo::storeRegToStackSlot(),llvm::SparcInstrInfo::storeRegToStackSlot(),llvm::VEInstrInfo::storeRegToStackSlot(),llvm::SIInstrInfo::storeRegToStackSlot(),llvm::ARCInstrInfo::storeRegToStackSlot(),llvm::CSKYInstrInfo::storeRegToStackSlot(),llvm::M68kInstrInfo::storeRegToStackSlot(),llvm::MSP430InstrInfo::storeRegToStackSlot(),llvm::X86InstrInfo::storeRegToStackSlot(),llvm::XCoreInstrInfo::storeRegToStackSlot(),llvm::PPCInstrInfo::storeRegToStackSlotNoUpd(),llvm::HexagonInstrInfo::translateInstrsForDup(),tryToSplitRestore(),unstackifyVRegsUsedInSplitBB(),updateLiveIn(),UpdateOperandRegClass(),updateTerminator(),validateFunCall(),validateFunCallMachineDef(),validatePtrTypes(),verifyCFIntrinsic(),verifyCTRBranch(), andllvm::SelectionDAGBuilder::visitSPDescriptorParent().
| inline |
Returns the section ID of this basic block.
Definition at line684 of fileMachineBasicBlock.h.
Referenced byllvm::MachineFunction::assignBeginEndSections(),assignSections(),llvm::DwarfCompileUnit::attachRangesOrLowHighPC(),llvm::DwarfDebug::beginInstruction(),llvm::EHStreamer::computeCallSiteTable(),llvm::AsmPrinter::emitBBAddrMapSection(),llvm::AsmPrinter::emitFunctionBody(),llvm::AsmPrinter::getMBBExceptionSym(),llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(),llvm::AArch64InstrInfo::insertIndirectBranch(),printName(),llvm::CFIFixup::runOnMachineFunction(), andsameSection().
| inline |
Definition at line840 of fileMachineBasicBlock.h.
ReferencesgetSinglePredecessor().
constMachineBasicBlock * MachineBasicBlock::getSinglePredecessor | ( | ) | const |
Return the predecessor of this block if it has a single predecessor.
Otherwise return a null pointer.
Definition at line973 of fileMachineBasicBlock.cpp.
Referenced bygetSinglePredecessor().
| inline |
Definition at line831 of fileMachineBasicBlock.h.
ReferencesgetSingleSuccessor().
constMachineBasicBlock * MachineBasicBlock::getSingleSuccessor | ( | ) | const |
Return the successor of this block if it has a single successor.
Otherwise return a null pointer.
Definition at line969 of fileMachineBasicBlock.cpp.
Referenced bygetSingleSuccessor().
| inlinestatic |
Support forMachineInstr::getNextNode().
Definition at line371 of fileMachineBasicBlock.h.
BranchProbability MachineBasicBlock::getSuccProbability | ( | const_succ_iterator | Succ | ) | const |
Return probability of the edge from this block to MBB.
This method should NOT be called directly, but by using getEdgeProbability method fromMachineBranchProbabilityInfo class.
Definition at line1576 of fileMachineBasicBlock.cpp.
Referencesllvm::BranchProbability::getZero(),P, andsucc_size().
Referenced bycopySuccessor(),llvm::MIPrinter::print(), andprint().
MCSymbol * MachineBasicBlock::getSymbol | ( | ) | const |
Return theMCSymbol for this basic block.
Definition at line63 of fileMachineBasicBlock.cpp.
Referencesllvm::MBBSectionID::ColdSectionID,llvm::MCContext::createBlockSymbol(),llvm::MBBSectionID::ExceptionSectionID,llvm::MachineFunction::getContext(),llvm::MachineFunction::getFunctionNumber(),llvm::MachineFunction::getName(),getNumber(),llvm::MCContext::getOrCreateSymbol(),getParent(),llvm::MachineFunction::hasBBSections(),hasLabelMustBeEmitted(),isBeginSection(), andllvm::MBBSectionID::Number.
Referenced byllvm::DebugHandlerBase::beginBasicBlockSection(),llvm::AsmPrinter::emitBasicBlockStart(),llvm::AsmPrinter::emitBBAddrMapSection(),EmitInlineAsmStr(),llvm::ARMAsmPrinter::emitInstruction(),llvm::ARMAsmPrinter::emitJumpTableAddrs(),llvm::ARMAsmPrinter::emitJumpTableInsts(),llvm::ARMAsmPrinter::emitJumpTableTBInst(),llvm::ARMAsmPrinter::emitMachineConstantPoolValue(),llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(),llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(),llvm::SystemZMCInstLower::getExpr(),llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(),llvm::M68kMCInstLower::GetSymbolFromOperand(),llvm::SIInstrInfo::insertIndirectBranch(),llvm::M68kTargetLowering::LowerCustomJumpTableEntry(),llvm::RISCVTargetLowering::LowerCustomJumpTableEntry(),llvm::VETargetLowering::LowerCustomJumpTableEntry(),llvm::X86TargetLowering::LowerCustomJumpTableEntry(),llvm::lowerLoongArchMachineOperandToMCOperand(),LowerOperand(),llvm::ARMAsmPrinter::lowerOperand(),llvm::AArch64MCInstLower::lowerOperand(),AMDGPUMCInstLower::lowerOperand(),llvm::CSKYMCInstLower::lowerOperand(),llvm::LowerPPCMachineOperandToMCOperand(),LowerSymbolOperand(),llvm::XtensaAsmPrinter::LowerSymbolOperand(),llvm::WebAssemblyAsmPrinter::PrintAsmOperand(),llvm::ARMAsmPrinter::printOperand(),llvm::MipsAsmPrinter::printOperand(),llvm::AVRAsmPrinter::printOperand(), andllvm::HexagonAsmPrinter::printOperand().
| inline |
Test whether this block is used as something other than the target of a terminator, exception-handling target, or jump table.
This is either the result of an IR-level "blockaddress", or some form of target-specific branch lowering.
Definition at line277 of fileMachineBasicBlock.h.
Referenced byllvm::MachineLoopInfo::findLoopPreheader(),isAlwaysIndirectTarget(),llvm::HexagonAsmPrinter::isBlockOnlyReachableByFallthrough(),GCEmptyBasicBlocks::runOnMachineFunction(), andllvm::TailDuplicator::tailDuplicateAndUpdate().
bool MachineBasicBlock::hasEHPadSuccessor | ( | ) | const |
Definition at line289 of fileMachineBasicBlock.cpp.
Referencessuccessors().
Referenced byisInvoke(), andisLegalToHoistInto().
| inline |
Test whether this block must have its label emitted.
Definition at line304 of fileMachineBasicBlock.h.
Referenced byllvm::AsmPrinter::emitBasicBlockStart(), andgetSymbol().
bool MachineBasicBlock::hasName | ( | ) | const |
Check if there is a name of corresponding LLVM basic block.
Definition at line320 of fileMachineBasicBlock.cpp.
ReferencesgetBasicBlock().
| inline |
Return true if any of the successors have probabilities attached to them.
Definition at line812 of fileMachineBasicBlock.h.
MachineBasicBlock::instr_iterator MachineBasicBlock::insert | ( | instr_iterator | I, |
MachineInstr * | M | ||
) |
Insert MI into the instruction list before I, possibly inside a bundle.
If the insertion point is inside a bundle, MI will be added to the bundle, otherwise MI will not be added to any bundle. That means this function alone can't be used to prepend or append instructions to bundles. SeeMIBundleBuilder::insert() for a more reliable way of doing that.
Definition at line1456 of fileMachineBasicBlock.cpp.
Referencesassert(),llvm::MachineInstr::BundledPred,llvm::MachineInstr::BundledSucc,I,llvm::iplist_impl< IntrusiveListT, TraitsT >::insert(),instr_end(), andMI.
Referenced byllvm::M68kInstrInfo::AnalyzeBranchImpl(),llvm::BuildMI(),llvm::AArch64InstrInfo::buildOutlinedFrame(),llvm::RISCVInstrInfo::buildOutlinedFrame(),llvm::X86InstrInfo::buildOutlinedFrame(),cloneCfiPrologue(),cloneInstr(),llvm::MachineFunction::cloneMachineInstrBundle(),llvm::WebAssemblyDebugValueManager::cloneSink(),CombineCVTAToLocal(),llvm::ARMBaseInstrInfo::convertToThreeAddress(),llvm::X86InstrInfo::convertToThreeAddress(),llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(),llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(),llvm::LiveDebugVariables::LDVImpl::emitDebugValues(),llvm::X86TargetLowering::EmitKCFICheck(),llvm::TargetLoweringBase::emitPatchPoint(),llvm::X86FrameLowering::emitPrologue(),llvm::ScheduleDAGSDNodes::EmitSchedule(),llvm::SPIRVTargetLowering::finalizeLowering(),llvm::TargetInstrInfo::foldMemoryOperand(),fuseInst(),fuseTwoAddrInst(),llvm::RegBankSelect::InsertPoint::insert(),insertDeleteInstructions(),llvm::MachineIRBuilder::insertInstr(),llvm::AArch64InstrInfo::insertOutlinedCall(),llvm::ARMBaseInstrInfo::insertOutlinedCall(),llvm::RISCVInstrInfo::insertOutlinedCall(),llvm::X86InstrInfo::insertOutlinedCall(),llvm::PPCInstrInfo::loadRegFromStackSlotNoUpd(),LowerCallResults(),llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(),llvm::ARMBaseInstrInfo::optimizeCompareInstr(),llvm::PeelSingleBlockLoop(),performSink(),popRegsFromStack(),ProcessSDDbgValues(),pushRegsToStack(),llvm::TargetInstrInfo::reMaterialize(),llvm::SIInstrInfo::reMaterialize(),llvm::ARMBaseInstrInfo::reMaterialize(),llvm::X86InstrInfo::reMaterialize(),restoreCRs(),llvm::GCNSchedStage::revertScheduling(),llvm::ARMBlockPlacement::revertWhileToDoLoop(),llvm::SelectionDAGISel::runOnMachineFunction(),llvm::GCNIterativeScheduler::scheduleRegion(),llvm::WebAssemblyDebugValueManager::sink(),llvm::PPCFrameLowering::spillCalleeSavedRegisters(), andllvm::PPCInstrInfo::storeRegToStackSlotNoUpd().
| inline |
| inline |
Insert MI into the instruction list after I.
Definition at line1030 of fileMachineBasicBlock.h.
Referencesassert(),end(),I, andMI.
Referenced byllvm::ARMFrameLowering::emitPrologue(),INITIALIZE_PASS(),InsertSEH(),insertSEH(),LowerCallResults(),packCmovGroup(), andllvm::SelectionDAGISel::runOnMachineFunction().
| inline |
If I is bundled then insert MI into the instruction list after the end of the bundle, otherwise insert MI immediately after I.
Definition at line1040 of fileMachineBasicBlock.h.
Referencesassert(),I,instr_end(), andMI.
| inline |
Definition at line330 of fileMachineBasicBlock.h.
| inline |
Definition at line332 of fileMachineBasicBlock.h.
| inline |
Definition at line339 of fileMachineBasicBlock.h.
Referenced byllvm::HexagonInstrInfo::analyzeBranch(),llvm::ARMBaseInstrInfo::analyzeBranch(),begin(),llvm::AArch64FrameLowering::emitPrologue(),llvm::finalizeBundles(),findPrevDebugLoc(),TransferTracker::flushDbgValues(),llvm::HexagonInstrInfo::getBranchingInstrs(),llvm::TargetInstrInfo::getCallFrameSizeAt(),getFirstInstrTerminator(),getFirstNonPHI(),getLastNonDebugInstr(),llvm::ReachingDefAnalysis::getLiveInUses(),INITIALIZE_PASS(),instrs(),isSignExtendedW(),llvm::PPCInstrInfo::isSignOrZeroExtended(),llvm::HexagonInstrInfo::nonDbgBBSize(),llvm::WebAssemblyInstrInfo::removeBranch(),ReplaceUsesOfBlockWith(),rescheduleCanonically(),rfindDebugLoc(), andSplitCriticalEdge().
| inline |
Definition at line340 of fileMachineBasicBlock.h.
| inline |
Definition at line341 of fileMachineBasicBlock.h.
Referenced byllvm::GCNSubtarget::adjustSchedDependency(),llvm::HexagonInstrInfo::analyzeBranch(),llvm::ARMBaseInstrInfo::analyzeBranch(),analyzeCompressibleUses(),llvm::AArch64InstrInfo::buildOutlinedFrame(),llvm::ARMBaseInstrInfo::buildOutlinedFrame(),llvm::AsmPrinter::emitCFIInstruction(),llvm::LiveDebugVariables::LDVImpl::emitDebugValues(),llvm::AMDGPUAsmPrinter::emitInstruction(),llvm::R600AsmPrinter::emitInstruction(),llvm::HexagonAsmPrinter::emitInstruction(),emitSelectPseudo(),emitThumbRegPlusImmInReg(),end(),llvm::examineCFlagsUse(),llvm::finalizeBundle(),llvm::finalizeBundles(),findDebugLoc(),findNextInsertLocation(),llvm::HexagonInstrInfo::getBranchingInstrs(),getFirstInstrTerminator(),getFirstNonPHI(),getLastNonDebugInstr(),llvm::ReachingDefAnalysis::getLiveInUses(),getLivePhysRegsUpTo(),llvm::HexagonInstrInfo::hasLoadFromStackSlot(),llvm::HexagonInstrInfo::hasStoreToStackSlot(),INITIALIZE_PASS(),insert(),insertAfterBundle(),instrs(),isLibCallInTailPosition(),llvm::HexagonInstrInfo::nonDbgBBSize(),llvm::WebAssemblyInstrInfo::removeBranch(),ReplaceUsesOfBlockWith(),rescheduleCanonically(),splitBlock(),SplitCriticalEdge(), andllvm::HexagonInstrInfo::translateInstrsForDup().
| inline |
Definition at line342 of fileMachineBasicBlock.h.
| inline |
Definition at line329 of fileMachineBasicBlock.h.
| inline |
Definition at line331 of fileMachineBasicBlock.h.
| inline |
Definition at line343 of fileMachineBasicBlock.h.
Referenced byforEachJumpTableBranch(),llvm::AArch64InstrInfo::getOutlinableRanges(),llvm::ReachingDefAnalysis::isRegUsedAfter(),rbegin(), andrfindDebugLoc().
| inline |
Definition at line344 of fileMachineBasicBlock.h.
| inline |
| inline |
Definition at line346 of fileMachineBasicBlock.h.
| inline |
Definition at line350 of fileMachineBasicBlock.h.
Referencesinstr_begin(), andinstr_end().
Referenced byllvm::ARMBaseInstrInfo::analyzeLoopForPipelining(),llvm::RegBankSelect::assignRegisterBanks(),llvm::WindowScheduler::backupMBB(),llvm::AArch64InstrInfo::buildOutlinedFrame(),llvm::ARMBaseInstrInfo::buildOutlinedFrame(),copyDebugInfoToPredecessor(),copyDebugInfoToSuccessor(),llvm::PPCInstrInfo::findLoopInstr(),findPrologueEnd(),getFirstTerminatorForward(),llvm::instrs(),llvm::MIPrinter::print(),print(),propagateLocalCopies(),rescheduleCanonically(), andverifyConvergenceControl().
| inline |
Definition at line351 of fileMachineBasicBlock.h.
Referencesinstr_begin(), andinstr_end().
| inline |
Returns true if this block begins any section.
Definition at line672 of fileMachineBasicBlock.h.
Referenced byllvm::avoidZeroOffsetLandingPad(),llvm::EHStreamer::computeCallSiteTable(),llvm::AsmPrinter::emitBasicBlockStart(),llvm::AsmPrinter::emitBBAddrMapSection(),llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(), andgetSymbol().
| inline |
Returns true if this is the entry block of a cleanup funclet.
Definition at line666 of fileMachineBasicBlock.h.
Referenced byllvm::WinException::beginFunclet(),llvm::X86FrameLowering::emitPrologue(), andgetMCSymbolForMBB().
| inline |
Returns true if this is a target block of a catchret.
Definition at line654 of fileMachineBasicBlock.h.
Referenced byllvm::AsmPrinter::emitBasicBlockStart().
| inline |
Returns true if this is the entry block of an EH funclet.
Definition at line660 of fileMachineBasicBlock.h.
Referenced byllvm::X86RegisterInfo::eliminateFrameIndex(),llvm::AsmPrinter::emitBasicBlockStart(),llvm::AArch64FrameLowering::emitPrologue(),llvm::X86FrameLowering::emitPrologue(),getBeginClobberMask(),getMCSymbolForMBB(),printName(),llvm::X86FrameLowering::restoreWinEHStackPointersInParent(), andllvm::X86FrameLowering::spillCalleeSavedRegisters().
| inline |
Returns true if the block is a landing pad.
That is this basic block is entered via an exception handler.
Definition at line634 of fileMachineBasicBlock.h.
Referenced byaddLiveIn(),assignSections(),llvm::avoidZeroOffsetLandingPad(),canSplitCriticalEdge(),collectEHScopeMembers(),llvm::EHStreamer::computeCallSiteTable(),llvm::VETargetLowering::emitSjLjDispatchBlock(),llvm::WebAssembly::findCatch(),llvm::findPHICopyInsertPoint(),getBBAddrMapMetadata(),llvm::WebAssembly::SortRegionInfo::getBottom(),llvm::getEHScopeMembership(),isAlwaysIndirectTarget(),llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(),printName(),llvm::WebAssemblyExceptionInfo::recalculate(),llvm::X86FrameLowering::restoreWinEHStackPointersInParent(),GCEmptyBasicBlocks::runOnMachineFunction(),llvm::MIRParserImpl::setupRegisterInfo(),sortBlocks(),splitEdge(), andupdateTerminator().
| inline |
Returns true if this is the entry block of an EH scope, i.e., the block that used to have a catchpad or cleanuppad instruction in the LLVM IR.
Definition at line647 of fileMachineBasicBlock.h.
Referenced byllvm::getEHScopeMembership().
| inline |
Convenience function that returns true if the bock ends in a EH scope return instruction.
Definition at line954 of fileMachineBasicBlock.h.
Referencesback(),empty(), andllvm::MachineInstr::isEHScopeReturn().
Referenced bycollectEHScopeMembers().
| inline |
Returns true if this block ends any section.
Definition at line675 of fileMachineBasicBlock.h.
Referenced byllvm::DwarfCompileUnit::attachRangesOrLowHighPC(),llvm::EHStreamer::computeCallSiteTable(),llvm::AsmPrinter::emitBasicBlockEnd(),llvm::AsmPrinter::emitBBAddrMapSection(),llvm::AsmPrinter::emitFunctionBody(),llvm::DebugHandlerBase::endInstruction(), andupdateBranches().
bool MachineBasicBlock::isEntryBlock | ( | ) | const |
Returns true if this is the entry block of the function.
Definition at line296 of fileMachineBasicBlock.cpp.
Referencesllvm::MachineFunction::begin(),llvm::ilist_node_impl< ilist_detail::compute_node_options< T, Options... >::type >::getIterator(), andgetParent().
Referenced byllvm::DebugHandlerBase::beginBasicBlockSection(),llvm::AsmPrinter::emitBasicBlockStart(), andllvm::AsmPrinter::emitBBAddrMapSection().
| inline |
Returns true if this is the indirect dest of an INLINEASM_BR.
Definition at line704 of fileMachineBasicBlock.h.
Referenced bycanSplitCriticalEdge(),llvm::TailDuplicator::canTailDuplicate(),llvm::findPHICopyInsertPoint(),llvm::AArch64InstrInfo::isMBBSafeToSplitToCold(), andprintName().
| inline |
Test whether this block is the target of an IRBlockAddress.
(There can more than one MBB associated with an IR BB where the address is taken.)
Definition at line289 of fileMachineBasicBlock.h.
Referenced byllvm::AsmPrinter::emitBasicBlockStart(), andprintName().
bool MachineBasicBlock::isLayoutSuccessor | ( | constMachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB will be emitted immediately after this block, such that if this block exits by falling through, control will transfer to the specified MBB.
Note that MBB need not be a successor at all, for example if this block ends with an unconditional branch to some other block.
Definition at line964 of fileMachineBasicBlock.cpp.
Referenced byllvm::BPFInstrInfo::analyzeBranch(),llvm::HexagonInstrInfo::analyzeBranch(),llvm::MSP430InstrInfo::analyzeBranch(),llvm::PPCInstrInfo::analyzeBranch(),llvm::SystemZInstrInfo::analyzeBranch(),llvm::AArch64InstrInfo::analyzeBranch(),llvm::ARMBaseInstrInfo::analyzeBranch(),llvm::LanaiInstrInfo::analyzeBranch(),llvm::M68kInstrInfo::AnalyzeBranchImpl(),llvm::FastISel::fastEmitBranch(),llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(),llvm::CombinerHelper::matchOptBrCondByInvertingCond(),ProfitableToMerge(),SplitCriticalEdge(),splitEdge(),updateTerminator(), andupdateTerminator().
bool MachineBasicBlock::isLegalToHoistInto | ( | ) | const |
Returns true if it is legal to hoist instructions into this block.
Definition at line314 of fileMachineBasicBlock.cpp.
ReferenceshasEHPadSuccessor(),isReturnBlock(), andmayHaveInlineAsmBr().
bool MachineBasicBlock::isLiveIn | ( | MCRegister | Reg, |
LaneBitmask | LaneMask =LaneBitmask::getAll() | ||
) | const |
Return true if the specified register is in the live in set.
Definition at line618 of fileMachineBasicBlock.cpp.
Referencesllvm::find_if(),I,livein_end(), andllvm::MachineBasicBlock::RegisterMaskPair::PhysReg.
Referenced byaddLiveIn(),addLiveInRegs(),addSavedGPR(),AnyAliasLiveIn(),llvm::AArch64InstrInfo::buildOutlinedFrame(),llvm::ARMBaseInstrInfo::buildOutlinedFrame(),buildPrologSpill(),llvm::AArch64FrameLowering::canUseAsPrologue(),llvm::X86FrameLowering::canUseAsPrologue(),llvm::X86TargetLowering::EmitInstrWithCustomInserter(),llvm::MipsSEFrameLowering::emitPrologue(),llvm::SystemZXPLINKFrameLowering::emitPrologue(),llvm::SystemZInstrInfo::foldMemoryOperandImpl(),llvm::getFunctionLiveInPhysReg(),llvm::ReachingDefAnalysis::getGlobalUses(),INITIALIZE_PASS(),llvm::SystemZXPLINKFrameLowering::inlineStackProbe(),llvm::AArch64InstrInfo::insertOutlinedCall(),llvm::ARMBaseInstrInfo::insertOutlinedCall(),isEFLAGSLive(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::SystemZELFFrameLowering::processFunctionBeforeFrameFinalized(),llvm::RISCVFrameLowering::spillCalleeSavedRegisters(), andupdateLiveness().
| inline |
Test whether this block is used as something other than the target of a terminator, exception-handling target, jump table, or IR blockaddress.
For example, its address might be loaded into a register, or stored in some branch table that isn't part ofMachineJumpTableInfo.
Definition at line285 of fileMachineBasicBlock.h.
Referenced byllvm::AsmPrinter::emitBasicBlockStart(), andprintName().
bool MachineBasicBlock::isPredecessor | ( | constMachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB is a predecessor of this block.
Definition at line956 of fileMachineBasicBlock.cpp.
Referencesllvm::is_contained(),MBB, andpredecessors().
Referenced bygetPreviousInstr(),llvm::MachineTraceMetrics::Ensemble::invalidate(), andllvm::MachineTraceMetrics::Ensemble::verify().
| inline |
Convenience function that returns true if the block ends in a return instruction.
Definition at line948 of fileMachineBasicBlock.h.
Referencesback(),empty(), andllvm::MachineInstr::isReturn().
Referenced byllvm::LiveRegUnits::addLiveOuts(),llvm::LivePhysRegs::addLiveOutsNoPristines(),llvm::RISCVFrameLowering::canUseAsEpilogue(),llvm::X86FrameLowering::canUseAsEpilogue(),llvm::MSP430FrameLowering::emitEpilogue(),llvm::X86FrameLowering::emitEpilogue(),getBBAddrMapMetadata(),getEndClobberMask(),isLegalToHoistInto(),llvm::ARMBaseInstrInfo::isMBBSafeToOutlineFrom(),llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(),llvm::AggressiveAntiDepBreaker::StartBlock(), andllvm::CriticalAntiDepBreaker::StartBlock().
bool MachineBasicBlock::isSuccessor | ( | constMachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB is a successor of this block.
Definition at line960 of fileMachineBasicBlock.cpp.
Referencesllvm::is_contained(),MBB, andsuccessors().
Referenced byaddIncomingValuesToPHIs(),llvm::ARMFrameLowering::adjustForSegmentedStacks(),llvm::ScheduleDAGMILive::computeCyclicCriticalPath(),getFallThrough(),getLayoutSuccessorProbThreshold(),getNextMachineInstr(),llvm::MachineTraceMetrics::Ensemble::invalidate(),IsBetterFallthrough(),llvm::ARMBlockPlacement::moveBasicBlock(),llvm::TailDuplicator::shouldTailDuplicate(),splitEdge(),updatePHIs(),updateTerminator(), andllvm::MachineTraceMetrics::Ensemble::verify().
MachineBasicBlock::livein_iterator MachineBasicBlock::livein_begin | ( | ) | const |
Definition at line1753 of fileMachineBasicBlock.cpp.
Referencesassert(),getParent(), andllvm::MachineFunctionProperties::TracksLiveness.
Referenced byliveins().
| inline |
Unlike livein_begin, this method does not check that the liveness information is accurate.
Still for debug purposes it may be useful to have iterators that won't assert if the liveness information is not current.
Definition at line497 of fileMachineBasicBlock.h.
Referenced byliveins_dbg().
| inline |
Definition at line504 of fileMachineBasicBlock.h.
Referenced byllvm::addLiveIns(),llvm::MIPrinter::print(), andprint().
| inline |
Definition at line503 of fileMachineBasicBlock.h.
Referenced byisLiveIn(),liveins(), andliveins_dbg().
| inline |
Definition at line505 of fileMachineBasicBlock.h.
Referenceslivein_begin(),livein_end(), andllvm::make_range().
Referenced byaddBlockLiveIns(),llvm::X86FrameLowering::adjustForHiPEPrologue(),llvm::ARMFrameLowering::adjustForSegmentedStacks(),llvm::X86FrameLowering::adjustForSegmentedStacks(),llvm::rdf::DataFlowGraph::build(),computeRegisterLiveness(),isEAXLiveIn(),isRegLiveIn(),print(),llvm::AArch64FrameLowering::spillCalleeSavedRegisters(),SplitCriticalEdge(),splitEdge(), andtryToSplitRestore().
| inline |
Definition at line498 of fileMachineBasicBlock.h.
Referenceslivein_begin_dbg(),livein_end(), andllvm::make_range().
Referenced byllvm::MIPrinter::print().
MachineBasicBlock::liveout_iterator MachineBasicBlock::liveout_begin | ( | ) | const |
Iterator scanning successor basic blocks' liveins to determine the registers potentially live at the end of this block.
There may be duplicates or overlapping registers in the list returned.
Definition at line1760 of fileMachineBasicBlock.cpp.
Referencesassert(),llvm::TargetLoweringBase::getExceptionPointerRegister(),llvm::TargetLoweringBase::getExceptionSelectorRegister(),llvm::MachineFunction::getFunction(),getParent(),llvm::Function::getPersonalityFn(),llvm::MachineFunction::getProperties(),llvm::MachineFunction::getSubtarget(),llvm::TargetSubtargetInfo::getTargetLowering(),llvm::Function::hasPersonalityFn(),llvm::MachineFunctionProperties::hasProperty(), andllvm::MachineFunctionProperties::TracksLiveness.
Referenced byliveouts().
| inline |
Definition at line598 of fileMachineBasicBlock.h.
Referenced byliveouts().
| inline |
Definition at line601 of fileMachineBasicBlock.h.
Referencesliveout_begin(),liveout_end(), andllvm::make_range().
Referenced byemitThumbRegPlusImmInReg().
bool MachineBasicBlock::mayHaveInlineAsmBr | ( | ) | const |
Returns true if this block may have an INLINEASM_BR (overestimate, by checking if any of the successors are indirect targets of any inlineasm_br in the function).
Definition at line306 of fileMachineBasicBlock.cpp.
Referencessuccessors().
Referenced byisLegalToHoistInto().
void MachineBasicBlock::moveAfter | ( | MachineBasicBlock * | NewBefore | ) |
Definition at line680 of fileMachineBasicBlock.cpp.
Referencesllvm::ilist_node_impl< ilist_detail::compute_node_options< T, Options... >::type >::getIterator(),llvm::ilist_node_impl< OptionsT >::getIterator(),getParent(), andllvm::MachineFunction::splice().
Referenced byllvm::ARMTargetLowering::EmitInstrWithCustomInserter(), andsortBlocks().
void MachineBasicBlock::moveBefore | ( | MachineBasicBlock * | NewAfter | ) |
Move 'this' block before or after the specified block.
This only moves the block, it does not modify the CFG or adjust potential fall-throughs at the end of the block.
Definition at line676 of fileMachineBasicBlock.cpp.
Referencesllvm::ilist_node_impl< ilist_detail::compute_node_options< T, Options... >::type >::getIterator(),llvm::ilist_node_impl< OptionsT >::getIterator(),getParent(), andllvm::MachineFunction::splice().
Referenced byllvm::ARMBlockPlacement::moveBasicBlock().
| inline |
Normalize probabilities of all successors so that the sum of them becomes one.
This is usually done when the current update on this MBB is done, and the sum of its successors' probabilities is not guaranteed to be one. The user is responsible for the correct use of this function. MBB::removeSuccessor() has an option to do this automatically.
Definition at line764 of fileMachineBasicBlock.h.
Referencesllvm::BranchProbability::normalizeProbabilities().
Referenced byllvm::SwitchCG::SwitchLowering::buildJumpTable(),removeSuccessor(),splitSuccessor(),transferSuccessorsAndUpdatePHIs(),llvm::SelectionDAGBuilder::visitBitTestCase(),llvm::SelectionDAGBuilder::visitBitTestHeader(), andllvm::SelectionDAGBuilder::visitSwitchCase().
| inline |
Returns a range that iterates over the phis in the basic block.
Definition at line383 of fileMachineBasicBlock.h.
Referencesbegin(),getFirstNonPHI(), andllvm::make_range().
Referenced byllvm::ModuloScheduleExpanderMVE::canApply(),llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(),llvm::PeelingModuloScheduleExpander::fixupBranches(),llvm::WindowScheduler::generateTripleMBB(),llvm::WindowScheduler::getIssueOrder(),llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(),phis(),replacePhiUsesWith(), andllvm::WindowScheduler::schedulePhi().
| inline |
Definition at line386 of fileMachineBasicBlock.h.
Referencesphis().
| inline |
Definition at line1001 of fileMachineBasicBlock.h.
| inline |
Definition at line1000 of fileMachineBasicBlock.h.
| inline |
Definition at line405 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::begin().
Referenced byllvm::ARMBaseInstrInfo::analyzeLoopForPipelining(),llvm::PPCInstrInfo::analyzeLoopForPipelining(),BBIsJumpedOver(),bbIsJumpedOver(),llvm::ModuloScheduleExpander::expand(),llvm::SPIRVTargetLowering::finalizeLowering(),findWLS(),getSingleSchedPred(),INITIALIZE_PASS(),llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(),llvm::ARMBaseInstrInfo::isProfitableToIfCvt(),isSaveReachableThroughClean(),llvm::PeelingModuloScheduleExpander::moveStageBetweenBlocks(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::PeelingModuloScheduleExpander::peelPrologAndEpilogs(),llvm::pred_begin(),predecessors(),llvm::LiveVariables::recomputeForSingleDefVirtReg(),searchPredecessors(),SinkingPreventsImplicitNullCheck(), andVerifyPHIs().
| inline |
Definition at line406 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::begin().
| inline |
Definition at line420 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorBase< Size_T >::empty().
Referenced byllvm::rdf::DataFlowGraph::build(),eraseDeadBBsAndChildren(),llvm::SPIRVTargetLowering::finalizeLowering(),llvm::getEHScopeMembership(),llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(),llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(),llvm::TailDuplicator::isSimpleBB(),print(),llvm::TailDuplicator::tailDuplicateAndUpdate(), andvalidThroughout().
| inline |
Definition at line407 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced byisSaveReachableThroughClean(),llvm::pred_end(),predecessors(),llvm::LiveVariables::recomputeForSingleDefVirtReg(),searchPredecessors(), andVerifyPHIs().
| inline |
Definition at line408 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::end().
| inline |
Definition at line409 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rbegin().
Referenced byllvm::LiveVariables::MarkVirtRegAliveInBlock().
| inline |
Definition at line411 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rbegin().
| inline |
Definition at line413 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rend().
Referenced byllvm::LiveVariables::MarkVirtRegAliveInBlock().
| inline |
Definition at line415 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rend().
| inline |
Definition at line417 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorBase< Size_T >::size().
Referenced byBBIsJumpedOver(),bbIsJumpedOver(),llvm::MachineLoopInfo::findLoopPreheader(),findWLS(),getIndVarInfo(),getSingleSchedPred(),llvm::LiveIntervals::hasPHIKill(),llvm::XtensaInstrInfo::insertIndirectBranch(),llvm::AArch64InstrInfo::insertIndirectBranch(),llvm::SIInstrInfo::insertIndirectBranch(),llvm::LoongArchInstrInfo::insertIndirectBranch(),llvm::RISCVInstrInfo::insertIndirectBranch(),llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(),llvm::ARMBaseInstrInfo::isProfitableToIfCvt(),isSaveReachableThroughClean(),llvm::RegBankSelect::EdgeInsertPoint::isSplit(),isSplitEdge(),llvm::rdf::operator<<(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::pred_size(),llvm::IRTranslator::runOnMachineFunction(),salvageDebugInfoFromEmptyBlock(),llvm::TailDuplicator::shouldTailDuplicate(),SinkingPreventsImplicitNullCheck(), andsortBlocks().
| inline |
Definition at line438 of fileMachineBasicBlock.h.
Referencesllvm::make_range(),pred_begin(), andpred_end().
Referenced byllvm::ARMFrameLowering::adjustForSegmentedStacks(),CanLowerPriorityDirectlyInPredecessors(),llvm::ConnectedVNInfoEqClasses::Classify(),llvm::HexagonInstrInfo::findLoopInstr(),llvm::MachineLoopInfo::findLoopPreheader(),findPotentialBlockers(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::FindPredecessorBlocks(),getBBFallenThrough(),llvm::ReachingDefAnalysis::getLiveOuts(),llvm::afdo_detail::IRTraits< MachineBasicBlock >::getPredecessors(),getSingleSchedPred(),llvm::ReachingDefAnalysis::getUniqueReachingMIDef(),llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(),getWaitStatesSince(),llvm::LiveVariables::HandleVirtRegUse(),hasDirtyPred(),hasHazard(),llvm::LiveIntervals::hasPHIKill(),llvm::MachineTraceMetrics::Ensemble::invalidate(),isPredecessor(),jumpTableHasOtherUses(),llvm::rdf::operator<<(),llvm::predecessors(),print(),llvm::SwiftErrorValueTracking::propagateVRegs(),GCEmptyBasicBlocks::runOnMachineFunction(),salvageDebugInfoFromEmptyBlock(),searchPredecessors(),sortBlocks(), andverifyCTRBranch().
| inline |
Definition at line441 of fileMachineBasicBlock.h.
Referencesllvm::make_range(),pred_begin(), andpred_end().
void MachineBasicBlock::print | ( | raw_ostream & | OS, |
constSlotIndexes * | Indexes =nullptr , | ||
bool | IsStandalone =true | ||
) | const |
Definition at line345 of fileMachineBasicBlock.cpp.
ReferencesF,llvm::MachineFunction::getFunction(),getParent(),llvm::ModuleSlotTracker::incorporateFunction(),OS, andprint().
Referenced bydump(),llvm::operator<<(),llvm::VPInstruction::print(),llvm::SDNode::print(),print(),llvm::MachineInstr::print(), andllvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
void MachineBasicBlock::print | ( | raw_ostream & | OS, |
ModuleSlotTracker & | MST, | ||
constSlotIndexes * | Indexes =nullptr , | ||
bool | IsStandalone =true | ||
) | const |
Definition at line360 of fileMachineBasicBlock.cpp.
Referencesllvm::MachineInstr::BundledSucc,llvm::format(),llvm::BranchProbability::getDenominator(),llvm::TargetSubtargetInfo::getInstrInfo(),llvm::SlotIndexes::getInstructionIndex(),llvm::SlotIndexes::getMBBStartIdx(),llvm::BranchProbability::getNumerator(),getParent(),llvm::MachineFunction::getRegInfo(),llvm::TargetSubtargetInfo::getRegisterInfo(),llvm::MachineFunction::getSubtarget(),getSuccProbability(),llvm::SlotIndexes::hasIndex(),I,llvm::raw_ostream::indent(),instrs(),livein_empty(),liveins(),MI,MRI,OS,pred_empty(),predecessors(),llvm::Pass::print(),llvm::PrintLaneMask(),llvm::printMBBReference(),printName(),PrintNameAttributes,PrintNameIr,llvm::printReg(),PrintSlotIndexes,succ_begin(),succ_empty(),succ_end(),TII, andTRI.
void MachineBasicBlock::printAsOperand | ( | raw_ostream & | OS, |
bool | PrintType =true | ||
) | const |
Definition at line594 of fileMachineBasicBlock.cpp.
ReferencesOS, andprintName().
Referenced byllvm::MIPrinter::print(),llvm::MachineInstr::print(), andllvm::printMBBReference().
void MachineBasicBlock::printName | ( | raw_ostream & | os, |
unsigned | printNameFlags =PrintNameIr , | ||
ModuleSlotTracker * | moduleSlotTracker =nullptr | ||
) | const |
Print the basic block's name as:
bb.{number}[.{ir-name}] [(attributes...)]
The {ir-name} is only printed when thePrintNameIr flag is passed (which is the default). If the IR block has no name, it is identified numerically using the attribute syntax as "(%ir-block.{ir-slot})".
When thePrintNameAttributes flag is passed, additional attributes of the block are printed when set.
printNameFlags | Combination ofPrintNameFlag flags indicating the parts to print. |
moduleSlotTracker | OptionalModuleSlotTracker. This method will incorporate its own tracker when necessary to determine the block's IR name. |
Definition at line490 of fileMachineBasicBlock.cpp.
Referencesllvm::MBBSectionID::Cold,llvm::MBBSectionID::Exception,getAddressTakenIRBlock(),getAlignment(),getBasicBlock(),getBBID(),llvm::ModuleSlotTracker::getLocalSlot(),getNumber(),getSectionID(),llvm::ModuleSlotTracker::incorporateFunction(),isEHFuncletEntry(),isEHPad(),isInlineAsmBrIndirectTarget(),isIRBlockAddressTaken(),isMachineBlockAddressTaken(),llvm::MBBSectionID::Number,PrintNameAttributes,PrintNameIr,llvm::MBBSectionID::Type, andllvm::Align::value().
Referenced byllvm::MIPrinter::print(),print(),printAsOperand(), andllvm::GCNRegPressurePrinter::runOnMachineFunction().
| inline |
Definition at line1002 of fileMachineBasicBlock.h.
ReferencesMI.
Referenced byllvm::M68kInstrInfo::AnalyzeBranchImpl(),emitSelectPseudo(),llvm::WindowScheduler::generateTripleMBB(),llvm::PhiLoweringHelper::lowerPhis(), andllvm::WindowScheduler::restoreMBB().
| inline |
Definition at line359 of fileMachineBasicBlock.h.
Referencesllvm::MachineInstrBundleIterator< MachineInstr, true >::getAtBundleBegin(), andinstr_rbegin().
Referenced byllvm::MipsInstrInfo::analyzeBranch(),llvm::M68kInstrInfo::AnalyzeBranchImpl(),dominatesAllUsesOf(),FindLastAluClause(),llvm::findPHICopyInsertPoint(),getBBAddrMapMetadata(),isImplicitFallthrough(),llvm::ARMBaseInstrInfo::isMBBSafeToOutlineFrom(),llvm::ARMBaseInstrInfo::isProfitableToIfCvt(),mergeOperations(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::MipsInstrInfo::removeBranch(),llvm::InstructionSelect::selectMachineFunction(),llvm::X86FrameLowering::spillFPBP(),splitAt(), andverifySameBranchInstructions().
| inline |
Definition at line362 of fileMachineBasicBlock.h.
Referencesllvm::MachineInstrBundleIterator< Ty, IsReverse >::getAtBundleBegin(), andinstr_rbegin().
| inline |
Remove the unbundled instruction from the instruction list without deleting it.
This function can not be used to remove bundled instructions, use remove_instr to remove individual instructions from a bundle.
Definition at line1089 of fileMachineBasicBlock.h.
Referenced byllvm::WindowScheduler::backupMBB(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::MachineInstr::removeFromParent(),llvm::GCNSchedStage::revertScheduling(), andllvm::GCNIterativeScheduler::scheduleRegion().
MachineInstr * MachineBasicBlock::remove_instr | ( | MachineInstr * | I | ) |
Remove the possibly bundled instruction from the instruction list without deleting it.
If the instruction is part of a bundle, the other instructions in the bundle will still be bundled after removing the single instruction.
Definition at line1448 of fileMachineBasicBlock.cpp.
Referencesllvm::MachineInstr::BundledPred,llvm::MachineInstr::BundledSucc,MI,llvm::iplist_impl< IntrusiveListT, TraitsT >::remove(), andunbundleSingleMI().
Referenced byllvm::AArch64TargetLowering::EmitAllocateSMESaveBuffer(),llvm::AArch64TargetLowering::EmitAllocateZABuffer(),llvm::AArch64TargetLowering::EmitGetSMESaveSize(),llvm::AArch64TargetLowering::EmitInitTPIDR2Object(),llvm::SPIRVTargetLowering::finalizeLowering(), andllvm::MachineInstr::removeFromBundle().
MachineBasicBlock * MachineBasicBlock::removeFromParent | ( | ) |
This method unlinks 'this' from the containing function, and returns it, but does not delete it.
Definition at line1469 of fileMachineBasicBlock.cpp.
Referencesassert(),getParent(), andllvm::MachineFunction::remove().
MachineBasicBlock::livein_iterator MachineBasicBlock::removeLiveIn | ( | MachineBasicBlock::livein_iterator | I | ) |
Remove entry from the livein set and return iterator to the next.
Definition at line612 of fileMachineBasicBlock.cpp.
ReferencesI.
void MachineBasicBlock::removeLiveIn | ( | MCRegister | Reg, |
LaneBitmask | LaneMask =LaneBitmask::getAll() | ||
) |
Remove the specified register from the live in set.
Definition at line600 of fileMachineBasicBlock.cpp.
Referencesllvm::find_if(),I, andllvm::MachineBasicBlock::RegisterMaskPair::PhysReg.
Referenced byemitGPDisp(),llvm::SIMachineFunctionInfo::shiftWwmVGPRsToLowestRange(), andupdateLiveIn().
void MachineBasicBlock::removeSuccessor | ( | MachineBasicBlock * | Succ, |
bool | NormalizeSuccProbs =false | ||
) |
Remove successor from the successors list of thisMachineBasicBlock.
The Predecessors list of Succ is automatically updated. If NormalizeSuccProbs is true, then normalize successors' probabilities after the successor is removed.
Definition at line836 of fileMachineBasicBlock.cpp.
Referencesllvm::find(),I, andremoveSuccessor().
Referenced byllvm::VETargetLowering::emitSjLjDispatchBlock(),eraseDeadBBsAndChildren(),removeSuccessor(),replaceSuccessor(),llvm::TargetInstrInfo::ReplaceTailWithBranchTo(),rollbackRestoreSplit(),GCEmptyBasicBlocks::runOnMachineFunction(),transferSuccessors(),transferSuccessorsAndUpdatePHIs(), andllvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
MachineBasicBlock::succ_iterator MachineBasicBlock::removeSuccessor | ( | succ_iterator | I, |
bool | NormalizeSuccProbs =false | ||
) |
Remove specified successor from the successors list of thisMachineBasicBlock.
The Predecessors list of Succ is automatically updated. If NormalizeSuccProbs is true, then normalize successors' probabilities after the successor is removed. Return the iterator to the element after the one removed.
Definition at line843 of fileMachineBasicBlock.cpp.
Referencesassert(),I, andnormalizeSuccProbs().
| inline |
Definition at line365 of fileMachineBasicBlock.h.
Referencesinstr_rend().
Referenced byllvm::LoongArchInstrInfo::analyzeBranch(),llvm::RISCVInstrInfo::analyzeBranch(),llvm::MipsInstrInfo::analyzeBranch(),llvm::CSKYInstrInfo::analyzeBranch(),llvm::M68kInstrInfo::AnalyzeBranchImpl(),collectCallSiteParameters(),llvm::HexagonRegisterInfo::eliminateFrameIndex(),llvm::X86TargetLowering::EmitInstrWithCustomInserter(),FindLastAluClause(),llvm::findPHICopyInsertPoint(),INITIALIZE_PASS(),isImplicitFallthrough(),llvm::ARMBaseInstrInfo::isMBBSafeToOutlineFrom(),llvm::PPCRegisterInfo::lowerCRBitSpilling(),mergeOperations(),llvm::X86InstrInfo::optimizeCompareInstr(),llvm::RISCVInstrInfo::optimizeCondBranch(),performCopyPropagation(),llvm::MipsInstrInfo::removeBranch(),llvm::InstructionSelect::selectMachineFunction(),llvm::X86FrameLowering::spillFPBP(),validThroughout(), andverifySameBranchInstructions().
| inline |
Definition at line366 of fileMachineBasicBlock.h.
Referencesinstr_rend().
void MachineBasicBlock::replacePhiUsesWith | ( | MachineBasicBlock * | Old, |
MachineBasicBlock * | New | ||
) |
Update all phi nodes in this basic block to refer to basic blockNew
instead of basic blockOld
.
Definition at line1503 of fileMachineBasicBlock.cpp.
Referencesllvm::MachineOperand::getMBB(),MI,phis(), andllvm::MachineOperand::setMBB().
Referenced bySplitCriticalEdge(), andtransferSuccessorsAndUpdatePHIs().
void MachineBasicBlock::replaceSuccessor | ( | MachineBasicBlock * | Old, |
MachineBasicBlock * | New | ||
) |
Replace successor OLD with NEW and update probability info.
Definition at line859 of fileMachineBasicBlock.cpp.
Referencesassert(),I,removeSuccessor(),succ_begin(), andsucc_end().
Referenced byllvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(),ReplaceUsesOfBlockWith(),llvm::ARMBlockPlacement::revertWhileToDoLoop(), andsplitEdge().
void MachineBasicBlock::ReplaceUsesOfBlockWith | ( | MachineBasicBlock * | Old, |
MachineBasicBlock * | New | ||
) |
Given a machine basic block that branched to 'Old', change the code and CFG so that it branches to 'New' instead.
Definition at line1483 of fileMachineBasicBlock.cpp.
Referencesassert(),I,instr_begin(),instr_end(), andreplaceSuccessor().
Referenced byllvm::ARMFrameLowering::adjustForSegmentedStacks(),llvm::PeelSingleBlockLoop(), andSplitCriticalEdge().
DebugLoc MachineBasicBlock::rfindDebugLoc | ( | reverse_instr_iterator | MBBI | ) |
Has exact same behavior asfindDebugLoc (it also searches towards the end of this MBB) except that this function takes a reverse iterator to identify the starting MI.
Definition at line1524 of fileMachineBasicBlock.cpp.
ReferencesfindDebugLoc(),instr_begin(),instr_rbegin(),instr_rend(),MBBI, andllvm::skipDebugInstructionsBackward().
Referenced byllvm::M68kInstrInfo::AnalyzeBranchImpl(), andrfindDebugLoc().
| inline |
Definition at line1152 of fileMachineBasicBlock.h.
ReferencesMBBI, andrfindDebugLoc().
DebugLoc MachineBasicBlock::rfindPrevDebugLoc | ( | reverse_instr_iterator | MBBI | ) |
Has exact same behavior asfindPrevDebugLoc (it also searches towards the beginning of this MBB) except that this function takes reverse iterator to identify the starting MI.
A minor difference compared to findPrevDebugLoc is that we can't start scanning at "instr_end".
Definition at line1546 of fileMachineBasicBlock.cpp.
Referencesinstr_rend(),MBBI, andllvm::next_nodbg().
Referenced byrfindPrevDebugLoc().
| inline |
Definition at line1169 of fileMachineBasicBlock.h.
ReferencesMBBI, andrfindPrevDebugLoc().
| inline |
Returns true if this and MBB belong to the same section.
Definition at line725 of fileMachineBasicBlock.h.
ReferencesgetSectionID(), andMBB.
Referenced byllvm::DwarfCompileUnit::attachRangesOrLowHighPC(), andllvm::AsmPrinter::emitFunctionBody().
| inline |
Set this block to reflect that it corresponds to an IR-level basic block with aBlockAddress.
Definition at line301 of fileMachineBasicBlock.h.
Referenced byllvm::IRTranslator::runOnMachineFunction(), andllvm::FunctionLoweringInfo::set().
| inline |
Set alignment of the basic block.
Definition at line617 of fileMachineBasicBlock.h.
ReferencesA.
Referenced byAlignBlocks(), andsetAlignment().
Definition at line619 of fileMachineBasicBlock.h.
ReferencesA,setAlignment(), andsetMaxBytesForAlignment().
| inline |
Sets the fixed BBID of this basic block.
Definition at line687 of fileMachineBasicBlock.h.
Referencesassert().
Referenced byllvm::MachineFunction::CreateMachineBasicBlock().
| inline |
Set the call frame size on entry to this basic block.
Definition at line1223 of fileMachineBasicBlock.h.
ReferencesN.
Referenced byllvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::AVRTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),emitSelectPseudo(), andSplitCriticalEdge().
| inline |
Definition at line1235 of fileMachineBasicBlock.h.
Definition at line677 of fileMachineBasicBlock.h.
Referenced byllvm::MachineFunction::assignBeginEndSections().
Indicates if this is the entry block of a cleanup funclet.
Definition at line669 of fileMachineBasicBlock.h.
Indicates if this is a target block of a catchret.
Definition at line657 of fileMachineBasicBlock.h.
Indicates if this is the entry block of an EH funclet.
Definition at line663 of fileMachineBasicBlock.h.
Indicates the block is a landing pad.
That is this basic block is entered via an exception handler.
Definition at line638 of fileMachineBasicBlock.h.
Referenced byllvm::VETargetLowering::emitSjLjDispatchBlock(), andllvm::FunctionLoweringInfo::set().
Indicates if this is the entry block of an EH scope, i.e., the block that that used to have a catchpad or cleanuppad instruction in the LLVM IR.
Definition at line651 of fileMachineBasicBlock.h.
Definition at line679 of fileMachineBasicBlock.h.
Referenced byllvm::MachineFunction::assignBeginEndSections().
Indicates if this is the indirect dest of an INLINEASM_BR.
Definition at line709 of fileMachineBasicBlock.h.
| inline |
Set this block to reflect that, regardless how we flow to it, we need its label be emitted.
Definition at line308 of fileMachineBasicBlock.h.
| inline |
Set this block to indicate that its address is used as something other than the target of a terminator, exception-handling target, jump table, or IR-level "blockaddress".
Definition at line297 of fileMachineBasicBlock.h.
Referenced byllvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(), andllvm::AArch64InstrInfo::expandPostRAPseudo().
| inline |
Set the maximum amount of padding allowed for aligning the basic block.
Definition at line628 of fileMachineBasicBlock.h.
Referenced bysetAlignment().
| inline |
Definition at line1218 of fileMachineBasicBlock.h.
Referenced byllvm::MachineFunction::RenumberBlocks().
| inline |
Sets the section ID for this basic block.
Definition at line693 of fileMachineBasicBlock.h.
Referenced byassignSections().
void MachineBasicBlock::setSuccProbability | ( | succ_iterator | I, |
BranchProbability | Prob | ||
) |
Set successor probability of a given iterator.
Definition at line1598 of fileMachineBasicBlock.cpp.
Referencesassert(),I, andllvm::BranchProbability::isUnknown().
Referenced byllvm::MIRProfileLoader::setBranchProbs(), andsplitMBB().
| inline |
Definition at line325 of fileMachineBasicBlock.h.
Referenced byllvm::AggressiveAntiDepState::AggressiveAntiDepState(),llvm::RISCVFrameLowering::canUseAsEpilogue(),llvm::ScheduleDAGMI::dumpScheduleTraceBottomUp(),llvm::ScheduleDAGMI::dumpScheduleTraceTopDown(),llvm::CSKYFrameLowering::emitEpilogue(),llvm::LoongArchFrameLowering::emitEpilogue(),llvm::CSKYFrameLowering::emitPrologue(),llvm::LoongArchFrameLowering::emitPrologue(),llvm::VLIWMachineScheduler::getBBSize(),llvm::GCNRegPressurePrinter::runOnMachineFunction(),llvm::ARMBaseRegisterInfo::shouldCoalesce(),llvm::AggressiveAntiDepBreaker::StartBlock(),llvm::CriticalAntiDepBreaker::StartBlock(),llvm::TailDuplicator::tailDuplicateAndUpdate(), andllvm::MemorySSA::verifyOrderingDominationAndDefUses().
Definition at line1777 of fileMachineBasicBlock.cpp.
Referencesbegin(),end(),I, andllvm::instructionsWithoutDebug().
MachineBasicBlock::iterator MachineBasicBlock::SkipPHIsAndLabels | ( | MachineBasicBlock::iterator | I | ) |
Return the first instruction in MBB after I that is not a PHI or a label.
This is the correct point to insert lowered copies at the beginning of a basic block that must be before any debugging information.
Definition at line212 of fileMachineBasicBlock.cpp.
Referencesassert(),end(),llvm::TargetSubtargetInfo::getInstrInfo(),getParent(),llvm::MachineFunction::getSubtarget(),I, andTII.
Referenced byaddLiveIn(),llvm::AMDGPU::RegBankLegalizeHelper::applyMappingPHI(),RegBankSelectHelper::constrainRegBankUse(),copyDebugInfoToSuccessor(),llvm::findPHICopyInsertPoint(),llvm::getOpVariableMBBIt(), andRegBankSelectHelper::reAssignRegBankOnDef().
MachineBasicBlock::iterator MachineBasicBlock::SkipPHIsLabelsAndDebug | ( | MachineBasicBlock::iterator | I, |
Register | Reg =Register() , | ||
bool | SkipPseudoOp =true | ||
) |
Return the first instruction in MBB after I that is not a PHI, label or debug.
This is the correct point to insert copies at the beginning of a basic block.Reg
is the register being used by a spill or defined for a restore/split during register allocation.
Definition at line227 of fileMachineBasicBlock.cpp.
Referencesassert(),end(),llvm::TargetSubtargetInfo::getInstrInfo(),getParent(),llvm::MachineFunction::getSubtarget(),I, andTII.
Referenced byfindInsertLocation(), andllvm::SplitEditor::leaveIntvAtTop().
void MachineBasicBlock::sortUniqueLiveIns | ( | ) |
Sorts and uniques the LiveIns vector.
It can be significantly faster to do this than repeatedly calling isLiveIn before calling addLiveIn for every LiveIn insertion.
Definition at line624 of fileMachineBasicBlock.cpp.
ReferencesI,llvm::MachineBasicBlock::RegisterMaskPair::PhysReg, andllvm::sort().
Referenced byllvm::ARMFrameLowering::adjustForSegmentedStacks(),llvm::SIFrameLowering::emitCSRSpillStores(),llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(),llvm::recomputeLiveIns(),llvm::IRTranslator::runOnMachineFunction(),llvm::SIMachineFunctionInfo::shiftWwmVGPRsToLowestRange(),updateLiveIn(), andupdateLiveness().
| inline |
Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before 'Where'.
If From points to a bundle of instructions, the whole bundle is moved.
Definition at line1109 of fileMachineBasicBlock.h.
ReferencesFrom,llvm::Other, andsplice().
Referenced byllvm::AMDGPURegisterBankInfo::applyMappingImpl(),llvm::PPCTargetLowering::EmitAtomicBinary(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::PPCTargetLowering::emitEHSjLjSetJmp(),llvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(),llvm::AArch64TargetLowering::EmitF128CSEL(),emitFROUND(),llvm::BPFTargetLowering::EmitInstrWithCustomInserter(),llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::AVRTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(),EmitLoweredCascadedSelect(),llvm::PPCTargetLowering::EmitPartwordAtomicBinary(),llvm::PPCTargetLowering::emitProbedAlloca(),emitReadCounterWidePseudo(),emitSelectPseudo(),llvm::MSP430TargetLowering::EmitShiftInstr(),emitStackProbeInline(),emitVecCondBranchPseudo(),emitXBegin(),llvm::AMDGPURegisterBankInfo::executeInWaterfallLoop(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::SparcTargetLowering::expandSelectCC(),hoistAndMergeSGPRInits(),llvm::PPCFrameLowering::inlineStackProbe(),loadMBUFScalarOperandsFromVGPR(),LowerFPToInt(),LowerMemcpy(),LowerMemset(),llvm::MachineInstr::moveBefore(),llvm::ScheduleDAGMI::moveInstruction(),MoveVPNOTBeforeFirstUser(),performSink(),llvm::ScheduleDAGMI::placeDebugValues(),llvm::AArch64InstrInfo::probedStackAlloc(),rescheduleCanonically(),rescheduleLexographically(),llvm::WindowScheduler::restoreTripleMBB(),llvm::IRTranslator::runOnMachineFunction(),llvm::WebAssemblyDebugValueManager::sink(),splice(),splitAt(),llvm::SystemZ::splitBlockAfter(),llvm::SystemZ::splitBlockBefore(),splitBlockForLoop(), andsplitMBB().
| inline |
Take a block of instructions from MBB 'Other' in the range [From, To), and insert them into this MBB right before 'Where'.
The instruction at 'Where' must not be included in the range of instructions to move.
Definition at line1120 of fileMachineBasicBlock.h.
ReferencesFrom,llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), andllvm::Other.
MachineBasicBlock * MachineBasicBlock::splitAt | ( | MachineInstr & | SplitInst, |
bool | UpdateLiveIns =true , | ||
LiveIntervals * | LIS =nullptr | ||
) |
Split a basic block into 2 pieces atSplitPoint
.
A new block will be inserted after this block, and all instructions afterSplitInst
moved to it (SplitInst
will be in the original block). IfLIS
is provided,LiveIntervals will be appropriately updated.
IfUpdateLiveIns
is true, this will ensure the live ins list is accurate, including for physreg uses/defs in the original block.
Definition at line1025 of fileMachineBasicBlock.cpp.
Referencesllvm::addLiveIns(),llvm::LivePhysRegs::addLiveOuts(),addSuccessor(),begin(),llvm::MachineFunction::CreateMachineBasicBlock(),end(),getBasicBlock(),getParent(),llvm::TargetSubtargetInfo::getRegisterInfo(),llvm::MachineInstrBundleIterator< Ty, IsReverse >::getReverse(),llvm::MachineFunction::getSubtarget(),I,llvm::LivePhysRegs::init(),llvm::MachineFunction::insert(),llvm::LiveIntervals::insertMBBInMaps(),MI,rbegin(),splice(),llvm::LivePhysRegs::stepBackward(), andtransferSuccessorsAndUpdatePHIs().
Referenced byllvm::SITargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::SIInstrInfo::insertSimulatedTrap(),llvm::AMDGPULegalizerInfo::legalizeTrapEndpgm(),splitBlock(), andllvm::SITargetLowering::splitKillBlock().
| inline |
Definition at line982 of fileMachineBasicBlock.h.
ReferencesSplitCriticalEdge().
| inline |
Split the critical edge from this block to the given successor block, and return the newly created block, or null if splitting is not possible.
This function updatesLiveVariables,MachineDominatorTree, andMachineLoopInfo, as applicable.
Definition at line975 of fileMachineBasicBlock.h.
ReferencesP, andSplitCriticalEdge().
Referenced bySplitCriticalEdge().
MachineBasicBlock * MachineBasicBlock::SplitCriticalEdge | ( | MachineBasicBlock * | Succ, |
Pass * | P, | ||
MachineFunctionAnalysisManager * | MFAM, | ||
std::vector<SparseBitVector<> > * | LiveInSets, | ||
MachineDomTreeUpdater * | MDTU | ||
) |
Definition at line1149 of fileMachineBasicBlock.cpp.
ReferencesaddLiveIn(),llvm::LiveVariables::addNewBlock(),llvm::LiveRange::addSegment(),addSuccessor(),assert(),canSplitCriticalEdge(),Cond,llvm::SmallSet< T, N, C >::count(),llvm::MachineFunction::CreateMachineBasicBlock(),llvm::dbgs(),DL,llvm::SmallVectorBase< Size_T >::empty(),end(),llvm::MachineFunction::end(),findBranchDebugLoc(),findJumpTableIndex(),GET_RESULT,getCallFrameSize(),llvm::DebugLoc::getCol(),getFirstInstrTerminator(),getFirstTerminator(),llvm::TargetSubtargetInfo::getInstrInfo(),llvm::LiveIntervals::getInterval(),llvm::MachineFunction::getJumpTableInfo(),llvm::DebugLoc::getLine(),llvm::SlotIndexes::getMBBEndIdx(),llvm::LiveIntervals::getMBBStartIdx(),llvm::ilist_node_with_parent< MachineBasicBlock, MachineFunction >::getNextNode(),getParent(),llvm::SlotIndex::getPrevSlot(),llvm::MachineOperand::getReg(),llvm::MachineFunction::getRegInfo(),llvm::TargetSubtargetInfo::getRegisterInfo(),llvm::MachineFunction::getSubtarget(),llvm::LiveVariables::getVarInfo(),llvm::LiveRange::getVNInfoAt(),llvm::LiveIntervals::hasInterval(),I,llvm::Register::index2VirtReg(),Info,llvm::SmallSet< T, N, C >::insert(),llvm::MachineFunction::insert(),llvm::HexagonInstrInfo::insertBranch(),llvm::LiveIntervals::insertMBBInMaps(),llvm::SlotIndexes::insertMBBInMaps(),instr_begin(),instr_end(),llvm::is_contained(),isLayoutSuccessor(),isLiveOut(),llvm::MachineOperand::isUndef(),llvm::LiveVariables::VarInfo::Kills,llvm::LiveRange::liveAt(),liveins(),LLVM_DEBUG,llvm::make_range(),MI,MRI,P,llvm::SmallVectorImpl< T >::pop_back_val(),llvm::printMBBReference(),llvm::SmallVectorTemplateBase< T, bool >::push_back(),llvm::LiveVariables::VarInfo::removeKill(),llvm::LiveRange::removeSegment(),llvm::LiveIntervals::repairIntervalsInRange(),llvm::MachineJumpTableInfo::ReplaceMBBInJumpTable(),replacePhiUsesWith(),ReplaceUsesOfBlockWith(),setCallFrameSize(),llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::splitCriticalEdge(),llvm::LiveInterval::subranges(),TII,TRI, andupdateTerminator().
void MachineBasicBlock::splitSuccessor | ( | MachineBasicBlock * | Old, |
MachineBasicBlock * | New, | ||
bool | NormalizeSuccProbs =false | ||
) |
Split the old successor into old plus new and updates the probability info.
Definition at line817 of fileMachineBasicBlock.cpp.
ReferencesaddSuccessor(),assert(),llvm::find(),llvm::BranchProbability::getUnknown(),llvm::is_contained(),normalizeSuccProbs(),succ_end(), andsuccessors().
Referenced bysplitEdge().
| inline |
Definition at line421 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::begin().
Referenced bybbHasFallthrough(),BBIsJumpedOver(),bbIsJumpedOver(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_begin(),llvm::RISCVFrameLowering::canUseAsEpilogue(),llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(),eraseDeadBBsAndChildren(),getLayoutSuccessorProbThreshold(),markAllReachable(),llvm::MIPrinter::print(),print(),replaceSuccessor(),llvm::TargetInstrInfo::ReplaceTailWithBranchTo(),llvm::IRTranslator::runOnMachineFunction(),llvm::MIRProfileLoader::setBranchProbs(),splitMBB(),llvm::succ_begin(),successors(),llvm::TailDuplicator::tailDuplicateAndUpdate(),transferSuccessors(), andtransferSuccessorsAndUpdatePHIs().
| inline |
Definition at line422 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::begin().
| inline |
Definition at line436 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorBase< Size_T >::empty().
Referenced byblockEndsInUnreachable(),llvm::RISCVFrameLowering::canUseAsEpilogue(),llvm::X86FrameLowering::canUseAsEpilogue(),llvm::ScheduleDAGSDNodes::computeOperandLatency(),llvm::MSP430FrameLowering::emitEpilogue(),llvm::X86FrameLowering::emitEpilogue(),llvm::SITargetLowering::EmitInstrWithCustomInserter(),getEndClobberMask(),llvm::SIInstrInfo::insertReturn(),llvm::SIInstrInfo::insertSimulatedTrap(),isNoReturnDef(),llvm::SystemZInstrInfo::isProfitableToIfCvt(),llvm::AMDGPULegalizerInfo::legalizeTrapEndpgm(),popRegsFromStack(),llvm::MIPrinter::print(),print(),ProfitableToMerge(),llvm::TargetInstrInfo::ReplaceTailWithBranchTo(),llvm::SelectionDAGISel::runOnMachineFunction(),GCEmptyBasicBlocks::runOnMachineFunction(),transferSuccessors(),transferSuccessorsAndUpdatePHIs(), andupdateTerminator().
| inline |
Definition at line423 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::end().
Referenced bybbHasFallthrough(),llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_end(),eraseDeadBBsAndChildren(),markAllReachable(),llvm::MIPrinter::print(),print(),replaceSuccessor(),GCEmptyBasicBlocks::runOnMachineFunction(),llvm::MIRProfileLoader::setBranchProbs(),splitSuccessor(),llvm::succ_end(),successors(), andllvm::TailDuplicator::tailDuplicateAndUpdate().
| inline |
Definition at line424 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::end().
| inline |
Definition at line425 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rbegin().
Referenced byllvm::VETargetLowering::emitSjLjDispatchBlock(), andsplitMBB().
| inline |
Definition at line427 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rbegin().
| inline |
Definition at line429 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rend().
Referenced byllvm::VETargetLowering::emitSjLjDispatchBlock().
| inline |
Definition at line431 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorTemplateCommon< T, typename >::rend().
| inline |
Definition at line433 of fileMachineBasicBlock.h.
Referencesllvm::SmallVectorBase< Size_T >::size().
Referenced byBBIsJumpedOver(),bbIsJumpedOver(),llvm::TailDuplicator::canTailDuplicate(),llvm::RISCVFrameLowering::canUseAsEpilogue(),llvm::AsmPrinter::emitBBAddrMapSection(),getLayoutSuccessorProbThreshold(),llvm::RegionTraits< MachineFunction >::getNumSuccessors(),getSuccProbability(),hasSameSuccessors(),INITIALIZE_PASS(),llvm::TailDuplicator::isSimpleBB(),isSplitEdge(),llvm::rdf::operator<<(),ProfitableToMerge(),salvageDebugInfoFromEmptyBlock(),llvm::MIRProfileLoader::setBranchProbs(),llvm::TailDuplicator::shouldTailDuplicate(),splitMBB(), andllvm::succ_size().
| inline |
Definition at line444 of fileMachineBasicBlock.h.
Referencesllvm::make_range(),succ_begin(), andsucc_end().
Referenced byllvm::LiveRegUnits::addLiveOuts(),llvm::LivePhysRegs::addLiveOutsNoPristines(),llvm::ScheduleDAGInstrs::addSchedBarrierDeps(),llvm::X86InstrInfo::analyzeBranchPredicate(),areCFlagsAliveInSuccessors(),BBHasFallthrough(),blockEndIsUnreachable(),CanLowerPriorityDirectlyInPredecessors(),checkAndUpdateCCRKill(),checkAndUpdateCPSRKill(),checkCCKill(),checkEFLAGSLive(),collectEHScopeMembers(),computeRegisterLiveness(),llvm::AsmPrinter::emitBBAddrMapSection(),eraseDeadBBsAndChildren(),findFalseBlock(),llvm::MachineLoopInfo::findLoopPreheader(),flagsNeedToBePreservedBeforeTheTerminators(),getFallThroughMBB(),llvm::ReachingDefAnalysis::getGlobalUses(),getSingleLiveInSuccBB(),llvm::afdo_detail::IRTraits< MachineBasicBlock >::getSuccessors(),hasEHPadSuccessor(),hasSameSuccessors(),llvm::MachineTraceMetrics::Ensemble::invalidate(),isEFLAGSLiveAfter(),isLiveOut(),llvm::LiveVariables::isLiveOut(),isReachableAmongDominated(),llvm::HexagonInstrInfo::isSchedulingBoundary(),isSuccessor(),loadMBUFScalarOperandsFromVGPR(),markAllReachable(),mayHaveInlineAsmBr(),llvm::rdf::operator<<(),llvm::ARMBaseInstrInfo::optimizeCompareInstr(),llvm::LanaiInstrInfo::optimizeCompareInstr(),llvm::X86InstrInfo::optimizeCompareInstr(),OtherSucc(),llvm::LiveIntervals::pruneValue(),removeImplicitFallthroughs(),llvm::MachineBranchProbabilityPrinterPass::run(),llvm::CFIFixup::runOnMachineFunction(),salvageDebugInfoFromEmptyBlock(),llvm::MIRProfileLoader::setBranchProbs(),llvm::TailDuplicator::shouldTailDuplicate(),shouldUseFrameHelper(),sortBlocks(),splitBlock(),splitMBB(),splitSuccessor(),llvm::AggressiveAntiDepBreaker::StartBlock(),llvm::CriticalAntiDepBreaker::StartBlock(),llvm::successors(),llvm::LoopTraversal::traverse(),updateLiveness(),ValidateMVEStore(),visit(), andllvm::WriteGraph().
| inline |
Definition at line447 of fileMachineBasicBlock.h.
Referencesllvm::make_range(),succ_begin(), andsucc_end().
| inline |
Definition at line375 of fileMachineBasicBlock.h.
Referencesend(),getFirstTerminator(), andllvm::make_range().
Referenced byAlignBlocks(),llvm::WebAssemblyInstrInfo::analyzeBranch(),explicitlyBranchesTo(),findLoopComponents(),llvm::ARMBlockPlacement::fixBackwardsWLS(),flagsNeedToBePreservedBeforeTheTerminators(),llvm::SIInstrInfo::hasDivergentBranch(),hasReturn(),INITIALIZE_PASS(),llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(),maybeUpdateTerminator(),llvm::SIInstrInfo::removeBranch(),RevertWhileLoopSetup(), andllvm::ARMFrameLowering::updateLRRestored().
| inline |
Definition at line378 of fileMachineBasicBlock.h.
Referencesend(),getFirstTerminator(), andllvm::make_range().
void MachineBasicBlock::transferSuccessors | ( | MachineBasicBlock * | FromMBB | ) |
Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors FromMBB and remove all the successors from FromMBB).
Definition at line917 of fileMachineBasicBlock.cpp.
ReferencesaddSuccessor(),addSuccessorWithoutProb(),removeSuccessor(),succ_begin(), andsucc_empty().
Referenced bysplitMBB().
void MachineBasicBlock::transferSuccessorsAndUpdatePHIs | ( | MachineBasicBlock * | FromMBB | ) |
Transfers all the successors, as in transferSuccessors, and update PHI operands in the successor blocks which refer to FromMBB to refer to this.
Definition at line937 of fileMachineBasicBlock.cpp.
ReferencesaddSuccessor(),addSuccessorWithoutProb(),normalizeSuccProbs(),removeSuccessor(),replacePhiUsesWith(),succ_begin(), andsucc_empty().
Referenced byllvm::PPCTargetLowering::EmitAtomicBinary(),llvm::RISCVTargetLowering::emitDynamicProbedAlloc(),llvm::PPCTargetLowering::emitEHSjLjSetJmp(),llvm::SystemZTargetLowering::emitEHSjLjSetJmp(),llvm::VETargetLowering::emitEHSjLjSetJmp(),llvm::AArch64TargetLowering::EmitF128CSEL(),emitFROUND(),llvm::BPFTargetLowering::EmitInstrWithCustomInserter(),llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(),llvm::ARMTargetLowering::EmitInstrWithCustomInserter(),llvm::AVRTargetLowering::EmitInstrWithCustomInserter(),llvm::PPCTargetLowering::EmitInstrWithCustomInserter(),llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(),EmitLoweredCascadedSelect(),llvm::PPCTargetLowering::EmitPartwordAtomicBinary(),llvm::PPCTargetLowering::emitProbedAlloca(),emitReadCounterWidePseudo(),emitSelectPseudo(),llvm::MSP430TargetLowering::EmitShiftInstr(),emitStackProbeInline(),emitVecCondBranchPseudo(),emitXBegin(),llvm::AMDGPURegisterBankInfo::executeInWaterfallLoop(),llvm::VEInstrInfo::expandExtendStackPseudo(),llvm::SparcTargetLowering::expandSelectCC(),llvm::PPCFrameLowering::inlineStackProbe(),loadMBUFScalarOperandsFromVGPR(),LowerFPToInt(),LowerMemcpy(),LowerMemset(),llvm::AArch64InstrInfo::probedStackAlloc(),splitAt(),llvm::SystemZ::splitBlockAfter(),llvm::SystemZ::splitBlockBefore(), andsplitBlockForLoop().
void MachineBasicBlock::updateTerminator | ( | MachineBasicBlock * | PreviousLayoutSuccessor | ) |
Update the terminator instructions in block to account for changes to block layout which may have been made.
PreviousLayoutSuccessor should be set to the block which may have been used as fallthrough before the block layout was modified. If the block previously fell through to that block, it may now need a branch. If it previously branched to another block, it may now be able to fallthrough to the current layout successor.
Definition at line693 of fileMachineBasicBlock.cpp.
Referencesllvm::HexagonInstrInfo::analyzeBranch(),assert(),B,Cond,llvm::dbgs(),DL,findBranchDebugLoc(),llvm::TargetSubtargetInfo::getInstrInfo(),getParent(),llvm::MachineFunction::getSubtarget(),llvm::HexagonInstrInfo::insertBranch(),isEHPad(),isLayoutSuccessor(),isSuccessor(),LLVM_DEBUG,llvm::printMBBReference(),llvm::HexagonInstrInfo::removeBranch(),llvm::HexagonInstrInfo::reverseBranchCondition(),succ_empty(),TBB, andTII.
Referenced bymaybeUpdateTerminator(),llvm::PeelSingleBlockLoop(),SplitCriticalEdge(), andupdateBranches().
void MachineBasicBlock::validateSuccProbs | ( | ) | const |
Validate successors' probabilities and check if the sum of them is approximate one.
This only works in DEBUG mode.
Definition at line784 of fileMachineBasicBlock.cpp.
Referencesassert(), andllvm::BranchProbability::getDenominator().
| friend |
Definition at line1251 of fileMachineBasicBlock.h.
| friend |
Definition at line1250 of fileMachineBasicBlock.h.
| friend |
Definition at line250 of fileMachineBasicBlock.h.
| friend |
Definition at line1251 of fileMachineBasicBlock.h.