Skip to content

Clear GC info when consuming GT_PUTARG_SPLIT nodes #65432

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

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/coreclr/jit/codegenarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3190,7 +3190,9 @@ void CodeGen::genCall(GenTreeCall* call)
}

#ifdef DEBUG
// Killed registers should no longer contain any GC pointers.
// We should not have GC pointers in killed registers live around the call.
// GC info for arg registers were cleared when consuming arg nodes above
// and LSRA should ensure it for other trashed registers.
regMaskTP killMask = RBM_CALLEE_TRASH;
if (call->IsHelperCall())
{
Expand Down
4 changes: 1 addition & 3 deletions src/coreclr/jit/codegenlinear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,6 @@ void CodeGen::genConsumePutStructArgStk(GenTreePutArgStk* putArgNode,
#if FEATURE_ARG_SPLIT
//------------------------------------------------------------------------
// genConsumeArgRegSplit: Consume register(s) in Call node to set split struct argument.
// Liveness update for the PutArgSplit node is not needed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the method name in the comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but let me do it as part of another change to avoid rerunning CI.

//
// Arguments:
// putArgNode - the PUTARG_STK tree.
Expand All @@ -1822,8 +1821,7 @@ void CodeGen::genConsumeArgSplitStruct(GenTreePutArgSplit* putArgNode)

genUnspillRegIfNeeded(putArgNode);

// Skip updating GC info
// GC info for all argument registers will be cleared in caller
gcInfo.gcMarkRegSetNpt(putArgNode->gtGetRegMask());

genCheckConsumeNode(putArgNode);
}
Expand Down
4 changes: 3 additions & 1 deletion src/coreclr/jit/codegenxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5280,7 +5280,9 @@ void CodeGen::genCall(GenTreeCall* call)
}

#ifdef DEBUG
// Killed registers should no longer contain any GC pointers.
// We should not have GC pointers in killed registers live around the call.
// GC info for arg registers were cleared when consuming arg nodes above
// and LSRA should ensure it for other trashed registers.
regMaskTP killMask = RBM_CALLEE_TRASH;
if (call->IsHelperCall())
{
Expand Down