fitzgen opened PR #13947 from fitzgen:dead-store-elimination-perf to bytecodealliance:main:
Follow up to #13806 with a few perf improvements; see each commit. This, combined with my other perf PRs that have landed recently, recovers the hit to compilation times from introducing a dead-store elimination pass.
fitzgen requested cfallin for a review on PR #13947.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #13947.
:thumbs_up: cfallin submitted PR review:
LGTM -- thanks!
I was idly wondering whether we could be "even more lazy" wrt postdom: for example a backward walk from the maybe-overwriting store to see if every path meets the maybe-overwritten store before the entrypoint (avoiding revisits with a visit-set, etc). More or less like the Braun SSA construction algorithm, marching backward to find defs. That might be marginally faster when we just have a few queries (i.e. when we only really need a sparse subset of postdom info) but
- that's a whole new algorithm, and
- more importantly, I suspect your change here cuts out the majority of the cost anyway, since the computation is only at the end of a series of earlier gates
so no need to do that now. Just thought I'd mention in case it spawns any ideas later.
fitzgen added PR #13947 Cranelift: A few perf improvements for the dead-store elimination pass to the merge queue.
:check: fitzgen merged PR #13947.
fitzgen removed PR #13947 Cranelift: A few perf improvements for the dead-store elimination pass from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC