Stream: git-wasmtime

Topic: wasmtime / PR #15330 Cranelift: look up a block's GVN dep...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 18:10):

kestred removed the review request for wasmtime-compiler-reviewers from PR #15330.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 18:10):

kestred opened PR #15330 from kestred:cranelift-gvn-depth to bytecodealliance:main:

Fixes #15263.

depth_of_block_in_gvn_map finds a block by scanning gvn_map_blocks, which is quadratic when the dominator tree is
deep. This records each block's index when it is pushed and looks it up, with a debug assertion that the two agree.

For my ordinary test corpus (~20 programs of various shapes) compile time is unchanged.

For a pathological program (a chain of 16,384 blocks) at opt_level=speed, the egraph pass goes from 1.28 s to 0.23 s.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 18:10):

kestred requested cfallin for a review on PR #15330.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 18:10):

kestred requested wasmtime-compiler-reviewers for a review on PR #15330.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 18:20):

:thumbs_up: cfallin submitted PR review:

Thanks!

Simple change, nice speedup, looks great.

Only a minor nit: we try to avoid as T integer casts since they silently truncate (here unlikely/impossible due to input-size limits but we keep the general rule to make audits easier). Can you use u32::try_from(...).expect(...) and likewise for usize here? Happy to merge once that's changed.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:31):

kestred updated PR #15330.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 20:01):

:thumbs_up: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 20:01):

cfallin added PR #15330 Cranelift: look up a block's GVN depth instead of scanning for it to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 20:24):

:check: cfallin merged PR #15330.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 20:24):

cfallin removed PR #15330 Cranelift: look up a block's GVN depth instead of scanning for it from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC