This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: -finline-functions does not affect libstdc++?


Richard Guenther wrote:
> It seems specifying -finline-functions with gcc3.4 does not affect
> libstdc++ declarations!? I figured this out while doing work on
> attribute((leafify)). Is this intentional? At least it hurts performance
> quite a bit!

This is because almost all of libstdc++ is specified in terms of
"external" templates.  For example, ostream and istream all use external
templates, so the compiler does not instantiate them except when building
libstdc++.  Presumably this is a performance optimization of the compiler
itself, rather than of the code.

Link-time inlining/optimization obviously fixes this problem.  :)

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]