[llvm-dev] Regarding Dependence distance dump
Venkataramanan Kumar via llvm-dev
llvm-dev at lists.llvm.org
Tue Sep 18 06:30:19 PDT 2018
Hi,
For the below test case, I need the dependence distance between the array
references "a[j][i]" and "a[j-1][i-2]".
--Snip--
int a[5][5];
int b[10];
void test()
{
for (int j=1;j<5;j++)
for (int i=2;i<5;i++)
{
a[j][i] = 3.0;
b[i]= a[j-1][i-2] ;
}
}
--Snip-
Compile steps
clang -O1 -emit-llvm -S test.c
opt -analyze -da dist.ll
I tried dumping the dependence information with LLVM trunk (2018_09_17), it
shows:
Printing analysis 'Dependence Analysis' for function 'test':
da analyze - none!
da analyze - flow [< <>]! <== dumps direction vector
da analyze - none!
da analyze - none!
da analyze - none!
da analyze - consistent output [S 0]!
LLVM Release 6.0.1 dumps the expected distance.
Printing analysis 'Dependence Analysis' for function 'test':
da analyze - none!
da analyze - consistent flow [1 2]!
da analyze - none!
da analyze - none!
da analyze - none!
da analyze - consistent output [S 0]!
In trunk, it is now showing directions instead of distances.
How to get the dependence distance?
regards,
Venkat.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180918/8ec02f89/attachment.html>
More information about the llvm-dev
mailing list