-Os & inlining functions used only once
Alexandre Duret-Lutz
aduret@enst.fr
Tue Apr 17 10:30:00 GMT 2001
>>> "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
More information about the Gcc
mailing list