LLVM API Documentation
#include <Instructions.h>
Public Member Functions | |
| ~BranchInst () | |
| DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
| Transparently provide more efficient getOperand methods. | |
| virtual BranchInst * | clone (LLVMContext &Context) 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 BranchInst * | Create (BasicBlock *IfTrue, Instruction *InsertBefore=0) |
| static BranchInst * | Create (BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore=0) |
| static BranchInst * | Create (BasicBlock *IfTrue, BasicBlock *InsertAtEnd) |
| static BranchInst * | Create (BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, BasicBlock *InsertAtEnd) |
| 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 2049 of file Instructions.h.
| BranchInst::~BranchInst | ( | ) |
Definition at line 682 of file Instructions.cpp.
References llvm::Use::getPrefix(), llvm::User::NumOperands, llvm::User::Op(), llvm::User::op_begin(), llvm::User::OperandList, and llvm::cl::Prefix.
| static BranchInst* llvm::BranchInst::Create | ( | BasicBlock * | IfTrue, | |
| Instruction * | InsertBefore = 0 | |||
| ) | [inline, static] |
Definition at line 2070 of file Instructions.h.
Referenced by ChangeToCall(), llvm::ConstantFoldTerminator(), llvm::IRBuilder< true, llvm::TargetFolder >::CreateBr(), llvm::IRBuilder< true, llvm::TargetFolder >::CreateCondBr(), HandleInlinedInvoke(), llvm::InlineFunction(), PerformHeapAllocSRoA(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::SimplifyCFG(), SimplifyCondBranchToCondBranch(), llvm::BasicBlock::splitBasicBlock(), llvm::SplitBlockPredecessors(), and llvm::SplitCriticalEdge().
| static BranchInst* llvm::BranchInst::Create | ( | BasicBlock * | IfTrue, | |
| BasicBlock * | IfFalse, | |||
| Value * | Cond, | |||
| Instruction * | InsertBefore = 0 | |||
| ) | [inline, static] |
Definition at line 2073 of file Instructions.h.
| static BranchInst* llvm::BranchInst::Create | ( | BasicBlock * | IfTrue, | |
| BasicBlock * | InsertAtEnd | |||
| ) | [inline, static] |
Definition at line 2077 of file Instructions.h.
| static BranchInst* llvm::BranchInst::Create | ( | BasicBlock * | IfTrue, | |
| BasicBlock * | IfFalse, | |||
| Value * | Cond, | |||
| BasicBlock * | InsertAtEnd | |||
| ) | [inline, static] |
Definition at line 2080 of file Instructions.h.
| llvm::BranchInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Transparently provide more efficient getOperand methods.
| BranchInst * BranchInst::clone | ( | LLVMContext & | Context | ) | 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 3063 of file Instructions.cpp.
References llvm::User::getNumOperands(), and llvm::Value::SubclassOptionalData.
| bool llvm::BranchInst::isUnconditional | ( | ) | const [inline] |
Definition at line 2092 of file Instructions.h.
Referenced by llvm::FoldBranchToCommonDest(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopGuardedByCond(), llvm::MSILWriter::printBranchInstruction(), llvm::FastISel::SelectOperator(), SplitEdgeNicely(), llvm::UnrollLoop(), and llvm::Interpreter::visitBranchInst().
| bool llvm::BranchInst::isConditional | ( | ) | const [inline] |
Definition at line 2093 of file Instructions.h.
Referenced by AddReachableCodeToWorklist(), llvm::CloneAndPruneFunctionInto(), GetIfCondition(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), and WriteInstruction().
| Value* llvm::BranchInst::getCondition | ( | ) | const [inline] |
Definition at line 2095 of file Instructions.h.
References Op.
Referenced by AddReachableCodeToWorklist(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), GetIfCondition(), GetValueEqualityComparisonCases(), HoistThenElseCodeToIf(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopGuardedByCond(), llvm::MSILWriter::printBranchInstruction(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), SpeculativelyExecuteBB(), llvm::Interpreter::visitBranchInst(), and WriteInstruction().
| void llvm::BranchInst::setCondition | ( | Value * | V | ) | [inline] |
Definition at line 2100 of file Instructions.h.
References Op.
Referenced by llvm::FoldBranchToCommonDest(), and SimplifyCondBranchToCondBranch().
| void llvm::BranchInst::setUnconditionalDest | ( | BasicBlock * | Dest | ) | [inline] |
| unsigned llvm::BranchInst::getNumSuccessors | ( | ) | const [inline] |
getNumSuccessors - Return the number of successors that this terminator has.
Reimplemented from llvm::TerminatorInst.
Definition at line 2118 of file Instructions.h.
| BasicBlock* llvm::BranchInst::getSuccessor | ( | unsigned | idx | ) | const [inline] |
getSuccessor - Return the specified successor.
Reimplemented from llvm::TerminatorInst.
Definition at line 2120 of file Instructions.h.
References Op.
Referenced by AddReachableCodeToWorklist(), llvm::CloneAndPruneFunctionInto(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), GetIfCondition(), GetValueEqualityComparisonCases(), HoistThenElseCodeToIf(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopGuardedByCond(), llvm::MSILWriter::printBranchInstruction(), llvm::FastISel::SelectOperator(), llvm::SimplifyCFG(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), SpeculativelyExecuteBB(), llvm::UnrollLoop(), llvm::Interpreter::visitBranchInst(), and WriteInstruction().
| void llvm::BranchInst::setSuccessor | ( | unsigned | idx, | |
| BasicBlock * | B | |||
| ) | [inline] |
setSuccessor - Update the specified successor to point at the provided block.
Reimplemented from llvm::TerminatorInst.
Definition at line 2125 of file Instructions.h.
References Op.
Referenced by llvm::FoldBranchToCommonDest(), SimplifyCondBranchToCondBranch(), and llvm::UnrollLoop().
| static bool llvm::BranchInst::classof | ( | const BranchInst * | ) | [inline, static] |
Definition at line 2131 of file Instructions.h.
| static bool llvm::BranchInst::classof | ( | const Instruction * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::TerminatorInst.
Definition at line 2132 of file Instructions.h.
References llvm::Instruction::getOpcode().