| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Automated renaming according to
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
|
| |
|
|
|
|
|
|
|
| |
* Allow fuzzing from other directories, by looking for wasm-opt relative to the script itself.
* Ignore some VM debug assertions which are fuzz bugs that have already been filed.
* Pick the random seed based on the process ID too, for better parallel fuzzing.
* Remove commandline parsing stuff in fuzz_opt.py, which won't work with the other commandline parsing in test.shared - but we don't need it anyhow.
|
| |
|
| |
|
|
|
| |
We iterated over a set. Instead, iterate over the relevant items in their order in the IR.
|
|
|
| |
Add features.h which centralizes all the feature detection code. (I'll need this in another place than the validator which is where it was til now.)
|
| |
|
|
|
|
|
|
|
|
|
| |
After we added logging to the fuzzer, we forgot to add to the JS glue code the necessary imports so it can be run there too.
Also adds legalization for the JS glue code imports and exports.
Also adds a missing validator check on imports having a function type (the fuzzing code was missing one).
Fixes #1842
|
|
|
| |
With this we can optimize redundant global accesses fairly well (at least locally; licm also works), see #1831
|
|
|
|
|
|
|
| |
Without this change, sequences like `i32.const 0, i32x4.splat` will
get precomputed to v128.const ops, which are much larger and also not
implemented in V8 yet. Until we have SIMD-aware optimization passes or
at least engine support for v128.const, do not perform such
transformations.
|
| |
|
|
|
|
| |
actually flow a value. fixes #1833 (#1835)
|
| |
|
|
|
| |
Until the `Abstract` interface gains a notion of SIMD lanes, these optimizations will crash on v128 types.
|
| |
|
| |
|
| |
|
|
|
|
| |
* Fuzzing v128 and associated bug fixes
|
|
|
|
|
|
|
| |
(#1828)
This fixes a crash where startSave/stackRestore could be created
while iterating through `module.functions`.
|
|
|
|
|
| |
Even when we don't want to fully legalize code for JS, we should still legalize things that only JS cares about. In particular, dynCall_* methods are used from JS to call into the wasm table, and if they exist they are only for JS, so we should only legalize them.
The use case motivating this is that in dynamic linking you may want to disable legalization, so that wasm=>wasm module calls are fast even with i64s, but you do still need dynCalls to be legalized even in that case, otherwise an invoke with an i64 parameter would fail.
|
|
|
|
| |
This allows emscripten to generate table of the correct size.
Right now is simply defaults to creating a table to size 1024.
|
|
|
|
|
|
| |
input (#1825)
|
|
|
|
|
|
|
|
|
| |
Implement and test the following functionality for SIMD.
- Parsing and printing
- Assembling and disassembling
- Interpretation
- C API
- JS API
|
|
|
| |
When emscripten knows that the runtime will not be exited, it can tell codegen to not emit atexit() calls (since those callbacks will never be run). This saves both code size and startup time. In asm2wasm the JSBackend does it directly. For the wasm backend, this pass does the same on the output wasm.
|
|
|
| |
I think I added this error for fuzzing, but it is harmful as it prevents a module with too many locals from being loaded - if we could load it, we might be able to optimize it to have fewer locals...
|
| |
|
|
|
|
|
|
| |
* Update literal op names
* Remove `demoteToF32` in favor of `demote`
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
We have a bug open (#1813) to verify that we don't loose coverage
but there is no point in keeping these unused files for now.
|
|
|
|
|
| |
Followup from #1808
|
| |
|
|
|
| |
Move the code around so the assertions are not caught in the big try-catch that reports errors as parsing errors.
|
|
|
|
|
| |
In this case simple update all the uses of the missing function.
This fixed the current emscripten failures.
|
|
|
| |
And use it in wasm-emscripten
|
| |
|
| |
|
|
|
| |
I broke this to be alwasy empty in #1795.
|
|
|
| |
Remove the existing hack, and optimize them just like we do for ifs and blocks. This is now able to handle a few more cases than before.
|
|
|
|
| |
into br_if,* - we can handle a concretely typed if as well, which can happen at the end of a block (#1799)
|
| |
|
| |
|
|
|
|
|
|
| |
We now emit more sets and tees of if-elses from simplify-locals, and
coalesce-locals is necessary to remove them if they are ineffectual,
that is, if no get will read them.
|
|
|
|
|
|
|
|
| |
We turned an if into a select when optimizing for size (and if
side effects etc. allow so). This patch improves that, doing it
not just when optimizing for size, but also when it looks
beneficial given the amount of work on both sides of the if. As
a result we can create selects in -O3 etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an if-else.
If an if sets a local,
(if
(..condition..)
(set_local $x (..value..))
)
we can turn it into
(set_local $x
(if
(..condition..)
(..value..)
(get_local $x)
)
)
This increases code size and adds a branch in the if, but allows
the set to be optimized into a tee or optimized out entirely. In
the worst case, other optimizations can break up an if with a copy
in one of its arms later.
Includes a determinism fix for EquivalentSets, which this patch
triggered.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If copies is the case where an if arm is a get that feeds into
a set of the same local:
(set_local $x
(if (result i32)
(..condition..)
(..result)
(get_local $x)
)
)
We can rework this so that the if-else is only an if, which
executes the code path not going to the get.
This was done in coalesce-locals only because it is likely to
work there as after coalescing there are more copies. However,
the logic is of removing a branch, and so belongs in
remove-unused-brs, and fits alongside existing logic there
for handling ifs with an arm that is a br. Also refactor that
code so that the two optimizations can feed into each other.
|
|
|
|
| |
Add feature flags and struct interface. Default feature set has all feature enabled.
|