[PATCH][C][C++] Fix GNU extern inline heuristic again (fix C++ memory usage regression)

Richard Guenther rguenther@suse.de
Mon Aug 27 14:41:00 GMT 2007


On Mon, 27 Aug 2007, Joseph S. Myers wrote:

> On Mon, 27 Aug 2007, Richard Guenther wrote:
> 
> > This fixes the memory usage regression with C++ I was seeing.  It does so
> > by moving the decision on whether to disregard inline limits to the
> > frontend(s) and storing this knowledge in the function decl.
> > 
> > Bootstrapped and tested on x86_64-unknown-linux-gnu, the ~25% compile-time
> > regression on some C++ testcases is gone.
> > 
> > Ok for mainline?
> 
> The C front-end changes are OK.

I just noticed there is equivalent C++ stuff.

Are the C++ parts ok as well?

Thanks,
Richard.

        cp/
        * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.

Index: cp/decl.c
===================================================================
*** cp/decl.c	(revision 127827)
--- cp/decl.c	(working copy)
*************** duplicate_decls (tree newdecl, tree oldd
*** 1896,1901 ****
--- 1896,1906 ----
  
  	  DECL_UNINLINABLE (newdecl) = DECL_UNINLINABLE (olddecl)
  	    = (DECL_UNINLINABLE (newdecl) || DECL_UNINLINABLE (olddecl));
+ 
+ 	  DECL_DISREGARD_INLINE_LIMITS (newdecl)
+ 	    = DECL_DISREGARD_INLINE_LIMITS (olddecl)
+ 	    = (DECL_DISREGARD_INLINE_LIMITS (newdecl)
+ 	       || DECL_DISREGARD_INLINE_LIMITS (olddecl));
  	}
  
        /* Preserve abstractness on cloned [cd]tors.  */



More information about the Gcc-patches mailing list