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

pub enum OptimizationPass {
    AlignmentLowering,
    Asyncify,
    AvoidReinterprets,
    Dae,
    DaeOptimizing,
    CoalesceLocals,
    CoalesceLocalsLearning,
    CodePushing,
    CodeFolding,
    ConstHoisting,
    Dce,
    Dealign,
    Denan,
    Directize,
    Dfo,
    Dwarfdump,
    DuplicateImportElimination,
    DuplicateFunctionElimination,
    EmitTargetFeatures,
    EmscriptenPic,
    EmscriptenPicMainModule,
    ExtractFunction,
    Flatten,
    FpcastEmu,
    FuncMetrics,
    GenerateDyncalls,
    GenerateI64Dyncalls,
    GenerateStackIr,
    InlineMain,
    Inlining,
    InliningOptimizing,
    LegalizeJsInterface,
    LegalizeJsInterfaceMinimally,
    LocalCse,
    LogExecution,
    I64ToI32Lowering,
    InstrumentLocals,
    InstrumentMemory,
    Licm,
    LimitSegments,
    MemoryPacking,
    MergeBlocks,
    MergeLocals,
    Metrics,
    MinifyImports,
    MinifyImportsAndExports,
    MinifyImportsAndExportsAndModules,
    ModAsyncifyAlwaysAndOnlyUnwind,
    ModAsyncifyNeverUnwind,
    Nm,
    NoExitRuntime,
    OptimizeAddedConstants,
    OptimizeAddedConstantsPropagate,
    OptimizeInstructions,
    OptimizeStackIr,
    PickLoadSigns,
    PostAssemblyscript,
    PostAssemblyscriptFinalize,
    PostEmscripten,
    Precompute,
    PrecomputePropagate,
    Print,
    PrintMinified,
    PrintFeatures,
    PrintFull,
    PrintCallGraph,
    PrintFunctionMap,
    PrintStackIr,
    RemoveNonJsOps,
    RemoveImports,
    RemoveMemory,
    RemoveUnusedBrs,
    RemoveUnusedModuleElements,
    RemoveUnusedNonfunctionModuleElements,
    RemoveUnusedNames,
    ReorderFunctions,
    ReorderLocals,
    Rereloop,
    ReplaceStackPointer,
    Rse,
    Roundtrip,
    SafeHeap,
    SimplifyGlobals,
    SimplifyGlobalsOptimizing,
    SimplifyLocals,
    SimplifyLocalsNonesting,
    SimplifyLocalsNotee,
    SimplifyLocalsNostructure,
    SimplifyLocalsNoteeNostructure,
    Souperify,
    SouperifySingleUse,
    SpillPointers,
    StubUnsupportedJs,
    Ssa,
    SsaNomerge,
    Strip,
    StackCheck,
    StripDebug,
    StripDwarf,
    StripProducers,
    StripTargetFeatures,
    TrapModeClamp,
    TrapModeJs,
    Untee,
    Vacuum,
}

Variants

AlignmentLowering

lower unaligned loads and stores to smaller aligned ones

Asyncify

async/await style transform, allowing pausing and resuming

AvoidReinterprets

Tries to avoid reinterpret operations via more loads

Dae

removes arguments to calls in an lto-like manner

DaeOptimizing

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

Dealign

forces all loads and stores to have alignment 1

Denan

instrument the wasm to convert NaNs into 0 at runtime

Directize

turns indirect calls into direct ones

Dfo

optimizes using the DataFlow SSA IR

Dwarfdump

dump DWARF debug info sections from the read binary

DuplicateImportElimination

removes duplicate imports

DuplicateFunctionElimination

removes duplicate functions

EmitTargetFeatures

emit the target features section in the output

EmscriptenPic

Convert PIC ABI from llvm to emscripten

EmscriptenPicMainModule

Convert PIC ABI from llvm to emscripten

ExtractFunction

leaves just one function (useful for debugging)

Flatten

flattens out code, removing nesting

FpcastEmu

calls to (sometimes) work

FuncMetrics

reports function metrics

GenerateDyncalls

generate dynCall fuctions used by emscripten ABI

GenerateI64Dyncalls

via the wasm table without JavaScript BigInt support).

GenerateStackIr

generate Stack IR

InlineMain

inline __original_main into main

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

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

emits a mapping to the minified ones

MinifyImportsAndExports

the minified ones

MinifyImportsAndExportsAndModules

the minified ones, and minifies the modules as well

ModAsyncifyAlwaysAndOnlyUnwind

and we never rewind

ModAsyncifyNeverUnwind

apply the assumption that asyncify never unwinds

Nm

name list

NoExitRuntime

will never be exited

OptimizeAddedConstants

optimizes added constants into load/store offsets

OptimizeAddedConstantsPropagate

them across locals too

OptimizeInstructions

optimizes instruction combinations

OptimizeStackIr

optimize Stack IR

PickLoadSigns

pick load signs based on their uses

PostAssemblyscript

eliminates redundant ARC patterns in AssemblyScript output

PostAssemblyscriptFinalize

eliminates collapsed ARC patterns after other optimizations

PostEmscripten

miscellaneous optimizations for Emscripten-generated code

Precompute

computes compile-time evaluatable expressions

PrecomputePropagate

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

PrintFunctionMap

print a map of function indexes to names

PrintStackIr

print out Stack IR (useful for internal debugging)

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

ReplaceStackPointer

imported functions.

Rse

remove redundant local.sets

Roundtrip

write the module to binary, then read it

SafeHeap

instrument loads and stores to check for invalid behavior

SimplifyGlobals

miscellaneous globals-related optimizations

SimplifyGlobalsOptimizing

where we replaced global.gets with constants

SimplifyLocals

miscellaneous locals-related optimizations

SimplifyLocalsNonesting

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)

StubUnsupportedJs

stub out unsupported JS operations

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

StackCheck

enforce limits on llvm's __stack_pointer global

StripDebug

strip debug info (including the names section)

StripDwarf

strip dwarf debug info

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

Trait Implementations

impl Debug for OptimizationPass[src]

impl Eq for OptimizationPass[src]

impl FromStr for OptimizationPass[src]

type Err = ()

The associated error which can be returned from parsing.

impl PartialEq<OptimizationPass> for OptimizationPass[src]

impl StructuralEq for OptimizationPass[src]

impl StructuralPartialEq for OptimizationPass[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.