|
LLVM 23.0.0git
|
Unconditional Branch instruction. More...
#include "llvm/IR/Instructions.h"
Public Member Functions | |
| DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
| Transparently provide more efficient getOperand methods. | |
| unsigned | getNumSuccessors () const |
| BasicBlock * | getSuccessor (unsigned i=0) const |
| void | setSuccessor (BasicBlock *NewSucc) |
| void | setSuccessor (unsigned idx, BasicBlock *NewSucc) |
| iterator_range< succ_iterator > | successors () |
| iterator_range< const_succ_iterator > | successors () const |
Static Public Member Functions | |
| static UncondBrInst * | Create (BasicBlock *Target, InsertPosition InsertBefore=nullptr) |
| static bool | classof (const Instruction *I) |
| static bool | classof (const Value *V) |
Protected Member Functions | |
| LLVM_ABI UncondBrInst * | cloneImpl () const |
Friends | |
| class | Instruction |
| Iterator for Instructions in a `BasicBlock. | |
Unconditional Branch instruction.
Definition at line 3138 of file Instructions.h.
|
inlinestatic |
Definition at line 3192 of file Instructions.h.
References I, and Instruction.
Referenced by classof().
Definition at line 3195 of file Instructions.h.
References llvm::cast(), classof(), and llvm::isa().
|
protected |
Definition at line 4509 of file Instructions.cpp.
Referenced by Instruction.
|
inlinestatic |
Definition at line 3152 of file Instructions.h.
Referenced by alignOutputBlockWithAggFunc(), buildClonedLoopBlocks(), llvm::changeToCall(), llvm::VPBasicBlock::connectToPredecessors(), llvm::IRBuilderBase::CreateBr(), DoFlattenLoopPair(), llvm::ehAwareSplitEdge(), llvm::emitAMDGPUPrintfCall(), expandToSwitch(), findOrCreatePHIBlock(), getStrlenWithNull(), llvm::InlineFunctionImpl(), insertBoundsCheck(), insertUniqueBackedgeBlock(), markAliveBlocks(), mergeCleanupPad(), mergeCompatibleInvokesImpl(), performBlockTailMerging(), llvm::JumpThreadingPass::processBlock(), llvm::JumpThreadingPass::processImpliedCondition(), llvm::JumpThreadingPass::processThreadableEdges(), redirectTo(), redirectToHub(), llvm::SCCPSolver::removeNonFeasibleEdges(), replaceConditionalBranchesOnConstant(), runImpl(), SimplifyCondBranchToCondBranch(), simplifySuspendPoint(), llvm::spliceBB(), llvm::SplitBlockAndInsertIfThenElse(), SplitBlockPredecessorsImpl(), llvm::SplitCallBrEdge(), llvm::SplitKnownCriticalEdge(), SplitLandingPadPredecessorsImpl(), llvm::JumpThreadingPass::threadEdge(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), and unswitchTrivialSwitch().
| llvm::UncondBrInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Transparently provide more efficient getOperand methods.
|
inline |
Definition at line 3169 of file Instructions.h.
|
inline |
Definition at line 3171 of file Instructions.h.
References assert(), llvm::cast_or_null(), and llvm::get().
Referenced by checkOuterLoopInsts(), llvm::CloneAndPruneIntoFromInst(), dominatesMergePoint(), llvm::DenseMapInfo< const EqualBBWrapper * >::getHashValue(), llvm::InlineFunctionImpl(), llvm::DenseMapInfo< const EqualBBWrapper * >::isEqual(), llvm::MergeBlockIntoPredecessor(), and llvm::FastISel::selectOperator().
|
inline |
Definition at line 3176 of file Instructions.h.
Referenced by foldCondBranchOnValueKnownInPredecessorImpl(), llvm::InlineFunctionImpl(), and llvm::UnrollAndJamLoop().
|
inline |
Definition at line 3177 of file Instructions.h.
References assert().
|
inline |
Definition at line 3182 of file Instructions.h.
References llvm::make_range().
|
inline |
Definition at line 3186 of file Instructions.h.
References llvm::make_range().
|
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.