|
LLVM
3.7.0
|
#include <MachineBasicBlock.h>
Classes | |
| class | bundle_iterator |
| bundle_iterator - MachineBasicBlock iterator that automatically skips over MIs that are inside bundles (i.e. More... | |
Public Member Functions | |
| const BasicBlock * | getBasicBlock () const |
| getBasicBlock - Return the LLVM basic block that this instance corresponded to originally. More... | |
| StringRef | getName () const |
| getName - Return the name of the corresponding LLVM basic block, or "(null)". More... | |
| std::string | getFullName () const |
| getFullName - Return a formatted string to identify this block and its parent function. More... | |
| bool | hasAddressTaken () const |
| hasAddressTaken - Test whether this block is potentially the target of an indirect branch. More... | |
| void | setHasAddressTaken () |
| setHasAddressTaken - Set this block to reflect that it potentially is the target of an indirect branch. More... | |
| const MachineFunction * | getParent () const |
| getParent - 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 |
| 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 (unsigned Reg) |
| Adds the specified register as a live in. More... | |
| void | sortUniqueLiveIns () |
| Sorts and uniques the LiveIns vector. More... | |
| unsigned | addLiveIn (unsigned 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 (unsigned Reg) |
| removeLiveIn - Remove the specified register from the live in set. More... | |
| bool | isLiveIn (unsigned Reg) const |
| isLiveIn - Return true if the specified register is in the live in set. More... | |
| livein_iterator | livein_begin () const |
| livein_iterator | livein_end () const |
| bool | livein_empty () const |
| unsigned | getAlignment () const |
| getAlignment - Return alignment of the basic block. More... | |
| void | setAlignment (unsigned Align) |
| setAlignment - Set alignment of the basic block. More... | |
| bool | isLandingPad () const |
| isLandingPad - Returns true if the block is a landing pad. More... | |
| void | setIsLandingPad (bool V=true) |
| setIsLandingPad - Indicates the block is a landing pad. More... | |
| const MachineBasicBlock * | getLandingPadSuccessor () const |
| getLandingPadSuccessor - If this block has a successor that is a landing pad, return it. More... | |
| void | moveBefore (MachineBasicBlock *NewAfter) |
| moveBefore/moveAfter - move 'this' block before or after the specified block. More... | |
| void | moveAfter (MachineBasicBlock *NewBefore) |
| void | updateTerminator () |
| updateTerminator - Update the terminator instructions in block to account for changes to the layout. More... | |
| void | addSuccessor (MachineBasicBlock *succ, uint32_t weight=0) |
| addSuccessor - Add succ as a successor of this MachineBasicBlock. More... | |
| void | setSuccWeight (succ_iterator I, uint32_t weight) |
| Set successor weight of a given iterator. More... | |
| void | removeSuccessor (MachineBasicBlock *succ) |
| removeSuccessor - Remove successor from the successors list of this MachineBasicBlock. More... | |
| succ_iterator | removeSuccessor (succ_iterator I) |
| removeSuccessor - Remove specified successor from the successors list of this MachineBasicBlock. More... | |
| void | replaceSuccessor (MachineBasicBlock *Old, MachineBasicBlock *New) |
| replaceSuccessor - Replace successor OLD with NEW and update weight info. More... | |
| void | transferSuccessors (MachineBasicBlock *fromMBB) |
| transferSuccessors - 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) |
| transferSuccessorsAndUpdatePHIs - 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 | isPredecessor (const MachineBasicBlock *MBB) const |
| isPredecessor - Return true if the specified MBB is a predecessor of this block. More... | |
| bool | isSuccessor (const MachineBasicBlock *MBB) const |
| isSuccessor - Return true if the specified MBB is a successor of this block. More... | |
| bool | isLayoutSuccessor (const MachineBasicBlock *MBB) const |
| isLayoutSuccessor - 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 () |
| 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) |
| SkipPHIsAndLabels - Return the first instruction in MBB after I that is not a PHI or a label. More... | |
| iterator | getFirstTerminator () |
| getFirstTerminator - returns an iterator to the first terminator instruction of this basic block. More... | |
| const_iterator | getFirstTerminator () const |
| instr_iterator | getFirstInstrTerminator () |
| getFirstInstrTerminator - Same getFirstTerminator but it ignores bundles and return an instr_iterator instead. More... | |
| iterator | getFirstNonDebugInstr () |
| getFirstNonDebugInstr - returns an iterator to the first non-debug instruction in the basic block, or end() More... | |
| const_iterator | getFirstNonDebugInstr () const |
| iterator | getLastNonDebugInstr () |
| getLastNonDebugInstr - returns an iterator to the last non-debug instruction in the basic block, or end() More... | |
| const_iterator | getLastNonDebugInstr () const |
| MachineBasicBlock * | SplitCriticalEdge (MachineBasicBlock *Succ, Pass *P) |
| SplitCriticalEdge - 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... | |
| 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 () |
| removeFromParent - This method unlinks 'this' from the containing function, and returns it, but does not delete it. More... | |
| void | eraseFromParent () |
| eraseFromParent - This method unlinks 'this' from the containing function and deletes it. More... | |
| void | ReplaceUsesOfBlockWith (MachineBasicBlock *Old, MachineBasicBlock *New) |
| ReplaceUsesOfBlockWith - 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) |
| CorrectExtraCFGEdges - Various pieces of code can cause excess edges in the CFG to be inserted. More... | |
| DebugLoc | findDebugLoc (instr_iterator MBBI) |
| findDebugLoc - 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, SlotIndexes *=nullptr) const |
| void | print (raw_ostream &OS, ModuleSlotTracker &MST, SlotIndexes *=nullptr) const |
| void | printAsOperand (raw_ostream &OS, bool PrintType=true) const |
| int | getNumber () const |
| getNumber - 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 |
| getSymbol - Return the MCSymbol for this basic block. More... | |
Public Member Functions inherited from llvm::ilist_node< MachineBasicBlock > | |
| MachineBasicBlock * | getPrevNode () |
| Get the previous node, or 0 for the list head. More... | |
| const MachineBasicBlock * | getPrevNode () const |
| Get the previous node, or 0 for the list head. More... | |
| MachineBasicBlock * | getNextNode () |
| Get the next node, or 0 for the list tail. More... | |
| const MachineBasicBlock * | getNextNode () const |
| Get the next node, or 0 for the list tail. More... | |
Friends | |
| class | MachineFunction |
| class | MachineBranchProbabilityInfo |
| struct | ilist_traits< MachineBasicBlock > |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::ilist_node< MachineBasicBlock > | |
| ilist_node () | |
Definition at line 62 of file MachineBasicBlock.h.
Definition at line 206 of file MachineBasicBlock.h.
| typedef bundle_iterator<const MachineInstr,const_instr_iterator> llvm::MachineBasicBlock::const_iterator |
Definition at line 214 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_iterator llvm::MachineBasicBlock::const_pred_iterator |
Definition at line 259 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_reverse_iterator llvm::MachineBasicBlock::const_pred_reverse_iterator |
Definition at line 265 of file MachineBasicBlock.h.
| typedef std::reverse_iterator<const_instr_iterator> llvm::MachineBasicBlock::const_reverse_instr_iterator |
Definition at line 209 of file MachineBasicBlock.h.
| typedef std::reverse_iterator<const_iterator> llvm::MachineBasicBlock::const_reverse_iterator |
Definition at line 215 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_iterator llvm::MachineBasicBlock::const_succ_iterator |
Definition at line 261 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::const_reverse_iterator llvm::MachineBasicBlock::const_succ_reverse_iterator |
Definition at line 269 of file MachineBasicBlock.h.
Definition at line 205 of file MachineBasicBlock.h.
Definition at line 212 of file MachineBasicBlock.h.
| typedef std::vector<unsigned>::const_iterator llvm::MachineBasicBlock::livein_iterator |
Definition at line 346 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::iterator llvm::MachineBasicBlock::pred_iterator |
Definition at line 258 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::reverse_iterator llvm::MachineBasicBlock::pred_reverse_iterator |
Definition at line 263 of file MachineBasicBlock.h.
| typedef std::reverse_iterator<instr_iterator> llvm::MachineBasicBlock::reverse_instr_iterator |
Definition at line 207 of file MachineBasicBlock.h.
| typedef std::reverse_iterator<iterator> llvm::MachineBasicBlock::reverse_iterator |
Definition at line 216 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::iterator llvm::MachineBasicBlock::succ_iterator |
Definition at line 260 of file MachineBasicBlock.h.
| typedef std::vector<MachineBasicBlock *>::reverse_iterator llvm::MachineBasicBlock::succ_reverse_iterator |
Definition at line 267 of file MachineBasicBlock.h.
Possible outcome of a register liveness query to computeRegisterLiveness()
Definition at line 638 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 321 of file MachineBasicBlock.h.
Referenced by addLiveIn(), addLiveInRegs(), addSavedGPR(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::SIInstrInfo::calculateLDSSpillAddress(), emitAlignedDPRCS2Spills(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::MachineRegisterInfo::EmitLiveInCopies(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), EmitXBegin(), llvm::MIRParserImpl::initializeMachineBasicBlock(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), SplitCriticalEdge(), and updateLiveness().
| unsigned MachineBasicBlock::addLiveIn | ( | unsigned | 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 341 of file MachineBasicBlock.cpp.
References addLiveIn(), begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::TargetOpcode::COPY, llvm::MachineRegisterInfo::createVirtualRegister(), end(), front(), llvm::MCInstrInfo::get(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, isLandingPad(), isLiveIn(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::RegState::Kill, llvm_unreachable, SkipPHIsAndLabels(), and TII.
| void MachineBasicBlock::addSuccessor | ( | MachineBasicBlock * | succ, |
| uint32_t | weight = 0 |
||
| ) |
addSuccessor - Add succ as a successor of this MachineBasicBlock.
The Predecessors list of succ is automatically updated. WEIGHT parameter is stored in Weights list and it may be used by MachineBranchProbabilityInfo analysis to calculate branch probability.
Note that duplicate Machine CFG edges are not allowed.
Definition at line 477 of file MachineBasicBlock.cpp.
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), llvm::SparcTargetLowering::expandAtomicRMW(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitBranch(), llvm::MIRParserImpl::initializeMachineBasicBlock(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), SplitCriticalEdge(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 228 of file MachineBasicBlock.h.
References end().
Referenced by BBIsJumpedOver(), canFallThrough(), HandleVRSaveUpdate(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), ProcessSourceNode(), ProfitableToMerge(), llvm::HexagonInstrInfo::RemoveBranch(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), and llvm::FastISel::startNewBlock().
|
inline |
Definition at line 230 of file MachineBasicBlock.h.
References end().
|
inline |
Definition at line 241 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::ARMBaseInstrInfo::AnalyzeBranch(), llvm::AArch64InstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::SystemZInstrInfo::AnalyzeBranch(), llvm::R600InstrInfo::AnalyzeBranch(), llvm::MachineInstrSpan::begin(), bothUsedInPHI(), ComputeCommonTailLength(), computeRegisterLiveness(), CountTerminators(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::MachineDominatorTree::dominates(), llvm::LexicalScopes::dominates(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), emitGPDisp(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::MachineRegisterInfo::EmitLiveInCopies(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::Mips16FrameLowering::emitPrologue(), llvm::NVPTXFrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), llvm::SparcTargetLowering::expandAtomicRMW(), llvm::SparcTargetLowering::expandSelectCC(), findFirstPredicateSetterFrom(), findHoistingInsertPosAndDeps(), findInsertLocation(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::RegScavenger::forward(), getFirstEpilogueInst(), getFirstNonDebugInstr(), getFirstTerminator(), llvm::SparcInstrInfo::getGlobalBaseReg(), llvm::ARMHazardRecognizer::getHazardType(), llvm::SlotIndexes::getIndexBefore(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), INITIALIZE_PASS(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::R600InstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::SplitEditor::leaveIntvAtTop(), llvm::FastISel::leaveLocalValueArea(), LookForIdenticalPHI(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MBBDefinesCTR(), llvm::X86FrameLowering::mergeSPUpdates(), mergeSPUpdatesUp(), modifiesConditionCode(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), PrevCrossBBInst(), ProcessSourceNode(), ProfitableToMerge(), llvm::RegPressureTracker::recede(), llvm::BPFInstrInfo::RemoveBranch(), llvm::XCoreInstrInfo::RemoveBranch(), llvm::NVPTXInstrInfo::RemoveBranch(), llvm::HexagonInstrInfo::RemoveBranch(), llvm::SparcInstrInfo::RemoveBranch(), llvm::MSP430InstrInfo::RemoveBranch(), llvm::ARMBaseInstrInfo::RemoveBranch(), llvm::AArch64InstrInfo::RemoveBranch(), llvm::PPCInstrInfo::RemoveBranch(), llvm::SystemZInstrInfo::RemoveBranch(), llvm::R600InstrInfo::RemoveBranch(), llvm::X86InstrInfo::RemoveBranch(), removeDebugValues(), RemoveVRSaveCode(), llvm::SlotIndexes::repairIndexesInRange(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), llvm::BitTracker::run(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::SlotIndexes::runOnMachineFunction(), splitBlockAfter(), splitBlockBefore(), llvm::RegScavenger::unprocess(), verifyCTRBranch(), and VerifyPHIs().
|
inline |
Definition at line 242 of file MachineBasicBlock.h.
References instr_begin().
| bool MachineBasicBlock::canFallThrough | ( | ) |
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 623 of file MachineBasicBlock.cpp.
References llvm::TargetInstrInfo::AnalyzeBranch(), back(), llvm::SmallVectorBase::empty(), empty(), end(), llvm::TargetSubtargetInfo::getInstrInfo(), getParent(), llvm::MachineFunction::getSubtarget(), llvm::MachineInstr::isBarrier(), llvm::TargetInstrInfo::isPredicated(), isSuccessor(), and TII.
Referenced by updateTerminator().
|
inline |
Definition at line 583 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::clear().
| 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 1129 of file MachineBasicBlock.cpp.
References Analysis, llvm::MachineOperandIteratorBase::analyzePhysReg(), begin(), llvm::MachineOperandIteratorBase::PhysRegInfo::Clobbers, llvm::MachineOperandIteratorBase::PhysRegInfo::Defines, llvm::MachineOperandIteratorBase::PhysRegInfo::DefinesDead, end(), I, isLiveIn(), llvm::MCRegAliasIterator::isValid(), llvm::MachineOperandIteratorBase::PhysRegInfo::Kills, LQR_Dead, LQR_Live, LQR_OverlappingLive, LQR_Unknown, N, llvm::MachineOperandIteratorBase::PhysRegInfo::Reads, and llvm::MachineOperandIteratorBase::PhysRegInfo::ReadsOverlap.
Referenced by llvm::X86InstrInfo::classifyLEAReg(), getImplicitSPRUseForDPRUse(), and isAnySubRegLive().
| bool MachineBasicBlock::CorrectExtraCFGEdges | ( | MachineBasicBlock * | DestA, |
| MachineBasicBlock * | DestB, | ||
| bool | isCond | ||
| ) |
CorrectExtraCFGEdges - 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 1015 of file MachineBasicBlock.cpp.
References llvm::SmallPtrSetImpl< PtrType >::insert(), isLandingPad(), removeSuccessor(), llvm::SI, succ_begin(), and succ_end().
Referenced by llvm::BranchFolder::OptimizeFunction().
| void MachineBasicBlock::dump | ( | ) | const |
Definition at line 217 of file MachineBasicBlock.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 220 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::empty().
Referenced by bothUsedInPHI(), canFallThrough(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::findPHICopyInsertPoint(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), HandleVRSaveUpdate(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), LookForIdenticalPHI(), llvm::AggressiveAntiDepBreaker::StartBlock(), and llvm::FastISel::startNewBlock().
|
inline |
Definition at line 243 of file MachineBasicBlock.h.
References instr_end().
Referenced by addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::MipsSEInstrInfo::adjustStackPtr(), llvm::RegPressureTracker::advance(), llvm::BPFInstrInfo::AnalyzeBranch(), llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::NVPTXInstrInfo::AnalyzeBranch(), llvm::SparcInstrInfo::AnalyzeBranch(), llvm::MSP430InstrInfo::AnalyzeBranch(), llvm::ARMBaseInstrInfo::AnalyzeBranch(), llvm::AArch64InstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::SystemZInstrInfo::AnalyzeBranch(), llvm::R600InstrInfo::AnalyzeBranch(), back(), llvm::MachineInstrSpan::begin(), llvm::Mips16InstrInfo::BuildAddiuSpImm(), llvm::BuildMI(), canFallThrough(), checkAndUpdateEFLAGSKill(), collectDebugValues(), ComputeCommonTailLength(), computeRegisterLiveness(), CountTerminators(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::LexicalScopes::dominates(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::HexagonAsmPrinter::EmitInstruction(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::MSP430FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), llvm::ScheduleDAGMILive::enterRegion(), llvm::SparcTargetLowering::expandAtomicRMW(), llvm::SparcTargetLowering::expandSelectCC(), findHoistingInsertPosAndDeps(), FindLastAluClause(), llvm::findPHICopyInsertPoint(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::RegScavenger::forward(), getBranchDebugLoc(), llvm::RegPressureTracker::getCurrSlot(), getFirstEpilogueInst(), getFirstNonDebugInstr(), getFirstTerminator(), llvm::SlotIndexes::getIndexAfter(), getLastNonDebugInstr(), llvm::SplitAnalysis::getLastSplitPointIter(), llvm::X86InstrInfo::getSPAdjust(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), HashEndOfMBB(), INITIALIZE_PASS(), llvm::MIRParserImpl::initializeMachineBasicBlock(), insert(), insertAfter(), llvm::HexagonInstrInfo::InsertBranch(), llvm::R600InstrInfo::InsertBranch(), IsBetterFallthrough(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), IsBranchOnlyBlock(), IsEmptyBlock(), llvm::Thumb2InstrInfo::isLegalToSplitMBBAt(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), llvm::XCoreInstrInfo::loadImmediate(), llvm::SystemZInstrInfo::loadImmediate(), llvm::Mips16InstrInfo::loadRegFromStack(), llvm::MipsSEInstrInfo::loadRegFromStack(), llvm::BPFInstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::SystemZInstrInfo::loadRegFromStackSlot(), LookForIdenticalPHI(), llvm::Mips16InstrInfo::makeFrame(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MBBDefinesCTR(), llvm::X86FrameLowering::mergeSPUpdates(), NoInterveningSideEffect(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), PrevCrossBBInst(), llvm::FastISel::recomputeInsertPt(), llvm::BPFInstrInfo::RemoveBranch(), llvm::XCoreInstrInfo::RemoveBranch(), llvm::NVPTXInstrInfo::RemoveBranch(), llvm::HexagonInstrInfo::RemoveBranch(), llvm::SparcInstrInfo::RemoveBranch(), llvm::MSP430InstrInfo::RemoveBranch(), llvm::ARMBaseInstrInfo::RemoveBranch(), llvm::AArch64InstrInfo::RemoveBranch(), llvm::PPCInstrInfo::RemoveBranch(), llvm::SystemZInstrInfo::RemoveBranch(), llvm::R600InstrInfo::RemoveBranch(), llvm::X86InstrInfo::RemoveBranch(), removeDebugValues(), removeMMOsFromMemoryOperations(), RemoveVRSaveCode(), llvm::SlotIndexes::repairIndexesInRange(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::SystemZFrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::Mips16InstrInfo::restoreFrame(), llvm::BitTracker::run(), llvm::SlotIndexes::runOnMachineFunction(), SkipPHIsAndLabels(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), splitBlockAfter(), splitBlockBefore(), SplitCriticalEdge(), llvm::Mips16InstrInfo::storeRegToStack(), llvm::MipsSEInstrInfo::storeRegToStack(), llvm::BPFInstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::SystemZInstrInfo::storeRegToStackSlot(), terminators(), llvm::ScheduleDAGMILive::updatePressureDiffs(), verifyCTRBranch(), and VerifyPHIs().
|
inline |
Definition at line 244 of file MachineBasicBlock.h.
References instr_end().
| MachineBasicBlock::instr_iterator MachineBasicBlock::erase | ( | MachineBasicBlock::instr_iterator | I | ) |
Remove an instruction from the instruction list and delete it.
If the instruction is part of a bundle, the other instructions in the bundle will still be bundled after removing the single instruction.
Definition at line 943 of file MachineBasicBlock.cpp.
References llvm::iplist< NodeTy, Traits >::erase(), and unbundleSingleMI().
Referenced by llvm::NVPTXFrameLowering::eliminateCallFramePseudoInstr(), llvm::AArch64FrameLowering::eliminateCallFramePseudoInstr(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(), llvm::BPFFrameLowering::eliminateCallFramePseudoInstr(), llvm::MipsFrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::HexagonFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::SystemZFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitEpilogue(), erase(), erase_instr(), llvm::MipsSEInstrInfo::expandPostRAPseudo(), llvm::Mips16InstrInfo::expandPostRAPseudo(), llvm::AMDGPUInstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), llvm::ARMFrameLowering::fixTCReturn(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::X86FrameLowering::mergeSPUpdates(), mergeSPUpdatesUp(), 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 547 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::erase().
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 554 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 562 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 542 of file MachineBasicBlock.h.
References erase().
| void MachineBasicBlock::eraseFromParent | ( | ) |
eraseFromParent - This method unlinks 'this' from the containing function and deletes it.
eraseFromParent - This method unlinks 'this' from the containing function, and deletes it.
Definition at line 978 of file MachineBasicBlock.cpp.
References llvm::MachineFunction::erase(), and getParent().
Referenced by llvm::BPFInstrInfo::AnalyzeBranch(), llvm::SparcInstrInfo::AnalyzeBranch(), llvm::MSP430InstrInfo::AnalyzeBranch(), and llvm::SystemZInstrInfo::AnalyzeBranch().
| DebugLoc MachineBasicBlock::findDebugLoc | ( | instr_iterator | MBBI | ) |
findDebugLoc - find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE instructions.
Return UnknownLoc if there is none.
Definition at line 1072 of file MachineBasicBlock.cpp.
References llvm::DL, and instr_end().
Referenced by llvm::SparcInstrInfo::AnalyzeBranch(), llvm::R600InstrInfo::buildDefaultInstruction(), llvm::SIInstrInfo::buildIndirectRead(), llvm::SIInstrInfo::buildIndirectWrite(), llvm::SIInstrInfo::buildMovInstr(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), emitGPDisp(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitSPUpdate(), llvm::SIInstrInfo::expandPostRAPseudo(), findDebugLoc(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), and llvm::X86InstrInfo::storeRegToStackSlot().
Definition at line 633 of file MachineBasicBlock.h.
References findDebugLoc().
|
inline |
Definition at line 227 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::front().
Referenced by addLiveIn(), llvm::SIInstrInfo::calculateLDSSpillAddress(), llvm::Thumb1FrameLowering::emitEpilogue(), and insertNopBeforeInstruction().
|
inline |
Definition at line 229 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::front().
|
inline |
getAlignment - Return alignment of the basic block.
The alignment is specified as log2(bytes).
Definition at line 354 of file MachineBasicBlock.h.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart().
|
inline |
getBasicBlock - 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 117 of file MachineBasicBlock.h.
Referenced by llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::AsmPrinter::EmitBasicBlockStart(), emitBlockAfter(), llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), llvm::SparcTargetLowering::expandAtomicRMW(), llvm::SparcTargetLowering::expandSelectCC(), llvm::FastISel::fastEmitBranch(), llvm::SelectionDAGBuilder::FindMergedConditions(), getFullName(), getName(), llvm::DOTGraphTraits< const MachineFunction * >::getNodeLabel(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::HexagonTargetLowering::LowerBR_JT(), and print().
| MachineBasicBlock::instr_iterator MachineBasicBlock::getFirstInstrTerminator | ( | ) |
getFirstInstrTerminator - Same getFirstTerminator but it ignores bundles and return an instr_iterator instead.
Definition at line 175 of file MachineBasicBlock.cpp.
References I, instr_begin(), and instr_end().
Referenced by SplitCriticalEdge().
| MachineBasicBlock::iterator MachineBasicBlock::getFirstNonDebugInstr | ( | ) |
getFirstNonDebugInstr - returns an iterator to the first non-debug instruction in the basic block, or end()
Definition at line 184 of file MachineBasicBlock.cpp.
References begin(), end(), and I.
Referenced by getFirstNonDebugInstr(), IsBranchOnlyBlock(), and IsEmptyBlock().
|
inline |
Definition at line 475 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 145 of file MachineBasicBlock.cpp.
References I, instr_begin(), and instr_end().
Referenced by llvm::ScheduleDAGSDNodes::EmitSchedule(), and llvm::FastISel::recomputeInsertPt().
| MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator | ( | ) |
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 166 of file MachineBasicBlock.cpp.
References begin(), end(), and I.
Referenced by llvm::AArch64FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitEpilogue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), findHoistingInsertPosAndDeps(), findInsertLocation(), llvm::findPHICopyInsertPoint(), FindSplitPointForStackProtector(), getFirstTerminator(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::HexagonInstrInfo::InsertBranch(), llvm::SIInstrInfo::legalizeOperands(), SplitCriticalEdge(), and terminators().
|
inline |
Definition at line 464 of file MachineBasicBlock.h.
References getFirstTerminator().
| std::string MachineBasicBlock::getFullName | ( | ) | const |
getFullName - Return a formatted string to identify this block and its parent function.
Return a hopefully unique identifier for this block.
Definition at line 230 of file MachineBasicBlock.cpp.
References getBasicBlock(), llvm::MachineFunction::getName(), llvm::Value::getName(), getNumber(), and getParent().
Referenced by llvm::ScheduleDAGSDNodes::getDAGName(), llvm::ScheduleDAGInstrs::getDAGName(), and verifyCTRBranch().
| const MachineBasicBlock * MachineBasicBlock::getLandingPadSuccessor | ( | ) | const |
getLandingPadSuccessor - If this block has a successor that is a landing pad, return it.
Otherwise return NULL.
Definition at line 206 of file MachineBasicBlock.cpp.
References I, succ_begin(), succ_end(), and succ_size().
| MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr | ( | ) |
getLastNonDebugInstr - returns an iterator to the last non-debug instruction in the basic block, or end()
Definition at line 192 of file MachineBasicBlock.cpp.
References end(), I, instr_begin(), and instr_end().
Referenced by llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::AArch64InstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::R600InstrInfo::AnalyzeBranch(), llvm::Mips16FrameLowering::emitEpilogue(), llvm::MipsSEFrameLowering::emitEpilogue(), llvm::SparcFrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::AArch64FrameLowering::emitEpilogue(), llvm::PPCFrameLowering::emitEpilogue(), llvm::SystemZFrameLowering::emitEpilogue(), llvm::ARMFrameLowering::fixTCReturn(), getBranchDebugLoc(), getFirstEpilogueInst(), getLastNonDebugInstr(), HashEndOfMBB(), IsBetterFallthrough(), llvm::XCoreInstrInfo::RemoveBranch(), llvm::ARMBaseInstrInfo::RemoveBranch(), llvm::AArch64InstrInfo::RemoveBranch(), llvm::PPCInstrInfo::RemoveBranch(), and verifyCTRBranch().
|
inline |
Definition at line 482 of file MachineBasicBlock.h.
References getLastNonDebugInstr().
| StringRef MachineBasicBlock::getName | ( | ) | const |
getName - Return the name of the corresponding LLVM basic block, or "(null)".
Definition at line 222 of file MachineBasicBlock.cpp.
References getBasicBlock().
Referenced by getBlockName(), llvm::DOTGraphTraits< MachineBlockFrequencyInfo * >::getNodeLabel(), and llvm::VLIWMachineScheduler::schedule().
|
inline |
getNumber - 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 673 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::addNewBlock(), llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::LiveIntervals::checkRegMaskInterference(), CompareMBBNumbers(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::AsmPrinter::EmitBasicBlockStart(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::SplitEditor::enterIntvAtEnd(), llvm::ScheduleDAGInstrs::fixupKills(), getBlockName(), getBlockNum(), llvm::MachineTraceMetrics::Ensemble::getDepthResources(), getFullName(), llvm::MachineTraceMetrics::Ensemble::getHeightResources(), llvm::MachineTraceMetrics::Trace::getInstrSlack(), llvm::SplitAnalysis::getLastSplitPointIter(), llvm::SlotIndexes::getMBBRange(), 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::MachineTraceMetrics::Trace::isDepInTrace(), llvm::LiveVariables::VarInfo::isLiveIn(), llvm::LiveVariables::isLiveOut(), llvm::SplitEditor::leaveIntvAtTop(), llvm::LiveVariables::MarkVirtRegAliveInBlock(), llvm::MBB2NumberFunctor::operator()(), llvm::MachineTraceMetrics::Trace::print(), llvm::ARMConstantPoolMBB::print(), print(), printAsOperand(), llvm::MachineBranchProbabilityInfo::printEdgeProbability(), ProfitableToMerge(), llvm::BitTracker::reached(), llvm::HexagonInstrInfo::RemoveBranch(), llvm::BitTracker::run(), llvm::SlotIndexes::runOnMachineFunction(), llvm::VLIWMachineScheduler::schedule(), llvm::LiveRangeCalc::setLiveOutValue(), SplitCriticalEdge(), llvm::SplitEditor::splitRegInBlock(), llvm::SplitEditor::splitRegOutBlock(), llvm::SplitEditor::splitSingleBlock(), llvm::MachineTraceMetrics::Ensemble::verify(), verifyCTRBranch(), and VerifyPHIs().
|
inline |
getParent - Return the MachineFunction containing this basic block.
Definition at line 137 of file MachineBasicBlock.h.
Referenced by llvm::addFrameReference(), addLiveIn(), addLiveInRegs(), llvm::LivePhysRegs::addLiveIns(), llvm::LivePhysRegs::addLiveOuts(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::AddPHIOperand(), addSavedGPR(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), BBHasFallthrough(), llvm::SIInstrInfo::buildIndirectRead(), llvm::SIInstrInfo::buildIndirectWrite(), llvm::BuildMI(), llvm::SIInstrInfo::calculateLDSSpillAddress(), canCombineWithMUL(), canFallThrough(), canFallThroughTo(), canFoldCopy(), llvm::AArch64InstrInfo::canInsertSelect(), llvm::PPCInstrInfo::canInsertSelect(), llvm::X86InstrInfo::canInsertSelect(), llvm::X86FrameLowering::canUseAsEpilogue(), llvm::MachineOperand::ChangeToRegister(), llvm::X86InstrInfo::classifyLEAReg(), CombineCVTAToLocal(), llvm::PPCInstrInfo::commuteInstruction(), llvm::TargetInstrInfo::commuteInstruction(), llvm::X86InstrInfo::commuteInstruction(), llvm::TargetSchedModel::computeOutputLatency(), concatenateMemOperands(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::Thumb1InstrInfo::copyPhysReg(), llvm::NVPTXInstrInfo::copyPhysReg(), llvm::MachineFunction::DeleteMachineBasicBlock(), DoesModifyCalleeSavedReg(), llvm::LexicalScopes::dominates(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::PPCTargetLowering::EmitAtomicBinary(), emitBlockAfter(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), emitComments(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::MachineInstr::emitError(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::HexagonTargetLowering::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(), llvm::X86FrameLowering::emitSPUpdate(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), emitThumbRegPlusImmInReg(), EmitXBegin(), llvm::RegScavenger::enterBasicBlock(), eraseFromParent(), llvm::MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval(), eraseGPOpnd(), llvm::SparcTargetLowering::expandAtomicRMW(), expandLoadStackGuard(), llvm::ARMBaseInstrInfo::expandLoadStackGuardBase(), llvm::Mips16InstrInfo::expandPostRAPseudo(), llvm::MipsSEInstrInfo::expandPostRAPseudo(), llvm::AMDGPUInstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::SIInstrInfo::expandPostRAPseudo(), llvm::AArch64InstrInfo::expandPostRAPseudo(), llvm::SparcTargetLowering::expandSelectCC(), llvm::finalizeBundle(), findDeadCallerSavedReg(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::findPHICopyInsertPoint(), FixTail(), llvm::TargetInstrInfo::foldMemoryOperand(), forceReg(), llvm::RegScavenger::forward(), FuseInst(), FuseTwoAddrInst(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::X86InstrInfo::genAlternativeCodeSequence(), getBBFallenThrough(), llvm::MachineLoop::getBottomBlock(), getConstantFromPool(), getFrameIndexMMO(), getFullName(), llvm::ARMHazardRecognizer::getHazardType(), llvm::AArch64InstrInfo::GetInstSizeInBytes(), llvm::MSP430InstrInfo::GetInstSizeInBytes(), llvm::MipsInstrInfo::GetInstSizeInBytes(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::X86InstrInfo::getMachineCombinerPatterns(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfs(), llvm::MipsInstrInfo::GetMemOperand(), getNextBlock(), llvm::PPCInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpRegClass(), llvm::TargetInstrInfo::getSPAdjust(), llvm::X86InstrInfo::getSPAdjust(), getSymbol(), GetSymbolRef(), llvm::MachineLoop::getTopBlock(), HandleVRSaveUpdate(), hasReassocSibling(), hasVGPROperands(), hasVirtualRegDefsInBasicBlock(), llvm::RegScavenger::initRegState(), llvm::ARMBaseInstrInfo::InsertBranch(), llvm::SlotIndexes::insertMBBInMaps(), llvm::AArch64InstrInfo::insertSelect(), llvm::PPCInstrInfo::insertSelect(), llvm::X86InstrInfo::insertSelect(), isNoReturnDef(), llvm::SIInstrInfo::isOperandLegal(), llvm::ARMBaseInstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::SystemZInstrInfo::isStackSlotCopy(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::MipsSEInstrInfo::loadImmediate(), llvm::XCoreInstrInfo::loadImmediate(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::AMDGPUMCInstLower::lower(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::X86TargetLowering::LowerCustomJumpTableEntry(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::Mips16InstrInfo::makeFrame(), llvm::AArch64RegisterInfo::materializeFrameBaseRegister(), llvm::PPCRegisterInfo::materializeFrameBaseRegister(), llvm::ARMBaseRegisterInfo::materializeFrameBaseRegister(), MIsNeedChainEdge(), moveAfter(), moveBefore(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64RegisterInfo::needsFrameBaseReg(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), PrevCrossBBInst(), print(), llvm::MachineInstr::print(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), ProfitableToMerge(), reassociateOps(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), removeFromParent(), RemoveVRSaveCode(), llvm::Thumb2InstrInfo::ReplaceTailWithBranchTo(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), llvm::ThumbRegisterInfo::resolveFrameIndex(), llvm::AArch64RegisterInfo::resolveFrameIndex(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::ARMBaseRegisterInfo::resolveFrameIndex(), llvm::SystemZFrameLowering::restoreCalleeSavedRegisters(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), llvm::XCoreFrameLowering::restoreCalleeSavedRegisters(), llvm::ARMFrameLowering::restoreCalleeSavedRegisters(), llvm::MSP430FrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::PPCFrameLowering::restoreCalleeSavedRegisters(), restoreCRs(), llvm::Mips16InstrInfo::restoreFrame(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::Mips16RegisterInfo::saveScavengerRegister(), llvm::ThumbRegisterInfo::saveScavengerRegister(), llvm::VLIWMachineScheduler::schedule(), setCallTargetReg(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::MachineOperand::setIsDef(), llvm::MachineOperand::setReg(), llvm::CoalescerPair::setRegisters(), llvm::ARMBaseRegisterInfo::shouldCoalesce(), llvm::Mips16FrameLowering::spillCalleeSavedRegisters(), llvm::MipsSEFrameLowering::spillCalleeSavedRegisters(), llvm::SystemZFrameLowering::spillCalleeSavedRegisters(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), llvm::XCoreFrameLowering::spillCalleeSavedRegisters(), llvm::ARMFrameLowering::spillCalleeSavedRegisters(), llvm::MSP430FrameLowering::spillCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), SplitCriticalEdge(), llvm::SIInstrInfo::splitSMRD(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::X86InstrInfo::storeRegToStackSlot(), UpdateOperandRegClass(), UpdatePredRedefs(), updateTerminator(), llvm::R600InstrInfo::usesTextureCache(), llvm::R600InstrInfo::usesVertexCache(), verifyCTRBranch(), llvm::SIInstrInfo::verifyInstruction(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().
|
inline |
Definition at line 138 of file MachineBasicBlock.h.
| MCSymbol * MachineBasicBlock::getSymbol | ( | ) | const |
getSymbol - Return the MCSymbol for this basic block.
Definition at line 52 of file MachineBasicBlock.cpp.
References 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::ARMAsmPrinter::EmitJumpTableAddrs(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::ARMAsmPrinter::EmitJumpTableInsts(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::SystemZMCInstLower::getExpr(), llvm::HexagonLowerToMC(), llvm::MSP430MCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::X86TargetLowering::LowerCustomJumpTableEntry(), llvm::AArch64MCInstLower::lowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineInstrToMCInst(), LowerSymbolOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), and llvm::MipsAsmPrinter::printOperand().
|
inline |
hasAddressTaken - Test whether this block is potentially the target of an indirect branch.
Definition at line 129 of file MachineBasicBlock.h.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart(), llvm::HexagonAsmPrinter::isBlockOnlyReachableByFallthrough(), and print().
| MachineBasicBlock::instr_iterator MachineBasicBlock::insert | ( | instr_iterator | I, |
| MachineInstr * | M | ||
| ) |
Insert MI into the instruction list before I, possibly inside a bundle.
If the insertion point is inside a bundle, MI will be added to the bundle, otherwise MI will not be added to any bundle. That means this function alone can't be used to prepend or append instructions to bundles. See MIBundleBuilder::insert() for a more reliable way of doing that.
Definition at line 956 of file MachineBasicBlock.cpp.
References llvm::MachineInstr::BundledPred, llvm::MachineInstr::BundledSucc, llvm::ilist< NodeTy >::insert(), instr_end(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and llvm::MachineInstr::setFlag().
Referenced by llvm::BuildMI(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::X86FrameLowering::emitPrologue(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::TargetInstrInfo::foldMemoryOperand(), FuseInst(), FuseTwoAddrInst(), llvm::MIRParserImpl::initializeMachineBasicBlock(), llvm::MIBundleBuilder::insert(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::X86InstrInfo::optimizeCompareInstr(), ProcessSDDbgValues(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), restoreCRs(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::PPCFrameLowering::spillCalleeSavedRegisters(), and llvm::PPCInstrInfo::storeRegToStackSlot().
Insert a range of instructions into the instruction list before I.
Definition at line 508 of file MachineBasicBlock.h.
References end(), and llvm::ilist< NodeTy >::insert().
|
inline |
Insert MI into the instruction list before I.
Definition at line 515 of file MachineBasicBlock.h.
References end(), llvm::ilist< NodeTy >::insert(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and llvm::AArch64CC::MI.
|
inline |
Insert MI into the instruction list after I.
Definition at line 524 of file MachineBasicBlock.h.
References end(), llvm::iplist< NodeTy, Traits >::insertAfter(), llvm::MachineInstr::isBundledWithPred(), llvm::MachineInstr::isBundledWithSucc(), and llvm::AArch64CC::MI.
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
|
inline |
Definition at line 223 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::back().
|
inline |
Definition at line 225 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::back().
|
inline |
Definition at line 232 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::begin().
Referenced by llvm::HexagonInstrInfo::AnalyzeBranch(), begin(), llvm::finalizeBundles(), getFirstInstrTerminator(), getFirstNonPHI(), getLastNonDebugInstr(), INITIALIZE_PASS(), print(), ReplaceUsesOfBlockWith(), SplitCriticalEdge(), and transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 233 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::begin().
|
inline |
Definition at line 234 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::end().
Referenced by llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::MipsAsmPrinter::EmitInstruction(), end(), llvm::finalizeBundle(), llvm::finalizeBundles(), findDebugLoc(), getBundledUseMI(), getFirstInstrTerminator(), getFirstNonPHI(), getLastNonDebugInstr(), INITIALIZE_PASS(), insert(), llvm::MachineInstr::isIdenticalTo(), llvm::ARMBaseInstrInfo::isPredicated(), llvm::MachineOperandIteratorBase::MachineOperandIteratorBase(), print(), ReplaceUsesOfBlockWith(), SplitCriticalEdge(), and transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 235 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::end().
|
inline |
Definition at line 222 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::front().
|
inline |
Definition at line 224 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::front().
|
inline |
Definition at line 236 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::rbegin().
Referenced by rbegin().
|
inline |
Definition at line 237 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::rbegin().
|
inline |
Definition at line 238 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::rend().
Referenced by rend().
|
inline |
Definition at line 239 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::rend().
|
inline |
isLandingPad - Returns true if the block is a landing pad.
That is this basic block is entered via an exception handler.
Definition at line 363 of file MachineBasicBlock.h.
Referenced by addLiveIn(), CorrectExtraCFGEdges(), llvm::findPHICopyInsertPoint(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), print(), and SplitCriticalEdge().
| bool MachineBasicBlock::isLayoutSuccessor | ( | const MachineBasicBlock * | MBB | ) | const |
isLayoutSuccessor - 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 618 of file MachineBasicBlock.cpp.
References I.
Referenced by llvm::BPFInstrInfo::AnalyzeBranch(), llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::SparcInstrInfo::AnalyzeBranch(), llvm::MSP430InstrInfo::AnalyzeBranch(), llvm::SystemZInstrInfo::AnalyzeBranch(), llvm::FastISel::fastEmitBranch(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), ProfitableToMerge(), SplitCriticalEdge(), and updateTerminator().
isLiveIn - Return true if the specified register is in the live in set.
Definition at line 335 of file MachineBasicBlock.cpp.
References I, livein_begin(), and livein_end().
Referenced by addLiveIn(), addLiveInRegs(), addSavedGPR(), llvm::SIInstrInfo::calculateLDSSpillAddress(), checkAndUpdateEFLAGSKill(), computeRegisterLiveness(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), and llvm::AArch64InstrInfo::optimizeCompareInstr().
| bool MachineBasicBlock::isPredecessor | ( | const MachineBasicBlock * | MBB | ) | const |
isPredecessor - Return true if the specified MBB is a predecessor of this block.
Definition at line 610 of file MachineBasicBlock.cpp.
References pred_begin(), and pred_end().
Referenced by llvm::MachineTraceMetrics::Ensemble::invalidate(), and llvm::MachineTraceMetrics::Ensemble::verify().
| bool MachineBasicBlock::isSuccessor | ( | const MachineBasicBlock * | MBB | ) | const |
isSuccessor - Return true if the specified MBB is a successor of this block.
Definition at line 614 of file MachineBasicBlock.cpp.
References succ_begin(), and succ_end().
Referenced by canFallThrough(), llvm::ScheduleDAGMILive::computeCyclicCriticalPath(), llvm::MachineTraceMetrics::Ensemble::invalidate(), IsBetterFallthrough(), and llvm::MachineTraceMetrics::Ensemble::verify().
|
inline |
Definition at line 347 of file MachineBasicBlock.h.
Referenced by addLiveIns(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::RegScavenger::initRegState(), isLiveIn(), print(), and SplitCriticalEdge().
|
inline |
Definition at line 349 of file MachineBasicBlock.h.
Referenced by print().
|
inline |
Definition at line 348 of file MachineBasicBlock.h.
Referenced by addLiveIns(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::RegScavenger::initRegState(), isLiveIn(), print(), and SplitCriticalEdge().
| void MachineBasicBlock::moveAfter | ( | MachineBasicBlock * | NewBefore | ) |
Definition at line 376 of file MachineBasicBlock.cpp.
References getParent(), and llvm::MachineFunction::splice().
| void MachineBasicBlock::moveBefore | ( | MachineBasicBlock * | NewAfter | ) |
moveBefore/moveAfter - 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 372 of file MachineBasicBlock.cpp.
References getParent(), and llvm::MachineFunction::splice().
|
inline |
Definition at line 495 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::pop_back().
|
inline |
Definition at line 494 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::pop_front().
|
inline |
Definition at line 270 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(), isPredecessor(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), predecessors(), print(), verifyCTRBranch(), and VerifyPHIs().
|
inline |
Definition at line 271 of file MachineBasicBlock.h.
|
inline |
Definition at line 285 of file MachineBasicBlock.h.
Referenced by llvm::AsmPrinter::EmitBasicBlockStart(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::MipsAsmPrinter::isBlockOnlyReachableByFallthrough(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), and print().
|
inline |
Definition at line 272 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(), isPredecessor(), predecessors(), print(), verifyCTRBranch(), and VerifyPHIs().
|
inline |
Definition at line 273 of file MachineBasicBlock.h.
|
inline |
Definition at line 274 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().
|
inline |
Definition at line 276 of file MachineBasicBlock.h.
|
inline |
Definition at line 278 of file MachineBasicBlock.h.
Referenced by llvm::LiveVariables::MarkVirtRegAliveInBlock().
|
inline |
Definition at line 280 of file MachineBasicBlock.h.
|
inline |
Definition at line 282 of file MachineBasicBlock.h.
Referenced by BBIsJumpedOver(), llvm::LiveIntervals::hasPHIKill(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), and isSplitEdge().
|
inline |
Definition at line 303 of file MachineBasicBlock.h.
References pred_begin(), and pred_end().
Referenced by llvm::LiveInterval::constructMainRangeFromSubranges(), determineMissingVNIs(), extendSegmentsToUses(), getBBFallenThrough(), llvm::MachineTraceMetrics::Ensemble::invalidate(), reachingDefAlgorithm(), and searchForVNI().
|
inline |
Definition at line 306 of file MachineBasicBlock.h.
References pred_begin(), and pred_end().
| void MachineBasicBlock::print | ( | raw_ostream & | OS, |
| SlotIndexes * | Indexes = nullptr |
||
| ) | const |
Definition at line 241 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, | ||
| SlotIndexes * | Indexes = nullptr |
||
| ) | const |
Definition at line 254 of file MachineBasicBlock.cpp.
References getBasicBlock(), llvm::SlotIndexes::getInstructionIndex(), llvm::SlotIndexes::getMBBStartIdx(), getNumber(), getParent(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), hasAddressTaken(), llvm::SlotIndexes::hasIndex(), I, instr_begin(), instr_end(), isLandingPad(), livein_begin(), livein_empty(), livein_end(), pred_begin(), pred_empty(), pred_end(), llvm::SI, succ_begin(), succ_empty(), and succ_end().
| void MachineBasicBlock::printAsOperand | ( | raw_ostream & | OS, |
| bool | PrintType = true |
||
| ) | const |
Definition at line 324 of file MachineBasicBlock.cpp.
References getNumber().
|
inline |
Definition at line 496 of file MachineBasicBlock.h.
References llvm::ilist< NodeTy >::push_back().
Referenced by ProcessSourceNode().
|
inline |
Definition at line 245 of file MachineBasicBlock.h.
References instr_rbegin().
Referenced by llvm::MipsInstrInfo::AnalyzeBranch(), llvm::X86InstrInfo::AnalyzeBranchPredicate(), FindLastAluClause(), getLastNonPseudo(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::MipsInstrInfo::RemoveBranch(), and removeMMOsFromMemoryOperations().
|
inline |
Definition at line 246 of file MachineBasicBlock.h.
References 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 571 of file MachineBasicBlock.h.
References I, and llvm::iplist< NodeTy, Traits >::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 948 of file MachineBasicBlock.cpp.
References llvm::MachineInstr::BundledPred, llvm::MachineInstr::BundledSucc, llvm::MachineInstr::clearFlag(), llvm::iplist< NodeTy, Traits >::remove(), and unbundleSingleMI().
| MachineBasicBlock * MachineBasicBlock::removeFromParent | ( | ) |
removeFromParent - This method unlinks 'this' from the containing function, and returns it, but does not delete it.
Definition at line 969 of file MachineBasicBlock.cpp.
References getParent(), and llvm::MachineFunction::remove().
| void MachineBasicBlock::removeLiveIn | ( | unsigned | Reg | ) |
removeLiveIn - Remove the specified register from the live in set.
Definition at line 328 of file MachineBasicBlock.cpp.
References I.
Referenced by emitGPDisp().
| void MachineBasicBlock::removeSuccessor | ( | MachineBasicBlock * | succ | ) |
removeSuccessor - Remove successor from the successors list of this MachineBasicBlock.
The Predecessors list of succ is automatically updated.
Definition at line 491 of file MachineBasicBlock.cpp.
References I.
Referenced by CorrectExtraCFGEdges(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), transferSuccessors(), and transferSuccessorsAndUpdatePHIs().
| MachineBasicBlock::succ_iterator MachineBasicBlock::removeSuccessor | ( | succ_iterator | I | ) |
removeSuccessor - Remove specified successor from the successors list of this MachineBasicBlock.
The Predecessors list of succ is automatically updated. Return the iterator to the element after the one removed.
Definition at line 506 of file MachineBasicBlock.cpp.
|
inline |
Definition at line 247 of file MachineBasicBlock.h.
References instr_rend().
Referenced by llvm::MipsInstrInfo::AnalyzeBranch(), llvm::X86InstrInfo::AnalyzeBranchPredicate(), FindLastAluClause(), getFirstEpilogueInst(), getLastNonPseudo(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::MipsInstrInfo::RemoveBranch(), and removeMMOsFromMemoryOperations().
|
inline |
Definition at line 248 of file MachineBasicBlock.h.
References instr_rend().
| void MachineBasicBlock::replaceSuccessor | ( | MachineBasicBlock * | Old, |
| MachineBasicBlock * | New | ||
| ) |
replaceSuccessor - Replace successor OLD with NEW and update weight info.
Definition at line 519 of file MachineBasicBlock.cpp.
References I, succ_begin(), and succ_end().
Referenced by ReplaceUsesOfBlockWith().
| void MachineBasicBlock::ReplaceUsesOfBlockWith | ( | MachineBasicBlock * | Old, |
| MachineBasicBlock * | New | ||
| ) |
ReplaceUsesOfBlockWith - Given a machine basic block that branched to 'Old', change the code and CFG so that it branches to 'New' instead.
Definition at line 986 of file MachineBasicBlock.cpp.
References I, instr_begin(), instr_end(), and replaceSuccessor().
Referenced by SplitCriticalEdge().
|
inline |
setAlignment - Set alignment of the basic block.
The alignment is specified as log2(bytes).
Definition at line 359 of file MachineBasicBlock.h.
References Align().
Referenced by llvm::MIRParserImpl::initializeMachineBasicBlock().
|
inline |
setHasAddressTaken - Set this block to reflect that it potentially is the target of an indirect branch.
Definition at line 133 of file MachineBasicBlock.h.
Referenced by llvm::MIRParserImpl::initializeMachineBasicBlock(), llvm::HexagonTargetLowering::LowerBR_JT(), and llvm::FunctionLoweringInfo::set().
setIsLandingPad - Indicates the block is a landing pad.
That is this basic block is entered via an exception handler.
Definition at line 367 of file MachineBasicBlock.h.
Referenced by llvm::MIRParserImpl::initializeMachineBasicBlock().
|
inline |
Definition at line 674 of file MachineBasicBlock.h.
References N.
| void MachineBasicBlock::setSuccWeight | ( | succ_iterator | I, |
| uint32_t | weight | ||
| ) |
Set successor weight of a given iterator.
Definition at line 1096 of file MachineBasicBlock.cpp.
Referenced by ScaleWeights().
|
inline |
Definition at line 219 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::size().
Referenced by llvm::AggressiveAntiDepState::AggressiveAntiDepState(), llvm::MipsAsmPrinter::EmitBasicBlockEnd(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::CriticalAntiDepBreaker::StartBlock(), and llvm::AggressiveAntiDepBreaker::StartBlock().
| MachineBasicBlock::iterator MachineBasicBlock::SkipPHIsAndLabels | ( | MachineBasicBlock::iterator | I | ) |
SkipPHIsAndLabels - Return the first instruction in MBB after I that is not a PHI or a label.
This is the correct point to insert copies at the beginning of a basic block.
Definition at line 155 of file MachineBasicBlock.cpp.
Referenced by addLiveIn(), findInsertLocation(), llvm::findPHICopyInsertPoint(), and llvm::SplitEditor::leaveIntvAtTop().
|
inline |
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 326 of file MachineBasicBlock.h.
|
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 591 of file MachineBasicBlock.h.
Referenced by llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), llvm::SparcTargetLowering::expandAtomicRMW(), llvm::SparcTargetLowering::expandSelectCC(), llvm::ScheduleDAGMI::moveInstruction(), llvm::ScheduleDAGMI::placeDebugValues(), splitBlockAfter(), and splitBlockBefore().
|
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 602 of file MachineBasicBlock.h.
References llvm::iplist< NodeTy, Traits >::splice().
| MachineBasicBlock * MachineBasicBlock::SplitCriticalEdge | ( | MachineBasicBlock * | Succ, |
| Pass * | P | ||
| ) |
SplitCriticalEdge - 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 666 of file MachineBasicBlock.cpp.
References addLiveIn(), llvm::LiveVariables::addNewBlock(), llvm::LiveRange::addSegment(), addSuccessor(), llvm::TargetInstrInfo::AnalyzeBranch(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallSet< T, N, C >::count(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::dbgs(), DEBUG, llvm::SmallVectorTemplateCommon< T, typename >::end(), 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::MachineFunction::getTarget(), llvm::LiveVariables::getVarInfo(), llvm::LiveRange::getVNInfoAt(), I, llvm::TargetRegisterInfo::index2VirtReg(), llvm::SmallSet< T, N, C >::insert(), llvm::MachineFunction::insert(), llvm::TargetInstrInfo::InsertBranch(), llvm::SlotIndexes::insertMBBInMaps(), instr_begin(), instr_end(), isLandingPad(), isLayoutSuccessor(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isUndef(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::LiveVariables::VarInfo::Kills, llvm::LiveRange::liveAt(), livein_begin(), livein_end(), 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(), llvm::TargetMachine::requiresStructuredCFG(), TII, and updateTerminator().
|
inline |
Definition at line 286 of file MachineBasicBlock.h.
Referenced by llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), BBHasFallthrough(), BBIsJumpedOver(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_begin(), bothUsedInPHI(), checkAndUpdateEFLAGSKill(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_begin(), llvm::GraphTraits< MachineBasicBlock * >::child_begin(), llvm::GraphTraits< const MachineBasicBlock * >::child_begin(), CorrectExtraCFGEdges(), findFalseBlock(), llvm::MachineBranchProbabilityInfo::getEdgeWeight(), llvm::MachineBranchProbabilityInfo::getHotSucc(), getLandingPadSuccessor(), llvm::MachineBranchProbabilityInfo::getSumForBlock(), isCCLiveOut(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), isSuccessor(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), OtherSucc(), print(), llvm::LiveIntervals::pruneValue(), replaceSuccessor(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), ScaleWeights(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), llvm::ScheduleDAGInstrs::startBlockForKills(), successors(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), and updateTerminator().
|
inline |
Definition at line 287 of file MachineBasicBlock.h.
|
inline |
Definition at line 301 of file MachineBasicBlock.h.
Referenced by llvm::ScheduleDAGSDNodes::computeOperandLatency(), isNoReturnDef(), print(), llvm::TargetInstrInfo::ReplaceTailWithBranchTo(), transferSuccessors(), transferSuccessorsAndUpdatePHIs(), and updateTerminator().
|
inline |
Definition at line 288 of file MachineBasicBlock.h.
Referenced by llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), BBHasFallthrough(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::BlkSucc_end(), bothUsedInPHI(), checkAndUpdateEFLAGSKill(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::child_end(), llvm::GraphTraits< MachineBasicBlock * >::child_end(), llvm::GraphTraits< const MachineBasicBlock * >::child_end(), CorrectExtraCFGEdges(), findFalseBlock(), llvm::MachineBranchProbabilityInfo::getEdgeWeight(), llvm::MachineBranchProbabilityInfo::getHotSucc(), getLandingPadSuccessor(), llvm::MachineBranchProbabilityInfo::getSumForBlock(), isCCLiveOut(), llvm::X86InstrInfo::isSafeToClobberEFLAGS(), isSuccessor(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), OtherSucc(), print(), llvm::LiveIntervals::pruneValue(), replaceSuccessor(), ScaleWeights(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), llvm::ScheduleDAGInstrs::startBlockForKills(), successors(), and updateTerminator().
|
inline |
Definition at line 289 of file MachineBasicBlock.h.
|
inline |
Definition at line 290 of file MachineBasicBlock.h.
|
inline |
Definition at line 292 of file MachineBasicBlock.h.
|
inline |
Definition at line 294 of file MachineBasicBlock.h.
|
inline |
Definition at line 296 of file MachineBasicBlock.h.
|
inline |
Definition at line 298 of file MachineBasicBlock.h.
Referenced by BBIsJumpedOver(), getLandingPadSuccessor(), llvm::RegionTraits< MachineFunction >::getNumSuccessors(), llvm::MachineBranchProbabilityInfo::getSumForBlock(), and isSplitEdge().
|
inline |
Definition at line 309 of file MachineBasicBlock.h.
References succ_begin(), and succ_end().
Referenced by llvm::LivePhysRegs::addLiveOuts(), llvm::X86InstrInfo::AnalyzeBranchPredicate(), BBHasFallthrough(), llvm::MachineTraceMetrics::Ensemble::invalidate(), llvm::LiveVariables::isLiveOut(), llvm::AArch64InstrInfo::optimizeCompareInstr(), and updateLiveness().
|
inline |
Definition at line 312 of file MachineBasicBlock.h.
References succ_begin(), and succ_end().
|
inline |
Definition at line 250 of file MachineBasicBlock.h.
References end(), and getFirstTerminator().
Referenced by llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), and terminatorsNeedFlagsAsInput().
|
inline |
Definition at line 253 of file MachineBasicBlock.h.
References end(), and getFirstTerminator().
| void MachineBasicBlock::transferSuccessors | ( | MachineBasicBlock * | fromMBB | ) |
transferSuccessors - 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 569 of file MachineBasicBlock.cpp.
References addSuccessor(), removeSuccessor(), succ_begin(), and succ_empty().
| void MachineBasicBlock::transferSuccessorsAndUpdatePHIs | ( | MachineBasicBlock * | fromMBB | ) |
transferSuccessorsAndUpdatePHIs - 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 587 of file MachineBasicBlock.cpp.
References addSuccessor(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), instr_begin(), instr_end(), llvm::MachineInstr::isPHI(), llvm::AArch64CC::MI, removeSuccessor(), llvm::MachineOperand::setMBB(), succ_begin(), and succ_empty().
Referenced by llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), llvm::SparcTargetLowering::expandAtomicRMW(), llvm::SparcTargetLowering::expandSelectCC(), splitBlockAfter(), and splitBlockBefore().
| void MachineBasicBlock::updateTerminator | ( | ) |
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 381 of file MachineBasicBlock.cpp.
References llvm::TargetInstrInfo::AnalyzeBranch(), 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(), llvm::SI, succ_begin(), succ_empty(), succ_end(), and TII.
Referenced by SplitCriticalEdge().
|
friend |
Definition at line 696 of file MachineBasicBlock.h.
|
friend |
Definition at line 687 of file MachineBasicBlock.h.
|
friend |
Definition at line 110 of file MachineBasicBlock.h.
1.8.6