Block

0th

Percentile

Create an LLVM block

Blocks are labelled collections of statements/commands in LLVM. When creating an LLVM routine we use blocks so that we can branch between them. For example, a loop will typically have a body block and condition block. A function will have an entry block in which local variables are allocated and initialized and then we branch to another block. Block allows us to create a block within the specified function being created.

Keywords
programming
Usage
Block(fun, id = character(), context = getGlobalContext(), n = 1)
getPredecessor(x, single = TRUE)
getSuccessor(x, single = TRUE)
Arguments
fun

the function for which this block is to be created

id

a block can have a label or name which is used to identify the block when "dumping" the code in its IR form. This is just to make the code more readable to humans. The label can be the same or very different from the R variable used to store the Block object.

context

the LLVM context in which to create the block

n

the number of blocks to create. This is currently ignored. The idea is that we can create multiple blocks in a single call for convenience.

x

a BasicBlock object

single

a logical value, indicating whether to use the getSinglePredecessor method or getUniquePredecessor method, or the same distinction for a successor.

Value

An object of class Block.

References

LLVM Documentation http://llvm.org/docs/

See Also

IRBuilder

Aliases
  • Block
  • Block-class
  • getBlockInstructions
  • getFirstNonPHI
  • getTerminator
  • getParent,BasicBlock-method
  • getContext,BasicBlock-method
  • coerce,BasicBlock,LLVMContext-method
  • [,BasicBlock,missing,missing-method
  • [,BasicBlock,numeric,ANY-method
  • [[,BasicBlock,numeric,ANY-method
  • sapply,BasicBlock-method
  • length,BasicBlock-method
  • removeFromParent,BasicBlock-method
  • getPredecessor
  • getSuccessor
Documentation reproduced from package Rllvm, version 0.7-0, License: GPL-2

Community examples

Looks like there are no examples yet.