Skip to content

JIT: Clean up FlowGraphDominatorTree::Build #103803

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

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

jakobbotsch
Copy link
Member

We guarantee that fgFirstBB dominates all reachable basic blocks, so IntersectDom is never going to end up seeing a nullptr. Also, if the DFS tree does not have cycles the algorithm will converge in one iteration, so there is no reason to run a second one to notice no changes.

I don't expect much TP improvement from this, but overall I think making use of these assumptions amounts to a clean up.

We guarantee that `fgFirstBB` dominates all reachable basic blocks, so
`IntersectDom` is never going to end up seeing a `nullptr`. Also, if the
DFS tree does not have cycles the algorithm will converge in one
iteration, so there is no reason to run a second one to notice no
changes.

I don't expect much TP improvement from this, but overall I think making
use of these assumptions amounts to a clean up.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 21, 2024
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jakobbotsch jakobbotsch marked this pull request as ready for review June 21, 2024 14:03
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

No diffs, some minor TP improvements.

@jakobbotsch jakobbotsch requested a review from AndyAyersMS June 21, 2024 14:03
@jakobbotsch jakobbotsch merged commit ed6bbe6 into dotnet:main Jun 21, 2024
105 of 107 checks passed
@jakobbotsch jakobbotsch deleted the optimize-dominators branch June 21, 2024 18:32
rzikm pushed a commit to rzikm/dotnet-runtime that referenced this pull request Jun 24, 2024
We guarantee that `fgFirstBB` dominates all reachable basic blocks, so
`IntersectDom` is never going to end up seeing a `nullptr`. Also, if the
DFS tree does not have cycles the algorithm will converge in one
iteration, so there is no reason to run a second one to notice no
changes.
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants