LLVM API Documentation
#include <InstrTypes.h>


Public Member Functions | |
| unsigned | getNumSuccessors () const |
| BasicBlock * | getSuccessor (unsigned idx) const |
| void | setSuccessor (unsigned idx, BasicBlock *B) |
Static Public Member Functions | |
| static bool | classof (const Instruction *I) |
| static bool | classof (const Value *V) |
| Methods for support type inquiry through isa, cast, and dyn_cast: | |
Protected Member Functions | |
| TerminatorInst (Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=0) | |
| TerminatorInst (Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) | |
| ~TerminatorInst () | |
| virtual BasicBlock * | getSuccessorV (unsigned idx) const =0 |
| virtual unsigned | getNumSuccessorsV () const =0 |
| virtual void | setSuccessorV (unsigned idx, BasicBlock *B)=0 |
| virtual TerminatorInst * | clone_impl () const =0 |
TerminatorInst - Subclasses of this class are all able to terminate a basic block. Thus, these are all the flow control type of operations.
Definition at line 35 of file InstrTypes.h.
| llvm::TerminatorInst::TerminatorInst | ( | Type * | Ty, |
| Instruction::TermOps | iType, | ||
| Use * | Ops, | ||
| unsigned | NumOps, | ||
| Instruction * | InsertBefore = 0 |
||
| ) | [inline, protected] |
Definition at line 37 of file InstrTypes.h.
| llvm::TerminatorInst::TerminatorInst | ( | Type * | Ty, |
| Instruction::TermOps | iType, | ||
| Use * | Ops, | ||
| unsigned | NumOps, | ||
| BasicBlock * | InsertAtEnd | ||
| ) | [inline, protected] |
Definition at line 42 of file InstrTypes.h.
| TerminatorInst::~TerminatorInst | ( | ) | [protected] |
Definition at line 45 of file Instructions.cpp.
| static bool llvm::TerminatorInst::classof | ( | const Instruction * | I | ) | [inline, static] |
Reimplemented in llvm::UnreachableInst, llvm::ResumeInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, llvm::BranchInst, and llvm::ReturnInst.
Definition at line 76 of file InstrTypes.h.
References llvm::Instruction::isTerminator().
Referenced by classof().
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::Instruction.
Reimplemented in llvm::UnreachableInst, llvm::ResumeInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, llvm::BranchInst, and llvm::ReturnInst.
Definition at line 79 of file InstrTypes.h.
References classof().
| virtual TerminatorInst* llvm::TerminatorInst::clone_impl | ( | ) | const [protected, pure virtual] |
Implements llvm::Instruction.
Implemented in llvm::UnreachableInst, llvm::ResumeInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, llvm::BranchInst, and llvm::ReturnInst.
| unsigned llvm::TerminatorInst::getNumSuccessors | ( | ) | const [inline] |
getNumSuccessors - Return the number of successors that this terminator has.
Reimplemented in llvm::UnreachableInst, llvm::ResumeInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, llvm::BranchInst, and llvm::ReturnInst.
Definition at line 59 of file InstrTypes.h.
References getNumSuccessorsV().
Referenced by AddReachableCodeToWorklist(), llvm::DeleteDeadBlock(), FindMostPopularDest(), FindUnconditionalPreds(), FoldBlockIntoPredecessor(), FoldCondBranchOnPHI(), GetBestDestForJumpOnUndef(), llvm::Region::getExpandedRegion(), llvm::GetSuccessorNumber(), llvm::isCriticalEdge(), llvm::SparseSolver::isEdgeFeasible(), isSafePHIToSpeculate(), llvm::BasicBlockEdge::isSingleEdge(), llvm::BasicBlock::replaceSuccessorsPhiUsesWith(), SimplifyTerminatorOnSelect(), llvm::SplitCriticalEdge(), SplitCriticalSideEffectEdges(), and llvm::SplitEdge().
| virtual unsigned llvm::TerminatorInst::getNumSuccessorsV | ( | ) | const [protected, pure virtual] |
Referenced by getNumSuccessors().
| BasicBlock* llvm::TerminatorInst::getSuccessor | ( | unsigned | idx | ) | const [inline] |
getSuccessor - Return the specified successor.
Reimplemented in llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, and llvm::BranchInst.
Definition at line 65 of file InstrTypes.h.
References getSuccessorV().
Referenced by AddReachableCodeToWorklist(), llvm::DeleteDeadBlock(), FindMostPopularDest(), FoldCondBranchOnPHI(), GetBestDestForJumpOnUndef(), llvm::GetSuccessorNumber(), llvm::isCriticalEdge(), llvm::SparseSolver::isEdgeFeasible(), llvm::BasicBlockEdge::isSingleEdge(), llvm::BasicBlock::replaceSuccessorsPhiUsesWith(), SimplifyTerminatorOnSelect(), SpeculativelyExecuteBB(), llvm::SplitCriticalEdge(), llvm::SplitEdge(), and TryToSimplifyUncondBranchWithICmpInIt().
| virtual BasicBlock* llvm::TerminatorInst::getSuccessorV | ( | unsigned | idx | ) | const [protected, pure virtual] |
Virtual methods - Terminators should overload these and provide inline overrides of non-V methods.
Referenced by getSuccessor().
| void llvm::TerminatorInst::setSuccessor | ( | unsigned | idx, |
| BasicBlock * | B | ||
| ) | [inline] |
setSuccessor - Update the specified successor to point at the provided block.
Reimplemented in llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, and llvm::BranchInst.
Definition at line 71 of file InstrTypes.h.
References setSuccessorV().
Referenced by CloneLoopBlocks(), convertMemSetToLoop(), convertTransferToLoop(), FoldCondBranchOnPHI(), llvm::SplitCriticalEdge(), and llvm::UnrollRuntimeLoopProlog().
| virtual void llvm::TerminatorInst::setSuccessorV | ( | unsigned | idx, |
| BasicBlock * | B | ||
| ) | [protected, pure virtual] |
Referenced by setSuccessor().