[][src]Struct cranelift_codegen::settings::Flags

pub struct Flags { /* fields omitted */ }

Flags group shared.

Methods

impl Flags[src]

pub fn new(builder: Builder) -> Self[src]

Create flags shared settings group.

impl Flags[src]

User-defined settings.

pub fn predicate_view(&self) -> PredicateView[src]

Get a view of the boolean predicates.

pub fn opt_level(&self) -> OptLevel[src]

Optimization level:

  • default: Very profitable optimizations enabled, none slow.
  • best: Enable all optimizations
  • fastest: Optimize for compile time by disabling most optimizations.

pub fn enable_verifier(&self) -> bool[src]

Run the Cranelift IR verifier at strategic times during compilation.

This makes compilation slower but catches many bugs. The verifier is disabled by default, except when reading Cranelift IR from a text file.

pub fn is_pic(&self) -> bool[src]

Enable Position-Independent Code generation

pub fn colocated_libcalls(&self) -> bool[src]

Use colocated libcalls.

Generate code that assumes that libcalls can be declared "colocated", meaning they will be defined along with the current function, such that they can use more efficient addressing.

pub fn avoid_div_traps(&self) -> bool[src]

Generate explicit checks around native division instructions to avoid their trapping.

This is primarily used by SpiderMonkey which doesn't install a signal handler for SIGFPE, but expects a SIGILL trap for division by zero.

On ISAs like ARM where the native division instructions don't trap, this setting has no effect - explicit checks are always inserted.

pub fn enable_float(&self) -> bool[src]

Enable the use of floating-point instructions

Disabling use of floating-point instructions is not yet implemented.

pub fn enable_nan_canonicalization(&self) -> bool[src]

Enable NaN canonicalization

This replaces NaNs with a single canonical value, for users requiring entirely deterministic WebAssembly computation. This is not required by the WebAssembly spec, so it is not enabled by default.

pub fn enable_simd(&self) -> bool[src]

Enable the use of SIMD instructions.

pub fn enable_atomics(&self) -> bool[src]

Enable the use of atomic instructions

pub fn baldrdash_prologue_words(&self) -> u8[src]

Number of pointer-sized words pushed by the baldrdash prologue.

Functions with the baldrdash calling convention don't generate their own prologue and epilogue. They depend on externally generated code that pushes a fixed number of words in the prologue and restores them in the epilogue.

This setting configures the number of pointer-sized words pushed on the stack when the Cranelift-generated code is entered. This includes the pushed return address on x86.

pub fn allones_funcaddrs(&self) -> bool[src]

Emit not-yet-relocated function addresses as all-ones bit patterns.

pub fn probestack_enabled(&self) -> bool[src]

Enable the use of stack probes, for calling conventions which support this functionality.

pub fn probestack_func_adjusts_sp(&self) -> bool[src]

Set this to true of the stack probe function modifies the stack pointer itself.

pub fn probestack_size_log2(&self) -> u8[src]

The log2 of the size of the stack guard region.

Stack frames larger than this size will have stack overflow checked by calling the probestack function.

The default is 12, which translates to a size of 4096.

pub fn jump_tables_enabled(&self) -> bool[src]

Enable the use of jump tables in generated machine code.

Trait Implementations

impl Display for Flags[src]

impl<'a> From<&'a Flags> for FlagsOrIsa<'a>[src]

impl Clone for Flags[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Flags

impl Sync for Flags

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]