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]

Re: C++ inlining (request for better optimization).


>>>>> «Jason», Jason Merrill <jason@cygnus.com> écrit :

Jason> The reason it doesn't work like you want it to work is that inlining is
Jason> done at function definition time.  If f() uses g(), g() must be defined
Jason> before f() is defined if it is to be inlined, so that its RTL can be
Jason> inserted into the RTL for f.  It sounds like you expect inlining to be done
Jason> on a level closer to the source code, so that when someone inlines f() they
Jason> encounter the call to g() and go inline that, but it doesn't work that way
Jason> in gcc.  RTL is too low-level for that.

	Anyway, can we hope it'll happen in the future ?

-- Gaby
Gabriel Dos Reis                    | École Normale Supérieure de Cachan
INRIA, Unité de Recherche de        | Centre de Mathématiques et de Leurs
Sophia Antipolis                    |          Applications
Projet SAFIR                        |       Équipe de Géométrie 


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