-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to include some gecko-dev fixes for StarlingMonkey. #19
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'll update the commit hash once the two PRs above merge; wanted to stage this in parallel in the meantime. |
cfallin
added a commit
to cfallin/StarlingMonkey
that referenced
this pull request
Jul 31, 2024
JakeChampion
approved these changes
Jul 31, 2024
guybedford
approved these changes
Jul 31, 2024
Two issues discovered while debugging the testsuite in StarlingMonkey: - bytecodealliance/gecko-dev#54: fixes handling of conditionals by weval when LLVM applies if-conversion in a new place; use of weval intrinsic for value-specialization / subcontext splitting should make this more robust. - bytecodealliance/gecko-dev#55: fixes missing interpreter-PC values in stack frames up the stack during unwind because of too-aggressive optimization trick in weval'd bodies. With these two changes, this version of SpiderMonkey allows the StarlingMonkey integration test suite to pass in bytecodealliance/StarlingMonkey#91.
cfallin
added a commit
to cfallin/StarlingMonkey
that referenced
this pull request
Jul 31, 2024
guybedford
added a commit
to bytecodealliance/StarlingMonkey
that referenced
this pull request
Jul 31, 2024
* Support weval-based ahead-of-time compilation of JavaScript. When the `WEVAL` option is turned on (`cmake -DWEVAL=ON`), this PR adds: - Integration to the CMake machinery to fetch a PBL+weval-ified version of SpiderMonkey artifacts; - Likewise, to fetch weval binaries; - A rule to pre-build a compilation cache of IC bodies specific to the StarlingMonkey build, so weval can use this cache and spend time only on user-provided code on first run; - Integration in `componentize.sh`. When built with: ``` $ mkdir build/; cd build/ $ cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_WASM_OPT=OFF -DWEVAL=ON $ make ``` We can then do: ``` $ build/componentize.sh file.js --aot -o file.wasm $ wasmtime serve -S cli=y file.wasm ``` Using the Richards Octane benchmark adapted slightly with a `main()` for the HTTP server world [1], I get the following results: ``` % build/componentize.sh richards.js --aot -o weval.wasm Componentizing richards.js into weval.wasm [ verbose weval progress output ] % wasmtime serve -S cli=y weval.wasm Serving HTTP on http://0.0.0.0:8080/ stdout [0] :: Log: Richards: 676 stdout [0] :: Log: ---- stdout [0] :: Log: Score (version 9): 676 % wasmtime serve -S cli=y base.wasm Serving HTTP on http://0.0.0.0:8080/ stdout [0] :: Log: Richards: 189 stdout [0] :: Log: ---- stdout [0] :: Log: Score (version 9): 189 ``` [1]: https://gist.github.com/cfallin/4b18da12413e93f7e88568a92d09e4b7 * support weval testing * add ci workflow for Weval test suite * Update weval, resolving two test failures. This commit updates to weval v0.2.7 which has no output by default, allowing the expected-failure tests checking syntax error messages to pass; we now pass 9/10 integration tests. It also updates the flags on `componentize.sh`: a `--verbose` flag to allow the user to see weval progress messages (perhaps useful if the build is taking a long time, or to see the stats on function specializations); and removal of the `--aot` flag, because there is only one valid setting for a build configuration and it is not baked into the shell script automatically. * Update SpiderMonkey version to include two fixes (bytecodealliance/spidermonkey-wasi-embedding#19). --------- Co-authored-by: Guy Bedford <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two issues discovered while debugging the testsuite in StarlingMonkey:
PBL/weval: value-specialize on two-way conditional inputs to avoid issues with if-conversion. gecko-dev#54: fixes handling of conditionals by weval when LLVM applies if-conversion in a new place; use of weval intrinsic for value-specialization / subcontext splitting should make this more robust.
PBL: save PC in interpreter frame before all ICs. gecko-dev#55: fixes missing interpreter-PC values in stack frames up the stack during unwind because of too-aggressive optimization trick in weval'd bodies.
With these two changes, this version of SpiderMonkey allows the StarlingMonkey integration test suite to pass in
bytecodealliance/StarlingMonkey#91.