• ahaas's avatar
    [wasm] Implement parallel compilation. · 17215438
    ahaas authored
    With this CL it is possible to compile a wasm module with multiple
    threads in parallel. Parallel compilation works as follows:
    
    1)   The main thread allocates a compilation unit for each wasm function.
    2)   The main thread spawns WasmCompilationTasks which run on the
         background threads.
    3.a) The background threads and the main thread pick one compilation unit
         at a time and execute the parallel phase of the compilation unit.
         After finishing the execution of the parallel phase, the compilation
         unit is stored in a result queue.
    3.b) If the result queue contains a compilation unit, the main thread
         dequeues it and finishes its compilation.
    4)   After the execution of the parallel phase of all compilation units has
         started, the main thread waits for all WasmCompilationTasks to finish.
    5)   The main thread finalizes the compilation of the module.
    
    I'm going to add some additional tests before committing this CL.
    
    R=titzer@chromium.org, bmeurer@chromium.org, mlippautz@chromium.org, mstarzinger@chromium.org
    
    Review-Url: https://codereview.chromium.org/1961973002
    Cr-Commit-Position: refs/heads/master@{#36178}
    17215438
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...