[llvm] [AArch64] Merge duplicate extension information. (PR #92319)
Alexandros Lamprineas via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 03:19:51 PDT 2024
================
@@ -216,8 +211,10 @@ def FeaturePAN_RWV : SubtargetFeature<
def FeaturePsUAO : SubtargetFeature< "uaops", "HasPsUAO", "true",
"Enable v8.2 UAO PState (FEAT_UAO)">;
-def FeatureCCPP : SubtargetFeature<"ccpp", "HasCCPP",
- "true", "Enable v8.2 data Cache Clean to Point of Persistence (FEAT_DPB)" >;
+let ArchExtKindSpelling = "AEK_DPB", MArchName = "dpb" in
+def FeatureCCPP : Extension<"ccpp", "CCPP",
+ "Enable v8.2 data Cache Clean to Point of Persistence (FEAT_DPB)", [],
+ "FEAT_DPB", "+ccpp", 190>;
----------------
labrinea wrote:
Ok, I'll explain what the background story is. I am planning to remove the `DependentFeatures` from `ExtensionInfo` in TargetParser because it is duplication of information. We already have the field `Implies` for subtarget features and the TargetParser itself has `ExtensionDependency` to describe 1-1 deps, which can then be expanded with ExtensionSet::enable() to a Bitset. The 1-1 deps can also be tablegen-ed like you already did with the rest of `ExtensionInfo`.
Now, in order use this machiney I described above, all the extensions (even those that don't make their way to the command line, or the attribute target) need to have and extension kind other than AEK_NONE. The only way I see working around it is to add a new field in `ExtensionInfo` to indicate whether an entry is command line facing. This is a bad design if the TargetParser is meant for command line facing extensions. Can you think of a better way?
https://github.com/llvm/llvm-project/pull/92319
More information about the llvm-commits
mailing list