]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
2015-06-04 Andrew MacLeod <amacleod@redhat.com>
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
f77c0292 12015-06-04 Andrew MacLeod <amacleod@redhat.com>
2
3 * lto-lang.c: Adjust includes for restructured coretypes.h.
4 * lto-object.c: Likewise.
5 * lto-partition.c: Likewise.
6 * lto-symtab.c: Likewise.
7 * lto.c: Likewise.
8
499e2be8 92015-06-04 Jan Hubicka <hubicka@ucw.cz>
10
11 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
12
9c0b7e86 132015-06-03 Jan Hubicka <hubicka@ucw.cz>
14
15 * lto.c (iterative_hash_canonical_type,
16 gimple_register_canonical_type): only hash main variants of types
17
e5b238bf 182015-05-27 Martin Liska <mliska@suse.cz>
19
20 * lto-partition.c (new_partition): Reset number of symbols.
21 (add_symbol_to_partition_1): Increment number of symbols.
22 (undo_partition): Decrement number of symbols.
23 (lto_balanced_map): Dump number of symbols and insns that
24 belong to a partition.
25 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
26
24a769d9 272015-05-22 Jan Hubicka <hubicka@ucw.cz>
28
29 * lto.c (hash_canonical_type): Be sure we hash only types that
30 need alias set.
31 (gimple_register_canonical_type_1): Do not produce canonical
32 types for types that do not need alias sets.
33
00c1bd91 342015-05-22 Jan Hubicka <hubicka@ucw.cz>
35
36 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
37
82915df7 382015-05-19 Jan Hubicka <hubicka@ucw.cz>
39
40 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
41
40175f70 422015-05-17 Jan Hubicka <hubicka@ucw.cz>
43
44 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
45 compare ODR types (if available) and function types.
46 (lto_symtab_merge): ... here; output ODR violation warnings
47 and call warn_types_mismatch.
48
988cf7b9 492015-04-29 Jan Hubicka <hubicka@ucw.cz>
50
51 * lto.c (lto_fixup_state): Call verify_type.
52
9969c043 532015-04-18 Trevor Saunders <tsaunders@mozilla.com>
54
988cf7b9 55 * lto.c: Adjust for hash_table changes.
9969c043 56
d2e9c252 572015-03-27 Jan Hubicka <hubicka@ucw.cz>
58
59 * lto.c (lto_read_decls): Move code registering odr types out
60 of TYPE_CANONICAL conditional and also register polymorphic types.
61
ce87fec0 622015-03-26 Jan Hubicka <hubicka@ucw.cz>
63
64 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
65 DECL_ARTIFICAL symbols.
66
da6f3259 672015-03-26 Jan Hubicka <hubicka@ucw.cz>
68
69 PR lto/65536
70 * lto.c (unify_scc): Revert location cache when unification
71 suceeded.
72 (lto_read_decls): Accept location cache after sucess;
73 apply location cache before calling debug hooks.
74
e9e2b82f 752015-03-10 Jan Hubicka <hubicka@ucw.cz>
76
77 * lto.c (read_cgraph_and_symbols): Do not do merging
78 at ltrans stage.
79
2e971afd 802015-02-26 Jakub Jelinek <jakub@redhat.com>
81
82 * lto.c (lto_mode_identity_table): New variable.
83 (lto_read_decls): Add mode_table argument to the lto_input_block
84 constructor.
85 (lto_file_finalize): Initialize mode_table.
86 (lto_init): Initialize lto_mode_identity_table.
87
6349b8cc 882015-02-24 Thomas Schwinge <thomas@codesourcery.com>
89
90 PR libgomp/64625
91 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
92 Remove macros.
93 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
94
57e20c4a 952015-02-03 Jan Hubicka <hubicka@ucw.cz>
96
97 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
98
c05be867 992015-01-30 Joseph Myers <joseph@codesourcery.com>
100
101 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
102 changed to pass input_location as first argument.
103
bbcd979a 1042014-12-11 Jan Hubicka <hubicka@ucw.cz>
105
106 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
107
90617f12 1082014-12-11 Jan Hubicka <hubicka@ucw.cz>
109
110 * lto.c (compare_tree_sccs_1): Add comparsion of
111 DECL_FUNCTION_SPECIFIC_TARGET
112
ca4c3545 1132015-01-15 Thomas Schwinge <thomas@codesourcery.com>
114 James Norris <jnorris@codesourcery.com>
115
116 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
117 New macros.
118 * lto.c: Include "gomp-constants.h".
119
9d65fe51 1202015-01-14 Ilya Verbin <ilya.verbin@intel.com>
121
122 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
123 from select_what_to_stream.
124
ba000093 1252015-01-09 Bernd Schmidt <bernds@codesourcery.com>
126 Jakub Jelinek <jakub@redhat.com>
127
128 PR middle-end/64412
129 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
130 if ACCEL_COMPILER.
131
1f78217c 1322015-01-09 Michael Collison <michael.collison@linaro.org>
133
134 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
135 input.h, alias.h, symtab.h, options, fold-const.h,
136 wide-int.h, and inchash.h due to flattening of tree.h.
137 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
138 input.h, alias.h, symtab.h, fold-const.h,
139 wide-int.h, and inchash.h due to flattening of tree.h.
140 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
141 input.h, alias.h, symtab.h, options, fold-const.h,
142 wide-int.h, and inchash.h due to flattening of tree.h.
143 * lto-partition.c: Ditto.
144 * lto-symtab.c: Ditto.
145
d353bf18 1462015-01-05 Jakub Jelinek <jakub@redhat.com>
147
148 Update copyright years.
149
b4bae7a0 1502014-12-22 Martin Liska <mliska@suse.cz>
151
152 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
153 is used.
154 (undo_partition): Likewise.
155 (lto_balanced_map): Likewise.
156
2cc80ac3 1572014-12-22 Martin Liska <mliska@suse.cz>
158
159 * lto-partition.c: Include of symbol-summary.h is added.
160 * lto-symtab.c: Likewise.
161 * lto.c: Likewise.
162
366970c6 1632014-12-11 Jan Hubicka <hubicka@ucw.cz>
164
165 PR ipa/61324
166 * lto.c (read_cgraph_and_symbols): Update call of
167 remove_unreachable_nodes.
168 (do_whole_program_analysis): Remove call of
169 symtab->remove_unreachable_nodes
170
9dac2720 1712014-12-08 Trevor Saunders <tsaunders@mozilla.com>
172
173 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
174 htab with malloc instead of ggc.
175
9f9f871f 1762014-11-20 Trevor Saunders <tsaunders@mozilla.com>
177
178 * lto.c: Replace htab with hash_table.
179
5ecbd52e 1802014-11-20 Trevor Saunders <tsaunders@mozilla.com>
181
182 * lto.c (lto_read_in_decl_state): Adjust.
183 (lto_fixup_state): Likewise.
184
23de2c1d 1852014-11-17 Jan Hubicka <hubicka@ucw.cz>
186
187 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
188
ab90b67e 1892014-11-14 Jan Hubicka <hubicka@ucw.cz>
190
191 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
192
b0c5e347 1932014-11-13 Ilya Verbin <ilya.verbin@intel.com>
194 Bernd Schmidt <bernds@codesourcery.com>
195 Andrey Turetskiy <andrey.turetskiy@intel.com>
196 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
197
dccabdd1 198 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
199
2002014-11-13 Ilya Verbin <ilya.verbin@intel.com>
201 Ilya Tocar <ilya.tocar@intel.com>
202 Andrey Turetskiy <andrey.turetskiy@intel.com>
203 Bernd Schmidt <bernds@codesourcery.com>
204
b0c5e347 205 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
206 LTO_SECTION_NAME_PREFIX.
207 * lto-partition.c (lto_promote_cross_file_statics): Call
208 select_what_to_stream.
209 * lto.c (lto_section_with_id): Use section_name_prefix instead of
210 LTO_SECTION_NAME_PREFIX.
211 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
212 being built as an offload compiler.
213
3754d046 2142014-10-29 Richard Sandiford <richard.sandiford@arm.com>
215
216 * lto-lang.c: Remove redundant enum from machine_mode.
217
1140c305 2182014-10-28 Andrew MacLeod <amacleod@redhat.com>
219
220 * lto.c: Adjust include files.
221 * lto-lang.c: Ditto.
222 * lto-object.c: Ditto.
223 * lto-partition.c: Ditto.
224 * lto-symtab.c: Ditto.
225
94ea8568 2262014-10-27 Andrew MacLeod <amacleod@redhat.com>
227
228 * lto-lang.c: Adjust include files.
229 * lto-object.c: Ditto.
230 * lto-partition.c: Ditto.
231 * lto-symtab.c: Ditto.
232 * lto.c: Ditto.
233
c219a638 2342014-10-16 DJ Delorie <dj@redhat.com>
235
236 * lto-object.c (lto_obj_begin_section): In the event that pointer
237 sizes aren't powers of two, choose a more suitable alignment
238 than (unsigned)(-1).
239
9f75f026 2402014-10-14 DJ Delorie <dj@redhat.com>
241
242 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
243 size-type as well.
244 (lto_init): Initialize all intN types, not just int128.
245
120ce989 2462014-10-06 Martin Liska <mliska@suse.cz>
247
248 * lto.c (stream_out): ARG_UNUSED added for last argument.
249
16d41ae2 2502014-09-24 Aldy Hernandez <aldyh@redhat.com>
251
252 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
253 DECL_ABSTRACT_P.
254
6b722052 2552014-09-23 Andi Kleen <ak@linux.intel.com>
256
257 * lto-partition.c (node_cmp): Update comment.
258 (varpool_node_cmp): Use symtab_node for comparison.
259 (add_sorted_nodes): New function.
260 (lto_balanced_map): Change to keep ordered queue
261 of ordered node. Handle no_reorder attribute.
262
d585ba22 2632014-09-11 Jan Hubicka <hubicka@ucw.cz>
264
265 * lto.c (lto_read_decls): Register ODR types.
266
289c4db4 2672014-08-20 Jan Hubicka <hubicka@ucw.cz>
268
269 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
270 call.
271 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
272
1df805e3 2732014-08-14 Jan Hubicka <hubicka@ucw.cz>
274
275 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
276
62cc770a 2772014-08-14 Richard Biener <rguenther@suse.de>
278
279 PR lto/62067
280 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
281
472ca566 2822014-08-08 Richard Biener <rguenther@suse.de>
283
284 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
285
fc8393b7 2862014-08-08 Bin Cheng <bin.cheng@arm.com>
287
288 PR lto/62032
289 * lto-lang.c (lto_init): Switch mis-matched arguments.
290
5f8841a5 2912014-08-07 Trevor Saunders <tsaunders@mozilla.com>
292
293 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
294
431205b7 2952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
296
297 * lto-partition.c, lto-partition.h: Use hash_set instead of
298 pointer_set.
299
7fdbd1ec 3002014-07-31 Andi Kleen <ak@linux.intel.com>
301
302 * lto.c (hash_canonical_type): Use inchash::hash
303 and use inchash::add_expr.
304 (iterative_hash_canonical_type): Dito.
305
2d97af95 3062014-07-30 Richard Biener <rguenther@suse.de>
307
308 * lto-streamer.h (lto_write_data): New function.
309 * langhooks.c (lhd_append_data): Do not free block.
310 * lto-section-out.c (lto_write_data): New function writing
311 raw data to the current section.
312 (lto_write_stream): Adjust for langhook semantic change.
313 (lto_destroy_simple_output_block): Write header directly.
314 * lto-opts.c (lto_write_options): Write options directly.
315 * lto-streamer-out.c (produce_asm): Write heaeder directly.
316 (lto_output_toplevel_asms): Likewise.
317 (copy_function_or_variable): Copy data directly.
318 (write_global_references): Output index table directly.
319 (lto_output_decl_state_refs): Likewise.
320 (write_symbol): Write data directly.
321 (produce_symtab): Adjust.
322 (produce_asm_for_decls): Output header and refs directly.
323
045e2f27 3242014-07-25 Andi Kleen <ak@linux.intel.com>
325
326 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
327
e7f95d73 3282014-07-25 Andi Kleen <ak@linux.intel.com>
329
330 * lto.c (hash_canonical_type): Convert to inchash.
331 (iterative_hash_canonical_type): Dito.
332
6b214d09 3332014-07-25 Andi Kleen <ak@linux.intel.com>
334
335 * lto.c: Include inchash.h
336
83c7dcd8 3372014-07-14 Jan Hubicka <hubicka@ucw.cz>
338
339 * lto.c (mentions_vars_p_decl_non_common): Skip
340 DECL_ARGUMENT_FLD.
341 mentions_vars_p_function): Do DECL_ARGUMENTS.
342 (lto_fixup_prevailing_decls): Update.
343
e52d4978 3442014-07-12 Jan Hubicka <hubicka@ucw.cz>
345
346 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
347 timevar
348 (materialize_cgraph): Do not push GIMPLE_IN timevar.
349
afb0d513 3502014-07-11 Jan Hubicka <hubicka@ucw.cz>
351
352 * lto-partition.c (add_references_to_partition): Use
353 varpool_ctor_useable_for_folding_p.
354 * lto.c (lto_read_in_decl_state): Update sanity check.
355
e4a2b488 3562014-07-01 Martin Liska <mliska@suse.cz>
357
358 IPA REF alias refactoring
359 * lto-partition.c (add_symbol_to_partition_1): Usage of
360 FOR_EACH_ALIAS added.
361
c7be6601 3622014-06-28 Jan Hubicka <hubicka@ucw.cz>
363
364 Revert:
365 * lto.c (lto_copy_fields_not_streamed): New function.
366 (compare_tree_sccs_1): Do not compare fields shared in between type
367 and variant.
368 (lto_read_decls): Fixup types first before inserting into hash.
369
c1526d28 3702014-06-28 Andrew Pinski <apinski@cavium.com>
371
372 * lto.c (lto_read_decls): Fix comment in comment.
373
28635c35 3742014-06-28 Jan Hubicka <hubicka@ucw.cz>
375
376 * lto.c (lto_copy_fields_not_streamed): New function.
377 (compare_tree_sccs_1): Do not compare fields shared in between type
378 and variant.
379 (lto_read_decls): Fixup types first before inserting into hash.
380
737331e8 3812014-06-25 Martin Liska <mliska@suse.cz>
382
383 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
384 used.
385 (add_symbol_to_partition_1): Likewise.
386 (lto_balanced_map): Likewise.
387 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
388
9c2e58d0 3892014-06-24 Jan Hubicka <hubicka@ucw.cz>
390
391 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
392 (mentions_vars_p_function): ... here.
393 (compare_tree_sccs_1): Update VINDEX checks.
394 (lto_fixup_prevailing_decls): Likewise.
395
d62dd039 3962014-06-24 Trevor Saunders <tsaunders@mozilla.com>
397
398 * lto.c (canonical_type_hash_cache): Use hash_map instead of
399 pointer_map.
400
c1f445d2 4012014-06-24 Trevor Saunders <tsaunders@mozilla.com>
402
403 * lto.c: Adjust.
404
b7393cee 4052014-06-20 Jan Hubicka <hubicka@ucw.cz>
406
407 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
408
9db80d42 4092014-06-20 Jan Hubicka <hubicka@ucw.cz>
410
411 * lto.c (compare_tree_sccs_1): Do not compare priorities.
412
5e68df57 4132014-06-15 Jan Hubicka <hubicka@ucw.cz>
414
415 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
416
e4c07a06 4172014-06-10 Jan Hubicka <hubicka@ucw.cz>
418
419 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
420 (do_whole_program_analysis): Use verify_symtab.
421
71e19e54 4222014-06-07 Jan Hubicka <hubicka@ucw.cz>
423
424 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
425 lto_fixup_prevailing_decls): Skip section names.
426
f7715905 4272014-06-02 Andrew MacLeod <amacleod@redhat.com>
428
429 * lto-symtab.c: Include builtins.h.
430
3a4303e7 4312014-05-26 Richard Biener <rguenther@suse.de>
432
433 * lto.c (lto_parse_hex): Use int64_t.
434 (lto_resolution_read): Likewise.
435
4f78e0a8 4362014-05-23 Jan Hubicka <hubicka@ucw.cz>
437
438 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
439
8c016392 4402014-05-23 Jan Hubicka <hubicka@ucw.cz>
441
442 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
443 symtab pointer.
444 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
445
3c77ca67 4462014-05-22 Thomas Schwinge <thomas@codesourcery.com>
447
448 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
449 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
450 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
451
47131315 4522012-05-22 Bernd Schmidt <bernds@codesourcery.com>
453
454 * lto-object.c: Include "lto-section-names.h".
455 (LTO_SEGMENT_NAME): Don't define.
456 * lto.c: Include "lto-section-names.h".
457
24888760 4582014-05-17 Jan Hubicka <hubicka@ucw.cz>
459
460 PR lto/61012
461 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
462 mixed with variables.
463
25a27413 4642014-05-17 Trevor Saunders <tsaunders@mozilla.com>
465
466 * lto-tree.h: Don't use variable_size gty attribute.
467 * lto.c (lto_read_in_decl_state): Adjust.
468 (create_subid_section_table): Likewise.
469 (lto_flatten_files): Likewise.
470 (read_cgraph_and_symbols): Likewise.
471
960d5a55 4722014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
473 Mike Stump <mikestump@comcast.net>
474 Richard Sandiford <rdsandiford@googlemail.com>
475
476 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
477 * lto-lang.c (get_nonnull_operand): Likewise.
478
060fc206 4792014-04-28 Richard Biener <rguenther@suse.de>
480
481 PR middle-end/60092
482 * lto-lang.c: Define flag_isoc11.
483
13cbeaac 4842014-04-23 David Malcolm <dmalcolm@redhat.com>
485
486 * lto-partition.c (add_references_to_partition): Update for
487 removal of implicit pointer from the is-a.h API.
488 (add_symbol_to_partition_1): Likewise.
489 (contained_in_symbol): Likewise.
490 (undo_partition): Likewise.
491 (lto_balanced_map): Likewise.
492 (promote_symbol): Likewise.
493 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
494 (lto_symtab_merge_symbols): Likewise.
495 * lto.c (lto_wpa_write_files): Likewise.
496
4a137074 4972014-04-15 Richard Biener <rguenther@suse.de>
498
499 * lto.c: Include params.h.
500 (do_whole_program_analysis): Switch on flag_lto_partition value,
501 add support for LTO_PARTITION_ONE.
502 * lto-partition.h (lto_balanced_map): Adjust.
503 * lto-partition.c (lto_balanced_map): Get number of desired
504 partitions as argument to support -flto-partition=one.
505
df565eb6 5062014-04-14 Jan Hubicka <hubicka@ucw.cz>
507
508 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
509 tp_first_run.
510
ceaf91ad 5112014-03-19 Jan Hubicka <hubicka@ucw.cz>
512
513 * lto.c: Include ipa-inline.h
514 (do_whole_program_analysis): Free inline summary after partitioning.
515
73249b1e 5162014-03-19 Richard Biener <rguenther@suse.de>
517
518 PR middle-end/60553
519 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
520 instead of TREE_CHAIN as chain_next.
521
4e6f2fb9 5222014-03-19 Richard Biener <rguenther@suse.de>
523
524 * lto.c (lto_wpa_write_files): Move call to
525 lto_promote_cross_file_statics ...
526 (do_whole_program_analysis): ... here, into the partitioning
527 block. Do not ggc_collect after lto_wpa_write_files but
528 for a last time before it.
529
e629dc34 5302014-03-19 Jakub Jelinek <jakub@redhat.com>
531
532 PR lto/60571
533 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
534 Fix formatting.
535
0baf842d 5362014-03-18 Jakub Jelinek <jakub@redhat.com>
537
538 PR sanitizer/60535
539 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
540 and complex_{float,{,long_}double}_type_node.
541
c9a24b37 5422014-03-08 Paulo Matos <paulo@matos-sorge.com>
543
0baf842d 544 * lto-lang.c (lto_init): Pass flag_short_double to
545 build_common_tree_nodes.
c9a24b37 546
a2223fa9 5472014-02-14 Jan Hubicka <hubicka@ucw.cz>
548
549 PR lto/60295
550 * lto.c (stream_out): Avoid parallel streaming with
551 -flto=jobserver until we are able to throttle it down
552 resonably.
553
8c075206 5542014-02-14 Jan Hubicka <hubicka@ucw.cz>
555
556 * lto-partition.c (add_symbol_to_partition_1,
557 undo_partition, lto_balanced_map): Aliases have no
558 defined size.
559 (lto_balanced_map): Do not follow refering variables
560 if they can be optimized out.
561
f4c35256 5622014-02-14 Richard Biener <rguenther@suse.de>
563
564 PR lto/60179
565 * lto.c (compare_tree_sccs_1): Do not compare
566 DECL_FUNCTION_SPECIFIC_TARGET.
567 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
568
f5cbf731 5692014-02-12 Richard Biener <rguenther@suse.de>
570
571 PR lto/60060
572 * lto-lang.c (lto_write_globals): Do not call
573 wrapup_global_declarations or emit_debug_global_declarations
574 but emit debug info for non-function scope variables
575 directly.
576
a973177e 5772014-02-06 Jan Hubicka <hubicka@ucw.cz>
578
579 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
580
94107507 5812014-02-06 Jan Hubicka <hubicka@ucw.cz>
582
583 PR ipa/59469
584 * lto-partition.c (symbol_class): Move to cgraph.h
585 (get_symbol_class): Move to symtab.c
586 (add_references_to_partition, add_symbol_to_partition_1,
587 lto_max_map, lto_1_to_1_map, lto_balanced_map,
588 lto_promote_cross_file_statics): Update.
589
3e17769e 5902014-02-05 Jan Hubicka <hubicka@ucw.cz>
591
592 * lto.c (lto_parallelism): New static var.
593 (do_stream_out, wait_for_child, stream_out): New static functions.
594 (lto_wpa_write_files): Add support for parallel streaming.
595 (do_whole_program_analysis): Set parallelism.
596 * lang.opt (fwpa): Add parameter.
597 * lto-lang.c (lto_handle_option): Handle flag_wpa.
598 (lto_init): Update use of flag_wpa.
599 * lto-streamer.h (asm_nodes_output): Declare.
600
00288439 6012014-02-05 Richard Biener <rguenther@suse.de>
602
603 * lto.h (lto_global_var_decls): Remove.
604 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
605 (lto_write_globals): Do nothing in WPA stage, gather globals from
606 the varpool here ...
607 * lto.c (lto_main): ... not here.
608 (materialize_cgraph): Do not call rest_of_decl_compilation
609 on the empty lto_global_var_decls vector.
610 (lto_global_var_decls): Remove.
611
96a3dc39 6122014-02-04 Jan Hubicka <hubicka@ucw.cz>
613
614 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
615 needs duplicating, not generic COMDAT.
616
6541e9a1 6172014-02-04 Richard Biener <rguenther@suse.de>
618
619 PR lto/59723
620 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
621 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
622
b89ce5e3 6232014-02-04 Jan Hubicka <hubicka@ucw.cz>
624 Markus Trippelsdorf
625
626 PR ipa/59469
627 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
628 merge force_output and forced_by_abi flags.
629
a89e6c15 6302014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
631
632 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
633 flag_cilkplus.
634
c205a71b 6352014-01-09 Richard Biener <rguenther@suse.de>
636
637 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
638
f1105f81 6392014-01-09 Richard Biener <rguenther@suse.de>
640
641 PR lto/45586
642 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
643 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
644 (gimple_canonical_types_compatible_p): Do not compare them either.
645
3aea1f79 6462014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
647
648 Update copyright years
649
098f44bc 6502013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
651
652 * lto.c: Remove struct tags when referring to class varpool_node.
653 * lto-partition.c: Likewise.
654 * lto-symtab.c: Likewise.
655
ea0695f9 6562013-11-29 Jakub Jelinek <jakub@redhat.com>
657 Richard Biener <rguenther@suse.de>
658
659 PR lto/59326
660 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
661
fe3e3369 6622013-11-29 Jakub Jelinek <jakub@redhat.com>
663
664 PR lto/59326
665 * lto.c (mentions_vars_p_omp_clause): New function.
666 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
667 after return stmts.
668
bc61cadb 6692013-11-22 Andrew MacLeod <amacleod@redhat.com>
670
671 * lto.c: Add required include files from gimple.h.
672 * lto-lang.c: Likewise
673 * lto-object.c: Likewise
674 * lto-partition.c: Likewise
675 * lto-symtab.c: Likewise
676
f1c8b4d7 6772013-11-18 Trevor Saunders <tsaunders@mozilla.com>
678
679 * lto-partition.c lto-symtab.c lto.c Adjust.
680
9ed99284 6812013-11-14 Diego Novillo <dnovillo@google.com>
682
683 * lto-lang.c: Include stringpool.h.
684 Include stor-layout.h.
685 * lto-partition.c: Include gcc-symtab.h.
686 * lto.c: Include stor-layout.h.
687
452659af 6882013-10-31 David Malcolm <dmalcolm@redhat.com>
689
690 Automated part of renaming of symtab_node_base to symtab_node.
691
692 Patch autogenerated by rename_symtab.py from
693 https://github.com/davidmalcolm/gcc-refactoring-scripts
694 revision 58bb219cc090b2f4516a9297d868c245495ee622
695
696 * lto-partition.c (add_symbol_to_partition): Rename
697 symtab_node_base to symtab_node.
698 (get_symbol_class): Likewise.
699 (symbol_partitioned_p): Likewise.
700 (add_references_to_partition): Likewise.
701 (add_symbol_to_partition_1): Likewise.
702 (contained_in_symbol): Likewise.
703 (add_symbol_to_partition): Likewise.
704 (lto_1_to_1_map): Likewise.
705 (lto_max_map): Likewise.
706 (lto_balanced_map): Likewise.
707 (privatize_symbol_name): Likewise.
708 (promote_symbol): Likewise.
709 (may_need_named_section_p): Likewise.
710 (rename_statics): Likewise.
711 (lto_promote_statics_nonwpa): Likewise.
712 * lto-symtab.c (lto_symtab_merge): Likewise.
713 (lto_symtab_resolve_replaceable_p): Likewise.
714 (lto_symtab_symbol_p): Likewise.
715 (lto_symtab_resolve_can_prevail_p): Likewise.
716 (lto_symtab_resolve_symbols): Likewise.
717 (lto_symtab_merge_decls_2): Likewise.
718 (lto_symtab_merge_decls_1): Likewise.
719 (lto_symtab_merge_decls): Likewise.
720 (lto_symtab_merge_symbols_1): Likewise.
721 (lto_symtab_merge_symbols): Likewise.
722 (lto_symtab_prevailing_decl): Likewise.
723 * lto.c (lto_wpa_write_files): Likewise.
724 (read_cgraph_and_symbols): Likewise.
725 (do_whole_program_analysis): Likewise.
726
d03e6917 7272013-10-30 David Malcolm <dmalcolm@redhat.com>
728
729 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
730 declarations onto multiple lines to make things easier for
731 rename_symtab.py.
732 (lto_symtab_merge_decls_1): Likewise.
733 (lto_symtab_merge_symbols_1): Likewise.
734
d037099f 7352013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
736
737 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
738 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
739 Plus is enabled.
740
02774f2d 7412013-10-29 David Malcolm <dmalcolm@redhat.com>
742
743 Patch autogenerated by refactor_symtab.py from
744 https://github.com/davidmalcolm/gcc-refactoring-scripts
745 revision 58bb219cc090b2f4516a9297d868c245495ee622
746
747 * lto-partition.c (lto_promote_cross_file_statics): Update for
748 conversion of symtab types to a true class hierarchy.
749 (rename_statics): Likewise.
750 (promote_symbol): Likewise.
751 (privatize_symbol_name): Likewise.
752 (lto_balanced_map): Likewise.
753 (varpool_node_cmp): Likewise.
754 (node_cmp): Likewise.
755 (lto_1_to_1_map): Likewise.
756 (undo_partition): Likewise.
757 (add_symbol_to_partition): Likewise.
758 (contained_in_symbol): Likewise.
759 (add_symbol_to_partition_1): Likewise.
760 (add_references_to_partition): Likewise.
761 (symbol_partitioned_p): Likewise.
762 (get_symbol_class): Likewise.
763 (lto_max_map): Likewise.
764 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
765 (lto_symtab_merge_symbols): Likewise.
766 (lto_symtab_merge_symbols_1): Likewise.
767 (lto_symtab_merge_decls): Likewise.
768 (lto_symtab_merge_decls_1): Likewise.
769 (lto_symtab_merge_decls_2): Likewise.
770 (lto_symtab_resolve_symbols): Likewise.
771 (lto_symtab_resolve_can_prevail_p): Likewise.
772 (lto_symtab_symbol_p): Likewise.
773 (lto_symtab_resolve_replaceable_p): Likewise.
774 (lto_symtab_merge): Likewise.
775 (lto_varpool_replace_node): Likewise.
776 (lto_cgraph_replace_node): Likewise.
777 * lto.c (lto_main): Likewise.
778 (do_whole_program_analysis): Likewise.
779 (materialize_cgraph): Likewise.
780 (read_cgraph_and_symbols): Likewise.
781 (cmp_partitions_order): Likewise.
782 (lto_materialize_function): Likewise.
783 (has_analyzed_clone_p): Likewise.
784
b23fb4cb 7852013-10-29 Andrew MacLeod <amacleod@redhat.com>
786
787 * lto/lto-object.c: Add gimple.h to include list.
788 * lto/lto-partition.c: Likewise.
789
dd9784d4 7902013-10-18 Andrew MacLeod <amacleod@redhat.com>
791
792 * lto.c: Remove tree-flow.h from include list.
793
fdbb424a 7942013-10-15 Richard Biener <rguenther@suse.de>
795
796 * lto.c (hash_canonical_type): Split out from ...
797 (iterative_hash_canonical_type): ... here. Register types
798 we recurse to.
799 (gimple_canonical_type_hash): Adjust.
800 (gimple_register_canonical_type_1): Split out from ...
801 (gimple_register_canonical_type): ... here. Cache computed
802 hash value.
803 (lto_register_canonical_types): Split into two modes,
804 clearing and computing TYPE_CANONICAL.
805 (lto_read_decls): Adjust.
806 (read_cgraph_and_symbols): Do two passes over global trees,
807 first clearing then computing TYPE_CANONICAL.
808
fb26741a 8092013-10-14 Richard Biener <rguenther@suse.de>
810
811 * lto.c (gimple_canonical_types): Move out-of GC space.
812 (canonical_type_hash_cache): Make a pointer-map.
813 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
814 New counters.
815 (iterative_hash_canonical_type): Adjust.
816 (read_cgraph_and_symbols): Likewise.
817 (print_lto_report_1): Likewise.
818
d7009cf6 8192013-10-14 Richard Biener <rguenther@suse.de>
820
821 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
822 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
823 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
824 gimple_types_compatible_p_1, gimple_types_compatible_p,
825 visit, iterative_hash_name, struct type_hash_pair,
826 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
827 gimple_type_eq, gimple_register_type, num_not_merged_types,
828 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
829 num_not_merged_types_in_same_scc_trees): Remove old merging code
830 and statistics.
831 (lto_read_decls): Do not run old merging code in parallel.
832 (read_cgraph_and_symbols): Do not init/free old merging
833 data structures.
834 (print_lto_report_1): Do not report differences of old vs. new
835 merging code.
836
700d6a0b 8372013-10-14 Richard Biener <rguenther@suse.de>
838
839 * lto-lang.c (lto_init): Do not re-init canonical types here.
840 (lto_register_canonical_types): Move to ...
841 * lto.c (lto_register_canonical_types): ... here.
842 (gimple_canonical_types, canonical_type_hash_cache,
843 iterative_hash_canonical_type, gimple_canonical_type_hash,
844 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
845 gimple_register_canonical_type): Add canonical type merging machinery
846 moved from gimple.c.
847 (read_cgraph_and_symbols): Init and free canonical type tables
848 here.
849 (print_lto_report_1): Report canonical type table stats here.
850
bc7bff74 8512013-10-11 Jakub Jelinek <jakub@redhat.com>
852
853 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
854
d2681e34 8552013-09-25 Tom Tromey <tromey@redhat.com>
856
857 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
858 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
859 (lto/lto-object.o): Remove.
860
94956000 8612013-09-06 Richard Biener <rguenther@suse.de>
862
863 * lto-symtab.c: Move from gcc/
864 * lto.h: Include vec.h.
865 (lto_global_var_decls): Declare.
866 * lto.c (lto_global_var_decls): Move definition here.
867 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
868 (lto-symtab.o): Add.
869 * config-lang.in (gtfiles): Add lto.h.
870
93cb0915 8712013-08-31 Jan Hubicka <jh@suse.cz>
872
873 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
874 DECL_FIELD_OFFSET can contain an reference to variable.
875
d21755bc 8762013-08-31 Jan Hubicka <jh@suse.cz>
877
878 * lto.c (tree_with_vars): Turn into vector.
879 (MAYBE_REMEMBER_WITH_VARS): Change to...
880 (CHECK_VAR): ... this one.
881 (CHECK_NO_VAR): New macro.
882 (maybe_remember_with_vars_typed): Turn to ...
883 (mentions_vars_p_typed): ... this one.
884 (maybe_remember_with_vars_common): Turn to ...
885 (mentions_vars_p_comon): ... this one.
886 (maybe_remember_with_vars_decl_minimal): Turn to ...
887 (mentions_vars_p_decl_minmal): ... this one.
888 (maybe_remember_with_vars_decl_common): Turn to ...
889 (mentions_vars_p_decl_common): ... this one.
890 (maybe_remember_with_vars_decl_with_vis): Turn to ...
891 (mentions_vars_p_decl_with_vis): ... this one.
892 (maybe_remember_with_vars_decl_non_common): Turn to ...
893 (mentions_vars_p_decl_non_common): ... this one.
894 (maybe_remember_with_vars_function): Turn to ...
895 (mentions_vars_p_function): ... this one.
896 (maybe_remember_with_vars_field_decl): Turn to ...
897 (mentions_vars_p_field_decl): ... this one.
898 (maybe_remember_with_vars_type): Turn to ...
899 (mentions_vars_p_type): ... this one.
900 (maybe_remember_with_vars_binfo): Turn to ...
901 (mentions_vars_p_binfo): ... this one.
902 (maybe_remember_with_vars_constructor): Turn to ...
903 (mentions_vars_p_constructor): ... this one.
904 (maybe_remember_with_vars_expr): Turn to ...
905 (mentions_vars_p_expr): ... this one.
906 (maybe_remember_with_vars): Turn to ...
907 (mentions_vars_p): ... this one.
908 (lto_read_decls): Update.
909 (LTO_SET_PREVAIL): Do not call function for internal decls.
910 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
911 check that something was updated.
912 (lto_fixup_state): Do not care about internal decls.
913 (lto_fixup_decls): Update.
914 (read_cgraph_and_symbols): Update.
915
5f74a074 9162013-08-29 Jan Hubicka <jh@suse.cz>
917
918 * lto.c (read_cgraph_and_symbols): Free decl states.
919
2d9cc481 9202013-08-29 Jan Hubicka <jh@suse.cz>
921
922 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
923 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
924 TYPE_FINAL_P.
925
881fe02c 9262013-08-28 Jan Hubicka <jh@suse.cz>
927
928 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
929 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
930 (unify_scc): Do checking assert.
931
66d78392 9322013-08-06 Jan Hubicka <jh@suse.cz>
933 Martin Liska <marxin.liska@gmail.com>
934
935 * lto-partition.c (lto_balanced_map): Always base order on
936 source file order.
937
eaad46f2 9382013-08-06 Jan Hubicka <jh@suse.cz>
939
940 * lto.c (lto_materialize_function): Do not read body anymore.
941
4df870fd 9422013-08-02 Jan Hubicka <jh@suse.cz>
943
944 * lto.c (lto_materialize_function): Do not push struct function.
945 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
946 (may_need_named_section_p): Even abstract origins may need
947 named section.
948
3ea50c01 9492013-07-30 David Malcolm <dmalcolm@redhat.com>
950
951 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
952 PASS_MANAGER_H.
953
954 * lto.c (do_whole_program_analysis): Update for move of
955 all_regular_ipa_passes from a global to a field of class
956 pass_manager.
957
75de4aa2 9582013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
959
960 * lto-partition.c: Fix typos.
961
593309df 9622013-06-20 Jan Hubicka <jh@suse.cz>
963
964 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
965 partitioning of variables.
966
fdbe58cf 9672013-06-20 Jan Hubicka <jh@suse.cz>
968
969 * lto.c (read_cgraph_and_symbols): Set cgraph state.
970
df8d3e89 9712013-06-19 Jan Hubicka <jh@suse.cz>
972
973 * lto-partition.c (add_references_to_partition): Use
974 ctor_for_folding.
975
be1cd111 9762013-06-18 Richard Biener <rguenther@suse.de>
977
978 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
979 and use it.
980 (lto_register_function_decl_in_symtab): Likewise.
981 (cmp_tree): New function.
982 (unify_scc): Instead of using the streamer cache map from entry
983 to cache index match up the two maps we have by sorting them.
984 Adjust calls to lto_register_var_decl_in_symtab and
985 lto_register_function_decl_in_symtab.
986
8ceff600 9872013-06-17 Richard Biener <rguenther@suse.de>
988
989 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
990 * lto.c: Include data-streamer.h.
991 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
992 (gimple_type_leader_entry_s, gimple_type_leader,
993 gimple_lookup_type_leader): Remove.
994 (gtc_visit): Simplify.
995 (gimple_types_compatible_p): Likewise.
996 (gimple_register_type_1): Likewise. Merge into ...
997 (gimple_register_type): ... this. Keep it as legacy for
998 statistics purposes for now.
999 (fixup_integer_cst): Remove.
1000 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1001 rename to ...
1002 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1003 maybe_remember_with_vars_*): ... these.
1004 (uniquify_nodes): Remove.
1005 (lto_fixup_prevailing_type): New function.
1006 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1007 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1008 (num_merged_types, num_prevailing_types, num_not_merged_types,
1009 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1010 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1011 num_scc_compare_collisions): New global counters.
1012 (compare_tree_sccs_1): New function.
1013 (compare_tree_sccs): Likewise.
1014 (unify_scc): Likewise.
1015 (lto_read_decls): Stream in tree SCCs and unify them on the
1016 way in. Finalize prevailing SCC tree members.
1017 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1018 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1019 to ggc-collect during merging.
1020 (print_lto_report_1): Adjust for new merging code.
1021
da4b8721 10222013-06-12 Jan Hubicka <jh@suse.cz>
1023
1024 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1025
9e9c3e92 10262013-06-12 Jan Hubicka <jh@suse.cz>
1027
1028 * lto.c (register_resolution): Take lto_file_data argument.
1029 (lto_register_var_decl_in_symtab,
1030 lto_register_function_decl_in_symtab): Update.
1031 (read_cgraph_and_symbols): Update resolution_map handling.
1032
21ebaa24 10332013-06-11 Jan Hubicka <jh@suse.cz>
f2526cce 1034
1035 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1036 (add_symbol_to_partition_1): Likewise.
1037 (contained_in_symbol): Likewise.
1038 (lto_balanced_map): Likewise.
1039 (rename_statics): Drop weakref.
1040
4b927f54 10412013-06-05 Richard Biener <rguenther@suse.de>
1042
1043 * lto.c (num_merged_types): New global variable.
1044 (uniquify_nodes): Increase num_merged_types when merging a type.
1045 (print_lto_report_1): Output the number of merged types.
1046
48669653 10472013-06-01 Jan Hubicka <jh@suse.cz>
1048
1049 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1050 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1051 (do_whole_program_analysis): Update dumping.
1052
15ca8f90 10532013-05-29 Jan Hubicka <jh@suse.cz>
1054
1055 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1056 flags.
1057 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1058
59651d3b 10592013-05-15 Jan Hubicka <jh@suse.cz>
1060
1061 * lto-partition.c (privatize_symbol_name): Return true when
1062 privatizing happened.
1063 (rename_statics): Do not go into infinite loop when privatizing
1064 is not needed.
1065
be5f9e46 10662013-05-16 Jason Merrill <jason@redhat.com>
1067
1068 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1069
15c999e3 10702013-05-15 Martin Jambor <mjambor@suse.cz>
1071
1072 * lto-partition.c (lto_balanced_map): Print symbol order instead
1073 of node uids.
1074
33864132 10752013-05-15 Jan Hubicka <jh@suse.cz>
1076
1077 PR lto/57038
1078 PR lto/47375
1079 * lto-partition.c (get_symbol_class): Fix weakrefs.
1080 (lto_balanced_map): Fix weakrefs.
1081 (privatize_symbol_name): Remove unnecesary label.
1082 (rename_statics): Handle weakrefs as statics.
1083
85b7ebb2 10842013-05-09 Jan Hubicka <jh@suse.cz>
1085 Richard Biener <rguenther@suse.de>
1086
1087 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1088 (lto_register_var_decl_in_symtab): Likewise.
1089 (lto_main): Promote statics.
1090 * lto-partition.c (privatize_symbol_name): New function.
1091 (promote_symbol): Use it.
1092 (may_need_named_section_p): New predicate.
1093 (rename_statics): New functions.
1094 (lto_promote_cross_file_statics): Simplify; do renaming.
1095 (lto_promote_statics_nonwpa): New function.
1096 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1097
ab3c0986 10982013-02-08 Richard Biener <rguenther@suse.de>
1099
1100 PR lto/56231
1101 * lto-lang.c (lto_init): Do not enter a dummy file.
1102
7a87c8e1 11032013-02-07 Uros Bizjak <ubizjak@gmail.com>
1104
1105 PR bootstrap/56227
1106 * lto.c (lto_resolution_ready): Use %wx instead of
1107 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1108
871609a8 11092013-02-04 Richard Guenther <rguenther@suse.de>
1110
1111 PR lto/56168
1112 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1113 or lto_fixup_decls at LTRANS time.
1114
c7fbaa62 11152013-01-09 Jan Hubicka <jh@suse.cz>
1116
1117 PR lto/45375
1118 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1119
d9501635 11202012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1121
1122 PR lto/55466
1123 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1124 variables.
1125 (lto_main): Record the global variables if WPA isn't enabled.
1126
1e094109 11272012-11-20 Diego Novillo <dnovillo@google.com>
1128 Jakub Jelinek <jakub@redhat.com>
1129
1130 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1131
f1f41a6c 11322012-11-16 Diego Novillo <dnovillo@google.com>
1133
1134 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1135
1136 * lto-lang.c: Use new vec API in vec.h.
1137 * lto-partition.c: Likewise.
1138 * lto-partition.h: Likewise.
1139 * lto.c: Likewise.
1140
d2313b52 11412012-10-31 Lawrence Crowl <crowl@google.com>
1142
1143 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1144 down-cast via dyn_cast.
1145 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1146 (undo_partition): Likewise.
1147 (lto_balanced_map): Likewise.
1148 (get_symbol_class): Likewise and via is_a.
1149 (lto_balanced_map): Change symtab checking to is_a.
1150
a5693828 11512012-10-12 Richard Biener <rguenther@suse.de>
1152
1153 PR lto/54898
1154 * lto.c (gimple_types_compatible_p_1): Also compare
1155 TYPE_MAIN_VARIANT.
1156 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1157
883554eb 11582012-10-09 Tobias Burnus <burnus@net-b.de>
1159
1160 * lto-lang.c (lto_register_builtin_type): Avoid useless
1161 decl creation.
1162 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1163
14c7dd36 11642012-10-08 Tobias Burnus <burnus@net-b.de>
1165
1166 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1167 Free lto_file struct after closing the file.
1168
35d3a6eb 11692012-10-08 Jan Hubicka <jh@suse.cz>
1170
1171 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1172 (fixup_integer_cst): New functoin.
1173 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1174
b8925abd 11752012-10-07 Jan Hubicka <jh@suse.cz>
1176
1177 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1178 release input encoders.
1179 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1180
18ff06f9 11812012-10-06 Jan Hubicka <jh@suse.cz>
1182
1183 PR lto/54790
1184 * lto.c (resolution_map): New static var.
1185 (register_resolution): New function.
1186 (lto_register_var_decl_in_symtab): Use it.
1187 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1188
9078126c 11892012-09-20 Martin Jambor <mjambor@suse.cz>
1190
1191 * lto.c (lto_materialize_function): Call push_struct_function and
1192 pop_cfun.
1193
5169661d 11942012-09-19 Dehao Chen <dehao@google.com>
1195
1196 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1197
c9aa6453 11982012-09-19 Jan Hubicka <jh@suse.cz>
1199
1200 * lto.c (lto_materialize_function): Update confused comment.
1201 (read_cgraph_and_symbols): Do not free symtab.
1202
0851d795 12032012-09-12 Jan Hubicka <jh@suse.cz>
1204
1205 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1206 AUX pointer cleaning. Add max partitioning.
1207 * lto-partition.c (enum symbol_class): New.
1208 (get_symbol_class): New function.
1209 (symbol_partitioned_p): New function.
1210 (add_references_to_partition): Remove.
1211 (add_aliases_to_partition): Remove.
1212 (add_cgraph_node_to_partition_1): Remove.
1213 (add_cgraph_node_to_partition): Remove.
1214 (add_symbol_to_partition): New function.
1215 (add_symbol_to_partition_1): New function.
1216 (contained_in_symbol): New function.
1217 (partition_cgraph_node_p): Remove.
1218 (partition_varpool_node_p): Remove.
1219 (partition_symbol_p): Remove.
1220 (lto_1_to_1_map): Cleanup.
1221 (lto_max_map): New.
1222 (lto_balanced_map): Update.
1223 (lto_promote_cross_file_statics): Update.
1224 * lto-partition.h (lto_max_map): Declare.
1225 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1226
8873e58c 12272012-09-11 Jan Hubicka <jh@suse.cz>
1228
1229 PR lto/54312
1230 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1231 type is variant leader.
1232
ed29d77f 12332012-09-11 Richard Guenther <rguenther@suse.de>
1234
1235 * lto.c (enum gtc_mode): Remove.
1236 (struct type_pair_d): Adjust.
1237 (lookup_type_pair): Likewise.
1238 (gimple_type_leader): Do not mark as deletable.
1239 (gimple_lookup_type_leader): Adjust.
1240 (gtc_visit): Likewise.
1241 (gimple_types_compatible_p_1): Likewise.
1242 (gimple_types_compatible_p): Likewise.
1243 (gimple_type_hash): Likewise.
1244 (gimple_register_type): Likewise.
1245 (read_cgraph_and_symbols): Manage lifetime of tables
1246 here.
1247
bdaea387 12482012-09-11 Richard Guenther <rguenther@suse.de>
1249
1250 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1251 struct type_pair_d, lookup_type_pair, struct sccs,
1252 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1253 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1254 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1255 visit, iterative_hash_name, struct type_hash_pair,
1256 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1257 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1258 Move here from gimple.c
1259 (read_cgraph_and_symbols): Free hash tables here.
1260 (print_lto_report_1): New function wrapping print_lto_report.
1261 (do_whole_program_analysis): Call it.
1262 (lto_main): Likewise.
1263
b6f96313 12642012-09-10 Jan Hubicka <jh@suse.cz>
1265
1266 * lto-partition.c (partition_symbol_p): Forward declare.
1267 (add_references_to_partition): Reimplement using partition_symbol_p.
1268 (add_aliases_to_partition): Break out from add_references_to_partition;
1269 reimplement using partition_symbol_p.
1270 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1271 add sanity checks.
1272 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1273 (partition_varpool_node_p): Do not special case aliases.
1274
724462b0 12752012-08-12 Jan Hubicka <jh@suse.cz>
1276
1277 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1278 it is deleted after streaming.
1279 * lto-partition.c (partition_symbol_p): New function.
1280 (promote_var, promote_fn): Remove.
1281 (promote_symbol): New function.
1282 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1283 to lookup the actual boundaries instead of computing them ad-hoc.
1284
5cf7e051 12852012-08-12 Jan Hubicka <jh@suse.cz>
1286
1287 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1288 in partitioning.
1289 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1290 by encoder.
1291 * lto-partition.c (new_partition): Update.
1292 * lto.c (cmp_partitions_order): Update.
1293 (lto_wpa_write_files): Update.
1294 (free_ltrans_partitions): Update.
1295 (add_references_to_partition): Update.
1296 (add_cgraph_node_to_partition_1): Update.
1297 (add_cgraph_node_to_partition): Update.
1298 (add_varpool_node_to_partition): Update.
1299 (undo_partition): Update.
1300 (lto_balanced_map): Update.
1301 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1302 set_referenced_from_this_partition_p): Update.
1303 (lto_promote_cross_file_statics): Update.
1304
eab36a5a 13052012-08-12 Jan Hubicka <jh@suse.cz>
1306
1307 * lto-partition.c (set_referenced_from_other_partition_p,
1308 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1309 New functions.
1310 (lto_promote_cross_file_statics): Use them.
1311
02b699d5 13122012-07-24 Jan Hubicka <jh@suse.cz>
1313
1314 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1315
a5656b73 13162012-07-24 Uros Bizjak <ubizjak@gmail.com>
1317
1318 * lto-tree.h (lang_decl): Add variable_size GTY option.
1319
b9ed1410 13202012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1321
1322 * lto.c: Do not include timevar.h.
1323 * Make-lang.in: Fix dependencies.
1324
161121a9 13252012-06-18 Lawrence Crowl <crowl@google.com>
1326
1327 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1328 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1329 to lto_wpa_write_files.
1330 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1331 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1332 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1333 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1334 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1335 to be a front end, but is not one.
1336
18a71d50 13372012-05-18 Jan Hubicka <jh@suse.cz>
1338
1339 * lto.c (lto_materialize_constructors_and_inits): Remove.
1340 (read_cgraph_and_symbols): Remove handling of alias pairs.
1341
aa419a52 13422012-05-17 Jan Hubicka <jh@suse.cz>
1343
1344 * lto-partition.c (add_references_to_partition): Handle external vars.
1345 (partition_varpool_node_p): Likewise.
1346 (lto_promote_cross_file_statics): Do not promote externals.
1347
258a168d 13482012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1349
1350 * lto-lang.c (handle_fnspec_attribute): New static function.
1351 (lto_attribute_table): Add "fn spec".
1352 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1353
3d1c0354 13542012-05-04 Jan Hubicka <jh@suse.cz>
1355
1356 * lto.c (do_whole_program_analysis): Set timevars correctly.
1357 (lto_main): Likewise.
258a168d 1358
596c40fb 13592012-05-04 Richard Guenther <rguenther@suse.de>
1360
1361 * lang.opt (fwpa): Do not mark as Optimization.
1362 (fltrans): Likewise.
1363
cf951b1a 13642012-04-30 Jan Hubicka <jh@suse.cz>
1365
1366 * lto.c (lto_main): Use compile ().
596c40fb 1367 * lto-partition.c (partition_cgraph_node_p): Use
1368 symtab_used_from_object_file_p.
cf951b1a 1369 (partition_varpool_node_p): Likewise.
1370
8efa224a 13712012-04-20 Jan Hubicka <jh@suse.cz>
1372
1373 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1374
04ec15fa 13752012-04-18 Jan Hubicka <jh@suse.cz>
1376
1377 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1378 Update for new ipa-ref API.
1379
7c455d87 13802012-04-16 Jan Hubicka <jh@suse.cz>
1381
1382 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1383 walkers to walk cgraph and varpool.
1384 (materialize_cgraph): Likewise.
1385 * lto-partition.c (lto_1_to_1_map): Likewise.
1386 (lto_balanced_map): Likewise.
1387 (lto_promote_cross_file_statics): Likewise.
1388
7d0d0ce1 13892012-04-14 Jan Hubicka <jh@suse.cz>
1390
1391 * lto.c: Update field referenced for new cgraph/varpool layout.
1392 * lto-partition.c: Likewise.
1393
50ed40f5 13942012-04-11 Jan Hubicka <jh@suse.cz>
1395
1396 * lto.c: Update copyright; remove params.h, ipa-inline.h
1397 and ipa-utils.h inlines; inline lto-partition.h
1398 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1399 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1400 add_references_to_partition, add_cgraph_node_to_partition_1,
1401 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1402 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1403 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1404 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1405 * lto-partition.c: ... here; new file.
1406 * lto-partition.h: New file.
1407 * Make-lang.in (lto.o): Update dependencies.
1408 (lto-partition.o): New.
1409
37e77161 14102012-04-05 Richard Guenther <rguenther@suse.de>
1411
1412 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1413 definition.
1414
a51edb4c 14152012-03-12 Richard Guenther <rguenther@suse.de>
1416
1417 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1418
90f56810 14192012-03-06 Richard Guenther <rguenther@suse.de>
1420
1421 PR lto/52097
1422 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1423
ff56be02 14242012-02-28 Richard Guenther <rguenther@suse.de>
1425
1426 PR lto/52400
1427 * lto.c (lto_register_function_decl_in_symtab): Do not register
1428 a reverse renamed decl mapping.
1429
3affb5a8 14302012-01-06 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR lto/51774
1433 * lto-lang.c (handle_returns_twice_attribute): New function.
1434 (lto_attribute_table): Add returns_twice attribute.
1435
a7a11a02 14362011-12-21 Richard Guenther <rguenther@suse.de>
1437
1438 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1439 (LTO_FIXUP_TREE): Use it.
1440 (uniquify_nodes): Mark new non-prevailing types and avoid
1441 calling gimple_register_type on others.
1442 (lto_read_decls): Add comment.
1443
949e5786 14442011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1445
1446 * lto.h (lto_parse_hex): Delete.
1447 * lto.c (lto_read_decls): Use 'int' for offsets.
1448 (lto_parse_hex): Make static and return proper 64-bit host type.
1449 (lto_resolution_read): Use proper 64-bit host type.
1450
6cd6787c 14512011-12-13 Richard Guenther <rguenther@suse.de>
1452
1453 PR lto/48354
1454 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1455 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1456
c8c597a7 14572011-12-01 Uros Bizjak <ubizjak@gmail.com>
1458
1459 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1460 (ignore_attribute): New.
1461
ea0e88d1 14622011-11-21 Aldy Hernandez <aldyh@redhat.com>
1463
1464 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1465 (handle_transaction_pure_attribute): New.
1466
954825c9 14672011-11-03 Richard Guenther <rguenther@suse.de>
1468
1469 PR lto/44965
1470 * lto-lang.c (lto_post_options): Do not read file options.
1471 * lto.c (lto_read_all_file_options): Remove.
1472 (lto_init): Call lto_set_in_hooks here.
1473
bc2cc717 14742011-10-09 Jan Hubicka <jh@suse.cz>
1475
1476 * lto.c (node_cmp, varpool_node_cmp): New functions.
1477 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1478 (cmp_partitions): Rename to ...
1479 (cmp_partitions_size): ... this one.
1480 (cmp_partitions_order): New function.
1481 (lto_wpa_write_files): Sort partitions by order when
1482 -fno-toplevel-reorder is used.
1483
a5f12044 14842011-10-09 Andi Kleen <ak@linux.intel.com>
1485
1486 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1487
b9a16870 14882011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1489
1490 * lto-lang.c (def_builtin_1): Delete old interface with two
1491 parallel arrays to hold standard builtin declarations, and replace
1492 it with a function based interface that can support creating
1493 builtins on the fly in the future. Change all uses, and poison
1494 the old names. Make sure 0 is not a legitimate builtin index.
1495
21ebaa24 14962011-10-02 Andi Kleen <ak@linux.intel.com>
805389b2 1497
1498 * lto-object.c (lto_obj_add_section_data): Add list.
1499 (lto_obj_add_section): Fill in list.
1500 (ltoobj_build_section_table): Pass through list.
1501 * lto.c (file_data_list): Declare.
1502 (create_subid_section_table): Pass arguments directly.
1503 Fill in list of file_datas.
1504 (lwstate): Delete.
1505 (lto_create_files_from_ids): Pass in direct arguments.
1506 Don't maintain list.
1507 (lto_file_read): Use explicit section and file data lists.
1508 (lto_read_all_file_options): Pass in section_list.
1509 * lto.h (lto_obj_build_section_table): Add list.
1510 (lto_section_slot): Add next.
1511 (lto_section_list): Declare.
1512
da722561 15132011-10-02 Jan Hubicka <jh@suse.cz>
1514
1515 PR lto/47247
1516 * common.c (lto_resolution_str): Add new resolution.
1517 * common.h (lto_resolution_str): Likewise.
1518
15c58191 15192011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1520 Andi Kleen <ak@linux.intel.com>
1521
1522 PR lto/50568
1523 * lto.c (lto_splay_tree_delete_id): New.
1524 (lto_splay_tree_compare_ids): Likewise.
1525 (lto_splay_tree_lookup): Likewise.
1526 (lto_splay_tree_id_equal_p): Likewise.
1527 (lto_splay_tree_insert): Likewise.
1528 (lto_splay_tree_new): Likewise.
1529 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1530 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1531 (create_subid_section_table): Use lto_splay_tree_lookup and
1532 lto_splay_tree_insert.
1533 (lto_file_read): Use lto_splay_tree_new.
1534
21ebaa24 15352011-09-26 Andi Kleen <ak@linux.intel.com>
badc6cfa 1536
1537 * lto.c (lto_resolution_read): Remove id dumping.
1538 (lto_section_with_id): Turn id HOST_WIDE_ID.
1539 (create_subid_section_table): Dito.
1540
1dc92c59 15412011-08-28 Dodji Seketeli <dodji@redhat.com>
1542
1543 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1544 linemap_add twice.
1545
b6c200c3 15462011-08-11 Martin Jambor <mjambor@suse.cz>
1547
1548 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1549
2541503d 15502011-08-08 Diego Novillo <dnovillo@google.com>
1551
1552 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1553 * lto.c: Include tree-streamer.h.
1554
c38a75b7 15552011-07-06 Richard Guenther <rguenther@suse.de>
1556
1557 * lto-lang.c (lto_init):
1558 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1559
e71f2f1c 15602011-06-11 Jan Hubicka <jh@suse.cz>
1561
ac11d294 1562 PR lto/48246
e71f2f1c 1563 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1564 (lto_balanced_map): Likewise.
1565
c70f46b0 15662011-06-11 Jan Hubicka <jh@suse.cz>
1567
1568 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1569 (add_cgraph_node_to_partition) ... here; walk aliases.
1570 (lto_1_to_1_map): Remove same body alias code.
1571 (promote_fn): Likewise.
1572 (lto_promote_cross_file_statics): Update comment.
1573
1574
bbcef2a7 15752011-06-07 Diego Novillo <dnovillo@google.com>
1576
1577 * lto.c (uniquify_nodes): Move code to register decls to
1578 the loop that computes canonical types.
1579
1af0124d 15802011-06-07 Richard Guenther <rguenther@suse.de>
1581
1582 * lto-lang.c (lto_init): Do not set
1583 size_type_node or call set_sizetype.
1584
a0605d65 15852011-06-04 Diego Novillo <dnovillo@google.com>
1586
1587 * lto.c (lto_init): New.
1588 (lto_main): Call it.
1589
f05c9dfb 15902011-06-03 Diego Novillo <dnovillo@google.com>
1591
1592 * lto.c (get_resolution): Move from lto-streamer-in.c.
1593 (lto_register_var_decl_in_symtab): Likewise.
1594 (lto_register_function_decl_in_symtab): Likewise.
1595 (uniquify_nodes): Call lto_register_var_decl and
1596 lto_register_function_decl_in_symtab after reading a new
1597 VAR_DECL or FUNCTION_DECL.
1598
ed61b909 15992011-06-01 Richard Guenther <rguenther@suse.de>
1600
1601 * lto-lang.c (lto_register_canonical_types): New function.
1602 (lto_init): Register common nodes with the canonical type machinery.
1603 Do not play tricks with char_type_node.
1604
8f2b914f 16052011-05-26 Richard Guenther <rguenther@suse.de>
1606
1607 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1608
1e184c62 16092011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1610
1611 * lto.c (lto_ft_typed): New function.
1612 (lto_ft_common): Call it.
1613 (lto_ft_constructor): Likewise.
1614 (lto_ft_expr): Likewise.
1615 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1616 TREE_CHAIN.
1617
4d83607a 16182011-05-20 Richard Guenther <rguenther@suse.de>
1619
1620 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1621 (lto_ft_type): Move main-variant and pointer-to chain building ...
1622 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1623 in a separate final loop.
1624
bddb3763 16252011-05-19 Richard Guenther <rguenther@suse.de>
1626
1627 * lto.c (uniquify_nodes): First register all types before
1628 fixing up the tree SCC.
1629
c6641d23 16302011-05-11 Jan Hubicka <jh@suse.cz>
1631
1632 PR lto/48952
1633 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1634
8f2eb9e1 16352011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1636
1637 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1638 location of binfo field.
1639 (lto_fixup_prevailing_decls): Likewise.
1640
3a939d12 16412011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1642
1643 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1644 build_function_type_array or build_varargs_function_type_array
1645 instead.
1646
1d2bb655 16472011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1648
1649 * lto-lang.c (global_bindings_p): Return bool.
1650
91bf9d9a 16512011-05-07 Jan Hubicka <jh@suse.cz>
1652
56bef313 1653 * lto.c (lto_materialize_function): Use
1654 cgraph_function_with_gimple_body_p.
1655 (add_cgraph_node_to_partition): Do not re-add items to partition;
1656 handle thunks.
91bf9d9a 1657 (add_varpool_node_to_partition): Do not re-add items to partition.
1658
423ba805 16592011-05-03 Jan Hubicka <jh@suse.cz>
1660
1661 * lto.c (free_ltrans_partitions): Fix accidental commit.
1662
19ad01f7 16632011-05-03 Jan Hubicka <jh@suse.cz>
1664
1665 * lto.c (ltrans_partition_def): Remove GTY annotations.
1666 (ltrans_partitions): Move to heap.
1667 (new_partition): Update.
1668 (free_ltrans_partitions): New function.
1669 (lto_wpa_write_files): Use it.
1670
7771d558 16712011-04-29 Martin Jambor <mjambor@suse.cz>
1672
1673 * lto.c: Include ipa-utils.h.
1674 (lto_balanced_map): Update call to ipa_reverse_postorder.
1675 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1676
d534cab0 16772011-04-29 Michael Matz <matz@suse.de>
1678
1679 * lto.c (toplevel): Include tree-flow.h.
1680 (lto_read_in_decl_state): Don't merge types here.
1681 (tree_with_vars): New static hash table.
1682 (remember_with_vars): New static functions.
1683 (LTO_FIXUP_TYPE): New macro.
1684 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1685 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1686 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1687 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1688 (lto_read_decls): Uniquify while reading in trees.
1689 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1690 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1691 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1692 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1693 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1694 lto_fixup_tree): Remove.
1695 (lto_fixup_state): Remove data argument. Use
1696 lto_symtab_prevailing_decl.
1697 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1698 (lto_fixup_prevailing_decls): New function.
1699 (lto_fixup_state_aux): Argument aux is unused.
1700 (lto_fixup_decls): Don't allocate pointer sets, don't use
1701 lto_fixup_tree, use lto_fixup_prevailing_decls.
1702 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1703 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1704
b630a10e 17052011-04-16 Eric Botcazou <ebotcazou@adacore.com>
1706
1707 * lto.c (lto_balanced_map): Fix typos in head comment.
1708 (lto_promote_cross_file_statics): Fix long lines and remove redundant
1709 test.
1710
cbd7f5a0 17112011-04-16 Jan Hubicka <jh@suse.cz>
1712
1713 * lto.c (lto_balanced_map): Update.
1714
c7b2cc59 17152011-04-14 Jan Hubicka <jh@suse.cz>
1716
1717 * lto.c: Include ipa-inline.h
b630a10e 1718 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
1719 accessor.
c7b2cc59 1720 (ipa_node_duplication_hook): Fix declaration.
1721 * Make-lang.in (lto.o): Update dependencies.
1722
9b88d08d 17232011-04-12 Nathan Froyd <froydnj@codesourcery.com>
1724
1725 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
1726 calling TREE_CHAIN.
1727 * lto.c (lto_fixup_common): Likewise.
1728
c33080b9 17292011-04-08 Nathan Froyd <froydnj@codesourcery.com>
1730
1731 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
1732 (handle_type_generic_attribute): Likewise.
1733
5cd33168 17342011-04-03 Michael Matz <matz@suse.de>
1735
1736 * lto.c (lto_materialize_function): Don't read and then discard
1737 sections in WPA mode.
1738 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
1739
1740 * lto-lang.c (registered_builtin_fndecls): Remove.
1741 (lto_getdecls): Return NULL_TREE.
1742 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
1743
d45127a1 17442011-03-31 Richard Guenther <rguenther@suse.de>
1745
1746 PR lto/48246
1747 * lto.c (lto_wpa_write_files): Disable assert for non-empty
1748 partitions when checking is not enabled.
1749
82715bcd 17502011-03-25 Kai Tietz <ktietz@redhat.com>
1751
1752 * lto.c (lto_resolution_read): Use filename_cmp instead
1753 of strcmp.
1754 (lto_read_section_data): Likewise.
1755
451c8e2f 17562011-03-25 Jeff Law <law@redhat.com>
1757
1758 * lto/lto-lang.c (def_fn_type): Add missing va_end.
1759
ac86af5d 17602011-03-21 Kai Tietz <ktietz@redhat.com>
1761
1762 PR target/12171
1763 * lto-lang.c (lto_attribute_table): Adjust table.
1764
5a8834a5 17652011-02-18 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR bootstrap/47807
1768 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
1769 of lto-streamer.h.
1770
30865946 17712011-02-18 Richard Guenther <rguenther@suse.de>
1772
1773 PR lto/47798
1774 * lto-tree.h (lto_global_var_decls): Do not declare here.
1775 * lto-lang.c: Include lto-streamer.h.
1776 * Make-lang.in (lto-lang.o): Adjust dependencies.
1777
fad71d4f 17782011-02-10 Kai Tietz <kai.tietz@onevision.com>
1779
1780 PR lto/47241
1781 * lto.c (lto_read_section_data): Free
1782 fd_name in failure case.
1783 For mingw targets don't hash file-descriptor.
1784 (read_cgraph_and_symbols): Close current_lto_file
1785 in failure case.
1786
232c9ac7 17872011-01-11 Jan Hubicka <jh@suse.cz>
1788
1789 PR lto/45721
1790 PR lto/45375
b630a10e 1791 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
1792 are not partitioned.
232c9ac7 1793
a36cf284 17942010-12-22 Nathan Froyd <froydnj@codesourcery.com>
1795
1796 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
1797 Use prototype_p.
1798
6abc14d6 17992010-12-06 Richard Guenther <rguenther@suse.de>
1800
1801 PR lto/46796
1802 * lto-lang.c (lto_init): Give names to basic types.
1803
b96c136c 18042010-11-30 Joseph Myers <joseph@codesourcery.com>
1805
1806 * lto-object.c: Don't include toplev.h.
1807 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
1808
92468061 18092010-11-30 Joseph Myers <joseph@codesourcery.com>
1810
1811 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
1812 $(TOPLEV_H).
1813
967958e4 18142010-11-29 Joseph Myers <joseph@codesourcery.com>
1815
1816 * lto-endian.h: Delete.
1817 * lto-object.c: Don't include "libiberty.h".
1818 (O_BINARY): Don't define.
1819 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
1820 (O_BINARY): Don't define.
1821
baa6eec4 18222010-11-23 Richard Guenther <rguenther@suse.de>
1823
1824 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
1825
4f3aea0d 18262010-11-23 Richard Guenther <rguenther@suse.de>
1827
1828 PR lto/46605
1829 * lto.c (read_cgraph_and_symbols): Bail out after errors.
1830
b8ba44e7 18312010-11-17 Joseph Myers <joseph@codesourcery.com>
1832
1833 * lto.c (lto_main): Take no arguments.
1834 * lto.h (lto_main): Update prototype.
1835
2e521e13 18362010-11-16 Ian Lance Taylor <iant@google.com>
1837
1838 * lto-object.c (lto_obj_file_open): Call
1839 simple_object_attributes_merge rather than
1840 simple_object_attributes_compare.
1841
3c6c0e40 18422010-11-12 Joseph Myers <joseph@codesourcery.com>
1843
1844 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
1845 * lto-lang.c (lto_handle_option): Take location_t parameter.
1846
bf776685 18472010-11-10 Joseph Myers <joseph@codesourcery.com>
1848
1849 * lto.c (lto_resolution_read): Start diagnostics with lowercase
1850 letters and remove trailing '.'.
1851 (lto_file_finalize): Start diagnostic with a lowercase letter.
1852
e09108e1 18532010-11-02 Ian Lance Taylor <iant@google.com>
1854
1855 * lto-object.c: New file.
1856 * lto-elf.c: Remove file.
1857 * lto-macho.c: Remove file.
1858 * lto-macho.h: Remove file.
1859 * lto-coff.c: Remove file.
1860 * lto-coff.h: Remove file.
1861 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
1862 lto/lto-object.o.
1863 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
1864 (lto/lto-objfile.o): New target.
1865 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
1866 (lto/lto.o): Remove $(LIBIBERTY_H).
1867
4037a4c1 18682010-10-22 Jan Hubicka <jh@suse.cz>
1869
1870 * lto.c (add_cgraph_node_to_partition,
1871 add_varpool_node_to_partition): Add debug info.
1872 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
1873 partitioned nodes.
1874 (do_whole_program_analysis): Set function flags before dumping.
1875
7a3ccc3b 18762010-10-22 Richard Guenther <rguenther@suse.de>
1877
1878 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
1879 the new gimple_register_canonical_type.
1880
55e9d7d7 18812010-10-20 H.J. Lu <hongjiu.lu@intel.com>
1882
1883 PR bootstrap/45954
1884 * config-lang.in (boot_language): Set to $enable_lto.
1885
d63880ad 18862010-10-18 Jakub Jelinek <jakub@redhat.com>
1887
1888 PR lto/45638
1889 * Make-lang.in (check-lto): New dummy target.
1890
8e8e1ee7 18912010-10-14 Eric Botcazou <ebotcazou@adacore.com>
1892
1893 * lto-elf.c (SHN_XINDEX): Define if not already defined.
1894
f3f006ad 18952010-10-08 Joseph Myers <joseph@codesourcery.com>
1896
1897 * lto-lang.c (lto_init_options): Change to
1898 lto_init_options_struct. Update parameters.
1899 (LANG_HOOKS_INIT_OPTIONS): Don't define.
1900 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
1901
1e52cb3c 19022010-10-06 Jan Hubicka <jh@suse.cz>
1903
1904 * lto.c (lto_balanced_map): Fix accounting of program size.
1905
11da9120 19062010-10-06 Jan Hubicka <jh@suse.cz>
1907
1908 * lto.c (lto_balanced_map): Do not produce empty partitions.
1909
21ebaa24 19102010-10-06 Andi Kleen <ak@linux.intel.com>
a3de1f55 1911
1912 * lto.c (lto_process_name): Add.
1913 (lto_main): Call lto_process_name.
1914
7ad28d2a 19152010-10-06 Jan Hubicka <jh@suse.cz>
1916
1917 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
1918 COMDATs required by the linker.
1919
eaa13879 19202010-10-05 Ian Lance Taylor <iant@google.com>
1921
1922 * lto.c (lto_section_with_id): Make s a const pointer.
1923
48e3ea52 19242010-10-05 Jan Hubicka <jh@suse.cz>
1925
1926 * lto.c: Include params.h.
1927 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
1928 refcounting in aux field.
1929 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
1930 New functions.
1931 (lto_1_to_1_map): Simplify.
1932 (lto_balanced_map): New function.
1933 (do_whole_program_analysis): Chose proper partitioning alg.
1934 * Make-lang.in (lto.o): Add dependency on params.h
1935
21ebaa24 19362010-10-04 Andi Kleen <ak@linux.intel.com>
70293f47 1937
1938 * Make-lang.in (lto1): Add + to build rule.
1939
21ebaa24 19402010-10-03 Andi Kleen <ak@linux.intel.com>
fd30d60a 1941
1942 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
1943 with fatal_error.
1944
4a68fd3c 19452010-09-28 Jan Hubicka <jh@suse.cz>
1946
1947 * lto-lang.c (handle_leaf_attribute): New function.
1948 (lto_attribute_tables): Add leaf.
1949
2edfba82 19502010-09-25 Jie Zhang <jie@codesourcery.com>
1951
1952 * lto.c (lto_read_all_file_options): Start a new line after
1953 printing out file names.
1954
9ced88d0 19552010-09-24 Jan Hubicka <jh@suse.cz>
1956
1957 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1958
7ae8b539 19592010-09-20 Jan Hubicka <jh@suse.cz>
1960
1961 PR tree-optimize/45605
1962 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1963
be1a554f 19642010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
1965
1966 * lto-elf.c (lto_obj_file_open): Also provide filename when
1967 elf_begin fails.
1968
7de998de 19692010-09-17 Jan Hubicka <jh@suse.cz>
1970
1971 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
1972
78d063c8 19732010-09-17 Richard Guenther <rguenther@suse.de>
1974
1975 * lang.opt (flag_wpa): Also enable for the driver.
1976
cdc58a66 19772010-09-16 Jan Hubicka <jh@suse.cz>
1978
1979 * lto.c (lto_materialize_function): Do not tamper with STATIC and
1980 EXTERNAL flags.
1981
7b80d28f 19822010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1983
1984 * lto-tree.h (struct lang_type): Add variable_size GTY option.
1985
3210ebe5 19862010-09-08 Jan Hubicka <jh@suse.cz>
1987
1988 * lto.c (real_file_count, real_file_decl_data): New static vars.
1989 (read_cgraph_and_symbols): Use it.
1990
7a52b640 19912010-09-08 Richard Guenther <rguenther@suse.de>
1992
1993 * lto.c (read_cgraph_and_symbols): Collect again after each
1994 file.
1995
be147e7f 19962010-09-07 Jan Hubicka <jh@suse.cz>
1997
1998 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
1999
56c34a25 20002010-09-03 Richard Guenther <rguenther@suse.de>
2001
2002 * lto-elf.c (validate_file): Always error if validation fails.
2003
c5cc4842 20042010-08-20 Jan Hubicka <jh@suse.cz>
2005
2006 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2007 (lto_wpa_write_files): Update comments.
2008
9543655f 20092010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2010
2011 PR bootstrap/45357
2012 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2013 with has_analyzed_clone_p.
2014
97b862d3 20152010-08-20 Jan Hubicka <jh@suse.cz>
2016
2017 * lto.c (has_analyzed_clone_p): New function
2018 (lto_materialize_function): Use callgraph to determine if
2019 body is needed.
2020 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2021
48148244 20222010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2023
2024 * lto.c: Use FOR_EACH_VEC_ELT.
2025
21ebaa24 20262010-07-27 Andi Kleen <ak@linux.intel.com>
eb219e9c 2027
2028 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2029
b78351e5 20302010-07-27 Joseph Myers <joseph@codesourcery.com>
2031
2032 * lto-lang.c (lto_handle_option): Update prototype and return
2033 value type. Remove duplicate assignment to result.
2034
e88d34f6 20352010-07-27 Joseph Myers <joseph@codesourcery.com>
2036
2037 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2038 New.
2039 (lto_init_options): Update prototype.
2040 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2041 Define.
2042
21ebaa24 20432010-07-10 Andi Kleen <ak@linux.intel.com>
f18bad33 2044
2045 PR lto/44992
2046 * lto.c: Include splay-tree.h
2047 (lto_resolution_read): Change to walk file_ids tree and parse
2048 extra file_id in resolution file.
2049 (lto_section_with_id): Add.
2050 (create_subid_section_table): Add.
2051 (lwstate): Add.
2052 (lto_create_files_from_ids): Add.
2053 (lto_file_read): Change to handle sub file ids and create list
2054 of file_datas. Add output argument for count.
2055 (get_section_data): Pass file_data to lto_get_section_name.
2056 (lto_flatten_file): Add.
2057 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2058
21ebaa24 20592010-07-10 Andi Kleen <ak@linux.intel.com>
58d9117a 2060
2061 * lto-coff.c (hash_name, eq_name): Move.
2062 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2063 * lto-elf.c: (hash_name, eq_name): Move.
2064 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2065 * lto-macho.c: (hash_name, eq_name): Move.
2066 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2067 * lto.c: (hash_name, eq_name): Move from lto-*.c
2068 (lto_obj_create_section_hash_table): Add.
2069 (free_with_string): Add.
2070
0b205f4c 20712010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2072
2073 * lto-coff.c: Include diagnostic-core.h in every file that
2074 includes toplev.h.
2075 * lto-elf.c: Likewise.
2076 * lto-lang.c: Likewise.
2077 * lto-macho.c: Likewise.
2078
9dccd5de 20792010-07-07 Jakub Jelinek <jakub@redhat.com>
2080
2081 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2082 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2083 objects.
2084
7550e1d1 20852010-07-05 Jan Hubicka <jh@suse.cz>
2086
2087 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2088 nodes from same comdat group as well as all comdat functions referenced
2089 here.
b630a10e 2090 (add_varpool_node_to_partition, add_references_to_partition): New
2091 function.
2092 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2093 add_varpool_node_to_partition; clear aux flags when done.
2094 (lto_promote_cross_file_statics): Do not promote stuff that gets
2095 duplicated to each ltrans.
7550e1d1 2096
01ec0a6c 20972010-07-04 Jan Hubicka <jh@suse.cz>
2098
2099 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2100
09eb10ed 21012010-06-13 Richard Guenther <rguenther@suse.de>
2102
2103 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2104
6c8c5385 21052010-06-09 Kai Tietz <kai.tietz@onevision.com>
2106
2107 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2108 * lto-coff.c (coff_write_object_file): Add braces to if.
2109
ba72912a 21102010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2111
2112 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2113 (lto_file_read): Likewise.
2114 (new_partition): Likewise.
2115 (read_cgraph_and_symbols): Likewise.
2116
4aafe913 21172010-06-07 Joseph Myers <joseph@codesourcery.com>
2118
2119 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2120 (lto_handle_option): Don't set flag_signed_char here.
2121
fab8a209 21222010-06-04 Richard Guenther <rguenther@suse.de>
2123
2124 PR lto/41584
2125 * lto.c (lto_1_to_1_map): Use the proper file_data for
2126 varpool nodes.
2127
ecb08119 21282010-05-30 Jan Hubicka <jh@suse.cz>
2129
2130 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2131 partitioning decisions.
2132
68b8d829 21332010-05-29 Jan Hubicka <jh@suse.cz>
2134
2135 * lto.c (bitmap vector): Remove.
2136 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2137 (ltrans_partition_def): New structure.
2138 (ltrans_partition): New type and VECtor.
2139 (new_partition): New function.
2140 (add_cgraph_node_to_partition): New function.
2141 (lto_1_to_1_map): Reorganize for partitions.
2142 (lto_add_inline_clones): Remove.
2143 (lto_add_all_inlinees): Remove.
2144 (lto_promote_cross_file_statics): Use partitions.
2145 (cmp_partitions): New function.
2146 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2147 use partitions; output files sorted by size.
2148
ea269688 21492010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2150
2151 * Make-lang.in: Replace vec.h dependency with VEC_H.
2152
8fb69344 21532010-05-28 Joseph Myers <joseph@codesourcery.com>
2154
2155 * lto-coff.c (coff_errmsg): Remove.
2156 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2157 errors instead of coff_errmsg (-1).
2158 * lto-macho.c (mach_o_errmsg): Remove.
2159 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2160 instead of mach_o_errmsg (-1).
2161 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2162 xstrerror (errno).
2163
2024fa7d 21642010-05-28 Richard Guenther <rguenther@suse.de>
2165
2166 * lto.c (prefix_name_with_star): Removed.
2167 (strip_extension): Likewise.
2168 (get_filename_for_set): Likewise.
2169 (lto_write_ltrans_list): Fold into ...
2170 (lto_wpa_write_files): ... this. Name LTRANS units
2171 by suffixing the ltrans output list filename.
2172 (do_whole_program_analysis): Adjust.
2173
852f689e 21742010-05-27 Joseph Myers <joseph@codesourcery.com>
2175
2176 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2177 (read_cgraph_and_symbols, lto_main): Use seen_error.
2178 * Make-lang.in (lto/lto.o): Update dependencies.
2179
3c9e9cba 21802010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2181
2182 PR lto/44230
2183 * lto.h (lto_eh_personality): New prototype.
2184 * lto.c: Include debug.h.
2185 (first_personality_decl): New static variable.
2186 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2187 first function for which it is non-null.
2188 (lto_eh_personality_decl): New static variable.
2189 (lto_eh_personality): New function.
2190 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2191 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2192
cdd0ea37 21932010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2194
2195 * lto-lang.c: Do not include expr.h.
2196
71eb351d 21972010-05-24 Richard Guenther <rguenther@suse.de>
2198
2199 * lto-elf.c (lto_obj_build_section_table): Work around
2200 FreeBSD libelf issue.
2201
ca3e35a1 22022010-05-22 Richard Guenther <rguenther@suse.de>
2203
2204 * lto.c (read_cgraph_and_symbols): Do not collect.
2205
e5507c85 22062010-05-20 Jan Hubicka <jh@suse.cz>
2207
2208 * lto.c (promote_var, promote_fn): New functions.
2209 (lto_promote_cross_file_statics): Compute correctly boundary including
2210 static initializers of readonly vars.
2211
a510bd8d 22122010-05-18 Jan Hubicka <jh@suse.cz>
2213
e5507c85 2214 * lto.c (lto_1_to_1_map): Partition non-inline clones.
a510bd8d 2215 (lto_promote_cross_file_statics): Deal with non-inline clones.
2216
1375c6f8 22172010-05-18 Jan Hubicka <jh@suse.cz>
2218
2219 * lto.c (lto_materialize_function): Announce function when
2220 reading body; allocate_struct_function only when reading body;
2221 do not finalize local statics; ggc_collect after reading;
2222 do not mark reachable node.
2223 (materialize_cgraph): Do not announce function.
2224
757a3237 22252010-05-11 Jan Hubicka <jh@suse.cz>
2226
2227 * lto.c (materialize_cgraph): Revert my previous patch.
2228
942dc465 22292010-05-11 Kai Tietz <kai.tietz@onevision.com>
2230
2231 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2232 IMAGE_FILE_MACHINE_AMD64.
2233 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2234
b4c8770a 22352010-05-11 Jan Hubicka <jh@suse.cz>
2236
2237 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2238 (materialize_cgraph): Add it here.
2239
25429dc2 22402010-05-11 Jan Hubicka <jh@suse.cz>
2241
2242 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2243 vector.
2244
22452010-05-11 Jan Hubicka <jh@suse.cz>
2246
2247 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2248 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2249 use reachable_from_other_partition_p and
2250 referenced_from_other_partition_p test.
2251
6dd40464 22522010-05-11 Kai Tietz <kai.tietz@onevision.com>
2253
2254 * lto-coff.c (validate_file): Add x64-coff support.
2255 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2256 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2257 * lto-lang.c (lto_build_c_type_nodes): Add check for
2258 'long long unsigned int' for x64-windows.
2259 (lto_init): Likewise.
2260
2261
23433d72 22622010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2263
2264 * lto.h (struct lto_file_struct): Document offset member.
2265 * lto-endian.h: New file.
2266 * lto-macho.h: New file.
2267 * lto-macho.c: New file.
2268 * Make-lang.in: Add rule for lto-macho.o.
2269
eb4ef3d1 22702010-05-07 Richard Guenther <rguenther@suse.de>
2271
2272 PR lto/43857
2273 PR lto/43371
2274 * lang.opt (fresolution): Change to ...
2275 (fresolution=): ... this.
2276 * lto-lang.c (lto_handle_option): Adjust.
2277
264cbb51 22782010-05-07 Richard Guenther <rguenther@suse.de>
2279
2280 * lto.c (DUMPBASE_SUFFIX): Remove.
2281 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2282 Rename to ...
2283 (lto_write_ltrans_list): ... only output the list of ltrans files.
2284 (lto_maybe_unlink): Remove.
2285 (do_whole_program_analysis): Do not execute LTRANS phase
2286 from here.
2287
11dc3713 22882010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2289
2290 * lto-lang.c (lto_handle_option): Add argument kind.
2291
8d810329 22922010-05-05 Jan Hubicka <jh@suse.cz>
2293
264cbb51 2294 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2295 refs.
8d810329 2296
a238367f 22972010-05-05 Jan Hubicka <jh@suse.cz>
2298
2299 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2300
bf7d782b 23012010-04-30 Jan Hubicka <jh@suse.cz>
2302
b630a10e 2303 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2304 use default name.
bf7d782b 2305 (lto_wpa_write_files): Write any non-empty partition.
2306
da67d826 23072010-04-30 Jan Hubicka <jh@suse.cz>
2308
2309 * lto.c: Do not attempt to make constant pool references global.
2310
57305941 23112010-04-28 Jan Hubicka <jh@suse.cz>
2312
2313 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2314 (lto_wpa_write_files): Announce what we are writting.
2315 (all_file_decl_data): New.
2316 (read_cgraph_and_symbols): Use GGC; correct timevars.
2317 (do_whole_program_analysis): Collect.
2318 * lto/Make-lang.in (lto.o): Fix dependency.
2319 * Makefile.in (GTFILES): Add lto-streamer.h.
2320 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2321 (varpool_assemble_pending_decls): Use VAROUT.
2322 * lto-streamer.h (lto_tree_ref_table): Annotate.
2323 (lto_in_decl_state): Annotate.
2324 (lto_file_decl_data): Annotate.
2325
0cddb138 23262010-04-28 Jan Hubicka <jh@suse.cz>
2327
2328 * lto.c (lto_varpool_node_sets): New.
2329 (lto_1_to_1_map): Partition varpool too.
2330 (globalize_context_t, globalize_cross_file_statics,
2331 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2332 lto_scan_statics_in_remaining_global_vars): Remove.
2333 (lto_promote_cross_file_statics): Rewrite.
2334 (get_filename_for_set): Take vset argument.
2335 (lto_wpa_write_files): Pass around vsets.
2336
4d992eb6 23372010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2338
2339 PR lto/42776
2340 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2341 hardcoding 'lto-elf.o'.
2342 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2343
2344 * lto-coff.h: New file.
2345 * lto-coff.c: Likewise.
2346
9c491711 23472010-04-26 Richard Guenther <rguenther@suse.de>
2348
2349 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2350
3ba0ce47 23512010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2352
2353 * lto.h (lto_elf_file_open): Rename prototype from this ...
2354 (lto_obj_file_open): ... to this.
2355 (lto_elf_file_close): Likewise ...
2356 (lto_obj_file_close): ... and likewise.
2357 (lto_elf_build_section_table): Likewise ...
2358 (lto_obj_build_section_table): ... and likewise.
2359 (lto_elf_begin_section): Likewise ...
2360 (lto_obj_begin_section): ... and likewise.
2361 (lto_elf_append_data): Likewise ...
2362 (lto_obj_append_data): ... and likewise.
2363 (lto_elf_end_section): Likewise ...
2364 (lto_obj_end_section): ... and likewise.
2365 * lto.c (lto_file_read): Update references to the above.
2366 (lto_wpa_write_files): Likewise.
2367 (lto_read_all_file_options): Likewise.
2368 (read_cgraph_and_symbols): Likewise.
2369 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2370 (LANG_HOOKS_APPEND_DATA): Likewise.
2371 (LANG_HOOKS_END_SECTION): Likewise.
2372 * lto-elf.c (lto_elf_file_open): Rename from this ...
2373 (lto_obj_file_open): ... to this, updating any references.
2374 (lto_elf_file_close): Likewise ...
2375 (lto_obj_file_close): ... and likewise.
2376 (lto_elf_build_section_table): Likewise ...
2377 (lto_obj_build_section_table): ... and likewise.
2378 (lto_elf_begin_section): Likewise ...
2379 (lto_obj_begin_section): ... and likewise.
2380 (lto_elf_append_data): Likewise ...
2381 (lto_obj_append_data): ... and likewise.
2382 (lto_elf_end_section): Likewise ...
2383 (lto_obj_end_section): ... and likewise.
2384
5a2aecd6 23852010-04-21 Jan Hubicka <jh@suse.cz>
2386
2387 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2388 (materialize_cgraph): Likewise.
2389
ddc90d88 23902010-04-21 Jan Hubicka <jh@suse.cz>
2391
2392 * lto.c (lto_wpa_write_files): Update.
2393 (read_cgraph_and_symbols): Be more verbose.
2394 (materialize_cgraph): Likewise.
2395 (do_whole_program_analysis): Likewise.
2396
e288c7a9 23972010-04-21 Jan Hubicka <jh@suse.cz>
2398
2399 * lto.c (globalize_cross_file_statics): When function has address taken,
2400 it needs to be public.
2401
08843223 24022010-04-20 Jan Hubicka <jh@suse.cz>
2403
2404 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2405 (lto_add_all_inlinees): Likewise.
2406 (lto_wpa_write_files): Likewise.
2407
ad086ed4 24082010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2409
2410 * lto-lang.c (lto_init): Remove second argument in call to
2411 build_common_tree_nodes.
2412
d6845139 24132010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2414
2415 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2416 function.
2417
a5813485 24182010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2419
2420 PR bootstrap/43276
2421 * lto-elf.c: Define EM_* constants if not already defined.
2422
a219f6a5 24232010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2424
2425 * lto-elf.c (is_compatible_architecture): New static function.
2426 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2427
2bd888dc 24282010-02-11 Richard Guenther <rguenther@suse.de>
2429
2430 PR driver/43021
2431 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2432 appropriately.
2433
27721832 24342010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2435
2436 * lto.c (O_BINARY): Define.
2437 (lto_read_section_data): Open file in binary mode.
2438 * lto-elf.c (O_BINARY): Define.
2439 (lto_elf_file_open): Open file in binary mode.
2440
3bfd70ae 24412010-01-08 Richard Guenther <rguenther@suse.de>
2442
2443 PR lto/42528
2444 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2445 (lto_init): Do not init char_type_node in a standard way
2446 but according to flag_signed_char.
2447
50ca7c37 24482010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2449
2450 PR lto/41564
2451 * lto.c (DUMPBASE_SUFFIX): New.
2452 (lto_execute_ltrans): Append a sequence number to -dumpbase
2453 for LTRANS.
2454
d5e86d20 24552010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2456
2457 PR lto/42580
2458 * lto-elf.c (lto_elf_file_open): Stop if the command line
2459 option file is missing.
2460
08a7e80f 24612009-12-15 Richard Guenther <rguenther@suse.de>
2462
2463 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2464 (lto_post_options): Do not disable debuginfo.
2465
4af4d09c 24662009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2467
2468 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2469
50b2dbd9 24702009-12-11 Richard Guenther <rguenther@suse.de>
2471
2472 PR lto/42037
2473 * lto.c (lto_resolution_read): Properly grow the vector.
2474
97e90c2e 24752009-12-11 Richard Guenther <rguenther@suse.de>
2476
2477 PR lto/41915
2478 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2479 to the C99 default. Do not set flag_unit_at_a_time.
2480
f018d957 24812009-11-28 Jakub Jelinek <jakub@redhat.com>
2482
2483 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2484 variable.
2485
81897669 24862009-11-19 Rafael Avila de Espindola <espindola@google.com>
2487
2488 PR bootstrap/42096
2489 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2490 * lto.c (lto_parse_hex): New.
2491 (lto_resolution_read): Use lto_parse_hex.
2492 * lto.h (lto_parse_hex): New.
2493
b7fedf62 24942009-11-17 Rafael Avila de Espindola <espindola@google.com>
2495
2496 * lto-elf.c (lto_file_init): Add offset argument.
2497 (lto_elf_file_open): Record the offset.
2498 * lto.c (lto_resolution_read): Change file_name into a lto_file
2499 argument. Check offsets.
2500 (lto_file_read): Update call to lto_resolution_read.
2501 * lto.h (lto_file_struct): Add the offset field.
2502
6575099f 25032009-11-16 Rafael Avila de Espindola <espindola@google.com>
2504
2505 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2506
6d1cc52c 25072009-11-14 Jan Hubicka <jh@suse.cz>
2508
2509 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2510
d405c5a4 25112009-11-12 Rafael Avila de Espindola <espindola@google.com>
2512
2513 * lang.opt (fresolution): Renamed from resolution.
2514 * lto-lang.c (lto_handle_option): Handle new option name.
2515 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2516
06b9e52b 25172009-11-04 Richard Guenther <rguenther@suse.de>
2518 Rafael Avila de Espindola <espindola@google.com>
2519
2520 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2521 (lto_elf_file_open): Handle offsets in arguments name@offest.
2522
f5a023c5 25232009-10-30 Richard Guenther <rguenther@suse.de>
2524
2525 PR lto/41858
2526 * lto.c (lto_file_read): Do not set file_data->fd.
2527 (lto_read_section_data): Use a single-entry file-descriptor cache.
2528 Do not check the result of xmalloc.
2529 (free_section_data): Do not use file_data->fd.
2530 (lto_read_all_file_options): Likewise.
2531
21ce3cc7 25322009-10-22 Richard Guenther <rguenther@suse.de>
2533
2534 * lto.c (lto_fixup_jump_functions): Remove.
2535 (lto_fixup_decls): Do not fixup jump functions.
2536 (read_cgraph_and_symbols): Schedule cgraph merging after
2537 summary reading. Schedule type and decl fixup before
2538 summary reading.
2539
5575303a 25402009-10-22 Richard Guenther <rguenther@suse.de>
2541
2542 * lto.c (lto_fixup_data_t): Remove free_list member.
2543 (lto_fixup_tree): Do not insert into free_list.
2544 (free_decl): Remove.
2545 (lto_fixup_decls): Remove free-list handling.
2546
8867b500 25472009-10-22 Jan Hubicka <jh@suse.cz>
2548
2549 * lto.c (lto_fixup_jump_functions): New function.
2550 (lto_fixup_decls): Use it.
2551
b787522e 25522009-10-16 Richard Guenther <rguenther@suse.de>
2553
2554 PR lto/41715
2555 * lto.c (lto_fixup_tree): Revert last change.
2556
bc0ed27c 25572009-10-14 Richard Guenther <rguenther@suse.de>
2558
2559 * lto.c (lto_fixup_tree): In case the prevailing decl is not
2560 compatible with the one we replace wrap it around a
2561 VIEW_CONVERT_EXPR.
2562
c515f146 25632009-10-09 Richard Guenther <rguenther@suse.de>
2564
2565 PR lto/41635
2566 PR lto/41636
2567 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2568 a file.
2569 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2570 (init_ehdr##BITS): Likewise.
2571
48cf7037 25722009-10-08 Joseph Myers <joseph@codesourcery.com>
2573
2574 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2575 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2576 diagnostics.
2577 * lto-lang.c (lto_post_options): Remove trailing "." from
2578 diagnostics.
2579
7366cbe7 25802009-10-08 Richard Guenther <rguenther@suse.de>
2581
2582 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2583 hash tables.
2584
7c3f71c3 25852009-10-07 Joseph Myers <joseph@codesourcery.com>
2586
2587 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2588
59dd4830 25892009-10-07 Jan Hubicka <jh@suse.cz>
2590
2591 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2592 ltrans stage; explain why this is needed and should not.
2593
fd193bcd 25942009-10-05 Richard Guenther <rguenther@suse.de>
2595
2596 PR lto/41552
2597 PR lto/41487
2598 * lto.c (lto_read_decls): Do not register deferred decls.
2599 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2600 until after reading the IPA summaries.
2601
7bfefa9d 26022009-10-02 Rafael Avila de Espindola <espindola@google.com>
2603
2604 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2605 (lto-lang.c): Don't include lto/common.h.
2606
26072009-10-02 Rafael Avila de Espindola <espindola@google.com>
2608
2609 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2610 (lto/common.o): Remove.
2611 * common.c: Remove.
2612 * common.h (lto_kind_str): Remove.
2613 (lto_visibility_str): Remove.
2614 (lto_resolution_str): Make it static.
2615
26162009-10-01 Diego Novillo <dnovillo@google.com>
2617
2618 * lto.c (lto_read_decls): Add comment.
2619 Call internal_error instead of gcc_assert.
2620 (lto_resolution_read): Likewise.
2621 (lto_add_all_inlinees): Tidy.
2622 * Make-lang.in: Fix copyright boilerplate.
2623 (lto.pdf): New.
2624 (lto.install-pdf): New.
2625 * lto-tree.h: Fix copyright boilerplate.
2626 * lang-specs.h: Likewise.
2627 Remove ".lto" entry from compilers fragment.
2628 * lto-elf.c: Move inclusion of gelf.h after config.h.
2629 Tidy formatting everywhere.
2630 * lto.h: Fix copyright boilerplate.
2631 Tidy formatting everywhere.
2632 * common.c: Likewise.
2633 * config-lang.in: Likewise.
2634 * common.h: Likewise.
2635 * lto-lang.c: Likewise.
2636
26372009-10-01 Richard Guenther <rguenther@suse.de>
2638
2639 * lto.c (lto_read_section_data): Use plain lseek/read.
2640
26412009-10-01 Richard Guenther <rguenther@suse.de>
2642
2643 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2644 use sysconf to query the system page size.
2645 (lto_file_read): Implement fallback using stdio.
2646 (free_section_data): Likewise.
2647
26482009-09-29 Diego Novillo <dnovillo@google.com>
2649
2650 * lto-lang.c (lto_init): Really fix call to
2651 build_common_builtin_nodes.
2652
26532009-09-29 Diego Novillo <dnovillo@google.com>
2654
2655 * lto-lang.c (lto_init): Fix call to
2656 build_common_builtin_nodes.
2657
26582009-09-29 Richard Guenther <rguenther@suse.de>
2659
2660 PR lto/40754
2661 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2662 in bytes.
2663 (first_data_block): New static variable.
2664 (lto_elf_append_data): Align the first data block in each
2665 section.
2666
26672009-09-28 Diego Novillo <dnovillo@google.com>
2668
2669 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2670 * lto.c (strip_extension): New.
2671 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2672 (lto_execute_ltrans): Tidy.
2673 Do not pass -fwpa nor -fltrans-* to LTRANS.
2674 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2675 * tree.c (need_assembler_name_p): Call
2676 lang_hooks.decls.may_need_assembler_name_p if set.
2677 * varasm.c (default_binds_local_p_1): Remove check for
2678 flag_ltrans.
2679 * varpool.c (decide_is_variable_needed): Do not test for
2680 in_lto_p.
2681
26822009-09-22 Richard Guenther <rguenther@suse.de>
2683
2684 PR lto/39276
2685 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2686 * Make-lang.in: Remove ltrans-driver stuff.
2687 * config-lang.in: Likewise.
2688 * lang.opt (fltrans-driver): Remove.
2689 * lto-lang.c (lto_init_options): Remove code initializing
2690 ltrans_driver.
2691 * ltrans-driver: Remove.
2692
26932009-09-21 Diego Novillo <dnovillo@google.com>
2694
2695 * lto-lang.c (lto_define_builtins): Remove superfluous
2696 calls to targetm.init_builtins and build_common_builtin_nodes.
2697 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2698 build_common_builtin_nodes.
2699 * lto.c (lto_materialize_function): Do nothing if NODE is a
2700 clone.
2701
27022009-09-03 Diego Novillo <dnovillo@google.com>
2703
2704 * lto-elf.c (validate_file): Replace call to
2705 elf_getshstrndx with call to elf_getshdrstrndx.
2706
27072009-08-19 Richard Guenther <rguenther@suse.de>
2708
2709 * lto-lang.c (lto_init): Merge char_type_node with the
2710 appropriately signed variant.
2711
27122009-08-19 Richard Guenther <rguenther@suse.de>
2713
2714 PR lto/41071
2715 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
2716 (lto_fixup_type): Re-build the pointer-to chain part two.
2717
27182009-08-19 Richard Guenther <rguenther@suse.de>
2719
2720 PR lto/41071
2721 * lto.c (lto_fixup_type): Re-build the type variant chain.
2722
27232009-08-19 Richard Guenther <rguenther@suse.de>
2724
2725 PR lto/41071
2726 * lto.c (lto_fixup_constructor): New function.
2727 (lto_fixup_tree): Replace all types. Properly fixup
2728 constructors and constants.
2729
27302009-08-14 Richard Guenther <rguenther@suse.de>
2731
2732 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
2733 for DECL_LANG_SPECIFIC.
2734
27352009-08-13 Richard Guenther <rguenther@suse.de>
2736
2737 PR lto/41032
2738 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
2739
27402009-07-30 Richard Guenther <rguenther@suse.de>
2741
2742 PR lto/40903
2743 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
2744 the largest decl for output and free TREE_CHAIN for further
2745 use.
2746
27472009-07-24 Diego Novillo <dnovillo@google.com>
2748
2749 * Make-lang.in: Add empty lto.install-plugin target.
2750
27512009-07-13 Diego Novillo <dnovillo@google.com>
2752
2753 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
2754
27552009-07-11 Richard Guenther <rguenther@suse.de>
2756
2757 * lto-lang.c (lto_write_globals): Wrapup global decls.
2758
27592009-07-10 Richard Guenther <rguenther@suse.de>
2760
2761 * lto-lang.c (lto_init): Allocate one more location to make
2762 BUILTINS_LOCATION correct.
2763
27642009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2765
2766 * lto.c (free_section_data): Cast computed_offset to caddr_t.
2767
27682009-07-06 Diego Novillo <dnovillo@google.com>
2769
2770 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
2771 TYPE_SIZE_UNIT.
2772
27732009-07-06 Diego Novillo <dnovillo@google.com>
2774
2775 * lto.c (preload_common_nodes): Remove.
2776 (lto_read_in_decl_state): Call lto_streamer_cache_get.
2777 (lto_read_decls): Call lto_data_in_create and
2778 lto_data_in_delete.
2779 (free_decl): Do not call ggc_free.
2780 (lto_main): Call lto_init_reader.
2781 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
2782 (lto_init): Initialize main_identifier_node if needed.
2783 Make ptrdiff_type_node be integer_type_node.
2784
27852009-06-19 Diego Novillo <dnovillo@google.com>
2786
2787 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
2788 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
2789 Remove code guarded by #ifdef LOCAL_TRACE.
2790
27912009-06-18 Diego Novillo <dnovillo@google.com>
2792
2793 * lto.c: Update license to GPLv3.
2794 * lto-elf.c: Likewise.
2795 * common.c: Likewise.
2796 * lto-lang.c: Likewise.
2797 * lto.h: Remove superfluous include files. Update all
2798 users.
2799
28002009-06-17 Diego Novillo <dnovillo@google.com>
2801
2802 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
2803
28042009-06-02 Diego Novillo <dnovillo@google.com>
2805
2806 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
2807 read in.
2808 (materialize_cgraph): Only materialize nodes that have a
2809 representation on file.
2810
28112009-06-01 Diego Novillo <dnovillo@google.com>
2812
2813 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
2814
28152009-05-31 Diego Novillo <dnovillo@google.com>
2816
2817 * lto-lang.c (lto_type_for_mode): Handle all the modes
2818 handled in c_common_type_for_mode.
2819
28202009-05-21 Diego Novillo <dnovillo@google.com>
2821
2822 * lto-elf.c: Always include <gelf.h>.
2823 * config-lang.in (target_libs): Remove.
2824 (build_by_default): Set to no.
2825
28262009-05-15 Diego Novillo <dnovillo@google.com>
2827
2828 * lto.c (lto_materialize_function): Assert that DECL is
2829 not a builtin.
2830 (materialize_cgraph): Don't try to materialize builtin
2831 functions.
2832 * lto-section-out.c (write_symbol_vec): Do not write
2833 builtin functions.
2834
28352009-05-13 Diego Novillo <dnovillo@google.com>
2836
2837 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
2838
28392009-05-07 Diego Novillo <dnovillo@google.com>
2840
2841 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
2842 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
2843 (lto_fixup_type): Call it for TYPE_POINTER_TO,
2844 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
2845 (lto_fixup_tree): Call gimple_register_type when *TP is a
2846 type.
2847 (lto_main): Call bitmap_obstack_initialize.
2848
28492009-04-22 Diego Novillo <dnovillo@google.com>
2850
2851 * lto.c (free_section_data): Tidy.
2852 (lto_1_to_1_map): Tidy.
2853 (lto_add_all_inlinees): Tidy.
2854 (prefix_name_with_star): New.
2855 (get_filename_for_set): New.
2856 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
2857 to determine what cgraph node sets to write.
2858 Call get_filename_for_set to compute temporary file
2859 names.
2860 (lto_execute_ltrans): Do not execute LTRANS on files with
2861 names that start with '*'.
2862 Move logic to execute LTRANS together so that LTRANS is
2863 invoked only if there are any files to compile.
2864 (do_whole_program_analysis): Only remove output files
2865 that do not start with '*'.
2866
28672009-04-06 Diego Novillo <dnovillo@google.com>
2868
2869 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
2870 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
2871 (lto_add_all_inlinees): Tidy.
2872
28732009-03-26 Diego Novillo <dnovillo@google.com>
2874
2875 * lto.c: Include gimple.h.
2876 (lto_read_in_decl_state): Call gimple_register_type for
2877 every type in every stream.
2878 (lto_fixup_common): Call gimple_register_type if T has a
2879 type.
2880 (do_whole_program_analysis): Call print_lto_report.
2881 (lto_main): Call print_lto_report after cgraph_optimize.
2882 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
2883
28842009-03-24 Diego Novillo <dnovillo@google.com>
2885
2886 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
2887 (lto.o): Add dependency on GIMPLE_H.
2888
28892009-03-10 Simon Baldwin <simonb@google.com>
2890
2891 * lto.c (lto_read_all_file_options): Close any open file descriptor
2892 contained in file_data before freeing.
2893
28942009-02-24 Rafael Avila de Espindola <espindola@google.com>
2895
2896 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2897 for a decl in the original bitmap, not a node.
2898 (lto_add_all_inlinees): Remove original nodes that are not needed.
2899 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2900
29012009-02-24 Diego Novillo <dnovillo@google.com>
2902
2903 * lto.c (lto_materialize_function): Update
2904 lto_stats.num_function_bodies.
2905 (get_section_data): Initialize *LEN to 0.
2906 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
2907 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
2908 Update lto_stats.num_output_files.
2909 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
2910 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
2911 (lto_main): Initialize lto_stats.
2912 If flag_lto_report is set, call print_lto_report.
2913
29142009-02-19 Diego Novillo <dnovillo@google.com>
2915
2916 Revert
2917
2918 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
2919
2920 * lto.c (lto_add_inline_clones): Don't add the
2921 master clone. Check for a decl in the original
2922 bitmap, not a node.
2923 (lto_add_all_inlinees): Remove original nodes
2924 that are not needed.
2925 (lto_scan_statics_in_cgraph_node): Don't care if
2926 the node is the master.
2927 (lto_promote_cross_file_statics): Use a new
2928 context.seen_node_decls for each set
2929
29302009-02-19 Rafael Avila de Espindola <espindola@google.com>
2931
2932 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2933 for a decl in the original bitmap, not a node.
2934 (lto_add_all_inlinees): Remove original nodes that are not needed.
2935 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2936 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
2937 for each set
2938
29392009-02-18 Diego Novillo <dnovillo@google.com>
2940
2941 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
2942 and TV_WHOPR_WPA_IO.
2943 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
2944 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
2945 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
2946 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
2947 depending on command line flags.
2948 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
2949 (lto_main): Remove timer uses.
2950
29512009-02-18 Rafael Avila de Espindola <espindola@google.com>
2952
2953 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
2954 (lto_wpa_write_files): Update calls to renamed functions.
2955
29562009-02-17 Diego Novillo <dnovillo@google.com>
2957
2958 PR 39203
2959 * lto-lang.c (lto_post_options): Disable -fwhole-program
2960 when running LTRANS.
2961
29622009-02-10 Diego Novillo <dnovillo@google.com>
2963
2964 * lto.c (read_cgraph_and_symbols): Fix comment.
2965
29662009-02-10 Diego Novillo <dnovillo@google.com>
2967
2968 * lto.c (read_cgraph_and_symbols): Read options from all
2969 IL files.
2970
29712009-02-10 Diego Novillo <dnovillo@google.com>
2972
2973 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
2974 (materialize_cgraph): Likewise.
2975 (do_whole_program_analysis): Likewise.
2976 (lto_main): Call read_cgraph_and_symbols,
2977 materialize_cgraph and do_whole_program_analysis.
2978
29792009-02-10 Simon Baldwin <simonb@google.com>
2980
2981 * lto.c: Include lto-opts.h.
2982 * (lto_main): Clear file options at loop start, read any saved
2983 options from the first file handled, and re-issue options.
2984 * Makefile.in (lto.o): Add dependency on lto-opts.h.
2985
29862009-02-02 Diego Novillo <dnovillo@google.com>
2987
2988 * lto.c (lto_main): Stop LTO_TIMER and use
2989 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
2990
29912009-01-30 H.J. Lu <hongjiu.lu@intel.com>
2992
2993 PR lto/38995
2994 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
2995 to POINTER_SIZE.
2996
29972009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
2998
2999 * Make-lang.in (LTO_EXE): Link with all
3000 BACKENDLIBS and not only GMPLIBS
3001
30022009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3003
3004 PR bootstrap/38992
3005 * lto-elf.c: Include gelf.h instead of libelf.h.
3006 (lto_elf_file_close): Replace elfx_update_shstrndx with
3007 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3008 gelf_update_ehdr.
3009
30102009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3011
3012 PR middle-end/38996
3013 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3014
30152009-01-26 Diego Novillo <dnovillo@google.com>
3016
3017 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3018
30192009-01-26 Diego Novillo <dnovillo@google.com>
3020
3021 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3022 and rename into gimple_types_compatible_p.
3023
30242009-01-12 Rafael Avila de Espindola <espindola@google.com>
3025
3026 * lto-lang.c (lang_hooks): Remove the const qualifier.
3027
30282009-01-06 Diego Novillo <dnovillo@google.com>
3029
3030 * ltrans-driver: Mark 'all' target as phony.
3031
30322008-12-31 Diego Novillo <dnovillo@google.com>
3033
3034 * ltrans-driver: Execute a NOP action for target 'all'.
3035
30362008-12-19 Diego Novillo <dnovillo@google.com>
3037
3038 * lto.c (lto_1_to_1_map): Tidy.
3039
30402008-12-19 Diego Novillo <dnovillo@google.com>
3041
3042 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3043 be opened, show its name.
3044 * ltrans-driver: If $verbose is set, do not use parallelism.
3045
30462008-12-17 Rafael Avila de Espindola <espindola@google.com>
3047
3048 * lto.c (lto_fixup_function): New.
3049 (lto_fixup_tree): Call lto_fixup_function.
3050
30512008-12-14 Doug Kwan <dougkwan@google.com>
3052
3053 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3054 variables if there is no function.
3055
30562008-12-10 Simon Baldwin <simonb@google.com>
3057
3058 * ltrans-driver: Always run make in silent mode, to avoid make's
3059 trace on stdout interfering with lto-wrapper output.
3060
30612008-12-10 Doug Kwan <dougkwan@google.com>
3062
3063 * lto.c (lto_add_inline_clones): Do not force master clones of
3064 inlined functions already in SET to be static inline.
3065
30662008-12-04 Doug Kwan <dougkwan@google.com>
3067
3068 * lto.c (globalize_context_t): New type to store states in
3069 globalization of cross-file statics.
3070 (globalize_cross_file_statics): New.
3071 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3072 static decls that need to be fixed up.
3073 (lto_scan_statics_in_cgraph_node): Change call interface to use
3074 a globalize_context_t CONTEXT for all states used.
3075 (lto_scan_statics_in_remaining_global_vars): New.
3076 (lto_promote_cross_file_statics): Use new call interface of
3077 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3078 visible vars in the last set.
3079
30802008-12-03 Diego Novillo <dnovillo@google.com>
3081
3082 * lto.c (lto_fixup_tree): Do not emit an error when
3083 PREVAILING throw but T doesn't.
3084
30852008-12-02 Doug Kwan <dougkwan@google.com>
3086
3087 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3088 from code in ...
3089 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3090 variables and functions.
3091 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3092 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3093
30942008-11-29 Diego Novillo <dnovillo@google.com>
3095
3096 * lto.c: Include timevar.h.
3097 (lto_materialize_function): Tidy. Add comments.
3098 (lto_wpa_write_files): Tidy.
3099 (lto_execute_ltrans): Tidy.
3100 (lto_main): Add local variable LTO_TIMER. Initialize it
3101 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3102 Start and stop the timer.
3103 Tidy comments.
3104 * Make-lang.in (lto.o): Add dependency on timevar.h.
3105 * ltrans-driver: React to -v and -save-temps.
3106 Use simple heuristic to determine how much parallelism to
3107 use when executing make.
3108
31092008-11-12 Doug Kwan <dougkwan@google.com>
3110
3111 * lto.c (lto_bitmap_obstack): Remove var.
3112 (lto_materialize_function): Do nothing instead of marking function
3113 body in file if flag_wpa is true.
3114 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3115 (lto_scan_statics_in_cgraph_node): New function.
3116 (lto_promote_cross_file_statics): Same.
3117 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3118 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3119 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3120
31212008-11-09 Diego Novillo <dnovillo@google.com>
3122
3123 * lto/lto.c (lto_fixup_tree): Change error message locus
3124 information to include location of mismatching
3125 declaration.
3126 Use TREE_NO_WARNING to avoid repeated messages.
3127 (lto_main): If lto_fixup_decls emitted any errors, exit.
3128 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3129 (lto_init_options): Don't enable exceptions by default.
3130 (lto_eh_runtime_type): Move to lto-function-in.c
3131 (lto_init_eh): Likewise.
3132 (lto_init): Don't call lto_init_eh.
3133 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3134 libfuncs.h and except.h.
3135
31362008-10-30 Diego Novillo <dnovillo@google.com>
3137
3138 * lto.c (lto_read_decls): Declare debug_main only if
3139 LTO_STREAM_DEBUGGING is enabled.
3140
31412008-10-30 Simon Baldwin <simonb@google.com>
3142
3143 * lto.c (lto_wpa_write_files): Create intermediate files with
3144 make_cwd_temp_file().
3145 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3146 WPA_SAVE_LTRANS is set.
3147 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3148 * ltrans-driver: Do not strip directory from output files.
3149
31502008-10-29 Doug Kwan <dougkwan@google.com>
3151
3152 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3153 DECL.
3154 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3155 (lto/lto-symtab.o): Remove rule.
3156 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3157 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3158 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3159 Remove macros.
3160 lto-symtab.c (File): Move up one level.
3161 lto-lang.c (cgraph.h): Remove include.
3162 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3163 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3164 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3165
31662008-10-24 Rafael Espindola <espindola@google.com>
3167
3168 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3169 non prevailing weak symbols.
3170
31712008-10-24 Rafael Espindola <espindola@google.com>
3172
3173 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3174
31752008-10-24 Rafael Espindola <espindola@google.com>
3176
3177 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3178 different types.
3179
31802008-10-23 Simon Baldwin <simonb@google.com>
3181
3182 * lto-lang.c (input_node): Save the node reference, rather than the
3183 node pointer, in node->inlined_to.
3184 (input_cgraph_1): Convert node references into node pointers.
3185
31862008-10-22 Diego Novillo <dnovillo@google.com>
3187 Rafael Espindola <espindola@google.com>
3188
3189 * lto.c (lto_resolution_read): Tidy.
3190 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3191 abort if RET is NULL.
3192
31932008-10-22 Doug Kwan <dougkwan@google.com>
3194
3195 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3196 exceptions flag is given.
3197 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3198 (lto_init_eh): Remove exceptions flag initialization.
3199 (lto_init): Only call lto_init_eh if exceptions flag is set.
3200
32012008-10-21 Diego Novillo <dnovillo@google.com>
3202
3203 * lto.c: Tidy some formatting.
3204 * lto.h: Likewise.
3205
32062008-10-21 Simon Baldwin <simonb@google.com>
3207
3208 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3209 them is NULL (but not the other).
3210
32112008-10-17 Diego Novillo <dnovillo@google.com>
3212
3213 * ltrans-driver: Divert output from make to a temporary file.
3214 Show it if the call to make failed.
3215
32162008-10-15 Diego Novillo <dnovillo@google.com>
3217
3218 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3219 Do not print TEMP_FILENAME
3220 * ltrans-driver: Call make with -s.
3221
32222008-10-15 Diego Novillo <dnovillo@google.com>
3223
3224 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3225 TREE_STATIC on global symbols.
3226
32272008-10-14 Ollie Wild <aaw@google.com>
3228
3229 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3230 (LTRANS_DRIVER_EXE): Add.
3231 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3232 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3233 (lto.install.common): Remove ltrans-driver.
3234 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3235 (LTRANS_DRIVER_EXE): New build rule.
3236 * config-lang.in (compilers): Add ltrans-driver.
3237
32382008-10-14 Diego Novillo <dnovillo@google.com>
3239
3240 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3241 of program name.
3242
32432008-10-13 Ollie Wild <aaw@google.com>
3244
3245 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3246 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3247 * ltrans-driver (LTRANS_FLAGS): Remove.
3248
32492008-10-08 Doug Kwan <dougkwan@google.com>
3250
3251 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3252 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3253 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3254 from lto_fixup_state to here.
3255 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3256 just a free-list. Fix up types also. Move decl merging code to
3257 lto_fixup_tree.
3258 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3259 object.
3260 (lto_fixup_decls): Use another pointer set to avoid multiple
3261 walking of nodes except for DECLs to be replaced. Pass an
3262 lto_fixup_data_t object to tree-walker.
3263
32642008-10-08 Rafael Espindola <espindola@google.com>
3265
3266 * lto-symtab.c (lto_symtab_set_resolution): New.
3267 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3268 lto_symtab_get_resolution.
3269 (lto_symtab_prevailing_decl): Return decl for non public decls.
3270 (lto_symtab_get_resolution): New.
3271 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3272
32732008-10-06 Rafael Espindola <espindola@google.com>
3274
3275 * lto-lang.c: Include cgraph.h.
3276 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3277 input_cgraph): Moved from lto-cgraph.c.
3278 (LANG_HOOKS_INPUT_CGRAPH): New.
3279
32802008-10-03 Rafael Espindola <espindola@google.com>
3281
3282 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3283
32842008-10-03 Rafael Espindola <espindola@google.com>
3285
3286 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3287 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3288 prevailing definition. Don't mark TREE_NOTHROW differences.
3289 * lto.c (lto_fixup_tree): New.
3290 (lto_fixup_state): New.
3291 (lto_fixup_state_aux): New.
3292 (free_decl): New.
3293 (lto_fixup_decls): New.
3294 (lto_main): Call lto_fixup_decls.
3295
32962008-10-02 Ollie Wild <aaw@google.com>
3297
3298 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3299 and Init.
3300 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3301 * lto-lang.c (lto_post_options): Add validation and fixups for
3302 -fltrans and -fwpa.
3303
33042008-10-02 Rafael Espindola <espindola@google.com>
3305
3306 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3307 lto_symtab_merge_decl): Return void.
3308 (lto_symtab_prevailing_decl): New.
3309
33102008-09-30 Rafael Espindola <espindola@google.com>
3311
3312 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3313 defined symbols.
3314 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3315 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3316 Check for already defined symbols.
3317 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3318 (LTO_IDENTIFIER_RESOLUTION): Remove.
3319 (LTO_DECL_RESOLUTION): New.
3320
33212008-09-30 Rafael Espindola <espindola@google.com>
3322
3323 * lto.c (lto_read_decls): Use new input_tree signature.
3324
33252008-09-26 Doug Kwan <dougkwan@google.com>
3326
3327 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3328 bodies affected by exception attribute merging of DECLs.
3329 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3330 merging.
3331
33322008-09-25 Rafael Espindola <espindola@google.com>
3333
3334 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3335 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3336 * lto-symtab.c (lto_symtab_compatible): New.
3337 (lto_symtab_overwrite_decl): New.
3338 (lto_symtab_merge_decl): Refactor to use the above functions
3339 and the resolution from lang_identifier.
3340 * lto-tree.h: Include plugin-api.h.
3341 (lang_identifier): Add resolution.
3342 (LTO_IDENTIFIER_RESOLUTION): New.
3343
33442008-09-25 Ollie Wild <aaw@google.com>
3345
3346 * lang.opt (fltrans-output-list=): New option.
3347 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3348
33492008-09-25 Rafael Espindola <espindola@google.com>
3350
3351 * lto.c (lto_resolution_read): Initialize ret;
3352
33532008-09-24 Ollie Wild <aaw@google.com>
3354
3355 * lto.c (sys/mman.h): Move include.
3356 (lto_wpa_write_files): Return a list of written files.
3357 (lto_execute_ltrans): New function.
3358 (lto_main): Call lto_execute_ltrans.
3359 (ltrans-driver): New file.
3360 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3361 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3362 (lto_init_options): Initialize ltrans_driver.
3363 (lto_handle_option): Fix incorrect default output value.
3364 * lang.opt (fltrans-driver=): New option.
3365 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3366 (lto.install-common): Add lto/ltrans-driver.
3367
33682008-09-24 Rafael Espindola <espindola@google.com>
3369
3370 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3371 (lto/lto.o): Depend on lto/common.h.
3372 (lto/common.o): New.
3373 * lang.opt (resolution): New.
3374 * lto-lang.c (resolution_file_name): New.
3375 (lto_handle_option): Handle OPT_resolution.
3376 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3377 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3378 pass it to lto_symtab_merge_decl.
3379 * lto.c: Include common.h.
3380 (lto_read_decls): Add resolutions and resolutions_size arguments.
3381 Initialize data_in.globals_resolution and
3382 data_in.globals_resolution_size.
3383 (index_and_symbol_resolution): New.
3384 (lto_resolution_read): New.
3385 (lto_file_read): Add argument resolution_file.
3386 Read resolution.
3387 * lto.h (resolution_file_name): New.
3388
33892008-09-23 Rafael Espindola <espindola@google.com>
3390
3391 * common.c: Update description.
3392 * common.h: Update description.
3393
33942008-09-23 Rafael Espindola <espindola@google.com>
3395
3396 * common.c: Moved from lto-plugin.
3397 * common.h: Moved from lto-plugin.
3398
33992008-09-22 Doug Kwan <dougkwan@google.com>
3400
3401 * lto.c (VEC(bitmap,heap)): Declare.
3402 (lto_materialize_function): Handle WAP mode specially.
3403 (lto_add_inline_clones): New.
3404 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3405 return a bitmap of inlined decls.
3406 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3407 (lto_main): Call reset_inline_failed to reset inlining states.
3408 Check call-graph after WPA inlining.
3409 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3410 unconditionally.
3411
34122008-09-19 Doug Kwan <dougkwan@google.com>
3413
3414 lto.c (lto_main): Remove unsued wrapper code.
3415 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3416
34172008-09-19 Rafael Espindola <espindola@google.com>
3418
3419 * lto-symtab.c: Include lto-tree-in.h.
3420 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3421 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3422 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3423
34242008-09-17 Paolo Bonzini <bonzini@gnu.org>
3425 Rafael Avila de Espindola <espindola@google.com>
3426
3427 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3428 COMPOUND_LITERAL_EXPR_DECL): Remove.
3429 (emit_local_var): Remove.
3430 (lto_expand_expr): Remove.
3431 (lto_staticp): Remove.
3432 (LANG_HOOKS_EXPAND_EXPR): Remove.
3433 (LANG_HOOKS_STATICP): Remove.
3434
34352008-09-11 Diego Novillo <dnovillo@google.com>
3436
3437 * lto-lang.c: Include except.h and libfuncs.h.
3438 (lto_init_eh): New.
3439 (lto_init): Call it.
3440 Set flag_generate_lto to 0.
3441 * Make-lang.in (lto-lang.o): Add dependency on except.h
3442 and libfuncs.h.
3443
34442008-09-09 Bill Maddox <maddox@google.com>
3445
3446 * lto-lang.c: Include header file expr.h.
3447 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3448 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3449 (emit_local_var): Copied from c-semantics.c.
3450 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3451 and c_staticp in c-common.c.
3452 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3453
34542008-09-08 Diego Novillo <dnovillo@google.com>
3455
3456 * lto-lang.c (lto_global_bindings_p): Return 1 during
3457 IPA passes.
3458
34592008-09-07 Diego Novillo <dnovillo@google.com>
3460
3461 * lto.c: Tidy formatting.
3462
34632008-08-04 Bill Maddox <maddox@google.com>
3464
3465 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3466
34672008-09-03 Doug Kwan <dougkwan@google.com>
3468
3469 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3470 CIF_OK instead of NULL.
3471
34722008-09-02 Diego Novillo <dnovillo@google.com>
3473 Simon Baldwin <simonb@google.com>
3474
3475 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3476 c_common_type_for_size.
3477 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3478 (lto_init): Call linemap_add.
3479 (signed_and_unsigned_types): Remove.
3480
34812008-08-29 Diego Novillo <dnovillo@google.com>
3482
3483 * lto-lang.c (handle_noreturn_attribute): New local function.
3484 (handle_const_attribute): New local function.
3485 (handle_malloc_attribute): New local function.
3486 (handle_pure_attribute): New local function.
3487 (handle_novops_attribute): New local function.
3488 (handle_nonnull_attribute): New local function.
3489 (handle_nothrow_attribute): New local function.
3490 (handle_sentinel_attribute): New local function.
3491 (handle_type_generic_attribute): New local function.
3492 (handle_format_attribute): New local function.
3493 (handle_format_arg_attribute): New local function.
3494 (lto_attribute_table): Declare.
3495 (lto_format_attribute_table): Declare.
3496 (lto_init_attributes): New local function.
3497 (lto_define_builtins): Call it.
3498 Call targetm.init_builtins and build_common_builtin_nodes.
3499 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3500 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3501
35022008-08-28 Diego Novillo <dnovillo@google.com>
3503
3504 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3505 $(GIMPLE_H).
3506 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3507 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3508 * lto-symtab.c: Include gimple.h.
3509 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3510 TREE_CHAIN.
3511
35122008-08-27 Doug Kwan <dougkwan@google.com>
3513
3514 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3515 gt-lto-lto.h): New includes.
3516 (lto_materialize_function): Do not read in function body in WPA mode.
3517 Format a line to fit in 80 columns.
3518 (lto_cgraph_node_sets): New garbage collected variable.
3519 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3520 New functions.
3521 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3522 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3523 variable LTO_SECTION_IN_H.
3524 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3525 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3526 with variable LTO_SECTION_IN_H.
3527 * config-lang.in (gtfiles): Add lto/lto.c.
3528 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3529 merged DECL_RESULT correctly.
3530
35312008-08-26 Bill Maddox <maddox@google.com>
3532
3533 * lto-lang.c Include tree-gimple.h.
3534 (lto_mark_addressable): Call mark_addressable rather than
3535 asserting.
3536 (lto_post_options): Suppress debug info generation.
3537 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3538
35392008-08-25 Bill Maddox <maddox@google.com>
3540
3541 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3542 assertion and leave an explanatory comment in its place.
3543
35442008-08-21 Doug Kwan <dougkwan@google.com>
3545
3546 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3547 of common nodes instead of computing locallly.
3548 (lto_read_in_decl_state): New.
3549 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3550 Read global and per-function in-decl states.
3551 * Make-lang.in (LTO_H): Update dependency.
3552 (lto/lto.o): Same.
3553 (lto-symtab.c): Merge (revision 139039)
3554 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3555
35562008-08-21 Rafael Espindola <espindola@google.com>
3557
3558 * config-lang.in (target_libs): New.
3559
35602008-08-20 Bill Maddox <maddox@google.com>
3561
3562 * lto.c (current_lto_file): Remove GTY marker from static
3563 variable. Remove include of file gt-lto-lto.h.
3564 * Make-lang.in: Remove dependency of lto/lto.o on
3565 gt-lto-lto.h.
3566 * lto-elf.c (lto_file_close): Removed.
3567 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3568 allocate lto_elf_file object.
3569 (lto_elf_file_close): Free lto_elf_file object after close.
3570 * lto.h (struct lto_file_struct): Remove GTY marker.
3571 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3572 gtfiles.
3573
35742008-08-20 Bill Maddox <maddox@google.com>
3575
3576 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3577 to conform to its new signature.
3578 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3579 on discarded node here, now called in global_vector_fixup.
3580
35812008-08-09 Bill Maddox <maddox@google.com>
3582
3583 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3584 has not been set to a front-end-specific value.
3585
35862008-08-05 Doug Kwan <dougkwan@google.com>
3587
3588 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3589 build breakage.
3590
35912008-07-30 Bill Maddox <maddox@google.com>
3592
3593 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3594 Remove obsolete comments.
3595 (lto_read_decls): Remove initialization of deleted field data_in.global.
3596 Tidy up comments.
3597 (lto_main): Remove redundant initialization of section_hash_table.
3598 * lto-elf.c: Removed obsolete comments.
3599 * lto.h: Tidy up comments.
3600 * lto-symtab.c (lto_least_common_multiple): New function.
3601 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3602 Tidy up comments.
3603
36042008-07-25 Diego Novillo <dnovillo@google.com>
3605 Bill Maddox <maddox@google.com>
3606
3607 * lto.c: Re-order include files.
3608 Include lto-section-out.h.
3609 (preload_common_nodes): Add debugging output.
3610 Add new local INDEX_TABLE.
3611 Call preload_common_node.
3612 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3613
36142008-07-13 Bill Maddox <maddox@google.com>
3615
3616 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3617 unwanted scaling during pointer addition.
3618
36192008-07-11 Bill Maddox <maddox@google.com>
3620 Diego Novillo <dnovillo@google.com>
3621
3622 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3623 Make code const-correct.
3624 (lto_file_read): Fix C++ compatibility warnings.
3625 (lto_read_section_data): Fix C++ compatibility warnings.
3626 (lto_get_section_data): Use CONST_CAST to avoid warning when
3627 const pointer passed to free.
3628 * lto-elf.c (lto_elf_build_section_table): Fix C++
3629 compatibility warnings.
3630 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3631 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3632 (lto_get_current_out_file): Fix C++ compatibility warnings.
3633
36342008-07-11 Diego Novillo <dnovillo@google.com>
3635
3636 * Make-lang.in (lto-warn): Define.
3637
36382008-07-03 Simon Baldwin <simonb@google.com>
3639
3640 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3641 LTO_STREAM_DEBUGGING.
3642
36432008-06-27 Ollie Wild <aaw@google.com>
3644
3645 * lto-elf.c (lto-section-out.h): New include.
3646 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3647 and data members.
3648 (cached_file_attrs): New static variable.
3649 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3650 Use cached_file_attrs for checking bits.
3651 (lto_elf_build_section_table): Remove elf_file argument from
3652 lto_elf_get_shdr and lto_elf_free_shdr calls.
3653 (DEFINE_INIT_SHDR): New macro.
3654 (init_shdr32, init_shdr64): New functions defined via the
3655 DEFINE_INIT_SHDR macro.
3656 (lto_elf_begin_section_with_type): New function.
3657 (lto_elf_begin_section): New function.
3658 (lto_elf_append_data): New function.
3659 (lto_elf_end_section): New function.
3660 (DEFINE_VALIDATE_EHDR): New macro.
3661 (validate_ehdr32, validate_ehdr64): New functions defined via the
3662 DEFINE_VALIDATE_EHDR macro.
3663 (validate_file): New function.
3664 (DEFINE_INIT_EHDR): New macro.
3665 (init_ehdr32, init_ehdr64): New functions defined via the
3666 DEFINE_INIT_EHDR macro.
3667 (init_ehdr): New function.
3668 (lto_elf_file_open): Add support for writable files. Move some
3669 validation logic to validate_file.
3670 (lto_elf_file_close): Add support for writable files. Write file data
3671 and free data blocks.
3672 (current_out_file): New static variable.
3673 (lto_set_current_out_file): New function.
3674 (lto_get_current_out_file): New function.
3675 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3676 Add temporary initialization for testing ELF serialization.
3677 * lto.h (lto-section-out.h): New include.
3678 (struct lto_file_struct): Slight modification to comment.
3679 (lto_elf_file_open): Add writable parameter.
3680 (lto_elf_begin_section): New function declaration.
3681 (lto_elf_append_data): New function declaration.
3682 (lto_elf_end_section): New function declaration.
3683 (lto_set_current_out_file, lto_get_current_out_file): New function
3684 declarations.
3685 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3686 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3687 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3688 * Make-lang.in (LTO_H): Add lto-section-out.h.
3689
36902008-06-12 Ollie Wild <aaw@google.com>
3691
3692 * lto.h (struct lto_file_vtable_struct): Remove.
3693 (struct lto_file_struct): Remove vtable member.
3694 * lto-elf.c (lto_file_init): Remove vtable argument.
3695 (lto_elf_map_optional_lto_section): Remove.
3696 (lto_elf_unmap_section): Remove.
3697 (lto_elf_file_vtable): Remove.
3698 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3699 lto_file_init call.
3700 (lto_elf_find_section_data): Remove.
3701
37022008-06-11 Ollie Wild <aaw@google.com>
3703
3704 * lto.c (lto_file_read): Add const qualifier to data variable.
3705
37062008-06-11 Diego Novillo <dnovillo@google.com>
3707
3708 Merge from lto-streamber sub-branch.
3709
3710 2008-06-04 Ollie Wild <aaw@google.com>
3711
3712 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
3713 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
3714
3715 2008-05-28 Bill Maddox <maddox@google.com>
3716
3717 Replace the DWARF reader in the LTO front-end.
3718
3719 * lto.c: Include lto-tree-in.h, lto-tags.h.
3720 (enum DWARF2_class, DW_cl_constant, struct
3721 DWARF2_form_data, struct lto_context,
3722 lto_fd_init, lto_info_fd_init,
3723 lto_abbrev_fd_init, lto_info_fd_close,
3724 lto_file_init, lto_file_close,
3725 lto_file_corrupt_error, lto_abi_mismatch_error,
3726 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
3727 lto_read_uleb128, lto_read_sleb128,
3728 lto_read_initial_length, lto_abbrev_read_attrs,
3729 lto_abbrev_read, lto_abbrev_read_lookup,
3730 lto_read_section_offset,
3731 lto_read_comp_unit_header, find_cu_for_offset,
3732 lto_get_file_name,
3733 lto_resolve_reference,lto_read_form,
3734 attribute_value_as_int,
3735 make_signed_host_wide_int,
3736 attribute_value_as_constant, lto_cache_hash,
3737 lto_cache_eq, lto_cache_store_DIE,
3738 lto_cache_lookup_DIE, lto_find_integral_type,
3739 lto_find_integral_type_1,
3740 LTO_BEGIN_READ_ATTRS_UNCHECKED,
3741 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
3742 lto_unsupported_attr_error, lto_get_identifier,
3743 lto_read_referenced_type_DIE,
3744 lto_read_compile_unit_DIE,
3745 lto_read_array_type_DIE,
3746 lto_read_structure_union_class_type_DIE,
3747 lto_read_enumerator_DIE,
3748 lto_read_enumeration_type_DIE,
3749 lto_read_only_for_child_DIEs,
3750 lto_read_only_for_child_DIEs,
3751 lto_read_member_DIE, lto_read_abbrev,
3752 lto_read_variable_formal_parameter_constant_DIE,
3753 lto_get_body): Removed.
3754 (preload_common_nodes): New function.
3755 (lto_read_decls): Convert for new global streamer.
3756 (lto_materialze_file_data,
3757 lto_read_subroutine_type_subprogram_die,
3758 lto_read_unspecified_parameters_DIE,
3759 lto_read_typedef_DIE,
3760 lto_read_pointer_reference_type_DIE,
3761 lto_read_subrange_type_DIE,
3762 lto_read_base_type_DIE,
3763 lto_read_const_volatile_restrict_type_DIE,
3764 lto_read_namespace_DIE,
3765 lto_read_unspecified_type_DIE, lto_read_DIE,
3766 lto_read_child_DIEs, lto_collect_child_DIEs):
3767 Removed.
3768 (lto_info_read, lto_set_cu_context): Removed.
3769 (lto_file_read): Convert for new global streamer.
3770 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
3771 lto_resolve_var_ref, lto_resolve_fn_ref,
3772 lto_resolve_field_ref, lto_resolve_typedecl_ref,
3773 lto_resolve_namespacedecl_ref): Removed.
3774 (lto_file_init, lto_file_close): Moved to lto-elf.c.
3775 * lto-tree.h (lto_symtab_merge_var,
3776 lto_symtab_mergee_fun): Declare here.
3777 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
3778 (lto_elf_file_open): Removed code to read DWARF debug sections.
3779 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
3780 DWARF2_CompUnit, lto_die_ptr,
3781 lto_die_cache_entry, lto_fd, lto_info_fd,
3782 lto_abbrev_fd): Removed.
3783 (lto_file): Removed debug_info and debug_abbrev fields.
3784 (lto_ref): Removed.
3785 (lto_file_init, lto_file_close,
3786 lto_resolve_type_ref, lto_resolve_var_ref,
3787 lto_resolve_fn_ref, lto_resolve_field_ref,
3788 lto_resolve_typedecl_ref,
3789 lto_resolve_namespacedecl_ref,
3790 lto_get_file_name): Removed declarations.
3791 (lto_symtab_merge_var, lto_symtab_merge_fn):
3792 Declarations moved to lto-tree.h.
3793 * lto-symtab.c (lto_compatible_attributes_p):
3794 Lobotomize this, as it barfs on "Hello, world!".
3795 * lto-section-out.c: Include lto-tree-out.h.
3796 (lto_hash_global_slot_node,
3797 lto_eq_global_slot_node, preload_common_nodes,
3798 write_global_stream, write_global_references):
3799 New functions.
3800 (produce_asm_for_decls): Convert for new global streamer.
3801 * lto-section-out.h (lto_hash_global_slot_node,
3802 lto_eq_global_slot_node): Declare.
3803
38042008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
3805 Jan Hubicka <jh@suse.cz>
3806
3807 * lto.c (sys/mman.h, tree-pass.h): New includes.
3808 (lto_materialize_constructors_and_inits,
3809 lto_materialize_function): Keeps length of section.
3810 (lto_materialize_cgraph): Removed.
3811 (lto_read_decls): Initialize fd field.
3812 (lto_file_read): Different return type and removed much code to
3813 lto_main.
3814 (page_mask): New variable.
3815 (lto_read_section_data, get_section_data, free_section_data): New
3816 functions.
3817 (lto_main): Now calls pass manager, sets the hooks so that the ipa
3818 passes can get the section data.
3819
38202008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
3821
3822 * lto.h (lto_read_decls): Made local.
3823 (lto_input_function_body, lto_input_constructors_and_inits,
3824 lto_input_cgraph): Declarations moved to lto-section-in.h.
3825 * lto-section-in.c: Moved to .. .
3826 * lto-cgraph-in.c: Ditto.
3827 * lto-section-in.h: Ditto.
3828 * lto-function-in.c: Ditto.
3829 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
3830 (lto_insert_block): Removed.
3831 (LANG_HOOKS_INSERT_BLOCK): Removed.
3832 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
3833 lto-section-in.o): Rules moved to lto/Makefile.in.
3834
3835
38362008-05-16 Ollie Wild <aaw@google.com>
3837
3838 * lto-lang.c (tree-inline.h): Include.
3839 (lto_post_options): New function.
3840 (LANG_HOOKS_POST_OPTIONS): Define.
3841 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
3842 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
3843
38442008-05-13 Diego Novillo <dnovillo@google.com>
3845
3846 * lto-function-in.c (input_ssa_names): Call
3847 make_ssa_name_fn instead of make_ssa_name.
3848
38492008-05-12 Diego Novillo <dnovillo@google.com>
3850
3851 * lto-cgraph-in.c (overwrite_node): Update references to
3852 inline summary fields.
3853 * lto-function-in.c (input_expr_operand): Do not handle
3854 STRUCT_FIELD_TAG.
3855
38562008-05-09 Ollie Wild <aaw@google.com>
3857
3858 * lang.opt: New file.
3859 * lto-lang.c (lto_init_options): New function.
3860 (lto_handle_option): New function.
3861 (lto_init): Move initialization of flag_unit_at_a_time to
3862 lto_init_options.
3863 (LANG_HOOKS_INIT_OPTIONS): Define.
3864 (LANG_HOOKS_HANDLE_OPTION): Define.
3865
38662008-04-29 Ollie Wild <aaw@google.com>
3867
3868 * lto.c (lto_read_namespace_DIE): New function.
3869 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
3870 NAMESPACE_DECL DIE's.
3871 (lto_resolve_namespacedecl_ref): New function.
3872 * lto.h (lto_resolve_namespacedecl_ref): New function.
3873 * lto-section-in.c (lto_read_decls): Read namespace declarations.
3874 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
3875 and num_namespace_decls.
3876 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
3877 * lto-lang.c (lto_init_ts): New function.
3878 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
3879
38802008-04-16 Ollie Wild <aaw@google.com>
3881
3882 * lto-function-in.c (input_type_ref): Updated function description.
3883
38842008-04-16 Ollie Wild <aaw@google.com>
3885
3886 * lto-function-in.c (input_type_ref_1): New function.
3887 (input_type_ref): Split into two functions.
3888 (input_function): Add support for type contexts.
3889
38902008-04-16 Ollie Wild <aaw@google.com>
3891
3892 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
3893 section name
3894
38952008-04-16 Ollie Wild <aaw@google.com>
3896
3897 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
3898 list of supported languages.
3899
39002008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
3901
3902 Merge with mainline @133491.
3903
39042008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
3905 Jan Hubicka <jh@suse.cz>
3906
3907 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
3908 fd->unmaterialized_fndecls.
3909 (lto_get_file_name, lto_materialize_cgraph): New function.
3910 (lto_materialize_constructors_and_inits,
3911 lto_materialize_function): Read info directly from elf file.
3912 (lto_file_read): Made local and initialize dictionary so that
3913 other lto sections can be read without reprocessing the elf file.
3914 (lto_main): Read all functions after all files have been processed
3915 for their types, globals and cgraph.
3916 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
3917 dependencies.
3918 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
3919 (hash_name, eq_name, lto_elf_build_section_table): New functions.
3920 (lto_elf_read_symtab): Removed function.
3921 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
3922 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
3923 (lto_file_read): Made local.
3924 (lto_get_file_name, lto_elf_build_section_table,
3925 lto_input_cgraph):
3926 New function.
3927 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
3928 New functions.
3929 (lto_read_decls): Get the file name.
3930 * lto-cgraph-in.c: New file.
3931 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
3932 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
3933 (input_labels): Fixed latent sizeof issue.
3934 (input_function): Build stmt array to set call sites into cgraph
3935 edges.
3936 (lto_read_body): Reset cfun->curr_properties.
3937 * lto_section_in.h (lto_section_slot): New structure.
3938 (section_hash_table.lto_file_decl_data): New field.
3939
3940
39412008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
3942
3943 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
3944 reconstruct static initializers.
3945 (lto_get_body, lto_materialize_function): Add lto_section_type as
3946 a parameter.
3947 (lto_materialize_constructors_and_inits,
3948 lto_materialize_file_data): New function.
3949 (lto_materialize_function,
3950 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
3951 unmap_section and map_fn_body to map_section.
3952 (lto_set_cu_context): Process functions and static inits
3953 differently.
3954 * Make-lang.in (LTO_H, lto/lto-function-in.o,
3955 lto/lto-section-in.o): Update dependencies.
3956 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
3957 lto_section_type parameter.
3958 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
3959 * lto.h (lto_file_vtable_struct): Removed two of the fields and
3960 renamed the other two so that there is only one map function and
3961 one unmap function and each takes a section type parameter.
3962 (lto_read_function_body): Renamed to lto_input_function_body and
3963 added file_data parameter.
3964 (lto_read_var_init): Removed.
3965 (lto_input_constructors_and_inits): New function.
3966 * lto-section-in.c (lto_read_decls): New function.
3967 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
3968 var_decls, type_decls, types to lto_file_decl_data.
3969 (input_type_ref, input_expr_operand, lto_read_body): Get
3970 field_decls, fn_decls, var_decls, type_decls, types from different
3971 structure.
3972 (input_globals, input_constructor, lto_read_var_init): Removed.
3973 (input_constructors_or_inits): New function.
3974 (lto_read_function_body, lto_input_constructors_and_inits):
3975 Renamed to lto_input_function_body and takes file_data parameter.
3976 * lto-section-in.h (lto_file_decl_data): New structure.
3977
39782008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3979
3980 * lto-function-in.c (input_globals.c): Changed input type to
3981 lto_function_header.
3982 (input_bb): Removed code to deserialize the stmt number.
3983 (input_function): Renumber all stmts after they are input.
3984 (lto_read_body, lto_read_function_body, lto_read_var_init):
3985 Changed to used new header format and enum section_type.
3986 *lto-lang.c (success): Removed.
3987
39882008-01-28 Nathan Froyd <froydnj@codesourcery.com>
3989
3990 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
3991 (lto_elf_free_sym): Likewise.
3992
3993 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
3994 (lto_elf_build_init): Likewise.
3995
39962008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
3997
3998 * lto-read.c: Renamed to lto-function-in.c.
3999 (input_1_unsigned): Moved to lto-section-in.c and renamed
4000 lto_input_1_unsigned.
4001 (input_uleb128): Moved to lto-section-in.c and renamed
4002 lto_input_uleb128.
4003 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4004 lto_input_widest_uint_uleb128.
4005 (input_sleb128): Moved to lto-section-in.c and renamed
4006 lto_input_sleb128.
4007 (input_integer): Moved to lto-section-in.c and renamed
4008 lto_input_integer.
4009 (debug_in_fun): Moved to lto-section-in.c and renamed
4010 lto_debug_in_fun.
4011 (input_block): Moved to lto-section-in.h and renamed
4012 lto_input_block.
4013 (input_expr_operand): Fixed to allow lists with more than one
4014 element.
4015 * lto-section-in.h: New file.
4016 * lto-section-in.c: New file with changes from above.
4017 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4018 (lto-section-in.o): New rule.
4019
40202007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4021
4022 * lto-read.c (input_expr_operand): Mark static and external
4023 VAR_DECLs as needed.
4024
40252007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4026
4027 * lto-read.c (input_integer): Use the correct shift amount.
4028
40292007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4030
4031 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4032 (LANG_HOOKS_NAME): Define.
4033
40342007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4035
4036 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4037 original function to...
4038 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4039 don't have a base type.
4040 (lto_read_enumeration_type_DIE): Examine the values of the
4041 enumeration to determine whether we can use an unsigned type for
4042 the base type of the enumeration.
4043
40442007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4045
4046 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4047 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4048
40492007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4050
4051 * lto-lang.c (lto_types_compatible_p): New function.
4052 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4053
40542007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4055 Kenneth Zadeck <zadeck@naturalbridge.com>
4056
4057 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4058 (input_local_vars): Read in DECL_INITIAL and context for local
4059 statics that need to be put in unexpanded_vars_list.
4060
40612007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4062
4063 * lto-read.c (input_real): Use a separate null-terminated buffer
4064 for calling real_from_string.
4065 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4066 tell cgraph that it's needed.
4067
40682007-12-19 Doug Kwan <dougkwan@google.com>
4069
4070 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4071
40722007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4073
4074 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4075 (lto_file_read): Reset the members of 'context' every time we read
4076 a toplevel DIE, with special attention to last_param_type.
4077
40782007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4079
4080 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4081 'declaration'. Set the assembler name for non-public functions.
4082
40832007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
4084
4085 * lto_read.c (data_in.unexpanded_indexes): New array.
4086 (input_local_var): Added code to read in unexpanded_var_list
4087 indexes for variables. Only read in DECL_CHAIN field for
4088 parameters.
4089 (input_local_vars): Added code to rebuild unexpanded_var_list in
4090 order using unexpanded_indexes.
4091 (input_function): Added code to set DECL_CONTEXT for functions.
4092
40932007-12-13 Doug Kwan <dougkwan@google.com>
4094
4095 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4096 in pointer and reference types.
4097
40982007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4099
4100 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4101 RESULT_DECL.
4102
41032007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4104
4105 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4106 already read the DIE.
4107 (lto_get_body): New function, split out from...
4108 (lto_materialize_function): ...here. Call it.
4109 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4110 determine DECL_EXTERNAL.
4111 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4112 FUNCTION_DECLs when necessary. Use the type of the actual
4113 function definition if we are unable to easily merge types. Ignore
4114 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4115 necessary.
4116
41172007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4118
4119 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4120
41212007-12-12 Bill Maddox <maddox@google.com>
4122
4123 Revert
4124 2007-12-07 Bill Maddox <maddox@google.com>
4125
4126 * lto.c (lto_str_fd_init): New function.
4127 (lto_str_fd_close): New function.
4128 (lto_file_init): Call lto_str_fd_init.
4129 (lto_file_close): Call lto_str_fd_close.
4130 (lto_str_read): New function. Read debug string table.
4131 (lto_str_lookup): New function. Get string for debug
4132 string table offset.
4133 (lto_read_form): Recognize DW_FORM_strp.
4134 (lto_file_read): Invoke lto_str_read.
4135
4136 * lto-elf.c (lto_elf_file_open): Read raw section data
4137 for the .debug_str section, if present.
4138
4139 * lto.h (struct lto_str_fd_struct): New struct.
4140 (struct lto_file_struct): Added new field DEBUG_STR
4141 to hold the file descriptor for the debug string table.
4142
41432007-12-07 Bill Maddox <maddox@google.com>
4144
4145 * lto.c (lto_str_fd_init): New function.
4146 (lto_str_fd_close): New function.
4147 (lto_file_init): Call lto_str_fd_init.
4148 (lto_file_close): Call lto_str_fd_close.
4149 (lto_str_read): New function. Read debug string table.
4150 (lto_str_lookup): New function. Get string for debug
4151 string table offset.
4152 (lto_read_form): Recognize DW_FORM_strp.
4153 (lto_file_read): Invoke lto_str_read.
4154
4155 * lto-elf.c (lto_elf_file_open): Read raw section data
4156 for the .debug_str section, if present.
4157
4158 * lto.h (struct lto_str_fd_struct): New struct.
4159 (struct lto_file_struct): Added new field DEBUG_STR
4160 to hold the file descriptor for the debug string table.
4161
41622007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4163
4164 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4165 Grow the basic_block_info and label_to_block_map vectors if
4166 necessary. Read in the block chain.
4167
41682007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4169
4170 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4171
41722007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4173
4174 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4175
41762007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4177
4178 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4179 (lto_read_body): Don't declare PROP_alias.
4180
41812007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4182
4183 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4184 argument type information.
4185
41862007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4187
4188 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4189 TREE_THIS_VOLATILE if the associated type is a volatile type.
4190 (lto_materialize_function): Remove call to init_ssa_operands.
4191 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4192 variable when reading an SSA_NAME. Do the same when reading a
4193 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4194 (input_cfg): Call init_ssa_operands.
4195 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4196 Move call to init_tree_ssa...
4197 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4198 add_referenced_var on any variables referenced from the body of the
4199 function. Inform the rest of the compiler we are in SSA form and
4200 inform later passes about the current properties.
4201
42022007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4203
4204 * lto.c (lto_materialize_function): Add FIXME.
4205
42062007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4207
4208 * lto-lang.c (enum built_in_attribute): New enum.
4209 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4210 built_in_attributes): New variables.
4211 (def_builtin_1): New function.
4212 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4213
42142007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4215
4216 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4217 DECL_SOURCE_LOCATION for debugging purposes.
4218 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4219 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4220 laying out the decl until later.
4221 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4222 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4223 TREE_ADDRESSABLE.
4224 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4225 operand of an ADDR_EXPR.
4226 * lto-lang.c (enum lto_builtin_type): New enum.
4227 (builtin_type): New typedef.
4228 (builtin_types, string_type_node, const_string_type_node,
4229 wint_type_node, intmax_type_node, uintmax_type_node,
4230 signed_size_type_node): New variables.
4231 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4232 lto_build_c_type_nodes): New functions.
4233 (lto_init): Initialize builtin types.
4234 (lto_set_decl_assembler_name): Let the target machine mangle the
4235 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4236
42372007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4238
4239 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4240 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4241 the type is a constant type. Set the assembler name and inform
4242 the rest of the compiler about the new decl if the decl is not
4243 public.
4244 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4245 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4246 try to read in function bodies for functions that already have bodies.
4247 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4248 equivalency.
4249 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4250 Check for whether we matched a builtin function type before calling
4251 lto_same_type_p on the generated type. Permit cases where the
4252 declaration of an array is unbounded, but the definition is bounded.
4253 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4254 DECL_SIZE_UNIT if necessary.
4255
42562007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4257
4258 * lto-read.c (input_expr_operand): Get types right
4259 for COMPLEX_CST.
4260
42612007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4262
4263 * lto-read.c (make_new_block, input_cfg): Properly set
4264 n_basic_blocks.
4265
42662007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4267
4268 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4269 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4270
42712007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4272
4273 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4274 construct the integer type for bitfields.
4275
42762007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4277
4278 * lto-read.c (data_in.current_node_has_loc): Removed.
4279 (input_line_info): Returns true if node needs line set.
4280 (set_line_info): Always sets line if called.
4281 (clear_line_info): Removed reference to current_node_needs_loc.
4282 (input_expr_operand): Keeps track locally if current node needs a loc.
4283 (input_local_var): Added code to handle DECL_INITIAL for
4284 static local vars. Only set loc if necessary.
4285
42862007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4287
4288 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4289 DECL_CONTEXT.
4290
42912007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4292
4293 * lto.c: Include langhooks.h.
4294 (lto_find_integral_type): Rework logic to handle the case where
4295 got_byte_size is true, but the bitsize requested and that of the
4296 base_type doesn't match.
4297 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4298 asm_name if we are creating a VAR_DECL.
4299 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4300 definition.
4301 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4302 function reference and use the builtin's decl if so. Set the
4303 DECL_CONTEXT of the RESULT_DECL for the function.
4304 * lto-lang.c (registered_builtin_fndecls): New variable.
4305 (lto_getdecls): Return it.
4306 (lto_builtin_function): Chain the new decl onto
4307 registered_builtin_fndecls.
4308
43092007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
4310
4311 * lto-read.c (process_tree_flags, lto_static_init_local):
4312 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4313 (input_line_info, clear_line_info): Fixed new line number code.
4314 (input_expr_operand): Added type to SWITCH_EXPR.
4315 (lto_read_body): Properly initialized data_in.
4316 Clear line info when leaving.
4317
43182007-11-13 Diego Novillo <dnovillo@google.com>
4319
4320 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4321 Initialize ARTIFICIAL.
4322 (lto_read_subroutine_type_subprogram_DIE): Initialize
4323 SAVED_SCOPE.
4324 * lto-read.c (set_line_info): Remove ; from calls to
4325 LINEMAP_POSITION_FOR_COLUMN.
4326
43272007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4328
4329 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4330 (input_expr_operand, input_local_var): Renamed get_type_ref to
4331 input_type_ref.
4332 (input_expr_operand): Get the types correct for
4333 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4334
43352007-11-13 Doug Kwan <dougkwan@google.com>
4336
4337 * lto-read.c (input_widest_uint_uleb128): New function.
4338 (input_tree_flags, process_tree_flags, input_line_info,
4339 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4340 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4341 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4342 (lto_static_init_local): Add code to assert that lto_flags_type is
4343 wide enough.
4344
43452007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4346
4347 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4348 (lto_read_subroutine_type_subprogram_DIE): Handle
4349 DW_AT_static_link and DW_AT_specification. Return the
4350 specification if present.
4351 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4352
43532007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4354
4355 * lto-lang.c: Include target.h.
4356 (registered_builtin_types): New variable.
4357 (lto_type_for_mode): Increase number of modes handled.
4358 (lto_builtin_function): Fix argument list and return the decl.
4359 (lto_register_builtin_type): New function.
4360 (lto_init): Initialize target builtins and language-independent
4361 nodes.
4362 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4363
43642007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4365
4366 * lto-read.c (input_expr_operand): Added code to properly handle
4367 index filed. Added new RANGE_EXPR case.
4368
43692007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4370
4371 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4372 (data_in): Added current_node_has_loc field.
4373 (input_line_info, set_line_info, clear_line_info): Added a support
4374 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4375 did not have on on the source side.
4376 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4377 numbers too.
4378
43792007-11-09 Doug Kwan <dougkwan@google.com>
4380
4381 * lto-read.c (input_expr_operand): Change type of operand 2 of
4382 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4383
43842007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4385
4386 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4387 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4388 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4389 the new decl we are creating. Move informing the middle end about
4390 the new decl to...
4391 (lto_main): ...here. Inform the middle end about global variables
4392 after we have read in all the input files.
4393 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4394 variables with internal linkage, so delete the check for internal
4395 linkage. Combine TREE_PUBLIC flags.
4396
43972007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4398
4399 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4400 DW_AT_decl_line.
4401 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4402 builtin specially. Move check for attribute compatibility
4403 earlier.
4404
44052007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4406
4407 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4408 * config-lang.in (gtfiles): Add lto.h and lto.c.
4409 * lto-elf.c: Include ggc.h.
4410 (lto_elf_file_open): Allocate elf_file from GC memory.
4411 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4412 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4413 in GC memory.
4414 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4415 (lto_file_close): Free file from GC memory.
4416 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4417 (lto_read_member_DIE): Fix declaration.
4418 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4419 in GC memory.
4420 (current_lto_file): New variable.
4421 (lto_main): Use it.
4422 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4423 lto_die_cache_entry): Move to...
4424 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4425 declarations accordingly.
4426 (struct lto_file_struct): Declare.
4427 (lto_file_vtable): Use it instead of lto_file.
4428
44292007-11-06 Alon Dayan <alond@il.ibm.com>
4430 Kenneth Zadeck <zadeck@naturalbridge.com>
4431
4432 * lto-read.c (process_flags, lto_static_init_local):
4433 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4434 change global array num_flags_for_code to flags_length_for_code.
4435 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4436
44372007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4438
4439 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4440 layout functions to compute information about the newly constructed
4441 type.
4442
44432007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4444
4445 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4446 case to use DECL_RESULT if necessary.
4447
44482007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4449
4450 * lto-read.c (input_tree_list): Removed.
4451 (input_tree_flags): Added parameter to force flags no matter what
4452 tree code.
4453 (input_expr_operand): Added parameter to input_tree_flags.
4454 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4455 input_expr_operand rather than input_tree_lists.
4456 (input_local_var): Use input_expr_operand to read attributes
4457 rather then input_tree_list.
4458 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4459
44602007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4461
4462 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4463 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4464 TYPE_DECL for it.
4465 * lto-read.c (lto_read_body): Use correct sizes for calculating
4466 type_decls_offset and types_offset.
4467
44682007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4469
4470 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4471 with GENERIC_NEXT.
4472 * config-lang.in (gtfiles): Add lto-lang.c.
4473 * lto-lang.c: Include gt-lto-lto-lang.h.
4474 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4475 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4476 (lto/lto-read.o): Likewise.
4477
44782007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4479
4480 * lto-read.c (data_in): Added type_decls and current_col fields.
4481 (string_slot): New type to hold canonized file name.
4482 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4483 input_line_info, set_line_info, clear_line_info): New functions.
4484 (file_name_hash_table): New hash table.
4485 (input_local_var, input_labels, input_local_vars_index,
4486 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4487 (input_uleb128): Changed type of byte var.
4488 (input_expr_operand): Large number of changes to get line numbers
4489 correct. Added TYPE_DECL case.
4490 (input_globals): Added code to get TYPE_DECLs processed.
4491 (input_local_var): Added code to process line numbers and
4492 TREE_CHAIN and DECL_CONTEXT.
4493 (input_function, input_constructor): Added call to
4494 clear_line_number.
4495 (lto_static_init_local): Added code to get line numbers correct.
4496 (lto_read_body): Added code to get TYPE_DECLS read and to change
4497 parameters to the calls above that had their parms reorganized.
4498
4499
45002007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4501
4502 * lto.h (lto_resolve_typedecl_ref): Declare.
4503 * lto.c (lto_resolve_typedecl_ref): New function.
4504
45052007-10-29 Mark Mitchell <mark@codesourcery.com>
4506 Nathan Froyd <froydnj@codesourcery.com>
4507
4508 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4509 DIEs even if we find an abstract origin for this DIE.
4510
45112007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4512
4513 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4514 RESULT_DECL slightly earlier. Only remember the decl for later
4515 if we successfully merge declarations.
4516
45172007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4518
4519 * lto-read.c (input_expr_operand): Give label_values the proper
4520 context and provide switch statements with a default type.
4521
45222007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4523
4524 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4525 * lto.c (lto_materialize_function): ...to here.
4526
45272007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4528
4529 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4530 * lto.c (lto_info_fd_init): Initialize it.
4531 (lto_info_fd_close): Free it.
4532 (lto_materialize_function): New function.
4533 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4534 unmaterialized_fndecls.
4535 (lto_file_read): Read in all the function bodies after we have read
4536 all of the DWARF info.
4537 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4538 reading a function body.
4539
45402007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4541
4542 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4543 semetric with output_tree_flags. Added call to log flags.
4544 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4545 type issues to make everything consistent with flags being
4546 unsigned HOST_WIDE_INTS.
4547 (input_expr_operand): Added call to
4548 recompute_tree_invariant_for_addr_expr.
4549 (input_local_var): Added debugging for tree_chains. Now calls
4550 input_tree_flags.
4551 (input_phi): Made flags unsigned HOST_WIDE_INT.
4552 (input_ssa_names): Now calls input_tree_flags.
4553 (lto_read_body): Now sets cfun.
4554 (lto_read_function_body): Now sets current_function_pointer.
4555
45562007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4557
4558 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4559 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4560 inspecting fields within.
4561 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4562 handle this appropriately.
4563
45642007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4565
4566 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4567 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4568 both DW_AT_abstract_origin and DW_AT_specification.
4569 (lto_read_subroutine_type_subprogram_DIE): Handle
4570 DW_AT_abstract_origin.
4571 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4572 (lto_read_DIE_at_ptr): Define as static to match declaration.
4573 Lookup the PTR in the cache before reading it from the file.
4574 (lto_resolve_var_ref): Adjust accordingly.
4575 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4576 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4577
45782007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4579
4580 * lto.c (lto_read_DIE_at_ptr): New function.
4581 (lto_resolve_var_ref): Use it.
4582 (lto_resolve_fn_ref): Use it.
4583 (lto_resolve_field_ref): Use it.
4584 (lto_read_variable_formal_parameter_constant_DIE): Follow
4585 DW_AT_specification and return the associated decl when appropriate.
4586
45872007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4588
4589 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4590 Implement for scalar integer modes.
4591 (lto_init): Initialize size_type_node.
4592
45932007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4594
4595 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4596 (input_local_var): Add chaining for params.
4597 (input_ssa_names): Add cfun parameter.
4598 (input_function): Remove unnecessary else.
4599
46002007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4601
4602 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4603 (lto_resolve_var_ref): Use proper types.
4604 (lto_resolve_fn_ref): Likewise.
4605 (lto_resolve_field_ref): Likewise.
4606
46072007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4608
4609 * lto-read.c (input_expr_operand): Remove case.
4610
46112007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4612
4613 * lto.c (lto_read_only_for_child_DIEs): New function.
4614 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4615 * lto-elf.c (lto_elf_map_lto_section): Remove.
4616 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4617 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4618 SSA_NAME. Add missing case for mechanical codes.
4619 (input_cfg): Use basic_block_info_for_function instead of
4620 basic_block_info.
4621
46222007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4623
4624 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4625 (input_list): Renamed input_tree_list and modified to follow same
4626 protocol as lto-function-out.c:output_tree_list.
4627 (input_expr_operand): Make asm operands use input_tree_list.
4628 (input_local_var): Now uses input_tree_list.
4629 (lto_read_body): Change placement for setting context of debug_labels.
4630
4631
46322007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4633
4634 * lto-read.c (input_real): Output debugging in proper order.
4635 (input_integer): Compute bit lengths properly.
4636 (input_list): Clean up declaration.
4637 (input_expr_operand): Change calls to input_real to match fix.
4638 Make reading of LTO_bit_field_ref1 match output.
4639 (input_local_var): Make reading of attributes match what is being
4640 written.
4641 (dump_debug_stream): Also print char in hex.
4642 (debug_out_fun): Fix signed unsigned mismatch.
4643
46442007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4645
4646 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4647 DW_AT_GNU_vector specially, as they are not contiguous with the
4648 specified set of attribute names. Use class_mask to check for
4649 errors at the end of the function
4650 (lto_resolve_var_ref): Read the DIE if it is not cached.
4651 (lto_resolve_fn_ref): Likewise.
4652 (lto_resolve_field_ref): Likewise.
4653
46542007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4655
4656 * lto.c: Include dwarf2out.h.
4657 (lto_cache_store_DIE): Assert that we never change the value.
4658 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4659 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4660 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4661 sensible type instead.
4662 (lto_read_structure_union_class_type_DIE): Store the newly
4663 created type prior to reading the members of the structure to
4664 avoid infinite recursion. Avoid computing types and alignments
4665 for structures whose sizes are unknown.
4666 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4667 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4668 DW_AT_const_value, and DW_AT_specification.
4669 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4670 Return early if we have already constructed the function type.
4671 (lto_read_typedef_DIE): Check to see if the type has been cached
4672 already. Cache the type before reading any children.
4673 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4674 (lto_read_DIE): Unset context->skip_non_parameters around reading
4675 the DIE.
4676 (lto_resolve_fn_ref): Delete trailing whitespace.
4677
46782007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4679
4680 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4681
46822007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4683
4684 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4685
46862007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4687
4688 * lto-lang.c (signed_and_unsigned_types): New variable.
4689 (lto_type_for_size): Consult signed_and_unsigned_types to find
4690 an approprite type, creating it if necessary.
4691 (lto_set_decl_assembler_name): Add actual method body.
4692
46932007-09-06 Jim Blandy <jimb@codesourcery.com>
4694
4695 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4696 can't find a var init for this variable, leave its DECL_INITIAL.
4697 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4698 lto_elf_map_fn_body.
4699 (lto_map_lto_section): New function.
4700 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4701 bodies, and lto_elf_map_optional_lto_section for variable
4702 initializers.
4703 (lto_elf_find_section_data): Quietly return NULL if the section is
4704 missing.
4705 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4706
4707 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
4708
4709 * lto-read.c (lto_read_body): Doc fix.
4710
47112007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4712
4713 * lto-read.c (fun_in): Renamed to data_in.
4714 (input_expr_operand, input_local_var, input_string_internal,
4715 input_string, input_real, input_list, get_label_decl,
4716 get_type_ref, input_expr_operand, input_globals, input_labels,
4717 input_local_vars_index, input_local_var, input_local_vars,
4718 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
4719 (input_constructor): New function.
4720 (lto_read_function_body): Renamed to lto_read_body and generalized
4721 to handle both functions and constructors.
4722 (lto_read_function_body, lto_read_var_init): New function.
4723
4724
47252007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4726
4727 * lto-read.c (input_expr_operand): Assert that there really is a
4728 FUNCTION_DECL.
4729 (input_globals): Removed checks on 0 section.
4730
47312007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4732
4733 * lto-read.c (fun_in): Added local_decls_index and
4734 local_decls_index_d.
4735 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
4736 (input_globals): Enabled code to handle FIELD_DECLs.
4737 (input_local_vars_index, input_local_vars): New function.
4738 (input_local_var): Changed to allow locals to be input randomly.
4739 (lto_read_function_body): Added code to input the
4740 local_decls_index and to free various structures.
4741
47422007-08-17 Jim Blandy <jimb@codesourcery.com>
4743
4744 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
4745 ATTRIBUTE_UNUSED from 'die' formal.
4746
4747 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
4748 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
4749 (input_list): Fix type of 'tag'.
4750 (input_expr_operand): Fix type of 'tag' argument. Update
4751 declaration. Fix type of 'ctag'. Add default case to switch,
4752 since the type of the switched value is now an enum.
4753 (input_local_vars): Fix type of 'tag'.
4754 (input_bb): Fix type of 'tag' argument.
4755 (input_function): Fix type of 'tag' argument.
4756
47572007-08-16 Jim Blandy <jimb@codesourcery.com>
4758
4759 * lto.c (lto_read_member_DIE): Record the tree we create in
4760 fd->die_cache. (Our 'die' argument is no longer unused.)
4761 (lto_resolve_field_ref): New function.
4762 * lto.h (lto_resolve_field_ref): New declaration.
4763
47642007-08-15 Jim Blandy <jimb@codesourcery.com>
4765
4766 * lto-read.c (lto_read_var_init): Mark arguments as unused.
4767
47682007-08-07 Jim Blandy <jimb@codesourcery.com>
4769
4770 * lto.c (lto_read_form): Complete attr_classes table.
4771 (DWARF2_form_data): Doc fix.
4772
47732007-08-05 Mark Mitchell <mark@codesourcery.com>
4774
4775 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
4776 and unmap_var_init.
4777 (lto_read_var_init): Declare.
4778 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
4779 interface for reading variable initializers.
4780 * lto-elf.c (lto_elf_read_var_init): Remove.
4781 (lto_elf_file_vtable): Update initializer.
4782 (lto_elf_read_var_init): Add comment about unused-ness.
4783 * lto-read.c (lto_read_var_init): New.
4784
4785 * lto.c (lto_read_form): Add entry for DW_AT_inline.
4786
47872007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
4788
4789 * lto-read.c (lto_read_function_body): Moved declaration of fn
4790 outside of ifdef.
4791
47922007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4793
4794 * lto-read.c (input_uleb128, input_string_internal, input_real,
4795 input_integer, input_record_start, input_list, get_type_ref,
4796 input_flags, input_expr_operand, input_expr_operand,
4797 input_expr_operand, input_local_vars, input_cfg, input_phi,
4798 input_ssa_names, input_bb, input_function): Added semicolons.
4799
4800
48012007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4802
4803 * lto-read.c (input_globals): Remove debugging.
4804 (input_function): Set DECL_ARGUMENTS.
4805
4806
48072007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4808
4809 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
4810 RETURN_EXPR, MODIFY_EXPR and processing of flags.
4811 (input_phi): Made work with operands other than SSA_NAMES and
4812 fixed processing of flags.
4813 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
4814 (input_flags): New function.
4815 * lto-lang.c (lto_init): Changed state of in_lto_p.
4816
4817
48182007-07-24 Mark Mitchell <mark@codesourcery.com>
4819
4820 * lto-tree.h (lto_varargs_cookie): Remove.
4821 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
4822 skip_non_parameters, skip_parameters.
4823 (lto_varargs_cookie): Remove.
4824 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
4825 parameter types.
4826 (lto_read_abbrev): New function.
4827 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
4828 child DIEs.
4829 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
4830 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
4831 (lto_file_read): Initialize new context fields.
4832 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
4833 (lto_unsigned_type): Remove.
4834 (lto_signed_type): Likewise.
4835 (lto_signed_or_unsigned_type): Likewise.
4836 (lto_init): Do not create lto_varargs_cookie.
4837 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
4838 (LANG_HOOKS_SIGNED_TYPE): Likewise.
4839 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
4840
48412007-07-19 Jan Hubicka <jh@suse.cz>
4842
4843 * lto-read.c (lto_read_function_body): Produce empty scope block
4844 to avoid crash.
4845
48462007-07-18 Mark Mitchell <mark@codesourcery.com>
4847
4848 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
4849 process local variables.
4850 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
4851
48522007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4853
4854 * lto-read.c (input_list, input_expr_operand): Added struct
4855 function parameter.
4856 (init_cfg, finalize_cfg): Removed function.
4857 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
4858 (input_labels, input_local_vars): Now takes input_block parameter rather than
4859 synthsyzing it.
4860 (input_cfg, input_phi, input_ssa_names): New functions.
4861 (input_bb): Now passes in input_blocks. Does not construct cfg
4862 and processes the list of phi functions.
4863 (input_function): Now builds both the cfg and ssa_names table.
4864 (lto_read_function_body): Processes new header fields to construct
4865 streams for the ssa_names and cfg and their debugging.
4866 * lto/lto-lang.c (lto_init): Set in_lto_p.
4867
4868
48692007-06-28 Mark Mitchell <mark@codesourcery.com>
4870
4871 * lto.h (lto_file_vtable): Add read_var_init.
4872 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
4873 initializers.
4874 (lto_main): Remove bogus asserts.
4875 * lto-elf.c (tm.h): Include it.
4876 (libiberty.y): Likewise.
4877 (lto_elf_file): Add strtab and symtab. Rename
4878 string_table_section_index to sec_strtab.
4879 (lto_elf_file_vtable): Add lto_elf_read_var_init.
4880 (lto_elf_get_shdr): New function.
4881 (lto_elf_free_shdr): Likewise.
4882 (lto_elf_find_section_data): Use them.
4883 (lto_elf_read_symtab): New function.
4884 (lto_elf_lookup_sym): Likewise.
4885 (lto_elf_free_sym): Likewise.
4886 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
4887 (lto_elf_built_init): New function.
4888 (lto_elf_read_var_init): Likewise.
4889 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
4890
48912007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
4892
4893 * lto-read (make_new_block): Initialize the stmt_list.
4894 (lto_static_init_local): Add debugging for missing codes.
4895
48962007-06-26 Mark Mitchell <mark@codesourcery.com>
4897
4898 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4899 unprototyped functions.
4900
49012007-06-23 Mark Mitchell <mark@codesourcery.com>
4902
4903 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4904 Handle DW_AT_MIPS_linkage_name.
4905 (lto_read_subroutine_type_subprogram): Likewise. Correct
4906 compilation errors.
4907 (lto_main): Remove incorrect assertions.
4908 * lto-symbtab.c: Build function types out of TREE_LISTs.
4909
4910 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
4911
4912 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
4913
49142007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
4915
4916 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
4917 dummy since ggc does not like empty structs.
4918 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
4919 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
4920 expr->common to expr->base.
4921 (make_new_block): Moved stmt_list to proper place.
4922
4923
49242007-03-14 Robert Kennedy <jimbob@google.com>
4925
4926 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
4927 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
4928 assembler name from DWARF.
4929 * lto-lang.c (lto_set_decl_assembler_name) New function.
4930
49312006-09-10 Mark Mitchell <mark@codesourcery.com>
4932
4933 * lto.h (lto_file_vtable): New structure.
4934 (lto_file): Add vtable pointer.
4935 (lto_file_init): Add vtable paramter.
4936 (lto_read_function_body): New function.
4937 (lto_symtab_merge_fn): New function.
4938 * lto.c (lto_file_init): Add vtable parameter.
4939 (lto_read_form): Fill in entries for DW_AT_prototyped,
4940 DW_AT_frame_base.
4941 (lto_read_subroutine_type_subprogram_DIE): New function.
4942 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
4943 DW_TAG_subprogram.
4944 * lto-elf.c (lto_elf_vile_vtable): New variable.
4945 (lto_elf_file_open): Pass it to lto_file_init.
4946 (lto_elf_map_fn_body): New function.
4947 (lto_elf_unmap_fn_body): Likewise.
4948 * lto-read.c: New file.
4949 * lto-symtab.c (lto_symtab_merge_fn): New function.
4950 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
4951 tree_rest_of_compilation.
4952 * Make-lang.in (LTO_OBJS): Add lto-read.o
4953 (lto-read.o): New target.
4954
49552006-09-03 Mark Mitchell <mark@codesourcery.com>
4956
4957 * lto.c (<inttypes.h>): Don't include it.
4958 (lto_context): Don't typedef it.
4959 (lto_resolve_reference): New function.
4960 (lto_read_form): Use it.
4961 (lto_resolve_type_ref): New function.
4962 (lto_resolve_var_ref): Likewise.
4963 (lto_resolve_fn_ref): Likewise.
4964 * lto.h (<inttypes.h>): Include it.
4965 (lto_context): New type.
4966 (lto_ref): New structure.
4967 (lto_resolve_type_ref): Declare.
4968 (lto_resolve_var_ref): Likewise.
4969 (lto_resolve_fn_ref): Likewise.
4970
49712006-08-18 Mark Mitchell <mark@codesourcery.com>
4972
4973 * lang-specs.h: New file.
4974
49752006-08-14 Mark Mitchell <mark@codesourcery.com>
4976
4977 * lto.c (lto_info_fd_init): Allocate the DIE cache.
4978 (lto_info_fd_close): Deallocate it.
4979 (lto_die_cache_entry): New structure.
4980 (lto_cache_hash): New function.
4981 (lto_cache_eq): Likewise.
4982 (lto_cache_store_DIE): Likewise.
4983 (lto_cache_lookup_DIE): Likewise.
4984 (lto_read_referenced_type_DIE): Use the cache.
4985 (lto_read_pointer_type_DIE): Robustify.
4986 (lto_read_DIE): Use the cache.
4987 * lto.h (hashtab.h): Include.
4988 (lto_info_fd): Add DIE cache.
4989 * Make-lang.in (LTO_H): New variable.
4990 (lto/lto-lang.o): Use LTO_H.
4991 (lto/lto-elf.o): Likewise.
4992 (lto/lto-symtab.o): Likewise.
4993
49942006-07-09 Mark Mitchell <mark@codesourcery.com>
4995
4996 * lto.c (lto_abi_mismatch_error): New function.
4997 (lto_abbrev_read): Initialize num_abbrevs.
4998 (lto_read_form): Specify allowed form classes for
4999 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5000 (lto_read_variable_formal_parameter_constant_DIE): Handle
5001 DW_AT_declaration. Call lto_symtab_merge_var.
5002 (lto_read_pointer_type_DIE): New function.
5003 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5004 not creat TYPE_DECLs for types that already have them.
5005 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5006 (lto_set_cu_context): Make cu_start point to the header, not the
5007 first DIE.
5008 (lto_file_read): Adjust for change to lto_set_cu_context.
5009 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5010 (lto/lto-symtab.o): New rule.
5011 * lto-tree.h (lang_identifier): Add decl field.
5012 (LANG_IDENTIFIER_CAST): New macro.
5013 (LTO_IDENTIFIER_DECL): Likewise.
5014 (lto_symtab_merge_var): Declare.
5015 * lto-symtab.c: New file.
5016
50172006-07-02 Daniel Berlin <dberlin@dberlin.org>
5018
5019 * lto.c (lto_context): Add current_cu and info_fd members.
5020 (DWARF2_CompUnit): New structure.
5021 (lto_read_DIE): Take lto_info_fd *.
5022 (lto_read_child_DIEs): Ditto.
5023 (lto_file_corrupt_error): Constify argument.
5024 (lto_set_cu_context): New function
5025 (lto_info_fd_init): Ditto.
5026 (lto_info_fd_close): Ditto.
5027 (lto_file_init): Use lto_info_fd_init.
5028 (lto_file_close): Use lto_info_fd_close.
5029 (lto_read_initial_length): Pass in pointer to header size.
5030 (lto_read_comp_unit_header): Correct cu_length to
5031 real length from beginning of header. Take lto_info_fd * as
5032 argument.
5033 (find_cu_for_offset): New function.
5034 (lto_read_form): Change first argument to lto_info_fd *.
5035 Add FORM_CONTEXT argument.
5036 Handle DW_FORM_ref_addr.
5037 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5038 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5039 Swap contexts if necessary for form.
5040 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5041 lto_file_corrupt_error.
5042 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5043 (lto_read_referenced_type_DIE): Change first argument to
5044 lto_info_fd *. Access lto_fd fields through base pointer.
5045 (lto_read_compile_unit_DIE): Change first argument to an
5046 lto_info_fd *.
5047 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5048 (lto_read_base_type_DIE): Ditto.
5049 (lto_read_child_DIEs): Ditto.
5050 (lto_read_DIE): Ditto. Change type of function pointer.
5051 (lto_info_read): New function.
5052 (lto_set_cu_context): Ditto.
5053 (lto_file_read): Use lto_info_read, walk resulting CU's
5054 (lto_main): Update for lto_info_fd change.
5055 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5056 necessary.
5057 * lto.h (DWARF2_CompUnit): New structure.
5058 (lto_info_fd): Ditto.
5059 (lto_file): Change debug_info to be an lto_info_fd.
5060
50612006-06-25 Mark Mitchell <mark@codesourcery.com>
5062
5063 * lto.c (toplev.h): Include it.
5064 (dwarf2.h): Likewise.
5065 (tree.h): Likewise.
5066 (tm.h): Likewise.
5067 (cgraph.h): Likewise.
5068 (ggc.h): Likewise.
5069 (inttypes.h): Likewise.
5070 (DWARF2_attr): New type.
5071 (DWARF2_abbrev): Likewise.
5072 (DWARF2_class): Likewise.
5073 (DWARF2_form_data): Likewise.
5074 (lto_context): Likewise.
5075 (lto_fd_init): New function.
5076 (lto_abbrev_fd_init): Likewise.
5077 (lto_abbrev_fd_close): Likewise.
5078 (lto_file_init): Use them.
5079 (lto_file_close): New function.
5080 (lto_file_corrupt_error): Likewise.
5081 (LTO_CHECK_INT_VAL): New macro.
5082 (lto_check_size_t_val): New function.
5083 (lto_check_int_val): Likewise.
5084 (LTO_READ_TYPE): New macro.
5085 (lto_read_ubyte): New function.
5086 (lto_read_uhalf): Likewise.
5087 (lto_read_uword): Likewise.
5088 (lto_read_uleb128): Likewise.
5089 (lto_read_initial_length): Likewise.
5090 (lto_abbrev_read_attrs): Likewise.
5091 (lto_abbrev_read): Likewise.
5092 (lto_abbrev_lookup): Likewise.
5093 (lto_read_section_offset): Likewise.
5094 (lto_read_comp_unit_header): Likewise.
5095 (lto_read_form): Likewise.
5096 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5097 (LTO_BEGIN_READ_ATTRS): Likewise.
5098 (LTO_END_READ_ATTRS): Likewise.
5099 (lto_unsupported_attr_error): New function.
5100 (lto_get_identifier): Likewise.
5101 (lto_read_referenced_type_DIE): Likewise.
5102 (lto_read_compile_unit_DIE): Likewise.
5103 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5104 (lto_read_base_type_DIE): Likewise.
5105 (lto_read_DIE): Likewise.
5106 (lto_read_child_DIEs): Likewise.
5107 (lto_file_read): Read DIEs.
5108 (lto_main): Ask middle end to emit entities.
5109 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5110 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5111 (lto_elf_file_close): Likewise.
5112 * lto.h (lto_file): Declare.
5113 (DWARF2_abbrev): Likewise.
5114 (lto_fd): New type.
5115 (lto_abbrev_fd): Likewise.
5116 (lto_file): Use new types.
5117 (lto_file_close): Declare.
5118 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5119
51202006-06-18 Mark Mitchell <mark@codesourcery.com>
5121
5122 * lto.h: New file.
5123 * lto.c: New file.
5124 * lto-elf.c: New file.
5125 * lto-lang.c (flags.h): Include it.
5126 (lto.h): Likewise.
5127 (lto_init): New function.
5128 (lto_write_globals): Remove.
5129 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5130 (LANG_HOOKS_INIT): Define.
5131 (LANG_HOOKS_PARSE_FILE): Likewise.
5132 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5133 (LTO_EXE): Link with libelf.
5134 (lto/lto-lang.o): Update dependencies.
5135 (lto/lto.o): New target.
5136 (lto/lto-elf.o): Likewise.
5137
51382006-06-12 Mark Mitchell <mark@codesourcery.com>
5139
5140 * config-lang.in: New file.
5141 * Make-lang.in: Likewise.
5142 * lto-tree.h: Likewise.
5143 * lto-lang.c: Likewise.
5144