[PATCH] improve BasicAA analysis of static globals.

Sam Parker sam.parker at arm.com
Wed May 13 06:35:44 PDT 2015


Hi Hal,

So I modified the pass manager to use GlobalsModRef-AA to achieve the results that I desired, logging the compilation times.
I used the wall clock times from 91 files from EEMBC and calculated the geometric mean times on a cortex-a53 system.
Standard = 0.5477 secs,
With patch = 0.5776 secs,

Is this increase small enough so that the analysis pass could be incorporated into the standard compilation flow?

Cheers,
Sam

-----Original Message-----
From: Hal Finkel [mailto:hfinkel at anl.gov] 
Sent: 11 May 2015 17:51
To: Sam Parker
Cc: Commit Messages and Patches for LLVM; Daniel Berlin
Subject: Re: [PATCH] improve BasicAA analysis of static globals.

----- 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: globalsmodref-aa.patch
Type: application/octet-stream
Size: 982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150513/d25ae7e0/attachment.obj>


More information about the llvm-commits mailing list