[LLVMdev] Alias Analysis accuracy

Welson Sun welson.sun at gmail.com
Fri Sep 21 14:49:36 PDT 2012


Yeah. Is there a way to specify noalias between these arguments?

On Fri, Sep 21, 2012 at 2:46 PM, Krzysztof Parzyszek <
kparzysz at codeaurora.org> wrote:

> 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
> ______________________________**_________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>



-- 
Welson

Phone: (408) 418-8385
Email:  welson.sun at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120921/956f5b49/attachment.html>


More information about the llvm-dev mailing list