[LLVMdev] Accessing Loop Variables

Prasenjit Chakraborty cprasenj at in.ibm.com
Mon Oct 12 03:46:27 PDT 2009


Hi,
      How do I access the loop variables in a loop.

for(i = 0; i < N; i++)
      for(j = 0; j < M; j++)
            A[i][j+k] = i + j;

Is there anyway for me to know that in A[i][j+k], i & j are loop variables
whereas k is not!

Regards,

Prasenjit Chakraborty
Performance Modeling and Analysis
IBM Systems & Technology Lab




More information about the llvm-dev mailing list