This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fobey-inline (was Re: gcc and inlining)
- From: dewar at gnat dot com (Robert Dewar)
- To: s dot bosscher at student dot tudelft dot nl, schwab at suse dot de
- Cc: gcc at gcc dot gnu dot org, ralmquist at ssi-corp dot com
- Date: Mon, 17 Mar 2003 09:55:11 -0500 (EST)
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
> Hmm, I tried to make a point that there is no such thing as "smart
> enough", only "smart enough for where it's tuned to be smart". Really,
> I'd love to see really a smart inlining decision algorithm, but in the
> end a compiler will always just be guessing.
Actually for the general case of compilers getting smart enough, there
is a point at which the compiler becomes "smart enough", and that is when
in the most typical case, the compiler can do a better job than the
programmer. At this stage, that criterion is pretty much met for
register allocation, and we don't see people arguing that it is horrible
for the compiler to override the intentions of the preogrammer etc etc.
For the inlining case, it is indeed rather dubious that this criterion
can ever be met. Too much information is required, and too much stuff
has to be analyzed.