Stream: git-wasmtime

Topic: wasmtime / PR #15029 Cranelift: check for volatile loads ...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:09):

TastyCZ opened PR #15029 from TastyCZ:cranelift-volatile-classify-late to bytecodealliance:main:

Follow-up to #14999, for the compile-time regression in bytecodealliance/are-we-fast-yet#12.

#14999 made classify in alias analysis look up the memflags of every instruction, before any of its opcode checks, to find volatile accesses. This moves the check to where classify already reads the memflags of loads and stores: a store's while finding its alias region, and a load's while finding which regions it observes (that lookup is now shared with alias_regions_observed, which used to do it twice). Volatile loads and stores are still fences, so behaviour doesn't change. I also added a filetest for a volatile store in an alias region, the one case where a store is a fence only because it is volatile; nothing covered it before.

Compilation, instructions retired, against #14999's parent (fdc343eaffbb):

Geomean (default suite, 29 benchmarks) hashset
#14999 +0.94% +1.44%
#14999 + this PR +0.13% +0.16%
#14999 with the classify check removed (reference only) +0.05% +0.05%

So this recovers about 86% of the geomean regression (89% for hashset). In virtual cycles the geomean goes from +0.70% to -0.04%. On current main this PR is -0.81% geomean and -1.26% on hashset.

How I measured: Sightglass at 2d453335 (the issue's commit), each engine built like engines/wasmtime/build.rs (release, CODEGEN_UNITS=1), with the issue's engine flags and --measure callgrind --benchmark-phase compilation, Valgrind 3.26.0. For hashset, #14999 and its parent ran 6 iterations each, as in the issue, and give the same +1.44%. For the full suite I ran one iteration per engine and benchmark, since callgrind's counts repeated to within 0.001%. The "this PR" rows are this commit applied to #14999 itself, so nothing else that landed since is mixed in.

Tests: cargo test -p cranelift-codegen, the filetests (cargo test -p cranelift-tools --test filetests and clif-util test cranelift/filetests/filetests), and clippy on cranelift-codegen all pass. The new filetest fails when the volatile-store check is removed.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:09):

TastyCZ removed the review request for wasmtime-compiler-reviewers from PR #15029.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:09):

TastyCZ requested cfallin for a review on PR #15029.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:09):

TastyCZ requested wasmtime-compiler-reviewers for a review on PR #15029.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:36):

:thumbs_up: fitzgen submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:36):

fitzgen added PR #15029 Cranelift: check for volatile loads and stores late in alias analysis's classify to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:58):

:check: fitzgen merged PR #15029.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 27 2026 at 19:58):

fitzgen removed PR #15029 Cranelift: check for volatile loads and stores late in alias analysis's classify from the merge queue.


Last updated: Oct 31 2026 at 23:03 UTC