-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: rely on DFS for cycle entry detection in optRemoveRedundantZeroInits #103788
Conversation
…nits If a block is DFS ancestor of one of its preds, the block is a cycle entry. Use this instead of `BBF_BACKWARD_JUMP` to stop the scan of blocks when looking for redundant zero inits. Fixes dotnet#103477 (in main).
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@jakobbotsch PTAL Small number of diffs expected. |
should we leave a comment on |
It's still used in some other places, we'll need to dig into those. Early enough is ok. I am trying to adapt the test case above into something that I can add. |
src/coreclr/jit/optimizer.cpp
Outdated
// See if this block is a cycle entry | ||
// | ||
bool stop = false; | ||
for (BasicBlock* const pred : block->PredBlocks()) |
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.
This could use BlockPredsWithEH
... It probably doesn't actually matter since we walk forwards with block->GetUniqueSucc()
, so won't ever end up at a handler, but it would be more consistent with the graph that the DFS tree is constructed over.
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.
Done... no change in SPMI diffs.
Some thoughts for follow up:
|
CI errors are known. |
…nits (dotnet#103788) If a block is DFS ancestor of one of its preds, the block is a cycle entry. Use this instead of `BBF_BACKWARD_JUMP` to stop the scan of blocks when looking for redundant zero inits. Fixes dotnet#103477 (in main).
"Port" the changes from dotnet#103788 to .NET 8. We don't have the DFS tree, so enhance the topological sort that SSA uses to detect cycles and backedges. Use this info to stop searching for redundant zero inits once flow from entry has entered a cycle. Fixes dotnet#103477 (for .NET 8).
"Port" the changes from dotnet#103788 to .NET 8. We don't have the DFS tree, so enhance the topological sort that SSA uses to detect cycles and backedges. Use this info to stop searching for redundant zero inits once flow from entry has entered a cycle. Fixes dotnet#103477 (for .NET 8).
"Port" the changes from dotnet#103788 to .NET 8. We don't have the DFS tree, so enhance the topological sort that SSA uses to detect cycles and backedges. Use this info to stop searching for redundant zero inits once flow from entry has entered a cycle. Fixes dotnet#103477 (for .NET 8).
"Port" the changes from dotnet#103788 to .NET 8. We don't have the DFS tree, so enhance the topological sort that SSA uses to detect cycles and backedges. Use this info to stop searching for redundant zero inits once flow from entry has entered a cycle. Fixes dotnet#103477 (for .NET 8).
If a block is DFS ancestor of one of its preds, the block is a cycle entry. Use this instead of
BBF_BACKWARD_JUMP
to stop the scan of blocks when looking for redundant zero inits.Fixes #103477 (in main).