[llvm] [ARM] Specify inlining behavior in TableGen (PR #205763)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 06:30:43 PDT 2026
================
@@ -489,274 +565,324 @@ def FeatureNoNegativeImmediates
"Convert immediates and instructions "
"to their negated or complemented "
"equivalent when the immediate does "
- "not fit in the encoding.">;
+ "not fit in the encoding.",
+ [], InlineDefault>;
// Use the MachineScheduler for instruction scheduling for the subtarget.
def FeatureUseMISched: SubtargetFeature<"use-misched", "UseMISched", "true",
- "Use the MachineScheduler">;
+ "Use the MachineScheduler",
+ [], InlineDefault>;
// Use the MachinePipeliner for instruction scheduling for the subtarget.
def FeatureUseMIPipeliner: SubtargetFeature<"use-mipipeliner", "UseMIPipeliner", "true",
- "Use the MachinePipeliner">;
+ "Use the MachinePipeliner",
+ [], InlineDefault>;
// False if scheduling should happen again after register allocation.
def FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler",
"DisablePostRAScheduler", "true",
- "Don't schedule again after register allocation">;
+ "Don't schedule again after register allocation",
+ [], InlineDefault>;
// Armv8.5-A extensions
// Has speculation barrier.
def FeatureSB : SubtargetFeature<"sb", "HasSB", "true",
- "Enable v8.5a Speculation Barrier" >;
+ "Enable v8.5a Speculation Barrier",
+ [], InlineDefault>;
// Armv8.6-A extensions
// True if subtarget supports BFloat16 floating point operations.
def FeatureBF16 : SubtargetFeature<"bf16", "HasBF16", "true",
- "Enable support for BFloat16 instructions", [FeatureNEON]>;
+ "Enable support for BFloat16 instructions",
+ [FeatureNEON], InlineDefault>;
// True if subtarget supports 8-bit integer matrix multiply.
def FeatureMatMulInt8 : SubtargetFeature<"i8mm", "HasMatMulInt8",
- "true", "Enable Matrix Multiply Int8 Extension", [FeatureNEON]>;
+ "true", "Enable Matrix Multiply Int8 Extension",
+ [FeatureNEON], InlineDefault>;
// Armv8.1-M extensions
// True if the processor supports the Low Overhead Branch extension.
def FeatureLOB : SubtargetFeature<"lob", "HasLOB", "true",
"Enable Low Overhead Branch "
- "extensions">;
+ "extensions",
+ [], InlineDefault>;
// Mitigate against the cve-2021-35465 security vulnurability.
+// TODO: Does this need to be InlineMustMatch?
def FeatureFixCMSE_CVE_2021_35465 : SubtargetFeature<"fix-cmse-cve-2021-35465",
"FixCMSE_CVE_2021_35465", "true",
"Mitigate against the cve-2021-35465 "
- "security vulnurability">;
+ "security vulnurability",
+ [], InlineMustMatch>;
+// TODO: Does this need to be InlineMustMatch?
def FeaturePACBTI : SubtargetFeature<"pacbti", "HasPACBTI", "true",
"Enable Pointer Authentication and Branch "
- "Target Identification">;
+ "Target Identification",
+ [], InlineMustMatch>;
/// Don't place a BTI instruction after return-twice constructs (setjmp).
+// TODO: Does this need to be InlineMustMatch?
def FeatureNoBTIAtReturnTwice : SubtargetFeature<"no-bti-at-return-twice",
"NoBTIAtReturnTwice", "true",
"Don't place a BTI instruction "
- "after a return-twice">;
+ "after a return-twice",
+ [], InlineMustMatch>;
// Armv8.9-A/Armv9.4-A 2022 Architecture Extensions
+// TODO: Does this need to be InlineMustMatch?
def FeatureCLRBHB : SubtargetFeature<"clrbhb", "HasCLRBHB", "true",
- "Enable Clear BHB instruction">;
+ "Enable Clear BHB instruction",
+ [], InlineMustMatch>;
+// TODO: Does this need to be InlineMustMatch?
def FeatureFixCortexA57AES1742098 : SubtargetFeature<"fix-cortex-a57-aes-1742098",
"FixCortexA57AES1742098", "true",
- "Work around Cortex-A57 Erratum 1742098 / Cortex-A72 Erratum 1655431 (AES)">;
+ "Work around Cortex-A57 Erratum 1742098 / Cortex-A72 Erratum 1655431 (AES)",
+ [], InlineMustMatch>;
// If frame pointers are in use, they must follow the AAPCS definition, which
// always uses R11 as the frame pointer. If this is not set, we can use R7 as
// the frame pointer for Thumb1-only code, which is more efficient, but less
// compatible. Note that this feature does not control whether frame pointers
// are emitted, that is controlled by the "frame-pointer" function attribute.
+// TODO: Does this need to be InlineMustMatch?
def FeatureAAPCSFrameChain : SubtargetFeature<"aapcs-frame-chain",
"CreateAAPCSFrameChain", "true",
- "Create an AAPCS compliant frame chain">;
+ "Create an AAPCS compliant frame chain",
+ [], InlineMustMatch>;
// Assume that lock-free 32-bit atomics are available, even if the target
// and operating system combination would not usually provide them. The user
// is responsible for providing any necessary __sync implementations. Code
// built with this feature is not ABI-compatible with code built without this
// feature, if atomic variables are exposed across the ABI boundary.
+// TODO: Does this need to be InlineMustMatch?
def FeatureAtomics32 : SubtargetFeature<
"atomics-32", "HasForced32BitAtomics", "true",
- "Assume that lock-free 32-bit atomics are available">;
+ "Assume that lock-free 32-bit atomics are available",
+ [], InlineMustMatch>;
//===----------------------------------------------------------------------===//
// ARM architecture class
//
// A-series ISA
def FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass",
- "Is application profile ('A' series)">;
+ "Is application profile ('A' series)",
+ [], InlineDefault>;
// R-series ISA
def FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass",
- "Is realtime profile ('R' series)">;
+ "Is realtime profile ('R' series)",
+ [], InlineDefault>;
// M-series ISA
def FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass",
- "Is microcontroller profile ('M' series)">;
+ "Is microcontroller profile ('M' series)",
+ [], InlineDefault>;
// True if Thumb2 instructions are supported.
def FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true",
- "Enable Thumb2 instructions">;
+ "Enable Thumb2 instructions",
+ [], InlineDefault>;
// True if subtarget does not support ARM mode execution.
def FeatureNoARM : SubtargetFeature<"noarm", "NoARM", "true",
- "Does not support ARM mode execution">;
+ "Does not support ARM mode execution",
+ [], InlineMustMatch>;
//===----------------------------------------------------------------------===//
// ARM ISAa.
//
// Specify whether target support specific ARM ISA variants.
+// TODO: Does this need to be InlineMustMatch?
def HasV4TOps : SubtargetFeature<"v4t", "HasV4TOps", "true",
- "Support ARM v4T instructions">;
+ "Support ARM v4T instructions",
+ [], InlineMustMatch>;
def HasV5TOps : SubtargetFeature<"v5t", "HasV5TOps", "true",
"Support ARM v5T instructions",
- [HasV4TOps]>;
+ [HasV4TOps], InlineDefault>;
def HasV5TEOps : SubtargetFeature<"v5te", "HasV5TEOps", "true",
"Support ARM v5TE, v5TEj, and "
"v5TExp instructions",
- [HasV5TOps]>;
+ [HasV5TOps], InlineDefault>;
def HasV6Ops : SubtargetFeature<"v6", "HasV6Ops", "true",
"Support ARM v6 instructions",
- [HasV5TEOps]>;
+ [HasV5TEOps], InlineDefault>;
def HasV6MOps : SubtargetFeature<"v6m", "HasV6MOps", "true",
"Support ARM v6M instructions",
- [HasV6Ops]>;
+ [HasV6Ops], InlineDefault>;
def HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true",
"Support ARM v8M Baseline instructions",
- [HasV6MOps]>;
+ [HasV6MOps], InlineDefault>;
def HasV6KOps : SubtargetFeature<"v6k", "HasV6KOps", "true",
"Support ARM v6k instructions",
- [HasV6Ops]>;
+ [HasV6Ops], InlineDefault>;
def HasV6T2Ops : SubtargetFeature<"v6t2", "HasV6T2Ops", "true",
"Support ARM v6t2 instructions",
- [HasV8MBaselineOps, HasV6KOps, FeatureThumb2]>;
+ [HasV8MBaselineOps, HasV6KOps, FeatureThumb2],
+ InlineDefault>;
def HasV7Ops : SubtargetFeature<"v7", "HasV7Ops", "true",
"Support ARM v7 instructions",
- [HasV6T2Ops, FeatureV7Clrex]>;
+ [HasV6T2Ops, FeatureV7Clrex],
+ InlineDefault>;
def HasV8MMainlineOps :
SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true",
"Support ARM v8M Mainline instructions",
- [HasV7Ops]>;
+ [HasV7Ops], InlineDefault>;
def HasV8Ops : SubtargetFeature<"v8", "HasV8Ops", "true",
"Support ARM v8 instructions",
- [HasV7Ops, FeaturePerfMon, FeatureAcquireRelease]>;
+ [HasV7Ops, FeaturePerfMon, FeatureAcquireRelease],
+ InlineDefault>;
def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true",
"Support ARM v8.1a instructions",
- [HasV8Ops]>;
+ [HasV8Ops], InlineDefault>;
def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true",
"Support ARM v8.2a instructions",
- [HasV8_1aOps]>;
+ [HasV8_1aOps], InlineDefault>;
def HasV8_3aOps : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true",
"Support ARM v8.3a instructions",
- [HasV8_2aOps]>;
+ [HasV8_2aOps], InlineDefault>;
def HasV8_4aOps : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true",
"Support ARM v8.4a instructions",
- [HasV8_3aOps, FeatureDotProd]>;
+ [HasV8_3aOps, FeatureDotProd],
+ InlineDefault>;
def HasV8_5aOps : SubtargetFeature<"v8.5a", "HasV8_5aOps", "true",
"Support ARM v8.5a instructions",
- [HasV8_4aOps, FeatureSB]>;
+ [HasV8_4aOps, FeatureSB],
+ InlineDefault>;
def HasV8_6aOps : SubtargetFeature<"v8.6a", "HasV8_6aOps", "true",
"Support ARM v8.6a instructions",
[HasV8_5aOps, FeatureBF16,
- FeatureMatMulInt8]>;
+ FeatureMatMulInt8],
+ InlineDefault>;
def HasV8_7aOps : SubtargetFeature<"v8.7a", "HasV8_7aOps", "true",
"Support ARM v8.7a instructions",
- [HasV8_6aOps]>;
+ [HasV8_6aOps], InlineDefault>;
def HasV8_8aOps : SubtargetFeature<"v8.8a", "HasV8_8aOps", "true",
"Support ARM v8.8a instructions",
- [HasV8_7aOps]>;
+ [HasV8_7aOps], InlineDefault>;
def HasV8_9aOps : SubtargetFeature<"v8.9a", "HasV8_9aOps", "true",
"Support ARM v8.9a instructions",
- [HasV8_8aOps, FeatureCLRBHB]>;
+ [HasV8_8aOps, FeatureCLRBHB],
+ InlineDefault>;
def HasV9_0aOps : SubtargetFeature<"v9a", "HasV9_0aOps", "true",
"Support ARM v9a instructions",
- [HasV8_5aOps]>;
+ [HasV8_5aOps], InlineDefault>;
def HasV9_1aOps : SubtargetFeature<"v9.1a", "HasV9_1aOps", "true",
"Support ARM v9.1a instructions",
- [HasV8_6aOps, HasV9_0aOps]>;
+ [HasV8_6aOps, HasV9_0aOps],
+ InlineDefault>;
def HasV9_2aOps : SubtargetFeature<"v9.2a", "HasV9_2aOps", "true",
"Support ARM v9.2a instructions",
- [HasV8_7aOps, HasV9_1aOps]>;
+ [HasV8_7aOps, HasV9_1aOps],
+ InlineDefault>;
def HasV9_3aOps : SubtargetFeature<"v9.3a", "HasV9_3aOps", "true",
"Support ARM v9.3a instructions",
- [HasV8_8aOps, HasV9_2aOps]>;
+ [HasV8_8aOps, HasV9_2aOps],
+ InlineDefault>;
def HasV9_4aOps : SubtargetFeature<"v9.4a", "HasV9_4aOps", "true",
"Support ARM v9.4a instructions",
- [HasV8_9aOps, HasV9_3aOps]>;
+ [HasV8_9aOps, HasV9_3aOps],
+ InlineDefault>;
// Armv9.5-A is a v9-only architecture. From v9.5-A onwards there's no mapping
// to an equivalent v8.x version.
def HasV9_5aOps : SubtargetFeature<"v9.5a", "HasV9_5aOps", "true",
"Support ARM v9.5a instructions",
- [HasV9_4aOps]>;
+ [HasV9_4aOps], InlineDefault>;
// Armv9.6-A is a v9-only architecture.
def HasV9_6aOps : SubtargetFeature<"v9.6a", "HasV9_6aOps", "true",
"Support ARM v9.6a instructions",
- [HasV9_5aOps]>;
+ [HasV9_5aOps], InlineDefault>;
// Armv9.7-A is a v9-only architecture.
def HasV9_7aOps : SubtargetFeature<"v9.7a", "HasV9_7aOps", "true",
"Support ARM v9.7a instructions",
- [HasV9_6aOps]>;
+ [HasV9_6aOps], InlineDefault>;
def HasV8_1MMainlineOps : SubtargetFeature<
"v8.1m.main", "HasV8_1MMainlineOps", "true",
"Support ARM v8-1M Mainline instructions",
- [HasV8MMainlineOps]>;
+ [HasV8MMainlineOps], InlineDefault>;
def HasMVEIntegerOps : SubtargetFeature<
"mve", "HasMVEIntegerOps", "true",
"Support M-Class Vector Extension with integer ops",
- [HasV8_1MMainlineOps, FeatureDSP, FeatureFPRegs16, FeatureFPRegs64]>;
+ [HasV8_1MMainlineOps, FeatureDSP, FeatureFPRegs16, FeatureFPRegs64],
+ InlineDefault>;
def HasMVEFloatOps : SubtargetFeature<
"mve.fp", "HasMVEFloatOps", "true",
"Support M-Class Vector Extension with integer and floating ops",
- [HasMVEIntegerOps, FeatureFPARMv8_D16_SP, FeatureFullFP16]>;
+ [HasMVEIntegerOps, FeatureFPARMv8_D16_SP, FeatureFullFP16],
+ InlineDefault>;
+// TODO: Does this need to be InlineMustMatch?
def HasCDEOps : SubtargetFeature<"cde", "HasCDEOps", "true",
"Support CDE instructions",
- [HasV8MMainlineOps]>;
+ [HasV8MMainlineOps], InlineMustMatch>;
+// TODO: Does this need to be InlineMustMatch?
----------------
davemgreen wrote:
MustMatch is probably OK here as they both enable some instructions and disable others.
https://github.com/llvm/llvm-project/pull/205763
More information about the llvm-commits
mailing list