1 2018-01-25 Release Manager
5 2017-08-14 Release Manager
9 2017-05-02 Release Manager
13 2017-04-12 Richard Biener <rguenther@suse.de>
14 Bernd Edlinger <bernd.edlinger@hotmail.de>
17 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
19 2017-02-14 Martin Liska <mliska@suse.cz>
21 * lto.c (do_stream_out): Free LTO file filename string.
23 2017-01-19 David Malcolm <dmalcolm@redhat.com>
25 * lto-lang.c (builtin_type_for_size): Convert call to
26 lto_type_for_size to one through the langhook.
27 (lto_type_for_size): Move to langhooks.c and rename to
29 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
31 2017-01-11 Jakub Jelinek <jakub@redhat.com>
34 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
37 2017-01-09 Jakub Jelinek <jakub@redhat.com>
41 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
43 2017-01-06 Nathan Sidwell <nathan@acm.org>
45 * lto-partition.c (promote_symbol): Write to dump file sooner,
46 include alias promoting too.
48 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
49 (may_need_named_section_p): Likewise.
50 (rename_statics): Likewise.
51 (lto_promote_cross_file_statics): Likewise.
53 2017-01-01 Jakub Jelinek <jakub@redhat.com>
55 Update copyright years.
57 2016-11-30 Georg-Johann Lay <avr@gjlay.de>
60 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
61 mismatch if the two types are built-in.
63 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
65 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
67 2016-11-23 Richard Biener <rguenther@suse.de>
70 * lto.c (hash_canonical_type): Ignore zero-sized fields.
72 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
75 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
77 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
78 Alan Hayward <alan.hayward@arm.com>
79 David Sherwood <david.sherwood@arm.com>
81 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
83 2016-10-31 Richard Biener <rguenther@suse.de>
86 * lto.c (do_whole_program_analysis): Bail out after errors
89 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
91 * lto-partition.c: Include tree-vrp.h.
94 2016-09-20 Richard Biener <rguenther@suse.de>
96 * lto.c (lto_main): Call early_finish with "<artificial>" as
99 2016-09-19 Richard Biener <rguenther@suse.de>
101 * lto.c (lto_main): Invoke early_finish debug hook.
103 2016-07-25 Richard Biener <rguenther@suse.de>
105 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
106 (unify_scc): Likewise.
107 (lto_read_decls): Likewise.
109 2016-06-28 Jakub Jelinek <jakub@redhat.com>
111 * Make-lang.in: Don't cat ../stage_current if it does not exist.
113 2016-06-23 Andi Kleen <ak@linux.intel.com>
115 * Make-lang.in: Add support for autofdo (disabled for now)
117 2016-06-10 Martin Sebor <msebor@redhat.com>
120 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
121 attribute in type-generic builtins.
123 2016-05-16 Jan Hubicka <hubicka@ucw.cz>
125 * lto-partition.c (add_symbol_to_partition_1): Likewise.
127 2016-05-03 Jan Hubicka <hubicka@ucw.cz>
129 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
131 2016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
133 * lto-partition.h (lto_balanced_map): New parameter.
134 * lto-partition.c (lto_balanced_map): New parameter
136 Check if partition size is greater than max_partition_size.
137 * lto.c (do_whole_program_analysis): Adjust calls to
138 lto_balanced_map() to pass 2nd argument.
140 2016-03-17 H.J. Lu <hongjiu.lu@intel.com>
143 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
146 2016-03-08 Jakub Jelinek <jakub@redhat.com>
148 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
149 - becuase -> because.
151 2016-02-15 Tom de Vries <tom@codesourcery.com>
154 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
157 2016-01-27 Martin Liska <mliska@suse.cz>
159 * lto-partition.c (add_symbol_to_partition_1): Remove usage
162 2016-01-19 Jan Hubicka <hubicka@ucw.cz>
165 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
166 decls have no assemblernames.
168 2016-01-19 Martin Liska <mliska@suse.cz>
169 Martin Jambor <mjambor@suse.cz>
171 * lto-partition.c: Include "hsa.h"
172 (add_symbol_to_partition_1): Put hsa implementations into the
173 same partition as host implementations.
175 2016-01-12 Jan Hubicka <hubicka@ucw.cz>
178 * lto-partition.c (rename_statics): Fix pasto.
180 2016-01-18 Richard Biener <rguenther@suse.de>
183 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
184 function vs. variable.
186 2016-01-12 Richard Biener <rguenther@suse.de>
189 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
190 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
192 2016-01-04 Jakub Jelinek <jakub@redhat.com>
194 Update copyright years.
196 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
199 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
200 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
201 (lto_symtab_prevailing_decl): Use it.
203 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
205 * lto.c: Include stringpool.h and fold-const.h.
206 (offload_handle_link_vars): New static function.
207 (lto_main): Call offload_handle_link_vars.
209 2015-12-10 Jan Hubicka <hubicka@ucw.cz>
211 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
213 2015-12-11 Jan Hubicka <hubicka@ucw.cz>
216 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
217 values of error and warning attributes.
219 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
222 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
224 (LTO_NO_PREVAIL): Use gcc_checking_assert.
226 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
229 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
232 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
235 * lto-symtab.c: Include lto-symtab.h.
236 (lto_cgraph_replace_node): Do not merge profiles here.
237 (lto_symtab_merge_p): New function.
238 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
239 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
241 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
242 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
243 * lto.c: Include lto-symtab.h
246 2015-12-08 Jan Hubicka <hubicka@ucw.cz>
249 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
250 are not part of the definition.
251 (contained_in_symbol): Likewise.
252 (promote_symbol): When promoting a symbol also promote all transparent
254 (rename_statics): Weakref needs unique name, too.
256 2015-12-07 Jan Hubicka <hubicka@ucw.cz>
259 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
260 rename_statics, rename_statics): Handle transparent aliases.
262 2015-12-04 Jan Hubicka <hubicka@ucw.cz>
264 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
267 2015-12-01 Jan Hubicka <hubicka@ucw.cz>
269 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
271 2015-11-25 Jan Hubicka <jh@suse.cz>
273 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
274 * lang.opt (lto_linker_output): New enum.
275 (flinker_output): New flag.
277 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
279 * lto-symtab.c: Include alias.h
280 (warn_type_compatibility_p): Replace types_compatible_p checks by
281 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
282 (lto_symtab_merge): Compare DECL sizes.
283 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
285 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
287 * lto.c (iterative_hash_canonical_type): Recruse for all types
288 which pass !canonical_type_used_p.
289 (gimple_register_canonical_type_1): Sanity check we do not compute
290 canonical type of anything with !canonical_type_used_p.
291 (gimple_register_canonical_type): Skip all types that are
292 !canonical_type_used_p
294 2015-11-24 Jan Hubicka <hubicka@ucw.cz>
296 * lto.c (unify_scc): Use free_node.
298 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
300 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
301 (gimple_register_canonical_type_1): Check that pointers do not get
303 (gimple_register_canonical_type): Do not register pointers.
305 2015-11-21 Jan Hubicka <hubicka@ucw.cz>
307 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
308 flag for types that are not ODR; fix loop walking parameters.
310 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
312 * lto-lang.c: Remove unused header files.
313 * lto-object.c: Likewise.
314 * lto-partition.c: Likewise.
315 * lto-symtab.c: Likewise.
318 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
320 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
322 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
324 * lto-lang.c: Don't undef DEF_BUILTIN.
326 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
328 * lto-lang.c: Reorder #include's and remove duplicates.
329 * lto-object.c: Likewise.
330 * lto-partition.c: Likewise.
331 * lto-symtab.c: Likewise.
334 2015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
336 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
338 (lto_fixup_state): Likewise.
339 (do_whole_program_analysis): Use
340 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
343 2015-10-13 Jakub Jelinek <jakub@redhat.com>
345 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
346 DEF_FUNCTION_TYPE_11): Define.
348 2015-10-10 Jan Hubicka <hubicka@ucw.cz>
350 * lto.c (hash_canonical_type): Honor
351 type_with_interoperable_signedness.
353 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
355 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
356 (DEF_FUNCTION_TYPE_VAR_11): Delete.
358 2015-08-31 Richard Biener <rguenther@suse.de>
360 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
361 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
362 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
363 participate in merging with something else.
365 2015-08-31 Richard Biener <rguenther@suse.de>
367 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
368 test, do not replace a non-builtin with a builtin.
369 * lto.c (compare_tree_sccs_1): Do not merge things we stream
370 as builtins vs. non-builtins.
372 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
374 * lto.h: Remove useless typedefs.
376 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
378 * lto.c: Remove redundant includes.
380 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
382 * lto-lang.c: Fix double word typos.
384 2015-07-10 Andrew MacLeod <amacleod@redhat.com>
386 * lto.c: Include cfghooks.h rather than predict.h.
388 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
390 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
392 * lto-object.c: Likewise.
393 * lto-partition.c: Likewise.
394 * lto-symtab.c: Likewise.
396 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
398 * lto-lang.c: Adjust includes for flags.h changes.
400 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
402 * lto-lang.c: Adjust includes.
403 * lto-object.c: Likewise.
404 * lto-partition.c: Likewise.
405 * lto-symtab.c: Likewise.
408 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
410 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
411 * lto-object.c: Likewise.
412 * lto-partition.c: Likewise.
413 * lto-symtab.c: Likewise.
414 * lto-tree.h: Likewise.
417 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
419 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
420 than typed_noop_remove. Remove redudant typedefs.
422 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
424 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
425 * lto-object.c: Likewise.
426 * lto-partition.c: Likewise.
427 * lto-symtab.c: Likewise.
430 2015-06-14 Jan Hubicka <hubicka@ucw.cz>
433 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
435 2015-06-12 DJ Delorie <dj@redhat.com>
437 * lto-lang.c (lto_type_for_size): Include intN types.
438 (lto_type_for_mode): Likewise.
440 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
442 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
444 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
446 * lto-lang.c : Adjust include files.
447 * lto-object.c : Likewise.
448 * lto-partition.c : Likewise.
449 * lto-partition.h : Likewise.
450 * lto-symtab.c : Likewise.
454 2015-06-06 Jan Hubicka <hubicka@ucw.cz>
457 * lto-symtab.c (warn_type_compatibility_p): Fix call of
458 odr_or_derived_type_p.
459 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
461 2015-06-08 Jan Hubicka <hubicka@ucw.cz>
464 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
467 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
469 * lto-lang.c (lto_write_globals): Remove.
470 (LANG_HOOKS_WRITE_GLOBALS): Same.
472 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
474 * lto-lang.c: Adjust includes for restructured coretypes.h.
475 * lto-object.c: Likewise.
476 * lto-partition.c: Likewise.
477 * lto-symtab.c: Likewise.
480 2015-06-04 Jan Hubicka <hubicka@ucw.cz>
482 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
484 2015-06-03 Jan Hubicka <hubicka@ucw.cz>
486 * lto.c (iterative_hash_canonical_type,
487 gimple_register_canonical_type): only hash main variants of types
489 2015-05-27 Martin Liska <mliska@suse.cz>
491 * lto-partition.c (new_partition): Reset number of symbols.
492 (add_symbol_to_partition_1): Increment number of symbols.
493 (undo_partition): Decrement number of symbols.
494 (lto_balanced_map): Dump number of symbols and insns that
495 belong to a partition.
496 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
498 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
500 * lto.c (hash_canonical_type): Be sure we hash only types that
502 (gimple_register_canonical_type_1): Do not produce canonical
503 types for types that do not need alias sets.
505 2015-05-22 Jan Hubicka <hubicka@ucw.cz>
507 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
509 2015-05-19 Jan Hubicka <hubicka@ucw.cz>
511 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
513 2015-05-17 Jan Hubicka <hubicka@ucw.cz>
515 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
516 compare ODR types (if available) and function types.
517 (lto_symtab_merge): ... here; output ODR violation warnings
518 and call warn_types_mismatch.
520 2015-04-29 Jan Hubicka <hubicka@ucw.cz>
522 * lto.c (lto_fixup_state): Call verify_type.
524 2015-04-18 Trevor Saunders <tsaunders@mozilla.com>
526 * lto.c: Adjust for hash_table changes.
528 2015-03-27 Jan Hubicka <hubicka@ucw.cz>
530 * lto.c (lto_read_decls): Move code registering odr types out
531 of TYPE_CANONICAL conditional and also register polymorphic types.
533 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
535 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
536 DECL_ARTIFICAL symbols.
538 2015-03-26 Jan Hubicka <hubicka@ucw.cz>
541 * lto.c (unify_scc): Revert location cache when unification
543 (lto_read_decls): Accept location cache after sucess;
544 apply location cache before calling debug hooks.
546 2015-03-10 Jan Hubicka <hubicka@ucw.cz>
548 * lto.c (read_cgraph_and_symbols): Do not do merging
551 2015-02-26 Jakub Jelinek <jakub@redhat.com>
553 * lto.c (lto_mode_identity_table): New variable.
554 (lto_read_decls): Add mode_table argument to the lto_input_block
556 (lto_file_finalize): Initialize mode_table.
557 (lto_init): Initialize lto_mode_identity_table.
559 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
562 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
564 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
566 2015-02-03 Jan Hubicka <hubicka@ucw.cz>
568 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
570 2015-01-30 Joseph Myers <joseph@codesourcery.com>
572 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
573 changed to pass input_location as first argument.
575 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
577 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
579 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
581 * lto.c (compare_tree_sccs_1): Add comparsion of
582 DECL_FUNCTION_SPECIFIC_TARGET
584 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
585 James Norris <jnorris@codesourcery.com>
587 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
589 * lto.c: Include "gomp-constants.h".
591 2015-01-14 Ilya Verbin <ilya.verbin@intel.com>
593 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
594 from select_what_to_stream.
596 2015-01-09 Bernd Schmidt <bernds@codesourcery.com>
597 Jakub Jelinek <jakub@redhat.com>
600 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
603 2015-01-09 Michael Collison <michael.collison@linaro.org>
605 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
606 input.h, alias.h, symtab.h, options, fold-const.h,
607 wide-int.h, and inchash.h due to flattening of tree.h.
608 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
609 input.h, alias.h, symtab.h, fold-const.h,
610 wide-int.h, and inchash.h due to flattening of tree.h.
611 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
612 input.h, alias.h, symtab.h, options, fold-const.h,
613 wide-int.h, and inchash.h due to flattening of tree.h.
614 * lto-partition.c: Ditto.
615 * lto-symtab.c: Ditto.
617 2015-01-05 Jakub Jelinek <jakub@redhat.com>
619 Update copyright years.
621 2014-12-22 Martin Liska <mliska@suse.cz>
623 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
625 (undo_partition): Likewise.
626 (lto_balanced_map): Likewise.
628 2014-12-22 Martin Liska <mliska@suse.cz>
630 * lto-partition.c: Include of symbol-summary.h is added.
631 * lto-symtab.c: Likewise.
634 2014-12-11 Jan Hubicka <hubicka@ucw.cz>
637 * lto.c (read_cgraph_and_symbols): Update call of
638 remove_unreachable_nodes.
639 (do_whole_program_analysis): Remove call of
640 symtab->remove_unreachable_nodes
642 2014-12-08 Trevor Saunders <tsaunders@mozilla.com>
644 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
645 htab with malloc instead of ggc.
647 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
649 * lto.c: Replace htab with hash_table.
651 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
653 * lto.c (lto_read_in_decl_state): Adjust.
654 (lto_fixup_state): Likewise.
656 2014-11-17 Jan Hubicka <hubicka@ucw.cz>
658 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
660 2014-11-14 Jan Hubicka <hubicka@ucw.cz>
662 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
664 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
665 Bernd Schmidt <bernds@codesourcery.com>
666 Andrey Turetskiy <andrey.turetskiy@intel.com>
667 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
669 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
671 2014-11-13 Ilya Verbin <ilya.verbin@intel.com>
672 Ilya Tocar <ilya.tocar@intel.com>
673 Andrey Turetskiy <andrey.turetskiy@intel.com>
674 Bernd Schmidt <bernds@codesourcery.com>
676 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
677 LTO_SECTION_NAME_PREFIX.
678 * lto-partition.c (lto_promote_cross_file_statics): Call
679 select_what_to_stream.
680 * lto.c (lto_section_with_id): Use section_name_prefix instead of
681 LTO_SECTION_NAME_PREFIX.
682 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
683 being built as an offload compiler.
685 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
687 * lto-lang.c: Remove redundant enum from machine_mode.
689 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
691 * lto.c: Adjust include files.
693 * lto-object.c: Ditto.
694 * lto-partition.c: Ditto.
695 * lto-symtab.c: Ditto.
697 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
699 * lto-lang.c: Adjust include files.
700 * lto-object.c: Ditto.
701 * lto-partition.c: Ditto.
702 * lto-symtab.c: Ditto.
705 2014-10-16 DJ Delorie <dj@redhat.com>
707 * lto-object.c (lto_obj_begin_section): In the event that pointer
708 sizes aren't powers of two, choose a more suitable alignment
711 2014-10-14 DJ Delorie <dj@redhat.com>
713 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
715 (lto_init): Initialize all intN types, not just int128.
717 2014-10-06 Martin Liska <mliska@suse.cz>
719 * lto.c (stream_out): ARG_UNUSED added for last argument.
721 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
723 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
726 2014-09-23 Andi Kleen <ak@linux.intel.com>
728 * lto-partition.c (node_cmp): Update comment.
729 (varpool_node_cmp): Use symtab_node for comparison.
730 (add_sorted_nodes): New function.
731 (lto_balanced_map): Change to keep ordered queue
732 of ordered node. Handle no_reorder attribute.
734 2014-09-11 Jan Hubicka <hubicka@ucw.cz>
736 * lto.c (lto_read_decls): Register ODR types.
738 2014-08-20 Jan Hubicka <hubicka@ucw.cz>
740 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
742 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
744 2014-08-14 Jan Hubicka <hubicka@ucw.cz>
746 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
748 2014-08-14 Richard Biener <rguenther@suse.de>
751 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
753 2014-08-08 Richard Biener <rguenther@suse.de>
755 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
757 2014-08-08 Bin Cheng <bin.cheng@arm.com>
760 * lto-lang.c (lto_init): Switch mis-matched arguments.
762 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
764 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
766 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
768 * lto-partition.c, lto-partition.h: Use hash_set instead of
771 2014-07-31 Andi Kleen <ak@linux.intel.com>
773 * lto.c (hash_canonical_type): Use inchash::hash
774 and use inchash::add_expr.
775 (iterative_hash_canonical_type): Dito.
777 2014-07-30 Richard Biener <rguenther@suse.de>
779 * lto-streamer.h (lto_write_data): New function.
780 * langhooks.c (lhd_append_data): Do not free block.
781 * lto-section-out.c (lto_write_data): New function writing
782 raw data to the current section.
783 (lto_write_stream): Adjust for langhook semantic change.
784 (lto_destroy_simple_output_block): Write header directly.
785 * lto-opts.c (lto_write_options): Write options directly.
786 * lto-streamer-out.c (produce_asm): Write heaeder directly.
787 (lto_output_toplevel_asms): Likewise.
788 (copy_function_or_variable): Copy data directly.
789 (write_global_references): Output index table directly.
790 (lto_output_decl_state_refs): Likewise.
791 (write_symbol): Write data directly.
792 (produce_symtab): Adjust.
793 (produce_asm_for_decls): Output header and refs directly.
795 2014-07-25 Andi Kleen <ak@linux.intel.com>
797 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
799 2014-07-25 Andi Kleen <ak@linux.intel.com>
801 * lto.c (hash_canonical_type): Convert to inchash.
802 (iterative_hash_canonical_type): Dito.
804 2014-07-25 Andi Kleen <ak@linux.intel.com>
806 * lto.c: Include inchash.h
808 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
810 * lto.c (mentions_vars_p_decl_non_common): Skip
812 mentions_vars_p_function): Do DECL_ARGUMENTS.
813 (lto_fixup_prevailing_decls): Update.
815 2014-07-12 Jan Hubicka <hubicka@ucw.cz>
817 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
819 (materialize_cgraph): Do not push GIMPLE_IN timevar.
821 2014-07-11 Jan Hubicka <hubicka@ucw.cz>
823 * lto-partition.c (add_references_to_partition): Use
824 varpool_ctor_useable_for_folding_p.
825 * lto.c (lto_read_in_decl_state): Update sanity check.
827 2014-07-01 Martin Liska <mliska@suse.cz>
829 IPA REF alias refactoring
830 * lto-partition.c (add_symbol_to_partition_1): Usage of
831 FOR_EACH_ALIAS added.
833 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
836 * lto.c (lto_copy_fields_not_streamed): New function.
837 (compare_tree_sccs_1): Do not compare fields shared in between type
839 (lto_read_decls): Fixup types first before inserting into hash.
841 2014-06-28 Andrew Pinski <apinski@cavium.com>
843 * lto.c (lto_read_decls): Fix comment in comment.
845 2014-06-28 Jan Hubicka <hubicka@ucw.cz>
847 * lto.c (lto_copy_fields_not_streamed): New function.
848 (compare_tree_sccs_1): Do not compare fields shared in between type
850 (lto_read_decls): Fixup types first before inserting into hash.
852 2014-06-25 Martin Liska <mliska@suse.cz>
854 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
856 (add_symbol_to_partition_1): Likewise.
857 (lto_balanced_map): Likewise.
858 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
860 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
862 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
863 (mentions_vars_p_function): ... here.
864 (compare_tree_sccs_1): Update VINDEX checks.
865 (lto_fixup_prevailing_decls): Likewise.
867 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
869 * lto.c (canonical_type_hash_cache): Use hash_map instead of
872 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
876 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
878 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
880 2014-06-20 Jan Hubicka <hubicka@ucw.cz>
882 * lto.c (compare_tree_sccs_1): Do not compare priorities.
884 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
886 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
888 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
890 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
891 (do_whole_program_analysis): Use verify_symtab.
893 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
895 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
896 lto_fixup_prevailing_decls): Skip section names.
898 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
900 * lto-symtab.c: Include builtins.h.
902 2014-05-26 Richard Biener <rguenther@suse.de>
904 * lto.c (lto_parse_hex): Use int64_t.
905 (lto_resolution_read): Likewise.
907 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
909 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
911 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
913 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
915 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
917 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
919 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
920 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
921 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
923 2012-05-22 Bernd Schmidt <bernds@codesourcery.com>
925 * lto-object.c: Include "lto-section-names.h".
926 (LTO_SEGMENT_NAME): Don't define.
927 * lto.c: Include "lto-section-names.h".
929 2014-05-17 Jan Hubicka <hubicka@ucw.cz>
932 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
933 mixed with variables.
935 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
937 * lto-tree.h: Don't use variable_size gty attribute.
938 * lto.c (lto_read_in_decl_state): Adjust.
939 (create_subid_section_table): Likewise.
940 (lto_flatten_files): Likewise.
941 (read_cgraph_and_symbols): Likewise.
943 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
944 Mike Stump <mikestump@comcast.net>
945 Richard Sandiford <rdsandiford@googlemail.com>
947 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
948 * lto-lang.c (get_nonnull_operand): Likewise.
950 2014-04-28 Richard Biener <rguenther@suse.de>
953 * lto-lang.c: Define flag_isoc11.
955 2014-04-23 David Malcolm <dmalcolm@redhat.com>
957 * lto-partition.c (add_references_to_partition): Update for
958 removal of implicit pointer from the is-a.h API.
959 (add_symbol_to_partition_1): Likewise.
960 (contained_in_symbol): Likewise.
961 (undo_partition): Likewise.
962 (lto_balanced_map): Likewise.
963 (promote_symbol): Likewise.
964 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
965 (lto_symtab_merge_symbols): Likewise.
966 * lto.c (lto_wpa_write_files): Likewise.
968 2014-04-15 Richard Biener <rguenther@suse.de>
970 * lto.c: Include params.h.
971 (do_whole_program_analysis): Switch on flag_lto_partition value,
972 add support for LTO_PARTITION_ONE.
973 * lto-partition.h (lto_balanced_map): Adjust.
974 * lto-partition.c (lto_balanced_map): Get number of desired
975 partitions as argument to support -flto-partition=one.
977 2014-04-14 Jan Hubicka <hubicka@ucw.cz>
979 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
982 2014-03-19 Jan Hubicka <hubicka@ucw.cz>
984 * lto.c: Include ipa-inline.h
985 (do_whole_program_analysis): Free inline summary after partitioning.
987 2014-03-19 Richard Biener <rguenther@suse.de>
990 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
991 instead of TREE_CHAIN as chain_next.
993 2014-03-19 Richard Biener <rguenther@suse.de>
995 * lto.c (lto_wpa_write_files): Move call to
996 lto_promote_cross_file_statics ...
997 (do_whole_program_analysis): ... here, into the partitioning
998 block. Do not ggc_collect after lto_wpa_write_files but
999 for a last time before it.
1001 2014-03-19 Jakub Jelinek <jakub@redhat.com>
1004 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1007 2014-03-18 Jakub Jelinek <jakub@redhat.com>
1010 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1011 and complex_{float,{,long_}double}_type_node.
1013 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
1015 * lto-lang.c (lto_init): Pass flag_short_double to
1016 build_common_tree_nodes.
1018 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
1021 * lto.c (stream_out): Avoid parallel streaming with
1022 -flto=jobserver until we are able to throttle it down
1025 2014-02-14 Jan Hubicka <hubicka@ucw.cz>
1027 * lto-partition.c (add_symbol_to_partition_1,
1028 undo_partition, lto_balanced_map): Aliases have no
1030 (lto_balanced_map): Do not follow refering variables
1031 if they can be optimized out.
1033 2014-02-14 Richard Biener <rguenther@suse.de>
1036 * lto.c (compare_tree_sccs_1): Do not compare
1037 DECL_FUNCTION_SPECIFIC_TARGET.
1038 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1040 2014-02-12 Richard Biener <rguenther@suse.de>
1043 * lto-lang.c (lto_write_globals): Do not call
1044 wrapup_global_declarations or emit_debug_global_declarations
1045 but emit debug info for non-function scope variables
1048 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1050 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1052 2014-02-06 Jan Hubicka <hubicka@ucw.cz>
1055 * lto-partition.c (symbol_class): Move to cgraph.h
1056 (get_symbol_class): Move to symtab.c
1057 (add_references_to_partition, add_symbol_to_partition_1,
1058 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1059 lto_promote_cross_file_statics): Update.
1061 2014-02-05 Jan Hubicka <hubicka@ucw.cz>
1063 * lto.c (lto_parallelism): New static var.
1064 (do_stream_out, wait_for_child, stream_out): New static functions.
1065 (lto_wpa_write_files): Add support for parallel streaming.
1066 (do_whole_program_analysis): Set parallelism.
1067 * lang.opt (fwpa): Add parameter.
1068 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1069 (lto_init): Update use of flag_wpa.
1070 * lto-streamer.h (asm_nodes_output): Declare.
1072 2014-02-05 Richard Biener <rguenther@suse.de>
1074 * lto.h (lto_global_var_decls): Remove.
1075 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1076 (lto_write_globals): Do nothing in WPA stage, gather globals from
1077 the varpool here ...
1078 * lto.c (lto_main): ... not here.
1079 (materialize_cgraph): Do not call rest_of_decl_compilation
1080 on the empty lto_global_var_decls vector.
1081 (lto_global_var_decls): Remove.
1083 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
1085 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1086 needs duplicating, not generic COMDAT.
1088 2014-02-04 Richard Biener <rguenther@suse.de>
1091 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1092 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1094 2014-02-04 Jan Hubicka <hubicka@ucw.cz>
1098 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1099 merge force_output and forced_by_abi flags.
1101 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1103 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1106 2014-01-09 Richard Biener <rguenther@suse.de>
1108 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1110 2014-01-09 Richard Biener <rguenther@suse.de>
1113 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1114 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1115 (gimple_canonical_types_compatible_p): Do not compare them either.
1117 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1119 Update copyright years
1121 2013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1123 * lto.c: Remove struct tags when referring to class varpool_node.
1124 * lto-partition.c: Likewise.
1125 * lto-symtab.c: Likewise.
1127 2013-11-29 Jakub Jelinek <jakub@redhat.com>
1128 Richard Biener <rguenther@suse.de>
1131 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1133 2013-11-29 Jakub Jelinek <jakub@redhat.com>
1136 * lto.c (mentions_vars_p_omp_clause): New function.
1137 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1140 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1142 * lto.c: Add required include files from gimple.h.
1143 * lto-lang.c: Likewise
1144 * lto-object.c: Likewise
1145 * lto-partition.c: Likewise
1146 * lto-symtab.c: Likewise
1148 2013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1150 * lto-partition.c lto-symtab.c lto.c Adjust.
1152 2013-11-14 Diego Novillo <dnovillo@google.com>
1154 * lto-lang.c: Include stringpool.h.
1155 Include stor-layout.h.
1156 * lto-partition.c: Include gcc-symtab.h.
1157 * lto.c: Include stor-layout.h.
1159 2013-10-31 David Malcolm <dmalcolm@redhat.com>
1161 Automated part of renaming of symtab_node_base to symtab_node.
1163 Patch autogenerated by rename_symtab.py from
1164 https://github.com/davidmalcolm/gcc-refactoring-scripts
1165 revision 58bb219cc090b2f4516a9297d868c245495ee622
1167 * lto-partition.c (add_symbol_to_partition): Rename
1168 symtab_node_base to symtab_node.
1169 (get_symbol_class): Likewise.
1170 (symbol_partitioned_p): Likewise.
1171 (add_references_to_partition): Likewise.
1172 (add_symbol_to_partition_1): Likewise.
1173 (contained_in_symbol): Likewise.
1174 (add_symbol_to_partition): Likewise.
1175 (lto_1_to_1_map): Likewise.
1176 (lto_max_map): Likewise.
1177 (lto_balanced_map): Likewise.
1178 (privatize_symbol_name): Likewise.
1179 (promote_symbol): Likewise.
1180 (may_need_named_section_p): Likewise.
1181 (rename_statics): Likewise.
1182 (lto_promote_statics_nonwpa): Likewise.
1183 * lto-symtab.c (lto_symtab_merge): Likewise.
1184 (lto_symtab_resolve_replaceable_p): Likewise.
1185 (lto_symtab_symbol_p): Likewise.
1186 (lto_symtab_resolve_can_prevail_p): Likewise.
1187 (lto_symtab_resolve_symbols): Likewise.
1188 (lto_symtab_merge_decls_2): Likewise.
1189 (lto_symtab_merge_decls_1): Likewise.
1190 (lto_symtab_merge_decls): Likewise.
1191 (lto_symtab_merge_symbols_1): Likewise.
1192 (lto_symtab_merge_symbols): Likewise.
1193 (lto_symtab_prevailing_decl): Likewise.
1194 * lto.c (lto_wpa_write_files): Likewise.
1195 (read_cgraph_and_symbols): Likewise.
1196 (do_whole_program_analysis): Likewise.
1198 2013-10-30 David Malcolm <dmalcolm@redhat.com>
1200 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1201 declarations onto multiple lines to make things easier for
1203 (lto_symtab_merge_decls_1): Likewise.
1204 (lto_symtab_merge_symbols_1): Likewise.
1206 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1208 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1209 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1212 2013-10-29 David Malcolm <dmalcolm@redhat.com>
1214 Patch autogenerated by refactor_symtab.py from
1215 https://github.com/davidmalcolm/gcc-refactoring-scripts
1216 revision 58bb219cc090b2f4516a9297d868c245495ee622
1218 * lto-partition.c (lto_promote_cross_file_statics): Update for
1219 conversion of symtab types to a true class hierarchy.
1220 (rename_statics): Likewise.
1221 (promote_symbol): Likewise.
1222 (privatize_symbol_name): Likewise.
1223 (lto_balanced_map): Likewise.
1224 (varpool_node_cmp): Likewise.
1225 (node_cmp): Likewise.
1226 (lto_1_to_1_map): Likewise.
1227 (undo_partition): Likewise.
1228 (add_symbol_to_partition): Likewise.
1229 (contained_in_symbol): Likewise.
1230 (add_symbol_to_partition_1): Likewise.
1231 (add_references_to_partition): Likewise.
1232 (symbol_partitioned_p): Likewise.
1233 (get_symbol_class): Likewise.
1234 (lto_max_map): Likewise.
1235 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1236 (lto_symtab_merge_symbols): Likewise.
1237 (lto_symtab_merge_symbols_1): Likewise.
1238 (lto_symtab_merge_decls): Likewise.
1239 (lto_symtab_merge_decls_1): Likewise.
1240 (lto_symtab_merge_decls_2): Likewise.
1241 (lto_symtab_resolve_symbols): Likewise.
1242 (lto_symtab_resolve_can_prevail_p): Likewise.
1243 (lto_symtab_symbol_p): Likewise.
1244 (lto_symtab_resolve_replaceable_p): Likewise.
1245 (lto_symtab_merge): Likewise.
1246 (lto_varpool_replace_node): Likewise.
1247 (lto_cgraph_replace_node): Likewise.
1248 * lto.c (lto_main): Likewise.
1249 (do_whole_program_analysis): Likewise.
1250 (materialize_cgraph): Likewise.
1251 (read_cgraph_and_symbols): Likewise.
1252 (cmp_partitions_order): Likewise.
1253 (lto_materialize_function): Likewise.
1254 (has_analyzed_clone_p): Likewise.
1256 2013-10-29 Andrew MacLeod <amacleod@redhat.com>
1258 * lto/lto-object.c: Add gimple.h to include list.
1259 * lto/lto-partition.c: Likewise.
1261 2013-10-18 Andrew MacLeod <amacleod@redhat.com>
1263 * lto.c: Remove tree-flow.h from include list.
1265 2013-10-15 Richard Biener <rguenther@suse.de>
1267 * lto.c (hash_canonical_type): Split out from ...
1268 (iterative_hash_canonical_type): ... here. Register types
1270 (gimple_canonical_type_hash): Adjust.
1271 (gimple_register_canonical_type_1): Split out from ...
1272 (gimple_register_canonical_type): ... here. Cache computed
1274 (lto_register_canonical_types): Split into two modes,
1275 clearing and computing TYPE_CANONICAL.
1276 (lto_read_decls): Adjust.
1277 (read_cgraph_and_symbols): Do two passes over global trees,
1278 first clearing then computing TYPE_CANONICAL.
1280 2013-10-14 Richard Biener <rguenther@suse.de>
1282 * lto.c (gimple_canonical_types): Move out-of GC space.
1283 (canonical_type_hash_cache): Make a pointer-map.
1284 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1286 (iterative_hash_canonical_type): Adjust.
1287 (read_cgraph_and_symbols): Likewise.
1288 (print_lto_report_1): Likewise.
1290 2013-10-14 Richard Biener <rguenther@suse.de>
1292 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1293 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1294 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1295 gimple_types_compatible_p_1, gimple_types_compatible_p,
1296 visit, iterative_hash_name, struct type_hash_pair,
1297 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1298 gimple_type_eq, gimple_register_type, num_not_merged_types,
1299 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1300 num_not_merged_types_in_same_scc_trees): Remove old merging code
1302 (lto_read_decls): Do not run old merging code in parallel.
1303 (read_cgraph_and_symbols): Do not init/free old merging
1305 (print_lto_report_1): Do not report differences of old vs. new
1308 2013-10-14 Richard Biener <rguenther@suse.de>
1310 * lto-lang.c (lto_init): Do not re-init canonical types here.
1311 (lto_register_canonical_types): Move to ...
1312 * lto.c (lto_register_canonical_types): ... here.
1313 (gimple_canonical_types, canonical_type_hash_cache,
1314 iterative_hash_canonical_type, gimple_canonical_type_hash,
1315 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1316 gimple_register_canonical_type): Add canonical type merging machinery
1317 moved from gimple.c.
1318 (read_cgraph_and_symbols): Init and free canonical type tables
1320 (print_lto_report_1): Report canonical type table stats here.
1322 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1324 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1326 2013-09-25 Tom Tromey <tromey@redhat.com>
1328 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1329 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1330 (lto/lto-object.o): Remove.
1332 2013-09-06 Richard Biener <rguenther@suse.de>
1334 * lto-symtab.c: Move from gcc/
1335 * lto.h: Include vec.h.
1336 (lto_global_var_decls): Declare.
1337 * lto.c (lto_global_var_decls): Move definition here.
1338 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1339 (lto-symtab.o): Add.
1340 * config-lang.in (gtfiles): Add lto.h.
1342 2013-08-31 Jan Hubicka <jh@suse.cz>
1344 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1345 DECL_FIELD_OFFSET can contain an reference to variable.
1347 2013-08-31 Jan Hubicka <jh@suse.cz>
1349 * lto.c (tree_with_vars): Turn into vector.
1350 (MAYBE_REMEMBER_WITH_VARS): Change to...
1351 (CHECK_VAR): ... this one.
1352 (CHECK_NO_VAR): New macro.
1353 (maybe_remember_with_vars_typed): Turn to ...
1354 (mentions_vars_p_typed): ... this one.
1355 (maybe_remember_with_vars_common): Turn to ...
1356 (mentions_vars_p_comon): ... this one.
1357 (maybe_remember_with_vars_decl_minimal): Turn to ...
1358 (mentions_vars_p_decl_minmal): ... this one.
1359 (maybe_remember_with_vars_decl_common): Turn to ...
1360 (mentions_vars_p_decl_common): ... this one.
1361 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1362 (mentions_vars_p_decl_with_vis): ... this one.
1363 (maybe_remember_with_vars_decl_non_common): Turn to ...
1364 (mentions_vars_p_decl_non_common): ... this one.
1365 (maybe_remember_with_vars_function): Turn to ...
1366 (mentions_vars_p_function): ... this one.
1367 (maybe_remember_with_vars_field_decl): Turn to ...
1368 (mentions_vars_p_field_decl): ... this one.
1369 (maybe_remember_with_vars_type): Turn to ...
1370 (mentions_vars_p_type): ... this one.
1371 (maybe_remember_with_vars_binfo): Turn to ...
1372 (mentions_vars_p_binfo): ... this one.
1373 (maybe_remember_with_vars_constructor): Turn to ...
1374 (mentions_vars_p_constructor): ... this one.
1375 (maybe_remember_with_vars_expr): Turn to ...
1376 (mentions_vars_p_expr): ... this one.
1377 (maybe_remember_with_vars): Turn to ...
1378 (mentions_vars_p): ... this one.
1379 (lto_read_decls): Update.
1380 (LTO_SET_PREVAIL): Do not call function for internal decls.
1381 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1382 check that something was updated.
1383 (lto_fixup_state): Do not care about internal decls.
1384 (lto_fixup_decls): Update.
1385 (read_cgraph_and_symbols): Update.
1387 2013-08-29 Jan Hubicka <jh@suse.cz>
1389 * lto.c (read_cgraph_and_symbols): Free decl states.
1391 2013-08-29 Jan Hubicka <jh@suse.cz>
1393 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1394 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1397 2013-08-28 Jan Hubicka <jh@suse.cz>
1399 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1400 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1401 (unify_scc): Do checking assert.
1403 2013-08-06 Jan Hubicka <jh@suse.cz>
1404 Martin Liska <marxin.liska@gmail.com>
1406 * lto-partition.c (lto_balanced_map): Always base order on
1409 2013-08-06 Jan Hubicka <jh@suse.cz>
1411 * lto.c (lto_materialize_function): Do not read body anymore.
1413 2013-08-02 Jan Hubicka <jh@suse.cz>
1415 * lto.c (lto_materialize_function): Do not push struct function.
1416 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1417 (may_need_named_section_p): Even abstract origins may need
1420 2013-07-30 David Malcolm <dmalcolm@redhat.com>
1422 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1425 * lto.c (do_whole_program_analysis): Update for move of
1426 all_regular_ipa_passes from a global to a field of class
1429 2013-07-21 Ondřej BÃÂlka <neleai@seznam.cz>
1431 * lto-partition.c: Fix typos.
1433 2013-06-20 Jan Hubicka <jh@suse.cz>
1435 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1436 partitioning of variables.
1438 2013-06-20 Jan Hubicka <jh@suse.cz>
1440 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1442 2013-06-19 Jan Hubicka <jh@suse.cz>
1444 * lto-partition.c (add_references_to_partition): Use
1447 2013-06-18 Richard Biener <rguenther@suse.de>
1449 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1451 (lto_register_function_decl_in_symtab): Likewise.
1452 (cmp_tree): New function.
1453 (unify_scc): Instead of using the streamer cache map from entry
1454 to cache index match up the two maps we have by sorting them.
1455 Adjust calls to lto_register_var_decl_in_symtab and
1456 lto_register_function_decl_in_symtab.
1458 2013-06-17 Richard Biener <rguenther@suse.de>
1460 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1461 * lto.c: Include data-streamer.h.
1462 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1463 (gimple_type_leader_entry_s, gimple_type_leader,
1464 gimple_lookup_type_leader): Remove.
1465 (gtc_visit): Simplify.
1466 (gimple_types_compatible_p): Likewise.
1467 (gimple_register_type_1): Likewise. Merge into ...
1468 (gimple_register_type): ... this. Keep it as legacy for
1469 statistics purposes for now.
1470 (fixup_integer_cst): Remove.
1471 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1473 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1474 maybe_remember_with_vars_*): ... these.
1475 (uniquify_nodes): Remove.
1476 (lto_fixup_prevailing_type): New function.
1477 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1478 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1479 (num_merged_types, num_prevailing_types, num_not_merged_types,
1480 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1481 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1482 num_scc_compare_collisions): New global counters.
1483 (compare_tree_sccs_1): New function.
1484 (compare_tree_sccs): Likewise.
1485 (unify_scc): Likewise.
1486 (lto_read_decls): Stream in tree SCCs and unify them on the
1487 way in. Finalize prevailing SCC tree members.
1488 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1489 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1490 to ggc-collect during merging.
1491 (print_lto_report_1): Adjust for new merging code.
1493 2013-06-12 Jan Hubicka <jh@suse.cz>
1495 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1497 2013-06-12 Jan Hubicka <jh@suse.cz>
1499 * lto.c (register_resolution): Take lto_file_data argument.
1500 (lto_register_var_decl_in_symtab,
1501 lto_register_function_decl_in_symtab): Update.
1502 (read_cgraph_and_symbols): Update resolution_map handling.
1504 2013-06-11 Jan Hubicka <jh@suse.cz>
1506 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1507 (add_symbol_to_partition_1): Likewise.
1508 (contained_in_symbol): Likewise.
1509 (lto_balanced_map): Likewise.
1510 (rename_statics): Drop weakref.
1512 2013-06-05 Richard Biener <rguenther@suse.de>
1514 * lto.c (num_merged_types): New global variable.
1515 (uniquify_nodes): Increase num_merged_types when merging a type.
1516 (print_lto_report_1): Output the number of merged types.
1518 2013-06-01 Jan Hubicka <jh@suse.cz>
1520 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1521 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1522 (do_whole_program_analysis): Update dumping.
1524 2013-05-29 Jan Hubicka <jh@suse.cz>
1526 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1528 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1530 2013-05-15 Jan Hubicka <jh@suse.cz>
1532 * lto-partition.c (privatize_symbol_name): Return true when
1533 privatizing happened.
1534 (rename_statics): Do not go into infinite loop when privatizing
1537 2013-05-16 Jason Merrill <jason@redhat.com>
1539 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1541 2013-05-15 Martin Jambor <mjambor@suse.cz>
1543 * lto-partition.c (lto_balanced_map): Print symbol order instead
1546 2013-05-15 Jan Hubicka <jh@suse.cz>
1550 * lto-partition.c (get_symbol_class): Fix weakrefs.
1551 (lto_balanced_map): Fix weakrefs.
1552 (privatize_symbol_name): Remove unnecesary label.
1553 (rename_statics): Handle weakrefs as statics.
1555 2013-05-09 Jan Hubicka <jh@suse.cz>
1556 Richard Biener <rguenther@suse.de>
1558 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1559 (lto_register_var_decl_in_symtab): Likewise.
1560 (lto_main): Promote statics.
1561 * lto-partition.c (privatize_symbol_name): New function.
1562 (promote_symbol): Use it.
1563 (may_need_named_section_p): New predicate.
1564 (rename_statics): New functions.
1565 (lto_promote_cross_file_statics): Simplify; do renaming.
1566 (lto_promote_statics_nonwpa): New function.
1567 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1569 2013-02-08 Richard Biener <rguenther@suse.de>
1572 * lto-lang.c (lto_init): Do not enter a dummy file.
1574 2013-02-07 Uros Bizjak <ubizjak@gmail.com>
1577 * lto.c (lto_resolution_ready): Use %wx instead of
1578 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1580 2013-02-04 Richard Guenther <rguenther@suse.de>
1583 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1584 or lto_fixup_decls at LTRANS time.
1586 2013-01-09 Jan Hubicka <jh@suse.cz>
1589 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1591 2012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1594 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1596 (lto_main): Record the global variables if WPA isn't enabled.
1598 2012-11-20 Diego Novillo <dnovillo@google.com>
1599 Jakub Jelinek <jakub@redhat.com>
1601 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1603 2012-11-16 Diego Novillo <dnovillo@google.com>
1605 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1607 * lto-lang.c: Use new vec API in vec.h.
1608 * lto-partition.c: Likewise.
1609 * lto-partition.h: Likewise.
1612 2012-10-31 Lawrence Crowl <crowl@google.com>
1614 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1615 down-cast via dyn_cast.
1616 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1617 (undo_partition): Likewise.
1618 (lto_balanced_map): Likewise.
1619 (get_symbol_class): Likewise and via is_a.
1620 (lto_balanced_map): Change symtab checking to is_a.
1622 2012-10-12 Richard Biener <rguenther@suse.de>
1625 * lto.c (gimple_types_compatible_p_1): Also compare
1627 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1629 2012-10-09 Tobias Burnus <burnus@net-b.de>
1631 * lto-lang.c (lto_register_builtin_type): Avoid useless
1633 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1635 2012-10-08 Tobias Burnus <burnus@net-b.de>
1637 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1638 Free lto_file struct after closing the file.
1640 2012-10-08 Jan Hubicka <jh@suse.cz>
1642 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1643 (fixup_integer_cst): New functoin.
1644 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1646 2012-10-07 Jan Hubicka <jh@suse.cz>
1648 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1649 release input encoders.
1650 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1652 2012-10-06 Jan Hubicka <jh@suse.cz>
1655 * lto.c (resolution_map): New static var.
1656 (register_resolution): New function.
1657 (lto_register_var_decl_in_symtab): Use it.
1658 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1660 2012-09-20 Martin Jambor <mjambor@suse.cz>
1662 * lto.c (lto_materialize_function): Call push_struct_function and
1665 2012-09-19 Dehao Chen <dehao@google.com>
1667 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1669 2012-09-19 Jan Hubicka <jh@suse.cz>
1671 * lto.c (lto_materialize_function): Update confused comment.
1672 (read_cgraph_and_symbols): Do not free symtab.
1674 2012-09-12 Jan Hubicka <jh@suse.cz>
1676 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1677 AUX pointer cleaning. Add max partitioning.
1678 * lto-partition.c (enum symbol_class): New.
1679 (get_symbol_class): New function.
1680 (symbol_partitioned_p): New function.
1681 (add_references_to_partition): Remove.
1682 (add_aliases_to_partition): Remove.
1683 (add_cgraph_node_to_partition_1): Remove.
1684 (add_cgraph_node_to_partition): Remove.
1685 (add_symbol_to_partition): New function.
1686 (add_symbol_to_partition_1): New function.
1687 (contained_in_symbol): New function.
1688 (partition_cgraph_node_p): Remove.
1689 (partition_varpool_node_p): Remove.
1690 (partition_symbol_p): Remove.
1691 (lto_1_to_1_map): Cleanup.
1693 (lto_balanced_map): Update.
1694 (lto_promote_cross_file_statics): Update.
1695 * lto-partition.h (lto_max_map): Declare.
1696 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1698 2012-09-11 Jan Hubicka <jh@suse.cz>
1701 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1702 type is variant leader.
1704 2012-09-11 Richard Guenther <rguenther@suse.de>
1706 * lto.c (enum gtc_mode): Remove.
1707 (struct type_pair_d): Adjust.
1708 (lookup_type_pair): Likewise.
1709 (gimple_type_leader): Do not mark as deletable.
1710 (gimple_lookup_type_leader): Adjust.
1711 (gtc_visit): Likewise.
1712 (gimple_types_compatible_p_1): Likewise.
1713 (gimple_types_compatible_p): Likewise.
1714 (gimple_type_hash): Likewise.
1715 (gimple_register_type): Likewise.
1716 (read_cgraph_and_symbols): Manage lifetime of tables
1719 2012-09-11 Richard Guenther <rguenther@suse.de>
1721 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1722 struct type_pair_d, lookup_type_pair, struct sccs,
1723 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1724 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1725 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1726 visit, iterative_hash_name, struct type_hash_pair,
1727 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1728 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1729 Move here from gimple.c
1730 (read_cgraph_and_symbols): Free hash tables here.
1731 (print_lto_report_1): New function wrapping print_lto_report.
1732 (do_whole_program_analysis): Call it.
1733 (lto_main): Likewise.
1735 2012-09-10 Jan Hubicka <jh@suse.cz>
1737 * lto-partition.c (partition_symbol_p): Forward declare.
1738 (add_references_to_partition): Reimplement using partition_symbol_p.
1739 (add_aliases_to_partition): Break out from add_references_to_partition;
1740 reimplement using partition_symbol_p.
1741 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1743 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1744 (partition_varpool_node_p): Do not special case aliases.
1746 2012-08-12 Jan Hubicka <jh@suse.cz>
1748 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1749 it is deleted after streaming.
1750 * lto-partition.c (partition_symbol_p): New function.
1751 (promote_var, promote_fn): Remove.
1752 (promote_symbol): New function.
1753 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1754 to lookup the actual boundaries instead of computing them ad-hoc.
1756 2012-08-12 Jan Hubicka <jh@suse.cz>
1758 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1760 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1762 * lto-partition.c (new_partition): Update.
1763 * lto.c (cmp_partitions_order): Update.
1764 (lto_wpa_write_files): Update.
1765 (free_ltrans_partitions): Update.
1766 (add_references_to_partition): Update.
1767 (add_cgraph_node_to_partition_1): Update.
1768 (add_cgraph_node_to_partition): Update.
1769 (add_varpool_node_to_partition): Update.
1770 (undo_partition): Update.
1771 (lto_balanced_map): Update.
1772 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1773 set_referenced_from_this_partition_p): Update.
1774 (lto_promote_cross_file_statics): Update.
1776 2012-08-12 Jan Hubicka <jh@suse.cz>
1778 * lto-partition.c (set_referenced_from_other_partition_p,
1779 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1781 (lto_promote_cross_file_statics): Use them.
1783 2012-07-24 Jan Hubicka <jh@suse.cz>
1785 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1787 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1789 * lto-tree.h (lang_decl): Add variable_size GTY option.
1791 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1793 * lto.c: Do not include timevar.h.
1794 * Make-lang.in: Fix dependencies.
1796 2012-06-18 Lawrence Crowl <crowl@google.com>
1798 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1799 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1800 to lto_wpa_write_files.
1801 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1802 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1803 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1804 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1805 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1806 to be a front end, but is not one.
1808 2012-05-18 Jan Hubicka <jh@suse.cz>
1810 * lto.c (lto_materialize_constructors_and_inits): Remove.
1811 (read_cgraph_and_symbols): Remove handling of alias pairs.
1813 2012-05-17 Jan Hubicka <jh@suse.cz>
1815 * lto-partition.c (add_references_to_partition): Handle external vars.
1816 (partition_varpool_node_p): Likewise.
1817 (lto_promote_cross_file_statics): Do not promote externals.
1819 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1821 * lto-lang.c (handle_fnspec_attribute): New static function.
1822 (lto_attribute_table): Add "fn spec".
1823 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1825 2012-05-04 Jan Hubicka <jh@suse.cz>
1827 * lto.c (do_whole_program_analysis): Set timevars correctly.
1828 (lto_main): Likewise.
1830 2012-05-04 Richard Guenther <rguenther@suse.de>
1832 * lang.opt (fwpa): Do not mark as Optimization.
1833 (fltrans): Likewise.
1835 2012-04-30 Jan Hubicka <jh@suse.cz>
1837 * lto.c (lto_main): Use compile ().
1838 * lto-partition.c (partition_cgraph_node_p): Use
1839 symtab_used_from_object_file_p.
1840 (partition_varpool_node_p): Likewise.
1842 2012-04-20 Jan Hubicka <jh@suse.cz>
1844 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1846 2012-04-18 Jan Hubicka <jh@suse.cz>
1848 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1849 Update for new ipa-ref API.
1851 2012-04-16 Jan Hubicka <jh@suse.cz>
1853 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1854 walkers to walk cgraph and varpool.
1855 (materialize_cgraph): Likewise.
1856 * lto-partition.c (lto_1_to_1_map): Likewise.
1857 (lto_balanced_map): Likewise.
1858 (lto_promote_cross_file_statics): Likewise.
1860 2012-04-14 Jan Hubicka <jh@suse.cz>
1862 * lto.c: Update field referenced for new cgraph/varpool layout.
1863 * lto-partition.c: Likewise.
1865 2012-04-11 Jan Hubicka <jh@suse.cz>
1867 * lto.c: Update copyright; remove params.h, ipa-inline.h
1868 and ipa-utils.h inlines; inline lto-partition.h
1869 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1870 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1871 add_references_to_partition, add_cgraph_node_to_partition_1,
1872 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1873 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1874 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1875 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1876 * lto-partition.c: ... here; new file.
1877 * lto-partition.h: New file.
1878 * Make-lang.in (lto.o): Update dependencies.
1879 (lto-partition.o): New.
1881 2012-04-05 Richard Guenther <rguenther@suse.de>
1883 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1886 2012-03-12 Richard Guenther <rguenther@suse.de>
1888 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1890 2012-03-06 Richard Guenther <rguenther@suse.de>
1893 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1895 2012-02-28 Richard Guenther <rguenther@suse.de>
1898 * lto.c (lto_register_function_decl_in_symtab): Do not register
1899 a reverse renamed decl mapping.
1901 2012-01-06 Jakub Jelinek <jakub@redhat.com>
1904 * lto-lang.c (handle_returns_twice_attribute): New function.
1905 (lto_attribute_table): Add returns_twice attribute.
1907 2011-12-21 Richard Guenther <rguenther@suse.de>
1909 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1910 (LTO_FIXUP_TREE): Use it.
1911 (uniquify_nodes): Mark new non-prevailing types and avoid
1912 calling gimple_register_type on others.
1913 (lto_read_decls): Add comment.
1915 2011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1917 * lto.h (lto_parse_hex): Delete.
1918 * lto.c (lto_read_decls): Use 'int' for offsets.
1919 (lto_parse_hex): Make static and return proper 64-bit host type.
1920 (lto_resolution_read): Use proper 64-bit host type.
1922 2011-12-13 Richard Guenther <rguenther@suse.de>
1925 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1926 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1928 2011-12-01 Uros Bizjak <ubizjak@gmail.com>
1930 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1931 (ignore_attribute): New.
1933 2011-11-21 Aldy Hernandez <aldyh@redhat.com>
1935 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1936 (handle_transaction_pure_attribute): New.
1938 2011-11-03 Richard Guenther <rguenther@suse.de>
1941 * lto-lang.c (lto_post_options): Do not read file options.
1942 * lto.c (lto_read_all_file_options): Remove.
1943 (lto_init): Call lto_set_in_hooks here.
1945 2011-10-09 Jan Hubicka <jh@suse.cz>
1947 * lto.c (node_cmp, varpool_node_cmp): New functions.
1948 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1949 (cmp_partitions): Rename to ...
1950 (cmp_partitions_size): ... this one.
1951 (cmp_partitions_order): New function.
1952 (lto_wpa_write_files): Sort partitions by order when
1953 -fno-toplevel-reorder is used.
1955 2011-10-09 Andi Kleen <ak@linux.intel.com>
1957 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1959 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1961 * lto-lang.c (def_builtin_1): Delete old interface with two
1962 parallel arrays to hold standard builtin declarations, and replace
1963 it with a function based interface that can support creating
1964 builtins on the fly in the future. Change all uses, and poison
1965 the old names. Make sure 0 is not a legitimate builtin index.
1967 2011-10-02 Andi Kleen <ak@linux.intel.com>
1969 * lto-object.c (lto_obj_add_section_data): Add list.
1970 (lto_obj_add_section): Fill in list.
1971 (ltoobj_build_section_table): Pass through list.
1972 * lto.c (file_data_list): Declare.
1973 (create_subid_section_table): Pass arguments directly.
1974 Fill in list of file_datas.
1976 (lto_create_files_from_ids): Pass in direct arguments.
1977 Don't maintain list.
1978 (lto_file_read): Use explicit section and file data lists.
1979 (lto_read_all_file_options): Pass in section_list.
1980 * lto.h (lto_obj_build_section_table): Add list.
1981 (lto_section_slot): Add next.
1982 (lto_section_list): Declare.
1984 2011-10-02 Jan Hubicka <jh@suse.cz>
1987 * common.c (lto_resolution_str): Add new resolution.
1988 * common.h (lto_resolution_str): Likewise.
1990 2011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1991 Andi Kleen <ak@linux.intel.com>
1994 * lto.c (lto_splay_tree_delete_id): New.
1995 (lto_splay_tree_compare_ids): Likewise.
1996 (lto_splay_tree_lookup): Likewise.
1997 (lto_splay_tree_id_equal_p): Likewise.
1998 (lto_splay_tree_insert): Likewise.
1999 (lto_splay_tree_new): Likewise.
2000 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2001 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2002 (create_subid_section_table): Use lto_splay_tree_lookup and
2003 lto_splay_tree_insert.
2004 (lto_file_read): Use lto_splay_tree_new.
2006 2011-09-26 Andi Kleen <ak@linux.intel.com>
2008 * lto.c (lto_resolution_read): Remove id dumping.
2009 (lto_section_with_id): Turn id HOST_WIDE_ID.
2010 (create_subid_section_table): Dito.
2012 2011-08-28 Dodji Seketeli <dodji@redhat.com>
2014 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2017 2011-08-11 Martin Jambor <mjambor@suse.cz>
2019 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2021 2011-08-08 Diego Novillo <dnovillo@google.com>
2023 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2024 * lto.c: Include tree-streamer.h.
2026 2011-07-06 Richard Guenther <rguenther@suse.de>
2028 * lto-lang.c (lto_init):
2029 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2031 2011-06-11 Jan Hubicka <jh@suse.cz>
2034 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2035 (lto_balanced_map): Likewise.
2037 2011-06-11 Jan Hubicka <jh@suse.cz>
2039 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2040 (add_cgraph_node_to_partition) ... here; walk aliases.
2041 (lto_1_to_1_map): Remove same body alias code.
2042 (promote_fn): Likewise.
2043 (lto_promote_cross_file_statics): Update comment.
2046 2011-06-07 Diego Novillo <dnovillo@google.com>
2048 * lto.c (uniquify_nodes): Move code to register decls to
2049 the loop that computes canonical types.
2051 2011-06-07 Richard Guenther <rguenther@suse.de>
2053 * lto-lang.c (lto_init): Do not set
2054 size_type_node or call set_sizetype.
2056 2011-06-04 Diego Novillo <dnovillo@google.com>
2058 * lto.c (lto_init): New.
2059 (lto_main): Call it.
2061 2011-06-03 Diego Novillo <dnovillo@google.com>
2063 * lto.c (get_resolution): Move from lto-streamer-in.c.
2064 (lto_register_var_decl_in_symtab): Likewise.
2065 (lto_register_function_decl_in_symtab): Likewise.
2066 (uniquify_nodes): Call lto_register_var_decl and
2067 lto_register_function_decl_in_symtab after reading a new
2068 VAR_DECL or FUNCTION_DECL.
2070 2011-06-01 Richard Guenther <rguenther@suse.de>
2072 * lto-lang.c (lto_register_canonical_types): New function.
2073 (lto_init): Register common nodes with the canonical type machinery.
2074 Do not play tricks with char_type_node.
2076 2011-05-26 Richard Guenther <rguenther@suse.de>
2078 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2080 2011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2082 * lto.c (lto_ft_typed): New function.
2083 (lto_ft_common): Call it.
2084 (lto_ft_constructor): Likewise.
2085 (lto_ft_expr): Likewise.
2086 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2089 2011-05-20 Richard Guenther <rguenther@suse.de>
2091 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2092 (lto_ft_type): Move main-variant and pointer-to chain building ...
2093 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2094 in a separate final loop.
2096 2011-05-19 Richard Guenther <rguenther@suse.de>
2098 * lto.c (uniquify_nodes): First register all types before
2099 fixing up the tree SCC.
2101 2011-05-11 Jan Hubicka <jh@suse.cz>
2104 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2106 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2108 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2109 location of binfo field.
2110 (lto_fixup_prevailing_decls): Likewise.
2112 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2114 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2115 build_function_type_array or build_varargs_function_type_array
2118 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2120 * lto-lang.c (global_bindings_p): Return bool.
2122 2011-05-07 Jan Hubicka <jh@suse.cz>
2124 * lto.c (lto_materialize_function): Use
2125 cgraph_function_with_gimple_body_p.
2126 (add_cgraph_node_to_partition): Do not re-add items to partition;
2128 (add_varpool_node_to_partition): Do not re-add items to partition.
2130 2011-05-03 Jan Hubicka <jh@suse.cz>
2132 * lto.c (free_ltrans_partitions): Fix accidental commit.
2134 2011-05-03 Jan Hubicka <jh@suse.cz>
2136 * lto.c (ltrans_partition_def): Remove GTY annotations.
2137 (ltrans_partitions): Move to heap.
2138 (new_partition): Update.
2139 (free_ltrans_partitions): New function.
2140 (lto_wpa_write_files): Use it.
2142 2011-04-29 Martin Jambor <mjambor@suse.cz>
2144 * lto.c: Include ipa-utils.h.
2145 (lto_balanced_map): Update call to ipa_reverse_postorder.
2146 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2148 2011-04-29 Michael Matz <matz@suse.de>
2150 * lto.c (toplevel): Include tree-flow.h.
2151 (lto_read_in_decl_state): Don't merge types here.
2152 (tree_with_vars): New static hash table.
2153 (remember_with_vars): New static functions.
2154 (LTO_FIXUP_TYPE): New macro.
2155 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2156 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2157 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2158 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2159 (lto_read_decls): Uniquify while reading in trees.
2160 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2161 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2162 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2163 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2164 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2165 lto_fixup_tree): Remove.
2166 (lto_fixup_state): Remove data argument. Use
2167 lto_symtab_prevailing_decl.
2168 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2169 (lto_fixup_prevailing_decls): New function.
2170 (lto_fixup_state_aux): Argument aux is unused.
2171 (lto_fixup_decls): Don't allocate pointer sets, don't use
2172 lto_fixup_tree, use lto_fixup_prevailing_decls.
2173 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2174 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2176 2011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2178 * lto.c (lto_balanced_map): Fix typos in head comment.
2179 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2182 2011-04-16 Jan Hubicka <jh@suse.cz>
2184 * lto.c (lto_balanced_map): Update.
2186 2011-04-14 Jan Hubicka <jh@suse.cz>
2188 * lto.c: Include ipa-inline.h
2189 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2191 (ipa_node_duplication_hook): Fix declaration.
2192 * Make-lang.in (lto.o): Update dependencies.
2194 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2196 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2198 * lto.c (lto_fixup_common): Likewise.
2200 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2202 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2203 (handle_type_generic_attribute): Likewise.
2205 2011-04-03 Michael Matz <matz@suse.de>
2207 * lto.c (lto_materialize_function): Don't read and then discard
2208 sections in WPA mode.
2209 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2211 * lto-lang.c (registered_builtin_fndecls): Remove.
2212 (lto_getdecls): Return NULL_TREE.
2213 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2215 2011-03-31 Richard Guenther <rguenther@suse.de>
2218 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2219 partitions when checking is not enabled.
2221 2011-03-25 Kai Tietz <ktietz@redhat.com>
2223 * lto.c (lto_resolution_read): Use filename_cmp instead
2225 (lto_read_section_data): Likewise.
2227 2011-03-25 Jeff Law <law@redhat.com>
2229 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2231 2011-03-21 Kai Tietz <ktietz@redhat.com>
2234 * lto-lang.c (lto_attribute_table): Adjust table.
2236 2011-02-18 Jakub Jelinek <jakub@redhat.com>
2239 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2242 2011-02-18 Richard Guenther <rguenther@suse.de>
2245 * lto-tree.h (lto_global_var_decls): Do not declare here.
2246 * lto-lang.c: Include lto-streamer.h.
2247 * Make-lang.in (lto-lang.o): Adjust dependencies.
2249 2011-02-10 Kai Tietz <kai.tietz@onevision.com>
2252 * lto.c (lto_read_section_data): Free
2253 fd_name in failure case.
2254 For mingw targets don't hash file-descriptor.
2255 (read_cgraph_and_symbols): Close current_lto_file
2258 2011-01-11 Jan Hubicka <jh@suse.cz>
2262 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2263 are not partitioned.
2265 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2267 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2270 2010-12-06 Richard Guenther <rguenther@suse.de>
2273 * lto-lang.c (lto_init): Give names to basic types.
2275 2010-11-30 Joseph Myers <joseph@codesourcery.com>
2277 * lto-object.c: Don't include toplev.h.
2278 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2280 2010-11-30 Joseph Myers <joseph@codesourcery.com>
2282 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2285 2010-11-29 Joseph Myers <joseph@codesourcery.com>
2287 * lto-endian.h: Delete.
2288 * lto-object.c: Don't include "libiberty.h".
2289 (O_BINARY): Don't define.
2290 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2291 (O_BINARY): Don't define.
2293 2010-11-23 Richard Guenther <rguenther@suse.de>
2295 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2297 2010-11-23 Richard Guenther <rguenther@suse.de>
2300 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2302 2010-11-17 Joseph Myers <joseph@codesourcery.com>
2304 * lto.c (lto_main): Take no arguments.
2305 * lto.h (lto_main): Update prototype.
2307 2010-11-16 Ian Lance Taylor <iant@google.com>
2309 * lto-object.c (lto_obj_file_open): Call
2310 simple_object_attributes_merge rather than
2311 simple_object_attributes_compare.
2313 2010-11-12 Joseph Myers <joseph@codesourcery.com>
2315 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2316 * lto-lang.c (lto_handle_option): Take location_t parameter.
2318 2010-11-10 Joseph Myers <joseph@codesourcery.com>
2320 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2321 letters and remove trailing '.'.
2322 (lto_file_finalize): Start diagnostic with a lowercase letter.
2324 2010-11-02 Ian Lance Taylor <iant@google.com>
2326 * lto-object.c: New file.
2327 * lto-elf.c: Remove file.
2328 * lto-macho.c: Remove file.
2329 * lto-macho.h: Remove file.
2330 * lto-coff.c: Remove file.
2331 * lto-coff.h: Remove file.
2332 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2334 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2335 (lto/lto-objfile.o): New target.
2336 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2337 (lto/lto.o): Remove $(LIBIBERTY_H).
2339 2010-10-22 Jan Hubicka <jh@suse.cz>
2341 * lto.c (add_cgraph_node_to_partition,
2342 add_varpool_node_to_partition): Add debug info.
2343 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2345 (do_whole_program_analysis): Set function flags before dumping.
2347 2010-10-22 Richard Guenther <rguenther@suse.de>
2349 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2350 the new gimple_register_canonical_type.
2352 2010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2355 * config-lang.in (boot_language): Set to $enable_lto.
2357 2010-10-18 Jakub Jelinek <jakub@redhat.com>
2360 * Make-lang.in (check-lto): New dummy target.
2362 2010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2364 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2366 2010-10-08 Joseph Myers <joseph@codesourcery.com>
2368 * lto-lang.c (lto_init_options): Change to
2369 lto_init_options_struct. Update parameters.
2370 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2371 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2373 2010-10-06 Jan Hubicka <jh@suse.cz>
2375 * lto.c (lto_balanced_map): Fix accounting of program size.
2377 2010-10-06 Jan Hubicka <jh@suse.cz>
2379 * lto.c (lto_balanced_map): Do not produce empty partitions.
2381 2010-10-06 Andi Kleen <ak@linux.intel.com>
2383 * lto.c (lto_process_name): Add.
2384 (lto_main): Call lto_process_name.
2386 2010-10-06 Jan Hubicka <jh@suse.cz>
2388 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2389 COMDATs required by the linker.
2391 2010-10-05 Ian Lance Taylor <iant@google.com>
2393 * lto.c (lto_section_with_id): Make s a const pointer.
2395 2010-10-05 Jan Hubicka <jh@suse.cz>
2397 * lto.c: Include params.h.
2398 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2399 refcounting in aux field.
2400 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2402 (lto_1_to_1_map): Simplify.
2403 (lto_balanced_map): New function.
2404 (do_whole_program_analysis): Chose proper partitioning alg.
2405 * Make-lang.in (lto.o): Add dependency on params.h
2407 2010-10-04 Andi Kleen <ak@linux.intel.com>
2409 * Make-lang.in (lto1): Add + to build rule.
2411 2010-10-03 Andi Kleen <ak@linux.intel.com>
2413 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2416 2010-09-28 Jan Hubicka <jh@suse.cz>
2418 * lto-lang.c (handle_leaf_attribute): New function.
2419 (lto_attribute_tables): Add leaf.
2421 2010-09-25 Jie Zhang <jie@codesourcery.com>
2423 * lto.c (lto_read_all_file_options): Start a new line after
2424 printing out file names.
2426 2010-09-24 Jan Hubicka <jh@suse.cz>
2428 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2430 2010-09-20 Jan Hubicka <jh@suse.cz>
2432 PR tree-optimize/45605
2433 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2435 2010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2437 * lto-elf.c (lto_obj_file_open): Also provide filename when
2440 2010-09-17 Jan Hubicka <jh@suse.cz>
2442 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2444 2010-09-17 Richard Guenther <rguenther@suse.de>
2446 * lang.opt (flag_wpa): Also enable for the driver.
2448 2010-09-16 Jan Hubicka <jh@suse.cz>
2450 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2453 2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2455 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2457 2010-09-08 Jan Hubicka <jh@suse.cz>
2459 * lto.c (real_file_count, real_file_decl_data): New static vars.
2460 (read_cgraph_and_symbols): Use it.
2462 2010-09-08 Richard Guenther <rguenther@suse.de>
2464 * lto.c (read_cgraph_and_symbols): Collect again after each
2467 2010-09-07 Jan Hubicka <jh@suse.cz>
2469 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2471 2010-09-03 Richard Guenther <rguenther@suse.de>
2473 * lto-elf.c (validate_file): Always error if validation fails.
2475 2010-08-20 Jan Hubicka <jh@suse.cz>
2477 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2478 (lto_wpa_write_files): Update comments.
2480 2010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2483 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2484 with has_analyzed_clone_p.
2486 2010-08-20 Jan Hubicka <jh@suse.cz>
2488 * lto.c (has_analyzed_clone_p): New function
2489 (lto_materialize_function): Use callgraph to determine if
2491 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2493 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2495 * lto.c: Use FOR_EACH_VEC_ELT.
2497 2010-07-27 Andi Kleen <ak@linux.intel.com>
2499 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2501 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2503 * lto-lang.c (lto_handle_option): Update prototype and return
2504 value type. Remove duplicate assignment to result.
2506 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2508 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2510 (lto_init_options): Update prototype.
2511 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2514 2010-07-10 Andi Kleen <ak@linux.intel.com>
2517 * lto.c: Include splay-tree.h
2518 (lto_resolution_read): Change to walk file_ids tree and parse
2519 extra file_id in resolution file.
2520 (lto_section_with_id): Add.
2521 (create_subid_section_table): Add.
2523 (lto_create_files_from_ids): Add.
2524 (lto_file_read): Change to handle sub file ids and create list
2525 of file_datas. Add output argument for count.
2526 (get_section_data): Pass file_data to lto_get_section_name.
2527 (lto_flatten_file): Add.
2528 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2530 2010-07-10 Andi Kleen <ak@linux.intel.com>
2532 * lto-coff.c (hash_name, eq_name): Move.
2533 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2534 * lto-elf.c: (hash_name, eq_name): Move.
2535 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2536 * lto-macho.c: (hash_name, eq_name): Move.
2537 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2538 * lto.c: (hash_name, eq_name): Move from lto-*.c
2539 (lto_obj_create_section_hash_table): Add.
2540 (free_with_string): Add.
2542 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2544 * lto-coff.c: Include diagnostic-core.h in every file that
2546 * lto-elf.c: Likewise.
2547 * lto-lang.c: Likewise.
2548 * lto-macho.c: Likewise.
2550 2010-07-07 Jakub Jelinek <jakub@redhat.com>
2552 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2553 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2556 2010-07-05 Jan Hubicka <jh@suse.cz>
2558 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2559 nodes from same comdat group as well as all comdat functions referenced
2561 (add_varpool_node_to_partition, add_references_to_partition): New
2563 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2564 add_varpool_node_to_partition; clear aux flags when done.
2565 (lto_promote_cross_file_statics): Do not promote stuff that gets
2566 duplicated to each ltrans.
2568 2010-07-04 Jan Hubicka <jh@suse.cz>
2570 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2572 2010-06-13 Richard Guenther <rguenther@suse.de>
2574 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2576 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
2578 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2579 * lto-coff.c (coff_write_object_file): Add braces to if.
2581 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2583 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2584 (lto_file_read): Likewise.
2585 (new_partition): Likewise.
2586 (read_cgraph_and_symbols): Likewise.
2588 2010-06-07 Joseph Myers <joseph@codesourcery.com>
2590 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2591 (lto_handle_option): Don't set flag_signed_char here.
2593 2010-06-04 Richard Guenther <rguenther@suse.de>
2596 * lto.c (lto_1_to_1_map): Use the proper file_data for
2599 2010-05-30 Jan Hubicka <jh@suse.cz>
2601 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2602 partitioning decisions.
2604 2010-05-29 Jan Hubicka <jh@suse.cz>
2606 * lto.c (bitmap vector): Remove.
2607 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2608 (ltrans_partition_def): New structure.
2609 (ltrans_partition): New type and VECtor.
2610 (new_partition): New function.
2611 (add_cgraph_node_to_partition): New function.
2612 (lto_1_to_1_map): Reorganize for partitions.
2613 (lto_add_inline_clones): Remove.
2614 (lto_add_all_inlinees): Remove.
2615 (lto_promote_cross_file_statics): Use partitions.
2616 (cmp_partitions): New function.
2617 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2618 use partitions; output files sorted by size.
2620 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2622 * Make-lang.in: Replace vec.h dependency with VEC_H.
2624 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2626 * lto-coff.c (coff_errmsg): Remove.
2627 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2628 errors instead of coff_errmsg (-1).
2629 * lto-macho.c (mach_o_errmsg): Remove.
2630 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2631 instead of mach_o_errmsg (-1).
2632 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2635 2010-05-28 Richard Guenther <rguenther@suse.de>
2637 * lto.c (prefix_name_with_star): Removed.
2638 (strip_extension): Likewise.
2639 (get_filename_for_set): Likewise.
2640 (lto_write_ltrans_list): Fold into ...
2641 (lto_wpa_write_files): ... this. Name LTRANS units
2642 by suffixing the ltrans output list filename.
2643 (do_whole_program_analysis): Adjust.
2645 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2647 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2648 (read_cgraph_and_symbols, lto_main): Use seen_error.
2649 * Make-lang.in (lto/lto.o): Update dependencies.
2651 2010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2654 * lto.h (lto_eh_personality): New prototype.
2655 * lto.c: Include debug.h.
2656 (first_personality_decl): New static variable.
2657 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2658 first function for which it is non-null.
2659 (lto_eh_personality_decl): New static variable.
2660 (lto_eh_personality): New function.
2661 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2662 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2664 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2666 * lto-lang.c: Do not include expr.h.
2668 2010-05-24 Richard Guenther <rguenther@suse.de>
2670 * lto-elf.c (lto_obj_build_section_table): Work around
2671 FreeBSD libelf issue.
2673 2010-05-22 Richard Guenther <rguenther@suse.de>
2675 * lto.c (read_cgraph_and_symbols): Do not collect.
2677 2010-05-20 Jan Hubicka <jh@suse.cz>
2679 * lto.c (promote_var, promote_fn): New functions.
2680 (lto_promote_cross_file_statics): Compute correctly boundary including
2681 static initializers of readonly vars.
2683 2010-05-18 Jan Hubicka <jh@suse.cz>
2685 * lto.c (lto_1_to_1_map): Partition non-inline clones.
2686 (lto_promote_cross_file_statics): Deal with non-inline clones.
2688 2010-05-18 Jan Hubicka <jh@suse.cz>
2690 * lto.c (lto_materialize_function): Announce function when
2691 reading body; allocate_struct_function only when reading body;
2692 do not finalize local statics; ggc_collect after reading;
2693 do not mark reachable node.
2694 (materialize_cgraph): Do not announce function.
2696 2010-05-11 Jan Hubicka <jh@suse.cz>
2698 * lto.c (materialize_cgraph): Revert my previous patch.
2700 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
2702 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2703 IMAGE_FILE_MACHINE_AMD64.
2704 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2706 2010-05-11 Jan Hubicka <jh@suse.cz>
2708 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2709 (materialize_cgraph): Add it here.
2711 2010-05-11 Jan Hubicka <jh@suse.cz>
2713 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2716 2010-05-11 Jan Hubicka <jh@suse.cz>
2718 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2719 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2720 use reachable_from_other_partition_p and
2721 referenced_from_other_partition_p test.
2723 2010-05-11 Kai Tietz <kai.tietz@onevision.com>
2725 * lto-coff.c (validate_file): Add x64-coff support.
2726 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2727 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2728 * lto-lang.c (lto_build_c_type_nodes): Add check for
2729 'long long unsigned int' for x64-windows.
2730 (lto_init): Likewise.
2733 2010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2735 * lto.h (struct lto_file_struct): Document offset member.
2736 * lto-endian.h: New file.
2737 * lto-macho.h: New file.
2738 * lto-macho.c: New file.
2739 * Make-lang.in: Add rule for lto-macho.o.
2741 2010-05-07 Richard Guenther <rguenther@suse.de>
2745 * lang.opt (fresolution): Change to ...
2746 (fresolution=): ... this.
2747 * lto-lang.c (lto_handle_option): Adjust.
2749 2010-05-07 Richard Guenther <rguenther@suse.de>
2751 * lto.c (DUMPBASE_SUFFIX): Remove.
2752 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2754 (lto_write_ltrans_list): ... only output the list of ltrans files.
2755 (lto_maybe_unlink): Remove.
2756 (do_whole_program_analysis): Do not execute LTRANS phase
2759 2010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2761 * lto-lang.c (lto_handle_option): Add argument kind.
2763 2010-05-05 Jan Hubicka <jh@suse.cz>
2765 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2768 2010-05-05 Jan Hubicka <jh@suse.cz>
2770 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2772 2010-04-30 Jan Hubicka <jh@suse.cz>
2774 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2776 (lto_wpa_write_files): Write any non-empty partition.
2778 2010-04-30 Jan Hubicka <jh@suse.cz>
2780 * lto.c: Do not attempt to make constant pool references global.
2782 2010-04-28 Jan Hubicka <jh@suse.cz>
2784 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2785 (lto_wpa_write_files): Announce what we are writting.
2786 (all_file_decl_data): New.
2787 (read_cgraph_and_symbols): Use GGC; correct timevars.
2788 (do_whole_program_analysis): Collect.
2789 * lto/Make-lang.in (lto.o): Fix dependency.
2790 * Makefile.in (GTFILES): Add lto-streamer.h.
2791 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2792 (varpool_assemble_pending_decls): Use VAROUT.
2793 * lto-streamer.h (lto_tree_ref_table): Annotate.
2794 (lto_in_decl_state): Annotate.
2795 (lto_file_decl_data): Annotate.
2797 2010-04-28 Jan Hubicka <jh@suse.cz>
2799 * lto.c (lto_varpool_node_sets): New.
2800 (lto_1_to_1_map): Partition varpool too.
2801 (globalize_context_t, globalize_cross_file_statics,
2802 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2803 lto_scan_statics_in_remaining_global_vars): Remove.
2804 (lto_promote_cross_file_statics): Rewrite.
2805 (get_filename_for_set): Take vset argument.
2806 (lto_wpa_write_files): Pass around vsets.
2808 2010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2811 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2812 hardcoding 'lto-elf.o'.
2813 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2815 * lto-coff.h: New file.
2816 * lto-coff.c: Likewise.
2818 2010-04-26 Richard Guenther <rguenther@suse.de>
2820 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2822 2010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2824 * lto.h (lto_elf_file_open): Rename prototype from this ...
2825 (lto_obj_file_open): ... to this.
2826 (lto_elf_file_close): Likewise ...
2827 (lto_obj_file_close): ... and likewise.
2828 (lto_elf_build_section_table): Likewise ...
2829 (lto_obj_build_section_table): ... and likewise.
2830 (lto_elf_begin_section): Likewise ...
2831 (lto_obj_begin_section): ... and likewise.
2832 (lto_elf_append_data): Likewise ...
2833 (lto_obj_append_data): ... and likewise.
2834 (lto_elf_end_section): Likewise ...
2835 (lto_obj_end_section): ... and likewise.
2836 * lto.c (lto_file_read): Update references to the above.
2837 (lto_wpa_write_files): Likewise.
2838 (lto_read_all_file_options): Likewise.
2839 (read_cgraph_and_symbols): Likewise.
2840 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2841 (LANG_HOOKS_APPEND_DATA): Likewise.
2842 (LANG_HOOKS_END_SECTION): Likewise.
2843 * lto-elf.c (lto_elf_file_open): Rename from this ...
2844 (lto_obj_file_open): ... to this, updating any references.
2845 (lto_elf_file_close): Likewise ...
2846 (lto_obj_file_close): ... and likewise.
2847 (lto_elf_build_section_table): Likewise ...
2848 (lto_obj_build_section_table): ... and likewise.
2849 (lto_elf_begin_section): Likewise ...
2850 (lto_obj_begin_section): ... and likewise.
2851 (lto_elf_append_data): Likewise ...
2852 (lto_obj_append_data): ... and likewise.
2853 (lto_elf_end_section): Likewise ...
2854 (lto_obj_end_section): ... and likewise.
2856 2010-04-21 Jan Hubicka <jh@suse.cz>
2858 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2859 (materialize_cgraph): Likewise.
2861 2010-04-21 Jan Hubicka <jh@suse.cz>
2863 * lto.c (lto_wpa_write_files): Update.
2864 (read_cgraph_and_symbols): Be more verbose.
2865 (materialize_cgraph): Likewise.
2866 (do_whole_program_analysis): Likewise.
2868 2010-04-21 Jan Hubicka <jh@suse.cz>
2870 * lto.c (globalize_cross_file_statics): When function has address taken,
2871 it needs to be public.
2873 2010-04-20 Jan Hubicka <jh@suse.cz>
2875 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2876 (lto_add_all_inlinees): Likewise.
2877 (lto_wpa_write_files): Likewise.
2879 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2881 * lto-lang.c (lto_init): Remove second argument in call to
2882 build_common_tree_nodes.
2884 2010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2886 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2889 2010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2892 * lto-elf.c: Define EM_* constants if not already defined.
2894 2010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2896 * lto-elf.c (is_compatible_architecture): New static function.
2897 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2899 2010-02-11 Richard Guenther <rguenther@suse.de>
2902 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2905 2010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2907 * lto.c (O_BINARY): Define.
2908 (lto_read_section_data): Open file in binary mode.
2909 * lto-elf.c (O_BINARY): Define.
2910 (lto_elf_file_open): Open file in binary mode.
2912 2010-01-08 Richard Guenther <rguenther@suse.de>
2915 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2916 (lto_init): Do not init char_type_node in a standard way
2917 but according to flag_signed_char.
2919 2010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2922 * lto.c (DUMPBASE_SUFFIX): New.
2923 (lto_execute_ltrans): Append a sequence number to -dumpbase
2926 2010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2929 * lto-elf.c (lto_elf_file_open): Stop if the command line
2930 option file is missing.
2932 2009-12-15 Richard Guenther <rguenther@suse.de>
2934 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2935 (lto_post_options): Do not disable debuginfo.
2937 2009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2939 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2941 2009-12-11 Richard Guenther <rguenther@suse.de>
2944 * lto.c (lto_resolution_read): Properly grow the vector.
2946 2009-12-11 Richard Guenther <rguenther@suse.de>
2949 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2950 to the C99 default. Do not set flag_unit_at_a_time.
2952 2009-11-28 Jakub Jelinek <jakub@redhat.com>
2954 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2957 2009-11-19 Rafael Avila de Espindola <espindola@google.com>
2960 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2961 * lto.c (lto_parse_hex): New.
2962 (lto_resolution_read): Use lto_parse_hex.
2963 * lto.h (lto_parse_hex): New.
2965 2009-11-17 Rafael Avila de Espindola <espindola@google.com>
2967 * lto-elf.c (lto_file_init): Add offset argument.
2968 (lto_elf_file_open): Record the offset.
2969 * lto.c (lto_resolution_read): Change file_name into a lto_file
2970 argument. Check offsets.
2971 (lto_file_read): Update call to lto_resolution_read.
2972 * lto.h (lto_file_struct): Add the offset field.
2974 2009-11-16 Rafael Avila de Espindola <espindola@google.com>
2976 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2978 2009-11-14 Jan Hubicka <jh@suse.cz>
2980 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2982 2009-11-12 Rafael Avila de Espindola <espindola@google.com>
2984 * lang.opt (fresolution): Renamed from resolution.
2985 * lto-lang.c (lto_handle_option): Handle new option name.
2986 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2988 2009-11-04 Richard Guenther <rguenther@suse.de>
2989 Rafael Avila de Espindola <espindola@google.com>
2991 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2992 (lto_elf_file_open): Handle offsets in arguments name@offest.
2994 2009-10-30 Richard Guenther <rguenther@suse.de>
2997 * lto.c (lto_file_read): Do not set file_data->fd.
2998 (lto_read_section_data): Use a single-entry file-descriptor cache.
2999 Do not check the result of xmalloc.
3000 (free_section_data): Do not use file_data->fd.
3001 (lto_read_all_file_options): Likewise.
3003 2009-10-22 Richard Guenther <rguenther@suse.de>
3005 * lto.c (lto_fixup_jump_functions): Remove.
3006 (lto_fixup_decls): Do not fixup jump functions.
3007 (read_cgraph_and_symbols): Schedule cgraph merging after
3008 summary reading. Schedule type and decl fixup before
3011 2009-10-22 Richard Guenther <rguenther@suse.de>
3013 * lto.c (lto_fixup_data_t): Remove free_list member.
3014 (lto_fixup_tree): Do not insert into free_list.
3015 (free_decl): Remove.
3016 (lto_fixup_decls): Remove free-list handling.
3018 2009-10-22 Jan Hubicka <jh@suse.cz>
3020 * lto.c (lto_fixup_jump_functions): New function.
3021 (lto_fixup_decls): Use it.
3023 2009-10-16 Richard Guenther <rguenther@suse.de>
3026 * lto.c (lto_fixup_tree): Revert last change.
3028 2009-10-14 Richard Guenther <rguenther@suse.de>
3030 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3031 compatible with the one we replace wrap it around a
3034 2009-10-09 Richard Guenther <rguenther@suse.de>
3038 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3040 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3041 (init_ehdr##BITS): Likewise.
3043 2009-10-08 Joseph Myers <joseph@codesourcery.com>
3045 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3046 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3048 * lto-lang.c (lto_post_options): Remove trailing "." from
3051 2009-10-08 Richard Guenther <rguenther@suse.de>
3053 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3056 2009-10-07 Joseph Myers <joseph@codesourcery.com>
3058 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3060 2009-10-07 Jan Hubicka <jh@suse.cz>
3062 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3063 ltrans stage; explain why this is needed and should not.
3065 2009-10-05 Richard Guenther <rguenther@suse.de>
3069 * lto.c (lto_read_decls): Do not register deferred decls.
3070 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3071 until after reading the IPA summaries.
3073 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
3075 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3076 (lto-lang.c): Don't include lto/common.h.
3078 2009-10-02 Rafael Avila de Espindola <espindola@google.com>
3080 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3081 (lto/common.o): Remove.
3083 * common.h (lto_kind_str): Remove.
3084 (lto_visibility_str): Remove.
3085 (lto_resolution_str): Make it static.
3087 2009-10-01 Diego Novillo <dnovillo@google.com>
3089 * lto.c (lto_read_decls): Add comment.
3090 Call internal_error instead of gcc_assert.
3091 (lto_resolution_read): Likewise.
3092 (lto_add_all_inlinees): Tidy.
3093 * Make-lang.in: Fix copyright boilerplate.
3095 (lto.install-pdf): New.
3096 * lto-tree.h: Fix copyright boilerplate.
3097 * lang-specs.h: Likewise.
3098 Remove ".lto" entry from compilers fragment.
3099 * lto-elf.c: Move inclusion of gelf.h after config.h.
3100 Tidy formatting everywhere.
3101 * lto.h: Fix copyright boilerplate.
3102 Tidy formatting everywhere.
3103 * common.c: Likewise.
3104 * config-lang.in: Likewise.
3105 * common.h: Likewise.
3106 * lto-lang.c: Likewise.
3108 2009-10-01 Richard Guenther <rguenther@suse.de>
3110 * lto.c (lto_read_section_data): Use plain lseek/read.
3112 2009-10-01 Richard Guenther <rguenther@suse.de>
3114 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3115 use sysconf to query the system page size.
3116 (lto_file_read): Implement fallback using stdio.
3117 (free_section_data): Likewise.
3119 2009-09-29 Diego Novillo <dnovillo@google.com>
3121 * lto-lang.c (lto_init): Really fix call to
3122 build_common_builtin_nodes.
3124 2009-09-29 Diego Novillo <dnovillo@google.com>
3126 * lto-lang.c (lto_init): Fix call to
3127 build_common_builtin_nodes.
3129 2009-09-29 Richard Guenther <rguenther@suse.de>
3132 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3134 (first_data_block): New static variable.
3135 (lto_elf_append_data): Align the first data block in each
3138 2009-09-28 Diego Novillo <dnovillo@google.com>
3140 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3141 * lto.c (strip_extension): New.
3142 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3143 (lto_execute_ltrans): Tidy.
3144 Do not pass -fwpa nor -fltrans-* to LTRANS.
3145 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3146 * tree.c (need_assembler_name_p): Call
3147 lang_hooks.decls.may_need_assembler_name_p if set.
3148 * varasm.c (default_binds_local_p_1): Remove check for
3150 * varpool.c (decide_is_variable_needed): Do not test for
3153 2009-09-22 Richard Guenther <rguenther@suse.de>
3156 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3157 * Make-lang.in: Remove ltrans-driver stuff.
3158 * config-lang.in: Likewise.
3159 * lang.opt (fltrans-driver): Remove.
3160 * lto-lang.c (lto_init_options): Remove code initializing
3162 * ltrans-driver: Remove.
3164 2009-09-21 Diego Novillo <dnovillo@google.com>
3166 * lto-lang.c (lto_define_builtins): Remove superfluous
3167 calls to targetm.init_builtins and build_common_builtin_nodes.
3168 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3169 build_common_builtin_nodes.
3170 * lto.c (lto_materialize_function): Do nothing if NODE is a
3173 2009-09-03 Diego Novillo <dnovillo@google.com>
3175 * lto-elf.c (validate_file): Replace call to
3176 elf_getshstrndx with call to elf_getshdrstrndx.
3178 2009-08-19 Richard Guenther <rguenther@suse.de>
3180 * lto-lang.c (lto_init): Merge char_type_node with the
3181 appropriately signed variant.
3183 2009-08-19 Richard Guenther <rguenther@suse.de>
3186 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3187 (lto_fixup_type): Re-build the pointer-to chain part two.
3189 2009-08-19 Richard Guenther <rguenther@suse.de>
3192 * lto.c (lto_fixup_type): Re-build the type variant chain.
3194 2009-08-19 Richard Guenther <rguenther@suse.de>
3197 * lto.c (lto_fixup_constructor): New function.
3198 (lto_fixup_tree): Replace all types. Properly fixup
3199 constructors and constants.
3201 2009-08-14 Richard Guenther <rguenther@suse.de>
3203 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3204 for DECL_LANG_SPECIFIC.
3206 2009-08-13 Richard Guenther <rguenther@suse.de>
3209 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3211 2009-07-30 Richard Guenther <rguenther@suse.de>
3214 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3215 the largest decl for output and free TREE_CHAIN for further
3218 2009-07-24 Diego Novillo <dnovillo@google.com>
3220 * Make-lang.in: Add empty lto.install-plugin target.
3222 2009-07-13 Diego Novillo <dnovillo@google.com>
3224 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3226 2009-07-11 Richard Guenther <rguenther@suse.de>
3228 * lto-lang.c (lto_write_globals): Wrapup global decls.
3230 2009-07-10 Richard Guenther <rguenther@suse.de>
3232 * lto-lang.c (lto_init): Allocate one more location to make
3233 BUILTINS_LOCATION correct.
3235 2009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3237 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3239 2009-07-06 Diego Novillo <dnovillo@google.com>
3241 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3244 2009-07-06 Diego Novillo <dnovillo@google.com>
3246 * lto.c (preload_common_nodes): Remove.
3247 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3248 (lto_read_decls): Call lto_data_in_create and
3250 (free_decl): Do not call ggc_free.
3251 (lto_main): Call lto_init_reader.
3252 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3253 (lto_init): Initialize main_identifier_node if needed.
3254 Make ptrdiff_type_node be integer_type_node.
3256 2009-06-19 Diego Novillo <dnovillo@google.com>
3258 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3259 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3260 Remove code guarded by #ifdef LOCAL_TRACE.
3262 2009-06-18 Diego Novillo <dnovillo@google.com>
3264 * lto.c: Update license to GPLv3.
3265 * lto-elf.c: Likewise.
3266 * common.c: Likewise.
3267 * lto-lang.c: Likewise.
3268 * lto.h: Remove superfluous include files. Update all
3271 2009-06-17 Diego Novillo <dnovillo@google.com>
3273 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3275 2009-06-02 Diego Novillo <dnovillo@google.com>
3277 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3279 (materialize_cgraph): Only materialize nodes that have a
3280 representation on file.
3282 2009-06-01 Diego Novillo <dnovillo@google.com>
3284 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3286 2009-05-31 Diego Novillo <dnovillo@google.com>
3288 * lto-lang.c (lto_type_for_mode): Handle all the modes
3289 handled in c_common_type_for_mode.
3291 2009-05-21 Diego Novillo <dnovillo@google.com>
3293 * lto-elf.c: Always include <gelf.h>.
3294 * config-lang.in (target_libs): Remove.
3295 (build_by_default): Set to no.
3297 2009-05-15 Diego Novillo <dnovillo@google.com>
3299 * lto.c (lto_materialize_function): Assert that DECL is
3301 (materialize_cgraph): Don't try to materialize builtin
3303 * lto-section-out.c (write_symbol_vec): Do not write
3306 2009-05-13 Diego Novillo <dnovillo@google.com>
3308 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3310 2009-05-07 Diego Novillo <dnovillo@google.com>
3312 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3313 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3314 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3315 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3316 (lto_fixup_tree): Call gimple_register_type when *TP is a
3318 (lto_main): Call bitmap_obstack_initialize.
3320 2009-04-22 Diego Novillo <dnovillo@google.com>
3322 * lto.c (free_section_data): Tidy.
3323 (lto_1_to_1_map): Tidy.
3324 (lto_add_all_inlinees): Tidy.
3325 (prefix_name_with_star): New.
3326 (get_filename_for_set): New.
3327 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3328 to determine what cgraph node sets to write.
3329 Call get_filename_for_set to compute temporary file
3331 (lto_execute_ltrans): Do not execute LTRANS on files with
3332 names that start with '*'.
3333 Move logic to execute LTRANS together so that LTRANS is
3334 invoked only if there are any files to compile.
3335 (do_whole_program_analysis): Only remove output files
3336 that do not start with '*'.
3338 2009-04-06 Diego Novillo <dnovillo@google.com>
3340 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3341 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3342 (lto_add_all_inlinees): Tidy.
3344 2009-03-26 Diego Novillo <dnovillo@google.com>
3346 * lto.c: Include gimple.h.
3347 (lto_read_in_decl_state): Call gimple_register_type for
3348 every type in every stream.
3349 (lto_fixup_common): Call gimple_register_type if T has a
3351 (do_whole_program_analysis): Call print_lto_report.
3352 (lto_main): Call print_lto_report after cgraph_optimize.
3353 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3355 2009-03-24 Diego Novillo <dnovillo@google.com>
3357 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3358 (lto.o): Add dependency on GIMPLE_H.
3360 2009-03-10 Simon Baldwin <simonb@google.com>
3362 * lto.c (lto_read_all_file_options): Close any open file descriptor
3363 contained in file_data before freeing.
3365 2009-02-24 Rafael Avila de Espindola <espindola@google.com>
3367 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3368 for a decl in the original bitmap, not a node.
3369 (lto_add_all_inlinees): Remove original nodes that are not needed.
3370 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3372 2009-02-24 Diego Novillo <dnovillo@google.com>
3374 * lto.c (lto_materialize_function): Update
3375 lto_stats.num_function_bodies.
3376 (get_section_data): Initialize *LEN to 0.
3377 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3378 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3379 Update lto_stats.num_output_files.
3380 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3381 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3382 (lto_main): Initialize lto_stats.
3383 If flag_lto_report is set, call print_lto_report.
3385 2009-02-19 Diego Novillo <dnovillo@google.com>
3389 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3391 * lto.c (lto_add_inline_clones): Don't add the
3392 master clone. Check for a decl in the original
3394 (lto_add_all_inlinees): Remove original nodes
3395 that are not needed.
3396 (lto_scan_statics_in_cgraph_node): Don't care if
3397 the node is the master.
3398 (lto_promote_cross_file_statics): Use a new
3399 context.seen_node_decls for each set
3401 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3403 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3404 for a decl in the original bitmap, not a node.
3405 (lto_add_all_inlinees): Remove original nodes that are not needed.
3406 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3407 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3410 2009-02-18 Diego Novillo <dnovillo@google.com>
3412 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3413 and TV_WHOPR_WPA_IO.
3414 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3415 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3416 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3417 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3418 depending on command line flags.
3419 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3420 (lto_main): Remove timer uses.
3422 2009-02-18 Rafael Avila de Espindola <espindola@google.com>
3424 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3425 (lto_wpa_write_files): Update calls to renamed functions.
3427 2009-02-17 Diego Novillo <dnovillo@google.com>
3430 * lto-lang.c (lto_post_options): Disable -fwhole-program
3431 when running LTRANS.
3433 2009-02-10 Diego Novillo <dnovillo@google.com>
3435 * lto.c (read_cgraph_and_symbols): Fix comment.
3437 2009-02-10 Diego Novillo <dnovillo@google.com>
3439 * lto.c (read_cgraph_and_symbols): Read options from all
3442 2009-02-10 Diego Novillo <dnovillo@google.com>
3444 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3445 (materialize_cgraph): Likewise.
3446 (do_whole_program_analysis): Likewise.
3447 (lto_main): Call read_cgraph_and_symbols,
3448 materialize_cgraph and do_whole_program_analysis.
3450 2009-02-10 Simon Baldwin <simonb@google.com>
3452 * lto.c: Include lto-opts.h.
3453 * (lto_main): Clear file options at loop start, read any saved
3454 options from the first file handled, and re-issue options.
3455 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3457 2009-02-02 Diego Novillo <dnovillo@google.com>
3459 * lto.c (lto_main): Stop LTO_TIMER and use
3460 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3462 2009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3465 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3468 2009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3470 * Make-lang.in (LTO_EXE): Link with all
3471 BACKENDLIBS and not only GMPLIBS
3473 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3476 * lto-elf.c: Include gelf.h instead of libelf.h.
3477 (lto_elf_file_close): Replace elfx_update_shstrndx with
3478 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3481 2009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3484 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3486 2009-01-26 Diego Novillo <dnovillo@google.com>
3488 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3490 2009-01-26 Diego Novillo <dnovillo@google.com>
3492 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3493 and rename into gimple_types_compatible_p.
3495 2009-01-12 Rafael Avila de Espindola <espindola@google.com>
3497 * lto-lang.c (lang_hooks): Remove the const qualifier.
3499 2009-01-06 Diego Novillo <dnovillo@google.com>
3501 * ltrans-driver: Mark 'all' target as phony.
3503 2008-12-31 Diego Novillo <dnovillo@google.com>
3505 * ltrans-driver: Execute a NOP action for target 'all'.
3507 2008-12-19 Diego Novillo <dnovillo@google.com>
3509 * lto.c (lto_1_to_1_map): Tidy.
3511 2008-12-19 Diego Novillo <dnovillo@google.com>
3513 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3514 be opened, show its name.
3515 * ltrans-driver: If $verbose is set, do not use parallelism.
3517 2008-12-17 Rafael Avila de Espindola <espindola@google.com>
3519 * lto.c (lto_fixup_function): New.
3520 (lto_fixup_tree): Call lto_fixup_function.
3522 2008-12-14 Doug Kwan <dougkwan@google.com>
3524 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3525 variables if there is no function.
3527 2008-12-10 Simon Baldwin <simonb@google.com>
3529 * ltrans-driver: Always run make in silent mode, to avoid make's
3530 trace on stdout interfering with lto-wrapper output.
3532 2008-12-10 Doug Kwan <dougkwan@google.com>
3534 * lto.c (lto_add_inline_clones): Do not force master clones of
3535 inlined functions already in SET to be static inline.
3537 2008-12-04 Doug Kwan <dougkwan@google.com>
3539 * lto.c (globalize_context_t): New type to store states in
3540 globalization of cross-file statics.
3541 (globalize_cross_file_statics): New.
3542 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3543 static decls that need to be fixed up.
3544 (lto_scan_statics_in_cgraph_node): Change call interface to use
3545 a globalize_context_t CONTEXT for all states used.
3546 (lto_scan_statics_in_remaining_global_vars): New.
3547 (lto_promote_cross_file_statics): Use new call interface of
3548 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3549 visible vars in the last set.
3551 2008-12-03 Diego Novillo <dnovillo@google.com>
3553 * lto.c (lto_fixup_tree): Do not emit an error when
3554 PREVAILING throw but T doesn't.
3556 2008-12-02 Doug Kwan <dougkwan@google.com>
3558 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3560 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3561 variables and functions.
3562 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3563 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3565 2008-11-29 Diego Novillo <dnovillo@google.com>
3567 * lto.c: Include timevar.h.
3568 (lto_materialize_function): Tidy. Add comments.
3569 (lto_wpa_write_files): Tidy.
3570 (lto_execute_ltrans): Tidy.
3571 (lto_main): Add local variable LTO_TIMER. Initialize it
3572 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3573 Start and stop the timer.
3575 * Make-lang.in (lto.o): Add dependency on timevar.h.
3576 * ltrans-driver: React to -v and -save-temps.
3577 Use simple heuristic to determine how much parallelism to
3578 use when executing make.
3580 2008-11-12 Doug Kwan <dougkwan@google.com>
3582 * lto.c (lto_bitmap_obstack): Remove var.
3583 (lto_materialize_function): Do nothing instead of marking function
3584 body in file if flag_wpa is true.
3585 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3586 (lto_scan_statics_in_cgraph_node): New function.
3587 (lto_promote_cross_file_statics): Same.
3588 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3589 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3590 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3592 2008-11-09 Diego Novillo <dnovillo@google.com>
3594 * lto/lto.c (lto_fixup_tree): Change error message locus
3595 information to include location of mismatching
3597 Use TREE_NO_WARNING to avoid repeated messages.
3598 (lto_main): If lto_fixup_decls emitted any errors, exit.
3599 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3600 (lto_init_options): Don't enable exceptions by default.
3601 (lto_eh_runtime_type): Move to lto-function-in.c
3602 (lto_init_eh): Likewise.
3603 (lto_init): Don't call lto_init_eh.
3604 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3605 libfuncs.h and except.h.
3607 2008-10-30 Diego Novillo <dnovillo@google.com>
3609 * lto.c (lto_read_decls): Declare debug_main only if
3610 LTO_STREAM_DEBUGGING is enabled.
3612 2008-10-30 Simon Baldwin <simonb@google.com>
3614 * lto.c (lto_wpa_write_files): Create intermediate files with
3615 make_cwd_temp_file().
3616 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3617 WPA_SAVE_LTRANS is set.
3618 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3619 * ltrans-driver: Do not strip directory from output files.
3621 2008-10-29 Doug Kwan <dougkwan@google.com>
3623 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3625 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3626 (lto/lto-symtab.o): Remove rule.
3627 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3628 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3629 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3631 lto-symtab.c (File): Move up one level.
3632 lto-lang.c (cgraph.h): Remove include.
3633 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3634 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3635 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3637 2008-10-24 Rafael Espindola <espindola@google.com>
3639 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3640 non prevailing weak symbols.
3642 2008-10-24 Rafael Espindola <espindola@google.com>
3644 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3646 2008-10-24 Rafael Espindola <espindola@google.com>
3648 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3651 2008-10-23 Simon Baldwin <simonb@google.com>
3653 * lto-lang.c (input_node): Save the node reference, rather than the
3654 node pointer, in node->inlined_to.
3655 (input_cgraph_1): Convert node references into node pointers.
3657 2008-10-22 Diego Novillo <dnovillo@google.com>
3658 Rafael Espindola <espindola@google.com>
3660 * lto.c (lto_resolution_read): Tidy.
3661 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3662 abort if RET is NULL.
3664 2008-10-22 Doug Kwan <dougkwan@google.com>
3666 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3667 exceptions flag is given.
3668 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3669 (lto_init_eh): Remove exceptions flag initialization.
3670 (lto_init): Only call lto_init_eh if exceptions flag is set.
3672 2008-10-21 Diego Novillo <dnovillo@google.com>
3674 * lto.c: Tidy some formatting.
3677 2008-10-21 Simon Baldwin <simonb@google.com>
3679 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3680 them is NULL (but not the other).
3682 2008-10-17 Diego Novillo <dnovillo@google.com>
3684 * ltrans-driver: Divert output from make to a temporary file.
3685 Show it if the call to make failed.
3687 2008-10-15 Diego Novillo <dnovillo@google.com>
3689 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3690 Do not print TEMP_FILENAME
3691 * ltrans-driver: Call make with -s.
3693 2008-10-15 Diego Novillo <dnovillo@google.com>
3695 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3696 TREE_STATIC on global symbols.
3698 2008-10-14 Ollie Wild <aaw@google.com>
3700 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3701 (LTRANS_DRIVER_EXE): Add.
3702 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3703 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3704 (lto.install.common): Remove ltrans-driver.
3705 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3706 (LTRANS_DRIVER_EXE): New build rule.
3707 * config-lang.in (compilers): Add ltrans-driver.
3709 2008-10-14 Diego Novillo <dnovillo@google.com>
3711 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3714 2008-10-13 Ollie Wild <aaw@google.com>
3716 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3717 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3718 * ltrans-driver (LTRANS_FLAGS): Remove.
3720 2008-10-08 Doug Kwan <dougkwan@google.com>
3722 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3723 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3724 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3725 from lto_fixup_state to here.
3726 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3727 just a free-list. Fix up types also. Move decl merging code to
3729 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3731 (lto_fixup_decls): Use another pointer set to avoid multiple
3732 walking of nodes except for DECLs to be replaced. Pass an
3733 lto_fixup_data_t object to tree-walker.
3735 2008-10-08 Rafael Espindola <espindola@google.com>
3737 * lto-symtab.c (lto_symtab_set_resolution): New.
3738 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3739 lto_symtab_get_resolution.
3740 (lto_symtab_prevailing_decl): Return decl for non public decls.
3741 (lto_symtab_get_resolution): New.
3742 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3744 2008-10-06 Rafael Espindola <espindola@google.com>
3746 * lto-lang.c: Include cgraph.h.
3747 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3748 input_cgraph): Moved from lto-cgraph.c.
3749 (LANG_HOOKS_INPUT_CGRAPH): New.
3751 2008-10-03 Rafael Espindola <espindola@google.com>
3753 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3755 2008-10-03 Rafael Espindola <espindola@google.com>
3757 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3758 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3759 prevailing definition. Don't mark TREE_NOTHROW differences.
3760 * lto.c (lto_fixup_tree): New.
3761 (lto_fixup_state): New.
3762 (lto_fixup_state_aux): New.
3764 (lto_fixup_decls): New.
3765 (lto_main): Call lto_fixup_decls.
3767 2008-10-02 Ollie Wild <aaw@google.com>
3769 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3771 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3772 * lto-lang.c (lto_post_options): Add validation and fixups for
3775 2008-10-02 Rafael Espindola <espindola@google.com>
3777 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3778 lto_symtab_merge_decl): Return void.
3779 (lto_symtab_prevailing_decl): New.
3781 2008-09-30 Rafael Espindola <espindola@google.com>
3783 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3785 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3786 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3787 Check for already defined symbols.
3788 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3789 (LTO_IDENTIFIER_RESOLUTION): Remove.
3790 (LTO_DECL_RESOLUTION): New.
3792 2008-09-30 Rafael Espindola <espindola@google.com>
3794 * lto.c (lto_read_decls): Use new input_tree signature.
3796 2008-09-26 Doug Kwan <dougkwan@google.com>
3798 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3799 bodies affected by exception attribute merging of DECLs.
3800 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3803 2008-09-25 Rafael Espindola <espindola@google.com>
3805 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3806 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3807 * lto-symtab.c (lto_symtab_compatible): New.
3808 (lto_symtab_overwrite_decl): New.
3809 (lto_symtab_merge_decl): Refactor to use the above functions
3810 and the resolution from lang_identifier.
3811 * lto-tree.h: Include plugin-api.h.
3812 (lang_identifier): Add resolution.
3813 (LTO_IDENTIFIER_RESOLUTION): New.
3815 2008-09-25 Ollie Wild <aaw@google.com>
3817 * lang.opt (fltrans-output-list=): New option.
3818 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3820 2008-09-25 Rafael Espindola <espindola@google.com>
3822 * lto.c (lto_resolution_read): Initialize ret;
3824 2008-09-24 Ollie Wild <aaw@google.com>
3826 * lto.c (sys/mman.h): Move include.
3827 (lto_wpa_write_files): Return a list of written files.
3828 (lto_execute_ltrans): New function.
3829 (lto_main): Call lto_execute_ltrans.
3830 (ltrans-driver): New file.
3831 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3832 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3833 (lto_init_options): Initialize ltrans_driver.
3834 (lto_handle_option): Fix incorrect default output value.
3835 * lang.opt (fltrans-driver=): New option.
3836 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3837 (lto.install-common): Add lto/ltrans-driver.
3839 2008-09-24 Rafael Espindola <espindola@google.com>
3841 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3842 (lto/lto.o): Depend on lto/common.h.
3843 (lto/common.o): New.
3844 * lang.opt (resolution): New.
3845 * lto-lang.c (resolution_file_name): New.
3846 (lto_handle_option): Handle OPT_resolution.
3847 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3848 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3849 pass it to lto_symtab_merge_decl.
3850 * lto.c: Include common.h.
3851 (lto_read_decls): Add resolutions and resolutions_size arguments.
3852 Initialize data_in.globals_resolution and
3853 data_in.globals_resolution_size.
3854 (index_and_symbol_resolution): New.
3855 (lto_resolution_read): New.
3856 (lto_file_read): Add argument resolution_file.
3858 * lto.h (resolution_file_name): New.
3860 2008-09-23 Rafael Espindola <espindola@google.com>
3862 * common.c: Update description.
3863 * common.h: Update description.
3865 2008-09-23 Rafael Espindola <espindola@google.com>
3867 * common.c: Moved from lto-plugin.
3868 * common.h: Moved from lto-plugin.
3870 2008-09-22 Doug Kwan <dougkwan@google.com>
3872 * lto.c (VEC(bitmap,heap)): Declare.
3873 (lto_materialize_function): Handle WAP mode specially.
3874 (lto_add_inline_clones): New.
3875 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3876 return a bitmap of inlined decls.
3877 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3878 (lto_main): Call reset_inline_failed to reset inlining states.
3879 Check call-graph after WPA inlining.
3880 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3883 2008-09-19 Doug Kwan <dougkwan@google.com>
3885 lto.c (lto_main): Remove unsued wrapper code.
3886 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3888 2008-09-19 Rafael Espindola <espindola@google.com>
3890 * lto-symtab.c: Include lto-tree-in.h.
3891 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3892 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3893 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3895 2008-09-17 Paolo Bonzini <bonzini@gnu.org>
3896 Rafael Avila de Espindola <espindola@google.com>
3898 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3899 COMPOUND_LITERAL_EXPR_DECL): Remove.
3900 (emit_local_var): Remove.
3901 (lto_expand_expr): Remove.
3902 (lto_staticp): Remove.
3903 (LANG_HOOKS_EXPAND_EXPR): Remove.
3904 (LANG_HOOKS_STATICP): Remove.
3906 2008-09-11 Diego Novillo <dnovillo@google.com>
3908 * lto-lang.c: Include except.h and libfuncs.h.
3910 (lto_init): Call it.
3911 Set flag_generate_lto to 0.
3912 * Make-lang.in (lto-lang.o): Add dependency on except.h
3915 2008-09-09 Bill Maddox <maddox@google.com>
3917 * lto-lang.c: Include header file expr.h.
3918 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3919 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3920 (emit_local_var): Copied from c-semantics.c.
3921 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3922 and c_staticp in c-common.c.
3923 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3925 2008-09-08 Diego Novillo <dnovillo@google.com>
3927 * lto-lang.c (lto_global_bindings_p): Return 1 during
3930 2008-09-07 Diego Novillo <dnovillo@google.com>
3932 * lto.c: Tidy formatting.
3934 2008-08-04 Bill Maddox <maddox@google.com>
3936 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3938 2008-09-03 Doug Kwan <dougkwan@google.com>
3940 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3941 CIF_OK instead of NULL.
3943 2008-09-02 Diego Novillo <dnovillo@google.com>
3944 Simon Baldwin <simonb@google.com>
3946 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3947 c_common_type_for_size.
3948 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3949 (lto_init): Call linemap_add.
3950 (signed_and_unsigned_types): Remove.
3952 2008-08-29 Diego Novillo <dnovillo@google.com>
3954 * lto-lang.c (handle_noreturn_attribute): New local function.
3955 (handle_const_attribute): New local function.
3956 (handle_malloc_attribute): New local function.
3957 (handle_pure_attribute): New local function.
3958 (handle_novops_attribute): New local function.
3959 (handle_nonnull_attribute): New local function.
3960 (handle_nothrow_attribute): New local function.
3961 (handle_sentinel_attribute): New local function.
3962 (handle_type_generic_attribute): New local function.
3963 (handle_format_attribute): New local function.
3964 (handle_format_arg_attribute): New local function.
3965 (lto_attribute_table): Declare.
3966 (lto_format_attribute_table): Declare.
3967 (lto_init_attributes): New local function.
3968 (lto_define_builtins): Call it.
3969 Call targetm.init_builtins and build_common_builtin_nodes.
3970 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3971 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3973 2008-08-28 Diego Novillo <dnovillo@google.com>
3975 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3977 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3978 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3979 * lto-symtab.c: Include gimple.h.
3980 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3983 2008-08-27 Doug Kwan <dougkwan@google.com>
3985 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3986 gt-lto-lto.h): New includes.
3987 (lto_materialize_function): Do not read in function body in WPA mode.
3988 Format a line to fit in 80 columns.
3989 (lto_cgraph_node_sets): New garbage collected variable.
3990 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3992 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3993 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3994 variable LTO_SECTION_IN_H.
3995 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3996 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3997 with variable LTO_SECTION_IN_H.
3998 * config-lang.in (gtfiles): Add lto/lto.c.
3999 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4000 merged DECL_RESULT correctly.
4002 2008-08-26 Bill Maddox <maddox@google.com>
4004 * lto-lang.c Include tree-gimple.h.
4005 (lto_mark_addressable): Call mark_addressable rather than
4007 (lto_post_options): Suppress debug info generation.
4008 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4010 2008-08-25 Bill Maddox <maddox@google.com>
4012 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4013 assertion and leave an explanatory comment in its place.
4015 2008-08-21 Doug Kwan <dougkwan@google.com>
4017 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4018 of common nodes instead of computing locallly.
4019 (lto_read_in_decl_state): New.
4020 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4021 Read global and per-function in-decl states.
4022 * Make-lang.in (LTO_H): Update dependency.
4024 (lto-symtab.c): Merge (revision 139039)
4025 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4027 2008-08-21 Rafael Espindola <espindola@google.com>
4029 * config-lang.in (target_libs): New.
4031 2008-08-20 Bill Maddox <maddox@google.com>
4033 * lto.c (current_lto_file): Remove GTY marker from static
4034 variable. Remove include of file gt-lto-lto.h.
4035 * Make-lang.in: Remove dependency of lto/lto.o on
4037 * lto-elf.c (lto_file_close): Removed.
4038 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4039 allocate lto_elf_file object.
4040 (lto_elf_file_close): Free lto_elf_file object after close.
4041 * lto.h (struct lto_file_struct): Remove GTY marker.
4042 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4045 2008-08-20 Bill Maddox <maddox@google.com>
4047 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4048 to conform to its new signature.
4049 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4050 on discarded node here, now called in global_vector_fixup.
4052 2008-08-09 Bill Maddox <maddox@google.com>
4054 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4055 has not been set to a front-end-specific value.
4057 2008-08-05 Doug Kwan <dougkwan@google.com>
4059 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4062 2008-07-30 Bill Maddox <maddox@google.com>
4064 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4065 Remove obsolete comments.
4066 (lto_read_decls): Remove initialization of deleted field data_in.global.
4068 (lto_main): Remove redundant initialization of section_hash_table.
4069 * lto-elf.c: Removed obsolete comments.
4070 * lto.h: Tidy up comments.
4071 * lto-symtab.c (lto_least_common_multiple): New function.
4072 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4075 2008-07-25 Diego Novillo <dnovillo@google.com>
4076 Bill Maddox <maddox@google.com>
4078 * lto.c: Re-order include files.
4079 Include lto-section-out.h.
4080 (preload_common_nodes): Add debugging output.
4081 Add new local INDEX_TABLE.
4082 Call preload_common_node.
4083 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4085 2008-07-13 Bill Maddox <maddox@google.com>
4087 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4088 unwanted scaling during pointer addition.
4090 2008-07-11 Bill Maddox <maddox@google.com>
4091 Diego Novillo <dnovillo@google.com>
4093 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4094 Make code const-correct.
4095 (lto_file_read): Fix C++ compatibility warnings.
4096 (lto_read_section_data): Fix C++ compatibility warnings.
4097 (lto_get_section_data): Use CONST_CAST to avoid warning when
4098 const pointer passed to free.
4099 * lto-elf.c (lto_elf_build_section_table): Fix C++
4100 compatibility warnings.
4101 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4102 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4103 (lto_get_current_out_file): Fix C++ compatibility warnings.
4105 2008-07-11 Diego Novillo <dnovillo@google.com>
4107 * Make-lang.in (lto-warn): Define.
4109 2008-07-03 Simon Baldwin <simonb@google.com>
4111 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4112 LTO_STREAM_DEBUGGING.
4114 2008-06-27 Ollie Wild <aaw@google.com>
4116 * lto-elf.c (lto-section-out.h): New include.
4117 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4119 (cached_file_attrs): New static variable.
4120 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4121 Use cached_file_attrs for checking bits.
4122 (lto_elf_build_section_table): Remove elf_file argument from
4123 lto_elf_get_shdr and lto_elf_free_shdr calls.
4124 (DEFINE_INIT_SHDR): New macro.
4125 (init_shdr32, init_shdr64): New functions defined via the
4126 DEFINE_INIT_SHDR macro.
4127 (lto_elf_begin_section_with_type): New function.
4128 (lto_elf_begin_section): New function.
4129 (lto_elf_append_data): New function.
4130 (lto_elf_end_section): New function.
4131 (DEFINE_VALIDATE_EHDR): New macro.
4132 (validate_ehdr32, validate_ehdr64): New functions defined via the
4133 DEFINE_VALIDATE_EHDR macro.
4134 (validate_file): New function.
4135 (DEFINE_INIT_EHDR): New macro.
4136 (init_ehdr32, init_ehdr64): New functions defined via the
4137 DEFINE_INIT_EHDR macro.
4138 (init_ehdr): New function.
4139 (lto_elf_file_open): Add support for writable files. Move some
4140 validation logic to validate_file.
4141 (lto_elf_file_close): Add support for writable files. Write file data
4142 and free data blocks.
4143 (current_out_file): New static variable.
4144 (lto_set_current_out_file): New function.
4145 (lto_get_current_out_file): New function.
4146 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4147 Add temporary initialization for testing ELF serialization.
4148 * lto.h (lto-section-out.h): New include.
4149 (struct lto_file_struct): Slight modification to comment.
4150 (lto_elf_file_open): Add writable parameter.
4151 (lto_elf_begin_section): New function declaration.
4152 (lto_elf_append_data): New function declaration.
4153 (lto_elf_end_section): New function declaration.
4154 (lto_set_current_out_file, lto_get_current_out_file): New function
4156 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4157 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4158 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4159 * Make-lang.in (LTO_H): Add lto-section-out.h.
4161 2008-06-12 Ollie Wild <aaw@google.com>
4163 * lto.h (struct lto_file_vtable_struct): Remove.
4164 (struct lto_file_struct): Remove vtable member.
4165 * lto-elf.c (lto_file_init): Remove vtable argument.
4166 (lto_elf_map_optional_lto_section): Remove.
4167 (lto_elf_unmap_section): Remove.
4168 (lto_elf_file_vtable): Remove.
4169 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4171 (lto_elf_find_section_data): Remove.
4173 2008-06-11 Ollie Wild <aaw@google.com>
4175 * lto.c (lto_file_read): Add const qualifier to data variable.
4177 2008-06-11 Diego Novillo <dnovillo@google.com>
4179 Merge from lto-streamber sub-branch.
4181 2008-06-04 Ollie Wild <aaw@google.com>
4183 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4184 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4186 2008-05-28 Bill Maddox <maddox@google.com>
4188 Replace the DWARF reader in the LTO front-end.
4190 * lto.c: Include lto-tree-in.h, lto-tags.h.
4191 (enum DWARF2_class, DW_cl_constant, struct
4192 DWARF2_form_data, struct lto_context,
4193 lto_fd_init, lto_info_fd_init,
4194 lto_abbrev_fd_init, lto_info_fd_close,
4195 lto_file_init, lto_file_close,
4196 lto_file_corrupt_error, lto_abi_mismatch_error,
4197 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4198 lto_read_uleb128, lto_read_sleb128,
4199 lto_read_initial_length, lto_abbrev_read_attrs,
4200 lto_abbrev_read, lto_abbrev_read_lookup,
4201 lto_read_section_offset,
4202 lto_read_comp_unit_header, find_cu_for_offset,
4204 lto_resolve_reference,lto_read_form,
4205 attribute_value_as_int,
4206 make_signed_host_wide_int,
4207 attribute_value_as_constant, lto_cache_hash,
4208 lto_cache_eq, lto_cache_store_DIE,
4209 lto_cache_lookup_DIE, lto_find_integral_type,
4210 lto_find_integral_type_1,
4211 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4212 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4213 lto_unsupported_attr_error, lto_get_identifier,
4214 lto_read_referenced_type_DIE,
4215 lto_read_compile_unit_DIE,
4216 lto_read_array_type_DIE,
4217 lto_read_structure_union_class_type_DIE,
4218 lto_read_enumerator_DIE,
4219 lto_read_enumeration_type_DIE,
4220 lto_read_only_for_child_DIEs,
4221 lto_read_only_for_child_DIEs,
4222 lto_read_member_DIE, lto_read_abbrev,
4223 lto_read_variable_formal_parameter_constant_DIE,
4224 lto_get_body): Removed.
4225 (preload_common_nodes): New function.
4226 (lto_read_decls): Convert for new global streamer.
4227 (lto_materialze_file_data,
4228 lto_read_subroutine_type_subprogram_die,
4229 lto_read_unspecified_parameters_DIE,
4230 lto_read_typedef_DIE,
4231 lto_read_pointer_reference_type_DIE,
4232 lto_read_subrange_type_DIE,
4233 lto_read_base_type_DIE,
4234 lto_read_const_volatile_restrict_type_DIE,
4235 lto_read_namespace_DIE,
4236 lto_read_unspecified_type_DIE, lto_read_DIE,
4237 lto_read_child_DIEs, lto_collect_child_DIEs):
4239 (lto_info_read, lto_set_cu_context): Removed.
4240 (lto_file_read): Convert for new global streamer.
4241 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4242 lto_resolve_var_ref, lto_resolve_fn_ref,
4243 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4244 lto_resolve_namespacedecl_ref): Removed.
4245 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4246 * lto-tree.h (lto_symtab_merge_var,
4247 lto_symtab_mergee_fun): Declare here.
4248 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4249 (lto_elf_file_open): Removed code to read DWARF debug sections.
4250 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4251 DWARF2_CompUnit, lto_die_ptr,
4252 lto_die_cache_entry, lto_fd, lto_info_fd,
4253 lto_abbrev_fd): Removed.
4254 (lto_file): Removed debug_info and debug_abbrev fields.
4256 (lto_file_init, lto_file_close,
4257 lto_resolve_type_ref, lto_resolve_var_ref,
4258 lto_resolve_fn_ref, lto_resolve_field_ref,
4259 lto_resolve_typedecl_ref,
4260 lto_resolve_namespacedecl_ref,
4261 lto_get_file_name): Removed declarations.
4262 (lto_symtab_merge_var, lto_symtab_merge_fn):
4263 Declarations moved to lto-tree.h.
4264 * lto-symtab.c (lto_compatible_attributes_p):
4265 Lobotomize this, as it barfs on "Hello, world!".
4266 * lto-section-out.c: Include lto-tree-out.h.
4267 (lto_hash_global_slot_node,
4268 lto_eq_global_slot_node, preload_common_nodes,
4269 write_global_stream, write_global_references):
4271 (produce_asm_for_decls): Convert for new global streamer.
4272 * lto-section-out.h (lto_hash_global_slot_node,
4273 lto_eq_global_slot_node): Declare.
4275 2008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
4276 Jan Hubicka <jh@suse.cz>
4278 * lto.c (sys/mman.h, tree-pass.h): New includes.
4279 (lto_materialize_constructors_and_inits,
4280 lto_materialize_function): Keeps length of section.
4281 (lto_materialize_cgraph): Removed.
4282 (lto_read_decls): Initialize fd field.
4283 (lto_file_read): Different return type and removed much code to
4285 (page_mask): New variable.
4286 (lto_read_section_data, get_section_data, free_section_data): New
4288 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4289 passes can get the section data.
4291 2008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
4293 * lto.h (lto_read_decls): Made local.
4294 (lto_input_function_body, lto_input_constructors_and_inits,
4295 lto_input_cgraph): Declarations moved to lto-section-in.h.
4296 * lto-section-in.c: Moved to .. .
4297 * lto-cgraph-in.c: Ditto.
4298 * lto-section-in.h: Ditto.
4299 * lto-function-in.c: Ditto.
4300 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4301 (lto_insert_block): Removed.
4302 (LANG_HOOKS_INSERT_BLOCK): Removed.
4303 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4304 lto-section-in.o): Rules moved to lto/Makefile.in.
4307 2008-05-16 Ollie Wild <aaw@google.com>
4309 * lto-lang.c (tree-inline.h): Include.
4310 (lto_post_options): New function.
4311 (LANG_HOOKS_POST_OPTIONS): Define.
4312 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4313 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4315 2008-05-13 Diego Novillo <dnovillo@google.com>
4317 * lto-function-in.c (input_ssa_names): Call
4318 make_ssa_name_fn instead of make_ssa_name.
4320 2008-05-12 Diego Novillo <dnovillo@google.com>
4322 * lto-cgraph-in.c (overwrite_node): Update references to
4323 inline summary fields.
4324 * lto-function-in.c (input_expr_operand): Do not handle
4327 2008-05-09 Ollie Wild <aaw@google.com>
4329 * lang.opt: New file.
4330 * lto-lang.c (lto_init_options): New function.
4331 (lto_handle_option): New function.
4332 (lto_init): Move initialization of flag_unit_at_a_time to
4334 (LANG_HOOKS_INIT_OPTIONS): Define.
4335 (LANG_HOOKS_HANDLE_OPTION): Define.
4337 2008-04-29 Ollie Wild <aaw@google.com>
4339 * lto.c (lto_read_namespace_DIE): New function.
4340 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4341 NAMESPACE_DECL DIE's.
4342 (lto_resolve_namespacedecl_ref): New function.
4343 * lto.h (lto_resolve_namespacedecl_ref): New function.
4344 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4345 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4346 and num_namespace_decls.
4347 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4348 * lto-lang.c (lto_init_ts): New function.
4349 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4351 2008-04-16 Ollie Wild <aaw@google.com>
4353 * lto-function-in.c (input_type_ref): Updated function description.
4355 2008-04-16 Ollie Wild <aaw@google.com>
4357 * lto-function-in.c (input_type_ref_1): New function.
4358 (input_type_ref): Split into two functions.
4359 (input_function): Add support for type contexts.
4361 2008-04-16 Ollie Wild <aaw@google.com>
4363 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4366 2008-04-16 Ollie Wild <aaw@google.com>
4368 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4369 list of supported languages.
4371 2008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
4373 Merge with mainline @133491.
4375 2008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
4376 Jan Hubicka <jh@suse.cz>
4378 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4379 fd->unmaterialized_fndecls.
4380 (lto_get_file_name, lto_materialize_cgraph): New function.
4381 (lto_materialize_constructors_and_inits,
4382 lto_materialize_function): Read info directly from elf file.
4383 (lto_file_read): Made local and initialize dictionary so that
4384 other lto sections can be read without reprocessing the elf file.
4385 (lto_main): Read all functions after all files have been processed
4386 for their types, globals and cgraph.
4387 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4389 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4390 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4391 (lto_elf_read_symtab): Removed function.
4392 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4393 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4394 (lto_file_read): Made local.
4395 (lto_get_file_name, lto_elf_build_section_table,
4398 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4400 (lto_read_decls): Get the file name.
4401 * lto-cgraph-in.c: New file.
4402 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4403 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4404 (input_labels): Fixed latent sizeof issue.
4405 (input_function): Build stmt array to set call sites into cgraph
4407 (lto_read_body): Reset cfun->curr_properties.
4408 * lto_section_in.h (lto_section_slot): New structure.
4409 (section_hash_table.lto_file_decl_data): New field.
4412 2008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
4414 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4415 reconstruct static initializers.
4416 (lto_get_body, lto_materialize_function): Add lto_section_type as
4418 (lto_materialize_constructors_and_inits,
4419 lto_materialize_file_data): New function.
4420 (lto_materialize_function,
4421 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4422 unmap_section and map_fn_body to map_section.
4423 (lto_set_cu_context): Process functions and static inits
4425 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4426 lto/lto-section-in.o): Update dependencies.
4427 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4428 lto_section_type parameter.
4429 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4430 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4431 renamed the other two so that there is only one map function and
4432 one unmap function and each takes a section type parameter.
4433 (lto_read_function_body): Renamed to lto_input_function_body and
4434 added file_data parameter.
4435 (lto_read_var_init): Removed.
4436 (lto_input_constructors_and_inits): New function.
4437 * lto-section-in.c (lto_read_decls): New function.
4438 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4439 var_decls, type_decls, types to lto_file_decl_data.
4440 (input_type_ref, input_expr_operand, lto_read_body): Get
4441 field_decls, fn_decls, var_decls, type_decls, types from different
4443 (input_globals, input_constructor, lto_read_var_init): Removed.
4444 (input_constructors_or_inits): New function.
4445 (lto_read_function_body, lto_input_constructors_and_inits):
4446 Renamed to lto_input_function_body and takes file_data parameter.
4447 * lto-section-in.h (lto_file_decl_data): New structure.
4449 2008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4451 * lto-function-in.c (input_globals.c): Changed input type to
4452 lto_function_header.
4453 (input_bb): Removed code to deserialize the stmt number.
4454 (input_function): Renumber all stmts after they are input.
4455 (lto_read_body, lto_read_function_body, lto_read_var_init):
4456 Changed to used new header format and enum section_type.
4457 *lto-lang.c (success): Removed.
4459 2008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4461 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4462 (lto_elf_free_sym): Likewise.
4464 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4465 (lto_elf_build_init): Likewise.
4467 2008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
4469 * lto-read.c: Renamed to lto-function-in.c.
4470 (input_1_unsigned): Moved to lto-section-in.c and renamed
4471 lto_input_1_unsigned.
4472 (input_uleb128): Moved to lto-section-in.c and renamed
4474 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4475 lto_input_widest_uint_uleb128.
4476 (input_sleb128): Moved to lto-section-in.c and renamed
4478 (input_integer): Moved to lto-section-in.c and renamed
4480 (debug_in_fun): Moved to lto-section-in.c and renamed
4482 (input_block): Moved to lto-section-in.h and renamed
4484 (input_expr_operand): Fixed to allow lists with more than one
4486 * lto-section-in.h: New file.
4487 * lto-section-in.c: New file with changes from above.
4488 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4489 (lto-section-in.o): New rule.
4491 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4493 * lto-read.c (input_expr_operand): Mark static and external
4494 VAR_DECLs as needed.
4496 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4498 * lto-read.c (input_integer): Use the correct shift amount.
4500 2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4502 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4503 (LANG_HOOKS_NAME): Define.
4505 2007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4507 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4508 original function to...
4509 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4510 don't have a base type.
4511 (lto_read_enumeration_type_DIE): Examine the values of the
4512 enumeration to determine whether we can use an unsigned type for
4513 the base type of the enumeration.
4515 2007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4517 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4518 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4520 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4522 * lto-lang.c (lto_types_compatible_p): New function.
4523 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4525 2007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4526 Kenneth Zadeck <zadeck@naturalbridge.com>
4528 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4529 (input_local_vars): Read in DECL_INITIAL and context for local
4530 statics that need to be put in unexpanded_vars_list.
4532 2007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4534 * lto-read.c (input_real): Use a separate null-terminated buffer
4535 for calling real_from_string.
4536 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4537 tell cgraph that it's needed.
4539 2007-12-19 Doug Kwan <dougkwan@google.com>
4541 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4543 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4545 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4546 (lto_file_read): Reset the members of 'context' every time we read
4547 a toplevel DIE, with special attention to last_param_type.
4549 2007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4551 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4552 'declaration'. Set the assembler name for non-public functions.
4554 2007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
4556 * lto_read.c (data_in.unexpanded_indexes): New array.
4557 (input_local_var): Added code to read in unexpanded_var_list
4558 indexes for variables. Only read in DECL_CHAIN field for
4560 (input_local_vars): Added code to rebuild unexpanded_var_list in
4561 order using unexpanded_indexes.
4562 (input_function): Added code to set DECL_CONTEXT for functions.
4564 2007-12-13 Doug Kwan <dougkwan@google.com>
4566 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4567 in pointer and reference types.
4569 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4571 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4574 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4576 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4577 already read the DIE.
4578 (lto_get_body): New function, split out from...
4579 (lto_materialize_function): ...here. Call it.
4580 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4581 determine DECL_EXTERNAL.
4582 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4583 FUNCTION_DECLs when necessary. Use the type of the actual
4584 function definition if we are unable to easily merge types. Ignore
4585 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4588 2007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4590 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4592 2007-12-12 Bill Maddox <maddox@google.com>
4595 2007-12-07 Bill Maddox <maddox@google.com>
4597 * lto.c (lto_str_fd_init): New function.
4598 (lto_str_fd_close): New function.
4599 (lto_file_init): Call lto_str_fd_init.
4600 (lto_file_close): Call lto_str_fd_close.
4601 (lto_str_read): New function. Read debug string table.
4602 (lto_str_lookup): New function. Get string for debug
4603 string table offset.
4604 (lto_read_form): Recognize DW_FORM_strp.
4605 (lto_file_read): Invoke lto_str_read.
4607 * lto-elf.c (lto_elf_file_open): Read raw section data
4608 for the .debug_str section, if present.
4610 * lto.h (struct lto_str_fd_struct): New struct.
4611 (struct lto_file_struct): Added new field DEBUG_STR
4612 to hold the file descriptor for the debug string table.
4614 2007-12-07 Bill Maddox <maddox@google.com>
4616 * lto.c (lto_str_fd_init): New function.
4617 (lto_str_fd_close): New function.
4618 (lto_file_init): Call lto_str_fd_init.
4619 (lto_file_close): Call lto_str_fd_close.
4620 (lto_str_read): New function. Read debug string table.
4621 (lto_str_lookup): New function. Get string for debug
4622 string table offset.
4623 (lto_read_form): Recognize DW_FORM_strp.
4624 (lto_file_read): Invoke lto_str_read.
4626 * lto-elf.c (lto_elf_file_open): Read raw section data
4627 for the .debug_str section, if present.
4629 * lto.h (struct lto_str_fd_struct): New struct.
4630 (struct lto_file_struct): Added new field DEBUG_STR
4631 to hold the file descriptor for the debug string table.
4633 2007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4635 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4636 Grow the basic_block_info and label_to_block_map vectors if
4637 necessary. Read in the block chain.
4639 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4641 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4643 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4645 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4647 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4649 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4650 (lto_read_body): Don't declare PROP_alias.
4652 2007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4654 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4655 argument type information.
4657 2007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4659 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4660 TREE_THIS_VOLATILE if the associated type is a volatile type.
4661 (lto_materialize_function): Remove call to init_ssa_operands.
4662 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4663 variable when reading an SSA_NAME. Do the same when reading a
4664 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4665 (input_cfg): Call init_ssa_operands.
4666 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4667 Move call to init_tree_ssa...
4668 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4669 add_referenced_var on any variables referenced from the body of the
4670 function. Inform the rest of the compiler we are in SSA form and
4671 inform later passes about the current properties.
4673 2007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4675 * lto.c (lto_materialize_function): Add FIXME.
4677 2007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4679 * lto-lang.c (enum built_in_attribute): New enum.
4680 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4681 built_in_attributes): New variables.
4682 (def_builtin_1): New function.
4683 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4685 2007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4687 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4688 DECL_SOURCE_LOCATION for debugging purposes.
4689 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4690 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4691 laying out the decl until later.
4692 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4693 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4695 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4696 operand of an ADDR_EXPR.
4697 * lto-lang.c (enum lto_builtin_type): New enum.
4698 (builtin_type): New typedef.
4699 (builtin_types, string_type_node, const_string_type_node,
4700 wint_type_node, intmax_type_node, uintmax_type_node,
4701 signed_size_type_node): New variables.
4702 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4703 lto_build_c_type_nodes): New functions.
4704 (lto_init): Initialize builtin types.
4705 (lto_set_decl_assembler_name): Let the target machine mangle the
4706 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4708 2007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4710 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4711 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4712 the type is a constant type. Set the assembler name and inform
4713 the rest of the compiler about the new decl if the decl is not
4715 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4716 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4717 try to read in function bodies for functions that already have bodies.
4718 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4720 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4721 Check for whether we matched a builtin function type before calling
4722 lto_same_type_p on the generated type. Permit cases where the
4723 declaration of an array is unbounded, but the definition is bounded.
4724 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4725 DECL_SIZE_UNIT if necessary.
4727 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4729 * lto-read.c (input_expr_operand): Get types right
4732 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4734 * lto-read.c (make_new_block, input_cfg): Properly set
4737 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4739 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4740 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4742 2007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4744 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4745 construct the integer type for bitfields.
4747 2007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4749 * lto-read.c (data_in.current_node_has_loc): Removed.
4750 (input_line_info): Returns true if node needs line set.
4751 (set_line_info): Always sets line if called.
4752 (clear_line_info): Removed reference to current_node_needs_loc.
4753 (input_expr_operand): Keeps track locally if current node needs a loc.
4754 (input_local_var): Added code to handle DECL_INITIAL for
4755 static local vars. Only set loc if necessary.
4757 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4759 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4762 2007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4764 * lto.c: Include langhooks.h.
4765 (lto_find_integral_type): Rework logic to handle the case where
4766 got_byte_size is true, but the bitsize requested and that of the
4767 base_type doesn't match.
4768 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4769 asm_name if we are creating a VAR_DECL.
4770 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4772 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4773 function reference and use the builtin's decl if so. Set the
4774 DECL_CONTEXT of the RESULT_DECL for the function.
4775 * lto-lang.c (registered_builtin_fndecls): New variable.
4776 (lto_getdecls): Return it.
4777 (lto_builtin_function): Chain the new decl onto
4778 registered_builtin_fndecls.
4780 2007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
4782 * lto-read.c (process_tree_flags, lto_static_init_local):
4783 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4784 (input_line_info, clear_line_info): Fixed new line number code.
4785 (input_expr_operand): Added type to SWITCH_EXPR.
4786 (lto_read_body): Properly initialized data_in.
4787 Clear line info when leaving.
4789 2007-11-13 Diego Novillo <dnovillo@google.com>
4791 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4792 Initialize ARTIFICIAL.
4793 (lto_read_subroutine_type_subprogram_DIE): Initialize
4795 * lto-read.c (set_line_info): Remove ; from calls to
4796 LINEMAP_POSITION_FOR_COLUMN.
4798 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4800 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4801 (input_expr_operand, input_local_var): Renamed get_type_ref to
4803 (input_expr_operand): Get the types correct for
4804 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4806 2007-11-13 Doug Kwan <dougkwan@google.com>
4808 * lto-read.c (input_widest_uint_uleb128): New function.
4809 (input_tree_flags, process_tree_flags, input_line_info,
4810 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4811 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4812 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4813 (lto_static_init_local): Add code to assert that lto_flags_type is
4816 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4818 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4819 (lto_read_subroutine_type_subprogram_DIE): Handle
4820 DW_AT_static_link and DW_AT_specification. Return the
4821 specification if present.
4822 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4824 2007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4826 * lto-lang.c: Include target.h.
4827 (registered_builtin_types): New variable.
4828 (lto_type_for_mode): Increase number of modes handled.
4829 (lto_builtin_function): Fix argument list and return the decl.
4830 (lto_register_builtin_type): New function.
4831 (lto_init): Initialize target builtins and language-independent
4833 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4835 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4837 * lto-read.c (input_expr_operand): Added code to properly handle
4838 index filed. Added new RANGE_EXPR case.
4840 2007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4842 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4843 (data_in): Added current_node_has_loc field.
4844 (input_line_info, set_line_info, clear_line_info): Added a support
4845 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4846 did not have on on the source side.
4847 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4850 2007-11-09 Doug Kwan <dougkwan@google.com>
4852 * lto-read.c (input_expr_operand): Change type of operand 2 of
4853 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4855 2007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4857 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4858 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4859 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4860 the new decl we are creating. Move informing the middle end about
4862 (lto_main): ...here. Inform the middle end about global variables
4863 after we have read in all the input files.
4864 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4865 variables with internal linkage, so delete the check for internal
4866 linkage. Combine TREE_PUBLIC flags.
4868 2007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4870 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4872 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4873 builtin specially. Move check for attribute compatibility
4876 2007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4878 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4879 * config-lang.in (gtfiles): Add lto.h and lto.c.
4880 * lto-elf.c: Include ggc.h.
4881 (lto_elf_file_open): Allocate elf_file from GC memory.
4882 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4883 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4885 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4886 (lto_file_close): Free file from GC memory.
4887 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4888 (lto_read_member_DIE): Fix declaration.
4889 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4891 (current_lto_file): New variable.
4893 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4894 lto_die_cache_entry): Move to...
4895 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4896 declarations accordingly.
4897 (struct lto_file_struct): Declare.
4898 (lto_file_vtable): Use it instead of lto_file.
4900 2007-11-06 Alon Dayan <alond@il.ibm.com>
4901 Kenneth Zadeck <zadeck@naturalbridge.com>
4903 * lto-read.c (process_flags, lto_static_init_local):
4904 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4905 change global array num_flags_for_code to flags_length_for_code.
4906 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4908 2007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4910 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4911 layout functions to compute information about the newly constructed
4914 2007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4916 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4917 case to use DECL_RESULT if necessary.
4919 2007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4921 * lto-read.c (input_tree_list): Removed.
4922 (input_tree_flags): Added parameter to force flags no matter what
4924 (input_expr_operand): Added parameter to input_tree_flags.
4925 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4926 input_expr_operand rather than input_tree_lists.
4927 (input_local_var): Use input_expr_operand to read attributes
4928 rather then input_tree_list.
4929 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4931 2007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4933 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4934 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4936 * lto-read.c (lto_read_body): Use correct sizes for calculating
4937 type_decls_offset and types_offset.
4939 2007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4941 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4943 * config-lang.in (gtfiles): Add lto-lang.c.
4944 * lto-lang.c: Include gt-lto-lto-lang.h.
4945 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4946 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4947 (lto/lto-read.o): Likewise.
4949 2007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4951 * lto-read.c (data_in): Added type_decls and current_col fields.
4952 (string_slot): New type to hold canonized file name.
4953 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4954 input_line_info, set_line_info, clear_line_info): New functions.
4955 (file_name_hash_table): New hash table.
4956 (input_local_var, input_labels, input_local_vars_index,
4957 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4958 (input_uleb128): Changed type of byte var.
4959 (input_expr_operand): Large number of changes to get line numbers
4960 correct. Added TYPE_DECL case.
4961 (input_globals): Added code to get TYPE_DECLs processed.
4962 (input_local_var): Added code to process line numbers and
4963 TREE_CHAIN and DECL_CONTEXT.
4964 (input_function, input_constructor): Added call to
4966 (lto_static_init_local): Added code to get line numbers correct.
4967 (lto_read_body): Added code to get TYPE_DECLS read and to change
4968 parameters to the calls above that had their parms reorganized.
4971 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4973 * lto.h (lto_resolve_typedecl_ref): Declare.
4974 * lto.c (lto_resolve_typedecl_ref): New function.
4976 2007-10-29 Mark Mitchell <mark@codesourcery.com>
4977 Nathan Froyd <froydnj@codesourcery.com>
4979 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4980 DIEs even if we find an abstract origin for this DIE.
4982 2007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4984 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4985 RESULT_DECL slightly earlier. Only remember the decl for later
4986 if we successfully merge declarations.
4988 2007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4990 * lto-read.c (input_expr_operand): Give label_values the proper
4991 context and provide switch statements with a default type.
4993 2007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4995 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4996 * lto.c (lto_materialize_function): ...to here.
4998 2007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5000 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5001 * lto.c (lto_info_fd_init): Initialize it.
5002 (lto_info_fd_close): Free it.
5003 (lto_materialize_function): New function.
5004 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5005 unmaterialized_fndecls.
5006 (lto_file_read): Read in all the function bodies after we have read
5007 all of the DWARF info.
5008 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5009 reading a function body.
5011 2007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5013 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5014 semetric with output_tree_flags. Added call to log flags.
5015 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5016 type issues to make everything consistent with flags being
5017 unsigned HOST_WIDE_INTS.
5018 (input_expr_operand): Added call to
5019 recompute_tree_invariant_for_addr_expr.
5020 (input_local_var): Added debugging for tree_chains. Now calls
5022 (input_phi): Made flags unsigned HOST_WIDE_INT.
5023 (input_ssa_names): Now calls input_tree_flags.
5024 (lto_read_body): Now sets cfun.
5025 (lto_read_function_body): Now sets current_function_pointer.
5027 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5029 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5030 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5031 inspecting fields within.
5032 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5033 handle this appropriately.
5035 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5037 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5038 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5039 both DW_AT_abstract_origin and DW_AT_specification.
5040 (lto_read_subroutine_type_subprogram_DIE): Handle
5041 DW_AT_abstract_origin.
5042 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5043 (lto_read_DIE_at_ptr): Define as static to match declaration.
5044 Lookup the PTR in the cache before reading it from the file.
5045 (lto_resolve_var_ref): Adjust accordingly.
5046 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5047 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5049 2007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5051 * lto.c (lto_read_DIE_at_ptr): New function.
5052 (lto_resolve_var_ref): Use it.
5053 (lto_resolve_fn_ref): Use it.
5054 (lto_resolve_field_ref): Use it.
5055 (lto_read_variable_formal_parameter_constant_DIE): Follow
5056 DW_AT_specification and return the associated decl when appropriate.
5058 2007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5060 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5061 Implement for scalar integer modes.
5062 (lto_init): Initialize size_type_node.
5064 2007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
5066 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5067 (input_local_var): Add chaining for params.
5068 (input_ssa_names): Add cfun parameter.
5069 (input_function): Remove unnecessary else.
5071 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5073 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5074 (lto_resolve_var_ref): Use proper types.
5075 (lto_resolve_fn_ref): Likewise.
5076 (lto_resolve_field_ref): Likewise.
5078 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5080 * lto-read.c (input_expr_operand): Remove case.
5082 2007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5084 * lto.c (lto_read_only_for_child_DIEs): New function.
5085 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5086 * lto-elf.c (lto_elf_map_lto_section): Remove.
5087 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5088 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5089 SSA_NAME. Add missing case for mechanical codes.
5090 (input_cfg): Use basic_block_info_for_function instead of
5093 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5095 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5096 (input_list): Renamed input_tree_list and modified to follow same
5097 protocol as lto-function-out.c:output_tree_list.
5098 (input_expr_operand): Make asm operands use input_tree_list.
5099 (input_local_var): Now uses input_tree_list.
5100 (lto_read_body): Change placement for setting context of debug_labels.
5103 2007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
5105 * lto-read.c (input_real): Output debugging in proper order.
5106 (input_integer): Compute bit lengths properly.
5107 (input_list): Clean up declaration.
5108 (input_expr_operand): Change calls to input_real to match fix.
5109 Make reading of LTO_bit_field_ref1 match output.
5110 (input_local_var): Make reading of attributes match what is being
5112 (dump_debug_stream): Also print char in hex.
5113 (debug_out_fun): Fix signed unsigned mismatch.
5115 2007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5117 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5118 DW_AT_GNU_vector specially, as they are not contiguous with the
5119 specified set of attribute names. Use class_mask to check for
5120 errors at the end of the function
5121 (lto_resolve_var_ref): Read the DIE if it is not cached.
5122 (lto_resolve_fn_ref): Likewise.
5123 (lto_resolve_field_ref): Likewise.
5125 2007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5127 * lto.c: Include dwarf2out.h.
5128 (lto_cache_store_DIE): Assert that we never change the value.
5129 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5130 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5131 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5132 sensible type instead.
5133 (lto_read_structure_union_class_type_DIE): Store the newly
5134 created type prior to reading the members of the structure to
5135 avoid infinite recursion. Avoid computing types and alignments
5136 for structures whose sizes are unknown.
5137 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5138 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5139 DW_AT_const_value, and DW_AT_specification.
5140 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5141 Return early if we have already constructed the function type.
5142 (lto_read_typedef_DIE): Check to see if the type has been cached
5143 already. Cache the type before reading any children.
5144 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5145 (lto_read_DIE): Unset context->skip_non_parameters around reading
5147 (lto_resolve_fn_ref): Delete trailing whitespace.
5149 2007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
5151 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5153 2007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5155 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5157 2007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5159 * lto-lang.c (signed_and_unsigned_types): New variable.
5160 (lto_type_for_size): Consult signed_and_unsigned_types to find
5161 an approprite type, creating it if necessary.
5162 (lto_set_decl_assembler_name): Add actual method body.
5164 2007-09-06 Jim Blandy <jimb@codesourcery.com>
5166 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5167 can't find a var init for this variable, leave its DECL_INITIAL.
5168 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5169 lto_elf_map_fn_body.
5170 (lto_map_lto_section): New function.
5171 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5172 bodies, and lto_elf_map_optional_lto_section for variable
5174 (lto_elf_find_section_data): Quietly return NULL if the section is
5176 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5178 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5180 * lto-read.c (lto_read_body): Doc fix.
5182 2007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
5184 * lto-read.c (fun_in): Renamed to data_in.
5185 (input_expr_operand, input_local_var, input_string_internal,
5186 input_string, input_real, input_list, get_label_decl,
5187 get_type_ref, input_expr_operand, input_globals, input_labels,
5188 input_local_vars_index, input_local_var, input_local_vars,
5189 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5190 (input_constructor): New function.
5191 (lto_read_function_body): Renamed to lto_read_body and generalized
5192 to handle both functions and constructors.
5193 (lto_read_function_body, lto_read_var_init): New function.
5196 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5198 * lto-read.c (input_expr_operand): Assert that there really is a
5200 (input_globals): Removed checks on 0 section.
5202 2007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5204 * lto-read.c (fun_in): Added local_decls_index and
5205 local_decls_index_d.
5206 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5207 (input_globals): Enabled code to handle FIELD_DECLs.
5208 (input_local_vars_index, input_local_vars): New function.
5209 (input_local_var): Changed to allow locals to be input randomly.
5210 (lto_read_function_body): Added code to input the
5211 local_decls_index and to free various structures.
5213 2007-08-17 Jim Blandy <jimb@codesourcery.com>
5215 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5216 ATTRIBUTE_UNUSED from 'die' formal.
5218 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5219 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5220 (input_list): Fix type of 'tag'.
5221 (input_expr_operand): Fix type of 'tag' argument. Update
5222 declaration. Fix type of 'ctag'. Add default case to switch,
5223 since the type of the switched value is now an enum.
5224 (input_local_vars): Fix type of 'tag'.
5225 (input_bb): Fix type of 'tag' argument.
5226 (input_function): Fix type of 'tag' argument.
5228 2007-08-16 Jim Blandy <jimb@codesourcery.com>
5230 * lto.c (lto_read_member_DIE): Record the tree we create in
5231 fd->die_cache. (Our 'die' argument is no longer unused.)
5232 (lto_resolve_field_ref): New function.
5233 * lto.h (lto_resolve_field_ref): New declaration.
5235 2007-08-15 Jim Blandy <jimb@codesourcery.com>
5237 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5239 2007-08-07 Jim Blandy <jimb@codesourcery.com>
5241 * lto.c (lto_read_form): Complete attr_classes table.
5242 (DWARF2_form_data): Doc fix.
5244 2007-08-05 Mark Mitchell <mark@codesourcery.com>
5246 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5248 (lto_read_var_init): Declare.
5249 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5250 interface for reading variable initializers.
5251 * lto-elf.c (lto_elf_read_var_init): Remove.
5252 (lto_elf_file_vtable): Update initializer.
5253 (lto_elf_read_var_init): Add comment about unused-ness.
5254 * lto-read.c (lto_read_var_init): New.
5256 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5258 2007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
5260 * lto-read.c (lto_read_function_body): Moved declaration of fn
5263 2007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
5265 * lto-read.c (input_uleb128, input_string_internal, input_real,
5266 input_integer, input_record_start, input_list, get_type_ref,
5267 input_flags, input_expr_operand, input_expr_operand,
5268 input_expr_operand, input_local_vars, input_cfg, input_phi,
5269 input_ssa_names, input_bb, input_function): Added semicolons.
5272 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5274 * lto-read.c (input_globals): Remove debugging.
5275 (input_function): Set DECL_ARGUMENTS.
5277 2007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5279 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5280 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5281 (input_phi): Made work with operands other than SSA_NAMES and
5282 fixed processing of flags.
5283 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5284 (input_flags): New function.
5285 * lto-lang.c (lto_init): Changed state of in_lto_p.
5288 2007-07-24 Mark Mitchell <mark@codesourcery.com>
5290 * lto-tree.h (lto_varargs_cookie): Remove.
5291 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5292 skip_non_parameters, skip_parameters.
5293 (lto_varargs_cookie): Remove.
5294 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5296 (lto_read_abbrev): New function.
5297 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5299 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5300 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5301 (lto_file_read): Initialize new context fields.
5302 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5303 (lto_unsigned_type): Remove.
5304 (lto_signed_type): Likewise.
5305 (lto_signed_or_unsigned_type): Likewise.
5306 (lto_init): Do not create lto_varargs_cookie.
5307 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5308 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5309 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5311 2007-07-19 Jan Hubicka <jh@suse.cz>
5313 * lto-read.c (lto_read_function_body): Produce empty scope block
5316 2007-07-18 Mark Mitchell <mark@codesourcery.com>
5318 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5319 process local variables.
5320 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5322 2007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5324 * lto-read.c (input_list, input_expr_operand): Added struct
5326 (init_cfg, finalize_cfg): Removed function.
5327 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5328 (input_labels, input_local_vars): Now takes input_block parameter rather than
5330 (input_cfg, input_phi, input_ssa_names): New functions.
5331 (input_bb): Now passes in input_blocks. Does not construct cfg
5332 and processes the list of phi functions.
5333 (input_function): Now builds both the cfg and ssa_names table.
5334 (lto_read_function_body): Processes new header fields to construct
5335 streams for the ssa_names and cfg and their debugging.
5336 * lto/lto-lang.c (lto_init): Set in_lto_p.
5339 2007-06-28 Mark Mitchell <mark@codesourcery.com>
5341 * lto.h (lto_file_vtable): Add read_var_init.
5342 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5344 (lto_main): Remove bogus asserts.
5345 * lto-elf.c (tm.h): Include it.
5346 (libiberty.y): Likewise.
5347 (lto_elf_file): Add strtab and symtab. Rename
5348 string_table_section_index to sec_strtab.
5349 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5350 (lto_elf_get_shdr): New function.
5351 (lto_elf_free_shdr): Likewise.
5352 (lto_elf_find_section_data): Use them.
5353 (lto_elf_read_symtab): New function.
5354 (lto_elf_lookup_sym): Likewise.
5355 (lto_elf_free_sym): Likewise.
5356 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5357 (lto_elf_built_init): New function.
5358 (lto_elf_read_var_init): Likewise.
5359 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5361 2007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
5363 * lto-read (make_new_block): Initialize the stmt_list.
5364 (lto_static_init_local): Add debugging for missing codes.
5366 2007-06-26 Mark Mitchell <mark@codesourcery.com>
5368 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5369 unprototyped functions.
5371 2007-06-23 Mark Mitchell <mark@codesourcery.com>
5373 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5374 Handle DW_AT_MIPS_linkage_name.
5375 (lto_read_subroutine_type_subprogram): Likewise. Correct
5377 (lto_main): Remove incorrect assertions.
5378 * lto-symbtab.c: Build function types out of TREE_LISTs.
5380 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5382 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5384 2007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
5386 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5387 dummy since ggc does not like empty structs.
5388 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5389 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5390 expr->common to expr->base.
5391 (make_new_block): Moved stmt_list to proper place.
5394 2007-03-14 Robert Kennedy <jimbob@google.com>
5396 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5397 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5398 assembler name from DWARF.
5399 * lto-lang.c (lto_set_decl_assembler_name) New function.
5401 2006-09-10 Mark Mitchell <mark@codesourcery.com>
5403 * lto.h (lto_file_vtable): New structure.
5404 (lto_file): Add vtable pointer.
5405 (lto_file_init): Add vtable paramter.
5406 (lto_read_function_body): New function.
5407 (lto_symtab_merge_fn): New function.
5408 * lto.c (lto_file_init): Add vtable parameter.
5409 (lto_read_form): Fill in entries for DW_AT_prototyped,
5411 (lto_read_subroutine_type_subprogram_DIE): New function.
5412 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5414 * lto-elf.c (lto_elf_vile_vtable): New variable.
5415 (lto_elf_file_open): Pass it to lto_file_init.
5416 (lto_elf_map_fn_body): New function.
5417 (lto_elf_unmap_fn_body): Likewise.
5418 * lto-read.c: New file.
5419 * lto-symtab.c (lto_symtab_merge_fn): New function.
5420 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5421 tree_rest_of_compilation.
5422 * Make-lang.in (LTO_OBJS): Add lto-read.o
5423 (lto-read.o): New target.
5425 2006-09-03 Mark Mitchell <mark@codesourcery.com>
5427 * lto.c (<inttypes.h>): Don't include it.
5428 (lto_context): Don't typedef it.
5429 (lto_resolve_reference): New function.
5430 (lto_read_form): Use it.
5431 (lto_resolve_type_ref): New function.
5432 (lto_resolve_var_ref): Likewise.
5433 (lto_resolve_fn_ref): Likewise.
5434 * lto.h (<inttypes.h>): Include it.
5435 (lto_context): New type.
5436 (lto_ref): New structure.
5437 (lto_resolve_type_ref): Declare.
5438 (lto_resolve_var_ref): Likewise.
5439 (lto_resolve_fn_ref): Likewise.
5441 2006-08-18 Mark Mitchell <mark@codesourcery.com>
5443 * lang-specs.h: New file.
5445 2006-08-14 Mark Mitchell <mark@codesourcery.com>
5447 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5448 (lto_info_fd_close): Deallocate it.
5449 (lto_die_cache_entry): New structure.
5450 (lto_cache_hash): New function.
5451 (lto_cache_eq): Likewise.
5452 (lto_cache_store_DIE): Likewise.
5453 (lto_cache_lookup_DIE): Likewise.
5454 (lto_read_referenced_type_DIE): Use the cache.
5455 (lto_read_pointer_type_DIE): Robustify.
5456 (lto_read_DIE): Use the cache.
5457 * lto.h (hashtab.h): Include.
5458 (lto_info_fd): Add DIE cache.
5459 * Make-lang.in (LTO_H): New variable.
5460 (lto/lto-lang.o): Use LTO_H.
5461 (lto/lto-elf.o): Likewise.
5462 (lto/lto-symtab.o): Likewise.
5464 2006-07-09 Mark Mitchell <mark@codesourcery.com>
5466 * lto.c (lto_abi_mismatch_error): New function.
5467 (lto_abbrev_read): Initialize num_abbrevs.
5468 (lto_read_form): Specify allowed form classes for
5469 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5470 (lto_read_variable_formal_parameter_constant_DIE): Handle
5471 DW_AT_declaration. Call lto_symtab_merge_var.
5472 (lto_read_pointer_type_DIE): New function.
5473 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5474 not creat TYPE_DECLs for types that already have them.
5475 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5476 (lto_set_cu_context): Make cu_start point to the header, not the
5478 (lto_file_read): Adjust for change to lto_set_cu_context.
5479 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5480 (lto/lto-symtab.o): New rule.
5481 * lto-tree.h (lang_identifier): Add decl field.
5482 (LANG_IDENTIFIER_CAST): New macro.
5483 (LTO_IDENTIFIER_DECL): Likewise.
5484 (lto_symtab_merge_var): Declare.
5485 * lto-symtab.c: New file.
5487 2006-07-02 Daniel Berlin <dberlin@dberlin.org>
5489 * lto.c (lto_context): Add current_cu and info_fd members.
5490 (DWARF2_CompUnit): New structure.
5491 (lto_read_DIE): Take lto_info_fd *.
5492 (lto_read_child_DIEs): Ditto.
5493 (lto_file_corrupt_error): Constify argument.
5494 (lto_set_cu_context): New function
5495 (lto_info_fd_init): Ditto.
5496 (lto_info_fd_close): Ditto.
5497 (lto_file_init): Use lto_info_fd_init.
5498 (lto_file_close): Use lto_info_fd_close.
5499 (lto_read_initial_length): Pass in pointer to header size.
5500 (lto_read_comp_unit_header): Correct cu_length to
5501 real length from beginning of header. Take lto_info_fd * as
5503 (find_cu_for_offset): New function.
5504 (lto_read_form): Change first argument to lto_info_fd *.
5505 Add FORM_CONTEXT argument.
5506 Handle DW_FORM_ref_addr.
5507 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5508 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5509 Swap contexts if necessary for form.
5510 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5511 lto_file_corrupt_error.
5512 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5513 (lto_read_referenced_type_DIE): Change first argument to
5514 lto_info_fd *. Access lto_fd fields through base pointer.
5515 (lto_read_compile_unit_DIE): Change first argument to an
5517 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5518 (lto_read_base_type_DIE): Ditto.
5519 (lto_read_child_DIEs): Ditto.
5520 (lto_read_DIE): Ditto. Change type of function pointer.
5521 (lto_info_read): New function.
5522 (lto_set_cu_context): Ditto.
5523 (lto_file_read): Use lto_info_read, walk resulting CU's
5524 (lto_main): Update for lto_info_fd change.
5525 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5527 * lto.h (DWARF2_CompUnit): New structure.
5528 (lto_info_fd): Ditto.
5529 (lto_file): Change debug_info to be an lto_info_fd.
5531 2006-06-25 Mark Mitchell <mark@codesourcery.com>
5533 * lto.c (toplev.h): Include it.
5534 (dwarf2.h): Likewise.
5537 (cgraph.h): Likewise.
5539 (inttypes.h): Likewise.
5540 (DWARF2_attr): New type.
5541 (DWARF2_abbrev): Likewise.
5542 (DWARF2_class): Likewise.
5543 (DWARF2_form_data): Likewise.
5544 (lto_context): Likewise.
5545 (lto_fd_init): New function.
5546 (lto_abbrev_fd_init): Likewise.
5547 (lto_abbrev_fd_close): Likewise.
5548 (lto_file_init): Use them.
5549 (lto_file_close): New function.
5550 (lto_file_corrupt_error): Likewise.
5551 (LTO_CHECK_INT_VAL): New macro.
5552 (lto_check_size_t_val): New function.
5553 (lto_check_int_val): Likewise.
5554 (LTO_READ_TYPE): New macro.
5555 (lto_read_ubyte): New function.
5556 (lto_read_uhalf): Likewise.
5557 (lto_read_uword): Likewise.
5558 (lto_read_uleb128): Likewise.
5559 (lto_read_initial_length): Likewise.
5560 (lto_abbrev_read_attrs): Likewise.
5561 (lto_abbrev_read): Likewise.
5562 (lto_abbrev_lookup): Likewise.
5563 (lto_read_section_offset): Likewise.
5564 (lto_read_comp_unit_header): Likewise.
5565 (lto_read_form): Likewise.
5566 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5567 (LTO_BEGIN_READ_ATTRS): Likewise.
5568 (LTO_END_READ_ATTRS): Likewise.
5569 (lto_unsupported_attr_error): New function.
5570 (lto_get_identifier): Likewise.
5571 (lto_read_referenced_type_DIE): Likewise.
5572 (lto_read_compile_unit_DIE): Likewise.
5573 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5574 (lto_read_base_type_DIE): Likewise.
5575 (lto_read_DIE): Likewise.
5576 (lto_read_child_DIEs): Likewise.
5577 (lto_file_read): Read DIEs.
5578 (lto_main): Ask middle end to emit entities.
5579 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5580 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5581 (lto_elf_file_close): Likewise.
5582 * lto.h (lto_file): Declare.
5583 (DWARF2_abbrev): Likewise.
5585 (lto_abbrev_fd): Likewise.
5586 (lto_file): Use new types.
5587 (lto_file_close): Declare.
5588 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5590 2006-06-18 Mark Mitchell <mark@codesourcery.com>
5594 * lto-elf.c: New file.
5595 * lto-lang.c (flags.h): Include it.
5597 (lto_init): New function.
5598 (lto_write_globals): Remove.
5599 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5600 (LANG_HOOKS_INIT): Define.
5601 (LANG_HOOKS_PARSE_FILE): Likewise.
5602 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5603 (LTO_EXE): Link with libelf.
5604 (lto/lto-lang.o): Update dependencies.
5605 (lto/lto.o): New target.
5606 (lto/lto-elf.o): Likewise.
5608 2006-06-12 Mark Mitchell <mark@codesourcery.com>
5610 * config-lang.in: New file.
5611 * Make-lang.in: Likewise.
5612 * lto-tree.h: Likewise.
5613 * lto-lang.c: Likewise.
5615 Copyright (C) 2006-2017 Free Software Foundation, Inc.
5617 Copying and distribution of this file, with or without modification,
5618 are permitted in any medium without royalty provided the copyright
5619 notice and this notice are preserved.