This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Os & inlining functions used only once
- To: Joe Buck <jbuck at racerx dot synopsys dot com>
- Subject: Re: -Os & inlining functions used only once
- From: Alexandre Duret-Lutz <aduret at enst dot fr>
- Date: 17 Apr 2001 19:29:56 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <200104171704.KAA11523@racerx.synopsys.com>
>>> "Joe" == Joe Buck <jbuck@racerx.synopsys.com> writes:
[...]
Joe> The compiler can't possibly tell that a static function is
Joe> used only once until it gets to the end of a compilation
Joe> unit, and compilation units can be arbitrarily large. The
Joe> compiler does not pre-scan the whole file and then go back
Joe> and compile, so it can't do what you are asking for. It
Joe> only deals with one function at a time, and doesn't make
Joe> assumptions about what future functions will do.
Ah, that makes sense. So I'll pre-scan the file myself and mark
those functions 'inline' :)
[...]
Thanks for your quick answer.
--
Alexandre Duret-Lutz