-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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: Enable strength reduction by default #105131
JIT: Enable strength reduction by default #105131
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 3 pipeline(s). |
There is a related problem it looks like -- crash during |
cc @dotnet/jit-contrib PTAL @AndyAyersMS Diffs. Overall a size improvement, although the size diffs are very mixed; it is not equivocally a size improvement to do strength reduction:
Perfscore wise we look to be good -- this is an overall improvement in all the collections. I also think many of the regressions aren't actual regressions; we give the 1,2,3-operand addressing modes the same score, while in reality the micro benchmarks indicate that the scaled addressing modes are significantly more expensive than the others. So the perfscore doesn't always account for what strength reduction is actually trying to do. x86 has some large size regressions, but mostly from I looked through a large chunk of the asp.net x64 size regressions, and they all looked fine to me. We get rid of the more expensive addressing mode in trade of some larger code in the preheader. A canonical size regressions looks like the following: |
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.
Great to see this finally turned on.
Fix #100913
Strength reduction is considered profitable for all strides, even ones that can be part of addressing modes. This is motivated by results of the micro benchmark I did over in #100913 using @EgorBo's bot: arm64, x64 AMD, x64 Intel (ignore the duplicated Main/PR rows). In all cases this micro benchmark was either the same or improved by strength reduction.