[llvm] [polly] [delinearize] Extract array dimensions from alloca and global declarations (PR #156342)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 10:16:12 PDT 2025
================
@@ -759,51 +1073,63 @@ void printDelinearization(raw_ostream &O, Function *F, LoopInfo *LI,
// Do not analyze memory accesses outside loops.
if (!L)
continue;
-
const SCEV *AccessFn = SE->getSCEVAtScope(getPointerOperand(&Inst), L);
- const SCEVUnknown *BasePointer =
- dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFn));
- // Do not delinearize if we cannot find the base pointer.
- if (!BasePointer)
- break;
- AccessFn = SE->getMinusSCEV(AccessFn, BasePointer);
-
O << "\n";
O << "Inst:" << Inst << "\n";
O << "AccessFunction: " << *AccessFn << "\n";
SmallVector<const SCEV *, 3> Subscripts, Sizes;
-
auto IsDelinearizationFailed = [&]() {
- return Subscripts.size() == 0 || Sizes.size() == 0 ||
- Subscripts.size() != Sizes.size();
+ return Subscripts.size() == 0 || Sizes.size() == 0;
----------------
alexey-bataev wrote:
`return Subscripts.empty() || Sizes.empty();`
https://github.com/llvm/llvm-project/pull/156342
More information about the llvm-commits
mailing list