LLVM API Documentation
#include <InstrTypes.h>
Public Member Functions | |
unsigned | getNumSuccessors () const |
Return the number of successors that this terminator has. | |
BasicBlock * | getSuccessor (unsigned idx) const |
Return the specified successor. | |
void | setSuccessor (unsigned idx, BasicBlock *B) |
Update the specified successor to point at the provided block. | |
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=nullptr) | |
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 |
TerminatorInst * | clone_impl () const override=0 |
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 = nullptr |
||
) | [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 73 of file InstrTypes.h.
References llvm::Instruction::isTerminator().
Referenced by classof().
static bool llvm::TerminatorInst::classof | ( | const Value * | V | ) | [inline, static] |
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 76 of file InstrTypes.h.
References classof().
TerminatorInst* llvm::TerminatorInst::clone_impl | ( | ) | const [override, 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] |
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 58 of file InstrTypes.h.
References getNumSuccessorsV().
Referenced by AddReachableCodeToWorklist(), llvm::DeleteDeadBlock(), FindMostPopularDest(), FindUnconditionalPreds(), FoldBlockIntoPredecessor(), FoldCondBranchOnPHI(), GetBestDestForJumpOnUndef(), llvm::Loop::getLoopID(), llvm::RegionTraits< Function >::getNumSuccessors(), llvm::GetSuccessorNumber(), insertUniqueBackedgeBlock(), llvm::isCriticalEdge(), llvm::SparseSolver::isEdgeFeasible(), isSafePHIToSpeculate(), llvm::BasicBlockEdge::isSingleEdge(), replaceConstantExprOp(), llvm::BasicBlock::replaceSuccessorsPhiUsesWith(), llvm::Loop::setLoopID(), 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] |
Return the specified successor.
Reimplemented in llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, and llvm::BranchInst.
Definition at line 63 of file InstrTypes.h.
References getSuccessorV().
Referenced by AddReachableCodeToWorklist(), llvm::DeleteDeadBlock(), FindMostPopularDest(), FoldCondBranchOnPHI(), GetBestDestForJumpOnUndef(), llvm::Loop::getLoopID(), llvm::GetSuccessorNumber(), insertUniqueBackedgeBlock(), llvm::isCriticalEdge(), llvm::SparseSolver::isEdgeFeasible(), llvm::BasicBlockEdge::isSingleEdge(), llvm::BasicBlock::replaceSuccessorsPhiUsesWith(), llvm::Loop::setLoopID(), 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] |
Update the specified successor to point at the provided block.
Reimplemented in llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, and llvm::BranchInst.
Definition at line 68 of file InstrTypes.h.
References setSuccessorV().
Referenced by CloneLoopBlocks(), convertMemSetToLoop(), convertTransferToLoop(), FoldCondBranchOnPHI(), insertUniqueBackedgeBlock(), llvm::SplitCriticalEdge(), and llvm::UnrollRuntimeLoopProlog().
virtual void llvm::TerminatorInst::setSuccessorV | ( | unsigned | idx, |
BasicBlock * | B | ||
) | [protected, pure virtual] |
Referenced by setSuccessor().