]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
6c1dae73
MS
12019-07-09 Martin Sebor <msebor@redhat.com>
2
3 PR c++/61339
4 * lto-dump.c: Change class-key from class to struct and vice versa
5 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
6
70980ea2
ML
72019-07-04 Martin Liska <mliska@suse.cz>
8
9 PR lto/91078
10 * lto-common.c (lto_file_finalize): Use memcpy to set
11 file_data->lto_section_header.
12
88614dfa
ML
132019-07-03 Martin Liska <mliska@suse.cz>
14
15 * lto-common.c: Read LTO section and verify header.
16
606a9a8c
JH
172019-06-27 Jan Hubicka <jh@suse.cz>
18
19 * lto-common.c (lto_register_canonical_types_for_odr_types):
20 Copy CXX_ODR_P from the main variant.
21
85693eef
JH
222019-06-27 Jan Hubicka <jh@suse.cz>
23
24 * lto-common.c: tree-pretty-print.h
25 (type_streaming_finished): New static var.
26 (gimple_register_canonical_type_1): Return updated hash; handle ODR
27 types.
28 (iterative_hash_canonical_type): Update use of
29 gimple_register_canonical_type_1.
30
c2f7a665
ML
312019-06-27 Martin Liska <mliska@suse.cz>
32
33 * lto-dump.c (struct symbol_entry): Add default dtor.
34 (struct variable_entry): Likewise.
35 (struct function_entry): Likewise.
36 (dump_list_functions): Release memory.
37 (dump_list_variables): Likewise.
38
f4af4019
JH
392019-06-24 Jan Hubicka <jh@suse.cz>
40
41 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
42 compare STRING_FLAG only for arrays and integers.
43
0ecf545c
MS
442019-06-05 Martin Sebor <msebor@redhat.com>
45
46 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
47
a9c697b8
MS
482019-05-16 Martin Sebor <msebor@redhat.com>
49
50 * lto-dump.c (lto_main): Same.
51 * lto.c (stream_out): Same.
52
38613b9b
ML
532019-05-10 Martin Liska <mliska@suse.cz>
54
55 * Make-lang.in: Use program_transform_name for lto-dump.
56 * config-lang.in: Do not mark lto-dump compiler as we don't
57 want to have it installed at
58 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
59
03de2955
RO
602019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
61
62 * lto-common.c (lto_file_read): Print section->start as int64_t,
63 section->len as uint64_t.
64 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
65
ee7a003f
ML
662019-05-06 Martin Liska <mliska@suse.cz>
67
68 * lto-common.c: Update coding style.
69 * lto.c (materialize_cgraph): Likewise.
70
66d62d9f
HK
712019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
72 Martin Liska <mliska@suse.cz>
73
74 * Make-lang.in: Add lto_dump-related definition.
75 * config-lang.in: Likewise.
76 * lang.opt: Add new language LTODump and options related
77 to LTO dump tool.
78 * lto-common.c (lto_read_decls): Support type statistics dump.
79 (lto_file_read): Likewise for object files.
80 * lto-dump.c: New file.
81 * lto-lang.c (lto_option_lang_mask): Move from ..
82 * lto.c (lto_option_lang_mask): .. here.
83 * lto.h (lto_option_lang_mask): New declaration.
84
a79420f9
ML
852019-05-06 Martin Liska <mliska@suse.cz>
86 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
87
88 * Make-lang.in: Add lto-common.o.
89 * config-lang.in: Likewise for gtfiles.
90 * lto-common.c: New file.
91 * lto-common.h: New file.
92 * lto-lang.c: Include lto-common.h.
93 * lto.c: Move most of the functionality
94 into lto-common.c file.
95
0c7f51e4
JH
962019-04-12 Jan Hubicka <hubicka@ucw.cz>
97
98 * lto.c (do_stream_out): rename to ...
99 (stream_out): ... this one; move original code to ...
100 (stream_out_partitions_1, stream_out_partitions): ... these new
101 functions.
102 (lto_wpa_write_files): Honnor lto_parallelism
103
303389b1
ML
1042019-03-26 Martin Liska <mliska@suse.cz>
105
106 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 107 wrapping.
303389b1 108
a3f9f006
ML
1092019-03-11 Martin Liska <mliska@suse.cz>
110
111 * lto-lang.c (lto_post_options): Wrap an option name
112 in a string format message and fix GNU coding style.
113 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
114
04e5c73d
JJ
1152019-03-09 Jakub Jelinek <jakub@redhat.com>
116
117 PR target/79645
118 * lang.opt: Terminate description text with a dot.
119
80f52b40
JM
1202019-02-28 Jason Merrill <jason@redhat.com>
121
122 PR c++/88049 - ICE with undefined destructor and anon namespace.
123 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
124 for a type in an anonymous namespace.
125
67914693
SL
1262019-01-09 Sandra Loosemore <sandra@codesourcery.com>
127
128 PR other/16615
129
130 * lto-partition.c: Mechanically replace "can not" with "cannot".
131 * lto-symtab.c: Likewise.
132 * lto.c: Likewise.
133
a5544970
JJ
1342019-01-01 Jakub Jelinek <jakub@redhat.com>
135
136 Update copyright years.
137
d840d7a2
JH
1382018-12-24 Jan Hubicka <hubicka@ucw.cz>
139
140 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
141 for method whose basetype was already reported.
142
ed1b53a0
MP
1432018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
144
145 Minimize clone counter memory usage in LTO.
146 * lto-partition.c (privatize_symbol_name_1): Keep track of
147 non-unique symbol counters in the lto_clone_numbers hash
148 map.
149 (lto_promote_cross_file_statics): Allocate and free the
150 lto_clone_numbers hash map.
151 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
152 map.
153
ad42aa96
JH
1542018-11-28 Jan Hubicka <jh@suse.cz>
155
156 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
157
d7dce787
JH
1582018-11-22 Jan Hubicka <jh@suse.cz>
159
160 * lto.c (cmp_type_location): Remove.
161 (lto_read_decls): Do not allocate odr_types.
162
f615cb16
ML
1632018-11-19 Martin Liska <mliska@suse.cz>
164
165 PR lto/88077
166 * lto-symtab.c (lto_symtab_merge): Transform the
167 condition before r256989.
168
12eac232
ML
1692018-11-16 Martin Liska <mliska@suse.cz>
170
171 PR lto/88004
172 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
173 lto_symtab_symbol_p as it does checking of transparent alias.
174 These needs to be also merged in the function.
175
7958186b
MP
1762018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
177
178 * lto-partition.c (privatize_symbol_name_1): Use
179 clone_function_name_numbered.
180
abb967da
JH
1812018-10-26 Jan Hubicka <jh@suse.cz>
182
183 * lto/lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
184
033eb567
DM
1852018-10-17 David Malcolm <dmalcolm@redhat.com>
186
187 * Make-lang.in (selftest-lto): New.
188
9ed6dbee
ML
1892018-08-29 Martin Liska <mliska@suse.cz>
190
191 PR bootstrap/87130
192 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
193 to behavior before r263887.
194
3d78e008
ML
1952018-08-27 Martin Liska <mliska@suse.cz>
196
197 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
198 fndecl_built_in_p and remove check for FUNCTION_DECL if
199 possible.
3d78e008
ML
200 * lto-symtab.c (lto_symtab_merge_p): Likewise.
201 (lto_symtab_merge_decls_1): Likewise.
202 (lto_symtab_merge_symbols): Likewise.
203 * lto.c (lto_maybe_register_decl): Likewise.
204 (read_cgraph_and_symbols): Likewise.
205
efd9eb29
TV
2062018-08-21 Tom de Vries <tdevries@suse.de>
207
208 * lto.c (lto_main): Call debuginfo_early_start and
209 debuginfo_early_stop.
210
00abf86c
MS
2112018-07-20 Martin Sebor <msebor@redhat.com>
212
213 PR middle-end/82063
214 * lto-lang.c (lto_handle_option): Change function argument
215 to HOST_WIDE_INT.
216
efe0e6cd
RB
2172018-07-20 Richard Biener <rguenther@suse.de>
218
219 PR debug/86585
220 * lto.c (unify_scc): Before we throw away an SCC see if we
221 can amend prevailing single-entry SCC with debug refs.
222
814f3331
JH
2232018-07-13 Jan Hubicka <hubicka@ucw.cz>
224
225 * lto.c (do_stream_out): Add PART parameter; open dump file.
226 (stream_out): Add PART parameter; pass it to do_stream_out.
227 (lto_wpa_write_files): Update call of stream_out.
228
c518c102
ML
2292018-07-04 Martin Liska <mliska@suse.cz>
230
231 PR middle-end/66240
232 PR target/45996
233 PR c/84100
234 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
235 instead of memcmp.
236
b54006ae
ML
2372018-06-20 Martin Liska <mliska@suse.cz>
238
239 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 240 FIXME comment.
b54006ae 241
56f62793
ML
2422018-06-19 Martin Liska <mliska@suse.cz>
243
244 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 245 of get_create.
56f62793
ML
246 (undo_partition): Likewise.
247 (lto_balanced_map): Likewise.
248
1724941e
ML
2492018-06-19 Martin Liska <mliska@suse.cz>
250
251 * config-lang.in: Remove stagestuff.
252
29a50dfb
JH
2532018-06-08 Jan Hubicka <hubicka@ucw.cz>
254
255 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
256 New global vars.
257 (lto_register_dumps): New hook.
258 (LANG_HOOKS_REGISTER_DUMPS): New.
259 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
260 * lto-symtab.c: Include lto.h; dump into dump_file instead of
261 symtab->dump_file.
262 (lto_symtab_merge_decls): Initialize dump file.
263 * lto.c (read_cgraph_and_symbols): Initialize dump file.
264 (do_whole_program_analysis): Likewise.
265
74644756
ML
2662018-06-08 Martin Liska <mliska@suse.cz>
267
268 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
269 instead of summary_uid.
270
99353fcf
ML
2712018-06-08 Martin Liska <mliska@suse.cz>
272
273 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
274 of get.
275 (undo_partition): Likewise.
276 (lto_balanced_map): Likewise.
277
31db0fe0
ML
2782018-06-08 Martin Liska <mliska@suse.cz>
279
280 * lto-partition.c (add_references_to_partition): Remove support
281 for MPX (macros, related functions, fields in cgraph_node, ...).
282 (add_symbol_to_partition_1): Likewise.
283 (privatize_symbol_name): Likewise.
284 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
285
f115c9b5
RB
2862018-06-05 Richard Biener <rguenther@suse.de>
287
288 * lto.c (cmp_type_location): Expand locations only once.
289
5b42d196
JH
2902018-05-30 Jan Hubicka <hubicka@ucw.cz>
291
292 * lang.opt (lto_linker_output): Add nolto-rel.
293 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
294 and LTO_LINKER_OUTPUT_NOLTOREL.
295 (lto_init): Generate lto when doing incremental link.
296 * lto.c (lto_precess_name): Add lto1-inclink.
297
ab168044
JH
2982018-05-18 Jan Hubicka <jh@suse.cz>
299
300 PR lto/85583
301 * lto-partition.c (account_reference_p): Do not account
302 references from aliases; do not account refernces from
303 external initializers.
304
b6e33d73
JH
3052018-04-30 Jan Hubicka <jh@suse.cz>
306
307 * lto.c (cmp_partitions_size): Remove.
308 (lto_wpa_write_files): Also output priorities; do not sort partitions.
309 (cmp_partition_order): Move to ...
310 * lto-partition.c (cmp_partition_order): ...
311 (lto_1_to_1_map): Sort partitions.
312
e693ebce
JH
3132018-04-20 Jan Hubicka <jh@suse.cz>
314
315 * lto-partition.c (lto_balanced_map): Fix sanity check.
316
ddb0b824
JH
3172018-04-19 Jan Hubicka <jh@suse.cz>
318
319 * lto-partition.c: Include sreal.h
320 (add_symbol_to_partition_1): Use size instead of self_size
321 for size estimate.
322 (account_reference_p): New.
323 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
324 fix accounting errors in boundary size; add debug output; combine cost
325 as cost/size instead of cost/internal; reduce the partitioning error to
326 +- 1/8 of the parttion size.
327
1781a04f
ML
3282018-04-19 Martin Liska <mliska@suse.cz>
329
330 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
331 for multiple PREVAILING_DEF_IRONLY for common symbols.
332
6867cd69
ML
3332018-04-18 Martin Liska <mliska@suse.cz>
334
335 * lto.c (lto_read_decls): Fix GNU coding style and typos.
336
af597536
ML
3372018-04-18 Martin Liska <mliska@suse.cz>
338
339 PR ipa/83983
340 PR ipa/85391
341 * lto.c (cmp_type_location): New function.
342 (lto_read_decls): First collect all types, then
343 sort them according by location before register_odr_type
344 is called.
345
7d6051b1
JH
3462018-04-18 Jan Hubicka <jh@suse.cz>
347 Martin Liska <mliska@suse.cz>
348
349 PR lto/85391
350 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
351 types.
352
23d87577
ML
3532018-04-11 Martin Liska <mliska@suse.cz>
354
355 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
356 function.
357
c16833dc
ML
3582018-04-10 Martin Liska <mliska@suse.cz>
359
360 PR lto/85248
361 * lto-symtab.c (lto_symtab_merge_p): Do not check for
362 TREE_VALUES of error attributes.
363
8d96e546
ML
3642018-04-10 Richard Biener <rguenther@suse.de>
365 Martin Liska <mliska@suse.cz>
366
367 PR lto/85248
368 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
369
97bb4812
JH
3702018-02-08 Jan Hubicka <hubicka@ucw.cz>
371
372 * lto-partition.c (lto_balanced_map): Watch overflow.
373
39aa9b23
JH
3742018-02-08 Jan Hubicka <hubicka@ucw.cz>
375
376 PR ipa/81360
377 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
378 (read_cgraph_and_symbols): Use
379 symtab_node::output_to_lto_symbol_table_p.
380
26a823f0
JH
3812018-01-30 Jan Hubicka <hubicka@ucw.cz>
382
383 * lto.c (register_resolution): Remove forgotten sanity check.
384
43fbc2e9
JH
3852018-01-30 Jan Hubicka <hubicka@ucw.cz>
386
387 PR lto/81004
388 * lto.c: Include builtins.h
389 (register_resolution): Merge resolutions in case trees was
390 merged across units.
391 (lto_maybe_register_decl): Break out from ...
392 (lto_read_decls): ... here.
393 (unify_scc): Also register decls here.
394 (read_cgraph_and_symbols): Sanity check that all resolutions was
395 read.
396
ee034d31
EB
3972018-02-02 Eric Botcazou <ebotcazou@adacore.com>
398
399 PR lto/83954
400 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
401 component type of array types with non-aliased component.
402
44c945e6
JH
4032018-01-30 Jan Hubicka <hubicka@ucw.cz>
404
405 PR lto/83954
406 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
407 for type match warning on arrays of pointers.
408
cde9b2f8
ML
4092018-01-23 Martin Liska <mliska@suse.cz>
410
411 PR lto/81440
412 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
413 trailing arrays at the end of a struct.
414
5c0caeb3
RS
4152018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
416 Alan Hayward <alan.hayward@arm.com>
417 David Sherwood <david.sherwood@arm.com>
418
419 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
420
928686b1
RS
4212018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
422 Alan Hayward <alan.hayward@arm.com>
423 David Sherwood <david.sherwood@arm.com>
424
425 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
426 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
427
85ec4feb
JJ
4282018-01-03 Jakub Jelinek <jakub@redhat.com>
429
430 Update copyright years.
431
4849deb1
JJ
4322017-12-15 Jakub Jelinek <jakub@redhat.com>
433
434 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
435 affects_type_identity and handler fields, adjust comments.
436
734914b6
RS
4372017-12-07 Richard Sandiford <richard.sandiford@arm.com>
438
439 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
440
5d9ae53d
MS
4412017-12-07 Martin Sebor <msebor@redhat.com>
442
443 PR c/81544
444 * lto-lang.c (lto_attribute_table): Initialize new member of struct
445 attribute_spec.
446
5de73c05
JJ
4472017-11-30 Jakub Jelinek <jakub@redhat.com>
448
449 * lto.c (create_subid_section_table): Use ; instead of ;;.
450
974aedcc
MP
4512017-11-22 Marek Polacek <polacek@redhat.com>
452
453 PR c++/60336
454 PR middle-end/67239
455 PR target/68355
456 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
457
1bad9c18
JH
4582017-11-10 Jan Hubicka <hubicka@ucw.cz>
459
460 * lto-partition.c (lto_balanced_map): Use frequency accessor.
461
65991ea3
JH
4622017-10-13 Jan Hubicka <hubicka@ucw.cz>
463
464 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
465
4e7d0260
NS
4662017-10-11 Nathan Sidwell <nathan@acm.org>
467
468 * lto.c (mentions_vars_p_decl_with_vis): Use
469 DECL_ASSEMBLER_NAME_RAW.
470 (lto_fixup_prevailing_decls): Likewise.
471
8e6cdc90
RS
4722017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
473
474 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
475 operating on trees as wide_ints.
476
357b7604
RS
4772017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
478 Alan Hayward <alan.hayward@arm.com>
479 David Sherwood <david.sherwood@arm.com>
480
481 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
482
1ea85365
RB
4832017-08-21 Richard Biener <rguenther@suse.de>
484
92a285c1
ML
485 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
486 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
487 TYPE_DECL debug processing, register DIE references from
488 prevailing SCCs with the debug machinery.
489 (lto_section_with_id): Handle LTO debug sections.
1ea85365 490
8e093270
NS
4912017-08-16 Nathan Sidwell <nathan@acm.org>
492
493 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
494 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
495 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
496
eac3ab4a
TV
4972017-08-08 Tom de Vries <tom@codesourcery.com>
498
499 * lto.c: Include attribs.h.
500
314e6352
ML
5012017-08-08 Martin Liska <mliska@suse.cz>
502
503 * lto-lang.c: Include header files.
504 * lto-symtab.c: Likewise.
505
63e434ca
RB
5062017-08-03 Richard Biener <rguenther@suse.de>
507
508 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
509 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
510 use DECL_LANG_FLAG_0.
511 (lto_symtab_prevail_decl): Likewise.
512
417ca011
TD
5132017-07-07 Torsten Duwe <duwe@suse.de>
514
515 * lto-lang.c (lto_attribute_table): Add entry for
516 "patchable_function_entry".
517
20deef65
NS
5182017-07-19 Nathan Sidwell <nathan@acm.org>
519
520 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
521 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
522
0eaf0bfe
JH
5232017-07-06 Jan Hubicka <hubicka@ucw.cz>
524
525 * lto-partition.c (lto_balanced_map): Do not check
526 flag_toplevel_reorder.
2db9b7cd 527
0eaf0bfe 5282017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
529 * lto-lang.c (lto_init): Use builtin_structptr_types.
530
d1eed638
JH
5312017-06-15 Jan Hubicka <hubicka@ucw.cz>
532 Thomas Preud'homme <thomas.preudhomme@arm.com>
533
534 PR lto/69866
535 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
536 that resolved externally.
537
d2db2e6b
JH
5382017-05-23 Jan Hubicka <hubicka@ucw.cz>
539
540 * lto.c (do_whole_program_analysis): Replace inline_free_summary
541 by ipa_free_fn_summary.
542
464d0118
ML
5432017-05-23 Martin Liska <mliska@suse.cz>
544
545 * lto-symtab.c (lto_cgraph_replace_node): Use
546 symtab_node::dump_{asm_,}name functions.
547 * lto.c (read_cgraph_and_symbols): Likewise.
548 (do_whole_program_analysis): Likewise.
549
6c52831d
ML
5502017-05-23 Martin Liska <mliska@suse.cz>
551
552 * lto.c (read_cgraph_and_symbols): Use the renamed function.
553 (do_whole_program_analysis): Use the renamed function.
554
27d020cf
JH
5552017-05-22 Jan Hubicka <hubicka@ucw.cz>
556
557 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
558 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
559
815d9cc6
XR
5602017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
561
92a285c1 562 PR c++/80038
815d9cc6
XR
563 * lto-lang.c (lto_init): Set in_lto_p earlier.
564
350792ff
RB
5652017-04-12 Richard Biener <rguenther@suse.de>
566 Bernd Edlinger <bernd.edlinger@hotmail.de>
567
568 PR middle-end/79671
569 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
570
4a44a5f3
ML
5712017-02-14 Martin Liska <mliska@suse.cz>
572
573 * lto.c (do_stream_out): Free LTO file filename string.
574
8a3a6ab4
DM
5752017-01-19 David Malcolm <dmalcolm@redhat.com>
576
577 * lto-lang.c (builtin_type_for_size): Convert call to
578 lto_type_for_size to one through the langhook.
579 (lto_type_for_size): Move to langhooks.c and rename to
580 lhd_type_for_size.
581 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
582
4c4b4703
JJ
5832017-01-11 Jakub Jelinek <jakub@redhat.com>
584
585 PR middle-end/50199
586 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
587 if it was 0.
588
bd2c6270
JJ
5892017-01-09 Jakub Jelinek <jakub@redhat.com>
590
591 PR translation/79019
592 PR translation/79020
593 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
594
24d3f325
NS
5952017-01-06 Nathan Sidwell <nathan@acm.org>
596
5406184c
NS
597 * lto-partition.c (promote_symbol): Write to dump file sooner,
598 include alias promoting too.
599
24d3f325
NS
600 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
601 (may_need_named_section_p): Likewise.
602 (rename_statics): Likewise.
603 (lto_promote_cross_file_statics): Likewise.
604
cbe34bb5
JJ
6052017-01-01 Jakub Jelinek <jakub@redhat.com>
606
607 Update copyright years.
608
6c8bf066
GJL
6092016-11-30 Georg-Johann Lay <avr@gjlay.de>
610
611 PR lto/78562
612 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
613 mismatch if the two types are built-in.
614
7fa6a965
PK
6152016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
616
617 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
618
efb71232
RB
6192016-11-23 Richard Biener <rguenther@suse.de>
620
621 PR lto/78472
622 * lto.c (hash_canonical_type): Ignore zero-sized fields.
623
48330c93
BE
6242016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
625
626 PR c++/71973
627 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
628
899ca90e 6292016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
630 Alan Hayward <alan.hayward@arm.com>
631 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
632
633 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
634
65179585
RB
6352016-10-31 Richard Biener <rguenther@suse.de>
636
637 PR lto/78129
638 * lto.c (do_whole_program_analysis): Bail out after errors
639 from WPA analysis.
640
8bc5448f
KV
6412016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
642
643 * lto-partition.c: Include tree-vrp.h.
644 * lto.c: Likewise.
645
68317985
RB
6462016-09-20 Richard Biener <rguenther@suse.de>
647
648 * lto.c (lto_main): Call early_finish with "<artificial>" as
649 filename.
650
321e76fb
RB
6512016-09-19 Richard Biener <rguenther@suse.de>
652
653 * lto.c (lto_main): Invoke early_finish debug hook.
654
ea6e17d5
RB
6552016-07-25 Richard Biener <rguenther@suse.de>
656
657 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
658 (unify_scc): Likewise.
659 (lto_read_decls): Likewise.
660
e9ac1f86
JJ
6612016-06-28 Jakub Jelinek <jakub@redhat.com>
662
663 * Make-lang.in: Don't cat ../stage_current if it does not exist.
664
277d7ee0
AK
6652016-06-23 Andi Kleen <ak@linux.intel.com>
666
667 * Make-lang.in: Add support for autofdo (disabled for now)
668
4d926e34
MS
6692016-06-10 Martin Sebor <msebor@redhat.com>
670
671 PR c/71392
672 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
673 attribute in type-generic builtins.
674
479f99c9
JH
6752016-05-16 Jan Hubicka <hubicka@ucw.cz>
676
677 * lto-partition.c (add_symbol_to_partition_1): Likewise.
678
1a0bf5e1
JH
6792016-05-03 Jan Hubicka <hubicka@ucw.cz>
680
681 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
682
a2e76867
PK
6832016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
684
685 * lto-partition.h (lto_balanced_map): New parameter.
686 * lto-partition.c (lto_balanced_map): New parameter
687 max_partition_size.
688 Check if partition size is greater than max_partition_size.
689 * lto.c (do_whole_program_analysis): Adjust calls to
690 lto_balanced_map() to pass 2nd argument.
691
ea913779
L
6922016-03-17 H.J. Lu <hongjiu.lu@intel.com>
693
694 PR lto/70258
695 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
696 PIE.
697
56aae4b7
JJ
6982016-03-08 Jakub Jelinek <jakub@redhat.com>
699
700 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
701 - becuase -> because.
702
ed5d948d
TV
7032016-02-15 Tom de Vries <tom@codesourcery.com>
704
705 PR lto/69655
706 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
707 argument.
708
4ecbadc7
ML
7092016-01-27 Martin Liska <mliska@suse.cz>
710
711 * lto-partition.c (add_symbol_to_partition_1): Remove usage
712 of hsa_summaries.
713
e49d321f
JH
7142016-01-19 Jan Hubicka <hubicka@ucw.cz>
715
716 PR lto/69136
717 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
718 decls have no assemblernames.
719
b2b40051 7202016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 721 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
722
723 * lto-partition.c: Include "hsa.h"
724 (add_symbol_to_partition_1): Put hsa implementations into the
725 same partition as host implementations.
726
5803bd01
JH
7272016-01-12 Jan Hubicka <hubicka@ucw.cz>
728
729 PR lto/69003
730 * lto-partition.c (rename_statics): Fix pasto.
731
13092f61
RB
7322016-01-18 Richard Biener <rguenther@suse.de>
733
734 PR lto/69337
735 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
736 function vs. variable.
737
3c4e91c9
RB
7382016-01-12 Richard Biener <rguenther@suse.de>
739
740 PR lto/69077
741 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
742 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
743
818ab71a
JJ
7442016-01-04 Jakub Jelinek <jakub@redhat.com>
745
746 Update copyright years.
747
3fddb2ef
JH
7482015-12-10 Jan Hubicka <hubicka@ucw.cz>
749
750 PR lto/68878
751 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
752 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
753 (lto_symtab_prevailing_decl): Use it.
754
4a38b02b
IV
7552015-12-15 Ilya Verbin <ilya.verbin@intel.com>
756
757 * lto.c: Include stringpool.h and fold-const.h.
758 (offload_handle_link_vars): New static function.
759 (lto_main): Call offload_handle_link_vars.
760
ca834876
JH
7612015-12-10 Jan Hubicka <hubicka@ucw.cz>
762
763 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
764
958a627f
JH
7652015-12-11 Jan Hubicka <hubicka@ucw.cz>
766
767 PR ipa/61886
768 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
769 values of error and warning attributes.
770
da20571a
JH
7712015-12-08 Jan Hubicka <hubicka@ucw.cz>
772
773 PR lto/68811
774 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
775 DECL.
776 (LTO_NO_PREVAIL): Use gcc_checking_assert.
777
378004b9
JH
7782015-12-08 Jan Hubicka <hubicka@ucw.cz>
779
780 PR lto/68811
781 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
782 by itself.
783
6b9ac179
JH
7842015-12-08 Jan Hubicka <hubicka@ucw.cz>
785
786 PR ipa/61886
787 * lto-symtab.c: Include lto-symtab.h.
788 (lto_cgraph_replace_node): Do not merge profiles here.
789 (lto_symtab_merge_p): New function.
790 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
791 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
792 aliases.
793 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
794 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
795 * lto.c: Include lto-symtab.h
796 * lto-symtab.h: New.
797
41c60c6c
JH
7982015-12-08 Jan Hubicka <hubicka@ucw.cz>
799
800 PR ipa/61886
801 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
802 are not part of the definition.
803 (contained_in_symbol): Likewise.
804 (promote_symbol): When promoting a symbol also promote all transparent
805 aliases.
806 (rename_statics): Weakref needs unique name, too.
807
71e54687
JH
8082015-12-07 Jan Hubicka <hubicka@ucw.cz>
809
810 PR ipa/61886
811 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
812 rename_statics, rename_statics): Handle transparent aliases.
813
88636b62
JH
8142015-12-04 Jan Hubicka <hubicka@ucw.cz>
815
816 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
817 merged_comdat.
818
8c86248e
JH
8192015-12-01 Jan Hubicka <hubicka@ucw.cz>
820
821 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
822
1ff9ed6f
JH
8232015-11-25 Jan Hubicka <jh@suse.cz>
824
825 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
826 * lang.opt (lto_linker_output): New enum.
827 (flinker_output): New flag.
828
22bea0be
JH
8292015-11-24 Jan Hubicka <hubicka@ucw.cz>
830
831 * lto-symtab.c: Include alias.h
832 (warn_type_compatibility_p): Replace types_compatible_p checks by
833 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
834 (lto_symtab_merge): Compare DECL sizes.
835 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
836
aea50b45
JH
8372015-11-24 Jan Hubicka <hubicka@ucw.cz>
838
839 * lto.c (iterative_hash_canonical_type): Recruse for all types
840 which pass !canonical_type_used_p.
841 (gimple_register_canonical_type_1): Sanity check we do not compute
842 canonical type of anything with !canonical_type_used_p.
843 (gimple_register_canonical_type): Skip all types that are
844 !canonical_type_used_p
845
deb3dae6
JH
8462015-11-24 Jan Hubicka <hubicka@ucw.cz>
847
848 * lto.c (unify_scc): Use free_node.
849
f85d2487
JH
8502015-11-21 Jan Hubicka <hubicka@ucw.cz>
851
852 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
853 (gimple_register_canonical_type_1): Check that pointers do not get
854 canonical types.
855 (gimple_register_canonical_type): Do not register pointers.
856
8572015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
858
859 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
860 flag for types that are not ODR; fix loop walking parameters.
861
69f293c9
AM
8622015-11-11 Andrew MacLeod <amacleod@redhat.com>
863
864 * lto-lang.c: Remove unused header files.
865 * lto-object.c: Likewise.
866 * lto-partition.c: Likewise.
867 * lto-symtab.c: Likewise.
868 * lto.c: Likewise.
869
ee45a32d
EB
8702015-11-08 Eric Botcazou <ebotcazou@adacore.com>
871
872 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
873
0aad0198
RS
8742015-11-07 Richard Sandiford <richard.sandiford@arm.com>
875
876 * lto-lang.c: Don't undef DEF_BUILTIN.
877
2adfab87
AM
8782015-10-29 Andrew MacLeod <amacleod@redhat.com>
879
880 * lto-lang.c: Reorder #include's and remove duplicates.
881 * lto-object.c: Likewise.
882 * lto-partition.c: Likewise.
883 * lto-symtab.c: Likewise.
884 * lto.c: Likewise.
885
b2b29377
MM
8862015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
887
888 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
889 conditionals.
890 (lto_fixup_state): Likewise.
891 (do_whole_program_analysis): Use
892 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
893 conditionals.
894
d9a6bd32
JJ
8952015-10-13 Jakub Jelinek <jakub@redhat.com>
896
897 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
898 DEF_FUNCTION_TYPE_11): Define.
899
9c4eeafc
JH
9002015-10-10 Jan Hubicka <hubicka@ucw.cz>
901
902 * lto.c (hash_canonical_type): Honor
903 type_with_interoperable_signedness.
904
3e32ee19
NS
9052015-09-28 Nathan Sidwell <nathan@codesourcery.com>
906
907 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
908 (DEF_FUNCTION_TYPE_VAR_11): Delete.
909
f196d062
RB
9102015-08-31 Richard Biener <rguenther@suse.de>
911
912 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
913 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
914 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
915 participate in merging with something else.
916
45aee888
RB
9172015-08-31 Richard Biener <rguenther@suse.de>
918
919 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
920 test, do not replace a non-builtin with a builtin.
921 * lto.c (compare_tree_sccs_1): Do not merge things we stream
922 as builtins vs. non-builtins.
923
a79683d5
TS
9242015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
925
926 * lto.h: Remove useless typedefs.
927
48d859bb
AM
9282015-07-15 Andrew MacLeod <amacleod@redhat.com>
929
930 * lto.c: Remove redundant includes.
931
026c3cfd
AH
9322015-07-12 Aldy Hernandez <aldyh@redhat.com>
933
934 * lto-lang.c: Fix double word typos.
935
9fdcd34e
AM
9362015-07-10 Andrew MacLeod <amacleod@redhat.com>
937
938 * lto.c: Include cfghooks.h rather than predict.h.
939
f51ade33
AM
9402015-07-09 Andrew MacLeod <amacleod@redhat.com>
941
942 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
943 lto-streamer.h.
944 * lto-object.c: Likewise.
945 * lto-partition.c: Likewise.
946 * lto-symtab.c: Likewise.
947
1916bcb5
AM
9482015-07-09 Andrew MacLeod <amacleod@redhat.com>
949
950 * lto-lang.c: Adjust includes for flags.h changes.
951
c7131fb2
AM
9522015-07-07 Andrew MacLeod <amacleod@redhat.com>
953
954 * lto-lang.c: Adjust includes.
955 * lto-object.c: Likewise.
956 * lto-partition.c: Likewise.
957 * lto-symtab.c: Likewise.
958 * lto.c: Likewise.
959
f0889939
AM
9602015-06-25 Andrew MacLeod <amacleod@redhat.com>
961
962 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
963 * lto-object.c: Likewise.
964 * lto-partition.c: Likewise.
965 * lto-symtab.c: Likewise.
966 * lto-tree.h: Likewise.
967 * lto.c: Likewise.
968
8d67ee55
RS
9692015-06-25 Richard Sandiford <richard.sandiford@arm.com>
970
971 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
972 than typed_noop_remove. Remove redudant typedefs.
973
abb226c9
AM
9742015-06-17 Andrew MacLeod <amacleod@redhat.com>
975
976 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
977 * lto-object.c: Likewise.
978 * lto-partition.c: Likewise.
979 * lto-symtab.c: Likewise.
980 * lto.c: Likewise.
981
351d90f4
JH
9822015-06-14 Jan Hubicka <hubicka@ucw.cz>
983
984 PR ipa/66181
985 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
986
44c42705
DD
9872015-06-12 DJ Delorie <dj@redhat.com>
988
989 * lto-lang.c (lto_type_for_size): Include intN types.
990 (lto_type_for_mode): Likewise.
991
64578d98
JH
9922015-06-08 Jan Hubicka <hubicka@ucw.cz>
993
994 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
995
13fdf2e2
AM
9962015-06-08 Andrew MacLeod <amacleod@redhat.com>
997
998 * lto-lang.c : Adjust include files.
999 * lto-object.c : Likewise.
1000 * lto-partition.c : Likewise.
1001 * lto-partition.h : Likewise.
1002 * lto-symtab.c : Likewise.
1003 * lto.c : Likewise.
1004 * lto.h : Likewise.
1005
ccb5ad37
JH
10062015-06-06 Jan Hubicka <hubicka@ucw.cz>
1007
6542950e
JH
1008 PR lto/65378
1009 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1010 odr_or_derived_type_p.
1011 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1012
10132015-06-08 Jan Hubicka <hubicka@ucw.cz>
1014
1015
ccb5ad37
JH
1016 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1017 pointers.
1018
d7438551
AH
10192015-06-05 Aldy Hernandez <aldyh@redhat.com>
1020
1021 * lto-lang.c (lto_write_globals): Remove.
1022 (LANG_HOOKS_WRITE_GLOBALS): Same.
1023
ecb9f223
AM
10242015-06-04 Andrew MacLeod <amacleod@redhat.com>
1025
1026 * lto-lang.c: Adjust includes for restructured coretypes.h.
1027 * lto-object.c: Likewise.
1028 * lto-partition.c: Likewise.
1029 * lto-symtab.c: Likewise.
1030 * lto.c: Likewise.
1031
9cb9b937
JH
10322015-06-04 Jan Hubicka <hubicka@ucw.cz>
1033
1034 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1035
93e2aa6d
JH
10362015-06-03 Jan Hubicka <hubicka@ucw.cz>
1037
1038 * lto.c (iterative_hash_canonical_type,
1039 gimple_register_canonical_type): only hash main variants of types
1040
faae53f8
ML
10412015-05-27 Martin Liska <mliska@suse.cz>
1042
1043 * lto-partition.c (new_partition): Reset number of symbols.
1044 (add_symbol_to_partition_1): Increment number of symbols.
1045 (undo_partition): Decrement number of symbols.
1046 (lto_balanced_map): Dump number of symbols and insns that
1047 belong to a partition.
1048 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1049
b727ba74
JH
10502015-05-22 Jan Hubicka <hubicka@ucw.cz>
1051
1052 * lto.c (hash_canonical_type): Be sure we hash only types that
1053 need alias set.
1054 (gimple_register_canonical_type_1): Do not produce canonical
1055 types for types that do not need alias sets.
1056
1d1218fb
JH
10572015-05-22 Jan Hubicka <hubicka@ucw.cz>
1058
1059 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1060
872d5034
JH
10612015-05-19 Jan Hubicka <hubicka@ucw.cz>
1062
1063 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1064
259d29e3
JH
10652015-05-17 Jan Hubicka <hubicka@ucw.cz>
1066
1067 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1068 compare ODR types (if available) and function types.
1069 (lto_symtab_merge): ... here; output ODR violation warnings
1070 and call warn_types_mismatch.
1071
b0845a1e
JH
10722015-04-29 Jan Hubicka <hubicka@ucw.cz>
1073
1074 * lto.c (lto_fixup_state): Call verify_type.
1075
67f58944
TS
10762015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1077
b0845a1e 1078 * lto.c: Adjust for hash_table changes.
67f58944 1079
36ceb0e3
JH
10802015-03-27 Jan Hubicka <hubicka@ucw.cz>
1081
1082 * lto.c (lto_read_decls): Move code registering odr types out
1083 of TYPE_CANONICAL conditional and also register polymorphic types.
1084
afd1e7c6
JH
10852015-03-26 Jan Hubicka <hubicka@ucw.cz>
1086
1087 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1088 DECL_ARTIFICAL symbols.
1089
eaeec5ec
JH
10902015-03-26 Jan Hubicka <hubicka@ucw.cz>
1091
1092 PR lto/65536
1093 * lto.c (unify_scc): Revert location cache when unification
1094 suceeded.
1095 (lto_read_decls): Accept location cache after sucess;
1096 apply location cache before calling debug hooks.
1097
1c4db829
JH
10982015-03-10 Jan Hubicka <hubicka@ucw.cz>
1099
1100 * lto.c (read_cgraph_and_symbols): Do not do merging
1101 at ltrans stage.
1102
db847fa8
JJ
11032015-02-26 Jakub Jelinek <jakub@redhat.com>
1104
1105 * lto.c (lto_mode_identity_table): New variable.
1106 (lto_read_decls): Add mode_table argument to the lto_input_block
1107 constructor.
1108 (lto_file_finalize): Initialize mode_table.
1109 (lto_init): Initialize lto_mode_identity_table.
1110
56a9f6bc
TS
11112015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1112
1113 PR libgomp/64625
1114 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1115 Remove macros.
1116 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1117
ebc8f0bb
JH
11182015-02-03 Jan Hubicka <hubicka@ucw.cz>
1119
1120 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1121
40fecdd6
JM
11222015-01-30 Joseph Myers <joseph@codesourcery.com>
1123
1124 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1125 changed to pass input_location as first argument.
1126
040968a8
JH
11272014-12-11 Jan Hubicka <hubicka@ucw.cz>
1128
1129 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1130
69fe4502
JH
11312014-12-11 Jan Hubicka <hubicka@ucw.cz>
1132
1133 * lto.c (compare_tree_sccs_1): Add comparsion of
1134 DECL_FUNCTION_SPECIFIC_TARGET
1135
41dbbb37
TS
11362015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1137 James Norris <jnorris@codesourcery.com>
1138
1139 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1140 New macros.
1141 * lto.c: Include "gomp-constants.h".
1142
837bac8c
IV
11432015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1144
1145 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1146 from select_what_to_stream.
1147
1b34e6e2
BS
11482015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1149 Jakub Jelinek <jakub@redhat.com>
1150
1151 PR middle-end/64412
1152 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1153 if ACCEL_COMPILER.
1154
adfac8df
JJ
11552015-01-09 Michael Collison <michael.collison@linaro.org>
1156
1157 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1158 input.h, alias.h, symtab.h, options, fold-const.h,
1159 wide-int.h, and inchash.h due to flattening of tree.h.
1160 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1161 input.h, alias.h, symtab.h, fold-const.h,
1162 wide-int.h, and inchash.h due to flattening of tree.h.
1163 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1164 input.h, alias.h, symtab.h, options, fold-const.h,
1165 wide-int.h, and inchash.h due to flattening of tree.h.
1166 * lto-partition.c: Ditto.
1167 * lto-symtab.c: Ditto.
1168
5624e564
JJ
11692015-01-05 Jakub Jelinek <jakub@redhat.com>
1170
1171 Update copyright years.
1172
9a1e784a
ML
11732014-12-22 Martin Liska <mliska@suse.cz>
1174
1175 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1176 is used.
1177 (undo_partition): Likewise.
1178 (lto_balanced_map): Likewise.
1179
dd912cb8
ML
11802014-12-22 Martin Liska <mliska@suse.cz>
1181
1182 * lto-partition.c: Include of symbol-summary.h is added.
1183 * lto-symtab.c: Likewise.
1184 * lto.c: Likewise.
1185
17e0fc92
JH
11862014-12-11 Jan Hubicka <hubicka@ucw.cz>
1187
1188 PR ipa/61324
1189 * lto.c (read_cgraph_and_symbols): Update call of
1190 remove_unreachable_nodes.
1191 (do_whole_program_analysis): Remove call of
1192 symtab->remove_unreachable_nodes
1193
58dddbd2
TS
11942014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1195
1196 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1197 htab with malloc instead of ggc.
1198
907dadbd
TS
11992014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1200
1201 * lto.c: Replace htab with hash_table.
1202
9c71e9df
TS
12032014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1204
1205 * lto.c (lto_read_in_decl_state): Adjust.
1206 (lto_fixup_state): Likewise.
1207
72a4a8b0
JH
12082014-11-17 Jan Hubicka <hubicka@ucw.cz>
1209
1210 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1211
54e774c0
JH
12122014-11-14 Jan Hubicka <hubicka@ucw.cz>
1213
1214 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1215
1f6be682
IV
12162014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1217 Bernd Schmidt <bernds@codesourcery.com>
1218 Andrey Turetskiy <andrey.turetskiy@intel.com>
1219 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1220
ec6fe917
IV
1221 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1222
12232014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1224 Ilya Tocar <ilya.tocar@intel.com>
1225 Andrey Turetskiy <andrey.turetskiy@intel.com>
1226 Bernd Schmidt <bernds@codesourcery.com>
1227
1f6be682
IV
1228 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1229 LTO_SECTION_NAME_PREFIX.
1230 * lto-partition.c (lto_promote_cross_file_statics): Call
1231 select_what_to_stream.
1232 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1233 LTO_SECTION_NAME_PREFIX.
1234 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1235 being built as an offload compiler.
1236
ef4bddc2
RS
12372014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1238
1239 * lto-lang.c: Remove redundant enum from machine_mode.
1240
c582198b
AM
12412014-10-28 Andrew MacLeod <amacleod@redhat.com>
1242
1243 * lto.c: Adjust include files.
1244 * lto-lang.c: Ditto.
1245 * lto-object.c: Ditto.
1246 * lto-partition.c: Ditto.
1247 * lto-symtab.c: Ditto.
1248
60393bbc
AM
12492014-10-27 Andrew MacLeod <amacleod@redhat.com>
1250
1251 * lto-lang.c: Adjust include files.
1252 * lto-object.c: Ditto.
1253 * lto-partition.c: Ditto.
1254 * lto-symtab.c: Ditto.
1255 * lto.c: Ditto.
1256
957f47e6
DD
12572014-10-16 DJ Delorie <dj@redhat.com>
1258
1259 * lto-object.c (lto_obj_begin_section): In the event that pointer
1260 sizes aren't powers of two, choose a more suitable alignment
1261 than (unsigned)(-1).
1262
78a7c317
DD
12632014-10-14 DJ Delorie <dj@redhat.com>
1264
1265 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1266 size-type as well.
1267 (lto_init): Initialize all intN types, not just int128.
1268
70261a4f
ML
12692014-10-06 Martin Liska <mliska@suse.cz>
1270
1271 * lto.c (stream_out): ARG_UNUSED added for last argument.
1272
00de328a
AH
12732014-09-24 Aldy Hernandez <aldyh@redhat.com>
1274
1275 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1276 DECL_ABSTRACT_P.
1277
7861b648
AK
12782014-09-23 Andi Kleen <ak@linux.intel.com>
1279
1280 * lto-partition.c (node_cmp): Update comment.
1281 (varpool_node_cmp): Use symtab_node for comparison.
1282 (add_sorted_nodes): New function.
1283 (lto_balanced_map): Change to keep ordered queue
1284 of ordered node. Handle no_reorder attribute.
1285
1ee85ee1
JH
12862014-09-11 Jan Hubicka <hubicka@ucw.cz>
1287
1288 * lto.c (lto_read_decls): Register ODR types.
1289
8605403e
JH
12902014-08-20 Jan Hubicka <hubicka@ucw.cz>
1291
1292 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1293 call.
1294 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1295
56b1f114
JH
12962014-08-14 Jan Hubicka <hubicka@ucw.cz>
1297
1298 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1299
833f94c0
RB
13002014-08-14 Richard Biener <rguenther@suse.de>
1301
1302 PR lto/62067
1303 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1304
207c68cd
RB
13052014-08-08 Richard Biener <rguenther@suse.de>
1306
1307 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1308
7c581d61
BC
13092014-08-08 Bin Cheng <bin.cheng@arm.com>
1310
1311 PR lto/62032
1312 * lto-lang.c (lto_init): Switch mis-matched arguments.
1313
39c8aaa4
TS
13142014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1315
1316 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1317
6e2830c3
TS
13182014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1319
1320 * lto-partition.c, lto-partition.h: Use hash_set instead of
1321 pointer_set.
1322
50de5793
AK
13232014-07-31 Andi Kleen <ak@linux.intel.com>
1324
1325 * lto.c (hash_canonical_type): Use inchash::hash
1326 and use inchash::add_expr.
1327 (iterative_hash_canonical_type): Dito.
1328
f6bcdb5e
RB
13292014-07-30 Richard Biener <rguenther@suse.de>
1330
1331 * lto-streamer.h (lto_write_data): New function.
1332 * langhooks.c (lhd_append_data): Do not free block.
1333 * lto-section-out.c (lto_write_data): New function writing
1334 raw data to the current section.
1335 (lto_write_stream): Adjust for langhook semantic change.
1336 (lto_destroy_simple_output_block): Write header directly.
1337 * lto-opts.c (lto_write_options): Write options directly.
1338 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1339 (lto_output_toplevel_asms): Likewise.
1340 (copy_function_or_variable): Copy data directly.
1341 (write_global_references): Output index table directly.
1342 (lto_output_decl_state_refs): Likewise.
1343 (write_symbol): Write data directly.
1344 (produce_symtab): Adjust.
1345 (produce_asm_for_decls): Output header and refs directly.
1346
56fdfd3e
AK
13472014-07-25 Andi Kleen <ak@linux.intel.com>
1348
1349 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1350
0bd8bb04
AK
13512014-07-25 Andi Kleen <ak@linux.intel.com>
1352
1353 * lto.c (hash_canonical_type): Convert to inchash.
1354 (iterative_hash_canonical_type): Dito.
1355
6d8eb96b
AK
13562014-07-25 Andi Kleen <ak@linux.intel.com>
1357
1358 * lto.c: Include inchash.h
1359
ad115a3c
JH
13602014-07-14 Jan Hubicka <hubicka@ucw.cz>
1361
1362 * lto.c (mentions_vars_p_decl_non_common): Skip
1363 DECL_ARGUMENT_FLD.
1364 mentions_vars_p_function): Do DECL_ARGUMENTS.
1365 (lto_fixup_prevailing_decls): Update.
1366
917dd9bf
JH
13672014-07-12 Jan Hubicka <hubicka@ucw.cz>
1368
1369 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1370 timevar
1371 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1372
0b83e688
JH
13732014-07-11 Jan Hubicka <hubicka@ucw.cz>
1374
1375 * lto-partition.c (add_references_to_partition): Use
1376 varpool_ctor_useable_for_folding_p.
1377 * lto.c (lto_read_in_decl_state): Update sanity check.
1378
e55637b7
ML
13792014-07-01 Martin Liska <mliska@suse.cz>
1380
1381 IPA REF alias refactoring
1382 * lto-partition.c (add_symbol_to_partition_1): Usage of
1383 FOR_EACH_ALIAS added.
1384
010f4e27
JH
13852014-06-28 Jan Hubicka <hubicka@ucw.cz>
1386
1387 Revert:
1388 * lto.c (lto_copy_fields_not_streamed): New function.
1389 (compare_tree_sccs_1): Do not compare fields shared in between type
1390 and variant.
1391 (lto_read_decls): Fixup types first before inserting into hash.
1392
b82fe354
AP
13932014-06-28 Andrew Pinski <apinski@cavium.com>
1394
1395 * lto.c (lto_read_decls): Fix comment in comment.
1396
288eeff7
JH
13972014-06-28 Jan Hubicka <hubicka@ucw.cz>
1398
1399 * lto.c (lto_copy_fields_not_streamed): New function.
1400 (compare_tree_sccs_1): Do not compare fields shared in between type
1401 and variant.
1402 (lto_read_decls): Fixup types first before inserting into hash.
1403
e01fa630
ML
14042014-06-25 Martin Liska <mliska@suse.cz>
1405
1406 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
1407 used.
1408 (add_symbol_to_partition_1): Likewise.
1409 (lto_balanced_map): Likewise.
1410 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
1411
aaf8a23e
JH
14122014-06-24 Jan Hubicka <hubicka@ucw.cz>
1413
1414 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1415 (mentions_vars_p_function): ... here.
1416 (compare_tree_sccs_1): Update VINDEX checks.
1417 (lto_fixup_prevailing_decls): Likewise.
1418
1eb68d2d
TS
14192014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1420
1421 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1422 pointer_map.
1423
c203e8a7
TS
14242014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1425
1426 * lto.c: Adjust.
1427
714c800f
JH
14282014-06-20 Jan Hubicka <hubicka@ucw.cz>
1429
1430 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1431
569b1784
JH
14322014-06-20 Jan Hubicka <hubicka@ucw.cz>
1433
1434 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1435
56363ffd
JH
14362014-06-15 Jan Hubicka <hubicka@ucw.cz>
1437
1438 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1439
e257a17c
JH
14402014-06-10 Jan Hubicka <hubicka@ucw.cz>
1441
1442 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1443 (do_whole_program_analysis): Use verify_symtab.
1444
24d047a3
JH
14452014-06-07 Jan Hubicka <hubicka@ucw.cz>
1446
1447 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1448 lto_fixup_prevailing_decls): Skip section names.
1449
9b2b7279
AM
14502014-06-02 Andrew MacLeod <amacleod@redhat.com>
1451
1452 * lto-symtab.c: Include builtins.h.
1453
a9243bfc
RB
14542014-05-26 Richard Biener <rguenther@suse.de>
1455
1456 * lto.c (lto_parse_hex): Use int64_t.
1457 (lto_resolution_read): Likewise.
1458
fd1e9302
JH
14592014-05-23 Jan Hubicka <hubicka@ucw.cz>
1460
1461 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1462
aede2c10
JH
14632014-05-23 Jan Hubicka <hubicka@ucw.cz>
1464
1465 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1466 symtab pointer.
1467 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1468
f6a7cffc
TS
14692014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1470
1471 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1472 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1473 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1474
4000360e
BS
14752012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1476
1477 * lto-object.c: Include "lto-section-names.h".
1478 (LTO_SEGMENT_NAME): Don't define.
1479 * lto.c: Include "lto-section-names.h".
1480
b9559136
JH
14812014-05-17 Jan Hubicka <hubicka@ucw.cz>
1482
1483 PR lto/61012
1484 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1485 mixed with variables.
1486
766090c2
TS
14872014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1488
1489 * lto-tree.h: Don't use variable_size gty attribute.
1490 * lto.c (lto_read_in_decl_state): Adjust.
1491 (create_subid_section_table): Likewise.
1492 (lto_flatten_files): Likewise.
1493 (read_cgraph_and_symbols): Likewise.
1494
1d60af08
KZ
14952014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1496 Mike Stump <mikestump@comcast.net>
1497 Richard Sandiford <rdsandiford@googlemail.com>
1498
1499 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1500 * lto-lang.c (get_nonnull_operand): Likewise.
1501
22869a37
RB
15022014-04-28 Richard Biener <rguenther@suse.de>
1503
1504 PR middle-end/60092
1505 * lto-lang.c: Define flag_isoc11.
1506
7de90a6c
DM
15072014-04-23 David Malcolm <dmalcolm@redhat.com>
1508
1509 * lto-partition.c (add_references_to_partition): Update for
1510 removal of implicit pointer from the is-a.h API.
1511 (add_symbol_to_partition_1): Likewise.
1512 (contained_in_symbol): Likewise.
1513 (undo_partition): Likewise.
1514 (lto_balanced_map): Likewise.
1515 (promote_symbol): Likewise.
1516 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1517 (lto_symtab_merge_symbols): Likewise.
1518 * lto.c (lto_wpa_write_files): Likewise.
1519
783dab6b
RB
15202014-04-15 Richard Biener <rguenther@suse.de>
1521
1522 * lto.c: Include params.h.
1523 (do_whole_program_analysis): Switch on flag_lto_partition value,
1524 add support for LTO_PARTITION_ONE.
1525 * lto-partition.h (lto_balanced_map): Adjust.
1526 * lto-partition.c (lto_balanced_map): Get number of desired
1527 partitions as argument to support -flto-partition=one.
1528
cb90235d
JH
15292014-04-14 Jan Hubicka <hubicka@ucw.cz>
1530
1531 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1532 tp_first_run.
1533
bbe281da
JH
15342014-03-19 Jan Hubicka <hubicka@ucw.cz>
1535
1536 * lto.c: Include ipa-inline.h
1537 (do_whole_program_analysis): Free inline summary after partitioning.
1538
ce2f49b3
RB
15392014-03-19 Richard Biener <rguenther@suse.de>
1540
1541 PR middle-end/60553
1542 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1543 instead of TREE_CHAIN as chain_next.
1544
e41106fc
RB
15452014-03-19 Richard Biener <rguenther@suse.de>
1546
1547 * lto.c (lto_wpa_write_files): Move call to
1548 lto_promote_cross_file_statics ...
1549 (do_whole_program_analysis): ... here, into the partitioning
1550 block. Do not ggc_collect after lto_wpa_write_files but
1551 for a last time before it.
1552
15df2655
JJ
15532014-03-19 Jakub Jelinek <jakub@redhat.com>
1554
1555 PR lto/60571
1556 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1557 Fix formatting.
1558
415e2e6b
JJ
15592014-03-18 Jakub Jelinek <jakub@redhat.com>
1560
1561 PR sanitizer/60535
1562 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1563 and complex_{float,{,long_}double}_type_node.
1564
f42c637e
PM
15652014-03-08 Paulo Matos <paulo@matos-sorge.com>
1566
415e2e6b
JJ
1567 * lto-lang.c (lto_init): Pass flag_short_double to
1568 build_common_tree_nodes.
f42c637e 1569
6dab804d
JH
15702014-02-14 Jan Hubicka <hubicka@ucw.cz>
1571
1572 PR lto/60295
1573 * lto.c (stream_out): Avoid parallel streaming with
1574 -flto=jobserver until we are able to throttle it down
1575 resonably.
1576
39434bce
JH
15772014-02-14 Jan Hubicka <hubicka@ucw.cz>
1578
1579 * lto-partition.c (add_symbol_to_partition_1,
1580 undo_partition, lto_balanced_map): Aliases have no
1581 defined size.
1582 (lto_balanced_map): Do not follow refering variables
1583 if they can be optimized out.
1584
1966fd99
RB
15852014-02-14 Richard Biener <rguenther@suse.de>
1586
1587 PR lto/60179
1588 * lto.c (compare_tree_sccs_1): Do not compare
1589 DECL_FUNCTION_SPECIFIC_TARGET.
1590 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1591
283416b3
RB
15922014-02-12 Richard Biener <rguenther@suse.de>
1593
1594 PR lto/60060
1595 * lto-lang.c (lto_write_globals): Do not call
1596 wrapup_global_declarations or emit_debug_global_declarations
1597 but emit debug info for non-function scope variables
1598 directly.
1599
b7e85694
JH
16002014-02-06 Jan Hubicka <hubicka@ucw.cz>
1601
1602 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1603
96451279
JH
16042014-02-06 Jan Hubicka <hubicka@ucw.cz>
1605
1606 PR ipa/59469
1607 * lto-partition.c (symbol_class): Move to cgraph.h
1608 (get_symbol_class): Move to symtab.c
1609 (add_references_to_partition, add_symbol_to_partition_1,
1610 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1611 lto_promote_cross_file_statics): Update.
1612
f300e7b8
JH
16132014-02-05 Jan Hubicka <hubicka@ucw.cz>
1614
1615 * lto.c (lto_parallelism): New static var.
1616 (do_stream_out, wait_for_child, stream_out): New static functions.
1617 (lto_wpa_write_files): Add support for parallel streaming.
1618 (do_whole_program_analysis): Set parallelism.
1619 * lang.opt (fwpa): Add parameter.
1620 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1621 (lto_init): Update use of flag_wpa.
1622 * lto-streamer.h (asm_nodes_output): Declare.
1623
f0f91770
RB
16242014-02-05 Richard Biener <rguenther@suse.de>
1625
1626 * lto.h (lto_global_var_decls): Remove.
1627 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1628 (lto_write_globals): Do nothing in WPA stage, gather globals from
1629 the varpool here ...
1630 * lto.c (lto_main): ... not here.
1631 (materialize_cgraph): Do not call rest_of_decl_compilation
1632 on the empty lto_global_var_decls vector.
1633 (lto_global_var_decls): Remove.
1634
d665f8dd
JH
16352014-02-04 Jan Hubicka <hubicka@ucw.cz>
1636
1637 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1638 needs duplicating, not generic COMDAT.
1639
c39276b8
RB
16402014-02-04 Richard Biener <rguenther@suse.de>
1641
1642 PR lto/59723
1643 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1644 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1645
5f876ae7
JH
16462014-02-04 Jan Hubicka <hubicka@ucw.cz>
1647 Markus Trippelsdorf
1648
1649 PR ipa/59469
1650 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1651 merge force_output and forced_by_abi flags.
1652
b72271b9
BI
16532014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1654
1655 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1656 flag_cilkplus.
1657
63124c48
RB
16582014-01-09 Richard Biener <rguenther@suse.de>
1659
1660 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1661
d05b9920
RB
16622014-01-09 Richard Biener <rguenther@suse.de>
1663
1664 PR lto/45586
1665 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1666 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1667 (gimple_canonical_types_compatible_p): Do not compare them either.
1668
23a5b65a
RS
16692014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1670
1671 Update copyright years
1672
2c8326a5
OE
16732013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1674
1675 * lto.c: Remove struct tags when referring to class varpool_node.
1676 * lto-partition.c: Likewise.
1677 * lto-symtab.c: Likewise.
1678
e06f9964
JJ
16792013-11-29 Jakub Jelinek <jakub@redhat.com>
1680 Richard Biener <rguenther@suse.de>
1681
1682 PR lto/59326
1683 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1684
c193f58b
JJ
16852013-11-29 Jakub Jelinek <jakub@redhat.com>
1686
1687 PR lto/59326
1688 * lto.c (mentions_vars_p_omp_clause): New function.
1689 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1690 after return stmts.
1691
2fb9a547
AM
16922013-11-22 Andrew MacLeod <amacleod@redhat.com>
1693
1694 * lto.c: Add required include files from gimple.h.
1695 * lto-lang.c: Likewise
1696 * lto-object.c: Likewise
1697 * lto-partition.c: Likewise
1698 * lto-symtab.c: Likewise
1699
fec39fa6
TS
17002013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1701
1702 * lto-partition.c lto-symtab.c lto.c Adjust.
1703
d8a2d370
DN
17042013-11-14 Diego Novillo <dnovillo@google.com>
1705
1706 * lto-lang.c: Include stringpool.h.
1707 Include stor-layout.h.
1708 * lto-partition.c: Include gcc-symtab.h.
1709 * lto.c: Include stor-layout.h.
1710
5e20cdc9
DM
17112013-10-31 David Malcolm <dmalcolm@redhat.com>
1712
1713 Automated part of renaming of symtab_node_base to symtab_node.
1714
1715 Patch autogenerated by rename_symtab.py from
1716 https://github.com/davidmalcolm/gcc-refactoring-scripts
1717 revision 58bb219cc090b2f4516a9297d868c245495ee622
1718
1719 * lto-partition.c (add_symbol_to_partition): Rename
1720 symtab_node_base to symtab_node.
1721 (get_symbol_class): Likewise.
1722 (symbol_partitioned_p): Likewise.
1723 (add_references_to_partition): Likewise.
1724 (add_symbol_to_partition_1): Likewise.
1725 (contained_in_symbol): Likewise.
1726 (add_symbol_to_partition): Likewise.
1727 (lto_1_to_1_map): Likewise.
1728 (lto_max_map): Likewise.
1729 (lto_balanced_map): Likewise.
1730 (privatize_symbol_name): Likewise.
1731 (promote_symbol): Likewise.
1732 (may_need_named_section_p): Likewise.
1733 (rename_statics): Likewise.
1734 (lto_promote_statics_nonwpa): Likewise.
1735 * lto-symtab.c (lto_symtab_merge): Likewise.
1736 (lto_symtab_resolve_replaceable_p): Likewise.
1737 (lto_symtab_symbol_p): Likewise.
1738 (lto_symtab_resolve_can_prevail_p): Likewise.
1739 (lto_symtab_resolve_symbols): Likewise.
1740 (lto_symtab_merge_decls_2): Likewise.
1741 (lto_symtab_merge_decls_1): Likewise.
1742 (lto_symtab_merge_decls): Likewise.
1743 (lto_symtab_merge_symbols_1): Likewise.
1744 (lto_symtab_merge_symbols): Likewise.
1745 (lto_symtab_prevailing_decl): Likewise.
1746 * lto.c (lto_wpa_write_files): Likewise.
1747 (read_cgraph_and_symbols): Likewise.
1748 (do_whole_program_analysis): Likewise.
1749
378cd6b1
DM
17502013-10-30 David Malcolm <dmalcolm@redhat.com>
1751
1752 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1753 declarations onto multiple lines to make things easier for
1754 rename_symtab.py.
1755 (lto_symtab_merge_decls_1): Likewise.
1756 (lto_symtab_merge_symbols_1): Likewise.
1757
939b37da
BI
17582013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1759
1760 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1761 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1762 Plus is enabled.
1763
67348ccc
DM
17642013-10-29 David Malcolm <dmalcolm@redhat.com>
1765
1766 Patch autogenerated by refactor_symtab.py from
1767 https://github.com/davidmalcolm/gcc-refactoring-scripts
1768 revision 58bb219cc090b2f4516a9297d868c245495ee622
1769
1770 * lto-partition.c (lto_promote_cross_file_statics): Update for
1771 conversion of symtab types to a true class hierarchy.
1772 (rename_statics): Likewise.
1773 (promote_symbol): Likewise.
1774 (privatize_symbol_name): Likewise.
1775 (lto_balanced_map): Likewise.
1776 (varpool_node_cmp): Likewise.
1777 (node_cmp): Likewise.
1778 (lto_1_to_1_map): Likewise.
1779 (undo_partition): Likewise.
1780 (add_symbol_to_partition): Likewise.
1781 (contained_in_symbol): Likewise.
1782 (add_symbol_to_partition_1): Likewise.
1783 (add_references_to_partition): Likewise.
1784 (symbol_partitioned_p): Likewise.
1785 (get_symbol_class): Likewise.
1786 (lto_max_map): Likewise.
1787 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1788 (lto_symtab_merge_symbols): Likewise.
1789 (lto_symtab_merge_symbols_1): Likewise.
1790 (lto_symtab_merge_decls): Likewise.
1791 (lto_symtab_merge_decls_1): Likewise.
1792 (lto_symtab_merge_decls_2): Likewise.
1793 (lto_symtab_resolve_symbols): Likewise.
1794 (lto_symtab_resolve_can_prevail_p): Likewise.
1795 (lto_symtab_symbol_p): Likewise.
1796 (lto_symtab_resolve_replaceable_p): Likewise.
1797 (lto_symtab_merge): Likewise.
1798 (lto_varpool_replace_node): Likewise.
1799 (lto_cgraph_replace_node): Likewise.
1800 * lto.c (lto_main): Likewise.
1801 (do_whole_program_analysis): Likewise.
1802 (materialize_cgraph): Likewise.
1803 (read_cgraph_and_symbols): Likewise.
1804 (cmp_partitions_order): Likewise.
1805 (lto_materialize_function): Likewise.
1806 (has_analyzed_clone_p): Likewise.
1807
8e9055ae
AM
18082013-10-29 Andrew MacLeod <amacleod@redhat.com>
1809
1810 * lto/lto-object.c: Add gimple.h to include list.
1811 * lto/lto-partition.c: Likewise.
1812
377d9792
AM
18132013-10-18 Andrew MacLeod <amacleod@redhat.com>
1814
1815 * lto.c: Remove tree-flow.h from include list.
1816
fffda8d7
RB
18172013-10-15 Richard Biener <rguenther@suse.de>
1818
1819 * lto.c (hash_canonical_type): Split out from ...
1820 (iterative_hash_canonical_type): ... here. Register types
1821 we recurse to.
1822 (gimple_canonical_type_hash): Adjust.
1823 (gimple_register_canonical_type_1): Split out from ...
1824 (gimple_register_canonical_type): ... here. Cache computed
1825 hash value.
1826 (lto_register_canonical_types): Split into two modes,
1827 clearing and computing TYPE_CANONICAL.
1828 (lto_read_decls): Adjust.
1829 (read_cgraph_and_symbols): Do two passes over global trees,
1830 first clearing then computing TYPE_CANONICAL.
1831
1394237e
RB
18322013-10-14 Richard Biener <rguenther@suse.de>
1833
1834 * lto.c (gimple_canonical_types): Move out-of GC space.
1835 (canonical_type_hash_cache): Make a pointer-map.
1836 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1837 New counters.
1838 (iterative_hash_canonical_type): Adjust.
1839 (read_cgraph_and_symbols): Likewise.
1840 (print_lto_report_1): Likewise.
1841
0a387eca
RB
18422013-10-14 Richard Biener <rguenther@suse.de>
1843
1844 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1845 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1846 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1847 gimple_types_compatible_p_1, gimple_types_compatible_p,
1848 visit, iterative_hash_name, struct type_hash_pair,
1849 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1850 gimple_type_eq, gimple_register_type, num_not_merged_types,
1851 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1852 num_not_merged_types_in_same_scc_trees): Remove old merging code
1853 and statistics.
1854 (lto_read_decls): Do not run old merging code in parallel.
1855 (read_cgraph_and_symbols): Do not init/free old merging
1856 data structures.
1857 (print_lto_report_1): Do not report differences of old vs. new
1858 merging code.
1859
83fd5d11
RB
18602013-10-14 Richard Biener <rguenther@suse.de>
1861
1862 * lto-lang.c (lto_init): Do not re-init canonical types here.
1863 (lto_register_canonical_types): Move to ...
1864 * lto.c (lto_register_canonical_types): ... here.
1865 (gimple_canonical_types, canonical_type_hash_cache,
1866 iterative_hash_canonical_type, gimple_canonical_type_hash,
1867 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1868 gimple_register_canonical_type): Add canonical type merging machinery
1869 moved from gimple.c.
1870 (read_cgraph_and_symbols): Init and free canonical type tables
1871 here.
1872 (print_lto_report_1): Report canonical type table stats here.
1873
acf0174b
JJ
18742013-10-11 Jakub Jelinek <jakub@redhat.com>
1875
1876 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1877
7c6fedd2
TT
18782013-09-25 Tom Tromey <tromey@redhat.com>
1879
1880 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1881 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1882 (lto/lto-object.o): Remove.
1883
35f32ad4
RB
18842013-09-06 Richard Biener <rguenther@suse.de>
1885
1886 * lto-symtab.c: Move from gcc/
1887 * lto.h: Include vec.h.
1888 (lto_global_var_decls): Declare.
1889 * lto.c (lto_global_var_decls): Move definition here.
1890 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1891 (lto-symtab.o): Add.
1892 * config-lang.in (gtfiles): Add lto.h.
1893
49322b12
JH
18942013-08-31 Jan Hubicka <jh@suse.cz>
1895
1896 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1897 DECL_FIELD_OFFSET can contain an reference to variable.
1898
31f1f73b
JH
18992013-08-31 Jan Hubicka <jh@suse.cz>
1900
1901 * lto.c (tree_with_vars): Turn into vector.
1902 (MAYBE_REMEMBER_WITH_VARS): Change to...
1903 (CHECK_VAR): ... this one.
1904 (CHECK_NO_VAR): New macro.
1905 (maybe_remember_with_vars_typed): Turn to ...
1906 (mentions_vars_p_typed): ... this one.
1907 (maybe_remember_with_vars_common): Turn to ...
1908 (mentions_vars_p_comon): ... this one.
1909 (maybe_remember_with_vars_decl_minimal): Turn to ...
1910 (mentions_vars_p_decl_minmal): ... this one.
1911 (maybe_remember_with_vars_decl_common): Turn to ...
1912 (mentions_vars_p_decl_common): ... this one.
1913 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1914 (mentions_vars_p_decl_with_vis): ... this one.
1915 (maybe_remember_with_vars_decl_non_common): Turn to ...
1916 (mentions_vars_p_decl_non_common): ... this one.
1917 (maybe_remember_with_vars_function): Turn to ...
1918 (mentions_vars_p_function): ... this one.
1919 (maybe_remember_with_vars_field_decl): Turn to ...
1920 (mentions_vars_p_field_decl): ... this one.
1921 (maybe_remember_with_vars_type): Turn to ...
1922 (mentions_vars_p_type): ... this one.
1923 (maybe_remember_with_vars_binfo): Turn to ...
1924 (mentions_vars_p_binfo): ... this one.
1925 (maybe_remember_with_vars_constructor): Turn to ...
1926 (mentions_vars_p_constructor): ... this one.
1927 (maybe_remember_with_vars_expr): Turn to ...
1928 (mentions_vars_p_expr): ... this one.
1929 (maybe_remember_with_vars): Turn to ...
1930 (mentions_vars_p): ... this one.
1931 (lto_read_decls): Update.
1932 (LTO_SET_PREVAIL): Do not call function for internal decls.
1933 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1934 check that something was updated.
1935 (lto_fixup_state): Do not care about internal decls.
1936 (lto_fixup_decls): Update.
1937 (read_cgraph_and_symbols): Update.
1938
256eefa9
JH
19392013-08-29 Jan Hubicka <jh@suse.cz>
1940
1941 * lto.c (read_cgraph_and_symbols): Free decl states.
1942
0170f33c
JH
19432013-08-29 Jan Hubicka <jh@suse.cz>
1944
1945 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1946 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1947 TYPE_FINAL_P.
1948
c01c111b
JH
19492013-08-28 Jan Hubicka <jh@suse.cz>
1950
1951 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1952 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1953 (unify_scc): Do checking assert.
1954
6a49f3c9
JH
19552013-08-06 Jan Hubicka <jh@suse.cz>
1956 Martin Liska <marxin.liska@gmail.com>
1957
1958 * lto-partition.c (lto_balanced_map): Always base order on
1959 source file order.
1960
a2e2a668
JH
19612013-08-06 Jan Hubicka <jh@suse.cz>
1962
1963 * lto.c (lto_materialize_function): Do not read body anymore.
1964
815effe1
JH
19652013-08-02 Jan Hubicka <jh@suse.cz>
1966
1967 * lto.c (lto_materialize_function): Do not push struct function.
1968 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1969 (may_need_named_section_p): Even abstract origins may need
1970 named section.
1971
315f8c0e
DM
19722013-07-30 David Malcolm <dmalcolm@redhat.com>
1973
1974 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1975 PASS_MANAGER_H.
1976
1977 * lto.c (do_whole_program_analysis): Update for move of
1978 all_regular_ipa_passes from a global to a field of class
1979 pass_manager.
1980
1aa95df7
OB
19812013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1982
1983 * lto-partition.c: Fix typos.
1984
c525ba9a
JH
19852013-06-20 Jan Hubicka <jh@suse.cz>
1986
1987 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1988 partitioning of variables.
1989
7a89ad00
JH
19902013-06-20 Jan Hubicka <jh@suse.cz>
1991
1992 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1993
6a6dac52
JH
19942013-06-19 Jan Hubicka <jh@suse.cz>
1995
1996 * lto-partition.c (add_references_to_partition): Use
1997 ctor_for_folding.
1998
ac0511f2
RB
19992013-06-18 Richard Biener <rguenther@suse.de>
2000
2001 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2002 and use it.
2003 (lto_register_function_decl_in_symtab): Likewise.
2004 (cmp_tree): New function.
2005 (unify_scc): Instead of using the streamer cache map from entry
2006 to cache index match up the two maps we have by sorting them.
2007 Adjust calls to lto_register_var_decl_in_symtab and
2008 lto_register_function_decl_in_symtab.
2009
ee03e71d
RB
20102013-06-17 Richard Biener <rguenther@suse.de>
2011
2012 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2013 * lto.c: Include data-streamer.h.
2014 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2015 (gimple_type_leader_entry_s, gimple_type_leader,
2016 gimple_lookup_type_leader): Remove.
2017 (gtc_visit): Simplify.
2018 (gimple_types_compatible_p): Likewise.
2019 (gimple_register_type_1): Likewise. Merge into ...
2020 (gimple_register_type): ... this. Keep it as legacy for
2021 statistics purposes for now.
2022 (fixup_integer_cst): Remove.
2023 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2024 rename to ...
2025 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2026 maybe_remember_with_vars_*): ... these.
2027 (uniquify_nodes): Remove.
2028 (lto_fixup_prevailing_type): New function.
2029 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2030 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2031 (num_merged_types, num_prevailing_types, num_not_merged_types,
2032 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2033 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2034 num_scc_compare_collisions): New global counters.
2035 (compare_tree_sccs_1): New function.
2036 (compare_tree_sccs): Likewise.
2037 (unify_scc): Likewise.
2038 (lto_read_decls): Stream in tree SCCs and unify them on the
2039 way in. Finalize prevailing SCC tree members.
2040 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2041 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2042 to ggc-collect during merging.
2043 (print_lto_report_1): Adjust for new merging code.
2044
ca0f62a8
JH
20452013-06-12 Jan Hubicka <jh@suse.cz>
2046
2047 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2048
bbf9ad07
JH
20492013-06-12 Jan Hubicka <jh@suse.cz>
2050
2051 * lto.c (register_resolution): Take lto_file_data argument.
2052 (lto_register_var_decl_in_symtab,
2053 lto_register_function_decl_in_symtab): Update.
2054 (read_cgraph_and_symbols): Update resolution_map handling.
2055
ecdbd01a 20562013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2057
2058 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2059 (add_symbol_to_partition_1): Likewise.
2060 (contained_in_symbol): Likewise.
2061 (lto_balanced_map): Likewise.
2062 (rename_statics): Drop weakref.
2063
a367df53
RB
20642013-06-05 Richard Biener <rguenther@suse.de>
2065
2066 * lto.c (num_merged_types): New global variable.
2067 (uniquify_nodes): Increase num_merged_types when merging a type.
2068 (print_lto_report_1): Output the number of merged types.
2069
40a7fe1e
JH
20702013-06-01 Jan Hubicka <jh@suse.cz>
2071
2072 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2073 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2074 (do_whole_program_analysis): Update dumping.
2075
e70670cf
JH
20762013-05-29 Jan Hubicka <jh@suse.cz>
2077
2078 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2079 flags.
2080 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2081
8ee05051
JH
20822013-05-15 Jan Hubicka <jh@suse.cz>
2083
2084 * lto-partition.c (privatize_symbol_name): Return true when
2085 privatizing happened.
2086 (rename_statics): Do not go into infinite loop when privatizing
2087 is not needed.
2088
427b248d
JM
20892013-05-16 Jason Merrill <jason@redhat.com>
2090
2091 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2092
9de04252
MJ
20932013-05-15 Martin Jambor <mjambor@suse.cz>
2094
2095 * lto-partition.c (lto_balanced_map): Print symbol order instead
2096 of node uids.
2097
2d6e4603
JH
20982013-05-15 Jan Hubicka <jh@suse.cz>
2099
2100 PR lto/57038
2101 PR lto/47375
2102 * lto-partition.c (get_symbol_class): Fix weakrefs.
2103 (lto_balanced_map): Fix weakrefs.
2104 (privatize_symbol_name): Remove unnecesary label.
2105 (rename_statics): Handle weakrefs as statics.
2106
64cfa6c0
JH
21072013-05-09 Jan Hubicka <jh@suse.cz>
2108 Richard Biener <rguenther@suse.de>
2109
2110 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2111 (lto_register_var_decl_in_symtab): Likewise.
2112 (lto_main): Promote statics.
2113 * lto-partition.c (privatize_symbol_name): New function.
2114 (promote_symbol): Use it.
2115 (may_need_named_section_p): New predicate.
2116 (rename_statics): New functions.
2117 (lto_promote_cross_file_statics): Simplify; do renaming.
2118 (lto_promote_statics_nonwpa): New function.
2119 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2120
e45cde98
RB
21212013-02-08 Richard Biener <rguenther@suse.de>
2122
2123 PR lto/56231
2124 * lto-lang.c (lto_init): Do not enter a dummy file.
2125
6edc3e32
UB
21262013-02-07 Uros Bizjak <ubizjak@gmail.com>
2127
2128 PR bootstrap/56227
2129 * lto.c (lto_resolution_ready): Use %wx instead of
2130 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2131
ed73881e
RG
21322013-02-04 Richard Guenther <rguenther@suse.de>
2133
2134 PR lto/56168
2135 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2136 or lto_fixup_decls at LTRANS time.
2137
a19b1432
JH
21382013-01-09 Jan Hubicka <jh@suse.cz>
2139
2140 PR lto/45375
2141 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2142
49c01f87
L
21432012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2144
2145 PR lto/55466
2146 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2147 variables.
2148 (lto_main): Record the global variables if WPA isn't enabled.
2149
6e1aa848
DN
21502012-11-20 Diego Novillo <dnovillo@google.com>
2151 Jakub Jelinek <jakub@redhat.com>
2152
2153 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2154
9771b263
DN
21552012-11-16 Diego Novillo <dnovillo@google.com>
2156
2157 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2158
2159 * lto-lang.c: Use new vec API in vec.h.
2160 * lto-partition.c: Likewise.
2161 * lto-partition.h: Likewise.
2162 * lto.c: Likewise.
2163
24551b9c
LC
21642012-10-31 Lawrence Crowl <crowl@google.com>
2165
2166 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2167 down-cast via dyn_cast.
2168 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2169 (undo_partition): Likewise.
2170 (lto_balanced_map): Likewise.
2171 (get_symbol_class): Likewise and via is_a.
2172 (lto_balanced_map): Change symtab checking to is_a.
2173
aec06f6f
RB
21742012-10-12 Richard Biener <rguenther@suse.de>
2175
2176 PR lto/54898
2177 * lto.c (gimple_types_compatible_p_1): Also compare
2178 TYPE_MAIN_VARIANT.
2179 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2180
0b8c30f9
TB
21812012-10-09 Tobias Burnus <burnus@net-b.de>
2182
2183 * lto-lang.c (lto_register_builtin_type): Avoid useless
2184 decl creation.
2185 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2186
da3202a8
TB
21872012-10-08 Tobias Burnus <burnus@net-b.de>
2188
2189 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2190 Free lto_file struct after closing the file.
2191
2512a443
JH
21922012-10-08 Jan Hubicka <jh@suse.cz>
2193
2194 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
2195 (fixup_integer_cst): New functoin.
2196 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2197
e75f8f79
JH
21982012-10-07 Jan Hubicka <jh@suse.cz>
2199
2200 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2201 release input encoders.
2202 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2203
46591697
JH
22042012-10-06 Jan Hubicka <jh@suse.cz>
2205
2206 PR lto/54790
2207 * lto.c (resolution_map): New static var.
2208 (register_resolution): New function.
2209 (lto_register_var_decl_in_symtab): Use it.
2210 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2211
af16bc76
MJ
22122012-09-20 Martin Jambor <mjambor@suse.cz>
2213
2214 * lto.c (lto_materialize_function): Call push_struct_function and
2215 pop_cfun.
2216
5368224f
DC
22172012-09-19 Dehao Chen <dehao@google.com>
2218
2219 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2220
b5493fb2
JH
22212012-09-19 Jan Hubicka <jh@suse.cz>
2222
2223 * lto.c (lto_materialize_function): Update confused comment.
2224 (read_cgraph_and_symbols): Do not free symtab.
2225
c3c445e1
JH
22262012-09-12 Jan Hubicka <jh@suse.cz>
2227
2228 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2229 AUX pointer cleaning. Add max partitioning.
2230 * lto-partition.c (enum symbol_class): New.
2231 (get_symbol_class): New function.
2232 (symbol_partitioned_p): New function.
2233 (add_references_to_partition): Remove.
2234 (add_aliases_to_partition): Remove.
2235 (add_cgraph_node_to_partition_1): Remove.
2236 (add_cgraph_node_to_partition): Remove.
2237 (add_symbol_to_partition): New function.
2238 (add_symbol_to_partition_1): New function.
2239 (contained_in_symbol): New function.
2240 (partition_cgraph_node_p): Remove.
2241 (partition_varpool_node_p): Remove.
2242 (partition_symbol_p): Remove.
2243 (lto_1_to_1_map): Cleanup.
2244 (lto_max_map): New.
2245 (lto_balanced_map): Update.
2246 (lto_promote_cross_file_statics): Update.
2247 * lto-partition.h (lto_max_map): Declare.
2248 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2249
b5c7cdfb
JH
22502012-09-11 Jan Hubicka <jh@suse.cz>
2251
2252 PR lto/54312
2253 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2254 type is variant leader.
2255
b29402f0
RG
22562012-09-11 Richard Guenther <rguenther@suse.de>
2257
2258 * lto.c (enum gtc_mode): Remove.
2259 (struct type_pair_d): Adjust.
2260 (lookup_type_pair): Likewise.
2261 (gimple_type_leader): Do not mark as deletable.
2262 (gimple_lookup_type_leader): Adjust.
2263 (gtc_visit): Likewise.
2264 (gimple_types_compatible_p_1): Likewise.
2265 (gimple_types_compatible_p): Likewise.
2266 (gimple_type_hash): Likewise.
2267 (gimple_register_type): Likewise.
2268 (read_cgraph_and_symbols): Manage lifetime of tables
2269 here.
2270
b8f4e58f
RG
22712012-09-11 Richard Guenther <rguenther@suse.de>
2272
2273 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2274 struct type_pair_d, lookup_type_pair, struct sccs,
2275 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2276 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2277 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2278 visit, iterative_hash_name, struct type_hash_pair,
2279 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2280 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2281 Move here from gimple.c
2282 (read_cgraph_and_symbols): Free hash tables here.
2283 (print_lto_report_1): New function wrapping print_lto_report.
2284 (do_whole_program_analysis): Call it.
2285 (lto_main): Likewise.
2286
1cdbb3f9
JH
22872012-09-10 Jan Hubicka <jh@suse.cz>
2288
2289 * lto-partition.c (partition_symbol_p): Forward declare.
2290 (add_references_to_partition): Reimplement using partition_symbol_p.
2291 (add_aliases_to_partition): Break out from add_references_to_partition;
2292 reimplement using partition_symbol_p.
2293 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2294 add sanity checks.
2295 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2296 (partition_varpool_node_p): Do not special case aliases.
2297
b4661bfe
JH
22982012-08-12 Jan Hubicka <jh@suse.cz>
2299
2300 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2301 it is deleted after streaming.
2302 * lto-partition.c (partition_symbol_p): New function.
2303 (promote_var, promote_fn): Remove.
2304 (promote_symbol): New function.
2305 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2306 to lookup the actual boundaries instead of computing them ad-hoc.
2307
7b99cca4
JH
23082012-08-12 Jan Hubicka <jh@suse.cz>
2309
2310 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2311 in partitioning.
2312 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2313 by encoder.
2314 * lto-partition.c (new_partition): Update.
2315 * lto.c (cmp_partitions_order): Update.
2316 (lto_wpa_write_files): Update.
2317 (free_ltrans_partitions): Update.
2318 (add_references_to_partition): Update.
2319 (add_cgraph_node_to_partition_1): Update.
2320 (add_cgraph_node_to_partition): Update.
2321 (add_varpool_node_to_partition): Update.
2322 (undo_partition): Update.
2323 (lto_balanced_map): Update.
2324 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2325 set_referenced_from_this_partition_p): Update.
2326 (lto_promote_cross_file_statics): Update.
2327
f27c1867
JH
23282012-08-12 Jan Hubicka <jh@suse.cz>
2329
2330 * lto-partition.c (set_referenced_from_other_partition_p,
2331 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2332 New functions.
2333 (lto_promote_cross_file_statics): Use them.
2334
ab96cc5b
JH
23352012-07-24 Jan Hubicka <jh@suse.cz>
2336
2337 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2338
0229aee9
UB
23392012-07-24 Uros Bizjak <ubizjak@gmail.com>
2340
2341 * lto-tree.h (lang_decl): Add variable_size GTY option.
2342
7ee2468b
SB
23432012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2344
2345 * lto.c: Do not include timevar.h.
2346 * Make-lang.in: Fix dependencies.
2347
a910399d
LC
23482012-06-18 Lawrence Crowl <crowl@google.com>
2349
92a285c1 2350 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2351 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2352 to lto_wpa_write_files.
2353 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2354 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2355 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2356 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2357 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2358 to be a front end, but is not one.
2359
877ab5e9
JH
23602012-05-18 Jan Hubicka <jh@suse.cz>
2361
2362 * lto.c (lto_materialize_constructors_and_inits): Remove.
2363 (read_cgraph_and_symbols): Remove handling of alias pairs.
2364
6649df51
JH
23652012-05-17 Jan Hubicka <jh@suse.cz>
2366
2367 * lto-partition.c (add_references_to_partition): Handle external vars.
2368 (partition_varpool_node_p): Likewise.
2369 (lto_promote_cross_file_statics): Do not promote externals.
2370
d1ede5f4
BS
23712012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2372
2373 * lto-lang.c (handle_fnspec_attribute): New static function.
2374 (lto_attribute_table): Add "fn spec".
2375 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2376
0d6bf48c
JH
23772012-05-04 Jan Hubicka <jh@suse.cz>
2378
2379 * lto.c (do_whole_program_analysis): Set timevars correctly.
2380 (lto_main): Likewise.
d1ede5f4 2381
1d67dde8
RB
23822012-05-04 Richard Guenther <rguenther@suse.de>
2383
2384 * lang.opt (fwpa): Do not mark as Optimization.
2385 (fltrans): Likewise.
2386
65d630d4
JH
23872012-04-30 Jan Hubicka <jh@suse.cz>
2388
2389 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2390 * lto-partition.c (partition_cgraph_node_p): Use
2391 symtab_used_from_object_file_p.
65d630d4
JH
2392 (partition_varpool_node_p): Likewise.
2393
ead84f73
JH
23942012-04-20 Jan Hubicka <jh@suse.cz>
2395
2396 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2397
5932a4d4
JH
23982012-04-18 Jan Hubicka <jh@suse.cz>
2399
2400 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2401 Update for new ipa-ref API.
2402
65c70e6b
JH
24032012-04-16 Jan Hubicka <jh@suse.cz>
2404
2405 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2406 walkers to walk cgraph and varpool.
65c70e6b
JH
2407 (materialize_cgraph): Likewise.
2408 * lto-partition.c (lto_1_to_1_map): Likewise.
2409 (lto_balanced_map): Likewise.
2410 (lto_promote_cross_file_statics): Likewise.
2411
960bfb69
JH
24122012-04-14 Jan Hubicka <jh@suse.cz>
2413
2414 * lto.c: Update field referenced for new cgraph/varpool layout.
2415 * lto-partition.c: Likewise.
2416
a66dc285
JH
24172012-04-11 Jan Hubicka <jh@suse.cz>
2418
2419 * lto.c: Update copyright; remove params.h, ipa-inline.h
2420 and ipa-utils.h inlines; inline lto-partition.h
2421 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2422 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2423 add_references_to_partition, add_cgraph_node_to_partition_1,
2424 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2425 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2426 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2427 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2428 * lto-partition.c: ... here; new file.
2429 * lto-partition.h: New file.
2430 * Make-lang.in (lto.o): Update dependencies.
2431 (lto-partition.o): New.
2432
f3b249e5
RG
24332012-04-05 Richard Guenther <rguenther@suse.de>
2434
2435 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2436 definition.
2437
21fa2faf
RG
24382012-03-12 Richard Guenther <rguenther@suse.de>
2439
2440 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2441
6bb485a3
RG
24422012-03-06 Richard Guenther <rguenther@suse.de>
2443
2444 PR lto/52097
2445 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2446
95510497
RG
24472012-02-28 Richard Guenther <rguenther@suse.de>
2448
2449 PR lto/52400
2450 * lto.c (lto_register_function_decl_in_symtab): Do not register
2451 a reverse renamed decl mapping.
2452
09228fef
JJ
24532012-01-06 Jakub Jelinek <jakub@redhat.com>
2454
2455 PR lto/51774
2456 * lto-lang.c (handle_returns_twice_attribute): New function.
2457 (lto_attribute_table): Add returns_twice attribute.
2458
b03eda0d
RG
24592011-12-21 Richard Guenther <rguenther@suse.de>
2460
2461 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2462 (LTO_FIXUP_TREE): Use it.
2463 (uniquify_nodes): Mark new non-prevailing types and avoid
2464 calling gimple_register_type on others.
2465 (lto_read_decls): Add comment.
2466
4ad9a9de
EB
24672011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2468
2469 * lto.h (lto_parse_hex): Delete.
2470 * lto.c (lto_read_decls): Use 'int' for offsets.
2471 (lto_parse_hex): Make static and return proper 64-bit host type.
2472 (lto_resolution_read): Use proper 64-bit host type.
2473
ea973bad
RG
24742011-12-13 Richard Guenther <rguenther@suse.de>
2475
2476 PR lto/48354
2477 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2478 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2479
c8218030
UB
24802011-12-01 Uros Bizjak <ubizjak@gmail.com>
2481
2482 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2483 (ignore_attribute): New.
2484
57ac2606
AH
24852011-11-21 Aldy Hernandez <aldyh@redhat.com>
2486
2487 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2488 (handle_transaction_pure_attribute): New.
2489
52a35ef7
RG
24902011-11-03 Richard Guenther <rguenther@suse.de>
2491
2492 PR lto/44965
2493 * lto-lang.c (lto_post_options): Do not read file options.
2494 * lto.c (lto_read_all_file_options): Remove.
2495 (lto_init): Call lto_set_in_hooks here.
2496
51973b1e
JH
24972011-10-09 Jan Hubicka <jh@suse.cz>
2498
2499 * lto.c (node_cmp, varpool_node_cmp): New functions.
2500 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2501 (cmp_partitions): Rename to ...
2502 (cmp_partitions_size): ... this one.
2503 (cmp_partitions_order): New function.
2504 (lto_wpa_write_files): Sort partitions by order when
2505 -fno-toplevel-reorder is used.
2506
5958009b
AK
25072011-10-09 Andi Kleen <ak@linux.intel.com>
2508
2509 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2510
e79983f4
MM
25112011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2512
2513 * lto-lang.c (def_builtin_1): Delete old interface with two
2514 parallel arrays to hold standard builtin declarations, and replace
2515 it with a function based interface that can support creating
2516 builtins on the fly in the future. Change all uses, and poison
2517 the old names. Make sure 0 is not a legitimate builtin index.
2518
ecdbd01a 25192011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2520
2521 * lto-object.c (lto_obj_add_section_data): Add list.
2522 (lto_obj_add_section): Fill in list.
2523 (ltoobj_build_section_table): Pass through list.
2524 * lto.c (file_data_list): Declare.
2525 (create_subid_section_table): Pass arguments directly.
2526 Fill in list of file_datas.
2527 (lwstate): Delete.
2528 (lto_create_files_from_ids): Pass in direct arguments.
2529 Don't maintain list.
2530 (lto_file_read): Use explicit section and file data lists.
2531 (lto_read_all_file_options): Pass in section_list.
2532 * lto.h (lto_obj_build_section_table): Add list.
2533 (lto_section_slot): Add next.
2534 (lto_section_list): Declare.
2535
ed0d2da0
JH
25362011-10-02 Jan Hubicka <jh@suse.cz>
2537
2538 PR lto/47247
2539 * common.c (lto_resolution_str): Add new resolution.
2540 * common.h (lto_resolution_str): Likewise.
2541
ad7715f3
L
25422011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2543 Andi Kleen <ak@linux.intel.com>
2544
2545 PR lto/50568
2546 * lto.c (lto_splay_tree_delete_id): New.
2547 (lto_splay_tree_compare_ids): Likewise.
2548 (lto_splay_tree_lookup): Likewise.
2549 (lto_splay_tree_id_equal_p): Likewise.
2550 (lto_splay_tree_insert): Likewise.
2551 (lto_splay_tree_new): Likewise.
2552 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2553 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2554 (create_subid_section_table): Use lto_splay_tree_lookup and
2555 lto_splay_tree_insert.
2556 (lto_file_read): Use lto_splay_tree_new.
2557
ecdbd01a 25582011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2559
2560 * lto.c (lto_resolution_read): Remove id dumping.
2561 (lto_section_with_id): Turn id HOST_WIDE_ID.
2562 (create_subid_section_table): Dito.
2563
892a371f
DS
25642011-08-28 Dodji Seketeli <dodji@redhat.com>
2565
2566 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2567 linemap_add twice.
2568
f82d1a94
MJ
25692011-08-11 Martin Jambor <mjambor@suse.cz>
2570
2571 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2572
f0efc7aa
DN
25732011-08-08 Diego Novillo <dnovillo@google.com>
2574
2575 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2576 * lto.c: Include tree-streamer.h.
2577
1a072294
RG
25782011-07-06 Richard Guenther <rguenther@suse.de>
2579
2580 * lto-lang.c (lto_init):
2581 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2582
7496868d
JH
25832011-06-11 Jan Hubicka <jh@suse.cz>
2584
10f13f22 2585 PR lto/48246
7496868d
JH
2586 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2587 (lto_balanced_map): Likewise.
2588
39e2db00
JH
25892011-06-11 Jan Hubicka <jh@suse.cz>
2590
2591 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2592 (add_cgraph_node_to_partition) ... here; walk aliases.
2593 (lto_1_to_1_map): Remove same body alias code.
2594 (promote_fn): Likewise.
2595 (lto_promote_cross_file_statics): Update comment.
2596
2597
28628ea6
DN
25982011-06-07 Diego Novillo <dnovillo@google.com>
2599
2600 * lto.c (uniquify_nodes): Move code to register decls to
2601 the loop that computes canonical types.
2602
009db074
RG
26032011-06-07 Richard Guenther <rguenther@suse.de>
2604
2605 * lto-lang.c (lto_init): Do not set
2606 size_type_node or call set_sizetype.
2607
47c79d56
DN
26082011-06-04 Diego Novillo <dnovillo@google.com>
2609
2610 * lto.c (lto_init): New.
2611 (lto_main): Call it.
2612
d5828cc7
DN
26132011-06-03 Diego Novillo <dnovillo@google.com>
2614
2615 * lto.c (get_resolution): Move from lto-streamer-in.c.
2616 (lto_register_var_decl_in_symtab): Likewise.
2617 (lto_register_function_decl_in_symtab): Likewise.
2618 (uniquify_nodes): Call lto_register_var_decl and
2619 lto_register_function_decl_in_symtab after reading a new
2620 VAR_DECL or FUNCTION_DECL.
2621
6807da97
RG
26222011-06-01 Richard Guenther <rguenther@suse.de>
2623
2624 * lto-lang.c (lto_register_canonical_types): New function.
2625 (lto_init): Register common nodes with the canonical type machinery.
2626 Do not play tricks with char_type_node.
2627
d74be317
RG
26282011-05-26 Richard Guenther <rguenther@suse.de>
2629
2630 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2631
d9f8303f
NF
26322011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2633
2634 * lto.c (lto_ft_typed): New function.
2635 (lto_ft_common): Call it.
2636 (lto_ft_constructor): Likewise.
2637 (lto_ft_expr): Likewise.
2638 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2639 TREE_CHAIN.
2640
fb291a1e
RG
26412011-05-20 Richard Guenther <rguenther@suse.de>
2642
2643 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2644 (lto_ft_type): Move main-variant and pointer-to chain building ...
2645 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2646 in a separate final loop.
2647
31b3ca64
RG
26482011-05-19 Richard Guenther <rguenther@suse.de>
2649
2650 * lto.c (uniquify_nodes): First register all types before
2651 fixing up the tree SCC.
2652
35d828c5
JH
26532011-05-11 Jan Hubicka <jh@suse.cz>
2654
2655 PR lto/48952
2656 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2657
51545682
NF
26582011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2659
2660 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2661 location of binfo field.
2662 (lto_fixup_prevailing_decls): Likewise.
2663
8242dd04
NF
26642011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2665
2666 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2667 build_function_type_array or build_varargs_function_type_array
2668 instead.
2669
c99c0026
EB
26702011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2671
2672 * lto-lang.c (global_bindings_p): Return bool.
2673
c47d0034
JH
26742011-05-07 Jan Hubicka <jh@suse.cz>
2675
a9bcb3f0
EB
2676 * lto.c (lto_materialize_function): Use
2677 cgraph_function_with_gimple_body_p.
2678 (add_cgraph_node_to_partition): Do not re-add items to partition;
2679 handle thunks.
c47d0034
JH
2680 (add_varpool_node_to_partition): Do not re-add items to partition.
2681
bb3398ca
JH
26822011-05-03 Jan Hubicka <jh@suse.cz>
2683
2684 * lto.c (free_ltrans_partitions): Fix accidental commit.
2685
1cb1a99f
JH
26862011-05-03 Jan Hubicka <jh@suse.cz>
2687
2688 * lto.c (ltrans_partition_def): Remove GTY annotations.
2689 (ltrans_partitions): Move to heap.
2690 (new_partition): Update.
2691 (free_ltrans_partitions): New function.
2692 (lto_wpa_write_files): Use it.
2693
af8bca3c
MJ
26942011-04-29 Martin Jambor <mjambor@suse.cz>
2695
2696 * lto.c: Include ipa-utils.h.
2697 (lto_balanced_map): Update call to ipa_reverse_postorder.
2698 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2699
b823cdfe
MM
27002011-04-29 Michael Matz <matz@suse.de>
2701
2702 * lto.c (toplevel): Include tree-flow.h.
2703 (lto_read_in_decl_state): Don't merge types here.
2704 (tree_with_vars): New static hash table.
2705 (remember_with_vars): New static functions.
2706 (LTO_FIXUP_TYPE): New macro.
2707 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2708 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2709 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2710 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2711 (lto_read_decls): Uniquify while reading in trees.
2712 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2713 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2714 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2715 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2716 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2717 lto_fixup_tree): Remove.
2718 (lto_fixup_state): Remove data argument. Use
2719 lto_symtab_prevailing_decl.
2720 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2721 (lto_fixup_prevailing_decls): New function.
2722 (lto_fixup_state_aux): Argument aux is unused.
2723 (lto_fixup_decls): Don't allocate pointer sets, don't use
2724 lto_fixup_tree, use lto_fixup_prevailing_decls.
2725 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2726 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2727
b9843260
EB
27282011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2729
2730 * lto.c (lto_balanced_map): Fix typos in head comment.
2731 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2732 test.
2733
e7f23018
JH
27342011-04-16 Jan Hubicka <jh@suse.cz>
2735
2736 * lto.c (lto_balanced_map): Update.
2737
10a5dd5d
JH
27382011-04-14 Jan Hubicka <jh@suse.cz>
2739
2740 * lto.c: Include ipa-inline.h
b9843260
EB
2741 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2742 accessor.
10a5dd5d
JH
2743 (ipa_node_duplication_hook): Fix declaration.
2744 * Make-lang.in (lto.o): Update dependencies.
2745
81f653d6
NF
27462011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2747
2748 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2749 calling TREE_CHAIN.
2750 * lto.c (lto_fixup_common): Likewise.
2751
dcf0c47e
NF
27522011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2753
2754 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2755 (handle_type_generic_attribute): Likewise.
2756
e89964e3
MM
27572011-04-03 Michael Matz <matz@suse.de>
2758
2759 * lto.c (lto_materialize_function): Don't read and then discard
2760 sections in WPA mode.
2761 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2762
2763 * lto-lang.c (registered_builtin_fndecls): Remove.
2764 (lto_getdecls): Return NULL_TREE.
2765 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2766
d2b3fe18
RG
27672011-03-31 Richard Guenther <rguenther@suse.de>
2768
2769 PR lto/48246
2770 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2771 partitions when checking is not enabled.
2772
ba78087b
KT
27732011-03-25 Kai Tietz <ktietz@redhat.com>
2774
2775 * lto.c (lto_resolution_read): Use filename_cmp instead
2776 of strcmp.
2777 (lto_read_section_data): Likewise.
2778
0edf1bb2
JL
27792011-03-25 Jeff Law <law@redhat.com>
2780
2781 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2782
62d784f7
KT
27832011-03-21 Kai Tietz <ktietz@redhat.com>
2784
2785 PR target/12171
2786 * lto-lang.c (lto_attribute_table): Adjust table.
2787
62dd9571
JJ
27882011-02-18 Jakub Jelinek <jakub@redhat.com>
2789
2790 PR bootstrap/47807
2791 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2792 of lto-streamer.h.
2793
237d6259
RG
27942011-02-18 Richard Guenther <rguenther@suse.de>
2795
2796 PR lto/47798
2797 * lto-tree.h (lto_global_var_decls): Do not declare here.
2798 * lto-lang.c: Include lto-streamer.h.
2799 * Make-lang.in (lto-lang.o): Adjust dependencies.
2800
8ead2223
KT
28012011-02-10 Kai Tietz <kai.tietz@onevision.com>
2802
2803 PR lto/47241
2804 * lto.c (lto_read_section_data): Free
2805 fd_name in failure case.
2806 For mingw targets don't hash file-descriptor.
2807 (read_cgraph_and_symbols): Close current_lto_file
2808 in failure case.
2809
6e701822
JH
28102011-01-11 Jan Hubicka <jh@suse.cz>
2811
2812 PR lto/45721
2813 PR lto/45375
b9843260
EB
2814 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2815 are not partitioned.
6e701822 2816
f4da8dce
NF
28172010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2818
2819 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2820 Use prototype_p.
2821
6b7fb143
RG
28222010-12-06 Richard Guenther <rguenther@suse.de>
2823
2824 PR lto/46796
2825 * lto-lang.c (lto_init): Give names to basic types.
2826
c59ffc41
JM
28272010-11-30 Joseph Myers <joseph@codesourcery.com>
2828
2829 * lto-object.c: Don't include toplev.h.
2830 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2831
7c475d11
JM
28322010-11-30 Joseph Myers <joseph@codesourcery.com>
2833
2834 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2835 $(TOPLEV_H).
2836
71f3e391
JM
28372010-11-29 Joseph Myers <joseph@codesourcery.com>
2838
2839 * lto-endian.h: Delete.
2840 * lto-object.c: Don't include "libiberty.h".
2841 (O_BINARY): Don't define.
2842 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2843 (O_BINARY): Don't define.
2844
9f1718b0
RG
28452010-11-23 Richard Guenther <rguenther@suse.de>
2846
2847 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2848
39c4e298
RG
28492010-11-23 Richard Guenther <rguenther@suse.de>
2850
2851 PR lto/46605
2852 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2853
b37421c6
JM
28542010-11-17 Joseph Myers <joseph@codesourcery.com>
2855
2856 * lto.c (lto_main): Take no arguments.
2857 * lto.h (lto_main): Update prototype.
2858
d82f74d3
ILT
28592010-11-16 Ian Lance Taylor <iant@google.com>
2860
2861 * lto-object.c (lto_obj_file_open): Call
2862 simple_object_attributes_merge rather than
2863 simple_object_attributes_compare.
2864
a4d8c676
JM
28652010-11-12 Joseph Myers <joseph@codesourcery.com>
2866
2867 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2868 * lto-lang.c (lto_handle_option): Take location_t parameter.
2869
d8a07487
JM
28702010-11-10 Joseph Myers <joseph@codesourcery.com>
2871
2872 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2873 letters and remove trailing '.'.
2874 (lto_file_finalize): Start diagnostic with a lowercase letter.
2875
6b3456d1
ILT
28762010-11-02 Ian Lance Taylor <iant@google.com>
2877
2878 * lto-object.c: New file.
2879 * lto-elf.c: Remove file.
2880 * lto-macho.c: Remove file.
2881 * lto-macho.h: Remove file.
2882 * lto-coff.c: Remove file.
2883 * lto-coff.h: Remove file.
2884 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2885 lto/lto-object.o.
2886 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2887 (lto/lto-objfile.o): New target.
2888 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2889 (lto/lto.o): Remove $(LIBIBERTY_H).
2890
030cd86c
JH
28912010-10-22 Jan Hubicka <jh@suse.cz>
2892
2893 * lto.c (add_cgraph_node_to_partition,
2894 add_varpool_node_to_partition): Add debug info.
2895 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2896 partitioned nodes.
2897 (do_whole_program_analysis): Set function flags before dumping.
2898
4490cae6
RG
28992010-10-22 Richard Guenther <rguenther@suse.de>
2900
2901 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2902 the new gimple_register_canonical_type.
2903
703cdce3
L
29042010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2905
2906 PR bootstrap/45954
2907 * config-lang.in (boot_language): Set to $enable_lto.
2908
1915c739
JJ
29092010-10-18 Jakub Jelinek <jakub@redhat.com>
2910
2911 PR lto/45638
2912 * Make-lang.in (check-lto): New dummy target.
2913
82971de5
EB
29142010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2915
2916 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2917
a75bfaa6
JM
29182010-10-08 Joseph Myers <joseph@codesourcery.com>
2919
2920 * lto-lang.c (lto_init_options): Change to
2921 lto_init_options_struct. Update parameters.
2922 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2923 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2924
937f7f69
JH
29252010-10-06 Jan Hubicka <jh@suse.cz>
2926
2927 * lto.c (lto_balanced_map): Fix accounting of program size.
2928
2169830c
JH
29292010-10-06 Jan Hubicka <jh@suse.cz>
2930
2931 * lto.c (lto_balanced_map): Do not produce empty partitions.
2932
ecdbd01a 29332010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2934
2935 * lto.c (lto_process_name): Add.
2936 (lto_main): Call lto_process_name.
2937
06ed016f
JH
29382010-10-06 Jan Hubicka <jh@suse.cz>
2939
2940 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2941 COMDATs required by the linker.
2942
ae718d66
ILT
29432010-10-05 Ian Lance Taylor <iant@google.com>
2944
2945 * lto.c (lto_section_with_id): Make s a const pointer.
2946
852e4bd2
JH
29472010-10-05 Jan Hubicka <jh@suse.cz>
2948
2949 * lto.c: Include params.h.
2950 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2951 refcounting in aux field.
2952 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2953 New functions.
2954 (lto_1_to_1_map): Simplify.
2955 (lto_balanced_map): New function.
2956 (do_whole_program_analysis): Chose proper partitioning alg.
2957 * Make-lang.in (lto.o): Add dependency on params.h
2958
ecdbd01a 29592010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2960
2961 * Make-lang.in (lto1): Add + to build rule.
2962
ecdbd01a 29632010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2964
2965 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 2966 with fatal_error.
f1e92a43 2967
0d6e14fd
JH
29682010-09-28 Jan Hubicka <jh@suse.cz>
2969
2970 * lto-lang.c (handle_leaf_attribute): New function.
2971 (lto_attribute_tables): Add leaf.
2972
fb462383
JZ
29732010-09-25 Jie Zhang <jie@codesourcery.com>
2974
2975 * lto.c (lto_read_all_file_options): Start a new line after
2976 printing out file names.
2977
051f8cc6
JH
29782010-09-24 Jan Hubicka <jh@suse.cz>
2979
2980 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2981
64e0f5ff
JH
29822010-09-20 Jan Hubicka <jh@suse.cz>
2983
2984 PR tree-optimize/45605
2985 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2986
a929ec3d
GP
29872010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2988
2989 * lto-elf.c (lto_obj_file_open): Also provide filename when
2990 elf_begin fails.
2991
4c588abf
JH
29922010-09-17 Jan Hubicka <jh@suse.cz>
2993
2994 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2995
c3224d6f
RG
29962010-09-17 Richard Guenther <rguenther@suse.de>
2997
2998 * lang.opt (flag_wpa): Also enable for the driver.
2999
52b3b3c7
JH
30002010-09-16 Jan Hubicka <jh@suse.cz>
3001
3002 * lto.c (lto_materialize_function): Do not tamper with STATIC and
3003 EXTERNAL flags.
3004
969c37b7
LB
30052010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3006
3007 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3008
098a4f50
JH
30092010-09-08 Jan Hubicka <jh@suse.cz>
3010
3011 * lto.c (real_file_count, real_file_decl_data): New static vars.
3012 (read_cgraph_and_symbols): Use it.
3013
0f443ad0
RG
30142010-09-08 Richard Guenther <rguenther@suse.de>
3015
3016 * lto.c (read_cgraph_and_symbols): Collect again after each
3017 file.
3018
ee187353
JH
30192010-09-07 Jan Hubicka <jh@suse.cz>
3020
3021 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3022
b3ec52d0
RG
30232010-09-03 Richard Guenther <rguenther@suse.de>
3024
3025 * lto-elf.c (validate_file): Always error if validation fails.
3026
f1395d4a
JH
30272010-08-20 Jan Hubicka <jh@suse.cz>
3028
3029 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3030 (lto_wpa_write_files): Update comments.
3031
2429bce3
L
30322010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3033
3034 PR bootstrap/45357
3035 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3036 with has_analyzed_clone_p.
3037
e0f967db
JH
30382010-08-20 Jan Hubicka <jh@suse.cz>
3039
3040 * lto.c (has_analyzed_clone_p): New function
3041 (lto_materialize_function): Use callgraph to determine if
3042 body is needed.
3043 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3044
ac47786e
NF
30452010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3046
3047 * lto.c: Use FOR_EACH_VEC_ELT.
3048
ecdbd01a 30492010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3050
3051 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3052
5f20c657
JM
30532010-07-27 Joseph Myers <joseph@codesourcery.com>
3054
3055 * lto-lang.c (lto_handle_option): Update prototype and return
3056 value type. Remove duplicate assignment to result.
3057
7a9bf9a4
JM
30582010-07-27 Joseph Myers <joseph@codesourcery.com>
3059
3060 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3061 New.
3062 (lto_init_options): Update prototype.
3063 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3064 Define.
3065
ecdbd01a 30662010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3067
3068 PR lto/44992
92a285c1 3069 * lto.c: Include splay-tree.h
73ce4d1e
AK
3070 (lto_resolution_read): Change to walk file_ids tree and parse
3071 extra file_id in resolution file.
3072 (lto_section_with_id): Add.
3073 (create_subid_section_table): Add.
3074 (lwstate): Add.
3075 (lto_create_files_from_ids): Add.
3076 (lto_file_read): Change to handle sub file ids and create list
3077 of file_datas. Add output argument for count.
3078 (get_section_data): Pass file_data to lto_get_section_name.
3079 (lto_flatten_file): Add.
3080 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3081
ecdbd01a 30822010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3083
3084 * lto-coff.c (hash_name, eq_name): Move.
3085 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3086 * lto-elf.c: (hash_name, eq_name): Move.
3087 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3088 * lto-macho.c: (hash_name, eq_name): Move.
3089 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3090 * lto.c: (hash_name, eq_name): Move from lto-*.c
3091 (lto_obj_create_section_hash_table): Add.
3092 (free_with_string): Add.
3093
718f9c0f
MLI
30942010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3095
3096 * lto-coff.c: Include diagnostic-core.h in every file that
3097 includes toplev.h.
3098 * lto-elf.c: Likewise.
3099 * lto-lang.c: Likewise.
3100 * lto-macho.c: Likewise.
3101
1b137837
JJ
31022010-07-07 Jakub Jelinek <jakub@redhat.com>
3103
3104 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3105 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3106 objects.
3107
92eb4438
JH
31082010-07-05 Jan Hubicka <jh@suse.cz>
3109
3110 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3111 nodes from same comdat group as well as all comdat functions referenced
3112 here.
b9843260
EB
3113 (add_varpool_node_to_partition, add_references_to_partition): New
3114 function.
3115 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3116 add_varpool_node_to_partition; clear aux flags when done.
3117 (lto_promote_cross_file_statics): Do not promote stuff that gets
3118 duplicated to each ltrans.
92eb4438 3119
a05541a9
JH
31202010-07-04 Jan Hubicka <jh@suse.cz>
3121
92a285c1 3122 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3123
4a2ac96f
RG
31242010-06-13 Richard Guenther <rguenther@suse.de>
3125
3126 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3127
1d536046
KT
31282010-06-09 Kai Tietz <kai.tietz@onevision.com>
3129
3130 * lto.c (lto_resolution_read): Pre-initialize local variable r.
3131 * lto-coff.c (coff_write_object_file): Add braces to if.
3132
a9429e29
LB
31332010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3134
3135 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3136 (lto_file_read): Likewise.
3137 (new_partition): Likewise.
3138 (read_cgraph_and_symbols): Likewise.
3139
5498f011
JM
31402010-06-07 Joseph Myers <joseph@codesourcery.com>
3141
3142 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3143 (lto_handle_option): Don't set flag_signed_char here.
3144
d4c0c9f6
RG
31452010-06-04 Richard Guenther <rguenther@suse.de>
3146
3147 PR lto/41584
3148 * lto.c (lto_1_to_1_map): Use the proper file_data for
3149 varpool nodes.
3150
0a5fa5a1
JH
31512010-05-30 Jan Hubicka <jh@suse.cz>
3152
3153 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3154 partitioning decisions.
3155
9eec9488
JH
31562010-05-29 Jan Hubicka <jh@suse.cz>
3157
3158 * lto.c (bitmap vector): Remove.
3159 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3160 (ltrans_partition_def): New structure.
3161 (ltrans_partition): New type and VECtor.
3162 (new_partition): New function.
3163 (add_cgraph_node_to_partition): New function.
3164 (lto_1_to_1_map): Reorganize for partitions.
3165 (lto_add_inline_clones): Remove.
3166 (lto_add_all_inlinees): Remove.
3167 (lto_promote_cross_file_statics): Use partitions.
3168 (cmp_partitions): New function.
3169 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3170 use partitions; output files sorted by size.
3171
3e097227
SB
31722010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3173
3174 * Make-lang.in: Replace vec.h dependency with VEC_H.
3175
7ca92787
JM
31762010-05-28 Joseph Myers <joseph@codesourcery.com>
3177
3178 * lto-coff.c (coff_errmsg): Remove.
3179 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3180 errors instead of coff_errmsg (-1).
3181 * lto-macho.c (mach_o_errmsg): Remove.
3182 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3183 instead of mach_o_errmsg (-1).
3184 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3185 xstrerror (errno).
3186
b5611987
RG
31872010-05-28 Richard Guenther <rguenther@suse.de>
3188
3189 * lto.c (prefix_name_with_star): Removed.
3190 (strip_extension): Likewise.
3191 (get_filename_for_set): Likewise.
3192 (lto_write_ltrans_list): Fold into ...
3193 (lto_wpa_write_files): ... this. Name LTRANS units
3194 by suffixing the ltrans output list filename.
3195 (do_whole_program_analysis): Adjust.
3196
1da2ed5f
JM
31972010-05-27 Joseph Myers <joseph@codesourcery.com>
3198
3199 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3200 (read_cgraph_and_symbols, lto_main): Use seen_error.
3201 * Make-lang.in (lto/lto.o): Update dependencies.
3202
7951d88a
EB
32032010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3204
3205 PR lto/44230
3206 * lto.h (lto_eh_personality): New prototype.
3207 * lto.c: Include debug.h.
3208 (first_personality_decl): New static variable.
3209 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3210 first function for which it is non-null.
3211 (lto_eh_personality_decl): New static variable.
3212 (lto_eh_personality): New function.
3213 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3214 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3215
e12da9c2
SB
32162010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3217
3218 * lto-lang.c: Do not include expr.h.
3219
468194f4
RG
32202010-05-24 Richard Guenther <rguenther@suse.de>
3221
3222 * lto-elf.c (lto_obj_build_section_table): Work around
3223 FreeBSD libelf issue.
3224
bd9eb5da
RG
32252010-05-22 Richard Guenther <rguenther@suse.de>
3226
3227 * lto.c (read_cgraph_and_symbols): Do not collect.
3228
66576e1b
JH
32292010-05-20 Jan Hubicka <jh@suse.cz>
3230
3231 * lto.c (promote_var, promote_fn): New functions.
3232 (lto_promote_cross_file_statics): Compute correctly boundary including
3233 static initializers of readonly vars.
3234
36576655
JH
32352010-05-18 Jan Hubicka <jh@suse.cz>
3236
66576e1b 3237 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3238 (lto_promote_cross_file_statics): Deal with non-inline clones.
3239
28632d63
JH
32402010-05-18 Jan Hubicka <jh@suse.cz>
3241
3242 * lto.c (lto_materialize_function): Announce function when
3243 reading body; allocate_struct_function only when reading body;
3244 do not finalize local statics; ggc_collect after reading;
3245 do not mark reachable node.
3246 (materialize_cgraph): Do not announce function.
3247
33e42d56
JH
32482010-05-11 Jan Hubicka <jh@suse.cz>
3249
3250 * lto.c (materialize_cgraph): Revert my previous patch.
3251
f6430ea5
KT
32522010-05-11 Kai Tietz <kai.tietz@onevision.com>
3253
3254 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3255 IMAGE_FILE_MACHINE_AMD64.
3256 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3257
0a0b07b7
JH
32582010-05-11 Jan Hubicka <jh@suse.cz>
3259
3260 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3261 (materialize_cgraph): Add it here.
3262
9a809897
JH
32632010-05-11 Jan Hubicka <jh@suse.cz>
3264
3265 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3266 vector.
3267
32682010-05-11 Jan Hubicka <jh@suse.cz>
3269
3270 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3271 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3272 use reachable_from_other_partition_p and
3273 referenced_from_other_partition_p test.
3274
94f64249
KT
32752010-05-11 Kai Tietz <kai.tietz@onevision.com>
3276
3277 * lto-coff.c (validate_file): Add x64-coff support.
3278 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3279 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3280 * lto-lang.c (lto_build_c_type_nodes): Add check for
3281 'long long unsigned int' for x64-windows.
3282 (lto_init): Likewise.
3283
3284
c082f9f3
SB
32852010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3286
3287 * lto.h (struct lto_file_struct): Document offset member.
3288 * lto-endian.h: New file.
3289 * lto-macho.h: New file.
3290 * lto-macho.c: New file.
3291 * Make-lang.in: Add rule for lto-macho.o.
3292
3f8257db 32932010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3294
3295 PR lto/43857
3296 PR lto/43371
3297 * lang.opt (fresolution): Change to ...
3298 (fresolution=): ... this.
3299 * lto-lang.c (lto_handle_option): Adjust.
3300
48cf395b
RB
33012010-05-07 Richard Guenther <rguenther@suse.de>
3302
3303 * lto.c (DUMPBASE_SUFFIX): Remove.
3304 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3305 Rename to ...
3306 (lto_write_ltrans_list): ... only output the list of ltrans files.
3307 (lto_maybe_unlink): Remove.
3308 (do_whole_program_analysis): Do not execute LTRANS phase
3309 from here.
3310
afa83c15
L
33112010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3312
3313 * lto-lang.c (lto_handle_option): Add argument kind.
3314
369451ec
JH
33152010-05-05 Jan Hubicka <jh@suse.cz>
3316
48cf395b
RB
3317 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3318 refs.
369451ec 3319
2f41ecf5
JH
33202010-05-05 Jan Hubicka <jh@suse.cz>
3321
3322 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3323
ace72c88
JH
33242010-04-30 Jan Hubicka <jh@suse.cz>
3325
b9843260
EB
3326 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3327 use default name.
ace72c88
JH
3328 (lto_wpa_write_files): Write any non-empty partition.
3329
05575e07
JH
33302010-04-30 Jan Hubicka <jh@suse.cz>
3331
3332 * lto.c: Do not attempt to make constant pool references global.
3333
49ba8180
JH
33342010-04-28 Jan Hubicka <jh@suse.cz>
3335
3336 * lto/lto.c (lto_read_in_decl_state): Use GGC.
3337 (lto_wpa_write_files): Announce what we are writting.
3338 (all_file_decl_data): New.
3339 (read_cgraph_and_symbols): Use GGC; correct timevars.
3340 (do_whole_program_analysis): Collect.
3341 * lto/Make-lang.in (lto.o): Fix dependency.
3342 * Makefile.in (GTFILES): Add lto-streamer.h.
3343 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3344 (varpool_assemble_pending_decls): Use VAROUT.
3345 * lto-streamer.h (lto_tree_ref_table): Annotate.
3346 (lto_in_decl_state): Annotate.
3347 (lto_file_decl_data): Annotate.
3348
2942c502
JH
33492010-04-28 Jan Hubicka <jh@suse.cz>
3350
3351 * lto.c (lto_varpool_node_sets): New.
3352 (lto_1_to_1_map): Partition varpool too.
3353 (globalize_context_t, globalize_cross_file_statics,
3354 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3355 lto_scan_statics_in_remaining_global_vars): Remove.
3356 (lto_promote_cross_file_statics): Rewrite.
3357 (get_filename_for_set): Take vset argument.
3358 (lto_wpa_write_files): Pass around vsets.
3359
3bec79c5
DK
33602010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3361
3362 PR lto/42776
3363 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3364 hardcoding 'lto-elf.o'.
3365 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3366
3367 * lto-coff.h: New file.
3368 * lto-coff.c: Likewise.
3369
21aac880
RG
33702010-04-26 Richard Guenther <rguenther@suse.de>
3371
3372 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3373
2cee0101
DK
33742010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3375
3376 * lto.h (lto_elf_file_open): Rename prototype from this ...
3377 (lto_obj_file_open): ... to this.
3378 (lto_elf_file_close): Likewise ...
3379 (lto_obj_file_close): ... and likewise.
3380 (lto_elf_build_section_table): Likewise ...
3381 (lto_obj_build_section_table): ... and likewise.
3382 (lto_elf_begin_section): Likewise ...
3383 (lto_obj_begin_section): ... and likewise.
3384 (lto_elf_append_data): Likewise ...
3385 (lto_obj_append_data): ... and likewise.
3386 (lto_elf_end_section): Likewise ...
3387 (lto_obj_end_section): ... and likewise.
3388 * lto.c (lto_file_read): Update references to the above.
3389 (lto_wpa_write_files): Likewise.
3390 (lto_read_all_file_options): Likewise.
3391 (read_cgraph_and_symbols): Likewise.
3392 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3393 (LANG_HOOKS_APPEND_DATA): Likewise.
3394 (LANG_HOOKS_END_SECTION): Likewise.
3395 * lto-elf.c (lto_elf_file_open): Rename from this ...
3396 (lto_obj_file_open): ... to this, updating any references.
3397 (lto_elf_file_close): Likewise ...
3398 (lto_obj_file_close): ... and likewise.
3399 (lto_elf_build_section_table): Likewise ...
3400 (lto_obj_build_section_table): ... and likewise.
3401 (lto_elf_begin_section): Likewise ...
3402 (lto_obj_begin_section): ... and likewise.
3403 (lto_elf_append_data): Likewise ...
3404 (lto_obj_append_data): ... and likewise.
3405 (lto_elf_end_section): Likewise ...
3406 (lto_obj_end_section): ... and likewise.
3407
bc58d7e1
JH
34082010-04-21 Jan Hubicka <jh@suse.cz>
3409
3410 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3411 (materialize_cgraph): Likewise.
3412
e792884f
JH
34132010-04-21 Jan Hubicka <jh@suse.cz>
3414
3415 * lto.c (lto_wpa_write_files): Update.
3416 (read_cgraph_and_symbols): Be more verbose.
3417 (materialize_cgraph): Likewise.
3418 (do_whole_program_analysis): Likewise.
3419
c9945504
JH
34202010-04-21 Jan Hubicka <jh@suse.cz>
3421
3422 * lto.c (globalize_cross_file_statics): When function has address taken,
3423 it needs to be public.
3424
a837268b
JH
34252010-04-20 Jan Hubicka <jh@suse.cz>
3426
3427 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3428 (lto_add_all_inlinees): Likewise.
3429 (lto_wpa_write_files): Likewise.
3430
3b9e5d95
EB
34312010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3432
3433 * lto-lang.c (lto_init): Remove second argument in call to
3434 build_common_tree_nodes.
3435
8ccb78f2
RO
34362010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3437
3438 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3439 function.
3440
2f9b99e6
EB
34412010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3442
3443 PR bootstrap/43276
3444 * lto-elf.c: Define EM_* constants if not already defined.
3445
bef7d288
EB
34462010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3447
3448 * lto-elf.c (is_compatible_architecture): New static function.
3449 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3450
f68df07c
RG
34512010-02-11 Richard Guenther <rguenther@suse.de>
3452
3453 PR driver/43021
3454 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3455 appropriately.
3456
3cdea2b4
AH
34572010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3458
3459 * lto.c (O_BINARY): Define.
3460 (lto_read_section_data): Open file in binary mode.
3461 * lto-elf.c (O_BINARY): Define.
3462 (lto_elf_file_open): Open file in binary mode.
3463
c59449fa
RG
34642010-01-08 Richard Guenther <rguenther@suse.de>
3465
3466 PR lto/42528
3467 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3468 (lto_init): Do not init char_type_node in a standard way
3469 but according to flag_signed_char.
3470
d7fb0a6d
L
34712010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3472
3473 PR lto/41564
3474 * lto.c (DUMPBASE_SUFFIX): New.
3475 (lto_execute_ltrans): Append a sequence number to -dumpbase
3476 for LTRANS.
3477
78ce4053
L
34782010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3479
3480 PR lto/42580
3481 * lto-elf.c (lto_elf_file_open): Stop if the command line
3482 option file is missing.
3483
2a71eb48
RG
34842009-12-15 Richard Guenther <rguenther@suse.de>
3485
3486 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3487 (lto_post_options): Do not disable debuginfo.
3488
a818bca1
DG
34892009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3490
3491 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3492
e7d00517
RG
34932009-12-11 Richard Guenther <rguenther@suse.de>
3494
3495 PR lto/42037
3496 * lto.c (lto_resolution_read): Properly grow the vector.
3497
1ab53893
RG
34982009-12-11 Richard Guenther <rguenther@suse.de>
3499
3500 PR lto/41915
3501 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3502 to the C99 default. Do not set flag_unit_at_a_time.
3503
0f900dfa
JJ
35042009-11-28 Jakub Jelinek <jakub@redhat.com>
3505
3506 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3507 variable.
3508
92fa7608
RAE
35092009-11-19 Rafael Avila de Espindola <espindola@google.com>
3510
3511 PR bootstrap/42096
3512 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3513 * lto.c (lto_parse_hex): New.
3514 (lto_resolution_read): Use lto_parse_hex.
3515 * lto.h (lto_parse_hex): New.
3516
9870fe4f
RAE
35172009-11-17 Rafael Avila de Espindola <espindola@google.com>
3518
3519 * lto-elf.c (lto_file_init): Add offset argument.
3520 (lto_elf_file_open): Record the offset.
3521 * lto.c (lto_resolution_read): Change file_name into a lto_file
3522 argument. Check offsets.
3523 (lto_file_read): Update call to lto_resolution_read.
3524 * lto.h (lto_file_struct): Add the offset field.
3525
1b70729f
RAE
35262009-11-16 Rafael Avila de Espindola <espindola@google.com>
3527
3528 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3529
0e3776db
JH
35302009-11-14 Jan Hubicka <jh@suse.cz>
3531
3532 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3533
06bd7f56
RAE
35342009-11-12 Rafael Avila de Espindola <espindola@google.com>
3535
3536 * lang.opt (fresolution): Renamed from resolution.
3537 * lto-lang.c (lto_handle_option): Handle new option name.
3538 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3539
7e9dc421 35402009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3541 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3542
3543 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3544 (lto_elf_file_open): Handle offsets in arguments name@offest.
3545
b207f900
RG
35462009-10-30 Richard Guenther <rguenther@suse.de>
3547
3548 PR lto/41858
3549 * lto.c (lto_file_read): Do not set file_data->fd.
3550 (lto_read_section_data): Use a single-entry file-descriptor cache.
3551 Do not check the result of xmalloc.
3552 (free_section_data): Do not use file_data->fd.
3553 (lto_read_all_file_options): Likewise.
3554
2c928155
RG
35552009-10-22 Richard Guenther <rguenther@suse.de>
3556
3557 * lto.c (lto_fixup_jump_functions): Remove.
3558 (lto_fixup_decls): Do not fixup jump functions.
3559 (read_cgraph_and_symbols): Schedule cgraph merging after
3560 summary reading. Schedule type and decl fixup before
3561 summary reading.
3562
f9c91f8a
RB
35632009-10-22 Richard Guenther <rguenther@suse.de>
3564
3565 * lto.c (lto_fixup_data_t): Remove free_list member.
3566 (lto_fixup_tree): Do not insert into free_list.
3567 (free_decl): Remove.
3568 (lto_fixup_decls): Remove free-list handling.
3569
fb3f88cc
JH
35702009-10-22 Jan Hubicka <jh@suse.cz>
3571
3572 * lto.c (lto_fixup_jump_functions): New function.
3573 (lto_fixup_decls): Use it.
3574
35f1e9f4
RG
35752009-10-16 Richard Guenther <rguenther@suse.de>
3576
3577 PR lto/41715
3578 * lto.c (lto_fixup_tree): Revert last change.
3579
200c8750
RG
35802009-10-14 Richard Guenther <rguenther@suse.de>
3581
3582 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3583 compatible with the one we replace wrap it around a
3584 VIEW_CONVERT_EXPR.
3585
b1b07c92
RG
35862009-10-09 Richard Guenther <rguenther@suse.de>
3587
3588 PR lto/41635
3589 PR lto/41636
3590 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3591 a file.
3592 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3593 (init_ehdr##BITS): Likewise.
3594
3c2e7d45
JM
35952009-10-08 Joseph Myers <joseph@codesourcery.com>
3596
3597 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3598 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3599 diagnostics.
3600 * lto-lang.c (lto_post_options): Remove trailing "." from
3601 diagnostics.
3602
0d0bfe17
RG
36032009-10-08 Richard Guenther <rguenther@suse.de>
3604
3605 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3606 hash tables.
3607
4bedf19a
JM
36082009-10-07 Joseph Myers <joseph@codesourcery.com>
3609
3610 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3611
b20996ff
JH
36122009-10-07 Jan Hubicka <jh@suse.cz>
3613
3614 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3615 ltrans stage; explain why this is needed and should not.
3616
1a735925
RG
36172009-10-05 Richard Guenther <rguenther@suse.de>
3618
3619 PR lto/41552
3620 PR lto/41487
3621 * lto.c (lto_read_decls): Do not register deferred decls.
3622 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3623 until after reading the IPA summaries.
3624
d7f09764
DN
36252009-10-02 Rafael Avila de Espindola <espindola@google.com>
3626
3627 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3628 (lto-lang.c): Don't include lto/common.h.
3629
36302009-10-02 Rafael Avila de Espindola <espindola@google.com>
3631
3632 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3633 (lto/common.o): Remove.
3634 * common.c: Remove.
3635 * common.h (lto_kind_str): Remove.
3636 (lto_visibility_str): Remove.
3637 (lto_resolution_str): Make it static.
3638
36392009-10-01 Diego Novillo <dnovillo@google.com>
3640
3641 * lto.c (lto_read_decls): Add comment.
3642 Call internal_error instead of gcc_assert.
3643 (lto_resolution_read): Likewise.
3644 (lto_add_all_inlinees): Tidy.
3645 * Make-lang.in: Fix copyright boilerplate.
3646 (lto.pdf): New.
3647 (lto.install-pdf): New.
3648 * lto-tree.h: Fix copyright boilerplate.
3649 * lang-specs.h: Likewise.
3650 Remove ".lto" entry from compilers fragment.
3651 * lto-elf.c: Move inclusion of gelf.h after config.h.
3652 Tidy formatting everywhere.
3653 * lto.h: Fix copyright boilerplate.
3654 Tidy formatting everywhere.
3655 * common.c: Likewise.
3656 * config-lang.in: Likewise.
3657 * common.h: Likewise.
3658 * lto-lang.c: Likewise.
3659
36602009-10-01 Richard Guenther <rguenther@suse.de>
3661
3662 * lto.c (lto_read_section_data): Use plain lseek/read.
3663
36642009-10-01 Richard Guenther <rguenther@suse.de>
3665
3666 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3667 use sysconf to query the system page size.
3668 (lto_file_read): Implement fallback using stdio.
3669 (free_section_data): Likewise.
3670
36712009-09-29 Diego Novillo <dnovillo@google.com>
3672
3673 * lto-lang.c (lto_init): Really fix call to
3674 build_common_builtin_nodes.
3675
36762009-09-29 Diego Novillo <dnovillo@google.com>
3677
3678 * lto-lang.c (lto_init): Fix call to
3679 build_common_builtin_nodes.
3680
36812009-09-29 Richard Guenther <rguenther@suse.de>
3682
3683 PR lto/40754
3684 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3685 in bytes.
3686 (first_data_block): New static variable.
3687 (lto_elf_append_data): Align the first data block in each
3688 section.
3689
36902009-09-28 Diego Novillo <dnovillo@google.com>
3691
3692 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3693 * lto.c (strip_extension): New.
3694 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3695 (lto_execute_ltrans): Tidy.
3696 Do not pass -fwpa nor -fltrans-* to LTRANS.
3697 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3698 * tree.c (need_assembler_name_p): Call
3699 lang_hooks.decls.may_need_assembler_name_p if set.
3700 * varasm.c (default_binds_local_p_1): Remove check for
3701 flag_ltrans.
3702 * varpool.c (decide_is_variable_needed): Do not test for
3703 in_lto_p.
3704
37052009-09-22 Richard Guenther <rguenther@suse.de>
3706
3707 PR lto/39276
3708 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3709 * Make-lang.in: Remove ltrans-driver stuff.
3710 * config-lang.in: Likewise.
3711 * lang.opt (fltrans-driver): Remove.
3712 * lto-lang.c (lto_init_options): Remove code initializing
3713 ltrans_driver.
3714 * ltrans-driver: Remove.
3715
37162009-09-21 Diego Novillo <dnovillo@google.com>
3717
3718 * lto-lang.c (lto_define_builtins): Remove superfluous
3719 calls to targetm.init_builtins and build_common_builtin_nodes.
3720 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3721 build_common_builtin_nodes.
3722 * lto.c (lto_materialize_function): Do nothing if NODE is a
3723 clone.
3724
37252009-09-03 Diego Novillo <dnovillo@google.com>
3726
3727 * lto-elf.c (validate_file): Replace call to
3728 elf_getshstrndx with call to elf_getshdrstrndx.
3729
37302009-08-19 Richard Guenther <rguenther@suse.de>
3731
3732 * lto-lang.c (lto_init): Merge char_type_node with the
3733 appropriately signed variant.
3734
37352009-08-19 Richard Guenther <rguenther@suse.de>
3736
3737 PR lto/41071
3738 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3739 (lto_fixup_type): Re-build the pointer-to chain part two.
3740
37412009-08-19 Richard Guenther <rguenther@suse.de>
3742
3743 PR lto/41071
3744 * lto.c (lto_fixup_type): Re-build the type variant chain.
3745
37462009-08-19 Richard Guenther <rguenther@suse.de>
3747
3748 PR lto/41071
3749 * lto.c (lto_fixup_constructor): New function.
3750 (lto_fixup_tree): Replace all types. Properly fixup
3751 constructors and constants.
3752
37532009-08-14 Richard Guenther <rguenther@suse.de>
3754
3755 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3756 for DECL_LANG_SPECIFIC.
3757
37582009-08-13 Richard Guenther <rguenther@suse.de>
3759
3760 PR lto/41032
3761 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3762
37632009-07-30 Richard Guenther <rguenther@suse.de>
3764
3765 PR lto/40903
3766 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3767 the largest decl for output and free TREE_CHAIN for further
3768 use.
3769
37702009-07-24 Diego Novillo <dnovillo@google.com>
3771
3772 * Make-lang.in: Add empty lto.install-plugin target.
3773
37742009-07-13 Diego Novillo <dnovillo@google.com>
3775
3776 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3777
37782009-07-11 Richard Guenther <rguenther@suse.de>
3779
3780 * lto-lang.c (lto_write_globals): Wrapup global decls.
3781
37822009-07-10 Richard Guenther <rguenther@suse.de>
3783
3784 * lto-lang.c (lto_init): Allocate one more location to make
3785 BUILTINS_LOCATION correct.
3786
37872009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3788
3789 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3790
37912009-07-06 Diego Novillo <dnovillo@google.com>
3792
3793 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3794 TYPE_SIZE_UNIT.
3795
37962009-07-06 Diego Novillo <dnovillo@google.com>
3797
3798 * lto.c (preload_common_nodes): Remove.
3799 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3800 (lto_read_decls): Call lto_data_in_create and
3801 lto_data_in_delete.
3802 (free_decl): Do not call ggc_free.
3803 (lto_main): Call lto_init_reader.
3804 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3805 (lto_init): Initialize main_identifier_node if needed.
3806 Make ptrdiff_type_node be integer_type_node.
3807
38082009-06-19 Diego Novillo <dnovillo@google.com>
3809
3810 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3811 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3812 Remove code guarded by #ifdef LOCAL_TRACE.
3813
38142009-06-18 Diego Novillo <dnovillo@google.com>
3815
3816 * lto.c: Update license to GPLv3.
3817 * lto-elf.c: Likewise.
3818 * common.c: Likewise.
3819 * lto-lang.c: Likewise.
3820 * lto.h: Remove superfluous include files. Update all
3821 users.
3822
38232009-06-17 Diego Novillo <dnovillo@google.com>
3824
3825 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3826
38272009-06-02 Diego Novillo <dnovillo@google.com>
3828
3829 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3830 read in.
3831 (materialize_cgraph): Only materialize nodes that have a
3832 representation on file.
3833
38342009-06-01 Diego Novillo <dnovillo@google.com>
3835
3836 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3837
38382009-05-31 Diego Novillo <dnovillo@google.com>
3839
3840 * lto-lang.c (lto_type_for_mode): Handle all the modes
3841 handled in c_common_type_for_mode.
3842
38432009-05-21 Diego Novillo <dnovillo@google.com>
3844
3845 * lto-elf.c: Always include <gelf.h>.
3846 * config-lang.in (target_libs): Remove.
3847 (build_by_default): Set to no.
3848
38492009-05-15 Diego Novillo <dnovillo@google.com>
3850
3851 * lto.c (lto_materialize_function): Assert that DECL is
3852 not a builtin.
3853 (materialize_cgraph): Don't try to materialize builtin
3854 functions.
3855 * lto-section-out.c (write_symbol_vec): Do not write
3856 builtin functions.
3857
38582009-05-13 Diego Novillo <dnovillo@google.com>
3859
3860 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3861
38622009-05-07 Diego Novillo <dnovillo@google.com>
3863
3864 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3865 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3866 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3867 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3868 (lto_fixup_tree): Call gimple_register_type when *TP is a
3869 type.
3870 (lto_main): Call bitmap_obstack_initialize.
3871
38722009-04-22 Diego Novillo <dnovillo@google.com>
3873
3874 * lto.c (free_section_data): Tidy.
3875 (lto_1_to_1_map): Tidy.
3876 (lto_add_all_inlinees): Tidy.
3877 (prefix_name_with_star): New.
3878 (get_filename_for_set): New.
3879 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3880 to determine what cgraph node sets to write.
3881 Call get_filename_for_set to compute temporary file
3882 names.
3883 (lto_execute_ltrans): Do not execute LTRANS on files with
3884 names that start with '*'.
3885 Move logic to execute LTRANS together so that LTRANS is
3886 invoked only if there are any files to compile.
3887 (do_whole_program_analysis): Only remove output files
3888 that do not start with '*'.
3889
38902009-04-06 Diego Novillo <dnovillo@google.com>
3891
3892 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3893 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3894 (lto_add_all_inlinees): Tidy.
3895
38962009-03-26 Diego Novillo <dnovillo@google.com>
3897
3898 * lto.c: Include gimple.h.
3899 (lto_read_in_decl_state): Call gimple_register_type for
3900 every type in every stream.
3901 (lto_fixup_common): Call gimple_register_type if T has a
3902 type.
3903 (do_whole_program_analysis): Call print_lto_report.
3904 (lto_main): Call print_lto_report after cgraph_optimize.
3905 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3906
39072009-03-24 Diego Novillo <dnovillo@google.com>
3908
3909 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3910 (lto.o): Add dependency on GIMPLE_H.
3911
39122009-03-10 Simon Baldwin <simonb@google.com>
3913
3914 * lto.c (lto_read_all_file_options): Close any open file descriptor
3915 contained in file_data before freeing.
3916
39172009-02-24 Rafael Avila de Espindola <espindola@google.com>
3918
3919 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3920 for a decl in the original bitmap, not a node.
3921 (lto_add_all_inlinees): Remove original nodes that are not needed.
3922 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3923
39242009-02-24 Diego Novillo <dnovillo@google.com>
3925
3926 * lto.c (lto_materialize_function): Update
3927 lto_stats.num_function_bodies.
3928 (get_section_data): Initialize *LEN to 0.
3929 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3930 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3931 Update lto_stats.num_output_files.
3932 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3933 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3934 (lto_main): Initialize lto_stats.
3935 If flag_lto_report is set, call print_lto_report.
3936
39372009-02-19 Diego Novillo <dnovillo@google.com>
3938
3939 Revert
3940
3941 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3942
3943 * lto.c (lto_add_inline_clones): Don't add the
3944 master clone. Check for a decl in the original
3945 bitmap, not a node.
3946 (lto_add_all_inlinees): Remove original nodes
3947 that are not needed.
3948 (lto_scan_statics_in_cgraph_node): Don't care if
3949 the node is the master.
3950 (lto_promote_cross_file_statics): Use a new
3951 context.seen_node_decls for each set
3952
39532009-02-19 Rafael Avila de Espindola <espindola@google.com>
3954
3955 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3956 for a decl in the original bitmap, not a node.
3957 (lto_add_all_inlinees): Remove original nodes that are not needed.
3958 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3959 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3960 for each set
3961
39622009-02-18 Diego Novillo <dnovillo@google.com>
3963
3964 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3965 and TV_WHOPR_WPA_IO.
3966 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3967 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3968 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3969 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3970 depending on command line flags.
3971 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3972 (lto_main): Remove timer uses.
3973
39742009-02-18 Rafael Avila de Espindola <espindola@google.com>
3975
3976 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3977 (lto_wpa_write_files): Update calls to renamed functions.
3978
39792009-02-17 Diego Novillo <dnovillo@google.com>
3980
3981 PR 39203
3982 * lto-lang.c (lto_post_options): Disable -fwhole-program
3983 when running LTRANS.
3984
39852009-02-10 Diego Novillo <dnovillo@google.com>
3986
3987 * lto.c (read_cgraph_and_symbols): Fix comment.
3988
39892009-02-10 Diego Novillo <dnovillo@google.com>
3990
3991 * lto.c (read_cgraph_and_symbols): Read options from all
3992 IL files.
3993
39942009-02-10 Diego Novillo <dnovillo@google.com>
3995
3996 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3997 (materialize_cgraph): Likewise.
3998 (do_whole_program_analysis): Likewise.
3999 (lto_main): Call read_cgraph_and_symbols,
4000 materialize_cgraph and do_whole_program_analysis.
4001
40022009-02-10 Simon Baldwin <simonb@google.com>
4003
4004 * lto.c: Include lto-opts.h.
4005 * (lto_main): Clear file options at loop start, read any saved
4006 options from the first file handled, and re-issue options.
4007 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4008
40092009-02-02 Diego Novillo <dnovillo@google.com>
4010
4011 * lto.c (lto_main): Stop LTO_TIMER and use
4012 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4013
40142009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4015
4016 PR lto/38995
4017 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4018 to POINTER_SIZE.
4019
40202009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4021
4022 * Make-lang.in (LTO_EXE): Link with all
4023 BACKENDLIBS and not only GMPLIBS
4024
40252009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4026
4027 PR bootstrap/38992
4028 * lto-elf.c: Include gelf.h instead of libelf.h.
4029 (lto_elf_file_close): Replace elfx_update_shstrndx with
4030 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4031 gelf_update_ehdr.
4032
40332009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4034
4035 PR middle-end/38996
4036 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4037
40382009-01-26 Diego Novillo <dnovillo@google.com>
4039
4040 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4041
40422009-01-26 Diego Novillo <dnovillo@google.com>
4043
4044 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4045 and rename into gimple_types_compatible_p.
4046
40472009-01-12 Rafael Avila de Espindola <espindola@google.com>
4048
4049 * lto-lang.c (lang_hooks): Remove the const qualifier.
4050
40512009-01-06 Diego Novillo <dnovillo@google.com>
4052
4053 * ltrans-driver: Mark 'all' target as phony.
4054
40552008-12-31 Diego Novillo <dnovillo@google.com>
4056
4057 * ltrans-driver: Execute a NOP action for target 'all'.
4058
40592008-12-19 Diego Novillo <dnovillo@google.com>
4060
4061 * lto.c (lto_1_to_1_map): Tidy.
4062
40632008-12-19 Diego Novillo <dnovillo@google.com>
4064
4065 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4066 be opened, show its name.
4067 * ltrans-driver: If $verbose is set, do not use parallelism.
4068
40692008-12-17 Rafael Avila de Espindola <espindola@google.com>
4070
4071 * lto.c (lto_fixup_function): New.
4072 (lto_fixup_tree): Call lto_fixup_function.
4073
40742008-12-14 Doug Kwan <dougkwan@google.com>
4075
4076 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4077 variables if there is no function.
4078
40792008-12-10 Simon Baldwin <simonb@google.com>
4080
4081 * ltrans-driver: Always run make in silent mode, to avoid make's
4082 trace on stdout interfering with lto-wrapper output.
4083
40842008-12-10 Doug Kwan <dougkwan@google.com>
4085
4086 * lto.c (lto_add_inline_clones): Do not force master clones of
4087 inlined functions already in SET to be static inline.
4088
40892008-12-04 Doug Kwan <dougkwan@google.com>
4090
4091 * lto.c (globalize_context_t): New type to store states in
4092 globalization of cross-file statics.
4093 (globalize_cross_file_statics): New.
4094 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4095 static decls that need to be fixed up.
4096 (lto_scan_statics_in_cgraph_node): Change call interface to use
4097 a globalize_context_t CONTEXT for all states used.
4098 (lto_scan_statics_in_remaining_global_vars): New.
4099 (lto_promote_cross_file_statics): Use new call interface of
4100 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4101 visible vars in the last set.
4102
41032008-12-03 Diego Novillo <dnovillo@google.com>
4104
4105 * lto.c (lto_fixup_tree): Do not emit an error when
4106 PREVAILING throw but T doesn't.
4107
41082008-12-02 Doug Kwan <dougkwan@google.com>
4109
4110 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4111 from code in ...
4112 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4113 variables and functions.
4114 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4115 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4116
41172008-11-29 Diego Novillo <dnovillo@google.com>
4118
4119 * lto.c: Include timevar.h.
4120 (lto_materialize_function): Tidy. Add comments.
4121 (lto_wpa_write_files): Tidy.
4122 (lto_execute_ltrans): Tidy.
4123 (lto_main): Add local variable LTO_TIMER. Initialize it
4124 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4125 Start and stop the timer.
4126 Tidy comments.
4127 * Make-lang.in (lto.o): Add dependency on timevar.h.
4128 * ltrans-driver: React to -v and -save-temps.
4129 Use simple heuristic to determine how much parallelism to
4130 use when executing make.
4131
41322008-11-12 Doug Kwan <dougkwan@google.com>
4133
4134 * lto.c (lto_bitmap_obstack): Remove var.
4135 (lto_materialize_function): Do nothing instead of marking function
4136 body in file if flag_wpa is true.
4137 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4138 (lto_scan_statics_in_cgraph_node): New function.
4139 (lto_promote_cross_file_statics): Same.
4140 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4141 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4142 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4143
41442008-11-09 Diego Novillo <dnovillo@google.com>
4145
4146 * lto/lto.c (lto_fixup_tree): Change error message locus
4147 information to include location of mismatching
4148 declaration.
4149 Use TREE_NO_WARNING to avoid repeated messages.
4150 (lto_main): If lto_fixup_decls emitted any errors, exit.
4151 * lto/lto-lang.c: Don't include libfuncs.h and except.h
4152 (lto_init_options): Don't enable exceptions by default.
4153 (lto_eh_runtime_type): Move to lto-function-in.c
4154 (lto_init_eh): Likewise.
4155 (lto_init): Don't call lto_init_eh.
4156 * lto/Make-lang.in (lto-lang.o): Remove dependency on
4157 libfuncs.h and except.h.
4158
41592008-10-30 Diego Novillo <dnovillo@google.com>
4160
4161 * lto.c (lto_read_decls): Declare debug_main only if
4162 LTO_STREAM_DEBUGGING is enabled.
4163
41642008-10-30 Simon Baldwin <simonb@google.com>
4165
4166 * lto.c (lto_wpa_write_files): Create intermediate files with
4167 make_cwd_temp_file().
4168 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4169 WPA_SAVE_LTRANS is set.
4170 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4171 * ltrans-driver: Do not strip directory from output files.
4172
41732008-10-29 Doug Kwan <dougkwan@google.com>
4174
4175 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4176 DECL.
4177 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4178 (lto/lto-symtab.o): Remove rule.
4179 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4180 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4181 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4182 Remove macros.
4183 lto-symtab.c (File): Move up one level.
4184 lto-lang.c (cgraph.h): Remove include.
4185 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4186 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4187 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4188
41892008-10-24 Rafael Espindola <espindola@google.com>
4190
4191 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4192 non prevailing weak symbols.
4193
41942008-10-24 Rafael Espindola <espindola@google.com>
4195
4196 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4197
41982008-10-24 Rafael Espindola <espindola@google.com>
4199
4200 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4201 different types.
4202
42032008-10-23 Simon Baldwin <simonb@google.com>
4204
4205 * lto-lang.c (input_node): Save the node reference, rather than the
4206 node pointer, in node->inlined_to.
4207 (input_cgraph_1): Convert node references into node pointers.
4208
42092008-10-22 Diego Novillo <dnovillo@google.com>
4210 Rafael Espindola <espindola@google.com>
4211
4212 * lto.c (lto_resolution_read): Tidy.
4213 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4214 abort if RET is NULL.
4215
42162008-10-22 Doug Kwan <dougkwan@google.com>
4217
4218 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4219 exceptions flag is given.
4220 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4221 (lto_init_eh): Remove exceptions flag initialization.
4222 (lto_init): Only call lto_init_eh if exceptions flag is set.
4223
42242008-10-21 Diego Novillo <dnovillo@google.com>
4225
4226 * lto.c: Tidy some formatting.
4227 * lto.h: Likewise.
4228
42292008-10-21 Simon Baldwin <simonb@google.com>
4230
4231 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4232 them is NULL (but not the other).
4233
42342008-10-17 Diego Novillo <dnovillo@google.com>
4235
4236 * ltrans-driver: Divert output from make to a temporary file.
4237 Show it if the call to make failed.
4238
42392008-10-15 Diego Novillo <dnovillo@google.com>
4240
4241 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4242 Do not print TEMP_FILENAME
4243 * ltrans-driver: Call make with -s.
4244
42452008-10-15 Diego Novillo <dnovillo@google.com>
4246
4247 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4248 TREE_STATIC on global symbols.
4249
42502008-10-14 Ollie Wild <aaw@google.com>
4251
4252 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4253 (LTRANS_DRIVER_EXE): Add.
4254 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4255 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4256 (lto.install.common): Remove ltrans-driver.
4257 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4258 (LTRANS_DRIVER_EXE): New build rule.
4259 * config-lang.in (compilers): Add ltrans-driver.
4260
42612008-10-14 Diego Novillo <dnovillo@google.com>
4262
4263 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4264 of program name.
4265
42662008-10-13 Ollie Wild <aaw@google.com>
4267
4268 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4269 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4270 * ltrans-driver (LTRANS_FLAGS): Remove.
4271
42722008-10-08 Doug Kwan <dougkwan@google.com>
4273
4274 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4275 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4276 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4277 from lto_fixup_state to here.
4278 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4279 just a free-list. Fix up types also. Move decl merging code to
4280 lto_fixup_tree.
4281 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4282 object.
4283 (lto_fixup_decls): Use another pointer set to avoid multiple
4284 walking of nodes except for DECLs to be replaced. Pass an
4285 lto_fixup_data_t object to tree-walker.
4286
42872008-10-08 Rafael Espindola <espindola@google.com>
4288
4289 * lto-symtab.c (lto_symtab_set_resolution): New.
4290 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4291 lto_symtab_get_resolution.
4292 (lto_symtab_prevailing_decl): Return decl for non public decls.
4293 (lto_symtab_get_resolution): New.
4294 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4295
42962008-10-06 Rafael Espindola <espindola@google.com>
4297
4298 * lto-lang.c: Include cgraph.h.
4299 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4300 input_cgraph): Moved from lto-cgraph.c.
4301 (LANG_HOOKS_INPUT_CGRAPH): New.
4302
43032008-10-03 Rafael Espindola <espindola@google.com>
4304
4305 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4306
43072008-10-03 Rafael Espindola <espindola@google.com>
4308
4309 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4310 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4311 prevailing definition. Don't mark TREE_NOTHROW differences.
4312 * lto.c (lto_fixup_tree): New.
4313 (lto_fixup_state): New.
4314 (lto_fixup_state_aux): New.
4315 (free_decl): New.
4316 (lto_fixup_decls): New.
4317 (lto_main): Call lto_fixup_decls.
4318
43192008-10-02 Ollie Wild <aaw@google.com>
4320
4321 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4322 and Init.
4323 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4324 * lto-lang.c (lto_post_options): Add validation and fixups for
4325 -fltrans and -fwpa.
4326
43272008-10-02 Rafael Espindola <espindola@google.com>
4328
4329 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4330 lto_symtab_merge_decl): Return void.
4331 (lto_symtab_prevailing_decl): New.
4332
43332008-09-30 Rafael Espindola <espindola@google.com>
4334
4335 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4336 defined symbols.
4337 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4338 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4339 Check for already defined symbols.
4340 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4341 (LTO_IDENTIFIER_RESOLUTION): Remove.
4342 (LTO_DECL_RESOLUTION): New.
4343
43442008-09-30 Rafael Espindola <espindola@google.com>
4345
4346 * lto.c (lto_read_decls): Use new input_tree signature.
4347
43482008-09-26 Doug Kwan <dougkwan@google.com>
4349
4350 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4351 bodies affected by exception attribute merging of DECLs.
4352 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4353 merging.
4354
43552008-09-25 Rafael Espindola <espindola@google.com>
4356
4357 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4358 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4359 * lto-symtab.c (lto_symtab_compatible): New.
4360 (lto_symtab_overwrite_decl): New.
4361 (lto_symtab_merge_decl): Refactor to use the above functions
4362 and the resolution from lang_identifier.
4363 * lto-tree.h: Include plugin-api.h.
4364 (lang_identifier): Add resolution.
4365 (LTO_IDENTIFIER_RESOLUTION): New.
4366
43672008-09-25 Ollie Wild <aaw@google.com>
4368
4369 * lang.opt (fltrans-output-list=): New option.
4370 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4371
43722008-09-25 Rafael Espindola <espindola@google.com>
4373
4374 * lto.c (lto_resolution_read): Initialize ret;
4375
43762008-09-24 Ollie Wild <aaw@google.com>
4377
4378 * lto.c (sys/mman.h): Move include.
4379 (lto_wpa_write_files): Return a list of written files.
4380 (lto_execute_ltrans): New function.
4381 (lto_main): Call lto_execute_ltrans.
4382 (ltrans-driver): New file.
4383 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4384 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4385 (lto_init_options): Initialize ltrans_driver.
4386 (lto_handle_option): Fix incorrect default output value.
4387 * lang.opt (fltrans-driver=): New option.
4388 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4389 (lto.install-common): Add lto/ltrans-driver.
4390
43912008-09-24 Rafael Espindola <espindola@google.com>
4392
4393 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4394 (lto/lto.o): Depend on lto/common.h.
4395 (lto/common.o): New.
4396 * lang.opt (resolution): New.
4397 * lto-lang.c (resolution_file_name): New.
4398 (lto_handle_option): Handle OPT_resolution.
4399 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4400 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4401 pass it to lto_symtab_merge_decl.
4402 * lto.c: Include common.h.
4403 (lto_read_decls): Add resolutions and resolutions_size arguments.
4404 Initialize data_in.globals_resolution and
4405 data_in.globals_resolution_size.
4406 (index_and_symbol_resolution): New.
4407 (lto_resolution_read): New.
4408 (lto_file_read): Add argument resolution_file.
4409 Read resolution.
4410 * lto.h (resolution_file_name): New.
4411
44122008-09-23 Rafael Espindola <espindola@google.com>
4413
4414 * common.c: Update description.
4415 * common.h: Update description.
4416
44172008-09-23 Rafael Espindola <espindola@google.com>
4418
4419 * common.c: Moved from lto-plugin.
4420 * common.h: Moved from lto-plugin.
4421
44222008-09-22 Doug Kwan <dougkwan@google.com>
4423
4424 * lto.c (VEC(bitmap,heap)): Declare.
4425 (lto_materialize_function): Handle WAP mode specially.
4426 (lto_add_inline_clones): New.
4427 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4428 return a bitmap of inlined decls.
4429 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4430 (lto_main): Call reset_inline_failed to reset inlining states.
4431 Check call-graph after WPA inlining.
4432 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4433 unconditionally.
4434
44352008-09-19 Doug Kwan <dougkwan@google.com>
4436
4437 lto.c (lto_main): Remove unsued wrapper code.
4438 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4439
44402008-09-19 Rafael Espindola <espindola@google.com>
4441
4442 * lto-symtab.c: Include lto-tree-in.h.
4443 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4444 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4445 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4446
44472008-09-17 Paolo Bonzini <bonzini@gnu.org>
4448 Rafael Avila de Espindola <espindola@google.com>
4449
4450 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4451 COMPOUND_LITERAL_EXPR_DECL): Remove.
4452 (emit_local_var): Remove.
4453 (lto_expand_expr): Remove.
4454 (lto_staticp): Remove.
4455 (LANG_HOOKS_EXPAND_EXPR): Remove.
4456 (LANG_HOOKS_STATICP): Remove.
4457
44582008-09-11 Diego Novillo <dnovillo@google.com>
4459
4460 * lto-lang.c: Include except.h and libfuncs.h.
4461 (lto_init_eh): New.
4462 (lto_init): Call it.
4463 Set flag_generate_lto to 0.
4464 * Make-lang.in (lto-lang.o): Add dependency on except.h
4465 and libfuncs.h.
4466
44672008-09-09 Bill Maddox <maddox@google.com>
4468
4469 * lto-lang.c: Include header file expr.h.
4470 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4471 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4472 (emit_local_var): Copied from c-semantics.c.
4473 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4474 and c_staticp in c-common.c.
4475 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4476
44772008-09-08 Diego Novillo <dnovillo@google.com>
4478
4479 * lto-lang.c (lto_global_bindings_p): Return 1 during
4480 IPA passes.
4481
44822008-09-07 Diego Novillo <dnovillo@google.com>
4483
4484 * lto.c: Tidy formatting.
4485
44862008-08-04 Bill Maddox <maddox@google.com>
4487
4488 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4489
44902008-09-03 Doug Kwan <dougkwan@google.com>
4491
4492 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4493 CIF_OK instead of NULL.
4494
44952008-09-02 Diego Novillo <dnovillo@google.com>
4496 Simon Baldwin <simonb@google.com>
4497
4498 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4499 c_common_type_for_size.
4500 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4501 (lto_init): Call linemap_add.
4502 (signed_and_unsigned_types): Remove.
4503
45042008-08-29 Diego Novillo <dnovillo@google.com>
4505
4506 * lto-lang.c (handle_noreturn_attribute): New local function.
4507 (handle_const_attribute): New local function.
4508 (handle_malloc_attribute): New local function.
4509 (handle_pure_attribute): New local function.
4510 (handle_novops_attribute): New local function.
4511 (handle_nonnull_attribute): New local function.
4512 (handle_nothrow_attribute): New local function.
4513 (handle_sentinel_attribute): New local function.
4514 (handle_type_generic_attribute): New local function.
4515 (handle_format_attribute): New local function.
4516 (handle_format_arg_attribute): New local function.
4517 (lto_attribute_table): Declare.
4518 (lto_format_attribute_table): Declare.
4519 (lto_init_attributes): New local function.
4520 (lto_define_builtins): Call it.
4521 Call targetm.init_builtins and build_common_builtin_nodes.
4522 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4523 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4524
45252008-08-28 Diego Novillo <dnovillo@google.com>
4526
4527 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4528 $(GIMPLE_H).
4529 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4530 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4531 * lto-symtab.c: Include gimple.h.
4532 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4533 TREE_CHAIN.
4534
45352008-08-27 Doug Kwan <dougkwan@google.com>
4536
4537 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4538 gt-lto-lto.h): New includes.
4539 (lto_materialize_function): Do not read in function body in WPA mode.
4540 Format a line to fit in 80 columns.
4541 (lto_cgraph_node_sets): New garbage collected variable.
4542 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4543 New functions.
4544 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4545 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4546 variable LTO_SECTION_IN_H.
4547 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4548 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4549 with variable LTO_SECTION_IN_H.
4550 * config-lang.in (gtfiles): Add lto/lto.c.
4551 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4552 merged DECL_RESULT correctly.
4553
45542008-08-26 Bill Maddox <maddox@google.com>
4555
4556 * lto-lang.c Include tree-gimple.h.
4557 (lto_mark_addressable): Call mark_addressable rather than
4558 asserting.
4559 (lto_post_options): Suppress debug info generation.
4560 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4561
3f8257db 45622008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4563
4564 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4565 assertion and leave an explanatory comment in its place.
4566
45672008-08-21 Doug Kwan <dougkwan@google.com>
4568
4569 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4570 of common nodes instead of computing locallly.
4571 (lto_read_in_decl_state): New.
4572 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4573 Read global and per-function in-decl states.
4574 * Make-lang.in (LTO_H): Update dependency.
4575 (lto/lto.o): Same.
4576 (lto-symtab.c): Merge (revision 139039)
4577 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4578
45792008-08-21 Rafael Espindola <espindola@google.com>
4580
4581 * config-lang.in (target_libs): New.
4582
45832008-08-20 Bill Maddox <maddox@google.com>
4584
4585 * lto.c (current_lto_file): Remove GTY marker from static
4586 variable. Remove include of file gt-lto-lto.h.
4587 * Make-lang.in: Remove dependency of lto/lto.o on
4588 gt-lto-lto.h.
4589 * lto-elf.c (lto_file_close): Removed.
4590 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4591 allocate lto_elf_file object.
4592 (lto_elf_file_close): Free lto_elf_file object after close.
4593 * lto.h (struct lto_file_struct): Remove GTY marker.
4594 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4595 gtfiles.
4596
45972008-08-20 Bill Maddox <maddox@google.com>
4598
4599 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4600 to conform to its new signature.
4601 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4602 on discarded node here, now called in global_vector_fixup.
4603
46042008-08-09 Bill Maddox <maddox@google.com>
4605
4606 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4607 has not been set to a front-end-specific value.
4608
46092008-08-05 Doug Kwan <dougkwan@google.com>
4610
4611 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4612 build breakage.
4613
46142008-07-30 Bill Maddox <maddox@google.com>
4615
4616 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4617 Remove obsolete comments.
4618 (lto_read_decls): Remove initialization of deleted field data_in.global.
4619 Tidy up comments.
4620 (lto_main): Remove redundant initialization of section_hash_table.
4621 * lto-elf.c: Removed obsolete comments.
4622 * lto.h: Tidy up comments.
4623 * lto-symtab.c (lto_least_common_multiple): New function.
4624 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4625 Tidy up comments.
4626
46272008-07-25 Diego Novillo <dnovillo@google.com>
4628 Bill Maddox <maddox@google.com>
4629
4630 * lto.c: Re-order include files.
4631 Include lto-section-out.h.
4632 (preload_common_nodes): Add debugging output.
4633 Add new local INDEX_TABLE.
4634 Call preload_common_node.
4635 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4636
46372008-07-13 Bill Maddox <maddox@google.com>
4638
4639 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4640 unwanted scaling during pointer addition.
4641
46422008-07-11 Bill Maddox <maddox@google.com>
4643 Diego Novillo <dnovillo@google.com>
4644
4645 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4646 Make code const-correct.
4647 (lto_file_read): Fix C++ compatibility warnings.
4648 (lto_read_section_data): Fix C++ compatibility warnings.
4649 (lto_get_section_data): Use CONST_CAST to avoid warning when
4650 const pointer passed to free.
4651 * lto-elf.c (lto_elf_build_section_table): Fix C++
4652 compatibility warnings.
4653 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4654 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4655 (lto_get_current_out_file): Fix C++ compatibility warnings.
4656
46572008-07-11 Diego Novillo <dnovillo@google.com>
4658
4659 * Make-lang.in (lto-warn): Define.
4660
46612008-07-03 Simon Baldwin <simonb@google.com>
4662
4663 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4664 LTO_STREAM_DEBUGGING.
4665
46662008-06-27 Ollie Wild <aaw@google.com>
4667
4668 * lto-elf.c (lto-section-out.h): New include.
4669 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4670 and data members.
4671 (cached_file_attrs): New static variable.
4672 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4673 Use cached_file_attrs for checking bits.
4674 (lto_elf_build_section_table): Remove elf_file argument from
4675 lto_elf_get_shdr and lto_elf_free_shdr calls.
4676 (DEFINE_INIT_SHDR): New macro.
4677 (init_shdr32, init_shdr64): New functions defined via the
4678 DEFINE_INIT_SHDR macro.
4679 (lto_elf_begin_section_with_type): New function.
4680 (lto_elf_begin_section): New function.
4681 (lto_elf_append_data): New function.
4682 (lto_elf_end_section): New function.
4683 (DEFINE_VALIDATE_EHDR): New macro.
4684 (validate_ehdr32, validate_ehdr64): New functions defined via the
4685 DEFINE_VALIDATE_EHDR macro.
4686 (validate_file): New function.
4687 (DEFINE_INIT_EHDR): New macro.
4688 (init_ehdr32, init_ehdr64): New functions defined via the
4689 DEFINE_INIT_EHDR macro.
4690 (init_ehdr): New function.
4691 (lto_elf_file_open): Add support for writable files. Move some
4692 validation logic to validate_file.
4693 (lto_elf_file_close): Add support for writable files. Write file data
4694 and free data blocks.
4695 (current_out_file): New static variable.
4696 (lto_set_current_out_file): New function.
4697 (lto_get_current_out_file): New function.
4698 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4699 Add temporary initialization for testing ELF serialization.
4700 * lto.h (lto-section-out.h): New include.
4701 (struct lto_file_struct): Slight modification to comment.
4702 (lto_elf_file_open): Add writable parameter.
4703 (lto_elf_begin_section): New function declaration.
4704 (lto_elf_append_data): New function declaration.
4705 (lto_elf_end_section): New function declaration.
4706 (lto_set_current_out_file, lto_get_current_out_file): New function
4707 declarations.
4708 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4709 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4710 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4711 * Make-lang.in (LTO_H): Add lto-section-out.h.
4712
47132008-06-12 Ollie Wild <aaw@google.com>
4714
4715 * lto.h (struct lto_file_vtable_struct): Remove.
4716 (struct lto_file_struct): Remove vtable member.
4717 * lto-elf.c (lto_file_init): Remove vtable argument.
4718 (lto_elf_map_optional_lto_section): Remove.
4719 (lto_elf_unmap_section): Remove.
4720 (lto_elf_file_vtable): Remove.
4721 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4722 lto_file_init call.
4723 (lto_elf_find_section_data): Remove.
4724
47252008-06-11 Ollie Wild <aaw@google.com>
4726
4727 * lto.c (lto_file_read): Add const qualifier to data variable.
4728
47292008-06-11 Diego Novillo <dnovillo@google.com>
4730
4731 Merge from lto-streamber sub-branch.
4732
4733 2008-06-04 Ollie Wild <aaw@google.com>
4734
4735 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4736 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4737
4738 2008-05-28 Bill Maddox <maddox@google.com>
4739
4740 Replace the DWARF reader in the LTO front-end.
4741
4742 * lto.c: Include lto-tree-in.h, lto-tags.h.
4743 (enum DWARF2_class, DW_cl_constant, struct
4744 DWARF2_form_data, struct lto_context,
4745 lto_fd_init, lto_info_fd_init,
4746 lto_abbrev_fd_init, lto_info_fd_close,
4747 lto_file_init, lto_file_close,
4748 lto_file_corrupt_error, lto_abi_mismatch_error,
4749 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4750 lto_read_uleb128, lto_read_sleb128,
4751 lto_read_initial_length, lto_abbrev_read_attrs,
4752 lto_abbrev_read, lto_abbrev_read_lookup,
4753 lto_read_section_offset,
4754 lto_read_comp_unit_header, find_cu_for_offset,
4755 lto_get_file_name,
4756 lto_resolve_reference,lto_read_form,
4757 attribute_value_as_int,
4758 make_signed_host_wide_int,
4759 attribute_value_as_constant, lto_cache_hash,
4760 lto_cache_eq, lto_cache_store_DIE,
4761 lto_cache_lookup_DIE, lto_find_integral_type,
4762 lto_find_integral_type_1,
4763 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4764 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4765 lto_unsupported_attr_error, lto_get_identifier,
4766 lto_read_referenced_type_DIE,
4767 lto_read_compile_unit_DIE,
4768 lto_read_array_type_DIE,
4769 lto_read_structure_union_class_type_DIE,
4770 lto_read_enumerator_DIE,
4771 lto_read_enumeration_type_DIE,
4772 lto_read_only_for_child_DIEs,
4773 lto_read_only_for_child_DIEs,
4774 lto_read_member_DIE, lto_read_abbrev,
4775 lto_read_variable_formal_parameter_constant_DIE,
4776 lto_get_body): Removed.
4777 (preload_common_nodes): New function.
4778 (lto_read_decls): Convert for new global streamer.
4779 (lto_materialze_file_data,
4780 lto_read_subroutine_type_subprogram_die,
4781 lto_read_unspecified_parameters_DIE,
4782 lto_read_typedef_DIE,
4783 lto_read_pointer_reference_type_DIE,
4784 lto_read_subrange_type_DIE,
4785 lto_read_base_type_DIE,
4786 lto_read_const_volatile_restrict_type_DIE,
4787 lto_read_namespace_DIE,
4788 lto_read_unspecified_type_DIE, lto_read_DIE,
4789 lto_read_child_DIEs, lto_collect_child_DIEs):
4790 Removed.
4791 (lto_info_read, lto_set_cu_context): Removed.
4792 (lto_file_read): Convert for new global streamer.
4793 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4794 lto_resolve_var_ref, lto_resolve_fn_ref,
4795 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4796 lto_resolve_namespacedecl_ref): Removed.
4797 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4798 * lto-tree.h (lto_symtab_merge_var,
4799 lto_symtab_mergee_fun): Declare here.
4800 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4801 (lto_elf_file_open): Removed code to read DWARF debug sections.
4802 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4803 DWARF2_CompUnit, lto_die_ptr,
4804 lto_die_cache_entry, lto_fd, lto_info_fd,
4805 lto_abbrev_fd): Removed.
4806 (lto_file): Removed debug_info and debug_abbrev fields.
4807 (lto_ref): Removed.
4808 (lto_file_init, lto_file_close,
4809 lto_resolve_type_ref, lto_resolve_var_ref,
4810 lto_resolve_fn_ref, lto_resolve_field_ref,
4811 lto_resolve_typedecl_ref,
4812 lto_resolve_namespacedecl_ref,
4813 lto_get_file_name): Removed declarations.
4814 (lto_symtab_merge_var, lto_symtab_merge_fn):
4815 Declarations moved to lto-tree.h.
4816 * lto-symtab.c (lto_compatible_attributes_p):
4817 Lobotomize this, as it barfs on "Hello, world!".
4818 * lto-section-out.c: Include lto-tree-out.h.
4819 (lto_hash_global_slot_node,
4820 lto_eq_global_slot_node, preload_common_nodes,
4821 write_global_stream, write_global_references):
4822 New functions.
4823 (produce_asm_for_decls): Convert for new global streamer.
4824 * lto-section-out.h (lto_hash_global_slot_node,
4825 lto_eq_global_slot_node): Declare.
4826
3f8257db 48272008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4828 Jan Hubicka <jh@suse.cz>
4829
4830 * lto.c (sys/mman.h, tree-pass.h): New includes.
4831 (lto_materialize_constructors_and_inits,
4832 lto_materialize_function): Keeps length of section.
4833 (lto_materialize_cgraph): Removed.
4834 (lto_read_decls): Initialize fd field.
4835 (lto_file_read): Different return type and removed much code to
4836 lto_main.
4837 (page_mask): New variable.
4838 (lto_read_section_data, get_section_data, free_section_data): New
4839 functions.
4840 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4841 passes can get the section data.
4842
3f8257db 48432008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4844
4845 * lto.h (lto_read_decls): Made local.
4846 (lto_input_function_body, lto_input_constructors_and_inits,
4847 lto_input_cgraph): Declarations moved to lto-section-in.h.
4848 * lto-section-in.c: Moved to .. .
4849 * lto-cgraph-in.c: Ditto.
4850 * lto-section-in.h: Ditto.
4851 * lto-function-in.c: Ditto.
4852 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4853 (lto_insert_block): Removed.
4854 (LANG_HOOKS_INSERT_BLOCK): Removed.
4855 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4856 lto-section-in.o): Rules moved to lto/Makefile.in.
4857
4858
48592008-05-16 Ollie Wild <aaw@google.com>
4860
4861 * lto-lang.c (tree-inline.h): Include.
4862 (lto_post_options): New function.
4863 (LANG_HOOKS_POST_OPTIONS): Define.
4864 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4865 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4866
48672008-05-13 Diego Novillo <dnovillo@google.com>
4868
4869 * lto-function-in.c (input_ssa_names): Call
4870 make_ssa_name_fn instead of make_ssa_name.
4871
48722008-05-12 Diego Novillo <dnovillo@google.com>
4873
4874 * lto-cgraph-in.c (overwrite_node): Update references to
4875 inline summary fields.
4876 * lto-function-in.c (input_expr_operand): Do not handle
4877 STRUCT_FIELD_TAG.
4878
48792008-05-09 Ollie Wild <aaw@google.com>
4880
4881 * lang.opt: New file.
4882 * lto-lang.c (lto_init_options): New function.
4883 (lto_handle_option): New function.
4884 (lto_init): Move initialization of flag_unit_at_a_time to
4885 lto_init_options.
4886 (LANG_HOOKS_INIT_OPTIONS): Define.
4887 (LANG_HOOKS_HANDLE_OPTION): Define.
4888
48892008-04-29 Ollie Wild <aaw@google.com>
4890
4891 * lto.c (lto_read_namespace_DIE): New function.
4892 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4893 NAMESPACE_DECL DIE's.
4894 (lto_resolve_namespacedecl_ref): New function.
4895 * lto.h (lto_resolve_namespacedecl_ref): New function.
4896 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4897 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4898 and num_namespace_decls.
4899 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4900 * lto-lang.c (lto_init_ts): New function.
4901 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4902
49032008-04-16 Ollie Wild <aaw@google.com>
4904
4905 * lto-function-in.c (input_type_ref): Updated function description.
4906
49072008-04-16 Ollie Wild <aaw@google.com>
4908
4909 * lto-function-in.c (input_type_ref_1): New function.
4910 (input_type_ref): Split into two functions.
4911 (input_function): Add support for type contexts.
4912
49132008-04-16 Ollie Wild <aaw@google.com>
4914
4915 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4916 section name
4917
49182008-04-16 Ollie Wild <aaw@google.com>
4919
4920 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4921 list of supported languages.
4922
3f8257db 49232008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4924
4925 Merge with mainline @133491.
4926
3f8257db 49272008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4928 Jan Hubicka <jh@suse.cz>
4929
4930 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4931 fd->unmaterialized_fndecls.
4932 (lto_get_file_name, lto_materialize_cgraph): New function.
4933 (lto_materialize_constructors_and_inits,
4934 lto_materialize_function): Read info directly from elf file.
4935 (lto_file_read): Made local and initialize dictionary so that
4936 other lto sections can be read without reprocessing the elf file.
4937 (lto_main): Read all functions after all files have been processed
4938 for their types, globals and cgraph.
4939 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4940 dependencies.
4941 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4942 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4943 (lto_elf_read_symtab): Removed function.
4944 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4945 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4946 (lto_file_read): Made local.
4947 (lto_get_file_name, lto_elf_build_section_table,
4948 lto_input_cgraph):
4949 New function.
4950 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4951 New functions.
4952 (lto_read_decls): Get the file name.
4953 * lto-cgraph-in.c: New file.
4954 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4955 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4956 (input_labels): Fixed latent sizeof issue.
4957 (input_function): Build stmt array to set call sites into cgraph
4958 edges.
4959 (lto_read_body): Reset cfun->curr_properties.
4960 * lto_section_in.h (lto_section_slot): New structure.
4961 (section_hash_table.lto_file_decl_data): New field.
4962
4963
3f8257db 49642008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4965
4966 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4967 reconstruct static initializers.
4968 (lto_get_body, lto_materialize_function): Add lto_section_type as
4969 a parameter.
4970 (lto_materialize_constructors_and_inits,
4971 lto_materialize_file_data): New function.
4972 (lto_materialize_function,
4973 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4974 unmap_section and map_fn_body to map_section.
4975 (lto_set_cu_context): Process functions and static inits
4976 differently.
4977 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4978 lto/lto-section-in.o): Update dependencies.
4979 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4980 lto_section_type parameter.
4981 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4982 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4983 renamed the other two so that there is only one map function and
4984 one unmap function and each takes a section type parameter.
4985 (lto_read_function_body): Renamed to lto_input_function_body and
4986 added file_data parameter.
4987 (lto_read_var_init): Removed.
4988 (lto_input_constructors_and_inits): New function.
4989 * lto-section-in.c (lto_read_decls): New function.
4990 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4991 var_decls, type_decls, types to lto_file_decl_data.
4992 (input_type_ref, input_expr_operand, lto_read_body): Get
4993 field_decls, fn_decls, var_decls, type_decls, types from different
4994 structure.
4995 (input_globals, input_constructor, lto_read_var_init): Removed.
4996 (input_constructors_or_inits): New function.
4997 (lto_read_function_body, lto_input_constructors_and_inits):
4998 Renamed to lto_input_function_body and takes file_data parameter.
4999 * lto-section-in.h (lto_file_decl_data): New structure.
5000
3f8257db 50012008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5002
5003 * lto-function-in.c (input_globals.c): Changed input type to
5004 lto_function_header.
5005 (input_bb): Removed code to deserialize the stmt number.
5006 (input_function): Renumber all stmts after they are input.
5007 (lto_read_body, lto_read_function_body, lto_read_var_init):
5008 Changed to used new header format and enum section_type.
5009 *lto-lang.c (success): Removed.
5010
50112008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5012
5013 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5014 (lto_elf_free_sym): Likewise.
5015
5016 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5017 (lto_elf_build_init): Likewise.
5018
3f8257db 50192008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5020
5021 * lto-read.c: Renamed to lto-function-in.c.
5022 (input_1_unsigned): Moved to lto-section-in.c and renamed
5023 lto_input_1_unsigned.
5024 (input_uleb128): Moved to lto-section-in.c and renamed
5025 lto_input_uleb128.
5026 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5027 lto_input_widest_uint_uleb128.
5028 (input_sleb128): Moved to lto-section-in.c and renamed
5029 lto_input_sleb128.
5030 (input_integer): Moved to lto-section-in.c and renamed
5031 lto_input_integer.
5032 (debug_in_fun): Moved to lto-section-in.c and renamed
5033 lto_debug_in_fun.
5034 (input_block): Moved to lto-section-in.h and renamed
5035 lto_input_block.
5036 (input_expr_operand): Fixed to allow lists with more than one
5037 element.
5038 * lto-section-in.h: New file.
5039 * lto-section-in.c: New file with changes from above.
5040 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5041 (lto-section-in.o): New rule.
5042
50432007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5044
5045 * lto-read.c (input_expr_operand): Mark static and external
5046 VAR_DECLs as needed.
5047
50482007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5049
5050 * lto-read.c (input_integer): Use the correct shift amount.
5051
50522007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5053
5054 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5055 (LANG_HOOKS_NAME): Define.
5056
50572007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5058
5059 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5060 original function to...
5061 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5062 don't have a base type.
5063 (lto_read_enumeration_type_DIE): Examine the values of the
5064 enumeration to determine whether we can use an unsigned type for
5065 the base type of the enumeration.
5066
50672007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5068
5069 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5070 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5071
50722007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5073
5074 * lto-lang.c (lto_types_compatible_p): New function.
5075 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5076
50772007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5078 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5079
5080 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5081 (input_local_vars): Read in DECL_INITIAL and context for local
5082 statics that need to be put in unexpanded_vars_list.
5083
50842007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5085
5086 * lto-read.c (input_real): Use a separate null-terminated buffer
5087 for calling real_from_string.
5088 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5089 tell cgraph that it's needed.
5090
50912007-12-19 Doug Kwan <dougkwan@google.com>
5092
5093 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5094
50952007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5096
5097 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5098 (lto_file_read): Reset the members of 'context' every time we read
5099 a toplevel DIE, with special attention to last_param_type.
5100
51012007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5102
5103 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5104 'declaration'. Set the assembler name for non-public functions.
5105
3f8257db 51062007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5107
5108 * lto_read.c (data_in.unexpanded_indexes): New array.
5109 (input_local_var): Added code to read in unexpanded_var_list
5110 indexes for variables. Only read in DECL_CHAIN field for
5111 parameters.
5112 (input_local_vars): Added code to rebuild unexpanded_var_list in
5113 order using unexpanded_indexes.
5114 (input_function): Added code to set DECL_CONTEXT for functions.
5115
51162007-12-13 Doug Kwan <dougkwan@google.com>
5117
5118 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5119 in pointer and reference types.
5120
51212007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5122
5123 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5124 RESULT_DECL.
5125
51262007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5127
5128 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5129 already read the DIE.
5130 (lto_get_body): New function, split out from...
5131 (lto_materialize_function): ...here. Call it.
5132 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5133 determine DECL_EXTERNAL.
5134 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5135 FUNCTION_DECLs when necessary. Use the type of the actual
5136 function definition if we are unable to easily merge types. Ignore
5137 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5138 necessary.
5139
51402007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5141
5142 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5143
51442007-12-12 Bill Maddox <maddox@google.com>
5145
5146 Revert
5147 2007-12-07 Bill Maddox <maddox@google.com>
5148
5149 * lto.c (lto_str_fd_init): New function.
5150 (lto_str_fd_close): New function.
5151 (lto_file_init): Call lto_str_fd_init.
5152 (lto_file_close): Call lto_str_fd_close.
5153 (lto_str_read): New function. Read debug string table.
5154 (lto_str_lookup): New function. Get string for debug
5155 string table offset.
5156 (lto_read_form): Recognize DW_FORM_strp.
5157 (lto_file_read): Invoke lto_str_read.
5158
5159 * lto-elf.c (lto_elf_file_open): Read raw section data
5160 for the .debug_str section, if present.
5161
5162 * lto.h (struct lto_str_fd_struct): New struct.
5163 (struct lto_file_struct): Added new field DEBUG_STR
5164 to hold the file descriptor for the debug string table.
5165
51662007-12-07 Bill Maddox <maddox@google.com>
5167
5168 * lto.c (lto_str_fd_init): New function.
5169 (lto_str_fd_close): New function.
5170 (lto_file_init): Call lto_str_fd_init.
5171 (lto_file_close): Call lto_str_fd_close.
5172 (lto_str_read): New function. Read debug string table.
5173 (lto_str_lookup): New function. Get string for debug
5174 string table offset.
5175 (lto_read_form): Recognize DW_FORM_strp.
5176 (lto_file_read): Invoke lto_str_read.
5177
5178 * lto-elf.c (lto_elf_file_open): Read raw section data
5179 for the .debug_str section, if present.
5180
5181 * lto.h (struct lto_str_fd_struct): New struct.
5182 (struct lto_file_struct): Added new field DEBUG_STR
5183 to hold the file descriptor for the debug string table.
5184
51852007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5186
5187 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5188 Grow the basic_block_info and label_to_block_map vectors if
5189 necessary. Read in the block chain.
5190
51912007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5192
5193 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5194
51952007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5196
5197 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5198
51992007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5200
5201 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5202 (lto_read_body): Don't declare PROP_alias.
5203
52042007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5205
5206 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5207 argument type information.
5208
52092007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5210
5211 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5212 TREE_THIS_VOLATILE if the associated type is a volatile type.
5213 (lto_materialize_function): Remove call to init_ssa_operands.
5214 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5215 variable when reading an SSA_NAME. Do the same when reading a
5216 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5217 (input_cfg): Call init_ssa_operands.
5218 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5219 Move call to init_tree_ssa...
5220 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5221 add_referenced_var on any variables referenced from the body of the
5222 function. Inform the rest of the compiler we are in SSA form and
5223 inform later passes about the current properties.
5224
52252007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5226
5227 * lto.c (lto_materialize_function): Add FIXME.
5228
52292007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5230
5231 * lto-lang.c (enum built_in_attribute): New enum.
5232 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5233 built_in_attributes): New variables.
5234 (def_builtin_1): New function.
5235 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5236
52372007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5238
5239 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5240 DECL_SOURCE_LOCATION for debugging purposes.
5241 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5242 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5243 laying out the decl until later.
5244 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5245 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5246 TREE_ADDRESSABLE.
5247 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5248 operand of an ADDR_EXPR.
5249 * lto-lang.c (enum lto_builtin_type): New enum.
5250 (builtin_type): New typedef.
5251 (builtin_types, string_type_node, const_string_type_node,
5252 wint_type_node, intmax_type_node, uintmax_type_node,
5253 signed_size_type_node): New variables.
5254 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5255 lto_build_c_type_nodes): New functions.
5256 (lto_init): Initialize builtin types.
5257 (lto_set_decl_assembler_name): Let the target machine mangle the
5258 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5259
52602007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5261
5262 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5263 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5264 the type is a constant type. Set the assembler name and inform
5265 the rest of the compiler about the new decl if the decl is not
5266 public.
5267 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5268 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5269 try to read in function bodies for functions that already have bodies.
5270 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5271 equivalency.
5272 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5273 Check for whether we matched a builtin function type before calling
5274 lto_same_type_p on the generated type. Permit cases where the
5275 declaration of an array is unbounded, but the definition is bounded.
5276 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5277 DECL_SIZE_UNIT if necessary.
5278
3f8257db 52792007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5280
5281 * lto-read.c (input_expr_operand): Get types right
5282 for COMPLEX_CST.
5283
3f8257db 52842007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5285
5286 * lto-read.c (make_new_block, input_cfg): Properly set
5287 n_basic_blocks.
5288
52892007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5290
5291 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5292 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5293
52942007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5295
5296 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5297 construct the integer type for bitfields.
5298
3f8257db 52992007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5300
5301 * lto-read.c (data_in.current_node_has_loc): Removed.
5302 (input_line_info): Returns true if node needs line set.
5303 (set_line_info): Always sets line if called.
5304 (clear_line_info): Removed reference to current_node_needs_loc.
5305 (input_expr_operand): Keeps track locally if current node needs a loc.
5306 (input_local_var): Added code to handle DECL_INITIAL for
5307 static local vars. Only set loc if necessary.
5308
53092007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5310
5311 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5312 DECL_CONTEXT.
5313
53142007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5315
5316 * lto.c: Include langhooks.h.
5317 (lto_find_integral_type): Rework logic to handle the case where
5318 got_byte_size is true, but the bitsize requested and that of the
5319 base_type doesn't match.
5320 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5321 asm_name if we are creating a VAR_DECL.
5322 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5323 definition.
5324 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5325 function reference and use the builtin's decl if so. Set the
5326 DECL_CONTEXT of the RESULT_DECL for the function.
5327 * lto-lang.c (registered_builtin_fndecls): New variable.
5328 (lto_getdecls): Return it.
5329 (lto_builtin_function): Chain the new decl onto
5330 registered_builtin_fndecls.
5331
3f8257db 53322007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5333
5334 * lto-read.c (process_tree_flags, lto_static_init_local):
5335 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5336 (input_line_info, clear_line_info): Fixed new line number code.
5337 (input_expr_operand): Added type to SWITCH_EXPR.
5338 (lto_read_body): Properly initialized data_in.
5339 Clear line info when leaving.
5340
53412007-11-13 Diego Novillo <dnovillo@google.com>
5342
5343 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5344 Initialize ARTIFICIAL.
5345 (lto_read_subroutine_type_subprogram_DIE): Initialize
5346 SAVED_SCOPE.
5347 * lto-read.c (set_line_info): Remove ; from calls to
5348 LINEMAP_POSITION_FOR_COLUMN.
5349
3f8257db 53502007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5351
5352 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5353 (input_expr_operand, input_local_var): Renamed get_type_ref to
5354 input_type_ref.
5355 (input_expr_operand): Get the types correct for
5356 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5357
53582007-11-13 Doug Kwan <dougkwan@google.com>
5359
5360 * lto-read.c (input_widest_uint_uleb128): New function.
5361 (input_tree_flags, process_tree_flags, input_line_info,
5362 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5363 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5364 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5365 (lto_static_init_local): Add code to assert that lto_flags_type is
5366 wide enough.
5367
53682007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5369
5370 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5371 (lto_read_subroutine_type_subprogram_DIE): Handle
5372 DW_AT_static_link and DW_AT_specification. Return the
5373 specification if present.
5374 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5375
53762007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5377
5378 * lto-lang.c: Include target.h.
5379 (registered_builtin_types): New variable.
5380 (lto_type_for_mode): Increase number of modes handled.
5381 (lto_builtin_function): Fix argument list and return the decl.
5382 (lto_register_builtin_type): New function.
5383 (lto_init): Initialize target builtins and language-independent
5384 nodes.
5385 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5386
3f8257db 53872007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5388
5389 * lto-read.c (input_expr_operand): Added code to properly handle
5390 index filed. Added new RANGE_EXPR case.
5391
3f8257db 53922007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5393
5394 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5395 (data_in): Added current_node_has_loc field.
5396 (input_line_info, set_line_info, clear_line_info): Added a support
5397 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5398 did not have on on the source side.
5399 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5400 numbers too.
5401
54022007-11-09 Doug Kwan <dougkwan@google.com>
5403
5404 * lto-read.c (input_expr_operand): Change type of operand 2 of
5405 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5406
54072007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5408
5409 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5410 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5411 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5412 the new decl we are creating. Move informing the middle end about
5413 the new decl to...
5414 (lto_main): ...here. Inform the middle end about global variables
5415 after we have read in all the input files.
5416 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5417 variables with internal linkage, so delete the check for internal
5418 linkage. Combine TREE_PUBLIC flags.
5419
54202007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5421
5422 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5423 DW_AT_decl_line.
5424 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5425 builtin specially. Move check for attribute compatibility
5426 earlier.
5427
54282007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5429
5430 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5431 * config-lang.in (gtfiles): Add lto.h and lto.c.
5432 * lto-elf.c: Include ggc.h.
5433 (lto_elf_file_open): Allocate elf_file from GC memory.
5434 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5435 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5436 in GC memory.
5437 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5438 (lto_file_close): Free file from GC memory.
5439 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5440 (lto_read_member_DIE): Fix declaration.
5441 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5442 in GC memory.
5443 (current_lto_file): New variable.
5444 (lto_main): Use it.
5445 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5446 lto_die_cache_entry): Move to...
5447 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5448 declarations accordingly.
5449 (struct lto_file_struct): Declare.
5450 (lto_file_vtable): Use it instead of lto_file.
5451
54522007-11-06 Alon Dayan <alond@il.ibm.com>
3f8257db 5453 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5454
5455 * lto-read.c (process_flags, lto_static_init_local):
5456 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5457 change global array num_flags_for_code to flags_length_for_code.
5458 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5459
54602007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5461
5462 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5463 layout functions to compute information about the newly constructed
5464 type.
5465
54662007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5467
5468 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5469 case to use DECL_RESULT if necessary.
5470
3f8257db 54712007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5472
5473 * lto-read.c (input_tree_list): Removed.
5474 (input_tree_flags): Added parameter to force flags no matter what
5475 tree code.
5476 (input_expr_operand): Added parameter to input_tree_flags.
5477 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5478 input_expr_operand rather than input_tree_lists.
5479 (input_local_var): Use input_expr_operand to read attributes
5480 rather then input_tree_list.
5481 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5482
54832007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5484
5485 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5486 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5487 TYPE_DECL for it.
5488 * lto-read.c (lto_read_body): Use correct sizes for calculating
5489 type_decls_offset and types_offset.
5490
54912007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5492
5493 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5494 with GENERIC_NEXT.
5495 * config-lang.in (gtfiles): Add lto-lang.c.
5496 * lto-lang.c: Include gt-lto-lto-lang.h.
5497 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5498 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5499 (lto/lto-read.o): Likewise.
5500
3f8257db 55012007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5502
5503 * lto-read.c (data_in): Added type_decls and current_col fields.
5504 (string_slot): New type to hold canonized file name.
5505 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5506 input_line_info, set_line_info, clear_line_info): New functions.
5507 (file_name_hash_table): New hash table.
5508 (input_local_var, input_labels, input_local_vars_index,
5509 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5510 (input_uleb128): Changed type of byte var.
5511 (input_expr_operand): Large number of changes to get line numbers
5512 correct. Added TYPE_DECL case.
5513 (input_globals): Added code to get TYPE_DECLs processed.
5514 (input_local_var): Added code to process line numbers and
5515 TREE_CHAIN and DECL_CONTEXT.
5516 (input_function, input_constructor): Added call to
5517 clear_line_number.
5518 (lto_static_init_local): Added code to get line numbers correct.
5519 (lto_read_body): Added code to get TYPE_DECLS read and to change
5520 parameters to the calls above that had their parms reorganized.
5521
5522
55232007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5524
5525 * lto.h (lto_resolve_typedecl_ref): Declare.
5526 * lto.c (lto_resolve_typedecl_ref): New function.
5527
55282007-10-29 Mark Mitchell <mark@codesourcery.com>
5529 Nathan Froyd <froydnj@codesourcery.com>
5530
5531 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5532 DIEs even if we find an abstract origin for this DIE.
5533
55342007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5535
5536 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5537 RESULT_DECL slightly earlier. Only remember the decl for later
5538 if we successfully merge declarations.
5539
3f8257db 55402007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5541
5542 * lto-read.c (input_expr_operand): Give label_values the proper
5543 context and provide switch statements with a default type.
5544
55452007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5546
5547 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5548 * lto.c (lto_materialize_function): ...to here.
5549
55502007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5551
5552 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5553 * lto.c (lto_info_fd_init): Initialize it.
5554 (lto_info_fd_close): Free it.
5555 (lto_materialize_function): New function.
5556 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5557 unmaterialized_fndecls.
5558 (lto_file_read): Read in all the function bodies after we have read
5559 all of the DWARF info.
5560 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5561 reading a function body.
5562
3f8257db 55632007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5564
5565 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5566 semetric with output_tree_flags. Added call to log flags.
5567 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5568 type issues to make everything consistent with flags being
5569 unsigned HOST_WIDE_INTS.
5570 (input_expr_operand): Added call to
5571 recompute_tree_invariant_for_addr_expr.
5572 (input_local_var): Added debugging for tree_chains. Now calls
5573 input_tree_flags.
5574 (input_phi): Made flags unsigned HOST_WIDE_INT.
5575 (input_ssa_names): Now calls input_tree_flags.
5576 (lto_read_body): Now sets cfun.
5577 (lto_read_function_body): Now sets current_function_pointer.
5578
55792007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5580
5581 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5582 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5583 inspecting fields within.
5584 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5585 handle this appropriately.
5586
55872007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5588
5589 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5590 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5591 both DW_AT_abstract_origin and DW_AT_specification.
5592 (lto_read_subroutine_type_subprogram_DIE): Handle
5593 DW_AT_abstract_origin.
5594 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5595 (lto_read_DIE_at_ptr): Define as static to match declaration.
5596 Lookup the PTR in the cache before reading it from the file.
5597 (lto_resolve_var_ref): Adjust accordingly.
5598 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5599 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5600
56012007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5602
5603 * lto.c (lto_read_DIE_at_ptr): New function.
5604 (lto_resolve_var_ref): Use it.
5605 (lto_resolve_fn_ref): Use it.
5606 (lto_resolve_field_ref): Use it.
5607 (lto_read_variable_formal_parameter_constant_DIE): Follow
5608 DW_AT_specification and return the associated decl when appropriate.
5609
56102007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5611
5612 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5613 Implement for scalar integer modes.
5614 (lto_init): Initialize size_type_node.
5615
3f8257db 56162007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5617
5618 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5619 (input_local_var): Add chaining for params.
5620 (input_ssa_names): Add cfun parameter.
5621 (input_function): Remove unnecessary else.
5622
56232007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5624
5625 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5626 (lto_resolve_var_ref): Use proper types.
5627 (lto_resolve_fn_ref): Likewise.
5628 (lto_resolve_field_ref): Likewise.
5629
56302007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5631
5632 * lto-read.c (input_expr_operand): Remove case.
5633
56342007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5635
5636 * lto.c (lto_read_only_for_child_DIEs): New function.
5637 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5638 * lto-elf.c (lto_elf_map_lto_section): Remove.
5639 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5640 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5641 SSA_NAME. Add missing case for mechanical codes.
5642 (input_cfg): Use basic_block_info_for_function instead of
5643 basic_block_info.
5644
3f8257db 56452007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5646
5647 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5648 (input_list): Renamed input_tree_list and modified to follow same
5649 protocol as lto-function-out.c:output_tree_list.
5650 (input_expr_operand): Make asm operands use input_tree_list.
5651 (input_local_var): Now uses input_tree_list.
5652 (lto_read_body): Change placement for setting context of debug_labels.
5653
5654
3f8257db 56552007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5656
5657 * lto-read.c (input_real): Output debugging in proper order.
5658 (input_integer): Compute bit lengths properly.
5659 (input_list): Clean up declaration.
5660 (input_expr_operand): Change calls to input_real to match fix.
5661 Make reading of LTO_bit_field_ref1 match output.
5662 (input_local_var): Make reading of attributes match what is being
5663 written.
5664 (dump_debug_stream): Also print char in hex.
5665 (debug_out_fun): Fix signed unsigned mismatch.
5666
56672007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5668
5669 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5670 DW_AT_GNU_vector specially, as they are not contiguous with the
5671 specified set of attribute names. Use class_mask to check for
5672 errors at the end of the function
5673 (lto_resolve_var_ref): Read the DIE if it is not cached.
5674 (lto_resolve_fn_ref): Likewise.
5675 (lto_resolve_field_ref): Likewise.
5676
56772007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5678
5679 * lto.c: Include dwarf2out.h.
5680 (lto_cache_store_DIE): Assert that we never change the value.
5681 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5682 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5683 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5684 sensible type instead.
5685 (lto_read_structure_union_class_type_DIE): Store the newly
5686 created type prior to reading the members of the structure to
5687 avoid infinite recursion. Avoid computing types and alignments
5688 for structures whose sizes are unknown.
5689 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5690 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5691 DW_AT_const_value, and DW_AT_specification.
5692 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5693 Return early if we have already constructed the function type.
5694 (lto_read_typedef_DIE): Check to see if the type has been cached
5695 already. Cache the type before reading any children.
5696 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5697 (lto_read_DIE): Unset context->skip_non_parameters around reading
5698 the DIE.
5699 (lto_resolve_fn_ref): Delete trailing whitespace.
5700
3f8257db 57012007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5702
5703 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5704
57052007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5706
5707 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5708
57092007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5710
5711 * lto-lang.c (signed_and_unsigned_types): New variable.
5712 (lto_type_for_size): Consult signed_and_unsigned_types to find
5713 an approprite type, creating it if necessary.
5714 (lto_set_decl_assembler_name): Add actual method body.
5715
57162007-09-06 Jim Blandy <jimb@codesourcery.com>
5717
5718 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5719 can't find a var init for this variable, leave its DECL_INITIAL.
5720 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5721 lto_elf_map_fn_body.
5722 (lto_map_lto_section): New function.
5723 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5724 bodies, and lto_elf_map_optional_lto_section for variable
5725 initializers.
5726 (lto_elf_find_section_data): Quietly return NULL if the section is
5727 missing.
5728 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5729
5730 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5731
5732 * lto-read.c (lto_read_body): Doc fix.
5733
3f8257db 57342007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5735
5736 * lto-read.c (fun_in): Renamed to data_in.
5737 (input_expr_operand, input_local_var, input_string_internal,
5738 input_string, input_real, input_list, get_label_decl,
5739 get_type_ref, input_expr_operand, input_globals, input_labels,
5740 input_local_vars_index, input_local_var, input_local_vars,
5741 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5742 (input_constructor): New function.
5743 (lto_read_function_body): Renamed to lto_read_body and generalized
5744 to handle both functions and constructors.
5745 (lto_read_function_body, lto_read_var_init): New function.
5746
5747
3f8257db 57482007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5749
5750 * lto-read.c (input_expr_operand): Assert that there really is a
5751 FUNCTION_DECL.
5752 (input_globals): Removed checks on 0 section.
5753
3f8257db 57542007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5755
5756 * lto-read.c (fun_in): Added local_decls_index and
5757 local_decls_index_d.
5758 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5759 (input_globals): Enabled code to handle FIELD_DECLs.
5760 (input_local_vars_index, input_local_vars): New function.
5761 (input_local_var): Changed to allow locals to be input randomly.
5762 (lto_read_function_body): Added code to input the
5763 local_decls_index and to free various structures.
5764
57652007-08-17 Jim Blandy <jimb@codesourcery.com>
5766
5767 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5768 ATTRIBUTE_UNUSED from 'die' formal.
5769
5770 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5771 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5772 (input_list): Fix type of 'tag'.
5773 (input_expr_operand): Fix type of 'tag' argument. Update
5774 declaration. Fix type of 'ctag'. Add default case to switch,
5775 since the type of the switched value is now an enum.
5776 (input_local_vars): Fix type of 'tag'.
5777 (input_bb): Fix type of 'tag' argument.
5778 (input_function): Fix type of 'tag' argument.
5779
57802007-08-16 Jim Blandy <jimb@codesourcery.com>
5781
5782 * lto.c (lto_read_member_DIE): Record the tree we create in
5783 fd->die_cache. (Our 'die' argument is no longer unused.)
5784 (lto_resolve_field_ref): New function.
5785 * lto.h (lto_resolve_field_ref): New declaration.
5786
57872007-08-15 Jim Blandy <jimb@codesourcery.com>
5788
5789 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5790
57912007-08-07 Jim Blandy <jimb@codesourcery.com>
5792
5793 * lto.c (lto_read_form): Complete attr_classes table.
5794 (DWARF2_form_data): Doc fix.
5795
57962007-08-05 Mark Mitchell <mark@codesourcery.com>
5797
5798 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5799 and unmap_var_init.
5800 (lto_read_var_init): Declare.
5801 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5802 interface for reading variable initializers.
5803 * lto-elf.c (lto_elf_read_var_init): Remove.
5804 (lto_elf_file_vtable): Update initializer.
5805 (lto_elf_read_var_init): Add comment about unused-ness.
5806 * lto-read.c (lto_read_var_init): New.
5807
5808 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5809
3f8257db 58102007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5811
5812 * lto-read.c (lto_read_function_body): Moved declaration of fn
5813 outside of ifdef.
5814
3f8257db 58152007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5816
5817 * lto-read.c (input_uleb128, input_string_internal, input_real,
5818 input_integer, input_record_start, input_list, get_type_ref,
5819 input_flags, input_expr_operand, input_expr_operand,
5820 input_expr_operand, input_local_vars, input_cfg, input_phi,
5821 input_ssa_names, input_bb, input_function): Added semicolons.
5822
5823
3f8257db 58242007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5825
5826 * lto-read.c (input_globals): Remove debugging.
5827 (input_function): Set DECL_ARGUMENTS.
5828
3f8257db 58292007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5830
5831 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5832 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5833 (input_phi): Made work with operands other than SSA_NAMES and
5834 fixed processing of flags.
5835 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5836 (input_flags): New function.
5837 * lto-lang.c (lto_init): Changed state of in_lto_p.
5838
5839
58402007-07-24 Mark Mitchell <mark@codesourcery.com>
5841
5842 * lto-tree.h (lto_varargs_cookie): Remove.
5843 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5844 skip_non_parameters, skip_parameters.
5845 (lto_varargs_cookie): Remove.
5846 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5847 parameter types.
5848 (lto_read_abbrev): New function.
5849 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5850 child DIEs.
5851 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5852 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5853 (lto_file_read): Initialize new context fields.
5854 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5855 (lto_unsigned_type): Remove.
5856 (lto_signed_type): Likewise.
5857 (lto_signed_or_unsigned_type): Likewise.
5858 (lto_init): Do not create lto_varargs_cookie.
5859 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5860 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5861 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5862
58632007-07-19 Jan Hubicka <jh@suse.cz>
5864
5865 * lto-read.c (lto_read_function_body): Produce empty scope block
5866 to avoid crash.
5867
58682007-07-18 Mark Mitchell <mark@codesourcery.com>
5869
5870 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5871 process local variables.
5872 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5873
3f8257db 58742007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5875
5876 * lto-read.c (input_list, input_expr_operand): Added struct
5877 function parameter.
5878 (init_cfg, finalize_cfg): Removed function.
5879 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5880 (input_labels, input_local_vars): Now takes input_block parameter rather than
5881 synthsyzing it.
5882 (input_cfg, input_phi, input_ssa_names): New functions.
5883 (input_bb): Now passes in input_blocks. Does not construct cfg
5884 and processes the list of phi functions.
5885 (input_function): Now builds both the cfg and ssa_names table.
5886 (lto_read_function_body): Processes new header fields to construct
5887 streams for the ssa_names and cfg and their debugging.
5888 * lto/lto-lang.c (lto_init): Set in_lto_p.
5889
5890
58912007-06-28 Mark Mitchell <mark@codesourcery.com>
5892
5893 * lto.h (lto_file_vtable): Add read_var_init.
5894 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5895 initializers.
5896 (lto_main): Remove bogus asserts.
5897 * lto-elf.c (tm.h): Include it.
5898 (libiberty.y): Likewise.
5899 (lto_elf_file): Add strtab and symtab. Rename
5900 string_table_section_index to sec_strtab.
5901 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5902 (lto_elf_get_shdr): New function.
5903 (lto_elf_free_shdr): Likewise.
5904 (lto_elf_find_section_data): Use them.
5905 (lto_elf_read_symtab): New function.
5906 (lto_elf_lookup_sym): Likewise.
5907 (lto_elf_free_sym): Likewise.
5908 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5909 (lto_elf_built_init): New function.
5910 (lto_elf_read_var_init): Likewise.
5911 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5912
3f8257db 59132007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5914
5915 * lto-read (make_new_block): Initialize the stmt_list.
5916 (lto_static_init_local): Add debugging for missing codes.
5917
59182007-06-26 Mark Mitchell <mark@codesourcery.com>
5919
5920 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5921 unprototyped functions.
5922
59232007-06-23 Mark Mitchell <mark@codesourcery.com>
5924
5925 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5926 Handle DW_AT_MIPS_linkage_name.
5927 (lto_read_subroutine_type_subprogram): Likewise. Correct
5928 compilation errors.
5929 (lto_main): Remove incorrect assertions.
5930 * lto-symbtab.c: Build function types out of TREE_LISTs.
5931
5932 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5933
5934 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5935
3f8257db 59362007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5937
5938 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5939 dummy since ggc does not like empty structs.
5940 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5941 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5942 expr->common to expr->base.
5943 (make_new_block): Moved stmt_list to proper place.
5944
5945
59462007-03-14 Robert Kennedy <jimbob@google.com>
5947
5948 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5949 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5950 assembler name from DWARF.
5951 * lto-lang.c (lto_set_decl_assembler_name) New function.
5952
59532006-09-10 Mark Mitchell <mark@codesourcery.com>
5954
5955 * lto.h (lto_file_vtable): New structure.
5956 (lto_file): Add vtable pointer.
5957 (lto_file_init): Add vtable paramter.
5958 (lto_read_function_body): New function.
5959 (lto_symtab_merge_fn): New function.
5960 * lto.c (lto_file_init): Add vtable parameter.
5961 (lto_read_form): Fill in entries for DW_AT_prototyped,
5962 DW_AT_frame_base.
5963 (lto_read_subroutine_type_subprogram_DIE): New function.
5964 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5965 DW_TAG_subprogram.
5966 * lto-elf.c (lto_elf_vile_vtable): New variable.
5967 (lto_elf_file_open): Pass it to lto_file_init.
5968 (lto_elf_map_fn_body): New function.
5969 (lto_elf_unmap_fn_body): Likewise.
5970 * lto-read.c: New file.
5971 * lto-symtab.c (lto_symtab_merge_fn): New function.
5972 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5973 tree_rest_of_compilation.
5974 * Make-lang.in (LTO_OBJS): Add lto-read.o
5975 (lto-read.o): New target.
5976
59772006-09-03 Mark Mitchell <mark@codesourcery.com>
5978
5979 * lto.c (<inttypes.h>): Don't include it.
5980 (lto_context): Don't typedef it.
5981 (lto_resolve_reference): New function.
5982 (lto_read_form): Use it.
5983 (lto_resolve_type_ref): New function.
5984 (lto_resolve_var_ref): Likewise.
5985 (lto_resolve_fn_ref): Likewise.
5986 * lto.h (<inttypes.h>): Include it.
5987 (lto_context): New type.
5988 (lto_ref): New structure.
5989 (lto_resolve_type_ref): Declare.
5990 (lto_resolve_var_ref): Likewise.
5991 (lto_resolve_fn_ref): Likewise.
5992
59932006-08-18 Mark Mitchell <mark@codesourcery.com>
5994
5995 * lang-specs.h: New file.
5996
59972006-08-14 Mark Mitchell <mark@codesourcery.com>
5998
5999 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6000 (lto_info_fd_close): Deallocate it.
6001 (lto_die_cache_entry): New structure.
6002 (lto_cache_hash): New function.
6003 (lto_cache_eq): Likewise.
6004 (lto_cache_store_DIE): Likewise.
6005 (lto_cache_lookup_DIE): Likewise.
6006 (lto_read_referenced_type_DIE): Use the cache.
6007 (lto_read_pointer_type_DIE): Robustify.
6008 (lto_read_DIE): Use the cache.
6009 * lto.h (hashtab.h): Include.
6010 (lto_info_fd): Add DIE cache.
6011 * Make-lang.in (LTO_H): New variable.
6012 (lto/lto-lang.o): Use LTO_H.
6013 (lto/lto-elf.o): Likewise.
6014 (lto/lto-symtab.o): Likewise.
6015
60162006-07-09 Mark Mitchell <mark@codesourcery.com>
6017
6018 * lto.c (lto_abi_mismatch_error): New function.
6019 (lto_abbrev_read): Initialize num_abbrevs.
6020 (lto_read_form): Specify allowed form classes for
6021 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6022 (lto_read_variable_formal_parameter_constant_DIE): Handle
6023 DW_AT_declaration. Call lto_symtab_merge_var.
6024 (lto_read_pointer_type_DIE): New function.
6025 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6026 not creat TYPE_DECLs for types that already have them.
6027 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6028 (lto_set_cu_context): Make cu_start point to the header, not the
6029 first DIE.
6030 (lto_file_read): Adjust for change to lto_set_cu_context.
6031 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6032 (lto/lto-symtab.o): New rule.
6033 * lto-tree.h (lang_identifier): Add decl field.
6034 (LANG_IDENTIFIER_CAST): New macro.
6035 (LTO_IDENTIFIER_DECL): Likewise.
6036 (lto_symtab_merge_var): Declare.
6037 * lto-symtab.c: New file.
6038
60392006-07-02 Daniel Berlin <dberlin@dberlin.org>
6040
6041 * lto.c (lto_context): Add current_cu and info_fd members.
6042 (DWARF2_CompUnit): New structure.
6043 (lto_read_DIE): Take lto_info_fd *.
6044 (lto_read_child_DIEs): Ditto.
6045 (lto_file_corrupt_error): Constify argument.
6046 (lto_set_cu_context): New function
6047 (lto_info_fd_init): Ditto.
6048 (lto_info_fd_close): Ditto.
6049 (lto_file_init): Use lto_info_fd_init.
6050 (lto_file_close): Use lto_info_fd_close.
6051 (lto_read_initial_length): Pass in pointer to header size.
6052 (lto_read_comp_unit_header): Correct cu_length to
6053 real length from beginning of header. Take lto_info_fd * as
6054 argument.
6055 (find_cu_for_offset): New function.
6056 (lto_read_form): Change first argument to lto_info_fd *.
6057 Add FORM_CONTEXT argument.
6058 Handle DW_FORM_ref_addr.
6059 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
6060 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6061 Swap contexts if necessary for form.
6062 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6063 lto_file_corrupt_error.
6064 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6065 (lto_read_referenced_type_DIE): Change first argument to
6066 lto_info_fd *. Access lto_fd fields through base pointer.
6067 (lto_read_compile_unit_DIE): Change first argument to an
6068 lto_info_fd *.
6069 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6070 (lto_read_base_type_DIE): Ditto.
6071 (lto_read_child_DIEs): Ditto.
6072 (lto_read_DIE): Ditto. Change type of function pointer.
6073 (lto_info_read): New function.
6074 (lto_set_cu_context): Ditto.
6075 (lto_file_read): Use lto_info_read, walk resulting CU's
6076 (lto_main): Update for lto_info_fd change.
6077 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6078 necessary.
6079 * lto.h (DWARF2_CompUnit): New structure.
6080 (lto_info_fd): Ditto.
6081 (lto_file): Change debug_info to be an lto_info_fd.
6082
60832006-06-25 Mark Mitchell <mark@codesourcery.com>
6084
6085 * lto.c (toplev.h): Include it.
6086 (dwarf2.h): Likewise.
6087 (tree.h): Likewise.
6088 (tm.h): Likewise.
6089 (cgraph.h): Likewise.
6090 (ggc.h): Likewise.
6091 (inttypes.h): Likewise.
6092 (DWARF2_attr): New type.
6093 (DWARF2_abbrev): Likewise.
6094 (DWARF2_class): Likewise.
6095 (DWARF2_form_data): Likewise.
6096 (lto_context): Likewise.
6097 (lto_fd_init): New function.
6098 (lto_abbrev_fd_init): Likewise.
6099 (lto_abbrev_fd_close): Likewise.
6100 (lto_file_init): Use them.
6101 (lto_file_close): New function.
6102 (lto_file_corrupt_error): Likewise.
6103 (LTO_CHECK_INT_VAL): New macro.
6104 (lto_check_size_t_val): New function.
6105 (lto_check_int_val): Likewise.
6106 (LTO_READ_TYPE): New macro.
6107 (lto_read_ubyte): New function.
6108 (lto_read_uhalf): Likewise.
6109 (lto_read_uword): Likewise.
6110 (lto_read_uleb128): Likewise.
6111 (lto_read_initial_length): Likewise.
6112 (lto_abbrev_read_attrs): Likewise.
6113 (lto_abbrev_read): Likewise.
6114 (lto_abbrev_lookup): Likewise.
6115 (lto_read_section_offset): Likewise.
6116 (lto_read_comp_unit_header): Likewise.
6117 (lto_read_form): Likewise.
6118 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6119 (LTO_BEGIN_READ_ATTRS): Likewise.
6120 (LTO_END_READ_ATTRS): Likewise.
6121 (lto_unsupported_attr_error): New function.
6122 (lto_get_identifier): Likewise.
6123 (lto_read_referenced_type_DIE): Likewise.
6124 (lto_read_compile_unit_DIE): Likewise.
6125 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6126 (lto_read_base_type_DIE): Likewise.
6127 (lto_read_DIE): Likewise.
6128 (lto_read_child_DIEs): Likewise.
6129 (lto_file_read): Read DIEs.
6130 (lto_main): Ask middle end to emit entities.
6131 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6132 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6133 (lto_elf_file_close): Likewise.
6134 * lto.h (lto_file): Declare.
6135 (DWARF2_abbrev): Likewise.
6136 (lto_fd): New type.
6137 (lto_abbrev_fd): Likewise.
6138 (lto_file): Use new types.
6139 (lto_file_close): Declare.
6140 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
6141
61422006-06-18 Mark Mitchell <mark@codesourcery.com>
6143
6144 * lto.h: New file.
6145 * lto.c: New file.
6146 * lto-elf.c: New file.
6147 * lto-lang.c (flags.h): Include it.
6148 (lto.h): Likewise.
6149 (lto_init): New function.
6150 (lto_write_globals): Remove.
6151 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
6152 (LANG_HOOKS_INIT): Define.
6153 (LANG_HOOKS_PARSE_FILE): Likewise.
6154 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6155 (LTO_EXE): Link with libelf.
6156 (lto/lto-lang.o): Update dependencies.
6157 (lto/lto.o): New target.
6158 (lto/lto-elf.o): Likewise.
6159
61602006-06-12 Mark Mitchell <mark@codesourcery.com>
6161
6162 * config-lang.in: New file.
6163 * Make-lang.in: Likewise.
6164 * lto-tree.h: Likewise.
6165 * lto-lang.c: Likewise.
818ab71a 6166\f
a5544970 6167Copyright (C) 2006-2019 Free Software Foundation, Inc.
d7f09764 6168
818ab71a
JJ
6169Copying and distribution of this file, with or without modification,
6170are permitted in any medium without royalty provided the copyright
6171notice and this notice are preserved.