PR c++/60336
[official-gcc.git] / gcc / lto / ChangeLog
blobed55a5f547be5996e45eaa3b0e7a07385673e7fc
1 2017-11-22  Marek Polacek  <polacek@redhat.com>
3         PR c++/60336
4         PR middle-end/67239
5         PR target/68355
6         * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
8 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
10         * lto-partition.c (lto_balanced_map): Use frequency accessor.
12 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
14         * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
16 2017-10-11  Nathan Sidwell  <nathan@acm.org>
18         * lto.c (mentions_vars_p_decl_with_vis): Use
19         DECL_ASSEMBLER_NAME_RAW.
20         (lto_fixup_prevailing_decls): Likewise.
22 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
24         * lto.c (compare_tree_sccs_1): Use wi::to_wide when
25         operating on trees as wide_ints.
27 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
28             Alan Hayward  <alan.hayward@arm.com>
29             David Sherwood  <david.sherwood@arm.com>
31         * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
33 2017-08-21  Richard Biener  <rguenther@suse.de>
35         * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
36         (lto_read_decls): Process TRANSLATION_UNIT_DECLs.  Remove
37         TYPE_DECL debug processing, register DIE references from
38         prevailing SCCs with the debug machinery.
39         (lto_section_with_id): Handle LTO debug sections.
41 2017-08-16  Nathan Sidwell  <nathan@acm.org>
43         * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
44         (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
45         (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
47 2017-08-08  Tom de Vries  <tom@codesourcery.com>
49         * lto.c: Include attribs.h.
51 2017-08-08  Martin Liska  <mliska@suse.cz>
53         * lto-lang.c: Include header files.
54         * lto-symtab.c: Likewise.
56 2017-08-03  Richard Biener  <rguenther@suse.de>
58         * lto-symtab.h (lto_symtab_prevail_decl): Do not use
59         DECL_ABSTRACT_ORIGIN as flag we can end up using that.  Instead
60         use DECL_LANG_FLAG_0.
61         (lto_symtab_prevail_decl): Likewise.
63 2017-07-07  Torsten Duwe  <duwe@suse.de>
65         * lto-lang.c (lto_attribute_table): Add entry for
66         "patchable_function_entry".
68 2017-07-19  Nathan Sidwell  <nathan@acm.org>
70         * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
71         (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
73 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
75         * lto-partition.c (lto_balanced_map): Do not check
76         flag_toplevel_reorder.
78 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
79         * lto-lang.c (lto_init): Use builtin_structptr_types.
81 2017-06-15  Jan Hubicka  <hubicka@ucw.cz>
82             Thomas Preud'homme  <thomas.preudhomme@arm.com>
84         PR lto/69866
85         * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
86         that resolved externally.
88 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
90         * lto.c (do_whole_program_analysis): Replace inline_free_summary
91         by ipa_free_fn_summary.
93 2017-05-23  Martin Liska  <mliska@suse.cz>
95         * lto-symtab.c (lto_cgraph_replace_node): Use
96         symtab_node::dump_{asm_,}name functions.
97         * lto.c (read_cgraph_and_symbols): Likewise.
98         (do_whole_program_analysis): Likewise.
100 2017-05-23  Martin Liska  <mliska@suse.cz>
102         * lto.c (read_cgraph_and_symbols): Use the renamed function.
103         (do_whole_program_analysis): Use the renamed function.
105 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
107         * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
108         * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
110 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
112         PR c++/80038
113         * lto-lang.c (lto_init): Set in_lto_p earlier.
115 2017-04-12  Richard Biener  <rguenther@suse.de>
116         Bernd Edlinger  <bernd.edlinger@hotmail.de>
118         PR middle-end/79671
119         * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
121 2017-02-14  Martin Liska  <mliska@suse.cz>
123         * lto.c (do_stream_out): Free LTO file filename string.
125 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
127         * lto-lang.c (builtin_type_for_size): Convert call to
128         lto_type_for_size to one through the langhook.
129         (lto_type_for_size): Move to langhooks.c and rename to
130         lhd_type_for_size.
131         (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
133 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
135         PR middle-end/50199
136         * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
137         if it was 0.
139 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
141         PR translation/79019
142         PR translation/79020
143         * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
145 2017-01-06  Nathan Sidwell  <nathan@acm.org>
147         * lto-partition.c (promote_symbol): Write to dump file sooner,
148         include alias promoting too.
150         * lto-partition.c (lto_balanced_map): Reformat/respell comment.
151         (may_need_named_section_p): Likewise.
152         (rename_statics): Likewise.
153         (lto_promote_cross_file_statics): Likewise.
155 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
157         Update copyright years.
159 2016-11-30  Georg-Johann Lay  <avr@gjlay.de>
161         PR lto/78562
162         * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
163         mismatch if the two types are built-in.
165 2016-11-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
167         * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
169 2016-11-23  Richard Biener  <rguenther@suse.de>
171         PR lto/78472
172         * lto.c (hash_canonical_type): Ignore zero-sized fields.
174 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
176         PR c++/71973
177         * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
179 2016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
180             Alan Hayward  <alan.hayward@arm.com>
181             David Sherwood  <david.sherwood@arm.com>
183         * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
185 2016-10-31  Richard Biener  <rguenther@suse.de>
187         PR lto/78129
188         * lto.c (do_whole_program_analysis): Bail out after errors
189         from WPA analysis.
191 2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>
193         * lto-partition.c: Include tree-vrp.h.
194         * lto.c: Likewise.
196 2016-09-20  Richard Biener  <rguenther@suse.de>
198         * lto.c (lto_main): Call early_finish with "<artificial>" as
199         filename.
201 2016-09-19  Richard Biener  <rguenther@suse.de>
203         * lto.c (lto_main): Invoke early_finish debug hook.
205 2016-07-25  Richard Biener  <rguenther@suse.de>
207         * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
208         (unify_scc): Likewise.
209         (lto_read_decls): Likewise.
211 2016-06-28  Jakub Jelinek  <jakub@redhat.com>
213         * Make-lang.in: Don't cat ../stage_current if it does not exist.
215 2016-06-23  Andi Kleen  <ak@linux.intel.com>
217         * Make-lang.in: Add support for autofdo (disabled for now)
219 2016-06-10  Martin Sebor  <msebor@redhat.com>
221         PR c/71392
222         * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
223         attribute in type-generic builtins.
225 2016-05-16  Jan Hubicka  <hubicka@ucw.cz>
227         * lto-partition.c (add_symbol_to_partition_1): Likewise.
229 2016-05-03  Jan Hubicka  <hubicka@ucw.cz>
231         * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
233 2016-04-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
235         * lto-partition.h (lto_balanced_map): New parameter.
236         * lto-partition.c (lto_balanced_map): New parameter
237         max_partition_size.
238         Check if partition size is greater than max_partition_size.
239         * lto.c (do_whole_program_analysis): Adjust calls to
240         lto_balanced_map() to pass 2nd argument.
242 2016-03-17  H.J. Lu  <hongjiu.lu@intel.com>
244         PR lto/70258
245         * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
246         PIE.
248 2016-03-08  Jakub Jelinek  <jakub@redhat.com>
250         * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
251         - becuase -> because.
253 2016-02-15  Tom de Vries  <tom@codesourcery.com>
255         PR lto/69655
256         * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
257         argument.
259 2016-01-27  Martin Liska  <mliska@suse.cz>
261         * lto-partition.c (add_symbol_to_partition_1): Remove usage
262         of hsa_summaries.
264 2016-01-19  Jan Hubicka  <hubicka@ucw.cz>
266         PR lto/69136
267         * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
268         decls have no assemblernames.
270 2016-01-19  Martin Liska  <mliska@suse.cz>
271             Martin Jambor  <mjambor@suse.cz>
273         * lto-partition.c: Include "hsa.h"
274         (add_symbol_to_partition_1): Put hsa implementations into the
275         same partition as host implementations.
277 2016-01-12  Jan Hubicka  <hubicka@ucw.cz>
279         PR lto/69003
280         * lto-partition.c (rename_statics): Fix pasto.
282 2016-01-18  Richard Biener  <rguenther@suse.de>
284         PR lto/69337
285         * lto-symtab.c (lto_symtab_merge): Return early for mismatched
286         function vs. variable.
288 2016-01-12  Richard Biener  <rguenther@suse.de>
290         PR lto/69077
291         * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
292         merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
294 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
296         Update copyright years.
298 2015-12-10  Jan Hubicka  <hubicka@ucw.cz>
300         PR lto/68878
301         * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
302         * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
303         (lto_symtab_prevailing_decl): Use it.
305 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
307         * lto.c: Include stringpool.h and fold-const.h.
308         (offload_handle_link_vars): New static function.
309         (lto_main): Call offload_handle_link_vars.
311 2015-12-10  Jan Hubicka  <hubicka@ucw.cz>
313         * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
315 2015-12-11  Jan Hubicka  <hubicka@ucw.cz>
317         PR ipa/61886
318         * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
319         values of error and warning attributes.
321 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
323         PR lto/68811
324         * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
325         DECL.
326         (LTO_NO_PREVAIL): Use gcc_checking_assert.
328 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
330         PR lto/68811
331         * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
332         by itself.
334 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
336         PR ipa/61886
337         * lto-symtab.c: Include lto-symtab.h.
338         (lto_cgraph_replace_node): Do not merge profiles here.
339         (lto_symtab_merge_p): New function.
340         (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
341         (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
342         aliases.
343         (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
344         (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
345         * lto.c: Include lto-symtab.h
346         * lto-symtab.h: New.
348 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
350         PR ipa/61886
351         * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
352         are not part of the definition.
353         (contained_in_symbol): Likewise.
354         (promote_symbol): When promoting a symbol also promote all transparent
355         aliases.
356         (rename_statics): Weakref needs unique name, too.
358 2015-12-07  Jan Hubicka  <hubicka@ucw.cz>
360         PR ipa/61886
361         * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
362         rename_statics, rename_statics): Handle transparent aliases.
364 2015-12-04  Jan Hubicka  <hubicka@ucw.cz>
366         * lto-symtab.c (lto_cgraph_replace_node): Update code computing
367         merged_comdat.
369 2015-12-01  Jan Hubicka  <hubicka@ucw.cz>
371         * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
373 2015-11-25  Jan Hubicka  <jh@suse.cz>
375         * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
376         * lang.opt (lto_linker_output): New enum.
377         (flinker_output): New flag.
379 2015-11-24  Jan Hubicka  <hubicka@ucw.cz>
381         * lto-symtab.c: Include alias.h
382         (warn_type_compatibility_p): Replace types_compatible_p checks by
383         TBAA and size checks; set bit 2 if locations are TBAA incompatible.
384         (lto_symtab_merge): Compare DECL sizes.
385         (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
387 2015-11-24  Jan Hubicka  <hubicka@ucw.cz>
389         * lto.c (iterative_hash_canonical_type): Recruse for all types
390         which pass !canonical_type_used_p.
391         (gimple_register_canonical_type_1): Sanity check we do not compute
392         canonical type of anything with !canonical_type_used_p.
393         (gimple_register_canonical_type): Skip all types that are
394         !canonical_type_used_p
396 2015-11-24  Jan Hubicka  <hubicka@ucw.cz>
398         * lto.c (unify_scc): Use free_node.
400 2015-11-21  Jan Hubicka  <hubicka@ucw.cz>
402         * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
403         (gimple_register_canonical_type_1): Check that pointers do not get
404         canonical types.
405         (gimple_register_canonical_type): Do not register pointers.
407 2015-11-21  Jan Hubicka  <hubicka@ucw.cz>
409         * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
410         flag for types that are not ODR; fix loop walking parameters.
412 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
414         * lto-lang.c: Remove unused header files.
415         * lto-object.c: Likewise.
416         * lto-partition.c: Likewise.
417         * lto-symtab.c: Likewise.
418         * lto.c: Likewise.
420 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
422         * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
424 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
426         * lto-lang.c: Don't undef DEF_BUILTIN.
428 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
430         * lto-lang.c: Reorder #include's and remove duplicates.
431         * lto-object.c: Likewise.
432         * lto-partition.c: Likewise.
433         * lto-symtab.c: Likewise.
434         * lto.c: Likewise.
436 2015-10-27  Mikhail Maltsev  <maltsevm@gmail.com>
438         * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
439         conditionals.
440         (lto_fixup_state): Likewise.
441         (do_whole_program_analysis): Use
442         symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
443         conditionals.
445 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
447         * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
448         DEF_FUNCTION_TYPE_11): Define.
450 2015-10-10  Jan Hubicka  <hubicka@ucw.cz>
452         * lto.c (hash_canonical_type): Honor
453         type_with_interoperable_signedness.
455 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
457         * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
458         (DEF_FUNCTION_TYPE_VAR_11): Delete.
460 2015-08-31  Richard Biener  <rguenther@suse.de>
462         * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
463         * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
464         (lto_symtab_prevailing_decl): Do not replace a decl that didn't
465         participate in merging with something else.
467 2015-08-31  Richard Biener  <rguenther@suse.de>
469         * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
470         test, do not replace a non-builtin with a builtin.
471         * lto.c (compare_tree_sccs_1): Do not merge things we stream
472         as builtins vs. non-builtins.
474 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
476         * lto.h: Remove useless typedefs.
478 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
480         * lto.c: Remove redundant includes.
482 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
484         * lto-lang.c: Fix double word typos.
486 2015-07-10  Andrew MacLeod  <amacleod@redhat.com>
488         * lto.c: Include cfghooks.h rather than predict.h.
490 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
492         * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
493         lto-streamer.h.
494         * lto-object.c: Likewise.
495         * lto-partition.c: Likewise.
496         * lto-symtab.c: Likewise.
498 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
500         * lto-lang.c: Adjust includes for flags.h changes.
502 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
504         * lto-lang.c: Adjust includes.
505         * lto-object.c: Likewise.
506         * lto-partition.c: Likewise.
507         * lto-symtab.c: Likewise.
508         * lto.c: Likewise.
510 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
512         * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
513         * lto-object.c: Likewise.
514         * lto-partition.c: Likewise.
515         * lto-symtab.c: Likewise.
516         * lto-tree.h: Likewise.
517         * lto.c: Likewise.
519 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
521         * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
522         than typed_noop_remove.  Remove redudant typedefs.
524 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
526         * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
527         * lto-object.c: Likewise.
528         * lto-partition.c: Likewise.
529         * lto-symtab.c: Likewise.
530         * lto.c: Likewise.
532 2015-06-14  Jan Hubicka  <hubicka@ucw.cz>
534         PR ipa/66181
535         * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
537 2015-06-12  DJ Delorie  <dj@redhat.com>
539         * lto-lang.c (lto_type_for_size): Include intN types.
540         (lto_type_for_mode): Likewise.
542 2015-06-08  Jan Hubicka  <hubicka@ucw.cz>
544         * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
546 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
548         * lto-lang.c : Adjust include files.
549         * lto-object.c : Likewise.
550         * lto-partition.c : Likewise.
551         * lto-partition.h : Likewise.
552         * lto-symtab.c : Likewise.
553         * lto.c : Likewise.
554         * lto.h : Likewise.
556 2015-06-06  Jan Hubicka  <hubicka@ucw.cz>
558         PR lto/65378
559         * lto-symtab.c (warn_type_compatibility_p): Fix call of
560         odr_or_derived_type_p.
561         (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
563 2015-06-08  Jan Hubicka  <hubicka@ucw.cz>
566         * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
567         pointers.
569 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
571         * lto-lang.c (lto_write_globals): Remove.
572         (LANG_HOOKS_WRITE_GLOBALS): Same.
574 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
576         * lto-lang.c: Adjust includes for restructured coretypes.h.
577         * lto-object.c: Likewise.
578         * lto-partition.c: Likewise.
579         * lto-symtab.c: Likewise.
580         * lto.c: Likewise.
582 2015-06-04  Jan Hubicka  <hubicka@ucw.cz>
584         * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
586 2015-06-03  Jan Hubicka  <hubicka@ucw.cz>
588         * lto.c (iterative_hash_canonical_type,
589         gimple_register_canonical_type): only hash main variants of types
591 2015-05-27  Martin Liska  <mliska@suse.cz>
593         * lto-partition.c (new_partition): Reset number of symbols.
594         (add_symbol_to_partition_1): Increment number of symbols.
595         (undo_partition): Decrement number of symbols.
596         (lto_balanced_map): Dump number of symbols and insns that
597         belong to a partition.
598         * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
600 2015-05-22  Jan Hubicka  <hubicka@ucw.cz>
602         * lto.c (hash_canonical_type): Be sure we hash only types that
603         need alias set.
604         (gimple_register_canonical_type_1): Do not produce canonical
605         types for types that do not need alias sets.
607 2015-05-22  Jan Hubicka  <hubicka@ucw.cz>
609         * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
611 2015-05-19  Jan Hubicka  <hubicka@ucw.cz>
613         * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
615 2015-05-17  Jan Hubicka  <hubicka@ucw.cz>
617         * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
618         compare ODR types (if available) and function types.
619         (lto_symtab_merge): ... here; output ODR violation warnings
620         and call warn_types_mismatch.
622 2015-04-29  Jan Hubicka  <hubicka@ucw.cz>
624         * lto.c (lto_fixup_state): Call verify_type.
626 2015-04-18  Trevor Saunders  <tsaunders@mozilla.com>
628         * lto.c: Adjust for hash_table changes.
630 2015-03-27  Jan Hubicka  <hubicka@ucw.cz>
632         * lto.c (lto_read_decls): Move code registering odr types out
633         of TYPE_CANONICAL conditional and also register polymorphic types.
635 2015-03-26  Jan Hubicka  <hubicka@ucw.cz>
637         * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
638         DECL_ARTIFICAL symbols.
640 2015-03-26  Jan Hubicka  <hubicka@ucw.cz>
642         PR lto/65536
643         * lto.c (unify_scc): Revert location cache when unification
644         suceeded.
645         (lto_read_decls): Accept location cache after sucess;
646         apply location cache before calling debug hooks.
648 2015-03-10  Jan Hubicka  <hubicka@ucw.cz>
650         * lto.c (read_cgraph_and_symbols): Do not do merging
651         at ltrans stage.
653 2015-02-26  Jakub Jelinek  <jakub@redhat.com>
655         * lto.c (lto_mode_identity_table): New variable.
656         (lto_read_decls): Add mode_table argument to the lto_input_block
657         constructor.
658         (lto_file_finalize): Initialize mode_table.
659         (lto_init): Initialize lto_mode_identity_table.
661 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
663         PR libgomp/64625
664         * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
665         Remove macros.
666         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
668 2015-02-03  Jan Hubicka  <hubicka@ucw.cz>
670         * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
672 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
674         * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
675         changed to pass input_location as first argument.
677 2014-12-11  Jan Hubicka  <hubicka@ucw.cz>
679         * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
681 2014-12-11  Jan Hubicka  <hubicka@ucw.cz>
683         * lto.c (compare_tree_sccs_1): Add comparsion of
684         DECL_FUNCTION_SPECIFIC_TARGET
686 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
687             James Norris  <jnorris@codesourcery.com>
689         * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
690         New macros.
691         * lto.c: Include "gomp-constants.h".
693 2015-01-14  Ilya Verbin  <ilya.verbin@intel.com>
695         * lto-partition.c (lto_promote_cross_file_statics): Remove argument
696         from select_what_to_stream.
698 2015-01-09  Bernd Schmidt  <bernds@codesourcery.com>
699             Jakub Jelinek  <jakub@redhat.com>
701         PR middle-end/64412
702         * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
703         if ACCEL_COMPILER.
705 2015-01-09  Michael Collison  <michael.collison@linaro.org>
707         * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
708         input.h, alias.h, symtab.h, options, fold-const.h,
709         wide-int.h, and inchash.h due to flattening of tree.h.
710         * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
711         input.h, alias.h, symtab.h, fold-const.h,
712         wide-int.h, and inchash.h due to flattening of tree.h.
713         * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
714         input.h, alias.h, symtab.h, options, fold-const.h,
715         wide-int.h, and inchash.h due to flattening of tree.h.
716         * lto-partition.c: Ditto.
717         * lto-symtab.c: Ditto.
719 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
721         Update copyright years.
723 2014-12-22  Martin Liska  <mliska@suse.cz>
725         * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
726         is used.
727         (undo_partition): Likewise.
728         (lto_balanced_map): Likewise.
730 2014-12-22  Martin Liska  <mliska@suse.cz>
732         * lto-partition.c: Include of symbol-summary.h is added.
733         * lto-symtab.c: Likewise.
734         * lto.c: Likewise.
736 2014-12-11  Jan Hubicka  <hubicka@ucw.cz>
738         PR ipa/61324
739         * lto.c (read_cgraph_and_symbols): Update call of
740         remove_unreachable_nodes.
741         (do_whole_program_analysis): Remove call of
742         symtab->remove_unreachable_nodes
744 2014-12-08  Trevor Saunders  <tsaunders@mozilla.com>
746         * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
747         htab with malloc instead of ggc.
749 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
751         * lto.c: Replace htab with hash_table.
753 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
755         * lto.c (lto_read_in_decl_state): Adjust.
756         (lto_fixup_state): Likewise.
758 2014-11-17  Jan Hubicka  <hubicka@ucw.cz>
760         * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
762 2014-11-14  Jan Hubicka  <hubicka@ucw.cz>
764         * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
766 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
767             Bernd Schmidt  <bernds@codesourcery.com>
768             Andrey Turetskiy  <andrey.turetskiy@intel.com>
769             Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
771         * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
773 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
774             Ilya Tocar  <ilya.tocar@intel.com>
775             Andrey Turetskiy  <andrey.turetskiy@intel.com>
776             Bernd Schmidt  <bernds@codesourcery.com>
778         * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
779         LTO_SECTION_NAME_PREFIX.
780         * lto-partition.c (lto_promote_cross_file_statics): Call
781         select_what_to_stream.
782         * lto.c (lto_section_with_id): Use section_name_prefix instead of
783         LTO_SECTION_NAME_PREFIX.
784         (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
785         being built as an offload compiler.
787 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
789         * lto-lang.c: Remove redundant enum from machine_mode.
791 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
793         * lto.c: Adjust include files.
794         * lto-lang.c: Ditto.
795         * lto-object.c: Ditto.
796         * lto-partition.c: Ditto.
797         * lto-symtab.c: Ditto.
799 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
801         * lto-lang.c: Adjust include files.
802         * lto-object.c: Ditto.
803         * lto-partition.c: Ditto.
804         * lto-symtab.c: Ditto.
805         * lto.c: Ditto.
807 2014-10-16  DJ Delorie  <dj@redhat.com>
809         * lto-object.c (lto_obj_begin_section): In the event that pointer
810         sizes aren't powers of two, choose a more suitable alignment
811         than (unsigned)(-1).
813 2014-10-14  DJ Delorie  <dj@redhat.com>
815         * lto-lang.c (lto_build_c_type_nodes): Check intN types for
816         size-type as well.
817         (lto_init): Initialize all intN types, not just int128.
819 2014-10-06  Martin Liska  <mliska@suse.cz>
821         * lto.c (stream_out): ARG_UNUSED added for last argument.
823 2014-09-24  Aldy Hernandez  <aldyh@redhat.com>
825         * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
826         DECL_ABSTRACT_P.
828 2014-09-23  Andi Kleen  <ak@linux.intel.com>
830         * lto-partition.c (node_cmp): Update comment.
831         (varpool_node_cmp): Use symtab_node for comparison.
832         (add_sorted_nodes): New function.
833         (lto_balanced_map): Change to keep ordered queue
834         of ordered node. Handle no_reorder attribute.
836 2014-09-11  Jan Hubicka  <hubicka@ucw.cz>
838         * lto.c (lto_read_decls): Register ODR types.
840 2014-08-20  Jan Hubicka  <hubicka@ucw.cz>
842         * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
843         call.
844         (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
846 2014-08-14  Jan Hubicka  <hubicka@ucw.cz>
848         * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
850 2014-08-14  Richard Biener  <rguenther@suse.de>
852         PR lto/62067
853         * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
855 2014-08-08  Richard Biener  <rguenther@suse.de>
857         * lto.c (lto_read_decls): Adjust for lto_input_block changes.
859 2014-08-08  Bin Cheng  <bin.cheng@arm.com>
861         PR lto/62032
862         * lto-lang.c (lto_init): Switch mis-matched arguments.
864 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
866         * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
868 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
870         * lto-partition.c, lto-partition.h: Use hash_set instead of
871         pointer_set.
873 2014-07-31  Andi Kleen  <ak@linux.intel.com>
875         * lto.c (hash_canonical_type): Use inchash::hash
876         and use inchash::add_expr.
877         (iterative_hash_canonical_type): Dito.
879 2014-07-30  Richard Biener  <rguenther@suse.de>
881         * lto-streamer.h (lto_write_data): New function.
882         * langhooks.c (lhd_append_data): Do not free block.
883         * lto-section-out.c (lto_write_data): New function writing
884         raw data to the current section.
885         (lto_write_stream): Adjust for langhook semantic change.
886         (lto_destroy_simple_output_block): Write header directly.
887         * lto-opts.c (lto_write_options): Write options directly.
888         * lto-streamer-out.c (produce_asm): Write heaeder directly.
889         (lto_output_toplevel_asms): Likewise.
890         (copy_function_or_variable): Copy data directly.
891         (write_global_references): Output index table directly.
892         (lto_output_decl_state_refs): Likewise.
893         (write_symbol): Write data directly.
894         (produce_symtab): Adjust.
895         (produce_asm_for_decls): Output header and refs directly.
897 2014-07-25  Andi Kleen  <ak@linux.intel.com>
899         * lto.c (hash_canonical_type): Call iterative_hstate_expr.
901 2014-07-25  Andi Kleen  <ak@linux.intel.com>
903         * lto.c (hash_canonical_type): Convert to inchash.
904         (iterative_hash_canonical_type): Dito.
906 2014-07-25  Andi Kleen  <ak@linux.intel.com>
908         * lto.c: Include inchash.h
910 2014-07-14  Jan Hubicka  <hubicka@ucw.cz>
912         * lto.c (mentions_vars_p_decl_non_common): Skip
913         DECL_ARGUMENT_FLD.
914         mentions_vars_p_function): Do DECL_ARGUMENTS.
915         (lto_fixup_prevailing_decls): Update.
917 2014-07-12  Jan Hubicka  <hubicka@ucw.cz>
919         * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
920         timevar
921         (materialize_cgraph): Do not push GIMPLE_IN timevar.
923 2014-07-11  Jan Hubicka  <hubicka@ucw.cz>
925         * lto-partition.c (add_references_to_partition): Use 
926         varpool_ctor_useable_for_folding_p.
927         * lto.c (lto_read_in_decl_state): Update sanity check.
929 2014-07-01  Martin Liska  <mliska@suse.cz>
931         IPA REF alias refactoring
932         * lto-partition.c (add_symbol_to_partition_1): Usage of
933         FOR_EACH_ALIAS added.
935 2014-06-28  Jan Hubicka  <hubicka@ucw.cz>
937         Revert:
938         * lto.c (lto_copy_fields_not_streamed): New function.
939         (compare_tree_sccs_1): Do not compare fields shared in between type
940         and variant.
941         (lto_read_decls): Fixup types first before inserting into hash.
943 2014-06-28  Andrew Pinski  <apinski@cavium.com>
945         * lto.c (lto_read_decls): Fix comment in comment.
947 2014-06-28  Jan Hubicka  <hubicka@ucw.cz>
949         * lto.c (lto_copy_fields_not_streamed): New function.
950         (compare_tree_sccs_1): Do not compare fields shared in between type
951         and variant.
952         (lto_read_decls): Fixup types first before inserting into hash.
954 2014-06-25  Martin Liska  <mliska@suse.cz>
956         * lto/lto-partition.c (add_references_to_partition): New IPA REF function
957         used.
958         (add_symbol_to_partition_1): Likewise.
959         (lto_balanced_map): Likewise.
960         * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
962 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
964         * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
965         (mentions_vars_p_function): ... here.
966         (compare_tree_sccs_1): Update VINDEX checks.
967         (lto_fixup_prevailing_decls): Likewise.
969 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
971         * lto.c (canonical_type_hash_cache): Use hash_map instead of
972         pointer_map.
974 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
976         * lto.c: Adjust.
978 2014-06-20  Jan Hubicka  <hubicka@ucw.cz>
980         * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
982 2014-06-20  Jan Hubicka  <hubicka@ucw.cz>
984         * lto.c (compare_tree_sccs_1): Do not compare priorities.
986 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
988         * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
990 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
992         * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
993         (do_whole_program_analysis): Use verify_symtab.
995 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
997         * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
998         lto_fixup_prevailing_decls): Skip section names.
1000 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1002         * lto-symtab.c: Include builtins.h.
1004 2014-05-26  Richard Biener  <rguenther@suse.de>
1006         * lto.c (lto_parse_hex): Use int64_t.
1007         (lto_resolution_read): Likewise.
1009 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1011         * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1013 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1015         * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1016         symtab pointer.
1017         * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1019 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
1021         * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1022         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1023         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1025 2012-05-22  Bernd Schmidt  <bernds@codesourcery.com>
1027         * lto-object.c: Include "lto-section-names.h".
1028         (LTO_SEGMENT_NAME): Don't define.
1029         * lto.c: Include "lto-section-names.h".
1031 2014-05-17  Jan Hubicka  <hubicka@ucw.cz>
1033         PR lto/61012
1034         * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1035         mixed with variables.
1037 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
1039         * lto-tree.h: Don't use variable_size gty attribute.
1040         * lto.c (lto_read_in_decl_state): Adjust.
1041         (create_subid_section_table): Likewise.
1042         (lto_flatten_files): Likewise.
1043         (read_cgraph_and_symbols): Likewise.
1045 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
1046             Mike Stump  <mikestump@comcast.net>
1047             Richard Sandiford  <rdsandiford@googlemail.com>
1049         * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1050         * lto-lang.c (get_nonnull_operand): Likewise.
1052 2014-04-28  Richard Biener  <rguenther@suse.de>
1054         PR middle-end/60092
1055         * lto-lang.c: Define flag_isoc11.
1057 2014-04-23  David Malcolm  <dmalcolm@redhat.com>
1059         * lto-partition.c (add_references_to_partition): Update for
1060         removal of implicit pointer from the is-a.h API.
1061         (add_symbol_to_partition_1): Likewise.
1062         (contained_in_symbol): Likewise.
1063         (undo_partition): Likewise.
1064         (lto_balanced_map): Likewise.
1065         (promote_symbol): Likewise.
1066         * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1067         (lto_symtab_merge_symbols): Likewise.
1068         * lto.c (lto_wpa_write_files): Likewise.
1070 2014-04-15  Richard Biener  <rguenther@suse.de>
1072         * lto.c: Include params.h.
1073         (do_whole_program_analysis): Switch on flag_lto_partition value,
1074         add support for LTO_PARTITION_ONE.
1075         * lto-partition.h (lto_balanced_map): Adjust.
1076         * lto-partition.c (lto_balanced_map): Get number of desired
1077         partitions as argument to support -flto-partition=one.
1079 2014-04-14  Jan Hubicka  <hubicka@ucw.cz>
1081         * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1082         tp_first_run.
1084 2014-03-19  Jan Hubicka  <hubicka@ucw.cz>
1086         * lto.c: Include ipa-inline.h
1087         (do_whole_program_analysis): Free inline summary after partitioning.
1089 2014-03-19  Richard Biener  <rguenther@suse.de>
1091         PR middle-end/60553
1092         * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT 
1093         instead of TREE_CHAIN as chain_next.
1095 2014-03-19  Richard Biener  <rguenther@suse.de>
1097         * lto.c (lto_wpa_write_files): Move call to
1098         lto_promote_cross_file_statics ...
1099         (do_whole_program_analysis): ... here, into the partitioning
1100         block.  Do not ggc_collect after lto_wpa_write_files but
1101         for a last time before it.
1103 2014-03-19  Jakub Jelinek  <jakub@redhat.com>
1105         PR lto/60571
1106         * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1107         Fix formatting.
1109 2014-03-18  Jakub Jelinek  <jakub@redhat.com>
1111         PR sanitizer/60535
1112         * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1113         and complex_{float,{,long_}double}_type_node.
1115 2014-03-08  Paulo Matos  <paulo@matos-sorge.com>
1117         * lto-lang.c (lto_init): Pass flag_short_double to
1118         build_common_tree_nodes.
1120 2014-02-14  Jan Hubicka  <hubicka@ucw.cz>
1122         PR lto/60295
1123         * lto.c (stream_out): Avoid parallel streaming with
1124         -flto=jobserver until we are able to throttle it down
1125         resonably.
1127 2014-02-14  Jan Hubicka  <hubicka@ucw.cz>
1129         * lto-partition.c (add_symbol_to_partition_1,
1130         undo_partition, lto_balanced_map): Aliases have no
1131         defined size.
1132         (lto_balanced_map): Do not follow refering variables
1133         if they can be optimized out.
1135 2014-02-14  Richard Biener  <rguenther@suse.de>
1137         PR lto/60179
1138         * lto.c (compare_tree_sccs_1): Do not compare
1139         DECL_FUNCTION_SPECIFIC_TARGET.
1140         (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1142 2014-02-12  Richard Biener  <rguenther@suse.de>
1144         PR lto/60060
1145         * lto-lang.c (lto_write_globals): Do not call
1146         wrapup_global_declarations or emit_debug_global_declarations
1147         but emit debug info for non-function scope variables
1148         directly.
1150 2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
1152         * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1154 2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
1156         PR ipa/59469
1157         * lto-partition.c (symbol_class): Move to cgraph.h
1158         (get_symbol_class): Move to symtab.c
1159         (add_references_to_partition, add_symbol_to_partition_1,
1160         lto_max_map, lto_1_to_1_map, lto_balanced_map,
1161         lto_promote_cross_file_statics): Update.
1163 2014-02-05  Jan Hubicka  <hubicka@ucw.cz>
1165         * lto.c (lto_parallelism): New static var.
1166         (do_stream_out, wait_for_child, stream_out): New static functions.
1167         (lto_wpa_write_files): Add support for parallel streaming.
1168         (do_whole_program_analysis): Set parallelism.
1169         * lang.opt (fwpa): Add parameter.
1170         * lto-lang.c (lto_handle_option): Handle flag_wpa.
1171         (lto_init): Update use of flag_wpa.
1172         * lto-streamer.h (asm_nodes_output): Declare.
1174 2014-02-05  Richard Biener  <rguenther@suse.de>
1176         * lto.h (lto_global_var_decls): Remove.
1177         * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1178         (lto_write_globals): Do nothing in WPA stage, gather globals from
1179         the varpool here ...
1180         * lto.c (lto_main): ... not here.
1181         (materialize_cgraph): Do not call rest_of_decl_compilation
1182         on the empty lto_global_var_decls vector.
1183         (lto_global_var_decls): Remove.
1185 2014-02-04  Jan Hubicka  <hubicka@ucw.cz>
1187         * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY 
1188         needs duplicating, not generic COMDAT.
1190 2014-02-04  Richard Biener  <rguenther@suse.de>
1192         PR lto/59723
1193         * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1194         (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1196 2014-02-04  Jan Hubicka  <hubicka@ucw.cz>
1197             Markus Trippelsdorf
1199         PR ipa/59469
1200         * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1201         merge force_output and forced_by_abi flags.
1203 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1205         * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1206         flag_cilkplus.
1208 2014-01-09  Richard Biener  <rguenther@suse.de>
1210         * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1212 2014-01-09  Richard Biener  <rguenther@suse.de>
1214         PR lto/45586
1215         * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1216         TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1217         (gimple_canonical_types_compatible_p): Do not compare them either.
1219 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1221         Update copyright years
1223 2013-12-06  Oleg Endo  <olegendo@gcc.gnu.org>
1225         * lto.c: Remove struct tags when referring to class varpool_node.
1226         * lto-partition.c: Likewise.
1227         * lto-symtab.c: Likewise.
1229 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
1230             Richard Biener  <rguenther@suse.de>
1232         PR lto/59326
1233         * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1235 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
1237         PR lto/59326
1238         * lto.c (mentions_vars_p_omp_clause): New function.
1239         (mentions_vars_p): Call it for OMP_CLAUSE.  Remove break;
1240         after return stmts.
1242 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
1244         * lto.c: Add required include files from gimple.h.
1245         * lto-lang.c: Likewise
1246         * lto-object.c: Likewise
1247         * lto-partition.c: Likewise
1248         * lto-symtab.c: Likewise
1250 2013-11-18  Trevor Saunders  <tsaunders@mozilla.com>
1252         * lto-partition.c lto-symtab.c lto.c Adjust.
1254 2013-11-14  Diego Novillo  <dnovillo@google.com>
1256         * lto-lang.c: Include stringpool.h.
1257         Include stor-layout.h.
1258         * lto-partition.c: Include gcc-symtab.h.
1259         * lto.c: Include stor-layout.h.
1261 2013-10-31  David Malcolm  <dmalcolm@redhat.com>
1263         Automated part of renaming of symtab_node_base to symtab_node.
1265         Patch autogenerated by rename_symtab.py from
1266         https://github.com/davidmalcolm/gcc-refactoring-scripts
1267         revision 58bb219cc090b2f4516a9297d868c245495ee622
1269         * lto-partition.c (add_symbol_to_partition): Rename
1270         symtab_node_base to symtab_node.
1271         (get_symbol_class): Likewise.
1272         (symbol_partitioned_p): Likewise.
1273         (add_references_to_partition): Likewise.
1274         (add_symbol_to_partition_1): Likewise.
1275         (contained_in_symbol): Likewise.
1276         (add_symbol_to_partition): Likewise.
1277         (lto_1_to_1_map): Likewise.
1278         (lto_max_map): Likewise.
1279         (lto_balanced_map): Likewise.
1280         (privatize_symbol_name): Likewise.
1281         (promote_symbol): Likewise.
1282         (may_need_named_section_p): Likewise.
1283         (rename_statics): Likewise.
1284         (lto_promote_statics_nonwpa): Likewise.
1285         * lto-symtab.c (lto_symtab_merge): Likewise.
1286         (lto_symtab_resolve_replaceable_p): Likewise.
1287         (lto_symtab_symbol_p): Likewise.
1288         (lto_symtab_resolve_can_prevail_p): Likewise.
1289         (lto_symtab_resolve_symbols): Likewise.
1290         (lto_symtab_merge_decls_2): Likewise.
1291         (lto_symtab_merge_decls_1): Likewise.
1292         (lto_symtab_merge_decls): Likewise.
1293         (lto_symtab_merge_symbols_1): Likewise.
1294         (lto_symtab_merge_symbols): Likewise.
1295         (lto_symtab_prevailing_decl): Likewise.
1296         * lto.c (lto_wpa_write_files): Likewise.
1297         (read_cgraph_and_symbols): Likewise.
1298         (do_whole_program_analysis): Likewise.
1300 2013-10-30  David Malcolm  <dmalcolm@redhat.com>
1302         * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1303         declarations onto multiple lines to make things easier for
1304         rename_symtab.py.
1305         (lto_symtab_merge_decls_1): Likewise.
1306         (lto_symtab_merge_symbols_1): Likewise.
1308 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1310         * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1311         * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1312         Plus is enabled.
1314 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
1316         Patch autogenerated by refactor_symtab.py from
1317         https://github.com/davidmalcolm/gcc-refactoring-scripts
1318         revision 58bb219cc090b2f4516a9297d868c245495ee622
1320         * lto-partition.c (lto_promote_cross_file_statics): Update for
1321         conversion of symtab types to a true class hierarchy.
1322         (rename_statics): Likewise.
1323         (promote_symbol): Likewise.
1324         (privatize_symbol_name): Likewise.
1325         (lto_balanced_map): Likewise.
1326         (varpool_node_cmp): Likewise.
1327         (node_cmp): Likewise.
1328         (lto_1_to_1_map): Likewise.
1329         (undo_partition): Likewise.
1330         (add_symbol_to_partition): Likewise.
1331         (contained_in_symbol): Likewise.
1332         (add_symbol_to_partition_1): Likewise.
1333         (add_references_to_partition): Likewise.
1334         (symbol_partitioned_p): Likewise.
1335         (get_symbol_class): Likewise.
1336         (lto_max_map): Likewise.
1337         * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1338         (lto_symtab_merge_symbols): Likewise.
1339         (lto_symtab_merge_symbols_1): Likewise.
1340         (lto_symtab_merge_decls): Likewise.
1341         (lto_symtab_merge_decls_1): Likewise.
1342         (lto_symtab_merge_decls_2): Likewise.
1343         (lto_symtab_resolve_symbols): Likewise.
1344         (lto_symtab_resolve_can_prevail_p): Likewise.
1345         (lto_symtab_symbol_p): Likewise.
1346         (lto_symtab_resolve_replaceable_p): Likewise.
1347         (lto_symtab_merge): Likewise.
1348         (lto_varpool_replace_node): Likewise.
1349         (lto_cgraph_replace_node): Likewise.
1350         * lto.c (lto_main): Likewise.
1351         (do_whole_program_analysis): Likewise.
1352         (materialize_cgraph): Likewise.
1353         (read_cgraph_and_symbols): Likewise.
1354         (cmp_partitions_order): Likewise.
1355         (lto_materialize_function): Likewise.
1356         (has_analyzed_clone_p): Likewise.
1358 2013-10-29  Andrew MacLeod  <amacleod@redhat.com>
1360         * lto/lto-object.c: Add gimple.h to include list.
1361         * lto/lto-partition.c: Likewise.
1363 2013-10-18  Andrew MacLeod  <amacleod@redhat.com>
1365         * lto.c: Remove tree-flow.h from include list.
1367 2013-10-15  Richard Biener  <rguenther@suse.de>
1369         * lto.c (hash_canonical_type): Split out from ...
1370         (iterative_hash_canonical_type): ... here.  Register types
1371         we recurse to.
1372         (gimple_canonical_type_hash): Adjust.
1373         (gimple_register_canonical_type_1): Split out from ...
1374         (gimple_register_canonical_type): ... here.  Cache computed
1375         hash value.
1376         (lto_register_canonical_types): Split into two modes,
1377         clearing and computing TYPE_CANONICAL.
1378         (lto_read_decls): Adjust.
1379         (read_cgraph_and_symbols): Do two passes over global trees,
1380         first clearing then computing TYPE_CANONICAL.
1382 2013-10-14  Richard Biener  <rguenther@suse.de>
1384         * lto.c (gimple_canonical_types): Move out-of GC space.
1385         (canonical_type_hash_cache): Make a pointer-map.
1386         (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1387         New counters.
1388         (iterative_hash_canonical_type): Adjust.
1389         (read_cgraph_and_symbols): Likewise.
1390         (print_lto_report_1): Likewise.
1392 2013-10-14  Richard Biener  <rguenther@suse.de>
1394         * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1395         type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1396         gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1397         gimple_types_compatible_p_1, gimple_types_compatible_p,
1398         visit, iterative_hash_name, struct type_hash_pair,
1399         type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1400         gimple_type_eq, gimple_register_type, num_not_merged_types,
1401         num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1402         num_not_merged_types_in_same_scc_trees): Remove old merging code
1403         and statistics.
1404         (lto_read_decls): Do not run old merging code in parallel.
1405         (read_cgraph_and_symbols): Do not init/free old merging
1406         data structures.
1407         (print_lto_report_1): Do not report differences of old vs. new
1408         merging code.
1410 2013-10-14  Richard Biener  <rguenther@suse.de>
1412         * lto-lang.c (lto_init): Do not re-init canonical types here.
1413         (lto_register_canonical_types): Move to ...
1414         * lto.c (lto_register_canonical_types): ... here.
1415         (gimple_canonical_types, canonical_type_hash_cache,
1416         iterative_hash_canonical_type, gimple_canonical_type_hash,
1417         gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1418         gimple_register_canonical_type): Add canonical type merging machinery
1419         moved from gimple.c.
1420         (read_cgraph_and_symbols): Init and free canonical type tables
1421         here.
1422         (print_lto_report_1): Report canonical type table stats here.
1424 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
1426         * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1428 2013-09-25  Tom Tromey  <tromey@redhat.com>
1430         * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1431         (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1432         (lto/lto-object.o): Remove.
1434 2013-09-06  Richard Biener  <rguenther@suse.de>
1436         * lto-symtab.c: Move from gcc/
1437         * lto.h: Include vec.h.
1438         (lto_global_var_decls): Declare.
1439         * lto.c (lto_global_var_decls): Move definition here.
1440         * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1441         (lto-symtab.o): Add.
1442         * config-lang.in (gtfiles): Add lto.h.
1444 2013-08-31  Jan Hubicka  <jh@suse.cz>
1446         * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls): 
1447         DECL_FIELD_OFFSET can contain an reference to variable.
1449 2013-08-31  Jan Hubicka  <jh@suse.cz>
1451         * lto.c (tree_with_vars): Turn into vector.
1452         (MAYBE_REMEMBER_WITH_VARS): Change to...
1453         (CHECK_VAR): ... this one.
1454         (CHECK_NO_VAR): New macro.
1455         (maybe_remember_with_vars_typed): Turn to ...
1456         (mentions_vars_p_typed): ... this one.
1457         (maybe_remember_with_vars_common): Turn to ...
1458         (mentions_vars_p_comon): ... this one.
1459         (maybe_remember_with_vars_decl_minimal): Turn to ...
1460         (mentions_vars_p_decl_minmal): ... this one.
1461         (maybe_remember_with_vars_decl_common): Turn to ...
1462         (mentions_vars_p_decl_common): ... this one.
1463         (maybe_remember_with_vars_decl_with_vis): Turn to ...
1464         (mentions_vars_p_decl_with_vis): ... this one.
1465         (maybe_remember_with_vars_decl_non_common): Turn to ...
1466         (mentions_vars_p_decl_non_common): ... this one.
1467         (maybe_remember_with_vars_function): Turn to ...
1468         (mentions_vars_p_function): ... this one.
1469         (maybe_remember_with_vars_field_decl): Turn to ...
1470         (mentions_vars_p_field_decl): ... this one.
1471         (maybe_remember_with_vars_type): Turn to ...
1472         (mentions_vars_p_type): ... this one.
1473         (maybe_remember_with_vars_binfo): Turn to ...
1474         (mentions_vars_p_binfo): ... this one.
1475         (maybe_remember_with_vars_constructor): Turn to ...
1476         (mentions_vars_p_constructor): ... this one.
1477         (maybe_remember_with_vars_expr): Turn to ...
1478         (mentions_vars_p_expr): ... this one.
1479         (maybe_remember_with_vars): Turn to ...
1480         (mentions_vars_p): ... this one.
1481         (lto_read_decls): Update.
1482         (LTO_SET_PREVAIL): Do not call function for internal decls.
1483         (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1484         check that something was updated.
1485         (lto_fixup_state): Do not care about internal decls.
1486         (lto_fixup_decls): Update.
1487         (read_cgraph_and_symbols): Update.
1489 2013-08-29  Jan Hubicka  <jh@suse.cz>
1491         * lto.c (read_cgraph_and_symbols): Free decl states.
1493 2013-08-29  Jan Hubicka  <jh@suse.cz>
1495         * lto.c (compare_tree_sccs_1): Compare  DECL_FINAL_P,
1496         DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1497         TYPE_FINAL_P.
1499 2013-08-28  Jan Hubicka  <jh@suse.cz>
1501         * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1502         DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1503         (unify_scc): Do checking assert.
1505 2013-08-06  Jan Hubicka  <jh@suse.cz>
1506             Martin Liska  <marxin.liska@gmail.com>
1508         * lto-partition.c (lto_balanced_map): Always base order on 
1509         source file order.
1511 2013-08-06  Jan Hubicka  <jh@suse.cz>
1513         * lto.c (lto_materialize_function): Do not read body anymore.
1515 2013-08-02  Jan Hubicka  <jh@suse.cz>
1517         * lto.c (lto_materialize_function): Do not push struct function.
1518         * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1519         (may_need_named_section_p): Even abstract origins may need
1520         named section.
1522 2013-07-30  David Malcolm  <dmalcolm@redhat.com>
1524         * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1525         PASS_MANAGER_H.
1527         * lto.c (do_whole_program_analysis): Update for move of
1528         all_regular_ipa_passes from a global to a field of class
1529         pass_manager.
1531 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
1533         * lto-partition.c: Fix typos.
1535 2013-06-20  Jan Hubicka  <jh@suse.cz>
1537         * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1538         partitioning of variables.
1540 2013-06-20  Jan Hubicka  <jh@suse.cz>
1542         * lto.c (read_cgraph_and_symbols): Set cgraph state.
1544 2013-06-19  Jan Hubicka  <jh@suse.cz>
1546         * lto-partition.c (add_references_to_partition): Use
1547         ctor_for_folding.
1549 2013-06-18  Richard Biener  <rguenther@suse.de>
1551         * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1552         and use it.
1553         (lto_register_function_decl_in_symtab): Likewise.
1554         (cmp_tree): New function.
1555         (unify_scc): Instead of using the streamer cache map from entry
1556         to cache index match up the two maps we have by sorting them.
1557         Adjust calls to lto_register_var_decl_in_symtab and
1558         lto_register_function_decl_in_symtab.
1560 2013-06-17  Richard Biener  <rguenther@suse.de>
1562         * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1563         * lto.c: Include data-streamer.h.
1564         (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1565         (gimple_type_leader_entry_s, gimple_type_leader,
1566         gimple_lookup_type_leader): Remove.
1567         (gtc_visit): Simplify.
1568         (gimple_types_compatible_p): Likewise.
1569         (gimple_register_type_1): Likewise.  Merge into ...
1570         (gimple_register_type): ... this.  Keep it as legacy for
1571         statistics purposes for now.
1572         (fixup_integer_cst): Remove.
1573         (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1574         rename to ...
1575         (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1576         maybe_remember_with_vars_*): ... these.
1577         (uniquify_nodes): Remove.
1578         (lto_fixup_prevailing_type): New function.
1579         (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1580         (tree_scc_hash, tree_scc_hash_obstack): New globals.
1581         (num_merged_types, num_prevailing_types, num_not_merged_types,
1582         num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1583         total_scc_size_merged, num_sccs_merged, num_scc_compares,
1584         num_scc_compare_collisions): New global counters.
1585         (compare_tree_sccs_1): New function.
1586         (compare_tree_sccs): Likewise.
1587         (unify_scc): Likewise.
1588         (lto_read_decls): Stream in tree SCCs and unify them on the
1589         way in.  Finalize prevailing SCC tree members.
1590         (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1591         Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1592         to ggc-collect during merging.
1593         (print_lto_report_1): Adjust for new merging code.
1595 2013-06-12  Jan Hubicka  <jh@suse.cz>
1597         * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1599 2013-06-12  Jan Hubicka  <jh@suse.cz>
1601         * lto.c (register_resolution): Take lto_file_data argument.
1602         (lto_register_var_decl_in_symtab,
1603         lto_register_function_decl_in_symtab): Update.
1604         (read_cgraph_and_symbols): Update resolution_map handling.
1606 2013-06-11  Jan Hubicka  <jh@suse.cz>
1608         * lto-partition.c (get_symbol_class): Simplify weakref handling.
1609         (add_symbol_to_partition_1): Likewise.
1610         (contained_in_symbol): Likewise.
1611         (lto_balanced_map): Likewise.
1612         (rename_statics): Drop weakref.
1614 2013-06-05  Richard Biener  <rguenther@suse.de>
1616         * lto.c (num_merged_types): New global variable.
1617         (uniquify_nodes): Increase num_merged_types when merging a type.
1618         (print_lto_report_1): Output the number of merged types.
1620 2013-06-01  Jan Hubicka  <jh@suse.cz>
1622         * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1623         lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1624         (do_whole_program_analysis): Update dumping.
1626 2013-05-29  Jan Hubicka  <jh@suse.cz>
1628         * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1629         flags.
1630         * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1632 2013-05-15  Jan Hubicka  <jh@suse.cz>
1634         * lto-partition.c (privatize_symbol_name): Return true when
1635         privatizing happened.
1636         (rename_statics): Do not go into infinite loop when privatizing
1637         is not needed.
1639 2013-05-16  Jason Merrill  <jason@redhat.com>
1641         * Make-lang.in ($(LTO_EXE)): Use link mutex.
1643 2013-05-15  Martin Jambor  <mjambor@suse.cz>
1645         * lto-partition.c (lto_balanced_map): Print symbol order instead
1646         of node uids.
1648 2013-05-15  Jan Hubicka  <jh@suse.cz>
1650         PR lto/57038
1651         PR lto/47375
1652         * lto-partition.c (get_symbol_class): Fix weakrefs.
1653         (lto_balanced_map): Fix weakrefs.
1654         (privatize_symbol_name): Remove unnecesary label.
1655         (rename_statics): Handle weakrefs as statics.
1657 2013-05-09  Jan Hubicka  <jh@suse.cz>
1658             Richard Biener  <rguenther@suse.de>
1660         * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1661         (lto_register_var_decl_in_symtab): Likewise.
1662         (lto_main): Promote statics.
1663         * lto-partition.c (privatize_symbol_name): New function.
1664         (promote_symbol): Use it.
1665         (may_need_named_section_p): New predicate.
1666         (rename_statics): New functions.
1667         (lto_promote_cross_file_statics): Simplify; do renaming.
1668         (lto_promote_statics_nonwpa): New function.
1669         * lto-partition.h (lto_promote_statics_nonwpa): New function.
1671 2013-02-08  Richard Biener  <rguenther@suse.de>
1673         PR lto/56231
1674         * lto-lang.c (lto_init): Do not enter a dummy file.
1676 2013-02-07  Uros Bizjak  <ubizjak@gmail.com>
1678         PR bootstrap/56227
1679         * lto.c (lto_resolution_ready): Use %wx instead of
1680         HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1682 2013-02-04  Richard Guenther  <rguenther@suse.de>
1684         PR lto/56168
1685         * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1686         or lto_fixup_decls at LTRANS time.
1688 2013-01-09  Jan Hubicka  <jh@suse.cz>
1690         PR lto/45375
1691         * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1693 2012-12-10  H.J. Lu  <hongjiu.lu@intel.com>
1695         PR lto/55466
1696         * lto.c (lto_register_var_decl_in_symtab): Don't record static
1697         variables.
1698         (lto_main): Record the global variables if WPA isn't enabled.
1700 2012-11-20  Diego Novillo  <dnovillo@google.com>
1701             Jakub Jelinek  <jakub@redhat.com>
1703         * lto.c: Replace all vec<T, A>() initializers with vNULL.
1705 2012-11-16  Diego Novillo  <dnovillo@google.com>
1707         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1709         * lto-lang.c: Use new vec API in vec.h.
1710         * lto-partition.c: Likewise.
1711         * lto-partition.h: Likewise.
1712         * lto.c: Likewise.
1714 2012-10-31  Lawrence Crowl  <crowl@google.com>
1716         * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1717         down-cast via dyn_cast.
1718         * lto-partition.c (add_symbol_to_partition_1): Likewise.
1719         (undo_partition): Likewise.
1720         (lto_balanced_map): Likewise.
1721         (get_symbol_class): Likewise and via is_a.
1722         (lto_balanced_map): Change symtab checking to is_a.
1724 2012-10-12  Richard Biener  <rguenther@suse.de>
1726         PR lto/54898
1727         * lto.c (gimple_types_compatible_p_1): Also compare
1728         TYPE_MAIN_VARIANT.
1729         (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1731 2012-10-09  Tobias Burnus  <burnus@net-b.de>
1733         * lto-lang.c (lto_register_builtin_type): Avoid useless
1734         decl creation.
1735         * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1737 2012-10-08  Tobias Burnus  <burnus@net-b.de>
1739         * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1740         Free lto_file struct after closing the file.
1742 2012-10-08  Jan Hubicka  <jh@suse.cz>
1744         * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1745         (fixup_integer_cst): New functoin.
1746         (lto_ft_type): Fixup BASETYPE of methods and offsets.
1748 2012-10-07  Jan Hubicka  <jh@suse.cz>
1750         * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1751         release input encoders.
1752         * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1754 2012-10-06  Jan Hubicka  <jh@suse.cz>
1756         PR lto/54790 
1757         * lto.c (resolution_map): New static var.
1758         (register_resolution): New function.
1759         (lto_register_var_decl_in_symtab): Use it.
1760         (read_cgraph_and_symbols): Copy resolutions into the symtab.
1762 2012-09-20  Martin Jambor  <mjambor@suse.cz>
1764         * lto.c (lto_materialize_function): Call push_struct_function and
1765         pop_cfun.
1767 2012-09-19  Dehao Chen  <dehao@google.com>
1769         * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1771 2012-09-19  Jan Hubicka  <jh@suse.cz>
1773         * lto.c (lto_materialize_function): Update confused comment.
1774         (read_cgraph_and_symbols): Do not free symtab.
1776 2012-09-12  Jan Hubicka  <jh@suse.cz>
1778         * lto.c (do_whole_program_analysis): Care timevars, statistics and
1779         AUX pointer cleaning. Add max partitioning.
1780         * lto-partition.c (enum symbol_class): New.
1781         (get_symbol_class): New function.
1782         (symbol_partitioned_p): New function.
1783         (add_references_to_partition): Remove.
1784         (add_aliases_to_partition): Remove.
1785         (add_cgraph_node_to_partition_1): Remove.
1786         (add_cgraph_node_to_partition): Remove.
1787         (add_symbol_to_partition): New function.
1788         (add_symbol_to_partition_1): New function.
1789         (contained_in_symbol): New function.
1790         (partition_cgraph_node_p): Remove.
1791         (partition_varpool_node_p): Remove.
1792         (partition_symbol_p): Remove.
1793         (lto_1_to_1_map): Cleanup.
1794         (lto_max_map): New.
1795         (lto_balanced_map): Update.
1796         (lto_promote_cross_file_statics): Update.
1797         * lto-partition.h (lto_max_map): Declare.
1798         * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1800 2012-09-11  Jan Hubicka  <jh@suse.cz>
1802         PR lto/54312
1803         * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1804         type is variant leader.
1806 2012-09-11  Richard Guenther  <rguenther@suse.de>
1808         * lto.c (enum gtc_mode): Remove.
1809         (struct type_pair_d): Adjust.
1810         (lookup_type_pair): Likewise.
1811         (gimple_type_leader): Do not mark as deletable.
1812         (gimple_lookup_type_leader): Adjust.
1813         (gtc_visit): Likewise.
1814         (gimple_types_compatible_p_1): Likewise.
1815         (gimple_types_compatible_p): Likewise.
1816         (gimple_type_hash): Likewise.
1817         (gimple_register_type): Likewise.
1818         (read_cgraph_and_symbols): Manage lifetime of tables
1819         here.
1821 2012-09-11  Richard Guenther  <rguenther@suse.de>
1823         * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1824         struct type_pair_d, lookup_type_pair, struct sccs,
1825         next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1826         gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1827         gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1828         visit, iterative_hash_name, struct type_hash_pair,
1829         type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1830         gimple_type_eq, gimple_register_type_1, gimple_register_type):
1831         Move here from gimple.c
1832         (read_cgraph_and_symbols): Free hash tables here.
1833         (print_lto_report_1): New function wrapping print_lto_report.
1834         (do_whole_program_analysis): Call it.
1835         (lto_main): Likewise.
1837 2012-09-10  Jan Hubicka  <jh@suse.cz>
1839         * lto-partition.c (partition_symbol_p): Forward declare.
1840         (add_references_to_partition): Reimplement using partition_symbol_p.
1841         (add_aliases_to_partition): Break out from add_references_to_partition;
1842         reimplement using partition_symbol_p.
1843         (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1844         add sanity checks.
1845         (add_varpool_node_to_partition): Use add_aliases_to_partition.
1846         (partition_varpool_node_p): Do not special case aliases.
1848 2012-08-12  Jan Hubicka  <jh@suse.cz>
1850         * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1851         it is deleted after streaming.
1852         * lto-partition.c (partition_symbol_p): New function.
1853         (promote_var, promote_fn): Remove.
1854         (promote_symbol): New function.
1855         (lto_promote_cross_file_statics): First compute boundaries; rewrite
1856         to lookup the actual boundaries instead of computing them ad-hoc.
1858 2012-08-12  Jan Hubicka  <jh@suse.cz>
1860         Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1861         in partitioning.
1862         * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1863         by encoder.
1864         * lto-partition.c (new_partition): Update.
1865         * lto.c (cmp_partitions_order): Update.
1866         (lto_wpa_write_files): Update.
1867         (free_ltrans_partitions): Update.
1868         (add_references_to_partition): Update.
1869         (add_cgraph_node_to_partition_1): Update.
1870         (add_cgraph_node_to_partition): Update.
1871         (add_varpool_node_to_partition): Update.
1872         (undo_partition): Update.
1873         (lto_balanced_map): Update.
1874         (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1875         set_referenced_from_this_partition_p): Update.
1876         (lto_promote_cross_file_statics): Update.
1878 2012-08-12  Jan Hubicka  <jh@suse.cz>
1880         * lto-partition.c (set_referenced_from_other_partition_p,
1881         set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1882         New functions.
1883         (lto_promote_cross_file_statics): Use them.
1885 2012-07-24  Jan Hubicka  <jh@suse.cz>
1887         * lto.c (read_cgraph_and_symbols): Use input_symtab.
1889 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
1891         * lto-tree.h (lang_decl): Add variable_size GTY option.
1893 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1895         * lto.c: Do not include timevar.h.
1896         * Make-lang.in: Fix dependencies.
1898 2012-06-18  Lawrence Crowl  <crowl@google.com>
1900         * lto.c (do_whole_program_analysis):  Rename use of TV_PHASE_CGRAPH to
1901         TV_PHASE_OPT_GEN.  Use new timevar TV_PHASE_STREAM_OUT around the call
1902         to lto_wpa_write_files.
1903         (lto_main):  Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN.  Move
1904         start of TV_PHASE_OPT_GEN to include call to materialize_cgraph.  Use
1905         TV_PHASE_SETUP for the call to lto_init.  Use new timevar
1906         TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1907         Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1908         to be a front end, but is not one.
1910 2012-05-18  Jan Hubicka  <jh@suse.cz>
1912         * lto.c (lto_materialize_constructors_and_inits): Remove.
1913         (read_cgraph_and_symbols): Remove handling of alias pairs.
1915 2012-05-17  Jan Hubicka  <jh@suse.cz>
1917         * lto-partition.c (add_references_to_partition): Handle external vars.
1918         (partition_varpool_node_p): Likewise.
1919         (lto_promote_cross_file_statics): Do not promote externals.
1921 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
1923         * lto-lang.c (handle_fnspec_attribute): New static function.
1924         (lto_attribute_table): Add "fn spec".
1925         (DEF_ATTR_STRING): Define and undefine along with the other macros.
1927 2012-05-04  Jan Hubicka  <jh@suse.cz>
1929         * lto.c (do_whole_program_analysis): Set timevars correctly.
1930         (lto_main): Likewise.
1932 2012-05-04  Richard Guenther  <rguenther@suse.de>
1934         * lang.opt (fwpa): Do not mark as Optimization.
1935         (fltrans): Likewise.
1937 2012-04-30  Jan Hubicka  <jh@suse.cz>
1939         * lto.c (lto_main): Use compile ().
1940         * lto-partition.c (partition_cgraph_node_p): Use
1941         symtab_used_from_object_file_p.
1942         (partition_varpool_node_p): Likewise.
1944 2012-04-20  Jan Hubicka  <jh@suse.cz>
1946         * lto-partition.c (partition_cgraph_node_p): Use force_output.
1948 2012-04-18  Jan Hubicka  <jh@suse.cz>
1950         * lto-partition.c (add_references_to_partition, lto_balanced_map):
1951         Update for new ipa-ref API.
1953 2012-04-16  Jan Hubicka  <jh@suse.cz>
1955         * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1956         walkers to walk cgraph and varpool.
1957         (materialize_cgraph): Likewise.
1958         * lto-partition.c (lto_1_to_1_map): Likewise.
1959         (lto_balanced_map): Likewise.
1960         (lto_promote_cross_file_statics): Likewise.
1962 2012-04-14  Jan Hubicka  <jh@suse.cz>
1964         * lto.c: Update field referenced for new cgraph/varpool layout.
1965         * lto-partition.c: Likewise.
1967 2012-04-11  Jan Hubicka  <jh@suse.cz>
1969         * lto.c: Update copyright; remove params.h, ipa-inline.h
1970         and ipa-utils.h inlines; inline lto-partition.h
1971         (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1972         add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1973         add_references_to_partition, add_cgraph_node_to_partition_1,
1974         add_cgraph_node_to_partition, add_varpool_node_to_partition,
1975         undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1976         lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1977         promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1978         * lto-partition.c: ... here; new file.
1979         * lto-partition.h: New file.
1980         * Make-lang.in (lto.o): Update dependencies.
1981         (lto-partition.o): New.
1983 2012-04-05  Richard Guenther  <rguenther@suse.de>
1985         * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1986         definition.
1988 2012-03-12  Richard Guenther  <rguenther@suse.de>
1990         * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1992 2012-03-06  Richard Guenther  <rguenther@suse.de>
1994         PR lto/52097
1995         * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1997 2012-02-28  Richard Guenther  <rguenther@suse.de>
1999         PR lto/52400
2000         * lto.c (lto_register_function_decl_in_symtab): Do not register
2001         a reverse renamed decl mapping.
2003 2012-01-06  Jakub Jelinek  <jakub@redhat.com>
2005         PR lto/51774
2006         * lto-lang.c (handle_returns_twice_attribute): New function.
2007         (lto_attribute_table): Add returns_twice attribute.
2009 2011-12-21  Richard Guenther  <rguenther@suse.de>
2011         * lto.c (GIMPLE_REGISTER_TYPE): New define.
2012         (LTO_FIXUP_TREE): Use it.
2013         (uniquify_nodes): Mark new non-prevailing types and avoid
2014         calling gimple_register_type on others.
2015         (lto_read_decls): Add comment.
2017 2011-12-13  Eric Botcazou  <ebotcazou@adacore.com>
2019         * lto.h (lto_parse_hex): Delete.
2020         * lto.c (lto_read_decls): Use 'int' for offsets.
2021         (lto_parse_hex): Make static and return proper 64-bit host type.
2022         (lto_resolution_read): Use proper 64-bit host type.
2024 2011-12-13  Richard Guenther  <rguenther@suse.de>
2026         PR lto/48354
2027         * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2028         with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2030 2011-12-01  Uros Bizjak  <ubizjak@gmail.com>
2032         * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2033         (ignore_attribute): New.
2035 2011-11-21  Aldy Hernandez  <aldyh@redhat.com>
2037         * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2038         (handle_transaction_pure_attribute): New.
2040 2011-11-03  Richard Guenther  <rguenther@suse.de>
2042         PR lto/44965
2043         * lto-lang.c (lto_post_options): Do not read file options.
2044         * lto.c (lto_read_all_file_options): Remove.
2045         (lto_init): Call lto_set_in_hooks here.
2047 2011-10-09  Jan Hubicka  <jh@suse.cz>
2049         * lto.c (node_cmp, varpool_node_cmp): New functions.
2050         (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2051         (cmp_partitions): Rename to ...
2052         (cmp_partitions_size): ... this one.
2053         (cmp_partitions_order): New function.
2054         (lto_wpa_write_files): Sort partitions by order when
2055         -fno-toplevel-reorder is used.
2057 2011-10-09  Andi Kleen  <ak@linux.intel.com>
2059         * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2061 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2063         * lto-lang.c (def_builtin_1): Delete old interface with two
2064         parallel arrays to hold standard builtin declarations, and replace
2065         it with a function based interface that can support creating
2066         builtins on the fly in the future.  Change all uses, and poison
2067         the old names.  Make sure 0 is not a legitimate builtin index.
2069 2011-10-02   Andi Kleen  <ak@linux.intel.com>
2071         * lto-object.c (lto_obj_add_section_data): Add list.
2072         (lto_obj_add_section): Fill in list.
2073         (ltoobj_build_section_table): Pass through list.
2074         * lto.c (file_data_list): Declare.
2075         (create_subid_section_table): Pass arguments directly.
2076         Fill in list of file_datas.
2077         (lwstate): Delete.
2078         (lto_create_files_from_ids): Pass in direct arguments.
2079         Don't maintain list.
2080         (lto_file_read): Use explicit section and file data lists.
2081         (lto_read_all_file_options): Pass in section_list.
2082         * lto.h (lto_obj_build_section_table): Add list.
2083         (lto_section_slot): Add next.
2084         (lto_section_list): Declare.
2086 2011-10-02  Jan Hubicka  <jh@suse.cz>
2088         PR lto/47247
2089         * common.c (lto_resolution_str): Add new resolution.
2090         * common.h (lto_resolution_str): Likewise.
2092 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
2093             Andi Kleen  <ak@linux.intel.com>
2095         PR lto/50568
2096         * lto.c (lto_splay_tree_delete_id): New.
2097         (lto_splay_tree_compare_ids): Likewise.
2098         (lto_splay_tree_lookup): Likewise.
2099         (lto_splay_tree_id_equal_p): Likewise.
2100         (lto_splay_tree_insert): Likewise.
2101         (lto_splay_tree_new): Likewise.
2102         (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2103         Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2104         (create_subid_section_table): Use lto_splay_tree_lookup and
2105         lto_splay_tree_insert.
2106         (lto_file_read): Use lto_splay_tree_new.
2108 2011-09-26   Andi Kleen  <ak@linux.intel.com>
2110         * lto.c (lto_resolution_read): Remove id dumping.
2111         (lto_section_with_id): Turn id HOST_WIDE_ID.
2112         (create_subid_section_table): Dito.
2114 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
2116         * lto-lang.c (lto_init): Likewise.  Also, avoid calling
2117         linemap_add twice.
2119 2011-08-11  Martin Jambor  <mjambor@suse.cz>
2121         * lto.c (uniquify_nodes): Use main variant's BINFO too.
2123 2011-08-08   Diego Novillo  <dnovillo@google.com>
2125         * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2126         * lto.c: Include tree-streamer.h.
2128 2011-07-06  Richard Guenther  <rguenther@suse.de>
2130         * lto-lang.c (lto_init):
2131         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2133 2011-06-11  Jan Hubicka  <jh@suse.cz>
2135         PR lto/48246
2136         * lto.c (lto_1_to_1_map): Don't create empty partitions.
2137         (lto_balanced_map): Likewise.
2139 2011-06-11  Jan Hubicka  <jh@suse.cz>
2141         * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2142         (add_cgraph_node_to_partition) ... here; walk aliases.
2143         (lto_1_to_1_map): Remove same body alias code.
2144         (promote_fn): Likewise.
2145         (lto_promote_cross_file_statics): Update comment.
2148 2011-06-07  Diego Novillo  <dnovillo@google.com>
2150         * lto.c (uniquify_nodes): Move code to register decls to
2151         the loop that computes canonical types.
2153 2011-06-07  Richard Guenther  <rguenther@suse.de>
2155         * lto-lang.c (lto_init): Do not set
2156         size_type_node or call set_sizetype.
2158 2011-06-04  Diego Novillo  <dnovillo@google.com>
2160         * lto.c (lto_init): New.
2161         (lto_main): Call it.
2163 2011-06-03  Diego Novillo  <dnovillo@google.com>
2165         * lto.c (get_resolution): Move from lto-streamer-in.c.
2166         (lto_register_var_decl_in_symtab): Likewise.
2167         (lto_register_function_decl_in_symtab): Likewise.
2168         (uniquify_nodes): Call lto_register_var_decl and
2169         lto_register_function_decl_in_symtab after reading a new
2170         VAR_DECL or FUNCTION_DECL.
2172 2011-06-01  Richard Guenther  <rguenther@suse.de>
2174         * lto-lang.c (lto_register_canonical_types): New function.
2175         (lto_init): Register common nodes with the canonical type machinery.
2176         Do not play tricks with char_type_node.
2178 2011-05-26  Richard Guenther  <rguenther@suse.de>
2180         * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2182 2011-05-25  Nathan Froyd  <froydnj@codesourcery.com>
2184         * lto.c (lto_ft_typed): New function.
2185         (lto_ft_common): Call it.
2186         (lto_ft_constructor): Likewise.
2187         (lto_ft_expr): Likewise.
2188         (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2189         TREE_CHAIN.
2191 2011-05-20  Richard Guenther  <rguenther@suse.de>
2193         * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2194         (lto_ft_type): Move main-variant and pointer-to chain building ...
2195         (uniquify_nodes): ... here.  Compute TYPE_CANONICAL also here,
2196         in a separate final loop.
2198 2011-05-19  Richard Guenther  <rguenther@suse.de>
2200         * lto.c (uniquify_nodes): First register all types before
2201         fixing up the tree SCC.
2203 2011-05-11  Jan Hubicka  <jh@suse.cz>
2205         PR lto/48952
2206         * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2208 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
2210         * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL.  Adjust
2211         location of binfo field.
2212         (lto_fixup_prevailing_decls): Likewise.
2214 2011-05-10  Nathan Froyd  <froydnj@codesourcery.com>
2216         * lto-lang.c (def_fn_type): Don't call build_function_type, call
2217         build_function_type_array or build_varargs_function_type_array
2218         instead.
2220 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
2222         * lto-lang.c (global_bindings_p): Return bool.
2224 2011-05-07  Jan Hubicka  <jh@suse.cz>
2226         * lto.c (lto_materialize_function): Use
2227         cgraph_function_with_gimple_body_p.
2228         (add_cgraph_node_to_partition): Do not re-add items to partition;
2229         handle thunks.
2230         (add_varpool_node_to_partition): Do not re-add items to partition.
2232 2011-05-03  Jan Hubicka  <jh@suse.cz>
2234         * lto.c (free_ltrans_partitions): Fix accidental commit.
2236 2011-05-03  Jan Hubicka  <jh@suse.cz>
2238         * lto.c (ltrans_partition_def): Remove GTY annotations.
2239         (ltrans_partitions): Move to heap.
2240         (new_partition): Update.
2241         (free_ltrans_partitions): New function.
2242         (lto_wpa_write_files): Use it.
2244 2011-04-29  Martin Jambor  <mjambor@suse.cz>
2246         * lto.c: Include ipa-utils.h.
2247         (lto_balanced_map): Update call to ipa_reverse_postorder.
2248         * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2250 2011-04-29  Michael Matz  <matz@suse.de>
2252         * lto.c (toplevel): Include tree-flow.h.
2253         (lto_read_in_decl_state): Don't merge types here.
2254         (tree_with_vars): New static hash table.
2255         (remember_with_vars): New static functions.
2256         (LTO_FIXUP_TYPE): New macro.
2257         (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2258         lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2259         lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2260         lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2261         (lto_read_decls): Uniquify while reading in trees.
2262         (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2263         LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2264         lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2265         lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2266         lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2267         lto_fixup_tree): Remove.
2268         (lto_fixup_state): Remove data argument.  Use
2269         lto_symtab_prevailing_decl.
2270         (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2271         (lto_fixup_prevailing_decls): New function.
2272         (lto_fixup_state_aux): Argument aux is unused.
2273         (lto_fixup_decls): Don't allocate pointer sets, don't use
2274         lto_fixup_tree, use lto_fixup_prevailing_decls.
2275         (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2276         * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2278 2011-04-16  Eric Botcazou  <ebotcazou@adacore.com>
2280         * lto.c (lto_balanced_map): Fix typos in head comment.
2281         (lto_promote_cross_file_statics): Fix long lines and remove redundant
2282         test.
2284 2011-04-16  Jan Hubicka  <jh@suse.cz>
2286         * lto.c (lto_balanced_map): Update.
2288 2011-04-14  Jan Hubicka  <jh@suse.cz>
2290         * lto.c: Include ipa-inline.h
2291         (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2292         accessor.
2293         (ipa_node_duplication_hook): Fix declaration.
2294         * Make-lang.in (lto.o): Update dependencies.
2296 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
2298         * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2299         calling TREE_CHAIN.
2300         * lto.c (lto_fixup_common): Likewise.
2302 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
2304         * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2305         (handle_type_generic_attribute): Likewise.
2307 2011-04-03  Michael Matz  <matz@suse.de>
2309         * lto.c (lto_materialize_function): Don't read and then discard
2310         sections in WPA mode.
2311         (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2313         * lto-lang.c (registered_builtin_fndecls): Remove.
2314         (lto_getdecls): Return NULL_TREE.
2315         (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2317 2011-03-31  Richard Guenther  <rguenther@suse.de>
2319         PR lto/48246
2320         * lto.c (lto_wpa_write_files): Disable assert for non-empty
2321         partitions when checking is not enabled.
2323 2011-03-25  Kai Tietz  <ktietz@redhat.com>
2325         * lto.c (lto_resolution_read): Use filename_cmp instead
2326         of strcmp.
2327         (lto_read_section_data): Likewise.
2329 2011-03-25  Jeff Law  <law@redhat.com>
2331         * lto/lto-lang.c (def_fn_type): Add missing va_end.
2333 2011-03-21  Kai Tietz  <ktietz@redhat.com>
2335         PR target/12171
2336         * lto-lang.c (lto_attribute_table): Adjust table.
2338 2011-02-18  Jakub Jelinek  <jakub@redhat.com>
2340         PR bootstrap/47807
2341         * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2342         of lto-streamer.h.
2344 2011-02-18  Richard Guenther  <rguenther@suse.de>
2346         PR lto/47798
2347         * lto-tree.h (lto_global_var_decls): Do not declare here.
2348         * lto-lang.c: Include lto-streamer.h.
2349         * Make-lang.in (lto-lang.o): Adjust dependencies.
2351 2011-02-10  Kai Tietz  <kai.tietz@onevision.com>
2353         PR lto/47241
2354         * lto.c (lto_read_section_data): Free
2355         fd_name in failure case.
2356         For mingw targets don't hash file-descriptor.
2357         (read_cgraph_and_symbols): Close current_lto_file
2358         in failure case.
2360 2011-01-11  Jan Hubicka  <jh@suse.cz>
2362         PR lto/45721
2363         PR lto/45375
2364         * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2365         are not partitioned.
2367 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
2369         * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2370         Use prototype_p.
2372 2010-12-06  Richard Guenther  <rguenther@suse.de>
2374         PR lto/46796
2375         * lto-lang.c (lto_init): Give names to basic types.
2377 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
2379         * lto-object.c: Don't include toplev.h.
2380         * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2382 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
2384         * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2385         $(TOPLEV_H).
2387 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
2389         * lto-endian.h: Delete.
2390         * lto-object.c: Don't include "libiberty.h".
2391         (O_BINARY): Don't define.
2392         * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2393         (O_BINARY): Don't define.
2395 2010-11-23  Richard Guenther  <rguenther@suse.de>
2397         * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2399 2010-11-23  Richard Guenther  <rguenther@suse.de>
2401         PR lto/46605
2402         * lto.c (read_cgraph_and_symbols): Bail out after errors.
2404 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
2406         * lto.c (lto_main): Take no arguments.
2407         * lto.h (lto_main): Update prototype.
2409 2010-11-16  Ian Lance Taylor  <iant@google.com>
2411         * lto-object.c (lto_obj_file_open): Call
2412         simple_object_attributes_merge rather than
2413         simple_object_attributes_compare.
2415 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
2417         * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2418         * lto-lang.c (lto_handle_option): Take location_t parameter.
2420 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
2422         * lto.c (lto_resolution_read): Start diagnostics with lowercase
2423         letters and remove trailing '.'.
2424         (lto_file_finalize): Start diagnostic with a lowercase letter.
2426 2010-11-02  Ian Lance Taylor  <iant@google.com>
2428         * lto-object.c: New file.
2429         * lto-elf.c: Remove file.
2430         * lto-macho.c: Remove file.
2431         * lto-macho.h: Remove file.
2432         * lto-coff.c: Remove file.
2433         * lto-coff.h: Remove file.
2434         * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2435         lto/lto-object.o.
2436         ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2437         (lto/lto-objfile.o): New target.
2438         (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2439         (lto/lto.o): Remove $(LIBIBERTY_H).
2441 2010-10-22  Jan Hubicka  <jh@suse.cz>
2443         * lto.c (add_cgraph_node_to_partition,
2444         add_varpool_node_to_partition): Add debug info.
2445         (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2446         partitioned nodes.
2447         (do_whole_program_analysis): Set function flags before dumping.
2449 2010-10-22  Richard Guenther  <rguenther@suse.de>
2451         * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2452         the new gimple_register_canonical_type.
2454 2010-10-20  H.J. Lu  <hongjiu.lu@intel.com>
2456         PR bootstrap/45954
2457         * config-lang.in (boot_language): Set to $enable_lto.
2459 2010-10-18  Jakub Jelinek  <jakub@redhat.com>
2461         PR lto/45638
2462         * Make-lang.in (check-lto): New dummy target.
2464 2010-10-14  Eric Botcazou  <ebotcazou@adacore.com>
2466         * lto-elf.c (SHN_XINDEX): Define if not already defined.
2468 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
2470         * lto-lang.c (lto_init_options): Change to
2471         lto_init_options_struct.  Update parameters.
2472         (LANG_HOOKS_INIT_OPTIONS): Don't define.
2473         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2475 2010-10-06  Jan Hubicka  <jh@suse.cz>
2477         * lto.c (lto_balanced_map): Fix accounting of program size.
2479 2010-10-06  Jan Hubicka  <jh@suse.cz>
2481         * lto.c (lto_balanced_map): Do not produce empty partitions.
2483 2010-10-06  Andi Kleen  <ak@linux.intel.com>
2485         * lto.c (lto_process_name): Add.
2486         (lto_main): Call lto_process_name.
2488 2010-10-06  Jan Hubicka  <jh@suse.cz>
2490         * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2491         COMDATs required by the linker.
2493 2010-10-05  Ian Lance Taylor  <iant@google.com>
2495         * lto.c (lto_section_with_id): Make s a const pointer.
2497 2010-10-05  Jan Hubicka  <jh@suse.cz>
2499         * lto.c:  Include params.h.
2500         (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2501         refcounting in aux field.
2502         (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2503         New functions.
2504         (lto_1_to_1_map): Simplify.
2505         (lto_balanced_map): New function.
2506         (do_whole_program_analysis): Chose proper partitioning alg.
2507         * Make-lang.in (lto.o): Add dependency on params.h
2509 2010-10-04  Andi Kleen  <ak@linux.intel.com>
2511         * Make-lang.in (lto1): Add + to build rule.
2513 2010-10-03  Andi Kleen  <ak@linux.intel.com>
2515         * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2516           with fatal_error.
2518 2010-09-28  Jan Hubicka  <jh@suse.cz>
2520         * lto-lang.c (handle_leaf_attribute): New function.
2521         (lto_attribute_tables): Add leaf.
2523 2010-09-25  Jie Zhang  <jie@codesourcery.com>
2525         * lto.c (lto_read_all_file_options): Start a new line after
2526         printing out file names.
2528 2010-09-24  Jan Hubicka  <jh@suse.cz>
2530         * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2532 2010-09-20  Jan Hubicka  <jh@suse.cz>
2534         PR tree-optimize/45605
2535         * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2537 2010-09-18  Gerald Pfeifer  <gerald@pfeifer.com>
2539         * lto-elf.c (lto_obj_file_open): Also provide filename when
2540         elf_begin fails.
2542 2010-09-17  Jan Hubicka  <jh@suse.cz>
2544         * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2546 2010-09-17  Richard Guenther  <rguenther@suse.de>
2548         * lang.opt (flag_wpa): Also enable for the driver.
2550 2010-09-16  Jan Hubicka  <jh@suse.cz>
2552         * lto.c (lto_materialize_function): Do not tamper with STATIC and
2553         EXTERNAL flags. 
2555 2010-09-15  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2557         * lto-tree.h (struct lang_type): Add variable_size GTY option.
2559 2010-09-08  Jan Hubicka  <jh@suse.cz>
2561         * lto.c (real_file_count, real_file_decl_data): New static vars.
2562         (read_cgraph_and_symbols): Use it.
2564 2010-09-08  Richard Guenther  <rguenther@suse.de>
2566         * lto.c (read_cgraph_and_symbols): Collect again after each
2567         file.
2569 2010-09-07  Jan Hubicka  <jh@suse.cz>
2571         * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2573 2010-09-03  Richard Guenther  <rguenther@suse.de>
2575         * lto-elf.c (validate_file): Always error if validation fails.
2577 2010-08-20  Jan Hubicka  <jh@suse.cz>
2579         * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2580         (lto_wpa_write_files): Update comments.
2582 2010-08-20  H.J. Lu  <hongjiu.lu@intel.com>
2584         PR bootstrap/45357
2585         * lto.c (lto_materialize_function): Replace has_analyzed_clone
2586         with has_analyzed_clone_p.
2588 2010-08-20  Jan Hubicka  <jh@suse.cz>
2590         * lto.c (has_analyzed_clone_p): New function
2591         (lto_materialize_function): Use callgraph to determine if
2592         body is needed.
2593         (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2595 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
2597         * lto.c: Use FOR_EACH_VEC_ELT.
2599 2010-07-27  Andi Kleen  <ak@linux.intel.com>
2601         * Make-lang.in (lto.o): Add dependency to splay-tree.h
2603 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2605         * lto-lang.c (lto_handle_option): Update prototype and return
2606         value type.  Remove duplicate assignment to result.
2608 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2610         * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2611         New.
2612         (lto_init_options): Update prototype.
2613         (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2614         Define.
2616 2010-07-10  Andi Kleen  <ak@linux.intel.com>
2618         PR lto/44992
2619         * lto.c: Include splay-tree.h
2620         (lto_resolution_read): Change to walk file_ids tree and parse
2621         extra file_id in resolution file.
2622         (lto_section_with_id): Add.
2623         (create_subid_section_table): Add.
2624         (lwstate): Add.
2625         (lto_create_files_from_ids): Add.
2626         (lto_file_read): Change to handle sub file ids and create list
2627         of file_datas. Add output argument for count.
2628         (get_section_data): Pass file_data to lto_get_section_name.
2629         (lto_flatten_file): Add.
2630         (read_cgraph_and_symbols): Handle linked lists of file_datas.
2632 2010-07-10  Andi Kleen  <ak@linux.intel.com>
2634         * lto-coff.c (hash_name, eq_name): Move.
2635         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2636         * lto-elf.c: (hash_name, eq_name): Move.
2637         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2638         * lto-macho.c: (hash_name, eq_name): Move.
2639         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2640         * lto.c: (hash_name, eq_name): Move from lto-*.c
2641         (lto_obj_create_section_hash_table): Add.
2642         (free_with_string): Add.
2644 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2646         * lto-coff.c: Include diagnostic-core.h in every file that
2647         includes toplev.h.
2648         * lto-elf.c: Likewise.
2649         * lto-lang.c: Likewise.
2650         * lto-macho.c: Likewise.
2652 2010-07-07  Jakub Jelinek  <jakub@redhat.com>
2654         * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2655         (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2656         objects.
2658 2010-07-05  Jan Hubicka  <jh@suse.cz>
2660         * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2661         nodes from same comdat group as well as all comdat functions referenced
2662         here.
2663         (add_varpool_node_to_partition, add_references_to_partition): New
2664         function.
2665         (lto_1_1_map): Skip COMDAT fnctions/variables; use
2666         add_varpool_node_to_partition; clear aux flags when done.
2667         (lto_promote_cross_file_statics): Do not promote stuff that gets
2668         duplicated to each ltrans.
2670 2010-07-04  Jan Hubicka  <jh@suse.cz>
2672         * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2674 2010-06-13  Richard Guenther  <rguenther@suse.de>
2676         * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2678 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
2680         * lto.c (lto_resolution_read):  Pre-initialize local variable r.
2681         * lto-coff.c (coff_write_object_file): Add braces to if.
2683 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2685         * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2686         (lto_file_read): Likewise.
2687         (new_partition): Likewise.
2688         (read_cgraph_and_symbols): Likewise.
2690 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
2692         * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2693         (lto_handle_option): Don't set flag_signed_char here.
2695 2010-06-04  Richard Guenther  <rguenther@suse.de>
2697         PR lto/41584
2698         * lto.c (lto_1_to_1_map): Use the proper file_data for
2699         varpool nodes.
2701 2010-05-30  Jan Hubicka  <jh@suse.cz>
2703         * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2704         partitioning decisions.
2706 2010-05-29  Jan Hubicka  <jh@suse.cz>
2708         * lto.c (bitmap vector): Remove.
2709         (lto_cgraph_node_sets,  lto_varpool_node_sets): Remove.
2710         (ltrans_partition_def): New structure.
2711         (ltrans_partition): New type and VECtor.
2712         (new_partition): New function.
2713         (add_cgraph_node_to_partition): New function.
2714         (lto_1_to_1_map): Reorganize for partitions.
2715         (lto_add_inline_clones): Remove.
2716         (lto_add_all_inlinees): Remove.
2717         (lto_promote_cross_file_statics): Use partitions.
2718         (cmp_partitions): New function.
2719         (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2720         use partitions; output files sorted by size.
2722 2010-05-29  Steven Bosscher  <steven@gcc.gnu.org>
2724         * Make-lang.in: Replace vec.h dependency with VEC_H.
2726 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
2728         * lto-coff.c (coff_errmsg): Remove.
2729         (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2730         errors instead of coff_errmsg (-1).
2731         * lto-macho.c (mach_o_errmsg): Remove.
2732         (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2733         instead of mach_o_errmsg (-1).
2734         * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2735         xstrerror (errno).
2737 2010-05-28  Richard Guenther  <rguenther@suse.de>
2739         * lto.c (prefix_name_with_star): Removed.
2740         (strip_extension): Likewise.
2741         (get_filename_for_set): Likewise.
2742         (lto_write_ltrans_list): Fold into ...
2743         (lto_wpa_write_files): ... this.  Name LTRANS units
2744         by suffixing the ltrans output list filename.
2745         (do_whole_program_analysis): Adjust.
2747 2010-05-27  Joseph Myers  <joseph@codesourcery.com>
2749         * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2750         (read_cgraph_and_symbols, lto_main): Use seen_error.
2751         * Make-lang.in (lto/lto.o): Update dependencies.
2753 2010-05-27  Eric Botcazou  <ebotcazou@adacore.com>
2755         PR lto/44230
2756         * lto.h (lto_eh_personality): New prototype.
2757         * lto.c: Include debug.h.
2758         (first_personality_decl): New static variable.
2759         (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2760         first function for which it is non-null.
2761         (lto_eh_personality_decl): New static variable.
2762         (lto_eh_personality): New function.
2763         * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2764         * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2766 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
2768         * lto-lang.c: Do not include expr.h.
2770 2010-05-24  Richard Guenther  <rguenther@suse.de>
2772         * lto-elf.c (lto_obj_build_section_table): Work around
2773         FreeBSD libelf issue.
2775 2010-05-22  Richard Guenther  <rguenther@suse.de>
2777         * lto.c (read_cgraph_and_symbols): Do not collect.
2779 2010-05-20  Jan Hubicka  <jh@suse.cz>
2781         * lto.c (promote_var, promote_fn): New functions.
2782         (lto_promote_cross_file_statics): Compute correctly boundary including
2783         static initializers of readonly vars.
2785 2010-05-18  Jan Hubicka  <jh@suse.cz>
2787         * lto.c (lto_1_to_1_map): Partition non-inline clones.
2788         (lto_promote_cross_file_statics): Deal with non-inline clones.
2790 2010-05-18  Jan Hubicka  <jh@suse.cz>
2792         * lto.c (lto_materialize_function): Announce function when
2793         reading body; allocate_struct_function only when reading body;
2794         do not finalize local statics; ggc_collect after reading;
2795         do not mark reachable node.
2796         (materialize_cgraph): Do not announce function.
2798 2010-05-11  Jan Hubicka  <jh@suse.cz>
2800         * lto.c (materialize_cgraph): Revert my previous patch.
2802 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
2804         * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2805         IMAGE_FILE_MACHINE_AMD64.
2806         * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2808 2010-05-11  Jan Hubicka  <jh@suse.cz>
2810         * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2811         (materialize_cgraph): Add it here.
2813 2010-05-11  Jan Hubicka  <jh@suse.cz>
2815         * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2816         vector.
2818 2010-05-11  Jan Hubicka  <jh@suse.cz>
2820         * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2821         (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2822         use reachable_from_other_partition_p and
2823         referenced_from_other_partition_p test.
2825 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
2827         * lto-coff.c (validate_file): Add x64-coff support.
2828         * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2829         (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2830         * lto-lang.c (lto_build_c_type_nodes): Add check for
2831         'long long unsigned int' for x64-windows.
2832         (lto_init): Likewise.
2835 2010-05-07  Steven Bosscher  <steven@gcc.gnu.org>
2837         * lto.h (struct lto_file_struct): Document offset member.
2838         * lto-endian.h: New file.
2839         * lto-macho.h: New file.
2840         * lto-macho.c: New file.
2841         * Make-lang.in: Add rule for lto-macho.o.
2843 2010-05-07  Richard Guenther  <rguenther@suse.de>
2845         PR lto/43857
2846         PR lto/43371
2847         * lang.opt (fresolution): Change to ...
2848         (fresolution=): ... this.
2849         * lto-lang.c (lto_handle_option): Adjust.
2851 2010-05-07  Richard Guenther  <rguenther@suse.de>
2853         * lto.c (DUMPBASE_SUFFIX): Remove.
2854         (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2855         Rename to ...
2856         (lto_write_ltrans_list): ... only output the list of ltrans files.
2857         (lto_maybe_unlink): Remove.
2858         (do_whole_program_analysis): Do not execute LTRANS phase
2859         from here.
2861 2010-05-06  H.J. Lu  <hongjiu.lu@intel.com>
2863         * lto-lang.c (lto_handle_option): Add argument kind.
2865 2010-05-05  Jan Hubicka  <jh@suse.cz>
2867         * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2868         refs.
2870 2010-05-05  Jan Hubicka  <jh@suse.cz>
2872         * lto.c (lto_1_to_1_map): Partition only needed nodes.
2874 2010-04-30  Jan Hubicka  <jh@suse.cz>
2876         * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2877         use default name.
2878         (lto_wpa_write_files): Write any non-empty partition.
2880 2010-04-30  Jan Hubicka  <jh@suse.cz>
2882         * lto.c: Do not attempt to make constant pool references global.
2884 2010-04-28  Jan Hubicka  <jh@suse.cz>
2886         * lto/lto.c (lto_read_in_decl_state): Use GGC.
2887         (lto_wpa_write_files): Announce what we are writting.
2888         (all_file_decl_data): New.
2889         (read_cgraph_and_symbols): Use GGC; correct timevars.
2890         (do_whole_program_analysis): Collect.
2891         * lto/Make-lang.in (lto.o): Fix dependency.
2892         * Makefile.in (GTFILES): Add lto-streamer.h.
2893         * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2894         (varpool_assemble_pending_decls): Use VAROUT.
2895         * lto-streamer.h (lto_tree_ref_table): Annotate.
2896         (lto_in_decl_state): Annotate.
2897         (lto_file_decl_data): Annotate.
2899 2010-04-28  Jan Hubicka  <jh@suse.cz>
2901         * lto.c (lto_varpool_node_sets): New.
2902         (lto_1_to_1_map): Partition varpool too.
2903         (globalize_context_t, globalize_cross_file_statics,
2904         lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2905         lto_scan_statics_in_remaining_global_vars): Remove.
2906         (lto_promote_cross_file_statics): Rewrite.
2907         (get_filename_for_set): Take vset argument.
2908         (lto_wpa_write_files): Pass around vsets.
2910 2010-04-27  Dave Korn  <dave.korn.cygwin@gmail.com>
2912         PR lto/42776
2913         * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2914         hardcoding 'lto-elf.o'.
2915         ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2917         * lto-coff.h: New file.
2918         * lto-coff.c: Likewise.
2920 2010-04-26  Richard Guenther  <rguenther@suse.de>
2922         * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2924 2010-04-26  Dave Korn  <dave.korn.cygwin@gmail.com>
2926         * lto.h (lto_elf_file_open): Rename prototype from this ...
2927         (lto_obj_file_open): ... to this.
2928         (lto_elf_file_close): Likewise ...
2929         (lto_obj_file_close): ... and likewise.
2930         (lto_elf_build_section_table): Likewise ...
2931         (lto_obj_build_section_table): ... and likewise.
2932         (lto_elf_begin_section): Likewise ...
2933         (lto_obj_begin_section): ... and likewise.
2934         (lto_elf_append_data): Likewise ...
2935         (lto_obj_append_data): ... and likewise.
2936         (lto_elf_end_section): Likewise ...
2937         (lto_obj_end_section): ... and likewise.
2938         * lto.c (lto_file_read): Update references to the above.
2939         (lto_wpa_write_files): Likewise.
2940         (lto_read_all_file_options): Likewise.
2941         (read_cgraph_and_symbols): Likewise.
2942         * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2943         (LANG_HOOKS_APPEND_DATA): Likewise.
2944         (LANG_HOOKS_END_SECTION): Likewise.
2945         * lto-elf.c (lto_elf_file_open): Rename from this ...
2946         (lto_obj_file_open): ... to this, updating any references.
2947         (lto_elf_file_close): Likewise ...
2948         (lto_obj_file_close): ... and likewise.
2949         (lto_elf_build_section_table): Likewise ...
2950         (lto_obj_build_section_table): ... and likewise.
2951         (lto_elf_begin_section): Likewise ...
2952         (lto_obj_begin_section): ... and likewise.
2953         (lto_elf_append_data): Likewise ...
2954         (lto_obj_append_data): ... and likewise.
2955         (lto_elf_end_section): Likewise ...
2956         (lto_obj_end_section): ... and likewise.
2958 2010-04-21  Jan Hubicka  <jh@suse.cz>
2960         * lto.c (lto_fixup_tree): Do not call wpa fixup.
2961         (materialize_cgraph): Likewise.
2963 2010-04-21  Jan Hubicka  <jh@suse.cz>
2965         * lto.c (lto_wpa_write_files): Update.
2966         (read_cgraph_and_symbols): Be more verbose.
2967         (materialize_cgraph): Likewise.
2968         (do_whole_program_analysis): Likewise.
2970 2010-04-21  Jan Hubicka  <jh@suse.cz>
2972         * lto.c (globalize_cross_file_statics): When function has address taken,
2973         it needs to be public.
2975 2010-04-20  Jan Hubicka  <jh@suse.cz>
2977         * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2978         (lto_add_all_inlinees): Likewise.
2979         (lto_wpa_write_files): Likewise.
2981 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2983         * lto-lang.c (lto_init): Remove second argument in call to
2984         build_common_tree_nodes.
2986 2010-04-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2988         * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2989         function.
2991 2010-03-09  Eric Botcazou  <ebotcazou@adacore.com>
2993         PR bootstrap/43276
2994         * lto-elf.c: Define EM_* constants if not already defined.
2996 2010-03-03  Eric Botcazou  <ebotcazou@adacore.com>
2998         * lto-elf.c (is_compatible_architecture): New static function.
2999         (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3001 2010-02-11  Richard Guenther  <rguenther@suse.de>
3003         PR driver/43021
3004         * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3005         appropriately.
3007 2010-01-11  Andy Hutchinson  <hutchinsonandy@gcc.gnu.org>
3009         * lto.c (O_BINARY): Define.
3010         (lto_read_section_data): Open file in binary mode.
3011         * lto-elf.c (O_BINARY): Define.
3012         (lto_elf_file_open): Open file in binary mode. 
3014 2010-01-08  Richard Guenther  <rguenther@suse.de>
3016         PR lto/42528
3017         * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3018         (lto_init): Do not init char_type_node in a standard way
3019         but according to flag_signed_char.
3021 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
3023         PR lto/41564
3024         * lto.c (DUMPBASE_SUFFIX): New.
3025         (lto_execute_ltrans): Append a sequence number to -dumpbase
3026         for LTRANS.
3028 2010-01-02  H.J. Lu  <hongjiu.lu@intel.com>
3030         PR lto/42580
3031         * lto-elf.c (lto_elf_file_open): Stop if the command line
3032         option file is missing.
3034 2009-12-15  Richard Guenther  <rguenther@suse.de>
3036         * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3037         (lto_post_options): Do not disable debuginfo.
3039 2009-12-14  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
3041         * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3043 2009-12-11  Richard Guenther  <rguenther@suse.de>
3045         PR lto/42037
3046         * lto.c (lto_resolution_read): Properly grow the vector.
3048 2009-12-11  Richard Guenther  <rguenther@suse.de>
3050         PR lto/41915
3051         * lto-lang.c (lto_init_options): Initialize flag_complex_method
3052         to the C99 default.  Do not set flag_unit_at_a_time.
3054 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
3056         * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3057         variable.
3059 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
3061         PR bootstrap/42096
3062         * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3063         * lto.c (lto_parse_hex): New.
3064         (lto_resolution_read): Use lto_parse_hex.
3065         * lto.h (lto_parse_hex): New.
3067 2009-11-17  Rafael Avila de Espindola  <espindola@google.com>
3069         * lto-elf.c (lto_file_init): Add offset argument.
3070         (lto_elf_file_open): Record the offset.
3071         * lto.c (lto_resolution_read): Change file_name into a lto_file
3072         argument. Check offsets.
3073         (lto_file_read): Update call to lto_resolution_read.
3074         * lto.h (lto_file_struct): Add the offset field.
3076 2009-11-16  Rafael Avila de Espindola  <espindola@google.com>
3078         * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3080 2009-11-14  Jan Hubicka  <jh@suse.cz>
3082         * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3084 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
3086         * lang.opt (fresolution): Renamed from resolution.
3087         * lto-lang.c (lto_handle_option): Handle new option name.
3088         * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3090 2009-11-04  Richard Guenther  <rguenther@suse.de>
3091             Rafael Avila de Espindola  <espindola@google.com>
3093         * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3094         (lto_elf_file_open): Handle offsets in arguments name@offest.
3096 2009-10-30  Richard Guenther  <rguenther@suse.de>
3098         PR lto/41858
3099         * lto.c (lto_file_read): Do not set file_data->fd.
3100         (lto_read_section_data): Use a single-entry file-descriptor cache.
3101         Do not check the result of xmalloc.
3102         (free_section_data): Do not use file_data->fd.
3103         (lto_read_all_file_options): Likewise.
3105 2009-10-22  Richard Guenther  <rguenther@suse.de>
3107         * lto.c (lto_fixup_jump_functions): Remove.
3108         (lto_fixup_decls): Do not fixup jump functions.
3109         (read_cgraph_and_symbols): Schedule cgraph merging after
3110         summary reading.  Schedule type and decl fixup before
3111         summary reading.
3113 2009-10-22  Richard Guenther  <rguenther@suse.de>
3115         * lto.c (lto_fixup_data_t): Remove free_list member.
3116         (lto_fixup_tree): Do not insert into free_list.
3117         (free_decl): Remove.
3118         (lto_fixup_decls): Remove free-list handling.
3120 2009-10-22  Jan Hubicka  <jh@suse.cz>
3122         * lto.c (lto_fixup_jump_functions): New function.
3123         (lto_fixup_decls): Use it.
3125 2009-10-16  Richard Guenther  <rguenther@suse.de>
3127         PR lto/41715
3128         * lto.c (lto_fixup_tree): Revert last change.
3130 2009-10-14  Richard Guenther  <rguenther@suse.de>
3132         * lto.c (lto_fixup_tree): In case the prevailing decl is not
3133         compatible with the one we replace wrap it around a
3134         VIEW_CONVERT_EXPR.
3136 2009-10-09  Richard Guenther  <rguenther@suse.de>
3138         PR lto/41635
3139         PR lto/41636
3140         * lto.c (read_cgraph_and_symbols): Do not assert we can open
3141         a file.
3142         * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3143         (init_ehdr##BITS): Likewise.
3145 2009-10-08  Joseph Myers  <joseph@codesourcery.com>
3147         * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3148         init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3149         diagnostics.
3150         * lto-lang.c (lto_post_options): Remove trailing "." from
3151         diagnostics.
3153 2009-10-08  Richard Guenther  <rguenther@suse.de>
3155         * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3156         hash tables.
3158 2009-10-07  Joseph Myers  <joseph@codesourcery.com>
3160         * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3162 2009-10-07  Jan Hubicka  <jh@suse.cz>
3164         * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3165         ltrans stage; explain why this is needed and should not.
3167 2009-10-05  Richard Guenther  <rguenther@suse.de>
3169         PR lto/41552
3170         PR lto/41487
3171         * lto.c (lto_read_decls): Do not register deferred decls.
3172         (read_cgraph_and_symbols): Delay symbol and cgraph merging
3173         until after reading the IPA summaries.
3175 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
3177         * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3178         (lto-lang.c): Don't include lto/common.h.
3180 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
3182         * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3183         (lto/common.o): Remove.
3184         * common.c: Remove.
3185         * common.h (lto_kind_str): Remove.
3186         (lto_visibility_str): Remove.
3187         (lto_resolution_str): Make it static.
3189 2009-10-01  Diego Novillo  <dnovillo@google.com>
3191         * lto.c (lto_read_decls): Add comment.
3192         Call internal_error instead of gcc_assert.
3193         (lto_resolution_read): Likewise.
3194         (lto_add_all_inlinees): Tidy.
3195         * Make-lang.in: Fix copyright boilerplate.
3196         (lto.pdf): New.
3197         (lto.install-pdf): New.
3198         * lto-tree.h: Fix copyright boilerplate.
3199         * lang-specs.h: Likewise.
3200         Remove ".lto" entry from compilers fragment.
3201         * lto-elf.c: Move inclusion of gelf.h after config.h.
3202         Tidy formatting everywhere.
3203         * lto.h: Fix copyright boilerplate.
3204         Tidy formatting everywhere.
3205         * common.c: Likewise.
3206         * config-lang.in: Likewise.
3207         * common.h: Likewise.
3208         * lto-lang.c: Likewise.
3210 2009-10-01  Richard Guenther  <rguenther@suse.de>
3212         * lto.c (lto_read_section_data): Use plain lseek/read.
3214 2009-10-01  Richard Guenther  <rguenther@suse.de>
3216         * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3217         use sysconf to query the system page size.
3218         (lto_file_read): Implement fallback using stdio.
3219         (free_section_data): Likewise.
3221 2009-09-29  Diego Novillo  <dnovillo@google.com>
3223         * lto-lang.c (lto_init): Really fix call to
3224         build_common_builtin_nodes.
3226 2009-09-29  Diego Novillo  <dnovillo@google.com>
3228         * lto-lang.c (lto_init): Fix call to
3229         build_common_builtin_nodes.
3231 2009-09-29  Richard Guenther  <rguenther@suse.de>
3233         PR lto/40754
3234         * lto-elf.c (init_shdr##BITS): Properly specify alignment
3235         in bytes.
3236         (first_data_block): New static variable.
3237         (lto_elf_append_data): Align the first data block in each
3238         section.
3240 2009-09-28  Diego Novillo  <dnovillo@google.com>
3242         * lto-lang.c: Tidy.  Remove stale FIXME lto markers.
3243         * lto.c (strip_extension): New.
3244         (get_filename_for_set): Call it.  Do not call make_cwd_temp_file.
3245         (lto_execute_ltrans): Tidy.
3246         Do not pass -fwpa nor -fltrans-* to LTRANS.
3247         * opts.c: Tidy formatting and remove stale FIXME lto markers.
3248         * tree.c (need_assembler_name_p): Call
3249         lang_hooks.decls.may_need_assembler_name_p if set.
3250         * varasm.c (default_binds_local_p_1): Remove check for
3251         flag_ltrans.
3252         * varpool.c (decide_is_variable_needed): Do not test for
3253         in_lto_p.
3255 2009-09-22  Richard Guenther  <rguenther@suse.de>
3257         PR lto/39276
3258         * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3259         * Make-lang.in: Remove ltrans-driver stuff.
3260         * config-lang.in: Likewise.
3261         * lang.opt (fltrans-driver): Remove.
3262         * lto-lang.c (lto_init_options): Remove code initializing
3263         ltrans_driver.
3264         * ltrans-driver: Remove.
3266 2009-09-21  Diego Novillo  <dnovillo@google.com>
3268         * lto-lang.c (lto_define_builtins): Remove superfluous
3269         calls to targetm.init_builtins and build_common_builtin_nodes.
3270         (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3271         build_common_builtin_nodes.
3272         * lto.c (lto_materialize_function): Do nothing if NODE is a
3273         clone.
3275 2009-09-03  Diego Novillo  <dnovillo@google.com>
3277         * lto-elf.c (validate_file): Replace call to
3278         elf_getshstrndx with call to elf_getshdrstrndx.
3280 2009-08-19  Richard Guenther  <rguenther@suse.de>
3282         * lto-lang.c (lto_init): Merge char_type_node with the
3283         appropriately signed variant.
3285 2009-08-19  Richard Guenther  <rguenther@suse.de>
3287         PR lto/41071
3288         * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3289         (lto_fixup_type): Re-build the pointer-to chain part two.
3291 2009-08-19  Richard Guenther  <rguenther@suse.de>
3293         PR lto/41071
3294         * lto.c (lto_fixup_type): Re-build the type variant chain.
3296 2009-08-19  Richard Guenther  <rguenther@suse.de>
3298         PR lto/41071
3299         * lto.c (lto_fixup_constructor): New function.
3300         (lto_fixup_tree): Replace all types.  Properly fixup
3301         constructors and constants.
3303 2009-08-14  Richard Guenther  <rguenther@suse.de>
3305         * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3306         for DECL_LANG_SPECIFIC.
3308 2009-08-13  Richard Guenther  <rguenther@suse.de>
3310         PR lto/41032
3311         * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3313 2009-07-30  Richard Guenther  <rguenther@suse.de>
3315         PR lto/40903
3316         * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3317         the largest decl for output and free TREE_CHAIN for further
3318         use.
3320 2009-07-24  Diego Novillo  <dnovillo@google.com>
3322         * Make-lang.in: Add empty lto.install-plugin target.
3324 2009-07-13  Diego Novillo  <dnovillo@google.com>
3326         * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3328 2009-07-11  Richard Guenther  <rguenther@suse.de>
3330         * lto-lang.c (lto_write_globals): Wrapup global decls.
3332 2009-07-10  Richard Guenther  <rguenther@suse.de>
3334         * lto-lang.c (lto_init): Allocate one more location to make
3335         BUILTINS_LOCATION correct.
3337 2009-07-09  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3339         * lto.c (free_section_data): Cast computed_offset to caddr_t.
3341 2009-07-06  Diego Novillo  <dnovillo@google.com>
3343         * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3344         TYPE_SIZE_UNIT.
3346 2009-07-06  Diego Novillo  <dnovillo@google.com>
3348         * lto.c (preload_common_nodes): Remove.
3349         (lto_read_in_decl_state): Call lto_streamer_cache_get.
3350         (lto_read_decls): Call lto_data_in_create and
3351         lto_data_in_delete.
3352         (free_decl): Do not call ggc_free.
3353         (lto_main): Call lto_init_reader.
3354         * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3355         (lto_init): Initialize main_identifier_node if needed.
3356         Make ptrdiff_type_node be integer_type_node.
3358 2009-06-19  Diego Novillo  <dnovillo@google.com>
3360         * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3361         Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3362         Remove code guarded by #ifdef LOCAL_TRACE.
3364 2009-06-18  Diego Novillo  <dnovillo@google.com>
3366         * lto.c: Update license to GPLv3.
3367         * lto-elf.c: Likewise.
3368         * common.c: Likewise.
3369         * lto-lang.c: Likewise.
3370         * lto.h: Remove superfluous include files.  Update all
3371         users.
3373 2009-06-17  Diego Novillo  <dnovillo@google.com>
3375         * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3377 2009-06-02  Diego Novillo  <dnovillo@google.com>
3379         * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3380         read in.
3381         (materialize_cgraph): Only materialize nodes that have a
3382         representation on file.
3384 2009-06-01  Diego Novillo  <dnovillo@google.com>
3386         * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3388 2009-05-31  Diego Novillo  <dnovillo@google.com>
3390         * lto-lang.c (lto_type_for_mode): Handle all the modes
3391         handled in c_common_type_for_mode.
3393 2009-05-21  Diego Novillo  <dnovillo@google.com>
3395         * lto-elf.c: Always include <gelf.h>.
3396         * config-lang.in (target_libs): Remove.
3397         (build_by_default): Set to no.
3399 2009-05-15  Diego Novillo  <dnovillo@google.com>
3401         * lto.c (lto_materialize_function): Assert that DECL is
3402         not a builtin.
3403         (materialize_cgraph): Don't try to materialize builtin
3404         functions.
3405         * lto-section-out.c (write_symbol_vec): Do not write
3406         builtin functions.
3408 2009-05-13  Diego Novillo  <dnovillo@google.com>
3410         * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3412 2009-05-07  Diego Novillo  <dnovillo@google.com>
3414         * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3415         (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3416         (lto_fixup_type): Call it for TYPE_POINTER_TO,
3417         TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3418         (lto_fixup_tree): Call gimple_register_type when *TP is a
3419         type.
3420         (lto_main): Call bitmap_obstack_initialize.
3422 2009-04-22  Diego Novillo  <dnovillo@google.com>
3424         * lto.c (free_section_data): Tidy.
3425         (lto_1_to_1_map): Tidy.
3426         (lto_add_all_inlinees): Tidy.
3427         (prefix_name_with_star): New.
3428         (get_filename_for_set): New.
3429         (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3430         to determine what cgraph node sets to write.
3431         Call get_filename_for_set to compute temporary file
3432         names.
3433         (lto_execute_ltrans): Do not execute LTRANS on files with
3434         names that start with '*'.
3435         Move logic to execute LTRANS together so that LTRANS is
3436         invoked only if there are any files to compile.
3437         (do_whole_program_analysis): Only remove output files
3438         that do not start with '*'.
3440 2009-04-06  Diego Novillo  <dnovillo@google.com>
3442         * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3443         * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3444         (lto_add_all_inlinees): Tidy.
3446 2009-03-26  Diego Novillo  <dnovillo@google.com>
3448         * lto.c: Include gimple.h.
3449         (lto_read_in_decl_state): Call gimple_register_type for
3450         every type in every stream.
3451         (lto_fixup_common): Call gimple_register_type if T has a
3452         type.
3453         (do_whole_program_analysis): Call print_lto_report.
3454         (lto_main): Call print_lto_report after cgraph_optimize.
3455         * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3457 2009-03-24  Diego Novillo  <dnovillo@google.com>
3459         * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3460         (lto.o): Add dependency on GIMPLE_H.
3462 2009-03-10  Simon Baldwin  <simonb@google.com>
3464         * lto.c (lto_read_all_file_options): Close any open file descriptor
3465         contained in file_data before freeing.
3467 2009-02-24  Rafael Avila de Espindola  <espindola@google.com>
3469         * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3470         for a decl in the original bitmap, not a node.
3471         (lto_add_all_inlinees): Remove original nodes that are not needed.
3472         (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3474 2009-02-24  Diego Novillo  <dnovillo@google.com>
3476         * lto.c (lto_materialize_function): Update
3477         lto_stats.num_function_bodies.
3478         (get_section_data): Initialize *LEN to 0.
3479         (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3480         (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3481         Update lto_stats.num_output_files.
3482         (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3483         (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3484         (lto_main): Initialize lto_stats.
3485         If flag_lto_report is set, call print_lto_report.
3487 2009-02-19  Diego Novillo  <dnovillo@google.com>
3489         Revert
3491         2009-02-19  Rafael Avila de Espindola  <espindola@google.com>
3493                 * lto.c (lto_add_inline_clones): Don't add the
3494                 master clone. Check for a decl in the original
3495                 bitmap, not a node.
3496                 (lto_add_all_inlinees): Remove original nodes
3497                 that are not needed.
3498                 (lto_scan_statics_in_cgraph_node): Don't care if
3499                 the node is the master.
3500                 (lto_promote_cross_file_statics): Use a new
3501                 context.seen_node_decls for each set
3503 2009-02-19  Rafael Avila de Espindola  <espindola@google.com>
3505         * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3506         for a decl in the original bitmap, not a node.
3507         (lto_add_all_inlinees): Remove original nodes that are not needed.
3508         (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3509         (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3510         for each set
3512 2009-02-18  Diego Novillo  <dnovillo@google.com>
3514         * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3515         and TV_WHOPR_WPA_IO.
3516         (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3517         (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3518         (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3519         Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3520         depending on command line flags.
3521         (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3522         (lto_main): Remove timer uses.
3524 2009-02-18  Rafael Avila de Espindola  <espindola@google.com>
3526         * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3527         (lto_wpa_write_files): Update calls to renamed functions.
3529 2009-02-17  Diego Novillo  <dnovillo@google.com>
3531         PR 39203
3532         * lto-lang.c (lto_post_options): Disable -fwhole-program
3533         when running LTRANS.
3535 2009-02-10  Diego Novillo  <dnovillo@google.com>
3537         * lto.c (read_cgraph_and_symbols): Fix comment.
3539 2009-02-10  Diego Novillo  <dnovillo@google.com>
3541         * lto.c (read_cgraph_and_symbols): Read options from all
3542         IL files.
3544 2009-02-10  Diego Novillo  <dnovillo@google.com>
3546         * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3547         (materialize_cgraph): Likewise.
3548         (do_whole_program_analysis): Likewise.
3549         (lto_main): Call read_cgraph_and_symbols,
3550         materialize_cgraph and do_whole_program_analysis.
3552 2009-02-10  Simon Baldwin  <simonb@google.com>
3554         * lto.c: Include lto-opts.h.
3555         * (lto_main): Clear file options at loop start, read any saved
3556         options from the first file handled, and re-issue options.
3557         * Makefile.in (lto.o): Add dependency on lto-opts.h.
3559 2009-02-02  Diego Novillo  <dnovillo@google.com>
3561         * lto.c (lto_main): Stop LTO_TIMER and use
3562         TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3564 2009-01-30  H.J. Lu  <hongjiu.lu@intel.com>
3566         PR lto/38995
3567         * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3568         to POINTER_SIZE.
3570 2009-01-29  Ramana Radhakrishnan  <ramana.r@gmail.com>
3572         * Make-lang.in (LTO_EXE): Link with all 
3573         BACKENDLIBS and not only GMPLIBS
3575 2009-01-28  H.J. Lu  <hongjiu.lu@intel.com>
3577         PR bootstrap/38992
3578         * lto-elf.c: Include gelf.h instead of libelf.h.
3579         (lto_elf_file_close): Replace elfx_update_shstrndx with
3580         gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3581         gelf_update_ehdr.
3583 2009-01-28  H.J. Lu  <hongjiu.lu@intel.com>
3585         PR middle-end/38996
3586         * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3588 2009-01-26  Diego Novillo  <dnovillo@google.com>
3590         * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3592 2009-01-26  Diego Novillo  <dnovillo@google.com>
3594         * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3595         and rename into gimple_types_compatible_p.
3597 2009-01-12  Rafael Avila de Espindola  <espindola@google.com>
3599         * lto-lang.c (lang_hooks): Remove the const qualifier.
3601 2009-01-06  Diego Novillo  <dnovillo@google.com>
3603         * ltrans-driver: Mark 'all' target as phony.
3605 2008-12-31  Diego Novillo  <dnovillo@google.com>
3607         * ltrans-driver: Execute a NOP action for target 'all'.
3609 2008-12-19  Diego Novillo  <dnovillo@google.com>
3611         * lto.c (lto_1_to_1_map): Tidy.
3613 2008-12-19  Diego Novillo  <dnovillo@google.com>
3615         * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3616         be opened, show its name.
3617         * ltrans-driver: If $verbose is set, do not use parallelism.
3619 2008-12-17  Rafael Avila de Espindola  <espindola@google.com>
3621         * lto.c (lto_fixup_function): New.
3622         (lto_fixup_tree): Call lto_fixup_function.
3624 2008-12-14  Doug Kwan  <dougkwan@google.com>
3626         * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3627         variables if there is no function.
3629 2008-12-10  Simon Baldwin  <simonb@google.com>
3631         * ltrans-driver: Always run make in silent mode, to avoid make's
3632         trace on stdout interfering with lto-wrapper output.
3634 2008-12-10  Doug Kwan  <dougkwan@google.com>
3636         * lto.c (lto_add_inline_clones): Do not force master clones of
3637         inlined functions already in SET to be static inline.
3639 2008-12-04  Doug Kwan  <dougkwan@google.com>
3641         * lto.c (globalize_context_t): New type to store states in
3642         globalization of cross-file statics.
3643         (globalize_cross_file_statics): New.
3644         (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3645         static decls that need to be fixed up.
3646         (lto_scan_statics_in_cgraph_node): Change call interface to use
3647         a globalize_context_t CONTEXT for all states used.
3648         (lto_scan_statics_in_remaining_global_vars): New.
3649         (lto_promote_cross_file_statics): Use new call interface of
3650         LTO_SCAN_STATICS_IN_CGRAPH_NODE.  Handle remaining externally
3651         visible vars in the last set.
3653 2008-12-03  Diego Novillo  <dnovillo@google.com>
3655         * lto.c (lto_fixup_tree): Do not emit an error when
3656         PREVAILING throw but T doesn't.
3658 2008-12-02  Doug Kwan  <dougkwan@google.com>
3660         * lto.c (lto_scan_statics_in_ref_table): New function factored out
3661         from code in ...
3662         (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3663         variables and functions.
3664         (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3665         and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3667 2008-11-29  Diego Novillo  <dnovillo@google.com>
3669         * lto.c: Include timevar.h.
3670         (lto_materialize_function): Tidy.  Add comments.
3671         (lto_wpa_write_files): Tidy.
3672         (lto_execute_ltrans): Tidy.
3673         (lto_main): Add local variable LTO_TIMER.  Initialize it
3674         to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3675         Start and stop the timer.
3676         Tidy comments.
3677         * Make-lang.in (lto.o): Add dependency on timevar.h.
3678         * ltrans-driver: React to -v and -save-temps.
3679         Use simple heuristic to determine how much parallelism to
3680         use when executing make.
3682 2008-11-12  Doug Kwan  <dougkwan@google.com>
3684         * lto.c (lto_bitmap_obstack): Remove var.
3685         (lto_materialize_function): Do nothing instead of marking function
3686         body in file if flag_wpa is true.
3687         (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3688         (lto_scan_statics_in_cgraph_node): New function.
3689         (lto_promote_cross_file_statics): Same.
3690         (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3691         Use bitmap functions in lto-utils.c.  Remove unsued label OUT.
3692         * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3694 2008-11-09  Diego Novillo  <dnovillo@google.com>
3696         * lto/lto.c (lto_fixup_tree): Change error message locus
3697         information to include location of mismatching
3698         declaration.
3699         Use TREE_NO_WARNING to avoid repeated messages.
3700         (lto_main): If lto_fixup_decls emitted any errors, exit.
3701         * lto/lto-lang.c: Don't include libfuncs.h and except.h
3702         (lto_init_options): Don't enable exceptions by default.
3703         (lto_eh_runtime_type): Move to lto-function-in.c
3704         (lto_init_eh): Likewise.
3705         (lto_init): Don't call lto_init_eh.
3706         * lto/Make-lang.in (lto-lang.o): Remove dependency on
3707         libfuncs.h and except.h.
3709 2008-10-30  Diego Novillo  <dnovillo@google.com>
3711         * lto.c (lto_read_decls): Declare debug_main only if
3712         LTO_STREAM_DEBUGGING is enabled.
3714 2008-10-30  Simon Baldwin  <simonb@google.com>
3716         * lto.c (lto_wpa_write_files): Create intermediate files with
3717         make_cwd_temp_file().
3718         (lto_maybe_unlink): New.  Delete intermediate WPA files unless
3719         WPA_SAVE_LTRANS is set.
3720         (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3721         * ltrans-driver: Do not strip directory from output files.
3723 2008-10-29  Doug Kwan  <dougkwan@google.com>
3725         * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3726         DECL.
3727         * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3728         (lto/lto-symtab.o): Remove rule.
3729         * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3730         (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3731         (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3732         Remove macros.
3733         lto-symtab.c (File): Move up one level.
3734         lto-lang.c (cgraph.h): Remove include.
3735         (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3736         input_cgraph): Move to lto-cgraph.c in gcc directory above.
3737         (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3739 2008-10-24 Rafael Espindola  <espindola@google.com>
3741         * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3742         non prevailing weak symbols.
3744 2008-10-24 Rafael Espindola  <espindola@google.com>
3746         * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3748 2008-10-24 Rafael Espindola  <espindola@google.com>
3750         * lto-lang.c (input_node): Avoid casts from pointers to ints of
3751         different types.
3753 2008-10-23  Simon Baldwin  <simonb@google.com>
3755         * lto-lang.c (input_node): Save the node reference, rather than the
3756         node pointer, in node->inlined_to.
3757         (input_cgraph_1): Convert node references into node pointers.
3759 2008-10-22  Diego Novillo  <dnovillo@google.com>
3760             Rafael Espindola  <espindola@google.com>
3762         * lto.c (lto_resolution_read): Tidy.
3763         * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3764         abort if RET is NULL.
3766 2008-10-22  Doug Kwan  <dougkwan@google.com>
3768         * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3769         exceptions flag is given.
3770         * lto-lang.c: (lto_init_options) Set default exceptions flag.
3771         (lto_init_eh): Remove exceptions flag initialization.
3772         (lto_init): Only call lto_init_eh if exceptions flag is set. 
3774 2008-10-21  Diego Novillo  <dnovillo@google.com>
3776         * lto.c: Tidy some formatting.
3777         * lto.h: Likewise.
3779 2008-10-21  Simon Baldwin  <simonb@google.com>
3781         * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3782         them is NULL (but not the other).
3784 2008-10-17  Diego Novillo  <dnovillo@google.com>
3786         * ltrans-driver: Divert output from make to a temporary file.
3787         Show it if the call to make failed.
3789 2008-10-15  Diego Novillo  <dnovillo@google.com>
3791         * lto.c (lto_wpa_write_files): Reformat do-while loop.
3792         Do not print TEMP_FILENAME
3793         * ltrans-driver: Call make with -s.
3795 2008-10-15  Diego Novillo  <dnovillo@google.com>
3797         * lto-symtab.c (lto_symtab_merge_decl): Do not force
3798         TREE_STATIC on global symbols.
3800 2008-10-14  Ollie Wild  <aaw@google.com>
3802         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3803         (LTRANS_DRIVER_EXE): Add.
3804         (lto.all.cross): Add LTRANS_DRIVER_EXE.
3805         (lto.all.encap): Add LTRANS_DRIVER_EXE.
3806         (lto.install.common): Remove ltrans-driver.
3807         (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3808         (LTRANS_DRIVER_EXE): New build rule.
3809         * config-lang.in (compilers): Add ltrans-driver.
3811 2008-10-14  Diego Novillo  <dnovillo@google.com>
3813         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3814         of program name.
3816 2008-10-13  Ollie Wild  <aaw@google.com>
3818         * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3819         * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3820         * ltrans-driver (LTRANS_FLAGS): Remove.
3822 2008-10-08  Doug Kwan  <dougkwan@google.com>
3824         * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3825         Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3826         and TREE_BINFO.  Also move code handling FUNCTION_DECL and VAR_DECL
3827         from lto_fixup_state to here.
3828         (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3829         just a free-list.  Fix up types also.  Move decl merging code to
3830         lto_fixup_tree.
3831         (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3832         object.
3833         (lto_fixup_decls): Use another pointer set to avoid multiple
3834         walking of nodes except for DECLs to be replaced.  Pass an
3835         lto_fixup_data_t object to tree-walker.
3837 2008-10-08 Rafael Espindola  <espindola@google.com>
3839         * lto-symtab.c (lto_symtab_set_resolution): New.
3840         (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3841         lto_symtab_get_resolution.
3842         (lto_symtab_prevailing_decl): Return decl for non public decls.
3843         (lto_symtab_get_resolution): New.
3844         * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3846 2008-10-06 Rafael Espindola  <espindola@google.com>
3848         * lto-lang.c: Include cgraph.h.
3849         (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3850         input_cgraph): Moved from lto-cgraph.c.
3851         (LANG_HOOKS_INPUT_CGRAPH): New.
3853 2008-10-03 Rafael Espindola  <espindola@google.com>
3855         * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3857 2008-10-03 Rafael Espindola  <espindola@google.com>
3859         * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3860         (lto_symtab_merge_decl): Update  LTO_IDENTIFIER_DECL the reflect the
3861         prevailing definition. Don't mark TREE_NOTHROW differences.
3862         * lto.c (lto_fixup_tree): New.
3863         (lto_fixup_state): New.
3864         (lto_fixup_state_aux): New.
3865         (free_decl): New.
3866         (lto_fixup_decls): New.
3867         (lto_main): Call lto_fixup_decls.
3869 2008-10-02  Ollie Wild  <aaw@google.com>
3871         * lang.opt (fltrans): Moved from common.opt.  Remove RejectNegative
3872         and Init.
3873         (fwpa): Moved from common.opt.  Remove RejectNegative and Init.
3874         * lto-lang.c (lto_post_options): Add validation and fixups for
3875         -fltrans and -fwpa.
3877 2008-10-02 Rafael Espindola  <espindola@google.com>
3879         * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3880         lto_symtab_merge_decl): Return void.
3881         (lto_symtab_prevailing_decl): New.
3883 2008-09-30 Rafael Espindola  <espindola@google.com>
3885         * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3886         defined symbols.
3887         (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3888         (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3889         Check for already defined symbols.
3890         * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3891         (LTO_IDENTIFIER_RESOLUTION): Remove.
3892         (LTO_DECL_RESOLUTION): New.
3894 2008-09-30 Rafael Espindola  <espindola@google.com>
3896         * lto.c (lto_read_decls): Use new input_tree signature.
3898 2008-09-26  Doug Kwan  <dougkwan@google.com>
3900         * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3901         bodies affected by exception attribute merging of DECLs.
3902         * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3903         merging. 
3905 2008-09-25  Rafael Espindola  <espindola@google.com>
3907         * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3908         (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3909         * lto-symtab.c (lto_symtab_compatible): New.
3910         (lto_symtab_overwrite_decl): New.
3911         (lto_symtab_merge_decl): Refactor to use the above functions
3912         and the resolution from lang_identifier.
3913         * lto-tree.h: Include plugin-api.h.
3914         (lang_identifier): Add resolution.
3915         (LTO_IDENTIFIER_RESOLUTION): New.
3917 2008-09-25  Ollie Wild  <aaw@google.com>
3919         * lang.opt (fltrans-output-list=): New option.
3920         * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3922 2008-09-25 Rafael Espindola  <espindola@google.com>
3924         * lto.c (lto_resolution_read): Initialize ret;
3926 2008-09-24  Ollie Wild  <aaw@google.com>
3928         * lto.c (sys/mman.h): Move include.
3929         (lto_wpa_write_files): Return a list of written files.
3930         (lto_execute_ltrans): New function.
3931         (lto_main): Call lto_execute_ltrans.
3932         (ltrans-driver): New file.
3933         * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3934         (DEAULT_LTRANS_DRIVER_LEN): New macro.
3935         (lto_init_options): Initialize ltrans_driver.
3936         (lto_handle_option): Fix incorrect default output value.
3937         * lang.opt (fltrans-driver=): New option.
3938         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3939         (lto.install-common): Add lto/ltrans-driver.
3941 2008-09-24 Rafael Espindola  <espindola@google.com>
3943         * Make-lang.in (LTO_OBJS): Add lto/common.o.
3944         (lto/lto.o): Depend on lto/common.h.
3945         (lto/common.o): New.
3946         * lang.opt (resolution): New.
3947         * lto-lang.c (resolution_file_name): New.
3948         (lto_handle_option): Handle OPT_resolution.
3949         * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3950         (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3951         pass it to lto_symtab_merge_decl.
3952         * lto.c: Include common.h.
3953         (lto_read_decls): Add resolutions and resolutions_size arguments.
3954         Initialize data_in.globals_resolution and
3955         data_in.globals_resolution_size.
3956         (index_and_symbol_resolution): New.
3957         (lto_resolution_read): New.
3958         (lto_file_read): Add argument resolution_file.
3959         Read resolution.
3960         * lto.h (resolution_file_name): New.
3962 2008-09-23 Rafael Espindola  <espindola@google.com>
3964         * common.c: Update description.
3965         * common.h: Update description.
3967 2008-09-23 Rafael Espindola  <espindola@google.com>
3969         * common.c: Moved from lto-plugin.
3970         * common.h: Moved from lto-plugin.
3972 2008-09-22  Doug Kwan  <dougkwan@google.com>
3974         * lto.c (VEC(bitmap,heap)): Declare.
3975         (lto_materialize_function): Handle WAP mode specially.
3976         (lto_add_inline_clones): New.
3977         (lto_add_all_inlinees): Changle algorithm and to use bitmaps.  Also
3978         return a bitmap of inlined decls.
3979         (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3980         (lto_main): Call reset_inline_failed to reset inlining states.
3981         Check call-graph after WPA inlining.
3982         * lto-lang.c (lto_init): Do not clear flag_generate_lto
3983         unconditionally.
3985 2008-09-19  Doug Kwan  <dougkwan@google.com>
3987         lto.c (lto_main): Remove unsued wrapper code.
3988         lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3990 2008-09-19  Rafael Espindola  <espindola@google.com>
3992         * lto-symtab.c: Include lto-tree-in.h.
3993         * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3994         * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3995         * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3997 2008-09-17  Paolo Bonzini  <bonzini@gnu.org>
3998             Rafael Avila de Espindola  <espindola@google.com>
4000         * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4001         COMPOUND_LITERAL_EXPR_DECL): Remove.
4002         (emit_local_var): Remove.
4003         (lto_expand_expr): Remove.
4004         (lto_staticp): Remove.
4005         (LANG_HOOKS_EXPAND_EXPR): Remove.
4006         (LANG_HOOKS_STATICP): Remove.
4008 2008-09-11  Diego Novillo  <dnovillo@google.com>
4010         * lto-lang.c: Include except.h and libfuncs.h.
4011         (lto_init_eh): New.
4012         (lto_init): Call it.
4013         Set flag_generate_lto to 0.
4014         * Make-lang.in (lto-lang.o): Add dependency on except.h
4015         and libfuncs.h.
4017 2008-09-09  Bill Maddox  <maddox@google.com>
4019         * lto-lang.c: Include header file expr.h.
4020         (COMPOUND_LITERAL_EXPR_DECL_STMT,
4021         COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4022         (emit_local_var):  Copied from c-semantics.c.
4023         (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4024         and c_staticp in c-common.c.
4025         (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP):  Redefined.
4027 2008-09-08  Diego Novillo  <dnovillo@google.com>
4029         * lto-lang.c (lto_global_bindings_p): Return 1 during
4030         IPA passes.
4032 2008-09-07  Diego Novillo  <dnovillo@google.com>
4034         * lto.c: Tidy formatting.
4036 2008-08-04  Bill Maddox  <maddox@google.com>
4038         * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4039         
4040 2008-09-03  Doug Kwan  <dougkwan@google.com>
4042         lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4043         CIF_OK instead of NULL.
4045 2008-09-02  Diego Novillo  <dnovillo@google.com>
4046             Simon Baldwin  <simonb@google.com>
4048         * lto-lang.c (lto_type_for_size): Rewrite.  Adapt from
4049         c_common_type_for_size.
4050         (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4051         (lto_init): Call linemap_add.
4052         (signed_and_unsigned_types): Remove.
4054 2008-08-29  Diego Novillo  <dnovillo@google.com>
4056         * lto-lang.c (handle_noreturn_attribute): New local function.
4057         (handle_const_attribute): New local function.
4058         (handle_malloc_attribute): New local function.
4059         (handle_pure_attribute): New local function.
4060         (handle_novops_attribute): New local function.
4061         (handle_nonnull_attribute): New local function.
4062         (handle_nothrow_attribute): New local function.
4063         (handle_sentinel_attribute): New local function.
4064         (handle_type_generic_attribute): New local function.
4065         (handle_format_attribute): New local function.
4066         (handle_format_arg_attribute): New local function.
4067         (lto_attribute_table): Declare.
4068         (lto_format_attribute_table): Declare.
4069         (lto_init_attributes): New local function.
4070         (lto_define_builtins): Call it.
4071         Call targetm.init_builtins and build_common_builtin_nodes.
4072         (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4073         (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4075 2008-08-28  Diego Novillo  <dnovillo@google.com>
4077         * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4078         $(GIMPLE_H).
4079         (lto-symtab.o): Add dependency on $(GIMPLE_H).
4080         * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4081         * lto-symtab.c: Include gimple.h.
4082         * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4083         TREE_CHAIN.
4085 2008-08-27  Doug Kwan  <dougkwan@google.com>
4087         * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4088         gt-lto-lto.h): New includes.
4089         (lto_materialize_function): Do not read in function body in WPA mode.
4090         Format a line to fit in 80 columns.
4091         (lto_cgraph_node_sets): New garbage collected variable.
4092         (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4093         New functions.
4094         (lto_main): Initialize bitmap obstack.  Add code to handle WPA mode.
4095         * Make-lang.in (LTO_H): Replace filename lto-section-in.h with 
4096         variable LTO_SECTION_IN_H.
4097         (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4098         pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4099         with variable LTO_SECTION_IN_H.
4100         * config-lang.in (gtfiles): Add lto/lto.c.
4101         * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4102         merged DECL_RESULT correctly.
4104 2008-08-26  Bill Maddox  <maddox@google.com>
4106         * lto-lang.c  Include tree-gimple.h.
4107         (lto_mark_addressable): Call mark_addressable rather than
4108         asserting.
4109         (lto_post_options): Suppress debug info generation.
4110         * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4111         
4112 2008-08-25  Bill Maddox  <maddox@google.com>
4114         * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4115         assertion and leave an explanatory comment in its place.
4116         
4117 2008-08-21  Doug Kwan  <dougkwan@google.com>
4119         * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4120         of common nodes instead of computing locallly.
4121         (lto_read_in_decl_state): New.
4122         (lto_read_decls): Change code for udpate in struct lto_decl_header.
4123         Read global and per-function in-decl states.
4124         * Make-lang.in (LTO_H): Update dependency.
4125         (lto/lto.o): Same.
4126         (lto-symtab.c): Merge   (revision 139039)
4127         * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4129 2008-08-21  Rafael Espindola  <espindola@google.com>
4131         * config-lang.in (target_libs): New.
4133 2008-08-20  Bill Maddox  <maddox@google.com>
4135         * lto.c (current_lto_file): Remove GTY marker from static
4136         variable.  Remove include of file gt-lto-lto.h.
4137         * Make-lang.in: Remove dependency of lto/lto.o on
4138         gt-lto-lto.h.
4139         * lto-elf.c (lto_file_close): Removed.
4140         (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4141         allocate lto_elf_file object.
4142         (lto_elf_file_close): Free lto_elf_file object after close.
4143         * lto.h (struct lto_file_struct): Remove GTY marker.
4144         * config-lang.in: Remove lto/lto.h and lto/lto.c from
4145         gtfiles.
4146         
4147 2008-08-20  Bill Maddox  <maddox@google.com>
4149         * lto.c (lto_read_decls): Provide dummy argument to input_tree
4150         to conform to its new signature.
4151         * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4152         on discarded node here, now called in global_vector_fixup.
4153         
4154 2008-08-09  Bill Maddox  <maddox@google.com>
4156         * lto.c (preload_common_nodes): Verify that fileptr_type_node
4157         has not been set to a front-end-specific value.
4158         
4159 2008-08-05  Doug Kwan  <dougkwan@google.com>
4160         
4161         * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4162         build breakage.
4164 2008-07-30  Bill Maddox  <maddox@google.com>
4166         * lto.c (lto_materialize_function): Call lto_original_decl_name.
4167         Remove obsolete comments.
4168         (lto_read_decls): Remove initialization of deleted field data_in.global.
4169         Tidy up comments.
4170         (lto_main): Remove redundant initialization of section_hash_table.
4171         * lto-elf.c: Removed obsolete comments.
4172         * lto.h: Tidy up comments.
4173         * lto-symtab.c (lto_least_common_multiple): New function.
4174         (lto_symtab_merge_decl): Merge variable alignments in some cases.
4175         Tidy up comments.
4177 2008-07-25  Diego Novillo  <dnovillo@google.com>
4178             Bill Maddox  <maddox@google.com>
4180         * lto.c: Re-order include files.
4181         Include lto-section-out.h.
4182         (preload_common_nodes): Add debugging output.
4183         Add new local INDEX_TABLE.
4184         Call preload_common_node.
4185         * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4187 2008-07-13  Bill Maddox  <maddox@google.com>
4189         * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4190         unwanted scaling during pointer addition.
4192 2008-07-11  Bill Maddox  <maddox@google.com>
4193             Diego Novillo  <dnovillo@google.com>
4195         * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4196         Make code const-correct.
4197         (lto_file_read): Fix C++ compatibility warnings.
4198         (lto_read_section_data):  Fix C++ compatibility warnings.
4199         (lto_get_section_data): Use CONST_CAST to avoid warning when
4200         const pointer passed to free.
4201         * lto-elf.c (lto_elf_build_section_table): Fix C++
4202         compatibility warnings.
4203         (lto_elf_append_data):  Fix C++ compatibility warnings.  Use CONST_CAST
4204         to avoid warning assigning const pointer to d_buf field of Elf_Data.
4205         (lto_get_current_out_file):  Fix C++ compatibility warnings.
4207 2008-07-11  Diego Novillo  <dnovillo@google.com>
4209         * Make-lang.in (lto-warn): Define.
4211 2008-07-03  Simon Baldwin  <simonb@google.com>
4213         * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4214         LTO_STREAM_DEBUGGING.
4216 2008-06-27  Ollie Wild  <aaw@google.com>
4218         * lto-elf.c (lto-section-out.h): New include.
4219         (struct lto_elf_file): Remove bits member.  Add scn, shstrtab_stream,
4220         and data members.
4221         (cached_file_attrs): New static variable.
4222         (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4223         Use cached_file_attrs for checking bits.
4224         (lto_elf_build_section_table): Remove elf_file argument from
4225         lto_elf_get_shdr and lto_elf_free_shdr calls.
4226         (DEFINE_INIT_SHDR): New macro.
4227         (init_shdr32, init_shdr64): New functions defined via the
4228         DEFINE_INIT_SHDR macro.
4229         (lto_elf_begin_section_with_type): New function.
4230         (lto_elf_begin_section): New function.
4231         (lto_elf_append_data): New function.
4232         (lto_elf_end_section): New function.
4233         (DEFINE_VALIDATE_EHDR): New macro.
4234         (validate_ehdr32, validate_ehdr64): New functions defined via the
4235         DEFINE_VALIDATE_EHDR macro.
4236         (validate_file): New function.
4237         (DEFINE_INIT_EHDR): New macro.
4238         (init_ehdr32, init_ehdr64): New functions defined via the
4239         DEFINE_INIT_EHDR macro.
4240         (init_ehdr): New function.
4241         (lto_elf_file_open): Add support for writable files.  Move some
4242         validation logic to validate_file.
4243         (lto_elf_file_close): Add support for writable files.  Write file data
4244         and free data blocks.
4245         (current_out_file): New static variable.
4246         (lto_set_current_out_file): New function.
4247         (lto_get_current_out_file): New function.
4248         * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4249         Add temporary initialization for testing ELF serialization.
4250         * lto.h (lto-section-out.h): New include.
4251         (struct lto_file_struct): Slight modification to comment.
4252         (lto_elf_file_open): Add writable parameter.
4253         (lto_elf_begin_section): New function declaration.
4254         (lto_elf_append_data): New function declaration.
4255         (lto_elf_end_section): New function declaration.
4256         (lto_set_current_out_file, lto_get_current_out_file): New function
4257         declarations.
4258         * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4259         (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4260         (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4261         * Make-lang.in (LTO_H): Add lto-section-out.h.
4263 2008-06-12  Ollie Wild  <aaw@google.com>
4265         * lto.h (struct lto_file_vtable_struct): Remove.
4266         (struct lto_file_struct): Remove vtable member.
4267         * lto-elf.c (lto_file_init): Remove vtable argument.
4268         (lto_elf_map_optional_lto_section): Remove.
4269         (lto_elf_unmap_section): Remove.
4270         (lto_elf_file_vtable): Remove.
4271         (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4272         lto_file_init call.
4273         (lto_elf_find_section_data): Remove.
4275 2008-06-11  Ollie Wild  <aaw@google.com>
4277         * lto.c (lto_file_read): Add const qualifier to data variable.
4279 2008-06-11  Diego Novillo  <dnovillo@google.com>
4281         Merge from lto-streamber sub-branch.
4283         2008-06-04  Ollie Wild  <aaw@google.com>
4285                 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4286                 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4288         2008-05-28  Bill Maddox  <maddox@google.com>
4290                 Replace the DWARF reader in the LTO front-end.
4292                 * lto.c: Include lto-tree-in.h, lto-tags.h.
4293                 (enum DWARF2_class, DW_cl_constant, struct
4294                 DWARF2_form_data, struct lto_context,
4295                 lto_fd_init, lto_info_fd_init,
4296                 lto_abbrev_fd_init, lto_info_fd_close,
4297                 lto_file_init, lto_file_close,
4298                 lto_file_corrupt_error, lto_abi_mismatch_error,
4299                 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4300                 lto_read_uleb128, lto_read_sleb128,
4301                 lto_read_initial_length, lto_abbrev_read_attrs,
4302                 lto_abbrev_read, lto_abbrev_read_lookup,
4303                 lto_read_section_offset,
4304                 lto_read_comp_unit_header, find_cu_for_offset,
4305                 lto_get_file_name,
4306                 lto_resolve_reference,lto_read_form,
4307                 attribute_value_as_int,
4308                 make_signed_host_wide_int,
4309                 attribute_value_as_constant, lto_cache_hash,
4310                 lto_cache_eq, lto_cache_store_DIE,
4311                 lto_cache_lookup_DIE, lto_find_integral_type,
4312                 lto_find_integral_type_1,
4313                 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4314                 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4315                 lto_unsupported_attr_error, lto_get_identifier,
4316                 lto_read_referenced_type_DIE,
4317                 lto_read_compile_unit_DIE,
4318                 lto_read_array_type_DIE,
4319                 lto_read_structure_union_class_type_DIE,
4320                 lto_read_enumerator_DIE,
4321                 lto_read_enumeration_type_DIE,
4322                 lto_read_only_for_child_DIEs,
4323                 lto_read_only_for_child_DIEs,
4324                 lto_read_member_DIE, lto_read_abbrev,
4325                 lto_read_variable_formal_parameter_constant_DIE,
4326                 lto_get_body): Removed.
4327                 (preload_common_nodes): New function.
4328                 (lto_read_decls): Convert for new global streamer.
4329                 (lto_materialze_file_data,
4330                 lto_read_subroutine_type_subprogram_die,
4331                 lto_read_unspecified_parameters_DIE,
4332                 lto_read_typedef_DIE,
4333                 lto_read_pointer_reference_type_DIE,
4334                 lto_read_subrange_type_DIE,
4335                 lto_read_base_type_DIE,
4336                 lto_read_const_volatile_restrict_type_DIE,
4337                 lto_read_namespace_DIE,
4338                 lto_read_unspecified_type_DIE, lto_read_DIE,
4339                 lto_read_child_DIEs, lto_collect_child_DIEs):
4340                 Removed.
4341                 (lto_info_read, lto_set_cu_context): Removed.
4342                 (lto_file_read): Convert for new global streamer.
4343                 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4344                 lto_resolve_var_ref, lto_resolve_fn_ref,
4345                 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4346                 lto_resolve_namespacedecl_ref): Removed.
4347                 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4348                 * lto-tree.h (lto_symtab_merge_var,
4349                 lto_symtab_mergee_fun): Declare here.
4350                 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4351                 (lto_elf_file_open): Removed code to read DWARF debug sections.
4352                 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4353                 DWARF2_CompUnit, lto_die_ptr,
4354                 lto_die_cache_entry, lto_fd, lto_info_fd,
4355                 lto_abbrev_fd): Removed.
4356                 (lto_file): Removed debug_info and debug_abbrev fields.
4357                 (lto_ref): Removed.
4358                 (lto_file_init, lto_file_close,
4359                 lto_resolve_type_ref, lto_resolve_var_ref,
4360                 lto_resolve_fn_ref, lto_resolve_field_ref,
4361                 lto_resolve_typedecl_ref,
4362                 lto_resolve_namespacedecl_ref,
4363                 lto_get_file_name): Removed declarations.
4364                 (lto_symtab_merge_var, lto_symtab_merge_fn):
4365                 Declarations moved to lto-tree.h.
4366                 * lto-symtab.c (lto_compatible_attributes_p):
4367                 Lobotomize this, as it barfs on "Hello, world!".
4368                 * lto-section-out.c: Include lto-tree-out.h.
4369                 (lto_hash_global_slot_node,
4370                 lto_eq_global_slot_node, preload_common_nodes,
4371                 write_global_stream, write_global_references):
4372                 New functions.
4373                 (produce_asm_for_decls): Convert for new global streamer.
4374                 * lto-section-out.h (lto_hash_global_slot_node,
4375                 lto_eq_global_slot_node): Declare.
4377 2008-06-07  Kenneth Zadeck  <zadeck@naturalbridge.com>
4378             Jan Hubicka  <jh@suse.cz>
4379         
4380         * lto.c (sys/mman.h, tree-pass.h): New includes.
4381         (lto_materialize_constructors_and_inits,
4382         lto_materialize_function): Keeps length of section.
4383         (lto_materialize_cgraph): Removed.
4384         (lto_read_decls): Initialize fd field.
4385         (lto_file_read): Different return type and removed much code to
4386         lto_main.
4387         (page_mask): New variable.
4388         (lto_read_section_data, get_section_data, free_section_data): New
4389         functions.
4390         (lto_main): Now calls pass manager, sets the hooks so that the ipa
4391         passes can get the section data. 
4392         
4393 2008-05-27  Kenneth Zadeck  <zadeck@naturalbridge.com>
4395         * lto.h (lto_read_decls): Made local.
4396         (lto_input_function_body, lto_input_constructors_and_inits, 
4397         lto_input_cgraph): Declarations moved to lto-section-in.h.
4398         * lto-section-in.c: Moved to .. .
4399         * lto-cgraph-in.c: Ditto.
4400         * lto-section-in.h: Ditto.
4401         * lto-function-in.c: Ditto.
4402         * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4403         (lto_insert_block): Removed.
4404         (LANG_HOOKS_INSERT_BLOCK): Removed.
4405         * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4406         lto-section-in.o): Rules moved to lto/Makefile.in.
4407         
4409 2008-05-16  Ollie Wild  <aaw@google.com>
4411         * lto-lang.c (tree-inline.h): Include.
4412         (lto_post_options): New function.
4413         (LANG_HOOKS_POST_OPTIONS): Define.
4414         * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4415         * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4417 2008-05-13  Diego Novillo  <dnovillo@google.com>
4419         * lto-function-in.c (input_ssa_names): Call
4420         make_ssa_name_fn instead of make_ssa_name.
4422 2008-05-12  Diego Novillo  <dnovillo@google.com>
4424         * lto-cgraph-in.c (overwrite_node): Update references to
4425         inline summary fields.
4426         * lto-function-in.c (input_expr_operand): Do not handle
4427         STRUCT_FIELD_TAG.
4429 2008-05-09  Ollie Wild  <aaw@google.com>
4431         * lang.opt: New file.
4432         * lto-lang.c (lto_init_options): New function.
4433         (lto_handle_option): New function.
4434         (lto_init): Move initialization of flag_unit_at_a_time to
4435         lto_init_options.
4436         (LANG_HOOKS_INIT_OPTIONS): Define.
4437         (LANG_HOOKS_HANDLE_OPTION): Define.
4439 2008-04-29  Ollie Wild  <aaw@google.com>
4441         * lto.c (lto_read_namespace_DIE): New function.
4442         (lto_read_DIE): Add lto_read_namespace_DIE callback.  Cache
4443         NAMESPACE_DECL DIE's.
4444         (lto_resolve_namespacedecl_ref): New function.
4445         * lto.h (lto_resolve_namespacedecl_ref): New function.
4446         * lto-section-in.c (lto_read_decls): Read namespace declarations.
4447         * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4448         and num_namespace_decls.
4449         * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4450         * lto-lang.c (lto_init_ts): New function.
4451         (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4453 2008-04-16  Ollie Wild  <aaw@google.com>
4455         * lto-function-in.c (input_type_ref): Updated function description.
4457 2008-04-16  Ollie Wild  <aaw@google.com>
4459         * lto-function-in.c (input_type_ref_1): New function.
4460         (input_type_ref): Split into two functions.
4461         (input_function): Add support for type contexts.
4463 2008-04-16  Ollie Wild  <aaw@google.com>
4465         * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4466         section name
4468 2008-04-16  Ollie Wild  <aaw@google.com>
4470         * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4471         list of supported languages.
4473 2008-03-25  Kenneth Zadeck  <zadeck@naturalbridge.com>
4475         Merge with mainline @133491.
4477 2008-03-05  Kenneth Zadeck  <zadeck@naturalbridge.com>
4478             Jan Hubicka  <jh@suse.cz>
4480         * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4481         fd->unmaterialized_fndecls.
4482         (lto_get_file_name, lto_materialize_cgraph): New function.
4483         (lto_materialize_constructors_and_inits,
4484         lto_materialize_function): Read info directly from elf file.
4485         (lto_file_read): Made local and initialize dictionary so that
4486         other lto sections can be read without reprocessing the elf file.
4487         (lto_main): Read all functions after all files have been processed
4488         for their types, globals and cgraph.  
4489         * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4490         dependencies.
4491         * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4492         (hash_name, eq_name, lto_elf_build_section_table): New functions.
4493         (lto_elf_read_symtab): Removed function.
4494         (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4495         * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4496         (lto_file_read): Made local.
4497         (lto_get_file_name, lto_elf_build_section_table,
4498         lto_input_cgraph): 
4499         New function.
4500         * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4501         New functions.
4502         (lto_read_decls): Get the file name.
4503         * lto-cgraph-in.c: New file.
4504         * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4505         (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4506         (input_labels): Fixed latent sizeof issue.
4507         (input_function): Build stmt array to set call sites into cgraph
4508         edges.
4509         (lto_read_body): Reset cfun->curr_properties.
4510         * lto_section_in.h (lto_section_slot): New structure.
4511         (section_hash_table.lto_file_decl_data): New field.
4513         
4514 2008-02-09  Kenneth Zadeck  <zadeck@naturalbridge.com>
4516         * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4517         reconstruct static initializers.
4518         (lto_get_body, lto_materialize_function): Add lto_section_type as
4519         a parameter.
4520         (lto_materialize_constructors_and_inits,
4521         lto_materialize_file_data): New function.
4522         (lto_materialize_function,
4523         lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4524         unmap_section and map_fn_body to map_section.
4525         (lto_set_cu_context): Process functions and static inits
4526         differently.
4527         * Make-lang.in (LTO_H, lto/lto-function-in.o,
4528         lto/lto-section-in.o): Update dependencies.
4529         * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4530         lto_section_type parameter.
4531         (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4532         * lto.h (lto_file_vtable_struct): Removed two of the fields and 
4533         renamed the other two so that there is only one map function and
4534         one unmap function and each takes a section type parameter.
4535         (lto_read_function_body): Renamed to lto_input_function_body and
4536         added file_data parameter.
4537         (lto_read_var_init): Removed.
4538         (lto_input_constructors_and_inits): New function.
4539         * lto-section-in.c (lto_read_decls): New function.
4540         * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4541         var_decls, type_decls, types to lto_file_decl_data.
4542         (input_type_ref, input_expr_operand, lto_read_body): Get
4543         field_decls, fn_decls, var_decls, type_decls, types from different
4544         structure.
4545         (input_globals, input_constructor, lto_read_var_init): Removed.
4546         (input_constructors_or_inits): New function.
4547         (lto_read_function_body, lto_input_constructors_and_inits):
4548         Renamed to lto_input_function_body and takes file_data parameter.
4549         * lto-section-in.h (lto_file_decl_data): New structure.
4550         
4551 2008-01-28  Kenneth Zadeck  <zadeck@naturalbridge.com>
4553         * lto-function-in.c (input_globals.c): Changed input type to
4554         lto_function_header.
4555         (input_bb): Removed code to deserialize the stmt number.
4556         (input_function): Renumber all stmts after they are input.
4557         (lto_read_body, lto_read_function_body, lto_read_var_init):
4558         Changed to used new header format and enum section_type.
4559         *lto-lang.c (success): Removed. 
4560         
4561 2008-01-28  Nathan Froyd  <froydnj@codesourcery.com>
4563         * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4564         (lto_elf_free_sym): Likewise.
4566         * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4567         (lto_elf_build_init): Likewise.
4569 2008-01-14  Kenneth Zadeck  <zadeck@naturalbridge.com>
4571         * lto-read.c: Renamed to lto-function-in.c.
4572         (input_1_unsigned): Moved to lto-section-in.c and renamed
4573         lto_input_1_unsigned.
4574         (input_uleb128): Moved to lto-section-in.c and renamed
4575         lto_input_uleb128.
4576         (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4577         lto_input_widest_uint_uleb128.
4578         (input_sleb128): Moved to lto-section-in.c and renamed
4579         lto_input_sleb128.
4580         (input_integer): Moved to lto-section-in.c and renamed
4581         lto_input_integer.
4582         (debug_in_fun): Moved to lto-section-in.c and renamed
4583         lto_debug_in_fun.
4584         (input_block): Moved to lto-section-in.h and renamed
4585         lto_input_block.
4586         (input_expr_operand): Fixed to allow lists with more than one
4587         element.
4588         * lto-section-in.h: New file.
4589         * lto-section-in.c: New file with changes from above.
4590         * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4591         (lto-section-in.o): New rule.
4592         
4593 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
4595         * lto-read.c (input_expr_operand): Mark static and external
4596         VAR_DECLs as needed.
4598 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
4600         * lto-read.c (input_integer): Use the correct shift amount.
4602 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
4604         * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4605         (LANG_HOOKS_NAME): Define.
4607 2007-12-27  Nathan Froyd  <froydnj@codesourcery.com>
4609         * lto.c (lto_find_integral_type): Define as a macro.  Rename the
4610         original function to...
4611         (lto_find_integral_type_1): ...this.  Consult UNSIGNEDP if we
4612         don't have a base type.
4613         (lto_read_enumeration_type_DIE): Examine the values of the
4614         enumeration to determine whether we can use an unsigned type for
4615         the base type of the enumeration.
4617 2007-12-24  Nathan Froyd  <froydnj@codesourcery.com>
4619         * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4620         and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4622 2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>
4624         * lto-lang.c (lto_types_compatible_p): New function.
4625         (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4627 2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>
4628             Kenneth Zadeck  <zadeck@naturalbridge.com>
4630         * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4631         (input_local_vars): Read in DECL_INITIAL and context for local
4632         statics that need to be put in unexpanded_vars_list.
4634 2007-12-21  Nathan Froyd  <froydnj@codesourcery.com>
4636         * lto-read.c (input_real): Use a separate null-terminated buffer
4637         for calling real_from_string.
4638         (input_expr_operand): If we take the address of a FUNCTION_DECL,
4639         tell cgraph that it's needed.
4641 2007-12-19  Doug Kwan  <dougkwan@google.com>
4643         * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4645 2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>
4647         * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4648         (lto_file_read): Reset the members of 'context' every time we read
4649         a toplevel DIE, with special attention to last_param_type.
4651 2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>
4653         * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4654         'declaration'.  Set the assembler name for non-public functions.
4656 2007-12-17  Kenneth Zadeck  <zadeck@naturalbridge.com>
4658         * lto_read.c (data_in.unexpanded_indexes): New array.
4659         (input_local_var): Added code to read in unexpanded_var_list
4660         indexes for variables.  Only read in DECL_CHAIN field for
4661         parameters.
4662         (input_local_vars): Added code to rebuild unexpanded_var_list in
4663         order using unexpanded_indexes.
4664         (input_function): Added code to set DECL_CONTEXT for functions.
4666 2007-12-13  Doug Kwan  <dougkwan@google.com>
4668         * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4669         in pointer and reference types.
4671 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
4673         * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4674         RESULT_DECL.
4676 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
4678         * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4679         already read the DIE.
4680         (lto_get_body): New function, split out from...
4681         (lto_materialize_function): ...here.  Call it.
4682         (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4683         determine DECL_EXTERNAL.
4684         * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4685         FUNCTION_DECLs when necessary.  Use the type of the actual
4686         function definition if we are unable to easily merge types.  Ignore
4687         spurious DECL_MODE mismatches on VAR_DECLs.  Merge DECL_MODEs when
4688         necessary.
4690 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
4692         * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4694 2007-12-12  Bill Maddox  <maddox@google.com>
4696         Revert
4697         2007-12-07  Bill Maddox  <maddox@google.com>
4699         * lto.c (lto_str_fd_init): New function.
4700         (lto_str_fd_close): New function.
4701         (lto_file_init): Call lto_str_fd_init.
4702         (lto_file_close): Call lto_str_fd_close.
4703         (lto_str_read): New function. Read debug string table.
4704         (lto_str_lookup): New function. Get string for debug
4705         string table offset.
4706         (lto_read_form): Recognize DW_FORM_strp.
4707         (lto_file_read): Invoke lto_str_read.
4709         * lto-elf.c (lto_elf_file_open): Read raw section data
4710         for the .debug_str section, if present.
4712         * lto.h (struct lto_str_fd_struct): New struct.
4713         (struct lto_file_struct): Added new field DEBUG_STR
4714         to hold the file descriptor for the debug string table.
4715         
4716 2007-12-07  Bill Maddox  <maddox@google.com>
4718         * lto.c (lto_str_fd_init): New function.
4719         (lto_str_fd_close): New function.
4720         (lto_file_init): Call lto_str_fd_init.
4721         (lto_file_close): Call lto_str_fd_close.
4722         (lto_str_read): New function. Read debug string table.
4723         (lto_str_lookup): New function. Get string for debug
4724         string table offset.
4725         (lto_read_form): Recognize DW_FORM_strp.
4726         (lto_file_read): Invoke lto_str_read.
4728         * lto-elf.c (lto_elf_file_open): Read raw section data
4729         for the .debug_str section, if present.
4731         * lto.h (struct lto_str_fd_struct): New struct.
4732         (struct lto_file_struct): Added new field DEBUG_STR
4733         to hold the file descriptor for the debug string table.
4735 2007-12-07  Nathan Froyd  <froydnj@codesourcery.com>
4737         * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4738         Grow the basic_block_info and label_to_block_map vectors if
4739         necessary.  Read in the block chain.
4741 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4743         * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4745 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4747         * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4749 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4751         * lto-read.c (input_expr_operand): Don't check for MTAGs.
4752         (lto_read_body): Don't declare PROP_alias.
4754 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4756         * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4757         argument type information.
4759 2007-12-03  Nathan Froyd  <froydnj@codesourcery.com>
4761         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4762         TREE_THIS_VOLATILE if the associated type is a volatile type.
4763         (lto_materialize_function): Remove call to init_ssa_operands.
4764         * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4765         variable when reading an SSA_NAME.  Do the same when reading a
4766         RESULT_DECL, a RETURN_EXPR, or an MTAG.
4767         (input_cfg): Call init_ssa_operands.
4768         (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4769         Move call to init_tree_ssa...
4770         (lto_read_body): ...here.  Use push_cfun and pop_cfun.  Call
4771         add_referenced_var on any variables referenced from the body of the
4772         function.  Inform the rest of the compiler we are in SSA form and
4773         inform later passes about the current properties.
4775 2007-11-30  Nathan Froyd  <froydnj@codesourcery.com>
4777         * lto.c (lto_materialize_function): Add FIXME.
4779 2007-11-29  Nathan Froyd  <froydnj@codesourcery.com>
4781         * lto-lang.c (enum built_in_attribute): New enum.
4782         (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4783         built_in_attributes): New variables.
4784         (def_builtin_1): New function.
4785         (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4787 2007-11-28  Nathan Froyd  <froydnj@codesourcery.com>
4789         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4790         DECL_SOURCE_LOCATION for debugging purposes.
4791         (lto_read_member_DIE): Set DECL_SOURCE_LOCATION.  If we have read a
4792         bitfield, use the type specified by the DIE for TREE_TYPE and defer
4793         laying out the decl until later.
4794         (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4795         name with DECL_ASSEMBLER_NAME.  Set DECL_SOURCE_LOCATION and
4796         TREE_ADDRESSABLE.
4797         * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4798         operand of an ADDR_EXPR.
4799         * lto-lang.c (enum lto_builtin_type): New enum.
4800         (builtin_type): New typedef.
4801         (builtin_types, string_type_node, const_string_type_node,
4802         wint_type_node, intmax_type_node, uintmax_type_node,
4803         signed_size_type_node): New variables.
4804         (def_fn_type, builtin_type_for_size, lto_define_builtins,
4805         lto_build_c_type_nodes): New functions.
4806         (lto_init): Initialize builtin types.
4807         (lto_set_decl_assembler_name): Let the target machine mangle the
4808         name if the decl is TREE_PUBLIC, otherwise uniquify it.
4810 2007-11-21  Nathan Froyd  <froydnj@codesourcery.com>
4812         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4813         set TREE_ADDRESSABLE.  Do set DECL_COMDAT.  Set TREE_READONLY if
4814         the type is a constant type.  Set the assembler name and inform
4815         the rest of the compiler about the new decl if the decl is not
4816         public.
4817         (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4818         of DECL_ASSEMBLER_NAME when determining if we have a builtin.  Don't
4819         try to read in function bodies for functions that already have bodies.
4820         * lto-symtab.c (lto_same_type_p): Check for unbounded array
4821         equivalency.
4822         (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4823         Check for whether we matched a builtin function type before calling
4824         lto_same_type_p on the generated type.  Permit cases where the
4825         declaration of an array is unbounded, but the definition is bounded.
4826         Don't combine TREE_PUBLIC flags.  Copy over DECL_SIZE and
4827         DECL_SIZE_UNIT if necessary.
4829 2007-11-16  Kenneth Zadeck  <zadeck@naturalbridge.com>
4831         * lto-read.c (input_expr_operand): Get types right 
4832         for COMPLEX_CST.
4834 2007-11-16  Kenneth Zadeck  <zadeck@naturalbridge.com>
4836         * lto-read.c (make_new_block, input_cfg): Properly set
4837         n_basic_blocks.
4838         
4839 2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>
4841         * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4842         set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4844 2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>
4846         * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4847         construct the integer type for bitfields.
4849 2007-11-16  Kenneth Zadeck  <zadeck@naturalbridge.com>
4851         * lto-read.c (data_in.current_node_has_loc): Removed.
4852         (input_line_info): Returns true if node needs line set.
4853         (set_line_info): Always sets line if called.
4854         (clear_line_info): Removed reference to current_node_needs_loc.
4855         (input_expr_operand): Keeps track locally if current node needs a loc.
4856         (input_local_var): Added code to handle DECL_INITIAL for
4857         static local vars. Only set loc if necessary.
4858         
4859 2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>
4861         * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4862         DECL_CONTEXT.
4864 2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>
4866         * lto.c: Include langhooks.h.
4867         (lto_find_integral_type): Rework logic to handle the case where
4868         got_byte_size is true, but the bitsize requested and that of the
4869         base_type doesn't match.
4870         (lto_read_variable_formal_parameter_constant_DIE): Only check for
4871         asm_name if we are creating a VAR_DECL.
4872         (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4873         definition.
4874         (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4875         function reference and use the builtin's decl if so.  Set the
4876         DECL_CONTEXT of the RESULT_DECL for the function.
4877         * lto-lang.c (registered_builtin_fndecls): New variable.
4878         (lto_getdecls): Return it.
4879         (lto_builtin_function): Chain the new decl onto
4880         registered_builtin_fndecls.
4882 2007-11-15  Kenneth Zadeck  <zadeck@naturalbridge.com>
4883             
4884         * lto-read.c (process_tree_flags, lto_static_init_local):
4885         Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4886         (input_line_info, clear_line_info): Fixed new line number code.
4887         (input_expr_operand): Added type to SWITCH_EXPR.
4888         (lto_read_body): Properly initialized data_in.
4889         Clear line info when leaving.
4890         
4891 2007-11-13  Diego Novillo  <dnovillo@google.com>
4893         * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4894         Initialize ARTIFICIAL.
4895         (lto_read_subroutine_type_subprogram_DIE): Initialize
4896         SAVED_SCOPE.
4897         * lto-read.c (set_line_info): Remove ; from calls to
4898         LINEMAP_POSITION_FOR_COLUMN.
4900 2007-11-13  Kenneth Zadeck  <zadeck@naturalbridge.com>
4902         * lto-read.c (input_type_ref): Renamed from get_type_ref.
4903         (input_expr_operand, input_local_var): Renamed get_type_ref to 
4904         input_type_ref.
4905         (input_expr_operand): Get the types correct for 
4906         vector-cst.  Get SSA_NAME_DEF_STMT correct for return_exprs.
4907         
4908 2007-11-13  Doug Kwan  <dougkwan@google.com>
4910         * lto-read.c (input_widest_uint_uleb128): New function.
4911         (input_tree_flags, process_tree_flags, input_line_info,
4912         input_expr_operand, input_local_var, input_phi, input_ssa_names):
4913         Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4914         unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4915         (lto_static_init_local): Add code to assert that lto_flags_type is
4916         wide enough.
4918 2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>
4920         * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4921         (lto_read_subroutine_type_subprogram_DIE): Handle
4922         DW_AT_static_link and DW_AT_specification.  Return the
4923         specification if present.
4924         (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4925         
4926 2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>
4928         * lto-lang.c: Include target.h.
4929         (registered_builtin_types): New variable.
4930         (lto_type_for_mode): Increase number of modes handled.
4931         (lto_builtin_function): Fix argument list and return the decl.
4932         (lto_register_builtin_type): New function.
4933         (lto_init): Initialize target builtins and language-independent
4934         nodes.
4935         (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4937 2007-11-13  Kenneth Zadeck  <zadeck@naturalbridge.com>
4939         * lto-read.c (input_expr_operand): Added code to properly handle
4940         index filed. Added new RANGE_EXPR case.
4941         
4942 2007-11-11  Kenneth Zadeck  <zadeck@naturalbridge.com>
4944         * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4945         (data_in): Added current_node_has_loc field.
4946         (input_line_info, set_line_info, clear_line_info): Added a support
4947         for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4948         did not have on on the source side.
4949         (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4950         numbers too.
4952 2007-11-09  Doug Kwan  <dougkwan@google.com>
4954         * lto-read.c (input_expr_operand): Change type of operand 2 of
4955         BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4957 2007-11-09  Nathan Froyd  <froydnj@codesourcery.com>
4959         * lto.c: Include lto-tree.h.  Effect small spaces->tabs cleanup.
4960         (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4961         from a DW_AT_specification or DW_AT_abstract_origin attribute to
4962         the new decl we are creating.  Move informing the middle end about
4963         the new decl to...
4964         (lto_main): ...here.  Inform the middle end about global variables
4965         after we have read in all the input files.
4966         * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4967         variables with internal linkage, so delete the check for internal
4968         linkage.  Combine TREE_PUBLIC flags.
4970 2007-11-08  Nathan Froyd  <froydnj@codesourcery.com>
4972         * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4973         DW_AT_decl_line.
4974         * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4975         builtin specially.  Move check for attribute compatibility
4976         earlier.
4978 2007-11-07  Nathan Froyd  <froydnj@codesourcery.com>
4980         * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4981         * config-lang.in (gtfiles): Add lto.h and lto.c.
4982         * lto-elf.c: Include ggc.h.
4983         (lto_elf_file_open): Allocate elf_file from GC memory.
4984         * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4985         (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4986         in GC memory.
4987         (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4988         (lto_file_close): Free file from GC memory.
4989         (lto_cache_store_DIE): Allocate the new entry in GC memory.
4990         (lto_read_member_DIE): Fix declaration.
4991         (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4992         in GC memory.
4993         (current_lto_file): New variable.
4994         (lto_main): Use it.
4995         (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4996         lto_die_cache_entry): Move to...
4997         * lto.h: ...here and add GTY markers as appropriate.  Delete forward
4998         declarations accordingly.
4999         (struct lto_file_struct): Declare.
5000         (lto_file_vtable): Use it instead of lto_file.
5002 2007-11-06 Alon Dayan  <alond@il.ibm.com>
5003            Kenneth Zadeck  <zadeck@naturalbridge.com>
5005          * lto-read.c (process_flags, lto_static_init_local):
5006          read flags of VAR_DECL and FUNCTION_DECL of size>1.
5007          change global array num_flags_for_code to flags_length_for_code.
5008          (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5009         
5010 2007-11-05  Nathan Froyd  <froydnj@codesourcery.com>
5012         * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5013         layout functions to compute information about the newly constructed
5014         type.
5016 2007-11-02  Nathan Froyd  <froydnj@codesourcery.com>
5018         * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5019         case to use DECL_RESULT if necessary.
5021 2007-11-01  Kenneth Zadeck  <zadeck@naturalbridge.com>
5023         * lto-read.c (input_tree_list): Removed.
5024         (input_tree_flags): Added parameter to force flags no matter what
5025         tree code.
5026         (input_expr_operand): Added parameter to input_tree_flags.
5027         Added case for IDENTIFIER_NODE and TREE_LIST.  Changed ASM to call
5028         input_expr_operand rather than input_tree_lists.
5029         (input_local_var): Use input_expr_operand to read attributes
5030         rather then input_tree_list.
5031         (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5033 2007-10-31  Nathan Froyd  <froydnj@codesourcery.com>
5035         * lto.c (lto_read_typedef_DIE): Fix comment typo.
5036         (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5037         TYPE_DECL for it.
5038         * lto-read.c (lto_read_body): Use correct sizes for calculating
5039         type_decls_offset and types_offset.
5041 2007-10-30  Nathan Froyd  <froydnj@codesourcery.com>
5043         * lto-tree.h (union lang_tree_node): Change GTY description to chain
5044         with GENERIC_NEXT.
5045         * config-lang.in (gtfiles): Add lto-lang.c.
5046         * lto-lang.c: Include gt-lto-lto-lang.h.
5047         * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5048         (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5049         (lto/lto-read.o): Likewise.
5051 2007-10-29  Kenneth Zadeck  <zadeck@naturalbridge.com>
5053         * lto-read.c (data_in): Added type_decls and current_col fields.
5054         (string_slot): New type to hold canonized file name.
5055         (hash_string_slot_node, eq_string_slot_node, canon_file_name, 
5056         input_line_info, set_line_info, clear_line_info): New functions.
5057         (file_name_hash_table): New hash table.
5058         (input_local_var, input_labels, input_local_vars_index, 
5059         input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5060         (input_uleb128): Changed type of byte var.
5061         (input_expr_operand): Large number of changes to get line numbers
5062         correct.  Added TYPE_DECL case.
5063         (input_globals): Added code to get TYPE_DECLs processed.
5064         (input_local_var): Added code to process line numbers and
5065         TREE_CHAIN and DECL_CONTEXT.
5066         (input_function, input_constructor): Added call to
5067         clear_line_number.
5068         (lto_static_init_local): Added code to get line numbers correct.
5069         (lto_read_body): Added code to get TYPE_DECLS read and to change
5070         parameters to the calls above that had their parms reorganized.
5072         
5073 2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>
5075         * lto.h (lto_resolve_typedecl_ref): Declare.
5076         * lto.c (lto_resolve_typedecl_ref): New function.
5078 2007-10-29  Mark Mitchell  <mark@codesourcery.com>
5079             Nathan Froyd  <froydnj@codesourcery.com>
5081         * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5082         DIEs even if we find an abstract origin for this DIE.
5084 2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>
5086         * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5087         RESULT_DECL slightly earlier.  Only remember the decl for later
5088         if we successfully merge declarations.
5090 2007-10-24  Kenneth Zadeck  <zadeck@naturalbridge.com>
5092         * lto-read.c (input_expr_operand): Give label_values the proper
5093         context and provide switch statements with a default type.
5094         
5095 2007-10-23  Nathan Froyd  <froydnj@codesourcery.com>
5097         * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5098         * lto.c (lto_materialize_function): ...to here.
5100 2007-10-22  Nathan Froyd  <froydnj@codesourcery.com>
5102         * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5103         * lto.c (lto_info_fd_init): Initialize it.
5104         (lto_info_fd_close): Free it.
5105         (lto_materialize_function): New function.
5106         (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5107         unmaterialized_fndecls.
5108         (lto_file_read): Read in all the function bodies after we have read
5109         all of the DWARF info.
5110         * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5111         reading a function body.
5113 2007-10-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
5115         * lto-read.c (input_tree_flags): Renamed from input_flags to be
5116         semetric with output_tree_flags.  Added call to log flags.
5117         (process_tree_flags): Renamed from process_flags.  Fixed a lot of
5118         type issues to make everything consistent with flags being
5119         unsigned HOST_WIDE_INTS.
5120         (input_expr_operand): Added call to
5121         recompute_tree_invariant_for_addr_expr.
5122         (input_local_var): Added debugging for tree_chains.  Now calls
5123         input_tree_flags.
5124         (input_phi): Made flags unsigned HOST_WIDE_INT.
5125         (input_ssa_names): Now calls input_tree_flags.
5126         (lto_read_body): Now sets cfun.
5127         (lto_read_function_body): Now sets current_function_pointer.
5128         
5129 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
5131         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5132         definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5133         inspecting fields within.
5134         (lto_read_DIE_at_ptr): Delete check for null result; let callers
5135         handle this appropriately.
5137 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
5139         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5140         DW_AT_abstract_origin properly.  Ensure that we're not dealing with
5141         both DW_AT_abstract_origin and DW_AT_specification.
5142         (lto_read_subroutine_type_subprogram_DIE): Handle
5143         DW_AT_abstract_origin.
5144         (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5145         (lto_read_DIE_at_ptr): Define as static to match declaration.
5146         Lookup the PTR in the cache before reading it from the file.
5147         (lto_resolve_var_ref): Adjust accordingly.
5148         (lto_resolve_fn_ref): Adjust accordingly.  Tweak comment.
5149         (lto_resolve_field_ref): Adjust accordingly.  Tweak comment.
5151 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
5153         * lto.c (lto_read_DIE_at_ptr): New function.
5154         (lto_resolve_var_ref): Use it.
5155         (lto_resolve_fn_ref): Use it.
5156         (lto_resolve_field_ref): Use it.
5157         (lto_read_variable_formal_parameter_constant_DIE): Follow
5158         DW_AT_specification and return the associated decl when appropriate.
5160 2007-10-18  Nathan Froyd  <froydnj@codesourcery.com>
5162         * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5163         Implement for scalar integer modes.
5164         (lto_init): Initialize size_type_node.
5166 2007-10-18  Kenneth Zadeck  <zadeck@naturalbridge.com>
5168         * lto-read.c (input_expr_operand): Remove ssa name asserts.
5169         (input_local_var): Add chaining for params.
5170         (input_ssa_names): Add cfun parameter.
5171         (input_function): Remove unnecessary else.
5173 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
5175         * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5176         (lto_resolve_var_ref): Use proper types.
5177         (lto_resolve_fn_ref): Likewise.
5178         (lto_resolve_field_ref): Likewise.
5180 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
5182         * lto-read.c (input_expr_operand): Remove case.
5184 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
5186         * lto.c (lto_read_only_for_child_DIEs): New function.
5187         (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5188         * lto-elf.c (lto_elf_map_lto_section): Remove.
5189         (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5190         * lto-read.c (input_expr_operand): Assert that we never read a NULL
5191         SSA_NAME.  Add missing case for mechanical codes.
5192         (input_cfg): Use basic_block_info_for_function instead of
5193         basic_block_info.
5195 2007-10-16  Kenneth Zadeck  <zadeck@naturalbridge.com>
5197         * lto-read.c (input_sleb128, input_integer): Use proper casts.
5198         (input_list): Renamed input_tree_list and modified to follow same
5199         protocol as lto-function-out.c:output_tree_list.
5200         (input_expr_operand): Make asm operands use input_tree_list.
5201         (input_local_var): Now uses input_tree_list.
5202         (lto_read_body): Change placement for setting context of debug_labels.
5203         
5204         
5205 2007-10-16  Kenneth Zadeck  <zadeck@naturalbridge.com>
5207         * lto-read.c (input_real): Output debugging in proper order.
5208         (input_integer): Compute bit lengths properly.
5209         (input_list): Clean up declaration.
5210         (input_expr_operand): Change calls to input_real to match fix.
5211         Make reading of LTO_bit_field_ref1 match output.
5212         (input_local_var): Make reading of attributes match what is being
5213         written.
5214         (dump_debug_stream): Also print char in hex.
5215         (debug_out_fun): Fix signed unsigned mismatch.
5216         
5217 2007-10-10  Nathan Froyd  <froydnj@codesourcery.com>
5219         * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5220         DW_AT_GNU_vector specially, as they are not contiguous with the
5221         specified set of attribute names.  Use class_mask to check for
5222         errors at the end of the function
5223         (lto_resolve_var_ref): Read the DIE if it is not cached.
5224         (lto_resolve_fn_ref): Likewise.
5225         (lto_resolve_field_ref): Likewise.
5227 2007-10-05  Nathan Froyd  <froydnj@codesourcery.com>
5229         * lto.c: Include dwarf2out.h.
5230         (lto_cache_store_DIE): Assert that we never change the value.
5231         (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5232         (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5233         (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5234         sensible type instead.
5235         (lto_read_structure_union_class_type_DIE): Store the newly
5236         created type prior to reading the members of the structure to
5237         avoid infinite recursion.  Avoid computing types and alignments
5238         for structures whose sizes are unknown.
5239         (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5240         and set DECL_ARTIFICIAL accordingly.  Ignore DW_AT_abstract_origin,
5241         DW_AT_const_value, and DW_AT_specification.
5242         (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5243         Return early if we have already constructed the function type.
5244         (lto_read_typedef_DIE): Check to see if the type has been cached
5245         already.  Cache the type before reading any children.
5246         (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5247         (lto_read_DIE): Unset context->skip_non_parameters around reading
5248         the DIE.
5249         (lto_resolve_fn_ref): Delete trailing whitespace.
5251 2007-09-11  Kenneth Zadeck  <zadeck@naturalbridge.com>
5253         * lto-read.c (input_expr_operand): Added type for STRING_CST.
5254         
5255 2007-09-10  Nathan Froyd  <froydnj@codesourcery.com>
5257         * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5259 2007-09-07  Nathan Froyd  <froydnj@codesourcery.com>
5261         * lto-lang.c (signed_and_unsigned_types): New variable.
5262         (lto_type_for_size): Consult signed_and_unsigned_types to find
5263         an approprite type, creating it if necessary.
5264         (lto_set_decl_assembler_name): Add actual method body.
5266 2007-09-06  Jim Blandy  <jimb@codesourcery.com>
5268         * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5269         can't find a var init for this variable, leave its DECL_INITIAL.
5270         * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5271         lto_elf_map_fn_body.
5272         (lto_map_lto_section): New function.
5273         (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5274         bodies, and lto_elf_map_optional_lto_section for variable
5275         initializers.
5276         (lto_elf_find_section_data): Quietly return NULL if the section is
5277         missing.
5278         (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5280         * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5282         * lto-read.c (lto_read_body): Doc fix.
5284 2007-08-29  Kenneth Zadeck  <zadeck@naturalbridge.com>
5286         * lto-read.c (fun_in): Renamed to data_in.
5287         (input_expr_operand, input_local_var, input_string_internal,
5288         input_string, input_real, input_list, get_label_decl, 
5289         get_type_ref, input_expr_operand, input_globals, input_labels,
5290         input_local_vars_index, input_local_var, input_local_vars, 
5291         input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5292         (input_constructor): New function.
5293         (lto_read_function_body): Renamed to lto_read_body and generalized
5294         to handle both functions and constructors.
5295         (lto_read_function_body, lto_read_var_init): New function.
5296         
5297         
5298 2007-08-28  Kenneth Zadeck  <zadeck@naturalbridge.com>
5300         * lto-read.c (input_expr_operand): Assert that there really is a
5301         FUNCTION_DECL.
5302         (input_globals): Removed checks on 0 section.
5303         
5304 2007-08-28  Kenneth Zadeck  <zadeck@naturalbridge.com>
5306         * lto-read.c (fun_in): Added local_decls_index and
5307         local_decls_index_d.  
5308         (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5309         (input_globals): Enabled code to handle FIELD_DECLs.
5310         (input_local_vars_index, input_local_vars): New function.
5311         (input_local_var): Changed to allow locals to be input randomly.
5312         (lto_read_function_body): Added code to input the
5313         local_decls_index and to free various structures.
5314         
5315 2007-08-17  Jim Blandy  <jimb@codesourcery.com>
5317         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5318         ATTRIBUTE_UNUSED from 'die' formal.
5320         Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5321         * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5322         (input_list): Fix type of 'tag'.
5323         (input_expr_operand): Fix type of 'tag' argument.  Update
5324         declaration.  Fix type of 'ctag'.  Add default case to switch,
5325         since the type of the switched value is now an enum.
5326         (input_local_vars): Fix type of 'tag'.
5327         (input_bb): Fix type of 'tag' argument.
5328         (input_function): Fix type of 'tag' argument.
5330 2007-08-16  Jim Blandy  <jimb@codesourcery.com>
5332         * lto.c (lto_read_member_DIE): Record the tree we create in
5333         fd->die_cache.  (Our 'die' argument is no longer unused.)
5334         (lto_resolve_field_ref): New function.
5335         * lto.h (lto_resolve_field_ref): New declaration.
5337 2007-08-15  Jim Blandy  <jimb@codesourcery.com>
5339         * lto-read.c (lto_read_var_init): Mark arguments as unused.
5341 2007-08-07  Jim Blandy  <jimb@codesourcery.com>
5343         * lto.c (lto_read_form): Complete attr_classes table.
5344         (DWARF2_form_data): Doc fix.
5345         
5346 2007-08-05  Mark Mitchell  <mark@codesourcery.com>
5348         * lto.h (lto_file_vtable): Remove read_var_init.  Add map_var_init
5349         and unmap_var_init.
5350         (lto_read_var_init): Declare.
5351         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5352         interface for reading variable initializers.
5353         * lto-elf.c (lto_elf_read_var_init): Remove.
5354         (lto_elf_file_vtable): Update initializer.
5355         (lto_elf_read_var_init): Add comment about unused-ness.
5356         * lto-read.c (lto_read_var_init): New.
5358         * lto.c (lto_read_form): Add entry for DW_AT_inline.
5360 2007-08-02  Kenneth Zadeck  <zadeck@naturalbridge.com>
5362         * lto-read.c (lto_read_function_body): Moved declaration of fn
5363         outside of ifdef.
5364         
5365 2007-08-01  Kenneth Zadeck  <zadeck@naturalbridge.com>
5367         * lto-read.c (input_uleb128, input_string_internal, input_real,
5368         input_integer, input_record_start, input_list, get_type_ref,
5369         input_flags, input_expr_operand, input_expr_operand,
5370         input_expr_operand, input_local_vars, input_cfg, input_phi,
5371         input_ssa_names, input_bb, input_function): Added semicolons.
5373         
5374 2007-07-31  Kenneth Zadeck  <zadeck@naturalbridge.com>
5376         * lto-read.c (input_globals): Remove debugging.
5377         (input_function): Set DECL_ARGUMENTS.
5379 2007-07-31  Kenneth Zadeck  <zadeck@naturalbridge.com>
5381         * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5382         RETURN_EXPR, MODIFY_EXPR and processing of flags.
5383         (input_phi): Made work with operands other than SSA_NAMES and
5384         fixed processing of flags.
5385         (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5386         (input_flags): New function.
5387         * lto-lang.c (lto_init): Changed state of in_lto_p.
5388         
5389         
5390 2007-07-24  Mark Mitchell  <mark@codesourcery.com>
5392         * lto-tree.h (lto_varargs_cookie): Remove.
5393         * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5394         skip_non_parameters, skip_parameters.
5395         (lto_varargs_cookie): Remove.
5396         (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5397         parameter types.
5398         (lto_read_abbrev): New function.
5399         (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5400         child DIEs.
5401         (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5402         (lto_read_DIE): Use lto_read_abbrev.  Honor skip_* flags.
5403         (lto_file_read): Initialize new context fields.
5404         * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5405         (lto_unsigned_type): Remove.
5406         (lto_signed_type): Likewise.
5407         (lto_signed_or_unsigned_type): Likewise.
5408         (lto_init): Do not create lto_varargs_cookie.
5409         (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5410         (LANG_HOOKS_SIGNED_TYPE): Likewise.
5411         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5413 2007-07-19  Jan Hubicka  <jh@suse.cz>
5415         * lto-read.c (lto_read_function_body): Produce empty scope block
5416         to avoid crash.
5418 2007-07-18  Mark Mitchell  <mark@codesourcery.com>
5420         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5421         process local variables.
5422         (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5424 2007-07-13  Kenneth Zadeck  <zadeck@naturalbridge.com>
5426         * lto-read.c (input_list, input_expr_operand): Added struct
5427         function parameter.
5428         (init_cfg, finalize_cfg): Removed function.
5429         (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5430         (input_labels, input_local_vars): Now takes input_block parameter rather than
5431         synthsyzing it.
5432         (input_cfg, input_phi, input_ssa_names): New functions.
5433         (input_bb): Now passes in input_blocks.  Does not construct cfg
5434         and processes the list of phi functions.
5435         (input_function): Now builds both the cfg and ssa_names table.
5436         (lto_read_function_body): Processes new header fields to construct
5437         streams for the ssa_names and cfg and their debugging.
5438         * lto/lto-lang.c (lto_init): Set in_lto_p.
5439         
5440         
5441 2007-06-28  Mark Mitchell  <mark@codesourcery.com>
5443         * lto.h (lto_file_vtable): Add read_var_init.
5444         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5445         initializers.
5446         (lto_main): Remove bogus asserts.
5447         * lto-elf.c (tm.h): Include it.
5448         (libiberty.y): Likewise.
5449         (lto_elf_file): Add strtab and symtab.  Rename
5450         string_table_section_index to sec_strtab.
5451         (lto_elf_file_vtable): Add lto_elf_read_var_init.
5452         (lto_elf_get_shdr): New function.
5453         (lto_elf_free_shdr): Likewise.
5454         (lto_elf_find_section_data): Use them.
5455         (lto_elf_read_symtab): New function.
5456         (lto_elf_lookup_sym): Likewise.
5457         (lto_elf_free_sym): Likewise.
5458         (lto_elf_file_open): Tidy.  Call lto_elf_read_symtab.
5459         (lto_elf_built_init): New function.
5460         (lto_elf_read_var_init): Likewise.
5461         * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5463 2007-06-26  Kenneth Zadeck  <zadeck@naturalbridge.com>
5465         * lto-read (make_new_block): Initialize the stmt_list.
5466         (lto_static_init_local): Add debugging for missing codes.
5467         
5468 2007-06-26  Mark Mitchell  <mark@codesourcery.com>
5470         * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5471         unprototyped functions. 
5473 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
5475         * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5476         Handle DW_AT_MIPS_linkage_name.
5477         (lto_read_subroutine_type_subprogram): Likewise.  Correct
5478         compilation errors.
5479         (lto_main): Remove incorrect assertions.
5480         * lto-symbtab.c: Build function types out of TREE_LISTs.
5482         * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5483         
5484         * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5485         
5486 2007-06-21  Kenneth Zadeck  <zadeck@naturalbridge.com>
5488         * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5489         dummy since ggc does not like empty structs.
5490         * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5491         * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5492         expr->common to expr->base.
5493         (make_new_block): Moved stmt_list to proper place.
5496 2007-03-14 Robert Kennedy  <jimbob@google.com>
5498         Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5499         * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5500         assembler name from DWARF.
5501         * lto-lang.c (lto_set_decl_assembler_name) New function.
5503 2006-09-10  Mark Mitchell  <mark@codesourcery.com>
5505         * lto.h (lto_file_vtable): New structure.
5506         (lto_file): Add vtable pointer.
5507         (lto_file_init): Add vtable paramter.
5508         (lto_read_function_body): New function.
5509         (lto_symtab_merge_fn): New function.
5510         * lto.c (lto_file_init): Add vtable parameter.
5511         (lto_read_form): Fill in entries for DW_AT_prototyped,
5512         DW_AT_frame_base.
5513         (lto_read_subroutine_type_subprogram_DIE): New function.
5514         (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5515         DW_TAG_subprogram.
5516         * lto-elf.c (lto_elf_vile_vtable): New variable.
5517         (lto_elf_file_open): Pass it to lto_file_init.
5518         (lto_elf_map_fn_body): New function.
5519         (lto_elf_unmap_fn_body): Likewise.
5520         * lto-read.c: New file.
5521         * lto-symtab.c (lto_symtab_merge_fn): New function.
5522         * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5523         tree_rest_of_compilation.
5524         * Make-lang.in (LTO_OBJS): Add lto-read.o
5525         (lto-read.o): New target.
5527 2006-09-03  Mark Mitchell  <mark@codesourcery.com>
5529         * lto.c (<inttypes.h>): Don't include it.
5530         (lto_context): Don't typedef it.
5531         (lto_resolve_reference): New function.
5532         (lto_read_form): Use it.
5533         (lto_resolve_type_ref): New function.
5534         (lto_resolve_var_ref): Likewise.
5535         (lto_resolve_fn_ref): Likewise.
5536         * lto.h (<inttypes.h>): Include it.
5537         (lto_context): New type.
5538         (lto_ref): New structure.
5539         (lto_resolve_type_ref): Declare.
5540         (lto_resolve_var_ref): Likewise.
5541         (lto_resolve_fn_ref): Likewise.
5543 2006-08-18  Mark Mitchell  <mark@codesourcery.com>
5545         * lang-specs.h: New file.
5547 2006-08-14  Mark Mitchell  <mark@codesourcery.com>
5549         * lto.c (lto_info_fd_init): Allocate the DIE cache.
5550         (lto_info_fd_close): Deallocate it.
5551         (lto_die_cache_entry): New structure.
5552         (lto_cache_hash): New function.
5553         (lto_cache_eq): Likewise.
5554         (lto_cache_store_DIE): Likewise.
5555         (lto_cache_lookup_DIE): Likewise.
5556         (lto_read_referenced_type_DIE): Use the cache.
5557         (lto_read_pointer_type_DIE): Robustify.
5558         (lto_read_DIE): Use the cache.
5559         * lto.h (hashtab.h): Include.
5560         (lto_info_fd): Add DIE cache.
5561         * Make-lang.in (LTO_H): New variable.
5562         (lto/lto-lang.o): Use LTO_H.
5563         (lto/lto-elf.o): Likewise.
5564         (lto/lto-symtab.o): Likewise.
5566 2006-07-09  Mark Mitchell  <mark@codesourcery.com>
5568         * lto.c (lto_abi_mismatch_error): New function.
5569         (lto_abbrev_read): Initialize num_abbrevs.
5570         (lto_read_form): Specify allowed form classes for
5571         DW_AT_declaration.  Adjust for change to lto_set_cu_context.
5572         (lto_read_variable_formal_parameter_constant_DIE): Handle
5573         DW_AT_declaration.  Call lto_symtab_merge_var.
5574         (lto_read_pointer_type_DIE): New function.
5575         (lto_read_base_type_DIE): Use build_nonstandard_integer_type.  Do
5576         not creat TYPE_DECLs for types that already have them.
5577         (lto_read_DIE): Add lto_read_pointer_type_DIE.
5578         (lto_set_cu_context): Make cu_start point to the header, not the
5579         first DIE.
5580         (lto_file_read): Adjust for change to lto_set_cu_context.
5581         * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5582         (lto/lto-symtab.o): New rule.
5583         * lto-tree.h (lang_identifier): Add decl field.
5584         (LANG_IDENTIFIER_CAST): New macro.
5585         (LTO_IDENTIFIER_DECL): Likewise.
5586         (lto_symtab_merge_var): Declare.
5587         * lto-symtab.c: New file.
5589 2006-07-02  Daniel Berlin  <dberlin@dberlin.org>
5591         * lto.c (lto_context): Add current_cu and info_fd members.
5592         (DWARF2_CompUnit): New structure.
5593         (lto_read_DIE): Take lto_info_fd *.
5594         (lto_read_child_DIEs): Ditto.
5595         (lto_file_corrupt_error): Constify argument.
5596         (lto_set_cu_context): New function
5597         (lto_info_fd_init): Ditto.
5598         (lto_info_fd_close): Ditto.
5599         (lto_file_init): Use lto_info_fd_init.
5600         (lto_file_close): Use lto_info_fd_close.
5601         (lto_read_initial_length): Pass in pointer to header size.
5602         (lto_read_comp_unit_header): Correct cu_length to
5603         real length from beginning of header.  Take lto_info_fd * as
5604         argument.
5605         (find_cu_for_offset): New function.
5606         (lto_read_form): Change first argument to lto_info_fd *.
5607         Add FORM_CONTEXT argument.
5608         Handle DW_FORM_ref_addr.
5609         (lto_read_tag_DIE): Change first argument to lto_info_fd *.     
5610         (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5611         Swap contexts if necessary for form.
5612         (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5613         lto_file_corrupt_error.
5614         (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5615         (lto_read_referenced_type_DIE): Change first argument to
5616         lto_info_fd *.  Access lto_fd fields through base pointer.
5617         (lto_read_compile_unit_DIE): Change first argument to an
5618         lto_info_fd *.
5619         (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5620         (lto_read_base_type_DIE): Ditto.
5621         (lto_read_child_DIEs): Ditto.
5622         (lto_read_DIE): Ditto.  Change type of function pointer.
5623         (lto_info_read): New function.
5624         (lto_set_cu_context): Ditto.
5625         (lto_file_read): Use lto_info_read, walk resulting CU's
5626         (lto_main): Update for lto_info_fd change.
5627         * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5628         necessary.
5629         * lto.h (DWARF2_CompUnit): New structure.
5630         (lto_info_fd): Ditto.
5631         (lto_file): Change debug_info to be an lto_info_fd.
5632         
5633 2006-06-25  Mark Mitchell  <mark@codesourcery.com>
5635         * lto.c (toplev.h): Include it.
5636         (dwarf2.h): Likewise.
5637         (tree.h): Likewise.
5638         (tm.h): Likewise.
5639         (cgraph.h): Likewise.
5640         (ggc.h): Likewise.
5641         (inttypes.h): Likewise.
5642         (DWARF2_attr): New type.
5643         (DWARF2_abbrev): Likewise.
5644         (DWARF2_class): Likewise.
5645         (DWARF2_form_data): Likewise.
5646         (lto_context): Likewise.
5647         (lto_fd_init): New function.
5648         (lto_abbrev_fd_init): Likewise.
5649         (lto_abbrev_fd_close): Likewise.
5650         (lto_file_init): Use them.
5651         (lto_file_close): New function.
5652         (lto_file_corrupt_error): Likewise.
5653         (LTO_CHECK_INT_VAL): New macro.
5654         (lto_check_size_t_val): New function.
5655         (lto_check_int_val): Likewise.
5656         (LTO_READ_TYPE): New macro.
5657         (lto_read_ubyte): New function.
5658         (lto_read_uhalf): Likewise.
5659         (lto_read_uword): Likewise.
5660         (lto_read_uleb128): Likewise.
5661         (lto_read_initial_length): Likewise.
5662         (lto_abbrev_read_attrs): Likewise.
5663         (lto_abbrev_read): Likewise.
5664         (lto_abbrev_lookup): Likewise.
5665         (lto_read_section_offset): Likewise.
5666         (lto_read_comp_unit_header): Likewise.
5667         (lto_read_form): Likewise.
5668         (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5669         (LTO_BEGIN_READ_ATTRS): Likewise.
5670         (LTO_END_READ_ATTRS): Likewise.
5671         (lto_unsupported_attr_error): New function.
5672         (lto_get_identifier): Likewise.
5673         (lto_read_referenced_type_DIE): Likewise.
5674         (lto_read_compile_unit_DIE): Likewise.
5675         (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5676         (lto_read_base_type_DIE): Likewise.
5677         (lto_read_DIE): Likewise.
5678         (lto_read_child_DIEs): Likewise.
5679         (lto_file_read): Read DIEs.
5680         (lto_main): Ask middle end to emit entities.
5681         * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5682         * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5683         (lto_elf_file_close): Likewise.
5684         * lto.h (lto_file): Declare.
5685         (DWARF2_abbrev): Likewise.
5686         (lto_fd): New type.
5687         (lto_abbrev_fd): Likewise.
5688         (lto_file): Use new types.
5689         (lto_file_close): Declare.
5690         * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5691         
5692 2006-06-18  Mark Mitchell  <mark@codesourcery.com>
5694         * lto.h: New file.
5695         * lto.c: New file.
5696         * lto-elf.c: New file.
5697         * lto-lang.c (flags.h): Include it.
5698         (lto.h): Likewise.
5699         (lto_init): New function.
5700         (lto_write_globals): Remove.
5701         (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing. 
5702         (LANG_HOOKS_INIT): Define.
5703         (LANG_HOOKS_PARSE_FILE): Likewise.
5704         * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5705         (LTO_EXE): Link with libelf.
5706         (lto/lto-lang.o): Update dependencies.
5707         (lto/lto.o): New target.
5708         (lto/lto-elf.o): Likewise.
5710 2006-06-12  Mark Mitchell  <mark@codesourcery.com>
5712         * config-lang.in: New file.
5713         * Make-lang.in: Likewise.
5714         * lto-tree.h: Likewise.
5715         * lto-lang.c: Likewise.
5717 Copyright (C) 2006-2017 Free Software Foundation, Inc.
5719 Copying and distribution of this file, with or without modification,
5720 are permitted in any medium without royalty provided the copyright
5721 notice and this notice are preserved.