summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* optimize pow (#934)Alon Zakai2017-03-102-2/+125
| | | | | | * optimize pow(x,2) => x*x * optimize pow(x, 0.5) => sqrt(x)
* fix sign-ext opt issues (#935)Alon Zakai2017-03-095-12/+163
| | | | | | * fix a bug where compared sign-exts of different sizes were turned into zero-exts * fix a bug where we consider an almost sign-ext as ok to change the sign of a load inside it, ignoring that the load has the extra shifting
* use a single space for pretty printing of wasts, so massive wasts are less ↵Alon Zakai2017-03-09256-294098/+294098
| | | | unruly (#928)
* Local CSE (#930)Alon Zakai2017-03-086-0/+508
| | | Simple local common subexpression elimination. Useful mostly to reduce code size (as VMs do GVN etc.). Enabled by default in -Oz.
* Use 3 modes for potentially trapping ops in asm2wasm (#929)Alon Zakai2017-03-0730-0/+96938
| | | * use 3 modes for potentially trapping ops in asm2wasm: allow (just emit a potentially trapping op), js (do exactly what js does, even if it takes a slow ffi to do it), and clamp (avoid the trap by clamping as necessary)
* stop doing dce in -O0, which was just need temporarily while browsers figure ↵Alon Zakai2017-03-0618-2/+96
| | | | out the spec (#932)
* do not merge a drop out of an if if the sides have different types, then the ↵Alon Zakai2017-02-282-0/+24
| | | | if would be invalid (#927)
* asm2wasm import overloading fix (#924)Alon Zakai2017-02-285-0/+138
| | | | * asm2wasm should not promote an overloaded import result to f64 if it is a single type and void
* Fully handle EM_ASM in s2wasm (#910)jgravelle-google2017-02-232-6/+6
| | | | | | | | | | | | * Fully handle EM_ASM in s2wasm * Iterate with size_ts, remember to erase from importsMap as well * Fix dot_s test EM_ASM signatures * Move Name out to its own file, support/name.h * Move removeImportsWithSubstring out of Module class
* fix asm2wasm import type setting - set the type of used calls based o… (#920)Alon Zakai2017-02-215-0/+95
| | | | * fix asm2wasm import type setting - set the type of used calls based on the context, early, so it's valid in the optimizer
* read unknown users sections as binary data stored on the Module (#918)Alon Zakai2017-02-212-0/+50
|
* allow traversing the inits of globals (#917)Alon Zakai2017-02-212-2/+4
|
* allow traversing the offset inits of table/memory segments (#916)Alon Zakai2017-02-171-2/+2
|
* finish PickLoadSigns passAlon Zakai2017-02-162-0/+523
|
* optimize a compare of a load_s and a sign-extend into a load_u and a cheaper ↵Alon Zakai (kripken)2017-02-164-50/+192
| | | | zero-extend
* take into account loads into local info in OptimizeInstructionsAlon Zakai (kripken)2017-02-164-90/+174
|
* use local info about maxBits and sign-extendedness in OptimizeInstructionsAlon Zakai (kripken)2017-02-164-10/+548
| | | | fix the maxBits of a signed load, which this uncovered - all the bits may be used in such a case
* remove unneeded masks using getMaxBitsAlon Zakai (kripken)2017-02-164-26/+134
|
* fix fuzz testcase, xor maxBits is the max, not the minAlon Zakai (kripken)2017-02-162-6/+36
|
* handle fallthrough values in load_s/u and sign/zero-extend optimizationAlon Zakai (kripken)2017-02-164-48/+108
|
* handle load in getMaxBitsAlon Zakai (kripken)2017-02-162-0/+58
|
* handle tee_local in getMaxBitsAlon Zakai (kripken)2017-02-162-0/+42
|
* optimize out a sign-ext into a store of the same sizeAlon Zakai (kripken)2017-02-162-0/+141
|
* optimize out add/sub of 0Alon Zakai (kripken)2017-02-1611-106/+80
|
* optimize sign-extends to a booleanAlon Zakai (kripken)2017-02-162-0/+27
|
* optimize sign-extends to eqzAlon Zakai (kripken)2017-02-166-36/+35
|
* optimize sign-extends to neAlon Zakai (kripken)2017-02-162-0/+77
|
* Optimize "squared" operations (#905)Alon Zakai2017-02-1610-658/+591
| | | | * optimize 'almost' sign extends: when we can remove one entirely, then extra shifts can be left behind. with that in place, we can then optimize 'squared' operations like shl on shl, as doing so does not break our sign extend opts
* optimize linear sums (#904)Alon Zakai2017-02-166-92/+348
|
* Optimize sign-extends (#902)Alon Zakai2017-02-166-143/+1117
| | | | | | * optimize sign-extend output * optimize sign-extend input
* add sqrt test (#912)Alon Zakai2017-02-165-1/+103
|
* update wasm version to 0x01 (#913)Alon Zakai2017-02-162-0/+0
| | | | | | * update wasm version to 0x01, in prep for release, and since browsers are ready to accept it * update wasm.js
* Fix emitting of unreachable block/if/loop (#911)Alon Zakai2017-02-1625-2/+2062
| | | | | | | | | | | | | | | | | | | | | | * an unreachable block is one with an unreachable child, plus no breaks * document new difference between binaryen IR and wasm * fix relooper missing finalize * add a bunch of tests * don't assume that test/*.wast files print to themselves exactly; print to from.wast. this allows wast tests with comments in them * emit unreachable blocks as (block .. unreachable) unreachable * if without else and unreachable ifTrue is still not unreachable, it should be none * update wasm.js * cleanups * empty blocks have none type
* Optimize precise mode integer ops (#907)Alon Zakai2017-02-1612-32/+240
| | | | | | * improve precise integer operations: call into a wasm function to do the possibly-trapping div/rem, which handles the corner cases, instead of an ffi. also fix a bug in the existing parallel 64-bit code for this * remove no longer needed wasm.js-post.js file (it moved into emscripten repo)
* asm2wasm debuginfo (#895)Alon Zakai2017-02-077-0/+288
| | | | | | | | | | | | * parse file/line comments in asm.js into debug intrinsics * convert debug intrinsics into annotations, and print them * ignore --debuginfo if not emitting text, as wasm binaries don't support that yet * emit full debug info when -g and emitting text; when -g and emitting binary, all we can do is the Names section * update wasm.js
* Improve handling of implicit traps (#898)Alon Zakai2017-02-0611-102/+357
| | | | | | | | * 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
* code-pushing fix: we cannot push a set_local with side effects, as it may ↵Alon Zakai2017-01-262-8/+88
| | | | not execute any more (#890)
* Export memalign along with malloc and friends (#888)Derek Schuff2017-01-242-1/+26
| | | Emscripten's mmap2 syscall started using memalign instead of malloc with kripken/emscripten#4874, so we need to export that as well.
* fix bustage caused by conflict between last two landings (#886)Alon Zakai2017-01-192-2/+0
|
* DCE even in -O0 (#884)Alon Zakai2017-01-198-68/+2
|
* handle an unreachable param to an export in asm2wasm, which is ignorable (#885)Alon Zakai2017-01-195-0/+318
|
* asm2wasm: when a switch is too big, create an if-else chain instead (#877)Alon Zakai2017-01-123-0/+300
|
* add a dce at the end of asm2wasm, so it handles code changes from ↵Alon Zakai (kripken)2017-01-124-6/+0
| | | | intermediate optimization passes
* add a test showing unreachable code after a returnAlon Zakai (kripken)2017-01-125-0/+165
|
* Merge pull request #865 from WebAssembly/fix-abAlon Zakai2017-01-102-0/+16
|\ | | | | Fix AngryBots parsing
| * handle a binary that breaks to returnAlon Zakai (kripken)2017-01-042-0/+16
| |
* | Merge pull request #863 from WebAssembly/linking-fixAlon Zakai2017-01-0531-31/+708
|\ \ | | | | | | Linking cleanups
| * | memoryBase and tableBase should not be mutable, as we need to use them in ↵Alon Zakai2016-12-305-0/+677
| | | | | | | | | | | | segment/element offsets
| * | emit globals before table and memory, because they may use a global for ↵Alon Zakai2016-12-3026-31/+31
| | | | | | | | | | | | their element/segment offsets
* | | Merge pull request #871 from WebAssembly/fix-c-api-unused-memAlon Zakai2017-01-052-0/+194
|\ \ \ | |_|/ |/| | Mark memory as existing when it is created in the C API