LLVM API Documentation

llvm::BranchInst Class Reference

#include <Instructions.h>

Inheritance diagram for llvm::BranchInst:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~BranchInst ()
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Transparently provide more efficient getOperand methods.
virtual BranchInstclone () const
bool isUnconditional () const
bool isConditional () const
ValuegetCondition () const
void setCondition (Value *V)
void setUnconditionalDest (BasicBlock *Dest)
unsigned getNumSuccessors () const
BasicBlockgetSuccessor (unsigned i) const
void setSuccessor (unsigned idx, BasicBlock *NewSucc)

Static Public Member Functions

static BranchInstCreate (BasicBlock *IfTrue, Instruction *InsertBefore=0)
static BranchInstCreate (BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, Instruction *InsertBefore=0)
static BranchInstCreate (BasicBlock *IfTrue, BasicBlock *InsertAtEnd)
static BranchInstCreate (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 2100 of file Instructions.h.


Constructor & Destructor Documentation

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

Definition at line 2135 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 2123 of file Instructions.h.

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

Definition at line 2127 of file Instructions.h.

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

Definition at line 2130 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 2949 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 2153 of file Instructions.h.

Referenced by FoldBranchToCommonDest(), and SimplifyCondBranchToCondBranch().

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

Definition at line 2161 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 2170 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 2177 of file Instructions.h.

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

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

Definition at line 2183 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 2184 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 2187 of file Instructions.h.


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.