gcc/gcc/c
Andi Kleen 277d7ee0c9 Add make autoprofiledbootstrap
Add support for profiledbootstrap with autofdo. Will be useful
to get better testing coverage of autofdo.

This requires Linux perf and autofdo to be installed, only
really for x86_64 linux on Intel so far.

Profile the whole build process with perf, then convert the file,
and pass it back to the compiler in the feedback stage.

The conversion has to be done per language, as only that knows
the name of the binary. Currently we only do it for C and C++,
as the other languages don't have enough coverage during a normal
bootstrap.

For lto1 it is also disabled, because it would only be useful during a LTO
bootstrap, but right now autofdo and LTO are not working together due to
PR66229

For common backend files always the profile output of the C++ compiler
is used. In theory multiple inputs could be merged here, but so far
that is not implemented.

The method is not friendly to partial rebuilds, as only the profile
information from the current rebuild is used. So if an error
occurs it is best to clean and restart, otherwise the code
quality may be worse.

This patch is fairly large, but most of it is auto generated from
autogen in Makefile.in. for the new stage targets.

Passes profiledbootstrap and normal bootstrap on x86_64-linux.
autoprofiledbootstrap is currently not working due to
PR70427 (but it finishes with that worked around)

The autofdo'ed compiler is ~7% faster on insn-recog.i (vs ~11% for
profiledfeedback), and ~4% faster for tramp3d-v4 (vs 10% for
profiledfeedback) on a Sandy Bridge system.

gcc/lto/:

2016-06-23  Andi Kleen  <ak@linux.intel.com>

	* Make-lang.in: Add support for autofdo (disabled for now)

gcc/cp/:

2016-06-23  Andi Kleen  <ak@linux.intel.com>

	* Make-lang.in: Add support for autofdo.

gcc/:

2016-06-23  Andi Kleen  <ak@linux.intel.com>

	* Makefile.in: Regenerate.
	* doc/install.texi: Document autoprofiledbootstrap.

/:
2016-06-23  Andi Kleen  <ak@linux.intel.com>

	* Makefile.def: Add autoprofiledbootstrap.
	* Makefile.tpl: Dito.
	* Makefile.in: Regenerate.

gcc/c/:

2016-06-23  Andi Kleen  <ak@linux.intel.com>

	* Make-lang.in: Add support for autofdo.

From-SVN: r237733
2016-06-23 14:34:16 +00:00
..
ChangeLog Add make autoprofiledbootstrap 2016-06-23 14:34:16 +00:00
Make-lang.in Add make autoprofiledbootstrap 2016-06-23 14:34:16 +00:00
c-array-notation.c c-array-notation.c (fix_builtin_array_notation_fn): Fix final argument to build_modify_expr in two cases. 2016-04-28 16:00:19 -06:00
c-aux-info.c Update copyright years. 2016-01-04 15:30:50 +01:00
c-convert.c re PR sanitizer/69099 (ICE when compiling gcc.dg/atomic/c11-atomic-exec-2.c with -fsanitize=float-cast-overflow) 2016-01-06 10:24:15 +00:00
c-decl.c C FE: suggest corrections for misspelled identifiers and type names 2016-06-22 15:20:41 +00:00
c-errors.c PR43651: add warning for duplicate qualifier 2016-05-11 20:23:37 +00:00
c-fold.c re PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code) 2016-04-04 08:11:46 +00:00
c-lang.c Update copyright years. 2016-01-04 15:30:50 +01:00
c-lang.h Update copyright years. 2016-01-04 15:30:50 +01:00
c-objc-common.c [PATCH 1/2] (header usage fix) remove unused system header includes 2016-04-22 10:57:56 +00:00
c-objc-common.h Update copyright years. 2016-01-04 15:30:50 +01:00
c-parser.c C FE: suggest corrections for misspelled identifiers and type names 2016-06-22 15:20:41 +00:00
c-tree.h C FE: suggest corrections for misspelled identifiers and type names 2016-06-22 15:20:41 +00:00
c-typeck.c Fix ICE on conditional expression between DFP and non-DFP float (PR c/71601). 2016-06-20 23:58:20 +01:00
config-lang.in Update copyright years. 2016-01-04 15:30:50 +01:00
gccspec.c Update copyright years. 2016-01-04 15:30:50 +01:00