[llvm-bugs] [Bug 28871] New: Scalar dependence on induction variable when lower bound is not synthesizable
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Aug 5 08:35:35 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28871
Bug ID: 28871
Summary: Scalar dependence on induction variable when lower
bound is not synthesizable
Product: Polly
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Optimizer
Assignee: polly-dev at googlegroups.com
Reporter: llvm at meinersbur.de
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
This inner loops is not detected as parallel (-mllvm
-polly-process-unprofitable -mllvm -polly-parallel):
for (int j = 1; j <= lastrow - firstrow + 1; j++) {
int e = rowstr[j + 1];
int b = rowstr[j];
for (int k = b; k < e; k++) {
colidx[k] = colidx[k] - firstcol + 1;
}
}
AST output:
Stmt_for_body();
if (p_1_loaded_from_rowstr >= p_0_loaded_from_rowstr + 1)
Stmt_for_body7_lr_ph();
#pragma minimal dependence distance: 1
for (int c0 = 0; c0 < -p_0_loaded_from_rowstr + p_1_loaded_from_rowstr;
c0 += 1)
Stmt_for_body7(c0);
Whereas this one is:
for (int j = 1; j <= lastrow - firstrow + 1; j++) {
int e = rowstr[j + 1];
int b = rowstr[j];
for (int k = 0; k < e-b; k++)
{
colidx[k+b] = colidx[k+b] - firstcol + 1;
}
}
AST output:
Stmt_for_body();
if (p_1_loaded_from_rowstr >= p_0_loaded_from_rowstr + 1)
Stmt_for_body8_lr_ph();
#pragma simd
#pragma known-parallel
for (int c0 = 0; c0 < -p_0_loaded_from_rowstr + p_1_loaded_from_rowstr;
c0 += 1)
Stmt_for_body8(c0);
This is cause by the lower bound ('b') appearing in the lower bound of the SCEV
for the induction variable. It is not considered synthesizable albeit
load-hoisted. Thus causing scalar dependences created for its PHINode.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160805/340198fe/attachment-0001.html>
More information about the llvm-bugs
mailing list