Repository navigation
JIT: Factor SSA's dominator tree computation - #95507
Conversation
Factor the dominator tree computation out to a `FlowGraphDominatorTree` class. Compute preorder and postorder numbers for this tree. Switch RBO and hoisting from using `fgDominate` which is querying dominator information computed all the way back in loop finding to actually use the dominator tree computed by SSA. Small number of diffs are expected from RBO now not rejecting some cases because of more precise treatment of EH constructs now. TP may be regressed a bit too due to now numbering SSA's dominator tree -- we can regain that TP once we remove the old dominator computation.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsFactor the dominator tree computation out to a Small number of diffs are expected from RBO now not rejecting some cases because of more precise treatment of EH constructs. TP may be regressed a bit too due to now numbering SSA's dominator tree -- we can regain that TP once we remove the old dominator computation.
|
|
/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS. Should be ready assuming CI passes, the current failure looks like some sort of infra issue, I see no error in the console log. Diffs. Surprisingly a TP improvement; I suppose SSA's dominator computation is just better optimized than |
|
|
||
| // domTree[i].nextSibling = domTree[parent->bbPostorderNum].firstChild; | ||
| // domTree[parent->bbPostorderNum].firstChild = block; | ||
| //} |
There was a problem hiding this comment.
I'll submit a PR right after this one that replaces the above quirk with this code, so I left it here. It seems like it has some nice improvements.
AndyAyersMS
left a comment
There was a problem hiding this comment.
Are there any users of the old DomTreeVisitor left?
Yes, we still have |
If we're finding the same set of loops (or a superset) with the new logic, then the reachability checks can become loop membership, and the dominator checks can become DFST ancestry checks, so seems like neither reachability nor dominance is actually needed? |
I haven't tried to understand what it is doing there, but from the function header/logic it seems like it might be more general than just natural loops. Not sure how much it matters... I'll try playing around with it when I get to that point. |
Factor the dominator tree computation out to a
FlowGraphDominatorTreeclass. Compute preorder and postorder numbers for this tree. Switch RBO and hoisting from usingfgDominatewhich is querying dominator information computed all the way back in loop finding to actually use the dominator tree computed by SSA.Small number of diffs are expected from RBO now not rejecting some cases because of more precise treatment of EH constructs. TP may be regressed a bit due to now numbering SSA's dominator tree -- we can regain that TP once we remove the old dominator computation.