]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
re PR tree-optimization/92066 (Many vectorization tests FAIL)
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
1fcf52a6
JH
12019-10-11 Jan Hubicka <hubicka@ucw.cz>
2
3 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
4
9142736e
RB
52019-10-10 Richard Biener <rguenther@suse.de>
6
7 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
8
0fa00483
JM
92019-10-04 Joseph Myers <joseph@codesourcery.com>
10
11 * lto-lang.c (flag_isoc2x): New variable.
12
a3d09469
RB
132019-09-18 Richard Biener <rguenther@suse.de>
14
15 PR lto/91763
16 * lto.c (lto_materialize_function): Initialize EH by looking
17 at the function personality and flag_exceptions setting.
18
df375b03
JJ
192019-08-23 Jakub Jelinek <jakub@redhat.com>
20
21 PR middle-end/91283
22 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
23 flag_excess_precision_cmdline. Remove comment.
24
4d732405
RS
252019-08-13 Richard Sandiford <richard.sandiford@arm.com>
26
27 PR middle-end/91421
28 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
29 instead of DECL_FUNCTION_CODE.
30 * lto-symtab.c (lto_symtab_merge_p): Likewise.
31
6e42c90c
BE
322019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
33
34 * Make-lang.in (lto.install-common): Remove unnecessary slash
35 between $(DESTDIR) and $(bindir).
36
cb50701e
ML
372019-07-25 Martin Liska <mliska@suse.cz>
38
39 * lto-common.c (compare_tree_sccs_1): Use new macros
40 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
41
34e64622
GB
422019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
43
44 * lang.opt (flag_dump_callgraph): New flag.
45 * lto-dump.c (dump_symtab_graphviz): New function.
46 (dump_tool_help): New option.
47 (lto_main): Handle graphviz dumping.
48
b01659aa
JH
492019-07-18 Jan Hubicka <hubicka@ucw.cz>
50
51 * lto-common.c (gimple_register_canonical_type_1): Do not look for
52 non-ODR conflicts of types in anonymous namespaces.
53 (unify_scc): Do not merge anonymous namespace types.
54
99b1c316
MS
552019-07-09 Martin Sebor <msebor@redhat.com>
56
57 PR c++/61339
58 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
59 to struct and others to class.
60 (mentions_vars_p): Same.
61 (register_resolution): Same.
62 (lto_register_var_decl_in_symtab): Same.
63 (lto_register_function_decl_in_symtab): Same.
64 (cmp_tree): Same.
65 (lto_read_decls): Same.
66
6c1dae73
MS
672019-07-09 Martin Sebor <msebor@redhat.com>
68
69 PR c++/61339
70 * lto-dump.c: Change class-key from class to struct and vice versa
71 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
72
70980ea2
ML
732019-07-04 Martin Liska <mliska@suse.cz>
74
75 PR lto/91078
76 * lto-common.c (lto_file_finalize): Use memcpy to set
77 file_data->lto_section_header.
78
88614dfa
ML
792019-07-03 Martin Liska <mliska@suse.cz>
80
81 * lto-common.c: Read LTO section and verify header.
82
606a9a8c
JH
832019-06-27 Jan Hubicka <jh@suse.cz>
84
85 * lto-common.c (lto_register_canonical_types_for_odr_types):
86 Copy CXX_ODR_P from the main variant.
87
85693eef
JH
882019-06-27 Jan Hubicka <jh@suse.cz>
89
90 * lto-common.c: tree-pretty-print.h
91 (type_streaming_finished): New static var.
92 (gimple_register_canonical_type_1): Return updated hash; handle ODR
93 types.
94 (iterative_hash_canonical_type): Update use of
95 gimple_register_canonical_type_1.
96
c2f7a665
ML
972019-06-27 Martin Liska <mliska@suse.cz>
98
99 * lto-dump.c (struct symbol_entry): Add default dtor.
100 (struct variable_entry): Likewise.
101 (struct function_entry): Likewise.
102 (dump_list_functions): Release memory.
103 (dump_list_variables): Likewise.
104
ab20d992
JJ
1052019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
106
107 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
108 format of "__intN" types for SIZE_TYPE.
109
f4af4019
JH
1102019-06-24 Jan Hubicka <jh@suse.cz>
111
112 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
113 compare STRING_FLAG only for arrays and integers.
114
0ecf545c
MS
1152019-06-05 Martin Sebor <msebor@redhat.com>
116
117 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
118
a9c697b8
MS
1192019-05-16 Martin Sebor <msebor@redhat.com>
120
ab20d992
JJ
121 * lto-dump.c (lto_main): Same.
122 * lto.c (stream_out): Same.
a9c697b8 123
38613b9b
ML
1242019-05-10 Martin Liska <mliska@suse.cz>
125
126 * Make-lang.in: Use program_transform_name for lto-dump.
127 * config-lang.in: Do not mark lto-dump compiler as we don't
128 want to have it installed at
129 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
130
03de2955
RO
1312019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
132
133 * lto-common.c (lto_file_read): Print section->start as int64_t,
134 section->len as uint64_t.
135 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
136
ee7a003f
ML
1372019-05-06 Martin Liska <mliska@suse.cz>
138
139 * lto-common.c: Update coding style.
140 * lto.c (materialize_cgraph): Likewise.
141
66d62d9f
HK
1422019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
143 Martin Liska <mliska@suse.cz>
144
145 * Make-lang.in: Add lto_dump-related definition.
146 * config-lang.in: Likewise.
147 * lang.opt: Add new language LTODump and options related
148 to LTO dump tool.
149 * lto-common.c (lto_read_decls): Support type statistics dump.
150 (lto_file_read): Likewise for object files.
151 * lto-dump.c: New file.
152 * lto-lang.c (lto_option_lang_mask): Move from ..
153 * lto.c (lto_option_lang_mask): .. here.
154 * lto.h (lto_option_lang_mask): New declaration.
155
a79420f9
ML
1562019-05-06 Martin Liska <mliska@suse.cz>
157 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
158
159 * Make-lang.in: Add lto-common.o.
160 * config-lang.in: Likewise for gtfiles.
161 * lto-common.c: New file.
162 * lto-common.h: New file.
163 * lto-lang.c: Include lto-common.h.
164 * lto.c: Move most of the functionality
165 into lto-common.c file.
166
0c7f51e4
JH
1672019-04-12 Jan Hubicka <hubicka@ucw.cz>
168
169 * lto.c (do_stream_out): rename to ...
170 (stream_out): ... this one; move original code to ...
171 (stream_out_partitions_1, stream_out_partitions): ... these new
172 functions.
173 (lto_wpa_write_files): Honnor lto_parallelism
174
303389b1
ML
1752019-03-26 Martin Liska <mliska@suse.cz>
176
177 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 178 wrapping.
303389b1 179
a3f9f006
ML
1802019-03-11 Martin Liska <mliska@suse.cz>
181
182 * lto-lang.c (lto_post_options): Wrap an option name
183 in a string format message and fix GNU coding style.
184 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
185
04e5c73d
JJ
1862019-03-09 Jakub Jelinek <jakub@redhat.com>
187
188 PR target/79645
189 * lang.opt: Terminate description text with a dot.
190
80f52b40
JM
1912019-02-28 Jason Merrill <jason@redhat.com>
192
193 PR c++/88049 - ICE with undefined destructor and anon namespace.
194 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
195 for a type in an anonymous namespace.
196
67914693
SL
1972019-01-09 Sandra Loosemore <sandra@codesourcery.com>
198
199 PR other/16615
200
201 * lto-partition.c: Mechanically replace "can not" with "cannot".
202 * lto-symtab.c: Likewise.
203 * lto.c: Likewise.
204
a5544970
JJ
2052019-01-01 Jakub Jelinek <jakub@redhat.com>
206
207 Update copyright years.
208
d840d7a2
JH
2092018-12-24 Jan Hubicka <hubicka@ucw.cz>
210
211 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
212 for method whose basetype was already reported.
213
ed1b53a0
MP
2142018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
215
216 Minimize clone counter memory usage in LTO.
217 * lto-partition.c (privatize_symbol_name_1): Keep track of
218 non-unique symbol counters in the lto_clone_numbers hash
219 map.
220 (lto_promote_cross_file_statics): Allocate and free the
221 lto_clone_numbers hash map.
222 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
223 map.
224
ad42aa96
JH
2252018-11-28 Jan Hubicka <jh@suse.cz>
226
227 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
228
d7dce787
JH
2292018-11-22 Jan Hubicka <jh@suse.cz>
230
231 * lto.c (cmp_type_location): Remove.
232 (lto_read_decls): Do not allocate odr_types.
233
f615cb16
ML
2342018-11-19 Martin Liska <mliska@suse.cz>
235
236 PR lto/88077
237 * lto-symtab.c (lto_symtab_merge): Transform the
238 condition before r256989.
239
12eac232
ML
2402018-11-16 Martin Liska <mliska@suse.cz>
241
242 PR lto/88004
243 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
244 lto_symtab_symbol_p as it does checking of transparent alias.
245 These needs to be also merged in the function.
246
7958186b
MP
2472018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
248
249 * lto-partition.c (privatize_symbol_name_1): Use
250 clone_function_name_numbered.
251
abb967da
JH
2522018-10-26 Jan Hubicka <jh@suse.cz>
253
ab20d992 254 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
abb967da 255
033eb567
DM
2562018-10-17 David Malcolm <dmalcolm@redhat.com>
257
258 * Make-lang.in (selftest-lto): New.
259
9ed6dbee
ML
2602018-08-29 Martin Liska <mliska@suse.cz>
261
262 PR bootstrap/87130
263 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
264 to behavior before r263887.
265
3d78e008
ML
2662018-08-27 Martin Liska <mliska@suse.cz>
267
268 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
269 fndecl_built_in_p and remove check for FUNCTION_DECL if
270 possible.
3d78e008
ML
271 * lto-symtab.c (lto_symtab_merge_p): Likewise.
272 (lto_symtab_merge_decls_1): Likewise.
273 (lto_symtab_merge_symbols): Likewise.
274 * lto.c (lto_maybe_register_decl): Likewise.
275 (read_cgraph_and_symbols): Likewise.
276
efd9eb29
TV
2772018-08-21 Tom de Vries <tdevries@suse.de>
278
ab20d992 279 * lto.c (lto_main): Call debuginfo_early_start and
efd9eb29
TV
280 debuginfo_early_stop.
281
00abf86c
MS
2822018-07-20 Martin Sebor <msebor@redhat.com>
283
284 PR middle-end/82063
285 * lto-lang.c (lto_handle_option): Change function argument
286 to HOST_WIDE_INT.
287
efe0e6cd
RB
2882018-07-20 Richard Biener <rguenther@suse.de>
289
290 PR debug/86585
291 * lto.c (unify_scc): Before we throw away an SCC see if we
292 can amend prevailing single-entry SCC with debug refs.
293
814f3331
JH
2942018-07-13 Jan Hubicka <hubicka@ucw.cz>
295
296 * lto.c (do_stream_out): Add PART parameter; open dump file.
297 (stream_out): Add PART parameter; pass it to do_stream_out.
298 (lto_wpa_write_files): Update call of stream_out.
299
c518c102
ML
3002018-07-04 Martin Liska <mliska@suse.cz>
301
302 PR middle-end/66240
303 PR target/45996
304 PR c/84100
305 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
306 instead of memcmp.
307
b54006ae
ML
3082018-06-20 Martin Liska <mliska@suse.cz>
309
310 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 311 FIXME comment.
b54006ae 312
56f62793
ML
3132018-06-19 Martin Liska <mliska@suse.cz>
314
315 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 316 of get_create.
56f62793
ML
317 (undo_partition): Likewise.
318 (lto_balanced_map): Likewise.
319
1724941e
ML
3202018-06-19 Martin Liska <mliska@suse.cz>
321
322 * config-lang.in: Remove stagestuff.
323
29a50dfb
JH
3242018-06-08 Jan Hubicka <hubicka@ucw.cz>
325
326 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
327 New global vars.
328 (lto_register_dumps): New hook.
329 (LANG_HOOKS_REGISTER_DUMPS): New.
330 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
331 * lto-symtab.c: Include lto.h; dump into dump_file instead of
332 symtab->dump_file.
333 (lto_symtab_merge_decls): Initialize dump file.
334 * lto.c (read_cgraph_and_symbols): Initialize dump file.
335 (do_whole_program_analysis): Likewise.
336
74644756
ML
3372018-06-08 Martin Liska <mliska@suse.cz>
338
339 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
340 instead of summary_uid.
341
99353fcf
ML
3422018-06-08 Martin Liska <mliska@suse.cz>
343
344 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
345 of get.
346 (undo_partition): Likewise.
347 (lto_balanced_map): Likewise.
348
31db0fe0
ML
3492018-06-08 Martin Liska <mliska@suse.cz>
350
351 * lto-partition.c (add_references_to_partition): Remove support
352 for MPX (macros, related functions, fields in cgraph_node, ...).
353 (add_symbol_to_partition_1): Likewise.
354 (privatize_symbol_name): Likewise.
355 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
356
f115c9b5
RB
3572018-06-05 Richard Biener <rguenther@suse.de>
358
359 * lto.c (cmp_type_location): Expand locations only once.
360
5b42d196
JH
3612018-05-30 Jan Hubicka <hubicka@ucw.cz>
362
363 * lang.opt (lto_linker_output): Add nolto-rel.
364 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
365 and LTO_LINKER_OUTPUT_NOLTOREL.
366 (lto_init): Generate lto when doing incremental link.
367 * lto.c (lto_precess_name): Add lto1-inclink.
368
ab168044
JH
3692018-05-18 Jan Hubicka <jh@suse.cz>
370
371 PR lto/85583
372 * lto-partition.c (account_reference_p): Do not account
373 references from aliases; do not account refernces from
374 external initializers.
375
b6e33d73
JH
3762018-04-30 Jan Hubicka <jh@suse.cz>
377
378 * lto.c (cmp_partitions_size): Remove.
379 (lto_wpa_write_files): Also output priorities; do not sort partitions.
380 (cmp_partition_order): Move to ...
381 * lto-partition.c (cmp_partition_order): ...
382 (lto_1_to_1_map): Sort partitions.
383
e693ebce
JH
3842018-04-20 Jan Hubicka <jh@suse.cz>
385
386 * lto-partition.c (lto_balanced_map): Fix sanity check.
387
ddb0b824
JH
3882018-04-19 Jan Hubicka <jh@suse.cz>
389
390 * lto-partition.c: Include sreal.h
391 (add_symbol_to_partition_1): Use size instead of self_size
392 for size estimate.
393 (account_reference_p): New.
394 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
395 fix accounting errors in boundary size; add debug output; combine cost
396 as cost/size instead of cost/internal; reduce the partitioning error to
397 +- 1/8 of the parttion size.
398
1781a04f
ML
3992018-04-19 Martin Liska <mliska@suse.cz>
400
401 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
402 for multiple PREVAILING_DEF_IRONLY for common symbols.
403
6867cd69
ML
4042018-04-18 Martin Liska <mliska@suse.cz>
405
406 * lto.c (lto_read_decls): Fix GNU coding style and typos.
407
af597536
ML
4082018-04-18 Martin Liska <mliska@suse.cz>
409
410 PR ipa/83983
411 PR ipa/85391
412 * lto.c (cmp_type_location): New function.
413 (lto_read_decls): First collect all types, then
414 sort them according by location before register_odr_type
415 is called.
416
7d6051b1
JH
4172018-04-18 Jan Hubicka <jh@suse.cz>
418 Martin Liska <mliska@suse.cz>
419
420 PR lto/85391
421 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
422 types.
423
23d87577
ML
4242018-04-11 Martin Liska <mliska@suse.cz>
425
426 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
427 function.
428
c16833dc
ML
4292018-04-10 Martin Liska <mliska@suse.cz>
430
431 PR lto/85248
432 * lto-symtab.c (lto_symtab_merge_p): Do not check for
433 TREE_VALUES of error attributes.
434
8d96e546
ML
4352018-04-10 Richard Biener <rguenther@suse.de>
436 Martin Liska <mliska@suse.cz>
437
438 PR lto/85248
439 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
440
97bb4812
JH
4412018-02-08 Jan Hubicka <hubicka@ucw.cz>
442
443 * lto-partition.c (lto_balanced_map): Watch overflow.
444
39aa9b23
JH
4452018-02-08 Jan Hubicka <hubicka@ucw.cz>
446
447 PR ipa/81360
448 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
449 (read_cgraph_and_symbols): Use
450 symtab_node::output_to_lto_symbol_table_p.
451
26a823f0
JH
4522018-01-30 Jan Hubicka <hubicka@ucw.cz>
453
454 * lto.c (register_resolution): Remove forgotten sanity check.
455
43fbc2e9
JH
4562018-01-30 Jan Hubicka <hubicka@ucw.cz>
457
458 PR lto/81004
459 * lto.c: Include builtins.h
460 (register_resolution): Merge resolutions in case trees was
461 merged across units.
462 (lto_maybe_register_decl): Break out from ...
463 (lto_read_decls): ... here.
464 (unify_scc): Also register decls here.
465 (read_cgraph_and_symbols): Sanity check that all resolutions was
466 read.
467
ee034d31
EB
4682018-02-02 Eric Botcazou <ebotcazou@adacore.com>
469
470 PR lto/83954
471 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
472 component type of array types with non-aliased component.
473
44c945e6
JH
4742018-01-30 Jan Hubicka <hubicka@ucw.cz>
475
476 PR lto/83954
477 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
478 for type match warning on arrays of pointers.
479
cde9b2f8
ML
4802018-01-23 Martin Liska <mliska@suse.cz>
481
482 PR lto/81440
483 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
484 trailing arrays at the end of a struct.
485
5c0caeb3
RS
4862018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
487 Alan Hayward <alan.hayward@arm.com>
488 David Sherwood <david.sherwood@arm.com>
489
490 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
491
928686b1
RS
4922018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
493 Alan Hayward <alan.hayward@arm.com>
494 David Sherwood <david.sherwood@arm.com>
495
496 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
497 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
498
85ec4feb
JJ
4992018-01-03 Jakub Jelinek <jakub@redhat.com>
500
501 Update copyright years.
502
4849deb1
JJ
5032017-12-15 Jakub Jelinek <jakub@redhat.com>
504
505 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
506 affects_type_identity and handler fields, adjust comments.
507
734914b6
RS
5082017-12-07 Richard Sandiford <richard.sandiford@arm.com>
509
510 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
511
5d9ae53d
MS
5122017-12-07 Martin Sebor <msebor@redhat.com>
513
514 PR c/81544
515 * lto-lang.c (lto_attribute_table): Initialize new member of struct
516 attribute_spec.
517
5de73c05
JJ
5182017-11-30 Jakub Jelinek <jakub@redhat.com>
519
520 * lto.c (create_subid_section_table): Use ; instead of ;;.
521
974aedcc
MP
5222017-11-22 Marek Polacek <polacek@redhat.com>
523
524 PR c++/60336
525 PR middle-end/67239
526 PR target/68355
527 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
528
1bad9c18
JH
5292017-11-10 Jan Hubicka <hubicka@ucw.cz>
530
531 * lto-partition.c (lto_balanced_map): Use frequency accessor.
532
65991ea3
JH
5332017-10-13 Jan Hubicka <hubicka@ucw.cz>
534
535 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
536
4e7d0260
NS
5372017-10-11 Nathan Sidwell <nathan@acm.org>
538
539 * lto.c (mentions_vars_p_decl_with_vis): Use
540 DECL_ASSEMBLER_NAME_RAW.
541 (lto_fixup_prevailing_decls): Likewise.
542
8e6cdc90
RS
5432017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
544
545 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
546 operating on trees as wide_ints.
547
357b7604
RS
5482017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
549 Alan Hayward <alan.hayward@arm.com>
550 David Sherwood <david.sherwood@arm.com>
551
552 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
553
1ea85365
RB
5542017-08-21 Richard Biener <rguenther@suse.de>
555
92a285c1
ML
556 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
557 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
558 TYPE_DECL debug processing, register DIE references from
559 prevailing SCCs with the debug machinery.
560 (lto_section_with_id): Handle LTO debug sections.
1ea85365 561
8e093270
NS
5622017-08-16 Nathan Sidwell <nathan@acm.org>
563
564 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
565 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
566 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
567
eac3ab4a
TV
5682017-08-08 Tom de Vries <tom@codesourcery.com>
569
570 * lto.c: Include attribs.h.
571
314e6352
ML
5722017-08-08 Martin Liska <mliska@suse.cz>
573
574 * lto-lang.c: Include header files.
575 * lto-symtab.c: Likewise.
576
63e434ca
RB
5772017-08-03 Richard Biener <rguenther@suse.de>
578
579 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
580 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
581 use DECL_LANG_FLAG_0.
582 (lto_symtab_prevail_decl): Likewise.
583
417ca011
TD
5842017-07-07 Torsten Duwe <duwe@suse.de>
585
586 * lto-lang.c (lto_attribute_table): Add entry for
587 "patchable_function_entry".
588
20deef65
NS
5892017-07-19 Nathan Sidwell <nathan@acm.org>
590
591 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
592 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
593
0eaf0bfe
JH
5942017-07-06 Jan Hubicka <hubicka@ucw.cz>
595
596 * lto-partition.c (lto_balanced_map): Do not check
597 flag_toplevel_reorder.
2db9b7cd 598
0eaf0bfe 5992017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
600 * lto-lang.c (lto_init): Use builtin_structptr_types.
601
d1eed638
JH
6022017-06-15 Jan Hubicka <hubicka@ucw.cz>
603 Thomas Preud'homme <thomas.preudhomme@arm.com>
604
605 PR lto/69866
606 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
607 that resolved externally.
608
d2db2e6b
JH
6092017-05-23 Jan Hubicka <hubicka@ucw.cz>
610
611 * lto.c (do_whole_program_analysis): Replace inline_free_summary
612 by ipa_free_fn_summary.
613
464d0118
ML
6142017-05-23 Martin Liska <mliska@suse.cz>
615
616 * lto-symtab.c (lto_cgraph_replace_node): Use
617 symtab_node::dump_{asm_,}name functions.
618 * lto.c (read_cgraph_and_symbols): Likewise.
619 (do_whole_program_analysis): Likewise.
620
6c52831d
ML
6212017-05-23 Martin Liska <mliska@suse.cz>
622
623 * lto.c (read_cgraph_and_symbols): Use the renamed function.
624 (do_whole_program_analysis): Use the renamed function.
625
27d020cf
JH
6262017-05-22 Jan Hubicka <hubicka@ucw.cz>
627
628 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
629 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
630
815d9cc6
XR
6312017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
632
92a285c1 633 PR c++/80038
815d9cc6
XR
634 * lto-lang.c (lto_init): Set in_lto_p earlier.
635
350792ff 6362017-04-12 Richard Biener <rguenther@suse.de>
ab20d992 637 Bernd Edlinger <bernd.edlinger@hotmail.de>
350792ff
RB
638
639 PR middle-end/79671
640 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
641
4a44a5f3
ML
6422017-02-14 Martin Liska <mliska@suse.cz>
643
644 * lto.c (do_stream_out): Free LTO file filename string.
645
8a3a6ab4
DM
6462017-01-19 David Malcolm <dmalcolm@redhat.com>
647
648 * lto-lang.c (builtin_type_for_size): Convert call to
649 lto_type_for_size to one through the langhook.
650 (lto_type_for_size): Move to langhooks.c and rename to
651 lhd_type_for_size.
652 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
653
4c4b4703
JJ
6542017-01-11 Jakub Jelinek <jakub@redhat.com>
655
656 PR middle-end/50199
657 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
658 if it was 0.
659
bd2c6270
JJ
6602017-01-09 Jakub Jelinek <jakub@redhat.com>
661
662 PR translation/79019
663 PR translation/79020
664 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
665
24d3f325
NS
6662017-01-06 Nathan Sidwell <nathan@acm.org>
667
5406184c
NS
668 * lto-partition.c (promote_symbol): Write to dump file sooner,
669 include alias promoting too.
670
24d3f325
NS
671 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
672 (may_need_named_section_p): Likewise.
673 (rename_statics): Likewise.
674 (lto_promote_cross_file_statics): Likewise.
675
cbe34bb5
JJ
6762017-01-01 Jakub Jelinek <jakub@redhat.com>
677
678 Update copyright years.
679
6c8bf066
GJL
6802016-11-30 Georg-Johann Lay <avr@gjlay.de>
681
682 PR lto/78562
683 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
684 mismatch if the two types are built-in.
685
7fa6a965
PK
6862016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
687
688 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
689
efb71232
RB
6902016-11-23 Richard Biener <rguenther@suse.de>
691
692 PR lto/78472
693 * lto.c (hash_canonical_type): Ignore zero-sized fields.
694
48330c93
BE
6952016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
696
697 PR c++/71973
698 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
699
899ca90e 7002016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
701 Alan Hayward <alan.hayward@arm.com>
702 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
703
704 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
705
65179585
RB
7062016-10-31 Richard Biener <rguenther@suse.de>
707
708 PR lto/78129
709 * lto.c (do_whole_program_analysis): Bail out after errors
710 from WPA analysis.
711
8bc5448f
KV
7122016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
713
714 * lto-partition.c: Include tree-vrp.h.
715 * lto.c: Likewise.
716
68317985
RB
7172016-09-20 Richard Biener <rguenther@suse.de>
718
719 * lto.c (lto_main): Call early_finish with "<artificial>" as
720 filename.
721
321e76fb
RB
7222016-09-19 Richard Biener <rguenther@suse.de>
723
724 * lto.c (lto_main): Invoke early_finish debug hook.
725
ea6e17d5
RB
7262016-07-25 Richard Biener <rguenther@suse.de>
727
728 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
729 (unify_scc): Likewise.
730 (lto_read_decls): Likewise.
731
e9ac1f86
JJ
7322016-06-28 Jakub Jelinek <jakub@redhat.com>
733
734 * Make-lang.in: Don't cat ../stage_current if it does not exist.
735
277d7ee0
AK
7362016-06-23 Andi Kleen <ak@linux.intel.com>
737
738 * Make-lang.in: Add support for autofdo (disabled for now)
739
4d926e34
MS
7402016-06-10 Martin Sebor <msebor@redhat.com>
741
742 PR c/71392
ab20d992 743 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
4d926e34
MS
744 attribute in type-generic builtins.
745
479f99c9
JH
7462016-05-16 Jan Hubicka <hubicka@ucw.cz>
747
748 * lto-partition.c (add_symbol_to_partition_1): Likewise.
749
1a0bf5e1
JH
7502016-05-03 Jan Hubicka <hubicka@ucw.cz>
751
752 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
753
a2e76867
PK
7542016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
755
756 * lto-partition.h (lto_balanced_map): New parameter.
757 * lto-partition.c (lto_balanced_map): New parameter
758 max_partition_size.
759 Check if partition size is greater than max_partition_size.
760 * lto.c (do_whole_program_analysis): Adjust calls to
761 lto_balanced_map() to pass 2nd argument.
762
ea913779
L
7632016-03-17 H.J. Lu <hongjiu.lu@intel.com>
764
765 PR lto/70258
766 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
767 PIE.
768
56aae4b7
JJ
7692016-03-08 Jakub Jelinek <jakub@redhat.com>
770
771 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
772 - becuase -> because.
773
ed5d948d
TV
7742016-02-15 Tom de Vries <tom@codesourcery.com>
775
776 PR lto/69655
777 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
778 argument.
779
4ecbadc7
ML
7802016-01-27 Martin Liska <mliska@suse.cz>
781
782 * lto-partition.c (add_symbol_to_partition_1): Remove usage
783 of hsa_summaries.
784
e49d321f
JH
7852016-01-19 Jan Hubicka <hubicka@ucw.cz>
786
787 PR lto/69136
788 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
789 decls have no assemblernames.
790
b2b40051 7912016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 792 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
793
794 * lto-partition.c: Include "hsa.h"
795 (add_symbol_to_partition_1): Put hsa implementations into the
796 same partition as host implementations.
797
5803bd01
JH
7982016-01-12 Jan Hubicka <hubicka@ucw.cz>
799
800 PR lto/69003
801 * lto-partition.c (rename_statics): Fix pasto.
802
13092f61
RB
8032016-01-18 Richard Biener <rguenther@suse.de>
804
805 PR lto/69337
806 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
807 function vs. variable.
808
3c4e91c9
RB
8092016-01-12 Richard Biener <rguenther@suse.de>
810
811 PR lto/69077
812 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
813 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
814
818ab71a
JJ
8152016-01-04 Jakub Jelinek <jakub@redhat.com>
816
817 Update copyright years.
818
3fddb2ef
JH
8192015-12-10 Jan Hubicka <hubicka@ucw.cz>
820
821 PR lto/68878
822 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
823 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
824 (lto_symtab_prevailing_decl): Use it.
825
4a38b02b
IV
8262015-12-15 Ilya Verbin <ilya.verbin@intel.com>
827
828 * lto.c: Include stringpool.h and fold-const.h.
829 (offload_handle_link_vars): New static function.
830 (lto_main): Call offload_handle_link_vars.
831
ca834876
JH
8322015-12-10 Jan Hubicka <hubicka@ucw.cz>
833
834 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
835
958a627f
JH
8362015-12-11 Jan Hubicka <hubicka@ucw.cz>
837
838 PR ipa/61886
839 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
840 values of error and warning attributes.
841
da20571a
JH
8422015-12-08 Jan Hubicka <hubicka@ucw.cz>
843
844 PR lto/68811
845 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
846 DECL.
847 (LTO_NO_PREVAIL): Use gcc_checking_assert.
848
378004b9
JH
8492015-12-08 Jan Hubicka <hubicka@ucw.cz>
850
851 PR lto/68811
852 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
853 by itself.
854
6b9ac179
JH
8552015-12-08 Jan Hubicka <hubicka@ucw.cz>
856
857 PR ipa/61886
858 * lto-symtab.c: Include lto-symtab.h.
859 (lto_cgraph_replace_node): Do not merge profiles here.
860 (lto_symtab_merge_p): New function.
861 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
862 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
863 aliases.
864 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
865 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
866 * lto.c: Include lto-symtab.h
867 * lto-symtab.h: New.
868
41c60c6c
JH
8692015-12-08 Jan Hubicka <hubicka@ucw.cz>
870
871 PR ipa/61886
872 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
873 are not part of the definition.
874 (contained_in_symbol): Likewise.
875 (promote_symbol): When promoting a symbol also promote all transparent
876 aliases.
877 (rename_statics): Weakref needs unique name, too.
878
71e54687
JH
8792015-12-07 Jan Hubicka <hubicka@ucw.cz>
880
881 PR ipa/61886
882 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
883 rename_statics, rename_statics): Handle transparent aliases.
884
88636b62
JH
8852015-12-04 Jan Hubicka <hubicka@ucw.cz>
886
887 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
888 merged_comdat.
889
8c86248e
JH
8902015-12-01 Jan Hubicka <hubicka@ucw.cz>
891
892 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
893
1ff9ed6f
JH
8942015-11-25 Jan Hubicka <jh@suse.cz>
895
896 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
897 * lang.opt (lto_linker_output): New enum.
898 (flinker_output): New flag.
899
22bea0be
JH
9002015-11-24 Jan Hubicka <hubicka@ucw.cz>
901
902 * lto-symtab.c: Include alias.h
903 (warn_type_compatibility_p): Replace types_compatible_p checks by
904 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
905 (lto_symtab_merge): Compare DECL sizes.
906 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
907
aea50b45
JH
9082015-11-24 Jan Hubicka <hubicka@ucw.cz>
909
910 * lto.c (iterative_hash_canonical_type): Recruse for all types
911 which pass !canonical_type_used_p.
912 (gimple_register_canonical_type_1): Sanity check we do not compute
913 canonical type of anything with !canonical_type_used_p.
914 (gimple_register_canonical_type): Skip all types that are
915 !canonical_type_used_p
916
deb3dae6
JH
9172015-11-24 Jan Hubicka <hubicka@ucw.cz>
918
919 * lto.c (unify_scc): Use free_node.
920
f85d2487
JH
9212015-11-21 Jan Hubicka <hubicka@ucw.cz>
922
923 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
924 (gimple_register_canonical_type_1): Check that pointers do not get
925 canonical types.
926 (gimple_register_canonical_type): Do not register pointers.
927
9282015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
929
930 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
931 flag for types that are not ODR; fix loop walking parameters.
932
69f293c9
AM
9332015-11-11 Andrew MacLeod <amacleod@redhat.com>
934
935 * lto-lang.c: Remove unused header files.
936 * lto-object.c: Likewise.
937 * lto-partition.c: Likewise.
938 * lto-symtab.c: Likewise.
939 * lto.c: Likewise.
940
ee45a32d
EB
9412015-11-08 Eric Botcazou <ebotcazou@adacore.com>
942
943 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
944
0aad0198
RS
9452015-11-07 Richard Sandiford <richard.sandiford@arm.com>
946
947 * lto-lang.c: Don't undef DEF_BUILTIN.
948
2adfab87
AM
9492015-10-29 Andrew MacLeod <amacleod@redhat.com>
950
951 * lto-lang.c: Reorder #include's and remove duplicates.
952 * lto-object.c: Likewise.
953 * lto-partition.c: Likewise.
954 * lto-symtab.c: Likewise.
955 * lto.c: Likewise.
956
b2b29377
MM
9572015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
958
959 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
960 conditionals.
961 (lto_fixup_state): Likewise.
962 (do_whole_program_analysis): Use
963 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
964 conditionals.
965
d9a6bd32
JJ
9662015-10-13 Jakub Jelinek <jakub@redhat.com>
967
968 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
969 DEF_FUNCTION_TYPE_11): Define.
970
9c4eeafc
JH
9712015-10-10 Jan Hubicka <hubicka@ucw.cz>
972
973 * lto.c (hash_canonical_type): Honor
974 type_with_interoperable_signedness.
975
3e32ee19
NS
9762015-09-28 Nathan Sidwell <nathan@codesourcery.com>
977
978 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
979 (DEF_FUNCTION_TYPE_VAR_11): Delete.
980
f196d062
RB
9812015-08-31 Richard Biener <rguenther@suse.de>
982
983 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
984 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
985 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
986 participate in merging with something else.
987
45aee888
RB
9882015-08-31 Richard Biener <rguenther@suse.de>
989
990 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
991 test, do not replace a non-builtin with a builtin.
992 * lto.c (compare_tree_sccs_1): Do not merge things we stream
993 as builtins vs. non-builtins.
994
a79683d5
TS
9952015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
996
997 * lto.h: Remove useless typedefs.
998
48d859bb
AM
9992015-07-15 Andrew MacLeod <amacleod@redhat.com>
1000
1001 * lto.c: Remove redundant includes.
1002
026c3cfd
AH
10032015-07-12 Aldy Hernandez <aldyh@redhat.com>
1004
1005 * lto-lang.c: Fix double word typos.
1006
9fdcd34e
AM
10072015-07-10 Andrew MacLeod <amacleod@redhat.com>
1008
1009 * lto.c: Include cfghooks.h rather than predict.h.
1010
f51ade33
AM
10112015-07-09 Andrew MacLeod <amacleod@redhat.com>
1012
1013 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1014 lto-streamer.h.
1015 * lto-object.c: Likewise.
1016 * lto-partition.c: Likewise.
1017 * lto-symtab.c: Likewise.
1018
1916bcb5
AM
10192015-07-09 Andrew MacLeod <amacleod@redhat.com>
1020
1021 * lto-lang.c: Adjust includes for flags.h changes.
1022
c7131fb2
AM
10232015-07-07 Andrew MacLeod <amacleod@redhat.com>
1024
1025 * lto-lang.c: Adjust includes.
1026 * lto-object.c: Likewise.
1027 * lto-partition.c: Likewise.
1028 * lto-symtab.c: Likewise.
1029 * lto.c: Likewise.
1030
f0889939
AM
10312015-06-25 Andrew MacLeod <amacleod@redhat.com>
1032
1033 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1034 * lto-object.c: Likewise.
1035 * lto-partition.c: Likewise.
1036 * lto-symtab.c: Likewise.
1037 * lto-tree.h: Likewise.
1038 * lto.c: Likewise.
1039
8d67ee55
RS
10402015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1041
1042 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1043 than typed_noop_remove. Remove redudant typedefs.
1044
abb226c9
AM
10452015-06-17 Andrew MacLeod <amacleod@redhat.com>
1046
1047 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1048 * lto-object.c: Likewise.
1049 * lto-partition.c: Likewise.
1050 * lto-symtab.c: Likewise.
1051 * lto.c: Likewise.
1052
351d90f4
JH
10532015-06-14 Jan Hubicka <hubicka@ucw.cz>
1054
1055 PR ipa/66181
1056 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1057
44c42705
DD
10582015-06-12 DJ Delorie <dj@redhat.com>
1059
1060 * lto-lang.c (lto_type_for_size): Include intN types.
1061 (lto_type_for_mode): Likewise.
1062
64578d98
JH
10632015-06-08 Jan Hubicka <hubicka@ucw.cz>
1064
1065 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1066
13fdf2e2
AM
10672015-06-08 Andrew MacLeod <amacleod@redhat.com>
1068
1069 * lto-lang.c : Adjust include files.
1070 * lto-object.c : Likewise.
1071 * lto-partition.c : Likewise.
1072 * lto-partition.h : Likewise.
1073 * lto-symtab.c : Likewise.
1074 * lto.c : Likewise.
1075 * lto.h : Likewise.
1076
ccb5ad37
JH
10772015-06-06 Jan Hubicka <hubicka@ucw.cz>
1078
6542950e
JH
1079 PR lto/65378
1080 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1081 odr_or_derived_type_p.
1082 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1083
10842015-06-08 Jan Hubicka <hubicka@ucw.cz>
1085
ccb5ad37
JH
1086 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1087 pointers.
1088
d7438551
AH
10892015-06-05 Aldy Hernandez <aldyh@redhat.com>
1090
1091 * lto-lang.c (lto_write_globals): Remove.
1092 (LANG_HOOKS_WRITE_GLOBALS): Same.
1093
ecb9f223
AM
10942015-06-04 Andrew MacLeod <amacleod@redhat.com>
1095
1096 * lto-lang.c: Adjust includes for restructured coretypes.h.
1097 * lto-object.c: Likewise.
1098 * lto-partition.c: Likewise.
1099 * lto-symtab.c: Likewise.
1100 * lto.c: Likewise.
1101
9cb9b937
JH
11022015-06-04 Jan Hubicka <hubicka@ucw.cz>
1103
1104 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1105
93e2aa6d
JH
11062015-06-03 Jan Hubicka <hubicka@ucw.cz>
1107
1108 * lto.c (iterative_hash_canonical_type,
1109 gimple_register_canonical_type): only hash main variants of types
1110
faae53f8
ML
11112015-05-27 Martin Liska <mliska@suse.cz>
1112
1113 * lto-partition.c (new_partition): Reset number of symbols.
1114 (add_symbol_to_partition_1): Increment number of symbols.
1115 (undo_partition): Decrement number of symbols.
1116 (lto_balanced_map): Dump number of symbols and insns that
1117 belong to a partition.
1118 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1119
b727ba74
JH
11202015-05-22 Jan Hubicka <hubicka@ucw.cz>
1121
1122 * lto.c (hash_canonical_type): Be sure we hash only types that
1123 need alias set.
1124 (gimple_register_canonical_type_1): Do not produce canonical
1125 types for types that do not need alias sets.
1126
1d1218fb
JH
11272015-05-22 Jan Hubicka <hubicka@ucw.cz>
1128
1129 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1130
872d5034
JH
11312015-05-19 Jan Hubicka <hubicka@ucw.cz>
1132
1133 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1134
259d29e3
JH
11352015-05-17 Jan Hubicka <hubicka@ucw.cz>
1136
1137 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1138 compare ODR types (if available) and function types.
1139 (lto_symtab_merge): ... here; output ODR violation warnings
1140 and call warn_types_mismatch.
1141
b0845a1e
JH
11422015-04-29 Jan Hubicka <hubicka@ucw.cz>
1143
1144 * lto.c (lto_fixup_state): Call verify_type.
1145
67f58944
TS
11462015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1147
b0845a1e 1148 * lto.c: Adjust for hash_table changes.
67f58944 1149
36ceb0e3
JH
11502015-03-27 Jan Hubicka <hubicka@ucw.cz>
1151
1152 * lto.c (lto_read_decls): Move code registering odr types out
1153 of TYPE_CANONICAL conditional and also register polymorphic types.
1154
afd1e7c6
JH
11552015-03-26 Jan Hubicka <hubicka@ucw.cz>
1156
1157 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1158 DECL_ARTIFICAL symbols.
1159
eaeec5ec
JH
11602015-03-26 Jan Hubicka <hubicka@ucw.cz>
1161
1162 PR lto/65536
1163 * lto.c (unify_scc): Revert location cache when unification
1164 suceeded.
1165 (lto_read_decls): Accept location cache after sucess;
1166 apply location cache before calling debug hooks.
1167
1c4db829
JH
11682015-03-10 Jan Hubicka <hubicka@ucw.cz>
1169
1170 * lto.c (read_cgraph_and_symbols): Do not do merging
1171 at ltrans stage.
1172
db847fa8
JJ
11732015-02-26 Jakub Jelinek <jakub@redhat.com>
1174
1175 * lto.c (lto_mode_identity_table): New variable.
1176 (lto_read_decls): Add mode_table argument to the lto_input_block
1177 constructor.
1178 (lto_file_finalize): Initialize mode_table.
1179 (lto_init): Initialize lto_mode_identity_table.
1180
56a9f6bc
TS
11812015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1182
1183 PR libgomp/64625
1184 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1185 Remove macros.
1186 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1187
ebc8f0bb
JH
11882015-02-03 Jan Hubicka <hubicka@ucw.cz>
1189
1190 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1191
40fecdd6
JM
11922015-01-30 Joseph Myers <joseph@codesourcery.com>
1193
1194 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1195 changed to pass input_location as first argument.
1196
040968a8
JH
11972014-12-11 Jan Hubicka <hubicka@ucw.cz>
1198
1199 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1200
69fe4502
JH
12012014-12-11 Jan Hubicka <hubicka@ucw.cz>
1202
1203 * lto.c (compare_tree_sccs_1): Add comparsion of
1204 DECL_FUNCTION_SPECIFIC_TARGET
1205
41dbbb37
TS
12062015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1207 James Norris <jnorris@codesourcery.com>
1208
1209 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1210 New macros.
1211 * lto.c: Include "gomp-constants.h".
1212
837bac8c
IV
12132015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1214
1215 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1216 from select_what_to_stream.
1217
1b34e6e2
BS
12182015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1219 Jakub Jelinek <jakub@redhat.com>
1220
1221 PR middle-end/64412
1222 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1223 if ACCEL_COMPILER.
1224
adfac8df
JJ
12252015-01-09 Michael Collison <michael.collison@linaro.org>
1226
1227 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1228 input.h, alias.h, symtab.h, options, fold-const.h,
1229 wide-int.h, and inchash.h due to flattening of tree.h.
1230 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1231 input.h, alias.h, symtab.h, fold-const.h,
1232 wide-int.h, and inchash.h due to flattening of tree.h.
1233 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1234 input.h, alias.h, symtab.h, options, fold-const.h,
1235 wide-int.h, and inchash.h due to flattening of tree.h.
1236 * lto-partition.c: Ditto.
1237 * lto-symtab.c: Ditto.
1238
5624e564
JJ
12392015-01-05 Jakub Jelinek <jakub@redhat.com>
1240
1241 Update copyright years.
1242
9a1e784a
ML
12432014-12-22 Martin Liska <mliska@suse.cz>
1244
1245 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1246 is used.
1247 (undo_partition): Likewise.
1248 (lto_balanced_map): Likewise.
1249
dd912cb8
ML
12502014-12-22 Martin Liska <mliska@suse.cz>
1251
1252 * lto-partition.c: Include of symbol-summary.h is added.
1253 * lto-symtab.c: Likewise.
1254 * lto.c: Likewise.
1255
17e0fc92
JH
12562014-12-11 Jan Hubicka <hubicka@ucw.cz>
1257
1258 PR ipa/61324
1259 * lto.c (read_cgraph_and_symbols): Update call of
1260 remove_unreachable_nodes.
1261 (do_whole_program_analysis): Remove call of
1262 symtab->remove_unreachable_nodes
1263
58dddbd2
TS
12642014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1265
1266 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1267 htab with malloc instead of ggc.
1268
907dadbd
TS
12692014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1270
1271 * lto.c: Replace htab with hash_table.
1272
9c71e9df
TS
12732014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1274
1275 * lto.c (lto_read_in_decl_state): Adjust.
1276 (lto_fixup_state): Likewise.
1277
72a4a8b0
JH
12782014-11-17 Jan Hubicka <hubicka@ucw.cz>
1279
1280 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1281
54e774c0
JH
12822014-11-14 Jan Hubicka <hubicka@ucw.cz>
1283
1284 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1285
1f6be682
IV
12862014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1287 Bernd Schmidt <bernds@codesourcery.com>
1288 Andrey Turetskiy <andrey.turetskiy@intel.com>
1289 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1290
ab20d992 1291 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
ec6fe917
IV
1292
12932014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1294 Ilya Tocar <ilya.tocar@intel.com>
1295 Andrey Turetskiy <andrey.turetskiy@intel.com>
1296 Bernd Schmidt <bernds@codesourcery.com>
1297
1f6be682
IV
1298 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1299 LTO_SECTION_NAME_PREFIX.
1300 * lto-partition.c (lto_promote_cross_file_statics): Call
1301 select_what_to_stream.
1302 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1303 LTO_SECTION_NAME_PREFIX.
1304 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1305 being built as an offload compiler.
1306
ef4bddc2
RS
13072014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1308
1309 * lto-lang.c: Remove redundant enum from machine_mode.
1310
c582198b
AM
13112014-10-28 Andrew MacLeod <amacleod@redhat.com>
1312
1313 * lto.c: Adjust include files.
1314 * lto-lang.c: Ditto.
1315 * lto-object.c: Ditto.
1316 * lto-partition.c: Ditto.
1317 * lto-symtab.c: Ditto.
1318
60393bbc
AM
13192014-10-27 Andrew MacLeod <amacleod@redhat.com>
1320
1321 * lto-lang.c: Adjust include files.
1322 * lto-object.c: Ditto.
1323 * lto-partition.c: Ditto.
1324 * lto-symtab.c: Ditto.
1325 * lto.c: Ditto.
1326
957f47e6
DD
13272014-10-16 DJ Delorie <dj@redhat.com>
1328
1329 * lto-object.c (lto_obj_begin_section): In the event that pointer
1330 sizes aren't powers of two, choose a more suitable alignment
1331 than (unsigned)(-1).
1332
78a7c317
DD
13332014-10-14 DJ Delorie <dj@redhat.com>
1334
1335 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1336 size-type as well.
1337 (lto_init): Initialize all intN types, not just int128.
1338
70261a4f
ML
13392014-10-06 Martin Liska <mliska@suse.cz>
1340
1341 * lto.c (stream_out): ARG_UNUSED added for last argument.
1342
00de328a
AH
13432014-09-24 Aldy Hernandez <aldyh@redhat.com>
1344
1345 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1346 DECL_ABSTRACT_P.
1347
7861b648
AK
13482014-09-23 Andi Kleen <ak@linux.intel.com>
1349
1350 * lto-partition.c (node_cmp): Update comment.
1351 (varpool_node_cmp): Use symtab_node for comparison.
1352 (add_sorted_nodes): New function.
1353 (lto_balanced_map): Change to keep ordered queue
1354 of ordered node. Handle no_reorder attribute.
1355
1ee85ee1
JH
13562014-09-11 Jan Hubicka <hubicka@ucw.cz>
1357
1358 * lto.c (lto_read_decls): Register ODR types.
1359
8605403e
JH
13602014-08-20 Jan Hubicka <hubicka@ucw.cz>
1361
1362 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1363 call.
1364 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1365
56b1f114
JH
13662014-08-14 Jan Hubicka <hubicka@ucw.cz>
1367
1368 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1369
833f94c0
RB
13702014-08-14 Richard Biener <rguenther@suse.de>
1371
1372 PR lto/62067
1373 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1374
207c68cd
RB
13752014-08-08 Richard Biener <rguenther@suse.de>
1376
1377 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1378
7c581d61
BC
13792014-08-08 Bin Cheng <bin.cheng@arm.com>
1380
1381 PR lto/62032
1382 * lto-lang.c (lto_init): Switch mis-matched arguments.
1383
39c8aaa4
TS
13842014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1385
1386 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1387
6e2830c3
TS
13882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1389
1390 * lto-partition.c, lto-partition.h: Use hash_set instead of
1391 pointer_set.
1392
50de5793
AK
13932014-07-31 Andi Kleen <ak@linux.intel.com>
1394
1395 * lto.c (hash_canonical_type): Use inchash::hash
1396 and use inchash::add_expr.
1397 (iterative_hash_canonical_type): Dito.
1398
f6bcdb5e
RB
13992014-07-30 Richard Biener <rguenther@suse.de>
1400
1401 * lto-streamer.h (lto_write_data): New function.
1402 * langhooks.c (lhd_append_data): Do not free block.
1403 * lto-section-out.c (lto_write_data): New function writing
1404 raw data to the current section.
1405 (lto_write_stream): Adjust for langhook semantic change.
1406 (lto_destroy_simple_output_block): Write header directly.
1407 * lto-opts.c (lto_write_options): Write options directly.
1408 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1409 (lto_output_toplevel_asms): Likewise.
1410 (copy_function_or_variable): Copy data directly.
1411 (write_global_references): Output index table directly.
1412 (lto_output_decl_state_refs): Likewise.
1413 (write_symbol): Write data directly.
1414 (produce_symtab): Adjust.
1415 (produce_asm_for_decls): Output header and refs directly.
1416
56fdfd3e
AK
14172014-07-25 Andi Kleen <ak@linux.intel.com>
1418
1419 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1420
0bd8bb04
AK
14212014-07-25 Andi Kleen <ak@linux.intel.com>
1422
1423 * lto.c (hash_canonical_type): Convert to inchash.
1424 (iterative_hash_canonical_type): Dito.
1425
6d8eb96b
AK
14262014-07-25 Andi Kleen <ak@linux.intel.com>
1427
1428 * lto.c: Include inchash.h
1429
ad115a3c
JH
14302014-07-14 Jan Hubicka <hubicka@ucw.cz>
1431
1432 * lto.c (mentions_vars_p_decl_non_common): Skip
1433 DECL_ARGUMENT_FLD.
1434 mentions_vars_p_function): Do DECL_ARGUMENTS.
1435 (lto_fixup_prevailing_decls): Update.
1436
917dd9bf
JH
14372014-07-12 Jan Hubicka <hubicka@ucw.cz>
1438
1439 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1440 timevar
1441 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1442
0b83e688
JH
14432014-07-11 Jan Hubicka <hubicka@ucw.cz>
1444
ab20d992 1445 * lto-partition.c (add_references_to_partition): Use
0b83e688
JH
1446 varpool_ctor_useable_for_folding_p.
1447 * lto.c (lto_read_in_decl_state): Update sanity check.
1448
e55637b7
ML
14492014-07-01 Martin Liska <mliska@suse.cz>
1450
1451 IPA REF alias refactoring
1452 * lto-partition.c (add_symbol_to_partition_1): Usage of
1453 FOR_EACH_ALIAS added.
1454
010f4e27
JH
14552014-06-28 Jan Hubicka <hubicka@ucw.cz>
1456
1457 Revert:
1458 * lto.c (lto_copy_fields_not_streamed): New function.
1459 (compare_tree_sccs_1): Do not compare fields shared in between type
1460 and variant.
1461 (lto_read_decls): Fixup types first before inserting into hash.
1462
b82fe354
AP
14632014-06-28 Andrew Pinski <apinski@cavium.com>
1464
1465 * lto.c (lto_read_decls): Fix comment in comment.
1466
288eeff7
JH
14672014-06-28 Jan Hubicka <hubicka@ucw.cz>
1468
1469 * lto.c (lto_copy_fields_not_streamed): New function.
1470 (compare_tree_sccs_1): Do not compare fields shared in between type
1471 and variant.
1472 (lto_read_decls): Fixup types first before inserting into hash.
1473
e01fa630
ML
14742014-06-25 Martin Liska <mliska@suse.cz>
1475
ab20d992 1476 * lto-partition.c (add_references_to_partition): New IPA REF function
e01fa630
ML
1477 used.
1478 (add_symbol_to_partition_1): Likewise.
1479 (lto_balanced_map): Likewise.
ab20d992 1480 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
e01fa630 1481
aaf8a23e
JH
14822014-06-24 Jan Hubicka <hubicka@ucw.cz>
1483
1484 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1485 (mentions_vars_p_function): ... here.
1486 (compare_tree_sccs_1): Update VINDEX checks.
1487 (lto_fixup_prevailing_decls): Likewise.
1488
1eb68d2d
TS
14892014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1490
1491 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1492 pointer_map.
1493
c203e8a7
TS
14942014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1495
1496 * lto.c: Adjust.
1497
714c800f
JH
14982014-06-20 Jan Hubicka <hubicka@ucw.cz>
1499
1500 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1501
569b1784
JH
15022014-06-20 Jan Hubicka <hubicka@ucw.cz>
1503
1504 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1505
56363ffd
JH
15062014-06-15 Jan Hubicka <hubicka@ucw.cz>
1507
1508 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1509
e257a17c
JH
15102014-06-10 Jan Hubicka <hubicka@ucw.cz>
1511
1512 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1513 (do_whole_program_analysis): Use verify_symtab.
1514
24d047a3
JH
15152014-06-07 Jan Hubicka <hubicka@ucw.cz>
1516
1517 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1518 lto_fixup_prevailing_decls): Skip section names.
1519
9b2b7279
AM
15202014-06-02 Andrew MacLeod <amacleod@redhat.com>
1521
1522 * lto-symtab.c: Include builtins.h.
1523
a9243bfc
RB
15242014-05-26 Richard Biener <rguenther@suse.de>
1525
1526 * lto.c (lto_parse_hex): Use int64_t.
1527 (lto_resolution_read): Likewise.
1528
fd1e9302
JH
15292014-05-23 Jan Hubicka <hubicka@ucw.cz>
1530
1531 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1532
aede2c10
JH
15332014-05-23 Jan Hubicka <hubicka@ucw.cz>
1534
1535 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1536 symtab pointer.
1537 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1538
f6a7cffc
TS
15392014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1540
1541 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1542 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1543 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1544
4000360e
BS
15452012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1546
1547 * lto-object.c: Include "lto-section-names.h".
1548 (LTO_SEGMENT_NAME): Don't define.
1549 * lto.c: Include "lto-section-names.h".
1550
b9559136
JH
15512014-05-17 Jan Hubicka <hubicka@ucw.cz>
1552
1553 PR lto/61012
1554 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1555 mixed with variables.
1556
766090c2
TS
15572014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1558
1559 * lto-tree.h: Don't use variable_size gty attribute.
1560 * lto.c (lto_read_in_decl_state): Adjust.
1561 (create_subid_section_table): Likewise.
1562 (lto_flatten_files): Likewise.
1563 (read_cgraph_and_symbols): Likewise.
1564
1d60af08
KZ
15652014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1566 Mike Stump <mikestump@comcast.net>
1567 Richard Sandiford <rdsandiford@googlemail.com>
1568
1569 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1570 * lto-lang.c (get_nonnull_operand): Likewise.
1571
22869a37
RB
15722014-04-28 Richard Biener <rguenther@suse.de>
1573
1574 PR middle-end/60092
1575 * lto-lang.c: Define flag_isoc11.
1576
7de90a6c
DM
15772014-04-23 David Malcolm <dmalcolm@redhat.com>
1578
1579 * lto-partition.c (add_references_to_partition): Update for
1580 removal of implicit pointer from the is-a.h API.
1581 (add_symbol_to_partition_1): Likewise.
1582 (contained_in_symbol): Likewise.
1583 (undo_partition): Likewise.
1584 (lto_balanced_map): Likewise.
1585 (promote_symbol): Likewise.
1586 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1587 (lto_symtab_merge_symbols): Likewise.
1588 * lto.c (lto_wpa_write_files): Likewise.
1589
783dab6b
RB
15902014-04-15 Richard Biener <rguenther@suse.de>
1591
1592 * lto.c: Include params.h.
1593 (do_whole_program_analysis): Switch on flag_lto_partition value,
1594 add support for LTO_PARTITION_ONE.
1595 * lto-partition.h (lto_balanced_map): Adjust.
1596 * lto-partition.c (lto_balanced_map): Get number of desired
1597 partitions as argument to support -flto-partition=one.
1598
cb90235d
JH
15992014-04-14 Jan Hubicka <hubicka@ucw.cz>
1600
ab20d992 1601 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
cb90235d
JH
1602 tp_first_run.
1603
bbe281da
JH
16042014-03-19 Jan Hubicka <hubicka@ucw.cz>
1605
1606 * lto.c: Include ipa-inline.h
1607 (do_whole_program_analysis): Free inline summary after partitioning.
1608
ce2f49b3
RB
16092014-03-19 Richard Biener <rguenther@suse.de>
1610
1611 PR middle-end/60553
ab20d992 1612 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
ce2f49b3
RB
1613 instead of TREE_CHAIN as chain_next.
1614
e41106fc
RB
16152014-03-19 Richard Biener <rguenther@suse.de>
1616
1617 * lto.c (lto_wpa_write_files): Move call to
1618 lto_promote_cross_file_statics ...
1619 (do_whole_program_analysis): ... here, into the partitioning
1620 block. Do not ggc_collect after lto_wpa_write_files but
1621 for a last time before it.
1622
15df2655
JJ
16232014-03-19 Jakub Jelinek <jakub@redhat.com>
1624
1625 PR lto/60571
1626 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1627 Fix formatting.
1628
415e2e6b
JJ
16292014-03-18 Jakub Jelinek <jakub@redhat.com>
1630
1631 PR sanitizer/60535
1632 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1633 and complex_{float,{,long_}double}_type_node.
1634
f42c637e
PM
16352014-03-08 Paulo Matos <paulo@matos-sorge.com>
1636
415e2e6b
JJ
1637 * lto-lang.c (lto_init): Pass flag_short_double to
1638 build_common_tree_nodes.
f42c637e 1639
6dab804d
JH
16402014-02-14 Jan Hubicka <hubicka@ucw.cz>
1641
1642 PR lto/60295
1643 * lto.c (stream_out): Avoid parallel streaming with
1644 -flto=jobserver until we are able to throttle it down
1645 resonably.
1646
39434bce
JH
16472014-02-14 Jan Hubicka <hubicka@ucw.cz>
1648
1649 * lto-partition.c (add_symbol_to_partition_1,
1650 undo_partition, lto_balanced_map): Aliases have no
1651 defined size.
1652 (lto_balanced_map): Do not follow refering variables
1653 if they can be optimized out.
1654
1966fd99
RB
16552014-02-14 Richard Biener <rguenther@suse.de>
1656
1657 PR lto/60179
1658 * lto.c (compare_tree_sccs_1): Do not compare
1659 DECL_FUNCTION_SPECIFIC_TARGET.
1660 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1661
283416b3
RB
16622014-02-12 Richard Biener <rguenther@suse.de>
1663
1664 PR lto/60060
1665 * lto-lang.c (lto_write_globals): Do not call
1666 wrapup_global_declarations or emit_debug_global_declarations
1667 but emit debug info for non-function scope variables
1668 directly.
1669
b7e85694
JH
16702014-02-06 Jan Hubicka <hubicka@ucw.cz>
1671
1672 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1673
96451279
JH
16742014-02-06 Jan Hubicka <hubicka@ucw.cz>
1675
1676 PR ipa/59469
1677 * lto-partition.c (symbol_class): Move to cgraph.h
1678 (get_symbol_class): Move to symtab.c
1679 (add_references_to_partition, add_symbol_to_partition_1,
1680 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1681 lto_promote_cross_file_statics): Update.
1682
f300e7b8
JH
16832014-02-05 Jan Hubicka <hubicka@ucw.cz>
1684
1685 * lto.c (lto_parallelism): New static var.
1686 (do_stream_out, wait_for_child, stream_out): New static functions.
1687 (lto_wpa_write_files): Add support for parallel streaming.
1688 (do_whole_program_analysis): Set parallelism.
1689 * lang.opt (fwpa): Add parameter.
1690 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1691 (lto_init): Update use of flag_wpa.
1692 * lto-streamer.h (asm_nodes_output): Declare.
1693
f0f91770
RB
16942014-02-05 Richard Biener <rguenther@suse.de>
1695
1696 * lto.h (lto_global_var_decls): Remove.
1697 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1698 (lto_write_globals): Do nothing in WPA stage, gather globals from
1699 the varpool here ...
1700 * lto.c (lto_main): ... not here.
1701 (materialize_cgraph): Do not call rest_of_decl_compilation
1702 on the empty lto_global_var_decls vector.
1703 (lto_global_var_decls): Remove.
1704
d665f8dd
JH
17052014-02-04 Jan Hubicka <hubicka@ucw.cz>
1706
ab20d992 1707 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
d665f8dd
JH
1708 needs duplicating, not generic COMDAT.
1709
c39276b8
RB
17102014-02-04 Richard Biener <rguenther@suse.de>
1711
1712 PR lto/59723
1713 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1714 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1715
5f876ae7
JH
17162014-02-04 Jan Hubicka <hubicka@ucw.cz>
1717 Markus Trippelsdorf
1718
1719 PR ipa/59469
1720 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1721 merge force_output and forced_by_abi flags.
1722
b72271b9
BI
17232014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1724
1725 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1726 flag_cilkplus.
1727
63124c48
RB
17282014-01-09 Richard Biener <rguenther@suse.de>
1729
1730 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1731
d05b9920
RB
17322014-01-09 Richard Biener <rguenther@suse.de>
1733
1734 PR lto/45586
1735 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1736 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1737 (gimple_canonical_types_compatible_p): Do not compare them either.
1738
23a5b65a
RS
17392014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1740
1741 Update copyright years
1742
2c8326a5
OE
17432013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1744
1745 * lto.c: Remove struct tags when referring to class varpool_node.
1746 * lto-partition.c: Likewise.
1747 * lto-symtab.c: Likewise.
1748
e06f9964
JJ
17492013-11-29 Jakub Jelinek <jakub@redhat.com>
1750 Richard Biener <rguenther@suse.de>
1751
1752 PR lto/59326
1753 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1754
c193f58b
JJ
17552013-11-29 Jakub Jelinek <jakub@redhat.com>
1756
1757 PR lto/59326
1758 * lto.c (mentions_vars_p_omp_clause): New function.
1759 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1760 after return stmts.
1761
2fb9a547
AM
17622013-11-22 Andrew MacLeod <amacleod@redhat.com>
1763
1764 * lto.c: Add required include files from gimple.h.
ab20d992
JJ
1765 * lto-lang.c: Likewise.
1766 * lto-object.c: Likewise.
1767 * lto-partition.c: Likewise.
1768 * lto-symtab.c: Likewise.
2fb9a547 1769
fec39fa6
TS
17702013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1771
1772 * lto-partition.c lto-symtab.c lto.c Adjust.
1773
d8a2d370
DN
17742013-11-14 Diego Novillo <dnovillo@google.com>
1775
1776 * lto-lang.c: Include stringpool.h.
1777 Include stor-layout.h.
1778 * lto-partition.c: Include gcc-symtab.h.
1779 * lto.c: Include stor-layout.h.
1780
5e20cdc9
DM
17812013-10-31 David Malcolm <dmalcolm@redhat.com>
1782
1783 Automated part of renaming of symtab_node_base to symtab_node.
1784
1785 Patch autogenerated by rename_symtab.py from
1786 https://github.com/davidmalcolm/gcc-refactoring-scripts
1787 revision 58bb219cc090b2f4516a9297d868c245495ee622
1788
1789 * lto-partition.c (add_symbol_to_partition): Rename
1790 symtab_node_base to symtab_node.
1791 (get_symbol_class): Likewise.
1792 (symbol_partitioned_p): Likewise.
1793 (add_references_to_partition): Likewise.
1794 (add_symbol_to_partition_1): Likewise.
1795 (contained_in_symbol): Likewise.
1796 (add_symbol_to_partition): Likewise.
1797 (lto_1_to_1_map): Likewise.
1798 (lto_max_map): Likewise.
1799 (lto_balanced_map): Likewise.
1800 (privatize_symbol_name): Likewise.
1801 (promote_symbol): Likewise.
1802 (may_need_named_section_p): Likewise.
1803 (rename_statics): Likewise.
1804 (lto_promote_statics_nonwpa): Likewise.
1805 * lto-symtab.c (lto_symtab_merge): Likewise.
1806 (lto_symtab_resolve_replaceable_p): Likewise.
1807 (lto_symtab_symbol_p): Likewise.
1808 (lto_symtab_resolve_can_prevail_p): Likewise.
1809 (lto_symtab_resolve_symbols): Likewise.
1810 (lto_symtab_merge_decls_2): Likewise.
1811 (lto_symtab_merge_decls_1): Likewise.
1812 (lto_symtab_merge_decls): Likewise.
1813 (lto_symtab_merge_symbols_1): Likewise.
1814 (lto_symtab_merge_symbols): Likewise.
1815 (lto_symtab_prevailing_decl): Likewise.
1816 * lto.c (lto_wpa_write_files): Likewise.
1817 (read_cgraph_and_symbols): Likewise.
1818 (do_whole_program_analysis): Likewise.
1819
378cd6b1
DM
18202013-10-30 David Malcolm <dmalcolm@redhat.com>
1821
1822 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1823 declarations onto multiple lines to make things easier for
1824 rename_symtab.py.
1825 (lto_symtab_merge_decls_1): Likewise.
1826 (lto_symtab_merge_symbols_1): Likewise.
1827
939b37da
BI
18282013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1829
1830 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1831 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1832 Plus is enabled.
1833
67348ccc
DM
18342013-10-29 David Malcolm <dmalcolm@redhat.com>
1835
1836 Patch autogenerated by refactor_symtab.py from
1837 https://github.com/davidmalcolm/gcc-refactoring-scripts
1838 revision 58bb219cc090b2f4516a9297d868c245495ee622
1839
1840 * lto-partition.c (lto_promote_cross_file_statics): Update for
1841 conversion of symtab types to a true class hierarchy.
1842 (rename_statics): Likewise.
1843 (promote_symbol): Likewise.
1844 (privatize_symbol_name): Likewise.
1845 (lto_balanced_map): Likewise.
1846 (varpool_node_cmp): Likewise.
1847 (node_cmp): Likewise.
1848 (lto_1_to_1_map): Likewise.
1849 (undo_partition): Likewise.
1850 (add_symbol_to_partition): Likewise.
1851 (contained_in_symbol): Likewise.
1852 (add_symbol_to_partition_1): Likewise.
1853 (add_references_to_partition): Likewise.
1854 (symbol_partitioned_p): Likewise.
1855 (get_symbol_class): Likewise.
1856 (lto_max_map): Likewise.
1857 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1858 (lto_symtab_merge_symbols): Likewise.
1859 (lto_symtab_merge_symbols_1): Likewise.
1860 (lto_symtab_merge_decls): Likewise.
1861 (lto_symtab_merge_decls_1): Likewise.
1862 (lto_symtab_merge_decls_2): Likewise.
1863 (lto_symtab_resolve_symbols): Likewise.
1864 (lto_symtab_resolve_can_prevail_p): Likewise.
1865 (lto_symtab_symbol_p): Likewise.
1866 (lto_symtab_resolve_replaceable_p): Likewise.
1867 (lto_symtab_merge): Likewise.
1868 (lto_varpool_replace_node): Likewise.
1869 (lto_cgraph_replace_node): Likewise.
1870 * lto.c (lto_main): Likewise.
1871 (do_whole_program_analysis): Likewise.
1872 (materialize_cgraph): Likewise.
1873 (read_cgraph_and_symbols): Likewise.
1874 (cmp_partitions_order): Likewise.
1875 (lto_materialize_function): Likewise.
1876 (has_analyzed_clone_p): Likewise.
1877
8e9055ae
AM
18782013-10-29 Andrew MacLeod <amacleod@redhat.com>
1879
ab20d992
JJ
1880 * lto-object.c: Add gimple.h to include list.
1881 * lto-partition.c: Likewise.
8e9055ae 1882
377d9792
AM
18832013-10-18 Andrew MacLeod <amacleod@redhat.com>
1884
1885 * lto.c: Remove tree-flow.h from include list.
1886
fffda8d7
RB
18872013-10-15 Richard Biener <rguenther@suse.de>
1888
1889 * lto.c (hash_canonical_type): Split out from ...
1890 (iterative_hash_canonical_type): ... here. Register types
1891 we recurse to.
1892 (gimple_canonical_type_hash): Adjust.
1893 (gimple_register_canonical_type_1): Split out from ...
1894 (gimple_register_canonical_type): ... here. Cache computed
1895 hash value.
1896 (lto_register_canonical_types): Split into two modes,
1897 clearing and computing TYPE_CANONICAL.
1898 (lto_read_decls): Adjust.
1899 (read_cgraph_and_symbols): Do two passes over global trees,
1900 first clearing then computing TYPE_CANONICAL.
1901
1394237e
RB
19022013-10-14 Richard Biener <rguenther@suse.de>
1903
1904 * lto.c (gimple_canonical_types): Move out-of GC space.
1905 (canonical_type_hash_cache): Make a pointer-map.
1906 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1907 New counters.
1908 (iterative_hash_canonical_type): Adjust.
1909 (read_cgraph_and_symbols): Likewise.
1910 (print_lto_report_1): Likewise.
1911
0a387eca
RB
19122013-10-14 Richard Biener <rguenther@suse.de>
1913
1914 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1915 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1916 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1917 gimple_types_compatible_p_1, gimple_types_compatible_p,
1918 visit, iterative_hash_name, struct type_hash_pair,
1919 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1920 gimple_type_eq, gimple_register_type, num_not_merged_types,
1921 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1922 num_not_merged_types_in_same_scc_trees): Remove old merging code
1923 and statistics.
1924 (lto_read_decls): Do not run old merging code in parallel.
1925 (read_cgraph_and_symbols): Do not init/free old merging
1926 data structures.
1927 (print_lto_report_1): Do not report differences of old vs. new
1928 merging code.
1929
83fd5d11
RB
19302013-10-14 Richard Biener <rguenther@suse.de>
1931
1932 * lto-lang.c (lto_init): Do not re-init canonical types here.
1933 (lto_register_canonical_types): Move to ...
1934 * lto.c (lto_register_canonical_types): ... here.
1935 (gimple_canonical_types, canonical_type_hash_cache,
1936 iterative_hash_canonical_type, gimple_canonical_type_hash,
1937 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1938 gimple_register_canonical_type): Add canonical type merging machinery
1939 moved from gimple.c.
1940 (read_cgraph_and_symbols): Init and free canonical type tables
1941 here.
1942 (print_lto_report_1): Report canonical type table stats here.
1943
acf0174b
JJ
19442013-10-11 Jakub Jelinek <jakub@redhat.com>
1945
1946 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1947
7c6fedd2
TT
19482013-09-25 Tom Tromey <tromey@redhat.com>
1949
1950 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1951 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1952 (lto/lto-object.o): Remove.
1953
35f32ad4
RB
19542013-09-06 Richard Biener <rguenther@suse.de>
1955
1956 * lto-symtab.c: Move from gcc/
1957 * lto.h: Include vec.h.
1958 (lto_global_var_decls): Declare.
1959 * lto.c (lto_global_var_decls): Move definition here.
1960 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1961 (lto-symtab.o): Add.
1962 * config-lang.in (gtfiles): Add lto.h.
1963
49322b12
JH
19642013-08-31 Jan Hubicka <jh@suse.cz>
1965
ab20d992 1966 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
49322b12
JH
1967 DECL_FIELD_OFFSET can contain an reference to variable.
1968
31f1f73b
JH
19692013-08-31 Jan Hubicka <jh@suse.cz>
1970
1971 * lto.c (tree_with_vars): Turn into vector.
1972 (MAYBE_REMEMBER_WITH_VARS): Change to...
1973 (CHECK_VAR): ... this one.
1974 (CHECK_NO_VAR): New macro.
1975 (maybe_remember_with_vars_typed): Turn to ...
1976 (mentions_vars_p_typed): ... this one.
1977 (maybe_remember_with_vars_common): Turn to ...
1978 (mentions_vars_p_comon): ... this one.
1979 (maybe_remember_with_vars_decl_minimal): Turn to ...
1980 (mentions_vars_p_decl_minmal): ... this one.
1981 (maybe_remember_with_vars_decl_common): Turn to ...
1982 (mentions_vars_p_decl_common): ... this one.
1983 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1984 (mentions_vars_p_decl_with_vis): ... this one.
1985 (maybe_remember_with_vars_decl_non_common): Turn to ...
1986 (mentions_vars_p_decl_non_common): ... this one.
1987 (maybe_remember_with_vars_function): Turn to ...
1988 (mentions_vars_p_function): ... this one.
1989 (maybe_remember_with_vars_field_decl): Turn to ...
1990 (mentions_vars_p_field_decl): ... this one.
1991 (maybe_remember_with_vars_type): Turn to ...
1992 (mentions_vars_p_type): ... this one.
1993 (maybe_remember_with_vars_binfo): Turn to ...
1994 (mentions_vars_p_binfo): ... this one.
1995 (maybe_remember_with_vars_constructor): Turn to ...
1996 (mentions_vars_p_constructor): ... this one.
1997 (maybe_remember_with_vars_expr): Turn to ...
1998 (mentions_vars_p_expr): ... this one.
1999 (maybe_remember_with_vars): Turn to ...
2000 (mentions_vars_p): ... this one.
2001 (lto_read_decls): Update.
2002 (LTO_SET_PREVAIL): Do not call function for internal decls.
2003 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2004 check that something was updated.
2005 (lto_fixup_state): Do not care about internal decls.
2006 (lto_fixup_decls): Update.
2007 (read_cgraph_and_symbols): Update.
2008
256eefa9
JH
20092013-08-29 Jan Hubicka <jh@suse.cz>
2010
2011 * lto.c (read_cgraph_and_symbols): Free decl states.
2012
0170f33c
JH
20132013-08-29 Jan Hubicka <jh@suse.cz>
2014
2015 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2016 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2017 TYPE_FINAL_P.
2018
c01c111b
JH
20192013-08-28 Jan Hubicka <jh@suse.cz>
2020
2021 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2022 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2023 (unify_scc): Do checking assert.
2024
6a49f3c9
JH
20252013-08-06 Jan Hubicka <jh@suse.cz>
2026 Martin Liska <marxin.liska@gmail.com>
2027
ab20d992 2028 * lto-partition.c (lto_balanced_map): Always base order on
6a49f3c9
JH
2029 source file order.
2030
a2e2a668
JH
20312013-08-06 Jan Hubicka <jh@suse.cz>
2032
2033 * lto.c (lto_materialize_function): Do not read body anymore.
2034
815effe1
JH
20352013-08-02 Jan Hubicka <jh@suse.cz>
2036
2037 * lto.c (lto_materialize_function): Do not push struct function.
2038 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2039 (may_need_named_section_p): Even abstract origins may need
2040 named section.
2041
315f8c0e
DM
20422013-07-30 David Malcolm <dmalcolm@redhat.com>
2043
2044 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2045 PASS_MANAGER_H.
2046
2047 * lto.c (do_whole_program_analysis): Update for move of
2048 all_regular_ipa_passes from a global to a field of class
2049 pass_manager.
2050
1aa95df7
OB
20512013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2052
2053 * lto-partition.c: Fix typos.
2054
c525ba9a
JH
20552013-06-20 Jan Hubicka <jh@suse.cz>
2056
2057 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2058 partitioning of variables.
2059
7a89ad00
JH
20602013-06-20 Jan Hubicka <jh@suse.cz>
2061
2062 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2063
6a6dac52
JH
20642013-06-19 Jan Hubicka <jh@suse.cz>
2065
2066 * lto-partition.c (add_references_to_partition): Use
2067 ctor_for_folding.
2068
ac0511f2
RB
20692013-06-18 Richard Biener <rguenther@suse.de>
2070
2071 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2072 and use it.
2073 (lto_register_function_decl_in_symtab): Likewise.
2074 (cmp_tree): New function.
2075 (unify_scc): Instead of using the streamer cache map from entry
2076 to cache index match up the two maps we have by sorting them.
2077 Adjust calls to lto_register_var_decl_in_symtab and
2078 lto_register_function_decl_in_symtab.
2079
ee03e71d
RB
20802013-06-17 Richard Biener <rguenther@suse.de>
2081
2082 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2083 * lto.c: Include data-streamer.h.
2084 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2085 (gimple_type_leader_entry_s, gimple_type_leader,
2086 gimple_lookup_type_leader): Remove.
2087 (gtc_visit): Simplify.
2088 (gimple_types_compatible_p): Likewise.
2089 (gimple_register_type_1): Likewise. Merge into ...
2090 (gimple_register_type): ... this. Keep it as legacy for
2091 statistics purposes for now.
2092 (fixup_integer_cst): Remove.
2093 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2094 rename to ...
2095 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2096 maybe_remember_with_vars_*): ... these.
2097 (uniquify_nodes): Remove.
2098 (lto_fixup_prevailing_type): New function.
2099 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2100 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2101 (num_merged_types, num_prevailing_types, num_not_merged_types,
2102 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2103 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2104 num_scc_compare_collisions): New global counters.
2105 (compare_tree_sccs_1): New function.
2106 (compare_tree_sccs): Likewise.
2107 (unify_scc): Likewise.
2108 (lto_read_decls): Stream in tree SCCs and unify them on the
2109 way in. Finalize prevailing SCC tree members.
2110 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2111 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2112 to ggc-collect during merging.
2113 (print_lto_report_1): Adjust for new merging code.
2114
ca0f62a8
JH
21152013-06-12 Jan Hubicka <jh@suse.cz>
2116
2117 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2118
bbf9ad07
JH
21192013-06-12 Jan Hubicka <jh@suse.cz>
2120
2121 * lto.c (register_resolution): Take lto_file_data argument.
2122 (lto_register_var_decl_in_symtab,
2123 lto_register_function_decl_in_symtab): Update.
2124 (read_cgraph_and_symbols): Update resolution_map handling.
2125
ecdbd01a 21262013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2127
2128 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2129 (add_symbol_to_partition_1): Likewise.
2130 (contained_in_symbol): Likewise.
2131 (lto_balanced_map): Likewise.
2132 (rename_statics): Drop weakref.
2133
a367df53
RB
21342013-06-05 Richard Biener <rguenther@suse.de>
2135
2136 * lto.c (num_merged_types): New global variable.
2137 (uniquify_nodes): Increase num_merged_types when merging a type.
2138 (print_lto_report_1): Output the number of merged types.
2139
40a7fe1e
JH
21402013-06-01 Jan Hubicka <jh@suse.cz>
2141
2142 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2143 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2144 (do_whole_program_analysis): Update dumping.
2145
e70670cf
JH
21462013-05-29 Jan Hubicka <jh@suse.cz>
2147
2148 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2149 flags.
2150 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2151
8ee05051
JH
21522013-05-15 Jan Hubicka <jh@suse.cz>
2153
2154 * lto-partition.c (privatize_symbol_name): Return true when
2155 privatizing happened.
2156 (rename_statics): Do not go into infinite loop when privatizing
2157 is not needed.
2158
427b248d
JM
21592013-05-16 Jason Merrill <jason@redhat.com>
2160
2161 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2162
9de04252
MJ
21632013-05-15 Martin Jambor <mjambor@suse.cz>
2164
2165 * lto-partition.c (lto_balanced_map): Print symbol order instead
2166 of node uids.
2167
2d6e4603
JH
21682013-05-15 Jan Hubicka <jh@suse.cz>
2169
2170 PR lto/57038
2171 PR lto/47375
2172 * lto-partition.c (get_symbol_class): Fix weakrefs.
2173 (lto_balanced_map): Fix weakrefs.
2174 (privatize_symbol_name): Remove unnecesary label.
2175 (rename_statics): Handle weakrefs as statics.
2176
64cfa6c0
JH
21772013-05-09 Jan Hubicka <jh@suse.cz>
2178 Richard Biener <rguenther@suse.de>
2179
2180 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2181 (lto_register_var_decl_in_symtab): Likewise.
2182 (lto_main): Promote statics.
2183 * lto-partition.c (privatize_symbol_name): New function.
2184 (promote_symbol): Use it.
2185 (may_need_named_section_p): New predicate.
2186 (rename_statics): New functions.
2187 (lto_promote_cross_file_statics): Simplify; do renaming.
2188 (lto_promote_statics_nonwpa): New function.
2189 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2190
e45cde98
RB
21912013-02-08 Richard Biener <rguenther@suse.de>
2192
2193 PR lto/56231
2194 * lto-lang.c (lto_init): Do not enter a dummy file.
2195
6edc3e32
UB
21962013-02-07 Uros Bizjak <ubizjak@gmail.com>
2197
2198 PR bootstrap/56227
2199 * lto.c (lto_resolution_ready): Use %wx instead of
2200 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2201
ed73881e
RG
22022013-02-04 Richard Guenther <rguenther@suse.de>
2203
2204 PR lto/56168
2205 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2206 or lto_fixup_decls at LTRANS time.
2207
a19b1432
JH
22082013-01-09 Jan Hubicka <jh@suse.cz>
2209
2210 PR lto/45375
2211 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2212
49c01f87
L
22132012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2214
2215 PR lto/55466
2216 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2217 variables.
2218 (lto_main): Record the global variables if WPA isn't enabled.
2219
6e1aa848
DN
22202012-11-20 Diego Novillo <dnovillo@google.com>
2221 Jakub Jelinek <jakub@redhat.com>
2222
2223 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2224
9771b263
DN
22252012-11-16 Diego Novillo <dnovillo@google.com>
2226
2227 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2228
2229 * lto-lang.c: Use new vec API in vec.h.
2230 * lto-partition.c: Likewise.
2231 * lto-partition.h: Likewise.
2232 * lto.c: Likewise.
2233
24551b9c
LC
22342012-10-31 Lawrence Crowl <crowl@google.com>
2235
2236 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2237 down-cast via dyn_cast.
2238 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2239 (undo_partition): Likewise.
2240 (lto_balanced_map): Likewise.
2241 (get_symbol_class): Likewise and via is_a.
2242 (lto_balanced_map): Change symtab checking to is_a.
2243
aec06f6f
RB
22442012-10-12 Richard Biener <rguenther@suse.de>
2245
2246 PR lto/54898
2247 * lto.c (gimple_types_compatible_p_1): Also compare
2248 TYPE_MAIN_VARIANT.
2249 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2250
0b8c30f9
TB
22512012-10-09 Tobias Burnus <burnus@net-b.de>
2252
2253 * lto-lang.c (lto_register_builtin_type): Avoid useless
2254 decl creation.
2255 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2256
da3202a8
TB
22572012-10-08 Tobias Burnus <burnus@net-b.de>
2258
2259 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2260 Free lto_file struct after closing the file.
2261
2512a443
JH
22622012-10-08 Jan Hubicka <jh@suse.cz>
2263
ab20d992 2264 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2512a443
JH
2265 (fixup_integer_cst): New functoin.
2266 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2267
e75f8f79
JH
22682012-10-07 Jan Hubicka <jh@suse.cz>
2269
2270 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2271 release input encoders.
2272 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2273
46591697
JH
22742012-10-06 Jan Hubicka <jh@suse.cz>
2275
ab20d992 2276 PR lto/54790
46591697
JH
2277 * lto.c (resolution_map): New static var.
2278 (register_resolution): New function.
2279 (lto_register_var_decl_in_symtab): Use it.
2280 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2281
af16bc76
MJ
22822012-09-20 Martin Jambor <mjambor@suse.cz>
2283
2284 * lto.c (lto_materialize_function): Call push_struct_function and
2285 pop_cfun.
2286
5368224f
DC
22872012-09-19 Dehao Chen <dehao@google.com>
2288
ab20d992 2289 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
5368224f 2290
b5493fb2
JH
22912012-09-19 Jan Hubicka <jh@suse.cz>
2292
2293 * lto.c (lto_materialize_function): Update confused comment.
2294 (read_cgraph_and_symbols): Do not free symtab.
2295
c3c445e1
JH
22962012-09-12 Jan Hubicka <jh@suse.cz>
2297
2298 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2299 AUX pointer cleaning. Add max partitioning.
2300 * lto-partition.c (enum symbol_class): New.
2301 (get_symbol_class): New function.
2302 (symbol_partitioned_p): New function.
2303 (add_references_to_partition): Remove.
2304 (add_aliases_to_partition): Remove.
2305 (add_cgraph_node_to_partition_1): Remove.
2306 (add_cgraph_node_to_partition): Remove.
2307 (add_symbol_to_partition): New function.
2308 (add_symbol_to_partition_1): New function.
2309 (contained_in_symbol): New function.
2310 (partition_cgraph_node_p): Remove.
2311 (partition_varpool_node_p): Remove.
2312 (partition_symbol_p): Remove.
2313 (lto_1_to_1_map): Cleanup.
2314 (lto_max_map): New.
2315 (lto_balanced_map): Update.
2316 (lto_promote_cross_file_statics): Update.
2317 * lto-partition.h (lto_max_map): Declare.
2318 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2319
b5c7cdfb
JH
23202012-09-11 Jan Hubicka <jh@suse.cz>
2321
2322 PR lto/54312
2323 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2324 type is variant leader.
2325
b29402f0
RG
23262012-09-11 Richard Guenther <rguenther@suse.de>
2327
2328 * lto.c (enum gtc_mode): Remove.
2329 (struct type_pair_d): Adjust.
2330 (lookup_type_pair): Likewise.
2331 (gimple_type_leader): Do not mark as deletable.
2332 (gimple_lookup_type_leader): Adjust.
2333 (gtc_visit): Likewise.
2334 (gimple_types_compatible_p_1): Likewise.
2335 (gimple_types_compatible_p): Likewise.
2336 (gimple_type_hash): Likewise.
2337 (gimple_register_type): Likewise.
2338 (read_cgraph_and_symbols): Manage lifetime of tables
2339 here.
2340
b8f4e58f
RG
23412012-09-11 Richard Guenther <rguenther@suse.de>
2342
2343 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2344 struct type_pair_d, lookup_type_pair, struct sccs,
2345 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2346 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2347 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2348 visit, iterative_hash_name, struct type_hash_pair,
2349 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2350 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2351 Move here from gimple.c
2352 (read_cgraph_and_symbols): Free hash tables here.
2353 (print_lto_report_1): New function wrapping print_lto_report.
2354 (do_whole_program_analysis): Call it.
2355 (lto_main): Likewise.
2356
1cdbb3f9
JH
23572012-09-10 Jan Hubicka <jh@suse.cz>
2358
2359 * lto-partition.c (partition_symbol_p): Forward declare.
2360 (add_references_to_partition): Reimplement using partition_symbol_p.
2361 (add_aliases_to_partition): Break out from add_references_to_partition;
2362 reimplement using partition_symbol_p.
2363 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2364 add sanity checks.
2365 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2366 (partition_varpool_node_p): Do not special case aliases.
2367
b4661bfe
JH
23682012-08-12 Jan Hubicka <jh@suse.cz>
2369
2370 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2371 it is deleted after streaming.
2372 * lto-partition.c (partition_symbol_p): New function.
2373 (promote_var, promote_fn): Remove.
2374 (promote_symbol): New function.
2375 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2376 to lookup the actual boundaries instead of computing them ad-hoc.
2377
7b99cca4
JH
23782012-08-12 Jan Hubicka <jh@suse.cz>
2379
2380 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2381 in partitioning.
2382 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2383 by encoder.
2384 * lto-partition.c (new_partition): Update.
2385 * lto.c (cmp_partitions_order): Update.
2386 (lto_wpa_write_files): Update.
2387 (free_ltrans_partitions): Update.
2388 (add_references_to_partition): Update.
2389 (add_cgraph_node_to_partition_1): Update.
2390 (add_cgraph_node_to_partition): Update.
2391 (add_varpool_node_to_partition): Update.
2392 (undo_partition): Update.
2393 (lto_balanced_map): Update.
2394 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2395 set_referenced_from_this_partition_p): Update.
2396 (lto_promote_cross_file_statics): Update.
2397
f27c1867
JH
23982012-08-12 Jan Hubicka <jh@suse.cz>
2399
2400 * lto-partition.c (set_referenced_from_other_partition_p,
2401 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2402 New functions.
2403 (lto_promote_cross_file_statics): Use them.
2404
ab96cc5b
JH
24052012-07-24 Jan Hubicka <jh@suse.cz>
2406
2407 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2408
0229aee9
UB
24092012-07-24 Uros Bizjak <ubizjak@gmail.com>
2410
2411 * lto-tree.h (lang_decl): Add variable_size GTY option.
2412
7ee2468b
SB
24132012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2414
2415 * lto.c: Do not include timevar.h.
2416 * Make-lang.in: Fix dependencies.
2417
a910399d
LC
24182012-06-18 Lawrence Crowl <crowl@google.com>
2419
ab20d992 2420 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2421 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2422 to lto_wpa_write_files.
ab20d992 2423 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
a910399d
LC
2424 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2425 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2426 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2427 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2428 to be a front end, but is not one.
2429
877ab5e9
JH
24302012-05-18 Jan Hubicka <jh@suse.cz>
2431
2432 * lto.c (lto_materialize_constructors_and_inits): Remove.
2433 (read_cgraph_and_symbols): Remove handling of alias pairs.
2434
6649df51
JH
24352012-05-17 Jan Hubicka <jh@suse.cz>
2436
2437 * lto-partition.c (add_references_to_partition): Handle external vars.
2438 (partition_varpool_node_p): Likewise.
2439 (lto_promote_cross_file_statics): Do not promote externals.
2440
d1ede5f4
BS
24412012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2442
2443 * lto-lang.c (handle_fnspec_attribute): New static function.
2444 (lto_attribute_table): Add "fn spec".
2445 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2446
0d6bf48c
JH
24472012-05-04 Jan Hubicka <jh@suse.cz>
2448
2449 * lto.c (do_whole_program_analysis): Set timevars correctly.
2450 (lto_main): Likewise.
d1ede5f4 2451
1d67dde8
RB
24522012-05-04 Richard Guenther <rguenther@suse.de>
2453
2454 * lang.opt (fwpa): Do not mark as Optimization.
2455 (fltrans): Likewise.
2456
65d630d4
JH
24572012-04-30 Jan Hubicka <jh@suse.cz>
2458
2459 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2460 * lto-partition.c (partition_cgraph_node_p): Use
2461 symtab_used_from_object_file_p.
65d630d4
JH
2462 (partition_varpool_node_p): Likewise.
2463
ead84f73
JH
24642012-04-20 Jan Hubicka <jh@suse.cz>
2465
2466 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2467
5932a4d4
JH
24682012-04-18 Jan Hubicka <jh@suse.cz>
2469
2470 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2471 Update for new ipa-ref API.
2472
65c70e6b
JH
24732012-04-16 Jan Hubicka <jh@suse.cz>
2474
2475 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2476 walkers to walk cgraph and varpool.
65c70e6b
JH
2477 (materialize_cgraph): Likewise.
2478 * lto-partition.c (lto_1_to_1_map): Likewise.
2479 (lto_balanced_map): Likewise.
2480 (lto_promote_cross_file_statics): Likewise.
2481
960bfb69
JH
24822012-04-14 Jan Hubicka <jh@suse.cz>
2483
2484 * lto.c: Update field referenced for new cgraph/varpool layout.
2485 * lto-partition.c: Likewise.
2486
a66dc285
JH
24872012-04-11 Jan Hubicka <jh@suse.cz>
2488
2489 * lto.c: Update copyright; remove params.h, ipa-inline.h
2490 and ipa-utils.h inlines; inline lto-partition.h
2491 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2492 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2493 add_references_to_partition, add_cgraph_node_to_partition_1,
2494 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2495 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2496 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2497 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2498 * lto-partition.c: ... here; new file.
2499 * lto-partition.h: New file.
2500 * Make-lang.in (lto.o): Update dependencies.
2501 (lto-partition.o): New.
2502
f3b249e5
RG
25032012-04-05 Richard Guenther <rguenther@suse.de>
2504
2505 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2506 definition.
2507
21fa2faf
RG
25082012-03-12 Richard Guenther <rguenther@suse.de>
2509
2510 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2511
6bb485a3
RG
25122012-03-06 Richard Guenther <rguenther@suse.de>
2513
2514 PR lto/52097
2515 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2516
95510497
RG
25172012-02-28 Richard Guenther <rguenther@suse.de>
2518
2519 PR lto/52400
2520 * lto.c (lto_register_function_decl_in_symtab): Do not register
2521 a reverse renamed decl mapping.
2522
09228fef
JJ
25232012-01-06 Jakub Jelinek <jakub@redhat.com>
2524
2525 PR lto/51774
2526 * lto-lang.c (handle_returns_twice_attribute): New function.
2527 (lto_attribute_table): Add returns_twice attribute.
2528
b03eda0d
RG
25292011-12-21 Richard Guenther <rguenther@suse.de>
2530
2531 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2532 (LTO_FIXUP_TREE): Use it.
2533 (uniquify_nodes): Mark new non-prevailing types and avoid
2534 calling gimple_register_type on others.
2535 (lto_read_decls): Add comment.
2536
4ad9a9de
EB
25372011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2538
2539 * lto.h (lto_parse_hex): Delete.
2540 * lto.c (lto_read_decls): Use 'int' for offsets.
2541 (lto_parse_hex): Make static and return proper 64-bit host type.
2542 (lto_resolution_read): Use proper 64-bit host type.
2543
ea973bad
RG
25442011-12-13 Richard Guenther <rguenther@suse.de>
2545
2546 PR lto/48354
2547 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2548 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2549
c8218030
UB
25502011-12-01 Uros Bizjak <ubizjak@gmail.com>
2551
2552 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2553 (ignore_attribute): New.
2554
57ac2606
AH
25552011-11-21 Aldy Hernandez <aldyh@redhat.com>
2556
2557 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2558 (handle_transaction_pure_attribute): New.
2559
52a35ef7
RG
25602011-11-03 Richard Guenther <rguenther@suse.de>
2561
2562 PR lto/44965
2563 * lto-lang.c (lto_post_options): Do not read file options.
2564 * lto.c (lto_read_all_file_options): Remove.
2565 (lto_init): Call lto_set_in_hooks here.
2566
51973b1e
JH
25672011-10-09 Jan Hubicka <jh@suse.cz>
2568
2569 * lto.c (node_cmp, varpool_node_cmp): New functions.
2570 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2571 (cmp_partitions): Rename to ...
2572 (cmp_partitions_size): ... this one.
2573 (cmp_partitions_order): New function.
2574 (lto_wpa_write_files): Sort partitions by order when
2575 -fno-toplevel-reorder is used.
2576
5958009b
AK
25772011-10-09 Andi Kleen <ak@linux.intel.com>
2578
2579 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2580
e79983f4
MM
25812011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2582
2583 * lto-lang.c (def_builtin_1): Delete old interface with two
2584 parallel arrays to hold standard builtin declarations, and replace
2585 it with a function based interface that can support creating
2586 builtins on the fly in the future. Change all uses, and poison
2587 the old names. Make sure 0 is not a legitimate builtin index.
2588
ecdbd01a 25892011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2590
2591 * lto-object.c (lto_obj_add_section_data): Add list.
2592 (lto_obj_add_section): Fill in list.
2593 (ltoobj_build_section_table): Pass through list.
2594 * lto.c (file_data_list): Declare.
2595 (create_subid_section_table): Pass arguments directly.
2596 Fill in list of file_datas.
2597 (lwstate): Delete.
2598 (lto_create_files_from_ids): Pass in direct arguments.
2599 Don't maintain list.
2600 (lto_file_read): Use explicit section and file data lists.
2601 (lto_read_all_file_options): Pass in section_list.
2602 * lto.h (lto_obj_build_section_table): Add list.
2603 (lto_section_slot): Add next.
2604 (lto_section_list): Declare.
2605
ed0d2da0
JH
26062011-10-02 Jan Hubicka <jh@suse.cz>
2607
2608 PR lto/47247
2609 * common.c (lto_resolution_str): Add new resolution.
2610 * common.h (lto_resolution_str): Likewise.
2611
ad7715f3
L
26122011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2613 Andi Kleen <ak@linux.intel.com>
2614
2615 PR lto/50568
2616 * lto.c (lto_splay_tree_delete_id): New.
2617 (lto_splay_tree_compare_ids): Likewise.
2618 (lto_splay_tree_lookup): Likewise.
2619 (lto_splay_tree_id_equal_p): Likewise.
2620 (lto_splay_tree_insert): Likewise.
2621 (lto_splay_tree_new): Likewise.
2622 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2623 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2624 (create_subid_section_table): Use lto_splay_tree_lookup and
2625 lto_splay_tree_insert.
2626 (lto_file_read): Use lto_splay_tree_new.
2627
ecdbd01a 26282011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2629
2630 * lto.c (lto_resolution_read): Remove id dumping.
2631 (lto_section_with_id): Turn id HOST_WIDE_ID.
2632 (create_subid_section_table): Dito.
2633
892a371f
DS
26342011-08-28 Dodji Seketeli <dodji@redhat.com>
2635
2636 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2637 linemap_add twice.
2638
f82d1a94
MJ
26392011-08-11 Martin Jambor <mjambor@suse.cz>
2640
2641 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2642
f0efc7aa
DN
26432011-08-08 Diego Novillo <dnovillo@google.com>
2644
2645 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2646 * lto.c: Include tree-streamer.h.
2647
1a072294
RG
26482011-07-06 Richard Guenther <rguenther@suse.de>
2649
2650 * lto-lang.c (lto_init):
2651 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2652
7496868d
JH
26532011-06-11 Jan Hubicka <jh@suse.cz>
2654
10f13f22 2655 PR lto/48246
7496868d
JH
2656 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2657 (lto_balanced_map): Likewise.
2658
39e2db00
JH
26592011-06-11 Jan Hubicka <jh@suse.cz>
2660
2661 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2662 (add_cgraph_node_to_partition) ... here; walk aliases.
2663 (lto_1_to_1_map): Remove same body alias code.
2664 (promote_fn): Likewise.
2665 (lto_promote_cross_file_statics): Update comment.
2666
28628ea6
DN
26672011-06-07 Diego Novillo <dnovillo@google.com>
2668
2669 * lto.c (uniquify_nodes): Move code to register decls to
2670 the loop that computes canonical types.
2671
009db074
RG
26722011-06-07 Richard Guenther <rguenther@suse.de>
2673
2674 * lto-lang.c (lto_init): Do not set
2675 size_type_node or call set_sizetype.
2676
47c79d56
DN
26772011-06-04 Diego Novillo <dnovillo@google.com>
2678
2679 * lto.c (lto_init): New.
2680 (lto_main): Call it.
2681
d5828cc7
DN
26822011-06-03 Diego Novillo <dnovillo@google.com>
2683
2684 * lto.c (get_resolution): Move from lto-streamer-in.c.
2685 (lto_register_var_decl_in_symtab): Likewise.
2686 (lto_register_function_decl_in_symtab): Likewise.
2687 (uniquify_nodes): Call lto_register_var_decl and
2688 lto_register_function_decl_in_symtab after reading a new
2689 VAR_DECL or FUNCTION_DECL.
2690
6807da97
RG
26912011-06-01 Richard Guenther <rguenther@suse.de>
2692
2693 * lto-lang.c (lto_register_canonical_types): New function.
2694 (lto_init): Register common nodes with the canonical type machinery.
2695 Do not play tricks with char_type_node.
2696
d74be317
RG
26972011-05-26 Richard Guenther <rguenther@suse.de>
2698
2699 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2700
d9f8303f
NF
27012011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2702
2703 * lto.c (lto_ft_typed): New function.
2704 (lto_ft_common): Call it.
2705 (lto_ft_constructor): Likewise.
2706 (lto_ft_expr): Likewise.
2707 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2708 TREE_CHAIN.
2709
fb291a1e
RG
27102011-05-20 Richard Guenther <rguenther@suse.de>
2711
2712 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2713 (lto_ft_type): Move main-variant and pointer-to chain building ...
2714 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2715 in a separate final loop.
2716
31b3ca64
RG
27172011-05-19 Richard Guenther <rguenther@suse.de>
2718
2719 * lto.c (uniquify_nodes): First register all types before
2720 fixing up the tree SCC.
2721
35d828c5
JH
27222011-05-11 Jan Hubicka <jh@suse.cz>
2723
2724 PR lto/48952
2725 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2726
51545682
NF
27272011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2728
2729 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2730 location of binfo field.
2731 (lto_fixup_prevailing_decls): Likewise.
2732
8242dd04
NF
27332011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2734
2735 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2736 build_function_type_array or build_varargs_function_type_array
2737 instead.
2738
c99c0026
EB
27392011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2740
2741 * lto-lang.c (global_bindings_p): Return bool.
2742
c47d0034
JH
27432011-05-07 Jan Hubicka <jh@suse.cz>
2744
a9bcb3f0
EB
2745 * lto.c (lto_materialize_function): Use
2746 cgraph_function_with_gimple_body_p.
2747 (add_cgraph_node_to_partition): Do not re-add items to partition;
2748 handle thunks.
c47d0034
JH
2749 (add_varpool_node_to_partition): Do not re-add items to partition.
2750
bb3398ca
JH
27512011-05-03 Jan Hubicka <jh@suse.cz>
2752
2753 * lto.c (free_ltrans_partitions): Fix accidental commit.
2754
1cb1a99f
JH
27552011-05-03 Jan Hubicka <jh@suse.cz>
2756
2757 * lto.c (ltrans_partition_def): Remove GTY annotations.
2758 (ltrans_partitions): Move to heap.
2759 (new_partition): Update.
2760 (free_ltrans_partitions): New function.
2761 (lto_wpa_write_files): Use it.
2762
af8bca3c
MJ
27632011-04-29 Martin Jambor <mjambor@suse.cz>
2764
2765 * lto.c: Include ipa-utils.h.
2766 (lto_balanced_map): Update call to ipa_reverse_postorder.
2767 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2768
b823cdfe
MM
27692011-04-29 Michael Matz <matz@suse.de>
2770
2771 * lto.c (toplevel): Include tree-flow.h.
2772 (lto_read_in_decl_state): Don't merge types here.
2773 (tree_with_vars): New static hash table.
2774 (remember_with_vars): New static functions.
2775 (LTO_FIXUP_TYPE): New macro.
2776 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2777 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2778 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2779 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2780 (lto_read_decls): Uniquify while reading in trees.
2781 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2782 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2783 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2784 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2785 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2786 lto_fixup_tree): Remove.
2787 (lto_fixup_state): Remove data argument. Use
2788 lto_symtab_prevailing_decl.
2789 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2790 (lto_fixup_prevailing_decls): New function.
2791 (lto_fixup_state_aux): Argument aux is unused.
2792 (lto_fixup_decls): Don't allocate pointer sets, don't use
2793 lto_fixup_tree, use lto_fixup_prevailing_decls.
2794 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2795 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2796
b9843260
EB
27972011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2798
2799 * lto.c (lto_balanced_map): Fix typos in head comment.
2800 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2801 test.
2802
e7f23018
JH
28032011-04-16 Jan Hubicka <jh@suse.cz>
2804
2805 * lto.c (lto_balanced_map): Update.
2806
10a5dd5d
JH
28072011-04-14 Jan Hubicka <jh@suse.cz>
2808
2809 * lto.c: Include ipa-inline.h
b9843260
EB
2810 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2811 accessor.
10a5dd5d
JH
2812 (ipa_node_duplication_hook): Fix declaration.
2813 * Make-lang.in (lto.o): Update dependencies.
2814
81f653d6
NF
28152011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2816
2817 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2818 calling TREE_CHAIN.
2819 * lto.c (lto_fixup_common): Likewise.
2820
dcf0c47e
NF
28212011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2822
2823 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2824 (handle_type_generic_attribute): Likewise.
2825
e89964e3
MM
28262011-04-03 Michael Matz <matz@suse.de>
2827
2828 * lto.c (lto_materialize_function): Don't read and then discard
2829 sections in WPA mode.
2830 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2831
2832 * lto-lang.c (registered_builtin_fndecls): Remove.
2833 (lto_getdecls): Return NULL_TREE.
2834 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2835
d2b3fe18
RG
28362011-03-31 Richard Guenther <rguenther@suse.de>
2837
2838 PR lto/48246
2839 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2840 partitions when checking is not enabled.
2841
ba78087b
KT
28422011-03-25 Kai Tietz <ktietz@redhat.com>
2843
2844 * lto.c (lto_resolution_read): Use filename_cmp instead
2845 of strcmp.
2846 (lto_read_section_data): Likewise.
2847
0edf1bb2
JL
28482011-03-25 Jeff Law <law@redhat.com>
2849
ab20d992 2850 * lto-lang.c (def_fn_type): Add missing va_end.
0edf1bb2 2851
62d784f7
KT
28522011-03-21 Kai Tietz <ktietz@redhat.com>
2853
2854 PR target/12171
2855 * lto-lang.c (lto_attribute_table): Adjust table.
2856
62dd9571
JJ
28572011-02-18 Jakub Jelinek <jakub@redhat.com>
2858
2859 PR bootstrap/47807
2860 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2861 of lto-streamer.h.
2862
237d6259
RG
28632011-02-18 Richard Guenther <rguenther@suse.de>
2864
2865 PR lto/47798
2866 * lto-tree.h (lto_global_var_decls): Do not declare here.
2867 * lto-lang.c: Include lto-streamer.h.
2868 * Make-lang.in (lto-lang.o): Adjust dependencies.
2869
8ead2223
KT
28702011-02-10 Kai Tietz <kai.tietz@onevision.com>
2871
2872 PR lto/47241
2873 * lto.c (lto_read_section_data): Free
2874 fd_name in failure case.
2875 For mingw targets don't hash file-descriptor.
2876 (read_cgraph_and_symbols): Close current_lto_file
2877 in failure case.
2878
6e701822
JH
28792011-01-11 Jan Hubicka <jh@suse.cz>
2880
2881 PR lto/45721
2882 PR lto/45375
b9843260
EB
2883 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2884 are not partitioned.
6e701822 2885
f4da8dce
NF
28862010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2887
2888 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2889 Use prototype_p.
2890
6b7fb143
RG
28912010-12-06 Richard Guenther <rguenther@suse.de>
2892
2893 PR lto/46796
2894 * lto-lang.c (lto_init): Give names to basic types.
2895
c59ffc41
JM
28962010-11-30 Joseph Myers <joseph@codesourcery.com>
2897
2898 * lto-object.c: Don't include toplev.h.
2899 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2900
7c475d11
JM
29012010-11-30 Joseph Myers <joseph@codesourcery.com>
2902
2903 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2904 $(TOPLEV_H).
2905
71f3e391
JM
29062010-11-29 Joseph Myers <joseph@codesourcery.com>
2907
2908 * lto-endian.h: Delete.
2909 * lto-object.c: Don't include "libiberty.h".
2910 (O_BINARY): Don't define.
2911 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2912 (O_BINARY): Don't define.
2913
9f1718b0
RG
29142010-11-23 Richard Guenther <rguenther@suse.de>
2915
2916 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2917
39c4e298
RG
29182010-11-23 Richard Guenther <rguenther@suse.de>
2919
2920 PR lto/46605
2921 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2922
b37421c6
JM
29232010-11-17 Joseph Myers <joseph@codesourcery.com>
2924
2925 * lto.c (lto_main): Take no arguments.
2926 * lto.h (lto_main): Update prototype.
2927
d82f74d3
ILT
29282010-11-16 Ian Lance Taylor <iant@google.com>
2929
2930 * lto-object.c (lto_obj_file_open): Call
2931 simple_object_attributes_merge rather than
2932 simple_object_attributes_compare.
2933
a4d8c676
JM
29342010-11-12 Joseph Myers <joseph@codesourcery.com>
2935
2936 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2937 * lto-lang.c (lto_handle_option): Take location_t parameter.
2938
d8a07487
JM
29392010-11-10 Joseph Myers <joseph@codesourcery.com>
2940
2941 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2942 letters and remove trailing '.'.
2943 (lto_file_finalize): Start diagnostic with a lowercase letter.
2944
6b3456d1
ILT
29452010-11-02 Ian Lance Taylor <iant@google.com>
2946
2947 * lto-object.c: New file.
2948 * lto-elf.c: Remove file.
2949 * lto-macho.c: Remove file.
2950 * lto-macho.h: Remove file.
2951 * lto-coff.c: Remove file.
2952 * lto-coff.h: Remove file.
2953 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2954 lto/lto-object.o.
2955 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2956 (lto/lto-objfile.o): New target.
2957 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2958 (lto/lto.o): Remove $(LIBIBERTY_H).
2959
030cd86c
JH
29602010-10-22 Jan Hubicka <jh@suse.cz>
2961
2962 * lto.c (add_cgraph_node_to_partition,
2963 add_varpool_node_to_partition): Add debug info.
2964 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2965 partitioned nodes.
2966 (do_whole_program_analysis): Set function flags before dumping.
2967
4490cae6
RG
29682010-10-22 Richard Guenther <rguenther@suse.de>
2969
2970 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2971 the new gimple_register_canonical_type.
2972
703cdce3
L
29732010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2974
2975 PR bootstrap/45954
2976 * config-lang.in (boot_language): Set to $enable_lto.
2977
1915c739
JJ
29782010-10-18 Jakub Jelinek <jakub@redhat.com>
2979
2980 PR lto/45638
2981 * Make-lang.in (check-lto): New dummy target.
2982
82971de5
EB
29832010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2984
2985 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2986
a75bfaa6
JM
29872010-10-08 Joseph Myers <joseph@codesourcery.com>
2988
2989 * lto-lang.c (lto_init_options): Change to
2990 lto_init_options_struct. Update parameters.
2991 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2992 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2993
937f7f69
JH
29942010-10-06 Jan Hubicka <jh@suse.cz>
2995
2996 * lto.c (lto_balanced_map): Fix accounting of program size.
2997
2169830c
JH
29982010-10-06 Jan Hubicka <jh@suse.cz>
2999
3000 * lto.c (lto_balanced_map): Do not produce empty partitions.
3001
ecdbd01a 30022010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
3003
3004 * lto.c (lto_process_name): Add.
3005 (lto_main): Call lto_process_name.
3006
06ed016f
JH
30072010-10-06 Jan Hubicka <jh@suse.cz>
3008
3009 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3010 COMDATs required by the linker.
3011
ae718d66
ILT
30122010-10-05 Ian Lance Taylor <iant@google.com>
3013
3014 * lto.c (lto_section_with_id): Make s a const pointer.
3015
852e4bd2
JH
30162010-10-05 Jan Hubicka <jh@suse.cz>
3017
ab20d992 3018 * lto.c: Include params.h.
852e4bd2
JH
3019 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3020 refcounting in aux field.
3021 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3022 New functions.
3023 (lto_1_to_1_map): Simplify.
3024 (lto_balanced_map): New function.
3025 (do_whole_program_analysis): Chose proper partitioning alg.
3026 * Make-lang.in (lto.o): Add dependency on params.h
3027
ecdbd01a 30282010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
3029
3030 * Make-lang.in (lto1): Add + to build rule.
3031
ecdbd01a 30322010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
3033
3034 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 3035 with fatal_error.
f1e92a43 3036
0d6e14fd
JH
30372010-09-28 Jan Hubicka <jh@suse.cz>
3038
3039 * lto-lang.c (handle_leaf_attribute): New function.
3040 (lto_attribute_tables): Add leaf.
3041
fb462383
JZ
30422010-09-25 Jie Zhang <jie@codesourcery.com>
3043
3044 * lto.c (lto_read_all_file_options): Start a new line after
3045 printing out file names.
3046
051f8cc6
JH
30472010-09-24 Jan Hubicka <jh@suse.cz>
3048
3049 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3050
64e0f5ff
JH
30512010-09-20 Jan Hubicka <jh@suse.cz>
3052
3053 PR tree-optimize/45605
3054 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3055
a929ec3d
GP
30562010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3057
3058 * lto-elf.c (lto_obj_file_open): Also provide filename when
3059 elf_begin fails.
3060
4c588abf
JH
30612010-09-17 Jan Hubicka <jh@suse.cz>
3062
3063 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3064
c3224d6f
RG
30652010-09-17 Richard Guenther <rguenther@suse.de>
3066
3067 * lang.opt (flag_wpa): Also enable for the driver.
3068
52b3b3c7
JH
30692010-09-16 Jan Hubicka <jh@suse.cz>
3070
3071 * lto.c (lto_materialize_function): Do not tamper with STATIC and
ab20d992 3072 EXTERNAL flags.
52b3b3c7 3073
969c37b7
LB
30742010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3075
3076 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3077
098a4f50
JH
30782010-09-08 Jan Hubicka <jh@suse.cz>
3079
3080 * lto.c (real_file_count, real_file_decl_data): New static vars.
3081 (read_cgraph_and_symbols): Use it.
3082
0f443ad0
RG
30832010-09-08 Richard Guenther <rguenther@suse.de>
3084
3085 * lto.c (read_cgraph_and_symbols): Collect again after each
3086 file.
3087
ee187353
JH
30882010-09-07 Jan Hubicka <jh@suse.cz>
3089
3090 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3091
b3ec52d0
RG
30922010-09-03 Richard Guenther <rguenther@suse.de>
3093
3094 * lto-elf.c (validate_file): Always error if validation fails.
3095
f1395d4a
JH
30962010-08-20 Jan Hubicka <jh@suse.cz>
3097
3098 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3099 (lto_wpa_write_files): Update comments.
3100
2429bce3
L
31012010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3102
3103 PR bootstrap/45357
3104 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3105 with has_analyzed_clone_p.
3106
e0f967db
JH
31072010-08-20 Jan Hubicka <jh@suse.cz>
3108
3109 * lto.c (has_analyzed_clone_p): New function
3110 (lto_materialize_function): Use callgraph to determine if
3111 body is needed.
3112 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3113
ac47786e
NF
31142010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3115
3116 * lto.c: Use FOR_EACH_VEC_ELT.
3117
ecdbd01a 31182010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3119
3120 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3121
5f20c657
JM
31222010-07-27 Joseph Myers <joseph@codesourcery.com>
3123
3124 * lto-lang.c (lto_handle_option): Update prototype and return
3125 value type. Remove duplicate assignment to result.
3126
7a9bf9a4
JM
31272010-07-27 Joseph Myers <joseph@codesourcery.com>
3128
3129 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3130 New.
3131 (lto_init_options): Update prototype.
3132 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3133 Define.
3134
ecdbd01a 31352010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3136
3137 PR lto/44992
92a285c1 3138 * lto.c: Include splay-tree.h
73ce4d1e
AK
3139 (lto_resolution_read): Change to walk file_ids tree and parse
3140 extra file_id in resolution file.
3141 (lto_section_with_id): Add.
3142 (create_subid_section_table): Add.
3143 (lwstate): Add.
3144 (lto_create_files_from_ids): Add.
3145 (lto_file_read): Change to handle sub file ids and create list
3146 of file_datas. Add output argument for count.
3147 (get_section_data): Pass file_data to lto_get_section_name.
3148 (lto_flatten_file): Add.
3149 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3150
ecdbd01a 31512010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3152
3153 * lto-coff.c (hash_name, eq_name): Move.
3154 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3155 * lto-elf.c: (hash_name, eq_name): Move.
3156 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3157 * lto-macho.c: (hash_name, eq_name): Move.
3158 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3159 * lto.c: (hash_name, eq_name): Move from lto-*.c
3160 (lto_obj_create_section_hash_table): Add.
3161 (free_with_string): Add.
3162
718f9c0f
MLI
31632010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3164
3165 * lto-coff.c: Include diagnostic-core.h in every file that
3166 includes toplev.h.
3167 * lto-elf.c: Likewise.
3168 * lto-lang.c: Likewise.
3169 * lto-macho.c: Likewise.
3170
1b137837
JJ
31712010-07-07 Jakub Jelinek <jakub@redhat.com>
3172
3173 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3174 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3175 objects.
3176
92eb4438
JH
31772010-07-05 Jan Hubicka <jh@suse.cz>
3178
3179 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3180 nodes from same comdat group as well as all comdat functions referenced
3181 here.
b9843260
EB
3182 (add_varpool_node_to_partition, add_references_to_partition): New
3183 function.
3184 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3185 add_varpool_node_to_partition; clear aux flags when done.
3186 (lto_promote_cross_file_statics): Do not promote stuff that gets
3187 duplicated to each ltrans.
92eb4438 3188
a05541a9
JH
31892010-07-04 Jan Hubicka <jh@suse.cz>
3190
92a285c1 3191 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3192
4a2ac96f
RG
31932010-06-13 Richard Guenther <rguenther@suse.de>
3194
3195 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3196
1d536046
KT
31972010-06-09 Kai Tietz <kai.tietz@onevision.com>
3198
ab20d992 3199 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1d536046
KT
3200 * lto-coff.c (coff_write_object_file): Add braces to if.
3201
a9429e29
LB
32022010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3203
3204 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3205 (lto_file_read): Likewise.
3206 (new_partition): Likewise.
3207 (read_cgraph_and_symbols): Likewise.
3208
5498f011
JM
32092010-06-07 Joseph Myers <joseph@codesourcery.com>
3210
3211 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3212 (lto_handle_option): Don't set flag_signed_char here.
3213
d4c0c9f6
RG
32142010-06-04 Richard Guenther <rguenther@suse.de>
3215
3216 PR lto/41584
3217 * lto.c (lto_1_to_1_map): Use the proper file_data for
3218 varpool nodes.
3219
0a5fa5a1
JH
32202010-05-30 Jan Hubicka <jh@suse.cz>
3221
3222 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3223 partitioning decisions.
3224
9eec9488
JH
32252010-05-29 Jan Hubicka <jh@suse.cz>
3226
3227 * lto.c (bitmap vector): Remove.
3228 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3229 (ltrans_partition_def): New structure.
3230 (ltrans_partition): New type and VECtor.
3231 (new_partition): New function.
3232 (add_cgraph_node_to_partition): New function.
3233 (lto_1_to_1_map): Reorganize for partitions.
3234 (lto_add_inline_clones): Remove.
3235 (lto_add_all_inlinees): Remove.
3236 (lto_promote_cross_file_statics): Use partitions.
3237 (cmp_partitions): New function.
3238 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3239 use partitions; output files sorted by size.
3240
3e097227
SB
32412010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3242
3243 * Make-lang.in: Replace vec.h dependency with VEC_H.
3244
7ca92787
JM
32452010-05-28 Joseph Myers <joseph@codesourcery.com>
3246
3247 * lto-coff.c (coff_errmsg): Remove.
3248 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3249 errors instead of coff_errmsg (-1).
3250 * lto-macho.c (mach_o_errmsg): Remove.
3251 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3252 instead of mach_o_errmsg (-1).
3253 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3254 xstrerror (errno).
3255
b5611987
RG
32562010-05-28 Richard Guenther <rguenther@suse.de>
3257
3258 * lto.c (prefix_name_with_star): Removed.
3259 (strip_extension): Likewise.
3260 (get_filename_for_set): Likewise.
3261 (lto_write_ltrans_list): Fold into ...
3262 (lto_wpa_write_files): ... this. Name LTRANS units
3263 by suffixing the ltrans output list filename.
3264 (do_whole_program_analysis): Adjust.
3265
1da2ed5f
JM
32662010-05-27 Joseph Myers <joseph@codesourcery.com>
3267
3268 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3269 (read_cgraph_and_symbols, lto_main): Use seen_error.
3270 * Make-lang.in (lto/lto.o): Update dependencies.
3271
7951d88a
EB
32722010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3273
3274 PR lto/44230
3275 * lto.h (lto_eh_personality): New prototype.
3276 * lto.c: Include debug.h.
3277 (first_personality_decl): New static variable.
3278 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3279 first function for which it is non-null.
3280 (lto_eh_personality_decl): New static variable.
3281 (lto_eh_personality): New function.
3282 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3283 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3284
e12da9c2
SB
32852010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3286
3287 * lto-lang.c: Do not include expr.h.
3288
468194f4
RG
32892010-05-24 Richard Guenther <rguenther@suse.de>
3290
3291 * lto-elf.c (lto_obj_build_section_table): Work around
3292 FreeBSD libelf issue.
3293
bd9eb5da
RG
32942010-05-22 Richard Guenther <rguenther@suse.de>
3295
3296 * lto.c (read_cgraph_and_symbols): Do not collect.
3297
66576e1b
JH
32982010-05-20 Jan Hubicka <jh@suse.cz>
3299
3300 * lto.c (promote_var, promote_fn): New functions.
3301 (lto_promote_cross_file_statics): Compute correctly boundary including
3302 static initializers of readonly vars.
3303
36576655
JH
33042010-05-18 Jan Hubicka <jh@suse.cz>
3305
66576e1b 3306 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3307 (lto_promote_cross_file_statics): Deal with non-inline clones.
3308
28632d63
JH
33092010-05-18 Jan Hubicka <jh@suse.cz>
3310
3311 * lto.c (lto_materialize_function): Announce function when
3312 reading body; allocate_struct_function only when reading body;
3313 do not finalize local statics; ggc_collect after reading;
3314 do not mark reachable node.
3315 (materialize_cgraph): Do not announce function.
3316
33e42d56
JH
33172010-05-11 Jan Hubicka <jh@suse.cz>
3318
3319 * lto.c (materialize_cgraph): Revert my previous patch.
3320
f6430ea5
KT
33212010-05-11 Kai Tietz <kai.tietz@onevision.com>
3322
3323 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3324 IMAGE_FILE_MACHINE_AMD64.
3325 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3326
0a0b07b7
JH
33272010-05-11 Jan Hubicka <jh@suse.cz>
3328
3329 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3330 (materialize_cgraph): Add it here.
3331
9a809897
JH
33322010-05-11 Jan Hubicka <jh@suse.cz>
3333
3334 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3335 vector.
3336
33372010-05-11 Jan Hubicka <jh@suse.cz>
3338
3339 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3340 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3341 use reachable_from_other_partition_p and
3342 referenced_from_other_partition_p test.
3343
94f64249
KT
33442010-05-11 Kai Tietz <kai.tietz@onevision.com>
3345
3346 * lto-coff.c (validate_file): Add x64-coff support.
3347 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3348 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3349 * lto-lang.c (lto_build_c_type_nodes): Add check for
3350 'long long unsigned int' for x64-windows.
3351 (lto_init): Likewise.
3352
c082f9f3
SB
33532010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3354
3355 * lto.h (struct lto_file_struct): Document offset member.
3356 * lto-endian.h: New file.
3357 * lto-macho.h: New file.
3358 * lto-macho.c: New file.
3359 * Make-lang.in: Add rule for lto-macho.o.
3360
3f8257db 33612010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3362
3363 PR lto/43857
3364 PR lto/43371
3365 * lang.opt (fresolution): Change to ...
3366 (fresolution=): ... this.
3367 * lto-lang.c (lto_handle_option): Adjust.
3368
48cf395b
RB
33692010-05-07 Richard Guenther <rguenther@suse.de>
3370
3371 * lto.c (DUMPBASE_SUFFIX): Remove.
3372 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3373 Rename to ...
3374 (lto_write_ltrans_list): ... only output the list of ltrans files.
3375 (lto_maybe_unlink): Remove.
3376 (do_whole_program_analysis): Do not execute LTRANS phase
3377 from here.
3378
afa83c15
L
33792010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3380
3381 * lto-lang.c (lto_handle_option): Add argument kind.
3382
369451ec
JH
33832010-05-05 Jan Hubicka <jh@suse.cz>
3384
48cf395b
RB
3385 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3386 refs.
369451ec 3387
2f41ecf5
JH
33882010-05-05 Jan Hubicka <jh@suse.cz>
3389
3390 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3391
ace72c88
JH
33922010-04-30 Jan Hubicka <jh@suse.cz>
3393
b9843260
EB
3394 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3395 use default name.
ace72c88
JH
3396 (lto_wpa_write_files): Write any non-empty partition.
3397
05575e07
JH
33982010-04-30 Jan Hubicka <jh@suse.cz>
3399
3400 * lto.c: Do not attempt to make constant pool references global.
3401
49ba8180
JH
34022010-04-28 Jan Hubicka <jh@suse.cz>
3403
ab20d992 3404 * lto.c (lto_read_in_decl_state): Use GGC.
49ba8180
JH
3405 (lto_wpa_write_files): Announce what we are writting.
3406 (all_file_decl_data): New.
3407 (read_cgraph_and_symbols): Use GGC; correct timevars.
3408 (do_whole_program_analysis): Collect.
ab20d992 3409 * Make-lang.in (lto.o): Fix dependency.
49ba8180
JH
3410 * Makefile.in (GTFILES): Add lto-streamer.h.
3411 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3412 (varpool_assemble_pending_decls): Use VAROUT.
3413 * lto-streamer.h (lto_tree_ref_table): Annotate.
3414 (lto_in_decl_state): Annotate.
3415 (lto_file_decl_data): Annotate.
3416
2942c502
JH
34172010-04-28 Jan Hubicka <jh@suse.cz>
3418
3419 * lto.c (lto_varpool_node_sets): New.
3420 (lto_1_to_1_map): Partition varpool too.
3421 (globalize_context_t, globalize_cross_file_statics,
3422 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3423 lto_scan_statics_in_remaining_global_vars): Remove.
3424 (lto_promote_cross_file_statics): Rewrite.
3425 (get_filename_for_set): Take vset argument.
3426 (lto_wpa_write_files): Pass around vsets.
3427
3bec79c5
DK
34282010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3429
3430 PR lto/42776
3431 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3432 hardcoding 'lto-elf.o'.
3433 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3434
3435 * lto-coff.h: New file.
3436 * lto-coff.c: Likewise.
3437
21aac880
RG
34382010-04-26 Richard Guenther <rguenther@suse.de>
3439
3440 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3441
2cee0101
DK
34422010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3443
3444 * lto.h (lto_elf_file_open): Rename prototype from this ...
3445 (lto_obj_file_open): ... to this.
3446 (lto_elf_file_close): Likewise ...
3447 (lto_obj_file_close): ... and likewise.
3448 (lto_elf_build_section_table): Likewise ...
3449 (lto_obj_build_section_table): ... and likewise.
3450 (lto_elf_begin_section): Likewise ...
3451 (lto_obj_begin_section): ... and likewise.
3452 (lto_elf_append_data): Likewise ...
3453 (lto_obj_append_data): ... and likewise.
3454 (lto_elf_end_section): Likewise ...
3455 (lto_obj_end_section): ... and likewise.
3456 * lto.c (lto_file_read): Update references to the above.
3457 (lto_wpa_write_files): Likewise.
3458 (lto_read_all_file_options): Likewise.
3459 (read_cgraph_and_symbols): Likewise.
3460 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3461 (LANG_HOOKS_APPEND_DATA): Likewise.
3462 (LANG_HOOKS_END_SECTION): Likewise.
3463 * lto-elf.c (lto_elf_file_open): Rename from this ...
3464 (lto_obj_file_open): ... to this, updating any references.
3465 (lto_elf_file_close): Likewise ...
3466 (lto_obj_file_close): ... and likewise.
3467 (lto_elf_build_section_table): Likewise ...
3468 (lto_obj_build_section_table): ... and likewise.
3469 (lto_elf_begin_section): Likewise ...
3470 (lto_obj_begin_section): ... and likewise.
3471 (lto_elf_append_data): Likewise ...
3472 (lto_obj_append_data): ... and likewise.
3473 (lto_elf_end_section): Likewise ...
3474 (lto_obj_end_section): ... and likewise.
3475
bc58d7e1
JH
34762010-04-21 Jan Hubicka <jh@suse.cz>
3477
3478 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3479 (materialize_cgraph): Likewise.
3480
e792884f
JH
34812010-04-21 Jan Hubicka <jh@suse.cz>
3482
3483 * lto.c (lto_wpa_write_files): Update.
3484 (read_cgraph_and_symbols): Be more verbose.
3485 (materialize_cgraph): Likewise.
3486 (do_whole_program_analysis): Likewise.
3487
c9945504
JH
34882010-04-21 Jan Hubicka <jh@suse.cz>
3489
3490 * lto.c (globalize_cross_file_statics): When function has address taken,
3491 it needs to be public.
3492
a837268b
JH
34932010-04-20 Jan Hubicka <jh@suse.cz>
3494
3495 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3496 (lto_add_all_inlinees): Likewise.
3497 (lto_wpa_write_files): Likewise.
3498
3b9e5d95
EB
34992010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3500
3501 * lto-lang.c (lto_init): Remove second argument in call to
3502 build_common_tree_nodes.
3503
8ccb78f2
RO
35042010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3505
3506 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3507 function.
3508
2f9b99e6
EB
35092010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3510
3511 PR bootstrap/43276
3512 * lto-elf.c: Define EM_* constants if not already defined.
3513
bef7d288
EB
35142010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3515
3516 * lto-elf.c (is_compatible_architecture): New static function.
3517 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3518
f68df07c
RG
35192010-02-11 Richard Guenther <rguenther@suse.de>
3520
3521 PR driver/43021
3522 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3523 appropriately.
3524
3cdea2b4
AH
35252010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3526
3527 * lto.c (O_BINARY): Define.
3528 (lto_read_section_data): Open file in binary mode.
3529 * lto-elf.c (O_BINARY): Define.
ab20d992 3530 (lto_elf_file_open): Open file in binary mode.
3cdea2b4 3531
c59449fa
RG
35322010-01-08 Richard Guenther <rguenther@suse.de>
3533
3534 PR lto/42528
3535 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3536 (lto_init): Do not init char_type_node in a standard way
3537 but according to flag_signed_char.
3538
d7fb0a6d
L
35392010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3540
3541 PR lto/41564
3542 * lto.c (DUMPBASE_SUFFIX): New.
3543 (lto_execute_ltrans): Append a sequence number to -dumpbase
3544 for LTRANS.
3545
78ce4053
L
35462010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3547
3548 PR lto/42580
3549 * lto-elf.c (lto_elf_file_open): Stop if the command line
3550 option file is missing.
3551
2a71eb48
RG
35522009-12-15 Richard Guenther <rguenther@suse.de>
3553
3554 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3555 (lto_post_options): Do not disable debuginfo.
3556
a818bca1
DG
35572009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3558
3559 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3560
e7d00517
RG
35612009-12-11 Richard Guenther <rguenther@suse.de>
3562
3563 PR lto/42037
3564 * lto.c (lto_resolution_read): Properly grow the vector.
3565
1ab53893
RG
35662009-12-11 Richard Guenther <rguenther@suse.de>
3567
3568 PR lto/41915
3569 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3570 to the C99 default. Do not set flag_unit_at_a_time.
3571
0f900dfa
JJ
35722009-11-28 Jakub Jelinek <jakub@redhat.com>
3573
3574 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3575 variable.
3576
92fa7608
RAE
35772009-11-19 Rafael Avila de Espindola <espindola@google.com>
3578
3579 PR bootstrap/42096
3580 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3581 * lto.c (lto_parse_hex): New.
3582 (lto_resolution_read): Use lto_parse_hex.
3583 * lto.h (lto_parse_hex): New.
3584
9870fe4f
RAE
35852009-11-17 Rafael Avila de Espindola <espindola@google.com>
3586
3587 * lto-elf.c (lto_file_init): Add offset argument.
3588 (lto_elf_file_open): Record the offset.
3589 * lto.c (lto_resolution_read): Change file_name into a lto_file
3590 argument. Check offsets.
3591 (lto_file_read): Update call to lto_resolution_read.
3592 * lto.h (lto_file_struct): Add the offset field.
3593
1b70729f
RAE
35942009-11-16 Rafael Avila de Espindola <espindola@google.com>
3595
3596 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3597
0e3776db
JH
35982009-11-14 Jan Hubicka <jh@suse.cz>
3599
3600 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3601
06bd7f56
RAE
36022009-11-12 Rafael Avila de Espindola <espindola@google.com>
3603
3604 * lang.opt (fresolution): Renamed from resolution.
3605 * lto-lang.c (lto_handle_option): Handle new option name.
3606 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3607
7e9dc421 36082009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3609 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3610
3611 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3612 (lto_elf_file_open): Handle offsets in arguments name@offest.
3613
b207f900
RG
36142009-10-30 Richard Guenther <rguenther@suse.de>
3615
3616 PR lto/41858
3617 * lto.c (lto_file_read): Do not set file_data->fd.
3618 (lto_read_section_data): Use a single-entry file-descriptor cache.
3619 Do not check the result of xmalloc.
3620 (free_section_data): Do not use file_data->fd.
3621 (lto_read_all_file_options): Likewise.
3622
2c928155
RG
36232009-10-22 Richard Guenther <rguenther@suse.de>
3624
3625 * lto.c (lto_fixup_jump_functions): Remove.
3626 (lto_fixup_decls): Do not fixup jump functions.
3627 (read_cgraph_and_symbols): Schedule cgraph merging after
3628 summary reading. Schedule type and decl fixup before
3629 summary reading.
3630
f9c91f8a
RB
36312009-10-22 Richard Guenther <rguenther@suse.de>
3632
3633 * lto.c (lto_fixup_data_t): Remove free_list member.
3634 (lto_fixup_tree): Do not insert into free_list.
3635 (free_decl): Remove.
3636 (lto_fixup_decls): Remove free-list handling.
3637
fb3f88cc
JH
36382009-10-22 Jan Hubicka <jh@suse.cz>
3639
3640 * lto.c (lto_fixup_jump_functions): New function.
3641 (lto_fixup_decls): Use it.
3642
35f1e9f4
RG
36432009-10-16 Richard Guenther <rguenther@suse.de>
3644
3645 PR lto/41715
3646 * lto.c (lto_fixup_tree): Revert last change.
3647
200c8750
RG
36482009-10-14 Richard Guenther <rguenther@suse.de>
3649
3650 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3651 compatible with the one we replace wrap it around a
3652 VIEW_CONVERT_EXPR.
3653
b1b07c92
RG
36542009-10-09 Richard Guenther <rguenther@suse.de>
3655
3656 PR lto/41635
3657 PR lto/41636
3658 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3659 a file.
3660 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3661 (init_ehdr##BITS): Likewise.
3662
3c2e7d45
JM
36632009-10-08 Joseph Myers <joseph@codesourcery.com>
3664
3665 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3666 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3667 diagnostics.
3668 * lto-lang.c (lto_post_options): Remove trailing "." from
3669 diagnostics.
3670
0d0bfe17
RG
36712009-10-08 Richard Guenther <rguenther@suse.de>
3672
3673 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3674 hash tables.
3675
4bedf19a
JM
36762009-10-07 Joseph Myers <joseph@codesourcery.com>
3677
3678 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3679
b20996ff
JH
36802009-10-07 Jan Hubicka <jh@suse.cz>
3681
3682 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3683 ltrans stage; explain why this is needed and should not.
3684
1a735925
RG
36852009-10-05 Richard Guenther <rguenther@suse.de>
3686
3687 PR lto/41552
3688 PR lto/41487
3689 * lto.c (lto_read_decls): Do not register deferred decls.
3690 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3691 until after reading the IPA summaries.
3692
d7f09764
DN
36932009-10-02 Rafael Avila de Espindola <espindola@google.com>
3694
3695 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3696 (lto-lang.c): Don't include lto/common.h.
3697
36982009-10-02 Rafael Avila de Espindola <espindola@google.com>
3699
3700 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3701 (lto/common.o): Remove.
3702 * common.c: Remove.
3703 * common.h (lto_kind_str): Remove.
3704 (lto_visibility_str): Remove.
3705 (lto_resolution_str): Make it static.
3706
37072009-10-01 Diego Novillo <dnovillo@google.com>
3708
3709 * lto.c (lto_read_decls): Add comment.
3710 Call internal_error instead of gcc_assert.
3711 (lto_resolution_read): Likewise.
3712 (lto_add_all_inlinees): Tidy.
3713 * Make-lang.in: Fix copyright boilerplate.
3714 (lto.pdf): New.
3715 (lto.install-pdf): New.
3716 * lto-tree.h: Fix copyright boilerplate.
3717 * lang-specs.h: Likewise.
3718 Remove ".lto" entry from compilers fragment.
3719 * lto-elf.c: Move inclusion of gelf.h after config.h.
3720 Tidy formatting everywhere.
3721 * lto.h: Fix copyright boilerplate.
3722 Tidy formatting everywhere.
3723 * common.c: Likewise.
3724 * config-lang.in: Likewise.
3725 * common.h: Likewise.
3726 * lto-lang.c: Likewise.
3727
37282009-10-01 Richard Guenther <rguenther@suse.de>
3729
3730 * lto.c (lto_read_section_data): Use plain lseek/read.
3731
37322009-10-01 Richard Guenther <rguenther@suse.de>
3733
3734 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3735 use sysconf to query the system page size.
3736 (lto_file_read): Implement fallback using stdio.
3737 (free_section_data): Likewise.
3738
37392009-09-29 Diego Novillo <dnovillo@google.com>
3740
3741 * lto-lang.c (lto_init): Really fix call to
3742 build_common_builtin_nodes.
3743
37442009-09-29 Diego Novillo <dnovillo@google.com>
3745
3746 * lto-lang.c (lto_init): Fix call to
3747 build_common_builtin_nodes.
3748
37492009-09-29 Richard Guenther <rguenther@suse.de>
3750
3751 PR lto/40754
3752 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3753 in bytes.
3754 (first_data_block): New static variable.
3755 (lto_elf_append_data): Align the first data block in each
3756 section.
3757
37582009-09-28 Diego Novillo <dnovillo@google.com>
3759
3760 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3761 * lto.c (strip_extension): New.
3762 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3763 (lto_execute_ltrans): Tidy.
3764 Do not pass -fwpa nor -fltrans-* to LTRANS.
3765 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3766 * tree.c (need_assembler_name_p): Call
3767 lang_hooks.decls.may_need_assembler_name_p if set.
3768 * varasm.c (default_binds_local_p_1): Remove check for
3769 flag_ltrans.
3770 * varpool.c (decide_is_variable_needed): Do not test for
3771 in_lto_p.
3772
37732009-09-22 Richard Guenther <rguenther@suse.de>
3774
3775 PR lto/39276
3776 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3777 * Make-lang.in: Remove ltrans-driver stuff.
3778 * config-lang.in: Likewise.
3779 * lang.opt (fltrans-driver): Remove.
3780 * lto-lang.c (lto_init_options): Remove code initializing
3781 ltrans_driver.
3782 * ltrans-driver: Remove.
3783
37842009-09-21 Diego Novillo <dnovillo@google.com>
3785
3786 * lto-lang.c (lto_define_builtins): Remove superfluous
3787 calls to targetm.init_builtins and build_common_builtin_nodes.
3788 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3789 build_common_builtin_nodes.
3790 * lto.c (lto_materialize_function): Do nothing if NODE is a
3791 clone.
3792
37932009-09-03 Diego Novillo <dnovillo@google.com>
3794
3795 * lto-elf.c (validate_file): Replace call to
3796 elf_getshstrndx with call to elf_getshdrstrndx.
3797
37982009-08-19 Richard Guenther <rguenther@suse.de>
3799
3800 * lto-lang.c (lto_init): Merge char_type_node with the
3801 appropriately signed variant.
3802
38032009-08-19 Richard Guenther <rguenther@suse.de>
3804
3805 PR lto/41071
3806 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3807 (lto_fixup_type): Re-build the pointer-to chain part two.
3808
38092009-08-19 Richard Guenther <rguenther@suse.de>
3810
3811 PR lto/41071
3812 * lto.c (lto_fixup_type): Re-build the type variant chain.
3813
38142009-08-19 Richard Guenther <rguenther@suse.de>
3815
3816 PR lto/41071
3817 * lto.c (lto_fixup_constructor): New function.
3818 (lto_fixup_tree): Replace all types. Properly fixup
3819 constructors and constants.
3820
38212009-08-14 Richard Guenther <rguenther@suse.de>
3822
3823 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3824 for DECL_LANG_SPECIFIC.
3825
38262009-08-13 Richard Guenther <rguenther@suse.de>
3827
3828 PR lto/41032
3829 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3830
38312009-07-30 Richard Guenther <rguenther@suse.de>
3832
3833 PR lto/40903
3834 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3835 the largest decl for output and free TREE_CHAIN for further
3836 use.
3837
38382009-07-24 Diego Novillo <dnovillo@google.com>
3839
3840 * Make-lang.in: Add empty lto.install-plugin target.
3841
38422009-07-13 Diego Novillo <dnovillo@google.com>
3843
3844 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3845
38462009-07-11 Richard Guenther <rguenther@suse.de>
3847
3848 * lto-lang.c (lto_write_globals): Wrapup global decls.
3849
38502009-07-10 Richard Guenther <rguenther@suse.de>
3851
3852 * lto-lang.c (lto_init): Allocate one more location to make
3853 BUILTINS_LOCATION correct.
3854
38552009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3856
3857 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3858
38592009-07-06 Diego Novillo <dnovillo@google.com>
3860
3861 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3862 TYPE_SIZE_UNIT.
3863
38642009-07-06 Diego Novillo <dnovillo@google.com>
3865
3866 * lto.c (preload_common_nodes): Remove.
3867 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3868 (lto_read_decls): Call lto_data_in_create and
3869 lto_data_in_delete.
3870 (free_decl): Do not call ggc_free.
3871 (lto_main): Call lto_init_reader.
3872 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3873 (lto_init): Initialize main_identifier_node if needed.
3874 Make ptrdiff_type_node be integer_type_node.
3875
38762009-06-19 Diego Novillo <dnovillo@google.com>
3877
3878 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3879 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3880 Remove code guarded by #ifdef LOCAL_TRACE.
3881
38822009-06-18 Diego Novillo <dnovillo@google.com>
3883
3884 * lto.c: Update license to GPLv3.
3885 * lto-elf.c: Likewise.
3886 * common.c: Likewise.
3887 * lto-lang.c: Likewise.
3888 * lto.h: Remove superfluous include files. Update all
3889 users.
3890
38912009-06-17 Diego Novillo <dnovillo@google.com>
3892
3893 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3894
38952009-06-02 Diego Novillo <dnovillo@google.com>
3896
3897 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3898 read in.
3899 (materialize_cgraph): Only materialize nodes that have a
3900 representation on file.
3901
39022009-06-01 Diego Novillo <dnovillo@google.com>
3903
3904 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3905
39062009-05-31 Diego Novillo <dnovillo@google.com>
3907
3908 * lto-lang.c (lto_type_for_mode): Handle all the modes
3909 handled in c_common_type_for_mode.
3910
39112009-05-21 Diego Novillo <dnovillo@google.com>
3912
3913 * lto-elf.c: Always include <gelf.h>.
3914 * config-lang.in (target_libs): Remove.
3915 (build_by_default): Set to no.
3916
39172009-05-15 Diego Novillo <dnovillo@google.com>
3918
3919 * lto.c (lto_materialize_function): Assert that DECL is
3920 not a builtin.
3921 (materialize_cgraph): Don't try to materialize builtin
3922 functions.
3923 * lto-section-out.c (write_symbol_vec): Do not write
3924 builtin functions.
3925
39262009-05-13 Diego Novillo <dnovillo@google.com>
3927
3928 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3929
39302009-05-07 Diego Novillo <dnovillo@google.com>
3931
3932 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3933 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3934 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3935 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3936 (lto_fixup_tree): Call gimple_register_type when *TP is a
3937 type.
3938 (lto_main): Call bitmap_obstack_initialize.
3939
39402009-04-22 Diego Novillo <dnovillo@google.com>
3941
3942 * lto.c (free_section_data): Tidy.
3943 (lto_1_to_1_map): Tidy.
3944 (lto_add_all_inlinees): Tidy.
3945 (prefix_name_with_star): New.
3946 (get_filename_for_set): New.
3947 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3948 to determine what cgraph node sets to write.
3949 Call get_filename_for_set to compute temporary file
3950 names.
3951 (lto_execute_ltrans): Do not execute LTRANS on files with
3952 names that start with '*'.
3953 Move logic to execute LTRANS together so that LTRANS is
3954 invoked only if there are any files to compile.
3955 (do_whole_program_analysis): Only remove output files
3956 that do not start with '*'.
3957
39582009-04-06 Diego Novillo <dnovillo@google.com>
3959
3960 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3961 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3962 (lto_add_all_inlinees): Tidy.
3963
39642009-03-26 Diego Novillo <dnovillo@google.com>
3965
3966 * lto.c: Include gimple.h.
3967 (lto_read_in_decl_state): Call gimple_register_type for
3968 every type in every stream.
3969 (lto_fixup_common): Call gimple_register_type if T has a
3970 type.
3971 (do_whole_program_analysis): Call print_lto_report.
3972 (lto_main): Call print_lto_report after cgraph_optimize.
3973 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3974
39752009-03-24 Diego Novillo <dnovillo@google.com>
3976
3977 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3978 (lto.o): Add dependency on GIMPLE_H.
3979
39802009-03-10 Simon Baldwin <simonb@google.com>
3981
3982 * lto.c (lto_read_all_file_options): Close any open file descriptor
3983 contained in file_data before freeing.
3984
39852009-02-24 Rafael Avila de Espindola <espindola@google.com>
3986
3987 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3988 for a decl in the original bitmap, not a node.
3989 (lto_add_all_inlinees): Remove original nodes that are not needed.
3990 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3991
39922009-02-24 Diego Novillo <dnovillo@google.com>
3993
3994 * lto.c (lto_materialize_function): Update
3995 lto_stats.num_function_bodies.
3996 (get_section_data): Initialize *LEN to 0.
3997 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3998 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3999 Update lto_stats.num_output_files.
4000 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4001 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4002 (lto_main): Initialize lto_stats.
4003 If flag_lto_report is set, call print_lto_report.
4004
40052009-02-19 Diego Novillo <dnovillo@google.com>
4006
4007 Revert
4008
4009 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4010
4011 * lto.c (lto_add_inline_clones): Don't add the
4012 master clone. Check for a decl in the original
4013 bitmap, not a node.
4014 (lto_add_all_inlinees): Remove original nodes
4015 that are not needed.
4016 (lto_scan_statics_in_cgraph_node): Don't care if
4017 the node is the master.
4018 (lto_promote_cross_file_statics): Use a new
4019 context.seen_node_decls for each set
4020
40212009-02-19 Rafael Avila de Espindola <espindola@google.com>
4022
4023 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4024 for a decl in the original bitmap, not a node.
4025 (lto_add_all_inlinees): Remove original nodes that are not needed.
4026 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4027 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4028 for each set
4029
40302009-02-18 Diego Novillo <dnovillo@google.com>
4031
4032 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4033 and TV_WHOPR_WPA_IO.
4034 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4035 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4036 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4037 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4038 depending on command line flags.
4039 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4040 (lto_main): Remove timer uses.
4041
40422009-02-18 Rafael Avila de Espindola <espindola@google.com>
4043
4044 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4045 (lto_wpa_write_files): Update calls to renamed functions.
4046
40472009-02-17 Diego Novillo <dnovillo@google.com>
4048
4049 PR 39203
4050 * lto-lang.c (lto_post_options): Disable -fwhole-program
4051 when running LTRANS.
4052
40532009-02-10 Diego Novillo <dnovillo@google.com>
4054
4055 * lto.c (read_cgraph_and_symbols): Fix comment.
4056
40572009-02-10 Diego Novillo <dnovillo@google.com>
4058
4059 * lto.c (read_cgraph_and_symbols): Read options from all
4060 IL files.
4061
40622009-02-10 Diego Novillo <dnovillo@google.com>
4063
4064 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4065 (materialize_cgraph): Likewise.
4066 (do_whole_program_analysis): Likewise.
4067 (lto_main): Call read_cgraph_and_symbols,
4068 materialize_cgraph and do_whole_program_analysis.
4069
40702009-02-10 Simon Baldwin <simonb@google.com>
4071
4072 * lto.c: Include lto-opts.h.
4073 * (lto_main): Clear file options at loop start, read any saved
4074 options from the first file handled, and re-issue options.
4075 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4076
40772009-02-02 Diego Novillo <dnovillo@google.com>
4078
4079 * lto.c (lto_main): Stop LTO_TIMER and use
4080 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4081
40822009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4083
4084 PR lto/38995
4085 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4086 to POINTER_SIZE.
4087
40882009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4089
ab20d992 4090 * Make-lang.in (LTO_EXE): Link with all
d7f09764
DN
4091 BACKENDLIBS and not only GMPLIBS
4092
40932009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4094
4095 PR bootstrap/38992
4096 * lto-elf.c: Include gelf.h instead of libelf.h.
4097 (lto_elf_file_close): Replace elfx_update_shstrndx with
4098 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4099 gelf_update_ehdr.
4100
41012009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4102
4103 PR middle-end/38996
4104 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4105
41062009-01-26 Diego Novillo <dnovillo@google.com>
4107
4108 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4109
41102009-01-26 Diego Novillo <dnovillo@google.com>
4111
4112 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4113 and rename into gimple_types_compatible_p.
4114
41152009-01-12 Rafael Avila de Espindola <espindola@google.com>
4116
4117 * lto-lang.c (lang_hooks): Remove the const qualifier.
4118
41192009-01-06 Diego Novillo <dnovillo@google.com>
4120
4121 * ltrans-driver: Mark 'all' target as phony.
4122
41232008-12-31 Diego Novillo <dnovillo@google.com>
4124
4125 * ltrans-driver: Execute a NOP action for target 'all'.
4126
41272008-12-19 Diego Novillo <dnovillo@google.com>
4128
4129 * lto.c (lto_1_to_1_map): Tidy.
4130
41312008-12-19 Diego Novillo <dnovillo@google.com>
4132
4133 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4134 be opened, show its name.
4135 * ltrans-driver: If $verbose is set, do not use parallelism.
4136
41372008-12-17 Rafael Avila de Espindola <espindola@google.com>
4138
4139 * lto.c (lto_fixup_function): New.
4140 (lto_fixup_tree): Call lto_fixup_function.
4141
41422008-12-14 Doug Kwan <dougkwan@google.com>
4143
4144 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4145 variables if there is no function.
4146
41472008-12-10 Simon Baldwin <simonb@google.com>
4148
4149 * ltrans-driver: Always run make in silent mode, to avoid make's
4150 trace on stdout interfering with lto-wrapper output.
4151
41522008-12-10 Doug Kwan <dougkwan@google.com>
4153
4154 * lto.c (lto_add_inline_clones): Do not force master clones of
4155 inlined functions already in SET to be static inline.
4156
41572008-12-04 Doug Kwan <dougkwan@google.com>
4158
4159 * lto.c (globalize_context_t): New type to store states in
4160 globalization of cross-file statics.
4161 (globalize_cross_file_statics): New.
4162 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4163 static decls that need to be fixed up.
4164 (lto_scan_statics_in_cgraph_node): Change call interface to use
4165 a globalize_context_t CONTEXT for all states used.
4166 (lto_scan_statics_in_remaining_global_vars): New.
4167 (lto_promote_cross_file_statics): Use new call interface of
4168 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4169 visible vars in the last set.
4170
41712008-12-03 Diego Novillo <dnovillo@google.com>
4172
4173 * lto.c (lto_fixup_tree): Do not emit an error when
4174 PREVAILING throw but T doesn't.
4175
41762008-12-02 Doug Kwan <dougkwan@google.com>
4177
4178 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4179 from code in ...
4180 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4181 variables and functions.
4182 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4183 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4184
41852008-11-29 Diego Novillo <dnovillo@google.com>
4186
4187 * lto.c: Include timevar.h.
4188 (lto_materialize_function): Tidy. Add comments.
4189 (lto_wpa_write_files): Tidy.
4190 (lto_execute_ltrans): Tidy.
4191 (lto_main): Add local variable LTO_TIMER. Initialize it
4192 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4193 Start and stop the timer.
4194 Tidy comments.
4195 * Make-lang.in (lto.o): Add dependency on timevar.h.
4196 * ltrans-driver: React to -v and -save-temps.
4197 Use simple heuristic to determine how much parallelism to
4198 use when executing make.
4199
42002008-11-12 Doug Kwan <dougkwan@google.com>
4201
4202 * lto.c (lto_bitmap_obstack): Remove var.
4203 (lto_materialize_function): Do nothing instead of marking function
4204 body in file if flag_wpa is true.
4205 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4206 (lto_scan_statics_in_cgraph_node): New function.
4207 (lto_promote_cross_file_statics): Same.
4208 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4209 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4210 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4211
42122008-11-09 Diego Novillo <dnovillo@google.com>
4213
ab20d992 4214 * lto.c (lto_fixup_tree): Change error message locus
d7f09764
DN
4215 information to include location of mismatching
4216 declaration.
4217 Use TREE_NO_WARNING to avoid repeated messages.
4218 (lto_main): If lto_fixup_decls emitted any errors, exit.
ab20d992 4219 * lto-lang.c: Don't include libfuncs.h and except.h
d7f09764
DN
4220 (lto_init_options): Don't enable exceptions by default.
4221 (lto_eh_runtime_type): Move to lto-function-in.c
4222 (lto_init_eh): Likewise.
4223 (lto_init): Don't call lto_init_eh.
ab20d992 4224 * Make-lang.in (lto-lang.o): Remove dependency on
d7f09764
DN
4225 libfuncs.h and except.h.
4226
42272008-10-30 Diego Novillo <dnovillo@google.com>
4228
4229 * lto.c (lto_read_decls): Declare debug_main only if
4230 LTO_STREAM_DEBUGGING is enabled.
4231
42322008-10-30 Simon Baldwin <simonb@google.com>
4233
4234 * lto.c (lto_wpa_write_files): Create intermediate files with
4235 make_cwd_temp_file().
4236 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4237 WPA_SAVE_LTRANS is set.
4238 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4239 * ltrans-driver: Do not strip directory from output files.
4240
42412008-10-29 Doug Kwan <dougkwan@google.com>
4242
4243 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4244 DECL.
4245 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4246 (lto/lto-symtab.o): Remove rule.
4247 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4248 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4249 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4250 Remove macros.
4251 lto-symtab.c (File): Move up one level.
4252 lto-lang.c (cgraph.h): Remove include.
4253 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4254 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4255 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4256
ab20d992 42572008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4258
4259 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4260 non prevailing weak symbols.
4261
ab20d992 42622008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4263
4264 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4265
ab20d992 42662008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4267
4268 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4269 different types.
4270
42712008-10-23 Simon Baldwin <simonb@google.com>
4272
4273 * lto-lang.c (input_node): Save the node reference, rather than the
4274 node pointer, in node->inlined_to.
4275 (input_cgraph_1): Convert node references into node pointers.
4276
42772008-10-22 Diego Novillo <dnovillo@google.com>
4278 Rafael Espindola <espindola@google.com>
4279
4280 * lto.c (lto_resolution_read): Tidy.
4281 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4282 abort if RET is NULL.
4283
42842008-10-22 Doug Kwan <dougkwan@google.com>
4285
4286 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4287 exceptions flag is given.
4288 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4289 (lto_init_eh): Remove exceptions flag initialization.
ab20d992 4290 (lto_init): Only call lto_init_eh if exceptions flag is set.
d7f09764
DN
4291
42922008-10-21 Diego Novillo <dnovillo@google.com>
4293
4294 * lto.c: Tidy some formatting.
4295 * lto.h: Likewise.
4296
42972008-10-21 Simon Baldwin <simonb@google.com>
4298
4299 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4300 them is NULL (but not the other).
4301
43022008-10-17 Diego Novillo <dnovillo@google.com>
4303
4304 * ltrans-driver: Divert output from make to a temporary file.
4305 Show it if the call to make failed.
4306
43072008-10-15 Diego Novillo <dnovillo@google.com>
4308
4309 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4310 Do not print TEMP_FILENAME
4311 * ltrans-driver: Call make with -s.
4312
43132008-10-15 Diego Novillo <dnovillo@google.com>
4314
4315 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4316 TREE_STATIC on global symbols.
4317
43182008-10-14 Ollie Wild <aaw@google.com>
4319
4320 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4321 (LTRANS_DRIVER_EXE): Add.
4322 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4323 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4324 (lto.install.common): Remove ltrans-driver.
4325 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4326 (LTRANS_DRIVER_EXE): New build rule.
4327 * config-lang.in (compilers): Add ltrans-driver.
4328
43292008-10-14 Diego Novillo <dnovillo@google.com>
4330
4331 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4332 of program name.
4333
43342008-10-13 Ollie Wild <aaw@google.com>
4335
4336 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4337 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4338 * ltrans-driver (LTRANS_FLAGS): Remove.
4339
43402008-10-08 Doug Kwan <dougkwan@google.com>
4341
4342 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4343 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4344 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4345 from lto_fixup_state to here.
4346 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4347 just a free-list. Fix up types also. Move decl merging code to
4348 lto_fixup_tree.
4349 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4350 object.
4351 (lto_fixup_decls): Use another pointer set to avoid multiple
4352 walking of nodes except for DECLs to be replaced. Pass an
4353 lto_fixup_data_t object to tree-walker.
4354
ab20d992 43552008-10-08 Rafael Espindola <espindola@google.com>
d7f09764
DN
4356
4357 * lto-symtab.c (lto_symtab_set_resolution): New.
4358 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4359 lto_symtab_get_resolution.
4360 (lto_symtab_prevailing_decl): Return decl for non public decls.
4361 (lto_symtab_get_resolution): New.
4362 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4363
ab20d992 43642008-10-06 Rafael Espindola <espindola@google.com>
d7f09764
DN
4365
4366 * lto-lang.c: Include cgraph.h.
4367 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4368 input_cgraph): Moved from lto-cgraph.c.
4369 (LANG_HOOKS_INPUT_CGRAPH): New.
4370
ab20d992 43712008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4372
4373 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4374
ab20d992 43752008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4376
4377 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4378 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4379 prevailing definition. Don't mark TREE_NOTHROW differences.
4380 * lto.c (lto_fixup_tree): New.
4381 (lto_fixup_state): New.
4382 (lto_fixup_state_aux): New.
4383 (free_decl): New.
4384 (lto_fixup_decls): New.
4385 (lto_main): Call lto_fixup_decls.
4386
43872008-10-02 Ollie Wild <aaw@google.com>
4388
4389 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4390 and Init.
4391 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4392 * lto-lang.c (lto_post_options): Add validation and fixups for
4393 -fltrans and -fwpa.
4394
ab20d992 43952008-10-02 Rafael Espindola <espindola@google.com>
d7f09764
DN
4396
4397 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4398 lto_symtab_merge_decl): Return void.
4399 (lto_symtab_prevailing_decl): New.
4400
ab20d992 44012008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4402
4403 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4404 defined symbols.
4405 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4406 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4407 Check for already defined symbols.
4408 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4409 (LTO_IDENTIFIER_RESOLUTION): Remove.
4410 (LTO_DECL_RESOLUTION): New.
4411
ab20d992 44122008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4413
4414 * lto.c (lto_read_decls): Use new input_tree signature.
4415
44162008-09-26 Doug Kwan <dougkwan@google.com>
4417
4418 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4419 bodies affected by exception attribute merging of DECLs.
4420 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
ab20d992 4421 merging.
d7f09764
DN
4422
44232008-09-25 Rafael Espindola <espindola@google.com>
4424
4425 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4426 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4427 * lto-symtab.c (lto_symtab_compatible): New.
4428 (lto_symtab_overwrite_decl): New.
4429 (lto_symtab_merge_decl): Refactor to use the above functions
4430 and the resolution from lang_identifier.
4431 * lto-tree.h: Include plugin-api.h.
4432 (lang_identifier): Add resolution.
4433 (LTO_IDENTIFIER_RESOLUTION): New.
4434
44352008-09-25 Ollie Wild <aaw@google.com>
4436
4437 * lang.opt (fltrans-output-list=): New option.
4438 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4439
ab20d992 44402008-09-25 Rafael Espindola <espindola@google.com>
d7f09764
DN
4441
4442 * lto.c (lto_resolution_read): Initialize ret;
4443
44442008-09-24 Ollie Wild <aaw@google.com>
4445
4446 * lto.c (sys/mman.h): Move include.
4447 (lto_wpa_write_files): Return a list of written files.
4448 (lto_execute_ltrans): New function.
4449 (lto_main): Call lto_execute_ltrans.
4450 (ltrans-driver): New file.
4451 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4452 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4453 (lto_init_options): Initialize ltrans_driver.
4454 (lto_handle_option): Fix incorrect default output value.
4455 * lang.opt (fltrans-driver=): New option.
4456 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4457 (lto.install-common): Add lto/ltrans-driver.
4458
ab20d992 44592008-09-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4460
4461 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4462 (lto/lto.o): Depend on lto/common.h.
4463 (lto/common.o): New.
4464 * lang.opt (resolution): New.
4465 * lto-lang.c (resolution_file_name): New.
4466 (lto_handle_option): Handle OPT_resolution.
4467 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4468 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4469 pass it to lto_symtab_merge_decl.
4470 * lto.c: Include common.h.
4471 (lto_read_decls): Add resolutions and resolutions_size arguments.
4472 Initialize data_in.globals_resolution and
4473 data_in.globals_resolution_size.
4474 (index_and_symbol_resolution): New.
4475 (lto_resolution_read): New.
4476 (lto_file_read): Add argument resolution_file.
4477 Read resolution.
4478 * lto.h (resolution_file_name): New.
4479
ab20d992 44802008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4481
4482 * common.c: Update description.
4483 * common.h: Update description.
4484
ab20d992 44852008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4486
4487 * common.c: Moved from lto-plugin.
4488 * common.h: Moved from lto-plugin.
4489
44902008-09-22 Doug Kwan <dougkwan@google.com>
4491
4492 * lto.c (VEC(bitmap,heap)): Declare.
4493 (lto_materialize_function): Handle WAP mode specially.
4494 (lto_add_inline_clones): New.
4495 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4496 return a bitmap of inlined decls.
4497 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4498 (lto_main): Call reset_inline_failed to reset inlining states.
4499 Check call-graph after WPA inlining.
4500 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4501 unconditionally.
4502
45032008-09-19 Doug Kwan <dougkwan@google.com>
4504
4505 lto.c (lto_main): Remove unsued wrapper code.
4506 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4507
45082008-09-19 Rafael Espindola <espindola@google.com>
4509
4510 * lto-symtab.c: Include lto-tree-in.h.
4511 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4512 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4513 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4514
45152008-09-17 Paolo Bonzini <bonzini@gnu.org>
4516 Rafael Avila de Espindola <espindola@google.com>
4517
4518 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4519 COMPOUND_LITERAL_EXPR_DECL): Remove.
4520 (emit_local_var): Remove.
4521 (lto_expand_expr): Remove.
4522 (lto_staticp): Remove.
4523 (LANG_HOOKS_EXPAND_EXPR): Remove.
4524 (LANG_HOOKS_STATICP): Remove.
4525
45262008-09-11 Diego Novillo <dnovillo@google.com>
4527
4528 * lto-lang.c: Include except.h and libfuncs.h.
4529 (lto_init_eh): New.
4530 (lto_init): Call it.
4531 Set flag_generate_lto to 0.
4532 * Make-lang.in (lto-lang.o): Add dependency on except.h
4533 and libfuncs.h.
4534
45352008-09-09 Bill Maddox <maddox@google.com>
4536
4537 * lto-lang.c: Include header file expr.h.
4538 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4539 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
ab20d992 4540 (emit_local_var): Copied from c-semantics.c.
d7f09764
DN
4541 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4542 and c_staticp in c-common.c.
ab20d992 4543 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
d7f09764
DN
4544
45452008-09-08 Diego Novillo <dnovillo@google.com>
4546
4547 * lto-lang.c (lto_global_bindings_p): Return 1 during
4548 IPA passes.
4549
45502008-09-07 Diego Novillo <dnovillo@google.com>
4551
4552 * lto.c: Tidy formatting.
4553
45542008-08-04 Bill Maddox <maddox@google.com>
4555
4556 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
ab20d992 4557
d7f09764
DN
45582008-09-03 Doug Kwan <dougkwan@google.com>
4559
4560 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4561 CIF_OK instead of NULL.
4562
45632008-09-02 Diego Novillo <dnovillo@google.com>
4564 Simon Baldwin <simonb@google.com>
4565
4566 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4567 c_common_type_for_size.
4568 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4569 (lto_init): Call linemap_add.
4570 (signed_and_unsigned_types): Remove.
4571
45722008-08-29 Diego Novillo <dnovillo@google.com>
4573
4574 * lto-lang.c (handle_noreturn_attribute): New local function.
4575 (handle_const_attribute): New local function.
4576 (handle_malloc_attribute): New local function.
4577 (handle_pure_attribute): New local function.
4578 (handle_novops_attribute): New local function.
4579 (handle_nonnull_attribute): New local function.
4580 (handle_nothrow_attribute): New local function.
4581 (handle_sentinel_attribute): New local function.
4582 (handle_type_generic_attribute): New local function.
4583 (handle_format_attribute): New local function.
4584 (handle_format_arg_attribute): New local function.
4585 (lto_attribute_table): Declare.
4586 (lto_format_attribute_table): Declare.
4587 (lto_init_attributes): New local function.
4588 (lto_define_builtins): Call it.
4589 Call targetm.init_builtins and build_common_builtin_nodes.
4590 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4591 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4592
45932008-08-28 Diego Novillo <dnovillo@google.com>
4594
4595 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4596 $(GIMPLE_H).
4597 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4598 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4599 * lto-symtab.c: Include gimple.h.
4600 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4601 TREE_CHAIN.
4602
46032008-08-27 Doug Kwan <dougkwan@google.com>
4604
4605 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4606 gt-lto-lto.h): New includes.
4607 (lto_materialize_function): Do not read in function body in WPA mode.
4608 Format a line to fit in 80 columns.
4609 (lto_cgraph_node_sets): New garbage collected variable.
4610 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4611 New functions.
4612 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
ab20d992 4613 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
d7f09764
DN
4614 variable LTO_SECTION_IN_H.
4615 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4616 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4617 with variable LTO_SECTION_IN_H.
4618 * config-lang.in (gtfiles): Add lto/lto.c.
4619 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4620 merged DECL_RESULT correctly.
4621
46222008-08-26 Bill Maddox <maddox@google.com>
4623
4624 * lto-lang.c Include tree-gimple.h.
4625 (lto_mark_addressable): Call mark_addressable rather than
4626 asserting.
4627 (lto_post_options): Suppress debug info generation.
4628 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
ab20d992 4629
3f8257db 46302008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4631
4632 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4633 assertion and leave an explanatory comment in its place.
ab20d992 4634
d7f09764
DN
46352008-08-21 Doug Kwan <dougkwan@google.com>
4636
4637 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4638 of common nodes instead of computing locallly.
4639 (lto_read_in_decl_state): New.
4640 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4641 Read global and per-function in-decl states.
4642 * Make-lang.in (LTO_H): Update dependency.
4643 (lto/lto.o): Same.
4644 (lto-symtab.c): Merge (revision 139039)
4645 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4646
46472008-08-21 Rafael Espindola <espindola@google.com>
4648
4649 * config-lang.in (target_libs): New.
4650
46512008-08-20 Bill Maddox <maddox@google.com>
4652
4653 * lto.c (current_lto_file): Remove GTY marker from static
4654 variable. Remove include of file gt-lto-lto.h.
4655 * Make-lang.in: Remove dependency of lto/lto.o on
4656 gt-lto-lto.h.
4657 * lto-elf.c (lto_file_close): Removed.
4658 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4659 allocate lto_elf_file object.
4660 (lto_elf_file_close): Free lto_elf_file object after close.
4661 * lto.h (struct lto_file_struct): Remove GTY marker.
4662 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4663 gtfiles.
ab20d992 4664
d7f09764
DN
46652008-08-20 Bill Maddox <maddox@google.com>
4666
4667 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4668 to conform to its new signature.
4669 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4670 on discarded node here, now called in global_vector_fixup.
ab20d992 4671
d7f09764
DN
46722008-08-09 Bill Maddox <maddox@google.com>
4673
4674 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4675 has not been set to a front-end-specific value.
ab20d992 4676
d7f09764 46772008-08-05 Doug Kwan <dougkwan@google.com>
ab20d992 4678
d7f09764
DN
4679 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4680 build breakage.
4681
46822008-07-30 Bill Maddox <maddox@google.com>
4683
4684 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4685 Remove obsolete comments.
4686 (lto_read_decls): Remove initialization of deleted field data_in.global.
4687 Tidy up comments.
4688 (lto_main): Remove redundant initialization of section_hash_table.
4689 * lto-elf.c: Removed obsolete comments.
4690 * lto.h: Tidy up comments.
4691 * lto-symtab.c (lto_least_common_multiple): New function.
4692 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4693 Tidy up comments.
4694
46952008-07-25 Diego Novillo <dnovillo@google.com>
4696 Bill Maddox <maddox@google.com>
4697
4698 * lto.c: Re-order include files.
4699 Include lto-section-out.h.
4700 (preload_common_nodes): Add debugging output.
4701 Add new local INDEX_TABLE.
4702 Call preload_common_node.
4703 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4704
47052008-07-13 Bill Maddox <maddox@google.com>
4706
4707 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4708 unwanted scaling during pointer addition.
4709
47102008-07-11 Bill Maddox <maddox@google.com>
4711 Diego Novillo <dnovillo@google.com>
4712
4713 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4714 Make code const-correct.
4715 (lto_file_read): Fix C++ compatibility warnings.
ab20d992 4716 (lto_read_section_data): Fix C++ compatibility warnings.
d7f09764
DN
4717 (lto_get_section_data): Use CONST_CAST to avoid warning when
4718 const pointer passed to free.
4719 * lto-elf.c (lto_elf_build_section_table): Fix C++
4720 compatibility warnings.
ab20d992 4721 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
d7f09764 4722 to avoid warning assigning const pointer to d_buf field of Elf_Data.
ab20d992 4723 (lto_get_current_out_file): Fix C++ compatibility warnings.
d7f09764
DN
4724
47252008-07-11 Diego Novillo <dnovillo@google.com>
4726
4727 * Make-lang.in (lto-warn): Define.
4728
47292008-07-03 Simon Baldwin <simonb@google.com>
4730
4731 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4732 LTO_STREAM_DEBUGGING.
4733
47342008-06-27 Ollie Wild <aaw@google.com>
4735
4736 * lto-elf.c (lto-section-out.h): New include.
4737 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4738 and data members.
4739 (cached_file_attrs): New static variable.
4740 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4741 Use cached_file_attrs for checking bits.
4742 (lto_elf_build_section_table): Remove elf_file argument from
4743 lto_elf_get_shdr and lto_elf_free_shdr calls.
4744 (DEFINE_INIT_SHDR): New macro.
4745 (init_shdr32, init_shdr64): New functions defined via the
4746 DEFINE_INIT_SHDR macro.
4747 (lto_elf_begin_section_with_type): New function.
4748 (lto_elf_begin_section): New function.
4749 (lto_elf_append_data): New function.
4750 (lto_elf_end_section): New function.
4751 (DEFINE_VALIDATE_EHDR): New macro.
4752 (validate_ehdr32, validate_ehdr64): New functions defined via the
4753 DEFINE_VALIDATE_EHDR macro.
4754 (validate_file): New function.
4755 (DEFINE_INIT_EHDR): New macro.
4756 (init_ehdr32, init_ehdr64): New functions defined via the
4757 DEFINE_INIT_EHDR macro.
4758 (init_ehdr): New function.
4759 (lto_elf_file_open): Add support for writable files. Move some
4760 validation logic to validate_file.
4761 (lto_elf_file_close): Add support for writable files. Write file data
4762 and free data blocks.
4763 (current_out_file): New static variable.
4764 (lto_set_current_out_file): New function.
4765 (lto_get_current_out_file): New function.
4766 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4767 Add temporary initialization for testing ELF serialization.
4768 * lto.h (lto-section-out.h): New include.
4769 (struct lto_file_struct): Slight modification to comment.
4770 (lto_elf_file_open): Add writable parameter.
4771 (lto_elf_begin_section): New function declaration.
4772 (lto_elf_append_data): New function declaration.
4773 (lto_elf_end_section): New function declaration.
4774 (lto_set_current_out_file, lto_get_current_out_file): New function
4775 declarations.
4776 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4777 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4778 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4779 * Make-lang.in (LTO_H): Add lto-section-out.h.
4780
47812008-06-12 Ollie Wild <aaw@google.com>
4782
4783 * lto.h (struct lto_file_vtable_struct): Remove.
4784 (struct lto_file_struct): Remove vtable member.
4785 * lto-elf.c (lto_file_init): Remove vtable argument.
4786 (lto_elf_map_optional_lto_section): Remove.
4787 (lto_elf_unmap_section): Remove.
4788 (lto_elf_file_vtable): Remove.
4789 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4790 lto_file_init call.
4791 (lto_elf_find_section_data): Remove.
4792
47932008-06-11 Ollie Wild <aaw@google.com>
4794
4795 * lto.c (lto_file_read): Add const qualifier to data variable.
4796
47972008-06-11 Diego Novillo <dnovillo@google.com>
4798
4799 Merge from lto-streamber sub-branch.
4800
4801 2008-06-04 Ollie Wild <aaw@google.com>
4802
4803 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4804 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4805
4806 2008-05-28 Bill Maddox <maddox@google.com>
4807
4808 Replace the DWARF reader in the LTO front-end.
4809
4810 * lto.c: Include lto-tree-in.h, lto-tags.h.
4811 (enum DWARF2_class, DW_cl_constant, struct
4812 DWARF2_form_data, struct lto_context,
4813 lto_fd_init, lto_info_fd_init,
4814 lto_abbrev_fd_init, lto_info_fd_close,
4815 lto_file_init, lto_file_close,
4816 lto_file_corrupt_error, lto_abi_mismatch_error,
4817 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4818 lto_read_uleb128, lto_read_sleb128,
4819 lto_read_initial_length, lto_abbrev_read_attrs,
4820 lto_abbrev_read, lto_abbrev_read_lookup,
4821 lto_read_section_offset,
4822 lto_read_comp_unit_header, find_cu_for_offset,
4823 lto_get_file_name,
4824 lto_resolve_reference,lto_read_form,
4825 attribute_value_as_int,
4826 make_signed_host_wide_int,
4827 attribute_value_as_constant, lto_cache_hash,
4828 lto_cache_eq, lto_cache_store_DIE,
4829 lto_cache_lookup_DIE, lto_find_integral_type,
4830 lto_find_integral_type_1,
4831 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4832 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4833 lto_unsupported_attr_error, lto_get_identifier,
4834 lto_read_referenced_type_DIE,
4835 lto_read_compile_unit_DIE,
4836 lto_read_array_type_DIE,
4837 lto_read_structure_union_class_type_DIE,
4838 lto_read_enumerator_DIE,
4839 lto_read_enumeration_type_DIE,
4840 lto_read_only_for_child_DIEs,
4841 lto_read_only_for_child_DIEs,
4842 lto_read_member_DIE, lto_read_abbrev,
4843 lto_read_variable_formal_parameter_constant_DIE,
4844 lto_get_body): Removed.
4845 (preload_common_nodes): New function.
4846 (lto_read_decls): Convert for new global streamer.
4847 (lto_materialze_file_data,
4848 lto_read_subroutine_type_subprogram_die,
4849 lto_read_unspecified_parameters_DIE,
4850 lto_read_typedef_DIE,
4851 lto_read_pointer_reference_type_DIE,
4852 lto_read_subrange_type_DIE,
4853 lto_read_base_type_DIE,
4854 lto_read_const_volatile_restrict_type_DIE,
4855 lto_read_namespace_DIE,
4856 lto_read_unspecified_type_DIE, lto_read_DIE,
4857 lto_read_child_DIEs, lto_collect_child_DIEs):
4858 Removed.
4859 (lto_info_read, lto_set_cu_context): Removed.
4860 (lto_file_read): Convert for new global streamer.
4861 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4862 lto_resolve_var_ref, lto_resolve_fn_ref,
4863 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4864 lto_resolve_namespacedecl_ref): Removed.
4865 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4866 * lto-tree.h (lto_symtab_merge_var,
4867 lto_symtab_mergee_fun): Declare here.
4868 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4869 (lto_elf_file_open): Removed code to read DWARF debug sections.
4870 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4871 DWARF2_CompUnit, lto_die_ptr,
4872 lto_die_cache_entry, lto_fd, lto_info_fd,
4873 lto_abbrev_fd): Removed.
4874 (lto_file): Removed debug_info and debug_abbrev fields.
4875 (lto_ref): Removed.
4876 (lto_file_init, lto_file_close,
4877 lto_resolve_type_ref, lto_resolve_var_ref,
4878 lto_resolve_fn_ref, lto_resolve_field_ref,
4879 lto_resolve_typedecl_ref,
4880 lto_resolve_namespacedecl_ref,
4881 lto_get_file_name): Removed declarations.
4882 (lto_symtab_merge_var, lto_symtab_merge_fn):
4883 Declarations moved to lto-tree.h.
4884 * lto-symtab.c (lto_compatible_attributes_p):
4885 Lobotomize this, as it barfs on "Hello, world!".
4886 * lto-section-out.c: Include lto-tree-out.h.
4887 (lto_hash_global_slot_node,
4888 lto_eq_global_slot_node, preload_common_nodes,
4889 write_global_stream, write_global_references):
4890 New functions.
4891 (produce_asm_for_decls): Convert for new global streamer.
4892 * lto-section-out.h (lto_hash_global_slot_node,
4893 lto_eq_global_slot_node): Declare.
4894
3f8257db 48952008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 4896 Jan Hubicka <jh@suse.cz>
ab20d992 4897
d7f09764
DN
4898 * lto.c (sys/mman.h, tree-pass.h): New includes.
4899 (lto_materialize_constructors_and_inits,
4900 lto_materialize_function): Keeps length of section.
4901 (lto_materialize_cgraph): Removed.
4902 (lto_read_decls): Initialize fd field.
4903 (lto_file_read): Different return type and removed much code to
4904 lto_main.
4905 (page_mask): New variable.
4906 (lto_read_section_data, get_section_data, free_section_data): New
4907 functions.
4908 (lto_main): Now calls pass manager, sets the hooks so that the ipa
ab20d992
JJ
4909 passes can get the section data.
4910
3f8257db 49112008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4912
4913 * lto.h (lto_read_decls): Made local.
ab20d992 4914 (lto_input_function_body, lto_input_constructors_and_inits,
d7f09764
DN
4915 lto_input_cgraph): Declarations moved to lto-section-in.h.
4916 * lto-section-in.c: Moved to .. .
4917 * lto-cgraph-in.c: Ditto.
4918 * lto-section-in.h: Ditto.
4919 * lto-function-in.c: Ditto.
4920 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4921 (lto_insert_block): Removed.
4922 (LANG_HOOKS_INSERT_BLOCK): Removed.
4923 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4924 lto-section-in.o): Rules moved to lto/Makefile.in.
ab20d992 4925
d7f09764
DN
4926
49272008-05-16 Ollie Wild <aaw@google.com>
4928
4929 * lto-lang.c (tree-inline.h): Include.
4930 (lto_post_options): New function.
4931 (LANG_HOOKS_POST_OPTIONS): Define.
4932 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4933 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4934
49352008-05-13 Diego Novillo <dnovillo@google.com>
4936
4937 * lto-function-in.c (input_ssa_names): Call
4938 make_ssa_name_fn instead of make_ssa_name.
4939
49402008-05-12 Diego Novillo <dnovillo@google.com>
4941
4942 * lto-cgraph-in.c (overwrite_node): Update references to
4943 inline summary fields.
4944 * lto-function-in.c (input_expr_operand): Do not handle
4945 STRUCT_FIELD_TAG.
4946
49472008-05-09 Ollie Wild <aaw@google.com>
4948
4949 * lang.opt: New file.
4950 * lto-lang.c (lto_init_options): New function.
4951 (lto_handle_option): New function.
4952 (lto_init): Move initialization of flag_unit_at_a_time to
4953 lto_init_options.
4954 (LANG_HOOKS_INIT_OPTIONS): Define.
4955 (LANG_HOOKS_HANDLE_OPTION): Define.
4956
49572008-04-29 Ollie Wild <aaw@google.com>
4958
4959 * lto.c (lto_read_namespace_DIE): New function.
4960 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4961 NAMESPACE_DECL DIE's.
4962 (lto_resolve_namespacedecl_ref): New function.
4963 * lto.h (lto_resolve_namespacedecl_ref): New function.
4964 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4965 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4966 and num_namespace_decls.
4967 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4968 * lto-lang.c (lto_init_ts): New function.
4969 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4970
49712008-04-16 Ollie Wild <aaw@google.com>
4972
4973 * lto-function-in.c (input_type_ref): Updated function description.
4974
49752008-04-16 Ollie Wild <aaw@google.com>
4976
4977 * lto-function-in.c (input_type_ref_1): New function.
4978 (input_type_ref): Split into two functions.
4979 (input_function): Add support for type contexts.
4980
49812008-04-16 Ollie Wild <aaw@google.com>
4982
4983 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4984 section name
4985
49862008-04-16 Ollie Wild <aaw@google.com>
4987
4988 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4989 list of supported languages.
4990
3f8257db 49912008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4992
4993 Merge with mainline @133491.
4994
3f8257db 49952008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4996 Jan Hubicka <jh@suse.cz>
4997
4998 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4999 fd->unmaterialized_fndecls.
5000 (lto_get_file_name, lto_materialize_cgraph): New function.
5001 (lto_materialize_constructors_and_inits,
5002 lto_materialize_function): Read info directly from elf file.
5003 (lto_file_read): Made local and initialize dictionary so that
5004 other lto sections can be read without reprocessing the elf file.
5005 (lto_main): Read all functions after all files have been processed
ab20d992 5006 for their types, globals and cgraph.
d7f09764
DN
5007 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5008 dependencies.
5009 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5010 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5011 (lto_elf_read_symtab): Removed function.
5012 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5013 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5014 (lto_file_read): Made local.
5015 (lto_get_file_name, lto_elf_build_section_table,
ab20d992 5016 lto_input_cgraph):
d7f09764
DN
5017 New function.
5018 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5019 New functions.
5020 (lto_read_decls): Get the file name.
5021 * lto-cgraph-in.c: New file.
5022 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5023 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5024 (input_labels): Fixed latent sizeof issue.
5025 (input_function): Build stmt array to set call sites into cgraph
5026 edges.
5027 (lto_read_body): Reset cfun->curr_properties.
5028 * lto_section_in.h (lto_section_slot): New structure.
5029 (section_hash_table.lto_file_decl_data): New field.
5030
3f8257db 50312008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5032
5033 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5034 reconstruct static initializers.
5035 (lto_get_body, lto_materialize_function): Add lto_section_type as
5036 a parameter.
5037 (lto_materialize_constructors_and_inits,
5038 lto_materialize_file_data): New function.
5039 (lto_materialize_function,
5040 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5041 unmap_section and map_fn_body to map_section.
5042 (lto_set_cu_context): Process functions and static inits
5043 differently.
5044 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5045 lto/lto-section-in.o): Update dependencies.
ab20d992 5046 * lto-elf.c (lto_elf_map_optional_lto_section): Add
d7f09764
DN
5047 lto_section_type parameter.
5048 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
ab20d992 5049 * lto.h (lto_file_vtable_struct): Removed two of the fields and
d7f09764
DN
5050 renamed the other two so that there is only one map function and
5051 one unmap function and each takes a section type parameter.
5052 (lto_read_function_body): Renamed to lto_input_function_body and
5053 added file_data parameter.
5054 (lto_read_var_init): Removed.
5055 (lto_input_constructors_and_inits): New function.
5056 * lto-section-in.c (lto_read_decls): New function.
5057 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5058 var_decls, type_decls, types to lto_file_decl_data.
5059 (input_type_ref, input_expr_operand, lto_read_body): Get
5060 field_decls, fn_decls, var_decls, type_decls, types from different
5061 structure.
5062 (input_globals, input_constructor, lto_read_var_init): Removed.
5063 (input_constructors_or_inits): New function.
5064 (lto_read_function_body, lto_input_constructors_and_inits):
5065 Renamed to lto_input_function_body and takes file_data parameter.
5066 * lto-section-in.h (lto_file_decl_data): New structure.
ab20d992 5067
3f8257db 50682008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5069
5070 * lto-function-in.c (input_globals.c): Changed input type to
5071 lto_function_header.
5072 (input_bb): Removed code to deserialize the stmt number.
5073 (input_function): Renumber all stmts after they are input.
5074 (lto_read_body, lto_read_function_body, lto_read_var_init):
5075 Changed to used new header format and enum section_type.
ab20d992
JJ
5076 *lto-lang.c (success): Removed.
5077
d7f09764
DN
50782008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5079
5080 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5081 (lto_elf_free_sym): Likewise.
5082
5083 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5084 (lto_elf_build_init): Likewise.
5085
3f8257db 50862008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5087
5088 * lto-read.c: Renamed to lto-function-in.c.
5089 (input_1_unsigned): Moved to lto-section-in.c and renamed
5090 lto_input_1_unsigned.
5091 (input_uleb128): Moved to lto-section-in.c and renamed
5092 lto_input_uleb128.
5093 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5094 lto_input_widest_uint_uleb128.
5095 (input_sleb128): Moved to lto-section-in.c and renamed
5096 lto_input_sleb128.
5097 (input_integer): Moved to lto-section-in.c and renamed
5098 lto_input_integer.
5099 (debug_in_fun): Moved to lto-section-in.c and renamed
5100 lto_debug_in_fun.
5101 (input_block): Moved to lto-section-in.h and renamed
5102 lto_input_block.
5103 (input_expr_operand): Fixed to allow lists with more than one
5104 element.
5105 * lto-section-in.h: New file.
5106 * lto-section-in.c: New file with changes from above.
5107 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5108 (lto-section-in.o): New rule.
ab20d992 5109
d7f09764
DN
51102007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5111
5112 * lto-read.c (input_expr_operand): Mark static and external
5113 VAR_DECLs as needed.
5114
51152007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5116
5117 * lto-read.c (input_integer): Use the correct shift amount.
5118
51192007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5120
5121 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5122 (LANG_HOOKS_NAME): Define.
5123
51242007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5125
5126 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5127 original function to...
5128 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5129 don't have a base type.
5130 (lto_read_enumeration_type_DIE): Examine the values of the
5131 enumeration to determine whether we can use an unsigned type for
5132 the base type of the enumeration.
5133
51342007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5135
5136 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5137 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5138
51392007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5140
5141 * lto-lang.c (lto_types_compatible_p): New function.
5142 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5143
51442007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5145 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5146
5147 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5148 (input_local_vars): Read in DECL_INITIAL and context for local
5149 statics that need to be put in unexpanded_vars_list.
5150
51512007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5152
5153 * lto-read.c (input_real): Use a separate null-terminated buffer
5154 for calling real_from_string.
5155 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5156 tell cgraph that it's needed.
5157
51582007-12-19 Doug Kwan <dougkwan@google.com>
5159
5160 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5161
51622007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5163
5164 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5165 (lto_file_read): Reset the members of 'context' every time we read
5166 a toplevel DIE, with special attention to last_param_type.
5167
51682007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5169
5170 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5171 'declaration'. Set the assembler name for non-public functions.
5172
3f8257db 51732007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5174
5175 * lto_read.c (data_in.unexpanded_indexes): New array.
5176 (input_local_var): Added code to read in unexpanded_var_list
5177 indexes for variables. Only read in DECL_CHAIN field for
5178 parameters.
5179 (input_local_vars): Added code to rebuild unexpanded_var_list in
5180 order using unexpanded_indexes.
5181 (input_function): Added code to set DECL_CONTEXT for functions.
5182
51832007-12-13 Doug Kwan <dougkwan@google.com>
5184
5185 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5186 in pointer and reference types.
5187
51882007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5189
5190 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5191 RESULT_DECL.
5192
51932007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5194
5195 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5196 already read the DIE.
5197 (lto_get_body): New function, split out from...
5198 (lto_materialize_function): ...here. Call it.
5199 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5200 determine DECL_EXTERNAL.
5201 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5202 FUNCTION_DECLs when necessary. Use the type of the actual
5203 function definition if we are unable to easily merge types. Ignore
5204 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5205 necessary.
5206
52072007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5208
5209 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5210
52112007-12-12 Bill Maddox <maddox@google.com>
5212
5213 Revert
5214 2007-12-07 Bill Maddox <maddox@google.com>
5215
5216 * lto.c (lto_str_fd_init): New function.
5217 (lto_str_fd_close): New function.
5218 (lto_file_init): Call lto_str_fd_init.
5219 (lto_file_close): Call lto_str_fd_close.
5220 (lto_str_read): New function. Read debug string table.
5221 (lto_str_lookup): New function. Get string for debug
5222 string table offset.
5223 (lto_read_form): Recognize DW_FORM_strp.
5224 (lto_file_read): Invoke lto_str_read.
5225
5226 * lto-elf.c (lto_elf_file_open): Read raw section data
5227 for the .debug_str section, if present.
5228
5229 * lto.h (struct lto_str_fd_struct): New struct.
5230 (struct lto_file_struct): Added new field DEBUG_STR
5231 to hold the file descriptor for the debug string table.
ab20d992 5232
d7f09764
DN
52332007-12-07 Bill Maddox <maddox@google.com>
5234
5235 * lto.c (lto_str_fd_init): New function.
5236 (lto_str_fd_close): New function.
5237 (lto_file_init): Call lto_str_fd_init.
5238 (lto_file_close): Call lto_str_fd_close.
5239 (lto_str_read): New function. Read debug string table.
5240 (lto_str_lookup): New function. Get string for debug
5241 string table offset.
5242 (lto_read_form): Recognize DW_FORM_strp.
5243 (lto_file_read): Invoke lto_str_read.
5244
5245 * lto-elf.c (lto_elf_file_open): Read raw section data
5246 for the .debug_str section, if present.
5247
5248 * lto.h (struct lto_str_fd_struct): New struct.
5249 (struct lto_file_struct): Added new field DEBUG_STR
5250 to hold the file descriptor for the debug string table.
5251
52522007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5253
5254 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5255 Grow the basic_block_info and label_to_block_map vectors if
5256 necessary. Read in the block chain.
5257
52582007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5259
5260 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5261
52622007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5263
5264 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5265
52662007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5267
5268 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5269 (lto_read_body): Don't declare PROP_alias.
5270
52712007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5272
5273 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5274 argument type information.
5275
52762007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5277
5278 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5279 TREE_THIS_VOLATILE if the associated type is a volatile type.
5280 (lto_materialize_function): Remove call to init_ssa_operands.
5281 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5282 variable when reading an SSA_NAME. Do the same when reading a
5283 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5284 (input_cfg): Call init_ssa_operands.
5285 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5286 Move call to init_tree_ssa...
5287 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5288 add_referenced_var on any variables referenced from the body of the
5289 function. Inform the rest of the compiler we are in SSA form and
5290 inform later passes about the current properties.
5291
52922007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5293
5294 * lto.c (lto_materialize_function): Add FIXME.
5295
52962007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5297
5298 * lto-lang.c (enum built_in_attribute): New enum.
5299 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5300 built_in_attributes): New variables.
5301 (def_builtin_1): New function.
5302 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5303
53042007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5305
5306 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5307 DECL_SOURCE_LOCATION for debugging purposes.
5308 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5309 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5310 laying out the decl until later.
5311 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5312 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5313 TREE_ADDRESSABLE.
5314 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5315 operand of an ADDR_EXPR.
5316 * lto-lang.c (enum lto_builtin_type): New enum.
5317 (builtin_type): New typedef.
5318 (builtin_types, string_type_node, const_string_type_node,
5319 wint_type_node, intmax_type_node, uintmax_type_node,
5320 signed_size_type_node): New variables.
5321 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5322 lto_build_c_type_nodes): New functions.
5323 (lto_init): Initialize builtin types.
5324 (lto_set_decl_assembler_name): Let the target machine mangle the
5325 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5326
53272007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5328
5329 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5330 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5331 the type is a constant type. Set the assembler name and inform
5332 the rest of the compiler about the new decl if the decl is not
5333 public.
5334 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5335 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5336 try to read in function bodies for functions that already have bodies.
5337 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5338 equivalency.
5339 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5340 Check for whether we matched a builtin function type before calling
5341 lto_same_type_p on the generated type. Permit cases where the
5342 declaration of an array is unbounded, but the definition is bounded.
5343 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5344 DECL_SIZE_UNIT if necessary.
5345
3f8257db 53462007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5347
ab20d992 5348 * lto-read.c (input_expr_operand): Get types right
d7f09764
DN
5349 for COMPLEX_CST.
5350
3f8257db 53512007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5352
5353 * lto-read.c (make_new_block, input_cfg): Properly set
5354 n_basic_blocks.
ab20d992 5355
d7f09764
DN
53562007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5357
5358 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5359 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5360
53612007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5362
5363 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5364 construct the integer type for bitfields.
5365
3f8257db 53662007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5367
5368 * lto-read.c (data_in.current_node_has_loc): Removed.
5369 (input_line_info): Returns true if node needs line set.
5370 (set_line_info): Always sets line if called.
5371 (clear_line_info): Removed reference to current_node_needs_loc.
5372 (input_expr_operand): Keeps track locally if current node needs a loc.
5373 (input_local_var): Added code to handle DECL_INITIAL for
5374 static local vars. Only set loc if necessary.
ab20d992 5375
d7f09764
DN
53762007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5377
5378 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5379 DECL_CONTEXT.
5380
53812007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5382
5383 * lto.c: Include langhooks.h.
5384 (lto_find_integral_type): Rework logic to handle the case where
5385 got_byte_size is true, but the bitsize requested and that of the
5386 base_type doesn't match.
5387 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5388 asm_name if we are creating a VAR_DECL.
5389 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5390 definition.
5391 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5392 function reference and use the builtin's decl if so. Set the
5393 DECL_CONTEXT of the RESULT_DECL for the function.
5394 * lto-lang.c (registered_builtin_fndecls): New variable.
5395 (lto_getdecls): Return it.
5396 (lto_builtin_function): Chain the new decl onto
5397 registered_builtin_fndecls.
5398
3f8257db 53992007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
ab20d992 5400
d7f09764
DN
5401 * lto-read.c (process_tree_flags, lto_static_init_local):
5402 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5403 (input_line_info, clear_line_info): Fixed new line number code.
5404 (input_expr_operand): Added type to SWITCH_EXPR.
5405 (lto_read_body): Properly initialized data_in.
5406 Clear line info when leaving.
ab20d992 5407
d7f09764
DN
54082007-11-13 Diego Novillo <dnovillo@google.com>
5409
5410 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5411 Initialize ARTIFICIAL.
5412 (lto_read_subroutine_type_subprogram_DIE): Initialize
5413 SAVED_SCOPE.
5414 * lto-read.c (set_line_info): Remove ; from calls to
5415 LINEMAP_POSITION_FOR_COLUMN.
5416
3f8257db 54172007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5418
5419 * lto-read.c (input_type_ref): Renamed from get_type_ref.
ab20d992 5420 (input_expr_operand, input_local_var): Renamed get_type_ref to
d7f09764 5421 input_type_ref.
ab20d992 5422 (input_expr_operand): Get the types correct for
d7f09764 5423 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
ab20d992 5424
d7f09764
DN
54252007-11-13 Doug Kwan <dougkwan@google.com>
5426
5427 * lto-read.c (input_widest_uint_uleb128): New function.
5428 (input_tree_flags, process_tree_flags, input_line_info,
5429 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5430 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5431 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5432 (lto_static_init_local): Add code to assert that lto_flags_type is
5433 wide enough.
5434
54352007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5436
5437 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5438 (lto_read_subroutine_type_subprogram_DIE): Handle
5439 DW_AT_static_link and DW_AT_specification. Return the
5440 specification if present.
5441 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
ab20d992 5442
d7f09764
DN
54432007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5444
5445 * lto-lang.c: Include target.h.
5446 (registered_builtin_types): New variable.
5447 (lto_type_for_mode): Increase number of modes handled.
5448 (lto_builtin_function): Fix argument list and return the decl.
5449 (lto_register_builtin_type): New function.
5450 (lto_init): Initialize target builtins and language-independent
5451 nodes.
5452 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5453
3f8257db 54542007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5455
5456 * lto-read.c (input_expr_operand): Added code to properly handle
5457 index filed. Added new RANGE_EXPR case.
ab20d992 5458
3f8257db 54592007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5460
5461 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5462 (data_in): Added current_node_has_loc field.
5463 (input_line_info, set_line_info, clear_line_info): Added a support
5464 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5465 did not have on on the source side.
5466 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5467 numbers too.
5468
54692007-11-09 Doug Kwan <dougkwan@google.com>
5470
5471 * lto-read.c (input_expr_operand): Change type of operand 2 of
5472 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5473
54742007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5475
5476 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5477 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5478 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5479 the new decl we are creating. Move informing the middle end about
5480 the new decl to...
5481 (lto_main): ...here. Inform the middle end about global variables
5482 after we have read in all the input files.
5483 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5484 variables with internal linkage, so delete the check for internal
5485 linkage. Combine TREE_PUBLIC flags.
5486
54872007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5488
5489 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5490 DW_AT_decl_line.
5491 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5492 builtin specially. Move check for attribute compatibility
5493 earlier.
5494
54952007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5496
5497 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5498 * config-lang.in (gtfiles): Add lto.h and lto.c.
5499 * lto-elf.c: Include ggc.h.
5500 (lto_elf_file_open): Allocate elf_file from GC memory.
5501 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5502 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5503 in GC memory.
5504 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5505 (lto_file_close): Free file from GC memory.
5506 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5507 (lto_read_member_DIE): Fix declaration.
5508 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5509 in GC memory.
5510 (current_lto_file): New variable.
5511 (lto_main): Use it.
5512 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5513 lto_die_cache_entry): Move to...
5514 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5515 declarations accordingly.
5516 (struct lto_file_struct): Declare.
5517 (lto_file_vtable): Use it instead of lto_file.
5518
ab20d992
JJ
55192007-11-06 Alon Dayan <alond@il.ibm.com>
5520 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5521
5522 * lto-read.c (process_flags, lto_static_init_local):
5523 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5524 change global array num_flags_for_code to flags_length_for_code.
5525 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
ab20d992 5526
d7f09764
DN
55272007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5528
5529 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5530 layout functions to compute information about the newly constructed
5531 type.
5532
55332007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5534
5535 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5536 case to use DECL_RESULT if necessary.
5537
3f8257db 55382007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5539
5540 * lto-read.c (input_tree_list): Removed.
5541 (input_tree_flags): Added parameter to force flags no matter what
5542 tree code.
5543 (input_expr_operand): Added parameter to input_tree_flags.
5544 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5545 input_expr_operand rather than input_tree_lists.
5546 (input_local_var): Use input_expr_operand to read attributes
5547 rather then input_tree_list.
5548 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5549
55502007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5551
5552 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5553 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5554 TYPE_DECL for it.
5555 * lto-read.c (lto_read_body): Use correct sizes for calculating
5556 type_decls_offset and types_offset.
5557
55582007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5559
5560 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5561 with GENERIC_NEXT.
5562 * config-lang.in (gtfiles): Add lto-lang.c.
5563 * lto-lang.c: Include gt-lto-lto-lang.h.
5564 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5565 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5566 (lto/lto-read.o): Likewise.
5567
3f8257db 55682007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5569
5570 * lto-read.c (data_in): Added type_decls and current_col fields.
5571 (string_slot): New type to hold canonized file name.
ab20d992 5572 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
d7f09764
DN
5573 input_line_info, set_line_info, clear_line_info): New functions.
5574 (file_name_hash_table): New hash table.
ab20d992 5575 (input_local_var, input_labels, input_local_vars_index,
d7f09764
DN
5576 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5577 (input_uleb128): Changed type of byte var.
5578 (input_expr_operand): Large number of changes to get line numbers
5579 correct. Added TYPE_DECL case.
5580 (input_globals): Added code to get TYPE_DECLs processed.
5581 (input_local_var): Added code to process line numbers and
5582 TREE_CHAIN and DECL_CONTEXT.
5583 (input_function, input_constructor): Added call to
5584 clear_line_number.
5585 (lto_static_init_local): Added code to get line numbers correct.
5586 (lto_read_body): Added code to get TYPE_DECLS read and to change
5587 parameters to the calls above that had their parms reorganized.
5588
d7f09764
DN
55892007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5590
5591 * lto.h (lto_resolve_typedecl_ref): Declare.
5592 * lto.c (lto_resolve_typedecl_ref): New function.
5593
55942007-10-29 Mark Mitchell <mark@codesourcery.com>
5595 Nathan Froyd <froydnj@codesourcery.com>
5596
5597 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5598 DIEs even if we find an abstract origin for this DIE.
5599
56002007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5601
5602 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5603 RESULT_DECL slightly earlier. Only remember the decl for later
5604 if we successfully merge declarations.
5605
3f8257db 56062007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5607
5608 * lto-read.c (input_expr_operand): Give label_values the proper
5609 context and provide switch statements with a default type.
ab20d992 5610
d7f09764
DN
56112007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5612
5613 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5614 * lto.c (lto_materialize_function): ...to here.
5615
56162007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5617
5618 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5619 * lto.c (lto_info_fd_init): Initialize it.
5620 (lto_info_fd_close): Free it.
5621 (lto_materialize_function): New function.
5622 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5623 unmaterialized_fndecls.
5624 (lto_file_read): Read in all the function bodies after we have read
5625 all of the DWARF info.
5626 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5627 reading a function body.
5628
3f8257db 56292007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5630
5631 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5632 semetric with output_tree_flags. Added call to log flags.
5633 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5634 type issues to make everything consistent with flags being
5635 unsigned HOST_WIDE_INTS.
5636 (input_expr_operand): Added call to
5637 recompute_tree_invariant_for_addr_expr.
5638 (input_local_var): Added debugging for tree_chains. Now calls
5639 input_tree_flags.
5640 (input_phi): Made flags unsigned HOST_WIDE_INT.
5641 (input_ssa_names): Now calls input_tree_flags.
5642 (lto_read_body): Now sets cfun.
5643 (lto_read_function_body): Now sets current_function_pointer.
ab20d992 5644
d7f09764
DN
56452007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5646
5647 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5648 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5649 inspecting fields within.
5650 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5651 handle this appropriately.
5652
56532007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5654
5655 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5656 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5657 both DW_AT_abstract_origin and DW_AT_specification.
5658 (lto_read_subroutine_type_subprogram_DIE): Handle
5659 DW_AT_abstract_origin.
5660 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5661 (lto_read_DIE_at_ptr): Define as static to match declaration.
5662 Lookup the PTR in the cache before reading it from the file.
5663 (lto_resolve_var_ref): Adjust accordingly.
5664 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5665 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5666
56672007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5668
5669 * lto.c (lto_read_DIE_at_ptr): New function.
5670 (lto_resolve_var_ref): Use it.
5671 (lto_resolve_fn_ref): Use it.
5672 (lto_resolve_field_ref): Use it.
5673 (lto_read_variable_formal_parameter_constant_DIE): Follow
5674 DW_AT_specification and return the associated decl when appropriate.
5675
56762007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5677
5678 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5679 Implement for scalar integer modes.
5680 (lto_init): Initialize size_type_node.
5681
3f8257db 56822007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5683
5684 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5685 (input_local_var): Add chaining for params.
5686 (input_ssa_names): Add cfun parameter.
5687 (input_function): Remove unnecessary else.
5688
56892007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5690
5691 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5692 (lto_resolve_var_ref): Use proper types.
5693 (lto_resolve_fn_ref): Likewise.
5694 (lto_resolve_field_ref): Likewise.
5695
56962007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5697
5698 * lto-read.c (input_expr_operand): Remove case.
5699
57002007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5701
5702 * lto.c (lto_read_only_for_child_DIEs): New function.
5703 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5704 * lto-elf.c (lto_elf_map_lto_section): Remove.
5705 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5706 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5707 SSA_NAME. Add missing case for mechanical codes.
5708 (input_cfg): Use basic_block_info_for_function instead of
5709 basic_block_info.
5710
3f8257db 57112007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5712
5713 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5714 (input_list): Renamed input_tree_list and modified to follow same
5715 protocol as lto-function-out.c:output_tree_list.
5716 (input_expr_operand): Make asm operands use input_tree_list.
5717 (input_local_var): Now uses input_tree_list.
5718 (lto_read_body): Change placement for setting context of debug_labels.
ab20d992 5719
3f8257db 57202007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5721
5722 * lto-read.c (input_real): Output debugging in proper order.
5723 (input_integer): Compute bit lengths properly.
5724 (input_list): Clean up declaration.
5725 (input_expr_operand): Change calls to input_real to match fix.
5726 Make reading of LTO_bit_field_ref1 match output.
5727 (input_local_var): Make reading of attributes match what is being
5728 written.
5729 (dump_debug_stream): Also print char in hex.
5730 (debug_out_fun): Fix signed unsigned mismatch.
ab20d992 5731
d7f09764
DN
57322007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5733
5734 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5735 DW_AT_GNU_vector specially, as they are not contiguous with the
5736 specified set of attribute names. Use class_mask to check for
5737 errors at the end of the function
5738 (lto_resolve_var_ref): Read the DIE if it is not cached.
5739 (lto_resolve_fn_ref): Likewise.
5740 (lto_resolve_field_ref): Likewise.
5741
57422007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5743
5744 * lto.c: Include dwarf2out.h.
5745 (lto_cache_store_DIE): Assert that we never change the value.
5746 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5747 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5748 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5749 sensible type instead.
5750 (lto_read_structure_union_class_type_DIE): Store the newly
5751 created type prior to reading the members of the structure to
5752 avoid infinite recursion. Avoid computing types and alignments
5753 for structures whose sizes are unknown.
5754 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5755 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5756 DW_AT_const_value, and DW_AT_specification.
5757 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5758 Return early if we have already constructed the function type.
5759 (lto_read_typedef_DIE): Check to see if the type has been cached
5760 already. Cache the type before reading any children.
5761 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5762 (lto_read_DIE): Unset context->skip_non_parameters around reading
5763 the DIE.
5764 (lto_resolve_fn_ref): Delete trailing whitespace.
5765
3f8257db 57662007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5767
5768 * lto-read.c (input_expr_operand): Added type for STRING_CST.
ab20d992 5769
d7f09764
DN
57702007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5771
5772 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5773
57742007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5775
5776 * lto-lang.c (signed_and_unsigned_types): New variable.
5777 (lto_type_for_size): Consult signed_and_unsigned_types to find
5778 an approprite type, creating it if necessary.
5779 (lto_set_decl_assembler_name): Add actual method body.
5780
57812007-09-06 Jim Blandy <jimb@codesourcery.com>
5782
5783 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5784 can't find a var init for this variable, leave its DECL_INITIAL.
5785 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5786 lto_elf_map_fn_body.
5787 (lto_map_lto_section): New function.
5788 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5789 bodies, and lto_elf_map_optional_lto_section for variable
5790 initializers.
5791 (lto_elf_find_section_data): Quietly return NULL if the section is
5792 missing.
5793 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5794
5795 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5796
5797 * lto-read.c (lto_read_body): Doc fix.
5798
3f8257db 57992007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5800
5801 * lto-read.c (fun_in): Renamed to data_in.
5802 (input_expr_operand, input_local_var, input_string_internal,
ab20d992 5803 input_string, input_real, input_list, get_label_decl,
d7f09764 5804 get_type_ref, input_expr_operand, input_globals, input_labels,
ab20d992 5805 input_local_vars_index, input_local_var, input_local_vars,
d7f09764
DN
5806 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5807 (input_constructor): New function.
5808 (lto_read_function_body): Renamed to lto_read_body and generalized
5809 to handle both functions and constructors.
5810 (lto_read_function_body, lto_read_var_init): New function.
ab20d992 5811
3f8257db 58122007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5813
5814 * lto-read.c (input_expr_operand): Assert that there really is a
5815 FUNCTION_DECL.
5816 (input_globals): Removed checks on 0 section.
ab20d992 5817
3f8257db 58182007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5819
5820 * lto-read.c (fun_in): Added local_decls_index and
ab20d992 5821 local_decls_index_d.
d7f09764
DN
5822 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5823 (input_globals): Enabled code to handle FIELD_DECLs.
5824 (input_local_vars_index, input_local_vars): New function.
5825 (input_local_var): Changed to allow locals to be input randomly.
5826 (lto_read_function_body): Added code to input the
5827 local_decls_index and to free various structures.
ab20d992 5828
d7f09764
DN
58292007-08-17 Jim Blandy <jimb@codesourcery.com>
5830
5831 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5832 ATTRIBUTE_UNUSED from 'die' formal.
5833
5834 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5835 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5836 (input_list): Fix type of 'tag'.
5837 (input_expr_operand): Fix type of 'tag' argument. Update
5838 declaration. Fix type of 'ctag'. Add default case to switch,
5839 since the type of the switched value is now an enum.
5840 (input_local_vars): Fix type of 'tag'.
5841 (input_bb): Fix type of 'tag' argument.
5842 (input_function): Fix type of 'tag' argument.
5843
58442007-08-16 Jim Blandy <jimb@codesourcery.com>
5845
5846 * lto.c (lto_read_member_DIE): Record the tree we create in
5847 fd->die_cache. (Our 'die' argument is no longer unused.)
5848 (lto_resolve_field_ref): New function.
5849 * lto.h (lto_resolve_field_ref): New declaration.
5850
58512007-08-15 Jim Blandy <jimb@codesourcery.com>
5852
5853 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5854
58552007-08-07 Jim Blandy <jimb@codesourcery.com>
5856
5857 * lto.c (lto_read_form): Complete attr_classes table.
5858 (DWARF2_form_data): Doc fix.
ab20d992 5859
d7f09764
DN
58602007-08-05 Mark Mitchell <mark@codesourcery.com>
5861
5862 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5863 and unmap_var_init.
5864 (lto_read_var_init): Declare.
5865 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5866 interface for reading variable initializers.
5867 * lto-elf.c (lto_elf_read_var_init): Remove.
5868 (lto_elf_file_vtable): Update initializer.
5869 (lto_elf_read_var_init): Add comment about unused-ness.
5870 * lto-read.c (lto_read_var_init): New.
5871
5872 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5873
3f8257db 58742007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5875
5876 * lto-read.c (lto_read_function_body): Moved declaration of fn
5877 outside of ifdef.
ab20d992 5878
3f8257db 58792007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5880
5881 * lto-read.c (input_uleb128, input_string_internal, input_real,
5882 input_integer, input_record_start, input_list, get_type_ref,
5883 input_flags, input_expr_operand, input_expr_operand,
5884 input_expr_operand, input_local_vars, input_cfg, input_phi,
5885 input_ssa_names, input_bb, input_function): Added semicolons.
5886
ab20d992 5887
3f8257db 58882007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5889
5890 * lto-read.c (input_globals): Remove debugging.
5891 (input_function): Set DECL_ARGUMENTS.
5892
3f8257db 58932007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5894
5895 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5896 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5897 (input_phi): Made work with operands other than SSA_NAMES and
5898 fixed processing of flags.
5899 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5900 (input_flags): New function.
5901 * lto-lang.c (lto_init): Changed state of in_lto_p.
ab20d992
JJ
5902
5903
d7f09764
DN
59042007-07-24 Mark Mitchell <mark@codesourcery.com>
5905
5906 * lto-tree.h (lto_varargs_cookie): Remove.
5907 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5908 skip_non_parameters, skip_parameters.
5909 (lto_varargs_cookie): Remove.
5910 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5911 parameter types.
5912 (lto_read_abbrev): New function.
5913 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5914 child DIEs.
5915 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5916 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5917 (lto_file_read): Initialize new context fields.
5918 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5919 (lto_unsigned_type): Remove.
5920 (lto_signed_type): Likewise.
5921 (lto_signed_or_unsigned_type): Likewise.
5922 (lto_init): Do not create lto_varargs_cookie.
5923 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5924 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5925 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5926
59272007-07-19 Jan Hubicka <jh@suse.cz>
5928
5929 * lto-read.c (lto_read_function_body): Produce empty scope block
5930 to avoid crash.
5931
59322007-07-18 Mark Mitchell <mark@codesourcery.com>
5933
5934 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5935 process local variables.
5936 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5937
3f8257db 59382007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5939
5940 * lto-read.c (input_list, input_expr_operand): Added struct
5941 function parameter.
5942 (init_cfg, finalize_cfg): Removed function.
5943 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5944 (input_labels, input_local_vars): Now takes input_block parameter rather than
5945 synthsyzing it.
5946 (input_cfg, input_phi, input_ssa_names): New functions.
5947 (input_bb): Now passes in input_blocks. Does not construct cfg
5948 and processes the list of phi functions.
5949 (input_function): Now builds both the cfg and ssa_names table.
5950 (lto_read_function_body): Processes new header fields to construct
5951 streams for the ssa_names and cfg and their debugging.
ab20d992
JJ
5952 * lto-lang.c (lto_init): Set in_lto_p.
5953
5954
d7f09764
DN
59552007-06-28 Mark Mitchell <mark@codesourcery.com>
5956
5957 * lto.h (lto_file_vtable): Add read_var_init.
5958 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5959 initializers.
5960 (lto_main): Remove bogus asserts.
5961 * lto-elf.c (tm.h): Include it.
5962 (libiberty.y): Likewise.
5963 (lto_elf_file): Add strtab and symtab. Rename
5964 string_table_section_index to sec_strtab.
5965 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5966 (lto_elf_get_shdr): New function.
5967 (lto_elf_free_shdr): Likewise.
5968 (lto_elf_find_section_data): Use them.
5969 (lto_elf_read_symtab): New function.
5970 (lto_elf_lookup_sym): Likewise.
5971 (lto_elf_free_sym): Likewise.
5972 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5973 (lto_elf_built_init): New function.
5974 (lto_elf_read_var_init): Likewise.
5975 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5976
3f8257db 59772007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5978
5979 * lto-read (make_new_block): Initialize the stmt_list.
5980 (lto_static_init_local): Add debugging for missing codes.
ab20d992 5981
d7f09764
DN
59822007-06-26 Mark Mitchell <mark@codesourcery.com>
5983
5984 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
ab20d992 5985 unprototyped functions.
d7f09764
DN
5986
59872007-06-23 Mark Mitchell <mark@codesourcery.com>
5988
5989 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5990 Handle DW_AT_MIPS_linkage_name.
5991 (lto_read_subroutine_type_subprogram): Likewise. Correct
5992 compilation errors.
5993 (lto_main): Remove incorrect assertions.
5994 * lto-symbtab.c: Build function types out of TREE_LISTs.
5995
5996 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
ab20d992 5997
d7f09764 5998 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
ab20d992 5999
3f8257db 60002007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6001
ab20d992 6002 * lto-tree.h (lang_decl, lang_type, language_function): Added
d7f09764 6003 dummy since ggc does not like empty structs.
ab20d992
JJ
6004 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6005 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
d7f09764
DN
6006 expr->common to expr->base.
6007 (make_new_block): Moved stmt_list to proper place.
6008
ab20d992 60092007-03-14 Robert Kennedy <jimbob@google.com>
d7f09764
DN
6010
6011 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6012 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6013 assembler name from DWARF.
6014 * lto-lang.c (lto_set_decl_assembler_name) New function.
6015
60162006-09-10 Mark Mitchell <mark@codesourcery.com>
6017
6018 * lto.h (lto_file_vtable): New structure.
6019 (lto_file): Add vtable pointer.
6020 (lto_file_init): Add vtable paramter.
6021 (lto_read_function_body): New function.
6022 (lto_symtab_merge_fn): New function.
6023 * lto.c (lto_file_init): Add vtable parameter.
6024 (lto_read_form): Fill in entries for DW_AT_prototyped,
6025 DW_AT_frame_base.
6026 (lto_read_subroutine_type_subprogram_DIE): New function.
6027 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6028 DW_TAG_subprogram.
6029 * lto-elf.c (lto_elf_vile_vtable): New variable.
6030 (lto_elf_file_open): Pass it to lto_file_init.
6031 (lto_elf_map_fn_body): New function.
6032 (lto_elf_unmap_fn_body): Likewise.
6033 * lto-read.c: New file.
6034 * lto-symtab.c (lto_symtab_merge_fn): New function.
6035 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6036 tree_rest_of_compilation.
6037 * Make-lang.in (LTO_OBJS): Add lto-read.o
6038 (lto-read.o): New target.
6039
60402006-09-03 Mark Mitchell <mark@codesourcery.com>
6041
6042 * lto.c (<inttypes.h>): Don't include it.
6043 (lto_context): Don't typedef it.
6044 (lto_resolve_reference): New function.
6045 (lto_read_form): Use it.
6046 (lto_resolve_type_ref): New function.
6047 (lto_resolve_var_ref): Likewise.
6048 (lto_resolve_fn_ref): Likewise.
6049 * lto.h (<inttypes.h>): Include it.
6050 (lto_context): New type.
6051 (lto_ref): New structure.
6052 (lto_resolve_type_ref): Declare.
6053 (lto_resolve_var_ref): Likewise.
6054 (lto_resolve_fn_ref): Likewise.
6055
60562006-08-18 Mark Mitchell <mark@codesourcery.com>
6057
6058 * lang-specs.h: New file.
6059
60602006-08-14 Mark Mitchell <mark@codesourcery.com>
6061
6062 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6063 (lto_info_fd_close): Deallocate it.
6064 (lto_die_cache_entry): New structure.
6065 (lto_cache_hash): New function.
6066 (lto_cache_eq): Likewise.
6067 (lto_cache_store_DIE): Likewise.
6068 (lto_cache_lookup_DIE): Likewise.
6069 (lto_read_referenced_type_DIE): Use the cache.
6070 (lto_read_pointer_type_DIE): Robustify.
6071 (lto_read_DIE): Use the cache.
6072 * lto.h (hashtab.h): Include.
6073 (lto_info_fd): Add DIE cache.
6074 * Make-lang.in (LTO_H): New variable.
6075 (lto/lto-lang.o): Use LTO_H.
6076 (lto/lto-elf.o): Likewise.
6077 (lto/lto-symtab.o): Likewise.
6078
60792006-07-09 Mark Mitchell <mark@codesourcery.com>
6080
6081 * lto.c (lto_abi_mismatch_error): New function.
6082 (lto_abbrev_read): Initialize num_abbrevs.
6083 (lto_read_form): Specify allowed form classes for
6084 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6085 (lto_read_variable_formal_parameter_constant_DIE): Handle
6086 DW_AT_declaration. Call lto_symtab_merge_var.
6087 (lto_read_pointer_type_DIE): New function.
6088 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6089 not creat TYPE_DECLs for types that already have them.
6090 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6091 (lto_set_cu_context): Make cu_start point to the header, not the
6092 first DIE.
6093 (lto_file_read): Adjust for change to lto_set_cu_context.
6094 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6095 (lto/lto-symtab.o): New rule.
6096 * lto-tree.h (lang_identifier): Add decl field.
6097 (LANG_IDENTIFIER_CAST): New macro.
6098 (LTO_IDENTIFIER_DECL): Likewise.
6099 (lto_symtab_merge_var): Declare.
6100 * lto-symtab.c: New file.
6101
61022006-07-02 Daniel Berlin <dberlin@dberlin.org>
6103
6104 * lto.c (lto_context): Add current_cu and info_fd members.
6105 (DWARF2_CompUnit): New structure.
6106 (lto_read_DIE): Take lto_info_fd *.
6107 (lto_read_child_DIEs): Ditto.
6108 (lto_file_corrupt_error): Constify argument.
6109 (lto_set_cu_context): New function
6110 (lto_info_fd_init): Ditto.
6111 (lto_info_fd_close): Ditto.
6112 (lto_file_init): Use lto_info_fd_init.
6113 (lto_file_close): Use lto_info_fd_close.
6114 (lto_read_initial_length): Pass in pointer to header size.
6115 (lto_read_comp_unit_header): Correct cu_length to
6116 real length from beginning of header. Take lto_info_fd * as
6117 argument.
6118 (find_cu_for_offset): New function.
6119 (lto_read_form): Change first argument to lto_info_fd *.
6120 Add FORM_CONTEXT argument.
6121 Handle DW_FORM_ref_addr.
ab20d992 6122 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
d7f09764
DN
6123 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6124 Swap contexts if necessary for form.
6125 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6126 lto_file_corrupt_error.
6127 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6128 (lto_read_referenced_type_DIE): Change first argument to
6129 lto_info_fd *. Access lto_fd fields through base pointer.
6130 (lto_read_compile_unit_DIE): Change first argument to an
6131 lto_info_fd *.
6132 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6133 (lto_read_base_type_DIE): Ditto.
6134 (lto_read_child_DIEs): Ditto.
6135 (lto_read_DIE): Ditto. Change type of function pointer.
6136 (lto_info_read): New function.
6137 (lto_set_cu_context): Ditto.
6138 (lto_file_read): Use lto_info_read, walk resulting CU's
6139 (lto_main): Update for lto_info_fd change.
6140 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6141 necessary.
6142 * lto.h (DWARF2_CompUnit): New structure.
6143 (lto_info_fd): Ditto.
6144 (lto_file): Change debug_info to be an lto_info_fd.
ab20d992 6145
d7f09764
DN
61462006-06-25 Mark Mitchell <mark@codesourcery.com>
6147
6148 * lto.c (toplev.h): Include it.
6149 (dwarf2.h): Likewise.
6150 (tree.h): Likewise.
6151 (tm.h): Likewise.
6152 (cgraph.h): Likewise.
6153 (ggc.h): Likewise.
6154 (inttypes.h): Likewise.
6155 (DWARF2_attr): New type.
6156 (DWARF2_abbrev): Likewise.
6157 (DWARF2_class): Likewise.
6158 (DWARF2_form_data): Likewise.
6159 (lto_context): Likewise.
6160 (lto_fd_init): New function.
6161 (lto_abbrev_fd_init): Likewise.
6162 (lto_abbrev_fd_close): Likewise.
6163 (lto_file_init): Use them.
6164 (lto_file_close): New function.
6165 (lto_file_corrupt_error): Likewise.
6166 (LTO_CHECK_INT_VAL): New macro.
6167 (lto_check_size_t_val): New function.
6168 (lto_check_int_val): Likewise.
6169 (LTO_READ_TYPE): New macro.
6170 (lto_read_ubyte): New function.
6171 (lto_read_uhalf): Likewise.
6172 (lto_read_uword): Likewise.
6173 (lto_read_uleb128): Likewise.
6174 (lto_read_initial_length): Likewise.
6175 (lto_abbrev_read_attrs): Likewise.
6176 (lto_abbrev_read): Likewise.
6177 (lto_abbrev_lookup): Likewise.
6178 (lto_read_section_offset): Likewise.
6179 (lto_read_comp_unit_header): Likewise.
6180 (lto_read_form): Likewise.
6181 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6182 (LTO_BEGIN_READ_ATTRS): Likewise.
6183 (LTO_END_READ_ATTRS): Likewise.
6184 (lto_unsupported_attr_error): New function.
6185 (lto_get_identifier): Likewise.
6186 (lto_read_referenced_type_DIE): Likewise.
6187 (lto_read_compile_unit_DIE): Likewise.
6188 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6189 (lto_read_base_type_DIE): Likewise.
6190 (lto_read_DIE): Likewise.
6191 (lto_read_child_DIEs): Likewise.
6192 (lto_file_read): Read DIEs.
6193 (lto_main): Ask middle end to emit entities.
6194 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6195 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6196 (lto_elf_file_close): Likewise.
6197 * lto.h (lto_file): Declare.
6198 (DWARF2_abbrev): Likewise.
6199 (lto_fd): New type.
6200 (lto_abbrev_fd): Likewise.
6201 (lto_file): Use new types.
6202 (lto_file_close): Declare.
6203 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
ab20d992 6204
d7f09764
DN
62052006-06-18 Mark Mitchell <mark@codesourcery.com>
6206
6207 * lto.h: New file.
6208 * lto.c: New file.
6209 * lto-elf.c: New file.
6210 * lto-lang.c (flags.h): Include it.
6211 (lto.h): Likewise.
6212 (lto_init): New function.
6213 (lto_write_globals): Remove.
ab20d992 6214 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
d7f09764
DN
6215 (LANG_HOOKS_INIT): Define.
6216 (LANG_HOOKS_PARSE_FILE): Likewise.
6217 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6218 (LTO_EXE): Link with libelf.
6219 (lto/lto-lang.o): Update dependencies.
6220 (lto/lto.o): New target.
6221 (lto/lto-elf.o): Likewise.
6222
62232006-06-12 Mark Mitchell <mark@codesourcery.com>
6224
6225 * config-lang.in: New file.
6226 * Make-lang.in: Likewise.
6227 * lto-tree.h: Likewise.
6228 * lto-lang.c: Likewise.
818ab71a 6229\f
a5544970 6230Copyright (C) 2006-2019 Free Software Foundation, Inc.
d7f09764 6231
818ab71a
JJ
6232Copying and distribution of this file, with or without modification,
6233are permitted in any medium without royalty provided the copyright
6234notice and this notice are preserved.
This page took 5.470982 seconds and 5 git commands to generate.