Skip to content

Conversation

kripken
Copy link
Member

@kripken kripken commented May 21, 2024

Doing it before anything else can help a lot if there is a significant amount of
dead code that can be removed, as it saves work for all the later passes. We
did run this pass if GC was enabled just a few passes later down, but even so
it is worthwhile to run it an additional time, and it makes sense to do even
without GC (though in typical optimized LLVM outputs there will be little
dead code).

If there is no dead code then this is wasted work, but this is a fairly fast pass,
and I measure no significant slowdown due to this. E.g. on the 35 MB clang.wasm
(which is already optimized, so little dead code) it takes around a second, while
all of -O2 takes almost two minutes, so the difference is just 1%.

On J2CL I measure a 15% speedup in -O3 --closed-world -tnh, and also the
binary is 2.5% smaller, which means there is less work for later cycles of -O3.

@kripken kripken requested a review from tlively May 21, 2024 19:16
@kripken
Copy link
Member Author

kripken commented May 23, 2024

The test failures should be fixed by #6626

@kripken kripken merged commit 525f076 into WebAssembly:main May 29, 2024
@kripken kripken deleted the rume.early branch May 29, 2024 16:48
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants