[llvm-bugs] [Bug 26960] New: Seeing different schedule for similar program
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 16 04:53:39 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=26960
Bug ID: 26960
Summary: Seeing different schedule for similar program
Product: Polly
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Optimizer
Assignee: polly-dev at googlegroups.com
Reporter: zinob at codeaurora.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16044
--> https://llvm.org/bugs/attachment.cgi?id=16044&action=edit
testb
I used the command below
opt -polly -polly-opt-isl -O3 -debug -polly-process-unprofitable
-polly-opt-fusion=max -polly-opt-max-coefficient=-1 < testa.ll
opt -polly -polly-opt-isl -O3 -debug -polly-process-unprofitable
-polly-opt-fusion=max -polly-opt-max-coefficient=-1 < testb.ll
testa.ll and testb.ll should have same schedule. I just swapped the trip count
between the adjacent loop. See below schedule:
Q1: Why loop fusion is not happening although I am using max strategy?
!2: Why in one case preheader of second loop is hoisted and other case is not?
testb:
: isl ast :: foo :: entry.split => for.cond.cleanup4
[m, n] -> { : -2147483648 <= m <= 2147483647 and -2147483648 <= n <=
2147483647 }
[m, n] -> { Stmt_for_body5[i0] -> [3, i0] : 0 <= i0 < n; Stmt_for_body_lr_ph[]
-> [1, 0] : m > 0; Stmt_for_body5_lr_ph[] -> [0, 0] : n > 0; Stmt_for_body[i0]
-> [2, i0] : 0 <= i0 < m }
if (1)
{
if (n >= 1)
Stmt_for_body5_lr_ph();
if (m >= 1)
Stmt_for_body_lr_ph();
for (int c0 = 0; c0 < m; c0 += 1)
Stmt_for_body(c0);
for (int c0 = 0; c0 < n; c0 += 1)
Stmt_for_body5(c0);
}
testa
:: isl ast :: foo :: entry.split => for.cond.cleanup4
[n, m] -> { : -2147483648 <= n <= 2147483647 and -2147483648 <= m <=
2147483647 }
[n, m] -> { Stmt_for_body5[i0] -> [3, i0] : 0 <= i0 < m; Stmt_for_body[i0] ->
[1, i0] : 0 <= i0 < n; Stmt_for_body_lr_ph[] -> [0, 0] : n > 0;
Stmt_for_body5_lr_ph[] -> [2, 0] : m > 0 }
if (1)
{
if (n >= 1)
Stmt_for_body_lr_ph();
for (int c0 = 0; c0 < n; c0 += 1)
Stmt_for_body(c0);
if (m >= 1)
Stmt_for_body5_lr_ph();
for (int c0 = 0; c0 < m; c0 += 1)
Stmt_for_body5(c0);
}
--
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/20160316/488d6090/attachment.html>
More information about the llvm-bugs
mailing list