<div dir="ltr"><div dir="ltr"><div>Hi, </div><div><br></div><div>For the below test case, I need the dependence distance between the array references  "a[j][i]"  and "a[j-1][i-2]".</div><div><br></div><div>--Snip--</div><div>int a[5][5];</div><div>int b[10];</div><div><br></div><div>void test()</div><div>{</div><div>        for (int j=1;j<5;j++)</div><div>                for (int i=2;i<5;i++)</div><div>                {</div><div>                        a[j][i] = 3.0;</div><div>                        b[i]= a[j-1][i-2] ;</div><div>                }</div><div>}</div><div>--Snip-</div><div><br></div><div>Compile steps </div><div>clang -O1 -emit-llvm -S test.c</div><div>opt  -analyze -da dist.ll</div><div><br></div><div>I tried dumping the dependence information with LLVM trunk (2018_09_17), it shows: </div><div><br></div><div>Printing analysis 'Dependence Analysis' for function 'test':<br></div><div>da analyze - none!</div><div>da analyze - flow [< <>]! <== dumps direction vector</div><div>da analyze - none!</div><div>da analyze - none!</div><div>da analyze - none!</div><div>da analyze - consistent output [S 0]!</div><div><br></div><div>LLVM Release 6.0.1 dumps the expected distance. </div><div>Printing analysis 'Dependence Analysis' for function 'test':</div><div>da analyze - none!</div><div>da analyze - consistent flow [1 2]!</div><div>da analyze - none!</div><div>da analyze - none!</div><div>da analyze - none! </div><div>da analyze - consistent output [S 0]!</div><div><br></div><div>In trunk, it is now showing directions instead of distances. </div><div>How to get the dependence distance?</div><div><br></div><div>regards,</div><div>Venkat.</div></div></div>