This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] analysis of global statics and removal associated vdefs and vuses
- From: Daniel Jacobowitz <drow at false dot org>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Ken Zadeck <zadeck at naturalbridge dot com>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>,Daniel Berlin <dberlin at dberlin dot org>
- Date: Fri, 27 Aug 2004 12:34:03 -0400
- Subject: Re: [PATCH] analysis of global statics and removal associated vdefs and vuses
- References: <412E5DB5.5050709@naturalbridge.com> <1093624074.23994.64.camel@localhost.localdomain>
On Fri, Aug 27, 2004 at 12:27:54PM -0400, Diego Novillo wrote:
> On Thu, 2004-08-26 at 18:01, Kenneth Zadeck wrote:
>
> > 3) use of the analysis in (2) so that the code in
> > gcc/tree-ssa-operands.c reduces the number of vdefs and vuses that are
> > inserted to account for call clobbering.
> >
> I've started reading the patch. So far I've noticed a slowdown in
> compile time that I wasn't expecting. On cc1-i-files there's a 2% slow
> down and on PR8361 there's about 13% (on x86-64). I've still not
> characterized it. More to follow later.
>
> There is a slight reduction in the number of virtual operands on
> cc1-i-files (2,816 fewer virtual operands or about 0.1%).
>
> As we talked earlier, one of the things that could benefit this analysis
> is the marking of standard library calls that do not clobber any global
> statics. For instance, printf does not call back into the user program,
> so a call to printf can't really clobber any of the variables we are
> interested in.
Printf is a bad example. There are several exceptions to your
statement:
- User-defined printf callbacks. I doubt any standard covers this,
but at least glibc supports it. Other libraries may also.
- The %n specifier clobbers the value pointed to by one of printf's
arguments.
In general, though, it's a nice idea :-)
--
Daniel Jacobowitz