Struct Singlepass
pub struct Singlepass {
pub(crate) enable_nan_canonicalization: bool,
pub(crate) middlewares: Vec<Arc<dyn ModuleMiddleware>>,
pub(crate) callbacks: Option<SinglepassCallbacks>,
pub num_threads: NonZero<usize>,
}Fields§
§enable_nan_canonicalization: bool§middlewares: Vec<Arc<dyn ModuleMiddleware>>§callbacks: Option<SinglepassCallbacks>§num_threads: NonZero<usize>The number of threads to use for compilation.
Implementations§
§impl Singlepass
impl Singlepass
pub fn new() -> Singlepass
pub fn new() -> Singlepass
Creates a new configuration object with the default configuration specified.
pub fn canonicalize_nans(&mut self, enable: bool) -> &mut Singlepass
pub fn callbacks(
&mut self,
callbacks: Option<SinglepassCallbacks>,
) -> &mut Singlepass
pub fn callbacks( &mut self, callbacks: Option<SinglepassCallbacks>, ) -> &mut Singlepass
Callbacks that will triggered in the different compilation phases in Singlepass.
pub fn num_threads(&mut self, num_threads: NonZero<usize>) -> &mut Singlepass
pub fn num_threads(&mut self, num_threads: NonZero<usize>) -> &mut Singlepass
Set the number of threads to use for compilation.
Trait Implementations§
§impl Clone for Singlepass
impl Clone for Singlepass
§fn clone(&self) -> Singlepass
fn clone(&self) -> Singlepass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl CompilerConfig for Singlepass
impl CompilerConfig for Singlepass
§fn compiler(self: Box<Singlepass>) -> Box<dyn Compiler>
fn compiler(self: Box<Singlepass>) -> Box<dyn Compiler>
Transform it into the compiler
§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 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.
§fn enable_pic(&mut self)
fn enable_pic(&mut self)
Enable Position Independent Code (PIC). Read more
§fn enable_verifier(&mut self)
fn enable_verifier(&mut self)
Enable compiler IR verification. Read more
§fn enable_perfmap(&mut self)
fn enable_perfmap(&mut self)
Enable generation of perfmaps to sample the JIT compiled frames.
§fn enable_non_volatile_memops(&mut self)
fn enable_non_volatile_memops(&mut self)
For the LLVM compiler, we can use non-volatile memory operations which lead to a better performance
(but are not 100% SPEC compliant).
§fn canonicalize_nans(&mut self, _enable: bool)
fn canonicalize_nans(&mut self, _enable: bool)
Enable NaN canonicalization. Read more
§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
§impl Debug for Singlepass
impl Debug for Singlepass
§impl Default for Singlepass
impl Default for Singlepass
§fn default() -> Singlepass
fn default() -> Singlepass
Returns the “default value” for a type. Read more
§impl From<Singlepass> for Engine
impl From<Singlepass> for Engine
§fn from(config: Singlepass) -> Engine
fn from(config: Singlepass) -> Engine
Converts to this type from the input type.
Source§impl From<Singlepass> for Engine
impl From<Singlepass> for Engine
Source§fn from(value: Singlepass) -> Self
fn from(value: Singlepass) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Singlepass
impl !RefUnwindSafe for Singlepass
impl Send for Singlepass
impl Sync for Singlepass
impl Unpin for Singlepass
impl !UnwindSafe for Singlepass
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,
§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