[LLVMdev] A very basic doubt about LLVM Alias Analysis

ambika ambika at cse.iitb.ac.in
Mon Feb 15 01:40:25 PST 2010


Hi,

Using this option I do get all the vars as may alias ie

 MayAlias:    i32* %j.0, i32* %k
MayAlias:    i32* %i.0, i32* %k
MayAlias:    i32* %i.0, i32* %j.0

Is there any other analysis which will give them as must aliases.

Actually what I want to do is implement a flow sensitive points-to(not 
alias) analysis and then use that information for some optimizations 
like PRE.
Will that be possible?

Duncan Sands wrote:
> Hi Ambika,
>
>> to compile it to bitcode I give the following command :
>>
>>   llvm-gcc -emit-llvm -c -o s.bc s.c
>>
>> and then I run different alias analysis passes like -anders-aa, 
>> -basicaa using following:
>>
>>   opt -anders-aa -aa-eval -print-all-alias-modref-info  s.bc
>
> alias analysis will work poorly if you don't run any optimizers.
> The alias analysis passes assume that at least some basic optimizations
> have been done.  Try compiling like this:
>
>   llvm-gcc -emit-llvm -c -o s.bc s.c -O1
>
> Ciao,
>
> Duncan.




More information about the llvm-dev mailing list