JIT: Avoid relying on bbNum to find lexical loop boundaries#101714
JIT: Avoid relying on bbNum to find lexical loop boundaries#101714jakobbotsch merged 1 commit intodotnet:mainfrom
bbNum to find lexical loop boundaries#101714Conversation
Switch `FlowGraphNaturalLoop::GetLexicallyTopMostBlock` and `FlowGraphNaturalLoop::GetLexicallyBottomMostBlock` to more robust implementations that scan the basic block list forwards (and backwards) to find the boundary blocks. Fix dotnet#101695
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS No diffs. Some minor TP regressions. |
|
Can we port this to preview4 as well (assuming it's the fix for #101695)? dotnet/aspnetcore#55372 is still blocked on it |
Yes, we will port it. |
|
Some timeouts, should we bypass build analysis here? |
|
Yeah, I see similar timeouts in my other PR #100823 that started a run around the same time, so seems unlikely to be related to the change. |
|
/ba-g Timeouts are also happening in other PRs and limited to linux-x64 |
|
/backport to release/9.0-preview4 |
|
Started backporting to release/9.0-preview4: https://github.com/dotnet/runtime/actions/runs/8898356760 |
…01714) Switch `FlowGraphNaturalLoop::GetLexicallyTopMostBlock` and `FlowGraphNaturalLoop::GetLexicallyBottomMostBlock` to more robust implementations that scan the basic block list forwards (and backwards) to find the boundary blocks. Fix dotnet#101695
…01714) Switch `FlowGraphNaturalLoop::GetLexicallyTopMostBlock` and `FlowGraphNaturalLoop::GetLexicallyBottomMostBlock` to more robust implementations that scan the basic block list forwards (and backwards) to find the boundary blocks. Fix dotnet#101695
The previous implementation is based on
bbNumand can subtly return the wrong results when the block list isn't sorted. This can happen in loop compaction (the bug existed since #96995 but seems to have been exposed by #99827).Switch
FlowGraphNaturalLoop::GetLexicallyTopMostBlockandFlowGraphNaturalLoop::GetLexicallyBottomMostBlockto more robust implementations that scan the basic block list forwards (and backwards) to find the boundary blocks.Fix #101695