[PATCH] improve BasicAA analysis of static globals.

Sam Parker sam.parker at arm.com
Wed May 27 06:44:11 PDT 2015


Hi Hal,

I rewrote the patch as a separate pass along with performance data from LNT http://reviews.llvm.org/D10059

Cheers,
Sam

-----Original Message-----
From: Hal Finkel [mailto:hfinkel at anl.gov] 
Sent: 13 May 2015 14:45
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: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Commit Messages and Patches for LLVM" <llvm-commits at cs.uiuc.edu>, 
> "Daniel Berlin" <dberlin at dberlin.org>
> Sent: Wednesday, May 13, 2015 8:35:44 AM
> Subject: RE: [PATCH] improve BasicAA analysis of static globals.
> 
> 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?

How noisy are those measurements? That's a 5% increase. Can you profile and say what is so expensive about what the pass is doing? Is there any internal caching? What are the performance results? Can you run the LLVM test suite and collect compile-time/performance results from there please? 

 -Hal

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

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







More information about the llvm-commits mailing list