summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* fix shl shift computation in getMaxBitsAlon Zakai2017-07-292-0/+18
|
* fix shift computation in getMaxBits - in wasm only the lower 5 bits matter ↵Alon Zakai2017-07-292-2/+20
| | | | for a 32-bit shift
* do not combine a load/store offset with a constant pointer if it would wrap ↵Alon Zakai (kripken)2017-07-293-4/+52
| | | | a negative value to a positive one, as trapping is tricky
* fix import type detection of calls in comma operators; when the parent is a ↵Alon Zakai2017-07-2710-60/+145
| | | | comma, it can't be a coersion (or that would have been the parent), so there is no coercion, so the result type is none (#1115)
* Merge pull request #1114 from WebAssembly/fuzzAlon Zakai2017-07-274-0/+52
|\ | | | | Fuzz fixes
| * when finalizing a block in MergeBlocks, use its type, so that we don't need ↵Alon Zakai2017-07-242-0/+26
| | | | | | | | to consider type changes for its parent (changing it from a forced i32 to an unreachable might mean the parent needs to become unreachable too)
| * ignore untaken branches in determining block typeAlon Zakai2017-07-222-0/+26
| |
* | fix asm2wasm wasm-only i64 switches with a large (>32 bit) offset #1109 (#1111)Alon Zakai2017-07-267-21/+445
|/
* Optimizer support for atomic instructions (#1094)Derek Schuff2017-07-214-2/+259
| | | | | | * Teach EffectAnalyzer not to reorder atomics wrt other memory operations. * Teach EffectAnalyzer not to reorder host operations with memory operations * Teach various passes about the operands of AtomicRMW and AtomicCmpxchg * Factor out some functions in DeadCodeElimination and MergeBlocks
* fix f32 frem in asm2wasm #1105 (#1106)Alon Zakai2017-07-207-1/+106
|
* Merge pull request #1100 from WebAssembly/fuzz-4Alon Zakai2017-07-188-8/+142
|\ | | | | Yet more fuzz fixes
| * fix off-by-one in assertion in optimize-instructionsAlon Zakai2017-07-172-0/+29
| |
| * fix vacuum bug on nop'ing an if whose body has brs that cause type changes ↵Alon Zakai2017-07-172-0/+27
| | | | | | | | when removed
| * fix blockifyMerge logic - it needs to not skip code in the block we merge ↵Alon Zakai2017-07-174-8/+86
| | | | | | | | to. since that's a fairly specific functionality needed in removeUnusedBrs, move it to there
* | Merge pull request #1095 from WebAssembly/fuzz-3Alon Zakai2017-07-1819-60/+608
|\| | | | | More fuzz fixes
| * fix merge-blocks logic in call, call_indirect, select, we need to avoid any ↵Alon Zakai (kripken)2017-07-149-53/+286
| | | | | | | | danger of moving something past a side effect ; also fix an asm2wasm bug with call_indirect fixups; the call target may be a block, which we need to look through
| * handle an unreachable block with a reachable final element in merge-blocksAlon Zakai (kripken)2017-07-142-0/+14
| |
| * when removing an if-copy in coalesce-locals, if it's a tee, we do still need ↵Alon Zakai (kripken)2017-07-132-0/+61
| | | | | | | | the get in that arm. only when it is not a tee can we remove that arm and make the if-else into an if
| * note changes when removing an if body in vacuumAlon Zakai (kripken)2017-07-132-0/+40
| |
| * optimize shifts of 0Alon Zakai2017-07-132-15/+38
| |
| * zero shifts are not sign-extendsAlon Zakai2017-07-132-0/+66
| |
| * handle an unreachable condition properly in vacuum if simplificationAlon Zakai (kripken)2017-07-132-0/+32
| |
| * fix handling of an if in a tee without an else, in coalesce-localsAlon Zakai (kripken)2017-07-132-0/+22
| |
| * infinite loops have side effectsAlon Zakai (kripken)2017-07-134-7/+64
| |
* | Validation for AtomicRMW and cmpxchg (#1092)Derek Schuff2017-07-144-20/+20
|/ | | | Also fix cases where fail() had the arguments backwards. Wasn't an error because lol templates. Also fix printModuleComponent template to SFINAE on Expression* so we properly get the specialized version.
* Merge pull request #1087 from WebAssembly/fuzz-2Alon Zakai2017-07-1222-77/+849
|\ | | | | Fuzz fixes
| * fix handling of unreachable br values in merge-blocksAlon Zakai (kripken)2017-07-112-0/+28
| |
| * fix coalesce-locals handling of set/tee local of an unreachable; we still ↵Alon Zakai (kripken)2017-07-113-12/+55
| | | | | | | | need the value, as it may do things
| * fix block removal in remove-unused-brs, even if not taken, if named, we must ↵Alon Zakai (kripken)2017-07-112-0/+71
| | | | | | | | preserve it
| * changing a set to a tee or vice versa needs to take into account the value ↵Alon Zakai (kripken)2017-07-113-3/+21
| | | | | | | | may be unreachable
| * handle unary and binary nodes that have implicit traps in vacuumAlon Zakai (kripken)2017-07-114-0/+43
| |
| * fix Const finalization and use it properly in br finalization in PrecomputeAlon Zakai (kripken)2017-07-112-0/+67
| |
| * loads may trap, do not remove them in vacuum unless the pass options allow thatAlon Zakai (kripken)2017-07-119-62/+446
| |
| * properly handle if arm removal in vacuumAlon Zakai (kripken)2017-07-112-0/+42
| |
| * add the option to seek named breaks, not just taken breaks; refactor headers ↵Alon Zakai (kripken)2017-07-112-0/+28
| | | | | | | | to make this practical
| * finalize new drops in SimplifyLocalsAlon Zakai (kripken)2017-07-112-0/+14
| |
| * don't remove unreachable nodes in vaccuum, it can alter types, and dce does ↵Alon Zakai (kripken)2017-07-112-3/+37
| | | | | | | | that anyhow, let it do it's thing
* | add docs and error hints when a Call should be a CallImport (#1081)Alon Zakai2017-07-112-0/+35
|/ | | | | | * add docs and error hints when a Call should be a CallImport * fix binaryen API docs in docs/
* Add IR, parsing, printing, and binary for atomic cmpxchg (#1083)Derek Schuff2017-07-104-0/+132
|
* Add IR, parsing and binary support for AtomicRMW instructions from wasm ↵Derek Schuff2017-07-064-5/+145
| | | | | threads proposal (#1082) Also leave a stub (but valid) visitAtomicRMW in the visitor template so that not all visitors need to implement this function yet.
* Code folding (#1076)Alon Zakai2017-06-2811-24885/+27472
| | | | | | | | | | | | | | | | Adds a pass that folds code, i.e. merges it when possible. See details in comment in the pass implementation cpp. This is enabled by default in -Os and -Oz. Seems risky to enable anywhere else, as it does add branches - likely predictable ones so maybe no slowdown, but still some risk. Code size numbers: wasm-backend: 196331 + binaryen -Os (before): 182598 + binaryen -Os (with folding): 181943 asm2wasm -Os (before): 172463 asm2wasm -Os (with folding): 168774 So this reduces wasm-backend output by an additional 0.5% than it could before. Mainly this is because the wasm backend already has code folding, whereas on asm2wasm output, where we didn't have folding before, this saves over 2%. The 0.5% improvement on the wasm backend's output might be because this can fold more types of code than LLVM can (it can fold nested control flow, in particular).
* Add atomic loads and stores (#1077)Derek Schuff2017-06-284-0/+290
| | | | | Add IR, wast and binary support for atomic loads and stores. Currently all IR generated by means other than parsing wast and binary files always generates non-atomic accesses, and optimizations have not yet been made aware of atomics, so they are certainly not ready to be used yet.
* Runtime.stackAlloc should grow down for wasm (#1073)jgravelle-google2017-06-2884-504/+252
| | | | | | * Runtime.stackAlloc should grow down for wasm * stackAlloc should align properly; update tests
* Add shared memories (#1069)Derek Schuff2017-06-2713-0/+38
| | | | | Begin to implement wasm threading proposal in https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md This PR just has shared memory attribute with wast and binary support.
* Fix auto_update_tests for printing/minifier tests (#1071)Derek Schuff2017-06-273-1/+118
| | | | | It was using wasm-shell instead of wasm-opt to print. This was emitting an error and empty output. Also this means that the min.wast test input didn't get updated along with the spec, so I fixed that as well.
* Consistently handle possible traps in all cases (#1062)Alon Zakai2017-06-228-44/+224
| | | | | | * consistently handle possible traps in asm.js ffi results * consistently handle possible traps in i64/float conversions
* Revert "Update known failures running s2wasm results in wasm-shell (#1057)" ↵Sam Clegg2017-06-221-3/+12
| | | | | (#1063) This reverts commit 722e6a1893b7d662e536da206835821b2096c0ee.
* Update known failures running s2wasm results in wasm-shell (#1057)Sam Clegg2017-06-201-12/+3
| | | | | The two new failures are calling aboirt(). They date back to before the LKGR build: https://wasm-stat.us/builders/linux/builds/20068 So its hard to say when they started failing.
* Untee pass (#1053)Alon Zakai2017-06-142-0/+60
|
* S-expression parsing in C API and binaryen.js (#1050)Alon Zakai2017-06-133-7/+50
| | | | | | * add C API and binaryen.js support for parsing s-expressions * update js builds and tests