llvm_hiwrap.value.basic_block

Members

Functions

isAlloca
bool isAlloca(LxOpcode op)
Undocumented in source. Be warned that the author may not have intended to support it.
isCall
bool isCall(LxOpcode op)
Undocumented in source. Be warned that the author may not have intended to support it.
isElementPtr
bool isElementPtr(LxOpcode op)
Undocumented in source. Be warned that the author may not have intended to support it.
isTerminator
bool isTerminator(LxOpcode op)

Note that isTerminator and isCall overlap.

Mixin templates

BasicBlockAccept
mixintemplate BasicBlockAccept(VisitorT, UserT)
Undocumented in source.

Structs

BasicBlock
struct BasicBlock

A basic block represents a single entry single exit section of code.

BasicBlockVisitor
struct BasicBlockVisitor(UserT)

A depth-first visitor.

EntryBasicBlock
struct EntryBasicBlock
Undocumented in source.
InstructionRange
struct InstructionRange
Undocumented in source.

Meta

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

From the LLVM source code, llvm/IR/BasicBlock.h

LLVM Basic Block Representation

This represents a single basic block in LLVM. A basic block is simply a container of instructions that execute sequentially. Basic blocks are Values because they are referenced by instructions such as branches and switch tables. The type of a BasicBlock is "Type::LabelTy" because the basic block represents a label to which a branch can jump.

A well formed basic block is formed of a list of non-terminating instructions followed by a single TerminatorInst instruction. TerminatorInst's may not occur in the middle of basic blocks, and must terminate the blocks. The BasicBlock class allows malformed basic blocks to occur because it may be useful in the intermediate stage of constructing or modifying a program. However, the verifier will ensure that basic blocks are "well formed".