carefully cache freshly-inferred edge for call-site inlining #51975
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently call-site inlining fails on freshly-inferred edge if its source isn't inlineable. This happens because such sources are exclusively cached globally. For successful call-site inlining, it's necessary to cache these locally also, ensuring the inliner can access them later.
To this end, the type of the
cache_mode
field ofInferenceState
has been switched toUInt8
fromSymbol
. This change allows it to encode multiple caching strategies. A new caching mode can be introduced, e.g.VOLATILE_CACHE_MODE
, in the future.@nanosoldier
runbenchmarks("inference", vs=":master")