[LLVMdev] Alias Analysis accuracy

Krzysztof Parzyszek kparzysz at codeaurora.org
Fri Sep 21 14:46:10 PDT 2012


On 9/21/2012 4:35 PM, Welson Sun wrote:
> Dear LLVM,
>
> I would like to understand how to improve the LLVM alias analysis
> accuracy. I am currently using llvmgcc 2.9 and llvm 3.0. Here is the C code:
>
> void foo(int a[SIZE], int b[SIZE], int c[SIZE])
> {
>    for(int i=0; i<SIZE; i++)
>      c[i] = a[i] + b[i];
> }

This is equivalent to
void foo(int *a, int *b, int *c)
{
    for(int i=0; i<SIZE; i++)
      c[i] = a[i] + b[i];
}

and so you can call this function with the same array for all parameters.

-K

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list