| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
consistently handled regardless of whether we optimize in parallel or not (#1208)
|
|
|
|
|
|
|
|
| |
* improve inlining pass to inline single-use functions that are fairly small, which makes it useful for removing unnecessary global constructors from clang. add an inlining-optimizing pass that also optimizes where it inlined, as new opportunities arise. enable that it by default in O2+
* fix a bug where we didn't run all passes properly - refactor addDefaultGlobalOptimizationPasses() into a pre and post version. we can only run the post version in incremental optimizing builds (functions appear one by one, we optimize them first, and do global stuff when all are done), but can run both when doing a full optimize
* copy in inlining, allowing multiple inlinings of the same function in the future
|
|
|
|
|
|
|
| |
* validate that types are properly finalized, when in pass-debug mode (BINARYEN_PASS_DEBUG env var): check after each pass is run that the type of each node is equal to the proper type (when finalizing it, i.e., fully recomputing the type).
* fix many fuzz bugs found by that.
* in particular, fix dce bugs with type changes not being fully updated during code removal. add a new TypeUpdater helper class that lets a pass update types efficiently, by the helper tracking deps between blocks and branches etc., and updating/propagating type changes only as necessary.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add debugInfo option to passes, and use it to keep debug info alive through optimizations when we need it
* add fib testcase for debug info
* when preserving debug info, do not move code around call-imports, so debug info intrinsics remain stationary
* improve wasm-module-building handling of the single-threaded case: don't create workers, which is more efficient and also nicer for debugging
* process debug info in a more precise way, reordering it from being after the node (as it was a comment in JS) to before the node
* remove unreachable hack for debug info, which is no longer needed since we reorder them, and make sure to finalize blocks in which we reorder
|
|
|
|
| |
them to all the PassRunners it creates, letting them have the proper options at all times
|
| |
|
| |
|
|
|
|
| |
global ctors
|
|
|
|
|
|
| |
is not yet valid
then after finalizeCalls, we must autodrop again to drop things that finalizeCalls changed
|
|
|
|
|
|
|
|
|
| |
This commit fixes an asm2wasm dead lock when asm2wasm is compiling an
empty module, i.e. a module without any functions.
Without this commit, worker threads are likely to leave `workerMain()`
and decrease `liveWorkers` early. Consequently, `waitUntilAllReady()`
will never observe `liveWorkers == numWorkers`.
|
|
|
|
|
| |
std::thread can forward the arguments to main function properly. We
don't have to cast them from/to void*.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit modernize the code base by replacing:
std::unique_ptr<T>(new T(...))
with:
make_unique<T>(...)
or:
wasm::make_unique<T>(...)
This is a step closer to adopt C++14 std::make_unique<T>(...).
|
|
building + optimizing
|