[PATCH] improve BasicAA analysis of static globals.

Sam Parker sam.parker at arm.com
Mon May 11 09:43:58 PDT 2015


Hi,

That pass does sound like exactly what I have implemented and does have very similar code. Do you know if it is a default pass with -O3 opts?

Thanks,

-----Original Message-----
From: Daniel Berlin [mailto:dberlin at dberlin.org] 
Sent: 11 May 2015 16:23
To: Sam Parker
Cc: Commit Messages and Patches for LLVM
Subject: Re: [PATCH] improve BasicAA analysis of static globals.

1. Use Phabricator, please ;)

2. This almost certainly belongs in globalsmodref-aa, not in basicaa.

BasicAA is supposed to be stateless.

As written, your code will give wrong answers if i query it, get a result, and then add a user of the static global that makes it escape.

There is deliberately no invalidation interface to BasicAA.

I understand BasicAA is a default and people therefore want to shove everything into it. But BasicAA is slow enough already, and we should be doing the opposite - moving expensive  and cached things out of BasicAA into something that can cache and invalidate, and add it to the defaults.



On Mon, May 11, 2015 at 6:36 AM, Sam Parker <sam.parker at arm.com> wrote:
> Hi,
>
>
>
> I’ve attached a patch for BasicAA to analyze whether a global variable 
> has its address taken or not. This allows basicaa to return noalias 
> for queries where object ‘A’ points to a static global that does not 
> escape and object ‘B’ does not.
>
>
>
> Cheers,
>
> Sam
>
>
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>







More information about the llvm-commits mailing list