]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Update copyright years.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
f1717362 12016-01-04 Jakub Jelinek <jakub@redhat.com>
2
3 Update copyright years.
4
c4b4be7f 52015-12-10 Jan Hubicka <hubicka@ucw.cz>
6
7 PR lto/68878
8 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
9 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
10 (lto_symtab_prevailing_decl): Use it.
11
c0998828 122015-12-15 Ilya Verbin <ilya.verbin@intel.com>
13
14 * lto.c: Include stringpool.h and fold-const.h.
15 (offload_handle_link_vars): New static function.
16 (lto_main): Call offload_handle_link_vars.
17
6cbd82a6 182015-12-10 Jan Hubicka <hubicka@ucw.cz>
19
20 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
21
f94693ef 222015-12-11 Jan Hubicka <hubicka@ucw.cz>
23
24 PR ipa/61886
25 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
26 values of error and warning attributes.
27
7e28e646 282015-12-08 Jan Hubicka <hubicka@ucw.cz>
29
30 PR lto/68811
31 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
32 DECL.
33 (LTO_NO_PREVAIL): Use gcc_checking_assert.
34
24199c3f 352015-12-08 Jan Hubicka <hubicka@ucw.cz>
36
37 PR lto/68811
38 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
39 by itself.
40
4e42d239 412015-12-08 Jan Hubicka <hubicka@ucw.cz>
42
43 PR ipa/61886
44 * lto-symtab.c: Include lto-symtab.h.
45 (lto_cgraph_replace_node): Do not merge profiles here.
46 (lto_symtab_merge_p): New function.
47 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
48 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
49 aliases.
50 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
51 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
52 * lto.c: Include lto-symtab.h
53 * lto-symtab.h: New.
54
ee03cd5e 552015-12-08 Jan Hubicka <hubicka@ucw.cz>
56
57 PR ipa/61886
58 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
59 are not part of the definition.
60 (contained_in_symbol): Likewise.
61 (promote_symbol): When promoting a symbol also promote all transparent
62 aliases.
63 (rename_statics): Weakref needs unique name, too.
64
e0dec29d 652015-12-07 Jan Hubicka <hubicka@ucw.cz>
66
67 PR ipa/61886
68 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
69 rename_statics, rename_statics): Handle transparent aliases.
70
7d38b7bc 712015-12-04 Jan Hubicka <hubicka@ucw.cz>
72
73 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
74 merged_comdat.
75
27e9c5ae 762015-12-01 Jan Hubicka <hubicka@ucw.cz>
77
78 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
79
4c4a180d 802015-11-25 Jan Hubicka <jh@suse.cz>
81
82 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
83 * lang.opt (lto_linker_output): New enum.
84 (flinker_output): New flag.
85
3f8f2e54 862015-11-24 Jan Hubicka <hubicka@ucw.cz>
87
88 * lto-symtab.c: Include alias.h
89 (warn_type_compatibility_p): Replace types_compatible_p checks by
90 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
91 (lto_symtab_merge): Compare DECL sizes.
92 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
93
b89bfdca 942015-11-24 Jan Hubicka <hubicka@ucw.cz>
95
96 * lto.c (iterative_hash_canonical_type): Recruse for all types
97 which pass !canonical_type_used_p.
98 (gimple_register_canonical_type_1): Sanity check we do not compute
99 canonical type of anything with !canonical_type_used_p.
100 (gimple_register_canonical_type): Skip all types that are
101 !canonical_type_used_p
102
6e06854b 1032015-11-24 Jan Hubicka <hubicka@ucw.cz>
104
105 * lto.c (unify_scc): Use free_node.
106
fc7464ae 1072015-11-21 Jan Hubicka <hubicka@ucw.cz>
108
109 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
110 (gimple_register_canonical_type_1): Check that pointers do not get
111 canonical types.
112 (gimple_register_canonical_type): Do not register pointers.
113
1142015-11-21 Jan Hubicka <hubicka@ucw.cz>
e469587a 115
116 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
117 flag for types that are not ODR; fix loop walking parameters.
118
6e803544 1192015-11-11 Andrew MacLeod <amacleod@redhat.com>
120
121 * lto-lang.c: Remove unused header files.
122 * lto-object.c: Likewise.
123 * lto-partition.c: Likewise.
124 * lto-symtab.c: Likewise.
125 * lto.c: Likewise.
126
292237f3 1272015-11-08 Eric Botcazou <ebotcazou@adacore.com>
128
129 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
130
ac677063 1312015-11-07 Richard Sandiford <richard.sandiford@arm.com>
132
133 * lto-lang.c: Don't undef DEF_BUILTIN.
134
4cba6f60 1352015-10-29 Andrew MacLeod <amacleod@redhat.com>
136
137 * lto-lang.c: Reorder #include's and remove duplicates.
138 * lto-object.c: Likewise.
139 * lto-partition.c: Likewise.
140 * lto-symtab.c: Likewise.
141 * lto.c: Likewise.
142
382ecba7 1432015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
144
145 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
146 conditionals.
147 (lto_fixup_state): Likewise.
148 (do_whole_program_analysis): Use
149 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
150 conditionals.
151
43895be5 1522015-10-13 Jakub Jelinek <jakub@redhat.com>
153
154 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
155 DEF_FUNCTION_TYPE_11): Define.
156
37f21d1f 1572015-10-10 Jan Hubicka <hubicka@ucw.cz>
158
159 * lto.c (hash_canonical_type): Honor
160 type_with_interoperable_signedness.
161
e561d5e1 1622015-09-28 Nathan Sidwell <nathan@codesourcery.com>
163
164 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
165 (DEF_FUNCTION_TYPE_VAR_11): Delete.
166
5a7d537d 1672015-08-31 Richard Biener <rguenther@suse.de>
168
169 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
170 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
171 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
172 participate in merging with something else.
173
a4e1a24d 1742015-08-31 Richard Biener <rguenther@suse.de>
175
176 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
177 test, do not replace a non-builtin with a builtin.
178 * lto.c (compare_tree_sccs_1): Do not merge things we stream
179 as builtins vs. non-builtins.
180
6dc50383 1812015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
182
183 * lto.h: Remove useless typedefs.
184
af015d19 1852015-07-15 Andrew MacLeod <amacleod@redhat.com>
186
187 * lto.c: Remove redundant includes.
188
47ae02b7 1892015-07-12 Aldy Hernandez <aldyh@redhat.com>
190
191 * lto-lang.c: Fix double word typos.
192
d040a5b0 1932015-07-10 Andrew MacLeod <amacleod@redhat.com>
194
195 * lto.c: Include cfghooks.h rather than predict.h.
196
f61de240 1972015-07-09 Andrew MacLeod <amacleod@redhat.com>
198
199 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
200 lto-streamer.h.
201 * lto-object.c: Likewise.
202 * lto-partition.c: Likewise.
203 * lto-symtab.c: Likewise.
204
1eacc14a 2052015-07-09 Andrew MacLeod <amacleod@redhat.com>
206
207 * lto-lang.c: Adjust includes for flags.h changes.
208
9ef16211 2092015-07-07 Andrew MacLeod <amacleod@redhat.com>
210
211 * lto-lang.c: Adjust includes.
212 * lto-object.c: Likewise.
213 * lto-partition.c: Likewise.
214 * lto-symtab.c: Likewise.
215 * lto.c: Likewise.
216
ec2e0095 2172015-06-25 Andrew MacLeod <amacleod@redhat.com>
218
219 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
220 * lto-object.c: Likewise.
221 * lto-partition.c: Likewise.
222 * lto-symtab.c: Likewise.
223 * lto-tree.h: Likewise.
224 * lto.c: Likewise.
225
770ff93b 2262015-06-25 Richard Sandiford <richard.sandiford@arm.com>
227
228 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
229 than typed_noop_remove. Remove redudant typedefs.
230
f2ab3bac 2312015-06-17 Andrew MacLeod <amacleod@redhat.com>
232
233 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
234 * lto-object.c: Likewise.
235 * lto-partition.c: Likewise.
236 * lto-symtab.c: Likewise.
237 * lto.c: Likewise.
238
cb274227 2392015-06-14 Jan Hubicka <hubicka@ucw.cz>
240
241 PR ipa/66181
242 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
243
8f88884c 2442015-06-12 DJ Delorie <dj@redhat.com>
245
246 * lto-lang.c (lto_type_for_size): Include intN types.
247 (lto_type_for_mode): Likewise.
248
1ed0cc85 2492015-06-08 Jan Hubicka <hubicka@ucw.cz>
250
251 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
252
64486212 2532015-06-08 Andrew MacLeod <amacleod@redhat.com>
254
255 * lto-lang.c : Adjust include files.
256 * lto-object.c : Likewise.
257 * lto-partition.c : Likewise.
258 * lto-partition.h : Likewise.
259 * lto-symtab.c : Likewise.
260 * lto.c : Likewise.
261 * lto.h : Likewise.
262
9a8ba0f7 2632015-06-06 Jan Hubicka <hubicka@ucw.cz>
264
379ca7f8 265 PR lto/65378
266 * lto-symtab.c (warn_type_compatibility_p): Fix call of
267 odr_or_derived_type_p.
268 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
269
2702015-06-08 Jan Hubicka <hubicka@ucw.cz>
271
272
9a8ba0f7 273 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
274 pointers.
275
3a1c9df2 2762015-06-05 Aldy Hernandez <aldyh@redhat.com>
277
278 * lto-lang.c (lto_write_globals): Remove.
279 (LANG_HOOKS_WRITE_GLOBALS): Same.
280
f77c0292 2812015-06-04 Andrew MacLeod <amacleod@redhat.com>
282
283 * lto-lang.c: Adjust includes for restructured coretypes.h.
284 * lto-object.c: Likewise.
285 * lto-partition.c: Likewise.
286 * lto-symtab.c: Likewise.
287 * lto.c: Likewise.
288
499e2be8 2892015-06-04 Jan Hubicka <hubicka@ucw.cz>
290
291 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
292
9c0b7e86 2932015-06-03 Jan Hubicka <hubicka@ucw.cz>
294
295 * lto.c (iterative_hash_canonical_type,
296 gimple_register_canonical_type): only hash main variants of types
297
e5b238bf 2982015-05-27 Martin Liska <mliska@suse.cz>
299
300 * lto-partition.c (new_partition): Reset number of symbols.
301 (add_symbol_to_partition_1): Increment number of symbols.
302 (undo_partition): Decrement number of symbols.
303 (lto_balanced_map): Dump number of symbols and insns that
304 belong to a partition.
305 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
306
24a769d9 3072015-05-22 Jan Hubicka <hubicka@ucw.cz>
308
309 * lto.c (hash_canonical_type): Be sure we hash only types that
310 need alias set.
311 (gimple_register_canonical_type_1): Do not produce canonical
312 types for types that do not need alias sets.
313
00c1bd91 3142015-05-22 Jan Hubicka <hubicka@ucw.cz>
315
316 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
317
82915df7 3182015-05-19 Jan Hubicka <hubicka@ucw.cz>
319
320 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
321
40175f70 3222015-05-17 Jan Hubicka <hubicka@ucw.cz>
323
324 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
325 compare ODR types (if available) and function types.
326 (lto_symtab_merge): ... here; output ODR violation warnings
327 and call warn_types_mismatch.
328
988cf7b9 3292015-04-29 Jan Hubicka <hubicka@ucw.cz>
330
331 * lto.c (lto_fixup_state): Call verify_type.
332
9969c043 3332015-04-18 Trevor Saunders <tsaunders@mozilla.com>
334
988cf7b9 335 * lto.c: Adjust for hash_table changes.
9969c043 336
d2e9c252 3372015-03-27 Jan Hubicka <hubicka@ucw.cz>
338
339 * lto.c (lto_read_decls): Move code registering odr types out
340 of TYPE_CANONICAL conditional and also register polymorphic types.
341
ce87fec0 3422015-03-26 Jan Hubicka <hubicka@ucw.cz>
343
344 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
345 DECL_ARTIFICAL symbols.
346
da6f3259 3472015-03-26 Jan Hubicka <hubicka@ucw.cz>
348
349 PR lto/65536
350 * lto.c (unify_scc): Revert location cache when unification
351 suceeded.
352 (lto_read_decls): Accept location cache after sucess;
353 apply location cache before calling debug hooks.
354
e9e2b82f 3552015-03-10 Jan Hubicka <hubicka@ucw.cz>
356
357 * lto.c (read_cgraph_and_symbols): Do not do merging
358 at ltrans stage.
359
2e971afd 3602015-02-26 Jakub Jelinek <jakub@redhat.com>
361
362 * lto.c (lto_mode_identity_table): New variable.
363 (lto_read_decls): Add mode_table argument to the lto_input_block
364 constructor.
365 (lto_file_finalize): Initialize mode_table.
366 (lto_init): Initialize lto_mode_identity_table.
367
6349b8cc 3682015-02-24 Thomas Schwinge <thomas@codesourcery.com>
369
370 PR libgomp/64625
371 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
372 Remove macros.
373 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
374
57e20c4a 3752015-02-03 Jan Hubicka <hubicka@ucw.cz>
376
377 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
378
c05be867 3792015-01-30 Joseph Myers <joseph@codesourcery.com>
380
381 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
382 changed to pass input_location as first argument.
383
bbcd979a 3842014-12-11 Jan Hubicka <hubicka@ucw.cz>
385
386 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
387
90617f12 3882014-12-11 Jan Hubicka <hubicka@ucw.cz>
389
390 * lto.c (compare_tree_sccs_1): Add comparsion of
391 DECL_FUNCTION_SPECIFIC_TARGET
392
ca4c3545 3932015-01-15 Thomas Schwinge <thomas@codesourcery.com>
394 James Norris <jnorris@codesourcery.com>
395
396 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
397 New macros.
398 * lto.c: Include "gomp-constants.h".
399
9d65fe51 4002015-01-14 Ilya Verbin <ilya.verbin@intel.com>
401
402 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
403 from select_what_to_stream.
404
ba000093 4052015-01-09 Bernd Schmidt <bernds@codesourcery.com>
406 Jakub Jelinek <jakub@redhat.com>
407
408 PR middle-end/64412
409 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
410 if ACCEL_COMPILER.
411
1f78217c 4122015-01-09 Michael Collison <michael.collison@linaro.org>
413
414 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
415 input.h, alias.h, symtab.h, options, fold-const.h,
416 wide-int.h, and inchash.h due to flattening of tree.h.
417 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
418 input.h, alias.h, symtab.h, fold-const.h,
419 wide-int.h, and inchash.h due to flattening of tree.h.
420 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
421 input.h, alias.h, symtab.h, options, fold-const.h,
422 wide-int.h, and inchash.h due to flattening of tree.h.
423 * lto-partition.c: Ditto.
424 * lto-symtab.c: Ditto.
425
d353bf18 4262015-01-05 Jakub Jelinek <jakub@redhat.com>
427
428 Update copyright years.
429
b4bae7a0 4302014-12-22 Martin Liska <mliska@suse.cz>
431
432 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
433 is used.
434 (undo_partition): Likewise.
435 (lto_balanced_map): Likewise.
436
2cc80ac3 4372014-12-22 Martin Liska <mliska@suse.cz>
438
439 * lto-partition.c: Include of symbol-summary.h is added.
440 * lto-symtab.c: Likewise.
441 * lto.c: Likewise.
442
366970c6 4432014-12-11 Jan Hubicka <hubicka@ucw.cz>
444
445 PR ipa/61324
446 * lto.c (read_cgraph_and_symbols): Update call of
447 remove_unreachable_nodes.
448 (do_whole_program_analysis): Remove call of
449 symtab->remove_unreachable_nodes
450
9dac2720 4512014-12-08 Trevor Saunders <tsaunders@mozilla.com>
452
453 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
454 htab with malloc instead of ggc.
455
9f9f871f 4562014-11-20 Trevor Saunders <tsaunders@mozilla.com>
457
458 * lto.c: Replace htab with hash_table.
459
5ecbd52e 4602014-11-20 Trevor Saunders <tsaunders@mozilla.com>
461
462 * lto.c (lto_read_in_decl_state): Adjust.
463 (lto_fixup_state): Likewise.
464
23de2c1d 4652014-11-17 Jan Hubicka <hubicka@ucw.cz>
466
467 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
468
ab90b67e 4692014-11-14 Jan Hubicka <hubicka@ucw.cz>
470
471 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
472
b0c5e347 4732014-11-13 Ilya Verbin <ilya.verbin@intel.com>
474 Bernd Schmidt <bernds@codesourcery.com>
475 Andrey Turetskiy <andrey.turetskiy@intel.com>
476 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
477
dccabdd1 478 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
479
4802014-11-13 Ilya Verbin <ilya.verbin@intel.com>
481 Ilya Tocar <ilya.tocar@intel.com>
482 Andrey Turetskiy <andrey.turetskiy@intel.com>
483 Bernd Schmidt <bernds@codesourcery.com>
484
b0c5e347 485 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
486 LTO_SECTION_NAME_PREFIX.
487 * lto-partition.c (lto_promote_cross_file_statics): Call
488 select_what_to_stream.
489 * lto.c (lto_section_with_id): Use section_name_prefix instead of
490 LTO_SECTION_NAME_PREFIX.
491 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
492 being built as an offload compiler.
493
3754d046 4942014-10-29 Richard Sandiford <richard.sandiford@arm.com>
495
496 * lto-lang.c: Remove redundant enum from machine_mode.
497
1140c305 4982014-10-28 Andrew MacLeod <amacleod@redhat.com>
499
500 * lto.c: Adjust include files.
501 * lto-lang.c: Ditto.
502 * lto-object.c: Ditto.
503 * lto-partition.c: Ditto.
504 * lto-symtab.c: Ditto.
505
94ea8568 5062014-10-27 Andrew MacLeod <amacleod@redhat.com>
507
508 * lto-lang.c: Adjust include files.
509 * lto-object.c: Ditto.
510 * lto-partition.c: Ditto.
511 * lto-symtab.c: Ditto.
512 * lto.c: Ditto.
513
c219a638 5142014-10-16 DJ Delorie <dj@redhat.com>
515
516 * lto-object.c (lto_obj_begin_section): In the event that pointer
517 sizes aren't powers of two, choose a more suitable alignment
518 than (unsigned)(-1).
519
9f75f026 5202014-10-14 DJ Delorie <dj@redhat.com>
521
522 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
523 size-type as well.
524 (lto_init): Initialize all intN types, not just int128.
525
120ce989 5262014-10-06 Martin Liska <mliska@suse.cz>
527
528 * lto.c (stream_out): ARG_UNUSED added for last argument.
529
16d41ae2 5302014-09-24 Aldy Hernandez <aldyh@redhat.com>
531
532 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
533 DECL_ABSTRACT_P.
534
6b722052 5352014-09-23 Andi Kleen <ak@linux.intel.com>
536
537 * lto-partition.c (node_cmp): Update comment.
538 (varpool_node_cmp): Use symtab_node for comparison.
539 (add_sorted_nodes): New function.
540 (lto_balanced_map): Change to keep ordered queue
541 of ordered node. Handle no_reorder attribute.
542
d585ba22 5432014-09-11 Jan Hubicka <hubicka@ucw.cz>
544
545 * lto.c (lto_read_decls): Register ODR types.
546
289c4db4 5472014-08-20 Jan Hubicka <hubicka@ucw.cz>
548
549 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
550 call.
551 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
552
1df805e3 5532014-08-14 Jan Hubicka <hubicka@ucw.cz>
554
555 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
556
62cc770a 5572014-08-14 Richard Biener <rguenther@suse.de>
558
559 PR lto/62067
560 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
561
472ca566 5622014-08-08 Richard Biener <rguenther@suse.de>
563
564 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
565
fc8393b7 5662014-08-08 Bin Cheng <bin.cheng@arm.com>
567
568 PR lto/62032
569 * lto-lang.c (lto_init): Switch mis-matched arguments.
570
5f8841a5 5712014-08-07 Trevor Saunders <tsaunders@mozilla.com>
572
573 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
574
431205b7 5752014-08-02 Trevor Saunders <tsaunders@mozilla.com>
576
577 * lto-partition.c, lto-partition.h: Use hash_set instead of
578 pointer_set.
579
7fdbd1ec 5802014-07-31 Andi Kleen <ak@linux.intel.com>
581
582 * lto.c (hash_canonical_type): Use inchash::hash
583 and use inchash::add_expr.
584 (iterative_hash_canonical_type): Dito.
585
2d97af95 5862014-07-30 Richard Biener <rguenther@suse.de>
587
588 * lto-streamer.h (lto_write_data): New function.
589 * langhooks.c (lhd_append_data): Do not free block.
590 * lto-section-out.c (lto_write_data): New function writing
591 raw data to the current section.
592 (lto_write_stream): Adjust for langhook semantic change.
593 (lto_destroy_simple_output_block): Write header directly.
594 * lto-opts.c (lto_write_options): Write options directly.
595 * lto-streamer-out.c (produce_asm): Write heaeder directly.
596 (lto_output_toplevel_asms): Likewise.
597 (copy_function_or_variable): Copy data directly.
598 (write_global_references): Output index table directly.
599 (lto_output_decl_state_refs): Likewise.
600 (write_symbol): Write data directly.
601 (produce_symtab): Adjust.
602 (produce_asm_for_decls): Output header and refs directly.
603
045e2f27 6042014-07-25 Andi Kleen <ak@linux.intel.com>
605
606 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
607
e7f95d73 6082014-07-25 Andi Kleen <ak@linux.intel.com>
609
610 * lto.c (hash_canonical_type): Convert to inchash.
611 (iterative_hash_canonical_type): Dito.
612
6b214d09 6132014-07-25 Andi Kleen <ak@linux.intel.com>
614
615 * lto.c: Include inchash.h
616
83c7dcd8 6172014-07-14 Jan Hubicka <hubicka@ucw.cz>
618
619 * lto.c (mentions_vars_p_decl_non_common): Skip
620 DECL_ARGUMENT_FLD.
621 mentions_vars_p_function): Do DECL_ARGUMENTS.
622 (lto_fixup_prevailing_decls): Update.
623
e52d4978 6242014-07-12 Jan Hubicka <hubicka@ucw.cz>
625
626 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
627 timevar
628 (materialize_cgraph): Do not push GIMPLE_IN timevar.
629
afb0d513 6302014-07-11 Jan Hubicka <hubicka@ucw.cz>
631
632 * lto-partition.c (add_references_to_partition): Use
633 varpool_ctor_useable_for_folding_p.
634 * lto.c (lto_read_in_decl_state): Update sanity check.
635
e4a2b488 6362014-07-01 Martin Liska <mliska@suse.cz>
637
638 IPA REF alias refactoring
639 * lto-partition.c (add_symbol_to_partition_1): Usage of
640 FOR_EACH_ALIAS added.
641
c7be6601 6422014-06-28 Jan Hubicka <hubicka@ucw.cz>
643
644 Revert:
645 * lto.c (lto_copy_fields_not_streamed): New function.
646 (compare_tree_sccs_1): Do not compare fields shared in between type
647 and variant.
648 (lto_read_decls): Fixup types first before inserting into hash.
649
c1526d28 6502014-06-28 Andrew Pinski <apinski@cavium.com>
651
652 * lto.c (lto_read_decls): Fix comment in comment.
653
28635c35 6542014-06-28 Jan Hubicka <hubicka@ucw.cz>
655
656 * lto.c (lto_copy_fields_not_streamed): New function.
657 (compare_tree_sccs_1): Do not compare fields shared in between type
658 and variant.
659 (lto_read_decls): Fixup types first before inserting into hash.
660
737331e8 6612014-06-25 Martin Liska <mliska@suse.cz>
662
663 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
664 used.
665 (add_symbol_to_partition_1): Likewise.
666 (lto_balanced_map): Likewise.
667 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
668
9c2e58d0 6692014-06-24 Jan Hubicka <hubicka@ucw.cz>
670
671 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
672 (mentions_vars_p_function): ... here.
673 (compare_tree_sccs_1): Update VINDEX checks.
674 (lto_fixup_prevailing_decls): Likewise.
675
d62dd039 6762014-06-24 Trevor Saunders <tsaunders@mozilla.com>
677
678 * lto.c (canonical_type_hash_cache): Use hash_map instead of
679 pointer_map.
680
c1f445d2 6812014-06-24 Trevor Saunders <tsaunders@mozilla.com>
682
683 * lto.c: Adjust.
684
b7393cee 6852014-06-20 Jan Hubicka <hubicka@ucw.cz>
686
687 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
688
9db80d42 6892014-06-20 Jan Hubicka <hubicka@ucw.cz>
690
691 * lto.c (compare_tree_sccs_1): Do not compare priorities.
692
5e68df57 6932014-06-15 Jan Hubicka <hubicka@ucw.cz>
694
695 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
696
e4c07a06 6972014-06-10 Jan Hubicka <hubicka@ucw.cz>
698
699 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
700 (do_whole_program_analysis): Use verify_symtab.
701
71e19e54 7022014-06-07 Jan Hubicka <hubicka@ucw.cz>
703
704 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
705 lto_fixup_prevailing_decls): Skip section names.
706
f7715905 7072014-06-02 Andrew MacLeod <amacleod@redhat.com>
708
709 * lto-symtab.c: Include builtins.h.
710
3a4303e7 7112014-05-26 Richard Biener <rguenther@suse.de>
712
713 * lto.c (lto_parse_hex): Use int64_t.
714 (lto_resolution_read): Likewise.
715
4f78e0a8 7162014-05-23 Jan Hubicka <hubicka@ucw.cz>
717
718 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
719
8c016392 7202014-05-23 Jan Hubicka <hubicka@ucw.cz>
721
722 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
723 symtab pointer.
724 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
725
3c77ca67 7262014-05-22 Thomas Schwinge <thomas@codesourcery.com>
727
728 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
729 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
730 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
731
47131315 7322012-05-22 Bernd Schmidt <bernds@codesourcery.com>
733
734 * lto-object.c: Include "lto-section-names.h".
735 (LTO_SEGMENT_NAME): Don't define.
736 * lto.c: Include "lto-section-names.h".
737
24888760 7382014-05-17 Jan Hubicka <hubicka@ucw.cz>
739
740 PR lto/61012
741 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
742 mixed with variables.
743
25a27413 7442014-05-17 Trevor Saunders <tsaunders@mozilla.com>
745
746 * lto-tree.h: Don't use variable_size gty attribute.
747 * lto.c (lto_read_in_decl_state): Adjust.
748 (create_subid_section_table): Likewise.
749 (lto_flatten_files): Likewise.
750 (read_cgraph_and_symbols): Likewise.
751
960d5a55 7522014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
753 Mike Stump <mikestump@comcast.net>
754 Richard Sandiford <rdsandiford@googlemail.com>
755
756 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
757 * lto-lang.c (get_nonnull_operand): Likewise.
758
060fc206 7592014-04-28 Richard Biener <rguenther@suse.de>
760
761 PR middle-end/60092
762 * lto-lang.c: Define flag_isoc11.
763
13cbeaac 7642014-04-23 David Malcolm <dmalcolm@redhat.com>
765
766 * lto-partition.c (add_references_to_partition): Update for
767 removal of implicit pointer from the is-a.h API.
768 (add_symbol_to_partition_1): Likewise.
769 (contained_in_symbol): Likewise.
770 (undo_partition): Likewise.
771 (lto_balanced_map): Likewise.
772 (promote_symbol): Likewise.
773 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
774 (lto_symtab_merge_symbols): Likewise.
775 * lto.c (lto_wpa_write_files): Likewise.
776
4a137074 7772014-04-15 Richard Biener <rguenther@suse.de>
778
779 * lto.c: Include params.h.
780 (do_whole_program_analysis): Switch on flag_lto_partition value,
781 add support for LTO_PARTITION_ONE.
782 * lto-partition.h (lto_balanced_map): Adjust.
783 * lto-partition.c (lto_balanced_map): Get number of desired
784 partitions as argument to support -flto-partition=one.
785
df565eb6 7862014-04-14 Jan Hubicka <hubicka@ucw.cz>
787
788 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
789 tp_first_run.
790
ceaf91ad 7912014-03-19 Jan Hubicka <hubicka@ucw.cz>
792
793 * lto.c: Include ipa-inline.h
794 (do_whole_program_analysis): Free inline summary after partitioning.
795
73249b1e 7962014-03-19 Richard Biener <rguenther@suse.de>
797
798 PR middle-end/60553
799 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
800 instead of TREE_CHAIN as chain_next.
801
4e6f2fb9 8022014-03-19 Richard Biener <rguenther@suse.de>
803
804 * lto.c (lto_wpa_write_files): Move call to
805 lto_promote_cross_file_statics ...
806 (do_whole_program_analysis): ... here, into the partitioning
807 block. Do not ggc_collect after lto_wpa_write_files but
808 for a last time before it.
809
e629dc34 8102014-03-19 Jakub Jelinek <jakub@redhat.com>
811
812 PR lto/60571
813 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
814 Fix formatting.
815
0baf842d 8162014-03-18 Jakub Jelinek <jakub@redhat.com>
817
818 PR sanitizer/60535
819 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
820 and complex_{float,{,long_}double}_type_node.
821
c9a24b37 8222014-03-08 Paulo Matos <paulo@matos-sorge.com>
823
0baf842d 824 * lto-lang.c (lto_init): Pass flag_short_double to
825 build_common_tree_nodes.
c9a24b37 826
a2223fa9 8272014-02-14 Jan Hubicka <hubicka@ucw.cz>
828
829 PR lto/60295
830 * lto.c (stream_out): Avoid parallel streaming with
831 -flto=jobserver until we are able to throttle it down
832 resonably.
833
8c075206 8342014-02-14 Jan Hubicka <hubicka@ucw.cz>
835
836 * lto-partition.c (add_symbol_to_partition_1,
837 undo_partition, lto_balanced_map): Aliases have no
838 defined size.
839 (lto_balanced_map): Do not follow refering variables
840 if they can be optimized out.
841
f4c35256 8422014-02-14 Richard Biener <rguenther@suse.de>
843
844 PR lto/60179
845 * lto.c (compare_tree_sccs_1): Do not compare
846 DECL_FUNCTION_SPECIFIC_TARGET.
847 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
848
f5cbf731 8492014-02-12 Richard Biener <rguenther@suse.de>
850
851 PR lto/60060
852 * lto-lang.c (lto_write_globals): Do not call
853 wrapup_global_declarations or emit_debug_global_declarations
854 but emit debug info for non-function scope variables
855 directly.
856
a973177e 8572014-02-06 Jan Hubicka <hubicka@ucw.cz>
858
859 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
860
94107507 8612014-02-06 Jan Hubicka <hubicka@ucw.cz>
862
863 PR ipa/59469
864 * lto-partition.c (symbol_class): Move to cgraph.h
865 (get_symbol_class): Move to symtab.c
866 (add_references_to_partition, add_symbol_to_partition_1,
867 lto_max_map, lto_1_to_1_map, lto_balanced_map,
868 lto_promote_cross_file_statics): Update.
869
3e17769e 8702014-02-05 Jan Hubicka <hubicka@ucw.cz>
871
872 * lto.c (lto_parallelism): New static var.
873 (do_stream_out, wait_for_child, stream_out): New static functions.
874 (lto_wpa_write_files): Add support for parallel streaming.
875 (do_whole_program_analysis): Set parallelism.
876 * lang.opt (fwpa): Add parameter.
877 * lto-lang.c (lto_handle_option): Handle flag_wpa.
878 (lto_init): Update use of flag_wpa.
879 * lto-streamer.h (asm_nodes_output): Declare.
880
00288439 8812014-02-05 Richard Biener <rguenther@suse.de>
882
883 * lto.h (lto_global_var_decls): Remove.
884 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
885 (lto_write_globals): Do nothing in WPA stage, gather globals from
886 the varpool here ...
887 * lto.c (lto_main): ... not here.
888 (materialize_cgraph): Do not call rest_of_decl_compilation
889 on the empty lto_global_var_decls vector.
890 (lto_global_var_decls): Remove.
891
96a3dc39 8922014-02-04 Jan Hubicka <hubicka@ucw.cz>
893
894 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
895 needs duplicating, not generic COMDAT.
896
6541e9a1 8972014-02-04 Richard Biener <rguenther@suse.de>
898
899 PR lto/59723
900 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
901 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
902
b89ce5e3 9032014-02-04 Jan Hubicka <hubicka@ucw.cz>
904 Markus Trippelsdorf
905
906 PR ipa/59469
907 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
908 merge force_output and forced_by_abi flags.
909
a89e6c15 9102014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
911
912 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
913 flag_cilkplus.
914
c205a71b 9152014-01-09 Richard Biener <rguenther@suse.de>
916
917 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
918
f1105f81 9192014-01-09 Richard Biener <rguenther@suse.de>
920
921 PR lto/45586
922 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
923 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
924 (gimple_canonical_types_compatible_p): Do not compare them either.
925
3aea1f79 9262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
927
928 Update copyright years
929
098f44bc 9302013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
931
932 * lto.c: Remove struct tags when referring to class varpool_node.
933 * lto-partition.c: Likewise.
934 * lto-symtab.c: Likewise.
935
ea0695f9 9362013-11-29 Jakub Jelinek <jakub@redhat.com>
937 Richard Biener <rguenther@suse.de>
938
939 PR lto/59326
940 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
941
fe3e3369 9422013-11-29 Jakub Jelinek <jakub@redhat.com>
943
944 PR lto/59326
945 * lto.c (mentions_vars_p_omp_clause): New function.
946 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
947 after return stmts.
948
bc61cadb 9492013-11-22 Andrew MacLeod <amacleod@redhat.com>
950
951 * lto.c: Add required include files from gimple.h.
952 * lto-lang.c: Likewise
953 * lto-object.c: Likewise
954 * lto-partition.c: Likewise
955 * lto-symtab.c: Likewise
956
f1c8b4d7 9572013-11-18 Trevor Saunders <tsaunders@mozilla.com>
958
959 * lto-partition.c lto-symtab.c lto.c Adjust.
960
9ed99284 9612013-11-14 Diego Novillo <dnovillo@google.com>
962
963 * lto-lang.c: Include stringpool.h.
964 Include stor-layout.h.
965 * lto-partition.c: Include gcc-symtab.h.
966 * lto.c: Include stor-layout.h.
967
452659af 9682013-10-31 David Malcolm <dmalcolm@redhat.com>
969
970 Automated part of renaming of symtab_node_base to symtab_node.
971
972 Patch autogenerated by rename_symtab.py from
973 https://github.com/davidmalcolm/gcc-refactoring-scripts
974 revision 58bb219cc090b2f4516a9297d868c245495ee622
975
976 * lto-partition.c (add_symbol_to_partition): Rename
977 symtab_node_base to symtab_node.
978 (get_symbol_class): Likewise.
979 (symbol_partitioned_p): Likewise.
980 (add_references_to_partition): Likewise.
981 (add_symbol_to_partition_1): Likewise.
982 (contained_in_symbol): Likewise.
983 (add_symbol_to_partition): Likewise.
984 (lto_1_to_1_map): Likewise.
985 (lto_max_map): Likewise.
986 (lto_balanced_map): Likewise.
987 (privatize_symbol_name): Likewise.
988 (promote_symbol): Likewise.
989 (may_need_named_section_p): Likewise.
990 (rename_statics): Likewise.
991 (lto_promote_statics_nonwpa): Likewise.
992 * lto-symtab.c (lto_symtab_merge): Likewise.
993 (lto_symtab_resolve_replaceable_p): Likewise.
994 (lto_symtab_symbol_p): Likewise.
995 (lto_symtab_resolve_can_prevail_p): Likewise.
996 (lto_symtab_resolve_symbols): Likewise.
997 (lto_symtab_merge_decls_2): Likewise.
998 (lto_symtab_merge_decls_1): Likewise.
999 (lto_symtab_merge_decls): Likewise.
1000 (lto_symtab_merge_symbols_1): Likewise.
1001 (lto_symtab_merge_symbols): Likewise.
1002 (lto_symtab_prevailing_decl): Likewise.
1003 * lto.c (lto_wpa_write_files): Likewise.
1004 (read_cgraph_and_symbols): Likewise.
1005 (do_whole_program_analysis): Likewise.
1006
d03e6917 10072013-10-30 David Malcolm <dmalcolm@redhat.com>
1008
1009 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1010 declarations onto multiple lines to make things easier for
1011 rename_symtab.py.
1012 (lto_symtab_merge_decls_1): Likewise.
1013 (lto_symtab_merge_symbols_1): Likewise.
1014
d037099f 10152013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1016
1017 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1018 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1019 Plus is enabled.
1020
02774f2d 10212013-10-29 David Malcolm <dmalcolm@redhat.com>
1022
1023 Patch autogenerated by refactor_symtab.py from
1024 https://github.com/davidmalcolm/gcc-refactoring-scripts
1025 revision 58bb219cc090b2f4516a9297d868c245495ee622
1026
1027 * lto-partition.c (lto_promote_cross_file_statics): Update for
1028 conversion of symtab types to a true class hierarchy.
1029 (rename_statics): Likewise.
1030 (promote_symbol): Likewise.
1031 (privatize_symbol_name): Likewise.
1032 (lto_balanced_map): Likewise.
1033 (varpool_node_cmp): Likewise.
1034 (node_cmp): Likewise.
1035 (lto_1_to_1_map): Likewise.
1036 (undo_partition): Likewise.
1037 (add_symbol_to_partition): Likewise.
1038 (contained_in_symbol): Likewise.
1039 (add_symbol_to_partition_1): Likewise.
1040 (add_references_to_partition): Likewise.
1041 (symbol_partitioned_p): Likewise.
1042 (get_symbol_class): Likewise.
1043 (lto_max_map): Likewise.
1044 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1045 (lto_symtab_merge_symbols): Likewise.
1046 (lto_symtab_merge_symbols_1): Likewise.
1047 (lto_symtab_merge_decls): Likewise.
1048 (lto_symtab_merge_decls_1): Likewise.
1049 (lto_symtab_merge_decls_2): Likewise.
1050 (lto_symtab_resolve_symbols): Likewise.
1051 (lto_symtab_resolve_can_prevail_p): Likewise.
1052 (lto_symtab_symbol_p): Likewise.
1053 (lto_symtab_resolve_replaceable_p): Likewise.
1054 (lto_symtab_merge): Likewise.
1055 (lto_varpool_replace_node): Likewise.
1056 (lto_cgraph_replace_node): Likewise.
1057 * lto.c (lto_main): Likewise.
1058 (do_whole_program_analysis): Likewise.
1059 (materialize_cgraph): Likewise.
1060 (read_cgraph_and_symbols): Likewise.
1061 (cmp_partitions_order): Likewise.
1062 (lto_materialize_function): Likewise.
1063 (has_analyzed_clone_p): Likewise.
1064
b23fb4cb 10652013-10-29 Andrew MacLeod <amacleod@redhat.com>
1066
1067 * lto/lto-object.c: Add gimple.h to include list.
1068 * lto/lto-partition.c: Likewise.
1069
dd9784d4 10702013-10-18 Andrew MacLeod <amacleod@redhat.com>
1071
1072 * lto.c: Remove tree-flow.h from include list.
1073
fdbb424a 10742013-10-15 Richard Biener <rguenther@suse.de>
1075
1076 * lto.c (hash_canonical_type): Split out from ...
1077 (iterative_hash_canonical_type): ... here. Register types
1078 we recurse to.
1079 (gimple_canonical_type_hash): Adjust.
1080 (gimple_register_canonical_type_1): Split out from ...
1081 (gimple_register_canonical_type): ... here. Cache computed
1082 hash value.
1083 (lto_register_canonical_types): Split into two modes,
1084 clearing and computing TYPE_CANONICAL.
1085 (lto_read_decls): Adjust.
1086 (read_cgraph_and_symbols): Do two passes over global trees,
1087 first clearing then computing TYPE_CANONICAL.
1088
fb26741a 10892013-10-14 Richard Biener <rguenther@suse.de>
1090
1091 * lto.c (gimple_canonical_types): Move out-of GC space.
1092 (canonical_type_hash_cache): Make a pointer-map.
1093 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1094 New counters.
1095 (iterative_hash_canonical_type): Adjust.
1096 (read_cgraph_and_symbols): Likewise.
1097 (print_lto_report_1): Likewise.
1098
d7009cf6 10992013-10-14 Richard Biener <rguenther@suse.de>
1100
1101 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1102 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1103 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1104 gimple_types_compatible_p_1, gimple_types_compatible_p,
1105 visit, iterative_hash_name, struct type_hash_pair,
1106 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1107 gimple_type_eq, gimple_register_type, num_not_merged_types,
1108 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1109 num_not_merged_types_in_same_scc_trees): Remove old merging code
1110 and statistics.
1111 (lto_read_decls): Do not run old merging code in parallel.
1112 (read_cgraph_and_symbols): Do not init/free old merging
1113 data structures.
1114 (print_lto_report_1): Do not report differences of old vs. new
1115 merging code.
1116
700d6a0b 11172013-10-14 Richard Biener <rguenther@suse.de>
1118
1119 * lto-lang.c (lto_init): Do not re-init canonical types here.
1120 (lto_register_canonical_types): Move to ...
1121 * lto.c (lto_register_canonical_types): ... here.
1122 (gimple_canonical_types, canonical_type_hash_cache,
1123 iterative_hash_canonical_type, gimple_canonical_type_hash,
1124 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1125 gimple_register_canonical_type): Add canonical type merging machinery
1126 moved from gimple.c.
1127 (read_cgraph_and_symbols): Init and free canonical type tables
1128 here.
1129 (print_lto_report_1): Report canonical type table stats here.
1130
bc7bff74 11312013-10-11 Jakub Jelinek <jakub@redhat.com>
1132
1133 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1134
d2681e34 11352013-09-25 Tom Tromey <tromey@redhat.com>
1136
1137 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1138 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1139 (lto/lto-object.o): Remove.
1140
94956000 11412013-09-06 Richard Biener <rguenther@suse.de>
1142
1143 * lto-symtab.c: Move from gcc/
1144 * lto.h: Include vec.h.
1145 (lto_global_var_decls): Declare.
1146 * lto.c (lto_global_var_decls): Move definition here.
1147 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1148 (lto-symtab.o): Add.
1149 * config-lang.in (gtfiles): Add lto.h.
1150
93cb0915 11512013-08-31 Jan Hubicka <jh@suse.cz>
1152
1153 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1154 DECL_FIELD_OFFSET can contain an reference to variable.
1155
d21755bc 11562013-08-31 Jan Hubicka <jh@suse.cz>
1157
1158 * lto.c (tree_with_vars): Turn into vector.
1159 (MAYBE_REMEMBER_WITH_VARS): Change to...
1160 (CHECK_VAR): ... this one.
1161 (CHECK_NO_VAR): New macro.
1162 (maybe_remember_with_vars_typed): Turn to ...
1163 (mentions_vars_p_typed): ... this one.
1164 (maybe_remember_with_vars_common): Turn to ...
1165 (mentions_vars_p_comon): ... this one.
1166 (maybe_remember_with_vars_decl_minimal): Turn to ...
1167 (mentions_vars_p_decl_minmal): ... this one.
1168 (maybe_remember_with_vars_decl_common): Turn to ...
1169 (mentions_vars_p_decl_common): ... this one.
1170 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1171 (mentions_vars_p_decl_with_vis): ... this one.
1172 (maybe_remember_with_vars_decl_non_common): Turn to ...
1173 (mentions_vars_p_decl_non_common): ... this one.
1174 (maybe_remember_with_vars_function): Turn to ...
1175 (mentions_vars_p_function): ... this one.
1176 (maybe_remember_with_vars_field_decl): Turn to ...
1177 (mentions_vars_p_field_decl): ... this one.
1178 (maybe_remember_with_vars_type): Turn to ...
1179 (mentions_vars_p_type): ... this one.
1180 (maybe_remember_with_vars_binfo): Turn to ...
1181 (mentions_vars_p_binfo): ... this one.
1182 (maybe_remember_with_vars_constructor): Turn to ...
1183 (mentions_vars_p_constructor): ... this one.
1184 (maybe_remember_with_vars_expr): Turn to ...
1185 (mentions_vars_p_expr): ... this one.
1186 (maybe_remember_with_vars): Turn to ...
1187 (mentions_vars_p): ... this one.
1188 (lto_read_decls): Update.
1189 (LTO_SET_PREVAIL): Do not call function for internal decls.
1190 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1191 check that something was updated.
1192 (lto_fixup_state): Do not care about internal decls.
1193 (lto_fixup_decls): Update.
1194 (read_cgraph_and_symbols): Update.
1195
5f74a074 11962013-08-29 Jan Hubicka <jh@suse.cz>
1197
1198 * lto.c (read_cgraph_and_symbols): Free decl states.
1199
2d9cc481 12002013-08-29 Jan Hubicka <jh@suse.cz>
1201
1202 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1203 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1204 TYPE_FINAL_P.
1205
881fe02c 12062013-08-28 Jan Hubicka <jh@suse.cz>
1207
1208 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1209 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1210 (unify_scc): Do checking assert.
1211
66d78392 12122013-08-06 Jan Hubicka <jh@suse.cz>
1213 Martin Liska <marxin.liska@gmail.com>
1214
1215 * lto-partition.c (lto_balanced_map): Always base order on
1216 source file order.
1217
eaad46f2 12182013-08-06 Jan Hubicka <jh@suse.cz>
1219
1220 * lto.c (lto_materialize_function): Do not read body anymore.
1221
4df870fd 12222013-08-02 Jan Hubicka <jh@suse.cz>
1223
1224 * lto.c (lto_materialize_function): Do not push struct function.
1225 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1226 (may_need_named_section_p): Even abstract origins may need
1227 named section.
1228
3ea50c01 12292013-07-30 David Malcolm <dmalcolm@redhat.com>
1230
1231 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1232 PASS_MANAGER_H.
1233
1234 * lto.c (do_whole_program_analysis): Update for move of
1235 all_regular_ipa_passes from a global to a field of class
1236 pass_manager.
1237
75de4aa2 12382013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1239
1240 * lto-partition.c: Fix typos.
1241
593309df 12422013-06-20 Jan Hubicka <jh@suse.cz>
1243
1244 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1245 partitioning of variables.
1246
fdbe58cf 12472013-06-20 Jan Hubicka <jh@suse.cz>
1248
1249 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1250
df8d3e89 12512013-06-19 Jan Hubicka <jh@suse.cz>
1252
1253 * lto-partition.c (add_references_to_partition): Use
1254 ctor_for_folding.
1255
be1cd111 12562013-06-18 Richard Biener <rguenther@suse.de>
1257
1258 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1259 and use it.
1260 (lto_register_function_decl_in_symtab): Likewise.
1261 (cmp_tree): New function.
1262 (unify_scc): Instead of using the streamer cache map from entry
1263 to cache index match up the two maps we have by sorting them.
1264 Adjust calls to lto_register_var_decl_in_symtab and
1265 lto_register_function_decl_in_symtab.
1266
8ceff600 12672013-06-17 Richard Biener <rguenther@suse.de>
1268
1269 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1270 * lto.c: Include data-streamer.h.
1271 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1272 (gimple_type_leader_entry_s, gimple_type_leader,
1273 gimple_lookup_type_leader): Remove.
1274 (gtc_visit): Simplify.
1275 (gimple_types_compatible_p): Likewise.
1276 (gimple_register_type_1): Likewise. Merge into ...
1277 (gimple_register_type): ... this. Keep it as legacy for
1278 statistics purposes for now.
1279 (fixup_integer_cst): Remove.
1280 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1281 rename to ...
1282 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1283 maybe_remember_with_vars_*): ... these.
1284 (uniquify_nodes): Remove.
1285 (lto_fixup_prevailing_type): New function.
1286 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1287 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1288 (num_merged_types, num_prevailing_types, num_not_merged_types,
1289 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1290 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1291 num_scc_compare_collisions): New global counters.
1292 (compare_tree_sccs_1): New function.
1293 (compare_tree_sccs): Likewise.
1294 (unify_scc): Likewise.
1295 (lto_read_decls): Stream in tree SCCs and unify them on the
1296 way in. Finalize prevailing SCC tree members.
1297 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1298 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1299 to ggc-collect during merging.
1300 (print_lto_report_1): Adjust for new merging code.
1301
da4b8721 13022013-06-12 Jan Hubicka <jh@suse.cz>
1303
1304 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1305
9e9c3e92 13062013-06-12 Jan Hubicka <jh@suse.cz>
1307
1308 * lto.c (register_resolution): Take lto_file_data argument.
1309 (lto_register_var_decl_in_symtab,
1310 lto_register_function_decl_in_symtab): Update.
1311 (read_cgraph_and_symbols): Update resolution_map handling.
1312
21ebaa24 13132013-06-11 Jan Hubicka <jh@suse.cz>
f2526cce 1314
1315 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1316 (add_symbol_to_partition_1): Likewise.
1317 (contained_in_symbol): Likewise.
1318 (lto_balanced_map): Likewise.
1319 (rename_statics): Drop weakref.
1320
4b927f54 13212013-06-05 Richard Biener <rguenther@suse.de>
1322
1323 * lto.c (num_merged_types): New global variable.
1324 (uniquify_nodes): Increase num_merged_types when merging a type.
1325 (print_lto_report_1): Output the number of merged types.
1326
48669653 13272013-06-01 Jan Hubicka <jh@suse.cz>
1328
1329 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1330 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1331 (do_whole_program_analysis): Update dumping.
1332
15ca8f90 13332013-05-29 Jan Hubicka <jh@suse.cz>
1334
1335 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1336 flags.
1337 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1338
59651d3b 13392013-05-15 Jan Hubicka <jh@suse.cz>
1340
1341 * lto-partition.c (privatize_symbol_name): Return true when
1342 privatizing happened.
1343 (rename_statics): Do not go into infinite loop when privatizing
1344 is not needed.
1345
be5f9e46 13462013-05-16 Jason Merrill <jason@redhat.com>
1347
1348 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1349
15c999e3 13502013-05-15 Martin Jambor <mjambor@suse.cz>
1351
1352 * lto-partition.c (lto_balanced_map): Print symbol order instead
1353 of node uids.
1354
33864132 13552013-05-15 Jan Hubicka <jh@suse.cz>
1356
1357 PR lto/57038
1358 PR lto/47375
1359 * lto-partition.c (get_symbol_class): Fix weakrefs.
1360 (lto_balanced_map): Fix weakrefs.
1361 (privatize_symbol_name): Remove unnecesary label.
1362 (rename_statics): Handle weakrefs as statics.
1363
85b7ebb2 13642013-05-09 Jan Hubicka <jh@suse.cz>
1365 Richard Biener <rguenther@suse.de>
1366
1367 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1368 (lto_register_var_decl_in_symtab): Likewise.
1369 (lto_main): Promote statics.
1370 * lto-partition.c (privatize_symbol_name): New function.
1371 (promote_symbol): Use it.
1372 (may_need_named_section_p): New predicate.
1373 (rename_statics): New functions.
1374 (lto_promote_cross_file_statics): Simplify; do renaming.
1375 (lto_promote_statics_nonwpa): New function.
1376 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1377
ab3c0986 13782013-02-08 Richard Biener <rguenther@suse.de>
1379
1380 PR lto/56231
1381 * lto-lang.c (lto_init): Do not enter a dummy file.
1382
7a87c8e1 13832013-02-07 Uros Bizjak <ubizjak@gmail.com>
1384
1385 PR bootstrap/56227
1386 * lto.c (lto_resolution_ready): Use %wx instead of
1387 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1388
871609a8 13892013-02-04 Richard Guenther <rguenther@suse.de>
1390
1391 PR lto/56168
1392 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1393 or lto_fixup_decls at LTRANS time.
1394
c7fbaa62 13952013-01-09 Jan Hubicka <jh@suse.cz>
1396
1397 PR lto/45375
1398 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1399
d9501635 14002012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1401
1402 PR lto/55466
1403 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1404 variables.
1405 (lto_main): Record the global variables if WPA isn't enabled.
1406
1e094109 14072012-11-20 Diego Novillo <dnovillo@google.com>
1408 Jakub Jelinek <jakub@redhat.com>
1409
1410 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1411
f1f41a6c 14122012-11-16 Diego Novillo <dnovillo@google.com>
1413
1414 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1415
1416 * lto-lang.c: Use new vec API in vec.h.
1417 * lto-partition.c: Likewise.
1418 * lto-partition.h: Likewise.
1419 * lto.c: Likewise.
1420
d2313b52 14212012-10-31 Lawrence Crowl <crowl@google.com>
1422
1423 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1424 down-cast via dyn_cast.
1425 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1426 (undo_partition): Likewise.
1427 (lto_balanced_map): Likewise.
1428 (get_symbol_class): Likewise and via is_a.
1429 (lto_balanced_map): Change symtab checking to is_a.
1430
a5693828 14312012-10-12 Richard Biener <rguenther@suse.de>
1432
1433 PR lto/54898
1434 * lto.c (gimple_types_compatible_p_1): Also compare
1435 TYPE_MAIN_VARIANT.
1436 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1437
883554eb 14382012-10-09 Tobias Burnus <burnus@net-b.de>
1439
1440 * lto-lang.c (lto_register_builtin_type): Avoid useless
1441 decl creation.
1442 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1443
14c7dd36 14442012-10-08 Tobias Burnus <burnus@net-b.de>
1445
1446 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1447 Free lto_file struct after closing the file.
1448
35d3a6eb 14492012-10-08 Jan Hubicka <jh@suse.cz>
1450
1451 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1452 (fixup_integer_cst): New functoin.
1453 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1454
b8925abd 14552012-10-07 Jan Hubicka <jh@suse.cz>
1456
1457 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1458 release input encoders.
1459 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1460
18ff06f9 14612012-10-06 Jan Hubicka <jh@suse.cz>
1462
1463 PR lto/54790
1464 * lto.c (resolution_map): New static var.
1465 (register_resolution): New function.
1466 (lto_register_var_decl_in_symtab): Use it.
1467 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1468
9078126c 14692012-09-20 Martin Jambor <mjambor@suse.cz>
1470
1471 * lto.c (lto_materialize_function): Call push_struct_function and
1472 pop_cfun.
1473
5169661d 14742012-09-19 Dehao Chen <dehao@google.com>
1475
1476 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1477
c9aa6453 14782012-09-19 Jan Hubicka <jh@suse.cz>
1479
1480 * lto.c (lto_materialize_function): Update confused comment.
1481 (read_cgraph_and_symbols): Do not free symtab.
1482
0851d795 14832012-09-12 Jan Hubicka <jh@suse.cz>
1484
1485 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1486 AUX pointer cleaning. Add max partitioning.
1487 * lto-partition.c (enum symbol_class): New.
1488 (get_symbol_class): New function.
1489 (symbol_partitioned_p): New function.
1490 (add_references_to_partition): Remove.
1491 (add_aliases_to_partition): Remove.
1492 (add_cgraph_node_to_partition_1): Remove.
1493 (add_cgraph_node_to_partition): Remove.
1494 (add_symbol_to_partition): New function.
1495 (add_symbol_to_partition_1): New function.
1496 (contained_in_symbol): New function.
1497 (partition_cgraph_node_p): Remove.
1498 (partition_varpool_node_p): Remove.
1499 (partition_symbol_p): Remove.
1500 (lto_1_to_1_map): Cleanup.
1501 (lto_max_map): New.
1502 (lto_balanced_map): Update.
1503 (lto_promote_cross_file_statics): Update.
1504 * lto-partition.h (lto_max_map): Declare.
1505 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1506
8873e58c 15072012-09-11 Jan Hubicka <jh@suse.cz>
1508
1509 PR lto/54312
1510 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1511 type is variant leader.
1512
ed29d77f 15132012-09-11 Richard Guenther <rguenther@suse.de>
1514
1515 * lto.c (enum gtc_mode): Remove.
1516 (struct type_pair_d): Adjust.
1517 (lookup_type_pair): Likewise.
1518 (gimple_type_leader): Do not mark as deletable.
1519 (gimple_lookup_type_leader): Adjust.
1520 (gtc_visit): Likewise.
1521 (gimple_types_compatible_p_1): Likewise.
1522 (gimple_types_compatible_p): Likewise.
1523 (gimple_type_hash): Likewise.
1524 (gimple_register_type): Likewise.
1525 (read_cgraph_and_symbols): Manage lifetime of tables
1526 here.
1527
bdaea387 15282012-09-11 Richard Guenther <rguenther@suse.de>
1529
1530 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1531 struct type_pair_d, lookup_type_pair, struct sccs,
1532 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1533 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1534 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1535 visit, iterative_hash_name, struct type_hash_pair,
1536 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1537 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1538 Move here from gimple.c
1539 (read_cgraph_and_symbols): Free hash tables here.
1540 (print_lto_report_1): New function wrapping print_lto_report.
1541 (do_whole_program_analysis): Call it.
1542 (lto_main): Likewise.
1543
b6f96313 15442012-09-10 Jan Hubicka <jh@suse.cz>
1545
1546 * lto-partition.c (partition_symbol_p): Forward declare.
1547 (add_references_to_partition): Reimplement using partition_symbol_p.
1548 (add_aliases_to_partition): Break out from add_references_to_partition;
1549 reimplement using partition_symbol_p.
1550 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1551 add sanity checks.
1552 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1553 (partition_varpool_node_p): Do not special case aliases.
1554
724462b0 15552012-08-12 Jan Hubicka <jh@suse.cz>
1556
1557 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1558 it is deleted after streaming.
1559 * lto-partition.c (partition_symbol_p): New function.
1560 (promote_var, promote_fn): Remove.
1561 (promote_symbol): New function.
1562 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1563 to lookup the actual boundaries instead of computing them ad-hoc.
1564
5cf7e051 15652012-08-12 Jan Hubicka <jh@suse.cz>
1566
1567 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1568 in partitioning.
1569 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1570 by encoder.
1571 * lto-partition.c (new_partition): Update.
1572 * lto.c (cmp_partitions_order): Update.
1573 (lto_wpa_write_files): Update.
1574 (free_ltrans_partitions): Update.
1575 (add_references_to_partition): Update.
1576 (add_cgraph_node_to_partition_1): Update.
1577 (add_cgraph_node_to_partition): Update.
1578 (add_varpool_node_to_partition): Update.
1579 (undo_partition): Update.
1580 (lto_balanced_map): Update.
1581 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1582 set_referenced_from_this_partition_p): Update.
1583 (lto_promote_cross_file_statics): Update.
1584
eab36a5a 15852012-08-12 Jan Hubicka <jh@suse.cz>
1586
1587 * lto-partition.c (set_referenced_from_other_partition_p,
1588 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1589 New functions.
1590 (lto_promote_cross_file_statics): Use them.
1591
02b699d5 15922012-07-24 Jan Hubicka <jh@suse.cz>
1593
1594 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1595
a5656b73 15962012-07-24 Uros Bizjak <ubizjak@gmail.com>
1597
1598 * lto-tree.h (lang_decl): Add variable_size GTY option.
1599
b9ed1410 16002012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1601
1602 * lto.c: Do not include timevar.h.
1603 * Make-lang.in: Fix dependencies.
1604
161121a9 16052012-06-18 Lawrence Crowl <crowl@google.com>
1606
1607 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1608 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1609 to lto_wpa_write_files.
1610 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1611 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1612 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1613 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1614 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1615 to be a front end, but is not one.
1616
18a71d50 16172012-05-18 Jan Hubicka <jh@suse.cz>
1618
1619 * lto.c (lto_materialize_constructors_and_inits): Remove.
1620 (read_cgraph_and_symbols): Remove handling of alias pairs.
1621
aa419a52 16222012-05-17 Jan Hubicka <jh@suse.cz>
1623
1624 * lto-partition.c (add_references_to_partition): Handle external vars.
1625 (partition_varpool_node_p): Likewise.
1626 (lto_promote_cross_file_statics): Do not promote externals.
1627
258a168d 16282012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1629
1630 * lto-lang.c (handle_fnspec_attribute): New static function.
1631 (lto_attribute_table): Add "fn spec".
1632 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1633
3d1c0354 16342012-05-04 Jan Hubicka <jh@suse.cz>
1635
1636 * lto.c (do_whole_program_analysis): Set timevars correctly.
1637 (lto_main): Likewise.
258a168d 1638
596c40fb 16392012-05-04 Richard Guenther <rguenther@suse.de>
1640
1641 * lang.opt (fwpa): Do not mark as Optimization.
1642 (fltrans): Likewise.
1643
cf951b1a 16442012-04-30 Jan Hubicka <jh@suse.cz>
1645
1646 * lto.c (lto_main): Use compile ().
596c40fb 1647 * lto-partition.c (partition_cgraph_node_p): Use
1648 symtab_used_from_object_file_p.
cf951b1a 1649 (partition_varpool_node_p): Likewise.
1650
8efa224a 16512012-04-20 Jan Hubicka <jh@suse.cz>
1652
1653 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1654
04ec15fa 16552012-04-18 Jan Hubicka <jh@suse.cz>
1656
1657 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1658 Update for new ipa-ref API.
1659
7c455d87 16602012-04-16 Jan Hubicka <jh@suse.cz>
1661
1662 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1663 walkers to walk cgraph and varpool.
1664 (materialize_cgraph): Likewise.
1665 * lto-partition.c (lto_1_to_1_map): Likewise.
1666 (lto_balanced_map): Likewise.
1667 (lto_promote_cross_file_statics): Likewise.
1668
7d0d0ce1 16692012-04-14 Jan Hubicka <jh@suse.cz>
1670
1671 * lto.c: Update field referenced for new cgraph/varpool layout.
1672 * lto-partition.c: Likewise.
1673
50ed40f5 16742012-04-11 Jan Hubicka <jh@suse.cz>
1675
1676 * lto.c: Update copyright; remove params.h, ipa-inline.h
1677 and ipa-utils.h inlines; inline lto-partition.h
1678 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1679 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1680 add_references_to_partition, add_cgraph_node_to_partition_1,
1681 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1682 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1683 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1684 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1685 * lto-partition.c: ... here; new file.
1686 * lto-partition.h: New file.
1687 * Make-lang.in (lto.o): Update dependencies.
1688 (lto-partition.o): New.
1689
37e77161 16902012-04-05 Richard Guenther <rguenther@suse.de>
1691
1692 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1693 definition.
1694
a51edb4c 16952012-03-12 Richard Guenther <rguenther@suse.de>
1696
1697 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1698
90f56810 16992012-03-06 Richard Guenther <rguenther@suse.de>
1700
1701 PR lto/52097
1702 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1703
ff56be02 17042012-02-28 Richard Guenther <rguenther@suse.de>
1705
1706 PR lto/52400
1707 * lto.c (lto_register_function_decl_in_symtab): Do not register
1708 a reverse renamed decl mapping.
1709
3affb5a8 17102012-01-06 Jakub Jelinek <jakub@redhat.com>
1711
1712 PR lto/51774
1713 * lto-lang.c (handle_returns_twice_attribute): New function.
1714 (lto_attribute_table): Add returns_twice attribute.
1715
a7a11a02 17162011-12-21 Richard Guenther <rguenther@suse.de>
1717
1718 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1719 (LTO_FIXUP_TREE): Use it.
1720 (uniquify_nodes): Mark new non-prevailing types and avoid
1721 calling gimple_register_type on others.
1722 (lto_read_decls): Add comment.
1723
949e5786 17242011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1725
1726 * lto.h (lto_parse_hex): Delete.
1727 * lto.c (lto_read_decls): Use 'int' for offsets.
1728 (lto_parse_hex): Make static and return proper 64-bit host type.
1729 (lto_resolution_read): Use proper 64-bit host type.
1730
6cd6787c 17312011-12-13 Richard Guenther <rguenther@suse.de>
1732
1733 PR lto/48354
1734 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1735 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1736
c8c597a7 17372011-12-01 Uros Bizjak <ubizjak@gmail.com>
1738
1739 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1740 (ignore_attribute): New.
1741
ea0e88d1 17422011-11-21 Aldy Hernandez <aldyh@redhat.com>
1743
1744 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1745 (handle_transaction_pure_attribute): New.
1746
954825c9 17472011-11-03 Richard Guenther <rguenther@suse.de>
1748
1749 PR lto/44965
1750 * lto-lang.c (lto_post_options): Do not read file options.
1751 * lto.c (lto_read_all_file_options): Remove.
1752 (lto_init): Call lto_set_in_hooks here.
1753
bc2cc717 17542011-10-09 Jan Hubicka <jh@suse.cz>
1755
1756 * lto.c (node_cmp, varpool_node_cmp): New functions.
1757 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1758 (cmp_partitions): Rename to ...
1759 (cmp_partitions_size): ... this one.
1760 (cmp_partitions_order): New function.
1761 (lto_wpa_write_files): Sort partitions by order when
1762 -fno-toplevel-reorder is used.
1763
a5f12044 17642011-10-09 Andi Kleen <ak@linux.intel.com>
1765
1766 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1767
b9a16870 17682011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1769
1770 * lto-lang.c (def_builtin_1): Delete old interface with two
1771 parallel arrays to hold standard builtin declarations, and replace
1772 it with a function based interface that can support creating
1773 builtins on the fly in the future. Change all uses, and poison
1774 the old names. Make sure 0 is not a legitimate builtin index.
1775
21ebaa24 17762011-10-02 Andi Kleen <ak@linux.intel.com>
805389b2 1777
1778 * lto-object.c (lto_obj_add_section_data): Add list.
1779 (lto_obj_add_section): Fill in list.
1780 (ltoobj_build_section_table): Pass through list.
1781 * lto.c (file_data_list): Declare.
1782 (create_subid_section_table): Pass arguments directly.
1783 Fill in list of file_datas.
1784 (lwstate): Delete.
1785 (lto_create_files_from_ids): Pass in direct arguments.
1786 Don't maintain list.
1787 (lto_file_read): Use explicit section and file data lists.
1788 (lto_read_all_file_options): Pass in section_list.
1789 * lto.h (lto_obj_build_section_table): Add list.
1790 (lto_section_slot): Add next.
1791 (lto_section_list): Declare.
1792
da722561 17932011-10-02 Jan Hubicka <jh@suse.cz>
1794
1795 PR lto/47247
1796 * common.c (lto_resolution_str): Add new resolution.
1797 * common.h (lto_resolution_str): Likewise.
1798
15c58191 17992011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1800 Andi Kleen <ak@linux.intel.com>
1801
1802 PR lto/50568
1803 * lto.c (lto_splay_tree_delete_id): New.
1804 (lto_splay_tree_compare_ids): Likewise.
1805 (lto_splay_tree_lookup): Likewise.
1806 (lto_splay_tree_id_equal_p): Likewise.
1807 (lto_splay_tree_insert): Likewise.
1808 (lto_splay_tree_new): Likewise.
1809 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1810 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1811 (create_subid_section_table): Use lto_splay_tree_lookup and
1812 lto_splay_tree_insert.
1813 (lto_file_read): Use lto_splay_tree_new.
1814
21ebaa24 18152011-09-26 Andi Kleen <ak@linux.intel.com>
badc6cfa 1816
1817 * lto.c (lto_resolution_read): Remove id dumping.
1818 (lto_section_with_id): Turn id HOST_WIDE_ID.
1819 (create_subid_section_table): Dito.
1820
1dc92c59 18212011-08-28 Dodji Seketeli <dodji@redhat.com>
1822
1823 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1824 linemap_add twice.
1825
b6c200c3 18262011-08-11 Martin Jambor <mjambor@suse.cz>
1827
1828 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1829
2541503d 18302011-08-08 Diego Novillo <dnovillo@google.com>
1831
1832 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1833 * lto.c: Include tree-streamer.h.
1834
c38a75b7 18352011-07-06 Richard Guenther <rguenther@suse.de>
1836
1837 * lto-lang.c (lto_init):
1838 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1839
e71f2f1c 18402011-06-11 Jan Hubicka <jh@suse.cz>
1841
ac11d294 1842 PR lto/48246
e71f2f1c 1843 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1844 (lto_balanced_map): Likewise.
1845
c70f46b0 18462011-06-11 Jan Hubicka <jh@suse.cz>
1847
1848 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1849 (add_cgraph_node_to_partition) ... here; walk aliases.
1850 (lto_1_to_1_map): Remove same body alias code.
1851 (promote_fn): Likewise.
1852 (lto_promote_cross_file_statics): Update comment.
1853
1854
bbcef2a7 18552011-06-07 Diego Novillo <dnovillo@google.com>
1856
1857 * lto.c (uniquify_nodes): Move code to register decls to
1858 the loop that computes canonical types.
1859
1af0124d 18602011-06-07 Richard Guenther <rguenther@suse.de>
1861
1862 * lto-lang.c (lto_init): Do not set
1863 size_type_node or call set_sizetype.
1864
a0605d65 18652011-06-04 Diego Novillo <dnovillo@google.com>
1866
1867 * lto.c (lto_init): New.
1868 (lto_main): Call it.
1869
f05c9dfb 18702011-06-03 Diego Novillo <dnovillo@google.com>
1871
1872 * lto.c (get_resolution): Move from lto-streamer-in.c.
1873 (lto_register_var_decl_in_symtab): Likewise.
1874 (lto_register_function_decl_in_symtab): Likewise.
1875 (uniquify_nodes): Call lto_register_var_decl and
1876 lto_register_function_decl_in_symtab after reading a new
1877 VAR_DECL or FUNCTION_DECL.
1878
ed61b909 18792011-06-01 Richard Guenther <rguenther@suse.de>
1880
1881 * lto-lang.c (lto_register_canonical_types): New function.
1882 (lto_init): Register common nodes with the canonical type machinery.
1883 Do not play tricks with char_type_node.
1884
8f2b914f 18852011-05-26 Richard Guenther <rguenther@suse.de>
1886
1887 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1888
1e184c62 18892011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1890
1891 * lto.c (lto_ft_typed): New function.
1892 (lto_ft_common): Call it.
1893 (lto_ft_constructor): Likewise.
1894 (lto_ft_expr): Likewise.
1895 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1896 TREE_CHAIN.
1897
4d83607a 18982011-05-20 Richard Guenther <rguenther@suse.de>
1899
1900 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1901 (lto_ft_type): Move main-variant and pointer-to chain building ...
1902 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1903 in a separate final loop.
1904
bddb3763 19052011-05-19 Richard Guenther <rguenther@suse.de>
1906
1907 * lto.c (uniquify_nodes): First register all types before
1908 fixing up the tree SCC.
1909
c6641d23 19102011-05-11 Jan Hubicka <jh@suse.cz>
1911
1912 PR lto/48952
1913 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1914
8f2eb9e1 19152011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1916
1917 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1918 location of binfo field.
1919 (lto_fixup_prevailing_decls): Likewise.
1920
3a939d12 19212011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1922
1923 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1924 build_function_type_array or build_varargs_function_type_array
1925 instead.
1926
1d2bb655 19272011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1928
1929 * lto-lang.c (global_bindings_p): Return bool.
1930
91bf9d9a 19312011-05-07 Jan Hubicka <jh@suse.cz>
1932
56bef313 1933 * lto.c (lto_materialize_function): Use
1934 cgraph_function_with_gimple_body_p.
1935 (add_cgraph_node_to_partition): Do not re-add items to partition;
1936 handle thunks.
91bf9d9a 1937 (add_varpool_node_to_partition): Do not re-add items to partition.
1938
423ba805 19392011-05-03 Jan Hubicka <jh@suse.cz>
1940
1941 * lto.c (free_ltrans_partitions): Fix accidental commit.
1942
19ad01f7 19432011-05-03 Jan Hubicka <jh@suse.cz>
1944
1945 * lto.c (ltrans_partition_def): Remove GTY annotations.
1946 (ltrans_partitions): Move to heap.
1947 (new_partition): Update.
1948 (free_ltrans_partitions): New function.
1949 (lto_wpa_write_files): Use it.
1950
7771d558 19512011-04-29 Martin Jambor <mjambor@suse.cz>
1952
1953 * lto.c: Include ipa-utils.h.
1954 (lto_balanced_map): Update call to ipa_reverse_postorder.
1955 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1956
d534cab0 19572011-04-29 Michael Matz <matz@suse.de>
1958
1959 * lto.c (toplevel): Include tree-flow.h.
1960 (lto_read_in_decl_state): Don't merge types here.
1961 (tree_with_vars): New static hash table.
1962 (remember_with_vars): New static functions.
1963 (LTO_FIXUP_TYPE): New macro.
1964 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1965 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1966 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1967 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1968 (lto_read_decls): Uniquify while reading in trees.
1969 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1970 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1971 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1972 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1973 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1974 lto_fixup_tree): Remove.
1975 (lto_fixup_state): Remove data argument. Use
1976 lto_symtab_prevailing_decl.
1977 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1978 (lto_fixup_prevailing_decls): New function.
1979 (lto_fixup_state_aux): Argument aux is unused.
1980 (lto_fixup_decls): Don't allocate pointer sets, don't use
1981 lto_fixup_tree, use lto_fixup_prevailing_decls.
1982 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1983 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1984
b630a10e 19852011-04-16 Eric Botcazou <ebotcazou@adacore.com>
1986
1987 * lto.c (lto_balanced_map): Fix typos in head comment.
1988 (lto_promote_cross_file_statics): Fix long lines and remove redundant
1989 test.
1990
cbd7f5a0 19912011-04-16 Jan Hubicka <jh@suse.cz>
1992
1993 * lto.c (lto_balanced_map): Update.
1994
c7b2cc59 19952011-04-14 Jan Hubicka <jh@suse.cz>
1996
1997 * lto.c: Include ipa-inline.h
b630a10e 1998 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
1999 accessor.
c7b2cc59 2000 (ipa_node_duplication_hook): Fix declaration.
2001 * Make-lang.in (lto.o): Update dependencies.
2002
9b88d08d 20032011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2004
2005 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2006 calling TREE_CHAIN.
2007 * lto.c (lto_fixup_common): Likewise.
2008
c33080b9 20092011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2010
2011 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2012 (handle_type_generic_attribute): Likewise.
2013
5cd33168 20142011-04-03 Michael Matz <matz@suse.de>
2015
2016 * lto.c (lto_materialize_function): Don't read and then discard
2017 sections in WPA mode.
2018 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2019
2020 * lto-lang.c (registered_builtin_fndecls): Remove.
2021 (lto_getdecls): Return NULL_TREE.
2022 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2023
d45127a1 20242011-03-31 Richard Guenther <rguenther@suse.de>
2025
2026 PR lto/48246
2027 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2028 partitions when checking is not enabled.
2029
82715bcd 20302011-03-25 Kai Tietz <ktietz@redhat.com>
2031
2032 * lto.c (lto_resolution_read): Use filename_cmp instead
2033 of strcmp.
2034 (lto_read_section_data): Likewise.
2035
451c8e2f 20362011-03-25 Jeff Law <law@redhat.com>
2037
2038 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2039
ac86af5d 20402011-03-21 Kai Tietz <ktietz@redhat.com>
2041
2042 PR target/12171
2043 * lto-lang.c (lto_attribute_table): Adjust table.
2044
5a8834a5 20452011-02-18 Jakub Jelinek <jakub@redhat.com>
2046
2047 PR bootstrap/47807
2048 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2049 of lto-streamer.h.
2050
30865946 20512011-02-18 Richard Guenther <rguenther@suse.de>
2052
2053 PR lto/47798
2054 * lto-tree.h (lto_global_var_decls): Do not declare here.
2055 * lto-lang.c: Include lto-streamer.h.
2056 * Make-lang.in (lto-lang.o): Adjust dependencies.
2057
fad71d4f 20582011-02-10 Kai Tietz <kai.tietz@onevision.com>
2059
2060 PR lto/47241
2061 * lto.c (lto_read_section_data): Free
2062 fd_name in failure case.
2063 For mingw targets don't hash file-descriptor.
2064 (read_cgraph_and_symbols): Close current_lto_file
2065 in failure case.
2066
232c9ac7 20672011-01-11 Jan Hubicka <jh@suse.cz>
2068
2069 PR lto/45721
2070 PR lto/45375
b630a10e 2071 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2072 are not partitioned.
232c9ac7 2073
a36cf284 20742010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2075
2076 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2077 Use prototype_p.
2078
6abc14d6 20792010-12-06 Richard Guenther <rguenther@suse.de>
2080
2081 PR lto/46796
2082 * lto-lang.c (lto_init): Give names to basic types.
2083
b96c136c 20842010-11-30 Joseph Myers <joseph@codesourcery.com>
2085
2086 * lto-object.c: Don't include toplev.h.
2087 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2088
92468061 20892010-11-30 Joseph Myers <joseph@codesourcery.com>
2090
2091 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2092 $(TOPLEV_H).
2093
967958e4 20942010-11-29 Joseph Myers <joseph@codesourcery.com>
2095
2096 * lto-endian.h: Delete.
2097 * lto-object.c: Don't include "libiberty.h".
2098 (O_BINARY): Don't define.
2099 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2100 (O_BINARY): Don't define.
2101
baa6eec4 21022010-11-23 Richard Guenther <rguenther@suse.de>
2103
2104 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2105
4f3aea0d 21062010-11-23 Richard Guenther <rguenther@suse.de>
2107
2108 PR lto/46605
2109 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2110
b8ba44e7 21112010-11-17 Joseph Myers <joseph@codesourcery.com>
2112
2113 * lto.c (lto_main): Take no arguments.
2114 * lto.h (lto_main): Update prototype.
2115
2e521e13 21162010-11-16 Ian Lance Taylor <iant@google.com>
2117
2118 * lto-object.c (lto_obj_file_open): Call
2119 simple_object_attributes_merge rather than
2120 simple_object_attributes_compare.
2121
3c6c0e40 21222010-11-12 Joseph Myers <joseph@codesourcery.com>
2123
2124 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2125 * lto-lang.c (lto_handle_option): Take location_t parameter.
2126
bf776685 21272010-11-10 Joseph Myers <joseph@codesourcery.com>
2128
2129 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2130 letters and remove trailing '.'.
2131 (lto_file_finalize): Start diagnostic with a lowercase letter.
2132
e09108e1 21332010-11-02 Ian Lance Taylor <iant@google.com>
2134
2135 * lto-object.c: New file.
2136 * lto-elf.c: Remove file.
2137 * lto-macho.c: Remove file.
2138 * lto-macho.h: Remove file.
2139 * lto-coff.c: Remove file.
2140 * lto-coff.h: Remove file.
2141 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2142 lto/lto-object.o.
2143 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2144 (lto/lto-objfile.o): New target.
2145 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2146 (lto/lto.o): Remove $(LIBIBERTY_H).
2147
4037a4c1 21482010-10-22 Jan Hubicka <jh@suse.cz>
2149
2150 * lto.c (add_cgraph_node_to_partition,
2151 add_varpool_node_to_partition): Add debug info.
2152 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2153 partitioned nodes.
2154 (do_whole_program_analysis): Set function flags before dumping.
2155
7a3ccc3b 21562010-10-22 Richard Guenther <rguenther@suse.de>
2157
2158 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2159 the new gimple_register_canonical_type.
2160
55e9d7d7 21612010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2162
2163 PR bootstrap/45954
2164 * config-lang.in (boot_language): Set to $enable_lto.
2165
d63880ad 21662010-10-18 Jakub Jelinek <jakub@redhat.com>
2167
2168 PR lto/45638
2169 * Make-lang.in (check-lto): New dummy target.
2170
8e8e1ee7 21712010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2172
2173 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2174
f3f006ad 21752010-10-08 Joseph Myers <joseph@codesourcery.com>
2176
2177 * lto-lang.c (lto_init_options): Change to
2178 lto_init_options_struct. Update parameters.
2179 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2180 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2181
1e52cb3c 21822010-10-06 Jan Hubicka <jh@suse.cz>
2183
2184 * lto.c (lto_balanced_map): Fix accounting of program size.
2185
11da9120 21862010-10-06 Jan Hubicka <jh@suse.cz>
2187
2188 * lto.c (lto_balanced_map): Do not produce empty partitions.
2189
21ebaa24 21902010-10-06 Andi Kleen <ak@linux.intel.com>
a3de1f55 2191
2192 * lto.c (lto_process_name): Add.
2193 (lto_main): Call lto_process_name.
2194
7ad28d2a 21952010-10-06 Jan Hubicka <jh@suse.cz>
2196
2197 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2198 COMDATs required by the linker.
2199
eaa13879 22002010-10-05 Ian Lance Taylor <iant@google.com>
2201
2202 * lto.c (lto_section_with_id): Make s a const pointer.
2203
48e3ea52 22042010-10-05 Jan Hubicka <jh@suse.cz>
2205
2206 * lto.c: Include params.h.
2207 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2208 refcounting in aux field.
2209 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2210 New functions.
2211 (lto_1_to_1_map): Simplify.
2212 (lto_balanced_map): New function.
2213 (do_whole_program_analysis): Chose proper partitioning alg.
2214 * Make-lang.in (lto.o): Add dependency on params.h
2215
21ebaa24 22162010-10-04 Andi Kleen <ak@linux.intel.com>
70293f47 2217
2218 * Make-lang.in (lto1): Add + to build rule.
2219
21ebaa24 22202010-10-03 Andi Kleen <ak@linux.intel.com>
fd30d60a 2221
2222 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2223 with fatal_error.
2224
4a68fd3c 22252010-09-28 Jan Hubicka <jh@suse.cz>
2226
2227 * lto-lang.c (handle_leaf_attribute): New function.
2228 (lto_attribute_tables): Add leaf.
2229
2edfba82 22302010-09-25 Jie Zhang <jie@codesourcery.com>
2231
2232 * lto.c (lto_read_all_file_options): Start a new line after
2233 printing out file names.
2234
9ced88d0 22352010-09-24 Jan Hubicka <jh@suse.cz>
2236
2237 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2238
7ae8b539 22392010-09-20 Jan Hubicka <jh@suse.cz>
2240
2241 PR tree-optimize/45605
2242 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2243
be1a554f 22442010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2245
2246 * lto-elf.c (lto_obj_file_open): Also provide filename when
2247 elf_begin fails.
2248
7de998de 22492010-09-17 Jan Hubicka <jh@suse.cz>
2250
2251 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2252
78d063c8 22532010-09-17 Richard Guenther <rguenther@suse.de>
2254
2255 * lang.opt (flag_wpa): Also enable for the driver.
2256
cdc58a66 22572010-09-16 Jan Hubicka <jh@suse.cz>
2258
2259 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2260 EXTERNAL flags.
2261
7b80d28f 22622010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2263
2264 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2265
3210ebe5 22662010-09-08 Jan Hubicka <jh@suse.cz>
2267
2268 * lto.c (real_file_count, real_file_decl_data): New static vars.
2269 (read_cgraph_and_symbols): Use it.
2270
7a52b640 22712010-09-08 Richard Guenther <rguenther@suse.de>
2272
2273 * lto.c (read_cgraph_and_symbols): Collect again after each
2274 file.
2275
be147e7f 22762010-09-07 Jan Hubicka <jh@suse.cz>
2277
2278 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2279
56c34a25 22802010-09-03 Richard Guenther <rguenther@suse.de>
2281
2282 * lto-elf.c (validate_file): Always error if validation fails.
2283
c5cc4842 22842010-08-20 Jan Hubicka <jh@suse.cz>
2285
2286 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2287 (lto_wpa_write_files): Update comments.
2288
9543655f 22892010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2290
2291 PR bootstrap/45357
2292 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2293 with has_analyzed_clone_p.
2294
97b862d3 22952010-08-20 Jan Hubicka <jh@suse.cz>
2296
2297 * lto.c (has_analyzed_clone_p): New function
2298 (lto_materialize_function): Use callgraph to determine if
2299 body is needed.
2300 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2301
48148244 23022010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2303
2304 * lto.c: Use FOR_EACH_VEC_ELT.
2305
21ebaa24 23062010-07-27 Andi Kleen <ak@linux.intel.com>
eb219e9c 2307
2308 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2309
b78351e5 23102010-07-27 Joseph Myers <joseph@codesourcery.com>
2311
2312 * lto-lang.c (lto_handle_option): Update prototype and return
2313 value type. Remove duplicate assignment to result.
2314
e88d34f6 23152010-07-27 Joseph Myers <joseph@codesourcery.com>
2316
2317 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2318 New.
2319 (lto_init_options): Update prototype.
2320 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2321 Define.
2322
21ebaa24 23232010-07-10 Andi Kleen <ak@linux.intel.com>
f18bad33 2324
2325 PR lto/44992
2326 * lto.c: Include splay-tree.h
2327 (lto_resolution_read): Change to walk file_ids tree and parse
2328 extra file_id in resolution file.
2329 (lto_section_with_id): Add.
2330 (create_subid_section_table): Add.
2331 (lwstate): Add.
2332 (lto_create_files_from_ids): Add.
2333 (lto_file_read): Change to handle sub file ids and create list
2334 of file_datas. Add output argument for count.
2335 (get_section_data): Pass file_data to lto_get_section_name.
2336 (lto_flatten_file): Add.
2337 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2338
21ebaa24 23392010-07-10 Andi Kleen <ak@linux.intel.com>
58d9117a 2340
2341 * lto-coff.c (hash_name, eq_name): Move.
2342 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2343 * lto-elf.c: (hash_name, eq_name): Move.
2344 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2345 * lto-macho.c: (hash_name, eq_name): Move.
2346 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2347 * lto.c: (hash_name, eq_name): Move from lto-*.c
2348 (lto_obj_create_section_hash_table): Add.
2349 (free_with_string): Add.
2350
0b205f4c 23512010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2352
2353 * lto-coff.c: Include diagnostic-core.h in every file that
2354 includes toplev.h.
2355 * lto-elf.c: Likewise.
2356 * lto-lang.c: Likewise.
2357 * lto-macho.c: Likewise.
2358
9dccd5de 23592010-07-07 Jakub Jelinek <jakub@redhat.com>
2360
2361 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2362 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2363 objects.
2364
7550e1d1 23652010-07-05 Jan Hubicka <jh@suse.cz>
2366
2367 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2368 nodes from same comdat group as well as all comdat functions referenced
2369 here.
b630a10e 2370 (add_varpool_node_to_partition, add_references_to_partition): New
2371 function.
2372 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2373 add_varpool_node_to_partition; clear aux flags when done.
2374 (lto_promote_cross_file_statics): Do not promote stuff that gets
2375 duplicated to each ltrans.
7550e1d1 2376
01ec0a6c 23772010-07-04 Jan Hubicka <jh@suse.cz>
2378
2379 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2380
09eb10ed 23812010-06-13 Richard Guenther <rguenther@suse.de>
2382
2383 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2384
6c8c5385 23852010-06-09 Kai Tietz <kai.tietz@onevision.com>
2386
2387 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2388 * lto-coff.c (coff_write_object_file): Add braces to if.
2389
ba72912a 23902010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2391
2392 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2393 (lto_file_read): Likewise.
2394 (new_partition): Likewise.
2395 (read_cgraph_and_symbols): Likewise.
2396
4aafe913 23972010-06-07 Joseph Myers <joseph@codesourcery.com>
2398
2399 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2400 (lto_handle_option): Don't set flag_signed_char here.
2401
fab8a209 24022010-06-04 Richard Guenther <rguenther@suse.de>
2403
2404 PR lto/41584
2405 * lto.c (lto_1_to_1_map): Use the proper file_data for
2406 varpool nodes.
2407
ecb08119 24082010-05-30 Jan Hubicka <jh@suse.cz>
2409
2410 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2411 partitioning decisions.
2412
68b8d829 24132010-05-29 Jan Hubicka <jh@suse.cz>
2414
2415 * lto.c (bitmap vector): Remove.
2416 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2417 (ltrans_partition_def): New structure.
2418 (ltrans_partition): New type and VECtor.
2419 (new_partition): New function.
2420 (add_cgraph_node_to_partition): New function.
2421 (lto_1_to_1_map): Reorganize for partitions.
2422 (lto_add_inline_clones): Remove.
2423 (lto_add_all_inlinees): Remove.
2424 (lto_promote_cross_file_statics): Use partitions.
2425 (cmp_partitions): New function.
2426 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2427 use partitions; output files sorted by size.
2428
ea269688 24292010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2430
2431 * Make-lang.in: Replace vec.h dependency with VEC_H.
2432
8fb69344 24332010-05-28 Joseph Myers <joseph@codesourcery.com>
2434
2435 * lto-coff.c (coff_errmsg): Remove.
2436 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2437 errors instead of coff_errmsg (-1).
2438 * lto-macho.c (mach_o_errmsg): Remove.
2439 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2440 instead of mach_o_errmsg (-1).
2441 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2442 xstrerror (errno).
2443
2024fa7d 24442010-05-28 Richard Guenther <rguenther@suse.de>
2445
2446 * lto.c (prefix_name_with_star): Removed.
2447 (strip_extension): Likewise.
2448 (get_filename_for_set): Likewise.
2449 (lto_write_ltrans_list): Fold into ...
2450 (lto_wpa_write_files): ... this. Name LTRANS units
2451 by suffixing the ltrans output list filename.
2452 (do_whole_program_analysis): Adjust.
2453
852f689e 24542010-05-27 Joseph Myers <joseph@codesourcery.com>
2455
2456 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2457 (read_cgraph_and_symbols, lto_main): Use seen_error.
2458 * Make-lang.in (lto/lto.o): Update dependencies.
2459
3c9e9cba 24602010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2461
2462 PR lto/44230
2463 * lto.h (lto_eh_personality): New prototype.
2464 * lto.c: Include debug.h.
2465 (first_personality_decl): New static variable.
2466 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2467 first function for which it is non-null.
2468 (lto_eh_personality_decl): New static variable.
2469 (lto_eh_personality): New function.
2470 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2471 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2472
cdd0ea37 24732010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2474
2475 * lto-lang.c: Do not include expr.h.
2476
71eb351d 24772010-05-24 Richard Guenther <rguenther@suse.de>
2478
2479 * lto-elf.c (lto_obj_build_section_table): Work around
2480 FreeBSD libelf issue.
2481
ca3e35a1 24822010-05-22 Richard Guenther <rguenther@suse.de>
2483
2484 * lto.c (read_cgraph_and_symbols): Do not collect.
2485
e5507c85 24862010-05-20 Jan Hubicka <jh@suse.cz>
2487
2488 * lto.c (promote_var, promote_fn): New functions.
2489 (lto_promote_cross_file_statics): Compute correctly boundary including
2490 static initializers of readonly vars.
2491
a510bd8d 24922010-05-18 Jan Hubicka <jh@suse.cz>
2493
e5507c85 2494 * lto.c (lto_1_to_1_map): Partition non-inline clones.
a510bd8d 2495 (lto_promote_cross_file_statics): Deal with non-inline clones.
2496
1375c6f8 24972010-05-18 Jan Hubicka <jh@suse.cz>
2498
2499 * lto.c (lto_materialize_function): Announce function when
2500 reading body; allocate_struct_function only when reading body;
2501 do not finalize local statics; ggc_collect after reading;
2502 do not mark reachable node.
2503 (materialize_cgraph): Do not announce function.
2504
757a3237 25052010-05-11 Jan Hubicka <jh@suse.cz>
2506
2507 * lto.c (materialize_cgraph): Revert my previous patch.
2508
942dc465 25092010-05-11 Kai Tietz <kai.tietz@onevision.com>
2510
2511 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2512 IMAGE_FILE_MACHINE_AMD64.
2513 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2514
b4c8770a 25152010-05-11 Jan Hubicka <jh@suse.cz>
2516
2517 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2518 (materialize_cgraph): Add it here.
2519
25429dc2 25202010-05-11 Jan Hubicka <jh@suse.cz>
2521
2522 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2523 vector.
2524
25252010-05-11 Jan Hubicka <jh@suse.cz>
2526
2527 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2528 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2529 use reachable_from_other_partition_p and
2530 referenced_from_other_partition_p test.
2531
6dd40464 25322010-05-11 Kai Tietz <kai.tietz@onevision.com>
2533
2534 * lto-coff.c (validate_file): Add x64-coff support.
2535 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2536 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2537 * lto-lang.c (lto_build_c_type_nodes): Add check for
2538 'long long unsigned int' for x64-windows.
2539 (lto_init): Likewise.
2540
2541
23433d72 25422010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2543
2544 * lto.h (struct lto_file_struct): Document offset member.
2545 * lto-endian.h: New file.
2546 * lto-macho.h: New file.
2547 * lto-macho.c: New file.
2548 * Make-lang.in: Add rule for lto-macho.o.
2549
eb4ef3d1 25502010-05-07 Richard Guenther <rguenther@suse.de>
2551
2552 PR lto/43857
2553 PR lto/43371
2554 * lang.opt (fresolution): Change to ...
2555 (fresolution=): ... this.
2556 * lto-lang.c (lto_handle_option): Adjust.
2557
264cbb51 25582010-05-07 Richard Guenther <rguenther@suse.de>
2559
2560 * lto.c (DUMPBASE_SUFFIX): Remove.
2561 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2562 Rename to ...
2563 (lto_write_ltrans_list): ... only output the list of ltrans files.
2564 (lto_maybe_unlink): Remove.
2565 (do_whole_program_analysis): Do not execute LTRANS phase
2566 from here.
2567
11dc3713 25682010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2569
2570 * lto-lang.c (lto_handle_option): Add argument kind.
2571
8d810329 25722010-05-05 Jan Hubicka <jh@suse.cz>
2573
264cbb51 2574 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2575 refs.
8d810329 2576
a238367f 25772010-05-05 Jan Hubicka <jh@suse.cz>
2578
2579 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2580
bf7d782b 25812010-04-30 Jan Hubicka <jh@suse.cz>
2582
b630a10e 2583 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2584 use default name.
bf7d782b 2585 (lto_wpa_write_files): Write any non-empty partition.
2586
da67d826 25872010-04-30 Jan Hubicka <jh@suse.cz>
2588
2589 * lto.c: Do not attempt to make constant pool references global.
2590
57305941 25912010-04-28 Jan Hubicka <jh@suse.cz>
2592
2593 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2594 (lto_wpa_write_files): Announce what we are writting.
2595 (all_file_decl_data): New.
2596 (read_cgraph_and_symbols): Use GGC; correct timevars.
2597 (do_whole_program_analysis): Collect.
2598 * lto/Make-lang.in (lto.o): Fix dependency.
2599 * Makefile.in (GTFILES): Add lto-streamer.h.
2600 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2601 (varpool_assemble_pending_decls): Use VAROUT.
2602 * lto-streamer.h (lto_tree_ref_table): Annotate.
2603 (lto_in_decl_state): Annotate.
2604 (lto_file_decl_data): Annotate.
2605
0cddb138 26062010-04-28 Jan Hubicka <jh@suse.cz>
2607
2608 * lto.c (lto_varpool_node_sets): New.
2609 (lto_1_to_1_map): Partition varpool too.
2610 (globalize_context_t, globalize_cross_file_statics,
2611 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2612 lto_scan_statics_in_remaining_global_vars): Remove.
2613 (lto_promote_cross_file_statics): Rewrite.
2614 (get_filename_for_set): Take vset argument.
2615 (lto_wpa_write_files): Pass around vsets.
2616
4d992eb6 26172010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2618
2619 PR lto/42776
2620 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2621 hardcoding 'lto-elf.o'.
2622 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2623
2624 * lto-coff.h: New file.
2625 * lto-coff.c: Likewise.
2626
9c491711 26272010-04-26 Richard Guenther <rguenther@suse.de>
2628
2629 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2630
3ba0ce47 26312010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2632
2633 * lto.h (lto_elf_file_open): Rename prototype from this ...
2634 (lto_obj_file_open): ... to this.
2635 (lto_elf_file_close): Likewise ...
2636 (lto_obj_file_close): ... and likewise.
2637 (lto_elf_build_section_table): Likewise ...
2638 (lto_obj_build_section_table): ... and likewise.
2639 (lto_elf_begin_section): Likewise ...
2640 (lto_obj_begin_section): ... and likewise.
2641 (lto_elf_append_data): Likewise ...
2642 (lto_obj_append_data): ... and likewise.
2643 (lto_elf_end_section): Likewise ...
2644 (lto_obj_end_section): ... and likewise.
2645 * lto.c (lto_file_read): Update references to the above.
2646 (lto_wpa_write_files): Likewise.
2647 (lto_read_all_file_options): Likewise.
2648 (read_cgraph_and_symbols): Likewise.
2649 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2650 (LANG_HOOKS_APPEND_DATA): Likewise.
2651 (LANG_HOOKS_END_SECTION): Likewise.
2652 * lto-elf.c (lto_elf_file_open): Rename from this ...
2653 (lto_obj_file_open): ... to this, updating any references.
2654 (lto_elf_file_close): Likewise ...
2655 (lto_obj_file_close): ... and likewise.
2656 (lto_elf_build_section_table): Likewise ...
2657 (lto_obj_build_section_table): ... and likewise.
2658 (lto_elf_begin_section): Likewise ...
2659 (lto_obj_begin_section): ... and likewise.
2660 (lto_elf_append_data): Likewise ...
2661 (lto_obj_append_data): ... and likewise.
2662 (lto_elf_end_section): Likewise ...
2663 (lto_obj_end_section): ... and likewise.
2664
5a2aecd6 26652010-04-21 Jan Hubicka <jh@suse.cz>
2666
2667 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2668 (materialize_cgraph): Likewise.
2669
ddc90d88 26702010-04-21 Jan Hubicka <jh@suse.cz>
2671
2672 * lto.c (lto_wpa_write_files): Update.
2673 (read_cgraph_and_symbols): Be more verbose.
2674 (materialize_cgraph): Likewise.
2675 (do_whole_program_analysis): Likewise.
2676
e288c7a9 26772010-04-21 Jan Hubicka <jh@suse.cz>
2678
2679 * lto.c (globalize_cross_file_statics): When function has address taken,
2680 it needs to be public.
2681
08843223 26822010-04-20 Jan Hubicka <jh@suse.cz>
2683
2684 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2685 (lto_add_all_inlinees): Likewise.
2686 (lto_wpa_write_files): Likewise.
2687
ad086ed4 26882010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2689
2690 * lto-lang.c (lto_init): Remove second argument in call to
2691 build_common_tree_nodes.
2692
d6845139 26932010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2694
2695 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2696 function.
2697
a5813485 26982010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2699
2700 PR bootstrap/43276
2701 * lto-elf.c: Define EM_* constants if not already defined.
2702
a219f6a5 27032010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2704
2705 * lto-elf.c (is_compatible_architecture): New static function.
2706 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2707
2bd888dc 27082010-02-11 Richard Guenther <rguenther@suse.de>
2709
2710 PR driver/43021
2711 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2712 appropriately.
2713
27721832 27142010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2715
2716 * lto.c (O_BINARY): Define.
2717 (lto_read_section_data): Open file in binary mode.
2718 * lto-elf.c (O_BINARY): Define.
2719 (lto_elf_file_open): Open file in binary mode.
2720
3bfd70ae 27212010-01-08 Richard Guenther <rguenther@suse.de>
2722
2723 PR lto/42528
2724 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2725 (lto_init): Do not init char_type_node in a standard way
2726 but according to flag_signed_char.
2727
50ca7c37 27282010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2729
2730 PR lto/41564
2731 * lto.c (DUMPBASE_SUFFIX): New.
2732 (lto_execute_ltrans): Append a sequence number to -dumpbase
2733 for LTRANS.
2734
d5e86d20 27352010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2736
2737 PR lto/42580
2738 * lto-elf.c (lto_elf_file_open): Stop if the command line
2739 option file is missing.
2740
08a7e80f 27412009-12-15 Richard Guenther <rguenther@suse.de>
2742
2743 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2744 (lto_post_options): Do not disable debuginfo.
2745
4af4d09c 27462009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2747
2748 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2749
50b2dbd9 27502009-12-11 Richard Guenther <rguenther@suse.de>
2751
2752 PR lto/42037
2753 * lto.c (lto_resolution_read): Properly grow the vector.
2754
97e90c2e 27552009-12-11 Richard Guenther <rguenther@suse.de>
2756
2757 PR lto/41915
2758 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2759 to the C99 default. Do not set flag_unit_at_a_time.
2760
f018d957 27612009-11-28 Jakub Jelinek <jakub@redhat.com>
2762
2763 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2764 variable.
2765
81897669 27662009-11-19 Rafael Avila de Espindola <espindola@google.com>
2767
2768 PR bootstrap/42096
2769 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2770 * lto.c (lto_parse_hex): New.
2771 (lto_resolution_read): Use lto_parse_hex.
2772 * lto.h (lto_parse_hex): New.
2773
b7fedf62 27742009-11-17 Rafael Avila de Espindola <espindola@google.com>
2775
2776 * lto-elf.c (lto_file_init): Add offset argument.
2777 (lto_elf_file_open): Record the offset.
2778 * lto.c (lto_resolution_read): Change file_name into a lto_file
2779 argument. Check offsets.
2780 (lto_file_read): Update call to lto_resolution_read.
2781 * lto.h (lto_file_struct): Add the offset field.
2782
6575099f 27832009-11-16 Rafael Avila de Espindola <espindola@google.com>
2784
2785 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2786
6d1cc52c 27872009-11-14 Jan Hubicka <jh@suse.cz>
2788
2789 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2790
d405c5a4 27912009-11-12 Rafael Avila de Espindola <espindola@google.com>
2792
2793 * lang.opt (fresolution): Renamed from resolution.
2794 * lto-lang.c (lto_handle_option): Handle new option name.
2795 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2796
06b9e52b 27972009-11-04 Richard Guenther <rguenther@suse.de>
2798 Rafael Avila de Espindola <espindola@google.com>
2799
2800 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2801 (lto_elf_file_open): Handle offsets in arguments name@offest.
2802
f5a023c5 28032009-10-30 Richard Guenther <rguenther@suse.de>
2804
2805 PR lto/41858
2806 * lto.c (lto_file_read): Do not set file_data->fd.
2807 (lto_read_section_data): Use a single-entry file-descriptor cache.
2808 Do not check the result of xmalloc.
2809 (free_section_data): Do not use file_data->fd.
2810 (lto_read_all_file_options): Likewise.
2811
21ce3cc7 28122009-10-22 Richard Guenther <rguenther@suse.de>
2813
2814 * lto.c (lto_fixup_jump_functions): Remove.
2815 (lto_fixup_decls): Do not fixup jump functions.
2816 (read_cgraph_and_symbols): Schedule cgraph merging after
2817 summary reading. Schedule type and decl fixup before
2818 summary reading.
2819
5575303a 28202009-10-22 Richard Guenther <rguenther@suse.de>
2821
2822 * lto.c (lto_fixup_data_t): Remove free_list member.
2823 (lto_fixup_tree): Do not insert into free_list.
2824 (free_decl): Remove.
2825 (lto_fixup_decls): Remove free-list handling.
2826
8867b500 28272009-10-22 Jan Hubicka <jh@suse.cz>
2828
2829 * lto.c (lto_fixup_jump_functions): New function.
2830 (lto_fixup_decls): Use it.
2831
b787522e 28322009-10-16 Richard Guenther <rguenther@suse.de>
2833
2834 PR lto/41715
2835 * lto.c (lto_fixup_tree): Revert last change.
2836
bc0ed27c 28372009-10-14 Richard Guenther <rguenther@suse.de>
2838
2839 * lto.c (lto_fixup_tree): In case the prevailing decl is not
2840 compatible with the one we replace wrap it around a
2841 VIEW_CONVERT_EXPR.
2842
c515f146 28432009-10-09 Richard Guenther <rguenther@suse.de>
2844
2845 PR lto/41635
2846 PR lto/41636
2847 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2848 a file.
2849 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2850 (init_ehdr##BITS): Likewise.
2851
48cf7037 28522009-10-08 Joseph Myers <joseph@codesourcery.com>
2853
2854 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2855 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2856 diagnostics.
2857 * lto-lang.c (lto_post_options): Remove trailing "." from
2858 diagnostics.
2859
7366cbe7 28602009-10-08 Richard Guenther <rguenther@suse.de>
2861
2862 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2863 hash tables.
2864
7c3f71c3 28652009-10-07 Joseph Myers <joseph@codesourcery.com>
2866
2867 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2868
59dd4830 28692009-10-07 Jan Hubicka <jh@suse.cz>
2870
2871 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2872 ltrans stage; explain why this is needed and should not.
2873
fd193bcd 28742009-10-05 Richard Guenther <rguenther@suse.de>
2875
2876 PR lto/41552
2877 PR lto/41487
2878 * lto.c (lto_read_decls): Do not register deferred decls.
2879 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2880 until after reading the IPA summaries.
2881
7bfefa9d 28822009-10-02 Rafael Avila de Espindola <espindola@google.com>
2883
2884 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2885 (lto-lang.c): Don't include lto/common.h.
2886
28872009-10-02 Rafael Avila de Espindola <espindola@google.com>
2888
2889 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2890 (lto/common.o): Remove.
2891 * common.c: Remove.
2892 * common.h (lto_kind_str): Remove.
2893 (lto_visibility_str): Remove.
2894 (lto_resolution_str): Make it static.
2895
28962009-10-01 Diego Novillo <dnovillo@google.com>
2897
2898 * lto.c (lto_read_decls): Add comment.
2899 Call internal_error instead of gcc_assert.
2900 (lto_resolution_read): Likewise.
2901 (lto_add_all_inlinees): Tidy.
2902 * Make-lang.in: Fix copyright boilerplate.
2903 (lto.pdf): New.
2904 (lto.install-pdf): New.
2905 * lto-tree.h: Fix copyright boilerplate.
2906 * lang-specs.h: Likewise.
2907 Remove ".lto" entry from compilers fragment.
2908 * lto-elf.c: Move inclusion of gelf.h after config.h.
2909 Tidy formatting everywhere.
2910 * lto.h: Fix copyright boilerplate.
2911 Tidy formatting everywhere.
2912 * common.c: Likewise.
2913 * config-lang.in: Likewise.
2914 * common.h: Likewise.
2915 * lto-lang.c: Likewise.
2916
29172009-10-01 Richard Guenther <rguenther@suse.de>
2918
2919 * lto.c (lto_read_section_data): Use plain lseek/read.
2920
29212009-10-01 Richard Guenther <rguenther@suse.de>
2922
2923 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2924 use sysconf to query the system page size.
2925 (lto_file_read): Implement fallback using stdio.
2926 (free_section_data): Likewise.
2927
29282009-09-29 Diego Novillo <dnovillo@google.com>
2929
2930 * lto-lang.c (lto_init): Really fix call to
2931 build_common_builtin_nodes.
2932
29332009-09-29 Diego Novillo <dnovillo@google.com>
2934
2935 * lto-lang.c (lto_init): Fix call to
2936 build_common_builtin_nodes.
2937
29382009-09-29 Richard Guenther <rguenther@suse.de>
2939
2940 PR lto/40754
2941 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2942 in bytes.
2943 (first_data_block): New static variable.
2944 (lto_elf_append_data): Align the first data block in each
2945 section.
2946
29472009-09-28 Diego Novillo <dnovillo@google.com>
2948
2949 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2950 * lto.c (strip_extension): New.
2951 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2952 (lto_execute_ltrans): Tidy.
2953 Do not pass -fwpa nor -fltrans-* to LTRANS.
2954 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2955 * tree.c (need_assembler_name_p): Call
2956 lang_hooks.decls.may_need_assembler_name_p if set.
2957 * varasm.c (default_binds_local_p_1): Remove check for
2958 flag_ltrans.
2959 * varpool.c (decide_is_variable_needed): Do not test for
2960 in_lto_p.
2961
29622009-09-22 Richard Guenther <rguenther@suse.de>
2963
2964 PR lto/39276
2965 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2966 * Make-lang.in: Remove ltrans-driver stuff.
2967 * config-lang.in: Likewise.
2968 * lang.opt (fltrans-driver): Remove.
2969 * lto-lang.c (lto_init_options): Remove code initializing
2970 ltrans_driver.
2971 * ltrans-driver: Remove.
2972
29732009-09-21 Diego Novillo <dnovillo@google.com>
2974
2975 * lto-lang.c (lto_define_builtins): Remove superfluous
2976 calls to targetm.init_builtins and build_common_builtin_nodes.
2977 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2978 build_common_builtin_nodes.
2979 * lto.c (lto_materialize_function): Do nothing if NODE is a
2980 clone.
2981
29822009-09-03 Diego Novillo <dnovillo@google.com>
2983
2984 * lto-elf.c (validate_file): Replace call to
2985 elf_getshstrndx with call to elf_getshdrstrndx.
2986
29872009-08-19 Richard Guenther <rguenther@suse.de>
2988
2989 * lto-lang.c (lto_init): Merge char_type_node with the
2990 appropriately signed variant.
2991
29922009-08-19 Richard Guenther <rguenther@suse.de>
2993
2994 PR lto/41071
2995 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
2996 (lto_fixup_type): Re-build the pointer-to chain part two.
2997
29982009-08-19 Richard Guenther <rguenther@suse.de>
2999
3000 PR lto/41071
3001 * lto.c (lto_fixup_type): Re-build the type variant chain.
3002
30032009-08-19 Richard Guenther <rguenther@suse.de>
3004
3005 PR lto/41071
3006 * lto.c (lto_fixup_constructor): New function.
3007 (lto_fixup_tree): Replace all types. Properly fixup
3008 constructors and constants.
3009
30102009-08-14 Richard Guenther <rguenther@suse.de>
3011
3012 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3013 for DECL_LANG_SPECIFIC.
3014
30152009-08-13 Richard Guenther <rguenther@suse.de>
3016
3017 PR lto/41032
3018 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3019
30202009-07-30 Richard Guenther <rguenther@suse.de>
3021
3022 PR lto/40903
3023 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3024 the largest decl for output and free TREE_CHAIN for further
3025 use.
3026
30272009-07-24 Diego Novillo <dnovillo@google.com>
3028
3029 * Make-lang.in: Add empty lto.install-plugin target.
3030
30312009-07-13 Diego Novillo <dnovillo@google.com>
3032
3033 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3034
30352009-07-11 Richard Guenther <rguenther@suse.de>
3036
3037 * lto-lang.c (lto_write_globals): Wrapup global decls.
3038
30392009-07-10 Richard Guenther <rguenther@suse.de>
3040
3041 * lto-lang.c (lto_init): Allocate one more location to make
3042 BUILTINS_LOCATION correct.
3043
30442009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3045
3046 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3047
30482009-07-06 Diego Novillo <dnovillo@google.com>
3049
3050 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3051 TYPE_SIZE_UNIT.
3052
30532009-07-06 Diego Novillo <dnovillo@google.com>
3054
3055 * lto.c (preload_common_nodes): Remove.
3056 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3057 (lto_read_decls): Call lto_data_in_create and
3058 lto_data_in_delete.
3059 (free_decl): Do not call ggc_free.
3060 (lto_main): Call lto_init_reader.
3061 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3062 (lto_init): Initialize main_identifier_node if needed.
3063 Make ptrdiff_type_node be integer_type_node.
3064
30652009-06-19 Diego Novillo <dnovillo@google.com>
3066
3067 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3068 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3069 Remove code guarded by #ifdef LOCAL_TRACE.
3070
30712009-06-18 Diego Novillo <dnovillo@google.com>
3072
3073 * lto.c: Update license to GPLv3.
3074 * lto-elf.c: Likewise.
3075 * common.c: Likewise.
3076 * lto-lang.c: Likewise.
3077 * lto.h: Remove superfluous include files. Update all
3078 users.
3079
30802009-06-17 Diego Novillo <dnovillo@google.com>
3081
3082 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3083
30842009-06-02 Diego Novillo <dnovillo@google.com>
3085
3086 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3087 read in.
3088 (materialize_cgraph): Only materialize nodes that have a
3089 representation on file.
3090
30912009-06-01 Diego Novillo <dnovillo@google.com>
3092
3093 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3094
30952009-05-31 Diego Novillo <dnovillo@google.com>
3096
3097 * lto-lang.c (lto_type_for_mode): Handle all the modes
3098 handled in c_common_type_for_mode.
3099
31002009-05-21 Diego Novillo <dnovillo@google.com>
3101
3102 * lto-elf.c: Always include <gelf.h>.
3103 * config-lang.in (target_libs): Remove.
3104 (build_by_default): Set to no.
3105
31062009-05-15 Diego Novillo <dnovillo@google.com>
3107
3108 * lto.c (lto_materialize_function): Assert that DECL is
3109 not a builtin.
3110 (materialize_cgraph): Don't try to materialize builtin
3111 functions.
3112 * lto-section-out.c (write_symbol_vec): Do not write
3113 builtin functions.
3114
31152009-05-13 Diego Novillo <dnovillo@google.com>
3116
3117 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3118
31192009-05-07 Diego Novillo <dnovillo@google.com>
3120
3121 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3122 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3123 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3124 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3125 (lto_fixup_tree): Call gimple_register_type when *TP is a
3126 type.
3127 (lto_main): Call bitmap_obstack_initialize.
3128
31292009-04-22 Diego Novillo <dnovillo@google.com>
3130
3131 * lto.c (free_section_data): Tidy.
3132 (lto_1_to_1_map): Tidy.
3133 (lto_add_all_inlinees): Tidy.
3134 (prefix_name_with_star): New.
3135 (get_filename_for_set): New.
3136 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3137 to determine what cgraph node sets to write.
3138 Call get_filename_for_set to compute temporary file
3139 names.
3140 (lto_execute_ltrans): Do not execute LTRANS on files with
3141 names that start with '*'.
3142 Move logic to execute LTRANS together so that LTRANS is
3143 invoked only if there are any files to compile.
3144 (do_whole_program_analysis): Only remove output files
3145 that do not start with '*'.
3146
31472009-04-06 Diego Novillo <dnovillo@google.com>
3148
3149 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3150 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3151 (lto_add_all_inlinees): Tidy.
3152
31532009-03-26 Diego Novillo <dnovillo@google.com>
3154
3155 * lto.c: Include gimple.h.
3156 (lto_read_in_decl_state): Call gimple_register_type for
3157 every type in every stream.
3158 (lto_fixup_common): Call gimple_register_type if T has a
3159 type.
3160 (do_whole_program_analysis): Call print_lto_report.
3161 (lto_main): Call print_lto_report after cgraph_optimize.
3162 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3163
31642009-03-24 Diego Novillo <dnovillo@google.com>
3165
3166 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3167 (lto.o): Add dependency on GIMPLE_H.
3168
31692009-03-10 Simon Baldwin <simonb@google.com>
3170
3171 * lto.c (lto_read_all_file_options): Close any open file descriptor
3172 contained in file_data before freeing.
3173
31742009-02-24 Rafael Avila de Espindola <espindola@google.com>
3175
3176 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3177 for a decl in the original bitmap, not a node.
3178 (lto_add_all_inlinees): Remove original nodes that are not needed.
3179 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3180
31812009-02-24 Diego Novillo <dnovillo@google.com>
3182
3183 * lto.c (lto_materialize_function): Update
3184 lto_stats.num_function_bodies.
3185 (get_section_data): Initialize *LEN to 0.
3186 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3187 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3188 Update lto_stats.num_output_files.
3189 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3190 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3191 (lto_main): Initialize lto_stats.
3192 If flag_lto_report is set, call print_lto_report.
3193
31942009-02-19 Diego Novillo <dnovillo@google.com>
3195
3196 Revert
3197
3198 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3199
3200 * lto.c (lto_add_inline_clones): Don't add the
3201 master clone. Check for a decl in the original
3202 bitmap, not a node.
3203 (lto_add_all_inlinees): Remove original nodes
3204 that are not needed.
3205 (lto_scan_statics_in_cgraph_node): Don't care if
3206 the node is the master.
3207 (lto_promote_cross_file_statics): Use a new
3208 context.seen_node_decls for each set
3209
32102009-02-19 Rafael Avila de Espindola <espindola@google.com>
3211
3212 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3213 for a decl in the original bitmap, not a node.
3214 (lto_add_all_inlinees): Remove original nodes that are not needed.
3215 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3216 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3217 for each set
3218
32192009-02-18 Diego Novillo <dnovillo@google.com>
3220
3221 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3222 and TV_WHOPR_WPA_IO.
3223 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3224 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3225 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3226 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3227 depending on command line flags.
3228 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3229 (lto_main): Remove timer uses.
3230
32312009-02-18 Rafael Avila de Espindola <espindola@google.com>
3232
3233 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3234 (lto_wpa_write_files): Update calls to renamed functions.
3235
32362009-02-17 Diego Novillo <dnovillo@google.com>
3237
3238 PR 39203
3239 * lto-lang.c (lto_post_options): Disable -fwhole-program
3240 when running LTRANS.
3241
32422009-02-10 Diego Novillo <dnovillo@google.com>
3243
3244 * lto.c (read_cgraph_and_symbols): Fix comment.
3245
32462009-02-10 Diego Novillo <dnovillo@google.com>
3247
3248 * lto.c (read_cgraph_and_symbols): Read options from all
3249 IL files.
3250
32512009-02-10 Diego Novillo <dnovillo@google.com>
3252
3253 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3254 (materialize_cgraph): Likewise.
3255 (do_whole_program_analysis): Likewise.
3256 (lto_main): Call read_cgraph_and_symbols,
3257 materialize_cgraph and do_whole_program_analysis.
3258
32592009-02-10 Simon Baldwin <simonb@google.com>
3260
3261 * lto.c: Include lto-opts.h.
3262 * (lto_main): Clear file options at loop start, read any saved
3263 options from the first file handled, and re-issue options.
3264 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3265
32662009-02-02 Diego Novillo <dnovillo@google.com>
3267
3268 * lto.c (lto_main): Stop LTO_TIMER and use
3269 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3270
32712009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3272
3273 PR lto/38995
3274 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3275 to POINTER_SIZE.
3276
32772009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3278
3279 * Make-lang.in (LTO_EXE): Link with all
3280 BACKENDLIBS and not only GMPLIBS
3281
32822009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3283
3284 PR bootstrap/38992
3285 * lto-elf.c: Include gelf.h instead of libelf.h.
3286 (lto_elf_file_close): Replace elfx_update_shstrndx with
3287 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3288 gelf_update_ehdr.
3289
32902009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3291
3292 PR middle-end/38996
3293 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3294
32952009-01-26 Diego Novillo <dnovillo@google.com>
3296
3297 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3298
32992009-01-26 Diego Novillo <dnovillo@google.com>
3300
3301 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3302 and rename into gimple_types_compatible_p.
3303
33042009-01-12 Rafael Avila de Espindola <espindola@google.com>
3305
3306 * lto-lang.c (lang_hooks): Remove the const qualifier.
3307
33082009-01-06 Diego Novillo <dnovillo@google.com>
3309
3310 * ltrans-driver: Mark 'all' target as phony.
3311
33122008-12-31 Diego Novillo <dnovillo@google.com>
3313
3314 * ltrans-driver: Execute a NOP action for target 'all'.
3315
33162008-12-19 Diego Novillo <dnovillo@google.com>
3317
3318 * lto.c (lto_1_to_1_map): Tidy.
3319
33202008-12-19 Diego Novillo <dnovillo@google.com>
3321
3322 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3323 be opened, show its name.
3324 * ltrans-driver: If $verbose is set, do not use parallelism.
3325
33262008-12-17 Rafael Avila de Espindola <espindola@google.com>
3327
3328 * lto.c (lto_fixup_function): New.
3329 (lto_fixup_tree): Call lto_fixup_function.
3330
33312008-12-14 Doug Kwan <dougkwan@google.com>
3332
3333 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3334 variables if there is no function.
3335
33362008-12-10 Simon Baldwin <simonb@google.com>
3337
3338 * ltrans-driver: Always run make in silent mode, to avoid make's
3339 trace on stdout interfering with lto-wrapper output.
3340
33412008-12-10 Doug Kwan <dougkwan@google.com>
3342
3343 * lto.c (lto_add_inline_clones): Do not force master clones of
3344 inlined functions already in SET to be static inline.
3345
33462008-12-04 Doug Kwan <dougkwan@google.com>
3347
3348 * lto.c (globalize_context_t): New type to store states in
3349 globalization of cross-file statics.
3350 (globalize_cross_file_statics): New.
3351 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3352 static decls that need to be fixed up.
3353 (lto_scan_statics_in_cgraph_node): Change call interface to use
3354 a globalize_context_t CONTEXT for all states used.
3355 (lto_scan_statics_in_remaining_global_vars): New.
3356 (lto_promote_cross_file_statics): Use new call interface of
3357 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3358 visible vars in the last set.
3359
33602008-12-03 Diego Novillo <dnovillo@google.com>
3361
3362 * lto.c (lto_fixup_tree): Do not emit an error when
3363 PREVAILING throw but T doesn't.
3364
33652008-12-02 Doug Kwan <dougkwan@google.com>
3366
3367 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3368 from code in ...
3369 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3370 variables and functions.
3371 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3372 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3373
33742008-11-29 Diego Novillo <dnovillo@google.com>
3375
3376 * lto.c: Include timevar.h.
3377 (lto_materialize_function): Tidy. Add comments.
3378 (lto_wpa_write_files): Tidy.
3379 (lto_execute_ltrans): Tidy.
3380 (lto_main): Add local variable LTO_TIMER. Initialize it
3381 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3382 Start and stop the timer.
3383 Tidy comments.
3384 * Make-lang.in (lto.o): Add dependency on timevar.h.
3385 * ltrans-driver: React to -v and -save-temps.
3386 Use simple heuristic to determine how much parallelism to
3387 use when executing make.
3388
33892008-11-12 Doug Kwan <dougkwan@google.com>
3390
3391 * lto.c (lto_bitmap_obstack): Remove var.
3392 (lto_materialize_function): Do nothing instead of marking function
3393 body in file if flag_wpa is true.
3394 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3395 (lto_scan_statics_in_cgraph_node): New function.
3396 (lto_promote_cross_file_statics): Same.
3397 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3398 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3399 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3400
34012008-11-09 Diego Novillo <dnovillo@google.com>
3402
3403 * lto/lto.c (lto_fixup_tree): Change error message locus
3404 information to include location of mismatching
3405 declaration.
3406 Use TREE_NO_WARNING to avoid repeated messages.
3407 (lto_main): If lto_fixup_decls emitted any errors, exit.
3408 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3409 (lto_init_options): Don't enable exceptions by default.
3410 (lto_eh_runtime_type): Move to lto-function-in.c
3411 (lto_init_eh): Likewise.
3412 (lto_init): Don't call lto_init_eh.
3413 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3414 libfuncs.h and except.h.
3415
34162008-10-30 Diego Novillo <dnovillo@google.com>
3417
3418 * lto.c (lto_read_decls): Declare debug_main only if
3419 LTO_STREAM_DEBUGGING is enabled.
3420
34212008-10-30 Simon Baldwin <simonb@google.com>
3422
3423 * lto.c (lto_wpa_write_files): Create intermediate files with
3424 make_cwd_temp_file().
3425 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3426 WPA_SAVE_LTRANS is set.
3427 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3428 * ltrans-driver: Do not strip directory from output files.
3429
34302008-10-29 Doug Kwan <dougkwan@google.com>
3431
3432 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3433 DECL.
3434 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3435 (lto/lto-symtab.o): Remove rule.
3436 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3437 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3438 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3439 Remove macros.
3440 lto-symtab.c (File): Move up one level.
3441 lto-lang.c (cgraph.h): Remove include.
3442 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3443 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3444 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3445
34462008-10-24 Rafael Espindola <espindola@google.com>
3447
3448 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3449 non prevailing weak symbols.
3450
34512008-10-24 Rafael Espindola <espindola@google.com>
3452
3453 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3454
34552008-10-24 Rafael Espindola <espindola@google.com>
3456
3457 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3458 different types.
3459
34602008-10-23 Simon Baldwin <simonb@google.com>
3461
3462 * lto-lang.c (input_node): Save the node reference, rather than the
3463 node pointer, in node->inlined_to.
3464 (input_cgraph_1): Convert node references into node pointers.
3465
34662008-10-22 Diego Novillo <dnovillo@google.com>
3467 Rafael Espindola <espindola@google.com>
3468
3469 * lto.c (lto_resolution_read): Tidy.
3470 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3471 abort if RET is NULL.
3472
34732008-10-22 Doug Kwan <dougkwan@google.com>
3474
3475 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3476 exceptions flag is given.
3477 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3478 (lto_init_eh): Remove exceptions flag initialization.
3479 (lto_init): Only call lto_init_eh if exceptions flag is set.
3480
34812008-10-21 Diego Novillo <dnovillo@google.com>
3482
3483 * lto.c: Tidy some formatting.
3484 * lto.h: Likewise.
3485
34862008-10-21 Simon Baldwin <simonb@google.com>
3487
3488 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3489 them is NULL (but not the other).
3490
34912008-10-17 Diego Novillo <dnovillo@google.com>
3492
3493 * ltrans-driver: Divert output from make to a temporary file.
3494 Show it if the call to make failed.
3495
34962008-10-15 Diego Novillo <dnovillo@google.com>
3497
3498 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3499 Do not print TEMP_FILENAME
3500 * ltrans-driver: Call make with -s.
3501
35022008-10-15 Diego Novillo <dnovillo@google.com>
3503
3504 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3505 TREE_STATIC on global symbols.
3506
35072008-10-14 Ollie Wild <aaw@google.com>
3508
3509 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3510 (LTRANS_DRIVER_EXE): Add.
3511 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3512 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3513 (lto.install.common): Remove ltrans-driver.
3514 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3515 (LTRANS_DRIVER_EXE): New build rule.
3516 * config-lang.in (compilers): Add ltrans-driver.
3517
35182008-10-14 Diego Novillo <dnovillo@google.com>
3519
3520 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3521 of program name.
3522
35232008-10-13 Ollie Wild <aaw@google.com>
3524
3525 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3526 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3527 * ltrans-driver (LTRANS_FLAGS): Remove.
3528
35292008-10-08 Doug Kwan <dougkwan@google.com>
3530
3531 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3532 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3533 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3534 from lto_fixup_state to here.
3535 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3536 just a free-list. Fix up types also. Move decl merging code to
3537 lto_fixup_tree.
3538 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3539 object.
3540 (lto_fixup_decls): Use another pointer set to avoid multiple
3541 walking of nodes except for DECLs to be replaced. Pass an
3542 lto_fixup_data_t object to tree-walker.
3543
35442008-10-08 Rafael Espindola <espindola@google.com>
3545
3546 * lto-symtab.c (lto_symtab_set_resolution): New.
3547 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3548 lto_symtab_get_resolution.
3549 (lto_symtab_prevailing_decl): Return decl for non public decls.
3550 (lto_symtab_get_resolution): New.
3551 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3552
35532008-10-06 Rafael Espindola <espindola@google.com>
3554
3555 * lto-lang.c: Include cgraph.h.
3556 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3557 input_cgraph): Moved from lto-cgraph.c.
3558 (LANG_HOOKS_INPUT_CGRAPH): New.
3559
35602008-10-03 Rafael Espindola <espindola@google.com>
3561
3562 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3563
35642008-10-03 Rafael Espindola <espindola@google.com>
3565
3566 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3567 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3568 prevailing definition. Don't mark TREE_NOTHROW differences.
3569 * lto.c (lto_fixup_tree): New.
3570 (lto_fixup_state): New.
3571 (lto_fixup_state_aux): New.
3572 (free_decl): New.
3573 (lto_fixup_decls): New.
3574 (lto_main): Call lto_fixup_decls.
3575
35762008-10-02 Ollie Wild <aaw@google.com>
3577
3578 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3579 and Init.
3580 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3581 * lto-lang.c (lto_post_options): Add validation and fixups for
3582 -fltrans and -fwpa.
3583
35842008-10-02 Rafael Espindola <espindola@google.com>
3585
3586 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3587 lto_symtab_merge_decl): Return void.
3588 (lto_symtab_prevailing_decl): New.
3589
35902008-09-30 Rafael Espindola <espindola@google.com>
3591
3592 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3593 defined symbols.
3594 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3595 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3596 Check for already defined symbols.
3597 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3598 (LTO_IDENTIFIER_RESOLUTION): Remove.
3599 (LTO_DECL_RESOLUTION): New.
3600
36012008-09-30 Rafael Espindola <espindola@google.com>
3602
3603 * lto.c (lto_read_decls): Use new input_tree signature.
3604
36052008-09-26 Doug Kwan <dougkwan@google.com>
3606
3607 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3608 bodies affected by exception attribute merging of DECLs.
3609 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3610 merging.
3611
36122008-09-25 Rafael Espindola <espindola@google.com>
3613
3614 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3615 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3616 * lto-symtab.c (lto_symtab_compatible): New.
3617 (lto_symtab_overwrite_decl): New.
3618 (lto_symtab_merge_decl): Refactor to use the above functions
3619 and the resolution from lang_identifier.
3620 * lto-tree.h: Include plugin-api.h.
3621 (lang_identifier): Add resolution.
3622 (LTO_IDENTIFIER_RESOLUTION): New.
3623
36242008-09-25 Ollie Wild <aaw@google.com>
3625
3626 * lang.opt (fltrans-output-list=): New option.
3627 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3628
36292008-09-25 Rafael Espindola <espindola@google.com>
3630
3631 * lto.c (lto_resolution_read): Initialize ret;
3632
36332008-09-24 Ollie Wild <aaw@google.com>
3634
3635 * lto.c (sys/mman.h): Move include.
3636 (lto_wpa_write_files): Return a list of written files.
3637 (lto_execute_ltrans): New function.
3638 (lto_main): Call lto_execute_ltrans.
3639 (ltrans-driver): New file.
3640 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3641 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3642 (lto_init_options): Initialize ltrans_driver.
3643 (lto_handle_option): Fix incorrect default output value.
3644 * lang.opt (fltrans-driver=): New option.
3645 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3646 (lto.install-common): Add lto/ltrans-driver.
3647
36482008-09-24 Rafael Espindola <espindola@google.com>
3649
3650 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3651 (lto/lto.o): Depend on lto/common.h.
3652 (lto/common.o): New.
3653 * lang.opt (resolution): New.
3654 * lto-lang.c (resolution_file_name): New.
3655 (lto_handle_option): Handle OPT_resolution.
3656 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3657 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3658 pass it to lto_symtab_merge_decl.
3659 * lto.c: Include common.h.
3660 (lto_read_decls): Add resolutions and resolutions_size arguments.
3661 Initialize data_in.globals_resolution and
3662 data_in.globals_resolution_size.
3663 (index_and_symbol_resolution): New.
3664 (lto_resolution_read): New.
3665 (lto_file_read): Add argument resolution_file.
3666 Read resolution.
3667 * lto.h (resolution_file_name): New.
3668
36692008-09-23 Rafael Espindola <espindola@google.com>
3670
3671 * common.c: Update description.
3672 * common.h: Update description.
3673
36742008-09-23 Rafael Espindola <espindola@google.com>
3675
3676 * common.c: Moved from lto-plugin.
3677 * common.h: Moved from lto-plugin.
3678
36792008-09-22 Doug Kwan <dougkwan@google.com>
3680
3681 * lto.c (VEC(bitmap,heap)): Declare.
3682 (lto_materialize_function): Handle WAP mode specially.
3683 (lto_add_inline_clones): New.
3684 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3685 return a bitmap of inlined decls.
3686 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3687 (lto_main): Call reset_inline_failed to reset inlining states.
3688 Check call-graph after WPA inlining.
3689 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3690 unconditionally.
3691
36922008-09-19 Doug Kwan <dougkwan@google.com>
3693
3694 lto.c (lto_main): Remove unsued wrapper code.
3695 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3696
36972008-09-19 Rafael Espindola <espindola@google.com>
3698
3699 * lto-symtab.c: Include lto-tree-in.h.
3700 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3701 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3702 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3703
37042008-09-17 Paolo Bonzini <bonzini@gnu.org>
3705 Rafael Avila de Espindola <espindola@google.com>
3706
3707 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3708 COMPOUND_LITERAL_EXPR_DECL): Remove.
3709 (emit_local_var): Remove.
3710 (lto_expand_expr): Remove.
3711 (lto_staticp): Remove.
3712 (LANG_HOOKS_EXPAND_EXPR): Remove.
3713 (LANG_HOOKS_STATICP): Remove.
3714
37152008-09-11 Diego Novillo <dnovillo@google.com>
3716
3717 * lto-lang.c: Include except.h and libfuncs.h.
3718 (lto_init_eh): New.
3719 (lto_init): Call it.
3720 Set flag_generate_lto to 0.
3721 * Make-lang.in (lto-lang.o): Add dependency on except.h
3722 and libfuncs.h.
3723
37242008-09-09 Bill Maddox <maddox@google.com>
3725
3726 * lto-lang.c: Include header file expr.h.
3727 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3728 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3729 (emit_local_var): Copied from c-semantics.c.
3730 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3731 and c_staticp in c-common.c.
3732 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3733
37342008-09-08 Diego Novillo <dnovillo@google.com>
3735
3736 * lto-lang.c (lto_global_bindings_p): Return 1 during
3737 IPA passes.
3738
37392008-09-07 Diego Novillo <dnovillo@google.com>
3740
3741 * lto.c: Tidy formatting.
3742
37432008-08-04 Bill Maddox <maddox@google.com>
3744
3745 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3746
37472008-09-03 Doug Kwan <dougkwan@google.com>
3748
3749 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3750 CIF_OK instead of NULL.
3751
37522008-09-02 Diego Novillo <dnovillo@google.com>
3753 Simon Baldwin <simonb@google.com>
3754
3755 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3756 c_common_type_for_size.
3757 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3758 (lto_init): Call linemap_add.
3759 (signed_and_unsigned_types): Remove.
3760
37612008-08-29 Diego Novillo <dnovillo@google.com>
3762
3763 * lto-lang.c (handle_noreturn_attribute): New local function.
3764 (handle_const_attribute): New local function.
3765 (handle_malloc_attribute): New local function.
3766 (handle_pure_attribute): New local function.
3767 (handle_novops_attribute): New local function.
3768 (handle_nonnull_attribute): New local function.
3769 (handle_nothrow_attribute): New local function.
3770 (handle_sentinel_attribute): New local function.
3771 (handle_type_generic_attribute): New local function.
3772 (handle_format_attribute): New local function.
3773 (handle_format_arg_attribute): New local function.
3774 (lto_attribute_table): Declare.
3775 (lto_format_attribute_table): Declare.
3776 (lto_init_attributes): New local function.
3777 (lto_define_builtins): Call it.
3778 Call targetm.init_builtins and build_common_builtin_nodes.
3779 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3780 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3781
37822008-08-28 Diego Novillo <dnovillo@google.com>
3783
3784 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3785 $(GIMPLE_H).
3786 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3787 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3788 * lto-symtab.c: Include gimple.h.
3789 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3790 TREE_CHAIN.
3791
37922008-08-27 Doug Kwan <dougkwan@google.com>
3793
3794 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3795 gt-lto-lto.h): New includes.
3796 (lto_materialize_function): Do not read in function body in WPA mode.
3797 Format a line to fit in 80 columns.
3798 (lto_cgraph_node_sets): New garbage collected variable.
3799 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3800 New functions.
3801 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3802 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3803 variable LTO_SECTION_IN_H.
3804 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3805 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3806 with variable LTO_SECTION_IN_H.
3807 * config-lang.in (gtfiles): Add lto/lto.c.
3808 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3809 merged DECL_RESULT correctly.
3810
38112008-08-26 Bill Maddox <maddox@google.com>
3812
3813 * lto-lang.c Include tree-gimple.h.
3814 (lto_mark_addressable): Call mark_addressable rather than
3815 asserting.
3816 (lto_post_options): Suppress debug info generation.
3817 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3818
38192008-08-25 Bill Maddox <maddox@google.com>
3820
3821 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3822 assertion and leave an explanatory comment in its place.
3823
38242008-08-21 Doug Kwan <dougkwan@google.com>
3825
3826 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3827 of common nodes instead of computing locallly.
3828 (lto_read_in_decl_state): New.
3829 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3830 Read global and per-function in-decl states.
3831 * Make-lang.in (LTO_H): Update dependency.
3832 (lto/lto.o): Same.
3833 (lto-symtab.c): Merge (revision 139039)
3834 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3835
38362008-08-21 Rafael Espindola <espindola@google.com>
3837
3838 * config-lang.in (target_libs): New.
3839
38402008-08-20 Bill Maddox <maddox@google.com>
3841
3842 * lto.c (current_lto_file): Remove GTY marker from static
3843 variable. Remove include of file gt-lto-lto.h.
3844 * Make-lang.in: Remove dependency of lto/lto.o on
3845 gt-lto-lto.h.
3846 * lto-elf.c (lto_file_close): Removed.
3847 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3848 allocate lto_elf_file object.
3849 (lto_elf_file_close): Free lto_elf_file object after close.
3850 * lto.h (struct lto_file_struct): Remove GTY marker.
3851 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3852 gtfiles.
3853
38542008-08-20 Bill Maddox <maddox@google.com>
3855
3856 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3857 to conform to its new signature.
3858 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3859 on discarded node here, now called in global_vector_fixup.
3860
38612008-08-09 Bill Maddox <maddox@google.com>
3862
3863 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3864 has not been set to a front-end-specific value.
3865
38662008-08-05 Doug Kwan <dougkwan@google.com>
3867
3868 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3869 build breakage.
3870
38712008-07-30 Bill Maddox <maddox@google.com>
3872
3873 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3874 Remove obsolete comments.
3875 (lto_read_decls): Remove initialization of deleted field data_in.global.
3876 Tidy up comments.
3877 (lto_main): Remove redundant initialization of section_hash_table.
3878 * lto-elf.c: Removed obsolete comments.
3879 * lto.h: Tidy up comments.
3880 * lto-symtab.c (lto_least_common_multiple): New function.
3881 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3882 Tidy up comments.
3883
38842008-07-25 Diego Novillo <dnovillo@google.com>
3885 Bill Maddox <maddox@google.com>
3886
3887 * lto.c: Re-order include files.
3888 Include lto-section-out.h.
3889 (preload_common_nodes): Add debugging output.
3890 Add new local INDEX_TABLE.
3891 Call preload_common_node.
3892 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3893
38942008-07-13 Bill Maddox <maddox@google.com>
3895
3896 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3897 unwanted scaling during pointer addition.
3898
38992008-07-11 Bill Maddox <maddox@google.com>
3900 Diego Novillo <dnovillo@google.com>
3901
3902 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3903 Make code const-correct.
3904 (lto_file_read): Fix C++ compatibility warnings.
3905 (lto_read_section_data): Fix C++ compatibility warnings.
3906 (lto_get_section_data): Use CONST_CAST to avoid warning when
3907 const pointer passed to free.
3908 * lto-elf.c (lto_elf_build_section_table): Fix C++
3909 compatibility warnings.
3910 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3911 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3912 (lto_get_current_out_file): Fix C++ compatibility warnings.
3913
39142008-07-11 Diego Novillo <dnovillo@google.com>
3915
3916 * Make-lang.in (lto-warn): Define.
3917
39182008-07-03 Simon Baldwin <simonb@google.com>
3919
3920 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3921 LTO_STREAM_DEBUGGING.
3922
39232008-06-27 Ollie Wild <aaw@google.com>
3924
3925 * lto-elf.c (lto-section-out.h): New include.
3926 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3927 and data members.
3928 (cached_file_attrs): New static variable.
3929 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3930 Use cached_file_attrs for checking bits.
3931 (lto_elf_build_section_table): Remove elf_file argument from
3932 lto_elf_get_shdr and lto_elf_free_shdr calls.
3933 (DEFINE_INIT_SHDR): New macro.
3934 (init_shdr32, init_shdr64): New functions defined via the
3935 DEFINE_INIT_SHDR macro.
3936 (lto_elf_begin_section_with_type): New function.
3937 (lto_elf_begin_section): New function.
3938 (lto_elf_append_data): New function.
3939 (lto_elf_end_section): New function.
3940 (DEFINE_VALIDATE_EHDR): New macro.
3941 (validate_ehdr32, validate_ehdr64): New functions defined via the
3942 DEFINE_VALIDATE_EHDR macro.
3943 (validate_file): New function.
3944 (DEFINE_INIT_EHDR): New macro.
3945 (init_ehdr32, init_ehdr64): New functions defined via the
3946 DEFINE_INIT_EHDR macro.
3947 (init_ehdr): New function.
3948 (lto_elf_file_open): Add support for writable files. Move some
3949 validation logic to validate_file.
3950 (lto_elf_file_close): Add support for writable files. Write file data
3951 and free data blocks.
3952 (current_out_file): New static variable.
3953 (lto_set_current_out_file): New function.
3954 (lto_get_current_out_file): New function.
3955 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3956 Add temporary initialization for testing ELF serialization.
3957 * lto.h (lto-section-out.h): New include.
3958 (struct lto_file_struct): Slight modification to comment.
3959 (lto_elf_file_open): Add writable parameter.
3960 (lto_elf_begin_section): New function declaration.
3961 (lto_elf_append_data): New function declaration.
3962 (lto_elf_end_section): New function declaration.
3963 (lto_set_current_out_file, lto_get_current_out_file): New function
3964 declarations.
3965 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3966 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3967 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3968 * Make-lang.in (LTO_H): Add lto-section-out.h.
3969
39702008-06-12 Ollie Wild <aaw@google.com>
3971
3972 * lto.h (struct lto_file_vtable_struct): Remove.
3973 (struct lto_file_struct): Remove vtable member.
3974 * lto-elf.c (lto_file_init): Remove vtable argument.
3975 (lto_elf_map_optional_lto_section): Remove.
3976 (lto_elf_unmap_section): Remove.
3977 (lto_elf_file_vtable): Remove.
3978 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3979 lto_file_init call.
3980 (lto_elf_find_section_data): Remove.
3981
39822008-06-11 Ollie Wild <aaw@google.com>
3983
3984 * lto.c (lto_file_read): Add const qualifier to data variable.
3985
39862008-06-11 Diego Novillo <dnovillo@google.com>
3987
3988 Merge from lto-streamber sub-branch.
3989
3990 2008-06-04 Ollie Wild <aaw@google.com>
3991
3992 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
3993 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
3994
3995 2008-05-28 Bill Maddox <maddox@google.com>
3996
3997 Replace the DWARF reader in the LTO front-end.
3998
3999 * lto.c: Include lto-tree-in.h, lto-tags.h.
4000 (enum DWARF2_class, DW_cl_constant, struct
4001 DWARF2_form_data, struct lto_context,
4002 lto_fd_init, lto_info_fd_init,
4003 lto_abbrev_fd_init, lto_info_fd_close,
4004 lto_file_init, lto_file_close,
4005 lto_file_corrupt_error, lto_abi_mismatch_error,
4006 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4007 lto_read_uleb128, lto_read_sleb128,
4008 lto_read_initial_length, lto_abbrev_read_attrs,
4009 lto_abbrev_read, lto_abbrev_read_lookup,
4010 lto_read_section_offset,
4011 lto_read_comp_unit_header, find_cu_for_offset,
4012 lto_get_file_name,
4013 lto_resolve_reference,lto_read_form,
4014 attribute_value_as_int,
4015 make_signed_host_wide_int,
4016 attribute_value_as_constant, lto_cache_hash,
4017 lto_cache_eq, lto_cache_store_DIE,
4018 lto_cache_lookup_DIE, lto_find_integral_type,
4019 lto_find_integral_type_1,
4020 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4021 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4022 lto_unsupported_attr_error, lto_get_identifier,
4023 lto_read_referenced_type_DIE,
4024 lto_read_compile_unit_DIE,
4025 lto_read_array_type_DIE,
4026 lto_read_structure_union_class_type_DIE,
4027 lto_read_enumerator_DIE,
4028 lto_read_enumeration_type_DIE,
4029 lto_read_only_for_child_DIEs,
4030 lto_read_only_for_child_DIEs,
4031 lto_read_member_DIE, lto_read_abbrev,
4032 lto_read_variable_formal_parameter_constant_DIE,
4033 lto_get_body): Removed.
4034 (preload_common_nodes): New function.
4035 (lto_read_decls): Convert for new global streamer.
4036 (lto_materialze_file_data,
4037 lto_read_subroutine_type_subprogram_die,
4038 lto_read_unspecified_parameters_DIE,
4039 lto_read_typedef_DIE,
4040 lto_read_pointer_reference_type_DIE,
4041 lto_read_subrange_type_DIE,
4042 lto_read_base_type_DIE,
4043 lto_read_const_volatile_restrict_type_DIE,
4044 lto_read_namespace_DIE,
4045 lto_read_unspecified_type_DIE, lto_read_DIE,
4046 lto_read_child_DIEs, lto_collect_child_DIEs):
4047 Removed.
4048 (lto_info_read, lto_set_cu_context): Removed.
4049 (lto_file_read): Convert for new global streamer.
4050 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4051 lto_resolve_var_ref, lto_resolve_fn_ref,
4052 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4053 lto_resolve_namespacedecl_ref): Removed.
4054 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4055 * lto-tree.h (lto_symtab_merge_var,
4056 lto_symtab_mergee_fun): Declare here.
4057 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4058 (lto_elf_file_open): Removed code to read DWARF debug sections.
4059 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4060 DWARF2_CompUnit, lto_die_ptr,
4061 lto_die_cache_entry, lto_fd, lto_info_fd,
4062 lto_abbrev_fd): Removed.
4063 (lto_file): Removed debug_info and debug_abbrev fields.
4064 (lto_ref): Removed.
4065 (lto_file_init, lto_file_close,
4066 lto_resolve_type_ref, lto_resolve_var_ref,
4067 lto_resolve_fn_ref, lto_resolve_field_ref,
4068 lto_resolve_typedecl_ref,
4069 lto_resolve_namespacedecl_ref,
4070 lto_get_file_name): Removed declarations.
4071 (lto_symtab_merge_var, lto_symtab_merge_fn):
4072 Declarations moved to lto-tree.h.
4073 * lto-symtab.c (lto_compatible_attributes_p):
4074 Lobotomize this, as it barfs on "Hello, world!".
4075 * lto-section-out.c: Include lto-tree-out.h.
4076 (lto_hash_global_slot_node,
4077 lto_eq_global_slot_node, preload_common_nodes,
4078 write_global_stream, write_global_references):
4079 New functions.
4080 (produce_asm_for_decls): Convert for new global streamer.
4081 * lto-section-out.h (lto_hash_global_slot_node,
4082 lto_eq_global_slot_node): Declare.
4083
40842008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
4085 Jan Hubicka <jh@suse.cz>
4086
4087 * lto.c (sys/mman.h, tree-pass.h): New includes.
4088 (lto_materialize_constructors_and_inits,
4089 lto_materialize_function): Keeps length of section.
4090 (lto_materialize_cgraph): Removed.
4091 (lto_read_decls): Initialize fd field.
4092 (lto_file_read): Different return type and removed much code to
4093 lto_main.
4094 (page_mask): New variable.
4095 (lto_read_section_data, get_section_data, free_section_data): New
4096 functions.
4097 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4098 passes can get the section data.
4099
41002008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
4101
4102 * lto.h (lto_read_decls): Made local.
4103 (lto_input_function_body, lto_input_constructors_and_inits,
4104 lto_input_cgraph): Declarations moved to lto-section-in.h.
4105 * lto-section-in.c: Moved to .. .
4106 * lto-cgraph-in.c: Ditto.
4107 * lto-section-in.h: Ditto.
4108 * lto-function-in.c: Ditto.
4109 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4110 (lto_insert_block): Removed.
4111 (LANG_HOOKS_INSERT_BLOCK): Removed.
4112 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4113 lto-section-in.o): Rules moved to lto/Makefile.in.
4114
4115
41162008-05-16 Ollie Wild <aaw@google.com>
4117
4118 * lto-lang.c (tree-inline.h): Include.
4119 (lto_post_options): New function.
4120 (LANG_HOOKS_POST_OPTIONS): Define.
4121 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4122 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4123
41242008-05-13 Diego Novillo <dnovillo@google.com>
4125
4126 * lto-function-in.c (input_ssa_names): Call
4127 make_ssa_name_fn instead of make_ssa_name.
4128
41292008-05-12 Diego Novillo <dnovillo@google.com>
4130
4131 * lto-cgraph-in.c (overwrite_node): Update references to
4132 inline summary fields.
4133 * lto-function-in.c (input_expr_operand): Do not handle
4134 STRUCT_FIELD_TAG.
4135
41362008-05-09 Ollie Wild <aaw@google.com>
4137
4138 * lang.opt: New file.
4139 * lto-lang.c (lto_init_options): New function.
4140 (lto_handle_option): New function.
4141 (lto_init): Move initialization of flag_unit_at_a_time to
4142 lto_init_options.
4143 (LANG_HOOKS_INIT_OPTIONS): Define.
4144 (LANG_HOOKS_HANDLE_OPTION): Define.
4145
41462008-04-29 Ollie Wild <aaw@google.com>
4147
4148 * lto.c (lto_read_namespace_DIE): New function.
4149 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4150 NAMESPACE_DECL DIE's.
4151 (lto_resolve_namespacedecl_ref): New function.
4152 * lto.h (lto_resolve_namespacedecl_ref): New function.
4153 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4154 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4155 and num_namespace_decls.
4156 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4157 * lto-lang.c (lto_init_ts): New function.
4158 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4159
41602008-04-16 Ollie Wild <aaw@google.com>
4161
4162 * lto-function-in.c (input_type_ref): Updated function description.
4163
41642008-04-16 Ollie Wild <aaw@google.com>
4165
4166 * lto-function-in.c (input_type_ref_1): New function.
4167 (input_type_ref): Split into two functions.
4168 (input_function): Add support for type contexts.
4169
41702008-04-16 Ollie Wild <aaw@google.com>
4171
4172 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4173 section name
4174
41752008-04-16 Ollie Wild <aaw@google.com>
4176
4177 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4178 list of supported languages.
4179
41802008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
4181
4182 Merge with mainline @133491.
4183
41842008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
4185 Jan Hubicka <jh@suse.cz>
4186
4187 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4188 fd->unmaterialized_fndecls.
4189 (lto_get_file_name, lto_materialize_cgraph): New function.
4190 (lto_materialize_constructors_and_inits,
4191 lto_materialize_function): Read info directly from elf file.
4192 (lto_file_read): Made local and initialize dictionary so that
4193 other lto sections can be read without reprocessing the elf file.
4194 (lto_main): Read all functions after all files have been processed
4195 for their types, globals and cgraph.
4196 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4197 dependencies.
4198 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4199 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4200 (lto_elf_read_symtab): Removed function.
4201 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4202 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4203 (lto_file_read): Made local.
4204 (lto_get_file_name, lto_elf_build_section_table,
4205 lto_input_cgraph):
4206 New function.
4207 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4208 New functions.
4209 (lto_read_decls): Get the file name.
4210 * lto-cgraph-in.c: New file.
4211 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4212 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4213 (input_labels): Fixed latent sizeof issue.
4214 (input_function): Build stmt array to set call sites into cgraph
4215 edges.
4216 (lto_read_body): Reset cfun->curr_properties.
4217 * lto_section_in.h (lto_section_slot): New structure.
4218 (section_hash_table.lto_file_decl_data): New field.
4219
4220
42212008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
4222
4223 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4224 reconstruct static initializers.
4225 (lto_get_body, lto_materialize_function): Add lto_section_type as
4226 a parameter.
4227 (lto_materialize_constructors_and_inits,
4228 lto_materialize_file_data): New function.
4229 (lto_materialize_function,
4230 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4231 unmap_section and map_fn_body to map_section.
4232 (lto_set_cu_context): Process functions and static inits
4233 differently.
4234 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4235 lto/lto-section-in.o): Update dependencies.
4236 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4237 lto_section_type parameter.
4238 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4239 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4240 renamed the other two so that there is only one map function and
4241 one unmap function and each takes a section type parameter.
4242 (lto_read_function_body): Renamed to lto_input_function_body and
4243 added file_data parameter.
4244 (lto_read_var_init): Removed.
4245 (lto_input_constructors_and_inits): New function.
4246 * lto-section-in.c (lto_read_decls): New function.
4247 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4248 var_decls, type_decls, types to lto_file_decl_data.
4249 (input_type_ref, input_expr_operand, lto_read_body): Get
4250 field_decls, fn_decls, var_decls, type_decls, types from different
4251 structure.
4252 (input_globals, input_constructor, lto_read_var_init): Removed.
4253 (input_constructors_or_inits): New function.
4254 (lto_read_function_body, lto_input_constructors_and_inits):
4255 Renamed to lto_input_function_body and takes file_data parameter.
4256 * lto-section-in.h (lto_file_decl_data): New structure.
4257
42582008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4259
4260 * lto-function-in.c (input_globals.c): Changed input type to
4261 lto_function_header.
4262 (input_bb): Removed code to deserialize the stmt number.
4263 (input_function): Renumber all stmts after they are input.
4264 (lto_read_body, lto_read_function_body, lto_read_var_init):
4265 Changed to used new header format and enum section_type.
4266 *lto-lang.c (success): Removed.
4267
42682008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4269
4270 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4271 (lto_elf_free_sym): Likewise.
4272
4273 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4274 (lto_elf_build_init): Likewise.
4275
42762008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
4277
4278 * lto-read.c: Renamed to lto-function-in.c.
4279 (input_1_unsigned): Moved to lto-section-in.c and renamed
4280 lto_input_1_unsigned.
4281 (input_uleb128): Moved to lto-section-in.c and renamed
4282 lto_input_uleb128.
4283 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4284 lto_input_widest_uint_uleb128.
4285 (input_sleb128): Moved to lto-section-in.c and renamed
4286 lto_input_sleb128.
4287 (input_integer): Moved to lto-section-in.c and renamed
4288 lto_input_integer.
4289 (debug_in_fun): Moved to lto-section-in.c and renamed
4290 lto_debug_in_fun.
4291 (input_block): Moved to lto-section-in.h and renamed
4292 lto_input_block.
4293 (input_expr_operand): Fixed to allow lists with more than one
4294 element.
4295 * lto-section-in.h: New file.
4296 * lto-section-in.c: New file with changes from above.
4297 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4298 (lto-section-in.o): New rule.
4299
43002007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4301
4302 * lto-read.c (input_expr_operand): Mark static and external
4303 VAR_DECLs as needed.
4304
43052007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4306
4307 * lto-read.c (input_integer): Use the correct shift amount.
4308
43092007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4310
4311 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4312 (LANG_HOOKS_NAME): Define.
4313
43142007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4315
4316 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4317 original function to...
4318 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4319 don't have a base type.
4320 (lto_read_enumeration_type_DIE): Examine the values of the
4321 enumeration to determine whether we can use an unsigned type for
4322 the base type of the enumeration.
4323
43242007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4325
4326 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4327 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4328
43292007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4330
4331 * lto-lang.c (lto_types_compatible_p): New function.
4332 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4333
43342007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4335 Kenneth Zadeck <zadeck@naturalbridge.com>
4336
4337 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4338 (input_local_vars): Read in DECL_INITIAL and context for local
4339 statics that need to be put in unexpanded_vars_list.
4340
43412007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4342
4343 * lto-read.c (input_real): Use a separate null-terminated buffer
4344 for calling real_from_string.
4345 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4346 tell cgraph that it's needed.
4347
43482007-12-19 Doug Kwan <dougkwan@google.com>
4349
4350 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4351
43522007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4353
4354 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4355 (lto_file_read): Reset the members of 'context' every time we read
4356 a toplevel DIE, with special attention to last_param_type.
4357
43582007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4359
4360 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4361 'declaration'. Set the assembler name for non-public functions.
4362
43632007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
4364
4365 * lto_read.c (data_in.unexpanded_indexes): New array.
4366 (input_local_var): Added code to read in unexpanded_var_list
4367 indexes for variables. Only read in DECL_CHAIN field for
4368 parameters.
4369 (input_local_vars): Added code to rebuild unexpanded_var_list in
4370 order using unexpanded_indexes.
4371 (input_function): Added code to set DECL_CONTEXT for functions.
4372
43732007-12-13 Doug Kwan <dougkwan@google.com>
4374
4375 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4376 in pointer and reference types.
4377
43782007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4379
4380 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4381 RESULT_DECL.
4382
43832007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4384
4385 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4386 already read the DIE.
4387 (lto_get_body): New function, split out from...
4388 (lto_materialize_function): ...here. Call it.
4389 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4390 determine DECL_EXTERNAL.
4391 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4392 FUNCTION_DECLs when necessary. Use the type of the actual
4393 function definition if we are unable to easily merge types. Ignore
4394 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4395 necessary.
4396
43972007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4398
4399 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4400
44012007-12-12 Bill Maddox <maddox@google.com>
4402
4403 Revert
4404 2007-12-07 Bill Maddox <maddox@google.com>
4405
4406 * lto.c (lto_str_fd_init): New function.
4407 (lto_str_fd_close): New function.
4408 (lto_file_init): Call lto_str_fd_init.
4409 (lto_file_close): Call lto_str_fd_close.
4410 (lto_str_read): New function. Read debug string table.
4411 (lto_str_lookup): New function. Get string for debug
4412 string table offset.
4413 (lto_read_form): Recognize DW_FORM_strp.
4414 (lto_file_read): Invoke lto_str_read.
4415
4416 * lto-elf.c (lto_elf_file_open): Read raw section data
4417 for the .debug_str section, if present.
4418
4419 * lto.h (struct lto_str_fd_struct): New struct.
4420 (struct lto_file_struct): Added new field DEBUG_STR
4421 to hold the file descriptor for the debug string table.
4422
44232007-12-07 Bill Maddox <maddox@google.com>
4424
4425 * lto.c (lto_str_fd_init): New function.
4426 (lto_str_fd_close): New function.
4427 (lto_file_init): Call lto_str_fd_init.
4428 (lto_file_close): Call lto_str_fd_close.
4429 (lto_str_read): New function. Read debug string table.
4430 (lto_str_lookup): New function. Get string for debug
4431 string table offset.
4432 (lto_read_form): Recognize DW_FORM_strp.
4433 (lto_file_read): Invoke lto_str_read.
4434
4435 * lto-elf.c (lto_elf_file_open): Read raw section data
4436 for the .debug_str section, if present.
4437
4438 * lto.h (struct lto_str_fd_struct): New struct.
4439 (struct lto_file_struct): Added new field DEBUG_STR
4440 to hold the file descriptor for the debug string table.
4441
44422007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4443
4444 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4445 Grow the basic_block_info and label_to_block_map vectors if
4446 necessary. Read in the block chain.
4447
44482007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4449
4450 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4451
44522007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4453
4454 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4455
44562007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4457
4458 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4459 (lto_read_body): Don't declare PROP_alias.
4460
44612007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4462
4463 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4464 argument type information.
4465
44662007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4467
4468 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4469 TREE_THIS_VOLATILE if the associated type is a volatile type.
4470 (lto_materialize_function): Remove call to init_ssa_operands.
4471 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4472 variable when reading an SSA_NAME. Do the same when reading a
4473 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4474 (input_cfg): Call init_ssa_operands.
4475 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4476 Move call to init_tree_ssa...
4477 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4478 add_referenced_var on any variables referenced from the body of the
4479 function. Inform the rest of the compiler we are in SSA form and
4480 inform later passes about the current properties.
4481
44822007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4483
4484 * lto.c (lto_materialize_function): Add FIXME.
4485
44862007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4487
4488 * lto-lang.c (enum built_in_attribute): New enum.
4489 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4490 built_in_attributes): New variables.
4491 (def_builtin_1): New function.
4492 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4493
44942007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4495
4496 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4497 DECL_SOURCE_LOCATION for debugging purposes.
4498 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4499 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4500 laying out the decl until later.
4501 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4502 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4503 TREE_ADDRESSABLE.
4504 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4505 operand of an ADDR_EXPR.
4506 * lto-lang.c (enum lto_builtin_type): New enum.
4507 (builtin_type): New typedef.
4508 (builtin_types, string_type_node, const_string_type_node,
4509 wint_type_node, intmax_type_node, uintmax_type_node,
4510 signed_size_type_node): New variables.
4511 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4512 lto_build_c_type_nodes): New functions.
4513 (lto_init): Initialize builtin types.
4514 (lto_set_decl_assembler_name): Let the target machine mangle the
4515 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4516
45172007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4518
4519 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4520 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4521 the type is a constant type. Set the assembler name and inform
4522 the rest of the compiler about the new decl if the decl is not
4523 public.
4524 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4525 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4526 try to read in function bodies for functions that already have bodies.
4527 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4528 equivalency.
4529 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4530 Check for whether we matched a builtin function type before calling
4531 lto_same_type_p on the generated type. Permit cases where the
4532 declaration of an array is unbounded, but the definition is bounded.
4533 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4534 DECL_SIZE_UNIT if necessary.
4535
45362007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4537
4538 * lto-read.c (input_expr_operand): Get types right
4539 for COMPLEX_CST.
4540
45412007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4542
4543 * lto-read.c (make_new_block, input_cfg): Properly set
4544 n_basic_blocks.
4545
45462007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4547
4548 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4549 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4550
45512007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4552
4553 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4554 construct the integer type for bitfields.
4555
45562007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4557
4558 * lto-read.c (data_in.current_node_has_loc): Removed.
4559 (input_line_info): Returns true if node needs line set.
4560 (set_line_info): Always sets line if called.
4561 (clear_line_info): Removed reference to current_node_needs_loc.
4562 (input_expr_operand): Keeps track locally if current node needs a loc.
4563 (input_local_var): Added code to handle DECL_INITIAL for
4564 static local vars. Only set loc if necessary.
4565
45662007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4567
4568 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4569 DECL_CONTEXT.
4570
45712007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4572
4573 * lto.c: Include langhooks.h.
4574 (lto_find_integral_type): Rework logic to handle the case where
4575 got_byte_size is true, but the bitsize requested and that of the
4576 base_type doesn't match.
4577 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4578 asm_name if we are creating a VAR_DECL.
4579 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4580 definition.
4581 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4582 function reference and use the builtin's decl if so. Set the
4583 DECL_CONTEXT of the RESULT_DECL for the function.
4584 * lto-lang.c (registered_builtin_fndecls): New variable.
4585 (lto_getdecls): Return it.
4586 (lto_builtin_function): Chain the new decl onto
4587 registered_builtin_fndecls.
4588
45892007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
4590
4591 * lto-read.c (process_tree_flags, lto_static_init_local):
4592 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4593 (input_line_info, clear_line_info): Fixed new line number code.
4594 (input_expr_operand): Added type to SWITCH_EXPR.
4595 (lto_read_body): Properly initialized data_in.
4596 Clear line info when leaving.
4597
45982007-11-13 Diego Novillo <dnovillo@google.com>
4599
4600 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4601 Initialize ARTIFICIAL.
4602 (lto_read_subroutine_type_subprogram_DIE): Initialize
4603 SAVED_SCOPE.
4604 * lto-read.c (set_line_info): Remove ; from calls to
4605 LINEMAP_POSITION_FOR_COLUMN.
4606
46072007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4608
4609 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4610 (input_expr_operand, input_local_var): Renamed get_type_ref to
4611 input_type_ref.
4612 (input_expr_operand): Get the types correct for
4613 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4614
46152007-11-13 Doug Kwan <dougkwan@google.com>
4616
4617 * lto-read.c (input_widest_uint_uleb128): New function.
4618 (input_tree_flags, process_tree_flags, input_line_info,
4619 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4620 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4621 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4622 (lto_static_init_local): Add code to assert that lto_flags_type is
4623 wide enough.
4624
46252007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4626
4627 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4628 (lto_read_subroutine_type_subprogram_DIE): Handle
4629 DW_AT_static_link and DW_AT_specification. Return the
4630 specification if present.
4631 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4632
46332007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4634
4635 * lto-lang.c: Include target.h.
4636 (registered_builtin_types): New variable.
4637 (lto_type_for_mode): Increase number of modes handled.
4638 (lto_builtin_function): Fix argument list and return the decl.
4639 (lto_register_builtin_type): New function.
4640 (lto_init): Initialize target builtins and language-independent
4641 nodes.
4642 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4643
46442007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4645
4646 * lto-read.c (input_expr_operand): Added code to properly handle
4647 index filed. Added new RANGE_EXPR case.
4648
46492007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4650
4651 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4652 (data_in): Added current_node_has_loc field.
4653 (input_line_info, set_line_info, clear_line_info): Added a support
4654 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4655 did not have on on the source side.
4656 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4657 numbers too.
4658
46592007-11-09 Doug Kwan <dougkwan@google.com>
4660
4661 * lto-read.c (input_expr_operand): Change type of operand 2 of
4662 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4663
46642007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4665
4666 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4667 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4668 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4669 the new decl we are creating. Move informing the middle end about
4670 the new decl to...
4671 (lto_main): ...here. Inform the middle end about global variables
4672 after we have read in all the input files.
4673 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4674 variables with internal linkage, so delete the check for internal
4675 linkage. Combine TREE_PUBLIC flags.
4676
46772007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4678
4679 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4680 DW_AT_decl_line.
4681 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4682 builtin specially. Move check for attribute compatibility
4683 earlier.
4684
46852007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4686
4687 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4688 * config-lang.in (gtfiles): Add lto.h and lto.c.
4689 * lto-elf.c: Include ggc.h.
4690 (lto_elf_file_open): Allocate elf_file from GC memory.
4691 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4692 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4693 in GC memory.
4694 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4695 (lto_file_close): Free file from GC memory.
4696 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4697 (lto_read_member_DIE): Fix declaration.
4698 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4699 in GC memory.
4700 (current_lto_file): New variable.
4701 (lto_main): Use it.
4702 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4703 lto_die_cache_entry): Move to...
4704 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4705 declarations accordingly.
4706 (struct lto_file_struct): Declare.
4707 (lto_file_vtable): Use it instead of lto_file.
4708
47092007-11-06 Alon Dayan <alond@il.ibm.com>
4710 Kenneth Zadeck <zadeck@naturalbridge.com>
4711
4712 * lto-read.c (process_flags, lto_static_init_local):
4713 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4714 change global array num_flags_for_code to flags_length_for_code.
4715 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4716
47172007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4718
4719 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4720 layout functions to compute information about the newly constructed
4721 type.
4722
47232007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4724
4725 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4726 case to use DECL_RESULT if necessary.
4727
47282007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4729
4730 * lto-read.c (input_tree_list): Removed.
4731 (input_tree_flags): Added parameter to force flags no matter what
4732 tree code.
4733 (input_expr_operand): Added parameter to input_tree_flags.
4734 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4735 input_expr_operand rather than input_tree_lists.
4736 (input_local_var): Use input_expr_operand to read attributes
4737 rather then input_tree_list.
4738 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4739
47402007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4741
4742 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4743 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4744 TYPE_DECL for it.
4745 * lto-read.c (lto_read_body): Use correct sizes for calculating
4746 type_decls_offset and types_offset.
4747
47482007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4749
4750 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4751 with GENERIC_NEXT.
4752 * config-lang.in (gtfiles): Add lto-lang.c.
4753 * lto-lang.c: Include gt-lto-lto-lang.h.
4754 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4755 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4756 (lto/lto-read.o): Likewise.
4757
47582007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4759
4760 * lto-read.c (data_in): Added type_decls and current_col fields.
4761 (string_slot): New type to hold canonized file name.
4762 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4763 input_line_info, set_line_info, clear_line_info): New functions.
4764 (file_name_hash_table): New hash table.
4765 (input_local_var, input_labels, input_local_vars_index,
4766 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4767 (input_uleb128): Changed type of byte var.
4768 (input_expr_operand): Large number of changes to get line numbers
4769 correct. Added TYPE_DECL case.
4770 (input_globals): Added code to get TYPE_DECLs processed.
4771 (input_local_var): Added code to process line numbers and
4772 TREE_CHAIN and DECL_CONTEXT.
4773 (input_function, input_constructor): Added call to
4774 clear_line_number.
4775 (lto_static_init_local): Added code to get line numbers correct.
4776 (lto_read_body): Added code to get TYPE_DECLS read and to change
4777 parameters to the calls above that had their parms reorganized.
4778
4779
47802007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4781
4782 * lto.h (lto_resolve_typedecl_ref): Declare.
4783 * lto.c (lto_resolve_typedecl_ref): New function.
4784
47852007-10-29 Mark Mitchell <mark@codesourcery.com>
4786 Nathan Froyd <froydnj@codesourcery.com>
4787
4788 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4789 DIEs even if we find an abstract origin for this DIE.
4790
47912007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4792
4793 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4794 RESULT_DECL slightly earlier. Only remember the decl for later
4795 if we successfully merge declarations.
4796
47972007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4798
4799 * lto-read.c (input_expr_operand): Give label_values the proper
4800 context and provide switch statements with a default type.
4801
48022007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4803
4804 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4805 * lto.c (lto_materialize_function): ...to here.
4806
48072007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4808
4809 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4810 * lto.c (lto_info_fd_init): Initialize it.
4811 (lto_info_fd_close): Free it.
4812 (lto_materialize_function): New function.
4813 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4814 unmaterialized_fndecls.
4815 (lto_file_read): Read in all the function bodies after we have read
4816 all of the DWARF info.
4817 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4818 reading a function body.
4819
48202007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4821
4822 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4823 semetric with output_tree_flags. Added call to log flags.
4824 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4825 type issues to make everything consistent with flags being
4826 unsigned HOST_WIDE_INTS.
4827 (input_expr_operand): Added call to
4828 recompute_tree_invariant_for_addr_expr.
4829 (input_local_var): Added debugging for tree_chains. Now calls
4830 input_tree_flags.
4831 (input_phi): Made flags unsigned HOST_WIDE_INT.
4832 (input_ssa_names): Now calls input_tree_flags.
4833 (lto_read_body): Now sets cfun.
4834 (lto_read_function_body): Now sets current_function_pointer.
4835
48362007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4837
4838 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4839 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4840 inspecting fields within.
4841 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4842 handle this appropriately.
4843
48442007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4845
4846 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4847 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4848 both DW_AT_abstract_origin and DW_AT_specification.
4849 (lto_read_subroutine_type_subprogram_DIE): Handle
4850 DW_AT_abstract_origin.
4851 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4852 (lto_read_DIE_at_ptr): Define as static to match declaration.
4853 Lookup the PTR in the cache before reading it from the file.
4854 (lto_resolve_var_ref): Adjust accordingly.
4855 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4856 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4857
48582007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4859
4860 * lto.c (lto_read_DIE_at_ptr): New function.
4861 (lto_resolve_var_ref): Use it.
4862 (lto_resolve_fn_ref): Use it.
4863 (lto_resolve_field_ref): Use it.
4864 (lto_read_variable_formal_parameter_constant_DIE): Follow
4865 DW_AT_specification and return the associated decl when appropriate.
4866
48672007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4868
4869 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4870 Implement for scalar integer modes.
4871 (lto_init): Initialize size_type_node.
4872
48732007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4874
4875 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4876 (input_local_var): Add chaining for params.
4877 (input_ssa_names): Add cfun parameter.
4878 (input_function): Remove unnecessary else.
4879
48802007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4881
4882 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4883 (lto_resolve_var_ref): Use proper types.
4884 (lto_resolve_fn_ref): Likewise.
4885 (lto_resolve_field_ref): Likewise.
4886
48872007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4888
4889 * lto-read.c (input_expr_operand): Remove case.
4890
48912007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4892
4893 * lto.c (lto_read_only_for_child_DIEs): New function.
4894 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4895 * lto-elf.c (lto_elf_map_lto_section): Remove.
4896 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4897 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4898 SSA_NAME. Add missing case for mechanical codes.
4899 (input_cfg): Use basic_block_info_for_function instead of
4900 basic_block_info.
4901
49022007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4903
4904 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4905 (input_list): Renamed input_tree_list and modified to follow same
4906 protocol as lto-function-out.c:output_tree_list.
4907 (input_expr_operand): Make asm operands use input_tree_list.
4908 (input_local_var): Now uses input_tree_list.
4909 (lto_read_body): Change placement for setting context of debug_labels.
4910
4911
49122007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4913
4914 * lto-read.c (input_real): Output debugging in proper order.
4915 (input_integer): Compute bit lengths properly.
4916 (input_list): Clean up declaration.
4917 (input_expr_operand): Change calls to input_real to match fix.
4918 Make reading of LTO_bit_field_ref1 match output.
4919 (input_local_var): Make reading of attributes match what is being
4920 written.
4921 (dump_debug_stream): Also print char in hex.
4922 (debug_out_fun): Fix signed unsigned mismatch.
4923
49242007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4925
4926 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4927 DW_AT_GNU_vector specially, as they are not contiguous with the
4928 specified set of attribute names. Use class_mask to check for
4929 errors at the end of the function
4930 (lto_resolve_var_ref): Read the DIE if it is not cached.
4931 (lto_resolve_fn_ref): Likewise.
4932 (lto_resolve_field_ref): Likewise.
4933
49342007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4935
4936 * lto.c: Include dwarf2out.h.
4937 (lto_cache_store_DIE): Assert that we never change the value.
4938 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4939 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4940 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4941 sensible type instead.
4942 (lto_read_structure_union_class_type_DIE): Store the newly
4943 created type prior to reading the members of the structure to
4944 avoid infinite recursion. Avoid computing types and alignments
4945 for structures whose sizes are unknown.
4946 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4947 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4948 DW_AT_const_value, and DW_AT_specification.
4949 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4950 Return early if we have already constructed the function type.
4951 (lto_read_typedef_DIE): Check to see if the type has been cached
4952 already. Cache the type before reading any children.
4953 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4954 (lto_read_DIE): Unset context->skip_non_parameters around reading
4955 the DIE.
4956 (lto_resolve_fn_ref): Delete trailing whitespace.
4957
49582007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4959
4960 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4961
49622007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4963
4964 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4965
49662007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4967
4968 * lto-lang.c (signed_and_unsigned_types): New variable.
4969 (lto_type_for_size): Consult signed_and_unsigned_types to find
4970 an approprite type, creating it if necessary.
4971 (lto_set_decl_assembler_name): Add actual method body.
4972
49732007-09-06 Jim Blandy <jimb@codesourcery.com>
4974
4975 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4976 can't find a var init for this variable, leave its DECL_INITIAL.
4977 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4978 lto_elf_map_fn_body.
4979 (lto_map_lto_section): New function.
4980 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4981 bodies, and lto_elf_map_optional_lto_section for variable
4982 initializers.
4983 (lto_elf_find_section_data): Quietly return NULL if the section is
4984 missing.
4985 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4986
4987 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
4988
4989 * lto-read.c (lto_read_body): Doc fix.
4990
49912007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4992
4993 * lto-read.c (fun_in): Renamed to data_in.
4994 (input_expr_operand, input_local_var, input_string_internal,
4995 input_string, input_real, input_list, get_label_decl,
4996 get_type_ref, input_expr_operand, input_globals, input_labels,
4997 input_local_vars_index, input_local_var, input_local_vars,
4998 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
4999 (input_constructor): New function.
5000 (lto_read_function_body): Renamed to lto_read_body and generalized
5001 to handle both functions and constructors.
5002 (lto_read_function_body, lto_read_var_init): New function.
5003
5004
50052007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5006
5007 * lto-read.c (input_expr_operand): Assert that there really is a
5008 FUNCTION_DECL.
5009 (input_globals): Removed checks on 0 section.
5010
50112007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5012
5013 * lto-read.c (fun_in): Added local_decls_index and
5014 local_decls_index_d.
5015 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5016 (input_globals): Enabled code to handle FIELD_DECLs.
5017 (input_local_vars_index, input_local_vars): New function.
5018 (input_local_var): Changed to allow locals to be input randomly.
5019 (lto_read_function_body): Added code to input the
5020 local_decls_index and to free various structures.
5021
50222007-08-17 Jim Blandy <jimb@codesourcery.com>
5023
5024 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5025 ATTRIBUTE_UNUSED from 'die' formal.
5026
5027 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5028 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5029 (input_list): Fix type of 'tag'.
5030 (input_expr_operand): Fix type of 'tag' argument. Update
5031 declaration. Fix type of 'ctag'. Add default case to switch,
5032 since the type of the switched value is now an enum.
5033 (input_local_vars): Fix type of 'tag'.
5034 (input_bb): Fix type of 'tag' argument.
5035 (input_function): Fix type of 'tag' argument.
5036
50372007-08-16 Jim Blandy <jimb@codesourcery.com>
5038
5039 * lto.c (lto_read_member_DIE): Record the tree we create in
5040 fd->die_cache. (Our 'die' argument is no longer unused.)
5041 (lto_resolve_field_ref): New function.
5042 * lto.h (lto_resolve_field_ref): New declaration.
5043
50442007-08-15 Jim Blandy <jimb@codesourcery.com>
5045
5046 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5047
50482007-08-07 Jim Blandy <jimb@codesourcery.com>
5049
5050 * lto.c (lto_read_form): Complete attr_classes table.
5051 (DWARF2_form_data): Doc fix.
5052
50532007-08-05 Mark Mitchell <mark@codesourcery.com>
5054
5055 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5056 and unmap_var_init.
5057 (lto_read_var_init): Declare.
5058 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5059 interface for reading variable initializers.
5060 * lto-elf.c (lto_elf_read_var_init): Remove.
5061 (lto_elf_file_vtable): Update initializer.
5062 (lto_elf_read_var_init): Add comment about unused-ness.
5063 * lto-read.c (lto_read_var_init): New.
5064
5065 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5066
50672007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
5068
5069 * lto-read.c (lto_read_function_body): Moved declaration of fn
5070 outside of ifdef.
5071
50722007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
5073
5074 * lto-read.c (input_uleb128, input_string_internal, input_real,
5075 input_integer, input_record_start, input_list, get_type_ref,
5076 input_flags, input_expr_operand, input_expr_operand,
5077 input_expr_operand, input_local_vars, input_cfg, input_phi,
5078 input_ssa_names, input_bb, input_function): Added semicolons.
5079
5080
50812007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5082
5083 * lto-read.c (input_globals): Remove debugging.
5084 (input_function): Set DECL_ARGUMENTS.
5085
5086
50872007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5088
5089 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5090 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5091 (input_phi): Made work with operands other than SSA_NAMES and
5092 fixed processing of flags.
5093 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5094 (input_flags): New function.
5095 * lto-lang.c (lto_init): Changed state of in_lto_p.
5096
5097
50982007-07-24 Mark Mitchell <mark@codesourcery.com>
5099
5100 * lto-tree.h (lto_varargs_cookie): Remove.
5101 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5102 skip_non_parameters, skip_parameters.
5103 (lto_varargs_cookie): Remove.
5104 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5105 parameter types.
5106 (lto_read_abbrev): New function.
5107 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5108 child DIEs.
5109 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5110 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5111 (lto_file_read): Initialize new context fields.
5112 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5113 (lto_unsigned_type): Remove.
5114 (lto_signed_type): Likewise.
5115 (lto_signed_or_unsigned_type): Likewise.
5116 (lto_init): Do not create lto_varargs_cookie.
5117 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5118 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5119 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5120
51212007-07-19 Jan Hubicka <jh@suse.cz>
5122
5123 * lto-read.c (lto_read_function_body): Produce empty scope block
5124 to avoid crash.
5125
51262007-07-18 Mark Mitchell <mark@codesourcery.com>
5127
5128 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5129 process local variables.
5130 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5131
51322007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5133
5134 * lto-read.c (input_list, input_expr_operand): Added struct
5135 function parameter.
5136 (init_cfg, finalize_cfg): Removed function.
5137 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5138 (input_labels, input_local_vars): Now takes input_block parameter rather than
5139 synthsyzing it.
5140 (input_cfg, input_phi, input_ssa_names): New functions.
5141 (input_bb): Now passes in input_blocks. Does not construct cfg
5142 and processes the list of phi functions.
5143 (input_function): Now builds both the cfg and ssa_names table.
5144 (lto_read_function_body): Processes new header fields to construct
5145 streams for the ssa_names and cfg and their debugging.
5146 * lto/lto-lang.c (lto_init): Set in_lto_p.
5147
5148
51492007-06-28 Mark Mitchell <mark@codesourcery.com>
5150
5151 * lto.h (lto_file_vtable): Add read_var_init.
5152 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5153 initializers.
5154 (lto_main): Remove bogus asserts.
5155 * lto-elf.c (tm.h): Include it.
5156 (libiberty.y): Likewise.
5157 (lto_elf_file): Add strtab and symtab. Rename
5158 string_table_section_index to sec_strtab.
5159 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5160 (lto_elf_get_shdr): New function.
5161 (lto_elf_free_shdr): Likewise.
5162 (lto_elf_find_section_data): Use them.
5163 (lto_elf_read_symtab): New function.
5164 (lto_elf_lookup_sym): Likewise.
5165 (lto_elf_free_sym): Likewise.
5166 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5167 (lto_elf_built_init): New function.
5168 (lto_elf_read_var_init): Likewise.
5169 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5170
51712007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
5172
5173 * lto-read (make_new_block): Initialize the stmt_list.
5174 (lto_static_init_local): Add debugging for missing codes.
5175
51762007-06-26 Mark Mitchell <mark@codesourcery.com>
5177
5178 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5179 unprototyped functions.
5180
51812007-06-23 Mark Mitchell <mark@codesourcery.com>
5182
5183 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5184 Handle DW_AT_MIPS_linkage_name.
5185 (lto_read_subroutine_type_subprogram): Likewise. Correct
5186 compilation errors.
5187 (lto_main): Remove incorrect assertions.
5188 * lto-symbtab.c: Build function types out of TREE_LISTs.
5189
5190 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5191
5192 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5193
51942007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
5195
5196 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5197 dummy since ggc does not like empty structs.
5198 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5199 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5200 expr->common to expr->base.
5201 (make_new_block): Moved stmt_list to proper place.
5202
5203
52042007-03-14 Robert Kennedy <jimbob@google.com>
5205
5206 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5207 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5208 assembler name from DWARF.
5209 * lto-lang.c (lto_set_decl_assembler_name) New function.
5210
52112006-09-10 Mark Mitchell <mark@codesourcery.com>
5212
5213 * lto.h (lto_file_vtable): New structure.
5214 (lto_file): Add vtable pointer.
5215 (lto_file_init): Add vtable paramter.
5216 (lto_read_function_body): New function.
5217 (lto_symtab_merge_fn): New function.
5218 * lto.c (lto_file_init): Add vtable parameter.
5219 (lto_read_form): Fill in entries for DW_AT_prototyped,
5220 DW_AT_frame_base.
5221 (lto_read_subroutine_type_subprogram_DIE): New function.
5222 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5223 DW_TAG_subprogram.
5224 * lto-elf.c (lto_elf_vile_vtable): New variable.
5225 (lto_elf_file_open): Pass it to lto_file_init.
5226 (lto_elf_map_fn_body): New function.
5227 (lto_elf_unmap_fn_body): Likewise.
5228 * lto-read.c: New file.
5229 * lto-symtab.c (lto_symtab_merge_fn): New function.
5230 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5231 tree_rest_of_compilation.
5232 * Make-lang.in (LTO_OBJS): Add lto-read.o
5233 (lto-read.o): New target.
5234
52352006-09-03 Mark Mitchell <mark@codesourcery.com>
5236
5237 * lto.c (<inttypes.h>): Don't include it.
5238 (lto_context): Don't typedef it.
5239 (lto_resolve_reference): New function.
5240 (lto_read_form): Use it.
5241 (lto_resolve_type_ref): New function.
5242 (lto_resolve_var_ref): Likewise.
5243 (lto_resolve_fn_ref): Likewise.
5244 * lto.h (<inttypes.h>): Include it.
5245 (lto_context): New type.
5246 (lto_ref): New structure.
5247 (lto_resolve_type_ref): Declare.
5248 (lto_resolve_var_ref): Likewise.
5249 (lto_resolve_fn_ref): Likewise.
5250
52512006-08-18 Mark Mitchell <mark@codesourcery.com>
5252
5253 * lang-specs.h: New file.
5254
52552006-08-14 Mark Mitchell <mark@codesourcery.com>
5256
5257 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5258 (lto_info_fd_close): Deallocate it.
5259 (lto_die_cache_entry): New structure.
5260 (lto_cache_hash): New function.
5261 (lto_cache_eq): Likewise.
5262 (lto_cache_store_DIE): Likewise.
5263 (lto_cache_lookup_DIE): Likewise.
5264 (lto_read_referenced_type_DIE): Use the cache.
5265 (lto_read_pointer_type_DIE): Robustify.
5266 (lto_read_DIE): Use the cache.
5267 * lto.h (hashtab.h): Include.
5268 (lto_info_fd): Add DIE cache.
5269 * Make-lang.in (LTO_H): New variable.
5270 (lto/lto-lang.o): Use LTO_H.
5271 (lto/lto-elf.o): Likewise.
5272 (lto/lto-symtab.o): Likewise.
5273
52742006-07-09 Mark Mitchell <mark@codesourcery.com>
5275
5276 * lto.c (lto_abi_mismatch_error): New function.
5277 (lto_abbrev_read): Initialize num_abbrevs.
5278 (lto_read_form): Specify allowed form classes for
5279 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5280 (lto_read_variable_formal_parameter_constant_DIE): Handle
5281 DW_AT_declaration. Call lto_symtab_merge_var.
5282 (lto_read_pointer_type_DIE): New function.
5283 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5284 not creat TYPE_DECLs for types that already have them.
5285 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5286 (lto_set_cu_context): Make cu_start point to the header, not the
5287 first DIE.
5288 (lto_file_read): Adjust for change to lto_set_cu_context.
5289 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5290 (lto/lto-symtab.o): New rule.
5291 * lto-tree.h (lang_identifier): Add decl field.
5292 (LANG_IDENTIFIER_CAST): New macro.
5293 (LTO_IDENTIFIER_DECL): Likewise.
5294 (lto_symtab_merge_var): Declare.
5295 * lto-symtab.c: New file.
5296
52972006-07-02 Daniel Berlin <dberlin@dberlin.org>
5298
5299 * lto.c (lto_context): Add current_cu and info_fd members.
5300 (DWARF2_CompUnit): New structure.
5301 (lto_read_DIE): Take lto_info_fd *.
5302 (lto_read_child_DIEs): Ditto.
5303 (lto_file_corrupt_error): Constify argument.
5304 (lto_set_cu_context): New function
5305 (lto_info_fd_init): Ditto.
5306 (lto_info_fd_close): Ditto.
5307 (lto_file_init): Use lto_info_fd_init.
5308 (lto_file_close): Use lto_info_fd_close.
5309 (lto_read_initial_length): Pass in pointer to header size.
5310 (lto_read_comp_unit_header): Correct cu_length to
5311 real length from beginning of header. Take lto_info_fd * as
5312 argument.
5313 (find_cu_for_offset): New function.
5314 (lto_read_form): Change first argument to lto_info_fd *.
5315 Add FORM_CONTEXT argument.
5316 Handle DW_FORM_ref_addr.
5317 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5318 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5319 Swap contexts if necessary for form.
5320 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5321 lto_file_corrupt_error.
5322 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5323 (lto_read_referenced_type_DIE): Change first argument to
5324 lto_info_fd *. Access lto_fd fields through base pointer.
5325 (lto_read_compile_unit_DIE): Change first argument to an
5326 lto_info_fd *.
5327 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5328 (lto_read_base_type_DIE): Ditto.
5329 (lto_read_child_DIEs): Ditto.
5330 (lto_read_DIE): Ditto. Change type of function pointer.
5331 (lto_info_read): New function.
5332 (lto_set_cu_context): Ditto.
5333 (lto_file_read): Use lto_info_read, walk resulting CU's
5334 (lto_main): Update for lto_info_fd change.
5335 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5336 necessary.
5337 * lto.h (DWARF2_CompUnit): New structure.
5338 (lto_info_fd): Ditto.
5339 (lto_file): Change debug_info to be an lto_info_fd.
5340
53412006-06-25 Mark Mitchell <mark@codesourcery.com>
5342
5343 * lto.c (toplev.h): Include it.
5344 (dwarf2.h): Likewise.
5345 (tree.h): Likewise.
5346 (tm.h): Likewise.
5347 (cgraph.h): Likewise.
5348 (ggc.h): Likewise.
5349 (inttypes.h): Likewise.
5350 (DWARF2_attr): New type.
5351 (DWARF2_abbrev): Likewise.
5352 (DWARF2_class): Likewise.
5353 (DWARF2_form_data): Likewise.
5354 (lto_context): Likewise.
5355 (lto_fd_init): New function.
5356 (lto_abbrev_fd_init): Likewise.
5357 (lto_abbrev_fd_close): Likewise.
5358 (lto_file_init): Use them.
5359 (lto_file_close): New function.
5360 (lto_file_corrupt_error): Likewise.
5361 (LTO_CHECK_INT_VAL): New macro.
5362 (lto_check_size_t_val): New function.
5363 (lto_check_int_val): Likewise.
5364 (LTO_READ_TYPE): New macro.
5365 (lto_read_ubyte): New function.
5366 (lto_read_uhalf): Likewise.
5367 (lto_read_uword): Likewise.
5368 (lto_read_uleb128): Likewise.
5369 (lto_read_initial_length): Likewise.
5370 (lto_abbrev_read_attrs): Likewise.
5371 (lto_abbrev_read): Likewise.
5372 (lto_abbrev_lookup): Likewise.
5373 (lto_read_section_offset): Likewise.
5374 (lto_read_comp_unit_header): Likewise.
5375 (lto_read_form): Likewise.
5376 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5377 (LTO_BEGIN_READ_ATTRS): Likewise.
5378 (LTO_END_READ_ATTRS): Likewise.
5379 (lto_unsupported_attr_error): New function.
5380 (lto_get_identifier): Likewise.
5381 (lto_read_referenced_type_DIE): Likewise.
5382 (lto_read_compile_unit_DIE): Likewise.
5383 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5384 (lto_read_base_type_DIE): Likewise.
5385 (lto_read_DIE): Likewise.
5386 (lto_read_child_DIEs): Likewise.
5387 (lto_file_read): Read DIEs.
5388 (lto_main): Ask middle end to emit entities.
5389 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5390 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5391 (lto_elf_file_close): Likewise.
5392 * lto.h (lto_file): Declare.
5393 (DWARF2_abbrev): Likewise.
5394 (lto_fd): New type.
5395 (lto_abbrev_fd): Likewise.
5396 (lto_file): Use new types.
5397 (lto_file_close): Declare.
5398 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5399
54002006-06-18 Mark Mitchell <mark@codesourcery.com>
5401
5402 * lto.h: New file.
5403 * lto.c: New file.
5404 * lto-elf.c: New file.
5405 * lto-lang.c (flags.h): Include it.
5406 (lto.h): Likewise.
5407 (lto_init): New function.
5408 (lto_write_globals): Remove.
5409 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5410 (LANG_HOOKS_INIT): Define.
5411 (LANG_HOOKS_PARSE_FILE): Likewise.
5412 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5413 (LTO_EXE): Link with libelf.
5414 (lto/lto-lang.o): Update dependencies.
5415 (lto/lto.o): New target.
5416 (lto/lto-elf.o): Likewise.
5417
54182006-06-12 Mark Mitchell <mark@codesourcery.com>
5419
5420 * config-lang.in: New file.
5421 * Make-lang.in: Likewise.
5422 * lto-tree.h: Likewise.
5423 * lto-lang.c: Likewise.
f1717362 5424\f
5425Copyright (C) 2006-2016 Free Software Foundation, Inc.
7bfefa9d 5426
f1717362 5427Copying and distribution of this file, with or without modification,
5428are permitted in any medium without royalty provided the copyright
5429notice and this notice are preserved.