https://bugs.llvm.org/show_bug.cgi?id=39207
Bug ID: 39207
Summary: Loop hoisting
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedb...@nondot.org
Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org
Not sure how often this happens in the real world apps but anyway idea is..
int foo(void)
{
double *array = calloc(ARRAY_SIZE, sizeof(double));
double sum = 0;
int i;
for (i = 0; i < N_TIMES; i++) {
// lot of code
// well, this loop does not even depend on "i", hoist it?
for (int j = 0; j < ARRAY_SIZE; j += 8) {
sum += array[j] + array[j+1] + array[j+2] + array[j+3] + array[j+4]
+ array[j+5] + array[j+6] + array[j+7];
}
}
return sum;
}
Let's say we have the big outer loop with many inner loops. Can LLVM check if
these loops really depend on the outer loop and if not, hoist them?
--
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