[LLVMdev] Identifying loop variables

Duncan Sands baldrick at free.fr
Tue Jan 17 05:36:30 PST 2012


Hi Adarsh,

> 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:)

this is what LLVM's scalar evolution infrastructure is for.

Ciao, Duncan.



More information about the llvm-dev mailing list