-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
JIT: Use fgCalledCount
in inlinee weight computation
#112499
JIT: Use fgCalledCount
in inlinee weight computation
#112499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- src/coreclr/jit/importer.cpp: Language not supported
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@dotnet/jit-contrib PTAL. Diffs seem to be only in OSR methods. In the cases where we're now doing less inlining, the OSR loop's execution count is less than 100x the method call count; the opposite is true for cases where we're doing more inlining. With this change, we're doing fewer inlines overall. Thanks! |
@AndyAyersMS could you PTAL? Thanks! |
ping @AndyAyersMS |
I noticed that tweaking the computation of the entry weight for OSR methods (in service of #111915) incurred large inlining diffs. This is due to the fact that we use the entry block's weight to compute the normalized weight of a call site. This means we will get the wrong normalized weight for call sites when the entry block's weight diverges from the method's call count. This is currently possible only when the entry block is part of a loop, or when we compute a weight for the OSR entry fixup block that differs from
fgCalledCount
(which we almost always do). The correct thing to do is to use the root method's call count to normalize the call site's weight.