[llvm] [AArch64] Tune unrolling prefs for more patterns on Apple CPUs (PR #149358)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 11 04:08:16 PDT 2025
================
@@ -4802,16 +4802,17 @@ getAppleRuntimeUnrollPreferences(Loop *L, ScalarEvolution &SE,
// Limit to loops with trip counts that are cheap to expand.
UP.SCEVExpansionBudget = 1;
- // Try to unroll small, single block loops, if they have load/store
- // dependencies, to expose more parallel memory access streams.
+ // Try to unroll small loops, of few-blocks with low budget, if they have
+ // load/store dependencies, to expose more parallel memory access streams,
+ // or if they do little work inside a block (i.e. load -> X -> store pattern).
BasicBlock *Header = L->getHeader();
if (Header == L->getLoopLatch()) {
// Estimate the size of the loop.
- unsigned Size;
- if (!isLoopSizeWithinBudget(L, TTI, 8, &Size))
+ unsigned Size, Width=10;
----------------
fhahn wrote:
```suggestion
unsigned Size;
unsigned Width =10;
```
LLVM style generally avoids declaring multiple variables in the same line.
https://github.com/llvm/llvm-project/pull/149358
More information about the llvm-commits
mailing list