thank you all for ur replies..<div><br><div>I looked at the sanjoys patch for SIV Test. And i figured out that this is exactly what i need.</div><div>as the comments said, check if subscript A can possibly have the same value as B in <i>analyseSIV(A,B)</i><br>
but i didn't get How to use this information ?</div><div><br></div><div>lets just say in the above program</div><div>When i use <i>depends</i> function it shows the dependency from load of x to store in x. similarily for array a.</div>
<div>but how can i be sure that there is no dependence from store of x to load of x in the next iteration ?</div><div><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 11:28 AM, shanmuk rao <span dir="ltr"><<a href="mailto:shanmuk.rao008@gmail.com">shanmuk.rao008@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br clear="all"><div>I am using LLVM for implementing LoopFission pass.</div><div>I am using LoopPass.</div><div>I know that for checking circular dependency in loop I have to use LoopDependenceAnalysis</div>
<div><span style="text-align:-webkit-left"><br>
</span></div><div><span style="text-align:-webkit-left">This is what i want to do.</span></div><div style="text-align:-webkit-left"><span style>        for(int i = 0; i< n ; i++){</span><br>
</div><div><pre style="text-align:-webkit-left">s1 :                 a[i] = a[i] + x[i];
s2 :                 x[i] = x[i+1] + i*2 ;
        }

/**there is no dependence from s2 to s1/
so after distribution(it should be) :

        for(int i = 0; i< n ; i++)
s1:                a[i] = a[i] + x[i];

        for(int i = 0; i< n ; i++)
s2:                x[i] = x[i+1] + i*2 ;


but in llvm i couldn't able to find there is no dependency from s2 to s1.</pre><pre style="text-align:-webkit-left">LoopDependenceAnalyis always gives there is a dependency from every load instructions to every store instructions.</pre>

</div><br>is there any other alternative to LoopDependencyAnalysis ?<div>thank you<br><div><br>......<br>Regards,<br>Shanmukha Rao<br>Compilers lab,<br>Indian Institute of Science, Bangalore.<br>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br><br>......<br>Regards,<br>Shanmukha Rao<br>Compilers lab,<br>Indian Institute of Science, Bangalore.<br><br><br>
</div></div>