]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
c-decl.c (start_decl): Adjust quoting and hyphenation in diagnostics.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
0ecf545c
MS
12019-06-05 Martin Sebor <msebor@redhat.com>
2
3 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
4
a9c697b8
MS
52019-05-16 Martin Sebor <msebor@redhat.com>
6
7 * lto-dump.c (lto_main): Same.
8 * lto.c (stream_out): Same.
9
38613b9b
ML
102019-05-10 Martin Liska <mliska@suse.cz>
11
12 * Make-lang.in: Use program_transform_name for lto-dump.
13 * config-lang.in: Do not mark lto-dump compiler as we don't
14 want to have it installed at
15 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
16
03de2955
RO
172019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18
19 * lto-common.c (lto_file_read): Print section->start as int64_t,
20 section->len as uint64_t.
21 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
22
ee7a003f
ML
232019-05-06 Martin Liska <mliska@suse.cz>
24
25 * lto-common.c: Update coding style.
26 * lto.c (materialize_cgraph): Likewise.
27
66d62d9f
HK
282019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
29 Martin Liska <mliska@suse.cz>
30
31 * Make-lang.in: Add lto_dump-related definition.
32 * config-lang.in: Likewise.
33 * lang.opt: Add new language LTODump and options related
34 to LTO dump tool.
35 * lto-common.c (lto_read_decls): Support type statistics dump.
36 (lto_file_read): Likewise for object files.
37 * lto-dump.c: New file.
38 * lto-lang.c (lto_option_lang_mask): Move from ..
39 * lto.c (lto_option_lang_mask): .. here.
40 * lto.h (lto_option_lang_mask): New declaration.
41
a79420f9
ML
422019-05-06 Martin Liska <mliska@suse.cz>
43 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
44
45 * Make-lang.in: Add lto-common.o.
46 * config-lang.in: Likewise for gtfiles.
47 * lto-common.c: New file.
48 * lto-common.h: New file.
49 * lto-lang.c: Include lto-common.h.
50 * lto.c: Move most of the functionality
51 into lto-common.c file.
52
0c7f51e4
JH
532019-04-12 Jan Hubicka <hubicka@ucw.cz>
54
55 * lto.c (do_stream_out): rename to ...
56 (stream_out): ... this one; move original code to ...
57 (stream_out_partitions_1, stream_out_partitions): ... these new
58 functions.
59 (lto_wpa_write_files): Honnor lto_parallelism
60
303389b1
ML
612019-03-26 Martin Liska <mliska@suse.cz>
62
63 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 64 wrapping.
303389b1 65
a3f9f006
ML
662019-03-11 Martin Liska <mliska@suse.cz>
67
68 * lto-lang.c (lto_post_options): Wrap an option name
69 in a string format message and fix GNU coding style.
70 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
71
04e5c73d
JJ
722019-03-09 Jakub Jelinek <jakub@redhat.com>
73
74 PR target/79645
75 * lang.opt: Terminate description text with a dot.
76
80f52b40
JM
772019-02-28 Jason Merrill <jason@redhat.com>
78
79 PR c++/88049 - ICE with undefined destructor and anon namespace.
80 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
81 for a type in an anonymous namespace.
82
67914693
SL
832019-01-09 Sandra Loosemore <sandra@codesourcery.com>
84
85 PR other/16615
86
87 * lto-partition.c: Mechanically replace "can not" with "cannot".
88 * lto-symtab.c: Likewise.
89 * lto.c: Likewise.
90
a5544970
JJ
912019-01-01 Jakub Jelinek <jakub@redhat.com>
92
93 Update copyright years.
94
d840d7a2
JH
952018-12-24 Jan Hubicka <hubicka@ucw.cz>
96
97 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
98 for method whose basetype was already reported.
99
ed1b53a0
MP
1002018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
101
102 Minimize clone counter memory usage in LTO.
103 * lto-partition.c (privatize_symbol_name_1): Keep track of
104 non-unique symbol counters in the lto_clone_numbers hash
105 map.
106 (lto_promote_cross_file_statics): Allocate and free the
107 lto_clone_numbers hash map.
108 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
109 map.
110
ad42aa96
JH
1112018-11-28 Jan Hubicka <jh@suse.cz>
112
113 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
114
d7dce787
JH
1152018-11-22 Jan Hubicka <jh@suse.cz>
116
117 * lto.c (cmp_type_location): Remove.
118 (lto_read_decls): Do not allocate odr_types.
119
f615cb16
ML
1202018-11-19 Martin Liska <mliska@suse.cz>
121
122 PR lto/88077
123 * lto-symtab.c (lto_symtab_merge): Transform the
124 condition before r256989.
125
12eac232
ML
1262018-11-16 Martin Liska <mliska@suse.cz>
127
128 PR lto/88004
129 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
130 lto_symtab_symbol_p as it does checking of transparent alias.
131 These needs to be also merged in the function.
132
7958186b
MP
1332018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
134
135 * lto-partition.c (privatize_symbol_name_1): Use
136 clone_function_name_numbered.
137
abb967da
JH
1382018-10-26 Jan Hubicka <jh@suse.cz>
139
140 * lto/lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
141
033eb567
DM
1422018-10-17 David Malcolm <dmalcolm@redhat.com>
143
144 * Make-lang.in (selftest-lto): New.
145
9ed6dbee
ML
1462018-08-29 Martin Liska <mliska@suse.cz>
147
148 PR bootstrap/87130
149 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
150 to behavior before r263887.
151
3d78e008
ML
1522018-08-27 Martin Liska <mliska@suse.cz>
153
154 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
155 fndecl_built_in_p and remove check for FUNCTION_DECL if
156 possible.
3d78e008
ML
157 * lto-symtab.c (lto_symtab_merge_p): Likewise.
158 (lto_symtab_merge_decls_1): Likewise.
159 (lto_symtab_merge_symbols): Likewise.
160 * lto.c (lto_maybe_register_decl): Likewise.
161 (read_cgraph_and_symbols): Likewise.
162
efd9eb29
TV
1632018-08-21 Tom de Vries <tdevries@suse.de>
164
165 * lto.c (lto_main): Call debuginfo_early_start and
166 debuginfo_early_stop.
167
00abf86c
MS
1682018-07-20 Martin Sebor <msebor@redhat.com>
169
170 PR middle-end/82063
171 * lto-lang.c (lto_handle_option): Change function argument
172 to HOST_WIDE_INT.
173
efe0e6cd
RB
1742018-07-20 Richard Biener <rguenther@suse.de>
175
176 PR debug/86585
177 * lto.c (unify_scc): Before we throw away an SCC see if we
178 can amend prevailing single-entry SCC with debug refs.
179
814f3331
JH
1802018-07-13 Jan Hubicka <hubicka@ucw.cz>
181
182 * lto.c (do_stream_out): Add PART parameter; open dump file.
183 (stream_out): Add PART parameter; pass it to do_stream_out.
184 (lto_wpa_write_files): Update call of stream_out.
185
c518c102
ML
1862018-07-04 Martin Liska <mliska@suse.cz>
187
188 PR middle-end/66240
189 PR target/45996
190 PR c/84100
191 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
192 instead of memcmp.
193
b54006ae
ML
1942018-06-20 Martin Liska <mliska@suse.cz>
195
196 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 197 FIXME comment.
b54006ae 198
56f62793
ML
1992018-06-19 Martin Liska <mliska@suse.cz>
200
201 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 202 of get_create.
56f62793
ML
203 (undo_partition): Likewise.
204 (lto_balanced_map): Likewise.
205
1724941e
ML
2062018-06-19 Martin Liska <mliska@suse.cz>
207
208 * config-lang.in: Remove stagestuff.
209
29a50dfb
JH
2102018-06-08 Jan Hubicka <hubicka@ucw.cz>
211
212 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
213 New global vars.
214 (lto_register_dumps): New hook.
215 (LANG_HOOKS_REGISTER_DUMPS): New.
216 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
217 * lto-symtab.c: Include lto.h; dump into dump_file instead of
218 symtab->dump_file.
219 (lto_symtab_merge_decls): Initialize dump file.
220 * lto.c (read_cgraph_and_symbols): Initialize dump file.
221 (do_whole_program_analysis): Likewise.
222
74644756
ML
2232018-06-08 Martin Liska <mliska@suse.cz>
224
225 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
226 instead of summary_uid.
227
99353fcf
ML
2282018-06-08 Martin Liska <mliska@suse.cz>
229
230 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
231 of get.
232 (undo_partition): Likewise.
233 (lto_balanced_map): Likewise.
234
31db0fe0
ML
2352018-06-08 Martin Liska <mliska@suse.cz>
236
237 * lto-partition.c (add_references_to_partition): Remove support
238 for MPX (macros, related functions, fields in cgraph_node, ...).
239 (add_symbol_to_partition_1): Likewise.
240 (privatize_symbol_name): Likewise.
241 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
242
f115c9b5
RB
2432018-06-05 Richard Biener <rguenther@suse.de>
244
245 * lto.c (cmp_type_location): Expand locations only once.
246
5b42d196
JH
2472018-05-30 Jan Hubicka <hubicka@ucw.cz>
248
249 * lang.opt (lto_linker_output): Add nolto-rel.
250 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
251 and LTO_LINKER_OUTPUT_NOLTOREL.
252 (lto_init): Generate lto when doing incremental link.
253 * lto.c (lto_precess_name): Add lto1-inclink.
254
ab168044
JH
2552018-05-18 Jan Hubicka <jh@suse.cz>
256
257 PR lto/85583
258 * lto-partition.c (account_reference_p): Do not account
259 references from aliases; do not account refernces from
260 external initializers.
261
b6e33d73
JH
2622018-04-30 Jan Hubicka <jh@suse.cz>
263
264 * lto.c (cmp_partitions_size): Remove.
265 (lto_wpa_write_files): Also output priorities; do not sort partitions.
266 (cmp_partition_order): Move to ...
267 * lto-partition.c (cmp_partition_order): ...
268 (lto_1_to_1_map): Sort partitions.
269
e693ebce
JH
2702018-04-20 Jan Hubicka <jh@suse.cz>
271
272 * lto-partition.c (lto_balanced_map): Fix sanity check.
273
ddb0b824
JH
2742018-04-19 Jan Hubicka <jh@suse.cz>
275
276 * lto-partition.c: Include sreal.h
277 (add_symbol_to_partition_1): Use size instead of self_size
278 for size estimate.
279 (account_reference_p): New.
280 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
281 fix accounting errors in boundary size; add debug output; combine cost
282 as cost/size instead of cost/internal; reduce the partitioning error to
283 +- 1/8 of the parttion size.
284
1781a04f
ML
2852018-04-19 Martin Liska <mliska@suse.cz>
286
287 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
288 for multiple PREVAILING_DEF_IRONLY for common symbols.
289
6867cd69
ML
2902018-04-18 Martin Liska <mliska@suse.cz>
291
292 * lto.c (lto_read_decls): Fix GNU coding style and typos.
293
af597536
ML
2942018-04-18 Martin Liska <mliska@suse.cz>
295
296 PR ipa/83983
297 PR ipa/85391
298 * lto.c (cmp_type_location): New function.
299 (lto_read_decls): First collect all types, then
300 sort them according by location before register_odr_type
301 is called.
302
7d6051b1
JH
3032018-04-18 Jan Hubicka <jh@suse.cz>
304 Martin Liska <mliska@suse.cz>
305
306 PR lto/85391
307 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
308 types.
309
23d87577
ML
3102018-04-11 Martin Liska <mliska@suse.cz>
311
312 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
313 function.
314
c16833dc
ML
3152018-04-10 Martin Liska <mliska@suse.cz>
316
317 PR lto/85248
318 * lto-symtab.c (lto_symtab_merge_p): Do not check for
319 TREE_VALUES of error attributes.
320
8d96e546
ML
3212018-04-10 Richard Biener <rguenther@suse.de>
322 Martin Liska <mliska@suse.cz>
323
324 PR lto/85248
325 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
326
97bb4812
JH
3272018-02-08 Jan Hubicka <hubicka@ucw.cz>
328
329 * lto-partition.c (lto_balanced_map): Watch overflow.
330
39aa9b23
JH
3312018-02-08 Jan Hubicka <hubicka@ucw.cz>
332
333 PR ipa/81360
334 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
335 (read_cgraph_and_symbols): Use
336 symtab_node::output_to_lto_symbol_table_p.
337
26a823f0
JH
3382018-01-30 Jan Hubicka <hubicka@ucw.cz>
339
340 * lto.c (register_resolution): Remove forgotten sanity check.
341
43fbc2e9
JH
3422018-01-30 Jan Hubicka <hubicka@ucw.cz>
343
344 PR lto/81004
345 * lto.c: Include builtins.h
346 (register_resolution): Merge resolutions in case trees was
347 merged across units.
348 (lto_maybe_register_decl): Break out from ...
349 (lto_read_decls): ... here.
350 (unify_scc): Also register decls here.
351 (read_cgraph_and_symbols): Sanity check that all resolutions was
352 read.
353
ee034d31
EB
3542018-02-02 Eric Botcazou <ebotcazou@adacore.com>
355
356 PR lto/83954
357 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
358 component type of array types with non-aliased component.
359
44c945e6
JH
3602018-01-30 Jan Hubicka <hubicka@ucw.cz>
361
362 PR lto/83954
363 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
364 for type match warning on arrays of pointers.
365
cde9b2f8
ML
3662018-01-23 Martin Liska <mliska@suse.cz>
367
368 PR lto/81440
369 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
370 trailing arrays at the end of a struct.
371
5c0caeb3
RS
3722018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
373 Alan Hayward <alan.hayward@arm.com>
374 David Sherwood <david.sherwood@arm.com>
375
376 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
377
928686b1
RS
3782018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
379 Alan Hayward <alan.hayward@arm.com>
380 David Sherwood <david.sherwood@arm.com>
381
382 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
383 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
384
85ec4feb
JJ
3852018-01-03 Jakub Jelinek <jakub@redhat.com>
386
387 Update copyright years.
388
4849deb1
JJ
3892017-12-15 Jakub Jelinek <jakub@redhat.com>
390
391 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
392 affects_type_identity and handler fields, adjust comments.
393
734914b6
RS
3942017-12-07 Richard Sandiford <richard.sandiford@arm.com>
395
396 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
397
5d9ae53d
MS
3982017-12-07 Martin Sebor <msebor@redhat.com>
399
400 PR c/81544
401 * lto-lang.c (lto_attribute_table): Initialize new member of struct
402 attribute_spec.
403
5de73c05
JJ
4042017-11-30 Jakub Jelinek <jakub@redhat.com>
405
406 * lto.c (create_subid_section_table): Use ; instead of ;;.
407
974aedcc
MP
4082017-11-22 Marek Polacek <polacek@redhat.com>
409
410 PR c++/60336
411 PR middle-end/67239
412 PR target/68355
413 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
414
1bad9c18
JH
4152017-11-10 Jan Hubicka <hubicka@ucw.cz>
416
417 * lto-partition.c (lto_balanced_map): Use frequency accessor.
418
65991ea3
JH
4192017-10-13 Jan Hubicka <hubicka@ucw.cz>
420
421 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
422
4e7d0260
NS
4232017-10-11 Nathan Sidwell <nathan@acm.org>
424
425 * lto.c (mentions_vars_p_decl_with_vis): Use
426 DECL_ASSEMBLER_NAME_RAW.
427 (lto_fixup_prevailing_decls): Likewise.
428
8e6cdc90
RS
4292017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
430
431 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
432 operating on trees as wide_ints.
433
357b7604
RS
4342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
435 Alan Hayward <alan.hayward@arm.com>
436 David Sherwood <david.sherwood@arm.com>
437
438 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
439
1ea85365
RB
4402017-08-21 Richard Biener <rguenther@suse.de>
441
92a285c1
ML
442 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
443 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
444 TYPE_DECL debug processing, register DIE references from
445 prevailing SCCs with the debug machinery.
446 (lto_section_with_id): Handle LTO debug sections.
1ea85365 447
8e093270
NS
4482017-08-16 Nathan Sidwell <nathan@acm.org>
449
450 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
451 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
452 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
453
eac3ab4a
TV
4542017-08-08 Tom de Vries <tom@codesourcery.com>
455
456 * lto.c: Include attribs.h.
457
314e6352
ML
4582017-08-08 Martin Liska <mliska@suse.cz>
459
460 * lto-lang.c: Include header files.
461 * lto-symtab.c: Likewise.
462
63e434ca
RB
4632017-08-03 Richard Biener <rguenther@suse.de>
464
465 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
466 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
467 use DECL_LANG_FLAG_0.
468 (lto_symtab_prevail_decl): Likewise.
469
417ca011
TD
4702017-07-07 Torsten Duwe <duwe@suse.de>
471
472 * lto-lang.c (lto_attribute_table): Add entry for
473 "patchable_function_entry".
474
20deef65
NS
4752017-07-19 Nathan Sidwell <nathan@acm.org>
476
477 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
478 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
479
0eaf0bfe
JH
4802017-07-06 Jan Hubicka <hubicka@ucw.cz>
481
482 * lto-partition.c (lto_balanced_map): Do not check
483 flag_toplevel_reorder.
2db9b7cd 484
0eaf0bfe 4852017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
486 * lto-lang.c (lto_init): Use builtin_structptr_types.
487
d1eed638
JH
4882017-06-15 Jan Hubicka <hubicka@ucw.cz>
489 Thomas Preud'homme <thomas.preudhomme@arm.com>
490
491 PR lto/69866
492 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
493 that resolved externally.
494
d2db2e6b
JH
4952017-05-23 Jan Hubicka <hubicka@ucw.cz>
496
497 * lto.c (do_whole_program_analysis): Replace inline_free_summary
498 by ipa_free_fn_summary.
499
464d0118
ML
5002017-05-23 Martin Liska <mliska@suse.cz>
501
502 * lto-symtab.c (lto_cgraph_replace_node): Use
503 symtab_node::dump_{asm_,}name functions.
504 * lto.c (read_cgraph_and_symbols): Likewise.
505 (do_whole_program_analysis): Likewise.
506
6c52831d
ML
5072017-05-23 Martin Liska <mliska@suse.cz>
508
509 * lto.c (read_cgraph_and_symbols): Use the renamed function.
510 (do_whole_program_analysis): Use the renamed function.
511
27d020cf
JH
5122017-05-22 Jan Hubicka <hubicka@ucw.cz>
513
514 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
515 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
516
815d9cc6
XR
5172017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
518
92a285c1 519 PR c++/80038
815d9cc6
XR
520 * lto-lang.c (lto_init): Set in_lto_p earlier.
521
350792ff
RB
5222017-04-12 Richard Biener <rguenther@suse.de>
523 Bernd Edlinger <bernd.edlinger@hotmail.de>
524
525 PR middle-end/79671
526 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
527
4a44a5f3
ML
5282017-02-14 Martin Liska <mliska@suse.cz>
529
530 * lto.c (do_stream_out): Free LTO file filename string.
531
8a3a6ab4
DM
5322017-01-19 David Malcolm <dmalcolm@redhat.com>
533
534 * lto-lang.c (builtin_type_for_size): Convert call to
535 lto_type_for_size to one through the langhook.
536 (lto_type_for_size): Move to langhooks.c and rename to
537 lhd_type_for_size.
538 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
539
4c4b4703
JJ
5402017-01-11 Jakub Jelinek <jakub@redhat.com>
541
542 PR middle-end/50199
543 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
544 if it was 0.
545
bd2c6270
JJ
5462017-01-09 Jakub Jelinek <jakub@redhat.com>
547
548 PR translation/79019
549 PR translation/79020
550 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
551
24d3f325
NS
5522017-01-06 Nathan Sidwell <nathan@acm.org>
553
5406184c
NS
554 * lto-partition.c (promote_symbol): Write to dump file sooner,
555 include alias promoting too.
556
24d3f325
NS
557 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
558 (may_need_named_section_p): Likewise.
559 (rename_statics): Likewise.
560 (lto_promote_cross_file_statics): Likewise.
561
cbe34bb5
JJ
5622017-01-01 Jakub Jelinek <jakub@redhat.com>
563
564 Update copyright years.
565
6c8bf066
GJL
5662016-11-30 Georg-Johann Lay <avr@gjlay.de>
567
568 PR lto/78562
569 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
570 mismatch if the two types are built-in.
571
7fa6a965
PK
5722016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
573
574 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
575
efb71232
RB
5762016-11-23 Richard Biener <rguenther@suse.de>
577
578 PR lto/78472
579 * lto.c (hash_canonical_type): Ignore zero-sized fields.
580
48330c93
BE
5812016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
582
583 PR c++/71973
584 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
585
899ca90e 5862016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
587 Alan Hayward <alan.hayward@arm.com>
588 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
589
590 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
591
65179585
RB
5922016-10-31 Richard Biener <rguenther@suse.de>
593
594 PR lto/78129
595 * lto.c (do_whole_program_analysis): Bail out after errors
596 from WPA analysis.
597
8bc5448f
KV
5982016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
599
600 * lto-partition.c: Include tree-vrp.h.
601 * lto.c: Likewise.
602
68317985
RB
6032016-09-20 Richard Biener <rguenther@suse.de>
604
605 * lto.c (lto_main): Call early_finish with "<artificial>" as
606 filename.
607
321e76fb
RB
6082016-09-19 Richard Biener <rguenther@suse.de>
609
610 * lto.c (lto_main): Invoke early_finish debug hook.
611
ea6e17d5
RB
6122016-07-25 Richard Biener <rguenther@suse.de>
613
614 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
615 (unify_scc): Likewise.
616 (lto_read_decls): Likewise.
617
e9ac1f86
JJ
6182016-06-28 Jakub Jelinek <jakub@redhat.com>
619
620 * Make-lang.in: Don't cat ../stage_current if it does not exist.
621
277d7ee0
AK
6222016-06-23 Andi Kleen <ak@linux.intel.com>
623
624 * Make-lang.in: Add support for autofdo (disabled for now)
625
4d926e34
MS
6262016-06-10 Martin Sebor <msebor@redhat.com>
627
628 PR c/71392
629 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
630 attribute in type-generic builtins.
631
479f99c9
JH
6322016-05-16 Jan Hubicka <hubicka@ucw.cz>
633
634 * lto-partition.c (add_symbol_to_partition_1): Likewise.
635
1a0bf5e1
JH
6362016-05-03 Jan Hubicka <hubicka@ucw.cz>
637
638 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
639
a2e76867
PK
6402016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
641
642 * lto-partition.h (lto_balanced_map): New parameter.
643 * lto-partition.c (lto_balanced_map): New parameter
644 max_partition_size.
645 Check if partition size is greater than max_partition_size.
646 * lto.c (do_whole_program_analysis): Adjust calls to
647 lto_balanced_map() to pass 2nd argument.
648
ea913779
L
6492016-03-17 H.J. Lu <hongjiu.lu@intel.com>
650
651 PR lto/70258
652 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
653 PIE.
654
56aae4b7
JJ
6552016-03-08 Jakub Jelinek <jakub@redhat.com>
656
657 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
658 - becuase -> because.
659
ed5d948d
TV
6602016-02-15 Tom de Vries <tom@codesourcery.com>
661
662 PR lto/69655
663 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
664 argument.
665
4ecbadc7
ML
6662016-01-27 Martin Liska <mliska@suse.cz>
667
668 * lto-partition.c (add_symbol_to_partition_1): Remove usage
669 of hsa_summaries.
670
e49d321f
JH
6712016-01-19 Jan Hubicka <hubicka@ucw.cz>
672
673 PR lto/69136
674 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
675 decls have no assemblernames.
676
b2b40051 6772016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 678 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
679
680 * lto-partition.c: Include "hsa.h"
681 (add_symbol_to_partition_1): Put hsa implementations into the
682 same partition as host implementations.
683
5803bd01
JH
6842016-01-12 Jan Hubicka <hubicka@ucw.cz>
685
686 PR lto/69003
687 * lto-partition.c (rename_statics): Fix pasto.
688
13092f61
RB
6892016-01-18 Richard Biener <rguenther@suse.de>
690
691 PR lto/69337
692 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
693 function vs. variable.
694
3c4e91c9
RB
6952016-01-12 Richard Biener <rguenther@suse.de>
696
697 PR lto/69077
698 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
699 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
700
818ab71a
JJ
7012016-01-04 Jakub Jelinek <jakub@redhat.com>
702
703 Update copyright years.
704
3fddb2ef
JH
7052015-12-10 Jan Hubicka <hubicka@ucw.cz>
706
707 PR lto/68878
708 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
709 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
710 (lto_symtab_prevailing_decl): Use it.
711
4a38b02b
IV
7122015-12-15 Ilya Verbin <ilya.verbin@intel.com>
713
714 * lto.c: Include stringpool.h and fold-const.h.
715 (offload_handle_link_vars): New static function.
716 (lto_main): Call offload_handle_link_vars.
717
ca834876
JH
7182015-12-10 Jan Hubicka <hubicka@ucw.cz>
719
720 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
721
958a627f
JH
7222015-12-11 Jan Hubicka <hubicka@ucw.cz>
723
724 PR ipa/61886
725 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
726 values of error and warning attributes.
727
da20571a
JH
7282015-12-08 Jan Hubicka <hubicka@ucw.cz>
729
730 PR lto/68811
731 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
732 DECL.
733 (LTO_NO_PREVAIL): Use gcc_checking_assert.
734
378004b9
JH
7352015-12-08 Jan Hubicka <hubicka@ucw.cz>
736
737 PR lto/68811
738 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
739 by itself.
740
6b9ac179
JH
7412015-12-08 Jan Hubicka <hubicka@ucw.cz>
742
743 PR ipa/61886
744 * lto-symtab.c: Include lto-symtab.h.
745 (lto_cgraph_replace_node): Do not merge profiles here.
746 (lto_symtab_merge_p): New function.
747 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
748 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
749 aliases.
750 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
751 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
752 * lto.c: Include lto-symtab.h
753 * lto-symtab.h: New.
754
41c60c6c
JH
7552015-12-08 Jan Hubicka <hubicka@ucw.cz>
756
757 PR ipa/61886
758 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
759 are not part of the definition.
760 (contained_in_symbol): Likewise.
761 (promote_symbol): When promoting a symbol also promote all transparent
762 aliases.
763 (rename_statics): Weakref needs unique name, too.
764
71e54687
JH
7652015-12-07 Jan Hubicka <hubicka@ucw.cz>
766
767 PR ipa/61886
768 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
769 rename_statics, rename_statics): Handle transparent aliases.
770
88636b62
JH
7712015-12-04 Jan Hubicka <hubicka@ucw.cz>
772
773 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
774 merged_comdat.
775
8c86248e
JH
7762015-12-01 Jan Hubicka <hubicka@ucw.cz>
777
778 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
779
1ff9ed6f
JH
7802015-11-25 Jan Hubicka <jh@suse.cz>
781
782 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
783 * lang.opt (lto_linker_output): New enum.
784 (flinker_output): New flag.
785
22bea0be
JH
7862015-11-24 Jan Hubicka <hubicka@ucw.cz>
787
788 * lto-symtab.c: Include alias.h
789 (warn_type_compatibility_p): Replace types_compatible_p checks by
790 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
791 (lto_symtab_merge): Compare DECL sizes.
792 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
793
aea50b45
JH
7942015-11-24 Jan Hubicka <hubicka@ucw.cz>
795
796 * lto.c (iterative_hash_canonical_type): Recruse for all types
797 which pass !canonical_type_used_p.
798 (gimple_register_canonical_type_1): Sanity check we do not compute
799 canonical type of anything with !canonical_type_used_p.
800 (gimple_register_canonical_type): Skip all types that are
801 !canonical_type_used_p
802
deb3dae6
JH
8032015-11-24 Jan Hubicka <hubicka@ucw.cz>
804
805 * lto.c (unify_scc): Use free_node.
806
f85d2487
JH
8072015-11-21 Jan Hubicka <hubicka@ucw.cz>
808
809 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
810 (gimple_register_canonical_type_1): Check that pointers do not get
811 canonical types.
812 (gimple_register_canonical_type): Do not register pointers.
813
8142015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
815
816 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
817 flag for types that are not ODR; fix loop walking parameters.
818
69f293c9
AM
8192015-11-11 Andrew MacLeod <amacleod@redhat.com>
820
821 * lto-lang.c: Remove unused header files.
822 * lto-object.c: Likewise.
823 * lto-partition.c: Likewise.
824 * lto-symtab.c: Likewise.
825 * lto.c: Likewise.
826
ee45a32d
EB
8272015-11-08 Eric Botcazou <ebotcazou@adacore.com>
828
829 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
830
0aad0198
RS
8312015-11-07 Richard Sandiford <richard.sandiford@arm.com>
832
833 * lto-lang.c: Don't undef DEF_BUILTIN.
834
2adfab87
AM
8352015-10-29 Andrew MacLeod <amacleod@redhat.com>
836
837 * lto-lang.c: Reorder #include's and remove duplicates.
838 * lto-object.c: Likewise.
839 * lto-partition.c: Likewise.
840 * lto-symtab.c: Likewise.
841 * lto.c: Likewise.
842
b2b29377
MM
8432015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
844
845 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
846 conditionals.
847 (lto_fixup_state): Likewise.
848 (do_whole_program_analysis): Use
849 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
850 conditionals.
851
d9a6bd32
JJ
8522015-10-13 Jakub Jelinek <jakub@redhat.com>
853
854 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
855 DEF_FUNCTION_TYPE_11): Define.
856
9c4eeafc
JH
8572015-10-10 Jan Hubicka <hubicka@ucw.cz>
858
859 * lto.c (hash_canonical_type): Honor
860 type_with_interoperable_signedness.
861
3e32ee19
NS
8622015-09-28 Nathan Sidwell <nathan@codesourcery.com>
863
864 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
865 (DEF_FUNCTION_TYPE_VAR_11): Delete.
866
f196d062
RB
8672015-08-31 Richard Biener <rguenther@suse.de>
868
869 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
870 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
871 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
872 participate in merging with something else.
873
45aee888
RB
8742015-08-31 Richard Biener <rguenther@suse.de>
875
876 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
877 test, do not replace a non-builtin with a builtin.
878 * lto.c (compare_tree_sccs_1): Do not merge things we stream
879 as builtins vs. non-builtins.
880
a79683d5
TS
8812015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
882
883 * lto.h: Remove useless typedefs.
884
48d859bb
AM
8852015-07-15 Andrew MacLeod <amacleod@redhat.com>
886
887 * lto.c: Remove redundant includes.
888
026c3cfd
AH
8892015-07-12 Aldy Hernandez <aldyh@redhat.com>
890
891 * lto-lang.c: Fix double word typos.
892
9fdcd34e
AM
8932015-07-10 Andrew MacLeod <amacleod@redhat.com>
894
895 * lto.c: Include cfghooks.h rather than predict.h.
896
f51ade33
AM
8972015-07-09 Andrew MacLeod <amacleod@redhat.com>
898
899 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
900 lto-streamer.h.
901 * lto-object.c: Likewise.
902 * lto-partition.c: Likewise.
903 * lto-symtab.c: Likewise.
904
1916bcb5
AM
9052015-07-09 Andrew MacLeod <amacleod@redhat.com>
906
907 * lto-lang.c: Adjust includes for flags.h changes.
908
c7131fb2
AM
9092015-07-07 Andrew MacLeod <amacleod@redhat.com>
910
911 * lto-lang.c: Adjust includes.
912 * lto-object.c: Likewise.
913 * lto-partition.c: Likewise.
914 * lto-symtab.c: Likewise.
915 * lto.c: Likewise.
916
f0889939
AM
9172015-06-25 Andrew MacLeod <amacleod@redhat.com>
918
919 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
920 * lto-object.c: Likewise.
921 * lto-partition.c: Likewise.
922 * lto-symtab.c: Likewise.
923 * lto-tree.h: Likewise.
924 * lto.c: Likewise.
925
8d67ee55
RS
9262015-06-25 Richard Sandiford <richard.sandiford@arm.com>
927
928 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
929 than typed_noop_remove. Remove redudant typedefs.
930
abb226c9
AM
9312015-06-17 Andrew MacLeod <amacleod@redhat.com>
932
933 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
934 * lto-object.c: Likewise.
935 * lto-partition.c: Likewise.
936 * lto-symtab.c: Likewise.
937 * lto.c: Likewise.
938
351d90f4
JH
9392015-06-14 Jan Hubicka <hubicka@ucw.cz>
940
941 PR ipa/66181
942 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
943
44c42705
DD
9442015-06-12 DJ Delorie <dj@redhat.com>
945
946 * lto-lang.c (lto_type_for_size): Include intN types.
947 (lto_type_for_mode): Likewise.
948
64578d98
JH
9492015-06-08 Jan Hubicka <hubicka@ucw.cz>
950
951 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
952
13fdf2e2
AM
9532015-06-08 Andrew MacLeod <amacleod@redhat.com>
954
955 * lto-lang.c : Adjust include files.
956 * lto-object.c : Likewise.
957 * lto-partition.c : Likewise.
958 * lto-partition.h : Likewise.
959 * lto-symtab.c : Likewise.
960 * lto.c : Likewise.
961 * lto.h : Likewise.
962
ccb5ad37
JH
9632015-06-06 Jan Hubicka <hubicka@ucw.cz>
964
6542950e
JH
965 PR lto/65378
966 * lto-symtab.c (warn_type_compatibility_p): Fix call of
967 odr_or_derived_type_p.
968 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
969
9702015-06-08 Jan Hubicka <hubicka@ucw.cz>
971
972
ccb5ad37
JH
973 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
974 pointers.
975
d7438551
AH
9762015-06-05 Aldy Hernandez <aldyh@redhat.com>
977
978 * lto-lang.c (lto_write_globals): Remove.
979 (LANG_HOOKS_WRITE_GLOBALS): Same.
980
ecb9f223
AM
9812015-06-04 Andrew MacLeod <amacleod@redhat.com>
982
983 * lto-lang.c: Adjust includes for restructured coretypes.h.
984 * lto-object.c: Likewise.
985 * lto-partition.c: Likewise.
986 * lto-symtab.c: Likewise.
987 * lto.c: Likewise.
988
9cb9b937
JH
9892015-06-04 Jan Hubicka <hubicka@ucw.cz>
990
991 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
992
93e2aa6d
JH
9932015-06-03 Jan Hubicka <hubicka@ucw.cz>
994
995 * lto.c (iterative_hash_canonical_type,
996 gimple_register_canonical_type): only hash main variants of types
997
faae53f8
ML
9982015-05-27 Martin Liska <mliska@suse.cz>
999
1000 * lto-partition.c (new_partition): Reset number of symbols.
1001 (add_symbol_to_partition_1): Increment number of symbols.
1002 (undo_partition): Decrement number of symbols.
1003 (lto_balanced_map): Dump number of symbols and insns that
1004 belong to a partition.
1005 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1006
b727ba74
JH
10072015-05-22 Jan Hubicka <hubicka@ucw.cz>
1008
1009 * lto.c (hash_canonical_type): Be sure we hash only types that
1010 need alias set.
1011 (gimple_register_canonical_type_1): Do not produce canonical
1012 types for types that do not need alias sets.
1013
1d1218fb
JH
10142015-05-22 Jan Hubicka <hubicka@ucw.cz>
1015
1016 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1017
872d5034
JH
10182015-05-19 Jan Hubicka <hubicka@ucw.cz>
1019
1020 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1021
259d29e3
JH
10222015-05-17 Jan Hubicka <hubicka@ucw.cz>
1023
1024 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1025 compare ODR types (if available) and function types.
1026 (lto_symtab_merge): ... here; output ODR violation warnings
1027 and call warn_types_mismatch.
1028
b0845a1e
JH
10292015-04-29 Jan Hubicka <hubicka@ucw.cz>
1030
1031 * lto.c (lto_fixup_state): Call verify_type.
1032
67f58944
TS
10332015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1034
b0845a1e 1035 * lto.c: Adjust for hash_table changes.
67f58944 1036
36ceb0e3
JH
10372015-03-27 Jan Hubicka <hubicka@ucw.cz>
1038
1039 * lto.c (lto_read_decls): Move code registering odr types out
1040 of TYPE_CANONICAL conditional and also register polymorphic types.
1041
afd1e7c6
JH
10422015-03-26 Jan Hubicka <hubicka@ucw.cz>
1043
1044 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1045 DECL_ARTIFICAL symbols.
1046
eaeec5ec
JH
10472015-03-26 Jan Hubicka <hubicka@ucw.cz>
1048
1049 PR lto/65536
1050 * lto.c (unify_scc): Revert location cache when unification
1051 suceeded.
1052 (lto_read_decls): Accept location cache after sucess;
1053 apply location cache before calling debug hooks.
1054
1c4db829
JH
10552015-03-10 Jan Hubicka <hubicka@ucw.cz>
1056
1057 * lto.c (read_cgraph_and_symbols): Do not do merging
1058 at ltrans stage.
1059
db847fa8
JJ
10602015-02-26 Jakub Jelinek <jakub@redhat.com>
1061
1062 * lto.c (lto_mode_identity_table): New variable.
1063 (lto_read_decls): Add mode_table argument to the lto_input_block
1064 constructor.
1065 (lto_file_finalize): Initialize mode_table.
1066 (lto_init): Initialize lto_mode_identity_table.
1067
56a9f6bc
TS
10682015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1069
1070 PR libgomp/64625
1071 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1072 Remove macros.
1073 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1074
ebc8f0bb
JH
10752015-02-03 Jan Hubicka <hubicka@ucw.cz>
1076
1077 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1078
40fecdd6
JM
10792015-01-30 Joseph Myers <joseph@codesourcery.com>
1080
1081 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1082 changed to pass input_location as first argument.
1083
040968a8
JH
10842014-12-11 Jan Hubicka <hubicka@ucw.cz>
1085
1086 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1087
69fe4502
JH
10882014-12-11 Jan Hubicka <hubicka@ucw.cz>
1089
1090 * lto.c (compare_tree_sccs_1): Add comparsion of
1091 DECL_FUNCTION_SPECIFIC_TARGET
1092
41dbbb37
TS
10932015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1094 James Norris <jnorris@codesourcery.com>
1095
1096 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1097 New macros.
1098 * lto.c: Include "gomp-constants.h".
1099
837bac8c
IV
11002015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1101
1102 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1103 from select_what_to_stream.
1104
1b34e6e2
BS
11052015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1106 Jakub Jelinek <jakub@redhat.com>
1107
1108 PR middle-end/64412
1109 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1110 if ACCEL_COMPILER.
1111
adfac8df
JJ
11122015-01-09 Michael Collison <michael.collison@linaro.org>
1113
1114 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1115 input.h, alias.h, symtab.h, options, fold-const.h,
1116 wide-int.h, and inchash.h due to flattening of tree.h.
1117 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1118 input.h, alias.h, symtab.h, fold-const.h,
1119 wide-int.h, and inchash.h due to flattening of tree.h.
1120 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1121 input.h, alias.h, symtab.h, options, fold-const.h,
1122 wide-int.h, and inchash.h due to flattening of tree.h.
1123 * lto-partition.c: Ditto.
1124 * lto-symtab.c: Ditto.
1125
5624e564
JJ
11262015-01-05 Jakub Jelinek <jakub@redhat.com>
1127
1128 Update copyright years.
1129
9a1e784a
ML
11302014-12-22 Martin Liska <mliska@suse.cz>
1131
1132 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1133 is used.
1134 (undo_partition): Likewise.
1135 (lto_balanced_map): Likewise.
1136
dd912cb8
ML
11372014-12-22 Martin Liska <mliska@suse.cz>
1138
1139 * lto-partition.c: Include of symbol-summary.h is added.
1140 * lto-symtab.c: Likewise.
1141 * lto.c: Likewise.
1142
17e0fc92
JH
11432014-12-11 Jan Hubicka <hubicka@ucw.cz>
1144
1145 PR ipa/61324
1146 * lto.c (read_cgraph_and_symbols): Update call of
1147 remove_unreachable_nodes.
1148 (do_whole_program_analysis): Remove call of
1149 symtab->remove_unreachable_nodes
1150
58dddbd2
TS
11512014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1152
1153 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1154 htab with malloc instead of ggc.
1155
907dadbd
TS
11562014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1157
1158 * lto.c: Replace htab with hash_table.
1159
9c71e9df
TS
11602014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1161
1162 * lto.c (lto_read_in_decl_state): Adjust.
1163 (lto_fixup_state): Likewise.
1164
72a4a8b0
JH
11652014-11-17 Jan Hubicka <hubicka@ucw.cz>
1166
1167 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1168
54e774c0
JH
11692014-11-14 Jan Hubicka <hubicka@ucw.cz>
1170
1171 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1172
1f6be682
IV
11732014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1174 Bernd Schmidt <bernds@codesourcery.com>
1175 Andrey Turetskiy <andrey.turetskiy@intel.com>
1176 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1177
ec6fe917
IV
1178 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1179
11802014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1181 Ilya Tocar <ilya.tocar@intel.com>
1182 Andrey Turetskiy <andrey.turetskiy@intel.com>
1183 Bernd Schmidt <bernds@codesourcery.com>
1184
1f6be682
IV
1185 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1186 LTO_SECTION_NAME_PREFIX.
1187 * lto-partition.c (lto_promote_cross_file_statics): Call
1188 select_what_to_stream.
1189 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1190 LTO_SECTION_NAME_PREFIX.
1191 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1192 being built as an offload compiler.
1193
ef4bddc2
RS
11942014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1195
1196 * lto-lang.c: Remove redundant enum from machine_mode.
1197
c582198b
AM
11982014-10-28 Andrew MacLeod <amacleod@redhat.com>
1199
1200 * lto.c: Adjust include files.
1201 * lto-lang.c: Ditto.
1202 * lto-object.c: Ditto.
1203 * lto-partition.c: Ditto.
1204 * lto-symtab.c: Ditto.
1205
60393bbc
AM
12062014-10-27 Andrew MacLeod <amacleod@redhat.com>
1207
1208 * lto-lang.c: Adjust include files.
1209 * lto-object.c: Ditto.
1210 * lto-partition.c: Ditto.
1211 * lto-symtab.c: Ditto.
1212 * lto.c: Ditto.
1213
957f47e6
DD
12142014-10-16 DJ Delorie <dj@redhat.com>
1215
1216 * lto-object.c (lto_obj_begin_section): In the event that pointer
1217 sizes aren't powers of two, choose a more suitable alignment
1218 than (unsigned)(-1).
1219
78a7c317
DD
12202014-10-14 DJ Delorie <dj@redhat.com>
1221
1222 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1223 size-type as well.
1224 (lto_init): Initialize all intN types, not just int128.
1225
70261a4f
ML
12262014-10-06 Martin Liska <mliska@suse.cz>
1227
1228 * lto.c (stream_out): ARG_UNUSED added for last argument.
1229
00de328a
AH
12302014-09-24 Aldy Hernandez <aldyh@redhat.com>
1231
1232 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1233 DECL_ABSTRACT_P.
1234
7861b648
AK
12352014-09-23 Andi Kleen <ak@linux.intel.com>
1236
1237 * lto-partition.c (node_cmp): Update comment.
1238 (varpool_node_cmp): Use symtab_node for comparison.
1239 (add_sorted_nodes): New function.
1240 (lto_balanced_map): Change to keep ordered queue
1241 of ordered node. Handle no_reorder attribute.
1242
1ee85ee1
JH
12432014-09-11 Jan Hubicka <hubicka@ucw.cz>
1244
1245 * lto.c (lto_read_decls): Register ODR types.
1246
8605403e
JH
12472014-08-20 Jan Hubicka <hubicka@ucw.cz>
1248
1249 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1250 call.
1251 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1252
56b1f114
JH
12532014-08-14 Jan Hubicka <hubicka@ucw.cz>
1254
1255 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1256
833f94c0
RB
12572014-08-14 Richard Biener <rguenther@suse.de>
1258
1259 PR lto/62067
1260 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1261
207c68cd
RB
12622014-08-08 Richard Biener <rguenther@suse.de>
1263
1264 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1265
7c581d61
BC
12662014-08-08 Bin Cheng <bin.cheng@arm.com>
1267
1268 PR lto/62032
1269 * lto-lang.c (lto_init): Switch mis-matched arguments.
1270
39c8aaa4
TS
12712014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1272
1273 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1274
6e2830c3
TS
12752014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1276
1277 * lto-partition.c, lto-partition.h: Use hash_set instead of
1278 pointer_set.
1279
50de5793
AK
12802014-07-31 Andi Kleen <ak@linux.intel.com>
1281
1282 * lto.c (hash_canonical_type): Use inchash::hash
1283 and use inchash::add_expr.
1284 (iterative_hash_canonical_type): Dito.
1285
f6bcdb5e
RB
12862014-07-30 Richard Biener <rguenther@suse.de>
1287
1288 * lto-streamer.h (lto_write_data): New function.
1289 * langhooks.c (lhd_append_data): Do not free block.
1290 * lto-section-out.c (lto_write_data): New function writing
1291 raw data to the current section.
1292 (lto_write_stream): Adjust for langhook semantic change.
1293 (lto_destroy_simple_output_block): Write header directly.
1294 * lto-opts.c (lto_write_options): Write options directly.
1295 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1296 (lto_output_toplevel_asms): Likewise.
1297 (copy_function_or_variable): Copy data directly.
1298 (write_global_references): Output index table directly.
1299 (lto_output_decl_state_refs): Likewise.
1300 (write_symbol): Write data directly.
1301 (produce_symtab): Adjust.
1302 (produce_asm_for_decls): Output header and refs directly.
1303
56fdfd3e
AK
13042014-07-25 Andi Kleen <ak@linux.intel.com>
1305
1306 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1307
0bd8bb04
AK
13082014-07-25 Andi Kleen <ak@linux.intel.com>
1309
1310 * lto.c (hash_canonical_type): Convert to inchash.
1311 (iterative_hash_canonical_type): Dito.
1312
6d8eb96b
AK
13132014-07-25 Andi Kleen <ak@linux.intel.com>
1314
1315 * lto.c: Include inchash.h
1316
ad115a3c
JH
13172014-07-14 Jan Hubicka <hubicka@ucw.cz>
1318
1319 * lto.c (mentions_vars_p_decl_non_common): Skip
1320 DECL_ARGUMENT_FLD.
1321 mentions_vars_p_function): Do DECL_ARGUMENTS.
1322 (lto_fixup_prevailing_decls): Update.
1323
917dd9bf
JH
13242014-07-12 Jan Hubicka <hubicka@ucw.cz>
1325
1326 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1327 timevar
1328 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1329
0b83e688
JH
13302014-07-11 Jan Hubicka <hubicka@ucw.cz>
1331
1332 * lto-partition.c (add_references_to_partition): Use
1333 varpool_ctor_useable_for_folding_p.
1334 * lto.c (lto_read_in_decl_state): Update sanity check.
1335
e55637b7
ML
13362014-07-01 Martin Liska <mliska@suse.cz>
1337
1338 IPA REF alias refactoring
1339 * lto-partition.c (add_symbol_to_partition_1): Usage of
1340 FOR_EACH_ALIAS added.
1341
010f4e27
JH
13422014-06-28 Jan Hubicka <hubicka@ucw.cz>
1343
1344 Revert:
1345 * lto.c (lto_copy_fields_not_streamed): New function.
1346 (compare_tree_sccs_1): Do not compare fields shared in between type
1347 and variant.
1348 (lto_read_decls): Fixup types first before inserting into hash.
1349
b82fe354
AP
13502014-06-28 Andrew Pinski <apinski@cavium.com>
1351
1352 * lto.c (lto_read_decls): Fix comment in comment.
1353
288eeff7
JH
13542014-06-28 Jan Hubicka <hubicka@ucw.cz>
1355
1356 * lto.c (lto_copy_fields_not_streamed): New function.
1357 (compare_tree_sccs_1): Do not compare fields shared in between type
1358 and variant.
1359 (lto_read_decls): Fixup types first before inserting into hash.
1360
e01fa630
ML
13612014-06-25 Martin Liska <mliska@suse.cz>
1362
1363 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
1364 used.
1365 (add_symbol_to_partition_1): Likewise.
1366 (lto_balanced_map): Likewise.
1367 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
1368
aaf8a23e
JH
13692014-06-24 Jan Hubicka <hubicka@ucw.cz>
1370
1371 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1372 (mentions_vars_p_function): ... here.
1373 (compare_tree_sccs_1): Update VINDEX checks.
1374 (lto_fixup_prevailing_decls): Likewise.
1375
1eb68d2d
TS
13762014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1377
1378 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1379 pointer_map.
1380
c203e8a7
TS
13812014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1382
1383 * lto.c: Adjust.
1384
714c800f
JH
13852014-06-20 Jan Hubicka <hubicka@ucw.cz>
1386
1387 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1388
569b1784
JH
13892014-06-20 Jan Hubicka <hubicka@ucw.cz>
1390
1391 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1392
56363ffd
JH
13932014-06-15 Jan Hubicka <hubicka@ucw.cz>
1394
1395 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1396
e257a17c
JH
13972014-06-10 Jan Hubicka <hubicka@ucw.cz>
1398
1399 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1400 (do_whole_program_analysis): Use verify_symtab.
1401
24d047a3
JH
14022014-06-07 Jan Hubicka <hubicka@ucw.cz>
1403
1404 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1405 lto_fixup_prevailing_decls): Skip section names.
1406
9b2b7279
AM
14072014-06-02 Andrew MacLeod <amacleod@redhat.com>
1408
1409 * lto-symtab.c: Include builtins.h.
1410
a9243bfc
RB
14112014-05-26 Richard Biener <rguenther@suse.de>
1412
1413 * lto.c (lto_parse_hex): Use int64_t.
1414 (lto_resolution_read): Likewise.
1415
fd1e9302
JH
14162014-05-23 Jan Hubicka <hubicka@ucw.cz>
1417
1418 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1419
aede2c10
JH
14202014-05-23 Jan Hubicka <hubicka@ucw.cz>
1421
1422 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1423 symtab pointer.
1424 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1425
f6a7cffc
TS
14262014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1427
1428 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1429 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1430 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1431
4000360e
BS
14322012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1433
1434 * lto-object.c: Include "lto-section-names.h".
1435 (LTO_SEGMENT_NAME): Don't define.
1436 * lto.c: Include "lto-section-names.h".
1437
b9559136
JH
14382014-05-17 Jan Hubicka <hubicka@ucw.cz>
1439
1440 PR lto/61012
1441 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1442 mixed with variables.
1443
766090c2
TS
14442014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1445
1446 * lto-tree.h: Don't use variable_size gty attribute.
1447 * lto.c (lto_read_in_decl_state): Adjust.
1448 (create_subid_section_table): Likewise.
1449 (lto_flatten_files): Likewise.
1450 (read_cgraph_and_symbols): Likewise.
1451
1d60af08
KZ
14522014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1453 Mike Stump <mikestump@comcast.net>
1454 Richard Sandiford <rdsandiford@googlemail.com>
1455
1456 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1457 * lto-lang.c (get_nonnull_operand): Likewise.
1458
22869a37
RB
14592014-04-28 Richard Biener <rguenther@suse.de>
1460
1461 PR middle-end/60092
1462 * lto-lang.c: Define flag_isoc11.
1463
7de90a6c
DM
14642014-04-23 David Malcolm <dmalcolm@redhat.com>
1465
1466 * lto-partition.c (add_references_to_partition): Update for
1467 removal of implicit pointer from the is-a.h API.
1468 (add_symbol_to_partition_1): Likewise.
1469 (contained_in_symbol): Likewise.
1470 (undo_partition): Likewise.
1471 (lto_balanced_map): Likewise.
1472 (promote_symbol): Likewise.
1473 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1474 (lto_symtab_merge_symbols): Likewise.
1475 * lto.c (lto_wpa_write_files): Likewise.
1476
783dab6b
RB
14772014-04-15 Richard Biener <rguenther@suse.de>
1478
1479 * lto.c: Include params.h.
1480 (do_whole_program_analysis): Switch on flag_lto_partition value,
1481 add support for LTO_PARTITION_ONE.
1482 * lto-partition.h (lto_balanced_map): Adjust.
1483 * lto-partition.c (lto_balanced_map): Get number of desired
1484 partitions as argument to support -flto-partition=one.
1485
cb90235d
JH
14862014-04-14 Jan Hubicka <hubicka@ucw.cz>
1487
1488 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1489 tp_first_run.
1490
bbe281da
JH
14912014-03-19 Jan Hubicka <hubicka@ucw.cz>
1492
1493 * lto.c: Include ipa-inline.h
1494 (do_whole_program_analysis): Free inline summary after partitioning.
1495
ce2f49b3
RB
14962014-03-19 Richard Biener <rguenther@suse.de>
1497
1498 PR middle-end/60553
1499 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1500 instead of TREE_CHAIN as chain_next.
1501
e41106fc
RB
15022014-03-19 Richard Biener <rguenther@suse.de>
1503
1504 * lto.c (lto_wpa_write_files): Move call to
1505 lto_promote_cross_file_statics ...
1506 (do_whole_program_analysis): ... here, into the partitioning
1507 block. Do not ggc_collect after lto_wpa_write_files but
1508 for a last time before it.
1509
15df2655
JJ
15102014-03-19 Jakub Jelinek <jakub@redhat.com>
1511
1512 PR lto/60571
1513 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1514 Fix formatting.
1515
415e2e6b
JJ
15162014-03-18 Jakub Jelinek <jakub@redhat.com>
1517
1518 PR sanitizer/60535
1519 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1520 and complex_{float,{,long_}double}_type_node.
1521
f42c637e
PM
15222014-03-08 Paulo Matos <paulo@matos-sorge.com>
1523
415e2e6b
JJ
1524 * lto-lang.c (lto_init): Pass flag_short_double to
1525 build_common_tree_nodes.
f42c637e 1526
6dab804d
JH
15272014-02-14 Jan Hubicka <hubicka@ucw.cz>
1528
1529 PR lto/60295
1530 * lto.c (stream_out): Avoid parallel streaming with
1531 -flto=jobserver until we are able to throttle it down
1532 resonably.
1533
39434bce
JH
15342014-02-14 Jan Hubicka <hubicka@ucw.cz>
1535
1536 * lto-partition.c (add_symbol_to_partition_1,
1537 undo_partition, lto_balanced_map): Aliases have no
1538 defined size.
1539 (lto_balanced_map): Do not follow refering variables
1540 if they can be optimized out.
1541
1966fd99
RB
15422014-02-14 Richard Biener <rguenther@suse.de>
1543
1544 PR lto/60179
1545 * lto.c (compare_tree_sccs_1): Do not compare
1546 DECL_FUNCTION_SPECIFIC_TARGET.
1547 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1548
283416b3
RB
15492014-02-12 Richard Biener <rguenther@suse.de>
1550
1551 PR lto/60060
1552 * lto-lang.c (lto_write_globals): Do not call
1553 wrapup_global_declarations or emit_debug_global_declarations
1554 but emit debug info for non-function scope variables
1555 directly.
1556
b7e85694
JH
15572014-02-06 Jan Hubicka <hubicka@ucw.cz>
1558
1559 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1560
96451279
JH
15612014-02-06 Jan Hubicka <hubicka@ucw.cz>
1562
1563 PR ipa/59469
1564 * lto-partition.c (symbol_class): Move to cgraph.h
1565 (get_symbol_class): Move to symtab.c
1566 (add_references_to_partition, add_symbol_to_partition_1,
1567 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1568 lto_promote_cross_file_statics): Update.
1569
f300e7b8
JH
15702014-02-05 Jan Hubicka <hubicka@ucw.cz>
1571
1572 * lto.c (lto_parallelism): New static var.
1573 (do_stream_out, wait_for_child, stream_out): New static functions.
1574 (lto_wpa_write_files): Add support for parallel streaming.
1575 (do_whole_program_analysis): Set parallelism.
1576 * lang.opt (fwpa): Add parameter.
1577 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1578 (lto_init): Update use of flag_wpa.
1579 * lto-streamer.h (asm_nodes_output): Declare.
1580
f0f91770
RB
15812014-02-05 Richard Biener <rguenther@suse.de>
1582
1583 * lto.h (lto_global_var_decls): Remove.
1584 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1585 (lto_write_globals): Do nothing in WPA stage, gather globals from
1586 the varpool here ...
1587 * lto.c (lto_main): ... not here.
1588 (materialize_cgraph): Do not call rest_of_decl_compilation
1589 on the empty lto_global_var_decls vector.
1590 (lto_global_var_decls): Remove.
1591
d665f8dd
JH
15922014-02-04 Jan Hubicka <hubicka@ucw.cz>
1593
1594 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1595 needs duplicating, not generic COMDAT.
1596
c39276b8
RB
15972014-02-04 Richard Biener <rguenther@suse.de>
1598
1599 PR lto/59723
1600 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1601 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1602
5f876ae7
JH
16032014-02-04 Jan Hubicka <hubicka@ucw.cz>
1604 Markus Trippelsdorf
1605
1606 PR ipa/59469
1607 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1608 merge force_output and forced_by_abi flags.
1609
b72271b9
BI
16102014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1611
1612 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1613 flag_cilkplus.
1614
63124c48
RB
16152014-01-09 Richard Biener <rguenther@suse.de>
1616
1617 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1618
d05b9920
RB
16192014-01-09 Richard Biener <rguenther@suse.de>
1620
1621 PR lto/45586
1622 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1623 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1624 (gimple_canonical_types_compatible_p): Do not compare them either.
1625
23a5b65a
RS
16262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1627
1628 Update copyright years
1629
2c8326a5
OE
16302013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1631
1632 * lto.c: Remove struct tags when referring to class varpool_node.
1633 * lto-partition.c: Likewise.
1634 * lto-symtab.c: Likewise.
1635
e06f9964
JJ
16362013-11-29 Jakub Jelinek <jakub@redhat.com>
1637 Richard Biener <rguenther@suse.de>
1638
1639 PR lto/59326
1640 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1641
c193f58b
JJ
16422013-11-29 Jakub Jelinek <jakub@redhat.com>
1643
1644 PR lto/59326
1645 * lto.c (mentions_vars_p_omp_clause): New function.
1646 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1647 after return stmts.
1648
2fb9a547
AM
16492013-11-22 Andrew MacLeod <amacleod@redhat.com>
1650
1651 * lto.c: Add required include files from gimple.h.
1652 * lto-lang.c: Likewise
1653 * lto-object.c: Likewise
1654 * lto-partition.c: Likewise
1655 * lto-symtab.c: Likewise
1656
fec39fa6
TS
16572013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1658
1659 * lto-partition.c lto-symtab.c lto.c Adjust.
1660
d8a2d370
DN
16612013-11-14 Diego Novillo <dnovillo@google.com>
1662
1663 * lto-lang.c: Include stringpool.h.
1664 Include stor-layout.h.
1665 * lto-partition.c: Include gcc-symtab.h.
1666 * lto.c: Include stor-layout.h.
1667
5e20cdc9
DM
16682013-10-31 David Malcolm <dmalcolm@redhat.com>
1669
1670 Automated part of renaming of symtab_node_base to symtab_node.
1671
1672 Patch autogenerated by rename_symtab.py from
1673 https://github.com/davidmalcolm/gcc-refactoring-scripts
1674 revision 58bb219cc090b2f4516a9297d868c245495ee622
1675
1676 * lto-partition.c (add_symbol_to_partition): Rename
1677 symtab_node_base to symtab_node.
1678 (get_symbol_class): Likewise.
1679 (symbol_partitioned_p): Likewise.
1680 (add_references_to_partition): Likewise.
1681 (add_symbol_to_partition_1): Likewise.
1682 (contained_in_symbol): Likewise.
1683 (add_symbol_to_partition): Likewise.
1684 (lto_1_to_1_map): Likewise.
1685 (lto_max_map): Likewise.
1686 (lto_balanced_map): Likewise.
1687 (privatize_symbol_name): Likewise.
1688 (promote_symbol): Likewise.
1689 (may_need_named_section_p): Likewise.
1690 (rename_statics): Likewise.
1691 (lto_promote_statics_nonwpa): Likewise.
1692 * lto-symtab.c (lto_symtab_merge): Likewise.
1693 (lto_symtab_resolve_replaceable_p): Likewise.
1694 (lto_symtab_symbol_p): Likewise.
1695 (lto_symtab_resolve_can_prevail_p): Likewise.
1696 (lto_symtab_resolve_symbols): Likewise.
1697 (lto_symtab_merge_decls_2): Likewise.
1698 (lto_symtab_merge_decls_1): Likewise.
1699 (lto_symtab_merge_decls): Likewise.
1700 (lto_symtab_merge_symbols_1): Likewise.
1701 (lto_symtab_merge_symbols): Likewise.
1702 (lto_symtab_prevailing_decl): Likewise.
1703 * lto.c (lto_wpa_write_files): Likewise.
1704 (read_cgraph_and_symbols): Likewise.
1705 (do_whole_program_analysis): Likewise.
1706
378cd6b1
DM
17072013-10-30 David Malcolm <dmalcolm@redhat.com>
1708
1709 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1710 declarations onto multiple lines to make things easier for
1711 rename_symtab.py.
1712 (lto_symtab_merge_decls_1): Likewise.
1713 (lto_symtab_merge_symbols_1): Likewise.
1714
939b37da
BI
17152013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1716
1717 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1718 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1719 Plus is enabled.
1720
67348ccc
DM
17212013-10-29 David Malcolm <dmalcolm@redhat.com>
1722
1723 Patch autogenerated by refactor_symtab.py from
1724 https://github.com/davidmalcolm/gcc-refactoring-scripts
1725 revision 58bb219cc090b2f4516a9297d868c245495ee622
1726
1727 * lto-partition.c (lto_promote_cross_file_statics): Update for
1728 conversion of symtab types to a true class hierarchy.
1729 (rename_statics): Likewise.
1730 (promote_symbol): Likewise.
1731 (privatize_symbol_name): Likewise.
1732 (lto_balanced_map): Likewise.
1733 (varpool_node_cmp): Likewise.
1734 (node_cmp): Likewise.
1735 (lto_1_to_1_map): Likewise.
1736 (undo_partition): Likewise.
1737 (add_symbol_to_partition): Likewise.
1738 (contained_in_symbol): Likewise.
1739 (add_symbol_to_partition_1): Likewise.
1740 (add_references_to_partition): Likewise.
1741 (symbol_partitioned_p): Likewise.
1742 (get_symbol_class): Likewise.
1743 (lto_max_map): Likewise.
1744 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1745 (lto_symtab_merge_symbols): Likewise.
1746 (lto_symtab_merge_symbols_1): Likewise.
1747 (lto_symtab_merge_decls): Likewise.
1748 (lto_symtab_merge_decls_1): Likewise.
1749 (lto_symtab_merge_decls_2): Likewise.
1750 (lto_symtab_resolve_symbols): Likewise.
1751 (lto_symtab_resolve_can_prevail_p): Likewise.
1752 (lto_symtab_symbol_p): Likewise.
1753 (lto_symtab_resolve_replaceable_p): Likewise.
1754 (lto_symtab_merge): Likewise.
1755 (lto_varpool_replace_node): Likewise.
1756 (lto_cgraph_replace_node): Likewise.
1757 * lto.c (lto_main): Likewise.
1758 (do_whole_program_analysis): Likewise.
1759 (materialize_cgraph): Likewise.
1760 (read_cgraph_and_symbols): Likewise.
1761 (cmp_partitions_order): Likewise.
1762 (lto_materialize_function): Likewise.
1763 (has_analyzed_clone_p): Likewise.
1764
8e9055ae
AM
17652013-10-29 Andrew MacLeod <amacleod@redhat.com>
1766
1767 * lto/lto-object.c: Add gimple.h to include list.
1768 * lto/lto-partition.c: Likewise.
1769
377d9792
AM
17702013-10-18 Andrew MacLeod <amacleod@redhat.com>
1771
1772 * lto.c: Remove tree-flow.h from include list.
1773
fffda8d7
RB
17742013-10-15 Richard Biener <rguenther@suse.de>
1775
1776 * lto.c (hash_canonical_type): Split out from ...
1777 (iterative_hash_canonical_type): ... here. Register types
1778 we recurse to.
1779 (gimple_canonical_type_hash): Adjust.
1780 (gimple_register_canonical_type_1): Split out from ...
1781 (gimple_register_canonical_type): ... here. Cache computed
1782 hash value.
1783 (lto_register_canonical_types): Split into two modes,
1784 clearing and computing TYPE_CANONICAL.
1785 (lto_read_decls): Adjust.
1786 (read_cgraph_and_symbols): Do two passes over global trees,
1787 first clearing then computing TYPE_CANONICAL.
1788
1394237e
RB
17892013-10-14 Richard Biener <rguenther@suse.de>
1790
1791 * lto.c (gimple_canonical_types): Move out-of GC space.
1792 (canonical_type_hash_cache): Make a pointer-map.
1793 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1794 New counters.
1795 (iterative_hash_canonical_type): Adjust.
1796 (read_cgraph_and_symbols): Likewise.
1797 (print_lto_report_1): Likewise.
1798
0a387eca
RB
17992013-10-14 Richard Biener <rguenther@suse.de>
1800
1801 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1802 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1803 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1804 gimple_types_compatible_p_1, gimple_types_compatible_p,
1805 visit, iterative_hash_name, struct type_hash_pair,
1806 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1807 gimple_type_eq, gimple_register_type, num_not_merged_types,
1808 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1809 num_not_merged_types_in_same_scc_trees): Remove old merging code
1810 and statistics.
1811 (lto_read_decls): Do not run old merging code in parallel.
1812 (read_cgraph_and_symbols): Do not init/free old merging
1813 data structures.
1814 (print_lto_report_1): Do not report differences of old vs. new
1815 merging code.
1816
83fd5d11
RB
18172013-10-14 Richard Biener <rguenther@suse.de>
1818
1819 * lto-lang.c (lto_init): Do not re-init canonical types here.
1820 (lto_register_canonical_types): Move to ...
1821 * lto.c (lto_register_canonical_types): ... here.
1822 (gimple_canonical_types, canonical_type_hash_cache,
1823 iterative_hash_canonical_type, gimple_canonical_type_hash,
1824 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1825 gimple_register_canonical_type): Add canonical type merging machinery
1826 moved from gimple.c.
1827 (read_cgraph_and_symbols): Init and free canonical type tables
1828 here.
1829 (print_lto_report_1): Report canonical type table stats here.
1830
acf0174b
JJ
18312013-10-11 Jakub Jelinek <jakub@redhat.com>
1832
1833 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1834
7c6fedd2
TT
18352013-09-25 Tom Tromey <tromey@redhat.com>
1836
1837 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1838 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1839 (lto/lto-object.o): Remove.
1840
35f32ad4
RB
18412013-09-06 Richard Biener <rguenther@suse.de>
1842
1843 * lto-symtab.c: Move from gcc/
1844 * lto.h: Include vec.h.
1845 (lto_global_var_decls): Declare.
1846 * lto.c (lto_global_var_decls): Move definition here.
1847 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1848 (lto-symtab.o): Add.
1849 * config-lang.in (gtfiles): Add lto.h.
1850
49322b12
JH
18512013-08-31 Jan Hubicka <jh@suse.cz>
1852
1853 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1854 DECL_FIELD_OFFSET can contain an reference to variable.
1855
31f1f73b
JH
18562013-08-31 Jan Hubicka <jh@suse.cz>
1857
1858 * lto.c (tree_with_vars): Turn into vector.
1859 (MAYBE_REMEMBER_WITH_VARS): Change to...
1860 (CHECK_VAR): ... this one.
1861 (CHECK_NO_VAR): New macro.
1862 (maybe_remember_with_vars_typed): Turn to ...
1863 (mentions_vars_p_typed): ... this one.
1864 (maybe_remember_with_vars_common): Turn to ...
1865 (mentions_vars_p_comon): ... this one.
1866 (maybe_remember_with_vars_decl_minimal): Turn to ...
1867 (mentions_vars_p_decl_minmal): ... this one.
1868 (maybe_remember_with_vars_decl_common): Turn to ...
1869 (mentions_vars_p_decl_common): ... this one.
1870 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1871 (mentions_vars_p_decl_with_vis): ... this one.
1872 (maybe_remember_with_vars_decl_non_common): Turn to ...
1873 (mentions_vars_p_decl_non_common): ... this one.
1874 (maybe_remember_with_vars_function): Turn to ...
1875 (mentions_vars_p_function): ... this one.
1876 (maybe_remember_with_vars_field_decl): Turn to ...
1877 (mentions_vars_p_field_decl): ... this one.
1878 (maybe_remember_with_vars_type): Turn to ...
1879 (mentions_vars_p_type): ... this one.
1880 (maybe_remember_with_vars_binfo): Turn to ...
1881 (mentions_vars_p_binfo): ... this one.
1882 (maybe_remember_with_vars_constructor): Turn to ...
1883 (mentions_vars_p_constructor): ... this one.
1884 (maybe_remember_with_vars_expr): Turn to ...
1885 (mentions_vars_p_expr): ... this one.
1886 (maybe_remember_with_vars): Turn to ...
1887 (mentions_vars_p): ... this one.
1888 (lto_read_decls): Update.
1889 (LTO_SET_PREVAIL): Do not call function for internal decls.
1890 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1891 check that something was updated.
1892 (lto_fixup_state): Do not care about internal decls.
1893 (lto_fixup_decls): Update.
1894 (read_cgraph_and_symbols): Update.
1895
256eefa9
JH
18962013-08-29 Jan Hubicka <jh@suse.cz>
1897
1898 * lto.c (read_cgraph_and_symbols): Free decl states.
1899
0170f33c
JH
19002013-08-29 Jan Hubicka <jh@suse.cz>
1901
1902 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1903 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1904 TYPE_FINAL_P.
1905
c01c111b
JH
19062013-08-28 Jan Hubicka <jh@suse.cz>
1907
1908 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1909 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1910 (unify_scc): Do checking assert.
1911
6a49f3c9
JH
19122013-08-06 Jan Hubicka <jh@suse.cz>
1913 Martin Liska <marxin.liska@gmail.com>
1914
1915 * lto-partition.c (lto_balanced_map): Always base order on
1916 source file order.
1917
a2e2a668
JH
19182013-08-06 Jan Hubicka <jh@suse.cz>
1919
1920 * lto.c (lto_materialize_function): Do not read body anymore.
1921
815effe1
JH
19222013-08-02 Jan Hubicka <jh@suse.cz>
1923
1924 * lto.c (lto_materialize_function): Do not push struct function.
1925 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1926 (may_need_named_section_p): Even abstract origins may need
1927 named section.
1928
315f8c0e
DM
19292013-07-30 David Malcolm <dmalcolm@redhat.com>
1930
1931 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1932 PASS_MANAGER_H.
1933
1934 * lto.c (do_whole_program_analysis): Update for move of
1935 all_regular_ipa_passes from a global to a field of class
1936 pass_manager.
1937
1aa95df7
OB
19382013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1939
1940 * lto-partition.c: Fix typos.
1941
c525ba9a
JH
19422013-06-20 Jan Hubicka <jh@suse.cz>
1943
1944 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1945 partitioning of variables.
1946
7a89ad00
JH
19472013-06-20 Jan Hubicka <jh@suse.cz>
1948
1949 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1950
6a6dac52
JH
19512013-06-19 Jan Hubicka <jh@suse.cz>
1952
1953 * lto-partition.c (add_references_to_partition): Use
1954 ctor_for_folding.
1955
ac0511f2
RB
19562013-06-18 Richard Biener <rguenther@suse.de>
1957
1958 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1959 and use it.
1960 (lto_register_function_decl_in_symtab): Likewise.
1961 (cmp_tree): New function.
1962 (unify_scc): Instead of using the streamer cache map from entry
1963 to cache index match up the two maps we have by sorting them.
1964 Adjust calls to lto_register_var_decl_in_symtab and
1965 lto_register_function_decl_in_symtab.
1966
ee03e71d
RB
19672013-06-17 Richard Biener <rguenther@suse.de>
1968
1969 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1970 * lto.c: Include data-streamer.h.
1971 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1972 (gimple_type_leader_entry_s, gimple_type_leader,
1973 gimple_lookup_type_leader): Remove.
1974 (gtc_visit): Simplify.
1975 (gimple_types_compatible_p): Likewise.
1976 (gimple_register_type_1): Likewise. Merge into ...
1977 (gimple_register_type): ... this. Keep it as legacy for
1978 statistics purposes for now.
1979 (fixup_integer_cst): Remove.
1980 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1981 rename to ...
1982 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1983 maybe_remember_with_vars_*): ... these.
1984 (uniquify_nodes): Remove.
1985 (lto_fixup_prevailing_type): New function.
1986 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1987 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1988 (num_merged_types, num_prevailing_types, num_not_merged_types,
1989 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1990 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1991 num_scc_compare_collisions): New global counters.
1992 (compare_tree_sccs_1): New function.
1993 (compare_tree_sccs): Likewise.
1994 (unify_scc): Likewise.
1995 (lto_read_decls): Stream in tree SCCs and unify them on the
1996 way in. Finalize prevailing SCC tree members.
1997 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1998 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1999 to ggc-collect during merging.
2000 (print_lto_report_1): Adjust for new merging code.
2001
ca0f62a8
JH
20022013-06-12 Jan Hubicka <jh@suse.cz>
2003
2004 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2005
bbf9ad07
JH
20062013-06-12 Jan Hubicka <jh@suse.cz>
2007
2008 * lto.c (register_resolution): Take lto_file_data argument.
2009 (lto_register_var_decl_in_symtab,
2010 lto_register_function_decl_in_symtab): Update.
2011 (read_cgraph_and_symbols): Update resolution_map handling.
2012
ecdbd01a 20132013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2014
2015 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2016 (add_symbol_to_partition_1): Likewise.
2017 (contained_in_symbol): Likewise.
2018 (lto_balanced_map): Likewise.
2019 (rename_statics): Drop weakref.
2020
a367df53
RB
20212013-06-05 Richard Biener <rguenther@suse.de>
2022
2023 * lto.c (num_merged_types): New global variable.
2024 (uniquify_nodes): Increase num_merged_types when merging a type.
2025 (print_lto_report_1): Output the number of merged types.
2026
40a7fe1e
JH
20272013-06-01 Jan Hubicka <jh@suse.cz>
2028
2029 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2030 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2031 (do_whole_program_analysis): Update dumping.
2032
e70670cf
JH
20332013-05-29 Jan Hubicka <jh@suse.cz>
2034
2035 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2036 flags.
2037 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2038
8ee05051
JH
20392013-05-15 Jan Hubicka <jh@suse.cz>
2040
2041 * lto-partition.c (privatize_symbol_name): Return true when
2042 privatizing happened.
2043 (rename_statics): Do not go into infinite loop when privatizing
2044 is not needed.
2045
427b248d
JM
20462013-05-16 Jason Merrill <jason@redhat.com>
2047
2048 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2049
9de04252
MJ
20502013-05-15 Martin Jambor <mjambor@suse.cz>
2051
2052 * lto-partition.c (lto_balanced_map): Print symbol order instead
2053 of node uids.
2054
2d6e4603
JH
20552013-05-15 Jan Hubicka <jh@suse.cz>
2056
2057 PR lto/57038
2058 PR lto/47375
2059 * lto-partition.c (get_symbol_class): Fix weakrefs.
2060 (lto_balanced_map): Fix weakrefs.
2061 (privatize_symbol_name): Remove unnecesary label.
2062 (rename_statics): Handle weakrefs as statics.
2063
64cfa6c0
JH
20642013-05-09 Jan Hubicka <jh@suse.cz>
2065 Richard Biener <rguenther@suse.de>
2066
2067 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2068 (lto_register_var_decl_in_symtab): Likewise.
2069 (lto_main): Promote statics.
2070 * lto-partition.c (privatize_symbol_name): New function.
2071 (promote_symbol): Use it.
2072 (may_need_named_section_p): New predicate.
2073 (rename_statics): New functions.
2074 (lto_promote_cross_file_statics): Simplify; do renaming.
2075 (lto_promote_statics_nonwpa): New function.
2076 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2077
e45cde98
RB
20782013-02-08 Richard Biener <rguenther@suse.de>
2079
2080 PR lto/56231
2081 * lto-lang.c (lto_init): Do not enter a dummy file.
2082
6edc3e32
UB
20832013-02-07 Uros Bizjak <ubizjak@gmail.com>
2084
2085 PR bootstrap/56227
2086 * lto.c (lto_resolution_ready): Use %wx instead of
2087 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2088
ed73881e
RG
20892013-02-04 Richard Guenther <rguenther@suse.de>
2090
2091 PR lto/56168
2092 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2093 or lto_fixup_decls at LTRANS time.
2094
a19b1432
JH
20952013-01-09 Jan Hubicka <jh@suse.cz>
2096
2097 PR lto/45375
2098 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2099
49c01f87
L
21002012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2101
2102 PR lto/55466
2103 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2104 variables.
2105 (lto_main): Record the global variables if WPA isn't enabled.
2106
6e1aa848
DN
21072012-11-20 Diego Novillo <dnovillo@google.com>
2108 Jakub Jelinek <jakub@redhat.com>
2109
2110 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2111
9771b263
DN
21122012-11-16 Diego Novillo <dnovillo@google.com>
2113
2114 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2115
2116 * lto-lang.c: Use new vec API in vec.h.
2117 * lto-partition.c: Likewise.
2118 * lto-partition.h: Likewise.
2119 * lto.c: Likewise.
2120
24551b9c
LC
21212012-10-31 Lawrence Crowl <crowl@google.com>
2122
2123 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2124 down-cast via dyn_cast.
2125 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2126 (undo_partition): Likewise.
2127 (lto_balanced_map): Likewise.
2128 (get_symbol_class): Likewise and via is_a.
2129 (lto_balanced_map): Change symtab checking to is_a.
2130
aec06f6f
RB
21312012-10-12 Richard Biener <rguenther@suse.de>
2132
2133 PR lto/54898
2134 * lto.c (gimple_types_compatible_p_1): Also compare
2135 TYPE_MAIN_VARIANT.
2136 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2137
0b8c30f9
TB
21382012-10-09 Tobias Burnus <burnus@net-b.de>
2139
2140 * lto-lang.c (lto_register_builtin_type): Avoid useless
2141 decl creation.
2142 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2143
da3202a8
TB
21442012-10-08 Tobias Burnus <burnus@net-b.de>
2145
2146 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2147 Free lto_file struct after closing the file.
2148
2512a443
JH
21492012-10-08 Jan Hubicka <jh@suse.cz>
2150
2151 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
2152 (fixup_integer_cst): New functoin.
2153 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2154
e75f8f79
JH
21552012-10-07 Jan Hubicka <jh@suse.cz>
2156
2157 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2158 release input encoders.
2159 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2160
46591697
JH
21612012-10-06 Jan Hubicka <jh@suse.cz>
2162
2163 PR lto/54790
2164 * lto.c (resolution_map): New static var.
2165 (register_resolution): New function.
2166 (lto_register_var_decl_in_symtab): Use it.
2167 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2168
af16bc76
MJ
21692012-09-20 Martin Jambor <mjambor@suse.cz>
2170
2171 * lto.c (lto_materialize_function): Call push_struct_function and
2172 pop_cfun.
2173
5368224f
DC
21742012-09-19 Dehao Chen <dehao@google.com>
2175
2176 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2177
b5493fb2
JH
21782012-09-19 Jan Hubicka <jh@suse.cz>
2179
2180 * lto.c (lto_materialize_function): Update confused comment.
2181 (read_cgraph_and_symbols): Do not free symtab.
2182
c3c445e1
JH
21832012-09-12 Jan Hubicka <jh@suse.cz>
2184
2185 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2186 AUX pointer cleaning. Add max partitioning.
2187 * lto-partition.c (enum symbol_class): New.
2188 (get_symbol_class): New function.
2189 (symbol_partitioned_p): New function.
2190 (add_references_to_partition): Remove.
2191 (add_aliases_to_partition): Remove.
2192 (add_cgraph_node_to_partition_1): Remove.
2193 (add_cgraph_node_to_partition): Remove.
2194 (add_symbol_to_partition): New function.
2195 (add_symbol_to_partition_1): New function.
2196 (contained_in_symbol): New function.
2197 (partition_cgraph_node_p): Remove.
2198 (partition_varpool_node_p): Remove.
2199 (partition_symbol_p): Remove.
2200 (lto_1_to_1_map): Cleanup.
2201 (lto_max_map): New.
2202 (lto_balanced_map): Update.
2203 (lto_promote_cross_file_statics): Update.
2204 * lto-partition.h (lto_max_map): Declare.
2205 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2206
b5c7cdfb
JH
22072012-09-11 Jan Hubicka <jh@suse.cz>
2208
2209 PR lto/54312
2210 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2211 type is variant leader.
2212
b29402f0
RG
22132012-09-11 Richard Guenther <rguenther@suse.de>
2214
2215 * lto.c (enum gtc_mode): Remove.
2216 (struct type_pair_d): Adjust.
2217 (lookup_type_pair): Likewise.
2218 (gimple_type_leader): Do not mark as deletable.
2219 (gimple_lookup_type_leader): Adjust.
2220 (gtc_visit): Likewise.
2221 (gimple_types_compatible_p_1): Likewise.
2222 (gimple_types_compatible_p): Likewise.
2223 (gimple_type_hash): Likewise.
2224 (gimple_register_type): Likewise.
2225 (read_cgraph_and_symbols): Manage lifetime of tables
2226 here.
2227
b8f4e58f
RG
22282012-09-11 Richard Guenther <rguenther@suse.de>
2229
2230 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2231 struct type_pair_d, lookup_type_pair, struct sccs,
2232 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2233 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2234 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2235 visit, iterative_hash_name, struct type_hash_pair,
2236 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2237 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2238 Move here from gimple.c
2239 (read_cgraph_and_symbols): Free hash tables here.
2240 (print_lto_report_1): New function wrapping print_lto_report.
2241 (do_whole_program_analysis): Call it.
2242 (lto_main): Likewise.
2243
1cdbb3f9
JH
22442012-09-10 Jan Hubicka <jh@suse.cz>
2245
2246 * lto-partition.c (partition_symbol_p): Forward declare.
2247 (add_references_to_partition): Reimplement using partition_symbol_p.
2248 (add_aliases_to_partition): Break out from add_references_to_partition;
2249 reimplement using partition_symbol_p.
2250 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2251 add sanity checks.
2252 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2253 (partition_varpool_node_p): Do not special case aliases.
2254
b4661bfe
JH
22552012-08-12 Jan Hubicka <jh@suse.cz>
2256
2257 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2258 it is deleted after streaming.
2259 * lto-partition.c (partition_symbol_p): New function.
2260 (promote_var, promote_fn): Remove.
2261 (promote_symbol): New function.
2262 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2263 to lookup the actual boundaries instead of computing them ad-hoc.
2264
7b99cca4
JH
22652012-08-12 Jan Hubicka <jh@suse.cz>
2266
2267 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2268 in partitioning.
2269 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2270 by encoder.
2271 * lto-partition.c (new_partition): Update.
2272 * lto.c (cmp_partitions_order): Update.
2273 (lto_wpa_write_files): Update.
2274 (free_ltrans_partitions): Update.
2275 (add_references_to_partition): Update.
2276 (add_cgraph_node_to_partition_1): Update.
2277 (add_cgraph_node_to_partition): Update.
2278 (add_varpool_node_to_partition): Update.
2279 (undo_partition): Update.
2280 (lto_balanced_map): Update.
2281 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2282 set_referenced_from_this_partition_p): Update.
2283 (lto_promote_cross_file_statics): Update.
2284
f27c1867
JH
22852012-08-12 Jan Hubicka <jh@suse.cz>
2286
2287 * lto-partition.c (set_referenced_from_other_partition_p,
2288 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2289 New functions.
2290 (lto_promote_cross_file_statics): Use them.
2291
ab96cc5b
JH
22922012-07-24 Jan Hubicka <jh@suse.cz>
2293
2294 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2295
0229aee9
UB
22962012-07-24 Uros Bizjak <ubizjak@gmail.com>
2297
2298 * lto-tree.h (lang_decl): Add variable_size GTY option.
2299
7ee2468b
SB
23002012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2301
2302 * lto.c: Do not include timevar.h.
2303 * Make-lang.in: Fix dependencies.
2304
a910399d
LC
23052012-06-18 Lawrence Crowl <crowl@google.com>
2306
92a285c1 2307 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2308 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2309 to lto_wpa_write_files.
2310 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2311 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2312 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2313 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2314 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2315 to be a front end, but is not one.
2316
877ab5e9
JH
23172012-05-18 Jan Hubicka <jh@suse.cz>
2318
2319 * lto.c (lto_materialize_constructors_and_inits): Remove.
2320 (read_cgraph_and_symbols): Remove handling of alias pairs.
2321
6649df51
JH
23222012-05-17 Jan Hubicka <jh@suse.cz>
2323
2324 * lto-partition.c (add_references_to_partition): Handle external vars.
2325 (partition_varpool_node_p): Likewise.
2326 (lto_promote_cross_file_statics): Do not promote externals.
2327
d1ede5f4
BS
23282012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2329
2330 * lto-lang.c (handle_fnspec_attribute): New static function.
2331 (lto_attribute_table): Add "fn spec".
2332 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2333
0d6bf48c
JH
23342012-05-04 Jan Hubicka <jh@suse.cz>
2335
2336 * lto.c (do_whole_program_analysis): Set timevars correctly.
2337 (lto_main): Likewise.
d1ede5f4 2338
1d67dde8
RB
23392012-05-04 Richard Guenther <rguenther@suse.de>
2340
2341 * lang.opt (fwpa): Do not mark as Optimization.
2342 (fltrans): Likewise.
2343
65d630d4
JH
23442012-04-30 Jan Hubicka <jh@suse.cz>
2345
2346 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2347 * lto-partition.c (partition_cgraph_node_p): Use
2348 symtab_used_from_object_file_p.
65d630d4
JH
2349 (partition_varpool_node_p): Likewise.
2350
ead84f73
JH
23512012-04-20 Jan Hubicka <jh@suse.cz>
2352
2353 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2354
5932a4d4
JH
23552012-04-18 Jan Hubicka <jh@suse.cz>
2356
2357 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2358 Update for new ipa-ref API.
2359
65c70e6b
JH
23602012-04-16 Jan Hubicka <jh@suse.cz>
2361
2362 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2363 walkers to walk cgraph and varpool.
65c70e6b
JH
2364 (materialize_cgraph): Likewise.
2365 * lto-partition.c (lto_1_to_1_map): Likewise.
2366 (lto_balanced_map): Likewise.
2367 (lto_promote_cross_file_statics): Likewise.
2368
960bfb69
JH
23692012-04-14 Jan Hubicka <jh@suse.cz>
2370
2371 * lto.c: Update field referenced for new cgraph/varpool layout.
2372 * lto-partition.c: Likewise.
2373
a66dc285
JH
23742012-04-11 Jan Hubicka <jh@suse.cz>
2375
2376 * lto.c: Update copyright; remove params.h, ipa-inline.h
2377 and ipa-utils.h inlines; inline lto-partition.h
2378 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2379 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2380 add_references_to_partition, add_cgraph_node_to_partition_1,
2381 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2382 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2383 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2384 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2385 * lto-partition.c: ... here; new file.
2386 * lto-partition.h: New file.
2387 * Make-lang.in (lto.o): Update dependencies.
2388 (lto-partition.o): New.
2389
f3b249e5
RG
23902012-04-05 Richard Guenther <rguenther@suse.de>
2391
2392 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2393 definition.
2394
21fa2faf
RG
23952012-03-12 Richard Guenther <rguenther@suse.de>
2396
2397 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2398
6bb485a3
RG
23992012-03-06 Richard Guenther <rguenther@suse.de>
2400
2401 PR lto/52097
2402 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2403
95510497
RG
24042012-02-28 Richard Guenther <rguenther@suse.de>
2405
2406 PR lto/52400
2407 * lto.c (lto_register_function_decl_in_symtab): Do not register
2408 a reverse renamed decl mapping.
2409
09228fef
JJ
24102012-01-06 Jakub Jelinek <jakub@redhat.com>
2411
2412 PR lto/51774
2413 * lto-lang.c (handle_returns_twice_attribute): New function.
2414 (lto_attribute_table): Add returns_twice attribute.
2415
b03eda0d
RG
24162011-12-21 Richard Guenther <rguenther@suse.de>
2417
2418 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2419 (LTO_FIXUP_TREE): Use it.
2420 (uniquify_nodes): Mark new non-prevailing types and avoid
2421 calling gimple_register_type on others.
2422 (lto_read_decls): Add comment.
2423
4ad9a9de
EB
24242011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2425
2426 * lto.h (lto_parse_hex): Delete.
2427 * lto.c (lto_read_decls): Use 'int' for offsets.
2428 (lto_parse_hex): Make static and return proper 64-bit host type.
2429 (lto_resolution_read): Use proper 64-bit host type.
2430
ea973bad
RG
24312011-12-13 Richard Guenther <rguenther@suse.de>
2432
2433 PR lto/48354
2434 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2435 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2436
c8218030
UB
24372011-12-01 Uros Bizjak <ubizjak@gmail.com>
2438
2439 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2440 (ignore_attribute): New.
2441
57ac2606
AH
24422011-11-21 Aldy Hernandez <aldyh@redhat.com>
2443
2444 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2445 (handle_transaction_pure_attribute): New.
2446
52a35ef7
RG
24472011-11-03 Richard Guenther <rguenther@suse.de>
2448
2449 PR lto/44965
2450 * lto-lang.c (lto_post_options): Do not read file options.
2451 * lto.c (lto_read_all_file_options): Remove.
2452 (lto_init): Call lto_set_in_hooks here.
2453
51973b1e
JH
24542011-10-09 Jan Hubicka <jh@suse.cz>
2455
2456 * lto.c (node_cmp, varpool_node_cmp): New functions.
2457 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2458 (cmp_partitions): Rename to ...
2459 (cmp_partitions_size): ... this one.
2460 (cmp_partitions_order): New function.
2461 (lto_wpa_write_files): Sort partitions by order when
2462 -fno-toplevel-reorder is used.
2463
5958009b
AK
24642011-10-09 Andi Kleen <ak@linux.intel.com>
2465
2466 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2467
e79983f4
MM
24682011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2469
2470 * lto-lang.c (def_builtin_1): Delete old interface with two
2471 parallel arrays to hold standard builtin declarations, and replace
2472 it with a function based interface that can support creating
2473 builtins on the fly in the future. Change all uses, and poison
2474 the old names. Make sure 0 is not a legitimate builtin index.
2475
ecdbd01a 24762011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2477
2478 * lto-object.c (lto_obj_add_section_data): Add list.
2479 (lto_obj_add_section): Fill in list.
2480 (ltoobj_build_section_table): Pass through list.
2481 * lto.c (file_data_list): Declare.
2482 (create_subid_section_table): Pass arguments directly.
2483 Fill in list of file_datas.
2484 (lwstate): Delete.
2485 (lto_create_files_from_ids): Pass in direct arguments.
2486 Don't maintain list.
2487 (lto_file_read): Use explicit section and file data lists.
2488 (lto_read_all_file_options): Pass in section_list.
2489 * lto.h (lto_obj_build_section_table): Add list.
2490 (lto_section_slot): Add next.
2491 (lto_section_list): Declare.
2492
ed0d2da0
JH
24932011-10-02 Jan Hubicka <jh@suse.cz>
2494
2495 PR lto/47247
2496 * common.c (lto_resolution_str): Add new resolution.
2497 * common.h (lto_resolution_str): Likewise.
2498
ad7715f3
L
24992011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2500 Andi Kleen <ak@linux.intel.com>
2501
2502 PR lto/50568
2503 * lto.c (lto_splay_tree_delete_id): New.
2504 (lto_splay_tree_compare_ids): Likewise.
2505 (lto_splay_tree_lookup): Likewise.
2506 (lto_splay_tree_id_equal_p): Likewise.
2507 (lto_splay_tree_insert): Likewise.
2508 (lto_splay_tree_new): Likewise.
2509 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2510 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2511 (create_subid_section_table): Use lto_splay_tree_lookup and
2512 lto_splay_tree_insert.
2513 (lto_file_read): Use lto_splay_tree_new.
2514
ecdbd01a 25152011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2516
2517 * lto.c (lto_resolution_read): Remove id dumping.
2518 (lto_section_with_id): Turn id HOST_WIDE_ID.
2519 (create_subid_section_table): Dito.
2520
892a371f
DS
25212011-08-28 Dodji Seketeli <dodji@redhat.com>
2522
2523 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2524 linemap_add twice.
2525
f82d1a94
MJ
25262011-08-11 Martin Jambor <mjambor@suse.cz>
2527
2528 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2529
f0efc7aa
DN
25302011-08-08 Diego Novillo <dnovillo@google.com>
2531
2532 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2533 * lto.c: Include tree-streamer.h.
2534
1a072294
RG
25352011-07-06 Richard Guenther <rguenther@suse.de>
2536
2537 * lto-lang.c (lto_init):
2538 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2539
7496868d
JH
25402011-06-11 Jan Hubicka <jh@suse.cz>
2541
10f13f22 2542 PR lto/48246
7496868d
JH
2543 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2544 (lto_balanced_map): Likewise.
2545
39e2db00
JH
25462011-06-11 Jan Hubicka <jh@suse.cz>
2547
2548 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2549 (add_cgraph_node_to_partition) ... here; walk aliases.
2550 (lto_1_to_1_map): Remove same body alias code.
2551 (promote_fn): Likewise.
2552 (lto_promote_cross_file_statics): Update comment.
2553
2554
28628ea6
DN
25552011-06-07 Diego Novillo <dnovillo@google.com>
2556
2557 * lto.c (uniquify_nodes): Move code to register decls to
2558 the loop that computes canonical types.
2559
009db074
RG
25602011-06-07 Richard Guenther <rguenther@suse.de>
2561
2562 * lto-lang.c (lto_init): Do not set
2563 size_type_node or call set_sizetype.
2564
47c79d56
DN
25652011-06-04 Diego Novillo <dnovillo@google.com>
2566
2567 * lto.c (lto_init): New.
2568 (lto_main): Call it.
2569
d5828cc7
DN
25702011-06-03 Diego Novillo <dnovillo@google.com>
2571
2572 * lto.c (get_resolution): Move from lto-streamer-in.c.
2573 (lto_register_var_decl_in_symtab): Likewise.
2574 (lto_register_function_decl_in_symtab): Likewise.
2575 (uniquify_nodes): Call lto_register_var_decl and
2576 lto_register_function_decl_in_symtab after reading a new
2577 VAR_DECL or FUNCTION_DECL.
2578
6807da97
RG
25792011-06-01 Richard Guenther <rguenther@suse.de>
2580
2581 * lto-lang.c (lto_register_canonical_types): New function.
2582 (lto_init): Register common nodes with the canonical type machinery.
2583 Do not play tricks with char_type_node.
2584
d74be317
RG
25852011-05-26 Richard Guenther <rguenther@suse.de>
2586
2587 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2588
d9f8303f
NF
25892011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2590
2591 * lto.c (lto_ft_typed): New function.
2592 (lto_ft_common): Call it.
2593 (lto_ft_constructor): Likewise.
2594 (lto_ft_expr): Likewise.
2595 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2596 TREE_CHAIN.
2597
fb291a1e
RG
25982011-05-20 Richard Guenther <rguenther@suse.de>
2599
2600 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2601 (lto_ft_type): Move main-variant and pointer-to chain building ...
2602 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2603 in a separate final loop.
2604
31b3ca64
RG
26052011-05-19 Richard Guenther <rguenther@suse.de>
2606
2607 * lto.c (uniquify_nodes): First register all types before
2608 fixing up the tree SCC.
2609
35d828c5
JH
26102011-05-11 Jan Hubicka <jh@suse.cz>
2611
2612 PR lto/48952
2613 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2614
51545682
NF
26152011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2616
2617 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2618 location of binfo field.
2619 (lto_fixup_prevailing_decls): Likewise.
2620
8242dd04
NF
26212011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2622
2623 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2624 build_function_type_array or build_varargs_function_type_array
2625 instead.
2626
c99c0026
EB
26272011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2628
2629 * lto-lang.c (global_bindings_p): Return bool.
2630
c47d0034
JH
26312011-05-07 Jan Hubicka <jh@suse.cz>
2632
a9bcb3f0
EB
2633 * lto.c (lto_materialize_function): Use
2634 cgraph_function_with_gimple_body_p.
2635 (add_cgraph_node_to_partition): Do not re-add items to partition;
2636 handle thunks.
c47d0034
JH
2637 (add_varpool_node_to_partition): Do not re-add items to partition.
2638
bb3398ca
JH
26392011-05-03 Jan Hubicka <jh@suse.cz>
2640
2641 * lto.c (free_ltrans_partitions): Fix accidental commit.
2642
1cb1a99f
JH
26432011-05-03 Jan Hubicka <jh@suse.cz>
2644
2645 * lto.c (ltrans_partition_def): Remove GTY annotations.
2646 (ltrans_partitions): Move to heap.
2647 (new_partition): Update.
2648 (free_ltrans_partitions): New function.
2649 (lto_wpa_write_files): Use it.
2650
af8bca3c
MJ
26512011-04-29 Martin Jambor <mjambor@suse.cz>
2652
2653 * lto.c: Include ipa-utils.h.
2654 (lto_balanced_map): Update call to ipa_reverse_postorder.
2655 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2656
b823cdfe
MM
26572011-04-29 Michael Matz <matz@suse.de>
2658
2659 * lto.c (toplevel): Include tree-flow.h.
2660 (lto_read_in_decl_state): Don't merge types here.
2661 (tree_with_vars): New static hash table.
2662 (remember_with_vars): New static functions.
2663 (LTO_FIXUP_TYPE): New macro.
2664 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2665 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2666 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2667 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2668 (lto_read_decls): Uniquify while reading in trees.
2669 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2670 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2671 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2672 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2673 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2674 lto_fixup_tree): Remove.
2675 (lto_fixup_state): Remove data argument. Use
2676 lto_symtab_prevailing_decl.
2677 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2678 (lto_fixup_prevailing_decls): New function.
2679 (lto_fixup_state_aux): Argument aux is unused.
2680 (lto_fixup_decls): Don't allocate pointer sets, don't use
2681 lto_fixup_tree, use lto_fixup_prevailing_decls.
2682 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2683 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2684
b9843260
EB
26852011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2686
2687 * lto.c (lto_balanced_map): Fix typos in head comment.
2688 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2689 test.
2690
e7f23018
JH
26912011-04-16 Jan Hubicka <jh@suse.cz>
2692
2693 * lto.c (lto_balanced_map): Update.
2694
10a5dd5d
JH
26952011-04-14 Jan Hubicka <jh@suse.cz>
2696
2697 * lto.c: Include ipa-inline.h
b9843260
EB
2698 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2699 accessor.
10a5dd5d
JH
2700 (ipa_node_duplication_hook): Fix declaration.
2701 * Make-lang.in (lto.o): Update dependencies.
2702
81f653d6
NF
27032011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2704
2705 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2706 calling TREE_CHAIN.
2707 * lto.c (lto_fixup_common): Likewise.
2708
dcf0c47e
NF
27092011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2710
2711 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2712 (handle_type_generic_attribute): Likewise.
2713
e89964e3
MM
27142011-04-03 Michael Matz <matz@suse.de>
2715
2716 * lto.c (lto_materialize_function): Don't read and then discard
2717 sections in WPA mode.
2718 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2719
2720 * lto-lang.c (registered_builtin_fndecls): Remove.
2721 (lto_getdecls): Return NULL_TREE.
2722 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2723
d2b3fe18
RG
27242011-03-31 Richard Guenther <rguenther@suse.de>
2725
2726 PR lto/48246
2727 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2728 partitions when checking is not enabled.
2729
ba78087b
KT
27302011-03-25 Kai Tietz <ktietz@redhat.com>
2731
2732 * lto.c (lto_resolution_read): Use filename_cmp instead
2733 of strcmp.
2734 (lto_read_section_data): Likewise.
2735
0edf1bb2
JL
27362011-03-25 Jeff Law <law@redhat.com>
2737
2738 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2739
62d784f7
KT
27402011-03-21 Kai Tietz <ktietz@redhat.com>
2741
2742 PR target/12171
2743 * lto-lang.c (lto_attribute_table): Adjust table.
2744
62dd9571
JJ
27452011-02-18 Jakub Jelinek <jakub@redhat.com>
2746
2747 PR bootstrap/47807
2748 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2749 of lto-streamer.h.
2750
237d6259
RG
27512011-02-18 Richard Guenther <rguenther@suse.de>
2752
2753 PR lto/47798
2754 * lto-tree.h (lto_global_var_decls): Do not declare here.
2755 * lto-lang.c: Include lto-streamer.h.
2756 * Make-lang.in (lto-lang.o): Adjust dependencies.
2757
8ead2223
KT
27582011-02-10 Kai Tietz <kai.tietz@onevision.com>
2759
2760 PR lto/47241
2761 * lto.c (lto_read_section_data): Free
2762 fd_name in failure case.
2763 For mingw targets don't hash file-descriptor.
2764 (read_cgraph_and_symbols): Close current_lto_file
2765 in failure case.
2766
6e701822
JH
27672011-01-11 Jan Hubicka <jh@suse.cz>
2768
2769 PR lto/45721
2770 PR lto/45375
b9843260
EB
2771 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2772 are not partitioned.
6e701822 2773
f4da8dce
NF
27742010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2775
2776 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2777 Use prototype_p.
2778
6b7fb143
RG
27792010-12-06 Richard Guenther <rguenther@suse.de>
2780
2781 PR lto/46796
2782 * lto-lang.c (lto_init): Give names to basic types.
2783
c59ffc41
JM
27842010-11-30 Joseph Myers <joseph@codesourcery.com>
2785
2786 * lto-object.c: Don't include toplev.h.
2787 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2788
7c475d11
JM
27892010-11-30 Joseph Myers <joseph@codesourcery.com>
2790
2791 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2792 $(TOPLEV_H).
2793
71f3e391
JM
27942010-11-29 Joseph Myers <joseph@codesourcery.com>
2795
2796 * lto-endian.h: Delete.
2797 * lto-object.c: Don't include "libiberty.h".
2798 (O_BINARY): Don't define.
2799 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2800 (O_BINARY): Don't define.
2801
9f1718b0
RG
28022010-11-23 Richard Guenther <rguenther@suse.de>
2803
2804 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2805
39c4e298
RG
28062010-11-23 Richard Guenther <rguenther@suse.de>
2807
2808 PR lto/46605
2809 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2810
b37421c6
JM
28112010-11-17 Joseph Myers <joseph@codesourcery.com>
2812
2813 * lto.c (lto_main): Take no arguments.
2814 * lto.h (lto_main): Update prototype.
2815
d82f74d3
ILT
28162010-11-16 Ian Lance Taylor <iant@google.com>
2817
2818 * lto-object.c (lto_obj_file_open): Call
2819 simple_object_attributes_merge rather than
2820 simple_object_attributes_compare.
2821
a4d8c676
JM
28222010-11-12 Joseph Myers <joseph@codesourcery.com>
2823
2824 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2825 * lto-lang.c (lto_handle_option): Take location_t parameter.
2826
d8a07487
JM
28272010-11-10 Joseph Myers <joseph@codesourcery.com>
2828
2829 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2830 letters and remove trailing '.'.
2831 (lto_file_finalize): Start diagnostic with a lowercase letter.
2832
6b3456d1
ILT
28332010-11-02 Ian Lance Taylor <iant@google.com>
2834
2835 * lto-object.c: New file.
2836 * lto-elf.c: Remove file.
2837 * lto-macho.c: Remove file.
2838 * lto-macho.h: Remove file.
2839 * lto-coff.c: Remove file.
2840 * lto-coff.h: Remove file.
2841 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2842 lto/lto-object.o.
2843 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2844 (lto/lto-objfile.o): New target.
2845 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2846 (lto/lto.o): Remove $(LIBIBERTY_H).
2847
030cd86c
JH
28482010-10-22 Jan Hubicka <jh@suse.cz>
2849
2850 * lto.c (add_cgraph_node_to_partition,
2851 add_varpool_node_to_partition): Add debug info.
2852 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2853 partitioned nodes.
2854 (do_whole_program_analysis): Set function flags before dumping.
2855
4490cae6
RG
28562010-10-22 Richard Guenther <rguenther@suse.de>
2857
2858 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2859 the new gimple_register_canonical_type.
2860
703cdce3
L
28612010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2862
2863 PR bootstrap/45954
2864 * config-lang.in (boot_language): Set to $enable_lto.
2865
1915c739
JJ
28662010-10-18 Jakub Jelinek <jakub@redhat.com>
2867
2868 PR lto/45638
2869 * Make-lang.in (check-lto): New dummy target.
2870
82971de5
EB
28712010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2872
2873 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2874
a75bfaa6
JM
28752010-10-08 Joseph Myers <joseph@codesourcery.com>
2876
2877 * lto-lang.c (lto_init_options): Change to
2878 lto_init_options_struct. Update parameters.
2879 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2880 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2881
937f7f69
JH
28822010-10-06 Jan Hubicka <jh@suse.cz>
2883
2884 * lto.c (lto_balanced_map): Fix accounting of program size.
2885
2169830c
JH
28862010-10-06 Jan Hubicka <jh@suse.cz>
2887
2888 * lto.c (lto_balanced_map): Do not produce empty partitions.
2889
ecdbd01a 28902010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2891
2892 * lto.c (lto_process_name): Add.
2893 (lto_main): Call lto_process_name.
2894
06ed016f
JH
28952010-10-06 Jan Hubicka <jh@suse.cz>
2896
2897 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2898 COMDATs required by the linker.
2899
ae718d66
ILT
29002010-10-05 Ian Lance Taylor <iant@google.com>
2901
2902 * lto.c (lto_section_with_id): Make s a const pointer.
2903
852e4bd2
JH
29042010-10-05 Jan Hubicka <jh@suse.cz>
2905
2906 * lto.c: Include params.h.
2907 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2908 refcounting in aux field.
2909 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2910 New functions.
2911 (lto_1_to_1_map): Simplify.
2912 (lto_balanced_map): New function.
2913 (do_whole_program_analysis): Chose proper partitioning alg.
2914 * Make-lang.in (lto.o): Add dependency on params.h
2915
ecdbd01a 29162010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2917
2918 * Make-lang.in (lto1): Add + to build rule.
2919
ecdbd01a 29202010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2921
2922 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 2923 with fatal_error.
f1e92a43 2924
0d6e14fd
JH
29252010-09-28 Jan Hubicka <jh@suse.cz>
2926
2927 * lto-lang.c (handle_leaf_attribute): New function.
2928 (lto_attribute_tables): Add leaf.
2929
fb462383
JZ
29302010-09-25 Jie Zhang <jie@codesourcery.com>
2931
2932 * lto.c (lto_read_all_file_options): Start a new line after
2933 printing out file names.
2934
051f8cc6
JH
29352010-09-24 Jan Hubicka <jh@suse.cz>
2936
2937 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2938
64e0f5ff
JH
29392010-09-20 Jan Hubicka <jh@suse.cz>
2940
2941 PR tree-optimize/45605
2942 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2943
a929ec3d
GP
29442010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2945
2946 * lto-elf.c (lto_obj_file_open): Also provide filename when
2947 elf_begin fails.
2948
4c588abf
JH
29492010-09-17 Jan Hubicka <jh@suse.cz>
2950
2951 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2952
c3224d6f
RG
29532010-09-17 Richard Guenther <rguenther@suse.de>
2954
2955 * lang.opt (flag_wpa): Also enable for the driver.
2956
52b3b3c7
JH
29572010-09-16 Jan Hubicka <jh@suse.cz>
2958
2959 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2960 EXTERNAL flags.
2961
969c37b7
LB
29622010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2963
2964 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2965
098a4f50
JH
29662010-09-08 Jan Hubicka <jh@suse.cz>
2967
2968 * lto.c (real_file_count, real_file_decl_data): New static vars.
2969 (read_cgraph_and_symbols): Use it.
2970
0f443ad0
RG
29712010-09-08 Richard Guenther <rguenther@suse.de>
2972
2973 * lto.c (read_cgraph_and_symbols): Collect again after each
2974 file.
2975
ee187353
JH
29762010-09-07 Jan Hubicka <jh@suse.cz>
2977
2978 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2979
b3ec52d0
RG
29802010-09-03 Richard Guenther <rguenther@suse.de>
2981
2982 * lto-elf.c (validate_file): Always error if validation fails.
2983
f1395d4a
JH
29842010-08-20 Jan Hubicka <jh@suse.cz>
2985
2986 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2987 (lto_wpa_write_files): Update comments.
2988
2429bce3
L
29892010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2990
2991 PR bootstrap/45357
2992 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2993 with has_analyzed_clone_p.
2994
e0f967db
JH
29952010-08-20 Jan Hubicka <jh@suse.cz>
2996
2997 * lto.c (has_analyzed_clone_p): New function
2998 (lto_materialize_function): Use callgraph to determine if
2999 body is needed.
3000 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3001
ac47786e
NF
30022010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3003
3004 * lto.c: Use FOR_EACH_VEC_ELT.
3005
ecdbd01a 30062010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3007
3008 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3009
5f20c657
JM
30102010-07-27 Joseph Myers <joseph@codesourcery.com>
3011
3012 * lto-lang.c (lto_handle_option): Update prototype and return
3013 value type. Remove duplicate assignment to result.
3014
7a9bf9a4
JM
30152010-07-27 Joseph Myers <joseph@codesourcery.com>
3016
3017 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3018 New.
3019 (lto_init_options): Update prototype.
3020 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3021 Define.
3022
ecdbd01a 30232010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3024
3025 PR lto/44992
92a285c1 3026 * lto.c: Include splay-tree.h
73ce4d1e
AK
3027 (lto_resolution_read): Change to walk file_ids tree and parse
3028 extra file_id in resolution file.
3029 (lto_section_with_id): Add.
3030 (create_subid_section_table): Add.
3031 (lwstate): Add.
3032 (lto_create_files_from_ids): Add.
3033 (lto_file_read): Change to handle sub file ids and create list
3034 of file_datas. Add output argument for count.
3035 (get_section_data): Pass file_data to lto_get_section_name.
3036 (lto_flatten_file): Add.
3037 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3038
ecdbd01a 30392010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3040
3041 * lto-coff.c (hash_name, eq_name): Move.
3042 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3043 * lto-elf.c: (hash_name, eq_name): Move.
3044 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3045 * lto-macho.c: (hash_name, eq_name): Move.
3046 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3047 * lto.c: (hash_name, eq_name): Move from lto-*.c
3048 (lto_obj_create_section_hash_table): Add.
3049 (free_with_string): Add.
3050
718f9c0f
MLI
30512010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3052
3053 * lto-coff.c: Include diagnostic-core.h in every file that
3054 includes toplev.h.
3055 * lto-elf.c: Likewise.
3056 * lto-lang.c: Likewise.
3057 * lto-macho.c: Likewise.
3058
1b137837
JJ
30592010-07-07 Jakub Jelinek <jakub@redhat.com>
3060
3061 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3062 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3063 objects.
3064
92eb4438
JH
30652010-07-05 Jan Hubicka <jh@suse.cz>
3066
3067 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3068 nodes from same comdat group as well as all comdat functions referenced
3069 here.
b9843260
EB
3070 (add_varpool_node_to_partition, add_references_to_partition): New
3071 function.
3072 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3073 add_varpool_node_to_partition; clear aux flags when done.
3074 (lto_promote_cross_file_statics): Do not promote stuff that gets
3075 duplicated to each ltrans.
92eb4438 3076
a05541a9
JH
30772010-07-04 Jan Hubicka <jh@suse.cz>
3078
92a285c1 3079 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3080
4a2ac96f
RG
30812010-06-13 Richard Guenther <rguenther@suse.de>
3082
3083 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3084
1d536046
KT
30852010-06-09 Kai Tietz <kai.tietz@onevision.com>
3086
3087 * lto.c (lto_resolution_read): Pre-initialize local variable r.
3088 * lto-coff.c (coff_write_object_file): Add braces to if.
3089
a9429e29
LB
30902010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3091
3092 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3093 (lto_file_read): Likewise.
3094 (new_partition): Likewise.
3095 (read_cgraph_and_symbols): Likewise.
3096
5498f011
JM
30972010-06-07 Joseph Myers <joseph@codesourcery.com>
3098
3099 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3100 (lto_handle_option): Don't set flag_signed_char here.
3101
d4c0c9f6
RG
31022010-06-04 Richard Guenther <rguenther@suse.de>
3103
3104 PR lto/41584
3105 * lto.c (lto_1_to_1_map): Use the proper file_data for
3106 varpool nodes.
3107
0a5fa5a1
JH
31082010-05-30 Jan Hubicka <jh@suse.cz>
3109
3110 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3111 partitioning decisions.
3112
9eec9488
JH
31132010-05-29 Jan Hubicka <jh@suse.cz>
3114
3115 * lto.c (bitmap vector): Remove.
3116 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3117 (ltrans_partition_def): New structure.
3118 (ltrans_partition): New type and VECtor.
3119 (new_partition): New function.
3120 (add_cgraph_node_to_partition): New function.
3121 (lto_1_to_1_map): Reorganize for partitions.
3122 (lto_add_inline_clones): Remove.
3123 (lto_add_all_inlinees): Remove.
3124 (lto_promote_cross_file_statics): Use partitions.
3125 (cmp_partitions): New function.
3126 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3127 use partitions; output files sorted by size.
3128
3e097227
SB
31292010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3130
3131 * Make-lang.in: Replace vec.h dependency with VEC_H.
3132
7ca92787
JM
31332010-05-28 Joseph Myers <joseph@codesourcery.com>
3134
3135 * lto-coff.c (coff_errmsg): Remove.
3136 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3137 errors instead of coff_errmsg (-1).
3138 * lto-macho.c (mach_o_errmsg): Remove.
3139 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3140 instead of mach_o_errmsg (-1).
3141 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3142 xstrerror (errno).
3143
b5611987
RG
31442010-05-28 Richard Guenther <rguenther@suse.de>
3145
3146 * lto.c (prefix_name_with_star): Removed.
3147 (strip_extension): Likewise.
3148 (get_filename_for_set): Likewise.
3149 (lto_write_ltrans_list): Fold into ...
3150 (lto_wpa_write_files): ... this. Name LTRANS units
3151 by suffixing the ltrans output list filename.
3152 (do_whole_program_analysis): Adjust.
3153
1da2ed5f
JM
31542010-05-27 Joseph Myers <joseph@codesourcery.com>
3155
3156 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3157 (read_cgraph_and_symbols, lto_main): Use seen_error.
3158 * Make-lang.in (lto/lto.o): Update dependencies.
3159
7951d88a
EB
31602010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3161
3162 PR lto/44230
3163 * lto.h (lto_eh_personality): New prototype.
3164 * lto.c: Include debug.h.
3165 (first_personality_decl): New static variable.
3166 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3167 first function for which it is non-null.
3168 (lto_eh_personality_decl): New static variable.
3169 (lto_eh_personality): New function.
3170 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3171 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3172
e12da9c2
SB
31732010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3174
3175 * lto-lang.c: Do not include expr.h.
3176
468194f4
RG
31772010-05-24 Richard Guenther <rguenther@suse.de>
3178
3179 * lto-elf.c (lto_obj_build_section_table): Work around
3180 FreeBSD libelf issue.
3181
bd9eb5da
RG
31822010-05-22 Richard Guenther <rguenther@suse.de>
3183
3184 * lto.c (read_cgraph_and_symbols): Do not collect.
3185
66576e1b
JH
31862010-05-20 Jan Hubicka <jh@suse.cz>
3187
3188 * lto.c (promote_var, promote_fn): New functions.
3189 (lto_promote_cross_file_statics): Compute correctly boundary including
3190 static initializers of readonly vars.
3191
36576655
JH
31922010-05-18 Jan Hubicka <jh@suse.cz>
3193
66576e1b 3194 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3195 (lto_promote_cross_file_statics): Deal with non-inline clones.
3196
28632d63
JH
31972010-05-18 Jan Hubicka <jh@suse.cz>
3198
3199 * lto.c (lto_materialize_function): Announce function when
3200 reading body; allocate_struct_function only when reading body;
3201 do not finalize local statics; ggc_collect after reading;
3202 do not mark reachable node.
3203 (materialize_cgraph): Do not announce function.
3204
33e42d56
JH
32052010-05-11 Jan Hubicka <jh@suse.cz>
3206
3207 * lto.c (materialize_cgraph): Revert my previous patch.
3208
f6430ea5
KT
32092010-05-11 Kai Tietz <kai.tietz@onevision.com>
3210
3211 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3212 IMAGE_FILE_MACHINE_AMD64.
3213 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3214
0a0b07b7
JH
32152010-05-11 Jan Hubicka <jh@suse.cz>
3216
3217 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3218 (materialize_cgraph): Add it here.
3219
9a809897
JH
32202010-05-11 Jan Hubicka <jh@suse.cz>
3221
3222 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3223 vector.
3224
32252010-05-11 Jan Hubicka <jh@suse.cz>
3226
3227 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3228 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3229 use reachable_from_other_partition_p and
3230 referenced_from_other_partition_p test.
3231
94f64249
KT
32322010-05-11 Kai Tietz <kai.tietz@onevision.com>
3233
3234 * lto-coff.c (validate_file): Add x64-coff support.
3235 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3236 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3237 * lto-lang.c (lto_build_c_type_nodes): Add check for
3238 'long long unsigned int' for x64-windows.
3239 (lto_init): Likewise.
3240
3241
c082f9f3
SB
32422010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3243
3244 * lto.h (struct lto_file_struct): Document offset member.
3245 * lto-endian.h: New file.
3246 * lto-macho.h: New file.
3247 * lto-macho.c: New file.
3248 * Make-lang.in: Add rule for lto-macho.o.
3249
3f8257db 32502010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3251
3252 PR lto/43857
3253 PR lto/43371
3254 * lang.opt (fresolution): Change to ...
3255 (fresolution=): ... this.
3256 * lto-lang.c (lto_handle_option): Adjust.
3257
48cf395b
RB
32582010-05-07 Richard Guenther <rguenther@suse.de>
3259
3260 * lto.c (DUMPBASE_SUFFIX): Remove.
3261 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3262 Rename to ...
3263 (lto_write_ltrans_list): ... only output the list of ltrans files.
3264 (lto_maybe_unlink): Remove.
3265 (do_whole_program_analysis): Do not execute LTRANS phase
3266 from here.
3267
afa83c15
L
32682010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3269
3270 * lto-lang.c (lto_handle_option): Add argument kind.
3271
369451ec
JH
32722010-05-05 Jan Hubicka <jh@suse.cz>
3273
48cf395b
RB
3274 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3275 refs.
369451ec 3276
2f41ecf5
JH
32772010-05-05 Jan Hubicka <jh@suse.cz>
3278
3279 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3280
ace72c88
JH
32812010-04-30 Jan Hubicka <jh@suse.cz>
3282
b9843260
EB
3283 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3284 use default name.
ace72c88
JH
3285 (lto_wpa_write_files): Write any non-empty partition.
3286
05575e07
JH
32872010-04-30 Jan Hubicka <jh@suse.cz>
3288
3289 * lto.c: Do not attempt to make constant pool references global.
3290
49ba8180
JH
32912010-04-28 Jan Hubicka <jh@suse.cz>
3292
3293 * lto/lto.c (lto_read_in_decl_state): Use GGC.
3294 (lto_wpa_write_files): Announce what we are writting.
3295 (all_file_decl_data): New.
3296 (read_cgraph_and_symbols): Use GGC; correct timevars.
3297 (do_whole_program_analysis): Collect.
3298 * lto/Make-lang.in (lto.o): Fix dependency.
3299 * Makefile.in (GTFILES): Add lto-streamer.h.
3300 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3301 (varpool_assemble_pending_decls): Use VAROUT.
3302 * lto-streamer.h (lto_tree_ref_table): Annotate.
3303 (lto_in_decl_state): Annotate.
3304 (lto_file_decl_data): Annotate.
3305
2942c502
JH
33062010-04-28 Jan Hubicka <jh@suse.cz>
3307
3308 * lto.c (lto_varpool_node_sets): New.
3309 (lto_1_to_1_map): Partition varpool too.
3310 (globalize_context_t, globalize_cross_file_statics,
3311 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3312 lto_scan_statics_in_remaining_global_vars): Remove.
3313 (lto_promote_cross_file_statics): Rewrite.
3314 (get_filename_for_set): Take vset argument.
3315 (lto_wpa_write_files): Pass around vsets.
3316
3bec79c5
DK
33172010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3318
3319 PR lto/42776
3320 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3321 hardcoding 'lto-elf.o'.
3322 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3323
3324 * lto-coff.h: New file.
3325 * lto-coff.c: Likewise.
3326
21aac880
RG
33272010-04-26 Richard Guenther <rguenther@suse.de>
3328
3329 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3330
2cee0101
DK
33312010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3332
3333 * lto.h (lto_elf_file_open): Rename prototype from this ...
3334 (lto_obj_file_open): ... to this.
3335 (lto_elf_file_close): Likewise ...
3336 (lto_obj_file_close): ... and likewise.
3337 (lto_elf_build_section_table): Likewise ...
3338 (lto_obj_build_section_table): ... and likewise.
3339 (lto_elf_begin_section): Likewise ...
3340 (lto_obj_begin_section): ... and likewise.
3341 (lto_elf_append_data): Likewise ...
3342 (lto_obj_append_data): ... and likewise.
3343 (lto_elf_end_section): Likewise ...
3344 (lto_obj_end_section): ... and likewise.
3345 * lto.c (lto_file_read): Update references to the above.
3346 (lto_wpa_write_files): Likewise.
3347 (lto_read_all_file_options): Likewise.
3348 (read_cgraph_and_symbols): Likewise.
3349 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3350 (LANG_HOOKS_APPEND_DATA): Likewise.
3351 (LANG_HOOKS_END_SECTION): Likewise.
3352 * lto-elf.c (lto_elf_file_open): Rename from this ...
3353 (lto_obj_file_open): ... to this, updating any references.
3354 (lto_elf_file_close): Likewise ...
3355 (lto_obj_file_close): ... and likewise.
3356 (lto_elf_build_section_table): Likewise ...
3357 (lto_obj_build_section_table): ... and likewise.
3358 (lto_elf_begin_section): Likewise ...
3359 (lto_obj_begin_section): ... and likewise.
3360 (lto_elf_append_data): Likewise ...
3361 (lto_obj_append_data): ... and likewise.
3362 (lto_elf_end_section): Likewise ...
3363 (lto_obj_end_section): ... and likewise.
3364
bc58d7e1
JH
33652010-04-21 Jan Hubicka <jh@suse.cz>
3366
3367 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3368 (materialize_cgraph): Likewise.
3369
e792884f
JH
33702010-04-21 Jan Hubicka <jh@suse.cz>
3371
3372 * lto.c (lto_wpa_write_files): Update.
3373 (read_cgraph_and_symbols): Be more verbose.
3374 (materialize_cgraph): Likewise.
3375 (do_whole_program_analysis): Likewise.
3376
c9945504
JH
33772010-04-21 Jan Hubicka <jh@suse.cz>
3378
3379 * lto.c (globalize_cross_file_statics): When function has address taken,
3380 it needs to be public.
3381
a837268b
JH
33822010-04-20 Jan Hubicka <jh@suse.cz>
3383
3384 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3385 (lto_add_all_inlinees): Likewise.
3386 (lto_wpa_write_files): Likewise.
3387
3b9e5d95
EB
33882010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3389
3390 * lto-lang.c (lto_init): Remove second argument in call to
3391 build_common_tree_nodes.
3392
8ccb78f2
RO
33932010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3394
3395 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3396 function.
3397
2f9b99e6
EB
33982010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3399
3400 PR bootstrap/43276
3401 * lto-elf.c: Define EM_* constants if not already defined.
3402
bef7d288
EB
34032010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3404
3405 * lto-elf.c (is_compatible_architecture): New static function.
3406 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3407
f68df07c
RG
34082010-02-11 Richard Guenther <rguenther@suse.de>
3409
3410 PR driver/43021
3411 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3412 appropriately.
3413
3cdea2b4
AH
34142010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3415
3416 * lto.c (O_BINARY): Define.
3417 (lto_read_section_data): Open file in binary mode.
3418 * lto-elf.c (O_BINARY): Define.
3419 (lto_elf_file_open): Open file in binary mode.
3420
c59449fa
RG
34212010-01-08 Richard Guenther <rguenther@suse.de>
3422
3423 PR lto/42528
3424 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3425 (lto_init): Do not init char_type_node in a standard way
3426 but according to flag_signed_char.
3427
d7fb0a6d
L
34282010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3429
3430 PR lto/41564
3431 * lto.c (DUMPBASE_SUFFIX): New.
3432 (lto_execute_ltrans): Append a sequence number to -dumpbase
3433 for LTRANS.
3434
78ce4053
L
34352010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3436
3437 PR lto/42580
3438 * lto-elf.c (lto_elf_file_open): Stop if the command line
3439 option file is missing.
3440
2a71eb48
RG
34412009-12-15 Richard Guenther <rguenther@suse.de>
3442
3443 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3444 (lto_post_options): Do not disable debuginfo.
3445
a818bca1
DG
34462009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3447
3448 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3449
e7d00517
RG
34502009-12-11 Richard Guenther <rguenther@suse.de>
3451
3452 PR lto/42037
3453 * lto.c (lto_resolution_read): Properly grow the vector.
3454
1ab53893
RG
34552009-12-11 Richard Guenther <rguenther@suse.de>
3456
3457 PR lto/41915
3458 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3459 to the C99 default. Do not set flag_unit_at_a_time.
3460
0f900dfa
JJ
34612009-11-28 Jakub Jelinek <jakub@redhat.com>
3462
3463 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3464 variable.
3465
92fa7608
RAE
34662009-11-19 Rafael Avila de Espindola <espindola@google.com>
3467
3468 PR bootstrap/42096
3469 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3470 * lto.c (lto_parse_hex): New.
3471 (lto_resolution_read): Use lto_parse_hex.
3472 * lto.h (lto_parse_hex): New.
3473
9870fe4f
RAE
34742009-11-17 Rafael Avila de Espindola <espindola@google.com>
3475
3476 * lto-elf.c (lto_file_init): Add offset argument.
3477 (lto_elf_file_open): Record the offset.
3478 * lto.c (lto_resolution_read): Change file_name into a lto_file
3479 argument. Check offsets.
3480 (lto_file_read): Update call to lto_resolution_read.
3481 * lto.h (lto_file_struct): Add the offset field.
3482
1b70729f
RAE
34832009-11-16 Rafael Avila de Espindola <espindola@google.com>
3484
3485 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3486
0e3776db
JH
34872009-11-14 Jan Hubicka <jh@suse.cz>
3488
3489 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3490
06bd7f56
RAE
34912009-11-12 Rafael Avila de Espindola <espindola@google.com>
3492
3493 * lang.opt (fresolution): Renamed from resolution.
3494 * lto-lang.c (lto_handle_option): Handle new option name.
3495 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3496
7e9dc421 34972009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3498 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3499
3500 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3501 (lto_elf_file_open): Handle offsets in arguments name@offest.
3502
b207f900
RG
35032009-10-30 Richard Guenther <rguenther@suse.de>
3504
3505 PR lto/41858
3506 * lto.c (lto_file_read): Do not set file_data->fd.
3507 (lto_read_section_data): Use a single-entry file-descriptor cache.
3508 Do not check the result of xmalloc.
3509 (free_section_data): Do not use file_data->fd.
3510 (lto_read_all_file_options): Likewise.
3511
2c928155
RG
35122009-10-22 Richard Guenther <rguenther@suse.de>
3513
3514 * lto.c (lto_fixup_jump_functions): Remove.
3515 (lto_fixup_decls): Do not fixup jump functions.
3516 (read_cgraph_and_symbols): Schedule cgraph merging after
3517 summary reading. Schedule type and decl fixup before
3518 summary reading.
3519
f9c91f8a
RB
35202009-10-22 Richard Guenther <rguenther@suse.de>
3521
3522 * lto.c (lto_fixup_data_t): Remove free_list member.
3523 (lto_fixup_tree): Do not insert into free_list.
3524 (free_decl): Remove.
3525 (lto_fixup_decls): Remove free-list handling.
3526
fb3f88cc
JH
35272009-10-22 Jan Hubicka <jh@suse.cz>
3528
3529 * lto.c (lto_fixup_jump_functions): New function.
3530 (lto_fixup_decls): Use it.
3531
35f1e9f4
RG
35322009-10-16 Richard Guenther <rguenther@suse.de>
3533
3534 PR lto/41715
3535 * lto.c (lto_fixup_tree): Revert last change.
3536
200c8750
RG
35372009-10-14 Richard Guenther <rguenther@suse.de>
3538
3539 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3540 compatible with the one we replace wrap it around a
3541 VIEW_CONVERT_EXPR.
3542
b1b07c92
RG
35432009-10-09 Richard Guenther <rguenther@suse.de>
3544
3545 PR lto/41635
3546 PR lto/41636
3547 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3548 a file.
3549 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3550 (init_ehdr##BITS): Likewise.
3551
3c2e7d45
JM
35522009-10-08 Joseph Myers <joseph@codesourcery.com>
3553
3554 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3555 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3556 diagnostics.
3557 * lto-lang.c (lto_post_options): Remove trailing "." from
3558 diagnostics.
3559
0d0bfe17
RG
35602009-10-08 Richard Guenther <rguenther@suse.de>
3561
3562 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3563 hash tables.
3564
4bedf19a
JM
35652009-10-07 Joseph Myers <joseph@codesourcery.com>
3566
3567 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3568
b20996ff
JH
35692009-10-07 Jan Hubicka <jh@suse.cz>
3570
3571 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3572 ltrans stage; explain why this is needed and should not.
3573
1a735925
RG
35742009-10-05 Richard Guenther <rguenther@suse.de>
3575
3576 PR lto/41552
3577 PR lto/41487
3578 * lto.c (lto_read_decls): Do not register deferred decls.
3579 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3580 until after reading the IPA summaries.
3581
d7f09764
DN
35822009-10-02 Rafael Avila de Espindola <espindola@google.com>
3583
3584 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3585 (lto-lang.c): Don't include lto/common.h.
3586
35872009-10-02 Rafael Avila de Espindola <espindola@google.com>
3588
3589 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3590 (lto/common.o): Remove.
3591 * common.c: Remove.
3592 * common.h (lto_kind_str): Remove.
3593 (lto_visibility_str): Remove.
3594 (lto_resolution_str): Make it static.
3595
35962009-10-01 Diego Novillo <dnovillo@google.com>
3597
3598 * lto.c (lto_read_decls): Add comment.
3599 Call internal_error instead of gcc_assert.
3600 (lto_resolution_read): Likewise.
3601 (lto_add_all_inlinees): Tidy.
3602 * Make-lang.in: Fix copyright boilerplate.
3603 (lto.pdf): New.
3604 (lto.install-pdf): New.
3605 * lto-tree.h: Fix copyright boilerplate.
3606 * lang-specs.h: Likewise.
3607 Remove ".lto" entry from compilers fragment.
3608 * lto-elf.c: Move inclusion of gelf.h after config.h.
3609 Tidy formatting everywhere.
3610 * lto.h: Fix copyright boilerplate.
3611 Tidy formatting everywhere.
3612 * common.c: Likewise.
3613 * config-lang.in: Likewise.
3614 * common.h: Likewise.
3615 * lto-lang.c: Likewise.
3616
36172009-10-01 Richard Guenther <rguenther@suse.de>
3618
3619 * lto.c (lto_read_section_data): Use plain lseek/read.
3620
36212009-10-01 Richard Guenther <rguenther@suse.de>
3622
3623 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3624 use sysconf to query the system page size.
3625 (lto_file_read): Implement fallback using stdio.
3626 (free_section_data): Likewise.
3627
36282009-09-29 Diego Novillo <dnovillo@google.com>
3629
3630 * lto-lang.c (lto_init): Really fix call to
3631 build_common_builtin_nodes.
3632
36332009-09-29 Diego Novillo <dnovillo@google.com>
3634
3635 * lto-lang.c (lto_init): Fix call to
3636 build_common_builtin_nodes.
3637
36382009-09-29 Richard Guenther <rguenther@suse.de>
3639
3640 PR lto/40754
3641 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3642 in bytes.
3643 (first_data_block): New static variable.
3644 (lto_elf_append_data): Align the first data block in each
3645 section.
3646
36472009-09-28 Diego Novillo <dnovillo@google.com>
3648
3649 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3650 * lto.c (strip_extension): New.
3651 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3652 (lto_execute_ltrans): Tidy.
3653 Do not pass -fwpa nor -fltrans-* to LTRANS.
3654 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3655 * tree.c (need_assembler_name_p): Call
3656 lang_hooks.decls.may_need_assembler_name_p if set.
3657 * varasm.c (default_binds_local_p_1): Remove check for
3658 flag_ltrans.
3659 * varpool.c (decide_is_variable_needed): Do not test for
3660 in_lto_p.
3661
36622009-09-22 Richard Guenther <rguenther@suse.de>
3663
3664 PR lto/39276
3665 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3666 * Make-lang.in: Remove ltrans-driver stuff.
3667 * config-lang.in: Likewise.
3668 * lang.opt (fltrans-driver): Remove.
3669 * lto-lang.c (lto_init_options): Remove code initializing
3670 ltrans_driver.
3671 * ltrans-driver: Remove.
3672
36732009-09-21 Diego Novillo <dnovillo@google.com>
3674
3675 * lto-lang.c (lto_define_builtins): Remove superfluous
3676 calls to targetm.init_builtins and build_common_builtin_nodes.
3677 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3678 build_common_builtin_nodes.
3679 * lto.c (lto_materialize_function): Do nothing if NODE is a
3680 clone.
3681
36822009-09-03 Diego Novillo <dnovillo@google.com>
3683
3684 * lto-elf.c (validate_file): Replace call to
3685 elf_getshstrndx with call to elf_getshdrstrndx.
3686
36872009-08-19 Richard Guenther <rguenther@suse.de>
3688
3689 * lto-lang.c (lto_init): Merge char_type_node with the
3690 appropriately signed variant.
3691
36922009-08-19 Richard Guenther <rguenther@suse.de>
3693
3694 PR lto/41071
3695 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3696 (lto_fixup_type): Re-build the pointer-to chain part two.
3697
36982009-08-19 Richard Guenther <rguenther@suse.de>
3699
3700 PR lto/41071
3701 * lto.c (lto_fixup_type): Re-build the type variant chain.
3702
37032009-08-19 Richard Guenther <rguenther@suse.de>
3704
3705 PR lto/41071
3706 * lto.c (lto_fixup_constructor): New function.
3707 (lto_fixup_tree): Replace all types. Properly fixup
3708 constructors and constants.
3709
37102009-08-14 Richard Guenther <rguenther@suse.de>
3711
3712 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3713 for DECL_LANG_SPECIFIC.
3714
37152009-08-13 Richard Guenther <rguenther@suse.de>
3716
3717 PR lto/41032
3718 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3719
37202009-07-30 Richard Guenther <rguenther@suse.de>
3721
3722 PR lto/40903
3723 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3724 the largest decl for output and free TREE_CHAIN for further
3725 use.
3726
37272009-07-24 Diego Novillo <dnovillo@google.com>
3728
3729 * Make-lang.in: Add empty lto.install-plugin target.
3730
37312009-07-13 Diego Novillo <dnovillo@google.com>
3732
3733 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3734
37352009-07-11 Richard Guenther <rguenther@suse.de>
3736
3737 * lto-lang.c (lto_write_globals): Wrapup global decls.
3738
37392009-07-10 Richard Guenther <rguenther@suse.de>
3740
3741 * lto-lang.c (lto_init): Allocate one more location to make
3742 BUILTINS_LOCATION correct.
3743
37442009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3745
3746 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3747
37482009-07-06 Diego Novillo <dnovillo@google.com>
3749
3750 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3751 TYPE_SIZE_UNIT.
3752
37532009-07-06 Diego Novillo <dnovillo@google.com>
3754
3755 * lto.c (preload_common_nodes): Remove.
3756 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3757 (lto_read_decls): Call lto_data_in_create and
3758 lto_data_in_delete.
3759 (free_decl): Do not call ggc_free.
3760 (lto_main): Call lto_init_reader.
3761 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3762 (lto_init): Initialize main_identifier_node if needed.
3763 Make ptrdiff_type_node be integer_type_node.
3764
37652009-06-19 Diego Novillo <dnovillo@google.com>
3766
3767 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3768 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3769 Remove code guarded by #ifdef LOCAL_TRACE.
3770
37712009-06-18 Diego Novillo <dnovillo@google.com>
3772
3773 * lto.c: Update license to GPLv3.
3774 * lto-elf.c: Likewise.
3775 * common.c: Likewise.
3776 * lto-lang.c: Likewise.
3777 * lto.h: Remove superfluous include files. Update all
3778 users.
3779
37802009-06-17 Diego Novillo <dnovillo@google.com>
3781
3782 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3783
37842009-06-02 Diego Novillo <dnovillo@google.com>
3785
3786 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3787 read in.
3788 (materialize_cgraph): Only materialize nodes that have a
3789 representation on file.
3790
37912009-06-01 Diego Novillo <dnovillo@google.com>
3792
3793 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3794
37952009-05-31 Diego Novillo <dnovillo@google.com>
3796
3797 * lto-lang.c (lto_type_for_mode): Handle all the modes
3798 handled in c_common_type_for_mode.
3799
38002009-05-21 Diego Novillo <dnovillo@google.com>
3801
3802 * lto-elf.c: Always include <gelf.h>.
3803 * config-lang.in (target_libs): Remove.
3804 (build_by_default): Set to no.
3805
38062009-05-15 Diego Novillo <dnovillo@google.com>
3807
3808 * lto.c (lto_materialize_function): Assert that DECL is
3809 not a builtin.
3810 (materialize_cgraph): Don't try to materialize builtin
3811 functions.
3812 * lto-section-out.c (write_symbol_vec): Do not write
3813 builtin functions.
3814
38152009-05-13 Diego Novillo <dnovillo@google.com>
3816
3817 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3818
38192009-05-07 Diego Novillo <dnovillo@google.com>
3820
3821 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3822 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3823 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3824 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3825 (lto_fixup_tree): Call gimple_register_type when *TP is a
3826 type.
3827 (lto_main): Call bitmap_obstack_initialize.
3828
38292009-04-22 Diego Novillo <dnovillo@google.com>
3830
3831 * lto.c (free_section_data): Tidy.
3832 (lto_1_to_1_map): Tidy.
3833 (lto_add_all_inlinees): Tidy.
3834 (prefix_name_with_star): New.
3835 (get_filename_for_set): New.
3836 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3837 to determine what cgraph node sets to write.
3838 Call get_filename_for_set to compute temporary file
3839 names.
3840 (lto_execute_ltrans): Do not execute LTRANS on files with
3841 names that start with '*'.
3842 Move logic to execute LTRANS together so that LTRANS is
3843 invoked only if there are any files to compile.
3844 (do_whole_program_analysis): Only remove output files
3845 that do not start with '*'.
3846
38472009-04-06 Diego Novillo <dnovillo@google.com>
3848
3849 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3850 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3851 (lto_add_all_inlinees): Tidy.
3852
38532009-03-26 Diego Novillo <dnovillo@google.com>
3854
3855 * lto.c: Include gimple.h.
3856 (lto_read_in_decl_state): Call gimple_register_type for
3857 every type in every stream.
3858 (lto_fixup_common): Call gimple_register_type if T has a
3859 type.
3860 (do_whole_program_analysis): Call print_lto_report.
3861 (lto_main): Call print_lto_report after cgraph_optimize.
3862 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3863
38642009-03-24 Diego Novillo <dnovillo@google.com>
3865
3866 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3867 (lto.o): Add dependency on GIMPLE_H.
3868
38692009-03-10 Simon Baldwin <simonb@google.com>
3870
3871 * lto.c (lto_read_all_file_options): Close any open file descriptor
3872 contained in file_data before freeing.
3873
38742009-02-24 Rafael Avila de Espindola <espindola@google.com>
3875
3876 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3877 for a decl in the original bitmap, not a node.
3878 (lto_add_all_inlinees): Remove original nodes that are not needed.
3879 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3880
38812009-02-24 Diego Novillo <dnovillo@google.com>
3882
3883 * lto.c (lto_materialize_function): Update
3884 lto_stats.num_function_bodies.
3885 (get_section_data): Initialize *LEN to 0.
3886 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3887 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3888 Update lto_stats.num_output_files.
3889 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3890 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3891 (lto_main): Initialize lto_stats.
3892 If flag_lto_report is set, call print_lto_report.
3893
38942009-02-19 Diego Novillo <dnovillo@google.com>
3895
3896 Revert
3897
3898 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3899
3900 * lto.c (lto_add_inline_clones): Don't add the
3901 master clone. Check for a decl in the original
3902 bitmap, not a node.
3903 (lto_add_all_inlinees): Remove original nodes
3904 that are not needed.
3905 (lto_scan_statics_in_cgraph_node): Don't care if
3906 the node is the master.
3907 (lto_promote_cross_file_statics): Use a new
3908 context.seen_node_decls for each set
3909
39102009-02-19 Rafael Avila de Espindola <espindola@google.com>
3911
3912 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3913 for a decl in the original bitmap, not a node.
3914 (lto_add_all_inlinees): Remove original nodes that are not needed.
3915 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3916 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3917 for each set
3918
39192009-02-18 Diego Novillo <dnovillo@google.com>
3920
3921 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3922 and TV_WHOPR_WPA_IO.
3923 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3924 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3925 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3926 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3927 depending on command line flags.
3928 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3929 (lto_main): Remove timer uses.
3930
39312009-02-18 Rafael Avila de Espindola <espindola@google.com>
3932
3933 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3934 (lto_wpa_write_files): Update calls to renamed functions.
3935
39362009-02-17 Diego Novillo <dnovillo@google.com>
3937
3938 PR 39203
3939 * lto-lang.c (lto_post_options): Disable -fwhole-program
3940 when running LTRANS.
3941
39422009-02-10 Diego Novillo <dnovillo@google.com>
3943
3944 * lto.c (read_cgraph_and_symbols): Fix comment.
3945
39462009-02-10 Diego Novillo <dnovillo@google.com>
3947
3948 * lto.c (read_cgraph_and_symbols): Read options from all
3949 IL files.
3950
39512009-02-10 Diego Novillo <dnovillo@google.com>
3952
3953 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3954 (materialize_cgraph): Likewise.
3955 (do_whole_program_analysis): Likewise.
3956 (lto_main): Call read_cgraph_and_symbols,
3957 materialize_cgraph and do_whole_program_analysis.
3958
39592009-02-10 Simon Baldwin <simonb@google.com>
3960
3961 * lto.c: Include lto-opts.h.
3962 * (lto_main): Clear file options at loop start, read any saved
3963 options from the first file handled, and re-issue options.
3964 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3965
39662009-02-02 Diego Novillo <dnovillo@google.com>
3967
3968 * lto.c (lto_main): Stop LTO_TIMER and use
3969 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3970
39712009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3972
3973 PR lto/38995
3974 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3975 to POINTER_SIZE.
3976
39772009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3978
3979 * Make-lang.in (LTO_EXE): Link with all
3980 BACKENDLIBS and not only GMPLIBS
3981
39822009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3983
3984 PR bootstrap/38992
3985 * lto-elf.c: Include gelf.h instead of libelf.h.
3986 (lto_elf_file_close): Replace elfx_update_shstrndx with
3987 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3988 gelf_update_ehdr.
3989
39902009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3991
3992 PR middle-end/38996
3993 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3994
39952009-01-26 Diego Novillo <dnovillo@google.com>
3996
3997 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3998
39992009-01-26 Diego Novillo <dnovillo@google.com>
4000
4001 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4002 and rename into gimple_types_compatible_p.
4003
40042009-01-12 Rafael Avila de Espindola <espindola@google.com>
4005
4006 * lto-lang.c (lang_hooks): Remove the const qualifier.
4007
40082009-01-06 Diego Novillo <dnovillo@google.com>
4009
4010 * ltrans-driver: Mark 'all' target as phony.
4011
40122008-12-31 Diego Novillo <dnovillo@google.com>
4013
4014 * ltrans-driver: Execute a NOP action for target 'all'.
4015
40162008-12-19 Diego Novillo <dnovillo@google.com>
4017
4018 * lto.c (lto_1_to_1_map): Tidy.
4019
40202008-12-19 Diego Novillo <dnovillo@google.com>
4021
4022 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4023 be opened, show its name.
4024 * ltrans-driver: If $verbose is set, do not use parallelism.
4025
40262008-12-17 Rafael Avila de Espindola <espindola@google.com>
4027
4028 * lto.c (lto_fixup_function): New.
4029 (lto_fixup_tree): Call lto_fixup_function.
4030
40312008-12-14 Doug Kwan <dougkwan@google.com>
4032
4033 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4034 variables if there is no function.
4035
40362008-12-10 Simon Baldwin <simonb@google.com>
4037
4038 * ltrans-driver: Always run make in silent mode, to avoid make's
4039 trace on stdout interfering with lto-wrapper output.
4040
40412008-12-10 Doug Kwan <dougkwan@google.com>
4042
4043 * lto.c (lto_add_inline_clones): Do not force master clones of
4044 inlined functions already in SET to be static inline.
4045
40462008-12-04 Doug Kwan <dougkwan@google.com>
4047
4048 * lto.c (globalize_context_t): New type to store states in
4049 globalization of cross-file statics.
4050 (globalize_cross_file_statics): New.
4051 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4052 static decls that need to be fixed up.
4053 (lto_scan_statics_in_cgraph_node): Change call interface to use
4054 a globalize_context_t CONTEXT for all states used.
4055 (lto_scan_statics_in_remaining_global_vars): New.
4056 (lto_promote_cross_file_statics): Use new call interface of
4057 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4058 visible vars in the last set.
4059
40602008-12-03 Diego Novillo <dnovillo@google.com>
4061
4062 * lto.c (lto_fixup_tree): Do not emit an error when
4063 PREVAILING throw but T doesn't.
4064
40652008-12-02 Doug Kwan <dougkwan@google.com>
4066
4067 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4068 from code in ...
4069 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4070 variables and functions.
4071 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4072 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4073
40742008-11-29 Diego Novillo <dnovillo@google.com>
4075
4076 * lto.c: Include timevar.h.
4077 (lto_materialize_function): Tidy. Add comments.
4078 (lto_wpa_write_files): Tidy.
4079 (lto_execute_ltrans): Tidy.
4080 (lto_main): Add local variable LTO_TIMER. Initialize it
4081 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4082 Start and stop the timer.
4083 Tidy comments.
4084 * Make-lang.in (lto.o): Add dependency on timevar.h.
4085 * ltrans-driver: React to -v and -save-temps.
4086 Use simple heuristic to determine how much parallelism to
4087 use when executing make.
4088
40892008-11-12 Doug Kwan <dougkwan@google.com>
4090
4091 * lto.c (lto_bitmap_obstack): Remove var.
4092 (lto_materialize_function): Do nothing instead of marking function
4093 body in file if flag_wpa is true.
4094 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4095 (lto_scan_statics_in_cgraph_node): New function.
4096 (lto_promote_cross_file_statics): Same.
4097 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4098 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4099 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4100
41012008-11-09 Diego Novillo <dnovillo@google.com>
4102
4103 * lto/lto.c (lto_fixup_tree): Change error message locus
4104 information to include location of mismatching
4105 declaration.
4106 Use TREE_NO_WARNING to avoid repeated messages.
4107 (lto_main): If lto_fixup_decls emitted any errors, exit.
4108 * lto/lto-lang.c: Don't include libfuncs.h and except.h
4109 (lto_init_options): Don't enable exceptions by default.
4110 (lto_eh_runtime_type): Move to lto-function-in.c
4111 (lto_init_eh): Likewise.
4112 (lto_init): Don't call lto_init_eh.
4113 * lto/Make-lang.in (lto-lang.o): Remove dependency on
4114 libfuncs.h and except.h.
4115
41162008-10-30 Diego Novillo <dnovillo@google.com>
4117
4118 * lto.c (lto_read_decls): Declare debug_main only if
4119 LTO_STREAM_DEBUGGING is enabled.
4120
41212008-10-30 Simon Baldwin <simonb@google.com>
4122
4123 * lto.c (lto_wpa_write_files): Create intermediate files with
4124 make_cwd_temp_file().
4125 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4126 WPA_SAVE_LTRANS is set.
4127 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4128 * ltrans-driver: Do not strip directory from output files.
4129
41302008-10-29 Doug Kwan <dougkwan@google.com>
4131
4132 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4133 DECL.
4134 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4135 (lto/lto-symtab.o): Remove rule.
4136 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4137 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4138 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4139 Remove macros.
4140 lto-symtab.c (File): Move up one level.
4141 lto-lang.c (cgraph.h): Remove include.
4142 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4143 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4144 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4145
41462008-10-24 Rafael Espindola <espindola@google.com>
4147
4148 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4149 non prevailing weak symbols.
4150
41512008-10-24 Rafael Espindola <espindola@google.com>
4152
4153 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4154
41552008-10-24 Rafael Espindola <espindola@google.com>
4156
4157 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4158 different types.
4159
41602008-10-23 Simon Baldwin <simonb@google.com>
4161
4162 * lto-lang.c (input_node): Save the node reference, rather than the
4163 node pointer, in node->inlined_to.
4164 (input_cgraph_1): Convert node references into node pointers.
4165
41662008-10-22 Diego Novillo <dnovillo@google.com>
4167 Rafael Espindola <espindola@google.com>
4168
4169 * lto.c (lto_resolution_read): Tidy.
4170 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4171 abort if RET is NULL.
4172
41732008-10-22 Doug Kwan <dougkwan@google.com>
4174
4175 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4176 exceptions flag is given.
4177 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4178 (lto_init_eh): Remove exceptions flag initialization.
4179 (lto_init): Only call lto_init_eh if exceptions flag is set.
4180
41812008-10-21 Diego Novillo <dnovillo@google.com>
4182
4183 * lto.c: Tidy some formatting.
4184 * lto.h: Likewise.
4185
41862008-10-21 Simon Baldwin <simonb@google.com>
4187
4188 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4189 them is NULL (but not the other).
4190
41912008-10-17 Diego Novillo <dnovillo@google.com>
4192
4193 * ltrans-driver: Divert output from make to a temporary file.
4194 Show it if the call to make failed.
4195
41962008-10-15 Diego Novillo <dnovillo@google.com>
4197
4198 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4199 Do not print TEMP_FILENAME
4200 * ltrans-driver: Call make with -s.
4201
42022008-10-15 Diego Novillo <dnovillo@google.com>
4203
4204 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4205 TREE_STATIC on global symbols.
4206
42072008-10-14 Ollie Wild <aaw@google.com>
4208
4209 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4210 (LTRANS_DRIVER_EXE): Add.
4211 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4212 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4213 (lto.install.common): Remove ltrans-driver.
4214 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4215 (LTRANS_DRIVER_EXE): New build rule.
4216 * config-lang.in (compilers): Add ltrans-driver.
4217
42182008-10-14 Diego Novillo <dnovillo@google.com>
4219
4220 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4221 of program name.
4222
42232008-10-13 Ollie Wild <aaw@google.com>
4224
4225 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4226 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4227 * ltrans-driver (LTRANS_FLAGS): Remove.
4228
42292008-10-08 Doug Kwan <dougkwan@google.com>
4230
4231 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4232 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4233 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4234 from lto_fixup_state to here.
4235 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4236 just a free-list. Fix up types also. Move decl merging code to
4237 lto_fixup_tree.
4238 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4239 object.
4240 (lto_fixup_decls): Use another pointer set to avoid multiple
4241 walking of nodes except for DECLs to be replaced. Pass an
4242 lto_fixup_data_t object to tree-walker.
4243
42442008-10-08 Rafael Espindola <espindola@google.com>
4245
4246 * lto-symtab.c (lto_symtab_set_resolution): New.
4247 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4248 lto_symtab_get_resolution.
4249 (lto_symtab_prevailing_decl): Return decl for non public decls.
4250 (lto_symtab_get_resolution): New.
4251 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4252
42532008-10-06 Rafael Espindola <espindola@google.com>
4254
4255 * lto-lang.c: Include cgraph.h.
4256 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4257 input_cgraph): Moved from lto-cgraph.c.
4258 (LANG_HOOKS_INPUT_CGRAPH): New.
4259
42602008-10-03 Rafael Espindola <espindola@google.com>
4261
4262 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4263
42642008-10-03 Rafael Espindola <espindola@google.com>
4265
4266 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4267 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4268 prevailing definition. Don't mark TREE_NOTHROW differences.
4269 * lto.c (lto_fixup_tree): New.
4270 (lto_fixup_state): New.
4271 (lto_fixup_state_aux): New.
4272 (free_decl): New.
4273 (lto_fixup_decls): New.
4274 (lto_main): Call lto_fixup_decls.
4275
42762008-10-02 Ollie Wild <aaw@google.com>
4277
4278 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4279 and Init.
4280 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4281 * lto-lang.c (lto_post_options): Add validation and fixups for
4282 -fltrans and -fwpa.
4283
42842008-10-02 Rafael Espindola <espindola@google.com>
4285
4286 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4287 lto_symtab_merge_decl): Return void.
4288 (lto_symtab_prevailing_decl): New.
4289
42902008-09-30 Rafael Espindola <espindola@google.com>
4291
4292 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4293 defined symbols.
4294 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4295 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4296 Check for already defined symbols.
4297 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4298 (LTO_IDENTIFIER_RESOLUTION): Remove.
4299 (LTO_DECL_RESOLUTION): New.
4300
43012008-09-30 Rafael Espindola <espindola@google.com>
4302
4303 * lto.c (lto_read_decls): Use new input_tree signature.
4304
43052008-09-26 Doug Kwan <dougkwan@google.com>
4306
4307 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4308 bodies affected by exception attribute merging of DECLs.
4309 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4310 merging.
4311
43122008-09-25 Rafael Espindola <espindola@google.com>
4313
4314 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4315 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4316 * lto-symtab.c (lto_symtab_compatible): New.
4317 (lto_symtab_overwrite_decl): New.
4318 (lto_symtab_merge_decl): Refactor to use the above functions
4319 and the resolution from lang_identifier.
4320 * lto-tree.h: Include plugin-api.h.
4321 (lang_identifier): Add resolution.
4322 (LTO_IDENTIFIER_RESOLUTION): New.
4323
43242008-09-25 Ollie Wild <aaw@google.com>
4325
4326 * lang.opt (fltrans-output-list=): New option.
4327 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4328
43292008-09-25 Rafael Espindola <espindola@google.com>
4330
4331 * lto.c (lto_resolution_read): Initialize ret;
4332
43332008-09-24 Ollie Wild <aaw@google.com>
4334
4335 * lto.c (sys/mman.h): Move include.
4336 (lto_wpa_write_files): Return a list of written files.
4337 (lto_execute_ltrans): New function.
4338 (lto_main): Call lto_execute_ltrans.
4339 (ltrans-driver): New file.
4340 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4341 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4342 (lto_init_options): Initialize ltrans_driver.
4343 (lto_handle_option): Fix incorrect default output value.
4344 * lang.opt (fltrans-driver=): New option.
4345 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4346 (lto.install-common): Add lto/ltrans-driver.
4347
43482008-09-24 Rafael Espindola <espindola@google.com>
4349
4350 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4351 (lto/lto.o): Depend on lto/common.h.
4352 (lto/common.o): New.
4353 * lang.opt (resolution): New.
4354 * lto-lang.c (resolution_file_name): New.
4355 (lto_handle_option): Handle OPT_resolution.
4356 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4357 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4358 pass it to lto_symtab_merge_decl.
4359 * lto.c: Include common.h.
4360 (lto_read_decls): Add resolutions and resolutions_size arguments.
4361 Initialize data_in.globals_resolution and
4362 data_in.globals_resolution_size.
4363 (index_and_symbol_resolution): New.
4364 (lto_resolution_read): New.
4365 (lto_file_read): Add argument resolution_file.
4366 Read resolution.
4367 * lto.h (resolution_file_name): New.
4368
43692008-09-23 Rafael Espindola <espindola@google.com>
4370
4371 * common.c: Update description.
4372 * common.h: Update description.
4373
43742008-09-23 Rafael Espindola <espindola@google.com>
4375
4376 * common.c: Moved from lto-plugin.
4377 * common.h: Moved from lto-plugin.
4378
43792008-09-22 Doug Kwan <dougkwan@google.com>
4380
4381 * lto.c (VEC(bitmap,heap)): Declare.
4382 (lto_materialize_function): Handle WAP mode specially.
4383 (lto_add_inline_clones): New.
4384 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4385 return a bitmap of inlined decls.
4386 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4387 (lto_main): Call reset_inline_failed to reset inlining states.
4388 Check call-graph after WPA inlining.
4389 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4390 unconditionally.
4391
43922008-09-19 Doug Kwan <dougkwan@google.com>
4393
4394 lto.c (lto_main): Remove unsued wrapper code.
4395 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4396
43972008-09-19 Rafael Espindola <espindola@google.com>
4398
4399 * lto-symtab.c: Include lto-tree-in.h.
4400 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4401 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4402 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4403
44042008-09-17 Paolo Bonzini <bonzini@gnu.org>
4405 Rafael Avila de Espindola <espindola@google.com>
4406
4407 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4408 COMPOUND_LITERAL_EXPR_DECL): Remove.
4409 (emit_local_var): Remove.
4410 (lto_expand_expr): Remove.
4411 (lto_staticp): Remove.
4412 (LANG_HOOKS_EXPAND_EXPR): Remove.
4413 (LANG_HOOKS_STATICP): Remove.
4414
44152008-09-11 Diego Novillo <dnovillo@google.com>
4416
4417 * lto-lang.c: Include except.h and libfuncs.h.
4418 (lto_init_eh): New.
4419 (lto_init): Call it.
4420 Set flag_generate_lto to 0.
4421 * Make-lang.in (lto-lang.o): Add dependency on except.h
4422 and libfuncs.h.
4423
44242008-09-09 Bill Maddox <maddox@google.com>
4425
4426 * lto-lang.c: Include header file expr.h.
4427 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4428 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4429 (emit_local_var): Copied from c-semantics.c.
4430 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4431 and c_staticp in c-common.c.
4432 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4433
44342008-09-08 Diego Novillo <dnovillo@google.com>
4435
4436 * lto-lang.c (lto_global_bindings_p): Return 1 during
4437 IPA passes.
4438
44392008-09-07 Diego Novillo <dnovillo@google.com>
4440
4441 * lto.c: Tidy formatting.
4442
44432008-08-04 Bill Maddox <maddox@google.com>
4444
4445 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4446
44472008-09-03 Doug Kwan <dougkwan@google.com>
4448
4449 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4450 CIF_OK instead of NULL.
4451
44522008-09-02 Diego Novillo <dnovillo@google.com>
4453 Simon Baldwin <simonb@google.com>
4454
4455 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4456 c_common_type_for_size.
4457 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4458 (lto_init): Call linemap_add.
4459 (signed_and_unsigned_types): Remove.
4460
44612008-08-29 Diego Novillo <dnovillo@google.com>
4462
4463 * lto-lang.c (handle_noreturn_attribute): New local function.
4464 (handle_const_attribute): New local function.
4465 (handle_malloc_attribute): New local function.
4466 (handle_pure_attribute): New local function.
4467 (handle_novops_attribute): New local function.
4468 (handle_nonnull_attribute): New local function.
4469 (handle_nothrow_attribute): New local function.
4470 (handle_sentinel_attribute): New local function.
4471 (handle_type_generic_attribute): New local function.
4472 (handle_format_attribute): New local function.
4473 (handle_format_arg_attribute): New local function.
4474 (lto_attribute_table): Declare.
4475 (lto_format_attribute_table): Declare.
4476 (lto_init_attributes): New local function.
4477 (lto_define_builtins): Call it.
4478 Call targetm.init_builtins and build_common_builtin_nodes.
4479 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4480 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4481
44822008-08-28 Diego Novillo <dnovillo@google.com>
4483
4484 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4485 $(GIMPLE_H).
4486 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4487 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4488 * lto-symtab.c: Include gimple.h.
4489 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4490 TREE_CHAIN.
4491
44922008-08-27 Doug Kwan <dougkwan@google.com>
4493
4494 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4495 gt-lto-lto.h): New includes.
4496 (lto_materialize_function): Do not read in function body in WPA mode.
4497 Format a line to fit in 80 columns.
4498 (lto_cgraph_node_sets): New garbage collected variable.
4499 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4500 New functions.
4501 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4502 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4503 variable LTO_SECTION_IN_H.
4504 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4505 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4506 with variable LTO_SECTION_IN_H.
4507 * config-lang.in (gtfiles): Add lto/lto.c.
4508 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4509 merged DECL_RESULT correctly.
4510
45112008-08-26 Bill Maddox <maddox@google.com>
4512
4513 * lto-lang.c Include tree-gimple.h.
4514 (lto_mark_addressable): Call mark_addressable rather than
4515 asserting.
4516 (lto_post_options): Suppress debug info generation.
4517 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4518
3f8257db 45192008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4520
4521 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4522 assertion and leave an explanatory comment in its place.
4523
45242008-08-21 Doug Kwan <dougkwan@google.com>
4525
4526 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4527 of common nodes instead of computing locallly.
4528 (lto_read_in_decl_state): New.
4529 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4530 Read global and per-function in-decl states.
4531 * Make-lang.in (LTO_H): Update dependency.
4532 (lto/lto.o): Same.
4533 (lto-symtab.c): Merge (revision 139039)
4534 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4535
45362008-08-21 Rafael Espindola <espindola@google.com>
4537
4538 * config-lang.in (target_libs): New.
4539
45402008-08-20 Bill Maddox <maddox@google.com>
4541
4542 * lto.c (current_lto_file): Remove GTY marker from static
4543 variable. Remove include of file gt-lto-lto.h.
4544 * Make-lang.in: Remove dependency of lto/lto.o on
4545 gt-lto-lto.h.
4546 * lto-elf.c (lto_file_close): Removed.
4547 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4548 allocate lto_elf_file object.
4549 (lto_elf_file_close): Free lto_elf_file object after close.
4550 * lto.h (struct lto_file_struct): Remove GTY marker.
4551 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4552 gtfiles.
4553
45542008-08-20 Bill Maddox <maddox@google.com>
4555
4556 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4557 to conform to its new signature.
4558 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4559 on discarded node here, now called in global_vector_fixup.
4560
45612008-08-09 Bill Maddox <maddox@google.com>
4562
4563 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4564 has not been set to a front-end-specific value.
4565
45662008-08-05 Doug Kwan <dougkwan@google.com>
4567
4568 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4569 build breakage.
4570
45712008-07-30 Bill Maddox <maddox@google.com>
4572
4573 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4574 Remove obsolete comments.
4575 (lto_read_decls): Remove initialization of deleted field data_in.global.
4576 Tidy up comments.
4577 (lto_main): Remove redundant initialization of section_hash_table.
4578 * lto-elf.c: Removed obsolete comments.
4579 * lto.h: Tidy up comments.
4580 * lto-symtab.c (lto_least_common_multiple): New function.
4581 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4582 Tidy up comments.
4583
45842008-07-25 Diego Novillo <dnovillo@google.com>
4585 Bill Maddox <maddox@google.com>
4586
4587 * lto.c: Re-order include files.
4588 Include lto-section-out.h.
4589 (preload_common_nodes): Add debugging output.
4590 Add new local INDEX_TABLE.
4591 Call preload_common_node.
4592 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4593
45942008-07-13 Bill Maddox <maddox@google.com>
4595
4596 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4597 unwanted scaling during pointer addition.
4598
45992008-07-11 Bill Maddox <maddox@google.com>
4600 Diego Novillo <dnovillo@google.com>
4601
4602 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4603 Make code const-correct.
4604 (lto_file_read): Fix C++ compatibility warnings.
4605 (lto_read_section_data): Fix C++ compatibility warnings.
4606 (lto_get_section_data): Use CONST_CAST to avoid warning when
4607 const pointer passed to free.
4608 * lto-elf.c (lto_elf_build_section_table): Fix C++
4609 compatibility warnings.
4610 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4611 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4612 (lto_get_current_out_file): Fix C++ compatibility warnings.
4613
46142008-07-11 Diego Novillo <dnovillo@google.com>
4615
4616 * Make-lang.in (lto-warn): Define.
4617
46182008-07-03 Simon Baldwin <simonb@google.com>
4619
4620 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4621 LTO_STREAM_DEBUGGING.
4622
46232008-06-27 Ollie Wild <aaw@google.com>
4624
4625 * lto-elf.c (lto-section-out.h): New include.
4626 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4627 and data members.
4628 (cached_file_attrs): New static variable.
4629 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4630 Use cached_file_attrs for checking bits.
4631 (lto_elf_build_section_table): Remove elf_file argument from
4632 lto_elf_get_shdr and lto_elf_free_shdr calls.
4633 (DEFINE_INIT_SHDR): New macro.
4634 (init_shdr32, init_shdr64): New functions defined via the
4635 DEFINE_INIT_SHDR macro.
4636 (lto_elf_begin_section_with_type): New function.
4637 (lto_elf_begin_section): New function.
4638 (lto_elf_append_data): New function.
4639 (lto_elf_end_section): New function.
4640 (DEFINE_VALIDATE_EHDR): New macro.
4641 (validate_ehdr32, validate_ehdr64): New functions defined via the
4642 DEFINE_VALIDATE_EHDR macro.
4643 (validate_file): New function.
4644 (DEFINE_INIT_EHDR): New macro.
4645 (init_ehdr32, init_ehdr64): New functions defined via the
4646 DEFINE_INIT_EHDR macro.
4647 (init_ehdr): New function.
4648 (lto_elf_file_open): Add support for writable files. Move some
4649 validation logic to validate_file.
4650 (lto_elf_file_close): Add support for writable files. Write file data
4651 and free data blocks.
4652 (current_out_file): New static variable.
4653 (lto_set_current_out_file): New function.
4654 (lto_get_current_out_file): New function.
4655 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4656 Add temporary initialization for testing ELF serialization.
4657 * lto.h (lto-section-out.h): New include.
4658 (struct lto_file_struct): Slight modification to comment.
4659 (lto_elf_file_open): Add writable parameter.
4660 (lto_elf_begin_section): New function declaration.
4661 (lto_elf_append_data): New function declaration.
4662 (lto_elf_end_section): New function declaration.
4663 (lto_set_current_out_file, lto_get_current_out_file): New function
4664 declarations.
4665 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4666 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4667 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4668 * Make-lang.in (LTO_H): Add lto-section-out.h.
4669
46702008-06-12 Ollie Wild <aaw@google.com>
4671
4672 * lto.h (struct lto_file_vtable_struct): Remove.
4673 (struct lto_file_struct): Remove vtable member.
4674 * lto-elf.c (lto_file_init): Remove vtable argument.
4675 (lto_elf_map_optional_lto_section): Remove.
4676 (lto_elf_unmap_section): Remove.
4677 (lto_elf_file_vtable): Remove.
4678 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4679 lto_file_init call.
4680 (lto_elf_find_section_data): Remove.
4681
46822008-06-11 Ollie Wild <aaw@google.com>
4683
4684 * lto.c (lto_file_read): Add const qualifier to data variable.
4685
46862008-06-11 Diego Novillo <dnovillo@google.com>
4687
4688 Merge from lto-streamber sub-branch.
4689
4690 2008-06-04 Ollie Wild <aaw@google.com>
4691
4692 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4693 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4694
4695 2008-05-28 Bill Maddox <maddox@google.com>
4696
4697 Replace the DWARF reader in the LTO front-end.
4698
4699 * lto.c: Include lto-tree-in.h, lto-tags.h.
4700 (enum DWARF2_class, DW_cl_constant, struct
4701 DWARF2_form_data, struct lto_context,
4702 lto_fd_init, lto_info_fd_init,
4703 lto_abbrev_fd_init, lto_info_fd_close,
4704 lto_file_init, lto_file_close,
4705 lto_file_corrupt_error, lto_abi_mismatch_error,
4706 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4707 lto_read_uleb128, lto_read_sleb128,
4708 lto_read_initial_length, lto_abbrev_read_attrs,
4709 lto_abbrev_read, lto_abbrev_read_lookup,
4710 lto_read_section_offset,
4711 lto_read_comp_unit_header, find_cu_for_offset,
4712 lto_get_file_name,
4713 lto_resolve_reference,lto_read_form,
4714 attribute_value_as_int,
4715 make_signed_host_wide_int,
4716 attribute_value_as_constant, lto_cache_hash,
4717 lto_cache_eq, lto_cache_store_DIE,
4718 lto_cache_lookup_DIE, lto_find_integral_type,
4719 lto_find_integral_type_1,
4720 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4721 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4722 lto_unsupported_attr_error, lto_get_identifier,
4723 lto_read_referenced_type_DIE,
4724 lto_read_compile_unit_DIE,
4725 lto_read_array_type_DIE,
4726 lto_read_structure_union_class_type_DIE,
4727 lto_read_enumerator_DIE,
4728 lto_read_enumeration_type_DIE,
4729 lto_read_only_for_child_DIEs,
4730 lto_read_only_for_child_DIEs,
4731 lto_read_member_DIE, lto_read_abbrev,
4732 lto_read_variable_formal_parameter_constant_DIE,
4733 lto_get_body): Removed.
4734 (preload_common_nodes): New function.
4735 (lto_read_decls): Convert for new global streamer.
4736 (lto_materialze_file_data,
4737 lto_read_subroutine_type_subprogram_die,
4738 lto_read_unspecified_parameters_DIE,
4739 lto_read_typedef_DIE,
4740 lto_read_pointer_reference_type_DIE,
4741 lto_read_subrange_type_DIE,
4742 lto_read_base_type_DIE,
4743 lto_read_const_volatile_restrict_type_DIE,
4744 lto_read_namespace_DIE,
4745 lto_read_unspecified_type_DIE, lto_read_DIE,
4746 lto_read_child_DIEs, lto_collect_child_DIEs):
4747 Removed.
4748 (lto_info_read, lto_set_cu_context): Removed.
4749 (lto_file_read): Convert for new global streamer.
4750 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4751 lto_resolve_var_ref, lto_resolve_fn_ref,
4752 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4753 lto_resolve_namespacedecl_ref): Removed.
4754 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4755 * lto-tree.h (lto_symtab_merge_var,
4756 lto_symtab_mergee_fun): Declare here.
4757 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4758 (lto_elf_file_open): Removed code to read DWARF debug sections.
4759 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4760 DWARF2_CompUnit, lto_die_ptr,
4761 lto_die_cache_entry, lto_fd, lto_info_fd,
4762 lto_abbrev_fd): Removed.
4763 (lto_file): Removed debug_info and debug_abbrev fields.
4764 (lto_ref): Removed.
4765 (lto_file_init, lto_file_close,
4766 lto_resolve_type_ref, lto_resolve_var_ref,
4767 lto_resolve_fn_ref, lto_resolve_field_ref,
4768 lto_resolve_typedecl_ref,
4769 lto_resolve_namespacedecl_ref,
4770 lto_get_file_name): Removed declarations.
4771 (lto_symtab_merge_var, lto_symtab_merge_fn):
4772 Declarations moved to lto-tree.h.
4773 * lto-symtab.c (lto_compatible_attributes_p):
4774 Lobotomize this, as it barfs on "Hello, world!".
4775 * lto-section-out.c: Include lto-tree-out.h.
4776 (lto_hash_global_slot_node,
4777 lto_eq_global_slot_node, preload_common_nodes,
4778 write_global_stream, write_global_references):
4779 New functions.
4780 (produce_asm_for_decls): Convert for new global streamer.
4781 * lto-section-out.h (lto_hash_global_slot_node,
4782 lto_eq_global_slot_node): Declare.
4783
3f8257db 47842008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4785 Jan Hubicka <jh@suse.cz>
4786
4787 * lto.c (sys/mman.h, tree-pass.h): New includes.
4788 (lto_materialize_constructors_and_inits,
4789 lto_materialize_function): Keeps length of section.
4790 (lto_materialize_cgraph): Removed.
4791 (lto_read_decls): Initialize fd field.
4792 (lto_file_read): Different return type and removed much code to
4793 lto_main.
4794 (page_mask): New variable.
4795 (lto_read_section_data, get_section_data, free_section_data): New
4796 functions.
4797 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4798 passes can get the section data.
4799
3f8257db 48002008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4801
4802 * lto.h (lto_read_decls): Made local.
4803 (lto_input_function_body, lto_input_constructors_and_inits,
4804 lto_input_cgraph): Declarations moved to lto-section-in.h.
4805 * lto-section-in.c: Moved to .. .
4806 * lto-cgraph-in.c: Ditto.
4807 * lto-section-in.h: Ditto.
4808 * lto-function-in.c: Ditto.
4809 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4810 (lto_insert_block): Removed.
4811 (LANG_HOOKS_INSERT_BLOCK): Removed.
4812 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4813 lto-section-in.o): Rules moved to lto/Makefile.in.
4814
4815
48162008-05-16 Ollie Wild <aaw@google.com>
4817
4818 * lto-lang.c (tree-inline.h): Include.
4819 (lto_post_options): New function.
4820 (LANG_HOOKS_POST_OPTIONS): Define.
4821 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4822 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4823
48242008-05-13 Diego Novillo <dnovillo@google.com>
4825
4826 * lto-function-in.c (input_ssa_names): Call
4827 make_ssa_name_fn instead of make_ssa_name.
4828
48292008-05-12 Diego Novillo <dnovillo@google.com>
4830
4831 * lto-cgraph-in.c (overwrite_node): Update references to
4832 inline summary fields.
4833 * lto-function-in.c (input_expr_operand): Do not handle
4834 STRUCT_FIELD_TAG.
4835
48362008-05-09 Ollie Wild <aaw@google.com>
4837
4838 * lang.opt: New file.
4839 * lto-lang.c (lto_init_options): New function.
4840 (lto_handle_option): New function.
4841 (lto_init): Move initialization of flag_unit_at_a_time to
4842 lto_init_options.
4843 (LANG_HOOKS_INIT_OPTIONS): Define.
4844 (LANG_HOOKS_HANDLE_OPTION): Define.
4845
48462008-04-29 Ollie Wild <aaw@google.com>
4847
4848 * lto.c (lto_read_namespace_DIE): New function.
4849 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4850 NAMESPACE_DECL DIE's.
4851 (lto_resolve_namespacedecl_ref): New function.
4852 * lto.h (lto_resolve_namespacedecl_ref): New function.
4853 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4854 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4855 and num_namespace_decls.
4856 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4857 * lto-lang.c (lto_init_ts): New function.
4858 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4859
48602008-04-16 Ollie Wild <aaw@google.com>
4861
4862 * lto-function-in.c (input_type_ref): Updated function description.
4863
48642008-04-16 Ollie Wild <aaw@google.com>
4865
4866 * lto-function-in.c (input_type_ref_1): New function.
4867 (input_type_ref): Split into two functions.
4868 (input_function): Add support for type contexts.
4869
48702008-04-16 Ollie Wild <aaw@google.com>
4871
4872 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4873 section name
4874
48752008-04-16 Ollie Wild <aaw@google.com>
4876
4877 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4878 list of supported languages.
4879
3f8257db 48802008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4881
4882 Merge with mainline @133491.
4883
3f8257db 48842008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4885 Jan Hubicka <jh@suse.cz>
4886
4887 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4888 fd->unmaterialized_fndecls.
4889 (lto_get_file_name, lto_materialize_cgraph): New function.
4890 (lto_materialize_constructors_and_inits,
4891 lto_materialize_function): Read info directly from elf file.
4892 (lto_file_read): Made local and initialize dictionary so that
4893 other lto sections can be read without reprocessing the elf file.
4894 (lto_main): Read all functions after all files have been processed
4895 for their types, globals and cgraph.
4896 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4897 dependencies.
4898 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4899 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4900 (lto_elf_read_symtab): Removed function.
4901 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4902 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4903 (lto_file_read): Made local.
4904 (lto_get_file_name, lto_elf_build_section_table,
4905 lto_input_cgraph):
4906 New function.
4907 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4908 New functions.
4909 (lto_read_decls): Get the file name.
4910 * lto-cgraph-in.c: New file.
4911 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4912 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4913 (input_labels): Fixed latent sizeof issue.
4914 (input_function): Build stmt array to set call sites into cgraph
4915 edges.
4916 (lto_read_body): Reset cfun->curr_properties.
4917 * lto_section_in.h (lto_section_slot): New structure.
4918 (section_hash_table.lto_file_decl_data): New field.
4919
4920
3f8257db 49212008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4922
4923 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4924 reconstruct static initializers.
4925 (lto_get_body, lto_materialize_function): Add lto_section_type as
4926 a parameter.
4927 (lto_materialize_constructors_and_inits,
4928 lto_materialize_file_data): New function.
4929 (lto_materialize_function,
4930 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4931 unmap_section and map_fn_body to map_section.
4932 (lto_set_cu_context): Process functions and static inits
4933 differently.
4934 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4935 lto/lto-section-in.o): Update dependencies.
4936 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4937 lto_section_type parameter.
4938 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4939 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4940 renamed the other two so that there is only one map function and
4941 one unmap function and each takes a section type parameter.
4942 (lto_read_function_body): Renamed to lto_input_function_body and
4943 added file_data parameter.
4944 (lto_read_var_init): Removed.
4945 (lto_input_constructors_and_inits): New function.
4946 * lto-section-in.c (lto_read_decls): New function.
4947 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4948 var_decls, type_decls, types to lto_file_decl_data.
4949 (input_type_ref, input_expr_operand, lto_read_body): Get
4950 field_decls, fn_decls, var_decls, type_decls, types from different
4951 structure.
4952 (input_globals, input_constructor, lto_read_var_init): Removed.
4953 (input_constructors_or_inits): New function.
4954 (lto_read_function_body, lto_input_constructors_and_inits):
4955 Renamed to lto_input_function_body and takes file_data parameter.
4956 * lto-section-in.h (lto_file_decl_data): New structure.
4957
3f8257db 49582008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4959
4960 * lto-function-in.c (input_globals.c): Changed input type to
4961 lto_function_header.
4962 (input_bb): Removed code to deserialize the stmt number.
4963 (input_function): Renumber all stmts after they are input.
4964 (lto_read_body, lto_read_function_body, lto_read_var_init):
4965 Changed to used new header format and enum section_type.
4966 *lto-lang.c (success): Removed.
4967
49682008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4969
4970 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4971 (lto_elf_free_sym): Likewise.
4972
4973 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4974 (lto_elf_build_init): Likewise.
4975
3f8257db 49762008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4977
4978 * lto-read.c: Renamed to lto-function-in.c.
4979 (input_1_unsigned): Moved to lto-section-in.c and renamed
4980 lto_input_1_unsigned.
4981 (input_uleb128): Moved to lto-section-in.c and renamed
4982 lto_input_uleb128.
4983 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4984 lto_input_widest_uint_uleb128.
4985 (input_sleb128): Moved to lto-section-in.c and renamed
4986 lto_input_sleb128.
4987 (input_integer): Moved to lto-section-in.c and renamed
4988 lto_input_integer.
4989 (debug_in_fun): Moved to lto-section-in.c and renamed
4990 lto_debug_in_fun.
4991 (input_block): Moved to lto-section-in.h and renamed
4992 lto_input_block.
4993 (input_expr_operand): Fixed to allow lists with more than one
4994 element.
4995 * lto-section-in.h: New file.
4996 * lto-section-in.c: New file with changes from above.
4997 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4998 (lto-section-in.o): New rule.
4999
50002007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5001
5002 * lto-read.c (input_expr_operand): Mark static and external
5003 VAR_DECLs as needed.
5004
50052007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5006
5007 * lto-read.c (input_integer): Use the correct shift amount.
5008
50092007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5010
5011 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5012 (LANG_HOOKS_NAME): Define.
5013
50142007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5015
5016 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5017 original function to...
5018 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5019 don't have a base type.
5020 (lto_read_enumeration_type_DIE): Examine the values of the
5021 enumeration to determine whether we can use an unsigned type for
5022 the base type of the enumeration.
5023
50242007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5025
5026 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5027 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5028
50292007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5030
5031 * lto-lang.c (lto_types_compatible_p): New function.
5032 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5033
50342007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5035 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5036
5037 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5038 (input_local_vars): Read in DECL_INITIAL and context for local
5039 statics that need to be put in unexpanded_vars_list.
5040
50412007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5042
5043 * lto-read.c (input_real): Use a separate null-terminated buffer
5044 for calling real_from_string.
5045 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5046 tell cgraph that it's needed.
5047
50482007-12-19 Doug Kwan <dougkwan@google.com>
5049
5050 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5051
50522007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5053
5054 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5055 (lto_file_read): Reset the members of 'context' every time we read
5056 a toplevel DIE, with special attention to last_param_type.
5057
50582007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5059
5060 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5061 'declaration'. Set the assembler name for non-public functions.
5062
3f8257db 50632007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5064
5065 * lto_read.c (data_in.unexpanded_indexes): New array.
5066 (input_local_var): Added code to read in unexpanded_var_list
5067 indexes for variables. Only read in DECL_CHAIN field for
5068 parameters.
5069 (input_local_vars): Added code to rebuild unexpanded_var_list in
5070 order using unexpanded_indexes.
5071 (input_function): Added code to set DECL_CONTEXT for functions.
5072
50732007-12-13 Doug Kwan <dougkwan@google.com>
5074
5075 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5076 in pointer and reference types.
5077
50782007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5079
5080 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5081 RESULT_DECL.
5082
50832007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5084
5085 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5086 already read the DIE.
5087 (lto_get_body): New function, split out from...
5088 (lto_materialize_function): ...here. Call it.
5089 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5090 determine DECL_EXTERNAL.
5091 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5092 FUNCTION_DECLs when necessary. Use the type of the actual
5093 function definition if we are unable to easily merge types. Ignore
5094 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5095 necessary.
5096
50972007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5098
5099 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5100
51012007-12-12 Bill Maddox <maddox@google.com>
5102
5103 Revert
5104 2007-12-07 Bill Maddox <maddox@google.com>
5105
5106 * lto.c (lto_str_fd_init): New function.
5107 (lto_str_fd_close): New function.
5108 (lto_file_init): Call lto_str_fd_init.
5109 (lto_file_close): Call lto_str_fd_close.
5110 (lto_str_read): New function. Read debug string table.
5111 (lto_str_lookup): New function. Get string for debug
5112 string table offset.
5113 (lto_read_form): Recognize DW_FORM_strp.
5114 (lto_file_read): Invoke lto_str_read.
5115
5116 * lto-elf.c (lto_elf_file_open): Read raw section data
5117 for the .debug_str section, if present.
5118
5119 * lto.h (struct lto_str_fd_struct): New struct.
5120 (struct lto_file_struct): Added new field DEBUG_STR
5121 to hold the file descriptor for the debug string table.
5122
51232007-12-07 Bill Maddox <maddox@google.com>
5124
5125 * lto.c (lto_str_fd_init): New function.
5126 (lto_str_fd_close): New function.
5127 (lto_file_init): Call lto_str_fd_init.
5128 (lto_file_close): Call lto_str_fd_close.
5129 (lto_str_read): New function. Read debug string table.
5130 (lto_str_lookup): New function. Get string for debug
5131 string table offset.
5132 (lto_read_form): Recognize DW_FORM_strp.
5133 (lto_file_read): Invoke lto_str_read.
5134
5135 * lto-elf.c (lto_elf_file_open): Read raw section data
5136 for the .debug_str section, if present.
5137
5138 * lto.h (struct lto_str_fd_struct): New struct.
5139 (struct lto_file_struct): Added new field DEBUG_STR
5140 to hold the file descriptor for the debug string table.
5141
51422007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5143
5144 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5145 Grow the basic_block_info and label_to_block_map vectors if
5146 necessary. Read in the block chain.
5147
51482007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5149
5150 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5151
51522007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5153
5154 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5155
51562007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5157
5158 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5159 (lto_read_body): Don't declare PROP_alias.
5160
51612007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5162
5163 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5164 argument type information.
5165
51662007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5167
5168 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5169 TREE_THIS_VOLATILE if the associated type is a volatile type.
5170 (lto_materialize_function): Remove call to init_ssa_operands.
5171 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5172 variable when reading an SSA_NAME. Do the same when reading a
5173 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5174 (input_cfg): Call init_ssa_operands.
5175 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5176 Move call to init_tree_ssa...
5177 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5178 add_referenced_var on any variables referenced from the body of the
5179 function. Inform the rest of the compiler we are in SSA form and
5180 inform later passes about the current properties.
5181
51822007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5183
5184 * lto.c (lto_materialize_function): Add FIXME.
5185
51862007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5187
5188 * lto-lang.c (enum built_in_attribute): New enum.
5189 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5190 built_in_attributes): New variables.
5191 (def_builtin_1): New function.
5192 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5193
51942007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5195
5196 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5197 DECL_SOURCE_LOCATION for debugging purposes.
5198 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5199 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5200 laying out the decl until later.
5201 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5202 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5203 TREE_ADDRESSABLE.
5204 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5205 operand of an ADDR_EXPR.
5206 * lto-lang.c (enum lto_builtin_type): New enum.
5207 (builtin_type): New typedef.
5208 (builtin_types, string_type_node, const_string_type_node,
5209 wint_type_node, intmax_type_node, uintmax_type_node,
5210 signed_size_type_node): New variables.
5211 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5212 lto_build_c_type_nodes): New functions.
5213 (lto_init): Initialize builtin types.
5214 (lto_set_decl_assembler_name): Let the target machine mangle the
5215 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5216
52172007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5218
5219 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5220 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5221 the type is a constant type. Set the assembler name and inform
5222 the rest of the compiler about the new decl if the decl is not
5223 public.
5224 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5225 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5226 try to read in function bodies for functions that already have bodies.
5227 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5228 equivalency.
5229 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5230 Check for whether we matched a builtin function type before calling
5231 lto_same_type_p on the generated type. Permit cases where the
5232 declaration of an array is unbounded, but the definition is bounded.
5233 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5234 DECL_SIZE_UNIT if necessary.
5235
3f8257db 52362007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5237
5238 * lto-read.c (input_expr_operand): Get types right
5239 for COMPLEX_CST.
5240
3f8257db 52412007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5242
5243 * lto-read.c (make_new_block, input_cfg): Properly set
5244 n_basic_blocks.
5245
52462007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5247
5248 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5249 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5250
52512007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5252
5253 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5254 construct the integer type for bitfields.
5255
3f8257db 52562007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5257
5258 * lto-read.c (data_in.current_node_has_loc): Removed.
5259 (input_line_info): Returns true if node needs line set.
5260 (set_line_info): Always sets line if called.
5261 (clear_line_info): Removed reference to current_node_needs_loc.
5262 (input_expr_operand): Keeps track locally if current node needs a loc.
5263 (input_local_var): Added code to handle DECL_INITIAL for
5264 static local vars. Only set loc if necessary.
5265
52662007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5267
5268 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5269 DECL_CONTEXT.
5270
52712007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5272
5273 * lto.c: Include langhooks.h.
5274 (lto_find_integral_type): Rework logic to handle the case where
5275 got_byte_size is true, but the bitsize requested and that of the
5276 base_type doesn't match.
5277 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5278 asm_name if we are creating a VAR_DECL.
5279 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5280 definition.
5281 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5282 function reference and use the builtin's decl if so. Set the
5283 DECL_CONTEXT of the RESULT_DECL for the function.
5284 * lto-lang.c (registered_builtin_fndecls): New variable.
5285 (lto_getdecls): Return it.
5286 (lto_builtin_function): Chain the new decl onto
5287 registered_builtin_fndecls.
5288
3f8257db 52892007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5290
5291 * lto-read.c (process_tree_flags, lto_static_init_local):
5292 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5293 (input_line_info, clear_line_info): Fixed new line number code.
5294 (input_expr_operand): Added type to SWITCH_EXPR.
5295 (lto_read_body): Properly initialized data_in.
5296 Clear line info when leaving.
5297
52982007-11-13 Diego Novillo <dnovillo@google.com>
5299
5300 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5301 Initialize ARTIFICIAL.
5302 (lto_read_subroutine_type_subprogram_DIE): Initialize
5303 SAVED_SCOPE.
5304 * lto-read.c (set_line_info): Remove ; from calls to
5305 LINEMAP_POSITION_FOR_COLUMN.
5306
3f8257db 53072007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5308
5309 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5310 (input_expr_operand, input_local_var): Renamed get_type_ref to
5311 input_type_ref.
5312 (input_expr_operand): Get the types correct for
5313 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5314
53152007-11-13 Doug Kwan <dougkwan@google.com>
5316
5317 * lto-read.c (input_widest_uint_uleb128): New function.
5318 (input_tree_flags, process_tree_flags, input_line_info,
5319 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5320 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5321 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5322 (lto_static_init_local): Add code to assert that lto_flags_type is
5323 wide enough.
5324
53252007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5326
5327 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5328 (lto_read_subroutine_type_subprogram_DIE): Handle
5329 DW_AT_static_link and DW_AT_specification. Return the
5330 specification if present.
5331 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5332
53332007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5334
5335 * lto-lang.c: Include target.h.
5336 (registered_builtin_types): New variable.
5337 (lto_type_for_mode): Increase number of modes handled.
5338 (lto_builtin_function): Fix argument list and return the decl.
5339 (lto_register_builtin_type): New function.
5340 (lto_init): Initialize target builtins and language-independent
5341 nodes.
5342 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5343
3f8257db 53442007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5345
5346 * lto-read.c (input_expr_operand): Added code to properly handle
5347 index filed. Added new RANGE_EXPR case.
5348
3f8257db 53492007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5350
5351 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5352 (data_in): Added current_node_has_loc field.
5353 (input_line_info, set_line_info, clear_line_info): Added a support
5354 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5355 did not have on on the source side.
5356 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5357 numbers too.
5358
53592007-11-09 Doug Kwan <dougkwan@google.com>
5360
5361 * lto-read.c (input_expr_operand): Change type of operand 2 of
5362 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5363
53642007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5365
5366 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5367 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5368 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5369 the new decl we are creating. Move informing the middle end about
5370 the new decl to...
5371 (lto_main): ...here. Inform the middle end about global variables
5372 after we have read in all the input files.
5373 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5374 variables with internal linkage, so delete the check for internal
5375 linkage. Combine TREE_PUBLIC flags.
5376
53772007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5378
5379 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5380 DW_AT_decl_line.
5381 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5382 builtin specially. Move check for attribute compatibility
5383 earlier.
5384
53852007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5386
5387 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5388 * config-lang.in (gtfiles): Add lto.h and lto.c.
5389 * lto-elf.c: Include ggc.h.
5390 (lto_elf_file_open): Allocate elf_file from GC memory.
5391 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5392 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5393 in GC memory.
5394 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5395 (lto_file_close): Free file from GC memory.
5396 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5397 (lto_read_member_DIE): Fix declaration.
5398 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5399 in GC memory.
5400 (current_lto_file): New variable.
5401 (lto_main): Use it.
5402 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5403 lto_die_cache_entry): Move to...
5404 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5405 declarations accordingly.
5406 (struct lto_file_struct): Declare.
5407 (lto_file_vtable): Use it instead of lto_file.
5408
54092007-11-06 Alon Dayan <alond@il.ibm.com>
3f8257db 5410 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5411
5412 * lto-read.c (process_flags, lto_static_init_local):
5413 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5414 change global array num_flags_for_code to flags_length_for_code.
5415 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5416
54172007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5418
5419 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5420 layout functions to compute information about the newly constructed
5421 type.
5422
54232007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5424
5425 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5426 case to use DECL_RESULT if necessary.
5427
3f8257db 54282007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5429
5430 * lto-read.c (input_tree_list): Removed.
5431 (input_tree_flags): Added parameter to force flags no matter what
5432 tree code.
5433 (input_expr_operand): Added parameter to input_tree_flags.
5434 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5435 input_expr_operand rather than input_tree_lists.
5436 (input_local_var): Use input_expr_operand to read attributes
5437 rather then input_tree_list.
5438 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5439
54402007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5441
5442 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5443 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5444 TYPE_DECL for it.
5445 * lto-read.c (lto_read_body): Use correct sizes for calculating
5446 type_decls_offset and types_offset.
5447
54482007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5449
5450 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5451 with GENERIC_NEXT.
5452 * config-lang.in (gtfiles): Add lto-lang.c.
5453 * lto-lang.c: Include gt-lto-lto-lang.h.
5454 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5455 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5456 (lto/lto-read.o): Likewise.
5457
3f8257db 54582007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5459
5460 * lto-read.c (data_in): Added type_decls and current_col fields.
5461 (string_slot): New type to hold canonized file name.
5462 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5463 input_line_info, set_line_info, clear_line_info): New functions.
5464 (file_name_hash_table): New hash table.
5465 (input_local_var, input_labels, input_local_vars_index,
5466 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5467 (input_uleb128): Changed type of byte var.
5468 (input_expr_operand): Large number of changes to get line numbers
5469 correct. Added TYPE_DECL case.
5470 (input_globals): Added code to get TYPE_DECLs processed.
5471 (input_local_var): Added code to process line numbers and
5472 TREE_CHAIN and DECL_CONTEXT.
5473 (input_function, input_constructor): Added call to
5474 clear_line_number.
5475 (lto_static_init_local): Added code to get line numbers correct.
5476 (lto_read_body): Added code to get TYPE_DECLS read and to change
5477 parameters to the calls above that had their parms reorganized.
5478
5479
54802007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5481
5482 * lto.h (lto_resolve_typedecl_ref): Declare.
5483 * lto.c (lto_resolve_typedecl_ref): New function.
5484
54852007-10-29 Mark Mitchell <mark@codesourcery.com>
5486 Nathan Froyd <froydnj@codesourcery.com>
5487
5488 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5489 DIEs even if we find an abstract origin for this DIE.
5490
54912007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5492
5493 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5494 RESULT_DECL slightly earlier. Only remember the decl for later
5495 if we successfully merge declarations.
5496
3f8257db 54972007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5498
5499 * lto-read.c (input_expr_operand): Give label_values the proper
5500 context and provide switch statements with a default type.
5501
55022007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5503
5504 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5505 * lto.c (lto_materialize_function): ...to here.
5506
55072007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5508
5509 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5510 * lto.c (lto_info_fd_init): Initialize it.
5511 (lto_info_fd_close): Free it.
5512 (lto_materialize_function): New function.
5513 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5514 unmaterialized_fndecls.
5515 (lto_file_read): Read in all the function bodies after we have read
5516 all of the DWARF info.
5517 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5518 reading a function body.
5519
3f8257db 55202007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5521
5522 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5523 semetric with output_tree_flags. Added call to log flags.
5524 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5525 type issues to make everything consistent with flags being
5526 unsigned HOST_WIDE_INTS.
5527 (input_expr_operand): Added call to
5528 recompute_tree_invariant_for_addr_expr.
5529 (input_local_var): Added debugging for tree_chains. Now calls
5530 input_tree_flags.
5531 (input_phi): Made flags unsigned HOST_WIDE_INT.
5532 (input_ssa_names): Now calls input_tree_flags.
5533 (lto_read_body): Now sets cfun.
5534 (lto_read_function_body): Now sets current_function_pointer.
5535
55362007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5537
5538 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5539 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5540 inspecting fields within.
5541 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5542 handle this appropriately.
5543
55442007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5545
5546 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5547 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5548 both DW_AT_abstract_origin and DW_AT_specification.
5549 (lto_read_subroutine_type_subprogram_DIE): Handle
5550 DW_AT_abstract_origin.
5551 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5552 (lto_read_DIE_at_ptr): Define as static to match declaration.
5553 Lookup the PTR in the cache before reading it from the file.
5554 (lto_resolve_var_ref): Adjust accordingly.
5555 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5556 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5557
55582007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5559
5560 * lto.c (lto_read_DIE_at_ptr): New function.
5561 (lto_resolve_var_ref): Use it.
5562 (lto_resolve_fn_ref): Use it.
5563 (lto_resolve_field_ref): Use it.
5564 (lto_read_variable_formal_parameter_constant_DIE): Follow
5565 DW_AT_specification and return the associated decl when appropriate.
5566
55672007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5568
5569 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5570 Implement for scalar integer modes.
5571 (lto_init): Initialize size_type_node.
5572
3f8257db 55732007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5574
5575 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5576 (input_local_var): Add chaining for params.
5577 (input_ssa_names): Add cfun parameter.
5578 (input_function): Remove unnecessary else.
5579
55802007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5581
5582 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5583 (lto_resolve_var_ref): Use proper types.
5584 (lto_resolve_fn_ref): Likewise.
5585 (lto_resolve_field_ref): Likewise.
5586
55872007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5588
5589 * lto-read.c (input_expr_operand): Remove case.
5590
55912007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5592
5593 * lto.c (lto_read_only_for_child_DIEs): New function.
5594 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5595 * lto-elf.c (lto_elf_map_lto_section): Remove.
5596 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5597 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5598 SSA_NAME. Add missing case for mechanical codes.
5599 (input_cfg): Use basic_block_info_for_function instead of
5600 basic_block_info.
5601
3f8257db 56022007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5603
5604 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5605 (input_list): Renamed input_tree_list and modified to follow same
5606 protocol as lto-function-out.c:output_tree_list.
5607 (input_expr_operand): Make asm operands use input_tree_list.
5608 (input_local_var): Now uses input_tree_list.
5609 (lto_read_body): Change placement for setting context of debug_labels.
5610
5611
3f8257db 56122007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5613
5614 * lto-read.c (input_real): Output debugging in proper order.
5615 (input_integer): Compute bit lengths properly.
5616 (input_list): Clean up declaration.
5617 (input_expr_operand): Change calls to input_real to match fix.
5618 Make reading of LTO_bit_field_ref1 match output.
5619 (input_local_var): Make reading of attributes match what is being
5620 written.
5621 (dump_debug_stream): Also print char in hex.
5622 (debug_out_fun): Fix signed unsigned mismatch.
5623
56242007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5625
5626 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5627 DW_AT_GNU_vector specially, as they are not contiguous with the
5628 specified set of attribute names. Use class_mask to check for
5629 errors at the end of the function
5630 (lto_resolve_var_ref): Read the DIE if it is not cached.
5631 (lto_resolve_fn_ref): Likewise.
5632 (lto_resolve_field_ref): Likewise.
5633
56342007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5635
5636 * lto.c: Include dwarf2out.h.
5637 (lto_cache_store_DIE): Assert that we never change the value.
5638 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5639 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5640 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5641 sensible type instead.
5642 (lto_read_structure_union_class_type_DIE): Store the newly
5643 created type prior to reading the members of the structure to
5644 avoid infinite recursion. Avoid computing types and alignments
5645 for structures whose sizes are unknown.
5646 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5647 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5648 DW_AT_const_value, and DW_AT_specification.
5649 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5650 Return early if we have already constructed the function type.
5651 (lto_read_typedef_DIE): Check to see if the type has been cached
5652 already. Cache the type before reading any children.
5653 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5654 (lto_read_DIE): Unset context->skip_non_parameters around reading
5655 the DIE.
5656 (lto_resolve_fn_ref): Delete trailing whitespace.
5657
3f8257db 56582007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5659
5660 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5661
56622007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5663
5664 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5665
56662007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5667
5668 * lto-lang.c (signed_and_unsigned_types): New variable.
5669 (lto_type_for_size): Consult signed_and_unsigned_types to find
5670 an approprite type, creating it if necessary.
5671 (lto_set_decl_assembler_name): Add actual method body.
5672
56732007-09-06 Jim Blandy <jimb@codesourcery.com>
5674
5675 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5676 can't find a var init for this variable, leave its DECL_INITIAL.
5677 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5678 lto_elf_map_fn_body.
5679 (lto_map_lto_section): New function.
5680 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5681 bodies, and lto_elf_map_optional_lto_section for variable
5682 initializers.
5683 (lto_elf_find_section_data): Quietly return NULL if the section is
5684 missing.
5685 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5686
5687 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5688
5689 * lto-read.c (lto_read_body): Doc fix.
5690
3f8257db 56912007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5692
5693 * lto-read.c (fun_in): Renamed to data_in.
5694 (input_expr_operand, input_local_var, input_string_internal,
5695 input_string, input_real, input_list, get_label_decl,
5696 get_type_ref, input_expr_operand, input_globals, input_labels,
5697 input_local_vars_index, input_local_var, input_local_vars,
5698 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5699 (input_constructor): New function.
5700 (lto_read_function_body): Renamed to lto_read_body and generalized
5701 to handle both functions and constructors.
5702 (lto_read_function_body, lto_read_var_init): New function.
5703
5704
3f8257db 57052007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5706
5707 * lto-read.c (input_expr_operand): Assert that there really is a
5708 FUNCTION_DECL.
5709 (input_globals): Removed checks on 0 section.
5710
3f8257db 57112007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5712
5713 * lto-read.c (fun_in): Added local_decls_index and
5714 local_decls_index_d.
5715 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5716 (input_globals): Enabled code to handle FIELD_DECLs.
5717 (input_local_vars_index, input_local_vars): New function.
5718 (input_local_var): Changed to allow locals to be input randomly.
5719 (lto_read_function_body): Added code to input the
5720 local_decls_index and to free various structures.
5721
57222007-08-17 Jim Blandy <jimb@codesourcery.com>
5723
5724 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5725 ATTRIBUTE_UNUSED from 'die' formal.
5726
5727 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5728 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5729 (input_list): Fix type of 'tag'.
5730 (input_expr_operand): Fix type of 'tag' argument. Update
5731 declaration. Fix type of 'ctag'. Add default case to switch,
5732 since the type of the switched value is now an enum.
5733 (input_local_vars): Fix type of 'tag'.
5734 (input_bb): Fix type of 'tag' argument.
5735 (input_function): Fix type of 'tag' argument.
5736
57372007-08-16 Jim Blandy <jimb@codesourcery.com>
5738
5739 * lto.c (lto_read_member_DIE): Record the tree we create in
5740 fd->die_cache. (Our 'die' argument is no longer unused.)
5741 (lto_resolve_field_ref): New function.
5742 * lto.h (lto_resolve_field_ref): New declaration.
5743
57442007-08-15 Jim Blandy <jimb@codesourcery.com>
5745
5746 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5747
57482007-08-07 Jim Blandy <jimb@codesourcery.com>
5749
5750 * lto.c (lto_read_form): Complete attr_classes table.
5751 (DWARF2_form_data): Doc fix.
5752
57532007-08-05 Mark Mitchell <mark@codesourcery.com>
5754
5755 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5756 and unmap_var_init.
5757 (lto_read_var_init): Declare.
5758 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5759 interface for reading variable initializers.
5760 * lto-elf.c (lto_elf_read_var_init): Remove.
5761 (lto_elf_file_vtable): Update initializer.
5762 (lto_elf_read_var_init): Add comment about unused-ness.
5763 * lto-read.c (lto_read_var_init): New.
5764
5765 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5766
3f8257db 57672007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5768
5769 * lto-read.c (lto_read_function_body): Moved declaration of fn
5770 outside of ifdef.
5771
3f8257db 57722007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5773
5774 * lto-read.c (input_uleb128, input_string_internal, input_real,
5775 input_integer, input_record_start, input_list, get_type_ref,
5776 input_flags, input_expr_operand, input_expr_operand,
5777 input_expr_operand, input_local_vars, input_cfg, input_phi,
5778 input_ssa_names, input_bb, input_function): Added semicolons.
5779
5780
3f8257db 57812007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5782
5783 * lto-read.c (input_globals): Remove debugging.
5784 (input_function): Set DECL_ARGUMENTS.
5785
3f8257db 57862007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5787
5788 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5789 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5790 (input_phi): Made work with operands other than SSA_NAMES and
5791 fixed processing of flags.
5792 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5793 (input_flags): New function.
5794 * lto-lang.c (lto_init): Changed state of in_lto_p.
5795
5796
57972007-07-24 Mark Mitchell <mark@codesourcery.com>
5798
5799 * lto-tree.h (lto_varargs_cookie): Remove.
5800 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5801 skip_non_parameters, skip_parameters.
5802 (lto_varargs_cookie): Remove.
5803 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5804 parameter types.
5805 (lto_read_abbrev): New function.
5806 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5807 child DIEs.
5808 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5809 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5810 (lto_file_read): Initialize new context fields.
5811 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5812 (lto_unsigned_type): Remove.
5813 (lto_signed_type): Likewise.
5814 (lto_signed_or_unsigned_type): Likewise.
5815 (lto_init): Do not create lto_varargs_cookie.
5816 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5817 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5818 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5819
58202007-07-19 Jan Hubicka <jh@suse.cz>
5821
5822 * lto-read.c (lto_read_function_body): Produce empty scope block
5823 to avoid crash.
5824
58252007-07-18 Mark Mitchell <mark@codesourcery.com>
5826
5827 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5828 process local variables.
5829 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5830
3f8257db 58312007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5832
5833 * lto-read.c (input_list, input_expr_operand): Added struct
5834 function parameter.
5835 (init_cfg, finalize_cfg): Removed function.
5836 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5837 (input_labels, input_local_vars): Now takes input_block parameter rather than
5838 synthsyzing it.
5839 (input_cfg, input_phi, input_ssa_names): New functions.
5840 (input_bb): Now passes in input_blocks. Does not construct cfg
5841 and processes the list of phi functions.
5842 (input_function): Now builds both the cfg and ssa_names table.
5843 (lto_read_function_body): Processes new header fields to construct
5844 streams for the ssa_names and cfg and their debugging.
5845 * lto/lto-lang.c (lto_init): Set in_lto_p.
5846
5847
58482007-06-28 Mark Mitchell <mark@codesourcery.com>
5849
5850 * lto.h (lto_file_vtable): Add read_var_init.
5851 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5852 initializers.
5853 (lto_main): Remove bogus asserts.
5854 * lto-elf.c (tm.h): Include it.
5855 (libiberty.y): Likewise.
5856 (lto_elf_file): Add strtab and symtab. Rename
5857 string_table_section_index to sec_strtab.
5858 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5859 (lto_elf_get_shdr): New function.
5860 (lto_elf_free_shdr): Likewise.
5861 (lto_elf_find_section_data): Use them.
5862 (lto_elf_read_symtab): New function.
5863 (lto_elf_lookup_sym): Likewise.
5864 (lto_elf_free_sym): Likewise.
5865 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5866 (lto_elf_built_init): New function.
5867 (lto_elf_read_var_init): Likewise.
5868 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5869
3f8257db 58702007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5871
5872 * lto-read (make_new_block): Initialize the stmt_list.
5873 (lto_static_init_local): Add debugging for missing codes.
5874
58752007-06-26 Mark Mitchell <mark@codesourcery.com>
5876
5877 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5878 unprototyped functions.
5879
58802007-06-23 Mark Mitchell <mark@codesourcery.com>
5881
5882 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5883 Handle DW_AT_MIPS_linkage_name.
5884 (lto_read_subroutine_type_subprogram): Likewise. Correct
5885 compilation errors.
5886 (lto_main): Remove incorrect assertions.
5887 * lto-symbtab.c: Build function types out of TREE_LISTs.
5888
5889 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5890
5891 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5892
3f8257db 58932007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5894
5895 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5896 dummy since ggc does not like empty structs.
5897 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5898 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5899 expr->common to expr->base.
5900 (make_new_block): Moved stmt_list to proper place.
5901
5902
59032007-03-14 Robert Kennedy <jimbob@google.com>
5904
5905 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5906 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5907 assembler name from DWARF.
5908 * lto-lang.c (lto_set_decl_assembler_name) New function.
5909
59102006-09-10 Mark Mitchell <mark@codesourcery.com>
5911
5912 * lto.h (lto_file_vtable): New structure.
5913 (lto_file): Add vtable pointer.
5914 (lto_file_init): Add vtable paramter.
5915 (lto_read_function_body): New function.
5916 (lto_symtab_merge_fn): New function.
5917 * lto.c (lto_file_init): Add vtable parameter.
5918 (lto_read_form): Fill in entries for DW_AT_prototyped,
5919 DW_AT_frame_base.
5920 (lto_read_subroutine_type_subprogram_DIE): New function.
5921 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5922 DW_TAG_subprogram.
5923 * lto-elf.c (lto_elf_vile_vtable): New variable.
5924 (lto_elf_file_open): Pass it to lto_file_init.
5925 (lto_elf_map_fn_body): New function.
5926 (lto_elf_unmap_fn_body): Likewise.
5927 * lto-read.c: New file.
5928 * lto-symtab.c (lto_symtab_merge_fn): New function.
5929 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5930 tree_rest_of_compilation.
5931 * Make-lang.in (LTO_OBJS): Add lto-read.o
5932 (lto-read.o): New target.
5933
59342006-09-03 Mark Mitchell <mark@codesourcery.com>
5935
5936 * lto.c (<inttypes.h>): Don't include it.
5937 (lto_context): Don't typedef it.
5938 (lto_resolve_reference): New function.
5939 (lto_read_form): Use it.
5940 (lto_resolve_type_ref): New function.
5941 (lto_resolve_var_ref): Likewise.
5942 (lto_resolve_fn_ref): Likewise.
5943 * lto.h (<inttypes.h>): Include it.
5944 (lto_context): New type.
5945 (lto_ref): New structure.
5946 (lto_resolve_type_ref): Declare.
5947 (lto_resolve_var_ref): Likewise.
5948 (lto_resolve_fn_ref): Likewise.
5949
59502006-08-18 Mark Mitchell <mark@codesourcery.com>
5951
5952 * lang-specs.h: New file.
5953
59542006-08-14 Mark Mitchell <mark@codesourcery.com>
5955
5956 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5957 (lto_info_fd_close): Deallocate it.
5958 (lto_die_cache_entry): New structure.
5959 (lto_cache_hash): New function.
5960 (lto_cache_eq): Likewise.
5961 (lto_cache_store_DIE): Likewise.
5962 (lto_cache_lookup_DIE): Likewise.
5963 (lto_read_referenced_type_DIE): Use the cache.
5964 (lto_read_pointer_type_DIE): Robustify.
5965 (lto_read_DIE): Use the cache.
5966 * lto.h (hashtab.h): Include.
5967 (lto_info_fd): Add DIE cache.
5968 * Make-lang.in (LTO_H): New variable.
5969 (lto/lto-lang.o): Use LTO_H.
5970 (lto/lto-elf.o): Likewise.
5971 (lto/lto-symtab.o): Likewise.
5972
59732006-07-09 Mark Mitchell <mark@codesourcery.com>
5974
5975 * lto.c (lto_abi_mismatch_error): New function.
5976 (lto_abbrev_read): Initialize num_abbrevs.
5977 (lto_read_form): Specify allowed form classes for
5978 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5979 (lto_read_variable_formal_parameter_constant_DIE): Handle
5980 DW_AT_declaration. Call lto_symtab_merge_var.
5981 (lto_read_pointer_type_DIE): New function.
5982 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5983 not creat TYPE_DECLs for types that already have them.
5984 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5985 (lto_set_cu_context): Make cu_start point to the header, not the
5986 first DIE.
5987 (lto_file_read): Adjust for change to lto_set_cu_context.
5988 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5989 (lto/lto-symtab.o): New rule.
5990 * lto-tree.h (lang_identifier): Add decl field.
5991 (LANG_IDENTIFIER_CAST): New macro.
5992 (LTO_IDENTIFIER_DECL): Likewise.
5993 (lto_symtab_merge_var): Declare.
5994 * lto-symtab.c: New file.
5995
59962006-07-02 Daniel Berlin <dberlin@dberlin.org>
5997
5998 * lto.c (lto_context): Add current_cu and info_fd members.
5999 (DWARF2_CompUnit): New structure.
6000 (lto_read_DIE): Take lto_info_fd *.
6001 (lto_read_child_DIEs): Ditto.
6002 (lto_file_corrupt_error): Constify argument.
6003 (lto_set_cu_context): New function
6004 (lto_info_fd_init): Ditto.
6005 (lto_info_fd_close): Ditto.
6006 (lto_file_init): Use lto_info_fd_init.
6007 (lto_file_close): Use lto_info_fd_close.
6008 (lto_read_initial_length): Pass in pointer to header size.
6009 (lto_read_comp_unit_header): Correct cu_length to
6010 real length from beginning of header. Take lto_info_fd * as
6011 argument.
6012 (find_cu_for_offset): New function.
6013 (lto_read_form): Change first argument to lto_info_fd *.
6014 Add FORM_CONTEXT argument.
6015 Handle DW_FORM_ref_addr.
6016 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
6017 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6018 Swap contexts if necessary for form.
6019 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6020 lto_file_corrupt_error.
6021 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6022 (lto_read_referenced_type_DIE): Change first argument to
6023 lto_info_fd *. Access lto_fd fields through base pointer.
6024 (lto_read_compile_unit_DIE): Change first argument to an
6025 lto_info_fd *.
6026 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6027 (lto_read_base_type_DIE): Ditto.
6028 (lto_read_child_DIEs): Ditto.
6029 (lto_read_DIE): Ditto. Change type of function pointer.
6030 (lto_info_read): New function.
6031 (lto_set_cu_context): Ditto.
6032 (lto_file_read): Use lto_info_read, walk resulting CU's
6033 (lto_main): Update for lto_info_fd change.
6034 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6035 necessary.
6036 * lto.h (DWARF2_CompUnit): New structure.
6037 (lto_info_fd): Ditto.
6038 (lto_file): Change debug_info to be an lto_info_fd.
6039
60402006-06-25 Mark Mitchell <mark@codesourcery.com>
6041
6042 * lto.c (toplev.h): Include it.
6043 (dwarf2.h): Likewise.
6044 (tree.h): Likewise.
6045 (tm.h): Likewise.
6046 (cgraph.h): Likewise.
6047 (ggc.h): Likewise.
6048 (inttypes.h): Likewise.
6049 (DWARF2_attr): New type.
6050 (DWARF2_abbrev): Likewise.
6051 (DWARF2_class): Likewise.
6052 (DWARF2_form_data): Likewise.
6053 (lto_context): Likewise.
6054 (lto_fd_init): New function.
6055 (lto_abbrev_fd_init): Likewise.
6056 (lto_abbrev_fd_close): Likewise.
6057 (lto_file_init): Use them.
6058 (lto_file_close): New function.
6059 (lto_file_corrupt_error): Likewise.
6060 (LTO_CHECK_INT_VAL): New macro.
6061 (lto_check_size_t_val): New function.
6062 (lto_check_int_val): Likewise.
6063 (LTO_READ_TYPE): New macro.
6064 (lto_read_ubyte): New function.
6065 (lto_read_uhalf): Likewise.
6066 (lto_read_uword): Likewise.
6067 (lto_read_uleb128): Likewise.
6068 (lto_read_initial_length): Likewise.
6069 (lto_abbrev_read_attrs): Likewise.
6070 (lto_abbrev_read): Likewise.
6071 (lto_abbrev_lookup): Likewise.
6072 (lto_read_section_offset): Likewise.
6073 (lto_read_comp_unit_header): Likewise.
6074 (lto_read_form): Likewise.
6075 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6076 (LTO_BEGIN_READ_ATTRS): Likewise.
6077 (LTO_END_READ_ATTRS): Likewise.
6078 (lto_unsupported_attr_error): New function.
6079 (lto_get_identifier): Likewise.
6080 (lto_read_referenced_type_DIE): Likewise.
6081 (lto_read_compile_unit_DIE): Likewise.
6082 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6083 (lto_read_base_type_DIE): Likewise.
6084 (lto_read_DIE): Likewise.
6085 (lto_read_child_DIEs): Likewise.
6086 (lto_file_read): Read DIEs.
6087 (lto_main): Ask middle end to emit entities.
6088 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6089 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6090 (lto_elf_file_close): Likewise.
6091 * lto.h (lto_file): Declare.
6092 (DWARF2_abbrev): Likewise.
6093 (lto_fd): New type.
6094 (lto_abbrev_fd): Likewise.
6095 (lto_file): Use new types.
6096 (lto_file_close): Declare.
6097 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
6098
60992006-06-18 Mark Mitchell <mark@codesourcery.com>
6100
6101 * lto.h: New file.
6102 * lto.c: New file.
6103 * lto-elf.c: New file.
6104 * lto-lang.c (flags.h): Include it.
6105 (lto.h): Likewise.
6106 (lto_init): New function.
6107 (lto_write_globals): Remove.
6108 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
6109 (LANG_HOOKS_INIT): Define.
6110 (LANG_HOOKS_PARSE_FILE): Likewise.
6111 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6112 (LTO_EXE): Link with libelf.
6113 (lto/lto-lang.o): Update dependencies.
6114 (lto/lto.o): New target.
6115 (lto/lto-elf.o): Likewise.
6116
61172006-06-12 Mark Mitchell <mark@codesourcery.com>
6118
6119 * config-lang.in: New file.
6120 * Make-lang.in: Likewise.
6121 * lto-tree.h: Likewise.
6122 * lto-lang.c: Likewise.
818ab71a 6123\f
a5544970 6124Copyright (C) 2006-2019 Free Software Foundation, Inc.
d7f09764 6125
818ab71a
JJ
6126Copying and distribution of this file, with or without modification,
6127are permitted in any medium without royalty provided the copyright
6128notice and this notice are preserved.