Skip to content
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

JIT: Delete old GenTreeCall ABI information #112665

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

jakobbotsch
Copy link
Member

All uses of this should be gone now, so we can get rid of it.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 18, 2025
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Comment on lines 1527 to -1576
if (setupArg->OperIsCopyBlkOp())
{
setupArg = comp->fgMorphCopyBlock(setupArg);
#if defined(TARGET_ARMARCH) || defined(UNIX_AMD64_ABI) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
if ((lclVarType == TYP_STRUCT) && (arg.AbiInfo.ArgType != TYP_STRUCT))
{
scalarType = arg.AbiInfo.ArgType;
}
#endif // TARGET_ARMARCH || defined (UNIX_AMD64_ABI) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
}

// scalarType can be set to a wider type for ARM or unix amd64 architectures: (3 => 4) or (5,6,7 =>
// 8)
if ((scalarType != TYP_UNKNOWN) && (scalarType != lclVarType))
{
// Create a GT_LCL_FLD using the wider type to go to the late argument list
defArg = comp->gtNewLclFldNode(tmpVarNum, scalarType, 0);

comp->lvaSetVarDoNotEnregister(tmpVarNum DEBUGARG(DoNotEnregisterReason::LocalField));
}
else
{
// Create a copy of the temp to go to the late argument list
defArg = comp->gtNewLclvNode(tmpVarNum, lclVarType);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the cause of the few diffs. It means we have IR diffs like

-               [000154] -----+----- arg20 in out+80            ├──▌  LCL_FLD   ubyte  V37 tmp16        [+0]
+               [000154] -----+----- arg20 out+80               ├──▌  LCL_VAR   struct<ABIStress.S1P, 1> V37 tmp16        

here, and the armarch backend seems to prefer an 8 byte load for this case over the 1 byte load (would probably be best to stick to the 1 byte load to avoid potential forwarding stalls, but that's something for another time)

Copy link
Member

Choose a reason for hiding this comment

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

Do you mean gcinfo diffs? because it seems like your diffs are zero sized

Copy link
Member Author

Choose a reason for hiding this comment

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

I meant diffs like this one:
image

@jakobbotsch jakobbotsch marked this pull request as ready for review February 19, 2025 19:35
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @EgorBo

Very minor diffs. Left a review comment on the code responsible for that. Otherwise just some TP improvements from no longer having to save the old ABI information.

@jakobbotsch jakobbotsch requested a review from EgorBo February 19, 2025 19:37
Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

Nice tp gains!

@jakobbotsch jakobbotsch merged commit 482e5b1 into dotnet:main Feb 20, 2025
115 checks passed
@jakobbotsch jakobbotsch deleted the calls-remove-old-abi-info branch February 20, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants