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