[clang] [llvm] [AArch64] Merge duplicate extension information. (PR #92319)
Alexandros Lamprineas via cfe-commits
cfe-commits at lists.llvm.org
Sat May 18 04:27:14 PDT 2024
================
@@ -56,43 +52,64 @@ class Extension<
// The FMV priority
int FMVPriority = _FMVPriority;
+
+ // Indicates if the extension is available on the command line.
+ string IsFMVOnly = _IsFMVOnly;
}
// Some extensions are available for FMV but can not be controlled via the
-// command line. These entries:
-// - are SubtargetFeatures, so they have (unused) FieldNames on the subtarget
-// e.g. HasFMVOnlyFEAT_XYZ
-// - have incorrect (empty) Implies fields, because the code that handles FMV
-// ignores these dependencies and looks only at FMVDependencies.
-// - have no description.
-//
-// In the generated data structures for extensions (ExtensionInfo), AEK_NONE is
-// used to indicate that a feature is FMV only. Therefore ArchExtKindSpelling is
-// manually overridden here.
-class FMVOnlyExtension<string FMVBit, string Name, string Deps, int Priority>
- : Extension<Name, "FMVOnly"#FMVBit, "", [], FMVBit, Deps, Priority> {
- let ArchExtKindSpelling = "AEK_NONE"; // AEK_NONE indicates FMV-only feature
-}
+// command line, neither have a TargetFeatureName. Since they have no effect
+// on their own, their description is left empty. However they can have side
+// effects by implying other Subtarget Features. These extensions are used
+// in FMV for detection purposes.
+
+let MArchName = "dgh" in
+def : Extension<"", "DGH", "", [], "FEAT_DGH", "", 260, "true">;
----------------
labrinea wrote:
Then what makes an Extension with IsFMVOnly=1 different from and FMVOnlyExtesion? I believe this will create more confusion. As I explained we don't want any extension to be of AEK_NONE type, in order to be able to express dependencies.
Do you want to rename the FMVOnlyExtesion class into something else making it differ from Extension only for not having a TargetFeatureName?
https://github.com/llvm/llvm-project/pull/92319
More information about the cfe-commits
mailing list