LLVM API Documentation

llvm::BranchInst Class Reference

#include <Instructions.h>

Inheritance diagram for llvm::BranchInst:
[legend]
Collaboration diagram for llvm::BranchInst:
[legend]

List of all members.

Public Member Functions

 ~BranchInst ()
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Transparently provide more efficient getOperand methods.
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 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)


Detailed Description

BranchInst - Conditional or Unconditional Branch instruction.

Definition at line 2115 of file Instructions.h.


Constructor & Destructor Documentation

llvm::BranchInst::~BranchInst (  )  [inline]

Definition at line 2150 of file Instructions.h.


Member Function Documentation

static BranchInst* llvm::BranchInst::Create ( BasicBlock *  IfTrue,
Instruction *  InsertBefore = 0 
) [inline, static]

static BranchInst* llvm::BranchInst::Create ( BasicBlock *  IfTrue,
BasicBlock *  IfFalse,
Value *  Cond,
Instruction *  InsertBefore = 0 
) [inline, static]

Definition at line 2138 of file Instructions.h.

static BranchInst* llvm::BranchInst::Create ( BasicBlock *  IfTrue,
BasicBlock *  InsertAtEnd 
) [inline, static]

Definition at line 2142 of file Instructions.h.

static BranchInst* llvm::BranchInst::Create ( BasicBlock *  IfTrue,
BasicBlock *  IfFalse,
Value *  Cond,
BasicBlock *  InsertAtEnd 
) [inline, static]

Definition at line 2145 of file Instructions.h.

llvm::BranchInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS ( Value   ) 

Transparently provide more efficient getOperand methods.

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 2923 of file Instructions.cpp.

References llvm::User::getNumOperands().

bool llvm::BranchInst::isUnconditional (  )  const [inline]

bool llvm::BranchInst::isConditional (  )  const [inline]

Value* llvm::BranchInst::getCondition (  )  const [inline]

void llvm::BranchInst::setCondition ( Value *  V  )  [inline]

Definition at line 2168 of file Instructions.h.

Referenced by FoldBranchToCommonDest(), and SimplifyCondBranchToCondBranch().

void llvm::BranchInst::setUnconditionalDest ( BasicBlock *  Dest  )  [inline]

Definition at line 2176 of file Instructions.h.

Referenced by llvm::UnrollLoop().

unsigned llvm::BranchInst::getNumSuccessors (  )  const [inline]

getNumSuccessors - Return the number of successors that this terminator has.

Reimplemented from llvm::TerminatorInst.

Definition at line 2185 of file Instructions.h.

BasicBlock* llvm::BranchInst::getSuccessor ( unsigned  idx  )  const [inline]

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 2192 of file Instructions.h.

Referenced by FoldBranchToCommonDest(), SimplifyCondBranchToCondBranch(), and llvm::UnrollLoop().

static bool llvm::BranchInst::classof ( const BranchInst *   )  [inline, static]

Definition at line 2198 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 2199 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 2202 of file Instructions.h.


The documentation for this class was generated from the following files: