LLVM API Documentation

llvm::MachineBasicBlock Class Reference

#include <MachineBasicBlock.h>

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

List of all members.

Public Types

typedef Instructions::iterator iterator
typedef
Instructions::const_iterator 
const_iterator
typedef std::reverse_iterator
< const_iterator > 
const_reverse_iterator
typedef std::reverse_iterator
< iterator > 
reverse_iterator
typedef std::vector
< MachineBasicBlock * >
::iterator 
pred_iterator
typedef std::vector
< MachineBasicBlock * >
::const_iterator 
const_pred_iterator
typedef std::vector
< MachineBasicBlock * >
::iterator 
succ_iterator
typedef std::vector
< MachineBasicBlock * >
::const_iterator 
const_succ_iterator
typedef std::vector
< MachineBasicBlock * >
::reverse_iterator 
pred_reverse_iterator
typedef std::vector
< MachineBasicBlock * >
::const_reverse_iterator 
const_pred_reverse_iterator
typedef std::vector
< MachineBasicBlock * >
::reverse_iterator 
succ_reverse_iterator
typedef std::vector
< MachineBasicBlock * >
::const_reverse_iterator 
const_succ_reverse_iterator
typedef std::vector< unsigned >
::iterator 
livein_iterator
typedef std::vector< unsigned >
::const_iterator 
const_livein_iterator

Public Member Functions

const BasicBlock * getBasicBlock () const
const MachineFunction * getParent () const
MachineFunction * getParent ()
unsigned size () const
bool empty () const
MachineInstr & front ()
MachineInstr & back ()
const MachineInstr & front () const
const MachineInstr & back () 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
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
void addLiveIn (unsigned Reg)
void removeLiveIn (unsigned Reg)
bool isLiveIn (unsigned Reg) const
livein_iterator livein_begin ()
const_livein_iterator livein_begin () const
livein_iterator livein_end ()
const_livein_iterator livein_end () const
bool livein_empty () const
unsigned getAlignment () const
void setAlignment (unsigned Align)
bool isLandingPad () const
void setIsLandingPad ()
void moveBefore (MachineBasicBlock *NewAfter)
void moveAfter (MachineBasicBlock *NewBefore)
void addSuccessor (MachineBasicBlock *succ)
void removeSuccessor (MachineBasicBlock *succ)
succ_iterator removeSuccessor (succ_iterator I)
void transferSuccessors (MachineBasicBlock *fromMBB)
bool isSuccessor (MachineBasicBlock *MBB) const
bool isLayoutSuccessor (MachineBasicBlock *MBB) const
iterator getFirstTerminator ()
void pop_front ()
void pop_back ()
void push_back (MachineInstr *MI)
template<typename IT>
void insert (iterator I, IT S, IT E)
iterator insert (iterator I, MachineInstr *M)
iterator erase (iterator I)
iterator erase (iterator I, iterator E)
MachineInstr * remove (MachineInstr *I)
void clear ()
void splice (iterator where, MachineBasicBlock *Other, iterator From)
void splice (iterator where, MachineBasicBlock *Other, iterator From, iterator To)
MachineBasicBlock * removeFromParent ()
void eraseFromParent ()
void ReplaceUsesOfBlockWith (MachineBasicBlock *Old, MachineBasicBlock *New)
bool CorrectExtraCFGEdges (MachineBasicBlock *DestA, MachineBasicBlock *DestB, bool isCond)
void dump () const
void print (std::ostream &OS) const
void print (std::ostream *OS) const
int getNumber () const
void setNumber (int N)

Friends

struct ilist_sentinel_traits< MachineBasicBlock >
class MachineFunction
struct ilist_traits< MachineBasicBlock >


Detailed Description

Definition at line 49 of file MachineBasicBlock.h.


Member Typedef Documentation

typedef Instructions::iterator llvm::MachineBasicBlock::iterator

Definition at line 95 of file MachineBasicBlock.h.

typedef Instructions::const_iterator llvm::MachineBasicBlock::const_iterator

Definition at line 96 of file MachineBasicBlock.h.

Definition at line 97 of file MachineBasicBlock.h.

typedef std::reverse_iterator<iterator> llvm::MachineBasicBlock::reverse_iterator

Definition at line 98 of file MachineBasicBlock.h.

Definition at line 118 of file MachineBasicBlock.h.

Definition at line 119 of file MachineBasicBlock.h.

Definition at line 120 of file MachineBasicBlock.h.

Definition at line 121 of file MachineBasicBlock.h.

