Struct wasmer_compiler_llvm::LLVM
source · pub struct LLVM {
pub(crate) enable_nan_canonicalization: bool,
pub(crate) enable_verifier: bool,
pub(crate) opt_level: LLVMOptLevel,
is_pic: bool,
pub(crate) callbacks: Option<Arc<dyn LLVMCallbacks>>,
pub(crate) middlewares: Vec<Arc<dyn ModuleMiddleware>>,
}
Fields§
§enable_nan_canonicalization: bool
§enable_verifier: bool
§opt_level: LLVMOptLevel
§is_pic: bool
§callbacks: Option<Arc<dyn LLVMCallbacks>>
§middlewares: Vec<Arc<dyn ModuleMiddleware>>
The middleware chain.
Implementations§
source§impl LLVM
impl LLVM
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new configuration object with the default configuration specified.
sourcepub fn opt_level(&mut self, opt_level: LLVMOptLevel) -> &mut Self
pub fn opt_level(&mut self, opt_level: LLVMOptLevel) -> &mut Self
The optimization levels when optimizing the IR.
sourcepub fn callbacks(
&mut self,
callbacks: Option<Arc<dyn LLVMCallbacks>>,
) -> &mut Self
pub fn callbacks( &mut self, callbacks: Option<Arc<dyn LLVMCallbacks>>, ) -> &mut Self
Callbacks that will triggered in the different compilation phases in LLVM.
fn reloc_mode(&self, binary_format: BinaryFormat) -> RelocMode
fn code_model(&self, binary_format: BinaryFormat) -> CodeModel
pub(crate) fn target_operating_system(&self, target: &Target) -> OperatingSystem
pub(crate) fn target_binary_format(&self, target: &Target) -> BinaryFormat
fn target_triple(&self, target: &Target) -> TargetTriple
sourcepub fn target_machine(&self, target: &Target) -> TargetMachine
pub fn target_machine(&self, target: &Target) -> TargetMachine
Generates the target machine for the current target
Trait Implementations§
source§impl CompilerConfig for LLVM
impl CompilerConfig for LLVM
source§fn enable_pic(&mut self)
fn enable_pic(&mut self)
Emit code suitable for dlopen.
source§fn enable_verifier(&mut self)
fn enable_verifier(&mut self)
Whether to verify compiler IR.
source§fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
Pushes a middleware onto the back of the middleware chain.
source§fn canonicalize_nans(&mut self, enable: bool)
fn canonicalize_nans(&mut self, enable: bool)
Enable NaN canonicalization. Read more
source§fn supported_features_for_target(&self, _target: &Target) -> Features
fn supported_features_for_target(&self, _target: &Target) -> Features
Gets the supported features for this compiler in the given target
§fn default_features_for_target(&self, target: &Target) -> Features
fn default_features_for_target(&self, target: &Target) -> Features
Gets the default features for this compiler in the given target
Auto Trait Implementations§
impl Freeze for LLVM
impl !RefUnwindSafe for LLVM
impl Send for LLVM
impl Sync for LLVM
impl Unpin for LLVM
impl !UnwindSafe for LLVM
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn