summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Update test/spec/memory.wast to latest upstream (#1801)Alon Zakai2019-04-0336-162/+105
| | | | | | | Minus multi-memory which we don't support yet. Improve validator. Fix some minor validation issues in our tests.
* Add a mechanism to pass arguments to passes (#1941)Alon Zakai2019-04-035-13/+50
| | | | | | | | | This allows wasm-opt --pass-arg=KEY:VALUE where KEY and VALUE are strings. It is then added to passOptions.arguments, where passes can read it. This is used in ExtractFunction instead of an env var.
* Fuzz more carefully when using nans (#1956)Alon Zakai2019-04-031-4/+10
|\ | | | | They are nondeterministic between VMs, so disable VM comparisons in that case.
| * clenaupAlon Zakai2019-03-201-6/+0
| |
| * Merge remote-tracking branch 'origin/master' into nansAlon Zakai2019-03-2070-7567/+8957
| |\
| * | don't compare vms if fuzzing nans, since they are nondeterministicAlon Zakai2019-03-111-4/+16
| | |
* | | Update CHANGELOG.md (#1978)Sam Clegg2019-04-021-5/+17
| | |
* | | Directize: turns indirect calls into direct ones (#1974)Alon Zakai2019-04-028-19/+486
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wip [ci skip] * works * test output * test update * js build * better location for running directize
| * | | better location for running directizeAlon Zakai2019-04-021-1/+1
| | | |
| * | | js buildAlon Zakai (kripken)2019-03-311-0/+1
| | | |
| * | | test updateAlon Zakai (kripken)2019-03-311-17/+8
| | | |
| * | | test outputAlon Zakai (kripken)2019-03-311-0/+159
| | | |
| * | | worksAlon Zakai (kripken)2019-03-313-16/+200
| | | |
| * | | wip [ci skip]Alon Zakai (kripken)2019-03-314-2/+134
| | | |
* | | | wasm-emscripten-finalize: Improve shared library support (#1961)Sam Clegg2019-04-0219-103/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert PIC code generated by llvm to work with the current emscripten ABI for dynamic linking: - Convert mutable global imports from GOT.mem and GOT.func into internal globals. - Initialize these globals on started up in g$foo and f$foo imported functions to calculate addresses at runtime. Also: - Add a test case for linking and finalizing a shared library - Allow __stack_pointer global to be non-existent as can be case for a shared library. - Allow __stack_pointer global to be an import, as can be the case for a shared library.
* | | | Add Windows binary releases through AppVeyor (#1700)Alex Crichton2019-04-022-1/+30
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | This commit tweaks the AppVeyor configuration to publish 64 and 32-bit artifacts as part of the normal release builds. Configuration was also added to be sure to compile code with `/MT` on MSVC to ensure that the released artifacts depend on as few DLLs as possible, hopefully making them as portable as possible. cc #1695
* | | Rename atomic wait/notify instructions (#1972)Heejin Ahn2019-03-3038-151/+146
| | | | | | | | | | | | | | | | | | | | | | | | This renames the following: - `i32.wait` -> `i32.atomic.wait` - `i64.wait` -> `i64.atomic.wait` - `wake` -> `atomic.notify` to match the spec.
* | | Warn about running gen-s-parser.py with Python 2 (#1971)Thomas Lively2019-03-291-0/+6
| | |
* | | avoid risky iterator addition (#1970)Alon Zakai2019-03-291-1/+1
| | | | | | | | | Not an actual problem, but hits an assertion in D_GLIBCXX_DEBUG, and is likely UB.
* | | Delete wasm-merge (#1969)Thomas Lively2019-03-2996-2801/+5
| | | | | | | | | It is not very useful.
* | | Change ArenaVector<T>::Iterator to satisfy standard ↵Ryoga2019-03-261-5/+76
| | | | | | | | | | | | (Legacy)RandomAccessIterator concept (#1962)
* | | remove getString, which is not used, and was insecure to boot (#1966)Alon Zakai2019-03-262-10/+2
| | |
* | | More validation tests and fixes for SIMD (#1964)Thomas Lively2019-03-254-18/+96
| | | | | | | | | | | | | | | Moves the feature validation unit test file to a new directory, 'unit', and adds new tests for SIMD and sign-ext. Adds validation for v128 globals and v128.const.
* | | Semi-SSA improvements (#1965)Alon Zakai2019-03-2536-30295/+28877
| | | | | | | | | | | | | | | | | | | | | This adds an ssa-nomerge pass, which like ssa creates new local indexes for each set, but it does not alter indexes that have merges (in practice adding indexes to merges can lead to more copies in the end.) This also stops adding a new local index for a set that is already in "ssa form", that is, has only one set (aside from the zero initialization which wasm mandates, but for an "ssa form" index, that must not be used). This then enables ssa-nomerge in -O3 and -Os. This doesn't help much on well-optimized code like from the wasm backend (but it does sometimes - 0.5% code size improvement on Box2D), but on AssemblyScript for example it can remove a copy in the n-body benchmark as can be seen in the test updates here.
* | | optimize-instructions after the last precompute-propagate (#1963)Alon Zakai2019-03-223-1/+34
| | | | | | | | | | | | | | | | | | | | | A propagated constant can be helpful in the various patterns in optimize instructions. Testcase shows an example of this in action - we can optimize out a load offset for a constant, but if we propagated it afterwards, we would miss that. In general these two passes can help each other, so maybe they should be combined and run multiple iterations, but that's what --converge is for. Meanwhile this change improves us on what seems to be the more common case - guessed at by it being what I noticed in practice, and when I run the fuzzer, I see only this type of case.
* | | Fix OSX build error on master (#1958)Alex Crichton2019-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accidentally introduced in #1698, it looks like the `MACOSX_DEPLOYMENT_TARGET` can't be set so low to 10.7 because it causes build errors. After some [investigation] it looks like the minimum currently required is 10.9, so this commit changes the OSX deployment target to 10.9 in an effort to be compatible with as many OSX installations as possible. [investigation]: https://travis-ci.org/WebAssembly/binaryen/builds/509462566
* | | Improve test scripts (#1959)* Improve test scripts * feedback [skip ci]Sam Clegg2019-03-215-84/+85
| | | | | | | | | | | | | | | - Move auto_update_tests.py code into respective scripts - Use shared argument parsing in generate_lld_tests.py - Use wasm-ld rather than passing -flavor
* | | Update lld test expectations (#1960)Sam Clegg2019-03-2112-250/+722
| |/ |/|
* | Discover and run unit tests from check.py (#1948)Thomas Lively2019-03-194-6/+97
| | | | | | | | | | | | unittest is Python's standard testing framework, so this change allows arbitrary tests to be written without introducing any new dependencies or code in check.py. A new test that was not possible to write before is also included. It is the first of many.
* | improve zlib test (#1953)Alon Zakai2019-03-192-5132/+3559
| | | | | | | | | | Recreate it using --extract-function which turns unwanted functions into exports. This avoids weirdness with them having empty function bodies and the inliner taking advantage of that. Also uses updated LLVM, which no longer has incorrectly identified irreducible control flow here.
* | Add export count to --metrics (#1954)Sam Clegg2019-03-197-1/+54
| | | | | | | | Also, always output high level metrics even when zero.
* | Update v128.const text formats (#1934)Thomas Lively2019-03-1918-1811/+1884
| | | | | | | | | | Parse the formats allowed by the spec proposal and emit the i32x4 canonical format.
* | Validate that types match features (#1949)Thomas Lively2019-03-185-43/+87
| | | | | | | | | | | | Refactors features into a new wasm-features.h file and updates the validator to check that all types are allowed. Currently this is only relevant for the v128 SIMD type, but new types will be added in the future. The test for this change is in #1948.
* | Allow tools to read from stdin (#1950)Thomas Lively2019-03-184-9/+57
| | | | | | | | This is necessary to write tests that don't require temporary files, such as in #1948, and is generally useful.
* | add AssemblyScript n-body benchmark test (#1951)Alon Zakai2019-03-182-0/+3024
| |
* | Add const specifiers (#1952)Ryoga2019-03-182-4/+15
| | | | | | | | | | | | With this we can write stuff like: const wasm::Expression* p; const wasm::Binary* q = p->cast<wasm::Binary>();
* | feat(release): add OSX binary to CI GitHub releases (#1698)ashley williams2019-03-181-18/+29
| | | | | | fixes #1695
* | Remove unnecessary semicolons (#1942)Ryoga2019-03-185-5/+5
| | | | | | Removed semicolons that cause errors when compiling with -pedantic-errors.
* | Add sign-ext feature (#1947)Thomas Lively2019-03-153-2/+22
| |
* | Add strip-target-features pass (#1946)Thomas Lively2019-03-148-0/+13
| | | | | | And run it in wasm-emscripten-finalize. This will prevent the emscripten output from changing when the target features section lands in LLVM.
* | Do not erase internal debug into in --strip-producers - the pass was ↵Alon Zakai2019-03-141-5/+9
| | | | | | | | unconditionally erasing it in all --strip passes (#1939)
* | Add some checking in EmscriptenGlueGenerator::generateStackInitialization ↵Sam Clegg2019-03-131-4/+12
| | | | | | | | | | | | | | | | | | (#1944) We expect the stack pointer to be of a certain type. This fixes a segfault we are seeing when passed a binary which doesn't quite meet our expectations.
* | trivial: typo in link to win32 compilation (#1943)Harris Brakmić2019-03-131-1/+1
| |
* | Add BinaryenConstGetValueV128 to C/JS-API (#1931)Daniel Wirtz2019-03-136-33/+87
| | | | | | | | | | | | | | This PR adds void BinaryenConstGetValueV128(BinaryenExpressionRef expr, uint8_t* out); to the C-API and uses it in Binaryen.getExpressionInfo in the JS-API.
* | wasm-emscripten-finalize: Remove JSCall thunk generation (#1938)Sam Clegg2019-03-127-498/+7
|/ | | | We now implement addFunction by creating a wasm module to wrap that JS function and simply adding it to the table.
* Optimize away sets of the same local (#1940)Alon Zakai2019-03-0745-941/+226
|
* Fix getExitingBranches, which had |targets| instead of |curr->targets| (#1936)Alon Zakai2019-03-073-1/+44
| | | | | | | That caused it to miss switch targets, and a code-folding bug. Fixes #1838 Sadly the fuzzer didn't find this because code folding looks for very particular code patterns that are unlikely to be emitted randomly.
* Use stdout for --help message (#1937)Sam Clegg2019-03-061-9/+9
| | | | Noramlly --help is considered normal output not error output. For example its normally to pipe the output of --help to a pager.
* add testAlon Zakai2019-03-062-0/+8043
|
* CoalesceLocals: run even if we have just 1 var, as we may be able to remove ↵Alon Zakai2019-03-0620-82/+127
| | | | that one var by reusing a param