]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Update ChangeLog and version files for release
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
3defceaa 12019-05-03 Release Manager
2
3 * GCC 9.1.0 released.
4
7d4bbc86 52019-04-12 Jan Hubicka <hubicka@ucw.cz>
6
7 * lto.c (do_stream_out): rename to ...
8 (stream_out): ... this one; move original code to ...
9 (stream_out_partitions_1, stream_out_partitions): ... these new
10 functions.
11 (lto_wpa_write_files): Honnor lto_parallelism
12
41f9034e 132019-03-26 Martin Liska <mliska@suse.cz>
14
15 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
229faf9e 16 wrapping.
41f9034e 17
2f6d557f 182019-03-11 Martin Liska <mliska@suse.cz>
19
20 * lto-lang.c (lto_post_options): Wrap an option name
21 in a string format message and fix GNU coding style.
22 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
23
f673492c 242019-03-09 Jakub Jelinek <jakub@redhat.com>
25
26 PR target/79645
27 * lang.opt: Terminate description text with a dot.
28
323978df 292019-02-28 Jason Merrill <jason@redhat.com>
30
31 PR c++/88049 - ICE with undefined destructor and anon namespace.
32 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
33 for a type in an anonymous namespace.
34
f4d3c071 352019-01-09 Sandra Loosemore <sandra@codesourcery.com>
36
37 PR other/16615
38
39 * lto-partition.c: Mechanically replace "can not" with "cannot".
40 * lto-symtab.c: Likewise.
41 * lto.c: Likewise.
42
fbd26352 432019-01-01 Jakub Jelinek <jakub@redhat.com>
44
45 Update copyright years.
46
c2ef464f 472018-12-24 Jan Hubicka <hubicka@ucw.cz>
48
49 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
50 for method whose basetype was already reported.
51
a49fad64 522018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
53
54 Minimize clone counter memory usage in LTO.
55 * lto-partition.c (privatize_symbol_name_1): Keep track of
56 non-unique symbol counters in the lto_clone_numbers hash
57 map.
58 (lto_promote_cross_file_statics): Allocate and free the
59 lto_clone_numbers hash map.
60 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
61 map.
62
837c58f7 632018-11-28 Jan Hubicka <jh@suse.cz>
64
65 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
66
490c362e 672018-11-22 Jan Hubicka <jh@suse.cz>
68
69 * lto.c (cmp_type_location): Remove.
70 (lto_read_decls): Do not allocate odr_types.
71
f72863ec 722018-11-19 Martin Liska <mliska@suse.cz>
73
74 PR lto/88077
75 * lto-symtab.c (lto_symtab_merge): Transform the
76 condition before r256989.
77
8ac6652d 782018-11-16 Martin Liska <mliska@suse.cz>
79
80 PR lto/88004
81 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
82 lto_symtab_symbol_p as it does checking of transparent alias.
83 These needs to be also merged in the function.
84
87943388 852018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
86
87 * lto-partition.c (privatize_symbol_name_1): Use
88 clone_function_name_numbered.
89
b5072026 902018-10-26 Jan Hubicka <jh@suse.cz>
91
92 * lto/lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
93
bdb69048 942018-10-17 David Malcolm <dmalcolm@redhat.com>
95
96 * Make-lang.in (selftest-lto): New.
97
c8c195fa 982018-08-29 Martin Liska <mliska@suse.cz>
99
100 PR bootstrap/87130
101 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
102 to behavior before r263887.
103
a0e9bfbb 1042018-08-27 Martin Liska <mliska@suse.cz>
105
106 * lto-lang.c (handle_const_attribute): Use new function
c9e63184 107 fndecl_built_in_p and remove check for FUNCTION_DECL if
108 possible.
a0e9bfbb 109 * lto-symtab.c (lto_symtab_merge_p): Likewise.
110 (lto_symtab_merge_decls_1): Likewise.
111 (lto_symtab_merge_symbols): Likewise.
112 * lto.c (lto_maybe_register_decl): Likewise.
113 (read_cgraph_and_symbols): Likewise.
114
36a03e27 1152018-08-21 Tom de Vries <tdevries@suse.de>
116
117 * lto.c (lto_main): Call debuginfo_early_start and
118 debuginfo_early_stop.
119
8e18705e 1202018-07-20 Martin Sebor <msebor@redhat.com>
121
122 PR middle-end/82063
123 * lto-lang.c (lto_handle_option): Change function argument
124 to HOST_WIDE_INT.
125
4556378b 1262018-07-20 Richard Biener <rguenther@suse.de>
127
128 PR debug/86585
129 * lto.c (unify_scc): Before we throw away an SCC see if we
130 can amend prevailing single-entry SCC with debug refs.
131
10f4c874 1322018-07-13 Jan Hubicka <hubicka@ucw.cz>
133
134 * lto.c (do_stream_out): Add PART parameter; open dump file.
135 (stream_out): Add PART parameter; pass it to do_stream_out.
136 (lto_wpa_write_files): Update call of stream_out.
137
6848a0ae 1382018-07-04 Martin Liska <mliska@suse.cz>
139
140 PR middle-end/66240
141 PR target/45996
142 PR c/84100
143 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
144 instead of memcmp.
145
fb4c9101 1462018-06-20 Martin Liska <mliska@suse.cz>
147
148 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
c9e63184 149 FIXME comment.
fb4c9101 150
d2c2513e 1512018-06-19 Martin Liska <mliska@suse.cz>
152
153 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
c9e63184 154 of get_create.
d2c2513e 155 (undo_partition): Likewise.
156 (lto_balanced_map): Likewise.
157
ca8e0e36 1582018-06-19 Martin Liska <mliska@suse.cz>
159
160 * config-lang.in: Remove stagestuff.
161
025fe22b 1622018-06-08 Jan Hubicka <hubicka@ucw.cz>
163
164 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
165 New global vars.
166 (lto_register_dumps): New hook.
167 (LANG_HOOKS_REGISTER_DUMPS): New.
168 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
169 * lto-symtab.c: Include lto.h; dump into dump_file instead of
170 symtab->dump_file.
171 (lto_symtab_merge_decls): Initialize dump file.
172 * lto.c (read_cgraph_and_symbols): Initialize dump file.
173 (do_whole_program_analysis): Likewise.
174
8a604555 1752018-06-08 Martin Liska <mliska@suse.cz>
176
177 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
178 instead of summary_uid.
179
b53d4f56 1802018-06-08 Martin Liska <mliska@suse.cz>
181
182 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
183 of get.
184 (undo_partition): Likewise.
185 (lto_balanced_map): Likewise.
186
1e42d5c6 1872018-06-08 Martin Liska <mliska@suse.cz>
188
189 * lto-partition.c (add_references_to_partition): Remove support
190 for MPX (macros, related functions, fields in cgraph_node, ...).
191 (add_symbol_to_partition_1): Likewise.
192 (privatize_symbol_name): Likewise.
193 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
194
78b10371 1952018-06-05 Richard Biener <rguenther@suse.de>
196
197 * lto.c (cmp_type_location): Expand locations only once.
198
278cec16 1992018-05-30 Jan Hubicka <hubicka@ucw.cz>
200
201 * lang.opt (lto_linker_output): Add nolto-rel.
202 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
203 and LTO_LINKER_OUTPUT_NOLTOREL.
204 (lto_init): Generate lto when doing incremental link.
205 * lto.c (lto_precess_name): Add lto1-inclink.
206
0dbcf2c2 2072018-05-18 Jan Hubicka <jh@suse.cz>
208
209 PR lto/85583
210 * lto-partition.c (account_reference_p): Do not account
211 references from aliases; do not account refernces from
212 external initializers.
213
747c1878 2142018-04-30 Jan Hubicka <jh@suse.cz>
215
216 * lto.c (cmp_partitions_size): Remove.
217 (lto_wpa_write_files): Also output priorities; do not sort partitions.
218 (cmp_partition_order): Move to ...
219 * lto-partition.c (cmp_partition_order): ...
220 (lto_1_to_1_map): Sort partitions.
221
0b9ea699 2222018-04-20 Jan Hubicka <jh@suse.cz>
223
224 * lto-partition.c (lto_balanced_map): Fix sanity check.
225
27f5053b 2262018-04-19 Jan Hubicka <jh@suse.cz>
227
228 * lto-partition.c: Include sreal.h
229 (add_symbol_to_partition_1): Use size instead of self_size
230 for size estimate.
231 (account_reference_p): New.
232 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
233 fix accounting errors in boundary size; add debug output; combine cost
234 as cost/size instead of cost/internal; reduce the partitioning error to
235 +- 1/8 of the parttion size.
236
e077efa5 2372018-04-19 Martin Liska <mliska@suse.cz>
238
239 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
240 for multiple PREVAILING_DEF_IRONLY for common symbols.
241
28893b77 2422018-04-18 Martin Liska <mliska@suse.cz>
243
244 * lto.c (lto_read_decls): Fix GNU coding style and typos.
245
b9308baf 2462018-04-18 Martin Liska <mliska@suse.cz>
247
248 PR ipa/83983
249 PR ipa/85391
250 * lto.c (cmp_type_location): New function.
251 (lto_read_decls): First collect all types, then
252 sort them according by location before register_odr_type
253 is called.
254
ca4a358c 2552018-04-18 Jan Hubicka <jh@suse.cz>
256 Martin Liska <mliska@suse.cz>
257
258 PR lto/85391
259 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
260 types.
261
aade59af 2622018-04-11 Martin Liska <mliska@suse.cz>
263
264 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
265 function.
266
c3ea4c3d 2672018-04-10 Martin Liska <mliska@suse.cz>
268
269 PR lto/85248
270 * lto-symtab.c (lto_symtab_merge_p): Do not check for
271 TREE_VALUES of error attributes.
272
3c24c320 2732018-04-10 Richard Biener <rguenther@suse.de>
274 Martin Liska <mliska@suse.cz>
275
276 PR lto/85248
277 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
278
b19fea61 2792018-02-08 Jan Hubicka <hubicka@ucw.cz>
280
281 * lto-partition.c (lto_balanced_map): Watch overflow.
282
fa30257b 2832018-02-08 Jan Hubicka <hubicka@ucw.cz>
284
285 PR ipa/81360
286 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
287 (read_cgraph_and_symbols): Use
288 symtab_node::output_to_lto_symbol_table_p.
289
ae57de0e 2902018-01-30 Jan Hubicka <hubicka@ucw.cz>
291
292 * lto.c (register_resolution): Remove forgotten sanity check.
293
35c60783 2942018-01-30 Jan Hubicka <hubicka@ucw.cz>
295
296 PR lto/81004
297 * lto.c: Include builtins.h
298 (register_resolution): Merge resolutions in case trees was
299 merged across units.
300 (lto_maybe_register_decl): Break out from ...
301 (lto_read_decls): ... here.
302 (unify_scc): Also register decls here.
303 (read_cgraph_and_symbols): Sanity check that all resolutions was
304 read.
305
a2b21115 3062018-02-02 Eric Botcazou <ebotcazou@adacore.com>
307
308 PR lto/83954
309 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
310 component type of array types with non-aliased component.
311
ce1a948e 3122018-01-30 Jan Hubicka <hubicka@ucw.cz>
313
314 PR lto/83954
315 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
316 for type match warning on arrays of pointers.
317
77cd3f2b 3182018-01-23 Martin Liska <mliska@suse.cz>
319
320 PR lto/81440
321 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
322 trailing arrays at the end of a struct.
323
8464736b 3242018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
325 Alan Hayward <alan.hayward@arm.com>
326 David Sherwood <david.sherwood@arm.com>
327
328 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
329
f08ee65f 3302018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
331 Alan Hayward <alan.hayward@arm.com>
332 David Sherwood <david.sherwood@arm.com>
333
334 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
335 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
336
8e8f6434 3372018-01-03 Jakub Jelinek <jakub@redhat.com>
338
339 Update copyright years.
340
672bc44d 3412017-12-15 Jakub Jelinek <jakub@redhat.com>
342
343 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
344 affects_type_identity and handler fields, adjust comments.
345
998afe5d 3462017-12-07 Richard Sandiford <richard.sandiford@arm.com>
347
348 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
349
dab0e385 3502017-12-07 Martin Sebor <msebor@redhat.com>
351
352 PR c/81544
353 * lto-lang.c (lto_attribute_table): Initialize new member of struct
354 attribute_spec.
355
7f38a6aa 3562017-11-30 Jakub Jelinek <jakub@redhat.com>
357
358 * lto.c (create_subid_section_table): Use ; instead of ;;.
359
532d84ff 3602017-11-22 Marek Polacek <polacek@redhat.com>
361
362 PR c++/60336
363 PR middle-end/67239
364 PR target/68355
365 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
366
151b9ff5 3672017-11-10 Jan Hubicka <hubicka@ucw.cz>
368
369 * lto-partition.c (lto_balanced_map): Use frequency accessor.
370
12f79006 3712017-10-13 Jan Hubicka <hubicka@ucw.cz>
372
373 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
374
971295a0 3752017-10-11 Nathan Sidwell <nathan@acm.org>
376
377 * lto.c (mentions_vars_p_decl_with_vis): Use
378 DECL_ASSEMBLER_NAME_RAW.
379 (lto_fixup_prevailing_decls): Likewise.
380
e3d0f65c 3812017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
382
383 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
384 operating on trees as wide_ints.
385
d082dc6e 3862017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
387 Alan Hayward <alan.hayward@arm.com>
388 David Sherwood <david.sherwood@arm.com>
389
390 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
391
7b53e714 3922017-08-21 Richard Biener <rguenther@suse.de>
393
c9e63184 394 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
395 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
396 TYPE_DECL debug processing, register DIE references from
397 prevailing SCCs with the debug machinery.
398 (lto_section_with_id): Handle LTO debug sections.
7b53e714 399
ff7f27bf 4002017-08-16 Nathan Sidwell <nathan@acm.org>
401
402 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
403 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
404 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
405
47875a37 4062017-08-08 Tom de Vries <tom@codesourcery.com>
407
408 * lto.c: Include attribs.h.
409
30a86690 4102017-08-08 Martin Liska <mliska@suse.cz>
411
412 * lto-lang.c: Include header files.
413 * lto-symtab.c: Likewise.
414
6fd055d3 4152017-08-03 Richard Biener <rguenther@suse.de>
416
417 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
418 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
419 use DECL_LANG_FLAG_0.
420 (lto_symtab_prevail_decl): Likewise.
421
e6c4532a 4222017-07-07 Torsten Duwe <duwe@suse.de>
423
424 * lto-lang.c (lto_attribute_table): Add entry for
425 "patchable_function_entry".
426
c6f56d33 4272017-07-19 Nathan Sidwell <nathan@acm.org>
428
429 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
430 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
431
d508ad6f 4322017-07-06 Jan Hubicka <hubicka@ucw.cz>
433
434 * lto-partition.c (lto_balanced_map): Do not check
435 flag_toplevel_reorder.
4e551c7d 436
d508ad6f 4372017-06-23 Marc Glisse <marc.glisse@inria.fr>
4e551c7d 438 * lto-lang.c (lto_init): Use builtin_structptr_types.
439
8388d80a 4402017-06-15 Jan Hubicka <hubicka@ucw.cz>
441 Thomas Preud'homme <thomas.preudhomme@arm.com>
442
443 PR lto/69866
444 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
445 that resolved externally.
446
a2da7d8a 4472017-05-23 Jan Hubicka <hubicka@ucw.cz>
448
449 * lto.c (do_whole_program_analysis): Replace inline_free_summary
450 by ipa_free_fn_summary.
451
0e388735 4522017-05-23 Martin Liska <mliska@suse.cz>
453
454 * lto-symtab.c (lto_cgraph_replace_node): Use
455 symtab_node::dump_{asm_,}name functions.
456 * lto.c (read_cgraph_and_symbols): Likewise.
457 (do_whole_program_analysis): Likewise.
458
acd183e4 4592017-05-23 Martin Liska <mliska@suse.cz>
460
461 * lto.c (read_cgraph_and_symbols): Use the renamed function.
462 (do_whole_program_analysis): Use the renamed function.
463
b9a58fc5 4642017-05-22 Jan Hubicka <hubicka@ucw.cz>
465
466 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
467 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
468
92bc38e7 4692017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
470
c9e63184 471 PR c++/80038
92bc38e7 472 * lto-lang.c (lto_init): Set in_lto_p earlier.
473
3721b151 4742017-04-12 Richard Biener <rguenther@suse.de>
475 Bernd Edlinger <bernd.edlinger@hotmail.de>
476
477 PR middle-end/79671
478 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
479
3ca5c7c1 4802017-02-14 Martin Liska <mliska@suse.cz>
481
482 * lto.c (do_stream_out): Free LTO file filename string.
483
8950f928 4842017-01-19 David Malcolm <dmalcolm@redhat.com>
485
486 * lto-lang.c (builtin_type_for_size): Convert call to
487 lto_type_for_size to one through the langhook.
488 (lto_type_for_size): Move to langhooks.c and rename to
489 lhd_type_for_size.
490 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
491
2236cf7a 4922017-01-11 Jakub Jelinek <jakub@redhat.com>
493
494 PR middle-end/50199
495 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
496 if it was 0.
497
d0abd9e0 4982017-01-09 Jakub Jelinek <jakub@redhat.com>
499
500 PR translation/79019
501 PR translation/79020
502 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
503
dc824618 5042017-01-06 Nathan Sidwell <nathan@acm.org>
505
e4dea1aa 506 * lto-partition.c (promote_symbol): Write to dump file sooner,
507 include alias promoting too.
508
dc824618 509 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
510 (may_need_named_section_p): Likewise.
511 (rename_statics): Likewise.
512 (lto_promote_cross_file_statics): Likewise.
513
aad93da1 5142017-01-01 Jakub Jelinek <jakub@redhat.com>
515
516 Update copyright years.
517
b8a4902a 5182016-11-30 Georg-Johann Lay <avr@gjlay.de>
519
520 PR lto/78562
521 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
522 mismatch if the two types are built-in.
523
c932c990 5242016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
525
526 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
527
9f8b32f9 5282016-11-23 Richard Biener <rguenther@suse.de>
529
530 PR lto/78472
531 * lto.c (hash_canonical_type): Ignore zero-sized fields.
532
f1b3e1c9 5332016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
534
535 PR c++/71973
536 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
537
adc78298 5382016-11-18 Richard Sandiford <richard.sandiford@arm.com>
f1b3e1c9 539 Alan Hayward <alan.hayward@arm.com>
540 David Sherwood <david.sherwood@arm.com>
adc78298 541
542 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
543
791e0564 5442016-10-31 Richard Biener <rguenther@suse.de>
545
546 PR lto/78129
547 * lto.c (do_whole_program_analysis): Bail out after errors
548 from WPA analysis.
549
25a8e007 5502016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
551
552 * lto-partition.c: Include tree-vrp.h.
553 * lto.c: Likewise.
554
6a4203b6 5552016-09-20 Richard Biener <rguenther@suse.de>
556
557 * lto.c (lto_main): Call early_finish with "<artificial>" as
558 filename.
559
8ee8fe70 5602016-09-19 Richard Biener <rguenther@suse.de>
561
562 * lto.c (lto_main): Invoke early_finish debug hook.
563
c0250021 5642016-07-25 Richard Biener <rguenther@suse.de>
565
566 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
567 (unify_scc): Likewise.
568 (lto_read_decls): Likewise.
569
6eb2402f 5702016-06-28 Jakub Jelinek <jakub@redhat.com>
571
572 * Make-lang.in: Don't cat ../stage_current if it does not exist.
573
b4c71cbb 5742016-06-23 Andi Kleen <ak@linux.intel.com>
575
576 * Make-lang.in: Add support for autofdo (disabled for now)
577
1dc4d519 5782016-06-10 Martin Sebor <msebor@redhat.com>
579
580 PR c/71392
581 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
582 attribute in type-generic builtins.
583
99aee6e3 5842016-05-16 Jan Hubicka <hubicka@ucw.cz>
585
586 * lto-partition.c (add_symbol_to_partition_1): Likewise.
587
0754a747 5882016-05-03 Jan Hubicka <hubicka@ucw.cz>
589
590 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
591
49547b8a 5922016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
593
594 * lto-partition.h (lto_balanced_map): New parameter.
595 * lto-partition.c (lto_balanced_map): New parameter
596 max_partition_size.
597 Check if partition size is greater than max_partition_size.
598 * lto.c (do_whole_program_analysis): Adjust calls to
599 lto_balanced_map() to pass 2nd argument.
600
21dae9f7 6012016-03-17 H.J. Lu <hongjiu.lu@intel.com>
602
603 PR lto/70258
604 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
605 PIE.
606
fe4bc123 6072016-03-08 Jakub Jelinek <jakub@redhat.com>
608
609 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
610 - becuase -> because.
611
bd5653d0 6122016-02-15 Tom de Vries <tom@codesourcery.com>
613
614 PR lto/69655
615 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
616 argument.
617
874e154a 6182016-01-27 Martin Liska <mliska@suse.cz>
619
620 * lto-partition.c (add_symbol_to_partition_1): Remove usage
621 of hsa_summaries.
622
8be55b33 6232016-01-19 Jan Hubicka <hubicka@ucw.cz>
624
625 PR lto/69136
626 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
627 decls have no assemblernames.
628
56686608 6292016-01-19 Martin Liska <mliska@suse.cz>
c9e63184 630 Martin Jambor <mjambor@suse.cz>
56686608 631
632 * lto-partition.c: Include "hsa.h"
633 (add_symbol_to_partition_1): Put hsa implementations into the
634 same partition as host implementations.
635
d03f956e 6362016-01-12 Jan Hubicka <hubicka@ucw.cz>
637
638 PR lto/69003
639 * lto-partition.c (rename_statics): Fix pasto.
640
2fb9248b 6412016-01-18 Richard Biener <rguenther@suse.de>
642
643 PR lto/69337
644 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
645 function vs. variable.
646
e4c96992 6472016-01-12 Richard Biener <rguenther@suse.de>
648
649 PR lto/69077
650 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
651 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
652
f1717362 6532016-01-04 Jakub Jelinek <jakub@redhat.com>
654
655 Update copyright years.
656
c4b4be7f 6572015-12-10 Jan Hubicka <hubicka@ucw.cz>
658
659 PR lto/68878
660 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
661 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
662 (lto_symtab_prevailing_decl): Use it.
663
c0998828 6642015-12-15 Ilya Verbin <ilya.verbin@intel.com>
665
666 * lto.c: Include stringpool.h and fold-const.h.
667 (offload_handle_link_vars): New static function.
668 (lto_main): Call offload_handle_link_vars.
669
6cbd82a6 6702015-12-10 Jan Hubicka <hubicka@ucw.cz>
671
672 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
673
f94693ef 6742015-12-11 Jan Hubicka <hubicka@ucw.cz>
675
676 PR ipa/61886
677 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
678 values of error and warning attributes.
679
7e28e646 6802015-12-08 Jan Hubicka <hubicka@ucw.cz>
681
682 PR lto/68811
683 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
684 DECL.
685 (LTO_NO_PREVAIL): Use gcc_checking_assert.
686
24199c3f 6872015-12-08 Jan Hubicka <hubicka@ucw.cz>
688
689 PR lto/68811
690 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
691 by itself.
692
4e42d239 6932015-12-08 Jan Hubicka <hubicka@ucw.cz>
694
695 PR ipa/61886
696 * lto-symtab.c: Include lto-symtab.h.
697 (lto_cgraph_replace_node): Do not merge profiles here.
698 (lto_symtab_merge_p): New function.
699 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
700 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
701 aliases.
702 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
703 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
704 * lto.c: Include lto-symtab.h
705 * lto-symtab.h: New.
706
ee03cd5e 7072015-12-08 Jan Hubicka <hubicka@ucw.cz>
708
709 PR ipa/61886
710 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
711 are not part of the definition.
712 (contained_in_symbol): Likewise.
713 (promote_symbol): When promoting a symbol also promote all transparent
714 aliases.
715 (rename_statics): Weakref needs unique name, too.
716
e0dec29d 7172015-12-07 Jan Hubicka <hubicka@ucw.cz>
718
719 PR ipa/61886
720 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
721 rename_statics, rename_statics): Handle transparent aliases.
722
7d38b7bc 7232015-12-04 Jan Hubicka <hubicka@ucw.cz>
724
725 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
726 merged_comdat.
727
27e9c5ae 7282015-12-01 Jan Hubicka <hubicka@ucw.cz>
729
730 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
731
4c4a180d 7322015-11-25 Jan Hubicka <jh@suse.cz>
733
734 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
735 * lang.opt (lto_linker_output): New enum.
736 (flinker_output): New flag.
737
3f8f2e54 7382015-11-24 Jan Hubicka <hubicka@ucw.cz>
739
740 * lto-symtab.c: Include alias.h
741 (warn_type_compatibility_p): Replace types_compatible_p checks by
742 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
743 (lto_symtab_merge): Compare DECL sizes.
744 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
745
b89bfdca 7462015-11-24 Jan Hubicka <hubicka@ucw.cz>
747
748 * lto.c (iterative_hash_canonical_type): Recruse for all types
749 which pass !canonical_type_used_p.
750 (gimple_register_canonical_type_1): Sanity check we do not compute
751 canonical type of anything with !canonical_type_used_p.
752 (gimple_register_canonical_type): Skip all types that are
753 !canonical_type_used_p
754
6e06854b 7552015-11-24 Jan Hubicka <hubicka@ucw.cz>
756
757 * lto.c (unify_scc): Use free_node.
758
fc7464ae 7592015-11-21 Jan Hubicka <hubicka@ucw.cz>
760
761 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
762 (gimple_register_canonical_type_1): Check that pointers do not get
763 canonical types.
764 (gimple_register_canonical_type): Do not register pointers.
765
7662015-11-21 Jan Hubicka <hubicka@ucw.cz>
e469587a 767
768 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
769 flag for types that are not ODR; fix loop walking parameters.
770
6e803544 7712015-11-11 Andrew MacLeod <amacleod@redhat.com>
772
773 * lto-lang.c: Remove unused header files.
774 * lto-object.c: Likewise.
775 * lto-partition.c: Likewise.
776 * lto-symtab.c: Likewise.
777 * lto.c: Likewise.
778
292237f3 7792015-11-08 Eric Botcazou <ebotcazou@adacore.com>
780
781 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
782
ac677063 7832015-11-07 Richard Sandiford <richard.sandiford@arm.com>
784
785 * lto-lang.c: Don't undef DEF_BUILTIN.
786
4cba6f60 7872015-10-29 Andrew MacLeod <amacleod@redhat.com>
788
789 * lto-lang.c: Reorder #include's and remove duplicates.
790 * lto-object.c: Likewise.
791 * lto-partition.c: Likewise.
792 * lto-symtab.c: Likewise.
793 * lto.c: Likewise.
794
382ecba7 7952015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
796
797 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
798 conditionals.
799 (lto_fixup_state): Likewise.
800 (do_whole_program_analysis): Use
801 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
802 conditionals.
803
43895be5 8042015-10-13 Jakub Jelinek <jakub@redhat.com>
805
806 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
807 DEF_FUNCTION_TYPE_11): Define.
808
37f21d1f 8092015-10-10 Jan Hubicka <hubicka@ucw.cz>
810
811 * lto.c (hash_canonical_type): Honor
812 type_with_interoperable_signedness.
813
e561d5e1 8142015-09-28 Nathan Sidwell <nathan@codesourcery.com>
815
816 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
817 (DEF_FUNCTION_TYPE_VAR_11): Delete.
818
5a7d537d 8192015-08-31 Richard Biener <rguenther@suse.de>
820
821 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
822 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
823 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
824 participate in merging with something else.
825
a4e1a24d 8262015-08-31 Richard Biener <rguenther@suse.de>
827
828 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
829 test, do not replace a non-builtin with a builtin.
830 * lto.c (compare_tree_sccs_1): Do not merge things we stream
831 as builtins vs. non-builtins.
832
6dc50383 8332015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
834
835 * lto.h: Remove useless typedefs.
836
af015d19 8372015-07-15 Andrew MacLeod <amacleod@redhat.com>
838
839 * lto.c: Remove redundant includes.
840
47ae02b7 8412015-07-12 Aldy Hernandez <aldyh@redhat.com>
842
843 * lto-lang.c: Fix double word typos.
844
d040a5b0 8452015-07-10 Andrew MacLeod <amacleod@redhat.com>
846
847 * lto.c: Include cfghooks.h rather than predict.h.
848
f61de240 8492015-07-09 Andrew MacLeod <amacleod@redhat.com>
850
851 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
852 lto-streamer.h.
853 * lto-object.c: Likewise.
854 * lto-partition.c: Likewise.
855 * lto-symtab.c: Likewise.
856
1eacc14a 8572015-07-09 Andrew MacLeod <amacleod@redhat.com>
858
859 * lto-lang.c: Adjust includes for flags.h changes.
860
9ef16211 8612015-07-07 Andrew MacLeod <amacleod@redhat.com>
862
863 * lto-lang.c: Adjust includes.
864 * lto-object.c: Likewise.
865 * lto-partition.c: Likewise.
866 * lto-symtab.c: Likewise.
867 * lto.c: Likewise.
868
ec2e0095 8692015-06-25 Andrew MacLeod <amacleod@redhat.com>
870
871 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
872 * lto-object.c: Likewise.
873 * lto-partition.c: Likewise.
874 * lto-symtab.c: Likewise.
875 * lto-tree.h: Likewise.
876 * lto.c: Likewise.
877
770ff93b 8782015-06-25 Richard Sandiford <richard.sandiford@arm.com>
879
880 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
881 than typed_noop_remove. Remove redudant typedefs.
882
f2ab3bac 8832015-06-17 Andrew MacLeod <amacleod@redhat.com>
884
885 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
886 * lto-object.c: Likewise.
887 * lto-partition.c: Likewise.
888 * lto-symtab.c: Likewise.
889 * lto.c: Likewise.
890
cb274227 8912015-06-14 Jan Hubicka <hubicka@ucw.cz>
892
893 PR ipa/66181
894 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
895
8f88884c 8962015-06-12 DJ Delorie <dj@redhat.com>
897
898 * lto-lang.c (lto_type_for_size): Include intN types.
899 (lto_type_for_mode): Likewise.
900
1ed0cc85 9012015-06-08 Jan Hubicka <hubicka@ucw.cz>
902
903 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
904
64486212 9052015-06-08 Andrew MacLeod <amacleod@redhat.com>
906
907 * lto-lang.c : Adjust include files.
908 * lto-object.c : Likewise.
909 * lto-partition.c : Likewise.
910 * lto-partition.h : Likewise.
911 * lto-symtab.c : Likewise.
912 * lto.c : Likewise.
913 * lto.h : Likewise.
914
9a8ba0f7 9152015-06-06 Jan Hubicka <hubicka@ucw.cz>
916
379ca7f8 917 PR lto/65378
918 * lto-symtab.c (warn_type_compatibility_p): Fix call of
919 odr_or_derived_type_p.
920 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
921
9222015-06-08 Jan Hubicka <hubicka@ucw.cz>
923
924
9a8ba0f7 925 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
926 pointers.
927
3a1c9df2 9282015-06-05 Aldy Hernandez <aldyh@redhat.com>
929
930 * lto-lang.c (lto_write_globals): Remove.
931 (LANG_HOOKS_WRITE_GLOBALS): Same.
932
f77c0292 9332015-06-04 Andrew MacLeod <amacleod@redhat.com>
934
935 * lto-lang.c: Adjust includes for restructured coretypes.h.
936 * lto-object.c: Likewise.
937 * lto-partition.c: Likewise.
938 * lto-symtab.c: Likewise.
939 * lto.c: Likewise.
940
499e2be8 9412015-06-04 Jan Hubicka <hubicka@ucw.cz>
942
943 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
944
9c0b7e86 9452015-06-03 Jan Hubicka <hubicka@ucw.cz>
946
947 * lto.c (iterative_hash_canonical_type,
948 gimple_register_canonical_type): only hash main variants of types
949
e5b238bf 9502015-05-27 Martin Liska <mliska@suse.cz>
951
952 * lto-partition.c (new_partition): Reset number of symbols.
953 (add_symbol_to_partition_1): Increment number of symbols.
954 (undo_partition): Decrement number of symbols.
955 (lto_balanced_map): Dump number of symbols and insns that
956 belong to a partition.
957 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
958
24a769d9 9592015-05-22 Jan Hubicka <hubicka@ucw.cz>
960
961 * lto.c (hash_canonical_type): Be sure we hash only types that
962 need alias set.
963 (gimple_register_canonical_type_1): Do not produce canonical
964 types for types that do not need alias sets.
965
00c1bd91 9662015-05-22 Jan Hubicka <hubicka@ucw.cz>
967
968 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
969
82915df7 9702015-05-19 Jan Hubicka <hubicka@ucw.cz>
971
972 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
973
40175f70 9742015-05-17 Jan Hubicka <hubicka@ucw.cz>
975
976 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
977 compare ODR types (if available) and function types.
978 (lto_symtab_merge): ... here; output ODR violation warnings
979 and call warn_types_mismatch.
980
988cf7b9 9812015-04-29 Jan Hubicka <hubicka@ucw.cz>
982
983 * lto.c (lto_fixup_state): Call verify_type.
984
9969c043 9852015-04-18 Trevor Saunders <tsaunders@mozilla.com>
986
988cf7b9 987 * lto.c: Adjust for hash_table changes.
9969c043 988
d2e9c252 9892015-03-27 Jan Hubicka <hubicka@ucw.cz>
990
991 * lto.c (lto_read_decls): Move code registering odr types out
992 of TYPE_CANONICAL conditional and also register polymorphic types.
993
ce87fec0 9942015-03-26 Jan Hubicka <hubicka@ucw.cz>
995
996 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
997 DECL_ARTIFICAL symbols.
998
da6f3259 9992015-03-26 Jan Hubicka <hubicka@ucw.cz>
1000
1001 PR lto/65536
1002 * lto.c (unify_scc): Revert location cache when unification
1003 suceeded.
1004 (lto_read_decls): Accept location cache after sucess;
1005 apply location cache before calling debug hooks.
1006
e9e2b82f 10072015-03-10 Jan Hubicka <hubicka@ucw.cz>
1008
1009 * lto.c (read_cgraph_and_symbols): Do not do merging
1010 at ltrans stage.
1011
2e971afd 10122015-02-26 Jakub Jelinek <jakub@redhat.com>
1013
1014 * lto.c (lto_mode_identity_table): New variable.
1015 (lto_read_decls): Add mode_table argument to the lto_input_block
1016 constructor.
1017 (lto_file_finalize): Initialize mode_table.
1018 (lto_init): Initialize lto_mode_identity_table.
1019
6349b8cc 10202015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1021
1022 PR libgomp/64625
1023 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1024 Remove macros.
1025 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1026
57e20c4a 10272015-02-03 Jan Hubicka <hubicka@ucw.cz>
1028
1029 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1030
c05be867 10312015-01-30 Joseph Myers <joseph@codesourcery.com>
1032
1033 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1034 changed to pass input_location as first argument.
1035
bbcd979a 10362014-12-11 Jan Hubicka <hubicka@ucw.cz>
1037
1038 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1039
90617f12 10402014-12-11 Jan Hubicka <hubicka@ucw.cz>
1041
1042 * lto.c (compare_tree_sccs_1): Add comparsion of
1043 DECL_FUNCTION_SPECIFIC_TARGET
1044
ca4c3545 10452015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1046 James Norris <jnorris@codesourcery.com>
1047
1048 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1049 New macros.
1050 * lto.c: Include "gomp-constants.h".
1051
9d65fe51 10522015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1053
1054 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1055 from select_what_to_stream.
1056
ba000093 10572015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1058 Jakub Jelinek <jakub@redhat.com>
1059
1060 PR middle-end/64412
1061 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1062 if ACCEL_COMPILER.
1063
1f78217c 10642015-01-09 Michael Collison <michael.collison@linaro.org>
1065
1066 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1067 input.h, alias.h, symtab.h, options, fold-const.h,
1068 wide-int.h, and inchash.h due to flattening of tree.h.
1069 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1070 input.h, alias.h, symtab.h, fold-const.h,
1071 wide-int.h, and inchash.h due to flattening of tree.h.
1072 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1073 input.h, alias.h, symtab.h, options, fold-const.h,
1074 wide-int.h, and inchash.h due to flattening of tree.h.
1075 * lto-partition.c: Ditto.
1076 * lto-symtab.c: Ditto.
1077
d353bf18 10782015-01-05 Jakub Jelinek <jakub@redhat.com>
1079
1080 Update copyright years.
1081
b4bae7a0 10822014-12-22 Martin Liska <mliska@suse.cz>
1083
1084 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1085 is used.
1086 (undo_partition): Likewise.
1087 (lto_balanced_map): Likewise.
1088
2cc80ac3 10892014-12-22 Martin Liska <mliska@suse.cz>
1090
1091 * lto-partition.c: Include of symbol-summary.h is added.
1092 * lto-symtab.c: Likewise.
1093 * lto.c: Likewise.
1094
366970c6 10952014-12-11 Jan Hubicka <hubicka@ucw.cz>
1096
1097 PR ipa/61324
1098 * lto.c (read_cgraph_and_symbols): Update call of
1099 remove_unreachable_nodes.
1100 (do_whole_program_analysis): Remove call of
1101 symtab->remove_unreachable_nodes
1102
9dac2720 11032014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1104
1105 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1106 htab with malloc instead of ggc.
1107
9f9f871f 11082014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1109
1110 * lto.c: Replace htab with hash_table.
1111
5ecbd52e 11122014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1113
1114 * lto.c (lto_read_in_decl_state): Adjust.
1115 (lto_fixup_state): Likewise.
1116
23de2c1d 11172014-11-17 Jan Hubicka <hubicka@ucw.cz>
1118
1119 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1120
ab90b67e 11212014-11-14 Jan Hubicka <hubicka@ucw.cz>
1122
1123 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1124
b0c5e347 11252014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1126 Bernd Schmidt <bernds@codesourcery.com>
1127 Andrey Turetskiy <andrey.turetskiy@intel.com>
1128 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1129
dccabdd1 1130 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1131
11322014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1133 Ilya Tocar <ilya.tocar@intel.com>
1134 Andrey Turetskiy <andrey.turetskiy@intel.com>
1135 Bernd Schmidt <bernds@codesourcery.com>
1136
b0c5e347 1137 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1138 LTO_SECTION_NAME_PREFIX.
1139 * lto-partition.c (lto_promote_cross_file_statics): Call
1140 select_what_to_stream.
1141 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1142 LTO_SECTION_NAME_PREFIX.
1143 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1144 being built as an offload compiler.
1145
3754d046 11462014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1147
1148 * lto-lang.c: Remove redundant enum from machine_mode.
1149
1140c305 11502014-10-28 Andrew MacLeod <amacleod@redhat.com>
1151
1152 * lto.c: Adjust include files.
1153 * lto-lang.c: Ditto.
1154 * lto-object.c: Ditto.
1155 * lto-partition.c: Ditto.
1156 * lto-symtab.c: Ditto.
1157
94ea8568 11582014-10-27 Andrew MacLeod <amacleod@redhat.com>
1159
1160 * lto-lang.c: Adjust include files.
1161 * lto-object.c: Ditto.
1162 * lto-partition.c: Ditto.
1163 * lto-symtab.c: Ditto.
1164 * lto.c: Ditto.
1165
c219a638 11662014-10-16 DJ Delorie <dj@redhat.com>
1167
1168 * lto-object.c (lto_obj_begin_section): In the event that pointer
1169 sizes aren't powers of two, choose a more suitable alignment
1170 than (unsigned)(-1).
1171
9f75f026 11722014-10-14 DJ Delorie <dj@redhat.com>
1173
1174 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1175 size-type as well.
1176 (lto_init): Initialize all intN types, not just int128.
1177
120ce989 11782014-10-06 Martin Liska <mliska@suse.cz>
1179
1180 * lto.c (stream_out): ARG_UNUSED added for last argument.
1181
16d41ae2 11822014-09-24 Aldy Hernandez <aldyh@redhat.com>
1183
1184 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1185 DECL_ABSTRACT_P.
1186
6b722052 11872014-09-23 Andi Kleen <ak@linux.intel.com>
1188
1189 * lto-partition.c (node_cmp): Update comment.
1190 (varpool_node_cmp): Use symtab_node for comparison.
1191 (add_sorted_nodes): New function.
1192 (lto_balanced_map): Change to keep ordered queue
1193 of ordered node. Handle no_reorder attribute.
1194
d585ba22 11952014-09-11 Jan Hubicka <hubicka@ucw.cz>
1196
1197 * lto.c (lto_read_decls): Register ODR types.
1198
289c4db4 11992014-08-20 Jan Hubicka <hubicka@ucw.cz>
1200
1201 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1202 call.
1203 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1204
1df805e3 12052014-08-14 Jan Hubicka <hubicka@ucw.cz>
1206
1207 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1208
62cc770a 12092014-08-14 Richard Biener <rguenther@suse.de>
1210
1211 PR lto/62067
1212 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1213
472ca566 12142014-08-08 Richard Biener <rguenther@suse.de>
1215
1216 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1217
fc8393b7 12182014-08-08 Bin Cheng <bin.cheng@arm.com>
1219
1220 PR lto/62032
1221 * lto-lang.c (lto_init): Switch mis-matched arguments.
1222
5f8841a5 12232014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1224
1225 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1226
431205b7 12272014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1228
1229 * lto-partition.c, lto-partition.h: Use hash_set instead of
1230 pointer_set.
1231
7fdbd1ec 12322014-07-31 Andi Kleen <ak@linux.intel.com>
1233
1234 * lto.c (hash_canonical_type): Use inchash::hash
1235 and use inchash::add_expr.
1236 (iterative_hash_canonical_type): Dito.
1237
2d97af95 12382014-07-30 Richard Biener <rguenther@suse.de>
1239
1240 * lto-streamer.h (lto_write_data): New function.
1241 * langhooks.c (lhd_append_data): Do not free block.
1242 * lto-section-out.c (lto_write_data): New function writing
1243 raw data to the current section.
1244 (lto_write_stream): Adjust for langhook semantic change.
1245 (lto_destroy_simple_output_block): Write header directly.
1246 * lto-opts.c (lto_write_options): Write options directly.
1247 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1248 (lto_output_toplevel_asms): Likewise.
1249 (copy_function_or_variable): Copy data directly.
1250 (write_global_references): Output index table directly.
1251 (lto_output_decl_state_refs): Likewise.
1252 (write_symbol): Write data directly.
1253 (produce_symtab): Adjust.
1254 (produce_asm_for_decls): Output header and refs directly.
1255
045e2f27 12562014-07-25 Andi Kleen <ak@linux.intel.com>
1257
1258 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1259
e7f95d73 12602014-07-25 Andi Kleen <ak@linux.intel.com>
1261
1262 * lto.c (hash_canonical_type): Convert to inchash.
1263 (iterative_hash_canonical_type): Dito.
1264
6b214d09 12652014-07-25 Andi Kleen <ak@linux.intel.com>
1266
1267 * lto.c: Include inchash.h
1268
83c7dcd8 12692014-07-14 Jan Hubicka <hubicka@ucw.cz>
1270
1271 * lto.c (mentions_vars_p_decl_non_common): Skip
1272 DECL_ARGUMENT_FLD.
1273 mentions_vars_p_function): Do DECL_ARGUMENTS.
1274 (lto_fixup_prevailing_decls): Update.
1275
e52d4978 12762014-07-12 Jan Hubicka <hubicka@ucw.cz>
1277
1278 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1279 timevar
1280 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1281
afb0d513 12822014-07-11 Jan Hubicka <hubicka@ucw.cz>
1283
1284 * lto-partition.c (add_references_to_partition): Use
1285 varpool_ctor_useable_for_folding_p.
1286 * lto.c (lto_read_in_decl_state): Update sanity check.
1287
e4a2b488 12882014-07-01 Martin Liska <mliska@suse.cz>
1289
1290 IPA REF alias refactoring
1291 * lto-partition.c (add_symbol_to_partition_1): Usage of
1292 FOR_EACH_ALIAS added.
1293
c7be6601 12942014-06-28 Jan Hubicka <hubicka@ucw.cz>
1295
1296 Revert:
1297 * lto.c (lto_copy_fields_not_streamed): New function.
1298 (compare_tree_sccs_1): Do not compare fields shared in between type
1299 and variant.
1300 (lto_read_decls): Fixup types first before inserting into hash.
1301
c1526d28 13022014-06-28 Andrew Pinski <apinski@cavium.com>
1303
1304 * lto.c (lto_read_decls): Fix comment in comment.
1305
28635c35 13062014-06-28 Jan Hubicka <hubicka@ucw.cz>
1307
1308 * lto.c (lto_copy_fields_not_streamed): New function.
1309 (compare_tree_sccs_1): Do not compare fields shared in between type
1310 and variant.
1311 (lto_read_decls): Fixup types first before inserting into hash.
1312
737331e8 13132014-06-25 Martin Liska <mliska@suse.cz>
1314
1315 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
1316 used.
1317 (add_symbol_to_partition_1): Likewise.
1318 (lto_balanced_map): Likewise.
1319 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
1320
9c2e58d0 13212014-06-24 Jan Hubicka <hubicka@ucw.cz>
1322
1323 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1324 (mentions_vars_p_function): ... here.
1325 (compare_tree_sccs_1): Update VINDEX checks.
1326 (lto_fixup_prevailing_decls): Likewise.
1327
d62dd039 13282014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1329
1330 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1331 pointer_map.
1332
c1f445d2 13332014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1334
1335 * lto.c: Adjust.
1336
b7393cee 13372014-06-20 Jan Hubicka <hubicka@ucw.cz>
1338
1339 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1340
9db80d42 13412014-06-20 Jan Hubicka <hubicka@ucw.cz>
1342
1343 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1344
5e68df57 13452014-06-15 Jan Hubicka <hubicka@ucw.cz>
1346
1347 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1348
e4c07a06 13492014-06-10 Jan Hubicka <hubicka@ucw.cz>
1350
1351 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1352 (do_whole_program_analysis): Use verify_symtab.
1353
71e19e54 13542014-06-07 Jan Hubicka <hubicka@ucw.cz>
1355
1356 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1357 lto_fixup_prevailing_decls): Skip section names.
1358
f7715905 13592014-06-02 Andrew MacLeod <amacleod@redhat.com>
1360
1361 * lto-symtab.c: Include builtins.h.
1362
3a4303e7 13632014-05-26 Richard Biener <rguenther@suse.de>
1364
1365 * lto.c (lto_parse_hex): Use int64_t.
1366 (lto_resolution_read): Likewise.
1367
4f78e0a8 13682014-05-23 Jan Hubicka <hubicka@ucw.cz>
1369
1370 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1371
8c016392 13722014-05-23 Jan Hubicka <hubicka@ucw.cz>
1373
1374 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1375 symtab pointer.
1376 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1377
3c77ca67 13782014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1379
1380 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1381 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1382 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1383
47131315 13842012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1385
1386 * lto-object.c: Include "lto-section-names.h".
1387 (LTO_SEGMENT_NAME): Don't define.
1388 * lto.c: Include "lto-section-names.h".
1389
24888760 13902014-05-17 Jan Hubicka <hubicka@ucw.cz>
1391
1392 PR lto/61012
1393 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1394 mixed with variables.
1395
25a27413 13962014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1397
1398 * lto-tree.h: Don't use variable_size gty attribute.
1399 * lto.c (lto_read_in_decl_state): Adjust.
1400 (create_subid_section_table): Likewise.
1401 (lto_flatten_files): Likewise.
1402 (read_cgraph_and_symbols): Likewise.
1403
960d5a55 14042014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1405 Mike Stump <mikestump@comcast.net>
1406 Richard Sandiford <rdsandiford@googlemail.com>
1407
1408 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1409 * lto-lang.c (get_nonnull_operand): Likewise.
1410
060fc206 14112014-04-28 Richard Biener <rguenther@suse.de>
1412
1413 PR middle-end/60092
1414 * lto-lang.c: Define flag_isoc11.
1415
13cbeaac 14162014-04-23 David Malcolm <dmalcolm@redhat.com>
1417
1418 * lto-partition.c (add_references_to_partition): Update for
1419 removal of implicit pointer from the is-a.h API.
1420 (add_symbol_to_partition_1): Likewise.
1421 (contained_in_symbol): Likewise.
1422 (undo_partition): Likewise.
1423 (lto_balanced_map): Likewise.
1424 (promote_symbol): Likewise.
1425 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1426 (lto_symtab_merge_symbols): Likewise.
1427 * lto.c (lto_wpa_write_files): Likewise.
1428
4a137074 14292014-04-15 Richard Biener <rguenther@suse.de>
1430
1431 * lto.c: Include params.h.
1432 (do_whole_program_analysis): Switch on flag_lto_partition value,
1433 add support for LTO_PARTITION_ONE.
1434 * lto-partition.h (lto_balanced_map): Adjust.
1435 * lto-partition.c (lto_balanced_map): Get number of desired
1436 partitions as argument to support -flto-partition=one.
1437
df565eb6 14382014-04-14 Jan Hubicka <hubicka@ucw.cz>
1439
1440 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1441 tp_first_run.
1442
ceaf91ad 14432014-03-19 Jan Hubicka <hubicka@ucw.cz>
1444
1445 * lto.c: Include ipa-inline.h
1446 (do_whole_program_analysis): Free inline summary after partitioning.
1447
73249b1e 14482014-03-19 Richard Biener <rguenther@suse.de>
1449
1450 PR middle-end/60553
1451 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1452 instead of TREE_CHAIN as chain_next.
1453
4e6f2fb9 14542014-03-19 Richard Biener <rguenther@suse.de>
1455
1456 * lto.c (lto_wpa_write_files): Move call to
1457 lto_promote_cross_file_statics ...
1458 (do_whole_program_analysis): ... here, into the partitioning
1459 block. Do not ggc_collect after lto_wpa_write_files but
1460 for a last time before it.
1461
e629dc34 14622014-03-19 Jakub Jelinek <jakub@redhat.com>
1463
1464 PR lto/60571
1465 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1466 Fix formatting.
1467
0baf842d 14682014-03-18 Jakub Jelinek <jakub@redhat.com>
1469
1470 PR sanitizer/60535
1471 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1472 and complex_{float,{,long_}double}_type_node.
1473
c9a24b37 14742014-03-08 Paulo Matos <paulo@matos-sorge.com>
1475
0baf842d 1476 * lto-lang.c (lto_init): Pass flag_short_double to
1477 build_common_tree_nodes.
c9a24b37 1478
a2223fa9 14792014-02-14 Jan Hubicka <hubicka@ucw.cz>
1480
1481 PR lto/60295
1482 * lto.c (stream_out): Avoid parallel streaming with
1483 -flto=jobserver until we are able to throttle it down
1484 resonably.
1485
8c075206 14862014-02-14 Jan Hubicka <hubicka@ucw.cz>
1487
1488 * lto-partition.c (add_symbol_to_partition_1,
1489 undo_partition, lto_balanced_map): Aliases have no
1490 defined size.
1491 (lto_balanced_map): Do not follow refering variables
1492 if they can be optimized out.
1493
f4c35256 14942014-02-14 Richard Biener <rguenther@suse.de>
1495
1496 PR lto/60179
1497 * lto.c (compare_tree_sccs_1): Do not compare
1498 DECL_FUNCTION_SPECIFIC_TARGET.
1499 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1500
f5cbf731 15012014-02-12 Richard Biener <rguenther@suse.de>
1502
1503 PR lto/60060
1504 * lto-lang.c (lto_write_globals): Do not call
1505 wrapup_global_declarations or emit_debug_global_declarations
1506 but emit debug info for non-function scope variables
1507 directly.
1508
a973177e 15092014-02-06 Jan Hubicka <hubicka@ucw.cz>
1510
1511 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1512
94107507 15132014-02-06 Jan Hubicka <hubicka@ucw.cz>
1514
1515 PR ipa/59469
1516 * lto-partition.c (symbol_class): Move to cgraph.h
1517 (get_symbol_class): Move to symtab.c
1518 (add_references_to_partition, add_symbol_to_partition_1,
1519 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1520 lto_promote_cross_file_statics): Update.
1521
3e17769e 15222014-02-05 Jan Hubicka <hubicka@ucw.cz>
1523
1524 * lto.c (lto_parallelism): New static var.
1525 (do_stream_out, wait_for_child, stream_out): New static functions.
1526 (lto_wpa_write_files): Add support for parallel streaming.
1527 (do_whole_program_analysis): Set parallelism.
1528 * lang.opt (fwpa): Add parameter.
1529 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1530 (lto_init): Update use of flag_wpa.
1531 * lto-streamer.h (asm_nodes_output): Declare.
1532
00288439 15332014-02-05 Richard Biener <rguenther@suse.de>
1534
1535 * lto.h (lto_global_var_decls): Remove.
1536 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1537 (lto_write_globals): Do nothing in WPA stage, gather globals from
1538 the varpool here ...
1539 * lto.c (lto_main): ... not here.
1540 (materialize_cgraph): Do not call rest_of_decl_compilation
1541 on the empty lto_global_var_decls vector.
1542 (lto_global_var_decls): Remove.
1543
96a3dc39 15442014-02-04 Jan Hubicka <hubicka@ucw.cz>
1545
1546 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1547 needs duplicating, not generic COMDAT.
1548
6541e9a1 15492014-02-04 Richard Biener <rguenther@suse.de>
1550
1551 PR lto/59723
1552 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1553 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1554
b89ce5e3 15552014-02-04 Jan Hubicka <hubicka@ucw.cz>
1556 Markus Trippelsdorf
1557
1558 PR ipa/59469
1559 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1560 merge force_output and forced_by_abi flags.
1561
a89e6c15 15622014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1563
1564 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1565 flag_cilkplus.
1566
c205a71b 15672014-01-09 Richard Biener <rguenther@suse.de>
1568
1569 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1570
f1105f81 15712014-01-09 Richard Biener <rguenther@suse.de>
1572
1573 PR lto/45586
1574 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1575 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1576 (gimple_canonical_types_compatible_p): Do not compare them either.
1577
3aea1f79 15782014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1579
1580 Update copyright years
1581
098f44bc 15822013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1583
1584 * lto.c: Remove struct tags when referring to class varpool_node.
1585 * lto-partition.c: Likewise.
1586 * lto-symtab.c: Likewise.
1587
ea0695f9 15882013-11-29 Jakub Jelinek <jakub@redhat.com>
1589 Richard Biener <rguenther@suse.de>
1590
1591 PR lto/59326
1592 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1593
fe3e3369 15942013-11-29 Jakub Jelinek <jakub@redhat.com>
1595
1596 PR lto/59326
1597 * lto.c (mentions_vars_p_omp_clause): New function.
1598 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1599 after return stmts.
1600
bc61cadb 16012013-11-22 Andrew MacLeod <amacleod@redhat.com>
1602
1603 * lto.c: Add required include files from gimple.h.
1604 * lto-lang.c: Likewise
1605 * lto-object.c: Likewise
1606 * lto-partition.c: Likewise
1607 * lto-symtab.c: Likewise
1608
f1c8b4d7 16092013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1610
1611 * lto-partition.c lto-symtab.c lto.c Adjust.
1612
9ed99284 16132013-11-14 Diego Novillo <dnovillo@google.com>
1614
1615 * lto-lang.c: Include stringpool.h.
1616 Include stor-layout.h.
1617 * lto-partition.c: Include gcc-symtab.h.
1618 * lto.c: Include stor-layout.h.
1619
452659af 16202013-10-31 David Malcolm <dmalcolm@redhat.com>
1621
1622 Automated part of renaming of symtab_node_base to symtab_node.
1623
1624 Patch autogenerated by rename_symtab.py from
1625 https://github.com/davidmalcolm/gcc-refactoring-scripts
1626 revision 58bb219cc090b2f4516a9297d868c245495ee622
1627
1628 * lto-partition.c (add_symbol_to_partition): Rename
1629 symtab_node_base to symtab_node.
1630 (get_symbol_class): Likewise.
1631 (symbol_partitioned_p): Likewise.
1632 (add_references_to_partition): Likewise.
1633 (add_symbol_to_partition_1): Likewise.
1634 (contained_in_symbol): Likewise.
1635 (add_symbol_to_partition): Likewise.
1636 (lto_1_to_1_map): Likewise.
1637 (lto_max_map): Likewise.
1638 (lto_balanced_map): Likewise.
1639 (privatize_symbol_name): Likewise.
1640 (promote_symbol): Likewise.
1641 (may_need_named_section_p): Likewise.
1642 (rename_statics): Likewise.
1643 (lto_promote_statics_nonwpa): Likewise.
1644 * lto-symtab.c (lto_symtab_merge): Likewise.
1645 (lto_symtab_resolve_replaceable_p): Likewise.
1646 (lto_symtab_symbol_p): Likewise.
1647 (lto_symtab_resolve_can_prevail_p): Likewise.
1648 (lto_symtab_resolve_symbols): Likewise.
1649 (lto_symtab_merge_decls_2): Likewise.
1650 (lto_symtab_merge_decls_1): Likewise.
1651 (lto_symtab_merge_decls): Likewise.
1652 (lto_symtab_merge_symbols_1): Likewise.
1653 (lto_symtab_merge_symbols): Likewise.
1654 (lto_symtab_prevailing_decl): Likewise.
1655 * lto.c (lto_wpa_write_files): Likewise.
1656 (read_cgraph_and_symbols): Likewise.
1657 (do_whole_program_analysis): Likewise.
1658
d03e6917 16592013-10-30 David Malcolm <dmalcolm@redhat.com>
1660
1661 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1662 declarations onto multiple lines to make things easier for
1663 rename_symtab.py.
1664 (lto_symtab_merge_decls_1): Likewise.
1665 (lto_symtab_merge_symbols_1): Likewise.
1666
d037099f 16672013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1668
1669 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1670 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1671 Plus is enabled.
1672
02774f2d 16732013-10-29 David Malcolm <dmalcolm@redhat.com>
1674
1675 Patch autogenerated by refactor_symtab.py from
1676 https://github.com/davidmalcolm/gcc-refactoring-scripts
1677 revision 58bb219cc090b2f4516a9297d868c245495ee622
1678
1679 * lto-partition.c (lto_promote_cross_file_statics): Update for
1680 conversion of symtab types to a true class hierarchy.
1681 (rename_statics): Likewise.
1682 (promote_symbol): Likewise.
1683 (privatize_symbol_name): Likewise.
1684 (lto_balanced_map): Likewise.
1685 (varpool_node_cmp): Likewise.
1686 (node_cmp): Likewise.
1687 (lto_1_to_1_map): Likewise.
1688 (undo_partition): Likewise.
1689 (add_symbol_to_partition): Likewise.
1690 (contained_in_symbol): Likewise.
1691 (add_symbol_to_partition_1): Likewise.
1692 (add_references_to_partition): Likewise.
1693 (symbol_partitioned_p): Likewise.
1694 (get_symbol_class): Likewise.
1695 (lto_max_map): Likewise.
1696 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1697 (lto_symtab_merge_symbols): Likewise.
1698 (lto_symtab_merge_symbols_1): Likewise.
1699 (lto_symtab_merge_decls): Likewise.
1700 (lto_symtab_merge_decls_1): Likewise.
1701 (lto_symtab_merge_decls_2): Likewise.
1702 (lto_symtab_resolve_symbols): Likewise.
1703 (lto_symtab_resolve_can_prevail_p): Likewise.
1704 (lto_symtab_symbol_p): Likewise.
1705 (lto_symtab_resolve_replaceable_p): Likewise.
1706 (lto_symtab_merge): Likewise.
1707 (lto_varpool_replace_node): Likewise.
1708 (lto_cgraph_replace_node): Likewise.
1709 * lto.c (lto_main): Likewise.
1710 (do_whole_program_analysis): Likewise.
1711 (materialize_cgraph): Likewise.
1712 (read_cgraph_and_symbols): Likewise.
1713 (cmp_partitions_order): Likewise.
1714 (lto_materialize_function): Likewise.
1715 (has_analyzed_clone_p): Likewise.
1716
b23fb4cb 17172013-10-29 Andrew MacLeod <amacleod@redhat.com>
1718
1719 * lto/lto-object.c: Add gimple.h to include list.
1720 * lto/lto-partition.c: Likewise.
1721
dd9784d4 17222013-10-18 Andrew MacLeod <amacleod@redhat.com>
1723
1724 * lto.c: Remove tree-flow.h from include list.
1725
fdbb424a 17262013-10-15 Richard Biener <rguenther@suse.de>
1727
1728 * lto.c (hash_canonical_type): Split out from ...
1729 (iterative_hash_canonical_type): ... here. Register types
1730 we recurse to.
1731 (gimple_canonical_type_hash): Adjust.
1732 (gimple_register_canonical_type_1): Split out from ...
1733 (gimple_register_canonical_type): ... here. Cache computed
1734 hash value.
1735 (lto_register_canonical_types): Split into two modes,
1736 clearing and computing TYPE_CANONICAL.
1737 (lto_read_decls): Adjust.
1738 (read_cgraph_and_symbols): Do two passes over global trees,
1739 first clearing then computing TYPE_CANONICAL.
1740
fb26741a 17412013-10-14 Richard Biener <rguenther@suse.de>
1742
1743 * lto.c (gimple_canonical_types): Move out-of GC space.
1744 (canonical_type_hash_cache): Make a pointer-map.
1745 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1746 New counters.
1747 (iterative_hash_canonical_type): Adjust.
1748 (read_cgraph_and_symbols): Likewise.
1749 (print_lto_report_1): Likewise.
1750
d7009cf6 17512013-10-14 Richard Biener <rguenther@suse.de>
1752
1753 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1754 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1755 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1756 gimple_types_compatible_p_1, gimple_types_compatible_p,
1757 visit, iterative_hash_name, struct type_hash_pair,
1758 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1759 gimple_type_eq, gimple_register_type, num_not_merged_types,
1760 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1761 num_not_merged_types_in_same_scc_trees): Remove old merging code
1762 and statistics.
1763 (lto_read_decls): Do not run old merging code in parallel.
1764 (read_cgraph_and_symbols): Do not init/free old merging
1765 data structures.
1766 (print_lto_report_1): Do not report differences of old vs. new
1767 merging code.
1768
700d6a0b 17692013-10-14 Richard Biener <rguenther@suse.de>
1770
1771 * lto-lang.c (lto_init): Do not re-init canonical types here.
1772 (lto_register_canonical_types): Move to ...
1773 * lto.c (lto_register_canonical_types): ... here.
1774 (gimple_canonical_types, canonical_type_hash_cache,
1775 iterative_hash_canonical_type, gimple_canonical_type_hash,
1776 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1777 gimple_register_canonical_type): Add canonical type merging machinery
1778 moved from gimple.c.
1779 (read_cgraph_and_symbols): Init and free canonical type tables
1780 here.
1781 (print_lto_report_1): Report canonical type table stats here.
1782
bc7bff74 17832013-10-11 Jakub Jelinek <jakub@redhat.com>
1784
1785 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1786
d2681e34 17872013-09-25 Tom Tromey <tromey@redhat.com>
1788
1789 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1790 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1791 (lto/lto-object.o): Remove.
1792
94956000 17932013-09-06 Richard Biener <rguenther@suse.de>
1794
1795 * lto-symtab.c: Move from gcc/
1796 * lto.h: Include vec.h.
1797 (lto_global_var_decls): Declare.
1798 * lto.c (lto_global_var_decls): Move definition here.
1799 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1800 (lto-symtab.o): Add.
1801 * config-lang.in (gtfiles): Add lto.h.
1802
93cb0915 18032013-08-31 Jan Hubicka <jh@suse.cz>
1804
1805 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1806 DECL_FIELD_OFFSET can contain an reference to variable.
1807
d21755bc 18082013-08-31 Jan Hubicka <jh@suse.cz>
1809
1810 * lto.c (tree_with_vars): Turn into vector.
1811 (MAYBE_REMEMBER_WITH_VARS): Change to...
1812 (CHECK_VAR): ... this one.
1813 (CHECK_NO_VAR): New macro.
1814 (maybe_remember_with_vars_typed): Turn to ...
1815 (mentions_vars_p_typed): ... this one.
1816 (maybe_remember_with_vars_common): Turn to ...
1817 (mentions_vars_p_comon): ... this one.
1818 (maybe_remember_with_vars_decl_minimal): Turn to ...
1819 (mentions_vars_p_decl_minmal): ... this one.
1820 (maybe_remember_with_vars_decl_common): Turn to ...
1821 (mentions_vars_p_decl_common): ... this one.
1822 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1823 (mentions_vars_p_decl_with_vis): ... this one.
1824 (maybe_remember_with_vars_decl_non_common): Turn to ...
1825 (mentions_vars_p_decl_non_common): ... this one.
1826 (maybe_remember_with_vars_function): Turn to ...
1827 (mentions_vars_p_function): ... this one.
1828 (maybe_remember_with_vars_field_decl): Turn to ...
1829 (mentions_vars_p_field_decl): ... this one.
1830 (maybe_remember_with_vars_type): Turn to ...
1831 (mentions_vars_p_type): ... this one.
1832 (maybe_remember_with_vars_binfo): Turn to ...
1833 (mentions_vars_p_binfo): ... this one.
1834 (maybe_remember_with_vars_constructor): Turn to ...
1835 (mentions_vars_p_constructor): ... this one.
1836 (maybe_remember_with_vars_expr): Turn to ...
1837 (mentions_vars_p_expr): ... this one.
1838 (maybe_remember_with_vars): Turn to ...
1839 (mentions_vars_p): ... this one.
1840 (lto_read_decls): Update.
1841 (LTO_SET_PREVAIL): Do not call function for internal decls.
1842 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1843 check that something was updated.
1844 (lto_fixup_state): Do not care about internal decls.
1845 (lto_fixup_decls): Update.
1846 (read_cgraph_and_symbols): Update.
1847
5f74a074 18482013-08-29 Jan Hubicka <jh@suse.cz>
1849
1850 * lto.c (read_cgraph_and_symbols): Free decl states.
1851
2d9cc481 18522013-08-29 Jan Hubicka <jh@suse.cz>
1853
1854 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1855 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1856 TYPE_FINAL_P.
1857
881fe02c 18582013-08-28 Jan Hubicka <jh@suse.cz>
1859
1860 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1861 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1862 (unify_scc): Do checking assert.
1863
66d78392 18642013-08-06 Jan Hubicka <jh@suse.cz>
1865 Martin Liska <marxin.liska@gmail.com>
1866
1867 * lto-partition.c (lto_balanced_map): Always base order on
1868 source file order.
1869
eaad46f2 18702013-08-06 Jan Hubicka <jh@suse.cz>
1871
1872 * lto.c (lto_materialize_function): Do not read body anymore.
1873
4df870fd 18742013-08-02 Jan Hubicka <jh@suse.cz>
1875
1876 * lto.c (lto_materialize_function): Do not push struct function.
1877 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1878 (may_need_named_section_p): Even abstract origins may need
1879 named section.
1880
3ea50c01 18812013-07-30 David Malcolm <dmalcolm@redhat.com>
1882
1883 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1884 PASS_MANAGER_H.
1885
1886 * lto.c (do_whole_program_analysis): Update for move of
1887 all_regular_ipa_passes from a global to a field of class
1888 pass_manager.
1889
75de4aa2 18902013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1891
1892 * lto-partition.c: Fix typos.
1893
593309df 18942013-06-20 Jan Hubicka <jh@suse.cz>
1895
1896 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1897 partitioning of variables.
1898
fdbe58cf 18992013-06-20 Jan Hubicka <jh@suse.cz>
1900
1901 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1902
df8d3e89 19032013-06-19 Jan Hubicka <jh@suse.cz>
1904
1905 * lto-partition.c (add_references_to_partition): Use
1906 ctor_for_folding.
1907
be1cd111 19082013-06-18 Richard Biener <rguenther@suse.de>
1909
1910 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1911 and use it.
1912 (lto_register_function_decl_in_symtab): Likewise.
1913 (cmp_tree): New function.
1914 (unify_scc): Instead of using the streamer cache map from entry
1915 to cache index match up the two maps we have by sorting them.
1916 Adjust calls to lto_register_var_decl_in_symtab and
1917 lto_register_function_decl_in_symtab.
1918
8ceff600 19192013-06-17 Richard Biener <rguenther@suse.de>
1920
1921 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1922 * lto.c: Include data-streamer.h.
1923 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1924 (gimple_type_leader_entry_s, gimple_type_leader,
1925 gimple_lookup_type_leader): Remove.
1926 (gtc_visit): Simplify.
1927 (gimple_types_compatible_p): Likewise.
1928 (gimple_register_type_1): Likewise. Merge into ...
1929 (gimple_register_type): ... this. Keep it as legacy for
1930 statistics purposes for now.
1931 (fixup_integer_cst): Remove.
1932 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1933 rename to ...
1934 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1935 maybe_remember_with_vars_*): ... these.
1936 (uniquify_nodes): Remove.
1937 (lto_fixup_prevailing_type): New function.
1938 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1939 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1940 (num_merged_types, num_prevailing_types, num_not_merged_types,
1941 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1942 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1943 num_scc_compare_collisions): New global counters.
1944 (compare_tree_sccs_1): New function.
1945 (compare_tree_sccs): Likewise.
1946 (unify_scc): Likewise.
1947 (lto_read_decls): Stream in tree SCCs and unify them on the
1948 way in. Finalize prevailing SCC tree members.
1949 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1950 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1951 to ggc-collect during merging.
1952 (print_lto_report_1): Adjust for new merging code.
1953
da4b8721 19542013-06-12 Jan Hubicka <jh@suse.cz>
1955
1956 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1957
9e9c3e92 19582013-06-12 Jan Hubicka <jh@suse.cz>
1959
1960 * lto.c (register_resolution): Take lto_file_data argument.
1961 (lto_register_var_decl_in_symtab,
1962 lto_register_function_decl_in_symtab): Update.
1963 (read_cgraph_and_symbols): Update resolution_map handling.
1964
21ebaa24 19652013-06-11 Jan Hubicka <jh@suse.cz>
f2526cce 1966
1967 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1968 (add_symbol_to_partition_1): Likewise.
1969 (contained_in_symbol): Likewise.
1970 (lto_balanced_map): Likewise.
1971 (rename_statics): Drop weakref.
1972
4b927f54 19732013-06-05 Richard Biener <rguenther@suse.de>
1974
1975 * lto.c (num_merged_types): New global variable.
1976 (uniquify_nodes): Increase num_merged_types when merging a type.
1977 (print_lto_report_1): Output the number of merged types.
1978
48669653 19792013-06-01 Jan Hubicka <jh@suse.cz>
1980
1981 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1982 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1983 (do_whole_program_analysis): Update dumping.
1984
15ca8f90 19852013-05-29 Jan Hubicka <jh@suse.cz>
1986
1987 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1988 flags.
1989 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1990
59651d3b 19912013-05-15 Jan Hubicka <jh@suse.cz>
1992
1993 * lto-partition.c (privatize_symbol_name): Return true when
1994 privatizing happened.
1995 (rename_statics): Do not go into infinite loop when privatizing
1996 is not needed.
1997
be5f9e46 19982013-05-16 Jason Merrill <jason@redhat.com>
1999
2000 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2001
15c999e3 20022013-05-15 Martin Jambor <mjambor@suse.cz>
2003
2004 * lto-partition.c (lto_balanced_map): Print symbol order instead
2005 of node uids.
2006
33864132 20072013-05-15 Jan Hubicka <jh@suse.cz>
2008
2009 PR lto/57038
2010 PR lto/47375
2011 * lto-partition.c (get_symbol_class): Fix weakrefs.
2012 (lto_balanced_map): Fix weakrefs.
2013 (privatize_symbol_name): Remove unnecesary label.
2014 (rename_statics): Handle weakrefs as statics.
2015
85b7ebb2 20162013-05-09 Jan Hubicka <jh@suse.cz>
2017 Richard Biener <rguenther@suse.de>
2018
2019 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2020 (lto_register_var_decl_in_symtab): Likewise.
2021 (lto_main): Promote statics.
2022 * lto-partition.c (privatize_symbol_name): New function.
2023 (promote_symbol): Use it.
2024 (may_need_named_section_p): New predicate.
2025 (rename_statics): New functions.
2026 (lto_promote_cross_file_statics): Simplify; do renaming.
2027 (lto_promote_statics_nonwpa): New function.
2028 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2029
ab3c0986 20302013-02-08 Richard Biener <rguenther@suse.de>
2031
2032 PR lto/56231
2033 * lto-lang.c (lto_init): Do not enter a dummy file.
2034
7a87c8e1 20352013-02-07 Uros Bizjak <ubizjak@gmail.com>
2036
2037 PR bootstrap/56227
2038 * lto.c (lto_resolution_ready): Use %wx instead of
2039 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2040
871609a8 20412013-02-04 Richard Guenther <rguenther@suse.de>
2042
2043 PR lto/56168
2044 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2045 or lto_fixup_decls at LTRANS time.
2046
c7fbaa62 20472013-01-09 Jan Hubicka <jh@suse.cz>
2048
2049 PR lto/45375
2050 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2051
d9501635 20522012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2053
2054 PR lto/55466
2055 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2056 variables.
2057 (lto_main): Record the global variables if WPA isn't enabled.
2058
1e094109 20592012-11-20 Diego Novillo <dnovillo@google.com>
2060 Jakub Jelinek <jakub@redhat.com>
2061
2062 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2063
f1f41a6c 20642012-11-16 Diego Novillo <dnovillo@google.com>
2065
2066 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2067
2068 * lto-lang.c: Use new vec API in vec.h.
2069 * lto-partition.c: Likewise.
2070 * lto-partition.h: Likewise.
2071 * lto.c: Likewise.
2072
d2313b52 20732012-10-31 Lawrence Crowl <crowl@google.com>
2074
2075 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2076 down-cast via dyn_cast.
2077 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2078 (undo_partition): Likewise.
2079 (lto_balanced_map): Likewise.
2080 (get_symbol_class): Likewise and via is_a.
2081 (lto_balanced_map): Change symtab checking to is_a.
2082
a5693828 20832012-10-12 Richard Biener <rguenther@suse.de>
2084
2085 PR lto/54898
2086 * lto.c (gimple_types_compatible_p_1): Also compare
2087 TYPE_MAIN_VARIANT.
2088 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2089
883554eb 20902012-10-09 Tobias Burnus <burnus@net-b.de>
2091
2092 * lto-lang.c (lto_register_builtin_type): Avoid useless
2093 decl creation.
2094 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2095
14c7dd36 20962012-10-08 Tobias Burnus <burnus@net-b.de>
2097
2098 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2099 Free lto_file struct after closing the file.
2100
35d3a6eb 21012012-10-08 Jan Hubicka <jh@suse.cz>
2102
2103 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
2104 (fixup_integer_cst): New functoin.
2105 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2106
b8925abd 21072012-10-07 Jan Hubicka <jh@suse.cz>
2108
2109 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2110 release input encoders.
2111 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2112
18ff06f9 21132012-10-06 Jan Hubicka <jh@suse.cz>
2114
2115 PR lto/54790
2116 * lto.c (resolution_map): New static var.
2117 (register_resolution): New function.
2118 (lto_register_var_decl_in_symtab): Use it.
2119 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2120
9078126c 21212012-09-20 Martin Jambor <mjambor@suse.cz>
2122
2123 * lto.c (lto_materialize_function): Call push_struct_function and
2124 pop_cfun.
2125
5169661d 21262012-09-19 Dehao Chen <dehao@google.com>
2127
2128 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2129
c9aa6453 21302012-09-19 Jan Hubicka <jh@suse.cz>
2131
2132 * lto.c (lto_materialize_function): Update confused comment.
2133 (read_cgraph_and_symbols): Do not free symtab.
2134
0851d795 21352012-09-12 Jan Hubicka <jh@suse.cz>
2136
2137 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2138 AUX pointer cleaning. Add max partitioning.
2139 * lto-partition.c (enum symbol_class): New.
2140 (get_symbol_class): New function.
2141 (symbol_partitioned_p): New function.
2142 (add_references_to_partition): Remove.
2143 (add_aliases_to_partition): Remove.
2144 (add_cgraph_node_to_partition_1): Remove.
2145 (add_cgraph_node_to_partition): Remove.
2146 (add_symbol_to_partition): New function.
2147 (add_symbol_to_partition_1): New function.
2148 (contained_in_symbol): New function.
2149 (partition_cgraph_node_p): Remove.
2150 (partition_varpool_node_p): Remove.
2151 (partition_symbol_p): Remove.
2152 (lto_1_to_1_map): Cleanup.
2153 (lto_max_map): New.
2154 (lto_balanced_map): Update.
2155 (lto_promote_cross_file_statics): Update.
2156 * lto-partition.h (lto_max_map): Declare.
2157 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2158
8873e58c 21592012-09-11 Jan Hubicka <jh@suse.cz>
2160
2161 PR lto/54312
2162 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2163 type is variant leader.
2164
ed29d77f 21652012-09-11 Richard Guenther <rguenther@suse.de>
2166
2167 * lto.c (enum gtc_mode): Remove.
2168 (struct type_pair_d): Adjust.
2169 (lookup_type_pair): Likewise.
2170 (gimple_type_leader): Do not mark as deletable.
2171 (gimple_lookup_type_leader): Adjust.
2172 (gtc_visit): Likewise.
2173 (gimple_types_compatible_p_1): Likewise.
2174 (gimple_types_compatible_p): Likewise.
2175 (gimple_type_hash): Likewise.
2176 (gimple_register_type): Likewise.
2177 (read_cgraph_and_symbols): Manage lifetime of tables
2178 here.
2179
bdaea387 21802012-09-11 Richard Guenther <rguenther@suse.de>
2181
2182 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2183 struct type_pair_d, lookup_type_pair, struct sccs,
2184 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2185 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2186 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2187 visit, iterative_hash_name, struct type_hash_pair,
2188 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2189 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2190 Move here from gimple.c
2191 (read_cgraph_and_symbols): Free hash tables here.
2192 (print_lto_report_1): New function wrapping print_lto_report.
2193 (do_whole_program_analysis): Call it.
2194 (lto_main): Likewise.
2195
b6f96313 21962012-09-10 Jan Hubicka <jh@suse.cz>
2197
2198 * lto-partition.c (partition_symbol_p): Forward declare.
2199 (add_references_to_partition): Reimplement using partition_symbol_p.
2200 (add_aliases_to_partition): Break out from add_references_to_partition;
2201 reimplement using partition_symbol_p.
2202 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2203 add sanity checks.
2204 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2205 (partition_varpool_node_p): Do not special case aliases.
2206
724462b0 22072012-08-12 Jan Hubicka <jh@suse.cz>
2208
2209 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2210 it is deleted after streaming.
2211 * lto-partition.c (partition_symbol_p): New function.
2212 (promote_var, promote_fn): Remove.
2213 (promote_symbol): New function.
2214 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2215 to lookup the actual boundaries instead of computing them ad-hoc.
2216
5cf7e051 22172012-08-12 Jan Hubicka <jh@suse.cz>
2218
2219 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2220 in partitioning.
2221 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2222 by encoder.
2223 * lto-partition.c (new_partition): Update.
2224 * lto.c (cmp_partitions_order): Update.
2225 (lto_wpa_write_files): Update.
2226 (free_ltrans_partitions): Update.
2227 (add_references_to_partition): Update.
2228 (add_cgraph_node_to_partition_1): Update.
2229 (add_cgraph_node_to_partition): Update.
2230 (add_varpool_node_to_partition): Update.
2231 (undo_partition): Update.
2232 (lto_balanced_map): Update.
2233 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2234 set_referenced_from_this_partition_p): Update.
2235 (lto_promote_cross_file_statics): Update.
2236
eab36a5a 22372012-08-12 Jan Hubicka <jh@suse.cz>
2238
2239 * lto-partition.c (set_referenced_from_other_partition_p,
2240 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2241 New functions.
2242 (lto_promote_cross_file_statics): Use them.
2243
02b699d5 22442012-07-24 Jan Hubicka <jh@suse.cz>
2245
2246 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2247
a5656b73 22482012-07-24 Uros Bizjak <ubizjak@gmail.com>
2249
2250 * lto-tree.h (lang_decl): Add variable_size GTY option.
2251
b9ed1410 22522012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2253
2254 * lto.c: Do not include timevar.h.
2255 * Make-lang.in: Fix dependencies.
2256
161121a9 22572012-06-18 Lawrence Crowl <crowl@google.com>
2258
c9e63184 2259 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
161121a9 2260 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2261 to lto_wpa_write_files.
2262 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2263 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2264 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2265 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2266 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2267 to be a front end, but is not one.
2268
18a71d50 22692012-05-18 Jan Hubicka <jh@suse.cz>
2270
2271 * lto.c (lto_materialize_constructors_and_inits): Remove.
2272 (read_cgraph_and_symbols): Remove handling of alias pairs.
2273
aa419a52 22742012-05-17 Jan Hubicka <jh@suse.cz>
2275
2276 * lto-partition.c (add_references_to_partition): Handle external vars.
2277 (partition_varpool_node_p): Likewise.
2278 (lto_promote_cross_file_statics): Do not promote externals.
2279
258a168d 22802012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2281
2282 * lto-lang.c (handle_fnspec_attribute): New static function.
2283 (lto_attribute_table): Add "fn spec".
2284 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2285
3d1c0354 22862012-05-04 Jan Hubicka <jh@suse.cz>
2287
2288 * lto.c (do_whole_program_analysis): Set timevars correctly.
2289 (lto_main): Likewise.
258a168d 2290
596c40fb 22912012-05-04 Richard Guenther <rguenther@suse.de>
2292
2293 * lang.opt (fwpa): Do not mark as Optimization.
2294 (fltrans): Likewise.
2295
cf951b1a 22962012-04-30 Jan Hubicka <jh@suse.cz>
2297
2298 * lto.c (lto_main): Use compile ().
596c40fb 2299 * lto-partition.c (partition_cgraph_node_p): Use
2300 symtab_used_from_object_file_p.
cf951b1a 2301 (partition_varpool_node_p): Likewise.
2302
8efa224a 23032012-04-20 Jan Hubicka <jh@suse.cz>
2304
2305 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2306
04ec15fa 23072012-04-18 Jan Hubicka <jh@suse.cz>
2308
2309 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2310 Update for new ipa-ref API.
2311
7c455d87 23122012-04-16 Jan Hubicka <jh@suse.cz>
2313
2314 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
c9e63184 2315 walkers to walk cgraph and varpool.
7c455d87 2316 (materialize_cgraph): Likewise.
2317 * lto-partition.c (lto_1_to_1_map): Likewise.
2318 (lto_balanced_map): Likewise.
2319 (lto_promote_cross_file_statics): Likewise.
2320
7d0d0ce1 23212012-04-14 Jan Hubicka <jh@suse.cz>
2322
2323 * lto.c: Update field referenced for new cgraph/varpool layout.
2324 * lto-partition.c: Likewise.
2325
50ed40f5 23262012-04-11 Jan Hubicka <jh@suse.cz>
2327
2328 * lto.c: Update copyright; remove params.h, ipa-inline.h
2329 and ipa-utils.h inlines; inline lto-partition.h
2330 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2331 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2332 add_references_to_partition, add_cgraph_node_to_partition_1,
2333 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2334 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2335 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2336 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2337 * lto-partition.c: ... here; new file.
2338 * lto-partition.h: New file.
2339 * Make-lang.in (lto.o): Update dependencies.
2340 (lto-partition.o): New.
2341
37e77161 23422012-04-05 Richard Guenther <rguenther@suse.de>
2343
2344 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2345 definition.
2346
a51edb4c 23472012-03-12 Richard Guenther <rguenther@suse.de>
2348
2349 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2350
90f56810 23512012-03-06 Richard Guenther <rguenther@suse.de>
2352
2353 PR lto/52097
2354 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2355
ff56be02 23562012-02-28 Richard Guenther <rguenther@suse.de>
2357
2358 PR lto/52400
2359 * lto.c (lto_register_function_decl_in_symtab): Do not register
2360 a reverse renamed decl mapping.
2361
3affb5a8 23622012-01-06 Jakub Jelinek <jakub@redhat.com>
2363
2364 PR lto/51774
2365 * lto-lang.c (handle_returns_twice_attribute): New function.
2366 (lto_attribute_table): Add returns_twice attribute.
2367
a7a11a02 23682011-12-21 Richard Guenther <rguenther@suse.de>
2369
2370 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2371 (LTO_FIXUP_TREE): Use it.
2372 (uniquify_nodes): Mark new non-prevailing types and avoid
2373 calling gimple_register_type on others.
2374 (lto_read_decls): Add comment.
2375
949e5786 23762011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2377
2378 * lto.h (lto_parse_hex): Delete.
2379 * lto.c (lto_read_decls): Use 'int' for offsets.
2380 (lto_parse_hex): Make static and return proper 64-bit host type.
2381 (lto_resolution_read): Use proper 64-bit host type.
2382
6cd6787c 23832011-12-13 Richard Guenther <rguenther@suse.de>
2384
2385 PR lto/48354
2386 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2387 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2388
c8c597a7 23892011-12-01 Uros Bizjak <ubizjak@gmail.com>
2390
2391 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2392 (ignore_attribute): New.
2393
ea0e88d1 23942011-11-21 Aldy Hernandez <aldyh@redhat.com>
2395
2396 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2397 (handle_transaction_pure_attribute): New.
2398
954825c9 23992011-11-03 Richard Guenther <rguenther@suse.de>
2400
2401 PR lto/44965
2402 * lto-lang.c (lto_post_options): Do not read file options.
2403 * lto.c (lto_read_all_file_options): Remove.
2404 (lto_init): Call lto_set_in_hooks here.
2405
bc2cc717 24062011-10-09 Jan Hubicka <jh@suse.cz>
2407
2408 * lto.c (node_cmp, varpool_node_cmp): New functions.
2409 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2410 (cmp_partitions): Rename to ...
2411 (cmp_partitions_size): ... this one.
2412 (cmp_partitions_order): New function.
2413 (lto_wpa_write_files): Sort partitions by order when
2414 -fno-toplevel-reorder is used.
2415
a5f12044 24162011-10-09 Andi Kleen <ak@linux.intel.com>
2417
2418 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2419
b9a16870 24202011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2421
2422 * lto-lang.c (def_builtin_1): Delete old interface with two
2423 parallel arrays to hold standard builtin declarations, and replace
2424 it with a function based interface that can support creating
2425 builtins on the fly in the future. Change all uses, and poison
2426 the old names. Make sure 0 is not a legitimate builtin index.
2427
21ebaa24 24282011-10-02 Andi Kleen <ak@linux.intel.com>
805389b2 2429
2430 * lto-object.c (lto_obj_add_section_data): Add list.
2431 (lto_obj_add_section): Fill in list.
2432 (ltoobj_build_section_table): Pass through list.
2433 * lto.c (file_data_list): Declare.
2434 (create_subid_section_table): Pass arguments directly.
2435 Fill in list of file_datas.
2436 (lwstate): Delete.
2437 (lto_create_files_from_ids): Pass in direct arguments.
2438 Don't maintain list.
2439 (lto_file_read): Use explicit section and file data lists.
2440 (lto_read_all_file_options): Pass in section_list.
2441 * lto.h (lto_obj_build_section_table): Add list.
2442 (lto_section_slot): Add next.
2443 (lto_section_list): Declare.
2444
da722561 24452011-10-02 Jan Hubicka <jh@suse.cz>
2446
2447 PR lto/47247
2448 * common.c (lto_resolution_str): Add new resolution.
2449 * common.h (lto_resolution_str): Likewise.
2450
15c58191 24512011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2452 Andi Kleen <ak@linux.intel.com>
2453
2454 PR lto/50568
2455 * lto.c (lto_splay_tree_delete_id): New.
2456 (lto_splay_tree_compare_ids): Likewise.
2457 (lto_splay_tree_lookup): Likewise.
2458 (lto_splay_tree_id_equal_p): Likewise.
2459 (lto_splay_tree_insert): Likewise.
2460 (lto_splay_tree_new): Likewise.
2461 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2462 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2463 (create_subid_section_table): Use lto_splay_tree_lookup and
2464 lto_splay_tree_insert.
2465 (lto_file_read): Use lto_splay_tree_new.
2466
21ebaa24 24672011-09-26 Andi Kleen <ak@linux.intel.com>
badc6cfa 2468
2469 * lto.c (lto_resolution_read): Remove id dumping.
2470 (lto_section_with_id): Turn id HOST_WIDE_ID.
2471 (create_subid_section_table): Dito.
2472
1dc92c59 24732011-08-28 Dodji Seketeli <dodji@redhat.com>
2474
2475 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2476 linemap_add twice.
2477
b6c200c3 24782011-08-11 Martin Jambor <mjambor@suse.cz>
2479
2480 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2481
2541503d 24822011-08-08 Diego Novillo <dnovillo@google.com>
2483
2484 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2485 * lto.c: Include tree-streamer.h.
2486
c38a75b7 24872011-07-06 Richard Guenther <rguenther@suse.de>
2488
2489 * lto-lang.c (lto_init):
2490 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2491
e71f2f1c 24922011-06-11 Jan Hubicka <jh@suse.cz>
2493
ac11d294 2494 PR lto/48246
e71f2f1c 2495 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2496 (lto_balanced_map): Likewise.
2497
c70f46b0 24982011-06-11 Jan Hubicka <jh@suse.cz>
2499
2500 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2501 (add_cgraph_node_to_partition) ... here; walk aliases.
2502 (lto_1_to_1_map): Remove same body alias code.
2503 (promote_fn): Likewise.
2504 (lto_promote_cross_file_statics): Update comment.
2505
2506
bbcef2a7 25072011-06-07 Diego Novillo <dnovillo@google.com>
2508
2509 * lto.c (uniquify_nodes): Move code to register decls to
2510 the loop that computes canonical types.
2511
1af0124d 25122011-06-07 Richard Guenther <rguenther@suse.de>
2513
2514 * lto-lang.c (lto_init): Do not set
2515 size_type_node or call set_sizetype.
2516
a0605d65 25172011-06-04 Diego Novillo <dnovillo@google.com>
2518
2519 * lto.c (lto_init): New.
2520 (lto_main): Call it.
2521
f05c9dfb 25222011-06-03 Diego Novillo <dnovillo@google.com>
2523
2524 * lto.c (get_resolution): Move from lto-streamer-in.c.
2525 (lto_register_var_decl_in_symtab): Likewise.
2526 (lto_register_function_decl_in_symtab): Likewise.
2527 (uniquify_nodes): Call lto_register_var_decl and
2528 lto_register_function_decl_in_symtab after reading a new
2529 VAR_DECL or FUNCTION_DECL.
2530
ed61b909 25312011-06-01 Richard Guenther <rguenther@suse.de>
2532
2533 * lto-lang.c (lto_register_canonical_types): New function.
2534 (lto_init): Register common nodes with the canonical type machinery.
2535 Do not play tricks with char_type_node.
2536
8f2b914f 25372011-05-26 Richard Guenther <rguenther@suse.de>
2538
2539 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2540
1e184c62 25412011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2542
2543 * lto.c (lto_ft_typed): New function.
2544 (lto_ft_common): Call it.
2545 (lto_ft_constructor): Likewise.
2546 (lto_ft_expr): Likewise.
2547 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2548 TREE_CHAIN.
2549
4d83607a 25502011-05-20 Richard Guenther <rguenther@suse.de>
2551
2552 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2553 (lto_ft_type): Move main-variant and pointer-to chain building ...
2554 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2555 in a separate final loop.
2556
bddb3763 25572011-05-19 Richard Guenther <rguenther@suse.de>
2558
2559 * lto.c (uniquify_nodes): First register all types before
2560 fixing up the tree SCC.
2561
c6641d23 25622011-05-11 Jan Hubicka <jh@suse.cz>
2563
2564 PR lto/48952
2565 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2566
8f2eb9e1 25672011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2568
2569 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2570 location of binfo field.
2571 (lto_fixup_prevailing_decls): Likewise.
2572
3a939d12 25732011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2574
2575 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2576 build_function_type_array or build_varargs_function_type_array
2577 instead.
2578
1d2bb655 25792011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2580
2581 * lto-lang.c (global_bindings_p): Return bool.
2582
91bf9d9a 25832011-05-07 Jan Hubicka <jh@suse.cz>
2584
56bef313 2585 * lto.c (lto_materialize_function): Use
2586 cgraph_function_with_gimple_body_p.
2587 (add_cgraph_node_to_partition): Do not re-add items to partition;
2588 handle thunks.
91bf9d9a 2589 (add_varpool_node_to_partition): Do not re-add items to partition.
2590
423ba805 25912011-05-03 Jan Hubicka <jh@suse.cz>
2592
2593 * lto.c (free_ltrans_partitions): Fix accidental commit.
2594
19ad01f7 25952011-05-03 Jan Hubicka <jh@suse.cz>
2596
2597 * lto.c (ltrans_partition_def): Remove GTY annotations.
2598 (ltrans_partitions): Move to heap.
2599 (new_partition): Update.
2600 (free_ltrans_partitions): New function.
2601 (lto_wpa_write_files): Use it.
2602
7771d558 26032011-04-29 Martin Jambor <mjambor@suse.cz>
2604
2605 * lto.c: Include ipa-utils.h.
2606 (lto_balanced_map): Update call to ipa_reverse_postorder.
2607 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2608
d534cab0 26092011-04-29 Michael Matz <matz@suse.de>
2610
2611 * lto.c (toplevel): Include tree-flow.h.
2612 (lto_read_in_decl_state): Don't merge types here.
2613 (tree_with_vars): New static hash table.
2614 (remember_with_vars): New static functions.
2615 (LTO_FIXUP_TYPE): New macro.
2616 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2617 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2618 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2619 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2620 (lto_read_decls): Uniquify while reading in trees.
2621 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2622 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2623 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2624 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2625 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2626 lto_fixup_tree): Remove.
2627 (lto_fixup_state): Remove data argument. Use
2628 lto_symtab_prevailing_decl.
2629 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2630 (lto_fixup_prevailing_decls): New function.
2631 (lto_fixup_state_aux): Argument aux is unused.
2632 (lto_fixup_decls): Don't allocate pointer sets, don't use
2633 lto_fixup_tree, use lto_fixup_prevailing_decls.
2634 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2635 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2636
b630a10e 26372011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2638
2639 * lto.c (lto_balanced_map): Fix typos in head comment.
2640 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2641 test.
2642
cbd7f5a0 26432011-04-16 Jan Hubicka <jh@suse.cz>
2644
2645 * lto.c (lto_balanced_map): Update.
2646
c7b2cc59 26472011-04-14 Jan Hubicka <jh@suse.cz>
2648
2649 * lto.c: Include ipa-inline.h
b630a10e 2650 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2651 accessor.
c7b2cc59 2652 (ipa_node_duplication_hook): Fix declaration.
2653 * Make-lang.in (lto.o): Update dependencies.
2654
9b88d08d 26552011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2656
2657 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2658 calling TREE_CHAIN.
2659 * lto.c (lto_fixup_common): Likewise.
2660
c33080b9 26612011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2662
2663 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2664 (handle_type_generic_attribute): Likewise.
2665
5cd33168 26662011-04-03 Michael Matz <matz@suse.de>
2667
2668 * lto.c (lto_materialize_function): Don't read and then discard
2669 sections in WPA mode.
2670 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2671
2672 * lto-lang.c (registered_builtin_fndecls): Remove.
2673 (lto_getdecls): Return NULL_TREE.
2674 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2675
d45127a1 26762011-03-31 Richard Guenther <rguenther@suse.de>
2677
2678 PR lto/48246
2679 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2680 partitions when checking is not enabled.
2681
82715bcd 26822011-03-25 Kai Tietz <ktietz@redhat.com>
2683
2684 * lto.c (lto_resolution_read): Use filename_cmp instead
2685 of strcmp.
2686 (lto_read_section_data): Likewise.
2687
451c8e2f 26882011-03-25 Jeff Law <law@redhat.com>
2689
2690 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2691
ac86af5d 26922011-03-21 Kai Tietz <ktietz@redhat.com>
2693
2694 PR target/12171
2695 * lto-lang.c (lto_attribute_table): Adjust table.
2696
5a8834a5 26972011-02-18 Jakub Jelinek <jakub@redhat.com>
2698
2699 PR bootstrap/47807
2700 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2701 of lto-streamer.h.
2702
30865946 27032011-02-18 Richard Guenther <rguenther@suse.de>
2704
2705 PR lto/47798
2706 * lto-tree.h (lto_global_var_decls): Do not declare here.
2707 * lto-lang.c: Include lto-streamer.h.
2708 * Make-lang.in (lto-lang.o): Adjust dependencies.
2709
fad71d4f 27102011-02-10 Kai Tietz <kai.tietz@onevision.com>
2711
2712 PR lto/47241
2713 * lto.c (lto_read_section_data): Free
2714 fd_name in failure case.
2715 For mingw targets don't hash file-descriptor.
2716 (read_cgraph_and_symbols): Close current_lto_file
2717 in failure case.
2718
232c9ac7 27192011-01-11 Jan Hubicka <jh@suse.cz>
2720
2721 PR lto/45721
2722 PR lto/45375
b630a10e 2723 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2724 are not partitioned.
232c9ac7 2725
a36cf284 27262010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2727
2728 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2729 Use prototype_p.
2730
6abc14d6 27312010-12-06 Richard Guenther <rguenther@suse.de>
2732
2733 PR lto/46796
2734 * lto-lang.c (lto_init): Give names to basic types.
2735
b96c136c 27362010-11-30 Joseph Myers <joseph@codesourcery.com>
2737
2738 * lto-object.c: Don't include toplev.h.
2739 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2740
92468061 27412010-11-30 Joseph Myers <joseph@codesourcery.com>
2742
2743 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2744 $(TOPLEV_H).
2745
967958e4 27462010-11-29 Joseph Myers <joseph@codesourcery.com>
2747
2748 * lto-endian.h: Delete.
2749 * lto-object.c: Don't include "libiberty.h".
2750 (O_BINARY): Don't define.
2751 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2752 (O_BINARY): Don't define.
2753
baa6eec4 27542010-11-23 Richard Guenther <rguenther@suse.de>
2755
2756 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2757
4f3aea0d 27582010-11-23 Richard Guenther <rguenther@suse.de>
2759
2760 PR lto/46605
2761 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2762
b8ba44e7 27632010-11-17 Joseph Myers <joseph@codesourcery.com>
2764
2765 * lto.c (lto_main): Take no arguments.
2766 * lto.h (lto_main): Update prototype.
2767
2e521e13 27682010-11-16 Ian Lance Taylor <iant@google.com>
2769
2770 * lto-object.c (lto_obj_file_open): Call
2771 simple_object_attributes_merge rather than
2772 simple_object_attributes_compare.
2773
3c6c0e40 27742010-11-12 Joseph Myers <joseph@codesourcery.com>
2775
2776 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2777 * lto-lang.c (lto_handle_option): Take location_t parameter.
2778
bf776685 27792010-11-10 Joseph Myers <joseph@codesourcery.com>
2780
2781 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2782 letters and remove trailing '.'.
2783 (lto_file_finalize): Start diagnostic with a lowercase letter.
2784
e09108e1 27852010-11-02 Ian Lance Taylor <iant@google.com>
2786
2787 * lto-object.c: New file.
2788 * lto-elf.c: Remove file.
2789 * lto-macho.c: Remove file.
2790 * lto-macho.h: Remove file.
2791 * lto-coff.c: Remove file.
2792 * lto-coff.h: Remove file.
2793 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2794 lto/lto-object.o.
2795 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2796 (lto/lto-objfile.o): New target.
2797 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2798 (lto/lto.o): Remove $(LIBIBERTY_H).
2799
4037a4c1 28002010-10-22 Jan Hubicka <jh@suse.cz>
2801
2802 * lto.c (add_cgraph_node_to_partition,
2803 add_varpool_node_to_partition): Add debug info.
2804 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2805 partitioned nodes.
2806 (do_whole_program_analysis): Set function flags before dumping.
2807
7a3ccc3b 28082010-10-22 Richard Guenther <rguenther@suse.de>
2809
2810 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2811 the new gimple_register_canonical_type.
2812
55e9d7d7 28132010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2814
2815 PR bootstrap/45954
2816 * config-lang.in (boot_language): Set to $enable_lto.
2817
d63880ad 28182010-10-18 Jakub Jelinek <jakub@redhat.com>
2819
2820 PR lto/45638
2821 * Make-lang.in (check-lto): New dummy target.
2822
8e8e1ee7 28232010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2824
2825 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2826
f3f006ad 28272010-10-08 Joseph Myers <joseph@codesourcery.com>
2828
2829 * lto-lang.c (lto_init_options): Change to
2830 lto_init_options_struct. Update parameters.
2831 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2832 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2833
1e52cb3c 28342010-10-06 Jan Hubicka <jh@suse.cz>
2835
2836 * lto.c (lto_balanced_map): Fix accounting of program size.
2837
11da9120 28382010-10-06 Jan Hubicka <jh@suse.cz>
2839
2840 * lto.c (lto_balanced_map): Do not produce empty partitions.
2841
21ebaa24 28422010-10-06 Andi Kleen <ak@linux.intel.com>
a3de1f55 2843
2844 * lto.c (lto_process_name): Add.
2845 (lto_main): Call lto_process_name.
2846
7ad28d2a 28472010-10-06 Jan Hubicka <jh@suse.cz>
2848
2849 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2850 COMDATs required by the linker.
2851
eaa13879 28522010-10-05 Ian Lance Taylor <iant@google.com>
2853
2854 * lto.c (lto_section_with_id): Make s a const pointer.
2855
48e3ea52 28562010-10-05 Jan Hubicka <jh@suse.cz>
2857
2858 * lto.c: Include params.h.
2859 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2860 refcounting in aux field.
2861 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2862 New functions.
2863 (lto_1_to_1_map): Simplify.
2864 (lto_balanced_map): New function.
2865 (do_whole_program_analysis): Chose proper partitioning alg.
2866 * Make-lang.in (lto.o): Add dependency on params.h
2867
21ebaa24 28682010-10-04 Andi Kleen <ak@linux.intel.com>
70293f47 2869
2870 * Make-lang.in (lto1): Add + to build rule.
2871
21ebaa24 28722010-10-03 Andi Kleen <ak@linux.intel.com>
fd30d60a 2873
2874 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
c9e63184 2875 with fatal_error.
fd30d60a 2876
4a68fd3c 28772010-09-28 Jan Hubicka <jh@suse.cz>
2878
2879 * lto-lang.c (handle_leaf_attribute): New function.
2880 (lto_attribute_tables): Add leaf.
2881
2edfba82 28822010-09-25 Jie Zhang <jie@codesourcery.com>
2883
2884 * lto.c (lto_read_all_file_options): Start a new line after
2885 printing out file names.
2886
9ced88d0 28872010-09-24 Jan Hubicka <jh@suse.cz>
2888
2889 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2890
7ae8b539 28912010-09-20 Jan Hubicka <jh@suse.cz>
2892
2893 PR tree-optimize/45605
2894 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2895
be1a554f 28962010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2897
2898 * lto-elf.c (lto_obj_file_open): Also provide filename when
2899 elf_begin fails.
2900
7de998de 29012010-09-17 Jan Hubicka <jh@suse.cz>
2902
2903 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2904
78d063c8 29052010-09-17 Richard Guenther <rguenther@suse.de>
2906
2907 * lang.opt (flag_wpa): Also enable for the driver.
2908
cdc58a66 29092010-09-16 Jan Hubicka <jh@suse.cz>
2910
2911 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2912 EXTERNAL flags.
2913
7b80d28f 29142010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2915
2916 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2917
3210ebe5 29182010-09-08 Jan Hubicka <jh@suse.cz>
2919
2920 * lto.c (real_file_count, real_file_decl_data): New static vars.
2921 (read_cgraph_and_symbols): Use it.
2922
7a52b640 29232010-09-08 Richard Guenther <rguenther@suse.de>
2924
2925 * lto.c (read_cgraph_and_symbols): Collect again after each
2926 file.
2927
be147e7f 29282010-09-07 Jan Hubicka <jh@suse.cz>
2929
2930 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2931
56c34a25 29322010-09-03 Richard Guenther <rguenther@suse.de>
2933
2934 * lto-elf.c (validate_file): Always error if validation fails.
2935
c5cc4842 29362010-08-20 Jan Hubicka <jh@suse.cz>
2937
2938 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2939 (lto_wpa_write_files): Update comments.
2940
9543655f 29412010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2942
2943 PR bootstrap/45357
2944 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2945 with has_analyzed_clone_p.
2946
97b862d3 29472010-08-20 Jan Hubicka <jh@suse.cz>
2948
2949 * lto.c (has_analyzed_clone_p): New function
2950 (lto_materialize_function): Use callgraph to determine if
2951 body is needed.
2952 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2953
48148244 29542010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2955
2956 * lto.c: Use FOR_EACH_VEC_ELT.
2957
21ebaa24 29582010-07-27 Andi Kleen <ak@linux.intel.com>
eb219e9c 2959
2960 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2961
b78351e5 29622010-07-27 Joseph Myers <joseph@codesourcery.com>
2963
2964 * lto-lang.c (lto_handle_option): Update prototype and return
2965 value type. Remove duplicate assignment to result.
2966
e88d34f6 29672010-07-27 Joseph Myers <joseph@codesourcery.com>
2968
2969 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2970 New.
2971 (lto_init_options): Update prototype.
2972 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2973 Define.
2974
21ebaa24 29752010-07-10 Andi Kleen <ak@linux.intel.com>
f18bad33 2976
2977 PR lto/44992
c9e63184 2978 * lto.c: Include splay-tree.h
f18bad33 2979 (lto_resolution_read): Change to walk file_ids tree and parse
2980 extra file_id in resolution file.
2981 (lto_section_with_id): Add.
2982 (create_subid_section_table): Add.
2983 (lwstate): Add.
2984 (lto_create_files_from_ids): Add.
2985 (lto_file_read): Change to handle sub file ids and create list
2986 of file_datas. Add output argument for count.
2987 (get_section_data): Pass file_data to lto_get_section_name.
2988 (lto_flatten_file): Add.
2989 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2990
21ebaa24 29912010-07-10 Andi Kleen <ak@linux.intel.com>
58d9117a 2992
2993 * lto-coff.c (hash_name, eq_name): Move.
2994 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2995 * lto-elf.c: (hash_name, eq_name): Move.
2996 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2997 * lto-macho.c: (hash_name, eq_name): Move.
2998 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2999 * lto.c: (hash_name, eq_name): Move from lto-*.c
3000 (lto_obj_create_section_hash_table): Add.
3001 (free_with_string): Add.
3002
0b205f4c 30032010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3004
3005 * lto-coff.c: Include diagnostic-core.h in every file that
3006 includes toplev.h.
3007 * lto-elf.c: Likewise.
3008 * lto-lang.c: Likewise.
3009 * lto-macho.c: Likewise.
3010
9dccd5de 30112010-07-07 Jakub Jelinek <jakub@redhat.com>
3012
3013 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3014 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3015 objects.
3016
7550e1d1 30172010-07-05 Jan Hubicka <jh@suse.cz>
3018
3019 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3020 nodes from same comdat group as well as all comdat functions referenced
3021 here.
b630a10e 3022 (add_varpool_node_to_partition, add_references_to_partition): New
3023 function.
3024 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3025 add_varpool_node_to_partition; clear aux flags when done.
3026 (lto_promote_cross_file_statics): Do not promote stuff that gets
3027 duplicated to each ltrans.
7550e1d1 3028
01ec0a6c 30292010-07-04 Jan Hubicka <jh@suse.cz>
3030
c9e63184 3031 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
01ec0a6c 3032
09eb10ed 30332010-06-13 Richard Guenther <rguenther@suse.de>
3034
3035 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3036
6c8c5385 30372010-06-09 Kai Tietz <kai.tietz@onevision.com>
3038
3039 * lto.c (lto_resolution_read): Pre-initialize local variable r.
3040 * lto-coff.c (coff_write_object_file): Add braces to if.
3041
ba72912a 30422010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3043
3044 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3045 (lto_file_read): Likewise.
3046 (new_partition): Likewise.
3047 (read_cgraph_and_symbols): Likewise.
3048
4aafe913 30492010-06-07 Joseph Myers <joseph@codesourcery.com>
3050
3051 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3052 (lto_handle_option): Don't set flag_signed_char here.
3053
fab8a209 30542010-06-04 Richard Guenther <rguenther@suse.de>
3055
3056 PR lto/41584
3057 * lto.c (lto_1_to_1_map): Use the proper file_data for
3058 varpool nodes.
3059
ecb08119 30602010-05-30 Jan Hubicka <jh@suse.cz>
3061
3062 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3063 partitioning decisions.
3064
68b8d829 30652010-05-29 Jan Hubicka <jh@suse.cz>
3066
3067 * lto.c (bitmap vector): Remove.
3068 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3069 (ltrans_partition_def): New structure.
3070 (ltrans_partition): New type and VECtor.
3071 (new_partition): New function.
3072 (add_cgraph_node_to_partition): New function.
3073 (lto_1_to_1_map): Reorganize for partitions.
3074 (lto_add_inline_clones): Remove.
3075 (lto_add_all_inlinees): Remove.
3076 (lto_promote_cross_file_statics): Use partitions.
3077 (cmp_partitions): New function.
3078 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3079 use partitions; output files sorted by size.
3080
ea269688 30812010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3082
3083 * Make-lang.in: Replace vec.h dependency with VEC_H.
3084
8fb69344 30852010-05-28 Joseph Myers <joseph@codesourcery.com>
3086
3087 * lto-coff.c (coff_errmsg): Remove.
3088 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3089 errors instead of coff_errmsg (-1).
3090 * lto-macho.c (mach_o_errmsg): Remove.
3091 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3092 instead of mach_o_errmsg (-1).
3093 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3094 xstrerror (errno).
3095
2024fa7d 30962010-05-28 Richard Guenther <rguenther@suse.de>
3097
3098 * lto.c (prefix_name_with_star): Removed.
3099 (strip_extension): Likewise.
3100 (get_filename_for_set): Likewise.
3101 (lto_write_ltrans_list): Fold into ...
3102 (lto_wpa_write_files): ... this. Name LTRANS units
3103 by suffixing the ltrans output list filename.
3104 (do_whole_program_analysis): Adjust.
3105
852f689e 31062010-05-27 Joseph Myers <joseph@codesourcery.com>
3107
3108 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3109 (read_cgraph_and_symbols, lto_main): Use seen_error.
3110 * Make-lang.in (lto/lto.o): Update dependencies.
3111
3c9e9cba 31122010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3113
3114 PR lto/44230
3115 * lto.h (lto_eh_personality): New prototype.
3116 * lto.c: Include debug.h.
3117 (first_personality_decl): New static variable.
3118 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3119 first function for which it is non-null.
3120 (lto_eh_personality_decl): New static variable.
3121 (lto_eh_personality): New function.
3122 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3123 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3124
cdd0ea37 31252010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3126
3127 * lto-lang.c: Do not include expr.h.
3128
71eb351d 31292010-05-24 Richard Guenther <rguenther@suse.de>
3130
3131 * lto-elf.c (lto_obj_build_section_table): Work around
3132 FreeBSD libelf issue.
3133
ca3e35a1 31342010-05-22 Richard Guenther <rguenther@suse.de>
3135
3136 * lto.c (read_cgraph_and_symbols): Do not collect.
3137
e5507c85 31382010-05-20 Jan Hubicka <jh@suse.cz>
3139
3140 * lto.c (promote_var, promote_fn): New functions.
3141 (lto_promote_cross_file_statics): Compute correctly boundary including
3142 static initializers of readonly vars.
3143
a510bd8d 31442010-05-18 Jan Hubicka <jh@suse.cz>
3145
e5507c85 3146 * lto.c (lto_1_to_1_map): Partition non-inline clones.
a510bd8d 3147 (lto_promote_cross_file_statics): Deal with non-inline clones.
3148
1375c6f8 31492010-05-18 Jan Hubicka <jh@suse.cz>
3150
3151 * lto.c (lto_materialize_function): Announce function when
3152 reading body; allocate_struct_function only when reading body;
3153 do not finalize local statics; ggc_collect after reading;
3154 do not mark reachable node.
3155 (materialize_cgraph): Do not announce function.
3156
757a3237 31572010-05-11 Jan Hubicka <jh@suse.cz>
3158
3159 * lto.c (materialize_cgraph): Revert my previous patch.
3160
942dc465 31612010-05-11 Kai Tietz <kai.tietz@onevision.com>
3162
3163 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3164 IMAGE_FILE_MACHINE_AMD64.
3165 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3166
b4c8770a 31672010-05-11 Jan Hubicka <jh@suse.cz>
3168
3169 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3170 (materialize_cgraph): Add it here.
3171
25429dc2 31722010-05-11 Jan Hubicka <jh@suse.cz>
3173
3174 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3175 vector.
3176
31772010-05-11 Jan Hubicka <jh@suse.cz>
3178
3179 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3180 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3181 use reachable_from_other_partition_p and
3182 referenced_from_other_partition_p test.
3183
6dd40464 31842010-05-11 Kai Tietz <kai.tietz@onevision.com>
3185
3186 * lto-coff.c (validate_file): Add x64-coff support.
3187 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3188 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3189 * lto-lang.c (lto_build_c_type_nodes): Add check for
3190 'long long unsigned int' for x64-windows.
3191 (lto_init): Likewise.
3192
3193
23433d72 31942010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3195
3196 * lto.h (struct lto_file_struct): Document offset member.
3197 * lto-endian.h: New file.
3198 * lto-macho.h: New file.
3199 * lto-macho.c: New file.
3200 * Make-lang.in: Add rule for lto-macho.o.
3201
92a44a68 32022010-05-07 Richard Guenther <rguenther@suse.de>
eb4ef3d1 3203
3204 PR lto/43857
3205 PR lto/43371
3206 * lang.opt (fresolution): Change to ...
3207 (fresolution=): ... this.
3208 * lto-lang.c (lto_handle_option): Adjust.
3209
264cbb51 32102010-05-07 Richard Guenther <rguenther@suse.de>
3211
3212 * lto.c (DUMPBASE_SUFFIX): Remove.
3213 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3214 Rename to ...
3215 (lto_write_ltrans_list): ... only output the list of ltrans files.
3216 (lto_maybe_unlink): Remove.
3217 (do_whole_program_analysis): Do not execute LTRANS phase
3218 from here.
3219
11dc3713 32202010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3221
3222 * lto-lang.c (lto_handle_option): Add argument kind.
3223
8d810329 32242010-05-05 Jan Hubicka <jh@suse.cz>
3225
264cbb51 3226 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3227 refs.
8d810329 3228
a238367f 32292010-05-05 Jan Hubicka <jh@suse.cz>
3230
3231 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3232
bf7d782b 32332010-04-30 Jan Hubicka <jh@suse.cz>
3234
b630a10e 3235 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3236 use default name.
bf7d782b 3237 (lto_wpa_write_files): Write any non-empty partition.
3238
da67d826 32392010-04-30 Jan Hubicka <jh@suse.cz>
3240
3241 * lto.c: Do not attempt to make constant pool references global.
3242
57305941 32432010-04-28 Jan Hubicka <jh@suse.cz>
3244
3245 * lto/lto.c (lto_read_in_decl_state): Use GGC.
3246 (lto_wpa_write_files): Announce what we are writting.
3247 (all_file_decl_data): New.
3248 (read_cgraph_and_symbols): Use GGC; correct timevars.
3249 (do_whole_program_analysis): Collect.
3250 * lto/Make-lang.in (lto.o): Fix dependency.
3251 * Makefile.in (GTFILES): Add lto-streamer.h.
3252 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3253 (varpool_assemble_pending_decls): Use VAROUT.
3254 * lto-streamer.h (lto_tree_ref_table): Annotate.
3255 (lto_in_decl_state): Annotate.
3256 (lto_file_decl_data): Annotate.
3257
0cddb138 32582010-04-28 Jan Hubicka <jh@suse.cz>
3259
3260 * lto.c (lto_varpool_node_sets): New.
3261 (lto_1_to_1_map): Partition varpool too.
3262 (globalize_context_t, globalize_cross_file_statics,
3263 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3264 lto_scan_statics_in_remaining_global_vars): Remove.
3265 (lto_promote_cross_file_statics): Rewrite.
3266 (get_filename_for_set): Take vset argument.
3267 (lto_wpa_write_files): Pass around vsets.
3268
4d992eb6 32692010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3270
3271 PR lto/42776
3272 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3273 hardcoding 'lto-elf.o'.
3274 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3275
3276 * lto-coff.h: New file.
3277 * lto-coff.c: Likewise.
3278
9c491711 32792010-04-26 Richard Guenther <rguenther@suse.de>
3280
3281 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3282
3ba0ce47 32832010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3284
3285 * lto.h (lto_elf_file_open): Rename prototype from this ...
3286 (lto_obj_file_open): ... to this.
3287 (lto_elf_file_close): Likewise ...
3288 (lto_obj_file_close): ... and likewise.
3289 (lto_elf_build_section_table): Likewise ...
3290 (lto_obj_build_section_table): ... and likewise.
3291 (lto_elf_begin_section): Likewise ...
3292 (lto_obj_begin_section): ... and likewise.
3293 (lto_elf_append_data): Likewise ...
3294 (lto_obj_append_data): ... and likewise.
3295 (lto_elf_end_section): Likewise ...
3296 (lto_obj_end_section): ... and likewise.
3297 * lto.c (lto_file_read): Update references to the above.
3298 (lto_wpa_write_files): Likewise.
3299 (lto_read_all_file_options): Likewise.
3300 (read_cgraph_and_symbols): Likewise.
3301 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3302 (LANG_HOOKS_APPEND_DATA): Likewise.
3303 (LANG_HOOKS_END_SECTION): Likewise.
3304 * lto-elf.c (lto_elf_file_open): Rename from this ...
3305 (lto_obj_file_open): ... to this, updating any references.
3306 (lto_elf_file_close): Likewise ...
3307 (lto_obj_file_close): ... and likewise.
3308 (lto_elf_build_section_table): Likewise ...
3309 (lto_obj_build_section_table): ... and likewise.
3310 (lto_elf_begin_section): Likewise ...
3311 (lto_obj_begin_section): ... and likewise.
3312 (lto_elf_append_data): Likewise ...
3313 (lto_obj_append_data): ... and likewise.
3314 (lto_elf_end_section): Likewise ...
3315 (lto_obj_end_section): ... and likewise.
3316
5a2aecd6 33172010-04-21 Jan Hubicka <jh@suse.cz>
3318
3319 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3320 (materialize_cgraph): Likewise.
3321
ddc90d88 33222010-04-21 Jan Hubicka <jh@suse.cz>
3323
3324 * lto.c (lto_wpa_write_files): Update.
3325 (read_cgraph_and_symbols): Be more verbose.
3326 (materialize_cgraph): Likewise.
3327 (do_whole_program_analysis): Likewise.
3328
e288c7a9 33292010-04-21 Jan Hubicka <jh@suse.cz>
3330
3331 * lto.c (globalize_cross_file_statics): When function has address taken,
3332 it needs to be public.
3333
08843223 33342010-04-20 Jan Hubicka <jh@suse.cz>
3335
3336 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3337 (lto_add_all_inlinees): Likewise.
3338 (lto_wpa_write_files): Likewise.
3339
ad086ed4 33402010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3341
3342 * lto-lang.c (lto_init): Remove second argument in call to
3343 build_common_tree_nodes.
3344
d6845139 33452010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3346
3347 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3348 function.
3349
a5813485 33502010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3351
3352 PR bootstrap/43276
3353 * lto-elf.c: Define EM_* constants if not already defined.
3354
a219f6a5 33552010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3356
3357 * lto-elf.c (is_compatible_architecture): New static function.
3358 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3359
2bd888dc 33602010-02-11 Richard Guenther <rguenther@suse.de>
3361
3362 PR driver/43021
3363 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3364 appropriately.
3365
27721832 33662010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3367
3368 * lto.c (O_BINARY): Define.
3369 (lto_read_section_data): Open file in binary mode.
3370 * lto-elf.c (O_BINARY): Define.
3371 (lto_elf_file_open): Open file in binary mode.
3372
3bfd70ae 33732010-01-08 Richard Guenther <rguenther@suse.de>
3374
3375 PR lto/42528
3376 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3377 (lto_init): Do not init char_type_node in a standard way
3378 but according to flag_signed_char.
3379
50ca7c37 33802010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3381
3382 PR lto/41564
3383 * lto.c (DUMPBASE_SUFFIX): New.
3384 (lto_execute_ltrans): Append a sequence number to -dumpbase
3385 for LTRANS.
3386
d5e86d20 33872010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3388
3389 PR lto/42580
3390 * lto-elf.c (lto_elf_file_open): Stop if the command line
3391 option file is missing.
3392
08a7e80f 33932009-12-15 Richard Guenther <rguenther@suse.de>
3394
3395 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3396 (lto_post_options): Do not disable debuginfo.
3397
4af4d09c 33982009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3399
3400 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3401
50b2dbd9 34022009-12-11 Richard Guenther <rguenther@suse.de>
3403
3404 PR lto/42037
3405 * lto.c (lto_resolution_read): Properly grow the vector.
3406
97e90c2e 34072009-12-11 Richard Guenther <rguenther@suse.de>
3408
3409 PR lto/41915
3410 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3411 to the C99 default. Do not set flag_unit_at_a_time.
3412
f018d957 34132009-11-28 Jakub Jelinek <jakub@redhat.com>
3414
3415 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3416 variable.
3417
81897669 34182009-11-19 Rafael Avila de Espindola <espindola@google.com>
3419
3420 PR bootstrap/42096
3421 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3422 * lto.c (lto_parse_hex): New.
3423 (lto_resolution_read): Use lto_parse_hex.
3424 * lto.h (lto_parse_hex): New.
3425
b7fedf62 34262009-11-17 Rafael Avila de Espindola <espindola@google.com>
3427
3428 * lto-elf.c (lto_file_init): Add offset argument.
3429 (lto_elf_file_open): Record the offset.
3430 * lto.c (lto_resolution_read): Change file_name into a lto_file
3431 argument. Check offsets.
3432 (lto_file_read): Update call to lto_resolution_read.
3433 * lto.h (lto_file_struct): Add the offset field.
3434
6575099f 34352009-11-16 Rafael Avila de Espindola <espindola@google.com>
3436
3437 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3438
6d1cc52c 34392009-11-14 Jan Hubicka <jh@suse.cz>
3440
3441 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3442
d405c5a4 34432009-11-12 Rafael Avila de Espindola <espindola@google.com>
3444
3445 * lang.opt (fresolution): Renamed from resolution.
3446 * lto-lang.c (lto_handle_option): Handle new option name.
3447 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3448
06b9e52b 34492009-11-04 Richard Guenther <rguenther@suse.de>
c9e63184 3450 Rafael Avila de Espindola <espindola@google.com>
06b9e52b 3451
3452 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3453 (lto_elf_file_open): Handle offsets in arguments name@offest.
3454
f5a023c5 34552009-10-30 Richard Guenther <rguenther@suse.de>
3456
3457 PR lto/41858
3458 * lto.c (lto_file_read): Do not set file_data->fd.
3459 (lto_read_section_data): Use a single-entry file-descriptor cache.
3460 Do not check the result of xmalloc.
3461 (free_section_data): Do not use file_data->fd.
3462 (lto_read_all_file_options): Likewise.
3463
21ce3cc7 34642009-10-22 Richard Guenther <rguenther@suse.de>
3465
3466 * lto.c (lto_fixup_jump_functions): Remove.
3467 (lto_fixup_decls): Do not fixup jump functions.
3468 (read_cgraph_and_symbols): Schedule cgraph merging after
3469 summary reading. Schedule type and decl fixup before
3470 summary reading.
3471
5575303a 34722009-10-22 Richard Guenther <rguenther@suse.de>
3473
3474 * lto.c (lto_fixup_data_t): Remove free_list member.
3475 (lto_fixup_tree): Do not insert into free_list.
3476 (free_decl): Remove.
3477 (lto_fixup_decls): Remove free-list handling.
3478
8867b500 34792009-10-22 Jan Hubicka <jh@suse.cz>
3480
3481 * lto.c (lto_fixup_jump_functions): New function.
3482 (lto_fixup_decls): Use it.
3483
b787522e 34842009-10-16 Richard Guenther <rguenther@suse.de>
3485
3486 PR lto/41715
3487 * lto.c (lto_fixup_tree): Revert last change.
3488
bc0ed27c 34892009-10-14 Richard Guenther <rguenther@suse.de>
3490
3491 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3492 compatible with the one we replace wrap it around a
3493 VIEW_CONVERT_EXPR.
3494
c515f146 34952009-10-09 Richard Guenther <rguenther@suse.de>
3496
3497 PR lto/41635
3498 PR lto/41636
3499 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3500 a file.
3501 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3502 (init_ehdr##BITS): Likewise.
3503
48cf7037 35042009-10-08 Joseph Myers <joseph@codesourcery.com>
3505
3506 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3507 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3508 diagnostics.
3509 * lto-lang.c (lto_post_options): Remove trailing "." from
3510 diagnostics.
3511
7366cbe7 35122009-10-08 Richard Guenther <rguenther@suse.de>
3513
3514 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3515 hash tables.
3516
7c3f71c3 35172009-10-07 Joseph Myers <joseph@codesourcery.com>
3518
3519 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3520
59dd4830 35212009-10-07 Jan Hubicka <jh@suse.cz>
3522
3523 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3524 ltrans stage; explain why this is needed and should not.
3525
fd193bcd 35262009-10-05 Richard Guenther <rguenther@suse.de>
3527
3528 PR lto/41552
3529 PR lto/41487
3530 * lto.c (lto_read_decls): Do not register deferred decls.
3531 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3532 until after reading the IPA summaries.
3533
7bfefa9d 35342009-10-02 Rafael Avila de Espindola <espindola@google.com>
3535
3536 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3537 (lto-lang.c): Don't include lto/common.h.
3538
35392009-10-02 Rafael Avila de Espindola <espindola@google.com>
3540
3541 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3542 (lto/common.o): Remove.
3543 * common.c: Remove.
3544 * common.h (lto_kind_str): Remove.
3545 (lto_visibility_str): Remove.
3546 (lto_resolution_str): Make it static.
3547
35482009-10-01 Diego Novillo <dnovillo@google.com>
3549
3550 * lto.c (lto_read_decls): Add comment.
3551 Call internal_error instead of gcc_assert.
3552 (lto_resolution_read): Likewise.
3553 (lto_add_all_inlinees): Tidy.
3554 * Make-lang.in: Fix copyright boilerplate.
3555 (lto.pdf): New.
3556 (lto.install-pdf): New.
3557 * lto-tree.h: Fix copyright boilerplate.
3558 * lang-specs.h: Likewise.
3559 Remove ".lto" entry from compilers fragment.
3560 * lto-elf.c: Move inclusion of gelf.h after config.h.
3561 Tidy formatting everywhere.
3562 * lto.h: Fix copyright boilerplate.
3563 Tidy formatting everywhere.
3564 * common.c: Likewise.
3565 * config-lang.in: Likewise.
3566 * common.h: Likewise.
3567 * lto-lang.c: Likewise.
3568
35692009-10-01 Richard Guenther <rguenther@suse.de>
3570
3571 * lto.c (lto_read_section_data): Use plain lseek/read.
3572
35732009-10-01 Richard Guenther <rguenther@suse.de>
3574
3575 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3576 use sysconf to query the system page size.
3577 (lto_file_read): Implement fallback using stdio.
3578 (free_section_data): Likewise.
3579
35802009-09-29 Diego Novillo <dnovillo@google.com>
3581
3582 * lto-lang.c (lto_init): Really fix call to
3583 build_common_builtin_nodes.
3584
35852009-09-29 Diego Novillo <dnovillo@google.com>
3586
3587 * lto-lang.c (lto_init): Fix call to
3588 build_common_builtin_nodes.
3589
35902009-09-29 Richard Guenther <rguenther@suse.de>
3591
3592 PR lto/40754
3593 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3594 in bytes.
3595 (first_data_block): New static variable.
3596 (lto_elf_append_data): Align the first data block in each
3597 section.
3598
35992009-09-28 Diego Novillo <dnovillo@google.com>
3600
3601 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3602 * lto.c (strip_extension): New.
3603 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3604 (lto_execute_ltrans): Tidy.
3605 Do not pass -fwpa nor -fltrans-* to LTRANS.
3606 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3607 * tree.c (need_assembler_name_p): Call
3608 lang_hooks.decls.may_need_assembler_name_p if set.
3609 * varasm.c (default_binds_local_p_1): Remove check for
3610 flag_ltrans.
3611 * varpool.c (decide_is_variable_needed): Do not test for
3612 in_lto_p.
3613
36142009-09-22 Richard Guenther <rguenther@suse.de>
3615
3616 PR lto/39276
3617 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3618 * Make-lang.in: Remove ltrans-driver stuff.
3619 * config-lang.in: Likewise.
3620 * lang.opt (fltrans-driver): Remove.
3621 * lto-lang.c (lto_init_options): Remove code initializing
3622 ltrans_driver.
3623 * ltrans-driver: Remove.
3624
36252009-09-21 Diego Novillo <dnovillo@google.com>
3626
3627 * lto-lang.c (lto_define_builtins): Remove superfluous
3628 calls to targetm.init_builtins and build_common_builtin_nodes.
3629 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3630 build_common_builtin_nodes.
3631 * lto.c (lto_materialize_function): Do nothing if NODE is a
3632 clone.
3633
36342009-09-03 Diego Novillo <dnovillo@google.com>
3635
3636 * lto-elf.c (validate_file): Replace call to
3637 elf_getshstrndx with call to elf_getshdrstrndx.
3638
36392009-08-19 Richard Guenther <rguenther@suse.de>
3640
3641 * lto-lang.c (lto_init): Merge char_type_node with the
3642 appropriately signed variant.
3643
36442009-08-19 Richard Guenther <rguenther@suse.de>
3645
3646 PR lto/41071
3647 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3648 (lto_fixup_type): Re-build the pointer-to chain part two.
3649
36502009-08-19 Richard Guenther <rguenther@suse.de>
3651
3652 PR lto/41071
3653 * lto.c (lto_fixup_type): Re-build the type variant chain.
3654
36552009-08-19 Richard Guenther <rguenther@suse.de>
3656
3657 PR lto/41071
3658 * lto.c (lto_fixup_constructor): New function.
3659 (lto_fixup_tree): Replace all types. Properly fixup
3660 constructors and constants.
3661
36622009-08-14 Richard Guenther <rguenther@suse.de>
3663
3664 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3665 for DECL_LANG_SPECIFIC.
3666
36672009-08-13 Richard Guenther <rguenther@suse.de>
3668
3669 PR lto/41032
3670 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3671
36722009-07-30 Richard Guenther <rguenther@suse.de>
3673
3674 PR lto/40903
3675 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3676 the largest decl for output and free TREE_CHAIN for further
3677 use.
3678
36792009-07-24 Diego Novillo <dnovillo@google.com>
3680
3681 * Make-lang.in: Add empty lto.install-plugin target.
3682
36832009-07-13 Diego Novillo <dnovillo@google.com>
3684
3685 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3686
36872009-07-11 Richard Guenther <rguenther@suse.de>
3688
3689 * lto-lang.c (lto_write_globals): Wrapup global decls.
3690
36912009-07-10 Richard Guenther <rguenther@suse.de>
3692
3693 * lto-lang.c (lto_init): Allocate one more location to make
3694 BUILTINS_LOCATION correct.
3695
36962009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3697
3698 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3699
37002009-07-06 Diego Novillo <dnovillo@google.com>
3701
3702 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3703 TYPE_SIZE_UNIT.
3704
37052009-07-06 Diego Novillo <dnovillo@google.com>
3706
3707 * lto.c (preload_common_nodes): Remove.
3708 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3709 (lto_read_decls): Call lto_data_in_create and
3710 lto_data_in_delete.
3711 (free_decl): Do not call ggc_free.
3712 (lto_main): Call lto_init_reader.
3713 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3714 (lto_init): Initialize main_identifier_node if needed.
3715 Make ptrdiff_type_node be integer_type_node.
3716
37172009-06-19 Diego Novillo <dnovillo@google.com>
3718
3719 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3720 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3721 Remove code guarded by #ifdef LOCAL_TRACE.
3722
37232009-06-18 Diego Novillo <dnovillo@google.com>
3724
3725 * lto.c: Update license to GPLv3.
3726 * lto-elf.c: Likewise.
3727 * common.c: Likewise.
3728 * lto-lang.c: Likewise.
3729 * lto.h: Remove superfluous include files. Update all
3730 users.
3731
37322009-06-17 Diego Novillo <dnovillo@google.com>
3733
3734 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3735
37362009-06-02 Diego Novillo <dnovillo@google.com>
3737
3738 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3739 read in.
3740 (materialize_cgraph): Only materialize nodes that have a
3741 representation on file.
3742
37432009-06-01 Diego Novillo <dnovillo@google.com>
3744
3745 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3746
37472009-05-31 Diego Novillo <dnovillo@google.com>
3748
3749 * lto-lang.c (lto_type_for_mode): Handle all the modes
3750 handled in c_common_type_for_mode.
3751
37522009-05-21 Diego Novillo <dnovillo@google.com>
3753
3754 * lto-elf.c: Always include <gelf.h>.
3755 * config-lang.in (target_libs): Remove.
3756 (build_by_default): Set to no.
3757
37582009-05-15 Diego Novillo <dnovillo@google.com>
3759
3760 * lto.c (lto_materialize_function): Assert that DECL is
3761 not a builtin.
3762 (materialize_cgraph): Don't try to materialize builtin
3763 functions.
3764 * lto-section-out.c (write_symbol_vec): Do not write
3765 builtin functions.
3766
37672009-05-13 Diego Novillo <dnovillo@google.com>
3768
3769 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3770
37712009-05-07 Diego Novillo <dnovillo@google.com>
3772
3773 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3774 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3775 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3776 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3777 (lto_fixup_tree): Call gimple_register_type when *TP is a
3778 type.
3779 (lto_main): Call bitmap_obstack_initialize.
3780
37812009-04-22 Diego Novillo <dnovillo@google.com>
3782
3783 * lto.c (free_section_data): Tidy.
3784 (lto_1_to_1_map): Tidy.
3785 (lto_add_all_inlinees): Tidy.
3786 (prefix_name_with_star): New.
3787 (get_filename_for_set): New.
3788 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3789 to determine what cgraph node sets to write.
3790 Call get_filename_for_set to compute temporary file
3791 names.
3792 (lto_execute_ltrans): Do not execute LTRANS on files with
3793 names that start with '*'.
3794 Move logic to execute LTRANS together so that LTRANS is
3795 invoked only if there are any files to compile.
3796 (do_whole_program_analysis): Only remove output files
3797 that do not start with '*'.
3798
37992009-04-06 Diego Novillo <dnovillo@google.com>
3800
3801 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3802 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3803 (lto_add_all_inlinees): Tidy.
3804
38052009-03-26 Diego Novillo <dnovillo@google.com>
3806
3807 * lto.c: Include gimple.h.
3808 (lto_read_in_decl_state): Call gimple_register_type for
3809 every type in every stream.
3810 (lto_fixup_common): Call gimple_register_type if T has a
3811 type.
3812 (do_whole_program_analysis): Call print_lto_report.
3813 (lto_main): Call print_lto_report after cgraph_optimize.
3814 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3815
38162009-03-24 Diego Novillo <dnovillo@google.com>
3817
3818 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3819 (lto.o): Add dependency on GIMPLE_H.
3820
38212009-03-10 Simon Baldwin <simonb@google.com>
3822
3823 * lto.c (lto_read_all_file_options): Close any open file descriptor
3824 contained in file_data before freeing.
3825
38262009-02-24 Rafael Avila de Espindola <espindola@google.com>
3827
3828 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3829 for a decl in the original bitmap, not a node.
3830 (lto_add_all_inlinees): Remove original nodes that are not needed.
3831 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3832
38332009-02-24 Diego Novillo <dnovillo@google.com>
3834
3835 * lto.c (lto_materialize_function): Update
3836 lto_stats.num_function_bodies.
3837 (get_section_data): Initialize *LEN to 0.
3838 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3839 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3840 Update lto_stats.num_output_files.
3841 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3842 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3843 (lto_main): Initialize lto_stats.
3844 If flag_lto_report is set, call print_lto_report.
3845
38462009-02-19 Diego Novillo <dnovillo@google.com>
3847
3848 Revert
3849
3850 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3851
3852 * lto.c (lto_add_inline_clones): Don't add the
3853 master clone. Check for a decl in the original
3854 bitmap, not a node.
3855 (lto_add_all_inlinees): Remove original nodes
3856 that are not needed.
3857 (lto_scan_statics_in_cgraph_node): Don't care if
3858 the node is the master.
3859 (lto_promote_cross_file_statics): Use a new
3860 context.seen_node_decls for each set
3861
38622009-02-19 Rafael Avila de Espindola <espindola@google.com>
3863
3864 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3865 for a decl in the original bitmap, not a node.
3866 (lto_add_all_inlinees): Remove original nodes that are not needed.
3867 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3868 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3869 for each set
3870
38712009-02-18 Diego Novillo <dnovillo@google.com>
3872
3873 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3874 and TV_WHOPR_WPA_IO.
3875 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3876 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3877 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3878 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3879 depending on command line flags.
3880 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3881 (lto_main): Remove timer uses.
3882
38832009-02-18 Rafael Avila de Espindola <espindola@google.com>
3884
3885 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3886 (lto_wpa_write_files): Update calls to renamed functions.
3887
38882009-02-17 Diego Novillo <dnovillo@google.com>
3889
3890 PR 39203
3891 * lto-lang.c (lto_post_options): Disable -fwhole-program
3892 when running LTRANS.
3893
38942009-02-10 Diego Novillo <dnovillo@google.com>
3895
3896 * lto.c (read_cgraph_and_symbols): Fix comment.
3897
38982009-02-10 Diego Novillo <dnovillo@google.com>
3899
3900 * lto.c (read_cgraph_and_symbols): Read options from all
3901 IL files.
3902
39032009-02-10 Diego Novillo <dnovillo@google.com>
3904
3905 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3906 (materialize_cgraph): Likewise.
3907 (do_whole_program_analysis): Likewise.
3908 (lto_main): Call read_cgraph_and_symbols,
3909 materialize_cgraph and do_whole_program_analysis.
3910
39112009-02-10 Simon Baldwin <simonb@google.com>
3912
3913 * lto.c: Include lto-opts.h.
3914 * (lto_main): Clear file options at loop start, read any saved
3915 options from the first file handled, and re-issue options.
3916 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3917
39182009-02-02 Diego Novillo <dnovillo@google.com>
3919
3920 * lto.c (lto_main): Stop LTO_TIMER and use
3921 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3922
39232009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3924
3925 PR lto/38995
3926 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3927 to POINTER_SIZE.
3928
39292009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3930
3931 * Make-lang.in (LTO_EXE): Link with all
3932 BACKENDLIBS and not only GMPLIBS
3933
39342009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3935
3936 PR bootstrap/38992
3937 * lto-elf.c: Include gelf.h instead of libelf.h.
3938 (lto_elf_file_close): Replace elfx_update_shstrndx with
3939 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3940 gelf_update_ehdr.
3941
39422009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3943
3944 PR middle-end/38996
3945 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3946
39472009-01-26 Diego Novillo <dnovillo@google.com>
3948
3949 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3950
39512009-01-26 Diego Novillo <dnovillo@google.com>
3952
3953 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3954 and rename into gimple_types_compatible_p.
3955
39562009-01-12 Rafael Avila de Espindola <espindola@google.com>
3957
3958 * lto-lang.c (lang_hooks): Remove the const qualifier.
3959
39602009-01-06 Diego Novillo <dnovillo@google.com>
3961
3962 * ltrans-driver: Mark 'all' target as phony.
3963
39642008-12-31 Diego Novillo <dnovillo@google.com>
3965
3966 * ltrans-driver: Execute a NOP action for target 'all'.
3967
39682008-12-19 Diego Novillo <dnovillo@google.com>
3969
3970 * lto.c (lto_1_to_1_map): Tidy.
3971
39722008-12-19 Diego Novillo <dnovillo@google.com>
3973
3974 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3975 be opened, show its name.
3976 * ltrans-driver: If $verbose is set, do not use parallelism.
3977
39782008-12-17 Rafael Avila de Espindola <espindola@google.com>
3979
3980 * lto.c (lto_fixup_function): New.
3981 (lto_fixup_tree): Call lto_fixup_function.
3982
39832008-12-14 Doug Kwan <dougkwan@google.com>
3984
3985 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3986 variables if there is no function.
3987
39882008-12-10 Simon Baldwin <simonb@google.com>
3989
3990 * ltrans-driver: Always run make in silent mode, to avoid make's
3991 trace on stdout interfering with lto-wrapper output.
3992
39932008-12-10 Doug Kwan <dougkwan@google.com>
3994
3995 * lto.c (lto_add_inline_clones): Do not force master clones of
3996 inlined functions already in SET to be static inline.
3997
39982008-12-04 Doug Kwan <dougkwan@google.com>
3999
4000 * lto.c (globalize_context_t): New type to store states in
4001 globalization of cross-file statics.
4002 (globalize_cross_file_statics): New.
4003 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4004 static decls that need to be fixed up.
4005 (lto_scan_statics_in_cgraph_node): Change call interface to use
4006 a globalize_context_t CONTEXT for all states used.
4007 (lto_scan_statics_in_remaining_global_vars): New.
4008 (lto_promote_cross_file_statics): Use new call interface of
4009 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4010 visible vars in the last set.
4011
40122008-12-03 Diego Novillo <dnovillo@google.com>
4013
4014 * lto.c (lto_fixup_tree): Do not emit an error when
4015 PREVAILING throw but T doesn't.
4016
40172008-12-02 Doug Kwan <dougkwan@google.com>
4018
4019 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4020 from code in ...
4021 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4022 variables and functions.
4023 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4024 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4025
40262008-11-29 Diego Novillo <dnovillo@google.com>
4027
4028 * lto.c: Include timevar.h.
4029 (lto_materialize_function): Tidy. Add comments.
4030 (lto_wpa_write_files): Tidy.
4031 (lto_execute_ltrans): Tidy.
4032 (lto_main): Add local variable LTO_TIMER. Initialize it
4033 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4034 Start and stop the timer.
4035 Tidy comments.
4036 * Make-lang.in (lto.o): Add dependency on timevar.h.
4037 * ltrans-driver: React to -v and -save-temps.
4038 Use simple heuristic to determine how much parallelism to
4039 use when executing make.
4040
40412008-11-12 Doug Kwan <dougkwan@google.com>
4042
4043 * lto.c (lto_bitmap_obstack): Remove var.
4044 (lto_materialize_function): Do nothing instead of marking function
4045 body in file if flag_wpa is true.
4046 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4047 (lto_scan_statics_in_cgraph_node): New function.
4048 (lto_promote_cross_file_statics): Same.
4049 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4050 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4051 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4052
40532008-11-09 Diego Novillo <dnovillo@google.com>
4054
4055 * lto/lto.c (lto_fixup_tree): Change error message locus
4056 information to include location of mismatching
4057 declaration.
4058 Use TREE_NO_WARNING to avoid repeated messages.
4059 (lto_main): If lto_fixup_decls emitted any errors, exit.
4060 * lto/lto-lang.c: Don't include libfuncs.h and except.h
4061 (lto_init_options): Don't enable exceptions by default.
4062 (lto_eh_runtime_type): Move to lto-function-in.c
4063 (lto_init_eh): Likewise.
4064 (lto_init): Don't call lto_init_eh.
4065 * lto/Make-lang.in (lto-lang.o): Remove dependency on
4066 libfuncs.h and except.h.
4067
40682008-10-30 Diego Novillo <dnovillo@google.com>
4069
4070 * lto.c (lto_read_decls): Declare debug_main only if
4071 LTO_STREAM_DEBUGGING is enabled.
4072
40732008-10-30 Simon Baldwin <simonb@google.com>
4074
4075 * lto.c (lto_wpa_write_files): Create intermediate files with
4076 make_cwd_temp_file().
4077 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4078 WPA_SAVE_LTRANS is set.
4079 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4080 * ltrans-driver: Do not strip directory from output files.
4081
40822008-10-29 Doug Kwan <dougkwan@google.com>
4083
4084 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4085 DECL.
4086 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4087 (lto/lto-symtab.o): Remove rule.
4088 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4089 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4090 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4091 Remove macros.
4092 lto-symtab.c (File): Move up one level.
4093 lto-lang.c (cgraph.h): Remove include.
4094 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4095 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4096 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4097
40982008-10-24 Rafael Espindola <espindola@google.com>
4099
4100 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4101 non prevailing weak symbols.
4102
41032008-10-24 Rafael Espindola <espindola@google.com>
4104
4105 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4106
41072008-10-24 Rafael Espindola <espindola@google.com>
4108
4109 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4110 different types.
4111
41122008-10-23 Simon Baldwin <simonb@google.com>
4113
4114 * lto-lang.c (input_node): Save the node reference, rather than the
4115 node pointer, in node->inlined_to.
4116 (input_cgraph_1): Convert node references into node pointers.
4117
41182008-10-22 Diego Novillo <dnovillo@google.com>
4119 Rafael Espindola <espindola@google.com>
4120
4121 * lto.c (lto_resolution_read): Tidy.
4122 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4123 abort if RET is NULL.
4124
41252008-10-22 Doug Kwan <dougkwan@google.com>
4126
4127 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4128 exceptions flag is given.
4129 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4130 (lto_init_eh): Remove exceptions flag initialization.
4131 (lto_init): Only call lto_init_eh if exceptions flag is set.
4132
41332008-10-21 Diego Novillo <dnovillo@google.com>
4134
4135 * lto.c: Tidy some formatting.
4136 * lto.h: Likewise.
4137
41382008-10-21 Simon Baldwin <simonb@google.com>
4139
4140 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4141 them is NULL (but not the other).
4142
41432008-10-17 Diego Novillo <dnovillo@google.com>
4144
4145 * ltrans-driver: Divert output from make to a temporary file.
4146 Show it if the call to make failed.
4147
41482008-10-15 Diego Novillo <dnovillo@google.com>
4149
4150 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4151 Do not print TEMP_FILENAME
4152 * ltrans-driver: Call make with -s.
4153
41542008-10-15 Diego Novillo <dnovillo@google.com>
4155
4156 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4157 TREE_STATIC on global symbols.
4158
41592008-10-14 Ollie Wild <aaw@google.com>
4160
4161 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4162 (LTRANS_DRIVER_EXE): Add.
4163 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4164 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4165 (lto.install.common): Remove ltrans-driver.
4166 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4167 (LTRANS_DRIVER_EXE): New build rule.
4168 * config-lang.in (compilers): Add ltrans-driver.
4169
41702008-10-14 Diego Novillo <dnovillo@google.com>
4171
4172 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4173 of program name.
4174
41752008-10-13 Ollie Wild <aaw@google.com>
4176
4177 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4178 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4179 * ltrans-driver (LTRANS_FLAGS): Remove.
4180
41812008-10-08 Doug Kwan <dougkwan@google.com>
4182
4183 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4184 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4185 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4186 from lto_fixup_state to here.
4187 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4188 just a free-list. Fix up types also. Move decl merging code to
4189 lto_fixup_tree.
4190 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4191 object.
4192 (lto_fixup_decls): Use another pointer set to avoid multiple
4193 walking of nodes except for DECLs to be replaced. Pass an
4194 lto_fixup_data_t object to tree-walker.
4195
41962008-10-08 Rafael Espindola <espindola@google.com>
4197
4198 * lto-symtab.c (lto_symtab_set_resolution): New.
4199 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4200 lto_symtab_get_resolution.
4201 (lto_symtab_prevailing_decl): Return decl for non public decls.
4202 (lto_symtab_get_resolution): New.
4203 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4204
42052008-10-06 Rafael Espindola <espindola@google.com>
4206
4207 * lto-lang.c: Include cgraph.h.
4208 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4209 input_cgraph): Moved from lto-cgraph.c.
4210 (LANG_HOOKS_INPUT_CGRAPH): New.
4211
42122008-10-03 Rafael Espindola <espindola@google.com>
4213
4214 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4215
42162008-10-03 Rafael Espindola <espindola@google.com>
4217
4218 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4219 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4220 prevailing definition. Don't mark TREE_NOTHROW differences.
4221 * lto.c (lto_fixup_tree): New.
4222 (lto_fixup_state): New.
4223 (lto_fixup_state_aux): New.
4224 (free_decl): New.
4225 (lto_fixup_decls): New.
4226 (lto_main): Call lto_fixup_decls.
4227
42282008-10-02 Ollie Wild <aaw@google.com>
4229
4230 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4231 and Init.
4232 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4233 * lto-lang.c (lto_post_options): Add validation and fixups for
4234 -fltrans and -fwpa.
4235
42362008-10-02 Rafael Espindola <espindola@google.com>
4237
4238 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4239 lto_symtab_merge_decl): Return void.
4240 (lto_symtab_prevailing_decl): New.
4241
42422008-09-30 Rafael Espindola <espindola@google.com>
4243
4244 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4245 defined symbols.
4246 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4247 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4248 Check for already defined symbols.
4249 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4250 (LTO_IDENTIFIER_RESOLUTION): Remove.
4251 (LTO_DECL_RESOLUTION): New.
4252
42532008-09-30 Rafael Espindola <espindola@google.com>
4254
4255 * lto.c (lto_read_decls): Use new input_tree signature.
4256
42572008-09-26 Doug Kwan <dougkwan@google.com>
4258
4259 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4260 bodies affected by exception attribute merging of DECLs.
4261 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4262 merging.
4263
42642008-09-25 Rafael Espindola <espindola@google.com>
4265
4266 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4267 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4268 * lto-symtab.c (lto_symtab_compatible): New.
4269 (lto_symtab_overwrite_decl): New.
4270 (lto_symtab_merge_decl): Refactor to use the above functions
4271 and the resolution from lang_identifier.
4272 * lto-tree.h: Include plugin-api.h.
4273 (lang_identifier): Add resolution.
4274 (LTO_IDENTIFIER_RESOLUTION): New.
4275
42762008-09-25 Ollie Wild <aaw@google.com>
4277
4278 * lang.opt (fltrans-output-list=): New option.
4279 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4280
42812008-09-25 Rafael Espindola <espindola@google.com>
4282
4283 * lto.c (lto_resolution_read): Initialize ret;
4284
42852008-09-24 Ollie Wild <aaw@google.com>
4286
4287 * lto.c (sys/mman.h): Move include.
4288 (lto_wpa_write_files): Return a list of written files.
4289 (lto_execute_ltrans): New function.
4290 (lto_main): Call lto_execute_ltrans.
4291 (ltrans-driver): New file.
4292 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4293 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4294 (lto_init_options): Initialize ltrans_driver.
4295 (lto_handle_option): Fix incorrect default output value.
4296 * lang.opt (fltrans-driver=): New option.
4297 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4298 (lto.install-common): Add lto/ltrans-driver.
4299
43002008-09-24 Rafael Espindola <espindola@google.com>
4301
4302 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4303 (lto/lto.o): Depend on lto/common.h.
4304 (lto/common.o): New.
4305 * lang.opt (resolution): New.
4306 * lto-lang.c (resolution_file_name): New.
4307 (lto_handle_option): Handle OPT_resolution.
4308 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4309 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4310 pass it to lto_symtab_merge_decl.
4311 * lto.c: Include common.h.
4312 (lto_read_decls): Add resolutions and resolutions_size arguments.
4313 Initialize data_in.globals_resolution and
4314 data_in.globals_resolution_size.
4315 (index_and_symbol_resolution): New.
4316 (lto_resolution_read): New.
4317 (lto_file_read): Add argument resolution_file.
4318 Read resolution.
4319 * lto.h (resolution_file_name): New.
4320
43212008-09-23 Rafael Espindola <espindola@google.com>
4322
4323 * common.c: Update description.
4324 * common.h: Update description.
4325
43262008-09-23 Rafael Espindola <espindola@google.com>
4327
4328 * common.c: Moved from lto-plugin.
4329 * common.h: Moved from lto-plugin.
4330
43312008-09-22 Doug Kwan <dougkwan@google.com>
4332
4333 * lto.c (VEC(bitmap,heap)): Declare.
4334 (lto_materialize_function): Handle WAP mode specially.
4335 (lto_add_inline_clones): New.
4336 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4337 return a bitmap of inlined decls.
4338 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4339 (lto_main): Call reset_inline_failed to reset inlining states.
4340 Check call-graph after WPA inlining.
4341 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4342 unconditionally.
4343
43442008-09-19 Doug Kwan <dougkwan@google.com>
4345
4346 lto.c (lto_main): Remove unsued wrapper code.
4347 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4348
43492008-09-19 Rafael Espindola <espindola@google.com>
4350
4351 * lto-symtab.c: Include lto-tree-in.h.
4352 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4353 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4354 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4355
43562008-09-17 Paolo Bonzini <bonzini@gnu.org>
4357 Rafael Avila de Espindola <espindola@google.com>
4358
4359 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4360 COMPOUND_LITERAL_EXPR_DECL): Remove.
4361 (emit_local_var): Remove.
4362 (lto_expand_expr): Remove.
4363 (lto_staticp): Remove.
4364 (LANG_HOOKS_EXPAND_EXPR): Remove.
4365 (LANG_HOOKS_STATICP): Remove.
4366
43672008-09-11 Diego Novillo <dnovillo@google.com>
4368
4369 * lto-lang.c: Include except.h and libfuncs.h.
4370 (lto_init_eh): New.
4371 (lto_init): Call it.
4372 Set flag_generate_lto to 0.
4373 * Make-lang.in (lto-lang.o): Add dependency on except.h
4374 and libfuncs.h.
4375
43762008-09-09 Bill Maddox <maddox@google.com>
4377
4378 * lto-lang.c: Include header file expr.h.
4379 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4380 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4381 (emit_local_var): Copied from c-semantics.c.
4382 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4383 and c_staticp in c-common.c.
4384 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4385
43862008-09-08 Diego Novillo <dnovillo@google.com>
4387
4388 * lto-lang.c (lto_global_bindings_p): Return 1 during
4389 IPA passes.
4390
43912008-09-07 Diego Novillo <dnovillo@google.com>
4392
4393 * lto.c: Tidy formatting.
4394
43952008-08-04 Bill Maddox <maddox@google.com>
4396
4397 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4398
43992008-09-03 Doug Kwan <dougkwan@google.com>
4400
4401 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4402 CIF_OK instead of NULL.
4403
44042008-09-02 Diego Novillo <dnovillo@google.com>
4405 Simon Baldwin <simonb@google.com>
4406
4407 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4408 c_common_type_for_size.
4409 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4410 (lto_init): Call linemap_add.
4411 (signed_and_unsigned_types): Remove.
4412
44132008-08-29 Diego Novillo <dnovillo@google.com>
4414
4415 * lto-lang.c (handle_noreturn_attribute): New local function.
4416 (handle_const_attribute): New local function.
4417 (handle_malloc_attribute): New local function.
4418 (handle_pure_attribute): New local function.
4419 (handle_novops_attribute): New local function.
4420 (handle_nonnull_attribute): New local function.
4421 (handle_nothrow_attribute): New local function.
4422 (handle_sentinel_attribute): New local function.
4423 (handle_type_generic_attribute): New local function.
4424 (handle_format_attribute): New local function.
4425 (handle_format_arg_attribute): New local function.
4426 (lto_attribute_table): Declare.
4427 (lto_format_attribute_table): Declare.
4428 (lto_init_attributes): New local function.
4429 (lto_define_builtins): Call it.
4430 Call targetm.init_builtins and build_common_builtin_nodes.
4431 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4432 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4433
44342008-08-28 Diego Novillo <dnovillo@google.com>
4435
4436 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4437 $(GIMPLE_H).
4438 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4439 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4440 * lto-symtab.c: Include gimple.h.
4441 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4442 TREE_CHAIN.
4443
44442008-08-27 Doug Kwan <dougkwan@google.com>
4445
4446 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4447 gt-lto-lto.h): New includes.
4448 (lto_materialize_function): Do not read in function body in WPA mode.
4449 Format a line to fit in 80 columns.
4450 (lto_cgraph_node_sets): New garbage collected variable.
4451 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4452 New functions.
4453 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4454 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4455 variable LTO_SECTION_IN_H.
4456 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4457 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4458 with variable LTO_SECTION_IN_H.
4459 * config-lang.in (gtfiles): Add lto/lto.c.
4460 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4461 merged DECL_RESULT correctly.
4462
44632008-08-26 Bill Maddox <maddox@google.com>
4464
4465 * lto-lang.c Include tree-gimple.h.
4466 (lto_mark_addressable): Call mark_addressable rather than
4467 asserting.
4468 (lto_post_options): Suppress debug info generation.
4469 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4470
92a44a68 44712008-08-25 Bill Maddox <maddox@google.com>
7bfefa9d 4472
4473 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4474 assertion and leave an explanatory comment in its place.
4475
44762008-08-21 Doug Kwan <dougkwan@google.com>
4477
4478 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4479 of common nodes instead of computing locallly.
4480 (lto_read_in_decl_state): New.
4481 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4482 Read global and per-function in-decl states.
4483 * Make-lang.in (LTO_H): Update dependency.
4484 (lto/lto.o): Same.
4485 (lto-symtab.c): Merge (revision 139039)
4486 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4487
44882008-08-21 Rafael Espindola <espindola@google.com>
4489
4490 * config-lang.in (target_libs): New.
4491
44922008-08-20 Bill Maddox <maddox@google.com>
4493
4494 * lto.c (current_lto_file): Remove GTY marker from static
4495 variable. Remove include of file gt-lto-lto.h.
4496 * Make-lang.in: Remove dependency of lto/lto.o on
4497 gt-lto-lto.h.
4498 * lto-elf.c (lto_file_close): Removed.
4499 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4500 allocate lto_elf_file object.
4501 (lto_elf_file_close): Free lto_elf_file object after close.
4502 * lto.h (struct lto_file_struct): Remove GTY marker.
4503 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4504 gtfiles.
4505
45062008-08-20 Bill Maddox <maddox@google.com>
4507
4508 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4509 to conform to its new signature.
4510 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4511 on discarded node here, now called in global_vector_fixup.
4512
45132008-08-09 Bill Maddox <maddox@google.com>
4514
4515 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4516 has not been set to a front-end-specific value.
4517
45182008-08-05 Doug Kwan <dougkwan@google.com>
4519
4520 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4521 build breakage.
4522
45232008-07-30 Bill Maddox <maddox@google.com>
4524
4525 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4526 Remove obsolete comments.
4527 (lto_read_decls): Remove initialization of deleted field data_in.global.
4528 Tidy up comments.
4529 (lto_main): Remove redundant initialization of section_hash_table.
4530 * lto-elf.c: Removed obsolete comments.
4531 * lto.h: Tidy up comments.
4532 * lto-symtab.c (lto_least_common_multiple): New function.
4533 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4534 Tidy up comments.
4535
45362008-07-25 Diego Novillo <dnovillo@google.com>
4537 Bill Maddox <maddox@google.com>
4538
4539 * lto.c: Re-order include files.
4540 Include lto-section-out.h.
4541 (preload_common_nodes): Add debugging output.
4542 Add new local INDEX_TABLE.
4543 Call preload_common_node.
4544 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4545
45462008-07-13 Bill Maddox <maddox@google.com>
4547
4548 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4549 unwanted scaling during pointer addition.
4550
45512008-07-11 Bill Maddox <maddox@google.com>
4552 Diego Novillo <dnovillo@google.com>
4553
4554 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4555 Make code const-correct.
4556 (lto_file_read): Fix C++ compatibility warnings.
4557 (lto_read_section_data): Fix C++ compatibility warnings.
4558 (lto_get_section_data): Use CONST_CAST to avoid warning when
4559 const pointer passed to free.
4560 * lto-elf.c (lto_elf_build_section_table): Fix C++
4561 compatibility warnings.
4562 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4563 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4564 (lto_get_current_out_file): Fix C++ compatibility warnings.
4565
45662008-07-11 Diego Novillo <dnovillo@google.com>
4567
4568 * Make-lang.in (lto-warn): Define.
4569
45702008-07-03 Simon Baldwin <simonb@google.com>
4571
4572 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4573 LTO_STREAM_DEBUGGING.
4574
45752008-06-27 Ollie Wild <aaw@google.com>
4576
4577 * lto-elf.c (lto-section-out.h): New include.
4578 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4579 and data members.
4580 (cached_file_attrs): New static variable.
4581 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4582 Use cached_file_attrs for checking bits.
4583 (lto_elf_build_section_table): Remove elf_file argument from
4584 lto_elf_get_shdr and lto_elf_free_shdr calls.
4585 (DEFINE_INIT_SHDR): New macro.
4586 (init_shdr32, init_shdr64): New functions defined via the
4587 DEFINE_INIT_SHDR macro.
4588 (lto_elf_begin_section_with_type): New function.
4589 (lto_elf_begin_section): New function.
4590 (lto_elf_append_data): New function.
4591 (lto_elf_end_section): New function.
4592 (DEFINE_VALIDATE_EHDR): New macro.
4593 (validate_ehdr32, validate_ehdr64): New functions defined via the
4594 DEFINE_VALIDATE_EHDR macro.
4595 (validate_file): New function.
4596 (DEFINE_INIT_EHDR): New macro.
4597 (init_ehdr32, init_ehdr64): New functions defined via the
4598 DEFINE_INIT_EHDR macro.
4599 (init_ehdr): New function.
4600 (lto_elf_file_open): Add support for writable files. Move some
4601 validation logic to validate_file.
4602 (lto_elf_file_close): Add support for writable files. Write file data
4603 and free data blocks.
4604 (current_out_file): New static variable.
4605 (lto_set_current_out_file): New function.
4606 (lto_get_current_out_file): New function.
4607 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4608 Add temporary initialization for testing ELF serialization.
4609 * lto.h (lto-section-out.h): New include.
4610 (struct lto_file_struct): Slight modification to comment.
4611 (lto_elf_file_open): Add writable parameter.
4612 (lto_elf_begin_section): New function declaration.
4613 (lto_elf_append_data): New function declaration.
4614 (lto_elf_end_section): New function declaration.
4615 (lto_set_current_out_file, lto_get_current_out_file): New function
4616 declarations.
4617 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4618 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4619 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4620 * Make-lang.in (LTO_H): Add lto-section-out.h.
4621
46222008-06-12 Ollie Wild <aaw@google.com>
4623
4624 * lto.h (struct lto_file_vtable_struct): Remove.
4625 (struct lto_file_struct): Remove vtable member.
4626 * lto-elf.c (lto_file_init): Remove vtable argument.
4627 (lto_elf_map_optional_lto_section): Remove.
4628 (lto_elf_unmap_section): Remove.
4629 (lto_elf_file_vtable): Remove.
4630 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4631 lto_file_init call.
4632 (lto_elf_find_section_data): Remove.
4633
46342008-06-11 Ollie Wild <aaw@google.com>
4635
4636 * lto.c (lto_file_read): Add const qualifier to data variable.
4637
46382008-06-11 Diego Novillo <dnovillo@google.com>
4639
4640 Merge from lto-streamber sub-branch.
4641
4642 2008-06-04 Ollie Wild <aaw@google.com>
4643
4644 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4645 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4646
4647 2008-05-28 Bill Maddox <maddox@google.com>
4648
4649 Replace the DWARF reader in the LTO front-end.
4650
4651 * lto.c: Include lto-tree-in.h, lto-tags.h.
4652 (enum DWARF2_class, DW_cl_constant, struct
4653 DWARF2_form_data, struct lto_context,
4654 lto_fd_init, lto_info_fd_init,
4655 lto_abbrev_fd_init, lto_info_fd_close,
4656 lto_file_init, lto_file_close,
4657 lto_file_corrupt_error, lto_abi_mismatch_error,
4658 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4659 lto_read_uleb128, lto_read_sleb128,
4660 lto_read_initial_length, lto_abbrev_read_attrs,
4661 lto_abbrev_read, lto_abbrev_read_lookup,
4662 lto_read_section_offset,
4663 lto_read_comp_unit_header, find_cu_for_offset,
4664 lto_get_file_name,
4665 lto_resolve_reference,lto_read_form,
4666 attribute_value_as_int,
4667 make_signed_host_wide_int,
4668 attribute_value_as_constant, lto_cache_hash,
4669 lto_cache_eq, lto_cache_store_DIE,
4670 lto_cache_lookup_DIE, lto_find_integral_type,
4671 lto_find_integral_type_1,
4672 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4673 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4674 lto_unsupported_attr_error, lto_get_identifier,
4675 lto_read_referenced_type_DIE,
4676 lto_read_compile_unit_DIE,
4677 lto_read_array_type_DIE,
4678 lto_read_structure_union_class_type_DIE,
4679 lto_read_enumerator_DIE,
4680 lto_read_enumeration_type_DIE,
4681 lto_read_only_for_child_DIEs,
4682 lto_read_only_for_child_DIEs,
4683 lto_read_member_DIE, lto_read_abbrev,
4684 lto_read_variable_formal_parameter_constant_DIE,
4685 lto_get_body): Removed.
4686 (preload_common_nodes): New function.
4687 (lto_read_decls): Convert for new global streamer.
4688 (lto_materialze_file_data,
4689 lto_read_subroutine_type_subprogram_die,
4690 lto_read_unspecified_parameters_DIE,
4691 lto_read_typedef_DIE,
4692 lto_read_pointer_reference_type_DIE,
4693 lto_read_subrange_type_DIE,
4694 lto_read_base_type_DIE,
4695 lto_read_const_volatile_restrict_type_DIE,
4696 lto_read_namespace_DIE,
4697 lto_read_unspecified_type_DIE, lto_read_DIE,
4698 lto_read_child_DIEs, lto_collect_child_DIEs):
4699 Removed.
4700 (lto_info_read, lto_set_cu_context): Removed.
4701 (lto_file_read): Convert for new global streamer.
4702 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4703 lto_resolve_var_ref, lto_resolve_fn_ref,
4704 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4705 lto_resolve_namespacedecl_ref): Removed.
4706 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4707 * lto-tree.h (lto_symtab_merge_var,
4708 lto_symtab_mergee_fun): Declare here.
4709 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4710 (lto_elf_file_open): Removed code to read DWARF debug sections.
4711 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4712 DWARF2_CompUnit, lto_die_ptr,
4713 lto_die_cache_entry, lto_fd, lto_info_fd,
4714 lto_abbrev_fd): Removed.
4715 (lto_file): Removed debug_info and debug_abbrev fields.
4716 (lto_ref): Removed.
4717 (lto_file_init, lto_file_close,
4718 lto_resolve_type_ref, lto_resolve_var_ref,
4719 lto_resolve_fn_ref, lto_resolve_field_ref,
4720 lto_resolve_typedecl_ref,
4721 lto_resolve_namespacedecl_ref,
4722 lto_get_file_name): Removed declarations.
4723 (lto_symtab_merge_var, lto_symtab_merge_fn):
4724 Declarations moved to lto-tree.h.
4725 * lto-symtab.c (lto_compatible_attributes_p):
4726 Lobotomize this, as it barfs on "Hello, world!".
4727 * lto-section-out.c: Include lto-tree-out.h.
4728 (lto_hash_global_slot_node,
4729 lto_eq_global_slot_node, preload_common_nodes,
4730 write_global_stream, write_global_references):
4731 New functions.
4732 (produce_asm_for_decls): Convert for new global streamer.
4733 * lto-section-out.h (lto_hash_global_slot_node,
4734 lto_eq_global_slot_node): Declare.
4735
92a44a68 47362008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4737 Jan Hubicka <jh@suse.cz>
4738
4739 * lto.c (sys/mman.h, tree-pass.h): New includes.
4740 (lto_materialize_constructors_and_inits,
4741 lto_materialize_function): Keeps length of section.
4742 (lto_materialize_cgraph): Removed.
4743 (lto_read_decls): Initialize fd field.
4744 (lto_file_read): Different return type and removed much code to
4745 lto_main.
4746 (page_mask): New variable.
4747 (lto_read_section_data, get_section_data, free_section_data): New
4748 functions.
4749 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4750 passes can get the section data.
4751
92a44a68 47522008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4753
4754 * lto.h (lto_read_decls): Made local.
4755 (lto_input_function_body, lto_input_constructors_and_inits,
4756 lto_input_cgraph): Declarations moved to lto-section-in.h.
4757 * lto-section-in.c: Moved to .. .
4758 * lto-cgraph-in.c: Ditto.
4759 * lto-section-in.h: Ditto.
4760 * lto-function-in.c: Ditto.
4761 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4762 (lto_insert_block): Removed.
4763 (LANG_HOOKS_INSERT_BLOCK): Removed.
4764 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4765 lto-section-in.o): Rules moved to lto/Makefile.in.
4766
4767
47682008-05-16 Ollie Wild <aaw@google.com>
4769
4770 * lto-lang.c (tree-inline.h): Include.
4771 (lto_post_options): New function.
4772 (LANG_HOOKS_POST_OPTIONS): Define.
4773 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4774 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4775
47762008-05-13 Diego Novillo <dnovillo@google.com>
4777
4778 * lto-function-in.c (input_ssa_names): Call
4779 make_ssa_name_fn instead of make_ssa_name.
4780
47812008-05-12 Diego Novillo <dnovillo@google.com>
4782
4783 * lto-cgraph-in.c (overwrite_node): Update references to
4784 inline summary fields.
4785 * lto-function-in.c (input_expr_operand): Do not handle
4786 STRUCT_FIELD_TAG.
4787
47882008-05-09 Ollie Wild <aaw@google.com>
4789
4790 * lang.opt: New file.
4791 * lto-lang.c (lto_init_options): New function.
4792 (lto_handle_option): New function.
4793 (lto_init): Move initialization of flag_unit_at_a_time to
4794 lto_init_options.
4795 (LANG_HOOKS_INIT_OPTIONS): Define.
4796 (LANG_HOOKS_HANDLE_OPTION): Define.
4797
47982008-04-29 Ollie Wild <aaw@google.com>
4799
4800 * lto.c (lto_read_namespace_DIE): New function.
4801 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4802 NAMESPACE_DECL DIE's.
4803 (lto_resolve_namespacedecl_ref): New function.
4804 * lto.h (lto_resolve_namespacedecl_ref): New function.
4805 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4806 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4807 and num_namespace_decls.
4808 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4809 * lto-lang.c (lto_init_ts): New function.
4810 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4811
48122008-04-16 Ollie Wild <aaw@google.com>
4813
4814 * lto-function-in.c (input_type_ref): Updated function description.
4815
48162008-04-16 Ollie Wild <aaw@google.com>
4817
4818 * lto-function-in.c (input_type_ref_1): New function.
4819 (input_type_ref): Split into two functions.
4820 (input_function): Add support for type contexts.
4821
48222008-04-16 Ollie Wild <aaw@google.com>
4823
4824 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4825 section name
4826
48272008-04-16 Ollie Wild <aaw@google.com>
4828
4829 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4830 list of supported languages.
4831
92a44a68 48322008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4833
4834 Merge with mainline @133491.
4835
92a44a68 48362008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4837 Jan Hubicka <jh@suse.cz>
4838
4839 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4840 fd->unmaterialized_fndecls.
4841 (lto_get_file_name, lto_materialize_cgraph): New function.
4842 (lto_materialize_constructors_and_inits,
4843 lto_materialize_function): Read info directly from elf file.
4844 (lto_file_read): Made local and initialize dictionary so that
4845 other lto sections can be read without reprocessing the elf file.
4846 (lto_main): Read all functions after all files have been processed
4847 for their types, globals and cgraph.
4848 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4849 dependencies.
4850 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4851 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4852 (lto_elf_read_symtab): Removed function.
4853 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4854 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4855 (lto_file_read): Made local.
4856 (lto_get_file_name, lto_elf_build_section_table,
4857 lto_input_cgraph):
4858 New function.
4859 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4860 New functions.
4861 (lto_read_decls): Get the file name.
4862 * lto-cgraph-in.c: New file.
4863 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4864 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4865 (input_labels): Fixed latent sizeof issue.
4866 (input_function): Build stmt array to set call sites into cgraph
4867 edges.
4868 (lto_read_body): Reset cfun->curr_properties.
4869 * lto_section_in.h (lto_section_slot): New structure.
4870 (section_hash_table.lto_file_decl_data): New field.
4871
4872
92a44a68 48732008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4874
4875 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4876 reconstruct static initializers.
4877 (lto_get_body, lto_materialize_function): Add lto_section_type as
4878 a parameter.
4879 (lto_materialize_constructors_and_inits,
4880 lto_materialize_file_data): New function.
4881 (lto_materialize_function,
4882 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4883 unmap_section and map_fn_body to map_section.
4884 (lto_set_cu_context): Process functions and static inits
4885 differently.
4886 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4887 lto/lto-section-in.o): Update dependencies.
4888 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4889 lto_section_type parameter.
4890 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4891 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4892 renamed the other two so that there is only one map function and
4893 one unmap function and each takes a section type parameter.
4894 (lto_read_function_body): Renamed to lto_input_function_body and
4895 added file_data parameter.
4896 (lto_read_var_init): Removed.
4897 (lto_input_constructors_and_inits): New function.
4898 * lto-section-in.c (lto_read_decls): New function.
4899 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4900 var_decls, type_decls, types to lto_file_decl_data.
4901 (input_type_ref, input_expr_operand, lto_read_body): Get
4902 field_decls, fn_decls, var_decls, type_decls, types from different
4903 structure.
4904 (input_globals, input_constructor, lto_read_var_init): Removed.
4905 (input_constructors_or_inits): New function.
4906 (lto_read_function_body, lto_input_constructors_and_inits):
4907 Renamed to lto_input_function_body and takes file_data parameter.
4908 * lto-section-in.h (lto_file_decl_data): New structure.
4909
92a44a68 49102008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4911
4912 * lto-function-in.c (input_globals.c): Changed input type to
4913 lto_function_header.
4914 (input_bb): Removed code to deserialize the stmt number.
4915 (input_function): Renumber all stmts after they are input.
4916 (lto_read_body, lto_read_function_body, lto_read_var_init):
4917 Changed to used new header format and enum section_type.
4918 *lto-lang.c (success): Removed.
4919
49202008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4921
4922 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4923 (lto_elf_free_sym): Likewise.
4924
4925 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4926 (lto_elf_build_init): Likewise.
4927
92a44a68 49282008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4929
4930 * lto-read.c: Renamed to lto-function-in.c.
4931 (input_1_unsigned): Moved to lto-section-in.c and renamed
4932 lto_input_1_unsigned.
4933 (input_uleb128): Moved to lto-section-in.c and renamed
4934 lto_input_uleb128.
4935 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4936 lto_input_widest_uint_uleb128.
4937 (input_sleb128): Moved to lto-section-in.c and renamed
4938 lto_input_sleb128.
4939 (input_integer): Moved to lto-section-in.c and renamed
4940 lto_input_integer.
4941 (debug_in_fun): Moved to lto-section-in.c and renamed
4942 lto_debug_in_fun.
4943 (input_block): Moved to lto-section-in.h and renamed
4944 lto_input_block.
4945 (input_expr_operand): Fixed to allow lists with more than one
4946 element.
4947 * lto-section-in.h: New file.
4948 * lto-section-in.c: New file with changes from above.
4949 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4950 (lto-section-in.o): New rule.
4951
49522007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4953
4954 * lto-read.c (input_expr_operand): Mark static and external
4955 VAR_DECLs as needed.
4956
49572007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4958
4959 * lto-read.c (input_integer): Use the correct shift amount.
4960
49612007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4962
4963 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4964 (LANG_HOOKS_NAME): Define.
4965
49662007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4967
4968 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4969 original function to...
4970 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4971 don't have a base type.
4972 (lto_read_enumeration_type_DIE): Examine the values of the
4973 enumeration to determine whether we can use an unsigned type for
4974 the base type of the enumeration.
4975
49762007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4977
4978 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4979 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4980
49812007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4982
4983 * lto-lang.c (lto_types_compatible_p): New function.
4984 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4985
49862007-12-22 Nathan Froyd <froydnj@codesourcery.com>
92a44a68 4987 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4988
4989 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4990 (input_local_vars): Read in DECL_INITIAL and context for local
4991 statics that need to be put in unexpanded_vars_list.
4992
49932007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4994
4995 * lto-read.c (input_real): Use a separate null-terminated buffer
4996 for calling real_from_string.
4997 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4998 tell cgraph that it's needed.
4999
50002007-12-19 Doug Kwan <dougkwan@google.com>
5001
5002 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5003
50042007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5005
5006 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5007 (lto_file_read): Reset the members of 'context' every time we read
5008 a toplevel DIE, with special attention to last_param_type.
5009
50102007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5011
5012 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5013 'declaration'. Set the assembler name for non-public functions.
5014
92a44a68 50152007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5016
5017 * lto_read.c (data_in.unexpanded_indexes): New array.
5018 (input_local_var): Added code to read in unexpanded_var_list
5019 indexes for variables. Only read in DECL_CHAIN field for
5020 parameters.
5021 (input_local_vars): Added code to rebuild unexpanded_var_list in
5022 order using unexpanded_indexes.
5023 (input_function): Added code to set DECL_CONTEXT for functions.
5024
50252007-12-13 Doug Kwan <dougkwan@google.com>
5026
5027 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5028 in pointer and reference types.
5029
50302007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5031
5032 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5033 RESULT_DECL.
5034
50352007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5036
5037 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5038 already read the DIE.
5039 (lto_get_body): New function, split out from...
5040 (lto_materialize_function): ...here. Call it.
5041 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5042 determine DECL_EXTERNAL.
5043 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5044 FUNCTION_DECLs when necessary. Use the type of the actual
5045 function definition if we are unable to easily merge types. Ignore
5046 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5047 necessary.
5048
50492007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5050
5051 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5052
50532007-12-12 Bill Maddox <maddox@google.com>
5054
5055 Revert
5056 2007-12-07 Bill Maddox <maddox@google.com>
5057
5058 * lto.c (lto_str_fd_init): New function.
5059 (lto_str_fd_close): New function.
5060 (lto_file_init): Call lto_str_fd_init.
5061 (lto_file_close): Call lto_str_fd_close.
5062 (lto_str_read): New function. Read debug string table.
5063 (lto_str_lookup): New function. Get string for debug
5064 string table offset.
5065 (lto_read_form): Recognize DW_FORM_strp.
5066 (lto_file_read): Invoke lto_str_read.
5067
5068 * lto-elf.c (lto_elf_file_open): Read raw section data
5069 for the .debug_str section, if present.
5070
5071 * lto.h (struct lto_str_fd_struct): New struct.
5072 (struct lto_file_struct): Added new field DEBUG_STR
5073 to hold the file descriptor for the debug string table.
5074
50752007-12-07 Bill Maddox <maddox@google.com>
5076
5077 * lto.c (lto_str_fd_init): New function.
5078 (lto_str_fd_close): New function.
5079 (lto_file_init): Call lto_str_fd_init.
5080 (lto_file_close): Call lto_str_fd_close.
5081 (lto_str_read): New function. Read debug string table.
5082 (lto_str_lookup): New function. Get string for debug
5083 string table offset.
5084 (lto_read_form): Recognize DW_FORM_strp.
5085 (lto_file_read): Invoke lto_str_read.
5086
5087 * lto-elf.c (lto_elf_file_open): Read raw section data
5088 for the .debug_str section, if present.
5089
5090 * lto.h (struct lto_str_fd_struct): New struct.
5091 (struct lto_file_struct): Added new field DEBUG_STR
5092 to hold the file descriptor for the debug string table.
5093
50942007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5095
5096 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5097 Grow the basic_block_info and label_to_block_map vectors if
5098 necessary. Read in the block chain.
5099
51002007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5101
5102 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5103
51042007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5105
5106 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5107
51082007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5109
5110 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5111 (lto_read_body): Don't declare PROP_alias.
5112
51132007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5114
5115 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5116 argument type information.
5117
51182007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5119
5120 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5121 TREE_THIS_VOLATILE if the associated type is a volatile type.
5122 (lto_materialize_function): Remove call to init_ssa_operands.
5123 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5124 variable when reading an SSA_NAME. Do the same when reading a
5125 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5126 (input_cfg): Call init_ssa_operands.
5127 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5128 Move call to init_tree_ssa...
5129 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5130 add_referenced_var on any variables referenced from the body of the
5131 function. Inform the rest of the compiler we are in SSA form and
5132 inform later passes about the current properties.
5133
51342007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5135
5136 * lto.c (lto_materialize_function): Add FIXME.
5137
51382007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5139
5140 * lto-lang.c (enum built_in_attribute): New enum.
5141 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5142 built_in_attributes): New variables.
5143 (def_builtin_1): New function.
5144 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5145
51462007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5147
5148 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5149 DECL_SOURCE_LOCATION for debugging purposes.
5150 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5151 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5152 laying out the decl until later.
5153 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5154 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5155 TREE_ADDRESSABLE.
5156 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5157 operand of an ADDR_EXPR.
5158 * lto-lang.c (enum lto_builtin_type): New enum.
5159 (builtin_type): New typedef.
5160 (builtin_types, string_type_node, const_string_type_node,
5161 wint_type_node, intmax_type_node, uintmax_type_node,
5162 signed_size_type_node): New variables.
5163 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5164 lto_build_c_type_nodes): New functions.
5165 (lto_init): Initialize builtin types.
5166 (lto_set_decl_assembler_name): Let the target machine mangle the
5167 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5168
51692007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5170
5171 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5172 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5173 the type is a constant type. Set the assembler name and inform
5174 the rest of the compiler about the new decl if the decl is not
5175 public.
5176 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5177 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5178 try to read in function bodies for functions that already have bodies.
5179 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5180 equivalency.
5181 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5182 Check for whether we matched a builtin function type before calling
5183 lto_same_type_p on the generated type. Permit cases where the
5184 declaration of an array is unbounded, but the definition is bounded.
5185 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5186 DECL_SIZE_UNIT if necessary.
5187
92a44a68 51882007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5189
5190 * lto-read.c (input_expr_operand): Get types right
5191 for COMPLEX_CST.
5192
92a44a68 51932007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5194
5195 * lto-read.c (make_new_block, input_cfg): Properly set
5196 n_basic_blocks.
5197
51982007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5199
5200 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5201 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5202
52032007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5204
5205 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5206 construct the integer type for bitfields.
5207
92a44a68 52082007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5209
5210 * lto-read.c (data_in.current_node_has_loc): Removed.
5211 (input_line_info): Returns true if node needs line set.
5212 (set_line_info): Always sets line if called.
5213 (clear_line_info): Removed reference to current_node_needs_loc.
5214 (input_expr_operand): Keeps track locally if current node needs a loc.
5215 (input_local_var): Added code to handle DECL_INITIAL for
5216 static local vars. Only set loc if necessary.
5217
52182007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5219
5220 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5221 DECL_CONTEXT.
5222
52232007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5224
5225 * lto.c: Include langhooks.h.
5226 (lto_find_integral_type): Rework logic to handle the case where
5227 got_byte_size is true, but the bitsize requested and that of the
5228 base_type doesn't match.
5229 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5230 asm_name if we are creating a VAR_DECL.
5231 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5232 definition.
5233 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5234 function reference and use the builtin's decl if so. Set the
5235 DECL_CONTEXT of the RESULT_DECL for the function.
5236 * lto-lang.c (registered_builtin_fndecls): New variable.
5237 (lto_getdecls): Return it.
5238 (lto_builtin_function): Chain the new decl onto
5239 registered_builtin_fndecls.
5240
92a44a68 52412007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5242
5243 * lto-read.c (process_tree_flags, lto_static_init_local):
5244 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5245 (input_line_info, clear_line_info): Fixed new line number code.
5246 (input_expr_operand): Added type to SWITCH_EXPR.
5247 (lto_read_body): Properly initialized data_in.
5248 Clear line info when leaving.
5249
52502007-11-13 Diego Novillo <dnovillo@google.com>
5251
5252 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5253 Initialize ARTIFICIAL.
5254 (lto_read_subroutine_type_subprogram_DIE): Initialize
5255 SAVED_SCOPE.
5256 * lto-read.c (set_line_info): Remove ; from calls to
5257 LINEMAP_POSITION_FOR_COLUMN.
5258
92a44a68 52592007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5260
5261 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5262 (input_expr_operand, input_local_var): Renamed get_type_ref to
5263 input_type_ref.
5264 (input_expr_operand): Get the types correct for
5265 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5266
52672007-11-13 Doug Kwan <dougkwan@google.com>
5268
5269 * lto-read.c (input_widest_uint_uleb128): New function.
5270 (input_tree_flags, process_tree_flags, input_line_info,
5271 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5272 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5273 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5274 (lto_static_init_local): Add code to assert that lto_flags_type is
5275 wide enough.
5276
52772007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5278
5279 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5280 (lto_read_subroutine_type_subprogram_DIE): Handle
5281 DW_AT_static_link and DW_AT_specification. Return the
5282 specification if present.
5283 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5284
52852007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5286
5287 * lto-lang.c: Include target.h.
5288 (registered_builtin_types): New variable.
5289 (lto_type_for_mode): Increase number of modes handled.
5290 (lto_builtin_function): Fix argument list and return the decl.
5291 (lto_register_builtin_type): New function.
5292 (lto_init): Initialize target builtins and language-independent
5293 nodes.
5294 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5295
92a44a68 52962007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5297
5298 * lto-read.c (input_expr_operand): Added code to properly handle
5299 index filed. Added new RANGE_EXPR case.
5300
92a44a68 53012007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5302
5303 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5304 (data_in): Added current_node_has_loc field.
5305 (input_line_info, set_line_info, clear_line_info): Added a support
5306 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5307 did not have on on the source side.
5308 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5309 numbers too.
5310
53112007-11-09 Doug Kwan <dougkwan@google.com>
5312
5313 * lto-read.c (input_expr_operand): Change type of operand 2 of
5314 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5315
53162007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5317
5318 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5319 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5320 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5321 the new decl we are creating. Move informing the middle end about
5322 the new decl to...
5323 (lto_main): ...here. Inform the middle end about global variables
5324 after we have read in all the input files.
5325 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5326 variables with internal linkage, so delete the check for internal
5327 linkage. Combine TREE_PUBLIC flags.
5328
53292007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5330
5331 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5332 DW_AT_decl_line.
5333 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5334 builtin specially. Move check for attribute compatibility
5335 earlier.
5336
53372007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5338
5339 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5340 * config-lang.in (gtfiles): Add lto.h and lto.c.
5341 * lto-elf.c: Include ggc.h.
5342 (lto_elf_file_open): Allocate elf_file from GC memory.
5343 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5344 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5345 in GC memory.
5346 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5347 (lto_file_close): Free file from GC memory.
5348 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5349 (lto_read_member_DIE): Fix declaration.
5350 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5351 in GC memory.
5352 (current_lto_file): New variable.
5353 (lto_main): Use it.
5354 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5355 lto_die_cache_entry): Move to...
5356 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5357 declarations accordingly.
5358 (struct lto_file_struct): Declare.
5359 (lto_file_vtable): Use it instead of lto_file.
5360
53612007-11-06 Alon Dayan <alond@il.ibm.com>
92a44a68 5362 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5363
5364 * lto-read.c (process_flags, lto_static_init_local):
5365 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5366 change global array num_flags_for_code to flags_length_for_code.
5367 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5368
53692007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5370
5371 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5372 layout functions to compute information about the newly constructed
5373 type.
5374
53752007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5376
5377 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5378 case to use DECL_RESULT if necessary.
5379
92a44a68 53802007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5381
5382 * lto-read.c (input_tree_list): Removed.
5383 (input_tree_flags): Added parameter to force flags no matter what
5384 tree code.
5385 (input_expr_operand): Added parameter to input_tree_flags.
5386 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5387 input_expr_operand rather than input_tree_lists.
5388 (input_local_var): Use input_expr_operand to read attributes
5389 rather then input_tree_list.
5390 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5391
53922007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5393
5394 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5395 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5396 TYPE_DECL for it.
5397 * lto-read.c (lto_read_body): Use correct sizes for calculating
5398 type_decls_offset and types_offset.
5399
54002007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5401
5402 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5403 with GENERIC_NEXT.
5404 * config-lang.in (gtfiles): Add lto-lang.c.
5405 * lto-lang.c: Include gt-lto-lto-lang.h.
5406 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5407 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5408 (lto/lto-read.o): Likewise.
5409
92a44a68 54102007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5411
5412 * lto-read.c (data_in): Added type_decls and current_col fields.
5413 (string_slot): New type to hold canonized file name.
5414 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5415 input_line_info, set_line_info, clear_line_info): New functions.
5416 (file_name_hash_table): New hash table.
5417 (input_local_var, input_labels, input_local_vars_index,
5418 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5419 (input_uleb128): Changed type of byte var.
5420 (input_expr_operand): Large number of changes to get line numbers
5421 correct. Added TYPE_DECL case.
5422 (input_globals): Added code to get TYPE_DECLs processed.
5423 (input_local_var): Added code to process line numbers and
5424 TREE_CHAIN and DECL_CONTEXT.
5425 (input_function, input_constructor): Added call to
5426 clear_line_number.
5427 (lto_static_init_local): Added code to get line numbers correct.
5428 (lto_read_body): Added code to get TYPE_DECLS read and to change
5429 parameters to the calls above that had their parms reorganized.
5430
5431
54322007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5433
5434 * lto.h (lto_resolve_typedecl_ref): Declare.
5435 * lto.c (lto_resolve_typedecl_ref): New function.
5436
54372007-10-29 Mark Mitchell <mark@codesourcery.com>
5438 Nathan Froyd <froydnj@codesourcery.com>
5439
5440 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5441 DIEs even if we find an abstract origin for this DIE.
5442
54432007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5444
5445 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5446 RESULT_DECL slightly earlier. Only remember the decl for later
5447 if we successfully merge declarations.
5448
92a44a68 54492007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5450
5451 * lto-read.c (input_expr_operand): Give label_values the proper
5452 context and provide switch statements with a default type.
5453
54542007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5455
5456 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5457 * lto.c (lto_materialize_function): ...to here.
5458
54592007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5460
5461 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5462 * lto.c (lto_info_fd_init): Initialize it.
5463 (lto_info_fd_close): Free it.
5464 (lto_materialize_function): New function.
5465 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5466 unmaterialized_fndecls.
5467 (lto_file_read): Read in all the function bodies after we have read
5468 all of the DWARF info.
5469 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5470 reading a function body.
5471
92a44a68 54722007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5473
5474 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5475 semetric with output_tree_flags. Added call to log flags.
5476 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5477 type issues to make everything consistent with flags being
5478 unsigned HOST_WIDE_INTS.
5479 (input_expr_operand): Added call to
5480 recompute_tree_invariant_for_addr_expr.
5481 (input_local_var): Added debugging for tree_chains. Now calls
5482 input_tree_flags.
5483 (input_phi): Made flags unsigned HOST_WIDE_INT.
5484 (input_ssa_names): Now calls input_tree_flags.
5485 (lto_read_body): Now sets cfun.
5486 (lto_read_function_body): Now sets current_function_pointer.
5487
54882007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5489
5490 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5491 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5492 inspecting fields within.
5493 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5494 handle this appropriately.
5495
54962007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5497
5498 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5499 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5500 both DW_AT_abstract_origin and DW_AT_specification.
5501 (lto_read_subroutine_type_subprogram_DIE): Handle
5502 DW_AT_abstract_origin.
5503 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5504 (lto_read_DIE_at_ptr): Define as static to match declaration.
5505 Lookup the PTR in the cache before reading it from the file.
5506 (lto_resolve_var_ref): Adjust accordingly.
5507 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5508 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5509
55102007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5511
5512 * lto.c (lto_read_DIE_at_ptr): New function.
5513 (lto_resolve_var_ref): Use it.
5514 (lto_resolve_fn_ref): Use it.
5515 (lto_resolve_field_ref): Use it.
5516 (lto_read_variable_formal_parameter_constant_DIE): Follow
5517 DW_AT_specification and return the associated decl when appropriate.
5518
55192007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5520
5521 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5522 Implement for scalar integer modes.
5523 (lto_init): Initialize size_type_node.
5524
92a44a68 55252007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5526
5527 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5528 (input_local_var): Add chaining for params.
5529 (input_ssa_names): Add cfun parameter.
5530 (input_function): Remove unnecessary else.
5531
55322007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5533
5534 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5535 (lto_resolve_var_ref): Use proper types.
5536 (lto_resolve_fn_ref): Likewise.
5537 (lto_resolve_field_ref): Likewise.
5538
55392007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5540
5541 * lto-read.c (input_expr_operand): Remove case.
5542
55432007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5544
5545 * lto.c (lto_read_only_for_child_DIEs): New function.
5546 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5547 * lto-elf.c (lto_elf_map_lto_section): Remove.
5548 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5549 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5550 SSA_NAME. Add missing case for mechanical codes.
5551 (input_cfg): Use basic_block_info_for_function instead of
5552 basic_block_info.
5553
92a44a68 55542007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5555
5556 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5557 (input_list): Renamed input_tree_list and modified to follow same
5558 protocol as lto-function-out.c:output_tree_list.
5559 (input_expr_operand): Make asm operands use input_tree_list.
5560 (input_local_var): Now uses input_tree_list.
5561 (lto_read_body): Change placement for setting context of debug_labels.
5562
5563
92a44a68 55642007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5565
5566 * lto-read.c (input_real): Output debugging in proper order.
5567 (input_integer): Compute bit lengths properly.
5568 (input_list): Clean up declaration.
5569 (input_expr_operand): Change calls to input_real to match fix.
5570 Make reading of LTO_bit_field_ref1 match output.
5571 (input_local_var): Make reading of attributes match what is being
5572 written.
5573 (dump_debug_stream): Also print char in hex.
5574 (debug_out_fun): Fix signed unsigned mismatch.
5575
55762007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5577
5578 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5579 DW_AT_GNU_vector specially, as they are not contiguous with the
5580 specified set of attribute names. Use class_mask to check for
5581 errors at the end of the function
5582 (lto_resolve_var_ref): Read the DIE if it is not cached.
5583 (lto_resolve_fn_ref): Likewise.
5584 (lto_resolve_field_ref): Likewise.
5585
55862007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5587
5588 * lto.c: Include dwarf2out.h.
5589 (lto_cache_store_DIE): Assert that we never change the value.
5590 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5591 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5592 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5593 sensible type instead.
5594 (lto_read_structure_union_class_type_DIE): Store the newly
5595 created type prior to reading the members of the structure to
5596 avoid infinite recursion. Avoid computing types and alignments
5597 for structures whose sizes are unknown.
5598 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5599 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5600 DW_AT_const_value, and DW_AT_specification.
5601 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5602 Return early if we have already constructed the function type.
5603 (lto_read_typedef_DIE): Check to see if the type has been cached
5604 already. Cache the type before reading any children.
5605 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5606 (lto_read_DIE): Unset context->skip_non_parameters around reading
5607 the DIE.
5608 (lto_resolve_fn_ref): Delete trailing whitespace.
5609
92a44a68 56102007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5611
5612 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5613
56142007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5615
5616 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5617
56182007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5619
5620 * lto-lang.c (signed_and_unsigned_types): New variable.
5621 (lto_type_for_size): Consult signed_and_unsigned_types to find
5622 an approprite type, creating it if necessary.
5623 (lto_set_decl_assembler_name): Add actual method body.
5624
56252007-09-06 Jim Blandy <jimb@codesourcery.com>
5626
5627 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5628 can't find a var init for this variable, leave its DECL_INITIAL.
5629 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5630 lto_elf_map_fn_body.
5631 (lto_map_lto_section): New function.
5632 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5633 bodies, and lto_elf_map_optional_lto_section for variable
5634 initializers.
5635 (lto_elf_find_section_data): Quietly return NULL if the section is
5636 missing.
5637 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5638
5639 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5640
5641 * lto-read.c (lto_read_body): Doc fix.
5642
92a44a68 56432007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5644
5645 * lto-read.c (fun_in): Renamed to data_in.
5646 (input_expr_operand, input_local_var, input_string_internal,
5647 input_string, input_real, input_list, get_label_decl,
5648 get_type_ref, input_expr_operand, input_globals, input_labels,
5649 input_local_vars_index, input_local_var, input_local_vars,
5650 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5651 (input_constructor): New function.
5652 (lto_read_function_body): Renamed to lto_read_body and generalized
5653 to handle both functions and constructors.
5654 (lto_read_function_body, lto_read_var_init): New function.
5655
5656
92a44a68 56572007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5658
5659 * lto-read.c (input_expr_operand): Assert that there really is a
5660 FUNCTION_DECL.
5661 (input_globals): Removed checks on 0 section.
5662
92a44a68 56632007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5664
5665 * lto-read.c (fun_in): Added local_decls_index and
5666 local_decls_index_d.
5667 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5668 (input_globals): Enabled code to handle FIELD_DECLs.
5669 (input_local_vars_index, input_local_vars): New function.
5670 (input_local_var): Changed to allow locals to be input randomly.
5671 (lto_read_function_body): Added code to input the
5672 local_decls_index and to free various structures.
5673
56742007-08-17 Jim Blandy <jimb@codesourcery.com>
5675
5676 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5677 ATTRIBUTE_UNUSED from 'die' formal.
5678
5679 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5680 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5681 (input_list): Fix type of 'tag'.
5682 (input_expr_operand): Fix type of 'tag' argument. Update
5683 declaration. Fix type of 'ctag'. Add default case to switch,
5684 since the type of the switched value is now an enum.
5685 (input_local_vars): Fix type of 'tag'.
5686 (input_bb): Fix type of 'tag' argument.
5687 (input_function): Fix type of 'tag' argument.
5688
56892007-08-16 Jim Blandy <jimb@codesourcery.com>
5690
5691 * lto.c (lto_read_member_DIE): Record the tree we create in
5692 fd->die_cache. (Our 'die' argument is no longer unused.)
5693 (lto_resolve_field_ref): New function.
5694 * lto.h (lto_resolve_field_ref): New declaration.
5695
56962007-08-15 Jim Blandy <jimb@codesourcery.com>
5697
5698 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5699
57002007-08-07 Jim Blandy <jimb@codesourcery.com>
5701
5702 * lto.c (lto_read_form): Complete attr_classes table.
5703 (DWARF2_form_data): Doc fix.
5704
57052007-08-05 Mark Mitchell <mark@codesourcery.com>
5706
5707 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5708 and unmap_var_init.
5709 (lto_read_var_init): Declare.
5710 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5711 interface for reading variable initializers.
5712 * lto-elf.c (lto_elf_read_var_init): Remove.
5713 (lto_elf_file_vtable): Update initializer.
5714 (lto_elf_read_var_init): Add comment about unused-ness.
5715 * lto-read.c (lto_read_var_init): New.
5716
5717 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5718
92a44a68 57192007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5720
5721 * lto-read.c (lto_read_function_body): Moved declaration of fn
5722 outside of ifdef.
5723
92a44a68 57242007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5725
5726 * lto-read.c (input_uleb128, input_string_internal, input_real,
5727 input_integer, input_record_start, input_list, get_type_ref,
5728 input_flags, input_expr_operand, input_expr_operand,
5729 input_expr_operand, input_local_vars, input_cfg, input_phi,
5730 input_ssa_names, input_bb, input_function): Added semicolons.
5731
5732
92a44a68 57332007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5734
5735 * lto-read.c (input_globals): Remove debugging.
5736 (input_function): Set DECL_ARGUMENTS.
5737
92a44a68 57382007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5739
5740 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5741 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5742 (input_phi): Made work with operands other than SSA_NAMES and
5743 fixed processing of flags.
5744 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5745 (input_flags): New function.
5746 * lto-lang.c (lto_init): Changed state of in_lto_p.
5747
5748
57492007-07-24 Mark Mitchell <mark@codesourcery.com>
5750
5751 * lto-tree.h (lto_varargs_cookie): Remove.
5752 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5753 skip_non_parameters, skip_parameters.
5754 (lto_varargs_cookie): Remove.
5755 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5756 parameter types.
5757 (lto_read_abbrev): New function.
5758 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5759 child DIEs.
5760 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5761 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5762 (lto_file_read): Initialize new context fields.
5763 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5764 (lto_unsigned_type): Remove.
5765 (lto_signed_type): Likewise.
5766 (lto_signed_or_unsigned_type): Likewise.
5767 (lto_init): Do not create lto_varargs_cookie.
5768 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5769 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5770 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5771
57722007-07-19 Jan Hubicka <jh@suse.cz>
5773
5774 * lto-read.c (lto_read_function_body): Produce empty scope block
5775 to avoid crash.
5776
57772007-07-18 Mark Mitchell <mark@codesourcery.com>
5778
5779 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5780 process local variables.
5781 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5782
92a44a68 57832007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5784
5785 * lto-read.c (input_list, input_expr_operand): Added struct
5786 function parameter.
5787 (init_cfg, finalize_cfg): Removed function.
5788 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5789 (input_labels, input_local_vars): Now takes input_block parameter rather than
5790 synthsyzing it.
5791 (input_cfg, input_phi, input_ssa_names): New functions.
5792 (input_bb): Now passes in input_blocks. Does not construct cfg
5793 and processes the list of phi functions.
5794 (input_function): Now builds both the cfg and ssa_names table.
5795 (lto_read_function_body): Processes new header fields to construct
5796 streams for the ssa_names and cfg and their debugging.
5797 * lto/lto-lang.c (lto_init): Set in_lto_p.
5798
5799
58002007-06-28 Mark Mitchell <mark@codesourcery.com>
5801
5802 * lto.h (lto_file_vtable): Add read_var_init.
5803 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5804 initializers.
5805 (lto_main): Remove bogus asserts.
5806 * lto-elf.c (tm.h): Include it.
5807 (libiberty.y): Likewise.
5808 (lto_elf_file): Add strtab and symtab. Rename
5809 string_table_section_index to sec_strtab.
5810 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5811 (lto_elf_get_shdr): New function.
5812 (lto_elf_free_shdr): Likewise.
5813 (lto_elf_find_section_data): Use them.
5814 (lto_elf_read_symtab): New function.
5815 (lto_elf_lookup_sym): Likewise.
5816 (lto_elf_free_sym): Likewise.
5817 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5818 (lto_elf_built_init): New function.
5819 (lto_elf_read_var_init): Likewise.
5820 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5821
92a44a68 58222007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5823
5824 * lto-read (make_new_block): Initialize the stmt_list.
5825 (lto_static_init_local): Add debugging for missing codes.
5826
58272007-06-26 Mark Mitchell <mark@codesourcery.com>
5828
5829 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5830 unprototyped functions.
5831
58322007-06-23 Mark Mitchell <mark@codesourcery.com>
5833
5834 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5835 Handle DW_AT_MIPS_linkage_name.
5836 (lto_read_subroutine_type_subprogram): Likewise. Correct
5837 compilation errors.
5838 (lto_main): Remove incorrect assertions.
5839 * lto-symbtab.c: Build function types out of TREE_LISTs.
5840
5841 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5842
5843 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5844
92a44a68 58452007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5846
5847 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5848 dummy since ggc does not like empty structs.
5849 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5850 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5851 expr->common to expr->base.
5852 (make_new_block): Moved stmt_list to proper place.
5853
5854
58552007-03-14 Robert Kennedy <jimbob@google.com>
5856
5857 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5858 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5859 assembler name from DWARF.
5860 * lto-lang.c (lto_set_decl_assembler_name) New function.
5861
58622006-09-10 Mark Mitchell <mark@codesourcery.com>
5863
5864 * lto.h (lto_file_vtable): New structure.
5865 (lto_file): Add vtable pointer.
5866 (lto_file_init): Add vtable paramter.
5867 (lto_read_function_body): New function.
5868 (lto_symtab_merge_fn): New function.
5869 * lto.c (lto_file_init): Add vtable parameter.
5870 (lto_read_form): Fill in entries for DW_AT_prototyped,
5871 DW_AT_frame_base.
5872 (lto_read_subroutine_type_subprogram_DIE): New function.
5873 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5874 DW_TAG_subprogram.
5875 * lto-elf.c (lto_elf_vile_vtable): New variable.
5876 (lto_elf_file_open): Pass it to lto_file_init.
5877 (lto_elf_map_fn_body): New function.
5878 (lto_elf_unmap_fn_body): Likewise.
5879 * lto-read.c: New file.
5880 * lto-symtab.c (lto_symtab_merge_fn): New function.
5881 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5882 tree_rest_of_compilation.
5883 * Make-lang.in (LTO_OBJS): Add lto-read.o
5884 (lto-read.o): New target.
5885
58862006-09-03 Mark Mitchell <mark@codesourcery.com>
5887
5888 * lto.c (<inttypes.h>): Don't include it.
5889 (lto_context): Don't typedef it.
5890 (lto_resolve_reference): New function.
5891 (lto_read_form): Use it.
5892 (lto_resolve_type_ref): New function.
5893 (lto_resolve_var_ref): Likewise.
5894 (lto_resolve_fn_ref): Likewise.
5895 * lto.h (<inttypes.h>): Include it.
5896 (lto_context): New type.
5897 (lto_ref): New structure.
5898 (lto_resolve_type_ref): Declare.
5899 (lto_resolve_var_ref): Likewise.
5900 (lto_resolve_fn_ref): Likewise.
5901
59022006-08-18 Mark Mitchell <mark@codesourcery.com>
5903
5904 * lang-specs.h: New file.
5905
59062006-08-14 Mark Mitchell <mark@codesourcery.com>
5907
5908 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5909 (lto_info_fd_close): Deallocate it.
5910 (lto_die_cache_entry): New structure.
5911 (lto_cache_hash): New function.
5912 (lto_cache_eq): Likewise.
5913 (lto_cache_store_DIE): Likewise.
5914 (lto_cache_lookup_DIE): Likewise.
5915 (lto_read_referenced_type_DIE): Use the cache.
5916 (lto_read_pointer_type_DIE): Robustify.
5917 (lto_read_DIE): Use the cache.
5918 * lto.h (hashtab.h): Include.
5919 (lto_info_fd): Add DIE cache.
5920 * Make-lang.in (LTO_H): New variable.
5921 (lto/lto-lang.o): Use LTO_H.
5922 (lto/lto-elf.o): Likewise.
5923 (lto/lto-symtab.o): Likewise.
5924
59252006-07-09 Mark Mitchell <mark@codesourcery.com>
5926
5927 * lto.c (lto_abi_mismatch_error): New function.
5928 (lto_abbrev_read): Initialize num_abbrevs.
5929 (lto_read_form): Specify allowed form classes for
5930 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5931 (lto_read_variable_formal_parameter_constant_DIE): Handle
5932 DW_AT_declaration. Call lto_symtab_merge_var.
5933 (lto_read_pointer_type_DIE): New function.
5934 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5935 not creat TYPE_DECLs for types that already have them.
5936 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5937 (lto_set_cu_context): Make cu_start point to the header, not the
5938 first DIE.
5939 (lto_file_read): Adjust for change to lto_set_cu_context.
5940 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5941 (lto/lto-symtab.o): New rule.
5942 * lto-tree.h (lang_identifier): Add decl field.
5943 (LANG_IDENTIFIER_CAST): New macro.
5944 (LTO_IDENTIFIER_DECL): Likewise.
5945 (lto_symtab_merge_var): Declare.
5946 * lto-symtab.c: New file.
5947
59482006-07-02 Daniel Berlin <dberlin@dberlin.org>
5949
5950 * lto.c (lto_context): Add current_cu and info_fd members.
5951 (DWARF2_CompUnit): New structure.
5952 (lto_read_DIE): Take lto_info_fd *.
5953 (lto_read_child_DIEs): Ditto.
5954 (lto_file_corrupt_error): Constify argument.
5955 (lto_set_cu_context): New function
5956 (lto_info_fd_init): Ditto.
5957 (lto_info_fd_close): Ditto.
5958 (lto_file_init): Use lto_info_fd_init.
5959 (lto_file_close): Use lto_info_fd_close.
5960 (lto_read_initial_length): Pass in pointer to header size.
5961 (lto_read_comp_unit_header): Correct cu_length to
5962 real length from beginning of header. Take lto_info_fd * as
5963 argument.
5964 (find_cu_for_offset): New function.
5965 (lto_read_form): Change first argument to lto_info_fd *.
5966 Add FORM_CONTEXT argument.
5967 Handle DW_FORM_ref_addr.
5968 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5969 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5970 Swap contexts if necessary for form.
5971 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5972 lto_file_corrupt_error.
5973 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5974 (lto_read_referenced_type_DIE): Change first argument to
5975 lto_info_fd *. Access lto_fd fields through base pointer.
5976 (lto_read_compile_unit_DIE): Change first argument to an
5977 lto_info_fd *.
5978 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5979 (lto_read_base_type_DIE): Ditto.
5980 (lto_read_child_DIEs): Ditto.
5981 (lto_read_DIE): Ditto. Change type of function pointer.
5982 (lto_info_read): New function.
5983 (lto_set_cu_context): Ditto.
5984 (lto_file_read): Use lto_info_read, walk resulting CU's
5985 (lto_main): Update for lto_info_fd change.
5986 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5987 necessary.
5988 * lto.h (DWARF2_CompUnit): New structure.
5989 (lto_info_fd): Ditto.
5990 (lto_file): Change debug_info to be an lto_info_fd.
5991
59922006-06-25 Mark Mitchell <mark@codesourcery.com>
5993
5994 * lto.c (toplev.h): Include it.
5995 (dwarf2.h): Likewise.
5996 (tree.h): Likewise.
5997 (tm.h): Likewise.
5998 (cgraph.h): Likewise.
5999 (ggc.h): Likewise.
6000 (inttypes.h): Likewise.
6001 (DWARF2_attr): New type.
6002 (DWARF2_abbrev): Likewise.
6003 (DWARF2_class): Likewise.
6004 (DWARF2_form_data): Likewise.
6005 (lto_context): Likewise.
6006 (lto_fd_init): New function.
6007 (lto_abbrev_fd_init): Likewise.
6008 (lto_abbrev_fd_close): Likewise.
6009 (lto_file_init): Use them.
6010 (lto_file_close): New function.
6011 (lto_file_corrupt_error): Likewise.
6012 (LTO_CHECK_INT_VAL): New macro.
6013 (lto_check_size_t_val): New function.
6014 (lto_check_int_val): Likewise.
6015 (LTO_READ_TYPE): New macro.
6016 (lto_read_ubyte): New function.
6017 (lto_read_uhalf): Likewise.
6018 (lto_read_uword): Likewise.
6019 (lto_read_uleb128): Likewise.
6020 (lto_read_initial_length): Likewise.
6021 (lto_abbrev_read_attrs): Likewise.
6022 (lto_abbrev_read): Likewise.
6023 (lto_abbrev_lookup): Likewise.
6024 (lto_read_section_offset): Likewise.
6025 (lto_read_comp_unit_header): Likewise.
6026 (lto_read_form): Likewise.
6027 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6028 (LTO_BEGIN_READ_ATTRS): Likewise.
6029 (LTO_END_READ_ATTRS): Likewise.
6030 (lto_unsupported_attr_error): New function.
6031 (lto_get_identifier): Likewise.
6032 (lto_read_referenced_type_DIE): Likewise.
6033 (lto_read_compile_unit_DIE): Likewise.
6034 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6035 (lto_read_base_type_DIE): Likewise.
6036 (lto_read_DIE): Likewise.
6037 (lto_read_child_DIEs): Likewise.
6038 (lto_file_read): Read DIEs.
6039 (lto_main): Ask middle end to emit entities.
6040 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6041 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6042 (lto_elf_file_close): Likewise.
6043 * lto.h (lto_file): Declare.
6044 (DWARF2_abbrev): Likewise.
6045 (lto_fd): New type.
6046 (lto_abbrev_fd): Likewise.
6047 (lto_file): Use new types.
6048 (lto_file_close): Declare.
6049 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
6050
60512006-06-18 Mark Mitchell <mark@codesourcery.com>
6052
6053 * lto.h: New file.
6054 * lto.c: New file.
6055 * lto-elf.c: New file.
6056 * lto-lang.c (flags.h): Include it.
6057 (lto.h): Likewise.
6058 (lto_init): New function.
6059 (lto_write_globals): Remove.
6060 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
6061 (LANG_HOOKS_INIT): Define.
6062 (LANG_HOOKS_PARSE_FILE): Likewise.
6063 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6064 (LTO_EXE): Link with libelf.
6065 (lto/lto-lang.o): Update dependencies.
6066 (lto/lto.o): New target.
6067 (lto/lto-elf.o): Likewise.
6068
60692006-06-12 Mark Mitchell <mark@codesourcery.com>
6070
6071 * config-lang.in: New file.
6072 * Make-lang.in: Likewise.
6073 * lto-tree.h: Likewise.
6074 * lto-lang.c: Likewise.
f1717362 6075\f
fbd26352 6076Copyright (C) 2006-2019 Free Software Foundation, Inc.
7bfefa9d 6077
f1717362 6078Copying and distribution of this file, with or without modification,
6079are permitted in any medium without royalty provided the copyright
6080notice and this notice are preserved.