Skip to content

Closure optimization: omit code pointer when not used #2059

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
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vouillon
Copy link
Member

@vouillon vouillon commented Jun 24, 2025

This reduces the amount of memory allocated. But I think this also allows Binaryen to make more optimizations, since it becomes clear that the function is only called from known places.

@vouillon vouillon added the wasm label Jun 24, 2025
@vouillon vouillon marked this pull request as ready for review July 7, 2025 09:19
@vouillon vouillon force-pushed the closure-optim branch 2 times, most recently from d9ef933 to c789e10 Compare July 8, 2025 09:13
@hhugo
Copy link
Member

hhugo commented Jul 9, 2025

compilation time for fiat-crypto increases from 128s to 135s. Do you know where it's spent ?

@vouillon vouillon mentioned this pull request Jul 10, 2025
8 tasks
@vouillon
Copy link
Member Author

compilation time for fiat-crypto increases from 128s to 135s. Do you know where it's spent ?

I think wasm-opt takes longer to execute.

"CALL others:%b known:%d@."
others
(Var.Set.cardinal known)
with Invalid_argument _ -> ())
Copy link
Member

Choose a reason for hiding this comment

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

This deserves a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants