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

Flags group shared.

Implementations§

Create flags shared settings group.

User-defined settings.

Get a view of the boolean predicates.

Optimization level:

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

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.

Enable Position-Independent Code generation

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.

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.

Enable the use of floating-point instructions

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

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.

Enable the use of SIMD instructions.

Enable the use of atomic instructions

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.

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

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

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

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.

Enable the use of jump tables in generated machine code.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.