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: Inlining fails on very simple code


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


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