Add some support for PGO (profile-guided optimization) #11085
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.
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.
The text was updated successfully, but these errors were encountered: