]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Apply mechanical replacement (generated patch).
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
028d4092
ML
12019-11-12 Martin Liska <mliska@suse.cz>
2
3 * lto-partition.c (lto_balanced_map): Replace old parameter syntax
4 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
5 macro.
6 * lto.c (do_whole_program_analysis): Likewise.
7
fe1d1a8b
ML
82019-11-11 Martin Liska <mliska@suse.cz>
9
10 * Make-lang.in: Relax dependency of lto-dump.o to
11 LTO_OBJS which will allow faster linking (mainly with LTO).
12
c38ee9a2
JH
132019-11-07 Jan Hubicka <hubicka@ucw.cz>
14
15 * lto.c (do_whole_program_analysis): Call lto_free_file_name_hash.
16
c9ef0409
JH
172019-11-02 Jan Hubicka <hubicka@ucw.cz>
18
19 * lto-common.c (read_cgraph_and_symbols): Improve -Q reporting.
20 * lto.c (lto_wpa_write_files): Likewise.
21
6773658a
JJ
222019-10-31 Jakub Jelinek <jakub@redhat.com>
23
24 PR middle-end/92231
25 * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
26 on *node that is not FUNCTION_DECL.
27
3c56d8d8
ML
282019-10-30 Martin Liska <mliska@suse.cz>
29
30 PR lto/91393
31 PR lto/88220
32 * lto-common.c (lto_file_finalize): Use lto_get_summary_section_data.
33 (get_section_data): Add order argument.
34
3518424d
ML
352019-10-29 Martin Liska <mliska@suse.cz>
36
37 * lto.c (do_whole_program_analysis): Pass
38 title as dump_memory_report argument.
39
c5281d50
ML
402019-10-29 Martin Liska <mliska@suse.cz>
41
42 * lto.c (do_whole_program_analysis): Remove argument.
43
f658ad30
JH
442019-10-24 Jan Hubicka <hubicka@ucw.cz>
45
46 * lto-partition.c (add_symbol_to_partition_1): Update.
47 (undo_parittion): Update.
48
ebad2eee
JH
492019-10-23 Jan Hubicka <hubicka@ucw.cz>
50
51 * lto-common.c (lto_file_finalize): Add order attribute.
52 (lto_create_files_from_ids): Pass order.
53 (lto_file_read): UPdate call of lto_create_files_from_ids.
54
7cc47709
JH
552019-10-12 Jan Hubicka <hubicka@ucw.cz>
56
57 * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
58 summary streaming.
59
f8cf94cd
JH
602019-10-12 Jan Hubicka <hubicka@ucw.cz>
61
62 * lto.c (lto_wpa_write_files): Do not update bodies of clones.
63
e5207f1a
JH
642019-10-11 Jan Hubicka <hubicka@ucw.cz>
65
66 * lto.c (lto_wpa_write_files): Call ggc_trim.
67
1fcf52a6
JH
682019-10-11 Jan Hubicka <hubicka@ucw.cz>
69
70 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
71
9142736e
RB
722019-10-10 Richard Biener <rguenther@suse.de>
73
74 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
75
0fa00483
JM
762019-10-04 Joseph Myers <joseph@codesourcery.com>
77
78 * lto-lang.c (flag_isoc2x): New variable.
79
a3d09469
RB
802019-09-18 Richard Biener <rguenther@suse.de>
81
82 PR lto/91763
83 * lto.c (lto_materialize_function): Initialize EH by looking
84 at the function personality and flag_exceptions setting.
85
df375b03
JJ
862019-08-23 Jakub Jelinek <jakub@redhat.com>
87
88 PR middle-end/91283
89 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
90 flag_excess_precision_cmdline. Remove comment.
91
4d732405
RS
922019-08-13 Richard Sandiford <richard.sandiford@arm.com>
93
94 PR middle-end/91421
95 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
96 instead of DECL_FUNCTION_CODE.
97 * lto-symtab.c (lto_symtab_merge_p): Likewise.
98
6e42c90c
BE
992019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
100
101 * Make-lang.in (lto.install-common): Remove unnecessary slash
102 between $(DESTDIR) and $(bindir).
103
cb50701e
ML
1042019-07-25 Martin Liska <mliska@suse.cz>
105
106 * lto-common.c (compare_tree_sccs_1): Use new macros
107 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
108
34e64622
GB
1092019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
110
111 * lang.opt (flag_dump_callgraph): New flag.
112 * lto-dump.c (dump_symtab_graphviz): New function.
113 (dump_tool_help): New option.
114 (lto_main): Handle graphviz dumping.
115
b01659aa
JH
1162019-07-18 Jan Hubicka <hubicka@ucw.cz>
117
118 * lto-common.c (gimple_register_canonical_type_1): Do not look for
119 non-ODR conflicts of types in anonymous namespaces.
120 (unify_scc): Do not merge anonymous namespace types.
121
99b1c316
MS
1222019-07-09 Martin Sebor <msebor@redhat.com>
123
124 PR c++/61339
125 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
126 to struct and others to class.
127 (mentions_vars_p): Same.
128 (register_resolution): Same.
129 (lto_register_var_decl_in_symtab): Same.
130 (lto_register_function_decl_in_symtab): Same.
131 (cmp_tree): Same.
132 (lto_read_decls): Same.
133
6c1dae73
MS
1342019-07-09 Martin Sebor <msebor@redhat.com>
135
136 PR c++/61339
137 * lto-dump.c: Change class-key from class to struct and vice versa
138 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
139
70980ea2
ML
1402019-07-04 Martin Liska <mliska@suse.cz>
141
142 PR lto/91078
143 * lto-common.c (lto_file_finalize): Use memcpy to set
144 file_data->lto_section_header.
145
88614dfa
ML
1462019-07-03 Martin Liska <mliska@suse.cz>
147
148 * lto-common.c: Read LTO section and verify header.
149
606a9a8c
JH
1502019-06-27 Jan Hubicka <jh@suse.cz>
151
152 * lto-common.c (lto_register_canonical_types_for_odr_types):
153 Copy CXX_ODR_P from the main variant.
154
85693eef
JH
1552019-06-27 Jan Hubicka <jh@suse.cz>
156
157 * lto-common.c: tree-pretty-print.h
158 (type_streaming_finished): New static var.
159 (gimple_register_canonical_type_1): Return updated hash; handle ODR
160 types.
161 (iterative_hash_canonical_type): Update use of
162 gimple_register_canonical_type_1.
163
c2f7a665
ML
1642019-06-27 Martin Liska <mliska@suse.cz>
165
166 * lto-dump.c (struct symbol_entry): Add default dtor.
167 (struct variable_entry): Likewise.
168 (struct function_entry): Likewise.
169 (dump_list_functions): Release memory.
170 (dump_list_variables): Likewise.
171
ab20d992
JJ
1722019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
173
174 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
175 format of "__intN" types for SIZE_TYPE.
176
f4af4019
JH
1772019-06-24 Jan Hubicka <jh@suse.cz>
178
179 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
180 compare STRING_FLAG only for arrays and integers.
181
0ecf545c
MS
1822019-06-05 Martin Sebor <msebor@redhat.com>
183
184 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
185
a9c697b8
MS
1862019-05-16 Martin Sebor <msebor@redhat.com>
187
ab20d992
JJ
188 * lto-dump.c (lto_main): Same.
189 * lto.c (stream_out): Same.
a9c697b8 190
38613b9b
ML
1912019-05-10 Martin Liska <mliska@suse.cz>
192
193 * Make-lang.in: Use program_transform_name for lto-dump.
194 * config-lang.in: Do not mark lto-dump compiler as we don't
195 want to have it installed at
196 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
197
03de2955
RO
1982019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
199
200 * lto-common.c (lto_file_read): Print section->start as int64_t,
201 section->len as uint64_t.
202 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
203
ee7a003f
ML
2042019-05-06 Martin Liska <mliska@suse.cz>
205
206 * lto-common.c: Update coding style.
207 * lto.c (materialize_cgraph): Likewise.
208
66d62d9f
HK
2092019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
210 Martin Liska <mliska@suse.cz>
211
212 * Make-lang.in: Add lto_dump-related definition.
213 * config-lang.in: Likewise.
214 * lang.opt: Add new language LTODump and options related
215 to LTO dump tool.
216 * lto-common.c (lto_read_decls): Support type statistics dump.
217 (lto_file_read): Likewise for object files.
218 * lto-dump.c: New file.
219 * lto-lang.c (lto_option_lang_mask): Move from ..
220 * lto.c (lto_option_lang_mask): .. here.
221 * lto.h (lto_option_lang_mask): New declaration.
222
a79420f9
ML
2232019-05-06 Martin Liska <mliska@suse.cz>
224 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
225
226 * Make-lang.in: Add lto-common.o.
227 * config-lang.in: Likewise for gtfiles.
228 * lto-common.c: New file.
229 * lto-common.h: New file.
230 * lto-lang.c: Include lto-common.h.
231 * lto.c: Move most of the functionality
232 into lto-common.c file.
233
0c7f51e4
JH
2342019-04-12 Jan Hubicka <hubicka@ucw.cz>
235
236 * lto.c (do_stream_out): rename to ...
237 (stream_out): ... this one; move original code to ...
238 (stream_out_partitions_1, stream_out_partitions): ... these new
239 functions.
240 (lto_wpa_write_files): Honnor lto_parallelism
241
303389b1
ML
2422019-03-26 Martin Liska <mliska@suse.cz>
243
244 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 245 wrapping.
303389b1 246
a3f9f006
ML
2472019-03-11 Martin Liska <mliska@suse.cz>
248
249 * lto-lang.c (lto_post_options): Wrap an option name
250 in a string format message and fix GNU coding style.
251 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
252
04e5c73d
JJ
2532019-03-09 Jakub Jelinek <jakub@redhat.com>
254
255 PR target/79645
256 * lang.opt: Terminate description text with a dot.
257
80f52b40
JM
2582019-02-28 Jason Merrill <jason@redhat.com>
259
260 PR c++/88049 - ICE with undefined destructor and anon namespace.
261 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
262 for a type in an anonymous namespace.
263
67914693
SL
2642019-01-09 Sandra Loosemore <sandra@codesourcery.com>
265
266 PR other/16615
267
268 * lto-partition.c: Mechanically replace "can not" with "cannot".
269 * lto-symtab.c: Likewise.
270 * lto.c: Likewise.
271
a5544970
JJ
2722019-01-01 Jakub Jelinek <jakub@redhat.com>
273
274 Update copyright years.
275
d840d7a2
JH
2762018-12-24 Jan Hubicka <hubicka@ucw.cz>
277
278 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
279 for method whose basetype was already reported.
280
ed1b53a0
MP
2812018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
282
283 Minimize clone counter memory usage in LTO.
284 * lto-partition.c (privatize_symbol_name_1): Keep track of
285 non-unique symbol counters in the lto_clone_numbers hash
286 map.
287 (lto_promote_cross_file_statics): Allocate and free the
288 lto_clone_numbers hash map.
289 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
290 map.
291
ad42aa96
JH
2922018-11-28 Jan Hubicka <jh@suse.cz>
293
294 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
295
d7dce787
JH
2962018-11-22 Jan Hubicka <jh@suse.cz>
297
298 * lto.c (cmp_type_location): Remove.
299 (lto_read_decls): Do not allocate odr_types.
300
f615cb16
ML
3012018-11-19 Martin Liska <mliska@suse.cz>
302
303 PR lto/88077
304 * lto-symtab.c (lto_symtab_merge): Transform the
305 condition before r256989.
306
12eac232
ML
3072018-11-16 Martin Liska <mliska@suse.cz>
308
309 PR lto/88004
310 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
311 lto_symtab_symbol_p as it does checking of transparent alias.
312 These needs to be also merged in the function.
313
7958186b
MP
3142018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
315
316 * lto-partition.c (privatize_symbol_name_1): Use
317 clone_function_name_numbered.
318
abb967da
JH
3192018-10-26 Jan Hubicka <jh@suse.cz>
320
ab20d992 321 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
abb967da 322
033eb567
DM
3232018-10-17 David Malcolm <dmalcolm@redhat.com>
324
325 * Make-lang.in (selftest-lto): New.
326
9ed6dbee
ML
3272018-08-29 Martin Liska <mliska@suse.cz>
328
329 PR bootstrap/87130
330 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
331 to behavior before r263887.
332
3d78e008
ML
3332018-08-27 Martin Liska <mliska@suse.cz>
334
335 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
336 fndecl_built_in_p and remove check for FUNCTION_DECL if
337 possible.
3d78e008
ML
338 * lto-symtab.c (lto_symtab_merge_p): Likewise.
339 (lto_symtab_merge_decls_1): Likewise.
340 (lto_symtab_merge_symbols): Likewise.
341 * lto.c (lto_maybe_register_decl): Likewise.
342 (read_cgraph_and_symbols): Likewise.
343
efd9eb29
TV
3442018-08-21 Tom de Vries <tdevries@suse.de>
345
ab20d992 346 * lto.c (lto_main): Call debuginfo_early_start and
efd9eb29
TV
347 debuginfo_early_stop.
348
00abf86c
MS
3492018-07-20 Martin Sebor <msebor@redhat.com>
350
351 PR middle-end/82063
352 * lto-lang.c (lto_handle_option): Change function argument
353 to HOST_WIDE_INT.
354
efe0e6cd
RB
3552018-07-20 Richard Biener <rguenther@suse.de>
356
357 PR debug/86585
358 * lto.c (unify_scc): Before we throw away an SCC see if we
359 can amend prevailing single-entry SCC with debug refs.
360
814f3331
JH
3612018-07-13 Jan Hubicka <hubicka@ucw.cz>
362
363 * lto.c (do_stream_out): Add PART parameter; open dump file.
364 (stream_out): Add PART parameter; pass it to do_stream_out.
365 (lto_wpa_write_files): Update call of stream_out.
366
c518c102
ML
3672018-07-04 Martin Liska <mliska@suse.cz>
368
369 PR middle-end/66240
370 PR target/45996
371 PR c/84100
372 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
373 instead of memcmp.
374
b54006ae
ML
3752018-06-20 Martin Liska <mliska@suse.cz>
376
377 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 378 FIXME comment.
b54006ae 379
56f62793
ML
3802018-06-19 Martin Liska <mliska@suse.cz>
381
382 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 383 of get_create.
56f62793
ML
384 (undo_partition): Likewise.
385 (lto_balanced_map): Likewise.
386
1724941e
ML
3872018-06-19 Martin Liska <mliska@suse.cz>
388
389 * config-lang.in: Remove stagestuff.
390
29a50dfb
JH
3912018-06-08 Jan Hubicka <hubicka@ucw.cz>
392
393 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
394 New global vars.
395 (lto_register_dumps): New hook.
396 (LANG_HOOKS_REGISTER_DUMPS): New.
397 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
398 * lto-symtab.c: Include lto.h; dump into dump_file instead of
399 symtab->dump_file.
400 (lto_symtab_merge_decls): Initialize dump file.
401 * lto.c (read_cgraph_and_symbols): Initialize dump file.
402 (do_whole_program_analysis): Likewise.
403
74644756
ML
4042018-06-08 Martin Liska <mliska@suse.cz>
405
406 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
407 instead of summary_uid.
408
99353fcf
ML
4092018-06-08 Martin Liska <mliska@suse.cz>
410
411 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
412 of get.
413 (undo_partition): Likewise.
414 (lto_balanced_map): Likewise.
415
31db0fe0
ML
4162018-06-08 Martin Liska <mliska@suse.cz>
417
418 * lto-partition.c (add_references_to_partition): Remove support
419 for MPX (macros, related functions, fields in cgraph_node, ...).
420 (add_symbol_to_partition_1): Likewise.
421 (privatize_symbol_name): Likewise.
422 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
423
f115c9b5
RB
4242018-06-05 Richard Biener <rguenther@suse.de>
425
426 * lto.c (cmp_type_location): Expand locations only once.
427
5b42d196
JH
4282018-05-30 Jan Hubicka <hubicka@ucw.cz>
429
430 * lang.opt (lto_linker_output): Add nolto-rel.
431 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
432 and LTO_LINKER_OUTPUT_NOLTOREL.
433 (lto_init): Generate lto when doing incremental link.
434 * lto.c (lto_precess_name): Add lto1-inclink.
435
ab168044
JH
4362018-05-18 Jan Hubicka <jh@suse.cz>
437
438 PR lto/85583
439 * lto-partition.c (account_reference_p): Do not account
440 references from aliases; do not account refernces from
441 external initializers.
442
b6e33d73
JH
4432018-04-30 Jan Hubicka <jh@suse.cz>
444
445 * lto.c (cmp_partitions_size): Remove.
446 (lto_wpa_write_files): Also output priorities; do not sort partitions.
447 (cmp_partition_order): Move to ...
448 * lto-partition.c (cmp_partition_order): ...
449 (lto_1_to_1_map): Sort partitions.
450
e693ebce
JH
4512018-04-20 Jan Hubicka <jh@suse.cz>
452
453 * lto-partition.c (lto_balanced_map): Fix sanity check.
454
ddb0b824
JH
4552018-04-19 Jan Hubicka <jh@suse.cz>
456
457 * lto-partition.c: Include sreal.h
458 (add_symbol_to_partition_1): Use size instead of self_size
459 for size estimate.
460 (account_reference_p): New.
461 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
462 fix accounting errors in boundary size; add debug output; combine cost
463 as cost/size instead of cost/internal; reduce the partitioning error to
464 +- 1/8 of the parttion size.
465
1781a04f
ML
4662018-04-19 Martin Liska <mliska@suse.cz>
467
468 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
469 for multiple PREVAILING_DEF_IRONLY for common symbols.
470
6867cd69
ML
4712018-04-18 Martin Liska <mliska@suse.cz>
472
473 * lto.c (lto_read_decls): Fix GNU coding style and typos.
474
af597536
ML
4752018-04-18 Martin Liska <mliska@suse.cz>
476
477 PR ipa/83983
478 PR ipa/85391
479 * lto.c (cmp_type_location): New function.
480 (lto_read_decls): First collect all types, then
481 sort them according by location before register_odr_type
482 is called.
483
7d6051b1
JH
4842018-04-18 Jan Hubicka <jh@suse.cz>
485 Martin Liska <mliska@suse.cz>
486
487 PR lto/85391
488 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
489 types.
490
23d87577
ML
4912018-04-11 Martin Liska <mliska@suse.cz>
492
493 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
494 function.
495
c16833dc
ML
4962018-04-10 Martin Liska <mliska@suse.cz>
497
498 PR lto/85248
499 * lto-symtab.c (lto_symtab_merge_p): Do not check for
500 TREE_VALUES of error attributes.
501
8d96e546
ML
5022018-04-10 Richard Biener <rguenther@suse.de>
503 Martin Liska <mliska@suse.cz>
504
505 PR lto/85248
506 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
507
97bb4812
JH
5082018-02-08 Jan Hubicka <hubicka@ucw.cz>
509
510 * lto-partition.c (lto_balanced_map): Watch overflow.
511
39aa9b23
JH
5122018-02-08 Jan Hubicka <hubicka@ucw.cz>
513
514 PR ipa/81360
515 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
516 (read_cgraph_and_symbols): Use
517 symtab_node::output_to_lto_symbol_table_p.
518
26a823f0
JH
5192018-01-30 Jan Hubicka <hubicka@ucw.cz>
520
521 * lto.c (register_resolution): Remove forgotten sanity check.
522
43fbc2e9
JH
5232018-01-30 Jan Hubicka <hubicka@ucw.cz>
524
525 PR lto/81004
526 * lto.c: Include builtins.h
527 (register_resolution): Merge resolutions in case trees was
528 merged across units.
529 (lto_maybe_register_decl): Break out from ...
530 (lto_read_decls): ... here.
531 (unify_scc): Also register decls here.
532 (read_cgraph_and_symbols): Sanity check that all resolutions was
533 read.
534
ee034d31
EB
5352018-02-02 Eric Botcazou <ebotcazou@adacore.com>
536
537 PR lto/83954
538 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
539 component type of array types with non-aliased component.
540
44c945e6
JH
5412018-01-30 Jan Hubicka <hubicka@ucw.cz>
542
543 PR lto/83954
544 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
545 for type match warning on arrays of pointers.
546
cde9b2f8
ML
5472018-01-23 Martin Liska <mliska@suse.cz>
548
549 PR lto/81440
550 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
551 trailing arrays at the end of a struct.
552
5c0caeb3
RS
5532018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
554 Alan Hayward <alan.hayward@arm.com>
555 David Sherwood <david.sherwood@arm.com>
556
557 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
558
928686b1
RS
5592018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
560 Alan Hayward <alan.hayward@arm.com>
561 David Sherwood <david.sherwood@arm.com>
562
563 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
564 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
565
85ec4feb
JJ
5662018-01-03 Jakub Jelinek <jakub@redhat.com>
567
568 Update copyright years.
569
4849deb1
JJ
5702017-12-15 Jakub Jelinek <jakub@redhat.com>
571
572 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
573 affects_type_identity and handler fields, adjust comments.
574
734914b6
RS
5752017-12-07 Richard Sandiford <richard.sandiford@arm.com>
576
577 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
578
5d9ae53d
MS
5792017-12-07 Martin Sebor <msebor@redhat.com>
580
581 PR c/81544
582 * lto-lang.c (lto_attribute_table): Initialize new member of struct
583 attribute_spec.
584
5de73c05
JJ
5852017-11-30 Jakub Jelinek <jakub@redhat.com>
586
587 * lto.c (create_subid_section_table): Use ; instead of ;;.
588
974aedcc
MP
5892017-11-22 Marek Polacek <polacek@redhat.com>
590
591 PR c++/60336
592 PR middle-end/67239
593 PR target/68355
594 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
595
1bad9c18
JH
5962017-11-10 Jan Hubicka <hubicka@ucw.cz>
597
598 * lto-partition.c (lto_balanced_map): Use frequency accessor.
599
65991ea3
JH
6002017-10-13 Jan Hubicka <hubicka@ucw.cz>
601
602 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
603
4e7d0260
NS
6042017-10-11 Nathan Sidwell <nathan@acm.org>
605
606 * lto.c (mentions_vars_p_decl_with_vis): Use
607 DECL_ASSEMBLER_NAME_RAW.
608 (lto_fixup_prevailing_decls): Likewise.
609
8e6cdc90
RS
6102017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
611
612 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
613 operating on trees as wide_ints.
614
357b7604
RS
6152017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
616 Alan Hayward <alan.hayward@arm.com>
617 David Sherwood <david.sherwood@arm.com>
618
619 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
620
1ea85365
RB
6212017-08-21 Richard Biener <rguenther@suse.de>
622
92a285c1
ML
623 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
624 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
625 TYPE_DECL debug processing, register DIE references from
626 prevailing SCCs with the debug machinery.
627 (lto_section_with_id): Handle LTO debug sections.
1ea85365 628
8e093270
NS
6292017-08-16 Nathan Sidwell <nathan@acm.org>
630
631 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
632 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
633 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
634
eac3ab4a
TV
6352017-08-08 Tom de Vries <tom@codesourcery.com>
636
637 * lto.c: Include attribs.h.
638
314e6352
ML
6392017-08-08 Martin Liska <mliska@suse.cz>
640
641 * lto-lang.c: Include header files.
642 * lto-symtab.c: Likewise.
643
63e434ca
RB
6442017-08-03 Richard Biener <rguenther@suse.de>
645
646 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
647 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
648 use DECL_LANG_FLAG_0.
649 (lto_symtab_prevail_decl): Likewise.
650
417ca011
TD
6512017-07-07 Torsten Duwe <duwe@suse.de>
652
653 * lto-lang.c (lto_attribute_table): Add entry for
654 "patchable_function_entry".
655
20deef65
NS
6562017-07-19 Nathan Sidwell <nathan@acm.org>
657
658 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
659 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
660
0eaf0bfe
JH
6612017-07-06 Jan Hubicka <hubicka@ucw.cz>
662
663 * lto-partition.c (lto_balanced_map): Do not check
664 flag_toplevel_reorder.
2db9b7cd 665
0eaf0bfe 6662017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
667 * lto-lang.c (lto_init): Use builtin_structptr_types.
668
d1eed638
JH
6692017-06-15 Jan Hubicka <hubicka@ucw.cz>
670 Thomas Preud'homme <thomas.preudhomme@arm.com>
671
672 PR lto/69866
673 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
674 that resolved externally.
675
d2db2e6b
JH
6762017-05-23 Jan Hubicka <hubicka@ucw.cz>
677
678 * lto.c (do_whole_program_analysis): Replace inline_free_summary
679 by ipa_free_fn_summary.
680
464d0118
ML
6812017-05-23 Martin Liska <mliska@suse.cz>
682
683 * lto-symtab.c (lto_cgraph_replace_node): Use
684 symtab_node::dump_{asm_,}name functions.
685 * lto.c (read_cgraph_and_symbols): Likewise.
686 (do_whole_program_analysis): Likewise.
687
6c52831d
ML
6882017-05-23 Martin Liska <mliska@suse.cz>
689
690 * lto.c (read_cgraph_and_symbols): Use the renamed function.
691 (do_whole_program_analysis): Use the renamed function.
692
27d020cf
JH
6932017-05-22 Jan Hubicka <hubicka@ucw.cz>
694
695 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
696 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
697
815d9cc6
XR
6982017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
699
92a285c1 700 PR c++/80038
815d9cc6
XR
701 * lto-lang.c (lto_init): Set in_lto_p earlier.
702
350792ff 7032017-04-12 Richard Biener <rguenther@suse.de>
ab20d992 704 Bernd Edlinger <bernd.edlinger@hotmail.de>
350792ff
RB
705
706 PR middle-end/79671
707 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
708
4a44a5f3
ML
7092017-02-14 Martin Liska <mliska@suse.cz>
710
711 * lto.c (do_stream_out): Free LTO file filename string.
712
8a3a6ab4
DM
7132017-01-19 David Malcolm <dmalcolm@redhat.com>
714
715 * lto-lang.c (builtin_type_for_size): Convert call to
716 lto_type_for_size to one through the langhook.
717 (lto_type_for_size): Move to langhooks.c and rename to
718 lhd_type_for_size.
719 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
720
4c4b4703
JJ
7212017-01-11 Jakub Jelinek <jakub@redhat.com>
722
723 PR middle-end/50199
724 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
725 if it was 0.
726
bd2c6270
JJ
7272017-01-09 Jakub Jelinek <jakub@redhat.com>
728
729 PR translation/79019
730 PR translation/79020
731 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
732
24d3f325
NS
7332017-01-06 Nathan Sidwell <nathan@acm.org>
734
5406184c
NS
735 * lto-partition.c (promote_symbol): Write to dump file sooner,
736 include alias promoting too.
737
24d3f325
NS
738 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
739 (may_need_named_section_p): Likewise.
740 (rename_statics): Likewise.
741 (lto_promote_cross_file_statics): Likewise.
742
cbe34bb5
JJ
7432017-01-01 Jakub Jelinek <jakub@redhat.com>
744
745 Update copyright years.
746
6c8bf066
GJL
7472016-11-30 Georg-Johann Lay <avr@gjlay.de>
748
749 PR lto/78562
750 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
751 mismatch if the two types are built-in.
752
7fa6a965
PK
7532016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
754
755 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
756
efb71232
RB
7572016-11-23 Richard Biener <rguenther@suse.de>
758
759 PR lto/78472
760 * lto.c (hash_canonical_type): Ignore zero-sized fields.
761
48330c93
BE
7622016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
763
764 PR c++/71973
765 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
766
899ca90e 7672016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
768 Alan Hayward <alan.hayward@arm.com>
769 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
770
771 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
772
65179585
RB
7732016-10-31 Richard Biener <rguenther@suse.de>
774
775 PR lto/78129
776 * lto.c (do_whole_program_analysis): Bail out after errors
777 from WPA analysis.
778
8bc5448f
KV
7792016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
780
781 * lto-partition.c: Include tree-vrp.h.
782 * lto.c: Likewise.
783
68317985
RB
7842016-09-20 Richard Biener <rguenther@suse.de>
785
786 * lto.c (lto_main): Call early_finish with "<artificial>" as
787 filename.
788
321e76fb
RB
7892016-09-19 Richard Biener <rguenther@suse.de>
790
791 * lto.c (lto_main): Invoke early_finish debug hook.
792
ea6e17d5
RB
7932016-07-25 Richard Biener <rguenther@suse.de>
794
795 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
796 (unify_scc): Likewise.
797 (lto_read_decls): Likewise.
798
e9ac1f86
JJ
7992016-06-28 Jakub Jelinek <jakub@redhat.com>
800
801 * Make-lang.in: Don't cat ../stage_current if it does not exist.
802
277d7ee0
AK
8032016-06-23 Andi Kleen <ak@linux.intel.com>
804
805 * Make-lang.in: Add support for autofdo (disabled for now)
806
4d926e34
MS
8072016-06-10 Martin Sebor <msebor@redhat.com>
808
809 PR c/71392
ab20d992 810 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
4d926e34
MS
811 attribute in type-generic builtins.
812
479f99c9
JH
8132016-05-16 Jan Hubicka <hubicka@ucw.cz>
814
815 * lto-partition.c (add_symbol_to_partition_1): Likewise.
816
1a0bf5e1
JH
8172016-05-03 Jan Hubicka <hubicka@ucw.cz>
818
819 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
820
a2e76867
PK
8212016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
822
823 * lto-partition.h (lto_balanced_map): New parameter.
824 * lto-partition.c (lto_balanced_map): New parameter
825 max_partition_size.
826 Check if partition size is greater than max_partition_size.
827 * lto.c (do_whole_program_analysis): Adjust calls to
828 lto_balanced_map() to pass 2nd argument.
829
ea913779
L
8302016-03-17 H.J. Lu <hongjiu.lu@intel.com>
831
832 PR lto/70258
833 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
834 PIE.
835
56aae4b7
JJ
8362016-03-08 Jakub Jelinek <jakub@redhat.com>
837
838 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
839 - becuase -> because.
840
ed5d948d
TV
8412016-02-15 Tom de Vries <tom@codesourcery.com>
842
843 PR lto/69655
844 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
845 argument.
846
4ecbadc7
ML
8472016-01-27 Martin Liska <mliska@suse.cz>
848
849 * lto-partition.c (add_symbol_to_partition_1): Remove usage
850 of hsa_summaries.
851
e49d321f
JH
8522016-01-19 Jan Hubicka <hubicka@ucw.cz>
853
854 PR lto/69136
855 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
856 decls have no assemblernames.
857
b2b40051 8582016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 859 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
860
861 * lto-partition.c: Include "hsa.h"
862 (add_symbol_to_partition_1): Put hsa implementations into the
863 same partition as host implementations.
864
5803bd01
JH
8652016-01-12 Jan Hubicka <hubicka@ucw.cz>
866
867 PR lto/69003
868 * lto-partition.c (rename_statics): Fix pasto.
869
13092f61
RB
8702016-01-18 Richard Biener <rguenther@suse.de>
871
872 PR lto/69337
873 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
874 function vs. variable.
875
3c4e91c9
RB
8762016-01-12 Richard Biener <rguenther@suse.de>
877
878 PR lto/69077
879 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
880 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
881
818ab71a
JJ
8822016-01-04 Jakub Jelinek <jakub@redhat.com>
883
884 Update copyright years.
885
3fddb2ef
JH
8862015-12-10 Jan Hubicka <hubicka@ucw.cz>
887
888 PR lto/68878
889 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
890 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
891 (lto_symtab_prevailing_decl): Use it.
892
4a38b02b
IV
8932015-12-15 Ilya Verbin <ilya.verbin@intel.com>
894
895 * lto.c: Include stringpool.h and fold-const.h.
896 (offload_handle_link_vars): New static function.
897 (lto_main): Call offload_handle_link_vars.
898
ca834876
JH
8992015-12-10 Jan Hubicka <hubicka@ucw.cz>
900
901 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
902
958a627f
JH
9032015-12-11 Jan Hubicka <hubicka@ucw.cz>
904
905 PR ipa/61886
906 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
907 values of error and warning attributes.
908
da20571a
JH
9092015-12-08 Jan Hubicka <hubicka@ucw.cz>
910
911 PR lto/68811
912 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
913 DECL.
914 (LTO_NO_PREVAIL): Use gcc_checking_assert.
915
378004b9
JH
9162015-12-08 Jan Hubicka <hubicka@ucw.cz>
917
918 PR lto/68811
919 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
920 by itself.
921
6b9ac179
JH
9222015-12-08 Jan Hubicka <hubicka@ucw.cz>
923
924 PR ipa/61886
925 * lto-symtab.c: Include lto-symtab.h.
926 (lto_cgraph_replace_node): Do not merge profiles here.
927 (lto_symtab_merge_p): New function.
928 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
929 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
930 aliases.
931 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
932 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
933 * lto.c: Include lto-symtab.h
934 * lto-symtab.h: New.
935
41c60c6c
JH
9362015-12-08 Jan Hubicka <hubicka@ucw.cz>
937
938 PR ipa/61886
939 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
940 are not part of the definition.
941 (contained_in_symbol): Likewise.
942 (promote_symbol): When promoting a symbol also promote all transparent
943 aliases.
944 (rename_statics): Weakref needs unique name, too.
945
71e54687
JH
9462015-12-07 Jan Hubicka <hubicka@ucw.cz>
947
948 PR ipa/61886
949 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
950 rename_statics, rename_statics): Handle transparent aliases.
951
88636b62
JH
9522015-12-04 Jan Hubicka <hubicka@ucw.cz>
953
954 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
955 merged_comdat.
956
8c86248e
JH
9572015-12-01 Jan Hubicka <hubicka@ucw.cz>
958
959 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
960
1ff9ed6f
JH
9612015-11-25 Jan Hubicka <jh@suse.cz>
962
963 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
964 * lang.opt (lto_linker_output): New enum.
965 (flinker_output): New flag.
966
22bea0be
JH
9672015-11-24 Jan Hubicka <hubicka@ucw.cz>
968
969 * lto-symtab.c: Include alias.h
970 (warn_type_compatibility_p): Replace types_compatible_p checks by
971 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
972 (lto_symtab_merge): Compare DECL sizes.
973 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
974
aea50b45
JH
9752015-11-24 Jan Hubicka <hubicka@ucw.cz>
976
977 * lto.c (iterative_hash_canonical_type): Recruse for all types
978 which pass !canonical_type_used_p.
979 (gimple_register_canonical_type_1): Sanity check we do not compute
980 canonical type of anything with !canonical_type_used_p.
981 (gimple_register_canonical_type): Skip all types that are
982 !canonical_type_used_p
983
deb3dae6
JH
9842015-11-24 Jan Hubicka <hubicka@ucw.cz>
985
986 * lto.c (unify_scc): Use free_node.
987
f85d2487
JH
9882015-11-21 Jan Hubicka <hubicka@ucw.cz>
989
990 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
991 (gimple_register_canonical_type_1): Check that pointers do not get
992 canonical types.
993 (gimple_register_canonical_type): Do not register pointers.
994
9952015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
996
997 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
998 flag for types that are not ODR; fix loop walking parameters.
999
69f293c9
AM
10002015-11-11 Andrew MacLeod <amacleod@redhat.com>
1001
1002 * lto-lang.c: Remove unused header files.
1003 * lto-object.c: Likewise.
1004 * lto-partition.c: Likewise.
1005 * lto-symtab.c: Likewise.
1006 * lto.c: Likewise.
1007
ee45a32d
EB
10082015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1009
1010 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
1011
0aad0198
RS
10122015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1013
1014 * lto-lang.c: Don't undef DEF_BUILTIN.
1015
2adfab87
AM
10162015-10-29 Andrew MacLeod <amacleod@redhat.com>
1017
1018 * lto-lang.c: Reorder #include's and remove duplicates.
1019 * lto-object.c: Likewise.
1020 * lto-partition.c: Likewise.
1021 * lto-symtab.c: Likewise.
1022 * lto.c: Likewise.
1023
b2b29377
MM
10242015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
1025
1026 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
1027 conditionals.
1028 (lto_fixup_state): Likewise.
1029 (do_whole_program_analysis): Use
1030 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
1031 conditionals.
1032
d9a6bd32
JJ
10332015-10-13 Jakub Jelinek <jakub@redhat.com>
1034
1035 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1036 DEF_FUNCTION_TYPE_11): Define.
1037
9c4eeafc
JH
10382015-10-10 Jan Hubicka <hubicka@ucw.cz>
1039
1040 * lto.c (hash_canonical_type): Honor
1041 type_with_interoperable_signedness.
1042
3e32ee19
NS
10432015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1044
1045 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
1046 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1047
f196d062
RB
10482015-08-31 Richard Biener <rguenther@suse.de>
1049
1050 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
1051 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
1052 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
1053 participate in merging with something else.
1054
45aee888
RB
10552015-08-31 Richard Biener <rguenther@suse.de>
1056
1057 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
1058 test, do not replace a non-builtin with a builtin.
1059 * lto.c (compare_tree_sccs_1): Do not merge things we stream
1060 as builtins vs. non-builtins.
1061
a79683d5
TS
10622015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1063
1064 * lto.h: Remove useless typedefs.
1065
48d859bb
AM
10662015-07-15 Andrew MacLeod <amacleod@redhat.com>
1067
1068 * lto.c: Remove redundant includes.
1069
026c3cfd
AH
10702015-07-12 Aldy Hernandez <aldyh@redhat.com>
1071
1072 * lto-lang.c: Fix double word typos.
1073
9fdcd34e
AM
10742015-07-10 Andrew MacLeod <amacleod@redhat.com>
1075
1076 * lto.c: Include cfghooks.h rather than predict.h.
1077
f51ade33
AM
10782015-07-09 Andrew MacLeod <amacleod@redhat.com>
1079
1080 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1081 lto-streamer.h.
1082 * lto-object.c: Likewise.
1083 * lto-partition.c: Likewise.
1084 * lto-symtab.c: Likewise.
1085
1916bcb5
AM
10862015-07-09 Andrew MacLeod <amacleod@redhat.com>
1087
1088 * lto-lang.c: Adjust includes for flags.h changes.
1089
c7131fb2
AM
10902015-07-07 Andrew MacLeod <amacleod@redhat.com>
1091
1092 * lto-lang.c: Adjust includes.
1093 * lto-object.c: Likewise.
1094 * lto-partition.c: Likewise.
1095 * lto-symtab.c: Likewise.
1096 * lto.c: Likewise.
1097
f0889939
AM
10982015-06-25 Andrew MacLeod <amacleod@redhat.com>
1099
1100 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1101 * lto-object.c: Likewise.
1102 * lto-partition.c: Likewise.
1103 * lto-symtab.c: Likewise.
1104 * lto-tree.h: Likewise.
1105 * lto.c: Likewise.
1106
8d67ee55
RS
11072015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1108
1109 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1110 than typed_noop_remove. Remove redudant typedefs.
1111
abb226c9
AM
11122015-06-17 Andrew MacLeod <amacleod@redhat.com>
1113
1114 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1115 * lto-object.c: Likewise.
1116 * lto-partition.c: Likewise.
1117 * lto-symtab.c: Likewise.
1118 * lto.c: Likewise.
1119
351d90f4
JH
11202015-06-14 Jan Hubicka <hubicka@ucw.cz>
1121
1122 PR ipa/66181
1123 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1124
44c42705
DD
11252015-06-12 DJ Delorie <dj@redhat.com>
1126
1127 * lto-lang.c (lto_type_for_size): Include intN types.
1128 (lto_type_for_mode): Likewise.
1129
64578d98
JH
11302015-06-08 Jan Hubicka <hubicka@ucw.cz>
1131
1132 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1133
13fdf2e2
AM
11342015-06-08 Andrew MacLeod <amacleod@redhat.com>
1135
1136 * lto-lang.c : Adjust include files.
1137 * lto-object.c : Likewise.
1138 * lto-partition.c : Likewise.
1139 * lto-partition.h : Likewise.
1140 * lto-symtab.c : Likewise.
1141 * lto.c : Likewise.
1142 * lto.h : Likewise.
1143
ccb5ad37
JH
11442015-06-06 Jan Hubicka <hubicka@ucw.cz>
1145
6542950e
JH
1146 PR lto/65378
1147 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1148 odr_or_derived_type_p.
1149 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1150
11512015-06-08 Jan Hubicka <hubicka@ucw.cz>
1152
ccb5ad37
JH
1153 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1154 pointers.
1155
d7438551
AH
11562015-06-05 Aldy Hernandez <aldyh@redhat.com>
1157
1158 * lto-lang.c (lto_write_globals): Remove.
1159 (LANG_HOOKS_WRITE_GLOBALS): Same.
1160
ecb9f223
AM
11612015-06-04 Andrew MacLeod <amacleod@redhat.com>
1162
1163 * lto-lang.c: Adjust includes for restructured coretypes.h.
1164 * lto-object.c: Likewise.
1165 * lto-partition.c: Likewise.
1166 * lto-symtab.c: Likewise.
1167 * lto.c: Likewise.
1168
9cb9b937
JH
11692015-06-04 Jan Hubicka <hubicka@ucw.cz>
1170
1171 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1172
93e2aa6d
JH
11732015-06-03 Jan Hubicka <hubicka@ucw.cz>
1174
1175 * lto.c (iterative_hash_canonical_type,
1176 gimple_register_canonical_type): only hash main variants of types
1177
faae53f8
ML
11782015-05-27 Martin Liska <mliska@suse.cz>
1179
1180 * lto-partition.c (new_partition): Reset number of symbols.
1181 (add_symbol_to_partition_1): Increment number of symbols.
1182 (undo_partition): Decrement number of symbols.
1183 (lto_balanced_map): Dump number of symbols and insns that
1184 belong to a partition.
1185 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1186
b727ba74
JH
11872015-05-22 Jan Hubicka <hubicka@ucw.cz>
1188
1189 * lto.c (hash_canonical_type): Be sure we hash only types that
1190 need alias set.
1191 (gimple_register_canonical_type_1): Do not produce canonical
1192 types for types that do not need alias sets.
1193
1d1218fb
JH
11942015-05-22 Jan Hubicka <hubicka@ucw.cz>
1195
1196 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1197
872d5034
JH
11982015-05-19 Jan Hubicka <hubicka@ucw.cz>
1199
1200 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1201
259d29e3
JH
12022015-05-17 Jan Hubicka <hubicka@ucw.cz>
1203
1204 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1205 compare ODR types (if available) and function types.
1206 (lto_symtab_merge): ... here; output ODR violation warnings
1207 and call warn_types_mismatch.
1208
b0845a1e
JH
12092015-04-29 Jan Hubicka <hubicka@ucw.cz>
1210
1211 * lto.c (lto_fixup_state): Call verify_type.
1212
67f58944
TS
12132015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1214
b0845a1e 1215 * lto.c: Adjust for hash_table changes.
67f58944 1216
36ceb0e3
JH
12172015-03-27 Jan Hubicka <hubicka@ucw.cz>
1218
1219 * lto.c (lto_read_decls): Move code registering odr types out
1220 of TYPE_CANONICAL conditional and also register polymorphic types.
1221
afd1e7c6
JH
12222015-03-26 Jan Hubicka <hubicka@ucw.cz>
1223
1224 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1225 DECL_ARTIFICAL symbols.
1226
eaeec5ec
JH
12272015-03-26 Jan Hubicka <hubicka@ucw.cz>
1228
1229 PR lto/65536
1230 * lto.c (unify_scc): Revert location cache when unification
1231 suceeded.
1232 (lto_read_decls): Accept location cache after sucess;
1233 apply location cache before calling debug hooks.
1234
1c4db829
JH
12352015-03-10 Jan Hubicka <hubicka@ucw.cz>
1236
1237 * lto.c (read_cgraph_and_symbols): Do not do merging
1238 at ltrans stage.
1239
db847fa8
JJ
12402015-02-26 Jakub Jelinek <jakub@redhat.com>
1241
1242 * lto.c (lto_mode_identity_table): New variable.
1243 (lto_read_decls): Add mode_table argument to the lto_input_block
1244 constructor.
1245 (lto_file_finalize): Initialize mode_table.
1246 (lto_init): Initialize lto_mode_identity_table.
1247
56a9f6bc
TS
12482015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1249
1250 PR libgomp/64625
1251 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1252 Remove macros.
1253 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1254
ebc8f0bb
JH
12552015-02-03 Jan Hubicka <hubicka@ucw.cz>
1256
1257 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1258
40fecdd6
JM
12592015-01-30 Joseph Myers <joseph@codesourcery.com>
1260
1261 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1262 changed to pass input_location as first argument.
1263
040968a8
JH
12642014-12-11 Jan Hubicka <hubicka@ucw.cz>
1265
1266 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1267
69fe4502
JH
12682014-12-11 Jan Hubicka <hubicka@ucw.cz>
1269
1270 * lto.c (compare_tree_sccs_1): Add comparsion of
1271 DECL_FUNCTION_SPECIFIC_TARGET
1272
41dbbb37
TS
12732015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1274 James Norris <jnorris@codesourcery.com>
1275
1276 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1277 New macros.
1278 * lto.c: Include "gomp-constants.h".
1279
837bac8c
IV
12802015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1281
1282 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1283 from select_what_to_stream.
1284
1b34e6e2
BS
12852015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1286 Jakub Jelinek <jakub@redhat.com>
1287
1288 PR middle-end/64412
1289 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1290 if ACCEL_COMPILER.
1291
adfac8df
JJ
12922015-01-09 Michael Collison <michael.collison@linaro.org>
1293
1294 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1295 input.h, alias.h, symtab.h, options, fold-const.h,
1296 wide-int.h, and inchash.h due to flattening of tree.h.
1297 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1298 input.h, alias.h, symtab.h, fold-const.h,
1299 wide-int.h, and inchash.h due to flattening of tree.h.
1300 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1301 input.h, alias.h, symtab.h, options, fold-const.h,
1302 wide-int.h, and inchash.h due to flattening of tree.h.
1303 * lto-partition.c: Ditto.
1304 * lto-symtab.c: Ditto.
1305
5624e564
JJ
13062015-01-05 Jakub Jelinek <jakub@redhat.com>
1307
1308 Update copyright years.
1309
9a1e784a
ML
13102014-12-22 Martin Liska <mliska@suse.cz>
1311
1312 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1313 is used.
1314 (undo_partition): Likewise.
1315 (lto_balanced_map): Likewise.
1316
dd912cb8
ML
13172014-12-22 Martin Liska <mliska@suse.cz>
1318
1319 * lto-partition.c: Include of symbol-summary.h is added.
1320 * lto-symtab.c: Likewise.
1321 * lto.c: Likewise.
1322
17e0fc92
JH
13232014-12-11 Jan Hubicka <hubicka@ucw.cz>
1324
1325 PR ipa/61324
1326 * lto.c (read_cgraph_and_symbols): Update call of
1327 remove_unreachable_nodes.
1328 (do_whole_program_analysis): Remove call of
1329 symtab->remove_unreachable_nodes
1330
58dddbd2
TS
13312014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1332
1333 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1334 htab with malloc instead of ggc.
1335
907dadbd
TS
13362014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1337
1338 * lto.c: Replace htab with hash_table.
1339
9c71e9df
TS
13402014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1341
1342 * lto.c (lto_read_in_decl_state): Adjust.
1343 (lto_fixup_state): Likewise.
1344
72a4a8b0
JH
13452014-11-17 Jan Hubicka <hubicka@ucw.cz>
1346
1347 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1348
54e774c0
JH
13492014-11-14 Jan Hubicka <hubicka@ucw.cz>
1350
1351 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1352
1f6be682
IV
13532014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1354 Bernd Schmidt <bernds@codesourcery.com>
1355 Andrey Turetskiy <andrey.turetskiy@intel.com>
1356 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1357
ab20d992 1358 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
ec6fe917
IV
1359
13602014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1361 Ilya Tocar <ilya.tocar@intel.com>
1362 Andrey Turetskiy <andrey.turetskiy@intel.com>
1363 Bernd Schmidt <bernds@codesourcery.com>
1364
1f6be682
IV
1365 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1366 LTO_SECTION_NAME_PREFIX.
1367 * lto-partition.c (lto_promote_cross_file_statics): Call
1368 select_what_to_stream.
1369 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1370 LTO_SECTION_NAME_PREFIX.
1371 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1372 being built as an offload compiler.
1373
ef4bddc2
RS
13742014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1375
1376 * lto-lang.c: Remove redundant enum from machine_mode.
1377
c582198b
AM
13782014-10-28 Andrew MacLeod <amacleod@redhat.com>
1379
1380 * lto.c: Adjust include files.
1381 * lto-lang.c: Ditto.
1382 * lto-object.c: Ditto.
1383 * lto-partition.c: Ditto.
1384 * lto-symtab.c: Ditto.
1385
60393bbc
AM
13862014-10-27 Andrew MacLeod <amacleod@redhat.com>
1387
1388 * lto-lang.c: Adjust include files.
1389 * lto-object.c: Ditto.
1390 * lto-partition.c: Ditto.
1391 * lto-symtab.c: Ditto.
1392 * lto.c: Ditto.
1393
957f47e6
DD
13942014-10-16 DJ Delorie <dj@redhat.com>
1395
1396 * lto-object.c (lto_obj_begin_section): In the event that pointer
1397 sizes aren't powers of two, choose a more suitable alignment
1398 than (unsigned)(-1).
1399
78a7c317
DD
14002014-10-14 DJ Delorie <dj@redhat.com>
1401
1402 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1403 size-type as well.
1404 (lto_init): Initialize all intN types, not just int128.
1405
70261a4f
ML
14062014-10-06 Martin Liska <mliska@suse.cz>
1407
1408 * lto.c (stream_out): ARG_UNUSED added for last argument.
1409
00de328a
AH
14102014-09-24 Aldy Hernandez <aldyh@redhat.com>
1411
1412 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1413 DECL_ABSTRACT_P.
1414
7861b648
AK
14152014-09-23 Andi Kleen <ak@linux.intel.com>
1416
1417 * lto-partition.c (node_cmp): Update comment.
1418 (varpool_node_cmp): Use symtab_node for comparison.
1419 (add_sorted_nodes): New function.
1420 (lto_balanced_map): Change to keep ordered queue
1421 of ordered node. Handle no_reorder attribute.
1422
1ee85ee1
JH
14232014-09-11 Jan Hubicka <hubicka@ucw.cz>
1424
1425 * lto.c (lto_read_decls): Register ODR types.
1426
8605403e
JH
14272014-08-20 Jan Hubicka <hubicka@ucw.cz>
1428
1429 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1430 call.
1431 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1432
56b1f114
JH
14332014-08-14 Jan Hubicka <hubicka@ucw.cz>
1434
1435 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1436
833f94c0
RB
14372014-08-14 Richard Biener <rguenther@suse.de>
1438
1439 PR lto/62067
1440 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1441
207c68cd
RB
14422014-08-08 Richard Biener <rguenther@suse.de>
1443
1444 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1445
7c581d61
BC
14462014-08-08 Bin Cheng <bin.cheng@arm.com>
1447
1448 PR lto/62032
1449 * lto-lang.c (lto_init): Switch mis-matched arguments.
1450
39c8aaa4
TS
14512014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1452
1453 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1454
6e2830c3
TS
14552014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1456
1457 * lto-partition.c, lto-partition.h: Use hash_set instead of
1458 pointer_set.
1459
50de5793
AK
14602014-07-31 Andi Kleen <ak@linux.intel.com>
1461
1462 * lto.c (hash_canonical_type): Use inchash::hash
1463 and use inchash::add_expr.
1464 (iterative_hash_canonical_type): Dito.
1465
f6bcdb5e
RB
14662014-07-30 Richard Biener <rguenther@suse.de>
1467
1468 * lto-streamer.h (lto_write_data): New function.
1469 * langhooks.c (lhd_append_data): Do not free block.
1470 * lto-section-out.c (lto_write_data): New function writing
1471 raw data to the current section.
1472 (lto_write_stream): Adjust for langhook semantic change.
1473 (lto_destroy_simple_output_block): Write header directly.
1474 * lto-opts.c (lto_write_options): Write options directly.
1475 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1476 (lto_output_toplevel_asms): Likewise.
1477 (copy_function_or_variable): Copy data directly.
1478 (write_global_references): Output index table directly.
1479 (lto_output_decl_state_refs): Likewise.
1480 (write_symbol): Write data directly.
1481 (produce_symtab): Adjust.
1482 (produce_asm_for_decls): Output header and refs directly.
1483
56fdfd3e
AK
14842014-07-25 Andi Kleen <ak@linux.intel.com>
1485
1486 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1487
0bd8bb04
AK
14882014-07-25 Andi Kleen <ak@linux.intel.com>
1489
1490 * lto.c (hash_canonical_type): Convert to inchash.
1491 (iterative_hash_canonical_type): Dito.
1492
6d8eb96b
AK
14932014-07-25 Andi Kleen <ak@linux.intel.com>
1494
1495 * lto.c: Include inchash.h
1496
ad115a3c
JH
14972014-07-14 Jan Hubicka <hubicka@ucw.cz>
1498
1499 * lto.c (mentions_vars_p_decl_non_common): Skip
1500 DECL_ARGUMENT_FLD.
1501 mentions_vars_p_function): Do DECL_ARGUMENTS.
1502 (lto_fixup_prevailing_decls): Update.
1503
917dd9bf
JH
15042014-07-12 Jan Hubicka <hubicka@ucw.cz>
1505
1506 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1507 timevar
1508 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1509
0b83e688
JH
15102014-07-11 Jan Hubicka <hubicka@ucw.cz>
1511
ab20d992 1512 * lto-partition.c (add_references_to_partition): Use
0b83e688
JH
1513 varpool_ctor_useable_for_folding_p.
1514 * lto.c (lto_read_in_decl_state): Update sanity check.
1515
e55637b7
ML
15162014-07-01 Martin Liska <mliska@suse.cz>
1517
1518 IPA REF alias refactoring
1519 * lto-partition.c (add_symbol_to_partition_1): Usage of
1520 FOR_EACH_ALIAS added.
1521
010f4e27
JH
15222014-06-28 Jan Hubicka <hubicka@ucw.cz>
1523
1524 Revert:
1525 * lto.c (lto_copy_fields_not_streamed): New function.
1526 (compare_tree_sccs_1): Do not compare fields shared in between type
1527 and variant.
1528 (lto_read_decls): Fixup types first before inserting into hash.
1529
b82fe354
AP
15302014-06-28 Andrew Pinski <apinski@cavium.com>
1531
1532 * lto.c (lto_read_decls): Fix comment in comment.
1533
288eeff7
JH
15342014-06-28 Jan Hubicka <hubicka@ucw.cz>
1535
1536 * lto.c (lto_copy_fields_not_streamed): New function.
1537 (compare_tree_sccs_1): Do not compare fields shared in between type
1538 and variant.
1539 (lto_read_decls): Fixup types first before inserting into hash.
1540
e01fa630
ML
15412014-06-25 Martin Liska <mliska@suse.cz>
1542
ab20d992 1543 * lto-partition.c (add_references_to_partition): New IPA REF function
e01fa630
ML
1544 used.
1545 (add_symbol_to_partition_1): Likewise.
1546 (lto_balanced_map): Likewise.
ab20d992 1547 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
e01fa630 1548
aaf8a23e
JH
15492014-06-24 Jan Hubicka <hubicka@ucw.cz>
1550
1551 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1552 (mentions_vars_p_function): ... here.
1553 (compare_tree_sccs_1): Update VINDEX checks.
1554 (lto_fixup_prevailing_decls): Likewise.
1555
1eb68d2d
TS
15562014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1557
1558 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1559 pointer_map.
1560
c203e8a7
TS
15612014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1562
1563 * lto.c: Adjust.
1564
714c800f
JH
15652014-06-20 Jan Hubicka <hubicka@ucw.cz>
1566
1567 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1568
569b1784
JH
15692014-06-20 Jan Hubicka <hubicka@ucw.cz>
1570
1571 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1572
56363ffd
JH
15732014-06-15 Jan Hubicka <hubicka@ucw.cz>
1574
1575 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1576
e257a17c
JH
15772014-06-10 Jan Hubicka <hubicka@ucw.cz>
1578
1579 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1580 (do_whole_program_analysis): Use verify_symtab.
1581
24d047a3
JH
15822014-06-07 Jan Hubicka <hubicka@ucw.cz>
1583
1584 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1585 lto_fixup_prevailing_decls): Skip section names.
1586
9b2b7279
AM
15872014-06-02 Andrew MacLeod <amacleod@redhat.com>
1588
1589 * lto-symtab.c: Include builtins.h.
1590
a9243bfc
RB
15912014-05-26 Richard Biener <rguenther@suse.de>
1592
1593 * lto.c (lto_parse_hex): Use int64_t.
1594 (lto_resolution_read): Likewise.
1595
fd1e9302
JH
15962014-05-23 Jan Hubicka <hubicka@ucw.cz>
1597
1598 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1599
aede2c10
JH
16002014-05-23 Jan Hubicka <hubicka@ucw.cz>
1601
1602 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1603 symtab pointer.
1604 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1605
f6a7cffc
TS
16062014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1607
1608 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1609 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1610 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1611
4000360e
BS
16122012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1613
1614 * lto-object.c: Include "lto-section-names.h".
1615 (LTO_SEGMENT_NAME): Don't define.
1616 * lto.c: Include "lto-section-names.h".
1617
b9559136
JH
16182014-05-17 Jan Hubicka <hubicka@ucw.cz>
1619
1620 PR lto/61012
1621 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1622 mixed with variables.
1623
766090c2
TS
16242014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1625
1626 * lto-tree.h: Don't use variable_size gty attribute.
1627 * lto.c (lto_read_in_decl_state): Adjust.
1628 (create_subid_section_table): Likewise.
1629 (lto_flatten_files): Likewise.
1630 (read_cgraph_and_symbols): Likewise.
1631
1d60af08
KZ
16322014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1633 Mike Stump <mikestump@comcast.net>
1634 Richard Sandiford <rdsandiford@googlemail.com>
1635
1636 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1637 * lto-lang.c (get_nonnull_operand): Likewise.
1638
22869a37
RB
16392014-04-28 Richard Biener <rguenther@suse.de>
1640
1641 PR middle-end/60092
1642 * lto-lang.c: Define flag_isoc11.
1643
7de90a6c
DM
16442014-04-23 David Malcolm <dmalcolm@redhat.com>
1645
1646 * lto-partition.c (add_references_to_partition): Update for
1647 removal of implicit pointer from the is-a.h API.
1648 (add_symbol_to_partition_1): Likewise.
1649 (contained_in_symbol): Likewise.
1650 (undo_partition): Likewise.
1651 (lto_balanced_map): Likewise.
1652 (promote_symbol): Likewise.
1653 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1654 (lto_symtab_merge_symbols): Likewise.
1655 * lto.c (lto_wpa_write_files): Likewise.
1656
783dab6b
RB
16572014-04-15 Richard Biener <rguenther@suse.de>
1658
1659 * lto.c: Include params.h.
1660 (do_whole_program_analysis): Switch on flag_lto_partition value,
1661 add support for LTO_PARTITION_ONE.
1662 * lto-partition.h (lto_balanced_map): Adjust.
1663 * lto-partition.c (lto_balanced_map): Get number of desired
1664 partitions as argument to support -flto-partition=one.
1665
cb90235d
JH
16662014-04-14 Jan Hubicka <hubicka@ucw.cz>
1667
ab20d992 1668 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
cb90235d
JH
1669 tp_first_run.
1670
bbe281da
JH
16712014-03-19 Jan Hubicka <hubicka@ucw.cz>
1672
1673 * lto.c: Include ipa-inline.h
1674 (do_whole_program_analysis): Free inline summary after partitioning.
1675
ce2f49b3
RB
16762014-03-19 Richard Biener <rguenther@suse.de>
1677
1678 PR middle-end/60553
ab20d992 1679 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
ce2f49b3
RB
1680 instead of TREE_CHAIN as chain_next.
1681
e41106fc
RB
16822014-03-19 Richard Biener <rguenther@suse.de>
1683
1684 * lto.c (lto_wpa_write_files): Move call to
1685 lto_promote_cross_file_statics ...
1686 (do_whole_program_analysis): ... here, into the partitioning
1687 block. Do not ggc_collect after lto_wpa_write_files but
1688 for a last time before it.
1689
15df2655
JJ
16902014-03-19 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR lto/60571
1693 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1694 Fix formatting.
1695
415e2e6b
JJ
16962014-03-18 Jakub Jelinek <jakub@redhat.com>
1697
1698 PR sanitizer/60535
1699 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1700 and complex_{float,{,long_}double}_type_node.
1701
f42c637e
PM
17022014-03-08 Paulo Matos <paulo@matos-sorge.com>
1703
415e2e6b
JJ
1704 * lto-lang.c (lto_init): Pass flag_short_double to
1705 build_common_tree_nodes.
f42c637e 1706
6dab804d
JH
17072014-02-14 Jan Hubicka <hubicka@ucw.cz>
1708
1709 PR lto/60295
1710 * lto.c (stream_out): Avoid parallel streaming with
1711 -flto=jobserver until we are able to throttle it down
1712 resonably.
1713
39434bce
JH
17142014-02-14 Jan Hubicka <hubicka@ucw.cz>
1715
1716 * lto-partition.c (add_symbol_to_partition_1,
1717 undo_partition, lto_balanced_map): Aliases have no
1718 defined size.
1719 (lto_balanced_map): Do not follow refering variables
1720 if they can be optimized out.
1721
1966fd99
RB
17222014-02-14 Richard Biener <rguenther@suse.de>
1723
1724 PR lto/60179
1725 * lto.c (compare_tree_sccs_1): Do not compare
1726 DECL_FUNCTION_SPECIFIC_TARGET.
1727 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1728
283416b3
RB
17292014-02-12 Richard Biener <rguenther@suse.de>
1730
1731 PR lto/60060
1732 * lto-lang.c (lto_write_globals): Do not call
1733 wrapup_global_declarations or emit_debug_global_declarations
1734 but emit debug info for non-function scope variables
1735 directly.
1736
b7e85694
JH
17372014-02-06 Jan Hubicka <hubicka@ucw.cz>
1738
1739 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1740
96451279
JH
17412014-02-06 Jan Hubicka <hubicka@ucw.cz>
1742
1743 PR ipa/59469
1744 * lto-partition.c (symbol_class): Move to cgraph.h
1745 (get_symbol_class): Move to symtab.c
1746 (add_references_to_partition, add_symbol_to_partition_1,
1747 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1748 lto_promote_cross_file_statics): Update.
1749
f300e7b8
JH
17502014-02-05 Jan Hubicka <hubicka@ucw.cz>
1751
1752 * lto.c (lto_parallelism): New static var.
1753 (do_stream_out, wait_for_child, stream_out): New static functions.
1754 (lto_wpa_write_files): Add support for parallel streaming.
1755 (do_whole_program_analysis): Set parallelism.
1756 * lang.opt (fwpa): Add parameter.
1757 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1758 (lto_init): Update use of flag_wpa.
1759 * lto-streamer.h (asm_nodes_output): Declare.
1760
f0f91770
RB
17612014-02-05 Richard Biener <rguenther@suse.de>
1762
1763 * lto.h (lto_global_var_decls): Remove.
1764 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1765 (lto_write_globals): Do nothing in WPA stage, gather globals from
1766 the varpool here ...
1767 * lto.c (lto_main): ... not here.
1768 (materialize_cgraph): Do not call rest_of_decl_compilation
1769 on the empty lto_global_var_decls vector.
1770 (lto_global_var_decls): Remove.
1771
d665f8dd
JH
17722014-02-04 Jan Hubicka <hubicka@ucw.cz>
1773
ab20d992 1774 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
d665f8dd
JH
1775 needs duplicating, not generic COMDAT.
1776
c39276b8
RB
17772014-02-04 Richard Biener <rguenther@suse.de>
1778
1779 PR lto/59723
1780 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1781 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1782
5f876ae7
JH
17832014-02-04 Jan Hubicka <hubicka@ucw.cz>
1784 Markus Trippelsdorf
1785
1786 PR ipa/59469
1787 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1788 merge force_output and forced_by_abi flags.
1789
b72271b9
BI
17902014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1791
1792 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1793 flag_cilkplus.
1794
63124c48
RB
17952014-01-09 Richard Biener <rguenther@suse.de>
1796
1797 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1798
d05b9920
RB
17992014-01-09 Richard Biener <rguenther@suse.de>
1800
1801 PR lto/45586
1802 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1803 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1804 (gimple_canonical_types_compatible_p): Do not compare them either.
1805
23a5b65a
RS
18062014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1807
1808 Update copyright years
1809
2c8326a5
OE
18102013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1811
1812 * lto.c: Remove struct tags when referring to class varpool_node.
1813 * lto-partition.c: Likewise.
1814 * lto-symtab.c: Likewise.
1815
e06f9964
JJ
18162013-11-29 Jakub Jelinek <jakub@redhat.com>
1817 Richard Biener <rguenther@suse.de>
1818
1819 PR lto/59326
1820 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1821
c193f58b
JJ
18222013-11-29 Jakub Jelinek <jakub@redhat.com>
1823
1824 PR lto/59326
1825 * lto.c (mentions_vars_p_omp_clause): New function.
1826 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1827 after return stmts.
1828
2fb9a547
AM
18292013-11-22 Andrew MacLeod <amacleod@redhat.com>
1830
1831 * lto.c: Add required include files from gimple.h.
ab20d992
JJ
1832 * lto-lang.c: Likewise.
1833 * lto-object.c: Likewise.
1834 * lto-partition.c: Likewise.
1835 * lto-symtab.c: Likewise.
2fb9a547 1836
fec39fa6
TS
18372013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1838
1839 * lto-partition.c lto-symtab.c lto.c Adjust.
1840
d8a2d370
DN
18412013-11-14 Diego Novillo <dnovillo@google.com>
1842
1843 * lto-lang.c: Include stringpool.h.
1844 Include stor-layout.h.
1845 * lto-partition.c: Include gcc-symtab.h.
1846 * lto.c: Include stor-layout.h.
1847
5e20cdc9
DM
18482013-10-31 David Malcolm <dmalcolm@redhat.com>
1849
1850 Automated part of renaming of symtab_node_base to symtab_node.
1851
1852 Patch autogenerated by rename_symtab.py from
1853 https://github.com/davidmalcolm/gcc-refactoring-scripts
1854 revision 58bb219cc090b2f4516a9297d868c245495ee622
1855
1856 * lto-partition.c (add_symbol_to_partition): Rename
1857 symtab_node_base to symtab_node.
1858 (get_symbol_class): Likewise.
1859 (symbol_partitioned_p): Likewise.
1860 (add_references_to_partition): Likewise.
1861 (add_symbol_to_partition_1): Likewise.
1862 (contained_in_symbol): Likewise.
1863 (add_symbol_to_partition): Likewise.
1864 (lto_1_to_1_map): Likewise.
1865 (lto_max_map): Likewise.
1866 (lto_balanced_map): Likewise.
1867 (privatize_symbol_name): Likewise.
1868 (promote_symbol): Likewise.
1869 (may_need_named_section_p): Likewise.
1870 (rename_statics): Likewise.
1871 (lto_promote_statics_nonwpa): Likewise.
1872 * lto-symtab.c (lto_symtab_merge): Likewise.
1873 (lto_symtab_resolve_replaceable_p): Likewise.
1874 (lto_symtab_symbol_p): Likewise.
1875 (lto_symtab_resolve_can_prevail_p): Likewise.
1876 (lto_symtab_resolve_symbols): Likewise.
1877 (lto_symtab_merge_decls_2): Likewise.
1878 (lto_symtab_merge_decls_1): Likewise.
1879 (lto_symtab_merge_decls): Likewise.
1880 (lto_symtab_merge_symbols_1): Likewise.
1881 (lto_symtab_merge_symbols): Likewise.
1882 (lto_symtab_prevailing_decl): Likewise.
1883 * lto.c (lto_wpa_write_files): Likewise.
1884 (read_cgraph_and_symbols): Likewise.
1885 (do_whole_program_analysis): Likewise.
1886
378cd6b1
DM
18872013-10-30 David Malcolm <dmalcolm@redhat.com>
1888
1889 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1890 declarations onto multiple lines to make things easier for
1891 rename_symtab.py.
1892 (lto_symtab_merge_decls_1): Likewise.
1893 (lto_symtab_merge_symbols_1): Likewise.
1894
939b37da
BI
18952013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1896
1897 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1898 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1899 Plus is enabled.
1900
67348ccc
DM
19012013-10-29 David Malcolm <dmalcolm@redhat.com>
1902
1903 Patch autogenerated by refactor_symtab.py from
1904 https://github.com/davidmalcolm/gcc-refactoring-scripts
1905 revision 58bb219cc090b2f4516a9297d868c245495ee622
1906
1907 * lto-partition.c (lto_promote_cross_file_statics): Update for
1908 conversion of symtab types to a true class hierarchy.
1909 (rename_statics): Likewise.
1910 (promote_symbol): Likewise.
1911 (privatize_symbol_name): Likewise.
1912 (lto_balanced_map): Likewise.
1913 (varpool_node_cmp): Likewise.
1914 (node_cmp): Likewise.
1915 (lto_1_to_1_map): Likewise.
1916 (undo_partition): Likewise.
1917 (add_symbol_to_partition): Likewise.
1918 (contained_in_symbol): Likewise.
1919 (add_symbol_to_partition_1): Likewise.
1920 (add_references_to_partition): Likewise.
1921 (symbol_partitioned_p): Likewise.
1922 (get_symbol_class): Likewise.
1923 (lto_max_map): Likewise.
1924 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1925 (lto_symtab_merge_symbols): Likewise.
1926 (lto_symtab_merge_symbols_1): Likewise.
1927 (lto_symtab_merge_decls): Likewise.
1928 (lto_symtab_merge_decls_1): Likewise.
1929 (lto_symtab_merge_decls_2): Likewise.
1930 (lto_symtab_resolve_symbols): Likewise.
1931 (lto_symtab_resolve_can_prevail_p): Likewise.
1932 (lto_symtab_symbol_p): Likewise.
1933 (lto_symtab_resolve_replaceable_p): Likewise.
1934 (lto_symtab_merge): Likewise.
1935 (lto_varpool_replace_node): Likewise.
1936 (lto_cgraph_replace_node): Likewise.
1937 * lto.c (lto_main): Likewise.
1938 (do_whole_program_analysis): Likewise.
1939 (materialize_cgraph): Likewise.
1940 (read_cgraph_and_symbols): Likewise.
1941 (cmp_partitions_order): Likewise.
1942 (lto_materialize_function): Likewise.
1943 (has_analyzed_clone_p): Likewise.
1944
8e9055ae
AM
19452013-10-29 Andrew MacLeod <amacleod@redhat.com>
1946
ab20d992
JJ
1947 * lto-object.c: Add gimple.h to include list.
1948 * lto-partition.c: Likewise.
8e9055ae 1949
377d9792
AM
19502013-10-18 Andrew MacLeod <amacleod@redhat.com>
1951
1952 * lto.c: Remove tree-flow.h from include list.
1953
fffda8d7
RB
19542013-10-15 Richard Biener <rguenther@suse.de>
1955
1956 * lto.c (hash_canonical_type): Split out from ...
1957 (iterative_hash_canonical_type): ... here. Register types
1958 we recurse to.
1959 (gimple_canonical_type_hash): Adjust.
1960 (gimple_register_canonical_type_1): Split out from ...
1961 (gimple_register_canonical_type): ... here. Cache computed
1962 hash value.
1963 (lto_register_canonical_types): Split into two modes,
1964 clearing and computing TYPE_CANONICAL.
1965 (lto_read_decls): Adjust.
1966 (read_cgraph_and_symbols): Do two passes over global trees,
1967 first clearing then computing TYPE_CANONICAL.
1968
1394237e
RB
19692013-10-14 Richard Biener <rguenther@suse.de>
1970
1971 * lto.c (gimple_canonical_types): Move out-of GC space.
1972 (canonical_type_hash_cache): Make a pointer-map.
1973 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1974 New counters.
1975 (iterative_hash_canonical_type): Adjust.
1976 (read_cgraph_and_symbols): Likewise.
1977 (print_lto_report_1): Likewise.
1978
0a387eca
RB
19792013-10-14 Richard Biener <rguenther@suse.de>
1980
1981 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1982 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1983 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1984 gimple_types_compatible_p_1, gimple_types_compatible_p,
1985 visit, iterative_hash_name, struct type_hash_pair,
1986 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1987 gimple_type_eq, gimple_register_type, num_not_merged_types,
1988 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1989 num_not_merged_types_in_same_scc_trees): Remove old merging code
1990 and statistics.
1991 (lto_read_decls): Do not run old merging code in parallel.
1992 (read_cgraph_and_symbols): Do not init/free old merging
1993 data structures.
1994 (print_lto_report_1): Do not report differences of old vs. new
1995 merging code.
1996
83fd5d11
RB
19972013-10-14 Richard Biener <rguenther@suse.de>
1998
1999 * lto-lang.c (lto_init): Do not re-init canonical types here.
2000 (lto_register_canonical_types): Move to ...
2001 * lto.c (lto_register_canonical_types): ... here.
2002 (gimple_canonical_types, canonical_type_hash_cache,
2003 iterative_hash_canonical_type, gimple_canonical_type_hash,
2004 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
2005 gimple_register_canonical_type): Add canonical type merging machinery
2006 moved from gimple.c.
2007 (read_cgraph_and_symbols): Init and free canonical type tables
2008 here.
2009 (print_lto_report_1): Report canonical type table stats here.
2010
acf0174b
JJ
20112013-10-11 Jakub Jelinek <jakub@redhat.com>
2012
2013 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
2014
7c6fedd2
TT
20152013-09-25 Tom Tromey <tromey@redhat.com>
2016
2017 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
2018 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
2019 (lto/lto-object.o): Remove.
2020
35f32ad4
RB
20212013-09-06 Richard Biener <rguenther@suse.de>
2022
2023 * lto-symtab.c: Move from gcc/
2024 * lto.h: Include vec.h.
2025 (lto_global_var_decls): Declare.
2026 * lto.c (lto_global_var_decls): Move definition here.
2027 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
2028 (lto-symtab.o): Add.
2029 * config-lang.in (gtfiles): Add lto.h.
2030
49322b12
JH
20312013-08-31 Jan Hubicka <jh@suse.cz>
2032
ab20d992 2033 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
49322b12
JH
2034 DECL_FIELD_OFFSET can contain an reference to variable.
2035
31f1f73b
JH
20362013-08-31 Jan Hubicka <jh@suse.cz>
2037
2038 * lto.c (tree_with_vars): Turn into vector.
2039 (MAYBE_REMEMBER_WITH_VARS): Change to...
2040 (CHECK_VAR): ... this one.
2041 (CHECK_NO_VAR): New macro.
2042 (maybe_remember_with_vars_typed): Turn to ...
2043 (mentions_vars_p_typed): ... this one.
2044 (maybe_remember_with_vars_common): Turn to ...
2045 (mentions_vars_p_comon): ... this one.
2046 (maybe_remember_with_vars_decl_minimal): Turn to ...
2047 (mentions_vars_p_decl_minmal): ... this one.
2048 (maybe_remember_with_vars_decl_common): Turn to ...
2049 (mentions_vars_p_decl_common): ... this one.
2050 (maybe_remember_with_vars_decl_with_vis): Turn to ...
2051 (mentions_vars_p_decl_with_vis): ... this one.
2052 (maybe_remember_with_vars_decl_non_common): Turn to ...
2053 (mentions_vars_p_decl_non_common): ... this one.
2054 (maybe_remember_with_vars_function): Turn to ...
2055 (mentions_vars_p_function): ... this one.
2056 (maybe_remember_with_vars_field_decl): Turn to ...
2057 (mentions_vars_p_field_decl): ... this one.
2058 (maybe_remember_with_vars_type): Turn to ...
2059 (mentions_vars_p_type): ... this one.
2060 (maybe_remember_with_vars_binfo): Turn to ...
2061 (mentions_vars_p_binfo): ... this one.
2062 (maybe_remember_with_vars_constructor): Turn to ...
2063 (mentions_vars_p_constructor): ... this one.
2064 (maybe_remember_with_vars_expr): Turn to ...
2065 (mentions_vars_p_expr): ... this one.
2066 (maybe_remember_with_vars): Turn to ...
2067 (mentions_vars_p): ... this one.
2068 (lto_read_decls): Update.
2069 (LTO_SET_PREVAIL): Do not call function for internal decls.
2070 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2071 check that something was updated.
2072 (lto_fixup_state): Do not care about internal decls.
2073 (lto_fixup_decls): Update.
2074 (read_cgraph_and_symbols): Update.
2075
256eefa9
JH
20762013-08-29 Jan Hubicka <jh@suse.cz>
2077
2078 * lto.c (read_cgraph_and_symbols): Free decl states.
2079
0170f33c
JH
20802013-08-29 Jan Hubicka <jh@suse.cz>
2081
2082 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2083 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2084 TYPE_FINAL_P.
2085
c01c111b
JH
20862013-08-28 Jan Hubicka <jh@suse.cz>
2087
2088 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2089 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2090 (unify_scc): Do checking assert.
2091
6a49f3c9
JH
20922013-08-06 Jan Hubicka <jh@suse.cz>
2093 Martin Liska <marxin.liska@gmail.com>
2094
ab20d992 2095 * lto-partition.c (lto_balanced_map): Always base order on
6a49f3c9
JH
2096 source file order.
2097
a2e2a668
JH
20982013-08-06 Jan Hubicka <jh@suse.cz>
2099
2100 * lto.c (lto_materialize_function): Do not read body anymore.
2101
815effe1
JH
21022013-08-02 Jan Hubicka <jh@suse.cz>
2103
2104 * lto.c (lto_materialize_function): Do not push struct function.
2105 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2106 (may_need_named_section_p): Even abstract origins may need
2107 named section.
2108
315f8c0e
DM
21092013-07-30 David Malcolm <dmalcolm@redhat.com>
2110
2111 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2112 PASS_MANAGER_H.
2113
2114 * lto.c (do_whole_program_analysis): Update for move of
2115 all_regular_ipa_passes from a global to a field of class
2116 pass_manager.
2117
1aa95df7
OB
21182013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2119
2120 * lto-partition.c: Fix typos.
2121
c525ba9a
JH
21222013-06-20 Jan Hubicka <jh@suse.cz>
2123
2124 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2125 partitioning of variables.
2126
7a89ad00
JH
21272013-06-20 Jan Hubicka <jh@suse.cz>
2128
2129 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2130
6a6dac52
JH
21312013-06-19 Jan Hubicka <jh@suse.cz>
2132
2133 * lto-partition.c (add_references_to_partition): Use
2134 ctor_for_folding.
2135
ac0511f2
RB
21362013-06-18 Richard Biener <rguenther@suse.de>
2137
2138 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2139 and use it.
2140 (lto_register_function_decl_in_symtab): Likewise.
2141 (cmp_tree): New function.
2142 (unify_scc): Instead of using the streamer cache map from entry
2143 to cache index match up the two maps we have by sorting them.
2144 Adjust calls to lto_register_var_decl_in_symtab and
2145 lto_register_function_decl_in_symtab.
2146
ee03e71d
RB
21472013-06-17 Richard Biener <rguenther@suse.de>
2148
2149 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2150 * lto.c: Include data-streamer.h.
2151 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2152 (gimple_type_leader_entry_s, gimple_type_leader,
2153 gimple_lookup_type_leader): Remove.
2154 (gtc_visit): Simplify.
2155 (gimple_types_compatible_p): Likewise.
2156 (gimple_register_type_1): Likewise. Merge into ...
2157 (gimple_register_type): ... this. Keep it as legacy for
2158 statistics purposes for now.
2159 (fixup_integer_cst): Remove.
2160 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2161 rename to ...
2162 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2163 maybe_remember_with_vars_*): ... these.
2164 (uniquify_nodes): Remove.
2165 (lto_fixup_prevailing_type): New function.
2166 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2167 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2168 (num_merged_types, num_prevailing_types, num_not_merged_types,
2169 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2170 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2171 num_scc_compare_collisions): New global counters.
2172 (compare_tree_sccs_1): New function.
2173 (compare_tree_sccs): Likewise.
2174 (unify_scc): Likewise.
2175 (lto_read_decls): Stream in tree SCCs and unify them on the
2176 way in. Finalize prevailing SCC tree members.
2177 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2178 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2179 to ggc-collect during merging.
2180 (print_lto_report_1): Adjust for new merging code.
2181
ca0f62a8
JH
21822013-06-12 Jan Hubicka <jh@suse.cz>
2183
2184 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2185
bbf9ad07
JH
21862013-06-12 Jan Hubicka <jh@suse.cz>
2187
2188 * lto.c (register_resolution): Take lto_file_data argument.
2189 (lto_register_var_decl_in_symtab,
2190 lto_register_function_decl_in_symtab): Update.
2191 (read_cgraph_and_symbols): Update resolution_map handling.
2192
ecdbd01a 21932013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2194
2195 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2196 (add_symbol_to_partition_1): Likewise.
2197 (contained_in_symbol): Likewise.
2198 (lto_balanced_map): Likewise.
2199 (rename_statics): Drop weakref.
2200
a367df53
RB
22012013-06-05 Richard Biener <rguenther@suse.de>
2202
2203 * lto.c (num_merged_types): New global variable.
2204 (uniquify_nodes): Increase num_merged_types when merging a type.
2205 (print_lto_report_1): Output the number of merged types.
2206
40a7fe1e
JH
22072013-06-01 Jan Hubicka <jh@suse.cz>
2208
2209 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2210 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2211 (do_whole_program_analysis): Update dumping.
2212
e70670cf
JH
22132013-05-29 Jan Hubicka <jh@suse.cz>
2214
2215 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2216 flags.
2217 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2218
8ee05051
JH
22192013-05-15 Jan Hubicka <jh@suse.cz>
2220
2221 * lto-partition.c (privatize_symbol_name): Return true when
2222 privatizing happened.
2223 (rename_statics): Do not go into infinite loop when privatizing
2224 is not needed.
2225
427b248d
JM
22262013-05-16 Jason Merrill <jason@redhat.com>
2227
2228 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2229
9de04252
MJ
22302013-05-15 Martin Jambor <mjambor@suse.cz>
2231
2232 * lto-partition.c (lto_balanced_map): Print symbol order instead
2233 of node uids.
2234
2d6e4603
JH
22352013-05-15 Jan Hubicka <jh@suse.cz>
2236
2237 PR lto/57038
2238 PR lto/47375
2239 * lto-partition.c (get_symbol_class): Fix weakrefs.
2240 (lto_balanced_map): Fix weakrefs.
2241 (privatize_symbol_name): Remove unnecesary label.
2242 (rename_statics): Handle weakrefs as statics.
2243
64cfa6c0
JH
22442013-05-09 Jan Hubicka <jh@suse.cz>
2245 Richard Biener <rguenther@suse.de>
2246
2247 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2248 (lto_register_var_decl_in_symtab): Likewise.
2249 (lto_main): Promote statics.
2250 * lto-partition.c (privatize_symbol_name): New function.
2251 (promote_symbol): Use it.
2252 (may_need_named_section_p): New predicate.
2253 (rename_statics): New functions.
2254 (lto_promote_cross_file_statics): Simplify; do renaming.
2255 (lto_promote_statics_nonwpa): New function.
2256 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2257
e45cde98
RB
22582013-02-08 Richard Biener <rguenther@suse.de>
2259
2260 PR lto/56231
2261 * lto-lang.c (lto_init): Do not enter a dummy file.
2262
6edc3e32
UB
22632013-02-07 Uros Bizjak <ubizjak@gmail.com>
2264
2265 PR bootstrap/56227
2266 * lto.c (lto_resolution_ready): Use %wx instead of
2267 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2268
ed73881e
RG
22692013-02-04 Richard Guenther <rguenther@suse.de>
2270
2271 PR lto/56168
2272 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2273 or lto_fixup_decls at LTRANS time.
2274
a19b1432
JH
22752013-01-09 Jan Hubicka <jh@suse.cz>
2276
2277 PR lto/45375
2278 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2279
49c01f87
L
22802012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2281
2282 PR lto/55466
2283 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2284 variables.
2285 (lto_main): Record the global variables if WPA isn't enabled.
2286
6e1aa848
DN
22872012-11-20 Diego Novillo <dnovillo@google.com>
2288 Jakub Jelinek <jakub@redhat.com>
2289
2290 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2291
9771b263
DN
22922012-11-16 Diego Novillo <dnovillo@google.com>
2293
2294 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2295
2296 * lto-lang.c: Use new vec API in vec.h.
2297 * lto-partition.c: Likewise.
2298 * lto-partition.h: Likewise.
2299 * lto.c: Likewise.
2300
24551b9c
LC
23012012-10-31 Lawrence Crowl <crowl@google.com>
2302
2303 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2304 down-cast via dyn_cast.
2305 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2306 (undo_partition): Likewise.
2307 (lto_balanced_map): Likewise.
2308 (get_symbol_class): Likewise and via is_a.
2309 (lto_balanced_map): Change symtab checking to is_a.
2310
aec06f6f
RB
23112012-10-12 Richard Biener <rguenther@suse.de>
2312
2313 PR lto/54898
2314 * lto.c (gimple_types_compatible_p_1): Also compare
2315 TYPE_MAIN_VARIANT.
2316 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2317
0b8c30f9
TB
23182012-10-09 Tobias Burnus <burnus@net-b.de>
2319
2320 * lto-lang.c (lto_register_builtin_type): Avoid useless
2321 decl creation.
2322 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2323
da3202a8
TB
23242012-10-08 Tobias Burnus <burnus@net-b.de>
2325
2326 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2327 Free lto_file struct after closing the file.
2328
2512a443
JH
23292012-10-08 Jan Hubicka <jh@suse.cz>
2330
ab20d992 2331 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2512a443
JH
2332 (fixup_integer_cst): New functoin.
2333 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2334
e75f8f79
JH
23352012-10-07 Jan Hubicka <jh@suse.cz>
2336
2337 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2338 release input encoders.
2339 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2340
46591697
JH
23412012-10-06 Jan Hubicka <jh@suse.cz>
2342
ab20d992 2343 PR lto/54790
46591697
JH
2344 * lto.c (resolution_map): New static var.
2345 (register_resolution): New function.
2346 (lto_register_var_decl_in_symtab): Use it.
2347 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2348
af16bc76
MJ
23492012-09-20 Martin Jambor <mjambor@suse.cz>
2350
2351 * lto.c (lto_materialize_function): Call push_struct_function and
2352 pop_cfun.
2353
5368224f
DC
23542012-09-19 Dehao Chen <dehao@google.com>
2355
ab20d992 2356 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
5368224f 2357
b5493fb2
JH
23582012-09-19 Jan Hubicka <jh@suse.cz>
2359
2360 * lto.c (lto_materialize_function): Update confused comment.
2361 (read_cgraph_and_symbols): Do not free symtab.
2362
c3c445e1
JH
23632012-09-12 Jan Hubicka <jh@suse.cz>
2364
2365 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2366 AUX pointer cleaning. Add max partitioning.
2367 * lto-partition.c (enum symbol_class): New.
2368 (get_symbol_class): New function.
2369 (symbol_partitioned_p): New function.
2370 (add_references_to_partition): Remove.
2371 (add_aliases_to_partition): Remove.
2372 (add_cgraph_node_to_partition_1): Remove.
2373 (add_cgraph_node_to_partition): Remove.
2374 (add_symbol_to_partition): New function.
2375 (add_symbol_to_partition_1): New function.
2376 (contained_in_symbol): New function.
2377 (partition_cgraph_node_p): Remove.
2378 (partition_varpool_node_p): Remove.
2379 (partition_symbol_p): Remove.
2380 (lto_1_to_1_map): Cleanup.
2381 (lto_max_map): New.
2382 (lto_balanced_map): Update.
2383 (lto_promote_cross_file_statics): Update.
2384 * lto-partition.h (lto_max_map): Declare.
2385 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2386
b5c7cdfb
JH
23872012-09-11 Jan Hubicka <jh@suse.cz>
2388
2389 PR lto/54312
2390 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2391 type is variant leader.
2392
b29402f0
RG
23932012-09-11 Richard Guenther <rguenther@suse.de>
2394
2395 * lto.c (enum gtc_mode): Remove.
2396 (struct type_pair_d): Adjust.
2397 (lookup_type_pair): Likewise.
2398 (gimple_type_leader): Do not mark as deletable.
2399 (gimple_lookup_type_leader): Adjust.
2400 (gtc_visit): Likewise.
2401 (gimple_types_compatible_p_1): Likewise.
2402 (gimple_types_compatible_p): Likewise.
2403 (gimple_type_hash): Likewise.
2404 (gimple_register_type): Likewise.
2405 (read_cgraph_and_symbols): Manage lifetime of tables
2406 here.
2407
b8f4e58f
RG
24082012-09-11 Richard Guenther <rguenther@suse.de>
2409
2410 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2411 struct type_pair_d, lookup_type_pair, struct sccs,
2412 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2413 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2414 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2415 visit, iterative_hash_name, struct type_hash_pair,
2416 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2417 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2418 Move here from gimple.c
2419 (read_cgraph_and_symbols): Free hash tables here.
2420 (print_lto_report_1): New function wrapping print_lto_report.
2421 (do_whole_program_analysis): Call it.
2422 (lto_main): Likewise.
2423
1cdbb3f9
JH
24242012-09-10 Jan Hubicka <jh@suse.cz>
2425
2426 * lto-partition.c (partition_symbol_p): Forward declare.
2427 (add_references_to_partition): Reimplement using partition_symbol_p.
2428 (add_aliases_to_partition): Break out from add_references_to_partition;
2429 reimplement using partition_symbol_p.
2430 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2431 add sanity checks.
2432 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2433 (partition_varpool_node_p): Do not special case aliases.
2434
b4661bfe
JH
24352012-08-12 Jan Hubicka <jh@suse.cz>
2436
2437 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2438 it is deleted after streaming.
2439 * lto-partition.c (partition_symbol_p): New function.
2440 (promote_var, promote_fn): Remove.
2441 (promote_symbol): New function.
2442 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2443 to lookup the actual boundaries instead of computing them ad-hoc.
2444
7b99cca4
JH
24452012-08-12 Jan Hubicka <jh@suse.cz>
2446
2447 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2448 in partitioning.
2449 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2450 by encoder.
2451 * lto-partition.c (new_partition): Update.
2452 * lto.c (cmp_partitions_order): Update.
2453 (lto_wpa_write_files): Update.
2454 (free_ltrans_partitions): Update.
2455 (add_references_to_partition): Update.
2456 (add_cgraph_node_to_partition_1): Update.
2457 (add_cgraph_node_to_partition): Update.
2458 (add_varpool_node_to_partition): Update.
2459 (undo_partition): Update.
2460 (lto_balanced_map): Update.
2461 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2462 set_referenced_from_this_partition_p): Update.
2463 (lto_promote_cross_file_statics): Update.
2464
f27c1867
JH
24652012-08-12 Jan Hubicka <jh@suse.cz>
2466
2467 * lto-partition.c (set_referenced_from_other_partition_p,
2468 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2469 New functions.
2470 (lto_promote_cross_file_statics): Use them.
2471
ab96cc5b
JH
24722012-07-24 Jan Hubicka <jh@suse.cz>
2473
2474 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2475
0229aee9
UB
24762012-07-24 Uros Bizjak <ubizjak@gmail.com>
2477
2478 * lto-tree.h (lang_decl): Add variable_size GTY option.
2479
7ee2468b
SB
24802012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2481
2482 * lto.c: Do not include timevar.h.
2483 * Make-lang.in: Fix dependencies.
2484
a910399d
LC
24852012-06-18 Lawrence Crowl <crowl@google.com>
2486
ab20d992 2487 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2488 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2489 to lto_wpa_write_files.
ab20d992 2490 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
a910399d
LC
2491 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2492 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2493 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2494 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2495 to be a front end, but is not one.
2496
877ab5e9
JH
24972012-05-18 Jan Hubicka <jh@suse.cz>
2498
2499 * lto.c (lto_materialize_constructors_and_inits): Remove.
2500 (read_cgraph_and_symbols): Remove handling of alias pairs.
2501
6649df51
JH
25022012-05-17 Jan Hubicka <jh@suse.cz>
2503
2504 * lto-partition.c (add_references_to_partition): Handle external vars.
2505 (partition_varpool_node_p): Likewise.
2506 (lto_promote_cross_file_statics): Do not promote externals.
2507
d1ede5f4
BS
25082012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2509
2510 * lto-lang.c (handle_fnspec_attribute): New static function.
2511 (lto_attribute_table): Add "fn spec".
2512 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2513
0d6bf48c
JH
25142012-05-04 Jan Hubicka <jh@suse.cz>
2515
2516 * lto.c (do_whole_program_analysis): Set timevars correctly.
2517 (lto_main): Likewise.
d1ede5f4 2518
1d67dde8
RB
25192012-05-04 Richard Guenther <rguenther@suse.de>
2520
2521 * lang.opt (fwpa): Do not mark as Optimization.
2522 (fltrans): Likewise.
2523
65d630d4
JH
25242012-04-30 Jan Hubicka <jh@suse.cz>
2525
2526 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2527 * lto-partition.c (partition_cgraph_node_p): Use
2528 symtab_used_from_object_file_p.
65d630d4
JH
2529 (partition_varpool_node_p): Likewise.
2530
ead84f73
JH
25312012-04-20 Jan Hubicka <jh@suse.cz>
2532
2533 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2534
5932a4d4
JH
25352012-04-18 Jan Hubicka <jh@suse.cz>
2536
2537 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2538 Update for new ipa-ref API.
2539
65c70e6b
JH
25402012-04-16 Jan Hubicka <jh@suse.cz>
2541
2542 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2543 walkers to walk cgraph and varpool.
65c70e6b
JH
2544 (materialize_cgraph): Likewise.
2545 * lto-partition.c (lto_1_to_1_map): Likewise.
2546 (lto_balanced_map): Likewise.
2547 (lto_promote_cross_file_statics): Likewise.
2548
960bfb69
JH
25492012-04-14 Jan Hubicka <jh@suse.cz>
2550
2551 * lto.c: Update field referenced for new cgraph/varpool layout.
2552 * lto-partition.c: Likewise.
2553
a66dc285
JH
25542012-04-11 Jan Hubicka <jh@suse.cz>
2555
2556 * lto.c: Update copyright; remove params.h, ipa-inline.h
2557 and ipa-utils.h inlines; inline lto-partition.h
2558 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2559 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2560 add_references_to_partition, add_cgraph_node_to_partition_1,
2561 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2562 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2563 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2564 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2565 * lto-partition.c: ... here; new file.
2566 * lto-partition.h: New file.
2567 * Make-lang.in (lto.o): Update dependencies.
2568 (lto-partition.o): New.
2569
f3b249e5
RG
25702012-04-05 Richard Guenther <rguenther@suse.de>
2571
2572 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2573 definition.
2574
21fa2faf
RG
25752012-03-12 Richard Guenther <rguenther@suse.de>
2576
2577 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2578
6bb485a3
RG
25792012-03-06 Richard Guenther <rguenther@suse.de>
2580
2581 PR lto/52097
2582 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2583
95510497
RG
25842012-02-28 Richard Guenther <rguenther@suse.de>
2585
2586 PR lto/52400
2587 * lto.c (lto_register_function_decl_in_symtab): Do not register
2588 a reverse renamed decl mapping.
2589
09228fef
JJ
25902012-01-06 Jakub Jelinek <jakub@redhat.com>
2591
2592 PR lto/51774
2593 * lto-lang.c (handle_returns_twice_attribute): New function.
2594 (lto_attribute_table): Add returns_twice attribute.
2595
b03eda0d
RG
25962011-12-21 Richard Guenther <rguenther@suse.de>
2597
2598 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2599 (LTO_FIXUP_TREE): Use it.
2600 (uniquify_nodes): Mark new non-prevailing types and avoid
2601 calling gimple_register_type on others.
2602 (lto_read_decls): Add comment.
2603
4ad9a9de
EB
26042011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2605
2606 * lto.h (lto_parse_hex): Delete.
2607 * lto.c (lto_read_decls): Use 'int' for offsets.
2608 (lto_parse_hex): Make static and return proper 64-bit host type.
2609 (lto_resolution_read): Use proper 64-bit host type.
2610
ea973bad
RG
26112011-12-13 Richard Guenther <rguenther@suse.de>
2612
2613 PR lto/48354
2614 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2615 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2616
c8218030
UB
26172011-12-01 Uros Bizjak <ubizjak@gmail.com>
2618
2619 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2620 (ignore_attribute): New.
2621
57ac2606
AH
26222011-11-21 Aldy Hernandez <aldyh@redhat.com>
2623
2624 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2625 (handle_transaction_pure_attribute): New.
2626
52a35ef7
RG
26272011-11-03 Richard Guenther <rguenther@suse.de>
2628
2629 PR lto/44965
2630 * lto-lang.c (lto_post_options): Do not read file options.
2631 * lto.c (lto_read_all_file_options): Remove.
2632 (lto_init): Call lto_set_in_hooks here.
2633
51973b1e
JH
26342011-10-09 Jan Hubicka <jh@suse.cz>
2635
2636 * lto.c (node_cmp, varpool_node_cmp): New functions.
2637 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2638 (cmp_partitions): Rename to ...
2639 (cmp_partitions_size): ... this one.
2640 (cmp_partitions_order): New function.
2641 (lto_wpa_write_files): Sort partitions by order when
2642 -fno-toplevel-reorder is used.
2643
5958009b
AK
26442011-10-09 Andi Kleen <ak@linux.intel.com>
2645
2646 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2647
e79983f4
MM
26482011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2649
2650 * lto-lang.c (def_builtin_1): Delete old interface with two
2651 parallel arrays to hold standard builtin declarations, and replace
2652 it with a function based interface that can support creating
2653 builtins on the fly in the future. Change all uses, and poison
2654 the old names. Make sure 0 is not a legitimate builtin index.
2655
ecdbd01a 26562011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2657
2658 * lto-object.c (lto_obj_add_section_data): Add list.
2659 (lto_obj_add_section): Fill in list.
2660 (ltoobj_build_section_table): Pass through list.
2661 * lto.c (file_data_list): Declare.
2662 (create_subid_section_table): Pass arguments directly.
2663 Fill in list of file_datas.
2664 (lwstate): Delete.
2665 (lto_create_files_from_ids): Pass in direct arguments.
2666 Don't maintain list.
2667 (lto_file_read): Use explicit section and file data lists.
2668 (lto_read_all_file_options): Pass in section_list.
2669 * lto.h (lto_obj_build_section_table): Add list.
2670 (lto_section_slot): Add next.
2671 (lto_section_list): Declare.
2672
ed0d2da0
JH
26732011-10-02 Jan Hubicka <jh@suse.cz>
2674
2675 PR lto/47247
2676 * common.c (lto_resolution_str): Add new resolution.
2677 * common.h (lto_resolution_str): Likewise.
2678
ad7715f3
L
26792011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2680 Andi Kleen <ak@linux.intel.com>
2681
2682 PR lto/50568
2683 * lto.c (lto_splay_tree_delete_id): New.
2684 (lto_splay_tree_compare_ids): Likewise.
2685 (lto_splay_tree_lookup): Likewise.
2686 (lto_splay_tree_id_equal_p): Likewise.
2687 (lto_splay_tree_insert): Likewise.
2688 (lto_splay_tree_new): Likewise.
2689 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2690 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2691 (create_subid_section_table): Use lto_splay_tree_lookup and
2692 lto_splay_tree_insert.
2693 (lto_file_read): Use lto_splay_tree_new.
2694
ecdbd01a 26952011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2696
2697 * lto.c (lto_resolution_read): Remove id dumping.
2698 (lto_section_with_id): Turn id HOST_WIDE_ID.
2699 (create_subid_section_table): Dito.
2700
892a371f
DS
27012011-08-28 Dodji Seketeli <dodji@redhat.com>
2702
2703 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2704 linemap_add twice.
2705
f82d1a94
MJ
27062011-08-11 Martin Jambor <mjambor@suse.cz>
2707
2708 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2709
f0efc7aa
DN
27102011-08-08 Diego Novillo <dnovillo@google.com>
2711
2712 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2713 * lto.c: Include tree-streamer.h.
2714
1a072294
RG
27152011-07-06 Richard Guenther <rguenther@suse.de>
2716
2717 * lto-lang.c (lto_init):
2718 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2719
7496868d
JH
27202011-06-11 Jan Hubicka <jh@suse.cz>
2721
10f13f22 2722 PR lto/48246
7496868d
JH
2723 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2724 (lto_balanced_map): Likewise.
2725
39e2db00
JH
27262011-06-11 Jan Hubicka <jh@suse.cz>
2727
2728 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2729 (add_cgraph_node_to_partition) ... here; walk aliases.
2730 (lto_1_to_1_map): Remove same body alias code.
2731 (promote_fn): Likewise.
2732 (lto_promote_cross_file_statics): Update comment.
2733
28628ea6
DN
27342011-06-07 Diego Novillo <dnovillo@google.com>
2735
2736 * lto.c (uniquify_nodes): Move code to register decls to
2737 the loop that computes canonical types.
2738
009db074
RG
27392011-06-07 Richard Guenther <rguenther@suse.de>
2740
2741 * lto-lang.c (lto_init): Do not set
2742 size_type_node or call set_sizetype.
2743
47c79d56
DN
27442011-06-04 Diego Novillo <dnovillo@google.com>
2745
2746 * lto.c (lto_init): New.
2747 (lto_main): Call it.
2748
d5828cc7
DN
27492011-06-03 Diego Novillo <dnovillo@google.com>
2750
2751 * lto.c (get_resolution): Move from lto-streamer-in.c.
2752 (lto_register_var_decl_in_symtab): Likewise.
2753 (lto_register_function_decl_in_symtab): Likewise.
2754 (uniquify_nodes): Call lto_register_var_decl and
2755 lto_register_function_decl_in_symtab after reading a new
2756 VAR_DECL or FUNCTION_DECL.
2757
6807da97
RG
27582011-06-01 Richard Guenther <rguenther@suse.de>
2759
2760 * lto-lang.c (lto_register_canonical_types): New function.
2761 (lto_init): Register common nodes with the canonical type machinery.
2762 Do not play tricks with char_type_node.
2763
d74be317
RG
27642011-05-26 Richard Guenther <rguenther@suse.de>
2765
2766 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2767
d9f8303f
NF
27682011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2769
2770 * lto.c (lto_ft_typed): New function.
2771 (lto_ft_common): Call it.
2772 (lto_ft_constructor): Likewise.
2773 (lto_ft_expr): Likewise.
2774 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2775 TREE_CHAIN.
2776
fb291a1e
RG
27772011-05-20 Richard Guenther <rguenther@suse.de>
2778
2779 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2780 (lto_ft_type): Move main-variant and pointer-to chain building ...
2781 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2782 in a separate final loop.
2783
31b3ca64
RG
27842011-05-19 Richard Guenther <rguenther@suse.de>
2785
2786 * lto.c (uniquify_nodes): First register all types before
2787 fixing up the tree SCC.
2788
35d828c5
JH
27892011-05-11 Jan Hubicka <jh@suse.cz>
2790
2791 PR lto/48952
2792 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2793
51545682
NF
27942011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2795
2796 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2797 location of binfo field.
2798 (lto_fixup_prevailing_decls): Likewise.
2799
8242dd04
NF
28002011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2801
2802 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2803 build_function_type_array or build_varargs_function_type_array
2804 instead.
2805
c99c0026
EB
28062011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2807
2808 * lto-lang.c (global_bindings_p): Return bool.
2809
c47d0034
JH
28102011-05-07 Jan Hubicka <jh@suse.cz>
2811
a9bcb3f0
EB
2812 * lto.c (lto_materialize_function): Use
2813 cgraph_function_with_gimple_body_p.
2814 (add_cgraph_node_to_partition): Do not re-add items to partition;
2815 handle thunks.
c47d0034
JH
2816 (add_varpool_node_to_partition): Do not re-add items to partition.
2817
bb3398ca
JH
28182011-05-03 Jan Hubicka <jh@suse.cz>
2819
2820 * lto.c (free_ltrans_partitions): Fix accidental commit.
2821
1cb1a99f
JH
28222011-05-03 Jan Hubicka <jh@suse.cz>
2823
2824 * lto.c (ltrans_partition_def): Remove GTY annotations.
2825 (ltrans_partitions): Move to heap.
2826 (new_partition): Update.
2827 (free_ltrans_partitions): New function.
2828 (lto_wpa_write_files): Use it.
2829
af8bca3c
MJ
28302011-04-29 Martin Jambor <mjambor@suse.cz>
2831
2832 * lto.c: Include ipa-utils.h.
2833 (lto_balanced_map): Update call to ipa_reverse_postorder.
2834 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2835
b823cdfe
MM
28362011-04-29 Michael Matz <matz@suse.de>
2837
2838 * lto.c (toplevel): Include tree-flow.h.
2839 (lto_read_in_decl_state): Don't merge types here.
2840 (tree_with_vars): New static hash table.
2841 (remember_with_vars): New static functions.
2842 (LTO_FIXUP_TYPE): New macro.
2843 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2844 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2845 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2846 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2847 (lto_read_decls): Uniquify while reading in trees.
2848 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2849 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2850 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2851 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2852 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2853 lto_fixup_tree): Remove.
2854 (lto_fixup_state): Remove data argument. Use
2855 lto_symtab_prevailing_decl.
2856 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2857 (lto_fixup_prevailing_decls): New function.
2858 (lto_fixup_state_aux): Argument aux is unused.
2859 (lto_fixup_decls): Don't allocate pointer sets, don't use
2860 lto_fixup_tree, use lto_fixup_prevailing_decls.
2861 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2862 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2863
b9843260
EB
28642011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2865
2866 * lto.c (lto_balanced_map): Fix typos in head comment.
2867 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2868 test.
2869
e7f23018
JH
28702011-04-16 Jan Hubicka <jh@suse.cz>
2871
2872 * lto.c (lto_balanced_map): Update.
2873
10a5dd5d
JH
28742011-04-14 Jan Hubicka <jh@suse.cz>
2875
2876 * lto.c: Include ipa-inline.h
b9843260
EB
2877 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2878 accessor.
10a5dd5d
JH
2879 (ipa_node_duplication_hook): Fix declaration.
2880 * Make-lang.in (lto.o): Update dependencies.
2881
81f653d6
NF
28822011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2883
2884 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2885 calling TREE_CHAIN.
2886 * lto.c (lto_fixup_common): Likewise.
2887
dcf0c47e
NF
28882011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2889
2890 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2891 (handle_type_generic_attribute): Likewise.
2892
e89964e3
MM
28932011-04-03 Michael Matz <matz@suse.de>
2894
2895 * lto.c (lto_materialize_function): Don't read and then discard
2896 sections in WPA mode.
2897 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2898
2899 * lto-lang.c (registered_builtin_fndecls): Remove.
2900 (lto_getdecls): Return NULL_TREE.
2901 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2902
d2b3fe18
RG
29032011-03-31 Richard Guenther <rguenther@suse.de>
2904
2905 PR lto/48246
2906 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2907 partitions when checking is not enabled.
2908
ba78087b
KT
29092011-03-25 Kai Tietz <ktietz@redhat.com>
2910
2911 * lto.c (lto_resolution_read): Use filename_cmp instead
2912 of strcmp.
2913 (lto_read_section_data): Likewise.
2914
0edf1bb2
JL
29152011-03-25 Jeff Law <law@redhat.com>
2916
ab20d992 2917 * lto-lang.c (def_fn_type): Add missing va_end.
0edf1bb2 2918
62d784f7
KT
29192011-03-21 Kai Tietz <ktietz@redhat.com>
2920
2921 PR target/12171
2922 * lto-lang.c (lto_attribute_table): Adjust table.
2923
62dd9571
JJ
29242011-02-18 Jakub Jelinek <jakub@redhat.com>
2925
2926 PR bootstrap/47807
2927 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2928 of lto-streamer.h.
2929
237d6259
RG
29302011-02-18 Richard Guenther <rguenther@suse.de>
2931
2932 PR lto/47798
2933 * lto-tree.h (lto_global_var_decls): Do not declare here.
2934 * lto-lang.c: Include lto-streamer.h.
2935 * Make-lang.in (lto-lang.o): Adjust dependencies.
2936
8ead2223
KT
29372011-02-10 Kai Tietz <kai.tietz@onevision.com>
2938
2939 PR lto/47241
2940 * lto.c (lto_read_section_data): Free
2941 fd_name in failure case.
2942 For mingw targets don't hash file-descriptor.
2943 (read_cgraph_and_symbols): Close current_lto_file
2944 in failure case.
2945
6e701822
JH
29462011-01-11 Jan Hubicka <jh@suse.cz>
2947
2948 PR lto/45721
2949 PR lto/45375
b9843260
EB
2950 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2951 are not partitioned.
6e701822 2952
f4da8dce
NF
29532010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2954
2955 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2956 Use prototype_p.
2957
6b7fb143
RG
29582010-12-06 Richard Guenther <rguenther@suse.de>
2959
2960 PR lto/46796
2961 * lto-lang.c (lto_init): Give names to basic types.
2962
c59ffc41
JM
29632010-11-30 Joseph Myers <joseph@codesourcery.com>
2964
2965 * lto-object.c: Don't include toplev.h.
2966 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2967
7c475d11
JM
29682010-11-30 Joseph Myers <joseph@codesourcery.com>
2969
2970 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2971 $(TOPLEV_H).
2972
71f3e391
JM
29732010-11-29 Joseph Myers <joseph@codesourcery.com>
2974
2975 * lto-endian.h: Delete.
2976 * lto-object.c: Don't include "libiberty.h".
2977 (O_BINARY): Don't define.
2978 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2979 (O_BINARY): Don't define.
2980
9f1718b0
RG
29812010-11-23 Richard Guenther <rguenther@suse.de>
2982
2983 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2984
39c4e298
RG
29852010-11-23 Richard Guenther <rguenther@suse.de>
2986
2987 PR lto/46605
2988 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2989
b37421c6
JM
29902010-11-17 Joseph Myers <joseph@codesourcery.com>
2991
2992 * lto.c (lto_main): Take no arguments.
2993 * lto.h (lto_main): Update prototype.
2994
d82f74d3
ILT
29952010-11-16 Ian Lance Taylor <iant@google.com>
2996
2997 * lto-object.c (lto_obj_file_open): Call
2998 simple_object_attributes_merge rather than
2999 simple_object_attributes_compare.
3000
a4d8c676
JM
30012010-11-12 Joseph Myers <joseph@codesourcery.com>
3002
3003 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
3004 * lto-lang.c (lto_handle_option): Take location_t parameter.
3005
d8a07487
JM
30062010-11-10 Joseph Myers <joseph@codesourcery.com>
3007
3008 * lto.c (lto_resolution_read): Start diagnostics with lowercase
3009 letters and remove trailing '.'.
3010 (lto_file_finalize): Start diagnostic with a lowercase letter.
3011
6b3456d1
ILT
30122010-11-02 Ian Lance Taylor <iant@google.com>
3013
3014 * lto-object.c: New file.
3015 * lto-elf.c: Remove file.
3016 * lto-macho.c: Remove file.
3017 * lto-macho.h: Remove file.
3018 * lto-coff.c: Remove file.
3019 * lto-coff.h: Remove file.
3020 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
3021 lto/lto-object.o.
3022 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
3023 (lto/lto-objfile.o): New target.
3024 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
3025 (lto/lto.o): Remove $(LIBIBERTY_H).
3026
030cd86c
JH
30272010-10-22 Jan Hubicka <jh@suse.cz>
3028
3029 * lto.c (add_cgraph_node_to_partition,
3030 add_varpool_node_to_partition): Add debug info.
3031 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
3032 partitioned nodes.
3033 (do_whole_program_analysis): Set function flags before dumping.
3034
4490cae6
RG
30352010-10-22 Richard Guenther <rguenther@suse.de>
3036
3037 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
3038 the new gimple_register_canonical_type.
3039
703cdce3
L
30402010-10-20 H.J. Lu <hongjiu.lu@intel.com>
3041
3042 PR bootstrap/45954
3043 * config-lang.in (boot_language): Set to $enable_lto.
3044
1915c739
JJ
30452010-10-18 Jakub Jelinek <jakub@redhat.com>
3046
3047 PR lto/45638
3048 * Make-lang.in (check-lto): New dummy target.
3049
82971de5
EB
30502010-10-14 Eric Botcazou <ebotcazou@adacore.com>
3051
3052 * lto-elf.c (SHN_XINDEX): Define if not already defined.
3053
a75bfaa6
JM
30542010-10-08 Joseph Myers <joseph@codesourcery.com>
3055
3056 * lto-lang.c (lto_init_options): Change to
3057 lto_init_options_struct. Update parameters.
3058 (LANG_HOOKS_INIT_OPTIONS): Don't define.
3059 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
3060
937f7f69
JH
30612010-10-06 Jan Hubicka <jh@suse.cz>
3062
3063 * lto.c (lto_balanced_map): Fix accounting of program size.
3064
2169830c
JH
30652010-10-06 Jan Hubicka <jh@suse.cz>
3066
3067 * lto.c (lto_balanced_map): Do not produce empty partitions.
3068
ecdbd01a 30692010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
3070
3071 * lto.c (lto_process_name): Add.
3072 (lto_main): Call lto_process_name.
3073
06ed016f
JH
30742010-10-06 Jan Hubicka <jh@suse.cz>
3075
3076 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3077 COMDATs required by the linker.
3078
ae718d66
ILT
30792010-10-05 Ian Lance Taylor <iant@google.com>
3080
3081 * lto.c (lto_section_with_id): Make s a const pointer.
3082
852e4bd2
JH
30832010-10-05 Jan Hubicka <jh@suse.cz>
3084
ab20d992 3085 * lto.c: Include params.h.
852e4bd2
JH
3086 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3087 refcounting in aux field.
3088 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3089 New functions.
3090 (lto_1_to_1_map): Simplify.
3091 (lto_balanced_map): New function.
3092 (do_whole_program_analysis): Chose proper partitioning alg.
3093 * Make-lang.in (lto.o): Add dependency on params.h
3094
ecdbd01a 30952010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
3096
3097 * Make-lang.in (lto1): Add + to build rule.
3098
ecdbd01a 30992010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
3100
3101 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 3102 with fatal_error.
f1e92a43 3103
0d6e14fd
JH
31042010-09-28 Jan Hubicka <jh@suse.cz>
3105
3106 * lto-lang.c (handle_leaf_attribute): New function.
3107 (lto_attribute_tables): Add leaf.
3108
fb462383
JZ
31092010-09-25 Jie Zhang <jie@codesourcery.com>
3110
3111 * lto.c (lto_read_all_file_options): Start a new line after
3112 printing out file names.
3113
051f8cc6
JH
31142010-09-24 Jan Hubicka <jh@suse.cz>
3115
3116 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3117
64e0f5ff
JH
31182010-09-20 Jan Hubicka <jh@suse.cz>
3119
3120 PR tree-optimize/45605
3121 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3122
a929ec3d
GP
31232010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3124
3125 * lto-elf.c (lto_obj_file_open): Also provide filename when
3126 elf_begin fails.
3127
4c588abf
JH
31282010-09-17 Jan Hubicka <jh@suse.cz>
3129
3130 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3131
c3224d6f
RG
31322010-09-17 Richard Guenther <rguenther@suse.de>
3133
3134 * lang.opt (flag_wpa): Also enable for the driver.
3135
52b3b3c7
JH
31362010-09-16 Jan Hubicka <jh@suse.cz>
3137
3138 * lto.c (lto_materialize_function): Do not tamper with STATIC and
ab20d992 3139 EXTERNAL flags.
52b3b3c7 3140
969c37b7
LB
31412010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3142
3143 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3144
098a4f50
JH
31452010-09-08 Jan Hubicka <jh@suse.cz>
3146
3147 * lto.c (real_file_count, real_file_decl_data): New static vars.
3148 (read_cgraph_and_symbols): Use it.
3149
0f443ad0
RG
31502010-09-08 Richard Guenther <rguenther@suse.de>
3151
3152 * lto.c (read_cgraph_and_symbols): Collect again after each
3153 file.
3154
ee187353
JH
31552010-09-07 Jan Hubicka <jh@suse.cz>
3156
3157 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3158
b3ec52d0
RG
31592010-09-03 Richard Guenther <rguenther@suse.de>
3160
3161 * lto-elf.c (validate_file): Always error if validation fails.
3162
f1395d4a
JH
31632010-08-20 Jan Hubicka <jh@suse.cz>
3164
3165 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3166 (lto_wpa_write_files): Update comments.
3167
2429bce3
L
31682010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3169
3170 PR bootstrap/45357
3171 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3172 with has_analyzed_clone_p.
3173
e0f967db
JH
31742010-08-20 Jan Hubicka <jh@suse.cz>
3175
3176 * lto.c (has_analyzed_clone_p): New function
3177 (lto_materialize_function): Use callgraph to determine if
3178 body is needed.
3179 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3180
ac47786e
NF
31812010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3182
3183 * lto.c: Use FOR_EACH_VEC_ELT.
3184
ecdbd01a 31852010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3186
3187 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3188
5f20c657
JM
31892010-07-27 Joseph Myers <joseph@codesourcery.com>
3190
3191 * lto-lang.c (lto_handle_option): Update prototype and return
3192 value type. Remove duplicate assignment to result.
3193
7a9bf9a4
JM
31942010-07-27 Joseph Myers <joseph@codesourcery.com>
3195
3196 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3197 New.
3198 (lto_init_options): Update prototype.
3199 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3200 Define.
3201
ecdbd01a 32022010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3203
3204 PR lto/44992
92a285c1 3205 * lto.c: Include splay-tree.h
73ce4d1e
AK
3206 (lto_resolution_read): Change to walk file_ids tree and parse
3207 extra file_id in resolution file.
3208 (lto_section_with_id): Add.
3209 (create_subid_section_table): Add.
3210 (lwstate): Add.
3211 (lto_create_files_from_ids): Add.
3212 (lto_file_read): Change to handle sub file ids and create list
3213 of file_datas. Add output argument for count.
3214 (get_section_data): Pass file_data to lto_get_section_name.
3215 (lto_flatten_file): Add.
3216 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3217
ecdbd01a 32182010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3219
3220 * lto-coff.c (hash_name, eq_name): Move.
3221 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3222 * lto-elf.c: (hash_name, eq_name): Move.
3223 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3224 * lto-macho.c: (hash_name, eq_name): Move.
3225 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3226 * lto.c: (hash_name, eq_name): Move from lto-*.c
3227 (lto_obj_create_section_hash_table): Add.
3228 (free_with_string): Add.
3229
718f9c0f
MLI
32302010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3231
3232 * lto-coff.c: Include diagnostic-core.h in every file that
3233 includes toplev.h.
3234 * lto-elf.c: Likewise.
3235 * lto-lang.c: Likewise.
3236 * lto-macho.c: Likewise.
3237
1b137837
JJ
32382010-07-07 Jakub Jelinek <jakub@redhat.com>
3239
3240 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3241 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3242 objects.
3243
92eb4438
JH
32442010-07-05 Jan Hubicka <jh@suse.cz>
3245
3246 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3247 nodes from same comdat group as well as all comdat functions referenced
3248 here.
b9843260
EB
3249 (add_varpool_node_to_partition, add_references_to_partition): New
3250 function.
3251 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3252 add_varpool_node_to_partition; clear aux flags when done.
3253 (lto_promote_cross_file_statics): Do not promote stuff that gets
3254 duplicated to each ltrans.
92eb4438 3255
a05541a9
JH
32562010-07-04 Jan Hubicka <jh@suse.cz>
3257
92a285c1 3258 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3259
4a2ac96f
RG
32602010-06-13 Richard Guenther <rguenther@suse.de>
3261
3262 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3263
1d536046
KT
32642010-06-09 Kai Tietz <kai.tietz@onevision.com>
3265
ab20d992 3266 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1d536046
KT
3267 * lto-coff.c (coff_write_object_file): Add braces to if.
3268
a9429e29
LB
32692010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3270
3271 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3272 (lto_file_read): Likewise.
3273 (new_partition): Likewise.
3274 (read_cgraph_and_symbols): Likewise.
3275
5498f011
JM
32762010-06-07 Joseph Myers <joseph@codesourcery.com>
3277
3278 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3279 (lto_handle_option): Don't set flag_signed_char here.
3280
d4c0c9f6
RG
32812010-06-04 Richard Guenther <rguenther@suse.de>
3282
3283 PR lto/41584
3284 * lto.c (lto_1_to_1_map): Use the proper file_data for
3285 varpool nodes.
3286
0a5fa5a1
JH
32872010-05-30 Jan Hubicka <jh@suse.cz>
3288
3289 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3290 partitioning decisions.
3291
9eec9488
JH
32922010-05-29 Jan Hubicka <jh@suse.cz>
3293
3294 * lto.c (bitmap vector): Remove.
3295 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3296 (ltrans_partition_def): New structure.
3297 (ltrans_partition): New type and VECtor.
3298 (new_partition): New function.
3299 (add_cgraph_node_to_partition): New function.
3300 (lto_1_to_1_map): Reorganize for partitions.
3301 (lto_add_inline_clones): Remove.
3302 (lto_add_all_inlinees): Remove.
3303 (lto_promote_cross_file_statics): Use partitions.
3304 (cmp_partitions): New function.
3305 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3306 use partitions; output files sorted by size.
3307
3e097227
SB
33082010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3309
3310 * Make-lang.in: Replace vec.h dependency with VEC_H.
3311
7ca92787
JM
33122010-05-28 Joseph Myers <joseph@codesourcery.com>
3313
3314 * lto-coff.c (coff_errmsg): Remove.
3315 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3316 errors instead of coff_errmsg (-1).
3317 * lto-macho.c (mach_o_errmsg): Remove.
3318 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3319 instead of mach_o_errmsg (-1).
3320 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3321 xstrerror (errno).
3322
b5611987
RG
33232010-05-28 Richard Guenther <rguenther@suse.de>
3324
3325 * lto.c (prefix_name_with_star): Removed.
3326 (strip_extension): Likewise.
3327 (get_filename_for_set): Likewise.
3328 (lto_write_ltrans_list): Fold into ...
3329 (lto_wpa_write_files): ... this. Name LTRANS units
3330 by suffixing the ltrans output list filename.
3331 (do_whole_program_analysis): Adjust.
3332
1da2ed5f
JM
33332010-05-27 Joseph Myers <joseph@codesourcery.com>
3334
3335 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3336 (read_cgraph_and_symbols, lto_main): Use seen_error.
3337 * Make-lang.in (lto/lto.o): Update dependencies.
3338
7951d88a
EB
33392010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3340
3341 PR lto/44230
3342 * lto.h (lto_eh_personality): New prototype.
3343 * lto.c: Include debug.h.
3344 (first_personality_decl): New static variable.
3345 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3346 first function for which it is non-null.
3347 (lto_eh_personality_decl): New static variable.
3348 (lto_eh_personality): New function.
3349 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3350 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3351
e12da9c2
SB
33522010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3353
3354 * lto-lang.c: Do not include expr.h.
3355
468194f4
RG
33562010-05-24 Richard Guenther <rguenther@suse.de>
3357
3358 * lto-elf.c (lto_obj_build_section_table): Work around
3359 FreeBSD libelf issue.
3360
bd9eb5da
RG
33612010-05-22 Richard Guenther <rguenther@suse.de>
3362
3363 * lto.c (read_cgraph_and_symbols): Do not collect.
3364
66576e1b
JH
33652010-05-20 Jan Hubicka <jh@suse.cz>
3366
3367 * lto.c (promote_var, promote_fn): New functions.
3368 (lto_promote_cross_file_statics): Compute correctly boundary including
3369 static initializers of readonly vars.
3370
36576655
JH
33712010-05-18 Jan Hubicka <jh@suse.cz>
3372
66576e1b 3373 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3374 (lto_promote_cross_file_statics): Deal with non-inline clones.
3375
28632d63
JH
33762010-05-18 Jan Hubicka <jh@suse.cz>
3377
3378 * lto.c (lto_materialize_function): Announce function when
3379 reading body; allocate_struct_function only when reading body;
3380 do not finalize local statics; ggc_collect after reading;
3381 do not mark reachable node.
3382 (materialize_cgraph): Do not announce function.
3383
33e42d56
JH
33842010-05-11 Jan Hubicka <jh@suse.cz>
3385
3386 * lto.c (materialize_cgraph): Revert my previous patch.
3387
f6430ea5
KT
33882010-05-11 Kai Tietz <kai.tietz@onevision.com>
3389
3390 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3391 IMAGE_FILE_MACHINE_AMD64.
3392 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3393
0a0b07b7
JH
33942010-05-11 Jan Hubicka <jh@suse.cz>
3395
3396 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3397 (materialize_cgraph): Add it here.
3398
9a809897
JH
33992010-05-11 Jan Hubicka <jh@suse.cz>
3400
3401 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3402 vector.
3403
34042010-05-11 Jan Hubicka <jh@suse.cz>
3405
3406 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3407 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3408 use reachable_from_other_partition_p and
3409 referenced_from_other_partition_p test.
3410
94f64249
KT
34112010-05-11 Kai Tietz <kai.tietz@onevision.com>
3412
3413 * lto-coff.c (validate_file): Add x64-coff support.
3414 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3415 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3416 * lto-lang.c (lto_build_c_type_nodes): Add check for
3417 'long long unsigned int' for x64-windows.
3418 (lto_init): Likewise.
3419
c082f9f3
SB
34202010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3421
3422 * lto.h (struct lto_file_struct): Document offset member.
3423 * lto-endian.h: New file.
3424 * lto-macho.h: New file.
3425 * lto-macho.c: New file.
3426 * Make-lang.in: Add rule for lto-macho.o.
3427
3f8257db 34282010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3429
3430 PR lto/43857
3431 PR lto/43371
3432 * lang.opt (fresolution): Change to ...
3433 (fresolution=): ... this.
3434 * lto-lang.c (lto_handle_option): Adjust.
3435
48cf395b
RB
34362010-05-07 Richard Guenther <rguenther@suse.de>
3437
3438 * lto.c (DUMPBASE_SUFFIX): Remove.
3439 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3440 Rename to ...
3441 (lto_write_ltrans_list): ... only output the list of ltrans files.
3442 (lto_maybe_unlink): Remove.
3443 (do_whole_program_analysis): Do not execute LTRANS phase
3444 from here.
3445
afa83c15
L
34462010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3447
3448 * lto-lang.c (lto_handle_option): Add argument kind.
3449
369451ec
JH
34502010-05-05 Jan Hubicka <jh@suse.cz>
3451
48cf395b
RB
3452 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3453 refs.
369451ec 3454
2f41ecf5
JH
34552010-05-05 Jan Hubicka <jh@suse.cz>
3456
3457 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3458
ace72c88
JH
34592010-04-30 Jan Hubicka <jh@suse.cz>
3460
b9843260
EB
3461 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3462 use default name.
ace72c88
JH
3463 (lto_wpa_write_files): Write any non-empty partition.
3464
05575e07
JH
34652010-04-30 Jan Hubicka <jh@suse.cz>
3466
3467 * lto.c: Do not attempt to make constant pool references global.
3468
49ba8180
JH
34692010-04-28 Jan Hubicka <jh@suse.cz>
3470
ab20d992 3471 * lto.c (lto_read_in_decl_state): Use GGC.
49ba8180
JH
3472 (lto_wpa_write_files): Announce what we are writting.
3473 (all_file_decl_data): New.
3474 (read_cgraph_and_symbols): Use GGC; correct timevars.
3475 (do_whole_program_analysis): Collect.
ab20d992 3476 * Make-lang.in (lto.o): Fix dependency.
49ba8180
JH
3477 * Makefile.in (GTFILES): Add lto-streamer.h.
3478 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3479 (varpool_assemble_pending_decls): Use VAROUT.
3480 * lto-streamer.h (lto_tree_ref_table): Annotate.
3481 (lto_in_decl_state): Annotate.
3482 (lto_file_decl_data): Annotate.
3483
2942c502
JH
34842010-04-28 Jan Hubicka <jh@suse.cz>
3485
3486 * lto.c (lto_varpool_node_sets): New.
3487 (lto_1_to_1_map): Partition varpool too.
3488 (globalize_context_t, globalize_cross_file_statics,
3489 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3490 lto_scan_statics_in_remaining_global_vars): Remove.
3491 (lto_promote_cross_file_statics): Rewrite.
3492 (get_filename_for_set): Take vset argument.
3493 (lto_wpa_write_files): Pass around vsets.
3494
3bec79c5
DK
34952010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3496
3497 PR lto/42776
3498 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3499 hardcoding 'lto-elf.o'.
3500 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3501
3502 * lto-coff.h: New file.
3503 * lto-coff.c: Likewise.
3504
21aac880
RG
35052010-04-26 Richard Guenther <rguenther@suse.de>
3506
3507 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3508
2cee0101
DK
35092010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3510
3511 * lto.h (lto_elf_file_open): Rename prototype from this ...
3512 (lto_obj_file_open): ... to this.
3513 (lto_elf_file_close): Likewise ...
3514 (lto_obj_file_close): ... and likewise.
3515 (lto_elf_build_section_table): Likewise ...
3516 (lto_obj_build_section_table): ... and likewise.
3517 (lto_elf_begin_section): Likewise ...
3518 (lto_obj_begin_section): ... and likewise.
3519 (lto_elf_append_data): Likewise ...
3520 (lto_obj_append_data): ... and likewise.
3521 (lto_elf_end_section): Likewise ...
3522 (lto_obj_end_section): ... and likewise.
3523 * lto.c (lto_file_read): Update references to the above.
3524 (lto_wpa_write_files): Likewise.
3525 (lto_read_all_file_options): Likewise.
3526 (read_cgraph_and_symbols): Likewise.
3527 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3528 (LANG_HOOKS_APPEND_DATA): Likewise.
3529 (LANG_HOOKS_END_SECTION): Likewise.
3530 * lto-elf.c (lto_elf_file_open): Rename from this ...
3531 (lto_obj_file_open): ... to this, updating any references.
3532 (lto_elf_file_close): Likewise ...
3533 (lto_obj_file_close): ... and likewise.
3534 (lto_elf_build_section_table): Likewise ...
3535 (lto_obj_build_section_table): ... and likewise.
3536 (lto_elf_begin_section): Likewise ...
3537 (lto_obj_begin_section): ... and likewise.
3538 (lto_elf_append_data): Likewise ...
3539 (lto_obj_append_data): ... and likewise.
3540 (lto_elf_end_section): Likewise ...
3541 (lto_obj_end_section): ... and likewise.
3542
bc58d7e1
JH
35432010-04-21 Jan Hubicka <jh@suse.cz>
3544
3545 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3546 (materialize_cgraph): Likewise.
3547
e792884f
JH
35482010-04-21 Jan Hubicka <jh@suse.cz>
3549
3550 * lto.c (lto_wpa_write_files): Update.
3551 (read_cgraph_and_symbols): Be more verbose.
3552 (materialize_cgraph): Likewise.
3553 (do_whole_program_analysis): Likewise.
3554
c9945504
JH
35552010-04-21 Jan Hubicka <jh@suse.cz>
3556
3557 * lto.c (globalize_cross_file_statics): When function has address taken,
3558 it needs to be public.
3559
a837268b
JH
35602010-04-20 Jan Hubicka <jh@suse.cz>
3561
3562 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3563 (lto_add_all_inlinees): Likewise.
3564 (lto_wpa_write_files): Likewise.
3565
3b9e5d95
EB
35662010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3567
3568 * lto-lang.c (lto_init): Remove second argument in call to
3569 build_common_tree_nodes.
3570
8ccb78f2
RO
35712010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3572
3573 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3574 function.
3575
2f9b99e6
EB
35762010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3577
3578 PR bootstrap/43276
3579 * lto-elf.c: Define EM_* constants if not already defined.
3580
bef7d288
EB
35812010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3582
3583 * lto-elf.c (is_compatible_architecture): New static function.
3584 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3585
f68df07c
RG
35862010-02-11 Richard Guenther <rguenther@suse.de>
3587
3588 PR driver/43021
3589 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3590 appropriately.
3591
3cdea2b4
AH
35922010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3593
3594 * lto.c (O_BINARY): Define.
3595 (lto_read_section_data): Open file in binary mode.
3596 * lto-elf.c (O_BINARY): Define.
ab20d992 3597 (lto_elf_file_open): Open file in binary mode.
3cdea2b4 3598
c59449fa
RG
35992010-01-08 Richard Guenther <rguenther@suse.de>
3600
3601 PR lto/42528
3602 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3603 (lto_init): Do not init char_type_node in a standard way
3604 but according to flag_signed_char.
3605
d7fb0a6d
L
36062010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3607
3608 PR lto/41564
3609 * lto.c (DUMPBASE_SUFFIX): New.
3610 (lto_execute_ltrans): Append a sequence number to -dumpbase
3611 for LTRANS.
3612
78ce4053
L
36132010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3614
3615 PR lto/42580
3616 * lto-elf.c (lto_elf_file_open): Stop if the command line
3617 option file is missing.
3618
2a71eb48
RG
36192009-12-15 Richard Guenther <rguenther@suse.de>
3620
3621 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3622 (lto_post_options): Do not disable debuginfo.
3623
a818bca1
DG
36242009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3625
3626 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3627
e7d00517
RG
36282009-12-11 Richard Guenther <rguenther@suse.de>
3629
3630 PR lto/42037
3631 * lto.c (lto_resolution_read): Properly grow the vector.
3632
1ab53893
RG
36332009-12-11 Richard Guenther <rguenther@suse.de>
3634
3635 PR lto/41915
3636 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3637 to the C99 default. Do not set flag_unit_at_a_time.
3638
0f900dfa
JJ
36392009-11-28 Jakub Jelinek <jakub@redhat.com>
3640
3641 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3642 variable.
3643
92fa7608
RAE
36442009-11-19 Rafael Avila de Espindola <espindola@google.com>
3645
3646 PR bootstrap/42096
3647 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3648 * lto.c (lto_parse_hex): New.
3649 (lto_resolution_read): Use lto_parse_hex.
3650 * lto.h (lto_parse_hex): New.
3651
9870fe4f
RAE
36522009-11-17 Rafael Avila de Espindola <espindola@google.com>
3653
3654 * lto-elf.c (lto_file_init): Add offset argument.
3655 (lto_elf_file_open): Record the offset.
3656 * lto.c (lto_resolution_read): Change file_name into a lto_file
3657 argument. Check offsets.
3658 (lto_file_read): Update call to lto_resolution_read.
3659 * lto.h (lto_file_struct): Add the offset field.
3660
1b70729f
RAE
36612009-11-16 Rafael Avila de Espindola <espindola@google.com>
3662
3663 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3664
0e3776db
JH
36652009-11-14 Jan Hubicka <jh@suse.cz>
3666
3667 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3668
06bd7f56
RAE
36692009-11-12 Rafael Avila de Espindola <espindola@google.com>
3670
3671 * lang.opt (fresolution): Renamed from resolution.
3672 * lto-lang.c (lto_handle_option): Handle new option name.
3673 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3674
7e9dc421 36752009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3676 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3677
3678 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3679 (lto_elf_file_open): Handle offsets in arguments name@offest.
3680
b207f900
RG
36812009-10-30 Richard Guenther <rguenther@suse.de>
3682
3683 PR lto/41858
3684 * lto.c (lto_file_read): Do not set file_data->fd.
3685 (lto_read_section_data): Use a single-entry file-descriptor cache.
3686 Do not check the result of xmalloc.
3687 (free_section_data): Do not use file_data->fd.
3688 (lto_read_all_file_options): Likewise.
3689
2c928155
RG
36902009-10-22 Richard Guenther <rguenther@suse.de>
3691
3692 * lto.c (lto_fixup_jump_functions): Remove.
3693 (lto_fixup_decls): Do not fixup jump functions.
3694 (read_cgraph_and_symbols): Schedule cgraph merging after
3695 summary reading. Schedule type and decl fixup before
3696 summary reading.
3697
f9c91f8a
RB
36982009-10-22 Richard Guenther <rguenther@suse.de>
3699
3700 * lto.c (lto_fixup_data_t): Remove free_list member.
3701 (lto_fixup_tree): Do not insert into free_list.
3702 (free_decl): Remove.
3703 (lto_fixup_decls): Remove free-list handling.
3704
fb3f88cc
JH
37052009-10-22 Jan Hubicka <jh@suse.cz>
3706
3707 * lto.c (lto_fixup_jump_functions): New function.
3708 (lto_fixup_decls): Use it.
3709
35f1e9f4
RG
37102009-10-16 Richard Guenther <rguenther@suse.de>
3711
3712 PR lto/41715
3713 * lto.c (lto_fixup_tree): Revert last change.
3714
200c8750
RG
37152009-10-14 Richard Guenther <rguenther@suse.de>
3716
3717 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3718 compatible with the one we replace wrap it around a
3719 VIEW_CONVERT_EXPR.
3720
b1b07c92
RG
37212009-10-09 Richard Guenther <rguenther@suse.de>
3722
3723 PR lto/41635
3724 PR lto/41636
3725 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3726 a file.
3727 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3728 (init_ehdr##BITS): Likewise.
3729
3c2e7d45
JM
37302009-10-08 Joseph Myers <joseph@codesourcery.com>
3731
3732 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3733 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3734 diagnostics.
3735 * lto-lang.c (lto_post_options): Remove trailing "." from
3736 diagnostics.
3737
0d0bfe17
RG
37382009-10-08 Richard Guenther <rguenther@suse.de>
3739
3740 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3741 hash tables.
3742
4bedf19a
JM
37432009-10-07 Joseph Myers <joseph@codesourcery.com>
3744
3745 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3746
b20996ff
JH
37472009-10-07 Jan Hubicka <jh@suse.cz>
3748
3749 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3750 ltrans stage; explain why this is needed and should not.
3751
1a735925
RG
37522009-10-05 Richard Guenther <rguenther@suse.de>
3753
3754 PR lto/41552
3755 PR lto/41487
3756 * lto.c (lto_read_decls): Do not register deferred decls.
3757 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3758 until after reading the IPA summaries.
3759
d7f09764
DN
37602009-10-02 Rafael Avila de Espindola <espindola@google.com>
3761
3762 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3763 (lto-lang.c): Don't include lto/common.h.
3764
37652009-10-02 Rafael Avila de Espindola <espindola@google.com>
3766
3767 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3768 (lto/common.o): Remove.
3769 * common.c: Remove.
3770 * common.h (lto_kind_str): Remove.
3771 (lto_visibility_str): Remove.
3772 (lto_resolution_str): Make it static.
3773
37742009-10-01 Diego Novillo <dnovillo@google.com>
3775
3776 * lto.c (lto_read_decls): Add comment.
3777 Call internal_error instead of gcc_assert.
3778 (lto_resolution_read): Likewise.
3779 (lto_add_all_inlinees): Tidy.
3780 * Make-lang.in: Fix copyright boilerplate.
3781 (lto.pdf): New.
3782 (lto.install-pdf): New.
3783 * lto-tree.h: Fix copyright boilerplate.
3784 * lang-specs.h: Likewise.
3785 Remove ".lto" entry from compilers fragment.
3786 * lto-elf.c: Move inclusion of gelf.h after config.h.
3787 Tidy formatting everywhere.
3788 * lto.h: Fix copyright boilerplate.
3789 Tidy formatting everywhere.
3790 * common.c: Likewise.
3791 * config-lang.in: Likewise.
3792 * common.h: Likewise.
3793 * lto-lang.c: Likewise.
3794
37952009-10-01 Richard Guenther <rguenther@suse.de>
3796
3797 * lto.c (lto_read_section_data): Use plain lseek/read.
3798
37992009-10-01 Richard Guenther <rguenther@suse.de>
3800
3801 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3802 use sysconf to query the system page size.
3803 (lto_file_read): Implement fallback using stdio.
3804 (free_section_data): Likewise.
3805
38062009-09-29 Diego Novillo <dnovillo@google.com>
3807
3808 * lto-lang.c (lto_init): Really fix call to
3809 build_common_builtin_nodes.
3810
38112009-09-29 Diego Novillo <dnovillo@google.com>
3812
3813 * lto-lang.c (lto_init): Fix call to
3814 build_common_builtin_nodes.
3815
38162009-09-29 Richard Guenther <rguenther@suse.de>
3817
3818 PR lto/40754
3819 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3820 in bytes.
3821 (first_data_block): New static variable.
3822 (lto_elf_append_data): Align the first data block in each
3823 section.
3824
38252009-09-28 Diego Novillo <dnovillo@google.com>
3826
3827 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3828 * lto.c (strip_extension): New.
3829 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3830 (lto_execute_ltrans): Tidy.
3831 Do not pass -fwpa nor -fltrans-* to LTRANS.
3832 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3833 * tree.c (need_assembler_name_p): Call
3834 lang_hooks.decls.may_need_assembler_name_p if set.
3835 * varasm.c (default_binds_local_p_1): Remove check for
3836 flag_ltrans.
3837 * varpool.c (decide_is_variable_needed): Do not test for
3838 in_lto_p.
3839
38402009-09-22 Richard Guenther <rguenther@suse.de>
3841
3842 PR lto/39276
3843 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3844 * Make-lang.in: Remove ltrans-driver stuff.
3845 * config-lang.in: Likewise.
3846 * lang.opt (fltrans-driver): Remove.
3847 * lto-lang.c (lto_init_options): Remove code initializing
3848 ltrans_driver.
3849 * ltrans-driver: Remove.
3850
38512009-09-21 Diego Novillo <dnovillo@google.com>
3852
3853 * lto-lang.c (lto_define_builtins): Remove superfluous
3854 calls to targetm.init_builtins and build_common_builtin_nodes.
3855 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3856 build_common_builtin_nodes.
3857 * lto.c (lto_materialize_function): Do nothing if NODE is a
3858 clone.
3859
38602009-09-03 Diego Novillo <dnovillo@google.com>
3861
3862 * lto-elf.c (validate_file): Replace call to
3863 elf_getshstrndx with call to elf_getshdrstrndx.
3864
38652009-08-19 Richard Guenther <rguenther@suse.de>
3866
3867 * lto-lang.c (lto_init): Merge char_type_node with the
3868 appropriately signed variant.
3869
38702009-08-19 Richard Guenther <rguenther@suse.de>
3871
3872 PR lto/41071
3873 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3874 (lto_fixup_type): Re-build the pointer-to chain part two.
3875
38762009-08-19 Richard Guenther <rguenther@suse.de>
3877
3878 PR lto/41071
3879 * lto.c (lto_fixup_type): Re-build the type variant chain.
3880
38812009-08-19 Richard Guenther <rguenther@suse.de>
3882
3883 PR lto/41071
3884 * lto.c (lto_fixup_constructor): New function.
3885 (lto_fixup_tree): Replace all types. Properly fixup
3886 constructors and constants.
3887
38882009-08-14 Richard Guenther <rguenther@suse.de>
3889
3890 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3891 for DECL_LANG_SPECIFIC.
3892
38932009-08-13 Richard Guenther <rguenther@suse.de>
3894
3895 PR lto/41032
3896 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3897
38982009-07-30 Richard Guenther <rguenther@suse.de>
3899
3900 PR lto/40903
3901 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3902 the largest decl for output and free TREE_CHAIN for further
3903 use.
3904
39052009-07-24 Diego Novillo <dnovillo@google.com>
3906
3907 * Make-lang.in: Add empty lto.install-plugin target.
3908
39092009-07-13 Diego Novillo <dnovillo@google.com>
3910
3911 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3912
39132009-07-11 Richard Guenther <rguenther@suse.de>
3914
3915 * lto-lang.c (lto_write_globals): Wrapup global decls.
3916
39172009-07-10 Richard Guenther <rguenther@suse.de>
3918
3919 * lto-lang.c (lto_init): Allocate one more location to make
3920 BUILTINS_LOCATION correct.
3921
39222009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3923
3924 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3925
39262009-07-06 Diego Novillo <dnovillo@google.com>
3927
3928 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3929 TYPE_SIZE_UNIT.
3930
39312009-07-06 Diego Novillo <dnovillo@google.com>
3932
3933 * lto.c (preload_common_nodes): Remove.
3934 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3935 (lto_read_decls): Call lto_data_in_create and
3936 lto_data_in_delete.
3937 (free_decl): Do not call ggc_free.
3938 (lto_main): Call lto_init_reader.
3939 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3940 (lto_init): Initialize main_identifier_node if needed.
3941 Make ptrdiff_type_node be integer_type_node.
3942
39432009-06-19 Diego Novillo <dnovillo@google.com>
3944
3945 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3946 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3947 Remove code guarded by #ifdef LOCAL_TRACE.
3948
39492009-06-18 Diego Novillo <dnovillo@google.com>
3950
3951 * lto.c: Update license to GPLv3.
3952 * lto-elf.c: Likewise.
3953 * common.c: Likewise.
3954 * lto-lang.c: Likewise.
3955 * lto.h: Remove superfluous include files. Update all
3956 users.
3957
39582009-06-17 Diego Novillo <dnovillo@google.com>
3959
3960 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3961
39622009-06-02 Diego Novillo <dnovillo@google.com>
3963
3964 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3965 read in.
3966 (materialize_cgraph): Only materialize nodes that have a
3967 representation on file.
3968
39692009-06-01 Diego Novillo <dnovillo@google.com>
3970
3971 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3972
39732009-05-31 Diego Novillo <dnovillo@google.com>
3974
3975 * lto-lang.c (lto_type_for_mode): Handle all the modes
3976 handled in c_common_type_for_mode.
3977
39782009-05-21 Diego Novillo <dnovillo@google.com>
3979
3980 * lto-elf.c: Always include <gelf.h>.
3981 * config-lang.in (target_libs): Remove.
3982 (build_by_default): Set to no.
3983
39842009-05-15 Diego Novillo <dnovillo@google.com>
3985
3986 * lto.c (lto_materialize_function): Assert that DECL is
3987 not a builtin.
3988 (materialize_cgraph): Don't try to materialize builtin
3989 functions.
3990 * lto-section-out.c (write_symbol_vec): Do not write
3991 builtin functions.
3992
39932009-05-13 Diego Novillo <dnovillo@google.com>
3994
3995 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3996
39972009-05-07 Diego Novillo <dnovillo@google.com>
3998
3999 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
4000 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
4001 (lto_fixup_type): Call it for TYPE_POINTER_TO,
4002 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
4003 (lto_fixup_tree): Call gimple_register_type when *TP is a
4004 type.
4005 (lto_main): Call bitmap_obstack_initialize.
4006
40072009-04-22 Diego Novillo <dnovillo@google.com>
4008
4009 * lto.c (free_section_data): Tidy.
4010 (lto_1_to_1_map): Tidy.
4011 (lto_add_all_inlinees): Tidy.
4012 (prefix_name_with_star): New.
4013 (get_filename_for_set): New.
4014 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
4015 to determine what cgraph node sets to write.
4016 Call get_filename_for_set to compute temporary file
4017 names.
4018 (lto_execute_ltrans): Do not execute LTRANS on files with
4019 names that start with '*'.
4020 Move logic to execute LTRANS together so that LTRANS is
4021 invoked only if there are any files to compile.
4022 (do_whole_program_analysis): Only remove output files
4023 that do not start with '*'.
4024
40252009-04-06 Diego Novillo <dnovillo@google.com>
4026
4027 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
4028 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
4029 (lto_add_all_inlinees): Tidy.
4030
40312009-03-26 Diego Novillo <dnovillo@google.com>
4032
4033 * lto.c: Include gimple.h.
4034 (lto_read_in_decl_state): Call gimple_register_type for
4035 every type in every stream.
4036 (lto_fixup_common): Call gimple_register_type if T has a
4037 type.
4038 (do_whole_program_analysis): Call print_lto_report.
4039 (lto_main): Call print_lto_report after cgraph_optimize.
4040 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
4041
40422009-03-24 Diego Novillo <dnovillo@google.com>
4043
4044 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
4045 (lto.o): Add dependency on GIMPLE_H.
4046
40472009-03-10 Simon Baldwin <simonb@google.com>
4048
4049 * lto.c (lto_read_all_file_options): Close any open file descriptor
4050 contained in file_data before freeing.
4051
40522009-02-24 Rafael Avila de Espindola <espindola@google.com>
4053
4054 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4055 for a decl in the original bitmap, not a node.
4056 (lto_add_all_inlinees): Remove original nodes that are not needed.
4057 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4058
40592009-02-24 Diego Novillo <dnovillo@google.com>
4060
4061 * lto.c (lto_materialize_function): Update
4062 lto_stats.num_function_bodies.
4063 (get_section_data): Initialize *LEN to 0.
4064 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
4065 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
4066 Update lto_stats.num_output_files.
4067 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4068 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4069 (lto_main): Initialize lto_stats.
4070 If flag_lto_report is set, call print_lto_report.
4071
40722009-02-19 Diego Novillo <dnovillo@google.com>
4073
4074 Revert
4075
4076 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4077
4078 * lto.c (lto_add_inline_clones): Don't add the
4079 master clone. Check for a decl in the original
4080 bitmap, not a node.
4081 (lto_add_all_inlinees): Remove original nodes
4082 that are not needed.
4083 (lto_scan_statics_in_cgraph_node): Don't care if
4084 the node is the master.
4085 (lto_promote_cross_file_statics): Use a new
4086 context.seen_node_decls for each set
4087
40882009-02-19 Rafael Avila de Espindola <espindola@google.com>
4089
4090 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4091 for a decl in the original bitmap, not a node.
4092 (lto_add_all_inlinees): Remove original nodes that are not needed.
4093 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4094 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4095 for each set
4096
40972009-02-18 Diego Novillo <dnovillo@google.com>
4098
4099 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4100 and TV_WHOPR_WPA_IO.
4101 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4102 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4103 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4104 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4105 depending on command line flags.
4106 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4107 (lto_main): Remove timer uses.
4108
41092009-02-18 Rafael Avila de Espindola <espindola@google.com>
4110
4111 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4112 (lto_wpa_write_files): Update calls to renamed functions.
4113
41142009-02-17 Diego Novillo <dnovillo@google.com>
4115
4116 PR 39203
4117 * lto-lang.c (lto_post_options): Disable -fwhole-program
4118 when running LTRANS.
4119
41202009-02-10 Diego Novillo <dnovillo@google.com>
4121
4122 * lto.c (read_cgraph_and_symbols): Fix comment.
4123
41242009-02-10 Diego Novillo <dnovillo@google.com>
4125
4126 * lto.c (read_cgraph_and_symbols): Read options from all
4127 IL files.
4128
41292009-02-10 Diego Novillo <dnovillo@google.com>
4130
4131 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4132 (materialize_cgraph): Likewise.
4133 (do_whole_program_analysis): Likewise.
4134 (lto_main): Call read_cgraph_and_symbols,
4135 materialize_cgraph and do_whole_program_analysis.
4136
41372009-02-10 Simon Baldwin <simonb@google.com>
4138
4139 * lto.c: Include lto-opts.h.
4140 * (lto_main): Clear file options at loop start, read any saved
4141 options from the first file handled, and re-issue options.
4142 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4143
41442009-02-02 Diego Novillo <dnovillo@google.com>
4145
4146 * lto.c (lto_main): Stop LTO_TIMER and use
4147 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4148
41492009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4150
4151 PR lto/38995
4152 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4153 to POINTER_SIZE.
4154
41552009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4156
ab20d992 4157 * Make-lang.in (LTO_EXE): Link with all
d7f09764
DN
4158 BACKENDLIBS and not only GMPLIBS
4159
41602009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4161
4162 PR bootstrap/38992
4163 * lto-elf.c: Include gelf.h instead of libelf.h.
4164 (lto_elf_file_close): Replace elfx_update_shstrndx with
4165 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4166 gelf_update_ehdr.
4167
41682009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4169
4170 PR middle-end/38996
4171 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4172
41732009-01-26 Diego Novillo <dnovillo@google.com>
4174
4175 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4176
41772009-01-26 Diego Novillo <dnovillo@google.com>
4178
4179 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4180 and rename into gimple_types_compatible_p.
4181
41822009-01-12 Rafael Avila de Espindola <espindola@google.com>
4183
4184 * lto-lang.c (lang_hooks): Remove the const qualifier.
4185
41862009-01-06 Diego Novillo <dnovillo@google.com>
4187
4188 * ltrans-driver: Mark 'all' target as phony.
4189
41902008-12-31 Diego Novillo <dnovillo@google.com>
4191
4192 * ltrans-driver: Execute a NOP action for target 'all'.
4193
41942008-12-19 Diego Novillo <dnovillo@google.com>
4195
4196 * lto.c (lto_1_to_1_map): Tidy.
4197
41982008-12-19 Diego Novillo <dnovillo@google.com>
4199
4200 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4201 be opened, show its name.
4202 * ltrans-driver: If $verbose is set, do not use parallelism.
4203
42042008-12-17 Rafael Avila de Espindola <espindola@google.com>
4205
4206 * lto.c (lto_fixup_function): New.
4207 (lto_fixup_tree): Call lto_fixup_function.
4208
42092008-12-14 Doug Kwan <dougkwan@google.com>
4210
4211 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4212 variables if there is no function.
4213
42142008-12-10 Simon Baldwin <simonb@google.com>
4215
4216 * ltrans-driver: Always run make in silent mode, to avoid make's
4217 trace on stdout interfering with lto-wrapper output.
4218
42192008-12-10 Doug Kwan <dougkwan@google.com>
4220
4221 * lto.c (lto_add_inline_clones): Do not force master clones of
4222 inlined functions already in SET to be static inline.
4223
42242008-12-04 Doug Kwan <dougkwan@google.com>
4225
4226 * lto.c (globalize_context_t): New type to store states in
4227 globalization of cross-file statics.
4228 (globalize_cross_file_statics): New.
4229 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4230 static decls that need to be fixed up.
4231 (lto_scan_statics_in_cgraph_node): Change call interface to use
4232 a globalize_context_t CONTEXT for all states used.
4233 (lto_scan_statics_in_remaining_global_vars): New.
4234 (lto_promote_cross_file_statics): Use new call interface of
4235 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4236 visible vars in the last set.
4237
42382008-12-03 Diego Novillo <dnovillo@google.com>
4239
4240 * lto.c (lto_fixup_tree): Do not emit an error when
4241 PREVAILING throw but T doesn't.
4242
42432008-12-02 Doug Kwan <dougkwan@google.com>
4244
4245 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4246 from code in ...
4247 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4248 variables and functions.
4249 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4250 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4251
42522008-11-29 Diego Novillo <dnovillo@google.com>
4253
4254 * lto.c: Include timevar.h.
4255 (lto_materialize_function): Tidy. Add comments.
4256 (lto_wpa_write_files): Tidy.
4257 (lto_execute_ltrans): Tidy.
4258 (lto_main): Add local variable LTO_TIMER. Initialize it
4259 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4260 Start and stop the timer.
4261 Tidy comments.
4262 * Make-lang.in (lto.o): Add dependency on timevar.h.
4263 * ltrans-driver: React to -v and -save-temps.
4264 Use simple heuristic to determine how much parallelism to
4265 use when executing make.
4266
42672008-11-12 Doug Kwan <dougkwan@google.com>
4268
4269 * lto.c (lto_bitmap_obstack): Remove var.
4270 (lto_materialize_function): Do nothing instead of marking function
4271 body in file if flag_wpa is true.
4272 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4273 (lto_scan_statics_in_cgraph_node): New function.
4274 (lto_promote_cross_file_statics): Same.
4275 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4276 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4277 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4278
42792008-11-09 Diego Novillo <dnovillo@google.com>
4280
ab20d992 4281 * lto.c (lto_fixup_tree): Change error message locus
d7f09764
DN
4282 information to include location of mismatching
4283 declaration.
4284 Use TREE_NO_WARNING to avoid repeated messages.
4285 (lto_main): If lto_fixup_decls emitted any errors, exit.
ab20d992 4286 * lto-lang.c: Don't include libfuncs.h and except.h
d7f09764
DN
4287 (lto_init_options): Don't enable exceptions by default.
4288 (lto_eh_runtime_type): Move to lto-function-in.c
4289 (lto_init_eh): Likewise.
4290 (lto_init): Don't call lto_init_eh.
ab20d992 4291 * Make-lang.in (lto-lang.o): Remove dependency on
d7f09764
DN
4292 libfuncs.h and except.h.
4293
42942008-10-30 Diego Novillo <dnovillo@google.com>
4295
4296 * lto.c (lto_read_decls): Declare debug_main only if
4297 LTO_STREAM_DEBUGGING is enabled.
4298
42992008-10-30 Simon Baldwin <simonb@google.com>
4300
4301 * lto.c (lto_wpa_write_files): Create intermediate files with
4302 make_cwd_temp_file().
4303 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4304 WPA_SAVE_LTRANS is set.
4305 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4306 * ltrans-driver: Do not strip directory from output files.
4307
43082008-10-29 Doug Kwan <dougkwan@google.com>
4309
4310 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4311 DECL.
4312 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4313 (lto/lto-symtab.o): Remove rule.
4314 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4315 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4316 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4317 Remove macros.
4318 lto-symtab.c (File): Move up one level.
4319 lto-lang.c (cgraph.h): Remove include.
4320 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4321 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4322 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4323
ab20d992 43242008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4325
4326 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4327 non prevailing weak symbols.
4328
ab20d992 43292008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4330
4331 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4332
ab20d992 43332008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4334
4335 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4336 different types.
4337
43382008-10-23 Simon Baldwin <simonb@google.com>
4339
4340 * lto-lang.c (input_node): Save the node reference, rather than the
4341 node pointer, in node->inlined_to.
4342 (input_cgraph_1): Convert node references into node pointers.
4343
43442008-10-22 Diego Novillo <dnovillo@google.com>
4345 Rafael Espindola <espindola@google.com>
4346
4347 * lto.c (lto_resolution_read): Tidy.
4348 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4349 abort if RET is NULL.
4350
43512008-10-22 Doug Kwan <dougkwan@google.com>
4352
4353 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4354 exceptions flag is given.
4355 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4356 (lto_init_eh): Remove exceptions flag initialization.
ab20d992 4357 (lto_init): Only call lto_init_eh if exceptions flag is set.
d7f09764
DN
4358
43592008-10-21 Diego Novillo <dnovillo@google.com>
4360
4361 * lto.c: Tidy some formatting.
4362 * lto.h: Likewise.
4363
43642008-10-21 Simon Baldwin <simonb@google.com>
4365
4366 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4367 them is NULL (but not the other).
4368
43692008-10-17 Diego Novillo <dnovillo@google.com>
4370
4371 * ltrans-driver: Divert output from make to a temporary file.
4372 Show it if the call to make failed.
4373
43742008-10-15 Diego Novillo <dnovillo@google.com>
4375
4376 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4377 Do not print TEMP_FILENAME
4378 * ltrans-driver: Call make with -s.
4379
43802008-10-15 Diego Novillo <dnovillo@google.com>
4381
4382 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4383 TREE_STATIC on global symbols.
4384
43852008-10-14 Ollie Wild <aaw@google.com>
4386
4387 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4388 (LTRANS_DRIVER_EXE): Add.
4389 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4390 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4391 (lto.install.common): Remove ltrans-driver.
4392 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4393 (LTRANS_DRIVER_EXE): New build rule.
4394 * config-lang.in (compilers): Add ltrans-driver.
4395
43962008-10-14 Diego Novillo <dnovillo@google.com>
4397
4398 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4399 of program name.
4400
44012008-10-13 Ollie Wild <aaw@google.com>
4402
4403 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4404 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4405 * ltrans-driver (LTRANS_FLAGS): Remove.
4406
44072008-10-08 Doug Kwan <dougkwan@google.com>
4408
4409 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4410 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4411 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4412 from lto_fixup_state to here.
4413 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4414 just a free-list. Fix up types also. Move decl merging code to
4415 lto_fixup_tree.
4416 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4417 object.
4418 (lto_fixup_decls): Use another pointer set to avoid multiple
4419 walking of nodes except for DECLs to be replaced. Pass an
4420 lto_fixup_data_t object to tree-walker.
4421
ab20d992 44222008-10-08 Rafael Espindola <espindola@google.com>
d7f09764
DN
4423
4424 * lto-symtab.c (lto_symtab_set_resolution): New.
4425 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4426 lto_symtab_get_resolution.
4427 (lto_symtab_prevailing_decl): Return decl for non public decls.
4428 (lto_symtab_get_resolution): New.
4429 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4430
ab20d992 44312008-10-06 Rafael Espindola <espindola@google.com>
d7f09764
DN
4432
4433 * lto-lang.c: Include cgraph.h.
4434 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4435 input_cgraph): Moved from lto-cgraph.c.
4436 (LANG_HOOKS_INPUT_CGRAPH): New.
4437
ab20d992 44382008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4439
4440 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4441
ab20d992 44422008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4443
4444 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4445 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4446 prevailing definition. Don't mark TREE_NOTHROW differences.
4447 * lto.c (lto_fixup_tree): New.
4448 (lto_fixup_state): New.
4449 (lto_fixup_state_aux): New.
4450 (free_decl): New.
4451 (lto_fixup_decls): New.
4452 (lto_main): Call lto_fixup_decls.
4453
44542008-10-02 Ollie Wild <aaw@google.com>
4455
4456 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4457 and Init.
4458 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4459 * lto-lang.c (lto_post_options): Add validation and fixups for
4460 -fltrans and -fwpa.
4461
ab20d992 44622008-10-02 Rafael Espindola <espindola@google.com>
d7f09764
DN
4463
4464 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4465 lto_symtab_merge_decl): Return void.
4466 (lto_symtab_prevailing_decl): New.
4467
ab20d992 44682008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4469
4470 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4471 defined symbols.
4472 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4473 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4474 Check for already defined symbols.
4475 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4476 (LTO_IDENTIFIER_RESOLUTION): Remove.
4477 (LTO_DECL_RESOLUTION): New.
4478
ab20d992 44792008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4480
4481 * lto.c (lto_read_decls): Use new input_tree signature.
4482
44832008-09-26 Doug Kwan <dougkwan@google.com>
4484
4485 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4486 bodies affected by exception attribute merging of DECLs.
4487 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
ab20d992 4488 merging.
d7f09764
DN
4489
44902008-09-25 Rafael Espindola <espindola@google.com>
4491
4492 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4493 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4494 * lto-symtab.c (lto_symtab_compatible): New.
4495 (lto_symtab_overwrite_decl): New.
4496 (lto_symtab_merge_decl): Refactor to use the above functions
4497 and the resolution from lang_identifier.
4498 * lto-tree.h: Include plugin-api.h.
4499 (lang_identifier): Add resolution.
4500 (LTO_IDENTIFIER_RESOLUTION): New.
4501
45022008-09-25 Ollie Wild <aaw@google.com>
4503
4504 * lang.opt (fltrans-output-list=): New option.
4505 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4506
ab20d992 45072008-09-25 Rafael Espindola <espindola@google.com>
d7f09764
DN
4508
4509 * lto.c (lto_resolution_read): Initialize ret;
4510
45112008-09-24 Ollie Wild <aaw@google.com>
4512
4513 * lto.c (sys/mman.h): Move include.
4514 (lto_wpa_write_files): Return a list of written files.
4515 (lto_execute_ltrans): New function.
4516 (lto_main): Call lto_execute_ltrans.
4517 (ltrans-driver): New file.
4518 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4519 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4520 (lto_init_options): Initialize ltrans_driver.
4521 (lto_handle_option): Fix incorrect default output value.
4522 * lang.opt (fltrans-driver=): New option.
4523 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4524 (lto.install-common): Add lto/ltrans-driver.
4525
ab20d992 45262008-09-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4527
4528 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4529 (lto/lto.o): Depend on lto/common.h.
4530 (lto/common.o): New.
4531 * lang.opt (resolution): New.
4532 * lto-lang.c (resolution_file_name): New.
4533 (lto_handle_option): Handle OPT_resolution.
4534 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4535 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4536 pass it to lto_symtab_merge_decl.
4537 * lto.c: Include common.h.
4538 (lto_read_decls): Add resolutions and resolutions_size arguments.
4539 Initialize data_in.globals_resolution and
4540 data_in.globals_resolution_size.
4541 (index_and_symbol_resolution): New.
4542 (lto_resolution_read): New.
4543 (lto_file_read): Add argument resolution_file.
4544 Read resolution.
4545 * lto.h (resolution_file_name): New.
4546
ab20d992 45472008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4548
4549 * common.c: Update description.
4550 * common.h: Update description.
4551
ab20d992 45522008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4553
4554 * common.c: Moved from lto-plugin.
4555 * common.h: Moved from lto-plugin.
4556
45572008-09-22 Doug Kwan <dougkwan@google.com>
4558
4559 * lto.c (VEC(bitmap,heap)): Declare.
4560 (lto_materialize_function): Handle WAP mode specially.
4561 (lto_add_inline_clones): New.
4562 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4563 return a bitmap of inlined decls.
4564 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4565 (lto_main): Call reset_inline_failed to reset inlining states.
4566 Check call-graph after WPA inlining.
4567 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4568 unconditionally.
4569
45702008-09-19 Doug Kwan <dougkwan@google.com>
4571
4572 lto.c (lto_main): Remove unsued wrapper code.
4573 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4574
45752008-09-19 Rafael Espindola <espindola@google.com>
4576
4577 * lto-symtab.c: Include lto-tree-in.h.
4578 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4579 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4580 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4581
45822008-09-17 Paolo Bonzini <bonzini@gnu.org>
4583 Rafael Avila de Espindola <espindola@google.com>
4584
4585 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4586 COMPOUND_LITERAL_EXPR_DECL): Remove.
4587 (emit_local_var): Remove.
4588 (lto_expand_expr): Remove.
4589 (lto_staticp): Remove.
4590 (LANG_HOOKS_EXPAND_EXPR): Remove.
4591 (LANG_HOOKS_STATICP): Remove.
4592
45932008-09-11 Diego Novillo <dnovillo@google.com>
4594
4595 * lto-lang.c: Include except.h and libfuncs.h.
4596 (lto_init_eh): New.
4597 (lto_init): Call it.
4598 Set flag_generate_lto to 0.
4599 * Make-lang.in (lto-lang.o): Add dependency on except.h
4600 and libfuncs.h.
4601
46022008-09-09 Bill Maddox <maddox@google.com>
4603
4604 * lto-lang.c: Include header file expr.h.
4605 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4606 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
ab20d992 4607 (emit_local_var): Copied from c-semantics.c.
d7f09764
DN
4608 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4609 and c_staticp in c-common.c.
ab20d992 4610 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
d7f09764
DN
4611
46122008-09-08 Diego Novillo <dnovillo@google.com>
4613
4614 * lto-lang.c (lto_global_bindings_p): Return 1 during
4615 IPA passes.
4616
46172008-09-07 Diego Novillo <dnovillo@google.com>
4618
4619 * lto.c: Tidy formatting.
4620
46212008-08-04 Bill Maddox <maddox@google.com>
4622
4623 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
ab20d992 4624
d7f09764
DN
46252008-09-03 Doug Kwan <dougkwan@google.com>
4626
4627 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4628 CIF_OK instead of NULL.
4629
46302008-09-02 Diego Novillo <dnovillo@google.com>
4631 Simon Baldwin <simonb@google.com>
4632
4633 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4634 c_common_type_for_size.
4635 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4636 (lto_init): Call linemap_add.
4637 (signed_and_unsigned_types): Remove.
4638
46392008-08-29 Diego Novillo <dnovillo@google.com>
4640
4641 * lto-lang.c (handle_noreturn_attribute): New local function.
4642 (handle_const_attribute): New local function.
4643 (handle_malloc_attribute): New local function.
4644 (handle_pure_attribute): New local function.
4645 (handle_novops_attribute): New local function.
4646 (handle_nonnull_attribute): New local function.
4647 (handle_nothrow_attribute): New local function.
4648 (handle_sentinel_attribute): New local function.
4649 (handle_type_generic_attribute): New local function.
4650 (handle_format_attribute): New local function.
4651 (handle_format_arg_attribute): New local function.
4652 (lto_attribute_table): Declare.
4653 (lto_format_attribute_table): Declare.
4654 (lto_init_attributes): New local function.
4655 (lto_define_builtins): Call it.
4656 Call targetm.init_builtins and build_common_builtin_nodes.
4657 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4658 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4659
46602008-08-28 Diego Novillo <dnovillo@google.com>
4661
4662 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4663 $(GIMPLE_H).
4664 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4665 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4666 * lto-symtab.c: Include gimple.h.
4667 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4668 TREE_CHAIN.
4669
46702008-08-27 Doug Kwan <dougkwan@google.com>
4671
4672 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4673 gt-lto-lto.h): New includes.
4674 (lto_materialize_function): Do not read in function body in WPA mode.
4675 Format a line to fit in 80 columns.
4676 (lto_cgraph_node_sets): New garbage collected variable.
4677 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4678 New functions.
4679 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
ab20d992 4680 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
d7f09764
DN
4681 variable LTO_SECTION_IN_H.
4682 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4683 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4684 with variable LTO_SECTION_IN_H.
4685 * config-lang.in (gtfiles): Add lto/lto.c.
4686 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4687 merged DECL_RESULT correctly.
4688
46892008-08-26 Bill Maddox <maddox@google.com>
4690
4691 * lto-lang.c Include tree-gimple.h.
4692 (lto_mark_addressable): Call mark_addressable rather than
4693 asserting.
4694 (lto_post_options): Suppress debug info generation.
4695 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
ab20d992 4696
3f8257db 46972008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4698
4699 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4700 assertion and leave an explanatory comment in its place.
ab20d992 4701
d7f09764
DN
47022008-08-21 Doug Kwan <dougkwan@google.com>
4703
4704 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4705 of common nodes instead of computing locallly.
4706 (lto_read_in_decl_state): New.
4707 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4708 Read global and per-function in-decl states.
4709 * Make-lang.in (LTO_H): Update dependency.
4710 (lto/lto.o): Same.
4711 (lto-symtab.c): Merge (revision 139039)
4712 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4713
47142008-08-21 Rafael Espindola <espindola@google.com>
4715
4716 * config-lang.in (target_libs): New.
4717
47182008-08-20 Bill Maddox <maddox@google.com>
4719
4720 * lto.c (current_lto_file): Remove GTY marker from static
4721 variable. Remove include of file gt-lto-lto.h.
4722 * Make-lang.in: Remove dependency of lto/lto.o on
4723 gt-lto-lto.h.
4724 * lto-elf.c (lto_file_close): Removed.
4725 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4726 allocate lto_elf_file object.
4727 (lto_elf_file_close): Free lto_elf_file object after close.
4728 * lto.h (struct lto_file_struct): Remove GTY marker.
4729 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4730 gtfiles.
ab20d992 4731
d7f09764
DN
47322008-08-20 Bill Maddox <maddox@google.com>
4733
4734 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4735 to conform to its new signature.
4736 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4737 on discarded node here, now called in global_vector_fixup.
ab20d992 4738
d7f09764
DN
47392008-08-09 Bill Maddox <maddox@google.com>
4740
4741 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4742 has not been set to a front-end-specific value.
ab20d992 4743
d7f09764 47442008-08-05 Doug Kwan <dougkwan@google.com>
ab20d992 4745
d7f09764
DN
4746 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4747 build breakage.
4748
47492008-07-30 Bill Maddox <maddox@google.com>
4750
4751 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4752 Remove obsolete comments.
4753 (lto_read_decls): Remove initialization of deleted field data_in.global.
4754 Tidy up comments.
4755 (lto_main): Remove redundant initialization of section_hash_table.
4756 * lto-elf.c: Removed obsolete comments.
4757 * lto.h: Tidy up comments.
4758 * lto-symtab.c (lto_least_common_multiple): New function.
4759 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4760 Tidy up comments.
4761
47622008-07-25 Diego Novillo <dnovillo@google.com>
4763 Bill Maddox <maddox@google.com>
4764
4765 * lto.c: Re-order include files.
4766 Include lto-section-out.h.
4767 (preload_common_nodes): Add debugging output.
4768 Add new local INDEX_TABLE.
4769 Call preload_common_node.
4770 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4771
47722008-07-13 Bill Maddox <maddox@google.com>
4773
4774 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4775 unwanted scaling during pointer addition.
4776
47772008-07-11 Bill Maddox <maddox@google.com>
4778 Diego Novillo <dnovillo@google.com>
4779
4780 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4781 Make code const-correct.
4782 (lto_file_read): Fix C++ compatibility warnings.
ab20d992 4783 (lto_read_section_data): Fix C++ compatibility warnings.
d7f09764
DN
4784 (lto_get_section_data): Use CONST_CAST to avoid warning when
4785 const pointer passed to free.
4786 * lto-elf.c (lto_elf_build_section_table): Fix C++
4787 compatibility warnings.
ab20d992 4788 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
d7f09764 4789 to avoid warning assigning const pointer to d_buf field of Elf_Data.
ab20d992 4790 (lto_get_current_out_file): Fix C++ compatibility warnings.
d7f09764
DN
4791
47922008-07-11 Diego Novillo <dnovillo@google.com>
4793
4794 * Make-lang.in (lto-warn): Define.
4795
47962008-07-03 Simon Baldwin <simonb@google.com>
4797
4798 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4799 LTO_STREAM_DEBUGGING.
4800
48012008-06-27 Ollie Wild <aaw@google.com>
4802
4803 * lto-elf.c (lto-section-out.h): New include.
4804 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4805 and data members.
4806 (cached_file_attrs): New static variable.
4807 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4808 Use cached_file_attrs for checking bits.
4809 (lto_elf_build_section_table): Remove elf_file argument from
4810 lto_elf_get_shdr and lto_elf_free_shdr calls.
4811 (DEFINE_INIT_SHDR): New macro.
4812 (init_shdr32, init_shdr64): New functions defined via the
4813 DEFINE_INIT_SHDR macro.
4814 (lto_elf_begin_section_with_type): New function.
4815 (lto_elf_begin_section): New function.
4816 (lto_elf_append_data): New function.
4817 (lto_elf_end_section): New function.
4818 (DEFINE_VALIDATE_EHDR): New macro.
4819 (validate_ehdr32, validate_ehdr64): New functions defined via the
4820 DEFINE_VALIDATE_EHDR macro.
4821 (validate_file): New function.
4822 (DEFINE_INIT_EHDR): New macro.
4823 (init_ehdr32, init_ehdr64): New functions defined via the
4824 DEFINE_INIT_EHDR macro.
4825 (init_ehdr): New function.
4826 (lto_elf_file_open): Add support for writable files. Move some
4827 validation logic to validate_file.
4828 (lto_elf_file_close): Add support for writable files. Write file data
4829 and free data blocks.
4830 (current_out_file): New static variable.
4831 (lto_set_current_out_file): New function.
4832 (lto_get_current_out_file): New function.
4833 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4834 Add temporary initialization for testing ELF serialization.
4835 * lto.h (lto-section-out.h): New include.
4836 (struct lto_file_struct): Slight modification to comment.
4837 (lto_elf_file_open): Add writable parameter.
4838 (lto_elf_begin_section): New function declaration.
4839 (lto_elf_append_data): New function declaration.
4840 (lto_elf_end_section): New function declaration.
4841 (lto_set_current_out_file, lto_get_current_out_file): New function
4842 declarations.
4843 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4844 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4845 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4846 * Make-lang.in (LTO_H): Add lto-section-out.h.
4847
48482008-06-12 Ollie Wild <aaw@google.com>
4849
4850 * lto.h (struct lto_file_vtable_struct): Remove.
4851 (struct lto_file_struct): Remove vtable member.
4852 * lto-elf.c (lto_file_init): Remove vtable argument.
4853 (lto_elf_map_optional_lto_section): Remove.
4854 (lto_elf_unmap_section): Remove.
4855 (lto_elf_file_vtable): Remove.
4856 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4857 lto_file_init call.
4858 (lto_elf_find_section_data): Remove.
4859
48602008-06-11 Ollie Wild <aaw@google.com>
4861
4862 * lto.c (lto_file_read): Add const qualifier to data variable.
4863
48642008-06-11 Diego Novillo <dnovillo@google.com>
4865
4866 Merge from lto-streamber sub-branch.
4867
4868 2008-06-04 Ollie Wild <aaw@google.com>
4869
4870 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4871 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4872
4873 2008-05-28 Bill Maddox <maddox@google.com>
4874
4875 Replace the DWARF reader in the LTO front-end.
4876
4877 * lto.c: Include lto-tree-in.h, lto-tags.h.
4878 (enum DWARF2_class, DW_cl_constant, struct
4879 DWARF2_form_data, struct lto_context,
4880 lto_fd_init, lto_info_fd_init,
4881 lto_abbrev_fd_init, lto_info_fd_close,
4882 lto_file_init, lto_file_close,
4883 lto_file_corrupt_error, lto_abi_mismatch_error,
4884 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4885 lto_read_uleb128, lto_read_sleb128,
4886 lto_read_initial_length, lto_abbrev_read_attrs,
4887 lto_abbrev_read, lto_abbrev_read_lookup,
4888 lto_read_section_offset,
4889 lto_read_comp_unit_header, find_cu_for_offset,
4890 lto_get_file_name,
4891 lto_resolve_reference,lto_read_form,
4892 attribute_value_as_int,
4893 make_signed_host_wide_int,
4894 attribute_value_as_constant, lto_cache_hash,
4895 lto_cache_eq, lto_cache_store_DIE,
4896 lto_cache_lookup_DIE, lto_find_integral_type,
4897 lto_find_integral_type_1,
4898 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4899 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4900 lto_unsupported_attr_error, lto_get_identifier,
4901 lto_read_referenced_type_DIE,
4902 lto_read_compile_unit_DIE,
4903 lto_read_array_type_DIE,
4904 lto_read_structure_union_class_type_DIE,
4905 lto_read_enumerator_DIE,
4906 lto_read_enumeration_type_DIE,
4907 lto_read_only_for_child_DIEs,
4908 lto_read_only_for_child_DIEs,
4909 lto_read_member_DIE, lto_read_abbrev,
4910 lto_read_variable_formal_parameter_constant_DIE,
4911 lto_get_body): Removed.
4912 (preload_common_nodes): New function.
4913 (lto_read_decls): Convert for new global streamer.
4914 (lto_materialze_file_data,
4915 lto_read_subroutine_type_subprogram_die,
4916 lto_read_unspecified_parameters_DIE,
4917 lto_read_typedef_DIE,
4918 lto_read_pointer_reference_type_DIE,
4919 lto_read_subrange_type_DIE,
4920 lto_read_base_type_DIE,
4921 lto_read_const_volatile_restrict_type_DIE,
4922 lto_read_namespace_DIE,
4923 lto_read_unspecified_type_DIE, lto_read_DIE,
4924 lto_read_child_DIEs, lto_collect_child_DIEs):
4925 Removed.
4926 (lto_info_read, lto_set_cu_context): Removed.
4927 (lto_file_read): Convert for new global streamer.
4928 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4929 lto_resolve_var_ref, lto_resolve_fn_ref,
4930 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4931 lto_resolve_namespacedecl_ref): Removed.
4932 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4933 * lto-tree.h (lto_symtab_merge_var,
4934 lto_symtab_mergee_fun): Declare here.
4935 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4936 (lto_elf_file_open): Removed code to read DWARF debug sections.
4937 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4938 DWARF2_CompUnit, lto_die_ptr,
4939 lto_die_cache_entry, lto_fd, lto_info_fd,
4940 lto_abbrev_fd): Removed.
4941 (lto_file): Removed debug_info and debug_abbrev fields.
4942 (lto_ref): Removed.
4943 (lto_file_init, lto_file_close,
4944 lto_resolve_type_ref, lto_resolve_var_ref,
4945 lto_resolve_fn_ref, lto_resolve_field_ref,
4946 lto_resolve_typedecl_ref,
4947 lto_resolve_namespacedecl_ref,
4948 lto_get_file_name): Removed declarations.
4949 (lto_symtab_merge_var, lto_symtab_merge_fn):
4950 Declarations moved to lto-tree.h.
4951 * lto-symtab.c (lto_compatible_attributes_p):
4952 Lobotomize this, as it barfs on "Hello, world!".
4953 * lto-section-out.c: Include lto-tree-out.h.
4954 (lto_hash_global_slot_node,
4955 lto_eq_global_slot_node, preload_common_nodes,
4956 write_global_stream, write_global_references):
4957 New functions.
4958 (produce_asm_for_decls): Convert for new global streamer.
4959 * lto-section-out.h (lto_hash_global_slot_node,
4960 lto_eq_global_slot_node): Declare.
4961
3f8257db 49622008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 4963 Jan Hubicka <jh@suse.cz>
ab20d992 4964
d7f09764
DN
4965 * lto.c (sys/mman.h, tree-pass.h): New includes.
4966 (lto_materialize_constructors_and_inits,
4967 lto_materialize_function): Keeps length of section.
4968 (lto_materialize_cgraph): Removed.
4969 (lto_read_decls): Initialize fd field.
4970 (lto_file_read): Different return type and removed much code to
4971 lto_main.
4972 (page_mask): New variable.
4973 (lto_read_section_data, get_section_data, free_section_data): New
4974 functions.
4975 (lto_main): Now calls pass manager, sets the hooks so that the ipa
ab20d992
JJ
4976 passes can get the section data.
4977
3f8257db 49782008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4979
4980 * lto.h (lto_read_decls): Made local.
ab20d992 4981 (lto_input_function_body, lto_input_constructors_and_inits,
d7f09764
DN
4982 lto_input_cgraph): Declarations moved to lto-section-in.h.
4983 * lto-section-in.c: Moved to .. .
4984 * lto-cgraph-in.c: Ditto.
4985 * lto-section-in.h: Ditto.
4986 * lto-function-in.c: Ditto.
4987 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4988 (lto_insert_block): Removed.
4989 (LANG_HOOKS_INSERT_BLOCK): Removed.
4990 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4991 lto-section-in.o): Rules moved to lto/Makefile.in.
ab20d992 4992
d7f09764
DN
4993
49942008-05-16 Ollie Wild <aaw@google.com>
4995
4996 * lto-lang.c (tree-inline.h): Include.
4997 (lto_post_options): New function.
4998 (LANG_HOOKS_POST_OPTIONS): Define.
4999 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
5000 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
5001
50022008-05-13 Diego Novillo <dnovillo@google.com>
5003
5004 * lto-function-in.c (input_ssa_names): Call
5005 make_ssa_name_fn instead of make_ssa_name.
5006
50072008-05-12 Diego Novillo <dnovillo@google.com>
5008
5009 * lto-cgraph-in.c (overwrite_node): Update references to
5010 inline summary fields.
5011 * lto-function-in.c (input_expr_operand): Do not handle
5012 STRUCT_FIELD_TAG.
5013
50142008-05-09 Ollie Wild <aaw@google.com>
5015
5016 * lang.opt: New file.
5017 * lto-lang.c (lto_init_options): New function.
5018 (lto_handle_option): New function.
5019 (lto_init): Move initialization of flag_unit_at_a_time to
5020 lto_init_options.
5021 (LANG_HOOKS_INIT_OPTIONS): Define.
5022 (LANG_HOOKS_HANDLE_OPTION): Define.
5023
50242008-04-29 Ollie Wild <aaw@google.com>
5025
5026 * lto.c (lto_read_namespace_DIE): New function.
5027 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
5028 NAMESPACE_DECL DIE's.
5029 (lto_resolve_namespacedecl_ref): New function.
5030 * lto.h (lto_resolve_namespacedecl_ref): New function.
5031 * lto-section-in.c (lto_read_decls): Read namespace declarations.
5032 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
5033 and num_namespace_decls.
5034 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
5035 * lto-lang.c (lto_init_ts): New function.
5036 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
5037
50382008-04-16 Ollie Wild <aaw@google.com>
5039
5040 * lto-function-in.c (input_type_ref): Updated function description.
5041
50422008-04-16 Ollie Wild <aaw@google.com>
5043
5044 * lto-function-in.c (input_type_ref_1): New function.
5045 (input_type_ref): Split into two functions.
5046 (input_function): Add support for type contexts.
5047
50482008-04-16 Ollie Wild <aaw@google.com>
5049
5050 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
5051 section name
5052
50532008-04-16 Ollie Wild <aaw@google.com>
5054
5055 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
5056 list of supported languages.
5057
3f8257db 50582008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5059
5060 Merge with mainline @133491.
5061
3f8257db 50622008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5063 Jan Hubicka <jh@suse.cz>
5064
5065 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
5066 fd->unmaterialized_fndecls.
5067 (lto_get_file_name, lto_materialize_cgraph): New function.
5068 (lto_materialize_constructors_and_inits,
5069 lto_materialize_function): Read info directly from elf file.
5070 (lto_file_read): Made local and initialize dictionary so that
5071 other lto sections can be read without reprocessing the elf file.
5072 (lto_main): Read all functions after all files have been processed
ab20d992 5073 for their types, globals and cgraph.
d7f09764
DN
5074 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5075 dependencies.
5076 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5077 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5078 (lto_elf_read_symtab): Removed function.
5079 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5080 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5081 (lto_file_read): Made local.
5082 (lto_get_file_name, lto_elf_build_section_table,
ab20d992 5083 lto_input_cgraph):
d7f09764
DN
5084 New function.
5085 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5086 New functions.
5087 (lto_read_decls): Get the file name.
5088 * lto-cgraph-in.c: New file.
5089 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5090 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5091 (input_labels): Fixed latent sizeof issue.
5092 (input_function): Build stmt array to set call sites into cgraph
5093 edges.
5094 (lto_read_body): Reset cfun->curr_properties.
5095 * lto_section_in.h (lto_section_slot): New structure.
5096 (section_hash_table.lto_file_decl_data): New field.
5097
3f8257db 50982008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5099
5100 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5101 reconstruct static initializers.
5102 (lto_get_body, lto_materialize_function): Add lto_section_type as
5103 a parameter.
5104 (lto_materialize_constructors_and_inits,
5105 lto_materialize_file_data): New function.
5106 (lto_materialize_function,
5107 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5108 unmap_section and map_fn_body to map_section.
5109 (lto_set_cu_context): Process functions and static inits
5110 differently.
5111 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5112 lto/lto-section-in.o): Update dependencies.
ab20d992 5113 * lto-elf.c (lto_elf_map_optional_lto_section): Add
d7f09764
DN
5114 lto_section_type parameter.
5115 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
ab20d992 5116 * lto.h (lto_file_vtable_struct): Removed two of the fields and
d7f09764
DN
5117 renamed the other two so that there is only one map function and
5118 one unmap function and each takes a section type parameter.
5119 (lto_read_function_body): Renamed to lto_input_function_body and
5120 added file_data parameter.
5121 (lto_read_var_init): Removed.
5122 (lto_input_constructors_and_inits): New function.
5123 * lto-section-in.c (lto_read_decls): New function.
5124 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5125 var_decls, type_decls, types to lto_file_decl_data.
5126 (input_type_ref, input_expr_operand, lto_read_body): Get
5127 field_decls, fn_decls, var_decls, type_decls, types from different
5128 structure.
5129 (input_globals, input_constructor, lto_read_var_init): Removed.
5130 (input_constructors_or_inits): New function.
5131 (lto_read_function_body, lto_input_constructors_and_inits):
5132 Renamed to lto_input_function_body and takes file_data parameter.
5133 * lto-section-in.h (lto_file_decl_data): New structure.
ab20d992 5134
3f8257db 51352008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5136
5137 * lto-function-in.c (input_globals.c): Changed input type to
5138 lto_function_header.
5139 (input_bb): Removed code to deserialize the stmt number.
5140 (input_function): Renumber all stmts after they are input.
5141 (lto_read_body, lto_read_function_body, lto_read_var_init):
5142 Changed to used new header format and enum section_type.
ab20d992
JJ
5143 *lto-lang.c (success): Removed.
5144
d7f09764
DN
51452008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5146
5147 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5148 (lto_elf_free_sym): Likewise.
5149
5150 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5151 (lto_elf_build_init): Likewise.
5152
3f8257db 51532008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5154
5155 * lto-read.c: Renamed to lto-function-in.c.
5156 (input_1_unsigned): Moved to lto-section-in.c and renamed
5157 lto_input_1_unsigned.
5158 (input_uleb128): Moved to lto-section-in.c and renamed
5159 lto_input_uleb128.
5160 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5161 lto_input_widest_uint_uleb128.
5162 (input_sleb128): Moved to lto-section-in.c and renamed
5163 lto_input_sleb128.
5164 (input_integer): Moved to lto-section-in.c and renamed
5165 lto_input_integer.
5166 (debug_in_fun): Moved to lto-section-in.c and renamed
5167 lto_debug_in_fun.
5168 (input_block): Moved to lto-section-in.h and renamed
5169 lto_input_block.
5170 (input_expr_operand): Fixed to allow lists with more than one
5171 element.
5172 * lto-section-in.h: New file.
5173 * lto-section-in.c: New file with changes from above.
5174 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5175 (lto-section-in.o): New rule.
ab20d992 5176
d7f09764
DN
51772007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5178
5179 * lto-read.c (input_expr_operand): Mark static and external
5180 VAR_DECLs as needed.
5181
51822007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5183
5184 * lto-read.c (input_integer): Use the correct shift amount.
5185
51862007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5187
5188 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5189 (LANG_HOOKS_NAME): Define.
5190
51912007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5192
5193 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5194 original function to...
5195 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5196 don't have a base type.
5197 (lto_read_enumeration_type_DIE): Examine the values of the
5198 enumeration to determine whether we can use an unsigned type for
5199 the base type of the enumeration.
5200
52012007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5202
5203 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5204 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5205
52062007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5207
5208 * lto-lang.c (lto_types_compatible_p): New function.
5209 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5210
52112007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5212 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5213
5214 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5215 (input_local_vars): Read in DECL_INITIAL and context for local
5216 statics that need to be put in unexpanded_vars_list.
5217
52182007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5219
5220 * lto-read.c (input_real): Use a separate null-terminated buffer
5221 for calling real_from_string.
5222 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5223 tell cgraph that it's needed.
5224
52252007-12-19 Doug Kwan <dougkwan@google.com>
5226
5227 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5228
52292007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5230
5231 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5232 (lto_file_read): Reset the members of 'context' every time we read
5233 a toplevel DIE, with special attention to last_param_type.
5234
52352007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5236
5237 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5238 'declaration'. Set the assembler name for non-public functions.
5239
3f8257db 52402007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5241
5242 * lto_read.c (data_in.unexpanded_indexes): New array.
5243 (input_local_var): Added code to read in unexpanded_var_list
5244 indexes for variables. Only read in DECL_CHAIN field for
5245 parameters.
5246 (input_local_vars): Added code to rebuild unexpanded_var_list in
5247 order using unexpanded_indexes.
5248 (input_function): Added code to set DECL_CONTEXT for functions.
5249
52502007-12-13 Doug Kwan <dougkwan@google.com>
5251
5252 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5253 in pointer and reference types.
5254
52552007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5256
5257 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5258 RESULT_DECL.
5259
52602007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5261
5262 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5263 already read the DIE.
5264 (lto_get_body): New function, split out from...
5265 (lto_materialize_function): ...here. Call it.
5266 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5267 determine DECL_EXTERNAL.
5268 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5269 FUNCTION_DECLs when necessary. Use the type of the actual
5270 function definition if we are unable to easily merge types. Ignore
5271 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5272 necessary.
5273
52742007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5275
5276 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5277
52782007-12-12 Bill Maddox <maddox@google.com>
5279
5280 Revert
5281 2007-12-07 Bill Maddox <maddox@google.com>
5282
5283 * lto.c (lto_str_fd_init): New function.
5284 (lto_str_fd_close): New function.
5285 (lto_file_init): Call lto_str_fd_init.
5286 (lto_file_close): Call lto_str_fd_close.
5287 (lto_str_read): New function. Read debug string table.
5288 (lto_str_lookup): New function. Get string for debug
5289 string table offset.
5290 (lto_read_form): Recognize DW_FORM_strp.
5291 (lto_file_read): Invoke lto_str_read.
5292
5293 * lto-elf.c (lto_elf_file_open): Read raw section data
5294 for the .debug_str section, if present.
5295
5296 * lto.h (struct lto_str_fd_struct): New struct.
5297 (struct lto_file_struct): Added new field DEBUG_STR
5298 to hold the file descriptor for the debug string table.
ab20d992 5299
d7f09764
DN
53002007-12-07 Bill Maddox <maddox@google.com>
5301
5302 * lto.c (lto_str_fd_init): New function.
5303 (lto_str_fd_close): New function.
5304 (lto_file_init): Call lto_str_fd_init.
5305 (lto_file_close): Call lto_str_fd_close.
5306 (lto_str_read): New function. Read debug string table.
5307 (lto_str_lookup): New function. Get string for debug
5308 string table offset.
5309 (lto_read_form): Recognize DW_FORM_strp.
5310 (lto_file_read): Invoke lto_str_read.
5311
5312 * lto-elf.c (lto_elf_file_open): Read raw section data
5313 for the .debug_str section, if present.
5314
5315 * lto.h (struct lto_str_fd_struct): New struct.
5316 (struct lto_file_struct): Added new field DEBUG_STR
5317 to hold the file descriptor for the debug string table.
5318
53192007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5320
5321 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5322 Grow the basic_block_info and label_to_block_map vectors if
5323 necessary. Read in the block chain.
5324
53252007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5326
5327 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5328
53292007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5330
5331 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5332
53332007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5334
5335 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5336 (lto_read_body): Don't declare PROP_alias.
5337
53382007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5339
5340 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5341 argument type information.
5342
53432007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5344
5345 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5346 TREE_THIS_VOLATILE if the associated type is a volatile type.
5347 (lto_materialize_function): Remove call to init_ssa_operands.
5348 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5349 variable when reading an SSA_NAME. Do the same when reading a
5350 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5351 (input_cfg): Call init_ssa_operands.
5352 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5353 Move call to init_tree_ssa...
5354 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5355 add_referenced_var on any variables referenced from the body of the
5356 function. Inform the rest of the compiler we are in SSA form and
5357 inform later passes about the current properties.
5358
53592007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5360
5361 * lto.c (lto_materialize_function): Add FIXME.
5362
53632007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5364
5365 * lto-lang.c (enum built_in_attribute): New enum.
5366 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5367 built_in_attributes): New variables.
5368 (def_builtin_1): New function.
5369 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5370
53712007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5372
5373 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5374 DECL_SOURCE_LOCATION for debugging purposes.
5375 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5376 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5377 laying out the decl until later.
5378 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5379 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5380 TREE_ADDRESSABLE.
5381 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5382 operand of an ADDR_EXPR.
5383 * lto-lang.c (enum lto_builtin_type): New enum.
5384 (builtin_type): New typedef.
5385 (builtin_types, string_type_node, const_string_type_node,
5386 wint_type_node, intmax_type_node, uintmax_type_node,
5387 signed_size_type_node): New variables.
5388 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5389 lto_build_c_type_nodes): New functions.
5390 (lto_init): Initialize builtin types.
5391 (lto_set_decl_assembler_name): Let the target machine mangle the
5392 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5393
53942007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5395
5396 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5397 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5398 the type is a constant type. Set the assembler name and inform
5399 the rest of the compiler about the new decl if the decl is not
5400 public.
5401 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5402 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5403 try to read in function bodies for functions that already have bodies.
5404 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5405 equivalency.
5406 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5407 Check for whether we matched a builtin function type before calling
5408 lto_same_type_p on the generated type. Permit cases where the
5409 declaration of an array is unbounded, but the definition is bounded.
5410 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5411 DECL_SIZE_UNIT if necessary.
5412
3f8257db 54132007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5414
ab20d992 5415 * lto-read.c (input_expr_operand): Get types right
d7f09764
DN
5416 for COMPLEX_CST.
5417
3f8257db 54182007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5419
5420 * lto-read.c (make_new_block, input_cfg): Properly set
5421 n_basic_blocks.
ab20d992 5422
d7f09764
DN
54232007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5424
5425 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5426 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5427
54282007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5429
5430 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5431 construct the integer type for bitfields.
5432
3f8257db 54332007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5434
5435 * lto-read.c (data_in.current_node_has_loc): Removed.
5436 (input_line_info): Returns true if node needs line set.
5437 (set_line_info): Always sets line if called.
5438 (clear_line_info): Removed reference to current_node_needs_loc.
5439 (input_expr_operand): Keeps track locally if current node needs a loc.
5440 (input_local_var): Added code to handle DECL_INITIAL for
5441 static local vars. Only set loc if necessary.
ab20d992 5442
d7f09764
DN
54432007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5444
5445 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5446 DECL_CONTEXT.
5447
54482007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5449
5450 * lto.c: Include langhooks.h.
5451 (lto_find_integral_type): Rework logic to handle the case where
5452 got_byte_size is true, but the bitsize requested and that of the
5453 base_type doesn't match.
5454 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5455 asm_name if we are creating a VAR_DECL.
5456 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5457 definition.
5458 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5459 function reference and use the builtin's decl if so. Set the
5460 DECL_CONTEXT of the RESULT_DECL for the function.
5461 * lto-lang.c (registered_builtin_fndecls): New variable.
5462 (lto_getdecls): Return it.
5463 (lto_builtin_function): Chain the new decl onto
5464 registered_builtin_fndecls.
5465
3f8257db 54662007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
ab20d992 5467
d7f09764
DN
5468 * lto-read.c (process_tree_flags, lto_static_init_local):
5469 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5470 (input_line_info, clear_line_info): Fixed new line number code.
5471 (input_expr_operand): Added type to SWITCH_EXPR.
5472 (lto_read_body): Properly initialized data_in.
5473 Clear line info when leaving.
ab20d992 5474
d7f09764
DN
54752007-11-13 Diego Novillo <dnovillo@google.com>
5476
5477 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5478 Initialize ARTIFICIAL.
5479 (lto_read_subroutine_type_subprogram_DIE): Initialize
5480 SAVED_SCOPE.
5481 * lto-read.c (set_line_info): Remove ; from calls to
5482 LINEMAP_POSITION_FOR_COLUMN.
5483
3f8257db 54842007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5485
5486 * lto-read.c (input_type_ref): Renamed from get_type_ref.
ab20d992 5487 (input_expr_operand, input_local_var): Renamed get_type_ref to
d7f09764 5488 input_type_ref.
ab20d992 5489 (input_expr_operand): Get the types correct for
d7f09764 5490 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
ab20d992 5491
d7f09764
DN
54922007-11-13 Doug Kwan <dougkwan@google.com>
5493
5494 * lto-read.c (input_widest_uint_uleb128): New function.
5495 (input_tree_flags, process_tree_flags, input_line_info,
5496 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5497 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5498 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5499 (lto_static_init_local): Add code to assert that lto_flags_type is
5500 wide enough.
5501
55022007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5503
5504 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5505 (lto_read_subroutine_type_subprogram_DIE): Handle
5506 DW_AT_static_link and DW_AT_specification. Return the
5507 specification if present.
5508 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
ab20d992 5509
d7f09764
DN
55102007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5511
5512 * lto-lang.c: Include target.h.
5513 (registered_builtin_types): New variable.
5514 (lto_type_for_mode): Increase number of modes handled.
5515 (lto_builtin_function): Fix argument list and return the decl.
5516 (lto_register_builtin_type): New function.
5517 (lto_init): Initialize target builtins and language-independent
5518 nodes.
5519 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5520
3f8257db 55212007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5522
5523 * lto-read.c (input_expr_operand): Added code to properly handle
5524 index filed. Added new RANGE_EXPR case.
ab20d992 5525
3f8257db 55262007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5527
5528 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5529 (data_in): Added current_node_has_loc field.
5530 (input_line_info, set_line_info, clear_line_info): Added a support
5531 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5532 did not have on on the source side.
5533 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5534 numbers too.
5535
55362007-11-09 Doug Kwan <dougkwan@google.com>
5537
5538 * lto-read.c (input_expr_operand): Change type of operand 2 of
5539 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5540
55412007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5542
5543 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5544 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5545 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5546 the new decl we are creating. Move informing the middle end about
5547 the new decl to...
5548 (lto_main): ...here. Inform the middle end about global variables
5549 after we have read in all the input files.
5550 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5551 variables with internal linkage, so delete the check for internal
5552 linkage. Combine TREE_PUBLIC flags.
5553
55542007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5555
5556 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5557 DW_AT_decl_line.
5558 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5559 builtin specially. Move check for attribute compatibility
5560 earlier.
5561
55622007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5563
5564 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5565 * config-lang.in (gtfiles): Add lto.h and lto.c.
5566 * lto-elf.c: Include ggc.h.
5567 (lto_elf_file_open): Allocate elf_file from GC memory.
5568 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5569 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5570 in GC memory.
5571 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5572 (lto_file_close): Free file from GC memory.
5573 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5574 (lto_read_member_DIE): Fix declaration.
5575 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5576 in GC memory.
5577 (current_lto_file): New variable.
5578 (lto_main): Use it.
5579 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5580 lto_die_cache_entry): Move to...
5581 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5582 declarations accordingly.
5583 (struct lto_file_struct): Declare.
5584 (lto_file_vtable): Use it instead of lto_file.
5585
ab20d992
JJ
55862007-11-06 Alon Dayan <alond@il.ibm.com>
5587 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5588
5589 * lto-read.c (process_flags, lto_static_init_local):
5590 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5591 change global array num_flags_for_code to flags_length_for_code.
5592 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
ab20d992 5593
d7f09764
DN
55942007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5595
5596 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5597 layout functions to compute information about the newly constructed
5598 type.
5599
56002007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5601
5602 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5603 case to use DECL_RESULT if necessary.
5604
3f8257db 56052007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5606
5607 * lto-read.c (input_tree_list): Removed.
5608 (input_tree_flags): Added parameter to force flags no matter what
5609 tree code.
5610 (input_expr_operand): Added parameter to input_tree_flags.
5611 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5612 input_expr_operand rather than input_tree_lists.
5613 (input_local_var): Use input_expr_operand to read attributes
5614 rather then input_tree_list.
5615 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5616
56172007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5618
5619 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5620 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5621 TYPE_DECL for it.
5622 * lto-read.c (lto_read_body): Use correct sizes for calculating
5623 type_decls_offset and types_offset.
5624
56252007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5626
5627 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5628 with GENERIC_NEXT.
5629 * config-lang.in (gtfiles): Add lto-lang.c.
5630 * lto-lang.c: Include gt-lto-lto-lang.h.
5631 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5632 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5633 (lto/lto-read.o): Likewise.
5634
3f8257db 56352007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5636
5637 * lto-read.c (data_in): Added type_decls and current_col fields.
5638 (string_slot): New type to hold canonized file name.
ab20d992 5639 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
d7f09764
DN
5640 input_line_info, set_line_info, clear_line_info): New functions.
5641 (file_name_hash_table): New hash table.
ab20d992 5642 (input_local_var, input_labels, input_local_vars_index,
d7f09764
DN
5643 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5644 (input_uleb128): Changed type of byte var.
5645 (input_expr_operand): Large number of changes to get line numbers
5646 correct. Added TYPE_DECL case.
5647 (input_globals): Added code to get TYPE_DECLs processed.
5648 (input_local_var): Added code to process line numbers and
5649 TREE_CHAIN and DECL_CONTEXT.
5650 (input_function, input_constructor): Added call to
5651 clear_line_number.
5652 (lto_static_init_local): Added code to get line numbers correct.
5653 (lto_read_body): Added code to get TYPE_DECLS read and to change
5654 parameters to the calls above that had their parms reorganized.
5655
d7f09764
DN
56562007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5657
5658 * lto.h (lto_resolve_typedecl_ref): Declare.
5659 * lto.c (lto_resolve_typedecl_ref): New function.
5660
56612007-10-29 Mark Mitchell <mark@codesourcery.com>
5662 Nathan Froyd <froydnj@codesourcery.com>
5663
5664 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5665 DIEs even if we find an abstract origin for this DIE.
5666
56672007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5668
5669 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5670 RESULT_DECL slightly earlier. Only remember the decl for later
5671 if we successfully merge declarations.
5672
3f8257db 56732007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5674
5675 * lto-read.c (input_expr_operand): Give label_values the proper
5676 context and provide switch statements with a default type.
ab20d992 5677
d7f09764
DN
56782007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5679
5680 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5681 * lto.c (lto_materialize_function): ...to here.
5682
56832007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5684
5685 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5686 * lto.c (lto_info_fd_init): Initialize it.
5687 (lto_info_fd_close): Free it.
5688 (lto_materialize_function): New function.
5689 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5690 unmaterialized_fndecls.
5691 (lto_file_read): Read in all the function bodies after we have read
5692 all of the DWARF info.
5693 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5694 reading a function body.
5695
3f8257db 56962007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5697
5698 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5699 semetric with output_tree_flags. Added call to log flags.
5700 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5701 type issues to make everything consistent with flags being
5702 unsigned HOST_WIDE_INTS.
5703 (input_expr_operand): Added call to
5704 recompute_tree_invariant_for_addr_expr.
5705 (input_local_var): Added debugging for tree_chains. Now calls
5706 input_tree_flags.
5707 (input_phi): Made flags unsigned HOST_WIDE_INT.
5708 (input_ssa_names): Now calls input_tree_flags.
5709 (lto_read_body): Now sets cfun.
5710 (lto_read_function_body): Now sets current_function_pointer.
ab20d992 5711
d7f09764
DN
57122007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5713
5714 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5715 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5716 inspecting fields within.
5717 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5718 handle this appropriately.
5719
57202007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5721
5722 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5723 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5724 both DW_AT_abstract_origin and DW_AT_specification.
5725 (lto_read_subroutine_type_subprogram_DIE): Handle
5726 DW_AT_abstract_origin.
5727 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5728 (lto_read_DIE_at_ptr): Define as static to match declaration.
5729 Lookup the PTR in the cache before reading it from the file.
5730 (lto_resolve_var_ref): Adjust accordingly.
5731 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5732 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5733
57342007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5735
5736 * lto.c (lto_read_DIE_at_ptr): New function.
5737 (lto_resolve_var_ref): Use it.
5738 (lto_resolve_fn_ref): Use it.
5739 (lto_resolve_field_ref): Use it.
5740 (lto_read_variable_formal_parameter_constant_DIE): Follow
5741 DW_AT_specification and return the associated decl when appropriate.
5742
57432007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5744
5745 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5746 Implement for scalar integer modes.
5747 (lto_init): Initialize size_type_node.
5748
3f8257db 57492007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5750
5751 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5752 (input_local_var): Add chaining for params.
5753 (input_ssa_names): Add cfun parameter.
5754 (input_function): Remove unnecessary else.
5755
57562007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5757
5758 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5759 (lto_resolve_var_ref): Use proper types.
5760 (lto_resolve_fn_ref): Likewise.
5761 (lto_resolve_field_ref): Likewise.
5762
57632007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5764
5765 * lto-read.c (input_expr_operand): Remove case.
5766
57672007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5768
5769 * lto.c (lto_read_only_for_child_DIEs): New function.
5770 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5771 * lto-elf.c (lto_elf_map_lto_section): Remove.
5772 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5773 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5774 SSA_NAME. Add missing case for mechanical codes.
5775 (input_cfg): Use basic_block_info_for_function instead of
5776 basic_block_info.
5777
3f8257db 57782007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5779
5780 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5781 (input_list): Renamed input_tree_list and modified to follow same
5782 protocol as lto-function-out.c:output_tree_list.
5783 (input_expr_operand): Make asm operands use input_tree_list.
5784 (input_local_var): Now uses input_tree_list.
5785 (lto_read_body): Change placement for setting context of debug_labels.
ab20d992 5786
3f8257db 57872007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5788
5789 * lto-read.c (input_real): Output debugging in proper order.
5790 (input_integer): Compute bit lengths properly.
5791 (input_list): Clean up declaration.
5792 (input_expr_operand): Change calls to input_real to match fix.
5793 Make reading of LTO_bit_field_ref1 match output.
5794 (input_local_var): Make reading of attributes match what is being
5795 written.
5796 (dump_debug_stream): Also print char in hex.
5797 (debug_out_fun): Fix signed unsigned mismatch.
ab20d992 5798
d7f09764
DN
57992007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5800
5801 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5802 DW_AT_GNU_vector specially, as they are not contiguous with the
5803 specified set of attribute names. Use class_mask to check for
5804 errors at the end of the function
5805 (lto_resolve_var_ref): Read the DIE if it is not cached.
5806 (lto_resolve_fn_ref): Likewise.
5807 (lto_resolve_field_ref): Likewise.
5808
58092007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5810
5811 * lto.c: Include dwarf2out.h.
5812 (lto_cache_store_DIE): Assert that we never change the value.
5813 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5814 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5815 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5816 sensible type instead.
5817 (lto_read_structure_union_class_type_DIE): Store the newly
5818 created type prior to reading the members of the structure to
5819 avoid infinite recursion. Avoid computing types and alignments
5820 for structures whose sizes are unknown.
5821 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5822 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5823 DW_AT_const_value, and DW_AT_specification.
5824 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5825 Return early if we have already constructed the function type.
5826 (lto_read_typedef_DIE): Check to see if the type has been cached
5827 already. Cache the type before reading any children.
5828 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5829 (lto_read_DIE): Unset context->skip_non_parameters around reading
5830 the DIE.
5831 (lto_resolve_fn_ref): Delete trailing whitespace.
5832
3f8257db 58332007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5834
5835 * lto-read.c (input_expr_operand): Added type for STRING_CST.
ab20d992 5836
d7f09764
DN
58372007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5838
5839 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5840
58412007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5842
5843 * lto-lang.c (signed_and_unsigned_types): New variable.
5844 (lto_type_for_size): Consult signed_and_unsigned_types to find
5845 an approprite type, creating it if necessary.
5846 (lto_set_decl_assembler_name): Add actual method body.
5847
58482007-09-06 Jim Blandy <jimb@codesourcery.com>
5849
5850 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5851 can't find a var init for this variable, leave its DECL_INITIAL.
5852 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5853 lto_elf_map_fn_body.
5854 (lto_map_lto_section): New function.
5855 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5856 bodies, and lto_elf_map_optional_lto_section for variable
5857 initializers.
5858 (lto_elf_find_section_data): Quietly return NULL if the section is
5859 missing.
5860 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5861
5862 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5863
5864 * lto-read.c (lto_read_body): Doc fix.
5865
3f8257db 58662007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5867
5868 * lto-read.c (fun_in): Renamed to data_in.
5869 (input_expr_operand, input_local_var, input_string_internal,
ab20d992 5870 input_string, input_real, input_list, get_label_decl,
d7f09764 5871 get_type_ref, input_expr_operand, input_globals, input_labels,
ab20d992 5872 input_local_vars_index, input_local_var, input_local_vars,
d7f09764
DN
5873 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5874 (input_constructor): New function.
5875 (lto_read_function_body): Renamed to lto_read_body and generalized
5876 to handle both functions and constructors.
5877 (lto_read_function_body, lto_read_var_init): New function.
ab20d992 5878
3f8257db 58792007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5880
5881 * lto-read.c (input_expr_operand): Assert that there really is a
5882 FUNCTION_DECL.
5883 (input_globals): Removed checks on 0 section.
ab20d992 5884
3f8257db 58852007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5886
5887 * lto-read.c (fun_in): Added local_decls_index and
ab20d992 5888 local_decls_index_d.
d7f09764
DN
5889 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5890 (input_globals): Enabled code to handle FIELD_DECLs.
5891 (input_local_vars_index, input_local_vars): New function.
5892 (input_local_var): Changed to allow locals to be input randomly.
5893 (lto_read_function_body): Added code to input the
5894 local_decls_index and to free various structures.
ab20d992 5895
d7f09764
DN
58962007-08-17 Jim Blandy <jimb@codesourcery.com>
5897
5898 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5899 ATTRIBUTE_UNUSED from 'die' formal.
5900
5901 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5902 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5903 (input_list): Fix type of 'tag'.
5904 (input_expr_operand): Fix type of 'tag' argument. Update
5905 declaration. Fix type of 'ctag'. Add default case to switch,
5906 since the type of the switched value is now an enum.
5907 (input_local_vars): Fix type of 'tag'.
5908 (input_bb): Fix type of 'tag' argument.
5909 (input_function): Fix type of 'tag' argument.
5910
59112007-08-16 Jim Blandy <jimb@codesourcery.com>
5912
5913 * lto.c (lto_read_member_DIE): Record the tree we create in
5914 fd->die_cache. (Our 'die' argument is no longer unused.)
5915 (lto_resolve_field_ref): New function.
5916 * lto.h (lto_resolve_field_ref): New declaration.
5917
59182007-08-15 Jim Blandy <jimb@codesourcery.com>
5919
5920 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5921
59222007-08-07 Jim Blandy <jimb@codesourcery.com>
5923
5924 * lto.c (lto_read_form): Complete attr_classes table.
5925 (DWARF2_form_data): Doc fix.
ab20d992 5926
d7f09764
DN
59272007-08-05 Mark Mitchell <mark@codesourcery.com>
5928
5929 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5930 and unmap_var_init.
5931 (lto_read_var_init): Declare.
5932 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5933 interface for reading variable initializers.
5934 * lto-elf.c (lto_elf_read_var_init): Remove.
5935 (lto_elf_file_vtable): Update initializer.
5936 (lto_elf_read_var_init): Add comment about unused-ness.
5937 * lto-read.c (lto_read_var_init): New.
5938
5939 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5940
3f8257db 59412007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5942
5943 * lto-read.c (lto_read_function_body): Moved declaration of fn
5944 outside of ifdef.
ab20d992 5945
3f8257db 59462007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5947
5948 * lto-read.c (input_uleb128, input_string_internal, input_real,
5949 input_integer, input_record_start, input_list, get_type_ref,
5950 input_flags, input_expr_operand, input_expr_operand,
5951 input_expr_operand, input_local_vars, input_cfg, input_phi,
5952 input_ssa_names, input_bb, input_function): Added semicolons.
5953
ab20d992 5954
3f8257db 59552007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5956
5957 * lto-read.c (input_globals): Remove debugging.
5958 (input_function): Set DECL_ARGUMENTS.
5959
3f8257db 59602007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5961
5962 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5963 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5964 (input_phi): Made work with operands other than SSA_NAMES and
5965 fixed processing of flags.
5966 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5967 (input_flags): New function.
5968 * lto-lang.c (lto_init): Changed state of in_lto_p.
ab20d992
JJ
5969
5970
d7f09764
DN
59712007-07-24 Mark Mitchell <mark@codesourcery.com>
5972
5973 * lto-tree.h (lto_varargs_cookie): Remove.
5974 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5975 skip_non_parameters, skip_parameters.
5976 (lto_varargs_cookie): Remove.
5977 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5978 parameter types.
5979 (lto_read_abbrev): New function.
5980 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5981 child DIEs.
5982 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5983 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5984 (lto_file_read): Initialize new context fields.
5985 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5986 (lto_unsigned_type): Remove.
5987 (lto_signed_type): Likewise.
5988 (lto_signed_or_unsigned_type): Likewise.
5989 (lto_init): Do not create lto_varargs_cookie.
5990 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5991 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5992 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5993
59942007-07-19 Jan Hubicka <jh@suse.cz>
5995
5996 * lto-read.c (lto_read_function_body): Produce empty scope block
5997 to avoid crash.
5998
59992007-07-18 Mark Mitchell <mark@codesourcery.com>
6000
6001 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
6002 process local variables.
6003 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
6004
3f8257db 60052007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6006
6007 * lto-read.c (input_list, input_expr_operand): Added struct
6008 function parameter.
6009 (init_cfg, finalize_cfg): Removed function.
6010 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
6011 (input_labels, input_local_vars): Now takes input_block parameter rather than
6012 synthsyzing it.
6013 (input_cfg, input_phi, input_ssa_names): New functions.
6014 (input_bb): Now passes in input_blocks. Does not construct cfg
6015 and processes the list of phi functions.
6016 (input_function): Now builds both the cfg and ssa_names table.
6017 (lto_read_function_body): Processes new header fields to construct
6018 streams for the ssa_names and cfg and their debugging.
ab20d992
JJ
6019 * lto-lang.c (lto_init): Set in_lto_p.
6020
6021
d7f09764
DN
60222007-06-28 Mark Mitchell <mark@codesourcery.com>
6023
6024 * lto.h (lto_file_vtable): Add read_var_init.
6025 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
6026 initializers.
6027 (lto_main): Remove bogus asserts.
6028 * lto-elf.c (tm.h): Include it.
6029 (libiberty.y): Likewise.
6030 (lto_elf_file): Add strtab and symtab. Rename
6031 string_table_section_index to sec_strtab.
6032 (lto_elf_file_vtable): Add lto_elf_read_var_init.
6033 (lto_elf_get_shdr): New function.
6034 (lto_elf_free_shdr): Likewise.
6035 (lto_elf_find_section_data): Use them.
6036 (lto_elf_read_symtab): New function.
6037 (lto_elf_lookup_sym): Likewise.
6038 (lto_elf_free_sym): Likewise.
6039 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
6040 (lto_elf_built_init): New function.
6041 (lto_elf_read_var_init): Likewise.
6042 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
6043
3f8257db 60442007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6045
6046 * lto-read (make_new_block): Initialize the stmt_list.
6047 (lto_static_init_local): Add debugging for missing codes.
ab20d992 6048
d7f09764
DN
60492007-06-26 Mark Mitchell <mark@codesourcery.com>
6050
6051 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
ab20d992 6052 unprototyped functions.
d7f09764
DN
6053
60542007-06-23 Mark Mitchell <mark@codesourcery.com>
6055
6056 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
6057 Handle DW_AT_MIPS_linkage_name.
6058 (lto_read_subroutine_type_subprogram): Likewise. Correct
6059 compilation errors.
6060 (lto_main): Remove incorrect assertions.
6061 * lto-symbtab.c: Build function types out of TREE_LISTs.
6062
6063 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
ab20d992 6064
d7f09764 6065 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
ab20d992 6066
3f8257db 60672007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6068
ab20d992 6069 * lto-tree.h (lang_decl, lang_type, language_function): Added
d7f09764 6070 dummy since ggc does not like empty structs.
ab20d992
JJ
6071 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6072 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
d7f09764
DN
6073 expr->common to expr->base.
6074 (make_new_block): Moved stmt_list to proper place.
6075
ab20d992 60762007-03-14 Robert Kennedy <jimbob@google.com>
d7f09764
DN
6077
6078 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6079 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6080 assembler name from DWARF.
6081 * lto-lang.c (lto_set_decl_assembler_name) New function.
6082
60832006-09-10 Mark Mitchell <mark@codesourcery.com>
6084
6085 * lto.h (lto_file_vtable): New structure.
6086 (lto_file): Add vtable pointer.
6087 (lto_file_init): Add vtable paramter.
6088 (lto_read_function_body): New function.
6089 (lto_symtab_merge_fn): New function.
6090 * lto.c (lto_file_init): Add vtable parameter.
6091 (lto_read_form): Fill in entries for DW_AT_prototyped,
6092 DW_AT_frame_base.
6093 (lto_read_subroutine_type_subprogram_DIE): New function.
6094 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6095 DW_TAG_subprogram.
6096 * lto-elf.c (lto_elf_vile_vtable): New variable.
6097 (lto_elf_file_open): Pass it to lto_file_init.
6098 (lto_elf_map_fn_body): New function.
6099 (lto_elf_unmap_fn_body): Likewise.
6100 * lto-read.c: New file.
6101 * lto-symtab.c (lto_symtab_merge_fn): New function.
6102 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6103 tree_rest_of_compilation.
6104 * Make-lang.in (LTO_OBJS): Add lto-read.o
6105 (lto-read.o): New target.
6106
61072006-09-03 Mark Mitchell <mark@codesourcery.com>
6108
6109 * lto.c (<inttypes.h>): Don't include it.
6110 (lto_context): Don't typedef it.
6111 (lto_resolve_reference): New function.
6112 (lto_read_form): Use it.
6113 (lto_resolve_type_ref): New function.
6114 (lto_resolve_var_ref): Likewise.
6115 (lto_resolve_fn_ref): Likewise.
6116 * lto.h (<inttypes.h>): Include it.
6117 (lto_context): New type.
6118 (lto_ref): New structure.
6119 (lto_resolve_type_ref): Declare.
6120 (lto_resolve_var_ref): Likewise.
6121 (lto_resolve_fn_ref): Likewise.
6122
61232006-08-18 Mark Mitchell <mark@codesourcery.com>
6124
6125 * lang-specs.h: New file.
6126
61272006-08-14 Mark Mitchell <mark@codesourcery.com>
6128
6129 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6130 (lto_info_fd_close): Deallocate it.
6131 (lto_die_cache_entry): New structure.
6132 (lto_cache_hash): New function.
6133 (lto_cache_eq): Likewise.
6134 (lto_cache_store_DIE): Likewise.
6135 (lto_cache_lookup_DIE): Likewise.
6136 (lto_read_referenced_type_DIE): Use the cache.
6137 (lto_read_pointer_type_DIE): Robustify.
6138 (lto_read_DIE): Use the cache.
6139 * lto.h (hashtab.h): Include.
6140 (lto_info_fd): Add DIE cache.
6141 * Make-lang.in (LTO_H): New variable.
6142 (lto/lto-lang.o): Use LTO_H.
6143 (lto/lto-elf.o): Likewise.
6144 (lto/lto-symtab.o): Likewise.
6145
61462006-07-09 Mark Mitchell <mark@codesourcery.com>
6147
6148 * lto.c (lto_abi_mismatch_error): New function.
6149 (lto_abbrev_read): Initialize num_abbrevs.
6150 (lto_read_form): Specify allowed form classes for
6151 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6152 (lto_read_variable_formal_parameter_constant_DIE): Handle
6153 DW_AT_declaration. Call lto_symtab_merge_var.
6154 (lto_read_pointer_type_DIE): New function.
6155 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6156 not creat TYPE_DECLs for types that already have them.
6157 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6158 (lto_set_cu_context): Make cu_start point to the header, not the
6159 first DIE.
6160 (lto_file_read): Adjust for change to lto_set_cu_context.
6161 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6162 (lto/lto-symtab.o): New rule.
6163 * lto-tree.h (lang_identifier): Add decl field.
6164 (LANG_IDENTIFIER_CAST): New macro.
6165 (LTO_IDENTIFIER_DECL): Likewise.
6166 (lto_symtab_merge_var): Declare.
6167 * lto-symtab.c: New file.
6168
61692006-07-02 Daniel Berlin <dberlin@dberlin.org>
6170
6171 * lto.c (lto_context): Add current_cu and info_fd members.
6172 (DWARF2_CompUnit): New structure.
6173 (lto_read_DIE): Take lto_info_fd *.
6174 (lto_read_child_DIEs): Ditto.
6175 (lto_file_corrupt_error): Constify argument.
6176 (lto_set_cu_context): New function
6177 (lto_info_fd_init): Ditto.
6178 (lto_info_fd_close): Ditto.
6179 (lto_file_init): Use lto_info_fd_init.
6180 (lto_file_close): Use lto_info_fd_close.
6181 (lto_read_initial_length): Pass in pointer to header size.
6182 (lto_read_comp_unit_header): Correct cu_length to
6183 real length from beginning of header. Take lto_info_fd * as
6184 argument.
6185 (find_cu_for_offset): New function.
6186 (lto_read_form): Change first argument to lto_info_fd *.
6187 Add FORM_CONTEXT argument.
6188 Handle DW_FORM_ref_addr.
ab20d992 6189 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
d7f09764
DN
6190 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6191 Swap contexts if necessary for form.
6192 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6193 lto_file_corrupt_error.
6194 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6195 (lto_read_referenced_type_DIE): Change first argument to
6196 lto_info_fd *. Access lto_fd fields through base pointer.
6197 (lto_read_compile_unit_DIE): Change first argument to an
6198 lto_info_fd *.
6199 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6200 (lto_read_base_type_DIE): Ditto.
6201 (lto_read_child_DIEs): Ditto.
6202 (lto_read_DIE): Ditto. Change type of function pointer.
6203 (lto_info_read): New function.
6204 (lto_set_cu_context): Ditto.
6205 (lto_file_read): Use lto_info_read, walk resulting CU's
6206 (lto_main): Update for lto_info_fd change.
6207 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6208 necessary.
6209 * lto.h (DWARF2_CompUnit): New structure.
6210 (lto_info_fd): Ditto.
6211 (lto_file): Change debug_info to be an lto_info_fd.
ab20d992 6212
d7f09764
DN
62132006-06-25 Mark Mitchell <mark@codesourcery.com>
6214
6215 * lto.c (toplev.h): Include it.
6216 (dwarf2.h): Likewise.
6217 (tree.h): Likewise.
6218 (tm.h): Likewise.
6219 (cgraph.h): Likewise.
6220 (ggc.h): Likewise.
6221 (inttypes.h): Likewise.
6222 (DWARF2_attr): New type.
6223 (DWARF2_abbrev): Likewise.
6224 (DWARF2_class): Likewise.
6225 (DWARF2_form_data): Likewise.
6226 (lto_context): Likewise.
6227 (lto_fd_init): New function.
6228 (lto_abbrev_fd_init): Likewise.
6229 (lto_abbrev_fd_close): Likewise.
6230 (lto_file_init): Use them.
6231 (lto_file_close): New function.
6232 (lto_file_corrupt_error): Likewise.
6233 (LTO_CHECK_INT_VAL): New macro.
6234 (lto_check_size_t_val): New function.
6235 (lto_check_int_val): Likewise.
6236 (LTO_READ_TYPE): New macro.
6237 (lto_read_ubyte): New function.
6238 (lto_read_uhalf): Likewise.
6239 (lto_read_uword): Likewise.
6240 (lto_read_uleb128): Likewise.
6241 (lto_read_initial_length): Likewise.
6242 (lto_abbrev_read_attrs): Likewise.
6243 (lto_abbrev_read): Likewise.
6244 (lto_abbrev_lookup): Likewise.
6245 (lto_read_section_offset): Likewise.
6246 (lto_read_comp_unit_header): Likewise.
6247 (lto_read_form): Likewise.
6248 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6249 (LTO_BEGIN_READ_ATTRS): Likewise.
6250 (LTO_END_READ_ATTRS): Likewise.
6251 (lto_unsupported_attr_error): New function.
6252 (lto_get_identifier): Likewise.
6253 (lto_read_referenced_type_DIE): Likewise.
6254 (lto_read_compile_unit_DIE): Likewise.
6255 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6256 (lto_read_base_type_DIE): Likewise.
6257 (lto_read_DIE): Likewise.
6258 (lto_read_child_DIEs): Likewise.
6259 (lto_file_read): Read DIEs.
6260 (lto_main): Ask middle end to emit entities.
6261 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6262 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6263 (lto_elf_file_close): Likewise.
6264 * lto.h (lto_file): Declare.
6265 (DWARF2_abbrev): Likewise.
6266 (lto_fd): New type.
6267 (lto_abbrev_fd): Likewise.
6268 (lto_file): Use new types.
6269 (lto_file_close): Declare.
6270 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
ab20d992 6271
d7f09764
DN
62722006-06-18 Mark Mitchell <mark@codesourcery.com>
6273
6274 * lto.h: New file.
6275 * lto.c: New file.
6276 * lto-elf.c: New file.
6277 * lto-lang.c (flags.h): Include it.
6278 (lto.h): Likewise.
6279 (lto_init): New function.
6280 (lto_write_globals): Remove.
ab20d992 6281 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
d7f09764
DN
6282 (LANG_HOOKS_INIT): Define.
6283 (LANG_HOOKS_PARSE_FILE): Likewise.
6284 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6285 (LTO_EXE): Link with libelf.
6286 (lto/lto-lang.o): Update dependencies.
6287 (lto/lto.o): New target.
6288 (lto/lto-elf.o): Likewise.
6289
62902006-06-12 Mark Mitchell <mark@codesourcery.com>
6291
6292 * config-lang.in: New file.
6293 * Make-lang.in: Likewise.
6294 * lto-tree.h: Likewise.
6295 * lto-lang.c: Likewise.
818ab71a 6296\f
a5544970 6297Copyright (C) 2006-2019 Free Software Foundation, Inc.
d7f09764 6298
818ab71a
JJ
6299Copying and distribution of this file, with or without modification,
6300are permitted in any medium without royalty provided the copyright
6301notice and this notice are preserved.