This function and class allow us to create and use an IRBuilder for "easy" creation of instructions as we define a native function and generate code.
IRBuilder(block = getGlobalContext())
createBr(builder, block, check = TRUE)
createBranch(builder, block, check = TRUE)
createCall(builder, fun, ..., .args = list(...), id = character())
createCondBr(builder, cond, true, false)
createGEP(builder, val, index, id = character())
createLoad(builder, val, isVolatile = FALSE, id = character())
createLocalArrayVariable(builder, type, id, size = NULL)
createLocalVariable(builder, type, id, beforeTerminator = FALSE)
createAlloc(builder, type, id, beforeTerminator = FALSE)
createNeg(val, id = character(), block = NULL)
createNot(val, id = character(), block = NULL, builder = NULL)
createRet(builder, value = NULL)
createReturn(builder, value = NULL)
createReturnVoid(builder)
createRetVoid(builder)
createSExt(builder, val, type, id = character())
createStore(builder, val, ptr, volatile = FALSE)
createBitCast(builder, val, type, id = character())
createUIToFP(builder, val, type, id = character())
createSIToFP(builder, val, type, id = character())
createFPToSI(builder, val, type, id = character())
createFPToUI(builder, val, type, id = character())
setInsertPoint(builder, instruction)
createCast(builder, op, from, to, id = character())
createCondBranch(builder, cond, true, false)
createExtractElement(builder, vec, idx)
createFCmp(builder, op, lhs, rhs, id = character())
createFNeg(builder, val, id = character())
createGlobalString(builder, val, id = character())
createInsertElement(builder, vec, elt, idx)
createIntCast(builder, val, type, isSigned = TRUE, id = character())
createSelect(builder, cond, true, false, id = character())
createStructGEP(builder, value, field)
createTargetMachine(target, triple, cpu, features = "", options = list())
createUnreachable(builder, id = character())
createUnwind(builder, id = character())
createZExt(builder, val, type, id = character(), Z = TRUE)
getTrue(ir)
getFalse(ir)
getInsertBlock(builder)
setInsertBlock(builder, block)
setInsertPoint(builder, instruction)
createTrunc(builder, value, type, id = "")
createFPTrunc(builder, value, type, id = "")either a Block object to which instructions will be inserted/added
by default. This can be reset using setInsertPoint.
Alternatively, this can be an LLVMContext object.
an instance of the IRBuilder class in LLVM that we use to create the instructions in the code.
the LLVM Function object we are calling in createCall.
the arguments to the call in createCall.
a list of the arguments to pass to the actual function call
being generated in the code to createCall. This is an
alternative to … so that we can pass a single object containing
the individual arguments rather than passing the arguments
individually in the call to createCall. (This is all a bit
meta, but that's because it is!)
a human-readable character string giving an identifier to use for identifying the instruction
the Value instruction to use for the the condition in an LLVM if-else-statement created by createCondBr.
the Block to use for the body of the if-statement created with createCondBr
the Block to use for the else part of the if-statement created with createCondBr
a Value object. This is used as the object in which to
get the general element pointer (GEP) in createGEP, and the representation of the variable to load in createLoad.
It is also the Value objectto negate with createNeg and createNot.
a list of Value objects (or literal numbers) that
are used in createGEP to specify the indices to subset.
a logical value indicating whether the LLVM object is to be treated as volatile, i.e. can change due to external commands.
an LLVM Type object that describes/represents a data type
the number of elements in this local array variable.
a logical value that indicates whether the new variable should be inserted before the terminator for the target block.
the Value that is to be returned
the Value to which the value will be stored in createStore.
the LLVM Instruction object after which new instructions will be added when used in setInsertPoint.
the Value to be cast in createCast
the Type from which to cast the LLVM Value in createCast
the Type to which to cast the LLVM Value in createCast
the object from which we want to extract a value in createExtractElement
the Value representing the index of the element to use in createExtractElement
left hand side Value of floating-pointing comparison in createFCmp
right hand side Value of floating-pointing comparison in createFCmp
the specification of the element in the object into which we will sert a value via createInsertElement
a logical value
a integer specifying the index that identifies the field in the struct data type in createStructGEP
a Target object.
a string representing the target machine type
a string describing the type of CPU
a string specifying the features.
a list
a logical value
a logical value that determines whether we check if the branch is to the same block, i.e., if we are creating a branch instruction to a block that is the same block.
LLVM Documentation http://llvm.org/docs/