Repository navigation
JIT: Compute new dominators earlier and invalidate old dominators - #95925
Conversation
* Add a new phase to compute new dominators and exceptional entries based on them after loop unrolling. Invalidate the old dominators at the same time. * Rename `LclVarDsc::lvVolatileHint` => `LclVarDsc::lvHasExceptionalUsesHint` * Switch early prop to use `lvLiveInOutOfHndlr` for one of its correctness checks. When this code was originally written it seems `lvLiveInOutOfHndlr` was debug-only. (Also, `lvHasExceptionalUsesHint` does not seem like it would be a sufficient check for correctness purposes) * Add a convenience `GetPostOrder(unsigned index)` accessor to the DFS tree class and switch some uses to it
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details
|
| // Inside try we allow only stores to locals not live in handlers. | ||
| // lvVolatileHint is set to true on variables that are line in handlers. | ||
| result = tree->OperIs(GT_STORE_LCL_VAR) && !lvaTable[tree->AsLclVar()->GetLclNum()].lvVolatileHint; | ||
| result = tree->OperIs(GT_STORE_LCL_VAR) && !lvaTable[tree->AsLclVar()->GetLclNum()].lvLiveInOutOfHndlr; |
There was a problem hiding this comment.
Looks like we didn't use this originally because it was debug-only back then:
#1735 (comment)
However, today we do have it in all flavors and it gets computed right before early prop.
| // Returns: | ||
| // Suitable phase status. | ||
| // | ||
| PhaseStatus Compiler::fgComputeDominators() |
There was a problem hiding this comment.
It's a bit confusing that we now have fgComputeDoms and fgComputeDominators, but the confusion should only be temporary...
|
cc @dotnet/jit-contrib PTAL @BruceForstall Diffs. Mainly from the early prop change that gives us a bit more precision than using "dominated by exceptional entry". |
| printf("*************** In SsaBuilder::Build()\n"); | ||
| } | ||
| #endif | ||
| JITDUMP("*************** In SsaBuilder::Build()\n"); |
There was a problem hiding this comment.
In general, this is fine. Note, however, that the older form has one useful feature: you can set an unconditional line-based breakpoint on the "printf" that only activates when debugging a function where you've enabled JitDump (so verbose is true).
There was a problem hiding this comment.
Ah, that makes sense... I'll avoid making this change in the future.
LclVarDsc::lvVolatileHint=>LclVarDsc::lvHasExceptionalUsesHintlvLiveInOutOfHndlrfor one of its correctness checks. When this code was originally written it seemslvLiveInOutOfHndlrwas debug-only. (Also,lvHasExceptionalUsesHintdoes not seem like it would be a sufficient check for correctness purposes)GetPostOrder(unsigned index)accessor to the DFS tree class and switch some uses to it