-
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
Propagate typeof() during inlining #71778
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsQuick experiment, locally saw more improvements than regressions from it
|
PTAL @dotnet/jit-contrib @AndyAyersMS |
Co-authored-by: Andy Ayers <[email protected]>
@AndyAyersMS anything else? |
Closes #40381
Example:
Codegen for
Main()
:It now:
typeof()
at that call-site is a constant arg -> recognizes 4 foldabale branches in this inlinee:typeof()
by value during inlining - it helps to eliminate those branches and fix RyuJIT: IsValueType and IsAssignableFrom optimizations aren't inlining friendly. #40381Regressions are due to inlining, RA and some cases where CSE/Hoisting doesn't "undo" propagation, e.g.: https://www.diffchecker.com/ukNlUweZ
Also a lot of regressions coming from the fact that we never do CSE across blocks, e.g.:
codegen diff for
Bar
: https://www.diffchecker.com/mWkBicM0but it's not really a terrible perf regression I'd guess...