This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
lto-bootstrap tweeks
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Jan 2011 14:39:50 +0100
- Subject: lto-bootstrap tweeks
Hi,
this patch drops -fuse-linker-plugin (that is now default) from
bootstrap-lto.mk config. This allows to build it on non-plugin hosts
that is bit useless code quality wise but might be useful at least for
testing.
The patch also adds -fno-lto to stageprofile. This makes profiledbootstrap
with LTO a lot faster.
FDO makes LTO effective on GCC even in with plugin enabled build (plugins
export all symbols out of the binary leading to effece of -fno-whole-program,
for 4.7 I guess we should start whitelisting symbols we want to export and
build with -fvisibility=hidden).
Profiledbootstrap with LTO now leads to about 10% faster compile times compared
to GCC 4.5, tested on combine.c compilation. Some time ago I compared profiled
lto-bootstrap with plugin disabled with normal compiler build and the
difference was about 14%.
profilebootstrap-ltoed/regtested x86_64-linux, OK?
Honza
* config/bootstrap-lto.mk: -fuse-linker-plugin is default now;
pass -fno-lto to STAGEprofile.
Index: config/bootstrap-lto.mk
===================================================================
--- config/bootstrap-lto.mk (revision 168596)
+++ config/bootstrap-lto.mk (working copy)
@@ -1,5 +1,6 @@
# This option enables LTO for stage2 and stage3. It requires lto to
# be enabled for stage1 with --enable-stage1-languages.
-STAGE2_CFLAGS += -flto=jobserver -fuse-linker-plugin -frandom-seed=1
-STAGE3_CFLAGS += -flto=jobserver -fuse-linker-plugin -frandom-seed=1
+STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1
+STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1
+STAGEprofile_CFLAGS += -fno-lto