-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Changes for basic block flags. #37335
Conversation
x64 framework diffs:
|
@dotnet/jit-contrib @AndyAyersMS PTAL |
src/coreclr/src/jit/flowgraph.cpp
Outdated
@@ -23540,7 +23541,7 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo) | |||
|
|||
if (bottomBlock != nullptr) | |||
{ | |||
bottomBlock->bbFlags |= InlineeCompiler->fgLastBB->bbFlags & BBF_SPLIT_GAINED; | |||
bottomBlock->bbFlags |= pInlineInfo->retBB->bbFlags & BBF_SPLIT_GAINED; |
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.
will pInlineInfo->retBB
always be non-null if bottomBlock != nullptr
?
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.
pInlineInfo->retBB
is non-null if pInlineInfo->retExpr
is non null and we have a noway_assert(pInlineInfo->retExpr
)` above.
Fix the code that propagates flags from the basic block of the return expression to the caller's basic block during inlining. We are now properly tracking the basic block of the return expression. Fixes dotnet#36588. Don't mark BBJ_RETURN blocks with BBF_BACKWARD_JUMP since they are executed at most once. The first change had a few diffs because we propagated BBF_BACKWARD_JUMP flag. After analyzing them I realized that we shouldn't mark BBJ_RETURN blocks with BBF_BACKWARD_JUMP in the first place. That resulted in some diffs because we are less aggressive with inlining of calls outside of loops.
I decided to change my fix to update the basic block flags later in |
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.
LGTM
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.
LGTM.
This is a fllow-up to dotnet#37335 and dotnet#37840. When an inline fails we replace `GT_RET_EXPR`with the original `GT_CALL` node. `GT_RET_EXPR`may end up in a basic block other than the original `GT_CALL` so we need to propagate basic block flags. Fixes dotnet#36588.
Fix the code that propagates flags from the basic block of the return
expression to the caller's basic block during inlining. We are now
properly tracking the basic block of the return expression.
Fixes Assertion failed 'false' during 'Early Value Propagation' #36588.
Don't mark
BBJ_RETURN
blocks withBBF_BACKWARD_JUMP
since they areexecuted at most once.
The first change had a few diffs because we propagated
BBF_BACKWARD_JUMP
flag. After analyzing them I realized that we shouldn't mark
BBJ_RETURN
blocks with
BBF_BACKWARD_JUMP
in the first place. That resulted in somediffs because we are less aggressive with inlining of calls outside of
loops.