LLVM
10.0.0svn
|
#include "llvm/CodeGen/MachineBasicBlock.h"
Classes | |
struct | RegisterMaskPair |
Pair of physical register and lane mask. More... | |
Public Member Functions | |
const BasicBlock * | getBasicBlock () const |
Return the LLVM basic block that this instance corresponded to originally. More... | |
StringRef | getName () const |
Return the name of the corresponding LLVM basic block, or an empty string. More... | |
std::string | getFullName () const |
Return a formatted string to identify this block and its parent function. More... | |
bool | hasAddressTaken () const |
Test whether this block is potentially the target of an indirect branch. More... | |
void | setHasAddressTaken () |
Set this block to reflect that it potentially is the target of an indirect branch. More... | |
bool | hasLabelMustBeEmitted () const |
Test whether this block must have its label emitted. More... | |
void | setLabelMustBeEmitted () |
Set this block to reflect that, regardless how we flow to it, we need its label be emitted. More... | |
const MachineFunction * | getParent () const |
Return the MachineFunction containing this basic block. More... | |
MachineFunction * | getParent () |
unsigned | size () const |
bool | empty () const |
MachineInstr & | instr_front () |
MachineInstr & | instr_back () |
const MachineInstr & | instr_front () const |
const MachineInstr & | instr_back () const |
MachineInstr & | front () |
MachineInstr & | back () |
const MachineInstr & | front () const |
const MachineInstr & | 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. More... | |
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. More... | |
void | addLiveIn (const RegisterMaskPair &RegMaskPair) |
void | sortUniqueLiveIns () |
Sorts and uniques the LiveIns vector. More... | |
void | clearLiveIns () |
Clear live in list. More... | |
unsigned | addLiveIn (MCRegister PhysReg, const TargetRegisterClass *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. More... | |
void | removeLiveIn (MCPhysReg Reg, LaneBitmask LaneMask=LaneBitmask::getAll()) |
Remove the specified register from the live in set. More... | |
bool | isLiveIn (MCPhysReg Reg, LaneBitmask LaneMask=LaneBitmask::getAll()) const |
Return true if the specified register is in the live in set. More... | |
livein_iterator | livein_begin_dbg () const |
Unlike livein_begin, this method does not check that the liveness information is accurate. More... | |
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_iterator I) |
Remove entry from the livein set and return iterator to the next. More... | |
const uint32_t * | getBeginClobberMask (const TargetRegisterInfo *TRI) const |
Get the clobber mask for the start of this basic block. More... | |
const uint32_t * | getEndClobberMask (const TargetRegisterInfo *TRI) const |
Get the clobber mask for the end of the basic block. More... | |
Align | getAlignment () const |
Return alignment of the basic block. More... | |
void | setAlignment (Align A) |
Set alignment of the basic block. More... | |
bool | isEHPad () const |
Returns true if the block is a landing pad. More... | |
void | setIsEHPad (bool V=true) |
Indicates the block is a landing pad. More... | |
bool | hasEHPadSuccessor () const |
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. More... | |
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. More... | |
bool | isEHFuncletEntry () const |
Returns true if this is the entry block of an EH funclet. More... | |
void | setIsEHFuncletEntry (bool V=true) |
Indicates if this is the entry block of an EH funclet. More... | |
bool | isCleanupFuncletEntry () const |
Returns true if this is the entry block of a cleanup funclet. More... | |
void | setIsCleanupFuncletEntry (bool V=true) |
Indicates if this is the entry block of a cleanup funclet. More... | |
bool | isLegalToHoistInto () const |
Returns true if it is legal to hoist instructions into this block. More... | |
void | moveBefore (MachineBasicBlock *NewAfter) |
Move 'this' block before or after the specified block. More... | |
void | moveAfter (MachineBasicBlock *NewBefore) |
void | updateTerminator () |
Update the terminator instructions in block to account for changes to the layout. More... | |
void | addSuccessor (MachineBasicBlock *Succ, BranchProbability Prob=BranchProbability::getUnknown()) |
Add Succ as a successor of this MachineBasicBlock. More... | |
void | addSuccessorWithoutProb (MachineBasicBlock *Succ) |
Add Succ as a successor of this MachineBasicBlock. More... | |
void | setSuccProbability (succ_iterator I, BranchProbability Prob) |
Set successor probability of a given iterator. More... | |
void | normalizeSuccProbs () |
Normalize probabilities of all successors so that the sum of them becomes one. More... | |
void | validateSuccProbs () const |
Validate successors' probabilities and check if the sum of them is approximate one. More... | |
void | removeSuccessor (MachineBasicBlock *Succ, bool NormalizeSuccProbs=false) |
Remove successor from the successors list of this MachineBasicBlock. More... | |
succ_iterator | removeSuccessor (succ_iterator I, bool NormalizeSuccProbs=false) |
Remove specified successor from the successors list of this MachineBasicBlock. More... | |
void | replaceSuccessor (MachineBasicBlock *Old, MachineBasicBlock *New) |
Replace successor OLD with NEW and update probability info. More... | |
void | copySuccessor (MachineBasicBlock *Orig, succ_iterator I) |
Copy a successor (and any probability info) from original block to this block's. More... | |
void | splitSuccessor (MachineBasicBlock *Old, MachineBasicBlock *New, bool NormalizeSuccProbs=false) |
Split the old successor into old plus new and updates the probability info. More... | |
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). More... | |
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. More... | |
bool | hasSuccessorProbabilities () const |
Return true if any of the successors have probabilities attached to them. More... | |
bool | isPredecessor (const MachineBasicBlock *MBB) const |
Return true if the specified MBB is a predecessor of this block. More... | |
bool | isSuccessor (const MachineBasicBlock *MBB) const |
Return true if the specified MBB is a successor of this block. More... | |
bool | isLayoutSuccessor (const MachineBasicBlock *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. More... | |
MachineBasicBlock * | getFallThrough () |
Return the fallthrough block if the block can implicitly transfer control to the block after it by falling off the end of it. More... | |
bool | canFallThrough () |
Return true if the block can implicitly transfer control to the block after it by falling off the end of it. More... | |
iterator | getFirstNonPHI () |
Returns a pointer to the first instruction in this block that is not a PHINode instruction. More... | |
iterator | SkipPHIsAndLabels (iterator I) |
Return the first instruction in MBB after I that is not a PHI or a label. More... | |
iterator | SkipPHIsLabelsAndDebug (iterator I) |
Return the first instruction in MBB after I that is not a PHI, label or debug. More... | |
iterator | getFirstTerminator () |
Returns an iterator to the first terminator instruction of this basic block. More... | |
const_iterator | getFirstTerminator () const |
instr_iterator | getFirstInstrTerminator () |
Same getFirstTerminator but it ignores bundles and return an instr_iterator instead. More... | |
iterator | getFirstNonDebugInstr () |
Returns an iterator to the first non-debug instruction in the basic block, or end(). More... | |
const_iterator | getFirstNonDebugInstr () const |
iterator | getLastNonDebugInstr () |
Returns an iterator to the last non-debug instruction in the basic block, or end(). More... | |
const_iterator | getLastNonDebugInstr () const |
bool | isReturnBlock () const |
Convenience function that returns true if the block ends in a return instruction. More... | |
bool | isEHScopeReturnBlock () const |
Convenience function that returns true if the bock ends in a EH scope return instruction. More... | |
MachineBasicBlock * | SplitCriticalEdge (MachineBasicBlock *Succ, Pass &P) |
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. More... | |
bool | canSplitCriticalEdge (const MachineBasicBlock *Succ) const |
Check if the edge between this block and the given successor Succ , can be split. More... | |
void | pop_front () |
void | pop_back () |
void | push_back (MachineInstr *MI) |
instr_iterator | insert (instr_iterator I, MachineInstr *M) |
Insert MI into the instruction list before I, possibly inside a bundle. More... | |
template<typename IT > | |
void | insert (iterator I, IT S, IT E) |
Insert a range of instructions into the instruction list before I. More... | |
iterator | insert (iterator I, MachineInstr *MI) |
Insert MI into the instruction list before I. More... | |
iterator | insertAfter (iterator I, MachineInstr *MI) |
Insert MI into the instruction list after I. More... | |
instr_iterator | insertAfterBundle (instr_iterator I, 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. More... | |
instr_iterator | erase (instr_iterator I) |
Remove an instruction from the instruction list and delete it. More... | |
instr_iterator | erase_instr (MachineInstr *I) |
Remove an instruction from the instruction list and delete it. More... | |
iterator | erase (iterator I, iterator E) |
Remove a range of instructions from the instruction list and delete them. More... | |
iterator | erase (iterator I) |
Remove an instruction or bundle from the instruction list and delete it. More... | |
iterator | erase (MachineInstr *I) |
Remove an instruction from the instruction list and delete it. More... | |
MachineInstr * | remove (MachineInstr *I) |
Remove the unbundled instruction from the instruction list without deleting it. More... | |
MachineInstr * | remove_instr (MachineInstr *I) |
Remove the possibly bundled instruction from the instruction list without deleting it. More... | |
void | clear () |
void | splice (iterator Where, MachineBasicBlock *Other, iterator From) |
Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before 'Where'. More... | |
void | splice (iterator Where, MachineBasicBlock *Other, iterator From, iterator To) |
Take a block of instructions from MBB 'Other' in the range [From, To), and insert them into this MBB right before 'Where'. More... | |
MachineBasicBlock * | removeFromParent () |
This method unlinks 'this' from the containing function, and returns it, but does not delete it. More... | |
void | eraseFromParent () |
This method unlinks 'this' from the containing function and deletes it. More... | |
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. More... | |
void | replacePhiUsesWith (MachineBasicBlock *Old, MachineBasicBlock *New) |
Update all phi nodes in this basic block to refer to basic block New instead of basic block Old . More... | |
bool | CorrectExtraCFGEdges (MachineBasicBlock *DestA, MachineBasicBlock *DestB, bool IsCond) |
Various pieces of code can cause excess edges in the CFG to be inserted. More... | |
DebugLoc | findDebugLoc (instr_iterator MBBI) |
Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE and DBG_LABEL instructions. More... | |
DebugLoc | findDebugLoc (iterator MBBI) |
DebugLoc | findPrevDebugLoc (instr_iterator MBBI) |
Find the previous valid DebugLoc preceding MBBI, skipping and DBG_VALUE instructions. More... | |
DebugLoc | findPrevDebugLoc (iterator MBBI) |
DebugLoc | findBranchDebugLoc () |
Find and return the merged DebugLoc of the branch instructions of the block. More... | |
LivenessQueryResult | computeRegisterLiveness (const TargetRegisterInfo *TRI, unsigned Reg, const_iterator Before, unsigned Neighborhood=10) const |
Return whether (physical) register Reg has been defined and not killed as of just before Before . More... | |
void | dump () const |
void | print (raw_ostream &OS, const SlotIndexes *=nullptr, bool IsStandalone=true) const |
void | print (raw_ostream &OS, ModuleSlotTracker &MST, const SlotIndexes *=nullptr, bool IsStandalone=true) const |
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 a MachineFunction yet, in which case this will return -1. More... | |
void | setNumber (int N) |
MCSymbol * | getSymbol () const |
Return the MCSymbol for this basic block. More... | |
Optional< uint64_t > | getIrrLoopHeaderWeight () const |
void | setIrrLoopHeaderWeight (uint64_t Weight) |
![]() | |
MachineBasicBlock * | getPrevNode () |
const MachineBasicBlock * | getPrevNode () const |
Get the previous node, or nullptr for the list head. More... | |
MachineBasicBlock * | getNextNode () |
Get the next node, or nullptr for the list tail. More... | |
const MachineBasicBlock * | getNextNode () const |
Get the next node, or nullptr for the list tail. More... | |
![]() | |
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. More... | |
Static Public Member Functions | |
static Instructions MachineBasicBlock::* | getSublistAccess (MachineInstr *) |
Support for MachineInstr::getNextNode(). More... | |
Friends | |
class | MachineFunction |
class | MachineBranchProbabilityInfo |
class | MIPrinter |
struct | ilist_callback_traits< MachineBasicBlock > |
Definition at line 65 of file MachineBasicBlock.h.
Definition at line 177 of file MachineBasicBlock.h.
Definition at line 210 of file MachineBasicBlock.h.
Definition at line 182 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::const_pred_iterator = std::vector<MachineBasicBlock *>::const_iterator |
Definition at line 253 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::const_pred_reverse_iterator = std::vector<MachineBasicBlock *>::const_reverse_iterator |
Definition at line 259 of file MachineBasicBlock.h.
Definition at line 179 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::const_reverse_iterator = MachineInstrBundleIterator<const MachineInstr, true> |
Definition at line 185 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::const_succ_iterator = std::vector<MachineBasicBlock *>::const_iterator |
Definition at line 255 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::const_succ_reverse_iterator = std::vector<MachineBasicBlock *>::const_reverse_iterator |
Definition at line 263 of file MachineBasicBlock.h.
Definition at line 176 of file MachineBasicBlock.h.
Definition at line 209 of file MachineBasicBlock.h.
Definition at line 181 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::livein_iterator = LiveInVector::const_iterator |
Definition at line 346 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::pred_iterator = std::vector<MachineBasicBlock *>::iterator |
Definition at line 252 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::pred_reverse_iterator = std::vector<MachineBasicBlock *>::reverse_iterator |
Definition at line 257 of file MachineBasicBlock.h.
Definition at line 178 of file MachineBasicBlock.h.
Definition at line 183 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::succ_iterator = std::vector<MachineBasicBlock *>::iterator |
Definition at line 254 of file MachineBasicBlock.h.
using llvm::MachineBasicBlock::succ_reverse_iterator = std::vector<MachineBasicBlock *>::reverse_iterator |
Definition at line 261 of file MachineBasicBlock.h.
Possible outcome of a register liveness query to computeRegisterLiveness()
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 line 769 of file MachineBasicBlock.h.
|
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 line 315 of file MachineBasicBlock.h.
Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), addLiveIn(), addLiveInRegs(), llvm::addLiveIns(), addSavedGPR(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::X86FrameLowering::adjustForSegmentedStacks(), allocateHSAUserSGPRs(), buildEpilogReload(), llvm::AArch64InstrInfo::buildOutlinedFrame(), llvm::SIInstrInfo::calculateLDSSpillAddress(), CompareMBBNumbers(), createPHIsForCMOVsInSinkBB(), createPHIsForSelects(), llvm::createX86RetpolineThunksPass(), emitAlignedDPRCS2Spills(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::MachineRegisterInfo::EmitLiveInCopies(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), enableAllocFrameElim(), llvm::ARMTargetLowering::getExceptionSelectorRegister(), llvm::HexagonFrameLowering::getFrameIndexReference(), llvm::MipsCallLowering::MipsHandler::handle(), handleMustTailForwardedRegisters(), llvm::MipsFunctionInfo::initGlobalBaseReg(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::SITargetLowering::insertCopiesSplitCSR(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), isCallerPreservedOrConstPhysReg(), llvm::X86TargetLowering::isIntDivCheap(), IsUnconditionalJump(), llvm::AMDGPULegalizerInfo::loadInputValue(), llvm::AMDGPUCallLowering::lowerFormalArguments(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::X86CallLowering::lowerReturn(), llvm::ARMCallLowering::lowerReturn(), mapWasmLandingPadIndex(), packCmovGroup(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), toString(), updateLiveIn(), and verifyLeafProcRegUse().
|
inline |
Definition at line 319 of file MachineBasicBlock.h.
References addLiveIn(), llvm::LaneBitmask::getAll(), and Reg.
unsigned MachineBasicBlock::addLiveIn | ( | MCRegister | PhysReg, |
const TargetRegisterClass * | 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 line 493 of file MachineBasicBlock.cpp.
References addLiveIn(), assert(), begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), E, end(), front(), llvm::MCInstrInfo::get(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, isEHPad(), isLiveIn(), llvm::MCRegister::isPhysical(), llvm::RegState::Kill, llvm_unreachable, MRI, SkipPHIsAndLabels(), and TII.
void MachineBasicBlock::addSuccessor | ( | MachineBasicBlock * | Succ, |
BranchProbability | Prob = BranchProbability::getUnknown() |
||
) |
Add Succ as a successor of this MachineBasicBlock.
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 line 655 of file MachineBasicBlock.cpp.
Referenced by addExclusiveRegPair(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::analyzeArguments(), llvm::TailDuplicator::canTailDuplicate(), llvm::ModuloScheduleExpander::cleanup(), CompareMBBNumbers(), ComputeCommonTailLength(), copySuccessor(), createPHIsForCMOVsInSinkBB(), createPHIsForSelects(), llvm::createX86RetpolineThunksPass(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), emitReadCycleWidePseudo(), emitSelectPseudo(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), eraseDeadBBsAndChildren(), llvm::SparcTargetLowering::expandSelectCC(), findUncondBrI(), for(), llvm::IRTranslator::getAnalysisUsage(), getHalfSizedType(), getOffsetFromIndices(), getRetpolineSymbol(), getUnconditionalBrDisp(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::MipsTargetLowering::HandleByVal(), hasOneExitNode(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), isFunctionEntryBlock(), isInRage(), loadSRsrcFromVGPR(), LowerFPToInt(), makeImplicit(), packCmovGroup(), removeExternalCFGEdges(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), scaleCaseProbality(), llvm::SelectionDAGBuilder::ShouldEmitAsBranches(), split(), splitBlockForLoop(), SplitCriticalEdge(), llvm::SITargetLowering::splitKillBlock(), splitSuccessor(), toString(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), and tryToElideArgumentCopy().
void MachineBasicBlock::addSuccessorWithoutProb | ( | MachineBasicBlock * | Succ | ) |
Add Succ as a successor of this MachineBasicBlock.
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 line 665 of file MachineBasicBlock.cpp.
Referenced by copySuccessor(), llvm::IRTranslator::getAnalysisUsage(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 196 of file MachineBasicBlock.h.
References llvm::sys::path::end().
Referenced by BBIsJumpedOver(), blockEndsInUnreachable(), callHasRegMask(), llvm::createX86RetpolineThunksPass(), enableAllocFrameElim(), getUnconditionalBrDisp(), greaterWithBias(), HandleVRSaveUpdate(), INITIALIZE_PASS(), llvm::AMDGPUAsmPrinter::isBlockOnlyReachableByFallthrough(), IsUnconditionalJump(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), optimizeVcndVcmpPair(), ProfitableToMerge(), llvm::HexagonInstrInfo::removeBranch(), and llvm::TailDuplicator::shouldTailDuplicate().
|
inline |
Definition at line 198 of file MachineBasicBlock.h.
References llvm::sys::path::end().
|
inline |
Definition at line 216 of file MachineBasicBlock.h.
Referenced by addExclusiveRegPair(), addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::X86FrameLowering::adjustForHiPEPrologue(), allPhiOperandsUndefined(), llvm::analyzeArguments(), llvm::LanaiInstrInfo::analyzeBranch(), areCandidatesToMergeOrPair(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), AssignProtectedObjSet(), llvm::RegScavenger::backward(), BBHasFallthrough(), llvm::MachineInstrSpan::begin(), bothUsedInPHI(), llvm::BranchFolder::BranchFolder(), buildEpilogReload(), llvm::AArch64InstrInfo::buildOutlinedFrame(), callWaitsOnFunctionReturn(), llvm::TailDuplicator::canTailDuplicate(), combineRestoreSETHIi(), computeBranchTargetAndInversion(), ComputeCommonTailLength(), computeRegisterLiveness(), ContainsReg(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), copyDebugInfoToSuccessor(), llvm::SIInstrInfo::copyPhysReg(), CountTerminators(), llvm::createAArch64ConditionOptimizerPass(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::SIInstrInfo::createPHIDestinationCopy(), createPHIsForCMOVsInSinkBB(), createPHIsForSelects(), llvm::createR600ExpandSpecialInstrsPass(), llvm::createSIAddIMGInitPass(), llvm::createSIWholeQuadModePass(), llvm::createSparcDelaySlotFillerPass(), llvm::createXCoreFrameToArgsOffsetEliminationPass(), llvm::MachineDominatorTree::dominates(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::AVRFrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), emitGPDisp(), llvm::SITargetLowering::emitGWSMemViolTestLoop(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::MachineRegisterInfo::EmitLiveInCopies(), emitLoadM0FromVGPRLoop(), emitLoadSRsrcFromVGPRLoop(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), llvm::AVRFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::RISCVFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::SIFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::ARCFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::LanaiFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::WebAssemblyFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), emitReadCycleWidePseudo(), llvm::ScheduleDAGSDNodes::EmitSchedule(), emitSelectPseudo(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), enableAllocFrameElim(), llvm::RegScavenger::enterBasicBlockEnd(), eraseDeadBBsAndChildren(), llvm::AArch64InstrInfo::expandPostRAPseudo(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitZExtFromI1(), llvm::findCMPToFoldIntoCBZ(), findFirstPredicateSetterFrom(), findHoistingInsertPosAndDeps(), findIncDecBefore(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), findSurvivorBackwards(), findTemporariesForLR(), findUncondBrI(), fixupGlobalSaddr(), for(), llvm::RegScavenger::forward(), llvm::HexagonInstrInfo::genAllInsnTimingClasses(), llvm::Localizer::getAnalysisUsage(), getEarliestInsertPos(), getEquivalentCallShort(), llvm::ARMTargetLowering::getExceptionSelectorRegister(), llvm::InsertPointAnalysis::getFirstInsertPoint(), getFirstNonDebugInstr(), getFirstTerminator(), getFPReg(), llvm::HexagonFrameLowering::getFrameIndexReference(), llvm::SparcInstrInfo::getGlobalBaseReg(), getHalfSizedType(), llvm::ARMHazardRecognizer::getHazardType(), llvm::SlotIndexes::getIndexBefore(), GetInitialOffset(), getLatestInsertPos(), getLayoutSuccessorProbThreshold(), getNewValueJumpOpcode(), getNextMachineInstr(), llvm::ARMBasicBlockUtils::getOffsetOf(), getOrExecSource(), getPreviousInstr(), getReassignedChan(), getRegsUsedByPHIs(), getRetpolineSymbol(), getSchedRegions(), llvm::X86InstrInfo::getSerializableDirectMachineOperandTargetFlags(), getSingleSchedPred(), getUnconditionalBrDisp(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), getVariantKind(), llvm::MipsTargetLowering::HandleByVal(), hasArgumentDef(), hasOneExitNode(), hasVulnerableLoad(), hoistAndMergeSGPRInits(), llvm::MipsFunctionInfo::initGlobalBaseReg(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::SITargetLowering::insertCopiesSplitCSR(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), insertCopy(), insertCSRRestores(), insertCSRSaves(), insertDeleteInstructions(), InsertLDR_STR(), llvm::InsertPointAnalysis::InsertPointAnalysis(), instrDefsUsesSCC(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), isCallerPreservedOrConstPhysReg(), IsCallReturnTwice(), isCoalescable(), isCompareZero(), isCopy(), isDebug(), isEFLAGSLive(), isFullCopyOf(), llvm::X86TargetLowering::isIntDivCheap(), isNopCopy(), llvm::CombinerHelper::isPredecessor(), llvm::R600InstrInfo::isPredicable(), IsSafeAndProfitableToMove(), isTerminalReg(), IsUnconditionalJump(), llvm::AMDGPULegalizerInfo::loadInputValue(), loadM0FromVGPR(), loadSRsrcFromVGPR(), LookForIdenticalPHI(), llvm::X86CallLowering::lowerFormalArguments(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::AMDGPUCallLowering::lowerFormalArguments(), LowerFPToInt(), llvm::CombinerHelper::matchElideBrByInvertingCond(), matchSwap(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MBBDefinesCTR(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), mergeOperations(), llvm::X86FrameLowering::mergeSPUpdates(), false::IntervalSorter::operator()(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), optimizeVcndVcmpPair(), packCmovGroup(), performSink(), PrevCrossBBInst(), processDbgDeclares(), llvm::AArch64FrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), ProfitableToMerge(), pushDepHeight(), llvm::BPFInstrInfo::removeBranch(), llvm::NVPTXInstrInfo::removeBranch(), llvm::XCoreInstrInfo::removeBranch(), llvm::ARCInstrInfo::removeBranch(), llvm::MSP430InstrInfo::removeBranch(), llvm::SparcInstrInfo::removeBranch(), llvm::RISCVInstrInfo::removeBranch(), llvm::LanaiInstrInfo::removeBranch(), llvm::AVRInstrInfo::removeBranch(), llvm::HexagonInstrInfo::removeBranch(), llvm::ARMBaseInstrInfo::removeBranch(), llvm::R600InstrInfo::removeBranch(), llvm::AArch64InstrInfo::removeBranch(), llvm::SystemZInstrInfo::removeBranch(), llvm::PPCInstrInfo::removeBranch(), llvm::X86InstrInfo::removeBranch(), removeExternalCFGEdges(), RemoveVRSaveCode(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::X86InstrInfo::replaceBranchWithTailCall(), llvm::PPCFrameLowering::replaceFPWithRealFP(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), llvm::UnreachableBlockElimPass::run(), runOnBasicBlock(), llvm::InsertNOPLoad::runOnMachineFunction(), llvm::DetectRoundChange::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::FixAllFDIVSQRT::runOnMachineFunction(), llvm::MachinePipeliner::runOnMachineFunction(), llvm::AVRDynAllocaSR::runOnMachineFunction(), salvageDebugInfoFromEmptyBlock(), scavengeFrameVirtualRegsInBlock(), llvm::GCNScheduleDAGMILive::schedule(), splitBlockAfter(), splitBlockBefore(), splitBlockForLoop(), llvm::SITargetLowering::splitKillBlock(), tryToElideArgumentCopy(), llvm::RegScavenger::unprocess(), llvm::LiveIntervals::HMEditor::updateAllRanges(), llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), verifyCTRBranch(), VerifyPHIs(), and llvm::BitTracker::visit().
|
inline |
Definition at line 217 of file MachineBasicBlock.h.
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 line 870 of file MachineBasicBlock.cpp.
References getFallThrough().
Referenced by llvm::TailDuplicator::canTailDuplicate(), IsUnconditionalJump(), ProfitableToMerge(), salvageDebugInfoFromEmptyBlock(), and llvm::TailDuplicator::shouldTailDuplicate().
bool MachineBasicBlock::canSplitCriticalEdge | ( | const MachineBasicBlock * | Succ | ) | const |
Check if the edge between this block and the given successor Succ
, 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 line 1105 of file MachineBasicBlock.cpp.
References llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), isEHPad(), llvm::TargetMachine::requiresStructuredCFG(), and TII.
Referenced by SplitCriticalEdge().
|
inline |
Definition at line 700 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::clear().
Referenced by llvm::createX86RetpolineThunksPass(), and getReassignedChan().
void MachineBasicBlock::clearLiveIns | ( | ) |
Clear live in list.
Definition at line 1493 of file MachineBasicBlock.cpp.
Referenced by llvm::recomputeLiveIns().
MachineBasicBlock::LivenessQueryResult MachineBasicBlock::computeRegisterLiveness | ( | const TargetRegisterInfo * | TRI, |
unsigned | Reg, | ||
const_iterator | Before, | ||
unsigned | Neighborhood = 10 |
||
) | const |
Return whether (physical) register Reg
has been defined and not killed as of just before Before
.
Return whether (physical) register "Reg" has been <def>ined and not <kill>ed as of just before "MI".
Search is localised to a neighborhood of Neighborhood
instructions before (searching for defs or kills) and Neighborhood
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 line 1385 of file MachineBasicBlock.cpp.
References llvm::MachineOperandIteratorBase::analyzePhysReg(), begin(), llvm::MachineOperandIteratorBase::PhysRegInfo::Clobbered, llvm::MachineOperandIteratorBase::PhysRegInfo::DeadDef, llvm::MachineOperandIteratorBase::PhysRegInfo::Defined, end(), llvm::MachineOperandIteratorBase::PhysRegInfo::FullyDefined, I, Info, llvm::MachineOperandIteratorBase::PhysRegInfo::Killed, liveins(), LQR_Dead, LQR_Live, LQR_Unknown, N, llvm::MachineOperandIteratorBase::PhysRegInfo::PartialDeadDef, llvm::MachineOperandIteratorBase::PhysRegInfo::Read, llvm::TargetRegisterInfo::regsOverlap(), and successors().
Referenced by ContainsReg(), llvm::Thumb1InstrInfo::copyPhysReg(), findSingleRegDef(), getImplicitSPRUseForDPRUse(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::tryFoldSPUpdateIntoPushPop(), and updateOperand().
void MachineBasicBlock::copySuccessor | ( | MachineBasicBlock * | 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 line 756 of file MachineBasicBlock.cpp.
References addSuccessor(), addSuccessorWithoutProb(), assert(), llvm::find(), and I.
Referenced by splitBlock().
bool MachineBasicBlock::CorrectExtraCFGEdges | ( | MachineBasicBlock * | DestA, |
MachineBasicBlock * | DestB, | ||
bool | IsCond | ||
) |
Various pieces of code can cause excess edges in the CFG to be inserted.
If we have proven that MBB can only branch to DestA and DestB, remove any other MBB successors from the CFG. DestA and DestB can be null. Besides DestA and DestB, retain other edges leading to LandingPads (currently there can be only one; we don't check or require that here). Note it is possible that DestA and/or DestB are LandingPads.
Definition at line 1233 of file MachineBasicBlock.cpp.
References assert(), llvm::ilist_node_with_parent< MachineBasicBlock, MachineFunction >::getNextNode(), llvm::SmallPtrSetImpl< PtrType >::insert(), isEHPad(), normalizeSuccProbs(), removeSuccessor(), SI, succ_begin(), and succ_end().
Referenced by salvageDebugInfoFromEmptyBlock().
LLVM_DUMP_METHOD void MachineBasicBlock::dump | ( | ) | const |
Definition at line 245 of file MachineBasicBlock.cpp.
References llvm::dbgs(), and print().
Referenced by allPhiOperandsUndefined(), branchMaxOffsets(), llvm::ModuloScheduleExpander::cleanup(), getNewValueJumpOpcode(), runOnBasicBlock(), and splitMBB().
|
inline |
Definition at line 188 of file MachineBasicBlock.h.
Referenced by allPhiOperandsUndefined(), llvm::GISelCSEInfo::analyze(), blockEndsInUnreachable(), bothUsedInPHI(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::createSIWholeQuadModePass(), dominatesAllUsesOf(), llvm::MipsAsmPrinter::EmitBasicBlockEnd(), enableAllocFrameElim(), llvm::findPHICopyInsertPoint(), llvm::InsertPointAnalysis::getFirstInsertPoint(), getNextMachineInstr(), getUnconditionalBrDisp(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), INITIALIZE_PASS(), llvm::RISCVInstrInfo::insertIndirectBranch(), llvm::SIInstrInfo::insertIndirectBranch(), InsertLDR_STR(), llvm::AMDGPUAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), IsUnconditionalJump(), LookForIdenticalPHI(), llvm::X86CallLowering::lowerFormalArguments(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::AMDGPUCallLowering::lowerFormalArguments(), optimizeVcndVcmpPair(), performSink(), llvm::PPCFrameLowering::replaceFPWithRealFP(), salvageDebugInfoFromEmptyBlock(), llvm::scavengeFrameVirtualRegs(), and llvm::TailDuplicator::shouldTailDuplicate().
|
inline |
Definition at line 218 of file MachineBasicBlock.h.
Referenced by addExclusiveRegPair(), addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), addSegmentsWithValNo(), allPhiOperandsUndefined(), llvm::analyzeArguments(), llvm::LanaiInstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranchImpl(), llvm::HexagonInstrInfo::analyzeLoopForPipelining(), llvm::PPCInstrInfo::analyzeLoopForPipelining(), appendEndToFunction(), areCandidatesToMergeOrPair(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), AssignProtectedObjSet(), BBHasFallthrough(), llvm::MachineInstrSpan::begin(), blockEndIsUnreachable(), llvm::BranchFolder::BranchFolder(), branchMaxOffsets(), llvm::BuildMI(), llvm::AArch64InstrInfo::buildOutlinedFrame(), llvm::X86InstrInfo::buildOutlinedFrame(), callHasRegMask(), callWaitsOnFunctionReturn(), llvm::TailDuplicator::canTailDuplicate(), checkAndUpdateCPSRKill(), checkAndUpdateEFLAGSKill(), checkCCKill(), checkEFLAGSLive(), clearKillFlags(), llvm::MachineInstr::collectDebugValues(), combineKnownAdjacentMMOs(), CompareMBBNumbers(), ComputeCommonTailLength(), computeRegisterLiveness(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), CountTerminators(), llvm::createAArch64ConditionOptimizerPass(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::SIInstrInfo::createPHIDestinationCopy(), createPHIsForCMOVsInSinkBB(), createPHIsForSelects(), llvm::SIInstrInfo::createPHISourceCopy(), llvm::createR600ExpandSpecialInstrsPass(), llvm::createSIAddIMGInitPass(), llvm::createSIWholeQuadModePass(), llvm::createSparcDelaySlotFillerPass(), llvm::createX86IndirectBranchTrackingPass(), llvm::createX86PadShortFunctions(), llvm::createXCoreFrameToArgsOffsetEliminationPass(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::AVRRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::Mips16FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::WebAssemblyFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::SITargetLowering::emitGWSMemViolTestLoop(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), emitLoadSRsrcFromVGPRLoop(), EmitNop(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), llvm::AVRFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::WebAssemblyFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), emitReadCycleWidePseudo(), llvm::ScheduleDAGSDNodes::EmitSchedule(), emitSelectPseudo(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), enableAllocFrameElim(), llvm::RegScavenger::enterBasicBlockEnd(), llvm::ScheduleDAGMILive::enterRegion(), eraseDeadBBsAndChildren(), llvm::SparcTargetLowering::expandSelectCC(), llvm::GCNScheduleDAGMILive::finalizeSchedule(), findBranchDebugLoc(), findDeadCallerSavedReg(), findHoistingInsertPosAndDeps(), findIncDecAfter(), findIncDecBefore(), FindLastAluClause(), findNextInsertLocation(), llvm::findPHICopyInsertPoint(), findSurvivorBackwards(), findTemporariesForLR(), findUncondBrI(), llvm::fixStackStores(), fixupCalleeSaveRestoreStackOffset(), fixupGlobalSaddr(), for(), llvm::RegScavenger::forward(), llvm::Localizer::getAnalysisUsage(), getBranchDebugLoc(), getCompareSourceReg(), getEarliestInsertPos(), getEquivalentCallShort(), getFallThrough(), llvm::InsertPointAnalysis::getFirstInsertPoint(), getFirstNonDebugInstr(), getFirstNonPrologue(), getFirstTerminator(), getFPReg(), llvm::HexagonFrameLowering::getFrameIndexReference(), getHalfSizedType(), llvm::SlotIndexes::getIndexAfter(), GetInitialOffset(), llvm::InsertPointAnalysis::getLastInsertPointIter(), getLastNonDebugInstr(), getLatestInsertPos(), getLSMultipleTransferSize(), getNewValueJumpOpcode(), getNextMachineInstr(), llvm::ARMBasicBlockUtils::getOffsetOf(), getOrExecSource(), getPreviousInstr(), getReassignedChan(), getRegsUsedByPHIs(), getRetpolineSymbol(), getSchedRegions(), llvm::X86InstrInfo::getSPAdjust(), getUnconditionalBrDisp(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), getVariantKind(), llvm::MipsTargetLowering::HandleByVal(), hasArgumentDef(), HashEndOfMBB(), hasReturn(), hasTailCall(), llvm::HexagonInstrInfo::hasUncondBranch(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), insertCopy(), insertDeleteInstructions(), llvm::RISCVInstrInfo::insertIndirectBranch(), llvm::SIInstrInfo::insertIndirectBranch(), InsertLDR_STR(), llvm::InsertPointAnalysis::InsertPointAnalysis(), llvm::SIInstrInfo::insertReturn(), InsertReturnAddressAuth(), instrDefsUsesSCC(), InstructionStoresToFI(), IsBetterFallthrough(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), IsBranchOnlyBlock(), isCallerPreservedOrConstPhysReg(), IsCallReturnTwice(), isCompareZero(), isCopy(), isDebug(), isEFLAGSLive(), IsEmptyBlock(), isFullUndefDef(), isInRage(), llvm::Thumb2InstrInfo::isLegalToSplitMBBAt(), isNopCopy(), IsSafeAndProfitableToMove(), isSafeToMove(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), llvm::TailDuplicator::isSimpleBB(), isSimpleIf(), isTerminalReg(), IsUnconditionalJump(), llvm::XCoreInstrInfo::loadImmediate(), llvm::SystemZInstrInfo::loadImmediate(), llvm::MipsSEInstrInfo::loadRegFromStack(), llvm::Mips16InstrInfo::loadRegFromStack(), llvm::BPFInstrInfo::loadRegFromStackSlot(), llvm::RISCVInstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::LanaiInstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::SystemZInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), loadSRsrcFromVGPR(), LookForIdenticalPHI(), LowerFPToInt(), llvm::MachineInstrSpan::MachineInstrSpan(), makeImplicit(), llvm::CombinerHelper::matchElideBrByInvertingCond(), matchSwap(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MBBDefinesCTR(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), mergeOperations(), llvm::X86FrameLowering::mergeSPUpdates(), llvm::SIInstrInfo::moveToVALU(), false::IntervalSorter::operator()(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), optimizeVcndVcmpPair(), packCmovGroup(), performSink(), PrevCrossBBInst(), llvm::AArch64FrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), pushDepHeight(), llvm::BPFInstrInfo::removeBranch(), llvm::NVPTXInstrInfo::removeBranch(), llvm::XCoreInstrInfo::removeBranch(), llvm::ARCInstrInfo::removeBranch(), llvm::MSP430InstrInfo::removeBranch(), llvm::SparcInstrInfo::removeBranch(), llvm::RISCVInstrInfo::removeBranch(), llvm::LanaiInstrInfo::removeBranch(), llvm::AVRInstrInfo::removeBranch(), llvm::HexagonInstrInfo::removeBranch(), llvm::ARMBaseInstrInfo::removeBranch(), llvm::R600InstrInfo::removeBranch(), llvm::AArch64InstrInfo::removeBranch(), llvm::SystemZInstrInfo::removeBranch(), llvm::PPCInstrInfo::removeBranch(), llvm::SIInstrInfo::removeBranch(), llvm::X86InstrInfo::removeBranch(), RemoveDeadAddBetweenLEAAndJT(), RemoveVRSaveCode(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::X86InstrInfo::replaceBranchWithTailCall(), llvm::PPCFrameLowering::replaceFPWithRealFP(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::GCNDownwardRPTracker::reset(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::SystemZFrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::Mips16InstrInfo::restoreFrame(), llvm::UnreachableBlockElimPass::run(), runOnBasicBlock(), llvm::InsertNOPLoad::runOnMachineFunction(), llvm::DetectRoundChange::runOnMachineFunction(), llvm::FixAllFDIVSQRT::runOnMachineFunction(), salvageDebugInfoFromEmptyBlock(), scavengeFrameVirtualRegsInBlock(), llvm::RegScavenger::scavengeRegisterBackwards(), llvm::GCNScheduleDAGMILive::schedule(), llvm::MachineIRBuilder::setMBB(), llvm::ARMBaseInstrInfo::shouldSink(), SkipPHIsAndLabels(), SkipPHIsLabelsAndDebug(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), split(), splitBlock(), splitBlockAfter(), splitBlockBefore(), splitBlockForLoop(), llvm::SITargetLowering::splitKillBlock(), splitMBB(), llvm::Mips16InstrInfo::storeRegToStack(), llvm::BPFInstrInfo::storeRegToStackSlot(), llvm::RISCVInstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::LanaiInstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::SystemZInstrInfo::storeRegToStackSlot(), false::Chain::str(), toString(), llvm::LiveIntervals::HMEditor::updateAllRanges(), llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), verifyCTRBranch(), and VerifyPHIs().
|
inline |
Definition at line 219 of file MachineBasicBlock.h.
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 line 1155 of file MachineBasicBlock.cpp.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), and unbundleSingleMI().
Referenced by addExclusiveRegPair(), addSegmentsWithValNo(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), ContainsReg(), convertCalleeSaveRestoreToSPPrePostIncDec(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::BPFInstrInfo::copyPhysReg(), createPHIsForCMOVsInSinkBB(), llvm::createX86FixupBWInsts(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::AArch64FrameLowering::eliminateCallFramePseudoInstr(), llvm::NVPTXFrameLowering::eliminateCallFramePseudoInstr(), llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(), llvm::BPFFrameLowering::eliminateCallFramePseudoInstr(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::WebAssemblyFrameLowering::eliminateCallFramePseudoInstr(), llvm::AVRFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::LanaiFrameLowering::eliminateCallFramePseudoInstr(), llvm::MipsFrameLowering::eliminateCallFramePseudoInstr(), llvm::RISCVFrameLowering::eliminateCallFramePseudoInstr(), llvm::SystemZFrameLowering::eliminateCallFramePseudoInstr(), llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::ARCFrameLowering::eliminateCallFramePseudoInstr(), llvm::HexagonFrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), enableAllocFrameElim(), llvm::MachineInstr::eraseFromParent(), llvm::MipsSEInstrInfo::expandPostRAPseudo(), llvm::Mips16InstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::R600InstrInfo::expandPostRAPseudo(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandVGatherPseudo(), findIncDecAfter(), findTemporariesForLR(), findUncondBrI(), getINCDECFromLEA(), getPostIndexedLoadStoreOpcode(), INITIALIZE_PASS(), InsertLDR_STR(), InsertReturnAddressAuth(), isFullUndefDef(), llvm::ARMBaseInstrInfo::isLoadFromStackSlotPostFE(), IsSafeAndProfitableToMove(), IsUnconditionalJump(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerDynamicAreaOffset(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::X86FrameLowering::mergeSPUpdates(), packCmovGroup(), regOverlapsSet(), llvm::HexagonInstrInfo::removeBranch(), ReplaceFrameIndex(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), and salvageDebugInfoFromEmptyBlock().
Remove a range of instructions from the instruction list and delete them.
Definition at line 664 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), and llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator().
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 line 671 of file MachineBasicBlock.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 line 679 of file MachineBasicBlock.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 line 659 of file MachineBasicBlock.h.
Referenced by llvm::MachineInstr::eraseFromBundle(), IsMovepDestinationRegPair(), and VerifyLowRegs().
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 line 1188 of file MachineBasicBlock.cpp.
References assert(), llvm::MachineFunction::erase(), and getParent().
Referenced by llvm::TailDuplicator::canTailDuplicate(), and eraseDeadBBsAndChildren().
DebugLoc MachineBasicBlock::findBranchDebugLoc | ( | ) |
Find and return the merged DebugLoc of the branch instructions of the block.
Return UnknownLoc if there is none.
Definition at line 1312 of file MachineBasicBlock.cpp.
References end(), getFirstTerminator(), llvm::DILocation::getMergedLocation(), llvm::BranchProbability::getZero(), P, and succ_size().
Referenced by bothUsedInPHI().
DebugLoc MachineBasicBlock::findDebugLoc | ( | instr_iterator | MBBI | ) |
Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE and DBG_LABEL instructions.
Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE instructions.
Return UnknownLoc if there is none.
Definition at line 1291 of file MachineBasicBlock.cpp.
References instr_end(), and llvm::skipDebugInstructionsForward().
Referenced by llvm::R600InstrInfo::buildDefaultInstruction(), llvm::SIInstrInfo::calculateLDSSpillAddress(), containsNewBackedge(), llvm::createX86IndirectBranchTrackingPass(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::ARCFrameLowering::emitEpilogue(), emitGPDisp(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), enableAllocFrameElim(), llvm::SIInstrInfo::expandPostRAPseudo(), findUncondBrI(), llvm::HexagonFrameLowering::getFrameIndexReference(), getRegsUsedByPHIs(), llvm::X86InstrInfo::getSerializableDirectMachineOperandTargetFlags(), hasOneExitNode(), INITIALIZE_PASS(), llvm::SIInstrInfo::insertWaitStates(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::ARCInstrInfo::loadImmediate(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), removeExternalCFGEdges(), llvm::X86InstrInfo::replaceBranchWithTailCall(), llvm::AVRFrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::MachinePipeliner::runOnMachineFunction(), llvm::AVRDynAllocaSR::runOnMachineFunction(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), and llvm::SIInstrInfo::storeRegToStackSlot().
Definition at line 753 of file MachineBasicBlock.h.
References llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator().
DebugLoc MachineBasicBlock::findPrevDebugLoc | ( | instr_iterator | MBBI | ) |
Find the previous valid DebugLoc preceding MBBI, skipping and DBG_VALUE instructions.
Return UnknownLoc if there is none.
Definition at line 1301 of file MachineBasicBlock.cpp.
References instr_begin(), and llvm::skipDebugInstructionsBackward().
Referenced by appendEndToFunction().
Definition at line 760 of file MachineBasicBlock.h.
References llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator().
|
inline |
Definition at line 195 of file MachineBasicBlock.h.
Referenced by addLiveIn(), allPhiOperandsUndefined(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::NVPTXFrameLowering::emitPrologue(), llvm::rdf::FuncNode::getEntryBlock(), giveUpWithRemarks(), insertNopBeforeInstruction(), IsUnconditionalJump(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), scavengeFrameVirtualRegsInBlock(), and sortBlocks().
|
inline |
Definition at line 197 of file MachineBasicBlock.h.
|
inline |
Return alignment of the basic block.
Definition at line 376 of file MachineBasicBlock.h.
Referenced by llvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(), llvm::WinException::beginFunclet(), branchMaxOffsets(), llvm::AsmPrinter::EmitBasicBlockStart(), GetInitialOffset(), llvm::SITargetLowering::getPrefLoopAlignment(), getUnconditionalBrDisp(), INITIALIZE_PASS(), llvm::MIPrinter::print(), and print().
|
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 line 150 of file MachineBasicBlock.h.
References getName().
Referenced by addExclusiveRegPair(), llvm::MachineFunction::addLandingPad(), llvm::analyzeArguments(), AnyAliasLiveIn(), CompareMBBNumbers(), createPHIsForCMOVsInSinkBB(), llvm::createX86RetpolineThunksPass(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::AsmPrinter::EmitBasicBlockStart(), emitBlockAfter(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), emitReadCycleWidePseudo(), emitSelectPseudo(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitBranch(), llvm::FastISel::finishCondBranch(), for(), llvm::IRTranslator::getAnalysisUsage(), getBranchHint(), getCompareCC(), getFullName(), getName(), getRetpolineSymbol(), llvm::MipsTargetLowering::HandleByVal(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), isCopyFeedingInvariantStore(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), llvm::PPCInstrInfo::isSignOrZeroExtended(), LowerFPToInt(), makeImplicit(), mapWasmLandingPadIndex(), matchPair(), packCmovGroup(), llvm::PeelSingleBlockLoop(), llvm::WebAssemblyException::print(), llvm::MIPrinter::print(), print(), ProfitableToMerge(), llvm::MachinePipeliner::runOnMachineFunction(), scaleCaseProbality(), llvm::SITargetLowering::splitKillBlock(), llvm::SelectionDAGBuilder::visitBitTestCase(), and VisitGlobalVariableForEmission().
const uint32_t * MachineBasicBlock::getBeginClobberMask | ( | const TargetRegisterInfo * | 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 line 1480 of file MachineBasicBlock.cpp.
References llvm::TargetRegisterInfo::getNoPreservedMask(), and isEHFuncletEntry().
const uint32_t * MachineBasicBlock::getEndClobberMask | ( | const TargetRegisterInfo * | TRI | ) | const |
Get the clobber mask for the end of the basic block.
Definition at line 1486 of file MachineBasicBlock.cpp.
References llvm::TargetRegisterInfo::getNoPreservedMask(), isReturnBlock(), and succ_empty().
MachineBasicBlock * MachineBasicBlock::getFallThrough | ( | ) |
Return the fallthrough block if the block can implicitly transfer control to the block after it by falling off the end of it.
This should return null if it can reach the block after it, but it uses an explicit branch to do so (e.g., a table jump). Non-null return is a conservative answer.
Definition at line 826 of file MachineBasicBlock.cpp.
References end(), llvm::ilist_node_impl< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type >::getIterator(), getParent(), and isSuccessor().
Referenced by canFallThrough(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), getUnconditionalBrDisp(), and splitBlock().
MachineBasicBlock::instr_iterator MachineBasicBlock::getFirstInstrTerminator | ( | ) |
Same getFirstTerminator but it ignores bundles and return an instr_iterator instead.
Definition at line 209 of file MachineBasicBlock.cpp.
References E, I, instr_begin(), and instr_end().
Referenced by collectPHIs(), INITIALIZE_PASS(), and SplitCriticalEdge().
MachineBasicBlock::iterator MachineBasicBlock::getFirstNonDebugInstr | ( | ) |
Returns an iterator to the first non-debug instruction in the basic block, or end().
Definition at line 218 of file MachineBasicBlock.cpp.
References begin(), end(), and llvm::skipDebugInstructionsForward().
Referenced by llvm::SITargetLowering::finalizeLowering(), llvm::SITargetLowering::getPrefLoopAlignment(), IsBranchOnlyBlock(), IsEmptyBlock(), llvm::TailDuplicator::isSimpleBB(), and salvageDebugInfoFromEmptyBlock().
|
inline |
Definition at line 563 of file MachineBasicBlock.h.
MachineBasicBlock::iterator MachineBasicBlock::getFirstNonPHI | ( | ) |
Returns a pointer to the first instruction in this block that is not a PHINode 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. Returns end() is there's no non-PHI instruction.
Definition at line 160 of file MachineBasicBlock.cpp.
References assert(), E, I, instr_begin(), and instr_end().
Referenced by llvm::CombinerHelper::applyCombineShuffleVector(), callWaitsOnFunctionReturn(), containsNewBackedge(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SwiftErrorValueTracking::createEntriesInEntryBlock(), createPHIsForSelects(), llvm::createSIWholeQuadModePass(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::LegalizerHelper::fewerElementsVectorPhi(), getFirstNonPrologue(), getRegUnits(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), getUnderlyingObjects(), hasUseAfterLoop(), llvm::X86FrameLowering::inlineStackProbe(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), llvm::LegalizerHelper::moreElementsVectorPhi(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::UnreachableBlockElimPass::run(), llvm::MachinePipeliner::runOnMachineFunction(), split(), llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), and llvm::LegalizerHelper::widenScalar().
MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator | ( | ) |
Returns an iterator to the first terminator instruction of this basic block.
If a terminator does not exist, it returns end().
Definition at line 200 of file MachineBasicBlock.cpp.
References begin(), E, end(), and I.
Referenced by addSegmentsWithValNo(), allPhiOperandsUndefined(), llvm::SIInstrInfo::analyzeBranch(), llvm::HexagonInstrInfo::analyzeLoopForPipelining(), llvm::PPCInstrInfo::analyzeLoopForPipelining(), llvm::TailDuplicator::canTailDuplicate(), computeBranchTargetAndInversion(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), copyDebugInfoToPredecessor(), llvm::createAArch64ConditionOptimizerPass(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::Mips16FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::SIFrameLowering::emitEpilogue(), llvm::ARCFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::WebAssemblyFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), enableAllocFrameElim(), llvm::LegalizerHelper::fewerElementsVectorPhi(), findBranchDebugLoc(), findHoistingInsertPosAndDeps(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), findTemporariesForLR(), getAdjustedCmp(), llvm::RegBankSelect::getAnalysisUsage(), llvm::HexagonFrameLowering::getFrameIndexReference(), llvm::SITargetLowering::getPrefLoopAlignment(), llvm::RegScavenger::getRegsAvailable(), getUnderlyingObjects(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), hasReturn(), llvm::HexagonInstrInfo::hasUncondBranch(), INITIALIZE_PASS(), insertCSRRestores(), InsertLDR_STR(), llvm::InsertPointAnalysis::InsertPointAnalysis(), llvm::SIInstrInfo::insertReturn(), InsertReturnAddressAuth(), insertUndefLaneMask(), instrDefsUsesSCC(), InstructionStoresToFI(), isCopyFeedingInvariantStore(), IsUnconditionalJump(), llvm::SystemZPostRASchedStrategy::leaveMBB(), llvm::SIInstrInfo::legalizeOperands(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), llvm::LegalizerHelper::moreElementsVectorPhi(), llvm::LegalizerHelper::narrowScalar(), llvm::SIInstrInfo::removeBranch(), removeExternalCFGEdges(), llvm::PPCFrameLowering::replaceFPWithRealFP(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::MachinePipeliner::runOnMachineFunction(), splitMBB(), verifyCTRBranch(), and llvm::LegalizerHelper::widenScalar().
|
inline |
Definition at line 552 of file MachineBasicBlock.h.
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 line 264 of file MachineBasicBlock.cpp.
References getBasicBlock(), llvm::Value::getName(), llvm::MachineFunction::getName(), getNumber(), getParent(), and Name.
Referenced by llvm::ScheduleDAGSDNodes::getDAGName(), llvm::ScheduleDAGInstrs::getDAGName(), and verifyCTRBranch().
|
inline |
Definition at line 806 of file MachineBasicBlock.h.
MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr | ( | ) |
Returns an iterator to the last non-debug instruction in the basic block, or end().
Definition at line 223 of file MachineBasicBlock.cpp.
References end(), I, instr_begin(), and instr_end().
Referenced by addExclusiveRegPair(), llvm::AVRFrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::SparcFrameLowering::emitEpilogue(), llvm::RISCVFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::LanaiFrameLowering::emitEpilogue(), llvm::SystemZFrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), getBranchDebugLoc(), HashEndOfMBB(), hasTailCall(), INITIALIZE_PASS(), InsertLDR_STR(), IsBetterFallthrough(), llvm::SystemZInstrInfo::isProfitableToIfCvt(), llvm::XCoreInstrInfo::removeBranch(), llvm::ARCInstrInfo::removeBranch(), llvm::RISCVInstrInfo::removeBranch(), llvm::ARMBaseInstrInfo::removeBranch(), llvm::AArch64InstrInfo::removeBranch(), llvm::PPCInstrInfo::removeBranch(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), and verifyCTRBranch().
|
inline |
Definition at line 570 of file MachineBasicBlock.h.
StringRef MachineBasicBlock::getName | ( | ) | const |
Return the name of the corresponding LLVM basic block, or an empty string.
Definition at line 256 of file MachineBasicBlock.cpp.
References getBasicBlock().
Referenced by llvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(), llvm::ARMBasicBlockUtils::computeBlockSize(), llvm::GCNScheduleDAGMILive::finalizeSchedule(), getBlockName(), llvm::SelectionDAGISel::getUninvalidatedNodeId(), giveUpWithRemarks(), hasVulnerableLoad(), INITIALIZE_PASS(), insertDeleteInstructions(), isCallerPreservedOrConstPhysReg(), isNopCopy(), isTerminalReg(), runOnBasicBlock(), llvm::scavengeFrameVirtualRegs(), llvm::MachineFunction::verify(), and verifyAddrSpace().
|
inline |
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFunction yet, in which case this will return -1.
Definition at line 800 of file MachineBasicBlock.h.
References llvm::Number.
Referenced by llvm::LiveVariables::addNewBlock(), llvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(), llvm::ARMBasicBlockUtils::adjustBBSize(), allPhiOperandsUndefined(), appendEndToFunction(), AssignProtectedObjSet(), BBHasFallthrough(), BBIsJumpedOver(), llvm::LiveRangeCalc::calculateValues(), callHasRegMask(), callWaitsOnFunctionReturn(), collectPHIs(), CompareMBBNumbers(), llvm::ARMBasicBlockUtils::computeBlockSize(), containsNewBackedge(), createBBSelectReg(), llvm::createSIModeRegisterPass(), llvm::createX86CondBrFolding(), emitBasicBlockLoopComments(), llvm::AMDGPUAsmPrinter::EmitBasicBlockStart(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::AsmPrinter::EmitJumpTableInfo(), enableAllocFrameElim(), llvm::BitTracker::MachineEvaluator::evaluate(), findUncondBrI(), llvm::WebAssembly::getBottom(), llvm::MachineTraceMetrics::Ensemble::getDepthResources(), llvm::getEHScopeMembership(), getFPReg(), getFullName(), llvm::MachineTraceMetrics::Ensemble::getHeightResources(), GetInitialOffset(), llvm::MachineTraceMetrics::Trace::getInstrSlack(), llvm::InsertPointAnalysis::getLastInsertPoint(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::SlotIndexes::getMBBRange(), getMCSymbolForMBB(), getNewValueJumpOpcode(), getNumAllocatableRegsForConstraints(), llvm::ARMBasicBlockUtils::getOffsetOf(), llvm::ReachingDefAnalysis::getReachingDef(), llvm::MachineTraceMetrics::Trace::getResourceLength(), llvm::MachineTraceMetrics::getResources(), getSymbol(), llvm::MachineTraceMetrics::Ensemble::getTrace(), getUnconditionalBrDisp(), giveUpWithRemarks(), llvm::LiveVariables::HandleVirtRegUse(), HashMachineInstr(), hasOneExitNode(), INITIALIZE_PASS(), llvm::po_iterator_storage< LoopBounds, true >::insertEdge(), llvm::LiveIntervals::insertMBBInMaps(), llvm::SlotIndexes::insertMBBInMaps(), llvm::InsertPointAnalysis::InsertPointAnalysis(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::invalidate(), llvm::ARMBasicBlockUtils::isBBInRange(), isDebug(), llvm::MachineTraceMetrics::Trace::isDepInTrace(), isInRage(), llvm::LiveRangeCalc::isJointlyDominated(), llvm::LiveVariables::VarInfo::isLiveIn(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), maybeUpdateTerminator(), llvm::MBB2NumberFunctor::operator()(), llvm::WebAssemblyException::print(), llvm::MIPrinter::print(), llvm::MachineTraceMetrics::Trace::print(), print(), printAsOperand(), PrintParentLoopComment(), pushDepHeight(), llvm::BitTracker::reached(), RemoveDeadAddBetweenLEAAndJT(), removeExternalCFGEdges(), llvm::BitTracker::run(), salvageDebugInfoFromEmptyBlock(), llvm::LiveRangeCalc::setLiveOutValue(), sortBlocks(), llvm::SplitEditor::splitSingleBlock(), llvm::LoopTraversal::traverse(), UpdateCPSRUse(), llvm::MachineTraceMetrics::Ensemble::updateDepth(), updatePhysDepsDownwards(), llvm::MachineTraceMetrics::Ensemble::verify(), and VerifyPHIs().
|
inline |
Return the MachineFunction containing this basic block.
Definition at line 173 of file MachineBasicBlock.h.
Referenced by addExclusiveRegPair(), llvm::addFrameReference(), addLiveIn(), addLiveInRegs(), llvm::LivePhysRegs::addLiveIns(), llvm::LiveRegUnits::addLiveIns(), llvm::addLiveIns(), llvm::LiveRegUnits::addLiveOuts(), llvm::LivePhysRegs::addLiveOuts(), llvm::LivePhysRegs::addLiveOutsNoPristines(), llvm::MachineInstr::addOperand(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::AddPHIOperand(), addSavedGPR(), llvm::ARMBasicBlockUtils::adjustBBOffsetsAfter(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::RegAllocBase::allocatePhysRegs(), allPhiOperandsUndefined(), llvm::analyzeArguments(), llvm::PPCInstrInfo::analyzeLoopForPipelining(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), atomicReadDroppedOnZero(), BBHasFallthrough(), llvm::DwarfCFIException::beginFragment(), llvm::BranchFolder::BranchFolder(), llvm::X86FrameLowering::BuildCFI(), buildEpilogReload(), llvm::BuildMI(), buildPrologSpill(), llvm::SIInstrInfo::calculateLDSSpillAddress(), canCombine(), canFallThroughTo(), llvm::AArch64InstrInfo::canInsertSelect(), llvm::SystemZInstrInfo::canInsertSelect(), llvm::SIInstrInfo::canInsertSelect(), llvm::X86InstrInfo::canInsertSelect(), llvm::X86InstrInfo::canMakeTailCallConditional(), cannotCoexistAsymm(), canSplitCriticalEdge(), llvm::Thumb1FrameLowering::canUseAsEpilogue(), llvm::X86FrameLowering::canUseAsEpilogue(), llvm::AArch64FrameLowering::canUseAsPrologue(), llvm::X86FrameLowering::canUseAsPrologue(), changeFCMPPredToAArch64CC(), llvm::X86InstrInfo::classifyLEAReg(), llvm::WebAssemblyDebugValueManager::clone(), CombineCVTAToLocal(), combineKnownAdjacentMMOs(), llvm::WebAssemblyInstrInfo::commuteInstructionImpl(), llvm::PPCInstrInfo::commuteInstructionImpl(), llvm::SystemZInstrInfo::commuteInstructionImpl(), llvm::X86InstrInfo::commuteInstructionImpl(), CompareMBBNumbers(), ComputeCommonTailLength(), llvm::HexagonBlockRanges::computeDeadMap(), llvm::computeLiveIns(), llvm::InstructionSelector::constrainOperandRegToRegClass(), llvm::constrainSelectedInstRegOperands(), containsNewBackedge(), ContainsReg(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::PPCInstrInfo::convertToImmediateForm(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::Thumb1InstrInfo::copyPhysReg(), llvm::WebAssemblyInstrInfo::copyPhysReg(), llvm::NVPTXInstrInfo::copyPhysReg(), llvm::AVRInstrInfo::copyPhysReg(), llvm::SIInstrInfo::copyPhysReg(), llvm::SystemZInstrInfo::copyPhysReg(), createPHIsForCMOVsInSinkBB(), createPHIsForSelects(), llvm::createSparcDelaySlotFillerPass(), llvm::MachineFunction::DeleteMachineBasicBlock(), llvm::ARCFrameLowering::determineCalleeSaves(), doesModifyCalleeSavedReg(), llvm::CombinerHelper::dominates(), llvm::LexicalScopes::dominates(), llvm::ARMBaseInstrInfo::duplicate(), llvm::TargetInstrInfo::duplicate(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::RISCVRegisterInfo::eliminateFrameIndex(), llvm::LanaiRegisterInfo::eliminateFrameIndex(), llvm::AVRRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::ARCRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitBlockAfter(), emitBuildPairF64Pseudo(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), EmitCfiOffset(), EmitDefCfaOffset(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::SITargetLowering::emitGWSMemViolTestLoop(), emitIndirectDst(), emitIndirectSrc(), llvm::HexagonAsmPrinter::EmitInstruction(), llvm::HexagonHazardRecognizer::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMAsmPrinter::EmitJumpTableTBInst(), llvm::ThumbRegisterInfo::emitLoadConstPool(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), emitLoadM0FromVGPRLoop(), emitLoadSRsrcFromVGPRLoop(), llvm::AArch64TargetLowering::EmitLoweredCatchRet(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), emitPrologueEpilogueSPUpdate(), emitReadCycleWidePseudo(), llvm::ScheduleDAGSDNodes::EmitSchedule(), emitSelectPseudo(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitSplitF64Pseudo(), llvm::X86FrameLowering::emitSPUpdate(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), emitThumbRegPlusImmInReg(), emitXBegin(), enableAllocFrameElim(), eraseFromParent(), llvm::MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval(), eraseGPOpnd(), expandLoadStackGuard(), ExpandMOVImmSExti8(), llvm::SparcInstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::SIInstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), llvm::X86InstrInfo::expandPostRAPseudo(), llvm::PPCInstrInfo::expandPostRAPseudo(), llvm::SparcTargetLowering::expandSelectCC(), llvm::HexagonBlockRanges::expandToSubRegs(), expandXorFP(), extractDLC(), extractRsrcPtr(), llvm::finalizeBundle(), findDeadCallerSavedReg(), llvm::findPHICopyInsertPoint(), findPotentialBlockers(), findScratchNonCalleeSaveRegister(), findTemporariesForLR(), llvm::SIInstrInfo::fixImplicitOperands(), llvm::fixStackStores(), FixTail(), llvm::PPCInstrInfo::fixupIsDeadOrKill(), llvm::SIInstrInfo::FoldImmediate(), llvm::TargetInstrInfo::foldMemoryOperand(), for(), forceReg(), llvm::RegScavenger::forward(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::SIInstrInfo::getAddNoCarry(), llvm::IRTranslator::getAnalysisUsage(), getBBFallenThrough(), getCompareSourceReg(), getConstantFromPool(), llvm::PPCInstrInfo::getDefMIPostRA(), getEquivalentCallShort(), llvm::ARMTargetLowering::getExceptionSelectorRegister(), getExtendTypeForInst(), getFallThrough(), getFoldableImm(), getFPReg(), getFPTrueImmVal(), getFrameIndexMMO(), llvm::HexagonFrameLowering::getFrameIndexReference(), getFullName(), llvm::ARMHazardRecognizer::getHazardType(), llvm::HexagonHazardRecognizer::getHazardType(), getImmedFromMO(), getInsertVecEltOpInfo(), llvm::X86RegisterBankInfo::getInstrAlternativeMappings(), llvm::AArch64RegisterBankInfo::getInstrAlternativeMappings(), llvm::AMDGPURegisterBankInfo::getInstrAlternativeMappings(), llvm::ARMRegisterBankInfo::getInstrMapping(), llvm::MipsRegisterBankInfo::getInstrMapping(), llvm::X86RegisterBankInfo::getInstrMapping(), llvm::AArch64RegisterBankInfo::getInstrMapping(), llvm::AMDGPURegisterBankInfo::getInstrMapping(), llvm::AArch64InstrInfo::getInstSizeInBytes(), llvm::ARCInstrInfo::getInstSizeInBytes(), llvm::MSP430InstrInfo::getInstSizeInBytes(), llvm::RISCVInstrInfo::getInstSizeInBytes(), llvm::AVRInstrInfo::getInstSizeInBytes(), llvm::MipsInstrInfo::getInstSizeInBytes(), llvm::ARMBaseInstrInfo::getInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), llvm::PPCInstrInfo::getInstSizeInBytes(), llvm::SIInstrInfo::getInstSizeInBytes(), getLayoutSuccessorProbThreshold(), llvm::getLiveRegsAfter(), llvm::getLiveRegsBefore(), getLoadStoreOffsetAlign(), getLoadStoreOffsetSizeInBits(), getLogicalBitOpcode(), llvm::PPCInstrInfo::getMachineCombinerPatterns(), getMatchingEHPad(), getMCSymbolForMBB(), llvm::MipsInstrInfo::GetMemOperand(), llvm::SIInstrInfo::getMemOperandWithOffset(), getMemsetValue(), llvm::outliner::Candidate::getMF(), llvm::MachineInstr::getMF(), getNextBlock(), llvm::PPCInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpRegClass(), llvm::SIInstrInfo::getOpSize(), llvm::AArch64InstrInfo::getOutliningType(), llvm::X86GenRegisterBankInfo::getPartialMappingIdx(), getRegClassFromGRPhysReg(), getRegsUsedByPHIs(), getRetpolineSymbol(), getSchedRegions(), getShiftTypeForInst(), llvm::HexagonInstrInfo::getSize(), llvm::X86InstrInfo::getSPAdjust(), getSubOpcode(), getSymbol(), GetSymbolRef(), llvm::BPFTargetLowering::getTargetNodeName(), llvm::MachineLoop::getTopBlock(), llvm::ARMInstrInfo::getUnindexedOpcode(), llvm::SIInstrInfo::getVALUOp(), getVariantKind(), llvm::guessSuccessors(), llvm::MipsTargetLowering::HandleByVal(), HandleVRSaveUpdate(), llvm::RISCVFrameLowering::hasFP(), llvm::TargetInstrInfo::hasReassociableOperands(), llvm::TargetInstrInfo::hasReassociableSibling(), hasVectorOperands(), llvm::SIInstrInfo::hasVGPRUses(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), llvm::AArch64TargetLowering::initializeSplitCSR(), llvm::PPCTargetLowering::initializeSplitCSR(), llvm::outliner::Candidate::initLRU(), llvm::HexagonFrameLowering::insertCFIInstructions(), llvm::SITargetLowering::insertCopiesSplitCSR(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), insertCSRRestores(), insertCSRSaves(), insertDeleteInstructions(), llvm::SIInstrInfo::insertEQ(), llvm::RISCVInstrInfo::insertIndirectBranch(), llvm::SIInstrInfo::insertIndirectBranch(), InsertLDR_STR(), llvm::SlotIndexes::insertMBBInMaps(), llvm::SIInstrInfo::insertNE(), llvm::SIInstrInfo::insertReturn(), InsertSEH(), llvm::AArch64InstrInfo::insertSelect(), llvm::SystemZInstrInfo::insertSelect(), llvm::SIInstrInfo::insertSelect(), llvm::X86InstrInfo::insertSelect(), insertUndefLaneMask(), llvm::Mips16RegisterInfo::intRegClass(), isAmbiguous(), llvm::AArch64InstrInfo::isAssociativeAndCommutative(), llvm::X86InstrInfo::isAssociativeAndCommutative(), llvm::PPCInstrInfo::isBDNZ(), isCombineInstrCandidateFP(), isCompareZero(), llvm::MachineInstr::isDereferenceableInvariantLoad(), isEFLAGSLive(), isFpMulInstruction(), isFunctionEntryBlock(), isIdentityValue(), llvm::SIInstrInfo::isImmOperandLegal(), llvm::X86TargetLowering::isIntDivCheap(), llvm::LiveRangeCalc::isJointlyDominated(), isLibCallInTailPosition(), llvm::AArch64InstrInfo::isMBBSafeToOutlineFrom(), isNoReturnDef(), llvm::SIInstrInfo::isOperandLegal(), isPHIRegionIndex(), llvm::ARMBaseInstrInfo::isPredicable(), isPreISelGenericFloatingPointOpcode(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::VLIWResourceModel::isResourceAvailable(), llvm::PPCInstrInfo::isSignOrZeroExtended(), isSimpleIf(), isStackPtrRelative(), llvm::SystemZInstrInfo::isStackSlotCopy(), IsUnconditionalJump(), llvm::SIInstrInfo::isVGPRCopy(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOpWithMove(), livein_begin(), llvm::MipsSEInstrInfo::loadImmediate(), llvm::XCoreInstrInfo::loadImmediate(), loadM0FromVGPR(), llvm::MipsSEInstrInfo::loadRegFromStack(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::loadRegFromStackSlot(), loadSRsrcFromVGPR(), llvm::WebAssemblyMCInstLower::lower(), llvm::LowerARMMachineInstrToMCInst(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerDynamicAreaOffset(), LowerFPToInt(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::Mips16InstrInfo::makeFrame(), makeImplicit(), mapWasmLandingPadIndex(), matchPair(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), llvm::SIInstrInfo::materializeImmediate(), memOpsHaveSameBasePtr(), mergeOperations(), moveAfter(), moveBefore(), llvm::SIInstrInfo::moveToVALU(), llvm::RISCVInstrInfo::movImm(), llvm::AArch64RegisterInfo::needsFrameBaseReg(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), opcodeEmitsNoInsts(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), packCmovGroup(), llvm::PeelSingleBlockLoop(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), PrevCrossBBInst(), llvm::MIPrinter::print(), llvm::MachineFunctionProperties::print(), print(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::printMBBReference(), llvm::ARMAsmPrinter::printOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), ProfitableToMerge(), propagateLocalCopies(), llvm::recomputeLivenessFlags(), llvm::X86InstrInfo::reMaterialize(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), removeExternalCFGEdges(), removeFromParent(), RemoveVRSaveCode(), replaceDominatedUses(), llvm::PPCFrameLowering::replaceFPWithRealFP(), ReplaceFrameIndex(), llvm::PPCInstrInfo::replaceInstrWithLI(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), reportIllegalCopy(), rescheduleCanonically(), llvm::SystemZHazardRecognizer::Reset(), llvm::GCNDownwardRPTracker::reset(), llvm::ThumbRegisterInfo::resolveFrameIndex(), llvm::SIRegisterInfo::resolveFrameIndex(), llvm::AArch64RegisterInfo::resolveFrameIndex(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::ARMBaseRegisterInfo::resolveFrameIndex(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::AVRFrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::SystemZFrameLowering::restoreCalleeSavedRegisters(), llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(), llvm::ARMFrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(), llvm::ARCFrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), restoreCRs(), llvm::Mips16InstrInfo::restoreFrame(), llvm::X86FrameLowering::restoreWin32EHStackPointers(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), runOnBasicBlock(), salvageDebugInfoFromEmptyBlock(), llvm::Mips16RegisterInfo::saveScavengerRegister(), scaleCaseProbality(), llvm::RegScavenger::scavengeRegisterBackwards(), scavengeVReg(), llvm::ScheduleDAGMILive::scheduleMI(), setCallTargetReg(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineIRBuilder::setMBB(), llvm::RegScavenger::setRegUsed(), llvm::AArch64InstrInfo::shouldClusterMemOps(), llvm::SIInstrInfo::shouldClusterMemOps(), llvm::HexagonRegisterInfo::shouldCoalesce(), llvm::ARMBaseRegisterInfo::shouldCoalesce(), shrinkScalarCompare(), SkipPHIsAndLabels(), SkipPHIsLabelsAndDebug(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::ARMFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::ARCFrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), llvm::SIRegisterInfo::spillSGPR(), split(), splitBlock(), splitBlockForLoop(), SplitCriticalEdge(), splitEdge(), llvm::SITargetLowering::splitKillBlock(), llvm::MipsSEInstrInfo::storeRegToStack(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::X86InstrInfo::storeRegToStackSlot(), swapMIOperands(), llvm::SystemZInstrInfo::SystemZInstrInfo(), tieOpsIfNeeded(), tryAddToFoldList(), tryChangeVGPRtoSGPRinCopy(), tryFoldInst(), tryOptimizeLEAtoMOV(), tryToElideArgumentCopy(), tryToFoldACImm(), updateKillStatus(), updateLiveIn(), updateOperand(), UpdateOperandRegClass(), updateTerminator(), llvm::R600InstrInfo::usesTextureCache(), llvm::R600InstrInfo::usesVertexCache(), llvm::MachineFunction::verify(), verifyCTRBranch(), llvm::SIInstrInfo::verifyInstruction(), llvm::SelectionDAGBuilder::visitSPDescriptorParent(), and WindowsRequiresStackProbe().
|
inline |
Definition at line 174 of file MachineBasicBlock.h.
|
inlinestatic |
Support for MachineInstr::getNextNode().
Definition at line 232 of file MachineBasicBlock.h.
MCSymbol * MachineBasicBlock::getSymbol | ( | ) | const |
Return the MCSymbol for this basic block.
Definition at line 59 of file MachineBasicBlock.cpp.
References assert(), llvm::MCContext::getAsmInfo(), llvm::MachineFunction::getContext(), llvm::MachineFunction::getFunctionNumber(), getNumber(), llvm::MCContext::getOrCreateSymbol(), getParent(), llvm::MCAsmInfo::getPrivateLabelPrefix(), and llvm::cl::Prefix.
Referenced by llvm::ARCMCInstLower::ARCMCInstLower(), ConvertDoubleToBytes(), llvm::AsmPrinter::EmitBasicBlockStart(), EmitHiLo(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), EmitNops(), llvm::SystemZMCInstLower::getExpr(), getVariantKind(), llvm::HexagonLowerToMC(), llvm::XCoreMCInstLower::Initialize(), llvm::MipsMCInstLower::Initialize(), INITIALIZE_PASS(), llvm::MSP430MCInstLower::Lower(), llvm::LanaiMCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::X86TargetLowering::LowerCustomJumpTableEntry(), llvm::AArch64MCInstLower::lowerOperand(), llvm::MipsMCInstLower::LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::LowerRISCVMachineOperandToMCOperand(), LowerSymbolOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), llvm::AVRAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), and VisitGlobalVariableForEmission().
|
inline |
Test whether this block is potentially the target of an indirect branch.
Definition at line 159 of file MachineBasicBlock.h.
Referenced by llvm::TailDuplicator::canTailDuplicate(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::MachineLoopInfo::findLoopPreheader(), INITIALIZE_PASS(), llvm::HexagonAsmPrinter::isBlockOnlyReachableByFallthrough(), IsCallReturnTwice(), llvm::MIPrinter::print(), print(), salvageDebugInfoFromEmptyBlock(), and llvm::TailDuplicator::tailDuplicateAndUpdate().
bool MachineBasicBlock::hasEHPadSuccessor | ( | ) | const |
Definition at line 237 of file MachineBasicBlock.cpp.
References E, I, succ_begin(), and succ_end().
Referenced by bothUsedInPHI(), isLegalToHoistInto(), and unstackifyVRegsUsedInSplitBB().
|
inline |
Test whether this block must have its label emitted.
Definition at line 166 of file MachineBasicBlock.h.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart().
|
inline |
Return true if any of the successors have probabilities attached to them.
Definition at line 503 of file MachineBasicBlock.h.
Referenced by findUncondBrI(), and llvm::guessSuccessors().
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. See MIBundleBuilder::insert() for a more reliable way of doing that.
Definition at line 1168 of file MachineBasicBlock.cpp.
References assert(), llvm::MachineInstr::BundledPred, llvm::MachineInstr::BundledSucc, llvm::iplist_impl< IntrusiveListT, TraitsT >::insert(), instr_end(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and llvm::MachineInstr::setFlag().
Referenced by addSegmentsWithValNo(), llvm::BuildMI(), llvm::AArch64InstrInfo::buildOutlinedFrame(), llvm::X86InstrInfo::buildOutlinedFrame(), llvm::WebAssemblyDebugValueManager::clone(), llvm::MachineFunction::CloneMachineInstrBundle(), CompareMBBNumbers(), llvm::rdf::Liveness::computeLiveIns(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), createPHIsForCMOVsInSinkBB(), llvm::createX86FixupBWInsts(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::InstrEmitter::EmitDbgLabel(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::TargetLoweringBase::emitPatchPoint(), emitReadCycleWidePseudo(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::TargetLoweringBase::emitXRayCustomEvent(), llvm::TargetLoweringBase::emitXRayTypedEvent(), eraseDeadBBsAndChildren(), findUncondBrI(), llvm::TargetInstrInfo::foldMemoryOperand(), FuseInst(), FuseTwoAddrInst(), llvm::Localizer::getAnalysisUsage(), getUnconditionalBrDisp(), hasArgumentDef(), INITIALIZE_PASS(), llvm::RegBankSelect::InsertPoint::insert(), llvm::MIBundleBuilder::insert(), insertDeleteInstructions(), llvm::MachineIRBuilder::insertInstr(), llvm::AArch64InstrInfo::insertOutlinedCall(), llvm::X86InstrInfo::insertOutlinedCall(), isCopy(), isInRage(), llvm::PPCInstrInfo::loadRegFromStackSlot(), moveInstsAfter(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), packCmovGroup(), ProcessSDDbgValues(), llvm::X86InstrInfo::reMaterialize(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), restoreCRs(), llvm::SelectionDAGISel::runOnMachineFunction(), scaleCaseProbality(), llvm::GCNScheduleDAGMILive::schedule(), llvm::GCNIterativeScheduler::scheduleRegion(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), splitEdge(), llvm::PPCInstrInfo::storeRegToStackSlot(), swapAntiDependences(), llvm::SystemZInstrInfo::SystemZInstrInfo(), and toString().
Insert a range of instructions into the instruction list before I.
Definition at line 613 of file MachineBasicBlock.h.
References assert(), E, llvm::sys::path::end(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insert().
|
inline |
Insert MI into the instruction list before I.
Definition at line 620 of file MachineBasicBlock.h.
References assert(), llvm::sys::path::end(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), llvm::iplist_impl< IntrusiveListT, TraitsT >::insert(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and MI.
|
inline |
Insert MI into the instruction list after I.
Definition at line 629 of file MachineBasicBlock.h.
References assert(), llvm::sys::path::end(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), llvm::iplist_impl< IntrusiveListT, TraitsT >::insertAfter(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and MI.
Referenced by createPHIsForCMOVsInSinkBB(), InsertSEH(), isLoadStoreThatCanHandleDisplacement(), packCmovGroup(), and llvm::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 line 639 of file MachineBasicBlock.h.
References assert(), llvm::iplist_impl< IntrusiveListT, TraitsT >::insertAfter(), llvm::MachineInstr::isBundledWithPred(), and llvm::MachineInstr::isBundledWithSucc().
Referenced by INITIALIZE_PASS().
|
inline |
Definition at line 191 of file MachineBasicBlock.h.
|
inline |
Definition at line 193 of file MachineBasicBlock.h.
|
inline |
Definition at line 200 of file MachineBasicBlock.h.
Referenced by llvm::AArch64InstrInfo::buildOutlinedFrame(), callWaitsOnFunctionReturn(), llvm::createHexagonHardwareLoops(), llvm::createLanaiDelaySlotFillerPass(), llvm::finalizeBundles(), findPotentialBlockers(), findPrevDebugLoc(), findVCMPToFoldIntoVPST(), fixPHIsInSucc(), fixupRegionExits(), llvm::HexagonInstrInfo::getBranchingInstrs(), getFirstInstrTerminator(), getFirstNonPHI(), getLastNonDebugInstr(), hasOneExitNode(), hasUseAfterLoop(), INITIALIZE_PASS(), isImmValidForOpcode(), IsMovepDestinationRegPair(), llvm::PPCInstrInfo::isSignOrZeroExtended(), llvm::HexagonInstrInfo::nonDbgBBSize(), llvm::MIPrinter::print(), llvm::printMBBReference(), llvm::WebAssemblyInstrInfo::removeBranch(), ReplaceUsesOfBlockWith(), UpdateCPSRUse(), and updateKillStatus().
|
inline |
Definition at line 201 of file MachineBasicBlock.h.
|
inline |
Definition at line 202 of file MachineBasicBlock.h.
Referenced by llvm::AArch64InstrInfo::buildOutlinedFrame(), callWaitsOnFunctionReturn(), canInstrSubstituteCmpInstr(), collectPHIs(), createBBSelectReg(), llvm::createHexagonHardwareLoops(), llvm::createLanaiDelaySlotFillerPass(), EmitHiLo(), llvm::HexagonAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::finalizeBundle(), llvm::finalizeBundles(), findDebugLoc(), findNextInsertLocation(), findVCMPToFoldIntoVPST(), fixPHIsInSucc(), fixupRegionExits(), llvm::HexagonInstrInfo::getBranchingInstrs(), getBundledUseMI(), getFirstInstrTerminator(), getFirstNonPHI(), llvm::SIInstrInfo::getInstBundleSize(), getInstrVecReg(), llvm::ARMBaseInstrInfo::getInstSizeInBytes(), getLastNonDebugInstr(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::HexagonInstrInfo::hasLoadFromStackSlot(), llvm::HexagonInstrInfo::hasStoreToStackSlot(), hasUseAfterLoop(), INITIALIZE_PASS(), insert(), insertNoopInBundle(), isFunctionEntryBlock(), isImmValidForOpcode(), IsMovepDestinationRegPair(), llvm::ARMBaseInstrInfo::isPredicated(), llvm::MachineOperandIteratorBase::MachineOperandIteratorBase(), matchSwap(), moveInstrOut(), llvm::HexagonInstrInfo::nonDbgBBSize(), llvm::MIPrinter::print(), llvm::printMBBReference(), llvm::WebAssemblyInstrInfo::removeBranch(), ReplaceUsesOfBlockWith(), llvm::MachinePipeliner::runOnMachineFunction(), splitBlock(), SplitCriticalEdge(), and UpdateCPSRUse().
|
inline |
Definition at line 203 of file MachineBasicBlock.h.
|
inline |
Definition at line 190 of file MachineBasicBlock.h.
Referenced by llvm::createSIModeRegisterPass(), and llvm::ScheduleDAGSDNodes::EmitSchedule().
|
inline |
Definition at line 192 of file MachineBasicBlock.h.
|
inline |
Definition at line 204 of file MachineBasicBlock.h.
|
inline |
Definition at line 205 of file MachineBasicBlock.h.
|
inline |
Definition at line 206 of file MachineBasicBlock.h.
Referenced by llvm::createLanaiDelaySlotFillerPass(), and getWaitStatesSince().
|
inline |
Definition at line 207 of file MachineBasicBlock.h.
|
inline |
Definition at line 211 of file MachineBasicBlock.h.
Referenced by addIncomingValuesToPHIs(), combineKnownAdjacentMMOs(), copyDebugInfoToPredecessor(), copyDebugInfoToSuccessor(), llvm::PPCInstrInfo::findLoopInstr(), INITIALIZE_PASS(), print(), propagateLocalCopies(), and updatePHIs().
|
inline |
Definition at line 212 of file MachineBasicBlock.h.
|
inline |
Returns true if this is the entry block of a cleanup funclet.
Definition at line 406 of file MachineBasicBlock.h.
Referenced by llvm::WinException::beginFunclet(), llvm::WinException::endFunclet(), and getMCSymbolForMBB().
|
inline |
Returns true if this is the entry block of an EH funclet.
Definition at line 400 of file MachineBasicBlock.h.
Referenced by llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::WinException::endFunclet(), getBeginClobberMask(), getMCSymbolForMBB(), giveUpWithRemarks(), isCallInstruction(), and llvm::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 line 383 of file MachineBasicBlock.h.
Referenced by addLiveIn(), addSegmentsWithValNo(), allPhiOperandsUndefined(), appendEndToFunction(), llvm::rdf::DataFlowGraph::build(), canSplitCriticalEdge(), collectEHScopeMembers(), CorrectExtraCFGEdges(), llvm::findPHICopyInsertPoint(), getLayoutSuccessorProbThreshold(), getMatchingEHPad(), llvm::rdf::DataFlowGraph::getNextShadow(), getRetpolineSymbol(), giveUpWithRemarks(), llvm::LiveVariables::HandleVirtRegDef(), INITIALIZE_PASS(), InstructionStoresToFI(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), matchPair(), maybeUpdateTerminator(), llvm::MIPrinter::print(), print(), llvm::WebAssemblyExceptionInfo::recalculate(), llvm::ARMTargetLowering::ReplaceNodeResults(), salvageDebugInfoFromEmptyBlock(), sortBlocks(), and splitEdge().
|
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 line 393 of file MachineBasicBlock.h.
|
inline |
Convenience function that returns true if the bock ends in a EH scope return instruction.
Definition at line 582 of file MachineBasicBlock.h.
References llvm::empty(), P, and llvm::SplitCriticalEdge().
Referenced by collectEHScopeMembers().
bool MachineBasicBlock::isLayoutSuccessor | ( | const MachineBasicBlock * | 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 line 821 of file MachineBasicBlock.cpp.
References I.
Referenced by llvm::LanaiInstrInfo::analyzeBranch(), llvm::TailDuplicator::canTailDuplicate(), llvm::IRTranslator::getAnalysisUsage(), getLayoutSuccessorProbThreshold(), getOrExecSource(), INITIALIZE_PASS(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), IsUnconditionalJump(), llvm::CombinerHelper::matchElideBrByInvertingCond(), ProfitableToMerge(), SplitCriticalEdge(), and splitEdge().
bool MachineBasicBlock::isLegalToHoistInto | ( | ) | const |
Returns true if it is legal to hoist instructions into this block.
Definition at line 250 of file MachineBasicBlock.cpp.
References hasEHPadSuccessor(), and isReturnBlock().
bool MachineBasicBlock::isLiveIn | ( | MCPhysReg | Reg, |
LaneBitmask | LaneMask = LaneBitmask::getAll() |
||
) | const |
Return true if the specified register is in the live in set.
Definition at line 466 of file MachineBasicBlock.cpp.
References llvm::find_if(), I, livein_end(), llvm::MachineBasicBlock::RegisterMaskPair::PhysReg, and Reg.
Referenced by addLiveIn(), addLiveInRegs(), addSavedGPR(), AnyAliasLiveIn(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::X86FrameLowering::canUseAsPrologue(), checkAndUpdateCPSRKill(), checkAndUpdateEFLAGSKill(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitSPUpdate(), enableAllocFrameElim(), getNewValueJumpOpcode(), hasVulnerableLoad(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), isCallerPreservedOrConstPhysReg(), isCopyFeedingInvariantStore(), isEFLAGSLive(), performSink(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), UpdateCPSRUse(), updateLiveIn(), and verifyLeafProcRegUse().
bool MachineBasicBlock::isPredecessor | ( | const MachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB is a predecessor of this block.
Definition at line 813 of file MachineBasicBlock.cpp.
References llvm::is_contained(), and predecessors().
Referenced by getOffsetFromIndices(), getPreviousInstr(), llvm::MachineTraceMetrics::Ensemble::invalidate(), and llvm::MachineTraceMetrics::Ensemble::verify().
|
inline |
Convenience function that returns true if the block ends in a return instruction.
Definition at line 576 of file MachineBasicBlock.h.
References llvm::empty().
Referenced by llvm::LiveRegUnits::addLiveOuts(), llvm::LivePhysRegs::addLiveOutsNoPristines(), llvm::X86FrameLowering::canUseAsEpilogue(), getEndClobberMask(), HandleVRSaveUpdate(), isLegalToHoistInto(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), llvm::PPCFrameLowering::replaceFPWithRealFP(), llvm::CriticalAntiDepBreaker::StartBlock(), and llvm::AggressiveAntiDepBreaker::StartBlock().
bool MachineBasicBlock::isSuccessor | ( | const MachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB is a successor of this block.
Definition at line 817 of file MachineBasicBlock.cpp.
References llvm::is_contained(), and successors().
Referenced by addIncomingValuesToPHIs(), bothUsedInPHI(), findUncondBrI(), getFallThrough(), getLayoutSuccessorProbThreshold(), getNextMachineInstr(), getRegsUsedByPHIs(), greaterWithBias(), INITIALIZE_PASS(), llvm::MachineTraceMetrics::Ensemble::invalidate(), IsBetterFallthrough(), isCallerPreservedOrConstPhysReg(), IsUnconditionalJump(), pushDepHeight(), removeExternalCFGEdges(), salvageDebugInfoFromEmptyBlock(), llvm::TailDuplicator::shouldTailDuplicate(), splitBlock(), splitEdge(), UpdateCPSRUse(), updatePHIs(), and llvm::MachineTraceMetrics::Ensemble::verify().
MachineBasicBlock::livein_iterator MachineBasicBlock::livein_begin | ( | ) | const |
Definition at line 1497 of file MachineBasicBlock.cpp.
References assert(), getParent(), and llvm::MachineFunctionProperties::TracksLiveness.
Referenced by IsUnconditionalJump().
|
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 line 352 of file MachineBasicBlock.h.
|
inline |
Definition at line 359 of file MachineBasicBlock.h.
Referenced by llvm::addLiveIns(), llvm::MIPrinter::print(), and print().
|
inline |
Definition at line 358 of file MachineBasicBlock.h.
Referenced by isLiveIn(), and IsUnconditionalJump().
|
inline |
Definition at line 360 of file MachineBasicBlock.h.
References I, llvm::make_range(), and TRI.
Referenced by addBlockLiveIns(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::LivePhysRegs::available(), llvm::rdf::DataFlowGraph::build(), ComputeCommonTailLength(), computeRegisterLiveness(), llvm::LiveVariables::HandleVirtRegDef(), llvm::HexagonBlockRanges::HexagonBlockRanges(), INITIALIZE_PASS(), isCoalescable(), isEAXLiveIn(), matchPair(), llvm::MIPrinter::print(), print(), and llvm::rdf::Liveness::resetKills().
|
inline |
Definition at line 353 of file MachineBasicBlock.h.
References llvm::make_range().
void MachineBasicBlock::moveAfter | ( | MachineBasicBlock * | NewBefore | ) |
Definition at line 528 of file MachineBasicBlock.cpp.
References llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::ilist_node_impl< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type >::getIterator(), getParent(), and llvm::MachineFunction::splice().
Referenced by IsUnconditionalJump(), salvageDebugInfoFromEmptyBlock(), and sortBlocks().
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 line 524 of file MachineBasicBlock.cpp.
References llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::ilist_node_impl< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type >::getIterator(), getParent(), and llvm::MachineFunction::splice().
Referenced by salvageDebugInfoFromEmptyBlock().
|
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 line 455 of file MachineBasicBlock.h.
References llvm::BranchProbability::normalizeProbabilities().
Referenced by CorrectExtraCFGEdges(), findUncondBrI(), removeSuccessor(), splitBlock(), splitSuccessor(), toString(), transferSuccessorsAndUpdatePHIs(), llvm::SelectionDAGBuilder::visitBitTestCase(), and llvm::SelectionDAGBuilder::visitBitTestHeader().
|
inline |
Returns a range that iterates over the phis in the basic block.
Definition at line 244 of file MachineBasicBlock.h.
References llvm::sys::path::begin(), and llvm::make_range().
Referenced by hasUseAfterLoop(), isVRegCompatibleReg(), and replacePhiUsesWith().
|
inline |
Definition at line 247 of file MachineBasicBlock.h.
|
inline |
Definition at line 600 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::pop_back().
|
inline |
Definition at line 599 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::pop_front().
|
inline |
Definition at line 264 of file MachineBasicBlock.h.
Referenced by llvm::PPCInstrInfo::analyzeLoopForPipelining(), BBIsJumpedOver(), bothUsedInPHI(), llvm::TailDuplicator::canTailDuplicate(), llvm::GraphTraits< Inverse< MachineBasicBlock * > >::child_begin(), llvm::GraphTraits< Inverse< const MachineBasicBlock * > >::child_begin(), llvm::ConnectedVNInfoEqClasses::Classify(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::createSIModeRegisterPass(), llvm::createX86CondBrFolding(), emitBasicBlockLoopComments(), findPotentialBlockers(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::FindPredecessorBlocks(), getLayoutSuccessorProbThreshold(), getMatchingEHPad(), getRegUnits(), getSingleSchedPred(), getStartOrEndSlot(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::LiveVariables::HandleVirtRegUse(), INITIALIZE_PASS(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), isCallerPreservedOrConstPhysReg(), isDebug(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), matchPair(), llvm::PeelSingleBlockLoop(), print(), removeExternalCFGEdges(), removeOldExitPreds(), llvm::UnreachableBlockElimPass::run(), salvageDebugInfoFromEmptyBlock(), searchPredecessors(), SinkingPreventsImplicitNullCheck(), llvm::MachineFunction::verify(), verifyCTRBranch(), VerifyPHIs(), and VisitGlobalVariableForEmission().
|
inline |
Definition at line 265 of file MachineBasicBlock.h.
|
inline |
Definition at line 279 of file MachineBasicBlock.h.
Referenced by llvm::BranchFolder::BranchFolder(), llvm::rdf::DataFlowGraph::build(), llvm::TailDuplicator::canTailDuplicate(), llvm::createSIModeRegisterPass(), llvm::AsmPrinter::EmitBasicBlockStart(), eraseDeadBBsAndChildren(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), INITIALIZE_PASS(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), isExitingLoop(), llvm::TailDuplicator::isSimpleBB(), print(), salvageDebugInfoFromEmptyBlock(), and llvm::TailDuplicator::tailDuplicateAndUpdate().
|
inline |
Definition at line 266 of file MachineBasicBlock.h.
Referenced by bothUsedInPHI(), llvm::TailDuplicator::canTailDuplicate(), llvm::GraphTraits< Inverse< MachineBasicBlock * > >::child_end(), llvm::GraphTraits< Inverse< const MachineBasicBlock * > >::child_end(), llvm::ConnectedVNInfoEqClasses::Classify(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::createSIModeRegisterPass(), emitBasicBlockLoopComments(), findPotentialBlockers(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::FindPredecessorBlocks(), getMatchingEHPad(), getSingleSchedPred(), getStartOrEndSlot(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::LiveVariables::HandleVirtRegUse(), INITIALIZE_PASS(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), isDebug(), matchPair(), print(), removeExternalCFGEdges(), removeOldExitPreds(), llvm::UnreachableBlockElimPass::run(), salvageDebugInfoFromEmptyBlock(), searchPredecessors(), llvm::MachineFunction::verify(), verifyCTRBranch(), VerifyPHIs(), and VisitGlobalVariableForEmission().
|
inline |
Definition at line 267 of file MachineBasicBlock.h.
|
inline |
Definition at line 268 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().
|
inline |
Definition at line 270 of file MachineBasicBlock.h.
|
inline |
Definition at line 272 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().
|
inline |
Definition at line 274 of file MachineBasicBlock.h.
|
inline |
Definition at line 276 of file MachineBasicBlock.h.
Referenced by addSegmentsWithValNo(), AnyAliasLiveIn(), BBIsJumpedOver(), llvm::TailDuplicator::canTailDuplicate(), llvm::createX86CondBrFolding(), emitBasicBlockLoopComments(), llvm::MachineLoopInfo::findLoopPreheader(), findUncondBrI(), getLayoutSuccessorProbThreshold(), getRegUnits(), getSingleSchedPred(), llvm::LiveIntervals::hasPHIKill(), INITIALIZE_PASS(), llvm::RISCVInstrInfo::insertIndirectBranch(), llvm::SIInstrInfo::insertIndirectBranch(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), isCallerPreservedOrConstPhysReg(), isOperandKill(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::RegBankSelect::EdgeInsertPoint::isSplit(), isSplitEdge(), IsUnconditionalJump(), llvm::rdf::operator<<(), performSink(), removeExternalCFGEdges(), salvageDebugInfoFromEmptyBlock(), SinkingPreventsImplicitNullCheck(), sortBlocks(), and llvm::MachineFunction::verify().
|
inline |
Definition at line 297 of file MachineBasicBlock.h.
References llvm::make_range(), llvm::pred_begin(), and llvm::pred_end().
Referenced by addSegmentsWithValNo(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), bothUsedInPHI(), llvm::rdf::DataFlowGraph::build(), llvm::LiveRangeCalc::calculateValues(), canFallThroughTo(), createSegmentsForValues(), llvm::createSIWholeQuadModePass(), llvm::HexagonInstrInfo::findLoopInstr(), llvm::MachineLoopInfo::findLoopPreheader(), getLayoutSuccessorProbThreshold(), llvm::rdf::DataFlowGraph::getNextShadow(), getRegClassForUnfoldedLoad(), getWaitStatesSince(), greaterWithBias(), llvm::LiveIntervals::hasPHIKill(), INITIALIZE_PASS(), llvm::MachineTraceMetrics::Ensemble::invalidate(), isExitingLoop(), isFullCopyOf(), llvm::LiveRangeCalc::isJointlyDominated(), isPredecessor(), isPushPop(), IsUnconditionalJump(), mergeOperations(), llvm::rdf::operator<<(), llvm::MachineDominatorTree::print(), removeDeadSegment(), salvageDebugInfoFromEmptyBlock(), sortBlocks(), subRangeLiveAt(), and UpdateCPSRUse().
|
inline |
Definition at line 300 of file MachineBasicBlock.h.
References llvm::make_range(), llvm::pred_begin(), and llvm::pred_end().
void MachineBasicBlock::print | ( | raw_ostream & | OS, |
const SlotIndexes * | Indexes = nullptr , |
||
bool | IsStandalone = true |
||
) | const |
Definition at line 275 of file MachineBasicBlock.cpp.
References F(), llvm::MachineFunction::getFunction(), getParent(), llvm::GlobalValue::getParent(), and llvm::ModuleSlotTracker::incorporateFunction().
Referenced by dump(), llvm::operator<<(), and llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander().
void MachineBasicBlock::print | ( | raw_ostream & | OS, |
ModuleSlotTracker & | MST, | ||
const SlotIndexes * | Indexes = nullptr , |
||
bool | IsStandalone = true |
||
) | const |
Definition at line 290 of file MachineBasicBlock.cpp.
References llvm::MachineInstr::BundledSucc, E, llvm::format(), getAlignment(), getBasicBlock(), llvm::BranchProbability::getDenominator(), llvm::MachineInstr::getFlag(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::SlotIndexes::getInstructionIndex(), llvm::ModuleSlotTracker::getLocalSlot(), llvm::SlotIndexes::getMBBStartIdx(), llvm::Value::getName(), getNumber(), llvm::BranchProbability::getNumerator(), getParent(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::Optional< T >::getValue(), hasAddressTaken(), llvm::SlotIndexes::hasIndex(), llvm::Value::hasName(), I, llvm::raw_ostream::indent(), instrs(), isEHPad(), llvm::MachineInstr::isInsideBundle(), livein_empty(), liveins(), llvm::Log2(), MRI, llvm::Align::None(), pred_begin(), pred_empty(), pred_end(), llvm::MachineInstr::print(), llvm::PrintLaneMask(), llvm::printMBBReference(), llvm::printReg(), PrintSlotIndexes, succ_begin(), succ_empty(), succ_end(), TII, llvm::MachineRegisterInfo::tracksLiveness(), and TRI.
void MachineBasicBlock::printAsOperand | ( | raw_ostream & | OS, |
bool | PrintType = true |
||
) | const |
Definition at line 443 of file MachineBasicBlock.cpp.
References getNumber().
Referenced by llvm::printMBBReference().
|
inline |
Definition at line 601 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back().
Referenced by branchMaxOffsets(), llvm::ModuloScheduleExpander::cleanup(), createPHIsForCMOVsInSinkBB(), emitSelectPseudo(), llvm::ModuloScheduleExpander::expand(), findUncondBrI(), llvm::MIRParserImpl::initializeJumpTableInfo(), insertCSRRestores(), isVRegCompatibleReg(), llvm::IRTranslator::runOnMachineFunction(), and stashEntryDbgValues().
|
inline |
Definition at line 220 of file MachineBasicBlock.h.
Referenced by llvm::MipsInstrInfo::analyzeBranch(), AnyAliasLiveIn(), appendEndToFunction(), CompareMBBNumbers(), llvm::computeLiveIns(), llvm::createBreakFalseDeps(), llvm::createSIWholeQuadModePass(), llvm::createX86FixupBWInsts(), dominatesAllUsesOf(), FindLastAluClause(), findPotentialBlockers(), fixTerminators(), llvm::ScheduleDAGInstrs::fixupKills(), getLastNonPseudo(), getLiveRegsAt(), getRegUnits(), INITIALIZE_PASS(), llvm::outliner::Candidate::initLRU(), isFpMulInstruction(), llvm::AArch64InstrInfo::isMBBSafeToOutlineFrom(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), mergeOperations(), llvm::recomputeLivenessFlags(), llvm::MipsInstrInfo::removeBranch(), llvm::rdf::Liveness::resetKills(), tieOpsIfNeeded(), and verifySameBranchInstructions().
|
inline |
Definition at line 223 of file MachineBasicBlock.h.
|
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 line 688 of file MachineBasicBlock.h.
References assert(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::remove().
Referenced by allPhiOperandsUndefined(), findSingleRegDef(), isCopy(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::MachineInstr::removeFromParent(), llvm::GCNScheduleDAGMILive::schedule(), and llvm::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 line 1160 of file MachineBasicBlock.cpp.
References llvm::MachineInstr::BundledPred, llvm::MachineInstr::BundledSucc, llvm::MachineInstr::clearFlag(), llvm::iplist_impl< IntrusiveListT, TraitsT >::remove(), and unbundleSingleMI().
Referenced by llvm::MachineInstr::removeFromBundle().
MachineBasicBlock * MachineBasicBlock::removeFromParent | ( | ) |
This method unlinks 'this' from the containing function, and returns it, but does not delete it.
Definition at line 1181 of file MachineBasicBlock.cpp.
References assert(), getParent(), and llvm::MachineFunction::remove().
void MachineBasicBlock::removeLiveIn | ( | MCPhysReg | Reg, |
LaneBitmask | LaneMask = LaneBitmask::getAll() |
||
) |
Remove the specified register from the live in set.
Definition at line 448 of file MachineBasicBlock.cpp.
References llvm::find_if(), I, llvm::MachineBasicBlock::RegisterMaskPair::PhysReg, and Reg.
Referenced by emitGPDisp(), IsUnconditionalJump(), updateLiveIn(), and verifyLeafProcRegUse().
MachineBasicBlock::livein_iterator MachineBasicBlock::removeLiveIn | ( | MachineBasicBlock::livein_iterator | I | ) |
Remove entry from the livein set and return iterator to the next.
Definition at line 460 of file MachineBasicBlock.cpp.
void MachineBasicBlock::removeSuccessor | ( | MachineBasicBlock * | Succ, |
bool | NormalizeSuccProbs = false |
||
) |
Remove successor from the successors list of this MachineBasicBlock.
The Predecessors list of Succ is automatically updated. If NormalizeSuccProbs is true, then normalize successors' probabilities after the successor is removed.
Definition at line 693 of file MachineBasicBlock.cpp.
References llvm::find(), and I.
Referenced by bothUsedInPHI(), llvm::BranchFolder::BranchFolder(), llvm::TailDuplicator::canTailDuplicate(), CorrectExtraCFGEdges(), eraseDeadBBsAndChildren(), findUncondBrI(), getRetpolineSymbol(), llvm::ARMTargetLowering::ReplaceNodeResults(), replaceSuccessor(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::UnreachableBlockElimPass::run(), salvageDebugInfoFromEmptyBlock(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().
MachineBasicBlock::succ_iterator MachineBasicBlock::removeSuccessor | ( | succ_iterator | I, |
bool | NormalizeSuccProbs = false |
||
) |
Remove specified successor from the successors list of this MachineBasicBlock.
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 line 700 of file MachineBasicBlock.cpp.
References assert(), and normalizeSuccProbs().
|
inline |
Definition at line 226 of file MachineBasicBlock.h.
Referenced by llvm::MipsInstrInfo::analyzeBranch(), appendEndToFunction(), llvm::computeLiveIns(), llvm::createBreakFalseDeps(), llvm::createX86FixupBWInsts(), llvm::createX86FixupSetCC(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), findExecCopy(), FindLastAluClause(), findPotentialBlockers(), fixTerminators(), llvm::PPCInstrInfo::fixupIsDeadOrKill(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::PPCInstrInfo::getDefMIPostRA(), getLastNonPseudo(), getRegUnits(), INITIALIZE_PASS(), isCompareZero(), isFpMulInstruction(), llvm::AArch64InstrInfo::isMBBSafeToOutlineFrom(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), mergeOperations(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::recomputeLivenessFlags(), llvm::MipsInstrInfo::removeBranch(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::rdf::Liveness::resetKills(), swapMIOperands(), tieOpsIfNeeded(), and verifySameBranchInstructions().
|
inline |
Definition at line 227 of file MachineBasicBlock.h.
void MachineBasicBlock::replacePhiUsesWith | ( | MachineBasicBlock * | Old, |
MachineBasicBlock * | New | ||
) |
Update all phi nodes in this basic block to refer to basic block New
instead of basic block Old
.
Definition at line 1216 of file MachineBasicBlock.cpp.
References llvm::numbers::e, llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), phis(), and llvm::MachineOperand::setMBB().
Referenced by transferSuccessorsAndUpdatePHIs().
void MachineBasicBlock::replaceSuccessor | ( | MachineBasicBlock * | Old, |
MachineBasicBlock * | New | ||
) |
Replace successor OLD with NEW and update probability info.
Definition at line 716 of file MachineBasicBlock.cpp.
References assert(), E, I, removeSuccessor(), succ_begin(), and succ_end().
Referenced by bothUsedInPHI(), llvm::ModuloScheduleExpander::cleanup(), llvm::ModuloScheduleExpander::expand(), IsUnconditionalJump(), llvm::PeelSingleBlockLoop(), ReplaceUsesOfBlockWith(), and splitBlock().
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 line 1195 of file MachineBasicBlock.cpp.
References assert(), llvm::numbers::e, I, instr_begin(), instr_end(), and replaceSuccessor().
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), salvageDebugInfoFromEmptyBlock(), and SplitCriticalEdge().
|
inline |
Set alignment of the basic block.
Definition at line 379 of file MachineBasicBlock.h.
References A.
Referenced by branchMaxOffsets(), llvm::createX86RetpolineThunksPass(), and getUnconditionalBrDisp().
|
inline |
Set this block to reflect that it potentially is the target of an indirect branch.
Definition at line 163 of file MachineBasicBlock.h.
Referenced by llvm::createX86RetpolineThunksPass(), getRetpolineSymbol(), llvm::IRTranslator::runOnMachineFunction(), llvm::FunctionLoweringInfo::set(), and llvm::X86FrameLowering::spillCalleeSavedRegisters().
|
inline |
Definition at line 810 of file MachineBasicBlock.h.
Indicates if this is the entry block of a cleanup funclet.
Definition at line 409 of file MachineBasicBlock.h.
References llvm::BranchProbability::getUnknown().
Indicates if this is the entry block of an EH funclet.
Definition at line 403 of file MachineBasicBlock.h.
Referenced by llvm::SelectionDAGBuilder::getValueImpl().
Indicates the block is a landing pad.
That is this basic block is entered via an exception handler.
Definition at line 387 of file MachineBasicBlock.h.
Referenced by getOffsetFromIndices(), getRetpolineSymbol(), llvm::ARMTargetLowering::ReplaceNodeResults(), and llvm::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 line 397 of file MachineBasicBlock.h.
Referenced by llvm::SelectionDAGBuilder::getValueImpl().
|
inline |
Set this block to reflect that, regardless how we flow to it, we need its label be emitted.
Definition at line 170 of file MachineBasicBlock.h.
|
inline |
Definition at line 801 of file MachineBasicBlock.h.
References N.
void MachineBasicBlock::setSuccProbability | ( | succ_iterator | I, |
BranchProbability | Prob | ||
) |
Set successor probability of a given iterator.
Definition at line 1351 of file MachineBasicBlock.cpp.
References assert(), I, and llvm::BranchProbability::isUnknown().
Referenced by setBranchProb(), and splitMBB().
|
inline |
Definition at line 187 of file MachineBasicBlock.h.
Referenced by llvm::AggressiveAntiDepState::AggressiveAntiDepState(), llvm::TailDuplicator::canTailDuplicate(), llvm::createX86PadShortFunctions(), INITIALIZE_PASS(), insertDeleteInstructions(), isDebug(), IsUnconditionalJump(), llvm::MachinePipeliner::runOnMachineFunction(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), and llvm::TailDuplicator::tailDuplicateAndUpdate().
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 line 170 of file MachineBasicBlock.cpp.
References assert(), E, end(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), I, llvm::TargetInstrInfo::isBasicBlockPrologue(), and TII.
Referenced by addLiveIn(), copyDebugInfoToSuccessor(), llvm::findPHICopyInsertPoint(), and llvm::Localizer::getAnalysisUsage().
MachineBasicBlock::iterator MachineBasicBlock::SkipPHIsLabelsAndDebug | ( | MachineBasicBlock::iterator | I | ) |
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.
Definition at line 185 of file MachineBasicBlock.cpp.
References assert(), E, end(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), I, llvm::TargetInstrInfo::isBasicBlockPrologue(), and TII.
Referenced by llvm::InsertPointAnalysis::getFirstInsertPoint(), hasVulnerableLoad(), and isFullCopyOf().
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 line 472 of file MachineBasicBlock.cpp.
References I, llvm::MachineBasicBlock::RegisterMaskPair::PhysReg, and llvm::sort().
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks().
|
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 line 708 of file MachineBasicBlock.h.
Referenced by adaptForLdStOpt(), llvm::analyzeArguments(), llvm::TailDuplicator::canTailDuplicate(), CompareMBBNumbers(), computeBranchTargetAndInversion(), ComputeCommonTailLength(), llvm::createLanaiDelaySlotFillerPass(), createPHIsForCMOVsInSinkBB(), createPHIsForSelects(), llvm::createSparcDelaySlotFillerPass(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), emitReadCycleWidePseudo(), emitSelectPseudo(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), getHalfSizedType(), getNewValueJumpOpcode(), getRetpolineSymbol(), llvm::MipsTargetLowering::HandleByVal(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), InstructionStoresToFI(), isCopyFeedingInvariantStore(), isInRage(), IsSafeAndProfitableToMove(), loadSRsrcFromVGPR(), LowerFPToInt(), llvm::WebAssemblyDebugValueManager::move(), moveAndTeeForMultiUse(), moveForSingleUse(), moveInstrOut(), packCmovGroup(), performSink(), rescheduleLexographically(), salvageDebugInfoFromEmptyBlock(), split(), splitBlock(), splitBlockAfter(), splitBlockBefore(), splitBlockForLoop(), llvm::SITargetLowering::splitKillBlock(), and splitMBB().
|
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 line 719 of file MachineBasicBlock.h.
References llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::splice().
MachineBasicBlock * MachineBasicBlock::SplitCriticalEdge | ( | MachineBasicBlock * | Succ, |
Pass & | P | ||
) |
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 updates LiveVariables, MachineDominatorTree, and MachineLoopInfo, as applicable.
Definition at line 874 of file MachineBasicBlock.cpp.
References addSuccessor(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), canSplitCriticalEdge(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::dbgs(), E, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::Pass::getAnalysisIfAvailable(), getFirstInstrTerminator(), getParent(), llvm::LiveVariables::getVarInfo(), I, llvm::MachineFunction::insert(), llvm::LiveIntervals::insertMBBInMaps(), instr_end(), llvm::is_contained(), isLayoutSuccessor(), llvm::Register::isPhysicalRegister(), LLVM_DEBUG, llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::printMBBReference(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), Reg, llvm::LiveVariables::VarInfo::removeKill(), ReplaceUsesOfBlockWith(), and updateTerminator().
Referenced by allPhiOperandsUndefined(), llvm::RegBankSelect::MBBInsertPoint::frequency(), INITIALIZE_PASS(), and isCopyFeedingInvariantStore().
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 line 674 of file MachineBasicBlock.cpp.
References addSuccessor(), assert(), llvm::find(), llvm::BranchProbability::getUnknown(), normalizeSuccProbs(), succ_end(), and successors().
|
inline |
Definition at line 280 of file MachineBasicBlock.h.
Referenced by addLiveInRegs(), allPhiOperandsUndefined(), BBHasFallthrough(), BBIsJumpedOver(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_begin(), blockEndIsUnreachable(), bothUsedInPHI(), llvm::TailDuplicator::canTailDuplicate(), checkAndUpdateCPSRKill(), checkAndUpdateEFLAGSKill(), checkCCKill(), checkEFLAGSLive(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_begin(), llvm::GraphTraits< MachineBasicBlock * >::child_begin(), llvm::GraphTraits< const MachineBasicBlock * >::child_begin(), CorrectExtraCFGEdges(), llvm::createSIModeRegisterPass(), llvm::createX86PadShortFunctions(), eraseDeadBBsAndChildren(), findTemporariesForLR(), fixMBBTerminator(), getFallThroughMBB(), llvm::MachineBranchProbabilityInfo::getHotSucc(), getLayoutSuccessorProbThreshold(), getNewValueJumpOpcode(), getOrExecSource(), greaterWithBias(), llvm::guessSuccessors(), hasEHPadSuccessor(), hasOneExitNode(), INITIALIZE_PASS(), isCCLiveOut(), isSimpleIf(), IsUnconditionalJump(), matchPair(), mbbHasBackEdge(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), OtherSucc(), llvm::PeelSingleBlockLoop(), llvm::MIPrinter::print(), print(), removeExternalCFGEdges(), removeExternalCFGSuccessors(), replaceSuccessor(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::UnreachableBlockElimPass::run(), llvm::IRTranslator::runOnMachineFunction(), salvageDebugInfoFromEmptyBlock(), llvm::GCNScheduleDAGMILive::schedule(), setBranchProb(), splitBlock(), splitMBB(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), llvm::TailDuplicator::tailDuplicateAndUpdate(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), and llvm::MachineFunction::verify().
|
inline |
Definition at line 281 of file MachineBasicBlock.h.
|
inline |
Definition at line 295 of file MachineBasicBlock.h.
Referenced by blockEndsInUnreachable(), llvm::BranchFolder::BranchFolder(), llvm::TailDuplicator::canTailDuplicate(), llvm::X86FrameLowering::canUseAsEpilogue(), llvm::ScheduleDAGSDNodes::computeOperandLatency(), FindIDom(), getEndClobberMask(), getNextBlock(), llvm::AArch64InstrInfo::getOutliningType(), llvm::X86InstrInfo::getOutliningType(), INITIALIZE_PASS(), llvm::SIInstrInfo::insertReturn(), isEFLAGSLive(), isNopCopy(), isNoReturnDef(), llvm::SystemZInstrInfo::isProfitableToIfCvt(), mergeOperations(), optimizeVcndVcmpPair(), llvm::MIPrinter::print(), print(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), salvageDebugInfoFromEmptyBlock(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), and updateTerminator().
|
inline |
Definition at line 282 of file MachineBasicBlock.h.
Referenced by addLiveInRegs(), allPhiOperandsUndefined(), BBHasFallthrough(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_end(), blockEndIsUnreachable(), bothUsedInPHI(), llvm::BranchFolder::BranchFolder(), llvm::TailDuplicator::canTailDuplicate(), checkAndUpdateCPSRKill(), checkAndUpdateEFLAGSKill(), checkCCKill(), checkEFLAGSLive(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_end(), llvm::GraphTraits< MachineBasicBlock * >::child_end(), llvm::GraphTraits< const MachineBasicBlock * >::child_end(), CorrectExtraCFGEdges(), llvm::createSIModeRegisterPass(), llvm::createX86PadShortFunctions(), eraseDeadBBsAndChildren(), getFallThroughMBB(), llvm::MachineBranchProbabilityInfo::getHotSucc(), getNewValueJumpOpcode(), greaterWithBias(), llvm::guessSuccessors(), hasEHPadSuccessor(), hasOneExitNode(), INITIALIZE_PASS(), isCCLiveOut(), isSimpleIf(), matchPair(), mbbHasBackEdge(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), OtherSucc(), llvm::MIPrinter::print(), print(), removeExternalCFGEdges(), removeExternalCFGSuccessors(), replaceSuccessor(), llvm::UnreachableBlockElimPass::run(), setBranchProb(), splitBlock(), splitMBB(), splitSuccessor(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), llvm::TailDuplicator::tailDuplicateAndUpdate(), and llvm::MachineFunction::verify().
|
inline |
Definition at line 283 of file MachineBasicBlock.h.
|
inline |
Definition at line 284 of file MachineBasicBlock.h.
Referenced by getLayoutSuccessorProbThreshold(), and getRetpolineSymbol().
|
inline |
Definition at line 286 of file MachineBasicBlock.h.
|
inline |
Definition at line 288 of file MachineBasicBlock.h.
Referenced by getRetpolineSymbol().
|
inline |
Definition at line 290 of file MachineBasicBlock.h.
|
inline |
Definition at line 292 of file MachineBasicBlock.h.
Referenced by addSegmentsWithValNo(), allPhiOperandsUndefined(), BBIsJumpedOver(), bothUsedInPHI(), llvm::TailDuplicator::canTailDuplicate(), createBBSelectReg(), createPHIsForCMOVsInSinkBB(), findBranchDebugLoc(), findTemporariesForLR(), findUncondBrI(), fixMBBTerminator(), llvm::HexagonInstrInfo::getDotNewPredJumpOp(), getLayoutSuccessorProbThreshold(), getLSMultipleTransferSize(), llvm::RegionTraits< MachineFunction >::getNumSuccessors(), getOrExecSource(), greaterWithBias(), llvm::guessSuccessors(), hasSameSuccessors(), INITIALIZE_PASS(), llvm::TailDuplicator::isSimpleBB(), llvm::RegBankSelect::EdgeInsertPoint::isSplit(), isSplitEdge(), IsUnconditionalJump(), llvm::rdf::operator<<(), optimizeVcndVcmpPair(), ProfitableToMerge(), removeExternalCFGEdges(), salvageDebugInfoFromEmptyBlock(), llvm::GCNScheduleDAGMILive::schedule(), and llvm::MachineFunction::verify().
|
inline |
Definition at line 303 of file MachineBasicBlock.h.
References llvm::make_range(), llvm::succ_begin(), and llvm::succ_end().
Referenced by llvm::LiveRegUnits::addLiveOuts(), llvm::LivePhysRegs::addLiveOutsNoPristines(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), allPhiOperandsUndefined(), areCFlagsAliveInSuccessors(), bothUsedInPHI(), callHasRegMask(), callWaitsOnFunctionReturn(), llvm::TailDuplicator::canTailDuplicate(), collectEHScopeMembers(), computeRegisterLiveness(), llvm::createAArch64ConditionOptimizerPass(), llvm::createSIWholeQuadModePass(), enableAllocFrameElim(), findFalseBlock(), FindIDom(), llvm::MachineLoopInfo::findLoopPreheader(), flagsNeedToBePreservedBeforeTheTerminators(), llvm::WebAssemblyExceptionInfo::getAnalysisUsage(), getBlockName(), llvm::HexagonInstrInfo::getDotNewPredJumpOp(), llvm::MachineBranchProbabilityInfo::getEdgeProbability(), getLayoutSuccessorProbThreshold(), llvm::rdf::DataFlowGraph::getNextShadow(), getRegClassForUnfoldedLoad(), getRegUnits(), getSingleLiveInSuccBB(), giveUpWithRemarks(), greaterWithBias(), handleNormalInst(), hasSameSuccessors(), hasVulnerableLoad(), llvm::InsertPointAnalysis::InsertPointAnalysis(), llvm::MachineTraceMetrics::Ensemble::invalidate(), isExitingLoop(), isInRage(), isLiveOut(), llvm::LiveVariables::isLiveOut(), llvm::HexagonInstrInfo::isSchedulingBoundary(), isSuccessor(), loadSRsrcFromVGPR(), llvm::rdf::operator<<(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::LiveIntervals::pruneValue(), llvm::rdf::Liveness::resetKills(), salvageDebugInfoFromEmptyBlock(), sortBlocks(), splitBlock(), splitMBB(), splitSuccessor(), and unstackifyVRegsUsedInSplitBB().
|
inline |
Definition at line 306 of file MachineBasicBlock.h.
References llvm::make_range(), llvm::succ_begin(), and llvm::succ_end().
|
inline |
Definition at line 236 of file MachineBasicBlock.h.
References llvm::sys::path::end(), and llvm::make_range().
Referenced by explicitlyBranchesTo(), FindIDom(), fixMBBTerminator(), flagsNeedToBePreservedBeforeTheTerminators(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), isSimpleIf(), maybeUpdateTerminator(), and optimizeVcndVcmpPair().
|
inline |
Definition at line 239 of file MachineBasicBlock.h.
References llvm::sys::path::end(), and llvm::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 line 774 of file MachineBasicBlock.cpp.
References addSuccessor(), addSuccessorWithoutProb(), removeSuccessor(), succ_begin(), and succ_empty().
Referenced by llvm::TailDuplicator::canTailDuplicate(), llvm::ModuloScheduleExpander::cleanup(), CompareMBBNumbers(), ComputeCommonTailLength(), llvm::ModuloScheduleExpander::expand(), INITIALIZE_PASS(), salvageDebugInfoFromEmptyBlock(), and splitMBB().
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 line 794 of file MachineBasicBlock.cpp.
References addSuccessor(), addSuccessorWithoutProb(), normalizeSuccProbs(), removeSuccessor(), replacePhiUsesWith(), succ_begin(), and succ_empty().
Referenced by llvm::analyzeArguments(), createPHIsForCMOVsInSinkBB(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), emitReadCycleWidePseudo(), emitSelectPseudo(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), getHalfSizedType(), getRetpolineSymbol(), llvm::MipsTargetLowering::HandleByVal(), llvm::X86FrameLowering::inlineStackProbe(), loadSRsrcFromVGPR(), LowerFPToInt(), packCmovGroup(), split(), splitBlockAfter(), splitBlockBefore(), splitBlockForLoop(), and llvm::SITargetLowering::splitKillBlock().
void MachineBasicBlock::updateTerminator | ( | ) |
Update the terminator instructions in block to account for changes to the layout.
If the block previously used a fallthrough, it may now need a branch, and if it previously used branching it may now be able to use a fallthrough.
Definition at line 532 of file MachineBasicBlock.cpp.
References llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), succ_empty(), and TII.
Referenced by getAdjustedCmp(), maybeUpdateTerminator(), and SplitCriticalEdge().
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 line 641 of file MachineBasicBlock.cpp.
References llvm::abs(), assert(), and llvm::BranchProbability::getDenominator().
|
friend |
Definition at line 829 of file MachineBasicBlock.h.
|
friend |
Definition at line 820 of file MachineBasicBlock.h.
|
friend |
Definition at line 144 of file MachineBasicBlock.h.
|
friend |
Definition at line 821 of file MachineBasicBlock.h.