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 parameter ABI classification #112884

Merged

Conversation

jakobbotsch
Copy link
Member

This is now fully replaced by new ABI classifiers.

@jakobbotsch jakobbotsch marked this pull request as ready for review February 25, 2025 22:25
@Copilot Copilot bot review requested due to automatic review settings February 25, 2025 22:25

Choose a reason for hiding this comment

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

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Comment on lines +682 to +684
ABIPassingInformation abiInfo = m_classifier.Classify(comp, TYP_I_IMPL, nullptr, WellKnownArg::None);
assert(abiInfo.NumSegments == 1);
return ABIPassingInformation::FromSegment(comp, /* passedByRef */ true, abiInfo.Segment(0));
Copy link
Member Author

@jakobbotsch jakobbotsch Feb 25, 2025

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. This was wrong before and a few places (like promotions MapsToParameterRegister) were not considering some parameters to be implicit byrefs because of it.

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @EgorBo

Diffs. A few diffs in Swift reverse pinvokes -- I pointed out why above.

@jakobbotsch jakobbotsch requested a review from EgorBo February 25, 2025 22:54
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!

@EgorBo
Copy link
Member

EgorBo commented Feb 26, 2025

I'm just curious - would it be a lot of work to describe varargs for non-windows using this ABI classification?

@jakobbotsch
Copy link
Member Author

I'm just curious - would it be a lot of work to describe varargs for non-windows using this ABI classification?

For reverse pinvoke I don't think anything has changed -- you need to do the classification at runtime. Although that classifier should already exist in the VM, so I'm not sure why that would be difficult. Perhaps the classifier does not exist for NAOT.

For normal pinvoke it doesn't seem like it would be particularly difficult to support varargs calling convention in the few places where it differs from the standard calling convention. I think there is still a question of how varargs should be represented in signatures though (#48796).

IOW, I don't think fixing #10478 would be all that difficult, but there is a question of usability without fixing #48796 as well.

@jakobbotsch jakobbotsch merged commit 58209bb into dotnet:main Feb 26, 2025
109 of 112 checks passed
@jakobbotsch jakobbotsch deleted the remove-old-parameter-abi-classification branch February 26, 2025 13:36
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