[llvm] [AArch64] Disconnect FeatureUseScalarIncVL from FeatureSVE2. (PR #114568)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 07:57:14 PST 2024


================
@@ -575,6 +579,14 @@ void AArch64Subtarget::mirFileLoaded(MachineFunction &MF) const {
 
 bool AArch64Subtarget::useAA() const { return UseAA; }
 
+bool AArch64Subtarget::useScalarIncVL() const {
+  // If SVE2 or SME is present (we are not SVE-1 only) and UseScalarIncVL
+  // is not otherwise set, enable it by default.
+  if (UseScalarIncVL.getNumOccurrences())
+    return UseScalarIncVL;
----------------
sdesmalen-arm wrote:

I'd still recommend creating a separate variable for it in the Subtarget that gets initialised with the code you have here. That way a CPU could possibly override it in `AArch64Subtarget::initializeProperties` (if there is ever a need for that) and then the call to `useScalarIncVL()` can be inlined rather than ending up as a call. But this is just me nitpicking a bit :)

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


More information about the llvm-commits mailing list