]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
tree.c (gimple_canonical_types_compatible_p): Do not compare function attributes.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
872d5034
JH
12015-05-19 Jan Hubicka <hubicka@ucw.cz>
2
3 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
4
259d29e3
JH
52015-05-17 Jan Hubicka <hubicka@ucw.cz>
6
7 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
8 compare ODR types (if available) and function types.
9 (lto_symtab_merge): ... here; output ODR violation warnings
10 and call warn_types_mismatch.
11
b0845a1e
JH
122015-04-29 Jan Hubicka <hubicka@ucw.cz>
13
14 * lto.c (lto_fixup_state): Call verify_type.
15
67f58944
TS
162015-04-18 Trevor Saunders <tsaunders@mozilla.com>
17
b0845a1e 18 * lto.c: Adjust for hash_table changes.
67f58944 19
36ceb0e3
JH
202015-03-27 Jan Hubicka <hubicka@ucw.cz>
21
22 * lto.c (lto_read_decls): Move code registering odr types out
23 of TYPE_CANONICAL conditional and also register polymorphic types.
24
afd1e7c6
JH
252015-03-26 Jan Hubicka <hubicka@ucw.cz>
26
27 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
28 DECL_ARTIFICAL symbols.
29
eaeec5ec
JH
302015-03-26 Jan Hubicka <hubicka@ucw.cz>
31
32 PR lto/65536
33 * lto.c (unify_scc): Revert location cache when unification
34 suceeded.
35 (lto_read_decls): Accept location cache after sucess;
36 apply location cache before calling debug hooks.
37
1c4db829
JH
382015-03-10 Jan Hubicka <hubicka@ucw.cz>
39
40 * lto.c (read_cgraph_and_symbols): Do not do merging
41 at ltrans stage.
42
db847fa8
JJ
432015-02-26 Jakub Jelinek <jakub@redhat.com>
44
45 * lto.c (lto_mode_identity_table): New variable.
46 (lto_read_decls): Add mode_table argument to the lto_input_block
47 constructor.
48 (lto_file_finalize): Initialize mode_table.
49 (lto_init): Initialize lto_mode_identity_table.
50
56a9f6bc
TS
512015-02-24 Thomas Schwinge <thomas@codesourcery.com>
52
53 PR libgomp/64625
54 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
55 Remove macros.
56 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
57
ebc8f0bb
JH
582015-02-03 Jan Hubicka <hubicka@ucw.cz>
59
60 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
61
40fecdd6
JM
622015-01-30 Joseph Myers <joseph@codesourcery.com>
63
64 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
65 changed to pass input_location as first argument.
66
040968a8
JH
672014-12-11 Jan Hubicka <hubicka@ucw.cz>
68
69 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
70
69fe4502
JH
712014-12-11 Jan Hubicka <hubicka@ucw.cz>
72
73 * lto.c (compare_tree_sccs_1): Add comparsion of
74 DECL_FUNCTION_SPECIFIC_TARGET
75
41dbbb37
TS
762015-01-15 Thomas Schwinge <thomas@codesourcery.com>
77 James Norris <jnorris@codesourcery.com>
78
79 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
80 New macros.
81 * lto.c: Include "gomp-constants.h".
82
837bac8c
IV
832015-01-14 Ilya Verbin <ilya.verbin@intel.com>
84
85 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
86 from select_what_to_stream.
87
1b34e6e2
BS
882015-01-09 Bernd Schmidt <bernds@codesourcery.com>
89 Jakub Jelinek <jakub@redhat.com>
90
91 PR middle-end/64412
92 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
93 if ACCEL_COMPILER.
94
adfac8df
JJ
952015-01-09 Michael Collison <michael.collison@linaro.org>
96
97 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
98 input.h, alias.h, symtab.h, options, fold-const.h,
99 wide-int.h, and inchash.h due to flattening of tree.h.
100 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
101 input.h, alias.h, symtab.h, fold-const.h,
102 wide-int.h, and inchash.h due to flattening of tree.h.
103 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
104 input.h, alias.h, symtab.h, options, fold-const.h,
105 wide-int.h, and inchash.h due to flattening of tree.h.
106 * lto-partition.c: Ditto.
107 * lto-symtab.c: Ditto.
108
5624e564
JJ
1092015-01-05 Jakub Jelinek <jakub@redhat.com>
110
111 Update copyright years.
112
9a1e784a
ML
1132014-12-22 Martin Liska <mliska@suse.cz>
114
115 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
116 is used.
117 (undo_partition): Likewise.
118 (lto_balanced_map): Likewise.
119
dd912cb8
ML
1202014-12-22 Martin Liska <mliska@suse.cz>
121
122 * lto-partition.c: Include of symbol-summary.h is added.
123 * lto-symtab.c: Likewise.
124 * lto.c: Likewise.
125
17e0fc92
JH
1262014-12-11 Jan Hubicka <hubicka@ucw.cz>
127
128 PR ipa/61324
129 * lto.c (read_cgraph_and_symbols): Update call of
130 remove_unreachable_nodes.
131 (do_whole_program_analysis): Remove call of
132 symtab->remove_unreachable_nodes
133
58dddbd2
TS
1342014-12-08 Trevor Saunders <tsaunders@mozilla.com>
135
136 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
137 htab with malloc instead of ggc.
138
907dadbd
TS
1392014-11-20 Trevor Saunders <tsaunders@mozilla.com>
140
141 * lto.c: Replace htab with hash_table.
142
9c71e9df
TS
1432014-11-20 Trevor Saunders <tsaunders@mozilla.com>
144
145 * lto.c (lto_read_in_decl_state): Adjust.
146 (lto_fixup_state): Likewise.
147
72a4a8b0
JH
1482014-11-17 Jan Hubicka <hubicka@ucw.cz>
149
150 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
151
54e774c0
JH
1522014-11-14 Jan Hubicka <hubicka@ucw.cz>
153
154 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
155
1f6be682
IV
1562014-11-13 Ilya Verbin <ilya.verbin@intel.com>
157 Bernd Schmidt <bernds@codesourcery.com>
158 Andrey Turetskiy <andrey.turetskiy@intel.com>
159 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
160
ec6fe917
IV
161 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
162
1632014-11-13 Ilya Verbin <ilya.verbin@intel.com>
164 Ilya Tocar <ilya.tocar@intel.com>
165 Andrey Turetskiy <andrey.turetskiy@intel.com>
166 Bernd Schmidt <bernds@codesourcery.com>
167
1f6be682
IV
168 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
169 LTO_SECTION_NAME_PREFIX.
170 * lto-partition.c (lto_promote_cross_file_statics): Call
171 select_what_to_stream.
172 * lto.c (lto_section_with_id): Use section_name_prefix instead of
173 LTO_SECTION_NAME_PREFIX.
174 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
175 being built as an offload compiler.
176
ef4bddc2
RS
1772014-10-29 Richard Sandiford <richard.sandiford@arm.com>
178
179 * lto-lang.c: Remove redundant enum from machine_mode.
180
c582198b
AM
1812014-10-28 Andrew MacLeod <amacleod@redhat.com>
182
183 * lto.c: Adjust include files.
184 * lto-lang.c: Ditto.
185 * lto-object.c: Ditto.
186 * lto-partition.c: Ditto.
187 * lto-symtab.c: Ditto.
188
60393bbc
AM
1892014-10-27 Andrew MacLeod <amacleod@redhat.com>
190
191 * lto-lang.c: Adjust include files.
192 * lto-object.c: Ditto.
193 * lto-partition.c: Ditto.
194 * lto-symtab.c: Ditto.
195 * lto.c: Ditto.
196
957f47e6
DD
1972014-10-16 DJ Delorie <dj@redhat.com>
198
199 * lto-object.c (lto_obj_begin_section): In the event that pointer
200 sizes aren't powers of two, choose a more suitable alignment
201 than (unsigned)(-1).
202
78a7c317
DD
2032014-10-14 DJ Delorie <dj@redhat.com>
204
205 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
206 size-type as well.
207 (lto_init): Initialize all intN types, not just int128.
208
70261a4f
ML
2092014-10-06 Martin Liska <mliska@suse.cz>
210
211 * lto.c (stream_out): ARG_UNUSED added for last argument.
212
00de328a
AH
2132014-09-24 Aldy Hernandez <aldyh@redhat.com>
214
215 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
216 DECL_ABSTRACT_P.
217
7861b648
AK
2182014-09-23 Andi Kleen <ak@linux.intel.com>
219
220 * lto-partition.c (node_cmp): Update comment.
221 (varpool_node_cmp): Use symtab_node for comparison.
222 (add_sorted_nodes): New function.
223 (lto_balanced_map): Change to keep ordered queue
224 of ordered node. Handle no_reorder attribute.
225
1ee85ee1
JH
2262014-09-11 Jan Hubicka <hubicka@ucw.cz>
227
228 * lto.c (lto_read_decls): Register ODR types.
229
8605403e
JH
2302014-08-20 Jan Hubicka <hubicka@ucw.cz>
231
232 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
233 call.
234 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
235
56b1f114
JH
2362014-08-14 Jan Hubicka <hubicka@ucw.cz>
237
238 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
239
833f94c0
RB
2402014-08-14 Richard Biener <rguenther@suse.de>
241
242 PR lto/62067
243 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
244
207c68cd
RB
2452014-08-08 Richard Biener <rguenther@suse.de>
246
247 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
248
7c581d61
BC
2492014-08-08 Bin Cheng <bin.cheng@arm.com>
250
251 PR lto/62032
252 * lto-lang.c (lto_init): Switch mis-matched arguments.
253
39c8aaa4
TS
2542014-08-07 Trevor Saunders <tsaunders@mozilla.com>
255
256 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
257
6e2830c3
TS
2582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
259
260 * lto-partition.c, lto-partition.h: Use hash_set instead of
261 pointer_set.
262
50de5793
AK
2632014-07-31 Andi Kleen <ak@linux.intel.com>
264
265 * lto.c (hash_canonical_type): Use inchash::hash
266 and use inchash::add_expr.
267 (iterative_hash_canonical_type): Dito.
268
f6bcdb5e
RB
2692014-07-30 Richard Biener <rguenther@suse.de>
270
271 * lto-streamer.h (lto_write_data): New function.
272 * langhooks.c (lhd_append_data): Do not free block.
273 * lto-section-out.c (lto_write_data): New function writing
274 raw data to the current section.
275 (lto_write_stream): Adjust for langhook semantic change.
276 (lto_destroy_simple_output_block): Write header directly.
277 * lto-opts.c (lto_write_options): Write options directly.
278 * lto-streamer-out.c (produce_asm): Write heaeder directly.
279 (lto_output_toplevel_asms): Likewise.
280 (copy_function_or_variable): Copy data directly.
281 (write_global_references): Output index table directly.
282 (lto_output_decl_state_refs): Likewise.
283 (write_symbol): Write data directly.
284 (produce_symtab): Adjust.
285 (produce_asm_for_decls): Output header and refs directly.
286
56fdfd3e
AK
2872014-07-25 Andi Kleen <ak@linux.intel.com>
288
289 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
290
0bd8bb04
AK
2912014-07-25 Andi Kleen <ak@linux.intel.com>
292
293 * lto.c (hash_canonical_type): Convert to inchash.
294 (iterative_hash_canonical_type): Dito.
295
6d8eb96b
AK
2962014-07-25 Andi Kleen <ak@linux.intel.com>
297
298 * lto.c: Include inchash.h
299
ad115a3c
JH
3002014-07-14 Jan Hubicka <hubicka@ucw.cz>
301
302 * lto.c (mentions_vars_p_decl_non_common): Skip
303 DECL_ARGUMENT_FLD.
304 mentions_vars_p_function): Do DECL_ARGUMENTS.
305 (lto_fixup_prevailing_decls): Update.
306
917dd9bf
JH
3072014-07-12 Jan Hubicka <hubicka@ucw.cz>
308
309 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
310 timevar
311 (materialize_cgraph): Do not push GIMPLE_IN timevar.
312
0b83e688
JH
3132014-07-11 Jan Hubicka <hubicka@ucw.cz>
314
315 * lto-partition.c (add_references_to_partition): Use
316 varpool_ctor_useable_for_folding_p.
317 * lto.c (lto_read_in_decl_state): Update sanity check.
318
e55637b7
ML
3192014-07-01 Martin Liska <mliska@suse.cz>
320
321 IPA REF alias refactoring
322 * lto-partition.c (add_symbol_to_partition_1): Usage of
323 FOR_EACH_ALIAS added.
324
010f4e27
JH
3252014-06-28 Jan Hubicka <hubicka@ucw.cz>
326
327 Revert:
328 * lto.c (lto_copy_fields_not_streamed): New function.
329 (compare_tree_sccs_1): Do not compare fields shared in between type
330 and variant.
331 (lto_read_decls): Fixup types first before inserting into hash.
332
b82fe354
AP
3332014-06-28 Andrew Pinski <apinski@cavium.com>
334
335 * lto.c (lto_read_decls): Fix comment in comment.
336
288eeff7
JH
3372014-06-28 Jan Hubicka <hubicka@ucw.cz>
338
339 * lto.c (lto_copy_fields_not_streamed): New function.
340 (compare_tree_sccs_1): Do not compare fields shared in between type
341 and variant.
342 (lto_read_decls): Fixup types first before inserting into hash.
343
e01fa630
ML
3442014-06-25 Martin Liska <mliska@suse.cz>
345
346 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
347 used.
348 (add_symbol_to_partition_1): Likewise.
349 (lto_balanced_map): Likewise.
350 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
351
aaf8a23e
JH
3522014-06-24 Jan Hubicka <hubicka@ucw.cz>
353
354 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
355 (mentions_vars_p_function): ... here.
356 (compare_tree_sccs_1): Update VINDEX checks.
357 (lto_fixup_prevailing_decls): Likewise.
358
1eb68d2d
TS
3592014-06-24 Trevor Saunders <tsaunders@mozilla.com>
360
361 * lto.c (canonical_type_hash_cache): Use hash_map instead of
362 pointer_map.
363
c203e8a7
TS
3642014-06-24 Trevor Saunders <tsaunders@mozilla.com>
365
366 * lto.c: Adjust.
367
714c800f
JH
3682014-06-20 Jan Hubicka <hubicka@ucw.cz>
369
370 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
371
569b1784
JH
3722014-06-20 Jan Hubicka <hubicka@ucw.cz>
373
374 * lto.c (compare_tree_sccs_1): Do not compare priorities.
375
56363ffd
JH
3762014-06-15 Jan Hubicka <hubicka@ucw.cz>
377
378 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
379
e257a17c
JH
3802014-06-10 Jan Hubicka <hubicka@ucw.cz>
381
382 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
383 (do_whole_program_analysis): Use verify_symtab.
384
24d047a3
JH
3852014-06-07 Jan Hubicka <hubicka@ucw.cz>
386
387 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
388 lto_fixup_prevailing_decls): Skip section names.
389
9b2b7279
AM
3902014-06-02 Andrew MacLeod <amacleod@redhat.com>
391
392 * lto-symtab.c: Include builtins.h.
393
a9243bfc
RB
3942014-05-26 Richard Biener <rguenther@suse.de>
395
396 * lto.c (lto_parse_hex): Use int64_t.
397 (lto_resolution_read): Likewise.
398
fd1e9302
JH
3992014-05-23 Jan Hubicka <hubicka@ucw.cz>
400
401 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
402
aede2c10
JH
4032014-05-23 Jan Hubicka <hubicka@ucw.cz>
404
405 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
406 symtab pointer.
407 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
408
f6a7cffc
TS
4092014-05-22 Thomas Schwinge <thomas@codesourcery.com>
410
411 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
412 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
413 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
414
4000360e
BS
4152012-05-22 Bernd Schmidt <bernds@codesourcery.com>
416
417 * lto-object.c: Include "lto-section-names.h".
418 (LTO_SEGMENT_NAME): Don't define.
419 * lto.c: Include "lto-section-names.h".
420
b9559136
JH
4212014-05-17 Jan Hubicka <hubicka@ucw.cz>
422
423 PR lto/61012
424 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
425 mixed with variables.
426
766090c2
TS
4272014-05-17 Trevor Saunders <tsaunders@mozilla.com>
428
429 * lto-tree.h: Don't use variable_size gty attribute.
430 * lto.c (lto_read_in_decl_state): Adjust.
431 (create_subid_section_table): Likewise.
432 (lto_flatten_files): Likewise.
433 (read_cgraph_and_symbols): Likewise.
434
1d60af08
KZ
4352014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
436 Mike Stump <mikestump@comcast.net>
437 Richard Sandiford <rdsandiford@googlemail.com>
438
439 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
440 * lto-lang.c (get_nonnull_operand): Likewise.
441
22869a37
RB
4422014-04-28 Richard Biener <rguenther@suse.de>
443
444 PR middle-end/60092
445 * lto-lang.c: Define flag_isoc11.
446
7de90a6c
DM
4472014-04-23 David Malcolm <dmalcolm@redhat.com>
448
449 * lto-partition.c (add_references_to_partition): Update for
450 removal of implicit pointer from the is-a.h API.
451 (add_symbol_to_partition_1): Likewise.
452 (contained_in_symbol): Likewise.
453 (undo_partition): Likewise.
454 (lto_balanced_map): Likewise.
455 (promote_symbol): Likewise.
456 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
457 (lto_symtab_merge_symbols): Likewise.
458 * lto.c (lto_wpa_write_files): Likewise.
459
783dab6b
RB
4602014-04-15 Richard Biener <rguenther@suse.de>
461
462 * lto.c: Include params.h.
463 (do_whole_program_analysis): Switch on flag_lto_partition value,
464 add support for LTO_PARTITION_ONE.
465 * lto-partition.h (lto_balanced_map): Adjust.
466 * lto-partition.c (lto_balanced_map): Get number of desired
467 partitions as argument to support -flto-partition=one.
468
cb90235d
JH
4692014-04-14 Jan Hubicka <hubicka@ucw.cz>
470
471 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
472 tp_first_run.
473
bbe281da
JH
4742014-03-19 Jan Hubicka <hubicka@ucw.cz>
475
476 * lto.c: Include ipa-inline.h
477 (do_whole_program_analysis): Free inline summary after partitioning.
478
ce2f49b3
RB
4792014-03-19 Richard Biener <rguenther@suse.de>
480
481 PR middle-end/60553
482 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
483 instead of TREE_CHAIN as chain_next.
484
e41106fc
RB
4852014-03-19 Richard Biener <rguenther@suse.de>
486
487 * lto.c (lto_wpa_write_files): Move call to
488 lto_promote_cross_file_statics ...
489 (do_whole_program_analysis): ... here, into the partitioning
490 block. Do not ggc_collect after lto_wpa_write_files but
491 for a last time before it.
492
15df2655
JJ
4932014-03-19 Jakub Jelinek <jakub@redhat.com>
494
495 PR lto/60571
496 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
497 Fix formatting.
498
415e2e6b
JJ
4992014-03-18 Jakub Jelinek <jakub@redhat.com>
500
501 PR sanitizer/60535
502 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
503 and complex_{float,{,long_}double}_type_node.
504
f42c637e
PM
5052014-03-08 Paulo Matos <paulo@matos-sorge.com>
506
415e2e6b
JJ
507 * lto-lang.c (lto_init): Pass flag_short_double to
508 build_common_tree_nodes.
f42c637e 509
6dab804d
JH
5102014-02-14 Jan Hubicka <hubicka@ucw.cz>
511
512 PR lto/60295
513 * lto.c (stream_out): Avoid parallel streaming with
514 -flto=jobserver until we are able to throttle it down
515 resonably.
516
39434bce
JH
5172014-02-14 Jan Hubicka <hubicka@ucw.cz>
518
519 * lto-partition.c (add_symbol_to_partition_1,
520 undo_partition, lto_balanced_map): Aliases have no
521 defined size.
522 (lto_balanced_map): Do not follow refering variables
523 if they can be optimized out.
524
1966fd99
RB
5252014-02-14 Richard Biener <rguenther@suse.de>
526
527 PR lto/60179
528 * lto.c (compare_tree_sccs_1): Do not compare
529 DECL_FUNCTION_SPECIFIC_TARGET.
530 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
531
283416b3
RB
5322014-02-12 Richard Biener <rguenther@suse.de>
533
534 PR lto/60060
535 * lto-lang.c (lto_write_globals): Do not call
536 wrapup_global_declarations or emit_debug_global_declarations
537 but emit debug info for non-function scope variables
538 directly.
539
b7e85694
JH
5402014-02-06 Jan Hubicka <hubicka@ucw.cz>
541
542 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
543
96451279
JH
5442014-02-06 Jan Hubicka <hubicka@ucw.cz>
545
546 PR ipa/59469
547 * lto-partition.c (symbol_class): Move to cgraph.h
548 (get_symbol_class): Move to symtab.c
549 (add_references_to_partition, add_symbol_to_partition_1,
550 lto_max_map, lto_1_to_1_map, lto_balanced_map,
551 lto_promote_cross_file_statics): Update.
552
f300e7b8
JH
5532014-02-05 Jan Hubicka <hubicka@ucw.cz>
554
555 * lto.c (lto_parallelism): New static var.
556 (do_stream_out, wait_for_child, stream_out): New static functions.
557 (lto_wpa_write_files): Add support for parallel streaming.
558 (do_whole_program_analysis): Set parallelism.
559 * lang.opt (fwpa): Add parameter.
560 * lto-lang.c (lto_handle_option): Handle flag_wpa.
561 (lto_init): Update use of flag_wpa.
562 * lto-streamer.h (asm_nodes_output): Declare.
563
f0f91770
RB
5642014-02-05 Richard Biener <rguenther@suse.de>
565
566 * lto.h (lto_global_var_decls): Remove.
567 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
568 (lto_write_globals): Do nothing in WPA stage, gather globals from
569 the varpool here ...
570 * lto.c (lto_main): ... not here.
571 (materialize_cgraph): Do not call rest_of_decl_compilation
572 on the empty lto_global_var_decls vector.
573 (lto_global_var_decls): Remove.
574
d665f8dd
JH
5752014-02-04 Jan Hubicka <hubicka@ucw.cz>
576
577 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
578 needs duplicating, not generic COMDAT.
579
c39276b8
RB
5802014-02-04 Richard Biener <rguenther@suse.de>
581
582 PR lto/59723
583 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
584 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
585
5f876ae7
JH
5862014-02-04 Jan Hubicka <hubicka@ucw.cz>
587 Markus Trippelsdorf
588
589 PR ipa/59469
590 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
591 merge force_output and forced_by_abi flags.
592
b72271b9
BI
5932014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
594
595 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
596 flag_cilkplus.
597
63124c48
RB
5982014-01-09 Richard Biener <rguenther@suse.de>
599
600 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
601
d05b9920
RB
6022014-01-09 Richard Biener <rguenther@suse.de>
603
604 PR lto/45586
605 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
606 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
607 (gimple_canonical_types_compatible_p): Do not compare them either.
608
23a5b65a
RS
6092014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
610
611 Update copyright years
612
2c8326a5
OE
6132013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
614
615 * lto.c: Remove struct tags when referring to class varpool_node.
616 * lto-partition.c: Likewise.
617 * lto-symtab.c: Likewise.
618
e06f9964
JJ
6192013-11-29 Jakub Jelinek <jakub@redhat.com>
620 Richard Biener <rguenther@suse.de>
621
622 PR lto/59326
623 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
624
c193f58b
JJ
6252013-11-29 Jakub Jelinek <jakub@redhat.com>
626
627 PR lto/59326
628 * lto.c (mentions_vars_p_omp_clause): New function.
629 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
630 after return stmts.
631
2fb9a547
AM
6322013-11-22 Andrew MacLeod <amacleod@redhat.com>
633
634 * lto.c: Add required include files from gimple.h.
635 * lto-lang.c: Likewise
636 * lto-object.c: Likewise
637 * lto-partition.c: Likewise
638 * lto-symtab.c: Likewise
639
fec39fa6
TS
6402013-11-18 Trevor Saunders <tsaunders@mozilla.com>
641
642 * lto-partition.c lto-symtab.c lto.c Adjust.
643
d8a2d370
DN
6442013-11-14 Diego Novillo <dnovillo@google.com>
645
646 * lto-lang.c: Include stringpool.h.
647 Include stor-layout.h.
648 * lto-partition.c: Include gcc-symtab.h.
649 * lto.c: Include stor-layout.h.
650
5e20cdc9
DM
6512013-10-31 David Malcolm <dmalcolm@redhat.com>
652
653 Automated part of renaming of symtab_node_base to symtab_node.
654
655 Patch autogenerated by rename_symtab.py from
656 https://github.com/davidmalcolm/gcc-refactoring-scripts
657 revision 58bb219cc090b2f4516a9297d868c245495ee622
658
659 * lto-partition.c (add_symbol_to_partition): Rename
660 symtab_node_base to symtab_node.
661 (get_symbol_class): Likewise.
662 (symbol_partitioned_p): Likewise.
663 (add_references_to_partition): Likewise.
664 (add_symbol_to_partition_1): Likewise.
665 (contained_in_symbol): Likewise.
666 (add_symbol_to_partition): Likewise.
667 (lto_1_to_1_map): Likewise.
668 (lto_max_map): Likewise.
669 (lto_balanced_map): Likewise.
670 (privatize_symbol_name): Likewise.
671 (promote_symbol): Likewise.
672 (may_need_named_section_p): Likewise.
673 (rename_statics): Likewise.
674 (lto_promote_statics_nonwpa): Likewise.
675 * lto-symtab.c (lto_symtab_merge): Likewise.
676 (lto_symtab_resolve_replaceable_p): Likewise.
677 (lto_symtab_symbol_p): Likewise.
678 (lto_symtab_resolve_can_prevail_p): Likewise.
679 (lto_symtab_resolve_symbols): Likewise.
680 (lto_symtab_merge_decls_2): Likewise.
681 (lto_symtab_merge_decls_1): Likewise.
682 (lto_symtab_merge_decls): Likewise.
683 (lto_symtab_merge_symbols_1): Likewise.
684 (lto_symtab_merge_symbols): Likewise.
685 (lto_symtab_prevailing_decl): Likewise.
686 * lto.c (lto_wpa_write_files): Likewise.
687 (read_cgraph_and_symbols): Likewise.
688 (do_whole_program_analysis): Likewise.
689
378cd6b1
DM
6902013-10-30 David Malcolm <dmalcolm@redhat.com>
691
692 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
693 declarations onto multiple lines to make things easier for
694 rename_symtab.py.
695 (lto_symtab_merge_decls_1): Likewise.
696 (lto_symtab_merge_symbols_1): Likewise.
697
939b37da
BI
6982013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
699
700 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
701 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
702 Plus is enabled.
703
67348ccc
DM
7042013-10-29 David Malcolm <dmalcolm@redhat.com>
705
706 Patch autogenerated by refactor_symtab.py from
707 https://github.com/davidmalcolm/gcc-refactoring-scripts
708 revision 58bb219cc090b2f4516a9297d868c245495ee622
709
710 * lto-partition.c (lto_promote_cross_file_statics): Update for
711 conversion of symtab types to a true class hierarchy.
712 (rename_statics): Likewise.
713 (promote_symbol): Likewise.
714 (privatize_symbol_name): Likewise.
715 (lto_balanced_map): Likewise.
716 (varpool_node_cmp): Likewise.
717 (node_cmp): Likewise.
718 (lto_1_to_1_map): Likewise.
719 (undo_partition): Likewise.
720 (add_symbol_to_partition): Likewise.
721 (contained_in_symbol): Likewise.
722 (add_symbol_to_partition_1): Likewise.
723 (add_references_to_partition): Likewise.
724 (symbol_partitioned_p): Likewise.
725 (get_symbol_class): Likewise.
726 (lto_max_map): Likewise.
727 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
728 (lto_symtab_merge_symbols): Likewise.
729 (lto_symtab_merge_symbols_1): Likewise.
730 (lto_symtab_merge_decls): Likewise.
731 (lto_symtab_merge_decls_1): Likewise.
732 (lto_symtab_merge_decls_2): Likewise.
733 (lto_symtab_resolve_symbols): Likewise.
734 (lto_symtab_resolve_can_prevail_p): Likewise.
735 (lto_symtab_symbol_p): Likewise.
736 (lto_symtab_resolve_replaceable_p): Likewise.
737 (lto_symtab_merge): Likewise.
738 (lto_varpool_replace_node): Likewise.
739 (lto_cgraph_replace_node): Likewise.
740 * lto.c (lto_main): Likewise.
741 (do_whole_program_analysis): Likewise.
742 (materialize_cgraph): Likewise.
743 (read_cgraph_and_symbols): Likewise.
744 (cmp_partitions_order): Likewise.
745 (lto_materialize_function): Likewise.
746 (has_analyzed_clone_p): Likewise.
747
8e9055ae
AM
7482013-10-29 Andrew MacLeod <amacleod@redhat.com>
749
750 * lto/lto-object.c: Add gimple.h to include list.
751 * lto/lto-partition.c: Likewise.
752
377d9792
AM
7532013-10-18 Andrew MacLeod <amacleod@redhat.com>
754
755 * lto.c: Remove tree-flow.h from include list.
756
fffda8d7
RB
7572013-10-15 Richard Biener <rguenther@suse.de>
758
759 * lto.c (hash_canonical_type): Split out from ...
760 (iterative_hash_canonical_type): ... here. Register types
761 we recurse to.
762 (gimple_canonical_type_hash): Adjust.
763 (gimple_register_canonical_type_1): Split out from ...
764 (gimple_register_canonical_type): ... here. Cache computed
765 hash value.
766 (lto_register_canonical_types): Split into two modes,
767 clearing and computing TYPE_CANONICAL.
768 (lto_read_decls): Adjust.
769 (read_cgraph_and_symbols): Do two passes over global trees,
770 first clearing then computing TYPE_CANONICAL.
771
1394237e
RB
7722013-10-14 Richard Biener <rguenther@suse.de>
773
774 * lto.c (gimple_canonical_types): Move out-of GC space.
775 (canonical_type_hash_cache): Make a pointer-map.
776 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
777 New counters.
778 (iterative_hash_canonical_type): Adjust.
779 (read_cgraph_and_symbols): Likewise.
780 (print_lto_report_1): Likewise.
781
0a387eca
RB
7822013-10-14 Richard Biener <rguenther@suse.de>
783
784 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
785 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
786 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
787 gimple_types_compatible_p_1, gimple_types_compatible_p,
788 visit, iterative_hash_name, struct type_hash_pair,
789 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
790 gimple_type_eq, gimple_register_type, num_not_merged_types,
791 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
792 num_not_merged_types_in_same_scc_trees): Remove old merging code
793 and statistics.
794 (lto_read_decls): Do not run old merging code in parallel.
795 (read_cgraph_and_symbols): Do not init/free old merging
796 data structures.
797 (print_lto_report_1): Do not report differences of old vs. new
798 merging code.
799
83fd5d11
RB
8002013-10-14 Richard Biener <rguenther@suse.de>
801
802 * lto-lang.c (lto_init): Do not re-init canonical types here.
803 (lto_register_canonical_types): Move to ...
804 * lto.c (lto_register_canonical_types): ... here.
805 (gimple_canonical_types, canonical_type_hash_cache,
806 iterative_hash_canonical_type, gimple_canonical_type_hash,
807 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
808 gimple_register_canonical_type): Add canonical type merging machinery
809 moved from gimple.c.
810 (read_cgraph_and_symbols): Init and free canonical type tables
811 here.
812 (print_lto_report_1): Report canonical type table stats here.
813
acf0174b
JJ
8142013-10-11 Jakub Jelinek <jakub@redhat.com>
815
816 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
817
7c6fedd2
TT
8182013-09-25 Tom Tromey <tromey@redhat.com>
819
820 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
821 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
822 (lto/lto-object.o): Remove.
823
35f32ad4
RB
8242013-09-06 Richard Biener <rguenther@suse.de>
825
826 * lto-symtab.c: Move from gcc/
827 * lto.h: Include vec.h.
828 (lto_global_var_decls): Declare.
829 * lto.c (lto_global_var_decls): Move definition here.
830 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
831 (lto-symtab.o): Add.
832 * config-lang.in (gtfiles): Add lto.h.
833
49322b12
JH
8342013-08-31 Jan Hubicka <jh@suse.cz>
835
836 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
837 DECL_FIELD_OFFSET can contain an reference to variable.
838
31f1f73b
JH
8392013-08-31 Jan Hubicka <jh@suse.cz>
840
841 * lto.c (tree_with_vars): Turn into vector.
842 (MAYBE_REMEMBER_WITH_VARS): Change to...
843 (CHECK_VAR): ... this one.
844 (CHECK_NO_VAR): New macro.
845 (maybe_remember_with_vars_typed): Turn to ...
846 (mentions_vars_p_typed): ... this one.
847 (maybe_remember_with_vars_common): Turn to ...
848 (mentions_vars_p_comon): ... this one.
849 (maybe_remember_with_vars_decl_minimal): Turn to ...
850 (mentions_vars_p_decl_minmal): ... this one.
851 (maybe_remember_with_vars_decl_common): Turn to ...
852 (mentions_vars_p_decl_common): ... this one.
853 (maybe_remember_with_vars_decl_with_vis): Turn to ...
854 (mentions_vars_p_decl_with_vis): ... this one.
855 (maybe_remember_with_vars_decl_non_common): Turn to ...
856 (mentions_vars_p_decl_non_common): ... this one.
857 (maybe_remember_with_vars_function): Turn to ...
858 (mentions_vars_p_function): ... this one.
859 (maybe_remember_with_vars_field_decl): Turn to ...
860 (mentions_vars_p_field_decl): ... this one.
861 (maybe_remember_with_vars_type): Turn to ...
862 (mentions_vars_p_type): ... this one.
863 (maybe_remember_with_vars_binfo): Turn to ...
864 (mentions_vars_p_binfo): ... this one.
865 (maybe_remember_with_vars_constructor): Turn to ...
866 (mentions_vars_p_constructor): ... this one.
867 (maybe_remember_with_vars_expr): Turn to ...
868 (mentions_vars_p_expr): ... this one.
869 (maybe_remember_with_vars): Turn to ...
870 (mentions_vars_p): ... this one.
871 (lto_read_decls): Update.
872 (LTO_SET_PREVAIL): Do not call function for internal decls.
873 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
874 check that something was updated.
875 (lto_fixup_state): Do not care about internal decls.
876 (lto_fixup_decls): Update.
877 (read_cgraph_and_symbols): Update.
878
256eefa9
JH
8792013-08-29 Jan Hubicka <jh@suse.cz>
880
881 * lto.c (read_cgraph_and_symbols): Free decl states.
882
0170f33c
JH
8832013-08-29 Jan Hubicka <jh@suse.cz>
884
885 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
886 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
887 TYPE_FINAL_P.
888
c01c111b
JH
8892013-08-28 Jan Hubicka <jh@suse.cz>
890
891 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
892 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
893 (unify_scc): Do checking assert.
894
6a49f3c9
JH
8952013-08-06 Jan Hubicka <jh@suse.cz>
896 Martin Liska <marxin.liska@gmail.com>
897
898 * lto-partition.c (lto_balanced_map): Always base order on
899 source file order.
900
a2e2a668
JH
9012013-08-06 Jan Hubicka <jh@suse.cz>
902
903 * lto.c (lto_materialize_function): Do not read body anymore.
904
815effe1
JH
9052013-08-02 Jan Hubicka <jh@suse.cz>
906
907 * lto.c (lto_materialize_function): Do not push struct function.
908 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
909 (may_need_named_section_p): Even abstract origins may need
910 named section.
911
315f8c0e
DM
9122013-07-30 David Malcolm <dmalcolm@redhat.com>
913
914 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
915 PASS_MANAGER_H.
916
917 * lto.c (do_whole_program_analysis): Update for move of
918 all_regular_ipa_passes from a global to a field of class
919 pass_manager.
920
1aa95df7
OB
9212013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
922
923 * lto-partition.c: Fix typos.
924
c525ba9a
JH
9252013-06-20 Jan Hubicka <jh@suse.cz>
926
927 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
928 partitioning of variables.
929
7a89ad00
JH
9302013-06-20 Jan Hubicka <jh@suse.cz>
931
932 * lto.c (read_cgraph_and_symbols): Set cgraph state.
933
6a6dac52
JH
9342013-06-19 Jan Hubicka <jh@suse.cz>
935
936 * lto-partition.c (add_references_to_partition): Use
937 ctor_for_folding.
938
ac0511f2
RB
9392013-06-18 Richard Biener <rguenther@suse.de>
940
941 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
942 and use it.
943 (lto_register_function_decl_in_symtab): Likewise.
944 (cmp_tree): New function.
945 (unify_scc): Instead of using the streamer cache map from entry
946 to cache index match up the two maps we have by sorting them.
947 Adjust calls to lto_register_var_decl_in_symtab and
948 lto_register_function_decl_in_symtab.
949
ee03e71d
RB
9502013-06-17 Richard Biener <rguenther@suse.de>
951
952 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
953 * lto.c: Include data-streamer.h.
954 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
955 (gimple_type_leader_entry_s, gimple_type_leader,
956 gimple_lookup_type_leader): Remove.
957 (gtc_visit): Simplify.
958 (gimple_types_compatible_p): Likewise.
959 (gimple_register_type_1): Likewise. Merge into ...
960 (gimple_register_type): ... this. Keep it as legacy for
961 statistics purposes for now.
962 (fixup_integer_cst): Remove.
963 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
964 rename to ...
965 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
966 maybe_remember_with_vars_*): ... these.
967 (uniquify_nodes): Remove.
968 (lto_fixup_prevailing_type): New function.
969 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
970 (tree_scc_hash, tree_scc_hash_obstack): New globals.
971 (num_merged_types, num_prevailing_types, num_not_merged_types,
972 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
973 total_scc_size_merged, num_sccs_merged, num_scc_compares,
974 num_scc_compare_collisions): New global counters.
975 (compare_tree_sccs_1): New function.
976 (compare_tree_sccs): Likewise.
977 (unify_scc): Likewise.
978 (lto_read_decls): Stream in tree SCCs and unify them on the
979 way in. Finalize prevailing SCC tree members.
980 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
981 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
982 to ggc-collect during merging.
983 (print_lto_report_1): Adjust for new merging code.
984
ca0f62a8
JH
9852013-06-12 Jan Hubicka <jh@suse.cz>
986
987 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
988
bbf9ad07
JH
9892013-06-12 Jan Hubicka <jh@suse.cz>
990
991 * lto.c (register_resolution): Take lto_file_data argument.
992 (lto_register_var_decl_in_symtab,
993 lto_register_function_decl_in_symtab): Update.
994 (read_cgraph_and_symbols): Update resolution_map handling.
995
ecdbd01a 9962013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
997
998 * lto-partition.c (get_symbol_class): Simplify weakref handling.
999 (add_symbol_to_partition_1): Likewise.
1000 (contained_in_symbol): Likewise.
1001 (lto_balanced_map): Likewise.
1002 (rename_statics): Drop weakref.
1003
a367df53
RB
10042013-06-05 Richard Biener <rguenther@suse.de>
1005
1006 * lto.c (num_merged_types): New global variable.
1007 (uniquify_nodes): Increase num_merged_types when merging a type.
1008 (print_lto_report_1): Output the number of merged types.
1009
40a7fe1e
JH
10102013-06-01 Jan Hubicka <jh@suse.cz>
1011
1012 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1013 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1014 (do_whole_program_analysis): Update dumping.
1015
e70670cf
JH
10162013-05-29 Jan Hubicka <jh@suse.cz>
1017
1018 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1019 flags.
1020 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1021
8ee05051
JH
10222013-05-15 Jan Hubicka <jh@suse.cz>
1023
1024 * lto-partition.c (privatize_symbol_name): Return true when
1025 privatizing happened.
1026 (rename_statics): Do not go into infinite loop when privatizing
1027 is not needed.
1028
427b248d
JM
10292013-05-16 Jason Merrill <jason@redhat.com>
1030
1031 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1032
9de04252
MJ
10332013-05-15 Martin Jambor <mjambor@suse.cz>
1034
1035 * lto-partition.c (lto_balanced_map): Print symbol order instead
1036 of node uids.
1037
2d6e4603
JH
10382013-05-15 Jan Hubicka <jh@suse.cz>
1039
1040 PR lto/57038
1041 PR lto/47375
1042 * lto-partition.c (get_symbol_class): Fix weakrefs.
1043 (lto_balanced_map): Fix weakrefs.
1044 (privatize_symbol_name): Remove unnecesary label.
1045 (rename_statics): Handle weakrefs as statics.
1046
64cfa6c0
JH
10472013-05-09 Jan Hubicka <jh@suse.cz>
1048 Richard Biener <rguenther@suse.de>
1049
1050 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1051 (lto_register_var_decl_in_symtab): Likewise.
1052 (lto_main): Promote statics.
1053 * lto-partition.c (privatize_symbol_name): New function.
1054 (promote_symbol): Use it.
1055 (may_need_named_section_p): New predicate.
1056 (rename_statics): New functions.
1057 (lto_promote_cross_file_statics): Simplify; do renaming.
1058 (lto_promote_statics_nonwpa): New function.
1059 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1060
e45cde98
RB
10612013-02-08 Richard Biener <rguenther@suse.de>
1062
1063 PR lto/56231
1064 * lto-lang.c (lto_init): Do not enter a dummy file.
1065
6edc3e32
UB
10662013-02-07 Uros Bizjak <ubizjak@gmail.com>
1067
1068 PR bootstrap/56227
1069 * lto.c (lto_resolution_ready): Use %wx instead of
1070 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1071
ed73881e
RG
10722013-02-04 Richard Guenther <rguenther@suse.de>
1073
1074 PR lto/56168
1075 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1076 or lto_fixup_decls at LTRANS time.
1077
a19b1432
JH
10782013-01-09 Jan Hubicka <jh@suse.cz>
1079
1080 PR lto/45375
1081 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1082
49c01f87
L
10832012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1084
1085 PR lto/55466
1086 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1087 variables.
1088 (lto_main): Record the global variables if WPA isn't enabled.
1089
6e1aa848
DN
10902012-11-20 Diego Novillo <dnovillo@google.com>
1091 Jakub Jelinek <jakub@redhat.com>
1092
1093 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1094
9771b263
DN
10952012-11-16 Diego Novillo <dnovillo@google.com>
1096
1097 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1098
1099 * lto-lang.c: Use new vec API in vec.h.
1100 * lto-partition.c: Likewise.
1101 * lto-partition.h: Likewise.
1102 * lto.c: Likewise.
1103
24551b9c
LC
11042012-10-31 Lawrence Crowl <crowl@google.com>
1105
1106 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1107 down-cast via dyn_cast.
1108 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1109 (undo_partition): Likewise.
1110 (lto_balanced_map): Likewise.
1111 (get_symbol_class): Likewise and via is_a.
1112 (lto_balanced_map): Change symtab checking to is_a.
1113
aec06f6f
RB
11142012-10-12 Richard Biener <rguenther@suse.de>
1115
1116 PR lto/54898
1117 * lto.c (gimple_types_compatible_p_1): Also compare
1118 TYPE_MAIN_VARIANT.
1119 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1120
0b8c30f9
TB
11212012-10-09 Tobias Burnus <burnus@net-b.de>
1122
1123 * lto-lang.c (lto_register_builtin_type): Avoid useless
1124 decl creation.
1125 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1126
da3202a8
TB
11272012-10-08 Tobias Burnus <burnus@net-b.de>
1128
1129 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1130 Free lto_file struct after closing the file.
1131
2512a443
JH
11322012-10-08 Jan Hubicka <jh@suse.cz>
1133
1134 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1135 (fixup_integer_cst): New functoin.
1136 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1137
e75f8f79
JH
11382012-10-07 Jan Hubicka <jh@suse.cz>
1139
1140 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1141 release input encoders.
1142 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1143
46591697
JH
11442012-10-06 Jan Hubicka <jh@suse.cz>
1145
1146 PR lto/54790
1147 * lto.c (resolution_map): New static var.
1148 (register_resolution): New function.
1149 (lto_register_var_decl_in_symtab): Use it.
1150 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1151
af16bc76
MJ
11522012-09-20 Martin Jambor <mjambor@suse.cz>
1153
1154 * lto.c (lto_materialize_function): Call push_struct_function and
1155 pop_cfun.
1156
5368224f
DC
11572012-09-19 Dehao Chen <dehao@google.com>
1158
1159 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1160
b5493fb2
JH
11612012-09-19 Jan Hubicka <jh@suse.cz>
1162
1163 * lto.c (lto_materialize_function): Update confused comment.
1164 (read_cgraph_and_symbols): Do not free symtab.
1165
c3c445e1
JH
11662012-09-12 Jan Hubicka <jh@suse.cz>
1167
1168 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1169 AUX pointer cleaning. Add max partitioning.
1170 * lto-partition.c (enum symbol_class): New.
1171 (get_symbol_class): New function.
1172 (symbol_partitioned_p): New function.
1173 (add_references_to_partition): Remove.
1174 (add_aliases_to_partition): Remove.
1175 (add_cgraph_node_to_partition_1): Remove.
1176 (add_cgraph_node_to_partition): Remove.
1177 (add_symbol_to_partition): New function.
1178 (add_symbol_to_partition_1): New function.
1179 (contained_in_symbol): New function.
1180 (partition_cgraph_node_p): Remove.
1181 (partition_varpool_node_p): Remove.
1182 (partition_symbol_p): Remove.
1183 (lto_1_to_1_map): Cleanup.
1184 (lto_max_map): New.
1185 (lto_balanced_map): Update.
1186 (lto_promote_cross_file_statics): Update.
1187 * lto-partition.h (lto_max_map): Declare.
1188 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1189
b5c7cdfb
JH
11902012-09-11 Jan Hubicka <jh@suse.cz>
1191
1192 PR lto/54312
1193 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1194 type is variant leader.
1195
b29402f0
RG
11962012-09-11 Richard Guenther <rguenther@suse.de>
1197
1198 * lto.c (enum gtc_mode): Remove.
1199 (struct type_pair_d): Adjust.
1200 (lookup_type_pair): Likewise.
1201 (gimple_type_leader): Do not mark as deletable.
1202 (gimple_lookup_type_leader): Adjust.
1203 (gtc_visit): Likewise.
1204 (gimple_types_compatible_p_1): Likewise.
1205 (gimple_types_compatible_p): Likewise.
1206 (gimple_type_hash): Likewise.
1207 (gimple_register_type): Likewise.
1208 (read_cgraph_and_symbols): Manage lifetime of tables
1209 here.
1210
b8f4e58f
RG
12112012-09-11 Richard Guenther <rguenther@suse.de>
1212
1213 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1214 struct type_pair_d, lookup_type_pair, struct sccs,
1215 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1216 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1217 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1218 visit, iterative_hash_name, struct type_hash_pair,
1219 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1220 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1221 Move here from gimple.c
1222 (read_cgraph_and_symbols): Free hash tables here.
1223 (print_lto_report_1): New function wrapping print_lto_report.
1224 (do_whole_program_analysis): Call it.
1225 (lto_main): Likewise.
1226
1cdbb3f9
JH
12272012-09-10 Jan Hubicka <jh@suse.cz>
1228
1229 * lto-partition.c (partition_symbol_p): Forward declare.
1230 (add_references_to_partition): Reimplement using partition_symbol_p.
1231 (add_aliases_to_partition): Break out from add_references_to_partition;
1232 reimplement using partition_symbol_p.
1233 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1234 add sanity checks.
1235 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1236 (partition_varpool_node_p): Do not special case aliases.
1237
b4661bfe
JH
12382012-08-12 Jan Hubicka <jh@suse.cz>
1239
1240 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1241 it is deleted after streaming.
1242 * lto-partition.c (partition_symbol_p): New function.
1243 (promote_var, promote_fn): Remove.
1244 (promote_symbol): New function.
1245 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1246 to lookup the actual boundaries instead of computing them ad-hoc.
1247
7b99cca4
JH
12482012-08-12 Jan Hubicka <jh@suse.cz>
1249
1250 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1251 in partitioning.
1252 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1253 by encoder.
1254 * lto-partition.c (new_partition): Update.
1255 * lto.c (cmp_partitions_order): Update.
1256 (lto_wpa_write_files): Update.
1257 (free_ltrans_partitions): Update.
1258 (add_references_to_partition): Update.
1259 (add_cgraph_node_to_partition_1): Update.
1260 (add_cgraph_node_to_partition): Update.
1261 (add_varpool_node_to_partition): Update.
1262 (undo_partition): Update.
1263 (lto_balanced_map): Update.
1264 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1265 set_referenced_from_this_partition_p): Update.
1266 (lto_promote_cross_file_statics): Update.
1267
f27c1867
JH
12682012-08-12 Jan Hubicka <jh@suse.cz>
1269
1270 * lto-partition.c (set_referenced_from_other_partition_p,
1271 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1272 New functions.
1273 (lto_promote_cross_file_statics): Use them.
1274
ab96cc5b
JH
12752012-07-24 Jan Hubicka <jh@suse.cz>
1276
1277 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1278
0229aee9
UB
12792012-07-24 Uros Bizjak <ubizjak@gmail.com>
1280
1281 * lto-tree.h (lang_decl): Add variable_size GTY option.
1282
7ee2468b
SB
12832012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1284
1285 * lto.c: Do not include timevar.h.
1286 * Make-lang.in: Fix dependencies.
1287
a910399d
LC
12882012-06-18 Lawrence Crowl <crowl@google.com>
1289
1290 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1291 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1292 to lto_wpa_write_files.
1293 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1294 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1295 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1296 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1297 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1298 to be a front end, but is not one.
1299
877ab5e9
JH
13002012-05-18 Jan Hubicka <jh@suse.cz>
1301
1302 * lto.c (lto_materialize_constructors_and_inits): Remove.
1303 (read_cgraph_and_symbols): Remove handling of alias pairs.
1304
6649df51
JH
13052012-05-17 Jan Hubicka <jh@suse.cz>
1306
1307 * lto-partition.c (add_references_to_partition): Handle external vars.
1308 (partition_varpool_node_p): Likewise.
1309 (lto_promote_cross_file_statics): Do not promote externals.
1310
d1ede5f4
BS
13112012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1312
1313 * lto-lang.c (handle_fnspec_attribute): New static function.
1314 (lto_attribute_table): Add "fn spec".
1315 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1316
0d6bf48c
JH
13172012-05-04 Jan Hubicka <jh@suse.cz>
1318
1319 * lto.c (do_whole_program_analysis): Set timevars correctly.
1320 (lto_main): Likewise.
d1ede5f4 1321
1d67dde8
RB
13222012-05-04 Richard Guenther <rguenther@suse.de>
1323
1324 * lang.opt (fwpa): Do not mark as Optimization.
1325 (fltrans): Likewise.
1326
65d630d4
JH
13272012-04-30 Jan Hubicka <jh@suse.cz>
1328
1329 * lto.c (lto_main): Use compile ().
1d67dde8
RB
1330 * lto-partition.c (partition_cgraph_node_p): Use
1331 symtab_used_from_object_file_p.
65d630d4
JH
1332 (partition_varpool_node_p): Likewise.
1333
ead84f73
JH
13342012-04-20 Jan Hubicka <jh@suse.cz>
1335
1336 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1337
5932a4d4
JH
13382012-04-18 Jan Hubicka <jh@suse.cz>
1339
1340 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1341 Update for new ipa-ref API.
1342
65c70e6b
JH
13432012-04-16 Jan Hubicka <jh@suse.cz>
1344
1345 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1346 walkers to walk cgraph and varpool.
1347 (materialize_cgraph): Likewise.
1348 * lto-partition.c (lto_1_to_1_map): Likewise.
1349 (lto_balanced_map): Likewise.
1350 (lto_promote_cross_file_statics): Likewise.
1351
960bfb69
JH
13522012-04-14 Jan Hubicka <jh@suse.cz>
1353
1354 * lto.c: Update field referenced for new cgraph/varpool layout.
1355 * lto-partition.c: Likewise.
1356
a66dc285
JH
13572012-04-11 Jan Hubicka <jh@suse.cz>
1358
1359 * lto.c: Update copyright; remove params.h, ipa-inline.h
1360 and ipa-utils.h inlines; inline lto-partition.h
1361 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1362 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1363 add_references_to_partition, add_cgraph_node_to_partition_1,
1364 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1365 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1366 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1367 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1368 * lto-partition.c: ... here; new file.
1369 * lto-partition.h: New file.
1370 * Make-lang.in (lto.o): Update dependencies.
1371 (lto-partition.o): New.
1372
f3b249e5
RG
13732012-04-05 Richard Guenther <rguenther@suse.de>
1374
1375 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1376 definition.
1377
21fa2faf
RG
13782012-03-12 Richard Guenther <rguenther@suse.de>
1379
1380 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1381
6bb485a3
RG
13822012-03-06 Richard Guenther <rguenther@suse.de>
1383
1384 PR lto/52097
1385 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1386
95510497
RG
13872012-02-28 Richard Guenther <rguenther@suse.de>
1388
1389 PR lto/52400
1390 * lto.c (lto_register_function_decl_in_symtab): Do not register
1391 a reverse renamed decl mapping.
1392
09228fef
JJ
13932012-01-06 Jakub Jelinek <jakub@redhat.com>
1394
1395 PR lto/51774
1396 * lto-lang.c (handle_returns_twice_attribute): New function.
1397 (lto_attribute_table): Add returns_twice attribute.
1398
b03eda0d
RG
13992011-12-21 Richard Guenther <rguenther@suse.de>
1400
1401 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1402 (LTO_FIXUP_TREE): Use it.
1403 (uniquify_nodes): Mark new non-prevailing types and avoid
1404 calling gimple_register_type on others.
1405 (lto_read_decls): Add comment.
1406
4ad9a9de
EB
14072011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1408
1409 * lto.h (lto_parse_hex): Delete.
1410 * lto.c (lto_read_decls): Use 'int' for offsets.
1411 (lto_parse_hex): Make static and return proper 64-bit host type.
1412 (lto_resolution_read): Use proper 64-bit host type.
1413
ea973bad
RG
14142011-12-13 Richard Guenther <rguenther@suse.de>
1415
1416 PR lto/48354
1417 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1418 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1419
c8218030
UB
14202011-12-01 Uros Bizjak <ubizjak@gmail.com>
1421
1422 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1423 (ignore_attribute): New.
1424
57ac2606
AH
14252011-11-21 Aldy Hernandez <aldyh@redhat.com>
1426
1427 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1428 (handle_transaction_pure_attribute): New.
1429
52a35ef7
RG
14302011-11-03 Richard Guenther <rguenther@suse.de>
1431
1432 PR lto/44965
1433 * lto-lang.c (lto_post_options): Do not read file options.
1434 * lto.c (lto_read_all_file_options): Remove.
1435 (lto_init): Call lto_set_in_hooks here.
1436
51973b1e
JH
14372011-10-09 Jan Hubicka <jh@suse.cz>
1438
1439 * lto.c (node_cmp, varpool_node_cmp): New functions.
1440 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1441 (cmp_partitions): Rename to ...
1442 (cmp_partitions_size): ... this one.
1443 (cmp_partitions_order): New function.
1444 (lto_wpa_write_files): Sort partitions by order when
1445 -fno-toplevel-reorder is used.
1446
5958009b
AK
14472011-10-09 Andi Kleen <ak@linux.intel.com>
1448
1449 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1450
e79983f4
MM
14512011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1452
1453 * lto-lang.c (def_builtin_1): Delete old interface with two
1454 parallel arrays to hold standard builtin declarations, and replace
1455 it with a function based interface that can support creating
1456 builtins on the fly in the future. Change all uses, and poison
1457 the old names. Make sure 0 is not a legitimate builtin index.
1458
ecdbd01a 14592011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
1460
1461 * lto-object.c (lto_obj_add_section_data): Add list.
1462 (lto_obj_add_section): Fill in list.
1463 (ltoobj_build_section_table): Pass through list.
1464 * lto.c (file_data_list): Declare.
1465 (create_subid_section_table): Pass arguments directly.
1466 Fill in list of file_datas.
1467 (lwstate): Delete.
1468 (lto_create_files_from_ids): Pass in direct arguments.
1469 Don't maintain list.
1470 (lto_file_read): Use explicit section and file data lists.
1471 (lto_read_all_file_options): Pass in section_list.
1472 * lto.h (lto_obj_build_section_table): Add list.
1473 (lto_section_slot): Add next.
1474 (lto_section_list): Declare.
1475
ed0d2da0
JH
14762011-10-02 Jan Hubicka <jh@suse.cz>
1477
1478 PR lto/47247
1479 * common.c (lto_resolution_str): Add new resolution.
1480 * common.h (lto_resolution_str): Likewise.
1481
ad7715f3
L
14822011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1483 Andi Kleen <ak@linux.intel.com>
1484
1485 PR lto/50568
1486 * lto.c (lto_splay_tree_delete_id): New.
1487 (lto_splay_tree_compare_ids): Likewise.
1488 (lto_splay_tree_lookup): Likewise.
1489 (lto_splay_tree_id_equal_p): Likewise.
1490 (lto_splay_tree_insert): Likewise.
1491 (lto_splay_tree_new): Likewise.
1492 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1493 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1494 (create_subid_section_table): Use lto_splay_tree_lookup and
1495 lto_splay_tree_insert.
1496 (lto_file_read): Use lto_splay_tree_new.
1497
ecdbd01a 14982011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
1499
1500 * lto.c (lto_resolution_read): Remove id dumping.
1501 (lto_section_with_id): Turn id HOST_WIDE_ID.
1502 (create_subid_section_table): Dito.
1503
892a371f
DS
15042011-08-28 Dodji Seketeli <dodji@redhat.com>
1505
1506 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1507 linemap_add twice.
1508
f82d1a94
MJ
15092011-08-11 Martin Jambor <mjambor@suse.cz>
1510
1511 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1512
f0efc7aa
DN
15132011-08-08 Diego Novillo <dnovillo@google.com>
1514
1515 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1516 * lto.c: Include tree-streamer.h.
1517
1a072294
RG
15182011-07-06 Richard Guenther <rguenther@suse.de>
1519
1520 * lto-lang.c (lto_init):
1521 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1522
7496868d
JH
15232011-06-11 Jan Hubicka <jh@suse.cz>
1524
10f13f22 1525 PR lto/48246
7496868d
JH
1526 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1527 (lto_balanced_map): Likewise.
1528
39e2db00
JH
15292011-06-11 Jan Hubicka <jh@suse.cz>
1530
1531 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1532 (add_cgraph_node_to_partition) ... here; walk aliases.
1533 (lto_1_to_1_map): Remove same body alias code.
1534 (promote_fn): Likewise.
1535 (lto_promote_cross_file_statics): Update comment.
1536
1537
28628ea6
DN
15382011-06-07 Diego Novillo <dnovillo@google.com>
1539
1540 * lto.c (uniquify_nodes): Move code to register decls to
1541 the loop that computes canonical types.
1542
009db074
RG
15432011-06-07 Richard Guenther <rguenther@suse.de>
1544
1545 * lto-lang.c (lto_init): Do not set
1546 size_type_node or call set_sizetype.
1547
47c79d56
DN
15482011-06-04 Diego Novillo <dnovillo@google.com>
1549
1550 * lto.c (lto_init): New.
1551 (lto_main): Call it.
1552
d5828cc7
DN
15532011-06-03 Diego Novillo <dnovillo@google.com>
1554
1555 * lto.c (get_resolution): Move from lto-streamer-in.c.
1556 (lto_register_var_decl_in_symtab): Likewise.
1557 (lto_register_function_decl_in_symtab): Likewise.
1558 (uniquify_nodes): Call lto_register_var_decl and
1559 lto_register_function_decl_in_symtab after reading a new
1560 VAR_DECL or FUNCTION_DECL.
1561
6807da97
RG
15622011-06-01 Richard Guenther <rguenther@suse.de>
1563
1564 * lto-lang.c (lto_register_canonical_types): New function.
1565 (lto_init): Register common nodes with the canonical type machinery.
1566 Do not play tricks with char_type_node.
1567
d74be317
RG
15682011-05-26 Richard Guenther <rguenther@suse.de>
1569
1570 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1571
d9f8303f
NF
15722011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1573
1574 * lto.c (lto_ft_typed): New function.
1575 (lto_ft_common): Call it.
1576 (lto_ft_constructor): Likewise.
1577 (lto_ft_expr): Likewise.
1578 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1579 TREE_CHAIN.
1580
fb291a1e
RG
15812011-05-20 Richard Guenther <rguenther@suse.de>
1582
1583 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1584 (lto_ft_type): Move main-variant and pointer-to chain building ...
1585 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1586 in a separate final loop.
1587
31b3ca64
RG
15882011-05-19 Richard Guenther <rguenther@suse.de>
1589
1590 * lto.c (uniquify_nodes): First register all types before
1591 fixing up the tree SCC.
1592
35d828c5
JH
15932011-05-11 Jan Hubicka <jh@suse.cz>
1594
1595 PR lto/48952
1596 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1597
51545682
NF
15982011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1599
1600 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1601 location of binfo field.
1602 (lto_fixup_prevailing_decls): Likewise.
1603
8242dd04
NF
16042011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1605
1606 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1607 build_function_type_array or build_varargs_function_type_array
1608 instead.
1609
c99c0026
EB
16102011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1611
1612 * lto-lang.c (global_bindings_p): Return bool.
1613
c47d0034
JH
16142011-05-07 Jan Hubicka <jh@suse.cz>
1615
a9bcb3f0
EB
1616 * lto.c (lto_materialize_function): Use
1617 cgraph_function_with_gimple_body_p.
1618 (add_cgraph_node_to_partition): Do not re-add items to partition;
1619 handle thunks.
c47d0034
JH
1620 (add_varpool_node_to_partition): Do not re-add items to partition.
1621
bb3398ca
JH
16222011-05-03 Jan Hubicka <jh@suse.cz>
1623
1624 * lto.c (free_ltrans_partitions): Fix accidental commit.
1625
1cb1a99f
JH
16262011-05-03 Jan Hubicka <jh@suse.cz>
1627
1628 * lto.c (ltrans_partition_def): Remove GTY annotations.
1629 (ltrans_partitions): Move to heap.
1630 (new_partition): Update.
1631 (free_ltrans_partitions): New function.
1632 (lto_wpa_write_files): Use it.
1633
af8bca3c
MJ
16342011-04-29 Martin Jambor <mjambor@suse.cz>
1635
1636 * lto.c: Include ipa-utils.h.
1637 (lto_balanced_map): Update call to ipa_reverse_postorder.
1638 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1639
b823cdfe
MM
16402011-04-29 Michael Matz <matz@suse.de>
1641
1642 * lto.c (toplevel): Include tree-flow.h.
1643 (lto_read_in_decl_state): Don't merge types here.
1644 (tree_with_vars): New static hash table.
1645 (remember_with_vars): New static functions.
1646 (LTO_FIXUP_TYPE): New macro.
1647 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1648 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1649 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1650 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1651 (lto_read_decls): Uniquify while reading in trees.
1652 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1653 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1654 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1655 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1656 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1657 lto_fixup_tree): Remove.
1658 (lto_fixup_state): Remove data argument. Use
1659 lto_symtab_prevailing_decl.
1660 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1661 (lto_fixup_prevailing_decls): New function.
1662 (lto_fixup_state_aux): Argument aux is unused.
1663 (lto_fixup_decls): Don't allocate pointer sets, don't use
1664 lto_fixup_tree, use lto_fixup_prevailing_decls.
1665 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1666 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1667
b9843260
EB
16682011-04-16 Eric Botcazou <ebotcazou@adacore.com>
1669
1670 * lto.c (lto_balanced_map): Fix typos in head comment.
1671 (lto_promote_cross_file_statics): Fix long lines and remove redundant
1672 test.
1673
e7f23018
JH
16742011-04-16 Jan Hubicka <jh@suse.cz>
1675
1676 * lto.c (lto_balanced_map): Update.
1677
10a5dd5d
JH
16782011-04-14 Jan Hubicka <jh@suse.cz>
1679
1680 * lto.c: Include ipa-inline.h
b9843260
EB
1681 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
1682 accessor.
10a5dd5d
JH
1683 (ipa_node_duplication_hook): Fix declaration.
1684 * Make-lang.in (lto.o): Update dependencies.
1685
81f653d6
NF
16862011-04-12 Nathan Froyd <froydnj@codesourcery.com>
1687
1688 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
1689 calling TREE_CHAIN.
1690 * lto.c (lto_fixup_common): Likewise.
1691
dcf0c47e
NF
16922011-04-08 Nathan Froyd <froydnj@codesourcery.com>
1693
1694 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
1695 (handle_type_generic_attribute): Likewise.
1696
e89964e3
MM
16972011-04-03 Michael Matz <matz@suse.de>
1698
1699 * lto.c (lto_materialize_function): Don't read and then discard
1700 sections in WPA mode.
1701 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
1702
1703 * lto-lang.c (registered_builtin_fndecls): Remove.
1704 (lto_getdecls): Return NULL_TREE.
1705 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
1706
d2b3fe18
RG
17072011-03-31 Richard Guenther <rguenther@suse.de>
1708
1709 PR lto/48246
1710 * lto.c (lto_wpa_write_files): Disable assert for non-empty
1711 partitions when checking is not enabled.
1712
ba78087b
KT
17132011-03-25 Kai Tietz <ktietz@redhat.com>
1714
1715 * lto.c (lto_resolution_read): Use filename_cmp instead
1716 of strcmp.
1717 (lto_read_section_data): Likewise.
1718
0edf1bb2
JL
17192011-03-25 Jeff Law <law@redhat.com>
1720
1721 * lto/lto-lang.c (def_fn_type): Add missing va_end.
1722
62d784f7
KT
17232011-03-21 Kai Tietz <ktietz@redhat.com>
1724
1725 PR target/12171
1726 * lto-lang.c (lto_attribute_table): Adjust table.
1727
62dd9571
JJ
17282011-02-18 Jakub Jelinek <jakub@redhat.com>
1729
1730 PR bootstrap/47807
1731 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
1732 of lto-streamer.h.
1733
237d6259
RG
17342011-02-18 Richard Guenther <rguenther@suse.de>
1735
1736 PR lto/47798
1737 * lto-tree.h (lto_global_var_decls): Do not declare here.
1738 * lto-lang.c: Include lto-streamer.h.
1739 * Make-lang.in (lto-lang.o): Adjust dependencies.
1740
8ead2223
KT
17412011-02-10 Kai Tietz <kai.tietz@onevision.com>
1742
1743 PR lto/47241
1744 * lto.c (lto_read_section_data): Free
1745 fd_name in failure case.
1746 For mingw targets don't hash file-descriptor.
1747 (read_cgraph_and_symbols): Close current_lto_file
1748 in failure case.
1749
6e701822
JH
17502011-01-11 Jan Hubicka <jh@suse.cz>
1751
1752 PR lto/45721
1753 PR lto/45375
b9843260
EB
1754 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
1755 are not partitioned.
6e701822 1756
f4da8dce
NF
17572010-12-22 Nathan Froyd <froydnj@codesourcery.com>
1758
1759 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
1760 Use prototype_p.
1761
6b7fb143
RG
17622010-12-06 Richard Guenther <rguenther@suse.de>
1763
1764 PR lto/46796
1765 * lto-lang.c (lto_init): Give names to basic types.
1766
c59ffc41
JM
17672010-11-30 Joseph Myers <joseph@codesourcery.com>
1768
1769 * lto-object.c: Don't include toplev.h.
1770 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
1771
7c475d11
JM
17722010-11-30 Joseph Myers <joseph@codesourcery.com>
1773
1774 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
1775 $(TOPLEV_H).
1776
71f3e391
JM
17772010-11-29 Joseph Myers <joseph@codesourcery.com>
1778
1779 * lto-endian.h: Delete.
1780 * lto-object.c: Don't include "libiberty.h".
1781 (O_BINARY): Don't define.
1782 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
1783 (O_BINARY): Don't define.
1784
9f1718b0
RG
17852010-11-23 Richard Guenther <rguenther@suse.de>
1786
1787 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
1788
39c4e298
RG
17892010-11-23 Richard Guenther <rguenther@suse.de>
1790
1791 PR lto/46605
1792 * lto.c (read_cgraph_and_symbols): Bail out after errors.
1793
b37421c6
JM
17942010-11-17 Joseph Myers <joseph@codesourcery.com>
1795
1796 * lto.c (lto_main): Take no arguments.
1797 * lto.h (lto_main): Update prototype.
1798
d82f74d3
ILT
17992010-11-16 Ian Lance Taylor <iant@google.com>
1800
1801 * lto-object.c (lto_obj_file_open): Call
1802 simple_object_attributes_merge rather than
1803 simple_object_attributes_compare.
1804
a4d8c676
JM
18052010-11-12 Joseph Myers <joseph@codesourcery.com>
1806
1807 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
1808 * lto-lang.c (lto_handle_option): Take location_t parameter.
1809
d8a07487
JM
18102010-11-10 Joseph Myers <joseph@codesourcery.com>
1811
1812 * lto.c (lto_resolution_read): Start diagnostics with lowercase
1813 letters and remove trailing '.'.
1814 (lto_file_finalize): Start diagnostic with a lowercase letter.
1815
6b3456d1
ILT
18162010-11-02 Ian Lance Taylor <iant@google.com>
1817
1818 * lto-object.c: New file.
1819 * lto-elf.c: Remove file.
1820 * lto-macho.c: Remove file.
1821 * lto-macho.h: Remove file.
1822 * lto-coff.c: Remove file.
1823 * lto-coff.h: Remove file.
1824 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
1825 lto/lto-object.o.
1826 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
1827 (lto/lto-objfile.o): New target.
1828 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
1829 (lto/lto.o): Remove $(LIBIBERTY_H).
1830
030cd86c
JH
18312010-10-22 Jan Hubicka <jh@suse.cz>
1832
1833 * lto.c (add_cgraph_node_to_partition,
1834 add_varpool_node_to_partition): Add debug info.
1835 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
1836 partitioned nodes.
1837 (do_whole_program_analysis): Set function flags before dumping.
1838
4490cae6
RG
18392010-10-22 Richard Guenther <rguenther@suse.de>
1840
1841 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
1842 the new gimple_register_canonical_type.
1843
703cdce3
L
18442010-10-20 H.J. Lu <hongjiu.lu@intel.com>
1845
1846 PR bootstrap/45954
1847 * config-lang.in (boot_language): Set to $enable_lto.
1848
1915c739
JJ
18492010-10-18 Jakub Jelinek <jakub@redhat.com>
1850
1851 PR lto/45638
1852 * Make-lang.in (check-lto): New dummy target.
1853
82971de5
EB
18542010-10-14 Eric Botcazou <ebotcazou@adacore.com>
1855
1856 * lto-elf.c (SHN_XINDEX): Define if not already defined.
1857
a75bfaa6
JM
18582010-10-08 Joseph Myers <joseph@codesourcery.com>
1859
1860 * lto-lang.c (lto_init_options): Change to
1861 lto_init_options_struct. Update parameters.
1862 (LANG_HOOKS_INIT_OPTIONS): Don't define.
1863 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
1864
937f7f69
JH
18652010-10-06 Jan Hubicka <jh@suse.cz>
1866
1867 * lto.c (lto_balanced_map): Fix accounting of program size.
1868
2169830c
JH
18692010-10-06 Jan Hubicka <jh@suse.cz>
1870
1871 * lto.c (lto_balanced_map): Do not produce empty partitions.
1872
ecdbd01a 18732010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
1874
1875 * lto.c (lto_process_name): Add.
1876 (lto_main): Call lto_process_name.
1877
06ed016f
JH
18782010-10-06 Jan Hubicka <jh@suse.cz>
1879
1880 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
1881 COMDATs required by the linker.
1882
ae718d66
ILT
18832010-10-05 Ian Lance Taylor <iant@google.com>
1884
1885 * lto.c (lto_section_with_id): Make s a const pointer.
1886
852e4bd2
JH
18872010-10-05 Jan Hubicka <jh@suse.cz>
1888
1889 * lto.c: Include params.h.
1890 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
1891 refcounting in aux field.
1892 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
1893 New functions.
1894 (lto_1_to_1_map): Simplify.
1895 (lto_balanced_map): New function.
1896 (do_whole_program_analysis): Chose proper partitioning alg.
1897 * Make-lang.in (lto.o): Add dependency on params.h
1898
ecdbd01a 18992010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
1900
1901 * Make-lang.in (lto1): Add + to build rule.
1902
ecdbd01a 19032010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
1904
1905 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
1906 with fatal_error.
1907
0d6e14fd
JH
19082010-09-28 Jan Hubicka <jh@suse.cz>
1909
1910 * lto-lang.c (handle_leaf_attribute): New function.
1911 (lto_attribute_tables): Add leaf.
1912
fb462383
JZ
19132010-09-25 Jie Zhang <jie@codesourcery.com>
1914
1915 * lto.c (lto_read_all_file_options): Start a new line after
1916 printing out file names.
1917
051f8cc6
JH
19182010-09-24 Jan Hubicka <jh@suse.cz>
1919
1920 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1921
64e0f5ff
JH
19222010-09-20 Jan Hubicka <jh@suse.cz>
1923
1924 PR tree-optimize/45605
1925 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1926
a929ec3d
GP
19272010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
1928
1929 * lto-elf.c (lto_obj_file_open): Also provide filename when
1930 elf_begin fails.
1931
4c588abf
JH
19322010-09-17 Jan Hubicka <jh@suse.cz>
1933
1934 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
1935
c3224d6f
RG
19362010-09-17 Richard Guenther <rguenther@suse.de>
1937
1938 * lang.opt (flag_wpa): Also enable for the driver.
1939
52b3b3c7
JH
19402010-09-16 Jan Hubicka <jh@suse.cz>
1941
1942 * lto.c (lto_materialize_function): Do not tamper with STATIC and
1943 EXTERNAL flags.
1944
969c37b7
LB
19452010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1946
1947 * lto-tree.h (struct lang_type): Add variable_size GTY option.
1948
098a4f50
JH
19492010-09-08 Jan Hubicka <jh@suse.cz>
1950
1951 * lto.c (real_file_count, real_file_decl_data): New static vars.
1952 (read_cgraph_and_symbols): Use it.
1953
0f443ad0
RG
19542010-09-08 Richard Guenther <rguenther@suse.de>
1955
1956 * lto.c (read_cgraph_and_symbols): Collect again after each
1957 file.
1958
ee187353
JH
19592010-09-07 Jan Hubicka <jh@suse.cz>
1960
1961 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
1962
b3ec52d0
RG
19632010-09-03 Richard Guenther <rguenther@suse.de>
1964
1965 * lto-elf.c (validate_file): Always error if validation fails.
1966
f1395d4a
JH
19672010-08-20 Jan Hubicka <jh@suse.cz>
1968
1969 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
1970 (lto_wpa_write_files): Update comments.
1971
2429bce3
L
19722010-08-20 H.J. Lu <hongjiu.lu@intel.com>
1973
1974 PR bootstrap/45357
1975 * lto.c (lto_materialize_function): Replace has_analyzed_clone
1976 with has_analyzed_clone_p.
1977
e0f967db
JH
19782010-08-20 Jan Hubicka <jh@suse.cz>
1979
1980 * lto.c (has_analyzed_clone_p): New function
1981 (lto_materialize_function): Use callgraph to determine if
1982 body is needed.
1983 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
1984
ac47786e
NF
19852010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1986
1987 * lto.c: Use FOR_EACH_VEC_ELT.
1988
ecdbd01a 19892010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
1990
1991 * Make-lang.in (lto.o): Add dependency to splay-tree.h
1992
5f20c657
JM
19932010-07-27 Joseph Myers <joseph@codesourcery.com>
1994
1995 * lto-lang.c (lto_handle_option): Update prototype and return
1996 value type. Remove duplicate assignment to result.
1997
7a9bf9a4
JM
19982010-07-27 Joseph Myers <joseph@codesourcery.com>
1999
2000 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2001 New.
2002 (lto_init_options): Update prototype.
2003 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2004 Define.
2005
ecdbd01a 20062010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
2007
2008 PR lto/44992
2009 * lto.c: Include splay-tree.h
2010 (lto_resolution_read): Change to walk file_ids tree and parse
2011 extra file_id in resolution file.
2012 (lto_section_with_id): Add.
2013 (create_subid_section_table): Add.
2014 (lwstate): Add.
2015 (lto_create_files_from_ids): Add.
2016 (lto_file_read): Change to handle sub file ids and create list
2017 of file_datas. Add output argument for count.
2018 (get_section_data): Pass file_data to lto_get_section_name.
2019 (lto_flatten_file): Add.
2020 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2021
ecdbd01a 20222010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
2023
2024 * lto-coff.c (hash_name, eq_name): Move.
2025 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2026 * lto-elf.c: (hash_name, eq_name): Move.
2027 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2028 * lto-macho.c: (hash_name, eq_name): Move.
2029 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2030 * lto.c: (hash_name, eq_name): Move from lto-*.c
2031 (lto_obj_create_section_hash_table): Add.
2032 (free_with_string): Add.
2033
718f9c0f
MLI
20342010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2035
2036 * lto-coff.c: Include diagnostic-core.h in every file that
2037 includes toplev.h.
2038 * lto-elf.c: Likewise.
2039 * lto-lang.c: Likewise.
2040 * lto-macho.c: Likewise.
2041
1b137837
JJ
20422010-07-07 Jakub Jelinek <jakub@redhat.com>
2043
2044 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2045 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2046 objects.
2047
92eb4438
JH
20482010-07-05 Jan Hubicka <jh@suse.cz>
2049
2050 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2051 nodes from same comdat group as well as all comdat functions referenced
2052 here.
b9843260
EB
2053 (add_varpool_node_to_partition, add_references_to_partition): New
2054 function.
2055 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2056 add_varpool_node_to_partition; clear aux flags when done.
2057 (lto_promote_cross_file_statics): Do not promote stuff that gets
2058 duplicated to each ltrans.
92eb4438 2059
a05541a9
JH
20602010-07-04 Jan Hubicka <jh@suse.cz>
2061
2062 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2063
4a2ac96f
RG
20642010-06-13 Richard Guenther <rguenther@suse.de>
2065
2066 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2067
1d536046
KT
20682010-06-09 Kai Tietz <kai.tietz@onevision.com>
2069
2070 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2071 * lto-coff.c (coff_write_object_file): Add braces to if.
2072
a9429e29
LB
20732010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2074
2075 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2076 (lto_file_read): Likewise.
2077 (new_partition): Likewise.
2078 (read_cgraph_and_symbols): Likewise.
2079
5498f011
JM
20802010-06-07 Joseph Myers <joseph@codesourcery.com>
2081
2082 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2083 (lto_handle_option): Don't set flag_signed_char here.
2084
d4c0c9f6
RG
20852010-06-04 Richard Guenther <rguenther@suse.de>
2086
2087 PR lto/41584
2088 * lto.c (lto_1_to_1_map): Use the proper file_data for
2089 varpool nodes.
2090
0a5fa5a1
JH
20912010-05-30 Jan Hubicka <jh@suse.cz>
2092
2093 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2094 partitioning decisions.
2095
9eec9488
JH
20962010-05-29 Jan Hubicka <jh@suse.cz>
2097
2098 * lto.c (bitmap vector): Remove.
2099 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2100 (ltrans_partition_def): New structure.
2101 (ltrans_partition): New type and VECtor.
2102 (new_partition): New function.
2103 (add_cgraph_node_to_partition): New function.
2104 (lto_1_to_1_map): Reorganize for partitions.
2105 (lto_add_inline_clones): Remove.
2106 (lto_add_all_inlinees): Remove.
2107 (lto_promote_cross_file_statics): Use partitions.
2108 (cmp_partitions): New function.
2109 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2110 use partitions; output files sorted by size.
2111
3e097227
SB
21122010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2113
2114 * Make-lang.in: Replace vec.h dependency with VEC_H.
2115
7ca92787
JM
21162010-05-28 Joseph Myers <joseph@codesourcery.com>
2117
2118 * lto-coff.c (coff_errmsg): Remove.
2119 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2120 errors instead of coff_errmsg (-1).
2121 * lto-macho.c (mach_o_errmsg): Remove.
2122 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2123 instead of mach_o_errmsg (-1).
2124 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2125 xstrerror (errno).
2126
b5611987
RG
21272010-05-28 Richard Guenther <rguenther@suse.de>
2128
2129 * lto.c (prefix_name_with_star): Removed.
2130 (strip_extension): Likewise.
2131 (get_filename_for_set): Likewise.
2132 (lto_write_ltrans_list): Fold into ...
2133 (lto_wpa_write_files): ... this. Name LTRANS units
2134 by suffixing the ltrans output list filename.
2135 (do_whole_program_analysis): Adjust.
2136
1da2ed5f
JM
21372010-05-27 Joseph Myers <joseph@codesourcery.com>
2138
2139 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2140 (read_cgraph_and_symbols, lto_main): Use seen_error.
2141 * Make-lang.in (lto/lto.o): Update dependencies.
2142
7951d88a
EB
21432010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2144
2145 PR lto/44230
2146 * lto.h (lto_eh_personality): New prototype.
2147 * lto.c: Include debug.h.
2148 (first_personality_decl): New static variable.
2149 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2150 first function for which it is non-null.
2151 (lto_eh_personality_decl): New static variable.
2152 (lto_eh_personality): New function.
2153 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2154 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2155
e12da9c2
SB
21562010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2157
2158 * lto-lang.c: Do not include expr.h.
2159
468194f4
RG
21602010-05-24 Richard Guenther <rguenther@suse.de>
2161
2162 * lto-elf.c (lto_obj_build_section_table): Work around
2163 FreeBSD libelf issue.
2164
bd9eb5da
RG
21652010-05-22 Richard Guenther <rguenther@suse.de>
2166
2167 * lto.c (read_cgraph_and_symbols): Do not collect.
2168
66576e1b
JH
21692010-05-20 Jan Hubicka <jh@suse.cz>
2170
2171 * lto.c (promote_var, promote_fn): New functions.
2172 (lto_promote_cross_file_statics): Compute correctly boundary including
2173 static initializers of readonly vars.
2174
36576655
JH
21752010-05-18 Jan Hubicka <jh@suse.cz>
2176
66576e1b 2177 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
2178 (lto_promote_cross_file_statics): Deal with non-inline clones.
2179
28632d63
JH
21802010-05-18 Jan Hubicka <jh@suse.cz>
2181
2182 * lto.c (lto_materialize_function): Announce function when
2183 reading body; allocate_struct_function only when reading body;
2184 do not finalize local statics; ggc_collect after reading;
2185 do not mark reachable node.
2186 (materialize_cgraph): Do not announce function.
2187
33e42d56
JH
21882010-05-11 Jan Hubicka <jh@suse.cz>
2189
2190 * lto.c (materialize_cgraph): Revert my previous patch.
2191
f6430ea5
KT
21922010-05-11 Kai Tietz <kai.tietz@onevision.com>
2193
2194 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2195 IMAGE_FILE_MACHINE_AMD64.
2196 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2197
0a0b07b7
JH
21982010-05-11 Jan Hubicka <jh@suse.cz>
2199
2200 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2201 (materialize_cgraph): Add it here.
2202
9a809897
JH
22032010-05-11 Jan Hubicka <jh@suse.cz>
2204
2205 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2206 vector.
2207
22082010-05-11 Jan Hubicka <jh@suse.cz>
2209
2210 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2211 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2212 use reachable_from_other_partition_p and
2213 referenced_from_other_partition_p test.
2214
94f64249
KT
22152010-05-11 Kai Tietz <kai.tietz@onevision.com>
2216
2217 * lto-coff.c (validate_file): Add x64-coff support.
2218 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2219 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2220 * lto-lang.c (lto_build_c_type_nodes): Add check for
2221 'long long unsigned int' for x64-windows.
2222 (lto_init): Likewise.
2223
2224
c082f9f3
SB
22252010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2226
2227 * lto.h (struct lto_file_struct): Document offset member.
2228 * lto-endian.h: New file.
2229 * lto-macho.h: New file.
2230 * lto-macho.c: New file.
2231 * Make-lang.in: Add rule for lto-macho.o.
2232
5cd0e96b
RG
22332010-05-07 Richard Guenther <rguenther@suse.de>
2234
2235 PR lto/43857
2236 PR lto/43371
2237 * lang.opt (fresolution): Change to ...
2238 (fresolution=): ... this.
2239 * lto-lang.c (lto_handle_option): Adjust.
2240
48cf395b
RB
22412010-05-07 Richard Guenther <rguenther@suse.de>
2242
2243 * lto.c (DUMPBASE_SUFFIX): Remove.
2244 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2245 Rename to ...
2246 (lto_write_ltrans_list): ... only output the list of ltrans files.
2247 (lto_maybe_unlink): Remove.
2248 (do_whole_program_analysis): Do not execute LTRANS phase
2249 from here.
2250
afa83c15
L
22512010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2252
2253 * lto-lang.c (lto_handle_option): Add argument kind.
2254
369451ec
JH
22552010-05-05 Jan Hubicka <jh@suse.cz>
2256
48cf395b
RB
2257 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2258 refs.
369451ec 2259
2f41ecf5
JH
22602010-05-05 Jan Hubicka <jh@suse.cz>
2261
2262 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2263
ace72c88
JH
22642010-04-30 Jan Hubicka <jh@suse.cz>
2265
b9843260
EB
2266 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2267 use default name.
ace72c88
JH
2268 (lto_wpa_write_files): Write any non-empty partition.
2269
05575e07
JH
22702010-04-30 Jan Hubicka <jh@suse.cz>
2271
2272 * lto.c: Do not attempt to make constant pool references global.
2273
49ba8180
JH
22742010-04-28 Jan Hubicka <jh@suse.cz>
2275
2276 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2277 (lto_wpa_write_files): Announce what we are writting.
2278 (all_file_decl_data): New.
2279 (read_cgraph_and_symbols): Use GGC; correct timevars.
2280 (do_whole_program_analysis): Collect.
2281 * lto/Make-lang.in (lto.o): Fix dependency.
2282 * Makefile.in (GTFILES): Add lto-streamer.h.
2283 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2284 (varpool_assemble_pending_decls): Use VAROUT.
2285 * lto-streamer.h (lto_tree_ref_table): Annotate.
2286 (lto_in_decl_state): Annotate.
2287 (lto_file_decl_data): Annotate.
2288
2942c502
JH
22892010-04-28 Jan Hubicka <jh@suse.cz>
2290
2291 * lto.c (lto_varpool_node_sets): New.
2292 (lto_1_to_1_map): Partition varpool too.
2293 (globalize_context_t, globalize_cross_file_statics,
2294 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2295 lto_scan_statics_in_remaining_global_vars): Remove.
2296 (lto_promote_cross_file_statics): Rewrite.
2297 (get_filename_for_set): Take vset argument.
2298 (lto_wpa_write_files): Pass around vsets.
2299
3bec79c5
DK
23002010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2301
2302 PR lto/42776
2303 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2304 hardcoding 'lto-elf.o'.
2305 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2306
2307 * lto-coff.h: New file.
2308 * lto-coff.c: Likewise.
2309
21aac880
RG
23102010-04-26 Richard Guenther <rguenther@suse.de>
2311
2312 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2313
2cee0101
DK
23142010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2315
2316 * lto.h (lto_elf_file_open): Rename prototype from this ...
2317 (lto_obj_file_open): ... to this.
2318 (lto_elf_file_close): Likewise ...
2319 (lto_obj_file_close): ... and likewise.
2320 (lto_elf_build_section_table): Likewise ...
2321 (lto_obj_build_section_table): ... and likewise.
2322 (lto_elf_begin_section): Likewise ...
2323 (lto_obj_begin_section): ... and likewise.
2324 (lto_elf_append_data): Likewise ...
2325 (lto_obj_append_data): ... and likewise.
2326 (lto_elf_end_section): Likewise ...
2327 (lto_obj_end_section): ... and likewise.
2328 * lto.c (lto_file_read): Update references to the above.
2329 (lto_wpa_write_files): Likewise.
2330 (lto_read_all_file_options): Likewise.
2331 (read_cgraph_and_symbols): Likewise.
2332 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2333 (LANG_HOOKS_APPEND_DATA): Likewise.
2334 (LANG_HOOKS_END_SECTION): Likewise.
2335 * lto-elf.c (lto_elf_file_open): Rename from this ...
2336 (lto_obj_file_open): ... to this, updating any references.
2337 (lto_elf_file_close): Likewise ...
2338 (lto_obj_file_close): ... and likewise.
2339 (lto_elf_build_section_table): Likewise ...
2340 (lto_obj_build_section_table): ... and likewise.
2341 (lto_elf_begin_section): Likewise ...
2342 (lto_obj_begin_section): ... and likewise.
2343 (lto_elf_append_data): Likewise ...
2344 (lto_obj_append_data): ... and likewise.
2345 (lto_elf_end_section): Likewise ...
2346 (lto_obj_end_section): ... and likewise.
2347
bc58d7e1
JH
23482010-04-21 Jan Hubicka <jh@suse.cz>
2349
2350 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2351 (materialize_cgraph): Likewise.
2352
e792884f
JH
23532010-04-21 Jan Hubicka <jh@suse.cz>
2354
2355 * lto.c (lto_wpa_write_files): Update.
2356 (read_cgraph_and_symbols): Be more verbose.
2357 (materialize_cgraph): Likewise.
2358 (do_whole_program_analysis): Likewise.
2359
c9945504
JH
23602010-04-21 Jan Hubicka <jh@suse.cz>
2361
2362 * lto.c (globalize_cross_file_statics): When function has address taken,
2363 it needs to be public.
2364
a837268b
JH
23652010-04-20 Jan Hubicka <jh@suse.cz>
2366
2367 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2368 (lto_add_all_inlinees): Likewise.
2369 (lto_wpa_write_files): Likewise.
2370
3b9e5d95
EB
23712010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2372
2373 * lto-lang.c (lto_init): Remove second argument in call to
2374 build_common_tree_nodes.
2375
8ccb78f2
RO
23762010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2377
2378 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2379 function.
2380
2f9b99e6
EB
23812010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2382
2383 PR bootstrap/43276
2384 * lto-elf.c: Define EM_* constants if not already defined.
2385
bef7d288
EB
23862010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2387
2388 * lto-elf.c (is_compatible_architecture): New static function.
2389 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2390
f68df07c
RG
23912010-02-11 Richard Guenther <rguenther@suse.de>
2392
2393 PR driver/43021
2394 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2395 appropriately.
2396
3cdea2b4
AH
23972010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2398
2399 * lto.c (O_BINARY): Define.
2400 (lto_read_section_data): Open file in binary mode.
2401 * lto-elf.c (O_BINARY): Define.
2402 (lto_elf_file_open): Open file in binary mode.
2403
c59449fa
RG
24042010-01-08 Richard Guenther <rguenther@suse.de>
2405
2406 PR lto/42528
2407 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2408 (lto_init): Do not init char_type_node in a standard way
2409 but according to flag_signed_char.
2410
d7fb0a6d
L
24112010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2412
2413 PR lto/41564
2414 * lto.c (DUMPBASE_SUFFIX): New.
2415 (lto_execute_ltrans): Append a sequence number to -dumpbase
2416 for LTRANS.
2417
78ce4053
L
24182010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2419
2420 PR lto/42580
2421 * lto-elf.c (lto_elf_file_open): Stop if the command line
2422 option file is missing.
2423
2a71eb48
RG
24242009-12-15 Richard Guenther <rguenther@suse.de>
2425
2426 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2427 (lto_post_options): Do not disable debuginfo.
2428
a818bca1
DG
24292009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2430
2431 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2432
e7d00517
RG
24332009-12-11 Richard Guenther <rguenther@suse.de>
2434
2435 PR lto/42037
2436 * lto.c (lto_resolution_read): Properly grow the vector.
2437
1ab53893
RG
24382009-12-11 Richard Guenther <rguenther@suse.de>
2439
2440 PR lto/41915
2441 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2442 to the C99 default. Do not set flag_unit_at_a_time.
2443
0f900dfa
JJ
24442009-11-28 Jakub Jelinek <jakub@redhat.com>
2445
2446 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2447 variable.
2448
92fa7608
RAE
24492009-11-19 Rafael Avila de Espindola <espindola@google.com>
2450
2451 PR bootstrap/42096
2452 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2453 * lto.c (lto_parse_hex): New.
2454 (lto_resolution_read): Use lto_parse_hex.
2455 * lto.h (lto_parse_hex): New.
2456
9870fe4f
RAE
24572009-11-17 Rafael Avila de Espindola <espindola@google.com>
2458
2459 * lto-elf.c (lto_file_init): Add offset argument.
2460 (lto_elf_file_open): Record the offset.
2461 * lto.c (lto_resolution_read): Change file_name into a lto_file
2462 argument. Check offsets.
2463 (lto_file_read): Update call to lto_resolution_read.
2464 * lto.h (lto_file_struct): Add the offset field.
2465
1b70729f
RAE
24662009-11-16 Rafael Avila de Espindola <espindola@google.com>
2467
2468 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2469
0e3776db
JH
24702009-11-14 Jan Hubicka <jh@suse.cz>
2471
2472 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2473
06bd7f56
RAE
24742009-11-12 Rafael Avila de Espindola <espindola@google.com>
2475
2476 * lang.opt (fresolution): Renamed from resolution.
2477 * lto-lang.c (lto_handle_option): Handle new option name.
2478 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2479
7e9dc421
RG
24802009-11-04 Richard Guenther <rguenther@suse.de>
2481 Rafael Avila de Espindola <espindola@google.com>
2482
2483 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2484 (lto_elf_file_open): Handle offsets in arguments name@offest.
2485
b207f900
RG
24862009-10-30 Richard Guenther <rguenther@suse.de>
2487
2488 PR lto/41858
2489 * lto.c (lto_file_read): Do not set file_data->fd.
2490 (lto_read_section_data): Use a single-entry file-descriptor cache.
2491 Do not check the result of xmalloc.
2492 (free_section_data): Do not use file_data->fd.
2493 (lto_read_all_file_options): Likewise.
2494
2c928155
RG
24952009-10-22 Richard Guenther <rguenther@suse.de>
2496
2497 * lto.c (lto_fixup_jump_functions): Remove.
2498 (lto_fixup_decls): Do not fixup jump functions.
2499 (read_cgraph_and_symbols): Schedule cgraph merging after
2500 summary reading. Schedule type and decl fixup before
2501 summary reading.
2502
f9c91f8a
RB
25032009-10-22 Richard Guenther <rguenther@suse.de>
2504
2505 * lto.c (lto_fixup_data_t): Remove free_list member.
2506 (lto_fixup_tree): Do not insert into free_list.
2507 (free_decl): Remove.
2508 (lto_fixup_decls): Remove free-list handling.
2509
fb3f88cc
JH
25102009-10-22 Jan Hubicka <jh@suse.cz>
2511
2512 * lto.c (lto_fixup_jump_functions): New function.
2513 (lto_fixup_decls): Use it.
2514
35f1e9f4
RG
25152009-10-16 Richard Guenther <rguenther@suse.de>
2516
2517 PR lto/41715
2518 * lto.c (lto_fixup_tree): Revert last change.
2519
200c8750
RG
25202009-10-14 Richard Guenther <rguenther@suse.de>
2521
2522 * lto.c (lto_fixup_tree): In case the prevailing decl is not
2523 compatible with the one we replace wrap it around a
2524 VIEW_CONVERT_EXPR.
2525
b1b07c92
RG
25262009-10-09 Richard Guenther <rguenther@suse.de>
2527
2528 PR lto/41635
2529 PR lto/41636
2530 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2531 a file.
2532 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2533 (init_ehdr##BITS): Likewise.
2534
3c2e7d45
JM
25352009-10-08 Joseph Myers <joseph@codesourcery.com>
2536
2537 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2538 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2539 diagnostics.
2540 * lto-lang.c (lto_post_options): Remove trailing "." from
2541 diagnostics.
2542
0d0bfe17
RG
25432009-10-08 Richard Guenther <rguenther@suse.de>
2544
2545 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2546 hash tables.
2547
4bedf19a
JM
25482009-10-07 Joseph Myers <joseph@codesourcery.com>
2549
2550 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2551
b20996ff
JH
25522009-10-07 Jan Hubicka <jh@suse.cz>
2553
2554 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2555 ltrans stage; explain why this is needed and should not.
2556
1a735925
RG
25572009-10-05 Richard Guenther <rguenther@suse.de>
2558
2559 PR lto/41552
2560 PR lto/41487
2561 * lto.c (lto_read_decls): Do not register deferred decls.
2562 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2563 until after reading the IPA summaries.
2564
d7f09764
DN
25652009-10-02 Rafael Avila de Espindola <espindola@google.com>
2566
2567 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2568 (lto-lang.c): Don't include lto/common.h.
2569
25702009-10-02 Rafael Avila de Espindola <espindola@google.com>
2571
2572 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2573 (lto/common.o): Remove.
2574 * common.c: Remove.
2575 * common.h (lto_kind_str): Remove.
2576 (lto_visibility_str): Remove.
2577 (lto_resolution_str): Make it static.
2578
25792009-10-01 Diego Novillo <dnovillo@google.com>
2580
2581 * lto.c (lto_read_decls): Add comment.
2582 Call internal_error instead of gcc_assert.
2583 (lto_resolution_read): Likewise.
2584 (lto_add_all_inlinees): Tidy.
2585 * Make-lang.in: Fix copyright boilerplate.
2586 (lto.pdf): New.
2587 (lto.install-pdf): New.
2588 * lto-tree.h: Fix copyright boilerplate.
2589 * lang-specs.h: Likewise.
2590 Remove ".lto" entry from compilers fragment.
2591 * lto-elf.c: Move inclusion of gelf.h after config.h.
2592 Tidy formatting everywhere.
2593 * lto.h: Fix copyright boilerplate.
2594 Tidy formatting everywhere.
2595 * common.c: Likewise.
2596 * config-lang.in: Likewise.
2597 * common.h: Likewise.
2598 * lto-lang.c: Likewise.
2599
26002009-10-01 Richard Guenther <rguenther@suse.de>
2601
2602 * lto.c (lto_read_section_data): Use plain lseek/read.
2603
26042009-10-01 Richard Guenther <rguenther@suse.de>
2605
2606 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2607 use sysconf to query the system page size.
2608 (lto_file_read): Implement fallback using stdio.
2609 (free_section_data): Likewise.
2610
26112009-09-29 Diego Novillo <dnovillo@google.com>
2612
2613 * lto-lang.c (lto_init): Really fix call to
2614 build_common_builtin_nodes.
2615
26162009-09-29 Diego Novillo <dnovillo@google.com>
2617
2618 * lto-lang.c (lto_init): Fix call to
2619 build_common_builtin_nodes.
2620
26212009-09-29 Richard Guenther <rguenther@suse.de>
2622
2623 PR lto/40754
2624 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2625 in bytes.
2626 (first_data_block): New static variable.
2627 (lto_elf_append_data): Align the first data block in each
2628 section.
2629
26302009-09-28 Diego Novillo <dnovillo@google.com>
2631
2632 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2633 * lto.c (strip_extension): New.
2634 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2635 (lto_execute_ltrans): Tidy.
2636 Do not pass -fwpa nor -fltrans-* to LTRANS.
2637 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2638 * tree.c (need_assembler_name_p): Call
2639 lang_hooks.decls.may_need_assembler_name_p if set.
2640 * varasm.c (default_binds_local_p_1): Remove check for
2641 flag_ltrans.
2642 * varpool.c (decide_is_variable_needed): Do not test for
2643 in_lto_p.
2644
26452009-09-22 Richard Guenther <rguenther@suse.de>
2646
2647 PR lto/39276
2648 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2649 * Make-lang.in: Remove ltrans-driver stuff.
2650 * config-lang.in: Likewise.
2651 * lang.opt (fltrans-driver): Remove.
2652 * lto-lang.c (lto_init_options): Remove code initializing
2653 ltrans_driver.
2654 * ltrans-driver: Remove.
2655
26562009-09-21 Diego Novillo <dnovillo@google.com>
2657
2658 * lto-lang.c (lto_define_builtins): Remove superfluous
2659 calls to targetm.init_builtins and build_common_builtin_nodes.
2660 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2661 build_common_builtin_nodes.
2662 * lto.c (lto_materialize_function): Do nothing if NODE is a
2663 clone.
2664
26652009-09-03 Diego Novillo <dnovillo@google.com>
2666
2667 * lto-elf.c (validate_file): Replace call to
2668 elf_getshstrndx with call to elf_getshdrstrndx.
2669
26702009-08-19 Richard Guenther <rguenther@suse.de>
2671
2672 * lto-lang.c (lto_init): Merge char_type_node with the
2673 appropriately signed variant.
2674
26752009-08-19 Richard Guenther <rguenther@suse.de>
2676
2677 PR lto/41071
2678 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
2679 (lto_fixup_type): Re-build the pointer-to chain part two.
2680
26812009-08-19 Richard Guenther <rguenther@suse.de>
2682
2683 PR lto/41071
2684 * lto.c (lto_fixup_type): Re-build the type variant chain.
2685
26862009-08-19 Richard Guenther <rguenther@suse.de>
2687
2688 PR lto/41071
2689 * lto.c (lto_fixup_constructor): New function.
2690 (lto_fixup_tree): Replace all types. Properly fixup
2691 constructors and constants.
2692
26932009-08-14 Richard Guenther <rguenther@suse.de>
2694
2695 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
2696 for DECL_LANG_SPECIFIC.
2697
26982009-08-13 Richard Guenther <rguenther@suse.de>
2699
2700 PR lto/41032
2701 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
2702
27032009-07-30 Richard Guenther <rguenther@suse.de>
2704
2705 PR lto/40903
2706 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
2707 the largest decl for output and free TREE_CHAIN for further
2708 use.
2709
27102009-07-24 Diego Novillo <dnovillo@google.com>
2711
2712 * Make-lang.in: Add empty lto.install-plugin target.
2713
27142009-07-13 Diego Novillo <dnovillo@google.com>
2715
2716 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
2717
27182009-07-11 Richard Guenther <rguenther@suse.de>
2719
2720 * lto-lang.c (lto_write_globals): Wrapup global decls.
2721
27222009-07-10 Richard Guenther <rguenther@suse.de>
2723
2724 * lto-lang.c (lto_init): Allocate one more location to make
2725 BUILTINS_LOCATION correct.
2726
27272009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2728
2729 * lto.c (free_section_data): Cast computed_offset to caddr_t.
2730
27312009-07-06 Diego Novillo <dnovillo@google.com>
2732
2733 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
2734 TYPE_SIZE_UNIT.
2735
27362009-07-06 Diego Novillo <dnovillo@google.com>
2737
2738 * lto.c (preload_common_nodes): Remove.
2739 (lto_read_in_decl_state): Call lto_streamer_cache_get.
2740 (lto_read_decls): Call lto_data_in_create and
2741 lto_data_in_delete.
2742 (free_decl): Do not call ggc_free.
2743 (lto_main): Call lto_init_reader.
2744 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
2745 (lto_init): Initialize main_identifier_node if needed.
2746 Make ptrdiff_type_node be integer_type_node.
2747
27482009-06-19 Diego Novillo <dnovillo@google.com>
2749
2750 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
2751 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
2752 Remove code guarded by #ifdef LOCAL_TRACE.
2753
27542009-06-18 Diego Novillo <dnovillo@google.com>
2755
2756 * lto.c: Update license to GPLv3.
2757 * lto-elf.c: Likewise.
2758 * common.c: Likewise.
2759 * lto-lang.c: Likewise.
2760 * lto.h: Remove superfluous include files. Update all
2761 users.
2762
27632009-06-17 Diego Novillo <dnovillo@google.com>
2764
2765 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
2766
27672009-06-02 Diego Novillo <dnovillo@google.com>
2768
2769 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
2770 read in.
2771 (materialize_cgraph): Only materialize nodes that have a
2772 representation on file.
2773
27742009-06-01 Diego Novillo <dnovillo@google.com>
2775
2776 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
2777
27782009-05-31 Diego Novillo <dnovillo@google.com>
2779
2780 * lto-lang.c (lto_type_for_mode): Handle all the modes
2781 handled in c_common_type_for_mode.
2782
27832009-05-21 Diego Novillo <dnovillo@google.com>
2784
2785 * lto-elf.c: Always include <gelf.h>.
2786 * config-lang.in (target_libs): Remove.
2787 (build_by_default): Set to no.
2788
27892009-05-15 Diego Novillo <dnovillo@google.com>
2790
2791 * lto.c (lto_materialize_function): Assert that DECL is
2792 not a builtin.
2793 (materialize_cgraph): Don't try to materialize builtin
2794 functions.
2795 * lto-section-out.c (write_symbol_vec): Do not write
2796 builtin functions.
2797
27982009-05-13 Diego Novillo <dnovillo@google.com>
2799
2800 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
2801
28022009-05-07 Diego Novillo <dnovillo@google.com>
2803
2804 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
2805 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
2806 (lto_fixup_type): Call it for TYPE_POINTER_TO,
2807 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
2808 (lto_fixup_tree): Call gimple_register_type when *TP is a
2809 type.
2810 (lto_main): Call bitmap_obstack_initialize.
2811
28122009-04-22 Diego Novillo <dnovillo@google.com>
2813
2814 * lto.c (free_section_data): Tidy.
2815 (lto_1_to_1_map): Tidy.
2816 (lto_add_all_inlinees): Tidy.
2817 (prefix_name_with_star): New.
2818 (get_filename_for_set): New.
2819 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
2820 to determine what cgraph node sets to write.
2821 Call get_filename_for_set to compute temporary file
2822 names.
2823 (lto_execute_ltrans): Do not execute LTRANS on files with
2824 names that start with '*'.
2825 Move logic to execute LTRANS together so that LTRANS is
2826 invoked only if there are any files to compile.
2827 (do_whole_program_analysis): Only remove output files
2828 that do not start with '*'.
2829
28302009-04-06 Diego Novillo <dnovillo@google.com>
2831
2832 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
2833 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
2834 (lto_add_all_inlinees): Tidy.
2835
28362009-03-26 Diego Novillo <dnovillo@google.com>
2837
2838 * lto.c: Include gimple.h.
2839 (lto_read_in_decl_state): Call gimple_register_type for
2840 every type in every stream.
2841 (lto_fixup_common): Call gimple_register_type if T has a
2842 type.
2843 (do_whole_program_analysis): Call print_lto_report.
2844 (lto_main): Call print_lto_report after cgraph_optimize.
2845 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
2846
28472009-03-24 Diego Novillo <dnovillo@google.com>
2848
2849 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
2850 (lto.o): Add dependency on GIMPLE_H.
2851
28522009-03-10 Simon Baldwin <simonb@google.com>
2853
2854 * lto.c (lto_read_all_file_options): Close any open file descriptor
2855 contained in file_data before freeing.
2856
28572009-02-24 Rafael Avila de Espindola <espindola@google.com>
2858
2859 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2860 for a decl in the original bitmap, not a node.
2861 (lto_add_all_inlinees): Remove original nodes that are not needed.
2862 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2863
28642009-02-24 Diego Novillo <dnovillo@google.com>
2865
2866 * lto.c (lto_materialize_function): Update
2867 lto_stats.num_function_bodies.
2868 (get_section_data): Initialize *LEN to 0.
2869 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
2870 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
2871 Update lto_stats.num_output_files.
2872 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
2873 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
2874 (lto_main): Initialize lto_stats.
2875 If flag_lto_report is set, call print_lto_report.
2876
28772009-02-19 Diego Novillo <dnovillo@google.com>
2878
2879 Revert
2880
2881 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
2882
2883 * lto.c (lto_add_inline_clones): Don't add the
2884 master clone. Check for a decl in the original
2885 bitmap, not a node.
2886 (lto_add_all_inlinees): Remove original nodes
2887 that are not needed.
2888 (lto_scan_statics_in_cgraph_node): Don't care if
2889 the node is the master.
2890 (lto_promote_cross_file_statics): Use a new
2891 context.seen_node_decls for each set
2892
28932009-02-19 Rafael Avila de Espindola <espindola@google.com>
2894
2895 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2896 for a decl in the original bitmap, not a node.
2897 (lto_add_all_inlinees): Remove original nodes that are not needed.
2898 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2899 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
2900 for each set
2901
29022009-02-18 Diego Novillo <dnovillo@google.com>
2903
2904 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
2905 and TV_WHOPR_WPA_IO.
2906 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
2907 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
2908 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
2909 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
2910 depending on command line flags.
2911 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
2912 (lto_main): Remove timer uses.
2913
29142009-02-18 Rafael Avila de Espindola <espindola@google.com>
2915
2916 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
2917 (lto_wpa_write_files): Update calls to renamed functions.
2918
29192009-02-17 Diego Novillo <dnovillo@google.com>
2920
2921 PR 39203
2922 * lto-lang.c (lto_post_options): Disable -fwhole-program
2923 when running LTRANS.
2924
29252009-02-10 Diego Novillo <dnovillo@google.com>
2926
2927 * lto.c (read_cgraph_and_symbols): Fix comment.
2928
29292009-02-10 Diego Novillo <dnovillo@google.com>
2930
2931 * lto.c (read_cgraph_and_symbols): Read options from all
2932 IL files.
2933
29342009-02-10 Diego Novillo <dnovillo@google.com>
2935
2936 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
2937 (materialize_cgraph): Likewise.
2938 (do_whole_program_analysis): Likewise.
2939 (lto_main): Call read_cgraph_and_symbols,
2940 materialize_cgraph and do_whole_program_analysis.
2941
29422009-02-10 Simon Baldwin <simonb@google.com>
2943
2944 * lto.c: Include lto-opts.h.
2945 * (lto_main): Clear file options at loop start, read any saved
2946 options from the first file handled, and re-issue options.
2947 * Makefile.in (lto.o): Add dependency on lto-opts.h.
2948
29492009-02-02 Diego Novillo <dnovillo@google.com>
2950
2951 * lto.c (lto_main): Stop LTO_TIMER and use
2952 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
2953
29542009-01-30 H.J. Lu <hongjiu.lu@intel.com>
2955
2956 PR lto/38995
2957 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
2958 to POINTER_SIZE.
2959
29602009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
2961
2962 * Make-lang.in (LTO_EXE): Link with all
2963 BACKENDLIBS and not only GMPLIBS
2964
29652009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2966
2967 PR bootstrap/38992
2968 * lto-elf.c: Include gelf.h instead of libelf.h.
2969 (lto_elf_file_close): Replace elfx_update_shstrndx with
2970 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
2971 gelf_update_ehdr.
2972
29732009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2974
2975 PR middle-end/38996
2976 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
2977
29782009-01-26 Diego Novillo <dnovillo@google.com>
2979
2980 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
2981
29822009-01-26 Diego Novillo <dnovillo@google.com>
2983
2984 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
2985 and rename into gimple_types_compatible_p.
2986
29872009-01-12 Rafael Avila de Espindola <espindola@google.com>
2988
2989 * lto-lang.c (lang_hooks): Remove the const qualifier.
2990
29912009-01-06 Diego Novillo <dnovillo@google.com>
2992
2993 * ltrans-driver: Mark 'all' target as phony.
2994
29952008-12-31 Diego Novillo <dnovillo@google.com>
2996
2997 * ltrans-driver: Execute a NOP action for target 'all'.
2998
29992008-12-19 Diego Novillo <dnovillo@google.com>
3000
3001 * lto.c (lto_1_to_1_map): Tidy.
3002
30032008-12-19 Diego Novillo <dnovillo@google.com>
3004
3005 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3006 be opened, show its name.
3007 * ltrans-driver: If $verbose is set, do not use parallelism.
3008
30092008-12-17 Rafael Avila de Espindola <espindola@google.com>
3010
3011 * lto.c (lto_fixup_function): New.
3012 (lto_fixup_tree): Call lto_fixup_function.
3013
30142008-12-14 Doug Kwan <dougkwan@google.com>
3015
3016 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3017 variables if there is no function.
3018
30192008-12-10 Simon Baldwin <simonb@google.com>
3020
3021 * ltrans-driver: Always run make in silent mode, to avoid make's
3022 trace on stdout interfering with lto-wrapper output.
3023
30242008-12-10 Doug Kwan <dougkwan@google.com>
3025
3026 * lto.c (lto_add_inline_clones): Do not force master clones of
3027 inlined functions already in SET to be static inline.
3028
30292008-12-04 Doug Kwan <dougkwan@google.com>
3030
3031 * lto.c (globalize_context_t): New type to store states in
3032 globalization of cross-file statics.
3033 (globalize_cross_file_statics): New.
3034 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3035 static decls that need to be fixed up.
3036 (lto_scan_statics_in_cgraph_node): Change call interface to use
3037 a globalize_context_t CONTEXT for all states used.
3038 (lto_scan_statics_in_remaining_global_vars): New.
3039 (lto_promote_cross_file_statics): Use new call interface of
3040 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3041 visible vars in the last set.
3042
30432008-12-03 Diego Novillo <dnovillo@google.com>
3044
3045 * lto.c (lto_fixup_tree): Do not emit an error when
3046 PREVAILING throw but T doesn't.
3047
30482008-12-02 Doug Kwan <dougkwan@google.com>
3049
3050 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3051 from code in ...
3052 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3053 variables and functions.
3054 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3055 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3056
30572008-11-29 Diego Novillo <dnovillo@google.com>
3058
3059 * lto.c: Include timevar.h.
3060 (lto_materialize_function): Tidy. Add comments.
3061 (lto_wpa_write_files): Tidy.
3062 (lto_execute_ltrans): Tidy.
3063 (lto_main): Add local variable LTO_TIMER. Initialize it
3064 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3065 Start and stop the timer.
3066 Tidy comments.
3067 * Make-lang.in (lto.o): Add dependency on timevar.h.
3068 * ltrans-driver: React to -v and -save-temps.
3069 Use simple heuristic to determine how much parallelism to
3070 use when executing make.
3071
30722008-11-12 Doug Kwan <dougkwan@google.com>
3073
3074 * lto.c (lto_bitmap_obstack): Remove var.
3075 (lto_materialize_function): Do nothing instead of marking function
3076 body in file if flag_wpa is true.
3077 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3078 (lto_scan_statics_in_cgraph_node): New function.
3079 (lto_promote_cross_file_statics): Same.
3080 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3081 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3082 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3083
30842008-11-09 Diego Novillo <dnovillo@google.com>
3085
3086 * lto/lto.c (lto_fixup_tree): Change error message locus
3087 information to include location of mismatching
3088 declaration.
3089 Use TREE_NO_WARNING to avoid repeated messages.
3090 (lto_main): If lto_fixup_decls emitted any errors, exit.
3091 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3092 (lto_init_options): Don't enable exceptions by default.
3093 (lto_eh_runtime_type): Move to lto-function-in.c
3094 (lto_init_eh): Likewise.
3095 (lto_init): Don't call lto_init_eh.
3096 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3097 libfuncs.h and except.h.
3098
30992008-10-30 Diego Novillo <dnovillo@google.com>
3100
3101 * lto.c (lto_read_decls): Declare debug_main only if
3102 LTO_STREAM_DEBUGGING is enabled.
3103
31042008-10-30 Simon Baldwin <simonb@google.com>
3105
3106 * lto.c (lto_wpa_write_files): Create intermediate files with
3107 make_cwd_temp_file().
3108 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3109 WPA_SAVE_LTRANS is set.
3110 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3111 * ltrans-driver: Do not strip directory from output files.
3112
31132008-10-29 Doug Kwan <dougkwan@google.com>
3114
3115 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3116 DECL.
3117 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3118 (lto/lto-symtab.o): Remove rule.
3119 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3120 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3121 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3122 Remove macros.
3123 lto-symtab.c (File): Move up one level.
3124 lto-lang.c (cgraph.h): Remove include.
3125 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3126 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3127 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3128
31292008-10-24 Rafael Espindola <espindola@google.com>
3130
3131 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3132 non prevailing weak symbols.
3133
31342008-10-24 Rafael Espindola <espindola@google.com>
3135
3136 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3137
31382008-10-24 Rafael Espindola <espindola@google.com>
3139
3140 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3141 different types.
3142
31432008-10-23 Simon Baldwin <simonb@google.com>
3144
3145 * lto-lang.c (input_node): Save the node reference, rather than the
3146 node pointer, in node->inlined_to.
3147 (input_cgraph_1): Convert node references into node pointers.
3148
31492008-10-22 Diego Novillo <dnovillo@google.com>
3150 Rafael Espindola <espindola@google.com>
3151
3152 * lto.c (lto_resolution_read): Tidy.
3153 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3154 abort if RET is NULL.
3155
31562008-10-22 Doug Kwan <dougkwan@google.com>
3157
3158 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3159 exceptions flag is given.
3160 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3161 (lto_init_eh): Remove exceptions flag initialization.
3162 (lto_init): Only call lto_init_eh if exceptions flag is set.
3163
31642008-10-21 Diego Novillo <dnovillo@google.com>
3165
3166 * lto.c: Tidy some formatting.
3167 * lto.h: Likewise.
3168
31692008-10-21 Simon Baldwin <simonb@google.com>
3170
3171 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3172 them is NULL (but not the other).
3173
31742008-10-17 Diego Novillo <dnovillo@google.com>
3175
3176 * ltrans-driver: Divert output from make to a temporary file.
3177 Show it if the call to make failed.
3178
31792008-10-15 Diego Novillo <dnovillo@google.com>
3180
3181 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3182 Do not print TEMP_FILENAME
3183 * ltrans-driver: Call make with -s.
3184
31852008-10-15 Diego Novillo <dnovillo@google.com>
3186
3187 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3188 TREE_STATIC on global symbols.
3189
31902008-10-14 Ollie Wild <aaw@google.com>
3191
3192 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3193 (LTRANS_DRIVER_EXE): Add.
3194 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3195 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3196 (lto.install.common): Remove ltrans-driver.
3197 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3198 (LTRANS_DRIVER_EXE): New build rule.
3199 * config-lang.in (compilers): Add ltrans-driver.
3200
32012008-10-14 Diego Novillo <dnovillo@google.com>
3202
3203 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3204 of program name.
3205
32062008-10-13 Ollie Wild <aaw@google.com>
3207
3208 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3209 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3210 * ltrans-driver (LTRANS_FLAGS): Remove.
3211
32122008-10-08 Doug Kwan <dougkwan@google.com>
3213
3214 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3215 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3216 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3217 from lto_fixup_state to here.
3218 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3219 just a free-list. Fix up types also. Move decl merging code to
3220 lto_fixup_tree.
3221 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3222 object.
3223 (lto_fixup_decls): Use another pointer set to avoid multiple
3224 walking of nodes except for DECLs to be replaced. Pass an
3225 lto_fixup_data_t object to tree-walker.
3226
32272008-10-08 Rafael Espindola <espindola@google.com>
3228
3229 * lto-symtab.c (lto_symtab_set_resolution): New.
3230 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3231 lto_symtab_get_resolution.
3232 (lto_symtab_prevailing_decl): Return decl for non public decls.
3233 (lto_symtab_get_resolution): New.
3234 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3235
32362008-10-06 Rafael Espindola <espindola@google.com>
3237
3238 * lto-lang.c: Include cgraph.h.
3239 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3240 input_cgraph): Moved from lto-cgraph.c.
3241 (LANG_HOOKS_INPUT_CGRAPH): New.
3242
32432008-10-03 Rafael Espindola <espindola@google.com>
3244
3245 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3246
32472008-10-03 Rafael Espindola <espindola@google.com>
3248
3249 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3250 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3251 prevailing definition. Don't mark TREE_NOTHROW differences.
3252 * lto.c (lto_fixup_tree): New.
3253 (lto_fixup_state): New.
3254 (lto_fixup_state_aux): New.
3255 (free_decl): New.
3256 (lto_fixup_decls): New.
3257 (lto_main): Call lto_fixup_decls.
3258
32592008-10-02 Ollie Wild <aaw@google.com>
3260
3261 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3262 and Init.
3263 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3264 * lto-lang.c (lto_post_options): Add validation and fixups for
3265 -fltrans and -fwpa.
3266
32672008-10-02 Rafael Espindola <espindola@google.com>
3268
3269 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3270 lto_symtab_merge_decl): Return void.
3271 (lto_symtab_prevailing_decl): New.
3272
32732008-09-30 Rafael Espindola <espindola@google.com>
3274
3275 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3276 defined symbols.
3277 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3278 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3279 Check for already defined symbols.
3280 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3281 (LTO_IDENTIFIER_RESOLUTION): Remove.
3282 (LTO_DECL_RESOLUTION): New.
3283
32842008-09-30 Rafael Espindola <espindola@google.com>
3285
3286 * lto.c (lto_read_decls): Use new input_tree signature.
3287
32882008-09-26 Doug Kwan <dougkwan@google.com>
3289
3290 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3291 bodies affected by exception attribute merging of DECLs.
3292 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3293 merging.
3294
32952008-09-25 Rafael Espindola <espindola@google.com>
3296
3297 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3298 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3299 * lto-symtab.c (lto_symtab_compatible): New.
3300 (lto_symtab_overwrite_decl): New.
3301 (lto_symtab_merge_decl): Refactor to use the above functions
3302 and the resolution from lang_identifier.
3303 * lto-tree.h: Include plugin-api.h.
3304 (lang_identifier): Add resolution.
3305 (LTO_IDENTIFIER_RESOLUTION): New.
3306
33072008-09-25 Ollie Wild <aaw@google.com>
3308
3309 * lang.opt (fltrans-output-list=): New option.
3310 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3311
33122008-09-25 Rafael Espindola <espindola@google.com>
3313
3314 * lto.c (lto_resolution_read): Initialize ret;
3315
33162008-09-24 Ollie Wild <aaw@google.com>
3317
3318 * lto.c (sys/mman.h): Move include.
3319 (lto_wpa_write_files): Return a list of written files.
3320 (lto_execute_ltrans): New function.
3321 (lto_main): Call lto_execute_ltrans.
3322 (ltrans-driver): New file.
3323 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3324 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3325 (lto_init_options): Initialize ltrans_driver.
3326 (lto_handle_option): Fix incorrect default output value.
3327 * lang.opt (fltrans-driver=): New option.
3328 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3329 (lto.install-common): Add lto/ltrans-driver.
3330
33312008-09-24 Rafael Espindola <espindola@google.com>
3332
3333 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3334 (lto/lto.o): Depend on lto/common.h.
3335 (lto/common.o): New.
3336 * lang.opt (resolution): New.
3337 * lto-lang.c (resolution_file_name): New.
3338 (lto_handle_option): Handle OPT_resolution.
3339 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3340 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3341 pass it to lto_symtab_merge_decl.
3342 * lto.c: Include common.h.
3343 (lto_read_decls): Add resolutions and resolutions_size arguments.
3344 Initialize data_in.globals_resolution and
3345 data_in.globals_resolution_size.
3346 (index_and_symbol_resolution): New.
3347 (lto_resolution_read): New.
3348 (lto_file_read): Add argument resolution_file.
3349 Read resolution.
3350 * lto.h (resolution_file_name): New.
3351
33522008-09-23 Rafael Espindola <espindola@google.com>
3353
3354 * common.c: Update description.
3355 * common.h: Update description.
3356
33572008-09-23 Rafael Espindola <espindola@google.com>
3358
3359 * common.c: Moved from lto-plugin.
3360 * common.h: Moved from lto-plugin.
3361
33622008-09-22 Doug Kwan <dougkwan@google.com>
3363
3364 * lto.c (VEC(bitmap,heap)): Declare.
3365 (lto_materialize_function): Handle WAP mode specially.
3366 (lto_add_inline_clones): New.
3367 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3368 return a bitmap of inlined decls.
3369 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3370 (lto_main): Call reset_inline_failed to reset inlining states.
3371 Check call-graph after WPA inlining.
3372 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3373 unconditionally.
3374
33752008-09-19 Doug Kwan <dougkwan@google.com>
3376
3377 lto.c (lto_main): Remove unsued wrapper code.
3378 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3379
33802008-09-19 Rafael Espindola <espindola@google.com>
3381
3382 * lto-symtab.c: Include lto-tree-in.h.
3383 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3384 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3385 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3386
33872008-09-17 Paolo Bonzini <bonzini@gnu.org>
3388 Rafael Avila de Espindola <espindola@google.com>
3389
3390 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3391 COMPOUND_LITERAL_EXPR_DECL): Remove.
3392 (emit_local_var): Remove.
3393 (lto_expand_expr): Remove.
3394 (lto_staticp): Remove.
3395 (LANG_HOOKS_EXPAND_EXPR): Remove.
3396 (LANG_HOOKS_STATICP): Remove.
3397
33982008-09-11 Diego Novillo <dnovillo@google.com>
3399
3400 * lto-lang.c: Include except.h and libfuncs.h.
3401 (lto_init_eh): New.
3402 (lto_init): Call it.
3403 Set flag_generate_lto to 0.
3404 * Make-lang.in (lto-lang.o): Add dependency on except.h
3405 and libfuncs.h.
3406
34072008-09-09 Bill Maddox <maddox@google.com>
3408
3409 * lto-lang.c: Include header file expr.h.
3410 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3411 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3412 (emit_local_var): Copied from c-semantics.c.
3413 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3414 and c_staticp in c-common.c.
3415 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3416
34172008-09-08 Diego Novillo <dnovillo@google.com>
3418
3419 * lto-lang.c (lto_global_bindings_p): Return 1 during
3420 IPA passes.
3421
34222008-09-07 Diego Novillo <dnovillo@google.com>
3423
3424 * lto.c: Tidy formatting.
3425
34262008-08-04 Bill Maddox <maddox@google.com>
3427
3428 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3429
34302008-09-03 Doug Kwan <dougkwan@google.com>
3431
3432 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3433 CIF_OK instead of NULL.
3434
34352008-09-02 Diego Novillo <dnovillo@google.com>
3436 Simon Baldwin <simonb@google.com>
3437
3438 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3439 c_common_type_for_size.
3440 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3441 (lto_init): Call linemap_add.
3442 (signed_and_unsigned_types): Remove.
3443
34442008-08-29 Diego Novillo <dnovillo@google.com>
3445
3446 * lto-lang.c (handle_noreturn_attribute): New local function.
3447 (handle_const_attribute): New local function.
3448 (handle_malloc_attribute): New local function.
3449 (handle_pure_attribute): New local function.
3450 (handle_novops_attribute): New local function.
3451 (handle_nonnull_attribute): New local function.
3452 (handle_nothrow_attribute): New local function.
3453 (handle_sentinel_attribute): New local function.
3454 (handle_type_generic_attribute): New local function.
3455 (handle_format_attribute): New local function.
3456 (handle_format_arg_attribute): New local function.
3457 (lto_attribute_table): Declare.
3458 (lto_format_attribute_table): Declare.
3459 (lto_init_attributes): New local function.
3460 (lto_define_builtins): Call it.
3461 Call targetm.init_builtins and build_common_builtin_nodes.
3462 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3463 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3464
34652008-08-28 Diego Novillo <dnovillo@google.com>
3466
3467 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3468 $(GIMPLE_H).
3469 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3470 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3471 * lto-symtab.c: Include gimple.h.
3472 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3473 TREE_CHAIN.
3474
34752008-08-27 Doug Kwan <dougkwan@google.com>
3476
3477 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3478 gt-lto-lto.h): New includes.
3479 (lto_materialize_function): Do not read in function body in WPA mode.
3480 Format a line to fit in 80 columns.
3481 (lto_cgraph_node_sets): New garbage collected variable.
3482 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3483 New functions.
3484 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3485 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3486 variable LTO_SECTION_IN_H.
3487 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3488 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3489 with variable LTO_SECTION_IN_H.
3490 * config-lang.in (gtfiles): Add lto/lto.c.
3491 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3492 merged DECL_RESULT correctly.
3493
34942008-08-26 Bill Maddox <maddox@google.com>
3495
3496 * lto-lang.c Include tree-gimple.h.
3497 (lto_mark_addressable): Call mark_addressable rather than
3498 asserting.
3499 (lto_post_options): Suppress debug info generation.
3500 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3501
35022008-08-25 Bill Maddox <maddox@google.com>
3503
3504 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3505 assertion and leave an explanatory comment in its place.
3506
35072008-08-21 Doug Kwan <dougkwan@google.com>
3508
3509 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3510 of common nodes instead of computing locallly.
3511 (lto_read_in_decl_state): New.
3512 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3513 Read global and per-function in-decl states.
3514 * Make-lang.in (LTO_H): Update dependency.
3515 (lto/lto.o): Same.
3516 (lto-symtab.c): Merge (revision 139039)
3517 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3518
35192008-08-21 Rafael Espindola <espindola@google.com>
3520
3521 * config-lang.in (target_libs): New.
3522
35232008-08-20 Bill Maddox <maddox@google.com>
3524
3525 * lto.c (current_lto_file): Remove GTY marker from static
3526 variable. Remove include of file gt-lto-lto.h.
3527 * Make-lang.in: Remove dependency of lto/lto.o on
3528 gt-lto-lto.h.
3529 * lto-elf.c (lto_file_close): Removed.
3530 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3531 allocate lto_elf_file object.
3532 (lto_elf_file_close): Free lto_elf_file object after close.
3533 * lto.h (struct lto_file_struct): Remove GTY marker.
3534 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3535 gtfiles.
3536
35372008-08-20 Bill Maddox <maddox@google.com>
3538
3539 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3540 to conform to its new signature.
3541 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3542 on discarded node here, now called in global_vector_fixup.
3543
35442008-08-09 Bill Maddox <maddox@google.com>
3545
3546 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3547 has not been set to a front-end-specific value.
3548
35492008-08-05 Doug Kwan <dougkwan@google.com>
3550
3551 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3552 build breakage.
3553
35542008-07-30 Bill Maddox <maddox@google.com>
3555
3556 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3557 Remove obsolete comments.
3558 (lto_read_decls): Remove initialization of deleted field data_in.global.
3559 Tidy up comments.
3560 (lto_main): Remove redundant initialization of section_hash_table.
3561 * lto-elf.c: Removed obsolete comments.
3562 * lto.h: Tidy up comments.
3563 * lto-symtab.c (lto_least_common_multiple): New function.
3564 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3565 Tidy up comments.
3566
35672008-07-25 Diego Novillo <dnovillo@google.com>
3568 Bill Maddox <maddox@google.com>
3569
3570 * lto.c: Re-order include files.
3571 Include lto-section-out.h.
3572 (preload_common_nodes): Add debugging output.
3573 Add new local INDEX_TABLE.
3574 Call preload_common_node.
3575 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3576
35772008-07-13 Bill Maddox <maddox@google.com>
3578
3579 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3580 unwanted scaling during pointer addition.
3581
35822008-07-11 Bill Maddox <maddox@google.com>
3583 Diego Novillo <dnovillo@google.com>
3584
3585 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3586 Make code const-correct.
3587 (lto_file_read): Fix C++ compatibility warnings.
3588 (lto_read_section_data): Fix C++ compatibility warnings.
3589 (lto_get_section_data): Use CONST_CAST to avoid warning when
3590 const pointer passed to free.
3591 * lto-elf.c (lto_elf_build_section_table): Fix C++
3592 compatibility warnings.
3593 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3594 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3595 (lto_get_current_out_file): Fix C++ compatibility warnings.
3596
35972008-07-11 Diego Novillo <dnovillo@google.com>
3598
3599 * Make-lang.in (lto-warn): Define.
3600
36012008-07-03 Simon Baldwin <simonb@google.com>
3602
3603 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3604 LTO_STREAM_DEBUGGING.
3605
36062008-06-27 Ollie Wild <aaw@google.com>
3607
3608 * lto-elf.c (lto-section-out.h): New include.
3609 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3610 and data members.
3611 (cached_file_attrs): New static variable.
3612 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3613 Use cached_file_attrs for checking bits.
3614 (lto_elf_build_section_table): Remove elf_file argument from
3615 lto_elf_get_shdr and lto_elf_free_shdr calls.
3616 (DEFINE_INIT_SHDR): New macro.
3617 (init_shdr32, init_shdr64): New functions defined via the
3618 DEFINE_INIT_SHDR macro.
3619 (lto_elf_begin_section_with_type): New function.
3620 (lto_elf_begin_section): New function.
3621 (lto_elf_append_data): New function.
3622 (lto_elf_end_section): New function.
3623 (DEFINE_VALIDATE_EHDR): New macro.
3624 (validate_ehdr32, validate_ehdr64): New functions defined via the
3625 DEFINE_VALIDATE_EHDR macro.
3626 (validate_file): New function.
3627 (DEFINE_INIT_EHDR): New macro.
3628 (init_ehdr32, init_ehdr64): New functions defined via the
3629 DEFINE_INIT_EHDR macro.
3630 (init_ehdr): New function.
3631 (lto_elf_file_open): Add support for writable files. Move some
3632 validation logic to validate_file.
3633 (lto_elf_file_close): Add support for writable files. Write file data
3634 and free data blocks.
3635 (current_out_file): New static variable.
3636 (lto_set_current_out_file): New function.
3637 (lto_get_current_out_file): New function.
3638 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3639 Add temporary initialization for testing ELF serialization.
3640 * lto.h (lto-section-out.h): New include.
3641 (struct lto_file_struct): Slight modification to comment.
3642 (lto_elf_file_open): Add writable parameter.
3643 (lto_elf_begin_section): New function declaration.
3644 (lto_elf_append_data): New function declaration.
3645 (lto_elf_end_section): New function declaration.
3646 (lto_set_current_out_file, lto_get_current_out_file): New function
3647 declarations.
3648 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3649 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3650 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3651 * Make-lang.in (LTO_H): Add lto-section-out.h.
3652
36532008-06-12 Ollie Wild <aaw@google.com>
3654
3655 * lto.h (struct lto_file_vtable_struct): Remove.
3656 (struct lto_file_struct): Remove vtable member.
3657 * lto-elf.c (lto_file_init): Remove vtable argument.
3658 (lto_elf_map_optional_lto_section): Remove.
3659 (lto_elf_unmap_section): Remove.
3660 (lto_elf_file_vtable): Remove.
3661 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3662 lto_file_init call.
3663 (lto_elf_find_section_data): Remove.
3664
36652008-06-11 Ollie Wild <aaw@google.com>
3666
3667 * lto.c (lto_file_read): Add const qualifier to data variable.
3668
36692008-06-11 Diego Novillo <dnovillo@google.com>
3670
3671 Merge from lto-streamber sub-branch.
3672
3673 2008-06-04 Ollie Wild <aaw@google.com>
3674
3675 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
3676 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
3677
3678 2008-05-28 Bill Maddox <maddox@google.com>
3679
3680 Replace the DWARF reader in the LTO front-end.
3681
3682 * lto.c: Include lto-tree-in.h, lto-tags.h.
3683 (enum DWARF2_class, DW_cl_constant, struct
3684 DWARF2_form_data, struct lto_context,
3685 lto_fd_init, lto_info_fd_init,
3686 lto_abbrev_fd_init, lto_info_fd_close,
3687 lto_file_init, lto_file_close,
3688 lto_file_corrupt_error, lto_abi_mismatch_error,
3689 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
3690 lto_read_uleb128, lto_read_sleb128,
3691 lto_read_initial_length, lto_abbrev_read_attrs,
3692 lto_abbrev_read, lto_abbrev_read_lookup,
3693 lto_read_section_offset,
3694 lto_read_comp_unit_header, find_cu_for_offset,
3695 lto_get_file_name,
3696 lto_resolve_reference,lto_read_form,
3697 attribute_value_as_int,
3698 make_signed_host_wide_int,
3699 attribute_value_as_constant, lto_cache_hash,
3700 lto_cache_eq, lto_cache_store_DIE,
3701 lto_cache_lookup_DIE, lto_find_integral_type,
3702 lto_find_integral_type_1,
3703 LTO_BEGIN_READ_ATTRS_UNCHECKED,
3704 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
3705 lto_unsupported_attr_error, lto_get_identifier,
3706 lto_read_referenced_type_DIE,
3707 lto_read_compile_unit_DIE,
3708 lto_read_array_type_DIE,
3709 lto_read_structure_union_class_type_DIE,
3710 lto_read_enumerator_DIE,
3711 lto_read_enumeration_type_DIE,
3712 lto_read_only_for_child_DIEs,
3713 lto_read_only_for_child_DIEs,
3714 lto_read_member_DIE, lto_read_abbrev,
3715 lto_read_variable_formal_parameter_constant_DIE,
3716 lto_get_body): Removed.
3717 (preload_common_nodes): New function.
3718 (lto_read_decls): Convert for new global streamer.
3719 (lto_materialze_file_data,
3720 lto_read_subroutine_type_subprogram_die,
3721 lto_read_unspecified_parameters_DIE,
3722 lto_read_typedef_DIE,
3723 lto_read_pointer_reference_type_DIE,
3724 lto_read_subrange_type_DIE,
3725 lto_read_base_type_DIE,
3726 lto_read_const_volatile_restrict_type_DIE,
3727 lto_read_namespace_DIE,
3728 lto_read_unspecified_type_DIE, lto_read_DIE,
3729 lto_read_child_DIEs, lto_collect_child_DIEs):
3730 Removed.
3731 (lto_info_read, lto_set_cu_context): Removed.
3732 (lto_file_read): Convert for new global streamer.
3733 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
3734 lto_resolve_var_ref, lto_resolve_fn_ref,
3735 lto_resolve_field_ref, lto_resolve_typedecl_ref,
3736 lto_resolve_namespacedecl_ref): Removed.
3737 (lto_file_init, lto_file_close): Moved to lto-elf.c.
3738 * lto-tree.h (lto_symtab_merge_var,
3739 lto_symtab_mergee_fun): Declare here.
3740 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
3741 (lto_elf_file_open): Removed code to read DWARF debug sections.
3742 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
3743 DWARF2_CompUnit, lto_die_ptr,
3744 lto_die_cache_entry, lto_fd, lto_info_fd,
3745 lto_abbrev_fd): Removed.
3746 (lto_file): Removed debug_info and debug_abbrev fields.
3747 (lto_ref): Removed.
3748 (lto_file_init, lto_file_close,
3749 lto_resolve_type_ref, lto_resolve_var_ref,
3750 lto_resolve_fn_ref, lto_resolve_field_ref,
3751 lto_resolve_typedecl_ref,
3752 lto_resolve_namespacedecl_ref,
3753 lto_get_file_name): Removed declarations.
3754 (lto_symtab_merge_var, lto_symtab_merge_fn):
3755 Declarations moved to lto-tree.h.
3756 * lto-symtab.c (lto_compatible_attributes_p):
3757 Lobotomize this, as it barfs on "Hello, world!".
3758 * lto-section-out.c: Include lto-tree-out.h.
3759 (lto_hash_global_slot_node,
3760 lto_eq_global_slot_node, preload_common_nodes,
3761 write_global_stream, write_global_references):
3762 New functions.
3763 (produce_asm_for_decls): Convert for new global streamer.
3764 * lto-section-out.h (lto_hash_global_slot_node,
3765 lto_eq_global_slot_node): Declare.
3766
37672008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
3768 Jan Hubicka <jh@suse.cz>
3769
3770 * lto.c (sys/mman.h, tree-pass.h): New includes.
3771 (lto_materialize_constructors_and_inits,
3772 lto_materialize_function): Keeps length of section.
3773 (lto_materialize_cgraph): Removed.
3774 (lto_read_decls): Initialize fd field.
3775 (lto_file_read): Different return type and removed much code to
3776 lto_main.
3777 (page_mask): New variable.
3778 (lto_read_section_data, get_section_data, free_section_data): New
3779 functions.
3780 (lto_main): Now calls pass manager, sets the hooks so that the ipa
3781 passes can get the section data.
3782
37832008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
3784
3785 * lto.h (lto_read_decls): Made local.
3786 (lto_input_function_body, lto_input_constructors_and_inits,
3787 lto_input_cgraph): Declarations moved to lto-section-in.h.
3788 * lto-section-in.c: Moved to .. .
3789 * lto-cgraph-in.c: Ditto.
3790 * lto-section-in.h: Ditto.
3791 * lto-function-in.c: Ditto.
3792 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
3793 (lto_insert_block): Removed.
3794 (LANG_HOOKS_INSERT_BLOCK): Removed.
3795 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
3796 lto-section-in.o): Rules moved to lto/Makefile.in.
3797
3798
37992008-05-16 Ollie Wild <aaw@google.com>
3800
3801 * lto-lang.c (tree-inline.h): Include.
3802 (lto_post_options): New function.
3803 (LANG_HOOKS_POST_OPTIONS): Define.
3804 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
3805 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
3806
38072008-05-13 Diego Novillo <dnovillo@google.com>
3808
3809 * lto-function-in.c (input_ssa_names): Call
3810 make_ssa_name_fn instead of make_ssa_name.
3811
38122008-05-12 Diego Novillo <dnovillo@google.com>
3813
3814 * lto-cgraph-in.c (overwrite_node): Update references to
3815 inline summary fields.
3816 * lto-function-in.c (input_expr_operand): Do not handle
3817 STRUCT_FIELD_TAG.
3818
38192008-05-09 Ollie Wild <aaw@google.com>
3820
3821 * lang.opt: New file.
3822 * lto-lang.c (lto_init_options): New function.
3823 (lto_handle_option): New function.
3824 (lto_init): Move initialization of flag_unit_at_a_time to
3825 lto_init_options.
3826 (LANG_HOOKS_INIT_OPTIONS): Define.
3827 (LANG_HOOKS_HANDLE_OPTION): Define.
3828
38292008-04-29 Ollie Wild <aaw@google.com>
3830
3831 * lto.c (lto_read_namespace_DIE): New function.
3832 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
3833 NAMESPACE_DECL DIE's.
3834 (lto_resolve_namespacedecl_ref): New function.
3835 * lto.h (lto_resolve_namespacedecl_ref): New function.
3836 * lto-section-in.c (lto_read_decls): Read namespace declarations.
3837 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
3838 and num_namespace_decls.
3839 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
3840 * lto-lang.c (lto_init_ts): New function.
3841 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
3842
38432008-04-16 Ollie Wild <aaw@google.com>
3844
3845 * lto-function-in.c (input_type_ref): Updated function description.
3846
38472008-04-16 Ollie Wild <aaw@google.com>
3848
3849 * lto-function-in.c (input_type_ref_1): New function.
3850 (input_type_ref): Split into two functions.
3851 (input_function): Add support for type contexts.
3852
38532008-04-16 Ollie Wild <aaw@google.com>
3854
3855 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
3856 section name
3857
38582008-04-16 Ollie Wild <aaw@google.com>
3859
3860 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
3861 list of supported languages.
3862
38632008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
3864
3865 Merge with mainline @133491.
3866
38672008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
3868 Jan Hubicka <jh@suse.cz>
3869
3870 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
3871 fd->unmaterialized_fndecls.
3872 (lto_get_file_name, lto_materialize_cgraph): New function.
3873 (lto_materialize_constructors_and_inits,
3874 lto_materialize_function): Read info directly from elf file.
3875 (lto_file_read): Made local and initialize dictionary so that
3876 other lto sections can be read without reprocessing the elf file.
3877 (lto_main): Read all functions after all files have been processed
3878 for their types, globals and cgraph.
3879 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
3880 dependencies.
3881 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
3882 (hash_name, eq_name, lto_elf_build_section_table): New functions.
3883 (lto_elf_read_symtab): Removed function.
3884 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
3885 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
3886 (lto_file_read): Made local.
3887 (lto_get_file_name, lto_elf_build_section_table,
3888 lto_input_cgraph):
3889 New function.
3890 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
3891 New functions.
3892 (lto_read_decls): Get the file name.
3893 * lto-cgraph-in.c: New file.
3894 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
3895 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
3896 (input_labels): Fixed latent sizeof issue.
3897 (input_function): Build stmt array to set call sites into cgraph
3898 edges.
3899 (lto_read_body): Reset cfun->curr_properties.
3900 * lto_section_in.h (lto_section_slot): New structure.
3901 (section_hash_table.lto_file_decl_data): New field.
3902
3903
39042008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
3905
3906 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
3907 reconstruct static initializers.
3908 (lto_get_body, lto_materialize_function): Add lto_section_type as
3909 a parameter.
3910 (lto_materialize_constructors_and_inits,
3911 lto_materialize_file_data): New function.
3912 (lto_materialize_function,
3913 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
3914 unmap_section and map_fn_body to map_section.
3915 (lto_set_cu_context): Process functions and static inits
3916 differently.
3917 * Make-lang.in (LTO_H, lto/lto-function-in.o,
3918 lto/lto-section-in.o): Update dependencies.
3919 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
3920 lto_section_type parameter.
3921 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
3922 * lto.h (lto_file_vtable_struct): Removed two of the fields and
3923 renamed the other two so that there is only one map function and
3924 one unmap function and each takes a section type parameter.
3925 (lto_read_function_body): Renamed to lto_input_function_body and
3926 added file_data parameter.
3927 (lto_read_var_init): Removed.
3928 (lto_input_constructors_and_inits): New function.
3929 * lto-section-in.c (lto_read_decls): New function.
3930 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
3931 var_decls, type_decls, types to lto_file_decl_data.
3932 (input_type_ref, input_expr_operand, lto_read_body): Get
3933 field_decls, fn_decls, var_decls, type_decls, types from different
3934 structure.
3935 (input_globals, input_constructor, lto_read_var_init): Removed.
3936 (input_constructors_or_inits): New function.
3937 (lto_read_function_body, lto_input_constructors_and_inits):
3938 Renamed to lto_input_function_body and takes file_data parameter.
3939 * lto-section-in.h (lto_file_decl_data): New structure.
3940
39412008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3942
3943 * lto-function-in.c (input_globals.c): Changed input type to
3944 lto_function_header.
3945 (input_bb): Removed code to deserialize the stmt number.
3946 (input_function): Renumber all stmts after they are input.
3947 (lto_read_body, lto_read_function_body, lto_read_var_init):
3948 Changed to used new header format and enum section_type.
3949 *lto-lang.c (success): Removed.
3950
39512008-01-28 Nathan Froyd <froydnj@codesourcery.com>
3952
3953 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
3954 (lto_elf_free_sym): Likewise.
3955
3956 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
3957 (lto_elf_build_init): Likewise.
3958
39592008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
3960
3961 * lto-read.c: Renamed to lto-function-in.c.
3962 (input_1_unsigned): Moved to lto-section-in.c and renamed
3963 lto_input_1_unsigned.
3964 (input_uleb128): Moved to lto-section-in.c and renamed
3965 lto_input_uleb128.
3966 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
3967 lto_input_widest_uint_uleb128.
3968 (input_sleb128): Moved to lto-section-in.c and renamed
3969 lto_input_sleb128.
3970 (input_integer): Moved to lto-section-in.c and renamed
3971 lto_input_integer.
3972 (debug_in_fun): Moved to lto-section-in.c and renamed
3973 lto_debug_in_fun.
3974 (input_block): Moved to lto-section-in.h and renamed
3975 lto_input_block.
3976 (input_expr_operand): Fixed to allow lists with more than one
3977 element.
3978 * lto-section-in.h: New file.
3979 * lto-section-in.c: New file with changes from above.
3980 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
3981 (lto-section-in.o): New rule.
3982
39832007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3984
3985 * lto-read.c (input_expr_operand): Mark static and external
3986 VAR_DECLs as needed.
3987
39882007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3989
3990 * lto-read.c (input_integer): Use the correct shift amount.
3991
39922007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3993
3994 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
3995 (LANG_HOOKS_NAME): Define.
3996
39972007-12-27 Nathan Froyd <froydnj@codesourcery.com>
3998
3999 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4000 original function to...
4001 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4002 don't have a base type.
4003 (lto_read_enumeration_type_DIE): Examine the values of the
4004 enumeration to determine whether we can use an unsigned type for
4005 the base type of the enumeration.
4006
40072007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4008
4009 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4010 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4011
40122007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4013
4014 * lto-lang.c (lto_types_compatible_p): New function.
4015 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4016
40172007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4018 Kenneth Zadeck <zadeck@naturalbridge.com>
4019
4020 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4021 (input_local_vars): Read in DECL_INITIAL and context for local
4022 statics that need to be put in unexpanded_vars_list.
4023
40242007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4025
4026 * lto-read.c (input_real): Use a separate null-terminated buffer
4027 for calling real_from_string.
4028 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4029 tell cgraph that it's needed.
4030
40312007-12-19 Doug Kwan <dougkwan@google.com>
4032
4033 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4034
40352007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4036
4037 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4038 (lto_file_read): Reset the members of 'context' every time we read
4039 a toplevel DIE, with special attention to last_param_type.
4040
40412007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4042
4043 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4044 'declaration'. Set the assembler name for non-public functions.
4045
40462007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
4047
4048 * lto_read.c (data_in.unexpanded_indexes): New array.
4049 (input_local_var): Added code to read in unexpanded_var_list
4050 indexes for variables. Only read in DECL_CHAIN field for
4051 parameters.
4052 (input_local_vars): Added code to rebuild unexpanded_var_list in
4053 order using unexpanded_indexes.
4054 (input_function): Added code to set DECL_CONTEXT for functions.
4055
40562007-12-13 Doug Kwan <dougkwan@google.com>
4057
4058 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4059 in pointer and reference types.
4060
40612007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4062
4063 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4064 RESULT_DECL.
4065
40662007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4067
4068 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4069 already read the DIE.
4070 (lto_get_body): New function, split out from...
4071 (lto_materialize_function): ...here. Call it.
4072 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4073 determine DECL_EXTERNAL.
4074 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4075 FUNCTION_DECLs when necessary. Use the type of the actual
4076 function definition if we are unable to easily merge types. Ignore
4077 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4078 necessary.
4079
40802007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4081
4082 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4083
40842007-12-12 Bill Maddox <maddox@google.com>
4085
4086 Revert
4087 2007-12-07 Bill Maddox <maddox@google.com>
4088
4089 * lto.c (lto_str_fd_init): New function.
4090 (lto_str_fd_close): New function.
4091 (lto_file_init): Call lto_str_fd_init.
4092 (lto_file_close): Call lto_str_fd_close.
4093 (lto_str_read): New function. Read debug string table.
4094 (lto_str_lookup): New function. Get string for debug
4095 string table offset.
4096 (lto_read_form): Recognize DW_FORM_strp.
4097 (lto_file_read): Invoke lto_str_read.
4098
4099 * lto-elf.c (lto_elf_file_open): Read raw section data
4100 for the .debug_str section, if present.
4101
4102 * lto.h (struct lto_str_fd_struct): New struct.
4103 (struct lto_file_struct): Added new field DEBUG_STR
4104 to hold the file descriptor for the debug string table.
4105
41062007-12-07 Bill Maddox <maddox@google.com>
4107
4108 * lto.c (lto_str_fd_init): New function.
4109 (lto_str_fd_close): New function.
4110 (lto_file_init): Call lto_str_fd_init.
4111 (lto_file_close): Call lto_str_fd_close.
4112 (lto_str_read): New function. Read debug string table.
4113 (lto_str_lookup): New function. Get string for debug
4114 string table offset.
4115 (lto_read_form): Recognize DW_FORM_strp.
4116 (lto_file_read): Invoke lto_str_read.
4117
4118 * lto-elf.c (lto_elf_file_open): Read raw section data
4119 for the .debug_str section, if present.
4120
4121 * lto.h (struct lto_str_fd_struct): New struct.
4122 (struct lto_file_struct): Added new field DEBUG_STR
4123 to hold the file descriptor for the debug string table.
4124
41252007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4126
4127 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4128 Grow the basic_block_info and label_to_block_map vectors if
4129 necessary. Read in the block chain.
4130
41312007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4132
4133 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4134
41352007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4136
4137 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4138
41392007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4140
4141 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4142 (lto_read_body): Don't declare PROP_alias.
4143
41442007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4145
4146 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4147 argument type information.
4148
41492007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4150
4151 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4152 TREE_THIS_VOLATILE if the associated type is a volatile type.
4153 (lto_materialize_function): Remove call to init_ssa_operands.
4154 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4155 variable when reading an SSA_NAME. Do the same when reading a
4156 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4157 (input_cfg): Call init_ssa_operands.
4158 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4159 Move call to init_tree_ssa...
4160 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4161 add_referenced_var on any variables referenced from the body of the
4162 function. Inform the rest of the compiler we are in SSA form and
4163 inform later passes about the current properties.
4164
41652007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4166
4167 * lto.c (lto_materialize_function): Add FIXME.
4168
41692007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4170
4171 * lto-lang.c (enum built_in_attribute): New enum.
4172 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4173 built_in_attributes): New variables.
4174 (def_builtin_1): New function.
4175 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4176
41772007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4178
4179 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4180 DECL_SOURCE_LOCATION for debugging purposes.
4181 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4182 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4183 laying out the decl until later.
4184 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4185 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4186 TREE_ADDRESSABLE.
4187 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4188 operand of an ADDR_EXPR.
4189 * lto-lang.c (enum lto_builtin_type): New enum.
4190 (builtin_type): New typedef.
4191 (builtin_types, string_type_node, const_string_type_node,
4192 wint_type_node, intmax_type_node, uintmax_type_node,
4193 signed_size_type_node): New variables.
4194 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4195 lto_build_c_type_nodes): New functions.
4196 (lto_init): Initialize builtin types.
4197 (lto_set_decl_assembler_name): Let the target machine mangle the
4198 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4199
42002007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4201
4202 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4203 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4204 the type is a constant type. Set the assembler name and inform
4205 the rest of the compiler about the new decl if the decl is not
4206 public.
4207 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4208 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4209 try to read in function bodies for functions that already have bodies.
4210 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4211 equivalency.
4212 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4213 Check for whether we matched a builtin function type before calling
4214 lto_same_type_p on the generated type. Permit cases where the
4215 declaration of an array is unbounded, but the definition is bounded.
4216 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4217 DECL_SIZE_UNIT if necessary.
4218
42192007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4220
4221 * lto-read.c (input_expr_operand): Get types right
4222 for COMPLEX_CST.
4223
42242007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4225
4226 * lto-read.c (make_new_block, input_cfg): Properly set
4227 n_basic_blocks.
4228
42292007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4230
4231 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4232 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4233
42342007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4235
4236 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4237 construct the integer type for bitfields.
4238
42392007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4240
4241 * lto-read.c (data_in.current_node_has_loc): Removed.
4242 (input_line_info): Returns true if node needs line set.
4243 (set_line_info): Always sets line if called.
4244 (clear_line_info): Removed reference to current_node_needs_loc.
4245 (input_expr_operand): Keeps track locally if current node needs a loc.
4246 (input_local_var): Added code to handle DECL_INITIAL for
4247 static local vars. Only set loc if necessary.
4248
42492007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4250
4251 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4252 DECL_CONTEXT.
4253
42542007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4255
4256 * lto.c: Include langhooks.h.
4257 (lto_find_integral_type): Rework logic to handle the case where
4258 got_byte_size is true, but the bitsize requested and that of the
4259 base_type doesn't match.
4260 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4261 asm_name if we are creating a VAR_DECL.
4262 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4263 definition.
4264 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4265 function reference and use the builtin's decl if so. Set the
4266 DECL_CONTEXT of the RESULT_DECL for the function.
4267 * lto-lang.c (registered_builtin_fndecls): New variable.
4268 (lto_getdecls): Return it.
4269 (lto_builtin_function): Chain the new decl onto
4270 registered_builtin_fndecls.
4271
42722007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
4273
4274 * lto-read.c (process_tree_flags, lto_static_init_local):
4275 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4276 (input_line_info, clear_line_info): Fixed new line number code.
4277 (input_expr_operand): Added type to SWITCH_EXPR.
4278 (lto_read_body): Properly initialized data_in.
4279 Clear line info when leaving.
4280
42812007-11-13 Diego Novillo <dnovillo@google.com>
4282
4283 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4284 Initialize ARTIFICIAL.
4285 (lto_read_subroutine_type_subprogram_DIE): Initialize
4286 SAVED_SCOPE.
4287 * lto-read.c (set_line_info): Remove ; from calls to
4288 LINEMAP_POSITION_FOR_COLUMN.
4289
42902007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4291
4292 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4293 (input_expr_operand, input_local_var): Renamed get_type_ref to
4294 input_type_ref.
4295 (input_expr_operand): Get the types correct for
4296 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4297
42982007-11-13 Doug Kwan <dougkwan@google.com>
4299
4300 * lto-read.c (input_widest_uint_uleb128): New function.
4301 (input_tree_flags, process_tree_flags, input_line_info,
4302 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4303 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4304 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4305 (lto_static_init_local): Add code to assert that lto_flags_type is
4306 wide enough.
4307
43082007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4309
4310 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4311 (lto_read_subroutine_type_subprogram_DIE): Handle
4312 DW_AT_static_link and DW_AT_specification. Return the
4313 specification if present.
4314 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4315
43162007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4317
4318 * lto-lang.c: Include target.h.
4319 (registered_builtin_types): New variable.
4320 (lto_type_for_mode): Increase number of modes handled.
4321 (lto_builtin_function): Fix argument list and return the decl.
4322 (lto_register_builtin_type): New function.
4323 (lto_init): Initialize target builtins and language-independent
4324 nodes.
4325 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4326
43272007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4328
4329 * lto-read.c (input_expr_operand): Added code to properly handle
4330 index filed. Added new RANGE_EXPR case.
4331
43322007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4333
4334 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4335 (data_in): Added current_node_has_loc field.
4336 (input_line_info, set_line_info, clear_line_info): Added a support
4337 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4338 did not have on on the source side.
4339 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4340 numbers too.
4341
43422007-11-09 Doug Kwan <dougkwan@google.com>
4343
4344 * lto-read.c (input_expr_operand): Change type of operand 2 of
4345 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4346
43472007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4348
4349 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4350 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4351 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4352 the new decl we are creating. Move informing the middle end about
4353 the new decl to...
4354 (lto_main): ...here. Inform the middle end about global variables
4355 after we have read in all the input files.
4356 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4357 variables with internal linkage, so delete the check for internal
4358 linkage. Combine TREE_PUBLIC flags.
4359
43602007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4361
4362 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4363 DW_AT_decl_line.
4364 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4365 builtin specially. Move check for attribute compatibility
4366 earlier.
4367
43682007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4369
4370 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4371 * config-lang.in (gtfiles): Add lto.h and lto.c.
4372 * lto-elf.c: Include ggc.h.
4373 (lto_elf_file_open): Allocate elf_file from GC memory.
4374 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4375 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4376 in GC memory.
4377 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4378 (lto_file_close): Free file from GC memory.
4379 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4380 (lto_read_member_DIE): Fix declaration.
4381 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4382 in GC memory.
4383 (current_lto_file): New variable.
4384 (lto_main): Use it.
4385 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4386 lto_die_cache_entry): Move to...
4387 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4388 declarations accordingly.
4389 (struct lto_file_struct): Declare.
4390 (lto_file_vtable): Use it instead of lto_file.
4391
43922007-11-06 Alon Dayan <alond@il.ibm.com>
4393 Kenneth Zadeck <zadeck@naturalbridge.com>
4394
4395 * lto-read.c (process_flags, lto_static_init_local):
4396 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4397 change global array num_flags_for_code to flags_length_for_code.
4398 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4399
44002007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4401
4402 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4403 layout functions to compute information about the newly constructed
4404 type.
4405
44062007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4407
4408 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4409 case to use DECL_RESULT if necessary.
4410
44112007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4412
4413 * lto-read.c (input_tree_list): Removed.
4414 (input_tree_flags): Added parameter to force flags no matter what
4415 tree code.
4416 (input_expr_operand): Added parameter to input_tree_flags.
4417 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4418 input_expr_operand rather than input_tree_lists.
4419 (input_local_var): Use input_expr_operand to read attributes
4420 rather then input_tree_list.
4421 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4422
44232007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4424
4425 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4426 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4427 TYPE_DECL for it.
4428 * lto-read.c (lto_read_body): Use correct sizes for calculating
4429 type_decls_offset and types_offset.
4430
44312007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4432
4433 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4434 with GENERIC_NEXT.
4435 * config-lang.in (gtfiles): Add lto-lang.c.
4436 * lto-lang.c: Include gt-lto-lto-lang.h.
4437 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4438 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4439 (lto/lto-read.o): Likewise.
4440
44412007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4442
4443 * lto-read.c (data_in): Added type_decls and current_col fields.
4444 (string_slot): New type to hold canonized file name.
4445 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4446 input_line_info, set_line_info, clear_line_info): New functions.
4447 (file_name_hash_table): New hash table.
4448 (input_local_var, input_labels, input_local_vars_index,
4449 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4450 (input_uleb128): Changed type of byte var.
4451 (input_expr_operand): Large number of changes to get line numbers
4452 correct. Added TYPE_DECL case.
4453 (input_globals): Added code to get TYPE_DECLs processed.
4454 (input_local_var): Added code to process line numbers and
4455 TREE_CHAIN and DECL_CONTEXT.
4456 (input_function, input_constructor): Added call to
4457 clear_line_number.
4458 (lto_static_init_local): Added code to get line numbers correct.
4459 (lto_read_body): Added code to get TYPE_DECLS read and to change
4460 parameters to the calls above that had their parms reorganized.
4461
4462
44632007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4464
4465 * lto.h (lto_resolve_typedecl_ref): Declare.
4466 * lto.c (lto_resolve_typedecl_ref): New function.
4467
44682007-10-29 Mark Mitchell <mark@codesourcery.com>
4469 Nathan Froyd <froydnj@codesourcery.com>
4470
4471 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4472 DIEs even if we find an abstract origin for this DIE.
4473
44742007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4475
4476 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4477 RESULT_DECL slightly earlier. Only remember the decl for later
4478 if we successfully merge declarations.
4479
44802007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4481
4482 * lto-read.c (input_expr_operand): Give label_values the proper
4483 context and provide switch statements with a default type.
4484
44852007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4486
4487 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4488 * lto.c (lto_materialize_function): ...to here.
4489
44902007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4491
4492 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4493 * lto.c (lto_info_fd_init): Initialize it.
4494 (lto_info_fd_close): Free it.
4495 (lto_materialize_function): New function.
4496 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4497 unmaterialized_fndecls.
4498 (lto_file_read): Read in all the function bodies after we have read
4499 all of the DWARF info.
4500 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4501 reading a function body.
4502
45032007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4504
4505 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4506 semetric with output_tree_flags. Added call to log flags.
4507 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4508 type issues to make everything consistent with flags being
4509 unsigned HOST_WIDE_INTS.
4510 (input_expr_operand): Added call to
4511 recompute_tree_invariant_for_addr_expr.
4512 (input_local_var): Added debugging for tree_chains. Now calls
4513 input_tree_flags.
4514 (input_phi): Made flags unsigned HOST_WIDE_INT.
4515 (input_ssa_names): Now calls input_tree_flags.
4516 (lto_read_body): Now sets cfun.
4517 (lto_read_function_body): Now sets current_function_pointer.
4518
45192007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4520
4521 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4522 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4523 inspecting fields within.
4524 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4525 handle this appropriately.
4526
45272007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4528
4529 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4530 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4531 both DW_AT_abstract_origin and DW_AT_specification.
4532 (lto_read_subroutine_type_subprogram_DIE): Handle
4533 DW_AT_abstract_origin.
4534 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4535 (lto_read_DIE_at_ptr): Define as static to match declaration.
4536 Lookup the PTR in the cache before reading it from the file.
4537 (lto_resolve_var_ref): Adjust accordingly.
4538 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4539 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4540
45412007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4542
4543 * lto.c (lto_read_DIE_at_ptr): New function.
4544 (lto_resolve_var_ref): Use it.
4545 (lto_resolve_fn_ref): Use it.
4546 (lto_resolve_field_ref): Use it.
4547 (lto_read_variable_formal_parameter_constant_DIE): Follow
4548 DW_AT_specification and return the associated decl when appropriate.
4549
45502007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4551
4552 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4553 Implement for scalar integer modes.
4554 (lto_init): Initialize size_type_node.
4555
45562007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4557
4558 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4559 (input_local_var): Add chaining for params.
4560 (input_ssa_names): Add cfun parameter.
4561 (input_function): Remove unnecessary else.
4562
45632007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4564
4565 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4566 (lto_resolve_var_ref): Use proper types.
4567 (lto_resolve_fn_ref): Likewise.
4568 (lto_resolve_field_ref): Likewise.
4569
45702007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4571
4572 * lto-read.c (input_expr_operand): Remove case.
4573
45742007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4575
4576 * lto.c (lto_read_only_for_child_DIEs): New function.
4577 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4578 * lto-elf.c (lto_elf_map_lto_section): Remove.
4579 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4580 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4581 SSA_NAME. Add missing case for mechanical codes.
4582 (input_cfg): Use basic_block_info_for_function instead of
4583 basic_block_info.
4584
45852007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4586
4587 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4588 (input_list): Renamed input_tree_list and modified to follow same
4589 protocol as lto-function-out.c:output_tree_list.
4590 (input_expr_operand): Make asm operands use input_tree_list.
4591 (input_local_var): Now uses input_tree_list.
4592 (lto_read_body): Change placement for setting context of debug_labels.
4593
4594
45952007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4596
4597 * lto-read.c (input_real): Output debugging in proper order.
4598 (input_integer): Compute bit lengths properly.
4599 (input_list): Clean up declaration.
4600 (input_expr_operand): Change calls to input_real to match fix.
4601 Make reading of LTO_bit_field_ref1 match output.
4602 (input_local_var): Make reading of attributes match what is being
4603 written.
4604 (dump_debug_stream): Also print char in hex.
4605 (debug_out_fun): Fix signed unsigned mismatch.
4606
46072007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4608
4609 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4610 DW_AT_GNU_vector specially, as they are not contiguous with the
4611 specified set of attribute names. Use class_mask to check for
4612 errors at the end of the function
4613 (lto_resolve_var_ref): Read the DIE if it is not cached.
4614 (lto_resolve_fn_ref): Likewise.
4615 (lto_resolve_field_ref): Likewise.
4616
46172007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4618
4619 * lto.c: Include dwarf2out.h.
4620 (lto_cache_store_DIE): Assert that we never change the value.
4621 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4622 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4623 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4624 sensible type instead.
4625 (lto_read_structure_union_class_type_DIE): Store the newly
4626 created type prior to reading the members of the structure to
4627 avoid infinite recursion. Avoid computing types and alignments
4628 for structures whose sizes are unknown.
4629 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4630 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4631 DW_AT_const_value, and DW_AT_specification.
4632 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4633 Return early if we have already constructed the function type.
4634 (lto_read_typedef_DIE): Check to see if the type has been cached
4635 already. Cache the type before reading any children.
4636 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4637 (lto_read_DIE): Unset context->skip_non_parameters around reading
4638 the DIE.
4639 (lto_resolve_fn_ref): Delete trailing whitespace.
4640
46412007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4642
4643 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4644
46452007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4646
4647 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4648
46492007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4650
4651 * lto-lang.c (signed_and_unsigned_types): New variable.
4652 (lto_type_for_size): Consult signed_and_unsigned_types to find
4653 an approprite type, creating it if necessary.
4654 (lto_set_decl_assembler_name): Add actual method body.
4655
46562007-09-06 Jim Blandy <jimb@codesourcery.com>
4657
4658 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4659 can't find a var init for this variable, leave its DECL_INITIAL.
4660 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4661 lto_elf_map_fn_body.
4662 (lto_map_lto_section): New function.
4663 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4664 bodies, and lto_elf_map_optional_lto_section for variable
4665 initializers.
4666 (lto_elf_find_section_data): Quietly return NULL if the section is
4667 missing.
4668 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4669
4670 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
4671
4672 * lto-read.c (lto_read_body): Doc fix.
4673
46742007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4675
4676 * lto-read.c (fun_in): Renamed to data_in.
4677 (input_expr_operand, input_local_var, input_string_internal,
4678 input_string, input_real, input_list, get_label_decl,
4679 get_type_ref, input_expr_operand, input_globals, input_labels,
4680 input_local_vars_index, input_local_var, input_local_vars,
4681 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
4682 (input_constructor): New function.
4683 (lto_read_function_body): Renamed to lto_read_body and generalized
4684 to handle both functions and constructors.
4685 (lto_read_function_body, lto_read_var_init): New function.
4686
4687
46882007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4689
4690 * lto-read.c (input_expr_operand): Assert that there really is a
4691 FUNCTION_DECL.
4692 (input_globals): Removed checks on 0 section.
4693
46942007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4695
4696 * lto-read.c (fun_in): Added local_decls_index and
4697 local_decls_index_d.
4698 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
4699 (input_globals): Enabled code to handle FIELD_DECLs.
4700 (input_local_vars_index, input_local_vars): New function.
4701 (input_local_var): Changed to allow locals to be input randomly.
4702 (lto_read_function_body): Added code to input the
4703 local_decls_index and to free various structures.
4704
47052007-08-17 Jim Blandy <jimb@codesourcery.com>
4706
4707 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
4708 ATTRIBUTE_UNUSED from 'die' formal.
4709
4710 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
4711 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
4712 (input_list): Fix type of 'tag'.
4713 (input_expr_operand): Fix type of 'tag' argument. Update
4714 declaration. Fix type of 'ctag'. Add default case to switch,
4715 since the type of the switched value is now an enum.
4716 (input_local_vars): Fix type of 'tag'.
4717 (input_bb): Fix type of 'tag' argument.
4718 (input_function): Fix type of 'tag' argument.
4719
47202007-08-16 Jim Blandy <jimb@codesourcery.com>
4721
4722 * lto.c (lto_read_member_DIE): Record the tree we create in
4723 fd->die_cache. (Our 'die' argument is no longer unused.)
4724 (lto_resolve_field_ref): New function.
4725 * lto.h (lto_resolve_field_ref): New declaration.
4726
47272007-08-15 Jim Blandy <jimb@codesourcery.com>
4728
4729 * lto-read.c (lto_read_var_init): Mark arguments as unused.
4730
47312007-08-07 Jim Blandy <jimb@codesourcery.com>
4732
4733 * lto.c (lto_read_form): Complete attr_classes table.
4734 (DWARF2_form_data): Doc fix.
4735
47362007-08-05 Mark Mitchell <mark@codesourcery.com>
4737
4738 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
4739 and unmap_var_init.
4740 (lto_read_var_init): Declare.
4741 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
4742 interface for reading variable initializers.
4743 * lto-elf.c (lto_elf_read_var_init): Remove.
4744 (lto_elf_file_vtable): Update initializer.
4745 (lto_elf_read_var_init): Add comment about unused-ness.
4746 * lto-read.c (lto_read_var_init): New.
4747
4748 * lto.c (lto_read_form): Add entry for DW_AT_inline.
4749
47502007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
4751
4752 * lto-read.c (lto_read_function_body): Moved declaration of fn
4753 outside of ifdef.
4754
47552007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4756
4757 * lto-read.c (input_uleb128, input_string_internal, input_real,
4758 input_integer, input_record_start, input_list, get_type_ref,
4759 input_flags, input_expr_operand, input_expr_operand,
4760 input_expr_operand, input_local_vars, input_cfg, input_phi,
4761 input_ssa_names, input_bb, input_function): Added semicolons.
4762
4763
47642007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4765
4766 * lto-read.c (input_globals): Remove debugging.
4767 (input_function): Set DECL_ARGUMENTS.
4768
4769
47702007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4771
4772 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
4773 RETURN_EXPR, MODIFY_EXPR and processing of flags.
4774 (input_phi): Made work with operands other than SSA_NAMES and
4775 fixed processing of flags.
4776 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
4777 (input_flags): New function.
4778 * lto-lang.c (lto_init): Changed state of in_lto_p.
4779
4780
47812007-07-24 Mark Mitchell <mark@codesourcery.com>
4782
4783 * lto-tree.h (lto_varargs_cookie): Remove.
4784 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
4785 skip_non_parameters, skip_parameters.
4786 (lto_varargs_cookie): Remove.
4787 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
4788 parameter types.
4789 (lto_read_abbrev): New function.
4790 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
4791 child DIEs.
4792 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
4793 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
4794 (lto_file_read): Initialize new context fields.
4795 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
4796 (lto_unsigned_type): Remove.
4797 (lto_signed_type): Likewise.
4798 (lto_signed_or_unsigned_type): Likewise.
4799 (lto_init): Do not create lto_varargs_cookie.
4800 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
4801 (LANG_HOOKS_SIGNED_TYPE): Likewise.
4802 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
4803
48042007-07-19 Jan Hubicka <jh@suse.cz>
4805
4806 * lto-read.c (lto_read_function_body): Produce empty scope block
4807 to avoid crash.
4808
48092007-07-18 Mark Mitchell <mark@codesourcery.com>
4810
4811 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
4812 process local variables.
4813 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
4814
48152007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4816
4817 * lto-read.c (input_list, input_expr_operand): Added struct
4818 function parameter.
4819 (init_cfg, finalize_cfg): Removed function.
4820 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
4821 (input_labels, input_local_vars): Now takes input_block parameter rather than
4822 synthsyzing it.
4823 (input_cfg, input_phi, input_ssa_names): New functions.
4824 (input_bb): Now passes in input_blocks. Does not construct cfg
4825 and processes the list of phi functions.
4826 (input_function): Now builds both the cfg and ssa_names table.
4827 (lto_read_function_body): Processes new header fields to construct
4828 streams for the ssa_names and cfg and their debugging.
4829 * lto/lto-lang.c (lto_init): Set in_lto_p.
4830
4831
48322007-06-28 Mark Mitchell <mark@codesourcery.com>
4833
4834 * lto.h (lto_file_vtable): Add read_var_init.
4835 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
4836 initializers.
4837 (lto_main): Remove bogus asserts.
4838 * lto-elf.c (tm.h): Include it.
4839 (libiberty.y): Likewise.
4840 (lto_elf_file): Add strtab and symtab. Rename
4841 string_table_section_index to sec_strtab.
4842 (lto_elf_file_vtable): Add lto_elf_read_var_init.
4843 (lto_elf_get_shdr): New function.
4844 (lto_elf_free_shdr): Likewise.
4845 (lto_elf_find_section_data): Use them.
4846 (lto_elf_read_symtab): New function.
4847 (lto_elf_lookup_sym): Likewise.
4848 (lto_elf_free_sym): Likewise.
4849 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
4850 (lto_elf_built_init): New function.
4851 (lto_elf_read_var_init): Likewise.
4852 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
4853
48542007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
4855
4856 * lto-read (make_new_block): Initialize the stmt_list.
4857 (lto_static_init_local): Add debugging for missing codes.
4858
48592007-06-26 Mark Mitchell <mark@codesourcery.com>
4860
4861 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4862 unprototyped functions.
4863
48642007-06-23 Mark Mitchell <mark@codesourcery.com>
4865
4866 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4867 Handle DW_AT_MIPS_linkage_name.
4868 (lto_read_subroutine_type_subprogram): Likewise. Correct
4869 compilation errors.
4870 (lto_main): Remove incorrect assertions.
4871 * lto-symbtab.c: Build function types out of TREE_LISTs.
4872
4873 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
4874
4875 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
4876
48772007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
4878
4879 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
4880 dummy since ggc does not like empty structs.
4881 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
4882 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
4883 expr->common to expr->base.
4884 (make_new_block): Moved stmt_list to proper place.
4885
4886
48872007-03-14 Robert Kennedy <jimbob@google.com>
4888
4889 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
4890 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
4891 assembler name from DWARF.
4892 * lto-lang.c (lto_set_decl_assembler_name) New function.
4893
48942006-09-10 Mark Mitchell <mark@codesourcery.com>
4895
4896 * lto.h (lto_file_vtable): New structure.
4897 (lto_file): Add vtable pointer.
4898 (lto_file_init): Add vtable paramter.
4899 (lto_read_function_body): New function.
4900 (lto_symtab_merge_fn): New function.
4901 * lto.c (lto_file_init): Add vtable parameter.
4902 (lto_read_form): Fill in entries for DW_AT_prototyped,
4903 DW_AT_frame_base.
4904 (lto_read_subroutine_type_subprogram_DIE): New function.
4905 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
4906 DW_TAG_subprogram.
4907 * lto-elf.c (lto_elf_vile_vtable): New variable.
4908 (lto_elf_file_open): Pass it to lto_file_init.
4909 (lto_elf_map_fn_body): New function.
4910 (lto_elf_unmap_fn_body): Likewise.
4911 * lto-read.c: New file.
4912 * lto-symtab.c (lto_symtab_merge_fn): New function.
4913 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
4914 tree_rest_of_compilation.
4915 * Make-lang.in (LTO_OBJS): Add lto-read.o
4916 (lto-read.o): New target.
4917
49182006-09-03 Mark Mitchell <mark@codesourcery.com>
4919
4920 * lto.c (<inttypes.h>): Don't include it.
4921 (lto_context): Don't typedef it.
4922 (lto_resolve_reference): New function.
4923 (lto_read_form): Use it.
4924 (lto_resolve_type_ref): New function.
4925 (lto_resolve_var_ref): Likewise.
4926 (lto_resolve_fn_ref): Likewise.
4927 * lto.h (<inttypes.h>): Include it.
4928 (lto_context): New type.
4929 (lto_ref): New structure.
4930 (lto_resolve_type_ref): Declare.
4931 (lto_resolve_var_ref): Likewise.
4932 (lto_resolve_fn_ref): Likewise.
4933
49342006-08-18 Mark Mitchell <mark@codesourcery.com>
4935
4936 * lang-specs.h: New file.
4937
49382006-08-14 Mark Mitchell <mark@codesourcery.com>
4939
4940 * lto.c (lto_info_fd_init): Allocate the DIE cache.
4941 (lto_info_fd_close): Deallocate it.
4942 (lto_die_cache_entry): New structure.
4943 (lto_cache_hash): New function.
4944 (lto_cache_eq): Likewise.
4945 (lto_cache_store_DIE): Likewise.
4946 (lto_cache_lookup_DIE): Likewise.
4947 (lto_read_referenced_type_DIE): Use the cache.
4948 (lto_read_pointer_type_DIE): Robustify.
4949 (lto_read_DIE): Use the cache.
4950 * lto.h (hashtab.h): Include.
4951 (lto_info_fd): Add DIE cache.
4952 * Make-lang.in (LTO_H): New variable.
4953 (lto/lto-lang.o): Use LTO_H.
4954 (lto/lto-elf.o): Likewise.
4955 (lto/lto-symtab.o): Likewise.
4956
49572006-07-09 Mark Mitchell <mark@codesourcery.com>
4958
4959 * lto.c (lto_abi_mismatch_error): New function.
4960 (lto_abbrev_read): Initialize num_abbrevs.
4961 (lto_read_form): Specify allowed form classes for
4962 DW_AT_declaration. Adjust for change to lto_set_cu_context.
4963 (lto_read_variable_formal_parameter_constant_DIE): Handle
4964 DW_AT_declaration. Call lto_symtab_merge_var.
4965 (lto_read_pointer_type_DIE): New function.
4966 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
4967 not creat TYPE_DECLs for types that already have them.
4968 (lto_read_DIE): Add lto_read_pointer_type_DIE.
4969 (lto_set_cu_context): Make cu_start point to the header, not the
4970 first DIE.
4971 (lto_file_read): Adjust for change to lto_set_cu_context.
4972 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
4973 (lto/lto-symtab.o): New rule.
4974 * lto-tree.h (lang_identifier): Add decl field.
4975 (LANG_IDENTIFIER_CAST): New macro.
4976 (LTO_IDENTIFIER_DECL): Likewise.
4977 (lto_symtab_merge_var): Declare.
4978 * lto-symtab.c: New file.
4979
49802006-07-02 Daniel Berlin <dberlin@dberlin.org>
4981
4982 * lto.c (lto_context): Add current_cu and info_fd members.
4983 (DWARF2_CompUnit): New structure.
4984 (lto_read_DIE): Take lto_info_fd *.
4985 (lto_read_child_DIEs): Ditto.
4986 (lto_file_corrupt_error): Constify argument.
4987 (lto_set_cu_context): New function
4988 (lto_info_fd_init): Ditto.
4989 (lto_info_fd_close): Ditto.
4990 (lto_file_init): Use lto_info_fd_init.
4991 (lto_file_close): Use lto_info_fd_close.
4992 (lto_read_initial_length): Pass in pointer to header size.
4993 (lto_read_comp_unit_header): Correct cu_length to
4994 real length from beginning of header. Take lto_info_fd * as
4995 argument.
4996 (find_cu_for_offset): New function.
4997 (lto_read_form): Change first argument to lto_info_fd *.
4998 Add FORM_CONTEXT argument.
4999 Handle DW_FORM_ref_addr.
5000 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5001 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5002 Swap contexts if necessary for form.
5003 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5004 lto_file_corrupt_error.
5005 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5006 (lto_read_referenced_type_DIE): Change first argument to
5007 lto_info_fd *. Access lto_fd fields through base pointer.
5008 (lto_read_compile_unit_DIE): Change first argument to an
5009 lto_info_fd *.
5010 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5011 (lto_read_base_type_DIE): Ditto.
5012 (lto_read_child_DIEs): Ditto.
5013 (lto_read_DIE): Ditto. Change type of function pointer.
5014 (lto_info_read): New function.
5015 (lto_set_cu_context): Ditto.
5016 (lto_file_read): Use lto_info_read, walk resulting CU's
5017 (lto_main): Update for lto_info_fd change.
5018 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5019 necessary.
5020 * lto.h (DWARF2_CompUnit): New structure.
5021 (lto_info_fd): Ditto.
5022 (lto_file): Change debug_info to be an lto_info_fd.
5023
50242006-06-25 Mark Mitchell <mark@codesourcery.com>
5025
5026 * lto.c (toplev.h): Include it.
5027 (dwarf2.h): Likewise.
5028 (tree.h): Likewise.
5029 (tm.h): Likewise.
5030 (cgraph.h): Likewise.
5031 (ggc.h): Likewise.
5032 (inttypes.h): Likewise.
5033 (DWARF2_attr): New type.
5034 (DWARF2_abbrev): Likewise.
5035 (DWARF2_class): Likewise.
5036 (DWARF2_form_data): Likewise.
5037 (lto_context): Likewise.
5038 (lto_fd_init): New function.
5039 (lto_abbrev_fd_init): Likewise.
5040 (lto_abbrev_fd_close): Likewise.
5041 (lto_file_init): Use them.
5042 (lto_file_close): New function.
5043 (lto_file_corrupt_error): Likewise.
5044 (LTO_CHECK_INT_VAL): New macro.
5045 (lto_check_size_t_val): New function.
5046 (lto_check_int_val): Likewise.
5047 (LTO_READ_TYPE): New macro.
5048 (lto_read_ubyte): New function.
5049 (lto_read_uhalf): Likewise.
5050 (lto_read_uword): Likewise.
5051 (lto_read_uleb128): Likewise.
5052 (lto_read_initial_length): Likewise.
5053 (lto_abbrev_read_attrs): Likewise.
5054 (lto_abbrev_read): Likewise.
5055 (lto_abbrev_lookup): Likewise.
5056 (lto_read_section_offset): Likewise.
5057 (lto_read_comp_unit_header): Likewise.
5058 (lto_read_form): Likewise.
5059 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5060 (LTO_BEGIN_READ_ATTRS): Likewise.
5061 (LTO_END_READ_ATTRS): Likewise.
5062 (lto_unsupported_attr_error): New function.
5063 (lto_get_identifier): Likewise.
5064 (lto_read_referenced_type_DIE): Likewise.
5065 (lto_read_compile_unit_DIE): Likewise.
5066 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5067 (lto_read_base_type_DIE): Likewise.
5068 (lto_read_DIE): Likewise.
5069 (lto_read_child_DIEs): Likewise.
5070 (lto_file_read): Read DIEs.
5071 (lto_main): Ask middle end to emit entities.
5072 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5073 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5074 (lto_elf_file_close): Likewise.
5075 * lto.h (lto_file): Declare.
5076 (DWARF2_abbrev): Likewise.
5077 (lto_fd): New type.
5078 (lto_abbrev_fd): Likewise.
5079 (lto_file): Use new types.
5080 (lto_file_close): Declare.
5081 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5082
50832006-06-18 Mark Mitchell <mark@codesourcery.com>
5084
5085 * lto.h: New file.
5086 * lto.c: New file.
5087 * lto-elf.c: New file.
5088 * lto-lang.c (flags.h): Include it.
5089 (lto.h): Likewise.
5090 (lto_init): New function.
5091 (lto_write_globals): Remove.
5092 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5093 (LANG_HOOKS_INIT): Define.
5094 (LANG_HOOKS_PARSE_FILE): Likewise.
5095 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5096 (LTO_EXE): Link with libelf.
5097 (lto/lto-lang.o): Update dependencies.
5098 (lto/lto.o): New target.
5099 (lto/lto-elf.o): Likewise.
5100
51012006-06-12 Mark Mitchell <mark@codesourcery.com>
5102
5103 * config-lang.in: New file.
5104 * Make-lang.in: Likewise.
5105 * lto-tree.h: Likewise.
5106 * lto-lang.c: Likewise.
5107