-
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: Avoid relying on bbNum
to find lexical loop boundaries
#101714
Conversation
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
bbNum
and 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::GetLexicallyTopMostBlock
andFlowGraphNaturalLoop::GetLexicallyBottomMostBlock
to more robust implementations that scan the basic block list forwards (and backwards) to find the boundary blocks.Fix #101695