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

Paolo Bonzini bonzini@gnu.org
Mon Aug 30 12:18:00 GMT 2004


> However, once we get the aliasing really working, we may find that this 
> is a significant performance problem in real (i.e. non bench marking) 
> code. In real code, significant number of functions have calls to printf 
> and because of this extension a call to any function that calls printf, 
> must clobber every static variable.  Without the extension, the calls to 
> printf (assuming we could properly annotate them,) would not effect the 
> clobber sets at all. 

I wonder, how many application have inner loops that call printf or 
sprintf?!?  And even if there were, I doubt that not clobbering all 
static variables around printf is going to give any real advantage.  So 
this glibc extension is not a problem.

Most examples of functions that are amenable to this optimization *and* 
are used in inner loops, will already be pure; and it is true even 
without taking glibc extensions into account, that callbacks will hinder 
this optimization by not allowing to make the function pure (think bsearch).

Paolo



More information about the Gcc-patches mailing list