[llvm] [AArch64] Runtime-unroll small load/store loops for Apple Silicon CPUs. (PR #118317)

Jon Roelofs via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 09:10:56 PST 2024


================
@@ -4010,6 +4094,12 @@ void AArch64TTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
       EnableFalkorHWPFUnrollFix)
     getFalkorUnrollingPreferences(L, SE, UP);
 
+  if (ST->getProcFamily() == AArch64Subtarget::AppleA14 ||
+      ST->getProcFamily() == AArch64Subtarget::AppleA15 ||
+      ST->getProcFamily() == AArch64Subtarget::AppleA16 ||
+      ST->getProcFamily() == AArch64Subtarget::AppleM4)
+    getAppleRuntimeUnrollPreferences(L, SE, UP, *this);
----------------
jroelofs wrote:

Mind doing a switch instead? Each time we add one, it'll be a one-line addition, instead of a `-+`, and it's a bit more friendly to having non-upstream ones.

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


More information about the llvm-commits mailing list