[PATCH] analysis of global statics and removal associated vdefs and vuses

Daniel Jacobowitz drow@false.org
Fri Aug 27 16:52:00 GMT 2004


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



More information about the Gcc-patches mailing list