1 2019-05-16 Martin Sebor <msebor@redhat.com>
3 * lto-dump.c (lto_main): Same.
4 * lto.c (stream_out): Same.
6 2019-05-10 Martin Liska <mliska@suse.cz>
8 * Make-lang.in: Use program_transform_name for lto-dump.
9 * config-lang.in: Do not mark lto-dump compiler as we don't
10 want to have it installed at
11 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
13 2019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15 * lto-common.c (lto_file_read): Print section->start as int64_t,
16 section->len as uint64_t.
17 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
19 2019-05-06 Martin Liska <mliska@suse.cz>
21 * lto-common.c: Update coding style.
22 * lto.c (materialize_cgraph): Likewise.
24 2019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
25 Martin Liska <mliska@suse.cz>
27 * Make-lang.in: Add lto_dump-related definition.
28 * config-lang.in: Likewise.
29 * lang.opt: Add new language LTODump and options related
31 * lto-common.c (lto_read_decls): Support type statistics dump.
32 (lto_file_read): Likewise for object files.
33 * lto-dump.c: New file.
34 * lto-lang.c (lto_option_lang_mask): Move from ..
35 * lto.c (lto_option_lang_mask): .. here.
36 * lto.h (lto_option_lang_mask): New declaration.
38 2019-05-06 Martin Liska <mliska@suse.cz>
39 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
41 * Make-lang.in: Add lto-common.o.
42 * config-lang.in: Likewise for gtfiles.
43 * lto-common.c: New file.
44 * lto-common.h: New file.
45 * lto-lang.c: Include lto-common.h.
46 * lto.c: Move most of the functionality
47 into lto-common.c file.
49 2019-04-12 Jan Hubicka <hubicka@ucw.cz>
51 * lto.c (do_stream_out): rename to ...
52 (stream_out): ... this one; move original code to ...
53 (stream_out_partitions_1, stream_out_partitions): ... these new
55 (lto_wpa_write_files): Honnor lto_parallelism
57 2019-03-26 Martin Liska <mliska@suse.cz>
59 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
62 2019-03-11 Martin Liska <mliska@suse.cz>
64 * lto-lang.c (lto_post_options): Wrap an option name
65 in a string format message and fix GNU coding style.
66 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
68 2019-03-09 Jakub Jelinek <jakub@redhat.com>
71 * lang.opt: Terminate description text with a dot.
73 2019-02-28 Jason Merrill <jason@redhat.com>
75 PR c++/88049 - ICE with undefined destructor and anon namespace.
76 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
77 for a type in an anonymous namespace.
79 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
83 * lto-partition.c: Mechanically replace "can not" with "cannot".
84 * lto-symtab.c: Likewise.
87 2019-01-01 Jakub Jelinek <jakub@redhat.com>
89 Update copyright years.
91 2018-12-24 Jan Hubicka <hubicka@ucw.cz>
93 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
94 for method whose basetype was already reported.
96 2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
98 Minimize clone counter memory usage in LTO.
99 * lto-partition.c (privatize_symbol_name_1): Keep track of
100 non-unique symbol counters in the lto_clone_numbers hash
102 (lto_promote_cross_file_statics): Allocate and free the
103 lto_clone_numbers hash map.
104 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
107 2018-11-28 Jan Hubicka <jh@suse.cz>
109 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
111 2018-11-22 Jan Hubicka <jh@suse.cz>
113 * lto.c (cmp_type_location): Remove.
114 (lto_read_decls): Do not allocate odr_types.
116 2018-11-19 Martin Liska <mliska@suse.cz>
119 * lto-symtab.c (lto_symtab_merge): Transform the
120 condition before r256989.
122 2018-11-16 Martin Liska <mliska@suse.cz>
125 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
126 lto_symtab_symbol_p as it does checking of transparent alias.
127 These needs to be also merged in the function.
129 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
131 * lto-partition.c (privatize_symbol_name_1): Use
132 clone_function_name_numbered.
134 2018-10-26 Jan Hubicka <jh@suse.cz>
136 * lto/lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
138 2018-10-17 David Malcolm <dmalcolm@redhat.com>
140 * Make-lang.in (selftest-lto): New.
142 2018-08-29 Martin Liska <mliska@suse.cz>
145 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
146 to behavior before r263887.
148 2018-08-27 Martin Liska <mliska@suse.cz>
150 * lto-lang.c (handle_const_attribute): Use new function
151 fndecl_built_in_p and remove check for FUNCTION_DECL if
153 * lto-symtab.c (lto_symtab_merge_p): Likewise.
154 (lto_symtab_merge_decls_1): Likewise.
155 (lto_symtab_merge_symbols): Likewise.
156 * lto.c (lto_maybe_register_decl): Likewise.
157 (read_cgraph_and_symbols): Likewise.
159 2018-08-21 Tom de Vries <tdevries@suse.de>
161 * lto.c (lto_main): Call debuginfo_early_start and
162 debuginfo_early_stop.
164 2018-07-20 Martin Sebor <msebor@redhat.com>
167 * lto-lang.c (lto_handle_option): Change function argument
170 2018-07-20 Richard Biener <rguenther@suse.de>
173 * lto.c (unify_scc): Before we throw away an SCC see if we
174 can amend prevailing single-entry SCC with debug refs.
176 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
178 * lto.c (do_stream_out): Add PART parameter; open dump file.
179 (stream_out): Add PART parameter; pass it to do_stream_out.
180 (lto_wpa_write_files): Update call of stream_out.
182 2018-07-04 Martin Liska <mliska@suse.cz>
187 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
190 2018-06-20 Martin Liska <mliska@suse.cz>
192 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
195 2018-06-19 Martin Liska <mliska@suse.cz>
197 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
199 (undo_partition): Likewise.
200 (lto_balanced_map): Likewise.
202 2018-06-19 Martin Liska <mliska@suse.cz>
204 * config-lang.in: Remove stagestuff.
206 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
208 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
210 (lto_register_dumps): New hook.
211 (LANG_HOOKS_REGISTER_DUMPS): New.
212 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
213 * lto-symtab.c: Include lto.h; dump into dump_file instead of
215 (lto_symtab_merge_decls): Initialize dump file.
216 * lto.c (read_cgraph_and_symbols): Initialize dump file.
217 (do_whole_program_analysis): Likewise.
219 2018-06-08 Martin Liska <mliska@suse.cz>
221 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
222 instead of summary_uid.
224 2018-06-08 Martin Liska <mliska@suse.cz>
226 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
228 (undo_partition): Likewise.
229 (lto_balanced_map): Likewise.
231 2018-06-08 Martin Liska <mliska@suse.cz>
233 * lto-partition.c (add_references_to_partition): Remove support
234 for MPX (macros, related functions, fields in cgraph_node, ...).
235 (add_symbol_to_partition_1): Likewise.
236 (privatize_symbol_name): Likewise.
237 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
239 2018-06-05 Richard Biener <rguenther@suse.de>
241 * lto.c (cmp_type_location): Expand locations only once.
243 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
245 * lang.opt (lto_linker_output): Add nolto-rel.
246 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
247 and LTO_LINKER_OUTPUT_NOLTOREL.
248 (lto_init): Generate lto when doing incremental link.
249 * lto.c (lto_precess_name): Add lto1-inclink.
251 2018-05-18 Jan Hubicka <jh@suse.cz>
254 * lto-partition.c (account_reference_p): Do not account
255 references from aliases; do not account refernces from
256 external initializers.
258 2018-04-30 Jan Hubicka <jh@suse.cz>
260 * lto.c (cmp_partitions_size): Remove.
261 (lto_wpa_write_files): Also output priorities; do not sort partitions.
262 (cmp_partition_order): Move to ...
263 * lto-partition.c (cmp_partition_order): ...
264 (lto_1_to_1_map): Sort partitions.
266 2018-04-20 Jan Hubicka <jh@suse.cz>
268 * lto-partition.c (lto_balanced_map): Fix sanity check.
270 2018-04-19 Jan Hubicka <jh@suse.cz>
272 * lto-partition.c: Include sreal.h
273 (add_symbol_to_partition_1): Use size instead of self_size
275 (account_reference_p): New.
276 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
277 fix accounting errors in boundary size; add debug output; combine cost
278 as cost/size instead of cost/internal; reduce the partitioning error to
279 +- 1/8 of the parttion size.
281 2018-04-19 Martin Liska <mliska@suse.cz>
283 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
284 for multiple PREVAILING_DEF_IRONLY for common symbols.
286 2018-04-18 Martin Liska <mliska@suse.cz>
288 * lto.c (lto_read_decls): Fix GNU coding style and typos.
290 2018-04-18 Martin Liska <mliska@suse.cz>
294 * lto.c (cmp_type_location): New function.
295 (lto_read_decls): First collect all types, then
296 sort them according by location before register_odr_type
299 2018-04-18 Jan Hubicka <jh@suse.cz>
300 Martin Liska <mliska@suse.cz>
303 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
306 2018-04-11 Martin Liska <mliska@suse.cz>
308 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
311 2018-04-10 Martin Liska <mliska@suse.cz>
314 * lto-symtab.c (lto_symtab_merge_p): Do not check for
315 TREE_VALUES of error attributes.
317 2018-04-10 Richard Biener <rguenther@suse.de>
318 Martin Liska <mliska@suse.cz>
321 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
323 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
325 * lto-partition.c (lto_balanced_map): Watch overflow.
327 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
330 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
331 (read_cgraph_and_symbols): Use
332 symtab_node::output_to_lto_symbol_table_p.
334 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
336 * lto.c (register_resolution): Remove forgotten sanity check.
338 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
341 * lto.c: Include builtins.h
342 (register_resolution): Merge resolutions in case trees was
344 (lto_maybe_register_decl): Break out from ...
345 (lto_read_decls): ... here.
346 (unify_scc): Also register decls here.
347 (read_cgraph_and_symbols): Sanity check that all resolutions was
350 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
353 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
354 component type of array types with non-aliased component.
356 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
359 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
360 for type match warning on arrays of pointers.
362 2018-01-23 Martin Liska <mliska@suse.cz>
365 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
366 trailing arrays at the end of a struct.
368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
369 Alan Hayward <alan.hayward@arm.com>
370 David Sherwood <david.sherwood@arm.com>
372 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
375 Alan Hayward <alan.hayward@arm.com>
376 David Sherwood <david.sherwood@arm.com>
378 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
379 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
381 2018-01-03 Jakub Jelinek <jakub@redhat.com>
383 Update copyright years.
385 2017-12-15 Jakub Jelinek <jakub@redhat.com>
387 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
388 affects_type_identity and handler fields, adjust comments.
390 2017-12-07 Richard Sandiford <richard.sandiford@arm.com>
392 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
394 2017-12-07 Martin Sebor <msebor@redhat.com>
397 * lto-lang.c (lto_attribute_table): Initialize new member of struct
400 2017-11-30 Jakub Jelinek <jakub@redhat.com>
402 * lto.c (create_subid_section_table): Use ; instead of ;;.
404 2017-11-22 Marek Polacek <polacek@redhat.com>
409 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
411 2017-11-10 Jan Hubicka <hubicka@ucw.cz>
413 * lto-partition.c (lto_balanced_map): Use frequency accessor.
415 2017-10-13 Jan Hubicka <hubicka@ucw.cz>
417 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
419 2017-10-11 Nathan Sidwell <nathan@acm.org>
421 * lto.c (mentions_vars_p_decl_with_vis): Use
422 DECL_ASSEMBLER_NAME_RAW.
423 (lto_fixup_prevailing_decls): Likewise.
425 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
427 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
428 operating on trees as wide_ints.
430 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
431 Alan Hayward <alan.hayward@arm.com>
432 David Sherwood <david.sherwood@arm.com>
434 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
436 2017-08-21 Richard Biener <rguenther@suse.de>
438 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
439 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
440 TYPE_DECL debug processing, register DIE references from
441 prevailing SCCs with the debug machinery.
442 (lto_section_with_id): Handle LTO debug sections.
444 2017-08-16 Nathan Sidwell <nathan@acm.org>
446 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
447 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
448 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
450 2017-08-08 Tom de Vries <tom@codesourcery.com>
452 * lto.c: Include attribs.h.
454 2017-08-08 Martin Liska <mliska@suse.cz>
456 * lto-lang.c: Include header files.
457 * lto-symtab.c: Likewise.
459 2017-08-03 Richard Biener <rguenther@suse.de>
461 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
462 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
463 use DECL_LANG_FLAG_0.
464 (lto_symtab_prevail_decl): Likewise.
466 2017-07-07 Torsten Duwe <duwe@suse.de>
468 * lto-lang.c (lto_attribute_table): Add entry for
469 "patchable_function_entry".
471 2017-07-19 Nathan Sidwell <nathan@acm.org>
473 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
474 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
476 2017-07-06 Jan Hubicka <hubicka@ucw.cz>
478 * lto-partition.c (lto_balanced_map): Do not check
479 flag_toplevel_reorder.
481 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
482 * lto-lang.c (lto_init): Use builtin_structptr_types.
484 2017-06-15 Jan Hubicka <hubicka@ucw.cz>
485 Thomas Preud'homme <thomas.preudhomme@arm.com>
488 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
489 that resolved externally.
491 2017-05-23 Jan Hubicka <hubicka@ucw.cz>
493 * lto.c (do_whole_program_analysis): Replace inline_free_summary
494 by ipa_free_fn_summary.
496 2017-05-23 Martin Liska <mliska@suse.cz>
498 * lto-symtab.c (lto_cgraph_replace_node): Use
499 symtab_node::dump_{asm_,}name functions.
500 * lto.c (read_cgraph_and_symbols): Likewise.
501 (do_whole_program_analysis): Likewise.
503 2017-05-23 Martin Liska <mliska@suse.cz>
505 * lto.c (read_cgraph_and_symbols): Use the renamed function.
506 (do_whole_program_analysis): Use the renamed function.
508 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
510 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
511 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
513 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
516 * lto-lang.c (lto_init): Set in_lto_p earlier.
518 2017-04-12 Richard Biener <rguenther@suse.de>
519 Bernd Edlinger <bernd.edlinger@hotmail.de>
522 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
524 2017-02-14 Martin Liska <mliska@suse.cz>
526 * lto.c (do_stream_out): Free LTO file filename string.
528 2017-01-19 David Malcolm <dmalcolm@redhat.com>
530 * lto-lang.c (builtin_type_for_size): Convert call to
531 lto_type_for_size to one through the langhook.
532 (lto_type_for_size): Move to langhooks.c and rename to
534 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
536 2017-01-11 Jakub Jelinek <jakub@redhat.com>
539 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
542 2017-01-09 Jakub Jelinek <jakub@redhat.com>
546 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
548 2017-01-06 Nathan Sidwell <nathan@acm.org>
550 * lto-partition.c (promote_symbol): Write to dump file sooner,
551 include alias promoting too.
553 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
554 (may_need_named_section_p): Likewise.
555 (rename_statics): Likewise.
556 (lto_promote_cross_file_statics): Likewise.
558 2017-01-01 Jakub Jelinek <jakub@redhat.com>
560 Update copyright years.
562 2016-11-30 Georg-Johann Lay <avr@gjlay.de>
565 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
566 mismatch if the two types are built-in.
568 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
570 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
572 2016-11-23 Richard Biener <rguenther@suse.de>
575 * lto.c (hash_canonical_type): Ignore zero-sized fields.
577 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
580 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
582 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
583 Alan Hayward <alan.hayward@arm.com>
584 David Sherwood <david.sherwood@arm.com>
586 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
588 2016-10-31 Richard Biener <rguenther@suse.de>
591 * lto.c (do_whole_program_analysis): Bail out after errors
594 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
596 * lto-partition.c: Include tree-vrp.h.
599 2016-09-20 Richard Biener <rguenther@suse.de>
601 * lto.c (lto_main): Call early_finish with "<artificial>" as
604 2016-09-19 Richard Biener <rguenther@suse.de>
606 * lto.c (lto_main): Invoke early_finish debug hook.
608 2016-07-25 Richard Biener <rguenther@suse.de>
610 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
611 (unify_scc): Likewise.
612 (lto_read_decls): Likewise.
614 2016-06-28 Jakub Jelinek <jakub@redhat.com>
616 * Make-lang.in: Don't cat ../stage_current if it does not exist.
618 2016-06-23 Andi Kleen <ak@linux.intel.com>
620 * Make-lang.in: Add support for autofdo (disabled for now)
622 2016-06-10 Martin Sebor <msebor@redhat.com>
625 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
626 attribute in type-generic builtins.
628 2016-05-16 Jan Hubicka <hubicka@ucw.cz>
630 * lto-partition.c (add_symbol_to_partition_1): Likewise.
632 2016-05-03 Jan Hubicka <hubicka@ucw.cz>
634 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
636 2016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
638 * lto-partition.h (lto_balanced_map): New parameter.
639 * lto-partition.c (lto_balanced_map): New parameter
641 Check if partition size is greater than max_partition_size.
642 * lto.c (do_whole_program_analysis): Adjust calls to
643 lto_balanced_map() to pass 2nd argument.
645 2016-03-17 H.J. Lu <hongjiu.lu@intel.com>
648 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
651 2016-03-08 Jakub Jelinek <jakub@redhat.com>
653 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
654 - becuase -> because.
656 2016-02-15 Tom de Vries <tom@codesourcery.com>
659 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
662 2016-01-27 Martin Liska <mliska@suse.cz>
664 * lto-partition.c (add_symbol_to_partition_1): Remove usage
667 2016-01-19 Jan Hubicka <hubicka@ucw.cz>
670 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
671 decls have no assemblernames.
673 2016-01-19 Martin Liska <mliska@suse.cz>
674 Martin Jambor <mjambor@suse.cz>
676 * lto-partition.c: Include "hsa.h"
677 (add_symbol_to_partition_1): Put hsa implementations into the
678 same partition as host implementations.
680 2016-01-12 Jan Hubicka <hubicka@ucw.cz>
683 * lto-partition.c (rename_statics): Fix pasto.
685 2016-01-18 Richard Biener <rguenther@suse.de>
688 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
689 function vs. variable.
691 2016-01-12 Richard Biener <rguenther@suse.de>
694 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
695 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
697 2016-01-04 Jakub Jelinek <jakub@redhat.com>
699 Update copyright years.
701 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
704 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
705 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
706 (lto_symtab_prevailing_decl): Use it.
708 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
710 * lto.c: Include stringpool.h and fold-const.h.
711 (offload_handle_link_vars): New static function.
712 (lto_main): Call offload_handle_link_vars.
714 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
716 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
718 2015-12-11 Jan Hubicka <hubicka@ucw.cz>
721 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
722 values of error and warning attributes.
724 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
727 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
729 (LTO_NO_PREVAIL): Use gcc_checking_assert.
731 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
734 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
737 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
740 * lto-symtab.c: Include lto-symtab.h.
741 (lto_cgraph_replace_node): Do not merge profiles here.
742 (lto_symtab_merge_p): New function.
743 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
744 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
746 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
747 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
748 * lto.c: Include lto-symtab.h
751 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
754 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
755 are not part of the definition.
756 (contained_in_symbol): Likewise.
757 (promote_symbol): When promoting a symbol also promote all transparent
759 (rename_statics): Weakref needs unique name, too.
761 2015-12-07 Jan Hubicka <hubicka@ucw.cz>
764 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
765 rename_statics, rename_statics): Handle transparent aliases.
767 2015-12-04 Jan Hubicka <hubicka@ucw.cz>
769 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
772 2015-12-01 Jan Hubicka <hubicka@ucw.cz>
774 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
776 2015-11-25 Jan Hubicka <jh@suse.cz>
778 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
779 * lang.opt (lto_linker_output): New enum.
780 (flinker_output): New flag.
782 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
784 * lto-symtab.c: Include alias.h
785 (warn_type_compatibility_p): Replace types_compatible_p checks by
786 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
787 (lto_symtab_merge): Compare DECL sizes.
788 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
790 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
792 * lto.c (iterative_hash_canonical_type): Recruse for all types
793 which pass !canonical_type_used_p.
794 (gimple_register_canonical_type_1): Sanity check we do not compute
795 canonical type of anything with !canonical_type_used_p.
796 (gimple_register_canonical_type): Skip all types that are
797 !canonical_type_used_p
799 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
801 * lto.c (unify_scc): Use free_node.
803 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
805 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
806 (gimple_register_canonical_type_1): Check that pointers do not get
808 (gimple_register_canonical_type): Do not register pointers.
810 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
812 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
813 flag for types that are not ODR; fix loop walking parameters.
815 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
817 * lto-lang.c: Remove unused header files.
818 * lto-object.c: Likewise.
819 * lto-partition.c: Likewise.
820 * lto-symtab.c: Likewise.
823 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
825 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
827 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
829 * lto-lang.c: Don't undef DEF_BUILTIN.
831 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
833 * lto-lang.c: Reorder #include's and remove duplicates.
834 * lto-object.c: Likewise.
835 * lto-partition.c: Likewise.
836 * lto-symtab.c: Likewise.
839 2015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
841 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
843 (lto_fixup_state): Likewise.
844 (do_whole_program_analysis): Use
845 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
848 2015-10-13 Jakub Jelinek <jakub@redhat.com>
850 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
851 DEF_FUNCTION_TYPE_11): Define.
853 2015-10-10 Jan Hubicka <hubicka@ucw.cz>
855 * lto.c (hash_canonical_type): Honor
856 type_with_interoperable_signedness.
858 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
860 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
861 (DEF_FUNCTION_TYPE_VAR_11): Delete.
863 2015-08-31 Richard Biener <rguenther@suse.de>
865 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
866 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
867 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
868 participate in merging with something else.
870 2015-08-31 Richard Biener <rguenther@suse.de>
872 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
873 test, do not replace a non-builtin with a builtin.
874 * lto.c (compare_tree_sccs_1): Do not merge things we stream
875 as builtins vs. non-builtins.
877 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
879 * lto.h: Remove useless typedefs.
881 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
883 * lto.c: Remove redundant includes.
885 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
887 * lto-lang.c: Fix double word typos.
889 2015-07-10 Andrew MacLeod <amacleod@redhat.com>
891 * lto.c: Include cfghooks.h rather than predict.h.
893 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
895 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
897 * lto-object.c: Likewise.
898 * lto-partition.c: Likewise.
899 * lto-symtab.c: Likewise.
901 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
903 * lto-lang.c: Adjust includes for flags.h changes.
905 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
907 * lto-lang.c: Adjust includes.
908 * lto-object.c: Likewise.
909 * lto-partition.c: Likewise.
910 * lto-symtab.c: Likewise.
913 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
915 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
916 * lto-object.c: Likewise.
917 * lto-partition.c: Likewise.
918 * lto-symtab.c: Likewise.
919 * lto-tree.h: Likewise.
922 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
924 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
925 than typed_noop_remove. Remove redudant typedefs.
927 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
929 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
930 * lto-object.c: Likewise.
931 * lto-partition.c: Likewise.
932 * lto-symtab.c: Likewise.
935 2015-06-14 Jan Hubicka <hubicka@ucw.cz>
938 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
940 2015-06-12 DJ Delorie <dj@redhat.com>
942 * lto-lang.c (lto_type_for_size): Include intN types.
943 (lto_type_for_mode): Likewise.
945 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
947 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
949 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
951 * lto-lang.c : Adjust include files.
952 * lto-object.c : Likewise.
953 * lto-partition.c : Likewise.
954 * lto-partition.h : Likewise.
955 * lto-symtab.c : Likewise.
959 2015-06-06 Jan Hubicka <hubicka@ucw.cz>
962 * lto-symtab.c (warn_type_compatibility_p): Fix call of
963 odr_or_derived_type_p.
964 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
966 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
969 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
972 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
974 * lto-lang.c (lto_write_globals): Remove.
975 (LANG_HOOKS_WRITE_GLOBALS): Same.
977 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
979 * lto-lang.c: Adjust includes for restructured coretypes.h.
980 * lto-object.c: Likewise.
981 * lto-partition.c: Likewise.
982 * lto-symtab.c: Likewise.
985 2015-06-04 Jan Hubicka <hubicka@ucw.cz>
987 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
989 2015-06-03 Jan Hubicka <hubicka@ucw.cz>
991 * lto.c (iterative_hash_canonical_type,
992 gimple_register_canonical_type): only hash main variants of types
994 2015-05-27 Martin Liska <mliska@suse.cz>
996 * lto-partition.c (new_partition): Reset number of symbols.
997 (add_symbol_to_partition_1): Increment number of symbols.
998 (undo_partition): Decrement number of symbols.
999 (lto_balanced_map): Dump number of symbols and insns that
1000 belong to a partition.
1001 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1003 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
1005 * lto.c (hash_canonical_type): Be sure we hash only types that
1007 (gimple_register_canonical_type_1): Do not produce canonical
1008 types for types that do not need alias sets.
1010 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
1012 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1014 2015-05-19 Jan Hubicka <hubicka@ucw.cz>
1016 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1018 2015-05-17 Jan Hubicka <hubicka@ucw.cz>
1020 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1021 compare ODR types (if available) and function types.
1022 (lto_symtab_merge): ... here; output ODR violation warnings
1023 and call warn_types_mismatch.
1025 2015-04-29 Jan Hubicka <hubicka@ucw.cz>
1027 * lto.c (lto_fixup_state): Call verify_type.
1029 2015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1031 * lto.c: Adjust for hash_table changes.
1033 2015-03-27 Jan Hubicka <hubicka@ucw.cz>
1035 * lto.c (lto_read_decls): Move code registering odr types out
1036 of TYPE_CANONICAL conditional and also register polymorphic types.
1038 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
1040 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1041 DECL_ARTIFICAL symbols.
1043 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
1046 * lto.c (unify_scc): Revert location cache when unification
1048 (lto_read_decls): Accept location cache after sucess;
1049 apply location cache before calling debug hooks.
1051 2015-03-10 Jan Hubicka <hubicka@ucw.cz>
1053 * lto.c (read_cgraph_and_symbols): Do not do merging
1056 2015-02-26 Jakub Jelinek <jakub@redhat.com>
1058 * lto.c (lto_mode_identity_table): New variable.
1059 (lto_read_decls): Add mode_table argument to the lto_input_block
1061 (lto_file_finalize): Initialize mode_table.
1062 (lto_init): Initialize lto_mode_identity_table.
1064 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1067 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1069 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1071 2015-02-03 Jan Hubicka <hubicka@ucw.cz>
1073 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1075 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1077 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1078 changed to pass input_location as first argument.
1080 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
1082 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1084 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
1086 * lto.c (compare_tree_sccs_1): Add comparsion of
1087 DECL_FUNCTION_SPECIFIC_TARGET
1089 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1090 James Norris <jnorris@codesourcery.com>
1092 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1094 * lto.c: Include "gomp-constants.h".
1096 2015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1098 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1099 from select_what_to_stream.
1101 2015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1102 Jakub Jelinek <jakub@redhat.com>
1105 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1108 2015-01-09 Michael Collison <michael.collison@linaro.org>
1110 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1111 input.h, alias.h, symtab.h, options, fold-const.h,
1112 wide-int.h, and inchash.h due to flattening of tree.h.
1113 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1114 input.h, alias.h, symtab.h, fold-const.h,
1115 wide-int.h, and inchash.h due to flattening of tree.h.
1116 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1117 input.h, alias.h, symtab.h, options, fold-const.h,
1118 wide-int.h, and inchash.h due to flattening of tree.h.
1119 * lto-partition.c: Ditto.
1120 * lto-symtab.c: Ditto.
1122 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1124 Update copyright years.
1126 2014-12-22 Martin Liska <mliska@suse.cz>
1128 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1130 (undo_partition): Likewise.
1131 (lto_balanced_map): Likewise.
1133 2014-12-22 Martin Liska <mliska@suse.cz>
1135 * lto-partition.c: Include of symbol-summary.h is added.
1136 * lto-symtab.c: Likewise.
1139 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
1142 * lto.c (read_cgraph_and_symbols): Update call of
1143 remove_unreachable_nodes.
1144 (do_whole_program_analysis): Remove call of
1145 symtab->remove_unreachable_nodes
1147 2014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1149 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1150 htab with malloc instead of ggc.
1152 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1154 * lto.c: Replace htab with hash_table.
1156 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1158 * lto.c (lto_read_in_decl_state): Adjust.
1159 (lto_fixup_state): Likewise.
1161 2014-11-17 Jan Hubicka <hubicka@ucw.cz>
1163 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1165 2014-11-14 Jan Hubicka <hubicka@ucw.cz>
1167 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1169 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1170 Bernd Schmidt <bernds@codesourcery.com>
1171 Andrey Turetskiy <andrey.turetskiy@intel.com>
1172 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1174 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1176 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1177 Ilya Tocar <ilya.tocar@intel.com>
1178 Andrey Turetskiy <andrey.turetskiy@intel.com>
1179 Bernd Schmidt <bernds@codesourcery.com>
1181 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1182 LTO_SECTION_NAME_PREFIX.
1183 * lto-partition.c (lto_promote_cross_file_statics): Call
1184 select_what_to_stream.
1185 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1186 LTO_SECTION_NAME_PREFIX.
1187 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1188 being built as an offload compiler.
1190 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1192 * lto-lang.c: Remove redundant enum from machine_mode.
1194 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
1196 * lto.c: Adjust include files.
1197 * lto-lang.c: Ditto.
1198 * lto-object.c: Ditto.
1199 * lto-partition.c: Ditto.
1200 * lto-symtab.c: Ditto.
1202 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
1204 * lto-lang.c: Adjust include files.
1205 * lto-object.c: Ditto.
1206 * lto-partition.c: Ditto.
1207 * lto-symtab.c: Ditto.
1210 2014-10-16 DJ Delorie <dj@redhat.com>
1212 * lto-object.c (lto_obj_begin_section): In the event that pointer
1213 sizes aren't powers of two, choose a more suitable alignment
1214 than (unsigned)(-1).
1216 2014-10-14 DJ Delorie <dj@redhat.com>
1218 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1220 (lto_init): Initialize all intN types, not just int128.
1222 2014-10-06 Martin Liska <mliska@suse.cz>
1224 * lto.c (stream_out): ARG_UNUSED added for last argument.
1226 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
1228 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1231 2014-09-23 Andi Kleen <ak@linux.intel.com>
1233 * lto-partition.c (node_cmp): Update comment.
1234 (varpool_node_cmp): Use symtab_node for comparison.
1235 (add_sorted_nodes): New function.
1236 (lto_balanced_map): Change to keep ordered queue
1237 of ordered node. Handle no_reorder attribute.
1239 2014-09-11 Jan Hubicka <hubicka@ucw.cz>
1241 * lto.c (lto_read_decls): Register ODR types.
1243 2014-08-20 Jan Hubicka <hubicka@ucw.cz>
1245 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1247 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1249 2014-08-14 Jan Hubicka <hubicka@ucw.cz>
1251 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1253 2014-08-14 Richard Biener <rguenther@suse.de>
1256 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1258 2014-08-08 Richard Biener <rguenther@suse.de>
1260 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1262 2014-08-08 Bin Cheng <bin.cheng@arm.com>
1265 * lto-lang.c (lto_init): Switch mis-matched arguments.
1267 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1269 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1271 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1273 * lto-partition.c, lto-partition.h: Use hash_set instead of
1276 2014-07-31 Andi Kleen <ak@linux.intel.com>
1278 * lto.c (hash_canonical_type): Use inchash::hash
1279 and use inchash::add_expr.
1280 (iterative_hash_canonical_type): Dito.
1282 2014-07-30 Richard Biener <rguenther@suse.de>
1284 * lto-streamer.h (lto_write_data): New function.
1285 * langhooks.c (lhd_append_data): Do not free block.
1286 * lto-section-out.c (lto_write_data): New function writing
1287 raw data to the current section.
1288 (lto_write_stream): Adjust for langhook semantic change.
1289 (lto_destroy_simple_output_block): Write header directly.
1290 * lto-opts.c (lto_write_options): Write options directly.
1291 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1292 (lto_output_toplevel_asms): Likewise.
1293 (copy_function_or_variable): Copy data directly.
1294 (write_global_references): Output index table directly.
1295 (lto_output_decl_state_refs): Likewise.
1296 (write_symbol): Write data directly.
1297 (produce_symtab): Adjust.
1298 (produce_asm_for_decls): Output header and refs directly.
1300 2014-07-25 Andi Kleen <ak@linux.intel.com>
1302 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1304 2014-07-25 Andi Kleen <ak@linux.intel.com>
1306 * lto.c (hash_canonical_type): Convert to inchash.
1307 (iterative_hash_canonical_type): Dito.
1309 2014-07-25 Andi Kleen <ak@linux.intel.com>
1311 * lto.c: Include inchash.h
1313 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
1315 * lto.c (mentions_vars_p_decl_non_common): Skip
1317 mentions_vars_p_function): Do DECL_ARGUMENTS.
1318 (lto_fixup_prevailing_decls): Update.
1320 2014-07-12 Jan Hubicka <hubicka@ucw.cz>
1322 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1324 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1326 2014-07-11 Jan Hubicka <hubicka@ucw.cz>
1328 * lto-partition.c (add_references_to_partition): Use
1329 varpool_ctor_useable_for_folding_p.
1330 * lto.c (lto_read_in_decl_state): Update sanity check.
1332 2014-07-01 Martin Liska <mliska@suse.cz>
1334 IPA REF alias refactoring
1335 * lto-partition.c (add_symbol_to_partition_1): Usage of
1336 FOR_EACH_ALIAS added.
1338 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
1341 * lto.c (lto_copy_fields_not_streamed): New function.
1342 (compare_tree_sccs_1): Do not compare fields shared in between type
1344 (lto_read_decls): Fixup types first before inserting into hash.
1346 2014-06-28 Andrew Pinski <apinski@cavium.com>
1348 * lto.c (lto_read_decls): Fix comment in comment.
1350 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
1352 * lto.c (lto_copy_fields_not_streamed): New function.
1353 (compare_tree_sccs_1): Do not compare fields shared in between type
1355 (lto_read_decls): Fixup types first before inserting into hash.
1357 2014-06-25 Martin Liska <mliska@suse.cz>
1359 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
1361 (add_symbol_to_partition_1): Likewise.
1362 (lto_balanced_map): Likewise.
1363 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
1365 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
1367 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1368 (mentions_vars_p_function): ... here.
1369 (compare_tree_sccs_1): Update VINDEX checks.
1370 (lto_fixup_prevailing_decls): Likewise.
1372 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1374 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1377 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1381 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
1383 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1385 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
1387 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1389 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
1391 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1393 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
1395 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1396 (do_whole_program_analysis): Use verify_symtab.
1398 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
1400 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1401 lto_fixup_prevailing_decls): Skip section names.
1403 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
1405 * lto-symtab.c: Include builtins.h.
1407 2014-05-26 Richard Biener <rguenther@suse.de>
1409 * lto.c (lto_parse_hex): Use int64_t.
1410 (lto_resolution_read): Likewise.
1412 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1414 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1416 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
1418 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1420 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1422 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1424 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1425 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1426 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1428 2012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1430 * lto-object.c: Include "lto-section-names.h".
1431 (LTO_SEGMENT_NAME): Don't define.
1432 * lto.c: Include "lto-section-names.h".
1434 2014-05-17 Jan Hubicka <hubicka@ucw.cz>
1437 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1438 mixed with variables.
1440 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1442 * lto-tree.h: Don't use variable_size gty attribute.
1443 * lto.c (lto_read_in_decl_state): Adjust.
1444 (create_subid_section_table): Likewise.
1445 (lto_flatten_files): Likewise.
1446 (read_cgraph_and_symbols): Likewise.
1448 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1449 Mike Stump <mikestump@comcast.net>
1450 Richard Sandiford <rdsandiford@googlemail.com>
1452 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1453 * lto-lang.c (get_nonnull_operand): Likewise.
1455 2014-04-28 Richard Biener <rguenther@suse.de>
1458 * lto-lang.c: Define flag_isoc11.
1460 2014-04-23 David Malcolm <dmalcolm@redhat.com>
1462 * lto-partition.c (add_references_to_partition): Update for
1463 removal of implicit pointer from the is-a.h API.
1464 (add_symbol_to_partition_1): Likewise.
1465 (contained_in_symbol): Likewise.
1466 (undo_partition): Likewise.
1467 (lto_balanced_map): Likewise.
1468 (promote_symbol): Likewise.
1469 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1470 (lto_symtab_merge_symbols): Likewise.
1471 * lto.c (lto_wpa_write_files): Likewise.
1473 2014-04-15 Richard Biener <rguenther@suse.de>
1475 * lto.c: Include params.h.
1476 (do_whole_program_analysis): Switch on flag_lto_partition value,
1477 add support for LTO_PARTITION_ONE.
1478 * lto-partition.h (lto_balanced_map): Adjust.
1479 * lto-partition.c (lto_balanced_map): Get number of desired
1480 partitions as argument to support -flto-partition=one.
1482 2014-04-14 Jan Hubicka <hubicka@ucw.cz>
1484 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1487 2014-03-19 Jan Hubicka <hubicka@ucw.cz>
1489 * lto.c: Include ipa-inline.h
1490 (do_whole_program_analysis): Free inline summary after partitioning.
1492 2014-03-19 Richard Biener <rguenther@suse.de>
1495 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1496 instead of TREE_CHAIN as chain_next.
1498 2014-03-19 Richard Biener <rguenther@suse.de>
1500 * lto.c (lto_wpa_write_files): Move call to
1501 lto_promote_cross_file_statics ...
1502 (do_whole_program_analysis): ... here, into the partitioning
1503 block. Do not ggc_collect after lto_wpa_write_files but
1504 for a last time before it.
1506 2014-03-19 Jakub Jelinek <jakub@redhat.com>
1509 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1512 2014-03-18 Jakub Jelinek <jakub@redhat.com>
1515 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1516 and complex_{float,{,long_}double}_type_node.
1518 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
1520 * lto-lang.c (lto_init): Pass flag_short_double to
1521 build_common_tree_nodes.
1523 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
1526 * lto.c (stream_out): Avoid parallel streaming with
1527 -flto=jobserver until we are able to throttle it down
1530 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
1532 * lto-partition.c (add_symbol_to_partition_1,
1533 undo_partition, lto_balanced_map): Aliases have no
1535 (lto_balanced_map): Do not follow refering variables
1536 if they can be optimized out.
1538 2014-02-14 Richard Biener <rguenther@suse.de>
1541 * lto.c (compare_tree_sccs_1): Do not compare
1542 DECL_FUNCTION_SPECIFIC_TARGET.
1543 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1545 2014-02-12 Richard Biener <rguenther@suse.de>
1548 * lto-lang.c (lto_write_globals): Do not call
1549 wrapup_global_declarations or emit_debug_global_declarations
1550 but emit debug info for non-function scope variables
1553 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1555 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1557 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1560 * lto-partition.c (symbol_class): Move to cgraph.h
1561 (get_symbol_class): Move to symtab.c
1562 (add_references_to_partition, add_symbol_to_partition_1,
1563 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1564 lto_promote_cross_file_statics): Update.
1566 2014-02-05 Jan Hubicka <hubicka@ucw.cz>
1568 * lto.c (lto_parallelism): New static var.
1569 (do_stream_out, wait_for_child, stream_out): New static functions.
1570 (lto_wpa_write_files): Add support for parallel streaming.
1571 (do_whole_program_analysis): Set parallelism.
1572 * lang.opt (fwpa): Add parameter.
1573 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1574 (lto_init): Update use of flag_wpa.
1575 * lto-streamer.h (asm_nodes_output): Declare.
1577 2014-02-05 Richard Biener <rguenther@suse.de>
1579 * lto.h (lto_global_var_decls): Remove.
1580 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1581 (lto_write_globals): Do nothing in WPA stage, gather globals from
1582 the varpool here ...
1583 * lto.c (lto_main): ... not here.
1584 (materialize_cgraph): Do not call rest_of_decl_compilation
1585 on the empty lto_global_var_decls vector.
1586 (lto_global_var_decls): Remove.
1588 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
1590 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1591 needs duplicating, not generic COMDAT.
1593 2014-02-04 Richard Biener <rguenther@suse.de>
1596 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1597 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1599 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
1603 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1604 merge force_output and forced_by_abi flags.
1606 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1608 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1611 2014-01-09 Richard Biener <rguenther@suse.de>
1613 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1615 2014-01-09 Richard Biener <rguenther@suse.de>
1618 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1619 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1620 (gimple_canonical_types_compatible_p): Do not compare them either.
1622 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1624 Update copyright years
1626 2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1628 * lto.c: Remove struct tags when referring to class varpool_node.
1629 * lto-partition.c: Likewise.
1630 * lto-symtab.c: Likewise.
1632 2013-11-29 Jakub Jelinek <jakub@redhat.com>
1633 Richard Biener <rguenther@suse.de>
1636 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1638 2013-11-29 Jakub Jelinek <jakub@redhat.com>
1641 * lto.c (mentions_vars_p_omp_clause): New function.
1642 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1645 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1647 * lto.c: Add required include files from gimple.h.
1648 * lto-lang.c: Likewise
1649 * lto-object.c: Likewise
1650 * lto-partition.c: Likewise
1651 * lto-symtab.c: Likewise
1653 2013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1655 * lto-partition.c lto-symtab.c lto.c Adjust.
1657 2013-11-14 Diego Novillo <dnovillo@google.com>
1659 * lto-lang.c: Include stringpool.h.
1660 Include stor-layout.h.
1661 * lto-partition.c: Include gcc-symtab.h.
1662 * lto.c: Include stor-layout.h.
1664 2013-10-31 David Malcolm <dmalcolm@redhat.com>
1666 Automated part of renaming of symtab_node_base to symtab_node.
1668 Patch autogenerated by rename_symtab.py from
1669 https://github.com/davidmalcolm/gcc-refactoring-scripts
1670 revision 58bb219cc090b2f4516a9297d868c245495ee622
1672 * lto-partition.c (add_symbol_to_partition): Rename
1673 symtab_node_base to symtab_node.
1674 (get_symbol_class): Likewise.
1675 (symbol_partitioned_p): Likewise.
1676 (add_references_to_partition): Likewise.
1677 (add_symbol_to_partition_1): Likewise.
1678 (contained_in_symbol): Likewise.
1679 (add_symbol_to_partition): Likewise.
1680 (lto_1_to_1_map): Likewise.
1681 (lto_max_map): Likewise.
1682 (lto_balanced_map): Likewise.
1683 (privatize_symbol_name): Likewise.
1684 (promote_symbol): Likewise.
1685 (may_need_named_section_p): Likewise.
1686 (rename_statics): Likewise.
1687 (lto_promote_statics_nonwpa): Likewise.
1688 * lto-symtab.c (lto_symtab_merge): Likewise.
1689 (lto_symtab_resolve_replaceable_p): Likewise.
1690 (lto_symtab_symbol_p): Likewise.
1691 (lto_symtab_resolve_can_prevail_p): Likewise.
1692 (lto_symtab_resolve_symbols): Likewise.
1693 (lto_symtab_merge_decls_2): Likewise.
1694 (lto_symtab_merge_decls_1): Likewise.
1695 (lto_symtab_merge_decls): Likewise.
1696 (lto_symtab_merge_symbols_1): Likewise.
1697 (lto_symtab_merge_symbols): Likewise.
1698 (lto_symtab_prevailing_decl): Likewise.
1699 * lto.c (lto_wpa_write_files): Likewise.
1700 (read_cgraph_and_symbols): Likewise.
1701 (do_whole_program_analysis): Likewise.
1703 2013-10-30 David Malcolm <dmalcolm@redhat.com>
1705 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1706 declarations onto multiple lines to make things easier for
1708 (lto_symtab_merge_decls_1): Likewise.
1709 (lto_symtab_merge_symbols_1): Likewise.
1711 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1713 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1714 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1717 2013-10-29 David Malcolm <dmalcolm@redhat.com>
1719 Patch autogenerated by refactor_symtab.py from
1720 https://github.com/davidmalcolm/gcc-refactoring-scripts
1721 revision 58bb219cc090b2f4516a9297d868c245495ee622
1723 * lto-partition.c (lto_promote_cross_file_statics): Update for
1724 conversion of symtab types to a true class hierarchy.
1725 (rename_statics): Likewise.
1726 (promote_symbol): Likewise.
1727 (privatize_symbol_name): Likewise.
1728 (lto_balanced_map): Likewise.
1729 (varpool_node_cmp): Likewise.
1730 (node_cmp): Likewise.
1731 (lto_1_to_1_map): Likewise.
1732 (undo_partition): Likewise.
1733 (add_symbol_to_partition): Likewise.
1734 (contained_in_symbol): Likewise.
1735 (add_symbol_to_partition_1): Likewise.
1736 (add_references_to_partition): Likewise.
1737 (symbol_partitioned_p): Likewise.
1738 (get_symbol_class): Likewise.
1739 (lto_max_map): Likewise.
1740 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1741 (lto_symtab_merge_symbols): Likewise.
1742 (lto_symtab_merge_symbols_1): Likewise.
1743 (lto_symtab_merge_decls): Likewise.
1744 (lto_symtab_merge_decls_1): Likewise.
1745 (lto_symtab_merge_decls_2): Likewise.
1746 (lto_symtab_resolve_symbols): Likewise.
1747 (lto_symtab_resolve_can_prevail_p): Likewise.
1748 (lto_symtab_symbol_p): Likewise.
1749 (lto_symtab_resolve_replaceable_p): Likewise.
1750 (lto_symtab_merge): Likewise.
1751 (lto_varpool_replace_node): Likewise.
1752 (lto_cgraph_replace_node): Likewise.
1753 * lto.c (lto_main): Likewise.
1754 (do_whole_program_analysis): Likewise.
1755 (materialize_cgraph): Likewise.
1756 (read_cgraph_and_symbols): Likewise.
1757 (cmp_partitions_order): Likewise.
1758 (lto_materialize_function): Likewise.
1759 (has_analyzed_clone_p): Likewise.
1761 2013-10-29 Andrew MacLeod <amacleod@redhat.com>
1763 * lto/lto-object.c: Add gimple.h to include list.
1764 * lto/lto-partition.c: Likewise.
1766 2013-10-18 Andrew MacLeod <amacleod@redhat.com>
1768 * lto.c: Remove tree-flow.h from include list.
1770 2013-10-15 Richard Biener <rguenther@suse.de>
1772 * lto.c (hash_canonical_type): Split out from ...
1773 (iterative_hash_canonical_type): ... here. Register types
1775 (gimple_canonical_type_hash): Adjust.
1776 (gimple_register_canonical_type_1): Split out from ...
1777 (gimple_register_canonical_type): ... here. Cache computed
1779 (lto_register_canonical_types): Split into two modes,
1780 clearing and computing TYPE_CANONICAL.
1781 (lto_read_decls): Adjust.
1782 (read_cgraph_and_symbols): Do two passes over global trees,
1783 first clearing then computing TYPE_CANONICAL.
1785 2013-10-14 Richard Biener <rguenther@suse.de>
1787 * lto.c (gimple_canonical_types): Move out-of GC space.
1788 (canonical_type_hash_cache): Make a pointer-map.
1789 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1791 (iterative_hash_canonical_type): Adjust.
1792 (read_cgraph_and_symbols): Likewise.
1793 (print_lto_report_1): Likewise.
1795 2013-10-14 Richard Biener <rguenther@suse.de>
1797 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1798 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1799 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1800 gimple_types_compatible_p_1, gimple_types_compatible_p,
1801 visit, iterative_hash_name, struct type_hash_pair,
1802 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1803 gimple_type_eq, gimple_register_type, num_not_merged_types,
1804 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1805 num_not_merged_types_in_same_scc_trees): Remove old merging code
1807 (lto_read_decls): Do not run old merging code in parallel.
1808 (read_cgraph_and_symbols): Do not init/free old merging
1810 (print_lto_report_1): Do not report differences of old vs. new
1813 2013-10-14 Richard Biener <rguenther@suse.de>
1815 * lto-lang.c (lto_init): Do not re-init canonical types here.
1816 (lto_register_canonical_types): Move to ...
1817 * lto.c (lto_register_canonical_types): ... here.
1818 (gimple_canonical_types, canonical_type_hash_cache,
1819 iterative_hash_canonical_type, gimple_canonical_type_hash,
1820 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1821 gimple_register_canonical_type): Add canonical type merging machinery
1822 moved from gimple.c.
1823 (read_cgraph_and_symbols): Init and free canonical type tables
1825 (print_lto_report_1): Report canonical type table stats here.
1827 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1829 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1831 2013-09-25 Tom Tromey <tromey@redhat.com>
1833 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1834 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1835 (lto/lto-object.o): Remove.
1837 2013-09-06 Richard Biener <rguenther@suse.de>
1839 * lto-symtab.c: Move from gcc/
1840 * lto.h: Include vec.h.
1841 (lto_global_var_decls): Declare.
1842 * lto.c (lto_global_var_decls): Move definition here.
1843 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1844 (lto-symtab.o): Add.
1845 * config-lang.in (gtfiles): Add lto.h.
1847 2013-08-31 Jan Hubicka <jh@suse.cz>
1849 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1850 DECL_FIELD_OFFSET can contain an reference to variable.
1852 2013-08-31 Jan Hubicka <jh@suse.cz>
1854 * lto.c (tree_with_vars): Turn into vector.
1855 (MAYBE_REMEMBER_WITH_VARS): Change to...
1856 (CHECK_VAR): ... this one.
1857 (CHECK_NO_VAR): New macro.
1858 (maybe_remember_with_vars_typed): Turn to ...
1859 (mentions_vars_p_typed): ... this one.
1860 (maybe_remember_with_vars_common): Turn to ...
1861 (mentions_vars_p_comon): ... this one.
1862 (maybe_remember_with_vars_decl_minimal): Turn to ...
1863 (mentions_vars_p_decl_minmal): ... this one.
1864 (maybe_remember_with_vars_decl_common): Turn to ...
1865 (mentions_vars_p_decl_common): ... this one.
1866 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1867 (mentions_vars_p_decl_with_vis): ... this one.
1868 (maybe_remember_with_vars_decl_non_common): Turn to ...
1869 (mentions_vars_p_decl_non_common): ... this one.
1870 (maybe_remember_with_vars_function): Turn to ...
1871 (mentions_vars_p_function): ... this one.
1872 (maybe_remember_with_vars_field_decl): Turn to ...
1873 (mentions_vars_p_field_decl): ... this one.
1874 (maybe_remember_with_vars_type): Turn to ...
1875 (mentions_vars_p_type): ... this one.
1876 (maybe_remember_with_vars_binfo): Turn to ...
1877 (mentions_vars_p_binfo): ... this one.
1878 (maybe_remember_with_vars_constructor): Turn to ...
1879 (mentions_vars_p_constructor): ... this one.
1880 (maybe_remember_with_vars_expr): Turn to ...
1881 (mentions_vars_p_expr): ... this one.
1882 (maybe_remember_with_vars): Turn to ...
1883 (mentions_vars_p): ... this one.
1884 (lto_read_decls): Update.
1885 (LTO_SET_PREVAIL): Do not call function for internal decls.
1886 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1887 check that something was updated.
1888 (lto_fixup_state): Do not care about internal decls.
1889 (lto_fixup_decls): Update.
1890 (read_cgraph_and_symbols): Update.
1892 2013-08-29 Jan Hubicka <jh@suse.cz>
1894 * lto.c (read_cgraph_and_symbols): Free decl states.
1896 2013-08-29 Jan Hubicka <jh@suse.cz>
1898 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1899 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1902 2013-08-28 Jan Hubicka <jh@suse.cz>
1904 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1905 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1906 (unify_scc): Do checking assert.
1908 2013-08-06 Jan Hubicka <jh@suse.cz>
1909 Martin Liska <marxin.liska@gmail.com>
1911 * lto-partition.c (lto_balanced_map): Always base order on
1914 2013-08-06 Jan Hubicka <jh@suse.cz>
1916 * lto.c (lto_materialize_function): Do not read body anymore.
1918 2013-08-02 Jan Hubicka <jh@suse.cz>
1920 * lto.c (lto_materialize_function): Do not push struct function.
1921 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1922 (may_need_named_section_p): Even abstract origins may need
1925 2013-07-30 David Malcolm <dmalcolm@redhat.com>
1927 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1930 * lto.c (do_whole_program_analysis): Update for move of
1931 all_regular_ipa_passes from a global to a field of class
1934 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
1936 * lto-partition.c: Fix typos.
1938 2013-06-20 Jan Hubicka <jh@suse.cz>
1940 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1941 partitioning of variables.
1943 2013-06-20 Jan Hubicka <jh@suse.cz>
1945 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1947 2013-06-19 Jan Hubicka <jh@suse.cz>
1949 * lto-partition.c (add_references_to_partition): Use
1952 2013-06-18 Richard Biener <rguenther@suse.de>
1954 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1956 (lto_register_function_decl_in_symtab): Likewise.
1957 (cmp_tree): New function.
1958 (unify_scc): Instead of using the streamer cache map from entry
1959 to cache index match up the two maps we have by sorting them.
1960 Adjust calls to lto_register_var_decl_in_symtab and
1961 lto_register_function_decl_in_symtab.
1963 2013-06-17 Richard Biener <rguenther@suse.de>
1965 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1966 * lto.c: Include data-streamer.h.
1967 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1968 (gimple_type_leader_entry_s, gimple_type_leader,
1969 gimple_lookup_type_leader): Remove.
1970 (gtc_visit): Simplify.
1971 (gimple_types_compatible_p): Likewise.
1972 (gimple_register_type_1): Likewise. Merge into ...
1973 (gimple_register_type): ... this. Keep it as legacy for
1974 statistics purposes for now.
1975 (fixup_integer_cst): Remove.
1976 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1978 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1979 maybe_remember_with_vars_*): ... these.
1980 (uniquify_nodes): Remove.
1981 (lto_fixup_prevailing_type): New function.
1982 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1983 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1984 (num_merged_types, num_prevailing_types, num_not_merged_types,
1985 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1986 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1987 num_scc_compare_collisions): New global counters.
1988 (compare_tree_sccs_1): New function.
1989 (compare_tree_sccs): Likewise.
1990 (unify_scc): Likewise.
1991 (lto_read_decls): Stream in tree SCCs and unify them on the
1992 way in. Finalize prevailing SCC tree members.
1993 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1994 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1995 to ggc-collect during merging.
1996 (print_lto_report_1): Adjust for new merging code.
1998 2013-06-12 Jan Hubicka <jh@suse.cz>
2000 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2002 2013-06-12 Jan Hubicka <jh@suse.cz>
2004 * lto.c (register_resolution): Take lto_file_data argument.
2005 (lto_register_var_decl_in_symtab,
2006 lto_register_function_decl_in_symtab): Update.
2007 (read_cgraph_and_symbols): Update resolution_map handling.
2009 2013-06-11 Jan Hubicka <jh@suse.cz>
2011 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2012 (add_symbol_to_partition_1): Likewise.
2013 (contained_in_symbol): Likewise.
2014 (lto_balanced_map): Likewise.
2015 (rename_statics): Drop weakref.
2017 2013-06-05 Richard Biener <rguenther@suse.de>
2019 * lto.c (num_merged_types): New global variable.
2020 (uniquify_nodes): Increase num_merged_types when merging a type.
2021 (print_lto_report_1): Output the number of merged types.
2023 2013-06-01 Jan Hubicka <jh@suse.cz>
2025 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2026 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2027 (do_whole_program_analysis): Update dumping.
2029 2013-05-29 Jan Hubicka <jh@suse.cz>
2031 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2033 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2035 2013-05-15 Jan Hubicka <jh@suse.cz>
2037 * lto-partition.c (privatize_symbol_name): Return true when
2038 privatizing happened.
2039 (rename_statics): Do not go into infinite loop when privatizing
2042 2013-05-16 Jason Merrill <jason@redhat.com>
2044 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2046 2013-05-15 Martin Jambor <mjambor@suse.cz>
2048 * lto-partition.c (lto_balanced_map): Print symbol order instead
2051 2013-05-15 Jan Hubicka <jh@suse.cz>
2055 * lto-partition.c (get_symbol_class): Fix weakrefs.
2056 (lto_balanced_map): Fix weakrefs.
2057 (privatize_symbol_name): Remove unnecesary label.
2058 (rename_statics): Handle weakrefs as statics.
2060 2013-05-09 Jan Hubicka <jh@suse.cz>
2061 Richard Biener <rguenther@suse.de>
2063 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2064 (lto_register_var_decl_in_symtab): Likewise.
2065 (lto_main): Promote statics.
2066 * lto-partition.c (privatize_symbol_name): New function.
2067 (promote_symbol): Use it.
2068 (may_need_named_section_p): New predicate.
2069 (rename_statics): New functions.
2070 (lto_promote_cross_file_statics): Simplify; do renaming.
2071 (lto_promote_statics_nonwpa): New function.
2072 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2074 2013-02-08 Richard Biener <rguenther@suse.de>
2077 * lto-lang.c (lto_init): Do not enter a dummy file.
2079 2013-02-07 Uros Bizjak <ubizjak@gmail.com>
2082 * lto.c (lto_resolution_ready): Use %wx instead of
2083 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2085 2013-02-04 Richard Guenther <rguenther@suse.de>
2088 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2089 or lto_fixup_decls at LTRANS time.
2091 2013-01-09 Jan Hubicka <jh@suse.cz>
2094 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2096 2012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2099 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2101 (lto_main): Record the global variables if WPA isn't enabled.
2103 2012-11-20 Diego Novillo <dnovillo@google.com>
2104 Jakub Jelinek <jakub@redhat.com>
2106 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2108 2012-11-16 Diego Novillo <dnovillo@google.com>
2110 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2112 * lto-lang.c: Use new vec API in vec.h.
2113 * lto-partition.c: Likewise.
2114 * lto-partition.h: Likewise.
2117 2012-10-31 Lawrence Crowl <crowl@google.com>
2119 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2120 down-cast via dyn_cast.
2121 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2122 (undo_partition): Likewise.
2123 (lto_balanced_map): Likewise.
2124 (get_symbol_class): Likewise and via is_a.
2125 (lto_balanced_map): Change symtab checking to is_a.
2127 2012-10-12 Richard Biener <rguenther@suse.de>
2130 * lto.c (gimple_types_compatible_p_1): Also compare
2132 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2134 2012-10-09 Tobias Burnus <burnus@net-b.de>
2136 * lto-lang.c (lto_register_builtin_type): Avoid useless
2138 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2140 2012-10-08 Tobias Burnus <burnus@net-b.de>
2142 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2143 Free lto_file struct after closing the file.
2145 2012-10-08 Jan Hubicka <jh@suse.cz>
2147 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
2148 (fixup_integer_cst): New functoin.
2149 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2151 2012-10-07 Jan Hubicka <jh@suse.cz>
2153 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2154 release input encoders.
2155 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2157 2012-10-06 Jan Hubicka <jh@suse.cz>
2160 * lto.c (resolution_map): New static var.
2161 (register_resolution): New function.
2162 (lto_register_var_decl_in_symtab): Use it.
2163 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2165 2012-09-20 Martin Jambor <mjambor@suse.cz>
2167 * lto.c (lto_materialize_function): Call push_struct_function and
2170 2012-09-19 Dehao Chen <dehao@google.com>
2172 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2174 2012-09-19 Jan Hubicka <jh@suse.cz>
2176 * lto.c (lto_materialize_function): Update confused comment.
2177 (read_cgraph_and_symbols): Do not free symtab.
2179 2012-09-12 Jan Hubicka <jh@suse.cz>
2181 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2182 AUX pointer cleaning. Add max partitioning.
2183 * lto-partition.c (enum symbol_class): New.
2184 (get_symbol_class): New function.
2185 (symbol_partitioned_p): New function.
2186 (add_references_to_partition): Remove.
2187 (add_aliases_to_partition): Remove.
2188 (add_cgraph_node_to_partition_1): Remove.
2189 (add_cgraph_node_to_partition): Remove.
2190 (add_symbol_to_partition): New function.
2191 (add_symbol_to_partition_1): New function.
2192 (contained_in_symbol): New function.
2193 (partition_cgraph_node_p): Remove.
2194 (partition_varpool_node_p): Remove.
2195 (partition_symbol_p): Remove.
2196 (lto_1_to_1_map): Cleanup.
2198 (lto_balanced_map): Update.
2199 (lto_promote_cross_file_statics): Update.
2200 * lto-partition.h (lto_max_map): Declare.
2201 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2203 2012-09-11 Jan Hubicka <jh@suse.cz>
2206 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2207 type is variant leader.
2209 2012-09-11 Richard Guenther <rguenther@suse.de>
2211 * lto.c (enum gtc_mode): Remove.
2212 (struct type_pair_d): Adjust.
2213 (lookup_type_pair): Likewise.
2214 (gimple_type_leader): Do not mark as deletable.
2215 (gimple_lookup_type_leader): Adjust.
2216 (gtc_visit): Likewise.
2217 (gimple_types_compatible_p_1): Likewise.
2218 (gimple_types_compatible_p): Likewise.
2219 (gimple_type_hash): Likewise.
2220 (gimple_register_type): Likewise.
2221 (read_cgraph_and_symbols): Manage lifetime of tables
2224 2012-09-11 Richard Guenther <rguenther@suse.de>
2226 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2227 struct type_pair_d, lookup_type_pair, struct sccs,
2228 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2229 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2230 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2231 visit, iterative_hash_name, struct type_hash_pair,
2232 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2233 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2234 Move here from gimple.c
2235 (read_cgraph_and_symbols): Free hash tables here.
2236 (print_lto_report_1): New function wrapping print_lto_report.
2237 (do_whole_program_analysis): Call it.
2238 (lto_main): Likewise.
2240 2012-09-10 Jan Hubicka <jh@suse.cz>
2242 * lto-partition.c (partition_symbol_p): Forward declare.
2243 (add_references_to_partition): Reimplement using partition_symbol_p.
2244 (add_aliases_to_partition): Break out from add_references_to_partition;
2245 reimplement using partition_symbol_p.
2246 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2248 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2249 (partition_varpool_node_p): Do not special case aliases.
2251 2012-08-12 Jan Hubicka <jh@suse.cz>
2253 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2254 it is deleted after streaming.
2255 * lto-partition.c (partition_symbol_p): New function.
2256 (promote_var, promote_fn): Remove.
2257 (promote_symbol): New function.
2258 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2259 to lookup the actual boundaries instead of computing them ad-hoc.
2261 2012-08-12 Jan Hubicka <jh@suse.cz>
2263 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2265 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2267 * lto-partition.c (new_partition): Update.
2268 * lto.c (cmp_partitions_order): Update.
2269 (lto_wpa_write_files): Update.
2270 (free_ltrans_partitions): Update.
2271 (add_references_to_partition): Update.
2272 (add_cgraph_node_to_partition_1): Update.
2273 (add_cgraph_node_to_partition): Update.
2274 (add_varpool_node_to_partition): Update.
2275 (undo_partition): Update.
2276 (lto_balanced_map): Update.
2277 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2278 set_referenced_from_this_partition_p): Update.
2279 (lto_promote_cross_file_statics): Update.
2281 2012-08-12 Jan Hubicka <jh@suse.cz>
2283 * lto-partition.c (set_referenced_from_other_partition_p,
2284 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2286 (lto_promote_cross_file_statics): Use them.
2288 2012-07-24 Jan Hubicka <jh@suse.cz>
2290 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2292 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
2294 * lto-tree.h (lang_decl): Add variable_size GTY option.
2296 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2298 * lto.c: Do not include timevar.h.
2299 * Make-lang.in: Fix dependencies.
2301 2012-06-18 Lawrence Crowl <crowl@google.com>
2303 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
2304 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2305 to lto_wpa_write_files.
2306 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2307 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2308 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2309 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2310 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2311 to be a front end, but is not one.
2313 2012-05-18 Jan Hubicka <jh@suse.cz>
2315 * lto.c (lto_materialize_constructors_and_inits): Remove.
2316 (read_cgraph_and_symbols): Remove handling of alias pairs.
2318 2012-05-17 Jan Hubicka <jh@suse.cz>
2320 * lto-partition.c (add_references_to_partition): Handle external vars.
2321 (partition_varpool_node_p): Likewise.
2322 (lto_promote_cross_file_statics): Do not promote externals.
2324 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2326 * lto-lang.c (handle_fnspec_attribute): New static function.
2327 (lto_attribute_table): Add "fn spec".
2328 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2330 2012-05-04 Jan Hubicka <jh@suse.cz>
2332 * lto.c (do_whole_program_analysis): Set timevars correctly.
2333 (lto_main): Likewise.
2335 2012-05-04 Richard Guenther <rguenther@suse.de>
2337 * lang.opt (fwpa): Do not mark as Optimization.
2338 (fltrans): Likewise.
2340 2012-04-30 Jan Hubicka <jh@suse.cz>
2342 * lto.c (lto_main): Use compile ().
2343 * lto-partition.c (partition_cgraph_node_p): Use
2344 symtab_used_from_object_file_p.
2345 (partition_varpool_node_p): Likewise.
2347 2012-04-20 Jan Hubicka <jh@suse.cz>
2349 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2351 2012-04-18 Jan Hubicka <jh@suse.cz>
2353 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2354 Update for new ipa-ref API.
2356 2012-04-16 Jan Hubicka <jh@suse.cz>
2358 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
2359 walkers to walk cgraph and varpool.
2360 (materialize_cgraph): Likewise.
2361 * lto-partition.c (lto_1_to_1_map): Likewise.
2362 (lto_balanced_map): Likewise.
2363 (lto_promote_cross_file_statics): Likewise.
2365 2012-04-14 Jan Hubicka <jh@suse.cz>
2367 * lto.c: Update field referenced for new cgraph/varpool layout.
2368 * lto-partition.c: Likewise.
2370 2012-04-11 Jan Hubicka <jh@suse.cz>
2372 * lto.c: Update copyright; remove params.h, ipa-inline.h
2373 and ipa-utils.h inlines; inline lto-partition.h
2374 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2375 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2376 add_references_to_partition, add_cgraph_node_to_partition_1,
2377 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2378 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2379 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2380 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2381 * lto-partition.c: ... here; new file.
2382 * lto-partition.h: New file.
2383 * Make-lang.in (lto.o): Update dependencies.
2384 (lto-partition.o): New.
2386 2012-04-05 Richard Guenther <rguenther@suse.de>
2388 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2391 2012-03-12 Richard Guenther <rguenther@suse.de>
2393 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2395 2012-03-06 Richard Guenther <rguenther@suse.de>
2398 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2400 2012-02-28 Richard Guenther <rguenther@suse.de>
2403 * lto.c (lto_register_function_decl_in_symtab): Do not register
2404 a reverse renamed decl mapping.
2406 2012-01-06 Jakub Jelinek <jakub@redhat.com>
2409 * lto-lang.c (handle_returns_twice_attribute): New function.
2410 (lto_attribute_table): Add returns_twice attribute.
2412 2011-12-21 Richard Guenther <rguenther@suse.de>
2414 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2415 (LTO_FIXUP_TREE): Use it.
2416 (uniquify_nodes): Mark new non-prevailing types and avoid
2417 calling gimple_register_type on others.
2418 (lto_read_decls): Add comment.
2420 2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2422 * lto.h (lto_parse_hex): Delete.
2423 * lto.c (lto_read_decls): Use 'int' for offsets.
2424 (lto_parse_hex): Make static and return proper 64-bit host type.
2425 (lto_resolution_read): Use proper 64-bit host type.
2427 2011-12-13 Richard Guenther <rguenther@suse.de>
2430 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2431 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2433 2011-12-01 Uros Bizjak <ubizjak@gmail.com>
2435 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2436 (ignore_attribute): New.
2438 2011-11-21 Aldy Hernandez <aldyh@redhat.com>
2440 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2441 (handle_transaction_pure_attribute): New.
2443 2011-11-03 Richard Guenther <rguenther@suse.de>
2446 * lto-lang.c (lto_post_options): Do not read file options.
2447 * lto.c (lto_read_all_file_options): Remove.
2448 (lto_init): Call lto_set_in_hooks here.
2450 2011-10-09 Jan Hubicka <jh@suse.cz>
2452 * lto.c (node_cmp, varpool_node_cmp): New functions.
2453 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2454 (cmp_partitions): Rename to ...
2455 (cmp_partitions_size): ... this one.
2456 (cmp_partitions_order): New function.
2457 (lto_wpa_write_files): Sort partitions by order when
2458 -fno-toplevel-reorder is used.
2460 2011-10-09 Andi Kleen <ak@linux.intel.com>
2462 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2464 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2466 * lto-lang.c (def_builtin_1): Delete old interface with two
2467 parallel arrays to hold standard builtin declarations, and replace
2468 it with a function based interface that can support creating
2469 builtins on the fly in the future. Change all uses, and poison
2470 the old names. Make sure 0 is not a legitimate builtin index.
2472 2011-10-02 Andi Kleen <ak@linux.intel.com>
2474 * lto-object.c (lto_obj_add_section_data): Add list.
2475 (lto_obj_add_section): Fill in list.
2476 (ltoobj_build_section_table): Pass through list.
2477 * lto.c (file_data_list): Declare.
2478 (create_subid_section_table): Pass arguments directly.
2479 Fill in list of file_datas.
2481 (lto_create_files_from_ids): Pass in direct arguments.
2482 Don't maintain list.
2483 (lto_file_read): Use explicit section and file data lists.
2484 (lto_read_all_file_options): Pass in section_list.
2485 * lto.h (lto_obj_build_section_table): Add list.
2486 (lto_section_slot): Add next.
2487 (lto_section_list): Declare.
2489 2011-10-02 Jan Hubicka <jh@suse.cz>
2492 * common.c (lto_resolution_str): Add new resolution.
2493 * common.h (lto_resolution_str): Likewise.
2495 2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2496 Andi Kleen <ak@linux.intel.com>
2499 * lto.c (lto_splay_tree_delete_id): New.
2500 (lto_splay_tree_compare_ids): Likewise.
2501 (lto_splay_tree_lookup): Likewise.
2502 (lto_splay_tree_id_equal_p): Likewise.
2503 (lto_splay_tree_insert): Likewise.
2504 (lto_splay_tree_new): Likewise.
2505 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2506 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2507 (create_subid_section_table): Use lto_splay_tree_lookup and
2508 lto_splay_tree_insert.
2509 (lto_file_read): Use lto_splay_tree_new.
2511 2011-09-26 Andi Kleen <ak@linux.intel.com>
2513 * lto.c (lto_resolution_read): Remove id dumping.
2514 (lto_section_with_id): Turn id HOST_WIDE_ID.
2515 (create_subid_section_table): Dito.
2517 2011-08-28 Dodji Seketeli <dodji@redhat.com>
2519 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2522 2011-08-11 Martin Jambor <mjambor@suse.cz>
2524 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2526 2011-08-08 Diego Novillo <dnovillo@google.com>
2528 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2529 * lto.c: Include tree-streamer.h.
2531 2011-07-06 Richard Guenther <rguenther@suse.de>
2533 * lto-lang.c (lto_init):
2534 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2536 2011-06-11 Jan Hubicka <jh@suse.cz>
2539 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2540 (lto_balanced_map): Likewise.
2542 2011-06-11 Jan Hubicka <jh@suse.cz>
2544 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2545 (add_cgraph_node_to_partition) ... here; walk aliases.
2546 (lto_1_to_1_map): Remove same body alias code.
2547 (promote_fn): Likewise.
2548 (lto_promote_cross_file_statics): Update comment.
2551 2011-06-07 Diego Novillo <dnovillo@google.com>
2553 * lto.c (uniquify_nodes): Move code to register decls to
2554 the loop that computes canonical types.
2556 2011-06-07 Richard Guenther <rguenther@suse.de>
2558 * lto-lang.c (lto_init): Do not set
2559 size_type_node or call set_sizetype.
2561 2011-06-04 Diego Novillo <dnovillo@google.com>
2563 * lto.c (lto_init): New.
2564 (lto_main): Call it.
2566 2011-06-03 Diego Novillo <dnovillo@google.com>
2568 * lto.c (get_resolution): Move from lto-streamer-in.c.
2569 (lto_register_var_decl_in_symtab): Likewise.
2570 (lto_register_function_decl_in_symtab): Likewise.
2571 (uniquify_nodes): Call lto_register_var_decl and
2572 lto_register_function_decl_in_symtab after reading a new
2573 VAR_DECL or FUNCTION_DECL.
2575 2011-06-01 Richard Guenther <rguenther@suse.de>
2577 * lto-lang.c (lto_register_canonical_types): New function.
2578 (lto_init): Register common nodes with the canonical type machinery.
2579 Do not play tricks with char_type_node.
2581 2011-05-26 Richard Guenther <rguenther@suse.de>
2583 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2585 2011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2587 * lto.c (lto_ft_typed): New function.
2588 (lto_ft_common): Call it.
2589 (lto_ft_constructor): Likewise.
2590 (lto_ft_expr): Likewise.
2591 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2594 2011-05-20 Richard Guenther <rguenther@suse.de>
2596 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2597 (lto_ft_type): Move main-variant and pointer-to chain building ...
2598 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2599 in a separate final loop.
2601 2011-05-19 Richard Guenther <rguenther@suse.de>
2603 * lto.c (uniquify_nodes): First register all types before
2604 fixing up the tree SCC.
2606 2011-05-11 Jan Hubicka <jh@suse.cz>
2609 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2611 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2613 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2614 location of binfo field.
2615 (lto_fixup_prevailing_decls): Likewise.
2617 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2619 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2620 build_function_type_array or build_varargs_function_type_array
2623 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2625 * lto-lang.c (global_bindings_p): Return bool.
2627 2011-05-07 Jan Hubicka <jh@suse.cz>
2629 * lto.c (lto_materialize_function): Use
2630 cgraph_function_with_gimple_body_p.
2631 (add_cgraph_node_to_partition): Do not re-add items to partition;
2633 (add_varpool_node_to_partition): Do not re-add items to partition.
2635 2011-05-03 Jan Hubicka <jh@suse.cz>
2637 * lto.c (free_ltrans_partitions): Fix accidental commit.
2639 2011-05-03 Jan Hubicka <jh@suse.cz>
2641 * lto.c (ltrans_partition_def): Remove GTY annotations.
2642 (ltrans_partitions): Move to heap.
2643 (new_partition): Update.
2644 (free_ltrans_partitions): New function.
2645 (lto_wpa_write_files): Use it.
2647 2011-04-29 Martin Jambor <mjambor@suse.cz>
2649 * lto.c: Include ipa-utils.h.
2650 (lto_balanced_map): Update call to ipa_reverse_postorder.
2651 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2653 2011-04-29 Michael Matz <matz@suse.de>
2655 * lto.c (toplevel): Include tree-flow.h.
2656 (lto_read_in_decl_state): Don't merge types here.
2657 (tree_with_vars): New static hash table.
2658 (remember_with_vars): New static functions.
2659 (LTO_FIXUP_TYPE): New macro.
2660 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2661 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2662 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2663 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2664 (lto_read_decls): Uniquify while reading in trees.
2665 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2666 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2667 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2668 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2669 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2670 lto_fixup_tree): Remove.
2671 (lto_fixup_state): Remove data argument. Use
2672 lto_symtab_prevailing_decl.
2673 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2674 (lto_fixup_prevailing_decls): New function.
2675 (lto_fixup_state_aux): Argument aux is unused.
2676 (lto_fixup_decls): Don't allocate pointer sets, don't use
2677 lto_fixup_tree, use lto_fixup_prevailing_decls.
2678 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2679 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2681 2011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2683 * lto.c (lto_balanced_map): Fix typos in head comment.
2684 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2687 2011-04-16 Jan Hubicka <jh@suse.cz>
2689 * lto.c (lto_balanced_map): Update.
2691 2011-04-14 Jan Hubicka <jh@suse.cz>
2693 * lto.c: Include ipa-inline.h
2694 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2696 (ipa_node_duplication_hook): Fix declaration.
2697 * Make-lang.in (lto.o): Update dependencies.
2699 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2701 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2703 * lto.c (lto_fixup_common): Likewise.
2705 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2707 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2708 (handle_type_generic_attribute): Likewise.
2710 2011-04-03 Michael Matz <matz@suse.de>
2712 * lto.c (lto_materialize_function): Don't read and then discard
2713 sections in WPA mode.
2714 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2716 * lto-lang.c (registered_builtin_fndecls): Remove.
2717 (lto_getdecls): Return NULL_TREE.
2718 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2720 2011-03-31 Richard Guenther <rguenther@suse.de>
2723 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2724 partitions when checking is not enabled.
2726 2011-03-25 Kai Tietz <ktietz@redhat.com>
2728 * lto.c (lto_resolution_read): Use filename_cmp instead
2730 (lto_read_section_data): Likewise.
2732 2011-03-25 Jeff Law <law@redhat.com>
2734 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2736 2011-03-21 Kai Tietz <ktietz@redhat.com>
2739 * lto-lang.c (lto_attribute_table): Adjust table.
2741 2011-02-18 Jakub Jelinek <jakub@redhat.com>
2744 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2747 2011-02-18 Richard Guenther <rguenther@suse.de>
2750 * lto-tree.h (lto_global_var_decls): Do not declare here.
2751 * lto-lang.c: Include lto-streamer.h.
2752 * Make-lang.in (lto-lang.o): Adjust dependencies.
2754 2011-02-10 Kai Tietz <kai.tietz@onevision.com>
2757 * lto.c (lto_read_section_data): Free
2758 fd_name in failure case.
2759 For mingw targets don't hash file-descriptor.
2760 (read_cgraph_and_symbols): Close current_lto_file
2763 2011-01-11 Jan Hubicka <jh@suse.cz>
2767 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2768 are not partitioned.
2770 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2772 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2775 2010-12-06 Richard Guenther <rguenther@suse.de>
2778 * lto-lang.c (lto_init): Give names to basic types.
2780 2010-11-30 Joseph Myers <joseph@codesourcery.com>
2782 * lto-object.c: Don't include toplev.h.
2783 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2785 2010-11-30 Joseph Myers <joseph@codesourcery.com>
2787 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2790 2010-11-29 Joseph Myers <joseph@codesourcery.com>
2792 * lto-endian.h: Delete.
2793 * lto-object.c: Don't include "libiberty.h".
2794 (O_BINARY): Don't define.
2795 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2796 (O_BINARY): Don't define.
2798 2010-11-23 Richard Guenther <rguenther@suse.de>
2800 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2802 2010-11-23 Richard Guenther <rguenther@suse.de>
2805 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2807 2010-11-17 Joseph Myers <joseph@codesourcery.com>
2809 * lto.c (lto_main): Take no arguments.
2810 * lto.h (lto_main): Update prototype.
2812 2010-11-16 Ian Lance Taylor <iant@google.com>
2814 * lto-object.c (lto_obj_file_open): Call
2815 simple_object_attributes_merge rather than
2816 simple_object_attributes_compare.
2818 2010-11-12 Joseph Myers <joseph@codesourcery.com>
2820 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2821 * lto-lang.c (lto_handle_option): Take location_t parameter.
2823 2010-11-10 Joseph Myers <joseph@codesourcery.com>
2825 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2826 letters and remove trailing '.'.
2827 (lto_file_finalize): Start diagnostic with a lowercase letter.
2829 2010-11-02 Ian Lance Taylor <iant@google.com>
2831 * lto-object.c: New file.
2832 * lto-elf.c: Remove file.
2833 * lto-macho.c: Remove file.
2834 * lto-macho.h: Remove file.
2835 * lto-coff.c: Remove file.
2836 * lto-coff.h: Remove file.
2837 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2839 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2840 (lto/lto-objfile.o): New target.
2841 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2842 (lto/lto.o): Remove $(LIBIBERTY_H).
2844 2010-10-22 Jan Hubicka <jh@suse.cz>
2846 * lto.c (add_cgraph_node_to_partition,
2847 add_varpool_node_to_partition): Add debug info.
2848 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2850 (do_whole_program_analysis): Set function flags before dumping.
2852 2010-10-22 Richard Guenther <rguenther@suse.de>
2854 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2855 the new gimple_register_canonical_type.
2857 2010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2860 * config-lang.in (boot_language): Set to $enable_lto.
2862 2010-10-18 Jakub Jelinek <jakub@redhat.com>
2865 * Make-lang.in (check-lto): New dummy target.
2867 2010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2869 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2871 2010-10-08 Joseph Myers <joseph@codesourcery.com>
2873 * lto-lang.c (lto_init_options): Change to
2874 lto_init_options_struct. Update parameters.
2875 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2876 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2878 2010-10-06 Jan Hubicka <jh@suse.cz>
2880 * lto.c (lto_balanced_map): Fix accounting of program size.
2882 2010-10-06 Jan Hubicka <jh@suse.cz>
2884 * lto.c (lto_balanced_map): Do not produce empty partitions.
2886 2010-10-06 Andi Kleen <ak@linux.intel.com>
2888 * lto.c (lto_process_name): Add.
2889 (lto_main): Call lto_process_name.
2891 2010-10-06 Jan Hubicka <jh@suse.cz>
2893 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2894 COMDATs required by the linker.
2896 2010-10-05 Ian Lance Taylor <iant@google.com>
2898 * lto.c (lto_section_with_id): Make s a const pointer.
2900 2010-10-05 Jan Hubicka <jh@suse.cz>
2902 * lto.c: Include params.h.
2903 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2904 refcounting in aux field.
2905 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2907 (lto_1_to_1_map): Simplify.
2908 (lto_balanced_map): New function.
2909 (do_whole_program_analysis): Chose proper partitioning alg.
2910 * Make-lang.in (lto.o): Add dependency on params.h
2912 2010-10-04 Andi Kleen <ak@linux.intel.com>
2914 * Make-lang.in (lto1): Add + to build rule.
2916 2010-10-03 Andi Kleen <ak@linux.intel.com>
2918 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2921 2010-09-28 Jan Hubicka <jh@suse.cz>
2923 * lto-lang.c (handle_leaf_attribute): New function.
2924 (lto_attribute_tables): Add leaf.
2926 2010-09-25 Jie Zhang <jie@codesourcery.com>
2928 * lto.c (lto_read_all_file_options): Start a new line after
2929 printing out file names.
2931 2010-09-24 Jan Hubicka <jh@suse.cz>
2933 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2935 2010-09-20 Jan Hubicka <jh@suse.cz>
2937 PR tree-optimize/45605
2938 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2940 2010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2942 * lto-elf.c (lto_obj_file_open): Also provide filename when
2945 2010-09-17 Jan Hubicka <jh@suse.cz>
2947 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2949 2010-09-17 Richard Guenther <rguenther@suse.de>
2951 * lang.opt (flag_wpa): Also enable for the driver.
2953 2010-09-16 Jan Hubicka <jh@suse.cz>
2955 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2958 2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2960 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2962 2010-09-08 Jan Hubicka <jh@suse.cz>
2964 * lto.c (real_file_count, real_file_decl_data): New static vars.
2965 (read_cgraph_and_symbols): Use it.
2967 2010-09-08 Richard Guenther <rguenther@suse.de>
2969 * lto.c (read_cgraph_and_symbols): Collect again after each
2972 2010-09-07 Jan Hubicka <jh@suse.cz>
2974 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2976 2010-09-03 Richard Guenther <rguenther@suse.de>
2978 * lto-elf.c (validate_file): Always error if validation fails.
2980 2010-08-20 Jan Hubicka <jh@suse.cz>
2982 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2983 (lto_wpa_write_files): Update comments.
2985 2010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2988 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2989 with has_analyzed_clone_p.
2991 2010-08-20 Jan Hubicka <jh@suse.cz>
2993 * lto.c (has_analyzed_clone_p): New function
2994 (lto_materialize_function): Use callgraph to determine if
2996 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2998 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3000 * lto.c: Use FOR_EACH_VEC_ELT.
3002 2010-07-27 Andi Kleen <ak@linux.intel.com>
3004 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3006 2010-07-27 Joseph Myers <joseph@codesourcery.com>
3008 * lto-lang.c (lto_handle_option): Update prototype and return
3009 value type. Remove duplicate assignment to result.
3011 2010-07-27 Joseph Myers <joseph@codesourcery.com>
3013 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3015 (lto_init_options): Update prototype.
3016 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3019 2010-07-10 Andi Kleen <ak@linux.intel.com>
3022 * lto.c: Include splay-tree.h
3023 (lto_resolution_read): Change to walk file_ids tree and parse
3024 extra file_id in resolution file.
3025 (lto_section_with_id): Add.
3026 (create_subid_section_table): Add.
3028 (lto_create_files_from_ids): Add.
3029 (lto_file_read): Change to handle sub file ids and create list
3030 of file_datas. Add output argument for count.
3031 (get_section_data): Pass file_data to lto_get_section_name.
3032 (lto_flatten_file): Add.
3033 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3035 2010-07-10 Andi Kleen <ak@linux.intel.com>
3037 * lto-coff.c (hash_name, eq_name): Move.
3038 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3039 * lto-elf.c: (hash_name, eq_name): Move.
3040 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3041 * lto-macho.c: (hash_name, eq_name): Move.
3042 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3043 * lto.c: (hash_name, eq_name): Move from lto-*.c
3044 (lto_obj_create_section_hash_table): Add.
3045 (free_with_string): Add.
3047 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3049 * lto-coff.c: Include diagnostic-core.h in every file that
3051 * lto-elf.c: Likewise.
3052 * lto-lang.c: Likewise.
3053 * lto-macho.c: Likewise.
3055 2010-07-07 Jakub Jelinek <jakub@redhat.com>
3057 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3058 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3061 2010-07-05 Jan Hubicka <jh@suse.cz>
3063 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3064 nodes from same comdat group as well as all comdat functions referenced
3066 (add_varpool_node_to_partition, add_references_to_partition): New
3068 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3069 add_varpool_node_to_partition; clear aux flags when done.
3070 (lto_promote_cross_file_statics): Do not promote stuff that gets
3071 duplicated to each ltrans.
3073 2010-07-04 Jan Hubicka <jh@suse.cz>
3075 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
3077 2010-06-13 Richard Guenther <rguenther@suse.de>
3079 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3081 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
3083 * lto.c (lto_resolution_read): Pre-initialize local variable r.
3084 * lto-coff.c (coff_write_object_file): Add braces to if.
3086 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3088 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3089 (lto_file_read): Likewise.
3090 (new_partition): Likewise.
3091 (read_cgraph_and_symbols): Likewise.
3093 2010-06-07 Joseph Myers <joseph@codesourcery.com>
3095 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3096 (lto_handle_option): Don't set flag_signed_char here.
3098 2010-06-04 Richard Guenther <rguenther@suse.de>
3101 * lto.c (lto_1_to_1_map): Use the proper file_data for
3104 2010-05-30 Jan Hubicka <jh@suse.cz>
3106 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3107 partitioning decisions.
3109 2010-05-29 Jan Hubicka <jh@suse.cz>
3111 * lto.c (bitmap vector): Remove.
3112 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3113 (ltrans_partition_def): New structure.
3114 (ltrans_partition): New type and VECtor.
3115 (new_partition): New function.
3116 (add_cgraph_node_to_partition): New function.
3117 (lto_1_to_1_map): Reorganize for partitions.
3118 (lto_add_inline_clones): Remove.
3119 (lto_add_all_inlinees): Remove.
3120 (lto_promote_cross_file_statics): Use partitions.
3121 (cmp_partitions): New function.
3122 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3123 use partitions; output files sorted by size.
3125 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3127 * Make-lang.in: Replace vec.h dependency with VEC_H.
3129 2010-05-28 Joseph Myers <joseph@codesourcery.com>
3131 * lto-coff.c (coff_errmsg): Remove.
3132 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3133 errors instead of coff_errmsg (-1).
3134 * lto-macho.c (mach_o_errmsg): Remove.
3135 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3136 instead of mach_o_errmsg (-1).
3137 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3140 2010-05-28 Richard Guenther <rguenther@suse.de>
3142 * lto.c (prefix_name_with_star): Removed.
3143 (strip_extension): Likewise.
3144 (get_filename_for_set): Likewise.
3145 (lto_write_ltrans_list): Fold into ...
3146 (lto_wpa_write_files): ... this. Name LTRANS units
3147 by suffixing the ltrans output list filename.
3148 (do_whole_program_analysis): Adjust.
3150 2010-05-27 Joseph Myers <joseph@codesourcery.com>
3152 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3153 (read_cgraph_and_symbols, lto_main): Use seen_error.
3154 * Make-lang.in (lto/lto.o): Update dependencies.
3156 2010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3159 * lto.h (lto_eh_personality): New prototype.
3160 * lto.c: Include debug.h.
3161 (first_personality_decl): New static variable.
3162 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3163 first function for which it is non-null.
3164 (lto_eh_personality_decl): New static variable.
3165 (lto_eh_personality): New function.
3166 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3167 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3169 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3171 * lto-lang.c: Do not include expr.h.
3173 2010-05-24 Richard Guenther <rguenther@suse.de>
3175 * lto-elf.c (lto_obj_build_section_table): Work around
3176 FreeBSD libelf issue.
3178 2010-05-22 Richard Guenther <rguenther@suse.de>
3180 * lto.c (read_cgraph_and_symbols): Do not collect.
3182 2010-05-20 Jan Hubicka <jh@suse.cz>
3184 * lto.c (promote_var, promote_fn): New functions.
3185 (lto_promote_cross_file_statics): Compute correctly boundary including
3186 static initializers of readonly vars.
3188 2010-05-18 Jan Hubicka <jh@suse.cz>
3190 * lto.c (lto_1_to_1_map): Partition non-inline clones.
3191 (lto_promote_cross_file_statics): Deal with non-inline clones.
3193 2010-05-18 Jan Hubicka <jh@suse.cz>
3195 * lto.c (lto_materialize_function): Announce function when
3196 reading body; allocate_struct_function only when reading body;
3197 do not finalize local statics; ggc_collect after reading;
3198 do not mark reachable node.
3199 (materialize_cgraph): Do not announce function.
3201 2010-05-11 Jan Hubicka <jh@suse.cz>
3203 * lto.c (materialize_cgraph): Revert my previous patch.
3205 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
3207 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3208 IMAGE_FILE_MACHINE_AMD64.
3209 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3211 2010-05-11 Jan Hubicka <jh@suse.cz>
3213 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3214 (materialize_cgraph): Add it here.
3216 2010-05-11 Jan Hubicka <jh@suse.cz>
3218 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3221 2010-05-11 Jan Hubicka <jh@suse.cz>
3223 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3224 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3225 use reachable_from_other_partition_p and
3226 referenced_from_other_partition_p test.
3228 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
3230 * lto-coff.c (validate_file): Add x64-coff support.
3231 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3232 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3233 * lto-lang.c (lto_build_c_type_nodes): Add check for
3234 'long long unsigned int' for x64-windows.
3235 (lto_init): Likewise.
3238 2010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3240 * lto.h (struct lto_file_struct): Document offset member.
3241 * lto-endian.h: New file.
3242 * lto-macho.h: New file.
3243 * lto-macho.c: New file.
3244 * Make-lang.in: Add rule for lto-macho.o.
3246 2010-05-07 Richard Guenther <rguenther@suse.de>
3250 * lang.opt (fresolution): Change to ...
3251 (fresolution=): ... this.
3252 * lto-lang.c (lto_handle_option): Adjust.
3254 2010-05-07 Richard Guenther <rguenther@suse.de>
3256 * lto.c (DUMPBASE_SUFFIX): Remove.
3257 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3259 (lto_write_ltrans_list): ... only output the list of ltrans files.
3260 (lto_maybe_unlink): Remove.
3261 (do_whole_program_analysis): Do not execute LTRANS phase
3264 2010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3266 * lto-lang.c (lto_handle_option): Add argument kind.
3268 2010-05-05 Jan Hubicka <jh@suse.cz>
3270 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3273 2010-05-05 Jan Hubicka <jh@suse.cz>
3275 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3277 2010-04-30 Jan Hubicka <jh@suse.cz>
3279 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3281 (lto_wpa_write_files): Write any non-empty partition.
3283 2010-04-30 Jan Hubicka <jh@suse.cz>
3285 * lto.c: Do not attempt to make constant pool references global.
3287 2010-04-28 Jan Hubicka <jh@suse.cz>
3289 * lto/lto.c (lto_read_in_decl_state): Use GGC.
3290 (lto_wpa_write_files): Announce what we are writting.
3291 (all_file_decl_data): New.
3292 (read_cgraph_and_symbols): Use GGC; correct timevars.
3293 (do_whole_program_analysis): Collect.
3294 * lto/Make-lang.in (lto.o): Fix dependency.
3295 * Makefile.in (GTFILES): Add lto-streamer.h.
3296 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3297 (varpool_assemble_pending_decls): Use VAROUT.
3298 * lto-streamer.h (lto_tree_ref_table): Annotate.
3299 (lto_in_decl_state): Annotate.
3300 (lto_file_decl_data): Annotate.
3302 2010-04-28 Jan Hubicka <jh@suse.cz>
3304 * lto.c (lto_varpool_node_sets): New.
3305 (lto_1_to_1_map): Partition varpool too.
3306 (globalize_context_t, globalize_cross_file_statics,
3307 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3308 lto_scan_statics_in_remaining_global_vars): Remove.
3309 (lto_promote_cross_file_statics): Rewrite.
3310 (get_filename_for_set): Take vset argument.
3311 (lto_wpa_write_files): Pass around vsets.
3313 2010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3316 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3317 hardcoding 'lto-elf.o'.
3318 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3320 * lto-coff.h: New file.
3321 * lto-coff.c: Likewise.
3323 2010-04-26 Richard Guenther <rguenther@suse.de>
3325 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3327 2010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3329 * lto.h (lto_elf_file_open): Rename prototype from this ...
3330 (lto_obj_file_open): ... to this.
3331 (lto_elf_file_close): Likewise ...
3332 (lto_obj_file_close): ... and likewise.
3333 (lto_elf_build_section_table): Likewise ...
3334 (lto_obj_build_section_table): ... and likewise.
3335 (lto_elf_begin_section): Likewise ...
3336 (lto_obj_begin_section): ... and likewise.
3337 (lto_elf_append_data): Likewise ...
3338 (lto_obj_append_data): ... and likewise.
3339 (lto_elf_end_section): Likewise ...
3340 (lto_obj_end_section): ... and likewise.
3341 * lto.c (lto_file_read): Update references to the above.
3342 (lto_wpa_write_files): Likewise.
3343 (lto_read_all_file_options): Likewise.
3344 (read_cgraph_and_symbols): Likewise.
3345 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3346 (LANG_HOOKS_APPEND_DATA): Likewise.
3347 (LANG_HOOKS_END_SECTION): Likewise.
3348 * lto-elf.c (lto_elf_file_open): Rename from this ...
3349 (lto_obj_file_open): ... to this, updating any references.
3350 (lto_elf_file_close): Likewise ...
3351 (lto_obj_file_close): ... and likewise.
3352 (lto_elf_build_section_table): Likewise ...
3353 (lto_obj_build_section_table): ... and likewise.
3354 (lto_elf_begin_section): Likewise ...
3355 (lto_obj_begin_section): ... and likewise.
3356 (lto_elf_append_data): Likewise ...
3357 (lto_obj_append_data): ... and likewise.
3358 (lto_elf_end_section): Likewise ...
3359 (lto_obj_end_section): ... and likewise.
3361 2010-04-21 Jan Hubicka <jh@suse.cz>
3363 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3364 (materialize_cgraph): Likewise.
3366 2010-04-21 Jan Hubicka <jh@suse.cz>
3368 * lto.c (lto_wpa_write_files): Update.
3369 (read_cgraph_and_symbols): Be more verbose.
3370 (materialize_cgraph): Likewise.
3371 (do_whole_program_analysis): Likewise.
3373 2010-04-21 Jan Hubicka <jh@suse.cz>
3375 * lto.c (globalize_cross_file_statics): When function has address taken,
3376 it needs to be public.
3378 2010-04-20 Jan Hubicka <jh@suse.cz>
3380 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3381 (lto_add_all_inlinees): Likewise.
3382 (lto_wpa_write_files): Likewise.
3384 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3386 * lto-lang.c (lto_init): Remove second argument in call to
3387 build_common_tree_nodes.
3389 2010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3391 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3394 2010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3397 * lto-elf.c: Define EM_* constants if not already defined.
3399 2010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3401 * lto-elf.c (is_compatible_architecture): New static function.
3402 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3404 2010-02-11 Richard Guenther <rguenther@suse.de>
3407 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3410 2010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3412 * lto.c (O_BINARY): Define.
3413 (lto_read_section_data): Open file in binary mode.
3414 * lto-elf.c (O_BINARY): Define.
3415 (lto_elf_file_open): Open file in binary mode.
3417 2010-01-08 Richard Guenther <rguenther@suse.de>
3420 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3421 (lto_init): Do not init char_type_node in a standard way
3422 but according to flag_signed_char.
3424 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3427 * lto.c (DUMPBASE_SUFFIX): New.
3428 (lto_execute_ltrans): Append a sequence number to -dumpbase
3431 2010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3434 * lto-elf.c (lto_elf_file_open): Stop if the command line
3435 option file is missing.
3437 2009-12-15 Richard Guenther <rguenther@suse.de>
3439 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3440 (lto_post_options): Do not disable debuginfo.
3442 2009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3444 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3446 2009-12-11 Richard Guenther <rguenther@suse.de>
3449 * lto.c (lto_resolution_read): Properly grow the vector.
3451 2009-12-11 Richard Guenther <rguenther@suse.de>
3454 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3455 to the C99 default. Do not set flag_unit_at_a_time.
3457 2009-11-28 Jakub Jelinek <jakub@redhat.com>
3459 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3462 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
3465 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3466 * lto.c (lto_parse_hex): New.
3467 (lto_resolution_read): Use lto_parse_hex.
3468 * lto.h (lto_parse_hex): New.
3470 2009-11-17 Rafael Avila de Espindola <espindola@google.com>
3472 * lto-elf.c (lto_file_init): Add offset argument.
3473 (lto_elf_file_open): Record the offset.
3474 * lto.c (lto_resolution_read): Change file_name into a lto_file
3475 argument. Check offsets.
3476 (lto_file_read): Update call to lto_resolution_read.
3477 * lto.h (lto_file_struct): Add the offset field.
3479 2009-11-16 Rafael Avila de Espindola <espindola@google.com>
3481 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3483 2009-11-14 Jan Hubicka <jh@suse.cz>
3485 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3487 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
3489 * lang.opt (fresolution): Renamed from resolution.
3490 * lto-lang.c (lto_handle_option): Handle new option name.
3491 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3493 2009-11-04 Richard Guenther <rguenther@suse.de>
3494 Rafael Avila de Espindola <espindola@google.com>
3496 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3497 (lto_elf_file_open): Handle offsets in arguments name@offest.
3499 2009-10-30 Richard Guenther <rguenther@suse.de>
3502 * lto.c (lto_file_read): Do not set file_data->fd.
3503 (lto_read_section_data): Use a single-entry file-descriptor cache.
3504 Do not check the result of xmalloc.
3505 (free_section_data): Do not use file_data->fd.
3506 (lto_read_all_file_options): Likewise.
3508 2009-10-22 Richard Guenther <rguenther@suse.de>
3510 * lto.c (lto_fixup_jump_functions): Remove.
3511 (lto_fixup_decls): Do not fixup jump functions.
3512 (read_cgraph_and_symbols): Schedule cgraph merging after
3513 summary reading. Schedule type and decl fixup before
3516 2009-10-22 Richard Guenther <rguenther@suse.de>
3518 * lto.c (lto_fixup_data_t): Remove free_list member.
3519 (lto_fixup_tree): Do not insert into free_list.
3520 (free_decl): Remove.
3521 (lto_fixup_decls): Remove free-list handling.
3523 2009-10-22 Jan Hubicka <jh@suse.cz>
3525 * lto.c (lto_fixup_jump_functions): New function.
3526 (lto_fixup_decls): Use it.
3528 2009-10-16 Richard Guenther <rguenther@suse.de>
3531 * lto.c (lto_fixup_tree): Revert last change.
3533 2009-10-14 Richard Guenther <rguenther@suse.de>
3535 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3536 compatible with the one we replace wrap it around a
3539 2009-10-09 Richard Guenther <rguenther@suse.de>
3543 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3545 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3546 (init_ehdr##BITS): Likewise.
3548 2009-10-08 Joseph Myers <joseph@codesourcery.com>
3550 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3551 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3553 * lto-lang.c (lto_post_options): Remove trailing "." from
3556 2009-10-08 Richard Guenther <rguenther@suse.de>
3558 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3561 2009-10-07 Joseph Myers <joseph@codesourcery.com>
3563 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3565 2009-10-07 Jan Hubicka <jh@suse.cz>
3567 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3568 ltrans stage; explain why this is needed and should not.
3570 2009-10-05 Richard Guenther <rguenther@suse.de>
3574 * lto.c (lto_read_decls): Do not register deferred decls.
3575 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3576 until after reading the IPA summaries.
3578 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
3580 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3581 (lto-lang.c): Don't include lto/common.h.
3583 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
3585 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3586 (lto/common.o): Remove.
3588 * common.h (lto_kind_str): Remove.
3589 (lto_visibility_str): Remove.
3590 (lto_resolution_str): Make it static.
3592 2009-10-01 Diego Novillo <dnovillo@google.com>
3594 * lto.c (lto_read_decls): Add comment.
3595 Call internal_error instead of gcc_assert.
3596 (lto_resolution_read): Likewise.
3597 (lto_add_all_inlinees): Tidy.
3598 * Make-lang.in: Fix copyright boilerplate.
3600 (lto.install-pdf): New.
3601 * lto-tree.h: Fix copyright boilerplate.
3602 * lang-specs.h: Likewise.
3603 Remove ".lto" entry from compilers fragment.
3604 * lto-elf.c: Move inclusion of gelf.h after config.h.
3605 Tidy formatting everywhere.
3606 * lto.h: Fix copyright boilerplate.
3607 Tidy formatting everywhere.
3608 * common.c: Likewise.
3609 * config-lang.in: Likewise.
3610 * common.h: Likewise.
3611 * lto-lang.c: Likewise.
3613 2009-10-01 Richard Guenther <rguenther@suse.de>
3615 * lto.c (lto_read_section_data): Use plain lseek/read.
3617 2009-10-01 Richard Guenther <rguenther@suse.de>
3619 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3620 use sysconf to query the system page size.
3621 (lto_file_read): Implement fallback using stdio.
3622 (free_section_data): Likewise.
3624 2009-09-29 Diego Novillo <dnovillo@google.com>
3626 * lto-lang.c (lto_init): Really fix call to
3627 build_common_builtin_nodes.
3629 2009-09-29 Diego Novillo <dnovillo@google.com>
3631 * lto-lang.c (lto_init): Fix call to
3632 build_common_builtin_nodes.
3634 2009-09-29 Richard Guenther <rguenther@suse.de>
3637 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3639 (first_data_block): New static variable.
3640 (lto_elf_append_data): Align the first data block in each
3643 2009-09-28 Diego Novillo <dnovillo@google.com>
3645 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3646 * lto.c (strip_extension): New.
3647 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3648 (lto_execute_ltrans): Tidy.
3649 Do not pass -fwpa nor -fltrans-* to LTRANS.
3650 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3651 * tree.c (need_assembler_name_p): Call
3652 lang_hooks.decls.may_need_assembler_name_p if set.
3653 * varasm.c (default_binds_local_p_1): Remove check for
3655 * varpool.c (decide_is_variable_needed): Do not test for
3658 2009-09-22 Richard Guenther <rguenther@suse.de>
3661 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3662 * Make-lang.in: Remove ltrans-driver stuff.
3663 * config-lang.in: Likewise.
3664 * lang.opt (fltrans-driver): Remove.
3665 * lto-lang.c (lto_init_options): Remove code initializing
3667 * ltrans-driver: Remove.
3669 2009-09-21 Diego Novillo <dnovillo@google.com>
3671 * lto-lang.c (lto_define_builtins): Remove superfluous
3672 calls to targetm.init_builtins and build_common_builtin_nodes.
3673 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3674 build_common_builtin_nodes.
3675 * lto.c (lto_materialize_function): Do nothing if NODE is a
3678 2009-09-03 Diego Novillo <dnovillo@google.com>
3680 * lto-elf.c (validate_file): Replace call to
3681 elf_getshstrndx with call to elf_getshdrstrndx.
3683 2009-08-19 Richard Guenther <rguenther@suse.de>
3685 * lto-lang.c (lto_init): Merge char_type_node with the
3686 appropriately signed variant.
3688 2009-08-19 Richard Guenther <rguenther@suse.de>
3691 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3692 (lto_fixup_type): Re-build the pointer-to chain part two.
3694 2009-08-19 Richard Guenther <rguenther@suse.de>
3697 * lto.c (lto_fixup_type): Re-build the type variant chain.
3699 2009-08-19 Richard Guenther <rguenther@suse.de>
3702 * lto.c (lto_fixup_constructor): New function.
3703 (lto_fixup_tree): Replace all types. Properly fixup
3704 constructors and constants.
3706 2009-08-14 Richard Guenther <rguenther@suse.de>
3708 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3709 for DECL_LANG_SPECIFIC.
3711 2009-08-13 Richard Guenther <rguenther@suse.de>
3714 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3716 2009-07-30 Richard Guenther <rguenther@suse.de>
3719 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3720 the largest decl for output and free TREE_CHAIN for further
3723 2009-07-24 Diego Novillo <dnovillo@google.com>
3725 * Make-lang.in: Add empty lto.install-plugin target.
3727 2009-07-13 Diego Novillo <dnovillo@google.com>
3729 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3731 2009-07-11 Richard Guenther <rguenther@suse.de>
3733 * lto-lang.c (lto_write_globals): Wrapup global decls.
3735 2009-07-10 Richard Guenther <rguenther@suse.de>
3737 * lto-lang.c (lto_init): Allocate one more location to make
3738 BUILTINS_LOCATION correct.
3740 2009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3742 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3744 2009-07-06 Diego Novillo <dnovillo@google.com>
3746 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3749 2009-07-06 Diego Novillo <dnovillo@google.com>
3751 * lto.c (preload_common_nodes): Remove.
3752 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3753 (lto_read_decls): Call lto_data_in_create and
3755 (free_decl): Do not call ggc_free.
3756 (lto_main): Call lto_init_reader.
3757 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3758 (lto_init): Initialize main_identifier_node if needed.
3759 Make ptrdiff_type_node be integer_type_node.
3761 2009-06-19 Diego Novillo <dnovillo@google.com>
3763 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3764 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3765 Remove code guarded by #ifdef LOCAL_TRACE.
3767 2009-06-18 Diego Novillo <dnovillo@google.com>
3769 * lto.c: Update license to GPLv3.
3770 * lto-elf.c: Likewise.
3771 * common.c: Likewise.
3772 * lto-lang.c: Likewise.
3773 * lto.h: Remove superfluous include files. Update all
3776 2009-06-17 Diego Novillo <dnovillo@google.com>
3778 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3780 2009-06-02 Diego Novillo <dnovillo@google.com>
3782 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3784 (materialize_cgraph): Only materialize nodes that have a
3785 representation on file.
3787 2009-06-01 Diego Novillo <dnovillo@google.com>
3789 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3791 2009-05-31 Diego Novillo <dnovillo@google.com>
3793 * lto-lang.c (lto_type_for_mode): Handle all the modes
3794 handled in c_common_type_for_mode.
3796 2009-05-21 Diego Novillo <dnovillo@google.com>
3798 * lto-elf.c: Always include <gelf.h>.
3799 * config-lang.in (target_libs): Remove.
3800 (build_by_default): Set to no.
3802 2009-05-15 Diego Novillo <dnovillo@google.com>
3804 * lto.c (lto_materialize_function): Assert that DECL is
3806 (materialize_cgraph): Don't try to materialize builtin
3808 * lto-section-out.c (write_symbol_vec): Do not write
3811 2009-05-13 Diego Novillo <dnovillo@google.com>
3813 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3815 2009-05-07 Diego Novillo <dnovillo@google.com>
3817 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3818 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3819 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3820 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3821 (lto_fixup_tree): Call gimple_register_type when *TP is a
3823 (lto_main): Call bitmap_obstack_initialize.
3825 2009-04-22 Diego Novillo <dnovillo@google.com>
3827 * lto.c (free_section_data): Tidy.
3828 (lto_1_to_1_map): Tidy.
3829 (lto_add_all_inlinees): Tidy.
3830 (prefix_name_with_star): New.
3831 (get_filename_for_set): New.
3832 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3833 to determine what cgraph node sets to write.
3834 Call get_filename_for_set to compute temporary file
3836 (lto_execute_ltrans): Do not execute LTRANS on files with
3837 names that start with '*'.
3838 Move logic to execute LTRANS together so that LTRANS is
3839 invoked only if there are any files to compile.
3840 (do_whole_program_analysis): Only remove output files
3841 that do not start with '*'.
3843 2009-04-06 Diego Novillo <dnovillo@google.com>
3845 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3846 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3847 (lto_add_all_inlinees): Tidy.
3849 2009-03-26 Diego Novillo <dnovillo@google.com>
3851 * lto.c: Include gimple.h.
3852 (lto_read_in_decl_state): Call gimple_register_type for
3853 every type in every stream.
3854 (lto_fixup_common): Call gimple_register_type if T has a
3856 (do_whole_program_analysis): Call print_lto_report.
3857 (lto_main): Call print_lto_report after cgraph_optimize.
3858 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3860 2009-03-24 Diego Novillo <dnovillo@google.com>
3862 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3863 (lto.o): Add dependency on GIMPLE_H.
3865 2009-03-10 Simon Baldwin <simonb@google.com>
3867 * lto.c (lto_read_all_file_options): Close any open file descriptor
3868 contained in file_data before freeing.
3870 2009-02-24 Rafael Avila de Espindola <espindola@google.com>
3872 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3873 for a decl in the original bitmap, not a node.
3874 (lto_add_all_inlinees): Remove original nodes that are not needed.
3875 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3877 2009-02-24 Diego Novillo <dnovillo@google.com>
3879 * lto.c (lto_materialize_function): Update
3880 lto_stats.num_function_bodies.
3881 (get_section_data): Initialize *LEN to 0.
3882 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3883 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3884 Update lto_stats.num_output_files.
3885 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3886 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3887 (lto_main): Initialize lto_stats.
3888 If flag_lto_report is set, call print_lto_report.
3890 2009-02-19 Diego Novillo <dnovillo@google.com>
3894 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3896 * lto.c (lto_add_inline_clones): Don't add the
3897 master clone. Check for a decl in the original
3899 (lto_add_all_inlinees): Remove original nodes
3900 that are not needed.
3901 (lto_scan_statics_in_cgraph_node): Don't care if
3902 the node is the master.
3903 (lto_promote_cross_file_statics): Use a new
3904 context.seen_node_decls for each set
3906 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3908 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3909 for a decl in the original bitmap, not a node.
3910 (lto_add_all_inlinees): Remove original nodes that are not needed.
3911 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3912 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3915 2009-02-18 Diego Novillo <dnovillo@google.com>
3917 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3918 and TV_WHOPR_WPA_IO.
3919 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3920 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3921 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3922 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3923 depending on command line flags.
3924 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3925 (lto_main): Remove timer uses.
3927 2009-02-18 Rafael Avila de Espindola <espindola@google.com>
3929 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3930 (lto_wpa_write_files): Update calls to renamed functions.
3932 2009-02-17 Diego Novillo <dnovillo@google.com>
3935 * lto-lang.c (lto_post_options): Disable -fwhole-program
3936 when running LTRANS.
3938 2009-02-10 Diego Novillo <dnovillo@google.com>
3940 * lto.c (read_cgraph_and_symbols): Fix comment.
3942 2009-02-10 Diego Novillo <dnovillo@google.com>
3944 * lto.c (read_cgraph_and_symbols): Read options from all
3947 2009-02-10 Diego Novillo <dnovillo@google.com>
3949 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3950 (materialize_cgraph): Likewise.
3951 (do_whole_program_analysis): Likewise.
3952 (lto_main): Call read_cgraph_and_symbols,
3953 materialize_cgraph and do_whole_program_analysis.
3955 2009-02-10 Simon Baldwin <simonb@google.com>
3957 * lto.c: Include lto-opts.h.
3958 * (lto_main): Clear file options at loop start, read any saved
3959 options from the first file handled, and re-issue options.
3960 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3962 2009-02-02 Diego Novillo <dnovillo@google.com>
3964 * lto.c (lto_main): Stop LTO_TIMER and use
3965 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3967 2009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3970 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3973 2009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3975 * Make-lang.in (LTO_EXE): Link with all
3976 BACKENDLIBS and not only GMPLIBS
3978 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3981 * lto-elf.c: Include gelf.h instead of libelf.h.
3982 (lto_elf_file_close): Replace elfx_update_shstrndx with
3983 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3986 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3989 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3991 2009-01-26 Diego Novillo <dnovillo@google.com>
3993 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3995 2009-01-26 Diego Novillo <dnovillo@google.com>
3997 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3998 and rename into gimple_types_compatible_p.
4000 2009-01-12 Rafael Avila de Espindola <espindola@google.com>
4002 * lto-lang.c (lang_hooks): Remove the const qualifier.
4004 2009-01-06 Diego Novillo <dnovillo@google.com>
4006 * ltrans-driver: Mark 'all' target as phony.
4008 2008-12-31 Diego Novillo <dnovillo@google.com>
4010 * ltrans-driver: Execute a NOP action for target 'all'.
4012 2008-12-19 Diego Novillo <dnovillo@google.com>
4014 * lto.c (lto_1_to_1_map): Tidy.
4016 2008-12-19 Diego Novillo <dnovillo@google.com>
4018 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4019 be opened, show its name.
4020 * ltrans-driver: If $verbose is set, do not use parallelism.
4022 2008-12-17 Rafael Avila de Espindola <espindola@google.com>
4024 * lto.c (lto_fixup_function): New.
4025 (lto_fixup_tree): Call lto_fixup_function.
4027 2008-12-14 Doug Kwan <dougkwan@google.com>
4029 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4030 variables if there is no function.
4032 2008-12-10 Simon Baldwin <simonb@google.com>
4034 * ltrans-driver: Always run make in silent mode, to avoid make's
4035 trace on stdout interfering with lto-wrapper output.
4037 2008-12-10 Doug Kwan <dougkwan@google.com>
4039 * lto.c (lto_add_inline_clones): Do not force master clones of
4040 inlined functions already in SET to be static inline.
4042 2008-12-04 Doug Kwan <dougkwan@google.com>
4044 * lto.c (globalize_context_t): New type to store states in
4045 globalization of cross-file statics.
4046 (globalize_cross_file_statics): New.
4047 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4048 static decls that need to be fixed up.
4049 (lto_scan_statics_in_cgraph_node): Change call interface to use
4050 a globalize_context_t CONTEXT for all states used.
4051 (lto_scan_statics_in_remaining_global_vars): New.
4052 (lto_promote_cross_file_statics): Use new call interface of
4053 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4054 visible vars in the last set.
4056 2008-12-03 Diego Novillo <dnovillo@google.com>
4058 * lto.c (lto_fixup_tree): Do not emit an error when
4059 PREVAILING throw but T doesn't.
4061 2008-12-02 Doug Kwan <dougkwan@google.com>
4063 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4065 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4066 variables and functions.
4067 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4068 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4070 2008-11-29 Diego Novillo <dnovillo@google.com>
4072 * lto.c: Include timevar.h.
4073 (lto_materialize_function): Tidy. Add comments.
4074 (lto_wpa_write_files): Tidy.
4075 (lto_execute_ltrans): Tidy.
4076 (lto_main): Add local variable LTO_TIMER. Initialize it
4077 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4078 Start and stop the timer.
4080 * Make-lang.in (lto.o): Add dependency on timevar.h.
4081 * ltrans-driver: React to -v and -save-temps.
4082 Use simple heuristic to determine how much parallelism to
4083 use when executing make.
4085 2008-11-12 Doug Kwan <dougkwan@google.com>
4087 * lto.c (lto_bitmap_obstack): Remove var.
4088 (lto_materialize_function): Do nothing instead of marking function
4089 body in file if flag_wpa is true.
4090 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4091 (lto_scan_statics_in_cgraph_node): New function.
4092 (lto_promote_cross_file_statics): Same.
4093 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4094 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4095 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4097 2008-11-09 Diego Novillo <dnovillo@google.com>
4099 * lto/lto.c (lto_fixup_tree): Change error message locus
4100 information to include location of mismatching
4102 Use TREE_NO_WARNING to avoid repeated messages.
4103 (lto_main): If lto_fixup_decls emitted any errors, exit.
4104 * lto/lto-lang.c: Don't include libfuncs.h and except.h
4105 (lto_init_options): Don't enable exceptions by default.
4106 (lto_eh_runtime_type): Move to lto-function-in.c
4107 (lto_init_eh): Likewise.
4108 (lto_init): Don't call lto_init_eh.
4109 * lto/Make-lang.in (lto-lang.o): Remove dependency on
4110 libfuncs.h and except.h.
4112 2008-10-30 Diego Novillo <dnovillo@google.com>
4114 * lto.c (lto_read_decls): Declare debug_main only if
4115 LTO_STREAM_DEBUGGING is enabled.
4117 2008-10-30 Simon Baldwin <simonb@google.com>
4119 * lto.c (lto_wpa_write_files): Create intermediate files with
4120 make_cwd_temp_file().
4121 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4122 WPA_SAVE_LTRANS is set.
4123 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4124 * ltrans-driver: Do not strip directory from output files.
4126 2008-10-29 Doug Kwan <dougkwan@google.com>
4128 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4130 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4131 (lto/lto-symtab.o): Remove rule.
4132 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4133 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4134 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4136 lto-symtab.c (File): Move up one level.
4137 lto-lang.c (cgraph.h): Remove include.
4138 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4139 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4140 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4142 2008-10-24 Rafael Espindola <espindola@google.com>
4144 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4145 non prevailing weak symbols.
4147 2008-10-24 Rafael Espindola <espindola@google.com>
4149 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4151 2008-10-24 Rafael Espindola <espindola@google.com>
4153 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4156 2008-10-23 Simon Baldwin <simonb@google.com>
4158 * lto-lang.c (input_node): Save the node reference, rather than the
4159 node pointer, in node->inlined_to.
4160 (input_cgraph_1): Convert node references into node pointers.
4162 2008-10-22 Diego Novillo <dnovillo@google.com>
4163 Rafael Espindola <espindola@google.com>
4165 * lto.c (lto_resolution_read): Tidy.
4166 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4167 abort if RET is NULL.
4169 2008-10-22 Doug Kwan <dougkwan@google.com>
4171 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4172 exceptions flag is given.
4173 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4174 (lto_init_eh): Remove exceptions flag initialization.
4175 (lto_init): Only call lto_init_eh if exceptions flag is set.
4177 2008-10-21 Diego Novillo <dnovillo@google.com>
4179 * lto.c: Tidy some formatting.
4182 2008-10-21 Simon Baldwin <simonb@google.com>
4184 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4185 them is NULL (but not the other).
4187 2008-10-17 Diego Novillo <dnovillo@google.com>
4189 * ltrans-driver: Divert output from make to a temporary file.
4190 Show it if the call to make failed.
4192 2008-10-15 Diego Novillo <dnovillo@google.com>
4194 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4195 Do not print TEMP_FILENAME
4196 * ltrans-driver: Call make with -s.
4198 2008-10-15 Diego Novillo <dnovillo@google.com>
4200 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4201 TREE_STATIC on global symbols.
4203 2008-10-14 Ollie Wild <aaw@google.com>
4205 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4206 (LTRANS_DRIVER_EXE): Add.
4207 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4208 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4209 (lto.install.common): Remove ltrans-driver.
4210 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4211 (LTRANS_DRIVER_EXE): New build rule.
4212 * config-lang.in (compilers): Add ltrans-driver.
4214 2008-10-14 Diego Novillo <dnovillo@google.com>
4216 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4219 2008-10-13 Ollie Wild <aaw@google.com>
4221 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4222 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4223 * ltrans-driver (LTRANS_FLAGS): Remove.
4225 2008-10-08 Doug Kwan <dougkwan@google.com>
4227 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4228 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4229 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4230 from lto_fixup_state to here.
4231 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4232 just a free-list. Fix up types also. Move decl merging code to
4234 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4236 (lto_fixup_decls): Use another pointer set to avoid multiple
4237 walking of nodes except for DECLs to be replaced. Pass an
4238 lto_fixup_data_t object to tree-walker.
4240 2008-10-08 Rafael Espindola <espindola@google.com>
4242 * lto-symtab.c (lto_symtab_set_resolution): New.
4243 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4244 lto_symtab_get_resolution.
4245 (lto_symtab_prevailing_decl): Return decl for non public decls.
4246 (lto_symtab_get_resolution): New.
4247 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4249 2008-10-06 Rafael Espindola <espindola@google.com>
4251 * lto-lang.c: Include cgraph.h.
4252 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4253 input_cgraph): Moved from lto-cgraph.c.
4254 (LANG_HOOKS_INPUT_CGRAPH): New.
4256 2008-10-03 Rafael Espindola <espindola@google.com>
4258 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4260 2008-10-03 Rafael Espindola <espindola@google.com>
4262 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4263 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4264 prevailing definition. Don't mark TREE_NOTHROW differences.
4265 * lto.c (lto_fixup_tree): New.
4266 (lto_fixup_state): New.
4267 (lto_fixup_state_aux): New.
4269 (lto_fixup_decls): New.
4270 (lto_main): Call lto_fixup_decls.
4272 2008-10-02 Ollie Wild <aaw@google.com>
4274 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4276 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4277 * lto-lang.c (lto_post_options): Add validation and fixups for
4280 2008-10-02 Rafael Espindola <espindola@google.com>
4282 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4283 lto_symtab_merge_decl): Return void.
4284 (lto_symtab_prevailing_decl): New.
4286 2008-09-30 Rafael Espindola <espindola@google.com>
4288 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4290 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4291 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4292 Check for already defined symbols.
4293 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4294 (LTO_IDENTIFIER_RESOLUTION): Remove.
4295 (LTO_DECL_RESOLUTION): New.
4297 2008-09-30 Rafael Espindola <espindola@google.com>
4299 * lto.c (lto_read_decls): Use new input_tree signature.
4301 2008-09-26 Doug Kwan <dougkwan@google.com>
4303 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4304 bodies affected by exception attribute merging of DECLs.
4305 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4308 2008-09-25 Rafael Espindola <espindola@google.com>
4310 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4311 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4312 * lto-symtab.c (lto_symtab_compatible): New.
4313 (lto_symtab_overwrite_decl): New.
4314 (lto_symtab_merge_decl): Refactor to use the above functions
4315 and the resolution from lang_identifier.
4316 * lto-tree.h: Include plugin-api.h.
4317 (lang_identifier): Add resolution.
4318 (LTO_IDENTIFIER_RESOLUTION): New.
4320 2008-09-25 Ollie Wild <aaw@google.com>
4322 * lang.opt (fltrans-output-list=): New option.
4323 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4325 2008-09-25 Rafael Espindola <espindola@google.com>
4327 * lto.c (lto_resolution_read): Initialize ret;
4329 2008-09-24 Ollie Wild <aaw@google.com>
4331 * lto.c (sys/mman.h): Move include.
4332 (lto_wpa_write_files): Return a list of written files.
4333 (lto_execute_ltrans): New function.
4334 (lto_main): Call lto_execute_ltrans.
4335 (ltrans-driver): New file.
4336 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4337 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4338 (lto_init_options): Initialize ltrans_driver.
4339 (lto_handle_option): Fix incorrect default output value.
4340 * lang.opt (fltrans-driver=): New option.
4341 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4342 (lto.install-common): Add lto/ltrans-driver.
4344 2008-09-24 Rafael Espindola <espindola@google.com>
4346 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4347 (lto/lto.o): Depend on lto/common.h.
4348 (lto/common.o): New.
4349 * lang.opt (resolution): New.
4350 * lto-lang.c (resolution_file_name): New.
4351 (lto_handle_option): Handle OPT_resolution.
4352 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4353 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4354 pass it to lto_symtab_merge_decl.
4355 * lto.c: Include common.h.
4356 (lto_read_decls): Add resolutions and resolutions_size arguments.
4357 Initialize data_in.globals_resolution and
4358 data_in.globals_resolution_size.
4359 (index_and_symbol_resolution): New.
4360 (lto_resolution_read): New.
4361 (lto_file_read): Add argument resolution_file.
4363 * lto.h (resolution_file_name): New.
4365 2008-09-23 Rafael Espindola <espindola@google.com>
4367 * common.c: Update description.
4368 * common.h: Update description.
4370 2008-09-23 Rafael Espindola <espindola@google.com>
4372 * common.c: Moved from lto-plugin.
4373 * common.h: Moved from lto-plugin.
4375 2008-09-22 Doug Kwan <dougkwan@google.com>
4377 * lto.c (VEC(bitmap,heap)): Declare.
4378 (lto_materialize_function): Handle WAP mode specially.
4379 (lto_add_inline_clones): New.
4380 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4381 return a bitmap of inlined decls.
4382 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4383 (lto_main): Call reset_inline_failed to reset inlining states.
4384 Check call-graph after WPA inlining.
4385 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4388 2008-09-19 Doug Kwan <dougkwan@google.com>
4390 lto.c (lto_main): Remove unsued wrapper code.
4391 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4393 2008-09-19 Rafael Espindola <espindola@google.com>
4395 * lto-symtab.c: Include lto-tree-in.h.
4396 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4397 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4398 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4400 2008-09-17 Paolo Bonzini <bonzini@gnu.org>
4401 Rafael Avila de Espindola <espindola@google.com>
4403 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4404 COMPOUND_LITERAL_EXPR_DECL): Remove.
4405 (emit_local_var): Remove.
4406 (lto_expand_expr): Remove.
4407 (lto_staticp): Remove.
4408 (LANG_HOOKS_EXPAND_EXPR): Remove.
4409 (LANG_HOOKS_STATICP): Remove.
4411 2008-09-11 Diego Novillo <dnovillo@google.com>
4413 * lto-lang.c: Include except.h and libfuncs.h.
4415 (lto_init): Call it.
4416 Set flag_generate_lto to 0.
4417 * Make-lang.in (lto-lang.o): Add dependency on except.h
4420 2008-09-09 Bill Maddox <maddox@google.com>
4422 * lto-lang.c: Include header file expr.h.
4423 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4424 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4425 (emit_local_var): Copied from c-semantics.c.
4426 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4427 and c_staticp in c-common.c.
4428 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4430 2008-09-08 Diego Novillo <dnovillo@google.com>
4432 * lto-lang.c (lto_global_bindings_p): Return 1 during
4435 2008-09-07 Diego Novillo <dnovillo@google.com>
4437 * lto.c: Tidy formatting.
4439 2008-08-04 Bill Maddox <maddox@google.com>
4441 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4443 2008-09-03 Doug Kwan <dougkwan@google.com>
4445 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4446 CIF_OK instead of NULL.
4448 2008-09-02 Diego Novillo <dnovillo@google.com>
4449 Simon Baldwin <simonb@google.com>
4451 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4452 c_common_type_for_size.
4453 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4454 (lto_init): Call linemap_add.
4455 (signed_and_unsigned_types): Remove.
4457 2008-08-29 Diego Novillo <dnovillo@google.com>
4459 * lto-lang.c (handle_noreturn_attribute): New local function.
4460 (handle_const_attribute): New local function.
4461 (handle_malloc_attribute): New local function.
4462 (handle_pure_attribute): New local function.
4463 (handle_novops_attribute): New local function.
4464 (handle_nonnull_attribute): New local function.
4465 (handle_nothrow_attribute): New local function.
4466 (handle_sentinel_attribute): New local function.
4467 (handle_type_generic_attribute): New local function.
4468 (handle_format_attribute): New local function.
4469 (handle_format_arg_attribute): New local function.
4470 (lto_attribute_table): Declare.
4471 (lto_format_attribute_table): Declare.
4472 (lto_init_attributes): New local function.
4473 (lto_define_builtins): Call it.
4474 Call targetm.init_builtins and build_common_builtin_nodes.
4475 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4476 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4478 2008-08-28 Diego Novillo <dnovillo@google.com>
4480 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4482 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4483 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4484 * lto-symtab.c: Include gimple.h.
4485 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4488 2008-08-27 Doug Kwan <dougkwan@google.com>
4490 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4491 gt-lto-lto.h): New includes.
4492 (lto_materialize_function): Do not read in function body in WPA mode.
4493 Format a line to fit in 80 columns.
4494 (lto_cgraph_node_sets): New garbage collected variable.
4495 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4497 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4498 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4499 variable LTO_SECTION_IN_H.
4500 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4501 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4502 with variable LTO_SECTION_IN_H.
4503 * config-lang.in (gtfiles): Add lto/lto.c.
4504 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4505 merged DECL_RESULT correctly.
4507 2008-08-26 Bill Maddox <maddox@google.com>
4509 * lto-lang.c Include tree-gimple.h.
4510 (lto_mark_addressable): Call mark_addressable rather than
4512 (lto_post_options): Suppress debug info generation.
4513 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4515 2008-08-25 Bill Maddox <maddox@google.com>
4517 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4518 assertion and leave an explanatory comment in its place.
4520 2008-08-21 Doug Kwan <dougkwan@google.com>
4522 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4523 of common nodes instead of computing locallly.
4524 (lto_read_in_decl_state): New.
4525 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4526 Read global and per-function in-decl states.
4527 * Make-lang.in (LTO_H): Update dependency.
4529 (lto-symtab.c): Merge (revision 139039)
4530 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4532 2008-08-21 Rafael Espindola <espindola@google.com>
4534 * config-lang.in (target_libs): New.
4536 2008-08-20 Bill Maddox <maddox@google.com>
4538 * lto.c (current_lto_file): Remove GTY marker from static
4539 variable. Remove include of file gt-lto-lto.h.
4540 * Make-lang.in: Remove dependency of lto/lto.o on
4542 * lto-elf.c (lto_file_close): Removed.
4543 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4544 allocate lto_elf_file object.
4545 (lto_elf_file_close): Free lto_elf_file object after close.
4546 * lto.h (struct lto_file_struct): Remove GTY marker.
4547 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4550 2008-08-20 Bill Maddox <maddox@google.com>
4552 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4553 to conform to its new signature.
4554 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4555 on discarded node here, now called in global_vector_fixup.
4557 2008-08-09 Bill Maddox <maddox@google.com>
4559 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4560 has not been set to a front-end-specific value.
4562 2008-08-05 Doug Kwan <dougkwan@google.com>
4564 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4567 2008-07-30 Bill Maddox <maddox@google.com>
4569 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4570 Remove obsolete comments.
4571 (lto_read_decls): Remove initialization of deleted field data_in.global.
4573 (lto_main): Remove redundant initialization of section_hash_table.
4574 * lto-elf.c: Removed obsolete comments.
4575 * lto.h: Tidy up comments.
4576 * lto-symtab.c (lto_least_common_multiple): New function.
4577 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4580 2008-07-25 Diego Novillo <dnovillo@google.com>
4581 Bill Maddox <maddox@google.com>
4583 * lto.c: Re-order include files.
4584 Include lto-section-out.h.
4585 (preload_common_nodes): Add debugging output.
4586 Add new local INDEX_TABLE.
4587 Call preload_common_node.
4588 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4590 2008-07-13 Bill Maddox <maddox@google.com>
4592 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4593 unwanted scaling during pointer addition.
4595 2008-07-11 Bill Maddox <maddox@google.com>
4596 Diego Novillo <dnovillo@google.com>
4598 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4599 Make code const-correct.
4600 (lto_file_read): Fix C++ compatibility warnings.
4601 (lto_read_section_data): Fix C++ compatibility warnings.
4602 (lto_get_section_data): Use CONST_CAST to avoid warning when
4603 const pointer passed to free.
4604 * lto-elf.c (lto_elf_build_section_table): Fix C++
4605 compatibility warnings.
4606 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4607 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4608 (lto_get_current_out_file): Fix C++ compatibility warnings.
4610 2008-07-11 Diego Novillo <dnovillo@google.com>
4612 * Make-lang.in (lto-warn): Define.
4614 2008-07-03 Simon Baldwin <simonb@google.com>
4616 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4617 LTO_STREAM_DEBUGGING.
4619 2008-06-27 Ollie Wild <aaw@google.com>
4621 * lto-elf.c (lto-section-out.h): New include.
4622 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4624 (cached_file_attrs): New static variable.
4625 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4626 Use cached_file_attrs for checking bits.
4627 (lto_elf_build_section_table): Remove elf_file argument from
4628 lto_elf_get_shdr and lto_elf_free_shdr calls.
4629 (DEFINE_INIT_SHDR): New macro.
4630 (init_shdr32, init_shdr64): New functions defined via the
4631 DEFINE_INIT_SHDR macro.
4632 (lto_elf_begin_section_with_type): New function.
4633 (lto_elf_begin_section): New function.
4634 (lto_elf_append_data): New function.
4635 (lto_elf_end_section): New function.
4636 (DEFINE_VALIDATE_EHDR): New macro.
4637 (validate_ehdr32, validate_ehdr64): New functions defined via the
4638 DEFINE_VALIDATE_EHDR macro.
4639 (validate_file): New function.
4640 (DEFINE_INIT_EHDR): New macro.
4641 (init_ehdr32, init_ehdr64): New functions defined via the
4642 DEFINE_INIT_EHDR macro.
4643 (init_ehdr): New function.
4644 (lto_elf_file_open): Add support for writable files. Move some
4645 validation logic to validate_file.
4646 (lto_elf_file_close): Add support for writable files. Write file data
4647 and free data blocks.
4648 (current_out_file): New static variable.
4649 (lto_set_current_out_file): New function.
4650 (lto_get_current_out_file): New function.
4651 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4652 Add temporary initialization for testing ELF serialization.
4653 * lto.h (lto-section-out.h): New include.
4654 (struct lto_file_struct): Slight modification to comment.
4655 (lto_elf_file_open): Add writable parameter.
4656 (lto_elf_begin_section): New function declaration.
4657 (lto_elf_append_data): New function declaration.
4658 (lto_elf_end_section): New function declaration.
4659 (lto_set_current_out_file, lto_get_current_out_file): New function
4661 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4662 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4663 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4664 * Make-lang.in (LTO_H): Add lto-section-out.h.
4666 2008-06-12 Ollie Wild <aaw@google.com>
4668 * lto.h (struct lto_file_vtable_struct): Remove.
4669 (struct lto_file_struct): Remove vtable member.
4670 * lto-elf.c (lto_file_init): Remove vtable argument.
4671 (lto_elf_map_optional_lto_section): Remove.
4672 (lto_elf_unmap_section): Remove.
4673 (lto_elf_file_vtable): Remove.
4674 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4676 (lto_elf_find_section_data): Remove.
4678 2008-06-11 Ollie Wild <aaw@google.com>
4680 * lto.c (lto_file_read): Add const qualifier to data variable.
4682 2008-06-11 Diego Novillo <dnovillo@google.com>
4684 Merge from lto-streamber sub-branch.
4686 2008-06-04 Ollie Wild <aaw@google.com>
4688 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4689 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4691 2008-05-28 Bill Maddox <maddox@google.com>
4693 Replace the DWARF reader in the LTO front-end.
4695 * lto.c: Include lto-tree-in.h, lto-tags.h.
4696 (enum DWARF2_class, DW_cl_constant, struct
4697 DWARF2_form_data, struct lto_context,
4698 lto_fd_init, lto_info_fd_init,
4699 lto_abbrev_fd_init, lto_info_fd_close,
4700 lto_file_init, lto_file_close,
4701 lto_file_corrupt_error, lto_abi_mismatch_error,
4702 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4703 lto_read_uleb128, lto_read_sleb128,
4704 lto_read_initial_length, lto_abbrev_read_attrs,
4705 lto_abbrev_read, lto_abbrev_read_lookup,
4706 lto_read_section_offset,
4707 lto_read_comp_unit_header, find_cu_for_offset,
4709 lto_resolve_reference,lto_read_form,
4710 attribute_value_as_int,
4711 make_signed_host_wide_int,
4712 attribute_value_as_constant, lto_cache_hash,
4713 lto_cache_eq, lto_cache_store_DIE,
4714 lto_cache_lookup_DIE, lto_find_integral_type,
4715 lto_find_integral_type_1,
4716 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4717 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4718 lto_unsupported_attr_error, lto_get_identifier,
4719 lto_read_referenced_type_DIE,
4720 lto_read_compile_unit_DIE,
4721 lto_read_array_type_DIE,
4722 lto_read_structure_union_class_type_DIE,
4723 lto_read_enumerator_DIE,
4724 lto_read_enumeration_type_DIE,
4725 lto_read_only_for_child_DIEs,
4726 lto_read_only_for_child_DIEs,
4727 lto_read_member_DIE, lto_read_abbrev,
4728 lto_read_variable_formal_parameter_constant_DIE,
4729 lto_get_body): Removed.
4730 (preload_common_nodes): New function.
4731 (lto_read_decls): Convert for new global streamer.
4732 (lto_materialze_file_data,
4733 lto_read_subroutine_type_subprogram_die,
4734 lto_read_unspecified_parameters_DIE,
4735 lto_read_typedef_DIE,
4736 lto_read_pointer_reference_type_DIE,
4737 lto_read_subrange_type_DIE,
4738 lto_read_base_type_DIE,
4739 lto_read_const_volatile_restrict_type_DIE,
4740 lto_read_namespace_DIE,
4741 lto_read_unspecified_type_DIE, lto_read_DIE,
4742 lto_read_child_DIEs, lto_collect_child_DIEs):
4744 (lto_info_read, lto_set_cu_context): Removed.
4745 (lto_file_read): Convert for new global streamer.
4746 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4747 lto_resolve_var_ref, lto_resolve_fn_ref,
4748 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4749 lto_resolve_namespacedecl_ref): Removed.
4750 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4751 * lto-tree.h (lto_symtab_merge_var,
4752 lto_symtab_mergee_fun): Declare here.
4753 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4754 (lto_elf_file_open): Removed code to read DWARF debug sections.
4755 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4756 DWARF2_CompUnit, lto_die_ptr,
4757 lto_die_cache_entry, lto_fd, lto_info_fd,
4758 lto_abbrev_fd): Removed.
4759 (lto_file): Removed debug_info and debug_abbrev fields.
4761 (lto_file_init, lto_file_close,
4762 lto_resolve_type_ref, lto_resolve_var_ref,
4763 lto_resolve_fn_ref, lto_resolve_field_ref,
4764 lto_resolve_typedecl_ref,
4765 lto_resolve_namespacedecl_ref,
4766 lto_get_file_name): Removed declarations.
4767 (lto_symtab_merge_var, lto_symtab_merge_fn):
4768 Declarations moved to lto-tree.h.
4769 * lto-symtab.c (lto_compatible_attributes_p):
4770 Lobotomize this, as it barfs on "Hello, world!".
4771 * lto-section-out.c: Include lto-tree-out.h.
4772 (lto_hash_global_slot_node,
4773 lto_eq_global_slot_node, preload_common_nodes,
4774 write_global_stream, write_global_references):
4776 (produce_asm_for_decls): Convert for new global streamer.
4777 * lto-section-out.h (lto_hash_global_slot_node,
4778 lto_eq_global_slot_node): Declare.
4780 2008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
4781 Jan Hubicka <jh@suse.cz>
4783 * lto.c (sys/mman.h, tree-pass.h): New includes.
4784 (lto_materialize_constructors_and_inits,
4785 lto_materialize_function): Keeps length of section.
4786 (lto_materialize_cgraph): Removed.
4787 (lto_read_decls): Initialize fd field.
4788 (lto_file_read): Different return type and removed much code to
4790 (page_mask): New variable.
4791 (lto_read_section_data, get_section_data, free_section_data): New
4793 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4794 passes can get the section data.
4796 2008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
4798 * lto.h (lto_read_decls): Made local.
4799 (lto_input_function_body, lto_input_constructors_and_inits,
4800 lto_input_cgraph): Declarations moved to lto-section-in.h.
4801 * lto-section-in.c: Moved to .. .
4802 * lto-cgraph-in.c: Ditto.
4803 * lto-section-in.h: Ditto.
4804 * lto-function-in.c: Ditto.
4805 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4806 (lto_insert_block): Removed.
4807 (LANG_HOOKS_INSERT_BLOCK): Removed.
4808 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4809 lto-section-in.o): Rules moved to lto/Makefile.in.
4812 2008-05-16 Ollie Wild <aaw@google.com>
4814 * lto-lang.c (tree-inline.h): Include.
4815 (lto_post_options): New function.
4816 (LANG_HOOKS_POST_OPTIONS): Define.
4817 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4818 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4820 2008-05-13 Diego Novillo <dnovillo@google.com>
4822 * lto-function-in.c (input_ssa_names): Call
4823 make_ssa_name_fn instead of make_ssa_name.
4825 2008-05-12 Diego Novillo <dnovillo@google.com>
4827 * lto-cgraph-in.c (overwrite_node): Update references to
4828 inline summary fields.
4829 * lto-function-in.c (input_expr_operand): Do not handle
4832 2008-05-09 Ollie Wild <aaw@google.com>
4834 * lang.opt: New file.
4835 * lto-lang.c (lto_init_options): New function.
4836 (lto_handle_option): New function.
4837 (lto_init): Move initialization of flag_unit_at_a_time to
4839 (LANG_HOOKS_INIT_OPTIONS): Define.
4840 (LANG_HOOKS_HANDLE_OPTION): Define.
4842 2008-04-29 Ollie Wild <aaw@google.com>
4844 * lto.c (lto_read_namespace_DIE): New function.
4845 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4846 NAMESPACE_DECL DIE's.
4847 (lto_resolve_namespacedecl_ref): New function.
4848 * lto.h (lto_resolve_namespacedecl_ref): New function.
4849 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4850 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4851 and num_namespace_decls.
4852 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4853 * lto-lang.c (lto_init_ts): New function.
4854 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4856 2008-04-16 Ollie Wild <aaw@google.com>
4858 * lto-function-in.c (input_type_ref): Updated function description.
4860 2008-04-16 Ollie Wild <aaw@google.com>
4862 * lto-function-in.c (input_type_ref_1): New function.
4863 (input_type_ref): Split into two functions.
4864 (input_function): Add support for type contexts.
4866 2008-04-16 Ollie Wild <aaw@google.com>
4868 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4871 2008-04-16 Ollie Wild <aaw@google.com>
4873 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4874 list of supported languages.
4876 2008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
4878 Merge with mainline @133491.
4880 2008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
4881 Jan Hubicka <jh@suse.cz>
4883 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4884 fd->unmaterialized_fndecls.
4885 (lto_get_file_name, lto_materialize_cgraph): New function.
4886 (lto_materialize_constructors_and_inits,
4887 lto_materialize_function): Read info directly from elf file.
4888 (lto_file_read): Made local and initialize dictionary so that
4889 other lto sections can be read without reprocessing the elf file.
4890 (lto_main): Read all functions after all files have been processed
4891 for their types, globals and cgraph.
4892 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4894 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4895 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4896 (lto_elf_read_symtab): Removed function.
4897 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4898 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4899 (lto_file_read): Made local.
4900 (lto_get_file_name, lto_elf_build_section_table,
4903 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4905 (lto_read_decls): Get the file name.
4906 * lto-cgraph-in.c: New file.
4907 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4908 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4909 (input_labels): Fixed latent sizeof issue.
4910 (input_function): Build stmt array to set call sites into cgraph
4912 (lto_read_body): Reset cfun->curr_properties.
4913 * lto_section_in.h (lto_section_slot): New structure.
4914 (section_hash_table.lto_file_decl_data): New field.
4917 2008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
4919 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4920 reconstruct static initializers.
4921 (lto_get_body, lto_materialize_function): Add lto_section_type as
4923 (lto_materialize_constructors_and_inits,
4924 lto_materialize_file_data): New function.
4925 (lto_materialize_function,
4926 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4927 unmap_section and map_fn_body to map_section.
4928 (lto_set_cu_context): Process functions and static inits
4930 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4931 lto/lto-section-in.o): Update dependencies.
4932 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4933 lto_section_type parameter.
4934 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4935 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4936 renamed the other two so that there is only one map function and
4937 one unmap function and each takes a section type parameter.
4938 (lto_read_function_body): Renamed to lto_input_function_body and
4939 added file_data parameter.
4940 (lto_read_var_init): Removed.
4941 (lto_input_constructors_and_inits): New function.
4942 * lto-section-in.c (lto_read_decls): New function.
4943 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4944 var_decls, type_decls, types to lto_file_decl_data.
4945 (input_type_ref, input_expr_operand, lto_read_body): Get
4946 field_decls, fn_decls, var_decls, type_decls, types from different
4948 (input_globals, input_constructor, lto_read_var_init): Removed.
4949 (input_constructors_or_inits): New function.
4950 (lto_read_function_body, lto_input_constructors_and_inits):
4951 Renamed to lto_input_function_body and takes file_data parameter.
4952 * lto-section-in.h (lto_file_decl_data): New structure.
4954 2008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4956 * lto-function-in.c (input_globals.c): Changed input type to
4957 lto_function_header.
4958 (input_bb): Removed code to deserialize the stmt number.
4959 (input_function): Renumber all stmts after they are input.
4960 (lto_read_body, lto_read_function_body, lto_read_var_init):
4961 Changed to used new header format and enum section_type.
4962 *lto-lang.c (success): Removed.
4964 2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4966 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4967 (lto_elf_free_sym): Likewise.
4969 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4970 (lto_elf_build_init): Likewise.
4972 2008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
4974 * lto-read.c: Renamed to lto-function-in.c.
4975 (input_1_unsigned): Moved to lto-section-in.c and renamed
4976 lto_input_1_unsigned.
4977 (input_uleb128): Moved to lto-section-in.c and renamed
4979 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4980 lto_input_widest_uint_uleb128.
4981 (input_sleb128): Moved to lto-section-in.c and renamed
4983 (input_integer): Moved to lto-section-in.c and renamed
4985 (debug_in_fun): Moved to lto-section-in.c and renamed
4987 (input_block): Moved to lto-section-in.h and renamed
4989 (input_expr_operand): Fixed to allow lists with more than one
4991 * lto-section-in.h: New file.
4992 * lto-section-in.c: New file with changes from above.
4993 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4994 (lto-section-in.o): New rule.
4996 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4998 * lto-read.c (input_expr_operand): Mark static and external
4999 VAR_DECLs as needed.
5001 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5003 * lto-read.c (input_integer): Use the correct shift amount.
5005 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5007 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5008 (LANG_HOOKS_NAME): Define.
5010 2007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5012 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5013 original function to...
5014 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5015 don't have a base type.
5016 (lto_read_enumeration_type_DIE): Examine the values of the
5017 enumeration to determine whether we can use an unsigned type for
5018 the base type of the enumeration.
5020 2007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5022 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5023 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5025 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5027 * lto-lang.c (lto_types_compatible_p): New function.
5028 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5030 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5031 Kenneth Zadeck <zadeck@naturalbridge.com>
5033 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5034 (input_local_vars): Read in DECL_INITIAL and context for local
5035 statics that need to be put in unexpanded_vars_list.
5037 2007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5039 * lto-read.c (input_real): Use a separate null-terminated buffer
5040 for calling real_from_string.
5041 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5042 tell cgraph that it's needed.
5044 2007-12-19 Doug Kwan <dougkwan@google.com>
5046 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5048 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5050 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5051 (lto_file_read): Reset the members of 'context' every time we read
5052 a toplevel DIE, with special attention to last_param_type.
5054 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5056 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5057 'declaration'. Set the assembler name for non-public functions.
5059 2007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
5061 * lto_read.c (data_in.unexpanded_indexes): New array.
5062 (input_local_var): Added code to read in unexpanded_var_list
5063 indexes for variables. Only read in DECL_CHAIN field for
5065 (input_local_vars): Added code to rebuild unexpanded_var_list in
5066 order using unexpanded_indexes.
5067 (input_function): Added code to set DECL_CONTEXT for functions.
5069 2007-12-13 Doug Kwan <dougkwan@google.com>
5071 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5072 in pointer and reference types.
5074 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5076 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5079 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5081 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5082 already read the DIE.
5083 (lto_get_body): New function, split out from...
5084 (lto_materialize_function): ...here. Call it.
5085 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5086 determine DECL_EXTERNAL.
5087 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5088 FUNCTION_DECLs when necessary. Use the type of the actual
5089 function definition if we are unable to easily merge types. Ignore
5090 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5093 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5095 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5097 2007-12-12 Bill Maddox <maddox@google.com>
5100 2007-12-07 Bill Maddox <maddox@google.com>
5102 * lto.c (lto_str_fd_init): New function.
5103 (lto_str_fd_close): New function.
5104 (lto_file_init): Call lto_str_fd_init.
5105 (lto_file_close): Call lto_str_fd_close.
5106 (lto_str_read): New function. Read debug string table.
5107 (lto_str_lookup): New function. Get string for debug
5108 string table offset.
5109 (lto_read_form): Recognize DW_FORM_strp.
5110 (lto_file_read): Invoke lto_str_read.
5112 * lto-elf.c (lto_elf_file_open): Read raw section data
5113 for the .debug_str section, if present.
5115 * lto.h (struct lto_str_fd_struct): New struct.
5116 (struct lto_file_struct): Added new field DEBUG_STR
5117 to hold the file descriptor for the debug string table.
5119 2007-12-07 Bill Maddox <maddox@google.com>
5121 * lto.c (lto_str_fd_init): New function.
5122 (lto_str_fd_close): New function.
5123 (lto_file_init): Call lto_str_fd_init.
5124 (lto_file_close): Call lto_str_fd_close.
5125 (lto_str_read): New function. Read debug string table.
5126 (lto_str_lookup): New function. Get string for debug
5127 string table offset.
5128 (lto_read_form): Recognize DW_FORM_strp.
5129 (lto_file_read): Invoke lto_str_read.
5131 * lto-elf.c (lto_elf_file_open): Read raw section data
5132 for the .debug_str section, if present.
5134 * lto.h (struct lto_str_fd_struct): New struct.
5135 (struct lto_file_struct): Added new field DEBUG_STR
5136 to hold the file descriptor for the debug string table.
5138 2007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5140 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5141 Grow the basic_block_info and label_to_block_map vectors if
5142 necessary. Read in the block chain.
5144 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5146 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5148 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5150 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5152 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5154 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5155 (lto_read_body): Don't declare PROP_alias.
5157 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5159 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5160 argument type information.
5162 2007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5164 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5165 TREE_THIS_VOLATILE if the associated type is a volatile type.
5166 (lto_materialize_function): Remove call to init_ssa_operands.
5167 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5168 variable when reading an SSA_NAME. Do the same when reading a
5169 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5170 (input_cfg): Call init_ssa_operands.
5171 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5172 Move call to init_tree_ssa...
5173 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5174 add_referenced_var on any variables referenced from the body of the
5175 function. Inform the rest of the compiler we are in SSA form and
5176 inform later passes about the current properties.
5178 2007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5180 * lto.c (lto_materialize_function): Add FIXME.
5182 2007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5184 * lto-lang.c (enum built_in_attribute): New enum.
5185 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5186 built_in_attributes): New variables.
5187 (def_builtin_1): New function.
5188 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5190 2007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5192 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5193 DECL_SOURCE_LOCATION for debugging purposes.
5194 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5195 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5196 laying out the decl until later.
5197 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5198 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5200 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5201 operand of an ADDR_EXPR.
5202 * lto-lang.c (enum lto_builtin_type): New enum.
5203 (builtin_type): New typedef.
5204 (builtin_types, string_type_node, const_string_type_node,
5205 wint_type_node, intmax_type_node, uintmax_type_node,
5206 signed_size_type_node): New variables.
5207 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5208 lto_build_c_type_nodes): New functions.
5209 (lto_init): Initialize builtin types.
5210 (lto_set_decl_assembler_name): Let the target machine mangle the
5211 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5213 2007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5215 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5216 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5217 the type is a constant type. Set the assembler name and inform
5218 the rest of the compiler about the new decl if the decl is not
5220 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5221 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5222 try to read in function bodies for functions that already have bodies.
5223 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5225 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5226 Check for whether we matched a builtin function type before calling
5227 lto_same_type_p on the generated type. Permit cases where the
5228 declaration of an array is unbounded, but the definition is bounded.
5229 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5230 DECL_SIZE_UNIT if necessary.
5232 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5234 * lto-read.c (input_expr_operand): Get types right
5237 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5239 * lto-read.c (make_new_block, input_cfg): Properly set
5242 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5244 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5245 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5247 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5249 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5250 construct the integer type for bitfields.
5252 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5254 * lto-read.c (data_in.current_node_has_loc): Removed.
5255 (input_line_info): Returns true if node needs line set.
5256 (set_line_info): Always sets line if called.
5257 (clear_line_info): Removed reference to current_node_needs_loc.
5258 (input_expr_operand): Keeps track locally if current node needs a loc.
5259 (input_local_var): Added code to handle DECL_INITIAL for
5260 static local vars. Only set loc if necessary.
5262 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5264 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5267 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5269 * lto.c: Include langhooks.h.
5270 (lto_find_integral_type): Rework logic to handle the case where
5271 got_byte_size is true, but the bitsize requested and that of the
5272 base_type doesn't match.
5273 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5274 asm_name if we are creating a VAR_DECL.
5275 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5277 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5278 function reference and use the builtin's decl if so. Set the
5279 DECL_CONTEXT of the RESULT_DECL for the function.
5280 * lto-lang.c (registered_builtin_fndecls): New variable.
5281 (lto_getdecls): Return it.
5282 (lto_builtin_function): Chain the new decl onto
5283 registered_builtin_fndecls.
5285 2007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
5287 * lto-read.c (process_tree_flags, lto_static_init_local):
5288 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5289 (input_line_info, clear_line_info): Fixed new line number code.
5290 (input_expr_operand): Added type to SWITCH_EXPR.
5291 (lto_read_body): Properly initialized data_in.
5292 Clear line info when leaving.
5294 2007-11-13 Diego Novillo <dnovillo@google.com>
5296 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5297 Initialize ARTIFICIAL.
5298 (lto_read_subroutine_type_subprogram_DIE): Initialize
5300 * lto-read.c (set_line_info): Remove ; from calls to
5301 LINEMAP_POSITION_FOR_COLUMN.
5303 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5305 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5306 (input_expr_operand, input_local_var): Renamed get_type_ref to
5308 (input_expr_operand): Get the types correct for
5309 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5311 2007-11-13 Doug Kwan <dougkwan@google.com>
5313 * lto-read.c (input_widest_uint_uleb128): New function.
5314 (input_tree_flags, process_tree_flags, input_line_info,
5315 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5316 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5317 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5318 (lto_static_init_local): Add code to assert that lto_flags_type is
5321 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5323 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5324 (lto_read_subroutine_type_subprogram_DIE): Handle
5325 DW_AT_static_link and DW_AT_specification. Return the
5326 specification if present.
5327 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5329 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5331 * lto-lang.c: Include target.h.
5332 (registered_builtin_types): New variable.
5333 (lto_type_for_mode): Increase number of modes handled.
5334 (lto_builtin_function): Fix argument list and return the decl.
5335 (lto_register_builtin_type): New function.
5336 (lto_init): Initialize target builtins and language-independent
5338 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5340 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5342 * lto-read.c (input_expr_operand): Added code to properly handle
5343 index filed. Added new RANGE_EXPR case.
5345 2007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
5347 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5348 (data_in): Added current_node_has_loc field.
5349 (input_line_info, set_line_info, clear_line_info): Added a support
5350 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5351 did not have on on the source side.
5352 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5355 2007-11-09 Doug Kwan <dougkwan@google.com>
5357 * lto-read.c (input_expr_operand): Change type of operand 2 of
5358 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5360 2007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5362 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5363 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5364 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5365 the new decl we are creating. Move informing the middle end about
5367 (lto_main): ...here. Inform the middle end about global variables
5368 after we have read in all the input files.
5369 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5370 variables with internal linkage, so delete the check for internal
5371 linkage. Combine TREE_PUBLIC flags.
5373 2007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5375 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5377 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5378 builtin specially. Move check for attribute compatibility
5381 2007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5383 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5384 * config-lang.in (gtfiles): Add lto.h and lto.c.
5385 * lto-elf.c: Include ggc.h.
5386 (lto_elf_file_open): Allocate elf_file from GC memory.
5387 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5388 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5390 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5391 (lto_file_close): Free file from GC memory.
5392 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5393 (lto_read_member_DIE): Fix declaration.
5394 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5396 (current_lto_file): New variable.
5398 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5399 lto_die_cache_entry): Move to...
5400 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5401 declarations accordingly.
5402 (struct lto_file_struct): Declare.
5403 (lto_file_vtable): Use it instead of lto_file.
5405 2007-11-06 Alon Dayan <alond@il.ibm.com>
5406 Kenneth Zadeck <zadeck@naturalbridge.com>
5408 * lto-read.c (process_flags, lto_static_init_local):
5409 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5410 change global array num_flags_for_code to flags_length_for_code.
5411 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5413 2007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5415 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5416 layout functions to compute information about the newly constructed
5419 2007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5421 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5422 case to use DECL_RESULT if necessary.
5424 2007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
5426 * lto-read.c (input_tree_list): Removed.
5427 (input_tree_flags): Added parameter to force flags no matter what
5429 (input_expr_operand): Added parameter to input_tree_flags.
5430 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5431 input_expr_operand rather than input_tree_lists.
5432 (input_local_var): Use input_expr_operand to read attributes
5433 rather then input_tree_list.
5434 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5436 2007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5438 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5439 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5441 * lto-read.c (lto_read_body): Use correct sizes for calculating
5442 type_decls_offset and types_offset.
5444 2007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5446 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5448 * config-lang.in (gtfiles): Add lto-lang.c.
5449 * lto-lang.c: Include gt-lto-lto-lang.h.
5450 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5451 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5452 (lto/lto-read.o): Likewise.
5454 2007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
5456 * lto-read.c (data_in): Added type_decls and current_col fields.
5457 (string_slot): New type to hold canonized file name.
5458 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5459 input_line_info, set_line_info, clear_line_info): New functions.
5460 (file_name_hash_table): New hash table.
5461 (input_local_var, input_labels, input_local_vars_index,
5462 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5463 (input_uleb128): Changed type of byte var.
5464 (input_expr_operand): Large number of changes to get line numbers
5465 correct. Added TYPE_DECL case.
5466 (input_globals): Added code to get TYPE_DECLs processed.
5467 (input_local_var): Added code to process line numbers and
5468 TREE_CHAIN and DECL_CONTEXT.
5469 (input_function, input_constructor): Added call to
5471 (lto_static_init_local): Added code to get line numbers correct.
5472 (lto_read_body): Added code to get TYPE_DECLS read and to change
5473 parameters to the calls above that had their parms reorganized.
5476 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5478 * lto.h (lto_resolve_typedecl_ref): Declare.
5479 * lto.c (lto_resolve_typedecl_ref): New function.
5481 2007-10-29 Mark Mitchell <mark@codesourcery.com>
5482 Nathan Froyd <froydnj@codesourcery.com>
5484 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5485 DIEs even if we find an abstract origin for this DIE.
5487 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5489 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5490 RESULT_DECL slightly earlier. Only remember the decl for later
5491 if we successfully merge declarations.
5493 2007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
5495 * lto-read.c (input_expr_operand): Give label_values the proper
5496 context and provide switch statements with a default type.
5498 2007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5500 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5501 * lto.c (lto_materialize_function): ...to here.
5503 2007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5505 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5506 * lto.c (lto_info_fd_init): Initialize it.
5507 (lto_info_fd_close): Free it.
5508 (lto_materialize_function): New function.
5509 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5510 unmaterialized_fndecls.
5511 (lto_file_read): Read in all the function bodies after we have read
5512 all of the DWARF info.
5513 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5514 reading a function body.
5516 2007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5518 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5519 semetric with output_tree_flags. Added call to log flags.
5520 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5521 type issues to make everything consistent with flags being
5522 unsigned HOST_WIDE_INTS.
5523 (input_expr_operand): Added call to
5524 recompute_tree_invariant_for_addr_expr.
5525 (input_local_var): Added debugging for tree_chains. Now calls
5527 (input_phi): Made flags unsigned HOST_WIDE_INT.
5528 (input_ssa_names): Now calls input_tree_flags.
5529 (lto_read_body): Now sets cfun.
5530 (lto_read_function_body): Now sets current_function_pointer.
5532 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5534 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5535 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5536 inspecting fields within.
5537 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5538 handle this appropriately.
5540 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5542 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5543 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5544 both DW_AT_abstract_origin and DW_AT_specification.
5545 (lto_read_subroutine_type_subprogram_DIE): Handle
5546 DW_AT_abstract_origin.
5547 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5548 (lto_read_DIE_at_ptr): Define as static to match declaration.
5549 Lookup the PTR in the cache before reading it from the file.
5550 (lto_resolve_var_ref): Adjust accordingly.
5551 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5552 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5554 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5556 * lto.c (lto_read_DIE_at_ptr): New function.
5557 (lto_resolve_var_ref): Use it.
5558 (lto_resolve_fn_ref): Use it.
5559 (lto_resolve_field_ref): Use it.
5560 (lto_read_variable_formal_parameter_constant_DIE): Follow
5561 DW_AT_specification and return the associated decl when appropriate.
5563 2007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5565 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5566 Implement for scalar integer modes.
5567 (lto_init): Initialize size_type_node.
5569 2007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
5571 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5572 (input_local_var): Add chaining for params.
5573 (input_ssa_names): Add cfun parameter.
5574 (input_function): Remove unnecessary else.
5576 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5578 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5579 (lto_resolve_var_ref): Use proper types.
5580 (lto_resolve_fn_ref): Likewise.
5581 (lto_resolve_field_ref): Likewise.
5583 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5585 * lto-read.c (input_expr_operand): Remove case.
5587 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5589 * lto.c (lto_read_only_for_child_DIEs): New function.
5590 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5591 * lto-elf.c (lto_elf_map_lto_section): Remove.
5592 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5593 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5594 SSA_NAME. Add missing case for mechanical codes.
5595 (input_cfg): Use basic_block_info_for_function instead of
5598 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5600 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5601 (input_list): Renamed input_tree_list and modified to follow same
5602 protocol as lto-function-out.c:output_tree_list.
5603 (input_expr_operand): Make asm operands use input_tree_list.
5604 (input_local_var): Now uses input_tree_list.
5605 (lto_read_body): Change placement for setting context of debug_labels.
5608 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5610 * lto-read.c (input_real): Output debugging in proper order.
5611 (input_integer): Compute bit lengths properly.
5612 (input_list): Clean up declaration.
5613 (input_expr_operand): Change calls to input_real to match fix.
5614 Make reading of LTO_bit_field_ref1 match output.
5615 (input_local_var): Make reading of attributes match what is being
5617 (dump_debug_stream): Also print char in hex.
5618 (debug_out_fun): Fix signed unsigned mismatch.
5620 2007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5622 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5623 DW_AT_GNU_vector specially, as they are not contiguous with the
5624 specified set of attribute names. Use class_mask to check for
5625 errors at the end of the function
5626 (lto_resolve_var_ref): Read the DIE if it is not cached.
5627 (lto_resolve_fn_ref): Likewise.
5628 (lto_resolve_field_ref): Likewise.
5630 2007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5632 * lto.c: Include dwarf2out.h.
5633 (lto_cache_store_DIE): Assert that we never change the value.
5634 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5635 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5636 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5637 sensible type instead.
5638 (lto_read_structure_union_class_type_DIE): Store the newly
5639 created type prior to reading the members of the structure to
5640 avoid infinite recursion. Avoid computing types and alignments
5641 for structures whose sizes are unknown.
5642 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5643 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5644 DW_AT_const_value, and DW_AT_specification.
5645 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5646 Return early if we have already constructed the function type.
5647 (lto_read_typedef_DIE): Check to see if the type has been cached
5648 already. Cache the type before reading any children.
5649 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5650 (lto_read_DIE): Unset context->skip_non_parameters around reading
5652 (lto_resolve_fn_ref): Delete trailing whitespace.
5654 2007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
5656 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5658 2007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5660 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5662 2007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5664 * lto-lang.c (signed_and_unsigned_types): New variable.
5665 (lto_type_for_size): Consult signed_and_unsigned_types to find
5666 an approprite type, creating it if necessary.
5667 (lto_set_decl_assembler_name): Add actual method body.
5669 2007-09-06 Jim Blandy <jimb@codesourcery.com>
5671 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5672 can't find a var init for this variable, leave its DECL_INITIAL.
5673 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5674 lto_elf_map_fn_body.
5675 (lto_map_lto_section): New function.
5676 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5677 bodies, and lto_elf_map_optional_lto_section for variable
5679 (lto_elf_find_section_data): Quietly return NULL if the section is
5681 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5683 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5685 * lto-read.c (lto_read_body): Doc fix.
5687 2007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
5689 * lto-read.c (fun_in): Renamed to data_in.
5690 (input_expr_operand, input_local_var, input_string_internal,
5691 input_string, input_real, input_list, get_label_decl,
5692 get_type_ref, input_expr_operand, input_globals, input_labels,
5693 input_local_vars_index, input_local_var, input_local_vars,
5694 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5695 (input_constructor): New function.
5696 (lto_read_function_body): Renamed to lto_read_body and generalized
5697 to handle both functions and constructors.
5698 (lto_read_function_body, lto_read_var_init): New function.
5701 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5703 * lto-read.c (input_expr_operand): Assert that there really is a
5705 (input_globals): Removed checks on 0 section.
5707 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5709 * lto-read.c (fun_in): Added local_decls_index and
5710 local_decls_index_d.
5711 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5712 (input_globals): Enabled code to handle FIELD_DECLs.
5713 (input_local_vars_index, input_local_vars): New function.
5714 (input_local_var): Changed to allow locals to be input randomly.
5715 (lto_read_function_body): Added code to input the
5716 local_decls_index and to free various structures.
5718 2007-08-17 Jim Blandy <jimb@codesourcery.com>
5720 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5721 ATTRIBUTE_UNUSED from 'die' formal.
5723 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5724 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5725 (input_list): Fix type of 'tag'.
5726 (input_expr_operand): Fix type of 'tag' argument. Update
5727 declaration. Fix type of 'ctag'. Add default case to switch,
5728 since the type of the switched value is now an enum.
5729 (input_local_vars): Fix type of 'tag'.
5730 (input_bb): Fix type of 'tag' argument.
5731 (input_function): Fix type of 'tag' argument.
5733 2007-08-16 Jim Blandy <jimb@codesourcery.com>
5735 * lto.c (lto_read_member_DIE): Record the tree we create in
5736 fd->die_cache. (Our 'die' argument is no longer unused.)
5737 (lto_resolve_field_ref): New function.
5738 * lto.h (lto_resolve_field_ref): New declaration.
5740 2007-08-15 Jim Blandy <jimb@codesourcery.com>
5742 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5744 2007-08-07 Jim Blandy <jimb@codesourcery.com>
5746 * lto.c (lto_read_form): Complete attr_classes table.
5747 (DWARF2_form_data): Doc fix.
5749 2007-08-05 Mark Mitchell <mark@codesourcery.com>
5751 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5753 (lto_read_var_init): Declare.
5754 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5755 interface for reading variable initializers.
5756 * lto-elf.c (lto_elf_read_var_init): Remove.
5757 (lto_elf_file_vtable): Update initializer.
5758 (lto_elf_read_var_init): Add comment about unused-ness.
5759 * lto-read.c (lto_read_var_init): New.
5761 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5763 2007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
5765 * lto-read.c (lto_read_function_body): Moved declaration of fn
5768 2007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
5770 * lto-read.c (input_uleb128, input_string_internal, input_real,
5771 input_integer, input_record_start, input_list, get_type_ref,
5772 input_flags, input_expr_operand, input_expr_operand,
5773 input_expr_operand, input_local_vars, input_cfg, input_phi,
5774 input_ssa_names, input_bb, input_function): Added semicolons.
5777 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5779 * lto-read.c (input_globals): Remove debugging.
5780 (input_function): Set DECL_ARGUMENTS.
5782 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5784 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5785 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5786 (input_phi): Made work with operands other than SSA_NAMES and
5787 fixed processing of flags.
5788 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5789 (input_flags): New function.
5790 * lto-lang.c (lto_init): Changed state of in_lto_p.
5793 2007-07-24 Mark Mitchell <mark@codesourcery.com>
5795 * lto-tree.h (lto_varargs_cookie): Remove.
5796 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5797 skip_non_parameters, skip_parameters.
5798 (lto_varargs_cookie): Remove.
5799 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5801 (lto_read_abbrev): New function.
5802 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5804 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5805 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5806 (lto_file_read): Initialize new context fields.
5807 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5808 (lto_unsigned_type): Remove.
5809 (lto_signed_type): Likewise.
5810 (lto_signed_or_unsigned_type): Likewise.
5811 (lto_init): Do not create lto_varargs_cookie.
5812 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5813 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5814 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5816 2007-07-19 Jan Hubicka <jh@suse.cz>
5818 * lto-read.c (lto_read_function_body): Produce empty scope block
5821 2007-07-18 Mark Mitchell <mark@codesourcery.com>
5823 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5824 process local variables.
5825 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5827 2007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5829 * lto-read.c (input_list, input_expr_operand): Added struct
5831 (init_cfg, finalize_cfg): Removed function.
5832 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5833 (input_labels, input_local_vars): Now takes input_block parameter rather than
5835 (input_cfg, input_phi, input_ssa_names): New functions.
5836 (input_bb): Now passes in input_blocks. Does not construct cfg
5837 and processes the list of phi functions.
5838 (input_function): Now builds both the cfg and ssa_names table.
5839 (lto_read_function_body): Processes new header fields to construct
5840 streams for the ssa_names and cfg and their debugging.
5841 * lto/lto-lang.c (lto_init): Set in_lto_p.
5844 2007-06-28 Mark Mitchell <mark@codesourcery.com>
5846 * lto.h (lto_file_vtable): Add read_var_init.
5847 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5849 (lto_main): Remove bogus asserts.
5850 * lto-elf.c (tm.h): Include it.
5851 (libiberty.y): Likewise.
5852 (lto_elf_file): Add strtab and symtab. Rename
5853 string_table_section_index to sec_strtab.
5854 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5855 (lto_elf_get_shdr): New function.
5856 (lto_elf_free_shdr): Likewise.
5857 (lto_elf_find_section_data): Use them.
5858 (lto_elf_read_symtab): New function.
5859 (lto_elf_lookup_sym): Likewise.
5860 (lto_elf_free_sym): Likewise.
5861 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5862 (lto_elf_built_init): New function.
5863 (lto_elf_read_var_init): Likewise.
5864 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5866 2007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
5868 * lto-read (make_new_block): Initialize the stmt_list.
5869 (lto_static_init_local): Add debugging for missing codes.
5871 2007-06-26 Mark Mitchell <mark@codesourcery.com>
5873 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5874 unprototyped functions.
5876 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5878 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5879 Handle DW_AT_MIPS_linkage_name.
5880 (lto_read_subroutine_type_subprogram): Likewise. Correct
5882 (lto_main): Remove incorrect assertions.
5883 * lto-symbtab.c: Build function types out of TREE_LISTs.
5885 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5887 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5889 2007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
5891 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5892 dummy since ggc does not like empty structs.
5893 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5894 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5895 expr->common to expr->base.
5896 (make_new_block): Moved stmt_list to proper place.
5899 2007-03-14 Robert Kennedy <jimbob@google.com>
5901 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5902 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5903 assembler name from DWARF.
5904 * lto-lang.c (lto_set_decl_assembler_name) New function.
5906 2006-09-10 Mark Mitchell <mark@codesourcery.com>
5908 * lto.h (lto_file_vtable): New structure.
5909 (lto_file): Add vtable pointer.
5910 (lto_file_init): Add vtable paramter.
5911 (lto_read_function_body): New function.
5912 (lto_symtab_merge_fn): New function.
5913 * lto.c (lto_file_init): Add vtable parameter.
5914 (lto_read_form): Fill in entries for DW_AT_prototyped,
5916 (lto_read_subroutine_type_subprogram_DIE): New function.
5917 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5919 * lto-elf.c (lto_elf_vile_vtable): New variable.
5920 (lto_elf_file_open): Pass it to lto_file_init.
5921 (lto_elf_map_fn_body): New function.
5922 (lto_elf_unmap_fn_body): Likewise.
5923 * lto-read.c: New file.
5924 * lto-symtab.c (lto_symtab_merge_fn): New function.
5925 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5926 tree_rest_of_compilation.
5927 * Make-lang.in (LTO_OBJS): Add lto-read.o
5928 (lto-read.o): New target.
5930 2006-09-03 Mark Mitchell <mark@codesourcery.com>
5932 * lto.c (<inttypes.h>): Don't include it.
5933 (lto_context): Don't typedef it.
5934 (lto_resolve_reference): New function.
5935 (lto_read_form): Use it.
5936 (lto_resolve_type_ref): New function.
5937 (lto_resolve_var_ref): Likewise.
5938 (lto_resolve_fn_ref): Likewise.
5939 * lto.h (<inttypes.h>): Include it.
5940 (lto_context): New type.
5941 (lto_ref): New structure.
5942 (lto_resolve_type_ref): Declare.
5943 (lto_resolve_var_ref): Likewise.
5944 (lto_resolve_fn_ref): Likewise.
5946 2006-08-18 Mark Mitchell <mark@codesourcery.com>
5948 * lang-specs.h: New file.
5950 2006-08-14 Mark Mitchell <mark@codesourcery.com>
5952 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5953 (lto_info_fd_close): Deallocate it.
5954 (lto_die_cache_entry): New structure.
5955 (lto_cache_hash): New function.
5956 (lto_cache_eq): Likewise.
5957 (lto_cache_store_DIE): Likewise.
5958 (lto_cache_lookup_DIE): Likewise.
5959 (lto_read_referenced_type_DIE): Use the cache.
5960 (lto_read_pointer_type_DIE): Robustify.
5961 (lto_read_DIE): Use the cache.
5962 * lto.h (hashtab.h): Include.
5963 (lto_info_fd): Add DIE cache.
5964 * Make-lang.in (LTO_H): New variable.
5965 (lto/lto-lang.o): Use LTO_H.
5966 (lto/lto-elf.o): Likewise.
5967 (lto/lto-symtab.o): Likewise.
5969 2006-07-09 Mark Mitchell <mark@codesourcery.com>
5971 * lto.c (lto_abi_mismatch_error): New function.
5972 (lto_abbrev_read): Initialize num_abbrevs.
5973 (lto_read_form): Specify allowed form classes for
5974 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5975 (lto_read_variable_formal_parameter_constant_DIE): Handle
5976 DW_AT_declaration. Call lto_symtab_merge_var.
5977 (lto_read_pointer_type_DIE): New function.
5978 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5979 not creat TYPE_DECLs for types that already have them.
5980 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5981 (lto_set_cu_context): Make cu_start point to the header, not the
5983 (lto_file_read): Adjust for change to lto_set_cu_context.
5984 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5985 (lto/lto-symtab.o): New rule.
5986 * lto-tree.h (lang_identifier): Add decl field.
5987 (LANG_IDENTIFIER_CAST): New macro.
5988 (LTO_IDENTIFIER_DECL): Likewise.
5989 (lto_symtab_merge_var): Declare.
5990 * lto-symtab.c: New file.
5992 2006-07-02 Daniel Berlin <dberlin@dberlin.org>
5994 * lto.c (lto_context): Add current_cu and info_fd members.
5995 (DWARF2_CompUnit): New structure.
5996 (lto_read_DIE): Take lto_info_fd *.
5997 (lto_read_child_DIEs): Ditto.
5998 (lto_file_corrupt_error): Constify argument.
5999 (lto_set_cu_context): New function
6000 (lto_info_fd_init): Ditto.
6001 (lto_info_fd_close): Ditto.
6002 (lto_file_init): Use lto_info_fd_init.
6003 (lto_file_close): Use lto_info_fd_close.
6004 (lto_read_initial_length): Pass in pointer to header size.
6005 (lto_read_comp_unit_header): Correct cu_length to
6006 real length from beginning of header. Take lto_info_fd * as
6008 (find_cu_for_offset): New function.
6009 (lto_read_form): Change first argument to lto_info_fd *.
6010 Add FORM_CONTEXT argument.
6011 Handle DW_FORM_ref_addr.
6012 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
6013 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6014 Swap contexts if necessary for form.
6015 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6016 lto_file_corrupt_error.
6017 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6018 (lto_read_referenced_type_DIE): Change first argument to
6019 lto_info_fd *. Access lto_fd fields through base pointer.
6020 (lto_read_compile_unit_DIE): Change first argument to an
6022 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6023 (lto_read_base_type_DIE): Ditto.
6024 (lto_read_child_DIEs): Ditto.
6025 (lto_read_DIE): Ditto. Change type of function pointer.
6026 (lto_info_read): New function.
6027 (lto_set_cu_context): Ditto.
6028 (lto_file_read): Use lto_info_read, walk resulting CU's
6029 (lto_main): Update for lto_info_fd change.
6030 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6032 * lto.h (DWARF2_CompUnit): New structure.
6033 (lto_info_fd): Ditto.
6034 (lto_file): Change debug_info to be an lto_info_fd.
6036 2006-06-25 Mark Mitchell <mark@codesourcery.com>
6038 * lto.c (toplev.h): Include it.
6039 (dwarf2.h): Likewise.
6042 (cgraph.h): Likewise.
6044 (inttypes.h): Likewise.
6045 (DWARF2_attr): New type.
6046 (DWARF2_abbrev): Likewise.
6047 (DWARF2_class): Likewise.
6048 (DWARF2_form_data): Likewise.
6049 (lto_context): Likewise.
6050 (lto_fd_init): New function.
6051 (lto_abbrev_fd_init): Likewise.
6052 (lto_abbrev_fd_close): Likewise.
6053 (lto_file_init): Use them.
6054 (lto_file_close): New function.
6055 (lto_file_corrupt_error): Likewise.
6056 (LTO_CHECK_INT_VAL): New macro.
6057 (lto_check_size_t_val): New function.
6058 (lto_check_int_val): Likewise.
6059 (LTO_READ_TYPE): New macro.
6060 (lto_read_ubyte): New function.
6061 (lto_read_uhalf): Likewise.
6062 (lto_read_uword): Likewise.
6063 (lto_read_uleb128): Likewise.
6064 (lto_read_initial_length): Likewise.
6065 (lto_abbrev_read_attrs): Likewise.
6066 (lto_abbrev_read): Likewise.
6067 (lto_abbrev_lookup): Likewise.
6068 (lto_read_section_offset): Likewise.
6069 (lto_read_comp_unit_header): Likewise.
6070 (lto_read_form): Likewise.
6071 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6072 (LTO_BEGIN_READ_ATTRS): Likewise.
6073 (LTO_END_READ_ATTRS): Likewise.
6074 (lto_unsupported_attr_error): New function.
6075 (lto_get_identifier): Likewise.
6076 (lto_read_referenced_type_DIE): Likewise.
6077 (lto_read_compile_unit_DIE): Likewise.
6078 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6079 (lto_read_base_type_DIE): Likewise.
6080 (lto_read_DIE): Likewise.
6081 (lto_read_child_DIEs): Likewise.
6082 (lto_file_read): Read DIEs.
6083 (lto_main): Ask middle end to emit entities.
6084 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6085 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6086 (lto_elf_file_close): Likewise.
6087 * lto.h (lto_file): Declare.
6088 (DWARF2_abbrev): Likewise.
6090 (lto_abbrev_fd): Likewise.
6091 (lto_file): Use new types.
6092 (lto_file_close): Declare.
6093 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
6095 2006-06-18 Mark Mitchell <mark@codesourcery.com>
6099 * lto-elf.c: New file.
6100 * lto-lang.c (flags.h): Include it.
6102 (lto_init): New function.
6103 (lto_write_globals): Remove.
6104 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
6105 (LANG_HOOKS_INIT): Define.
6106 (LANG_HOOKS_PARSE_FILE): Likewise.
6107 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6108 (LTO_EXE): Link with libelf.
6109 (lto/lto-lang.o): Update dependencies.
6110 (lto/lto.o): New target.
6111 (lto/lto-elf.o): Likewise.
6113 2006-06-12 Mark Mitchell <mark@codesourcery.com>
6115 * config-lang.in: New file.
6116 * Make-lang.in: Likewise.
6117 * lto-tree.h: Likewise.
6118 * lto-lang.c: Likewise.
6120 Copyright (C) 2006-2019 Free Software Foundation, Inc.
6122 Copying and distribution of this file, with or without modification,
6123 are permitted in any medium without royalty provided the copyright
6124 notice and this notice are preserved.