9.1
Racket
Functions for JIT compilation and execution of LLVM IR.
5.1 Execution Engine🔗ℹ
return an execution engine for given module
Returns the address of the compiled function with the given name. The returned integer can be cast to a function pointer using Racket FFI.
Returns the target data associated with the execution engine.
Returns the target machine associated with the execution engine.
5.3 Generic Values🔗ℹ
Generic values are used to pass arguments to and receive results from JIT-compiled functions.
Converted given
value to
LLVMGenericValueRef?.
type decided it’s LLVM type corresponding.
signed? decided it’s signed integer or not.
convert
generic-value back to racket
integer?.
signed? decided treat it as a signed integer or not.
convert
generic-value back to racket
number?5.4 Target Machine Configuration🔗ℹ
Creates a target machine for the given target, CPU, and features.
level specifies optimization level.
reloc specifies the relocation model.
model specifies the code model.
Emits the module as code to the given file. codegen specifies whether to emit assembly or object code.
Emits the module as code to a memory buffer. Returns the generated code as bytes.
Sets the code generation optimization level for target machine options.
Sets the code model for target machine options.
Sets the relocation mode for target machine options.
Controls whether GlobalISel aborts on failure.
5.5 Binary Objects🔗ℹ
Returns the type of a binary object file.
Creates a copy of the memory buffer of a binary object file.
The ORC JIT (On-Request Compilation) API provides a higher-level JIT compilation interface compared to the basic execution engine.
5.6.1 LLJIT Builder and Creation🔗ℹ
Creates a new LLJIT builder for configuring JIT options before creating an LLJIT instance.
Sets the target machine builder for the LLJIT builder.
Disposes of an LLJIT builder.
Creates an LLJIT instance using the given builder. The LLJIT reference is returned in out-lljit.
Disposes of an LLJIT instance.
5.6.2 Adding Code to LLJIT🔗ℹ
Adds an LLVM IR module to the LLJIT instance.
Adds an object file to the LLJIT instance.
5.6.3 Looking up Symbols🔗ℹ
Looks up a symbol in the LLJIT instance and returns its address in out-address.
5.6.4 LLJIT Introspection🔗ℹ
Returns the main JIT dylib of the LLJIT instance.
Returns the execution session of the LLJIT instance.
Returns the data layout string of the LLJIT instance.
Returns the target triple string of the LLJIT instance.
5.6.5 Thread-Safe Modules🔗ℹ
Creates a thread-safe context for use with ORC JIT.
Creates a thread-safe module from an LLVM module and context.
Disposes of a thread-safe context.