Hi,<div>I am trying to implement my own Loop fission transformations in llvm.</div><div>But to find circular dependency, i think i have to use <span style="color:rgb(128,0,0);background-color:rgb(255,255,255);text-align:-webkit-left">LoopDependenceAnalysis.</span></div>
<div><span style="color:rgb(128,0,0);background-color:rgb(255,255,255);text-align:-webkit-left">I am using ModulePass.</span></div><div><span style="color:rgb(128,0,0);background-color:rgb(255,255,255);text-align:-webkit-left">In this pass I am getting LoopInfo and Loops. but when I try to use LoopDependenceAnalysis </span></div>
<div><span style="color:rgb(128,0,0);background-color:rgb(255,255,255);text-align:-webkit-left">It throws segmentation fault.</span></div><div><span style="color:rgb(128,0,0);background-color:rgb(255,255,255);text-align:-webkit-left">the example shows what i want to do : </span></div>
<div><pre style="text-align:-webkit-left;background-color:rgb(255,255,255)">        for(int i = 0; i< n ; i++){
s1 :                 a[i] = a[i] + x[i];
s2 :                 x[i] = x[i+1] + i*2 ;
        }
<br></pre><pre style="text-align:-webkit-left;background-color:rgb(255,255,255)">/*I have to find here that from s2 to s1 there is no dependency </pre><pre style="text-align:-webkit-left;background-color:rgb(255,255,255)">
* but there is dependency from s1 to s2</pre><pre style="text-align:-webkit-left;background-color:rgb(255,255,255)">* I wont consider the RAR dependency</pre><pre style="text-align:-webkit-left;background-color:rgb(255,255,255)">
*/
<br></pre><pre style="text-align:-webkit-left;background-color:rgb(255,255,255)">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 ;</pre></div><div><br></div><div>I think there is a function isDependendent() in LoopDependencyAnalysis. </div><div><br></div><div><br></div><div>thank you,</div><div>shanmuk</div>