This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [texi, LTO]: Mention that -flto and -fwhole-program can be used simultaneously
- From: Toon Moene <toon at moene dot org>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 05 Oct 2009 19:19:55 +0200
- Subject: Re: [texi, LTO]: Mention that -flto and -fwhole-program can be used simultaneously
- References: <20091005162613.GA29241@net-b.de>
Tobias Burnus wrote:
I had the impression that it is not obvious that -fwhole-program can be
applied simultaneously -- and that one may think that -flto already
does the -fwhole-program optimizations as it sees the whole program
(which is not the case).
It certainly was not obvious to me, but after reading the documentation
about -fwhole-program that was there, it occurred to me that, at link
time, link-time-optimization *does* see the whole program, so
-fwhole-program could just as well be implied when "linking" (err,
calling collect2).
The tricky term in the docs is the "current compilation unit", which is
definitely pre-lto.
--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html