Skip to content

Use different format for function level annotations #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ecmziegler opened this issue Oct 25, 2023 · 1 comment
Open

Use different format for function level annotations #1

ecmziegler opened this issue Oct 25, 2023 · 1 comment

Comments

@ecmziegler
Copy link
Collaborator

Currently, the function level annotations contain some unnecessary fields, e.g. the length of the number of annotations per function is always 1 and the code location is always 0. Would it make sense to separate the format for those annotations from the one used in instruction level annotations?

One could e.g. agree that annotations are either function level or instruction level. This could be separated by namespace (e.g. metadata.function.* vs metadata.code.*) to have a well defined behavior here. Branch hints would not be affected by this as they are always on instruction level.

The annotations proposal would have to be adjusted to incorporate this change though.

@yuri91
Copy link

yuri91 commented Dec 9, 2023

This seems reasonable to me. The namespacing of the section name was put there on purpose to easily allow something like this.

I don't think that the annotations proposal would need any change though.

Maybe this section of the tool conventions should be expanded: https://github.com/WebAssembly/tool-conventions/blob/main/CodeMetadata.md.

The only downside is that some tools that can get away with supporting all "metadata.code" sections generically (e.g. wabt) will need explicit support for metadata.function (but it should be easy to add).

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

No branches or pull requests

2 participants