[llvm] [AArch64] Merge duplicate extension information. (PR #92319)

Tomas Matheson via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 03:58:58 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
----------------
tmatheson-arm wrote:

The idea behind an `Extension` is that it corresponds directly to a `SubtargetFeature`. That is why the names of  `AEK_XYZ` and `HasXYZ` are programatically tied. They are only overridden in historical cases to avoid having to rename all the `AEK_` occurrences in the codebase. I plan to remove the ability to override it.

Either rename `HasCCPP` to `HasDPB` or rename `AEK_DPB` to `AEK_CCPP`. `AEK_CCPP` is preferred because everything remains consistent through the whole pipeline (`AEK_CCPP` --> `-target-feature +ccpp` --> `HasCCPP`) except for the `-march=+dpb` which is overridden.

Note that we can't rename `-target-feature +ccpp` because it breaks IR and other frontends, and we can't rename `-march=+dpb` because it is a public interface. So there has to be an inconsistency somewhere, and my suggestion keeps all of the internal names the same, leaving only the user-facing name different.

https://github.com/llvm/llvm-project/pull/92319


More information about the llvm-commits mailing list