1 2017-01-11 Jakub Jelinek <jakub@redhat.com>
4 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
7 2017-01-09 Jakub Jelinek <jakub@redhat.com>
11 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
13 2017-01-06 Nathan Sidwell <nathan@acm.org>
15 * lto-partition.c (promote_symbol): Write to dump file sooner,
16 include alias promoting too.
18 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
19 (may_need_named_section_p): Likewise.
20 (rename_statics): Likewise.
21 (lto_promote_cross_file_statics): Likewise.
23 2017-01-01 Jakub Jelinek <jakub@redhat.com>
25 Update copyright years.
27 2016-11-30 Georg-Johann Lay <avr@gjlay.de>
30 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
31 mismatch if the two types are built-in.
33 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
35 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
37 2016-11-23 Richard Biener <rguenther@suse.de>
40 * lto.c (hash_canonical_type): Ignore zero-sized fields.
42 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
45 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
47 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48 Alan Hayward <alan.hayward@arm.com>
49 David Sherwood <david.sherwood@arm.com>
51 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
53 2016-10-31 Richard Biener <rguenther@suse.de>
56 * lto.c (do_whole_program_analysis): Bail out after errors
59 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
61 * lto-partition.c: Include tree-vrp.h.
64 2016-09-20 Richard Biener <rguenther@suse.de>
66 * lto.c (lto_main): Call early_finish with "<artificial>" as
69 2016-09-19 Richard Biener <rguenther@suse.de>
71 * lto.c (lto_main): Invoke early_finish debug hook.
73 2016-07-25 Richard Biener <rguenther@suse.de>
75 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
76 (unify_scc): Likewise.
77 (lto_read_decls): Likewise.
79 2016-06-28 Jakub Jelinek <jakub@redhat.com>
81 * Make-lang.in: Don't cat ../stage_current if it does not exist.
83 2016-06-23 Andi Kleen <ak@linux.intel.com>
85 * Make-lang.in: Add support for autofdo (disabled for now)
87 2016-06-10 Martin Sebor <msebor@redhat.com>
90 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
91 attribute in type-generic builtins.
93 2016-05-16 Jan Hubicka <hubicka@ucw.cz>
95 * lto-partition.c (add_symbol_to_partition_1): Likewise.
97 2016-05-03 Jan Hubicka <hubicka@ucw.cz>
99 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
101 2016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
103 * lto-partition.h (lto_balanced_map): New parameter.
104 * lto-partition.c (lto_balanced_map): New parameter
106 Check if partition size is greater than max_partition_size.
107 * lto.c (do_whole_program_analysis): Adjust calls to
108 lto_balanced_map() to pass 2nd argument.
110 2016-03-17 H.J. Lu <hongjiu.lu@intel.com>
113 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
116 2016-03-08 Jakub Jelinek <jakub@redhat.com>
118 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
119 - becuase -> because.
121 2016-02-15 Tom de Vries <tom@codesourcery.com>
124 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
127 2016-01-27 Martin Liska <mliska@suse.cz>
129 * lto-partition.c (add_symbol_to_partition_1): Remove usage
132 2016-01-19 Jan Hubicka <hubicka@ucw.cz>
135 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
136 decls have no assemblernames.
138 2016-01-19 Martin Liska <mliska@suse.cz>
139 Martin Jambor <mjambor@suse.cz>
141 * lto-partition.c: Include "hsa.h"
142 (add_symbol_to_partition_1): Put hsa implementations into the
143 same partition as host implementations.
145 2016-01-12 Jan Hubicka <hubicka@ucw.cz>
148 * lto-partition.c (rename_statics): Fix pasto.
150 2016-01-18 Richard Biener <rguenther@suse.de>
153 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
154 function vs. variable.
156 2016-01-12 Richard Biener <rguenther@suse.de>
159 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
160 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
162 2016-01-04 Jakub Jelinek <jakub@redhat.com>
164 Update copyright years.
166 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
169 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
170 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
171 (lto_symtab_prevailing_decl): Use it.
173 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
175 * lto.c: Include stringpool.h and fold-const.h.
176 (offload_handle_link_vars): New static function.
177 (lto_main): Call offload_handle_link_vars.
179 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
181 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
183 2015-12-11 Jan Hubicka <hubicka@ucw.cz>
186 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
187 values of error and warning attributes.
189 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
192 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
194 (LTO_NO_PREVAIL): Use gcc_checking_assert.
196 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
199 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
202 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
205 * lto-symtab.c: Include lto-symtab.h.
206 (lto_cgraph_replace_node): Do not merge profiles here.
207 (lto_symtab_merge_p): New function.
208 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
209 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
211 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
212 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
213 * lto.c: Include lto-symtab.h
216 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
219 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
220 are not part of the definition.
221 (contained_in_symbol): Likewise.
222 (promote_symbol): When promoting a symbol also promote all transparent
224 (rename_statics): Weakref needs unique name, too.
226 2015-12-07 Jan Hubicka <hubicka@ucw.cz>
229 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
230 rename_statics, rename_statics): Handle transparent aliases.
232 2015-12-04 Jan Hubicka <hubicka@ucw.cz>
234 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
237 2015-12-01 Jan Hubicka <hubicka@ucw.cz>
239 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
241 2015-11-25 Jan Hubicka <jh@suse.cz>
243 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
244 * lang.opt (lto_linker_output): New enum.
245 (flinker_output): New flag.
247 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
249 * lto-symtab.c: Include alias.h
250 (warn_type_compatibility_p): Replace types_compatible_p checks by
251 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
252 (lto_symtab_merge): Compare DECL sizes.
253 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
255 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
257 * lto.c (iterative_hash_canonical_type): Recruse for all types
258 which pass !canonical_type_used_p.
259 (gimple_register_canonical_type_1): Sanity check we do not compute
260 canonical type of anything with !canonical_type_used_p.
261 (gimple_register_canonical_type): Skip all types that are
262 !canonical_type_used_p
264 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
266 * lto.c (unify_scc): Use free_node.
268 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
270 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
271 (gimple_register_canonical_type_1): Check that pointers do not get
273 (gimple_register_canonical_type): Do not register pointers.
275 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
277 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
278 flag for types that are not ODR; fix loop walking parameters.
280 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
282 * lto-lang.c: Remove unused header files.
283 * lto-object.c: Likewise.
284 * lto-partition.c: Likewise.
285 * lto-symtab.c: Likewise.
288 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
290 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
292 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
294 * lto-lang.c: Don't undef DEF_BUILTIN.
296 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
298 * lto-lang.c: Reorder #include's and remove duplicates.
299 * lto-object.c: Likewise.
300 * lto-partition.c: Likewise.
301 * lto-symtab.c: Likewise.
304 2015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
306 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
308 (lto_fixup_state): Likewise.
309 (do_whole_program_analysis): Use
310 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
313 2015-10-13 Jakub Jelinek <jakub@redhat.com>
315 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
316 DEF_FUNCTION_TYPE_11): Define.
318 2015-10-10 Jan Hubicka <hubicka@ucw.cz>
320 * lto.c (hash_canonical_type): Honor
321 type_with_interoperable_signedness.
323 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
325 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
326 (DEF_FUNCTION_TYPE_VAR_11): Delete.
328 2015-08-31 Richard Biener <rguenther@suse.de>
330 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
331 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
332 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
333 participate in merging with something else.
335 2015-08-31 Richard Biener <rguenther@suse.de>
337 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
338 test, do not replace a non-builtin with a builtin.
339 * lto.c (compare_tree_sccs_1): Do not merge things we stream
340 as builtins vs. non-builtins.
342 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
344 * lto.h: Remove useless typedefs.
346 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
348 * lto.c: Remove redundant includes.
350 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
352 * lto-lang.c: Fix double word typos.
354 2015-07-10 Andrew MacLeod <amacleod@redhat.com>
356 * lto.c: Include cfghooks.h rather than predict.h.
358 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
360 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
362 * lto-object.c: Likewise.
363 * lto-partition.c: Likewise.
364 * lto-symtab.c: Likewise.
366 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
368 * lto-lang.c: Adjust includes for flags.h changes.
370 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
372 * lto-lang.c: Adjust includes.
373 * lto-object.c: Likewise.
374 * lto-partition.c: Likewise.
375 * lto-symtab.c: Likewise.
378 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
380 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
381 * lto-object.c: Likewise.
382 * lto-partition.c: Likewise.
383 * lto-symtab.c: Likewise.
384 * lto-tree.h: Likewise.
387 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
389 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
390 than typed_noop_remove. Remove redudant typedefs.
392 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
394 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
395 * lto-object.c: Likewise.
396 * lto-partition.c: Likewise.
397 * lto-symtab.c: Likewise.
400 2015-06-14 Jan Hubicka <hubicka@ucw.cz>
403 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
405 2015-06-12 DJ Delorie <dj@redhat.com>
407 * lto-lang.c (lto_type_for_size): Include intN types.
408 (lto_type_for_mode): Likewise.
410 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
412 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
414 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
416 * lto-lang.c : Adjust include files.
417 * lto-object.c : Likewise.
418 * lto-partition.c : Likewise.
419 * lto-partition.h : Likewise.
420 * lto-symtab.c : Likewise.
424 2015-06-06 Jan Hubicka <hubicka@ucw.cz>
427 * lto-symtab.c (warn_type_compatibility_p): Fix call of
428 odr_or_derived_type_p.
429 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
431 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
434 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
437 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
439 * lto-lang.c (lto_write_globals): Remove.
440 (LANG_HOOKS_WRITE_GLOBALS): Same.
442 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
444 * lto-lang.c: Adjust includes for restructured coretypes.h.
445 * lto-object.c: Likewise.
446 * lto-partition.c: Likewise.
447 * lto-symtab.c: Likewise.
450 2015-06-04 Jan Hubicka <hubicka@ucw.cz>
452 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
454 2015-06-03 Jan Hubicka <hubicka@ucw.cz>
456 * lto.c (iterative_hash_canonical_type,
457 gimple_register_canonical_type): only hash main variants of types
459 2015-05-27 Martin Liska <mliska@suse.cz>
461 * lto-partition.c (new_partition): Reset number of symbols.
462 (add_symbol_to_partition_1): Increment number of symbols.
463 (undo_partition): Decrement number of symbols.
464 (lto_balanced_map): Dump number of symbols and insns that
465 belong to a partition.
466 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
468 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
470 * lto.c (hash_canonical_type): Be sure we hash only types that
472 (gimple_register_canonical_type_1): Do not produce canonical
473 types for types that do not need alias sets.
475 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
477 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
479 2015-05-19 Jan Hubicka <hubicka@ucw.cz>
481 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
483 2015-05-17 Jan Hubicka <hubicka@ucw.cz>
485 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
486 compare ODR types (if available) and function types.
487 (lto_symtab_merge): ... here; output ODR violation warnings
488 and call warn_types_mismatch.
490 2015-04-29 Jan Hubicka <hubicka@ucw.cz>
492 * lto.c (lto_fixup_state): Call verify_type.
494 2015-04-18 Trevor Saunders <tsaunders@mozilla.com>
496 * lto.c: Adjust for hash_table changes.
498 2015-03-27 Jan Hubicka <hubicka@ucw.cz>
500 * lto.c (lto_read_decls): Move code registering odr types out
501 of TYPE_CANONICAL conditional and also register polymorphic types.
503 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
505 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
506 DECL_ARTIFICAL symbols.
508 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
511 * lto.c (unify_scc): Revert location cache when unification
513 (lto_read_decls): Accept location cache after sucess;
514 apply location cache before calling debug hooks.
516 2015-03-10 Jan Hubicka <hubicka@ucw.cz>
518 * lto.c (read_cgraph_and_symbols): Do not do merging
521 2015-02-26 Jakub Jelinek <jakub@redhat.com>
523 * lto.c (lto_mode_identity_table): New variable.
524 (lto_read_decls): Add mode_table argument to the lto_input_block
526 (lto_file_finalize): Initialize mode_table.
527 (lto_init): Initialize lto_mode_identity_table.
529 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
532 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
534 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
536 2015-02-03 Jan Hubicka <hubicka@ucw.cz>
538 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
540 2015-01-30 Joseph Myers <joseph@codesourcery.com>
542 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
543 changed to pass input_location as first argument.
545 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
547 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
549 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
551 * lto.c (compare_tree_sccs_1): Add comparsion of
552 DECL_FUNCTION_SPECIFIC_TARGET
554 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
555 James Norris <jnorris@codesourcery.com>
557 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
559 * lto.c: Include "gomp-constants.h".
561 2015-01-14 Ilya Verbin <ilya.verbin@intel.com>
563 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
564 from select_what_to_stream.
566 2015-01-09 Bernd Schmidt <bernds@codesourcery.com>
567 Jakub Jelinek <jakub@redhat.com>
570 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
573 2015-01-09 Michael Collison <michael.collison@linaro.org>
575 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
576 input.h, alias.h, symtab.h, options, fold-const.h,
577 wide-int.h, and inchash.h due to flattening of tree.h.
578 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
579 input.h, alias.h, symtab.h, fold-const.h,
580 wide-int.h, and inchash.h due to flattening of tree.h.
581 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
582 input.h, alias.h, symtab.h, options, fold-const.h,
583 wide-int.h, and inchash.h due to flattening of tree.h.
584 * lto-partition.c: Ditto.
585 * lto-symtab.c: Ditto.
587 2015-01-05 Jakub Jelinek <jakub@redhat.com>
589 Update copyright years.
591 2014-12-22 Martin Liska <mliska@suse.cz>
593 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
595 (undo_partition): Likewise.
596 (lto_balanced_map): Likewise.
598 2014-12-22 Martin Liska <mliska@suse.cz>
600 * lto-partition.c: Include of symbol-summary.h is added.
601 * lto-symtab.c: Likewise.
604 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
607 * lto.c (read_cgraph_and_symbols): Update call of
608 remove_unreachable_nodes.
609 (do_whole_program_analysis): Remove call of
610 symtab->remove_unreachable_nodes
612 2014-12-08 Trevor Saunders <tsaunders@mozilla.com>
614 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
615 htab with malloc instead of ggc.
617 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
619 * lto.c: Replace htab with hash_table.
621 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
623 * lto.c (lto_read_in_decl_state): Adjust.
624 (lto_fixup_state): Likewise.
626 2014-11-17 Jan Hubicka <hubicka@ucw.cz>
628 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
630 2014-11-14 Jan Hubicka <hubicka@ucw.cz>
632 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
634 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
635 Bernd Schmidt <bernds@codesourcery.com>
636 Andrey Turetskiy <andrey.turetskiy@intel.com>
637 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
639 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
641 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
642 Ilya Tocar <ilya.tocar@intel.com>
643 Andrey Turetskiy <andrey.turetskiy@intel.com>
644 Bernd Schmidt <bernds@codesourcery.com>
646 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
647 LTO_SECTION_NAME_PREFIX.
648 * lto-partition.c (lto_promote_cross_file_statics): Call
649 select_what_to_stream.
650 * lto.c (lto_section_with_id): Use section_name_prefix instead of
651 LTO_SECTION_NAME_PREFIX.
652 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
653 being built as an offload compiler.
655 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
657 * lto-lang.c: Remove redundant enum from machine_mode.
659 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
661 * lto.c: Adjust include files.
663 * lto-object.c: Ditto.
664 * lto-partition.c: Ditto.
665 * lto-symtab.c: Ditto.
667 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
669 * lto-lang.c: Adjust include files.
670 * lto-object.c: Ditto.
671 * lto-partition.c: Ditto.
672 * lto-symtab.c: Ditto.
675 2014-10-16 DJ Delorie <dj@redhat.com>
677 * lto-object.c (lto_obj_begin_section): In the event that pointer
678 sizes aren't powers of two, choose a more suitable alignment
681 2014-10-14 DJ Delorie <dj@redhat.com>
683 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
685 (lto_init): Initialize all intN types, not just int128.
687 2014-10-06 Martin Liska <mliska@suse.cz>
689 * lto.c (stream_out): ARG_UNUSED added for last argument.
691 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
693 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
696 2014-09-23 Andi Kleen <ak@linux.intel.com>
698 * lto-partition.c (node_cmp): Update comment.
699 (varpool_node_cmp): Use symtab_node for comparison.
700 (add_sorted_nodes): New function.
701 (lto_balanced_map): Change to keep ordered queue
702 of ordered node. Handle no_reorder attribute.
704 2014-09-11 Jan Hubicka <hubicka@ucw.cz>
706 * lto.c (lto_read_decls): Register ODR types.
708 2014-08-20 Jan Hubicka <hubicka@ucw.cz>
710 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
712 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
714 2014-08-14 Jan Hubicka <hubicka@ucw.cz>
716 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
718 2014-08-14 Richard Biener <rguenther@suse.de>
721 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
723 2014-08-08 Richard Biener <rguenther@suse.de>
725 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
727 2014-08-08 Bin Cheng <bin.cheng@arm.com>
730 * lto-lang.c (lto_init): Switch mis-matched arguments.
732 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
734 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
736 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
738 * lto-partition.c, lto-partition.h: Use hash_set instead of
741 2014-07-31 Andi Kleen <ak@linux.intel.com>
743 * lto.c (hash_canonical_type): Use inchash::hash
744 and use inchash::add_expr.
745 (iterative_hash_canonical_type): Dito.
747 2014-07-30 Richard Biener <rguenther@suse.de>
749 * lto-streamer.h (lto_write_data): New function.
750 * langhooks.c (lhd_append_data): Do not free block.
751 * lto-section-out.c (lto_write_data): New function writing
752 raw data to the current section.
753 (lto_write_stream): Adjust for langhook semantic change.
754 (lto_destroy_simple_output_block): Write header directly.
755 * lto-opts.c (lto_write_options): Write options directly.
756 * lto-streamer-out.c (produce_asm): Write heaeder directly.
757 (lto_output_toplevel_asms): Likewise.
758 (copy_function_or_variable): Copy data directly.
759 (write_global_references): Output index table directly.
760 (lto_output_decl_state_refs): Likewise.
761 (write_symbol): Write data directly.
762 (produce_symtab): Adjust.
763 (produce_asm_for_decls): Output header and refs directly.
765 2014-07-25 Andi Kleen <ak@linux.intel.com>
767 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
769 2014-07-25 Andi Kleen <ak@linux.intel.com>
771 * lto.c (hash_canonical_type): Convert to inchash.
772 (iterative_hash_canonical_type): Dito.
774 2014-07-25 Andi Kleen <ak@linux.intel.com>
776 * lto.c: Include inchash.h
778 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
780 * lto.c (mentions_vars_p_decl_non_common): Skip
782 mentions_vars_p_function): Do DECL_ARGUMENTS.
783 (lto_fixup_prevailing_decls): Update.
785 2014-07-12 Jan Hubicka <hubicka@ucw.cz>
787 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
789 (materialize_cgraph): Do not push GIMPLE_IN timevar.
791 2014-07-11 Jan Hubicka <hubicka@ucw.cz>
793 * lto-partition.c (add_references_to_partition): Use
794 varpool_ctor_useable_for_folding_p.
795 * lto.c (lto_read_in_decl_state): Update sanity check.
797 2014-07-01 Martin Liska <mliska@suse.cz>
799 IPA REF alias refactoring
800 * lto-partition.c (add_symbol_to_partition_1): Usage of
801 FOR_EACH_ALIAS added.
803 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
806 * lto.c (lto_copy_fields_not_streamed): New function.
807 (compare_tree_sccs_1): Do not compare fields shared in between type
809 (lto_read_decls): Fixup types first before inserting into hash.
811 2014-06-28 Andrew Pinski <apinski@cavium.com>
813 * lto.c (lto_read_decls): Fix comment in comment.
815 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
817 * lto.c (lto_copy_fields_not_streamed): New function.
818 (compare_tree_sccs_1): Do not compare fields shared in between type
820 (lto_read_decls): Fixup types first before inserting into hash.
822 2014-06-25 Martin Liska <mliska@suse.cz>
824 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
826 (add_symbol_to_partition_1): Likewise.
827 (lto_balanced_map): Likewise.
828 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
830 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
832 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
833 (mentions_vars_p_function): ... here.
834 (compare_tree_sccs_1): Update VINDEX checks.
835 (lto_fixup_prevailing_decls): Likewise.
837 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
839 * lto.c (canonical_type_hash_cache): Use hash_map instead of
842 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
846 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
848 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
850 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
852 * lto.c (compare_tree_sccs_1): Do not compare priorities.
854 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
856 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
858 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
860 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
861 (do_whole_program_analysis): Use verify_symtab.
863 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
865 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
866 lto_fixup_prevailing_decls): Skip section names.
868 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
870 * lto-symtab.c: Include builtins.h.
872 2014-05-26 Richard Biener <rguenther@suse.de>
874 * lto.c (lto_parse_hex): Use int64_t.
875 (lto_resolution_read): Likewise.
877 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
879 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
881 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
883 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
885 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
887 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
889 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
890 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
891 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
893 2012-05-22 Bernd Schmidt <bernds@codesourcery.com>
895 * lto-object.c: Include "lto-section-names.h".
896 (LTO_SEGMENT_NAME): Don't define.
897 * lto.c: Include "lto-section-names.h".
899 2014-05-17 Jan Hubicka <hubicka@ucw.cz>
902 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
903 mixed with variables.
905 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
907 * lto-tree.h: Don't use variable_size gty attribute.
908 * lto.c (lto_read_in_decl_state): Adjust.
909 (create_subid_section_table): Likewise.
910 (lto_flatten_files): Likewise.
911 (read_cgraph_and_symbols): Likewise.
913 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
914 Mike Stump <mikestump@comcast.net>
915 Richard Sandiford <rdsandiford@googlemail.com>
917 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
918 * lto-lang.c (get_nonnull_operand): Likewise.
920 2014-04-28 Richard Biener <rguenther@suse.de>
923 * lto-lang.c: Define flag_isoc11.
925 2014-04-23 David Malcolm <dmalcolm@redhat.com>
927 * lto-partition.c (add_references_to_partition): Update for
928 removal of implicit pointer from the is-a.h API.
929 (add_symbol_to_partition_1): Likewise.
930 (contained_in_symbol): Likewise.
931 (undo_partition): Likewise.
932 (lto_balanced_map): Likewise.
933 (promote_symbol): Likewise.
934 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
935 (lto_symtab_merge_symbols): Likewise.
936 * lto.c (lto_wpa_write_files): Likewise.
938 2014-04-15 Richard Biener <rguenther@suse.de>
940 * lto.c: Include params.h.
941 (do_whole_program_analysis): Switch on flag_lto_partition value,
942 add support for LTO_PARTITION_ONE.
943 * lto-partition.h (lto_balanced_map): Adjust.
944 * lto-partition.c (lto_balanced_map): Get number of desired
945 partitions as argument to support -flto-partition=one.
947 2014-04-14 Jan Hubicka <hubicka@ucw.cz>
949 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
952 2014-03-19 Jan Hubicka <hubicka@ucw.cz>
954 * lto.c: Include ipa-inline.h
955 (do_whole_program_analysis): Free inline summary after partitioning.
957 2014-03-19 Richard Biener <rguenther@suse.de>
960 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
961 instead of TREE_CHAIN as chain_next.
963 2014-03-19 Richard Biener <rguenther@suse.de>
965 * lto.c (lto_wpa_write_files): Move call to
966 lto_promote_cross_file_statics ...
967 (do_whole_program_analysis): ... here, into the partitioning
968 block. Do not ggc_collect after lto_wpa_write_files but
969 for a last time before it.
971 2014-03-19 Jakub Jelinek <jakub@redhat.com>
974 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
977 2014-03-18 Jakub Jelinek <jakub@redhat.com>
980 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
981 and complex_{float,{,long_}double}_type_node.
983 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
985 * lto-lang.c (lto_init): Pass flag_short_double to
986 build_common_tree_nodes.
988 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
991 * lto.c (stream_out): Avoid parallel streaming with
992 -flto=jobserver until we are able to throttle it down
995 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
997 * lto-partition.c (add_symbol_to_partition_1,
998 undo_partition, lto_balanced_map): Aliases have no
1000 (lto_balanced_map): Do not follow refering variables
1001 if they can be optimized out.
1003 2014-02-14 Richard Biener <rguenther@suse.de>
1006 * lto.c (compare_tree_sccs_1): Do not compare
1007 DECL_FUNCTION_SPECIFIC_TARGET.
1008 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1010 2014-02-12 Richard Biener <rguenther@suse.de>
1013 * lto-lang.c (lto_write_globals): Do not call
1014 wrapup_global_declarations or emit_debug_global_declarations
1015 but emit debug info for non-function scope variables
1018 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1020 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1022 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1025 * lto-partition.c (symbol_class): Move to cgraph.h
1026 (get_symbol_class): Move to symtab.c
1027 (add_references_to_partition, add_symbol_to_partition_1,
1028 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1029 lto_promote_cross_file_statics): Update.
1031 2014-02-05 Jan Hubicka <hubicka@ucw.cz>
1033 * lto.c (lto_parallelism): New static var.
1034 (do_stream_out, wait_for_child, stream_out): New static functions.
1035 (lto_wpa_write_files): Add support for parallel streaming.
1036 (do_whole_program_analysis): Set parallelism.
1037 * lang.opt (fwpa): Add parameter.
1038 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1039 (lto_init): Update use of flag_wpa.
1040 * lto-streamer.h (asm_nodes_output): Declare.
1042 2014-02-05 Richard Biener <rguenther@suse.de>
1044 * lto.h (lto_global_var_decls): Remove.
1045 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1046 (lto_write_globals): Do nothing in WPA stage, gather globals from
1047 the varpool here ...
1048 * lto.c (lto_main): ... not here.
1049 (materialize_cgraph): Do not call rest_of_decl_compilation
1050 on the empty lto_global_var_decls vector.
1051 (lto_global_var_decls): Remove.
1053 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
1055 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1056 needs duplicating, not generic COMDAT.
1058 2014-02-04 Richard Biener <rguenther@suse.de>
1061 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1062 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1064 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
1068 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1069 merge force_output and forced_by_abi flags.
1071 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1073 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1076 2014-01-09 Richard Biener <rguenther@suse.de>
1078 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1080 2014-01-09 Richard Biener <rguenther@suse.de>
1083 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1084 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1085 (gimple_canonical_types_compatible_p): Do not compare them either.
1087 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1089 Update copyright years
1091 2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1093 * lto.c: Remove struct tags when referring to class varpool_node.
1094 * lto-partition.c: Likewise.
1095 * lto-symtab.c: Likewise.
1097 2013-11-29 Jakub Jelinek <jakub@redhat.com>
1098 Richard Biener <rguenther@suse.de>
1101 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1103 2013-11-29 Jakub Jelinek <jakub@redhat.com>
1106 * lto.c (mentions_vars_p_omp_clause): New function.
1107 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1110 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1112 * lto.c: Add required include files from gimple.h.
1113 * lto-lang.c: Likewise
1114 * lto-object.c: Likewise
1115 * lto-partition.c: Likewise
1116 * lto-symtab.c: Likewise
1118 2013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1120 * lto-partition.c lto-symtab.c lto.c Adjust.
1122 2013-11-14 Diego Novillo <dnovillo@google.com>
1124 * lto-lang.c: Include stringpool.h.
1125 Include stor-layout.h.
1126 * lto-partition.c: Include gcc-symtab.h.
1127 * lto.c: Include stor-layout.h.
1129 2013-10-31 David Malcolm <dmalcolm@redhat.com>
1131 Automated part of renaming of symtab_node_base to symtab_node.
1133 Patch autogenerated by rename_symtab.py from
1134 https://github.com/davidmalcolm/gcc-refactoring-scripts
1135 revision 58bb219cc090b2f4516a9297d868c245495ee622
1137 * lto-partition.c (add_symbol_to_partition): Rename
1138 symtab_node_base to symtab_node.
1139 (get_symbol_class): Likewise.
1140 (symbol_partitioned_p): Likewise.
1141 (add_references_to_partition): Likewise.
1142 (add_symbol_to_partition_1): Likewise.
1143 (contained_in_symbol): Likewise.
1144 (add_symbol_to_partition): Likewise.
1145 (lto_1_to_1_map): Likewise.
1146 (lto_max_map): Likewise.
1147 (lto_balanced_map): Likewise.
1148 (privatize_symbol_name): Likewise.
1149 (promote_symbol): Likewise.
1150 (may_need_named_section_p): Likewise.
1151 (rename_statics): Likewise.
1152 (lto_promote_statics_nonwpa): Likewise.
1153 * lto-symtab.c (lto_symtab_merge): Likewise.
1154 (lto_symtab_resolve_replaceable_p): Likewise.
1155 (lto_symtab_symbol_p): Likewise.
1156 (lto_symtab_resolve_can_prevail_p): Likewise.
1157 (lto_symtab_resolve_symbols): Likewise.
1158 (lto_symtab_merge_decls_2): Likewise.
1159 (lto_symtab_merge_decls_1): Likewise.
1160 (lto_symtab_merge_decls): Likewise.
1161 (lto_symtab_merge_symbols_1): Likewise.
1162 (lto_symtab_merge_symbols): Likewise.
1163 (lto_symtab_prevailing_decl): Likewise.
1164 * lto.c (lto_wpa_write_files): Likewise.
1165 (read_cgraph_and_symbols): Likewise.
1166 (do_whole_program_analysis): Likewise.
1168 2013-10-30 David Malcolm <dmalcolm@redhat.com>
1170 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1171 declarations onto multiple lines to make things easier for
1173 (lto_symtab_merge_decls_1): Likewise.
1174 (lto_symtab_merge_symbols_1): Likewise.
1176 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1178 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1179 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1182 2013-10-29 David Malcolm <dmalcolm@redhat.com>
1184 Patch autogenerated by refactor_symtab.py from
1185 https://github.com/davidmalcolm/gcc-refactoring-scripts
1186 revision 58bb219cc090b2f4516a9297d868c245495ee622
1188 * lto-partition.c (lto_promote_cross_file_statics): Update for
1189 conversion of symtab types to a true class hierarchy.
1190 (rename_statics): Likewise.
1191 (promote_symbol): Likewise.
1192 (privatize_symbol_name): Likewise.
1193 (lto_balanced_map): Likewise.
1194 (varpool_node_cmp): Likewise.
1195 (node_cmp): Likewise.
1196 (lto_1_to_1_map): Likewise.
1197 (undo_partition): Likewise.
1198 (add_symbol_to_partition): Likewise.
1199 (contained_in_symbol): Likewise.
1200 (add_symbol_to_partition_1): Likewise.
1201 (add_references_to_partition): Likewise.
1202 (symbol_partitioned_p): Likewise.
1203 (get_symbol_class): Likewise.
1204 (lto_max_map): Likewise.
1205 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1206 (lto_symtab_merge_symbols): Likewise.
1207 (lto_symtab_merge_symbols_1): Likewise.
1208 (lto_symtab_merge_decls): Likewise.
1209 (lto_symtab_merge_decls_1): Likewise.
1210 (lto_symtab_merge_decls_2): Likewise.
1211 (lto_symtab_resolve_symbols): Likewise.
1212 (lto_symtab_resolve_can_prevail_p): Likewise.
1213 (lto_symtab_symbol_p): Likewise.
1214 (lto_symtab_resolve_replaceable_p): Likewise.
1215 (lto_symtab_merge): Likewise.
1216 (lto_varpool_replace_node): Likewise.
1217 (lto_cgraph_replace_node): Likewise.
1218 * lto.c (lto_main): Likewise.
1219 (do_whole_program_analysis): Likewise.
1220 (materialize_cgraph): Likewise.
1221 (read_cgraph_and_symbols): Likewise.
1222 (cmp_partitions_order): Likewise.
1223 (lto_materialize_function): Likewise.
1224 (has_analyzed_clone_p): Likewise.
1226 2013-10-29 Andrew MacLeod <amacleod@redhat.com>
1228 * lto/lto-object.c: Add gimple.h to include list.
1229 * lto/lto-partition.c: Likewise.
1231 2013-10-18 Andrew MacLeod <amacleod@redhat.com>
1233 * lto.c: Remove tree-flow.h from include list.
1235 2013-10-15 Richard Biener <rguenther@suse.de>
1237 * lto.c (hash_canonical_type): Split out from ...
1238 (iterative_hash_canonical_type): ... here. Register types
1240 (gimple_canonical_type_hash): Adjust.
1241 (gimple_register_canonical_type_1): Split out from ...
1242 (gimple_register_canonical_type): ... here. Cache computed
1244 (lto_register_canonical_types): Split into two modes,
1245 clearing and computing TYPE_CANONICAL.
1246 (lto_read_decls): Adjust.
1247 (read_cgraph_and_symbols): Do two passes over global trees,
1248 first clearing then computing TYPE_CANONICAL.
1250 2013-10-14 Richard Biener <rguenther@suse.de>
1252 * lto.c (gimple_canonical_types): Move out-of GC space.
1253 (canonical_type_hash_cache): Make a pointer-map.
1254 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1256 (iterative_hash_canonical_type): Adjust.
1257 (read_cgraph_and_symbols): Likewise.
1258 (print_lto_report_1): Likewise.
1260 2013-10-14 Richard Biener <rguenther@suse.de>
1262 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1263 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1264 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1265 gimple_types_compatible_p_1, gimple_types_compatible_p,
1266 visit, iterative_hash_name, struct type_hash_pair,
1267 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1268 gimple_type_eq, gimple_register_type, num_not_merged_types,
1269 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1270 num_not_merged_types_in_same_scc_trees): Remove old merging code
1272 (lto_read_decls): Do not run old merging code in parallel.
1273 (read_cgraph_and_symbols): Do not init/free old merging
1275 (print_lto_report_1): Do not report differences of old vs. new
1278 2013-10-14 Richard Biener <rguenther@suse.de>
1280 * lto-lang.c (lto_init): Do not re-init canonical types here.
1281 (lto_register_canonical_types): Move to ...
1282 * lto.c (lto_register_canonical_types): ... here.
1283 (gimple_canonical_types, canonical_type_hash_cache,
1284 iterative_hash_canonical_type, gimple_canonical_type_hash,
1285 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1286 gimple_register_canonical_type): Add canonical type merging machinery
1287 moved from gimple.c.
1288 (read_cgraph_and_symbols): Init and free canonical type tables
1290 (print_lto_report_1): Report canonical type table stats here.
1292 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1294 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1296 2013-09-25 Tom Tromey <tromey@redhat.com>
1298 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1299 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1300 (lto/lto-object.o): Remove.
1302 2013-09-06 Richard Biener <rguenther@suse.de>
1304 * lto-symtab.c: Move from gcc/
1305 * lto.h: Include vec.h.
1306 (lto_global_var_decls): Declare.
1307 * lto.c (lto_global_var_decls): Move definition here.
1308 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1309 (lto-symtab.o): Add.
1310 * config-lang.in (gtfiles): Add lto.h.
1312 2013-08-31 Jan Hubicka <jh@suse.cz>
1314 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1315 DECL_FIELD_OFFSET can contain an reference to variable.
1317 2013-08-31 Jan Hubicka <jh@suse.cz>
1319 * lto.c (tree_with_vars): Turn into vector.
1320 (MAYBE_REMEMBER_WITH_VARS): Change to...
1321 (CHECK_VAR): ... this one.
1322 (CHECK_NO_VAR): New macro.
1323 (maybe_remember_with_vars_typed): Turn to ...
1324 (mentions_vars_p_typed): ... this one.
1325 (maybe_remember_with_vars_common): Turn to ...
1326 (mentions_vars_p_comon): ... this one.
1327 (maybe_remember_with_vars_decl_minimal): Turn to ...
1328 (mentions_vars_p_decl_minmal): ... this one.
1329 (maybe_remember_with_vars_decl_common): Turn to ...
1330 (mentions_vars_p_decl_common): ... this one.
1331 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1332 (mentions_vars_p_decl_with_vis): ... this one.
1333 (maybe_remember_with_vars_decl_non_common): Turn to ...
1334 (mentions_vars_p_decl_non_common): ... this one.
1335 (maybe_remember_with_vars_function): Turn to ...
1336 (mentions_vars_p_function): ... this one.
1337 (maybe_remember_with_vars_field_decl): Turn to ...
1338 (mentions_vars_p_field_decl): ... this one.
1339 (maybe_remember_with_vars_type): Turn to ...
1340 (mentions_vars_p_type): ... this one.
1341 (maybe_remember_with_vars_binfo): Turn to ...
1342 (mentions_vars_p_binfo): ... this one.
1343 (maybe_remember_with_vars_constructor): Turn to ...
1344 (mentions_vars_p_constructor): ... this one.
1345 (maybe_remember_with_vars_expr): Turn to ...
1346 (mentions_vars_p_expr): ... this one.
1347 (maybe_remember_with_vars): Turn to ...
1348 (mentions_vars_p): ... this one.
1349 (lto_read_decls): Update.
1350 (LTO_SET_PREVAIL): Do not call function for internal decls.
1351 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1352 check that something was updated.
1353 (lto_fixup_state): Do not care about internal decls.
1354 (lto_fixup_decls): Update.
1355 (read_cgraph_and_symbols): Update.
1357 2013-08-29 Jan Hubicka <jh@suse.cz>
1359 * lto.c (read_cgraph_and_symbols): Free decl states.
1361 2013-08-29 Jan Hubicka <jh@suse.cz>
1363 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1364 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1367 2013-08-28 Jan Hubicka <jh@suse.cz>
1369 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1370 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1371 (unify_scc): Do checking assert.
1373 2013-08-06 Jan Hubicka <jh@suse.cz>
1374 Martin Liska <marxin.liska@gmail.com>
1376 * lto-partition.c (lto_balanced_map): Always base order on
1379 2013-08-06 Jan Hubicka <jh@suse.cz>
1381 * lto.c (lto_materialize_function): Do not read body anymore.
1383 2013-08-02 Jan Hubicka <jh@suse.cz>
1385 * lto.c (lto_materialize_function): Do not push struct function.
1386 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1387 (may_need_named_section_p): Even abstract origins may need
1390 2013-07-30 David Malcolm <dmalcolm@redhat.com>
1392 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1395 * lto.c (do_whole_program_analysis): Update for move of
1396 all_regular_ipa_passes from a global to a field of class
1399 2013-07-21 Ondřej BÃÂlka <neleai@seznam.cz>
1401 * lto-partition.c: Fix typos.
1403 2013-06-20 Jan Hubicka <jh@suse.cz>
1405 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1406 partitioning of variables.
1408 2013-06-20 Jan Hubicka <jh@suse.cz>
1410 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1412 2013-06-19 Jan Hubicka <jh@suse.cz>
1414 * lto-partition.c (add_references_to_partition): Use
1417 2013-06-18 Richard Biener <rguenther@suse.de>
1419 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1421 (lto_register_function_decl_in_symtab): Likewise.
1422 (cmp_tree): New function.
1423 (unify_scc): Instead of using the streamer cache map from entry
1424 to cache index match up the two maps we have by sorting them.
1425 Adjust calls to lto_register_var_decl_in_symtab and
1426 lto_register_function_decl_in_symtab.
1428 2013-06-17 Richard Biener <rguenther@suse.de>
1430 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1431 * lto.c: Include data-streamer.h.
1432 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1433 (gimple_type_leader_entry_s, gimple_type_leader,
1434 gimple_lookup_type_leader): Remove.
1435 (gtc_visit): Simplify.
1436 (gimple_types_compatible_p): Likewise.
1437 (gimple_register_type_1): Likewise. Merge into ...
1438 (gimple_register_type): ... this. Keep it as legacy for
1439 statistics purposes for now.
1440 (fixup_integer_cst): Remove.
1441 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1443 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1444 maybe_remember_with_vars_*): ... these.
1445 (uniquify_nodes): Remove.
1446 (lto_fixup_prevailing_type): New function.
1447 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1448 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1449 (num_merged_types, num_prevailing_types, num_not_merged_types,
1450 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1451 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1452 num_scc_compare_collisions): New global counters.
1453 (compare_tree_sccs_1): New function.
1454 (compare_tree_sccs): Likewise.
1455 (unify_scc): Likewise.
1456 (lto_read_decls): Stream in tree SCCs and unify them on the
1457 way in. Finalize prevailing SCC tree members.
1458 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1459 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1460 to ggc-collect during merging.
1461 (print_lto_report_1): Adjust for new merging code.
1463 2013-06-12 Jan Hubicka <jh@suse.cz>
1465 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1467 2013-06-12 Jan Hubicka <jh@suse.cz>
1469 * lto.c (register_resolution): Take lto_file_data argument.
1470 (lto_register_var_decl_in_symtab,
1471 lto_register_function_decl_in_symtab): Update.
1472 (read_cgraph_and_symbols): Update resolution_map handling.
1474 2013-06-11 Jan Hubicka <jh@suse.cz>
1476 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1477 (add_symbol_to_partition_1): Likewise.
1478 (contained_in_symbol): Likewise.
1479 (lto_balanced_map): Likewise.
1480 (rename_statics): Drop weakref.
1482 2013-06-05 Richard Biener <rguenther@suse.de>
1484 * lto.c (num_merged_types): New global variable.
1485 (uniquify_nodes): Increase num_merged_types when merging a type.
1486 (print_lto_report_1): Output the number of merged types.
1488 2013-06-01 Jan Hubicka <jh@suse.cz>
1490 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1491 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1492 (do_whole_program_analysis): Update dumping.
1494 2013-05-29 Jan Hubicka <jh@suse.cz>
1496 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1498 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1500 2013-05-15 Jan Hubicka <jh@suse.cz>
1502 * lto-partition.c (privatize_symbol_name): Return true when
1503 privatizing happened.
1504 (rename_statics): Do not go into infinite loop when privatizing
1507 2013-05-16 Jason Merrill <jason@redhat.com>
1509 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1511 2013-05-15 Martin Jambor <mjambor@suse.cz>
1513 * lto-partition.c (lto_balanced_map): Print symbol order instead
1516 2013-05-15 Jan Hubicka <jh@suse.cz>
1520 * lto-partition.c (get_symbol_class): Fix weakrefs.
1521 (lto_balanced_map): Fix weakrefs.
1522 (privatize_symbol_name): Remove unnecesary label.
1523 (rename_statics): Handle weakrefs as statics.
1525 2013-05-09 Jan Hubicka <jh@suse.cz>
1526 Richard Biener <rguenther@suse.de>
1528 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1529 (lto_register_var_decl_in_symtab): Likewise.
1530 (lto_main): Promote statics.
1531 * lto-partition.c (privatize_symbol_name): New function.
1532 (promote_symbol): Use it.
1533 (may_need_named_section_p): New predicate.
1534 (rename_statics): New functions.
1535 (lto_promote_cross_file_statics): Simplify; do renaming.
1536 (lto_promote_statics_nonwpa): New function.
1537 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1539 2013-02-08 Richard Biener <rguenther@suse.de>
1542 * lto-lang.c (lto_init): Do not enter a dummy file.
1544 2013-02-07 Uros Bizjak <ubizjak@gmail.com>
1547 * lto.c (lto_resolution_ready): Use %wx instead of
1548 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1550 2013-02-04 Richard Guenther <rguenther@suse.de>
1553 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1554 or lto_fixup_decls at LTRANS time.
1556 2013-01-09 Jan Hubicka <jh@suse.cz>
1559 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1561 2012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1564 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1566 (lto_main): Record the global variables if WPA isn't enabled.
1568 2012-11-20 Diego Novillo <dnovillo@google.com>
1569 Jakub Jelinek <jakub@redhat.com>
1571 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1573 2012-11-16 Diego Novillo <dnovillo@google.com>
1575 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1577 * lto-lang.c: Use new vec API in vec.h.
1578 * lto-partition.c: Likewise.
1579 * lto-partition.h: Likewise.
1582 2012-10-31 Lawrence Crowl <crowl@google.com>
1584 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1585 down-cast via dyn_cast.
1586 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1587 (undo_partition): Likewise.
1588 (lto_balanced_map): Likewise.
1589 (get_symbol_class): Likewise and via is_a.
1590 (lto_balanced_map): Change symtab checking to is_a.
1592 2012-10-12 Richard Biener <rguenther@suse.de>
1595 * lto.c (gimple_types_compatible_p_1): Also compare
1597 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1599 2012-10-09 Tobias Burnus <burnus@net-b.de>
1601 * lto-lang.c (lto_register_builtin_type): Avoid useless
1603 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1605 2012-10-08 Tobias Burnus <burnus@net-b.de>
1607 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1608 Free lto_file struct after closing the file.
1610 2012-10-08 Jan Hubicka <jh@suse.cz>
1612 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1613 (fixup_integer_cst): New functoin.
1614 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1616 2012-10-07 Jan Hubicka <jh@suse.cz>
1618 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1619 release input encoders.
1620 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1622 2012-10-06 Jan Hubicka <jh@suse.cz>
1625 * lto.c (resolution_map): New static var.
1626 (register_resolution): New function.
1627 (lto_register_var_decl_in_symtab): Use it.
1628 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1630 2012-09-20 Martin Jambor <mjambor@suse.cz>
1632 * lto.c (lto_materialize_function): Call push_struct_function and
1635 2012-09-19 Dehao Chen <dehao@google.com>
1637 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1639 2012-09-19 Jan Hubicka <jh@suse.cz>
1641 * lto.c (lto_materialize_function): Update confused comment.
1642 (read_cgraph_and_symbols): Do not free symtab.
1644 2012-09-12 Jan Hubicka <jh@suse.cz>
1646 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1647 AUX pointer cleaning. Add max partitioning.
1648 * lto-partition.c (enum symbol_class): New.
1649 (get_symbol_class): New function.
1650 (symbol_partitioned_p): New function.
1651 (add_references_to_partition): Remove.
1652 (add_aliases_to_partition): Remove.
1653 (add_cgraph_node_to_partition_1): Remove.
1654 (add_cgraph_node_to_partition): Remove.
1655 (add_symbol_to_partition): New function.
1656 (add_symbol_to_partition_1): New function.
1657 (contained_in_symbol): New function.
1658 (partition_cgraph_node_p): Remove.
1659 (partition_varpool_node_p): Remove.
1660 (partition_symbol_p): Remove.
1661 (lto_1_to_1_map): Cleanup.
1663 (lto_balanced_map): Update.
1664 (lto_promote_cross_file_statics): Update.
1665 * lto-partition.h (lto_max_map): Declare.
1666 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1668 2012-09-11 Jan Hubicka <jh@suse.cz>
1671 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1672 type is variant leader.
1674 2012-09-11 Richard Guenther <rguenther@suse.de>
1676 * lto.c (enum gtc_mode): Remove.
1677 (struct type_pair_d): Adjust.
1678 (lookup_type_pair): Likewise.
1679 (gimple_type_leader): Do not mark as deletable.
1680 (gimple_lookup_type_leader): Adjust.
1681 (gtc_visit): Likewise.
1682 (gimple_types_compatible_p_1): Likewise.
1683 (gimple_types_compatible_p): Likewise.
1684 (gimple_type_hash): Likewise.
1685 (gimple_register_type): Likewise.
1686 (read_cgraph_and_symbols): Manage lifetime of tables
1689 2012-09-11 Richard Guenther <rguenther@suse.de>
1691 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1692 struct type_pair_d, lookup_type_pair, struct sccs,
1693 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1694 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1695 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1696 visit, iterative_hash_name, struct type_hash_pair,
1697 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1698 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1699 Move here from gimple.c
1700 (read_cgraph_and_symbols): Free hash tables here.
1701 (print_lto_report_1): New function wrapping print_lto_report.
1702 (do_whole_program_analysis): Call it.
1703 (lto_main): Likewise.
1705 2012-09-10 Jan Hubicka <jh@suse.cz>
1707 * lto-partition.c (partition_symbol_p): Forward declare.
1708 (add_references_to_partition): Reimplement using partition_symbol_p.
1709 (add_aliases_to_partition): Break out from add_references_to_partition;
1710 reimplement using partition_symbol_p.
1711 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1713 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1714 (partition_varpool_node_p): Do not special case aliases.
1716 2012-08-12 Jan Hubicka <jh@suse.cz>
1718 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1719 it is deleted after streaming.
1720 * lto-partition.c (partition_symbol_p): New function.
1721 (promote_var, promote_fn): Remove.
1722 (promote_symbol): New function.
1723 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1724 to lookup the actual boundaries instead of computing them ad-hoc.
1726 2012-08-12 Jan Hubicka <jh@suse.cz>
1728 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1730 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1732 * lto-partition.c (new_partition): Update.
1733 * lto.c (cmp_partitions_order): Update.
1734 (lto_wpa_write_files): Update.
1735 (free_ltrans_partitions): Update.
1736 (add_references_to_partition): Update.
1737 (add_cgraph_node_to_partition_1): Update.
1738 (add_cgraph_node_to_partition): Update.
1739 (add_varpool_node_to_partition): Update.
1740 (undo_partition): Update.
1741 (lto_balanced_map): Update.
1742 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1743 set_referenced_from_this_partition_p): Update.
1744 (lto_promote_cross_file_statics): Update.
1746 2012-08-12 Jan Hubicka <jh@suse.cz>
1748 * lto-partition.c (set_referenced_from_other_partition_p,
1749 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1751 (lto_promote_cross_file_statics): Use them.
1753 2012-07-24 Jan Hubicka <jh@suse.cz>
1755 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1757 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1759 * lto-tree.h (lang_decl): Add variable_size GTY option.
1761 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1763 * lto.c: Do not include timevar.h.
1764 * Make-lang.in: Fix dependencies.
1766 2012-06-18 Lawrence Crowl <crowl@google.com>
1768 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1769 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1770 to lto_wpa_write_files.
1771 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1772 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1773 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1774 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1775 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1776 to be a front end, but is not one.
1778 2012-05-18 Jan Hubicka <jh@suse.cz>
1780 * lto.c (lto_materialize_constructors_and_inits): Remove.
1781 (read_cgraph_and_symbols): Remove handling of alias pairs.
1783 2012-05-17 Jan Hubicka <jh@suse.cz>
1785 * lto-partition.c (add_references_to_partition): Handle external vars.
1786 (partition_varpool_node_p): Likewise.
1787 (lto_promote_cross_file_statics): Do not promote externals.
1789 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1791 * lto-lang.c (handle_fnspec_attribute): New static function.
1792 (lto_attribute_table): Add "fn spec".
1793 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1795 2012-05-04 Jan Hubicka <jh@suse.cz>
1797 * lto.c (do_whole_program_analysis): Set timevars correctly.
1798 (lto_main): Likewise.
1800 2012-05-04 Richard Guenther <rguenther@suse.de>
1802 * lang.opt (fwpa): Do not mark as Optimization.
1803 (fltrans): Likewise.
1805 2012-04-30 Jan Hubicka <jh@suse.cz>
1807 * lto.c (lto_main): Use compile ().
1808 * lto-partition.c (partition_cgraph_node_p): Use
1809 symtab_used_from_object_file_p.
1810 (partition_varpool_node_p): Likewise.
1812 2012-04-20 Jan Hubicka <jh@suse.cz>
1814 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1816 2012-04-18 Jan Hubicka <jh@suse.cz>
1818 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1819 Update for new ipa-ref API.
1821 2012-04-16 Jan Hubicka <jh@suse.cz>
1823 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1824 walkers to walk cgraph and varpool.
1825 (materialize_cgraph): Likewise.
1826 * lto-partition.c (lto_1_to_1_map): Likewise.
1827 (lto_balanced_map): Likewise.
1828 (lto_promote_cross_file_statics): Likewise.
1830 2012-04-14 Jan Hubicka <jh@suse.cz>
1832 * lto.c: Update field referenced for new cgraph/varpool layout.
1833 * lto-partition.c: Likewise.
1835 2012-04-11 Jan Hubicka <jh@suse.cz>
1837 * lto.c: Update copyright; remove params.h, ipa-inline.h
1838 and ipa-utils.h inlines; inline lto-partition.h
1839 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1840 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1841 add_references_to_partition, add_cgraph_node_to_partition_1,
1842 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1843 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1844 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1845 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1846 * lto-partition.c: ... here; new file.
1847 * lto-partition.h: New file.
1848 * Make-lang.in (lto.o): Update dependencies.
1849 (lto-partition.o): New.
1851 2012-04-05 Richard Guenther <rguenther@suse.de>
1853 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1856 2012-03-12 Richard Guenther <rguenther@suse.de>
1858 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1860 2012-03-06 Richard Guenther <rguenther@suse.de>
1863 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1865 2012-02-28 Richard Guenther <rguenther@suse.de>
1868 * lto.c (lto_register_function_decl_in_symtab): Do not register
1869 a reverse renamed decl mapping.
1871 2012-01-06 Jakub Jelinek <jakub@redhat.com>
1874 * lto-lang.c (handle_returns_twice_attribute): New function.
1875 (lto_attribute_table): Add returns_twice attribute.
1877 2011-12-21 Richard Guenther <rguenther@suse.de>
1879 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1880 (LTO_FIXUP_TREE): Use it.
1881 (uniquify_nodes): Mark new non-prevailing types and avoid
1882 calling gimple_register_type on others.
1883 (lto_read_decls): Add comment.
1885 2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1887 * lto.h (lto_parse_hex): Delete.
1888 * lto.c (lto_read_decls): Use 'int' for offsets.
1889 (lto_parse_hex): Make static and return proper 64-bit host type.
1890 (lto_resolution_read): Use proper 64-bit host type.
1892 2011-12-13 Richard Guenther <rguenther@suse.de>
1895 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1896 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1898 2011-12-01 Uros Bizjak <ubizjak@gmail.com>
1900 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1901 (ignore_attribute): New.
1903 2011-11-21 Aldy Hernandez <aldyh@redhat.com>
1905 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1906 (handle_transaction_pure_attribute): New.
1908 2011-11-03 Richard Guenther <rguenther@suse.de>
1911 * lto-lang.c (lto_post_options): Do not read file options.
1912 * lto.c (lto_read_all_file_options): Remove.
1913 (lto_init): Call lto_set_in_hooks here.
1915 2011-10-09 Jan Hubicka <jh@suse.cz>
1917 * lto.c (node_cmp, varpool_node_cmp): New functions.
1918 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1919 (cmp_partitions): Rename to ...
1920 (cmp_partitions_size): ... this one.
1921 (cmp_partitions_order): New function.
1922 (lto_wpa_write_files): Sort partitions by order when
1923 -fno-toplevel-reorder is used.
1925 2011-10-09 Andi Kleen <ak@linux.intel.com>
1927 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1929 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1931 * lto-lang.c (def_builtin_1): Delete old interface with two
1932 parallel arrays to hold standard builtin declarations, and replace
1933 it with a function based interface that can support creating
1934 builtins on the fly in the future. Change all uses, and poison
1935 the old names. Make sure 0 is not a legitimate builtin index.
1937 2011-10-02 Andi Kleen <ak@linux.intel.com>
1939 * lto-object.c (lto_obj_add_section_data): Add list.
1940 (lto_obj_add_section): Fill in list.
1941 (ltoobj_build_section_table): Pass through list.
1942 * lto.c (file_data_list): Declare.
1943 (create_subid_section_table): Pass arguments directly.
1944 Fill in list of file_datas.
1946 (lto_create_files_from_ids): Pass in direct arguments.
1947 Don't maintain list.
1948 (lto_file_read): Use explicit section and file data lists.
1949 (lto_read_all_file_options): Pass in section_list.
1950 * lto.h (lto_obj_build_section_table): Add list.
1951 (lto_section_slot): Add next.
1952 (lto_section_list): Declare.
1954 2011-10-02 Jan Hubicka <jh@suse.cz>
1957 * common.c (lto_resolution_str): Add new resolution.
1958 * common.h (lto_resolution_str): Likewise.
1960 2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1961 Andi Kleen <ak@linux.intel.com>
1964 * lto.c (lto_splay_tree_delete_id): New.
1965 (lto_splay_tree_compare_ids): Likewise.
1966 (lto_splay_tree_lookup): Likewise.
1967 (lto_splay_tree_id_equal_p): Likewise.
1968 (lto_splay_tree_insert): Likewise.
1969 (lto_splay_tree_new): Likewise.
1970 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1971 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1972 (create_subid_section_table): Use lto_splay_tree_lookup and
1973 lto_splay_tree_insert.
1974 (lto_file_read): Use lto_splay_tree_new.
1976 2011-09-26 Andi Kleen <ak@linux.intel.com>
1978 * lto.c (lto_resolution_read): Remove id dumping.
1979 (lto_section_with_id): Turn id HOST_WIDE_ID.
1980 (create_subid_section_table): Dito.
1982 2011-08-28 Dodji Seketeli <dodji@redhat.com>
1984 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1987 2011-08-11 Martin Jambor <mjambor@suse.cz>
1989 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1991 2011-08-08 Diego Novillo <dnovillo@google.com>
1993 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1994 * lto.c: Include tree-streamer.h.
1996 2011-07-06 Richard Guenther <rguenther@suse.de>
1998 * lto-lang.c (lto_init):
1999 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2001 2011-06-11 Jan Hubicka <jh@suse.cz>
2004 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2005 (lto_balanced_map): Likewise.
2007 2011-06-11 Jan Hubicka <jh@suse.cz>
2009 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2010 (add_cgraph_node_to_partition) ... here; walk aliases.
2011 (lto_1_to_1_map): Remove same body alias code.
2012 (promote_fn): Likewise.
2013 (lto_promote_cross_file_statics): Update comment.
2016 2011-06-07 Diego Novillo <dnovillo@google.com>
2018 * lto.c (uniquify_nodes): Move code to register decls to
2019 the loop that computes canonical types.
2021 2011-06-07 Richard Guenther <rguenther@suse.de>
2023 * lto-lang.c (lto_init): Do not set
2024 size_type_node or call set_sizetype.
2026 2011-06-04 Diego Novillo <dnovillo@google.com>
2028 * lto.c (lto_init): New.
2029 (lto_main): Call it.
2031 2011-06-03 Diego Novillo <dnovillo@google.com>
2033 * lto.c (get_resolution): Move from lto-streamer-in.c.
2034 (lto_register_var_decl_in_symtab): Likewise.
2035 (lto_register_function_decl_in_symtab): Likewise.
2036 (uniquify_nodes): Call lto_register_var_decl and
2037 lto_register_function_decl_in_symtab after reading a new
2038 VAR_DECL or FUNCTION_DECL.
2040 2011-06-01 Richard Guenther <rguenther@suse.de>
2042 * lto-lang.c (lto_register_canonical_types): New function.
2043 (lto_init): Register common nodes with the canonical type machinery.
2044 Do not play tricks with char_type_node.
2046 2011-05-26 Richard Guenther <rguenther@suse.de>
2048 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2050 2011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2052 * lto.c (lto_ft_typed): New function.
2053 (lto_ft_common): Call it.
2054 (lto_ft_constructor): Likewise.
2055 (lto_ft_expr): Likewise.
2056 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2059 2011-05-20 Richard Guenther <rguenther@suse.de>
2061 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2062 (lto_ft_type): Move main-variant and pointer-to chain building ...
2063 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2064 in a separate final loop.
2066 2011-05-19 Richard Guenther <rguenther@suse.de>
2068 * lto.c (uniquify_nodes): First register all types before
2069 fixing up the tree SCC.
2071 2011-05-11 Jan Hubicka <jh@suse.cz>
2074 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2076 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2078 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2079 location of binfo field.
2080 (lto_fixup_prevailing_decls): Likewise.
2082 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2084 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2085 build_function_type_array or build_varargs_function_type_array
2088 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2090 * lto-lang.c (global_bindings_p): Return bool.
2092 2011-05-07 Jan Hubicka <jh@suse.cz>
2094 * lto.c (lto_materialize_function): Use
2095 cgraph_function_with_gimple_body_p.
2096 (add_cgraph_node_to_partition): Do not re-add items to partition;
2098 (add_varpool_node_to_partition): Do not re-add items to partition.
2100 2011-05-03 Jan Hubicka <jh@suse.cz>
2102 * lto.c (free_ltrans_partitions): Fix accidental commit.
2104 2011-05-03 Jan Hubicka <jh@suse.cz>
2106 * lto.c (ltrans_partition_def): Remove GTY annotations.
2107 (ltrans_partitions): Move to heap.
2108 (new_partition): Update.
2109 (free_ltrans_partitions): New function.
2110 (lto_wpa_write_files): Use it.
2112 2011-04-29 Martin Jambor <mjambor@suse.cz>
2114 * lto.c: Include ipa-utils.h.
2115 (lto_balanced_map): Update call to ipa_reverse_postorder.
2116 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2118 2011-04-29 Michael Matz <matz@suse.de>
2120 * lto.c (toplevel): Include tree-flow.h.
2121 (lto_read_in_decl_state): Don't merge types here.
2122 (tree_with_vars): New static hash table.
2123 (remember_with_vars): New static functions.
2124 (LTO_FIXUP_TYPE): New macro.
2125 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2126 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2127 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2128 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2129 (lto_read_decls): Uniquify while reading in trees.
2130 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2131 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2132 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2133 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2134 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2135 lto_fixup_tree): Remove.
2136 (lto_fixup_state): Remove data argument. Use
2137 lto_symtab_prevailing_decl.
2138 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2139 (lto_fixup_prevailing_decls): New function.
2140 (lto_fixup_state_aux): Argument aux is unused.
2141 (lto_fixup_decls): Don't allocate pointer sets, don't use
2142 lto_fixup_tree, use lto_fixup_prevailing_decls.
2143 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2144 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2146 2011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2148 * lto.c (lto_balanced_map): Fix typos in head comment.
2149 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2152 2011-04-16 Jan Hubicka <jh@suse.cz>
2154 * lto.c (lto_balanced_map): Update.
2156 2011-04-14 Jan Hubicka <jh@suse.cz>
2158 * lto.c: Include ipa-inline.h
2159 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2161 (ipa_node_duplication_hook): Fix declaration.
2162 * Make-lang.in (lto.o): Update dependencies.
2164 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2166 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2168 * lto.c (lto_fixup_common): Likewise.
2170 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2172 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2173 (handle_type_generic_attribute): Likewise.
2175 2011-04-03 Michael Matz <matz@suse.de>
2177 * lto.c (lto_materialize_function): Don't read and then discard
2178 sections in WPA mode.
2179 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2181 * lto-lang.c (registered_builtin_fndecls): Remove.
2182 (lto_getdecls): Return NULL_TREE.
2183 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2185 2011-03-31 Richard Guenther <rguenther@suse.de>
2188 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2189 partitions when checking is not enabled.
2191 2011-03-25 Kai Tietz <ktietz@redhat.com>
2193 * lto.c (lto_resolution_read): Use filename_cmp instead
2195 (lto_read_section_data): Likewise.
2197 2011-03-25 Jeff Law <law@redhat.com>
2199 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2201 2011-03-21 Kai Tietz <ktietz@redhat.com>
2204 * lto-lang.c (lto_attribute_table): Adjust table.
2206 2011-02-18 Jakub Jelinek <jakub@redhat.com>
2209 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2212 2011-02-18 Richard Guenther <rguenther@suse.de>
2215 * lto-tree.h (lto_global_var_decls): Do not declare here.
2216 * lto-lang.c: Include lto-streamer.h.
2217 * Make-lang.in (lto-lang.o): Adjust dependencies.
2219 2011-02-10 Kai Tietz <kai.tietz@onevision.com>
2222 * lto.c (lto_read_section_data): Free
2223 fd_name in failure case.
2224 For mingw targets don't hash file-descriptor.
2225 (read_cgraph_and_symbols): Close current_lto_file
2228 2011-01-11 Jan Hubicka <jh@suse.cz>
2232 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2233 are not partitioned.
2235 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2237 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2240 2010-12-06 Richard Guenther <rguenther@suse.de>
2243 * lto-lang.c (lto_init): Give names to basic types.
2245 2010-11-30 Joseph Myers <joseph@codesourcery.com>
2247 * lto-object.c: Don't include toplev.h.
2248 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2250 2010-11-30 Joseph Myers <joseph@codesourcery.com>
2252 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2255 2010-11-29 Joseph Myers <joseph@codesourcery.com>
2257 * lto-endian.h: Delete.
2258 * lto-object.c: Don't include "libiberty.h".
2259 (O_BINARY): Don't define.
2260 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2261 (O_BINARY): Don't define.
2263 2010-11-23 Richard Guenther <rguenther@suse.de>
2265 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2267 2010-11-23 Richard Guenther <rguenther@suse.de>
2270 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2272 2010-11-17 Joseph Myers <joseph@codesourcery.com>
2274 * lto.c (lto_main): Take no arguments.
2275 * lto.h (lto_main): Update prototype.
2277 2010-11-16 Ian Lance Taylor <iant@google.com>
2279 * lto-object.c (lto_obj_file_open): Call
2280 simple_object_attributes_merge rather than
2281 simple_object_attributes_compare.
2283 2010-11-12 Joseph Myers <joseph@codesourcery.com>
2285 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2286 * lto-lang.c (lto_handle_option): Take location_t parameter.
2288 2010-11-10 Joseph Myers <joseph@codesourcery.com>
2290 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2291 letters and remove trailing '.'.
2292 (lto_file_finalize): Start diagnostic with a lowercase letter.
2294 2010-11-02 Ian Lance Taylor <iant@google.com>
2296 * lto-object.c: New file.
2297 * lto-elf.c: Remove file.
2298 * lto-macho.c: Remove file.
2299 * lto-macho.h: Remove file.
2300 * lto-coff.c: Remove file.
2301 * lto-coff.h: Remove file.
2302 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2304 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2305 (lto/lto-objfile.o): New target.
2306 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2307 (lto/lto.o): Remove $(LIBIBERTY_H).
2309 2010-10-22 Jan Hubicka <jh@suse.cz>
2311 * lto.c (add_cgraph_node_to_partition,
2312 add_varpool_node_to_partition): Add debug info.
2313 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2315 (do_whole_program_analysis): Set function flags before dumping.
2317 2010-10-22 Richard Guenther <rguenther@suse.de>
2319 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2320 the new gimple_register_canonical_type.
2322 2010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2325 * config-lang.in (boot_language): Set to $enable_lto.
2327 2010-10-18 Jakub Jelinek <jakub@redhat.com>
2330 * Make-lang.in (check-lto): New dummy target.
2332 2010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2334 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2336 2010-10-08 Joseph Myers <joseph@codesourcery.com>
2338 * lto-lang.c (lto_init_options): Change to
2339 lto_init_options_struct. Update parameters.
2340 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2341 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2343 2010-10-06 Jan Hubicka <jh@suse.cz>
2345 * lto.c (lto_balanced_map): Fix accounting of program size.
2347 2010-10-06 Jan Hubicka <jh@suse.cz>
2349 * lto.c (lto_balanced_map): Do not produce empty partitions.
2351 2010-10-06 Andi Kleen <ak@linux.intel.com>
2353 * lto.c (lto_process_name): Add.
2354 (lto_main): Call lto_process_name.
2356 2010-10-06 Jan Hubicka <jh@suse.cz>
2358 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2359 COMDATs required by the linker.
2361 2010-10-05 Ian Lance Taylor <iant@google.com>
2363 * lto.c (lto_section_with_id): Make s a const pointer.
2365 2010-10-05 Jan Hubicka <jh@suse.cz>
2367 * lto.c: Include params.h.
2368 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2369 refcounting in aux field.
2370 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2372 (lto_1_to_1_map): Simplify.
2373 (lto_balanced_map): New function.
2374 (do_whole_program_analysis): Chose proper partitioning alg.
2375 * Make-lang.in (lto.o): Add dependency on params.h
2377 2010-10-04 Andi Kleen <ak@linux.intel.com>
2379 * Make-lang.in (lto1): Add + to build rule.
2381 2010-10-03 Andi Kleen <ak@linux.intel.com>
2383 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2386 2010-09-28 Jan Hubicka <jh@suse.cz>
2388 * lto-lang.c (handle_leaf_attribute): New function.
2389 (lto_attribute_tables): Add leaf.
2391 2010-09-25 Jie Zhang <jie@codesourcery.com>
2393 * lto.c (lto_read_all_file_options): Start a new line after
2394 printing out file names.
2396 2010-09-24 Jan Hubicka <jh@suse.cz>
2398 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2400 2010-09-20 Jan Hubicka <jh@suse.cz>
2402 PR tree-optimize/45605
2403 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2405 2010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2407 * lto-elf.c (lto_obj_file_open): Also provide filename when
2410 2010-09-17 Jan Hubicka <jh@suse.cz>
2412 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2414 2010-09-17 Richard Guenther <rguenther@suse.de>
2416 * lang.opt (flag_wpa): Also enable for the driver.
2418 2010-09-16 Jan Hubicka <jh@suse.cz>
2420 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2423 2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2425 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2427 2010-09-08 Jan Hubicka <jh@suse.cz>
2429 * lto.c (real_file_count, real_file_decl_data): New static vars.
2430 (read_cgraph_and_symbols): Use it.
2432 2010-09-08 Richard Guenther <rguenther@suse.de>
2434 * lto.c (read_cgraph_and_symbols): Collect again after each
2437 2010-09-07 Jan Hubicka <jh@suse.cz>
2439 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2441 2010-09-03 Richard Guenther <rguenther@suse.de>
2443 * lto-elf.c (validate_file): Always error if validation fails.
2445 2010-08-20 Jan Hubicka <jh@suse.cz>
2447 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2448 (lto_wpa_write_files): Update comments.
2450 2010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2453 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2454 with has_analyzed_clone_p.
2456 2010-08-20 Jan Hubicka <jh@suse.cz>
2458 * lto.c (has_analyzed_clone_p): New function
2459 (lto_materialize_function): Use callgraph to determine if
2461 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2463 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2465 * lto.c: Use FOR_EACH_VEC_ELT.
2467 2010-07-27 Andi Kleen <ak@linux.intel.com>
2469 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2471 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2473 * lto-lang.c (lto_handle_option): Update prototype and return
2474 value type. Remove duplicate assignment to result.
2476 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2478 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2480 (lto_init_options): Update prototype.
2481 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2484 2010-07-10 Andi Kleen <ak@linux.intel.com>
2487 * lto.c: Include splay-tree.h
2488 (lto_resolution_read): Change to walk file_ids tree and parse
2489 extra file_id in resolution file.
2490 (lto_section_with_id): Add.
2491 (create_subid_section_table): Add.
2493 (lto_create_files_from_ids): Add.
2494 (lto_file_read): Change to handle sub file ids and create list
2495 of file_datas. Add output argument for count.
2496 (get_section_data): Pass file_data to lto_get_section_name.
2497 (lto_flatten_file): Add.
2498 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2500 2010-07-10 Andi Kleen <ak@linux.intel.com>
2502 * lto-coff.c (hash_name, eq_name): Move.
2503 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2504 * lto-elf.c: (hash_name, eq_name): Move.
2505 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2506 * lto-macho.c: (hash_name, eq_name): Move.
2507 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2508 * lto.c: (hash_name, eq_name): Move from lto-*.c
2509 (lto_obj_create_section_hash_table): Add.
2510 (free_with_string): Add.
2512 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2514 * lto-coff.c: Include diagnostic-core.h in every file that
2516 * lto-elf.c: Likewise.
2517 * lto-lang.c: Likewise.
2518 * lto-macho.c: Likewise.
2520 2010-07-07 Jakub Jelinek <jakub@redhat.com>
2522 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2523 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2526 2010-07-05 Jan Hubicka <jh@suse.cz>
2528 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2529 nodes from same comdat group as well as all comdat functions referenced
2531 (add_varpool_node_to_partition, add_references_to_partition): New
2533 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2534 add_varpool_node_to_partition; clear aux flags when done.
2535 (lto_promote_cross_file_statics): Do not promote stuff that gets
2536 duplicated to each ltrans.
2538 2010-07-04 Jan Hubicka <jh@suse.cz>
2540 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2542 2010-06-13 Richard Guenther <rguenther@suse.de>
2544 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2546 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
2548 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2549 * lto-coff.c (coff_write_object_file): Add braces to if.
2551 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2553 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2554 (lto_file_read): Likewise.
2555 (new_partition): Likewise.
2556 (read_cgraph_and_symbols): Likewise.
2558 2010-06-07 Joseph Myers <joseph@codesourcery.com>
2560 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2561 (lto_handle_option): Don't set flag_signed_char here.
2563 2010-06-04 Richard Guenther <rguenther@suse.de>
2566 * lto.c (lto_1_to_1_map): Use the proper file_data for
2569 2010-05-30 Jan Hubicka <jh@suse.cz>
2571 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2572 partitioning decisions.
2574 2010-05-29 Jan Hubicka <jh@suse.cz>
2576 * lto.c (bitmap vector): Remove.
2577 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2578 (ltrans_partition_def): New structure.
2579 (ltrans_partition): New type and VECtor.
2580 (new_partition): New function.
2581 (add_cgraph_node_to_partition): New function.
2582 (lto_1_to_1_map): Reorganize for partitions.
2583 (lto_add_inline_clones): Remove.
2584 (lto_add_all_inlinees): Remove.
2585 (lto_promote_cross_file_statics): Use partitions.
2586 (cmp_partitions): New function.
2587 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2588 use partitions; output files sorted by size.
2590 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2592 * Make-lang.in: Replace vec.h dependency with VEC_H.
2594 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2596 * lto-coff.c (coff_errmsg): Remove.
2597 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2598 errors instead of coff_errmsg (-1).
2599 * lto-macho.c (mach_o_errmsg): Remove.
2600 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2601 instead of mach_o_errmsg (-1).
2602 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2605 2010-05-28 Richard Guenther <rguenther@suse.de>
2607 * lto.c (prefix_name_with_star): Removed.
2608 (strip_extension): Likewise.
2609 (get_filename_for_set): Likewise.
2610 (lto_write_ltrans_list): Fold into ...
2611 (lto_wpa_write_files): ... this. Name LTRANS units
2612 by suffixing the ltrans output list filename.
2613 (do_whole_program_analysis): Adjust.
2615 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2617 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2618 (read_cgraph_and_symbols, lto_main): Use seen_error.
2619 * Make-lang.in (lto/lto.o): Update dependencies.
2621 2010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2624 * lto.h (lto_eh_personality): New prototype.
2625 * lto.c: Include debug.h.
2626 (first_personality_decl): New static variable.
2627 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2628 first function for which it is non-null.
2629 (lto_eh_personality_decl): New static variable.
2630 (lto_eh_personality): New function.
2631 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2632 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2634 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2636 * lto-lang.c: Do not include expr.h.
2638 2010-05-24 Richard Guenther <rguenther@suse.de>
2640 * lto-elf.c (lto_obj_build_section_table): Work around
2641 FreeBSD libelf issue.
2643 2010-05-22 Richard Guenther <rguenther@suse.de>
2645 * lto.c (read_cgraph_and_symbols): Do not collect.
2647 2010-05-20 Jan Hubicka <jh@suse.cz>
2649 * lto.c (promote_var, promote_fn): New functions.
2650 (lto_promote_cross_file_statics): Compute correctly boundary including
2651 static initializers of readonly vars.
2653 2010-05-18 Jan Hubicka <jh@suse.cz>
2655 * lto.c (lto_1_to_1_map): Partition non-inline clones.
2656 (lto_promote_cross_file_statics): Deal with non-inline clones.
2658 2010-05-18 Jan Hubicka <jh@suse.cz>
2660 * lto.c (lto_materialize_function): Announce function when
2661 reading body; allocate_struct_function only when reading body;
2662 do not finalize local statics; ggc_collect after reading;
2663 do not mark reachable node.
2664 (materialize_cgraph): Do not announce function.
2666 2010-05-11 Jan Hubicka <jh@suse.cz>
2668 * lto.c (materialize_cgraph): Revert my previous patch.
2670 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
2672 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2673 IMAGE_FILE_MACHINE_AMD64.
2674 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2676 2010-05-11 Jan Hubicka <jh@suse.cz>
2678 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2679 (materialize_cgraph): Add it here.
2681 2010-05-11 Jan Hubicka <jh@suse.cz>
2683 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2686 2010-05-11 Jan Hubicka <jh@suse.cz>
2688 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2689 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2690 use reachable_from_other_partition_p and
2691 referenced_from_other_partition_p test.
2693 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
2695 * lto-coff.c (validate_file): Add x64-coff support.
2696 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2697 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2698 * lto-lang.c (lto_build_c_type_nodes): Add check for
2699 'long long unsigned int' for x64-windows.
2700 (lto_init): Likewise.
2703 2010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2705 * lto.h (struct lto_file_struct): Document offset member.
2706 * lto-endian.h: New file.
2707 * lto-macho.h: New file.
2708 * lto-macho.c: New file.
2709 * Make-lang.in: Add rule for lto-macho.o.
2711 2010-05-07 Richard Guenther <rguenther@suse.de>
2715 * lang.opt (fresolution): Change to ...
2716 (fresolution=): ... this.
2717 * lto-lang.c (lto_handle_option): Adjust.
2719 2010-05-07 Richard Guenther <rguenther@suse.de>
2721 * lto.c (DUMPBASE_SUFFIX): Remove.
2722 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2724 (lto_write_ltrans_list): ... only output the list of ltrans files.
2725 (lto_maybe_unlink): Remove.
2726 (do_whole_program_analysis): Do not execute LTRANS phase
2729 2010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2731 * lto-lang.c (lto_handle_option): Add argument kind.
2733 2010-05-05 Jan Hubicka <jh@suse.cz>
2735 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2738 2010-05-05 Jan Hubicka <jh@suse.cz>
2740 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2742 2010-04-30 Jan Hubicka <jh@suse.cz>
2744 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2746 (lto_wpa_write_files): Write any non-empty partition.
2748 2010-04-30 Jan Hubicka <jh@suse.cz>
2750 * lto.c: Do not attempt to make constant pool references global.
2752 2010-04-28 Jan Hubicka <jh@suse.cz>
2754 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2755 (lto_wpa_write_files): Announce what we are writting.
2756 (all_file_decl_data): New.
2757 (read_cgraph_and_symbols): Use GGC; correct timevars.
2758 (do_whole_program_analysis): Collect.
2759 * lto/Make-lang.in (lto.o): Fix dependency.
2760 * Makefile.in (GTFILES): Add lto-streamer.h.
2761 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2762 (varpool_assemble_pending_decls): Use VAROUT.
2763 * lto-streamer.h (lto_tree_ref_table): Annotate.
2764 (lto_in_decl_state): Annotate.
2765 (lto_file_decl_data): Annotate.
2767 2010-04-28 Jan Hubicka <jh@suse.cz>
2769 * lto.c (lto_varpool_node_sets): New.
2770 (lto_1_to_1_map): Partition varpool too.
2771 (globalize_context_t, globalize_cross_file_statics,
2772 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2773 lto_scan_statics_in_remaining_global_vars): Remove.
2774 (lto_promote_cross_file_statics): Rewrite.
2775 (get_filename_for_set): Take vset argument.
2776 (lto_wpa_write_files): Pass around vsets.
2778 2010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2781 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2782 hardcoding 'lto-elf.o'.
2783 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2785 * lto-coff.h: New file.
2786 * lto-coff.c: Likewise.
2788 2010-04-26 Richard Guenther <rguenther@suse.de>
2790 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2792 2010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2794 * lto.h (lto_elf_file_open): Rename prototype from this ...
2795 (lto_obj_file_open): ... to this.
2796 (lto_elf_file_close): Likewise ...
2797 (lto_obj_file_close): ... and likewise.
2798 (lto_elf_build_section_table): Likewise ...
2799 (lto_obj_build_section_table): ... and likewise.
2800 (lto_elf_begin_section): Likewise ...
2801 (lto_obj_begin_section): ... and likewise.
2802 (lto_elf_append_data): Likewise ...
2803 (lto_obj_append_data): ... and likewise.
2804 (lto_elf_end_section): Likewise ...
2805 (lto_obj_end_section): ... and likewise.
2806 * lto.c (lto_file_read): Update references to the above.
2807 (lto_wpa_write_files): Likewise.
2808 (lto_read_all_file_options): Likewise.
2809 (read_cgraph_and_symbols): Likewise.
2810 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2811 (LANG_HOOKS_APPEND_DATA): Likewise.
2812 (LANG_HOOKS_END_SECTION): Likewise.
2813 * lto-elf.c (lto_elf_file_open): Rename from this ...
2814 (lto_obj_file_open): ... to this, updating any references.
2815 (lto_elf_file_close): Likewise ...
2816 (lto_obj_file_close): ... and likewise.
2817 (lto_elf_build_section_table): Likewise ...
2818 (lto_obj_build_section_table): ... and likewise.
2819 (lto_elf_begin_section): Likewise ...
2820 (lto_obj_begin_section): ... and likewise.
2821 (lto_elf_append_data): Likewise ...
2822 (lto_obj_append_data): ... and likewise.
2823 (lto_elf_end_section): Likewise ...
2824 (lto_obj_end_section): ... and likewise.
2826 2010-04-21 Jan Hubicka <jh@suse.cz>
2828 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2829 (materialize_cgraph): Likewise.
2831 2010-04-21 Jan Hubicka <jh@suse.cz>
2833 * lto.c (lto_wpa_write_files): Update.
2834 (read_cgraph_and_symbols): Be more verbose.
2835 (materialize_cgraph): Likewise.
2836 (do_whole_program_analysis): Likewise.
2838 2010-04-21 Jan Hubicka <jh@suse.cz>
2840 * lto.c (globalize_cross_file_statics): When function has address taken,
2841 it needs to be public.
2843 2010-04-20 Jan Hubicka <jh@suse.cz>
2845 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2846 (lto_add_all_inlinees): Likewise.
2847 (lto_wpa_write_files): Likewise.
2849 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2851 * lto-lang.c (lto_init): Remove second argument in call to
2852 build_common_tree_nodes.
2854 2010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2856 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2859 2010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2862 * lto-elf.c: Define EM_* constants if not already defined.
2864 2010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2866 * lto-elf.c (is_compatible_architecture): New static function.
2867 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2869 2010-02-11 Richard Guenther <rguenther@suse.de>
2872 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2875 2010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2877 * lto.c (O_BINARY): Define.
2878 (lto_read_section_data): Open file in binary mode.
2879 * lto-elf.c (O_BINARY): Define.
2880 (lto_elf_file_open): Open file in binary mode.
2882 2010-01-08 Richard Guenther <rguenther@suse.de>
2885 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2886 (lto_init): Do not init char_type_node in a standard way
2887 but according to flag_signed_char.
2889 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2892 * lto.c (DUMPBASE_SUFFIX): New.
2893 (lto_execute_ltrans): Append a sequence number to -dumpbase
2896 2010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2899 * lto-elf.c (lto_elf_file_open): Stop if the command line
2900 option file is missing.
2902 2009-12-15 Richard Guenther <rguenther@suse.de>
2904 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2905 (lto_post_options): Do not disable debuginfo.
2907 2009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2909 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2911 2009-12-11 Richard Guenther <rguenther@suse.de>
2914 * lto.c (lto_resolution_read): Properly grow the vector.
2916 2009-12-11 Richard Guenther <rguenther@suse.de>
2919 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2920 to the C99 default. Do not set flag_unit_at_a_time.
2922 2009-11-28 Jakub Jelinek <jakub@redhat.com>
2924 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2927 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
2930 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2931 * lto.c (lto_parse_hex): New.
2932 (lto_resolution_read): Use lto_parse_hex.
2933 * lto.h (lto_parse_hex): New.
2935 2009-11-17 Rafael Avila de Espindola <espindola@google.com>
2937 * lto-elf.c (lto_file_init): Add offset argument.
2938 (lto_elf_file_open): Record the offset.
2939 * lto.c (lto_resolution_read): Change file_name into a lto_file
2940 argument. Check offsets.
2941 (lto_file_read): Update call to lto_resolution_read.
2942 * lto.h (lto_file_struct): Add the offset field.
2944 2009-11-16 Rafael Avila de Espindola <espindola@google.com>
2946 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2948 2009-11-14 Jan Hubicka <jh@suse.cz>
2950 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2952 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
2954 * lang.opt (fresolution): Renamed from resolution.
2955 * lto-lang.c (lto_handle_option): Handle new option name.
2956 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2958 2009-11-04 Richard Guenther <rguenther@suse.de>
2959 Rafael Avila de Espindola <espindola@google.com>
2961 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2962 (lto_elf_file_open): Handle offsets in arguments name@offest.
2964 2009-10-30 Richard Guenther <rguenther@suse.de>
2967 * lto.c (lto_file_read): Do not set file_data->fd.
2968 (lto_read_section_data): Use a single-entry file-descriptor cache.
2969 Do not check the result of xmalloc.
2970 (free_section_data): Do not use file_data->fd.
2971 (lto_read_all_file_options): Likewise.
2973 2009-10-22 Richard Guenther <rguenther@suse.de>
2975 * lto.c (lto_fixup_jump_functions): Remove.
2976 (lto_fixup_decls): Do not fixup jump functions.
2977 (read_cgraph_and_symbols): Schedule cgraph merging after
2978 summary reading. Schedule type and decl fixup before
2981 2009-10-22 Richard Guenther <rguenther@suse.de>
2983 * lto.c (lto_fixup_data_t): Remove free_list member.
2984 (lto_fixup_tree): Do not insert into free_list.
2985 (free_decl): Remove.
2986 (lto_fixup_decls): Remove free-list handling.
2988 2009-10-22 Jan Hubicka <jh@suse.cz>
2990 * lto.c (lto_fixup_jump_functions): New function.
2991 (lto_fixup_decls): Use it.
2993 2009-10-16 Richard Guenther <rguenther@suse.de>
2996 * lto.c (lto_fixup_tree): Revert last change.
2998 2009-10-14 Richard Guenther <rguenther@suse.de>
3000 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3001 compatible with the one we replace wrap it around a
3004 2009-10-09 Richard Guenther <rguenther@suse.de>
3008 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3010 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3011 (init_ehdr##BITS): Likewise.
3013 2009-10-08 Joseph Myers <joseph@codesourcery.com>
3015 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3016 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3018 * lto-lang.c (lto_post_options): Remove trailing "." from
3021 2009-10-08 Richard Guenther <rguenther@suse.de>
3023 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3026 2009-10-07 Joseph Myers <joseph@codesourcery.com>
3028 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3030 2009-10-07 Jan Hubicka <jh@suse.cz>
3032 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3033 ltrans stage; explain why this is needed and should not.
3035 2009-10-05 Richard Guenther <rguenther@suse.de>
3039 * lto.c (lto_read_decls): Do not register deferred decls.
3040 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3041 until after reading the IPA summaries.
3043 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
3045 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3046 (lto-lang.c): Don't include lto/common.h.
3048 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
3050 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3051 (lto/common.o): Remove.
3053 * common.h (lto_kind_str): Remove.
3054 (lto_visibility_str): Remove.
3055 (lto_resolution_str): Make it static.
3057 2009-10-01 Diego Novillo <dnovillo@google.com>
3059 * lto.c (lto_read_decls): Add comment.
3060 Call internal_error instead of gcc_assert.
3061 (lto_resolution_read): Likewise.
3062 (lto_add_all_inlinees): Tidy.
3063 * Make-lang.in: Fix copyright boilerplate.
3065 (lto.install-pdf): New.
3066 * lto-tree.h: Fix copyright boilerplate.
3067 * lang-specs.h: Likewise.
3068 Remove ".lto" entry from compilers fragment.
3069 * lto-elf.c: Move inclusion of gelf.h after config.h.
3070 Tidy formatting everywhere.
3071 * lto.h: Fix copyright boilerplate.
3072 Tidy formatting everywhere.
3073 * common.c: Likewise.
3074 * config-lang.in: Likewise.
3075 * common.h: Likewise.
3076 * lto-lang.c: Likewise.
3078 2009-10-01 Richard Guenther <rguenther@suse.de>
3080 * lto.c (lto_read_section_data): Use plain lseek/read.
3082 2009-10-01 Richard Guenther <rguenther@suse.de>
3084 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3085 use sysconf to query the system page size.
3086 (lto_file_read): Implement fallback using stdio.
3087 (free_section_data): Likewise.
3089 2009-09-29 Diego Novillo <dnovillo@google.com>
3091 * lto-lang.c (lto_init): Really fix call to
3092 build_common_builtin_nodes.
3094 2009-09-29 Diego Novillo <dnovillo@google.com>
3096 * lto-lang.c (lto_init): Fix call to
3097 build_common_builtin_nodes.
3099 2009-09-29 Richard Guenther <rguenther@suse.de>
3102 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3104 (first_data_block): New static variable.
3105 (lto_elf_append_data): Align the first data block in each
3108 2009-09-28 Diego Novillo <dnovillo@google.com>
3110 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3111 * lto.c (strip_extension): New.
3112 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3113 (lto_execute_ltrans): Tidy.
3114 Do not pass -fwpa nor -fltrans-* to LTRANS.
3115 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3116 * tree.c (need_assembler_name_p): Call
3117 lang_hooks.decls.may_need_assembler_name_p if set.
3118 * varasm.c (default_binds_local_p_1): Remove check for
3120 * varpool.c (decide_is_variable_needed): Do not test for
3123 2009-09-22 Richard Guenther <rguenther@suse.de>
3126 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3127 * Make-lang.in: Remove ltrans-driver stuff.
3128 * config-lang.in: Likewise.
3129 * lang.opt (fltrans-driver): Remove.
3130 * lto-lang.c (lto_init_options): Remove code initializing
3132 * ltrans-driver: Remove.
3134 2009-09-21 Diego Novillo <dnovillo@google.com>
3136 * lto-lang.c (lto_define_builtins): Remove superfluous
3137 calls to targetm.init_builtins and build_common_builtin_nodes.
3138 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3139 build_common_builtin_nodes.
3140 * lto.c (lto_materialize_function): Do nothing if NODE is a
3143 2009-09-03 Diego Novillo <dnovillo@google.com>
3145 * lto-elf.c (validate_file): Replace call to
3146 elf_getshstrndx with call to elf_getshdrstrndx.
3148 2009-08-19 Richard Guenther <rguenther@suse.de>
3150 * lto-lang.c (lto_init): Merge char_type_node with the
3151 appropriately signed variant.
3153 2009-08-19 Richard Guenther <rguenther@suse.de>
3156 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3157 (lto_fixup_type): Re-build the pointer-to chain part two.
3159 2009-08-19 Richard Guenther <rguenther@suse.de>
3162 * lto.c (lto_fixup_type): Re-build the type variant chain.
3164 2009-08-19 Richard Guenther <rguenther@suse.de>
3167 * lto.c (lto_fixup_constructor): New function.
3168 (lto_fixup_tree): Replace all types. Properly fixup
3169 constructors and constants.
3171 2009-08-14 Richard Guenther <rguenther@suse.de>
3173 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3174 for DECL_LANG_SPECIFIC.
3176 2009-08-13 Richard Guenther <rguenther@suse.de>
3179 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3181 2009-07-30 Richard Guenther <rguenther@suse.de>
3184 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3185 the largest decl for output and free TREE_CHAIN for further
3188 2009-07-24 Diego Novillo <dnovillo@google.com>
3190 * Make-lang.in: Add empty lto.install-plugin target.
3192 2009-07-13 Diego Novillo <dnovillo@google.com>
3194 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3196 2009-07-11 Richard Guenther <rguenther@suse.de>
3198 * lto-lang.c (lto_write_globals): Wrapup global decls.
3200 2009-07-10 Richard Guenther <rguenther@suse.de>
3202 * lto-lang.c (lto_init): Allocate one more location to make
3203 BUILTINS_LOCATION correct.
3205 2009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3207 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3209 2009-07-06 Diego Novillo <dnovillo@google.com>
3211 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3214 2009-07-06 Diego Novillo <dnovillo@google.com>
3216 * lto.c (preload_common_nodes): Remove.
3217 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3218 (lto_read_decls): Call lto_data_in_create and
3220 (free_decl): Do not call ggc_free.
3221 (lto_main): Call lto_init_reader.
3222 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3223 (lto_init): Initialize main_identifier_node if needed.
3224 Make ptrdiff_type_node be integer_type_node.
3226 2009-06-19 Diego Novillo <dnovillo@google.com>
3228 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3229 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3230 Remove code guarded by #ifdef LOCAL_TRACE.
3232 2009-06-18 Diego Novillo <dnovillo@google.com>
3234 * lto.c: Update license to GPLv3.
3235 * lto-elf.c: Likewise.
3236 * common.c: Likewise.
3237 * lto-lang.c: Likewise.
3238 * lto.h: Remove superfluous include files. Update all
3241 2009-06-17 Diego Novillo <dnovillo@google.com>
3243 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3245 2009-06-02 Diego Novillo <dnovillo@google.com>
3247 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3249 (materialize_cgraph): Only materialize nodes that have a
3250 representation on file.
3252 2009-06-01 Diego Novillo <dnovillo@google.com>
3254 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3256 2009-05-31 Diego Novillo <dnovillo@google.com>
3258 * lto-lang.c (lto_type_for_mode): Handle all the modes
3259 handled in c_common_type_for_mode.
3261 2009-05-21 Diego Novillo <dnovillo@google.com>
3263 * lto-elf.c: Always include <gelf.h>.
3264 * config-lang.in (target_libs): Remove.
3265 (build_by_default): Set to no.
3267 2009-05-15 Diego Novillo <dnovillo@google.com>
3269 * lto.c (lto_materialize_function): Assert that DECL is
3271 (materialize_cgraph): Don't try to materialize builtin
3273 * lto-section-out.c (write_symbol_vec): Do not write
3276 2009-05-13 Diego Novillo <dnovillo@google.com>
3278 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3280 2009-05-07 Diego Novillo <dnovillo@google.com>
3282 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3283 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3284 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3285 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3286 (lto_fixup_tree): Call gimple_register_type when *TP is a
3288 (lto_main): Call bitmap_obstack_initialize.
3290 2009-04-22 Diego Novillo <dnovillo@google.com>
3292 * lto.c (free_section_data): Tidy.
3293 (lto_1_to_1_map): Tidy.
3294 (lto_add_all_inlinees): Tidy.
3295 (prefix_name_with_star): New.
3296 (get_filename_for_set): New.
3297 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3298 to determine what cgraph node sets to write.
3299 Call get_filename_for_set to compute temporary file
3301 (lto_execute_ltrans): Do not execute LTRANS on files with
3302 names that start with '*'.
3303 Move logic to execute LTRANS together so that LTRANS is
3304 invoked only if there are any files to compile.
3305 (do_whole_program_analysis): Only remove output files
3306 that do not start with '*'.
3308 2009-04-06 Diego Novillo <dnovillo@google.com>
3310 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3311 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3312 (lto_add_all_inlinees): Tidy.
3314 2009-03-26 Diego Novillo <dnovillo@google.com>
3316 * lto.c: Include gimple.h.
3317 (lto_read_in_decl_state): Call gimple_register_type for
3318 every type in every stream.
3319 (lto_fixup_common): Call gimple_register_type if T has a
3321 (do_whole_program_analysis): Call print_lto_report.
3322 (lto_main): Call print_lto_report after cgraph_optimize.
3323 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3325 2009-03-24 Diego Novillo <dnovillo@google.com>
3327 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3328 (lto.o): Add dependency on GIMPLE_H.
3330 2009-03-10 Simon Baldwin <simonb@google.com>
3332 * lto.c (lto_read_all_file_options): Close any open file descriptor
3333 contained in file_data before freeing.
3335 2009-02-24 Rafael Avila de Espindola <espindola@google.com>
3337 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3338 for a decl in the original bitmap, not a node.
3339 (lto_add_all_inlinees): Remove original nodes that are not needed.
3340 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3342 2009-02-24 Diego Novillo <dnovillo@google.com>
3344 * lto.c (lto_materialize_function): Update
3345 lto_stats.num_function_bodies.
3346 (get_section_data): Initialize *LEN to 0.
3347 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3348 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3349 Update lto_stats.num_output_files.
3350 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3351 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3352 (lto_main): Initialize lto_stats.
3353 If flag_lto_report is set, call print_lto_report.
3355 2009-02-19 Diego Novillo <dnovillo@google.com>
3359 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3361 * lto.c (lto_add_inline_clones): Don't add the
3362 master clone. Check for a decl in the original
3364 (lto_add_all_inlinees): Remove original nodes
3365 that are not needed.
3366 (lto_scan_statics_in_cgraph_node): Don't care if
3367 the node is the master.
3368 (lto_promote_cross_file_statics): Use a new
3369 context.seen_node_decls for each set
3371 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3373 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3374 for a decl in the original bitmap, not a node.
3375 (lto_add_all_inlinees): Remove original nodes that are not needed.
3376 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3377 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3380 2009-02-18 Diego Novillo <dnovillo@google.com>
3382 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3383 and TV_WHOPR_WPA_IO.
3384 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3385 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3386 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3387 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3388 depending on command line flags.
3389 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3390 (lto_main): Remove timer uses.
3392 2009-02-18 Rafael Avila de Espindola <espindola@google.com>
3394 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3395 (lto_wpa_write_files): Update calls to renamed functions.
3397 2009-02-17 Diego Novillo <dnovillo@google.com>
3400 * lto-lang.c (lto_post_options): Disable -fwhole-program
3401 when running LTRANS.
3403 2009-02-10 Diego Novillo <dnovillo@google.com>
3405 * lto.c (read_cgraph_and_symbols): Fix comment.
3407 2009-02-10 Diego Novillo <dnovillo@google.com>
3409 * lto.c (read_cgraph_and_symbols): Read options from all
3412 2009-02-10 Diego Novillo <dnovillo@google.com>
3414 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3415 (materialize_cgraph): Likewise.
3416 (do_whole_program_analysis): Likewise.
3417 (lto_main): Call read_cgraph_and_symbols,
3418 materialize_cgraph and do_whole_program_analysis.
3420 2009-02-10 Simon Baldwin <simonb@google.com>
3422 * lto.c: Include lto-opts.h.
3423 * (lto_main): Clear file options at loop start, read any saved
3424 options from the first file handled, and re-issue options.
3425 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3427 2009-02-02 Diego Novillo <dnovillo@google.com>
3429 * lto.c (lto_main): Stop LTO_TIMER and use
3430 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3432 2009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3435 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3438 2009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3440 * Make-lang.in (LTO_EXE): Link with all
3441 BACKENDLIBS and not only GMPLIBS
3443 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3446 * lto-elf.c: Include gelf.h instead of libelf.h.
3447 (lto_elf_file_close): Replace elfx_update_shstrndx with
3448 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3451 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3454 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3456 2009-01-26 Diego Novillo <dnovillo@google.com>
3458 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3460 2009-01-26 Diego Novillo <dnovillo@google.com>
3462 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3463 and rename into gimple_types_compatible_p.
3465 2009-01-12 Rafael Avila de Espindola <espindola@google.com>
3467 * lto-lang.c (lang_hooks): Remove the const qualifier.
3469 2009-01-06 Diego Novillo <dnovillo@google.com>
3471 * ltrans-driver: Mark 'all' target as phony.
3473 2008-12-31 Diego Novillo <dnovillo@google.com>
3475 * ltrans-driver: Execute a NOP action for target 'all'.
3477 2008-12-19 Diego Novillo <dnovillo@google.com>
3479 * lto.c (lto_1_to_1_map): Tidy.
3481 2008-12-19 Diego Novillo <dnovillo@google.com>
3483 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3484 be opened, show its name.
3485 * ltrans-driver: If $verbose is set, do not use parallelism.
3487 2008-12-17 Rafael Avila de Espindola <espindola@google.com>
3489 * lto.c (lto_fixup_function): New.
3490 (lto_fixup_tree): Call lto_fixup_function.
3492 2008-12-14 Doug Kwan <dougkwan@google.com>
3494 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3495 variables if there is no function.
3497 2008-12-10 Simon Baldwin <simonb@google.com>
3499 * ltrans-driver: Always run make in silent mode, to avoid make's
3500 trace on stdout interfering with lto-wrapper output.
3502 2008-12-10 Doug Kwan <dougkwan@google.com>
3504 * lto.c (lto_add_inline_clones): Do not force master clones of
3505 inlined functions already in SET to be static inline.
3507 2008-12-04 Doug Kwan <dougkwan@google.com>
3509 * lto.c (globalize_context_t): New type to store states in
3510 globalization of cross-file statics.
3511 (globalize_cross_file_statics): New.
3512 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3513 static decls that need to be fixed up.
3514 (lto_scan_statics_in_cgraph_node): Change call interface to use
3515 a globalize_context_t CONTEXT for all states used.
3516 (lto_scan_statics_in_remaining_global_vars): New.
3517 (lto_promote_cross_file_statics): Use new call interface of
3518 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3519 visible vars in the last set.
3521 2008-12-03 Diego Novillo <dnovillo@google.com>
3523 * lto.c (lto_fixup_tree): Do not emit an error when
3524 PREVAILING throw but T doesn't.
3526 2008-12-02 Doug Kwan <dougkwan@google.com>
3528 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3530 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3531 variables and functions.
3532 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3533 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3535 2008-11-29 Diego Novillo <dnovillo@google.com>
3537 * lto.c: Include timevar.h.
3538 (lto_materialize_function): Tidy. Add comments.
3539 (lto_wpa_write_files): Tidy.
3540 (lto_execute_ltrans): Tidy.
3541 (lto_main): Add local variable LTO_TIMER. Initialize it
3542 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3543 Start and stop the timer.
3545 * Make-lang.in (lto.o): Add dependency on timevar.h.
3546 * ltrans-driver: React to -v and -save-temps.
3547 Use simple heuristic to determine how much parallelism to
3548 use when executing make.
3550 2008-11-12 Doug Kwan <dougkwan@google.com>
3552 * lto.c (lto_bitmap_obstack): Remove var.
3553 (lto_materialize_function): Do nothing instead of marking function
3554 body in file if flag_wpa is true.
3555 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3556 (lto_scan_statics_in_cgraph_node): New function.
3557 (lto_promote_cross_file_statics): Same.
3558 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3559 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3560 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3562 2008-11-09 Diego Novillo <dnovillo@google.com>
3564 * lto/lto.c (lto_fixup_tree): Change error message locus
3565 information to include location of mismatching
3567 Use TREE_NO_WARNING to avoid repeated messages.
3568 (lto_main): If lto_fixup_decls emitted any errors, exit.
3569 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3570 (lto_init_options): Don't enable exceptions by default.
3571 (lto_eh_runtime_type): Move to lto-function-in.c
3572 (lto_init_eh): Likewise.
3573 (lto_init): Don't call lto_init_eh.
3574 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3575 libfuncs.h and except.h.
3577 2008-10-30 Diego Novillo <dnovillo@google.com>
3579 * lto.c (lto_read_decls): Declare debug_main only if
3580 LTO_STREAM_DEBUGGING is enabled.
3582 2008-10-30 Simon Baldwin <simonb@google.com>
3584 * lto.c (lto_wpa_write_files): Create intermediate files with
3585 make_cwd_temp_file().
3586 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3587 WPA_SAVE_LTRANS is set.
3588 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3589 * ltrans-driver: Do not strip directory from output files.
3591 2008-10-29 Doug Kwan <dougkwan@google.com>
3593 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3595 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3596 (lto/lto-symtab.o): Remove rule.
3597 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3598 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3599 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3601 lto-symtab.c (File): Move up one level.
3602 lto-lang.c (cgraph.h): Remove include.
3603 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3604 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3605 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3607 2008-10-24 Rafael Espindola <espindola@google.com>
3609 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3610 non prevailing weak symbols.
3612 2008-10-24 Rafael Espindola <espindola@google.com>
3614 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3616 2008-10-24 Rafael Espindola <espindola@google.com>
3618 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3621 2008-10-23 Simon Baldwin <simonb@google.com>
3623 * lto-lang.c (input_node): Save the node reference, rather than the
3624 node pointer, in node->inlined_to.
3625 (input_cgraph_1): Convert node references into node pointers.
3627 2008-10-22 Diego Novillo <dnovillo@google.com>
3628 Rafael Espindola <espindola@google.com>
3630 * lto.c (lto_resolution_read): Tidy.
3631 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3632 abort if RET is NULL.
3634 2008-10-22 Doug Kwan <dougkwan@google.com>
3636 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3637 exceptions flag is given.
3638 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3639 (lto_init_eh): Remove exceptions flag initialization.
3640 (lto_init): Only call lto_init_eh if exceptions flag is set.
3642 2008-10-21 Diego Novillo <dnovillo@google.com>
3644 * lto.c: Tidy some formatting.
3647 2008-10-21 Simon Baldwin <simonb@google.com>
3649 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3650 them is NULL (but not the other).
3652 2008-10-17 Diego Novillo <dnovillo@google.com>
3654 * ltrans-driver: Divert output from make to a temporary file.
3655 Show it if the call to make failed.
3657 2008-10-15 Diego Novillo <dnovillo@google.com>
3659 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3660 Do not print TEMP_FILENAME
3661 * ltrans-driver: Call make with -s.
3663 2008-10-15 Diego Novillo <dnovillo@google.com>
3665 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3666 TREE_STATIC on global symbols.
3668 2008-10-14 Ollie Wild <aaw@google.com>
3670 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3671 (LTRANS_DRIVER_EXE): Add.
3672 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3673 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3674 (lto.install.common): Remove ltrans-driver.
3675 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3676 (LTRANS_DRIVER_EXE): New build rule.
3677 * config-lang.in (compilers): Add ltrans-driver.
3679 2008-10-14 Diego Novillo <dnovillo@google.com>
3681 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3684 2008-10-13 Ollie Wild <aaw@google.com>
3686 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3687 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3688 * ltrans-driver (LTRANS_FLAGS): Remove.
3690 2008-10-08 Doug Kwan <dougkwan@google.com>
3692 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3693 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3694 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3695 from lto_fixup_state to here.
3696 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3697 just a free-list. Fix up types also. Move decl merging code to
3699 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3701 (lto_fixup_decls): Use another pointer set to avoid multiple
3702 walking of nodes except for DECLs to be replaced. Pass an
3703 lto_fixup_data_t object to tree-walker.
3705 2008-10-08 Rafael Espindola <espindola@google.com>
3707 * lto-symtab.c (lto_symtab_set_resolution): New.
3708 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3709 lto_symtab_get_resolution.
3710 (lto_symtab_prevailing_decl): Return decl for non public decls.
3711 (lto_symtab_get_resolution): New.
3712 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3714 2008-10-06 Rafael Espindola <espindola@google.com>
3716 * lto-lang.c: Include cgraph.h.
3717 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3718 input_cgraph): Moved from lto-cgraph.c.
3719 (LANG_HOOKS_INPUT_CGRAPH): New.
3721 2008-10-03 Rafael Espindola <espindola@google.com>
3723 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3725 2008-10-03 Rafael Espindola <espindola@google.com>
3727 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3728 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3729 prevailing definition. Don't mark TREE_NOTHROW differences.
3730 * lto.c (lto_fixup_tree): New.
3731 (lto_fixup_state): New.
3732 (lto_fixup_state_aux): New.
3734 (lto_fixup_decls): New.
3735 (lto_main): Call lto_fixup_decls.
3737 2008-10-02 Ollie Wild <aaw@google.com>
3739 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3741 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3742 * lto-lang.c (lto_post_options): Add validation and fixups for
3745 2008-10-02 Rafael Espindola <espindola@google.com>
3747 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3748 lto_symtab_merge_decl): Return void.
3749 (lto_symtab_prevailing_decl): New.
3751 2008-09-30 Rafael Espindola <espindola@google.com>
3753 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3755 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3756 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3757 Check for already defined symbols.
3758 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3759 (LTO_IDENTIFIER_RESOLUTION): Remove.
3760 (LTO_DECL_RESOLUTION): New.
3762 2008-09-30 Rafael Espindola <espindola@google.com>
3764 * lto.c (lto_read_decls): Use new input_tree signature.
3766 2008-09-26 Doug Kwan <dougkwan@google.com>
3768 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3769 bodies affected by exception attribute merging of DECLs.
3770 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3773 2008-09-25 Rafael Espindola <espindola@google.com>
3775 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3776 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3777 * lto-symtab.c (lto_symtab_compatible): New.
3778 (lto_symtab_overwrite_decl): New.
3779 (lto_symtab_merge_decl): Refactor to use the above functions
3780 and the resolution from lang_identifier.
3781 * lto-tree.h: Include plugin-api.h.
3782 (lang_identifier): Add resolution.
3783 (LTO_IDENTIFIER_RESOLUTION): New.
3785 2008-09-25 Ollie Wild <aaw@google.com>
3787 * lang.opt (fltrans-output-list=): New option.
3788 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3790 2008-09-25 Rafael Espindola <espindola@google.com>
3792 * lto.c (lto_resolution_read): Initialize ret;
3794 2008-09-24 Ollie Wild <aaw@google.com>
3796 * lto.c (sys/mman.h): Move include.
3797 (lto_wpa_write_files): Return a list of written files.
3798 (lto_execute_ltrans): New function.
3799 (lto_main): Call lto_execute_ltrans.
3800 (ltrans-driver): New file.
3801 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3802 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3803 (lto_init_options): Initialize ltrans_driver.
3804 (lto_handle_option): Fix incorrect default output value.
3805 * lang.opt (fltrans-driver=): New option.
3806 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3807 (lto.install-common): Add lto/ltrans-driver.
3809 2008-09-24 Rafael Espindola <espindola@google.com>
3811 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3812 (lto/lto.o): Depend on lto/common.h.
3813 (lto/common.o): New.
3814 * lang.opt (resolution): New.
3815 * lto-lang.c (resolution_file_name): New.
3816 (lto_handle_option): Handle OPT_resolution.
3817 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3818 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3819 pass it to lto_symtab_merge_decl.
3820 * lto.c: Include common.h.
3821 (lto_read_decls): Add resolutions and resolutions_size arguments.
3822 Initialize data_in.globals_resolution and
3823 data_in.globals_resolution_size.
3824 (index_and_symbol_resolution): New.
3825 (lto_resolution_read): New.
3826 (lto_file_read): Add argument resolution_file.
3828 * lto.h (resolution_file_name): New.
3830 2008-09-23 Rafael Espindola <espindola@google.com>
3832 * common.c: Update description.
3833 * common.h: Update description.
3835 2008-09-23 Rafael Espindola <espindola@google.com>
3837 * common.c: Moved from lto-plugin.
3838 * common.h: Moved from lto-plugin.
3840 2008-09-22 Doug Kwan <dougkwan@google.com>
3842 * lto.c (VEC(bitmap,heap)): Declare.
3843 (lto_materialize_function): Handle WAP mode specially.
3844 (lto_add_inline_clones): New.
3845 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3846 return a bitmap of inlined decls.
3847 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3848 (lto_main): Call reset_inline_failed to reset inlining states.
3849 Check call-graph after WPA inlining.
3850 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3853 2008-09-19 Doug Kwan <dougkwan@google.com>
3855 lto.c (lto_main): Remove unsued wrapper code.
3856 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3858 2008-09-19 Rafael Espindola <espindola@google.com>
3860 * lto-symtab.c: Include lto-tree-in.h.
3861 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3862 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3863 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3865 2008-09-17 Paolo Bonzini <bonzini@gnu.org>
3866 Rafael Avila de Espindola <espindola@google.com>
3868 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3869 COMPOUND_LITERAL_EXPR_DECL): Remove.
3870 (emit_local_var): Remove.
3871 (lto_expand_expr): Remove.
3872 (lto_staticp): Remove.
3873 (LANG_HOOKS_EXPAND_EXPR): Remove.
3874 (LANG_HOOKS_STATICP): Remove.
3876 2008-09-11 Diego Novillo <dnovillo@google.com>
3878 * lto-lang.c: Include except.h and libfuncs.h.
3880 (lto_init): Call it.
3881 Set flag_generate_lto to 0.
3882 * Make-lang.in (lto-lang.o): Add dependency on except.h
3885 2008-09-09 Bill Maddox <maddox@google.com>
3887 * lto-lang.c: Include header file expr.h.
3888 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3889 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3890 (emit_local_var): Copied from c-semantics.c.
3891 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3892 and c_staticp in c-common.c.
3893 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3895 2008-09-08 Diego Novillo <dnovillo@google.com>
3897 * lto-lang.c (lto_global_bindings_p): Return 1 during
3900 2008-09-07 Diego Novillo <dnovillo@google.com>
3902 * lto.c: Tidy formatting.
3904 2008-08-04 Bill Maddox <maddox@google.com>
3906 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3908 2008-09-03 Doug Kwan <dougkwan@google.com>
3910 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3911 CIF_OK instead of NULL.
3913 2008-09-02 Diego Novillo <dnovillo@google.com>
3914 Simon Baldwin <simonb@google.com>
3916 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3917 c_common_type_for_size.
3918 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3919 (lto_init): Call linemap_add.
3920 (signed_and_unsigned_types): Remove.
3922 2008-08-29 Diego Novillo <dnovillo@google.com>
3924 * lto-lang.c (handle_noreturn_attribute): New local function.
3925 (handle_const_attribute): New local function.
3926 (handle_malloc_attribute): New local function.
3927 (handle_pure_attribute): New local function.
3928 (handle_novops_attribute): New local function.
3929 (handle_nonnull_attribute): New local function.
3930 (handle_nothrow_attribute): New local function.
3931 (handle_sentinel_attribute): New local function.
3932 (handle_type_generic_attribute): New local function.
3933 (handle_format_attribute): New local function.
3934 (handle_format_arg_attribute): New local function.
3935 (lto_attribute_table): Declare.
3936 (lto_format_attribute_table): Declare.
3937 (lto_init_attributes): New local function.
3938 (lto_define_builtins): Call it.
3939 Call targetm.init_builtins and build_common_builtin_nodes.
3940 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3941 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3943 2008-08-28 Diego Novillo <dnovillo@google.com>
3945 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3947 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3948 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3949 * lto-symtab.c: Include gimple.h.
3950 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3953 2008-08-27 Doug Kwan <dougkwan@google.com>
3955 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3956 gt-lto-lto.h): New includes.
3957 (lto_materialize_function): Do not read in function body in WPA mode.
3958 Format a line to fit in 80 columns.
3959 (lto_cgraph_node_sets): New garbage collected variable.
3960 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3962 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3963 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3964 variable LTO_SECTION_IN_H.
3965 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3966 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3967 with variable LTO_SECTION_IN_H.
3968 * config-lang.in (gtfiles): Add lto/lto.c.
3969 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3970 merged DECL_RESULT correctly.
3972 2008-08-26 Bill Maddox <maddox@google.com>
3974 * lto-lang.c Include tree-gimple.h.
3975 (lto_mark_addressable): Call mark_addressable rather than
3977 (lto_post_options): Suppress debug info generation.
3978 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3980 2008-08-25 Bill Maddox <maddox@google.com>
3982 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3983 assertion and leave an explanatory comment in its place.
3985 2008-08-21 Doug Kwan <dougkwan@google.com>
3987 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3988 of common nodes instead of computing locallly.
3989 (lto_read_in_decl_state): New.
3990 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3991 Read global and per-function in-decl states.
3992 * Make-lang.in (LTO_H): Update dependency.
3994 (lto-symtab.c): Merge (revision 139039)
3995 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3997 2008-08-21 Rafael Espindola <espindola@google.com>
3999 * config-lang.in (target_libs): New.
4001 2008-08-20 Bill Maddox <maddox@google.com>
4003 * lto.c (current_lto_file): Remove GTY marker from static
4004 variable. Remove include of file gt-lto-lto.h.
4005 * Make-lang.in: Remove dependency of lto/lto.o on
4007 * lto-elf.c (lto_file_close): Removed.
4008 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4009 allocate lto_elf_file object.
4010 (lto_elf_file_close): Free lto_elf_file object after close.
4011 * lto.h (struct lto_file_struct): Remove GTY marker.
4012 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4015 2008-08-20 Bill Maddox <maddox@google.com>
4017 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4018 to conform to its new signature.
4019 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4020 on discarded node here, now called in global_vector_fixup.
4022 2008-08-09 Bill Maddox <maddox@google.com>
4024 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4025 has not been set to a front-end-specific value.
4027 2008-08-05 Doug Kwan <dougkwan@google.com>
4029 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4032 2008-07-30 Bill Maddox <maddox@google.com>
4034 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4035 Remove obsolete comments.
4036 (lto_read_decls): Remove initialization of deleted field data_in.global.
4038 (lto_main): Remove redundant initialization of section_hash_table.
4039 * lto-elf.c: Removed obsolete comments.
4040 * lto.h: Tidy up comments.
4041 * lto-symtab.c (lto_least_common_multiple): New function.
4042 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4045 2008-07-25 Diego Novillo <dnovillo@google.com>
4046 Bill Maddox <maddox@google.com>
4048 * lto.c: Re-order include files.
4049 Include lto-section-out.h.
4050 (preload_common_nodes): Add debugging output.
4051 Add new local INDEX_TABLE.
4052 Call preload_common_node.
4053 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4055 2008-07-13 Bill Maddox <maddox@google.com>
4057 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4058 unwanted scaling during pointer addition.
4060 2008-07-11 Bill Maddox <maddox@google.com>
4061 Diego Novillo <dnovillo@google.com>
4063 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4064 Make code const-correct.
4065 (lto_file_read): Fix C++ compatibility warnings.
4066 (lto_read_section_data): Fix C++ compatibility warnings.
4067 (lto_get_section_data): Use CONST_CAST to avoid warning when
4068 const pointer passed to free.
4069 * lto-elf.c (lto_elf_build_section_table): Fix C++
4070 compatibility warnings.
4071 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4072 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4073 (lto_get_current_out_file): Fix C++ compatibility warnings.
4075 2008-07-11 Diego Novillo <dnovillo@google.com>
4077 * Make-lang.in (lto-warn): Define.
4079 2008-07-03 Simon Baldwin <simonb@google.com>
4081 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4082 LTO_STREAM_DEBUGGING.
4084 2008-06-27 Ollie Wild <aaw@google.com>
4086 * lto-elf.c (lto-section-out.h): New include.
4087 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4089 (cached_file_attrs): New static variable.
4090 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4091 Use cached_file_attrs for checking bits.
4092 (lto_elf_build_section_table): Remove elf_file argument from
4093 lto_elf_get_shdr and lto_elf_free_shdr calls.
4094 (DEFINE_INIT_SHDR): New macro.
4095 (init_shdr32, init_shdr64): New functions defined via the
4096 DEFINE_INIT_SHDR macro.
4097 (lto_elf_begin_section_with_type): New function.
4098 (lto_elf_begin_section): New function.
4099 (lto_elf_append_data): New function.
4100 (lto_elf_end_section): New function.
4101 (DEFINE_VALIDATE_EHDR): New macro.
4102 (validate_ehdr32, validate_ehdr64): New functions defined via the
4103 DEFINE_VALIDATE_EHDR macro.
4104 (validate_file): New function.
4105 (DEFINE_INIT_EHDR): New macro.
4106 (init_ehdr32, init_ehdr64): New functions defined via the
4107 DEFINE_INIT_EHDR macro.
4108 (init_ehdr): New function.
4109 (lto_elf_file_open): Add support for writable files. Move some
4110 validation logic to validate_file.
4111 (lto_elf_file_close): Add support for writable files. Write file data
4112 and free data blocks.
4113 (current_out_file): New static variable.
4114 (lto_set_current_out_file): New function.
4115 (lto_get_current_out_file): New function.
4116 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4117 Add temporary initialization for testing ELF serialization.
4118 * lto.h (lto-section-out.h): New include.
4119 (struct lto_file_struct): Slight modification to comment.
4120 (lto_elf_file_open): Add writable parameter.
4121 (lto_elf_begin_section): New function declaration.
4122 (lto_elf_append_data): New function declaration.
4123 (lto_elf_end_section): New function declaration.
4124 (lto_set_current_out_file, lto_get_current_out_file): New function
4126 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4127 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4128 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4129 * Make-lang.in (LTO_H): Add lto-section-out.h.
4131 2008-06-12 Ollie Wild <aaw@google.com>
4133 * lto.h (struct lto_file_vtable_struct): Remove.
4134 (struct lto_file_struct): Remove vtable member.
4135 * lto-elf.c (lto_file_init): Remove vtable argument.
4136 (lto_elf_map_optional_lto_section): Remove.
4137 (lto_elf_unmap_section): Remove.
4138 (lto_elf_file_vtable): Remove.
4139 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4141 (lto_elf_find_section_data): Remove.
4143 2008-06-11 Ollie Wild <aaw@google.com>
4145 * lto.c (lto_file_read): Add const qualifier to data variable.
4147 2008-06-11 Diego Novillo <dnovillo@google.com>
4149 Merge from lto-streamber sub-branch.
4151 2008-06-04 Ollie Wild <aaw@google.com>
4153 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4154 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4156 2008-05-28 Bill Maddox <maddox@google.com>
4158 Replace the DWARF reader in the LTO front-end.
4160 * lto.c: Include lto-tree-in.h, lto-tags.h.
4161 (enum DWARF2_class, DW_cl_constant, struct
4162 DWARF2_form_data, struct lto_context,
4163 lto_fd_init, lto_info_fd_init,
4164 lto_abbrev_fd_init, lto_info_fd_close,
4165 lto_file_init, lto_file_close,
4166 lto_file_corrupt_error, lto_abi_mismatch_error,
4167 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4168 lto_read_uleb128, lto_read_sleb128,
4169 lto_read_initial_length, lto_abbrev_read_attrs,
4170 lto_abbrev_read, lto_abbrev_read_lookup,
4171 lto_read_section_offset,
4172 lto_read_comp_unit_header, find_cu_for_offset,
4174 lto_resolve_reference,lto_read_form,
4175 attribute_value_as_int,
4176 make_signed_host_wide_int,
4177 attribute_value_as_constant, lto_cache_hash,
4178 lto_cache_eq, lto_cache_store_DIE,
4179 lto_cache_lookup_DIE, lto_find_integral_type,
4180 lto_find_integral_type_1,
4181 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4182 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4183 lto_unsupported_attr_error, lto_get_identifier,
4184 lto_read_referenced_type_DIE,
4185 lto_read_compile_unit_DIE,
4186 lto_read_array_type_DIE,
4187 lto_read_structure_union_class_type_DIE,
4188 lto_read_enumerator_DIE,
4189 lto_read_enumeration_type_DIE,
4190 lto_read_only_for_child_DIEs,
4191 lto_read_only_for_child_DIEs,
4192 lto_read_member_DIE, lto_read_abbrev,
4193 lto_read_variable_formal_parameter_constant_DIE,
4194 lto_get_body): Removed.
4195 (preload_common_nodes): New function.
4196 (lto_read_decls): Convert for new global streamer.
4197 (lto_materialze_file_data,
4198 lto_read_subroutine_type_subprogram_die,
4199 lto_read_unspecified_parameters_DIE,
4200 lto_read_typedef_DIE,
4201 lto_read_pointer_reference_type_DIE,
4202 lto_read_subrange_type_DIE,
4203 lto_read_base_type_DIE,
4204 lto_read_const_volatile_restrict_type_DIE,
4205 lto_read_namespace_DIE,
4206 lto_read_unspecified_type_DIE, lto_read_DIE,
4207 lto_read_child_DIEs, lto_collect_child_DIEs):
4209 (lto_info_read, lto_set_cu_context): Removed.
4210 (lto_file_read): Convert for new global streamer.
4211 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4212 lto_resolve_var_ref, lto_resolve_fn_ref,
4213 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4214 lto_resolve_namespacedecl_ref): Removed.
4215 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4216 * lto-tree.h (lto_symtab_merge_var,
4217 lto_symtab_mergee_fun): Declare here.
4218 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4219 (lto_elf_file_open): Removed code to read DWARF debug sections.
4220 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4221 DWARF2_CompUnit, lto_die_ptr,
4222 lto_die_cache_entry, lto_fd, lto_info_fd,
4223 lto_abbrev_fd): Removed.
4224 (lto_file): Removed debug_info and debug_abbrev fields.
4226 (lto_file_init, lto_file_close,
4227 lto_resolve_type_ref, lto_resolve_var_ref,
4228 lto_resolve_fn_ref, lto_resolve_field_ref,
4229 lto_resolve_typedecl_ref,
4230 lto_resolve_namespacedecl_ref,
4231 lto_get_file_name): Removed declarations.
4232 (lto_symtab_merge_var, lto_symtab_merge_fn):
4233 Declarations moved to lto-tree.h.
4234 * lto-symtab.c (lto_compatible_attributes_p):
4235 Lobotomize this, as it barfs on "Hello, world!".
4236 * lto-section-out.c: Include lto-tree-out.h.
4237 (lto_hash_global_slot_node,
4238 lto_eq_global_slot_node, preload_common_nodes,
4239 write_global_stream, write_global_references):
4241 (produce_asm_for_decls): Convert for new global streamer.
4242 * lto-section-out.h (lto_hash_global_slot_node,
4243 lto_eq_global_slot_node): Declare.
4245 2008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
4246 Jan Hubicka <jh@suse.cz>
4248 * lto.c (sys/mman.h, tree-pass.h): New includes.
4249 (lto_materialize_constructors_and_inits,
4250 lto_materialize_function): Keeps length of section.
4251 (lto_materialize_cgraph): Removed.
4252 (lto_read_decls): Initialize fd field.
4253 (lto_file_read): Different return type and removed much code to
4255 (page_mask): New variable.
4256 (lto_read_section_data, get_section_data, free_section_data): New
4258 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4259 passes can get the section data.
4261 2008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
4263 * lto.h (lto_read_decls): Made local.
4264 (lto_input_function_body, lto_input_constructors_and_inits,
4265 lto_input_cgraph): Declarations moved to lto-section-in.h.
4266 * lto-section-in.c: Moved to .. .
4267 * lto-cgraph-in.c: Ditto.
4268 * lto-section-in.h: Ditto.
4269 * lto-function-in.c: Ditto.
4270 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4271 (lto_insert_block): Removed.
4272 (LANG_HOOKS_INSERT_BLOCK): Removed.
4273 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4274 lto-section-in.o): Rules moved to lto/Makefile.in.
4277 2008-05-16 Ollie Wild <aaw@google.com>
4279 * lto-lang.c (tree-inline.h): Include.
4280 (lto_post_options): New function.
4281 (LANG_HOOKS_POST_OPTIONS): Define.
4282 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4283 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4285 2008-05-13 Diego Novillo <dnovillo@google.com>
4287 * lto-function-in.c (input_ssa_names): Call
4288 make_ssa_name_fn instead of make_ssa_name.
4290 2008-05-12 Diego Novillo <dnovillo@google.com>
4292 * lto-cgraph-in.c (overwrite_node): Update references to
4293 inline summary fields.
4294 * lto-function-in.c (input_expr_operand): Do not handle
4297 2008-05-09 Ollie Wild <aaw@google.com>
4299 * lang.opt: New file.
4300 * lto-lang.c (lto_init_options): New function.
4301 (lto_handle_option): New function.
4302 (lto_init): Move initialization of flag_unit_at_a_time to
4304 (LANG_HOOKS_INIT_OPTIONS): Define.
4305 (LANG_HOOKS_HANDLE_OPTION): Define.
4307 2008-04-29 Ollie Wild <aaw@google.com>
4309 * lto.c (lto_read_namespace_DIE): New function.
4310 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4311 NAMESPACE_DECL DIE's.
4312 (lto_resolve_namespacedecl_ref): New function.
4313 * lto.h (lto_resolve_namespacedecl_ref): New function.
4314 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4315 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4316 and num_namespace_decls.
4317 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4318 * lto-lang.c (lto_init_ts): New function.
4319 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4321 2008-04-16 Ollie Wild <aaw@google.com>
4323 * lto-function-in.c (input_type_ref): Updated function description.
4325 2008-04-16 Ollie Wild <aaw@google.com>
4327 * lto-function-in.c (input_type_ref_1): New function.
4328 (input_type_ref): Split into two functions.
4329 (input_function): Add support for type contexts.
4331 2008-04-16 Ollie Wild <aaw@google.com>
4333 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4336 2008-04-16 Ollie Wild <aaw@google.com>
4338 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4339 list of supported languages.
4341 2008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
4343 Merge with mainline @133491.
4345 2008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
4346 Jan Hubicka <jh@suse.cz>
4348 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4349 fd->unmaterialized_fndecls.
4350 (lto_get_file_name, lto_materialize_cgraph): New function.
4351 (lto_materialize_constructors_and_inits,
4352 lto_materialize_function): Read info directly from elf file.
4353 (lto_file_read): Made local and initialize dictionary so that
4354 other lto sections can be read without reprocessing the elf file.
4355 (lto_main): Read all functions after all files have been processed
4356 for their types, globals and cgraph.
4357 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4359 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4360 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4361 (lto_elf_read_symtab): Removed function.
4362 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4363 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4364 (lto_file_read): Made local.
4365 (lto_get_file_name, lto_elf_build_section_table,
4368 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4370 (lto_read_decls): Get the file name.
4371 * lto-cgraph-in.c: New file.
4372 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4373 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4374 (input_labels): Fixed latent sizeof issue.
4375 (input_function): Build stmt array to set call sites into cgraph
4377 (lto_read_body): Reset cfun->curr_properties.
4378 * lto_section_in.h (lto_section_slot): New structure.
4379 (section_hash_table.lto_file_decl_data): New field.
4382 2008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
4384 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4385 reconstruct static initializers.
4386 (lto_get_body, lto_materialize_function): Add lto_section_type as
4388 (lto_materialize_constructors_and_inits,
4389 lto_materialize_file_data): New function.
4390 (lto_materialize_function,
4391 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4392 unmap_section and map_fn_body to map_section.
4393 (lto_set_cu_context): Process functions and static inits
4395 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4396 lto/lto-section-in.o): Update dependencies.
4397 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4398 lto_section_type parameter.
4399 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4400 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4401 renamed the other two so that there is only one map function and
4402 one unmap function and each takes a section type parameter.
4403 (lto_read_function_body): Renamed to lto_input_function_body and
4404 added file_data parameter.
4405 (lto_read_var_init): Removed.
4406 (lto_input_constructors_and_inits): New function.
4407 * lto-section-in.c (lto_read_decls): New function.
4408 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4409 var_decls, type_decls, types to lto_file_decl_data.
4410 (input_type_ref, input_expr_operand, lto_read_body): Get
4411 field_decls, fn_decls, var_decls, type_decls, types from different
4413 (input_globals, input_constructor, lto_read_var_init): Removed.
4414 (input_constructors_or_inits): New function.
4415 (lto_read_function_body, lto_input_constructors_and_inits):
4416 Renamed to lto_input_function_body and takes file_data parameter.
4417 * lto-section-in.h (lto_file_decl_data): New structure.
4419 2008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4421 * lto-function-in.c (input_globals.c): Changed input type to
4422 lto_function_header.
4423 (input_bb): Removed code to deserialize the stmt number.
4424 (input_function): Renumber all stmts after they are input.
4425 (lto_read_body, lto_read_function_body, lto_read_var_init):
4426 Changed to used new header format and enum section_type.
4427 *lto-lang.c (success): Removed.
4429 2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4431 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4432 (lto_elf_free_sym): Likewise.
4434 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4435 (lto_elf_build_init): Likewise.
4437 2008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
4439 * lto-read.c: Renamed to lto-function-in.c.
4440 (input_1_unsigned): Moved to lto-section-in.c and renamed
4441 lto_input_1_unsigned.
4442 (input_uleb128): Moved to lto-section-in.c and renamed
4444 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4445 lto_input_widest_uint_uleb128.
4446 (input_sleb128): Moved to lto-section-in.c and renamed
4448 (input_integer): Moved to lto-section-in.c and renamed
4450 (debug_in_fun): Moved to lto-section-in.c and renamed
4452 (input_block): Moved to lto-section-in.h and renamed
4454 (input_expr_operand): Fixed to allow lists with more than one
4456 * lto-section-in.h: New file.
4457 * lto-section-in.c: New file with changes from above.
4458 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4459 (lto-section-in.o): New rule.
4461 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4463 * lto-read.c (input_expr_operand): Mark static and external
4464 VAR_DECLs as needed.
4466 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4468 * lto-read.c (input_integer): Use the correct shift amount.
4470 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4472 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4473 (LANG_HOOKS_NAME): Define.
4475 2007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4477 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4478 original function to...
4479 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4480 don't have a base type.
4481 (lto_read_enumeration_type_DIE): Examine the values of the
4482 enumeration to determine whether we can use an unsigned type for
4483 the base type of the enumeration.
4485 2007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4487 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4488 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4490 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4492 * lto-lang.c (lto_types_compatible_p): New function.
4493 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4495 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4496 Kenneth Zadeck <zadeck@naturalbridge.com>
4498 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4499 (input_local_vars): Read in DECL_INITIAL and context for local
4500 statics that need to be put in unexpanded_vars_list.
4502 2007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4504 * lto-read.c (input_real): Use a separate null-terminated buffer
4505 for calling real_from_string.
4506 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4507 tell cgraph that it's needed.
4509 2007-12-19 Doug Kwan <dougkwan@google.com>
4511 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4513 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4515 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4516 (lto_file_read): Reset the members of 'context' every time we read
4517 a toplevel DIE, with special attention to last_param_type.
4519 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4521 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4522 'declaration'. Set the assembler name for non-public functions.
4524 2007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
4526 * lto_read.c (data_in.unexpanded_indexes): New array.
4527 (input_local_var): Added code to read in unexpanded_var_list
4528 indexes for variables. Only read in DECL_CHAIN field for
4530 (input_local_vars): Added code to rebuild unexpanded_var_list in
4531 order using unexpanded_indexes.
4532 (input_function): Added code to set DECL_CONTEXT for functions.
4534 2007-12-13 Doug Kwan <dougkwan@google.com>
4536 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4537 in pointer and reference types.
4539 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4541 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4544 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4546 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4547 already read the DIE.
4548 (lto_get_body): New function, split out from...
4549 (lto_materialize_function): ...here. Call it.
4550 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4551 determine DECL_EXTERNAL.
4552 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4553 FUNCTION_DECLs when necessary. Use the type of the actual
4554 function definition if we are unable to easily merge types. Ignore
4555 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4558 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4560 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4562 2007-12-12 Bill Maddox <maddox@google.com>
4565 2007-12-07 Bill Maddox <maddox@google.com>
4567 * lto.c (lto_str_fd_init): New function.
4568 (lto_str_fd_close): New function.
4569 (lto_file_init): Call lto_str_fd_init.
4570 (lto_file_close): Call lto_str_fd_close.
4571 (lto_str_read): New function. Read debug string table.
4572 (lto_str_lookup): New function. Get string for debug
4573 string table offset.
4574 (lto_read_form): Recognize DW_FORM_strp.
4575 (lto_file_read): Invoke lto_str_read.
4577 * lto-elf.c (lto_elf_file_open): Read raw section data
4578 for the .debug_str section, if present.
4580 * lto.h (struct lto_str_fd_struct): New struct.
4581 (struct lto_file_struct): Added new field DEBUG_STR
4582 to hold the file descriptor for the debug string table.
4584 2007-12-07 Bill Maddox <maddox@google.com>
4586 * lto.c (lto_str_fd_init): New function.
4587 (lto_str_fd_close): New function.
4588 (lto_file_init): Call lto_str_fd_init.
4589 (lto_file_close): Call lto_str_fd_close.
4590 (lto_str_read): New function. Read debug string table.
4591 (lto_str_lookup): New function. Get string for debug
4592 string table offset.
4593 (lto_read_form): Recognize DW_FORM_strp.
4594 (lto_file_read): Invoke lto_str_read.
4596 * lto-elf.c (lto_elf_file_open): Read raw section data
4597 for the .debug_str section, if present.
4599 * lto.h (struct lto_str_fd_struct): New struct.
4600 (struct lto_file_struct): Added new field DEBUG_STR
4601 to hold the file descriptor for the debug string table.
4603 2007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4605 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4606 Grow the basic_block_info and label_to_block_map vectors if
4607 necessary. Read in the block chain.
4609 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4611 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4613 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4615 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4617 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4619 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4620 (lto_read_body): Don't declare PROP_alias.
4622 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4624 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4625 argument type information.
4627 2007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4629 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4630 TREE_THIS_VOLATILE if the associated type is a volatile type.
4631 (lto_materialize_function): Remove call to init_ssa_operands.
4632 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4633 variable when reading an SSA_NAME. Do the same when reading a
4634 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4635 (input_cfg): Call init_ssa_operands.
4636 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4637 Move call to init_tree_ssa...
4638 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4639 add_referenced_var on any variables referenced from the body of the
4640 function. Inform the rest of the compiler we are in SSA form and
4641 inform later passes about the current properties.
4643 2007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4645 * lto.c (lto_materialize_function): Add FIXME.
4647 2007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4649 * lto-lang.c (enum built_in_attribute): New enum.
4650 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4651 built_in_attributes): New variables.
4652 (def_builtin_1): New function.
4653 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4655 2007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4657 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4658 DECL_SOURCE_LOCATION for debugging purposes.
4659 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4660 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4661 laying out the decl until later.
4662 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4663 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4665 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4666 operand of an ADDR_EXPR.
4667 * lto-lang.c (enum lto_builtin_type): New enum.
4668 (builtin_type): New typedef.
4669 (builtin_types, string_type_node, const_string_type_node,
4670 wint_type_node, intmax_type_node, uintmax_type_node,
4671 signed_size_type_node): New variables.
4672 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4673 lto_build_c_type_nodes): New functions.
4674 (lto_init): Initialize builtin types.
4675 (lto_set_decl_assembler_name): Let the target machine mangle the
4676 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4678 2007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4680 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4681 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4682 the type is a constant type. Set the assembler name and inform
4683 the rest of the compiler about the new decl if the decl is not
4685 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4686 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4687 try to read in function bodies for functions that already have bodies.
4688 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4690 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4691 Check for whether we matched a builtin function type before calling
4692 lto_same_type_p on the generated type. Permit cases where the
4693 declaration of an array is unbounded, but the definition is bounded.
4694 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4695 DECL_SIZE_UNIT if necessary.
4697 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4699 * lto-read.c (input_expr_operand): Get types right
4702 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4704 * lto-read.c (make_new_block, input_cfg): Properly set
4707 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4709 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4710 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4712 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4714 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4715 construct the integer type for bitfields.
4717 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4719 * lto-read.c (data_in.current_node_has_loc): Removed.
4720 (input_line_info): Returns true if node needs line set.
4721 (set_line_info): Always sets line if called.
4722 (clear_line_info): Removed reference to current_node_needs_loc.
4723 (input_expr_operand): Keeps track locally if current node needs a loc.
4724 (input_local_var): Added code to handle DECL_INITIAL for
4725 static local vars. Only set loc if necessary.
4727 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4729 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4732 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4734 * lto.c: Include langhooks.h.
4735 (lto_find_integral_type): Rework logic to handle the case where
4736 got_byte_size is true, but the bitsize requested and that of the
4737 base_type doesn't match.
4738 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4739 asm_name if we are creating a VAR_DECL.
4740 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4742 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4743 function reference and use the builtin's decl if so. Set the
4744 DECL_CONTEXT of the RESULT_DECL for the function.
4745 * lto-lang.c (registered_builtin_fndecls): New variable.
4746 (lto_getdecls): Return it.
4747 (lto_builtin_function): Chain the new decl onto
4748 registered_builtin_fndecls.
4750 2007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
4752 * lto-read.c (process_tree_flags, lto_static_init_local):
4753 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4754 (input_line_info, clear_line_info): Fixed new line number code.
4755 (input_expr_operand): Added type to SWITCH_EXPR.
4756 (lto_read_body): Properly initialized data_in.
4757 Clear line info when leaving.
4759 2007-11-13 Diego Novillo <dnovillo@google.com>
4761 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4762 Initialize ARTIFICIAL.
4763 (lto_read_subroutine_type_subprogram_DIE): Initialize
4765 * lto-read.c (set_line_info): Remove ; from calls to
4766 LINEMAP_POSITION_FOR_COLUMN.
4768 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4770 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4771 (input_expr_operand, input_local_var): Renamed get_type_ref to
4773 (input_expr_operand): Get the types correct for
4774 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4776 2007-11-13 Doug Kwan <dougkwan@google.com>
4778 * lto-read.c (input_widest_uint_uleb128): New function.
4779 (input_tree_flags, process_tree_flags, input_line_info,
4780 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4781 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4782 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4783 (lto_static_init_local): Add code to assert that lto_flags_type is
4786 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4788 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4789 (lto_read_subroutine_type_subprogram_DIE): Handle
4790 DW_AT_static_link and DW_AT_specification. Return the
4791 specification if present.
4792 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4794 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4796 * lto-lang.c: Include target.h.
4797 (registered_builtin_types): New variable.
4798 (lto_type_for_mode): Increase number of modes handled.
4799 (lto_builtin_function): Fix argument list and return the decl.
4800 (lto_register_builtin_type): New function.
4801 (lto_init): Initialize target builtins and language-independent
4803 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4805 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4807 * lto-read.c (input_expr_operand): Added code to properly handle
4808 index filed. Added new RANGE_EXPR case.
4810 2007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4812 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4813 (data_in): Added current_node_has_loc field.
4814 (input_line_info, set_line_info, clear_line_info): Added a support
4815 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4816 did not have on on the source side.
4817 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4820 2007-11-09 Doug Kwan <dougkwan@google.com>
4822 * lto-read.c (input_expr_operand): Change type of operand 2 of
4823 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4825 2007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4827 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4828 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4829 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4830 the new decl we are creating. Move informing the middle end about
4832 (lto_main): ...here. Inform the middle end about global variables
4833 after we have read in all the input files.
4834 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4835 variables with internal linkage, so delete the check for internal
4836 linkage. Combine TREE_PUBLIC flags.
4838 2007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4840 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4842 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4843 builtin specially. Move check for attribute compatibility
4846 2007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4848 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4849 * config-lang.in (gtfiles): Add lto.h and lto.c.
4850 * lto-elf.c: Include ggc.h.
4851 (lto_elf_file_open): Allocate elf_file from GC memory.
4852 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4853 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4855 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4856 (lto_file_close): Free file from GC memory.
4857 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4858 (lto_read_member_DIE): Fix declaration.
4859 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4861 (current_lto_file): New variable.
4863 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4864 lto_die_cache_entry): Move to...
4865 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4866 declarations accordingly.
4867 (struct lto_file_struct): Declare.
4868 (lto_file_vtable): Use it instead of lto_file.
4870 2007-11-06 Alon Dayan <alond@il.ibm.com>
4871 Kenneth Zadeck <zadeck@naturalbridge.com>
4873 * lto-read.c (process_flags, lto_static_init_local):
4874 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4875 change global array num_flags_for_code to flags_length_for_code.
4876 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4878 2007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4880 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4881 layout functions to compute information about the newly constructed
4884 2007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4886 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4887 case to use DECL_RESULT if necessary.
4889 2007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4891 * lto-read.c (input_tree_list): Removed.
4892 (input_tree_flags): Added parameter to force flags no matter what
4894 (input_expr_operand): Added parameter to input_tree_flags.
4895 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4896 input_expr_operand rather than input_tree_lists.
4897 (input_local_var): Use input_expr_operand to read attributes
4898 rather then input_tree_list.
4899 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4901 2007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4903 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4904 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4906 * lto-read.c (lto_read_body): Use correct sizes for calculating
4907 type_decls_offset and types_offset.
4909 2007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4911 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4913 * config-lang.in (gtfiles): Add lto-lang.c.
4914 * lto-lang.c: Include gt-lto-lto-lang.h.
4915 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4916 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4917 (lto/lto-read.o): Likewise.
4919 2007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4921 * lto-read.c (data_in): Added type_decls and current_col fields.
4922 (string_slot): New type to hold canonized file name.
4923 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4924 input_line_info, set_line_info, clear_line_info): New functions.
4925 (file_name_hash_table): New hash table.
4926 (input_local_var, input_labels, input_local_vars_index,
4927 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4928 (input_uleb128): Changed type of byte var.
4929 (input_expr_operand): Large number of changes to get line numbers
4930 correct. Added TYPE_DECL case.
4931 (input_globals): Added code to get TYPE_DECLs processed.
4932 (input_local_var): Added code to process line numbers and
4933 TREE_CHAIN and DECL_CONTEXT.
4934 (input_function, input_constructor): Added call to
4936 (lto_static_init_local): Added code to get line numbers correct.
4937 (lto_read_body): Added code to get TYPE_DECLS read and to change
4938 parameters to the calls above that had their parms reorganized.
4941 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4943 * lto.h (lto_resolve_typedecl_ref): Declare.
4944 * lto.c (lto_resolve_typedecl_ref): New function.
4946 2007-10-29 Mark Mitchell <mark@codesourcery.com>
4947 Nathan Froyd <froydnj@codesourcery.com>
4949 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4950 DIEs even if we find an abstract origin for this DIE.
4952 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4954 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4955 RESULT_DECL slightly earlier. Only remember the decl for later
4956 if we successfully merge declarations.
4958 2007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4960 * lto-read.c (input_expr_operand): Give label_values the proper
4961 context and provide switch statements with a default type.
4963 2007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4965 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4966 * lto.c (lto_materialize_function): ...to here.
4968 2007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4970 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4971 * lto.c (lto_info_fd_init): Initialize it.
4972 (lto_info_fd_close): Free it.
4973 (lto_materialize_function): New function.
4974 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4975 unmaterialized_fndecls.
4976 (lto_file_read): Read in all the function bodies after we have read
4977 all of the DWARF info.
4978 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4979 reading a function body.
4981 2007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4983 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4984 semetric with output_tree_flags. Added call to log flags.
4985 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4986 type issues to make everything consistent with flags being
4987 unsigned HOST_WIDE_INTS.
4988 (input_expr_operand): Added call to
4989 recompute_tree_invariant_for_addr_expr.
4990 (input_local_var): Added debugging for tree_chains. Now calls
4992 (input_phi): Made flags unsigned HOST_WIDE_INT.
4993 (input_ssa_names): Now calls input_tree_flags.
4994 (lto_read_body): Now sets cfun.
4995 (lto_read_function_body): Now sets current_function_pointer.
4997 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4999 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5000 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5001 inspecting fields within.
5002 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5003 handle this appropriately.
5005 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5007 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5008 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5009 both DW_AT_abstract_origin and DW_AT_specification.
5010 (lto_read_subroutine_type_subprogram_DIE): Handle
5011 DW_AT_abstract_origin.
5012 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5013 (lto_read_DIE_at_ptr): Define as static to match declaration.
5014 Lookup the PTR in the cache before reading it from the file.
5015 (lto_resolve_var_ref): Adjust accordingly.
5016 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5017 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5019 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5021 * lto.c (lto_read_DIE_at_ptr): New function.
5022 (lto_resolve_var_ref): Use it.
5023 (lto_resolve_fn_ref): Use it.
5024 (lto_resolve_field_ref): Use it.
5025 (lto_read_variable_formal_parameter_constant_DIE): Follow
5026 DW_AT_specification and return the associated decl when appropriate.
5028 2007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5030 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5031 Implement for scalar integer modes.
5032 (lto_init): Initialize size_type_node.
5034 2007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
5036 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5037 (input_local_var): Add chaining for params.
5038 (input_ssa_names): Add cfun parameter.
5039 (input_function): Remove unnecessary else.
5041 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5043 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5044 (lto_resolve_var_ref): Use proper types.
5045 (lto_resolve_fn_ref): Likewise.
5046 (lto_resolve_field_ref): Likewise.
5048 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5050 * lto-read.c (input_expr_operand): Remove case.
5052 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5054 * lto.c (lto_read_only_for_child_DIEs): New function.
5055 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5056 * lto-elf.c (lto_elf_map_lto_section): Remove.
5057 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5058 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5059 SSA_NAME. Add missing case for mechanical codes.
5060 (input_cfg): Use basic_block_info_for_function instead of
5063 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5065 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5066 (input_list): Renamed input_tree_list and modified to follow same
5067 protocol as lto-function-out.c:output_tree_list.
5068 (input_expr_operand): Make asm operands use input_tree_list.
5069 (input_local_var): Now uses input_tree_list.
5070 (lto_read_body): Change placement for setting context of debug_labels.
5073 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5075 * lto-read.c (input_real): Output debugging in proper order.
5076 (input_integer): Compute bit lengths properly.
5077 (input_list): Clean up declaration.
5078 (input_expr_operand): Change calls to input_real to match fix.
5079 Make reading of LTO_bit_field_ref1 match output.
5080 (input_local_var): Make reading of attributes match what is being
5082 (dump_debug_stream): Also print char in hex.
5083 (debug_out_fun): Fix signed unsigned mismatch.
5085 2007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5087 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5088 DW_AT_GNU_vector specially, as they are not contiguous with the
5089 specified set of attribute names. Use class_mask to check for
5090 errors at the end of the function
5091 (lto_resolve_var_ref): Read the DIE if it is not cached.
5092 (lto_resolve_fn_ref): Likewise.
5093 (lto_resolve_field_ref): Likewise.
5095 2007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5097 * lto.c: Include dwarf2out.h.
5098 (lto_cache_store_DIE): Assert that we never change the value.
5099 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5100 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5101 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5102 sensible type instead.
5103 (lto_read_structure_union_class_type_DIE): Store the newly
5104 created type prior to reading the members of the structure to
5105 avoid infinite recursion. Avoid computing types and alignments
5106 for structures whose sizes are unknown.
5107 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5108 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5109 DW_AT_const_value, and DW_AT_specification.
5110 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5111 Return early if we have already constructed the function type.
5112 (lto_read_typedef_DIE): Check to see if the type has been cached
5113 already. Cache the type before reading any children.
5114 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5115 (lto_read_DIE): Unset context->skip_non_parameters around reading
5117 (lto_resolve_fn_ref): Delete trailing whitespace.
5119 2007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
5121 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5123 2007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5125 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5127 2007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5129 * lto-lang.c (signed_and_unsigned_types): New variable.
5130 (lto_type_for_size): Consult signed_and_unsigned_types to find
5131 an approprite type, creating it if necessary.
5132 (lto_set_decl_assembler_name): Add actual method body.
5134 2007-09-06 Jim Blandy <jimb@codesourcery.com>
5136 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5137 can't find a var init for this variable, leave its DECL_INITIAL.
5138 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5139 lto_elf_map_fn_body.
5140 (lto_map_lto_section): New function.
5141 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5142 bodies, and lto_elf_map_optional_lto_section for variable
5144 (lto_elf_find_section_data): Quietly return NULL if the section is
5146 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5148 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5150 * lto-read.c (lto_read_body): Doc fix.
5152 2007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
5154 * lto-read.c (fun_in): Renamed to data_in.
5155 (input_expr_operand, input_local_var, input_string_internal,
5156 input_string, input_real, input_list, get_label_decl,
5157 get_type_ref, input_expr_operand, input_globals, input_labels,
5158 input_local_vars_index, input_local_var, input_local_vars,
5159 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5160 (input_constructor): New function.
5161 (lto_read_function_body): Renamed to lto_read_body and generalized
5162 to handle both functions and constructors.
5163 (lto_read_function_body, lto_read_var_init): New function.
5166 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5168 * lto-read.c (input_expr_operand): Assert that there really is a
5170 (input_globals): Removed checks on 0 section.
5172 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5174 * lto-read.c (fun_in): Added local_decls_index and
5175 local_decls_index_d.
5176 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5177 (input_globals): Enabled code to handle FIELD_DECLs.
5178 (input_local_vars_index, input_local_vars): New function.
5179 (input_local_var): Changed to allow locals to be input randomly.
5180 (lto_read_function_body): Added code to input the
5181 local_decls_index and to free various structures.
5183 2007-08-17 Jim Blandy <jimb@codesourcery.com>
5185 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5186 ATTRIBUTE_UNUSED from 'die' formal.
5188 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5189 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5190 (input_list): Fix type of 'tag'.
5191 (input_expr_operand): Fix type of 'tag' argument. Update
5192 declaration. Fix type of 'ctag'. Add default case to switch,
5193 since the type of the switched value is now an enum.
5194 (input_local_vars): Fix type of 'tag'.
5195 (input_bb): Fix type of 'tag' argument.
5196 (input_function): Fix type of 'tag' argument.
5198 2007-08-16 Jim Blandy <jimb@codesourcery.com>
5200 * lto.c (lto_read_member_DIE): Record the tree we create in
5201 fd->die_cache. (Our 'die' argument is no longer unused.)
5202 (lto_resolve_field_ref): New function.
5203 * lto.h (lto_resolve_field_ref): New declaration.
5205 2007-08-15 Jim Blandy <jimb@codesourcery.com>
5207 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5209 2007-08-07 Jim Blandy <jimb@codesourcery.com>
5211 * lto.c (lto_read_form): Complete attr_classes table.
5212 (DWARF2_form_data): Doc fix.
5214 2007-08-05 Mark Mitchell <mark@codesourcery.com>
5216 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5218 (lto_read_var_init): Declare.
5219 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5220 interface for reading variable initializers.
5221 * lto-elf.c (lto_elf_read_var_init): Remove.
5222 (lto_elf_file_vtable): Update initializer.
5223 (lto_elf_read_var_init): Add comment about unused-ness.
5224 * lto-read.c (lto_read_var_init): New.
5226 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5228 2007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
5230 * lto-read.c (lto_read_function_body): Moved declaration of fn
5233 2007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
5235 * lto-read.c (input_uleb128, input_string_internal, input_real,
5236 input_integer, input_record_start, input_list, get_type_ref,
5237 input_flags, input_expr_operand, input_expr_operand,
5238 input_expr_operand, input_local_vars, input_cfg, input_phi,
5239 input_ssa_names, input_bb, input_function): Added semicolons.
5242 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5244 * lto-read.c (input_globals): Remove debugging.
5245 (input_function): Set DECL_ARGUMENTS.
5247 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5249 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5250 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5251 (input_phi): Made work with operands other than SSA_NAMES and
5252 fixed processing of flags.
5253 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5254 (input_flags): New function.
5255 * lto-lang.c (lto_init): Changed state of in_lto_p.
5258 2007-07-24 Mark Mitchell <mark@codesourcery.com>
5260 * lto-tree.h (lto_varargs_cookie): Remove.
5261 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5262 skip_non_parameters, skip_parameters.
5263 (lto_varargs_cookie): Remove.
5264 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5266 (lto_read_abbrev): New function.
5267 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5269 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5270 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5271 (lto_file_read): Initialize new context fields.
5272 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5273 (lto_unsigned_type): Remove.
5274 (lto_signed_type): Likewise.
5275 (lto_signed_or_unsigned_type): Likewise.
5276 (lto_init): Do not create lto_varargs_cookie.
5277 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5278 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5279 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5281 2007-07-19 Jan Hubicka <jh@suse.cz>
5283 * lto-read.c (lto_read_function_body): Produce empty scope block
5286 2007-07-18 Mark Mitchell <mark@codesourcery.com>
5288 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5289 process local variables.
5290 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5292 2007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5294 * lto-read.c (input_list, input_expr_operand): Added struct
5296 (init_cfg, finalize_cfg): Removed function.
5297 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5298 (input_labels, input_local_vars): Now takes input_block parameter rather than
5300 (input_cfg, input_phi, input_ssa_names): New functions.
5301 (input_bb): Now passes in input_blocks. Does not construct cfg
5302 and processes the list of phi functions.
5303 (input_function): Now builds both the cfg and ssa_names table.
5304 (lto_read_function_body): Processes new header fields to construct
5305 streams for the ssa_names and cfg and their debugging.
5306 * lto/lto-lang.c (lto_init): Set in_lto_p.
5309 2007-06-28 Mark Mitchell <mark@codesourcery.com>
5311 * lto.h (lto_file_vtable): Add read_var_init.
5312 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5314 (lto_main): Remove bogus asserts.
5315 * lto-elf.c (tm.h): Include it.
5316 (libiberty.y): Likewise.
5317 (lto_elf_file): Add strtab and symtab. Rename
5318 string_table_section_index to sec_strtab.
5319 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5320 (lto_elf_get_shdr): New function.
5321 (lto_elf_free_shdr): Likewise.
5322 (lto_elf_find_section_data): Use them.
5323 (lto_elf_read_symtab): New function.
5324 (lto_elf_lookup_sym): Likewise.
5325 (lto_elf_free_sym): Likewise.
5326 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5327 (lto_elf_built_init): New function.
5328 (lto_elf_read_var_init): Likewise.
5329 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5331 2007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
5333 * lto-read (make_new_block): Initialize the stmt_list.
5334 (lto_static_init_local): Add debugging for missing codes.
5336 2007-06-26 Mark Mitchell <mark@codesourcery.com>
5338 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5339 unprototyped functions.
5341 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5343 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5344 Handle DW_AT_MIPS_linkage_name.
5345 (lto_read_subroutine_type_subprogram): Likewise. Correct
5347 (lto_main): Remove incorrect assertions.
5348 * lto-symbtab.c: Build function types out of TREE_LISTs.
5350 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5352 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5354 2007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
5356 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5357 dummy since ggc does not like empty structs.
5358 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5359 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5360 expr->common to expr->base.
5361 (make_new_block): Moved stmt_list to proper place.
5364 2007-03-14 Robert Kennedy <jimbob@google.com>
5366 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5367 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5368 assembler name from DWARF.
5369 * lto-lang.c (lto_set_decl_assembler_name) New function.
5371 2006-09-10 Mark Mitchell <mark@codesourcery.com>
5373 * lto.h (lto_file_vtable): New structure.
5374 (lto_file): Add vtable pointer.
5375 (lto_file_init): Add vtable paramter.
5376 (lto_read_function_body): New function.
5377 (lto_symtab_merge_fn): New function.
5378 * lto.c (lto_file_init): Add vtable parameter.
5379 (lto_read_form): Fill in entries for DW_AT_prototyped,
5381 (lto_read_subroutine_type_subprogram_DIE): New function.
5382 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5384 * lto-elf.c (lto_elf_vile_vtable): New variable.
5385 (lto_elf_file_open): Pass it to lto_file_init.
5386 (lto_elf_map_fn_body): New function.
5387 (lto_elf_unmap_fn_body): Likewise.
5388 * lto-read.c: New file.
5389 * lto-symtab.c (lto_symtab_merge_fn): New function.
5390 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5391 tree_rest_of_compilation.
5392 * Make-lang.in (LTO_OBJS): Add lto-read.o
5393 (lto-read.o): New target.
5395 2006-09-03 Mark Mitchell <mark@codesourcery.com>
5397 * lto.c (<inttypes.h>): Don't include it.
5398 (lto_context): Don't typedef it.
5399 (lto_resolve_reference): New function.
5400 (lto_read_form): Use it.
5401 (lto_resolve_type_ref): New function.
5402 (lto_resolve_var_ref): Likewise.
5403 (lto_resolve_fn_ref): Likewise.
5404 * lto.h (<inttypes.h>): Include it.
5405 (lto_context): New type.
5406 (lto_ref): New structure.
5407 (lto_resolve_type_ref): Declare.
5408 (lto_resolve_var_ref): Likewise.
5409 (lto_resolve_fn_ref): Likewise.
5411 2006-08-18 Mark Mitchell <mark@codesourcery.com>
5413 * lang-specs.h: New file.
5415 2006-08-14 Mark Mitchell <mark@codesourcery.com>
5417 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5418 (lto_info_fd_close): Deallocate it.
5419 (lto_die_cache_entry): New structure.
5420 (lto_cache_hash): New function.
5421 (lto_cache_eq): Likewise.
5422 (lto_cache_store_DIE): Likewise.
5423 (lto_cache_lookup_DIE): Likewise.
5424 (lto_read_referenced_type_DIE): Use the cache.
5425 (lto_read_pointer_type_DIE): Robustify.
5426 (lto_read_DIE): Use the cache.
5427 * lto.h (hashtab.h): Include.
5428 (lto_info_fd): Add DIE cache.
5429 * Make-lang.in (LTO_H): New variable.
5430 (lto/lto-lang.o): Use LTO_H.
5431 (lto/lto-elf.o): Likewise.
5432 (lto/lto-symtab.o): Likewise.
5434 2006-07-09 Mark Mitchell <mark@codesourcery.com>
5436 * lto.c (lto_abi_mismatch_error): New function.
5437 (lto_abbrev_read): Initialize num_abbrevs.
5438 (lto_read_form): Specify allowed form classes for
5439 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5440 (lto_read_variable_formal_parameter_constant_DIE): Handle
5441 DW_AT_declaration. Call lto_symtab_merge_var.
5442 (lto_read_pointer_type_DIE): New function.
5443 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5444 not creat TYPE_DECLs for types that already have them.
5445 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5446 (lto_set_cu_context): Make cu_start point to the header, not the
5448 (lto_file_read): Adjust for change to lto_set_cu_context.
5449 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5450 (lto/lto-symtab.o): New rule.
5451 * lto-tree.h (lang_identifier): Add decl field.
5452 (LANG_IDENTIFIER_CAST): New macro.
5453 (LTO_IDENTIFIER_DECL): Likewise.
5454 (lto_symtab_merge_var): Declare.
5455 * lto-symtab.c: New file.
5457 2006-07-02 Daniel Berlin <dberlin@dberlin.org>
5459 * lto.c (lto_context): Add current_cu and info_fd members.
5460 (DWARF2_CompUnit): New structure.
5461 (lto_read_DIE): Take lto_info_fd *.
5462 (lto_read_child_DIEs): Ditto.
5463 (lto_file_corrupt_error): Constify argument.
5464 (lto_set_cu_context): New function
5465 (lto_info_fd_init): Ditto.
5466 (lto_info_fd_close): Ditto.
5467 (lto_file_init): Use lto_info_fd_init.
5468 (lto_file_close): Use lto_info_fd_close.
5469 (lto_read_initial_length): Pass in pointer to header size.
5470 (lto_read_comp_unit_header): Correct cu_length to
5471 real length from beginning of header. Take lto_info_fd * as
5473 (find_cu_for_offset): New function.
5474 (lto_read_form): Change first argument to lto_info_fd *.
5475 Add FORM_CONTEXT argument.
5476 Handle DW_FORM_ref_addr.
5477 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5478 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5479 Swap contexts if necessary for form.
5480 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5481 lto_file_corrupt_error.
5482 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5483 (lto_read_referenced_type_DIE): Change first argument to
5484 lto_info_fd *. Access lto_fd fields through base pointer.
5485 (lto_read_compile_unit_DIE): Change first argument to an
5487 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5488 (lto_read_base_type_DIE): Ditto.
5489 (lto_read_child_DIEs): Ditto.
5490 (lto_read_DIE): Ditto. Change type of function pointer.
5491 (lto_info_read): New function.
5492 (lto_set_cu_context): Ditto.
5493 (lto_file_read): Use lto_info_read, walk resulting CU's
5494 (lto_main): Update for lto_info_fd change.
5495 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5497 * lto.h (DWARF2_CompUnit): New structure.
5498 (lto_info_fd): Ditto.
5499 (lto_file): Change debug_info to be an lto_info_fd.
5501 2006-06-25 Mark Mitchell <mark@codesourcery.com>
5503 * lto.c (toplev.h): Include it.
5504 (dwarf2.h): Likewise.
5507 (cgraph.h): Likewise.
5509 (inttypes.h): Likewise.
5510 (DWARF2_attr): New type.
5511 (DWARF2_abbrev): Likewise.
5512 (DWARF2_class): Likewise.
5513 (DWARF2_form_data): Likewise.
5514 (lto_context): Likewise.
5515 (lto_fd_init): New function.
5516 (lto_abbrev_fd_init): Likewise.
5517 (lto_abbrev_fd_close): Likewise.
5518 (lto_file_init): Use them.
5519 (lto_file_close): New function.
5520 (lto_file_corrupt_error): Likewise.
5521 (LTO_CHECK_INT_VAL): New macro.
5522 (lto_check_size_t_val): New function.
5523 (lto_check_int_val): Likewise.
5524 (LTO_READ_TYPE): New macro.
5525 (lto_read_ubyte): New function.
5526 (lto_read_uhalf): Likewise.
5527 (lto_read_uword): Likewise.
5528 (lto_read_uleb128): Likewise.
5529 (lto_read_initial_length): Likewise.
5530 (lto_abbrev_read_attrs): Likewise.
5531 (lto_abbrev_read): Likewise.
5532 (lto_abbrev_lookup): Likewise.
5533 (lto_read_section_offset): Likewise.
5534 (lto_read_comp_unit_header): Likewise.
5535 (lto_read_form): Likewise.
5536 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5537 (LTO_BEGIN_READ_ATTRS): Likewise.
5538 (LTO_END_READ_ATTRS): Likewise.
5539 (lto_unsupported_attr_error): New function.
5540 (lto_get_identifier): Likewise.
5541 (lto_read_referenced_type_DIE): Likewise.
5542 (lto_read_compile_unit_DIE): Likewise.
5543 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5544 (lto_read_base_type_DIE): Likewise.
5545 (lto_read_DIE): Likewise.
5546 (lto_read_child_DIEs): Likewise.
5547 (lto_file_read): Read DIEs.
5548 (lto_main): Ask middle end to emit entities.
5549 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5550 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5551 (lto_elf_file_close): Likewise.
5552 * lto.h (lto_file): Declare.
5553 (DWARF2_abbrev): Likewise.
5555 (lto_abbrev_fd): Likewise.
5556 (lto_file): Use new types.
5557 (lto_file_close): Declare.
5558 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5560 2006-06-18 Mark Mitchell <mark@codesourcery.com>
5564 * lto-elf.c: New file.
5565 * lto-lang.c (flags.h): Include it.
5567 (lto_init): New function.
5568 (lto_write_globals): Remove.
5569 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5570 (LANG_HOOKS_INIT): Define.
5571 (LANG_HOOKS_PARSE_FILE): Likewise.
5572 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5573 (LTO_EXE): Link with libelf.
5574 (lto/lto-lang.o): Update dependencies.
5575 (lto/lto.o): New target.
5576 (lto/lto-elf.o): Likewise.
5578 2006-06-12 Mark Mitchell <mark@codesourcery.com>
5580 * config-lang.in: New file.
5581 * Make-lang.in: Likewise.
5582 * lto-tree.h: Likewise.
5583 * lto-lang.c: Likewise.
5585 Copyright (C) 2006-2017 Free Software Foundation, Inc.
5587 Copying and distribution of this file, with or without modification,
5588 are permitted in any medium without royalty provided the copyright
5589 notice and this notice are preserved.