Execution
Generic Value
LLVM.GenericValue — Type
GenericValueA generic value that can be passed to or returned from a function in the execution engine.
Note that only simple types are supported, and for most use cases it is recommended to look up the address of the compiled function and ccall it directly.
This object needs to be disposed of using dispose.
LLVM.dispose — Method
dispose(val::GenericValue)Dispose of the given generic value.
Integer
LLVM.GenericValue — Method
GenericValue(typ::LLVM.IntegerType, N::Integer)Create a generic value from an integer of the given type.
LLVM.intwidth — Function
intwidth(val::GenericValue)Get the bit width of the integer value stored in the generic value.
Base.convert — Method
convert(::Type{<:Integer}, val::GenericValue)Convert a generic value to an integer of the given type.
Floating Point
LLVM.GenericValue — Method
GenericValue(typ::LLVM.FloatingPointType, N::AbstractFloat)Create a generic value from a floating point number of the given type.
Base.convert — Method
convert(::Type{<:AbstractFloat}, val::GenericValue, typ::LLVM.FloatingPointType)Convert a generic value to a floating point number of the given type.
Contrary to the integer conversion, the LLVM type is also required to be passed explicitly.
Pointer
LLVM.GenericValue — Method
GenericValue(ptr::Ptr)Create a generic value from a pointer.
Base.convert — Method
convert(::Type{Ptr{T}}, val::GenericValue)Convert a generic value to a pointer.
MCJIT
LLVM.ExecutionEngine — Type
LLVM.ExecutionEngineAn execution engine that can run functions in a module.
LLVM.Interpreter — Function
Interpreter(mod::Module)Create an interpreter for the given module.
This object needs to be disposed of using dispose.
LLVM.dispose — Method
dispose(engine::ExecutionEngine)Dispose of the given execution engine.
Base.push! — Method
push!(engine::LLVM.ExecutionEngine, mod::Module)Add another module to the execution engine.
This takes ownership of the module.
Base.delete! — Method
delete!(engine::ExecutionEngine, mod::Module)Remove a module from the execution engine.
Ownership of the module is transferred back to the user.
LLVM.lookup — Method
lookup(engine::ExecutionEngine, fn::String)Look up the address of the given function in the execution engine.
LLVM.functions — Method
functions(engine::ExecutionEngine)Get an iterator over the functions in the execution engine.
The iterator object is not actually iterable, but supports get and haskey queries with function names, and getindex to get the function object.
ORCJIT
LLVM.ThreadSafeContext — Type
ThreadSafeContextA thread-safe version of Context.
LLVM.ThreadSafeContext — Method
ThreadSafeContext(; opaque_pointers=nothing)Create a new thread-safe context. The behavior of opaque_pointers is the same as in Context.
This object needs to be disposed of using dispose(::ThreadSafeContext).
LLVM.context — Method
context(ts_ctx::ThreadSafeContext)Obtain the context associated with a thread-safe context.
LLVM.dispose — Method
dispose(ctx::ThreadSafeContext)Dispose of the thread-safe context, releasing all resources associated with it.
LLVM.ThreadSafeModule — Type
ThreadSafeModuleA thread-safe version of LLVM.Module.
LLVM.ThreadSafeModule — Method
ThreadSafeModule(name::String)Create a thread-safe module with the given name.
This object needs to be disposed of using dispose(::ThreadSafeModule).
LLVM.ThreadSafeModule — Method
(mod::ThreadSafeModule)(f)Apply f to the LLVM module contained within mod, after locking the module and activating its context.
LLVM.dispose — Method
dispose(mod::ThreadSafeModule)Dispose of the thread-safe module, releasing all resources associated with it.
LLVM.LLJIT — Type
LLJIT(::LLJITBuilder)Creates a LLJIT stack based on the provided builder.
LLJIT(;tm::Union{Nothing, TargetMachine})Use the provided TargetMachine and construct an LLJIT from it.
LLVM.JITDylib — Type
JITDylib(lljit::LLJIT)Get the main JITDylib
JITDylib(es::ExecutionSession, name; bare=false)Adds a new JITDylib to the ExecutionSession. The name must be unique and the bare=true no standard platform symbols are made available.
JITDylib(jljit::JuliaOJIT)Get the external JITDylib from the Julia JIT
LLVM.lookup — Method
lookup(lljit::LLJIT, name)Takes an unmangled symbol names and searches for it in the LLJIT.
LLVM.linkinglayercreator! — Function
linkinglayercreator!(builder::LLJITBuilder, creator::ObjectLinkingLayerCreator)