This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Disallow inlining if static vars in that function contain addresses of that function's labels (PR tree-optimization/29484)
- From: Andi Kleen <andi at firstfloor dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 03 Jan 2008 19:00:21 +0100
- Subject: Re: [PATCH] Disallow inlining if static vars in that function contain addresses of that function's labels (PR tree-optimization/29484)
- References: <4772AA08.3090101@codesourcery.com.suse.lists.egcs-patches> <Pine.LNX.4.64.0712301738380.22710@digraph.polyomino.org.uk.suse.lists.egcs-patches> <4777EFEB.1010609@codesourcery.com.suse.lists.egcs-patches> <20080102090724.GS20451@devserv.devel.redhat.com.suse.lists.egcs-patches> <477BCF49.3060104@codesourcery.com.suse.lists.egcs-patches> <20080102180329.GU20451@devserv.devel.redhat.com.suse.lists.egcs-patches> <477BD3FA.2070904@codesourcery.com.suse.lists.egcs-patches> <DF072A0A-1555-43ED-9069-46ADC9EE582A@apple.com.suse.lists.egcs-patches> <477C07D7.6050904@codesourcery.com.suse.lists.egcs-patches> <A9980865-3DD9-4163-B29D-1272DAC1DD44@apple.com.suse.lists.egcs-patches> <20080102225655.GY20451@devserv.devel.redhat.com.suse.lists.egcs-patches>
Jakub Jelinek <jakub@redhat.com> writes:
> Smalltalk example Paolo mentioned will work just fine, GCC won't
> try to inline that function, and I think we should keep it that way.
FWIW Older versions of the Linux kernel used &&label in an inline to
get the current text address for debugging output purposes. Of course
no requirement that it is unique. While that has changed it would be
good if that still worked. In particular not inlining that function would
probably cause significant code growth.
-Andi