Intrinsics: Add @binaryen.inline, parallel to @metadata.code.inline#8820
Merged
Conversation
aheejin
approved these changes
Jun 9, 2026
| // Hint contents: inline frequency count | ||
| buffer << U32LEB(*annotation.inline_); | ||
| // Writes a simple i7 hint, in the range [0..127]. | ||
| #define WRITE_I7_HINT(code, field) \ |
Member
There was a problem hiding this comment.
Not a strong preference, but you can specify a class field this way too
binaryen/src/ir/module-splitting.cpp
Line 832 in 598d0b1
Member
Author
There was a problem hiding this comment.
Oh nice, I didn't think of that. I'll land the current version as it follows the existing code which also uses macros, but maybe we should really refactor it all to the non-macro version later...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing standardized annotation is for VMs. This annotation is for
toolchains.
We already have such annotations for never-inline, but not using an
intrinsic, and also allowing partial-inlining to be set. This uses the modern
annotations framework for it. We can deprecate the old form after we
add a partial-inlining form in the modern way.
For reference the old forms are here:
binaryen/src/wasm.h
Lines 2474 to 2477 in 598d0b1
Fixes #7972