[Lldb-commits] [lldb] [llvm] [AArch64] move extension information into tablgen (PR #90987)
Tomas Matheson via lldb-commits
lldb-commits at lists.llvm.org
Tue May 7 04:13:13 PDT 2024
================
@@ -11,42 +11,123 @@
// A SubtargetFeature that can be toggled from the command line, and therefore
// has an AEK_* entry in ArmExtKind.
+//
+// If Function MultiVersioning (FMV) properties are left at their defaults
+// (FEAT_INIT, no dependencies, priority 0) it indiates that this extension is
+// not an FMV feature, but can be enabled via the command line (-march, -mcpu,
+// etc).
+//
+// Conversely if the ArchExtKindSpelling is set to AEK_NONE, this indicates
+// that a feature is FMV-only, and can not be selected on the command line.
+// Such extensions should be added via FMVOnlyExtension.
class Extension<
- string TargetFeatureName, // String used for -target-feature.
+ string TargetFeatureName, // String used for -target-feature and -march, unless overridden.
string Spelling, // The XYZ in HasXYZ and AEK_XYZ.
string Desc, // Description.
- list<SubtargetFeature> Implies = [] // List of dependent features.
+ list<SubtargetFeature> Implies = [], // List of dependent features.
+ // FMV properties
+ string _FMVBit = "FEAT_INIT", // FEAT_INIT is repurposed to indicate "not an FMV feature"
+ string _FMVDependencies = "",
+ int _FMVPriority = 0
> : SubtargetFeature<TargetFeatureName, "Has" # Spelling, "true", Desc, Implies>
{
string ArchExtKindSpelling = "AEK_" # Spelling; // ArchExtKind enum name.
+
+ // In general, the name written on the command line should match the name
+ // used for -target-feature. However, there are exceptions. Therefore we
+ // add a separate field for this, to allow overriding it. Strongly prefer
+ // not doing so.
+ string MArchName = TargetFeatureName;
+
+ // Function MultiVersioning (FMV) properties
+
+ // A C++ expression giving the number of the bit in the FMV ABI.
+ // Currently this is given as a value from the enum "CPUFeatures".
+ // If this is not set, it indicates that this is not an FMV extension.
+ string FMVBit = _FMVBit;
+
+ // List of features that this feature depends on.
+ // FIXME generate this from Implies.
----------------
tmatheson-arm wrote:
That would require the FMV dependencies being aligned with the existing `SubtargetFeature` dependencies, which I believe is being considered but is a WIP.
https://github.com/llvm/llvm-project/pull/90987
More information about the lldb-commits
mailing list