Definition at line 123 of file MachineBasicBlock.h.

Definition at line 125 of file MachineBasicBlock.h.

Definition at line 127 of file MachineBasicBlock.h.

Definition at line 129 of file MachineBasicBlock.h.

Definition at line 180 of file MachineBasicBlock.h.

Definition at line 181 of file MachineBasicBlock.h.


Member Function Documentation

const BasicBlock* llvm::MachineBasicBlock::getBasicBlock (  )  const [inline]

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

getParent - Return the MachineFunction containing this basic block.

Definition at line 92 of file MachineBasicBlock.h.

Referenced by llvm::addFrameReference(), llvm::MachineInstrBuilder::addMemOperand(), BBHasFallthrough(), llvm::BuildMI(), canFallThroughTo(), llvm::MachineOperand::ChangeToRegister(), llvm::X86InstrInfo::commuteInstruction(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::copyRegToReg(), CorrectExtraCFGEdges(), createSlotTracker(), llvm::MachineFunction::DeleteMachineBasicBlock(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::IA64RegisterInfo::eliminateFrameIndex(), llvm::ARMRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::PIC16TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::ARMRegisterInfo::emitLoadConstPool(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::RegScavenger::enterBasicBlock(), eraseFromParent(), llvm::SelectionDAGLowering::FindMergedConditions(), FixTail(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::ARMInstrInfo::GetInstSizeInBytes(), GetInstSizeWithDesc(), getModuleFromVal(), getNextBlock(), getSymTab(), HandleVRSaveUpdate(), llvm::ARMInstrInfo::InsertBranch(), interferes(), llvm::XCoreInstrInfo::isInvariantLoad(), llvm::X86InstrInfo::isInvariantLoad(), llvm::LoopBase< BlockT >::isLCSSAForm(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), llvm::X86InstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), llvm::PIC16InstrInfo::loadRegFromStackSlot(), llvm::ARMInstrInfo::loadRegFromStackSlot(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), MakeM0Inst(), moveAfter(), moveBefore(), llvm::MachineOperand::print(), print(), llvm::AsmPrinter::PrintSpecial(), llvm::X86InstrInfo::reMaterialize(), llvm::TargetInstrInfoImpl::reMaterialize(), llvm::ARMInstrInfo::reMaterialize(), llvm::ARMInstrInfo::RemoveBranch(), removeFromParent(), RemoveVRSaveCode(), llvm::ARMInstrInfo::restoreCalleeSavedRegisters(), llvm::MachineOperand::setReg(), llvm::XCoreInstrInfo::spillCalleeSavedRegisters(), llvm::X86InstrInfo::spillCalleeSavedRegisters(), llvm::ARMInstrInfo::spillCalleeSavedRegisters(), llvm::SplitCriticalMachineEdge(), llvm::X86InstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), llvm::PIC16InstrInfo::storeRegToStackSlot(), llvm::ARMInstrInfo::storeRegToStackSlot(), llvm::SelectionDAGLowering::visitBitTestCase(), llvm::SelectionDAGLowering::visitBitTestHeader(), llvm::SelectionDAGLowering::visitJumpTableHeader(), and llvm::SelectionDAGLowering::visitSwitchCase().

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

Definition at line 93 of file MachineBasicBlock.h.

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

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

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

Definition at line 103 of file MachineBasicBlock.h.

Referenced by llvm::ARMRegisterInfo::emitEpilogue().

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

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

Definition at line 105 of file MachineBasicBlock.h.

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

Definition at line 106 of file MachineBasicBlock.h.

iterator llvm::MachineBasicBlock::begin (  )  [inline]

Definition at line 108 of file MachineBasicBlock.h.

Referenced by llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::X86InstrInfo::AnalyzeBranch(), llvm::SPUInstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::ARMInstrInfo::AnalyzeBranch(), llvm::AlphaInstrInfo::AnalyzeBranch(), llvm::RegScavenger::backward(), llvm::CloneFunctionInto(), llvm::CloneTrace(), llvm::CloneTraceInto(), ComputeCommonTailLength(), llvm::LiveIntervals::computeNumbering(), llvm::MachineDominatorTree::dominates(), llvm::X86RegisterInfo::emitEpilogue(), llvm::ARMRegisterInfo::emitEpilogue(), EmitLiveInCopies(), EmitLiveInCopy(), llvm::XCoreRegisterInfo::emitPrologue(), llvm::X86RegisterInfo::emitPrologue(), llvm::SPURegisterInfo::emitPrologue(), llvm::SparcRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::MipsRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), llvm::ARMRegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), firstNonBranchInst(), llvm::RegScavenger::forward(), getFirstTerminator(), llvm::TargetInstrInfoImpl::GetFunctionSizeInBytes(), llvm::X86InstrInfo::getGlobalBaseReg(), HandleInlinedInvoke(), HashEndOfMBB(), llvm::ValueEnumerator::incorporateFunction(), llvm::InlineFunction(), llvm::BasicInlinerImpl::inlineFunctions(), interferes(), isLiveInButUnusedBefore(), LinkFunctionBody(), mergeBaseUpdateLoadStore(), mergeBaseUpdateLSMultiple(), mergeSPUpdates(), mergeSPUpdatesUp(), precedes(), print(), llvm::ARMRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::XCoreInstrInfo::RemoveBranch(), llvm::X86InstrInfo::RemoveBranch(), llvm::SPUInstrInfo::RemoveBranch(), llvm::PPCInstrInfo::RemoveBranch(), llvm::MipsInstrInfo::RemoveBranch(), llvm::ARMInstrInfo::RemoveBranch(), llvm::AlphaInstrInfo::RemoveBranch(), RemoveVRSaveCode(), ReplaceUsesOfBlockWith(), llvm::XCoreInstrInfo::restoreCalleeSavedRegisters(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::DebugLabelFolder::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::Inliner::runOnSCC(), llvm::SplitCriticalMachineEdge(), llvm::UnrollLoop(), llvm::ValueEnumerator::ValueEnumerator(), and WriteFunction().

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

Definition at line 109 of file MachineBasicBlock.h.

iterator llvm::MachineBasicBlock::end (  )  [inline]

Definition at line 110 of file MachineBasicBlock.h.

Referenced by llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::X86InstrInfo::AnalyzeBranch(), llvm::SPUInstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::ARMInstrInfo::AnalyzeBranch(), llvm::AlphaInstrInfo::AnalyzeBranch(), llvm::BuildMI(), llvm::CloneFunctionInto(), llvm::CloneTraceInto(), ComputeCommonTailLength(), llvm::LiveIntervals::computeNumbering(), CorrectExtraCFGEdges(), llvm::XCoreRegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitEpilogue(), llvm::SPURegisterInfo::emitEpilogue(), llvm::SparcRegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::MipsRegisterInfo::emitEpilogue(), llvm::IA64RegisterInfo::emitEpilogue(), llvm::ARMRegisterInfo::emitEpilogue(), llvm::AlphaRegisterInfo::emitEpilogue(), llvm::ScheduleDAGSDNodes::EmitNode(), llvm::X86RegisterInfo::emitPrologue(), llvm::SPURegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::IA64RegisterInfo::emitPrologue(), llvm::ARMRegisterInfo::emitPrologue(), llvm::FastISel::FastEmitInst_extractsubreg(), llvm::FastISel::FastEmitInst_i(), llvm::FastISel::FastEmitInst_r(), llvm::FastISel::FastEmitInst_rf(), llvm::FastISel::FastEmitInst_ri(), llvm::FastISel::FastEmitInst_rr(), llvm::FastISel::FastEmitInst_rri(), firstNonBranchInst(), llvm::RegScavenger::forward(), getFirstTerminator(), llvm::TargetInstrInfoImpl::GetFunctionSizeInBytes(), HandleInlinedInvoke(), HashEndOfMBB(), llvm::ValueEnumerator::incorporateFunction(), llvm::InlineFunction(), llvm::BasicInlinerImpl::inlineFunctions(), interferes(), IsBetterFallthrough(), isSafeToClobberEFLAGS(), LinkFunctionBody(), mergeBaseUpdateLoadStore(), mergeBaseUpdateLSMultiple(), mergeSPUpdates(), mergeSPUpdatesDown(), movePastCSLoadStoreOps(), print(), llvm::ARMRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::XCoreInstrInfo::RemoveBranch(), llvm::X86InstrInfo::RemoveBranch(), llvm::SPUInstrInfo::RemoveBranch(), llvm::PPCInstrInfo::RemoveBranch(), llvm::MipsInstrInfo::RemoveBranch(), llvm::ARMInstrInfo::RemoveBranch(), llvm::AlphaInstrInfo::RemoveBranch(), RemoveVRSaveCode(), ReplaceUsesOfBlockWith(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::DebugLabelFolder::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::Inliner::runOnSCC(), llvm::SplitCriticalMachineEdge(), transferSuccessors(), llvm::FastISel::UpdateValueMap(), llvm::ValueEnumerator::ValueEnumerator(), and WriteFunction().

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

Definition at line 111 of file MachineBasicBlock.h.

reverse_iterator llvm::MachineBasicBlock::rbegin (  )  [inline]

Definition at line 112 of file MachineBasicBlock.h.

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

Definition at line 113 of file MachineBasicBlock.h.

reverse_iterator llvm::MachineBasicBlock::rend (  )  [inline]

Definition at line 114 of file MachineBasicBlock.h.

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

Definition at line 115 of file MachineBasicBlock.h.

pred_iterator llvm::MachineBasicBlock::pred_begin (  )  [inline]

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

Definition at line 132 of file MachineBasicBlock.h.

pred_iterator llvm::MachineBasicBlock::pred_end (  )  [inline]

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

Definition at line 134 of file MachineBasicBlock.h.

pred_reverse_iterator llvm::MachineBasicBlock::pred_rbegin (  )  [inline]

Definition at line 135 of file MachineBasicBlock.h.

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

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

Definition at line 137 of file MachineBasicBlock.h.

pred_reverse_iterator llvm::MachineBasicBlock::pred_rend (  )  [inline]

Definition at line 139 of file MachineBasicBlock.h.

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

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

Definition at line 141 of file MachineBasicBlock.h.

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

Definition at line 143 of file MachineBasicBlock.h.

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

Definition at line 146 of file MachineBasicBlock.h.

Referenced by print().

succ_iterator llvm::MachineBasicBlock::succ_begin (  )  [inline]

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

Definition at line 148 of file MachineBasicBlock.h.

succ_iterator llvm::MachineBasicBlock::succ_end (  )  [inline]

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

Definition at line 150 of file MachineBasicBlock.h.

succ_reverse_iterator llvm::MachineBasicBlock::succ_rbegin (  )  [inline]

Definition at line 151 of file MachineBasicBlock.h.

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

Definition at line 153 of file MachineBasicBlock.h.

succ_reverse_iterator llvm::MachineBasicBlock::succ_rend (  )  [inline]

Definition at line 155 of file MachineBasicBlock.h.

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

Definition at line 157 of file MachineBasicBlock.h.

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

Definition at line 159 of file MachineBasicBlock.h.

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

void llvm::MachineBasicBlock::addLiveIn ( unsigned  Reg  )  [inline]

addLiveIn - Add 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.

Definition at line 168 of file MachineBasicBlock.h.

Referenced by llvm::XCoreRegisterInfo::emitPrologue(), llvm::XCoreInstrInfo::spillCalleeSavedRegisters(), llvm::X86InstrInfo::spillCalleeSavedRegisters(), and llvm::ARMInstrInfo::spillCalleeSavedRegisters().

void MachineBasicBlock::removeLiveIn ( unsigned  Reg  ) 

removeLiveIn - Remove the specified register from the live in set.

Definition at line 187 of file MachineBasicBlock.cpp.

References livein_begin(), and livein_end().

bool MachineBasicBlock::isLiveIn ( unsigned  Reg  )  const

isLiveIn - Return true if the specified register is in the live in set.

Definition at line 193 of file MachineBasicBlock.cpp.

References livein_begin(), and livein_end().

livein_iterator llvm::MachineBasicBlock::livein_begin (  )  [inline]

const_livein_iterator llvm::MachineBasicBlock::livein_begin (  )  const [inline]

Definition at line 183 of file MachineBasicBlock.h.

livein_iterator llvm::MachineBasicBlock::livein_end (  )  [inline]

const_livein_iterator llvm::MachineBasicBlock::livein_end (  )  const [inline]

Definition at line 185 of file MachineBasicBlock.h.

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

Definition at line 186 of file MachineBasicBlock.h.

Referenced by llvm::RegScavenger::enterBasicBlock(), and print().

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

getAlignment - Return alignment of the basic block.

Definition at line 190 of file MachineBasicBlock.h.

References Alignment.

Referenced by llvm::AsmPrinter::printBasicBlockLabel().

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

setAlignment - Set alignment of the basic block.

Definition at line 194 of file MachineBasicBlock.h.

References Alignment.

bool llvm::MachineBasicBlock::isLandingPad (  )  const [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 198 of file MachineBasicBlock.h.

Referenced by print().

void llvm::MachineBasicBlock::setIsLandingPad (  )  [inline]

setIsLandingPad - Indicates the block is a landing pad. That is this basic block is entered via an exception handler.

Definition at line 202 of file MachineBasicBlock.h.

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

References getParent(), and llvm::MachineFunction::splice().

void MachineBasicBlock::moveAfter ( MachineBasicBlock *  NewBefore  ) 

Definition at line 202 of file MachineBasicBlock.cpp.

References BBI, getParent(), and llvm::MachineFunction::splice().

void MachineBasicBlock::addSuccessor ( MachineBasicBlock *  succ  ) 

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

References removePredecessor().

Referenced by CorrectExtraCFGEdges(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), ReplaceUsesOfBlockWith(), llvm::SplitCriticalMachineEdge(), transferSuccessors(), and llvm::SelectionDAGLowering::visitSwitchCase().

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

void MachineBasicBlock::transferSuccessors ( MachineBasicBlock *  fromMBB  ) 

bool MachineBasicBlock::isSuccessor ( MachineBasicBlock *  MBB  )  const

isSuccessor - Return true if the specified MBB is a successor of this block.

Definition at line 251 of file MachineBasicBlock.cpp.

Referenced by IsBetterFallthrough(), isSameOrFallThroughBB(), and ReplaceUsesOfBlockWith().

bool MachineBasicBlock::isLayoutSuccessor ( 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 257 of file MachineBasicBlock.cpp.

References llvm::next().

Referenced by llvm::X86InstrInfo::AnalyzeBranch(), and llvm::FastISel::FastEmitBranch().

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

References begin(), and end().

Referenced by llvm::RegScavenger::scavengeRegister().

void llvm::MachineBasicBlock::pop_front (  )  [inline]

Definition at line 251 of file MachineBasicBlock.h.

void llvm::MachineBasicBlock::pop_back (  )  [inline]

Definition at line 252 of file MachineBasicBlock.h.

Referenced by HandleInlinedInvoke().

void llvm::MachineBasicBlock::push_back ( MachineInstr *  MI  )  [inline]

Definition at line 253 of file MachineBasicBlock.h.

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

iterator llvm::MachineBasicBlock::insert ( iterator  I,
MachineInstr *  M 
) [inline]

Definition at line 256 of file MachineBasicBlock.h.

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

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

Definition at line 262 of file MachineBasicBlock.h.

MachineInstr* llvm::MachineBasicBlock::remove ( MachineInstr *  I  )  [inline]

void llvm::MachineBasicBlock::clear (  )  [inline]

Definition at line 264 of file MachineBasicBlock.h.

void llvm::MachineBasicBlock::splice ( iterator  where,
MachineBasicBlock *  Other,
iterator  From 
) [inline]

splice - Take an instruction from MBB 'Other' at the position From, and insert it into this MBB right before 'where'.

Definition at line 268 of file MachineBasicBlock.h.

References Insts.

void llvm::MachineBasicBlock::splice ( iterator  where,
MachineBasicBlock *  Other,
iterator  From,
iterator  To 
) [inline]

splice - Take a block of instructions from MBB 'Other' in the range [From, To), and insert them into this MBB right before 'where'.

Definition at line 274 of file MachineBasicBlock.h.

References Insts.

MachineBasicBlock * MachineBasicBlock::removeFromParent (  ) 

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

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

Definition at line 264 of file MachineBasicBlock.cpp.

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

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

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

Referenced by llvm::X86InstrInfo::AnalyzeBranch().

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.

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

References addSuccessor(), begin(), end(), isSuccessor(), and removeSuccessor().

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.

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

References end(), getParent(), MadeChange, llvm::next(), removeSuccessor(), succ_begin(), and succ_end().

void MachineBasicBlock::dump (  )  const

Definition at line 126 of file MachineBasicBlock.cpp.

References llvm::cerr(), and print().

void MachineBasicBlock::print ( std::ostream &  OS  )  const

void llvm::MachineBasicBlock::print ( std::ostream *  OS  )  const [inline]

Definition at line 304 of file MachineBasicBlock.h.

References print().

int llvm::MachineBasicBlock::getNumber (  )  const [inline]

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

Definition at line 311 of file MachineBasicBlock.h.


Friends And Related Function Documentation

friend struct ilist_sentinel_traits< MachineBasicBlock > [friend]

Definition at line 74 of file MachineBasicBlock.h.

friend class MachineFunction [friend]

Definition at line 82 of file MachineBasicBlock.h.

friend struct ilist_traits< MachineBasicBlock > [friend]

Definition at line 314 of file MachineBasicBlock.h.


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