[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-10 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #27 from hjl at gcc dot gnu.org hjl at gcc dot gnu.org 2011-01-10 
13:24:30 UTC ---
Author: hjl
Date: Mon Jan 10 13:24:27 2011
New Revision: 168631

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=168631
Log:
Check e-call_stmt before calling gimple_call_set_cannot_inline.

2011-01-10  H.J. Lu  hongjiu...@intel.com

PR lto/46760
* tree-inline.c (tree_can_inline_p): Check e-call_stmt before
calling gimple_call_set_cannot_inline.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-inline.c


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.6.0

--- Comment #28 from H.J. Lu hjl.tools at gmail dot com 2011-01-10 13:27:11 
UTC ---
Fixed.


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-10 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #29 from Jan Hubicka hubicka at gcc dot gnu.org 2011-01-10 
13:44:00 UTC ---
H.J., since you run regular testing, do you think you could switch one of
tester into lto-bootstrap (or ideally lto-bootstrap with FDO) so we keep those
in good condition?
Thanks!
Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #30 from H.J. Lu hjl.tools at gmail dot com 2011-01-10 13:48:27 
UTC ---
(In reply to comment #29)
 H.J., since you run regular testing, do you think you could switch one of
 tester into lto-bootstrap (or ideally lto-bootstrap with FDO) so we keep those
 in good condition?
 Thanks!

I have been testing lto-bootstrap:

http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00750.html

I will try to start lto-bootstrap with FDO.


Re: [Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-10 Thread Jan Hubicka
 I have been testing lto-bootstrap:
 
 http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00750.html
 
 I will try to start lto-bootstrap with FDO.
Great, thanks!
The FDO bootstrap always suffered from lack of testing, so this should help.
Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-10 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #31 from Jan Hubicka hubicka at ucw dot cz 2011-01-10 13:51:02 
UTC ---
 I have been testing lto-bootstrap:
 
 http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00750.html
 
 I will try to start lto-bootstrap with FDO.
Great, thanks!
The FDO bootstrap always suffered from lack of testing, so this should help.
Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #32 from H.J. Lu hjl.tools at gmail dot com 2011-01-10 13:59:32 
UTC ---
(In reply to comment #31)
  I have been testing lto-bootstrap:
  
  http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00750.html
  
  I will try to start lto-bootstrap with FDO.
 Great, thanks!
 The FDO bootstrap always suffered from lack of testing, so this should help.
 Honza

I have been testing FDO bootstrap:

http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00765.html

I just need to start lto-bootstrap with FDO.


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #19 from Jan Hubicka hubicka at gcc dot gnu.org 2011-01-09 
18:27:52 UTC ---
it works for me now.


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #20 from H.J. Lu hjl.tools at gmail dot com 2011-01-09 22:02:10 
UTC ---
On my Intel64 machine with 6GB RAM and 12GB swap, revision 168617
failed at final link:

lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc
returned 1 exit status
/usr/local/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
make[5]: *** [lto1] Error 1
make[5]: *** Waiting for unfinished jobs
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc
returned 1 exit status
/usr/local/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
make[5]: *** [cc1obj] Error 1
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc
returned 1 exit status
/usr/local/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
make[5]: *** [jc1] Error 1
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc
returned 1 exit status
/usr/local/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
make[5]: *** [cc1] Error 1
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc
returned 1 exit status
/usr/local/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
make[5]: *** [cc1plus] Error 1
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc
returned 1 exit status
/usr/local/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
make[5]: *** [f951] Error 1
rm gcj-dbtool.pod jcf-dump.pod cpp.pod jv-convert.pod grmic.pod gcov.pod
gcj.pod gc-analyze.pod gfdl.pod gij.pod gcc.pod gfortran.pod fsf-funding.pod
make[5]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux/gcc'
make[4]: *** [all-stagefeedback-gcc] Error 2
make[4]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux'
make[3]: *** [stagefeedback-bubble] Error 2
make[3]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux'
make[2]: *** [profiledbootstrap] Error 2
make[2]: Leaving directory `/export/build/gnu/gcc-lto/build-x86_64-linux'

GCC configured with

/export/gnu/import/git/gcc/configure --enable-clocale=gnu --with-system-zlib
--with-demangler-in-ld   --prefix=/usr/gcc-4.6.0 --with-local-prefix=/usr/local
--with-fpmath=sse --with-build-config=bootstrap-lto


Re: [Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread Jan Hubicka
 lto1: internal compiler error: Segmentation fault
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See http://gcc.gnu.org/bugs.html for instructions.
 lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc

What is the backtrace here?  I built working profiledbootsrap LTO compiler with 
various cofigurations
already (both GNU ld and gold) w/o problems  I will try with current tree.

Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #21 from Jan Hubicka hubicka at ucw dot cz 2011-01-09 22:07:59 
UTC ---
 lto1: internal compiler error: Segmentation fault
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See http://gcc.gnu.org/bugs.html for instructions.
 lto-wrapper: /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc

What is the backtrace here?  I built working profiledbootsrap LTO compiler with
various cofigurations
already (both GNU ld and gold) w/o problems  I will try with current tree.

Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #22 from H.J. Lu hjl.tools at gmail dot com 2011-01-10 00:01:45 
UTC ---
Program received signal SIGSEGV, Segmentation fault.
tree_can_inline_p (e=0x7fffdaf9fd68)
at /export/gnu/import/git/gcc/gcc/tree-inline.c:5391
5391  gimple_call_set_cannot_inline (e-call_stmt, true);
Missing separate debuginfos, use: debuginfo-install
cloog-ppl-0.15.8-1.0.f12.x86_64 glibc-2.12.90-21.2.f14.x86_64
gmp-4.3.2-0.0.f13.x86_64 libgcc-4.5.1-4.fc14.x86_64 libmpc-0.8.1-1.0.f12.x86_64
libstdc++-4.5.1-4.fc14.x86_64 mpfr-2.4.2-1.0.f12.x86_64
ppl-0.10.2-10.fc12.x86_64 zlib-1.2.5-2.fc14.x86_64
(gdb) bt
#0  tree_can_inline_p (e=0x7fffdaf9fd68)
at /export/gnu/import/git/gcc/gcc/tree-inline.c:5391
#1  0x00a5653a in cgraph_decide_inlining_of_small_functions ()
at /export/gnu/import/git/gcc/gcc/ipa-inline.c:1177
#2  0x00a585b7 in cgraph_decide_inlining ()
at /export/gnu/import/git/gcc/gcc/ipa-inline.c:1479
#3  0x00e65b52 in execute_one_pass (pass=0x1947960)
at /export/gnu/import/git/gcc/gcc/passes.c:1553
#4  0x00e6626a in execute_ipa_pass_list (pass=0x1947960)
at /export/gnu/import/git/gcc/gcc/passes.c:1920
#5  0x00e665e6 in do_whole_program_analysis ()
at /export/gnu/import/git/gcc/gcc/lto/lto.c:2334
#6  0x00ebab88 in lto_main ()
at /export/gnu/import/git/gcc/gcc/lto/lto.c:2446
#7  0x0071730d in compile_file ()
at /export/gnu/import/git/gcc/gcc/toplev.c:579
#8  do_compile () at /export/gnu/import/git/gcc/gcc/toplev.c:1874
#9  0x007189e5 in toplev_main (argc=405, argv=0x1e44a00)
at /export/gnu/import/git/gcc/gcc/toplev.c:1937
#10 0x004a5040 in main (argc=35, argv=0x7fffdc08)
at /export/gnu/import/git/gcc/gcc/main.c:36
(gdb) list
5386
5387  /* Allow the backend to decide if inlining is ok.  */
5388  if (!targetm.target_option.can_inline_p (caller, callee))
5389{
5390  e-inline_failed = CIF_TARGET_OPTION_MISMATCH;
5391  gimple_call_set_cannot_inline (e-call_stmt, true);
5392  e-call_stmt_cannot_inline_p = true;
5393  return false;
5394}
5395
(gdb) p e
$1 = (struct cgraph_edge *) 0x7fffdaf9fd68
(gdb) p e-call_stmt
$2 = (union gimple_statement_d *) 0x0
(gdb)


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #23 from Jan Hubicka hubicka at ucw dot cz 2011-01-10 00:21:35 
UTC ---
 5386
 5387  /* Allow the backend to decide if inlining is ok.  */
 5388  if (!targetm.target_option.can_inline_p (caller, callee))
 5389{
 5390  e-inline_failed = CIF_TARGET_OPTION_MISMATCH;
 5391  gimple_call_set_cannot_inline (e-call_stmt, true);
 5392  e-call_stmt_cannot_inline_p = true;
 5393  return false;
 5394}
 5395
 (gdb) p e
 $1 = (struct cgraph_edge *) 0x7fffdaf9fd68
 (gdb) p e-call_stmt
 $2 = (union gimple_statement_d *) 0x0
 (gdb)
Obviously we can not set gimple_call_set_cannot_inline when call_stmt is
missing.
I guess just guardining the set with
if (e-call_stmt)
  gimple_call_set_cannot_inline (e-call_stmt, true);
in all occurences in the function should fix the issue. Consider it preaproved
if it helps.  In 4.7 we probably should drop the gimple_call_set_cannot_inline
calls completely, I don't see any value in them.

Can you do dump_cgraph_node (stderr, e-caller) and dump_cgraph_node (stderr,
e-callee)??  I think we should decide function to be uninlinable only in
presence of target optimization attributes and I can not think of any during
the bootstrap

Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #24 from H.J. Lu hjl.tools at gmail dot com 2011-01-10 01:24:13 
UTC ---
(gdb) call dump_cgraph_node (stderr, e-caller)
_cpp_clean_line/47583(-1) @0x7fffdaf97b00 (asm: _cpp_clean_line)
availability:available analyzed executed 136036096x 107 time, 14 benefit 186
size, 7 benefit (204 after inlining) needed reachable externally_visible
prevailing_def finalized inlinable
  called by: cpp_pop_definition/47256 (1.00 per call) destringize_and_run/47257
(1.00 per call) run_directive/47259 (2130530x) (1.00 per call)
builtin_macro/47693 (97x) (1.00 per call) paste_tokens/47699 (450825x) (1.00
per call) cpp_read_state/47816 (1.00 per call) _cpp_skip_block_comment/47586
(19682217x) (0.93 per call) _cpp_get_fresh_line.part.5/47584 (113774079x) (1.00
per call) 
  calls: add_line_note/38510 (inlined) (136036096x) (1.00 per call)
add_line_note/47567 (nested in 1 loops) add_line_note/47567 (8317015x) (0.06
per call) (nested in 1 loops) add_line_note/47567 (2018574x) (0.01 per call)
__builtin_expect/2426 (133456296x) (0.98 per call) __builtin_expect/2426
(133456296x) (0.98 per call) __builtin_expect/2426 (133456296x) (0.98 per call)
add_line_note/47567 (nested in 1 loops) __builtin_expect/2426 (319549x) (0.00
per call) (nested in 1 loops) __builtin_expect/2426 (133775845x) (0.98 per
call) (nested in 1 loops) search_line_sse42/47576 (136174844x) (1.00 per call)
(nested in 1 loops) 
  References:  var:search_line_fast (read) fn:search_line_sse42/47576 (addr)
var:_cpp_trigraph_map (read) var:_cpp_trigraph_map (read) var:_sch_istable
(read) var:_sch_istable (read) var:_cpp_trigraph_map (read)
var:_cpp_trigraph_map (read)
  Refering this function: 
  has 1 outgoing edges for indirect calls.
(gdb) call dump_cgraph_node (stderr, e-callee)
search_line_sse42/47576(-1) @0x7fffdaf97160 (asm: search_line_sse42.762190)
availability:available analyzed executed 136174844x 18 time, 15 benefit 30
size, 7 benefit address_taken prevailing_def_ironly finalized inlinable
  called by: _cpp_clean_line/47583 (136174844x) (1.00 per call) 
  calls: __builtin_expect/2426 (127407932x) (0.94 per call)
search_line_sse2/47575 (1039x) __builtin_expect/2426 (142096x) (0.00 per call)
__builtin_expect/2426 (127408971x) (0.94 per call) 
  References: 
  Refering this function:  fn:init_vectorized_lexer/47582 (addr)
fn:_cpp_clean_line/47583 (addr)
(gdb)


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #25 from H.J. Lu hjl.tools at gmail dot com 2011-01-10 01:25:00 
UTC ---
My machine supports SSE4.


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2011-01-09 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #26 from Jan Hubicka hubicka at ucw dot cz 2011-01-10 01:42:06 
UTC ---
 call) (nested in 1 loops) search_line_sse42/47576 (136174844x) (1.00 per call)
Ahh, that is the Andi's vectorized preprocessor code. That is fine then

Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-05 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #16 from Jan Hubicka hubicka at gcc dot gnu.org 2010-12-05 
14:28:29 UTC ---
Bootstrap works for me with current mainline with release checking as well as
default checking, configured as:

../configure --enable-stage1-languages=c,lto
--with-ld=/abuild/jh/trunk-install/bin/ld --with-build-config=bootstrap-lto
--enable-checking=release --disable-plugin

Can you, please, re-confirm the bug or close the PR?


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-05 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #17 from H.J. Lu hjl.tools at gmail dot com 2010-12-05 17:16:53 
UTC ---
(In reply to comment #16)
 Bootstrap works for me with current mainline with release checking as well as
 default checking, configured as:
 
 ../configure --enable-stage1-languages=c,lto
 --with-ld=/abuild/jh/trunk-install/bin/ld --with-build-config=bootstrap-lto
 --enable-checking=release --disable-plugin
^
Can you try without disabling plugin?

I am using.

--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --enable-langua
ges=c,lto  --prefix=/usr/gcc-4.6.0 --with-local-prefix=/usr/local
--with-fpmath=
sse --with-build-config=bootstrap-lto


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-05 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #18 from Jan Hubicka hubicka at gcc dot gnu.org 2010-12-05 
19:04:38 UTC ---
I tried with the default checking earlier (this is not LTO plugin, just the
plugin support that does not cause that much of difference).  I will try
tonight or after I return from trip.


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #10 from H.J. Lu hjl.tools at gmail dot com 2010-12-04 17:04:34 
UTC ---
(In reply to comment #9)
 Created attachment 22604 [details]
 Patch I am testing to allow profile merging
 
 This patch should allow merging of LTO units with different number of
 executions.  I am testing how far I can get with lto bootstrap with this one
 and the pass-through

I got

lto1: internal compiler error: Floating point exception
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

Do we have a divide by zero bug?


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #11 from H.J. Lu hjl.tools at gmail dot com 2010-12-04 17:13:57 
UTC ---
Program received signal SIGFPE, Arithmetic exception.
0x00f6e670 in merge_profile_summaries ()
at /export/gnu/import/git/gcc/gcc/lto-cgraph.c:1513
1513/ node-local.lto_file_data-profile_info.run_max);


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #12 from H.J. Lu hjl.tools at gmail dot com 2010-12-04 17:24:28 
UTC ---
(gdb) p cgraph_nodes-local.lto_file_data-profile_info
$4 = {num = 0, runs = 9409, sum_all = 0, run_max = 0, sum_max = 1302797449}
(gdb)


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-04 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #13 from Jan Hubicka hubicka at gcc dot gnu.org 2010-12-04 
17:33:02 UTC ---
I fixed that division bug (it is wrong way) and I can bootstrap C only, C++
still fails, this time on profile mismatches.
I will commit the fixed patch.

Honza


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-04 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #14 from Jan Hubicka hubicka at gcc dot gnu.org 2010-12-04 
19:35:27 UTC ---
Author: hubicka
Date: Sat Dec  4 19:35:23 2010
New Revision: 167458

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=167458
Log:

PR tree-optimization/46760
* cgraph.c (cgraph_create_node): Initialize count_materialization_scale.
* cgraph.h (struct cgraph_node): Add count_materialization_scale.
* lto-cgraph.c (lto_output_edge): Fix assert.
(lto_output_node): Output count_materialization_scale.
(output_profile_summary): Output only runs and sum_max.
(input_node): Input count_materialization_scale.
(input_profile_summary): Read data into file specific gcov summary.
(merge_profile_summaries): New function.
(input_cgraph): Update call of input_profile_summary;
call merge_profile_summaries.
* lto-streamer-in.c (input_cfg): Add count_materialization_scale arg;
rescale counts at read in.
(intput_bb): Likewise.
(input_function): Update call of input_bb.
(lto_read_body): Update call of input_cfg.
* lto-streamer.h: Inlclude gcov-io.h
(lto_file_decl_data): Add gcov_ctr_summary.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraph.c
trunk/gcc/cgraph.h
trunk/gcc/lto-cgraph.c
trunk/gcc/lto-streamer-in.c
trunk/gcc/lto-streamer.h


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #15 from H.J. Lu hjl.tools at gmail dot com 2010-12-05 00:51:39 
UTC ---
With revision 167460, I got

[...@gnu-18 gcc]$ /export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/xgcc
-B/export/build/gnu/gcc-lto/build-x86_64-linux/./prev-gcc/
-B/usr/gcc-4.6.0/x86_64-unknown-linux-gnu/bin/
-B/usr/gcc-4.6.0/x86_64-unknown-linux-gnu/bin/
-B/usr/gcc-4.6.0/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/gcc-4.6.0/x86_64-unknown-linux-gnu/include -isystem
/usr/gcc-4.6.0/x86_64-unknown-linux-gnu/sys-include  -g -O2 -flto=jobserver
-fuse-linker-plugin -frandom-seed=1 -fprofile-use -DIN_GCC   -W -Wall
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common
 -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc  -o
build/genchecksum build/genchecksum.o .././libiberty/libiberty.a
In function \u2018md5_process_block\u2019:
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
make: *** [/tmp/cc1Nc0QJ.ltrans0.ltrans.o] Error 1
lto-wrapper: make returned 2 exit status
lto-wrapper failedcollect2: ld returned 1 exit status
[...@gnu-18 gcc]$


[Bug driver/46760] LTO bootstrap doesn't work with FDO

2010-12-02 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760

--- Comment #9 from Jan Hubicka hubicka at gcc dot gnu.org 2010-12-02 
15:57:00 UTC ---
Created attachment 22604
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=22604
Patch I am testing to allow profile merging

This patch should allow merging of LTO units with different number of
executions.  I am testing how far I can get with lto bootstrap with this one
and the pass-through