pub struct ExecutionEngine { /* private fields */ }
Expand description

An execution engine.

Implementations§

source§

impl ExecutionEngine

source

pub fn new( module: &Module<'_>, optimization_level: usize, shared_library_paths: &[&str], enable_obj_dump: bool ) -> Self

Creates an ExecutionEngine for the provided Module.

The Module is expected to be “translatable” to LLVM IR (only contains operations in dialects that implement the LLVMTranslationDialectInterface).

The module ownership stays with the client and can be destroyed as soon as the call returns.

optimization_level is the optimization level to be used for transformation and code generation. LLVM passes at optLevel are run before code generation.

shared_library_paths - The number and array of paths corresponding to shared libraries that will be loaded are specified via numPaths and sharedLibPaths

source

pub unsafe fn invoke_packed( &self, name: &str, arguments: &mut [*mut ()] ) -> Result<(), Error>

Invokes a function in a module. The arguments argument includes pointers to results of the function as well as arguments.

The function must have been tagged with the llvm.emit_c_interface attribute.

Safety

This function modifies memory locations pointed by the arguments argument. If those pointers are invalid or misaligned, calling this function might result in undefined behavior.

Trait Implementations§

source§

impl Drop for ExecutionEngine

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.