[PATCH] D122857: [LoopCacheAnlysis] Enable delinearization of fixed sized arrays

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 11:08:54 PDT 2022


Meinersbur added inline comments.


================
Comment at: llvm/include/llvm/Analysis/LoopCacheAnalysis.h:146-147
+
+  /// True if the underlying array is not parametric-sized.
+  bool IsFixedSize = false;
 };
----------------
In principle, each dimension can be dynamic or fixed size separately. For instance using C99 VLAs:
```
void func(int n, double A[][128][n]);
```
has 3 dimensions of which only the middle one is fixed size. However, DependenceInfo may not support them either?


================
Comment at: llvm/lib/Analysis/LoopCacheAnalysis.cpp:345-346
+  Value *SrcBasePtr = SrcGEP->getOperand(0);
+  while (auto *PCast = dyn_cast<BitCastInst>(SrcBasePtr))
+    SrcBasePtr = PCast->getOperand(0);
+
----------------
Did you consider one of `stripPointerCasts`, `stripPointerCastsAndAliases`, `stripPointerCastsSameRepresentation`, `stripPointerCastsForAliasAnalysis`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122857/new/

https://reviews.llvm.org/D122857



More information about the llvm-commits mailing list