JIT: Refine post-dominance check in strength reduction#104687
JIT: Refine post-dominance check in strength reduction#104687jakobbotsch merged 2 commits intodotnet:mainfrom
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. |
AndyAyersMS
left a comment
There was a problem hiding this comment.
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
optReachablebefore, but that is conservative since it finds paths that may exit the loop. This implements a more precise check.