This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ inlining (request for better optimization).
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: C++ inlining (request for better optimization).
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr>
- Date: Sat, 29 Nov 1997 09:54:33 +0100 (MET)
- Cc: osv at Javad dot RU (Sergei Organov), egcs at cygnus dot com
- References: <347D98EB.6187E5EA@javad.ru><347EB778.61ECD34D.cygnus.egcs@javad.ru><u9vhxcd1y0.fsf@yorick.cygnus.com>
>>>>> «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