-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Remove fallthrough restrictions in Compiler::fgOptimizeBranch
#105625
base: main
Are you sure you want to change the base?
Conversation
It's worth noting that we only call |
cc @dotnet/jit-contrib, @AndyAyersMS PTAL. Diffs. The largest size increases are due to more loop cloning (especially in |
@AndyAyersMS updated diffs look roughly the same. Is it alright if we start taking flowgraph changes for .NET 10? |
I think we may want to wait a little while longer? We can discuss this when we meet later today. |
It seems suboptimal that we run |
While investigating perf regressions from flowgraph changes, I noticed some instances where
Compiler::fgOptimizeBranch
was no longer kicking in due to conditional blocks not matching the implicit fallthrough constraint we previously removed (example). Removing this constraint is simple enough, and fixes the subpar block layout (and the edge likelihoods of the cloned condition) in the linked example:I was hoping this would improve the layout of some of the regressed methods in #103972, though we seem to hit the cost limit for cloning quite frequently. For example, from
System.Linq.Tests.Perf_Enumerable.Aggregate_Seed(input: IEnumerable)
:I wonder if we should increase the cost limit of
fgOptimizeBranch
to match that of loop inversion, since they seem to be performing similar transformations, though we can consider that for a follow-up PR.