[PATCH] improve BasicAA analysis of static globals.

Hal Finkel hfinkel at anl.gov
Mon May 11 09:51:23 PDT 2015


----- Original Message -----
> From: "Sam Parker" <sam.parker at arm.com>
> To: "Daniel Berlin" <dberlin at dberlin.org>
> Cc: "Commit Messages and Patches for LLVM" <llvm-commits at cs.uiuc.edu>
> Sent: Monday, May 11, 2015 11:43:58 AM
> Subject: RE: [PATCH] improve BasicAA analysis of static globals.
> 
> 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?

No, it is currently only used for LTO. I would be nice to change that.

 -Hal

> 
> 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
> >
> 
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-commits mailing list