[LLVMdev] Identifying loop variables

陳韋任 chenwj at iis.sinica.edu.tw
Tue Jan 17 05:03:05 PST 2012


On Mon, Jan 16, 2012 at 06:51:34AM -0500, Adarsh HV wrote:
> Hi everyone,
> Are there any functions to identify the initiation,condition and iteration
> part of the loop?
> Example: for(i=0;i<10;i++)
>   {
>     a[i]+=1;
>   }
> I want to know the name of the variable used in the loop(i) , the
> initiation(i=0), condition(i<10) and the iteration(i++) part of the loop.
> Thank you:)

  Perhaps it's easier to use clang to achieve your goal? 

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj




More information about the llvm-dev mailing list