1 2021-11-18 Jan Hubicka <hubicka@ucw.cz>
3 * lto-partition.c (promote_symbol): Clear semantic_interposition flag.
5 2021-11-06 Jan Hubicka <hubicka@ucw.cz>
9 * lto-partition.c (must_not_rename): Update comment.
10 (promote_symbol): Set resolution to LDPR_PREVAILING_DEF_IRONLY.
12 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
15 * Make-lang.in: Add dummy lto.install-dvi target.
17 2021-09-27 Martin Liska <mliska@suse.cz>
19 * lto-lang.c (lto_init_options_struct): Set also
20 x_flag_default_complex_method.
22 2021-09-03 Jakub Jelinek <jakub@redhat.com>
25 * lto-common.c (compare_tree_sccs_1): Also compare
26 DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD values.
28 2021-09-02 liuhongt <hongtao.liu@intel.com>
30 * lto-lang.c (lto_type_for_mode): Return float16_type_node
31 when mode == TYPE_MODE (float16_type_node).
33 2021-05-31 Martin Liska <mliska@suse.cz>
35 * lto-common.c (compare_tree_sccs_1): Compare
36 FUNCTION_DECL_DECL_TYPE.
38 2021-05-24 Wang Liushuai <wangliushuai@bytedance.com>
40 * lto-dump.c (get_size): Fix the NPD error about the thunk symbol.
42 2021-04-15 Jan Hubicka <hubicka@ucw.cz>
45 * lto.c (lto_wpa_write_files): Fix handling of clones.
47 2021-04-08 Martin Sebor <msebor@redhat.com>
50 * lto-lang.c (lto_post_options): Correct spelling.
52 2021-02-28 Jakub Jelinek <jakub@redhat.com>
55 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Fix comment
56 typos - refernced -> referenced and
57 devirtualizaiton -> devirtualization.
59 2020-12-16 Martin Liska <mliska@suse.cz>
61 * lang.opt: Remove usage of Report.
63 2020-11-20 Jakub Jelinek <jakub@redhat.com>
66 * Make-lang.in (lto1.serial, lto2.serial): Change from goals to
68 (.PHONY): Drop lto1.serial, lto2.serial, lto1.prev and lto2.prev.
69 ($(LTO_EXE)): Depend on $(lto1.serial) rather than lto1.serial.
70 ($(LTO_DUMP_EXE)): Depend on $(lto2.serial) rather than lto2.serial.
72 2020-11-18 Jerry Clcanny <a837940593@gmail.com>
74 * lto-symtab.c (lto_symtab_merge_symbols): Fix typos in comment.
76 2020-11-18 Jakub Jelinek <jakub@redhat.com>
78 * Make-lang.in (lto, lto1.serial, lto2.serial): New goals.
79 (.PHONY): Add lto lto1.serial lto1.prev lto2.serial lto2.prev.
80 (lto.all.cross, lto.start.encap): Remove dependencies.
81 ($(LTO_EXE)): Depend on lto1.prev. Call LINK_PROGRESS.
82 ($(LTO_DUMP_EXE)): Depend on lto2.prev. Call LINK_PROGRESS.
84 2020-11-17 Jan Hubicka <jh@suse.cz>
87 * lto-common.c (gimple_register_canonical_type_1): Only
88 register types with TYPE_CXX_ODR_P flag; sanity check that no
89 conflict happens at ltrans time.
91 2020-11-06 Nathan Sidwell <nathan@acm.org>
93 * lto-symtab.c (lto_symtab_merge_decls_1): Rename
94 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
96 2020-10-28 Jakub Jelinek <jakub@redhat.com>
99 * lto-common.c (lto_fixup_prevailing_decls): Don't use
100 LTO_NO_PREVAIL on TREE_LIST's TREE_PURPOSE.
101 * lto-partition.c (lto_balanced_map): Treat declare_variant_alt
102 nodes like definitions.
104 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
106 * lto-partition.c (add_symbol_to_partition_1): Update for new thunk
109 2020-08-27 Martin Liska <mliska@suse.cz>
111 * lto-common.c (lto_file_finalize): Set exact argument of a vector
112 growth function to true.
114 2020-06-03 Jan Hubicka <hubicka@ucw.cz>
116 * lto-common.c (compare_tree_sccs_1): Do not compare TYPE_VALUES.
118 2020-05-22 Jan Hubicka <hubicka@ucw.cz>
120 * lto-common.c (lto_read_decls): Do not skip stray refs.
122 2020-05-20 Jan Hubicka <hubicka@ucw.cz>
124 * lto-common.c (compare_tree_sccs_1): Sanity check that we never
125 read TRANSLATION_UNIT_DECL.
126 (process_dref): Break out from ...
127 (unify_scc): ... here.
128 (process_new_tree): Break out from ...
129 (lto_read_decls): ... here; handle streaming of singleton trees.
130 (print_lto_report_1): Update statistics.
132 2020-05-07 Richard Biener <rguenther@suse.de>
135 * lto-common.c (compare_tree_sccs_1): Compare
136 DECL_NOT_GIMPLE_REG_P.
138 2020-04-29 Jakub Jelinek <jakub@redhat.com>
141 * lto-common.c (compare_tree_sccs_1): Handle DECL_FIELD_ABI_IGNORED.
143 2020-04-17 Martin Liska <mliska@suse.cz>
146 * lto-common.c: Initialize file_data->lto_section_header
147 before lto_mode_identity_table call. It is needed because
148 it decompresses a LTO section.
150 2020-04-08 Martin Liska <mliska@suse.cz>
153 * lto-common.c (compare_tree_sccs_1): Compare also
154 DECL_IS_REPLACEABLE_OPERATOR.
156 2020-03-25 Jakub Jelinek <jakub@redhat.com>
159 * lto-lang.c (lto_set_decl_assembler_name): Use a static ulong
160 counter instead of DECL_UID.
162 2020-03-24 Tobias Burnus <tobias@codesourcery.com>
165 * lto.c (offload_handle_link_vars): Propagate TREE_PUBLIC state.
167 2020-01-29 Tobias Burnus <tobias@codesourcery.com>
169 * lto.c (offload_handle_link_vars): Reduce chance of
170 naming clashes of generated linkptr variable.
172 2020-01-29 Tobias Burnus <tobias@codesourcery.com>
175 * lto.c (offload_handle_link_vars): Cleanup; call
176 build_decl to ensure alignment is set.
178 2020-02-05 Martin Liska <mliska@suse.cz>
181 * lto-dump.c (dump_list_functions): Do not
182 load body for aliases.
183 (dump_body): Likewise here.
185 2020-01-16 Martin Liska <mliska@suse.cz>
187 * lto-partition.c (lto_balanced_map): Remember
188 best_noreorder_pos and then restore to it
191 2020-01-08 Martin Liska <mliska@suse.cz>
193 * lto-partition.c (add_symbol_to_partition_1): Use ::dump_name or
194 ::dump_asm_name instead of (::name or ::asm_name).
195 (lto_balanced_map): Likewise.
196 (promote_symbol): Likewise.
197 (rename_statics): Likewise.
198 * lto.c (lto_wpa_write_files): Likewise.
200 2020-01-08 Martin Liska <mliska@suse.cz>
202 * lto-partition.c (lto_balanced_map): Use symtab_node::dump_name.
204 2020-01-01 Jakub Jelinek <jakub@redhat.com>
206 Update copyright years.
208 2019-12-19 Jan Hubicka <hubicka@ucw.cz>
209 Xi Ruoyao <xry111@mengyan1223.wang>
211 * lto-common.c (read_cgraph_and_symbols): Work around binutils
214 2019-12-07 Jan Hubicka <hubicka@ucw.cz>
216 * lto-partition.c (lto_balanced_map): Fix printing of tp_first_run.
218 2019-12-10 Jan Hubicka <hubicka@ucw.cz>
220 * lto-partition.c (node_cmp): Turn into simple order comparsions.
221 (varpool_node_cmp): Remove.
222 (add_sorted_nodes): Use node_cmp.
223 (lto_balanced_map): Use tp_first_run_node_cmp.
225 2019-11-25 Joseph Myers <joseph@codesourcery.com>
228 * lto-lang.c (lto_type_for_mode): Handle decimal floating-point
229 types being NULL_TREE.
231 2019-11-22 Jan Hubicka <jh@suse.cz>
233 * lto.c (lto_wpa_write_files): Call memory_block_pool::trim.
235 2019-11-14 Martin Liska <mliska@suse.cz>
237 * Make-lang.in: Remove wrong dependency
238 of LTO_DUMP_EXE on LTO_EXE.
240 2019-11-12 Martin Liska <mliska@suse.cz>
242 * lto-common.c: Do not include params.h.
243 * lto-partition.c: Likewise.
246 2019-11-12 Martin Liska <mliska@suse.cz>
248 * lto-partition.c (lto_balanced_map): Replace old parameter syntax
249 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
251 * lto.c (do_whole_program_analysis): Likewise.
253 2019-11-11 Martin Liska <mliska@suse.cz>
255 * Make-lang.in: Relax dependency of lto-dump.o to
256 LTO_OBJS which will allow faster linking (mainly with LTO).
258 2019-11-07 Jan Hubicka <hubicka@ucw.cz>
260 * lto.c (do_whole_program_analysis): Call lto_free_file_name_hash.
262 2019-11-02 Jan Hubicka <hubicka@ucw.cz>
264 * lto-common.c (read_cgraph_and_symbols): Improve -Q reporting.
265 * lto.c (lto_wpa_write_files): Likewise.
267 2019-10-31 Jakub Jelinek <jakub@redhat.com>
270 * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
271 on *node that is not FUNCTION_DECL.
273 2019-10-30 Martin Liska <mliska@suse.cz>
277 * lto-common.c (lto_file_finalize): Use lto_get_summary_section_data.
278 (get_section_data): Add order argument.
280 2019-10-29 Martin Liska <mliska@suse.cz>
282 * lto.c (do_whole_program_analysis): Pass
283 title as dump_memory_report argument.
285 2019-10-29 Martin Liska <mliska@suse.cz>
287 * lto.c (do_whole_program_analysis): Remove argument.
289 2019-10-24 Jan Hubicka <hubicka@ucw.cz>
291 * lto-partition.c (add_symbol_to_partition_1): Update.
292 (undo_parittion): Update.
294 2019-10-23 Jan Hubicka <hubicka@ucw.cz>
296 * lto-common.c (lto_file_finalize): Add order attribute.
297 (lto_create_files_from_ids): Pass order.
298 (lto_file_read): UPdate call of lto_create_files_from_ids.
300 2019-10-12 Jan Hubicka <hubicka@ucw.cz>
302 * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
305 2019-10-12 Jan Hubicka <hubicka@ucw.cz>
307 * lto.c (lto_wpa_write_files): Do not update bodies of clones.
309 2019-10-11 Jan Hubicka <hubicka@ucw.cz>
311 * lto.c (lto_wpa_write_files): Call ggc_trim.
313 2019-10-11 Jan Hubicka <hubicka@ucw.cz>
315 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
317 2019-10-10 Richard Biener <rguenther@suse.de>
319 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
321 2019-10-04 Joseph Myers <joseph@codesourcery.com>
323 * lto-lang.c (flag_isoc2x): New variable.
325 2019-09-18 Richard Biener <rguenther@suse.de>
328 * lto.c (lto_materialize_function): Initialize EH by looking
329 at the function personality and flag_exceptions setting.
331 2019-08-23 Jakub Jelinek <jakub@redhat.com>
334 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
335 flag_excess_precision_cmdline. Remove comment.
337 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
340 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
341 instead of DECL_FUNCTION_CODE.
342 * lto-symtab.c (lto_symtab_merge_p): Likewise.
344 2019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
346 * Make-lang.in (lto.install-common): Remove unnecessary slash
347 between $(DESTDIR) and $(bindir).
349 2019-07-25 Martin Liska <mliska@suse.cz>
351 * lto-common.c (compare_tree_sccs_1): Use new macros
352 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
354 2019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
356 * lang.opt (flag_dump_callgraph): New flag.
357 * lto-dump.c (dump_symtab_graphviz): New function.
358 (dump_tool_help): New option.
359 (lto_main): Handle graphviz dumping.
361 2019-07-18 Jan Hubicka <hubicka@ucw.cz>
363 * lto-common.c (gimple_register_canonical_type_1): Do not look for
364 non-ODR conflicts of types in anonymous namespaces.
365 (unify_scc): Do not merge anonymous namespace types.
367 2019-07-09 Martin Sebor <msebor@redhat.com>
370 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
371 to struct and others to class.
372 (mentions_vars_p): Same.
373 (register_resolution): Same.
374 (lto_register_var_decl_in_symtab): Same.
375 (lto_register_function_decl_in_symtab): Same.
377 (lto_read_decls): Same.
379 2019-07-09 Martin Sebor <msebor@redhat.com>
382 * lto-dump.c: Change class-key from class to struct and vice versa
383 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
385 2019-07-04 Martin Liska <mliska@suse.cz>
388 * lto-common.c (lto_file_finalize): Use memcpy to set
389 file_data->lto_section_header.
391 2019-07-03 Martin Liska <mliska@suse.cz>
393 * lto-common.c: Read LTO section and verify header.
395 2019-06-27 Jan Hubicka <jh@suse.cz>
397 * lto-common.c (lto_register_canonical_types_for_odr_types):
398 Copy CXX_ODR_P from the main variant.
400 2019-06-27 Jan Hubicka <jh@suse.cz>
402 * lto-common.c: tree-pretty-print.h
403 (type_streaming_finished): New static var.
404 (gimple_register_canonical_type_1): Return updated hash; handle ODR
406 (iterative_hash_canonical_type): Update use of
407 gimple_register_canonical_type_1.
409 2019-06-27 Martin Liska <mliska@suse.cz>
411 * lto-dump.c (struct symbol_entry): Add default dtor.
412 (struct variable_entry): Likewise.
413 (struct function_entry): Likewise.
414 (dump_list_functions): Release memory.
415 (dump_list_variables): Likewise.
417 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
419 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
420 format of "__intN" types for SIZE_TYPE.
422 2019-06-24 Jan Hubicka <jh@suse.cz>
424 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
425 compare STRING_FLAG only for arrays and integers.
427 2019-06-05 Martin Sebor <msebor@redhat.com>
429 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
431 2019-05-16 Martin Sebor <msebor@redhat.com>
433 * lto-dump.c (lto_main): Same.
434 * lto.c (stream_out): Same.
436 2019-05-10 Martin Liska <mliska@suse.cz>
438 * Make-lang.in: Use program_transform_name for lto-dump.
439 * config-lang.in: Do not mark lto-dump compiler as we don't
440 want to have it installed at
441 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
443 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
445 * lto-common.c (lto_file_read): Print section->start as int64_t,
446 section->len as uint64_t.
447 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
449 2019-05-06 Martin Liska <mliska@suse.cz>
451 * lto-common.c: Update coding style.
452 * lto.c (materialize_cgraph): Likewise.
454 2019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
455 Martin Liska <mliska@suse.cz>
457 * Make-lang.in: Add lto_dump-related definition.
458 * config-lang.in: Likewise.
459 * lang.opt: Add new language LTODump and options related
461 * lto-common.c (lto_read_decls): Support type statistics dump.
462 (lto_file_read): Likewise for object files.
463 * lto-dump.c: New file.
464 * lto-lang.c (lto_option_lang_mask): Move from ..
465 * lto.c (lto_option_lang_mask): .. here.
466 * lto.h (lto_option_lang_mask): New declaration.
468 2019-05-06 Martin Liska <mliska@suse.cz>
469 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
471 * Make-lang.in: Add lto-common.o.
472 * config-lang.in: Likewise for gtfiles.
473 * lto-common.c: New file.
474 * lto-common.h: New file.
475 * lto-lang.c: Include lto-common.h.
476 * lto.c: Move most of the functionality
477 into lto-common.c file.
479 2019-04-12 Jan Hubicka <hubicka@ucw.cz>
481 * lto.c (do_stream_out): rename to ...
482 (stream_out): ... this one; move original code to ...
483 (stream_out_partitions_1, stream_out_partitions): ... these new
485 (lto_wpa_write_files): Honnor lto_parallelism
487 2019-03-26 Martin Liska <mliska@suse.cz>
489 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
492 2019-03-11 Martin Liska <mliska@suse.cz>
494 * lto-lang.c (lto_post_options): Wrap an option name
495 in a string format message and fix GNU coding style.
496 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
498 2019-03-09 Jakub Jelinek <jakub@redhat.com>
501 * lang.opt: Terminate description text with a dot.
503 2019-02-28 Jason Merrill <jason@redhat.com>
505 PR c++/88049 - ICE with undefined destructor and anon namespace.
506 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
507 for a type in an anonymous namespace.
509 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
513 * lto-partition.c: Mechanically replace "can not" with "cannot".
514 * lto-symtab.c: Likewise.
517 2019-01-01 Jakub Jelinek <jakub@redhat.com>
519 Update copyright years.
521 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
523 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
524 for method whose basetype was already reported.
526 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
528 Minimize clone counter memory usage in LTO.
529 * lto-partition.c (privatize_symbol_name_1): Keep track of
530 non-unique symbol counters in the lto_clone_numbers hash
532 (lto_promote_cross_file_statics): Allocate and free the
533 lto_clone_numbers hash map.
534 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
537 2018-11-28 Jan Hubicka <jh@suse.cz>
539 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
541 2018-11-22 Jan Hubicka <jh@suse.cz>
543 * lto.c (cmp_type_location): Remove.
544 (lto_read_decls): Do not allocate odr_types.
546 2018-11-19 Martin Liska <mliska@suse.cz>
549 * lto-symtab.c (lto_symtab_merge): Transform the
550 condition before r256989.
552 2018-11-16 Martin Liska <mliska@suse.cz>
555 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
556 lto_symtab_symbol_p as it does checking of transparent alias.
557 These needs to be also merged in the function.
559 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
561 * lto-partition.c (privatize_symbol_name_1): Use
562 clone_function_name_numbered.
564 2018-10-26 Jan Hubicka <jh@suse.cz>
566 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
568 2018-10-17 David Malcolm <dmalcolm@redhat.com>
570 * Make-lang.in (selftest-lto): New.
572 2018-08-29 Martin Liska <mliska@suse.cz>
575 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
576 to behavior before r263887.
578 2018-08-27 Martin Liska <mliska@suse.cz>
580 * lto-lang.c (handle_const_attribute): Use new function
581 fndecl_built_in_p and remove check for FUNCTION_DECL if
583 * lto-symtab.c (lto_symtab_merge_p): Likewise.
584 (lto_symtab_merge_decls_1): Likewise.
585 (lto_symtab_merge_symbols): Likewise.
586 * lto.c (lto_maybe_register_decl): Likewise.
587 (read_cgraph_and_symbols): Likewise.
589 2018-08-21 Tom de Vries <tdevries@suse.de>
591 * lto.c (lto_main): Call debuginfo_early_start and
592 debuginfo_early_stop.
594 2018-07-20 Martin Sebor <msebor@redhat.com>
597 * lto-lang.c (lto_handle_option): Change function argument
600 2018-07-20 Richard Biener <rguenther@suse.de>
603 * lto.c (unify_scc): Before we throw away an SCC see if we
604 can amend prevailing single-entry SCC with debug refs.
606 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
608 * lto.c (do_stream_out): Add PART parameter; open dump file.
609 (stream_out): Add PART parameter; pass it to do_stream_out.
610 (lto_wpa_write_files): Update call of stream_out.
612 2018-07-04 Martin Liska <mliska@suse.cz>
617 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
620 2018-06-20 Martin Liska <mliska@suse.cz>
622 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
625 2018-06-19 Martin Liska <mliska@suse.cz>
627 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
629 (undo_partition): Likewise.
630 (lto_balanced_map): Likewise.
632 2018-06-19 Martin Liska <mliska@suse.cz>
634 * config-lang.in: Remove stagestuff.
636 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
638 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
640 (lto_register_dumps): New hook.
641 (LANG_HOOKS_REGISTER_DUMPS): New.
642 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
643 * lto-symtab.c: Include lto.h; dump into dump_file instead of
645 (lto_symtab_merge_decls): Initialize dump file.
646 * lto.c (read_cgraph_and_symbols): Initialize dump file.
647 (do_whole_program_analysis): Likewise.
649 2018-06-08 Martin Liska <mliska@suse.cz>
651 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
652 instead of summary_uid.
654 2018-06-08 Martin Liska <mliska@suse.cz>
656 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
658 (undo_partition): Likewise.
659 (lto_balanced_map): Likewise.
661 2018-06-08 Martin Liska <mliska@suse.cz>
663 * lto-partition.c (add_references_to_partition): Remove support
664 for MPX (macros, related functions, fields in cgraph_node, ...).
665 (add_symbol_to_partition_1): Likewise.
666 (privatize_symbol_name): Likewise.
667 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
669 2018-06-05 Richard Biener <rguenther@suse.de>
671 * lto.c (cmp_type_location): Expand locations only once.
673 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
675 * lang.opt (lto_linker_output): Add nolto-rel.
676 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
677 and LTO_LINKER_OUTPUT_NOLTOREL.
678 (lto_init): Generate lto when doing incremental link.
679 * lto.c (lto_precess_name): Add lto1-inclink.
681 2018-05-18 Jan Hubicka <jh@suse.cz>
684 * lto-partition.c (account_reference_p): Do not account
685 references from aliases; do not account refernces from
686 external initializers.
688 2018-04-30 Jan Hubicka <jh@suse.cz>
690 * lto.c (cmp_partitions_size): Remove.
691 (lto_wpa_write_files): Also output priorities; do not sort partitions.
692 (cmp_partition_order): Move to ...
693 * lto-partition.c (cmp_partition_order): ...
694 (lto_1_to_1_map): Sort partitions.
696 2018-04-20 Jan Hubicka <jh@suse.cz>
698 * lto-partition.c (lto_balanced_map): Fix sanity check.
700 2018-04-19 Jan Hubicka <jh@suse.cz>
702 * lto-partition.c: Include sreal.h
703 (add_symbol_to_partition_1): Use size instead of self_size
705 (account_reference_p): New.
706 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
707 fix accounting errors in boundary size; add debug output; combine cost
708 as cost/size instead of cost/internal; reduce the partitioning error to
709 +- 1/8 of the parttion size.
711 2018-04-19 Martin Liska <mliska@suse.cz>
713 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
714 for multiple PREVAILING_DEF_IRONLY for common symbols.
716 2018-04-18 Martin Liska <mliska@suse.cz>
718 * lto.c (lto_read_decls): Fix GNU coding style and typos.
720 2018-04-18 Martin Liska <mliska@suse.cz>
724 * lto.c (cmp_type_location): New function.
725 (lto_read_decls): First collect all types, then
726 sort them according by location before register_odr_type
729 2018-04-18 Jan Hubicka <jh@suse.cz>
730 Martin Liska <mliska@suse.cz>
733 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
736 2018-04-11 Martin Liska <mliska@suse.cz>
738 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
741 2018-04-10 Martin Liska <mliska@suse.cz>
744 * lto-symtab.c (lto_symtab_merge_p): Do not check for
745 TREE_VALUES of error attributes.
747 2018-04-10 Richard Biener <rguenther@suse.de>
748 Martin Liska <mliska@suse.cz>
751 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
753 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
755 * lto-partition.c (lto_balanced_map): Watch overflow.
757 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
760 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
761 (read_cgraph_and_symbols): Use
762 symtab_node::output_to_lto_symbol_table_p.
764 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
766 * lto.c (register_resolution): Remove forgotten sanity check.
768 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
771 * lto.c: Include builtins.h
772 (register_resolution): Merge resolutions in case trees was
774 (lto_maybe_register_decl): Break out from ...
775 (lto_read_decls): ... here.
776 (unify_scc): Also register decls here.
777 (read_cgraph_and_symbols): Sanity check that all resolutions was
780 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
783 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
784 component type of array types with non-aliased component.
786 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
789 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
790 for type match warning on arrays of pointers.
792 2018-01-23 Martin Liska <mliska@suse.cz>
795 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
796 trailing arrays at the end of a struct.
798 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
799 Alan Hayward <alan.hayward@arm.com>
800 David Sherwood <david.sherwood@arm.com>
802 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
805 Alan Hayward <alan.hayward@arm.com>
806 David Sherwood <david.sherwood@arm.com>
808 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
809 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
811 2018-01-03 Jakub Jelinek <jakub@redhat.com>
813 Update copyright years.
815 2017-12-15 Jakub Jelinek <jakub@redhat.com>
817 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
818 affects_type_identity and handler fields, adjust comments.
820 2017-12-07 Richard Sandiford <richard.sandiford@arm.com>
822 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
824 2017-12-07 Martin Sebor <msebor@redhat.com>
827 * lto-lang.c (lto_attribute_table): Initialize new member of struct
830 2017-11-30 Jakub Jelinek <jakub@redhat.com>
832 * lto.c (create_subid_section_table): Use ; instead of ;;.
834 2017-11-22 Marek Polacek <polacek@redhat.com>
839 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
841 2017-11-10 Jan Hubicka <hubicka@ucw.cz>
843 * lto-partition.c (lto_balanced_map): Use frequency accessor.
845 2017-10-13 Jan Hubicka <hubicka@ucw.cz>
847 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
849 2017-10-11 Nathan Sidwell <nathan@acm.org>
851 * lto.c (mentions_vars_p_decl_with_vis): Use
852 DECL_ASSEMBLER_NAME_RAW.
853 (lto_fixup_prevailing_decls): Likewise.
855 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
857 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
858 operating on trees as wide_ints.
860 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
861 Alan Hayward <alan.hayward@arm.com>
862 David Sherwood <david.sherwood@arm.com>
864 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
866 2017-08-21 Richard Biener <rguenther@suse.de>
868 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
869 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
870 TYPE_DECL debug processing, register DIE references from
871 prevailing SCCs with the debug machinery.
872 (lto_section_with_id): Handle LTO debug sections.
874 2017-08-16 Nathan Sidwell <nathan@acm.org>
876 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
877 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
878 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
880 2017-08-08 Tom de Vries <tom@codesourcery.com>
882 * lto.c: Include attribs.h.
884 2017-08-08 Martin Liska <mliska@suse.cz>
886 * lto-lang.c: Include header files.
887 * lto-symtab.c: Likewise.
889 2017-08-03 Richard Biener <rguenther@suse.de>
891 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
892 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
893 use DECL_LANG_FLAG_0.
894 (lto_symtab_prevail_decl): Likewise.
896 2017-07-07 Torsten Duwe <duwe@suse.de>
898 * lto-lang.c (lto_attribute_table): Add entry for
899 "patchable_function_entry".
901 2017-07-19 Nathan Sidwell <nathan@acm.org>
903 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
904 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
906 2017-07-06 Jan Hubicka <hubicka@ucw.cz>
908 * lto-partition.c (lto_balanced_map): Do not check
909 flag_toplevel_reorder.
911 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
912 * lto-lang.c (lto_init): Use builtin_structptr_types.
914 2017-06-15 Jan Hubicka <hubicka@ucw.cz>
915 Thomas Preud'homme <thomas.preudhomme@arm.com>
918 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
919 that resolved externally.
921 2017-05-23 Jan Hubicka <hubicka@ucw.cz>
923 * lto.c (do_whole_program_analysis): Replace inline_free_summary
924 by ipa_free_fn_summary.
926 2017-05-23 Martin Liska <mliska@suse.cz>
928 * lto-symtab.c (lto_cgraph_replace_node): Use
929 symtab_node::dump_{asm_,}name functions.
930 * lto.c (read_cgraph_and_symbols): Likewise.
931 (do_whole_program_analysis): Likewise.
933 2017-05-23 Martin Liska <mliska@suse.cz>
935 * lto.c (read_cgraph_and_symbols): Use the renamed function.
936 (do_whole_program_analysis): Use the renamed function.
938 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
940 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
941 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
943 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
946 * lto-lang.c (lto_init): Set in_lto_p earlier.
948 2017-04-12 Richard Biener <rguenther@suse.de>
949 Bernd Edlinger <bernd.edlinger@hotmail.de>
952 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
954 2017-02-14 Martin Liska <mliska@suse.cz>
956 * lto.c (do_stream_out): Free LTO file filename string.
958 2017-01-19 David Malcolm <dmalcolm@redhat.com>
960 * lto-lang.c (builtin_type_for_size): Convert call to
961 lto_type_for_size to one through the langhook.
962 (lto_type_for_size): Move to langhooks.c and rename to
964 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
966 2017-01-11 Jakub Jelinek <jakub@redhat.com>
969 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
972 2017-01-09 Jakub Jelinek <jakub@redhat.com>
976 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
978 2017-01-06 Nathan Sidwell <nathan@acm.org>
980 * lto-partition.c (promote_symbol): Write to dump file sooner,
981 include alias promoting too.
983 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
984 (may_need_named_section_p): Likewise.
985 (rename_statics): Likewise.
986 (lto_promote_cross_file_statics): Likewise.
988 2017-01-01 Jakub Jelinek <jakub@redhat.com>
990 Update copyright years.
992 2016-11-30 Georg-Johann Lay <avr@gjlay.de>
995 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
996 mismatch if the two types are built-in.
998 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1000 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
1002 2016-11-23 Richard Biener <rguenther@suse.de>
1005 * lto.c (hash_canonical_type): Ignore zero-sized fields.
1007 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1010 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
1012 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1013 Alan Hayward <alan.hayward@arm.com>
1014 David Sherwood <david.sherwood@arm.com>
1016 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
1018 2016-10-31 Richard Biener <rguenther@suse.de>
1021 * lto.c (do_whole_program_analysis): Bail out after errors
1024 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
1026 * lto-partition.c: Include tree-vrp.h.
1029 2016-09-20 Richard Biener <rguenther@suse.de>
1031 * lto.c (lto_main): Call early_finish with "<artificial>" as
1034 2016-09-19 Richard Biener <rguenther@suse.de>
1036 * lto.c (lto_main): Invoke early_finish debug hook.
1038 2016-07-25 Richard Biener <rguenther@suse.de>
1040 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
1041 (unify_scc): Likewise.
1042 (lto_read_decls): Likewise.
1044 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1046 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1048 2016-06-23 Andi Kleen <ak@linux.intel.com>
1050 * Make-lang.in: Add support for autofdo (disabled for now)
1052 2016-06-10 Martin Sebor <msebor@redhat.com>
1055 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
1056 attribute in type-generic builtins.
1058 2016-05-16 Jan Hubicka <hubicka@ucw.cz>
1060 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1062 2016-05-03 Jan Hubicka <hubicka@ucw.cz>
1064 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
1066 2016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1068 * lto-partition.h (lto_balanced_map): New parameter.
1069 * lto-partition.c (lto_balanced_map): New parameter
1071 Check if partition size is greater than max_partition_size.
1072 * lto.c (do_whole_program_analysis): Adjust calls to
1073 lto_balanced_map() to pass 2nd argument.
1075 2016-03-17 H.J. Lu <hongjiu.lu@intel.com>
1078 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
1081 2016-03-08 Jakub Jelinek <jakub@redhat.com>
1083 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
1084 - becuase -> because.
1086 2016-02-15 Tom de Vries <tom@codesourcery.com>
1089 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
1092 2016-01-27 Martin Liska <mliska@suse.cz>
1094 * lto-partition.c (add_symbol_to_partition_1): Remove usage
1097 2016-01-19 Jan Hubicka <hubicka@ucw.cz>
1100 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
1101 decls have no assemblernames.
1103 2016-01-19 Martin Liska <mliska@suse.cz>
1104 Martin Jambor <mjambor@suse.cz>
1106 * lto-partition.c: Include "hsa.h"
1107 (add_symbol_to_partition_1): Put hsa implementations into the
1108 same partition as host implementations.
1110 2016-01-12 Jan Hubicka <hubicka@ucw.cz>
1113 * lto-partition.c (rename_statics): Fix pasto.
1115 2016-01-18 Richard Biener <rguenther@suse.de>
1118 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
1119 function vs. variable.
1121 2016-01-12 Richard Biener <rguenther@suse.de>
1124 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
1125 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
1127 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1129 Update copyright years.
1131 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
1134 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
1135 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
1136 (lto_symtab_prevailing_decl): Use it.
1138 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
1140 * lto.c: Include stringpool.h and fold-const.h.
1141 (offload_handle_link_vars): New static function.
1142 (lto_main): Call offload_handle_link_vars.
1144 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
1146 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
1148 2015-12-11 Jan Hubicka <hubicka@ucw.cz>
1151 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
1152 values of error and warning attributes.
1154 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
1157 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
1159 (LTO_NO_PREVAIL): Use gcc_checking_assert.
1161 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
1164 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
1167 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
1170 * lto-symtab.c: Include lto-symtab.h.
1171 (lto_cgraph_replace_node): Do not merge profiles here.
1172 (lto_symtab_merge_p): New function.
1173 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
1174 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
1176 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
1177 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
1178 * lto.c: Include lto-symtab.h
1179 * lto-symtab.h: New.
1181 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
1184 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
1185 are not part of the definition.
1186 (contained_in_symbol): Likewise.
1187 (promote_symbol): When promoting a symbol also promote all transparent
1189 (rename_statics): Weakref needs unique name, too.
1191 2015-12-07 Jan Hubicka <hubicka@ucw.cz>
1194 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
1195 rename_statics, rename_statics): Handle transparent aliases.
1197 2015-12-04 Jan Hubicka <hubicka@ucw.cz>
1199 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
1202 2015-12-01 Jan Hubicka <hubicka@ucw.cz>
1204 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
1206 2015-11-25 Jan Hubicka <jh@suse.cz>
1208 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
1209 * lang.opt (lto_linker_output): New enum.
1210 (flinker_output): New flag.
1212 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
1214 * lto-symtab.c: Include alias.h
1215 (warn_type_compatibility_p): Replace types_compatible_p checks by
1216 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
1217 (lto_symtab_merge): Compare DECL sizes.
1218 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
1220 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
1222 * lto.c (iterative_hash_canonical_type): Recruse for all types
1223 which pass !canonical_type_used_p.
1224 (gimple_register_canonical_type_1): Sanity check we do not compute
1225 canonical type of anything with !canonical_type_used_p.
1226 (gimple_register_canonical_type): Skip all types that are
1227 !canonical_type_used_p
1229 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
1231 * lto.c (unify_scc): Use free_node.
1233 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
1235 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
1236 (gimple_register_canonical_type_1): Check that pointers do not get
1238 (gimple_register_canonical_type): Do not register pointers.
1240 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
1242 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
1243 flag for types that are not ODR; fix loop walking parameters.
1245 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1247 * lto-lang.c: Remove unused header files.
1248 * lto-object.c: Likewise.
1249 * lto-partition.c: Likewise.
1250 * lto-symtab.c: Likewise.
1253 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1255 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
1257 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1259 * lto-lang.c: Don't undef DEF_BUILTIN.
1261 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1263 * lto-lang.c: Reorder #include's and remove duplicates.
1264 * lto-object.c: Likewise.
1265 * lto-partition.c: Likewise.
1266 * lto-symtab.c: Likewise.
1269 2015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
1271 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
1273 (lto_fixup_state): Likewise.
1274 (do_whole_program_analysis): Use
1275 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
1278 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1280 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1281 DEF_FUNCTION_TYPE_11): Define.
1283 2015-10-10 Jan Hubicka <hubicka@ucw.cz>
1285 * lto.c (hash_canonical_type): Honor
1286 type_with_interoperable_signedness.
1288 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1290 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
1291 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1293 2015-08-31 Richard Biener <rguenther@suse.de>
1295 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
1296 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
1297 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
1298 participate in merging with something else.
1300 2015-08-31 Richard Biener <rguenther@suse.de>
1302 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
1303 test, do not replace a non-builtin with a builtin.
1304 * lto.c (compare_tree_sccs_1): Do not merge things we stream
1305 as builtins vs. non-builtins.
1307 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1309 * lto.h: Remove useless typedefs.
1311 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
1313 * lto.c: Remove redundant includes.
1315 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
1317 * lto-lang.c: Fix double word typos.
1319 2015-07-10 Andrew MacLeod <amacleod@redhat.com>
1321 * lto.c: Include cfghooks.h rather than predict.h.
1323 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1325 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1327 * lto-object.c: Likewise.
1328 * lto-partition.c: Likewise.
1329 * lto-symtab.c: Likewise.
1331 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1333 * lto-lang.c: Adjust includes for flags.h changes.
1335 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1337 * lto-lang.c: Adjust includes.
1338 * lto-object.c: Likewise.
1339 * lto-partition.c: Likewise.
1340 * lto-symtab.c: Likewise.
1343 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1345 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1346 * lto-object.c: Likewise.
1347 * lto-partition.c: Likewise.
1348 * lto-symtab.c: Likewise.
1349 * lto-tree.h: Likewise.
1352 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1354 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1355 than typed_noop_remove. Remove redudant typedefs.
1357 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1359 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1360 * lto-object.c: Likewise.
1361 * lto-partition.c: Likewise.
1362 * lto-symtab.c: Likewise.
1365 2015-06-14 Jan Hubicka <hubicka@ucw.cz>
1368 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1370 2015-06-12 DJ Delorie <dj@redhat.com>
1372 * lto-lang.c (lto_type_for_size): Include intN types.
1373 (lto_type_for_mode): Likewise.
1375 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
1377 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1379 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1381 * lto-lang.c : Adjust include files.
1382 * lto-object.c : Likewise.
1383 * lto-partition.c : Likewise.
1384 * lto-partition.h : Likewise.
1385 * lto-symtab.c : Likewise.
1389 2015-06-06 Jan Hubicka <hubicka@ucw.cz>
1392 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1393 odr_or_derived_type_p.
1394 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1396 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
1398 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1401 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1403 * lto-lang.c (lto_write_globals): Remove.
1404 (LANG_HOOKS_WRITE_GLOBALS): Same.
1406 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1408 * lto-lang.c: Adjust includes for restructured coretypes.h.
1409 * lto-object.c: Likewise.
1410 * lto-partition.c: Likewise.
1411 * lto-symtab.c: Likewise.
1414 2015-06-04 Jan Hubicka <hubicka@ucw.cz>
1416 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1418 2015-06-03 Jan Hubicka <hubicka@ucw.cz>
1420 * lto.c (iterative_hash_canonical_type,
1421 gimple_register_canonical_type): only hash main variants of types
1423 2015-05-27 Martin Liska <mliska@suse.cz>
1425 * lto-partition.c (new_partition): Reset number of symbols.
1426 (add_symbol_to_partition_1): Increment number of symbols.
1427 (undo_partition): Decrement number of symbols.
1428 (lto_balanced_map): Dump number of symbols and insns that
1429 belong to a partition.
1430 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1432 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
1434 * lto.c (hash_canonical_type): Be sure we hash only types that
1436 (gimple_register_canonical_type_1): Do not produce canonical
1437 types for types that do not need alias sets.
1439 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
1441 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1443 2015-05-19 Jan Hubicka <hubicka@ucw.cz>
1445 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1447 2015-05-17 Jan Hubicka <hubicka@ucw.cz>
1449 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1450 compare ODR types (if available) and function types.
1451 (lto_symtab_merge): ... here; output ODR violation warnings
1452 and call warn_types_mismatch.
1454 2015-04-29 Jan Hubicka <hubicka@ucw.cz>
1456 * lto.c (lto_fixup_state): Call verify_type.
1458 2015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1460 * lto.c: Adjust for hash_table changes.
1462 2015-03-27 Jan Hubicka <hubicka@ucw.cz>
1464 * lto.c (lto_read_decls): Move code registering odr types out
1465 of TYPE_CANONICAL conditional and also register polymorphic types.
1467 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
1469 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1470 DECL_ARTIFICAL symbols.
1472 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
1475 * lto.c (unify_scc): Revert location cache when unification
1477 (lto_read_decls): Accept location cache after sucess;
1478 apply location cache before calling debug hooks.
1480 2015-03-10 Jan Hubicka <hubicka@ucw.cz>
1482 * lto.c (read_cgraph_and_symbols): Do not do merging
1485 2015-02-26 Jakub Jelinek <jakub@redhat.com>
1487 * lto.c (lto_mode_identity_table): New variable.
1488 (lto_read_decls): Add mode_table argument to the lto_input_block
1490 (lto_file_finalize): Initialize mode_table.
1491 (lto_init): Initialize lto_mode_identity_table.
1493 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1496 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1498 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1500 2015-02-03 Jan Hubicka <hubicka@ucw.cz>
1502 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1504 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1506 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1507 changed to pass input_location as first argument.
1509 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
1511 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1513 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
1515 * lto.c (compare_tree_sccs_1): Add comparsion of
1516 DECL_FUNCTION_SPECIFIC_TARGET
1518 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1519 James Norris <jnorris@codesourcery.com>
1521 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1523 * lto.c: Include "gomp-constants.h".
1525 2015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1527 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1528 from select_what_to_stream.
1530 2015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1531 Jakub Jelinek <jakub@redhat.com>
1534 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1537 2015-01-09 Michael Collison <michael.collison@linaro.org>
1539 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1540 input.h, alias.h, symtab.h, options, fold-const.h,
1541 wide-int.h, and inchash.h due to flattening of tree.h.
1542 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1543 input.h, alias.h, symtab.h, fold-const.h,
1544 wide-int.h, and inchash.h due to flattening of tree.h.
1545 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1546 input.h, alias.h, symtab.h, options, fold-const.h,
1547 wide-int.h, and inchash.h due to flattening of tree.h.
1548 * lto-partition.c: Ditto.
1549 * lto-symtab.c: Ditto.
1551 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1553 Update copyright years.
1555 2014-12-22 Martin Liska <mliska@suse.cz>
1557 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1559 (undo_partition): Likewise.
1560 (lto_balanced_map): Likewise.
1562 2014-12-22 Martin Liska <mliska@suse.cz>
1564 * lto-partition.c: Include of symbol-summary.h is added.
1565 * lto-symtab.c: Likewise.
1568 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
1571 * lto.c (read_cgraph_and_symbols): Update call of
1572 remove_unreachable_nodes.
1573 (do_whole_program_analysis): Remove call of
1574 symtab->remove_unreachable_nodes
1576 2014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1578 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1579 htab with malloc instead of ggc.
1581 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1583 * lto.c: Replace htab with hash_table.
1585 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1587 * lto.c (lto_read_in_decl_state): Adjust.
1588 (lto_fixup_state): Likewise.
1590 2014-11-17 Jan Hubicka <hubicka@ucw.cz>
1592 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1594 2014-11-14 Jan Hubicka <hubicka@ucw.cz>
1596 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1598 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1599 Bernd Schmidt <bernds@codesourcery.com>
1600 Andrey Turetskiy <andrey.turetskiy@intel.com>
1601 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1603 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1605 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1606 Ilya Tocar <ilya.tocar@intel.com>
1607 Andrey Turetskiy <andrey.turetskiy@intel.com>
1608 Bernd Schmidt <bernds@codesourcery.com>
1610 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1611 LTO_SECTION_NAME_PREFIX.
1612 * lto-partition.c (lto_promote_cross_file_statics): Call
1613 select_what_to_stream.
1614 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1615 LTO_SECTION_NAME_PREFIX.
1616 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1617 being built as an offload compiler.
1619 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1621 * lto-lang.c: Remove redundant enum from machine_mode.
1623 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1625 * lto.c: Adjust include files.
1626 * lto-lang.c: Ditto.
1627 * lto-object.c: Ditto.
1628 * lto-partition.c: Ditto.
1629 * lto-symtab.c: Ditto.
1631 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1633 * lto-lang.c: Adjust include files.
1634 * lto-object.c: Ditto.
1635 * lto-partition.c: Ditto.
1636 * lto-symtab.c: Ditto.
1639 2014-10-16 DJ Delorie <dj@redhat.com>
1641 * lto-object.c (lto_obj_begin_section): In the event that pointer
1642 sizes aren't powers of two, choose a more suitable alignment
1643 than (unsigned)(-1).
1645 2014-10-14 DJ Delorie <dj@redhat.com>
1647 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1649 (lto_init): Initialize all intN types, not just int128.
1651 2014-10-06 Martin Liska <mliska@suse.cz>
1653 * lto.c (stream_out): ARG_UNUSED added for last argument.
1655 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1657 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1660 2014-09-23 Andi Kleen <ak@linux.intel.com>
1662 * lto-partition.c (node_cmp): Update comment.
1663 (varpool_node_cmp): Use symtab_node for comparison.
1664 (add_sorted_nodes): New function.
1665 (lto_balanced_map): Change to keep ordered queue
1666 of ordered node. Handle no_reorder attribute.
1668 2014-09-11 Jan Hubicka <hubicka@ucw.cz>
1670 * lto.c (lto_read_decls): Register ODR types.
1672 2014-08-20 Jan Hubicka <hubicka@ucw.cz>
1674 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1676 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1678 2014-08-14 Jan Hubicka <hubicka@ucw.cz>
1680 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1682 2014-08-14 Richard Biener <rguenther@suse.de>
1685 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1687 2014-08-08 Richard Biener <rguenther@suse.de>
1689 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1691 2014-08-08 Bin Cheng <bin.cheng@arm.com>
1694 * lto-lang.c (lto_init): Switch mis-matched arguments.
1696 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1698 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1700 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1702 * lto-partition.c, lto-partition.h: Use hash_set instead of
1705 2014-07-31 Andi Kleen <ak@linux.intel.com>
1707 * lto.c (hash_canonical_type): Use inchash::hash
1708 and use inchash::add_expr.
1709 (iterative_hash_canonical_type): Dito.
1711 2014-07-30 Richard Biener <rguenther@suse.de>
1713 * lto-streamer.h (lto_write_data): New function.
1714 * langhooks.c (lhd_append_data): Do not free block.
1715 * lto-section-out.c (lto_write_data): New function writing
1716 raw data to the current section.
1717 (lto_write_stream): Adjust for langhook semantic change.
1718 (lto_destroy_simple_output_block): Write header directly.
1719 * lto-opts.c (lto_write_options): Write options directly.
1720 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1721 (lto_output_toplevel_asms): Likewise.
1722 (copy_function_or_variable): Copy data directly.
1723 (write_global_references): Output index table directly.
1724 (lto_output_decl_state_refs): Likewise.
1725 (write_symbol): Write data directly.
1726 (produce_symtab): Adjust.
1727 (produce_asm_for_decls): Output header and refs directly.
1729 2014-07-25 Andi Kleen <ak@linux.intel.com>
1731 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1733 2014-07-25 Andi Kleen <ak@linux.intel.com>
1735 * lto.c (hash_canonical_type): Convert to inchash.
1736 (iterative_hash_canonical_type): Dito.
1738 2014-07-25 Andi Kleen <ak@linux.intel.com>
1740 * lto.c: Include inchash.h
1742 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1744 * lto.c (mentions_vars_p_decl_non_common): Skip
1746 mentions_vars_p_function): Do DECL_ARGUMENTS.
1747 (lto_fixup_prevailing_decls): Update.
1749 2014-07-12 Jan Hubicka <hubicka@ucw.cz>
1751 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1753 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1755 2014-07-11 Jan Hubicka <hubicka@ucw.cz>
1757 * lto-partition.c (add_references_to_partition): Use
1758 varpool_ctor_useable_for_folding_p.
1759 * lto.c (lto_read_in_decl_state): Update sanity check.
1761 2014-07-01 Martin Liska <mliska@suse.cz>
1763 IPA REF alias refactoring
1764 * lto-partition.c (add_symbol_to_partition_1): Usage of
1765 FOR_EACH_ALIAS added.
1767 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
1770 * lto.c (lto_copy_fields_not_streamed): New function.
1771 (compare_tree_sccs_1): Do not compare fields shared in between type
1773 (lto_read_decls): Fixup types first before inserting into hash.
1775 2014-06-28 Andrew Pinski <apinski@cavium.com>
1777 * lto.c (lto_read_decls): Fix comment in comment.
1779 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
1781 * lto.c (lto_copy_fields_not_streamed): New function.
1782 (compare_tree_sccs_1): Do not compare fields shared in between type
1784 (lto_read_decls): Fixup types first before inserting into hash.
1786 2014-06-25 Martin Liska <mliska@suse.cz>
1788 * lto-partition.c (add_references_to_partition): New IPA REF function
1790 (add_symbol_to_partition_1): Likewise.
1791 (lto_balanced_map): Likewise.
1792 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
1794 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1796 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1797 (mentions_vars_p_function): ... here.
1798 (compare_tree_sccs_1): Update VINDEX checks.
1799 (lto_fixup_prevailing_decls): Likewise.
1801 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1803 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1806 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1810 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
1812 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1814 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
1816 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1818 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1820 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1822 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1824 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1825 (do_whole_program_analysis): Use verify_symtab.
1827 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1829 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1830 lto_fixup_prevailing_decls): Skip section names.
1832 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1834 * lto-symtab.c: Include builtins.h.
1836 2014-05-26 Richard Biener <rguenther@suse.de>
1838 * lto.c (lto_parse_hex): Use int64_t.
1839 (lto_resolution_read): Likewise.
1841 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1843 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1845 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1847 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1849 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1851 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1853 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1854 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1855 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1857 2012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1859 * lto-object.c: Include "lto-section-names.h".
1860 (LTO_SEGMENT_NAME): Don't define.
1861 * lto.c: Include "lto-section-names.h".
1863 2014-05-17 Jan Hubicka <hubicka@ucw.cz>
1866 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1867 mixed with variables.
1869 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1871 * lto-tree.h: Don't use variable_size gty attribute.
1872 * lto.c (lto_read_in_decl_state): Adjust.
1873 (create_subid_section_table): Likewise.
1874 (lto_flatten_files): Likewise.
1875 (read_cgraph_and_symbols): Likewise.
1877 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1878 Mike Stump <mikestump@comcast.net>
1879 Richard Sandiford <rdsandiford@googlemail.com>
1881 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1882 * lto-lang.c (get_nonnull_operand): Likewise.
1884 2014-04-28 Richard Biener <rguenther@suse.de>
1887 * lto-lang.c: Define flag_isoc11.
1889 2014-04-23 David Malcolm <dmalcolm@redhat.com>
1891 * lto-partition.c (add_references_to_partition): Update for
1892 removal of implicit pointer from the is-a.h API.
1893 (add_symbol_to_partition_1): Likewise.
1894 (contained_in_symbol): Likewise.
1895 (undo_partition): Likewise.
1896 (lto_balanced_map): Likewise.
1897 (promote_symbol): Likewise.
1898 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1899 (lto_symtab_merge_symbols): Likewise.
1900 * lto.c (lto_wpa_write_files): Likewise.
1902 2014-04-15 Richard Biener <rguenther@suse.de>
1904 * lto.c: Include params.h.
1905 (do_whole_program_analysis): Switch on flag_lto_partition value,
1906 add support for LTO_PARTITION_ONE.
1907 * lto-partition.h (lto_balanced_map): Adjust.
1908 * lto-partition.c (lto_balanced_map): Get number of desired
1909 partitions as argument to support -flto-partition=one.
1911 2014-04-14 Jan Hubicka <hubicka@ucw.cz>
1913 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1916 2014-03-19 Jan Hubicka <hubicka@ucw.cz>
1918 * lto.c: Include ipa-inline.h
1919 (do_whole_program_analysis): Free inline summary after partitioning.
1921 2014-03-19 Richard Biener <rguenther@suse.de>
1924 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1925 instead of TREE_CHAIN as chain_next.
1927 2014-03-19 Richard Biener <rguenther@suse.de>
1929 * lto.c (lto_wpa_write_files): Move call to
1930 lto_promote_cross_file_statics ...
1931 (do_whole_program_analysis): ... here, into the partitioning
1932 block. Do not ggc_collect after lto_wpa_write_files but
1933 for a last time before it.
1935 2014-03-19 Jakub Jelinek <jakub@redhat.com>
1938 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1941 2014-03-18 Jakub Jelinek <jakub@redhat.com>
1944 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1945 and complex_{float,{,long_}double}_type_node.
1947 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
1949 * lto-lang.c (lto_init): Pass flag_short_double to
1950 build_common_tree_nodes.
1952 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
1955 * lto.c (stream_out): Avoid parallel streaming with
1956 -flto=jobserver until we are able to throttle it down
1959 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
1961 * lto-partition.c (add_symbol_to_partition_1,
1962 undo_partition, lto_balanced_map): Aliases have no
1964 (lto_balanced_map): Do not follow refering variables
1965 if they can be optimized out.
1967 2014-02-14 Richard Biener <rguenther@suse.de>
1970 * lto.c (compare_tree_sccs_1): Do not compare
1971 DECL_FUNCTION_SPECIFIC_TARGET.
1972 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1974 2014-02-12 Richard Biener <rguenther@suse.de>
1977 * lto-lang.c (lto_write_globals): Do not call
1978 wrapup_global_declarations or emit_debug_global_declarations
1979 but emit debug info for non-function scope variables
1982 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1984 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1986 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1989 * lto-partition.c (symbol_class): Move to cgraph.h
1990 (get_symbol_class): Move to symtab.c
1991 (add_references_to_partition, add_symbol_to_partition_1,
1992 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1993 lto_promote_cross_file_statics): Update.
1995 2014-02-05 Jan Hubicka <hubicka@ucw.cz>
1997 * lto.c (lto_parallelism): New static var.
1998 (do_stream_out, wait_for_child, stream_out): New static functions.
1999 (lto_wpa_write_files): Add support for parallel streaming.
2000 (do_whole_program_analysis): Set parallelism.
2001 * lang.opt (fwpa): Add parameter.
2002 * lto-lang.c (lto_handle_option): Handle flag_wpa.
2003 (lto_init): Update use of flag_wpa.
2004 * lto-streamer.h (asm_nodes_output): Declare.
2006 2014-02-05 Richard Biener <rguenther@suse.de>
2008 * lto.h (lto_global_var_decls): Remove.
2009 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
2010 (lto_write_globals): Do nothing in WPA stage, gather globals from
2011 the varpool here ...
2012 * lto.c (lto_main): ... not here.
2013 (materialize_cgraph): Do not call rest_of_decl_compilation
2014 on the empty lto_global_var_decls vector.
2015 (lto_global_var_decls): Remove.
2017 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
2019 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
2020 needs duplicating, not generic COMDAT.
2022 2014-02-04 Richard Biener <rguenther@suse.de>
2025 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
2026 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
2028 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
2032 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
2033 merge force_output and forced_by_abi flags.
2035 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2037 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
2040 2014-01-09 Richard Biener <rguenther@suse.de>
2042 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
2044 2014-01-09 Richard Biener <rguenther@suse.de>
2047 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
2048 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
2049 (gimple_canonical_types_compatible_p): Do not compare them either.
2051 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2053 Update copyright years
2055 2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
2057 * lto.c: Remove struct tags when referring to class varpool_node.
2058 * lto-partition.c: Likewise.
2059 * lto-symtab.c: Likewise.
2061 2013-11-29 Jakub Jelinek <jakub@redhat.com>
2062 Richard Biener <rguenther@suse.de>
2065 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
2067 2013-11-29 Jakub Jelinek <jakub@redhat.com>
2070 * lto.c (mentions_vars_p_omp_clause): New function.
2071 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
2074 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
2076 * lto.c: Add required include files from gimple.h.
2077 * lto-lang.c: Likewise.
2078 * lto-object.c: Likewise.
2079 * lto-partition.c: Likewise.
2080 * lto-symtab.c: Likewise.
2082 2013-11-18 Trevor Saunders <tsaunders@mozilla.com>
2084 * lto-partition.c lto-symtab.c lto.c Adjust.
2086 2013-11-14 Diego Novillo <dnovillo@google.com>
2088 * lto-lang.c: Include stringpool.h.
2089 Include stor-layout.h.
2090 * lto-partition.c: Include gcc-symtab.h.
2091 * lto.c: Include stor-layout.h.
2093 2013-10-31 David Malcolm <dmalcolm@redhat.com>
2095 Automated part of renaming of symtab_node_base to symtab_node.
2097 Patch autogenerated by rename_symtab.py from
2098 https://github.com/davidmalcolm/gcc-refactoring-scripts
2099 revision 58bb219cc090b2f4516a9297d868c245495ee622
2101 * lto-partition.c (add_symbol_to_partition): Rename
2102 symtab_node_base to symtab_node.
2103 (get_symbol_class): Likewise.
2104 (symbol_partitioned_p): Likewise.
2105 (add_references_to_partition): Likewise.
2106 (add_symbol_to_partition_1): Likewise.
2107 (contained_in_symbol): Likewise.
2108 (add_symbol_to_partition): Likewise.
2109 (lto_1_to_1_map): Likewise.
2110 (lto_max_map): Likewise.
2111 (lto_balanced_map): Likewise.
2112 (privatize_symbol_name): Likewise.
2113 (promote_symbol): Likewise.
2114 (may_need_named_section_p): Likewise.
2115 (rename_statics): Likewise.
2116 (lto_promote_statics_nonwpa): Likewise.
2117 * lto-symtab.c (lto_symtab_merge): Likewise.
2118 (lto_symtab_resolve_replaceable_p): Likewise.
2119 (lto_symtab_symbol_p): Likewise.
2120 (lto_symtab_resolve_can_prevail_p): Likewise.
2121 (lto_symtab_resolve_symbols): Likewise.
2122 (lto_symtab_merge_decls_2): Likewise.
2123 (lto_symtab_merge_decls_1): Likewise.
2124 (lto_symtab_merge_decls): Likewise.
2125 (lto_symtab_merge_symbols_1): Likewise.
2126 (lto_symtab_merge_symbols): Likewise.
2127 (lto_symtab_prevailing_decl): Likewise.
2128 * lto.c (lto_wpa_write_files): Likewise.
2129 (read_cgraph_and_symbols): Likewise.
2130 (do_whole_program_analysis): Likewise.
2132 2013-10-30 David Malcolm <dmalcolm@redhat.com>
2134 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
2135 declarations onto multiple lines to make things easier for
2137 (lto_symtab_merge_decls_1): Likewise.
2138 (lto_symtab_merge_symbols_1): Likewise.
2140 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2142 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
2143 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
2146 2013-10-29 David Malcolm <dmalcolm@redhat.com>
2148 Patch autogenerated by refactor_symtab.py from
2149 https://github.com/davidmalcolm/gcc-refactoring-scripts
2150 revision 58bb219cc090b2f4516a9297d868c245495ee622
2152 * lto-partition.c (lto_promote_cross_file_statics): Update for
2153 conversion of symtab types to a true class hierarchy.
2154 (rename_statics): Likewise.
2155 (promote_symbol): Likewise.
2156 (privatize_symbol_name): Likewise.
2157 (lto_balanced_map): Likewise.
2158 (varpool_node_cmp): Likewise.
2159 (node_cmp): Likewise.
2160 (lto_1_to_1_map): Likewise.
2161 (undo_partition): Likewise.
2162 (add_symbol_to_partition): Likewise.
2163 (contained_in_symbol): Likewise.
2164 (add_symbol_to_partition_1): Likewise.
2165 (add_references_to_partition): Likewise.
2166 (symbol_partitioned_p): Likewise.
2167 (get_symbol_class): Likewise.
2168 (lto_max_map): Likewise.
2169 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
2170 (lto_symtab_merge_symbols): Likewise.
2171 (lto_symtab_merge_symbols_1): Likewise.
2172 (lto_symtab_merge_decls): Likewise.
2173 (lto_symtab_merge_decls_1): Likewise.
2174 (lto_symtab_merge_decls_2): Likewise.
2175 (lto_symtab_resolve_symbols): Likewise.
2176 (lto_symtab_resolve_can_prevail_p): Likewise.
2177 (lto_symtab_symbol_p): Likewise.
2178 (lto_symtab_resolve_replaceable_p): Likewise.
2179 (lto_symtab_merge): Likewise.
2180 (lto_varpool_replace_node): Likewise.
2181 (lto_cgraph_replace_node): Likewise.
2182 * lto.c (lto_main): Likewise.
2183 (do_whole_program_analysis): Likewise.
2184 (materialize_cgraph): Likewise.
2185 (read_cgraph_and_symbols): Likewise.
2186 (cmp_partitions_order): Likewise.
2187 (lto_materialize_function): Likewise.
2188 (has_analyzed_clone_p): Likewise.
2190 2013-10-29 Andrew MacLeod <amacleod@redhat.com>
2192 * lto-object.c: Add gimple.h to include list.
2193 * lto-partition.c: Likewise.
2195 2013-10-18 Andrew MacLeod <amacleod@redhat.com>
2197 * lto.c: Remove tree-flow.h from include list.
2199 2013-10-15 Richard Biener <rguenther@suse.de>
2201 * lto.c (hash_canonical_type): Split out from ...
2202 (iterative_hash_canonical_type): ... here. Register types
2204 (gimple_canonical_type_hash): Adjust.
2205 (gimple_register_canonical_type_1): Split out from ...
2206 (gimple_register_canonical_type): ... here. Cache computed
2208 (lto_register_canonical_types): Split into two modes,
2209 clearing and computing TYPE_CANONICAL.
2210 (lto_read_decls): Adjust.
2211 (read_cgraph_and_symbols): Do two passes over global trees,
2212 first clearing then computing TYPE_CANONICAL.
2214 2013-10-14 Richard Biener <rguenther@suse.de>
2216 * lto.c (gimple_canonical_types): Move out-of GC space.
2217 (canonical_type_hash_cache): Make a pointer-map.
2218 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
2220 (iterative_hash_canonical_type): Adjust.
2221 (read_cgraph_and_symbols): Likewise.
2222 (print_lto_report_1): Likewise.
2224 2013-10-14 Richard Biener <rguenther@suse.de>
2226 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
2227 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
2228 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
2229 gimple_types_compatible_p_1, gimple_types_compatible_p,
2230 visit, iterative_hash_name, struct type_hash_pair,
2231 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2232 gimple_type_eq, gimple_register_type, num_not_merged_types,
2233 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
2234 num_not_merged_types_in_same_scc_trees): Remove old merging code
2236 (lto_read_decls): Do not run old merging code in parallel.
2237 (read_cgraph_and_symbols): Do not init/free old merging
2239 (print_lto_report_1): Do not report differences of old vs. new
2242 2013-10-14 Richard Biener <rguenther@suse.de>
2244 * lto-lang.c (lto_init): Do not re-init canonical types here.
2245 (lto_register_canonical_types): Move to ...
2246 * lto.c (lto_register_canonical_types): ... here.
2247 (gimple_canonical_types, canonical_type_hash_cache,
2248 iterative_hash_canonical_type, gimple_canonical_type_hash,
2249 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
2250 gimple_register_canonical_type): Add canonical type merging machinery
2251 moved from gimple.c.
2252 (read_cgraph_and_symbols): Init and free canonical type tables
2254 (print_lto_report_1): Report canonical type table stats here.
2256 2013-10-11 Jakub Jelinek <jakub@redhat.com>
2258 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
2260 2013-09-25 Tom Tromey <tromey@redhat.com>
2262 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
2263 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
2264 (lto/lto-object.o): Remove.
2266 2013-09-06 Richard Biener <rguenther@suse.de>
2268 * lto-symtab.c: Move from gcc/
2269 * lto.h: Include vec.h.
2270 (lto_global_var_decls): Declare.
2271 * lto.c (lto_global_var_decls): Move definition here.
2272 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
2273 (lto-symtab.o): Add.
2274 * config-lang.in (gtfiles): Add lto.h.
2276 2013-08-31 Jan Hubicka <jh@suse.cz>
2278 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
2279 DECL_FIELD_OFFSET can contain an reference to variable.
2281 2013-08-31 Jan Hubicka <jh@suse.cz>
2283 * lto.c (tree_with_vars): Turn into vector.
2284 (MAYBE_REMEMBER_WITH_VARS): Change to...
2285 (CHECK_VAR): ... this one.
2286 (CHECK_NO_VAR): New macro.
2287 (maybe_remember_with_vars_typed): Turn to ...
2288 (mentions_vars_p_typed): ... this one.
2289 (maybe_remember_with_vars_common): Turn to ...
2290 (mentions_vars_p_comon): ... this one.
2291 (maybe_remember_with_vars_decl_minimal): Turn to ...
2292 (mentions_vars_p_decl_minmal): ... this one.
2293 (maybe_remember_with_vars_decl_common): Turn to ...
2294 (mentions_vars_p_decl_common): ... this one.
2295 (maybe_remember_with_vars_decl_with_vis): Turn to ...
2296 (mentions_vars_p_decl_with_vis): ... this one.
2297 (maybe_remember_with_vars_decl_non_common): Turn to ...
2298 (mentions_vars_p_decl_non_common): ... this one.
2299 (maybe_remember_with_vars_function): Turn to ...
2300 (mentions_vars_p_function): ... this one.
2301 (maybe_remember_with_vars_field_decl): Turn to ...
2302 (mentions_vars_p_field_decl): ... this one.
2303 (maybe_remember_with_vars_type): Turn to ...
2304 (mentions_vars_p_type): ... this one.
2305 (maybe_remember_with_vars_binfo): Turn to ...
2306 (mentions_vars_p_binfo): ... this one.
2307 (maybe_remember_with_vars_constructor): Turn to ...
2308 (mentions_vars_p_constructor): ... this one.
2309 (maybe_remember_with_vars_expr): Turn to ...
2310 (mentions_vars_p_expr): ... this one.
2311 (maybe_remember_with_vars): Turn to ...
2312 (mentions_vars_p): ... this one.
2313 (lto_read_decls): Update.
2314 (LTO_SET_PREVAIL): Do not call function for internal decls.
2315 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2316 check that something was updated.
2317 (lto_fixup_state): Do not care about internal decls.
2318 (lto_fixup_decls): Update.
2319 (read_cgraph_and_symbols): Update.
2321 2013-08-29 Jan Hubicka <jh@suse.cz>
2323 * lto.c (read_cgraph_and_symbols): Free decl states.
2325 2013-08-29 Jan Hubicka <jh@suse.cz>
2327 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2328 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2331 2013-08-28 Jan Hubicka <jh@suse.cz>
2333 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2334 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2335 (unify_scc): Do checking assert.
2337 2013-08-06 Jan Hubicka <jh@suse.cz>
2338 Martin Liska <marxin.liska@gmail.com>
2340 * lto-partition.c (lto_balanced_map): Always base order on
2343 2013-08-06 Jan Hubicka <jh@suse.cz>
2345 * lto.c (lto_materialize_function): Do not read body anymore.
2347 2013-08-02 Jan Hubicka <jh@suse.cz>
2349 * lto.c (lto_materialize_function): Do not push struct function.
2350 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2351 (may_need_named_section_p): Even abstract origins may need
2354 2013-07-30 David Malcolm <dmalcolm@redhat.com>
2356 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2359 * lto.c (do_whole_program_analysis): Update for move of
2360 all_regular_ipa_passes from a global to a field of class
2363 2013-07-21 Ondřej BÃÂlka <neleai@seznam.cz>
2365 * lto-partition.c: Fix typos.
2367 2013-06-20 Jan Hubicka <jh@suse.cz>
2369 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2370 partitioning of variables.
2372 2013-06-20 Jan Hubicka <jh@suse.cz>
2374 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2376 2013-06-19 Jan Hubicka <jh@suse.cz>
2378 * lto-partition.c (add_references_to_partition): Use
2381 2013-06-18 Richard Biener <rguenther@suse.de>
2383 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2385 (lto_register_function_decl_in_symtab): Likewise.
2386 (cmp_tree): New function.
2387 (unify_scc): Instead of using the streamer cache map from entry
2388 to cache index match up the two maps we have by sorting them.
2389 Adjust calls to lto_register_var_decl_in_symtab and
2390 lto_register_function_decl_in_symtab.
2392 2013-06-17 Richard Biener <rguenther@suse.de>
2394 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2395 * lto.c: Include data-streamer.h.
2396 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2397 (gimple_type_leader_entry_s, gimple_type_leader,
2398 gimple_lookup_type_leader): Remove.
2399 (gtc_visit): Simplify.
2400 (gimple_types_compatible_p): Likewise.
2401 (gimple_register_type_1): Likewise. Merge into ...
2402 (gimple_register_type): ... this. Keep it as legacy for
2403 statistics purposes for now.
2404 (fixup_integer_cst): Remove.
2405 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2407 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2408 maybe_remember_with_vars_*): ... these.
2409 (uniquify_nodes): Remove.
2410 (lto_fixup_prevailing_type): New function.
2411 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2412 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2413 (num_merged_types, num_prevailing_types, num_not_merged_types,
2414 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2415 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2416 num_scc_compare_collisions): New global counters.
2417 (compare_tree_sccs_1): New function.
2418 (compare_tree_sccs): Likewise.
2419 (unify_scc): Likewise.
2420 (lto_read_decls): Stream in tree SCCs and unify them on the
2421 way in. Finalize prevailing SCC tree members.
2422 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2423 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2424 to ggc-collect during merging.
2425 (print_lto_report_1): Adjust for new merging code.
2427 2013-06-12 Jan Hubicka <jh@suse.cz>
2429 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2431 2013-06-12 Jan Hubicka <jh@suse.cz>
2433 * lto.c (register_resolution): Take lto_file_data argument.
2434 (lto_register_var_decl_in_symtab,
2435 lto_register_function_decl_in_symtab): Update.
2436 (read_cgraph_and_symbols): Update resolution_map handling.
2438 2013-06-11 Jan Hubicka <jh@suse.cz>
2440 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2441 (add_symbol_to_partition_1): Likewise.
2442 (contained_in_symbol): Likewise.
2443 (lto_balanced_map): Likewise.
2444 (rename_statics): Drop weakref.
2446 2013-06-05 Richard Biener <rguenther@suse.de>
2448 * lto.c (num_merged_types): New global variable.
2449 (uniquify_nodes): Increase num_merged_types when merging a type.
2450 (print_lto_report_1): Output the number of merged types.
2452 2013-06-01 Jan Hubicka <jh@suse.cz>
2454 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2455 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2456 (do_whole_program_analysis): Update dumping.
2458 2013-05-29 Jan Hubicka <jh@suse.cz>
2460 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2462 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2464 2013-05-15 Jan Hubicka <jh@suse.cz>
2466 * lto-partition.c (privatize_symbol_name): Return true when
2467 privatizing happened.
2468 (rename_statics): Do not go into infinite loop when privatizing
2471 2013-05-16 Jason Merrill <jason@redhat.com>
2473 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2475 2013-05-15 Martin Jambor <mjambor@suse.cz>
2477 * lto-partition.c (lto_balanced_map): Print symbol order instead
2480 2013-05-15 Jan Hubicka <jh@suse.cz>
2484 * lto-partition.c (get_symbol_class): Fix weakrefs.
2485 (lto_balanced_map): Fix weakrefs.
2486 (privatize_symbol_name): Remove unnecesary label.
2487 (rename_statics): Handle weakrefs as statics.
2489 2013-05-09 Jan Hubicka <jh@suse.cz>
2490 Richard Biener <rguenther@suse.de>
2492 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2493 (lto_register_var_decl_in_symtab): Likewise.
2494 (lto_main): Promote statics.
2495 * lto-partition.c (privatize_symbol_name): New function.
2496 (promote_symbol): Use it.
2497 (may_need_named_section_p): New predicate.
2498 (rename_statics): New functions.
2499 (lto_promote_cross_file_statics): Simplify; do renaming.
2500 (lto_promote_statics_nonwpa): New function.
2501 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2503 2013-02-08 Richard Biener <rguenther@suse.de>
2506 * lto-lang.c (lto_init): Do not enter a dummy file.
2508 2013-02-07 Uros Bizjak <ubizjak@gmail.com>
2511 * lto.c (lto_resolution_ready): Use %wx instead of
2512 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2514 2013-02-04 Richard Guenther <rguenther@suse.de>
2517 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2518 or lto_fixup_decls at LTRANS time.
2520 2013-01-09 Jan Hubicka <jh@suse.cz>
2523 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2525 2012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2528 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2530 (lto_main): Record the global variables if WPA isn't enabled.
2532 2012-11-20 Diego Novillo <dnovillo@google.com>
2533 Jakub Jelinek <jakub@redhat.com>
2535 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2537 2012-11-16 Diego Novillo <dnovillo@google.com>
2539 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2541 * lto-lang.c: Use new vec API in vec.h.
2542 * lto-partition.c: Likewise.
2543 * lto-partition.h: Likewise.
2546 2012-10-31 Lawrence Crowl <crowl@google.com>
2548 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2549 down-cast via dyn_cast.
2550 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2551 (undo_partition): Likewise.
2552 (lto_balanced_map): Likewise.
2553 (get_symbol_class): Likewise and via is_a.
2554 (lto_balanced_map): Change symtab checking to is_a.
2556 2012-10-12 Richard Biener <rguenther@suse.de>
2559 * lto.c (gimple_types_compatible_p_1): Also compare
2561 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2563 2012-10-09 Tobias Burnus <burnus@net-b.de>
2565 * lto-lang.c (lto_register_builtin_type): Avoid useless
2567 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2569 2012-10-08 Tobias Burnus <burnus@net-b.de>
2571 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2572 Free lto_file struct after closing the file.
2574 2012-10-08 Jan Hubicka <jh@suse.cz>
2576 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2577 (fixup_integer_cst): New functoin.
2578 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2580 2012-10-07 Jan Hubicka <jh@suse.cz>
2582 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2583 release input encoders.
2584 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2586 2012-10-06 Jan Hubicka <jh@suse.cz>
2589 * lto.c (resolution_map): New static var.
2590 (register_resolution): New function.
2591 (lto_register_var_decl_in_symtab): Use it.
2592 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2594 2012-09-20 Martin Jambor <mjambor@suse.cz>
2596 * lto.c (lto_materialize_function): Call push_struct_function and
2599 2012-09-19 Dehao Chen <dehao@google.com>
2601 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2603 2012-09-19 Jan Hubicka <jh@suse.cz>
2605 * lto.c (lto_materialize_function): Update confused comment.
2606 (read_cgraph_and_symbols): Do not free symtab.
2608 2012-09-12 Jan Hubicka <jh@suse.cz>
2610 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2611 AUX pointer cleaning. Add max partitioning.
2612 * lto-partition.c (enum symbol_class): New.
2613 (get_symbol_class): New function.
2614 (symbol_partitioned_p): New function.
2615 (add_references_to_partition): Remove.
2616 (add_aliases_to_partition): Remove.
2617 (add_cgraph_node_to_partition_1): Remove.
2618 (add_cgraph_node_to_partition): Remove.
2619 (add_symbol_to_partition): New function.
2620 (add_symbol_to_partition_1): New function.
2621 (contained_in_symbol): New function.
2622 (partition_cgraph_node_p): Remove.
2623 (partition_varpool_node_p): Remove.
2624 (partition_symbol_p): Remove.
2625 (lto_1_to_1_map): Cleanup.
2627 (lto_balanced_map): Update.
2628 (lto_promote_cross_file_statics): Update.
2629 * lto-partition.h (lto_max_map): Declare.
2630 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2632 2012-09-11 Jan Hubicka <jh@suse.cz>
2635 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2636 type is variant leader.
2638 2012-09-11 Richard Guenther <rguenther@suse.de>
2640 * lto.c (enum gtc_mode): Remove.
2641 (struct type_pair_d): Adjust.
2642 (lookup_type_pair): Likewise.
2643 (gimple_type_leader): Do not mark as deletable.
2644 (gimple_lookup_type_leader): Adjust.
2645 (gtc_visit): Likewise.
2646 (gimple_types_compatible_p_1): Likewise.
2647 (gimple_types_compatible_p): Likewise.
2648 (gimple_type_hash): Likewise.
2649 (gimple_register_type): Likewise.
2650 (read_cgraph_and_symbols): Manage lifetime of tables
2653 2012-09-11 Richard Guenther <rguenther@suse.de>
2655 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2656 struct type_pair_d, lookup_type_pair, struct sccs,
2657 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2658 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2659 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2660 visit, iterative_hash_name, struct type_hash_pair,
2661 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2662 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2663 Move here from gimple.c
2664 (read_cgraph_and_symbols): Free hash tables here.
2665 (print_lto_report_1): New function wrapping print_lto_report.
2666 (do_whole_program_analysis): Call it.
2667 (lto_main): Likewise.
2669 2012-09-10 Jan Hubicka <jh@suse.cz>
2671 * lto-partition.c (partition_symbol_p): Forward declare.
2672 (add_references_to_partition): Reimplement using partition_symbol_p.
2673 (add_aliases_to_partition): Break out from add_references_to_partition;
2674 reimplement using partition_symbol_p.
2675 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2677 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2678 (partition_varpool_node_p): Do not special case aliases.
2680 2012-08-12 Jan Hubicka <jh@suse.cz>
2682 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2683 it is deleted after streaming.
2684 * lto-partition.c (partition_symbol_p): New function.
2685 (promote_var, promote_fn): Remove.
2686 (promote_symbol): New function.
2687 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2688 to lookup the actual boundaries instead of computing them ad-hoc.
2690 2012-08-12 Jan Hubicka <jh@suse.cz>
2692 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2694 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2696 * lto-partition.c (new_partition): Update.
2697 * lto.c (cmp_partitions_order): Update.
2698 (lto_wpa_write_files): Update.
2699 (free_ltrans_partitions): Update.
2700 (add_references_to_partition): Update.
2701 (add_cgraph_node_to_partition_1): Update.
2702 (add_cgraph_node_to_partition): Update.
2703 (add_varpool_node_to_partition): Update.
2704 (undo_partition): Update.
2705 (lto_balanced_map): Update.
2706 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2707 set_referenced_from_this_partition_p): Update.
2708 (lto_promote_cross_file_statics): Update.
2710 2012-08-12 Jan Hubicka <jh@suse.cz>
2712 * lto-partition.c (set_referenced_from_other_partition_p,
2713 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2715 (lto_promote_cross_file_statics): Use them.
2717 2012-07-24 Jan Hubicka <jh@suse.cz>
2719 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2721 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
2723 * lto-tree.h (lang_decl): Add variable_size GTY option.
2725 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2727 * lto.c: Do not include timevar.h.
2728 * Make-lang.in: Fix dependencies.
2730 2012-06-18 Lawrence Crowl <crowl@google.com>
2732 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
2733 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2734 to lto_wpa_write_files.
2735 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2736 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2737 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2738 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2739 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2740 to be a front end, but is not one.
2742 2012-05-18 Jan Hubicka <jh@suse.cz>
2744 * lto.c (lto_materialize_constructors_and_inits): Remove.
2745 (read_cgraph_and_symbols): Remove handling of alias pairs.
2747 2012-05-17 Jan Hubicka <jh@suse.cz>
2749 * lto-partition.c (add_references_to_partition): Handle external vars.
2750 (partition_varpool_node_p): Likewise.
2751 (lto_promote_cross_file_statics): Do not promote externals.
2753 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2755 * lto-lang.c (handle_fnspec_attribute): New static function.
2756 (lto_attribute_table): Add "fn spec".
2757 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2759 2012-05-04 Jan Hubicka <jh@suse.cz>
2761 * lto.c (do_whole_program_analysis): Set timevars correctly.
2762 (lto_main): Likewise.
2764 2012-05-04 Richard Guenther <rguenther@suse.de>
2766 * lang.opt (fwpa): Do not mark as Optimization.
2767 (fltrans): Likewise.
2769 2012-04-30 Jan Hubicka <jh@suse.cz>
2771 * lto.c (lto_main): Use compile ().
2772 * lto-partition.c (partition_cgraph_node_p): Use
2773 symtab_used_from_object_file_p.
2774 (partition_varpool_node_p): Likewise.
2776 2012-04-20 Jan Hubicka <jh@suse.cz>
2778 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2780 2012-04-18 Jan Hubicka <jh@suse.cz>
2782 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2783 Update for new ipa-ref API.
2785 2012-04-16 Jan Hubicka <jh@suse.cz>
2787 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
2788 walkers to walk cgraph and varpool.
2789 (materialize_cgraph): Likewise.
2790 * lto-partition.c (lto_1_to_1_map): Likewise.
2791 (lto_balanced_map): Likewise.
2792 (lto_promote_cross_file_statics): Likewise.
2794 2012-04-14 Jan Hubicka <jh@suse.cz>
2796 * lto.c: Update field referenced for new cgraph/varpool layout.
2797 * lto-partition.c: Likewise.
2799 2012-04-11 Jan Hubicka <jh@suse.cz>
2801 * lto.c: Update copyright; remove params.h, ipa-inline.h
2802 and ipa-utils.h inlines; inline lto-partition.h
2803 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2804 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2805 add_references_to_partition, add_cgraph_node_to_partition_1,
2806 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2807 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2808 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2809 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2810 * lto-partition.c: ... here; new file.
2811 * lto-partition.h: New file.
2812 * Make-lang.in (lto.o): Update dependencies.
2813 (lto-partition.o): New.
2815 2012-04-05 Richard Guenther <rguenther@suse.de>
2817 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2820 2012-03-12 Richard Guenther <rguenther@suse.de>
2822 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2824 2012-03-06 Richard Guenther <rguenther@suse.de>
2827 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2829 2012-02-28 Richard Guenther <rguenther@suse.de>
2832 * lto.c (lto_register_function_decl_in_symtab): Do not register
2833 a reverse renamed decl mapping.
2835 2012-01-06 Jakub Jelinek <jakub@redhat.com>
2838 * lto-lang.c (handle_returns_twice_attribute): New function.
2839 (lto_attribute_table): Add returns_twice attribute.
2841 2011-12-21 Richard Guenther <rguenther@suse.de>
2843 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2844 (LTO_FIXUP_TREE): Use it.
2845 (uniquify_nodes): Mark new non-prevailing types and avoid
2846 calling gimple_register_type on others.
2847 (lto_read_decls): Add comment.
2849 2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2851 * lto.h (lto_parse_hex): Delete.
2852 * lto.c (lto_read_decls): Use 'int' for offsets.
2853 (lto_parse_hex): Make static and return proper 64-bit host type.
2854 (lto_resolution_read): Use proper 64-bit host type.
2856 2011-12-13 Richard Guenther <rguenther@suse.de>
2859 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2860 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2862 2011-12-01 Uros Bizjak <ubizjak@gmail.com>
2864 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2865 (ignore_attribute): New.
2867 2011-11-21 Aldy Hernandez <aldyh@redhat.com>
2869 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2870 (handle_transaction_pure_attribute): New.
2872 2011-11-03 Richard Guenther <rguenther@suse.de>
2875 * lto-lang.c (lto_post_options): Do not read file options.
2876 * lto.c (lto_read_all_file_options): Remove.
2877 (lto_init): Call lto_set_in_hooks here.
2879 2011-10-09 Jan Hubicka <jh@suse.cz>
2881 * lto.c (node_cmp, varpool_node_cmp): New functions.
2882 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2883 (cmp_partitions): Rename to ...
2884 (cmp_partitions_size): ... this one.
2885 (cmp_partitions_order): New function.
2886 (lto_wpa_write_files): Sort partitions by order when
2887 -fno-toplevel-reorder is used.
2889 2011-10-09 Andi Kleen <ak@linux.intel.com>
2891 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2893 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2895 * lto-lang.c (def_builtin_1): Delete old interface with two
2896 parallel arrays to hold standard builtin declarations, and replace
2897 it with a function based interface that can support creating
2898 builtins on the fly in the future. Change all uses, and poison
2899 the old names. Make sure 0 is not a legitimate builtin index.
2901 2011-10-02 Andi Kleen <ak@linux.intel.com>
2903 * lto-object.c (lto_obj_add_section_data): Add list.
2904 (lto_obj_add_section): Fill in list.
2905 (ltoobj_build_section_table): Pass through list.
2906 * lto.c (file_data_list): Declare.
2907 (create_subid_section_table): Pass arguments directly.
2908 Fill in list of file_datas.
2910 (lto_create_files_from_ids): Pass in direct arguments.
2911 Don't maintain list.
2912 (lto_file_read): Use explicit section and file data lists.
2913 (lto_read_all_file_options): Pass in section_list.
2914 * lto.h (lto_obj_build_section_table): Add list.
2915 (lto_section_slot): Add next.
2916 (lto_section_list): Declare.
2918 2011-10-02 Jan Hubicka <jh@suse.cz>
2921 * common.c (lto_resolution_str): Add new resolution.
2922 * common.h (lto_resolution_str): Likewise.
2924 2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2925 Andi Kleen <ak@linux.intel.com>
2928 * lto.c (lto_splay_tree_delete_id): New.
2929 (lto_splay_tree_compare_ids): Likewise.
2930 (lto_splay_tree_lookup): Likewise.
2931 (lto_splay_tree_id_equal_p): Likewise.
2932 (lto_splay_tree_insert): Likewise.
2933 (lto_splay_tree_new): Likewise.
2934 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2935 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2936 (create_subid_section_table): Use lto_splay_tree_lookup and
2937 lto_splay_tree_insert.
2938 (lto_file_read): Use lto_splay_tree_new.
2940 2011-09-26 Andi Kleen <ak@linux.intel.com>
2942 * lto.c (lto_resolution_read): Remove id dumping.
2943 (lto_section_with_id): Turn id HOST_WIDE_ID.
2944 (create_subid_section_table): Dito.
2946 2011-08-28 Dodji Seketeli <dodji@redhat.com>
2948 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2951 2011-08-11 Martin Jambor <mjambor@suse.cz>
2953 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2955 2011-08-08 Diego Novillo <dnovillo@google.com>
2957 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2958 * lto.c: Include tree-streamer.h.
2960 2011-07-06 Richard Guenther <rguenther@suse.de>
2962 * lto-lang.c (lto_init):
2963 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2965 2011-06-11 Jan Hubicka <jh@suse.cz>
2968 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2969 (lto_balanced_map): Likewise.
2971 2011-06-11 Jan Hubicka <jh@suse.cz>
2973 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2974 (add_cgraph_node_to_partition) ... here; walk aliases.
2975 (lto_1_to_1_map): Remove same body alias code.
2976 (promote_fn): Likewise.
2977 (lto_promote_cross_file_statics): Update comment.
2979 2011-06-07 Diego Novillo <dnovillo@google.com>
2981 * lto.c (uniquify_nodes): Move code to register decls to
2982 the loop that computes canonical types.
2984 2011-06-07 Richard Guenther <rguenther@suse.de>
2986 * lto-lang.c (lto_init): Do not set
2987 size_type_node or call set_sizetype.
2989 2011-06-04 Diego Novillo <dnovillo@google.com>
2991 * lto.c (lto_init): New.
2992 (lto_main): Call it.
2994 2011-06-03 Diego Novillo <dnovillo@google.com>
2996 * lto.c (get_resolution): Move from lto-streamer-in.c.
2997 (lto_register_var_decl_in_symtab): Likewise.
2998 (lto_register_function_decl_in_symtab): Likewise.
2999 (uniquify_nodes): Call lto_register_var_decl and
3000 lto_register_function_decl_in_symtab after reading a new
3001 VAR_DECL or FUNCTION_DECL.
3003 2011-06-01 Richard Guenther <rguenther@suse.de>
3005 * lto-lang.c (lto_register_canonical_types): New function.
3006 (lto_init): Register common nodes with the canonical type machinery.
3007 Do not play tricks with char_type_node.
3009 2011-05-26 Richard Guenther <rguenther@suse.de>
3011 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
3013 2011-05-25 Nathan Froyd <froydnj@codesourcery.com>
3015 * lto.c (lto_ft_typed): New function.
3016 (lto_ft_common): Call it.
3017 (lto_ft_constructor): Likewise.
3018 (lto_ft_expr): Likewise.
3019 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
3022 2011-05-20 Richard Guenther <rguenther@suse.de>
3024 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
3025 (lto_ft_type): Move main-variant and pointer-to chain building ...
3026 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
3027 in a separate final loop.
3029 2011-05-19 Richard Guenther <rguenther@suse.de>
3031 * lto.c (uniquify_nodes): First register all types before
3032 fixing up the tree SCC.
3034 2011-05-11 Jan Hubicka <jh@suse.cz>
3037 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
3039 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3041 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
3042 location of binfo field.
3043 (lto_fixup_prevailing_decls): Likewise.
3045 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
3047 * lto-lang.c (def_fn_type): Don't call build_function_type, call
3048 build_function_type_array or build_varargs_function_type_array
3051 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
3053 * lto-lang.c (global_bindings_p): Return bool.
3055 2011-05-07 Jan Hubicka <jh@suse.cz>
3057 * lto.c (lto_materialize_function): Use
3058 cgraph_function_with_gimple_body_p.
3059 (add_cgraph_node_to_partition): Do not re-add items to partition;
3061 (add_varpool_node_to_partition): Do not re-add items to partition.
3063 2011-05-03 Jan Hubicka <jh@suse.cz>
3065 * lto.c (free_ltrans_partitions): Fix accidental commit.
3067 2011-05-03 Jan Hubicka <jh@suse.cz>
3069 * lto.c (ltrans_partition_def): Remove GTY annotations.
3070 (ltrans_partitions): Move to heap.
3071 (new_partition): Update.
3072 (free_ltrans_partitions): New function.
3073 (lto_wpa_write_files): Use it.
3075 2011-04-29 Martin Jambor <mjambor@suse.cz>
3077 * lto.c: Include ipa-utils.h.
3078 (lto_balanced_map): Update call to ipa_reverse_postorder.
3079 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
3081 2011-04-29 Michael Matz <matz@suse.de>
3083 * lto.c (toplevel): Include tree-flow.h.
3084 (lto_read_in_decl_state): Don't merge types here.
3085 (tree_with_vars): New static hash table.
3086 (remember_with_vars): New static functions.
3087 (LTO_FIXUP_TYPE): New macro.
3088 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
3089 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
3090 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
3091 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
3092 (lto_read_decls): Uniquify while reading in trees.
3093 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
3094 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
3095 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
3096 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
3097 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
3098 lto_fixup_tree): Remove.
3099 (lto_fixup_state): Remove data argument. Use
3100 lto_symtab_prevailing_decl.
3101 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
3102 (lto_fixup_prevailing_decls): New function.
3103 (lto_fixup_state_aux): Argument aux is unused.
3104 (lto_fixup_decls): Don't allocate pointer sets, don't use
3105 lto_fixup_tree, use lto_fixup_prevailing_decls.
3106 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
3107 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
3109 2011-04-16 Eric Botcazou <ebotcazou@adacore.com>
3111 * lto.c (lto_balanced_map): Fix typos in head comment.
3112 (lto_promote_cross_file_statics): Fix long lines and remove redundant
3115 2011-04-16 Jan Hubicka <jh@suse.cz>
3117 * lto.c (lto_balanced_map): Update.
3119 2011-04-14 Jan Hubicka <jh@suse.cz>
3121 * lto.c: Include ipa-inline.h
3122 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
3124 (ipa_node_duplication_hook): Fix declaration.
3125 * Make-lang.in (lto.o): Update dependencies.
3127 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3129 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
3131 * lto.c (lto_fixup_common): Likewise.
3133 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
3135 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
3136 (handle_type_generic_attribute): Likewise.
3138 2011-04-03 Michael Matz <matz@suse.de>
3140 * lto.c (lto_materialize_function): Don't read and then discard
3141 sections in WPA mode.
3142 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
3144 * lto-lang.c (registered_builtin_fndecls): Remove.
3145 (lto_getdecls): Return NULL_TREE.
3146 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
3148 2011-03-31 Richard Guenther <rguenther@suse.de>
3151 * lto.c (lto_wpa_write_files): Disable assert for non-empty
3152 partitions when checking is not enabled.
3154 2011-03-25 Kai Tietz <ktietz@redhat.com>
3156 * lto.c (lto_resolution_read): Use filename_cmp instead
3158 (lto_read_section_data): Likewise.
3160 2011-03-25 Jeff Law <law@redhat.com>
3162 * lto-lang.c (def_fn_type): Add missing va_end.
3164 2011-03-21 Kai Tietz <ktietz@redhat.com>
3167 * lto-lang.c (lto_attribute_table): Adjust table.
3169 2011-02-18 Jakub Jelinek <jakub@redhat.com>
3172 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
3175 2011-02-18 Richard Guenther <rguenther@suse.de>
3178 * lto-tree.h (lto_global_var_decls): Do not declare here.
3179 * lto-lang.c: Include lto-streamer.h.
3180 * Make-lang.in (lto-lang.o): Adjust dependencies.
3182 2011-02-10 Kai Tietz <kai.tietz@onevision.com>
3185 * lto.c (lto_read_section_data): Free
3186 fd_name in failure case.
3187 For mingw targets don't hash file-descriptor.
3188 (read_cgraph_and_symbols): Close current_lto_file
3191 2011-01-11 Jan Hubicka <jh@suse.cz>
3195 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
3196 are not partitioned.
3198 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
3200 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
3203 2010-12-06 Richard Guenther <rguenther@suse.de>
3206 * lto-lang.c (lto_init): Give names to basic types.
3208 2010-11-30 Joseph Myers <joseph@codesourcery.com>
3210 * lto-object.c: Don't include toplev.h.
3211 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
3213 2010-11-30 Joseph Myers <joseph@codesourcery.com>
3215 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
3218 2010-11-29 Joseph Myers <joseph@codesourcery.com>
3220 * lto-endian.h: Delete.
3221 * lto-object.c: Don't include "libiberty.h".
3222 (O_BINARY): Don't define.
3223 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
3224 (O_BINARY): Don't define.
3226 2010-11-23 Richard Guenther <rguenther@suse.de>
3228 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
3230 2010-11-23 Richard Guenther <rguenther@suse.de>
3233 * lto.c (read_cgraph_and_symbols): Bail out after errors.
3235 2010-11-17 Joseph Myers <joseph@codesourcery.com>
3237 * lto.c (lto_main): Take no arguments.
3238 * lto.h (lto_main): Update prototype.
3240 2010-11-16 Ian Lance Taylor <iant@google.com>
3242 * lto-object.c (lto_obj_file_open): Call
3243 simple_object_attributes_merge rather than
3244 simple_object_attributes_compare.
3246 2010-11-12 Joseph Myers <joseph@codesourcery.com>
3248 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
3249 * lto-lang.c (lto_handle_option): Take location_t parameter.
3251 2010-11-10 Joseph Myers <joseph@codesourcery.com>
3253 * lto.c (lto_resolution_read): Start diagnostics with lowercase
3254 letters and remove trailing '.'.
3255 (lto_file_finalize): Start diagnostic with a lowercase letter.
3257 2010-11-02 Ian Lance Taylor <iant@google.com>
3259 * lto-object.c: New file.
3260 * lto-elf.c: Remove file.
3261 * lto-macho.c: Remove file.
3262 * lto-macho.h: Remove file.
3263 * lto-coff.c: Remove file.
3264 * lto-coff.h: Remove file.
3265 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
3267 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
3268 (lto/lto-objfile.o): New target.
3269 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
3270 (lto/lto.o): Remove $(LIBIBERTY_H).
3272 2010-10-22 Jan Hubicka <jh@suse.cz>
3274 * lto.c (add_cgraph_node_to_partition,
3275 add_varpool_node_to_partition): Add debug info.
3276 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
3278 (do_whole_program_analysis): Set function flags before dumping.
3280 2010-10-22 Richard Guenther <rguenther@suse.de>
3282 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
3283 the new gimple_register_canonical_type.
3285 2010-10-20 H.J. Lu <hongjiu.lu@intel.com>
3288 * config-lang.in (boot_language): Set to $enable_lto.
3290 2010-10-18 Jakub Jelinek <jakub@redhat.com>
3293 * Make-lang.in (check-lto): New dummy target.
3295 2010-10-14 Eric Botcazou <ebotcazou@adacore.com>
3297 * lto-elf.c (SHN_XINDEX): Define if not already defined.
3299 2010-10-08 Joseph Myers <joseph@codesourcery.com>
3301 * lto-lang.c (lto_init_options): Change to
3302 lto_init_options_struct. Update parameters.
3303 (LANG_HOOKS_INIT_OPTIONS): Don't define.
3304 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
3306 2010-10-06 Jan Hubicka <jh@suse.cz>
3308 * lto.c (lto_balanced_map): Fix accounting of program size.
3310 2010-10-06 Jan Hubicka <jh@suse.cz>
3312 * lto.c (lto_balanced_map): Do not produce empty partitions.
3314 2010-10-06 Andi Kleen <ak@linux.intel.com>
3316 * lto.c (lto_process_name): Add.
3317 (lto_main): Call lto_process_name.
3319 2010-10-06 Jan Hubicka <jh@suse.cz>
3321 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3322 COMDATs required by the linker.
3324 2010-10-05 Ian Lance Taylor <iant@google.com>
3326 * lto.c (lto_section_with_id): Make s a const pointer.
3328 2010-10-05 Jan Hubicka <jh@suse.cz>
3330 * lto.c: Include params.h.
3331 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3332 refcounting in aux field.
3333 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3335 (lto_1_to_1_map): Simplify.
3336 (lto_balanced_map): New function.
3337 (do_whole_program_analysis): Chose proper partitioning alg.
3338 * Make-lang.in (lto.o): Add dependency on params.h
3340 2010-10-04 Andi Kleen <ak@linux.intel.com>
3342 * Make-lang.in (lto1): Add + to build rule.
3344 2010-10-03 Andi Kleen <ak@linux.intel.com>
3346 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
3349 2010-09-28 Jan Hubicka <jh@suse.cz>
3351 * lto-lang.c (handle_leaf_attribute): New function.
3352 (lto_attribute_tables): Add leaf.
3354 2010-09-25 Jie Zhang <jie@codesourcery.com>
3356 * lto.c (lto_read_all_file_options): Start a new line after
3357 printing out file names.
3359 2010-09-24 Jan Hubicka <jh@suse.cz>
3361 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3363 2010-09-20 Jan Hubicka <jh@suse.cz>
3365 PR tree-optimize/45605
3366 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3368 2010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3370 * lto-elf.c (lto_obj_file_open): Also provide filename when
3373 2010-09-17 Jan Hubicka <jh@suse.cz>
3375 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3377 2010-09-17 Richard Guenther <rguenther@suse.de>
3379 * lang.opt (flag_wpa): Also enable for the driver.
3381 2010-09-16 Jan Hubicka <jh@suse.cz>
3383 * lto.c (lto_materialize_function): Do not tamper with STATIC and
3386 2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3388 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3390 2010-09-08 Jan Hubicka <jh@suse.cz>
3392 * lto.c (real_file_count, real_file_decl_data): New static vars.
3393 (read_cgraph_and_symbols): Use it.
3395 2010-09-08 Richard Guenther <rguenther@suse.de>
3397 * lto.c (read_cgraph_and_symbols): Collect again after each
3400 2010-09-07 Jan Hubicka <jh@suse.cz>
3402 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3404 2010-09-03 Richard Guenther <rguenther@suse.de>
3406 * lto-elf.c (validate_file): Always error if validation fails.
3408 2010-08-20 Jan Hubicka <jh@suse.cz>
3410 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3411 (lto_wpa_write_files): Update comments.
3413 2010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3416 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3417 with has_analyzed_clone_p.
3419 2010-08-20 Jan Hubicka <jh@suse.cz>
3421 * lto.c (has_analyzed_clone_p): New function
3422 (lto_materialize_function): Use callgraph to determine if
3424 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3426 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3428 * lto.c: Use FOR_EACH_VEC_ELT.
3430 2010-07-27 Andi Kleen <ak@linux.intel.com>
3432 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3434 2010-07-27 Joseph Myers <joseph@codesourcery.com>
3436 * lto-lang.c (lto_handle_option): Update prototype and return
3437 value type. Remove duplicate assignment to result.
3439 2010-07-27 Joseph Myers <joseph@codesourcery.com>
3441 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3443 (lto_init_options): Update prototype.
3444 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3447 2010-07-10 Andi Kleen <ak@linux.intel.com>
3450 * lto.c: Include splay-tree.h
3451 (lto_resolution_read): Change to walk file_ids tree and parse
3452 extra file_id in resolution file.
3453 (lto_section_with_id): Add.
3454 (create_subid_section_table): Add.
3456 (lto_create_files_from_ids): Add.
3457 (lto_file_read): Change to handle sub file ids and create list
3458 of file_datas. Add output argument for count.
3459 (get_section_data): Pass file_data to lto_get_section_name.
3460 (lto_flatten_file): Add.
3461 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3463 2010-07-10 Andi Kleen <ak@linux.intel.com>
3465 * lto-coff.c (hash_name, eq_name): Move.
3466 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3467 * lto-elf.c: (hash_name, eq_name): Move.
3468 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3469 * lto-macho.c: (hash_name, eq_name): Move.
3470 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3471 * lto.c: (hash_name, eq_name): Move from lto-*.c
3472 (lto_obj_create_section_hash_table): Add.
3473 (free_with_string): Add.
3475 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3477 * lto-coff.c: Include diagnostic-core.h in every file that
3479 * lto-elf.c: Likewise.
3480 * lto-lang.c: Likewise.
3481 * lto-macho.c: Likewise.
3483 2010-07-07 Jakub Jelinek <jakub@redhat.com>
3485 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3486 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3489 2010-07-05 Jan Hubicka <jh@suse.cz>
3491 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3492 nodes from same comdat group as well as all comdat functions referenced
3494 (add_varpool_node_to_partition, add_references_to_partition): New
3496 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3497 add_varpool_node_to_partition; clear aux flags when done.
3498 (lto_promote_cross_file_statics): Do not promote stuff that gets
3499 duplicated to each ltrans.
3501 2010-07-04 Jan Hubicka <jh@suse.cz>
3503 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
3505 2010-06-13 Richard Guenther <rguenther@suse.de>
3507 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3509 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
3511 * lto.c (lto_resolution_read): Pre-initialize local variable r.
3512 * lto-coff.c (coff_write_object_file): Add braces to if.
3514 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3516 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3517 (lto_file_read): Likewise.
3518 (new_partition): Likewise.
3519 (read_cgraph_and_symbols): Likewise.
3521 2010-06-07 Joseph Myers <joseph@codesourcery.com>
3523 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3524 (lto_handle_option): Don't set flag_signed_char here.
3526 2010-06-04 Richard Guenther <rguenther@suse.de>
3529 * lto.c (lto_1_to_1_map): Use the proper file_data for
3532 2010-05-30 Jan Hubicka <jh@suse.cz>
3534 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3535 partitioning decisions.
3537 2010-05-29 Jan Hubicka <jh@suse.cz>
3539 * lto.c (bitmap vector): Remove.
3540 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3541 (ltrans_partition_def): New structure.
3542 (ltrans_partition): New type and VECtor.
3543 (new_partition): New function.
3544 (add_cgraph_node_to_partition): New function.
3545 (lto_1_to_1_map): Reorganize for partitions.
3546 (lto_add_inline_clones): Remove.
3547 (lto_add_all_inlinees): Remove.
3548 (lto_promote_cross_file_statics): Use partitions.
3549 (cmp_partitions): New function.
3550 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3551 use partitions; output files sorted by size.
3553 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3555 * Make-lang.in: Replace vec.h dependency with VEC_H.
3557 2010-05-28 Joseph Myers <joseph@codesourcery.com>
3559 * lto-coff.c (coff_errmsg): Remove.
3560 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3561 errors instead of coff_errmsg (-1).
3562 * lto-macho.c (mach_o_errmsg): Remove.
3563 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3564 instead of mach_o_errmsg (-1).
3565 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3568 2010-05-28 Richard Guenther <rguenther@suse.de>
3570 * lto.c (prefix_name_with_star): Removed.
3571 (strip_extension): Likewise.
3572 (get_filename_for_set): Likewise.
3573 (lto_write_ltrans_list): Fold into ...
3574 (lto_wpa_write_files): ... this. Name LTRANS units
3575 by suffixing the ltrans output list filename.
3576 (do_whole_program_analysis): Adjust.
3578 2010-05-27 Joseph Myers <joseph@codesourcery.com>
3580 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3581 (read_cgraph_and_symbols, lto_main): Use seen_error.
3582 * Make-lang.in (lto/lto.o): Update dependencies.
3584 2010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3587 * lto.h (lto_eh_personality): New prototype.
3588 * lto.c: Include debug.h.
3589 (first_personality_decl): New static variable.
3590 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3591 first function for which it is non-null.
3592 (lto_eh_personality_decl): New static variable.
3593 (lto_eh_personality): New function.
3594 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3595 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3597 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3599 * lto-lang.c: Do not include expr.h.
3601 2010-05-24 Richard Guenther <rguenther@suse.de>
3603 * lto-elf.c (lto_obj_build_section_table): Work around
3604 FreeBSD libelf issue.
3606 2010-05-22 Richard Guenther <rguenther@suse.de>
3608 * lto.c (read_cgraph_and_symbols): Do not collect.
3610 2010-05-20 Jan Hubicka <jh@suse.cz>
3612 * lto.c (promote_var, promote_fn): New functions.
3613 (lto_promote_cross_file_statics): Compute correctly boundary including
3614 static initializers of readonly vars.
3616 2010-05-18 Jan Hubicka <jh@suse.cz>
3618 * lto.c (lto_1_to_1_map): Partition non-inline clones.
3619 (lto_promote_cross_file_statics): Deal with non-inline clones.
3621 2010-05-18 Jan Hubicka <jh@suse.cz>
3623 * lto.c (lto_materialize_function): Announce function when
3624 reading body; allocate_struct_function only when reading body;
3625 do not finalize local statics; ggc_collect after reading;
3626 do not mark reachable node.
3627 (materialize_cgraph): Do not announce function.
3629 2010-05-11 Jan Hubicka <jh@suse.cz>
3631 * lto.c (materialize_cgraph): Revert my previous patch.
3633 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
3635 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3636 IMAGE_FILE_MACHINE_AMD64.
3637 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3639 2010-05-11 Jan Hubicka <jh@suse.cz>
3641 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3642 (materialize_cgraph): Add it here.
3644 2010-05-11 Jan Hubicka <jh@suse.cz>
3646 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3649 2010-05-11 Jan Hubicka <jh@suse.cz>
3651 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3652 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3653 use reachable_from_other_partition_p and
3654 referenced_from_other_partition_p test.
3656 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
3658 * lto-coff.c (validate_file): Add x64-coff support.
3659 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3660 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3661 * lto-lang.c (lto_build_c_type_nodes): Add check for
3662 'long long unsigned int' for x64-windows.
3663 (lto_init): Likewise.
3665 2010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3667 * lto.h (struct lto_file_struct): Document offset member.
3668 * lto-endian.h: New file.
3669 * lto-macho.h: New file.
3670 * lto-macho.c: New file.
3671 * Make-lang.in: Add rule for lto-macho.o.
3673 2010-05-07 Richard Guenther <rguenther@suse.de>
3677 * lang.opt (fresolution): Change to ...
3678 (fresolution=): ... this.
3679 * lto-lang.c (lto_handle_option): Adjust.
3681 2010-05-07 Richard Guenther <rguenther@suse.de>
3683 * lto.c (DUMPBASE_SUFFIX): Remove.
3684 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3686 (lto_write_ltrans_list): ... only output the list of ltrans files.
3687 (lto_maybe_unlink): Remove.
3688 (do_whole_program_analysis): Do not execute LTRANS phase
3691 2010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3693 * lto-lang.c (lto_handle_option): Add argument kind.
3695 2010-05-05 Jan Hubicka <jh@suse.cz>
3697 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3700 2010-05-05 Jan Hubicka <jh@suse.cz>
3702 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3704 2010-04-30 Jan Hubicka <jh@suse.cz>
3706 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3708 (lto_wpa_write_files): Write any non-empty partition.
3710 2010-04-30 Jan Hubicka <jh@suse.cz>
3712 * lto.c: Do not attempt to make constant pool references global.
3714 2010-04-28 Jan Hubicka <jh@suse.cz>
3716 * lto.c (lto_read_in_decl_state): Use GGC.
3717 (lto_wpa_write_files): Announce what we are writting.
3718 (all_file_decl_data): New.
3719 (read_cgraph_and_symbols): Use GGC; correct timevars.
3720 (do_whole_program_analysis): Collect.
3721 * Make-lang.in (lto.o): Fix dependency.
3722 * Makefile.in (GTFILES): Add lto-streamer.h.
3723 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3724 (varpool_assemble_pending_decls): Use VAROUT.
3725 * lto-streamer.h (lto_tree_ref_table): Annotate.
3726 (lto_in_decl_state): Annotate.
3727 (lto_file_decl_data): Annotate.
3729 2010-04-28 Jan Hubicka <jh@suse.cz>
3731 * lto.c (lto_varpool_node_sets): New.
3732 (lto_1_to_1_map): Partition varpool too.
3733 (globalize_context_t, globalize_cross_file_statics,
3734 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3735 lto_scan_statics_in_remaining_global_vars): Remove.
3736 (lto_promote_cross_file_statics): Rewrite.
3737 (get_filename_for_set): Take vset argument.
3738 (lto_wpa_write_files): Pass around vsets.
3740 2010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3743 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3744 hardcoding 'lto-elf.o'.
3745 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3747 * lto-coff.h: New file.
3748 * lto-coff.c: Likewise.
3750 2010-04-26 Richard Guenther <rguenther@suse.de>
3752 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3754 2010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3756 * lto.h (lto_elf_file_open): Rename prototype from this ...
3757 (lto_obj_file_open): ... to this.
3758 (lto_elf_file_close): Likewise ...
3759 (lto_obj_file_close): ... and likewise.
3760 (lto_elf_build_section_table): Likewise ...
3761 (lto_obj_build_section_table): ... and likewise.
3762 (lto_elf_begin_section): Likewise ...
3763 (lto_obj_begin_section): ... and likewise.
3764 (lto_elf_append_data): Likewise ...
3765 (lto_obj_append_data): ... and likewise.
3766 (lto_elf_end_section): Likewise ...
3767 (lto_obj_end_section): ... and likewise.
3768 * lto.c (lto_file_read): Update references to the above.
3769 (lto_wpa_write_files): Likewise.
3770 (lto_read_all_file_options): Likewise.
3771 (read_cgraph_and_symbols): Likewise.
3772 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3773 (LANG_HOOKS_APPEND_DATA): Likewise.
3774 (LANG_HOOKS_END_SECTION): Likewise.
3775 * lto-elf.c (lto_elf_file_open): Rename from this ...
3776 (lto_obj_file_open): ... to this, updating any references.
3777 (lto_elf_file_close): Likewise ...
3778 (lto_obj_file_close): ... and likewise.
3779 (lto_elf_build_section_table): Likewise ...
3780 (lto_obj_build_section_table): ... and likewise.
3781 (lto_elf_begin_section): Likewise ...
3782 (lto_obj_begin_section): ... and likewise.
3783 (lto_elf_append_data): Likewise ...
3784 (lto_obj_append_data): ... and likewise.
3785 (lto_elf_end_section): Likewise ...
3786 (lto_obj_end_section): ... and likewise.
3788 2010-04-21 Jan Hubicka <jh@suse.cz>
3790 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3791 (materialize_cgraph): Likewise.
3793 2010-04-21 Jan Hubicka <jh@suse.cz>
3795 * lto.c (lto_wpa_write_files): Update.
3796 (read_cgraph_and_symbols): Be more verbose.
3797 (materialize_cgraph): Likewise.
3798 (do_whole_program_analysis): Likewise.
3800 2010-04-21 Jan Hubicka <jh@suse.cz>
3802 * lto.c (globalize_cross_file_statics): When function has address taken,
3803 it needs to be public.
3805 2010-04-20 Jan Hubicka <jh@suse.cz>
3807 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3808 (lto_add_all_inlinees): Likewise.
3809 (lto_wpa_write_files): Likewise.
3811 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3813 * lto-lang.c (lto_init): Remove second argument in call to
3814 build_common_tree_nodes.
3816 2010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3818 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3821 2010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3824 * lto-elf.c: Define EM_* constants if not already defined.
3826 2010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3828 * lto-elf.c (is_compatible_architecture): New static function.
3829 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3831 2010-02-11 Richard Guenther <rguenther@suse.de>
3834 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3837 2010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3839 * lto.c (O_BINARY): Define.
3840 (lto_read_section_data): Open file in binary mode.
3841 * lto-elf.c (O_BINARY): Define.
3842 (lto_elf_file_open): Open file in binary mode.
3844 2010-01-08 Richard Guenther <rguenther@suse.de>
3847 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3848 (lto_init): Do not init char_type_node in a standard way
3849 but according to flag_signed_char.
3851 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3854 * lto.c (DUMPBASE_SUFFIX): New.
3855 (lto_execute_ltrans): Append a sequence number to -dumpbase
3858 2010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3861 * lto-elf.c (lto_elf_file_open): Stop if the command line
3862 option file is missing.
3864 2009-12-15 Richard Guenther <rguenther@suse.de>
3866 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3867 (lto_post_options): Do not disable debuginfo.
3869 2009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3871 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3873 2009-12-11 Richard Guenther <rguenther@suse.de>
3876 * lto.c (lto_resolution_read): Properly grow the vector.
3878 2009-12-11 Richard Guenther <rguenther@suse.de>
3881 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3882 to the C99 default. Do not set flag_unit_at_a_time.
3884 2009-11-28 Jakub Jelinek <jakub@redhat.com>
3886 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3889 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
3892 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3893 * lto.c (lto_parse_hex): New.
3894 (lto_resolution_read): Use lto_parse_hex.
3895 * lto.h (lto_parse_hex): New.
3897 2009-11-17 Rafael Avila de Espindola <espindola@google.com>
3899 * lto-elf.c (lto_file_init): Add offset argument.
3900 (lto_elf_file_open): Record the offset.
3901 * lto.c (lto_resolution_read): Change file_name into a lto_file
3902 argument. Check offsets.
3903 (lto_file_read): Update call to lto_resolution_read.
3904 * lto.h (lto_file_struct): Add the offset field.
3906 2009-11-16 Rafael Avila de Espindola <espindola@google.com>
3908 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3910 2009-11-14 Jan Hubicka <jh@suse.cz>
3912 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3914 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
3916 * lang.opt (fresolution): Renamed from resolution.
3917 * lto-lang.c (lto_handle_option): Handle new option name.
3918 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3920 2009-11-04 Richard Guenther <rguenther@suse.de>
3921 Rafael Avila de Espindola <espindola@google.com>
3923 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3924 (lto_elf_file_open): Handle offsets in arguments name@offest.
3926 2009-10-30 Richard Guenther <rguenther@suse.de>
3929 * lto.c (lto_file_read): Do not set file_data->fd.
3930 (lto_read_section_data): Use a single-entry file-descriptor cache.
3931 Do not check the result of xmalloc.
3932 (free_section_data): Do not use file_data->fd.
3933 (lto_read_all_file_options): Likewise.
3935 2009-10-22 Richard Guenther <rguenther@suse.de>
3937 * lto.c (lto_fixup_jump_functions): Remove.
3938 (lto_fixup_decls): Do not fixup jump functions.
3939 (read_cgraph_and_symbols): Schedule cgraph merging after
3940 summary reading. Schedule type and decl fixup before
3943 2009-10-22 Richard Guenther <rguenther@suse.de>
3945 * lto.c (lto_fixup_data_t): Remove free_list member.
3946 (lto_fixup_tree): Do not insert into free_list.
3947 (free_decl): Remove.
3948 (lto_fixup_decls): Remove free-list handling.
3950 2009-10-22 Jan Hubicka <jh@suse.cz>
3952 * lto.c (lto_fixup_jump_functions): New function.
3953 (lto_fixup_decls): Use it.
3955 2009-10-16 Richard Guenther <rguenther@suse.de>
3958 * lto.c (lto_fixup_tree): Revert last change.
3960 2009-10-14 Richard Guenther <rguenther@suse.de>
3962 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3963 compatible with the one we replace wrap it around a
3966 2009-10-09 Richard Guenther <rguenther@suse.de>
3970 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3972 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3973 (init_ehdr##BITS): Likewise.
3975 2009-10-08 Joseph Myers <joseph@codesourcery.com>
3977 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3978 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3980 * lto-lang.c (lto_post_options): Remove trailing "." from
3983 2009-10-08 Richard Guenther <rguenther@suse.de>
3985 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3988 2009-10-07 Joseph Myers <joseph@codesourcery.com>
3990 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3992 2009-10-07 Jan Hubicka <jh@suse.cz>
3994 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3995 ltrans stage; explain why this is needed and should not.
3997 2009-10-05 Richard Guenther <rguenther@suse.de>
4001 * lto.c (lto_read_decls): Do not register deferred decls.
4002 (read_cgraph_and_symbols): Delay symbol and cgraph merging
4003 until after reading the IPA summaries.
4005 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
4007 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
4008 (lto-lang.c): Don't include lto/common.h.
4010 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
4012 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
4013 (lto/common.o): Remove.
4015 * common.h (lto_kind_str): Remove.
4016 (lto_visibility_str): Remove.
4017 (lto_resolution_str): Make it static.
4019 2009-10-01 Diego Novillo <dnovillo@google.com>
4021 * lto.c (lto_read_decls): Add comment.
4022 Call internal_error instead of gcc_assert.
4023 (lto_resolution_read): Likewise.
4024 (lto_add_all_inlinees): Tidy.
4025 * Make-lang.in: Fix copyright boilerplate.
4027 (lto.install-pdf): New.
4028 * lto-tree.h: Fix copyright boilerplate.
4029 * lang-specs.h: Likewise.
4030 Remove ".lto" entry from compilers fragment.
4031 * lto-elf.c: Move inclusion of gelf.h after config.h.
4032 Tidy formatting everywhere.
4033 * lto.h: Fix copyright boilerplate.
4034 Tidy formatting everywhere.
4035 * common.c: Likewise.
4036 * config-lang.in: Likewise.
4037 * common.h: Likewise.
4038 * lto-lang.c: Likewise.
4040 2009-10-01 Richard Guenther <rguenther@suse.de>
4042 * lto.c (lto_read_section_data): Use plain lseek/read.
4044 2009-10-01 Richard Guenther <rguenther@suse.de>
4046 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
4047 use sysconf to query the system page size.
4048 (lto_file_read): Implement fallback using stdio.
4049 (free_section_data): Likewise.
4051 2009-09-29 Diego Novillo <dnovillo@google.com>
4053 * lto-lang.c (lto_init): Really fix call to
4054 build_common_builtin_nodes.
4056 2009-09-29 Diego Novillo <dnovillo@google.com>
4058 * lto-lang.c (lto_init): Fix call to
4059 build_common_builtin_nodes.
4061 2009-09-29 Richard Guenther <rguenther@suse.de>
4064 * lto-elf.c (init_shdr##BITS): Properly specify alignment
4066 (first_data_block): New static variable.
4067 (lto_elf_append_data): Align the first data block in each
4070 2009-09-28 Diego Novillo <dnovillo@google.com>
4072 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
4073 * lto.c (strip_extension): New.
4074 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
4075 (lto_execute_ltrans): Tidy.
4076 Do not pass -fwpa nor -fltrans-* to LTRANS.
4077 * opts.c: Tidy formatting and remove stale FIXME lto markers.
4078 * tree.c (need_assembler_name_p): Call
4079 lang_hooks.decls.may_need_assembler_name_p if set.
4080 * varasm.c (default_binds_local_p_1): Remove check for
4082 * varpool.c (decide_is_variable_needed): Do not test for
4085 2009-09-22 Richard Guenther <rguenther@suse.de>
4088 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
4089 * Make-lang.in: Remove ltrans-driver stuff.
4090 * config-lang.in: Likewise.
4091 * lang.opt (fltrans-driver): Remove.
4092 * lto-lang.c (lto_init_options): Remove code initializing
4094 * ltrans-driver: Remove.
4096 2009-09-21 Diego Novillo <dnovillo@google.com>
4098 * lto-lang.c (lto_define_builtins): Remove superfluous
4099 calls to targetm.init_builtins and build_common_builtin_nodes.
4100 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
4101 build_common_builtin_nodes.
4102 * lto.c (lto_materialize_function): Do nothing if NODE is a
4105 2009-09-03 Diego Novillo <dnovillo@google.com>
4107 * lto-elf.c (validate_file): Replace call to
4108 elf_getshstrndx with call to elf_getshdrstrndx.
4110 2009-08-19 Richard Guenther <rguenther@suse.de>
4112 * lto-lang.c (lto_init): Merge char_type_node with the
4113 appropriately signed variant.
4115 2009-08-19 Richard Guenther <rguenther@suse.de>
4118 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
4119 (lto_fixup_type): Re-build the pointer-to chain part two.
4121 2009-08-19 Richard Guenther <rguenther@suse.de>
4124 * lto.c (lto_fixup_type): Re-build the type variant chain.
4126 2009-08-19 Richard Guenther <rguenther@suse.de>
4129 * lto.c (lto_fixup_constructor): New function.
4130 (lto_fixup_tree): Replace all types. Properly fixup
4131 constructors and constants.
4133 2009-08-14 Richard Guenther <rguenther@suse.de>
4135 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
4136 for DECL_LANG_SPECIFIC.
4138 2009-08-13 Richard Guenther <rguenther@suse.de>
4141 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
4143 2009-07-30 Richard Guenther <rguenther@suse.de>
4146 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
4147 the largest decl for output and free TREE_CHAIN for further
4150 2009-07-24 Diego Novillo <dnovillo@google.com>
4152 * Make-lang.in: Add empty lto.install-plugin target.
4154 2009-07-13 Diego Novillo <dnovillo@google.com>
4156 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
4158 2009-07-11 Richard Guenther <rguenther@suse.de>
4160 * lto-lang.c (lto_write_globals): Wrapup global decls.
4162 2009-07-10 Richard Guenther <rguenther@suse.de>
4164 * lto-lang.c (lto_init): Allocate one more location to make
4165 BUILTINS_LOCATION correct.
4167 2009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4169 * lto.c (free_section_data): Cast computed_offset to caddr_t.
4171 2009-07-06 Diego Novillo <dnovillo@google.com>
4173 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
4176 2009-07-06 Diego Novillo <dnovillo@google.com>
4178 * lto.c (preload_common_nodes): Remove.
4179 (lto_read_in_decl_state): Call lto_streamer_cache_get.
4180 (lto_read_decls): Call lto_data_in_create and
4182 (free_decl): Do not call ggc_free.
4183 (lto_main): Call lto_init_reader.
4184 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
4185 (lto_init): Initialize main_identifier_node if needed.
4186 Make ptrdiff_type_node be integer_type_node.
4188 2009-06-19 Diego Novillo <dnovillo@google.com>
4190 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
4191 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
4192 Remove code guarded by #ifdef LOCAL_TRACE.
4194 2009-06-18 Diego Novillo <dnovillo@google.com>
4196 * lto.c: Update license to GPLv3.
4197 * lto-elf.c: Likewise.
4198 * common.c: Likewise.
4199 * lto-lang.c: Likewise.
4200 * lto.h: Remove superfluous include files. Update all
4203 2009-06-17 Diego Novillo <dnovillo@google.com>
4205 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
4207 2009-06-02 Diego Novillo <dnovillo@google.com>
4209 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
4211 (materialize_cgraph): Only materialize nodes that have a
4212 representation on file.
4214 2009-06-01 Diego Novillo <dnovillo@google.com>
4216 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
4218 2009-05-31 Diego Novillo <dnovillo@google.com>
4220 * lto-lang.c (lto_type_for_mode): Handle all the modes
4221 handled in c_common_type_for_mode.
4223 2009-05-21 Diego Novillo <dnovillo@google.com>
4225 * lto-elf.c: Always include <gelf.h>.
4226 * config-lang.in (target_libs): Remove.
4227 (build_by_default): Set to no.
4229 2009-05-15 Diego Novillo <dnovillo@google.com>
4231 * lto.c (lto_materialize_function): Assert that DECL is
4233 (materialize_cgraph): Don't try to materialize builtin
4235 * lto-section-out.c (write_symbol_vec): Do not write
4238 2009-05-13 Diego Novillo <dnovillo@google.com>
4240 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
4242 2009-05-07 Diego Novillo <dnovillo@google.com>
4244 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
4245 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
4246 (lto_fixup_type): Call it for TYPE_POINTER_TO,
4247 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
4248 (lto_fixup_tree): Call gimple_register_type when *TP is a
4250 (lto_main): Call bitmap_obstack_initialize.
4252 2009-04-22 Diego Novillo <dnovillo@google.com>
4254 * lto.c (free_section_data): Tidy.
4255 (lto_1_to_1_map): Tidy.
4256 (lto_add_all_inlinees): Tidy.
4257 (prefix_name_with_star): New.
4258 (get_filename_for_set): New.
4259 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
4260 to determine what cgraph node sets to write.
4261 Call get_filename_for_set to compute temporary file
4263 (lto_execute_ltrans): Do not execute LTRANS on files with
4264 names that start with '*'.
4265 Move logic to execute LTRANS together so that LTRANS is
4266 invoked only if there are any files to compile.
4267 (do_whole_program_analysis): Only remove output files
4268 that do not start with '*'.
4270 2009-04-06 Diego Novillo <dnovillo@google.com>
4272 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
4273 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
4274 (lto_add_all_inlinees): Tidy.
4276 2009-03-26 Diego Novillo <dnovillo@google.com>
4278 * lto.c: Include gimple.h.
4279 (lto_read_in_decl_state): Call gimple_register_type for
4280 every type in every stream.
4281 (lto_fixup_common): Call gimple_register_type if T has a
4283 (do_whole_program_analysis): Call print_lto_report.
4284 (lto_main): Call print_lto_report after cgraph_optimize.
4285 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
4287 2009-03-24 Diego Novillo <dnovillo@google.com>
4289 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
4290 (lto.o): Add dependency on GIMPLE_H.
4292 2009-03-10 Simon Baldwin <simonb@google.com>
4294 * lto.c (lto_read_all_file_options): Close any open file descriptor
4295 contained in file_data before freeing.
4297 2009-02-24 Rafael Avila de Espindola <espindola@google.com>
4299 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4300 for a decl in the original bitmap, not a node.
4301 (lto_add_all_inlinees): Remove original nodes that are not needed.
4302 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4304 2009-02-24 Diego Novillo <dnovillo@google.com>
4306 * lto.c (lto_materialize_function): Update
4307 lto_stats.num_function_bodies.
4308 (get_section_data): Initialize *LEN to 0.
4309 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
4310 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
4311 Update lto_stats.num_output_files.
4312 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4313 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4314 (lto_main): Initialize lto_stats.
4315 If flag_lto_report is set, call print_lto_report.
4317 2009-02-19 Diego Novillo <dnovillo@google.com>
4321 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4323 * lto.c (lto_add_inline_clones): Don't add the
4324 master clone. Check for a decl in the original
4326 (lto_add_all_inlinees): Remove original nodes
4327 that are not needed.
4328 (lto_scan_statics_in_cgraph_node): Don't care if
4329 the node is the master.
4330 (lto_promote_cross_file_statics): Use a new
4331 context.seen_node_decls for each set
4333 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4335 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4336 for a decl in the original bitmap, not a node.
4337 (lto_add_all_inlinees): Remove original nodes that are not needed.
4338 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4339 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4342 2009-02-18 Diego Novillo <dnovillo@google.com>
4344 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4345 and TV_WHOPR_WPA_IO.
4346 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4347 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4348 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4349 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4350 depending on command line flags.
4351 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4352 (lto_main): Remove timer uses.
4354 2009-02-18 Rafael Avila de Espindola <espindola@google.com>
4356 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4357 (lto_wpa_write_files): Update calls to renamed functions.
4359 2009-02-17 Diego Novillo <dnovillo@google.com>
4362 * lto-lang.c (lto_post_options): Disable -fwhole-program
4363 when running LTRANS.
4365 2009-02-10 Diego Novillo <dnovillo@google.com>
4367 * lto.c (read_cgraph_and_symbols): Fix comment.
4369 2009-02-10 Diego Novillo <dnovillo@google.com>
4371 * lto.c (read_cgraph_and_symbols): Read options from all
4374 2009-02-10 Diego Novillo <dnovillo@google.com>
4376 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4377 (materialize_cgraph): Likewise.
4378 (do_whole_program_analysis): Likewise.
4379 (lto_main): Call read_cgraph_and_symbols,
4380 materialize_cgraph and do_whole_program_analysis.
4382 2009-02-10 Simon Baldwin <simonb@google.com>
4384 * lto.c: Include lto-opts.h.
4385 * (lto_main): Clear file options at loop start, read any saved
4386 options from the first file handled, and re-issue options.
4387 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4389 2009-02-02 Diego Novillo <dnovillo@google.com>
4391 * lto.c (lto_main): Stop LTO_TIMER and use
4392 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4394 2009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4397 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4400 2009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4402 * Make-lang.in (LTO_EXE): Link with all
4403 BACKENDLIBS and not only GMPLIBS
4405 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4408 * lto-elf.c: Include gelf.h instead of libelf.h.
4409 (lto_elf_file_close): Replace elfx_update_shstrndx with
4410 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4413 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4416 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4418 2009-01-26 Diego Novillo <dnovillo@google.com>
4420 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4422 2009-01-26 Diego Novillo <dnovillo@google.com>
4424 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4425 and rename into gimple_types_compatible_p.
4427 2009-01-12 Rafael Avila de Espindola <espindola@google.com>
4429 * lto-lang.c (lang_hooks): Remove the const qualifier.
4431 2009-01-06 Diego Novillo <dnovillo@google.com>
4433 * ltrans-driver: Mark 'all' target as phony.
4435 2008-12-31 Diego Novillo <dnovillo@google.com>
4437 * ltrans-driver: Execute a NOP action for target 'all'.
4439 2008-12-19 Diego Novillo <dnovillo@google.com>
4441 * lto.c (lto_1_to_1_map): Tidy.
4443 2008-12-19 Diego Novillo <dnovillo@google.com>
4445 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4446 be opened, show its name.
4447 * ltrans-driver: If $verbose is set, do not use parallelism.
4449 2008-12-17 Rafael Avila de Espindola <espindola@google.com>
4451 * lto.c (lto_fixup_function): New.
4452 (lto_fixup_tree): Call lto_fixup_function.
4454 2008-12-14 Doug Kwan <dougkwan@google.com>
4456 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4457 variables if there is no function.
4459 2008-12-10 Simon Baldwin <simonb@google.com>
4461 * ltrans-driver: Always run make in silent mode, to avoid make's
4462 trace on stdout interfering with lto-wrapper output.
4464 2008-12-10 Doug Kwan <dougkwan@google.com>
4466 * lto.c (lto_add_inline_clones): Do not force master clones of
4467 inlined functions already in SET to be static inline.
4469 2008-12-04 Doug Kwan <dougkwan@google.com>
4471 * lto.c (globalize_context_t): New type to store states in
4472 globalization of cross-file statics.
4473 (globalize_cross_file_statics): New.
4474 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4475 static decls that need to be fixed up.
4476 (lto_scan_statics_in_cgraph_node): Change call interface to use
4477 a globalize_context_t CONTEXT for all states used.
4478 (lto_scan_statics_in_remaining_global_vars): New.
4479 (lto_promote_cross_file_statics): Use new call interface of
4480 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4481 visible vars in the last set.
4483 2008-12-03 Diego Novillo <dnovillo@google.com>
4485 * lto.c (lto_fixup_tree): Do not emit an error when
4486 PREVAILING throw but T doesn't.
4488 2008-12-02 Doug Kwan <dougkwan@google.com>
4490 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4492 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4493 variables and functions.
4494 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4495 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4497 2008-11-29 Diego Novillo <dnovillo@google.com>
4499 * lto.c: Include timevar.h.
4500 (lto_materialize_function): Tidy. Add comments.
4501 (lto_wpa_write_files): Tidy.
4502 (lto_execute_ltrans): Tidy.
4503 (lto_main): Add local variable LTO_TIMER. Initialize it
4504 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4505 Start and stop the timer.
4507 * Make-lang.in (lto.o): Add dependency on timevar.h.
4508 * ltrans-driver: React to -v and -save-temps.
4509 Use simple heuristic to determine how much parallelism to
4510 use when executing make.
4512 2008-11-12 Doug Kwan <dougkwan@google.com>
4514 * lto.c (lto_bitmap_obstack): Remove var.
4515 (lto_materialize_function): Do nothing instead of marking function
4516 body in file if flag_wpa is true.
4517 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4518 (lto_scan_statics_in_cgraph_node): New function.
4519 (lto_promote_cross_file_statics): Same.
4520 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4521 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4522 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4524 2008-11-09 Diego Novillo <dnovillo@google.com>
4526 * lto.c (lto_fixup_tree): Change error message locus
4527 information to include location of mismatching
4529 Use TREE_NO_WARNING to avoid repeated messages.
4530 (lto_main): If lto_fixup_decls emitted any errors, exit.
4531 * lto-lang.c: Don't include libfuncs.h and except.h
4532 (lto_init_options): Don't enable exceptions by default.
4533 (lto_eh_runtime_type): Move to lto-function-in.c
4534 (lto_init_eh): Likewise.
4535 (lto_init): Don't call lto_init_eh.
4536 * Make-lang.in (lto-lang.o): Remove dependency on
4537 libfuncs.h and except.h.
4539 2008-10-30 Diego Novillo <dnovillo@google.com>
4541 * lto.c (lto_read_decls): Declare debug_main only if
4542 LTO_STREAM_DEBUGGING is enabled.
4544 2008-10-30 Simon Baldwin <simonb@google.com>
4546 * lto.c (lto_wpa_write_files): Create intermediate files with
4547 make_cwd_temp_file().
4548 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4549 WPA_SAVE_LTRANS is set.
4550 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4551 * ltrans-driver: Do not strip directory from output files.
4553 2008-10-29 Doug Kwan <dougkwan@google.com>
4555 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4557 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4558 (lto/lto-symtab.o): Remove rule.
4559 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4560 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4561 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4563 lto-symtab.c (File): Move up one level.
4564 lto-lang.c (cgraph.h): Remove include.
4565 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4566 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4567 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4569 2008-10-24 Rafael Espindola <espindola@google.com>
4571 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4572 non prevailing weak symbols.
4574 2008-10-24 Rafael Espindola <espindola@google.com>
4576 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4578 2008-10-24 Rafael Espindola <espindola@google.com>
4580 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4583 2008-10-23 Simon Baldwin <simonb@google.com>
4585 * lto-lang.c (input_node): Save the node reference, rather than the
4586 node pointer, in node->inlined_to.
4587 (input_cgraph_1): Convert node references into node pointers.
4589 2008-10-22 Diego Novillo <dnovillo@google.com>
4590 Rafael Espindola <espindola@google.com>
4592 * lto.c (lto_resolution_read): Tidy.
4593 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4594 abort if RET is NULL.
4596 2008-10-22 Doug Kwan <dougkwan@google.com>
4598 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4599 exceptions flag is given.
4600 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4601 (lto_init_eh): Remove exceptions flag initialization.
4602 (lto_init): Only call lto_init_eh if exceptions flag is set.
4604 2008-10-21 Diego Novillo <dnovillo@google.com>
4606 * lto.c: Tidy some formatting.
4609 2008-10-21 Simon Baldwin <simonb@google.com>
4611 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4612 them is NULL (but not the other).
4614 2008-10-17 Diego Novillo <dnovillo@google.com>
4616 * ltrans-driver: Divert output from make to a temporary file.
4617 Show it if the call to make failed.
4619 2008-10-15 Diego Novillo <dnovillo@google.com>
4621 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4622 Do not print TEMP_FILENAME
4623 * ltrans-driver: Call make with -s.
4625 2008-10-15 Diego Novillo <dnovillo@google.com>
4627 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4628 TREE_STATIC on global symbols.
4630 2008-10-14 Ollie Wild <aaw@google.com>
4632 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4633 (LTRANS_DRIVER_EXE): Add.
4634 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4635 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4636 (lto.install.common): Remove ltrans-driver.
4637 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4638 (LTRANS_DRIVER_EXE): New build rule.
4639 * config-lang.in (compilers): Add ltrans-driver.
4641 2008-10-14 Diego Novillo <dnovillo@google.com>
4643 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4646 2008-10-13 Ollie Wild <aaw@google.com>
4648 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4649 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4650 * ltrans-driver (LTRANS_FLAGS): Remove.
4652 2008-10-08 Doug Kwan <dougkwan@google.com>
4654 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4655 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4656 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4657 from lto_fixup_state to here.
4658 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4659 just a free-list. Fix up types also. Move decl merging code to
4661 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4663 (lto_fixup_decls): Use another pointer set to avoid multiple
4664 walking of nodes except for DECLs to be replaced. Pass an
4665 lto_fixup_data_t object to tree-walker.
4667 2008-10-08 Rafael Espindola <espindola@google.com>
4669 * lto-symtab.c (lto_symtab_set_resolution): New.
4670 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4671 lto_symtab_get_resolution.
4672 (lto_symtab_prevailing_decl): Return decl for non public decls.
4673 (lto_symtab_get_resolution): New.
4674 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4676 2008-10-06 Rafael Espindola <espindola@google.com>
4678 * lto-lang.c: Include cgraph.h.
4679 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4680 input_cgraph): Moved from lto-cgraph.c.
4681 (LANG_HOOKS_INPUT_CGRAPH): New.
4683 2008-10-03 Rafael Espindola <espindola@google.com>
4685 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4687 2008-10-03 Rafael Espindola <espindola@google.com>
4689 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4690 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4691 prevailing definition. Don't mark TREE_NOTHROW differences.
4692 * lto.c (lto_fixup_tree): New.
4693 (lto_fixup_state): New.
4694 (lto_fixup_state_aux): New.
4696 (lto_fixup_decls): New.
4697 (lto_main): Call lto_fixup_decls.
4699 2008-10-02 Ollie Wild <aaw@google.com>
4701 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4703 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4704 * lto-lang.c (lto_post_options): Add validation and fixups for
4707 2008-10-02 Rafael Espindola <espindola@google.com>
4709 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4710 lto_symtab_merge_decl): Return void.
4711 (lto_symtab_prevailing_decl): New.
4713 2008-09-30 Rafael Espindola <espindola@google.com>
4715 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4717 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4718 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4719 Check for already defined symbols.
4720 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4721 (LTO_IDENTIFIER_RESOLUTION): Remove.
4722 (LTO_DECL_RESOLUTION): New.
4724 2008-09-30 Rafael Espindola <espindola@google.com>
4726 * lto.c (lto_read_decls): Use new input_tree signature.
4728 2008-09-26 Doug Kwan <dougkwan@google.com>
4730 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4731 bodies affected by exception attribute merging of DECLs.
4732 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4735 2008-09-25 Rafael Espindola <espindola@google.com>
4737 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4738 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4739 * lto-symtab.c (lto_symtab_compatible): New.
4740 (lto_symtab_overwrite_decl): New.
4741 (lto_symtab_merge_decl): Refactor to use the above functions
4742 and the resolution from lang_identifier.
4743 * lto-tree.h: Include plugin-api.h.
4744 (lang_identifier): Add resolution.
4745 (LTO_IDENTIFIER_RESOLUTION): New.
4747 2008-09-25 Ollie Wild <aaw@google.com>
4749 * lang.opt (fltrans-output-list=): New option.
4750 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4752 2008-09-25 Rafael Espindola <espindola@google.com>
4754 * lto.c (lto_resolution_read): Initialize ret;
4756 2008-09-24 Ollie Wild <aaw@google.com>
4758 * lto.c (sys/mman.h): Move include.
4759 (lto_wpa_write_files): Return a list of written files.
4760 (lto_execute_ltrans): New function.
4761 (lto_main): Call lto_execute_ltrans.
4762 (ltrans-driver): New file.
4763 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4764 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4765 (lto_init_options): Initialize ltrans_driver.
4766 (lto_handle_option): Fix incorrect default output value.
4767 * lang.opt (fltrans-driver=): New option.
4768 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4769 (lto.install-common): Add lto/ltrans-driver.
4771 2008-09-24 Rafael Espindola <espindola@google.com>
4773 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4774 (lto/lto.o): Depend on lto/common.h.
4775 (lto/common.o): New.
4776 * lang.opt (resolution): New.
4777 * lto-lang.c (resolution_file_name): New.
4778 (lto_handle_option): Handle OPT_resolution.
4779 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4780 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4781 pass it to lto_symtab_merge_decl.
4782 * lto.c: Include common.h.
4783 (lto_read_decls): Add resolutions and resolutions_size arguments.
4784 Initialize data_in.globals_resolution and
4785 data_in.globals_resolution_size.
4786 (index_and_symbol_resolution): New.
4787 (lto_resolution_read): New.
4788 (lto_file_read): Add argument resolution_file.
4790 * lto.h (resolution_file_name): New.
4792 2008-09-23 Rafael Espindola <espindola@google.com>
4794 * common.c: Update description.
4795 * common.h: Update description.
4797 2008-09-23 Rafael Espindola <espindola@google.com>
4799 * common.c: Moved from lto-plugin.
4800 * common.h: Moved from lto-plugin.
4802 2008-09-22 Doug Kwan <dougkwan@google.com>
4804 * lto.c (VEC(bitmap,heap)): Declare.
4805 (lto_materialize_function): Handle WAP mode specially.
4806 (lto_add_inline_clones): New.
4807 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4808 return a bitmap of inlined decls.
4809 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4810 (lto_main): Call reset_inline_failed to reset inlining states.
4811 Check call-graph after WPA inlining.
4812 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4815 2008-09-19 Doug Kwan <dougkwan@google.com>
4817 lto.c (lto_main): Remove unsued wrapper code.
4818 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4820 2008-09-19 Rafael Espindola <espindola@google.com>
4822 * lto-symtab.c: Include lto-tree-in.h.
4823 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4824 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4825 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4827 2008-09-17 Paolo Bonzini <bonzini@gnu.org>
4828 Rafael Avila de Espindola <espindola@google.com>
4830 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4831 COMPOUND_LITERAL_EXPR_DECL): Remove.
4832 (emit_local_var): Remove.
4833 (lto_expand_expr): Remove.
4834 (lto_staticp): Remove.
4835 (LANG_HOOKS_EXPAND_EXPR): Remove.
4836 (LANG_HOOKS_STATICP): Remove.
4838 2008-09-11 Diego Novillo <dnovillo@google.com>
4840 * lto-lang.c: Include except.h and libfuncs.h.
4842 (lto_init): Call it.
4843 Set flag_generate_lto to 0.
4844 * Make-lang.in (lto-lang.o): Add dependency on except.h
4847 2008-09-09 Bill Maddox <maddox@google.com>
4849 * lto-lang.c: Include header file expr.h.
4850 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4851 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4852 (emit_local_var): Copied from c-semantics.c.
4853 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4854 and c_staticp in c-common.c.
4855 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4857 2008-09-08 Diego Novillo <dnovillo@google.com>
4859 * lto-lang.c (lto_global_bindings_p): Return 1 during
4862 2008-09-07 Diego Novillo <dnovillo@google.com>
4864 * lto.c: Tidy formatting.
4866 2008-08-04 Bill Maddox <maddox@google.com>
4868 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4870 2008-09-03 Doug Kwan <dougkwan@google.com>
4872 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4873 CIF_OK instead of NULL.
4875 2008-09-02 Diego Novillo <dnovillo@google.com>
4876 Simon Baldwin <simonb@google.com>
4878 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4879 c_common_type_for_size.
4880 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4881 (lto_init): Call linemap_add.
4882 (signed_and_unsigned_types): Remove.
4884 2008-08-29 Diego Novillo <dnovillo@google.com>
4886 * lto-lang.c (handle_noreturn_attribute): New local function.
4887 (handle_const_attribute): New local function.
4888 (handle_malloc_attribute): New local function.
4889 (handle_pure_attribute): New local function.
4890 (handle_novops_attribute): New local function.
4891 (handle_nonnull_attribute): New local function.
4892 (handle_nothrow_attribute): New local function.
4893 (handle_sentinel_attribute): New local function.
4894 (handle_type_generic_attribute): New local function.
4895 (handle_format_attribute): New local function.
4896 (handle_format_arg_attribute): New local function.
4897 (lto_attribute_table): Declare.
4898 (lto_format_attribute_table): Declare.
4899 (lto_init_attributes): New local function.
4900 (lto_define_builtins): Call it.
4901 Call targetm.init_builtins and build_common_builtin_nodes.
4902 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4903 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4905 2008-08-28 Diego Novillo <dnovillo@google.com>
4907 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4909 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4910 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4911 * lto-symtab.c: Include gimple.h.
4912 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4915 2008-08-27 Doug Kwan <dougkwan@google.com>
4917 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4918 gt-lto-lto.h): New includes.
4919 (lto_materialize_function): Do not read in function body in WPA mode.
4920 Format a line to fit in 80 columns.
4921 (lto_cgraph_node_sets): New garbage collected variable.
4922 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4924 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4925 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4926 variable LTO_SECTION_IN_H.
4927 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4928 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4929 with variable LTO_SECTION_IN_H.
4930 * config-lang.in (gtfiles): Add lto/lto.c.
4931 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4932 merged DECL_RESULT correctly.
4934 2008-08-26 Bill Maddox <maddox@google.com>
4936 * lto-lang.c Include tree-gimple.h.
4937 (lto_mark_addressable): Call mark_addressable rather than
4939 (lto_post_options): Suppress debug info generation.
4940 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4942 2008-08-25 Bill Maddox <maddox@google.com>
4944 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4945 assertion and leave an explanatory comment in its place.
4947 2008-08-21 Doug Kwan <dougkwan@google.com>
4949 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4950 of common nodes instead of computing locallly.
4951 (lto_read_in_decl_state): New.
4952 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4953 Read global and per-function in-decl states.
4954 * Make-lang.in (LTO_H): Update dependency.
4956 (lto-symtab.c): Merge (revision 139039)
4957 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4959 2008-08-21 Rafael Espindola <espindola@google.com>
4961 * config-lang.in (target_libs): New.
4963 2008-08-20 Bill Maddox <maddox@google.com>
4965 * lto.c (current_lto_file): Remove GTY marker from static
4966 variable. Remove include of file gt-lto-lto.h.
4967 * Make-lang.in: Remove dependency of lto/lto.o on
4969 * lto-elf.c (lto_file_close): Removed.
4970 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4971 allocate lto_elf_file object.
4972 (lto_elf_file_close): Free lto_elf_file object after close.
4973 * lto.h (struct lto_file_struct): Remove GTY marker.
4974 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4977 2008-08-20 Bill Maddox <maddox@google.com>
4979 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4980 to conform to its new signature.
4981 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4982 on discarded node here, now called in global_vector_fixup.
4984 2008-08-09 Bill Maddox <maddox@google.com>
4986 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4987 has not been set to a front-end-specific value.
4989 2008-08-05 Doug Kwan <dougkwan@google.com>
4991 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4994 2008-07-30 Bill Maddox <maddox@google.com>
4996 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4997 Remove obsolete comments.
4998 (lto_read_decls): Remove initialization of deleted field data_in.global.
5000 (lto_main): Remove redundant initialization of section_hash_table.
5001 * lto-elf.c: Removed obsolete comments.
5002 * lto.h: Tidy up comments.
5003 * lto-symtab.c (lto_least_common_multiple): New function.
5004 (lto_symtab_merge_decl): Merge variable alignments in some cases.
5007 2008-07-25 Diego Novillo <dnovillo@google.com>
5008 Bill Maddox <maddox@google.com>
5010 * lto.c: Re-order include files.
5011 Include lto-section-out.h.
5012 (preload_common_nodes): Add debugging output.
5013 Add new local INDEX_TABLE.
5014 Call preload_common_node.
5015 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
5017 2008-07-13 Bill Maddox <maddox@google.com>
5019 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
5020 unwanted scaling during pointer addition.
5022 2008-07-11 Bill Maddox <maddox@google.com>
5023 Diego Novillo <dnovillo@google.com>
5025 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
5026 Make code const-correct.
5027 (lto_file_read): Fix C++ compatibility warnings.
5028 (lto_read_section_data): Fix C++ compatibility warnings.
5029 (lto_get_section_data): Use CONST_CAST to avoid warning when
5030 const pointer passed to free.
5031 * lto-elf.c (lto_elf_build_section_table): Fix C++
5032 compatibility warnings.
5033 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
5034 to avoid warning assigning const pointer to d_buf field of Elf_Data.
5035 (lto_get_current_out_file): Fix C++ compatibility warnings.
5037 2008-07-11 Diego Novillo <dnovillo@google.com>
5039 * Make-lang.in (lto-warn): Define.
5041 2008-07-03 Simon Baldwin <simonb@google.com>
5043 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
5044 LTO_STREAM_DEBUGGING.
5046 2008-06-27 Ollie Wild <aaw@google.com>
5048 * lto-elf.c (lto-section-out.h): New include.
5049 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
5051 (cached_file_attrs): New static variable.
5052 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
5053 Use cached_file_attrs for checking bits.
5054 (lto_elf_build_section_table): Remove elf_file argument from
5055 lto_elf_get_shdr and lto_elf_free_shdr calls.
5056 (DEFINE_INIT_SHDR): New macro.
5057 (init_shdr32, init_shdr64): New functions defined via the
5058 DEFINE_INIT_SHDR macro.
5059 (lto_elf_begin_section_with_type): New function.
5060 (lto_elf_begin_section): New function.
5061 (lto_elf_append_data): New function.
5062 (lto_elf_end_section): New function.
5063 (DEFINE_VALIDATE_EHDR): New macro.
5064 (validate_ehdr32, validate_ehdr64): New functions defined via the
5065 DEFINE_VALIDATE_EHDR macro.
5066 (validate_file): New function.
5067 (DEFINE_INIT_EHDR): New macro.
5068 (init_ehdr32, init_ehdr64): New functions defined via the
5069 DEFINE_INIT_EHDR macro.
5070 (init_ehdr): New function.
5071 (lto_elf_file_open): Add support for writable files. Move some
5072 validation logic to validate_file.
5073 (lto_elf_file_close): Add support for writable files. Write file data
5074 and free data blocks.
5075 (current_out_file): New static variable.
5076 (lto_set_current_out_file): New function.
5077 (lto_get_current_out_file): New function.
5078 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
5079 Add temporary initialization for testing ELF serialization.
5080 * lto.h (lto-section-out.h): New include.
5081 (struct lto_file_struct): Slight modification to comment.
5082 (lto_elf_file_open): Add writable parameter.
5083 (lto_elf_begin_section): New function declaration.
5084 (lto_elf_append_data): New function declaration.
5085 (lto_elf_end_section): New function declaration.
5086 (lto_set_current_out_file, lto_get_current_out_file): New function
5088 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
5089 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
5090 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
5091 * Make-lang.in (LTO_H): Add lto-section-out.h.
5093 2008-06-12 Ollie Wild <aaw@google.com>
5095 * lto.h (struct lto_file_vtable_struct): Remove.
5096 (struct lto_file_struct): Remove vtable member.
5097 * lto-elf.c (lto_file_init): Remove vtable argument.
5098 (lto_elf_map_optional_lto_section): Remove.
5099 (lto_elf_unmap_section): Remove.
5100 (lto_elf_file_vtable): Remove.
5101 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
5103 (lto_elf_find_section_data): Remove.
5105 2008-06-11 Ollie Wild <aaw@google.com>
5107 * lto.c (lto_file_read): Add const qualifier to data variable.
5109 2008-06-11 Diego Novillo <dnovillo@google.com>
5111 Merge from lto-streamber sub-branch.
5113 2008-06-04 Ollie Wild <aaw@google.com>
5115 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
5116 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
5118 2008-05-28 Bill Maddox <maddox@google.com>
5120 Replace the DWARF reader in the LTO front-end.
5122 * lto.c: Include lto-tree-in.h, lto-tags.h.
5123 (enum DWARF2_class, DW_cl_constant, struct
5124 DWARF2_form_data, struct lto_context,
5125 lto_fd_init, lto_info_fd_init,
5126 lto_abbrev_fd_init, lto_info_fd_close,
5127 lto_file_init, lto_file_close,
5128 lto_file_corrupt_error, lto_abi_mismatch_error,
5129 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
5130 lto_read_uleb128, lto_read_sleb128,
5131 lto_read_initial_length, lto_abbrev_read_attrs,
5132 lto_abbrev_read, lto_abbrev_read_lookup,
5133 lto_read_section_offset,
5134 lto_read_comp_unit_header, find_cu_for_offset,
5136 lto_resolve_reference,lto_read_form,
5137 attribute_value_as_int,
5138 make_signed_host_wide_int,
5139 attribute_value_as_constant, lto_cache_hash,
5140 lto_cache_eq, lto_cache_store_DIE,
5141 lto_cache_lookup_DIE, lto_find_integral_type,
5142 lto_find_integral_type_1,
5143 LTO_BEGIN_READ_ATTRS_UNCHECKED,
5144 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
5145 lto_unsupported_attr_error, lto_get_identifier,
5146 lto_read_referenced_type_DIE,
5147 lto_read_compile_unit_DIE,
5148 lto_read_array_type_DIE,
5149 lto_read_structure_union_class_type_DIE,
5150 lto_read_enumerator_DIE,
5151 lto_read_enumeration_type_DIE,
5152 lto_read_only_for_child_DIEs,
5153 lto_read_only_for_child_DIEs,
5154 lto_read_member_DIE, lto_read_abbrev,
5155 lto_read_variable_formal_parameter_constant_DIE,
5156 lto_get_body): Removed.
5157 (preload_common_nodes): New function.
5158 (lto_read_decls): Convert for new global streamer.
5159 (lto_materialze_file_data,
5160 lto_read_subroutine_type_subprogram_die,
5161 lto_read_unspecified_parameters_DIE,
5162 lto_read_typedef_DIE,
5163 lto_read_pointer_reference_type_DIE,
5164 lto_read_subrange_type_DIE,
5165 lto_read_base_type_DIE,
5166 lto_read_const_volatile_restrict_type_DIE,
5167 lto_read_namespace_DIE,
5168 lto_read_unspecified_type_DIE, lto_read_DIE,
5169 lto_read_child_DIEs, lto_collect_child_DIEs):
5171 (lto_info_read, lto_set_cu_context): Removed.
5172 (lto_file_read): Convert for new global streamer.
5173 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
5174 lto_resolve_var_ref, lto_resolve_fn_ref,
5175 lto_resolve_field_ref, lto_resolve_typedecl_ref,
5176 lto_resolve_namespacedecl_ref): Removed.
5177 (lto_file_init, lto_file_close): Moved to lto-elf.c.
5178 * lto-tree.h (lto_symtab_merge_var,
5179 lto_symtab_mergee_fun): Declare here.
5180 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
5181 (lto_elf_file_open): Removed code to read DWARF debug sections.
5182 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
5183 DWARF2_CompUnit, lto_die_ptr,
5184 lto_die_cache_entry, lto_fd, lto_info_fd,
5185 lto_abbrev_fd): Removed.
5186 (lto_file): Removed debug_info and debug_abbrev fields.
5188 (lto_file_init, lto_file_close,
5189 lto_resolve_type_ref, lto_resolve_var_ref,
5190 lto_resolve_fn_ref, lto_resolve_field_ref,
5191 lto_resolve_typedecl_ref,
5192 lto_resolve_namespacedecl_ref,
5193 lto_get_file_name): Removed declarations.
5194 (lto_symtab_merge_var, lto_symtab_merge_fn):
5195 Declarations moved to lto-tree.h.
5196 * lto-symtab.c (lto_compatible_attributes_p):
5197 Lobotomize this, as it barfs on "Hello, world!".
5198 * lto-section-out.c: Include lto-tree-out.h.
5199 (lto_hash_global_slot_node,
5200 lto_eq_global_slot_node, preload_common_nodes,
5201 write_global_stream, write_global_references):
5203 (produce_asm_for_decls): Convert for new global streamer.
5204 * lto-section-out.h (lto_hash_global_slot_node,
5205 lto_eq_global_slot_node): Declare.
5207 2008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
5208 Jan Hubicka <jh@suse.cz>
5210 * lto.c (sys/mman.h, tree-pass.h): New includes.
5211 (lto_materialize_constructors_and_inits,
5212 lto_materialize_function): Keeps length of section.
5213 (lto_materialize_cgraph): Removed.
5214 (lto_read_decls): Initialize fd field.
5215 (lto_file_read): Different return type and removed much code to
5217 (page_mask): New variable.
5218 (lto_read_section_data, get_section_data, free_section_data): New
5220 (lto_main): Now calls pass manager, sets the hooks so that the ipa
5221 passes can get the section data.
5223 2008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
5225 * lto.h (lto_read_decls): Made local.
5226 (lto_input_function_body, lto_input_constructors_and_inits,
5227 lto_input_cgraph): Declarations moved to lto-section-in.h.
5228 * lto-section-in.c: Moved to .. .
5229 * lto-cgraph-in.c: Ditto.
5230 * lto-section-in.h: Ditto.
5231 * lto-function-in.c: Ditto.
5232 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
5233 (lto_insert_block): Removed.
5234 (LANG_HOOKS_INSERT_BLOCK): Removed.
5235 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
5236 lto-section-in.o): Rules moved to lto/Makefile.in.
5239 2008-05-16 Ollie Wild <aaw@google.com>
5241 * lto-lang.c (tree-inline.h): Include.
5242 (lto_post_options): New function.
5243 (LANG_HOOKS_POST_OPTIONS): Define.
5244 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
5245 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
5247 2008-05-13 Diego Novillo <dnovillo@google.com>
5249 * lto-function-in.c (input_ssa_names): Call
5250 make_ssa_name_fn instead of make_ssa_name.
5252 2008-05-12 Diego Novillo <dnovillo@google.com>
5254 * lto-cgraph-in.c (overwrite_node): Update references to
5255 inline summary fields.
5256 * lto-function-in.c (input_expr_operand): Do not handle
5259 2008-05-09 Ollie Wild <aaw@google.com>
5261 * lang.opt: New file.
5262 * lto-lang.c (lto_init_options): New function.
5263 (lto_handle_option): New function.
5264 (lto_init): Move initialization of flag_unit_at_a_time to
5266 (LANG_HOOKS_INIT_OPTIONS): Define.
5267 (LANG_HOOKS_HANDLE_OPTION): Define.
5269 2008-04-29 Ollie Wild <aaw@google.com>
5271 * lto.c (lto_read_namespace_DIE): New function.
5272 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
5273 NAMESPACE_DECL DIE's.
5274 (lto_resolve_namespacedecl_ref): New function.
5275 * lto.h (lto_resolve_namespacedecl_ref): New function.
5276 * lto-section-in.c (lto_read_decls): Read namespace declarations.
5277 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
5278 and num_namespace_decls.
5279 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
5280 * lto-lang.c (lto_init_ts): New function.
5281 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
5283 2008-04-16 Ollie Wild <aaw@google.com>
5285 * lto-function-in.c (input_type_ref): Updated function description.
5287 2008-04-16 Ollie Wild <aaw@google.com>
5289 * lto-function-in.c (input_type_ref_1): New function.
5290 (input_type_ref): Split into two functions.
5291 (input_function): Add support for type contexts.
5293 2008-04-16 Ollie Wild <aaw@google.com>
5295 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
5298 2008-04-16 Ollie Wild <aaw@google.com>
5300 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
5301 list of supported languages.
5303 2008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
5305 Merge with mainline @133491.
5307 2008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
5308 Jan Hubicka <jh@suse.cz>
5310 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
5311 fd->unmaterialized_fndecls.
5312 (lto_get_file_name, lto_materialize_cgraph): New function.
5313 (lto_materialize_constructors_and_inits,
5314 lto_materialize_function): Read info directly from elf file.
5315 (lto_file_read): Made local and initialize dictionary so that
5316 other lto sections can be read without reprocessing the elf file.
5317 (lto_main): Read all functions after all files have been processed
5318 for their types, globals and cgraph.
5319 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5321 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5322 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5323 (lto_elf_read_symtab): Removed function.
5324 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5325 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5326 (lto_file_read): Made local.
5327 (lto_get_file_name, lto_elf_build_section_table,
5330 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5332 (lto_read_decls): Get the file name.
5333 * lto-cgraph-in.c: New file.
5334 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5335 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5336 (input_labels): Fixed latent sizeof issue.
5337 (input_function): Build stmt array to set call sites into cgraph
5339 (lto_read_body): Reset cfun->curr_properties.
5340 * lto_section_in.h (lto_section_slot): New structure.
5341 (section_hash_table.lto_file_decl_data): New field.
5343 2008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
5345 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5346 reconstruct static initializers.
5347 (lto_get_body, lto_materialize_function): Add lto_section_type as
5349 (lto_materialize_constructors_and_inits,
5350 lto_materialize_file_data): New function.
5351 (lto_materialize_function,
5352 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5353 unmap_section and map_fn_body to map_section.
5354 (lto_set_cu_context): Process functions and static inits
5356 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5357 lto/lto-section-in.o): Update dependencies.
5358 * lto-elf.c (lto_elf_map_optional_lto_section): Add
5359 lto_section_type parameter.
5360 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
5361 * lto.h (lto_file_vtable_struct): Removed two of the fields and
5362 renamed the other two so that there is only one map function and
5363 one unmap function and each takes a section type parameter.
5364 (lto_read_function_body): Renamed to lto_input_function_body and
5365 added file_data parameter.
5366 (lto_read_var_init): Removed.
5367 (lto_input_constructors_and_inits): New function.
5368 * lto-section-in.c (lto_read_decls): New function.
5369 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5370 var_decls, type_decls, types to lto_file_decl_data.
5371 (input_type_ref, input_expr_operand, lto_read_body): Get
5372 field_decls, fn_decls, var_decls, type_decls, types from different
5374 (input_globals, input_constructor, lto_read_var_init): Removed.
5375 (input_constructors_or_inits): New function.
5376 (lto_read_function_body, lto_input_constructors_and_inits):
5377 Renamed to lto_input_function_body and takes file_data parameter.
5378 * lto-section-in.h (lto_file_decl_data): New structure.
5380 2008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5382 * lto-function-in.c (input_globals.c): Changed input type to
5383 lto_function_header.
5384 (input_bb): Removed code to deserialize the stmt number.
5385 (input_function): Renumber all stmts after they are input.
5386 (lto_read_body, lto_read_function_body, lto_read_var_init):
5387 Changed to used new header format and enum section_type.
5388 *lto-lang.c (success): Removed.
5390 2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5392 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5393 (lto_elf_free_sym): Likewise.
5395 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5396 (lto_elf_build_init): Likewise.
5398 2008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
5400 * lto-read.c: Renamed to lto-function-in.c.
5401 (input_1_unsigned): Moved to lto-section-in.c and renamed
5402 lto_input_1_unsigned.
5403 (input_uleb128): Moved to lto-section-in.c and renamed
5405 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5406 lto_input_widest_uint_uleb128.
5407 (input_sleb128): Moved to lto-section-in.c and renamed
5409 (input_integer): Moved to lto-section-in.c and renamed
5411 (debug_in_fun): Moved to lto-section-in.c and renamed
5413 (input_block): Moved to lto-section-in.h and renamed
5415 (input_expr_operand): Fixed to allow lists with more than one
5417 * lto-section-in.h: New file.
5418 * lto-section-in.c: New file with changes from above.
5419 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5420 (lto-section-in.o): New rule.
5422 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5424 * lto-read.c (input_expr_operand): Mark static and external
5425 VAR_DECLs as needed.
5427 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5429 * lto-read.c (input_integer): Use the correct shift amount.
5431 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5433 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5434 (LANG_HOOKS_NAME): Define.
5436 2007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5438 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5439 original function to...
5440 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5441 don't have a base type.
5442 (lto_read_enumeration_type_DIE): Examine the values of the
5443 enumeration to determine whether we can use an unsigned type for
5444 the base type of the enumeration.
5446 2007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5448 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5449 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5451 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5453 * lto-lang.c (lto_types_compatible_p): New function.
5454 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5456 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5457 Kenneth Zadeck <zadeck@naturalbridge.com>
5459 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5460 (input_local_vars): Read in DECL_INITIAL and context for local
5461 statics that need to be put in unexpanded_vars_list.
5463 2007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5465 * lto-read.c (input_real): Use a separate null-terminated buffer
5466 for calling real_from_string.
5467 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5468 tell cgraph that it's needed.
5470 2007-12-19 Doug Kwan <dougkwan@google.com>
5472 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5474 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5476 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5477 (lto_file_read): Reset the members of 'context' every time we read
5478 a toplevel DIE, with special attention to last_param_type.
5480 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5482 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5483 'declaration'. Set the assembler name for non-public functions.
5485 2007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
5487 * lto_read.c (data_in.unexpanded_indexes): New array.
5488 (input_local_var): Added code to read in unexpanded_var_list
5489 indexes for variables. Only read in DECL_CHAIN field for
5491 (input_local_vars): Added code to rebuild unexpanded_var_list in
5492 order using unexpanded_indexes.
5493 (input_function): Added code to set DECL_CONTEXT for functions.
5495 2007-12-13 Doug Kwan <dougkwan@google.com>
5497 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5498 in pointer and reference types.
5500 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5502 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5505 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5507 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5508 already read the DIE.
5509 (lto_get_body): New function, split out from...
5510 (lto_materialize_function): ...here. Call it.
5511 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5512 determine DECL_EXTERNAL.
5513 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5514 FUNCTION_DECLs when necessary. Use the type of the actual
5515 function definition if we are unable to easily merge types. Ignore
5516 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5519 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5521 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5523 2007-12-12 Bill Maddox <maddox@google.com>
5526 2007-12-07 Bill Maddox <maddox@google.com>
5528 * lto.c (lto_str_fd_init): New function.
5529 (lto_str_fd_close): New function.
5530 (lto_file_init): Call lto_str_fd_init.
5531 (lto_file_close): Call lto_str_fd_close.
5532 (lto_str_read): New function. Read debug string table.
5533 (lto_str_lookup): New function. Get string for debug
5534 string table offset.
5535 (lto_read_form): Recognize DW_FORM_strp.
5536 (lto_file_read): Invoke lto_str_read.
5538 * lto-elf.c (lto_elf_file_open): Read raw section data
5539 for the .debug_str section, if present.
5541 * lto.h (struct lto_str_fd_struct): New struct.
5542 (struct lto_file_struct): Added new field DEBUG_STR
5543 to hold the file descriptor for the debug string table.
5545 2007-12-07 Bill Maddox <maddox@google.com>
5547 * lto.c (lto_str_fd_init): New function.
5548 (lto_str_fd_close): New function.
5549 (lto_file_init): Call lto_str_fd_init.
5550 (lto_file_close): Call lto_str_fd_close.
5551 (lto_str_read): New function. Read debug string table.
5552 (lto_str_lookup): New function. Get string for debug
5553 string table offset.
5554 (lto_read_form): Recognize DW_FORM_strp.
5555 (lto_file_read): Invoke lto_str_read.
5557 * lto-elf.c (lto_elf_file_open): Read raw section data
5558 for the .debug_str section, if present.
5560 * lto.h (struct lto_str_fd_struct): New struct.
5561 (struct lto_file_struct): Added new field DEBUG_STR
5562 to hold the file descriptor for the debug string table.
5564 2007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5566 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5567 Grow the basic_block_info and label_to_block_map vectors if
5568 necessary. Read in the block chain.
5570 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5572 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5574 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5576 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5578 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5580 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5581 (lto_read_body): Don't declare PROP_alias.
5583 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5585 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5586 argument type information.
5588 2007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5590 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5591 TREE_THIS_VOLATILE if the associated type is a volatile type.
5592 (lto_materialize_function): Remove call to init_ssa_operands.
5593 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5594 variable when reading an SSA_NAME. Do the same when reading a
5595 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5596 (input_cfg): Call init_ssa_operands.
5597 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5598 Move call to init_tree_ssa...
5599 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5600 add_referenced_var on any variables referenced from the body of the
5601 function. Inform the rest of the compiler we are in SSA form and
5602 inform later passes about the current properties.
5604 2007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5606 * lto.c (lto_materialize_function): Add FIXME.
5608 2007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5610 * lto-lang.c (enum built_in_attribute): New enum.
5611 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5612 built_in_attributes): New variables.
5613 (def_builtin_1): New function.
5614 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5616 2007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5618 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5619 DECL_SOURCE_LOCATION for debugging purposes.
5620 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5621 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5622 laying out the decl until later.
5623 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5624 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5626 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5627 operand of an ADDR_EXPR.
5628 * lto-lang.c (enum lto_builtin_type): New enum.
5629 (builtin_type): New typedef.
5630 (builtin_types, string_type_node, const_string_type_node,
5631 wint_type_node, intmax_type_node, uintmax_type_node,
5632 signed_size_type_node): New variables.
5633 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5634 lto_build_c_type_nodes): New functions.
5635 (lto_init): Initialize builtin types.
5636 (lto_set_decl_assembler_name): Let the target machine mangle the
5637 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5639 2007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5641 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5642 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5643 the type is a constant type. Set the assembler name and inform
5644 the rest of the compiler about the new decl if the decl is not
5646 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5647 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5648 try to read in function bodies for functions that already have bodies.
5649 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5651 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5652 Check for whether we matched a builtin function type before calling
5653 lto_same_type_p on the generated type. Permit cases where the
5654 declaration of an array is unbounded, but the definition is bounded.
5655 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5656 DECL_SIZE_UNIT if necessary.
5658 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5660 * lto-read.c (input_expr_operand): Get types right
5663 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5665 * lto-read.c (make_new_block, input_cfg): Properly set
5668 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5670 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5671 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5673 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5675 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5676 construct the integer type for bitfields.
5678 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5680 * lto-read.c (data_in.current_node_has_loc): Removed.
5681 (input_line_info): Returns true if node needs line set.
5682 (set_line_info): Always sets line if called.
5683 (clear_line_info): Removed reference to current_node_needs_loc.
5684 (input_expr_operand): Keeps track locally if current node needs a loc.
5685 (input_local_var): Added code to handle DECL_INITIAL for
5686 static local vars. Only set loc if necessary.
5688 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5690 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5693 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5695 * lto.c: Include langhooks.h.
5696 (lto_find_integral_type): Rework logic to handle the case where
5697 got_byte_size is true, but the bitsize requested and that of the
5698 base_type doesn't match.
5699 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5700 asm_name if we are creating a VAR_DECL.
5701 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5703 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5704 function reference and use the builtin's decl if so. Set the
5705 DECL_CONTEXT of the RESULT_DECL for the function.
5706 * lto-lang.c (registered_builtin_fndecls): New variable.
5707 (lto_getdecls): Return it.
5708 (lto_builtin_function): Chain the new decl onto
5709 registered_builtin_fndecls.
5711 2007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
5713 * lto-read.c (process_tree_flags, lto_static_init_local):
5714 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5715 (input_line_info, clear_line_info): Fixed new line number code.
5716 (input_expr_operand): Added type to SWITCH_EXPR.
5717 (lto_read_body): Properly initialized data_in.
5718 Clear line info when leaving.
5720 2007-11-13 Diego Novillo <dnovillo@google.com>
5722 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5723 Initialize ARTIFICIAL.
5724 (lto_read_subroutine_type_subprogram_DIE): Initialize
5726 * lto-read.c (set_line_info): Remove ; from calls to
5727 LINEMAP_POSITION_FOR_COLUMN.
5729 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5731 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5732 (input_expr_operand, input_local_var): Renamed get_type_ref to
5734 (input_expr_operand): Get the types correct for
5735 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5737 2007-11-13 Doug Kwan <dougkwan@google.com>
5739 * lto-read.c (input_widest_uint_uleb128): New function.
5740 (input_tree_flags, process_tree_flags, input_line_info,
5741 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5742 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5743 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5744 (lto_static_init_local): Add code to assert that lto_flags_type is
5747 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5749 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5750 (lto_read_subroutine_type_subprogram_DIE): Handle
5751 DW_AT_static_link and DW_AT_specification. Return the
5752 specification if present.
5753 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5755 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5757 * lto-lang.c: Include target.h.
5758 (registered_builtin_types): New variable.
5759 (lto_type_for_mode): Increase number of modes handled.
5760 (lto_builtin_function): Fix argument list and return the decl.
5761 (lto_register_builtin_type): New function.
5762 (lto_init): Initialize target builtins and language-independent
5764 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5766 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5768 * lto-read.c (input_expr_operand): Added code to properly handle
5769 index filed. Added new RANGE_EXPR case.
5771 2007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
5773 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5774 (data_in): Added current_node_has_loc field.
5775 (input_line_info, set_line_info, clear_line_info): Added a support
5776 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5777 did not have on on the source side.
5778 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5781 2007-11-09 Doug Kwan <dougkwan@google.com>
5783 * lto-read.c (input_expr_operand): Change type of operand 2 of
5784 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5786 2007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5788 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5789 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5790 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5791 the new decl we are creating. Move informing the middle end about
5793 (lto_main): ...here. Inform the middle end about global variables
5794 after we have read in all the input files.
5795 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5796 variables with internal linkage, so delete the check for internal
5797 linkage. Combine TREE_PUBLIC flags.
5799 2007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5801 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5803 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5804 builtin specially. Move check for attribute compatibility
5807 2007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5809 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5810 * config-lang.in (gtfiles): Add lto.h and lto.c.
5811 * lto-elf.c: Include ggc.h.
5812 (lto_elf_file_open): Allocate elf_file from GC memory.
5813 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5814 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5816 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5817 (lto_file_close): Free file from GC memory.
5818 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5819 (lto_read_member_DIE): Fix declaration.
5820 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5822 (current_lto_file): New variable.
5824 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5825 lto_die_cache_entry): Move to...
5826 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5827 declarations accordingly.
5828 (struct lto_file_struct): Declare.
5829 (lto_file_vtable): Use it instead of lto_file.
5831 2007-11-06 Alon Dayan <alond@il.ibm.com>
5832 Kenneth Zadeck <zadeck@naturalbridge.com>
5834 * lto-read.c (process_flags, lto_static_init_local):
5835 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5836 change global array num_flags_for_code to flags_length_for_code.
5837 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5839 2007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5841 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5842 layout functions to compute information about the newly constructed
5845 2007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5847 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5848 case to use DECL_RESULT if necessary.
5850 2007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
5852 * lto-read.c (input_tree_list): Removed.
5853 (input_tree_flags): Added parameter to force flags no matter what
5855 (input_expr_operand): Added parameter to input_tree_flags.
5856 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5857 input_expr_operand rather than input_tree_lists.
5858 (input_local_var): Use input_expr_operand to read attributes
5859 rather then input_tree_list.
5860 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5862 2007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5864 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5865 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5867 * lto-read.c (lto_read_body): Use correct sizes for calculating
5868 type_decls_offset and types_offset.
5870 2007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5872 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5874 * config-lang.in (gtfiles): Add lto-lang.c.
5875 * lto-lang.c: Include gt-lto-lto-lang.h.
5876 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5877 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5878 (lto/lto-read.o): Likewise.
5880 2007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
5882 * lto-read.c (data_in): Added type_decls and current_col fields.
5883 (string_slot): New type to hold canonized file name.
5884 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5885 input_line_info, set_line_info, clear_line_info): New functions.
5886 (file_name_hash_table): New hash table.
5887 (input_local_var, input_labels, input_local_vars_index,
5888 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5889 (input_uleb128): Changed type of byte var.
5890 (input_expr_operand): Large number of changes to get line numbers
5891 correct. Added TYPE_DECL case.
5892 (input_globals): Added code to get TYPE_DECLs processed.
5893 (input_local_var): Added code to process line numbers and
5894 TREE_CHAIN and DECL_CONTEXT.
5895 (input_function, input_constructor): Added call to
5897 (lto_static_init_local): Added code to get line numbers correct.
5898 (lto_read_body): Added code to get TYPE_DECLS read and to change
5899 parameters to the calls above that had their parms reorganized.
5901 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5903 * lto.h (lto_resolve_typedecl_ref): Declare.
5904 * lto.c (lto_resolve_typedecl_ref): New function.
5906 2007-10-29 Mark Mitchell <mark@codesourcery.com>
5907 Nathan Froyd <froydnj@codesourcery.com>
5909 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5910 DIEs even if we find an abstract origin for this DIE.
5912 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5914 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5915 RESULT_DECL slightly earlier. Only remember the decl for later
5916 if we successfully merge declarations.
5918 2007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
5920 * lto-read.c (input_expr_operand): Give label_values the proper
5921 context and provide switch statements with a default type.
5923 2007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5925 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5926 * lto.c (lto_materialize_function): ...to here.
5928 2007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5930 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5931 * lto.c (lto_info_fd_init): Initialize it.
5932 (lto_info_fd_close): Free it.
5933 (lto_materialize_function): New function.
5934 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5935 unmaterialized_fndecls.
5936 (lto_file_read): Read in all the function bodies after we have read
5937 all of the DWARF info.
5938 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5939 reading a function body.
5941 2007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5943 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5944 semetric with output_tree_flags. Added call to log flags.
5945 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5946 type issues to make everything consistent with flags being
5947 unsigned HOST_WIDE_INTS.
5948 (input_expr_operand): Added call to
5949 recompute_tree_invariant_for_addr_expr.
5950 (input_local_var): Added debugging for tree_chains. Now calls
5952 (input_phi): Made flags unsigned HOST_WIDE_INT.
5953 (input_ssa_names): Now calls input_tree_flags.
5954 (lto_read_body): Now sets cfun.
5955 (lto_read_function_body): Now sets current_function_pointer.
5957 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5959 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5960 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5961 inspecting fields within.
5962 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5963 handle this appropriately.
5965 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5967 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5968 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5969 both DW_AT_abstract_origin and DW_AT_specification.
5970 (lto_read_subroutine_type_subprogram_DIE): Handle
5971 DW_AT_abstract_origin.
5972 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5973 (lto_read_DIE_at_ptr): Define as static to match declaration.
5974 Lookup the PTR in the cache before reading it from the file.
5975 (lto_resolve_var_ref): Adjust accordingly.
5976 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5977 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5979 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5981 * lto.c (lto_read_DIE_at_ptr): New function.
5982 (lto_resolve_var_ref): Use it.
5983 (lto_resolve_fn_ref): Use it.
5984 (lto_resolve_field_ref): Use it.
5985 (lto_read_variable_formal_parameter_constant_DIE): Follow
5986 DW_AT_specification and return the associated decl when appropriate.
5988 2007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5990 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5991 Implement for scalar integer modes.
5992 (lto_init): Initialize size_type_node.
5994 2007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
5996 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5997 (input_local_var): Add chaining for params.
5998 (input_ssa_names): Add cfun parameter.
5999 (input_function): Remove unnecessary else.
6001 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6003 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
6004 (lto_resolve_var_ref): Use proper types.
6005 (lto_resolve_fn_ref): Likewise.
6006 (lto_resolve_field_ref): Likewise.
6008 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6010 * lto-read.c (input_expr_operand): Remove case.
6012 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6014 * lto.c (lto_read_only_for_child_DIEs): New function.
6015 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
6016 * lto-elf.c (lto_elf_map_lto_section): Remove.
6017 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
6018 * lto-read.c (input_expr_operand): Assert that we never read a NULL
6019 SSA_NAME. Add missing case for mechanical codes.
6020 (input_cfg): Use basic_block_info_for_function instead of
6023 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
6025 * lto-read.c (input_sleb128, input_integer): Use proper casts.
6026 (input_list): Renamed input_tree_list and modified to follow same
6027 protocol as lto-function-out.c:output_tree_list.
6028 (input_expr_operand): Make asm operands use input_tree_list.
6029 (input_local_var): Now uses input_tree_list.
6030 (lto_read_body): Change placement for setting context of debug_labels.
6032 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
6034 * lto-read.c (input_real): Output debugging in proper order.
6035 (input_integer): Compute bit lengths properly.
6036 (input_list): Clean up declaration.
6037 (input_expr_operand): Change calls to input_real to match fix.
6038 Make reading of LTO_bit_field_ref1 match output.
6039 (input_local_var): Make reading of attributes match what is being
6041 (dump_debug_stream): Also print char in hex.
6042 (debug_out_fun): Fix signed unsigned mismatch.
6044 2007-10-10 Nathan Froyd <froydnj@codesourcery.com>
6046 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
6047 DW_AT_GNU_vector specially, as they are not contiguous with the
6048 specified set of attribute names. Use class_mask to check for
6049 errors at the end of the function
6050 (lto_resolve_var_ref): Read the DIE if it is not cached.
6051 (lto_resolve_fn_ref): Likewise.
6052 (lto_resolve_field_ref): Likewise.
6054 2007-10-05 Nathan Froyd <froydnj@codesourcery.com>
6056 * lto.c: Include dwarf2out.h.
6057 (lto_cache_store_DIE): Assert that we never change the value.
6058 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
6059 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
6060 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
6061 sensible type instead.
6062 (lto_read_structure_union_class_type_DIE): Store the newly
6063 created type prior to reading the members of the structure to
6064 avoid infinite recursion. Avoid computing types and alignments
6065 for structures whose sizes are unknown.
6066 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
6067 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
6068 DW_AT_const_value, and DW_AT_specification.
6069 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
6070 Return early if we have already constructed the function type.
6071 (lto_read_typedef_DIE): Check to see if the type has been cached
6072 already. Cache the type before reading any children.
6073 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
6074 (lto_read_DIE): Unset context->skip_non_parameters around reading
6076 (lto_resolve_fn_ref): Delete trailing whitespace.
6078 2007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
6080 * lto-read.c (input_expr_operand): Added type for STRING_CST.
6082 2007-09-10 Nathan Froyd <froydnj@codesourcery.com>
6084 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
6086 2007-09-07 Nathan Froyd <froydnj@codesourcery.com>
6088 * lto-lang.c (signed_and_unsigned_types): New variable.
6089 (lto_type_for_size): Consult signed_and_unsigned_types to find
6090 an approprite type, creating it if necessary.
6091 (lto_set_decl_assembler_name): Add actual method body.
6093 2007-09-06 Jim Blandy <jimb@codesourcery.com>
6095 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
6096 can't find a var init for this variable, leave its DECL_INITIAL.
6097 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
6098 lto_elf_map_fn_body.
6099 (lto_map_lto_section): New function.
6100 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
6101 bodies, and lto_elf_map_optional_lto_section for variable
6103 (lto_elf_find_section_data): Quietly return NULL if the section is
6105 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
6107 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
6109 * lto-read.c (lto_read_body): Doc fix.
6111 2007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
6113 * lto-read.c (fun_in): Renamed to data_in.
6114 (input_expr_operand, input_local_var, input_string_internal,
6115 input_string, input_real, input_list, get_label_decl,
6116 get_type_ref, input_expr_operand, input_globals, input_labels,
6117 input_local_vars_index, input_local_var, input_local_vars,
6118 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
6119 (input_constructor): New function.
6120 (lto_read_function_body): Renamed to lto_read_body and generalized
6121 to handle both functions and constructors.
6122 (lto_read_function_body, lto_read_var_init): New function.
6124 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
6126 * lto-read.c (input_expr_operand): Assert that there really is a
6128 (input_globals): Removed checks on 0 section.
6130 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
6132 * lto-read.c (fun_in): Added local_decls_index and
6133 local_decls_index_d.
6134 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
6135 (input_globals): Enabled code to handle FIELD_DECLs.
6136 (input_local_vars_index, input_local_vars): New function.
6137 (input_local_var): Changed to allow locals to be input randomly.
6138 (lto_read_function_body): Added code to input the
6139 local_decls_index and to free various structures.
6141 2007-08-17 Jim Blandy <jimb@codesourcery.com>
6143 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
6144 ATTRIBUTE_UNUSED from 'die' formal.
6146 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
6147 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
6148 (input_list): Fix type of 'tag'.
6149 (input_expr_operand): Fix type of 'tag' argument. Update
6150 declaration. Fix type of 'ctag'. Add default case to switch,
6151 since the type of the switched value is now an enum.
6152 (input_local_vars): Fix type of 'tag'.
6153 (input_bb): Fix type of 'tag' argument.
6154 (input_function): Fix type of 'tag' argument.
6156 2007-08-16 Jim Blandy <jimb@codesourcery.com>
6158 * lto.c (lto_read_member_DIE): Record the tree we create in
6159 fd->die_cache. (Our 'die' argument is no longer unused.)
6160 (lto_resolve_field_ref): New function.
6161 * lto.h (lto_resolve_field_ref): New declaration.
6163 2007-08-15 Jim Blandy <jimb@codesourcery.com>
6165 * lto-read.c (lto_read_var_init): Mark arguments as unused.
6167 2007-08-07 Jim Blandy <jimb@codesourcery.com>
6169 * lto.c (lto_read_form): Complete attr_classes table.
6170 (DWARF2_form_data): Doc fix.
6172 2007-08-05 Mark Mitchell <mark@codesourcery.com>
6174 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
6176 (lto_read_var_init): Declare.
6177 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
6178 interface for reading variable initializers.
6179 * lto-elf.c (lto_elf_read_var_init): Remove.
6180 (lto_elf_file_vtable): Update initializer.
6181 (lto_elf_read_var_init): Add comment about unused-ness.
6182 * lto-read.c (lto_read_var_init): New.
6184 * lto.c (lto_read_form): Add entry for DW_AT_inline.
6186 2007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
6188 * lto-read.c (lto_read_function_body): Moved declaration of fn
6191 2007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
6193 * lto-read.c (input_uleb128, input_string_internal, input_real,
6194 input_integer, input_record_start, input_list, get_type_ref,
6195 input_flags, input_expr_operand, input_expr_operand,
6196 input_expr_operand, input_local_vars, input_cfg, input_phi,
6197 input_ssa_names, input_bb, input_function): Added semicolons.
6200 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
6202 * lto-read.c (input_globals): Remove debugging.
6203 (input_function): Set DECL_ARGUMENTS.
6205 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
6207 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
6208 RETURN_EXPR, MODIFY_EXPR and processing of flags.
6209 (input_phi): Made work with operands other than SSA_NAMES and
6210 fixed processing of flags.
6211 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
6212 (input_flags): New function.
6213 * lto-lang.c (lto_init): Changed state of in_lto_p.
6216 2007-07-24 Mark Mitchell <mark@codesourcery.com>
6218 * lto-tree.h (lto_varargs_cookie): Remove.
6219 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
6220 skip_non_parameters, skip_parameters.
6221 (lto_varargs_cookie): Remove.
6222 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
6224 (lto_read_abbrev): New function.
6225 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
6227 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
6228 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
6229 (lto_file_read): Initialize new context fields.
6230 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
6231 (lto_unsigned_type): Remove.
6232 (lto_signed_type): Likewise.
6233 (lto_signed_or_unsigned_type): Likewise.
6234 (lto_init): Do not create lto_varargs_cookie.
6235 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
6236 (LANG_HOOKS_SIGNED_TYPE): Likewise.
6237 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
6239 2007-07-19 Jan Hubicka <jh@suse.cz>
6241 * lto-read.c (lto_read_function_body): Produce empty scope block
6244 2007-07-18 Mark Mitchell <mark@codesourcery.com>
6246 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
6247 process local variables.
6248 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
6250 2007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
6252 * lto-read.c (input_list, input_expr_operand): Added struct
6254 (init_cfg, finalize_cfg): Removed function.
6255 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
6256 (input_labels, input_local_vars): Now takes input_block parameter rather than
6258 (input_cfg, input_phi, input_ssa_names): New functions.
6259 (input_bb): Now passes in input_blocks. Does not construct cfg
6260 and processes the list of phi functions.
6261 (input_function): Now builds both the cfg and ssa_names table.
6262 (lto_read_function_body): Processes new header fields to construct
6263 streams for the ssa_names and cfg and their debugging.
6264 * lto-lang.c (lto_init): Set in_lto_p.
6267 2007-06-28 Mark Mitchell <mark@codesourcery.com>
6269 * lto.h (lto_file_vtable): Add read_var_init.
6270 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
6272 (lto_main): Remove bogus asserts.
6273 * lto-elf.c (tm.h): Include it.
6274 (libiberty.y): Likewise.
6275 (lto_elf_file): Add strtab and symtab. Rename
6276 string_table_section_index to sec_strtab.
6277 (lto_elf_file_vtable): Add lto_elf_read_var_init.
6278 (lto_elf_get_shdr): New function.
6279 (lto_elf_free_shdr): Likewise.
6280 (lto_elf_find_section_data): Use them.
6281 (lto_elf_read_symtab): New function.
6282 (lto_elf_lookup_sym): Likewise.
6283 (lto_elf_free_sym): Likewise.
6284 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
6285 (lto_elf_built_init): New function.
6286 (lto_elf_read_var_init): Likewise.
6287 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
6289 2007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
6291 * lto-read (make_new_block): Initialize the stmt_list.
6292 (lto_static_init_local): Add debugging for missing codes.
6294 2007-06-26 Mark Mitchell <mark@codesourcery.com>
6296 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
6297 unprototyped functions.
6299 2007-06-23 Mark Mitchell <mark@codesourcery.com>
6301 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
6302 Handle DW_AT_MIPS_linkage_name.
6303 (lto_read_subroutine_type_subprogram): Likewise. Correct
6305 (lto_main): Remove incorrect assertions.
6306 * lto-symbtab.c: Build function types out of TREE_LISTs.
6308 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
6310 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
6312 2007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
6314 * lto-tree.h (lang_decl, lang_type, language_function): Added
6315 dummy since ggc does not like empty structs.
6316 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6317 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
6318 expr->common to expr->base.
6319 (make_new_block): Moved stmt_list to proper place.
6321 2007-03-14 Robert Kennedy <jimbob@google.com>
6323 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6324 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6325 assembler name from DWARF.
6326 * lto-lang.c (lto_set_decl_assembler_name) New function.
6328 2006-09-10 Mark Mitchell <mark@codesourcery.com>
6330 * lto.h (lto_file_vtable): New structure.
6331 (lto_file): Add vtable pointer.
6332 (lto_file_init): Add vtable paramter.
6333 (lto_read_function_body): New function.
6334 (lto_symtab_merge_fn): New function.
6335 * lto.c (lto_file_init): Add vtable parameter.
6336 (lto_read_form): Fill in entries for DW_AT_prototyped,
6338 (lto_read_subroutine_type_subprogram_DIE): New function.
6339 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6341 * lto-elf.c (lto_elf_vile_vtable): New variable.
6342 (lto_elf_file_open): Pass it to lto_file_init.
6343 (lto_elf_map_fn_body): New function.
6344 (lto_elf_unmap_fn_body): Likewise.
6345 * lto-read.c: New file.
6346 * lto-symtab.c (lto_symtab_merge_fn): New function.
6347 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6348 tree_rest_of_compilation.
6349 * Make-lang.in (LTO_OBJS): Add lto-read.o
6350 (lto-read.o): New target.
6352 2006-09-03 Mark Mitchell <mark@codesourcery.com>
6354 * lto.c (<inttypes.h>): Don't include it.
6355 (lto_context): Don't typedef it.
6356 (lto_resolve_reference): New function.
6357 (lto_read_form): Use it.
6358 (lto_resolve_type_ref): New function.
6359 (lto_resolve_var_ref): Likewise.
6360 (lto_resolve_fn_ref): Likewise.
6361 * lto.h (<inttypes.h>): Include it.
6362 (lto_context): New type.
6363 (lto_ref): New structure.
6364 (lto_resolve_type_ref): Declare.
6365 (lto_resolve_var_ref): Likewise.
6366 (lto_resolve_fn_ref): Likewise.
6368 2006-08-18 Mark Mitchell <mark@codesourcery.com>
6370 * lang-specs.h: New file.
6372 2006-08-14 Mark Mitchell <mark@codesourcery.com>
6374 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6375 (lto_info_fd_close): Deallocate it.
6376 (lto_die_cache_entry): New structure.
6377 (lto_cache_hash): New function.
6378 (lto_cache_eq): Likewise.
6379 (lto_cache_store_DIE): Likewise.
6380 (lto_cache_lookup_DIE): Likewise.
6381 (lto_read_referenced_type_DIE): Use the cache.
6382 (lto_read_pointer_type_DIE): Robustify.
6383 (lto_read_DIE): Use the cache.
6384 * lto.h (hashtab.h): Include.
6385 (lto_info_fd): Add DIE cache.
6386 * Make-lang.in (LTO_H): New variable.
6387 (lto/lto-lang.o): Use LTO_H.
6388 (lto/lto-elf.o): Likewise.
6389 (lto/lto-symtab.o): Likewise.
6391 2006-07-09 Mark Mitchell <mark@codesourcery.com>
6393 * lto.c (lto_abi_mismatch_error): New function.
6394 (lto_abbrev_read): Initialize num_abbrevs.
6395 (lto_read_form): Specify allowed form classes for
6396 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6397 (lto_read_variable_formal_parameter_constant_DIE): Handle
6398 DW_AT_declaration. Call lto_symtab_merge_var.
6399 (lto_read_pointer_type_DIE): New function.
6400 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6401 not creat TYPE_DECLs for types that already have them.
6402 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6403 (lto_set_cu_context): Make cu_start point to the header, not the
6405 (lto_file_read): Adjust for change to lto_set_cu_context.
6406 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6407 (lto/lto-symtab.o): New rule.
6408 * lto-tree.h (lang_identifier): Add decl field.
6409 (LANG_IDENTIFIER_CAST): New macro.
6410 (LTO_IDENTIFIER_DECL): Likewise.
6411 (lto_symtab_merge_var): Declare.
6412 * lto-symtab.c: New file.
6414 2006-07-02 Daniel Berlin <dberlin@dberlin.org>
6416 * lto.c (lto_context): Add current_cu and info_fd members.
6417 (DWARF2_CompUnit): New structure.
6418 (lto_read_DIE): Take lto_info_fd *.
6419 (lto_read_child_DIEs): Ditto.
6420 (lto_file_corrupt_error): Constify argument.
6421 (lto_set_cu_context): New function
6422 (lto_info_fd_init): Ditto.
6423 (lto_info_fd_close): Ditto.
6424 (lto_file_init): Use lto_info_fd_init.
6425 (lto_file_close): Use lto_info_fd_close.
6426 (lto_read_initial_length): Pass in pointer to header size.
6427 (lto_read_comp_unit_header): Correct cu_length to
6428 real length from beginning of header. Take lto_info_fd * as
6430 (find_cu_for_offset): New function.
6431 (lto_read_form): Change first argument to lto_info_fd *.
6432 Add FORM_CONTEXT argument.
6433 Handle DW_FORM_ref_addr.
6434 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
6435 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6436 Swap contexts if necessary for form.
6437 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6438 lto_file_corrupt_error.
6439 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6440 (lto_read_referenced_type_DIE): Change first argument to
6441 lto_info_fd *. Access lto_fd fields through base pointer.
6442 (lto_read_compile_unit_DIE): Change first argument to an
6444 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6445 (lto_read_base_type_DIE): Ditto.
6446 (lto_read_child_DIEs): Ditto.
6447 (lto_read_DIE): Ditto. Change type of function pointer.
6448 (lto_info_read): New function.
6449 (lto_set_cu_context): Ditto.
6450 (lto_file_read): Use lto_info_read, walk resulting CU's
6451 (lto_main): Update for lto_info_fd change.
6452 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6454 * lto.h (DWARF2_CompUnit): New structure.
6455 (lto_info_fd): Ditto.
6456 (lto_file): Change debug_info to be an lto_info_fd.
6458 2006-06-25 Mark Mitchell <mark@codesourcery.com>
6460 * lto.c (toplev.h): Include it.
6461 (dwarf2.h): Likewise.
6464 (cgraph.h): Likewise.
6466 (inttypes.h): Likewise.
6467 (DWARF2_attr): New type.
6468 (DWARF2_abbrev): Likewise.
6469 (DWARF2_class): Likewise.
6470 (DWARF2_form_data): Likewise.
6471 (lto_context): Likewise.
6472 (lto_fd_init): New function.
6473 (lto_abbrev_fd_init): Likewise.
6474 (lto_abbrev_fd_close): Likewise.
6475 (lto_file_init): Use them.
6476 (lto_file_close): New function.
6477 (lto_file_corrupt_error): Likewise.
6478 (LTO_CHECK_INT_VAL): New macro.
6479 (lto_check_size_t_val): New function.
6480 (lto_check_int_val): Likewise.
6481 (LTO_READ_TYPE): New macro.
6482 (lto_read_ubyte): New function.
6483 (lto_read_uhalf): Likewise.
6484 (lto_read_uword): Likewise.
6485 (lto_read_uleb128): Likewise.
6486 (lto_read_initial_length): Likewise.
6487 (lto_abbrev_read_attrs): Likewise.
6488 (lto_abbrev_read): Likewise.
6489 (lto_abbrev_lookup): Likewise.
6490 (lto_read_section_offset): Likewise.
6491 (lto_read_comp_unit_header): Likewise.
6492 (lto_read_form): Likewise.
6493 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6494 (LTO_BEGIN_READ_ATTRS): Likewise.
6495 (LTO_END_READ_ATTRS): Likewise.
6496 (lto_unsupported_attr_error): New function.
6497 (lto_get_identifier): Likewise.
6498 (lto_read_referenced_type_DIE): Likewise.
6499 (lto_read_compile_unit_DIE): Likewise.
6500 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6501 (lto_read_base_type_DIE): Likewise.
6502 (lto_read_DIE): Likewise.
6503 (lto_read_child_DIEs): Likewise.
6504 (lto_file_read): Read DIEs.
6505 (lto_main): Ask middle end to emit entities.
6506 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6507 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6508 (lto_elf_file_close): Likewise.
6509 * lto.h (lto_file): Declare.
6510 (DWARF2_abbrev): Likewise.
6512 (lto_abbrev_fd): Likewise.
6513 (lto_file): Use new types.
6514 (lto_file_close): Declare.
6515 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
6517 2006-06-18 Mark Mitchell <mark@codesourcery.com>
6521 * lto-elf.c: New file.
6522 * lto-lang.c (flags.h): Include it.
6524 (lto_init): New function.
6525 (lto_write_globals): Remove.
6526 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
6527 (LANG_HOOKS_INIT): Define.
6528 (LANG_HOOKS_PARSE_FILE): Likewise.
6529 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6530 (LTO_EXE): Link with libelf.
6531 (lto/lto-lang.o): Update dependencies.
6532 (lto/lto.o): New target.
6533 (lto/lto-elf.o): Likewise.
6535 2006-06-12 Mark Mitchell <mark@codesourcery.com>
6537 * config-lang.in: New file.
6538 * Make-lang.in: Likewise.
6539 * lto-tree.h: Likewise.
6540 * lto-lang.c: Likewise.
6542 Copyright (C) 2006-2021 Free Software Foundation, Inc.
6544 Copying and distribution of this file, with or without modification,
6545 are permitted in any medium without royalty provided the copyright
6546 notice and this notice are preserved.