LLVM 23.0.0git
llvm::UncondBrInst Class Reference

Unconditional Branch instruction. More...

#include "llvm/IR/Instructions.h"

Inheritance diagram for llvm::UncondBrInst:
[legend]

Public Member Functions

 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Transparently provide more efficient getOperand methods.
unsigned getNumSuccessors () const
BasicBlockgetSuccessor (unsigned i=0) const
void setSuccessor (BasicBlock *NewSucc)
void setSuccessor (unsigned idx, BasicBlock *NewSucc)
iterator_range< succ_iteratorsuccessors ()
iterator_range< const_succ_iteratorsuccessors () const

Static Public Member Functions

static UncondBrInstCreate (BasicBlock *Target, InsertPosition InsertBefore=nullptr)
static bool classof (const Instruction *I)
static bool classof (const Value *V)

Protected Member Functions

LLVM_ABI UncondBrInstcloneImpl () const

Friends

class Instruction
 Iterator for Instructions in a `BasicBlock.

Detailed Description

Unconditional Branch instruction.

Definition at line 3138 of file Instructions.h.

Member Function Documentation

◆ classof() [1/2]

bool llvm::UncondBrInst::classof ( const Instruction * I)
inlinestatic

Definition at line 3192 of file Instructions.h.

References I, and Instruction.

Referenced by classof().

◆ classof() [2/2]

bool llvm::UncondBrInst::classof ( const Value * V)
inlinestatic

Definition at line 3195 of file Instructions.h.

References llvm::cast(), classof(), and llvm::isa().

◆ cloneImpl()

UncondBrInst * UncondBrInst::cloneImpl ( ) const
protected

Definition at line 4509 of file Instructions.cpp.

Referenced by Instruction.

◆ Create()

◆ DECLARE_TRANSPARENT_OPERAND_ACCESSORS()

llvm::UncondBrInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS ( Value )

Transparently provide more efficient getOperand methods.

◆ getNumSuccessors()

unsigned llvm::UncondBrInst::getNumSuccessors ( ) const
inline

Definition at line 3169 of file Instructions.h.

◆ getSuccessor()

◆ setSuccessor() [1/2]

void llvm::UncondBrInst::setSuccessor ( BasicBlock * NewSucc)
inline

◆ setSuccessor() [2/2]

void llvm::UncondBrInst::setSuccessor ( unsigned idx,
BasicBlock * NewSucc )
inline

Definition at line 3177 of file Instructions.h.

References assert().

◆ successors() [1/2]

iterator_range< succ_iterator > llvm::UncondBrInst::successors ( )
inline

Definition at line 3182 of file Instructions.h.

References llvm::make_range().

◆ successors() [2/2]

iterator_range< const_succ_iterator > llvm::UncondBrInst::successors ( ) const
inline

Definition at line 3186 of file Instructions.h.

References llvm::make_range().

◆ Instruction

friend class Instruction
friend

Iterator for Instructions in a `BasicBlock.

/ \Returns an sandboxir::Instruction & when derereferenced. class BBIterator { public: using difference_type = std::ptrdiff_t; using value_type = Instruction; using pointer = value_type *; using reference = value_type &; using iterator_category = std::bidirectional_iterator_tag;

private: llvm::BasicBlock *BB; llvm::BasicBlock::iterator It; Context *Ctx; LLVM_ABI pointer getInstr(llvm::BasicBlock::iterator It) const;

public: BBIterator() : BB(nullptr), Ctx(nullptr) {} BBIterator(llvm::BasicBlock <em>BB, llvm::BasicBlock::iterator It, Context *Ctx) : BB(BB), It(It), Ctx(Ctx) {} reference operator() const { return *getInstr(It); } LLVM_ABI BBIterator &operator++(); BBIterator operator++(int) { auto Copy = *this; ++*this; return Copy; } LLVM_ABI BBIterator &operator--(); BBIterator operator--(int) { auto Copy = *this; –*this; return Copy; } bool operator==(const BBIterator &Other) const { assert(Ctx == Other.Ctx && "BBIterators in different context!"); return It == Other.It; } bool operator!=(const BBIterator &Other) const { return !(*this == Other); } / \Returns the SBInstruction that corresponds to this iterator, or null if / the instruction is not found in the IR-to-SandboxIR tables. pointer get() const { return getInstr(It); } / \Returns the parent BB. LLVM_ABI BasicBlock *getNodeParent() const; };

/ Contains a list of sandboxir::Instruction's. class BasicBlock : public Value { / Builds a graph that contains all values in BB in their original form / i.e., no vectorization is taking place here. LLVM_ABI void buildBasicBlockFromLLVMIR(llvm::BasicBlock *LLVMBB); friend class Context; // For buildBasicBlockFromIR

Definition at line 3147 of file Instructions.h.

References cloneImpl(), Instruction, and LLVM_ABI.

Referenced by classof(), and Instruction.


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