-
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: Refine post-dominance check in strength reduction #104687
Conversation
When strength reduction has to find an insertion point for the new primary IV update it needs to find a block that post-dominates all the users of the IV. This was using `optReachable` before, but that is conservative since it finds paths that may exit the loop. This implements a more precise check.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run runtime-coreclr libraries-jitstress, runtime, dotnet-linker-tests |
Azure Pipelines successfully started running 3 pipeline(s). |
cc @dotnet/jit-contrib PTAL @AndyAyersMS Diffs with strength reduction enabled show a lot of new cases where strength reduction is now considered legal. |
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.
Looks good.
I wonder if would be more efficient to walk backwards from the loop head backedges, seeing if you can reach block w/o first reaching postDominator?
Hmm, that could very well be. We could also check all of the users simultaneously instead of just checking them one at a time. I'll keep this in mind for when I start looking at TP. |
When strength reduction has to find an insertion point for the new primary IV update it needs to find a block that post-dominates all the users of the IV. This was using
optReachable
before, but that is conservative since it finds paths that may exit the loop. This implements a more precise check.