Skip to content
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

Add some support for PGO (profile-guided optimization) #11085

Closed
axic opened this issue Mar 10, 2021 · 4 comments
Closed

Add some support for PGO (profile-guided optimization) #11085

axic opened this issue Mar 10, 2021 · 4 comments
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. optimizer stale The issue/PR was marked as stale because it has been open for too long.

Comments

@axic
Copy link
Member

axic commented Mar 10, 2021

See https://en.wikipedia.org/wiki/Profile-guided_optimization. (This was discussed on gitter.)

Guiding the compiler with usage data could help determining which code paths matter and could prefer those for cost. This could also make proposals like #4858, #6234 or #8186 moot.

One potential idea is to have a new input to standard json consisting of a map of AST id and number of hits. The code paths touching those AST ids would be prioritised. This map must be included in the metadata as well for reproducibility. Creating this map would not be the responsibility of the compiler, rather frameworks could run various test cases, record the execution trace, and submit the map.

Obviously this is not a concrete proposal yet, just a rough outline.

@axic axic added the optimizer label Mar 10, 2021
@chriseth
Copy link
Contributor

Instead of AST ids we could also use the names of yul functions or IR code line numbers before optimization.

@cameel cameel added this to New issues in Solidity via automation Jul 28, 2021
@cameel cameel added the feature label Jul 28, 2021
@github-actions
Copy link

This issue has been marked as stale due to inactivity for the last 90 days.
It will be automatically closed in 7 days.

@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Mar 18, 2023
@github-actions
Copy link

Hi everyone! This issue has been automatically closed due to inactivity.
If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen.
However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.

@github-actions github-actions bot added the closed due inactivity The issue/PR was automatically closed due to inactivity. label Mar 26, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2023
@zamazan4ik
Copy link

zamazan4ik commented Oct 29, 2023

Any updates on this? Here I collected much more articles and benchmarks regarding applying to different kinds of applications (including many compilers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. optimizer stale The issue/PR was marked as stale because it has been open for too long.
Projects
None yet
Development

No branches or pull requests

5 participants