-
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
JIT: Add missing new-style ABI classifiers for LA64 and RISCV64 #100744
Comments
@bartlomiejko I have to get off work early. So can someone in your team help RISCV64 implementation and tests? |
Thanks, I will study these new code. |
I can do that once I'm done with #100080, it's a similar area. |
@jakobbotsch If a sub-word value is passed, shouldn't ABIPassingSegment also contain info whether the unused bits are (sign|zero)-extended (or NaN-boxed) vs. undefined? |
Do you think it would be useful? ARM32 has similar requirements in its ABI, but I don't immediately see where we would end up actually querying this information on Another missing piece right now is information about when structs are passed by reference, but I'm also delaying adding that information until we move the things that actually query this information to the new representation. |
There's a bit of a discrepancy where e.g. an integer primitive is (sign|zero)-extended but for struct { float; int; } the unused integer bits are unspecified. But it could also be inferred by looking at whether the type is a struct or not, so it's more of a convenience than must-have.
Makes sense, thanks. |
@jakobbotsch Or we just add the new-style ABI classifier for LA64 and RV64 first. |
Yes, we will eventually remove the ABI code from There is no need to do the ABI classification at the same time. I looked at throughput when introducing the separation and the impact is minimal. Separating the concerns simplifies the code because we initialize parameters (like this pointer and ret buffer) from multiple places, not just Eventually my goal is to also use this for |
OK, I see. |
RISCV64 classifier was added in #101114 and LA64 classifier was added in #101224, so this issue can be closed. LA64 also switched to the shared version of |
Yes, I'm working on it |
#100138 introduced a new representation for ABI information that I am planning on switching the JIT to use in all places that deal with ABI details. It explicitly represents how all parts of all parameters are passed. #100276 and #100526 introduced classifiers for all of our supported targets: win-x86, win-x64, SysV x64, arm64 and arm32.
#100572 is an example PR that is making use of the new ABI representation to rewrite parameter homing.
Before I can proceed with moving the rest of the JIT to the new representation we need implementations of new-style classifiers for LA64 (cc @shushanhf) and RISCV64 (cc @dotnet/samsung). I would greatly appreciate contributions of implementations of these. Otherwise I can try to base it on what happens in
lvaInitUserArgs
today, but I will not be able to test it.Once implemented, the following code can be enabled to cross check the new style ABI information against the old one stored in
LclVarDsc
:runtime/src/coreclr/jit/lclvars.cpp
Lines 1809 to 1892 in 9b57a26
Eventually the old information will be removed from
LclVarDsc
and the new style information will be the only source-of-truth for the ABI information.The text was updated successfully, but these errors were encountered: