Skip to content

Inlining: Respect max-combined-binary-size even when inlining repeatedly - #9387

Merged
kripken merged 4 commits into
WebAssembly:mainfrom
kripken:inlining-repeat
Nov 23, 2026
Merged

kripken merged 4 commits into
WebAssembly:mainfrom
kripken:inlining-repeat

Conversation

@kripken

@kripken kripken commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Previously if we inlined A, B, C into a single caller, we did not take into
account that the caller was growing as we did so, so the final size
could exceed the max combined size, if --inline-max-combined-binary-size
is passed. To fix that, update the size estimate after inlining.

This replaces the old large test, which was very attuned to small differences,
making it annoying to update for issues like this. What we really need is
to test coverage of the branch that decides whether to inline or not, which
the new test does. (edit: best to ignore the diff and just read the new short
test)

Fixes #9384

@tlively
tlively self-requested a review November 12, 2026 21:45
@kripken

kripken commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

friendly ping @tlively

@kripken
kripken merged commit f3f3370 into WebAssembly:main Nov 23, 2026
19 checks passed
@kripken
kripken deleted the inlining-repeat branch November 23, 2026 20:52
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.

Inlining: --inline-max-combined-binary-size is not enforced when several functions are inlined into one caller in the same iteration

2 participants