https://bugs.llvm.org/show_bug.cgi?id=39594
Bug ID: 39594
Summary: [LoopInterchange] Support memory access requiring
multiple GEPs
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedb...@nondot.org
Reporter: florian.h...@arm.com
CC: llvm-bugs@lists.llvm.org
Currently LoopInterchange does only support accesses that only require a single
GEP, e.g. because all array dimensions are known statically.
We will interchange
extern unsigned Arr[1024][1024];
unsigned no_deps_interchange(unsigned k) {
unsigned sum = 0;
for (int i = 0; i < 1024; ++i)
for(int j = 0; j < 1024; ++j)
sum += Arr[j][i] + k;
return sum;
}
but we won't interchange
unsigned no_deps_interchange(unsigned **Arr, unsigned k) {
unsigned sum = 0;
for (int i = 0; i < 1024; ++i)
for(int j = 0; j < 1024; ++j)
sum += Arr[j][i] + k;
return sum;
}
because the cost model does not understand the generated address calculations.
By using SCEV for the addresses (like https://reviews.llvm.org/D35210), we can
support the second case as well.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs