-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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: Delete old DFS and dominator implementations #96927
Conversation
- Remove `BasicBlock::bbIDom`. Move it into `DomTreeNode` instead so that multiple dominator trees aren't sharing a field in the basic block. - Introduce `FlowGraphDominatorTree::BuildFromRegularFlow`. It builds a dominator tree over the regular flow, ignoring exceptional flow. Switch the block weighting logic to be based on this tree. - Remove the old DFS - Remove the old dominator computation - Remove the old `DomTreeVisitor` and rename `NewDomTreeVisitor` -> `DomTreeVisitor` - Rename `BasicBlock::bbNewPostorderNum` -> `BasicBlock::bbPostorderNum`
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details
Minor diffs expected due to differences in treatment of unreachable blocks when computing the new regular flow dominators.
|
|
||
if (!dfsTree->Contains(predBlock)) | ||
{ | ||
DBG_SSA_JITDUMP(" Unreachable node\n"); |
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 was a preexisting bug. The below loop would read the bbIDom
set by the old dominator computation in this case.
cc @dotnet/jit-contrib PTAL @BruceForstall Diffs. Some minor code diffs, due to the more precise exceptional flow handling. Some larger TP improvements. |
- Switch the block weighting logic to be based on the new dominator tree - Remove the old DFS - Remove the old dominator computation - Remove the old `DomTreeVisitor` and rename `NewDomTreeVisitor` -> `DomTreeVisitor` - Rename `BasicBlock::bbNewPostorderNum` -> `BasicBlock::bbPostorderNum`
DomTreeVisitor
and renameNewDomTreeVisitor
->DomTreeVisitor
BasicBlock::bbNewPostorderNum
->BasicBlock::bbPostorderNum
Some diffs expected due to the more precise handling of exceptional flow. Some TP improvements expected from removing some unnecessary DFS/dominator computations. More improvements should come with follow-ups to avoid some unnecessary recomputations.