Repository navigation
[FMV] Add support for more features #469
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3135,6 +3135,14 @@ The following table lists the architectures feature mapping for AArch64. | |
| | `FEAT_SME_F16F16` | sme-f16f16 | ```ID_AA64SMFR0_EL1.F16F16 == 0b1``` | | ||
| | `FEAT_SME_F8F16` | sme-f8f16 | ```ID_AA64SMFR0_EL1.F8F16 == 0b1``` | | ||
| | `FEAT_SME_MOP4` | sme-mop4 | ```ID_AA64SMFR0_EL1.SMOP4 == 0b1``` | | ||
| | `FEAT_LSE2` | lse2 | ```ID_AA64MMFR2_EL1.AT >= 0b0001``` | | ||
| | `FEAT_SVE_B16B16` | sve-b16b16 | ```ID_AA64ZFR0_EL1.B16B16 >= 0b0001```| | ||
| | `FEAT_SME_B16B16` | sme-b16b16 | ```ID_AA64SMFR0_EL1.B16B16 == 0b1``` | | ||
| | `FEAT_LSE128` | lse128 | ```ID_AA64ISAR0_EL1.Atomic >= 0b0011``` | | ||
| | `FEAT_CMPBR` | cmpbr | ```ID_AA64ISAR2_EL1.CSSC >= 0b0010``` | | ||
| | `FEAT_FPRCVT` | fprcvt | ```ID_AA64ISAR3_EL1.FPRCVT >= 0b0001``` | | ||
| | `FEAT_LSFE` | lsfe | ```ID_AA64ISAR3_EL1.LSFE >= 0b0001``` | | ||
| | `FEAT_SME_TMOP` | sme-tmop | ```ID_AA64SMFR0_EL1.STMOP == 0b1``` | | ||
|
|
||
| The tables are sorted by priority, starting from features of lowest priority ending with features of highest priority. | ||
|
|
||
|
|
@@ -3229,6 +3237,14 @@ unless otherwise specified. | |
| | sme-f16f16 | 202690 | | ||
| | sme-f8f16 | 202690 | | ||
| | sme-mop4 | 202690 | | ||
| | lse2 | 202690 | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be safer to bump the version number for these. There's a possibility the previous ones make GCC 17 but these dont (depending on how much time I have).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you re-order this to have all the sme together, followed by sve, then all the lse, and for last the other ones.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this work in the compiler? This feature was not exposed in the LLVM compiler in clang: |
||
| | sve-b16b16 | 202690 | | ||
| | sme-b16b16 | 202690 | | ||
| | lse128 | 202690 | | ||
| | cmpbr | 202690 | | ||
| | fprcvt | 202690 | | ||
| | lsfe | 202690 | | ||
| | sme-tmop | 202690 | | ||
|
|
||
| ### Dependencies | ||
|
|
||
|
|
@@ -3298,6 +3314,11 @@ The following table lists the feature dependencies for AArch64. | |
| | sme-f16f16 | sme2 | | ||
| | sme-f8f16 | sme2, fp8 | | ||
| | sme-mop4 | sme2 | | ||
| | sme-b16b16 | sme2, sve-b16b16 | | ||
| | lse128 | lse | | ||
| | fprcvt | fp | | ||
| | lsfe | fp | | ||
| | sme-tmop | sme2 | | ||
|
|
||
| ### Selection | ||
|
|
||
|
|
||
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 am wondering if we should drop this feature for now. Do you have a use case for it?
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.
Yes this feature is used to allow STP and LDP instructions to be used for 128-bit atomics.
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.
LSE2 is not something modeled in GCC architecture flags so this would only be a dispatch feature for us, there would be no code gen change.
I would probably lean towards not including it as a personal preference.
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.
So how does GCC work for 128-bit atomics ? It never makes use of STP and LDP even if present or is the LSE2 enabled by other flag ?
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.
We talked about it a bit internally and it turns out we use ifuncs in libatomic, so that's a pretty clear argument that we should do this. We need to look into adding a march flag in GCC as well.
My next comment goes doubly so then, I think it is unlikely we will be able to do the work required for lse2 at this point.
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.
Sorry I am not sure I quite understood you comment. It seems like you are suggesting that at some point supporting lse2 codegen will be necessary by GCC ? If that's the case, isn't it the argument for multiversioning this feature so users will be able to make use of that codegen using FMV ? I understand you cannot support it now, but LLVM can and since FMV is versioned you could just advertise older version to users so they don't expect GCC support for these and bump it once you add it. Or am I missing smth ?
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.
Yes sorry I was unclear. That's what I mean. I was incorrect previously and I agree there is a case for LSE2 GCC (and we should add march flags for it)
But as this will be difficult in GCC I would prefer to have the FMV suport integer be incremented for this PR so we can differentiate to users if the previous FMV features make GCC 17 but LSE2 does not.