LLVM API Documentation
#include <InstrTypes.h>
Inheritance diagram for llvm::TerminatorInst:
Public Member Functions | |
virtual Instruction * | clone () const=0 |
unsigned | getNumSuccessors () const |
BasicBlock * | getSuccessor (unsigned idx) const |
void | setSuccessor (unsigned idx, BasicBlock *B) |
Static Public Member Functions | |
static bool | classof (const TerminatorInst *) |
static bool | classof (const Instruction *I) |
Methods for support type inquiry through isa, cast, and dyn_cast:. | |
static bool | classof (const Value *V) |
Protected Member Functions | |
TerminatorInst (Instruction::TermOps iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=0) | |
TerminatorInst (const Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, const std::string &Name="", Instruction *InsertBefore=0) | |
TerminatorInst (Instruction::TermOps iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) | |
TerminatorInst (const Type *Ty, Instruction::TermOps iType, Use *Ops, unsigned NumOps, const std::string &Name, BasicBlock *InsertAtEnd) | |
~TerminatorInst () | |
virtual BasicBlock * | getSuccessorV (unsigned idx) const =0 |
virtual unsigned | getNumSuccessorsV () const=0 |
virtual void | setSuccessorV (unsigned idx, BasicBlock *B)=0 |
Definition at line 30 of file InstrTypes.h.
TerminatorInst::TerminatorInst | ( | Instruction::TermOps | iType, | |
Use * | Ops, | |||
unsigned | NumOps, | |||
Instruction * | InsertBefore = 0 | |||
) | [protected] |
Definition at line 43 of file Instructions.cpp.
llvm::TerminatorInst::TerminatorInst | ( | const Type * | Ty, | |
Instruction::TermOps | iType, | |||
Use * | Ops, | |||
unsigned | NumOps, | |||
const std::string & | Name = "" , |
|||
Instruction * | InsertBefore = 0 | |||
) | [inline, protected] |
TerminatorInst::TerminatorInst | ( | Instruction::TermOps | iType, | |
Use * | Ops, | |||
unsigned | NumOps, | |||
BasicBlock * | InsertAtEnd | |||
) | [protected] |
Definition at line 48 of file Instructions.cpp.
llvm::TerminatorInst::TerminatorInst | ( | const Type * | Ty, | |
Instruction::TermOps | iType, | |||
Use * | Ops, | |||
unsigned | NumOps, | |||
const std::string & | Name, | |||
BasicBlock * | InsertAtEnd | |||
) | [inline, protected] |
Definition at line 41 of file InstrTypes.h.
TerminatorInst::~TerminatorInst | ( | ) | [protected] |
Definition at line 54 of file Instructions.cpp.
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().
virtual unsigned llvm::TerminatorInst::getNumSuccessorsV | ( | ) | const [protected, pure virtual] |
Referenced by getNumSuccessors().
virtual void llvm::TerminatorInst::setSuccessorV | ( | unsigned | idx, | |
BasicBlock * | B | |||
) | [protected, pure virtual] |
Referenced by setSuccessor().
virtual Instruction* llvm::TerminatorInst::clone | ( | ) | const [pure virtual] |
clone() - Create a copy of 'this' instruction that is identical in all ways except the following: The instruction has no parent The instruction has no name
Implements llvm::Instruction.
Implemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.
unsigned llvm::TerminatorInst::getNumSuccessors | ( | ) | const [inline] |
getNumSuccessors - Return the number of successors that this terminator has.
Reimplemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.
Definition at line 60 of file InstrTypes.h.
References getNumSuccessorsV().
Referenced by FoldCondBranchOnPHI(), llvm::ProfileInfoLoader::getBlockCounts(), llvm::ProfileInfoLoader::getEdgeCounts(), llvm::isCriticalEdge(), recBackEdge(), llvm::RemoveSuccessor(), and llvm::SplitCriticalEdge().
BasicBlock* llvm::TerminatorInst::getSuccessor | ( | unsigned | idx | ) | const [inline] |
getSuccessor - Return the specified successor.
Reimplemented in llvm::BranchInst, llvm::SwitchInst, and llvm::InvokeInst.
Definition at line 66 of file InstrTypes.h.
References getSuccessorV().
Referenced by FoldCondBranchOnPHI(), llvm::ProfileInfoLoader::getBlockCounts(), llvm::isCriticalEdge(), recBackEdge(), llvm::RemoveSuccessor(), and llvm::SplitCriticalEdge().
void llvm::TerminatorInst::setSuccessor | ( | unsigned | idx, | |
BasicBlock * | B | |||
) | [inline] |
setSuccessor - Update the specified successor to point at the provided block.
Reimplemented in llvm::BranchInst, llvm::SwitchInst, and llvm::InvokeInst.
Definition at line 72 of file InstrTypes.h.
References B, and setSuccessorV().
Referenced by FoldCondBranchOnPHI(), and llvm::SplitCriticalEdge().
static bool llvm::TerminatorInst::classof | ( | const TerminatorInst * | ) | [inline, static] |
static bool llvm::TerminatorInst::classof | ( | const Instruction * | I | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::Instruction.
Reimplemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.
Definition at line 78 of file InstrTypes.h.
References llvm::Instruction::getOpcode().
static bool llvm::TerminatorInst::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::Instruction.
Reimplemented in llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, and llvm::UnreachableInst.
Definition at line 81 of file InstrTypes.h.