Hi,<br><br>You can use the getInductionVariable() on each loop,and maintain a smallvect of all induction variables that you have come across.<br>Also remember to run some passes to hoist loop independent entities out of the loop.<br>
<br>Cheers<br><br>Dhruv<br><br><div class="gmail_quote">On Mon, Oct 12, 2009 at 6:46 AM, Prasenjit Chakraborty <span dir="ltr"><<a href="mailto:cprasenj@in.ibm.com">cprasenj@in.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
How do I access the loop variables in a loop.<br>
<br>
for(i = 0; i < N; i++)<br>
for(j = 0; j < M; j++)<br>
A[i][j+k] = i + j;<br>
<br>
Is there anyway for me to know that in A[i][j+k], i & j are loop variables<br>
whereas k is not!<br>
<br>
Regards,<br>
<br>
Prasenjit Chakraborty<br>
Performance Modeling and Analysis<br>
IBM Systems & Technology Lab<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>School of Electrical and Computer Engineering<br>Georgia Institute of Technology<br><br>(M) +1 770 827 9264<br>Personal Email : <a href="mailto:choudharydhruv@gmail.com">choudharydhruv@gmail.com</a><br>
<br><br>