1 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
4 DEF_FUNCTION_TYPE_11): Define.
6 2015-10-10 Jan Hubicka <hubicka@ucw.cz>
8 * lto.c (hash_canonical_type): Honor
9 type_with_interoperable_signedness.
11 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
13 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
14 (DEF_FUNCTION_TYPE_VAR_11): Delete.
16 2015-08-31 Richard Biener <rguenther@suse.de>
18 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
19 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
20 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
21 participate in merging with something else.
23 2015-08-31 Richard Biener <rguenther@suse.de>
25 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
26 test, do not replace a non-builtin with a builtin.
27 * lto.c (compare_tree_sccs_1): Do not merge things we stream
28 as builtins vs. non-builtins.
30 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
32 * lto.h: Remove useless typedefs.
34 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
36 * lto.c: Remove redundant includes.
38 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
40 * lto-lang.c: Fix double word typos.
42 2015-07-10 Andrew MacLeod <amacleod@redhat.com>
44 * lto.c: Include cfghooks.h rather than predict.h.
46 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
48 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
50 * lto-object.c: Likewise.
51 * lto-partition.c: Likewise.
52 * lto-symtab.c: Likewise.
54 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
56 * lto-lang.c: Adjust includes for flags.h changes.
58 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
60 * lto-lang.c: Adjust includes.
61 * lto-object.c: Likewise.
62 * lto-partition.c: Likewise.
63 * lto-symtab.c: Likewise.
66 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
68 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
69 * lto-object.c: Likewise.
70 * lto-partition.c: Likewise.
71 * lto-symtab.c: Likewise.
72 * lto-tree.h: Likewise.
75 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
77 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
78 than typed_noop_remove. Remove redudant typedefs.
80 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
82 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
83 * lto-object.c: Likewise.
84 * lto-partition.c: Likewise.
85 * lto-symtab.c: Likewise.
88 2015-06-14 Jan Hubicka <hubicka@ucw.cz>
91 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
93 2015-06-12 DJ Delorie <dj@redhat.com>
95 * lto-lang.c (lto_type_for_size): Include intN types.
96 (lto_type_for_mode): Likewise.
98 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
100 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
102 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
104 * lto-lang.c : Adjust include files.
105 * lto-object.c : Likewise.
106 * lto-partition.c : Likewise.
107 * lto-partition.h : Likewise.
108 * lto-symtab.c : Likewise.
112 2015-06-06 Jan Hubicka <hubicka@ucw.cz>
115 * lto-symtab.c (warn_type_compatibility_p): Fix call of
116 odr_or_derived_type_p.
117 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
119 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
122 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
125 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
127 * lto-lang.c (lto_write_globals): Remove.
128 (LANG_HOOKS_WRITE_GLOBALS): Same.
130 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
132 * lto-lang.c: Adjust includes for restructured coretypes.h.
133 * lto-object.c: Likewise.
134 * lto-partition.c: Likewise.
135 * lto-symtab.c: Likewise.
138 2015-06-04 Jan Hubicka <hubicka@ucw.cz>
140 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
142 2015-06-03 Jan Hubicka <hubicka@ucw.cz>
144 * lto.c (iterative_hash_canonical_type,
145 gimple_register_canonical_type): only hash main variants of types
147 2015-05-27 Martin Liska <mliska@suse.cz>
149 * lto-partition.c (new_partition): Reset number of symbols.
150 (add_symbol_to_partition_1): Increment number of symbols.
151 (undo_partition): Decrement number of symbols.
152 (lto_balanced_map): Dump number of symbols and insns that
153 belong to a partition.
154 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
156 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
158 * lto.c (hash_canonical_type): Be sure we hash only types that
160 (gimple_register_canonical_type_1): Do not produce canonical
161 types for types that do not need alias sets.
163 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
165 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
167 2015-05-19 Jan Hubicka <hubicka@ucw.cz>
169 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
171 2015-05-17 Jan Hubicka <hubicka@ucw.cz>
173 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
174 compare ODR types (if available) and function types.
175 (lto_symtab_merge): ... here; output ODR violation warnings
176 and call warn_types_mismatch.
178 2015-04-29 Jan Hubicka <hubicka@ucw.cz>
180 * lto.c (lto_fixup_state): Call verify_type.
182 2015-04-18 Trevor Saunders <tsaunders@mozilla.com>
184 * lto.c: Adjust for hash_table changes.
186 2015-03-27 Jan Hubicka <hubicka@ucw.cz>
188 * lto.c (lto_read_decls): Move code registering odr types out
189 of TYPE_CANONICAL conditional and also register polymorphic types.
191 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
193 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
194 DECL_ARTIFICAL symbols.
196 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
199 * lto.c (unify_scc): Revert location cache when unification
201 (lto_read_decls): Accept location cache after sucess;
202 apply location cache before calling debug hooks.
204 2015-03-10 Jan Hubicka <hubicka@ucw.cz>
206 * lto.c (read_cgraph_and_symbols): Do not do merging
209 2015-02-26 Jakub Jelinek <jakub@redhat.com>
211 * lto.c (lto_mode_identity_table): New variable.
212 (lto_read_decls): Add mode_table argument to the lto_input_block
214 (lto_file_finalize): Initialize mode_table.
215 (lto_init): Initialize lto_mode_identity_table.
217 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
220 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
222 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
224 2015-02-03 Jan Hubicka <hubicka@ucw.cz>
226 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
228 2015-01-30 Joseph Myers <joseph@codesourcery.com>
230 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
231 changed to pass input_location as first argument.
233 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
235 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
237 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
239 * lto.c (compare_tree_sccs_1): Add comparsion of
240 DECL_FUNCTION_SPECIFIC_TARGET
242 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
243 James Norris <jnorris@codesourcery.com>
245 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
247 * lto.c: Include "gomp-constants.h".
249 2015-01-14 Ilya Verbin <ilya.verbin@intel.com>
251 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
252 from select_what_to_stream.
254 2015-01-09 Bernd Schmidt <bernds@codesourcery.com>
255 Jakub Jelinek <jakub@redhat.com>
258 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
261 2015-01-09 Michael Collison <michael.collison@linaro.org>
263 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
264 input.h, alias.h, symtab.h, options, fold-const.h,
265 wide-int.h, and inchash.h due to flattening of tree.h.
266 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
267 input.h, alias.h, symtab.h, fold-const.h,
268 wide-int.h, and inchash.h due to flattening of tree.h.
269 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
270 input.h, alias.h, symtab.h, options, fold-const.h,
271 wide-int.h, and inchash.h due to flattening of tree.h.
272 * lto-partition.c: Ditto.
273 * lto-symtab.c: Ditto.
275 2015-01-05 Jakub Jelinek <jakub@redhat.com>
277 Update copyright years.
279 2014-12-22 Martin Liska <mliska@suse.cz>
281 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
283 (undo_partition): Likewise.
284 (lto_balanced_map): Likewise.
286 2014-12-22 Martin Liska <mliska@suse.cz>
288 * lto-partition.c: Include of symbol-summary.h is added.
289 * lto-symtab.c: Likewise.
292 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
295 * lto.c (read_cgraph_and_symbols): Update call of
296 remove_unreachable_nodes.
297 (do_whole_program_analysis): Remove call of
298 symtab->remove_unreachable_nodes
300 2014-12-08 Trevor Saunders <tsaunders@mozilla.com>
302 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
303 htab with malloc instead of ggc.
305 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
307 * lto.c: Replace htab with hash_table.
309 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
311 * lto.c (lto_read_in_decl_state): Adjust.
312 (lto_fixup_state): Likewise.
314 2014-11-17 Jan Hubicka <hubicka@ucw.cz>
316 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
318 2014-11-14 Jan Hubicka <hubicka@ucw.cz>
320 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
322 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
323 Bernd Schmidt <bernds@codesourcery.com>
324 Andrey Turetskiy <andrey.turetskiy@intel.com>
325 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
327 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
329 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
330 Ilya Tocar <ilya.tocar@intel.com>
331 Andrey Turetskiy <andrey.turetskiy@intel.com>
332 Bernd Schmidt <bernds@codesourcery.com>
334 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
335 LTO_SECTION_NAME_PREFIX.
336 * lto-partition.c (lto_promote_cross_file_statics): Call
337 select_what_to_stream.
338 * lto.c (lto_section_with_id): Use section_name_prefix instead of
339 LTO_SECTION_NAME_PREFIX.
340 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
341 being built as an offload compiler.
343 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
345 * lto-lang.c: Remove redundant enum from machine_mode.
347 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
349 * lto.c: Adjust include files.
351 * lto-object.c: Ditto.
352 * lto-partition.c: Ditto.
353 * lto-symtab.c: Ditto.
355 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
357 * lto-lang.c: Adjust include files.
358 * lto-object.c: Ditto.
359 * lto-partition.c: Ditto.
360 * lto-symtab.c: Ditto.
363 2014-10-16 DJ Delorie <dj@redhat.com>
365 * lto-object.c (lto_obj_begin_section): In the event that pointer
366 sizes aren't powers of two, choose a more suitable alignment
369 2014-10-14 DJ Delorie <dj@redhat.com>
371 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
373 (lto_init): Initialize all intN types, not just int128.
375 2014-10-06 Martin Liska <mliska@suse.cz>
377 * lto.c (stream_out): ARG_UNUSED added for last argument.
379 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
381 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
384 2014-09-23 Andi Kleen <ak@linux.intel.com>
386 * lto-partition.c (node_cmp): Update comment.
387 (varpool_node_cmp): Use symtab_node for comparison.
388 (add_sorted_nodes): New function.
389 (lto_balanced_map): Change to keep ordered queue
390 of ordered node. Handle no_reorder attribute.
392 2014-09-11 Jan Hubicka <hubicka@ucw.cz>
394 * lto.c (lto_read_decls): Register ODR types.
396 2014-08-20 Jan Hubicka <hubicka@ucw.cz>
398 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
400 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
402 2014-08-14 Jan Hubicka <hubicka@ucw.cz>
404 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
406 2014-08-14 Richard Biener <rguenther@suse.de>
409 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
411 2014-08-08 Richard Biener <rguenther@suse.de>
413 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
415 2014-08-08 Bin Cheng <bin.cheng@arm.com>
418 * lto-lang.c (lto_init): Switch mis-matched arguments.
420 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
422 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
424 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
426 * lto-partition.c, lto-partition.h: Use hash_set instead of
429 2014-07-31 Andi Kleen <ak@linux.intel.com>
431 * lto.c (hash_canonical_type): Use inchash::hash
432 and use inchash::add_expr.
433 (iterative_hash_canonical_type): Dito.
435 2014-07-30 Richard Biener <rguenther@suse.de>
437 * lto-streamer.h (lto_write_data): New function.
438 * langhooks.c (lhd_append_data): Do not free block.
439 * lto-section-out.c (lto_write_data): New function writing
440 raw data to the current section.
441 (lto_write_stream): Adjust for langhook semantic change.
442 (lto_destroy_simple_output_block): Write header directly.
443 * lto-opts.c (lto_write_options): Write options directly.
444 * lto-streamer-out.c (produce_asm): Write heaeder directly.
445 (lto_output_toplevel_asms): Likewise.
446 (copy_function_or_variable): Copy data directly.
447 (write_global_references): Output index table directly.
448 (lto_output_decl_state_refs): Likewise.
449 (write_symbol): Write data directly.
450 (produce_symtab): Adjust.
451 (produce_asm_for_decls): Output header and refs directly.
453 2014-07-25 Andi Kleen <ak@linux.intel.com>
455 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
457 2014-07-25 Andi Kleen <ak@linux.intel.com>
459 * lto.c (hash_canonical_type): Convert to inchash.
460 (iterative_hash_canonical_type): Dito.
462 2014-07-25 Andi Kleen <ak@linux.intel.com>
464 * lto.c: Include inchash.h
466 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
468 * lto.c (mentions_vars_p_decl_non_common): Skip
470 mentions_vars_p_function): Do DECL_ARGUMENTS.
471 (lto_fixup_prevailing_decls): Update.
473 2014-07-12 Jan Hubicka <hubicka@ucw.cz>
475 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
477 (materialize_cgraph): Do not push GIMPLE_IN timevar.
479 2014-07-11 Jan Hubicka <hubicka@ucw.cz>
481 * lto-partition.c (add_references_to_partition): Use
482 varpool_ctor_useable_for_folding_p.
483 * lto.c (lto_read_in_decl_state): Update sanity check.
485 2014-07-01 Martin Liska <mliska@suse.cz>
487 IPA REF alias refactoring
488 * lto-partition.c (add_symbol_to_partition_1): Usage of
489 FOR_EACH_ALIAS added.
491 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
494 * lto.c (lto_copy_fields_not_streamed): New function.
495 (compare_tree_sccs_1): Do not compare fields shared in between type
497 (lto_read_decls): Fixup types first before inserting into hash.
499 2014-06-28 Andrew Pinski <apinski@cavium.com>
501 * lto.c (lto_read_decls): Fix comment in comment.
503 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
505 * lto.c (lto_copy_fields_not_streamed): New function.
506 (compare_tree_sccs_1): Do not compare fields shared in between type
508 (lto_read_decls): Fixup types first before inserting into hash.
510 2014-06-25 Martin Liska <mliska@suse.cz>
512 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
514 (add_symbol_to_partition_1): Likewise.
515 (lto_balanced_map): Likewise.
516 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
518 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
520 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
521 (mentions_vars_p_function): ... here.
522 (compare_tree_sccs_1): Update VINDEX checks.
523 (lto_fixup_prevailing_decls): Likewise.
525 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
527 * lto.c (canonical_type_hash_cache): Use hash_map instead of
530 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
534 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
536 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
538 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
540 * lto.c (compare_tree_sccs_1): Do not compare priorities.
542 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
544 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
546 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
548 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
549 (do_whole_program_analysis): Use verify_symtab.
551 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
553 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
554 lto_fixup_prevailing_decls): Skip section names.
556 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
558 * lto-symtab.c: Include builtins.h.
560 2014-05-26 Richard Biener <rguenther@suse.de>
562 * lto.c (lto_parse_hex): Use int64_t.
563 (lto_resolution_read): Likewise.
565 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
567 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
569 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
571 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
573 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
575 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
577 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
578 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
579 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
581 2012-05-22 Bernd Schmidt <bernds@codesourcery.com>
583 * lto-object.c: Include "lto-section-names.h".
584 (LTO_SEGMENT_NAME): Don't define.
585 * lto.c: Include "lto-section-names.h".
587 2014-05-17 Jan Hubicka <hubicka@ucw.cz>
590 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
591 mixed with variables.
593 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
595 * lto-tree.h: Don't use variable_size gty attribute.
596 * lto.c (lto_read_in_decl_state): Adjust.
597 (create_subid_section_table): Likewise.
598 (lto_flatten_files): Likewise.
599 (read_cgraph_and_symbols): Likewise.
601 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
602 Mike Stump <mikestump@comcast.net>
603 Richard Sandiford <rdsandiford@googlemail.com>
605 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
606 * lto-lang.c (get_nonnull_operand): Likewise.
608 2014-04-28 Richard Biener <rguenther@suse.de>
611 * lto-lang.c: Define flag_isoc11.
613 2014-04-23 David Malcolm <dmalcolm@redhat.com>
615 * lto-partition.c (add_references_to_partition): Update for
616 removal of implicit pointer from the is-a.h API.
617 (add_symbol_to_partition_1): Likewise.
618 (contained_in_symbol): Likewise.
619 (undo_partition): Likewise.
620 (lto_balanced_map): Likewise.
621 (promote_symbol): Likewise.
622 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
623 (lto_symtab_merge_symbols): Likewise.
624 * lto.c (lto_wpa_write_files): Likewise.
626 2014-04-15 Richard Biener <rguenther@suse.de>
628 * lto.c: Include params.h.
629 (do_whole_program_analysis): Switch on flag_lto_partition value,
630 add support for LTO_PARTITION_ONE.
631 * lto-partition.h (lto_balanced_map): Adjust.
632 * lto-partition.c (lto_balanced_map): Get number of desired
633 partitions as argument to support -flto-partition=one.
635 2014-04-14 Jan Hubicka <hubicka@ucw.cz>
637 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
640 2014-03-19 Jan Hubicka <hubicka@ucw.cz>
642 * lto.c: Include ipa-inline.h
643 (do_whole_program_analysis): Free inline summary after partitioning.
645 2014-03-19 Richard Biener <rguenther@suse.de>
648 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
649 instead of TREE_CHAIN as chain_next.
651 2014-03-19 Richard Biener <rguenther@suse.de>
653 * lto.c (lto_wpa_write_files): Move call to
654 lto_promote_cross_file_statics ...
655 (do_whole_program_analysis): ... here, into the partitioning
656 block. Do not ggc_collect after lto_wpa_write_files but
657 for a last time before it.
659 2014-03-19 Jakub Jelinek <jakub@redhat.com>
662 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
665 2014-03-18 Jakub Jelinek <jakub@redhat.com>
668 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
669 and complex_{float,{,long_}double}_type_node.
671 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
673 * lto-lang.c (lto_init): Pass flag_short_double to
674 build_common_tree_nodes.
676 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
679 * lto.c (stream_out): Avoid parallel streaming with
680 -flto=jobserver until we are able to throttle it down
683 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
685 * lto-partition.c (add_symbol_to_partition_1,
686 undo_partition, lto_balanced_map): Aliases have no
688 (lto_balanced_map): Do not follow refering variables
689 if they can be optimized out.
691 2014-02-14 Richard Biener <rguenther@suse.de>
694 * lto.c (compare_tree_sccs_1): Do not compare
695 DECL_FUNCTION_SPECIFIC_TARGET.
696 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
698 2014-02-12 Richard Biener <rguenther@suse.de>
701 * lto-lang.c (lto_write_globals): Do not call
702 wrapup_global_declarations or emit_debug_global_declarations
703 but emit debug info for non-function scope variables
706 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
708 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
710 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
713 * lto-partition.c (symbol_class): Move to cgraph.h
714 (get_symbol_class): Move to symtab.c
715 (add_references_to_partition, add_symbol_to_partition_1,
716 lto_max_map, lto_1_to_1_map, lto_balanced_map,
717 lto_promote_cross_file_statics): Update.
719 2014-02-05 Jan Hubicka <hubicka@ucw.cz>
721 * lto.c (lto_parallelism): New static var.
722 (do_stream_out, wait_for_child, stream_out): New static functions.
723 (lto_wpa_write_files): Add support for parallel streaming.
724 (do_whole_program_analysis): Set parallelism.
725 * lang.opt (fwpa): Add parameter.
726 * lto-lang.c (lto_handle_option): Handle flag_wpa.
727 (lto_init): Update use of flag_wpa.
728 * lto-streamer.h (asm_nodes_output): Declare.
730 2014-02-05 Richard Biener <rguenther@suse.de>
732 * lto.h (lto_global_var_decls): Remove.
733 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
734 (lto_write_globals): Do nothing in WPA stage, gather globals from
736 * lto.c (lto_main): ... not here.
737 (materialize_cgraph): Do not call rest_of_decl_compilation
738 on the empty lto_global_var_decls vector.
739 (lto_global_var_decls): Remove.
741 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
743 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
744 needs duplicating, not generic COMDAT.
746 2014-02-04 Richard Biener <rguenther@suse.de>
749 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
750 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
752 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
756 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
757 merge force_output and forced_by_abi flags.
759 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
761 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
764 2014-01-09 Richard Biener <rguenther@suse.de>
766 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
768 2014-01-09 Richard Biener <rguenther@suse.de>
771 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
772 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
773 (gimple_canonical_types_compatible_p): Do not compare them either.
775 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
777 Update copyright years
779 2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
781 * lto.c: Remove struct tags when referring to class varpool_node.
782 * lto-partition.c: Likewise.
783 * lto-symtab.c: Likewise.
785 2013-11-29 Jakub Jelinek <jakub@redhat.com>
786 Richard Biener <rguenther@suse.de>
789 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
791 2013-11-29 Jakub Jelinek <jakub@redhat.com>
794 * lto.c (mentions_vars_p_omp_clause): New function.
795 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
798 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
800 * lto.c: Add required include files from gimple.h.
801 * lto-lang.c: Likewise
802 * lto-object.c: Likewise
803 * lto-partition.c: Likewise
804 * lto-symtab.c: Likewise
806 2013-11-18 Trevor Saunders <tsaunders@mozilla.com>
808 * lto-partition.c lto-symtab.c lto.c Adjust.
810 2013-11-14 Diego Novillo <dnovillo@google.com>
812 * lto-lang.c: Include stringpool.h.
813 Include stor-layout.h.
814 * lto-partition.c: Include gcc-symtab.h.
815 * lto.c: Include stor-layout.h.
817 2013-10-31 David Malcolm <dmalcolm@redhat.com>
819 Automated part of renaming of symtab_node_base to symtab_node.
821 Patch autogenerated by rename_symtab.py from
822 https://github.com/davidmalcolm/gcc-refactoring-scripts
823 revision 58bb219cc090b2f4516a9297d868c245495ee622
825 * lto-partition.c (add_symbol_to_partition): Rename
826 symtab_node_base to symtab_node.
827 (get_symbol_class): Likewise.
828 (symbol_partitioned_p): Likewise.
829 (add_references_to_partition): Likewise.
830 (add_symbol_to_partition_1): Likewise.
831 (contained_in_symbol): Likewise.
832 (add_symbol_to_partition): Likewise.
833 (lto_1_to_1_map): Likewise.
834 (lto_max_map): Likewise.
835 (lto_balanced_map): Likewise.
836 (privatize_symbol_name): Likewise.
837 (promote_symbol): Likewise.
838 (may_need_named_section_p): Likewise.
839 (rename_statics): Likewise.
840 (lto_promote_statics_nonwpa): Likewise.
841 * lto-symtab.c (lto_symtab_merge): Likewise.
842 (lto_symtab_resolve_replaceable_p): Likewise.
843 (lto_symtab_symbol_p): Likewise.
844 (lto_symtab_resolve_can_prevail_p): Likewise.
845 (lto_symtab_resolve_symbols): Likewise.
846 (lto_symtab_merge_decls_2): Likewise.
847 (lto_symtab_merge_decls_1): Likewise.
848 (lto_symtab_merge_decls): Likewise.
849 (lto_symtab_merge_symbols_1): Likewise.
850 (lto_symtab_merge_symbols): Likewise.
851 (lto_symtab_prevailing_decl): Likewise.
852 * lto.c (lto_wpa_write_files): Likewise.
853 (read_cgraph_and_symbols): Likewise.
854 (do_whole_program_analysis): Likewise.
856 2013-10-30 David Malcolm <dmalcolm@redhat.com>
858 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
859 declarations onto multiple lines to make things easier for
861 (lto_symtab_merge_decls_1): Likewise.
862 (lto_symtab_merge_symbols_1): Likewise.
864 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
866 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
867 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
870 2013-10-29 David Malcolm <dmalcolm@redhat.com>
872 Patch autogenerated by refactor_symtab.py from
873 https://github.com/davidmalcolm/gcc-refactoring-scripts
874 revision 58bb219cc090b2f4516a9297d868c245495ee622
876 * lto-partition.c (lto_promote_cross_file_statics): Update for
877 conversion of symtab types to a true class hierarchy.
878 (rename_statics): Likewise.
879 (promote_symbol): Likewise.
880 (privatize_symbol_name): Likewise.
881 (lto_balanced_map): Likewise.
882 (varpool_node_cmp): Likewise.
883 (node_cmp): Likewise.
884 (lto_1_to_1_map): Likewise.
885 (undo_partition): Likewise.
886 (add_symbol_to_partition): Likewise.
887 (contained_in_symbol): Likewise.
888 (add_symbol_to_partition_1): Likewise.
889 (add_references_to_partition): Likewise.
890 (symbol_partitioned_p): Likewise.
891 (get_symbol_class): Likewise.
892 (lto_max_map): Likewise.
893 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
894 (lto_symtab_merge_symbols): Likewise.
895 (lto_symtab_merge_symbols_1): Likewise.
896 (lto_symtab_merge_decls): Likewise.
897 (lto_symtab_merge_decls_1): Likewise.
898 (lto_symtab_merge_decls_2): Likewise.
899 (lto_symtab_resolve_symbols): Likewise.
900 (lto_symtab_resolve_can_prevail_p): Likewise.
901 (lto_symtab_symbol_p): Likewise.
902 (lto_symtab_resolve_replaceable_p): Likewise.
903 (lto_symtab_merge): Likewise.
904 (lto_varpool_replace_node): Likewise.
905 (lto_cgraph_replace_node): Likewise.
906 * lto.c (lto_main): Likewise.
907 (do_whole_program_analysis): Likewise.
908 (materialize_cgraph): Likewise.
909 (read_cgraph_and_symbols): Likewise.
910 (cmp_partitions_order): Likewise.
911 (lto_materialize_function): Likewise.
912 (has_analyzed_clone_p): Likewise.
914 2013-10-29 Andrew MacLeod <amacleod@redhat.com>
916 * lto/lto-object.c: Add gimple.h to include list.
917 * lto/lto-partition.c: Likewise.
919 2013-10-18 Andrew MacLeod <amacleod@redhat.com>
921 * lto.c: Remove tree-flow.h from include list.
923 2013-10-15 Richard Biener <rguenther@suse.de>
925 * lto.c (hash_canonical_type): Split out from ...
926 (iterative_hash_canonical_type): ... here. Register types
928 (gimple_canonical_type_hash): Adjust.
929 (gimple_register_canonical_type_1): Split out from ...
930 (gimple_register_canonical_type): ... here. Cache computed
932 (lto_register_canonical_types): Split into two modes,
933 clearing and computing TYPE_CANONICAL.
934 (lto_read_decls): Adjust.
935 (read_cgraph_and_symbols): Do two passes over global trees,
936 first clearing then computing TYPE_CANONICAL.
938 2013-10-14 Richard Biener <rguenther@suse.de>
940 * lto.c (gimple_canonical_types): Move out-of GC space.
941 (canonical_type_hash_cache): Make a pointer-map.
942 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
944 (iterative_hash_canonical_type): Adjust.
945 (read_cgraph_and_symbols): Likewise.
946 (print_lto_report_1): Likewise.
948 2013-10-14 Richard Biener <rguenther@suse.de>
950 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
951 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
952 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
953 gimple_types_compatible_p_1, gimple_types_compatible_p,
954 visit, iterative_hash_name, struct type_hash_pair,
955 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
956 gimple_type_eq, gimple_register_type, num_not_merged_types,
957 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
958 num_not_merged_types_in_same_scc_trees): Remove old merging code
960 (lto_read_decls): Do not run old merging code in parallel.
961 (read_cgraph_and_symbols): Do not init/free old merging
963 (print_lto_report_1): Do not report differences of old vs. new
966 2013-10-14 Richard Biener <rguenther@suse.de>
968 * lto-lang.c (lto_init): Do not re-init canonical types here.
969 (lto_register_canonical_types): Move to ...
970 * lto.c (lto_register_canonical_types): ... here.
971 (gimple_canonical_types, canonical_type_hash_cache,
972 iterative_hash_canonical_type, gimple_canonical_type_hash,
973 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
974 gimple_register_canonical_type): Add canonical type merging machinery
976 (read_cgraph_and_symbols): Init and free canonical type tables
978 (print_lto_report_1): Report canonical type table stats here.
980 2013-10-11 Jakub Jelinek <jakub@redhat.com>
982 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
984 2013-09-25 Tom Tromey <tromey@redhat.com>
986 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
987 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
988 (lto/lto-object.o): Remove.
990 2013-09-06 Richard Biener <rguenther@suse.de>
992 * lto-symtab.c: Move from gcc/
993 * lto.h: Include vec.h.
994 (lto_global_var_decls): Declare.
995 * lto.c (lto_global_var_decls): Move definition here.
996 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
998 * config-lang.in (gtfiles): Add lto.h.
1000 2013-08-31 Jan Hubicka <jh@suse.cz>
1002 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1003 DECL_FIELD_OFFSET can contain an reference to variable.
1005 2013-08-31 Jan Hubicka <jh@suse.cz>
1007 * lto.c (tree_with_vars): Turn into vector.
1008 (MAYBE_REMEMBER_WITH_VARS): Change to...
1009 (CHECK_VAR): ... this one.
1010 (CHECK_NO_VAR): New macro.
1011 (maybe_remember_with_vars_typed): Turn to ...
1012 (mentions_vars_p_typed): ... this one.
1013 (maybe_remember_with_vars_common): Turn to ...
1014 (mentions_vars_p_comon): ... this one.
1015 (maybe_remember_with_vars_decl_minimal): Turn to ...
1016 (mentions_vars_p_decl_minmal): ... this one.
1017 (maybe_remember_with_vars_decl_common): Turn to ...
1018 (mentions_vars_p_decl_common): ... this one.
1019 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1020 (mentions_vars_p_decl_with_vis): ... this one.
1021 (maybe_remember_with_vars_decl_non_common): Turn to ...
1022 (mentions_vars_p_decl_non_common): ... this one.
1023 (maybe_remember_with_vars_function): Turn to ...
1024 (mentions_vars_p_function): ... this one.
1025 (maybe_remember_with_vars_field_decl): Turn to ...
1026 (mentions_vars_p_field_decl): ... this one.
1027 (maybe_remember_with_vars_type): Turn to ...
1028 (mentions_vars_p_type): ... this one.
1029 (maybe_remember_with_vars_binfo): Turn to ...
1030 (mentions_vars_p_binfo): ... this one.
1031 (maybe_remember_with_vars_constructor): Turn to ...
1032 (mentions_vars_p_constructor): ... this one.
1033 (maybe_remember_with_vars_expr): Turn to ...
1034 (mentions_vars_p_expr): ... this one.
1035 (maybe_remember_with_vars): Turn to ...
1036 (mentions_vars_p): ... this one.
1037 (lto_read_decls): Update.
1038 (LTO_SET_PREVAIL): Do not call function for internal decls.
1039 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1040 check that something was updated.
1041 (lto_fixup_state): Do not care about internal decls.
1042 (lto_fixup_decls): Update.
1043 (read_cgraph_and_symbols): Update.
1045 2013-08-29 Jan Hubicka <jh@suse.cz>
1047 * lto.c (read_cgraph_and_symbols): Free decl states.
1049 2013-08-29 Jan Hubicka <jh@suse.cz>
1051 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1052 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1055 2013-08-28 Jan Hubicka <jh@suse.cz>
1057 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1058 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1059 (unify_scc): Do checking assert.
1061 2013-08-06 Jan Hubicka <jh@suse.cz>
1062 Martin Liska <marxin.liska@gmail.com>
1064 * lto-partition.c (lto_balanced_map): Always base order on
1067 2013-08-06 Jan Hubicka <jh@suse.cz>
1069 * lto.c (lto_materialize_function): Do not read body anymore.
1071 2013-08-02 Jan Hubicka <jh@suse.cz>
1073 * lto.c (lto_materialize_function): Do not push struct function.
1074 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1075 (may_need_named_section_p): Even abstract origins may need
1078 2013-07-30 David Malcolm <dmalcolm@redhat.com>
1080 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1083 * lto.c (do_whole_program_analysis): Update for move of
1084 all_regular_ipa_passes from a global to a field of class
1087 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
1089 * lto-partition.c: Fix typos.
1091 2013-06-20 Jan Hubicka <jh@suse.cz>
1093 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1094 partitioning of variables.
1096 2013-06-20 Jan Hubicka <jh@suse.cz>
1098 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1100 2013-06-19 Jan Hubicka <jh@suse.cz>
1102 * lto-partition.c (add_references_to_partition): Use
1105 2013-06-18 Richard Biener <rguenther@suse.de>
1107 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1109 (lto_register_function_decl_in_symtab): Likewise.
1110 (cmp_tree): New function.
1111 (unify_scc): Instead of using the streamer cache map from entry
1112 to cache index match up the two maps we have by sorting them.
1113 Adjust calls to lto_register_var_decl_in_symtab and
1114 lto_register_function_decl_in_symtab.
1116 2013-06-17 Richard Biener <rguenther@suse.de>
1118 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1119 * lto.c: Include data-streamer.h.
1120 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1121 (gimple_type_leader_entry_s, gimple_type_leader,
1122 gimple_lookup_type_leader): Remove.
1123 (gtc_visit): Simplify.
1124 (gimple_types_compatible_p): Likewise.
1125 (gimple_register_type_1): Likewise. Merge into ...
1126 (gimple_register_type): ... this. Keep it as legacy for
1127 statistics purposes for now.
1128 (fixup_integer_cst): Remove.
1129 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1131 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1132 maybe_remember_with_vars_*): ... these.
1133 (uniquify_nodes): Remove.
1134 (lto_fixup_prevailing_type): New function.
1135 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1136 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1137 (num_merged_types, num_prevailing_types, num_not_merged_types,
1138 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1139 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1140 num_scc_compare_collisions): New global counters.
1141 (compare_tree_sccs_1): New function.
1142 (compare_tree_sccs): Likewise.
1143 (unify_scc): Likewise.
1144 (lto_read_decls): Stream in tree SCCs and unify them on the
1145 way in. Finalize prevailing SCC tree members.
1146 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1147 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1148 to ggc-collect during merging.
1149 (print_lto_report_1): Adjust for new merging code.
1151 2013-06-12 Jan Hubicka <jh@suse.cz>
1153 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1155 2013-06-12 Jan Hubicka <jh@suse.cz>
1157 * lto.c (register_resolution): Take lto_file_data argument.
1158 (lto_register_var_decl_in_symtab,
1159 lto_register_function_decl_in_symtab): Update.
1160 (read_cgraph_and_symbols): Update resolution_map handling.
1162 2013-06-11 Jan Hubicka <jh@suse.cz>
1164 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1165 (add_symbol_to_partition_1): Likewise.
1166 (contained_in_symbol): Likewise.
1167 (lto_balanced_map): Likewise.
1168 (rename_statics): Drop weakref.
1170 2013-06-05 Richard Biener <rguenther@suse.de>
1172 * lto.c (num_merged_types): New global variable.
1173 (uniquify_nodes): Increase num_merged_types when merging a type.
1174 (print_lto_report_1): Output the number of merged types.
1176 2013-06-01 Jan Hubicka <jh@suse.cz>
1178 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1179 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1180 (do_whole_program_analysis): Update dumping.
1182 2013-05-29 Jan Hubicka <jh@suse.cz>
1184 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1186 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1188 2013-05-15 Jan Hubicka <jh@suse.cz>
1190 * lto-partition.c (privatize_symbol_name): Return true when
1191 privatizing happened.
1192 (rename_statics): Do not go into infinite loop when privatizing
1195 2013-05-16 Jason Merrill <jason@redhat.com>
1197 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1199 2013-05-15 Martin Jambor <mjambor@suse.cz>
1201 * lto-partition.c (lto_balanced_map): Print symbol order instead
1204 2013-05-15 Jan Hubicka <jh@suse.cz>
1208 * lto-partition.c (get_symbol_class): Fix weakrefs.
1209 (lto_balanced_map): Fix weakrefs.
1210 (privatize_symbol_name): Remove unnecesary label.
1211 (rename_statics): Handle weakrefs as statics.
1213 2013-05-09 Jan Hubicka <jh@suse.cz>
1214 Richard Biener <rguenther@suse.de>
1216 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1217 (lto_register_var_decl_in_symtab): Likewise.
1218 (lto_main): Promote statics.
1219 * lto-partition.c (privatize_symbol_name): New function.
1220 (promote_symbol): Use it.
1221 (may_need_named_section_p): New predicate.
1222 (rename_statics): New functions.
1223 (lto_promote_cross_file_statics): Simplify; do renaming.
1224 (lto_promote_statics_nonwpa): New function.
1225 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1227 2013-02-08 Richard Biener <rguenther@suse.de>
1230 * lto-lang.c (lto_init): Do not enter a dummy file.
1232 2013-02-07 Uros Bizjak <ubizjak@gmail.com>
1235 * lto.c (lto_resolution_ready): Use %wx instead of
1236 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1238 2013-02-04 Richard Guenther <rguenther@suse.de>
1241 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1242 or lto_fixup_decls at LTRANS time.
1244 2013-01-09 Jan Hubicka <jh@suse.cz>
1247 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1249 2012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1252 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1254 (lto_main): Record the global variables if WPA isn't enabled.
1256 2012-11-20 Diego Novillo <dnovillo@google.com>
1257 Jakub Jelinek <jakub@redhat.com>
1259 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1261 2012-11-16 Diego Novillo <dnovillo@google.com>
1263 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1265 * lto-lang.c: Use new vec API in vec.h.
1266 * lto-partition.c: Likewise.
1267 * lto-partition.h: Likewise.
1270 2012-10-31 Lawrence Crowl <crowl@google.com>
1272 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1273 down-cast via dyn_cast.
1274 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1275 (undo_partition): Likewise.
1276 (lto_balanced_map): Likewise.
1277 (get_symbol_class): Likewise and via is_a.
1278 (lto_balanced_map): Change symtab checking to is_a.
1280 2012-10-12 Richard Biener <rguenther@suse.de>
1283 * lto.c (gimple_types_compatible_p_1): Also compare
1285 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1287 2012-10-09 Tobias Burnus <burnus@net-b.de>
1289 * lto-lang.c (lto_register_builtin_type): Avoid useless
1291 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1293 2012-10-08 Tobias Burnus <burnus@net-b.de>
1295 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1296 Free lto_file struct after closing the file.
1298 2012-10-08 Jan Hubicka <jh@suse.cz>
1300 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1301 (fixup_integer_cst): New functoin.
1302 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1304 2012-10-07 Jan Hubicka <jh@suse.cz>
1306 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1307 release input encoders.
1308 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1310 2012-10-06 Jan Hubicka <jh@suse.cz>
1313 * lto.c (resolution_map): New static var.
1314 (register_resolution): New function.
1315 (lto_register_var_decl_in_symtab): Use it.
1316 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1318 2012-09-20 Martin Jambor <mjambor@suse.cz>
1320 * lto.c (lto_materialize_function): Call push_struct_function and
1323 2012-09-19 Dehao Chen <dehao@google.com>
1325 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1327 2012-09-19 Jan Hubicka <jh@suse.cz>
1329 * lto.c (lto_materialize_function): Update confused comment.
1330 (read_cgraph_and_symbols): Do not free symtab.
1332 2012-09-12 Jan Hubicka <jh@suse.cz>
1334 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1335 AUX pointer cleaning. Add max partitioning.
1336 * lto-partition.c (enum symbol_class): New.
1337 (get_symbol_class): New function.
1338 (symbol_partitioned_p): New function.
1339 (add_references_to_partition): Remove.
1340 (add_aliases_to_partition): Remove.
1341 (add_cgraph_node_to_partition_1): Remove.
1342 (add_cgraph_node_to_partition): Remove.
1343 (add_symbol_to_partition): New function.
1344 (add_symbol_to_partition_1): New function.
1345 (contained_in_symbol): New function.
1346 (partition_cgraph_node_p): Remove.
1347 (partition_varpool_node_p): Remove.
1348 (partition_symbol_p): Remove.
1349 (lto_1_to_1_map): Cleanup.
1351 (lto_balanced_map): Update.
1352 (lto_promote_cross_file_statics): Update.
1353 * lto-partition.h (lto_max_map): Declare.
1354 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1356 2012-09-11 Jan Hubicka <jh@suse.cz>
1359 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1360 type is variant leader.
1362 2012-09-11 Richard Guenther <rguenther@suse.de>
1364 * lto.c (enum gtc_mode): Remove.
1365 (struct type_pair_d): Adjust.
1366 (lookup_type_pair): Likewise.
1367 (gimple_type_leader): Do not mark as deletable.
1368 (gimple_lookup_type_leader): Adjust.
1369 (gtc_visit): Likewise.
1370 (gimple_types_compatible_p_1): Likewise.
1371 (gimple_types_compatible_p): Likewise.
1372 (gimple_type_hash): Likewise.
1373 (gimple_register_type): Likewise.
1374 (read_cgraph_and_symbols): Manage lifetime of tables
1377 2012-09-11 Richard Guenther <rguenther@suse.de>
1379 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1380 struct type_pair_d, lookup_type_pair, struct sccs,
1381 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1382 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1383 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1384 visit, iterative_hash_name, struct type_hash_pair,
1385 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1386 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1387 Move here from gimple.c
1388 (read_cgraph_and_symbols): Free hash tables here.
1389 (print_lto_report_1): New function wrapping print_lto_report.
1390 (do_whole_program_analysis): Call it.
1391 (lto_main): Likewise.
1393 2012-09-10 Jan Hubicka <jh@suse.cz>
1395 * lto-partition.c (partition_symbol_p): Forward declare.
1396 (add_references_to_partition): Reimplement using partition_symbol_p.
1397 (add_aliases_to_partition): Break out from add_references_to_partition;
1398 reimplement using partition_symbol_p.
1399 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1401 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1402 (partition_varpool_node_p): Do not special case aliases.
1404 2012-08-12 Jan Hubicka <jh@suse.cz>
1406 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1407 it is deleted after streaming.
1408 * lto-partition.c (partition_symbol_p): New function.
1409 (promote_var, promote_fn): Remove.
1410 (promote_symbol): New function.
1411 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1412 to lookup the actual boundaries instead of computing them ad-hoc.
1414 2012-08-12 Jan Hubicka <jh@suse.cz>
1416 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1418 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1420 * lto-partition.c (new_partition): Update.
1421 * lto.c (cmp_partitions_order): Update.
1422 (lto_wpa_write_files): Update.
1423 (free_ltrans_partitions): Update.
1424 (add_references_to_partition): Update.
1425 (add_cgraph_node_to_partition_1): Update.
1426 (add_cgraph_node_to_partition): Update.
1427 (add_varpool_node_to_partition): Update.
1428 (undo_partition): Update.
1429 (lto_balanced_map): Update.
1430 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1431 set_referenced_from_this_partition_p): Update.
1432 (lto_promote_cross_file_statics): Update.
1434 2012-08-12 Jan Hubicka <jh@suse.cz>
1436 * lto-partition.c (set_referenced_from_other_partition_p,
1437 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1439 (lto_promote_cross_file_statics): Use them.
1441 2012-07-24 Jan Hubicka <jh@suse.cz>
1443 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1445 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1447 * lto-tree.h (lang_decl): Add variable_size GTY option.
1449 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1451 * lto.c: Do not include timevar.h.
1452 * Make-lang.in: Fix dependencies.
1454 2012-06-18 Lawrence Crowl <crowl@google.com>
1456 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1457 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1458 to lto_wpa_write_files.
1459 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1460 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1461 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1462 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1463 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1464 to be a front end, but is not one.
1466 2012-05-18 Jan Hubicka <jh@suse.cz>
1468 * lto.c (lto_materialize_constructors_and_inits): Remove.
1469 (read_cgraph_and_symbols): Remove handling of alias pairs.
1471 2012-05-17 Jan Hubicka <jh@suse.cz>
1473 * lto-partition.c (add_references_to_partition): Handle external vars.
1474 (partition_varpool_node_p): Likewise.
1475 (lto_promote_cross_file_statics): Do not promote externals.
1477 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1479 * lto-lang.c (handle_fnspec_attribute): New static function.
1480 (lto_attribute_table): Add "fn spec".
1481 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1483 2012-05-04 Jan Hubicka <jh@suse.cz>
1485 * lto.c (do_whole_program_analysis): Set timevars correctly.
1486 (lto_main): Likewise.
1488 2012-05-04 Richard Guenther <rguenther@suse.de>
1490 * lang.opt (fwpa): Do not mark as Optimization.
1491 (fltrans): Likewise.
1493 2012-04-30 Jan Hubicka <jh@suse.cz>
1495 * lto.c (lto_main): Use compile ().
1496 * lto-partition.c (partition_cgraph_node_p): Use
1497 symtab_used_from_object_file_p.
1498 (partition_varpool_node_p): Likewise.
1500 2012-04-20 Jan Hubicka <jh@suse.cz>
1502 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1504 2012-04-18 Jan Hubicka <jh@suse.cz>
1506 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1507 Update for new ipa-ref API.
1509 2012-04-16 Jan Hubicka <jh@suse.cz>
1511 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1512 walkers to walk cgraph and varpool.
1513 (materialize_cgraph): Likewise.
1514 * lto-partition.c (lto_1_to_1_map): Likewise.
1515 (lto_balanced_map): Likewise.
1516 (lto_promote_cross_file_statics): Likewise.
1518 2012-04-14 Jan Hubicka <jh@suse.cz>
1520 * lto.c: Update field referenced for new cgraph/varpool layout.
1521 * lto-partition.c: Likewise.
1523 2012-04-11 Jan Hubicka <jh@suse.cz>
1525 * lto.c: Update copyright; remove params.h, ipa-inline.h
1526 and ipa-utils.h inlines; inline lto-partition.h
1527 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1528 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1529 add_references_to_partition, add_cgraph_node_to_partition_1,
1530 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1531 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1532 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1533 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1534 * lto-partition.c: ... here; new file.
1535 * lto-partition.h: New file.
1536 * Make-lang.in (lto.o): Update dependencies.
1537 (lto-partition.o): New.
1539 2012-04-05 Richard Guenther <rguenther@suse.de>
1541 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1544 2012-03-12 Richard Guenther <rguenther@suse.de>
1546 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1548 2012-03-06 Richard Guenther <rguenther@suse.de>
1551 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1553 2012-02-28 Richard Guenther <rguenther@suse.de>
1556 * lto.c (lto_register_function_decl_in_symtab): Do not register
1557 a reverse renamed decl mapping.
1559 2012-01-06 Jakub Jelinek <jakub@redhat.com>
1562 * lto-lang.c (handle_returns_twice_attribute): New function.
1563 (lto_attribute_table): Add returns_twice attribute.
1565 2011-12-21 Richard Guenther <rguenther@suse.de>
1567 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1568 (LTO_FIXUP_TREE): Use it.
1569 (uniquify_nodes): Mark new non-prevailing types and avoid
1570 calling gimple_register_type on others.
1571 (lto_read_decls): Add comment.
1573 2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1575 * lto.h (lto_parse_hex): Delete.
1576 * lto.c (lto_read_decls): Use 'int' for offsets.
1577 (lto_parse_hex): Make static and return proper 64-bit host type.
1578 (lto_resolution_read): Use proper 64-bit host type.
1580 2011-12-13 Richard Guenther <rguenther@suse.de>
1583 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1584 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1586 2011-12-01 Uros Bizjak <ubizjak@gmail.com>
1588 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1589 (ignore_attribute): New.
1591 2011-11-21 Aldy Hernandez <aldyh@redhat.com>
1593 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1594 (handle_transaction_pure_attribute): New.
1596 2011-11-03 Richard Guenther <rguenther@suse.de>
1599 * lto-lang.c (lto_post_options): Do not read file options.
1600 * lto.c (lto_read_all_file_options): Remove.
1601 (lto_init): Call lto_set_in_hooks here.
1603 2011-10-09 Jan Hubicka <jh@suse.cz>
1605 * lto.c (node_cmp, varpool_node_cmp): New functions.
1606 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1607 (cmp_partitions): Rename to ...
1608 (cmp_partitions_size): ... this one.
1609 (cmp_partitions_order): New function.
1610 (lto_wpa_write_files): Sort partitions by order when
1611 -fno-toplevel-reorder is used.
1613 2011-10-09 Andi Kleen <ak@linux.intel.com>
1615 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1617 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1619 * lto-lang.c (def_builtin_1): Delete old interface with two
1620 parallel arrays to hold standard builtin declarations, and replace
1621 it with a function based interface that can support creating
1622 builtins on the fly in the future. Change all uses, and poison
1623 the old names. Make sure 0 is not a legitimate builtin index.
1625 2011-10-02 Andi Kleen <ak@linux.intel.com>
1627 * lto-object.c (lto_obj_add_section_data): Add list.
1628 (lto_obj_add_section): Fill in list.
1629 (ltoobj_build_section_table): Pass through list.
1630 * lto.c (file_data_list): Declare.
1631 (create_subid_section_table): Pass arguments directly.
1632 Fill in list of file_datas.
1634 (lto_create_files_from_ids): Pass in direct arguments.
1635 Don't maintain list.
1636 (lto_file_read): Use explicit section and file data lists.
1637 (lto_read_all_file_options): Pass in section_list.
1638 * lto.h (lto_obj_build_section_table): Add list.
1639 (lto_section_slot): Add next.
1640 (lto_section_list): Declare.
1642 2011-10-02 Jan Hubicka <jh@suse.cz>
1645 * common.c (lto_resolution_str): Add new resolution.
1646 * common.h (lto_resolution_str): Likewise.
1648 2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1649 Andi Kleen <ak@linux.intel.com>
1652 * lto.c (lto_splay_tree_delete_id): New.
1653 (lto_splay_tree_compare_ids): Likewise.
1654 (lto_splay_tree_lookup): Likewise.
1655 (lto_splay_tree_id_equal_p): Likewise.
1656 (lto_splay_tree_insert): Likewise.
1657 (lto_splay_tree_new): Likewise.
1658 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1659 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1660 (create_subid_section_table): Use lto_splay_tree_lookup and
1661 lto_splay_tree_insert.
1662 (lto_file_read): Use lto_splay_tree_new.
1664 2011-09-26 Andi Kleen <ak@linux.intel.com>
1666 * lto.c (lto_resolution_read): Remove id dumping.
1667 (lto_section_with_id): Turn id HOST_WIDE_ID.
1668 (create_subid_section_table): Dito.
1670 2011-08-28 Dodji Seketeli <dodji@redhat.com>
1672 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1675 2011-08-11 Martin Jambor <mjambor@suse.cz>
1677 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1679 2011-08-08 Diego Novillo <dnovillo@google.com>
1681 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1682 * lto.c: Include tree-streamer.h.
1684 2011-07-06 Richard Guenther <rguenther@suse.de>
1686 * lto-lang.c (lto_init):
1687 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1689 2011-06-11 Jan Hubicka <jh@suse.cz>
1692 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1693 (lto_balanced_map): Likewise.
1695 2011-06-11 Jan Hubicka <jh@suse.cz>
1697 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1698 (add_cgraph_node_to_partition) ... here; walk aliases.
1699 (lto_1_to_1_map): Remove same body alias code.
1700 (promote_fn): Likewise.
1701 (lto_promote_cross_file_statics): Update comment.
1704 2011-06-07 Diego Novillo <dnovillo@google.com>
1706 * lto.c (uniquify_nodes): Move code to register decls to
1707 the loop that computes canonical types.
1709 2011-06-07 Richard Guenther <rguenther@suse.de>
1711 * lto-lang.c (lto_init): Do not set
1712 size_type_node or call set_sizetype.
1714 2011-06-04 Diego Novillo <dnovillo@google.com>
1716 * lto.c (lto_init): New.
1717 (lto_main): Call it.
1719 2011-06-03 Diego Novillo <dnovillo@google.com>
1721 * lto.c (get_resolution): Move from lto-streamer-in.c.
1722 (lto_register_var_decl_in_symtab): Likewise.
1723 (lto_register_function_decl_in_symtab): Likewise.
1724 (uniquify_nodes): Call lto_register_var_decl and
1725 lto_register_function_decl_in_symtab after reading a new
1726 VAR_DECL or FUNCTION_DECL.
1728 2011-06-01 Richard Guenther <rguenther@suse.de>
1730 * lto-lang.c (lto_register_canonical_types): New function.
1731 (lto_init): Register common nodes with the canonical type machinery.
1732 Do not play tricks with char_type_node.
1734 2011-05-26 Richard Guenther <rguenther@suse.de>
1736 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1738 2011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1740 * lto.c (lto_ft_typed): New function.
1741 (lto_ft_common): Call it.
1742 (lto_ft_constructor): Likewise.
1743 (lto_ft_expr): Likewise.
1744 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1747 2011-05-20 Richard Guenther <rguenther@suse.de>
1749 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1750 (lto_ft_type): Move main-variant and pointer-to chain building ...
1751 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1752 in a separate final loop.
1754 2011-05-19 Richard Guenther <rguenther@suse.de>
1756 * lto.c (uniquify_nodes): First register all types before
1757 fixing up the tree SCC.
1759 2011-05-11 Jan Hubicka <jh@suse.cz>
1762 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1764 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1766 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1767 location of binfo field.
1768 (lto_fixup_prevailing_decls): Likewise.
1770 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1772 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1773 build_function_type_array or build_varargs_function_type_array
1776 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1778 * lto-lang.c (global_bindings_p): Return bool.
1780 2011-05-07 Jan Hubicka <jh@suse.cz>
1782 * lto.c (lto_materialize_function): Use
1783 cgraph_function_with_gimple_body_p.
1784 (add_cgraph_node_to_partition): Do not re-add items to partition;
1786 (add_varpool_node_to_partition): Do not re-add items to partition.
1788 2011-05-03 Jan Hubicka <jh@suse.cz>
1790 * lto.c (free_ltrans_partitions): Fix accidental commit.
1792 2011-05-03 Jan Hubicka <jh@suse.cz>
1794 * lto.c (ltrans_partition_def): Remove GTY annotations.
1795 (ltrans_partitions): Move to heap.
1796 (new_partition): Update.
1797 (free_ltrans_partitions): New function.
1798 (lto_wpa_write_files): Use it.
1800 2011-04-29 Martin Jambor <mjambor@suse.cz>
1802 * lto.c: Include ipa-utils.h.
1803 (lto_balanced_map): Update call to ipa_reverse_postorder.
1804 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1806 2011-04-29 Michael Matz <matz@suse.de>
1808 * lto.c (toplevel): Include tree-flow.h.
1809 (lto_read_in_decl_state): Don't merge types here.
1810 (tree_with_vars): New static hash table.
1811 (remember_with_vars): New static functions.
1812 (LTO_FIXUP_TYPE): New macro.
1813 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1814 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1815 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1816 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1817 (lto_read_decls): Uniquify while reading in trees.
1818 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1819 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1820 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1821 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1822 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1823 lto_fixup_tree): Remove.
1824 (lto_fixup_state): Remove data argument. Use
1825 lto_symtab_prevailing_decl.
1826 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1827 (lto_fixup_prevailing_decls): New function.
1828 (lto_fixup_state_aux): Argument aux is unused.
1829 (lto_fixup_decls): Don't allocate pointer sets, don't use
1830 lto_fixup_tree, use lto_fixup_prevailing_decls.
1831 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1832 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1834 2011-04-16 Eric Botcazou <ebotcazou@adacore.com>
1836 * lto.c (lto_balanced_map): Fix typos in head comment.
1837 (lto_promote_cross_file_statics): Fix long lines and remove redundant
1840 2011-04-16 Jan Hubicka <jh@suse.cz>
1842 * lto.c (lto_balanced_map): Update.
1844 2011-04-14 Jan Hubicka <jh@suse.cz>
1846 * lto.c: Include ipa-inline.h
1847 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
1849 (ipa_node_duplication_hook): Fix declaration.
1850 * Make-lang.in (lto.o): Update dependencies.
1852 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
1854 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
1856 * lto.c (lto_fixup_common): Likewise.
1858 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
1860 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
1861 (handle_type_generic_attribute): Likewise.
1863 2011-04-03 Michael Matz <matz@suse.de>
1865 * lto.c (lto_materialize_function): Don't read and then discard
1866 sections in WPA mode.
1867 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
1869 * lto-lang.c (registered_builtin_fndecls): Remove.
1870 (lto_getdecls): Return NULL_TREE.
1871 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
1873 2011-03-31 Richard Guenther <rguenther@suse.de>
1876 * lto.c (lto_wpa_write_files): Disable assert for non-empty
1877 partitions when checking is not enabled.
1879 2011-03-25 Kai Tietz <ktietz@redhat.com>
1881 * lto.c (lto_resolution_read): Use filename_cmp instead
1883 (lto_read_section_data): Likewise.
1885 2011-03-25 Jeff Law <law@redhat.com>
1887 * lto/lto-lang.c (def_fn_type): Add missing va_end.
1889 2011-03-21 Kai Tietz <ktietz@redhat.com>
1892 * lto-lang.c (lto_attribute_table): Adjust table.
1894 2011-02-18 Jakub Jelinek <jakub@redhat.com>
1897 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
1900 2011-02-18 Richard Guenther <rguenther@suse.de>
1903 * lto-tree.h (lto_global_var_decls): Do not declare here.
1904 * lto-lang.c: Include lto-streamer.h.
1905 * Make-lang.in (lto-lang.o): Adjust dependencies.
1907 2011-02-10 Kai Tietz <kai.tietz@onevision.com>
1910 * lto.c (lto_read_section_data): Free
1911 fd_name in failure case.
1912 For mingw targets don't hash file-descriptor.
1913 (read_cgraph_and_symbols): Close current_lto_file
1916 2011-01-11 Jan Hubicka <jh@suse.cz>
1920 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
1921 are not partitioned.
1923 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
1925 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
1928 2010-12-06 Richard Guenther <rguenther@suse.de>
1931 * lto-lang.c (lto_init): Give names to basic types.
1933 2010-11-30 Joseph Myers <joseph@codesourcery.com>
1935 * lto-object.c: Don't include toplev.h.
1936 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
1938 2010-11-30 Joseph Myers <joseph@codesourcery.com>
1940 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
1943 2010-11-29 Joseph Myers <joseph@codesourcery.com>
1945 * lto-endian.h: Delete.
1946 * lto-object.c: Don't include "libiberty.h".
1947 (O_BINARY): Don't define.
1948 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
1949 (O_BINARY): Don't define.
1951 2010-11-23 Richard Guenther <rguenther@suse.de>
1953 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
1955 2010-11-23 Richard Guenther <rguenther@suse.de>
1958 * lto.c (read_cgraph_and_symbols): Bail out after errors.
1960 2010-11-17 Joseph Myers <joseph@codesourcery.com>
1962 * lto.c (lto_main): Take no arguments.
1963 * lto.h (lto_main): Update prototype.
1965 2010-11-16 Ian Lance Taylor <iant@google.com>
1967 * lto-object.c (lto_obj_file_open): Call
1968 simple_object_attributes_merge rather than
1969 simple_object_attributes_compare.
1971 2010-11-12 Joseph Myers <joseph@codesourcery.com>
1973 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
1974 * lto-lang.c (lto_handle_option): Take location_t parameter.
1976 2010-11-10 Joseph Myers <joseph@codesourcery.com>
1978 * lto.c (lto_resolution_read): Start diagnostics with lowercase
1979 letters and remove trailing '.'.
1980 (lto_file_finalize): Start diagnostic with a lowercase letter.
1982 2010-11-02 Ian Lance Taylor <iant@google.com>
1984 * lto-object.c: New file.
1985 * lto-elf.c: Remove file.
1986 * lto-macho.c: Remove file.
1987 * lto-macho.h: Remove file.
1988 * lto-coff.c: Remove file.
1989 * lto-coff.h: Remove file.
1990 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
1992 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
1993 (lto/lto-objfile.o): New target.
1994 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
1995 (lto/lto.o): Remove $(LIBIBERTY_H).
1997 2010-10-22 Jan Hubicka <jh@suse.cz>
1999 * lto.c (add_cgraph_node_to_partition,
2000 add_varpool_node_to_partition): Add debug info.
2001 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2003 (do_whole_program_analysis): Set function flags before dumping.
2005 2010-10-22 Richard Guenther <rguenther@suse.de>
2007 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2008 the new gimple_register_canonical_type.
2010 2010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2013 * config-lang.in (boot_language): Set to $enable_lto.
2015 2010-10-18 Jakub Jelinek <jakub@redhat.com>
2018 * Make-lang.in (check-lto): New dummy target.
2020 2010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2022 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2024 2010-10-08 Joseph Myers <joseph@codesourcery.com>
2026 * lto-lang.c (lto_init_options): Change to
2027 lto_init_options_struct. Update parameters.
2028 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2029 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2031 2010-10-06 Jan Hubicka <jh@suse.cz>
2033 * lto.c (lto_balanced_map): Fix accounting of program size.
2035 2010-10-06 Jan Hubicka <jh@suse.cz>
2037 * lto.c (lto_balanced_map): Do not produce empty partitions.
2039 2010-10-06 Andi Kleen <ak@linux.intel.com>
2041 * lto.c (lto_process_name): Add.
2042 (lto_main): Call lto_process_name.
2044 2010-10-06 Jan Hubicka <jh@suse.cz>
2046 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2047 COMDATs required by the linker.
2049 2010-10-05 Ian Lance Taylor <iant@google.com>
2051 * lto.c (lto_section_with_id): Make s a const pointer.
2053 2010-10-05 Jan Hubicka <jh@suse.cz>
2055 * lto.c: Include params.h.
2056 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2057 refcounting in aux field.
2058 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2060 (lto_1_to_1_map): Simplify.
2061 (lto_balanced_map): New function.
2062 (do_whole_program_analysis): Chose proper partitioning alg.
2063 * Make-lang.in (lto.o): Add dependency on params.h
2065 2010-10-04 Andi Kleen <ak@linux.intel.com>
2067 * Make-lang.in (lto1): Add + to build rule.
2069 2010-10-03 Andi Kleen <ak@linux.intel.com>
2071 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2074 2010-09-28 Jan Hubicka <jh@suse.cz>
2076 * lto-lang.c (handle_leaf_attribute): New function.
2077 (lto_attribute_tables): Add leaf.
2079 2010-09-25 Jie Zhang <jie@codesourcery.com>
2081 * lto.c (lto_read_all_file_options): Start a new line after
2082 printing out file names.
2084 2010-09-24 Jan Hubicka <jh@suse.cz>
2086 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2088 2010-09-20 Jan Hubicka <jh@suse.cz>
2090 PR tree-optimize/45605
2091 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2093 2010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2095 * lto-elf.c (lto_obj_file_open): Also provide filename when
2098 2010-09-17 Jan Hubicka <jh@suse.cz>
2100 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2102 2010-09-17 Richard Guenther <rguenther@suse.de>
2104 * lang.opt (flag_wpa): Also enable for the driver.
2106 2010-09-16 Jan Hubicka <jh@suse.cz>
2108 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2111 2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2113 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2115 2010-09-08 Jan Hubicka <jh@suse.cz>
2117 * lto.c (real_file_count, real_file_decl_data): New static vars.
2118 (read_cgraph_and_symbols): Use it.
2120 2010-09-08 Richard Guenther <rguenther@suse.de>
2122 * lto.c (read_cgraph_and_symbols): Collect again after each
2125 2010-09-07 Jan Hubicka <jh@suse.cz>
2127 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2129 2010-09-03 Richard Guenther <rguenther@suse.de>
2131 * lto-elf.c (validate_file): Always error if validation fails.
2133 2010-08-20 Jan Hubicka <jh@suse.cz>
2135 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2136 (lto_wpa_write_files): Update comments.
2138 2010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2141 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2142 with has_analyzed_clone_p.
2144 2010-08-20 Jan Hubicka <jh@suse.cz>
2146 * lto.c (has_analyzed_clone_p): New function
2147 (lto_materialize_function): Use callgraph to determine if
2149 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2151 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2153 * lto.c: Use FOR_EACH_VEC_ELT.
2155 2010-07-27 Andi Kleen <ak@linux.intel.com>
2157 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2159 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2161 * lto-lang.c (lto_handle_option): Update prototype and return
2162 value type. Remove duplicate assignment to result.
2164 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2166 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2168 (lto_init_options): Update prototype.
2169 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2172 2010-07-10 Andi Kleen <ak@linux.intel.com>
2175 * lto.c: Include splay-tree.h
2176 (lto_resolution_read): Change to walk file_ids tree and parse
2177 extra file_id in resolution file.
2178 (lto_section_with_id): Add.
2179 (create_subid_section_table): Add.
2181 (lto_create_files_from_ids): Add.
2182 (lto_file_read): Change to handle sub file ids and create list
2183 of file_datas. Add output argument for count.
2184 (get_section_data): Pass file_data to lto_get_section_name.
2185 (lto_flatten_file): Add.
2186 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2188 2010-07-10 Andi Kleen <ak@linux.intel.com>
2190 * lto-coff.c (hash_name, eq_name): Move.
2191 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2192 * lto-elf.c: (hash_name, eq_name): Move.
2193 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2194 * lto-macho.c: (hash_name, eq_name): Move.
2195 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2196 * lto.c: (hash_name, eq_name): Move from lto-*.c
2197 (lto_obj_create_section_hash_table): Add.
2198 (free_with_string): Add.
2200 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2202 * lto-coff.c: Include diagnostic-core.h in every file that
2204 * lto-elf.c: Likewise.
2205 * lto-lang.c: Likewise.
2206 * lto-macho.c: Likewise.
2208 2010-07-07 Jakub Jelinek <jakub@redhat.com>
2210 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2211 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2214 2010-07-05 Jan Hubicka <jh@suse.cz>
2216 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2217 nodes from same comdat group as well as all comdat functions referenced
2219 (add_varpool_node_to_partition, add_references_to_partition): New
2221 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2222 add_varpool_node_to_partition; clear aux flags when done.
2223 (lto_promote_cross_file_statics): Do not promote stuff that gets
2224 duplicated to each ltrans.
2226 2010-07-04 Jan Hubicka <jh@suse.cz>
2228 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2230 2010-06-13 Richard Guenther <rguenther@suse.de>
2232 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2234 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
2236 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2237 * lto-coff.c (coff_write_object_file): Add braces to if.
2239 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2241 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2242 (lto_file_read): Likewise.
2243 (new_partition): Likewise.
2244 (read_cgraph_and_symbols): Likewise.
2246 2010-06-07 Joseph Myers <joseph@codesourcery.com>
2248 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2249 (lto_handle_option): Don't set flag_signed_char here.
2251 2010-06-04 Richard Guenther <rguenther@suse.de>
2254 * lto.c (lto_1_to_1_map): Use the proper file_data for
2257 2010-05-30 Jan Hubicka <jh@suse.cz>
2259 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2260 partitioning decisions.
2262 2010-05-29 Jan Hubicka <jh@suse.cz>
2264 * lto.c (bitmap vector): Remove.
2265 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2266 (ltrans_partition_def): New structure.
2267 (ltrans_partition): New type and VECtor.
2268 (new_partition): New function.
2269 (add_cgraph_node_to_partition): New function.
2270 (lto_1_to_1_map): Reorganize for partitions.
2271 (lto_add_inline_clones): Remove.
2272 (lto_add_all_inlinees): Remove.
2273 (lto_promote_cross_file_statics): Use partitions.
2274 (cmp_partitions): New function.
2275 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2276 use partitions; output files sorted by size.
2278 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2280 * Make-lang.in: Replace vec.h dependency with VEC_H.
2282 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2284 * lto-coff.c (coff_errmsg): Remove.
2285 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2286 errors instead of coff_errmsg (-1).
2287 * lto-macho.c (mach_o_errmsg): Remove.
2288 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2289 instead of mach_o_errmsg (-1).
2290 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2293 2010-05-28 Richard Guenther <rguenther@suse.de>
2295 * lto.c (prefix_name_with_star): Removed.
2296 (strip_extension): Likewise.
2297 (get_filename_for_set): Likewise.
2298 (lto_write_ltrans_list): Fold into ...
2299 (lto_wpa_write_files): ... this. Name LTRANS units
2300 by suffixing the ltrans output list filename.
2301 (do_whole_program_analysis): Adjust.
2303 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2305 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2306 (read_cgraph_and_symbols, lto_main): Use seen_error.
2307 * Make-lang.in (lto/lto.o): Update dependencies.
2309 2010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2312 * lto.h (lto_eh_personality): New prototype.
2313 * lto.c: Include debug.h.
2314 (first_personality_decl): New static variable.
2315 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2316 first function for which it is non-null.
2317 (lto_eh_personality_decl): New static variable.
2318 (lto_eh_personality): New function.
2319 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2320 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2322 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2324 * lto-lang.c: Do not include expr.h.
2326 2010-05-24 Richard Guenther <rguenther@suse.de>
2328 * lto-elf.c (lto_obj_build_section_table): Work around
2329 FreeBSD libelf issue.
2331 2010-05-22 Richard Guenther <rguenther@suse.de>
2333 * lto.c (read_cgraph_and_symbols): Do not collect.
2335 2010-05-20 Jan Hubicka <jh@suse.cz>
2337 * lto.c (promote_var, promote_fn): New functions.
2338 (lto_promote_cross_file_statics): Compute correctly boundary including
2339 static initializers of readonly vars.
2341 2010-05-18 Jan Hubicka <jh@suse.cz>
2343 * lto.c (lto_1_to_1_map): Partition non-inline clones.
2344 (lto_promote_cross_file_statics): Deal with non-inline clones.
2346 2010-05-18 Jan Hubicka <jh@suse.cz>
2348 * lto.c (lto_materialize_function): Announce function when
2349 reading body; allocate_struct_function only when reading body;
2350 do not finalize local statics; ggc_collect after reading;
2351 do not mark reachable node.
2352 (materialize_cgraph): Do not announce function.
2354 2010-05-11 Jan Hubicka <jh@suse.cz>
2356 * lto.c (materialize_cgraph): Revert my previous patch.
2358 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
2360 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2361 IMAGE_FILE_MACHINE_AMD64.
2362 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2364 2010-05-11 Jan Hubicka <jh@suse.cz>
2366 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2367 (materialize_cgraph): Add it here.
2369 2010-05-11 Jan Hubicka <jh@suse.cz>
2371 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2374 2010-05-11 Jan Hubicka <jh@suse.cz>
2376 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2377 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2378 use reachable_from_other_partition_p and
2379 referenced_from_other_partition_p test.
2381 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
2383 * lto-coff.c (validate_file): Add x64-coff support.
2384 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2385 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2386 * lto-lang.c (lto_build_c_type_nodes): Add check for
2387 'long long unsigned int' for x64-windows.
2388 (lto_init): Likewise.
2391 2010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2393 * lto.h (struct lto_file_struct): Document offset member.
2394 * lto-endian.h: New file.
2395 * lto-macho.h: New file.
2396 * lto-macho.c: New file.
2397 * Make-lang.in: Add rule for lto-macho.o.
2399 2010-05-07 Richard Guenther <rguenther@suse.de>
2403 * lang.opt (fresolution): Change to ...
2404 (fresolution=): ... this.
2405 * lto-lang.c (lto_handle_option): Adjust.
2407 2010-05-07 Richard Guenther <rguenther@suse.de>
2409 * lto.c (DUMPBASE_SUFFIX): Remove.
2410 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2412 (lto_write_ltrans_list): ... only output the list of ltrans files.
2413 (lto_maybe_unlink): Remove.
2414 (do_whole_program_analysis): Do not execute LTRANS phase
2417 2010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2419 * lto-lang.c (lto_handle_option): Add argument kind.
2421 2010-05-05 Jan Hubicka <jh@suse.cz>
2423 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2426 2010-05-05 Jan Hubicka <jh@suse.cz>
2428 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2430 2010-04-30 Jan Hubicka <jh@suse.cz>
2432 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2434 (lto_wpa_write_files): Write any non-empty partition.
2436 2010-04-30 Jan Hubicka <jh@suse.cz>
2438 * lto.c: Do not attempt to make constant pool references global.
2440 2010-04-28 Jan Hubicka <jh@suse.cz>
2442 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2443 (lto_wpa_write_files): Announce what we are writting.
2444 (all_file_decl_data): New.
2445 (read_cgraph_and_symbols): Use GGC; correct timevars.
2446 (do_whole_program_analysis): Collect.
2447 * lto/Make-lang.in (lto.o): Fix dependency.
2448 * Makefile.in (GTFILES): Add lto-streamer.h.
2449 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2450 (varpool_assemble_pending_decls): Use VAROUT.
2451 * lto-streamer.h (lto_tree_ref_table): Annotate.
2452 (lto_in_decl_state): Annotate.
2453 (lto_file_decl_data): Annotate.
2455 2010-04-28 Jan Hubicka <jh@suse.cz>
2457 * lto.c (lto_varpool_node_sets): New.
2458 (lto_1_to_1_map): Partition varpool too.
2459 (globalize_context_t, globalize_cross_file_statics,
2460 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2461 lto_scan_statics_in_remaining_global_vars): Remove.
2462 (lto_promote_cross_file_statics): Rewrite.
2463 (get_filename_for_set): Take vset argument.
2464 (lto_wpa_write_files): Pass around vsets.
2466 2010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2469 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2470 hardcoding 'lto-elf.o'.
2471 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2473 * lto-coff.h: New file.
2474 * lto-coff.c: Likewise.
2476 2010-04-26 Richard Guenther <rguenther@suse.de>
2478 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2480 2010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2482 * lto.h (lto_elf_file_open): Rename prototype from this ...
2483 (lto_obj_file_open): ... to this.
2484 (lto_elf_file_close): Likewise ...
2485 (lto_obj_file_close): ... and likewise.
2486 (lto_elf_build_section_table): Likewise ...
2487 (lto_obj_build_section_table): ... and likewise.
2488 (lto_elf_begin_section): Likewise ...
2489 (lto_obj_begin_section): ... and likewise.
2490 (lto_elf_append_data): Likewise ...
2491 (lto_obj_append_data): ... and likewise.
2492 (lto_elf_end_section): Likewise ...
2493 (lto_obj_end_section): ... and likewise.
2494 * lto.c (lto_file_read): Update references to the above.
2495 (lto_wpa_write_files): Likewise.
2496 (lto_read_all_file_options): Likewise.
2497 (read_cgraph_and_symbols): Likewise.
2498 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2499 (LANG_HOOKS_APPEND_DATA): Likewise.
2500 (LANG_HOOKS_END_SECTION): Likewise.
2501 * lto-elf.c (lto_elf_file_open): Rename from this ...
2502 (lto_obj_file_open): ... to this, updating any references.
2503 (lto_elf_file_close): Likewise ...
2504 (lto_obj_file_close): ... and likewise.
2505 (lto_elf_build_section_table): Likewise ...
2506 (lto_obj_build_section_table): ... and likewise.
2507 (lto_elf_begin_section): Likewise ...
2508 (lto_obj_begin_section): ... and likewise.
2509 (lto_elf_append_data): Likewise ...
2510 (lto_obj_append_data): ... and likewise.
2511 (lto_elf_end_section): Likewise ...
2512 (lto_obj_end_section): ... and likewise.
2514 2010-04-21 Jan Hubicka <jh@suse.cz>
2516 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2517 (materialize_cgraph): Likewise.
2519 2010-04-21 Jan Hubicka <jh@suse.cz>
2521 * lto.c (lto_wpa_write_files): Update.
2522 (read_cgraph_and_symbols): Be more verbose.
2523 (materialize_cgraph): Likewise.
2524 (do_whole_program_analysis): Likewise.
2526 2010-04-21 Jan Hubicka <jh@suse.cz>
2528 * lto.c (globalize_cross_file_statics): When function has address taken,
2529 it needs to be public.
2531 2010-04-20 Jan Hubicka <jh@suse.cz>
2533 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2534 (lto_add_all_inlinees): Likewise.
2535 (lto_wpa_write_files): Likewise.
2537 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2539 * lto-lang.c (lto_init): Remove second argument in call to
2540 build_common_tree_nodes.
2542 2010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2544 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2547 2010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2550 * lto-elf.c: Define EM_* constants if not already defined.
2552 2010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2554 * lto-elf.c (is_compatible_architecture): New static function.
2555 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2557 2010-02-11 Richard Guenther <rguenther@suse.de>
2560 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2563 2010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2565 * lto.c (O_BINARY): Define.
2566 (lto_read_section_data): Open file in binary mode.
2567 * lto-elf.c (O_BINARY): Define.
2568 (lto_elf_file_open): Open file in binary mode.
2570 2010-01-08 Richard Guenther <rguenther@suse.de>
2573 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2574 (lto_init): Do not init char_type_node in a standard way
2575 but according to flag_signed_char.
2577 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2580 * lto.c (DUMPBASE_SUFFIX): New.
2581 (lto_execute_ltrans): Append a sequence number to -dumpbase
2584 2010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2587 * lto-elf.c (lto_elf_file_open): Stop if the command line
2588 option file is missing.
2590 2009-12-15 Richard Guenther <rguenther@suse.de>
2592 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2593 (lto_post_options): Do not disable debuginfo.
2595 2009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2597 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2599 2009-12-11 Richard Guenther <rguenther@suse.de>
2602 * lto.c (lto_resolution_read): Properly grow the vector.
2604 2009-12-11 Richard Guenther <rguenther@suse.de>
2607 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2608 to the C99 default. Do not set flag_unit_at_a_time.
2610 2009-11-28 Jakub Jelinek <jakub@redhat.com>
2612 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2615 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
2618 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2619 * lto.c (lto_parse_hex): New.
2620 (lto_resolution_read): Use lto_parse_hex.
2621 * lto.h (lto_parse_hex): New.
2623 2009-11-17 Rafael Avila de Espindola <espindola@google.com>
2625 * lto-elf.c (lto_file_init): Add offset argument.
2626 (lto_elf_file_open): Record the offset.
2627 * lto.c (lto_resolution_read): Change file_name into a lto_file
2628 argument. Check offsets.
2629 (lto_file_read): Update call to lto_resolution_read.
2630 * lto.h (lto_file_struct): Add the offset field.
2632 2009-11-16 Rafael Avila de Espindola <espindola@google.com>
2634 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2636 2009-11-14 Jan Hubicka <jh@suse.cz>
2638 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2640 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
2642 * lang.opt (fresolution): Renamed from resolution.
2643 * lto-lang.c (lto_handle_option): Handle new option name.
2644 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2646 2009-11-04 Richard Guenther <rguenther@suse.de>
2647 Rafael Avila de Espindola <espindola@google.com>
2649 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2650 (lto_elf_file_open): Handle offsets in arguments name@offest.
2652 2009-10-30 Richard Guenther <rguenther@suse.de>
2655 * lto.c (lto_file_read): Do not set file_data->fd.
2656 (lto_read_section_data): Use a single-entry file-descriptor cache.
2657 Do not check the result of xmalloc.
2658 (free_section_data): Do not use file_data->fd.
2659 (lto_read_all_file_options): Likewise.
2661 2009-10-22 Richard Guenther <rguenther@suse.de>
2663 * lto.c (lto_fixup_jump_functions): Remove.
2664 (lto_fixup_decls): Do not fixup jump functions.
2665 (read_cgraph_and_symbols): Schedule cgraph merging after
2666 summary reading. Schedule type and decl fixup before
2669 2009-10-22 Richard Guenther <rguenther@suse.de>
2671 * lto.c (lto_fixup_data_t): Remove free_list member.
2672 (lto_fixup_tree): Do not insert into free_list.
2673 (free_decl): Remove.
2674 (lto_fixup_decls): Remove free-list handling.
2676 2009-10-22 Jan Hubicka <jh@suse.cz>
2678 * lto.c (lto_fixup_jump_functions): New function.
2679 (lto_fixup_decls): Use it.
2681 2009-10-16 Richard Guenther <rguenther@suse.de>
2684 * lto.c (lto_fixup_tree): Revert last change.
2686 2009-10-14 Richard Guenther <rguenther@suse.de>
2688 * lto.c (lto_fixup_tree): In case the prevailing decl is not
2689 compatible with the one we replace wrap it around a
2692 2009-10-09 Richard Guenther <rguenther@suse.de>
2696 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2698 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2699 (init_ehdr##BITS): Likewise.
2701 2009-10-08 Joseph Myers <joseph@codesourcery.com>
2703 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2704 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2706 * lto-lang.c (lto_post_options): Remove trailing "." from
2709 2009-10-08 Richard Guenther <rguenther@suse.de>
2711 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2714 2009-10-07 Joseph Myers <joseph@codesourcery.com>
2716 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2718 2009-10-07 Jan Hubicka <jh@suse.cz>
2720 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2721 ltrans stage; explain why this is needed and should not.
2723 2009-10-05 Richard Guenther <rguenther@suse.de>
2727 * lto.c (lto_read_decls): Do not register deferred decls.
2728 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2729 until after reading the IPA summaries.
2731 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
2733 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2734 (lto-lang.c): Don't include lto/common.h.
2736 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
2738 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2739 (lto/common.o): Remove.
2741 * common.h (lto_kind_str): Remove.
2742 (lto_visibility_str): Remove.
2743 (lto_resolution_str): Make it static.
2745 2009-10-01 Diego Novillo <dnovillo@google.com>
2747 * lto.c (lto_read_decls): Add comment.
2748 Call internal_error instead of gcc_assert.
2749 (lto_resolution_read): Likewise.
2750 (lto_add_all_inlinees): Tidy.
2751 * Make-lang.in: Fix copyright boilerplate.
2753 (lto.install-pdf): New.
2754 * lto-tree.h: Fix copyright boilerplate.
2755 * lang-specs.h: Likewise.
2756 Remove ".lto" entry from compilers fragment.
2757 * lto-elf.c: Move inclusion of gelf.h after config.h.
2758 Tidy formatting everywhere.
2759 * lto.h: Fix copyright boilerplate.
2760 Tidy formatting everywhere.
2761 * common.c: Likewise.
2762 * config-lang.in: Likewise.
2763 * common.h: Likewise.
2764 * lto-lang.c: Likewise.
2766 2009-10-01 Richard Guenther <rguenther@suse.de>
2768 * lto.c (lto_read_section_data): Use plain lseek/read.
2770 2009-10-01 Richard Guenther <rguenther@suse.de>
2772 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2773 use sysconf to query the system page size.
2774 (lto_file_read): Implement fallback using stdio.
2775 (free_section_data): Likewise.
2777 2009-09-29 Diego Novillo <dnovillo@google.com>
2779 * lto-lang.c (lto_init): Really fix call to
2780 build_common_builtin_nodes.
2782 2009-09-29 Diego Novillo <dnovillo@google.com>
2784 * lto-lang.c (lto_init): Fix call to
2785 build_common_builtin_nodes.
2787 2009-09-29 Richard Guenther <rguenther@suse.de>
2790 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2792 (first_data_block): New static variable.
2793 (lto_elf_append_data): Align the first data block in each
2796 2009-09-28 Diego Novillo <dnovillo@google.com>
2798 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2799 * lto.c (strip_extension): New.
2800 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2801 (lto_execute_ltrans): Tidy.
2802 Do not pass -fwpa nor -fltrans-* to LTRANS.
2803 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2804 * tree.c (need_assembler_name_p): Call
2805 lang_hooks.decls.may_need_assembler_name_p if set.
2806 * varasm.c (default_binds_local_p_1): Remove check for
2808 * varpool.c (decide_is_variable_needed): Do not test for
2811 2009-09-22 Richard Guenther <rguenther@suse.de>
2814 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2815 * Make-lang.in: Remove ltrans-driver stuff.
2816 * config-lang.in: Likewise.
2817 * lang.opt (fltrans-driver): Remove.
2818 * lto-lang.c (lto_init_options): Remove code initializing
2820 * ltrans-driver: Remove.
2822 2009-09-21 Diego Novillo <dnovillo@google.com>
2824 * lto-lang.c (lto_define_builtins): Remove superfluous
2825 calls to targetm.init_builtins and build_common_builtin_nodes.
2826 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2827 build_common_builtin_nodes.
2828 * lto.c (lto_materialize_function): Do nothing if NODE is a
2831 2009-09-03 Diego Novillo <dnovillo@google.com>
2833 * lto-elf.c (validate_file): Replace call to
2834 elf_getshstrndx with call to elf_getshdrstrndx.
2836 2009-08-19 Richard Guenther <rguenther@suse.de>
2838 * lto-lang.c (lto_init): Merge char_type_node with the
2839 appropriately signed variant.
2841 2009-08-19 Richard Guenther <rguenther@suse.de>
2844 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
2845 (lto_fixup_type): Re-build the pointer-to chain part two.
2847 2009-08-19 Richard Guenther <rguenther@suse.de>
2850 * lto.c (lto_fixup_type): Re-build the type variant chain.
2852 2009-08-19 Richard Guenther <rguenther@suse.de>
2855 * lto.c (lto_fixup_constructor): New function.
2856 (lto_fixup_tree): Replace all types. Properly fixup
2857 constructors and constants.
2859 2009-08-14 Richard Guenther <rguenther@suse.de>
2861 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
2862 for DECL_LANG_SPECIFIC.
2864 2009-08-13 Richard Guenther <rguenther@suse.de>
2867 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
2869 2009-07-30 Richard Guenther <rguenther@suse.de>
2872 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
2873 the largest decl for output and free TREE_CHAIN for further
2876 2009-07-24 Diego Novillo <dnovillo@google.com>
2878 * Make-lang.in: Add empty lto.install-plugin target.
2880 2009-07-13 Diego Novillo <dnovillo@google.com>
2882 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
2884 2009-07-11 Richard Guenther <rguenther@suse.de>
2886 * lto-lang.c (lto_write_globals): Wrapup global decls.
2888 2009-07-10 Richard Guenther <rguenther@suse.de>
2890 * lto-lang.c (lto_init): Allocate one more location to make
2891 BUILTINS_LOCATION correct.
2893 2009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2895 * lto.c (free_section_data): Cast computed_offset to caddr_t.
2897 2009-07-06 Diego Novillo <dnovillo@google.com>
2899 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
2902 2009-07-06 Diego Novillo <dnovillo@google.com>
2904 * lto.c (preload_common_nodes): Remove.
2905 (lto_read_in_decl_state): Call lto_streamer_cache_get.
2906 (lto_read_decls): Call lto_data_in_create and
2908 (free_decl): Do not call ggc_free.
2909 (lto_main): Call lto_init_reader.
2910 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
2911 (lto_init): Initialize main_identifier_node if needed.
2912 Make ptrdiff_type_node be integer_type_node.
2914 2009-06-19 Diego Novillo <dnovillo@google.com>
2916 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
2917 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
2918 Remove code guarded by #ifdef LOCAL_TRACE.
2920 2009-06-18 Diego Novillo <dnovillo@google.com>
2922 * lto.c: Update license to GPLv3.
2923 * lto-elf.c: Likewise.
2924 * common.c: Likewise.
2925 * lto-lang.c: Likewise.
2926 * lto.h: Remove superfluous include files. Update all
2929 2009-06-17 Diego Novillo <dnovillo@google.com>
2931 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
2933 2009-06-02 Diego Novillo <dnovillo@google.com>
2935 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
2937 (materialize_cgraph): Only materialize nodes that have a
2938 representation on file.
2940 2009-06-01 Diego Novillo <dnovillo@google.com>
2942 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
2944 2009-05-31 Diego Novillo <dnovillo@google.com>
2946 * lto-lang.c (lto_type_for_mode): Handle all the modes
2947 handled in c_common_type_for_mode.
2949 2009-05-21 Diego Novillo <dnovillo@google.com>
2951 * lto-elf.c: Always include <gelf.h>.
2952 * config-lang.in (target_libs): Remove.
2953 (build_by_default): Set to no.
2955 2009-05-15 Diego Novillo <dnovillo@google.com>
2957 * lto.c (lto_materialize_function): Assert that DECL is
2959 (materialize_cgraph): Don't try to materialize builtin
2961 * lto-section-out.c (write_symbol_vec): Do not write
2964 2009-05-13 Diego Novillo <dnovillo@google.com>
2966 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
2968 2009-05-07 Diego Novillo <dnovillo@google.com>
2970 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
2971 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
2972 (lto_fixup_type): Call it for TYPE_POINTER_TO,
2973 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
2974 (lto_fixup_tree): Call gimple_register_type when *TP is a
2976 (lto_main): Call bitmap_obstack_initialize.
2978 2009-04-22 Diego Novillo <dnovillo@google.com>
2980 * lto.c (free_section_data): Tidy.
2981 (lto_1_to_1_map): Tidy.
2982 (lto_add_all_inlinees): Tidy.
2983 (prefix_name_with_star): New.
2984 (get_filename_for_set): New.
2985 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
2986 to determine what cgraph node sets to write.
2987 Call get_filename_for_set to compute temporary file
2989 (lto_execute_ltrans): Do not execute LTRANS on files with
2990 names that start with '*'.
2991 Move logic to execute LTRANS together so that LTRANS is
2992 invoked only if there are any files to compile.
2993 (do_whole_program_analysis): Only remove output files
2994 that do not start with '*'.
2996 2009-04-06 Diego Novillo <dnovillo@google.com>
2998 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
2999 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3000 (lto_add_all_inlinees): Tidy.
3002 2009-03-26 Diego Novillo <dnovillo@google.com>
3004 * lto.c: Include gimple.h.
3005 (lto_read_in_decl_state): Call gimple_register_type for
3006 every type in every stream.
3007 (lto_fixup_common): Call gimple_register_type if T has a
3009 (do_whole_program_analysis): Call print_lto_report.
3010 (lto_main): Call print_lto_report after cgraph_optimize.
3011 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3013 2009-03-24 Diego Novillo <dnovillo@google.com>
3015 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3016 (lto.o): Add dependency on GIMPLE_H.
3018 2009-03-10 Simon Baldwin <simonb@google.com>
3020 * lto.c (lto_read_all_file_options): Close any open file descriptor
3021 contained in file_data before freeing.
3023 2009-02-24 Rafael Avila de Espindola <espindola@google.com>
3025 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3026 for a decl in the original bitmap, not a node.
3027 (lto_add_all_inlinees): Remove original nodes that are not needed.
3028 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3030 2009-02-24 Diego Novillo <dnovillo@google.com>
3032 * lto.c (lto_materialize_function): Update
3033 lto_stats.num_function_bodies.
3034 (get_section_data): Initialize *LEN to 0.
3035 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3036 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3037 Update lto_stats.num_output_files.
3038 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3039 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3040 (lto_main): Initialize lto_stats.
3041 If flag_lto_report is set, call print_lto_report.
3043 2009-02-19 Diego Novillo <dnovillo@google.com>
3047 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3049 * lto.c (lto_add_inline_clones): Don't add the
3050 master clone. Check for a decl in the original
3052 (lto_add_all_inlinees): Remove original nodes
3053 that are not needed.
3054 (lto_scan_statics_in_cgraph_node): Don't care if
3055 the node is the master.
3056 (lto_promote_cross_file_statics): Use a new
3057 context.seen_node_decls for each set
3059 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3061 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3062 for a decl in the original bitmap, not a node.
3063 (lto_add_all_inlinees): Remove original nodes that are not needed.
3064 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3065 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3068 2009-02-18 Diego Novillo <dnovillo@google.com>
3070 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3071 and TV_WHOPR_WPA_IO.
3072 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3073 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3074 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3075 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3076 depending on command line flags.
3077 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3078 (lto_main): Remove timer uses.
3080 2009-02-18 Rafael Avila de Espindola <espindola@google.com>
3082 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3083 (lto_wpa_write_files): Update calls to renamed functions.
3085 2009-02-17 Diego Novillo <dnovillo@google.com>
3088 * lto-lang.c (lto_post_options): Disable -fwhole-program
3089 when running LTRANS.
3091 2009-02-10 Diego Novillo <dnovillo@google.com>
3093 * lto.c (read_cgraph_and_symbols): Fix comment.
3095 2009-02-10 Diego Novillo <dnovillo@google.com>
3097 * lto.c (read_cgraph_and_symbols): Read options from all
3100 2009-02-10 Diego Novillo <dnovillo@google.com>
3102 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3103 (materialize_cgraph): Likewise.
3104 (do_whole_program_analysis): Likewise.
3105 (lto_main): Call read_cgraph_and_symbols,
3106 materialize_cgraph and do_whole_program_analysis.
3108 2009-02-10 Simon Baldwin <simonb@google.com>
3110 * lto.c: Include lto-opts.h.
3111 * (lto_main): Clear file options at loop start, read any saved
3112 options from the first file handled, and re-issue options.
3113 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3115 2009-02-02 Diego Novillo <dnovillo@google.com>
3117 * lto.c (lto_main): Stop LTO_TIMER and use
3118 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3120 2009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3123 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3126 2009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3128 * Make-lang.in (LTO_EXE): Link with all
3129 BACKENDLIBS and not only GMPLIBS
3131 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3134 * lto-elf.c: Include gelf.h instead of libelf.h.
3135 (lto_elf_file_close): Replace elfx_update_shstrndx with
3136 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3139 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3142 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3144 2009-01-26 Diego Novillo <dnovillo@google.com>
3146 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3148 2009-01-26 Diego Novillo <dnovillo@google.com>
3150 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3151 and rename into gimple_types_compatible_p.
3153 2009-01-12 Rafael Avila de Espindola <espindola@google.com>
3155 * lto-lang.c (lang_hooks): Remove the const qualifier.
3157 2009-01-06 Diego Novillo <dnovillo@google.com>
3159 * ltrans-driver: Mark 'all' target as phony.
3161 2008-12-31 Diego Novillo <dnovillo@google.com>
3163 * ltrans-driver: Execute a NOP action for target 'all'.
3165 2008-12-19 Diego Novillo <dnovillo@google.com>
3167 * lto.c (lto_1_to_1_map): Tidy.
3169 2008-12-19 Diego Novillo <dnovillo@google.com>
3171 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3172 be opened, show its name.
3173 * ltrans-driver: If $verbose is set, do not use parallelism.
3175 2008-12-17 Rafael Avila de Espindola <espindola@google.com>
3177 * lto.c (lto_fixup_function): New.
3178 (lto_fixup_tree): Call lto_fixup_function.
3180 2008-12-14 Doug Kwan <dougkwan@google.com>
3182 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3183 variables if there is no function.
3185 2008-12-10 Simon Baldwin <simonb@google.com>
3187 * ltrans-driver: Always run make in silent mode, to avoid make's
3188 trace on stdout interfering with lto-wrapper output.
3190 2008-12-10 Doug Kwan <dougkwan@google.com>
3192 * lto.c (lto_add_inline_clones): Do not force master clones of
3193 inlined functions already in SET to be static inline.
3195 2008-12-04 Doug Kwan <dougkwan@google.com>
3197 * lto.c (globalize_context_t): New type to store states in
3198 globalization of cross-file statics.
3199 (globalize_cross_file_statics): New.
3200 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3201 static decls that need to be fixed up.
3202 (lto_scan_statics_in_cgraph_node): Change call interface to use
3203 a globalize_context_t CONTEXT for all states used.
3204 (lto_scan_statics_in_remaining_global_vars): New.
3205 (lto_promote_cross_file_statics): Use new call interface of
3206 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3207 visible vars in the last set.
3209 2008-12-03 Diego Novillo <dnovillo@google.com>
3211 * lto.c (lto_fixup_tree): Do not emit an error when
3212 PREVAILING throw but T doesn't.
3214 2008-12-02 Doug Kwan <dougkwan@google.com>
3216 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3218 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3219 variables and functions.
3220 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3221 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3223 2008-11-29 Diego Novillo <dnovillo@google.com>
3225 * lto.c: Include timevar.h.
3226 (lto_materialize_function): Tidy. Add comments.
3227 (lto_wpa_write_files): Tidy.
3228 (lto_execute_ltrans): Tidy.
3229 (lto_main): Add local variable LTO_TIMER. Initialize it
3230 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3231 Start and stop the timer.
3233 * Make-lang.in (lto.o): Add dependency on timevar.h.
3234 * ltrans-driver: React to -v and -save-temps.
3235 Use simple heuristic to determine how much parallelism to
3236 use when executing make.
3238 2008-11-12 Doug Kwan <dougkwan@google.com>
3240 * lto.c (lto_bitmap_obstack): Remove var.
3241 (lto_materialize_function): Do nothing instead of marking function
3242 body in file if flag_wpa is true.
3243 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3244 (lto_scan_statics_in_cgraph_node): New function.
3245 (lto_promote_cross_file_statics): Same.
3246 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3247 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3248 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3250 2008-11-09 Diego Novillo <dnovillo@google.com>
3252 * lto/lto.c (lto_fixup_tree): Change error message locus
3253 information to include location of mismatching
3255 Use TREE_NO_WARNING to avoid repeated messages.
3256 (lto_main): If lto_fixup_decls emitted any errors, exit.
3257 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3258 (lto_init_options): Don't enable exceptions by default.
3259 (lto_eh_runtime_type): Move to lto-function-in.c
3260 (lto_init_eh): Likewise.
3261 (lto_init): Don't call lto_init_eh.
3262 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3263 libfuncs.h and except.h.
3265 2008-10-30 Diego Novillo <dnovillo@google.com>
3267 * lto.c (lto_read_decls): Declare debug_main only if
3268 LTO_STREAM_DEBUGGING is enabled.
3270 2008-10-30 Simon Baldwin <simonb@google.com>
3272 * lto.c (lto_wpa_write_files): Create intermediate files with
3273 make_cwd_temp_file().
3274 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3275 WPA_SAVE_LTRANS is set.
3276 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3277 * ltrans-driver: Do not strip directory from output files.
3279 2008-10-29 Doug Kwan <dougkwan@google.com>
3281 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3283 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3284 (lto/lto-symtab.o): Remove rule.
3285 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3286 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3287 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3289 lto-symtab.c (File): Move up one level.
3290 lto-lang.c (cgraph.h): Remove include.
3291 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3292 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3293 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3295 2008-10-24 Rafael Espindola <espindola@google.com>
3297 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3298 non prevailing weak symbols.
3300 2008-10-24 Rafael Espindola <espindola@google.com>
3302 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3304 2008-10-24 Rafael Espindola <espindola@google.com>
3306 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3309 2008-10-23 Simon Baldwin <simonb@google.com>
3311 * lto-lang.c (input_node): Save the node reference, rather than the
3312 node pointer, in node->inlined_to.
3313 (input_cgraph_1): Convert node references into node pointers.
3315 2008-10-22 Diego Novillo <dnovillo@google.com>
3316 Rafael Espindola <espindola@google.com>
3318 * lto.c (lto_resolution_read): Tidy.
3319 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3320 abort if RET is NULL.
3322 2008-10-22 Doug Kwan <dougkwan@google.com>
3324 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3325 exceptions flag is given.
3326 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3327 (lto_init_eh): Remove exceptions flag initialization.
3328 (lto_init): Only call lto_init_eh if exceptions flag is set.
3330 2008-10-21 Diego Novillo <dnovillo@google.com>
3332 * lto.c: Tidy some formatting.
3335 2008-10-21 Simon Baldwin <simonb@google.com>
3337 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3338 them is NULL (but not the other).
3340 2008-10-17 Diego Novillo <dnovillo@google.com>
3342 * ltrans-driver: Divert output from make to a temporary file.
3343 Show it if the call to make failed.
3345 2008-10-15 Diego Novillo <dnovillo@google.com>
3347 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3348 Do not print TEMP_FILENAME
3349 * ltrans-driver: Call make with -s.
3351 2008-10-15 Diego Novillo <dnovillo@google.com>
3353 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3354 TREE_STATIC on global symbols.
3356 2008-10-14 Ollie Wild <aaw@google.com>
3358 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3359 (LTRANS_DRIVER_EXE): Add.
3360 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3361 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3362 (lto.install.common): Remove ltrans-driver.
3363 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3364 (LTRANS_DRIVER_EXE): New build rule.
3365 * config-lang.in (compilers): Add ltrans-driver.
3367 2008-10-14 Diego Novillo <dnovillo@google.com>
3369 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3372 2008-10-13 Ollie Wild <aaw@google.com>
3374 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3375 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3376 * ltrans-driver (LTRANS_FLAGS): Remove.
3378 2008-10-08 Doug Kwan <dougkwan@google.com>
3380 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3381 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3382 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3383 from lto_fixup_state to here.
3384 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3385 just a free-list. Fix up types also. Move decl merging code to
3387 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3389 (lto_fixup_decls): Use another pointer set to avoid multiple
3390 walking of nodes except for DECLs to be replaced. Pass an
3391 lto_fixup_data_t object to tree-walker.
3393 2008-10-08 Rafael Espindola <espindola@google.com>
3395 * lto-symtab.c (lto_symtab_set_resolution): New.
3396 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3397 lto_symtab_get_resolution.
3398 (lto_symtab_prevailing_decl): Return decl for non public decls.
3399 (lto_symtab_get_resolution): New.
3400 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3402 2008-10-06 Rafael Espindola <espindola@google.com>
3404 * lto-lang.c: Include cgraph.h.
3405 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3406 input_cgraph): Moved from lto-cgraph.c.
3407 (LANG_HOOKS_INPUT_CGRAPH): New.
3409 2008-10-03 Rafael Espindola <espindola@google.com>
3411 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3413 2008-10-03 Rafael Espindola <espindola@google.com>
3415 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3416 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3417 prevailing definition. Don't mark TREE_NOTHROW differences.
3418 * lto.c (lto_fixup_tree): New.
3419 (lto_fixup_state): New.
3420 (lto_fixup_state_aux): New.
3422 (lto_fixup_decls): New.
3423 (lto_main): Call lto_fixup_decls.
3425 2008-10-02 Ollie Wild <aaw@google.com>
3427 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3429 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3430 * lto-lang.c (lto_post_options): Add validation and fixups for
3433 2008-10-02 Rafael Espindola <espindola@google.com>
3435 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3436 lto_symtab_merge_decl): Return void.
3437 (lto_symtab_prevailing_decl): New.
3439 2008-09-30 Rafael Espindola <espindola@google.com>
3441 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3443 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3444 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3445 Check for already defined symbols.
3446 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3447 (LTO_IDENTIFIER_RESOLUTION): Remove.
3448 (LTO_DECL_RESOLUTION): New.
3450 2008-09-30 Rafael Espindola <espindola@google.com>
3452 * lto.c (lto_read_decls): Use new input_tree signature.
3454 2008-09-26 Doug Kwan <dougkwan@google.com>
3456 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3457 bodies affected by exception attribute merging of DECLs.
3458 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3461 2008-09-25 Rafael Espindola <espindola@google.com>
3463 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3464 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3465 * lto-symtab.c (lto_symtab_compatible): New.
3466 (lto_symtab_overwrite_decl): New.
3467 (lto_symtab_merge_decl): Refactor to use the above functions
3468 and the resolution from lang_identifier.
3469 * lto-tree.h: Include plugin-api.h.
3470 (lang_identifier): Add resolution.
3471 (LTO_IDENTIFIER_RESOLUTION): New.
3473 2008-09-25 Ollie Wild <aaw@google.com>
3475 * lang.opt (fltrans-output-list=): New option.
3476 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3478 2008-09-25 Rafael Espindola <espindola@google.com>
3480 * lto.c (lto_resolution_read): Initialize ret;
3482 2008-09-24 Ollie Wild <aaw@google.com>
3484 * lto.c (sys/mman.h): Move include.
3485 (lto_wpa_write_files): Return a list of written files.
3486 (lto_execute_ltrans): New function.
3487 (lto_main): Call lto_execute_ltrans.
3488 (ltrans-driver): New file.
3489 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3490 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3491 (lto_init_options): Initialize ltrans_driver.
3492 (lto_handle_option): Fix incorrect default output value.
3493 * lang.opt (fltrans-driver=): New option.
3494 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3495 (lto.install-common): Add lto/ltrans-driver.
3497 2008-09-24 Rafael Espindola <espindola@google.com>
3499 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3500 (lto/lto.o): Depend on lto/common.h.
3501 (lto/common.o): New.
3502 * lang.opt (resolution): New.
3503 * lto-lang.c (resolution_file_name): New.
3504 (lto_handle_option): Handle OPT_resolution.
3505 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3506 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3507 pass it to lto_symtab_merge_decl.
3508 * lto.c: Include common.h.
3509 (lto_read_decls): Add resolutions and resolutions_size arguments.
3510 Initialize data_in.globals_resolution and
3511 data_in.globals_resolution_size.
3512 (index_and_symbol_resolution): New.
3513 (lto_resolution_read): New.
3514 (lto_file_read): Add argument resolution_file.
3516 * lto.h (resolution_file_name): New.
3518 2008-09-23 Rafael Espindola <espindola@google.com>
3520 * common.c: Update description.
3521 * common.h: Update description.
3523 2008-09-23 Rafael Espindola <espindola@google.com>
3525 * common.c: Moved from lto-plugin.
3526 * common.h: Moved from lto-plugin.
3528 2008-09-22 Doug Kwan <dougkwan@google.com>
3530 * lto.c (VEC(bitmap,heap)): Declare.
3531 (lto_materialize_function): Handle WAP mode specially.
3532 (lto_add_inline_clones): New.
3533 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3534 return a bitmap of inlined decls.
3535 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3536 (lto_main): Call reset_inline_failed to reset inlining states.
3537 Check call-graph after WPA inlining.
3538 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3541 2008-09-19 Doug Kwan <dougkwan@google.com>
3543 lto.c (lto_main): Remove unsued wrapper code.
3544 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3546 2008-09-19 Rafael Espindola <espindola@google.com>
3548 * lto-symtab.c: Include lto-tree-in.h.
3549 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3550 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3551 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3553 2008-09-17 Paolo Bonzini <bonzini@gnu.org>
3554 Rafael Avila de Espindola <espindola@google.com>
3556 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3557 COMPOUND_LITERAL_EXPR_DECL): Remove.
3558 (emit_local_var): Remove.
3559 (lto_expand_expr): Remove.
3560 (lto_staticp): Remove.
3561 (LANG_HOOKS_EXPAND_EXPR): Remove.
3562 (LANG_HOOKS_STATICP): Remove.
3564 2008-09-11 Diego Novillo <dnovillo@google.com>
3566 * lto-lang.c: Include except.h and libfuncs.h.
3568 (lto_init): Call it.
3569 Set flag_generate_lto to 0.
3570 * Make-lang.in (lto-lang.o): Add dependency on except.h
3573 2008-09-09 Bill Maddox <maddox@google.com>
3575 * lto-lang.c: Include header file expr.h.
3576 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3577 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3578 (emit_local_var): Copied from c-semantics.c.
3579 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3580 and c_staticp in c-common.c.
3581 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3583 2008-09-08 Diego Novillo <dnovillo@google.com>
3585 * lto-lang.c (lto_global_bindings_p): Return 1 during
3588 2008-09-07 Diego Novillo <dnovillo@google.com>
3590 * lto.c: Tidy formatting.
3592 2008-08-04 Bill Maddox <maddox@google.com>
3594 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3596 2008-09-03 Doug Kwan <dougkwan@google.com>
3598 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3599 CIF_OK instead of NULL.
3601 2008-09-02 Diego Novillo <dnovillo@google.com>
3602 Simon Baldwin <simonb@google.com>
3604 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3605 c_common_type_for_size.
3606 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3607 (lto_init): Call linemap_add.
3608 (signed_and_unsigned_types): Remove.
3610 2008-08-29 Diego Novillo <dnovillo@google.com>
3612 * lto-lang.c (handle_noreturn_attribute): New local function.
3613 (handle_const_attribute): New local function.
3614 (handle_malloc_attribute): New local function.
3615 (handle_pure_attribute): New local function.
3616 (handle_novops_attribute): New local function.
3617 (handle_nonnull_attribute): New local function.
3618 (handle_nothrow_attribute): New local function.
3619 (handle_sentinel_attribute): New local function.
3620 (handle_type_generic_attribute): New local function.
3621 (handle_format_attribute): New local function.
3622 (handle_format_arg_attribute): New local function.
3623 (lto_attribute_table): Declare.
3624 (lto_format_attribute_table): Declare.
3625 (lto_init_attributes): New local function.
3626 (lto_define_builtins): Call it.
3627 Call targetm.init_builtins and build_common_builtin_nodes.
3628 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3629 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3631 2008-08-28 Diego Novillo <dnovillo@google.com>
3633 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3635 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3636 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3637 * lto-symtab.c: Include gimple.h.
3638 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3641 2008-08-27 Doug Kwan <dougkwan@google.com>
3643 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3644 gt-lto-lto.h): New includes.
3645 (lto_materialize_function): Do not read in function body in WPA mode.
3646 Format a line to fit in 80 columns.
3647 (lto_cgraph_node_sets): New garbage collected variable.
3648 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3650 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3651 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3652 variable LTO_SECTION_IN_H.
3653 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3654 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3655 with variable LTO_SECTION_IN_H.
3656 * config-lang.in (gtfiles): Add lto/lto.c.
3657 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3658 merged DECL_RESULT correctly.
3660 2008-08-26 Bill Maddox <maddox@google.com>
3662 * lto-lang.c Include tree-gimple.h.
3663 (lto_mark_addressable): Call mark_addressable rather than
3665 (lto_post_options): Suppress debug info generation.
3666 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3668 2008-08-25 Bill Maddox <maddox@google.com>
3670 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3671 assertion and leave an explanatory comment in its place.
3673 2008-08-21 Doug Kwan <dougkwan@google.com>
3675 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3676 of common nodes instead of computing locallly.
3677 (lto_read_in_decl_state): New.
3678 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3679 Read global and per-function in-decl states.
3680 * Make-lang.in (LTO_H): Update dependency.
3682 (lto-symtab.c): Merge (revision 139039)
3683 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3685 2008-08-21 Rafael Espindola <espindola@google.com>
3687 * config-lang.in (target_libs): New.
3689 2008-08-20 Bill Maddox <maddox@google.com>
3691 * lto.c (current_lto_file): Remove GTY marker from static
3692 variable. Remove include of file gt-lto-lto.h.
3693 * Make-lang.in: Remove dependency of lto/lto.o on
3695 * lto-elf.c (lto_file_close): Removed.
3696 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3697 allocate lto_elf_file object.
3698 (lto_elf_file_close): Free lto_elf_file object after close.
3699 * lto.h (struct lto_file_struct): Remove GTY marker.
3700 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3703 2008-08-20 Bill Maddox <maddox@google.com>
3705 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3706 to conform to its new signature.
3707 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3708 on discarded node here, now called in global_vector_fixup.
3710 2008-08-09 Bill Maddox <maddox@google.com>
3712 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3713 has not been set to a front-end-specific value.
3715 2008-08-05 Doug Kwan <dougkwan@google.com>
3717 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3720 2008-07-30 Bill Maddox <maddox@google.com>
3722 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3723 Remove obsolete comments.
3724 (lto_read_decls): Remove initialization of deleted field data_in.global.
3726 (lto_main): Remove redundant initialization of section_hash_table.
3727 * lto-elf.c: Removed obsolete comments.
3728 * lto.h: Tidy up comments.
3729 * lto-symtab.c (lto_least_common_multiple): New function.
3730 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3733 2008-07-25 Diego Novillo <dnovillo@google.com>
3734 Bill Maddox <maddox@google.com>
3736 * lto.c: Re-order include files.
3737 Include lto-section-out.h.
3738 (preload_common_nodes): Add debugging output.
3739 Add new local INDEX_TABLE.
3740 Call preload_common_node.
3741 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3743 2008-07-13 Bill Maddox <maddox@google.com>
3745 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3746 unwanted scaling during pointer addition.
3748 2008-07-11 Bill Maddox <maddox@google.com>
3749 Diego Novillo <dnovillo@google.com>
3751 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3752 Make code const-correct.
3753 (lto_file_read): Fix C++ compatibility warnings.
3754 (lto_read_section_data): Fix C++ compatibility warnings.
3755 (lto_get_section_data): Use CONST_CAST to avoid warning when
3756 const pointer passed to free.
3757 * lto-elf.c (lto_elf_build_section_table): Fix C++
3758 compatibility warnings.
3759 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3760 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3761 (lto_get_current_out_file): Fix C++ compatibility warnings.
3763 2008-07-11 Diego Novillo <dnovillo@google.com>
3765 * Make-lang.in (lto-warn): Define.
3767 2008-07-03 Simon Baldwin <simonb@google.com>
3769 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3770 LTO_STREAM_DEBUGGING.
3772 2008-06-27 Ollie Wild <aaw@google.com>
3774 * lto-elf.c (lto-section-out.h): New include.
3775 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3777 (cached_file_attrs): New static variable.
3778 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3779 Use cached_file_attrs for checking bits.
3780 (lto_elf_build_section_table): Remove elf_file argument from
3781 lto_elf_get_shdr and lto_elf_free_shdr calls.
3782 (DEFINE_INIT_SHDR): New macro.
3783 (init_shdr32, init_shdr64): New functions defined via the
3784 DEFINE_INIT_SHDR macro.
3785 (lto_elf_begin_section_with_type): New function.
3786 (lto_elf_begin_section): New function.
3787 (lto_elf_append_data): New function.
3788 (lto_elf_end_section): New function.
3789 (DEFINE_VALIDATE_EHDR): New macro.
3790 (validate_ehdr32, validate_ehdr64): New functions defined via the
3791 DEFINE_VALIDATE_EHDR macro.
3792 (validate_file): New function.
3793 (DEFINE_INIT_EHDR): New macro.
3794 (init_ehdr32, init_ehdr64): New functions defined via the
3795 DEFINE_INIT_EHDR macro.
3796 (init_ehdr): New function.
3797 (lto_elf_file_open): Add support for writable files. Move some
3798 validation logic to validate_file.
3799 (lto_elf_file_close): Add support for writable files. Write file data
3800 and free data blocks.
3801 (current_out_file): New static variable.
3802 (lto_set_current_out_file): New function.
3803 (lto_get_current_out_file): New function.
3804 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3805 Add temporary initialization for testing ELF serialization.
3806 * lto.h (lto-section-out.h): New include.
3807 (struct lto_file_struct): Slight modification to comment.
3808 (lto_elf_file_open): Add writable parameter.
3809 (lto_elf_begin_section): New function declaration.
3810 (lto_elf_append_data): New function declaration.
3811 (lto_elf_end_section): New function declaration.
3812 (lto_set_current_out_file, lto_get_current_out_file): New function
3814 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3815 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3816 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3817 * Make-lang.in (LTO_H): Add lto-section-out.h.
3819 2008-06-12 Ollie Wild <aaw@google.com>
3821 * lto.h (struct lto_file_vtable_struct): Remove.
3822 (struct lto_file_struct): Remove vtable member.
3823 * lto-elf.c (lto_file_init): Remove vtable argument.
3824 (lto_elf_map_optional_lto_section): Remove.
3825 (lto_elf_unmap_section): Remove.
3826 (lto_elf_file_vtable): Remove.
3827 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3829 (lto_elf_find_section_data): Remove.
3831 2008-06-11 Ollie Wild <aaw@google.com>
3833 * lto.c (lto_file_read): Add const qualifier to data variable.
3835 2008-06-11 Diego Novillo <dnovillo@google.com>
3837 Merge from lto-streamber sub-branch.
3839 2008-06-04 Ollie Wild <aaw@google.com>
3841 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
3842 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
3844 2008-05-28 Bill Maddox <maddox@google.com>
3846 Replace the DWARF reader in the LTO front-end.
3848 * lto.c: Include lto-tree-in.h, lto-tags.h.
3849 (enum DWARF2_class, DW_cl_constant, struct
3850 DWARF2_form_data, struct lto_context,
3851 lto_fd_init, lto_info_fd_init,
3852 lto_abbrev_fd_init, lto_info_fd_close,
3853 lto_file_init, lto_file_close,
3854 lto_file_corrupt_error, lto_abi_mismatch_error,
3855 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
3856 lto_read_uleb128, lto_read_sleb128,
3857 lto_read_initial_length, lto_abbrev_read_attrs,
3858 lto_abbrev_read, lto_abbrev_read_lookup,
3859 lto_read_section_offset,
3860 lto_read_comp_unit_header, find_cu_for_offset,
3862 lto_resolve_reference,lto_read_form,
3863 attribute_value_as_int,
3864 make_signed_host_wide_int,
3865 attribute_value_as_constant, lto_cache_hash,
3866 lto_cache_eq, lto_cache_store_DIE,
3867 lto_cache_lookup_DIE, lto_find_integral_type,
3868 lto_find_integral_type_1,
3869 LTO_BEGIN_READ_ATTRS_UNCHECKED,
3870 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
3871 lto_unsupported_attr_error, lto_get_identifier,
3872 lto_read_referenced_type_DIE,
3873 lto_read_compile_unit_DIE,
3874 lto_read_array_type_DIE,
3875 lto_read_structure_union_class_type_DIE,
3876 lto_read_enumerator_DIE,
3877 lto_read_enumeration_type_DIE,
3878 lto_read_only_for_child_DIEs,
3879 lto_read_only_for_child_DIEs,
3880 lto_read_member_DIE, lto_read_abbrev,
3881 lto_read_variable_formal_parameter_constant_DIE,
3882 lto_get_body): Removed.
3883 (preload_common_nodes): New function.
3884 (lto_read_decls): Convert for new global streamer.
3885 (lto_materialze_file_data,
3886 lto_read_subroutine_type_subprogram_die,
3887 lto_read_unspecified_parameters_DIE,
3888 lto_read_typedef_DIE,
3889 lto_read_pointer_reference_type_DIE,
3890 lto_read_subrange_type_DIE,
3891 lto_read_base_type_DIE,
3892 lto_read_const_volatile_restrict_type_DIE,
3893 lto_read_namespace_DIE,
3894 lto_read_unspecified_type_DIE, lto_read_DIE,
3895 lto_read_child_DIEs, lto_collect_child_DIEs):
3897 (lto_info_read, lto_set_cu_context): Removed.
3898 (lto_file_read): Convert for new global streamer.
3899 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
3900 lto_resolve_var_ref, lto_resolve_fn_ref,
3901 lto_resolve_field_ref, lto_resolve_typedecl_ref,
3902 lto_resolve_namespacedecl_ref): Removed.
3903 (lto_file_init, lto_file_close): Moved to lto-elf.c.
3904 * lto-tree.h (lto_symtab_merge_var,
3905 lto_symtab_mergee_fun): Declare here.
3906 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
3907 (lto_elf_file_open): Removed code to read DWARF debug sections.
3908 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
3909 DWARF2_CompUnit, lto_die_ptr,
3910 lto_die_cache_entry, lto_fd, lto_info_fd,
3911 lto_abbrev_fd): Removed.
3912 (lto_file): Removed debug_info and debug_abbrev fields.
3914 (lto_file_init, lto_file_close,
3915 lto_resolve_type_ref, lto_resolve_var_ref,
3916 lto_resolve_fn_ref, lto_resolve_field_ref,
3917 lto_resolve_typedecl_ref,
3918 lto_resolve_namespacedecl_ref,
3919 lto_get_file_name): Removed declarations.
3920 (lto_symtab_merge_var, lto_symtab_merge_fn):
3921 Declarations moved to lto-tree.h.
3922 * lto-symtab.c (lto_compatible_attributes_p):
3923 Lobotomize this, as it barfs on "Hello, world!".
3924 * lto-section-out.c: Include lto-tree-out.h.
3925 (lto_hash_global_slot_node,
3926 lto_eq_global_slot_node, preload_common_nodes,
3927 write_global_stream, write_global_references):
3929 (produce_asm_for_decls): Convert for new global streamer.
3930 * lto-section-out.h (lto_hash_global_slot_node,
3931 lto_eq_global_slot_node): Declare.
3933 2008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
3934 Jan Hubicka <jh@suse.cz>
3936 * lto.c (sys/mman.h, tree-pass.h): New includes.
3937 (lto_materialize_constructors_and_inits,
3938 lto_materialize_function): Keeps length of section.
3939 (lto_materialize_cgraph): Removed.
3940 (lto_read_decls): Initialize fd field.
3941 (lto_file_read): Different return type and removed much code to
3943 (page_mask): New variable.
3944 (lto_read_section_data, get_section_data, free_section_data): New
3946 (lto_main): Now calls pass manager, sets the hooks so that the ipa
3947 passes can get the section data.
3949 2008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
3951 * lto.h (lto_read_decls): Made local.
3952 (lto_input_function_body, lto_input_constructors_and_inits,
3953 lto_input_cgraph): Declarations moved to lto-section-in.h.
3954 * lto-section-in.c: Moved to .. .
3955 * lto-cgraph-in.c: Ditto.
3956 * lto-section-in.h: Ditto.
3957 * lto-function-in.c: Ditto.
3958 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
3959 (lto_insert_block): Removed.
3960 (LANG_HOOKS_INSERT_BLOCK): Removed.
3961 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
3962 lto-section-in.o): Rules moved to lto/Makefile.in.
3965 2008-05-16 Ollie Wild <aaw@google.com>
3967 * lto-lang.c (tree-inline.h): Include.
3968 (lto_post_options): New function.
3969 (LANG_HOOKS_POST_OPTIONS): Define.
3970 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
3971 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
3973 2008-05-13 Diego Novillo <dnovillo@google.com>
3975 * lto-function-in.c (input_ssa_names): Call
3976 make_ssa_name_fn instead of make_ssa_name.
3978 2008-05-12 Diego Novillo <dnovillo@google.com>
3980 * lto-cgraph-in.c (overwrite_node): Update references to
3981 inline summary fields.
3982 * lto-function-in.c (input_expr_operand): Do not handle
3985 2008-05-09 Ollie Wild <aaw@google.com>
3987 * lang.opt: New file.
3988 * lto-lang.c (lto_init_options): New function.
3989 (lto_handle_option): New function.
3990 (lto_init): Move initialization of flag_unit_at_a_time to
3992 (LANG_HOOKS_INIT_OPTIONS): Define.
3993 (LANG_HOOKS_HANDLE_OPTION): Define.
3995 2008-04-29 Ollie Wild <aaw@google.com>
3997 * lto.c (lto_read_namespace_DIE): New function.
3998 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
3999 NAMESPACE_DECL DIE's.
4000 (lto_resolve_namespacedecl_ref): New function.
4001 * lto.h (lto_resolve_namespacedecl_ref): New function.
4002 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4003 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4004 and num_namespace_decls.
4005 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4006 * lto-lang.c (lto_init_ts): New function.
4007 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4009 2008-04-16 Ollie Wild <aaw@google.com>
4011 * lto-function-in.c (input_type_ref): Updated function description.
4013 2008-04-16 Ollie Wild <aaw@google.com>
4015 * lto-function-in.c (input_type_ref_1): New function.
4016 (input_type_ref): Split into two functions.
4017 (input_function): Add support for type contexts.
4019 2008-04-16 Ollie Wild <aaw@google.com>
4021 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4024 2008-04-16 Ollie Wild <aaw@google.com>
4026 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4027 list of supported languages.
4029 2008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
4031 Merge with mainline @133491.
4033 2008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
4034 Jan Hubicka <jh@suse.cz>
4036 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4037 fd->unmaterialized_fndecls.
4038 (lto_get_file_name, lto_materialize_cgraph): New function.
4039 (lto_materialize_constructors_and_inits,
4040 lto_materialize_function): Read info directly from elf file.
4041 (lto_file_read): Made local and initialize dictionary so that
4042 other lto sections can be read without reprocessing the elf file.
4043 (lto_main): Read all functions after all files have been processed
4044 for their types, globals and cgraph.
4045 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4047 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4048 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4049 (lto_elf_read_symtab): Removed function.
4050 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4051 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4052 (lto_file_read): Made local.
4053 (lto_get_file_name, lto_elf_build_section_table,
4056 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4058 (lto_read_decls): Get the file name.
4059 * lto-cgraph-in.c: New file.
4060 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4061 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4062 (input_labels): Fixed latent sizeof issue.
4063 (input_function): Build stmt array to set call sites into cgraph
4065 (lto_read_body): Reset cfun->curr_properties.
4066 * lto_section_in.h (lto_section_slot): New structure.
4067 (section_hash_table.lto_file_decl_data): New field.
4070 2008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
4072 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4073 reconstruct static initializers.
4074 (lto_get_body, lto_materialize_function): Add lto_section_type as
4076 (lto_materialize_constructors_and_inits,
4077 lto_materialize_file_data): New function.
4078 (lto_materialize_function,
4079 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4080 unmap_section and map_fn_body to map_section.
4081 (lto_set_cu_context): Process functions and static inits
4083 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4084 lto/lto-section-in.o): Update dependencies.
4085 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4086 lto_section_type parameter.
4087 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4088 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4089 renamed the other two so that there is only one map function and
4090 one unmap function and each takes a section type parameter.
4091 (lto_read_function_body): Renamed to lto_input_function_body and
4092 added file_data parameter.
4093 (lto_read_var_init): Removed.
4094 (lto_input_constructors_and_inits): New function.
4095 * lto-section-in.c (lto_read_decls): New function.
4096 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4097 var_decls, type_decls, types to lto_file_decl_data.
4098 (input_type_ref, input_expr_operand, lto_read_body): Get
4099 field_decls, fn_decls, var_decls, type_decls, types from different
4101 (input_globals, input_constructor, lto_read_var_init): Removed.
4102 (input_constructors_or_inits): New function.
4103 (lto_read_function_body, lto_input_constructors_and_inits):
4104 Renamed to lto_input_function_body and takes file_data parameter.
4105 * lto-section-in.h (lto_file_decl_data): New structure.
4107 2008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4109 * lto-function-in.c (input_globals.c): Changed input type to
4110 lto_function_header.
4111 (input_bb): Removed code to deserialize the stmt number.
4112 (input_function): Renumber all stmts after they are input.
4113 (lto_read_body, lto_read_function_body, lto_read_var_init):
4114 Changed to used new header format and enum section_type.
4115 *lto-lang.c (success): Removed.
4117 2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4119 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4120 (lto_elf_free_sym): Likewise.
4122 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4123 (lto_elf_build_init): Likewise.
4125 2008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
4127 * lto-read.c: Renamed to lto-function-in.c.
4128 (input_1_unsigned): Moved to lto-section-in.c and renamed
4129 lto_input_1_unsigned.
4130 (input_uleb128): Moved to lto-section-in.c and renamed
4132 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4133 lto_input_widest_uint_uleb128.
4134 (input_sleb128): Moved to lto-section-in.c and renamed
4136 (input_integer): Moved to lto-section-in.c and renamed
4138 (debug_in_fun): Moved to lto-section-in.c and renamed
4140 (input_block): Moved to lto-section-in.h and renamed
4142 (input_expr_operand): Fixed to allow lists with more than one
4144 * lto-section-in.h: New file.
4145 * lto-section-in.c: New file with changes from above.
4146 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4147 (lto-section-in.o): New rule.
4149 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4151 * lto-read.c (input_expr_operand): Mark static and external
4152 VAR_DECLs as needed.
4154 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4156 * lto-read.c (input_integer): Use the correct shift amount.
4158 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4160 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4161 (LANG_HOOKS_NAME): Define.
4163 2007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4165 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4166 original function to...
4167 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4168 don't have a base type.
4169 (lto_read_enumeration_type_DIE): Examine the values of the
4170 enumeration to determine whether we can use an unsigned type for
4171 the base type of the enumeration.
4173 2007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4175 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4176 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4178 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4180 * lto-lang.c (lto_types_compatible_p): New function.
4181 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4183 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4184 Kenneth Zadeck <zadeck@naturalbridge.com>
4186 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4187 (input_local_vars): Read in DECL_INITIAL and context for local
4188 statics that need to be put in unexpanded_vars_list.
4190 2007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4192 * lto-read.c (input_real): Use a separate null-terminated buffer
4193 for calling real_from_string.
4194 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4195 tell cgraph that it's needed.
4197 2007-12-19 Doug Kwan <dougkwan@google.com>
4199 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4201 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4203 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4204 (lto_file_read): Reset the members of 'context' every time we read
4205 a toplevel DIE, with special attention to last_param_type.
4207 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4209 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4210 'declaration'. Set the assembler name for non-public functions.
4212 2007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
4214 * lto_read.c (data_in.unexpanded_indexes): New array.
4215 (input_local_var): Added code to read in unexpanded_var_list
4216 indexes for variables. Only read in DECL_CHAIN field for
4218 (input_local_vars): Added code to rebuild unexpanded_var_list in
4219 order using unexpanded_indexes.
4220 (input_function): Added code to set DECL_CONTEXT for functions.
4222 2007-12-13 Doug Kwan <dougkwan@google.com>
4224 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4225 in pointer and reference types.
4227 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4229 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4232 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4234 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4235 already read the DIE.
4236 (lto_get_body): New function, split out from...
4237 (lto_materialize_function): ...here. Call it.
4238 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4239 determine DECL_EXTERNAL.
4240 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4241 FUNCTION_DECLs when necessary. Use the type of the actual
4242 function definition if we are unable to easily merge types. Ignore
4243 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4246 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4248 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4250 2007-12-12 Bill Maddox <maddox@google.com>
4253 2007-12-07 Bill Maddox <maddox@google.com>
4255 * lto.c (lto_str_fd_init): New function.
4256 (lto_str_fd_close): New function.
4257 (lto_file_init): Call lto_str_fd_init.
4258 (lto_file_close): Call lto_str_fd_close.
4259 (lto_str_read): New function. Read debug string table.
4260 (lto_str_lookup): New function. Get string for debug
4261 string table offset.
4262 (lto_read_form): Recognize DW_FORM_strp.
4263 (lto_file_read): Invoke lto_str_read.
4265 * lto-elf.c (lto_elf_file_open): Read raw section data
4266 for the .debug_str section, if present.
4268 * lto.h (struct lto_str_fd_struct): New struct.
4269 (struct lto_file_struct): Added new field DEBUG_STR
4270 to hold the file descriptor for the debug string table.
4272 2007-12-07 Bill Maddox <maddox@google.com>
4274 * lto.c (lto_str_fd_init): New function.
4275 (lto_str_fd_close): New function.
4276 (lto_file_init): Call lto_str_fd_init.
4277 (lto_file_close): Call lto_str_fd_close.
4278 (lto_str_read): New function. Read debug string table.
4279 (lto_str_lookup): New function. Get string for debug
4280 string table offset.
4281 (lto_read_form): Recognize DW_FORM_strp.
4282 (lto_file_read): Invoke lto_str_read.
4284 * lto-elf.c (lto_elf_file_open): Read raw section data
4285 for the .debug_str section, if present.
4287 * lto.h (struct lto_str_fd_struct): New struct.
4288 (struct lto_file_struct): Added new field DEBUG_STR
4289 to hold the file descriptor for the debug string table.
4291 2007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4293 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4294 Grow the basic_block_info and label_to_block_map vectors if
4295 necessary. Read in the block chain.
4297 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4299 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4301 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4303 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4305 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4307 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4308 (lto_read_body): Don't declare PROP_alias.
4310 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4312 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4313 argument type information.
4315 2007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4317 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4318 TREE_THIS_VOLATILE if the associated type is a volatile type.
4319 (lto_materialize_function): Remove call to init_ssa_operands.
4320 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4321 variable when reading an SSA_NAME. Do the same when reading a
4322 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4323 (input_cfg): Call init_ssa_operands.
4324 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4325 Move call to init_tree_ssa...
4326 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4327 add_referenced_var on any variables referenced from the body of the
4328 function. Inform the rest of the compiler we are in SSA form and
4329 inform later passes about the current properties.
4331 2007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4333 * lto.c (lto_materialize_function): Add FIXME.
4335 2007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4337 * lto-lang.c (enum built_in_attribute): New enum.
4338 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4339 built_in_attributes): New variables.
4340 (def_builtin_1): New function.
4341 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4343 2007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4345 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4346 DECL_SOURCE_LOCATION for debugging purposes.
4347 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4348 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4349 laying out the decl until later.
4350 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4351 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4353 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4354 operand of an ADDR_EXPR.
4355 * lto-lang.c (enum lto_builtin_type): New enum.
4356 (builtin_type): New typedef.
4357 (builtin_types, string_type_node, const_string_type_node,
4358 wint_type_node, intmax_type_node, uintmax_type_node,
4359 signed_size_type_node): New variables.
4360 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4361 lto_build_c_type_nodes): New functions.
4362 (lto_init): Initialize builtin types.
4363 (lto_set_decl_assembler_name): Let the target machine mangle the
4364 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4366 2007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4368 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4369 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4370 the type is a constant type. Set the assembler name and inform
4371 the rest of the compiler about the new decl if the decl is not
4373 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4374 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4375 try to read in function bodies for functions that already have bodies.
4376 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4378 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4379 Check for whether we matched a builtin function type before calling
4380 lto_same_type_p on the generated type. Permit cases where the
4381 declaration of an array is unbounded, but the definition is bounded.
4382 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4383 DECL_SIZE_UNIT if necessary.
4385 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4387 * lto-read.c (input_expr_operand): Get types right
4390 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4392 * lto-read.c (make_new_block, input_cfg): Properly set
4395 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4397 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4398 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4400 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4402 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4403 construct the integer type for bitfields.
4405 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4407 * lto-read.c (data_in.current_node_has_loc): Removed.
4408 (input_line_info): Returns true if node needs line set.
4409 (set_line_info): Always sets line if called.
4410 (clear_line_info): Removed reference to current_node_needs_loc.
4411 (input_expr_operand): Keeps track locally if current node needs a loc.
4412 (input_local_var): Added code to handle DECL_INITIAL for
4413 static local vars. Only set loc if necessary.
4415 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4417 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4420 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4422 * lto.c: Include langhooks.h.
4423 (lto_find_integral_type): Rework logic to handle the case where
4424 got_byte_size is true, but the bitsize requested and that of the
4425 base_type doesn't match.
4426 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4427 asm_name if we are creating a VAR_DECL.
4428 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4430 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4431 function reference and use the builtin's decl if so. Set the
4432 DECL_CONTEXT of the RESULT_DECL for the function.
4433 * lto-lang.c (registered_builtin_fndecls): New variable.
4434 (lto_getdecls): Return it.
4435 (lto_builtin_function): Chain the new decl onto
4436 registered_builtin_fndecls.
4438 2007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
4440 * lto-read.c (process_tree_flags, lto_static_init_local):
4441 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4442 (input_line_info, clear_line_info): Fixed new line number code.
4443 (input_expr_operand): Added type to SWITCH_EXPR.
4444 (lto_read_body): Properly initialized data_in.
4445 Clear line info when leaving.
4447 2007-11-13 Diego Novillo <dnovillo@google.com>
4449 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4450 Initialize ARTIFICIAL.
4451 (lto_read_subroutine_type_subprogram_DIE): Initialize
4453 * lto-read.c (set_line_info): Remove ; from calls to
4454 LINEMAP_POSITION_FOR_COLUMN.
4456 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4458 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4459 (input_expr_operand, input_local_var): Renamed get_type_ref to
4461 (input_expr_operand): Get the types correct for
4462 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4464 2007-11-13 Doug Kwan <dougkwan@google.com>
4466 * lto-read.c (input_widest_uint_uleb128): New function.
4467 (input_tree_flags, process_tree_flags, input_line_info,
4468 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4469 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4470 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4471 (lto_static_init_local): Add code to assert that lto_flags_type is
4474 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4476 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4477 (lto_read_subroutine_type_subprogram_DIE): Handle
4478 DW_AT_static_link and DW_AT_specification. Return the
4479 specification if present.
4480 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4482 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4484 * lto-lang.c: Include target.h.
4485 (registered_builtin_types): New variable.
4486 (lto_type_for_mode): Increase number of modes handled.
4487 (lto_builtin_function): Fix argument list and return the decl.
4488 (lto_register_builtin_type): New function.
4489 (lto_init): Initialize target builtins and language-independent
4491 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4493 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4495 * lto-read.c (input_expr_operand): Added code to properly handle
4496 index filed. Added new RANGE_EXPR case.
4498 2007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4500 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4501 (data_in): Added current_node_has_loc field.
4502 (input_line_info, set_line_info, clear_line_info): Added a support
4503 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4504 did not have on on the source side.
4505 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4508 2007-11-09 Doug Kwan <dougkwan@google.com>
4510 * lto-read.c (input_expr_operand): Change type of operand 2 of
4511 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4513 2007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4515 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4516 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4517 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4518 the new decl we are creating. Move informing the middle end about
4520 (lto_main): ...here. Inform the middle end about global variables
4521 after we have read in all the input files.
4522 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4523 variables with internal linkage, so delete the check for internal
4524 linkage. Combine TREE_PUBLIC flags.
4526 2007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4528 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4530 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4531 builtin specially. Move check for attribute compatibility
4534 2007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4536 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4537 * config-lang.in (gtfiles): Add lto.h and lto.c.
4538 * lto-elf.c: Include ggc.h.
4539 (lto_elf_file_open): Allocate elf_file from GC memory.
4540 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4541 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4543 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4544 (lto_file_close): Free file from GC memory.
4545 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4546 (lto_read_member_DIE): Fix declaration.
4547 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4549 (current_lto_file): New variable.
4551 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4552 lto_die_cache_entry): Move to...
4553 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4554 declarations accordingly.
4555 (struct lto_file_struct): Declare.
4556 (lto_file_vtable): Use it instead of lto_file.
4558 2007-11-06 Alon Dayan <alond@il.ibm.com>
4559 Kenneth Zadeck <zadeck@naturalbridge.com>
4561 * lto-read.c (process_flags, lto_static_init_local):
4562 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4563 change global array num_flags_for_code to flags_length_for_code.
4564 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4566 2007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4568 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4569 layout functions to compute information about the newly constructed
4572 2007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4574 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4575 case to use DECL_RESULT if necessary.
4577 2007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4579 * lto-read.c (input_tree_list): Removed.
4580 (input_tree_flags): Added parameter to force flags no matter what
4582 (input_expr_operand): Added parameter to input_tree_flags.
4583 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4584 input_expr_operand rather than input_tree_lists.
4585 (input_local_var): Use input_expr_operand to read attributes
4586 rather then input_tree_list.
4587 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4589 2007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4591 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4592 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4594 * lto-read.c (lto_read_body): Use correct sizes for calculating
4595 type_decls_offset and types_offset.
4597 2007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4599 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4601 * config-lang.in (gtfiles): Add lto-lang.c.
4602 * lto-lang.c: Include gt-lto-lto-lang.h.
4603 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4604 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4605 (lto/lto-read.o): Likewise.
4607 2007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4609 * lto-read.c (data_in): Added type_decls and current_col fields.
4610 (string_slot): New type to hold canonized file name.
4611 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4612 input_line_info, set_line_info, clear_line_info): New functions.
4613 (file_name_hash_table): New hash table.
4614 (input_local_var, input_labels, input_local_vars_index,
4615 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4616 (input_uleb128): Changed type of byte var.
4617 (input_expr_operand): Large number of changes to get line numbers
4618 correct. Added TYPE_DECL case.
4619 (input_globals): Added code to get TYPE_DECLs processed.
4620 (input_local_var): Added code to process line numbers and
4621 TREE_CHAIN and DECL_CONTEXT.
4622 (input_function, input_constructor): Added call to
4624 (lto_static_init_local): Added code to get line numbers correct.
4625 (lto_read_body): Added code to get TYPE_DECLS read and to change
4626 parameters to the calls above that had their parms reorganized.
4629 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4631 * lto.h (lto_resolve_typedecl_ref): Declare.
4632 * lto.c (lto_resolve_typedecl_ref): New function.
4634 2007-10-29 Mark Mitchell <mark@codesourcery.com>
4635 Nathan Froyd <froydnj@codesourcery.com>
4637 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4638 DIEs even if we find an abstract origin for this DIE.
4640 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4642 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4643 RESULT_DECL slightly earlier. Only remember the decl for later
4644 if we successfully merge declarations.
4646 2007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4648 * lto-read.c (input_expr_operand): Give label_values the proper
4649 context and provide switch statements with a default type.
4651 2007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4653 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4654 * lto.c (lto_materialize_function): ...to here.
4656 2007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4658 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4659 * lto.c (lto_info_fd_init): Initialize it.
4660 (lto_info_fd_close): Free it.
4661 (lto_materialize_function): New function.
4662 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4663 unmaterialized_fndecls.
4664 (lto_file_read): Read in all the function bodies after we have read
4665 all of the DWARF info.
4666 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4667 reading a function body.
4669 2007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4671 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4672 semetric with output_tree_flags. Added call to log flags.
4673 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4674 type issues to make everything consistent with flags being
4675 unsigned HOST_WIDE_INTS.
4676 (input_expr_operand): Added call to
4677 recompute_tree_invariant_for_addr_expr.
4678 (input_local_var): Added debugging for tree_chains. Now calls
4680 (input_phi): Made flags unsigned HOST_WIDE_INT.
4681 (input_ssa_names): Now calls input_tree_flags.
4682 (lto_read_body): Now sets cfun.
4683 (lto_read_function_body): Now sets current_function_pointer.
4685 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4687 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4688 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4689 inspecting fields within.
4690 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4691 handle this appropriately.
4693 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4695 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4696 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4697 both DW_AT_abstract_origin and DW_AT_specification.
4698 (lto_read_subroutine_type_subprogram_DIE): Handle
4699 DW_AT_abstract_origin.
4700 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4701 (lto_read_DIE_at_ptr): Define as static to match declaration.
4702 Lookup the PTR in the cache before reading it from the file.
4703 (lto_resolve_var_ref): Adjust accordingly.
4704 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4705 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4707 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4709 * lto.c (lto_read_DIE_at_ptr): New function.
4710 (lto_resolve_var_ref): Use it.
4711 (lto_resolve_fn_ref): Use it.
4712 (lto_resolve_field_ref): Use it.
4713 (lto_read_variable_formal_parameter_constant_DIE): Follow
4714 DW_AT_specification and return the associated decl when appropriate.
4716 2007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4718 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4719 Implement for scalar integer modes.
4720 (lto_init): Initialize size_type_node.
4722 2007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4724 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4725 (input_local_var): Add chaining for params.
4726 (input_ssa_names): Add cfun parameter.
4727 (input_function): Remove unnecessary else.
4729 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4731 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4732 (lto_resolve_var_ref): Use proper types.
4733 (lto_resolve_fn_ref): Likewise.
4734 (lto_resolve_field_ref): Likewise.
4736 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4738 * lto-read.c (input_expr_operand): Remove case.
4740 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4742 * lto.c (lto_read_only_for_child_DIEs): New function.
4743 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4744 * lto-elf.c (lto_elf_map_lto_section): Remove.
4745 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4746 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4747 SSA_NAME. Add missing case for mechanical codes.
4748 (input_cfg): Use basic_block_info_for_function instead of
4751 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4753 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4754 (input_list): Renamed input_tree_list and modified to follow same
4755 protocol as lto-function-out.c:output_tree_list.
4756 (input_expr_operand): Make asm operands use input_tree_list.
4757 (input_local_var): Now uses input_tree_list.
4758 (lto_read_body): Change placement for setting context of debug_labels.
4761 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4763 * lto-read.c (input_real): Output debugging in proper order.
4764 (input_integer): Compute bit lengths properly.
4765 (input_list): Clean up declaration.
4766 (input_expr_operand): Change calls to input_real to match fix.
4767 Make reading of LTO_bit_field_ref1 match output.
4768 (input_local_var): Make reading of attributes match what is being
4770 (dump_debug_stream): Also print char in hex.
4771 (debug_out_fun): Fix signed unsigned mismatch.
4773 2007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4775 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4776 DW_AT_GNU_vector specially, as they are not contiguous with the
4777 specified set of attribute names. Use class_mask to check for
4778 errors at the end of the function
4779 (lto_resolve_var_ref): Read the DIE if it is not cached.
4780 (lto_resolve_fn_ref): Likewise.
4781 (lto_resolve_field_ref): Likewise.
4783 2007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4785 * lto.c: Include dwarf2out.h.
4786 (lto_cache_store_DIE): Assert that we never change the value.
4787 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4788 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4789 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4790 sensible type instead.
4791 (lto_read_structure_union_class_type_DIE): Store the newly
4792 created type prior to reading the members of the structure to
4793 avoid infinite recursion. Avoid computing types and alignments
4794 for structures whose sizes are unknown.
4795 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4796 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4797 DW_AT_const_value, and DW_AT_specification.
4798 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4799 Return early if we have already constructed the function type.
4800 (lto_read_typedef_DIE): Check to see if the type has been cached
4801 already. Cache the type before reading any children.
4802 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4803 (lto_read_DIE): Unset context->skip_non_parameters around reading
4805 (lto_resolve_fn_ref): Delete trailing whitespace.
4807 2007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4809 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4811 2007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4813 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4815 2007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4817 * lto-lang.c (signed_and_unsigned_types): New variable.
4818 (lto_type_for_size): Consult signed_and_unsigned_types to find
4819 an approprite type, creating it if necessary.
4820 (lto_set_decl_assembler_name): Add actual method body.
4822 2007-09-06 Jim Blandy <jimb@codesourcery.com>
4824 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4825 can't find a var init for this variable, leave its DECL_INITIAL.
4826 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4827 lto_elf_map_fn_body.
4828 (lto_map_lto_section): New function.
4829 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4830 bodies, and lto_elf_map_optional_lto_section for variable
4832 (lto_elf_find_section_data): Quietly return NULL if the section is
4834 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4836 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
4838 * lto-read.c (lto_read_body): Doc fix.
4840 2007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4842 * lto-read.c (fun_in): Renamed to data_in.
4843 (input_expr_operand, input_local_var, input_string_internal,
4844 input_string, input_real, input_list, get_label_decl,
4845 get_type_ref, input_expr_operand, input_globals, input_labels,
4846 input_local_vars_index, input_local_var, input_local_vars,
4847 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
4848 (input_constructor): New function.
4849 (lto_read_function_body): Renamed to lto_read_body and generalized
4850 to handle both functions and constructors.
4851 (lto_read_function_body, lto_read_var_init): New function.
4854 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4856 * lto-read.c (input_expr_operand): Assert that there really is a
4858 (input_globals): Removed checks on 0 section.
4860 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4862 * lto-read.c (fun_in): Added local_decls_index and
4863 local_decls_index_d.
4864 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
4865 (input_globals): Enabled code to handle FIELD_DECLs.
4866 (input_local_vars_index, input_local_vars): New function.
4867 (input_local_var): Changed to allow locals to be input randomly.
4868 (lto_read_function_body): Added code to input the
4869 local_decls_index and to free various structures.
4871 2007-08-17 Jim Blandy <jimb@codesourcery.com>
4873 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
4874 ATTRIBUTE_UNUSED from 'die' formal.
4876 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
4877 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
4878 (input_list): Fix type of 'tag'.
4879 (input_expr_operand): Fix type of 'tag' argument. Update
4880 declaration. Fix type of 'ctag'. Add default case to switch,
4881 since the type of the switched value is now an enum.
4882 (input_local_vars): Fix type of 'tag'.
4883 (input_bb): Fix type of 'tag' argument.
4884 (input_function): Fix type of 'tag' argument.
4886 2007-08-16 Jim Blandy <jimb@codesourcery.com>
4888 * lto.c (lto_read_member_DIE): Record the tree we create in
4889 fd->die_cache. (Our 'die' argument is no longer unused.)
4890 (lto_resolve_field_ref): New function.
4891 * lto.h (lto_resolve_field_ref): New declaration.
4893 2007-08-15 Jim Blandy <jimb@codesourcery.com>
4895 * lto-read.c (lto_read_var_init): Mark arguments as unused.
4897 2007-08-07 Jim Blandy <jimb@codesourcery.com>
4899 * lto.c (lto_read_form): Complete attr_classes table.
4900 (DWARF2_form_data): Doc fix.
4902 2007-08-05 Mark Mitchell <mark@codesourcery.com>
4904 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
4906 (lto_read_var_init): Declare.
4907 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
4908 interface for reading variable initializers.
4909 * lto-elf.c (lto_elf_read_var_init): Remove.
4910 (lto_elf_file_vtable): Update initializer.
4911 (lto_elf_read_var_init): Add comment about unused-ness.
4912 * lto-read.c (lto_read_var_init): New.
4914 * lto.c (lto_read_form): Add entry for DW_AT_inline.
4916 2007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
4918 * lto-read.c (lto_read_function_body): Moved declaration of fn
4921 2007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4923 * lto-read.c (input_uleb128, input_string_internal, input_real,
4924 input_integer, input_record_start, input_list, get_type_ref,
4925 input_flags, input_expr_operand, input_expr_operand,
4926 input_expr_operand, input_local_vars, input_cfg, input_phi,
4927 input_ssa_names, input_bb, input_function): Added semicolons.
4930 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4932 * lto-read.c (input_globals): Remove debugging.
4933 (input_function): Set DECL_ARGUMENTS.
4936 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4938 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
4939 RETURN_EXPR, MODIFY_EXPR and processing of flags.
4940 (input_phi): Made work with operands other than SSA_NAMES and
4941 fixed processing of flags.
4942 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
4943 (input_flags): New function.
4944 * lto-lang.c (lto_init): Changed state of in_lto_p.
4947 2007-07-24 Mark Mitchell <mark@codesourcery.com>
4949 * lto-tree.h (lto_varargs_cookie): Remove.
4950 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
4951 skip_non_parameters, skip_parameters.
4952 (lto_varargs_cookie): Remove.
4953 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
4955 (lto_read_abbrev): New function.
4956 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
4958 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
4959 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
4960 (lto_file_read): Initialize new context fields.
4961 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
4962 (lto_unsigned_type): Remove.
4963 (lto_signed_type): Likewise.
4964 (lto_signed_or_unsigned_type): Likewise.
4965 (lto_init): Do not create lto_varargs_cookie.
4966 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
4967 (LANG_HOOKS_SIGNED_TYPE): Likewise.
4968 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
4970 2007-07-19 Jan Hubicka <jh@suse.cz>
4972 * lto-read.c (lto_read_function_body): Produce empty scope block
4975 2007-07-18 Mark Mitchell <mark@codesourcery.com>
4977 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
4978 process local variables.
4979 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
4981 2007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4983 * lto-read.c (input_list, input_expr_operand): Added struct
4985 (init_cfg, finalize_cfg): Removed function.
4986 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
4987 (input_labels, input_local_vars): Now takes input_block parameter rather than
4989 (input_cfg, input_phi, input_ssa_names): New functions.
4990 (input_bb): Now passes in input_blocks. Does not construct cfg
4991 and processes the list of phi functions.
4992 (input_function): Now builds both the cfg and ssa_names table.
4993 (lto_read_function_body): Processes new header fields to construct
4994 streams for the ssa_names and cfg and their debugging.
4995 * lto/lto-lang.c (lto_init): Set in_lto_p.
4998 2007-06-28 Mark Mitchell <mark@codesourcery.com>
5000 * lto.h (lto_file_vtable): Add read_var_init.
5001 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5003 (lto_main): Remove bogus asserts.
5004 * lto-elf.c (tm.h): Include it.
5005 (libiberty.y): Likewise.
5006 (lto_elf_file): Add strtab and symtab. Rename
5007 string_table_section_index to sec_strtab.
5008 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5009 (lto_elf_get_shdr): New function.
5010 (lto_elf_free_shdr): Likewise.
5011 (lto_elf_find_section_data): Use them.
5012 (lto_elf_read_symtab): New function.
5013 (lto_elf_lookup_sym): Likewise.
5014 (lto_elf_free_sym): Likewise.
5015 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5016 (lto_elf_built_init): New function.
5017 (lto_elf_read_var_init): Likewise.
5018 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5020 2007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
5022 * lto-read (make_new_block): Initialize the stmt_list.
5023 (lto_static_init_local): Add debugging for missing codes.
5025 2007-06-26 Mark Mitchell <mark@codesourcery.com>
5027 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5028 unprototyped functions.
5030 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5032 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5033 Handle DW_AT_MIPS_linkage_name.
5034 (lto_read_subroutine_type_subprogram): Likewise. Correct
5036 (lto_main): Remove incorrect assertions.
5037 * lto-symbtab.c: Build function types out of TREE_LISTs.
5039 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5041 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5043 2007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
5045 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5046 dummy since ggc does not like empty structs.
5047 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5048 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5049 expr->common to expr->base.
5050 (make_new_block): Moved stmt_list to proper place.
5053 2007-03-14 Robert Kennedy <jimbob@google.com>
5055 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5056 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5057 assembler name from DWARF.
5058 * lto-lang.c (lto_set_decl_assembler_name) New function.
5060 2006-09-10 Mark Mitchell <mark@codesourcery.com>
5062 * lto.h (lto_file_vtable): New structure.
5063 (lto_file): Add vtable pointer.
5064 (lto_file_init): Add vtable paramter.
5065 (lto_read_function_body): New function.
5066 (lto_symtab_merge_fn): New function.
5067 * lto.c (lto_file_init): Add vtable parameter.
5068 (lto_read_form): Fill in entries for DW_AT_prototyped,
5070 (lto_read_subroutine_type_subprogram_DIE): New function.
5071 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5073 * lto-elf.c (lto_elf_vile_vtable): New variable.
5074 (lto_elf_file_open): Pass it to lto_file_init.
5075 (lto_elf_map_fn_body): New function.
5076 (lto_elf_unmap_fn_body): Likewise.
5077 * lto-read.c: New file.
5078 * lto-symtab.c (lto_symtab_merge_fn): New function.
5079 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5080 tree_rest_of_compilation.
5081 * Make-lang.in (LTO_OBJS): Add lto-read.o
5082 (lto-read.o): New target.
5084 2006-09-03 Mark Mitchell <mark@codesourcery.com>
5086 * lto.c (<inttypes.h>): Don't include it.
5087 (lto_context): Don't typedef it.
5088 (lto_resolve_reference): New function.
5089 (lto_read_form): Use it.
5090 (lto_resolve_type_ref): New function.
5091 (lto_resolve_var_ref): Likewise.
5092 (lto_resolve_fn_ref): Likewise.
5093 * lto.h (<inttypes.h>): Include it.
5094 (lto_context): New type.
5095 (lto_ref): New structure.
5096 (lto_resolve_type_ref): Declare.
5097 (lto_resolve_var_ref): Likewise.
5098 (lto_resolve_fn_ref): Likewise.
5100 2006-08-18 Mark Mitchell <mark@codesourcery.com>
5102 * lang-specs.h: New file.
5104 2006-08-14 Mark Mitchell <mark@codesourcery.com>
5106 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5107 (lto_info_fd_close): Deallocate it.
5108 (lto_die_cache_entry): New structure.
5109 (lto_cache_hash): New function.
5110 (lto_cache_eq): Likewise.
5111 (lto_cache_store_DIE): Likewise.
5112 (lto_cache_lookup_DIE): Likewise.
5113 (lto_read_referenced_type_DIE): Use the cache.
5114 (lto_read_pointer_type_DIE): Robustify.
5115 (lto_read_DIE): Use the cache.
5116 * lto.h (hashtab.h): Include.
5117 (lto_info_fd): Add DIE cache.
5118 * Make-lang.in (LTO_H): New variable.
5119 (lto/lto-lang.o): Use LTO_H.
5120 (lto/lto-elf.o): Likewise.
5121 (lto/lto-symtab.o): Likewise.
5123 2006-07-09 Mark Mitchell <mark@codesourcery.com>
5125 * lto.c (lto_abi_mismatch_error): New function.
5126 (lto_abbrev_read): Initialize num_abbrevs.
5127 (lto_read_form): Specify allowed form classes for
5128 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5129 (lto_read_variable_formal_parameter_constant_DIE): Handle
5130 DW_AT_declaration. Call lto_symtab_merge_var.
5131 (lto_read_pointer_type_DIE): New function.
5132 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5133 not creat TYPE_DECLs for types that already have them.
5134 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5135 (lto_set_cu_context): Make cu_start point to the header, not the
5137 (lto_file_read): Adjust for change to lto_set_cu_context.
5138 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5139 (lto/lto-symtab.o): New rule.
5140 * lto-tree.h (lang_identifier): Add decl field.
5141 (LANG_IDENTIFIER_CAST): New macro.
5142 (LTO_IDENTIFIER_DECL): Likewise.
5143 (lto_symtab_merge_var): Declare.
5144 * lto-symtab.c: New file.
5146 2006-07-02 Daniel Berlin <dberlin@dberlin.org>
5148 * lto.c (lto_context): Add current_cu and info_fd members.
5149 (DWARF2_CompUnit): New structure.
5150 (lto_read_DIE): Take lto_info_fd *.
5151 (lto_read_child_DIEs): Ditto.
5152 (lto_file_corrupt_error): Constify argument.
5153 (lto_set_cu_context): New function
5154 (lto_info_fd_init): Ditto.
5155 (lto_info_fd_close): Ditto.
5156 (lto_file_init): Use lto_info_fd_init.
5157 (lto_file_close): Use lto_info_fd_close.
5158 (lto_read_initial_length): Pass in pointer to header size.
5159 (lto_read_comp_unit_header): Correct cu_length to
5160 real length from beginning of header. Take lto_info_fd * as
5162 (find_cu_for_offset): New function.
5163 (lto_read_form): Change first argument to lto_info_fd *.
5164 Add FORM_CONTEXT argument.
5165 Handle DW_FORM_ref_addr.
5166 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5167 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5168 Swap contexts if necessary for form.
5169 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5170 lto_file_corrupt_error.
5171 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5172 (lto_read_referenced_type_DIE): Change first argument to
5173 lto_info_fd *. Access lto_fd fields through base pointer.
5174 (lto_read_compile_unit_DIE): Change first argument to an
5176 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5177 (lto_read_base_type_DIE): Ditto.
5178 (lto_read_child_DIEs): Ditto.
5179 (lto_read_DIE): Ditto. Change type of function pointer.
5180 (lto_info_read): New function.
5181 (lto_set_cu_context): Ditto.
5182 (lto_file_read): Use lto_info_read, walk resulting CU's
5183 (lto_main): Update for lto_info_fd change.
5184 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5186 * lto.h (DWARF2_CompUnit): New structure.
5187 (lto_info_fd): Ditto.
5188 (lto_file): Change debug_info to be an lto_info_fd.
5190 2006-06-25 Mark Mitchell <mark@codesourcery.com>
5192 * lto.c (toplev.h): Include it.
5193 (dwarf2.h): Likewise.
5196 (cgraph.h): Likewise.
5198 (inttypes.h): Likewise.
5199 (DWARF2_attr): New type.
5200 (DWARF2_abbrev): Likewise.
5201 (DWARF2_class): Likewise.
5202 (DWARF2_form_data): Likewise.
5203 (lto_context): Likewise.
5204 (lto_fd_init): New function.
5205 (lto_abbrev_fd_init): Likewise.
5206 (lto_abbrev_fd_close): Likewise.
5207 (lto_file_init): Use them.
5208 (lto_file_close): New function.
5209 (lto_file_corrupt_error): Likewise.
5210 (LTO_CHECK_INT_VAL): New macro.
5211 (lto_check_size_t_val): New function.
5212 (lto_check_int_val): Likewise.
5213 (LTO_READ_TYPE): New macro.
5214 (lto_read_ubyte): New function.
5215 (lto_read_uhalf): Likewise.
5216 (lto_read_uword): Likewise.
5217 (lto_read_uleb128): Likewise.
5218 (lto_read_initial_length): Likewise.
5219 (lto_abbrev_read_attrs): Likewise.
5220 (lto_abbrev_read): Likewise.
5221 (lto_abbrev_lookup): Likewise.
5222 (lto_read_section_offset): Likewise.
5223 (lto_read_comp_unit_header): Likewise.
5224 (lto_read_form): Likewise.
5225 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5226 (LTO_BEGIN_READ_ATTRS): Likewise.
5227 (LTO_END_READ_ATTRS): Likewise.
5228 (lto_unsupported_attr_error): New function.
5229 (lto_get_identifier): Likewise.
5230 (lto_read_referenced_type_DIE): Likewise.
5231 (lto_read_compile_unit_DIE): Likewise.
5232 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5233 (lto_read_base_type_DIE): Likewise.
5234 (lto_read_DIE): Likewise.
5235 (lto_read_child_DIEs): Likewise.
5236 (lto_file_read): Read DIEs.
5237 (lto_main): Ask middle end to emit entities.
5238 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5239 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5240 (lto_elf_file_close): Likewise.
5241 * lto.h (lto_file): Declare.
5242 (DWARF2_abbrev): Likewise.
5244 (lto_abbrev_fd): Likewise.
5245 (lto_file): Use new types.
5246 (lto_file_close): Declare.
5247 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5249 2006-06-18 Mark Mitchell <mark@codesourcery.com>
5253 * lto-elf.c: New file.
5254 * lto-lang.c (flags.h): Include it.
5256 (lto_init): New function.
5257 (lto_write_globals): Remove.
5258 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5259 (LANG_HOOKS_INIT): Define.
5260 (LANG_HOOKS_PARSE_FILE): Likewise.
5261 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5262 (LTO_EXE): Link with libelf.
5263 (lto/lto-lang.o): Update dependencies.
5264 (lto/lto.o): New target.
5265 (lto/lto-elf.o): Likewise.
5267 2006-06-12 Mark Mitchell <mark@codesourcery.com>
5269 * config-lang.in: New file.
5270 * Make-lang.in: Likewise.
5271 * lto-tree.h: Likewise.
5272 * lto-lang.c: Likewise.