[LLVMdev] Aliasing Question

Roel Jordans r.jordans at tue.nl
Wed May 30 01:42:11 PDT 2012


The answer to both your questions probably depends on the optimizations 
and other compiler flags you used.

For example, the default version of alias analysis is -no-aa which 
doesn't do anything but return 'may alias'.

Regards,
  Roel

On 29/05/12 20:55, Ryan Taylor wrote:
> I just have two questions regarding the following small piece of code:
>
>        if (var > start*end) {
>           arr[var] = arr[var-1];
>        }
>        else {
>           arr[var] = arr[var+1];
>        }
>
> 1. Why does llvm put the address computation in the branched blocks
> instead of the common dominator?
> 2. Why does the AliasAnalysis return MayAlias instead of MustAlias?
>
> Thanks.



More information about the llvm-dev mailing list