Repository navigation
Update emsdk version from d140a29c to f0cf44cc - #28352
Conversation
8315017 to
b175ce5
Compare
|
I wonder where these 800 bytes of regression are coming from.. |
I passed this question on to Claude Fable 5.2 It came back with: The +809 bytes come from a single upstream LLVM change: llvm/llvm-project@67cc115 "[Clang][Inliner] Enable module-local optimizer hints by default" (llvm/llvm-project#238529). It arrived in the first LLVM roll of this range ( What happens
Direct calls in
Size accounting (
|
| Item | Bytes |
|---|---|
std::locale::__global() grows 2472 → 3882 |
+1410 |
30 locale::__imp::install<F>(F*) helpers removed (17 bytes each) |
−510 |
__wasm_call_ctors |
−4 |
| Function, element and data sections (30 fewer functions / table entries) | −87 |
| Net | +809 |
test_codesize_cxx_mangle has the identical +809 delta, so it is the same cause.
Verification
I reproduced the numbers in this PR locally at emscripten fc87b87 with the prebuilt emscripten-releases toolchains, and then flipped only the flag, rebuilding the system libraries each time:
| Toolchain | Flag | cxx_except a.out.nodebug.wasm |
|---|---|---|
old (d140a29c) |
default | 174535 |
new (00524468) |
default | 175344 |
new (00524468) |
-fno-module-local-hints |
174535 |
old (d140a29c) |
-fmodule-local-hints |
175344 |
The match is byte-exact in both directions. Mixing new LLVM with old Binaryen gives 175344, and old LLVM with new Binaryen gives 174535, which rules Binaryen out.
Flipping the flag on the new toolchain also restores the old sizes for cxx_noexcept (135996 → 135992) and cxx_except_wasm (149801 → 149799), so the +2/+4 byte changes share the same cause. I did not rerun the wasmfs, except_wasm_legacy or hello_embind variants.
Is it worth acting on?
-
Gzipped size went down in the two affected tests (58664 → 58528 for
cxx_except), since the repeated invoke sequences compress well. -
The hint is a net win elsewhere. Total
CODEsection size of the libc++ archives, new toolchain, hints off → on:Library hints off hints on delta libc++-noexcept.a356104 354743 −1361 libc++-wasmexcept.a420028 418872 −1156 libc++.a(JS exceptions)510104 513017 +2913
If we wanted the bytes back, the narrowest option would be to build only the JS-exceptions libc++ variant with -fno-module-local-hints in tools/system_libs.py. I have only tested the flag applied to all system libraries, not that variant-only change.
This is an automatic change generated by tools/maint/rebaseline_tests.py --update-emsdk. emsdk version updated: d140a29c => f0cf44cc The following revisions were included in this update: ``` - f0cf44cc Roll llvm-project from 950baabb7fdf to c620a424a90a (20 revisions) - c3d64cd4 Roll llvm-project from 5e410254168a to 950baabb7fdf (11 revisions) - 5e44e028 Roll llvm-project from 18867a59d17a to 5e410254168a (12 revisions) - 42ac2802 Roll emscripten from 4e590ff to 4942151 (3 revisions) - 2bb84944 Roll v8 from f4bfd902e1c4 to 4f01bdeb2725 (2 revisions) - 2d9e3ffe Roll emscripten from fc87b87 to 4e590ff (3 revisions) - 018e72fa Roll llvm-project from f1afebcbe1c6 to 18867a59d17a (11 revisions) - 2f468a0e Roll llvm-project from 8f7eb6f677a2 to f1afebcbe1c6 (4 revisions) - 00524468 Roll llvm-project from cc5ed0cebe3e to 8f7eb6f677a2 (8 revisions) - d0efbc8e Roll llvm-project from 1625c1a53d61 to cc5ed0cebe3e (7 revisions) - 69b93276 Roll llvm-project from b6f762dad029 to 1625c1a53d61 (17 revisions) - e2fd0fda Roll emscripten from 343150f to fc87b87 (1 revision) - 0a85dec7 Roll llvm-project from 4c01a2991df8 to b6f762dad029 (15 revisions) - e4066aa4 Roll binaryen from 4408fed200e9 to 89157cb30824 (1 revision) - 9a73748e Fix version in DEPS.tagged-release - ab27b19e Roll emscripten from c7360e7 to 343150f (1 revision) - b18ce50f Roll v8 from 8b413f7c8252 to f4bfd902e1c4 (18 revisions) - 44b4cd37 Roll llvm-project from 87764a902a9b to 4c01a2991df8 (9 revisions) - 302dfa3a Roll emscripten from 68f53bd to c7360e7 (2 revisions) - 39536303 Roll emscripten from de59e7b to 68f53bd (1 revision) - 3c226351 Roll llvm-project from aab5b2033768 to 87764a902a9b (19 revisions) - 9a4d68c3 Roll llvm-project from 0d8ca1bd8eec to aab5b2033768 (6 revisions) - af31a894 Roll emscripten from 4d96a35 to de59e7b (1 revision) - 0a12a760 Roll llvm-project from d361f7b3f594 to 0d8ca1bd8eec (13 revisions) - 186239e Roll emscripten from ac05787 to 4d96a35 (5 revisions) - 80803a3e Roll binaryen from e7a4b90f3c63 to 4408fed200e9 (1 revision) - 9146b21a Version 7.0.1 RC3 - 0d19b078 Roll llvm-project from 61c665e40ec9 to d361f7b3f594 (35 revisions) - 9d8afc53 Fix disabling Xcode libtool in macOS LLVM builds - c1934886 Roll binaryen from d1ce9a596ee8 to e7a4b90f3c63 (1 revision) ... (and more, see full log) ``` Full log: https://chromium.googlesource.com/emscripten-releases/+log/d140a29c..f0cf44cc The following (7) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_codesize_cxx_except.json: 197298 => 198107 [+809 bytes / +0.41%] codesize/test_codesize_cxx_except_wasm.json: 168668 => 168670 [+2 bytes / +0.00%] codesize/test_codesize_cxx_except_wasm_legacy.json: 166527 => 166529 [+2 bytes / +0.00%] codesize/test_codesize_cxx_mangle.json: 264408 => 265217 [+809 bytes / +0.31%] codesize/test_codesize_cxx_noexcept.json: 155062 => 155066 [+4 bytes / +0.00%] codesize/test_codesize_cxx_wasmfs.json: 181302 => 181306 [+4 bytes / +0.00%] codesize/test_minimal_runtime_code_size_hello_embind.json: 15044 => 15044 [+0 bytes / +0.00%] Average change: +0.10% (+0.00% - +0.41%) ```
b175ce5 to
8bda20e
Compare
|
Gemini agreed with claude and update this PR accordingly. |
This is an automatic change generated by tools/maint/rebaseline_tests.py --update-emsdk.
Additionally, build the JS-exceptions
libc++variant intools/system_libs.pywith-fno-module-local-hints. Upstream LLVMenabled
-fmodule-local-hintsby default (llvm/llvm-project#238529),which caused a +809 byte codesize regression under JS exceptions due
to inlining single-call-site helpers duplicating
invokewrappers,while noexcept and Wasm exceptions
libc++variants see a net sizereduction.
emsdk version updated: d140a29c => f0cf44cc
The following revisions were included in this update:
Full log: https://chromium.googlesource.com/emscripten-releases/+log/d140a29c..f0cf44cc
The following (5) test expectation files were updated by
running the tests with
--rebaseline: