Skip to content

[DAE] Recompute callers in each iteration - #9235

Merged
kripken merged 1 commit into
WebAssembly:mainfrom
vouillon:dae-stale-callers
Oct 8, 2026
Merged

kripken merged 1 commit into
WebAssembly:mainfrom
vouillon:dae-stale-callers

Conversation

@vouillon

@vouillon vouillon commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

The set of callers was computed once, in the first iteration. But optimizing functions between iterations can create new direct calls, for example by turning a call_ref of a ref.func into a call. When the return type of the callee was later refined, these new callers were not refinalized, which left stale types.

Recompute the callers in each iteration, together with the calls. This is cheap, as each caller appears at most once per callee in the scan results.

Fixes #9233.

The set of callers was computed once, in the first iteration. But
optimizing functions between iterations can create new direct calls, for
example by turning a call_ref of a ref.func into a call. When the return
type of the callee was later refined, these new callers were not
refinalized, which left stale types.

Recompute the callers in each iteration, together with the calls. This is
cheap, as each caller appears at most once per callee in the scan results.

Fixes WebAssembly#9233.
@vouillon
vouillon requested a review from a team as a code owner October 8, 2026 08:28
@vouillon
vouillon requested review from tlively and removed request for a team October 8, 2026 08:28

@kripken kripken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! And nice, this is indeed quite cheap to compute.

@kripken
kripken merged commit 64722e1 into WebAssembly:main Oct 8, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fuzzer: DAE generates invalid code

2 participants