Stream: git-wasmtime

Topic: wasmtime / PR #15184 Cranelift: preserve source locations...


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

wraitii opened PR #15184 from wraitii:fix/egraph-source-locations to bytecodealliance:main:

Found an issue with source tracking while working on a custom jitdump project connected to samply.
The investigation & fix were entirely found by GPT Astra, so I cannot vouch for its particular accuracy, but the diff is small and seems to check out for the issue.
Let me know if I should change something here.

Description

The egraph elaborator clones instructions during rematerialization and expression placement, but dfg.clone_inst does not copy the separate source-location entry. Surviving instructions can therefore lose their locations, leaving gaps in profiling attribution.

Copy non-default source locations at both clone sites. Skipping default locations avoids populating an otherwise empty source-location map.

The regression test checks locations on rematerialized constants and their cloned users. Removing either fix independently makes it fail.

Validation:

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

wraitii removed the review request for wasmtime-compiler-reviewers from PR #15184.

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

wraitii requested cfallin for a review on PR #15184.

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

wraitii requested wasmtime-compiler-reviewers for a review on PR #15184.

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

:thumbs_up: cfallin submitted PR review:

Thanks!

It looks like you'll have to re-bless a bunch of disas tests since more sourcelocs are preserved through optimizations now. Can you do that in a separate commit? I'll then read through it to make sure nothing else changed, and merge after that.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 06 2026 at 21:44):

github-actions[bot] added the label cranelift on PR #15184.

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

wraitii requested dicej for a review on PR #15184.

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

wraitii removed the review request for wasmtime-core-reviewers from PR #15184.

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

wraitii requested wasmtime-core-reviewers for a review on PR #15184.

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

wraitii updated PR #15184.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2026 at 09:02):

wraitii commented on PR #15184:

Done in a separate commit, ready for review :)

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

:thumbs_up: cfallin submitted PR review:

Thanks!

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

cfallin added PR #15184 Cranelift: preserve source locations during egraph elaboration to the merge queue.

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

:check: cfallin merged PR #15184.

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

cfallin removed PR #15184 Cranelift: preserve source locations during egraph elaboration from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC