lto-bootstrap tweeks

Jan Hubicka hubicka@ucw.cz
Mon Jan 10 14:05:00 GMT 2011


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



More information about the Gcc-patches mailing list