2016-01-18 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / lto / ChangeLog
blob724a525e860a200a3d14b5b658acf2bc5c441328
1 2016-01-18  Richard Biener  <rguenther@suse.de>
3         PR lto/69337
4         * lto-symtab.c (lto_symtab_merge): Return early for mismatched
5         function vs. variable.
7 2016-01-12  Richard Biener  <rguenther@suse.de>
9         PR lto/69077
10         * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
11         merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
13 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
15         Update copyright years.
17 2015-12-10  Jan Hubicka  <hubicka@ucw.cz>
19         PR lto/68878
20         * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
21         * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
22         (lto_symtab_prevailing_decl): Use it.
24 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
26         * lto.c: Include stringpool.h and fold-const.h.
27         (offload_handle_link_vars): New static function.
28         (lto_main): Call offload_handle_link_vars.
30 2015-12-10  Jan Hubicka  <hubicka@ucw.cz>
32         * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
34 2015-12-11  Jan Hubicka  <hubicka@ucw.cz>
36         PR ipa/61886
37         * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
38         values of error and warning attributes.
40 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
42         PR lto/68811
43         * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
44         DECL.
45         (LTO_NO_PREVAIL): Use gcc_checking_assert.
47 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
49         PR lto/68811
50         * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
51         by itself.
53 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
55         PR ipa/61886
56         * lto-symtab.c: Include lto-symtab.h.
57         (lto_cgraph_replace_node): Do not merge profiles here.
58         (lto_symtab_merge_p): New function.
59         (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
60         (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
61         aliases.
62         (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
63         (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
64         * lto.c: Include lto-symtab.h
65         * lto-symtab.h: New.
67 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
69         PR ipa/61886
70         * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
71         are not part of the definition.
72         (contained_in_symbol): Likewise.
73         (promote_symbol): When promoting a symbol also promote all transparent
74         aliases.
75         (rename_statics): Weakref needs unique name, too.
77 2015-12-07  Jan Hubicka  <hubicka@ucw.cz>
79         PR ipa/61886
80         * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
81         rename_statics, rename_statics): Handle transparent aliases.
83 2015-12-04  Jan Hubicka  <hubicka@ucw.cz>
85         * lto-symtab.c (lto_cgraph_replace_node): Update code computing
86         merged_comdat.
88 2015-12-01  Jan Hubicka  <hubicka@ucw.cz>
90         * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
92 2015-11-25  Jan Hubicka  <jh@suse.cz>
94         * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
95         * lang.opt (lto_linker_output): New enum.
96         (flinker_output): New flag.
98 2015-11-24  Jan Hubicka  <hubicka@ucw.cz>
100         * lto-symtab.c: Include alias.h
101         (warn_type_compatibility_p): Replace types_compatible_p checks by
102         TBAA and size checks; set bit 2 if locations are TBAA incompatible.
103         (lto_symtab_merge): Compare DECL sizes.
104         (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
106 2015-11-24  Jan Hubicka  <hubicka@ucw.cz>
108         * lto.c (iterative_hash_canonical_type): Recruse for all types
109         which pass !canonical_type_used_p.
110         (gimple_register_canonical_type_1): Sanity check we do not compute
111         canonical type of anything with !canonical_type_used_p.
112         (gimple_register_canonical_type): Skip all types that are
113         !canonical_type_used_p
115 2015-11-24  Jan Hubicka  <hubicka@ucw.cz>
117         * lto.c (unify_scc): Use free_node.
119 2015-11-21  Jan Hubicka  <hubicka@ucw.cz>
121         * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
122         (gimple_register_canonical_type_1): Check that pointers do not get
123         canonical types.
124         (gimple_register_canonical_type): Do not register pointers.
126 2015-11-21  Jan Hubicka  <hubicka@ucw.cz>
128         * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
129         flag for types that are not ODR; fix loop walking parameters.
131 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
133         * lto-lang.c: Remove unused header files.
134         * lto-object.c: Likewise.
135         * lto-partition.c: Likewise.
136         * lto-symtab.c: Likewise.
137         * lto.c: Likewise.
139 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
141         * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
143 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
145         * lto-lang.c: Don't undef DEF_BUILTIN.
147 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
149         * lto-lang.c: Reorder #include's and remove duplicates.
150         * lto-object.c: Likewise.
151         * lto-partition.c: Likewise.
152         * lto-symtab.c: Likewise.
153         * lto.c: Likewise.
155 2015-10-27  Mikhail Maltsev  <maltsevm@gmail.com>
157         * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
158         conditionals.
159         (lto_fixup_state): Likewise.
160         (do_whole_program_analysis): Use
161         symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
162         conditionals.
164 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
166         * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
167         DEF_FUNCTION_TYPE_11): Define.
169 2015-10-10  Jan Hubicka  <hubicka@ucw.cz>
171         * lto.c (hash_canonical_type): Honor
172         type_with_interoperable_signedness.
174 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
176         * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
177         (DEF_FUNCTION_TYPE_VAR_11): Delete.
179 2015-08-31  Richard Biener  <rguenther@suse.de>
181         * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
182         * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
183         (lto_symtab_prevailing_decl): Do not replace a decl that didn't
184         participate in merging with something else.
186 2015-08-31  Richard Biener  <rguenther@suse.de>
188         * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
189         test, do not replace a non-builtin with a builtin.
190         * lto.c (compare_tree_sccs_1): Do not merge things we stream
191         as builtins vs. non-builtins.
193 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
195         * lto.h: Remove useless typedefs.
197 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
199         * lto.c: Remove redundant includes.
201 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
203         * lto-lang.c: Fix double word typos.
205 2015-07-10  Andrew MacLeod  <amacleod@redhat.com>
207         * lto.c: Include cfghooks.h rather than predict.h.
209 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
211         * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
212         lto-streamer.h.
213         * lto-object.c: Likewise.
214         * lto-partition.c: Likewise.
215         * lto-symtab.c: Likewise.
217 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
219         * lto-lang.c: Adjust includes for flags.h changes.
221 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
223         * lto-lang.c: Adjust includes.
224         * lto-object.c: Likewise.
225         * lto-partition.c: Likewise.
226         * lto-symtab.c: Likewise.
227         * lto.c: Likewise.
229 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
231         * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
232         * lto-object.c: Likewise.
233         * lto-partition.c: Likewise.
234         * lto-symtab.c: Likewise.
235         * lto-tree.h: Likewise.
236         * lto.c: Likewise.
238 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
240         * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
241         than typed_noop_remove.  Remove redudant typedefs.
243 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
245         * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
246         * lto-object.c: Likewise.
247         * lto-partition.c: Likewise.
248         * lto-symtab.c: Likewise.
249         * lto.c: Likewise.
251 2015-06-14  Jan Hubicka  <hubicka@ucw.cz>
253         PR ipa/66181
254         * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
256 2015-06-12  DJ Delorie  <dj@redhat.com>
258         * lto-lang.c (lto_type_for_size): Include intN types.
259         (lto_type_for_mode): Likewise.
261 2015-06-08  Jan Hubicka  <hubicka@ucw.cz>
263         * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
265 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
267         * lto-lang.c : Adjust include files.
268         * lto-object.c : Likewise.
269         * lto-partition.c : Likewise.
270         * lto-partition.h : Likewise.
271         * lto-symtab.c : Likewise.
272         * lto.c : Likewise.
273         * lto.h : Likewise.
275 2015-06-06  Jan Hubicka  <hubicka@ucw.cz>
277         PR lto/65378
278         * lto-symtab.c (warn_type_compatibility_p): Fix call of
279         odr_or_derived_type_p.
280         (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
282 2015-06-08  Jan Hubicka  <hubicka@ucw.cz>
285         * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
286         pointers.
288 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
290         * lto-lang.c (lto_write_globals): Remove.
291         (LANG_HOOKS_WRITE_GLOBALS): Same.
293 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
295         * lto-lang.c: Adjust includes for restructured coretypes.h.
296         * lto-object.c: Likewise.
297         * lto-partition.c: Likewise.
298         * lto-symtab.c: Likewise.
299         * lto.c: Likewise.
301 2015-06-04  Jan Hubicka  <hubicka@ucw.cz>
303         * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
305 2015-06-03  Jan Hubicka  <hubicka@ucw.cz>
307         * lto.c (iterative_hash_canonical_type,
308         gimple_register_canonical_type): only hash main variants of types
310 2015-05-27  Martin Liska  <mliska@suse.cz>
312         * lto-partition.c (new_partition): Reset number of symbols.
313         (add_symbol_to_partition_1): Increment number of symbols.
314         (undo_partition): Decrement number of symbols.
315         (lto_balanced_map): Dump number of symbols and insns that
316         belong to a partition.
317         * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
319 2015-05-22  Jan Hubicka  <hubicka@ucw.cz>
321         * lto.c (hash_canonical_type): Be sure we hash only types that
322         need alias set.
323         (gimple_register_canonical_type_1): Do not produce canonical
324         types for types that do not need alias sets.
326 2015-05-22  Jan Hubicka  <hubicka@ucw.cz>
328         * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
330 2015-05-19  Jan Hubicka  <hubicka@ucw.cz>
332         * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
334 2015-05-17  Jan Hubicka  <hubicka@ucw.cz>
336         * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
337         compare ODR types (if available) and function types.
338         (lto_symtab_merge): ... here; output ODR violation warnings
339         and call warn_types_mismatch.
341 2015-04-29  Jan Hubicka  <hubicka@ucw.cz>
343         * lto.c (lto_fixup_state): Call verify_type.
345 2015-04-18  Trevor Saunders  <tsaunders@mozilla.com>
347         * lto.c: Adjust for hash_table changes.
349 2015-03-27  Jan Hubicka  <hubicka@ucw.cz>
351         * lto.c (lto_read_decls): Move code registering odr types out
352         of TYPE_CANONICAL conditional and also register polymorphic types.
354 2015-03-26  Jan Hubicka  <hubicka@ucw.cz>
356         * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
357         DECL_ARTIFICAL symbols.
359 2015-03-26  Jan Hubicka  <hubicka@ucw.cz>
361         PR lto/65536
362         * lto.c (unify_scc): Revert location cache when unification
363         suceeded.
364         (lto_read_decls): Accept location cache after sucess;
365         apply location cache before calling debug hooks.
367 2015-03-10  Jan Hubicka  <hubicka@ucw.cz>
369         * lto.c (read_cgraph_and_symbols): Do not do merging
370         at ltrans stage.
372 2015-02-26  Jakub Jelinek  <jakub@redhat.com>
374         * lto.c (lto_mode_identity_table): New variable.
375         (lto_read_decls): Add mode_table argument to the lto_input_block
376         constructor.
377         (lto_file_finalize): Initialize mode_table.
378         (lto_init): Initialize lto_mode_identity_table.
380 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
382         PR libgomp/64625
383         * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
384         Remove macros.
385         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
387 2015-02-03  Jan Hubicka  <hubicka@ucw.cz>
389         * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
391 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
393         * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
394         changed to pass input_location as first argument.
396 2014-12-11  Jan Hubicka  <hubicka@ucw.cz>
398         * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
400 2014-12-11  Jan Hubicka  <hubicka@ucw.cz>
402         * lto.c (compare_tree_sccs_1): Add comparsion of
403         DECL_FUNCTION_SPECIFIC_TARGET
405 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
406             James Norris  <jnorris@codesourcery.com>
408         * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
409         New macros.
410         * lto.c: Include "gomp-constants.h".
412 2015-01-14  Ilya Verbin  <ilya.verbin@intel.com>
414         * lto-partition.c (lto_promote_cross_file_statics): Remove argument
415         from select_what_to_stream.
417 2015-01-09  Bernd Schmidt  <bernds@codesourcery.com>
418             Jakub Jelinek  <jakub@redhat.com>
420         PR middle-end/64412
421         * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
422         if ACCEL_COMPILER.
424 2015-01-09  Michael Collison  <michael.collison@linaro.org>
426         * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
427         input.h, alias.h, symtab.h, options, fold-const.h,
428         wide-int.h, and inchash.h due to flattening of tree.h.
429         * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
430         input.h, alias.h, symtab.h, fold-const.h,
431         wide-int.h, and inchash.h due to flattening of tree.h.
432         * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
433         input.h, alias.h, symtab.h, options, fold-const.h,
434         wide-int.h, and inchash.h due to flattening of tree.h.
435         * lto-partition.c: Ditto.
436         * lto-symtab.c: Ditto.
438 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
440         Update copyright years.
442 2014-12-22  Martin Liska  <mliska@suse.cz>
444         * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
445         is used.
446         (undo_partition): Likewise.
447         (lto_balanced_map): Likewise.
449 2014-12-22  Martin Liska  <mliska@suse.cz>
451         * lto-partition.c: Include of symbol-summary.h is added.
452         * lto-symtab.c: Likewise.
453         * lto.c: Likewise.
455 2014-12-11  Jan Hubicka  <hubicka@ucw.cz>
457         PR ipa/61324
458         * lto.c (read_cgraph_and_symbols): Update call of
459         remove_unreachable_nodes.
460         (do_whole_program_analysis): Remove call of
461         symtab->remove_unreachable_nodes
463 2014-12-08  Trevor Saunders  <tsaunders@mozilla.com>
465         * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
466         htab with malloc instead of ggc.
468 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
470         * lto.c: Replace htab with hash_table.
472 2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
474         * lto.c (lto_read_in_decl_state): Adjust.
475         (lto_fixup_state): Likewise.
477 2014-11-17  Jan Hubicka  <hubicka@ucw.cz>
479         * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
481 2014-11-14  Jan Hubicka  <hubicka@ucw.cz>
483         * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
485 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
486             Bernd Schmidt  <bernds@codesourcery.com>
487             Andrey Turetskiy  <andrey.turetskiy@intel.com>
488             Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
490         * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
492 2014-11-13  Ilya Verbin  <ilya.verbin@intel.com>
493             Ilya Tocar  <ilya.tocar@intel.com>
494             Andrey Turetskiy  <andrey.turetskiy@intel.com>
495             Bernd Schmidt  <bernds@codesourcery.com>
497         * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
498         LTO_SECTION_NAME_PREFIX.
499         * lto-partition.c (lto_promote_cross_file_statics): Call
500         select_what_to_stream.
501         * lto.c (lto_section_with_id): Use section_name_prefix instead of
502         LTO_SECTION_NAME_PREFIX.
503         (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
504         being built as an offload compiler.
506 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
508         * lto-lang.c: Remove redundant enum from machine_mode.
510 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
512         * lto.c: Adjust include files.
513         * lto-lang.c: Ditto.
514         * lto-object.c: Ditto.
515         * lto-partition.c: Ditto.
516         * lto-symtab.c: Ditto.
518 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
520         * lto-lang.c: Adjust include files.
521         * lto-object.c: Ditto.
522         * lto-partition.c: Ditto.
523         * lto-symtab.c: Ditto.
524         * lto.c: Ditto.
526 2014-10-16  DJ Delorie  <dj@redhat.com>
528         * lto-object.c (lto_obj_begin_section): In the event that pointer
529         sizes aren't powers of two, choose a more suitable alignment
530         than (unsigned)(-1).
532 2014-10-14  DJ Delorie  <dj@redhat.com>
534         * lto-lang.c (lto_build_c_type_nodes): Check intN types for
535         size-type as well.
536         (lto_init): Initialize all intN types, not just int128.
538 2014-10-06  Martin Liska  <mliska@suse.cz>
540         * lto.c (stream_out): ARG_UNUSED added for last argument.
542 2014-09-24  Aldy Hernandez  <aldyh@redhat.com>
544         * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
545         DECL_ABSTRACT_P.
547 2014-09-23  Andi Kleen  <ak@linux.intel.com>
549         * lto-partition.c (node_cmp): Update comment.
550         (varpool_node_cmp): Use symtab_node for comparison.
551         (add_sorted_nodes): New function.
552         (lto_balanced_map): Change to keep ordered queue
553         of ordered node. Handle no_reorder attribute.
555 2014-09-11  Jan Hubicka  <hubicka@ucw.cz>
557         * lto.c (lto_read_decls): Register ODR types.
559 2014-08-20  Jan Hubicka  <hubicka@ucw.cz>
561         * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
562         call.
563         (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
565 2014-08-14  Jan Hubicka  <hubicka@ucw.cz>
567         * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
569 2014-08-14  Richard Biener  <rguenther@suse.de>
571         PR lto/62067
572         * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
574 2014-08-08  Richard Biener  <rguenther@suse.de>
576         * lto.c (lto_read_decls): Adjust for lto_input_block changes.
578 2014-08-08  Bin Cheng  <bin.cheng@arm.com>
580         PR lto/62032
581         * lto-lang.c (lto_init): Switch mis-matched arguments.
583 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
585         * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
587 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
589         * lto-partition.c, lto-partition.h: Use hash_set instead of
590         pointer_set.
592 2014-07-31  Andi Kleen  <ak@linux.intel.com>
594         * lto.c (hash_canonical_type): Use inchash::hash
595         and use inchash::add_expr.
596         (iterative_hash_canonical_type): Dito.
598 2014-07-30  Richard Biener  <rguenther@suse.de>
600         * lto-streamer.h (lto_write_data): New function.
601         * langhooks.c (lhd_append_data): Do not free block.
602         * lto-section-out.c (lto_write_data): New function writing
603         raw data to the current section.
604         (lto_write_stream): Adjust for langhook semantic change.
605         (lto_destroy_simple_output_block): Write header directly.
606         * lto-opts.c (lto_write_options): Write options directly.
607         * lto-streamer-out.c (produce_asm): Write heaeder directly.
608         (lto_output_toplevel_asms): Likewise.
609         (copy_function_or_variable): Copy data directly.
610         (write_global_references): Output index table directly.
611         (lto_output_decl_state_refs): Likewise.
612         (write_symbol): Write data directly.
613         (produce_symtab): Adjust.
614         (produce_asm_for_decls): Output header and refs directly.
616 2014-07-25  Andi Kleen  <ak@linux.intel.com>
618         * lto.c (hash_canonical_type): Call iterative_hstate_expr.
620 2014-07-25  Andi Kleen  <ak@linux.intel.com>
622         * lto.c (hash_canonical_type): Convert to inchash.
623         (iterative_hash_canonical_type): Dito.
625 2014-07-25  Andi Kleen  <ak@linux.intel.com>
627         * lto.c: Include inchash.h
629 2014-07-14  Jan Hubicka  <hubicka@ucw.cz>
631         * lto.c (mentions_vars_p_decl_non_common): Skip
632         DECL_ARGUMENT_FLD.
633         mentions_vars_p_function): Do DECL_ARGUMENTS.
634         (lto_fixup_prevailing_decls): Update.
636 2014-07-12  Jan Hubicka  <hubicka@ucw.cz>
638         * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
639         timevar
640         (materialize_cgraph): Do not push GIMPLE_IN timevar.
642 2014-07-11  Jan Hubicka  <hubicka@ucw.cz>
644         * lto-partition.c (add_references_to_partition): Use 
645         varpool_ctor_useable_for_folding_p.
646         * lto.c (lto_read_in_decl_state): Update sanity check.
648 2014-07-01  Martin Liska  <mliska@suse.cz>
650         IPA REF alias refactoring
651         * lto-partition.c (add_symbol_to_partition_1): Usage of
652         FOR_EACH_ALIAS added.
654 2014-06-28  Jan Hubicka  <hubicka@ucw.cz>
656         Revert:
657         * lto.c (lto_copy_fields_not_streamed): New function.
658         (compare_tree_sccs_1): Do not compare fields shared in between type
659         and variant.
660         (lto_read_decls): Fixup types first before inserting into hash.
662 2014-06-28  Andrew Pinski  <apinski@cavium.com>
664         * lto.c (lto_read_decls): Fix comment in comment.
666 2014-06-28  Jan Hubicka  <hubicka@ucw.cz>
668         * lto.c (lto_copy_fields_not_streamed): New function.
669         (compare_tree_sccs_1): Do not compare fields shared in between type
670         and variant.
671         (lto_read_decls): Fixup types first before inserting into hash.
673 2014-06-25  Martin Liska  <mliska@suse.cz>
675         * lto/lto-partition.c (add_references_to_partition): New IPA REF function
676         used.
677         (add_symbol_to_partition_1): Likewise.
678         (lto_balanced_map): Likewise.
679         * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
681 2014-06-24  Jan Hubicka  <hubicka@ucw.cz>
683         * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
684         (mentions_vars_p_function): ... here.
685         (compare_tree_sccs_1): Update VINDEX checks.
686         (lto_fixup_prevailing_decls): Likewise.
688 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
690         * lto.c (canonical_type_hash_cache): Use hash_map instead of
691         pointer_map.
693 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
695         * lto.c: Adjust.
697 2014-06-20  Jan Hubicka  <hubicka@ucw.cz>
699         * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
701 2014-06-20  Jan Hubicka  <hubicka@ucw.cz>
703         * lto.c (compare_tree_sccs_1): Do not compare priorities.
705 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
707         * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
709 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
711         * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
712         (do_whole_program_analysis): Use verify_symtab.
714 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
716         * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
717         lto_fixup_prevailing_decls): Skip section names.
719 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
721         * lto-symtab.c: Include builtins.h.
723 2014-05-26  Richard Biener  <rguenther@suse.de>
725         * lto.c (lto_parse_hex): Use int64_t.
726         (lto_resolution_read): Likewise.
728 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
730         * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
732 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
734         * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
735         symtab pointer.
736         * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
738 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
740         * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
741         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
742         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
744 2012-05-22  Bernd Schmidt  <bernds@codesourcery.com>
746         * lto-object.c: Include "lto-section-names.h".
747         (LTO_SEGMENT_NAME): Don't define.
748         * lto.c: Include "lto-section-names.h".
750 2014-05-17  Jan Hubicka  <hubicka@ucw.cz>
752         PR lto/61012
753         * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
754         mixed with variables.
756 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
758         * lto-tree.h: Don't use variable_size gty attribute.
759         * lto.c (lto_read_in_decl_state): Adjust.
760         (create_subid_section_table): Likewise.
761         (lto_flatten_files): Likewise.
762         (read_cgraph_and_symbols): Likewise.
764 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
765             Mike Stump  <mikestump@comcast.net>
766             Richard Sandiford  <rdsandiford@googlemail.com>
768         * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
769         * lto-lang.c (get_nonnull_operand): Likewise.
771 2014-04-28  Richard Biener  <rguenther@suse.de>
773         PR middle-end/60092
774         * lto-lang.c: Define flag_isoc11.
776 2014-04-23  David Malcolm  <dmalcolm@redhat.com>
778         * lto-partition.c (add_references_to_partition): Update for
779         removal of implicit pointer from the is-a.h API.
780         (add_symbol_to_partition_1): Likewise.
781         (contained_in_symbol): Likewise.
782         (undo_partition): Likewise.
783         (lto_balanced_map): Likewise.
784         (promote_symbol): Likewise.
785         * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
786         (lto_symtab_merge_symbols): Likewise.
787         * lto.c (lto_wpa_write_files): Likewise.
789 2014-04-15  Richard Biener  <rguenther@suse.de>
791         * lto.c: Include params.h.
792         (do_whole_program_analysis): Switch on flag_lto_partition value,
793         add support for LTO_PARTITION_ONE.
794         * lto-partition.h (lto_balanced_map): Adjust.
795         * lto-partition.c (lto_balanced_map): Get number of desired
796         partitions as argument to support -flto-partition=one.
798 2014-04-14  Jan Hubicka  <hubicka@ucw.cz>
800         * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
801         tp_first_run.
803 2014-03-19  Jan Hubicka  <hubicka@ucw.cz>
805         * lto.c: Include ipa-inline.h
806         (do_whole_program_analysis): Free inline summary after partitioning.
808 2014-03-19  Richard Biener  <rguenther@suse.de>
810         PR middle-end/60553
811         * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT 
812         instead of TREE_CHAIN as chain_next.
814 2014-03-19  Richard Biener  <rguenther@suse.de>
816         * lto.c (lto_wpa_write_files): Move call to
817         lto_promote_cross_file_statics ...
818         (do_whole_program_analysis): ... here, into the partitioning
819         block.  Do not ggc_collect after lto_wpa_write_files but
820         for a last time before it.
822 2014-03-19  Jakub Jelinek  <jakub@redhat.com>
824         PR lto/60571
825         * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
826         Fix formatting.
828 2014-03-18  Jakub Jelinek  <jakub@redhat.com>
830         PR sanitizer/60535
831         * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
832         and complex_{float,{,long_}double}_type_node.
834 2014-03-08  Paulo Matos  <paulo@matos-sorge.com>
836         * lto-lang.c (lto_init): Pass flag_short_double to
837         build_common_tree_nodes.
839 2014-02-14  Jan Hubicka  <hubicka@ucw.cz>
841         PR lto/60295
842         * lto.c (stream_out): Avoid parallel streaming with
843         -flto=jobserver until we are able to throttle it down
844         resonably.
846 2014-02-14  Jan Hubicka  <hubicka@ucw.cz>
848         * lto-partition.c (add_symbol_to_partition_1,
849         undo_partition, lto_balanced_map): Aliases have no
850         defined size.
851         (lto_balanced_map): Do not follow refering variables
852         if they can be optimized out.
854 2014-02-14  Richard Biener  <rguenther@suse.de>
856         PR lto/60179
857         * lto.c (compare_tree_sccs_1): Do not compare
858         DECL_FUNCTION_SPECIFIC_TARGET.
859         (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
861 2014-02-12  Richard Biener  <rguenther@suse.de>
863         PR lto/60060
864         * lto-lang.c (lto_write_globals): Do not call
865         wrapup_global_declarations or emit_debug_global_declarations
866         but emit debug info for non-function scope variables
867         directly.
869 2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
871         * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
873 2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
875         PR ipa/59469
876         * lto-partition.c (symbol_class): Move to cgraph.h
877         (get_symbol_class): Move to symtab.c
878         (add_references_to_partition, add_symbol_to_partition_1,
879         lto_max_map, lto_1_to_1_map, lto_balanced_map,
880         lto_promote_cross_file_statics): Update.
882 2014-02-05  Jan Hubicka  <hubicka@ucw.cz>
884         * lto.c (lto_parallelism): New static var.
885         (do_stream_out, wait_for_child, stream_out): New static functions.
886         (lto_wpa_write_files): Add support for parallel streaming.
887         (do_whole_program_analysis): Set parallelism.
888         * lang.opt (fwpa): Add parameter.
889         * lto-lang.c (lto_handle_option): Handle flag_wpa.
890         (lto_init): Update use of flag_wpa.
891         * lto-streamer.h (asm_nodes_output): Declare.
893 2014-02-05  Richard Biener  <rguenther@suse.de>
895         * lto.h (lto_global_var_decls): Remove.
896         * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
897         (lto_write_globals): Do nothing in WPA stage, gather globals from
898         the varpool here ...
899         * lto.c (lto_main): ... not here.
900         (materialize_cgraph): Do not call rest_of_decl_compilation
901         on the empty lto_global_var_decls vector.
902         (lto_global_var_decls): Remove.
904 2014-02-04  Jan Hubicka  <hubicka@ucw.cz>
906         * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY 
907         needs duplicating, not generic COMDAT.
909 2014-02-04  Richard Biener  <rguenther@suse.de>
911         PR lto/59723
912         * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
913         (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
915 2014-02-04  Jan Hubicka  <hubicka@ucw.cz>
916             Markus Trippelsdorf
918         PR ipa/59469
919         * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
920         merge force_output and forced_by_abi flags.
922 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
924         * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
925         flag_cilkplus.
927 2014-01-09  Richard Biener  <rguenther@suse.de>
929         * lto.c (gimple_canonical_types_compatible_p): Fix comment.
931 2014-01-09  Richard Biener  <rguenther@suse.de>
933         PR lto/45586
934         * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
935         TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
936         (gimple_canonical_types_compatible_p): Do not compare them either.
938 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
940         Update copyright years
942 2013-12-06  Oleg Endo  <olegendo@gcc.gnu.org>
944         * lto.c: Remove struct tags when referring to class varpool_node.
945         * lto-partition.c: Likewise.
946         * lto-symtab.c: Likewise.
948 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
949             Richard Biener  <rguenther@suse.de>
951         PR lto/59326
952         * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
954 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
956         PR lto/59326
957         * lto.c (mentions_vars_p_omp_clause): New function.
958         (mentions_vars_p): Call it for OMP_CLAUSE.  Remove break;
959         after return stmts.
961 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
963         * lto.c: Add required include files from gimple.h.
964         * lto-lang.c: Likewise
965         * lto-object.c: Likewise
966         * lto-partition.c: Likewise
967         * lto-symtab.c: Likewise
969 2013-11-18  Trevor Saunders  <tsaunders@mozilla.com>
971         * lto-partition.c lto-symtab.c lto.c Adjust.
973 2013-11-14  Diego Novillo  <dnovillo@google.com>
975         * lto-lang.c: Include stringpool.h.
976         Include stor-layout.h.
977         * lto-partition.c: Include gcc-symtab.h.
978         * lto.c: Include stor-layout.h.
980 2013-10-31  David Malcolm  <dmalcolm@redhat.com>
982         Automated part of renaming of symtab_node_base to symtab_node.
984         Patch autogenerated by rename_symtab.py from
985         https://github.com/davidmalcolm/gcc-refactoring-scripts
986         revision 58bb219cc090b2f4516a9297d868c245495ee622
988         * lto-partition.c (add_symbol_to_partition): Rename
989         symtab_node_base to symtab_node.
990         (get_symbol_class): Likewise.
991         (symbol_partitioned_p): Likewise.
992         (add_references_to_partition): Likewise.
993         (add_symbol_to_partition_1): Likewise.
994         (contained_in_symbol): Likewise.
995         (add_symbol_to_partition): Likewise.
996         (lto_1_to_1_map): Likewise.
997         (lto_max_map): Likewise.
998         (lto_balanced_map): Likewise.
999         (privatize_symbol_name): Likewise.
1000         (promote_symbol): Likewise.
1001         (may_need_named_section_p): Likewise.
1002         (rename_statics): Likewise.
1003         (lto_promote_statics_nonwpa): Likewise.
1004         * lto-symtab.c (lto_symtab_merge): Likewise.
1005         (lto_symtab_resolve_replaceable_p): Likewise.
1006         (lto_symtab_symbol_p): Likewise.
1007         (lto_symtab_resolve_can_prevail_p): Likewise.
1008         (lto_symtab_resolve_symbols): Likewise.
1009         (lto_symtab_merge_decls_2): Likewise.
1010         (lto_symtab_merge_decls_1): Likewise.
1011         (lto_symtab_merge_decls): Likewise.
1012         (lto_symtab_merge_symbols_1): Likewise.
1013         (lto_symtab_merge_symbols): Likewise.
1014         (lto_symtab_prevailing_decl): Likewise.
1015         * lto.c (lto_wpa_write_files): Likewise.
1016         (read_cgraph_and_symbols): Likewise.
1017         (do_whole_program_analysis): Likewise.
1019 2013-10-30  David Malcolm  <dmalcolm@redhat.com>
1021         * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1022         declarations onto multiple lines to make things easier for
1023         rename_symtab.py.
1024         (lto_symtab_merge_decls_1): Likewise.
1025         (lto_symtab_merge_symbols_1): Likewise.
1027 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1029         * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1030         * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1031         Plus is enabled.
1033 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
1035         Patch autogenerated by refactor_symtab.py from
1036         https://github.com/davidmalcolm/gcc-refactoring-scripts
1037         revision 58bb219cc090b2f4516a9297d868c245495ee622
1039         * lto-partition.c (lto_promote_cross_file_statics): Update for
1040         conversion of symtab types to a true class hierarchy.
1041         (rename_statics): Likewise.
1042         (promote_symbol): Likewise.
1043         (privatize_symbol_name): Likewise.
1044         (lto_balanced_map): Likewise.
1045         (varpool_node_cmp): Likewise.
1046         (node_cmp): Likewise.
1047         (lto_1_to_1_map): Likewise.
1048         (undo_partition): Likewise.
1049         (add_symbol_to_partition): Likewise.
1050         (contained_in_symbol): Likewise.
1051         (add_symbol_to_partition_1): Likewise.
1052         (add_references_to_partition): Likewise.
1053         (symbol_partitioned_p): Likewise.
1054         (get_symbol_class): Likewise.
1055         (lto_max_map): Likewise.
1056         * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1057         (lto_symtab_merge_symbols): Likewise.
1058         (lto_symtab_merge_symbols_1): Likewise.
1059         (lto_symtab_merge_decls): Likewise.
1060         (lto_symtab_merge_decls_1): Likewise.
1061         (lto_symtab_merge_decls_2): Likewise.
1062         (lto_symtab_resolve_symbols): Likewise.
1063         (lto_symtab_resolve_can_prevail_p): Likewise.
1064         (lto_symtab_symbol_p): Likewise.
1065         (lto_symtab_resolve_replaceable_p): Likewise.
1066         (lto_symtab_merge): Likewise.
1067         (lto_varpool_replace_node): Likewise.
1068         (lto_cgraph_replace_node): Likewise.
1069         * lto.c (lto_main): Likewise.
1070         (do_whole_program_analysis): Likewise.
1071         (materialize_cgraph): Likewise.
1072         (read_cgraph_and_symbols): Likewise.
1073         (cmp_partitions_order): Likewise.
1074         (lto_materialize_function): Likewise.
1075         (has_analyzed_clone_p): Likewise.
1077 2013-10-29  Andrew MacLeod  <amacleod@redhat.com>
1079         * lto/lto-object.c: Add gimple.h to include list.
1080         * lto/lto-partition.c: Likewise.
1082 2013-10-18  Andrew MacLeod  <amacleod@redhat.com>
1084         * lto.c: Remove tree-flow.h from include list.
1086 2013-10-15  Richard Biener  <rguenther@suse.de>
1088         * lto.c (hash_canonical_type): Split out from ...
1089         (iterative_hash_canonical_type): ... here.  Register types
1090         we recurse to.
1091         (gimple_canonical_type_hash): Adjust.
1092         (gimple_register_canonical_type_1): Split out from ...
1093         (gimple_register_canonical_type): ... here.  Cache computed
1094         hash value.
1095         (lto_register_canonical_types): Split into two modes,
1096         clearing and computing TYPE_CANONICAL.
1097         (lto_read_decls): Adjust.
1098         (read_cgraph_and_symbols): Do two passes over global trees,
1099         first clearing then computing TYPE_CANONICAL.
1101 2013-10-14  Richard Biener  <rguenther@suse.de>
1103         * lto.c (gimple_canonical_types): Move out-of GC space.
1104         (canonical_type_hash_cache): Make a pointer-map.
1105         (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1106         New counters.
1107         (iterative_hash_canonical_type): Adjust.
1108         (read_cgraph_and_symbols): Likewise.
1109         (print_lto_report_1): Likewise.
1111 2013-10-14  Richard Biener  <rguenther@suse.de>
1113         * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1114         type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1115         gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1116         gimple_types_compatible_p_1, gimple_types_compatible_p,
1117         visit, iterative_hash_name, struct type_hash_pair,
1118         type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1119         gimple_type_eq, gimple_register_type, num_not_merged_types,
1120         num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1121         num_not_merged_types_in_same_scc_trees): Remove old merging code
1122         and statistics.
1123         (lto_read_decls): Do not run old merging code in parallel.
1124         (read_cgraph_and_symbols): Do not init/free old merging
1125         data structures.
1126         (print_lto_report_1): Do not report differences of old vs. new
1127         merging code.
1129 2013-10-14  Richard Biener  <rguenther@suse.de>
1131         * lto-lang.c (lto_init): Do not re-init canonical types here.
1132         (lto_register_canonical_types): Move to ...
1133         * lto.c (lto_register_canonical_types): ... here.
1134         (gimple_canonical_types, canonical_type_hash_cache,
1135         iterative_hash_canonical_type, gimple_canonical_type_hash,
1136         gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1137         gimple_register_canonical_type): Add canonical type merging machinery
1138         moved from gimple.c.
1139         (read_cgraph_and_symbols): Init and free canonical type tables
1140         here.
1141         (print_lto_report_1): Report canonical type table stats here.
1143 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
1145         * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1147 2013-09-25  Tom Tromey  <tromey@redhat.com>
1149         * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1150         (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1151         (lto/lto-object.o): Remove.
1153 2013-09-06  Richard Biener  <rguenther@suse.de>
1155         * lto-symtab.c: Move from gcc/
1156         * lto.h: Include vec.h.
1157         (lto_global_var_decls): Declare.
1158         * lto.c (lto_global_var_decls): Move definition here.
1159         * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1160         (lto-symtab.o): Add.
1161         * config-lang.in (gtfiles): Add lto.h.
1163 2013-08-31  Jan Hubicka  <jh@suse.cz>
1165         * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls): 
1166         DECL_FIELD_OFFSET can contain an reference to variable.
1168 2013-08-31  Jan Hubicka  <jh@suse.cz>
1170         * lto.c (tree_with_vars): Turn into vector.
1171         (MAYBE_REMEMBER_WITH_VARS): Change to...
1172         (CHECK_VAR): ... this one.
1173         (CHECK_NO_VAR): New macro.
1174         (maybe_remember_with_vars_typed): Turn to ...
1175         (mentions_vars_p_typed): ... this one.
1176         (maybe_remember_with_vars_common): Turn to ...
1177         (mentions_vars_p_comon): ... this one.
1178         (maybe_remember_with_vars_decl_minimal): Turn to ...
1179         (mentions_vars_p_decl_minmal): ... this one.
1180         (maybe_remember_with_vars_decl_common): Turn to ...
1181         (mentions_vars_p_decl_common): ... this one.
1182         (maybe_remember_with_vars_decl_with_vis): Turn to ...
1183         (mentions_vars_p_decl_with_vis): ... this one.
1184         (maybe_remember_with_vars_decl_non_common): Turn to ...
1185         (mentions_vars_p_decl_non_common): ... this one.
1186         (maybe_remember_with_vars_function): Turn to ...
1187         (mentions_vars_p_function): ... this one.
1188         (maybe_remember_with_vars_field_decl): Turn to ...
1189         (mentions_vars_p_field_decl): ... this one.
1190         (maybe_remember_with_vars_type): Turn to ...
1191         (mentions_vars_p_type): ... this one.
1192         (maybe_remember_with_vars_binfo): Turn to ...
1193         (mentions_vars_p_binfo): ... this one.
1194         (maybe_remember_with_vars_constructor): Turn to ...
1195         (mentions_vars_p_constructor): ... this one.
1196         (maybe_remember_with_vars_expr): Turn to ...
1197         (mentions_vars_p_expr): ... this one.
1198         (maybe_remember_with_vars): Turn to ...
1199         (mentions_vars_p): ... this one.
1200         (lto_read_decls): Update.
1201         (LTO_SET_PREVAIL): Do not call function for internal decls.
1202         (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1203         check that something was updated.
1204         (lto_fixup_state): Do not care about internal decls.
1205         (lto_fixup_decls): Update.
1206         (read_cgraph_and_symbols): Update.
1208 2013-08-29  Jan Hubicka  <jh@suse.cz>
1210         * lto.c (read_cgraph_and_symbols): Free decl states.
1212 2013-08-29  Jan Hubicka  <jh@suse.cz>
1214         * lto.c (compare_tree_sccs_1): Compare  DECL_FINAL_P,
1215         DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1216         TYPE_FINAL_P.
1218 2013-08-28  Jan Hubicka  <jh@suse.cz>
1220         * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1221         DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1222         (unify_scc): Do checking assert.
1224 2013-08-06  Jan Hubicka  <jh@suse.cz>
1225             Martin Liska  <marxin.liska@gmail.com>
1227         * lto-partition.c (lto_balanced_map): Always base order on 
1228         source file order.
1230 2013-08-06  Jan Hubicka  <jh@suse.cz>
1232         * lto.c (lto_materialize_function): Do not read body anymore.
1234 2013-08-02  Jan Hubicka  <jh@suse.cz>
1236         * lto.c (lto_materialize_function): Do not push struct function.
1237         * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1238         (may_need_named_section_p): Even abstract origins may need
1239         named section.
1241 2013-07-30  David Malcolm  <dmalcolm@redhat.com>
1243         * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1244         PASS_MANAGER_H.
1246         * lto.c (do_whole_program_analysis): Update for move of
1247         all_regular_ipa_passes from a global to a field of class
1248         pass_manager.
1250 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
1252         * lto-partition.c: Fix typos.
1254 2013-06-20  Jan Hubicka  <jh@suse.cz>
1256         * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1257         partitioning of variables.
1259 2013-06-20  Jan Hubicka  <jh@suse.cz>
1261         * lto.c (read_cgraph_and_symbols): Set cgraph state.
1263 2013-06-19  Jan Hubicka  <jh@suse.cz>
1265         * lto-partition.c (add_references_to_partition): Use
1266         ctor_for_folding.
1268 2013-06-18  Richard Biener  <rguenther@suse.de>
1270         * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1271         and use it.
1272         (lto_register_function_decl_in_symtab): Likewise.
1273         (cmp_tree): New function.
1274         (unify_scc): Instead of using the streamer cache map from entry
1275         to cache index match up the two maps we have by sorting them.
1276         Adjust calls to lto_register_var_decl_in_symtab and
1277         lto_register_function_decl_in_symtab.
1279 2013-06-17  Richard Biener  <rguenther@suse.de>
1281         * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1282         * lto.c: Include data-streamer.h.
1283         (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1284         (gimple_type_leader_entry_s, gimple_type_leader,
1285         gimple_lookup_type_leader): Remove.
1286         (gtc_visit): Simplify.
1287         (gimple_types_compatible_p): Likewise.
1288         (gimple_register_type_1): Likewise.  Merge into ...
1289         (gimple_register_type): ... this.  Keep it as legacy for
1290         statistics purposes for now.
1291         (fixup_integer_cst): Remove.
1292         (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1293         rename to ...
1294         (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1295         maybe_remember_with_vars_*): ... these.
1296         (uniquify_nodes): Remove.
1297         (lto_fixup_prevailing_type): New function.
1298         (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1299         (tree_scc_hash, tree_scc_hash_obstack): New globals.
1300         (num_merged_types, num_prevailing_types, num_not_merged_types,
1301         num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1302         total_scc_size_merged, num_sccs_merged, num_scc_compares,
1303         num_scc_compare_collisions): New global counters.
1304         (compare_tree_sccs_1): New function.
1305         (compare_tree_sccs): Likewise.
1306         (unify_scc): Likewise.
1307         (lto_read_decls): Stream in tree SCCs and unify them on the
1308         way in.  Finalize prevailing SCC tree members.
1309         (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1310         Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1311         to ggc-collect during merging.
1312         (print_lto_report_1): Adjust for new merging code.
1314 2013-06-12  Jan Hubicka  <jh@suse.cz>
1316         * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1318 2013-06-12  Jan Hubicka  <jh@suse.cz>
1320         * lto.c (register_resolution): Take lto_file_data argument.
1321         (lto_register_var_decl_in_symtab,
1322         lto_register_function_decl_in_symtab): Update.
1323         (read_cgraph_and_symbols): Update resolution_map handling.
1325 2013-06-11  Jan Hubicka  <jh@suse.cz>
1327         * lto-partition.c (get_symbol_class): Simplify weakref handling.
1328         (add_symbol_to_partition_1): Likewise.
1329         (contained_in_symbol): Likewise.
1330         (lto_balanced_map): Likewise.
1331         (rename_statics): Drop weakref.
1333 2013-06-05  Richard Biener  <rguenther@suse.de>
1335         * lto.c (num_merged_types): New global variable.
1336         (uniquify_nodes): Increase num_merged_types when merging a type.
1337         (print_lto_report_1): Output the number of merged types.
1339 2013-06-01  Jan Hubicka  <jh@suse.cz>
1341         * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1342         lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1343         (do_whole_program_analysis): Update dumping.
1345 2013-05-29  Jan Hubicka  <jh@suse.cz>
1347         * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1348         flags.
1349         * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1351 2013-05-15  Jan Hubicka  <jh@suse.cz>
1353         * lto-partition.c (privatize_symbol_name): Return true when
1354         privatizing happened.
1355         (rename_statics): Do not go into infinite loop when privatizing
1356         is not needed.
1358 2013-05-16  Jason Merrill  <jason@redhat.com>
1360         * Make-lang.in ($(LTO_EXE)): Use link mutex.
1362 2013-05-15  Martin Jambor  <mjambor@suse.cz>
1364         * lto-partition.c (lto_balanced_map): Print symbol order instead
1365         of node uids.
1367 2013-05-15  Jan Hubicka  <jh@suse.cz>
1369         PR lto/57038
1370         PR lto/47375
1371         * lto-partition.c (get_symbol_class): Fix weakrefs.
1372         (lto_balanced_map): Fix weakrefs.
1373         (privatize_symbol_name): Remove unnecesary label.
1374         (rename_statics): Handle weakrefs as statics.
1376 2013-05-09  Jan Hubicka  <jh@suse.cz>
1377             Richard Biener  <rguenther@suse.de>
1379         * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1380         (lto_register_var_decl_in_symtab): Likewise.
1381         (lto_main): Promote statics.
1382         * lto-partition.c (privatize_symbol_name): New function.
1383         (promote_symbol): Use it.
1384         (may_need_named_section_p): New predicate.
1385         (rename_statics): New functions.
1386         (lto_promote_cross_file_statics): Simplify; do renaming.
1387         (lto_promote_statics_nonwpa): New function.
1388         * lto-partition.h (lto_promote_statics_nonwpa): New function.
1390 2013-02-08  Richard Biener  <rguenther@suse.de>
1392         PR lto/56231
1393         * lto-lang.c (lto_init): Do not enter a dummy file.
1395 2013-02-07  Uros Bizjak  <ubizjak@gmail.com>
1397         PR bootstrap/56227
1398         * lto.c (lto_resolution_ready): Use %wx instead of
1399         HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1401 2013-02-04  Richard Guenther  <rguenther@suse.de>
1403         PR lto/56168
1404         * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1405         or lto_fixup_decls at LTRANS time.
1407 2013-01-09  Jan Hubicka  <jh@suse.cz>
1409         PR lto/45375
1410         * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1412 2012-12-10  H.J. Lu  <hongjiu.lu@intel.com>
1414         PR lto/55466
1415         * lto.c (lto_register_var_decl_in_symtab): Don't record static
1416         variables.
1417         (lto_main): Record the global variables if WPA isn't enabled.
1419 2012-11-20  Diego Novillo  <dnovillo@google.com>
1420             Jakub Jelinek  <jakub@redhat.com>
1422         * lto.c: Replace all vec<T, A>() initializers with vNULL.
1424 2012-11-16  Diego Novillo  <dnovillo@google.com>
1426         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1428         * lto-lang.c: Use new vec API in vec.h.
1429         * lto-partition.c: Likewise.
1430         * lto-partition.h: Likewise.
1431         * lto.c: Likewise.
1433 2012-10-31  Lawrence Crowl  <crowl@google.com>
1435         * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1436         down-cast via dyn_cast.
1437         * lto-partition.c (add_symbol_to_partition_1): Likewise.
1438         (undo_partition): Likewise.
1439         (lto_balanced_map): Likewise.
1440         (get_symbol_class): Likewise and via is_a.
1441         (lto_balanced_map): Change symtab checking to is_a.
1443 2012-10-12  Richard Biener  <rguenther@suse.de>
1445         PR lto/54898
1446         * lto.c (gimple_types_compatible_p_1): Also compare
1447         TYPE_MAIN_VARIANT.
1448         (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1450 2012-10-09  Tobias Burnus  <burnus@net-b.de>
1452         * lto-lang.c (lto_register_builtin_type): Avoid useless
1453         decl creation.
1454         * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1456 2012-10-08  Tobias Burnus  <burnus@net-b.de>
1458         * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1459         Free lto_file struct after closing the file.
1461 2012-10-08  Jan Hubicka  <jh@suse.cz>
1463         * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1464         (fixup_integer_cst): New functoin.
1465         (lto_ft_type): Fixup BASETYPE of methods and offsets.
1467 2012-10-07  Jan Hubicka  <jh@suse.cz>
1469         * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1470         release input encoders.
1471         * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1473 2012-10-06  Jan Hubicka  <jh@suse.cz>
1475         PR lto/54790 
1476         * lto.c (resolution_map): New static var.
1477         (register_resolution): New function.
1478         (lto_register_var_decl_in_symtab): Use it.
1479         (read_cgraph_and_symbols): Copy resolutions into the symtab.
1481 2012-09-20  Martin Jambor  <mjambor@suse.cz>
1483         * lto.c (lto_materialize_function): Call push_struct_function and
1484         pop_cfun.
1486 2012-09-19  Dehao Chen  <dehao@google.com>
1488         * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1490 2012-09-19  Jan Hubicka  <jh@suse.cz>
1492         * lto.c (lto_materialize_function): Update confused comment.
1493         (read_cgraph_and_symbols): Do not free symtab.
1495 2012-09-12  Jan Hubicka  <jh@suse.cz>
1497         * lto.c (do_whole_program_analysis): Care timevars, statistics and
1498         AUX pointer cleaning. Add max partitioning.
1499         * lto-partition.c (enum symbol_class): New.
1500         (get_symbol_class): New function.
1501         (symbol_partitioned_p): New function.
1502         (add_references_to_partition): Remove.
1503         (add_aliases_to_partition): Remove.
1504         (add_cgraph_node_to_partition_1): Remove.
1505         (add_cgraph_node_to_partition): Remove.
1506         (add_symbol_to_partition): New function.
1507         (add_symbol_to_partition_1): New function.
1508         (contained_in_symbol): New function.
1509         (partition_cgraph_node_p): Remove.
1510         (partition_varpool_node_p): Remove.
1511         (partition_symbol_p): Remove.
1512         (lto_1_to_1_map): Cleanup.
1513         (lto_max_map): New.
1514         (lto_balanced_map): Update.
1515         (lto_promote_cross_file_statics): Update.
1516         * lto-partition.h (lto_max_map): Declare.
1517         * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1519 2012-09-11  Jan Hubicka  <jh@suse.cz>
1521         PR lto/54312
1522         * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1523         type is variant leader.
1525 2012-09-11  Richard Guenther  <rguenther@suse.de>
1527         * lto.c (enum gtc_mode): Remove.
1528         (struct type_pair_d): Adjust.
1529         (lookup_type_pair): Likewise.
1530         (gimple_type_leader): Do not mark as deletable.
1531         (gimple_lookup_type_leader): Adjust.
1532         (gtc_visit): Likewise.
1533         (gimple_types_compatible_p_1): Likewise.
1534         (gimple_types_compatible_p): Likewise.
1535         (gimple_type_hash): Likewise.
1536         (gimple_register_type): Likewise.
1537         (read_cgraph_and_symbols): Manage lifetime of tables
1538         here.
1540 2012-09-11  Richard Guenther  <rguenther@suse.de>
1542         * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1543         struct type_pair_d, lookup_type_pair, struct sccs,
1544         next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1545         gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1546         gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1547         visit, iterative_hash_name, struct type_hash_pair,
1548         type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1549         gimple_type_eq, gimple_register_type_1, gimple_register_type):
1550         Move here from gimple.c
1551         (read_cgraph_and_symbols): Free hash tables here.
1552         (print_lto_report_1): New function wrapping print_lto_report.
1553         (do_whole_program_analysis): Call it.
1554         (lto_main): Likewise.
1556 2012-09-10  Jan Hubicka  <jh@suse.cz>
1558         * lto-partition.c (partition_symbol_p): Forward declare.
1559         (add_references_to_partition): Reimplement using partition_symbol_p.
1560         (add_aliases_to_partition): Break out from add_references_to_partition;
1561         reimplement using partition_symbol_p.
1562         (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1563         add sanity checks.
1564         (add_varpool_node_to_partition): Use add_aliases_to_partition.
1565         (partition_varpool_node_p): Do not special case aliases.
1567 2012-08-12  Jan Hubicka  <jh@suse.cz>
1569         * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1570         it is deleted after streaming.
1571         * lto-partition.c (partition_symbol_p): New function.
1572         (promote_var, promote_fn): Remove.
1573         (promote_symbol): New function.
1574         (lto_promote_cross_file_statics): First compute boundaries; rewrite
1575         to lookup the actual boundaries instead of computing them ad-hoc.
1577 2012-08-12  Jan Hubicka  <jh@suse.cz>
1579         Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1580         in partitioning.
1581         * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1582         by encoder.
1583         * lto-partition.c (new_partition): Update.
1584         * lto.c (cmp_partitions_order): Update.
1585         (lto_wpa_write_files): Update.
1586         (free_ltrans_partitions): Update.
1587         (add_references_to_partition): Update.
1588         (add_cgraph_node_to_partition_1): Update.
1589         (add_cgraph_node_to_partition): Update.
1590         (add_varpool_node_to_partition): Update.
1591         (undo_partition): Update.
1592         (lto_balanced_map): Update.
1593         (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1594         set_referenced_from_this_partition_p): Update.
1595         (lto_promote_cross_file_statics): Update.
1597 2012-08-12  Jan Hubicka  <jh@suse.cz>
1599         * lto-partition.c (set_referenced_from_other_partition_p,
1600         set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1601         New functions.
1602         (lto_promote_cross_file_statics): Use them.
1604 2012-07-24  Jan Hubicka  <jh@suse.cz>
1606         * lto.c (read_cgraph_and_symbols): Use input_symtab.
1608 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
1610         * lto-tree.h (lang_decl): Add variable_size GTY option.
1612 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
1614         * lto.c: Do not include timevar.h.
1615         * Make-lang.in: Fix dependencies.
1617 2012-06-18  Lawrence Crowl  <crowl@google.com>
1619         * lto.c (do_whole_program_analysis):  Rename use of TV_PHASE_CGRAPH to
1620         TV_PHASE_OPT_GEN.  Use new timevar TV_PHASE_STREAM_OUT around the call
1621         to lto_wpa_write_files.
1622         (lto_main):  Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN.  Move
1623         start of TV_PHASE_OPT_GEN to include call to materialize_cgraph.  Use
1624         TV_PHASE_SETUP for the call to lto_init.  Use new timevar
1625         TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1626         Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1627         to be a front end, but is not one.
1629 2012-05-18  Jan Hubicka  <jh@suse.cz>
1631         * lto.c (lto_materialize_constructors_and_inits): Remove.
1632         (read_cgraph_and_symbols): Remove handling of alias pairs.
1634 2012-05-17  Jan Hubicka  <jh@suse.cz>
1636         * lto-partition.c (add_references_to_partition): Handle external vars.
1637         (partition_varpool_node_p): Likewise.
1638         (lto_promote_cross_file_statics): Do not promote externals.
1640 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
1642         * lto-lang.c (handle_fnspec_attribute): New static function.
1643         (lto_attribute_table): Add "fn spec".
1644         (DEF_ATTR_STRING): Define and undefine along with the other macros.
1646 2012-05-04  Jan Hubicka  <jh@suse.cz>
1648         * lto.c (do_whole_program_analysis): Set timevars correctly.
1649         (lto_main): Likewise.
1651 2012-05-04  Richard Guenther  <rguenther@suse.de>
1653         * lang.opt (fwpa): Do not mark as Optimization.
1654         (fltrans): Likewise.
1656 2012-04-30  Jan Hubicka  <jh@suse.cz>
1658         * lto.c (lto_main): Use compile ().
1659         * lto-partition.c (partition_cgraph_node_p): Use
1660         symtab_used_from_object_file_p.
1661         (partition_varpool_node_p): Likewise.
1663 2012-04-20  Jan Hubicka  <jh@suse.cz>
1665         * lto-partition.c (partition_cgraph_node_p): Use force_output.
1667 2012-04-18  Jan Hubicka  <jh@suse.cz>
1669         * lto-partition.c (add_references_to_partition, lto_balanced_map):
1670         Update for new ipa-ref API.
1672 2012-04-16  Jan Hubicka  <jh@suse.cz>
1674         * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1675         walkers to walk cgraph and varpool.
1676         (materialize_cgraph): Likewise.
1677         * lto-partition.c (lto_1_to_1_map): Likewise.
1678         (lto_balanced_map): Likewise.
1679         (lto_promote_cross_file_statics): Likewise.
1681 2012-04-14  Jan Hubicka  <jh@suse.cz>
1683         * lto.c: Update field referenced for new cgraph/varpool layout.
1684         * lto-partition.c: Likewise.
1686 2012-04-11  Jan Hubicka  <jh@suse.cz>
1688         * lto.c: Update copyright; remove params.h, ipa-inline.h
1689         and ipa-utils.h inlines; inline lto-partition.h
1690         (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1691         add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1692         add_references_to_partition, add_cgraph_node_to_partition_1,
1693         add_cgraph_node_to_partition, add_varpool_node_to_partition,
1694         undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1695         lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1696         promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1697         * lto-partition.c: ... here; new file.
1698         * lto-partition.h: New file.
1699         * Make-lang.in (lto.o): Update dependencies.
1700         (lto-partition.o): New.
1702 2012-04-05  Richard Guenther  <rguenther@suse.de>
1704         * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1705         definition.
1707 2012-03-12  Richard Guenther  <rguenther@suse.de>
1709         * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1711 2012-03-06  Richard Guenther  <rguenther@suse.de>
1713         PR lto/52097
1714         * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1716 2012-02-28  Richard Guenther  <rguenther@suse.de>
1718         PR lto/52400
1719         * lto.c (lto_register_function_decl_in_symtab): Do not register
1720         a reverse renamed decl mapping.
1722 2012-01-06  Jakub Jelinek  <jakub@redhat.com>
1724         PR lto/51774
1725         * lto-lang.c (handle_returns_twice_attribute): New function.
1726         (lto_attribute_table): Add returns_twice attribute.
1728 2011-12-21  Richard Guenther  <rguenther@suse.de>
1730         * lto.c (GIMPLE_REGISTER_TYPE): New define.
1731         (LTO_FIXUP_TREE): Use it.
1732         (uniquify_nodes): Mark new non-prevailing types and avoid
1733         calling gimple_register_type on others.
1734         (lto_read_decls): Add comment.
1736 2011-12-13  Eric Botcazou  <ebotcazou@adacore.com>
1738         * lto.h (lto_parse_hex): Delete.
1739         * lto.c (lto_read_decls): Use 'int' for offsets.
1740         (lto_parse_hex): Make static and return proper 64-bit host type.
1741         (lto_resolution_read): Use proper 64-bit host type.
1743 2011-12-13  Richard Guenther  <rguenther@suse.de>
1745         PR lto/48354
1746         * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1747         with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1749 2011-12-01  Uros Bizjak  <ubizjak@gmail.com>
1751         * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1752         (ignore_attribute): New.
1754 2011-11-21  Aldy Hernandez  <aldyh@redhat.com>
1756         * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1757         (handle_transaction_pure_attribute): New.
1759 2011-11-03  Richard Guenther  <rguenther@suse.de>
1761         PR lto/44965
1762         * lto-lang.c (lto_post_options): Do not read file options.
1763         * lto.c (lto_read_all_file_options): Remove.
1764         (lto_init): Call lto_set_in_hooks here.
1766 2011-10-09  Jan Hubicka  <jh@suse.cz>
1768         * lto.c (node_cmp, varpool_node_cmp): New functions.
1769         (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1770         (cmp_partitions): Rename to ...
1771         (cmp_partitions_size): ... this one.
1772         (cmp_partitions_order): New function.
1773         (lto_wpa_write_files): Sort partitions by order when
1774         -fno-toplevel-reorder is used.
1776 2011-10-09  Andi Kleen  <ak@linux.intel.com>
1778         * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1780 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
1782         * lto-lang.c (def_builtin_1): Delete old interface with two
1783         parallel arrays to hold standard builtin declarations, and replace
1784         it with a function based interface that can support creating
1785         builtins on the fly in the future.  Change all uses, and poison
1786         the old names.  Make sure 0 is not a legitimate builtin index.
1788 2011-10-02   Andi Kleen  <ak@linux.intel.com>
1790         * lto-object.c (lto_obj_add_section_data): Add list.
1791         (lto_obj_add_section): Fill in list.
1792         (ltoobj_build_section_table): Pass through list.
1793         * lto.c (file_data_list): Declare.
1794         (create_subid_section_table): Pass arguments directly.
1795         Fill in list of file_datas.
1796         (lwstate): Delete.
1797         (lto_create_files_from_ids): Pass in direct arguments.
1798         Don't maintain list.
1799         (lto_file_read): Use explicit section and file data lists.
1800         (lto_read_all_file_options): Pass in section_list.
1801         * lto.h (lto_obj_build_section_table): Add list.
1802         (lto_section_slot): Add next.
1803         (lto_section_list): Declare.
1805 2011-10-02  Jan Hubicka  <jh@suse.cz>
1807         PR lto/47247
1808         * common.c (lto_resolution_str): Add new resolution.
1809         * common.h (lto_resolution_str): Likewise.
1811 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
1812             Andi Kleen  <ak@linux.intel.com>
1814         PR lto/50568
1815         * lto.c (lto_splay_tree_delete_id): New.
1816         (lto_splay_tree_compare_ids): Likewise.
1817         (lto_splay_tree_lookup): Likewise.
1818         (lto_splay_tree_id_equal_p): Likewise.
1819         (lto_splay_tree_insert): Likewise.
1820         (lto_splay_tree_new): Likewise.
1821         (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1822         Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1823         (create_subid_section_table): Use lto_splay_tree_lookup and
1824         lto_splay_tree_insert.
1825         (lto_file_read): Use lto_splay_tree_new.
1827 2011-09-26   Andi Kleen  <ak@linux.intel.com>
1829         * lto.c (lto_resolution_read): Remove id dumping.
1830         (lto_section_with_id): Turn id HOST_WIDE_ID.
1831         (create_subid_section_table): Dito.
1833 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
1835         * lto-lang.c (lto_init): Likewise.  Also, avoid calling
1836         linemap_add twice.
1838 2011-08-11  Martin Jambor  <mjambor@suse.cz>
1840         * lto.c (uniquify_nodes): Use main variant's BINFO too.
1842 2011-08-08   Diego Novillo  <dnovillo@google.com>
1844         * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1845         * lto.c: Include tree-streamer.h.
1847 2011-07-06  Richard Guenther  <rguenther@suse.de>
1849         * lto-lang.c (lto_init):
1850         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1852 2011-06-11  Jan Hubicka  <jh@suse.cz>
1854         PR lto/48246
1855         * lto.c (lto_1_to_1_map): Don't create empty partitions.
1856         (lto_balanced_map): Likewise.
1858 2011-06-11  Jan Hubicka  <jh@suse.cz>
1860         * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1861         (add_cgraph_node_to_partition) ... here; walk aliases.
1862         (lto_1_to_1_map): Remove same body alias code.
1863         (promote_fn): Likewise.
1864         (lto_promote_cross_file_statics): Update comment.
1867 2011-06-07  Diego Novillo  <dnovillo@google.com>
1869         * lto.c (uniquify_nodes): Move code to register decls to
1870         the loop that computes canonical types.
1872 2011-06-07  Richard Guenther  <rguenther@suse.de>
1874         * lto-lang.c (lto_init): Do not set
1875         size_type_node or call set_sizetype.
1877 2011-06-04  Diego Novillo  <dnovillo@google.com>
1879         * lto.c (lto_init): New.
1880         (lto_main): Call it.
1882 2011-06-03  Diego Novillo  <dnovillo@google.com>
1884         * lto.c (get_resolution): Move from lto-streamer-in.c.
1885         (lto_register_var_decl_in_symtab): Likewise.
1886         (lto_register_function_decl_in_symtab): Likewise.
1887         (uniquify_nodes): Call lto_register_var_decl and
1888         lto_register_function_decl_in_symtab after reading a new
1889         VAR_DECL or FUNCTION_DECL.
1891 2011-06-01  Richard Guenther  <rguenther@suse.de>
1893         * lto-lang.c (lto_register_canonical_types): New function.
1894         (lto_init): Register common nodes with the canonical type machinery.
1895         Do not play tricks with char_type_node.
1897 2011-05-26  Richard Guenther  <rguenther@suse.de>
1899         * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1901 2011-05-25  Nathan Froyd  <froydnj@codesourcery.com>
1903         * lto.c (lto_ft_typed): New function.
1904         (lto_ft_common): Call it.
1905         (lto_ft_constructor): Likewise.
1906         (lto_ft_expr): Likewise.
1907         (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1908         TREE_CHAIN.
1910 2011-05-20  Richard Guenther  <rguenther@suse.de>
1912         * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1913         (lto_ft_type): Move main-variant and pointer-to chain building ...
1914         (uniquify_nodes): ... here.  Compute TYPE_CANONICAL also here,
1915         in a separate final loop.
1917 2011-05-19  Richard Guenther  <rguenther@suse.de>
1919         * lto.c (uniquify_nodes): First register all types before
1920         fixing up the tree SCC.
1922 2011-05-11  Jan Hubicka  <jh@suse.cz>
1924         PR lto/48952
1925         * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1927 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
1929         * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL.  Adjust
1930         location of binfo field.
1931         (lto_fixup_prevailing_decls): Likewise.
1933 2011-05-10  Nathan Froyd  <froydnj@codesourcery.com>
1935         * lto-lang.c (def_fn_type): Don't call build_function_type, call
1936         build_function_type_array or build_varargs_function_type_array
1937         instead.
1939 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
1941         * lto-lang.c (global_bindings_p): Return bool.
1943 2011-05-07  Jan Hubicka  <jh@suse.cz>
1945         * lto.c (lto_materialize_function): Use
1946         cgraph_function_with_gimple_body_p.
1947         (add_cgraph_node_to_partition): Do not re-add items to partition;
1948         handle thunks.
1949         (add_varpool_node_to_partition): Do not re-add items to partition.
1951 2011-05-03  Jan Hubicka  <jh@suse.cz>
1953         * lto.c (free_ltrans_partitions): Fix accidental commit.
1955 2011-05-03  Jan Hubicka  <jh@suse.cz>
1957         * lto.c (ltrans_partition_def): Remove GTY annotations.
1958         (ltrans_partitions): Move to heap.
1959         (new_partition): Update.
1960         (free_ltrans_partitions): New function.
1961         (lto_wpa_write_files): Use it.
1963 2011-04-29  Martin Jambor  <mjambor@suse.cz>
1965         * lto.c: Include ipa-utils.h.
1966         (lto_balanced_map): Update call to ipa_reverse_postorder.
1967         * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1969 2011-04-29  Michael Matz  <matz@suse.de>
1971         * lto.c (toplevel): Include tree-flow.h.
1972         (lto_read_in_decl_state): Don't merge types here.
1973         (tree_with_vars): New static hash table.
1974         (remember_with_vars): New static functions.
1975         (LTO_FIXUP_TYPE): New macro.
1976         (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1977         lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1978         lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1979         lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1980         (lto_read_decls): Uniquify while reading in trees.
1981         (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1982         LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1983         lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1984         lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1985         lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1986         lto_fixup_tree): Remove.
1987         (lto_fixup_state): Remove data argument.  Use
1988         lto_symtab_prevailing_decl.
1989         (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1990         (lto_fixup_prevailing_decls): New function.
1991         (lto_fixup_state_aux): Argument aux is unused.
1992         (lto_fixup_decls): Don't allocate pointer sets, don't use
1993         lto_fixup_tree, use lto_fixup_prevailing_decls.
1994         (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1995         * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1997 2011-04-16  Eric Botcazou  <ebotcazou@adacore.com>
1999         * lto.c (lto_balanced_map): Fix typos in head comment.
2000         (lto_promote_cross_file_statics): Fix long lines and remove redundant
2001         test.
2003 2011-04-16  Jan Hubicka  <jh@suse.cz>
2005         * lto.c (lto_balanced_map): Update.
2007 2011-04-14  Jan Hubicka  <jh@suse.cz>
2009         * lto.c: Include ipa-inline.h
2010         (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2011         accessor.
2012         (ipa_node_duplication_hook): Fix declaration.
2013         * Make-lang.in (lto.o): Update dependencies.
2015 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
2017         * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2018         calling TREE_CHAIN.
2019         * lto.c (lto_fixup_common): Likewise.
2021 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
2023         * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2024         (handle_type_generic_attribute): Likewise.
2026 2011-04-03  Michael Matz  <matz@suse.de>
2028         * lto.c (lto_materialize_function): Don't read and then discard
2029         sections in WPA mode.
2030         (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2032         * lto-lang.c (registered_builtin_fndecls): Remove.
2033         (lto_getdecls): Return NULL_TREE.
2034         (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2036 2011-03-31  Richard Guenther  <rguenther@suse.de>
2038         PR lto/48246
2039         * lto.c (lto_wpa_write_files): Disable assert for non-empty
2040         partitions when checking is not enabled.
2042 2011-03-25  Kai Tietz  <ktietz@redhat.com>
2044         * lto.c (lto_resolution_read): Use filename_cmp instead
2045         of strcmp.
2046         (lto_read_section_data): Likewise.
2048 2011-03-25  Jeff Law  <law@redhat.com>
2050         * lto/lto-lang.c (def_fn_type): Add missing va_end.
2052 2011-03-21  Kai Tietz  <ktietz@redhat.com>
2054         PR target/12171
2055         * lto-lang.c (lto_attribute_table): Adjust table.
2057 2011-02-18  Jakub Jelinek  <jakub@redhat.com>
2059         PR bootstrap/47807
2060         * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2061         of lto-streamer.h.
2063 2011-02-18  Richard Guenther  <rguenther@suse.de>
2065         PR lto/47798
2066         * lto-tree.h (lto_global_var_decls): Do not declare here.
2067         * lto-lang.c: Include lto-streamer.h.
2068         * Make-lang.in (lto-lang.o): Adjust dependencies.
2070 2011-02-10  Kai Tietz  <kai.tietz@onevision.com>
2072         PR lto/47241
2073         * lto.c (lto_read_section_data): Free
2074         fd_name in failure case.
2075         For mingw targets don't hash file-descriptor.
2076         (read_cgraph_and_symbols): Close current_lto_file
2077         in failure case.
2079 2011-01-11  Jan Hubicka  <jh@suse.cz>
2081         PR lto/45721
2082         PR lto/45375
2083         * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2084         are not partitioned.
2086 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
2088         * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2089         Use prototype_p.
2091 2010-12-06  Richard Guenther  <rguenther@suse.de>
2093         PR lto/46796
2094         * lto-lang.c (lto_init): Give names to basic types.
2096 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
2098         * lto-object.c: Don't include toplev.h.
2099         * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2101 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
2103         * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2104         $(TOPLEV_H).
2106 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
2108         * lto-endian.h: Delete.
2109         * lto-object.c: Don't include "libiberty.h".
2110         (O_BINARY): Don't define.
2111         * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2112         (O_BINARY): Don't define.
2114 2010-11-23  Richard Guenther  <rguenther@suse.de>
2116         * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2118 2010-11-23  Richard Guenther  <rguenther@suse.de>
2120         PR lto/46605
2121         * lto.c (read_cgraph_and_symbols): Bail out after errors.
2123 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
2125         * lto.c (lto_main): Take no arguments.
2126         * lto.h (lto_main): Update prototype.
2128 2010-11-16  Ian Lance Taylor  <iant@google.com>
2130         * lto-object.c (lto_obj_file_open): Call
2131         simple_object_attributes_merge rather than
2132         simple_object_attributes_compare.
2134 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
2136         * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2137         * lto-lang.c (lto_handle_option): Take location_t parameter.
2139 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
2141         * lto.c (lto_resolution_read): Start diagnostics with lowercase
2142         letters and remove trailing '.'.
2143         (lto_file_finalize): Start diagnostic with a lowercase letter.
2145 2010-11-02  Ian Lance Taylor  <iant@google.com>
2147         * lto-object.c: New file.
2148         * lto-elf.c: Remove file.
2149         * lto-macho.c: Remove file.
2150         * lto-macho.h: Remove file.
2151         * lto-coff.c: Remove file.
2152         * lto-coff.h: Remove file.
2153         * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2154         lto/lto-object.o.
2155         ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2156         (lto/lto-objfile.o): New target.
2157         (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2158         (lto/lto.o): Remove $(LIBIBERTY_H).
2160 2010-10-22  Jan Hubicka  <jh@suse.cz>
2162         * lto.c (add_cgraph_node_to_partition,
2163         add_varpool_node_to_partition): Add debug info.
2164         (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2165         partitioned nodes.
2166         (do_whole_program_analysis): Set function flags before dumping.
2168 2010-10-22  Richard Guenther  <rguenther@suse.de>
2170         * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2171         the new gimple_register_canonical_type.
2173 2010-10-20  H.J. Lu  <hongjiu.lu@intel.com>
2175         PR bootstrap/45954
2176         * config-lang.in (boot_language): Set to $enable_lto.
2178 2010-10-18  Jakub Jelinek  <jakub@redhat.com>
2180         PR lto/45638
2181         * Make-lang.in (check-lto): New dummy target.
2183 2010-10-14  Eric Botcazou  <ebotcazou@adacore.com>
2185         * lto-elf.c (SHN_XINDEX): Define if not already defined.
2187 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
2189         * lto-lang.c (lto_init_options): Change to
2190         lto_init_options_struct.  Update parameters.
2191         (LANG_HOOKS_INIT_OPTIONS): Don't define.
2192         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2194 2010-10-06  Jan Hubicka  <jh@suse.cz>
2196         * lto.c (lto_balanced_map): Fix accounting of program size.
2198 2010-10-06  Jan Hubicka  <jh@suse.cz>
2200         * lto.c (lto_balanced_map): Do not produce empty partitions.
2202 2010-10-06  Andi Kleen  <ak@linux.intel.com>
2204         * lto.c (lto_process_name): Add.
2205         (lto_main): Call lto_process_name.
2207 2010-10-06  Jan Hubicka  <jh@suse.cz>
2209         * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2210         COMDATs required by the linker.
2212 2010-10-05  Ian Lance Taylor  <iant@google.com>
2214         * lto.c (lto_section_with_id): Make s a const pointer.
2216 2010-10-05  Jan Hubicka  <jh@suse.cz>
2218         * lto.c:  Include params.h.
2219         (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2220         refcounting in aux field.
2221         (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2222         New functions.
2223         (lto_1_to_1_map): Simplify.
2224         (lto_balanced_map): New function.
2225         (do_whole_program_analysis): Chose proper partitioning alg.
2226         * Make-lang.in (lto.o): Add dependency on params.h
2228 2010-10-04  Andi Kleen  <ak@linux.intel.com>
2230         * Make-lang.in (lto1): Add + to build rule.
2232 2010-10-03  Andi Kleen  <ak@linux.intel.com>
2234         * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2235           with fatal_error.
2237 2010-09-28  Jan Hubicka  <jh@suse.cz>
2239         * lto-lang.c (handle_leaf_attribute): New function.
2240         (lto_attribute_tables): Add leaf.
2242 2010-09-25  Jie Zhang  <jie@codesourcery.com>
2244         * lto.c (lto_read_all_file_options): Start a new line after
2245         printing out file names.
2247 2010-09-24  Jan Hubicka  <jh@suse.cz>
2249         * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2251 2010-09-20  Jan Hubicka  <jh@suse.cz>
2253         PR tree-optimize/45605
2254         * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2256 2010-09-18  Gerald Pfeifer  <gerald@pfeifer.com>
2258         * lto-elf.c (lto_obj_file_open): Also provide filename when
2259         elf_begin fails.
2261 2010-09-17  Jan Hubicka  <jh@suse.cz>
2263         * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2265 2010-09-17  Richard Guenther  <rguenther@suse.de>
2267         * lang.opt (flag_wpa): Also enable for the driver.
2269 2010-09-16  Jan Hubicka  <jh@suse.cz>
2271         * lto.c (lto_materialize_function): Do not tamper with STATIC and
2272         EXTERNAL flags. 
2274 2010-09-15  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2276         * lto-tree.h (struct lang_type): Add variable_size GTY option.
2278 2010-09-08  Jan Hubicka  <jh@suse.cz>
2280         * lto.c (real_file_count, real_file_decl_data): New static vars.
2281         (read_cgraph_and_symbols): Use it.
2283 2010-09-08  Richard Guenther  <rguenther@suse.de>
2285         * lto.c (read_cgraph_and_symbols): Collect again after each
2286         file.
2288 2010-09-07  Jan Hubicka  <jh@suse.cz>
2290         * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2292 2010-09-03  Richard Guenther  <rguenther@suse.de>
2294         * lto-elf.c (validate_file): Always error if validation fails.
2296 2010-08-20  Jan Hubicka  <jh@suse.cz>
2298         * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2299         (lto_wpa_write_files): Update comments.
2301 2010-08-20  H.J. Lu  <hongjiu.lu@intel.com>
2303         PR bootstrap/45357
2304         * lto.c (lto_materialize_function): Replace has_analyzed_clone
2305         with has_analyzed_clone_p.
2307 2010-08-20  Jan Hubicka  <jh@suse.cz>
2309         * lto.c (has_analyzed_clone_p): New function
2310         (lto_materialize_function): Use callgraph to determine if
2311         body is needed.
2312         (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2314 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
2316         * lto.c: Use FOR_EACH_VEC_ELT.
2318 2010-07-27  Andi Kleen  <ak@linux.intel.com>
2320         * Make-lang.in (lto.o): Add dependency to splay-tree.h
2322 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2324         * lto-lang.c (lto_handle_option): Update prototype and return
2325         value type.  Remove duplicate assignment to result.
2327 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2329         * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2330         New.
2331         (lto_init_options): Update prototype.
2332         (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2333         Define.
2335 2010-07-10  Andi Kleen  <ak@linux.intel.com>
2337         PR lto/44992
2338         * lto.c: Include splay-tree.h
2339         (lto_resolution_read): Change to walk file_ids tree and parse
2340         extra file_id in resolution file.
2341         (lto_section_with_id): Add.
2342         (create_subid_section_table): Add.
2343         (lwstate): Add.
2344         (lto_create_files_from_ids): Add.
2345         (lto_file_read): Change to handle sub file ids and create list
2346         of file_datas. Add output argument for count.
2347         (get_section_data): Pass file_data to lto_get_section_name.
2348         (lto_flatten_file): Add.
2349         (read_cgraph_and_symbols): Handle linked lists of file_datas.
2351 2010-07-10  Andi Kleen  <ak@linux.intel.com>
2353         * lto-coff.c (hash_name, eq_name): Move.
2354         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2355         * lto-elf.c: (hash_name, eq_name): Move.
2356         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2357         * lto-macho.c: (hash_name, eq_name): Move.
2358         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2359         * lto.c: (hash_name, eq_name): Move from lto-*.c
2360         (lto_obj_create_section_hash_table): Add.
2361         (free_with_string): Add.
2363 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2365         * lto-coff.c: Include diagnostic-core.h in every file that
2366         includes toplev.h.
2367         * lto-elf.c: Likewise.
2368         * lto-lang.c: Likewise.
2369         * lto-macho.c: Likewise.
2371 2010-07-07  Jakub Jelinek  <jakub@redhat.com>
2373         * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2374         (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2375         objects.
2377 2010-07-05  Jan Hubicka  <jh@suse.cz>
2379         * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2380         nodes from same comdat group as well as all comdat functions referenced
2381         here.
2382         (add_varpool_node_to_partition, add_references_to_partition): New
2383         function.
2384         (lto_1_1_map): Skip COMDAT fnctions/variables; use
2385         add_varpool_node_to_partition; clear aux flags when done.
2386         (lto_promote_cross_file_statics): Do not promote stuff that gets
2387         duplicated to each ltrans.
2389 2010-07-04  Jan Hubicka  <jh@suse.cz>
2391         * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2393 2010-06-13  Richard Guenther  <rguenther@suse.de>
2395         * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2397 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
2399         * lto.c (lto_resolution_read):  Pre-initialize local variable r.
2400         * lto-coff.c (coff_write_object_file): Add braces to if.
2402 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2404         * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2405         (lto_file_read): Likewise.
2406         (new_partition): Likewise.
2407         (read_cgraph_and_symbols): Likewise.
2409 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
2411         * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2412         (lto_handle_option): Don't set flag_signed_char here.
2414 2010-06-04  Richard Guenther  <rguenther@suse.de>
2416         PR lto/41584
2417         * lto.c (lto_1_to_1_map): Use the proper file_data for
2418         varpool nodes.
2420 2010-05-30  Jan Hubicka  <jh@suse.cz>
2422         * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2423         partitioning decisions.
2425 2010-05-29  Jan Hubicka  <jh@suse.cz>
2427         * lto.c (bitmap vector): Remove.
2428         (lto_cgraph_node_sets,  lto_varpool_node_sets): Remove.
2429         (ltrans_partition_def): New structure.
2430         (ltrans_partition): New type and VECtor.
2431         (new_partition): New function.
2432         (add_cgraph_node_to_partition): New function.
2433         (lto_1_to_1_map): Reorganize for partitions.
2434         (lto_add_inline_clones): Remove.
2435         (lto_add_all_inlinees): Remove.
2436         (lto_promote_cross_file_statics): Use partitions.
2437         (cmp_partitions): New function.
2438         (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2439         use partitions; output files sorted by size.
2441 2010-05-29  Steven Bosscher  <steven@gcc.gnu.org>
2443         * Make-lang.in: Replace vec.h dependency with VEC_H.
2445 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
2447         * lto-coff.c (coff_errmsg): Remove.
2448         (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2449         errors instead of coff_errmsg (-1).
2450         * lto-macho.c (mach_o_errmsg): Remove.
2451         (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2452         instead of mach_o_errmsg (-1).
2453         * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2454         xstrerror (errno).
2456 2010-05-28  Richard Guenther  <rguenther@suse.de>
2458         * lto.c (prefix_name_with_star): Removed.
2459         (strip_extension): Likewise.
2460         (get_filename_for_set): Likewise.
2461         (lto_write_ltrans_list): Fold into ...
2462         (lto_wpa_write_files): ... this.  Name LTRANS units
2463         by suffixing the ltrans output list filename.
2464         (do_whole_program_analysis): Adjust.
2466 2010-05-27  Joseph Myers  <joseph@codesourcery.com>
2468         * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2469         (read_cgraph_and_symbols, lto_main): Use seen_error.
2470         * Make-lang.in (lto/lto.o): Update dependencies.
2472 2010-05-27  Eric Botcazou  <ebotcazou@adacore.com>
2474         PR lto/44230
2475         * lto.h (lto_eh_personality): New prototype.
2476         * lto.c: Include debug.h.
2477         (first_personality_decl): New static variable.
2478         (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2479         first function for which it is non-null.
2480         (lto_eh_personality_decl): New static variable.
2481         (lto_eh_personality): New function.
2482         * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2483         * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2485 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
2487         * lto-lang.c: Do not include expr.h.
2489 2010-05-24  Richard Guenther  <rguenther@suse.de>
2491         * lto-elf.c (lto_obj_build_section_table): Work around
2492         FreeBSD libelf issue.
2494 2010-05-22  Richard Guenther  <rguenther@suse.de>
2496         * lto.c (read_cgraph_and_symbols): Do not collect.
2498 2010-05-20  Jan Hubicka  <jh@suse.cz>
2500         * lto.c (promote_var, promote_fn): New functions.
2501         (lto_promote_cross_file_statics): Compute correctly boundary including
2502         static initializers of readonly vars.
2504 2010-05-18  Jan Hubicka  <jh@suse.cz>
2506         * lto.c (lto_1_to_1_map): Partition non-inline clones.
2507         (lto_promote_cross_file_statics): Deal with non-inline clones.
2509 2010-05-18  Jan Hubicka  <jh@suse.cz>
2511         * lto.c (lto_materialize_function): Announce function when
2512         reading body; allocate_struct_function only when reading body;
2513         do not finalize local statics; ggc_collect after reading;
2514         do not mark reachable node.
2515         (materialize_cgraph): Do not announce function.
2517 2010-05-11  Jan Hubicka  <jh@suse.cz>
2519         * lto.c (materialize_cgraph): Revert my previous patch.
2521 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
2523         * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2524         IMAGE_FILE_MACHINE_AMD64.
2525         * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2527 2010-05-11  Jan Hubicka  <jh@suse.cz>
2529         * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2530         (materialize_cgraph): Add it here.
2532 2010-05-11  Jan Hubicka  <jh@suse.cz>
2534         * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2535         vector.
2537 2010-05-11  Jan Hubicka  <jh@suse.cz>
2539         * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2540         (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2541         use reachable_from_other_partition_p and
2542         referenced_from_other_partition_p test.
2544 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
2546         * lto-coff.c (validate_file): Add x64-coff support.
2547         * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2548         (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2549         * lto-lang.c (lto_build_c_type_nodes): Add check for
2550         'long long unsigned int' for x64-windows.
2551         (lto_init): Likewise.
2554 2010-05-07  Steven Bosscher  <steven@gcc.gnu.org>
2556         * lto.h (struct lto_file_struct): Document offset member.
2557         * lto-endian.h: New file.
2558         * lto-macho.h: New file.
2559         * lto-macho.c: New file.
2560         * Make-lang.in: Add rule for lto-macho.o.
2562 2010-05-07  Richard Guenther <rguenther@suse.de>
2564         PR lto/43857
2565         PR lto/43371
2566         * lang.opt (fresolution): Change to ...
2567         (fresolution=): ... this.
2568         * lto-lang.c (lto_handle_option): Adjust.
2570 2010-05-07  Richard Guenther  <rguenther@suse.de>
2572         * lto.c (DUMPBASE_SUFFIX): Remove.
2573         (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2574         Rename to ...
2575         (lto_write_ltrans_list): ... only output the list of ltrans files.
2576         (lto_maybe_unlink): Remove.
2577         (do_whole_program_analysis): Do not execute LTRANS phase
2578         from here.
2580 2010-05-06  H.J. Lu  <hongjiu.lu@intel.com>
2582         * lto-lang.c (lto_handle_option): Add argument kind.
2584 2010-05-05  Jan Hubicka  <jh@suse.cz>
2586         * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2587         refs.
2589 2010-05-05  Jan Hubicka  <jh@suse.cz>
2591         * lto.c (lto_1_to_1_map): Partition only needed nodes.
2593 2010-04-30  Jan Hubicka  <jh@suse.cz>
2595         * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2596         use default name.
2597         (lto_wpa_write_files): Write any non-empty partition.
2599 2010-04-30  Jan Hubicka  <jh@suse.cz>
2601         * lto.c: Do not attempt to make constant pool references global.
2603 2010-04-28  Jan Hubicka  <jh@suse.cz>
2605         * lto/lto.c (lto_read_in_decl_state): Use GGC.
2606         (lto_wpa_write_files): Announce what we are writting.
2607         (all_file_decl_data): New.
2608         (read_cgraph_and_symbols): Use GGC; correct timevars.
2609         (do_whole_program_analysis): Collect.
2610         * lto/Make-lang.in (lto.o): Fix dependency.
2611         * Makefile.in (GTFILES): Add lto-streamer.h.
2612         * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2613         (varpool_assemble_pending_decls): Use VAROUT.
2614         * lto-streamer.h (lto_tree_ref_table): Annotate.
2615         (lto_in_decl_state): Annotate.
2616         (lto_file_decl_data): Annotate.
2618 2010-04-28  Jan Hubicka  <jh@suse.cz>
2620         * lto.c (lto_varpool_node_sets): New.
2621         (lto_1_to_1_map): Partition varpool too.
2622         (globalize_context_t, globalize_cross_file_statics,
2623         lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2624         lto_scan_statics_in_remaining_global_vars): Remove.
2625         (lto_promote_cross_file_statics): Rewrite.
2626         (get_filename_for_set): Take vset argument.
2627         (lto_wpa_write_files): Pass around vsets.
2629 2010-04-27  Dave Korn  <dave.korn.cygwin@gmail.com>
2631         PR lto/42776
2632         * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2633         hardcoding 'lto-elf.o'.
2634         ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2636         * lto-coff.h: New file.
2637         * lto-coff.c: Likewise.
2639 2010-04-26  Richard Guenther  <rguenther@suse.de>
2641         * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2643 2010-04-26  Dave Korn  <dave.korn.cygwin@gmail.com>
2645         * lto.h (lto_elf_file_open): Rename prototype from this ...
2646         (lto_obj_file_open): ... to this.
2647         (lto_elf_file_close): Likewise ...
2648         (lto_obj_file_close): ... and likewise.
2649         (lto_elf_build_section_table): Likewise ...
2650         (lto_obj_build_section_table): ... and likewise.
2651         (lto_elf_begin_section): Likewise ...
2652         (lto_obj_begin_section): ... and likewise.
2653         (lto_elf_append_data): Likewise ...
2654         (lto_obj_append_data): ... and likewise.
2655         (lto_elf_end_section): Likewise ...
2656         (lto_obj_end_section): ... and likewise.
2657         * lto.c (lto_file_read): Update references to the above.
2658         (lto_wpa_write_files): Likewise.
2659         (lto_read_all_file_options): Likewise.
2660         (read_cgraph_and_symbols): Likewise.
2661         * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2662         (LANG_HOOKS_APPEND_DATA): Likewise.
2663         (LANG_HOOKS_END_SECTION): Likewise.
2664         * lto-elf.c (lto_elf_file_open): Rename from this ...
2665         (lto_obj_file_open): ... to this, updating any references.
2666         (lto_elf_file_close): Likewise ...
2667         (lto_obj_file_close): ... and likewise.
2668         (lto_elf_build_section_table): Likewise ...
2669         (lto_obj_build_section_table): ... and likewise.
2670         (lto_elf_begin_section): Likewise ...
2671         (lto_obj_begin_section): ... and likewise.
2672         (lto_elf_append_data): Likewise ...
2673         (lto_obj_append_data): ... and likewise.
2674         (lto_elf_end_section): Likewise ...
2675         (lto_obj_end_section): ... and likewise.
2677 2010-04-21  Jan Hubicka  <jh@suse.cz>
2679         * lto.c (lto_fixup_tree): Do not call wpa fixup.
2680         (materialize_cgraph): Likewise.
2682 2010-04-21  Jan Hubicka  <jh@suse.cz>
2684         * lto.c (lto_wpa_write_files): Update.
2685         (read_cgraph_and_symbols): Be more verbose.
2686         (materialize_cgraph): Likewise.
2687         (do_whole_program_analysis): Likewise.
2689 2010-04-21  Jan Hubicka  <jh@suse.cz>
2691         * lto.c (globalize_cross_file_statics): When function has address taken,
2692         it needs to be public.
2694 2010-04-20  Jan Hubicka  <jh@suse.cz>
2696         * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2697         (lto_add_all_inlinees): Likewise.
2698         (lto_wpa_write_files): Likewise.
2700 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2702         * lto-lang.c (lto_init): Remove second argument in call to
2703         build_common_tree_nodes.
2705 2010-04-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2707         * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2708         function.
2710 2010-03-09  Eric Botcazou  <ebotcazou@adacore.com>
2712         PR bootstrap/43276
2713         * lto-elf.c: Define EM_* constants if not already defined.
2715 2010-03-03  Eric Botcazou  <ebotcazou@adacore.com>
2717         * lto-elf.c (is_compatible_architecture): New static function.
2718         (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2720 2010-02-11  Richard Guenther  <rguenther@suse.de>
2722         PR driver/43021
2723         * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2724         appropriately.
2726 2010-01-11  Andy Hutchinson  <hutchinsonandy@gcc.gnu.org>
2728         * lto.c (O_BINARY): Define.
2729         (lto_read_section_data): Open file in binary mode.
2730         * lto-elf.c (O_BINARY): Define.
2731         (lto_elf_file_open): Open file in binary mode. 
2733 2010-01-08  Richard Guenther  <rguenther@suse.de>
2735         PR lto/42528
2736         * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2737         (lto_init): Do not init char_type_node in a standard way
2738         but according to flag_signed_char.
2740 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
2742         PR lto/41564
2743         * lto.c (DUMPBASE_SUFFIX): New.
2744         (lto_execute_ltrans): Append a sequence number to -dumpbase
2745         for LTRANS.
2747 2010-01-02  H.J. Lu  <hongjiu.lu@intel.com>
2749         PR lto/42580
2750         * lto-elf.c (lto_elf_file_open): Stop if the command line
2751         option file is missing.
2753 2009-12-15  Richard Guenther  <rguenther@suse.de>
2755         * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2756         (lto_post_options): Do not disable debuginfo.
2758 2009-12-14  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
2760         * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2762 2009-12-11  Richard Guenther  <rguenther@suse.de>
2764         PR lto/42037
2765         * lto.c (lto_resolution_read): Properly grow the vector.
2767 2009-12-11  Richard Guenther  <rguenther@suse.de>
2769         PR lto/41915
2770         * lto-lang.c (lto_init_options): Initialize flag_complex_method
2771         to the C99 default.  Do not set flag_unit_at_a_time.
2773 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
2775         * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2776         variable.
2778 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
2780         PR bootstrap/42096
2781         * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2782         * lto.c (lto_parse_hex): New.
2783         (lto_resolution_read): Use lto_parse_hex.
2784         * lto.h (lto_parse_hex): New.
2786 2009-11-17  Rafael Avila de Espindola  <espindola@google.com>
2788         * lto-elf.c (lto_file_init): Add offset argument.
2789         (lto_elf_file_open): Record the offset.
2790         * lto.c (lto_resolution_read): Change file_name into a lto_file
2791         argument. Check offsets.
2792         (lto_file_read): Update call to lto_resolution_read.
2793         * lto.h (lto_file_struct): Add the offset field.
2795 2009-11-16  Rafael Avila de Espindola  <espindola@google.com>
2797         * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2799 2009-11-14  Jan Hubicka  <jh@suse.cz>
2801         * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2803 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
2805         * lang.opt (fresolution): Renamed from resolution.
2806         * lto-lang.c (lto_handle_option): Handle new option name.
2807         * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2809 2009-11-04  Richard Guenther  <rguenther@suse.de>
2810             Rafael Avila de Espindola  <espindola@google.com>
2812         * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2813         (lto_elf_file_open): Handle offsets in arguments name@offest.
2815 2009-10-30  Richard Guenther  <rguenther@suse.de>
2817         PR lto/41858
2818         * lto.c (lto_file_read): Do not set file_data->fd.
2819         (lto_read_section_data): Use a single-entry file-descriptor cache.
2820         Do not check the result of xmalloc.
2821         (free_section_data): Do not use file_data->fd.
2822         (lto_read_all_file_options): Likewise.
2824 2009-10-22  Richard Guenther  <rguenther@suse.de>
2826         * lto.c (lto_fixup_jump_functions): Remove.
2827         (lto_fixup_decls): Do not fixup jump functions.
2828         (read_cgraph_and_symbols): Schedule cgraph merging after
2829         summary reading.  Schedule type and decl fixup before
2830         summary reading.
2832 2009-10-22  Richard Guenther  <rguenther@suse.de>
2834         * lto.c (lto_fixup_data_t): Remove free_list member.
2835         (lto_fixup_tree): Do not insert into free_list.
2836         (free_decl): Remove.
2837         (lto_fixup_decls): Remove free-list handling.
2839 2009-10-22  Jan Hubicka  <jh@suse.cz>
2841         * lto.c (lto_fixup_jump_functions): New function.
2842         (lto_fixup_decls): Use it.
2844 2009-10-16  Richard Guenther  <rguenther@suse.de>
2846         PR lto/41715
2847         * lto.c (lto_fixup_tree): Revert last change.
2849 2009-10-14  Richard Guenther  <rguenther@suse.de>
2851         * lto.c (lto_fixup_tree): In case the prevailing decl is not
2852         compatible with the one we replace wrap it around a
2853         VIEW_CONVERT_EXPR.
2855 2009-10-09  Richard Guenther  <rguenther@suse.de>
2857         PR lto/41635
2858         PR lto/41636
2859         * lto.c (read_cgraph_and_symbols): Do not assert we can open
2860         a file.
2861         * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2862         (init_ehdr##BITS): Likewise.
2864 2009-10-08  Joseph Myers  <joseph@codesourcery.com>
2866         * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2867         init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2868         diagnostics.
2869         * lto-lang.c (lto_post_options): Remove trailing "." from
2870         diagnostics.
2872 2009-10-08  Richard Guenther  <rguenther@suse.de>
2874         * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2875         hash tables.
2877 2009-10-07  Joseph Myers  <joseph@codesourcery.com>
2879         * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2881 2009-10-07  Jan Hubicka  <jh@suse.cz>
2883         * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2884         ltrans stage; explain why this is needed and should not.
2886 2009-10-05  Richard Guenther  <rguenther@suse.de>
2888         PR lto/41552
2889         PR lto/41487
2890         * lto.c (lto_read_decls): Do not register deferred decls.
2891         (read_cgraph_and_symbols): Delay symbol and cgraph merging
2892         until after reading the IPA summaries.
2894 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
2896         * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2897         (lto-lang.c): Don't include lto/common.h.
2899 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
2901         * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2902         (lto/common.o): Remove.
2903         * common.c: Remove.
2904         * common.h (lto_kind_str): Remove.
2905         (lto_visibility_str): Remove.
2906         (lto_resolution_str): Make it static.
2908 2009-10-01  Diego Novillo  <dnovillo@google.com>
2910         * lto.c (lto_read_decls): Add comment.
2911         Call internal_error instead of gcc_assert.
2912         (lto_resolution_read): Likewise.
2913         (lto_add_all_inlinees): Tidy.
2914         * Make-lang.in: Fix copyright boilerplate.
2915         (lto.pdf): New.
2916         (lto.install-pdf): New.
2917         * lto-tree.h: Fix copyright boilerplate.
2918         * lang-specs.h: Likewise.
2919         Remove ".lto" entry from compilers fragment.
2920         * lto-elf.c: Move inclusion of gelf.h after config.h.
2921         Tidy formatting everywhere.
2922         * lto.h: Fix copyright boilerplate.
2923         Tidy formatting everywhere.
2924         * common.c: Likewise.
2925         * config-lang.in: Likewise.
2926         * common.h: Likewise.
2927         * lto-lang.c: Likewise.
2929 2009-10-01  Richard Guenther  <rguenther@suse.de>
2931         * lto.c (lto_read_section_data): Use plain lseek/read.
2933 2009-10-01  Richard Guenther  <rguenther@suse.de>
2935         * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2936         use sysconf to query the system page size.
2937         (lto_file_read): Implement fallback using stdio.
2938         (free_section_data): Likewise.
2940 2009-09-29  Diego Novillo  <dnovillo@google.com>
2942         * lto-lang.c (lto_init): Really fix call to
2943         build_common_builtin_nodes.
2945 2009-09-29  Diego Novillo  <dnovillo@google.com>
2947         * lto-lang.c (lto_init): Fix call to
2948         build_common_builtin_nodes.
2950 2009-09-29  Richard Guenther  <rguenther@suse.de>
2952         PR lto/40754
2953         * lto-elf.c (init_shdr##BITS): Properly specify alignment
2954         in bytes.
2955         (first_data_block): New static variable.
2956         (lto_elf_append_data): Align the first data block in each
2957         section.
2959 2009-09-28  Diego Novillo  <dnovillo@google.com>
2961         * lto-lang.c: Tidy.  Remove stale FIXME lto markers.
2962         * lto.c (strip_extension): New.
2963         (get_filename_for_set): Call it.  Do not call make_cwd_temp_file.
2964         (lto_execute_ltrans): Tidy.
2965         Do not pass -fwpa nor -fltrans-* to LTRANS.
2966         * opts.c: Tidy formatting and remove stale FIXME lto markers.
2967         * tree.c (need_assembler_name_p): Call
2968         lang_hooks.decls.may_need_assembler_name_p if set.
2969         * varasm.c (default_binds_local_p_1): Remove check for
2970         flag_ltrans.
2971         * varpool.c (decide_is_variable_needed): Do not test for
2972         in_lto_p.
2974 2009-09-22  Richard Guenther  <rguenther@suse.de>
2976         PR lto/39276
2977         * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2978         * Make-lang.in: Remove ltrans-driver stuff.
2979         * config-lang.in: Likewise.
2980         * lang.opt (fltrans-driver): Remove.
2981         * lto-lang.c (lto_init_options): Remove code initializing
2982         ltrans_driver.
2983         * ltrans-driver: Remove.
2985 2009-09-21  Diego Novillo  <dnovillo@google.com>
2987         * lto-lang.c (lto_define_builtins): Remove superfluous
2988         calls to targetm.init_builtins and build_common_builtin_nodes.
2989         (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2990         build_common_builtin_nodes.
2991         * lto.c (lto_materialize_function): Do nothing if NODE is a
2992         clone.
2994 2009-09-03  Diego Novillo  <dnovillo@google.com>
2996         * lto-elf.c (validate_file): Replace call to
2997         elf_getshstrndx with call to elf_getshdrstrndx.
2999 2009-08-19  Richard Guenther  <rguenther@suse.de>
3001         * lto-lang.c (lto_init): Merge char_type_node with the
3002         appropriately signed variant.
3004 2009-08-19  Richard Guenther  <rguenther@suse.de>
3006         PR lto/41071
3007         * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3008         (lto_fixup_type): Re-build the pointer-to chain part two.
3010 2009-08-19  Richard Guenther  <rguenther@suse.de>
3012         PR lto/41071
3013         * lto.c (lto_fixup_type): Re-build the type variant chain.
3015 2009-08-19  Richard Guenther  <rguenther@suse.de>
3017         PR lto/41071
3018         * lto.c (lto_fixup_constructor): New function.
3019         (lto_fixup_tree): Replace all types.  Properly fixup
3020         constructors and constants.
3022 2009-08-14  Richard Guenther  <rguenther@suse.de>
3024         * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3025         for DECL_LANG_SPECIFIC.
3027 2009-08-13  Richard Guenther  <rguenther@suse.de>
3029         PR lto/41032
3030         * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3032 2009-07-30  Richard Guenther  <rguenther@suse.de>
3034         PR lto/40903
3035         * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3036         the largest decl for output and free TREE_CHAIN for further
3037         use.
3039 2009-07-24  Diego Novillo  <dnovillo@google.com>
3041         * Make-lang.in: Add empty lto.install-plugin target.
3043 2009-07-13  Diego Novillo  <dnovillo@google.com>
3045         * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3047 2009-07-11  Richard Guenther  <rguenther@suse.de>
3049         * lto-lang.c (lto_write_globals): Wrapup global decls.
3051 2009-07-10  Richard Guenther  <rguenther@suse.de>
3053         * lto-lang.c (lto_init): Allocate one more location to make
3054         BUILTINS_LOCATION correct.
3056 2009-07-09  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3058         * lto.c (free_section_data): Cast computed_offset to caddr_t.
3060 2009-07-06  Diego Novillo  <dnovillo@google.com>
3062         * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3063         TYPE_SIZE_UNIT.
3065 2009-07-06  Diego Novillo  <dnovillo@google.com>
3067         * lto.c (preload_common_nodes): Remove.
3068         (lto_read_in_decl_state): Call lto_streamer_cache_get.
3069         (lto_read_decls): Call lto_data_in_create and
3070         lto_data_in_delete.
3071         (free_decl): Do not call ggc_free.
3072         (lto_main): Call lto_init_reader.
3073         * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3074         (lto_init): Initialize main_identifier_node if needed.
3075         Make ptrdiff_type_node be integer_type_node.
3077 2009-06-19  Diego Novillo  <dnovillo@google.com>
3079         * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3080         Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3081         Remove code guarded by #ifdef LOCAL_TRACE.
3083 2009-06-18  Diego Novillo  <dnovillo@google.com>
3085         * lto.c: Update license to GPLv3.
3086         * lto-elf.c: Likewise.
3087         * common.c: Likewise.
3088         * lto-lang.c: Likewise.
3089         * lto.h: Remove superfluous include files.  Update all
3090         users.
3092 2009-06-17  Diego Novillo  <dnovillo@google.com>
3094         * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3096 2009-06-02  Diego Novillo  <dnovillo@google.com>
3098         * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3099         read in.
3100         (materialize_cgraph): Only materialize nodes that have a
3101         representation on file.
3103 2009-06-01  Diego Novillo  <dnovillo@google.com>
3105         * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3107 2009-05-31  Diego Novillo  <dnovillo@google.com>
3109         * lto-lang.c (lto_type_for_mode): Handle all the modes
3110         handled in c_common_type_for_mode.
3112 2009-05-21  Diego Novillo  <dnovillo@google.com>
3114         * lto-elf.c: Always include <gelf.h>.
3115         * config-lang.in (target_libs): Remove.
3116         (build_by_default): Set to no.
3118 2009-05-15  Diego Novillo  <dnovillo@google.com>
3120         * lto.c (lto_materialize_function): Assert that DECL is
3121         not a builtin.
3122         (materialize_cgraph): Don't try to materialize builtin
3123         functions.
3124         * lto-section-out.c (write_symbol_vec): Do not write
3125         builtin functions.
3127 2009-05-13  Diego Novillo  <dnovillo@google.com>
3129         * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3131 2009-05-07  Diego Novillo  <dnovillo@google.com>
3133         * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3134         (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3135         (lto_fixup_type): Call it for TYPE_POINTER_TO,
3136         TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3137         (lto_fixup_tree): Call gimple_register_type when *TP is a
3138         type.
3139         (lto_main): Call bitmap_obstack_initialize.
3141 2009-04-22  Diego Novillo  <dnovillo@google.com>
3143         * lto.c (free_section_data): Tidy.
3144         (lto_1_to_1_map): Tidy.
3145         (lto_add_all_inlinees): Tidy.
3146         (prefix_name_with_star): New.
3147         (get_filename_for_set): New.
3148         (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3149         to determine what cgraph node sets to write.
3150         Call get_filename_for_set to compute temporary file
3151         names.
3152         (lto_execute_ltrans): Do not execute LTRANS on files with
3153         names that start with '*'.
3154         Move logic to execute LTRANS together so that LTRANS is
3155         invoked only if there are any files to compile.
3156         (do_whole_program_analysis): Only remove output files
3157         that do not start with '*'.
3159 2009-04-06  Diego Novillo  <dnovillo@google.com>
3161         * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3162         * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3163         (lto_add_all_inlinees): Tidy.
3165 2009-03-26  Diego Novillo  <dnovillo@google.com>
3167         * lto.c: Include gimple.h.
3168         (lto_read_in_decl_state): Call gimple_register_type for
3169         every type in every stream.
3170         (lto_fixup_common): Call gimple_register_type if T has a
3171         type.
3172         (do_whole_program_analysis): Call print_lto_report.
3173         (lto_main): Call print_lto_report after cgraph_optimize.
3174         * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3176 2009-03-24  Diego Novillo  <dnovillo@google.com>
3178         * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3179         (lto.o): Add dependency on GIMPLE_H.
3181 2009-03-10  Simon Baldwin  <simonb@google.com>
3183         * lto.c (lto_read_all_file_options): Close any open file descriptor
3184         contained in file_data before freeing.
3186 2009-02-24  Rafael Avila de Espindola  <espindola@google.com>
3188         * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3189         for a decl in the original bitmap, not a node.
3190         (lto_add_all_inlinees): Remove original nodes that are not needed.
3191         (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3193 2009-02-24  Diego Novillo  <dnovillo@google.com>
3195         * lto.c (lto_materialize_function): Update
3196         lto_stats.num_function_bodies.
3197         (get_section_data): Initialize *LEN to 0.
3198         (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3199         (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3200         Update lto_stats.num_output_files.
3201         (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3202         (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3203         (lto_main): Initialize lto_stats.
3204         If flag_lto_report is set, call print_lto_report.
3206 2009-02-19  Diego Novillo  <dnovillo@google.com>
3208         Revert
3210         2009-02-19  Rafael Avila de Espindola  <espindola@google.com>
3212                 * lto.c (lto_add_inline_clones): Don't add the
3213                 master clone. Check for a decl in the original
3214                 bitmap, not a node.
3215                 (lto_add_all_inlinees): Remove original nodes
3216                 that are not needed.
3217                 (lto_scan_statics_in_cgraph_node): Don't care if
3218                 the node is the master.
3219                 (lto_promote_cross_file_statics): Use a new
3220                 context.seen_node_decls for each set
3222 2009-02-19  Rafael Avila de Espindola  <espindola@google.com>
3224         * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3225         for a decl in the original bitmap, not a node.
3226         (lto_add_all_inlinees): Remove original nodes that are not needed.
3227         (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3228         (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3229         for each set
3231 2009-02-18  Diego Novillo  <dnovillo@google.com>
3233         * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3234         and TV_WHOPR_WPA_IO.
3235         (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3236         (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3237         (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3238         Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3239         depending on command line flags.
3240         (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3241         (lto_main): Remove timer uses.
3243 2009-02-18  Rafael Avila de Espindola  <espindola@google.com>
3245         * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3246         (lto_wpa_write_files): Update calls to renamed functions.
3248 2009-02-17  Diego Novillo  <dnovillo@google.com>
3250         PR 39203
3251         * lto-lang.c (lto_post_options): Disable -fwhole-program
3252         when running LTRANS.
3254 2009-02-10  Diego Novillo  <dnovillo@google.com>
3256         * lto.c (read_cgraph_and_symbols): Fix comment.
3258 2009-02-10  Diego Novillo  <dnovillo@google.com>
3260         * lto.c (read_cgraph_and_symbols): Read options from all
3261         IL files.
3263 2009-02-10  Diego Novillo  <dnovillo@google.com>
3265         * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3266         (materialize_cgraph): Likewise.
3267         (do_whole_program_analysis): Likewise.
3268         (lto_main): Call read_cgraph_and_symbols,
3269         materialize_cgraph and do_whole_program_analysis.
3271 2009-02-10  Simon Baldwin  <simonb@google.com>
3273         * lto.c: Include lto-opts.h.
3274         * (lto_main): Clear file options at loop start, read any saved
3275         options from the first file handled, and re-issue options.
3276         * Makefile.in (lto.o): Add dependency on lto-opts.h.
3278 2009-02-02  Diego Novillo  <dnovillo@google.com>
3280         * lto.c (lto_main): Stop LTO_TIMER and use
3281         TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3283 2009-01-30  H.J. Lu  <hongjiu.lu@intel.com>
3285         PR lto/38995
3286         * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3287         to POINTER_SIZE.
3289 2009-01-29  Ramana Radhakrishnan  <ramana.r@gmail.com>
3291         * Make-lang.in (LTO_EXE): Link with all 
3292         BACKENDLIBS and not only GMPLIBS
3294 2009-01-28  H.J. Lu  <hongjiu.lu@intel.com>
3296         PR bootstrap/38992
3297         * lto-elf.c: Include gelf.h instead of libelf.h.
3298         (lto_elf_file_close): Replace elfx_update_shstrndx with
3299         gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3300         gelf_update_ehdr.
3302 2009-01-28  H.J. Lu  <hongjiu.lu@intel.com>
3304         PR middle-end/38996
3305         * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3307 2009-01-26  Diego Novillo  <dnovillo@google.com>
3309         * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3311 2009-01-26  Diego Novillo  <dnovillo@google.com>
3313         * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3314         and rename into gimple_types_compatible_p.
3316 2009-01-12  Rafael Avila de Espindola  <espindola@google.com>
3318         * lto-lang.c (lang_hooks): Remove the const qualifier.
3320 2009-01-06  Diego Novillo  <dnovillo@google.com>
3322         * ltrans-driver: Mark 'all' target as phony.
3324 2008-12-31  Diego Novillo  <dnovillo@google.com>
3326         * ltrans-driver: Execute a NOP action for target 'all'.
3328 2008-12-19  Diego Novillo  <dnovillo@google.com>
3330         * lto.c (lto_1_to_1_map): Tidy.
3332 2008-12-19  Diego Novillo  <dnovillo@google.com>
3334         * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3335         be opened, show its name.
3336         * ltrans-driver: If $verbose is set, do not use parallelism.
3338 2008-12-17  Rafael Avila de Espindola  <espindola@google.com>
3340         * lto.c (lto_fixup_function): New.
3341         (lto_fixup_tree): Call lto_fixup_function.
3343 2008-12-14  Doug Kwan  <dougkwan@google.com>
3345         * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3346         variables if there is no function.
3348 2008-12-10  Simon Baldwin  <simonb@google.com>
3350         * ltrans-driver: Always run make in silent mode, to avoid make's
3351         trace on stdout interfering with lto-wrapper output.
3353 2008-12-10  Doug Kwan  <dougkwan@google.com>
3355         * lto.c (lto_add_inline_clones): Do not force master clones of
3356         inlined functions already in SET to be static inline.
3358 2008-12-04  Doug Kwan  <dougkwan@google.com>
3360         * lto.c (globalize_context_t): New type to store states in
3361         globalization of cross-file statics.
3362         (globalize_cross_file_statics): New.
3363         (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3364         static decls that need to be fixed up.
3365         (lto_scan_statics_in_cgraph_node): Change call interface to use
3366         a globalize_context_t CONTEXT for all states used.
3367         (lto_scan_statics_in_remaining_global_vars): New.
3368         (lto_promote_cross_file_statics): Use new call interface of
3369         LTO_SCAN_STATICS_IN_CGRAPH_NODE.  Handle remaining externally
3370         visible vars in the last set.
3372 2008-12-03  Diego Novillo  <dnovillo@google.com>
3374         * lto.c (lto_fixup_tree): Do not emit an error when
3375         PREVAILING throw but T doesn't.
3377 2008-12-02  Doug Kwan  <dougkwan@google.com>
3379         * lto.c (lto_scan_statics_in_ref_table): New function factored out
3380         from code in ...
3381         (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3382         variables and functions.
3383         (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3384         and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3386 2008-11-29  Diego Novillo  <dnovillo@google.com>
3388         * lto.c: Include timevar.h.
3389         (lto_materialize_function): Tidy.  Add comments.
3390         (lto_wpa_write_files): Tidy.
3391         (lto_execute_ltrans): Tidy.
3392         (lto_main): Add local variable LTO_TIMER.  Initialize it
3393         to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3394         Start and stop the timer.
3395         Tidy comments.
3396         * Make-lang.in (lto.o): Add dependency on timevar.h.
3397         * ltrans-driver: React to -v and -save-temps.
3398         Use simple heuristic to determine how much parallelism to
3399         use when executing make.
3401 2008-11-12  Doug Kwan  <dougkwan@google.com>
3403         * lto.c (lto_bitmap_obstack): Remove var.
3404         (lto_materialize_function): Do nothing instead of marking function
3405         body in file if flag_wpa is true.
3406         (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3407         (lto_scan_statics_in_cgraph_node): New function.
3408         (lto_promote_cross_file_statics): Same.
3409         (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3410         Use bitmap functions in lto-utils.c.  Remove unsued label OUT.
3411         * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3413 2008-11-09  Diego Novillo  <dnovillo@google.com>
3415         * lto/lto.c (lto_fixup_tree): Change error message locus
3416         information to include location of mismatching
3417         declaration.
3418         Use TREE_NO_WARNING to avoid repeated messages.
3419         (lto_main): If lto_fixup_decls emitted any errors, exit.
3420         * lto/lto-lang.c: Don't include libfuncs.h and except.h
3421         (lto_init_options): Don't enable exceptions by default.
3422         (lto_eh_runtime_type): Move to lto-function-in.c
3423         (lto_init_eh): Likewise.
3424         (lto_init): Don't call lto_init_eh.
3425         * lto/Make-lang.in (lto-lang.o): Remove dependency on
3426         libfuncs.h and except.h.
3428 2008-10-30  Diego Novillo  <dnovillo@google.com>
3430         * lto.c (lto_read_decls): Declare debug_main only if
3431         LTO_STREAM_DEBUGGING is enabled.
3433 2008-10-30  Simon Baldwin  <simonb@google.com>
3435         * lto.c (lto_wpa_write_files): Create intermediate files with
3436         make_cwd_temp_file().
3437         (lto_maybe_unlink): New.  Delete intermediate WPA files unless
3438         WPA_SAVE_LTRANS is set.
3439         (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3440         * ltrans-driver: Do not strip directory from output files.
3442 2008-10-29  Doug Kwan  <dougkwan@google.com>
3444         * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3445         DECL.
3446         * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3447         (lto/lto-symtab.o): Remove rule.
3448         * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3449         (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3450         (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3451         Remove macros.
3452         lto-symtab.c (File): Move up one level.
3453         lto-lang.c (cgraph.h): Remove include.
3454         (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3455         input_cgraph): Move to lto-cgraph.c in gcc directory above.
3456         (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3458 2008-10-24 Rafael Espindola  <espindola@google.com>
3460         * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3461         non prevailing weak symbols.
3463 2008-10-24 Rafael Espindola  <espindola@google.com>
3465         * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3467 2008-10-24 Rafael Espindola  <espindola@google.com>
3469         * lto-lang.c (input_node): Avoid casts from pointers to ints of
3470         different types.
3472 2008-10-23  Simon Baldwin  <simonb@google.com>
3474         * lto-lang.c (input_node): Save the node reference, rather than the
3475         node pointer, in node->inlined_to.
3476         (input_cgraph_1): Convert node references into node pointers.
3478 2008-10-22  Diego Novillo  <dnovillo@google.com>
3479             Rafael Espindola  <espindola@google.com>
3481         * lto.c (lto_resolution_read): Tidy.
3482         * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3483         abort if RET is NULL.
3485 2008-10-22  Doug Kwan  <dougkwan@google.com>
3487         * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3488         exceptions flag is given.
3489         * lto-lang.c: (lto_init_options) Set default exceptions flag.
3490         (lto_init_eh): Remove exceptions flag initialization.
3491         (lto_init): Only call lto_init_eh if exceptions flag is set. 
3493 2008-10-21  Diego Novillo  <dnovillo@google.com>
3495         * lto.c: Tidy some formatting.
3496         * lto.h: Likewise.
3498 2008-10-21  Simon Baldwin  <simonb@google.com>
3500         * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3501         them is NULL (but not the other).
3503 2008-10-17  Diego Novillo  <dnovillo@google.com>
3505         * ltrans-driver: Divert output from make to a temporary file.
3506         Show it if the call to make failed.
3508 2008-10-15  Diego Novillo  <dnovillo@google.com>
3510         * lto.c (lto_wpa_write_files): Reformat do-while loop.
3511         Do not print TEMP_FILENAME
3512         * ltrans-driver: Call make with -s.
3514 2008-10-15  Diego Novillo  <dnovillo@google.com>
3516         * lto-symtab.c (lto_symtab_merge_decl): Do not force
3517         TREE_STATIC on global symbols.
3519 2008-10-14  Ollie Wild  <aaw@google.com>
3521         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3522         (LTRANS_DRIVER_EXE): Add.
3523         (lto.all.cross): Add LTRANS_DRIVER_EXE.
3524         (lto.all.encap): Add LTRANS_DRIVER_EXE.
3525         (lto.install.common): Remove ltrans-driver.
3526         (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3527         (LTRANS_DRIVER_EXE): New build rule.
3528         * config-lang.in (compilers): Add ltrans-driver.
3530 2008-10-14  Diego Novillo  <dnovillo@google.com>
3532         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3533         of program name.
3535 2008-10-13  Ollie Wild  <aaw@google.com>
3537         * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3538         * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3539         * ltrans-driver (LTRANS_FLAGS): Remove.
3541 2008-10-08  Doug Kwan  <dougkwan@google.com>
3543         * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3544         Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3545         and TREE_BINFO.  Also move code handling FUNCTION_DECL and VAR_DECL
3546         from lto_fixup_state to here.
3547         (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3548         just a free-list.  Fix up types also.  Move decl merging code to
3549         lto_fixup_tree.
3550         (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3551         object.
3552         (lto_fixup_decls): Use another pointer set to avoid multiple
3553         walking of nodes except for DECLs to be replaced.  Pass an
3554         lto_fixup_data_t object to tree-walker.
3556 2008-10-08 Rafael Espindola  <espindola@google.com>
3558         * lto-symtab.c (lto_symtab_set_resolution): New.
3559         (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3560         lto_symtab_get_resolution.
3561         (lto_symtab_prevailing_decl): Return decl for non public decls.
3562         (lto_symtab_get_resolution): New.
3563         * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3565 2008-10-06 Rafael Espindola  <espindola@google.com>
3567         * lto-lang.c: Include cgraph.h.
3568         (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3569         input_cgraph): Moved from lto-cgraph.c.
3570         (LANG_HOOKS_INPUT_CGRAPH): New.
3572 2008-10-03 Rafael Espindola  <espindola@google.com>
3574         * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3576 2008-10-03 Rafael Espindola  <espindola@google.com>
3578         * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3579         (lto_symtab_merge_decl): Update  LTO_IDENTIFIER_DECL the reflect the
3580         prevailing definition. Don't mark TREE_NOTHROW differences.
3581         * lto.c (lto_fixup_tree): New.
3582         (lto_fixup_state): New.
3583         (lto_fixup_state_aux): New.
3584         (free_decl): New.
3585         (lto_fixup_decls): New.
3586         (lto_main): Call lto_fixup_decls.
3588 2008-10-02  Ollie Wild  <aaw@google.com>
3590         * lang.opt (fltrans): Moved from common.opt.  Remove RejectNegative
3591         and Init.
3592         (fwpa): Moved from common.opt.  Remove RejectNegative and Init.
3593         * lto-lang.c (lto_post_options): Add validation and fixups for
3594         -fltrans and -fwpa.
3596 2008-10-02 Rafael Espindola  <espindola@google.com>
3598         * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3599         lto_symtab_merge_decl): Return void.
3600         (lto_symtab_prevailing_decl): New.
3602 2008-09-30 Rafael Espindola  <espindola@google.com>
3604         * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3605         defined symbols.
3606         (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3607         (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3608         Check for already defined symbols.
3609         * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3610         (LTO_IDENTIFIER_RESOLUTION): Remove.
3611         (LTO_DECL_RESOLUTION): New.
3613 2008-09-30 Rafael Espindola  <espindola@google.com>
3615         * lto.c (lto_read_decls): Use new input_tree signature.
3617 2008-09-26  Doug Kwan  <dougkwan@google.com>
3619         * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3620         bodies affected by exception attribute merging of DECLs.
3621         * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3622         merging. 
3624 2008-09-25  Rafael Espindola  <espindola@google.com>
3626         * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3627         (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3628         * lto-symtab.c (lto_symtab_compatible): New.
3629         (lto_symtab_overwrite_decl): New.
3630         (lto_symtab_merge_decl): Refactor to use the above functions
3631         and the resolution from lang_identifier.
3632         * lto-tree.h: Include plugin-api.h.
3633         (lang_identifier): Add resolution.
3634         (LTO_IDENTIFIER_RESOLUTION): New.
3636 2008-09-25  Ollie Wild  <aaw@google.com>
3638         * lang.opt (fltrans-output-list=): New option.
3639         * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3641 2008-09-25 Rafael Espindola  <espindola@google.com>
3643         * lto.c (lto_resolution_read): Initialize ret;
3645 2008-09-24  Ollie Wild  <aaw@google.com>
3647         * lto.c (sys/mman.h): Move include.
3648         (lto_wpa_write_files): Return a list of written files.
3649         (lto_execute_ltrans): New function.
3650         (lto_main): Call lto_execute_ltrans.
3651         (ltrans-driver): New file.
3652         * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3653         (DEAULT_LTRANS_DRIVER_LEN): New macro.
3654         (lto_init_options): Initialize ltrans_driver.
3655         (lto_handle_option): Fix incorrect default output value.
3656         * lang.opt (fltrans-driver=): New option.
3657         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3658         (lto.install-common): Add lto/ltrans-driver.
3660 2008-09-24 Rafael Espindola  <espindola@google.com>
3662         * Make-lang.in (LTO_OBJS): Add lto/common.o.
3663         (lto/lto.o): Depend on lto/common.h.
3664         (lto/common.o): New.
3665         * lang.opt (resolution): New.
3666         * lto-lang.c (resolution_file_name): New.
3667         (lto_handle_option): Handle OPT_resolution.
3668         * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3669         (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3670         pass it to lto_symtab_merge_decl.
3671         * lto.c: Include common.h.
3672         (lto_read_decls): Add resolutions and resolutions_size arguments.
3673         Initialize data_in.globals_resolution and
3674         data_in.globals_resolution_size.
3675         (index_and_symbol_resolution): New.
3676         (lto_resolution_read): New.
3677         (lto_file_read): Add argument resolution_file.
3678         Read resolution.
3679         * lto.h (resolution_file_name): New.
3681 2008-09-23 Rafael Espindola  <espindola@google.com>
3683         * common.c: Update description.
3684         * common.h: Update description.
3686 2008-09-23 Rafael Espindola  <espindola@google.com>
3688         * common.c: Moved from lto-plugin.
3689         * common.h: Moved from lto-plugin.
3691 2008-09-22  Doug Kwan  <dougkwan@google.com>
3693         * lto.c (VEC(bitmap,heap)): Declare.
3694         (lto_materialize_function): Handle WAP mode specially.
3695         (lto_add_inline_clones): New.
3696         (lto_add_all_inlinees): Changle algorithm and to use bitmaps.  Also
3697         return a bitmap of inlined decls.
3698         (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3699         (lto_main): Call reset_inline_failed to reset inlining states.
3700         Check call-graph after WPA inlining.
3701         * lto-lang.c (lto_init): Do not clear flag_generate_lto
3702         unconditionally.
3704 2008-09-19  Doug Kwan  <dougkwan@google.com>
3706         lto.c (lto_main): Remove unsued wrapper code.
3707         lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3709 2008-09-19  Rafael Espindola  <espindola@google.com>
3711         * lto-symtab.c: Include lto-tree-in.h.
3712         * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3713         * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3714         * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3716 2008-09-17  Paolo Bonzini  <bonzini@gnu.org>
3717             Rafael Avila de Espindola  <espindola@google.com>
3719         * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3720         COMPOUND_LITERAL_EXPR_DECL): Remove.
3721         (emit_local_var): Remove.
3722         (lto_expand_expr): Remove.
3723         (lto_staticp): Remove.
3724         (LANG_HOOKS_EXPAND_EXPR): Remove.
3725         (LANG_HOOKS_STATICP): Remove.
3727 2008-09-11  Diego Novillo  <dnovillo@google.com>
3729         * lto-lang.c: Include except.h and libfuncs.h.
3730         (lto_init_eh): New.
3731         (lto_init): Call it.
3732         Set flag_generate_lto to 0.
3733         * Make-lang.in (lto-lang.o): Add dependency on except.h
3734         and libfuncs.h.
3736 2008-09-09  Bill Maddox  <maddox@google.com>
3738         * lto-lang.c: Include header file expr.h.
3739         (COMPOUND_LITERAL_EXPR_DECL_STMT,
3740         COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3741         (emit_local_var):  Copied from c-semantics.c.
3742         (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3743         and c_staticp in c-common.c.
3744         (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP):  Redefined.
3746 2008-09-08  Diego Novillo  <dnovillo@google.com>
3748         * lto-lang.c (lto_global_bindings_p): Return 1 during
3749         IPA passes.
3751 2008-09-07  Diego Novillo  <dnovillo@google.com>
3753         * lto.c: Tidy formatting.
3755 2008-08-04  Bill Maddox  <maddox@google.com>
3757         * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3758         
3759 2008-09-03  Doug Kwan  <dougkwan@google.com>
3761         lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3762         CIF_OK instead of NULL.
3764 2008-09-02  Diego Novillo  <dnovillo@google.com>
3765             Simon Baldwin  <simonb@google.com>
3767         * lto-lang.c (lto_type_for_size): Rewrite.  Adapt from
3768         c_common_type_for_size.
3769         (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3770         (lto_init): Call linemap_add.
3771         (signed_and_unsigned_types): Remove.
3773 2008-08-29  Diego Novillo  <dnovillo@google.com>
3775         * lto-lang.c (handle_noreturn_attribute): New local function.
3776         (handle_const_attribute): New local function.
3777         (handle_malloc_attribute): New local function.
3778         (handle_pure_attribute): New local function.
3779         (handle_novops_attribute): New local function.
3780         (handle_nonnull_attribute): New local function.
3781         (handle_nothrow_attribute): New local function.
3782         (handle_sentinel_attribute): New local function.
3783         (handle_type_generic_attribute): New local function.
3784         (handle_format_attribute): New local function.
3785         (handle_format_arg_attribute): New local function.
3786         (lto_attribute_table): Declare.
3787         (lto_format_attribute_table): Declare.
3788         (lto_init_attributes): New local function.
3789         (lto_define_builtins): Call it.
3790         Call targetm.init_builtins and build_common_builtin_nodes.
3791         (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3792         (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3794 2008-08-28  Diego Novillo  <dnovillo@google.com>
3796         * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3797         $(GIMPLE_H).
3798         (lto-symtab.o): Add dependency on $(GIMPLE_H).
3799         * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3800         * lto-symtab.c: Include gimple.h.
3801         * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3802         TREE_CHAIN.
3804 2008-08-27  Doug Kwan  <dougkwan@google.com>
3806         * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3807         gt-lto-lto.h): New includes.
3808         (lto_materialize_function): Do not read in function body in WPA mode.
3809         Format a line to fit in 80 columns.
3810         (lto_cgraph_node_sets): New garbage collected variable.
3811         (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3812         New functions.
3813         (lto_main): Initialize bitmap obstack.  Add code to handle WPA mode.
3814         * Make-lang.in (LTO_H): Replace filename lto-section-in.h with 
3815         variable LTO_SECTION_IN_H.
3816         (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3817         pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3818         with variable LTO_SECTION_IN_H.
3819         * config-lang.in (gtfiles): Add lto/lto.c.
3820         * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3821         merged DECL_RESULT correctly.
3823 2008-08-26  Bill Maddox  <maddox@google.com>
3825         * lto-lang.c  Include tree-gimple.h.
3826         (lto_mark_addressable): Call mark_addressable rather than
3827         asserting.
3828         (lto_post_options): Suppress debug info generation.
3829         * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3830         
3831 2008-08-25  Bill Maddox <maddox@google.com>
3833         * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3834         assertion and leave an explanatory comment in its place.
3835         
3836 2008-08-21  Doug Kwan  <dougkwan@google.com>
3838         * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3839         of common nodes instead of computing locallly.
3840         (lto_read_in_decl_state): New.
3841         (lto_read_decls): Change code for udpate in struct lto_decl_header.
3842         Read global and per-function in-decl states.
3843         * Make-lang.in (LTO_H): Update dependency.
3844         (lto/lto.o): Same.
3845         (lto-symtab.c): Merge   (revision 139039)
3846         * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3848 2008-08-21  Rafael Espindola  <espindola@google.com>
3850         * config-lang.in (target_libs): New.
3852 2008-08-20  Bill Maddox  <maddox@google.com>
3854         * lto.c (current_lto_file): Remove GTY marker from static
3855         variable.  Remove include of file gt-lto-lto.h.
3856         * Make-lang.in: Remove dependency of lto/lto.o on
3857         gt-lto-lto.h.
3858         * lto-elf.c (lto_file_close): Removed.
3859         (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3860         allocate lto_elf_file object.
3861         (lto_elf_file_close): Free lto_elf_file object after close.
3862         * lto.h (struct lto_file_struct): Remove GTY marker.
3863         * config-lang.in: Remove lto/lto.h and lto/lto.c from
3864         gtfiles.
3865         
3866 2008-08-20  Bill Maddox  <maddox@google.com>
3868         * lto.c (lto_read_decls): Provide dummy argument to input_tree
3869         to conform to its new signature.
3870         * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3871         on discarded node here, now called in global_vector_fixup.
3872         
3873 2008-08-09  Bill Maddox  <maddox@google.com>
3875         * lto.c (preload_common_nodes): Verify that fileptr_type_node
3876         has not been set to a front-end-specific value.
3877         
3878 2008-08-05  Doug Kwan  <dougkwan@google.com>
3879         
3880         * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3881         build breakage.
3883 2008-07-30  Bill Maddox  <maddox@google.com>
3885         * lto.c (lto_materialize_function): Call lto_original_decl_name.
3886         Remove obsolete comments.
3887         (lto_read_decls): Remove initialization of deleted field data_in.global.
3888         Tidy up comments.
3889         (lto_main): Remove redundant initialization of section_hash_table.
3890         * lto-elf.c: Removed obsolete comments.
3891         * lto.h: Tidy up comments.
3892         * lto-symtab.c (lto_least_common_multiple): New function.
3893         (lto_symtab_merge_decl): Merge variable alignments in some cases.
3894         Tidy up comments.
3896 2008-07-25  Diego Novillo  <dnovillo@google.com>
3897             Bill Maddox  <maddox@google.com>
3899         * lto.c: Re-order include files.
3900         Include lto-section-out.h.
3901         (preload_common_nodes): Add debugging output.
3902         Add new local INDEX_TABLE.
3903         Call preload_common_node.
3904         * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3906 2008-07-13  Bill Maddox  <maddox@google.com>
3908         * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3909         unwanted scaling during pointer addition.
3911 2008-07-11  Bill Maddox  <maddox@google.com>
3912             Diego Novillo  <dnovillo@google.com>
3914         * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3915         Make code const-correct.
3916         (lto_file_read): Fix C++ compatibility warnings.
3917         (lto_read_section_data):  Fix C++ compatibility warnings.
3918         (lto_get_section_data): Use CONST_CAST to avoid warning when
3919         const pointer passed to free.
3920         * lto-elf.c (lto_elf_build_section_table): Fix C++
3921         compatibility warnings.
3922         (lto_elf_append_data):  Fix C++ compatibility warnings.  Use CONST_CAST
3923         to avoid warning assigning const pointer to d_buf field of Elf_Data.
3924         (lto_get_current_out_file):  Fix C++ compatibility warnings.
3926 2008-07-11  Diego Novillo  <dnovillo@google.com>
3928         * Make-lang.in (lto-warn): Define.
3930 2008-07-03  Simon Baldwin  <simonb@google.com>
3932         * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3933         LTO_STREAM_DEBUGGING.
3935 2008-06-27  Ollie Wild  <aaw@google.com>
3937         * lto-elf.c (lto-section-out.h): New include.
3938         (struct lto_elf_file): Remove bits member.  Add scn, shstrtab_stream,
3939         and data members.
3940         (cached_file_attrs): New static variable.
3941         (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3942         Use cached_file_attrs for checking bits.
3943         (lto_elf_build_section_table): Remove elf_file argument from
3944         lto_elf_get_shdr and lto_elf_free_shdr calls.
3945         (DEFINE_INIT_SHDR): New macro.
3946         (init_shdr32, init_shdr64): New functions defined via the
3947         DEFINE_INIT_SHDR macro.
3948         (lto_elf_begin_section_with_type): New function.
3949         (lto_elf_begin_section): New function.
3950         (lto_elf_append_data): New function.
3951         (lto_elf_end_section): New function.
3952         (DEFINE_VALIDATE_EHDR): New macro.
3953         (validate_ehdr32, validate_ehdr64): New functions defined via the
3954         DEFINE_VALIDATE_EHDR macro.
3955         (validate_file): New function.
3956         (DEFINE_INIT_EHDR): New macro.
3957         (init_ehdr32, init_ehdr64): New functions defined via the
3958         DEFINE_INIT_EHDR macro.
3959         (init_ehdr): New function.
3960         (lto_elf_file_open): Add support for writable files.  Move some
3961         validation logic to validate_file.
3962         (lto_elf_file_close): Add support for writable files.  Write file data
3963         and free data blocks.
3964         (current_out_file): New static variable.
3965         (lto_set_current_out_file): New function.
3966         (lto_get_current_out_file): New function.
3967         * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3968         Add temporary initialization for testing ELF serialization.
3969         * lto.h (lto-section-out.h): New include.
3970         (struct lto_file_struct): Slight modification to comment.
3971         (lto_elf_file_open): Add writable parameter.
3972         (lto_elf_begin_section): New function declaration.
3973         (lto_elf_append_data): New function declaration.
3974         (lto_elf_end_section): New function declaration.
3975         (lto_set_current_out_file, lto_get_current_out_file): New function
3976         declarations.
3977         * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3978         (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3979         (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3980         * Make-lang.in (LTO_H): Add lto-section-out.h.
3982 2008-06-12  Ollie Wild  <aaw@google.com>
3984         * lto.h (struct lto_file_vtable_struct): Remove.
3985         (struct lto_file_struct): Remove vtable member.
3986         * lto-elf.c (lto_file_init): Remove vtable argument.
3987         (lto_elf_map_optional_lto_section): Remove.
3988         (lto_elf_unmap_section): Remove.
3989         (lto_elf_file_vtable): Remove.
3990         (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3991         lto_file_init call.
3992         (lto_elf_find_section_data): Remove.
3994 2008-06-11  Ollie Wild  <aaw@google.com>
3996         * lto.c (lto_file_read): Add const qualifier to data variable.
3998 2008-06-11  Diego Novillo  <dnovillo@google.com>
4000         Merge from lto-streamber sub-branch.
4002         2008-06-04  Ollie Wild  <aaw@google.com>
4004                 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4005                 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4007         2008-05-28  Bill Maddox  <maddox@google.com>
4009                 Replace the DWARF reader in the LTO front-end.
4011                 * lto.c: Include lto-tree-in.h, lto-tags.h.
4012                 (enum DWARF2_class, DW_cl_constant, struct
4013                 DWARF2_form_data, struct lto_context,
4014                 lto_fd_init, lto_info_fd_init,
4015                 lto_abbrev_fd_init, lto_info_fd_close,
4016                 lto_file_init, lto_file_close,
4017                 lto_file_corrupt_error, lto_abi_mismatch_error,
4018                 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4019                 lto_read_uleb128, lto_read_sleb128,
4020                 lto_read_initial_length, lto_abbrev_read_attrs,
4021                 lto_abbrev_read, lto_abbrev_read_lookup,
4022                 lto_read_section_offset,
4023                 lto_read_comp_unit_header, find_cu_for_offset,
4024                 lto_get_file_name,
4025                 lto_resolve_reference,lto_read_form,
4026                 attribute_value_as_int,
4027                 make_signed_host_wide_int,
4028                 attribute_value_as_constant, lto_cache_hash,
4029                 lto_cache_eq, lto_cache_store_DIE,
4030                 lto_cache_lookup_DIE, lto_find_integral_type,
4031                 lto_find_integral_type_1,
4032                 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4033                 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4034                 lto_unsupported_attr_error, lto_get_identifier,
4035                 lto_read_referenced_type_DIE,
4036                 lto_read_compile_unit_DIE,
4037                 lto_read_array_type_DIE,
4038                 lto_read_structure_union_class_type_DIE,
4039                 lto_read_enumerator_DIE,
4040                 lto_read_enumeration_type_DIE,
4041                 lto_read_only_for_child_DIEs,
4042                 lto_read_only_for_child_DIEs,
4043                 lto_read_member_DIE, lto_read_abbrev,
4044                 lto_read_variable_formal_parameter_constant_DIE,
4045                 lto_get_body): Removed.
4046                 (preload_common_nodes): New function.
4047                 (lto_read_decls): Convert for new global streamer.
4048                 (lto_materialze_file_data,
4049                 lto_read_subroutine_type_subprogram_die,
4050                 lto_read_unspecified_parameters_DIE,
4051                 lto_read_typedef_DIE,
4052                 lto_read_pointer_reference_type_DIE,
4053                 lto_read_subrange_type_DIE,
4054                 lto_read_base_type_DIE,
4055                 lto_read_const_volatile_restrict_type_DIE,
4056                 lto_read_namespace_DIE,
4057                 lto_read_unspecified_type_DIE, lto_read_DIE,
4058                 lto_read_child_DIEs, lto_collect_child_DIEs):
4059                 Removed.
4060                 (lto_info_read, lto_set_cu_context): Removed.
4061                 (lto_file_read): Convert for new global streamer.
4062                 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4063                 lto_resolve_var_ref, lto_resolve_fn_ref,
4064                 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4065                 lto_resolve_namespacedecl_ref): Removed.
4066                 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4067                 * lto-tree.h (lto_symtab_merge_var,
4068                 lto_symtab_mergee_fun): Declare here.
4069                 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4070                 (lto_elf_file_open): Removed code to read DWARF debug sections.
4071                 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4072                 DWARF2_CompUnit, lto_die_ptr,
4073                 lto_die_cache_entry, lto_fd, lto_info_fd,
4074                 lto_abbrev_fd): Removed.
4075                 (lto_file): Removed debug_info and debug_abbrev fields.
4076                 (lto_ref): Removed.
4077                 (lto_file_init, lto_file_close,
4078                 lto_resolve_type_ref, lto_resolve_var_ref,
4079                 lto_resolve_fn_ref, lto_resolve_field_ref,
4080                 lto_resolve_typedecl_ref,
4081                 lto_resolve_namespacedecl_ref,
4082                 lto_get_file_name): Removed declarations.
4083                 (lto_symtab_merge_var, lto_symtab_merge_fn):
4084                 Declarations moved to lto-tree.h.
4085                 * lto-symtab.c (lto_compatible_attributes_p):
4086                 Lobotomize this, as it barfs on "Hello, world!".
4087                 * lto-section-out.c: Include lto-tree-out.h.
4088                 (lto_hash_global_slot_node,
4089                 lto_eq_global_slot_node, preload_common_nodes,
4090                 write_global_stream, write_global_references):
4091                 New functions.
4092                 (produce_asm_for_decls): Convert for new global streamer.
4093                 * lto-section-out.h (lto_hash_global_slot_node,
4094                 lto_eq_global_slot_node): Declare.
4096 2008-06-07  Kenneth Zadeck <zadeck@naturalbridge.com>
4097             Jan Hubicka  <jh@suse.cz>
4098         
4099         * lto.c (sys/mman.h, tree-pass.h): New includes.
4100         (lto_materialize_constructors_and_inits,
4101         lto_materialize_function): Keeps length of section.
4102         (lto_materialize_cgraph): Removed.
4103         (lto_read_decls): Initialize fd field.
4104         (lto_file_read): Different return type and removed much code to
4105         lto_main.
4106         (page_mask): New variable.
4107         (lto_read_section_data, get_section_data, free_section_data): New
4108         functions.
4109         (lto_main): Now calls pass manager, sets the hooks so that the ipa
4110         passes can get the section data. 
4111         
4112 2008-05-27  Kenneth Zadeck <zadeck@naturalbridge.com>
4114         * lto.h (lto_read_decls): Made local.
4115         (lto_input_function_body, lto_input_constructors_and_inits, 
4116         lto_input_cgraph): Declarations moved to lto-section-in.h.
4117         * lto-section-in.c: Moved to .. .
4118         * lto-cgraph-in.c: Ditto.
4119         * lto-section-in.h: Ditto.
4120         * lto-function-in.c: Ditto.
4121         * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4122         (lto_insert_block): Removed.
4123         (LANG_HOOKS_INSERT_BLOCK): Removed.
4124         * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4125         lto-section-in.o): Rules moved to lto/Makefile.in.
4126         
4128 2008-05-16  Ollie Wild  <aaw@google.com>
4130         * lto-lang.c (tree-inline.h): Include.
4131         (lto_post_options): New function.
4132         (LANG_HOOKS_POST_OPTIONS): Define.
4133         * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4134         * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4136 2008-05-13  Diego Novillo  <dnovillo@google.com>
4138         * lto-function-in.c (input_ssa_names): Call
4139         make_ssa_name_fn instead of make_ssa_name.
4141 2008-05-12  Diego Novillo  <dnovillo@google.com>
4143         * lto-cgraph-in.c (overwrite_node): Update references to
4144         inline summary fields.
4145         * lto-function-in.c (input_expr_operand): Do not handle
4146         STRUCT_FIELD_TAG.
4148 2008-05-09  Ollie Wild  <aaw@google.com>
4150         * lang.opt: New file.
4151         * lto-lang.c (lto_init_options): New function.
4152         (lto_handle_option): New function.
4153         (lto_init): Move initialization of flag_unit_at_a_time to
4154         lto_init_options.
4155         (LANG_HOOKS_INIT_OPTIONS): Define.
4156         (LANG_HOOKS_HANDLE_OPTION): Define.
4158 2008-04-29  Ollie Wild  <aaw@google.com>
4160         * lto.c (lto_read_namespace_DIE): New function.
4161         (lto_read_DIE): Add lto_read_namespace_DIE callback.  Cache
4162         NAMESPACE_DECL DIE's.
4163         (lto_resolve_namespacedecl_ref): New function.
4164         * lto.h (lto_resolve_namespacedecl_ref): New function.
4165         * lto-section-in.c (lto_read_decls): Read namespace declarations.
4166         * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4167         and num_namespace_decls.
4168         * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4169         * lto-lang.c (lto_init_ts): New function.
4170         (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4172 2008-04-16  Ollie Wild  <aaw@google.com>
4174         * lto-function-in.c (input_type_ref): Updated function description.
4176 2008-04-16  Ollie Wild  <aaw@google.com>
4178         * lto-function-in.c (input_type_ref_1): New function.
4179         (input_type_ref): Split into two functions.
4180         (input_function): Add support for type contexts.
4182 2008-04-16  Ollie Wild  <aaw@google.com>
4184         * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4185         section name
4187 2008-04-16  Ollie Wild  <aaw@google.com>
4189         * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4190         list of supported languages.
4192 2008-03-25  Kenneth Zadeck <zadeck@naturalbridge.com>
4194         Merge with mainline @133491.
4196 2008-03-05  Kenneth Zadeck <zadeck@naturalbridge.com>
4197             Jan Hubicka  <jh@suse.cz>
4199         * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4200         fd->unmaterialized_fndecls.
4201         (lto_get_file_name, lto_materialize_cgraph): New function.
4202         (lto_materialize_constructors_and_inits,
4203         lto_materialize_function): Read info directly from elf file.
4204         (lto_file_read): Made local and initialize dictionary so that
4205         other lto sections can be read without reprocessing the elf file.
4206         (lto_main): Read all functions after all files have been processed
4207         for their types, globals and cgraph.  
4208         * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4209         dependencies.
4210         * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4211         (hash_name, eq_name, lto_elf_build_section_table): New functions.
4212         (lto_elf_read_symtab): Removed function.
4213         (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4214         * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4215         (lto_file_read): Made local.
4216         (lto_get_file_name, lto_elf_build_section_table,
4217         lto_input_cgraph): 
4218         New function.
4219         * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4220         New functions.
4221         (lto_read_decls): Get the file name.
4222         * lto-cgraph-in.c: New file.
4223         * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4224         (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4225         (input_labels): Fixed latent sizeof issue.
4226         (input_function): Build stmt array to set call sites into cgraph
4227         edges.
4228         (lto_read_body): Reset cfun->curr_properties.
4229         * lto_section_in.h (lto_section_slot): New structure.
4230         (section_hash_table.lto_file_decl_data): New field.
4232         
4233 2008-02-09  Kenneth Zadeck <zadeck@naturalbridge.com>
4235         * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4236         reconstruct static initializers.
4237         (lto_get_body, lto_materialize_function): Add lto_section_type as
4238         a parameter.
4239         (lto_materialize_constructors_and_inits,
4240         lto_materialize_file_data): New function.
4241         (lto_materialize_function,
4242         lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4243         unmap_section and map_fn_body to map_section.
4244         (lto_set_cu_context): Process functions and static inits
4245         differently.
4246         * Make-lang.in (LTO_H, lto/lto-function-in.o,
4247         lto/lto-section-in.o): Update dependencies.
4248         * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4249         lto_section_type parameter.
4250         (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4251         * lto.h (lto_file_vtable_struct): Removed two of the fields and 
4252         renamed the other two so that there is only one map function and
4253         one unmap function and each takes a section type parameter.
4254         (lto_read_function_body): Renamed to lto_input_function_body and
4255         added file_data parameter.
4256         (lto_read_var_init): Removed.
4257         (lto_input_constructors_and_inits): New function.
4258         * lto-section-in.c (lto_read_decls): New function.
4259         * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4260         var_decls, type_decls, types to lto_file_decl_data.
4261         (input_type_ref, input_expr_operand, lto_read_body): Get
4262         field_decls, fn_decls, var_decls, type_decls, types from different
4263         structure.
4264         (input_globals, input_constructor, lto_read_var_init): Removed.
4265         (input_constructors_or_inits): New function.
4266         (lto_read_function_body, lto_input_constructors_and_inits):
4267         Renamed to lto_input_function_body and takes file_data parameter.
4268         * lto-section-in.h (lto_file_decl_data): New structure.
4269         
4270 2008-01-28  Kenneth Zadeck <zadeck@naturalbridge.com>
4272         * lto-function-in.c (input_globals.c): Changed input type to
4273         lto_function_header.
4274         (input_bb): Removed code to deserialize the stmt number.
4275         (input_function): Renumber all stmts after they are input.
4276         (lto_read_body, lto_read_function_body, lto_read_var_init):
4277         Changed to used new header format and enum section_type.
4278         *lto-lang.c (success): Removed. 
4279         
4280 2008-01-28  Nathan Froyd  <froydnj@codesourcery.com>
4282         * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4283         (lto_elf_free_sym): Likewise.
4285         * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4286         (lto_elf_build_init): Likewise.
4288 2008-01-14  Kenneth Zadeck <zadeck@naturalbridge.com>
4290         * lto-read.c: Renamed to lto-function-in.c.
4291         (input_1_unsigned): Moved to lto-section-in.c and renamed
4292         lto_input_1_unsigned.
4293         (input_uleb128): Moved to lto-section-in.c and renamed
4294         lto_input_uleb128.
4295         (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4296         lto_input_widest_uint_uleb128.
4297         (input_sleb128): Moved to lto-section-in.c and renamed
4298         lto_input_sleb128.
4299         (input_integer): Moved to lto-section-in.c and renamed
4300         lto_input_integer.
4301         (debug_in_fun): Moved to lto-section-in.c and renamed
4302         lto_debug_in_fun.
4303         (input_block): Moved to lto-section-in.h and renamed
4304         lto_input_block.
4305         (input_expr_operand): Fixed to allow lists with more than one
4306         element.
4307         * lto-section-in.h: New file.
4308         * lto-section-in.c: New file with changes from above.
4309         * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4310         (lto-section-in.o): New rule.
4311         
4312 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
4314         * lto-read.c (input_expr_operand): Mark static and external
4315         VAR_DECLs as needed.
4317 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
4319         * lto-read.c (input_integer): Use the correct shift amount.
4321 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
4323         * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4324         (LANG_HOOKS_NAME): Define.
4326 2007-12-27  Nathan Froyd  <froydnj@codesourcery.com>
4328         * lto.c (lto_find_integral_type): Define as a macro.  Rename the
4329         original function to...
4330         (lto_find_integral_type_1): ...this.  Consult UNSIGNEDP if we
4331         don't have a base type.
4332         (lto_read_enumeration_type_DIE): Examine the values of the
4333         enumeration to determine whether we can use an unsigned type for
4334         the base type of the enumeration.
4336 2007-12-24  Nathan Froyd  <froydnj@codesourcery.com>
4338         * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4339         and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4341 2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>
4343         * lto-lang.c (lto_types_compatible_p): New function.
4344         (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4346 2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>
4347             Kenneth Zadeck <zadeck@naturalbridge.com>
4349         * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4350         (input_local_vars): Read in DECL_INITIAL and context for local
4351         statics that need to be put in unexpanded_vars_list.
4353 2007-12-21  Nathan Froyd  <froydnj@codesourcery.com>
4355         * lto-read.c (input_real): Use a separate null-terminated buffer
4356         for calling real_from_string.
4357         (input_expr_operand): If we take the address of a FUNCTION_DECL,
4358         tell cgraph that it's needed.
4360 2007-12-19  Doug Kwan  <dougkwan@google.com>
4362         * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4364 2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>
4366         * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4367         (lto_file_read): Reset the members of 'context' every time we read
4368         a toplevel DIE, with special attention to last_param_type.
4370 2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>
4372         * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4373         'declaration'.  Set the assembler name for non-public functions.
4375 2007-12-17  Kenneth Zadeck <zadeck@naturalbridge.com>
4377         * lto_read.c (data_in.unexpanded_indexes): New array.
4378         (input_local_var): Added code to read in unexpanded_var_list
4379         indexes for variables.  Only read in DECL_CHAIN field for
4380         parameters.
4381         (input_local_vars): Added code to rebuild unexpanded_var_list in
4382         order using unexpanded_indexes.
4383         (input_function): Added code to set DECL_CONTEXT for functions.
4385 2007-12-13  Doug Kwan  <dougkwan@google.com>
4387         * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4388         in pointer and reference types.
4390 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
4392         * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4393         RESULT_DECL.
4395 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
4397         * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4398         already read the DIE.
4399         (lto_get_body): New function, split out from...
4400         (lto_materialize_function): ...here.  Call it.
4401         (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4402         determine DECL_EXTERNAL.
4403         * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4404         FUNCTION_DECLs when necessary.  Use the type of the actual
4405         function definition if we are unable to easily merge types.  Ignore
4406         spurious DECL_MODE mismatches on VAR_DECLs.  Merge DECL_MODEs when
4407         necessary.
4409 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
4411         * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4413 2007-12-12  Bill Maddox  <maddox@google.com>
4415         Revert
4416         2007-12-07  Bill Maddox  <maddox@google.com>
4418         * lto.c (lto_str_fd_init): New function.
4419         (lto_str_fd_close): New function.
4420         (lto_file_init): Call lto_str_fd_init.
4421         (lto_file_close): Call lto_str_fd_close.
4422         (lto_str_read): New function. Read debug string table.
4423         (lto_str_lookup): New function. Get string for debug
4424         string table offset.
4425         (lto_read_form): Recognize DW_FORM_strp.
4426         (lto_file_read): Invoke lto_str_read.
4428         * lto-elf.c (lto_elf_file_open): Read raw section data
4429         for the .debug_str section, if present.
4431         * lto.h (struct lto_str_fd_struct): New struct.
4432         (struct lto_file_struct): Added new field DEBUG_STR
4433         to hold the file descriptor for the debug string table.
4434         
4435 2007-12-07  Bill Maddox  <maddox@google.com>
4437         * lto.c (lto_str_fd_init): New function.
4438         (lto_str_fd_close): New function.
4439         (lto_file_init): Call lto_str_fd_init.
4440         (lto_file_close): Call lto_str_fd_close.
4441         (lto_str_read): New function. Read debug string table.
4442         (lto_str_lookup): New function. Get string for debug
4443         string table offset.
4444         (lto_read_form): Recognize DW_FORM_strp.
4445         (lto_file_read): Invoke lto_str_read.
4447         * lto-elf.c (lto_elf_file_open): Read raw section data
4448         for the .debug_str section, if present.
4450         * lto.h (struct lto_str_fd_struct): New struct.
4451         (struct lto_file_struct): Added new field DEBUG_STR
4452         to hold the file descriptor for the debug string table.
4454 2007-12-07  Nathan Froyd  <froydnj@codesourcery.com>
4456         * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4457         Grow the basic_block_info and label_to_block_map vectors if
4458         necessary.  Read in the block chain.
4460 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4462         * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4464 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4466         * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4468 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4470         * lto-read.c (input_expr_operand): Don't check for MTAGs.
4471         (lto_read_body): Don't declare PROP_alias.
4473 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
4475         * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4476         argument type information.
4478 2007-12-03  Nathan Froyd  <froydnj@codesourcery.com>
4480         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4481         TREE_THIS_VOLATILE if the associated type is a volatile type.
4482         (lto_materialize_function): Remove call to init_ssa_operands.
4483         * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4484         variable when reading an SSA_NAME.  Do the same when reading a
4485         RESULT_DECL, a RETURN_EXPR, or an MTAG.
4486         (input_cfg): Call init_ssa_operands.
4487         (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4488         Move call to init_tree_ssa...
4489         (lto_read_body): ...here.  Use push_cfun and pop_cfun.  Call
4490         add_referenced_var on any variables referenced from the body of the
4491         function.  Inform the rest of the compiler we are in SSA form and
4492         inform later passes about the current properties.
4494 2007-11-30  Nathan Froyd  <froydnj@codesourcery.com>
4496         * lto.c (lto_materialize_function): Add FIXME.
4498 2007-11-29  Nathan Froyd  <froydnj@codesourcery.com>
4500         * lto-lang.c (enum built_in_attribute): New enum.
4501         (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4502         built_in_attributes): New variables.
4503         (def_builtin_1): New function.
4504         (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4506 2007-11-28  Nathan Froyd  <froydnj@codesourcery.com>
4508         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4509         DECL_SOURCE_LOCATION for debugging purposes.
4510         (lto_read_member_DIE): Set DECL_SOURCE_LOCATION.  If we have read a
4511         bitfield, use the type specified by the DIE for TREE_TYPE and defer
4512         laying out the decl until later.
4513         (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4514         name with DECL_ASSEMBLER_NAME.  Set DECL_SOURCE_LOCATION and
4515         TREE_ADDRESSABLE.
4516         * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4517         operand of an ADDR_EXPR.
4518         * lto-lang.c (enum lto_builtin_type): New enum.
4519         (builtin_type): New typedef.
4520         (builtin_types, string_type_node, const_string_type_node,
4521         wint_type_node, intmax_type_node, uintmax_type_node,
4522         signed_size_type_node): New variables.
4523         (def_fn_type, builtin_type_for_size, lto_define_builtins,
4524         lto_build_c_type_nodes): New functions.
4525         (lto_init): Initialize builtin types.
4526         (lto_set_decl_assembler_name): Let the target machine mangle the
4527         name if the decl is TREE_PUBLIC, otherwise uniquify it.
4529 2007-11-21  Nathan Froyd  <froydnj@codesourcery.com>
4531         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4532         set TREE_ADDRESSABLE.  Do set DECL_COMDAT.  Set TREE_READONLY if
4533         the type is a constant type.  Set the assembler name and inform
4534         the rest of the compiler about the new decl if the decl is not
4535         public.
4536         (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4537         of DECL_ASSEMBLER_NAME when determining if we have a builtin.  Don't
4538         try to read in function bodies for functions that already have bodies.
4539         * lto-symtab.c (lto_same_type_p): Check for unbounded array
4540         equivalency.
4541         (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4542         Check for whether we matched a builtin function type before calling
4543         lto_same_type_p on the generated type.  Permit cases where the
4544         declaration of an array is unbounded, but the definition is bounded.
4545         Don't combine TREE_PUBLIC flags.  Copy over DECL_SIZE and
4546         DECL_SIZE_UNIT if necessary.
4548 2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>
4550         * lto-read.c (input_expr_operand): Get types right 
4551         for COMPLEX_CST.
4553 2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>
4555         * lto-read.c (make_new_block, input_cfg): Properly set
4556         n_basic_blocks.
4557         
4558 2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>
4560         * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4561         set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4563 2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>
4565         * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4566         construct the integer type for bitfields.
4568 2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>
4570         * lto-read.c (data_in.current_node_has_loc): Removed.
4571         (input_line_info): Returns true if node needs line set.
4572         (set_line_info): Always sets line if called.
4573         (clear_line_info): Removed reference to current_node_needs_loc.
4574         (input_expr_operand): Keeps track locally if current node needs a loc.
4575         (input_local_var): Added code to handle DECL_INITIAL for
4576         static local vars. Only set loc if necessary.
4577         
4578 2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>
4580         * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4581         DECL_CONTEXT.
4583 2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>
4585         * lto.c: Include langhooks.h.
4586         (lto_find_integral_type): Rework logic to handle the case where
4587         got_byte_size is true, but the bitsize requested and that of the
4588         base_type doesn't match.
4589         (lto_read_variable_formal_parameter_constant_DIE): Only check for
4590         asm_name if we are creating a VAR_DECL.
4591         (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4592         definition.
4593         (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4594         function reference and use the builtin's decl if so.  Set the
4595         DECL_CONTEXT of the RESULT_DECL for the function.
4596         * lto-lang.c (registered_builtin_fndecls): New variable.
4597         (lto_getdecls): Return it.
4598         (lto_builtin_function): Chain the new decl onto
4599         registered_builtin_fndecls.
4601 2007-11-15  Kenneth Zadeck <zadeck@naturalbridge.com>
4602             
4603         * lto-read.c (process_tree_flags, lto_static_init_local):
4604         Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4605         (input_line_info, clear_line_info): Fixed new line number code.
4606         (input_expr_operand): Added type to SWITCH_EXPR.
4607         (lto_read_body): Properly initialized data_in.
4608         Clear line info when leaving.
4609         
4610 2007-11-13  Diego Novillo  <dnovillo@google.com>
4612         * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4613         Initialize ARTIFICIAL.
4614         (lto_read_subroutine_type_subprogram_DIE): Initialize
4615         SAVED_SCOPE.
4616         * lto-read.c (set_line_info): Remove ; from calls to
4617         LINEMAP_POSITION_FOR_COLUMN.
4619 2007-11-13  Kenneth Zadeck <zadeck@naturalbridge.com>
4621         * lto-read.c (input_type_ref): Renamed from get_type_ref.
4622         (input_expr_operand, input_local_var): Renamed get_type_ref to 
4623         input_type_ref.
4624         (input_expr_operand): Get the types correct for 
4625         vector-cst.  Get SSA_NAME_DEF_STMT correct for return_exprs.
4626         
4627 2007-11-13  Doug Kwan  <dougkwan@google.com>
4629         * lto-read.c (input_widest_uint_uleb128): New function.
4630         (input_tree_flags, process_tree_flags, input_line_info,
4631         input_expr_operand, input_local_var, input_phi, input_ssa_names):
4632         Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4633         unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4634         (lto_static_init_local): Add code to assert that lto_flags_type is
4635         wide enough.
4637 2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>
4639         * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4640         (lto_read_subroutine_type_subprogram_DIE): Handle
4641         DW_AT_static_link and DW_AT_specification.  Return the
4642         specification if present.
4643         (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4644         
4645 2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>
4647         * lto-lang.c: Include target.h.
4648         (registered_builtin_types): New variable.
4649         (lto_type_for_mode): Increase number of modes handled.
4650         (lto_builtin_function): Fix argument list and return the decl.
4651         (lto_register_builtin_type): New function.
4652         (lto_init): Initialize target builtins and language-independent
4653         nodes.
4654         (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4656 2007-11-13  Kenneth Zadeck <zadeck@naturalbridge.com>
4658         * lto-read.c (input_expr_operand): Added code to properly handle
4659         index filed. Added new RANGE_EXPR case.
4660         
4661 2007-11-11  Kenneth Zadeck <zadeck@naturalbridge.com>
4663         * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4664         (data_in): Added current_node_has_loc field.
4665         (input_line_info, set_line_info, clear_line_info): Added a support
4666         for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4667         did not have on on the source side.
4668         (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4669         numbers too.
4671 2007-11-09  Doug Kwan  <dougkwan@google.com>
4673         * lto-read.c (input_expr_operand): Change type of operand 2 of
4674         BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4676 2007-11-09  Nathan Froyd  <froydnj@codesourcery.com>
4678         * lto.c: Include lto-tree.h.  Effect small spaces->tabs cleanup.
4679         (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4680         from a DW_AT_specification or DW_AT_abstract_origin attribute to
4681         the new decl we are creating.  Move informing the middle end about
4682         the new decl to...
4683         (lto_main): ...here.  Inform the middle end about global variables
4684         after we have read in all the input files.
4685         * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4686         variables with internal linkage, so delete the check for internal
4687         linkage.  Combine TREE_PUBLIC flags.
4689 2007-11-08  Nathan Froyd  <froydnj@codesourcery.com>
4691         * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4692         DW_AT_decl_line.
4693         * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4694         builtin specially.  Move check for attribute compatibility
4695         earlier.
4697 2007-11-07  Nathan Froyd  <froydnj@codesourcery.com>
4699         * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4700         * config-lang.in (gtfiles): Add lto.h and lto.c.
4701         * lto-elf.c: Include ggc.h.
4702         (lto_elf_file_open): Allocate elf_file from GC memory.
4703         * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4704         (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4705         in GC memory.
4706         (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4707         (lto_file_close): Free file from GC memory.
4708         (lto_cache_store_DIE): Allocate the new entry in GC memory.
4709         (lto_read_member_DIE): Fix declaration.
4710         (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4711         in GC memory.
4712         (current_lto_file): New variable.
4713         (lto_main): Use it.
4714         (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4715         lto_die_cache_entry): Move to...
4716         * lto.h: ...here and add GTY markers as appropriate.  Delete forward
4717         declarations accordingly.
4718         (struct lto_file_struct): Declare.
4719         (lto_file_vtable): Use it instead of lto_file.
4721 2007-11-06 Alon Dayan  <alond@il.ibm.com>
4722            Kenneth Zadeck <zadeck@naturalbridge.com>
4724          * lto-read.c (process_flags, lto_static_init_local):
4725          read flags of VAR_DECL and FUNCTION_DECL of size>1.
4726          change global array num_flags_for_code to flags_length_for_code.
4727          (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4728         
4729 2007-11-05  Nathan Froyd  <froydnj@codesourcery.com>
4731         * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4732         layout functions to compute information about the newly constructed
4733         type.
4735 2007-11-02  Nathan Froyd  <froydnj@codesourcery.com>
4737         * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4738         case to use DECL_RESULT if necessary.
4740 2007-11-01  Kenneth Zadeck <zadeck@naturalbridge.com>
4742         * lto-read.c (input_tree_list): Removed.
4743         (input_tree_flags): Added parameter to force flags no matter what
4744         tree code.
4745         (input_expr_operand): Added parameter to input_tree_flags.
4746         Added case for IDENTIFIER_NODE and TREE_LIST.  Changed ASM to call
4747         input_expr_operand rather than input_tree_lists.
4748         (input_local_var): Use input_expr_operand to read attributes
4749         rather then input_tree_list.
4750         (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4752 2007-10-31  Nathan Froyd  <froydnj@codesourcery.com>
4754         * lto.c (lto_read_typedef_DIE): Fix comment typo.
4755         (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4756         TYPE_DECL for it.
4757         * lto-read.c (lto_read_body): Use correct sizes for calculating
4758         type_decls_offset and types_offset.
4760 2007-10-30  Nathan Froyd  <froydnj@codesourcery.com>
4762         * lto-tree.h (union lang_tree_node): Change GTY description to chain
4763         with GENERIC_NEXT.
4764         * config-lang.in (gtfiles): Add lto-lang.c.
4765         * lto-lang.c: Include gt-lto-lto-lang.h.
4766         * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4767         (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4768         (lto/lto-read.o): Likewise.
4770 2007-10-29  Kenneth Zadeck <zadeck@naturalbridge.com>
4772         * lto-read.c (data_in): Added type_decls and current_col fields.
4773         (string_slot): New type to hold canonized file name.
4774         (hash_string_slot_node, eq_string_slot_node, canon_file_name, 
4775         input_line_info, set_line_info, clear_line_info): New functions.
4776         (file_name_hash_table): New hash table.
4777         (input_local_var, input_labels, input_local_vars_index, 
4778         input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4779         (input_uleb128): Changed type of byte var.
4780         (input_expr_operand): Large number of changes to get line numbers
4781         correct.  Added TYPE_DECL case.
4782         (input_globals): Added code to get TYPE_DECLs processed.
4783         (input_local_var): Added code to process line numbers and
4784         TREE_CHAIN and DECL_CONTEXT.
4785         (input_function, input_constructor): Added call to
4786         clear_line_number.
4787         (lto_static_init_local): Added code to get line numbers correct.
4788         (lto_read_body): Added code to get TYPE_DECLS read and to change
4789         parameters to the calls above that had their parms reorganized.
4791         
4792 2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>
4794         * lto.h (lto_resolve_typedecl_ref): Declare.
4795         * lto.c (lto_resolve_typedecl_ref): New function.
4797 2007-10-29  Mark Mitchell  <mark@codesourcery.com>
4798             Nathan Froyd  <froydnj@codesourcery.com>
4800         * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4801         DIEs even if we find an abstract origin for this DIE.
4803 2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>
4805         * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4806         RESULT_DECL slightly earlier.  Only remember the decl for later
4807         if we successfully merge declarations.
4809 2007-10-24  Kenneth Zadeck <zadeck@naturalbridge.com>
4811         * lto-read.c (input_expr_operand): Give label_values the proper
4812         context and provide switch statements with a default type.
4813         
4814 2007-10-23  Nathan Froyd  <froydnj@codesourcery.com>
4816         * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4817         * lto.c (lto_materialize_function): ...to here.
4819 2007-10-22  Nathan Froyd  <froydnj@codesourcery.com>
4821         * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4822         * lto.c (lto_info_fd_init): Initialize it.
4823         (lto_info_fd_close): Free it.
4824         (lto_materialize_function): New function.
4825         (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4826         unmaterialized_fndecls.
4827         (lto_file_read): Read in all the function bodies after we have read
4828         all of the DWARF info.
4829         * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4830         reading a function body.
4832 2007-10-20  Kenneth Zadeck <zadeck@naturalbridge.com>
4834         * lto-read.c (input_tree_flags): Renamed from input_flags to be
4835         semetric with output_tree_flags.  Added call to log flags.
4836         (process_tree_flags): Renamed from process_flags.  Fixed a lot of
4837         type issues to make everything consistent with flags being
4838         unsigned HOST_WIDE_INTS.
4839         (input_expr_operand): Added call to
4840         recompute_tree_invariant_for_addr_expr.
4841         (input_local_var): Added debugging for tree_chains.  Now calls
4842         input_tree_flags.
4843         (input_phi): Made flags unsigned HOST_WIDE_INT.
4844         (input_ssa_names): Now calls input_tree_flags.
4845         (lto_read_body): Now sets cfun.
4846         (lto_read_function_body): Now sets current_function_pointer.
4847         
4848 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
4850         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4851         definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4852         inspecting fields within.
4853         (lto_read_DIE_at_ptr): Delete check for null result; let callers
4854         handle this appropriately.
4856 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
4858         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4859         DW_AT_abstract_origin properly.  Ensure that we're not dealing with
4860         both DW_AT_abstract_origin and DW_AT_specification.
4861         (lto_read_subroutine_type_subprogram_DIE): Handle
4862         DW_AT_abstract_origin.
4863         (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4864         (lto_read_DIE_at_ptr): Define as static to match declaration.
4865         Lookup the PTR in the cache before reading it from the file.
4866         (lto_resolve_var_ref): Adjust accordingly.
4867         (lto_resolve_fn_ref): Adjust accordingly.  Tweak comment.
4868         (lto_resolve_field_ref): Adjust accordingly.  Tweak comment.
4870 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
4872         * lto.c (lto_read_DIE_at_ptr): New function.
4873         (lto_resolve_var_ref): Use it.
4874         (lto_resolve_fn_ref): Use it.
4875         (lto_resolve_field_ref): Use it.
4876         (lto_read_variable_formal_parameter_constant_DIE): Follow
4877         DW_AT_specification and return the associated decl when appropriate.
4879 2007-10-18  Nathan Froyd  <froydnj@codesourcery.com>
4881         * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4882         Implement for scalar integer modes.
4883         (lto_init): Initialize size_type_node.
4885 2007-10-18  Kenneth Zadeck <zadeck@naturalbridge.com>
4887         * lto-read.c (input_expr_operand): Remove ssa name asserts.
4888         (input_local_var): Add chaining for params.
4889         (input_ssa_names): Add cfun parameter.
4890         (input_function): Remove unnecessary else.
4892 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
4894         * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4895         (lto_resolve_var_ref): Use proper types.
4896         (lto_resolve_fn_ref): Likewise.
4897         (lto_resolve_field_ref): Likewise.
4899 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
4901         * lto-read.c (input_expr_operand): Remove case.
4903 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
4905         * lto.c (lto_read_only_for_child_DIEs): New function.
4906         (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4907         * lto-elf.c (lto_elf_map_lto_section): Remove.
4908         (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4909         * lto-read.c (input_expr_operand): Assert that we never read a NULL
4910         SSA_NAME.  Add missing case for mechanical codes.
4911         (input_cfg): Use basic_block_info_for_function instead of
4912         basic_block_info.
4914 2007-10-16  Kenneth Zadeck <zadeck@naturalbridge.com>
4916         * lto-read.c (input_sleb128, input_integer): Use proper casts.
4917         (input_list): Renamed input_tree_list and modified to follow same
4918         protocol as lto-function-out.c:output_tree_list.
4919         (input_expr_operand): Make asm operands use input_tree_list.
4920         (input_local_var): Now uses input_tree_list.
4921         (lto_read_body): Change placement for setting context of debug_labels.
4922         
4923         
4924 2007-10-16  Kenneth Zadeck <zadeck@naturalbridge.com>
4926         * lto-read.c (input_real): Output debugging in proper order.
4927         (input_integer): Compute bit lengths properly.
4928         (input_list): Clean up declaration.
4929         (input_expr_operand): Change calls to input_real to match fix.
4930         Make reading of LTO_bit_field_ref1 match output.
4931         (input_local_var): Make reading of attributes match what is being
4932         written.
4933         (dump_debug_stream): Also print char in hex.
4934         (debug_out_fun): Fix signed unsigned mismatch.
4935         
4936 2007-10-10  Nathan Froyd  <froydnj@codesourcery.com>
4938         * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4939         DW_AT_GNU_vector specially, as they are not contiguous with the
4940         specified set of attribute names.  Use class_mask to check for
4941         errors at the end of the function
4942         (lto_resolve_var_ref): Read the DIE if it is not cached.
4943         (lto_resolve_fn_ref): Likewise.
4944         (lto_resolve_field_ref): Likewise.
4946 2007-10-05  Nathan Froyd  <froydnj@codesourcery.com>
4948         * lto.c: Include dwarf2out.h.
4949         (lto_cache_store_DIE): Assert that we never change the value.
4950         (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4951         (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4952         (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4953         sensible type instead.
4954         (lto_read_structure_union_class_type_DIE): Store the newly
4955         created type prior to reading the members of the structure to
4956         avoid infinite recursion.  Avoid computing types and alignments
4957         for structures whose sizes are unknown.
4958         (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4959         and set DECL_ARTIFICIAL accordingly.  Ignore DW_AT_abstract_origin,
4960         DW_AT_const_value, and DW_AT_specification.
4961         (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4962         Return early if we have already constructed the function type.
4963         (lto_read_typedef_DIE): Check to see if the type has been cached
4964         already.  Cache the type before reading any children.
4965         (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4966         (lto_read_DIE): Unset context->skip_non_parameters around reading
4967         the DIE.
4968         (lto_resolve_fn_ref): Delete trailing whitespace.
4970 2007-09-11  Kenneth Zadeck <zadeck@naturalbridge.com>
4972         * lto-read.c (input_expr_operand): Added type for STRING_CST.
4973         
4974 2007-09-10  Nathan Froyd  <froydnj@codesourcery.com>
4976         * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4978 2007-09-07  Nathan Froyd  <froydnj@codesourcery.com>
4980         * lto-lang.c (signed_and_unsigned_types): New variable.
4981         (lto_type_for_size): Consult signed_and_unsigned_types to find
4982         an approprite type, creating it if necessary.
4983         (lto_set_decl_assembler_name): Add actual method body.
4985 2007-09-06  Jim Blandy  <jimb@codesourcery.com>
4987         * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4988         can't find a var init for this variable, leave its DECL_INITIAL.
4989         * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4990         lto_elf_map_fn_body.
4991         (lto_map_lto_section): New function.
4992         (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4993         bodies, and lto_elf_map_optional_lto_section for variable
4994         initializers.
4995         (lto_elf_find_section_data): Quietly return NULL if the section is
4996         missing.
4997         (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4999         * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5001         * lto-read.c (lto_read_body): Doc fix.
5003 2007-08-29  Kenneth Zadeck <zadeck@naturalbridge.com>
5005         * lto-read.c (fun_in): Renamed to data_in.
5006         (input_expr_operand, input_local_var, input_string_internal,
5007         input_string, input_real, input_list, get_label_decl, 
5008         get_type_ref, input_expr_operand, input_globals, input_labels,
5009         input_local_vars_index, input_local_var, input_local_vars, 
5010         input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5011         (input_constructor): New function.
5012         (lto_read_function_body): Renamed to lto_read_body and generalized
5013         to handle both functions and constructors.
5014         (lto_read_function_body, lto_read_var_init): New function.
5015         
5016         
5017 2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>
5019         * lto-read.c (input_expr_operand): Assert that there really is a
5020         FUNCTION_DECL.
5021         (input_globals): Removed checks on 0 section.
5022         
5023 2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>
5025         * lto-read.c (fun_in): Added local_decls_index and
5026         local_decls_index_d.  
5027         (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5028         (input_globals): Enabled code to handle FIELD_DECLs.
5029         (input_local_vars_index, input_local_vars): New function.
5030         (input_local_var): Changed to allow locals to be input randomly.
5031         (lto_read_function_body): Added code to input the
5032         local_decls_index and to free various structures.
5033         
5034 2007-08-17  Jim Blandy  <jimb@codesourcery.com>
5036         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5037         ATTRIBUTE_UNUSED from 'die' formal.
5039         Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5040         * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5041         (input_list): Fix type of 'tag'.
5042         (input_expr_operand): Fix type of 'tag' argument.  Update
5043         declaration.  Fix type of 'ctag'.  Add default case to switch,
5044         since the type of the switched value is now an enum.
5045         (input_local_vars): Fix type of 'tag'.
5046         (input_bb): Fix type of 'tag' argument.
5047         (input_function): Fix type of 'tag' argument.
5049 2007-08-16  Jim Blandy  <jimb@codesourcery.com>
5051         * lto.c (lto_read_member_DIE): Record the tree we create in
5052         fd->die_cache.  (Our 'die' argument is no longer unused.)
5053         (lto_resolve_field_ref): New function.
5054         * lto.h (lto_resolve_field_ref): New declaration.
5056 2007-08-15  Jim Blandy  <jimb@codesourcery.com>
5058         * lto-read.c (lto_read_var_init): Mark arguments as unused.
5060 2007-08-07  Jim Blandy  <jimb@codesourcery.com>
5062         * lto.c (lto_read_form): Complete attr_classes table.
5063         (DWARF2_form_data): Doc fix.
5064         
5065 2007-08-05  Mark Mitchell  <mark@codesourcery.com>
5067         * lto.h (lto_file_vtable): Remove read_var_init.  Add map_var_init
5068         and unmap_var_init.
5069         (lto_read_var_init): Declare.
5070         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5071         interface for reading variable initializers.
5072         * lto-elf.c (lto_elf_read_var_init): Remove.
5073         (lto_elf_file_vtable): Update initializer.
5074         (lto_elf_read_var_init): Add comment about unused-ness.
5075         * lto-read.c (lto_read_var_init): New.
5077         * lto.c (lto_read_form): Add entry for DW_AT_inline.
5079 2007-08-02  Kenneth Zadeck <zadeck@naturalbridge.com>
5081         * lto-read.c (lto_read_function_body): Moved declaration of fn
5082         outside of ifdef.
5083         
5084 2007-08-01  Kenneth Zadeck <zadeck@naturalbridge.com>
5086         * lto-read.c (input_uleb128, input_string_internal, input_real,
5087         input_integer, input_record_start, input_list, get_type_ref,
5088         input_flags, input_expr_operand, input_expr_operand,
5089         input_expr_operand, input_local_vars, input_cfg, input_phi,
5090         input_ssa_names, input_bb, input_function): Added semicolons.
5092         
5093 2007-07-31  Kenneth Zadeck <zadeck@naturalbridge.com>
5095         * lto-read.c (input_globals): Remove debugging.
5096         (input_function): Set DECL_ARGUMENTS.
5098         
5099 2007-07-31  Kenneth Zadeck <zadeck@naturalbridge.com>
5101         * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5102         RETURN_EXPR, MODIFY_EXPR and processing of flags.
5103         (input_phi): Made work with operands other than SSA_NAMES and
5104         fixed processing of flags.
5105         (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5106         (input_flags): New function.
5107         * lto-lang.c (lto_init): Changed state of in_lto_p.
5108         
5109         
5110 2007-07-24  Mark Mitchell  <mark@codesourcery.com>
5112         * lto-tree.h (lto_varargs_cookie): Remove.
5113         * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5114         skip_non_parameters, skip_parameters.
5115         (lto_varargs_cookie): Remove.
5116         (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5117         parameter types.
5118         (lto_read_abbrev): New function.
5119         (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5120         child DIEs.
5121         (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5122         (lto_read_DIE): Use lto_read_abbrev.  Honor skip_* flags.
5123         (lto_file_read): Initialize new context fields.
5124         * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5125         (lto_unsigned_type): Remove.
5126         (lto_signed_type): Likewise.
5127         (lto_signed_or_unsigned_type): Likewise.
5128         (lto_init): Do not create lto_varargs_cookie.
5129         (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5130         (LANG_HOOKS_SIGNED_TYPE): Likewise.
5131         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5133 2007-07-19  Jan Hubicka  <jh@suse.cz>
5135         * lto-read.c (lto_read_function_body): Produce empty scope block
5136         to avoid crash.
5138 2007-07-18  Mark Mitchell  <mark@codesourcery.com>
5140         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5141         process local variables.
5142         (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5144 2007-07-13  Kenneth Zadeck <zadeck@naturalbridge.com>
5146         * lto-read.c (input_list, input_expr_operand): Added struct
5147         function parameter.
5148         (init_cfg, finalize_cfg): Removed function.
5149         (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5150         (input_labels, input_local_vars): Now takes input_block parameter rather than
5151         synthsyzing it.
5152         (input_cfg, input_phi, input_ssa_names): New functions.
5153         (input_bb): Now passes in input_blocks.  Does not construct cfg
5154         and processes the list of phi functions.
5155         (input_function): Now builds both the cfg and ssa_names table.
5156         (lto_read_function_body): Processes new header fields to construct
5157         streams for the ssa_names and cfg and their debugging.
5158         * lto/lto-lang.c (lto_init): Set in_lto_p.
5159         
5160         
5161 2007-06-28  Mark Mitchell  <mark@codesourcery.com>
5163         * lto.h (lto_file_vtable): Add read_var_init.
5164         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5165         initializers.
5166         (lto_main): Remove bogus asserts.
5167         * lto-elf.c (tm.h): Include it.
5168         (libiberty.y): Likewise.
5169         (lto_elf_file): Add strtab and symtab.  Rename
5170         string_table_section_index to sec_strtab.
5171         (lto_elf_file_vtable): Add lto_elf_read_var_init.
5172         (lto_elf_get_shdr): New function.
5173         (lto_elf_free_shdr): Likewise.
5174         (lto_elf_find_section_data): Use them.
5175         (lto_elf_read_symtab): New function.
5176         (lto_elf_lookup_sym): Likewise.
5177         (lto_elf_free_sym): Likewise.
5178         (lto_elf_file_open): Tidy.  Call lto_elf_read_symtab.
5179         (lto_elf_built_init): New function.
5180         (lto_elf_read_var_init): Likewise.
5181         * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5183 2007-06-26  Kenneth Zadeck <zadeck@naturalbridge.com>
5185         * lto-read (make_new_block): Initialize the stmt_list.
5186         (lto_static_init_local): Add debugging for missing codes.
5187         
5188 2007-06-26  Mark Mitchell  <mark@codesourcery.com>
5190         * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5191         unprototyped functions. 
5193 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
5195         * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5196         Handle DW_AT_MIPS_linkage_name.
5197         (lto_read_subroutine_type_subprogram): Likewise.  Correct
5198         compilation errors.
5199         (lto_main): Remove incorrect assertions.
5200         * lto-symbtab.c: Build function types out of TREE_LISTs.
5202         * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5203         
5204         * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5205         
5206 2007-06-21  Kenneth Zadeck <zadeck@naturalbridge.com>
5208         * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5209         dummy since ggc does not like empty structs.
5210         * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5211         * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5212         expr->common to expr->base.
5213         (make_new_block): Moved stmt_list to proper place.
5216 2007-03-14 Robert Kennedy  <jimbob@google.com>
5218         Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5219         * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5220         assembler name from DWARF.
5221         * lto-lang.c (lto_set_decl_assembler_name) New function.
5223 2006-09-10  Mark Mitchell  <mark@codesourcery.com>
5225         * lto.h (lto_file_vtable): New structure.
5226         (lto_file): Add vtable pointer.
5227         (lto_file_init): Add vtable paramter.
5228         (lto_read_function_body): New function.
5229         (lto_symtab_merge_fn): New function.
5230         * lto.c (lto_file_init): Add vtable parameter.
5231         (lto_read_form): Fill in entries for DW_AT_prototyped,
5232         DW_AT_frame_base.
5233         (lto_read_subroutine_type_subprogram_DIE): New function.
5234         (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5235         DW_TAG_subprogram.
5236         * lto-elf.c (lto_elf_vile_vtable): New variable.
5237         (lto_elf_file_open): Pass it to lto_file_init.
5238         (lto_elf_map_fn_body): New function.
5239         (lto_elf_unmap_fn_body): Likewise.
5240         * lto-read.c: New file.
5241         * lto-symtab.c (lto_symtab_merge_fn): New function.
5242         * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5243         tree_rest_of_compilation.
5244         * Make-lang.in (LTO_OBJS): Add lto-read.o
5245         (lto-read.o): New target.
5247 2006-09-03  Mark Mitchell  <mark@codesourcery.com>
5249         * lto.c (<inttypes.h>): Don't include it.
5250         (lto_context): Don't typedef it.
5251         (lto_resolve_reference): New function.
5252         (lto_read_form): Use it.
5253         (lto_resolve_type_ref): New function.
5254         (lto_resolve_var_ref): Likewise.
5255         (lto_resolve_fn_ref): Likewise.
5256         * lto.h (<inttypes.h>): Include it.
5257         (lto_context): New type.
5258         (lto_ref): New structure.
5259         (lto_resolve_type_ref): Declare.
5260         (lto_resolve_var_ref): Likewise.
5261         (lto_resolve_fn_ref): Likewise.
5263 2006-08-18  Mark Mitchell  <mark@codesourcery.com>
5265         * lang-specs.h: New file.
5267 2006-08-14  Mark Mitchell  <mark@codesourcery.com>
5269         * lto.c (lto_info_fd_init): Allocate the DIE cache.
5270         (lto_info_fd_close): Deallocate it.
5271         (lto_die_cache_entry): New structure.
5272         (lto_cache_hash): New function.
5273         (lto_cache_eq): Likewise.
5274         (lto_cache_store_DIE): Likewise.
5275         (lto_cache_lookup_DIE): Likewise.
5276         (lto_read_referenced_type_DIE): Use the cache.
5277         (lto_read_pointer_type_DIE): Robustify.
5278         (lto_read_DIE): Use the cache.
5279         * lto.h (hashtab.h): Include.
5280         (lto_info_fd): Add DIE cache.
5281         * Make-lang.in (LTO_H): New variable.
5282         (lto/lto-lang.o): Use LTO_H.
5283         (lto/lto-elf.o): Likewise.
5284         (lto/lto-symtab.o): Likewise.
5286 2006-07-09  Mark Mitchell  <mark@codesourcery.com>
5288         * lto.c (lto_abi_mismatch_error): New function.
5289         (lto_abbrev_read): Initialize num_abbrevs.
5290         (lto_read_form): Specify allowed form classes for
5291         DW_AT_declaration.  Adjust for change to lto_set_cu_context.
5292         (lto_read_variable_formal_parameter_constant_DIE): Handle
5293         DW_AT_declaration.  Call lto_symtab_merge_var.
5294         (lto_read_pointer_type_DIE): New function.
5295         (lto_read_base_type_DIE): Use build_nonstandard_integer_type.  Do
5296         not creat TYPE_DECLs for types that already have them.
5297         (lto_read_DIE): Add lto_read_pointer_type_DIE.
5298         (lto_set_cu_context): Make cu_start point to the header, not the
5299         first DIE.
5300         (lto_file_read): Adjust for change to lto_set_cu_context.
5301         * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5302         (lto/lto-symtab.o): New rule.
5303         * lto-tree.h (lang_identifier): Add decl field.
5304         (LANG_IDENTIFIER_CAST): New macro.
5305         (LTO_IDENTIFIER_DECL): Likewise.
5306         (lto_symtab_merge_var): Declare.
5307         * lto-symtab.c: New file.
5309 2006-07-02  Daniel Berlin  <dberlin@dberlin.org>
5311         * lto.c (lto_context): Add current_cu and info_fd members.
5312         (DWARF2_CompUnit): New structure.
5313         (lto_read_DIE): Take lto_info_fd *.
5314         (lto_read_child_DIEs): Ditto.
5315         (lto_file_corrupt_error): Constify argument.
5316         (lto_set_cu_context): New function
5317         (lto_info_fd_init): Ditto.
5318         (lto_info_fd_close): Ditto.
5319         (lto_file_init): Use lto_info_fd_init.
5320         (lto_file_close): Use lto_info_fd_close.
5321         (lto_read_initial_length): Pass in pointer to header size.
5322         (lto_read_comp_unit_header): Correct cu_length to
5323         real length from beginning of header.  Take lto_info_fd * as
5324         argument.
5325         (find_cu_for_offset): New function.
5326         (lto_read_form): Change first argument to lto_info_fd *.
5327         Add FORM_CONTEXT argument.
5328         Handle DW_FORM_ref_addr.
5329         (lto_read_tag_DIE): Change first argument to lto_info_fd *.     
5330         (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5331         Swap contexts if necessary for form.
5332         (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5333         lto_file_corrupt_error.
5334         (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5335         (lto_read_referenced_type_DIE): Change first argument to
5336         lto_info_fd *.  Access lto_fd fields through base pointer.
5337         (lto_read_compile_unit_DIE): Change first argument to an
5338         lto_info_fd *.
5339         (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5340         (lto_read_base_type_DIE): Ditto.
5341         (lto_read_child_DIEs): Ditto.
5342         (lto_read_DIE): Ditto.  Change type of function pointer.
5343         (lto_info_read): New function.
5344         (lto_set_cu_context): Ditto.
5345         (lto_file_read): Use lto_info_read, walk resulting CU's
5346         (lto_main): Update for lto_info_fd change.
5347         * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5348         necessary.
5349         * lto.h (DWARF2_CompUnit): New structure.
5350         (lto_info_fd): Ditto.
5351         (lto_file): Change debug_info to be an lto_info_fd.
5352         
5353 2006-06-25  Mark Mitchell  <mark@codesourcery.com>
5355         * lto.c (toplev.h): Include it.
5356         (dwarf2.h): Likewise.
5357         (tree.h): Likewise.
5358         (tm.h): Likewise.
5359         (cgraph.h): Likewise.
5360         (ggc.h): Likewise.
5361         (inttypes.h): Likewise.
5362         (DWARF2_attr): New type.
5363         (DWARF2_abbrev): Likewise.
5364         (DWARF2_class): Likewise.
5365         (DWARF2_form_data): Likewise.
5366         (lto_context): Likewise.
5367         (lto_fd_init): New function.
5368         (lto_abbrev_fd_init): Likewise.
5369         (lto_abbrev_fd_close): Likewise.
5370         (lto_file_init): Use them.
5371         (lto_file_close): New function.
5372         (lto_file_corrupt_error): Likewise.
5373         (LTO_CHECK_INT_VAL): New macro.
5374         (lto_check_size_t_val): New function.
5375         (lto_check_int_val): Likewise.
5376         (LTO_READ_TYPE): New macro.
5377         (lto_read_ubyte): New function.
5378         (lto_read_uhalf): Likewise.
5379         (lto_read_uword): Likewise.
5380         (lto_read_uleb128): Likewise.
5381         (lto_read_initial_length): Likewise.
5382         (lto_abbrev_read_attrs): Likewise.
5383         (lto_abbrev_read): Likewise.
5384         (lto_abbrev_lookup): Likewise.
5385         (lto_read_section_offset): Likewise.
5386         (lto_read_comp_unit_header): Likewise.
5387         (lto_read_form): Likewise.
5388         (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5389         (LTO_BEGIN_READ_ATTRS): Likewise.
5390         (LTO_END_READ_ATTRS): Likewise.
5391         (lto_unsupported_attr_error): New function.
5392         (lto_get_identifier): Likewise.
5393         (lto_read_referenced_type_DIE): Likewise.
5394         (lto_read_compile_unit_DIE): Likewise.
5395         (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5396         (lto_read_base_type_DIE): Likewise.
5397         (lto_read_DIE): Likewise.
5398         (lto_read_child_DIEs): Likewise.
5399         (lto_file_read): Read DIEs.
5400         (lto_main): Ask middle end to emit entities.
5401         * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5402         * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5403         (lto_elf_file_close): Likewise.
5404         * lto.h (lto_file): Declare.
5405         (DWARF2_abbrev): Likewise.
5406         (lto_fd): New type.
5407         (lto_abbrev_fd): Likewise.
5408         (lto_file): Use new types.
5409         (lto_file_close): Declare.
5410         * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5411         
5412 2006-06-18  Mark Mitchell  <mark@codesourcery.com>
5414         * lto.h: New file.
5415         * lto.c: New file.
5416         * lto-elf.c: New file.
5417         * lto-lang.c (flags.h): Include it.
5418         (lto.h): Likewise.
5419         (lto_init): New function.
5420         (lto_write_globals): Remove.
5421         (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing. 
5422         (LANG_HOOKS_INIT): Define.
5423         (LANG_HOOKS_PARSE_FILE): Likewise.
5424         * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5425         (LTO_EXE): Link with libelf.
5426         (lto/lto-lang.o): Update dependencies.
5427         (lto/lto.o): New target.
5428         (lto/lto-elf.o): Likewise.
5430 2006-06-12  Mark Mitchell  <mark@codesourcery.com>
5432         * config-lang.in: New file.
5433         * Make-lang.in: Likewise.
5434         * lto-tree.h: Likewise.
5435         * lto-lang.c: Likewise.
5437 Copyright (C) 2006-2016 Free Software Foundation, Inc.
5439 Copying and distribution of this file, with or without modification,
5440 are permitted in any medium without royalty provided the copyright
5441 notice and this notice are preserved.