Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Validate finalization (#1014) | Alon Zakai | 2017-05-18 | 1 | -6/+7 |
| | | | | | | | * 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. | ||||
* | Re-reloop pass (#1009) | Alon Zakai | 2017-05-16 | 1 | -11/+4 |
| | | | | | This adds a pass that converts to a CFG, runs the relooper, and re-generates wasm from that. This depends on flatten-control-flow being run before. The main goal here is to help code generators other than asm2wasm (which already receives relooped code from fastcomp). | ||||
* | merge blocks before and after remove-unused-brs | Alon Zakai (kripken) | 2017-05-10 | 1 | -1/+2 |
| | |||||
* | Flatten control flow pass (#999) | Alon Zakai | 2017-05-10 | 1 | -0/+1 |
| | | | | | | | | | | | This pass flattens out control flow in order to achieve 2 properties: * Control flow structures (block, loop, if) and control flow operations (br, br_if, br_table, return, unreachable) may only be block children, a loop body, or an if-true or if-false. (I.e., they cannot be nested inside an i32.add, a drop, a call, an if-condition, etc.) * Disallow block, loop, and if return values, i.e., do not use control flow to pass around values. As a result, expressions cannot contain control flow, and overall control flow is simpler, more structured, and more "flat". This should make things like re-relooping wasm code much easier, as they can run after the cfg is flattened | ||||
* | Add pass to instrument loads / stores. (#959) | Michael Bebenita | 2017-04-29 | 1 | -0/+1 |
| | | | | | | | | * Add pass to instrument loads / stores * Simplify instrumentation. * Document. | ||||
* | Preserve debug info through the optimizer (#981) | Alon Zakai | 2017-04-28 | 1 | -1/+21 |
| | | | | | | | | | | | | | | * add debugInfo option to passes, and use it to keep debug info alive through optimizations when we need it * add fib testcase for debug info * when preserving debug info, do not move code around call-imports, so debug info intrinsics remain stationary * improve wasm-module-building handling of the single-threaded case: don't create workers, which is more efficient and also nicer for debugging * process debug info in a more precise way, reordering it from being after the node (as it was a comment in JS) to before the node * remove unreachable hack for debug info, which is no longer needed since we reorder them, and make sure to finalize blocks in which we reorder | ||||
* | add a pass to log execution traces via instrumenting the code (#950) | Alon Zakai | 2017-03-16 | 1 | -0/+1 |
| | |||||
* | Local CSE (#930) | Alon Zakai | 2017-03-08 | 1 | -0/+5 |
| | | | Simple local common subexpression elimination. Useful mostly to reduce code size (as VMs do GVN etc.). Enabled by default in -Oz. | ||||
* | fix BINARYEN_PASS_DEBUG option (#908) | Alon Zakai | 2017-02-23 | 1 | -5/+9 |
| | | | | | * fix BINARYEN_PASS_DEBUG option * Add isNested property to passRunner | ||||
* | finish PickLoadSigns pass | Alon Zakai | 2017-02-16 | 1 | -0/+3 |
| | |||||
* | refactor sign/zero extension code into nice headers, and prepare ↵ | Alon Zakai | 2017-02-16 | 1 | -0/+1 |
| | | | | PickLoadSigns pass | ||||
* | add a RemoveUnusedModuleElements pass, and make LegalizeJSInterface create ↵ | Alon Zakai | 2016-12-07 | 1 | -3/+3 |
| | | | | TempRet0 if needed (otherwise we might remove it before we use it) | ||||
* | improve local simplication: simplify without if/block structure values ↵ | Alon Zakai | 2016-11-06 | 1 | -1/+2 |
| | | | | before coalesce, so that coalesce can remove all copies, then do another pass of full simplification after it | ||||
* | add variants of simplify-locals with and without teeing and structural opts | Alon Zakai | 2016-11-05 | 1 | -0/+3 |
| | |||||
* | remove-unused-brs after coalesce-locals | Alon Zakai | 2016-11-04 | 1 | -1/+2 |
| | |||||
* | add a pass to optimize memory segments, and pack memory in asm2wasm | Alon Zakai | 2016-11-01 | 1 | -0/+3 |
| | |||||
* | add an inlining pass (#814) | Alon Zakai | 2016-10-29 | 1 | -0/+1 |
| | |||||
* | Code pushing (#807) | Alon Zakai | 2016-10-26 | 1 | -0/+4 |
| | | | Push code forward, potentially letting it not execute | ||||
* | Adds a pass to print call graphs in .dot (graphviz) format. (#794) | Michael Bebenita | 2016-10-20 | 1 | -0/+1 |
| | |||||
* | Pass options (#788) | Alon Zakai | 2016-10-18 | 1 | -4/+4 |
| | | | | * add PassOptions structure, and use it for new -Os param to wasm-opt | ||||
* | Use steady_clock to measure code execution time (#776) | Loo Rong Jie | 2016-10-17 | 1 | -3/+2 |
| | |||||
* | reorder locals after simplify-locals, to remove unused locals before ↵ | Alon Zakai | 2016-10-16 | 1 | -0/+1 |
| | | | | coalesce-locals, making it much faster (#783) | ||||
* | run remove-unused-functions by default | Alon Zakai | 2016-10-14 | 1 | -0/+2 |
| | |||||
* | reuse code in add*Passes | Alon Zakai | 2016-10-14 | 1 | -15/+1 |
| | |||||
* | put heavy pass debugging operations behind BINARYEN_PASS_DEBUG (#755) | Alon Zakai | 2016-10-11 | 1 | -2/+9 |
| | |||||
* | passRunner debug and validation improvements (#726) | Alon Zakai | 2016-10-02 | 1 | -6/+17 |
| | |||||
* | asm2wasm i64 support (#723) | Alon Zakai | 2016-09-30 | 1 | -0/+1 |
| | | | | | | | | | | | | * support i64 intrinsics from fastcomp, adding --wasm-only flag * refactor callImport logic in asm2wasm to avoid recomputing wasm types again * legalize illegal i64 params in exports and imports * do safe i64 binary ops depending on precision * fix addVar, only assert on names if we are using a name | ||||
* | add ExtractFunction pass | Alon Zakai | 2016-09-13 | 1 | -0/+1 |
| | |||||
* | thread relooper jumps | Alon Zakai | 2016-09-12 | 1 | -0/+1 |
| | |||||
* | refactor pass hooks, creating a proper way to run code before a pass is run | Alon Zakai | 2016-09-12 | 1 | -0/+5 |
| | |||||
* | validate in debug mode in passRunner | Alon Zakai | 2016-09-11 | 1 | -5/+14 |
| | |||||
* | autodrop must be run before we optimize in asm2wasm, as otherwise its input ↵ | Alon Zakai | 2016-09-07 | 1 | -0/+3 |
| | | | | | | is not yet valid then after finalizeCalls, we must autodrop again to drop things that finalizeCalls changed | ||||
* | remove lower-if-else, as it's no longer needed | Alon Zakai | 2016-09-07 | 1 | -1/+0 |
| | |||||
* | remove drop-return-values pass | Alon Zakai | 2016-09-07 | 1 | -1/+0 |
| | |||||
* | make sure to create instances of function-parallel functions, even in debug mode | Alon Zakai | 2016-07-16 | 1 | -1/+8 |
| | |||||
* | Merge pull request #593 from WebAssembly/remove-div0 | Alon Zakai | 2016-06-21 | 1 | -5/+37 |
|\ | | | | | Explicit registering of passes | ||||
| * | Add initialization functions for passes to avoid missing pass registration ↵ | Jukka Jylänki | 2016-06-21 | 1 | -5/+37 |
| | | | | | | | | due to linker dead code elimination. Fixes #577. | ||||
* | | Build fixes/workarounds to support Visual Studio 2013 build, which has ↵ | juj | 2016-06-21 | 1 | -1/+1 |
|/ | | | | trouble with some new C++11 constructs. (#581) | ||||
* | run precompute after every optimize-instructions | Alon Zakai | 2016-06-18 | 1 | -0/+2 |
| | |||||
* | add a precompute pass | Alon Zakai | 2016-06-18 | 1 | -0/+2 |
| | |||||
* | run remove-unused-brs after simplify-locals | Alon Zakai | 2016-06-11 | 1 | -0/+2 |
| | |||||
* | move function parallelism to pass and pass runner, which allows more ↵ | Alon Zakai | 2016-06-03 | 1 | -29/+62 |
| | | | | efficient parallel execution (#564) | ||||
* | add an option to run passes on individual functions, and to get default ↵ | Alon Zakai | 2016-06-02 | 1 | -0/+25 |
| | | | | optimization passes suitable for that, or not. refactor visitFunction/Module for this. | ||||
* | add a pass that eliminates duplicate functions | Alon Zakai | 2016-05-28 | 1 | -0/+2 |
| | |||||
* | dead code elimination pass (#536) | Alon Zakai | 2016-05-22 | 1 | -0/+1 |
| | |||||
* | vacuum after passes that create garbage; this makes the total time better | Alon Zakai | 2016-05-19 | 1 | -1/+3 |
| | |||||
* | run merge-blocks after vacuum | Alon Zakai | 2016-05-16 | 1 | -1/+1 |
| | |||||
* | add cfg-building traversal and a pass to coalesce locals using it | Alon Zakai | 2016-05-15 | 1 | -0/+1 |
| | |||||
* | Use more static libraries in the CMake build (#451) | Derek Schuff | 2016-05-07 | 1 | -0/+126 |
* Factor passes and emscripten-optimizer into static libs This removes the redundancies from the source sets in the main CMakeLists.txt. * Make passes an object lib * Use static libs with --whole-archive because Travis has old cmake |