LLVM  6.0.0svn
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MachineBasicBlock Class Reference

#include "llvm/CodeGen/MachineBasicBlock.h"

Inheritance diagram for llvm::MachineBasicBlock:
Inheritance graph
[legend]
Collaboration diagram for llvm::MachineBasicBlock:
Collaboration graph
[legend]

Classes

struct  RegisterMaskPair
 Pair of physical register and lane mask. More...
 

Public Types

enum  LivenessQueryResult { LQR_Live, LQR_Dead, LQR_Unknown }
 Possible outcome of a register liveness query to computeRegisterLiveness() More...
 
using instr_iterator = Instructions::iterator
 
using const_instr_iterator = Instructions::const_iterator
 
using reverse_instr_iterator = Instructions::reverse_iterator
 
using const_reverse_instr_iterator = Instructions::const_reverse_iterator
 
using iterator = MachineInstrBundleIterator< MachineInstr >
 
using const_iterator = MachineInstrBundleIterator< const MachineInstr >
 
using reverse_iterator = MachineInstrBundleIterator< MachineInstr, true >
 
using const_reverse_iterator = MachineInstrBundleIterator< const MachineInstr, true >
 
using instr_range = iterator_range< instr_iterator >
 
using const_instr_range = iterator_range< const_instr_iterator >
 
using pred_iterator = std::vector< MachineBasicBlock * >::iterator
 
using const_pred_iterator = std::vector< MachineBasicBlock * >::const_iterator
 
using succ_iterator = std::vector< MachineBasicBlock * >::iterator
 
using const_succ_iterator = std::vector< MachineBasicBlock * >::const_iterator
 
using pred_reverse_iterator = std::vector< MachineBasicBlock * >::reverse_iterator
 
using const_pred_reverse_iterator = std::vector< MachineBasicBlock * >::const_reverse_iterator
 
using succ_reverse_iterator = std::vector< MachineBasicBlock * >::reverse_iterator
 
using const_succ_reverse_iterator = std::vector< MachineBasicBlock * >::const_reverse_iterator
 
using livein_iterator = LiveInVector::const_iterator
 

Public Member Functions

const BasicBlockgetBasicBlock () 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...
 
const MachineFunctiongetParent () const
 Return the MachineFunction containing this basic block. More...
 
MachineFunctiongetParent ()
 
unsigned size () const
 
bool empty () const
 
MachineInstrinstr_front ()
 
MachineInstrinstr_back ()
 
const MachineInstrinstr_front () const
 
const MachineInstrinstr_back () const
 
MachineInstrfront ()
 
MachineInstrback ()
 
const MachineInstrfront () const
 
const MachineInstrback () 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< iteratorterminators ()
 
iterator_range< const_iteratorterminators () 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_iteratorpredecessors ()
 
iterator_range< const_pred_iteratorpredecessors () const
 
iterator_range< succ_iteratorsuccessors ()
 
iterator_range< const_succ_iteratorsuccessors () const
 
void addLiveIn (MCPhysReg 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 (MCPhysReg 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_iteratorliveins_dbg () const
 
livein_iterator livein_begin () const
 
livein_iterator livein_end () const
 
bool livein_empty () const
 
iterator_range< livein_iteratorliveins () const
 
livein_iterator removeLiveIn (livein_iterator I)
 Remove entry from the livein set and return iterator to the next. More...
 
const uint32_tgetBeginClobberMask (const TargetRegisterInfo *TRI) const
 Get the clobber mask for the start of this basic block. More...
 
const uint32_tgetEndClobberMask (const TargetRegisterInfo *TRI) const
 Get the clobber mask for the end of the basic block. More...
 
unsigned getAlignment () const
 Return alignment of the basic block. More...
 
void setAlignment (unsigned Align)
 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 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 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...
 
MachineBasicBlockgetFallThrough ()
 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...
 
MachineBasicBlockSplitCriticalEdge (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 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...
 
MachineInstrremove (MachineInstr *I)
 Remove the unbundled instruction from the instruction list without deleting it. More...
 
MachineInstrremove_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...
 
MachineBasicBlockremoveFromParent ()
 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...
 
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 instructions. More...
 
DebugLoc findDebugLoc (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 <def>ined and not <kill>ed as of just before Before. More...
 
void dump () const
 
void print (raw_ostream &OS, const SlotIndexes *=nullptr) const
 
void print (raw_ostream &OS, ModuleSlotTracker &MST, const SlotIndexes *=nullptr) 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)
 
MCSymbolgetSymbol () const
 Return the MCSymbol for this basic block. More...
 
- Public Member Functions inherited from llvm::ilist_node_with_parent< MachineBasicBlock, MachineFunction >
MachineBasicBlockgetPrevNode ()
 
const MachineBasicBlockgetPrevNode () const
 Get the previous node, or nullptr for the list head. More...
 
MachineBasicBlockgetNextNode ()
 Get the next node, or nullptr for the list tail. More...
 
const MachineBasicBlockgetNextNode () const
 Get the next node, or nullptr for the list tail. More...
 
- Public Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type >
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 >
 

Additional Inherited Members

- Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type >
using self_iterator = ilist_iterator< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type, false, false >
 
using const_self_iterator = ilist_iterator< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type, false, true >
 
using reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type, true, false >
 
using const_reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type, true, true >
 
- Protected Member Functions inherited from llvm::ilist_node_with_parent< MachineBasicBlock, MachineFunction >
 ilist_node_with_parent ()=default
 
- Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type >
 ilist_node_impl ()=default
 

Detailed Description

Definition at line 65 of file MachineBasicBlock.h.

Member Typedef Documentation

◆ const_instr_iterator

Definition at line 159 of file MachineBasicBlock.h.

◆ const_instr_range

Definition at line 192 of file MachineBasicBlock.h.

◆ const_iterator

Definition at line 164 of file MachineBasicBlock.h.

◆ const_pred_iterator

Definition at line 227 of file MachineBasicBlock.h.

◆ const_pred_reverse_iterator

Definition at line 233 of file MachineBasicBlock.h.

◆ const_reverse_instr_iterator

Definition at line 161 of file MachineBasicBlock.h.

◆ const_reverse_iterator

Definition at line 167 of file MachineBasicBlock.h.

◆ const_succ_iterator

Definition at line 229 of file MachineBasicBlock.h.

◆ const_succ_reverse_iterator

Definition at line 237 of file MachineBasicBlock.h.

◆ instr_iterator

Definition at line 158 of file MachineBasicBlock.h.

◆ instr_range

Definition at line 191 of file MachineBasicBlock.h.

◆ iterator

Definition at line 163 of file MachineBasicBlock.h.

◆ livein_iterator

using llvm::MachineBasicBlock::livein_iterator = LiveInVector::const_iterator

Definition at line 320 of file MachineBasicBlock.h.

◆ pred_iterator

Definition at line 226 of file MachineBasicBlock.h.

◆ pred_reverse_iterator

Definition at line 231 of file MachineBasicBlock.h.

◆ reverse_instr_iterator

Definition at line 160 of file MachineBasicBlock.h.

◆ reverse_iterator

Definition at line 165 of file MachineBasicBlock.h.

◆ succ_iterator

Definition at line 228 of file MachineBasicBlock.h.

◆ succ_reverse_iterator

Definition at line 235 of file MachineBasicBlock.h.

Member Enumeration Documentation

◆ LivenessQueryResult

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 696 of file MachineBasicBlock.h.

Member Function Documentation

◆ addLiveIn() [1/3]

void llvm::MachineBasicBlock::addLiveIn ( MCPhysReg  PhysReg,
LaneBitmask  LaneMask = LaneBitmask::getAll() 
)
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 289 of file MachineBasicBlock.h.

Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), addLiveIn(), addLiveInRegs(), llvm::addLiveIns(), addSavedGPR(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::SIInstrInfo::calculateLDSSpillAddress(), createPHIsForCMOVsInSinkBB(), llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), emitAlignedDPRCS2Spills(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::MachineRegisterInfo::EmitLiveInCopies(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::HexagonFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), findHoistingInsertPosAndDeps(), forceReg(), getAllSGPRs(), llvm::ARMTargetLowering::getExceptionSelectorRegister(), llvm::HexagonFrameLowering::getFrameIndexReference(), hasExceptionPointerOrCodeUser(), INITIALIZE_PASS(), llvm::SITargetLowering::insertCopiesSplitCSR(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), llvm::X86TargetLowering::isIntDivCheap(), IsUnconditionalJump(), llvm::AMDGPUCallLowering::lowerFormalArguments(), llvm::X86CallLowering::lowerReturn(), llvm::ARMCallLowering::lowerReturn(), packCmovGroup(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), SplitCriticalEdge(), toString(), and verifyLeafProcRegUse().

◆ addLiveIn() [2/3]

void llvm::MachineBasicBlock::addLiveIn ( const RegisterMaskPair RegMaskPair)
inline

Definition at line 293 of file MachineBasicBlock.h.

References addLiveIn(), and llvm::LaneBitmask::getAll().

◆ addLiveIn() [3/3]

unsigned MachineBasicBlock::addLiveIn ( MCPhysReg  PhysReg,
const TargetRegisterClass RC 
)

◆ addSuccessor()

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 555 of file MachineBasicBlock.cpp.

Referenced by addExclusiveRegPair(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::analyzeArguments(), llvm::TailDuplicator::canTailDuplicate(), CompareMBBNumbers(), ComputeCommonTailLength(), createPHIsForCMOVsInSinkBB(), llvm::createWebAssemblyFixIrreducibleControlFlow(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitClzero(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), 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(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitBranch(), llvm::FastISel::finishCondBranch(), forceReg(), llvm::IRTranslator::getAnalysisUsage(), getNonDebugInstr(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::MipsTargetLowering::HandleByVal(), hasDataDependence(), hasOneExitNode(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), isFunctionEntryBlock(), isImmValidForOpcode(), loadM0FromVGPR(), lowerVECTOR_SHUFFLE_VSHF(), makeImplicit(), opcodeEmitsNoInsts(), packCmovGroup(), PlaceLoopMarker(), registerDefinedBetween(), removeExternalCFGEdges(), removePhis(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::SelectionDAGBuilder::ShouldEmitAsBranches(), split(), SplitCriticalEdge(), llvm::SITargetLowering::splitKillBlock(), toString(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), trySequenceOfOnes(), and tryToElideArgumentCopy().

◆ addSuccessorWithoutProb()

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 565 of file MachineBasicBlock.cpp.

Referenced by llvm::FastISel::fastEmitBranch(), llvm::FastISel::finishCondBranch(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().

◆ back() [1/2]

MachineInstr& llvm::MachineBasicBlock::back ( )
inline

◆ back() [2/2]

const MachineInstr& llvm::MachineBasicBlock::back ( ) const
inline

Definition at line 180 of file MachineBasicBlock.h.

References llvm::sys::path::end().

◆ begin() [1/2]

iterator llvm::MachineBasicBlock::begin ( )
inline

Definition at line 198 of file MachineBasicBlock.h.

Referenced by addExclusiveRegPair(), addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::analyzeArguments(), llvm::BPFInstrInfo::analyzeBranch(), llvm::XCoreInstrInfo::analyzeBranch(), llvm::ARCInstrInfo::analyzeBranch(), llvm::NVPTXInstrInfo::analyzeBranch(), llvm::SparcInstrInfo::analyzeBranch(), llvm::MSP430InstrInfo::analyzeBranch(), llvm::LanaiInstrInfo::analyzeBranch(), llvm::AVRInstrInfo::analyzeBranch(), llvm::ARMBaseInstrInfo::analyzeBranch(), llvm::R600InstrInfo::analyzeBranch(), llvm::PPCInstrInfo::analyzeBranch(), llvm::SystemZInstrInfo::analyzeBranch(), llvm::AArch64InstrInfo::analyzeBranch(), areCandidatesToMergeOrPair(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), AssignProtectedObjSet(), llvm::RegScavenger::backward(), BBHasFallthrough(), llvm::MachineInstrSpan::begin(), bothUsedInPHI(), canMoveInstsAcrossMemOp(), llvm::TailDuplicator::canTailDuplicate(), combineRestoreSETHIi(), ComputeCommonTailLength(), computeRegisterLiveness(), ContainsReg(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), CountTerminators(), llvm::createAArch64ConditionOptimizerPass(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::createHexagonHardwareLoops(), createPHIsForCMOVsInSinkBB(), llvm::createR600ExpandSpecialInstrsPass(), llvm::createSILowerI1CopiesPass(), llvm::createSIWholeQuadModePass(), llvm::createSparcDelaySlotFillerPass(), llvm::createSystemZLDCleanupPass(), llvm::createX86GlobalBaseRegPass(), llvm::createXCoreFrameToArgsOffsetEliminationPass(), llvm::MachineDominatorTree::dominates(), llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitClzero(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), 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::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::MachineRegisterInfo::EmitLiveInCopies(), emitLoadM0FromVGPRLoop(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), llvm::AVRFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::SIFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::ARCFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::HexagonFrameLowering::emitPrologue(), llvm::LanaiFrameLowering::emitPrologue(), llvm::WebAssemblyFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::RegScavenger::enterBasicBlockEnd(), eraseGPOpnd(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitZExtFromI1(), findFirstPredicateSetterFrom(), findHoistingInsertPosAndDeps(), findIncDecBefore(), findInsertLocation(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), findSurvivorBackwards(), llvm::RegScavenger::forward(), llvm::HexagonInstrInfo::genAllInsnTimingClasses(), getAllSGPRs(), getBranchDebugLoc(), getEquivalentCallShort(), llvm::ARMTargetLowering::getExceptionSelectorRegister(), getFallThroughMBB(), getFirstEpilogueInst(), getFirstNonDebugInstr(), getFirstTerminator(), getFPReg(), llvm::HexagonFrameLowering::getFrameIndexReference(), llvm::SparcInstrInfo::getGlobalBaseReg(), llvm::ARMHazardRecognizer::getHazardType(), llvm::SlotIndexes::getIndexBefore(), getLayoutSuccessorProbThreshold(), getNewValueJumpOpcode(), getNextMachineInstr(), getNonDebugInstr(), getOrExecSource(), getReassignedChan(), getSchedRegions(), llvm::X86InstrInfo::getSerializableDirectMachineOperandTargetFlags(), getSingleSchedPred(), getUnconditionalBrDisp(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::MipsTargetLowering::HandleByVal(), HasArgumentDef(), hasOneExitNode(), hasTrivialSuccessor(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::SITargetLowering::insertCopiesSplitCSR(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), insertCopy(), insertCSRRestores(), insertCSRSaves(), insertDeleteInstructions(), InsertLDR_STR(), llvm::InsertPointAnalysis::InsertPointAnalysis(), InstructionStoresToFI(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), isCompareZero(), isCopy(), isDebug(), isFullCopyOf(), llvm::X86TargetLowering::isIntDivCheap(), llvm::R600InstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), IsSafeAndProfitableToMove(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), isSimpleIf(), isSourceDefinedByImplicitDef(), isTerminalReg(), IsUnconditionalJump(), isVirtualRegisterOperand(), llvm::SplitEditor::leaveIntvAtTop(), llvm::FastISel::leaveLocalValueArea(), loadM0FromVGPR(), LookForIdenticalPHI(), llvm::X86CallLowering::lowerFormalArguments(), llvm::AArch64CallLowering::lowerFormalArguments(), lowerVECTOR_SHUFFLE_VSHF(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MaySpeculate(), MBBDefinesCTR(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), mergeOperations(), llvm::X86FrameLowering::mergeSPUpdates(), opcodeEmitsNoInsts(), false::IntervalSorter::operator()(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::SplitEditor::overlapIntv(), packCmovGroup(), parseCond(), PlaceBlockMarker(), PlaceLoopMarker(), preassignSwiftErrorRegs(), PrevCrossBBInst(), printExtendedName(), llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), ProcessSourceNode(), ProfitableToMerge(), pushDepHeight(), readsVCCZ(), regOverlapsSet(), llvm::BPFInstrInfo::removeBranch(), llvm::XCoreInstrInfo::removeBranch(), llvm::ARCInstrInfo::removeBranch(), llvm::NVPTXInstrInfo::removeBranch(), llvm::SparcInstrInfo::removeBranch(), llvm::MSP430InstrInfo::removeBranch(), llvm::LanaiInstrInfo::removeBranch(), llvm::HexagonInstrInfo::removeBranch(), llvm::AVRInstrInfo::removeBranch(), llvm::ARMBaseInstrInfo::removeBranch(), llvm::R600InstrInfo::removeBranch(), llvm::PPCInstrInfo::removeBranch(), llvm::SystemZInstrInfo::removeBranch(), llvm::AArch64InstrInfo::removeBranch(), llvm::X86InstrInfo::removeBranch(), removeExternalCFGEdges(), RemoveVRSaveCode(), llvm::SlotIndexes::repairIndexesInRange(), 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(), llvm::BitTracker::run(), llvm::InsertNOPLoad::runOnMachineFunction(), llvm::DetectRoundChange::runOnMachineFunction(), llvm::Localizer::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::FixAllFDIVSQRT::runOnMachineFunction(), llvm::AVRDynAllocaSR::runOnMachineFunction(), scavengeFrameVirtualRegsInBlock(), llvm::GCNScheduleDAGMILive::schedule(), shrinkScalarCompare(), SinkingPreventsImplicitNullCheck(), splitBlockAfter(), splitBlockBefore(), llvm::SITargetLowering::splitKillBlock(), trySequenceOfOnes(), tryToElideArgumentCopy(), llvm::RegScavenger::unprocess(), llvm::LiveIntervals::HMEditor::updateAllRanges(), UpdatePredRedefs(), verifyCTRBranch(), and VerifyPHIs().

◆ begin() [2/2]

const_iterator llvm::MachineBasicBlock::begin ( ) const
inline

Definition at line 199 of file MachineBasicBlock.h.

◆ canFallThrough()

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 748 of file MachineBasicBlock.cpp.

References getFallThrough().

Referenced by llvm::TailDuplicator::canTailDuplicate(), getBranchDebugLoc(), getLayoutSuccessorProbThreshold(), IsUnconditionalJump(), ProfitableToMerge(), llvm::TailDuplicator::shouldTailDuplicate(), and updateTerminator().

◆ canSplitCriticalEdge()

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 occured in the meantime.

Definition at line 989 of file MachineBasicBlock.cpp.

References llvm::TargetInstrInfo::analyzeBranch(), llvm::dbgs(), DEBUG, llvm::TargetSubtargetInfo::getInstrInfo(), getNumber(), getParent(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), isEHPad(), llvm::TargetMachine::requiresStructuredCFG(), and TII.

Referenced by SplitCriticalEdge().

◆ clear()

void llvm::MachineBasicBlock::clear ( )
inline

◆ clearLiveIns()

void MachineBasicBlock::clearLiveIns ( )

Clear live in list.

Definition at line 1336 of file MachineBasicBlock.cpp.

◆ computeRegisterLiveness()

MachineBasicBlock::LivenessQueryResult MachineBasicBlock::computeRegisterLiveness ( const TargetRegisterInfo TRI,
unsigned  Reg,
const_iterator  Before,
unsigned  Neighborhood = 10 
) const

Return whether (physical) register Reg has been <def>ined and not <kill>ed 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 1249 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, isLiveIn(), llvm::MCRegAliasIterator::isValid(), llvm::MachineOperandIteratorBase::PhysRegInfo::Killed, LQR_Dead, LQR_Live, LQR_Unknown, N, llvm::MachineOperandIteratorBase::PhysRegInfo::PartialDeadDef, and llvm::MachineOperandIteratorBase::PhysRegInfo::Read.

Referenced by ContainsReg(), llvm::Thumb1InstrInfo::copyPhysReg(), llvm::X86InstrInfo::copyPhysReg(), getImplicitSPRUseForDPRUse(), and llvm::tryFoldSPUpdateIntoPushPop().

◆ CorrectExtraCFGEdges()

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 1107 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 getBranchDebugLoc(), and llvm::BranchFolder::OptimizeFunction().

◆ dump()

LLVM_DUMP_METHOD void MachineBasicBlock::dump ( ) const

◆ empty()

bool llvm::MachineBasicBlock::empty ( ) const
inline

◆ end() [1/2]

iterator llvm::MachineBasicBlock::end ( )
inline

Definition at line 200 of file MachineBasicBlock.h.

Referenced by addExclusiveRegPair(), addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::analyzeArguments(), llvm::BPFInstrInfo::analyzeBranch(), llvm::XCoreInstrInfo::analyzeBranch(), llvm::ARCInstrInfo::analyzeBranch(), llvm::NVPTXInstrInfo::analyzeBranch(), llvm::SparcInstrInfo::analyzeBranch(), llvm::MSP430InstrInfo::analyzeBranch(), llvm::LanaiInstrInfo::analyzeBranch(), llvm::AVRInstrInfo::analyzeBranch(), llvm::ARMBaseInstrInfo::analyzeBranch(), llvm::R600InstrInfo::analyzeBranch(), llvm::PPCInstrInfo::analyzeBranch(), llvm::SystemZInstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranch(), llvm::AArch64InstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranchImpl(), llvm::HexagonInstrInfo::analyzeLoop(), AppendEndToFunction(), areCandidatesToMergeOrPair(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), AssignProtectedObjSet(), BBHasFallthrough(), llvm::MachineInstrSpan::begin(), branchMaxOffsets(), llvm::BuildMI(), callHasRegMask(), canMoveInstsAcrossMemOp(), llvm::TailDuplicator::canTailDuplicate(), llvm::Thumb1FrameLowering::canUseAsEpilogue(), checkAndUpdateEFLAGSKill(), checkEFLAGSLive(), collectDebugValues(), CompareMBBNumbers(), ComputeCommonTailLength(), computeRegisterLiveness(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::X86InstrInfo::copyPhysReg(), CountTerminators(), llvm::createAArch64ConditionOptimizerPass(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::createHexagonHardwareLoops(), createPHIsForCMOVsInSinkBB(), llvm::createR600ExpandSpecialInstrsPass(), llvm::createSIFixWWMLivenessPass(), llvm::createSILowerI1CopiesPass(), llvm::createSIWholeQuadModePass(), llvm::createSparcDelaySlotFillerPass(), llvm::createSystemZLDCleanupPass(), llvm::createWebAssemblyArgumentMove(), llvm::createWebAssemblyFixIrreducibleControlFlow(), llvm::createX86GlobalBaseRegPass(), llvm::createX86PadShortFunctions(), llvm::createXCoreFrameToArgsOffsetEliminationPass(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::AVRRegisterInfo::eliminateFrameIndex(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitClzero(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::WebAssemblyFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), 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(), llvm::AVRFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::HexagonFrameLowering::emitPrologue(), llvm::WebAssemblyFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::RegScavenger::enterBasicBlockEnd(), llvm::ScheduleDAGMILive::enterRegion(), eraseGPOpnd(), llvm::BitTracker::MachineEvaluator::evaluate(), llvm::SparcTargetLowering::expandSelectCC(), llvm::GCNScheduleDAGMILive::finalizeSchedule(), findBranchDebugLoc(), findDeadCallerSavedReg(), findHoistingInsertPosAndDeps(), findIncDecAfter(), findIncDecBefore(), FindLastAluClause(), findNextInsertLocation(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), findSurvivorBackwards(), llvm::fixStackStores(), llvm::RegScavenger::forward(), getBranchDebugLoc(), getEquivalentCallShort(), getFallThrough(), getFallThroughMBB(), getFirstEpilogueInst(), getFirstNonDebugInstr(), getFirstTerminator(), getFPReg(), llvm::HexagonFrameLowering::getFrameIndexReference(), llvm::SlotIndexes::getIndexAfter(), llvm::InsertPointAnalysis::getLastInsertPointIter(), getLastNonDebugInstr(), getLSMultipleTransferSize(), getNewValueJumpOpcode(), getNextMachineInstr(), getNonDebugInstr(), getOrExecSource(), getReassignedChan(), getRegsUsedByPHIs(), getSchedRegions(), llvm::X86InstrInfo::getSPAdjust(), getUnconditionalBrDisp(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::MipsTargetLowering::HandleByVal(), HasArgumentDef(), HashEndOfMBB(), hasReturn(), hasTerminatorThatModifiesExec(), hasTrivialSuccessor(), llvm::HexagonInstrInfo::hasUncondBranch(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::HexagonInstrInfo::insertBranch(), llvm::R600InstrInfo::insertBranch(), insertCopy(), insertDeleteInstructions(), llvm::SIInstrInfo::insertIndirectBranch(), InsertLDR_STR(), llvm::AArch64InstrInfo::insertOutlinerEpilogue(), llvm::X86InstrInfo::insertOutlinerEpilogue(), llvm::InsertPointAnalysis::InsertPointAnalysis(), llvm::SIInstrInfo::insertReturn(), InstructionStoresToFI(), IsBetterFallthrough(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), IsBranchOnlyBlock(), isCompareZero(), isCopy(), isDebug(), IsEmptyBlock(), isFullUndefDef(), isImmValidForOpcode(), llvm::Thumb2InstrInfo::isLegalToSplitMBBAt(), IsSafeAndProfitableToMove(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), llvm::TailDuplicator::isSimpleBB(), isSimpleIf(), isSourceDefinedByImplicitDef(), isTerminalReg(), IsUnconditionalJump(), isVirtualRegisterOperand(), llvm::XCoreInstrInfo::loadImmediate(), llvm::SystemZInstrInfo::loadImmediate(), loadM0FromVGPR(), llvm::MipsSEInstrInfo::loadRegFromStack(), llvm::Mips16InstrInfo::loadRegFromStack(), llvm::BPFInstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::LanaiInstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::SystemZInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), LookForIdenticalPHI(), lowerVECTOR_SHUFFLE_VSHF(), makeImplicit(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MaybeRewriteToFallthrough(), MaySpeculate(), MBBDefinesCTR(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), mergeOperations(), llvm::X86FrameLowering::mergeSPUpdates(), llvm::SIInstrInfo::moveToVALU(), opcodeEmitsNoInsts(), false::IntervalSorter::operator()(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), packCmovGroup(), parseCond(), PlaceBlockMarker(), PlaceLoopMarker(), preassignSwiftErrorRegs(), PrevCrossBBInst(), printExtendedName(), llvm::SIFrameLowering::processFunctionBeforeFrameFinalized(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), pushDepHeight(), readsVCCZ(), llvm::FastISel::recomputeInsertPt(), registerDefinedBetween(), regOverlapsSet(), llvm::BPFInstrInfo::removeBranch(), llvm::XCoreInstrInfo::removeBranch(), llvm::ARCInstrInfo::removeBranch(), llvm::NVPTXInstrInfo::removeBranch(), llvm::SparcInstrInfo::removeBranch(), llvm::MSP430InstrInfo::removeBranch(), llvm::LanaiInstrInfo::removeBranch(), llvm::HexagonInstrInfo::removeBranch(), llvm::AVRInstrInfo::removeBranch(), llvm::ARMBaseInstrInfo::removeBranch(), llvm::R600InstrInfo::removeBranch(), llvm::PPCInstrInfo::removeBranch(), llvm::SystemZInstrInfo::removeBranch(), llvm::SIInstrInfo::removeBranch(), llvm::AArch64InstrInfo::removeBranch(), llvm::X86InstrInfo::removeBranch(), RemoveVRSaveCode(), llvm::SlotIndexes::repairIndexesInRange(), 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(), llvm::BitTracker::run(), llvm::InsertNOPLoad::runOnMachineFunction(), llvm::DetectRoundChange::runOnMachineFunction(), llvm::FixAllFDIVSQRT::runOnMachineFunction(), scavengeFrameVirtualRegsInBlock(), llvm::RegScavenger::scavengeRegisterBackwards(), llvm::GCNScheduleDAGMILive::schedule(), llvm::MachineIRBuilder::setMBB(), shrinkScalarCompare(), SinkingPreventsImplicitNullCheck(), SkipPHIsAndLabels(), SkipPHIsLabelsAndDebug(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), split(), splitBlockAfter(), splitBlockBefore(), SplitCriticalEdge(), llvm::SITargetLowering::splitKillBlock(), llvm::Mips16InstrInfo::storeRegToStack(), llvm::BPFInstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::LanaiInstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::SystemZInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), false::Chain::str(), stripRegisterPrefix(), toString(), trySequenceOfOnes(), llvm::LiveIntervals::HMEditor::updateAllRanges(), UpdatePredRedefs(), UseReg(), verifyCTRBranch(), and VerifyPHIs().

◆ end() [2/2]

const_iterator llvm::MachineBasicBlock::end ( ) const
inline

Definition at line 201 of file MachineBasicBlock.h.

◆ erase() [1/4]

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 1039 of file MachineBasicBlock.cpp.

References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), and unbundleSingleMI().

Referenced by addExclusiveRegPair(), addSegmentsWithValNo(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), llvm::Thumb1FrameLowering::canUseAsEpilogue(), ContainsReg(), convertCalleeSaveRestoreToSPPrePostIncDec(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::createHexagonHardwareLoops(), createPHIsForCMOVsInSinkBB(), llvm::createX86OptimizeLEAs(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::NVPTXFrameLowering::eliminateCallFramePseudoInstr(), llvm::AArch64FrameLowering::eliminateCallFramePseudoInstr(), llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::BPFFrameLowering::eliminateCallFramePseudoInstr(), llvm::WebAssemblyFrameLowering::eliminateCallFramePseudoInstr(), llvm::AVRFrameLowering::eliminateCallFramePseudoInstr(), llvm::MipsFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::LanaiFrameLowering::eliminateCallFramePseudoInstr(), llvm::SIFrameLowering::eliminateCallFramePseudoInstr(), llvm::SystemZFrameLowering::eliminateCallFramePseudoInstr(), llvm::ARCFrameLowering::eliminateCallFramePseudoInstr(), llvm::HexagonFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::HexagonFrameLowering::emitPrologue(), llvm::MipsSEInstrInfo::expandPostRAPseudo(), llvm::Mips16InstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::R600InstrInfo::expandPostRAPseudo(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), findIncDecAfter(), getBranchDebugLoc(), getMFHiLoOpc(), getPostIndexedLoadStoreOpcode(), INITIALIZE_PASS(), InsertLDR_STR(), isDebug(), isFullUndefDef(), isLive(), 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(), llvm::HexagonInstrInfo::PredicateInstruction(), printExtendedName(), profitImm(), regOverlapsSet(), llvm::MipsInstrInfo::removeBranch(), llvm::HexagonInstrInfo::removeBranch(), ReplaceFrameIndex(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), and UpdatePredRedefs().

◆ erase() [2/4]

iterator llvm::MachineBasicBlock::erase ( iterator  I,
iterator  E 
)
inline

Remove a range of instructions from the instruction list and delete them.

Definition at line 602 of file MachineBasicBlock.h.

References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), and llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator().

◆ erase() [3/4]

iterator llvm::MachineBasicBlock::erase ( iterator  I)
inline

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 609 of file MachineBasicBlock.h.

◆ erase() [4/4]

iterator llvm::MachineBasicBlock::erase ( MachineInstr I)
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 617 of file MachineBasicBlock.h.

◆ erase_instr()

instr_iterator llvm::MachineBasicBlock::erase_instr ( MachineInstr I)
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 597 of file MachineBasicBlock.h.

Referenced by ImmInRange(), and VerifyLowRegs().

◆ eraseFromParent()

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 1072 of file MachineBasicBlock.cpp.

References assert(), llvm::MachineFunction::erase(), and getParent().

Referenced by llvm::SystemZInstrInfo::analyzeBranch(), llvm::TailDuplicator::canTailDuplicate(), parseCond(), and removePhis().

◆ findBranchDebugLoc()

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 1176 of file MachineBasicBlock.cpp.

References end(), getFirstTerminator(), llvm::DILocation::getMergedLocation(), llvm::BranchProbability::getZero(), P, and succ_size().

Referenced by bothUsedInPHI(), FixTail(), INITIALIZE_PASS(), and updateTerminator().

◆ findDebugLoc() [1/2]

DebugLoc MachineBasicBlock::findDebugLoc ( instr_iterator  MBBI)

Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE instructions.

Return UnknownLoc if there is none.

Definition at line 1165 of file MachineBasicBlock.cpp.

References instr_end(), and llvm::skipDebugInstructionsForward().

Referenced by llvm::AVRInstrInfo::analyzeBranch(), llvm::R600InstrInfo::buildDefaultInstruction(), llvm::SIInstrInfo::calculateLDSSpillAddress(), containsNewBackedge(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::ARCFrameLowering::emitEpilogue(), emitGPDisp(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::HexagonFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitSPUpdate(), llvm::SIInstrInfo::expandPostRAPseudo(), getFallThroughMBB(), 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::X86InstrInfo::loadRegFromStackSlot(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), removeExternalCFGEdges(), llvm::X86InstrInfo::replaceBranchWithTailCall(), llvm::AVRFrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::AVRDynAllocaSR::runOnMachineFunction(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), and llvm::X86InstrInfo::storeRegToStackSlot().

◆ findDebugLoc() [2/2]

DebugLoc llvm::MachineBasicBlock::findDebugLoc ( iterator  MBBI)
inline

◆ front() [1/2]

MachineInstr& llvm::MachineBasicBlock::front ( )
inline

◆ front() [2/2]

const MachineInstr& llvm::MachineBasicBlock::front ( ) const
inline

Definition at line 179 of file MachineBasicBlock.h.

◆ getAlignment()

unsigned llvm::MachineBasicBlock::getAlignment ( ) const
inline

Return alignment of the basic block.

The alignment is specified as log2(bytes).

Definition at line 351 of file MachineBasicBlock.h.

Referenced by llvm::WinException::beginFunclet(), branchMaxOffsets(), llvm::AsmPrinter::EmitBasicBlockStart(), INITIALIZE_PASS(), and llvm::MIPrinter::print().

◆ getBasicBlock()

const BasicBlock* llvm::MachineBasicBlock::getBasicBlock ( ) const
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 139 of file MachineBasicBlock.h.

References getName().

Referenced by addExclusiveRegPair(), llvm::analyzeArguments(), AnyAliasLiveIn(), CompareMBBNumbers(), llvm::createHexagonHardwareLoops(), createPHIsForCMOVsInSinkBB(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::AsmPrinter::EmitBasicBlockStart(), emitBlockAfter(), llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), emitClzero(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), 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::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitBranch(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::FastISel::finishCondBranch(), getBranchHint(), getCompareCC(), getFullName(), getName(), llvm::DOTGraphTraits< const MachineFunction * >::getNodeLabel(), getNonDebugInstr(), llvm::MipsTargetLowering::HandleByVal(), hasExceptionPointerOrCodeUser(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), llvm::PPCInstrInfo::isSignOrZeroExtended(), lowerVECTOR_SHUFFLE_VSHF(), makeImplicit(), matchPair(), mayLoadFromGOTOrConstantPool(), packCmovGroup(), llvm::MIPrinter::print(), print(), llvm::MIPrinter::printMBBReference(), ProfitableToMerge(), registerDefinedBetween(), reportFastISelFailure(), llvm::SITargetLowering::splitKillBlock(), trySequenceOfOnes(), tryToElideArgumentCopy(), and llvm::SelectionDAGBuilder::visitBitTestCase().

◆ getBeginClobberMask()

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 1323 of file MachineBasicBlock.cpp.

References llvm::TargetRegisterInfo::getNoPreservedMask(), and isEHFuncletEntry().

◆ getEndClobberMask()

const uint32_t * MachineBasicBlock::getEndClobberMask ( const TargetRegisterInfo TRI) const

Get the clobber mask for the end of the basic block.

See also
getBeginClobberMask()

Definition at line 1329 of file MachineBasicBlock.cpp.

References llvm::TargetRegisterInfo::getNoPreservedMask(), isReturnBlock(), and succ_empty().

◆ getFallThrough()

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 704 of file MachineBasicBlock.cpp.

References llvm::TargetInstrInfo::analyzeBranch(), back(), llvm::SmallVectorBase::empty(), empty(), end(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::ilist_node_impl< ilist_detail::compute_node_options< MachineBasicBlock, Options... >::type >::getIterator(), getParent(), llvm::MachineFunction::getSubtarget(), llvm::MachineInstr::isBarrier(), llvm::TargetInstrInfo::isPredicated(), isSuccessor(), and TII.

Referenced by canFallThrough().

◆ getFirstInstrTerminator()

MachineBasicBlock::instr_iterator MachineBasicBlock::getFirstInstrTerminator ( )

Same getFirstTerminator but it ignores bundles and return an instr_iterator instead.

Definition at line 190 of file MachineBasicBlock.cpp.

References B, E, I, instr_begin(), and instr_end().

Referenced by collectPHIs(), INITIALIZE_PASS(), and SplitCriticalEdge().

◆ getFirstNonDebugInstr() [1/2]

MachineBasicBlock::iterator MachineBasicBlock::getFirstNonDebugInstr ( )

Returns an iterator to the first non-debug instruction in the basic block, or end().

Definition at line 199 of file MachineBasicBlock.cpp.

References begin(), end(), and llvm::skipDebugInstructionsForward().

Referenced by getBranchDebugLoc(), IsBranchOnlyBlock(), IsEmptyBlock(), llvm::TailDuplicator::isSimpleBB(), and UpdatePredRedefs().

◆ getFirstNonDebugInstr() [2/2]

const_iterator llvm::MachineBasicBlock::getFirstNonDebugInstr ( ) const
inline

Definition at line 519 of file MachineBasicBlock.h.

◆ getFirstNonPHI()

MachineBasicBlock::iterator MachineBasicBlock::getFirstNonPHI ( )

◆ getFirstTerminator() [1/2]

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 181 of file MachineBasicBlock.cpp.

References B, begin(), E, end(), and I.

Referenced by addSegmentsWithValNo(), llvm::SIInstrInfo::analyzeBranch(), llvm::HexagonInstrInfo::analyzeLoop(), llvm::TailDuplicator::canTailDuplicate(), llvm::Thumb1FrameLowering::canUseAsEpilogue(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::createAArch64ConditionOptimizerPass(), llvm::createHexagonHardwareLoops(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::SIFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::ARCFrameLowering::emitEpilogue(), llvm::WebAssemblyFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::HexagonFrameLowering::emitPrologue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), findBranchDebugLoc(), findHoistingInsertPosAndDeps(), findInsertLocation(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), getAdjustedCmp(), llvm::RegBankSelect::getAnalysisUsage(), getFPReg(), llvm::HexagonFrameLowering::getFrameIndexReference(), llvm::RegScavenger::getRegsAvailable(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), getUnderlyingObjects(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), hasReturn(), hasTerminatorThatModifiesExec(), hasTrivialSuccessor(), llvm::HexagonInstrInfo::hasUncondBranch(), INITIALIZE_PASS(), llvm::HexagonInstrInfo::insertBranch(), insertCSRRestores(), InsertLDR_STR(), llvm::InsertPointAnalysis::InsertPointAnalysis(), llvm::SIInstrInfo::insertReturn(), InstructionStoresToFI(), isSourceDefinedByImplicitDef(), IsUnconditionalJump(), llvm::SystemZPostRASchedStrategy::leaveMBB(), llvm::SIInstrInfo::legalizeOperands(), mayLoadFromGOTOrConstantPool(), MaySpeculate(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), opcodeEmitsNoInsts(), parseCond(), PlaceBlockMarker(), llvm::SIInstrInfo::removeBranch(), removeExternalCFGEdges(), llvm::PPCFrameLowering::replaceFPWithRealFP(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), SplitCriticalEdge(), UpdatePredRedefs(), and verifyCTRBranch().

◆ getFirstTerminator() [2/2]

const_iterator llvm::MachineBasicBlock::getFirstTerminator ( ) const
inline

Definition at line 508 of file MachineBasicBlock.h.

◆ getFullName()

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 245 of file MachineBasicBlock.cpp.

References getBasicBlock(), llvm::Value::getName(), llvm::MachineFunction::getName(), getNumber(), and getParent().

Referenced by llvm::ScheduleDAGSDNodes::getDAGName(), llvm::ScheduleDAGInstrs::getDAGName(), and verifyCTRBranch().

◆ getLastNonDebugInstr() [1/2]

MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr ( )

◆ getLastNonDebugInstr() [2/2]

const_iterator llvm::MachineBasicBlock::getLastNonDebugInstr ( ) const
inline

Definition at line 526 of file MachineBasicBlock.h.

◆ getName()

StringRef MachineBasicBlock::getName ( ) const

◆ getNumber()

int llvm::MachineBasicBlock::getNumber ( ) const
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 726 of file MachineBasicBlock.h.

References llvm::Number.

Referenced by llvm::LiveVariables::addNewBlock(), addSegmentsWithValNo(), llvm::HexagonInstrInfo::analyzeBranch(), AssignProtectedObjSet(), BBHasFallthrough(), BBIsJumpedOver(), llvm::LiveRangeCalc::calculateValues(), callHasRegMask(), canSplitCriticalEdge(), llvm::TailDuplicator::canTailDuplicate(), llvm::SplitAnalysis::clear(), collectPHIs(), CompareMBBNumbers(), containsNewBackedge(), llvm::HexagonInstrInfo::copyPhysReg(), llvm::createAArch64ConditionOptimizerPass(), createBBSelectReg(), llvm::LiveRangeCalc::createDeadDefs(), llvm::createGreedyRegisterAllocator(), llvm::createSIWholeQuadModePass(), llvm::createWebAssemblyFixIrreducibleControlFlow(), llvm::HexagonFrameLowering::determineCalleeSaves(), emitBasicBlockLoopComments(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::HexagonFrameLowering::emitPrologue(), llvm::SplitEditor::enterIntvAtEnd(), llvm::SystemZPostRASchedStrategy::enterMBB(), llvm::BitTracker::MachineEvaluator::evaluate(), llvm::GCNScheduleDAGMILive::finalizeSchedule(), llvm::ScheduleDAGInstrs::fixupKills(), getBlockName(), getBranchDebugLoc(), llvm::MachineTraceMetrics::Ensemble::getDepthResources(), getFPReg(), getFullName(), llvm::getFuncletMembership(), llvm::MachineTraceMetrics::Ensemble::getHeightResources(), llvm::MachineTraceMetrics::Trace::getInstrSlack(), llvm::InsertPointAnalysis::getLastInsertPoint(), getLayoutSuccessorProbThreshold(), llvm::MachineTraceMetrics::Ensemble::getLoopFor(), llvm::SlotIndexes::getMBBRange(), getMCSymbolForMBB(), getNewValueJumpOpcode(), llvm::DOTGraphTraits< const MachineFunction * >::getNodeLabel(), getNonDebugInstr(), llvm::MachineTraceMetrics::Trace::getResourceLength(), llvm::MachineTraceMetrics::getResources(), getSymbol(), llvm::MachineTraceMetrics::Ensemble::getTrace(), getUnconditionalBrDisp(), llvm::LiveVariables::HandleVirtRegUse(), HashMachineInstr(), hasOneExitNode(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), llvm::HexagonInstrInfo::insertBranch(), llvm::po_iterator_storage< LoopBounds, true >::insertEdge(), llvm::LiveIntervals::insertMBBInMaps(), llvm::SlotIndexes::insertMBBInMaps(), llvm::InsertPointAnalysis::InsertPointAnalysis(), InstructionStoresToFI(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::invalidate(), llvm::HexagonInstrInfo::invertAndChangeJumpTarget(), isDebug(), llvm::MachineTraceMetrics::Trace::isDepInTrace(), isFunctionEntryBlock(), isInRage(), isIrreducibleCFG(), llvm::LiveVariables::VarInfo::isLiveIn(), isMinSize(), isPHIRegionIndex(), isSourceDefinedByImplicitDef(), llvm::SplitEditor::leaveIntvAtTop(), llvm::SystemZPostRASchedStrategy::leaveMBB(), llvm::LoopBottom(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), matchPair(), MaybeUpdateTerminator(), mayLoadFromGOTOrConstantPool(), mergeOperations(), llvm::MBB2NumberFunctor::operator()(), llvm::rdf::operator<<(), llvm::SplitEditor::overlapIntv(), parseCond(), PlaceBlockMarker(), PlaceLoopMarker(), PlaceMarkers(), llvm::MIPrinter::print(), llvm::MachineTraceMetrics::Trace::print(), print(), printAsOperand(), llvm::MachineBranchProbabilityInfo::printEdgeProbability(), llvm::MIPrinter::printMBBReference(), PrintParentLoopComment(), ProfitableToMerge(), llvm::rdf::DataFlowGraph::pushAllDefs(), pushDepHeight(), llvm::BitTracker::reached(), readsVCCZ(), registerDefinedBetween(), llvm::HexagonInstrInfo::removeBranch(), removeDeadSegment(), removeExternalCFGEdges(), reportFastISelFailure(), llvm::rdf::Liveness::resetKills(), llvm::BitTracker::run(), llvm::LiveRangeCalc::setLiveOutValue(), SortBlocks(), split(), SplitCriticalEdge(), llvm::SplitEditor::splitRegInBlock(), llvm::SplitEditor::splitRegOutBlock(), llvm::SplitEditor::splitSingleBlock(), tryToElideArgumentCopy(), UpdateCPSRUse(), llvm::MachineTraceMetrics::Ensemble::updateDepth(), llvm::MachineTraceMetrics::Ensemble::updateDepths(), updatePhysDepsDownwards(), UpdatePredRedefs(), llvm::MachineTraceMetrics::Ensemble::verify(), llvm::MachineFunction::verify(), verifyCTRBranch(), VerifyPHIs(), and verifySameBranchInstructions().

◆ getParent() [1/2]

const MachineFunction* llvm::MachineBasicBlock::getParent ( ) const
inline

Return the MachineFunction containing this basic block.

Definition at line 155 of file MachineBasicBlock.h.

Referenced by addExclusiveRegPair(), llvm::addFrameReference(), llvm::addLandingPadInfo(), addLiveIn(), addLiveInRegs(), llvm::LiveRegUnits::addLiveIns(), llvm::LivePhysRegs::addLiveIns(), llvm::addLiveIns(), llvm::LiveRegUnits::addLiveOuts(), llvm::LivePhysRegs::addLiveOuts(), llvm::LivePhysRegs::addLiveOutsNoPristines(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::AddPHIOperand(), addRegsToSet(), addSavedGPR(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::AMDGPUInstructionSelector::AMDGPUInstructionSelector(), llvm::analyzeArguments(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), attachMEMCPYScratchRegs(), BBHasFallthrough(), llvm::DwarfCFIException::beginFragment(), llvm::BranchFolder::BranchFolder(), llvm::X86FrameLowering::BuildCFI(), llvm::BuildMI(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::LiveRangeCalc::calculateValues(), canCombine(), canFallThroughTo(), llvm::PPCInstrInfo::canInsertSelect(), llvm::SystemZInstrInfo::canInsertSelect(), llvm::SIInstrInfo::canInsertSelect(), llvm::AArch64InstrInfo::canInsertSelect(), llvm::X86InstrInfo::canInsertSelect(), llvm::X86InstrInfo::canMakeTailCallConditional(), cannotCoexistAsymm(), canSplitCriticalEdge(), llvm::Thumb1FrameLowering::canUseAsEpilogue(), llvm::X86FrameLowering::canUseAsEpilogue(), llvm::AArch64FrameLowering::canUseAsPrologue(), llvm::X86FrameLowering::canUseAsPrologue(), changeFCMPPredToAArch64CC(), llvm::MachineOperand::ChangeToRegister(), llvm::X86InstrInfo::classifyLEAReg(), collectDebugValues(), CombineCVTAToLocal(), llvm::WebAssemblyInstrInfo::commuteInstructionImpl(), llvm::PPCInstrInfo::commuteInstructionImpl(), llvm::SystemZInstrInfo::commuteInstructionImpl(), llvm::X86InstrInfo::commuteInstructionImpl(), CompareMBBNumbers(), ComputeCommonTailLength(), llvm::HexagonBlockRanges::computeDeadMap(), llvm::computeLiveIns(), llvm::InstructionSelector::constrainOperandRegToRegClass(), llvm::InstructionSelector::constrainSelectedInstRegOperands(), containsNewBackedge(), ContainsReg(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::WebAssemblyInstrInfo::copyPhysReg(), llvm::Thumb1InstrInfo::copyPhysReg(), llvm::NVPTXInstrInfo::copyPhysReg(), llvm::AVRInstrInfo::copyPhysReg(), llvm::SystemZInstrInfo::copyPhysReg(), createPHIsForCMOVsInSinkBB(), llvm::createSparcDelaySlotFillerPass(), llvm::createX86GlobalBaseRegPass(), llvm::createX86OptimizeLEAs(), llvm::MachineFunction::DeleteMachineBasicBlock(), llvm::ARCFrameLowering::determineCalleeSaves(), doesModifyCalleeSavedReg(), llvm::LexicalScopes::dominates(), llvm::ARMBaseInstrInfo::duplicate(), llvm::TargetInstrInfo::duplicate(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::LanaiRegisterInfo::eliminateFrameIndex(), llvm::AVRRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::ARCRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitBlockAfter(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), EmitCfiOffset(), emitClzero(), EmitDefCfaOffset(), llvm::SparcTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::MachineInstr::emitError(), llvm::AArch64TargetLowering::EmitF128CSEL(), emitIndirectDst(), emitIndirectSrc(), llvm::HexagonHazardRecognizer::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMAsmPrinter::EmitJumpTableTBInst(), llvm::ThumbRegisterInfo::emitLoadConstPool(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), emitPostSt(), llvm::HexagonFrameLowering::emitPrologue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::MSP430TargetLowering::EmitShiftInstr(), llvm::X86FrameLowering::emitSPUpdate(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), emitThumbRegPlusImmInReg(), emitXBegin(), eraseFromParent(), llvm::MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval(), eraseGPOpnd(), expandLoadStackGuard(), ExpandMOVImmSExti8(), llvm::SparcInstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::SIInstrInfo::expandPostRAPseudo(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::PPCInstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), llvm::X86InstrInfo::expandPostRAPseudo(), llvm::SparcTargetLowering::expandSelectCC(), llvm::HexagonBlockRanges::expandToSubRegs(), llvm::finalizeBundle(), findDeadCallerSavedReg(), findIncDecAfter(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::findPHICopyInsertPoint(), findScratchNonCalleeSaveRegister(), llvm::fixStackStores(), FixTail(), llvm::SIInstrInfo::FoldImmediate(), llvm::TargetInstrInfo::foldMemoryOperand(), forceReg(), llvm::RegScavenger::forward(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::SIInstrInfo::getAddNoCarry(), getBBFallenThrough(), llvm::MachineLoop::getBottomBlock(), getBranchDebugLoc(), getCompareSourceReg(), getConstantFromPool(), getEquivalentCallShort(), llvm::ARMTargetLowering::getExceptionSelectorRegister(), getFallThrough(), getFoldableImm(), getFPReg(), getFrameIndexMMO(), llvm::HexagonFrameLowering::getFrameIndexReference(), getFullName(), llvm::ARMHazardRecognizer::getHazardType(), llvm::HexagonHazardRecognizer::getHazardType(), llvm::AMDGPURegisterBankInfo::getInstrAlternativeMappings(), llvm::X86RegisterBankInfo::getInstrAlternativeMappings(), llvm::AArch64RegisterBankInfo::getInstrAlternativeMappings(), llvm::ARMRegisterBankInfo::getInstrMapping(), llvm::AMDGPURegisterBankInfo::getInstrMapping(), llvm::X86RegisterBankInfo::getInstrMapping(), llvm::AArch64RegisterBankInfo::getInstrMapping(), llvm::AArch64InstrInfo::getInstSizeInBytes(), llvm::ARCInstrInfo::getInstSizeInBytes(), llvm::MSP430InstrInfo::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(), llvm::PPCInstrInfo::getMachineCombinerPatterns(), getMCSymbolForMBB(), llvm::MipsInstrInfo::GetMemOperand(), getNextBlock(), llvm::DOTGraphTraits< MachineBlockFrequencyInfo * >::getNodeLabel(), getNonDebugInstr(), llvm::PPCInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpRegClass(), llvm::AArch64InstrInfo::getOutliningType(), llvm::X86GenRegisterBankInfo::getPartialMappingIdx(), getRegClassFromGRPhysReg(), getRegsUsedByPHIs(), getSchedRegions(), llvm::HexagonInstrInfo::getSize(), getSmrdOpcode(), llvm::X86InstrInfo::getSPAdjust(), getSubOpcode(), getSymbol(), GetSymbolRef(), llvm::MachineLoop::getTopBlock(), llvm::ARMInstrInfo::getUnindexedOpcode(), llvm::guessSuccessors(), llvm::MipsTargetLowering::HandleByVal(), HandleVRSaveUpdate(), llvm::TargetInstrInfo::hasReassociableOperands(), llvm::TargetInstrInfo::hasReassociableSibling(), hasVGPROperands(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), llvm::AArch64TargetLowering::initializeSplitCSR(), llvm::PPCTargetLowering::initializeSplitCSR(), llvm::ARMBaseInstrInfo::insertBranch(), llvm::HexagonFrameLowering::insertCFIInstructions(), llvm::SITargetLowering::insertCopiesSplitCSR(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), insertCSRRestores(), insertCSRSaves(), insertDeleteInstructions(), llvm::SIInstrInfo::insertEQ(), llvm::SIInstrInfo::insertIndirectBranch(), InsertLDR_STR(), llvm::SlotIndexes::insertMBBInMaps(), llvm::SIInstrInfo::insertNE(), llvm::SIInstrInfo::insertReturn(), llvm::PPCInstrInfo::insertSelect(), llvm::SystemZInstrInfo::insertSelect(), llvm::SIInstrInfo::insertSelect(), llvm::AArch64InstrInfo::insertSelect(), llvm::X86InstrInfo::insertSelect(), llvm::SIInstrInfo::insertVectorSelect(), llvm::Mips16RegisterInfo::intRegClass(), llvm::AArch64InstrInfo::isAssociativeAndCommutative(), llvm::X86InstrInfo::isAssociativeAndCommutative(), isCombineInstrCandidateFP(), isCompareZero(), isFpMulInstruction(), isFunctionEntryBlock(), isImmValidForOpcode(), isInstrUniform(), llvm::X86TargetLowering::isIntDivCheap(), isNoReturnDef(), llvm::SIInstrInfo::isOperandLegal(), isPHIRegionIndex(), llvm::ARMBaseInstrInfo::isPredicable(), isPreISelGenericFloatingPointOpcode(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::VLIWResourceModel::isResourceAvailable(), llvm::PPCInstrInfo::isSignOrZeroExtended(), isSimpleIf(), isSourceDefinedByImplicitDef(), 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::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::AMDGPUMCInstLower::lower(), llvm::WebAssemblyMCInstLower::Lower(), llvm::LowerARMMachineInstrToMCInst(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerDynamicAreaOffset(), lowerVECTOR_SHUFFLE_VSHF(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::Mips16InstrInfo::makeFrame(), makeImplicit(), matchPair(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), llvm::SIInstrInfo::materializeImmediate(), MaySpeculate(), memOpsHaveSameBasePtr(), moveAfter(), moveBefore(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64RegisterInfo::needsFrameBaseReg(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), opcodeEmitsNoInsts(), llvm::operator<<(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), packCmovGroup(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), PrevCrossBBInst(), llvm::MIPrinter::print(), llvm::MachineFunctionProperties::print(), print(), llvm::MachineInstr::print(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), ProfitableToMerge(), profitImm(), readsVCCZ(), llvm::recomputeLivenessFlags(), llvm::HexagonInstrInfo::reduceLoopCount(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), removeExternalCFGEdges(), removeFromParent(), RemoveVRSaveCode(), ReplaceDominatedUses(), llvm::PPCFrameLowering::replaceFPWithRealFP(), ReplaceFrameIndex(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), reportIllegalCopy(), llvm::GCNUpwardRPTracker::reset(), llvm::GCNDownwardRPTracker::reset(), llvm::ThumbRegisterInfo::resolveFrameIndex(), llvm::AArch64RegisterInfo::resolveFrameIndex(), llvm::SIRegisterInfo::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(), llvm::Mips16RegisterInfo::saveScavengerRegister(), llvm::ThumbRegisterInfo::saveScavengerRegister(), llvm::RegScavenger::scavengeRegisterBackwards(), scavengeVReg(), setCallTargetReg(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineOperand::setIsDef(), llvm::MachineIRBuilder::setMBB(), llvm::MachineOperand::setReg(), llvm::RegScavenger::setRegUsed(), llvm::SIInstrInfo::shouldClusterMemOps(), llvm::ARMBaseRegisterInfo::shouldCoalesce(), SkipPHIsAndLabels(), SkipPHIsLabelsAndDebug(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::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(), SplitCriticalEdge(), llvm::SITargetLowering::splitKillBlock(), llvm::MipsSEInstrInfo::storeRegToStack(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::X86InstrInfo::storeRegToStackSlot(), llvm::SystemZInstrInfo::SystemZInstrInfo(), tieOpsIfNeeded(), tryChangeVGPRtoSGPRinCopy(), tryFoldInst(), tryOptimizeLEAtoMOV(), trySequenceOfOnes(), tryToElideArgumentCopy(), UpdateOperandRegClass(), updateTerminator(), llvm::R600InstrInfo::usesTextureCache(), llvm::R600InstrInfo::usesVertexCache(), llvm::MachineFunction::verify(), verifyCTRBranch(), llvm::MachineDominatorTree::verifyDomTree(), llvm::SIInstrInfo::verifyInstruction(), VerifyLowRegs(), llvm::SelectionDAGBuilder::visitSPDescriptorParent(), and WindowsRequiresStackProbe().

◆ getParent() [2/2]

MachineFunction* llvm::MachineBasicBlock::getParent ( )
inline

Definition at line 156 of file MachineBasicBlock.h.

◆ getSublistAccess()

static Instructions MachineBasicBlock::* llvm::MachineBasicBlock::getSublistAccess ( MachineInstr )
inlinestatic

Support for MachineInstr::getNextNode().

Definition at line 214 of file MachineBasicBlock.h.

◆ getSymbol()

MCSymbol * MachineBasicBlock::getSymbol ( ) const

◆ hasAddressTaken()

bool llvm::MachineBasicBlock::hasAddressTaken ( ) const
inline

◆ hasEHPadSuccessor()

bool MachineBasicBlock::hasEHPadSuccessor ( ) const

Definition at line 218 of file MachineBasicBlock.cpp.

References E, I, succ_begin(), and succ_end().

Referenced by bothUsedInPHI(), and isLegalToHoistInto().

◆ hasSuccessorProbabilities()

bool llvm::MachineBasicBlock::hasSuccessorProbabilities ( ) const
inline

Return true if any of the successors have probabilities attached to them.

Definition at line 459 of file MachineBasicBlock.h.

Referenced by llvm::guessSuccessors(), and parseCond().

◆ insert() [1/3]

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 1052 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::MachineFunction::CloneMachineInstrBundle(), CompareMBBNumbers(), llvm::rdf::Liveness::computeLiveIns(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::SIInstrInfo::convertNonUniformLoopRegion(), llvm::SystemZInstrInfo::convertToThreeAddress(), countOperands(), createBBSelectReg(), createPHIsForCMOVsInSinkBB(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::InstrEmitter::EmitDbgValue(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::X86FrameLowering::emitPrologue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::TargetInstrInfo::foldMemoryOperand(), FuseInst(), FuseTwoAddrInst(), getNonDebugInstr(), getUnconditionalBrDisp(), HasArgumentDef(), INITIALIZE_PASS(), llvm::RegBankSelect::InsertPoint::insert(), llvm::MIBundleBuilder::insert(), insertDeleteInstructions(), llvm::MachineIRBuilder::insertInstr(), llvm::AArch64InstrInfo::insertOutlinedCall(), llvm::X86InstrInfo::insertOutlinedCall(), llvm::AArch64InstrInfo::insertOutlinerEpilogue(), llvm::X86InstrInfo::insertOutlinerEpilogue(), isCopy(), isImmValidForOpcode(), isInRage(), isLive(), llvm::PPCInstrInfo::loadRegFromStackSlot(), moveInstsAfter(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), packCmovGroup(), ProcessSDDbgValues(), readsVCCZ(), regOverlapsSet(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), restoreCRs(), llvm::Localizer::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::GCNScheduleDAGMILive::schedule(), llvm::GCNIterativeScheduler::scheduleRegion(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::SystemZInstrInfo::SystemZInstrInfo(), toString(), and tryToElideArgumentCopy().

◆ insert() [2/3]

template<typename IT >
void llvm::MachineBasicBlock::insert ( iterator  I,
IT  S,
IT  E 
)
inline

Insert a range of instructions into the instruction list before I.

Definition at line 563 of file MachineBasicBlock.h.

References assert(), E, llvm::sys::path::end(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insert().

◆ insert() [3/3]

iterator llvm::MachineBasicBlock::insert ( iterator  I,
MachineInstr MI 
)
inline

◆ insertAfter()

iterator llvm::MachineBasicBlock::insertAfter ( iterator  I,
MachineInstr MI 
)
inline

◆ instr_back() [1/2]

MachineInstr& llvm::MachineBasicBlock::instr_back ( )
inline

Definition at line 173 of file MachineBasicBlock.h.

Referenced by INITIALIZE_PASS().

◆ instr_back() [2/2]

const MachineInstr& llvm::MachineBasicBlock::instr_back ( ) const
inline

Definition at line 175 of file MachineBasicBlock.h.

◆ instr_begin() [1/2]

instr_iterator llvm::MachineBasicBlock::instr_begin ( )
inline

◆ instr_begin() [2/2]

const_instr_iterator llvm::MachineBasicBlock::instr_begin ( ) const
inline

Definition at line 183 of file MachineBasicBlock.h.

◆ instr_end() [1/2]

instr_iterator llvm::MachineBasicBlock::instr_end ( )
inline

◆ instr_end() [2/2]

const_instr_iterator llvm::MachineBasicBlock::instr_end ( ) const
inline

Definition at line 185 of file MachineBasicBlock.h.

◆ instr_front() [1/2]

MachineInstr& llvm::MachineBasicBlock::instr_front ( )
inline

Definition at line 172 of file MachineBasicBlock.h.

◆ instr_front() [2/2]

const MachineInstr& llvm::MachineBasicBlock::instr_front ( ) const
inline

Definition at line 174 of file MachineBasicBlock.h.

◆ instr_rbegin() [1/2]

reverse_instr_iterator llvm::MachineBasicBlock::instr_rbegin ( )
inline

Definition at line 186 of file MachineBasicBlock.h.

Referenced by removePhis().

◆ instr_rbegin() [2/2]

const_reverse_instr_iterator llvm::MachineBasicBlock::instr_rbegin ( ) const
inline

Definition at line 187 of file MachineBasicBlock.h.

◆ instr_rend() [1/2]

reverse_instr_iterator llvm::MachineBasicBlock::instr_rend ( )
inline

Definition at line 188 of file MachineBasicBlock.h.

Referenced by llvm::createLanaiDelaySlotFillerPass(), and removePhis().

◆ instr_rend() [2/2]

const_reverse_instr_iterator llvm::MachineBasicBlock::instr_rend ( ) const
inline

Definition at line 189 of file MachineBasicBlock.h.

◆ instrs() [1/2]

instr_range llvm::MachineBasicBlock::instrs ( )
inline

Definition at line 193 of file MachineBasicBlock.h.

Referenced by print(), and SplitCriticalEdge().

◆ instrs() [2/2]

const_instr_range llvm::MachineBasicBlock::instrs ( ) const
inline

Definition at line 194 of file MachineBasicBlock.h.

◆ isCleanupFuncletEntry()

bool llvm::MachineBasicBlock::isCleanupFuncletEntry ( ) const
inline

Returns true if this is the entry block of a cleanup funclet.

Definition at line 374 of file MachineBasicBlock.h.

Referenced by llvm::WinException::beginFunclet(), llvm::X86FrameLowering::emitPrologue(), llvm::WinException::endFunclet(), and getMCSymbolForMBB().

◆ isEHFuncletEntry()

bool llvm::MachineBasicBlock::isEHFuncletEntry ( ) const
inline

◆ isEHPad()

bool llvm::MachineBasicBlock::isEHPad ( ) const
inline

◆ isLayoutSuccessor()

bool MachineBasicBlock::isLayoutSuccessor ( const MachineBasicBlock MBB) const

◆ isLegalToHoistInto()

bool MachineBasicBlock::isLegalToHoistInto ( ) const

Returns true if it is legal to hoist instructions into this block.

Definition at line 231 of file MachineBasicBlock.cpp.

References hasEHPadSuccessor(), and isReturnBlock().

◆ isLiveIn()

bool MachineBasicBlock::isLiveIn ( MCPhysReg  Reg,
LaneBitmask  LaneMask = LaneBitmask::getAll() 
) const

◆ isPredecessor()

bool MachineBasicBlock::isPredecessor ( const MachineBasicBlock MBB) const

Return true if the specified MBB is a predecessor of this block.

Definition at line 691 of file MachineBasicBlock.cpp.

References llvm::is_contained(), and predecessors().

Referenced by llvm::MachineTraceMetrics::Ensemble::invalidate(), and llvm::MachineTraceMetrics::Ensemble::verify().

◆ isReturnBlock()

bool llvm::MachineBasicBlock::isReturnBlock ( ) const
inline

◆ isSuccessor()

bool MachineBasicBlock::isSuccessor ( const MachineBasicBlock MBB) const

◆ livein_begin()

MachineBasicBlock::livein_iterator MachineBasicBlock::livein_begin ( ) const

◆ livein_begin_dbg()

livein_iterator llvm::MachineBasicBlock::livein_begin_dbg ( ) const
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 326 of file MachineBasicBlock.h.

◆ livein_empty()

bool llvm::MachineBasicBlock::livein_empty ( ) const
inline

Definition at line 333 of file MachineBasicBlock.h.

Referenced by llvm::addLiveIns(), parseCond(), llvm::MIPrinter::print(), and print().

◆ livein_end()

livein_iterator llvm::MachineBasicBlock::livein_end ( ) const
inline

Definition at line 332 of file MachineBasicBlock.h.

Referenced by isLiveIn(), and IsUnconditionalJump().

◆ liveins()

iterator_range<livein_iterator> llvm::MachineBasicBlock::liveins ( ) const
inline

◆ liveins_dbg()

iterator_range<livein_iterator> llvm::MachineBasicBlock::liveins_dbg ( ) const
inline

Definition at line 327 of file MachineBasicBlock.h.

References llvm::make_range().

◆ moveAfter()

void MachineBasicBlock::moveAfter ( MachineBasicBlock NewBefore)

◆ moveBefore()

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 424 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 getBranchDebugLoc().

◆ normalizeSuccProbs()

void llvm::MachineBasicBlock::normalizeSuccProbs ( )
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 423 of file MachineBasicBlock.h.

References llvm::BranchProbability::normalizeProbabilities().

Referenced by CorrectExtraCFGEdges(), INITIALIZE_PASS(), removeSuccessor(), toString(), transferSuccessorsAndUpdatePHIs(), tryToElideArgumentCopy(), llvm::SelectionDAGBuilder::UpdateSplitBlock(), llvm::SelectionDAGBuilder::visitBitTestCase(), llvm::SelectionDAGBuilder::visitBitTestHeader(), and llvm::SelectionDAGBuilder::visitSwitchCase().

◆ pop_back()

void llvm::MachineBasicBlock::pop_back ( )
inline

◆ pop_front()

void llvm::MachineBasicBlock::pop_front ( )
inline

◆ pred_begin() [1/2]

pred_iterator llvm::MachineBasicBlock::pred_begin ( )
inline

◆ pred_begin() [2/2]

const_pred_iterator llvm::MachineBasicBlock::pred_begin ( ) const
inline

Definition at line 239 of file MachineBasicBlock.h.

◆ pred_empty()

bool llvm::MachineBasicBlock::pred_empty ( ) const
inline

◆ pred_end() [1/2]

pred_iterator llvm::MachineBasicBlock::pred_end ( )
inline

◆ pred_end() [2/2]

const_pred_iterator llvm::MachineBasicBlock::pred_end ( ) const
inline

Definition at line 241 of file MachineBasicBlock.h.

◆ pred_rbegin() [1/2]

pred_reverse_iterator llvm::MachineBasicBlock::pred_rbegin ( )
inline

Definition at line 242 of file MachineBasicBlock.h.

Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().

◆ pred_rbegin() [2/2]

const_pred_reverse_iterator llvm::MachineBasicBlock::pred_rbegin ( ) const
inline

Definition at line 244 of file MachineBasicBlock.h.

◆ pred_rend() [1/2]

pred_reverse_iterator llvm::MachineBasicBlock::pred_rend ( )
inline

Definition at line 246 of file MachineBasicBlock.h.

Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().

◆ pred_rend() [2/2]

const_pred_reverse_iterator llvm::MachineBasicBlock::pred_rend ( ) const
inline

Definition at line 248 of file MachineBasicBlock.h.

◆ pred_size()

unsigned llvm::MachineBasicBlock::pred_size ( ) const
inline

◆ predecessors() [1/2]

iterator_range<pred_iterator> llvm::MachineBasicBlock::predecessors ( )
inline

◆ predecessors() [2/2]

iterator_range<const_pred_iterator> llvm::MachineBasicBlock::predecessors ( ) const
inline

Definition at line 274 of file MachineBasicBlock.h.

References llvm::make_range(), llvm::pred_begin(), and llvm::pred_end().

◆ print() [1/2]

void MachineBasicBlock::print ( raw_ostream OS,
const SlotIndexes Indexes = nullptr 
) const

◆ print() [2/2]

void MachineBasicBlock::print ( raw_ostream OS,
ModuleSlotTracker MST,
const SlotIndexes Indexes = nullptr 
) const

◆ printAsOperand()

void MachineBasicBlock::printAsOperand ( raw_ostream OS,
bool  PrintType = true 
) const

Definition at line 343 of file MachineBasicBlock.cpp.

References getNumber().

◆ push_back()

void llvm::MachineBasicBlock::push_back ( MachineInstr MI)
inline

◆ rbegin() [1/2]

reverse_iterator llvm::MachineBasicBlock::rbegin ( )
inline

◆ rbegin() [2/2]

const_reverse_iterator llvm::MachineBasicBlock::rbegin ( ) const
inline

Definition at line 205 of file MachineBasicBlock.h.

◆ remove()

MachineInstr* llvm::MachineBasicBlock::remove ( MachineInstr I)
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 626 of file MachineBasicBlock.h.

References assert(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::remove().

Referenced by isCopy(), isSourceDefinedByImplicitDef(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::GCNScheduleDAGMILive::schedule(), and llvm::GCNIterativeScheduler::scheduleRegion().

◆ remove_instr()

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 1044 of file MachineBasicBlock.cpp.

References llvm::MachineInstr::BundledPred, llvm::MachineInstr::BundledSucc, llvm::MachineInstr::clearFlag(), llvm::iplist_impl< IntrusiveListT, TraitsT >::remove(), and unbundleSingleMI().

◆ removeFromParent()

MachineBasicBlock * MachineBasicBlock::removeFromParent ( )

This method unlinks 'this' from the containing function, and returns it, but does not delete it.

Definition at line 1065 of file MachineBasicBlock.cpp.

References assert(), getParent(), and llvm::MachineFunction::remove().

◆ removeLiveIn() [1/2]

void MachineBasicBlock::removeLiveIn ( MCPhysReg  Reg,
LaneBitmask  LaneMask = LaneBitmask::getAll() 
)

Remove the specified register from the live in set.

Definition at line 348 of file MachineBasicBlock.cpp.

References llvm::find_if(), I, and llvm::MachineBasicBlock::RegisterMaskPair::PhysReg.

Referenced by emitGPDisp(), findHoistingInsertPosAndDeps(), IsUnconditionalJump(), and verifyLeafProcRegUse().

◆ removeLiveIn() [2/2]

Remove entry from the livein set and return iterator to the next.

Definition at line 360 of file MachineBasicBlock.cpp.

◆ removeSuccessor() [1/2]

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 574 of file MachineBasicBlock.cpp.

References llvm::find(), and I.

Referenced by bothUsedInPHI(), llvm::BranchFolder::BranchFolder(), llvm::TailDuplicator::canTailDuplicate(), CorrectExtraCFGEdges(), createPHIsForCMOVsInSinkBB(), getBranchDebugLoc(), INITIALIZE_PASS(), MaySpeculate(), parseCond(), removePhis(), llvm::ARMTargetLowering::ReplaceNodeResults(), replaceSuccessor(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::UnreachableBlockElimPass::run(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().

◆ removeSuccessor() [2/2]

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 581 of file MachineBasicBlock.cpp.

References assert(), and normalizeSuccProbs().

◆ rend() [1/2]

reverse_iterator llvm::MachineBasicBlock::rend ( )
inline

◆ rend() [2/2]

const_reverse_iterator llvm::MachineBasicBlock::rend ( ) const
inline

Definition at line 209 of file MachineBasicBlock.h.

◆ replaceSuccessor()

void MachineBasicBlock::replaceSuccessor ( MachineBasicBlock Old,
MachineBasicBlock New 
)

Replace successor OLD with NEW and update probability info.

Definition at line 597 of file MachineBasicBlock.cpp.

References assert(), E, llvm::find(), I, removeSuccessor(), succ_begin(), and succ_end().

Referenced by bothUsedInPHI(), getNonDebugInstr(), hasDataDependence(), IsUnconditionalJump(), registerDefinedBetween(), and ReplaceUsesOfBlockWith().

◆ ReplaceUsesOfBlockWith()

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 1079 of file MachineBasicBlock.cpp.

References assert(), I, instr_begin(), instr_end(), and replaceSuccessor().

Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), getBranchDebugLoc(), isImmValidForOpcode(), and SplitCriticalEdge().

◆ setAlignment()

void llvm::MachineBasicBlock::setAlignment ( unsigned  Align)
inline

Set alignment of the basic block.

The alignment is specified as log2(bytes).

Definition at line 355 of file MachineBasicBlock.h.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align.

Referenced by branchMaxOffsets(), getLayoutSuccessorProbThreshold(), and getUnconditionalBrDisp().

◆ setHasAddressTaken()

void llvm::MachineBasicBlock::setHasAddressTaken ( )
inline

Set this block to reflect that it potentially is the target of an indirect branch.

Definition at line 152 of file MachineBasicBlock.h.

Referenced by llvm::createHexagonHardwareLoops(), createPHIsForCMOVsInSinkBB(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), llvm::FunctionLoweringInfo::set(), and llvm::X86FrameLowering::spillCalleeSavedRegisters().

◆ setIsCleanupFuncletEntry()

void llvm::MachineBasicBlock::setIsCleanupFuncletEntry ( bool  V = true)
inline

Indicates if this is the entry block of a cleanup funclet.

Definition at line 377 of file MachineBasicBlock.h.

References llvm::BranchProbability::getUnknown().

◆ setIsEHFuncletEntry()

void llvm::MachineBasicBlock::setIsEHFuncletEntry ( bool  V = true)
inline

Indicates if this is the entry block of an EH funclet.

Definition at line 371 of file MachineBasicBlock.h.

Referenced by llvm::SelectionDAGBuilder::getValueImpl().

◆ setIsEHPad()

void llvm::MachineBasicBlock::setIsEHPad ( bool  V = true)
inline

Indicates the block is a landing pad.

That is this basic block is entered via an exception handler.

Definition at line 363 of file MachineBasicBlock.h.

Referenced by createPHIsForCMOVsInSinkBB(), llvm::ARMTargetLowering::ReplaceNodeResults(), and llvm::FunctionLoweringInfo::set().

◆ setNumber()

void llvm::MachineBasicBlock::setNumber ( int  N)
inline

Definition at line 727 of file MachineBasicBlock.h.

References llvm::object::getSymbol(), and N.

◆ setSuccProbability()

void MachineBasicBlock::setSuccProbability ( succ_iterator  I,
BranchProbability  Prob 
)

Set successor probability of a given iterator.

Definition at line 1215 of file MachineBasicBlock.cpp.

References assert(), I, and llvm::BranchProbability::isUnknown().

Referenced by mergeOperations(), parseCond(), and tryToElideArgumentCopy().

◆ size()

unsigned llvm::MachineBasicBlock::size ( ) const
inline

◆ SkipPHIsAndLabels()

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 151 of file MachineBasicBlock.cpp.

References assert(), E, end(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), I, llvm::TargetInstrInfo::isBasicBlockPrologue(), and TII.

Referenced by addLiveIn(), llvm::findPHICopyInsertPoint(), and llvm::Localizer::runOnMachineFunction().

◆ SkipPHIsLabelsAndDebug()

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 166 of file MachineBasicBlock.cpp.

References assert(), E, end(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), I, llvm::TargetInstrInfo::isBasicBlockPrologue(), and TII.

Referenced by findInsertLocation(), isFullCopyOf(), and llvm::SplitEditor::leaveIntvAtTop().

◆ sortUniqueLiveIns()

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 372 of file MachineBasicBlock.cpp.

References I, llvm::MachineBasicBlock::RegisterMaskPair::PhysReg, and llvm::parallel::sort().

Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), and findHoistingInsertPosAndDeps().

◆ splice() [1/2]

void llvm::MachineBasicBlock::splice ( iterator  Where,
MachineBasicBlock Other,
iterator  From 
)
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 646 of file MachineBasicBlock.h.

Referenced by llvm::analyzeArguments(), llvm::TailDuplicator::canTailDuplicate(), CompareMBBNumbers(), ComputeCommonTailLength(), llvm::createHexagonHardwareLoops(), llvm::createLanaiDelaySlotFillerPass(), createPHIsForCMOVsInSinkBB(), llvm::createSparcDelaySlotFillerPass(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitClzero(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), 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(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), findHoistingInsertPosAndDeps(), FindSplitPointForStackProtector(), getBranchDebugLoc(), getEquivalentCallShort(), getNewValueJumpOpcode(), llvm::MipsTargetLowering::HandleByVal(), INITIALIZE_PASS(), llvm::X86FrameLowering::inlineStackProbe(), InstructionStoresToFI(), IsSafeAndProfitableToMove(), loadM0FromVGPR(), lowerVECTOR_SHUFFLE_VSHF(), mayLoadFromGOTOrConstantPool(), MoveAndTeeForMultiUse(), MoveForSingleUse(), moveInstrOut(), nextIfDebug(), packCmovGroup(), parseCond(), regOverlapsSet(), SinkingPreventsImplicitNullCheck(), split(), splitBlockAfter(), splitBlockBefore(), llvm::SITargetLowering::splitKillBlock(), and UseReg().

◆ splice() [2/2]

void llvm::MachineBasicBlock::splice ( iterator  Where,
MachineBasicBlock Other,
iterator  From,
iterator  To 
)
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 657 of file MachineBasicBlock.h.

References llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::splice().

◆ SplitCriticalEdge()

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 752 of file MachineBasicBlock.cpp.

References addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::LiveRange::addSegment(), addSuccessor(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), canSplitCriticalEdge(), llvm::SmallSet< T, N, C >::count(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::dbgs(), DEBUG, E, llvm::SmallVectorTemplateCommon< T, typename >::end(), end(), llvm::MachineFunction::end(), llvm::Pass::getAnalysisIfAvailable(), getFirstInstrTerminator(), getFirstTerminator(), llvm::TargetSubtargetInfo::getInstrInfo(), getNumber(), llvm::MachineRegisterInfo::getNumVirtRegs(), getParent(), llvm::SlotIndex::getPrevSlot(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::LiveVariables::getVarInfo(), llvm::LiveRange::getVNInfoAt(), I, llvm::TargetRegisterInfo::index2VirtReg(), llvm::SmallSet< T, N, C >::insert(), llvm::MachineFunction::insert(), llvm::TargetInstrInfo::insertBranch(), llvm::SlotIndexes::insertMBBInMaps(), instr_begin(), instr_end(), instrs(), llvm::is_contained(), isLayoutSuccessor(), isLiveOut(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isUndef(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::LiveVariables::VarInfo::Kills, llvm::LiveRange::liveAt(), liveins(), MRI, llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::LiveVariables::VarInfo::removeKill(), llvm::LiveRange::removeSegment(), ReplaceUsesOfBlockWith(), TII, and updateTerminator().

Referenced by llvm::RegBankSelect::MBBInsertPoint::frequency(), isSourceDefinedByImplicitDef(), and mayLoadFromGOTOrConstantPool().

◆ succ_begin() [1/2]

succ_iterator llvm::MachineBasicBlock::succ_begin ( )
inline

Definition at line 254 of file MachineBasicBlock.h.

Referenced by addLiveInRegs(), BBHasFallthrough(), BBIsJumpedOver(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_begin(), bothUsedInPHI(), llvm::TailDuplicator::canTailDuplicate(), llvm::Thumb1FrameLowering::canUseAsEpilogue(), checkAndUpdateEFLAGSKill(), checkEFLAGSLive(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_begin(), llvm::GraphTraits< MachineBasicBlock * >::child_begin(), llvm::GraphTraits< const MachineBasicBlock * >::child_begin(), collectDebugValues(), CorrectExtraCFGEdges(), createBBSelectReg(), llvm::createWebAssemblyFixIrreducibleControlFlow(), llvm::createX86PadShortFunctions(), fixMBBTerminator(), getBranchDebugLoc(), getEquivalentCallShort(), getFallThroughMBB(), llvm::MachineBranchProbabilityInfo::getHotSucc(), getLayoutSuccessorProbThreshold(), getNewValueJumpOpcode(), getOrExecSource(), greaterWithBias(), llvm::guessSuccessors(), hasDataDependence(), hasEHPadSuccessor(), hasOneExitNode(), hasTrivialSuccessor(), INITIALIZE_PASS(), isCCLiveOut(), isSimpleIf(), isSourceDefinedByImplicitDef(), IsUnconditionalJump(), matchPair(), MaySpeculate(), mbbHasBackEdge(), mergeOperations(), opcodeEmitsNoInsts(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), OtherSucc(), parseCond(), llvm::MIPrinter::print(), print(), removeExternalCFGEdges(), removeExternalCFGSuccessors(), replaceSuccessor(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::UnreachableBlockElimPass::run(), llvm::IRTranslator::runOnMachineFunction(), llvm::GCNScheduleDAGMILive::schedule(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), llvm::TailDuplicator::tailDuplicateAndUpdate(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), tryToElideArgumentCopy(), updateTerminator(), and llvm::MachineFunction::verify().

◆ succ_begin() [2/2]

const_succ_iterator llvm::MachineBasicBlock::succ_begin ( ) const
inline

Definition at line 255 of file MachineBasicBlock.h.

◆ succ_empty()

bool llvm::MachineBasicBlock::succ_empty ( ) const
inline

◆ succ_end() [1/2]

succ_iterator llvm::MachineBasicBlock::succ_end ( )
inline

Definition at line 256 of file MachineBasicBlock.h.

Referenced by addLiveInRegs(), BBHasFallthrough(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_end(), bothUsedInPHI(), llvm::BranchFolder::BranchFolder(), llvm::TailDuplicator::canTailDuplicate(), checkAndUpdateEFLAGSKill(), checkEFLAGSLive(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_end(), llvm::GraphTraits< MachineBasicBlock * >::child_end(), llvm::GraphTraits< const MachineBasicBlock * >::child_end(), collectDebugValues(), CorrectExtraCFGEdges(), createBBSelectReg(), llvm::createWebAssemblyFixIrreducibleControlFlow(), llvm::createX86PadShortFunctions(), getEquivalentCallShort(), getFallThroughMBB(), llvm::MachineBranchProbabilityInfo::getHotSucc(), getNewValueJumpOpcode(), greaterWithBias(), llvm::guessSuccessors(), hasDataDependence(), hasEHPadSuccessor(), hasOneExitNode(), INITIALIZE_PASS(), isCCLiveOut(), isSimpleIf(), isSourceDefinedByImplicitDef(), matchPair(), MaySpeculate(), mbbHasBackEdge(), mergeOperations(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), OtherSucc(), parseCond(), llvm::MIPrinter::print(), print(), removeExternalCFGEdges(), removeExternalCFGSuccessors(), replaceSuccessor(), llvm::UnreachableBlockElimPass::run(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), llvm::TailDuplicator::tailDuplicateAndUpdate(), tryToElideArgumentCopy(), updateTerminator(), and llvm::MachineFunction::verify().

◆ succ_end() [2/2]

const_succ_iterator llvm::MachineBasicBlock::succ_end ( ) const
inline

Definition at line 257 of file MachineBasicBlock.h.

◆ succ_rbegin() [1/2]

succ_reverse_iterator llvm::MachineBasicBlock::succ_rbegin ( )
inline

Definition at line 258 of file MachineBasicBlock.h.

Referenced by createPHIsForCMOVsInSinkBB().

◆ succ_rbegin() [2/2]

const_succ_reverse_iterator llvm::MachineBasicBlock::succ_rbegin ( ) const
inline

Definition at line 260 of file MachineBasicBlock.h.

◆ succ_rend() [1/2]

succ_reverse_iterator llvm::MachineBasicBlock::succ_rend ( )
inline

Definition at line 262 of file MachineBasicBlock.h.

Referenced by createPHIsForCMOVsInSinkBB().

◆ succ_rend() [2/2]

const_succ_reverse_iterator llvm::MachineBasicBlock::succ_rend ( ) const
inline

Definition at line 264 of file MachineBasicBlock.h.

◆ succ_size()

unsigned llvm::MachineBasicBlock::succ_size ( ) const
inline

◆ successors() [1/2]

iterator_range<succ_iterator> llvm::MachineBasicBlock::successors ( )
inline

Definition at line 277 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(), llvm::X86InstrInfo::analyzeBranchPredicate(), areCFlagsAliveInSuccessors(), bothUsedInPHI(), callHasRegMask(), llvm::TailDuplicator::canTailDuplicate(), collectFuncletMembers(), llvm::createAArch64ConditionOptimizerPass(), llvm::createSIWholeQuadModePass(), llvm::HexagonFrameLowering::emitPrologue(), llvm::BitTracker::MachineEvaluator::evaluate(), findFalseBlock(), FindIDom(), llvm::MachineLoopInfo::findLoopPreheader(), flagsNeedToBePreservedBeforeTheTerminators(), getBlockName(), getBranchDebugLoc(), llvm::HexagonInstrInfo::getDotNewPredJumpOp(), llvm::MachineBranchProbabilityInfo::getEdgeProbability(), getLayoutSuccessorProbThreshold(), llvm::rdf::DataFlowGraph::getNextShadow(), greaterWithBias(), handleNormalInst(), hasSameSuccessors(), llvm::InsertPointAnalysis::InsertPointAnalysis(), llvm::MachineTraceMetrics::Ensemble::invalidate(), isExitingLoop(), isInRage(), isIrreducibleCFG(), isLiveOut(), llvm::LiveVariables::isLiveOut(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::HexagonInstrInfo::isSchedulingBoundary(), isSourceDefinedByImplicitDef(), isSuccessor(), llvm::rdf::operator<<(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::LiveIntervals::pruneValue(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::rdf::Liveness::resetKills(), llvm::ExecutionDepsFix::runOnMachineFunction(), SortBlocks(), and updateLiveness().

◆ successors() [2/2]

iterator_range<const_succ_iterator> llvm::MachineBasicBlock::successors ( ) const
inline

Definition at line 280 of file MachineBasicBlock.h.

References llvm::make_range(), llvm::succ_begin(), and llvm::succ_end().

◆ terminators() [1/2]

iterator_range<iterator> llvm::MachineBasicBlock::terminators ( )
inline

◆ terminators() [2/2]

iterator_range<const_iterator> llvm::MachineBasicBlock::terminators ( ) const
inline

Definition at line 221 of file MachineBasicBlock.h.

References llvm::sys::path::end(), and llvm::make_range().

◆ transferSuccessors()

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 647 of file MachineBasicBlock.cpp.

References addSuccessor(), addSuccessorWithoutProb(), removeSuccessor(), succ_begin(), and succ_empty().

Referenced by llvm::TailDuplicator::canTailDuplicate(), CompareMBBNumbers(), ComputeCommonTailLength(), getBranchDebugLoc(), hasDataDependence(), and INITIALIZE_PASS().

◆ transferSuccessorsAndUpdatePHIs()

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 666 of file MachineBasicBlock.cpp.

References addSuccessor(), addSuccessorWithoutProb(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), instr_begin(), instr_end(), llvm::MachineInstr::isPHI(), MI, normalizeSuccProbs(), removeSuccessor(), llvm::MachineOperand::setMBB(), succ_begin(), and succ_empty().

Referenced by llvm::analyzeArguments(), createPHIsForCMOVsInSinkBB(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitClzero(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), 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(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), llvm::MipsTargetLowering::HandleByVal(), llvm::X86FrameLowering::inlineStackProbe(), loadM0FromVGPR(), lowerVECTOR_SHUFFLE_VSHF(), packCmovGroup(), parseCond(), split(), splitBlockAfter(), splitBlockBefore(), and llvm::SITargetLowering::splitKillBlock().

◆ updateTerminator()

void MachineBasicBlock::updateTerminator ( )

◆ validateSuccProbs()

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 541 of file MachineBasicBlock.cpp.

References llvm::abs(), assert(), and llvm::BranchProbability::getDenominator().

Friends And Related Function Documentation

◆ ilist_callback_traits< MachineBasicBlock >

friend struct ilist_callback_traits< MachineBasicBlock >
friend

Definition at line 747 of file MachineBasicBlock.h.

◆ MachineBranchProbabilityInfo

friend class MachineBranchProbabilityInfo
friend

Definition at line 738 of file MachineBasicBlock.h.

◆ MachineFunction

friend class MachineFunction
friend

Definition at line 133 of file MachineBasicBlock.h.

◆ MIPrinter

friend class MIPrinter
friend

Definition at line 739 of file MachineBasicBlock.h.


The documentation for this class was generated from the following files: