[LLVMdev] Aliasing Question

Ryan Taylor ryta1203 at gmail.com
Wed May 30 10:42:28 PDT 2012


Oh, I am talking about the stores (not the loads, obviously), fyi. Also,
I'm curious why this simple code change:

 int temp=0;
 if (var > start*end) {
         //arr[var] = arr[var-1];
         temp = arr[var-1];
      }
      else {
         temp = arr[var+1];
         //arr[var] = arr[var+1];
      }
   arr[var] = temp;

Produces such different results?

On Tue, May 29, 2012 at 11:55 AM, Ryan Taylor <ryta1203 at gmail.com> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120530/e15fbd4c/attachment.html>


More information about the llvm-dev mailing list