LLVM API Documentation
#include <Instructions.h>
Inheritance diagram for llvm::BranchInst:


Public Member Functions | |
| BranchInst (BasicBlock *IfTrue, Instruction *InsertBefore=0) | |
| BranchInst (BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore=0) | |
| BranchInst (BasicBlock *IfTrue, BasicBlock *InsertAtEnd) | |
| BranchInst (BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, BasicBlock *InsertAtEnd) | |
| Value * | getOperand (unsigned i) const |
| Transparently provide more efficient getOperand methods. | |
| void | setOperand (unsigned i, Value *Val) |
| virtual BranchInst * | clone () const |
| bool | isUnconditional () const |
| bool | isConditional () const |
| Value * | getCondition () const |
| void | setCondition (Value *V) |
| void | setUnconditionalDest (BasicBlock *Dest) |
| unsigned | getNumSuccessors () const |
| BasicBlock * | getSuccessor (unsigned i) const |
| void | setSuccessor (unsigned idx, BasicBlock *NewSucc) |
Static Public Member Functions | |
| static bool | classof (const BranchInst *) |
| static bool | classof (const Instruction *I) |
| Methods for support type inquiry through isa, cast, and dyn_cast:. | |
| static bool | classof (const Value *V) |
Definition at line 1097 of file Instructions.h.
| llvm::BranchInst::BranchInst | ( | BasicBlock * | IfTrue, | |
| Instruction * | InsertBefore = 0 | |||
| ) | [inline] |
| llvm::BranchInst::BranchInst | ( | BasicBlock * | IfTrue, | |
| BasicBlock * | IfFalse, | |||
| Value * | Cond, | |||
| Instruction * | InsertBefore = 0 | |||
| ) | [inline] |
| llvm::BranchInst::BranchInst | ( | BasicBlock * | IfTrue, | |
| BasicBlock * | InsertAtEnd | |||
| ) | [inline] |
| llvm::BranchInst::BranchInst | ( | BasicBlock * | IfTrue, | |
| BasicBlock * | IfFalse, | |||
| Value * | Cond, | |||
| BasicBlock * | InsertAtEnd | |||
| ) | [inline] |
| Value* llvm::BranchInst::getOperand | ( | unsigned | i | ) | const [inline] |
Transparently provide more efficient getOperand methods.
Reimplemented from llvm::User.
Definition at line 1147 of file Instructions.h.
References llvm::UnaryInstruction::getNumOperands(), and Ops.
| void llvm::BranchInst::setOperand | ( | unsigned | i, | |
| Value * | Val | |||
| ) | [inline] |
Reimplemented from llvm::User.
Definition at line 1151 of file Instructions.h.
References llvm::UnaryInstruction::getNumOperands(), Ops, and Val.
| BranchInst * BranchInst::clone | ( | ) | const [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::TerminatorInst.
Definition at line 1338 of file Instructions.cpp.
| bool llvm::BranchInst::isUnconditional | ( | ) | const [inline] |
Definition at line 1158 of file Instructions.h.
References llvm::UnaryInstruction::getNumOperands().
Referenced by llvm::SelectionDAGLowering::visitBr(), and llvm::Interpreter::visitBranchInst().
| bool llvm::BranchInst::isConditional | ( | ) | const [inline] |
Definition at line 1159 of file Instructions.h.
References llvm::UnaryInstruction::getNumOperands().
Referenced by AddReachableCodeToWorklist(), GetIfCondition(), and isBlockSimpleEnough().
| Value* llvm::BranchInst::getCondition | ( | ) | const [inline] |
Definition at line 1161 of file Instructions.h.
References llvm::UnaryInstruction::getOperand().
Referenced by AddReachableCodeToWorklist(), FoldCondBranchOnPHI(), GetIfCondition(), GetValueEqualityComparisonCases(), HoistThenElseCodeToIf(), isBlockSimpleEnough(), llvm::SelectionDAGLowering::visitBr(), and llvm::Interpreter::visitBranchInst().
| void llvm::BranchInst::setCondition | ( | Value * | V | ) | [inline] |
Definition at line 1166 of file Instructions.h.
References llvm::UnaryInstruction::setOperand(), and V.
| void llvm::BranchInst::setUnconditionalDest | ( | BasicBlock * | Dest | ) | [inline] |
Definition at line 1174 of file Instructions.h.
References Dest, llvm::User::NumOperands, Ops, llvm::Use::set(), and llvm::UnaryInstruction::setOperand().
| unsigned llvm::BranchInst::getNumSuccessors | ( | ) | const [inline] |
getNumSuccessors - Return the number of successors that this terminator has.
Reimplemented from llvm::TerminatorInst.
Definition at line 1183 of file Instructions.h.
| BasicBlock* llvm::BranchInst::getSuccessor | ( | unsigned | i | ) | const [inline] |
getSuccessor - Return the specified successor.
Reimplemented from llvm::TerminatorInst.
Definition at line 1185 of file Instructions.h.
References llvm::UnaryInstruction::getOperand().
Referenced by AddReachableCodeToWorklist(), FoldCondBranchOnPHI(), GetIfCondition(), GetValueEqualityComparisonCases(), HoistThenElseCodeToIf(), llvm::SelectionDAGLowering::visitBr(), and llvm::Interpreter::visitBranchInst().
| void llvm::BranchInst::setSuccessor | ( | unsigned | idx, | |
| BasicBlock * | NewSucc | |||
| ) | [inline] |
setSuccessor - Update the specified successor to point at the provided block.
Reimplemented from llvm::TerminatorInst.
Definition at line 1191 of file Instructions.h.
References llvm::UnaryInstruction::setOperand().
| static bool llvm::BranchInst::classof | ( | const BranchInst * | ) | [inline, static] |
Definition at line 1197 of file Instructions.h.
| static bool llvm::BranchInst::classof | ( | const Instruction * | I | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::TerminatorInst.
Definition at line 1198 of file Instructions.h.
References llvm::Instruction::getOpcode().
| static bool llvm::BranchInst::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::TerminatorInst.
Definition at line 1201 of file Instructions.h.
References llvm::CastInst::classof(), and V.