-
Notifications
You must be signed in to change notification settings - Fork 5.2k
JIT: Add separate ABI classifiers for x86/win-x64/SysV-x64/ARM64 #100276
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
Conversation
bool HasRetBuff = false; | ||
}; | ||
|
||
class X86Classifier |
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.
What do you think about having target-specific classifiers in target-specific files (targetXYZ.cpp
, which we already have but don't really use)?
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.
I like that idea. They'll probably have to stay as being defined in abi.h
, but I'll try moving the classification Implementation into those target specific files.
For HVAs the element size can be > 8, but should at most be 8-byte aligned.
cc @dotnet/jit-contrib PTAL @AndyAyersMS No diffs. Some TP regressions, with some MinOpts outliers in the collections that don't have a lot of MinOpts collections. |
…net#100276) While trying to implement struct support for Swift reverse pinvokes I ended up having to factor the ABI classification out of `lvaInitUserArgs` to be able to invoke it multiple times for structs. In the end that led me to do the work to split out the ABI classification into a different classifier for each ABI. ARM32, LA64 and RV64 still need to be split out. We still don't actually use this information for anything, but it's asserted that it is correct. We are going to be using it in the backend for Swift reverse pinvokes, and I expect to move more and more things to use it and get completely rid of the ABI classification within `lvaInitUserArgs` (and in the long run hopefully `CallArgs::AddFinalArgsAndDetermineABIInfo`). Another todo: this classification should be where we determine whether something is passed implicit by reference instead of doing that in `lvaSetStruct`/`getArgTypeForStruct`.
While trying to implement struct support for Swift reverse pinvokes I ended up having to factor the ABI classification out of
lvaInitUserArgs
to be able to invoke it multiple times for structs. In the end that led me to do the work to split out the ABI classification into a different classifier for each ABI.ARM32, LA64 and RV64 still need to be split out.
We still don't actually use this information for anything, but it's asserted that it is correct. We are going to be using it in the backend for Swift reverse pinvokes, and I expect to move more and more things to use it and get completely rid of the ABI classification within
lvaInitUserArgs
(and in the long run hopefullyCallArgs::AddFinalArgsAndDetermineABIInfo
).Another todo: this classification should be where we determine whether something is passed implicit by reference instead of doing that in
lvaSetStruct
/getArgTypeForStruct
.