summaryrefslogtreecommitdiff
path: root/src/passes/DeadCodeElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
* optimize dceing of blocks and known-to-exist children (#1015)Alon Zakai2017-05-181-57/+34
|
* Validate finalization (#1014)Alon Zakai2017-05-181-8/+34
| | | | | | | * 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.
* when creating blocks during dce, make sure they have the same type as before ↵Alon Zakai (kripken)2017-05-021-9/+14
| | | | the transformation, as the outside might care about that
* improve dce to handle more cases of nested unreachable code (#989)Alon Zakai2017-05-021-7/+41
| | | | | | | | | | * improve dce to handle more cases of nested unreachable code, in particular, when the child is unreachable in type but not an actual Unreachable node, e.g. if it's a br. in that case, we just need to verify that the br is not to us where we are a block or loop * handle unreachable switch conditions in dce * handle dce of br condition which is unreachable, and host arguments * handle dce of block i32 etc. which is actually unreachable
* Default Walker subclasses to using Visitor<SubType> (#921)jgravelle-google2017-02-231-2/+2
| | | | Most module walkers use PostWalker<T, Visitor<T>>, let that pattern be expressed as simply PostWalker<T>
* don't convert unreachable -> unreachable in dceAlon Zakai2016-10-131-1/+1
|
* handle globals in dceAlon Zakai2016-10-131-0/+2
|
* DCE bugfix (#736)Alon Zakai2016-10-041-2/+13
| | | | | * fix a dce bug where it is invalid to truncate a block if it leaves a final element with a bad type (wasm doesn't always allow removing unreachable code) * add wast pass fuzzer
* loops no longer have an out label and other upstream loop updatesAlon Zakai2016-09-071-6/+2
|
* call_indirect now has the target at the endAlon Zakai2016-09-071-16/+17
|
* add drop and tee expressionsAlon Zakai2016-09-071-7/+14
|
* fix dce bug in non-parallel mode, which happens in debug mode, and add debug ↵Alon Zakai2016-07-161-1/+6
| | | | testing
* 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.
* use WASM_UNUSED in some places to fix compiler warning/error on unused ↵Alon Zakai2016-06-081-2/+1
| | | | variables we only use in asserts (#579)
* move function parallelism to pass and pass runner, which allows more ↵Alon Zakai2016-06-031-1/+3
| | | | efficient parallel execution (#564)
* dead code elimination pass (#536)Alon Zakai2016-05-221-0/+351