Repository navigation
Reconcile handling of EH vars - #1884
Conversation
|
Also, fix |
|
@dotnet/jit-contrib PTAL - will still want to run stress testing on this if all the innerloop passes. |
There was a problem hiding this comment.
I'm not too fond of "Last" in the name -- it seems ambiguous what it is last with respect to: last in the function?
How about "Tail" instead?
There was a problem hiding this comment.
I think this would be better as:
return (bbPrev != nullptr) && bbPrev->isBBCallAlwaysPair();
There are other places that could use this, e.g. in optAddCopies:
#if defined(FEATURE_EH_FUNCLETS)
// With funclets, this is only used for BBJ_CALLFINALLY/BBJ_ALWAYS pairs. For x86, it is also used
// as the "final step" block for leaving finallys.
assert((block->bbPrev != nullptr) && block->bbPrev->isBBCallAlwaysPair());
#endif // FEATURE_EH_FUNCLETS
and EHSuccessorIterPosition:
BasicBlock* beforeBlock = block->bbPrev;
if (beforeBlock != nullptr && beforeBlock->isBBCallAlwaysPair())
{
m_curTry = nullptr;
}
there are more.
There was a problem hiding this comment.
I'll modify the condition - I think that using this in other places might be better left as a "clean up" PR that also includes the liveness changes.
There was a problem hiding this comment.
You're no longer adding to filterVars for BBJ_EHFILTERRET.
There was a problem hiding this comment.
filterVars is not separately used, and can be combined with exceptVars since they are tested with an || condition.
There was a problem hiding this comment.
You removed this, but the hasEHBoundaryIn() case above doesn't replace it for filter/finally/fault funclets.
There was a problem hiding this comment.
I believe that you had indicated to me that a block with BBF_FUNCLET_BEG set would always have bbCatchTyp != BBCT_NONE, so this was changed to an assert for the hasEHBoundaryIn() case - is there something else I've missed?
There was a problem hiding this comment.
Ah, right, I forgot about the special BBCT values for fault/finally/filter/filter-handler.
|
The liveness changes are nice (if complete), but not necessary to fix the bug that's making the CI pipelines fail. Could they be moved to a separate PR? |
Modify `BasicBlock::hasEHBoundaryIn()` and `BasicBlock::hasEHBoundaryOut()` to reflect what liveness is doing, and change liveness to call those methods, and adjust the register allocator code appropriately. It might make sense to extract the code that's basically the same, except that the register allocator doesn't need the `finallyVars` except as validation in the `DEBUG` case. Fix dotnet#1786
Modify
BasicBlock::hasEHBoundaryIn()andBasicBlock::hasEHBoundaryOut()to reflect what liveness is doing, and change liveness to call those methods, and adjust the register allocator code appropriately.It might make sense to extract the code that's basically the same, except that the register allocator doesn't need the
finallyVarsexcept as validation in theDEBUGcase.Fix #1786