-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Factor SSA's DFS and profile synthesis's loop finding (#95251)
Factor out SSA's general DFS (that takes EH into account) and encapsulate it in a `FlowGraphDfsTree` class. Factor out profile synthesis's loop finding and encapsulate it in a `FlowGraphNaturalLoops` class. Switch construction of it to use the general DFS instead of the restricted one (that does not account for exceptional flow). Optimize a few things in the process: * Avoid storing loop blocks in a larger than necessary bit vector; store them starting from the loop header's postorder index instead. * Provide post-order and reverse post-order visitors for the loop blocks; switch profile synthesis to use this in a place No diffs are expected. A small amount of diffs are expected when profile synthesis is enabled due to the modelling of exceptional flow and also from handling unreachable predecessors (which would reject some loops as unnatural loops before). My future plans are to proceed to replace the loop representation of loops with this factored version, removing the lexicality requirement in the process, and hopefully fixing some of our deficiencies.
- Loading branch information
1 parent
8ba8da3
commit f106d7e
Showing
15 changed files
with
1,054 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.