|
LLVM
4.0.0
|
#include <MachineBasicBlock.h>
Classes | |
| struct | RegisterMaskPair |
| Pair of physical register and lane mask. More... | |
Public Member Functions | |
| const BasicBlock * | getBasicBlock () const |
| Return the LLVM basic block that this instance corresponded to originally. More... | |
| StringRef | getName () const |
| Return the name of the corresponding LLVM basic block, or "(null)". 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 MachineFunction * | getParent () const |
| Return the MachineFunction containing this basic block. More... | |
| MachineFunction * | getParent () |
| unsigned | size () const |
| bool | empty () const |
| MachineInstr & | instr_front () |
| MachineInstr & | instr_back () |
| const MachineInstr & | instr_front () const |
| const MachineInstr & | instr_back () const |
| MachineInstr & | front () |
| MachineInstr & | back () |
| const MachineInstr & | front () const |
| const MachineInstr & | back () const |
| instr_iterator | instr_begin () |
| const_instr_iterator | instr_begin () const |
| instr_iterator | instr_end () |
| const_instr_iterator | instr_end () const |
| reverse_instr_iterator | instr_rbegin () |
| const_reverse_instr_iterator | instr_rbegin () const |
| reverse_instr_iterator | instr_rend () |
| const_reverse_instr_iterator | instr_rend () const |
| instr_range | instrs () |
| const_instr_range | instrs () const |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
| iterator_range< iterator > | terminators () |
| iterator_range< const_iterator > | terminators () const |
| pred_iterator | pred_begin () |
| const_pred_iterator | pred_begin () const |
| pred_iterator | pred_end () |
| const_pred_iterator | pred_end () const |
| pred_reverse_iterator | pred_rbegin () |
| const_pred_reverse_iterator | pred_rbegin () const |
| pred_reverse_iterator | pred_rend () |
| const_pred_reverse_iterator | pred_rend () const |
| unsigned | pred_size () const |
| bool | pred_empty () const |
| succ_iterator | succ_begin () |
| const_succ_iterator | succ_begin () const |
| succ_iterator | succ_end () |
| const_succ_iterator | succ_end () const |
| succ_reverse_iterator | succ_rbegin () |
| const_succ_reverse_iterator | succ_rbegin () const |
| succ_reverse_iterator | succ_rend () |
| const_succ_reverse_iterator | succ_rend () const |
| unsigned | succ_size () const |
| bool | succ_empty () const |
| iterator_range< pred_iterator > | predecessors () |
| iterator_range < const_pred_iterator > | predecessors () const |
| iterator_range< succ_iterator > | successors () |
| iterator_range < const_succ_iterator > | successors () const |
| void | addLiveIn (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_iterator > | liveins_dbg () const |
| livein_iterator | livein_begin () const |
| livein_iterator | livein_end () const |
| bool | livein_empty () const |
| iterator_range< livein_iterator > | liveins () const |
| const uint32_t * | getBeginClobberMask (const TargetRegisterInfo *TRI) const |
| Get the clobber mask for the start of this basic block. More... | |
| const uint32_t * | getEndClobberMask (const TargetRegisterInfo *TRI) const |
| Get the clobber mask for the end of the basic block. More... | |
| 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... | |
| 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... | |
| 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... | |
| MachineBasicBlock * | SplitCriticalEdge (MachineBasicBlock *Succ, Pass &P) |
| Split the critical edge from this block to the given successor block, and return the newly created block, or null if splitting is not possible. More... | |
| bool | canSplitCriticalEdge (const MachineBasicBlock *Succ) const |
Check if the edge between this block and the given successor Succ, can be split. More... | |
| void | pop_front () |
| void | pop_back () |
| void | push_back (MachineInstr *MI) |
| instr_iterator | insert (instr_iterator I, MachineInstr *M) |
| Insert MI into the instruction list before I, possibly inside a bundle. More... | |
| template<typename IT > | |
| void | insert (iterator I, IT S, IT E) |
| Insert a range of instructions into the instruction list before I. More... | |
| iterator | insert (iterator I, MachineInstr *MI) |
| Insert MI into the instruction list before I. More... | |
| iterator | insertAfter (iterator I, MachineInstr *MI) |
| Insert MI into the instruction list after I. More... | |
| instr_iterator | erase (instr_iterator I) |
| Remove an instruction from the instruction list and delete it. More... | |
| instr_iterator | erase_instr (MachineInstr *I) |
| Remove an instruction from the instruction list and delete it. More... | |
| iterator | erase (iterator I, iterator E) |
| Remove a range of instructions from the instruction list and delete them. More... | |
| iterator | erase (iterator I) |
| Remove an instruction or bundle from the instruction list and delete it. More... | |
| iterator | erase (MachineInstr *I) |
| Remove an instruction from the instruction list and delete it. More... | |
| MachineInstr * | remove (MachineInstr *I) |
| Remove the unbundled instruction from the instruction list without deleting it. More... | |
| MachineInstr * | remove_instr (MachineInstr *I) |
| Remove the possibly bundled instruction from the instruction list without deleting it. More... | |
| void | clear () |
| void | splice (iterator Where, MachineBasicBlock *Other, iterator From) |
| Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before 'Where'. More... | |
| void | splice (iterator Where, MachineBasicBlock *Other, iterator From, iterator To) |
| Take a block of instructions from MBB 'Other' in the range [From, To), and insert them into this MBB right before 'Where'. More... | |
| MachineBasicBlock * | removeFromParent () |
| This method unlinks 'this' from the containing function, and returns it, but does not delete it. More... | |
| void | eraseFromParent () |
| This method unlinks 'this' from the containing function and deletes it. More... | |
| void | ReplaceUsesOfBlockWith (MachineBasicBlock *Old, MachineBasicBlock *New) |
| Given a machine basic block that branched to 'Old', change the code and CFG so that it branches to 'New' instead. More... | |
| 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) |
| 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) |
| MCSymbol * | getSymbol () const |
| Return the MCSymbol for this basic block. More... | |
Public Member Functions inherited from llvm::ilist_node_with_parent< MachineBasicBlock, MachineFunction > | |
| MachineBasicBlock * | getPrevNode () |
| const MachineBasicBlock * | getPrevNode () const |
Get the previous node, or nullptr for the list head. More... | |
| MachineBasicBlock * | getNextNode () |
Get the next node, or nullptr for the list tail. More... | |
| const MachineBasicBlock * | getNextNode () const |
Get the next node, or nullptr for the list tail. More... | |
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 > |
Definition at line 56 of file MachineBasicBlock.h.
Definition at line 149 of file MachineBasicBlock.h.
Definition at line 182 of file MachineBasicBlock.h.
Definition at line 154 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_iterator llvm::MachineBasicBlock::const_pred_iterator |
Definition at line 217 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_reverse_iterator llvm::MachineBasicBlock::const_pred_reverse_iterator |
Definition at line 223 of file MachineBasicBlock.h.
Definition at line 151 of file MachineBasicBlock.h.
| typedef MachineInstrBundleIterator<const MachineInstr, true> llvm::MachineBasicBlock::const_reverse_iterator |
Definition at line 157 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_iterator llvm::MachineBasicBlock::const_succ_iterator |
Definition at line 219 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_reverse_iterator llvm::MachineBasicBlock::const_succ_reverse_iterator |
Definition at line 227 of file MachineBasicBlock.h.
Definition at line 148 of file MachineBasicBlock.h.
Definition at line 181 of file MachineBasicBlock.h.
Definition at line 153 of file MachineBasicBlock.h.
| typedef LiveInVector::const_iterator llvm::MachineBasicBlock::livein_iterator |
Definition at line 310 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::iterator llvm::MachineBasicBlock::pred_iterator |
Definition at line 216 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::reverse_iterator llvm::MachineBasicBlock::pred_reverse_iterator |
Definition at line 221 of file MachineBasicBlock.h.
Definition at line 150 of file MachineBasicBlock.h.
Definition at line 155 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::iterator llvm::MachineBasicBlock::succ_iterator |
Definition at line 218 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::reverse_iterator llvm::MachineBasicBlock::succ_reverse_iterator |
Definition at line 225 of file MachineBasicBlock.h.
Possible outcome of a register liveness query to computeRegisterLiveness()
| Enumerator | |
|---|---|
| LQR_Live |
Register is known to be (at least partially) live. |
| LQR_Dead |
Register is known to be fully dead. |
| LQR_Unknown |
Register liveness not decidable from local neighborhood. |
Definition at line 668 of file MachineBasicBlock.h.
|
inline |
Adds the specified register as a live in.
Note that it is an error to add the same register to the same set more than once unless the intention is to call sortUniqueLiveIns after all registers are added.
Definition at line 279 of file MachineBasicBlock.h.
Referenced by addLiveIn(), addLiveInRegs(), addPostLoopLiveIns(), addSavedGPR(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::computeLiveIns(), emitAlignedDPRCS2Spills(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::MachineRegisterInfo::EmitLiveInCopies(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SIFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), emitXBegin(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), SplitCriticalEdge(), and updateLiveness().
|
inline |
Definition at line 283 of file MachineBasicBlock.h.
| unsigned MachineBasicBlock::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.
Return the virtual register that is a copy of the live in PhysReg.
Definition at line 373 of file MachineBasicBlock.cpp.
References addLiveIn(), assert(), begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), E, end(), front(), llvm::MCInstrInfo::get(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, isEHPad(), isLiveIn(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::RegState::Kill, llvm_unreachable, MRI, SkipPHIsAndLabels(), and TII.
| void MachineBasicBlock::addSuccessor | ( | MachineBasicBlock * | Succ, |
| BranchProbability | Prob = BranchProbability::getUnknown() |
||
| ) |
Add Succ as a successor of this MachineBasicBlock.
The Predecessors list of Succ is automatically updated. PROB parameter is stored in Probabilities list. The default probability is set as unknown. Mixing known and unknown probabilities in successor list is not allowed. When all successors have unknown probabilities, 1 / N is returned as the probability for each successor, where N is the number of successors.
Note that duplicate Machine CFG edges are not allowed.
Definition at line 535 of file MachineBasicBlock.cpp.
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::PPCTargetLowering::EmitAtomicBinary(), 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::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitBranch(), llvm::FastISel::finishCondBranch(), loadM0FromVGPR(), PlaceLoopMarker(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), SplitCriticalEdge(), llvm::SITargetLowering::splitKillBlock(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().
| 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 545 of file MachineBasicBlock.cpp.
Referenced by llvm::FastISel::fastEmitBranch(), llvm::FastISel::finishCondBranch(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 168 of file MachineBasicBlock.h.
References end().
Referenced by BBIsJumpedOver(), canFallThrough(), HandleVRSaveUpdate(), llvm::AMDGPUAsmPrinter::isBlockOnlyReachableByFallthrough(), isReturnBlock(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), MaybeRewriteToFallthrough(), ProcessSourceNode(), ProfitableToMerge(), llvm::HexagonInstrInfo::removeBranch(), llvm::TailDuplicator::shouldTailDuplicate(), and llvm::FastISel::startNewBlock().
|
inline |
Definition at line 170 of file MachineBasicBlock.h.
References end().
|
inline |
Definition at line 188 of file MachineBasicBlock.h.
References instr_begin().
Referenced by addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::BPFInstrInfo::analyzeBranch(), llvm::XCoreInstrInfo::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::AArch64InstrInfo::analyzeBranch(), llvm::SystemZInstrInfo::analyzeBranch(), llvm::RegScavenger::backward(), llvm::MachineInstrSpan::begin(), llvm::bothUsedInPHI(), ComputeCommonTailLength(), computeRegisterLiveness(), CountTerminators(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::MachineDominatorTree::dominates(), doScavengeFrameVirtualRegs(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AVRFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::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::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::MachineRegisterInfo::EmitLiveInCopies(), emitLoadM0FromVGPRLoop(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::AVRFrameLowering::emitPrologue(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SIFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::WebAssemblyFrameLowering::emitPrologue(), llvm::LanaiFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::RegScavenger::enterBasicBlockEnd(), llvm::SparcTargetLowering::expandSelectCC(), findFirstPredicateSetterFrom(), findHoistingInsertPosAndDeps(), findIncDecBefore(), findInsertLocation(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::RegScavenger::forward(), llvm::HexagonInstrInfo::genAllInsnTimingClasses(), getFirstEpilogueInst(), getFirstNonDebugInstr(), getFirstTerminator(), llvm::SparcInstrInfo::getGlobalBaseReg(), llvm::ARMHazardRecognizer::getHazardType(), llvm::SlotIndexes::getIndexBefore(), getNextMachineInstr(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), INITIALIZE_PASS(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), insertCSRSpillsAndRestores(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::R600InstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::SplitEditor::leaveIntvAtTop(), llvm::FastISel::leaveLocalValueArea(), loadM0FromVGPR(), LookForIdenticalPHI(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MBBDefinesCTR(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), llvm::X86FrameLowering::mergeSPUpdates(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), PlaceBlockMarker(), PlaceLoopMarker(), PrevCrossBBInst(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), ProcessSourceNode(), ProfitableToMerge(), llvm::RegPressureTracker::recedeSkipDebugValues(), llvm::BPFInstrInfo::removeBranch(), llvm::XCoreInstrInfo::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::AArch64InstrInfo::removeBranch(), llvm::SystemZInstrInfo::removeBranch(), llvm::X86InstrInfo::removeBranch(), removeDebugValues(), RemoveVRSaveCode(), llvm::SlotIndexes::repairIndexesInRange(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), llvm::BitTracker::run(), llvm::InsertNOPLoad::runOnMachineFunction(), llvm::Legalizer::runOnMachineFunction(), llvm::FixFSMULD::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ReplaceFMULS::runOnMachineFunction(), llvm::DetectRoundChange::runOnMachineFunction(), llvm::FixAllFDIVSQRT::runOnMachineFunction(), llvm::AVRDynAllocaSR::runOnMachineFunction(), llvm::RegBankSelect::runOnMachineFunction(), splitBlockAfter(), splitBlockBefore(), llvm::SITargetLowering::splitKillBlock(), llvm::RegScavenger::unprocess(), verifyCTRBranch(), llvm::VerifyPHIs(), and verifySameBranchInstructions().
|
inline |
Definition at line 189 of file MachineBasicBlock.h.
References instr_begin().
| bool MachineBasicBlock::canFallThrough | ( | ) |
Return true if the block can implicitly transfer control to the block after it by falling off the end of it.
This should return false if it can reach the block after it, but it uses an explicit branch to do so (e.g., a table jump). True is a conservative answer.
Definition at line 684 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 llvm::TailDuplicator::shouldTailDuplicate(), and updateTerminator().
| 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 963 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().
|
inline |
Definition at line 614 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::clear().
| void MachineBasicBlock::clearLiveIns | ( | ) |
Clear live in list.
Definition at line 1292 of file MachineBasicBlock.cpp.
| 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 1205 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 llvm::X86InstrInfo::copyPhysReg(), getImplicitSPRUseForDPRUse(), and llvm::tryFoldSPUpdateIntoPushPop().
| 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 1081 of file MachineBasicBlock.cpp.
References assert(), llvm::ilist_node_with_parent< MachineBasicBlock, MachineFunction >::getNextNode(), llvm::SmallPtrSetImpl< PtrType >::insert(), isEHPad(), MBB, normalizeSuccProbs(), removeSuccessor(), SI, succ_begin(), and succ_end().
Referenced by llvm::BranchFolder::OptimizeFunction().
| LLVM_DUMP_METHOD void MachineBasicBlock::dump | ( | ) | const |
Definition at line 219 of file MachineBasicBlock.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 160 of file MachineBasicBlock.h.
Referenced by llvm::bothUsedInPHI(), canFallThrough(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::findPHICopyInsertPoint(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::SIInstrInfo::insertIndirectBranch(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AMDGPUAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), isReturnBlock(), LookForIdenticalPHI(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::TailDuplicator::shouldTailDuplicate(), and llvm::FastISel::startNewBlock().
|
inline |
Definition at line 190 of file MachineBasicBlock.h.
References instr_end().
Referenced by addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::RegPressureTracker::advance(), llvm::BPFInstrInfo::analyzeBranch(), llvm::XCoreInstrInfo::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::AArch64InstrInfo::analyzeBranch(), llvm::SystemZInstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranch(), llvm::SIInstrInfo::analyzeBranchImpl(), llvm::HexagonInstrInfo::analyzeLoop(), back(), llvm::MachineInstrSpan::begin(), llvm::BuildMI(), canFallThrough(), checkAndUpdateEFLAGSKill(), collectDebugValues(), ComputeCommonTailLength(), computeRegisterLiveness(), llvm::X86InstrInfo::copyPhysReg(), CountTerminators(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), doScavengeFrameVirtualRegs(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::SparcTargetLowering::emitEHSjLjSetJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::Thumb1FrameLowering::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::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::AVRFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::RegScavenger::enterBasicBlockEnd(), llvm::ScheduleDAGMILive::enterRegion(), llvm::SparcTargetLowering::expandSelectCC(), findDeadCallerSavedReg(), findHoistingInsertPosAndDeps(), findIncDecAfter(), findIncDecBefore(), FindLastAluClause(), llvm::findPHICopyInsertPoint(), llvm::fixStackStores(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::RegScavenger::forward(), getBranchDebugLoc(), llvm::RegPressureTracker::getCurrSlot(), getFirstEpilogueInst(), getFirstNonDebugInstr(), getFirstTerminator(), llvm::getFuncletMembership(), llvm::SlotIndexes::getIndexAfter(), llvm::InsertPointAnalysis::getLastInsertPointIter(), getLastNonDebugInstr(), getNextMachineInstr(), llvm::X86InstrInfo::getSPAdjust(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), HashEndOfMBB(), hasReturn(), hasTerminatorThatModifiesExec(), llvm::HexagonInstrInfo::hasUncondBranch(), INITIALIZE_PASS(), insert(), insertAfter(), llvm::HexagonInstrInfo::insertBranch(), llvm::R600InstrInfo::insertBranch(), insertCSRSpillsAndRestores(), llvm::SIInstrInfo::insertIndirectBranch(), IsBetterFallthrough(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), IsBranchOnlyBlock(), IsEmptyBlock(), llvm::Thumb2InstrInfo::isLegalToSplitMBBAt(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), llvm::TailDuplicator::isSimpleBB(), llvm::XCoreInstrInfo::loadImmediate(), llvm::SystemZInstrInfo::loadImmediate(), loadM0FromVGPR(), llvm::Mips16InstrInfo::loadRegFromStack(), llvm::MipsSEInstrInfo::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::AArch64InstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::SystemZInstrInfo::loadRegFromStackSlot(), LookForIdenticalPHI(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MBBDefinesCTR(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), mergeOperations(), llvm::X86FrameLowering::mergeSPUpdates(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), PlaceBlockMarker(), PlaceLoopMarker(), PrevCrossBBInst(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::FastISel::recomputeInsertPt(), llvm::BPFInstrInfo::removeBranch(), llvm::XCoreInstrInfo::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::AArch64InstrInfo::removeBranch(), llvm::SystemZInstrInfo::removeBranch(), llvm::SIInstrInfo::removeBranch(), llvm::X86InstrInfo::removeBranch(), removeDebugValues(), RemoveVRSaveCode(), llvm::SlotIndexes::repairIndexesInRange(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::SystemZFrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::Mips16InstrInfo::restoreFrame(), llvm::BitTracker::run(), llvm::InsertNOPLoad::runOnMachineFunction(), llvm::Legalizer::runOnMachineFunction(), llvm::FixFSMULD::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ReplaceFMULS::runOnMachineFunction(), llvm::DetectRoundChange::runOnMachineFunction(), llvm::FixAllFDIVSQRT::runOnMachineFunction(), llvm::RegBankSelect::runOnMachineFunction(), llvm::MachineIRBuilder::setMBB(), SkipPHIsAndLabels(), SkipPHIsLabelsAndDebug(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), 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::AArch64InstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::SystemZInstrInfo::storeRegToStackSlot(), terminators(), llvm::ScheduleDAGMILive::updatePressureDiffs(), verifyCTRBranch(), llvm::VerifyPHIs(), and verifySameBranchInstructions().
|
inline |
Definition at line 191 of file MachineBasicBlock.h.
References instr_end().
| instr_iterator llvm::MachineBasicBlock::erase | ( | instr_iterator | I | ) |
Remove an instruction from the instruction list and delete it.
If the instruction is part of a bundle, the other instructions in the bundle will still be bundled after removing the single instruction.
Referenced by convertCalleeSaveRestoreToSPPrePostIncDec(), llvm::NVPTXFrameLowering::eliminateCallFramePseudoInstr(), llvm::AArch64FrameLowering::eliminateCallFramePseudoInstr(), llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::BPFFrameLowering::eliminateCallFramePseudoInstr(), llvm::WebAssemblyFrameLowering::eliminateCallFramePseudoInstr(), llvm::MipsFrameLowering::eliminateCallFramePseudoInstr(), llvm::AVRFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::LanaiFrameLowering::eliminateCallFramePseudoInstr(), llvm::SystemZFrameLowering::eliminateCallFramePseudoInstr(), llvm::HexagonFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), erase(), erase_instr(), llvm::Mips16InstrInfo::expandPostRAPseudo(), llvm::MipsSEInstrInfo::expandPostRAPseudo(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::R600InstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), INITIALIZE_PASS(), 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(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::MipsInstrInfo::removeBranch(), llvm::HexagonInstrInfo::removeBranch(), removeDebugValues(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), and llvm::ThumbRegisterInfo::rewriteFrameIndex().
Remove a range of instructions from the instruction list and delete them.
Definition at line 578 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), and llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator().
Remove an instruction or bundle from the instruction list and delete it.
If I points to a bundle of instructions, they are all erased.
Definition at line 585 of file MachineBasicBlock.h.
References erase().
|
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 593 of file MachineBasicBlock.h.
References erase().
|
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 573 of file MachineBasicBlock.h.
References erase().
| 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 1046 of file MachineBasicBlock.cpp.
References assert(), llvm::MachineFunction::erase(), and getParent().
Referenced by llvm::SystemZInstrInfo::analyzeBranch().
| DebugLoc llvm::MachineBasicBlock::findDebugLoc | ( | instr_iterator | MBBI | ) |
Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE instructions.
Return UnknownLoc if there is none.
Referenced by llvm::AVRInstrInfo::analyzeBranch(), llvm::R600InstrInfo::buildDefaultInstruction(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), emitGPDisp(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::X86FrameLowering::emitSPUpdate(), llvm::SIInstrInfo::expandPostRAPseudo(), findDebugLoc(), llvm::SIInstrInfo::insertWaitStates(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::X86FrameLowering::processFunctionBeforeFrameFinalized(), llvm::AVRFrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::AVRDynAllocaSR::runOnMachineFunction(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), and llvm::X86InstrInfo::storeRegToStackSlot().
Definition at line 663 of file MachineBasicBlock.h.
References findDebugLoc(), and llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator().
|
inline |
Definition at line 167 of file MachineBasicBlock.h.
Referenced by addLiveIn(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::NVPTXFrameLowering::emitPrologue(), insertNopBeforeInstruction(), and SortBlocks().
|
inline |
Definition at line 169 of file MachineBasicBlock.h.
|
inline |
Return alignment of the basic block.
The alignment is specified as log2(bytes).
Definition at line 338 of file MachineBasicBlock.h.
Referenced by llvm::WinException::beginFunclet(), llvm::AsmPrinter::EmitBasicBlockStart(), and llvm::MIPrinter::print().
|
inline |
Return the LLVM basic block that this instance corresponded to originally.
Note that this may be NULL if this instance does not correspond directly to an LLVM basic block.
Definition at line 129 of file MachineBasicBlock.h.
Referenced by llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::AsmPrinter::EmitBasicBlockStart(), emitBlockAfter(), llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), 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::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitBranch(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::FastISel::finishCondBranch(), getBranchHint(), getFullName(), getName(), llvm::DOTGraphTraits< const MachineFunction * >::getNodeLabel(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::MIPrinter::print(), print(), llvm::MIPrinter::printMBBReference(), and llvm::SITargetLowering::splitKillBlock().
| 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 1279 of file MachineBasicBlock.cpp.
References llvm::TargetRegisterInfo::getNoPreservedMask(), and isEHFuncletEntry().
| const uint32_t * MachineBasicBlock::getEndClobberMask | ( | const TargetRegisterInfo * | TRI | ) | const |
Get the clobber mask for the end of the basic block.
Definition at line 1285 of file MachineBasicBlock.cpp.
References llvm::TargetRegisterInfo::getNoPreservedMask(), isReturnBlock(), and succ_empty().
| MachineBasicBlock::instr_iterator MachineBasicBlock::getFirstInstrTerminator | ( | ) |
Same getFirstTerminator but it ignores bundles and return an instr_iterator instead.
Definition at line 183 of file MachineBasicBlock.cpp.
References B, E, I, instr_begin(), and instr_end().
Referenced by SplitCriticalEdge().
| MachineBasicBlock::iterator MachineBasicBlock::getFirstNonDebugInstr | ( | ) |
Returns an iterator to the first non-debug instruction in the basic block, or end().
Definition at line 192 of file MachineBasicBlock.cpp.
References begin(), end(), and llvm::skipDebugInstructionsForward().
Referenced by getFirstNonDebugInstr(), IsBranchOnlyBlock(), IsEmptyBlock(), and llvm::TailDuplicator::isSimpleBB().
|
inline |
Definition at line 495 of file MachineBasicBlock.h.
References getFirstNonDebugInstr().
| MachineBasicBlock::iterator MachineBasicBlock::getFirstNonPHI | ( | ) |
Returns a pointer to the first instruction in this block that is not a PHINode instruction.
When adding instructions to the beginning of the basic block, they should be added before the returned value, not before the first instruction, which might be PHI. Returns end() is there's no non-PHI instruction.
Definition at line 140 of file MachineBasicBlock.cpp.
References assert(), E, I, instr_begin(), and instr_end().
Referenced by createSwiftErrorEntriesInEntryBlock(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), propagateSwiftErrorVRegs(), llvm::FastISel::recomputeInsertPt(), and llvm::RegBankSelect::RepairingPlacement::RepairingPlacement().
| 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 174 of file MachineBasicBlock.cpp.
References B, begin(), E, end(), and I.
Referenced by llvm::SIInstrInfo::analyzeBranch(), llvm::HexagonInstrInfo::analyzeLoop(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::WebAssemblyFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), findHoistingInsertPosAndDeps(), findInsertLocation(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), getFirstTerminator(), llvm::getFuncletMembership(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), hasReturn(), hasTerminatorThatModifiesExec(), llvm::HexagonInstrInfo::hasUncondBranch(), llvm::HexagonInstrInfo::insertBranch(), llvm::SIInstrInfo::legalizeOperands(), llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint(), PlaceBlockMarker(), llvm::SIInstrInfo::removeBranch(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::SelectionDAGISel::runOnMachineFunction(), SplitCriticalEdge(), and terminators().
|
inline |
Definition at line 484 of file MachineBasicBlock.h.
References getFirstTerminator().
| 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 232 of file MachineBasicBlock.cpp.
References getBasicBlock(), llvm::Value::getName(), llvm::MachineFunction::getName(), getNumber(), and getParent().
Referenced by llvm::ScheduleDAGSDNodes::getDAGName(), and verifyCTRBranch().
| MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr | ( | ) |
Returns an iterator to the last non-debug instruction in the basic block, or end().
Definition at line 197 of file MachineBasicBlock.cpp.
References B, end(), I, instr_begin(), and instr_end().
Referenced by llvm::XCoreInstrInfo::analyzeBranch(), llvm::SparcInstrInfo::analyzeBranch(), llvm::R600InstrInfo::analyzeBranch(), llvm::PPCInstrInfo::analyzeBranch(), llvm::AArch64InstrInfo::analyzeBranch(), llvm::AVRFrameLowering::emitEpilogue(), llvm::Mips16FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::SparcFrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::LanaiFrameLowering::emitEpilogue(), llvm::SystemZFrameLowering::emitEpilogue(), getBranchDebugLoc(), getFirstEpilogueInst(), getLastNonDebugInstr(), HashEndOfMBB(), hasTailCall(), IsBetterFallthrough(), llvm::SystemZInstrInfo::isProfitableToIfCvt(), llvm::XCoreInstrInfo::removeBranch(), llvm::ARMBaseInstrInfo::removeBranch(), llvm::PPCInstrInfo::removeBranch(), llvm::AArch64InstrInfo::removeBranch(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), and verifyCTRBranch().
|
inline |
Definition at line 502 of file MachineBasicBlock.h.
References getLastNonDebugInstr().
| StringRef MachineBasicBlock::getName | ( | ) | const |
Return the name of the corresponding LLVM basic block, or "(null)".
Definition at line 224 of file MachineBasicBlock.cpp.
References getBasicBlock().
Referenced by getBlockName(), and llvm::VLIWMachineScheduler::schedule().
|
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 698 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::addNewBlock(), llvm::HexagonInstrInfo::analyzeBranch(), canSplitCriticalEdge(), llvm::LiveIntervals::checkRegMaskInterference(), CompareMBBNumbers(), llvm::computeAllBlockSizes(), llvm::HexagonInstrInfo::copyPhysReg(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::SplitEditor::enterIntvAtEnd(), llvm::ScheduleDAGInstrs::fixupKills(), getBlockName(), llvm::MachineTraceMetrics::Ensemble::getDepthResources(), getFullName(), llvm::getFuncletMembership(), llvm::MachineTraceMetrics::Ensemble::getHeightResources(), llvm::MachineTraceMetrics::Trace::getInstrSlack(), llvm::InsertPointAnalysis::getLastInsertPoint(), llvm::SlotIndexes::getMBBRange(), getMCSymbolForMBB(), llvm::DOTGraphTraits< const MachineFunction * >::getNodeLabel(), llvm::MachineTraceMetrics::Trace::getResourceLength(), llvm::MachineTraceMetrics::getResources(), getSymbol(), llvm::MachineTraceMetrics::Ensemble::getTrace(), llvm::LiveVariables::HandleVirtRegUse(), HashMachineInstr(), llvm::HexagonInstrInfo::insertBranch(), llvm::po_iterator_storage< LoopBounds, true >::insertEdge(), llvm::LiveIntervals::insertMBBInMaps(), llvm::SlotIndexes::insertMBBInMaps(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::MachineTraceMetrics::invalidate(), llvm::HexagonInstrInfo::invertAndChangeJumpTarget(), llvm::MachineTraceMetrics::Trace::isDepInTrace(), isIrreducibleCFG(), llvm::LiveVariables::VarInfo::isLiveIn(), llvm::LiveVariables::isLiveOut(), llvm::SplitEditor::leaveIntvAtTop(), LoopBottom(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), llvm::MBB2NumberFunctor::operator()(), llvm::rdf::operator<<(), PlaceBlockMarker(), PlaceLoopMarker(), PlaceMarkers(), llvm::MIPrinter::print(), llvm::MachineTraceMetrics::Trace::print(), llvm::ARMConstantPoolMBB::print(), print(), printAsOperand(), llvm::MachineBranchProbabilityInfo::printEdgeProbability(), llvm::MIPrinter::printMBBReference(), ProfitableToMerge(), llvm::rdf::DataFlowGraph::pushDefs(), llvm::BitTracker::reached(), llvm::HexagonInstrInfo::removeBranch(), llvm::BitTracker::run(), llvm::VLIWMachineScheduler::schedule(), llvm::LiveRangeCalc::setLiveOutValue(), SortBlocks(), SplitCriticalEdge(), llvm::SplitEditor::splitRegInBlock(), llvm::SplitEditor::splitRegOutBlock(), llvm::SplitEditor::splitSingleBlock(), llvm::MachineTraceMetrics::Ensemble::verify(), verifyCTRBranch(), llvm::VerifyPHIs(), and llvm::WriteGraph().
|
inline |
Return the MachineFunction containing this basic block.
Definition at line 145 of file MachineBasicBlock.h.
Referenced by llvm::addFrameReference(), llvm::addLandingPadInfo(), addLiveIn(), addLiveInRegs(), llvm::LivePhysRegs::addLiveIns(), llvm::LivePhysRegs::addLiveOuts(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::AddPHIOperand(), addSavedGPR(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), attachMEMCPYScratchRegs(), BBHasFallthrough(), llvm::DwarfCFIException::beginFragment(), llvm::X86FrameLowering::BuildCFI(), llvm::BuildMI(), llvm::SIInstrInfo::calculateLDSSpillAddress(), canCombine(), canFallThrough(), canFallThroughTo(), canFoldCopy(), llvm::PPCInstrInfo::canInsertSelect(), llvm::AArch64InstrInfo::canInsertSelect(), llvm::SystemZInstrInfo::canInsertSelect(), llvm::X86InstrInfo::canInsertSelect(), cannotCoexistAsymm(), canSplitCriticalEdge(), llvm::Thumb1FrameLowering::canUseAsEpilogue(), llvm::X86FrameLowering::canUseAsEpilogue(), llvm::AArch64FrameLowering::canUseAsPrologue(), llvm::X86FrameLowering::canUseAsPrologue(), llvm::MachineOperand::ChangeToRegister(), llvm::X86InstrInfo::classifyLEAReg(), CombineCVTAToLocal(), llvm::WebAssemblyInstrInfo::commuteInstructionImpl(), llvm::PPCInstrInfo::commuteInstructionImpl(), llvm::TargetInstrInfo::commuteInstructionImpl(), llvm::SystemZInstrInfo::commuteInstructionImpl(), llvm::X86InstrInfo::commuteInstructionImpl(), llvm::HexagonBlockRanges::computeDeadMap(), llvm::TargetSchedModel::computeOutputLatency(), llvm::InstructionSelector::constrainSelectedInstRegOperands(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::WebAssemblyInstrInfo::copyPhysReg(), llvm::Thumb1InstrInfo::copyPhysReg(), llvm::NVPTXInstrInfo::copyPhysReg(), llvm::AVRInstrInfo::copyPhysReg(), llvm::MachineFunction::DeleteMachineBasicBlock(), doesModifyCalleeSavedReg(), llvm::LexicalScopes::dominates(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::WebAssemblyRegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::LanaiRegisterInfo::eliminateFrameIndex(), llvm::AVRRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::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(), emitComments(), 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::AMDGPUAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::AVRTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ThumbRegisterInfo::emitLoadConstPool(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), emitThumbRegPlusImmInReg(), emitXBegin(), eraseFromParent(), llvm::MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval(), eraseGPOpnd(), expandLoadStackGuard(), ExpandMOVImmSExti8(), llvm::SparcInstrInfo::expandPostRAPseudo(), llvm::SIInstrInfo::expandPostRAPseudo(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), llvm::PPCInstrInfo::expandPostRAPseudo(), llvm::X86InstrInfo::expandPostRAPseudo(), llvm::SparcTargetLowering::expandSelectCC(), findDeadCallerSavedReg(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::findPHICopyInsertPoint(), findScratchNonCalleeSaveRegister(), llvm::fixStackStores(), FixTail(), llvm::SIInstrInfo::FoldImmediate(), llvm::TargetInstrInfo::foldMemoryOperand(), forceReg(), llvm::RegScavenger::forward(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::TargetInstrInfo::genAlternativeCodeSequence(), getBBFallenThrough(), llvm::MachineLoop::getBottomBlock(), getConstantFromPool(), getFrameIndexMMO(), getFullName(), llvm::ARMHazardRecognizer::getHazardType(), llvm::HexagonHazardRecognizer::getHazardType(), llvm::AArch64RegisterBankInfo::getInstrAlternativeMappings(), llvm::AArch64RegisterBankInfo::getInstrMapping(), llvm::RegisterBankInfo::getInstrMappingImpl(), llvm::HexagonInstrInfo::getInstrTimingClassLatency(), llvm::AArch64InstrInfo::getInstSizeInBytes(), llvm::MSP430InstrInfo::getInstSizeInBytes(), llvm::AVRInstrInfo::getInstSizeInBytes(), llvm::MipsInstrInfo::getInstSizeInBytes(), llvm::ARMBaseInstrInfo::getInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), llvm::PPCInstrInfo::getInstSizeInBytes(), llvm::SIInstrInfo::getInstSizeInBytes(), getLayoutSuccessorProbThreshold(), getLoadStoreOffsetSizeInBits(), llvm::PPCInstrInfo::getMachineCombinerPatterns(), getMCSymbolForMBB(), llvm::MipsInstrInfo::GetMemOperand(), getNextBlock(), llvm::PPCInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpRegClass(), llvm::HexagonInstrInfo::getSize(), llvm::TargetInstrInfo::getSPAdjust(), llvm::X86InstrInfo::getSPAdjust(), getSymbol(), GetSymbolRef(), llvm::MachineLoop::getTopBlock(), llvm::HexagonInstrInfo::getUnits(), HandleVRSaveUpdate(), llvm::TargetInstrInfo::hasReassociableOperands(), llvm::TargetInstrInfo::hasReassociableSibling(), hasVGPROperands(), llvm::AArch64TargetLowering::initializeSplitCSR(), llvm::PPCTargetLowering::initializeSplitCSR(), llvm::ARMBaseInstrInfo::insertBranch(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), llvm::PPCTargetLowering::insertCopiesSplitCSR(), llvm::SIInstrInfo::insertIndirectBranch(), llvm::SlotIndexes::insertMBBInMaps(), llvm::PPCInstrInfo::insertSelect(), llvm::AArch64InstrInfo::insertSelect(), llvm::SystemZInstrInfo::insertSelect(), llvm::X86InstrInfo::insertSelect(), llvm::AArch64InstrInfo::isAssociativeAndCommutative(), llvm::X86InstrInfo::isAssociativeAndCommutative(), isCombineInstrCandidateFP(), llvm::HexagonInstrInfo::isComplex(), isCVTAToLocalCombinationCandidate(), isNoReturnDef(), llvm::SIInstrInfo::isOperandLegal(), llvm::ARMBaseInstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::VLIWResourceModel::isResourceAvailable(), llvm::SystemZInstrInfo::isStackSlotCopy(), 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::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::AMDGPUMCInstLower::lower(), llvm::WebAssemblyMCInstLower::Lower(), 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::Mips16InstrInfo::makeFrame(), llvm::SIRegisterInfo::materializeFrameBaseRegister(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), llvm::HexagonInstrInfo::mayBeCurLoad(), MIsNeedChainEdge(), moveAfter(), moveBefore(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64RegisterInfo::needsFrameBaseReg(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), PrevCrossBBInst(), llvm::MIPrinter::print(), print(), llvm::MachineInstr::print(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MIPrinter::printTargetFlags(), llvm::ARMBaseInstrInfo::produceSameValue(), ProfitableToMerge(), llvm::TargetInstrInfo::reassociateOps(), llvm::AsmPrinter::recordSled(), llvm::HexagonInstrInfo::reduceLoopCount(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), removeFromParent(), RemoveVRSaveCode(), ReplaceDominatedUses(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), reportSelectionError(), llvm::ThumbRegisterInfo::resolveFrameIndex(), llvm::SIRegisterInfo::resolveFrameIndex(), llvm::AArch64RegisterInfo::resolveFrameIndex(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::ARMBaseRegisterInfo::resolveFrameIndex(), llvm::AVRFrameLowering::restoreCalleeSavedRegisters(), llvm::SystemZFrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(), llvm::ARMFrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::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::scavengeRegister(), llvm::VLIWMachineScheduler::schedule(), llvm::ARMInstructionSelector::select(), llvm::AArch64InstructionSelector::select(), setCallTargetReg(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineOperand::setIsDef(), llvm::MachineIRBuilder::setMBB(), llvm::MachineOperand::setReg(), llvm::CoalescerPair::setRegisters(), llvm::SIInstrInfo::shouldClusterMemOps(), llvm::ARMBaseRegisterInfo::shouldCoalesce(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::ARMFrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), llvm::SIRegisterInfo::spillSGPR(), SplitCriticalEdge(), llvm::SITargetLowering::splitKillBlock(), llvm::MipsSEInstrInfo::storeRegToStack(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::X86InstrInfo::storeRegToStackSlot(), tryOptimizeLEAtoMOV(), UpdateOperandRegClass(), UpdatePredRedefs(), updateTerminator(), llvm::R600InstrInfo::usesTextureCache(), llvm::R600InstrInfo::usesVertexCache(), llvm::RegisterBankInfo::InstructionMapping::verify(), verifyCTRBranch(), llvm::MachineDominatorTree::verifyDomTree(), llvm::SIInstrInfo::verifyInstruction(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().
|
inline |
Definition at line 146 of file MachineBasicBlock.h.
|
inlinestatic |
Support for MachineInstr::getNextNode().
Definition at line 204 of file MachineBasicBlock.h.
| MCSymbol * MachineBasicBlock::getSymbol | ( | ) | const |
Return the MCSymbol for this basic block.
Definition at line 50 of file MachineBasicBlock.cpp.
References assert(), llvm::MCContext::getAsmInfo(), llvm::MachineFunction::getContext(), llvm::MachineFunction::getFunctionNumber(), getNumber(), llvm::MCContext::getOrCreateSymbol(), getParent(), llvm::MCAsmInfo::getPrivateLabelPrefix(), and llvm::cl::Prefix.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart(), EmitGCCInlineAsmStr(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitJumpTableAddrs(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::ARMAsmPrinter::EmitJumpTableInsts(), llvm::ARMAsmPrinter::EmitJumpTableTBInst(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::SystemZMCInstLower::getExpr(), llvm::HexagonLowerToMC(), llvm::MSP430MCInstLower::Lower(), llvm::LanaiMCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::X86TargetLowering::LowerCustomJumpTableEntry(), llvm::AMDGPUMCInstLower::lowerOperand(), llvm::AArch64MCInstLower::lowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineInstrToMCInst(), LowerSymbolOperand(), llvm::AVRAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), and llvm::MipsAsmPrinter::printOperand().
|
inline |
Test whether this block is potentially the target of an indirect branch.
Definition at line 138 of file MachineBasicBlock.h.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart(), llvm::MachineLoopInfo::findLoopPreheader(), llvm::HexagonAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::MIPrinter::print(), print(), and llvm::TailDuplicator::tailDuplicateAndUpdate().
| bool MachineBasicBlock::hasEHPadSuccessor | ( | ) | const |
Definition at line 211 of file MachineBasicBlock.cpp.
References E, I, succ_begin(), and succ_end().
|
inline |
Return true if any of the successors have probabilities attached to them.
Definition at line 443 of file MachineBasicBlock.h.
Referenced by llvm::MIPrinter::print().
| instr_iterator llvm::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.
Referenced by llvm::MachineIRBuilder::buildExtract(), llvm::BuildMI(), CombineCVTAToLocal(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::X86FrameLowering::emitPrologue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::TargetInstrInfo::foldMemoryOperand(), FuseInst(), FuseTwoAddrInst(), llvm::RegBankSelect::InsertPoint::insert(), llvm::MIBundleBuilder::insert(), llvm::MachineIRBuilder::insertInstr(), llvm::PPCInstrInfo::loadRegFromStackSlot(), moveInstsAfter(), llvm::X86InstrInfo::optimizeCompareInstr(), ProcessSDDbgValues(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), restoreCRs(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), and llvm::PPCInstrInfo::storeRegToStackSlot().
Insert a range of instructions into the instruction list before I.
Definition at line 539 of file MachineBasicBlock.h.
References assert(), E, end(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insert().
|
inline |
Insert MI into the instruction list before I.
Definition at line 546 of file MachineBasicBlock.h.
References assert(), end(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), llvm::iplist_impl< IntrusiveListT, TraitsT >::insert(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and MI.
|
inline |
Insert MI into the instruction list after I.
Definition at line 555 of file MachineBasicBlock.h.
References assert(), end(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), llvm::iplist_impl< IntrusiveListT, TraitsT >::insertAfter(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and MI.
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
|
inline |
Definition at line 163 of file MachineBasicBlock.h.
|
inline |
Definition at line 165 of file MachineBasicBlock.h.
|
inline |
Definition at line 172 of file MachineBasicBlock.h.
Referenced by llvm::HexagonInstrInfo::analyzeBranch(), begin(), llvm::finalizeBundles(), llvm::HexagonInstrInfo::getBranchingInstrs(), getFirstInstrTerminator(), llvm::HexagonInstrInfo::getFirstNonDbgInst(), getFirstNonPHI(), getLastNonDebugInstr(), INITIALIZE_PASS(), instrs(), llvm::HexagonInstrInfo::nonDbgBBSize(), llvm::MIPrinter::print(), llvm::WebAssemblyInstrInfo::removeBranch(), ReplaceUsesOfBlockWith(), SplitCriticalEdge(), and transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 173 of file MachineBasicBlock.h.
|
inline |
Definition at line 174 of file MachineBasicBlock.h.
Referenced by llvm::HexagonInstrInfo::analyzeBranch(), canInstrSubstituteCmpInstr(), llvm::HexagonAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::AMDGPUAsmPrinter::EmitInstruction(), end(), llvm::finalizeBundles(), findCFILocation(), llvm::HexagonInstrInfo::getBranchingInstrs(), getBundledUseMI(), getFirstInstrTerminator(), llvm::HexagonInstrInfo::getFirstNonDbgInst(), getFirstNonPHI(), getLastNonDebugInstr(), INITIALIZE_PASS(), instrs(), llvm::ARMBaseInstrInfo::isPredicated(), llvm::MachineOperandIteratorBase::MachineOperandIteratorBase(), moveInstrOut(), llvm::HexagonInstrInfo::nonDbgBBSize(), llvm::MIPrinter::print(), llvm::WebAssemblyInstrInfo::removeBranch(), ReplaceUsesOfBlockWith(), SplitCriticalEdge(), and transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 175 of file MachineBasicBlock.h.
|
inline |
Definition at line 162 of file MachineBasicBlock.h.
|
inline |
Definition at line 164 of file MachineBasicBlock.h.
|
inline |
Definition at line 176 of file MachineBasicBlock.h.
Referenced by rbegin().
|
inline |
Definition at line 177 of file MachineBasicBlock.h.
|
inline |
Definition at line 178 of file MachineBasicBlock.h.
Referenced by rend().
|
inline |
Definition at line 179 of file MachineBasicBlock.h.
|
inline |
Definition at line 183 of file MachineBasicBlock.h.
References instr_begin(), and instr_end().
Referenced by print(), and SplitCriticalEdge().
|
inline |
Definition at line 184 of file MachineBasicBlock.h.
References instr_begin(), and instr_end().
|
inline |
Returns true if this is the entry block of a cleanup funclet.
Definition at line 361 of file MachineBasicBlock.h.
Referenced by llvm::WinException::beginFunclet(), llvm::X86FrameLowering::emitPrologue(), llvm::WinException::endFunclet(), and getMCSymbolForMBB().
|
inline |
Returns true if this is the entry block of an EH funclet.
Definition at line 355 of file MachineBasicBlock.h.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart(), llvm::X86FrameLowering::emitPrologue(), llvm::WinException::endFunclet(), getBeginClobberMask(), llvm::getFuncletMembership(), getMCSymbolForMBB(), and llvm::X86FrameLowering::spillCalleeSavedRegisters().
|
inline |
Returns true if the block is a landing pad.
That is this basic block is entered via an exception handler.
Definition at line 346 of file MachineBasicBlock.h.
Referenced by addLiveIn(), llvm::rdf::DataFlowGraph::build(), canSplitCriticalEdge(), collectFuncletMembers(), CorrectExtraCFGEdges(), llvm::findPHICopyInsertPoint(), llvm::getFuncletMembership(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::MIPrinter::print(), and print().
| bool MachineBasicBlock::isLayoutSuccessor | ( | const MachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB will be emitted immediately after this block, such that if this block exits by falling through, control will transfer to the specified MBB.
Note that MBB need not be a successor at all, for example if this block ends with an unconditional branch to some other block.
Definition at line 679 of file MachineBasicBlock.cpp.
References I.
Referenced by llvm::BPFInstrInfo::analyzeBranch(), llvm::MSP430InstrInfo::analyzeBranch(), llvm::LanaiInstrInfo::analyzeBranch(), llvm::HexagonInstrInfo::analyzeBranch(), llvm::AVRInstrInfo::analyzeBranch(), llvm::SystemZInstrInfo::analyzeBranch(), llvm::FastISel::fastEmitBranch(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), ProfitableToMerge(), SplitCriticalEdge(), and updateTerminator().
| bool MachineBasicBlock::isLiveIn | ( | MCPhysReg | Reg, |
| LaneBitmask | LaneMask = LaneBitmask::getAll() |
||
| ) | const |
Return true if the specified register is in the live in set.
Definition at line 346 of file MachineBasicBlock.cpp.
References llvm::find_if(), I, livein_end(), and llvm::MachineBasicBlock::RegisterMaskPair::PhysReg.
Referenced by addLiveIn(), addLiveInRegs(), addSavedGPR(), AnyAliasLiveIn(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::X86FrameLowering::canUseAsPrologue(), checkAndUpdateEFLAGSKill(), computeRegisterLiveness(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::AVRFrameLowering::spillCalleeSavedRegisters(), and updateLiveness().
| bool MachineBasicBlock::isPredecessor | ( | const MachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB is a predecessor of this block.
Definition at line 671 of file MachineBasicBlock.cpp.
References llvm::is_contained(), and predecessors().
Referenced by llvm::MachineTraceMetrics::Ensemble::invalidate(), and llvm::MachineTraceMetrics::Ensemble::verify().
|
inline |
Convenience function that returns true if the block ends in a return instruction.
Definition at line 508 of file MachineBasicBlock.h.
References back(), empty(), and llvm::MachineInstr::isReturn().
Referenced by llvm::LivePhysRegs::addLiveOuts(), llvm::X86FrameLowering::canUseAsEpilogue(), collectFuncletMembers(), getEndClobberMask(), HandleVRSaveUpdate(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), llvm::CriticalAntiDepBreaker::StartBlock(), and llvm::AggressiveAntiDepBreaker::StartBlock().
| bool MachineBasicBlock::isSuccessor | ( | const MachineBasicBlock * | MBB | ) | const |
Return true if the specified MBB is a successor of this block.
Definition at line 675 of file MachineBasicBlock.cpp.
References llvm::is_contained(), and successors().
Referenced by canFallThrough(), llvm::ScheduleDAGMILive::computeCyclicCriticalPath(), getLayoutSuccessorProbThreshold(), getNextMachineInstr(), llvm::MachineTraceMetrics::Ensemble::invalidate(), IsBetterFallthrough(), llvm::BitTracker::run(), llvm::TailDuplicator::shouldTailDuplicate(), and llvm::MachineTraceMetrics::Ensemble::verify().
| MachineBasicBlock::livein_iterator MachineBasicBlock::livein_begin | ( | ) | const |
Definition at line 1296 of file MachineBasicBlock.cpp.
References assert(), getParent(), and llvm::MachineFunctionProperties::TracksLiveness.
Referenced by liveins().
|
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 316 of file MachineBasicBlock.h.
Referenced by liveins_dbg().
|
inline |
Definition at line 323 of file MachineBasicBlock.h.
Referenced by llvm::computeLiveIns(), llvm::MIPrinter::print(), and print().
|
inline |
Definition at line 322 of file MachineBasicBlock.h.
Referenced by isLiveIn(), liveins(), and liveins_dbg().
|
inline |
Definition at line 324 of file MachineBasicBlock.h.
References livein_begin(), livein_end(), and llvm::make_range().
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), isEAXLiveIn(), llvm::MIPrinter::print(), llvm::rdf::Liveness::resetKills(), and SplitCriticalEdge().
|
inline |
Definition at line 317 of file MachineBasicBlock.h.
References livein_begin_dbg(), livein_end(), and llvm::make_range().
| void MachineBasicBlock::moveAfter | ( | MachineBasicBlock * | NewBefore | ) |
Definition at line 408 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 SortBlocks().
| void MachineBasicBlock::moveBefore | ( | MachineBasicBlock * | NewAfter | ) |
Move 'this' block before or after the specified block.
This only moves the block, it does not modify the CFG or adjust potential fall-throughs at the end of the block.
Definition at line 404 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().
|
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 407 of file MachineBasicBlock.h.
References llvm::BranchProbability::normalizeProbabilities().
Referenced by CorrectExtraCFGEdges(), removeSuccessor(), transferSuccessorsAndUpdatePHIs(), llvm::SelectionDAGBuilder::visitBitTestCase(), llvm::SelectionDAGBuilder::visitBitTestHeader(), and llvm::SelectionDAGBuilder::visitSwitchCase().
|
inline |
Definition at line 526 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::pop_back().
|
inline |
Definition at line 525 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::pop_front().
|
inline |
Definition at line 228 of file MachineBasicBlock.h.
Referenced by BBIsJumpedOver(), llvm::GraphTraits< Inverse< MachineBasicBlock * > >::child_begin(), llvm::GraphTraits< Inverse< const MachineBasicBlock * > >::child_begin(), llvm::ConnectedVNInfoEqClasses::Classify(), findLoopInstr(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::FindPredecessorBlocks(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::LiveVariables::HandleVirtRegUse(), llvm::LiveIntervals::hasPHIKill(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), predecessors(), print(), SinkingPreventsImplicitNullCheck(), verifyCTRBranch(), and llvm::VerifyPHIs().
|
inline |
Definition at line 229 of file MachineBasicBlock.h.
|
inline |
Definition at line 243 of file MachineBasicBlock.h.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart(), llvm::getFuncletMembership(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::TailDuplicator::isSimpleBB(), print(), llvm::TailDuplicator::tailDuplicateAndUpdate(), and validAtEntry().
|
inline |
Definition at line 230 of file MachineBasicBlock.h.
Referenced by llvm::GraphTraits< Inverse< MachineBasicBlock * > >::child_end(), llvm::GraphTraits< Inverse< const MachineBasicBlock * > >::child_end(), llvm::ConnectedVNInfoEqClasses::Classify(), findLoopInstr(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::FindPredecessorBlocks(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::LiveVariables::HandleVirtRegUse(), llvm::LiveIntervals::hasPHIKill(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), predecessors(), print(), verifyCTRBranch(), and llvm::VerifyPHIs().
|
inline |
Definition at line 231 of file MachineBasicBlock.h.
|
inline |
Definition at line 232 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().
|
inline |
Definition at line 234 of file MachineBasicBlock.h.
|
inline |
Definition at line 236 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().
|
inline |
Definition at line 238 of file MachineBasicBlock.h.
|
inline |
Definition at line 240 of file MachineBasicBlock.h.
Referenced by BBIsJumpedOver(), llvm::MachineLoopInfo::findLoopPreheader(), llvm::LiveIntervals::hasPHIKill(), llvm::SIInstrInfo::insertIndirectBranch(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::RegBankSelect::EdgeInsertPoint::isSplit(), isSplitEdge(), llvm::rdf::operator<<(), SinkingPreventsImplicitNullCheck(), and SortBlocks().
|
inline |
Definition at line 261 of file MachineBasicBlock.h.
References llvm::make_range(), pred_begin(), and pred_end().
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::rdf::DataFlowGraph::build(), extendSegmentsToUses(), llvm::MachineLoopInfo::findLoopPreheader(), getBBFallenThrough(), llvm::MachineTraceMetrics::Ensemble::invalidate(), isPredecessor(), llvm::rdf::operator<<(), PlaceBlockMarker(), propagateSwiftErrorVRegs(), and SortBlocks().
|
inline |
Definition at line 264 of file MachineBasicBlock.h.
References llvm::make_range(), pred_begin(), and pred_end().
| void MachineBasicBlock::print | ( | raw_ostream & | OS, |
| const SlotIndexes * | Indexes = nullptr |
||
| ) | const |
Definition at line 243 of file MachineBasicBlock.cpp.
References F, llvm::MachineFunction::getFunction(), getParent(), and llvm::GlobalValue::getParent().
Referenced by dump(), llvm::DOTGraphTraits< const MachineFunction * >::getNodeLabel(), and llvm::operator<<().
| void MachineBasicBlock::print | ( | raw_ostream & | OS, |
| ModuleSlotTracker & | MST, | ||
| const SlotIndexes * | Indexes = nullptr |
||
| ) | const |
Definition at line 257 of file MachineBasicBlock.cpp.
References E, getBasicBlock(), llvm::SlotIndexes::getInstructionIndex(), llvm::SlotIndexes::getMBBStartIdx(), getNumber(), getParent(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), hasAddressTaken(), llvm::SlotIndexes::hasIndex(), I, instrs(), isEHPad(), livein_empty(), pred_begin(), pred_empty(), pred_end(), llvm::PrintLaneMask(), llvm::PrintReg(), SI, succ_begin(), succ_empty(), and succ_end().
| void MachineBasicBlock::printAsOperand | ( | raw_ostream & | OS, |
| bool | PrintType = true |
||
| ) | const |
Definition at line 330 of file MachineBasicBlock.cpp.
References getNumber().
|
inline |
Definition at line 527 of file MachineBasicBlock.h.
References llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back().
Referenced by llvm::rdf::DataFlowGraph::build(), llvm::MIRParserImpl::initializeJumpTableInfo(), and ProcessSourceNode().
|
inline |
Definition at line 192 of file MachineBasicBlock.h.
References llvm::MachineInstrBundleIterator< Ty, IsReverse >::getAtBundleBegin(), and instr_rbegin().
Referenced by llvm::MipsInstrInfo::analyzeBranch(), llvm::X86InstrInfo::analyzeBranchPredicate(), llvm::computeLiveIns(), FindLastAluClause(), fixTerminators(), getLastNonPseudo(), getLiveRegsAt(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), mergeOperations(), llvm::MipsInstrInfo::removeBranch(), and llvm::rdf::Liveness::resetKills().
|
inline |
Definition at line 195 of file MachineBasicBlock.h.
References llvm::MachineInstrBundleIterator< Ty, IsReverse >::getAtBundleBegin(), and instr_rbegin().
|
inline |
Remove the unbundled instruction from the instruction list without deleting it.
This function can not be used to remove bundled instructions, use remove_instr to remove individual instructions from a bundle.
Definition at line 602 of file MachineBasicBlock.h.
References assert(), I, and llvm::iplist_impl< IntrusiveListT, TraitsT >::remove().
Referenced by llvm::X86InstrInfo::optimizeCompareInstr().
| 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 1018 of file MachineBasicBlock.cpp.
References llvm::MachineInstr::BundledPred, llvm::MachineInstr::BundledSucc, llvm::MachineInstr::clearFlag(), llvm::iplist_impl< IntrusiveListT, TraitsT >::remove(), and unbundleSingleMI().
| MachineBasicBlock * MachineBasicBlock::removeFromParent | ( | ) |
This method unlinks 'this' from the containing function, and returns it, but does not delete it.
Definition at line 1039 of file MachineBasicBlock.cpp.
References assert(), getParent(), and llvm::MachineFunction::remove().
| void MachineBasicBlock::removeLiveIn | ( | MCPhysReg | Reg, |
| LaneBitmask | LaneMask = LaneBitmask::getAll() |
||
| ) |
Remove the specified register from the live in set.
Definition at line 335 of file MachineBasicBlock.cpp.
References llvm::find_if(), I, and llvm::MachineBasicBlock::RegisterMaskPair::PhysReg.
Referenced by emitGPDisp().
| 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 554 of file MachineBasicBlock.cpp.
References llvm::find(), and I.
Referenced by CorrectExtraCFGEdges(), replaceSuccessor(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().
| MachineBasicBlock::succ_iterator MachineBasicBlock::removeSuccessor | ( | succ_iterator | I, |
| bool | NormalizeSuccProbs = false |
||
| ) |
Remove specified successor from the successors list of this MachineBasicBlock.
The Predecessors list of Succ is automatically updated. If NormalizeSuccProbs is true, then normalize successors' probabilities after the successor is removed. Return the iterator to the element after the one removed.
Definition at line 561 of file MachineBasicBlock.cpp.
References assert(), and normalizeSuccProbs().
|
inline |
Definition at line 198 of file MachineBasicBlock.h.
References instr_rend().
Referenced by llvm::MipsInstrInfo::analyzeBranch(), llvm::X86InstrInfo::analyzeBranchPredicate(), llvm::computeLiveIns(), findExecCopy(), FindLastAluClause(), fixTerminators(), getFirstEpilogueInst(), getLastNonPseudo(), mergeOperations(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::MipsInstrInfo::removeBranch(), llvm::rdf::Liveness::resetKills(), and validAtEntry().
|
inline |
Definition at line 199 of file MachineBasicBlock.h.
References instr_rend().
| void MachineBasicBlock::replaceSuccessor | ( | MachineBasicBlock * | Old, |
| MachineBasicBlock * | New | ||
| ) |
Replace successor OLD with NEW and update probability info.
Definition at line 577 of file MachineBasicBlock.cpp.
References assert(), E, I, removeSuccessor(), succ_begin(), and succ_end().
Referenced by 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 1053 of file MachineBasicBlock.cpp.
References assert(), I, i, instr_begin(), instr_end(), and replaceSuccessor().
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), and SplitCriticalEdge().
|
inline |
Set alignment of the basic block.
The alignment is specified as log2(bytes).
Definition at line 342 of file MachineBasicBlock.h.
|
inline |
Set this block to reflect that it potentially is the target of an indirect branch.
Definition at line 142 of file MachineBasicBlock.h.
Referenced by llvm::SparcTargetLowering::emitEHSjLjSetJmp(), llvm::X86FrameLowering::emitEpilogue(), and llvm::FunctionLoweringInfo::set().
Indicates if this is the entry block of a cleanup funclet.
Definition at line 364 of file MachineBasicBlock.h.
Indicates if this is the entry block of an EH funclet.
Definition at line 358 of file MachineBasicBlock.h.
Indicates the block is a landing pad.
That is this basic block is entered via an exception handler.
Definition at line 350 of file MachineBasicBlock.h.
Referenced by llvm::FunctionLoweringInfo::set().
|
inline |
Definition at line 699 of file MachineBasicBlock.h.
References N.
| void MachineBasicBlock::setSuccProbability | ( | succ_iterator | I, |
| BranchProbability | Prob | ||
| ) |
Set successor probability of a given iterator.
Definition at line 1171 of file MachineBasicBlock.cpp.
References assert(), and llvm::BranchProbability::isUnknown().
|
inline |
Definition at line 159 of file MachineBasicBlock.h.
Referenced by llvm::AggressiveAntiDepState::AggressiveAntiDepState(), llvm::MipsAsmPrinter::EmitBasicBlockEnd(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::ARMBaseRegisterInfo::shouldCoalesce(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), and llvm::TailDuplicator::tailDuplicateAndUpdate().
| MachineBasicBlock::iterator MachineBasicBlock::SkipPHIsAndLabels | ( | MachineBasicBlock::iterator | I | ) |
Return the first instruction in MBB after I that is not a PHI or a label.
This is the correct point to insert lowered copies at the beginning of a basic block that must be before any debugging information.
Definition at line 150 of file MachineBasicBlock.cpp.
References assert(), E, end(), and I.
Referenced by addLiveIn(), and llvm::findPHICopyInsertPoint().
| 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 162 of file MachineBasicBlock.cpp.
References assert(), E, end(), and I.
Referenced by findInsertLocation(), and llvm::SplitEditor::leaveIntvAtTop().
| void MachineBasicBlock::sortUniqueLiveIns | ( | ) |
Sorts and uniques the LiveIns vector.
It can be significantly faster to do this than repeatedly calling isLiveIn before calling addLiveIn for every LiveIn insertion.
Definition at line 352 of file MachineBasicBlock.cpp.
References I, and llvm::MachineBasicBlock::RegisterMaskPair::PhysReg.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks().
|
inline |
Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before 'Where'.
If From points to a bundle of instructions, the whole bundle is moved.
Definition at line 622 of file MachineBasicBlock.h.
Referenced by doScavengeFrameVirtualRegs(), llvm::PPCTargetLowering::EmitAtomicBinary(), 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::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), loadM0FromVGPR(), MoveAndTeeForMultiUse(), MoveForSingleUse(), moveInstrOut(), llvm::ScheduleDAGMI::moveInstruction(), llvm::ScheduleDAGMI::placeDebugValues(), splitBlockAfter(), splitBlockBefore(), and llvm::SITargetLowering::splitKillBlock().
|
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 633 of file MachineBasicBlock.h.
References llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::splice().
| MachineBasicBlock * MachineBasicBlock::SplitCriticalEdge | ( | MachineBasicBlock * | Succ, |
| Pass & | P | ||
| ) |
Split the critical edge from this block to the given successor block, and return the newly created block, or null if splitting is not possible.
This function updates LiveVariables, MachineDominatorTree, and MachineLoopInfo, as applicable.
Definition at line 726 of file MachineBasicBlock.cpp.
References addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::LiveRange::addSegment(), addSuccessor(), assert(), llvm::SmallVectorTemplateCommon< T >::begin(), canSplitCriticalEdge(), llvm::SmallSet< T, N, C >::count(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::dbgs(), DEBUG, E, llvm::SmallVectorTemplateCommon< T >::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, 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< T >::value >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::LiveVariables::VarInfo::removeKill(), llvm::LiveRange::removeSegment(), ReplaceUsesOfBlockWith(), TII, and updateTerminator().
|
inline |
Definition at line 244 of file MachineBasicBlock.h.
Referenced by BBHasFallthrough(), BBIsJumpedOver(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_begin(), checkAndUpdateEFLAGSKill(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_begin(), llvm::GraphTraits< MachineBasicBlock * >::child_begin(), llvm::GraphTraits< const MachineBasicBlock * >::child_begin(), CorrectExtraCFGEdges(), getFallThroughMBB(), llvm::MachineBranchProbabilityInfo::getHotSucc(), getLayoutSuccessorProbThreshold(), hasEHPadSuccessor(), isCCLiveOut(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), OtherSucc(), llvm::MIPrinter::print(), print(), llvm::LiveIntervals::pruneValue(), replaceSuccessor(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::IRTranslator::runOnMachineFunction(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), successors(), llvm::TailDuplicator::tailDuplicateAndUpdate(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), updateTerminator(), and llvm::WriteGraph().
|
inline |
Definition at line 245 of file MachineBasicBlock.h.
|
inline |
Definition at line 259 of file MachineBasicBlock.h.
Referenced by llvm::X86FrameLowering::canUseAsEpilogue(), llvm::ScheduleDAGSDNodes::computeOperandLatency(), getEndClobberMask(), isNoReturnDef(), llvm::SystemZInstrInfo::isProfitableToIfCvt(), llvm::MIPrinter::print(), print(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::SelectionDAGISel::runOnMachineFunction(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), and updateTerminator().
|
inline |
Definition at line 246 of file MachineBasicBlock.h.
Referenced by BBHasFallthrough(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_end(), checkAndUpdateEFLAGSKill(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_end(), llvm::GraphTraits< MachineBasicBlock * >::child_end(), llvm::GraphTraits< const MachineBasicBlock * >::child_end(), CorrectExtraCFGEdges(), getFallThroughMBB(), llvm::MachineBranchProbabilityInfo::getHotSucc(), hasEHPadSuccessor(), isCCLiveOut(), llvm::LanaiInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), OtherSucc(), llvm::MIPrinter::print(), print(), llvm::LiveIntervals::pruneValue(), replaceSuccessor(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), successors(), llvm::TailDuplicator::tailDuplicateAndUpdate(), updateTerminator(), and llvm::WriteGraph().
|
inline |
Definition at line 247 of file MachineBasicBlock.h.
|
inline |
Definition at line 248 of file MachineBasicBlock.h.
|
inline |
Definition at line 250 of file MachineBasicBlock.h.
|
inline |
Definition at line 252 of file MachineBasicBlock.h.
|
inline |
Definition at line 254 of file MachineBasicBlock.h.
|
inline |
Definition at line 256 of file MachineBasicBlock.h.
Referenced by BBIsJumpedOver(), llvm::TailDuplicator::canTailDuplicate(), getLayoutSuccessorProbThreshold(), llvm::RegionTraits< MachineFunction >::getNumSuccessors(), llvm::TailDuplicator::isSimpleBB(), llvm::RegBankSelect::EdgeInsertPoint::isSplit(), isSplitEdge(), llvm::rdf::operator<<(), and ProfitableToMerge().
|
inline |
Definition at line 267 of file MachineBasicBlock.h.
References llvm::make_range(), succ_begin(), and succ_end().
Referenced by llvm::LivePhysRegs::addLiveOutsNoPristines(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::X86InstrInfo::analyzeBranchPredicate(), areCFlagsAliveInSuccessors(), llvm::bothUsedInPHI(), collectFuncletMembers(), llvm::RegScavenger::enterBasicBlockEnd(), findFalseBlock(), llvm::MachineLoopInfo::findLoopPreheader(), flagsNeedToBePreservedBeforeTheTerminators(), llvm::MachineBranchProbabilityInfo::getEdgeProbability(), llvm::MachineTraceMetrics::Ensemble::invalidate(), isIrreducibleCFG(), isLiveOut(), llvm::LiveVariables::isLiveOut(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::HexagonInstrInfo::isSchedulingBoundary(), isSuccessor(), llvm::rdf::operator<<(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::RegBankSelect::RepairingPlacement::RepairingPlacement(), llvm::rdf::Liveness::resetKills(), SortBlocks(), llvm::ScheduleDAGInstrs::startBlockForKills(), and updateLiveness().
|
inline |
Definition at line 270 of file MachineBasicBlock.h.
References llvm::make_range(), succ_begin(), and succ_end().
|
inline |
Definition at line 208 of file MachineBasicBlock.h.
References end(), getFirstTerminator(), and llvm::make_range().
Referenced by llvm::WebAssemblyInstrInfo::analyzeBranch(), ExplicitlyBranchesTo(), flagsNeedToBePreservedBeforeTheTerminators(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), and MaybeUpdateTerminator().
|
inline |
Definition at line 211 of file MachineBasicBlock.h.
References end(), getFirstTerminator(), and llvm::make_range().
| void MachineBasicBlock::transferSuccessors | ( | MachineBasicBlock * | FromMBB | ) |
Transfers all the successors from MBB to this machine basic block (i.e., copies all the successors FromMBB and remove all the successors from FromMBB).
Definition at line 627 of file MachineBasicBlock.cpp.
References addSuccessor(), addSuccessorWithoutProb(), removeSuccessor(), succ_begin(), and succ_empty().
| 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 646 of file MachineBasicBlock.cpp.
References addSuccessor(), addSuccessorWithoutProb(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), i, instr_begin(), instr_end(), llvm::MachineInstr::isPHI(), MI, normalizeSuccProbs(), removeSuccessor(), llvm::MachineOperand::setMBB(), succ_begin(), and succ_empty().
Referenced by llvm::PPCTargetLowering::EmitAtomicBinary(), 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::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), emitXBegin(), llvm::SparcTargetLowering::expandSelectCC(), loadM0FromVGPR(), splitBlockAfter(), splitBlockBefore(), and llvm::SITargetLowering::splitKillBlock().
| void MachineBasicBlock::updateTerminator | ( | ) |
Update the terminator instructions in block to account for changes to the layout.
If the block previously used a fallthrough, it may now need a branch, and if it previously used branching it may now be able to use a fallthrough.
Definition at line 412 of file MachineBasicBlock.cpp.
References llvm::TargetInstrInfo::analyzeBranch(), assert(), B, canFallThrough(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorBase::empty(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), llvm::TargetInstrInfo::insertBranch(), isLayoutSuccessor(), llvm::TargetInstrInfo::removeBranch(), llvm::TargetInstrInfo::reverseBranchCondition(), SI, succ_begin(), succ_empty(), succ_end(), and TII.
Referenced by MaybeUpdateTerminator(), and SplitCriticalEdge().
| void MachineBasicBlock::validateSuccProbs | ( | ) | const |
Validate successors' probabilities and check if the sum of them is approximate one.
This only works in DEBUG mode.
Definition at line 521 of file MachineBasicBlock.cpp.
References llvm::abs(), assert(), and llvm::BranchProbability::getDenominator().
|
friend |
Definition at line 720 of file MachineBasicBlock.h.
|
friend |
Definition at line 711 of file MachineBasicBlock.h.
|
friend |
Definition at line 123 of file MachineBasicBlock.h.
|
friend |
Definition at line 712 of file MachineBasicBlock.h.
1.8.6