Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Fixes typo in hex number parsing in asm2wasm. (#362) | Yury Delendik | 2016-04-18 | 1 | -1/+1 | |
|/ | | | Fixes #352 | |||||
* | Function parallelism (#343) | Alon Zakai | 2016-04-15 | 14 | -27/+384 | |
| | | | | * 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 | |||||
* | rename function locals, to params and vars, which together are all the ↵ | Alon Zakai | 2016-04-14 | 11 | -38/+38 | |
| | | | | locals. preparation for #336 (#349) | |||||
* | Add a debug mode to PassRunner, which logs out times (#344) | Alon Zakai | 2016-04-14 | 3 | -1/+22 | |
| | | | | | | * add a debug mode to PassRunner, which logs out times * address comments | |||||
* | remove excessive wasm-s-parser debug logging (#345) | Alon Zakai | 2016-04-14 | 4 | -9/+6 | |
| | ||||||
* | Generate emscripten dynCall thunks in s2wasm (#342) | Derek Schuff | 2016-04-13 | 2 | -15/+34 | |
| | | | | | | | | | | | * Generate emscripten dynCall thunks in s2wasm Part of the usual emscripten glue for asm.js is thunks for calling functions on the module given a function pointer; aka a dynCall. This is implemented via thunks generated on the Module called 'dynCall_<signature>'. This gives support to s2wasm to generate these thunks in the wasm module along with other emscripten glue. It also introduces a flag to s2wasm to make generation of emscripten glue optional. | |||||
* | Merge pull request #341 from WebAssembly/opts | Alon Zakai | 2016-04-12 | 7 | -40/+69 | |
|\ | | | | | More optimization goodies | |||||
| * | drop completely unused locals in ReorderLocals | Alon Zakai | 2016-04-11 | 2 | -1/+10 | |
| | | ||||||
| * | continue simplifying locals while opportunities present themselves | Alon Zakai | 2016-04-11 | 1 | -23/+37 | |
| | | ||||||
| * | allow overriding startWalk(Function*) | Alon Zakai | 2016-04-11 | 1 | -1/+1 | |
| | | ||||||
| * | refactor default optimization passes to a central location | Alon Zakai | 2016-04-11 | 4 | -15/+21 | |
| | | ||||||
* | | Add a method to generate a dyncall thunk (#337) | Derek Schuff | 2016-04-12 | 3 | -21/+62 | |
|/ | | | | | Currently it's not called anywhere. The bulk of this change is refactoring to add makeFunction, makeCallIndirect, and makeReturn to wasm::Builder, and make S2wasmBuilder call it | |||||
* | dyn_cast => dynCast | Alon Zakai | 2016-04-11 | 11 | -24/+24 | |
| | ||||||
* | remove unneeded virtual destructor | Alon Zakai | 2016-04-11 | 1 | -1/+0 | |
| | ||||||
* | remove set_locals with no remaining gets in SimplifyLocals | Alon Zakai | 2016-04-11 | 1 | -4/+51 | |
| | ||||||
* | track individual locals in EffectAnalyzer | Alon Zakai | 2016-04-11 | 1 | -11/+27 | |
| | ||||||
* | De-recurse traversals (#333) | Alon Zakai | 2016-04-11 | 20 | -384/+378 | |
| | | | | | | | | | | | | * 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 option to print full ast, no elisions | Alon Zakai | 2016-04-09 | 1 | -6/+28 | |
| | ||||||
* | clean up in Print | Alon Zakai | 2016-04-09 | 1 | -12/+14 | |
| | ||||||
* | add counter for expression ids | Alon Zakai | 2016-04-09 | 1 | -1/+2 | |
| | ||||||
* | fold eqz+comparisons | Alon Zakai | 2016-04-09 | 1 | -0/+22 | |
| | ||||||
* | optimize asm2wasm loop branches using eqz | Alon Zakai | 2016-04-09 | 1 | -7/+7 | |
| | ||||||
* | fix asm2wasm udivmoddi4 optimization when there is no getTempRet0 | Alon Zakai | 2016-04-09 | 1 | -3/+3 | |
| | ||||||
* | AST Builder class, and use it to optimzie umoddi4 in asm2wasm | Alon Zakai | 2016-04-08 | 5 | -6/+231 | |
| | ||||||
* | fix bug in If.finalize | Alon Zakai | 2016-04-08 | 1 | -1/+1 | |
| | ||||||
* | optimize llvm.cttz.i32 into i32.ctz | Alon Zakai | 2016-04-08 | 3 | -3/+12 | |
| | ||||||
* | Merge pull request #319 from WebAssembly/traversal | Alon Zakai | 2016-04-07 | 9 | -308/+672 | |
|\ | | | | | Refactor traversal into its own header | |||||
| * | add missing checks on nested blocks in SimplifyExpressions | Alon Zakai | 2016-04-07 | 1 | -2/+7 | |
| | | ||||||
| * | refactor checks in SimplifyLocals | Alon Zakai | 2016-04-07 | 1 | -8/+15 | |
| | | ||||||
| * | handle loops in effect analyzer | Alon Zakai | 2016-04-07 | 2 | -8/+36 | |
| | | ||||||
| * | blocks must mark as branching in effects analyzer, as control flow can join ↵ | Alon Zakai | 2016-04-07 | 1 | -0/+1 | |
| | | | | | | | | there if the end of the block was branched to | |||||
| * | fix invalidation logic in SimplifyLocals, visit each node as we hit it, do ↵ | Alon Zakai | 2016-04-07 | 1 | -1/+3 | |
| | | | | | | | | not walk it to look for invalidating elements that are children, we already saw them | |||||
| * | derecurse blocks helper, and use it in SimplifyLocals | Alon Zakai | 2016-04-07 | 2 | -8/+32 | |
| | | ||||||
| * | fix effect invalidation logic | Alon Zakai | 2016-04-07 | 1 | -1/+3 | |
| | | ||||||
| * | add vacuum pass | Alon Zakai | 2016-04-07 | 3 | -1/+51 | |
| | | ||||||
| * | rewrite SimplifyLocals to use FastExecutionWalker | Alon Zakai | 2016-04-07 | 1 | -12/+71 | |
| | | ||||||
| * | traversal improvements | Alon Zakai | 2016-04-06 | 1 | -34/+55 | |
| | | ||||||
| * | move some methods to WasmWalkerBase | Alon Zakai | 2016-04-06 | 1 | -27/+25 | |
| | | ||||||
| * | EffectsAnalyzer | Alon Zakai | 2016-04-06 | 1 | -0/+42 | |
| | | ||||||
| * | refactor a WasmReplacerWalker class | Alon Zakai | 2016-04-06 | 1 | -54/+51 | |
| | | ||||||
| * | add FastExecutionWalker | Alon Zakai | 2016-04-06 | 1 | -1/+101 | |
| | | ||||||
| * | remove obsolete comment | Alon Zakai | 2016-04-06 | 1 | -1/+0 | |
| | | ||||||
| * | refactor wasm traversal code into separate file | Alon Zakai | 2016-04-06 | 5 | -295/+324 | |
| | | ||||||
* | | Ensure that all static initializer functions are exported | Derek Schuff | 2016-04-06 | 1 | -10/+14 | |
|/ | ||||||
* | optimize if-eqz | Alon Zakai | 2016-04-06 | 3 | -0/+45 | |
| | ||||||
* | Fix output of initializer list metadata | Derek Schuff | 2016-04-06 | 1 | -1/+6 | |
| | | | | | | * Fix output of initializer list metadata Turns out trailing commas aren't valid JSON | |||||
* | Fix s2wasm handling of aliased functions | Derek Schuff | 2016-04-06 | 1 | -2/+5 | |
| | | | | | | This fixes 2 bugs in s2wasm: * Handle address-taken aliases (i.e. when they appear in relocations), by looking up and subsituting the address of the aliasee. * Skip whitespace at the top of the scan() loop instead of requiring it to match. When there are multiple alias declarations in a row, the match("FUNCTION") at the end of an alias delcaration consumes the whitespace at the beginning of the next line, causing it to fail to match the tab character specified in the match pattern at the top of the loop. | |||||
* | Allocate __dso_handle in s2wasm | Derek Schuff | 2016-04-06 | 1 | -0/+5 | |
| | | | | | | Unlike asm.js modules, wasm modules cannot have imported/extern objects. So allocate __dso_handle (which is traditionally defined in a crtbegin or similar toolchain file linked with the user code) in s2wasm. | |||||
* | Properly align the stack pointer | Derek Schuff | 2016-04-06 | 3 | -34/+40 | |
| | | | | | | | | | | | | * Properly align the stack pointer By default (if no global base is given) the global base is 1, which seems wrong. In this case the stack pointer gets an address of 1, which is unaligned and definitely wrong. So, start the global base at 0 instead of 1 by default and align the stack pointer. Also factor allocation of statics into a function. * unconditionally allocate stack pointer; explicitly reserve address 0 | |||||
* | Handle static initializers | Derek Schuff | 2016-04-06 | 1 | -2/+32 | |
| | | | | | | | LLVM emits static initializers in the ELF style, by placing pointers to the constructor functions in a .init_array section. Handle this in s2wasm for now by converting these to standard emscripten metadata. |