Skip to content

Branch hinting - #1693

Closed
yuri91 wants to merge 5 commits into
WebAssembly:mainfrom
yuri91:branch_hinting
Closed

yuri91 wants to merge 5 commits into
WebAssembly:mainfrom
yuri91:branch_hinting

Conversation

@yuri91

@yuri91 yuri91 commented Jul 14, 2021

Copy link
Copy Markdown
Contributor

This PR adds basic support for handling the custom section "branchHints" (see Branch Hinting proposal).

I added code to parse the section in the binary reader, and call new appropriate visitor methods with the parsed information.

I also Implemented the new visitor methods for the binary reader logger and the binary reader objdump.

So now it is possible to use wasm-objdump to output the contents of the section in a readable format, and wasm-validate will complain if the section is malformed.

The branchHints section parsing is done conditionally with a feature flag --enable-branch-hinting.

I also added some tests.

A possible further improvement would be to mark the hinted branches as such in the code output of wasm-objdump/wasm-decompile.

@yuri91

yuri91 commented Oct 11, 2021

Copy link
Copy Markdown
Contributor Author

I am closing this in favor of #1724 , which add support for the more general "code annotations" ( branch hinting will soon be based on them)

@yuri91 yuri91 closed this Oct 11, 2021
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.

1 participant