* gcc.dg/guality/guality.exp: Skip on AIX.
[official-gcc.git] / gcc / lto / ChangeLog
blobd6559750f92250fd8b4c9ab31a0442e2651e9e9e
1 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
3         * lto-partition.c: Fix typos.
5 2013-06-20  Jan Hubicka  <jh@suse.cz>
7         * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
8         partitioning of variables.
10 2013-06-20  Jan Hubicka  <jh@suse.cz>
12         * lto.c (read_cgraph_and_symbols): Set cgraph state.
14 2013-06-19  Jan Hubicka  <jh@suse.cz>
16         * lto-partition.c (add_references_to_partition): Use
17         ctor_for_folding.
19 2013-06-18  Richard Biener  <rguenther@suse.de>
21         * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
22         and use it.
23         (lto_register_function_decl_in_symtab): Likewise.
24         (cmp_tree): New function.
25         (unify_scc): Instead of using the streamer cache map from entry
26         to cache index match up the two maps we have by sorting them.
27         Adjust calls to lto_register_var_decl_in_symtab and
28         lto_register_function_decl_in_symtab.
30 2013-06-17  Richard Biener  <rguenther@suse.de>
32         * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
33         * lto.c: Include data-streamer.h.
34         (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
35         (gimple_type_leader_entry_s, gimple_type_leader,
36         gimple_lookup_type_leader): Remove.
37         (gtc_visit): Simplify.
38         (gimple_types_compatible_p): Likewise.
39         (gimple_register_type_1): Likewise.  Merge into ...
40         (gimple_register_type): ... this.  Keep it as legacy for
41         statistics purposes for now.
42         (fixup_integer_cst): Remove.
43         (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
44         rename to ...
45         (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
46         maybe_remember_with_vars_*): ... these.
47         (uniquify_nodes): Remove.
48         (lto_fixup_prevailing_type): New function.
49         (struct tree_scc, struct tree_scc_hasher): New type and hasher.
50         (tree_scc_hash, tree_scc_hash_obstack): New globals.
51         (num_merged_types, num_prevailing_types, num_not_merged_types,
52         num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
53         total_scc_size_merged, num_sccs_merged, num_scc_compares,
54         num_scc_compare_collisions): New global counters.
55         (compare_tree_sccs_1): New function.
56         (compare_tree_sccs): Likewise.
57         (unify_scc): Likewise.
58         (lto_read_decls): Stream in tree SCCs and unify them on the
59         way in.  Finalize prevailing SCC tree members.
60         (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
61         Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
62         to ggc-collect during merging.
63         (print_lto_report_1): Adjust for new merging code.
65 2013-06-12  Jan Hubicka  <jh@suse.cz>
67         * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
69 2013-06-12  Jan Hubicka  <jh@suse.cz>
71         * lto.c (register_resolution): Take lto_file_data argument.
72         (lto_register_var_decl_in_symtab,
73         lto_register_function_decl_in_symtab): Update.
74         (read_cgraph_and_symbols): Update resolution_map handling.
76 2013-06-11 Jan Hubicka  <jh@suse.cz>
78         * lto-partition.c (get_symbol_class): Simplify weakref handling.
79         (add_symbol_to_partition_1): Likewise.
80         (contained_in_symbol): Likewise.
81         (lto_balanced_map): Likewise.
82         (rename_statics): Drop weakref.
84 2013-06-05  Richard Biener  <rguenther@suse.de>
86         * lto.c (num_merged_types): New global variable.
87         (uniquify_nodes): Increase num_merged_types when merging a type.
88         (print_lto_report_1): Output the number of merged types.
90 2013-06-01  Jan Hubicka  <jh@suse.cz>
92         * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
93         lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
94         (do_whole_program_analysis): Update dumping.
96 2013-05-29  Jan Hubicka  <jh@suse.cz>
98         * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
99         flags.
100         * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
102 2013-05-15  Jan Hubicka  <jh@suse.cz>
104         * lto-partition.c (privatize_symbol_name): Return true when
105         privatizing happened.
106         (rename_statics): Do not go into infinite loop when privatizing
107         is not needed.
109 2013-05-16  Jason Merrill  <jason@redhat.com>
111         * Make-lang.in ($(LTO_EXE)): Use link mutex.
113 2013-05-15  Martin Jambor  <mjambor@suse.cz>
115         * lto-partition.c (lto_balanced_map): Print symbol order instead
116         of node uids.
118 2013-05-15  Jan Hubicka  <jh@suse.cz>
120         PR lto/57038
121         PR lto/47375
122         * lto-partition.c (get_symbol_class): Fix weakrefs.
123         (lto_balanced_map): Fix weakrefs.
124         (privatize_symbol_name): Remove unnecesary label.
125         (rename_statics): Handle weakrefs as statics.
127 2013-05-09  Jan Hubicka  <jh@suse.cz>
128             Richard Biener  <rguenther@suse.de>
130         * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
131         (lto_register_var_decl_in_symtab): Likewise.
132         (lto_main): Promote statics.
133         * lto-partition.c (privatize_symbol_name): New function.
134         (promote_symbol): Use it.
135         (may_need_named_section_p): New predicate.
136         (rename_statics): New functions.
137         (lto_promote_cross_file_statics): Simplify; do renaming.
138         (lto_promote_statics_nonwpa): New function.
139         * lto-partition.h (lto_promote_statics_nonwpa): New function.
141 2013-02-08  Richard Biener  <rguenther@suse.de>
143         PR lto/56231
144         * lto-lang.c (lto_init): Do not enter a dummy file.
146 2013-02-07  Uros Bizjak  <ubizjak@gmail.com>
148         PR bootstrap/56227
149         * lto.c (lto_resolution_ready): Use %wx instead of
150         HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
152 2013-02-04  Richard Guenther  <rguenther@suse.de>
154         PR lto/56168
155         * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
156         or lto_fixup_decls at LTRANS time.
158 2013-01-09  Jan Hubicka  <jh@suse.cz>
160         PR lto/45375
161         * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
163 2012-12-10  H.J. Lu  <hongjiu.lu@intel.com>
165         PR lto/55466
166         * lto.c (lto_register_var_decl_in_symtab): Don't record static
167         variables.
168         (lto_main): Record the global variables if WPA isn't enabled.
170 2012-11-20  Diego Novillo  <dnovillo@google.com>
171             Jakub Jelinek  <jakub@redhat.com>
173         * lto.c: Replace all vec<T, A>() initializers with vNULL.
175 2012-11-16  Diego Novillo  <dnovillo@google.com>
177         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
179         * lto-lang.c: Use new vec API in vec.h.
180         * lto-partition.c: Likewise.
181         * lto-partition.h: Likewise.
182         * lto.c: Likewise.
184 2012-10-31  Lawrence Crowl  <crowl@google.com>
186         * lto.c (lto_wpa_write_files): Change symtab checking to a checked
187         down-cast via dyn_cast.
188         * lto-partition.c (add_symbol_to_partition_1): Likewise.
189         (undo_partition): Likewise.
190         (lto_balanced_map): Likewise.
191         (get_symbol_class): Likewise and via is_a.
192         (lto_balanced_map): Change symtab checking to is_a.
194 2012-10-12  Richard Biener  <rguenther@suse.de>
196         PR lto/54898
197         * lto.c (gimple_types_compatible_p_1): Also compare
198         TYPE_MAIN_VARIANT.
199         (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
201 2012-10-09  Tobias Burnus  <burnus@net-b.de>
203         * lto-lang.c (lto_register_builtin_type): Avoid useless
204         decl creation.
205         * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
207 2012-10-08  Tobias Burnus  <burnus@net-b.de>
209         * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
210         Free lto_file struct after closing the file.
212 2012-10-08  Jan Hubicka  <jh@suse.cz>
214         * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
215         (fixup_integer_cst): New functoin.
216         (lto_ft_type): Fixup BASETYPE of methods and offsets.
218 2012-10-07  Jan Hubicka  <jh@suse.cz>
220         * lto.c (read_cgraph_and_symbols): Release type merging hash early;
221         release input encoders.
222         * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
224 2012-10-06  Jan Hubicka  <jh@suse.cz>
226         PR lto/54790 
227         * lto.c (resolution_map): New static var.
228         (register_resolution): New function.
229         (lto_register_var_decl_in_symtab): Use it.
230         (read_cgraph_and_symbols): Copy resolutions into the symtab.
232 2012-09-20  Martin Jambor  <mjambor@suse.cz>
234         * lto.c (lto_materialize_function): Call push_struct_function and
235         pop_cfun.
237 2012-09-19  Dehao Chen  <dehao@google.com>
239         * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
241 2012-09-19  Jan Hubicka  <jh@suse.cz>
243         * lto.c (lto_materialize_function): Update confused comment.
244         (read_cgraph_and_symbols): Do not free symtab.
246 2012-09-12  Jan Hubicka  <jh@suse.cz>
248         * lto.c (do_whole_program_analysis): Care timevars, statistics and
249         AUX pointer cleaning. Add max partitioning.
250         * lto-partition.c (enum symbol_class): New.
251         (get_symbol_class): New function.
252         (symbol_partitioned_p): New function.
253         (add_references_to_partition): Remove.
254         (add_aliases_to_partition): Remove.
255         (add_cgraph_node_to_partition_1): Remove.
256         (add_cgraph_node_to_partition): Remove.
257         (add_symbol_to_partition): New function.
258         (add_symbol_to_partition_1): New function.
259         (contained_in_symbol): New function.
260         (partition_cgraph_node_p): Remove.
261         (partition_varpool_node_p): Remove.
262         (partition_symbol_p): Remove.
263         (lto_1_to_1_map): Cleanup.
264         (lto_max_map): New.
265         (lto_balanced_map): Update.
266         (lto_promote_cross_file_statics): Update.
267         * lto-partition.h (lto_max_map): Declare.
268         * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
270 2012-09-11  Jan Hubicka  <jh@suse.cz>
272         PR lto/54312
273         * lto.c (uniquify_nodes): Remove quadratic loop checking if the
274         type is variant leader.
276 2012-09-11  Richard Guenther  <rguenther@suse.de>
278         * lto.c (enum gtc_mode): Remove.
279         (struct type_pair_d): Adjust.
280         (lookup_type_pair): Likewise.
281         (gimple_type_leader): Do not mark as deletable.
282         (gimple_lookup_type_leader): Adjust.
283         (gtc_visit): Likewise.
284         (gimple_types_compatible_p_1): Likewise.
285         (gimple_types_compatible_p): Likewise.
286         (gimple_type_hash): Likewise.
287         (gimple_register_type): Likewise.
288         (read_cgraph_and_symbols): Manage lifetime of tables
289         here.
291 2012-09-11  Richard Guenther  <rguenther@suse.de>
293         * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
294         struct type_pair_d, lookup_type_pair, struct sccs,
295         next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
296         gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
297         gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
298         visit, iterative_hash_name, struct type_hash_pair,
299         type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
300         gimple_type_eq, gimple_register_type_1, gimple_register_type):
301         Move here from gimple.c
302         (read_cgraph_and_symbols): Free hash tables here.
303         (print_lto_report_1): New function wrapping print_lto_report.
304         (do_whole_program_analysis): Call it.
305         (lto_main): Likewise.
307 2012-09-10  Jan Hubicka  <jh@suse.cz>
309         * lto-partition.c (partition_symbol_p): Forward declare.
310         (add_references_to_partition): Reimplement using partition_symbol_p.
311         (add_aliases_to_partition): Break out from add_references_to_partition;
312         reimplement using partition_symbol_p.
313         (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
314         add sanity checks.
315         (add_varpool_node_to_partition): Use add_aliases_to_partition.
316         (partition_varpool_node_p): Do not special case aliases.
318 2012-08-12  Jan Hubicka  <jh@suse.cz>
320         * lto.c (lto_wpa_write_files): Do not delete partition encoder;
321         it is deleted after streaming.
322         * lto-partition.c (partition_symbol_p): New function.
323         (promote_var, promote_fn): Remove.
324         (promote_symbol): New function.
325         (lto_promote_cross_file_statics): First compute boundaries; rewrite
326         to lookup the actual boundaries instead of computing them ad-hoc.
328 2012-08-12  Jan Hubicka  <jh@suse.cz>
330         Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
331         in partitioning.
332         * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
333         by encoder.
334         * lto-partition.c (new_partition): Update.
335         * lto.c (cmp_partitions_order): Update.
336         (lto_wpa_write_files): Update.
337         (free_ltrans_partitions): Update.
338         (add_references_to_partition): Update.
339         (add_cgraph_node_to_partition_1): Update.
340         (add_cgraph_node_to_partition): Update.
341         (add_varpool_node_to_partition): Update.
342         (undo_partition): Update.
343         (lto_balanced_map): Update.
344         (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
345         set_referenced_from_this_partition_p): Update.
346         (lto_promote_cross_file_statics): Update.
348 2012-08-12  Jan Hubicka  <jh@suse.cz>
350         * lto-partition.c (set_referenced_from_other_partition_p,
351         set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
352         New functions.
353         (lto_promote_cross_file_statics): Use them.
355 2012-07-24  Jan Hubicka  <jh@suse.cz>
357         * lto.c (read_cgraph_and_symbols): Use input_symtab.
359 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
361         * lto-tree.h (lang_decl): Add variable_size GTY option.
363 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
365         * lto.c: Do not include timevar.h.
366         * Make-lang.in: Fix dependencies.
368 2012-06-18  Lawrence Crowl  <crowl@google.com>
370         * lto.c (do_whole_program_analysis):  Rename use of TV_PHASE_CGRAPH to
371         TV_PHASE_OPT_GEN.  Use new timevar TV_PHASE_STREAM_OUT around the call
372         to lto_wpa_write_files.
373         (lto_main):  Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN.  Move
374         start of TV_PHASE_OPT_GEN to include call to materialize_cgraph.  Use
375         TV_PHASE_SETUP for the call to lto_init.  Use new timevar
376         TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
377         Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
378         to be a front end, but is not one.
380 2012-05-18  Jan Hubicka  <jh@suse.cz>
382         * lto.c (lto_materialize_constructors_and_inits): Remove.
383         (read_cgraph_and_symbols): Remove handling of alias pairs.
385 2012-05-17  Jan Hubicka  <jh@suse.cz>
387         * lto-partition.c (add_references_to_partition): Handle external vars.
388         (partition_varpool_node_p): Likewise.
389         (lto_promote_cross_file_statics): Do not promote externals.
391 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
393         * lto-lang.c (handle_fnspec_attribute): New static function.
394         (lto_attribute_table): Add "fn spec".
395         (DEF_ATTR_STRING): Define and undefine along with the other macros.
397 2012-05-04  Jan Hubicka  <jh@suse.cz>
399         * lto.c (do_whole_program_analysis): Set timevars correctly.
400         (lto_main): Likewise.
402 2012-05-04  Richard Guenther  <rguenther@suse.de>
404         * lang.opt (fwpa): Do not mark as Optimization.
405         (fltrans): Likewise.
407 2012-04-30  Jan Hubicka  <jh@suse.cz>
409         * lto.c (lto_main): Use compile ().
410         * lto-partition.c (partition_cgraph_node_p): Use
411         symtab_used_from_object_file_p.
412         (partition_varpool_node_p): Likewise.
414 2012-04-20  Jan Hubicka  <jh@suse.cz>
416         * lto-partition.c (partition_cgraph_node_p): Use force_output.
418 2012-04-18  Jan Hubicka  <jh@suse.cz>
420         * lto-partition.c (add_references_to_partition, lto_balanced_map):
421         Update for new ipa-ref API.
423 2012-04-16  Jan Hubicka  <jh@suse.cz>
425         * lto.c (read_cgraph_and_symbols): Use FOR_EACH
426         walkers to walk cgraph and varpool.
427         (materialize_cgraph): Likewise.
428         * lto-partition.c (lto_1_to_1_map): Likewise.
429         (lto_balanced_map): Likewise.
430         (lto_promote_cross_file_statics): Likewise.
432 2012-04-14  Jan Hubicka  <jh@suse.cz>
434         * lto.c: Update field referenced for new cgraph/varpool layout.
435         * lto-partition.c: Likewise.
437 2012-04-11  Jan Hubicka  <jh@suse.cz>
439         * lto.c: Update copyright; remove params.h, ipa-inline.h
440         and ipa-utils.h inlines; inline lto-partition.h
441         (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
442         add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
443         add_references_to_partition, add_cgraph_node_to_partition_1,
444         add_cgraph_node_to_partition, add_varpool_node_to_partition,
445         undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
446         lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
447         promote_var, promote_fn, lto_promote_cross_file_statics): move to...
448         * lto-partition.c: ... here; new file.
449         * lto-partition.h: New file.
450         * Make-lang.in (lto.o): Update dependencies.
451         (lto-partition.o): New.
453 2012-04-05  Richard Guenther  <rguenther@suse.de>
455         * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
456         definition.
458 2012-03-12  Richard Guenther  <rguenther@suse.de>
460         * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
462 2012-03-06  Richard Guenther  <rguenther@suse.de>
464         PR lto/52097
465         * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
467 2012-02-28  Richard Guenther  <rguenther@suse.de>
469         PR lto/52400
470         * lto.c (lto_register_function_decl_in_symtab): Do not register
471         a reverse renamed decl mapping.
473 2012-01-06  Jakub Jelinek  <jakub@redhat.com>
475         PR lto/51774
476         * lto-lang.c (handle_returns_twice_attribute): New function.
477         (lto_attribute_table): Add returns_twice attribute.
479 2011-12-21  Richard Guenther  <rguenther@suse.de>
481         * lto.c (GIMPLE_REGISTER_TYPE): New define.
482         (LTO_FIXUP_TREE): Use it.
483         (uniquify_nodes): Mark new non-prevailing types and avoid
484         calling gimple_register_type on others.
485         (lto_read_decls): Add comment.
487 2011-12-13  Eric Botcazou  <ebotcazou@adacore.com>
489         * lto.h (lto_parse_hex): Delete.
490         * lto.c (lto_read_decls): Use 'int' for offsets.
491         (lto_parse_hex): Make static and return proper 64-bit host type.
492         (lto_resolution_read): Use proper 64-bit host type.
494 2011-12-13  Richard Guenther  <rguenther@suse.de>
496         PR lto/48354
497         * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
498         with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
500 2011-12-01  Uros Bizjak  <ubizjak@gmail.com>
502         * lto-lang.c (lto_attribute_table): Handle *tm regparm.
503         (ignore_attribute): New.
505 2011-11-21  Aldy Hernandez  <aldyh@redhat.com>
507         * lto-lang.c (lto_attribute_table): Handle transaction_pure.
508         (handle_transaction_pure_attribute): New.
510 2011-11-03  Richard Guenther  <rguenther@suse.de>
512         PR lto/44965
513         * lto-lang.c (lto_post_options): Do not read file options.
514         * lto.c (lto_read_all_file_options): Remove.
515         (lto_init): Call lto_set_in_hooks here.
517 2011-10-09  Jan Hubicka  <jh@suse.cz>
519         * lto.c (node_cmp, varpool_node_cmp): New functions.
520         (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
521         (cmp_partitions): Rename to ...
522         (cmp_partitions_size): ... this one.
523         (cmp_partitions_order): New function.
524         (lto_wpa_write_files): Sort partitions by order when
525         -fno-toplevel-reorder is used.
527 2011-10-09  Andi Kleen  <ak@linux.intel.com>
529         * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
531 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
533         * lto-lang.c (def_builtin_1): Delete old interface with two
534         parallel arrays to hold standard builtin declarations, and replace
535         it with a function based interface that can support creating
536         builtins on the fly in the future.  Change all uses, and poison
537         the old names.  Make sure 0 is not a legitimate builtin index.
539 2011-10-02   Andi Kleen <ak@linux.intel.com>
541         * lto-object.c (lto_obj_add_section_data): Add list.
542         (lto_obj_add_section): Fill in list.
543         (ltoobj_build_section_table): Pass through list.
544         * lto.c (file_data_list): Declare.
545         (create_subid_section_table): Pass arguments directly.
546         Fill in list of file_datas.
547         (lwstate): Delete.
548         (lto_create_files_from_ids): Pass in direct arguments.
549         Don't maintain list.
550         (lto_file_read): Use explicit section and file data lists.
551         (lto_read_all_file_options): Pass in section_list.
552         * lto.h (lto_obj_build_section_table): Add list.
553         (lto_section_slot): Add next.
554         (lto_section_list): Declare.
556 2011-10-02  Jan Hubicka  <jh@suse.cz>
558         PR lto/47247
559         * common.c (lto_resolution_str): Add new resolution.
560         * common.h (lto_resolution_str): Likewise.
562 2011-09-30  H.J. Lu  <hongjiu.lu@intel.com>
563             Andi Kleen  <ak@linux.intel.com>
565         PR lto/50568
566         * lto.c (lto_splay_tree_delete_id): New.
567         (lto_splay_tree_compare_ids): Likewise.
568         (lto_splay_tree_lookup): Likewise.
569         (lto_splay_tree_id_equal_p): Likewise.
570         (lto_splay_tree_insert): Likewise.
571         (lto_splay_tree_new): Likewise.
572         (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
573         Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
574         (create_subid_section_table): Use lto_splay_tree_lookup and
575         lto_splay_tree_insert.
576         (lto_file_read): Use lto_splay_tree_new.
578 2011-09-26   Andi Kleen <ak@linux.intel.com>
580         * lto.c (lto_resolution_read): Remove id dumping.
581         (lto_section_with_id): Turn id HOST_WIDE_ID.
582         (create_subid_section_table): Dito.
584 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
586         * lto-lang.c (lto_init): Likewise.  Also, avoid calling
587         linemap_add twice.
589 2011-08-11  Martin Jambor  <mjambor@suse.cz>
591         * lto.c (uniquify_nodes): Use main variant's BINFO too.
593 2011-08-08   Diego Novillo  <dnovillo@google.com>
595         * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
596         * lto.c: Include tree-streamer.h.
598 2011-07-06  Richard Guenther  <rguenther@suse.de>
600         * lto-lang.c (lto_init):
601         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
603 2011-06-11  Jan Hubicka  <jh@suse.cz>
605         PR lto/48246
606         * lto.c (lto_1_to_1_map): Don't create empty partitions.
607         (lto_balanced_map): Likewise.
609 2011-06-11  Jan Hubicka  <jh@suse.cz>
611         * lto.c (add_cgraph_node_to_partition_1): Break out from ...
612         (add_cgraph_node_to_partition) ... here; walk aliases.
613         (lto_1_to_1_map): Remove same body alias code.
614         (promote_fn): Likewise.
615         (lto_promote_cross_file_statics): Update comment.
618 2011-06-07  Diego Novillo  <dnovillo@google.com>
620         * lto.c (uniquify_nodes): Move code to register decls to
621         the loop that computes canonical types.
623 2011-06-07  Richard Guenther  <rguenther@suse.de>
625         * lto-lang.c (lto_init): Do not set
626         size_type_node or call set_sizetype.
628 2011-06-04  Diego Novillo  <dnovillo@google.com>
630         * lto.c (lto_init): New.
631         (lto_main): Call it.
633 2011-06-03  Diego Novillo  <dnovillo@google.com>
635         * lto.c (get_resolution): Move from lto-streamer-in.c.
636         (lto_register_var_decl_in_symtab): Likewise.
637         (lto_register_function_decl_in_symtab): Likewise.
638         (uniquify_nodes): Call lto_register_var_decl and
639         lto_register_function_decl_in_symtab after reading a new
640         VAR_DECL or FUNCTION_DECL.
642 2011-06-01  Richard Guenther  <rguenther@suse.de>
644         * lto-lang.c (lto_register_canonical_types): New function.
645         (lto_init): Register common nodes with the canonical type machinery.
646         Do not play tricks with char_type_node.
648 2011-05-26  Richard Guenther  <rguenther@suse.de>
650         * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
652 2011-05-25  Nathan Froyd  <froydnj@codesourcery.com>
654         * lto.c (lto_ft_typed): New function.
655         (lto_ft_common): Call it.
656         (lto_ft_constructor): Likewise.
657         (lto_ft_expr): Likewise.
658         (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
659         TREE_CHAIN.
661 2011-05-20  Richard Guenther  <rguenther@suse.de>
663         * lto.c (lto_ft_common): Remove pointer-to chain teardown.
664         (lto_ft_type): Move main-variant and pointer-to chain building ...
665         (uniquify_nodes): ... here.  Compute TYPE_CANONICAL also here,
666         in a separate final loop.
668 2011-05-19  Richard Guenther  <rguenther@suse.de>
670         * lto.c (uniquify_nodes): First register all types before
671         fixing up the tree SCC.
673 2011-05-11  Jan Hubicka  <jh@suse.cz>
675         PR lto/48952
676         * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
678 2011-05-11  Nathan Froyd  <froydnj@codesourcery.com>
680         * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL.  Adjust
681         location of binfo field.
682         (lto_fixup_prevailing_decls): Likewise.
684 2011-05-10  Nathan Froyd  <froydnj@codesourcery.com>
686         * lto-lang.c (def_fn_type): Don't call build_function_type, call
687         build_function_type_array or build_varargs_function_type_array
688         instead.
690 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
692         * lto-lang.c (global_bindings_p): Return bool.
694 2011-05-07  Jan Hubicka  <jh@suse.cz>
696         * lto.c (lto_materialize_function): Use
697         cgraph_function_with_gimple_body_p.
698         (add_cgraph_node_to_partition): Do not re-add items to partition;
699         handle thunks.
700         (add_varpool_node_to_partition): Do not re-add items to partition.
702 2011-05-03  Jan Hubicka  <jh@suse.cz>
704         * lto.c (free_ltrans_partitions): Fix accidental commit.
706 2011-05-03  Jan Hubicka  <jh@suse.cz>
708         * lto.c (ltrans_partition_def): Remove GTY annotations.
709         (ltrans_partitions): Move to heap.
710         (new_partition): Update.
711         (free_ltrans_partitions): New function.
712         (lto_wpa_write_files): Use it.
714 2011-04-29  Martin Jambor  <mjambor@suse.cz>
716         * lto.c: Include ipa-utils.h.
717         (lto_balanced_map): Update call to ipa_reverse_postorder.
718         * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
720 2011-04-29  Michael Matz  <matz@suse.de>
722         * lto.c (toplevel): Include tree-flow.h.
723         (lto_read_in_decl_state): Don't merge types here.
724         (tree_with_vars): New static hash table.
725         (remember_with_vars): New static functions.
726         (LTO_FIXUP_TYPE): New macro.
727         (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
728         lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
729         lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
730         lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
731         (lto_read_decls): Uniquify while reading in trees.
732         (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
733         LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
734         lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
735         lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
736         lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
737         lto_fixup_tree): Remove.
738         (lto_fixup_state): Remove data argument.  Use
739         lto_symtab_prevailing_decl.
740         (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
741         (lto_fixup_prevailing_decls): New function.
742         (lto_fixup_state_aux): Argument aux is unused.
743         (lto_fixup_decls): Don't allocate pointer sets, don't use
744         lto_fixup_tree, use lto_fixup_prevailing_decls.
745         (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
746         * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
748 2011-04-16  Eric Botcazou  <ebotcazou@adacore.com>
750         * lto.c (lto_balanced_map): Fix typos in head comment.
751         (lto_promote_cross_file_statics): Fix long lines and remove redundant
752         test.
754 2011-04-16  Jan Hubicka  <jh@suse.cz>
756         * lto.c (lto_balanced_map): Update.
758 2011-04-14  Jan Hubicka  <jh@suse.cz>
760         * lto.c: Include ipa-inline.h
761         (add_cgraph_node_to_partition, undo_partition): Use inline_summary
762         accessor.
763         (ipa_node_duplication_hook): Fix declaration.
764         * Make-lang.in (lto.o): Update dependencies.
766 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
768         * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
769         calling TREE_CHAIN.
770         * lto.c (lto_fixup_common): Likewise.
772 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
774         * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
775         (handle_type_generic_attribute): Likewise.
777 2011-04-03  Michael Matz  <matz@suse.de>
779         * lto.c (lto_materialize_function): Don't read and then discard
780         sections in WPA mode.
781         (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
783         * lto-lang.c (registered_builtin_fndecls): Remove.
784         (lto_getdecls): Return NULL_TREE.
785         (lto_builtin_function): Don't remember in registered_builtin_fndecls.
787 2011-03-31  Richard Guenther  <rguenther@suse.de>
789         PR lto/48246
790         * lto.c (lto_wpa_write_files): Disable assert for non-empty
791         partitions when checking is not enabled.
793 2011-03-25  Kai Tietz  <ktietz@redhat.com>
795         * lto.c (lto_resolution_read): Use filename_cmp instead
796         of strcmp.
797         (lto_read_section_data): Likewise.
799 2011-03-25  Jeff Law  <law@redhat.com>
801         * lto/lto-lang.c (def_fn_type): Add missing va_end.
803 2011-03-21  Kai Tietz  <ktietz@redhat.com>
805         PR target/12171
806         * lto-lang.c (lto_attribute_table): Adjust table.
808 2011-02-18  Jakub Jelinek  <jakub@redhat.com>
810         PR bootstrap/47807
811         * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
812         of lto-streamer.h.
814 2011-02-18  Richard Guenther  <rguenther@suse.de>
816         PR lto/47798
817         * lto-tree.h (lto_global_var_decls): Do not declare here.
818         * lto-lang.c: Include lto-streamer.h.
819         * Make-lang.in (lto-lang.o): Adjust dependencies.
821 2011-02-10  Kai Tietz  <kai.tietz@onevision.com>
823         PR lto/47241
824         * lto.c (lto_read_section_data): Free
825         fd_name in failure case.
826         For mingw targets don't hash file-descriptor.
827         (read_cgraph_and_symbols): Close current_lto_file
828         in failure case.
830 2011-01-11  Jan Hubicka  <jh@suse.cz>
832         PR lto/45721
833         PR lto/45375
834         * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
835         are not partitioned.
837 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
839         * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
840         Use prototype_p.
842 2010-12-06  Richard Guenther  <rguenther@suse.de>
844         PR lto/46796
845         * lto-lang.c (lto_init): Give names to basic types.
847 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
849         * lto-object.c: Don't include toplev.h.
850         * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
852 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
854         * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
855         $(TOPLEV_H).
857 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
859         * lto-endian.h: Delete.
860         * lto-object.c: Don't include "libiberty.h".
861         (O_BINARY): Don't define.
862         * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
863         (O_BINARY): Don't define.
865 2010-11-23  Richard Guenther  <rguenther@suse.de>
867         * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
869 2010-11-23  Richard Guenther  <rguenther@suse.de>
871         PR lto/46605
872         * lto.c (read_cgraph_and_symbols): Bail out after errors.
874 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
876         * lto.c (lto_main): Take no arguments.
877         * lto.h (lto_main): Update prototype.
879 2010-11-16  Ian Lance Taylor  <iant@google.com>
881         * lto-object.c (lto_obj_file_open): Call
882         simple_object_attributes_merge rather than
883         simple_object_attributes_compare.
885 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
887         * Make-lang.in (lto/lto.o): Use $(OPTS_H).
888         * lto-lang.c (lto_handle_option): Take location_t parameter.
890 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
892         * lto.c (lto_resolution_read): Start diagnostics with lowercase
893         letters and remove trailing '.'.
894         (lto_file_finalize): Start diagnostic with a lowercase letter.
896 2010-11-02  Ian Lance Taylor  <iant@google.com>
898         * lto-object.c: New file.
899         * lto-elf.c: Remove file.
900         * lto-macho.c: Remove file.
901         * lto-macho.h: Remove file.
902         * lto-coff.c: Remove file.
903         * lto-coff.h: Remove file.
904         * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
905         lto/lto-object.o.
906         ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
907         (lto/lto-objfile.o): New target.
908         (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
909         (lto/lto.o): Remove $(LIBIBERTY_H).
911 2010-10-22  Jan Hubicka  <jh@suse.cz>
913         * lto.c (add_cgraph_node_to_partition,
914         add_varpool_node_to_partition): Add debug info.
915         (lto_1_to_1_map, lto_balanced_map): Do not re-add already
916         partitioned nodes.
917         (do_whole_program_analysis): Set function flags before dumping.
919 2010-10-22  Richard Guenther  <rguenther@suse.de>
921         * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
922         the new gimple_register_canonical_type.
924 2010-10-20  H.J. Lu  <hongjiu.lu@intel.com>
926         PR bootstrap/45954
927         * config-lang.in (boot_language): Set to $enable_lto.
929 2010-10-18  Jakub Jelinek  <jakub@redhat.com>
931         PR lto/45638
932         * Make-lang.in (check-lto): New dummy target.
934 2010-10-14  Eric Botcazou  <ebotcazou@adacore.com>
936         * lto-elf.c (SHN_XINDEX): Define if not already defined.
938 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
940         * lto-lang.c (lto_init_options): Change to
941         lto_init_options_struct.  Update parameters.
942         (LANG_HOOKS_INIT_OPTIONS): Don't define.
943         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
945 2010-10-06  Jan Hubicka  <jh@suse.cz>
947         * lto.c (lto_balanced_map): Fix accounting of program size.
949 2010-10-06  Jan Hubicka  <jh@suse.cz>
951         * lto.c (lto_balanced_map): Do not produce empty partitions.
953 2010-10-06  Andi Kleen <ak@linux.intel.com>
955         * lto.c (lto_process_name): Add.
956         (lto_main): Call lto_process_name.
958 2010-10-06  Jan Hubicka  <jh@suse.cz>
960         * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
961         COMDATs required by the linker.
963 2010-10-05  Ian Lance Taylor  <iant@google.com>
965         * lto.c (lto_section_with_id): Make s a const pointer.
967 2010-10-05  Jan Hubicka  <jh@suse.cz>
969         * lto.c:  Include params.h.
970         (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
971         refcounting in aux field.
972         (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
973         New functions.
974         (lto_1_to_1_map): Simplify.
975         (lto_balanced_map): New function.
976         (do_whole_program_analysis): Chose proper partitioning alg.
977         * Make-lang.in (lto.o): Add dependency on params.h
979 2010-10-04  Andi Kleen <ak@linux.intel.com>
981         * Make-lang.in (lto1): Add + to build rule.
983 2010-10-03  Andi Kleen <ak@linux.intel.com>
985         * lto.c (lto_file_finalize): Replace gcc_assert for missing section
986           with fatal_error.
988 2010-09-28  Jan Hubicka  <jh@suse.cz>
990         * lto-lang.c (handle_leaf_attribute): New function.
991         (lto_attribute_tables): Add leaf.
993 2010-09-25  Jie Zhang  <jie@codesourcery.com>
995         * lto.c (lto_read_all_file_options): Start a new line after
996         printing out file names.
998 2010-09-24  Jan Hubicka  <jh@suse.cz>
1000         * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1002 2010-09-20  Jan Hubicka  <jh@suse.cz>
1004         PR tree-optimize/45605
1005         * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1007 2010-09-18  Gerald Pfeifer  <gerald@pfeifer.com>
1009         * lto-elf.c (lto_obj_file_open): Also provide filename when
1010         elf_begin fails.
1012 2010-09-17  Jan Hubicka  <jh@suse.cz>
1014         * lto.c (lto_promote_cross_file_statics): Use const_value_known.
1016 2010-09-17  Richard Guenther  <rguenther@suse.de>
1018         * lang.opt (flag_wpa): Also enable for the driver.
1020 2010-09-16  Jan Hubicka  <jh@suse.cz>
1022         * lto.c (lto_materialize_function): Do not tamper with STATIC and
1023         EXTERNAL flags. 
1025 2010-09-15  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1027         * lto-tree.h (struct lang_type): Add variable_size GTY option.
1029 2010-09-08  Jan Hubicka  <jh@suse.cz>
1031         * lto.c (real_file_count, real_file_decl_data): New static vars.
1032         (read_cgraph_and_symbols): Use it.
1034 2010-09-08  Richard Guenther  <rguenther@suse.de>
1036         * lto.c (read_cgraph_and_symbols): Collect again after each
1037         file.
1039 2010-09-07  Jan Hubicka  <jh@suse.cz>
1041         * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
1043 2010-09-03  Richard Guenther  <rguenther@suse.de>
1045         * lto-elf.c (validate_file): Always error if validation fails.
1047 2010-08-20  Jan Hubicka  <jh@suse.cz>
1049         * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
1050         (lto_wpa_write_files): Update comments.
1052 2010-08-20  H.J. Lu  <hongjiu.lu@intel.com>
1054         PR bootstrap/45357
1055         * lto.c (lto_materialize_function): Replace has_analyzed_clone
1056         with has_analyzed_clone_p.
1058 2010-08-20  Jan Hubicka  <jh@suse.cz>
1060         * lto.c (has_analyzed_clone_p): New function
1061         (lto_materialize_function): Use callgraph to determine if
1062         body is needed.
1063         (materialize_cgraph): Remove DECL_IS_BUILTIN check.
1065 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
1067         * lto.c: Use FOR_EACH_VEC_ELT.
1069 2010-07-27  Andi Kleen <ak@linux.intel.com>
1071         * Make-lang.in (lto.o): Add dependency to splay-tree.h
1073 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
1075         * lto-lang.c (lto_handle_option): Update prototype and return
1076         value type.  Remove duplicate assignment to result.
1078 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
1080         * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
1081         New.
1082         (lto_init_options): Update prototype.
1083         (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
1084         Define.
1086 2010-07-10   Andi Kleen <ak@linux.intel.com>
1088         PR lto/44992
1089         * lto.c: Include splay-tree.h
1090         (lto_resolution_read): Change to walk file_ids tree and parse
1091         extra file_id in resolution file.
1092         (lto_section_with_id): Add.
1093         (create_subid_section_table): Add.
1094         (lwstate): Add.
1095         (lto_create_files_from_ids): Add.
1096         (lto_file_read): Change to handle sub file ids and create list
1097         of file_datas. Add output argument for count.
1098         (get_section_data): Pass file_data to lto_get_section_name.
1099         (lto_flatten_file): Add.
1100         (read_cgraph_and_symbols): Handle linked lists of file_datas.
1102 2010-07-10  Andi Kleen <ak@linux.intel.com>
1104         * lto-coff.c (hash_name, eq_name): Move.
1105         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1106         * lto-elf.c: (hash_name, eq_name): Move.
1107         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1108         * lto-macho.c: (hash_name, eq_name): Move.
1109         (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1110         * lto.c: (hash_name, eq_name): Move from lto-*.c
1111         (lto_obj_create_section_hash_table): Add.
1112         (free_with_string): Add.
1114 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1116         * lto-coff.c: Include diagnostic-core.h in every file that
1117         includes toplev.h.
1118         * lto-elf.c: Likewise.
1119         * lto-lang.c: Likewise.
1120         * lto-macho.c: Likewise.
1122 2010-07-07  Jakub Jelinek  <jakub@redhat.com>
1124         * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
1125         (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
1126         objects.
1128 2010-07-05  Jan Hubicka  <jh@suse.cz>
1130         * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
1131         nodes from same comdat group as well as all comdat functions referenced
1132         here.
1133         (add_varpool_node_to_partition, add_references_to_partition): New
1134         function.
1135         (lto_1_1_map): Skip COMDAT fnctions/variables; use
1136         add_varpool_node_to_partition; clear aux flags when done.
1137         (lto_promote_cross_file_statics): Do not promote stuff that gets
1138         duplicated to each ltrans.
1140 2010-07-04  Jan Hubicka  <jh@suse.cz>
1142         * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
1144 2010-06-13  Richard Guenther  <rguenther@suse.de>
1146         * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
1148 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
1150         * lto.c (lto_resolution_read):  Pre-initialize local variable r.
1151         * lto-coff.c (coff_write_object_file): Add braces to if.
1153 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1155         * lto.c (lto_read_in_decl_state): Use typed GC allocation.
1156         (lto_file_read): Likewise.
1157         (new_partition): Likewise.
1158         (read_cgraph_and_symbols): Likewise.
1160 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
1162         * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
1163         (lto_handle_option): Don't set flag_signed_char here.
1165 2010-06-04  Richard Guenther  <rguenther@suse.de>
1167         PR lto/41584
1168         * lto.c (lto_1_to_1_map): Use the proper file_data for
1169         varpool nodes.
1171 2010-05-30  Jan Hubicka  <jh@suse.cz>
1173         * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
1174         partitioning decisions.
1176 2010-05-29  Jan Hubicka  <jh@suse.cz>
1178         * lto.c (bitmap vector): Remove.
1179         (lto_cgraph_node_sets,  lto_varpool_node_sets): Remove.
1180         (ltrans_partition_def): New structure.
1181         (ltrans_partition): New type and VECtor.
1182         (new_partition): New function.
1183         (add_cgraph_node_to_partition): New function.
1184         (lto_1_to_1_map): Reorganize for partitions.
1185         (lto_add_inline_clones): Remove.
1186         (lto_add_all_inlinees): Remove.
1187         (lto_promote_cross_file_statics): Use partitions.
1188         (cmp_partitions): New function.
1189         (lto_wpa_write_files): Do not call lto_add_all_inlinees;
1190         use partitions; output files sorted by size.
1192 2010-05-29  Steven Bosscher  <steven@gcc.gnu.org>
1194         * Make-lang.in: Replace vec.h dependency with VEC_H.
1196 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
1198         * lto-coff.c (coff_errmsg): Remove.
1199         (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
1200         errors instead of coff_errmsg (-1).
1201         * lto-macho.c (mach_o_errmsg): Remove.
1202         (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
1203         instead of mach_o_errmsg (-1).
1204         * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
1205         xstrerror (errno).
1207 2010-05-28  Richard Guenther  <rguenther@suse.de>
1209         * lto.c (prefix_name_with_star): Removed.
1210         (strip_extension): Likewise.
1211         (get_filename_for_set): Likewise.
1212         (lto_write_ltrans_list): Fold into ...
1213         (lto_wpa_write_files): ... this.  Name LTRANS units
1214         by suffixing the ltrans output list filename.
1215         (do_whole_program_analysis): Adjust.
1217 2010-05-27  Joseph Myers  <joseph@codesourcery.com>
1219         * lto.c: Include diagnostic-core.h instead of diagnostic.h.
1220         (read_cgraph_and_symbols, lto_main): Use seen_error.
1221         * Make-lang.in (lto/lto.o): Update dependencies.
1223 2010-05-27  Eric Botcazou  <ebotcazou@adacore.com>
1225         PR lto/44230
1226         * lto.h (lto_eh_personality): New prototype.
1227         * lto.c: Include debug.h.
1228         (first_personality_decl): New static variable.
1229         (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
1230         first function for which it is non-null.
1231         (lto_eh_personality_decl): New static variable.
1232         (lto_eh_personality): New function.
1233         * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
1234         * Make-lang.in (lto/lto.o): Add dependency on debug.h.
1236 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
1238         * lto-lang.c: Do not include expr.h.
1240 2010-05-24  Richard Guenther  <rguenther@suse.de>
1242         * lto-elf.c (lto_obj_build_section_table): Work around
1243         FreeBSD libelf issue.
1245 2010-05-22  Richard Guenther  <rguenther@suse.de>
1247         * lto.c (read_cgraph_and_symbols): Do not collect.
1249 2010-05-20  Jan Hubicka  <jh@suse.cz>
1251         * lto.c (promote_var, promote_fn): New functions.
1252         (lto_promote_cross_file_statics): Compute correctly boundary including
1253         static initializers of readonly vars.
1255 2010-05-18  Jan Hubicka  <jh@suse.cz>
1257         * lto.c (lto_1_to_1_map): Partition non-inline clones.
1258         (lto_promote_cross_file_statics): Deal with non-inline clones.
1260 2010-05-18  Jan Hubicka  <jh@suse.cz>
1262         * lto.c (lto_materialize_function): Announce function when
1263         reading body; allocate_struct_function only when reading body;
1264         do not finalize local statics; ggc_collect after reading;
1265         do not mark reachable node.
1266         (materialize_cgraph): Do not announce function.
1268 2010-05-11  Jan Hubicka  <jh@suse.cz>
1270         * lto.c (materialize_cgraph): Revert my previous patch.
1272 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
1274         * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
1275         IMAGE_FILE_MACHINE_AMD64.
1276         * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
1278 2010-05-11  Jan Hubicka  <jh@suse.cz>
1280         * lto.c (lto_fixup_decls): Remove global var decls freeing here.
1281         (materialize_cgraph): Add it here.
1283 2010-05-11  Jan Hubicka  <jh@suse.cz>
1285         * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
1286         vector.
1288 2010-05-11  Jan Hubicka  <jh@suse.cz>
1290         * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
1291         (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
1292         use reachable_from_other_partition_p and
1293         referenced_from_other_partition_p test.
1295 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
1297         * lto-coff.c (validate_file): Add x64-coff support.
1298         * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
1299         (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
1300         * lto-lang.c (lto_build_c_type_nodes): Add check for
1301         'long long unsigned int' for x64-windows.
1302         (lto_init): Likewise.
1305 2010-05-07  Steven Bosscher  <steven@gcc.gnu.org>
1307         * lto.h (struct lto_file_struct): Document offset member.
1308         * lto-endian.h: New file.
1309         * lto-macho.h: New file.
1310         * lto-macho.c: New file.
1311         * Make-lang.in: Add rule for lto-macho.o.
1313 2010-05-07  Richard Guenther <rguenther@suse.de>
1315         PR lto/43857
1316         PR lto/43371
1317         * lang.opt (fresolution): Change to ...
1318         (fresolution=): ... this.
1319         * lto-lang.c (lto_handle_option): Adjust.
1321 2010-05-07  Richard Guenther  <rguenther@suse.de>
1323         * lto.c (DUMPBASE_SUFFIX): Remove.
1324         (lto_execute_ltrans): Move functionality to lto-wrapper.c.
1325         Rename to ...
1326         (lto_write_ltrans_list): ... only output the list of ltrans files.
1327         (lto_maybe_unlink): Remove.
1328         (do_whole_program_analysis): Do not execute LTRANS phase
1329         from here.
1331 2010-05-06  H.J. Lu  <hongjiu.lu@intel.com>
1333         * lto-lang.c (lto_handle_option): Add argument kind.
1335 2010-05-05  Jan Hubicka  <jh@suse.cz>
1337         * lto.c (lto_promote_cross_file_statics): Compute boundary based on
1338         refs.
1340 2010-05-05  Jan Hubicka  <jh@suse.cz>
1342         * lto.c (lto_1_to_1_map): Partition only needed nodes.
1344 2010-04-30  Jan Hubicka  <jh@suse.cz>
1346         * lto.c (get_filename_for_set): Look for cgraph node and if none found,
1347         use default name.
1348         (lto_wpa_write_files): Write any non-empty partition.
1350 2010-04-30  Jan Hubicka  <jh@suse.cz>
1352         * lto.c: Do not attempt to make constant pool references global.
1354 2010-04-28  Jan Hubicka  <jh@suse.cz>
1356         * lto/lto.c (lto_read_in_decl_state): Use GGC.
1357         (lto_wpa_write_files): Announce what we are writting.
1358         (all_file_decl_data): New.
1359         (read_cgraph_and_symbols): Use GGC; correct timevars.
1360         (do_whole_program_analysis): Collect.
1361         * lto/Make-lang.in (lto.o): Fix dependency.
1362         * Makefile.in (GTFILES): Add lto-streamer.h.
1363         * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
1364         (varpool_assemble_pending_decls): Use VAROUT.
1365         * lto-streamer.h (lto_tree_ref_table): Annotate.
1366         (lto_in_decl_state): Annotate.
1367         (lto_file_decl_data): Annotate.
1369 2010-04-28  Jan Hubicka  <jh@suse.cz>
1371         * lto.c (lto_varpool_node_sets): New.
1372         (lto_1_to_1_map): Partition varpool too.
1373         (globalize_context_t, globalize_cross_file_statics,
1374         lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
1375         lto_scan_statics_in_remaining_global_vars): Remove.
1376         (lto_promote_cross_file_statics): Rewrite.
1377         (get_filename_for_set): Take vset argument.
1378         (lto_wpa_write_files): Pass around vsets.
1380 2010-04-27  Dave Korn  <dave.korn.cygwin@gmail.com>
1382         PR lto/42776
1383         * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
1384         hardcoding 'lto-elf.o'.
1385         ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
1387         * lto-coff.h: New file.
1388         * lto-coff.c: Likewise.
1390 2010-04-26  Richard Guenther  <rguenther@suse.de>
1392         * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
1394 2010-04-26  Dave Korn  <dave.korn.cygwin@gmail.com>
1396         * lto.h (lto_elf_file_open): Rename prototype from this ...
1397         (lto_obj_file_open): ... to this.
1398         (lto_elf_file_close): Likewise ...
1399         (lto_obj_file_close): ... and likewise.
1400         (lto_elf_build_section_table): Likewise ...
1401         (lto_obj_build_section_table): ... and likewise.
1402         (lto_elf_begin_section): Likewise ...
1403         (lto_obj_begin_section): ... and likewise.
1404         (lto_elf_append_data): Likewise ...
1405         (lto_obj_append_data): ... and likewise.
1406         (lto_elf_end_section): Likewise ...
1407         (lto_obj_end_section): ... and likewise.
1408         * lto.c (lto_file_read): Update references to the above.
1409         (lto_wpa_write_files): Likewise.
1410         (lto_read_all_file_options): Likewise.
1411         (read_cgraph_and_symbols): Likewise.
1412         * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
1413         (LANG_HOOKS_APPEND_DATA): Likewise.
1414         (LANG_HOOKS_END_SECTION): Likewise.
1415         * lto-elf.c (lto_elf_file_open): Rename from this ...
1416         (lto_obj_file_open): ... to this, updating any references.
1417         (lto_elf_file_close): Likewise ...
1418         (lto_obj_file_close): ... and likewise.
1419         (lto_elf_build_section_table): Likewise ...
1420         (lto_obj_build_section_table): ... and likewise.
1421         (lto_elf_begin_section): Likewise ...
1422         (lto_obj_begin_section): ... and likewise.
1423         (lto_elf_append_data): Likewise ...
1424         (lto_obj_append_data): ... and likewise.
1425         (lto_elf_end_section): Likewise ...
1426         (lto_obj_end_section): ... and likewise.
1428 2010-04-21  Jan Hubicka  <jh@suse.cz>
1430         * lto.c (lto_fixup_tree): Do not call wpa fixup.
1431         (materialize_cgraph): Likewise.
1433 2010-04-21  Jan Hubicka  <jh@suse.cz>
1435         * lto.c (lto_wpa_write_files): Update.
1436         (read_cgraph_and_symbols): Be more verbose.
1437         (materialize_cgraph): Likewise.
1438         (do_whole_program_analysis): Likewise.
1440 2010-04-21  Jan Hubicka  <jh@suse.cz>
1442         * lto.c (globalize_cross_file_statics): When function has address taken,
1443         it needs to be public.
1445 2010-04-20  Jan Hubicka  <jh@suse.cz>
1447         * lto.c (lto_add_inline_clones): Do not track inlined_decls.
1448         (lto_add_all_inlinees): Likewise.
1449         (lto_wpa_write_files): Likewise.
1451 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1453         * lto-lang.c (lto_init): Remove second argument in call to
1454         build_common_tree_nodes.
1456 2010-04-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1458         * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
1459         function.
1461 2010-03-09  Eric Botcazou  <ebotcazou@adacore.com>
1463         PR bootstrap/43276
1464         * lto-elf.c: Define EM_* constants if not already defined.
1466 2010-03-03  Eric Botcazou  <ebotcazou@adacore.com>
1468         * lto-elf.c (is_compatible_architecture): New static function.
1469         (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
1471 2010-02-11  Richard Guenther  <rguenther@suse.de>
1473         PR driver/43021
1474         * lto-elf.c (lto_elf_file_open): Handle file@offset case more
1475         appropriately.
1477 2010-01-11  Andy Hutchinson  <hutchinsonandy@gcc.gnu.org>
1479         * lto.c (O_BINARY): Define.
1480         (lto_read_section_data): Open file in binary mode.
1481         * lto-elf.c (O_BINARY): Define.
1482         (lto_elf_file_open): Open file in binary mode. 
1484 2010-01-08  Richard Guenther  <rguenther@suse.de>
1486         PR lto/42528
1487         * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
1488         (lto_init): Do not init char_type_node in a standard way
1489         but according to flag_signed_char.
1491 2010-01-03  H.J. Lu  <hongjiu.lu@intel.com>
1493         PR lto/41564
1494         * lto.c (DUMPBASE_SUFFIX): New.
1495         (lto_execute_ltrans): Append a sequence number to -dumpbase
1496         for LTRANS.
1498 2010-01-02  H.J. Lu  <hongjiu.lu@intel.com>
1500         PR lto/42580
1501         * lto-elf.c (lto_elf_file_open): Stop if the command line
1502         option file is missing.
1504 2009-12-15  Richard Guenther  <rguenther@suse.de>
1506         * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
1507         (lto_post_options): Do not disable debuginfo.
1509 2009-12-14  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
1511         * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
1513 2009-12-11  Richard Guenther  <rguenther@suse.de>
1515         PR lto/42037
1516         * lto.c (lto_resolution_read): Properly grow the vector.
1518 2009-12-11  Richard Guenther  <rguenther@suse.de>
1520         PR lto/41915
1521         * lto-lang.c (lto_init_options): Initialize flag_complex_method
1522         to the C99 default.  Do not set flag_unit_at_a_time.
1524 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
1526         * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
1527         variable.
1529 2009-11-19  Rafael Avila de Espindola  <espindola@google.com>
1531         PR bootstrap/42096
1532         * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
1533         * lto.c (lto_parse_hex): New.
1534         (lto_resolution_read): Use lto_parse_hex.
1535         * lto.h (lto_parse_hex): New.
1537 2009-11-17  Rafael Avila de Espindola  <espindola@google.com>
1539         * lto-elf.c (lto_file_init): Add offset argument.
1540         (lto_elf_file_open): Record the offset.
1541         * lto.c (lto_resolution_read): Change file_name into a lto_file
1542         argument. Check offsets.
1543         (lto_file_read): Update call to lto_resolution_read.
1544         * lto.h (lto_file_struct): Add the offset field.
1546 2009-11-16  Rafael Avila de Espindola  <espindola@google.com>
1548         * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
1550 2009-11-14  Jan Hubicka  <jh@suse.cz>
1552         * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
1554 2009-11-12  Rafael Avila de Espindola  <espindola@google.com>
1556         * lang.opt (fresolution): Renamed from resolution.
1557         * lto-lang.c (lto_handle_option): Handle new option name.
1558         * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
1560 2009-11-04  Richard Guenther  <rguenther@suse.de>
1561             Rafael Avila de Espindola  <espindola@google.com>
1563         * lto-elf.c (lto_elf_build_section_table): Add the base offset.
1564         (lto_elf_file_open): Handle offsets in arguments name@offest.
1566 2009-10-30  Richard Guenther  <rguenther@suse.de>
1568         PR lto/41858
1569         * lto.c (lto_file_read): Do not set file_data->fd.
1570         (lto_read_section_data): Use a single-entry file-descriptor cache.
1571         Do not check the result of xmalloc.
1572         (free_section_data): Do not use file_data->fd.
1573         (lto_read_all_file_options): Likewise.
1575 2009-10-22  Richard Guenther  <rguenther@suse.de>
1577         * lto.c (lto_fixup_jump_functions): Remove.
1578         (lto_fixup_decls): Do not fixup jump functions.
1579         (read_cgraph_and_symbols): Schedule cgraph merging after
1580         summary reading.  Schedule type and decl fixup before
1581         summary reading.
1583 2009-10-22  Richard Guenther  <rguenther@suse.de>
1585         * lto.c (lto_fixup_data_t): Remove free_list member.
1586         (lto_fixup_tree): Do not insert into free_list.
1587         (free_decl): Remove.
1588         (lto_fixup_decls): Remove free-list handling.
1590 2009-10-22  Jan Hubicka  <jh@suse.cz>
1592         * lto.c (lto_fixup_jump_functions): New function.
1593         (lto_fixup_decls): Use it.
1595 2009-10-16  Richard Guenther  <rguenther@suse.de>
1597         PR lto/41715
1598         * lto.c (lto_fixup_tree): Revert last change.
1600 2009-10-14  Richard Guenther  <rguenther@suse.de>
1602         * lto.c (lto_fixup_tree): In case the prevailing decl is not
1603         compatible with the one we replace wrap it around a
1604         VIEW_CONVERT_EXPR.
1606 2009-10-09  Richard Guenther  <rguenther@suse.de>
1608         PR lto/41635
1609         PR lto/41636
1610         * lto.c (read_cgraph_and_symbols): Do not assert we can open
1611         a file.
1612         * lto-elf.c (init_shdr##BITS): Fix i18n problems.
1613         (init_ehdr##BITS): Likewise.
1615 2009-10-08  Joseph Myers  <joseph@codesourcery.com>
1617         * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
1618         init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
1619         diagnostics.
1620         * lto-lang.c (lto_post_options): Remove trailing "." from
1621         diagnostics.
1623 2009-10-08  Richard Guenther  <rguenther@suse.de>
1625         * lto.c (read_cgraph_and_symbols): Free the gimple type merging
1626         hash tables.
1628 2009-10-07  Joseph Myers  <joseph@codesourcery.com>
1630         * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
1632 2009-10-07  Jan Hubicka  <jh@suse.cz>
1634         * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
1635         ltrans stage; explain why this is needed and should not.
1637 2009-10-05  Richard Guenther  <rguenther@suse.de>
1639         PR lto/41552
1640         PR lto/41487
1641         * lto.c (lto_read_decls): Do not register deferred decls.
1642         (read_cgraph_and_symbols): Delay symbol and cgraph merging
1643         until after reading the IPA summaries.
1645 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
1647         * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
1648         (lto-lang.c): Don't include lto/common.h.
1650 2009-10-02  Rafael Avila de Espindola  <espindola@google.com>
1652         * Make-lang.in (LTO_OBJS): Remove lto/common.o.
1653         (lto/common.o): Remove.
1654         * common.c: Remove.
1655         * common.h (lto_kind_str): Remove.
1656         (lto_visibility_str): Remove.
1657         (lto_resolution_str): Make it static.
1659 2009-10-01  Diego Novillo  <dnovillo@google.com>
1661         * lto.c (lto_read_decls): Add comment.
1662         Call internal_error instead of gcc_assert.
1663         (lto_resolution_read): Likewise.
1664         (lto_add_all_inlinees): Tidy.
1665         * Make-lang.in: Fix copyright boilerplate.
1666         (lto.pdf): New.
1667         (lto.install-pdf): New.
1668         * lto-tree.h: Fix copyright boilerplate.
1669         * lang-specs.h: Likewise.
1670         Remove ".lto" entry from compilers fragment.
1671         * lto-elf.c: Move inclusion of gelf.h after config.h.
1672         Tidy formatting everywhere.
1673         * lto.h: Fix copyright boilerplate.
1674         Tidy formatting everywhere.
1675         * common.c: Likewise.
1676         * config-lang.in: Likewise.
1677         * common.h: Likewise.
1678         * lto-lang.c: Likewise.
1680 2009-10-01  Richard Guenther  <rguenther@suse.de>
1682         * lto.c (lto_read_section_data): Use plain lseek/read.
1684 2009-10-01  Richard Guenther  <rguenther@suse.de>
1686         * lto.c (LTO_MMAP_IO): Define if we can mmap files and
1687         use sysconf to query the system page size.
1688         (lto_file_read): Implement fallback using stdio.
1689         (free_section_data): Likewise.
1691 2009-09-29  Diego Novillo  <dnovillo@google.com>
1693         * lto-lang.c (lto_init): Really fix call to
1694         build_common_builtin_nodes.
1696 2009-09-29  Diego Novillo  <dnovillo@google.com>
1698         * lto-lang.c (lto_init): Fix call to
1699         build_common_builtin_nodes.
1701 2009-09-29  Richard Guenther  <rguenther@suse.de>
1703         PR lto/40754
1704         * lto-elf.c (init_shdr##BITS): Properly specify alignment
1705         in bytes.
1706         (first_data_block): New static variable.
1707         (lto_elf_append_data): Align the first data block in each
1708         section.
1710 2009-09-28  Diego Novillo  <dnovillo@google.com>
1712         * lto-lang.c: Tidy.  Remove stale FIXME lto markers.
1713         * lto.c (strip_extension): New.
1714         (get_filename_for_set): Call it.  Do not call make_cwd_temp_file.
1715         (lto_execute_ltrans): Tidy.
1716         Do not pass -fwpa nor -fltrans-* to LTRANS.
1717         * opts.c: Tidy formatting and remove stale FIXME lto markers.
1718         * tree.c (need_assembler_name_p): Call
1719         lang_hooks.decls.may_need_assembler_name_p if set.
1720         * varasm.c (default_binds_local_p_1): Remove check for
1721         flag_ltrans.
1722         * varpool.c (decide_is_variable_needed): Do not test for
1723         in_lto_p.
1725 2009-09-22  Richard Guenther  <rguenther@suse.de>
1727         PR lto/39276
1728         * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
1729         * Make-lang.in: Remove ltrans-driver stuff.
1730         * config-lang.in: Likewise.
1731         * lang.opt (fltrans-driver): Remove.
1732         * lto-lang.c (lto_init_options): Remove code initializing
1733         ltrans_driver.
1734         * ltrans-driver: Remove.
1736 2009-09-21  Diego Novillo  <dnovillo@google.com>
1738         * lto-lang.c (lto_define_builtins): Remove superfluous
1739         calls to targetm.init_builtins and build_common_builtin_nodes.
1740         (lto_init): Add targetm.arm_eabi_unwinder as parameter to
1741         build_common_builtin_nodes.
1742         * lto.c (lto_materialize_function): Do nothing if NODE is a
1743         clone.
1745 2009-09-03  Diego Novillo  <dnovillo@google.com>
1747         * lto-elf.c (validate_file): Replace call to
1748         elf_getshstrndx with call to elf_getshdrstrndx.
1750 2009-08-19  Richard Guenther  <rguenther@suse.de>
1752         * lto-lang.c (lto_init): Merge char_type_node with the
1753         appropriately signed variant.
1755 2009-08-19  Richard Guenther  <rguenther@suse.de>
1757         PR lto/41071
1758         * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
1759         (lto_fixup_type): Re-build the pointer-to chain part two.
1761 2009-08-19  Richard Guenther  <rguenther@suse.de>
1763         PR lto/41071
1764         * lto.c (lto_fixup_type): Re-build the type variant chain.
1766 2009-08-19  Richard Guenther  <rguenther@suse.de>
1768         PR lto/41071
1769         * lto.c (lto_fixup_constructor): New function.
1770         (lto_fixup_tree): Replace all types.  Properly fixup
1771         constructors and constants.
1773 2009-08-14  Richard Guenther  <rguenther@suse.de>
1775         * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
1776         for DECL_LANG_SPECIFIC.
1778 2009-08-13  Richard Guenther  <rguenther@suse.de>
1780         PR lto/41032
1781         * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
1783 2009-07-30  Richard Guenther  <rguenther@suse.de>
1785         PR lto/40903
1786         * lto.c (read_cgraph_and_symbols): After fixing up decls choose
1787         the largest decl for output and free TREE_CHAIN for further
1788         use.
1790 2009-07-24  Diego Novillo  <dnovillo@google.com>
1792         * Make-lang.in: Add empty lto.install-plugin target.
1794 2009-07-13  Diego Novillo  <dnovillo@google.com>
1796         * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
1798 2009-07-11  Richard Guenther  <rguenther@suse.de>
1800         * lto-lang.c (lto_write_globals): Wrapup global decls.
1802 2009-07-10  Richard Guenther  <rguenther@suse.de>
1804         * lto-lang.c (lto_init): Allocate one more location to make
1805         BUILTINS_LOCATION correct.
1807 2009-07-09  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1809         * lto.c (free_section_data): Cast computed_offset to caddr_t.
1811 2009-07-06  Diego Novillo  <dnovillo@google.com>
1813         * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
1814         TYPE_SIZE_UNIT.
1816 2009-07-06  Diego Novillo  <dnovillo@google.com>
1818         * lto.c (preload_common_nodes): Remove.
1819         (lto_read_in_decl_state): Call lto_streamer_cache_get.
1820         (lto_read_decls): Call lto_data_in_create and
1821         lto_data_in_delete.
1822         (free_decl): Do not call ggc_free.
1823         (lto_main): Call lto_init_reader.
1824         * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
1825         (lto_init): Initialize main_identifier_node if needed.
1826         Make ptrdiff_type_node be integer_type_node.
1828 2009-06-19  Diego Novillo  <dnovillo@google.com>
1830         * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
1831         Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
1832         Remove code guarded by #ifdef LOCAL_TRACE.
1834 2009-06-18  Diego Novillo  <dnovillo@google.com>
1836         * lto.c: Update license to GPLv3.
1837         * lto-elf.c: Likewise.
1838         * common.c: Likewise.
1839         * lto-lang.c: Likewise.
1840         * lto.h: Remove superfluous include files.  Update all
1841         users.
1843 2009-06-17  Diego Novillo  <dnovillo@google.com>
1845         * lto.c (read_cgraph_and_symbols): Call input_cgraph.
1847 2009-06-02  Diego Novillo  <dnovillo@google.com>
1849         * lto.c (lto_1_to_1_map): Ignore nodes that have not been
1850         read in.
1851         (materialize_cgraph): Only materialize nodes that have a
1852         representation on file.
1854 2009-06-01  Diego Novillo  <dnovillo@google.com>
1856         * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
1858 2009-05-31  Diego Novillo  <dnovillo@google.com>
1860         * lto-lang.c (lto_type_for_mode): Handle all the modes
1861         handled in c_common_type_for_mode.
1863 2009-05-21  Diego Novillo  <dnovillo@google.com>
1865         * lto-elf.c: Always include <gelf.h>.
1866         * config-lang.in (target_libs): Remove.
1867         (build_by_default): Set to no.
1869 2009-05-15  Diego Novillo  <dnovillo@google.com>
1871         * lto.c (lto_materialize_function): Assert that DECL is
1872         not a builtin.
1873         (materialize_cgraph): Don't try to materialize builtin
1874         functions.
1875         * lto-section-out.c (write_symbol_vec): Do not write
1876         builtin functions.
1878 2009-05-13  Diego Novillo  <dnovillo@google.com>
1880         * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
1882 2009-05-07  Diego Novillo  <dnovillo@google.com>
1884         * lto.c (lto_resolution_read): Add type casts for C++ warnings.
1885         (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
1886         (lto_fixup_type): Call it for TYPE_POINTER_TO,
1887         TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
1888         (lto_fixup_tree): Call gimple_register_type when *TP is a
1889         type.
1890         (lto_main): Call bitmap_obstack_initialize.
1892 2009-04-22  Diego Novillo  <dnovillo@google.com>
1894         * lto.c (free_section_data): Tidy.
1895         (lto_1_to_1_map): Tidy.
1896         (lto_add_all_inlinees): Tidy.
1897         (prefix_name_with_star): New.
1898         (get_filename_for_set): New.
1899         (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
1900         to determine what cgraph node sets to write.
1901         Call get_filename_for_set to compute temporary file
1902         names.
1903         (lto_execute_ltrans): Do not execute LTRANS on files with
1904         names that start with '*'.
1905         Move logic to execute LTRANS together so that LTRANS is
1906         invoked only if there are any files to compile.
1907         (do_whole_program_analysis): Only remove output files
1908         that do not start with '*'.
1910 2009-04-06  Diego Novillo  <dnovillo@google.com>
1912         * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
1913         * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
1914         (lto_add_all_inlinees): Tidy.
1916 2009-03-26  Diego Novillo  <dnovillo@google.com>
1918         * lto.c: Include gimple.h.
1919         (lto_read_in_decl_state): Call gimple_register_type for
1920         every type in every stream.
1921         (lto_fixup_common): Call gimple_register_type if T has a
1922         type.
1923         (do_whole_program_analysis): Call print_lto_report.
1924         (lto_main): Call print_lto_report after cgraph_optimize.
1925         * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
1927 2009-03-24  Diego Novillo  <dnovillo@google.com>
1929         * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
1930         (lto.o): Add dependency on GIMPLE_H.
1932 2009-03-10  Simon Baldwin  <simonb@google.com>
1934         * lto.c (lto_read_all_file_options): Close any open file descriptor
1935         contained in file_data before freeing.
1937 2009-02-24  Rafael Avila de Espindola  <espindola@google.com>
1939         * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1940         for a decl in the original bitmap, not a node.
1941         (lto_add_all_inlinees): Remove original nodes that are not needed.
1942         (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1944 2009-02-24  Diego Novillo  <dnovillo@google.com>
1946         * lto.c (lto_materialize_function): Update
1947         lto_stats.num_function_bodies.
1948         (get_section_data): Initialize *LEN to 0.
1949         (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
1950         (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
1951         Update lto_stats.num_output_files.
1952         (read_cgraph_and_symbols): Update lto_stats.num_input_files.
1953         (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
1954         (lto_main): Initialize lto_stats.
1955         If flag_lto_report is set, call print_lto_report.
1957 2009-02-19  Diego Novillo  <dnovillo@google.com>
1959         Revert
1961         2009-02-19  Rafael Avila de Espindola  <espindola@google.com>
1963                 * lto.c (lto_add_inline_clones): Don't add the
1964                 master clone. Check for a decl in the original
1965                 bitmap, not a node.
1966                 (lto_add_all_inlinees): Remove original nodes
1967                 that are not needed.
1968                 (lto_scan_statics_in_cgraph_node): Don't care if
1969                 the node is the master.
1970                 (lto_promote_cross_file_statics): Use a new
1971                 context.seen_node_decls for each set
1973 2009-02-19  Rafael Avila de Espindola  <espindola@google.com>
1975         * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1976         for a decl in the original bitmap, not a node.
1977         (lto_add_all_inlinees): Remove original nodes that are not needed.
1978         (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1979         (lto_promote_cross_file_statics): Use a new context.seen_node_decls
1980         for each set
1982 2009-02-18  Diego Novillo  <dnovillo@google.com>
1984         * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
1985         and TV_WHOPR_WPA_IO.
1986         (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
1987         (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
1988         (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
1989         Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
1990         depending on command line flags.
1991         (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
1992         (lto_main): Remove timer uses.
1994 2009-02-18  Rafael Avila de Espindola  <espindola@google.com>
1996         * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
1997         (lto_wpa_write_files): Update calls to renamed functions.
1999 2009-02-17  Diego Novillo  <dnovillo@google.com>
2001         PR 39203
2002         * lto-lang.c (lto_post_options): Disable -fwhole-program
2003         when running LTRANS.
2005 2009-02-10  Diego Novillo  <dnovillo@google.com>
2007         * lto.c (read_cgraph_and_symbols): Fix comment.
2009 2009-02-10  Diego Novillo  <dnovillo@google.com>
2011         * lto.c (read_cgraph_and_symbols): Read options from all
2012         IL files.
2014 2009-02-10  Diego Novillo  <dnovillo@google.com>
2016         * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
2017         (materialize_cgraph): Likewise.
2018         (do_whole_program_analysis): Likewise.
2019         (lto_main): Call read_cgraph_and_symbols,
2020         materialize_cgraph and do_whole_program_analysis.
2022 2009-02-10  Simon Baldwin  <simonb@google.com>
2024         * lto.c: Include lto-opts.h.
2025         * (lto_main): Clear file options at loop start, read any saved
2026         options from the first file handled, and re-issue options.
2027         * Makefile.in (lto.o): Add dependency on lto-opts.h.
2029 2009-02-02  Diego Novillo  <dnovillo@google.com>
2031         * lto.c (lto_main): Stop LTO_TIMER and use
2032         TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
2034 2009-01-30  H.J. Lu  <hongjiu.lu@intel.com>
2036         PR lto/38995
2037         * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
2038         to POINTER_SIZE.
2040 2009-01-29  Ramana Radhakrishnan  <ramana.r@gmail.com>
2042         * Make-lang.in (LTO_EXE): Link with all 
2043         BACKENDLIBS and not only GMPLIBS
2045 2009-01-28  H.J. Lu  <hongjiu.lu@intel.com>
2047         PR bootstrap/38992
2048         * lto-elf.c: Include gelf.h instead of libelf.h.
2049         (lto_elf_file_close): Replace elfx_update_shstrndx with
2050         gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
2051         gelf_update_ehdr.
2053 2009-01-28  H.J. Lu  <hongjiu.lu@intel.com>
2055         PR middle-end/38996
2056         * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
2058 2009-01-26  Diego Novillo  <dnovillo@google.com>
2060         * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
2062 2009-01-26  Diego Novillo  <dnovillo@google.com>
2064         * lto-lang.c (lto_types_compatible_p): Move to gimple.c
2065         and rename into gimple_types_compatible_p.
2067 2009-01-12  Rafael Avila de Espindola  <espindola@google.com>
2069         * lto-lang.c (lang_hooks): Remove the const qualifier.
2071 2009-01-06  Diego Novillo  <dnovillo@google.com>
2073         * ltrans-driver: Mark 'all' target as phony.
2075 2008-12-31  Diego Novillo  <dnovillo@google.com>
2077         * ltrans-driver: Execute a NOP action for target 'all'.
2079 2008-12-19  Diego Novillo  <dnovillo@google.com>
2081         * lto.c (lto_1_to_1_map): Tidy.
2083 2008-12-19  Diego Novillo  <dnovillo@google.com>
2085         * lto-elf.c (lto_elf_file_open): When FILENAME cannot
2086         be opened, show its name.
2087         * ltrans-driver: If $verbose is set, do not use parallelism.
2089 2008-12-17  Rafael Avila de Espindola  <espindola@google.com>
2091         * lto.c (lto_fixup_function): New.
2092         (lto_fixup_tree): Call lto_fixup_function.
2094 2008-12-14  Doug Kwan  <dougkwan@google.com>
2096         * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
2097         variables if there is no function.
2099 2008-12-10  Simon Baldwin  <simonb@google.com>
2101         * ltrans-driver: Always run make in silent mode, to avoid make's
2102         trace on stdout interfering with lto-wrapper output.
2104 2008-12-10  Doug Kwan  <dougkwan@google.com>
2106         * lto.c (lto_add_inline_clones): Do not force master clones of
2107         inlined functions already in SET to be static inline.
2109 2008-12-04  Doug Kwan  <dougkwan@google.com>
2111         * lto.c (globalize_context_t): New type to store states in
2112         globalization of cross-file statics.
2113         (globalize_cross_file_statics): New.
2114         (lto_scan_statics_in_ref_table): Walk tree to look for reachable
2115         static decls that need to be fixed up.
2116         (lto_scan_statics_in_cgraph_node): Change call interface to use
2117         a globalize_context_t CONTEXT for all states used.
2118         (lto_scan_statics_in_remaining_global_vars): New.
2119         (lto_promote_cross_file_statics): Use new call interface of
2120         LTO_SCAN_STATICS_IN_CGRAPH_NODE.  Handle remaining externally
2121         visible vars in the last set.
2123 2008-12-03  Diego Novillo  <dnovillo@google.com>
2125         * lto.c (lto_fixup_tree): Do not emit an error when
2126         PREVAILING throw but T doesn't.
2128 2008-12-02  Doug Kwan  <dougkwan@google.com>
2130         * lto.c (lto_scan_statics_in_ref_table): New function factored out
2131         from code in ...
2132         (lto_scan_statics_in_cgraph_node): Handle both file-scope static
2133         variables and functions.
2134         (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
2135         and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
2137 2008-11-29  Diego Novillo  <dnovillo@google.com>
2139         * lto.c: Include timevar.h.
2140         (lto_materialize_function): Tidy.  Add comments.
2141         (lto_wpa_write_files): Tidy.
2142         (lto_execute_ltrans): Tidy.
2143         (lto_main): Add local variable LTO_TIMER.  Initialize it
2144         to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
2145         Start and stop the timer.
2146         Tidy comments.
2147         * Make-lang.in (lto.o): Add dependency on timevar.h.
2148         * ltrans-driver: React to -v and -save-temps.
2149         Use simple heuristic to determine how much parallelism to
2150         use when executing make.
2152 2008-11-12  Doug Kwan  <dougkwan@google.com>
2154         * lto.c (lto_bitmap_obstack): Remove var.
2155         (lto_materialize_function): Do nothing instead of marking function
2156         body in file if flag_wpa is true.
2157         (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
2158         (lto_scan_statics_in_cgraph_node): New function.
2159         (lto_promote_cross_file_statics): Same.
2160         (lto_wpa_write_files): Call lto_promote_cross_file_statics.
2161         Use bitmap functions in lto-utils.c.  Remove unsued label OUT.
2162         * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
2164 2008-11-09  Diego Novillo  <dnovillo@google.com>
2166         * lto/lto.c (lto_fixup_tree): Change error message locus
2167         information to include location of mismatching
2168         declaration.
2169         Use TREE_NO_WARNING to avoid repeated messages.
2170         (lto_main): If lto_fixup_decls emitted any errors, exit.
2171         * lto/lto-lang.c: Don't include libfuncs.h and except.h
2172         (lto_init_options): Don't enable exceptions by default.
2173         (lto_eh_runtime_type): Move to lto-function-in.c
2174         (lto_init_eh): Likewise.
2175         (lto_init): Don't call lto_init_eh.
2176         * lto/Make-lang.in (lto-lang.o): Remove dependency on
2177         libfuncs.h and except.h.
2179 2008-10-30  Diego Novillo  <dnovillo@google.com>
2181         * lto.c (lto_read_decls): Declare debug_main only if
2182         LTO_STREAM_DEBUGGING is enabled.
2184 2008-10-30  Simon Baldwin  <simonb@google.com>
2186         * lto.c (lto_wpa_write_files): Create intermediate files with
2187         make_cwd_temp_file().
2188         (lto_maybe_unlink): New.  Delete intermediate WPA files unless
2189         WPA_SAVE_LTRANS is set.
2190         (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
2191         * ltrans-driver: Do not strip directory from output files.
2193 2008-10-29  Doug Kwan  <dougkwan@google.com>
2195         * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
2196         DECL.
2197         * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
2198         (lto/lto-symtab.o): Remove rule.
2199         * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
2200         (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
2201         (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
2202         Remove macros.
2203         lto-symtab.c (File): Move up one level.
2204         lto-lang.c (cgraph.h): Remove include.
2205         (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2206         input_cgraph): Move to lto-cgraph.c in gcc directory above.
2207         (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
2209 2008-10-24 Rafael Espindola  <espindola@google.com>
2211         * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
2212         non prevailing weak symbols.
2214 2008-10-24 Rafael Espindola  <espindola@google.com>
2216         * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
2218 2008-10-24 Rafael Espindola  <espindola@google.com>
2220         * lto-lang.c (input_node): Avoid casts from pointers to ints of
2221         different types.
2223 2008-10-23  Simon Baldwin  <simonb@google.com>
2225         * lto-lang.c (input_node): Save the node reference, rather than the
2226         node pointer, in node->inlined_to.
2227         (input_cgraph_1): Convert node references into node pointers.
2229 2008-10-22  Diego Novillo  <dnovillo@google.com>
2230             Rafael Espindola  <espindola@google.com>
2232         * lto.c (lto_resolution_read): Tidy.
2233         * lto-symtab.c (lto_symtab_prevailing_decl): Do not
2234         abort if RET is NULL.
2236 2008-10-22  Doug Kwan  <dougkwan@google.com>
2238         * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
2239         exceptions flag is given.
2240         * lto-lang.c: (lto_init_options) Set default exceptions flag.
2241         (lto_init_eh): Remove exceptions flag initialization.
2242         (lto_init): Only call lto_init_eh if exceptions flag is set. 
2244 2008-10-21  Diego Novillo  <dnovillo@google.com>
2246         * lto.c: Tidy some formatting.
2247         * lto.h: Likewise.
2249 2008-10-21  Simon Baldwin  <simonb@google.com>
2251         * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
2252         them is NULL (but not the other).
2254 2008-10-17  Diego Novillo  <dnovillo@google.com>
2256         * ltrans-driver: Divert output from make to a temporary file.
2257         Show it if the call to make failed.
2259 2008-10-15  Diego Novillo  <dnovillo@google.com>
2261         * lto.c (lto_wpa_write_files): Reformat do-while loop.
2262         Do not print TEMP_FILENAME
2263         * ltrans-driver: Call make with -s.
2265 2008-10-15  Diego Novillo  <dnovillo@google.com>
2267         * lto-symtab.c (lto_symtab_merge_decl): Do not force
2268         TREE_STATIC on global symbols.
2270 2008-10-14  Ollie Wild  <aaw@google.com>
2272         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
2273         (LTRANS_DRIVER_EXE): Add.
2274         (lto.all.cross): Add LTRANS_DRIVER_EXE.
2275         (lto.all.encap): Add LTRANS_DRIVER_EXE.
2276         (lto.install.common): Remove ltrans-driver.
2277         (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
2278         (LTRANS_DRIVER_EXE): New build rule.
2279         * config-lang.in (compilers): Add ltrans-driver.
2281 2008-10-14  Diego Novillo  <dnovillo@google.com>
2283         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
2284         of program name.
2286 2008-10-13  Ollie Wild  <aaw@google.com>
2288         * lang-spec.h (@lto): Replace lto1_options with cc1_options.
2289         * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
2290         * ltrans-driver (LTRANS_FLAGS): Remove.
2292 2008-10-08  Doug Kwan  <dougkwan@google.com>
2294         * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
2295         Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
2296         and TREE_BINFO.  Also move code handling FUNCTION_DECL and VAR_DECL
2297         from lto_fixup_state to here.
2298         (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
2299         just a free-list.  Fix up types also.  Move decl merging code to
2300         lto_fixup_tree.
2301         (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
2302         object.
2303         (lto_fixup_decls): Use another pointer set to avoid multiple
2304         walking of nodes except for DECLs to be replaced.  Pass an
2305         lto_fixup_data_t object to tree-walker.
2307 2008-10-08 Rafael Espindola  <espindola@google.com>
2309         * lto-symtab.c (lto_symtab_set_resolution): New.
2310         (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
2311         lto_symtab_get_resolution.
2312         (lto_symtab_prevailing_decl): Return decl for non public decls.
2313         (lto_symtab_get_resolution): New.
2314         * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
2316 2008-10-06 Rafael Espindola  <espindola@google.com>
2318         * lto-lang.c: Include cgraph.h.
2319         (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2320         input_cgraph): Moved from lto-cgraph.c.
2321         (LANG_HOOKS_INPUT_CGRAPH): New.
2323 2008-10-03 Rafael Espindola  <espindola@google.com>
2325         * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
2327 2008-10-03 Rafael Espindola  <espindola@google.com>
2329         * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
2330         (lto_symtab_merge_decl): Update  LTO_IDENTIFIER_DECL the reflect the
2331         prevailing definition. Don't mark TREE_NOTHROW differences.
2332         * lto.c (lto_fixup_tree): New.
2333         (lto_fixup_state): New.
2334         (lto_fixup_state_aux): New.
2335         (free_decl): New.
2336         (lto_fixup_decls): New.
2337         (lto_main): Call lto_fixup_decls.
2339 2008-10-02  Ollie Wild  <aaw@google.com>
2341         * lang.opt (fltrans): Moved from common.opt.  Remove RejectNegative
2342         and Init.
2343         (fwpa): Moved from common.opt.  Remove RejectNegative and Init.
2344         * lto-lang.c (lto_post_options): Add validation and fixups for
2345         -fltrans and -fwpa.
2347 2008-10-02 Rafael Espindola  <espindola@google.com>
2349         * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
2350         lto_symtab_merge_decl): Return void.
2351         (lto_symtab_prevailing_decl): New.
2353 2008-09-30 Rafael Espindola  <espindola@google.com>
2355         * lto-symtab.c (lto_symtab_compatible): Remove the check for already
2356         defined symbols.
2357         (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
2358         (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
2359         Check for already defined symbols.
2360         * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
2361         (LTO_IDENTIFIER_RESOLUTION): Remove.
2362         (LTO_DECL_RESOLUTION): New.
2364 2008-09-30 Rafael Espindola  <espindola@google.com>
2366         * lto.c (lto_read_decls): Use new input_tree signature.
2368 2008-09-26  Doug Kwan  <dougkwan@google.com>
2370         * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
2371         bodies affected by exception attribute merging of DECLs.
2372         * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
2373         merging. 
2375 2008-09-25  Rafael Espindola  <espindola@google.com>
2377         * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
2378         (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
2379         * lto-symtab.c (lto_symtab_compatible): New.
2380         (lto_symtab_overwrite_decl): New.
2381         (lto_symtab_merge_decl): Refactor to use the above functions
2382         and the resolution from lang_identifier.
2383         * lto-tree.h: Include plugin-api.h.
2384         (lang_identifier): Add resolution.
2385         (LTO_IDENTIFIER_RESOLUTION): New.
2387 2008-09-25  Ollie Wild  <aaw@google.com>
2389         * lang.opt (fltrans-output-list=): New option.
2390         * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
2392 2008-09-25 Rafael Espindola  <espindola@google.com>
2394         * lto.c (lto_resolution_read): Initialize ret;
2396 2008-09-24  Ollie Wild  <aaw@google.com>
2398         * lto.c (sys/mman.h): Move include.
2399         (lto_wpa_write_files): Return a list of written files.
2400         (lto_execute_ltrans): New function.
2401         (lto_main): Call lto_execute_ltrans.
2402         (ltrans-driver): New file.
2403         * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
2404         (DEAULT_LTRANS_DRIVER_LEN): New macro.
2405         (lto_init_options): Initialize ltrans_driver.
2406         (lto_handle_option): Fix incorrect default output value.
2407         * lang.opt (fltrans-driver=): New option.
2408         * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
2409         (lto.install-common): Add lto/ltrans-driver.
2411 2008-09-24 Rafael Espindola  <espindola@google.com>
2413         * Make-lang.in (LTO_OBJS): Add lto/common.o.
2414         (lto/lto.o): Depend on lto/common.h.
2415         (lto/common.o): New.
2416         * lang.opt (resolution): New.
2417         * lto-lang.c (resolution_file_name): New.
2418         (lto_handle_option): Handle OPT_resolution.
2419         * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
2420         (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
2421         pass it to lto_symtab_merge_decl.
2422         * lto.c: Include common.h.
2423         (lto_read_decls): Add resolutions and resolutions_size arguments.
2424         Initialize data_in.globals_resolution and
2425         data_in.globals_resolution_size.
2426         (index_and_symbol_resolution): New.
2427         (lto_resolution_read): New.
2428         (lto_file_read): Add argument resolution_file.
2429         Read resolution.
2430         * lto.h (resolution_file_name): New.
2432 2008-09-23 Rafael Espindola  <espindola@google.com>
2434         * common.c: Update description.
2435         * common.h: Update description.
2437 2008-09-23 Rafael Espindola  <espindola@google.com>
2439         * common.c: Moved from lto-plugin.
2440         * common.h: Moved from lto-plugin.
2442 2008-09-22  Doug Kwan  <dougkwan@google.com>
2444         * lto.c (VEC(bitmap,heap)): Declare.
2445         (lto_materialize_function): Handle WAP mode specially.
2446         (lto_add_inline_clones): New.
2447         (lto_add_all_inlinees): Changle algorithm and to use bitmaps.  Also
2448         return a bitmap of inlined decls.
2449         (lto_wpa_write_files): Handle all DECLs brought in by inlining.
2450         (lto_main): Call reset_inline_failed to reset inlining states.
2451         Check call-graph after WPA inlining.
2452         * lto-lang.c (lto_init): Do not clear flag_generate_lto
2453         unconditionally.
2455 2008-09-19  Doug Kwan  <dougkwan@google.com>
2457         lto.c (lto_main): Remove unsued wrapper code.
2458         lang-specs.h (@lto): Use lto1_options instead of cc1_options.
2460 2008-09-19  Rafael Espindola  <espindola@google.com>
2462         * lto-symtab.c: Include lto-tree-in.h.
2463         * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
2464         * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
2465         * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
2467 2008-09-17  Paolo Bonzini  <bonzini@gnu.org>
2468             Rafael Avila de Espindola  <espindola@google.com>
2470         * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
2471         COMPOUND_LITERAL_EXPR_DECL): Remove.
2472         (emit_local_var): Remove.
2473         (lto_expand_expr): Remove.
2474         (lto_staticp): Remove.
2475         (LANG_HOOKS_EXPAND_EXPR): Remove.
2476         (LANG_HOOKS_STATICP): Remove.
2478 2008-09-11  Diego Novillo  <dnovillo@google.com>
2480         * lto-lang.c: Include except.h and libfuncs.h.
2481         (lto_init_eh): New.
2482         (lto_init): Call it.
2483         Set flag_generate_lto to 0.
2484         * Make-lang.in (lto-lang.o): Add dependency on except.h
2485         and libfuncs.h.
2487 2008-09-09  Bill Maddox  <maddox@google.com>
2489         * lto-lang.c: Include header file expr.h.
2490         (COMPOUND_LITERAL_EXPR_DECL_STMT,
2491         COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
2492         (emit_local_var):  Copied from c-semantics.c.
2493         (lto_expand_expr, lto_staticp): Copied from c_expand_expr
2494         and c_staticp in c-common.c.
2495         (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP):  Redefined.
2497 2008-09-08  Diego Novillo  <dnovillo@google.com>
2499         * lto-lang.c (lto_global_bindings_p): Return 1 during
2500         IPA passes.
2502 2008-09-07  Diego Novillo  <dnovillo@google.com>
2504         * lto.c: Tidy formatting.
2506 2008-08-04  Bill Maddox  <maddox@google.com>
2508         * lto-symtab.c (lto_symtab_merge_decl): Add comment.
2509         
2510 2008-09-03  Doug Kwan  <dougkwan@google.com>
2512         lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
2513         CIF_OK instead of NULL.
2515 2008-09-02  Diego Novillo  <dnovillo@google.com>
2516             Simon Baldwin  <simonb@google.com>
2518         * lto-lang.c (lto_type_for_size): Rewrite.  Adapt from
2519         c_common_type_for_size.
2520         (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
2521         (lto_init): Call linemap_add.
2522         (signed_and_unsigned_types): Remove.
2524 2008-08-29  Diego Novillo  <dnovillo@google.com>
2526         * lto-lang.c (handle_noreturn_attribute): New local function.
2527         (handle_const_attribute): New local function.
2528         (handle_malloc_attribute): New local function.
2529         (handle_pure_attribute): New local function.
2530         (handle_novops_attribute): New local function.
2531         (handle_nonnull_attribute): New local function.
2532         (handle_nothrow_attribute): New local function.
2533         (handle_sentinel_attribute): New local function.
2534         (handle_type_generic_attribute): New local function.
2535         (handle_format_attribute): New local function.
2536         (handle_format_arg_attribute): New local function.
2537         (lto_attribute_table): Declare.
2538         (lto_format_attribute_table): Declare.
2539         (lto_init_attributes): New local function.
2540         (lto_define_builtins): Call it.
2541         Call targetm.init_builtins and build_common_builtin_nodes.
2542         (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
2543         (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
2545 2008-08-28  Diego Novillo  <dnovillo@google.com>
2547         * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
2548         $(GIMPLE_H).
2549         (lto-symtab.o): Add dependency on $(GIMPLE_H).
2550         * lto-lang.c: Include gimple.h instead of tree-gimple.h.
2551         * lto-symtab.c: Include gimple.h.
2552         * lto-tree.h (chain_next): Replace GENERIC_NEXT with
2553         TREE_CHAIN.
2555 2008-08-27  Doug Kwan  <dougkwan@google.com>
2557         * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
2558         gt-lto-lto.h): New includes.
2559         (lto_materialize_function): Do not read in function body in WPA mode.
2560         Format a line to fit in 80 columns.
2561         (lto_cgraph_node_sets): New garbage collected variable.
2562         (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
2563         New functions.
2564         (lto_main): Initialize bitmap obstack.  Add code to handle WPA mode.
2565         * Make-lang.in (LTO_H): Replace filename lto-section-in.h with 
2566         variable LTO_SECTION_IN_H.
2567         (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
2568         pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
2569         with variable LTO_SECTION_IN_H.
2570         * config-lang.in (gtfiles): Add lto/lto.c.
2571         * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
2572         merged DECL_RESULT correctly.
2574 2008-08-26  Bill Maddox  <maddox@google.com>
2576         * lto-lang.c  Include tree-gimple.h.
2577         (lto_mark_addressable): Call mark_addressable rather than
2578         asserting.
2579         (lto_post_options): Suppress debug info generation.
2580         * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
2581         
2582 2008-08-25  Bill Maddox <maddox@google.com>
2584         * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
2585         assertion and leave an explanatory comment in its place.
2586         
2587 2008-08-21  Doug Kwan  <dougkwan@google.com>
2589         * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
2590         of common nodes instead of computing locallly.
2591         (lto_read_in_decl_state): New.
2592         (lto_read_decls): Change code for udpate in struct lto_decl_header.
2593         Read global and per-function in-decl states.
2594         * Make-lang.in (LTO_H): Update dependency.
2595         (lto/lto.o): Same.
2596         (lto-symtab.c): Merge   (revision 139039)
2597         * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
2599 2008-08-21  Rafael Espindola  <espindola@google.com>
2601         * config-lang.in (target_libs): New.
2603 2008-08-20  Bill Maddox  <maddox@google.com>
2605         * lto.c (current_lto_file): Remove GTY marker from static
2606         variable.  Remove include of file gt-lto-lto.h.
2607         * Make-lang.in: Remove dependency of lto/lto.o on
2608         gt-lto-lto.h.
2609         * lto-elf.c (lto_file_close): Removed.
2610         (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
2611         allocate lto_elf_file object.
2612         (lto_elf_file_close): Free lto_elf_file object after close.
2613         * lto.h (struct lto_file_struct): Remove GTY marker.
2614         * config-lang.in: Remove lto/lto.h and lto/lto.c from
2615         gtfiles.
2616         
2617 2008-08-20  Bill Maddox  <maddox@google.com>
2619         * lto.c (lto_read_decls): Provide dummy argument to input_tree
2620         to conform to its new signature.
2621         * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
2622         on discarded node here, now called in global_vector_fixup.
2623         
2624 2008-08-09  Bill Maddox  <maddox@google.com>
2626         * lto.c (preload_common_nodes): Verify that fileptr_type_node
2627         has not been set to a front-end-specific value.
2628         
2629 2008-08-05  Doug Kwan  <dougkwan@google.com>
2630         
2631         * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
2632         build breakage.
2634 2008-07-30  Bill Maddox  <maddox@google.com>
2636         * lto.c (lto_materialize_function): Call lto_original_decl_name.
2637         Remove obsolete comments.
2638         (lto_read_decls): Remove initialization of deleted field data_in.global.
2639         Tidy up comments.
2640         (lto_main): Remove redundant initialization of section_hash_table.
2641         * lto-elf.c: Removed obsolete comments.
2642         * lto.h: Tidy up comments.
2643         * lto-symtab.c (lto_least_common_multiple): New function.
2644         (lto_symtab_merge_decl): Merge variable alignments in some cases.
2645         Tidy up comments.
2647 2008-07-25  Diego Novillo  <dnovillo@google.com>
2648             Bill Maddox  <maddox@google.com>
2650         * lto.c: Re-order include files.
2651         Include lto-section-out.h.
2652         (preload_common_nodes): Add debugging output.
2653         Add new local INDEX_TABLE.
2654         Call preload_common_node.
2655         * Make-lang.in (lto.o): Add dependency on lto-section-out.h
2657 2008-07-13  Bill Maddox  <maddox@google.com>
2659         * lto.c (lto_read_decls): Cast pointer to const char * to avoid
2660         unwanted scaling during pointer addition.
2662 2008-07-11  Bill Maddox  <maddox@google.com>
2663             Diego Novillo  <dnovillo@google.com>
2665         * lto.c (lto_read_decls): Fix C++ compatibility warnings.
2666         Make code const-correct.
2667         (lto_file_read): Fix C++ compatibility warnings.
2668         (lto_read_section_data):  Fix C++ compatibility warnings.
2669         (lto_get_section_data): Use CONST_CAST to avoid warning when
2670         const pointer passed to free.
2671         * lto-elf.c (lto_elf_build_section_table): Fix C++
2672         compatibility warnings.
2673         (lto_elf_append_data):  Fix C++ compatibility warnings.  Use CONST_CAST
2674         to avoid warning assigning const pointer to d_buf field of Elf_Data.
2675         (lto_get_current_out_file):  Fix C++ compatibility warnings.
2677 2008-07-11  Diego Novillo  <dnovillo@google.com>
2679         * Make-lang.in (lto-warn): Define.
2681 2008-07-03  Simon Baldwin  <simonb@google.com>
2683         * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
2684         LTO_STREAM_DEBUGGING.
2686 2008-06-27  Ollie Wild  <aaw@google.com>
2688         * lto-elf.c (lto-section-out.h): New include.
2689         (struct lto_elf_file): Remove bits member.  Add scn, shstrtab_stream,
2690         and data members.
2691         (cached_file_attrs): New static variable.
2692         (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
2693         Use cached_file_attrs for checking bits.
2694         (lto_elf_build_section_table): Remove elf_file argument from
2695         lto_elf_get_shdr and lto_elf_free_shdr calls.
2696         (DEFINE_INIT_SHDR): New macro.
2697         (init_shdr32, init_shdr64): New functions defined via the
2698         DEFINE_INIT_SHDR macro.
2699         (lto_elf_begin_section_with_type): New function.
2700         (lto_elf_begin_section): New function.
2701         (lto_elf_append_data): New function.
2702         (lto_elf_end_section): New function.
2703         (DEFINE_VALIDATE_EHDR): New macro.
2704         (validate_ehdr32, validate_ehdr64): New functions defined via the
2705         DEFINE_VALIDATE_EHDR macro.
2706         (validate_file): New function.
2707         (DEFINE_INIT_EHDR): New macro.
2708         (init_ehdr32, init_ehdr64): New functions defined via the
2709         DEFINE_INIT_EHDR macro.
2710         (init_ehdr): New function.
2711         (lto_elf_file_open): Add support for writable files.  Move some
2712         validation logic to validate_file.
2713         (lto_elf_file_close): Add support for writable files.  Write file data
2714         and free data blocks.
2715         (current_out_file): New static variable.
2716         (lto_set_current_out_file): New function.
2717         (lto_get_current_out_file): New function.
2718         * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
2719         Add temporary initialization for testing ELF serialization.
2720         * lto.h (lto-section-out.h): New include.
2721         (struct lto_file_struct): Slight modification to comment.
2722         (lto_elf_file_open): Add writable parameter.
2723         (lto_elf_begin_section): New function declaration.
2724         (lto_elf_append_data): New function declaration.
2725         (lto_elf_end_section): New function declaration.
2726         (lto_set_current_out_file, lto_get_current_out_file): New function
2727         declarations.
2728         * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
2729         (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
2730         (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
2731         * Make-lang.in (LTO_H): Add lto-section-out.h.
2733 2008-06-12  Ollie Wild  <aaw@google.com>
2735         * lto.h (struct lto_file_vtable_struct): Remove.
2736         (struct lto_file_struct): Remove vtable member.
2737         * lto-elf.c (lto_file_init): Remove vtable argument.
2738         (lto_elf_map_optional_lto_section): Remove.
2739         (lto_elf_unmap_section): Remove.
2740         (lto_elf_file_vtable): Remove.
2741         (lto_elf_file_open): Remove lto_elf_file_vtable argument from
2742         lto_file_init call.
2743         (lto_elf_find_section_data): Remove.
2745 2008-06-11  Ollie Wild  <aaw@google.com>
2747         * lto.c (lto_file_read): Add const qualifier to data variable.
2749 2008-06-11  Diego Novillo  <dnovillo@google.com>
2751         Merge from lto-streamber sub-branch.
2753         2008-06-04  Ollie Wild  <aaw@google.com>
2755                 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
2756                 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
2758         2008-05-28  Bill Maddox  <maddox@google.com>
2760                 Replace the DWARF reader in the LTO front-end.
2762                 * lto.c: Include lto-tree-in.h, lto-tags.h.
2763                 (enum DWARF2_class, DW_cl_constant, struct
2764                 DWARF2_form_data, struct lto_context,
2765                 lto_fd_init, lto_info_fd_init,
2766                 lto_abbrev_fd_init, lto_info_fd_close,
2767                 lto_file_init, lto_file_close,
2768                 lto_file_corrupt_error, lto_abi_mismatch_error,
2769                 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
2770                 lto_read_uleb128, lto_read_sleb128,
2771                 lto_read_initial_length, lto_abbrev_read_attrs,
2772                 lto_abbrev_read, lto_abbrev_read_lookup,
2773                 lto_read_section_offset,
2774                 lto_read_comp_unit_header, find_cu_for_offset,
2775                 lto_get_file_name,
2776                 lto_resolve_reference,lto_read_form,
2777                 attribute_value_as_int,
2778                 make_signed_host_wide_int,
2779                 attribute_value_as_constant, lto_cache_hash,
2780                 lto_cache_eq, lto_cache_store_DIE,
2781                 lto_cache_lookup_DIE, lto_find_integral_type,
2782                 lto_find_integral_type_1,
2783                 LTO_BEGIN_READ_ATTRS_UNCHECKED,
2784                 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
2785                 lto_unsupported_attr_error, lto_get_identifier,
2786                 lto_read_referenced_type_DIE,
2787                 lto_read_compile_unit_DIE,
2788                 lto_read_array_type_DIE,
2789                 lto_read_structure_union_class_type_DIE,
2790                 lto_read_enumerator_DIE,
2791                 lto_read_enumeration_type_DIE,
2792                 lto_read_only_for_child_DIEs,
2793                 lto_read_only_for_child_DIEs,
2794                 lto_read_member_DIE, lto_read_abbrev,
2795                 lto_read_variable_formal_parameter_constant_DIE,
2796                 lto_get_body): Removed.
2797                 (preload_common_nodes): New function.
2798                 (lto_read_decls): Convert for new global streamer.
2799                 (lto_materialze_file_data,
2800                 lto_read_subroutine_type_subprogram_die,
2801                 lto_read_unspecified_parameters_DIE,
2802                 lto_read_typedef_DIE,
2803                 lto_read_pointer_reference_type_DIE,
2804                 lto_read_subrange_type_DIE,
2805                 lto_read_base_type_DIE,
2806                 lto_read_const_volatile_restrict_type_DIE,
2807                 lto_read_namespace_DIE,
2808                 lto_read_unspecified_type_DIE, lto_read_DIE,
2809                 lto_read_child_DIEs, lto_collect_child_DIEs):
2810                 Removed.
2811                 (lto_info_read, lto_set_cu_context): Removed.
2812                 (lto_file_read): Convert for new global streamer.
2813                 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
2814                 lto_resolve_var_ref, lto_resolve_fn_ref,
2815                 lto_resolve_field_ref, lto_resolve_typedecl_ref,
2816                 lto_resolve_namespacedecl_ref): Removed.
2817                 (lto_file_init, lto_file_close): Moved to lto-elf.c.
2818                 * lto-tree.h (lto_symtab_merge_var,
2819                 lto_symtab_mergee_fun): Declare here.
2820                 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
2821                 (lto_elf_file_open): Removed code to read DWARF debug sections.
2822                 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
2823                 DWARF2_CompUnit, lto_die_ptr,
2824                 lto_die_cache_entry, lto_fd, lto_info_fd,
2825                 lto_abbrev_fd): Removed.
2826                 (lto_file): Removed debug_info and debug_abbrev fields.
2827                 (lto_ref): Removed.
2828                 (lto_file_init, lto_file_close,
2829                 lto_resolve_type_ref, lto_resolve_var_ref,
2830                 lto_resolve_fn_ref, lto_resolve_field_ref,
2831                 lto_resolve_typedecl_ref,
2832                 lto_resolve_namespacedecl_ref,
2833                 lto_get_file_name): Removed declarations.
2834                 (lto_symtab_merge_var, lto_symtab_merge_fn):
2835                 Declarations moved to lto-tree.h.
2836                 * lto-symtab.c (lto_compatible_attributes_p):
2837                 Lobotomize this, as it barfs on "Hello, world!".
2838                 * lto-section-out.c: Include lto-tree-out.h.
2839                 (lto_hash_global_slot_node,
2840                 lto_eq_global_slot_node, preload_common_nodes,
2841                 write_global_stream, write_global_references):
2842                 New functions.
2843                 (produce_asm_for_decls): Convert for new global streamer.
2844                 * lto-section-out.h (lto_hash_global_slot_node,
2845                 lto_eq_global_slot_node): Declare.
2847 2008-06-07  Kenneth Zadeck <zadeck@naturalbridge.com>
2848             Jan Hubicka  <jh@suse.cz>
2849         
2850         * lto.c (sys/mman.h, tree-pass.h): New includes.
2851         (lto_materialize_constructors_and_inits,
2852         lto_materialize_function): Keeps length of section.
2853         (lto_materialize_cgraph): Removed.
2854         (lto_read_decls): Initialize fd field.
2855         (lto_file_read): Different return type and removed much code to
2856         lto_main.
2857         (page_mask): New variable.
2858         (lto_read_section_data, get_section_data, free_section_data): New
2859         functions.
2860         (lto_main): Now calls pass manager, sets the hooks so that the ipa
2861         passes can get the section data. 
2862         
2863 2008-05-27  Kenneth Zadeck <zadeck@naturalbridge.com>
2865         * lto.h (lto_read_decls): Made local.
2866         (lto_input_function_body, lto_input_constructors_and_inits, 
2867         lto_input_cgraph): Declarations moved to lto-section-in.h.
2868         * lto-section-in.c: Moved to .. .
2869         * lto-cgraph-in.c: Ditto.
2870         * lto-section-in.h: Ditto.
2871         * lto-function-in.c: Ditto.
2872         * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
2873         (lto_insert_block): Removed.
2874         (LANG_HOOKS_INSERT_BLOCK): Removed.
2875         * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
2876         lto-section-in.o): Rules moved to lto/Makefile.in.
2877         
2879 2008-05-16  Ollie Wild  <aaw@google.com>
2881         * lto-lang.c (tree-inline.h): Include.
2882         (lto_post_options): New function.
2883         (LANG_HOOKS_POST_OPTIONS): Define.
2884         * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
2885         * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
2887 2008-05-13  Diego Novillo  <dnovillo@google.com>
2889         * lto-function-in.c (input_ssa_names): Call
2890         make_ssa_name_fn instead of make_ssa_name.
2892 2008-05-12  Diego Novillo  <dnovillo@google.com>
2894         * lto-cgraph-in.c (overwrite_node): Update references to
2895         inline summary fields.
2896         * lto-function-in.c (input_expr_operand): Do not handle
2897         STRUCT_FIELD_TAG.
2899 2008-05-09  Ollie Wild  <aaw@google.com>
2901         * lang.opt: New file.
2902         * lto-lang.c (lto_init_options): New function.
2903         (lto_handle_option): New function.
2904         (lto_init): Move initialization of flag_unit_at_a_time to
2905         lto_init_options.
2906         (LANG_HOOKS_INIT_OPTIONS): Define.
2907         (LANG_HOOKS_HANDLE_OPTION): Define.
2909 2008-04-29  Ollie Wild  <aaw@google.com>
2911         * lto.c (lto_read_namespace_DIE): New function.
2912         (lto_read_DIE): Add lto_read_namespace_DIE callback.  Cache
2913         NAMESPACE_DECL DIE's.
2914         (lto_resolve_namespacedecl_ref): New function.
2915         * lto.h (lto_resolve_namespacedecl_ref): New function.
2916         * lto-section-in.c (lto_read_decls): Read namespace declarations.
2917         * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
2918         and num_namespace_decls.
2919         * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
2920         * lto-lang.c (lto_init_ts): New function.
2921         (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
2923 2008-04-16  Ollie Wild  <aaw@google.com>
2925         * lto-function-in.c (input_type_ref): Updated function description.
2927 2008-04-16  Ollie Wild  <aaw@google.com>
2929         * lto-function-in.c (input_type_ref_1): New function.
2930         (input_type_ref): Split into two functions.
2931         (input_function): Add support for type contexts.
2933 2008-04-16  Ollie Wild  <aaw@google.com>
2935         * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
2936         section name
2938 2008-04-16  Ollie Wild  <aaw@google.com>
2940         * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
2941         list of supported languages.
2943 2008-03-25  Kenneth Zadeck <zadeck@naturalbridge.com>
2945         Merge with mainline @133491.
2947 2008-03-05  Kenneth Zadeck <zadeck@naturalbridge.com>
2948             Jan Hubicka  <jh@suse.cz>
2950         * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
2951         fd->unmaterialized_fndecls.
2952         (lto_get_file_name, lto_materialize_cgraph): New function.
2953         (lto_materialize_constructors_and_inits,
2954         lto_materialize_function): Read info directly from elf file.
2955         (lto_file_read): Made local and initialize dictionary so that
2956         other lto sections can be read without reprocessing the elf file.
2957         (lto_main): Read all functions after all files have been processed
2958         for their types, globals and cgraph.  
2959         * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
2960         dependencies.
2961         * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
2962         (hash_name, eq_name, lto_elf_build_section_table): New functions.
2963         (lto_elf_read_symtab): Removed function.
2964         (lto_elf_file_open): Removed call to lto_elf_read_symtab.
2965         * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
2966         (lto_file_read): Made local.
2967         (lto_get_file_name, lto_elf_build_section_table,
2968         lto_input_cgraph): 
2969         New function.
2970         * lto-section-in.c (lto_read_section_data, lto_get_section_data):
2971         New functions.
2972         (lto_read_decls): Get the file name.
2973         * lto-cgraph-in.c: New file.
2974         * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
2975         (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
2976         (input_labels): Fixed latent sizeof issue.
2977         (input_function): Build stmt array to set call sites into cgraph
2978         edges.
2979         (lto_read_body): Reset cfun->curr_properties.
2980         * lto_section_in.h (lto_section_slot): New structure.
2981         (section_hash_table.lto_file_decl_data): New field.
2983         
2984 2008-02-09  Kenneth Zadeck <zadeck@naturalbridge.com>
2986         * lto.c (lto_read_variable_formal_parameter_const): Remove code to
2987         reconstruct static initializers.
2988         (lto_get_body, lto_materialize_function): Add lto_section_type as
2989         a parameter.
2990         (lto_materialize_constructors_and_inits,
2991         lto_materialize_file_data): New function.
2992         (lto_materialize_function,
2993         lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
2994         unmap_section and map_fn_body to map_section.
2995         (lto_set_cu_context): Process functions and static inits
2996         differently.
2997         * Make-lang.in (LTO_H, lto/lto-function-in.o,
2998         lto/lto-section-in.o): Update dependencies.
2999         * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
3000         lto_section_type parameter.
3001         (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
3002         * lto.h (lto_file_vtable_struct): Removed two of the fields and 
3003         renamed the other two so that there is only one map function and
3004         one unmap function and each takes a section type parameter.
3005         (lto_read_function_body): Renamed to lto_input_function_body and
3006         added file_data parameter.
3007         (lto_read_var_init): Removed.
3008         (lto_input_constructors_and_inits): New function.
3009         * lto-section-in.c (lto_read_decls): New function.
3010         * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
3011         var_decls, type_decls, types to lto_file_decl_data.
3012         (input_type_ref, input_expr_operand, lto_read_body): Get
3013         field_decls, fn_decls, var_decls, type_decls, types from different
3014         structure.
3015         (input_globals, input_constructor, lto_read_var_init): Removed.
3016         (input_constructors_or_inits): New function.
3017         (lto_read_function_body, lto_input_constructors_and_inits):
3018         Renamed to lto_input_function_body and takes file_data parameter.
3019         * lto-section-in.h (lto_file_decl_data): New structure.
3020         
3021 2008-01-28  Kenneth Zadeck <zadeck@naturalbridge.com>
3023         * lto-function-in.c (input_globals.c): Changed input type to
3024         lto_function_header.
3025         (input_bb): Removed code to deserialize the stmt number.
3026         (input_function): Renumber all stmts after they are input.
3027         (lto_read_body, lto_read_function_body, lto_read_var_init):
3028         Changed to used new header format and enum section_type.
3029         *lto-lang.c (success): Removed. 
3030         
3031 2008-01-28  Nathan Froyd  <froydnj@codesourcery.com>
3033         * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
3034         (lto_elf_free_sym): Likewise.
3036         * lto-elf.c (lto_elf_read_var_init): Remove unused function.
3037         (lto_elf_build_init): Likewise.
3039 2008-01-14  Kenneth Zadeck <zadeck@naturalbridge.com>
3041         * lto-read.c: Renamed to lto-function-in.c.
3042         (input_1_unsigned): Moved to lto-section-in.c and renamed
3043         lto_input_1_unsigned.
3044         (input_uleb128): Moved to lto-section-in.c and renamed
3045         lto_input_uleb128.
3046         (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
3047         lto_input_widest_uint_uleb128.
3048         (input_sleb128): Moved to lto-section-in.c and renamed
3049         lto_input_sleb128.
3050         (input_integer): Moved to lto-section-in.c and renamed
3051         lto_input_integer.
3052         (debug_in_fun): Moved to lto-section-in.c and renamed
3053         lto_debug_in_fun.
3054         (input_block): Moved to lto-section-in.h and renamed
3055         lto_input_block.
3056         (input_expr_operand): Fixed to allow lists with more than one
3057         element.
3058         * lto-section-in.h: New file.
3059         * lto-section-in.c: New file with changes from above.
3060         * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
3061         (lto-section-in.o): New rule.
3062         
3063 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
3065         * lto-read.c (input_expr_operand): Mark static and external
3066         VAR_DECLs as needed.
3068 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
3070         * lto-read.c (input_integer): Use the correct shift amount.
3072 2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>
3074         * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
3075         (LANG_HOOKS_NAME): Define.
3077 2007-12-27  Nathan Froyd  <froydnj@codesourcery.com>
3079         * lto.c (lto_find_integral_type): Define as a macro.  Rename the
3080         original function to...
3081         (lto_find_integral_type_1): ...this.  Consult UNSIGNEDP if we
3082         don't have a base type.
3083         (lto_read_enumeration_type_DIE): Examine the values of the
3084         enumeration to determine whether we can use an unsigned type for
3085         the base type of the enumeration.
3087 2007-12-24  Nathan Froyd  <froydnj@codesourcery.com>
3089         * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
3090         and TYPE_ALIGN on UNION_TYPEs as soon as possible.
3092 2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>
3094         * lto-lang.c (lto_types_compatible_p): New function.
3095         (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
3097 2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>
3098             Kenneth Zadeck <zadeck@naturalbridge.com>
3100         * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
3101         (input_local_vars): Read in DECL_INITIAL and context for local
3102         statics that need to be put in unexpanded_vars_list.
3104 2007-12-21  Nathan Froyd  <froydnj@codesourcery.com>
3106         * lto-read.c (input_real): Use a separate null-terminated buffer
3107         for calling real_from_string.
3108         (input_expr_operand): If we take the address of a FUNCTION_DECL,
3109         tell cgraph that it's needed.
3111 2007-12-19  Doug Kwan  <dougkwan@google.com>
3113         * lto.c (lto_read_base_type_DIE): Handle complex integer types.
3115 2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>
3117         * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
3118         (lto_file_read): Reset the members of 'context' every time we read
3119         a toplevel DIE, with special attention to last_param_type.
3121 2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>
3123         * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
3124         'declaration'.  Set the assembler name for non-public functions.
3126 2007-12-17  Kenneth Zadeck <zadeck@naturalbridge.com>
3128         * lto_read.c (data_in.unexpanded_indexes): New array.
3129         (input_local_var): Added code to read in unexpanded_var_list
3130         indexes for variables.  Only read in DECL_CHAIN field for
3131         parameters.
3132         (input_local_vars): Added code to rebuild unexpanded_var_list in
3133         order using unexpanded_indexes.
3134         (input_function): Added code to set DECL_CONTEXT for functions.
3136 2007-12-13  Doug Kwan  <dougkwan@google.com>
3138         * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
3139         in pointer and reference types.
3141 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
3143         * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
3144         RESULT_DECL.
3146 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
3148         * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
3149         already read the DIE.
3150         (lto_get_body): New function, split out from...
3151         (lto_materialize_function): ...here.  Call it.
3152         (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
3153         determine DECL_EXTERNAL.
3154         * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
3155         FUNCTION_DECLs when necessary.  Use the type of the actual
3156         function definition if we are unable to easily merge types.  Ignore
3157         spurious DECL_MODE mismatches on VAR_DECLs.  Merge DECL_MODEs when
3158         necessary.
3160 2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>
3162         * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
3164 2007-12-12  Bill Maddox  <maddox@google.com>
3166         Revert
3167         2007-12-07  Bill Maddox  <maddox@google.com>
3169         * lto.c (lto_str_fd_init): New function.
3170         (lto_str_fd_close): New function.
3171         (lto_file_init): Call lto_str_fd_init.
3172         (lto_file_close): Call lto_str_fd_close.
3173         (lto_str_read): New function. Read debug string table.
3174         (lto_str_lookup): New function. Get string for debug
3175         string table offset.
3176         (lto_read_form): Recognize DW_FORM_strp.
3177         (lto_file_read): Invoke lto_str_read.
3179         * lto-elf.c (lto_elf_file_open): Read raw section data
3180         for the .debug_str section, if present.
3182         * lto.h (struct lto_str_fd_struct): New struct.
3183         (struct lto_file_struct): Added new field DEBUG_STR
3184         to hold the file descriptor for the debug string table.
3185         
3186 2007-12-07  Bill Maddox  <maddox@google.com>
3188         * lto.c (lto_str_fd_init): New function.
3189         (lto_str_fd_close): New function.
3190         (lto_file_init): Call lto_str_fd_init.
3191         (lto_file_close): Call lto_str_fd_close.
3192         (lto_str_read): New function. Read debug string table.
3193         (lto_str_lookup): New function. Get string for debug
3194         string table offset.
3195         (lto_read_form): Recognize DW_FORM_strp.
3196         (lto_file_read): Invoke lto_str_read.
3198         * lto-elf.c (lto_elf_file_open): Read raw section data
3199         for the .debug_str section, if present.
3201         * lto.h (struct lto_str_fd_struct): New struct.
3202         (struct lto_file_struct): Added new field DEBUG_STR
3203         to hold the file descriptor for the debug string table.
3205 2007-12-07  Nathan Froyd  <froydnj@codesourcery.com>
3207         * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
3208         Grow the basic_block_info and label_to_block_map vectors if
3209         necessary.  Read in the block chain.
3211 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
3213         * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
3215 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
3217         * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
3219 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
3221         * lto-read.c (input_expr_operand): Don't check for MTAGs.
3222         (lto_read_body): Don't declare PROP_alias.
3224 2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>
3226         * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
3227         argument type information.
3229 2007-12-03  Nathan Froyd  <froydnj@codesourcery.com>
3231         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3232         TREE_THIS_VOLATILE if the associated type is a volatile type.
3233         (lto_materialize_function): Remove call to init_ssa_operands.
3234         * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
3235         variable when reading an SSA_NAME.  Do the same when reading a
3236         RESULT_DECL, a RETURN_EXPR, or an MTAG.
3237         (input_cfg): Call init_ssa_operands.
3238         (input_ssa_names): Set the default def of an SSA_NAME if necessary.
3239         Move call to init_tree_ssa...
3240         (lto_read_body): ...here.  Use push_cfun and pop_cfun.  Call
3241         add_referenced_var on any variables referenced from the body of the
3242         function.  Inform the rest of the compiler we are in SSA form and
3243         inform later passes about the current properties.
3245 2007-11-30  Nathan Froyd  <froydnj@codesourcery.com>
3247         * lto.c (lto_materialize_function): Add FIXME.
3249 2007-11-29  Nathan Froyd  <froydnj@codesourcery.com>
3251         * lto-lang.c (enum built_in_attribute): New enum.
3252         (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
3253         built_in_attributes): New variables.
3254         (def_builtin_1): New function.
3255         (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
3257 2007-11-28  Nathan Froyd  <froydnj@codesourcery.com>
3259         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3260         DECL_SOURCE_LOCATION for debugging purposes.
3261         (lto_read_member_DIE): Set DECL_SOURCE_LOCATION.  If we have read a
3262         bitfield, use the type specified by the DIE for TREE_TYPE and defer
3263         laying out the decl until later.
3264         (lto_read_subroutine_type_subprogram_DIE): Compare the function's
3265         name with DECL_ASSEMBLER_NAME.  Set DECL_SOURCE_LOCATION and
3266         TREE_ADDRESSABLE.
3267         * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
3268         operand of an ADDR_EXPR.
3269         * lto-lang.c (enum lto_builtin_type): New enum.
3270         (builtin_type): New typedef.
3271         (builtin_types, string_type_node, const_string_type_node,
3272         wint_type_node, intmax_type_node, uintmax_type_node,
3273         signed_size_type_node): New variables.
3274         (def_fn_type, builtin_type_for_size, lto_define_builtins,
3275         lto_build_c_type_nodes): New functions.
3276         (lto_init): Initialize builtin types.
3277         (lto_set_decl_assembler_name): Let the target machine mangle the
3278         name if the decl is TREE_PUBLIC, otherwise uniquify it.
3280 2007-11-21  Nathan Froyd  <froydnj@codesourcery.com>
3282         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
3283         set TREE_ADDRESSABLE.  Do set DECL_COMDAT.  Set TREE_READONLY if
3284         the type is a constant type.  Set the assembler name and inform
3285         the rest of the compiler about the new decl if the decl is not
3286         public.
3287         (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
3288         of DECL_ASSEMBLER_NAME when determining if we have a builtin.  Don't
3289         try to read in function bodies for functions that already have bodies.
3290         * lto-symtab.c (lto_same_type_p): Check for unbounded array
3291         equivalency.
3292         (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
3293         Check for whether we matched a builtin function type before calling
3294         lto_same_type_p on the generated type.  Permit cases where the
3295         declaration of an array is unbounded, but the definition is bounded.
3296         Don't combine TREE_PUBLIC flags.  Copy over DECL_SIZE and
3297         DECL_SIZE_UNIT if necessary.
3299 2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>
3301         * lto-read.c (input_expr_operand): Get types right 
3302         for COMPLEX_CST.
3304 2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>
3306         * lto-read.c (make_new_block, input_cfg): Properly set
3307         n_basic_blocks.
3308         
3309 2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>
3311         * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
3312         set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
3314 2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>
3316         * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
3317         construct the integer type for bitfields.
3319 2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>
3321         * lto-read.c (data_in.current_node_has_loc): Removed.
3322         (input_line_info): Returns true if node needs line set.
3323         (set_line_info): Always sets line if called.
3324         (clear_line_info): Removed reference to current_node_needs_loc.
3325         (input_expr_operand): Keeps track locally if current node needs a loc.
3326         (input_local_var): Added code to handle DECL_INITIAL for
3327         static local vars. Only set loc if necessary.
3328         
3329 2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>
3331         * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
3332         DECL_CONTEXT.
3334 2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>
3336         * lto.c: Include langhooks.h.
3337         (lto_find_integral_type): Rework logic to handle the case where
3338         got_byte_size is true, but the bitsize requested and that of the
3339         base_type doesn't match.
3340         (lto_read_variable_formal_parameter_constant_DIE): Only check for
3341         asm_name if we are creating a VAR_DECL.
3342         (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
3343         definition.
3344         (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
3345         function reference and use the builtin's decl if so.  Set the
3346         DECL_CONTEXT of the RESULT_DECL for the function.
3347         * lto-lang.c (registered_builtin_fndecls): New variable.
3348         (lto_getdecls): Return it.
3349         (lto_builtin_function): Chain the new decl onto
3350         registered_builtin_fndecls.
3352 2007-11-15  Kenneth Zadeck <zadeck@naturalbridge.com>
3353             
3354         * lto-read.c (process_tree_flags, lto_static_init_local):
3355         Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
3356         (input_line_info, clear_line_info): Fixed new line number code.
3357         (input_expr_operand): Added type to SWITCH_EXPR.
3358         (lto_read_body): Properly initialized data_in.
3359         Clear line info when leaving.
3360         
3361 2007-11-13  Diego Novillo  <dnovillo@google.com>
3363         * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3364         Initialize ARTIFICIAL.
3365         (lto_read_subroutine_type_subprogram_DIE): Initialize
3366         SAVED_SCOPE.
3367         * lto-read.c (set_line_info): Remove ; from calls to
3368         LINEMAP_POSITION_FOR_COLUMN.
3370 2007-11-13  Kenneth Zadeck <zadeck@naturalbridge.com>
3372         * lto-read.c (input_type_ref): Renamed from get_type_ref.
3373         (input_expr_operand, input_local_var): Renamed get_type_ref to 
3374         input_type_ref.
3375         (input_expr_operand): Get the types correct for 
3376         vector-cst.  Get SSA_NAME_DEF_STMT correct for return_exprs.
3377         
3378 2007-11-13  Doug Kwan  <dougkwan@google.com>
3380         * lto-read.c (input_widest_uint_uleb128): New function.
3381         (input_tree_flags, process_tree_flags, input_line_info,
3382         input_expr_operand, input_local_var, input_phi, input_ssa_names):
3383         Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
3384         unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
3385         (lto_static_init_local): Add code to assert that lto_flags_type is
3386         wide enough.
3388 2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>
3390         * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
3391         (lto_read_subroutine_type_subprogram_DIE): Handle
3392         DW_AT_static_link and DW_AT_specification.  Return the
3393         specification if present.
3394         (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
3395         
3396 2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>
3398         * lto-lang.c: Include target.h.
3399         (registered_builtin_types): New variable.
3400         (lto_type_for_mode): Increase number of modes handled.
3401         (lto_builtin_function): Fix argument list and return the decl.
3402         (lto_register_builtin_type): New function.
3403         (lto_init): Initialize target builtins and language-independent
3404         nodes.
3405         (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
3407 2007-11-13  Kenneth Zadeck <zadeck@naturalbridge.com>
3409         * lto-read.c (input_expr_operand): Added code to properly handle
3410         index filed. Added new RANGE_EXPR case.
3411         
3412 2007-11-11  Kenneth Zadeck <zadeck@naturalbridge.com>
3414         * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
3415         (data_in): Added current_node_has_loc field.
3416         (input_line_info, set_line_info, clear_line_info): Added a support
3417         for USE_MAPPED_LOCATION and not adding line numbers to nodes that
3418         did not have on on the source side.
3419         (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
3420         numbers too.
3422 2007-11-09  Doug Kwan  <dougkwan@google.com>
3424         * lto-read.c (input_expr_operand): Change type of operand 2 of
3425         BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
3427 2007-11-09  Nathan Froyd  <froydnj@codesourcery.com>
3429         * lto.c: Include lto-tree.h.  Effect small spaces->tabs cleanup.
3430         (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
3431         from a DW_AT_specification or DW_AT_abstract_origin attribute to
3432         the new decl we are creating.  Move informing the middle end about
3433         the new decl to...
3434         (lto_main): ...here.  Inform the middle end about global variables
3435         after we have read in all the input files.
3436         * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
3437         variables with internal linkage, so delete the check for internal
3438         linkage.  Combine TREE_PUBLIC flags.
3440 2007-11-08  Nathan Froyd  <froydnj@codesourcery.com>
3442         * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3443         DW_AT_decl_line.
3444         * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
3445         builtin specially.  Move check for attribute compatibility
3446         earlier.
3448 2007-11-07  Nathan Froyd  <froydnj@codesourcery.com>
3450         * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
3451         * config-lang.in (gtfiles): Add lto.h and lto.c.
3452         * lto-elf.c: Include ggc.h.
3453         (lto_elf_file_open): Allocate elf_file from GC memory.
3454         * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
3455         (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
3456         in GC memory.
3457         (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
3458         (lto_file_close): Free file from GC memory.
3459         (lto_cache_store_DIE): Allocate the new entry in GC memory.
3460         (lto_read_member_DIE): Fix declaration.
3461         (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
3462         in GC memory.
3463         (current_lto_file): New variable.
3464         (lto_main): Use it.
3465         (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
3466         lto_die_cache_entry): Move to...
3467         * lto.h: ...here and add GTY markers as appropriate.  Delete forward
3468         declarations accordingly.
3469         (struct lto_file_struct): Declare.
3470         (lto_file_vtable): Use it instead of lto_file.
3472 2007-11-06 Alon Dayan  <alond@il.ibm.com>
3473            Kenneth Zadeck <zadeck@naturalbridge.com>
3475          * lto-read.c (process_flags, lto_static_init_local):
3476          read flags of VAR_DECL and FUNCTION_DECL of size>1.
3477          change global array num_flags_for_code to flags_length_for_code.
3478          (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
3479         
3480 2007-11-05  Nathan Froyd  <froydnj@codesourcery.com>
3482         * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
3483         layout functions to compute information about the newly constructed
3484         type.
3486 2007-11-02  Nathan Froyd  <froydnj@codesourcery.com>
3488         * lto-read.c (input_expr_operand): Change the LTO_return_expr1
3489         case to use DECL_RESULT if necessary.
3491 2007-11-01  Kenneth Zadeck <zadeck@naturalbridge.com>
3493         * lto-read.c (input_tree_list): Removed.
3494         (input_tree_flags): Added parameter to force flags no matter what
3495         tree code.
3496         (input_expr_operand): Added parameter to input_tree_flags.
3497         Added case for IDENTIFIER_NODE and TREE_LIST.  Changed ASM to call
3498         input_expr_operand rather than input_tree_lists.
3499         (input_local_var): Use input_expr_operand to read attributes
3500         rather then input_tree_list.
3501         (input_phi, input_ssa_names): Added parameter to input_tree_flags.
3503 2007-10-31  Nathan Froyd  <froydnj@codesourcery.com>
3505         * lto.c (lto_read_typedef_DIE): Fix comment typo.
3506         (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
3507         TYPE_DECL for it.
3508         * lto-read.c (lto_read_body): Use correct sizes for calculating
3509         type_decls_offset and types_offset.
3511 2007-10-30  Nathan Froyd  <froydnj@codesourcery.com>
3513         * lto-tree.h (union lang_tree_node): Change GTY description to chain
3514         with GENERIC_NEXT.
3515         * config-lang.in (gtfiles): Add lto-lang.c.
3516         * lto-lang.c: Include gt-lto-lto-lang.h.
3517         * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
3518         (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
3519         (lto/lto-read.o): Likewise.
3521 2007-10-29  Kenneth Zadeck <zadeck@naturalbridge.com>
3523         * lto-read.c (data_in): Added type_decls and current_col fields.
3524         (string_slot): New type to hold canonized file name.
3525         (hash_string_slot_node, eq_string_slot_node, canon_file_name, 
3526         input_line_info, set_line_info, clear_line_info): New functions.
3527         (file_name_hash_table): New hash table.
3528         (input_local_var, input_labels, input_local_vars_index, 
3529         input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
3530         (input_uleb128): Changed type of byte var.
3531         (input_expr_operand): Large number of changes to get line numbers
3532         correct.  Added TYPE_DECL case.
3533         (input_globals): Added code to get TYPE_DECLs processed.
3534         (input_local_var): Added code to process line numbers and
3535         TREE_CHAIN and DECL_CONTEXT.
3536         (input_function, input_constructor): Added call to
3537         clear_line_number.
3538         (lto_static_init_local): Added code to get line numbers correct.
3539         (lto_read_body): Added code to get TYPE_DECLS read and to change
3540         parameters to the calls above that had their parms reorganized.
3542         
3543 2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>
3545         * lto.h (lto_resolve_typedecl_ref): Declare.
3546         * lto.c (lto_resolve_typedecl_ref): New function.
3548 2007-10-29  Mark Mitchell  <mark@codesourcery.com>
3549             Nathan Froyd  <froydnj@codesourcery.com>
3551         * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
3552         DIEs even if we find an abstract origin for this DIE.
3554 2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>
3556         * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
3557         RESULT_DECL slightly earlier.  Only remember the decl for later
3558         if we successfully merge declarations.
3560 2007-10-24  Kenneth Zadeck <zadeck@naturalbridge.com>
3562         * lto-read.c (input_expr_operand): Give label_values the proper
3563         context and provide switch statements with a default type.
3564         
3565 2007-10-23  Nathan Froyd  <froydnj@codesourcery.com>
3567         * lto-read.c (lto_read_body): Move call to init_ssa_operands...
3568         * lto.c (lto_materialize_function): ...to here.
3570 2007-10-22  Nathan Froyd  <froydnj@codesourcery.com>
3572         * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
3573         * lto.c (lto_info_fd_init): Initialize it.
3574         (lto_info_fd_close): Free it.
3575         (lto_materialize_function): New function.
3576         (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
3577         unmaterialized_fndecls.
3578         (lto_file_read): Read in all the function bodies after we have read
3579         all of the DWARF info.
3580         * lto-read.c (lto_read_body): Call init_ssa_operands if we are
3581         reading a function body.
3583 2007-10-20  Kenneth Zadeck <zadeck@naturalbridge.com>
3585         * lto-read.c (input_tree_flags): Renamed from input_flags to be
3586         semetric with output_tree_flags.  Added call to log flags.
3587         (process_tree_flags): Renamed from process_flags.  Fixed a lot of
3588         type issues to make everything consistent with flags being
3589         unsigned HOST_WIDE_INTS.
3590         (input_expr_operand): Added call to
3591         recompute_tree_invariant_for_addr_expr.
3592         (input_local_var): Added debugging for tree_chains.  Now calls
3593         input_tree_flags.
3594         (input_phi): Made flags unsigned HOST_WIDE_INT.
3595         (input_ssa_names): Now calls input_tree_flags.
3596         (lto_read_body): Now sets cfun.
3597         (lto_read_function_body): Now sets current_function_pointer.
3598         
3599 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
3601         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
3602         definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
3603         inspecting fields within.
3604         (lto_read_DIE_at_ptr): Delete check for null result; let callers
3605         handle this appropriately.
3607 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
3609         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
3610         DW_AT_abstract_origin properly.  Ensure that we're not dealing with
3611         both DW_AT_abstract_origin and DW_AT_specification.
3612         (lto_read_subroutine_type_subprogram_DIE): Handle
3613         DW_AT_abstract_origin.
3614         (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
3615         (lto_read_DIE_at_ptr): Define as static to match declaration.
3616         Lookup the PTR in the cache before reading it from the file.
3617         (lto_resolve_var_ref): Adjust accordingly.
3618         (lto_resolve_fn_ref): Adjust accordingly.  Tweak comment.
3619         (lto_resolve_field_ref): Adjust accordingly.  Tweak comment.
3621 2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>
3623         * lto.c (lto_read_DIE_at_ptr): New function.
3624         (lto_resolve_var_ref): Use it.
3625         (lto_resolve_fn_ref): Use it.
3626         (lto_resolve_field_ref): Use it.
3627         (lto_read_variable_formal_parameter_constant_DIE): Follow
3628         DW_AT_specification and return the associated decl when appropriate.
3630 2007-10-18  Nathan Froyd  <froydnj@codesourcery.com>
3632         * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
3633         Implement for scalar integer modes.
3634         (lto_init): Initialize size_type_node.
3636 2007-10-18  Kenneth Zadeck <zadeck@naturalbridge.com>
3638         * lto-read.c (input_expr_operand): Remove ssa name asserts.
3639         (input_local_var): Add chaining for params.
3640         (input_ssa_names): Add cfun parameter.
3641         (input_function): Remove unnecessary else.
3643 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
3645         * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
3646         (lto_resolve_var_ref): Use proper types.
3647         (lto_resolve_fn_ref): Likewise.
3648         (lto_resolve_field_ref): Likewise.
3650 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
3652         * lto-read.c (input_expr_operand): Remove case.
3654 2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>
3656         * lto.c (lto_read_only_for_child_DIEs): New function.
3657         (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
3658         * lto-elf.c (lto_elf_map_lto_section): Remove.
3659         (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
3660         * lto-read.c (input_expr_operand): Assert that we never read a NULL
3661         SSA_NAME.  Add missing case for mechanical codes.
3662         (input_cfg): Use basic_block_info_for_function instead of
3663         basic_block_info.
3665 2007-10-16  Kenneth Zadeck <zadeck@naturalbridge.com>
3667         * lto-read.c (input_sleb128, input_integer): Use proper casts.
3668         (input_list): Renamed input_tree_list and modified to follow same
3669         protocol as lto-function-out.c:output_tree_list.
3670         (input_expr_operand): Make asm operands use input_tree_list.
3671         (input_local_var): Now uses input_tree_list.
3672         (lto_read_body): Change placement for setting context of debug_labels.
3673         
3674         
3675 2007-10-16  Kenneth Zadeck <zadeck@naturalbridge.com>
3677         * lto-read.c (input_real): Output debugging in proper order.
3678         (input_integer): Compute bit lengths properly.
3679         (input_list): Clean up declaration.
3680         (input_expr_operand): Change calls to input_real to match fix.
3681         Make reading of LTO_bit_field_ref1 match output.
3682         (input_local_var): Make reading of attributes match what is being
3683         written.
3684         (dump_debug_stream): Also print char in hex.
3685         (debug_out_fun): Fix signed unsigned mismatch.
3686         
3687 2007-10-10  Nathan Froyd  <froydnj@codesourcery.com>
3689         * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
3690         DW_AT_GNU_vector specially, as they are not contiguous with the
3691         specified set of attribute names.  Use class_mask to check for
3692         errors at the end of the function
3693         (lto_resolve_var_ref): Read the DIE if it is not cached.
3694         (lto_resolve_fn_ref): Likewise.
3695         (lto_resolve_field_ref): Likewise.
3697 2007-10-05  Nathan Froyd  <froydnj@codesourcery.com>
3699         * lto.c: Include dwarf2out.h.
3700         (lto_cache_store_DIE): Assert that we never change the value.
3701         (LTO_BEGIN_READ_ATTRS): Print an informative error message.
3702         (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
3703         (lto_read_array_type_DIE): Don't error on ndims == 0; build a
3704         sensible type instead.
3705         (lto_read_structure_union_class_type_DIE): Store the newly
3706         created type prior to reading the members of the structure to
3707         avoid infinite recursion.  Avoid computing types and alignments
3708         for structures whose sizes are unknown.
3709         (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
3710         and set DECL_ARTIFICIAL accordingly.  Ignore DW_AT_abstract_origin,
3711         DW_AT_const_value, and DW_AT_specification.
3712         (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
3713         Return early if we have already constructed the function type.
3714         (lto_read_typedef_DIE): Check to see if the type has been cached
3715         already.  Cache the type before reading any children.
3716         (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
3717         (lto_read_DIE): Unset context->skip_non_parameters around reading
3718         the DIE.
3719         (lto_resolve_fn_ref): Delete trailing whitespace.
3721 2007-09-11  Kenneth Zadeck <zadeck@naturalbridge.com>
3723         * lto-read.c (input_expr_operand): Added type for STRING_CST.
3724         
3725 2007-09-10  Nathan Froyd  <froydnj@codesourcery.com>
3727         * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
3729 2007-09-07  Nathan Froyd  <froydnj@codesourcery.com>
3731         * lto-lang.c (signed_and_unsigned_types): New variable.
3732         (lto_type_for_size): Consult signed_and_unsigned_types to find
3733         an approprite type, creating it if necessary.
3734         (lto_set_decl_assembler_name): Add actual method body.
3736 2007-09-06  Jim Blandy  <jimb@codesourcery.com>
3738         * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
3739         can't find a var init for this variable, leave its DECL_INITIAL.
3740         * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
3741         lto_elf_map_fn_body.
3742         (lto_map_lto_section): New function.
3743         (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
3744         bodies, and lto_elf_map_optional_lto_section for variable
3745         initializers.
3746         (lto_elf_find_section_data): Quietly return NULL if the section is
3747         missing.
3748         (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
3750         * lto-elf.c (lto_elf_find_section_data): Remove dead code.
3752         * lto-read.c (lto_read_body): Doc fix.
3754 2007-08-29  Kenneth Zadeck <zadeck@naturalbridge.com>
3756         * lto-read.c (fun_in): Renamed to data_in.
3757         (input_expr_operand, input_local_var, input_string_internal,
3758         input_string, input_real, input_list, get_label_decl, 
3759         get_type_ref, input_expr_operand, input_globals, input_labels,
3760         input_local_vars_index, input_local_var, input_local_vars, 
3761         input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
3762         (input_constructor): New function.
3763         (lto_read_function_body): Renamed to lto_read_body and generalized
3764         to handle both functions and constructors.
3765         (lto_read_function_body, lto_read_var_init): New function.
3766         
3767         
3768 2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>
3770         * lto-read.c (input_expr_operand): Assert that there really is a
3771         FUNCTION_DECL.
3772         (input_globals): Removed checks on 0 section.
3773         
3774 2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>
3776         * lto-read.c (fun_in): Added local_decls_index and
3777         local_decls_index_d.  
3778         (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
3779         (input_globals): Enabled code to handle FIELD_DECLs.
3780         (input_local_vars_index, input_local_vars): New function.
3781         (input_local_var): Changed to allow locals to be input randomly.
3782         (lto_read_function_body): Added code to input the
3783         local_decls_index and to free various structures.
3784         
3785 2007-08-17  Jim Blandy  <jimb@codesourcery.com>
3787         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
3788         ATTRIBUTE_UNUSED from 'die' formal.
3790         Use enum LTO_tags where appropriate, instead of 'unsigned int'.
3791         * lto-read.c (input_record_start): Fix return type, type of 'tag'.
3792         (input_list): Fix type of 'tag'.
3793         (input_expr_operand): Fix type of 'tag' argument.  Update
3794         declaration.  Fix type of 'ctag'.  Add default case to switch,
3795         since the type of the switched value is now an enum.
3796         (input_local_vars): Fix type of 'tag'.
3797         (input_bb): Fix type of 'tag' argument.
3798         (input_function): Fix type of 'tag' argument.
3800 2007-08-16  Jim Blandy  <jimb@codesourcery.com>
3802         * lto.c (lto_read_member_DIE): Record the tree we create in
3803         fd->die_cache.  (Our 'die' argument is no longer unused.)
3804         (lto_resolve_field_ref): New function.
3805         * lto.h (lto_resolve_field_ref): New declaration.
3807 2007-08-15  Jim Blandy  <jimb@codesourcery.com>
3809         * lto-read.c (lto_read_var_init): Mark arguments as unused.
3811 2007-08-07  Jim Blandy  <jimb@codesourcery.com>
3813         * lto.c (lto_read_form): Complete attr_classes table.
3814         (DWARF2_form_data): Doc fix.
3815         
3816 2007-08-05  Mark Mitchell  <mark@codesourcery.com>
3818         * lto.h (lto_file_vtable): Remove read_var_init.  Add map_var_init
3819         and unmap_var_init.
3820         (lto_read_var_init): Declare.
3821         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
3822         interface for reading variable initializers.
3823         * lto-elf.c (lto_elf_read_var_init): Remove.
3824         (lto_elf_file_vtable): Update initializer.
3825         (lto_elf_read_var_init): Add comment about unused-ness.
3826         * lto-read.c (lto_read_var_init): New.
3828         * lto.c (lto_read_form): Add entry for DW_AT_inline.
3830 2007-08-02  Kenneth Zadeck <zadeck@naturalbridge.com>
3832         * lto-read.c (lto_read_function_body): Moved declaration of fn
3833         outside of ifdef.
3834         
3835 2007-08-01  Kenneth Zadeck <zadeck@naturalbridge.com>
3837         * lto-read.c (input_uleb128, input_string_internal, input_real,
3838         input_integer, input_record_start, input_list, get_type_ref,
3839         input_flags, input_expr_operand, input_expr_operand,
3840         input_expr_operand, input_local_vars, input_cfg, input_phi,
3841         input_ssa_names, input_bb, input_function): Added semicolons.
3843         
3844 2007-07-31  Kenneth Zadeck <zadeck@naturalbridge.com>
3846         * lto-read.c (input_globals): Remove debugging.
3847         (input_function): Set DECL_ARGUMENTS.
3849         
3850 2007-07-31  Kenneth Zadeck <zadeck@naturalbridge.com>
3852         * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
3853         RETURN_EXPR, MODIFY_EXPR and processing of flags.
3854         (input_phi): Made work with operands other than SSA_NAMES and
3855         fixed processing of flags.
3856         (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
3857         (input_flags): New function.
3858         * lto-lang.c (lto_init): Changed state of in_lto_p.
3859         
3860         
3861 2007-07-24  Mark Mitchell  <mark@codesourcery.com>
3863         * lto-tree.h (lto_varargs_cookie): Remove.
3864         * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
3865         skip_non_parameters, skip_parameters.
3866         (lto_varargs_cookie): Remove.
3867         (lto_read_variable_formal_parameter_constant_DIE): Keep track of
3868         parameter types.
3869         (lto_read_abbrev): New function.
3870         (lto_read_subroutine_type_subprogram_DIE): Make two passes over
3871         child DIEs.
3872         (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
3873         (lto_read_DIE): Use lto_read_abbrev.  Honor skip_* flags.
3874         (lto_file_read): Initialize new context fields.
3875         * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
3876         (lto_unsigned_type): Remove.
3877         (lto_signed_type): Likewise.
3878         (lto_signed_or_unsigned_type): Likewise.
3879         (lto_init): Do not create lto_varargs_cookie.
3880         (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
3881         (LANG_HOOKS_SIGNED_TYPE): Likewise.
3882         (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
3884 2007-07-19  Jan Hubicka  <jh@suse.cz>
3886         * lto-read.c (lto_read_function_body): Produce empty scope block
3887         to avoid crash.
3889 2007-07-18  Mark Mitchell  <mark@codesourcery.com>
3891         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
3892         process local variables.
3893         (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
3895 2007-07-13  Kenneth Zadeck <zadeck@naturalbridge.com>
3897         * lto-read.c (input_list, input_expr_operand): Added struct
3898         function parameter.
3899         (init_cfg, finalize_cfg): Removed function.
3900         (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
3901         (input_labels, input_local_vars): Now takes input_block parameter rather than
3902         synthsyzing it.
3903         (input_cfg, input_phi, input_ssa_names): New functions.
3904         (input_bb): Now passes in input_blocks.  Does not construct cfg
3905         and processes the list of phi functions.
3906         (input_function): Now builds both the cfg and ssa_names table.
3907         (lto_read_function_body): Processes new header fields to construct
3908         streams for the ssa_names and cfg and their debugging.
3909         * lto/lto-lang.c (lto_init): Set in_lto_p.
3910         
3911         
3912 2007-06-28  Mark Mitchell  <mark@codesourcery.com>
3914         * lto.h (lto_file_vtable): Add read_var_init.
3915         * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
3916         initializers.
3917         (lto_main): Remove bogus asserts.
3918         * lto-elf.c (tm.h): Include it.
3919         (libiberty.y): Likewise.
3920         (lto_elf_file): Add strtab and symtab.  Rename
3921         string_table_section_index to sec_strtab.
3922         (lto_elf_file_vtable): Add lto_elf_read_var_init.
3923         (lto_elf_get_shdr): New function.
3924         (lto_elf_free_shdr): Likewise.
3925         (lto_elf_find_section_data): Use them.
3926         (lto_elf_read_symtab): New function.
3927         (lto_elf_lookup_sym): Likewise.
3928         (lto_elf_free_sym): Likewise.
3929         (lto_elf_file_open): Tidy.  Call lto_elf_read_symtab.
3930         (lto_elf_built_init): New function.
3931         (lto_elf_read_var_init): Likewise.
3932         * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
3934 2007-06-26  Kenneth Zadeck <zadeck@naturalbridge.com>
3936         * lto-read (make_new_block): Initialize the stmt_list.
3937         (lto_static_init_local): Add debugging for missing codes.
3938         
3939 2007-06-26  Mark Mitchell  <mark@codesourcery.com>
3941         * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3942         unprototyped functions. 
3944 2007-06-23  Mark Mitchell  <mark@codesourcery.com>
3946         * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3947         Handle DW_AT_MIPS_linkage_name.
3948         (lto_read_subroutine_type_subprogram): Likewise.  Correct
3949         compilation errors.
3950         (lto_main): Remove incorrect assertions.
3951         * lto-symbtab.c: Build function types out of TREE_LISTs.
3953         * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
3954         
3955         * Make-lang.in (LTO_OBJS): Depend on attribs.o.
3956         
3957 2007-06-21  Kenneth Zadeck <zadeck@naturalbridge.com>
3959         * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
3960         dummy since ggc does not like empty structs.
3961         * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
3962         * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
3963         expr->common to expr->base.
3964         (make_new_block): Moved stmt_list to proper place.
3967 2007-03-14 Robert Kennedy  <jimbob@google.com>
3969         Eliminate use of lang_hooks.set_decl_assembler_name from LTO
3970         * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
3971         assembler name from DWARF.
3972         * lto-lang.c (lto_set_decl_assembler_name) New function.
3974 2006-09-10  Mark Mitchell  <mark@codesourcery.com>
3976         * lto.h (lto_file_vtable): New structure.
3977         (lto_file): Add vtable pointer.
3978         (lto_file_init): Add vtable paramter.
3979         (lto_read_function_body): New function.
3980         (lto_symtab_merge_fn): New function.
3981         * lto.c (lto_file_init): Add vtable parameter.
3982         (lto_read_form): Fill in entries for DW_AT_prototyped,
3983         DW_AT_frame_base.
3984         (lto_read_subroutine_type_subprogram_DIE): New function.
3985         (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
3986         DW_TAG_subprogram.
3987         * lto-elf.c (lto_elf_vile_vtable): New variable.
3988         (lto_elf_file_open): Pass it to lto_file_init.
3989         (lto_elf_map_fn_body): New function.
3990         (lto_elf_unmap_fn_body): Likewise.
3991         * lto-read.c: New file.
3992         * lto-symtab.c (lto_symtab_merge_fn): New function.
3993         * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
3994         tree_rest_of_compilation.
3995         * Make-lang.in (LTO_OBJS): Add lto-read.o
3996         (lto-read.o): New target.
3998 2006-09-03  Mark Mitchell  <mark@codesourcery.com>
4000         * lto.c (<inttypes.h>): Don't include it.
4001         (lto_context): Don't typedef it.
4002         (lto_resolve_reference): New function.
4003         (lto_read_form): Use it.
4004         (lto_resolve_type_ref): New function.
4005         (lto_resolve_var_ref): Likewise.
4006         (lto_resolve_fn_ref): Likewise.
4007         * lto.h (<inttypes.h>): Include it.
4008         (lto_context): New type.
4009         (lto_ref): New structure.
4010         (lto_resolve_type_ref): Declare.
4011         (lto_resolve_var_ref): Likewise.
4012         (lto_resolve_fn_ref): Likewise.
4014 2006-08-18  Mark Mitchell  <mark@codesourcery.com>
4016         * lang-specs.h: New file.
4018 2006-08-14  Mark Mitchell  <mark@codesourcery.com>
4020         * lto.c (lto_info_fd_init): Allocate the DIE cache.
4021         (lto_info_fd_close): Deallocate it.
4022         (lto_die_cache_entry): New structure.
4023         (lto_cache_hash): New function.
4024         (lto_cache_eq): Likewise.
4025         (lto_cache_store_DIE): Likewise.
4026         (lto_cache_lookup_DIE): Likewise.
4027         (lto_read_referenced_type_DIE): Use the cache.
4028         (lto_read_pointer_type_DIE): Robustify.
4029         (lto_read_DIE): Use the cache.
4030         * lto.h (hashtab.h): Include.
4031         (lto_info_fd): Add DIE cache.
4032         * Make-lang.in (LTO_H): New variable.
4033         (lto/lto-lang.o): Use LTO_H.
4034         (lto/lto-elf.o): Likewise.
4035         (lto/lto-symtab.o): Likewise.
4037 2006-07-09  Mark Mitchell  <mark@codesourcery.com>
4039         * lto.c (lto_abi_mismatch_error): New function.
4040         (lto_abbrev_read): Initialize num_abbrevs.
4041         (lto_read_form): Specify allowed form classes for
4042         DW_AT_declaration.  Adjust for change to lto_set_cu_context.
4043         (lto_read_variable_formal_parameter_constant_DIE): Handle
4044         DW_AT_declaration.  Call lto_symtab_merge_var.
4045         (lto_read_pointer_type_DIE): New function.
4046         (lto_read_base_type_DIE): Use build_nonstandard_integer_type.  Do
4047         not creat TYPE_DECLs for types that already have them.
4048         (lto_read_DIE): Add lto_read_pointer_type_DIE.
4049         (lto_set_cu_context): Make cu_start point to the header, not the
4050         first DIE.
4051         (lto_file_read): Adjust for change to lto_set_cu_context.
4052         * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
4053         (lto/lto-symtab.o): New rule.
4054         * lto-tree.h (lang_identifier): Add decl field.
4055         (LANG_IDENTIFIER_CAST): New macro.
4056         (LTO_IDENTIFIER_DECL): Likewise.
4057         (lto_symtab_merge_var): Declare.
4058         * lto-symtab.c: New file.
4060 2006-07-02  Daniel Berlin  <dberlin@dberlin.org>
4062         * lto.c (lto_context): Add current_cu and info_fd members.
4063         (DWARF2_CompUnit): New structure.
4064         (lto_read_DIE): Take lto_info_fd *.
4065         (lto_read_child_DIEs): Ditto.
4066         (lto_file_corrupt_error): Constify argument.
4067         (lto_set_cu_context): New function
4068         (lto_info_fd_init): Ditto.
4069         (lto_info_fd_close): Ditto.
4070         (lto_file_init): Use lto_info_fd_init.
4071         (lto_file_close): Use lto_info_fd_close.
4072         (lto_read_initial_length): Pass in pointer to header size.
4073         (lto_read_comp_unit_header): Correct cu_length to
4074         real length from beginning of header.  Take lto_info_fd * as
4075         argument.
4076         (find_cu_for_offset): New function.
4077         (lto_read_form): Change first argument to lto_info_fd *.
4078         Add FORM_CONTEXT argument.
4079         Handle DW_FORM_ref_addr.
4080         (lto_read_tag_DIE): Change first argument to lto_info_fd *.     
4081         (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
4082         Swap contexts if necessary for form.
4083         (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
4084         lto_file_corrupt_error.
4085         (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
4086         (lto_read_referenced_type_DIE): Change first argument to
4087         lto_info_fd *.  Access lto_fd fields through base pointer.
4088         (lto_read_compile_unit_DIE): Change first argument to an
4089         lto_info_fd *.
4090         (lto_read_variable_formal_parameter_constant_DIE): Ditto.
4091         (lto_read_base_type_DIE): Ditto.
4092         (lto_read_child_DIEs): Ditto.
4093         (lto_read_DIE): Ditto.  Change type of function pointer.
4094         (lto_info_read): New function.
4095         (lto_set_cu_context): Ditto.
4096         (lto_file_read): Use lto_info_read, walk resulting CU's
4097         (lto_main): Update for lto_info_fd change.
4098         * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
4099         necessary.
4100         * lto.h (DWARF2_CompUnit): New structure.
4101         (lto_info_fd): Ditto.
4102         (lto_file): Change debug_info to be an lto_info_fd.
4103         
4104 2006-06-25  Mark Mitchell  <mark@codesourcery.com>
4106         * lto.c (toplev.h): Include it.
4107         (dwarf2.h): Likewise.
4108         (tree.h): Likewise.
4109         (tm.h): Likewise.
4110         (cgraph.h): Likewise.
4111         (ggc.h): Likewise.
4112         (inttypes.h): Likewise.
4113         (DWARF2_attr): New type.
4114         (DWARF2_abbrev): Likewise.
4115         (DWARF2_class): Likewise.
4116         (DWARF2_form_data): Likewise.
4117         (lto_context): Likewise.
4118         (lto_fd_init): New function.
4119         (lto_abbrev_fd_init): Likewise.
4120         (lto_abbrev_fd_close): Likewise.
4121         (lto_file_init): Use them.
4122         (lto_file_close): New function.
4123         (lto_file_corrupt_error): Likewise.
4124         (LTO_CHECK_INT_VAL): New macro.
4125         (lto_check_size_t_val): New function.
4126         (lto_check_int_val): Likewise.
4127         (LTO_READ_TYPE): New macro.
4128         (lto_read_ubyte): New function.
4129         (lto_read_uhalf): Likewise.
4130         (lto_read_uword): Likewise.
4131         (lto_read_uleb128): Likewise.
4132         (lto_read_initial_length): Likewise.
4133         (lto_abbrev_read_attrs): Likewise.
4134         (lto_abbrev_read): Likewise.
4135         (lto_abbrev_lookup): Likewise.
4136         (lto_read_section_offset): Likewise.
4137         (lto_read_comp_unit_header): Likewise.
4138         (lto_read_form): Likewise.
4139         (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
4140         (LTO_BEGIN_READ_ATTRS): Likewise.
4141         (LTO_END_READ_ATTRS): Likewise.
4142         (lto_unsupported_attr_error): New function.
4143         (lto_get_identifier): Likewise.
4144         (lto_read_referenced_type_DIE): Likewise.
4145         (lto_read_compile_unit_DIE): Likewise.
4146         (lto_read_variable_formal_parameter_constant_DIE): Likewise.
4147         (lto_read_base_type_DIE): Likewise.
4148         (lto_read_DIE): Likewise.
4149         (lto_read_child_DIEs): Likewise.
4150         (lto_file_read): Read DIEs.
4151         (lto_main): Ask middle end to emit entities.
4152         * lto-tree.h (lang_identifier): Inherit from tree_identifier.
4153         * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
4154         (lto_elf_file_close): Likewise.
4155         * lto.h (lto_file): Declare.
4156         (DWARF2_abbrev): Likewise.
4157         (lto_fd): New type.
4158         (lto_abbrev_fd): Likewise.
4159         (lto_file): Use new types.
4160         (lto_file_close): Declare.
4161         * lto-lang.c (lto_init): Always use unit-at-a-time mode.
4162         
4163 2006-06-18  Mark Mitchell  <mark@codesourcery.com>
4165         * lto.h: New file.
4166         * lto.c: New file.
4167         * lto-elf.c: New file.
4168         * lto-lang.c (flags.h): Include it.
4169         (lto.h): Likewise.
4170         (lto_init): New function.
4171         (lto_write_globals): Remove.
4172         (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing. 
4173         (LANG_HOOKS_INIT): Define.
4174         (LANG_HOOKS_PARSE_FILE): Likewise.
4175         * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
4176         (LTO_EXE): Link with libelf.
4177         (lto/lto-lang.o): Update dependencies.
4178         (lto/lto.o): New target.
4179         (lto/lto-elf.o): Likewise.
4181 2006-06-12  Mark Mitchell  <mark@codesourcery.com>
4183         * config-lang.in: New file.
4184         * Make-lang.in: Likewise.
4185         * lto-tree.h: Likewise.
4186         * lto-lang.c: Likewise.