[][src]Enum binaryen_sys::passes::OptimizationPass

pub enum OptimizationPass {
    Dae,
    DaeOptimizing,
    CoalesceLocals,
    CoalesceLocalsLearning,
    CodePushing,
    CodeFolding,
    ConstHoisting,
    Dce,
    Directize,
    Dfo,
    DuplicateFunctionElimination,
    ExtractFunction,
    Flatten,
    FpcastEmu,
    FuncMetrics,
    GenerateStackIr,
    Inlining,
    InliningOptimizing,
    LegalizeJsInterface,
    LegalizeJsInterfaceMinimally,
    LocalCse,
    LogExecution,
    I64ToI32Lowering,
    InstrumentLocals,
    InstrumentMemory,
    Licm,
    LimitSegments,
    MemoryPacking,
    MergeBlocks,
    MergeLocals,
    Metrics,
    MinifyImports,
    MinifyImportsAndExports,
    Nm,
    NoExitRuntime,
    OptimizeAddedConstants,
    OptimizeAddedConstantsPropagate,
    OptimizeInstructions,
    OptimizeStackIr,
    PickLoadSigns,
    PostEmscripten,
    Precompute,
    PrecomputePropagate,
    Print,
    PrintMinified,
    PrintFeatures,
    PrintFull,
    PrintCallGraph,
    PrintStackIr,
    RelooperJumpThreading,
    RemoveNonJsOps,
    RemoveImports,
    RemoveMemory,
    RemoveUnusedBrs,
    RemoveUnusedModuleElements,
    RemoveUnusedNonfunctionModuleElements,
    RemoveUnusedNames,
    ReorderFunctions,
    ReorderLocals,
    Rereloop,
    Rse,
    SafeHeap,
    SimplifyLocals,
    SimplifyLocalsNonesting,
    SimplifyLocalsNotee,
    SimplifyLocalsNostructure,
    SimplifyLocalsNoteeNostructure,
    Souperify,
    SouperifySingleUse,
    SpillPointers,
    Ssa,
    SsaNomerge,
    Strip,
    StripDebug,
    StripProducers,
    StripTargetFeatures,
    TrapModeClamp,
    TrapModeJs,
    Untee,
    Vacuum,
    LowerI64,
}

Variants

Dae

removes arguments to calls in an lto-like manner

DaeOptimizing

removes arguments to calls in an lto-like manner, and optimizes where we removed

CoalesceLocals

reduce # of locals by coalescing

CoalesceLocalsLearning

reduce # of locals by coalescing and learning

CodePushing

push code forward, potentially making it not always execute

CodeFolding

fold code, merging duplicates

ConstHoisting

hoist repeated constants to a local

Dce

removes unreachable code

Directize

turns indirect calls into direct ones

Dfo

optimizes using the DataFlow SSA IR

DuplicateFunctionElimination

removes duplicate functions

ExtractFunction

leaves just one function (useful for debugging)

Flatten

flattens out code, removing nesting

FpcastEmu

emulates function pointer casts, allowing incorrect indirect calls to (sometimes) work

FuncMetrics

reports function metrics

GenerateStackIr

generate Stack IR

Inlining

inline functions (you probably want inlining-optimizing)

InliningOptimizing

inline functions and optimizes where we inlined

LegalizeJsInterface

legalizes i64 types on the import/export boundary

LegalizeJsInterfaceMinimally

legalizes i64 types on the import/export boundary in a minimal manner, only on things only JS will call

LocalCse

common subexpression elimination inside basic blocks

LogExecution

instrument the build with logging of where execution goes

I64ToI32Lowering

lower all uses of i64s to use i32s instead

InstrumentLocals

instrument the build with code to intercept all loads and stores

InstrumentMemory

instrument the build with code to intercept all loads and stores

Licm

loop invariant code motion

LimitSegments

attempt to merge segments to fit within web limits

MemoryPacking

packs memory into separate segments, skipping zeros

MergeBlocks

merges blocks to their parents

MergeLocals

merges locals when beneficial

Metrics

reports metrics

MinifyImports

minifies import names (only those, and not export names), and emits a mapping to the minified ones

MinifyImportsAndExports

minifies both import and export names, and emits a mapping to the minified ones

Nm

name list

NoExitRuntime

removes calls to atexit(), which is valid if the C runtime will never be exited

OptimizeAddedConstants

optimizes added constants into load/store offsets

OptimizeAddedConstantsPropagate

optimizes added constants into load/store offsets, propagating them across locals too

OptimizeInstructions

optimizes instruction combinations

OptimizeStackIr

optimize Stack IR

PickLoadSigns

pick load signs based on their uses

PostEmscripten

miscellaneous optimizations for Emscripten-generated code

Precompute

computes compile-time evaluatable expressions

PrecomputePropagate

computes compile-time evaluatable expressions and propagates them through locals

Print

print in s-expression format

PrintMinified

print in minified s-expression format

PrintFeatures

print options for enabled features

PrintFull

print in full s-expression format

PrintCallGraph

print call graph

PrintStackIr

print out Stack IR (useful for internal debugging)

RelooperJumpThreading

thread relooper jumps (fastcomp output only)

RemoveNonJsOps

removes operations incompatible with js

RemoveImports

removes imports and replaces them with nops

RemoveMemory

removes memory segments

RemoveUnusedBrs

removes breaks from locations that are not needed

RemoveUnusedModuleElements

removes unused module elements

RemoveUnusedNonfunctionModuleElements

removes unused module elements that are not functions

RemoveUnusedNames

removes names from locations that are never branched to

ReorderFunctions

sorts functions by access frequency

ReorderLocals

sorts locals by access frequency

Rereloop

re-optimize control flow using the relooper algorithm

Rse

remove redundant local.sets

SafeHeap

instrument loads and stores to check for invalid behavior

SimplifyLocals

miscellaneous locals-related optimizations

SimplifyLocalsNonesting

miscellaneous locals-related optimizations (no nesting at all; preserves flatness)

SimplifyLocalsNotee

miscellaneous locals-related optimizations (no tees)

SimplifyLocalsNostructure

miscellaneous locals-related optimizations (no structure)

SimplifyLocalsNoteeNostructure

miscellaneous locals-related optimizations (no tees or structure)

Souperify

emit Souper IR in text form

SouperifySingleUse

emit Souper IR in text form (single-use nodes only)

SpillPointers

spill pointers to the C stack (useful for Boehm-style GC)

Ssa

ssa-ify variables so that they have a single assignment

SsaNomerge

ssa-ify variables so that they have a single assignment, ignoring merges

Strip

deprecated; same as strip-debug

StripDebug

strip debug info (including the names section)

StripProducers

strip the wasm producers section

StripTargetFeatures

strip the wasm target features section

TrapModeClamp

replace trapping operations with clamping semantics

TrapModeJs

replace trapping operations with js semantics

Untee

removes local.tees, replacing them with sets and gets

Vacuum

removes obviously unneeded code

LowerI64

lowers i64 into pairs of i32s

Trait Implementations

impl Eq for OptimizationPass[src]

impl PartialEq<OptimizationPass> for OptimizationPass[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Debug for OptimizationPass[src]

impl FromStr for OptimizationPass[src]

type Err = ()

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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