summaryrefslogtreecommitdiff
path: root/src/passes/Vacuum.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Validate finalization (#1014)Alon Zakai2017-05-181-23/+30
| | | | | | | * validate that types are properly finalized, when in pass-debug mode (BINARYEN_PASS_DEBUG env var): check after each pass is run that the type of each node is equal to the proper type (when finalizing it, i.e., fully recomputing the type). * fix many fuzz bugs found by that. * in particular, fix dce bugs with type changes not being fully updated during code removal. add a new TypeUpdater helper class that lets a pass update types efficiently, by the helper tracking deps between blocks and branches etc., and updating/propagating type changes only as necessary.
* handle a drop of an if with both arms unreachable, which is possible since ↵Alon Zakai2017-05-011-4/+2
| | | | wasm added if types, which mean the if can be i32 even if the arms are unreachable etc (#991)
* do not merge a drop out of an if if the sides have different types, then the ↵Alon Zakai2017-02-281-5/+9
| | | | if would be invalid (#927)
* Default Walker subclasses to using Visitor<SubType> (#921)jgravelle-google2017-02-231-1/+1
| | | | Most module walkers use PostWalker<T, Visitor<T>>, let that pattern be expressed as simply PostWalker<T>
* Improve handling of implicit traps (#898)Alon Zakai2017-02-061-12/+12
| | | | | | | | * add --ignore-implicit-traps option, and by default do not ignore them, to properly preserve semantics * implicit traps can be reordered, but are side effects and should not be removed * add testing for --ignore-implicit-traps
* fix vacuum big where we changed an unreachable node to a nop (#728)Alon Zakai2016-10-021-1/+5
|
* optimize if(const)Alon Zakai2016-09-241-0/+15
|
* replace two drops in an if-else with one on the ifAlon Zakai2016-09-231-2/+7
|
* remove final elements in vacuum carefully: we must preserve a return value ↵Alon Zakai2016-09-111-10/+29
| | | | if there is one
* properly handle blocks with return values in vacuum - we cannot remove their ↵Alon Zakai2016-09-071-3/+22
| | | | final value directly, we can only do that if it is dropped, from the drop
* vacuum drops betterAlon Zakai2016-09-071-8/+21
|
* sink a drop into a single if armAlon Zakai2016-09-071-0/+19
|
* when replacing an if with its condition (when it has no body), we must drop itAlon Zakai2016-09-071-1/+1
|
* use globals in asm2wasmAlon Zakai2016-09-071-0/+2
|
* add an ExpressionStack traversalAlon Zakai2016-09-071-20/+1
|
* add drop and tee expressionsAlon Zakai2016-09-071-0/+8
|
* Add initialization functions for passes to avoid missing pass registration ↵Jukka Jylänki2016-06-211-1/+3
| | | | due to linker dead code elimination. Fixes #577.
* move function parallelism to pass and pass runner, which allows more ↵Alon Zakai2016-06-031-1/+3
| | | | efficient parallel execution (#564)
* vacuum the top of functions tooAlon Zakai2016-05-191-0/+12
|
* vacuum away everything not tied downAlon Zakai2016-05-191-8/+111
|
* use separate internal opcodes for unary variantsAlon Zakai2016-05-181-1/+1
|
* remove dead get_locals in vacuumAlon Zakai2016-05-161-2/+29
|
* Harmonize the internal opcodes with the binary format (#433)Alon Zakai2016-05-031-1/+1
| | | | | | * harmonize the internal opcodes with the binary format, so they clearly parallel, and also this helps us avoid needing the type to disambiguate * comment on GetLocal in C API
* get rid of nops in ifsAlon Zakai2016-04-241-0/+20
|
* vacuum dead code after br_tableAlon Zakai2016-04-241-1/+2
|
* vacuum dead code after unconditional brsAlon Zakai2016-04-241-3/+14
|
* optimize --vacuum a littleAlon Zakai2016-04-201-0/+8
|
* create a UnifiedExpressionVisitor for passes that want a single visitor ↵Alon Zakai2016-04-181-1/+1
| | | | function, to avoid confusion with having both visit* and visitExpression in a single pass (#357)
* Function parallelism (#343)Alon Zakai2016-04-151-0/+2
| | | | * allow traversals to mark themselves as function-parallel, in which case we run them using a thread pool. also mark some thread-safety risks (interned strings, arena allocators) with assertions they modify only on the main thread
* De-recurse traversals (#333)Alon Zakai2016-04-111-1/+1
| | | | | | | | | | | | * refactor core walking to not recurse * add a simplify-locals test * reuse parent's non-branchey scan logic in SimpleExecutionWalker, reduce code duplication * update wasm.js * rename things following comments
* add vacuum passAlon Zakai2016-04-071-0/+48