This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inlining fails on very simple code
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: degger at fhm dot edu
- Cc: schwab at suse dot de, gcc at gcc dot gnu dot org
- Date: 11 Dec 2001 15:13:50 -0200
- Subject: Re: Inlining fails on very simple code
- Organization: GCC Team, Red Hat
- References: <20011210181522.3EEC25596@Nicole.fhm.edu>
On Dec 10, 2001, degger@fhm.edu wrote:
> From my understanding gcc should inline whenever it seems benefitial.
> To tell gcc where the programmer sees the border the above mentioned
> option was introduced however with the knowledge that a static inline
> function is used exactly once there should be no doubt about what might
> be benefitial or not.
The fact that a function is used only once could only be used to
decide whether to inline it if we did a global analysis of the
program. We don't have infrastructure in place for this kind of
analysis, since we often emit code for functions before having seen
the whole program.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me