]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
Include new generated gcc/params.opt file.
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
fe1d1a8b
ML
12019-11-11 Martin Liska <mliska@suse.cz>
2
3 * Make-lang.in: Relax dependency of lto-dump.o to
4 LTO_OBJS which will allow faster linking (mainly with LTO).
5
c38ee9a2
JH
62019-11-07 Jan Hubicka <hubicka@ucw.cz>
7
8 * lto.c (do_whole_program_analysis): Call lto_free_file_name_hash.
9
c9ef0409
JH
102019-11-02 Jan Hubicka <hubicka@ucw.cz>
11
12 * lto-common.c (read_cgraph_and_symbols): Improve -Q reporting.
13 * lto.c (lto_wpa_write_files): Likewise.
14
6773658a
JJ
152019-10-31 Jakub Jelinek <jakub@redhat.com>
16
17 PR middle-end/92231
18 * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
19 on *node that is not FUNCTION_DECL.
20
3c56d8d8
ML
212019-10-30 Martin Liska <mliska@suse.cz>
22
23 PR lto/91393
24 PR lto/88220
25 * lto-common.c (lto_file_finalize): Use lto_get_summary_section_data.
26 (get_section_data): Add order argument.
27
3518424d
ML
282019-10-29 Martin Liska <mliska@suse.cz>
29
30 * lto.c (do_whole_program_analysis): Pass
31 title as dump_memory_report argument.
32
c5281d50
ML
332019-10-29 Martin Liska <mliska@suse.cz>
34
35 * lto.c (do_whole_program_analysis): Remove argument.
36
f658ad30
JH
372019-10-24 Jan Hubicka <hubicka@ucw.cz>
38
39 * lto-partition.c (add_symbol_to_partition_1): Update.
40 (undo_parittion): Update.
41
ebad2eee
JH
422019-10-23 Jan Hubicka <hubicka@ucw.cz>
43
44 * lto-common.c (lto_file_finalize): Add order attribute.
45 (lto_create_files_from_ids): Pass order.
46 (lto_file_read): UPdate call of lto_create_files_from_ids.
47
7cc47709
JH
482019-10-12 Jan Hubicka <hubicka@ucw.cz>
49
50 * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
51 summary streaming.
52
f8cf94cd
JH
532019-10-12 Jan Hubicka <hubicka@ucw.cz>
54
55 * lto.c (lto_wpa_write_files): Do not update bodies of clones.
56
e5207f1a
JH
572019-10-11 Jan Hubicka <hubicka@ucw.cz>
58
59 * lto.c (lto_wpa_write_files): Call ggc_trim.
60
1fcf52a6
JH
612019-10-11 Jan Hubicka <hubicka@ucw.cz>
62
63 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
64
9142736e
RB
652019-10-10 Richard Biener <rguenther@suse.de>
66
67 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
68
0fa00483
JM
692019-10-04 Joseph Myers <joseph@codesourcery.com>
70
71 * lto-lang.c (flag_isoc2x): New variable.
72
a3d09469
RB
732019-09-18 Richard Biener <rguenther@suse.de>
74
75 PR lto/91763
76 * lto.c (lto_materialize_function): Initialize EH by looking
77 at the function personality and flag_exceptions setting.
78
df375b03
JJ
792019-08-23 Jakub Jelinek <jakub@redhat.com>
80
81 PR middle-end/91283
82 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
83 flag_excess_precision_cmdline. Remove comment.
84
4d732405
RS
852019-08-13 Richard Sandiford <richard.sandiford@arm.com>
86
87 PR middle-end/91421
88 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
89 instead of DECL_FUNCTION_CODE.
90 * lto-symtab.c (lto_symtab_merge_p): Likewise.
91
6e42c90c
BE
922019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
93
94 * Make-lang.in (lto.install-common): Remove unnecessary slash
95 between $(DESTDIR) and $(bindir).
96
cb50701e
ML
972019-07-25 Martin Liska <mliska@suse.cz>
98
99 * lto-common.c (compare_tree_sccs_1): Use new macros
100 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
101
34e64622
GB
1022019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
103
104 * lang.opt (flag_dump_callgraph): New flag.
105 * lto-dump.c (dump_symtab_graphviz): New function.
106 (dump_tool_help): New option.
107 (lto_main): Handle graphviz dumping.
108
b01659aa
JH
1092019-07-18 Jan Hubicka <hubicka@ucw.cz>
110
111 * lto-common.c (gimple_register_canonical_type_1): Do not look for
112 non-ODR conflicts of types in anonymous namespaces.
113 (unify_scc): Do not merge anonymous namespace types.
114
99b1c316
MS
1152019-07-09 Martin Sebor <msebor@redhat.com>
116
117 PR c++/61339
118 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
119 to struct and others to class.
120 (mentions_vars_p): Same.
121 (register_resolution): Same.
122 (lto_register_var_decl_in_symtab): Same.
123 (lto_register_function_decl_in_symtab): Same.
124 (cmp_tree): Same.
125 (lto_read_decls): Same.
126
6c1dae73
MS
1272019-07-09 Martin Sebor <msebor@redhat.com>
128
129 PR c++/61339
130 * lto-dump.c: Change class-key from class to struct and vice versa
131 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
132
70980ea2
ML
1332019-07-04 Martin Liska <mliska@suse.cz>
134
135 PR lto/91078
136 * lto-common.c (lto_file_finalize): Use memcpy to set
137 file_data->lto_section_header.
138
88614dfa
ML
1392019-07-03 Martin Liska <mliska@suse.cz>
140
141 * lto-common.c: Read LTO section and verify header.
142
606a9a8c
JH
1432019-06-27 Jan Hubicka <jh@suse.cz>
144
145 * lto-common.c (lto_register_canonical_types_for_odr_types):
146 Copy CXX_ODR_P from the main variant.
147
85693eef
JH
1482019-06-27 Jan Hubicka <jh@suse.cz>
149
150 * lto-common.c: tree-pretty-print.h
151 (type_streaming_finished): New static var.
152 (gimple_register_canonical_type_1): Return updated hash; handle ODR
153 types.
154 (iterative_hash_canonical_type): Update use of
155 gimple_register_canonical_type_1.
156
c2f7a665
ML
1572019-06-27 Martin Liska <mliska@suse.cz>
158
159 * lto-dump.c (struct symbol_entry): Add default dtor.
160 (struct variable_entry): Likewise.
161 (struct function_entry): Likewise.
162 (dump_list_functions): Release memory.
163 (dump_list_variables): Likewise.
164
ab20d992
JJ
1652019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
166
167 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
168 format of "__intN" types for SIZE_TYPE.
169
f4af4019
JH
1702019-06-24 Jan Hubicka <jh@suse.cz>
171
172 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
173 compare STRING_FLAG only for arrays and integers.
174
0ecf545c
MS
1752019-06-05 Martin Sebor <msebor@redhat.com>
176
177 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
178
a9c697b8
MS
1792019-05-16 Martin Sebor <msebor@redhat.com>
180
ab20d992
JJ
181 * lto-dump.c (lto_main): Same.
182 * lto.c (stream_out): Same.
a9c697b8 183
38613b9b
ML
1842019-05-10 Martin Liska <mliska@suse.cz>
185
186 * Make-lang.in: Use program_transform_name for lto-dump.
187 * config-lang.in: Do not mark lto-dump compiler as we don't
188 want to have it installed at
189 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
190
03de2955
RO
1912019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
192
193 * lto-common.c (lto_file_read): Print section->start as int64_t,
194 section->len as uint64_t.
195 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
196
ee7a003f
ML
1972019-05-06 Martin Liska <mliska@suse.cz>
198
199 * lto-common.c: Update coding style.
200 * lto.c (materialize_cgraph): Likewise.
201
66d62d9f
HK
2022019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
203 Martin Liska <mliska@suse.cz>
204
205 * Make-lang.in: Add lto_dump-related definition.
206 * config-lang.in: Likewise.
207 * lang.opt: Add new language LTODump and options related
208 to LTO dump tool.
209 * lto-common.c (lto_read_decls): Support type statistics dump.
210 (lto_file_read): Likewise for object files.
211 * lto-dump.c: New file.
212 * lto-lang.c (lto_option_lang_mask): Move from ..
213 * lto.c (lto_option_lang_mask): .. here.
214 * lto.h (lto_option_lang_mask): New declaration.
215
a79420f9
ML
2162019-05-06 Martin Liska <mliska@suse.cz>
217 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
218
219 * Make-lang.in: Add lto-common.o.
220 * config-lang.in: Likewise for gtfiles.
221 * lto-common.c: New file.
222 * lto-common.h: New file.
223 * lto-lang.c: Include lto-common.h.
224 * lto.c: Move most of the functionality
225 into lto-common.c file.
226
0c7f51e4
JH
2272019-04-12 Jan Hubicka <hubicka@ucw.cz>
228
229 * lto.c (do_stream_out): rename to ...
230 (stream_out): ... this one; move original code to ...
231 (stream_out_partitions_1, stream_out_partitions): ... these new
232 functions.
233 (lto_wpa_write_files): Honnor lto_parallelism
234
303389b1
ML
2352019-03-26 Martin Liska <mliska@suse.cz>
236
237 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 238 wrapping.
303389b1 239
a3f9f006
ML
2402019-03-11 Martin Liska <mliska@suse.cz>
241
242 * lto-lang.c (lto_post_options): Wrap an option name
243 in a string format message and fix GNU coding style.
244 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
245
04e5c73d
JJ
2462019-03-09 Jakub Jelinek <jakub@redhat.com>
247
248 PR target/79645
249 * lang.opt: Terminate description text with a dot.
250
80f52b40
JM
2512019-02-28 Jason Merrill <jason@redhat.com>
252
253 PR c++/88049 - ICE with undefined destructor and anon namespace.
254 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
255 for a type in an anonymous namespace.
256
67914693
SL
2572019-01-09 Sandra Loosemore <sandra@codesourcery.com>
258
259 PR other/16615
260
261 * lto-partition.c: Mechanically replace "can not" with "cannot".
262 * lto-symtab.c: Likewise.
263 * lto.c: Likewise.
264
a5544970
JJ
2652019-01-01 Jakub Jelinek <jakub@redhat.com>
266
267 Update copyright years.
268
d840d7a2
JH
2692018-12-24 Jan Hubicka <hubicka@ucw.cz>
270
271 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
272 for method whose basetype was already reported.
273
ed1b53a0
MP
2742018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
275
276 Minimize clone counter memory usage in LTO.
277 * lto-partition.c (privatize_symbol_name_1): Keep track of
278 non-unique symbol counters in the lto_clone_numbers hash
279 map.
280 (lto_promote_cross_file_statics): Allocate and free the
281 lto_clone_numbers hash map.
282 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
283 map.
284
ad42aa96
JH
2852018-11-28 Jan Hubicka <jh@suse.cz>
286
287 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
288
d7dce787
JH
2892018-11-22 Jan Hubicka <jh@suse.cz>
290
291 * lto.c (cmp_type_location): Remove.
292 (lto_read_decls): Do not allocate odr_types.
293
f615cb16
ML
2942018-11-19 Martin Liska <mliska@suse.cz>
295
296 PR lto/88077
297 * lto-symtab.c (lto_symtab_merge): Transform the
298 condition before r256989.
299
12eac232
ML
3002018-11-16 Martin Liska <mliska@suse.cz>
301
302 PR lto/88004
303 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
304 lto_symtab_symbol_p as it does checking of transparent alias.
305 These needs to be also merged in the function.
306
7958186b
MP
3072018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
308
309 * lto-partition.c (privatize_symbol_name_1): Use
310 clone_function_name_numbered.
311
abb967da
JH
3122018-10-26 Jan Hubicka <jh@suse.cz>
313
ab20d992 314 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
abb967da 315
033eb567
DM
3162018-10-17 David Malcolm <dmalcolm@redhat.com>
317
318 * Make-lang.in (selftest-lto): New.
319
9ed6dbee
ML
3202018-08-29 Martin Liska <mliska@suse.cz>
321
322 PR bootstrap/87130
323 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
324 to behavior before r263887.
325
3d78e008
ML
3262018-08-27 Martin Liska <mliska@suse.cz>
327
328 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
329 fndecl_built_in_p and remove check for FUNCTION_DECL if
330 possible.
3d78e008
ML
331 * lto-symtab.c (lto_symtab_merge_p): Likewise.
332 (lto_symtab_merge_decls_1): Likewise.
333 (lto_symtab_merge_symbols): Likewise.
334 * lto.c (lto_maybe_register_decl): Likewise.
335 (read_cgraph_and_symbols): Likewise.
336
efd9eb29
TV
3372018-08-21 Tom de Vries <tdevries@suse.de>
338
ab20d992 339 * lto.c (lto_main): Call debuginfo_early_start and
efd9eb29
TV
340 debuginfo_early_stop.
341
00abf86c
MS
3422018-07-20 Martin Sebor <msebor@redhat.com>
343
344 PR middle-end/82063
345 * lto-lang.c (lto_handle_option): Change function argument
346 to HOST_WIDE_INT.
347
efe0e6cd
RB
3482018-07-20 Richard Biener <rguenther@suse.de>
349
350 PR debug/86585
351 * lto.c (unify_scc): Before we throw away an SCC see if we
352 can amend prevailing single-entry SCC with debug refs.
353
814f3331
JH
3542018-07-13 Jan Hubicka <hubicka@ucw.cz>
355
356 * lto.c (do_stream_out): Add PART parameter; open dump file.
357 (stream_out): Add PART parameter; pass it to do_stream_out.
358 (lto_wpa_write_files): Update call of stream_out.
359
c518c102
ML
3602018-07-04 Martin Liska <mliska@suse.cz>
361
362 PR middle-end/66240
363 PR target/45996
364 PR c/84100
365 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
366 instead of memcmp.
367
b54006ae
ML
3682018-06-20 Martin Liska <mliska@suse.cz>
369
370 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 371 FIXME comment.
b54006ae 372
56f62793
ML
3732018-06-19 Martin Liska <mliska@suse.cz>
374
375 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 376 of get_create.
56f62793
ML
377 (undo_partition): Likewise.
378 (lto_balanced_map): Likewise.
379
1724941e
ML
3802018-06-19 Martin Liska <mliska@suse.cz>
381
382 * config-lang.in: Remove stagestuff.
383
29a50dfb
JH
3842018-06-08 Jan Hubicka <hubicka@ucw.cz>
385
386 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
387 New global vars.
388 (lto_register_dumps): New hook.
389 (LANG_HOOKS_REGISTER_DUMPS): New.
390 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
391 * lto-symtab.c: Include lto.h; dump into dump_file instead of
392 symtab->dump_file.
393 (lto_symtab_merge_decls): Initialize dump file.
394 * lto.c (read_cgraph_and_symbols): Initialize dump file.
395 (do_whole_program_analysis): Likewise.
396
74644756
ML
3972018-06-08 Martin Liska <mliska@suse.cz>
398
399 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
400 instead of summary_uid.
401
99353fcf
ML
4022018-06-08 Martin Liska <mliska@suse.cz>
403
404 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
405 of get.
406 (undo_partition): Likewise.
407 (lto_balanced_map): Likewise.
408
31db0fe0
ML
4092018-06-08 Martin Liska <mliska@suse.cz>
410
411 * lto-partition.c (add_references_to_partition): Remove support
412 for MPX (macros, related functions, fields in cgraph_node, ...).
413 (add_symbol_to_partition_1): Likewise.
414 (privatize_symbol_name): Likewise.
415 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
416
f115c9b5
RB
4172018-06-05 Richard Biener <rguenther@suse.de>
418
419 * lto.c (cmp_type_location): Expand locations only once.
420
5b42d196
JH
4212018-05-30 Jan Hubicka <hubicka@ucw.cz>
422
423 * lang.opt (lto_linker_output): Add nolto-rel.
424 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
425 and LTO_LINKER_OUTPUT_NOLTOREL.
426 (lto_init): Generate lto when doing incremental link.
427 * lto.c (lto_precess_name): Add lto1-inclink.
428
ab168044
JH
4292018-05-18 Jan Hubicka <jh@suse.cz>
430
431 PR lto/85583
432 * lto-partition.c (account_reference_p): Do not account
433 references from aliases; do not account refernces from
434 external initializers.
435
b6e33d73
JH
4362018-04-30 Jan Hubicka <jh@suse.cz>
437
438 * lto.c (cmp_partitions_size): Remove.
439 (lto_wpa_write_files): Also output priorities; do not sort partitions.
440 (cmp_partition_order): Move to ...
441 * lto-partition.c (cmp_partition_order): ...
442 (lto_1_to_1_map): Sort partitions.
443
e693ebce
JH
4442018-04-20 Jan Hubicka <jh@suse.cz>
445
446 * lto-partition.c (lto_balanced_map): Fix sanity check.
447
ddb0b824
JH
4482018-04-19 Jan Hubicka <jh@suse.cz>
449
450 * lto-partition.c: Include sreal.h
451 (add_symbol_to_partition_1): Use size instead of self_size
452 for size estimate.
453 (account_reference_p): New.
454 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
455 fix accounting errors in boundary size; add debug output; combine cost
456 as cost/size instead of cost/internal; reduce the partitioning error to
457 +- 1/8 of the parttion size.
458
1781a04f
ML
4592018-04-19 Martin Liska <mliska@suse.cz>
460
461 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
462 for multiple PREVAILING_DEF_IRONLY for common symbols.
463
6867cd69
ML
4642018-04-18 Martin Liska <mliska@suse.cz>
465
466 * lto.c (lto_read_decls): Fix GNU coding style and typos.
467
af597536
ML
4682018-04-18 Martin Liska <mliska@suse.cz>
469
470 PR ipa/83983
471 PR ipa/85391
472 * lto.c (cmp_type_location): New function.
473 (lto_read_decls): First collect all types, then
474 sort them according by location before register_odr_type
475 is called.
476
7d6051b1
JH
4772018-04-18 Jan Hubicka <jh@suse.cz>
478 Martin Liska <mliska@suse.cz>
479
480 PR lto/85391
481 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
482 types.
483
23d87577
ML
4842018-04-11 Martin Liska <mliska@suse.cz>
485
486 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
487 function.
488
c16833dc
ML
4892018-04-10 Martin Liska <mliska@suse.cz>
490
491 PR lto/85248
492 * lto-symtab.c (lto_symtab_merge_p): Do not check for
493 TREE_VALUES of error attributes.
494
8d96e546
ML
4952018-04-10 Richard Biener <rguenther@suse.de>
496 Martin Liska <mliska@suse.cz>
497
498 PR lto/85248
499 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
500
97bb4812
JH
5012018-02-08 Jan Hubicka <hubicka@ucw.cz>
502
503 * lto-partition.c (lto_balanced_map): Watch overflow.
504
39aa9b23
JH
5052018-02-08 Jan Hubicka <hubicka@ucw.cz>
506
507 PR ipa/81360
508 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
509 (read_cgraph_and_symbols): Use
510 symtab_node::output_to_lto_symbol_table_p.
511
26a823f0
JH
5122018-01-30 Jan Hubicka <hubicka@ucw.cz>
513
514 * lto.c (register_resolution): Remove forgotten sanity check.
515
43fbc2e9
JH
5162018-01-30 Jan Hubicka <hubicka@ucw.cz>
517
518 PR lto/81004
519 * lto.c: Include builtins.h
520 (register_resolution): Merge resolutions in case trees was
521 merged across units.
522 (lto_maybe_register_decl): Break out from ...
523 (lto_read_decls): ... here.
524 (unify_scc): Also register decls here.
525 (read_cgraph_and_symbols): Sanity check that all resolutions was
526 read.
527
ee034d31
EB
5282018-02-02 Eric Botcazou <ebotcazou@adacore.com>
529
530 PR lto/83954
531 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
532 component type of array types with non-aliased component.
533
44c945e6
JH
5342018-01-30 Jan Hubicka <hubicka@ucw.cz>
535
536 PR lto/83954
537 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
538 for type match warning on arrays of pointers.
539
cde9b2f8
ML
5402018-01-23 Martin Liska <mliska@suse.cz>
541
542 PR lto/81440
543 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
544 trailing arrays at the end of a struct.
545
5c0caeb3
RS
5462018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
547 Alan Hayward <alan.hayward@arm.com>
548 David Sherwood <david.sherwood@arm.com>
549
550 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
551
928686b1
RS
5522018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
553 Alan Hayward <alan.hayward@arm.com>
554 David Sherwood <david.sherwood@arm.com>
555
556 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
557 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
558
85ec4feb
JJ
5592018-01-03 Jakub Jelinek <jakub@redhat.com>
560
561 Update copyright years.
562
4849deb1
JJ
5632017-12-15 Jakub Jelinek <jakub@redhat.com>
564
565 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
566 affects_type_identity and handler fields, adjust comments.
567
734914b6
RS
5682017-12-07 Richard Sandiford <richard.sandiford@arm.com>
569
570 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
571
5d9ae53d
MS
5722017-12-07 Martin Sebor <msebor@redhat.com>
573
574 PR c/81544
575 * lto-lang.c (lto_attribute_table): Initialize new member of struct
576 attribute_spec.
577
5de73c05
JJ
5782017-11-30 Jakub Jelinek <jakub@redhat.com>
579
580 * lto.c (create_subid_section_table): Use ; instead of ;;.
581
974aedcc
MP
5822017-11-22 Marek Polacek <polacek@redhat.com>
583
584 PR c++/60336
585 PR middle-end/67239
586 PR target/68355
587 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
588
1bad9c18
JH
5892017-11-10 Jan Hubicka <hubicka@ucw.cz>
590
591 * lto-partition.c (lto_balanced_map): Use frequency accessor.
592
65991ea3
JH
5932017-10-13 Jan Hubicka <hubicka@ucw.cz>
594
595 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
596
4e7d0260
NS
5972017-10-11 Nathan Sidwell <nathan@acm.org>
598
599 * lto.c (mentions_vars_p_decl_with_vis): Use
600 DECL_ASSEMBLER_NAME_RAW.
601 (lto_fixup_prevailing_decls): Likewise.
602
8e6cdc90
RS
6032017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
604
605 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
606 operating on trees as wide_ints.
607
357b7604
RS
6082017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
609 Alan Hayward <alan.hayward@arm.com>
610 David Sherwood <david.sherwood@arm.com>
611
612 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
613
1ea85365
RB
6142017-08-21 Richard Biener <rguenther@suse.de>
615
92a285c1
ML
616 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
617 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
618 TYPE_DECL debug processing, register DIE references from
619 prevailing SCCs with the debug machinery.
620 (lto_section_with_id): Handle LTO debug sections.
1ea85365 621
8e093270
NS
6222017-08-16 Nathan Sidwell <nathan@acm.org>
623
624 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
625 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
626 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
627
eac3ab4a
TV
6282017-08-08 Tom de Vries <tom@codesourcery.com>
629
630 * lto.c: Include attribs.h.
631
314e6352
ML
6322017-08-08 Martin Liska <mliska@suse.cz>
633
634 * lto-lang.c: Include header files.
635 * lto-symtab.c: Likewise.
636
63e434ca
RB
6372017-08-03 Richard Biener <rguenther@suse.de>
638
639 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
640 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
641 use DECL_LANG_FLAG_0.
642 (lto_symtab_prevail_decl): Likewise.
643
417ca011
TD
6442017-07-07 Torsten Duwe <duwe@suse.de>
645
646 * lto-lang.c (lto_attribute_table): Add entry for
647 "patchable_function_entry".
648
20deef65
NS
6492017-07-19 Nathan Sidwell <nathan@acm.org>
650
651 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
652 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
653
0eaf0bfe
JH
6542017-07-06 Jan Hubicka <hubicka@ucw.cz>
655
656 * lto-partition.c (lto_balanced_map): Do not check
657 flag_toplevel_reorder.
2db9b7cd 658
0eaf0bfe 6592017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
660 * lto-lang.c (lto_init): Use builtin_structptr_types.
661
d1eed638
JH
6622017-06-15 Jan Hubicka <hubicka@ucw.cz>
663 Thomas Preud'homme <thomas.preudhomme@arm.com>
664
665 PR lto/69866
666 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
667 that resolved externally.
668
d2db2e6b
JH
6692017-05-23 Jan Hubicka <hubicka@ucw.cz>
670
671 * lto.c (do_whole_program_analysis): Replace inline_free_summary
672 by ipa_free_fn_summary.
673
464d0118
ML
6742017-05-23 Martin Liska <mliska@suse.cz>
675
676 * lto-symtab.c (lto_cgraph_replace_node): Use
677 symtab_node::dump_{asm_,}name functions.
678 * lto.c (read_cgraph_and_symbols): Likewise.
679 (do_whole_program_analysis): Likewise.
680
6c52831d
ML
6812017-05-23 Martin Liska <mliska@suse.cz>
682
683 * lto.c (read_cgraph_and_symbols): Use the renamed function.
684 (do_whole_program_analysis): Use the renamed function.
685
27d020cf
JH
6862017-05-22 Jan Hubicka <hubicka@ucw.cz>
687
688 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
689 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
690
815d9cc6
XR
6912017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
692
92a285c1 693 PR c++/80038
815d9cc6
XR
694 * lto-lang.c (lto_init): Set in_lto_p earlier.
695
350792ff 6962017-04-12 Richard Biener <rguenther@suse.de>
ab20d992 697 Bernd Edlinger <bernd.edlinger@hotmail.de>
350792ff
RB
698
699 PR middle-end/79671
700 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
701
4a44a5f3
ML
7022017-02-14 Martin Liska <mliska@suse.cz>
703
704 * lto.c (do_stream_out): Free LTO file filename string.
705
8a3a6ab4
DM
7062017-01-19 David Malcolm <dmalcolm@redhat.com>
707
708 * lto-lang.c (builtin_type_for_size): Convert call to
709 lto_type_for_size to one through the langhook.
710 (lto_type_for_size): Move to langhooks.c and rename to
711 lhd_type_for_size.
712 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
713
4c4b4703
JJ
7142017-01-11 Jakub Jelinek <jakub@redhat.com>
715
716 PR middle-end/50199
717 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
718 if it was 0.
719
bd2c6270
JJ
7202017-01-09 Jakub Jelinek <jakub@redhat.com>
721
722 PR translation/79019
723 PR translation/79020
724 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
725
24d3f325
NS
7262017-01-06 Nathan Sidwell <nathan@acm.org>
727
5406184c
NS
728 * lto-partition.c (promote_symbol): Write to dump file sooner,
729 include alias promoting too.
730
24d3f325
NS
731 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
732 (may_need_named_section_p): Likewise.
733 (rename_statics): Likewise.
734 (lto_promote_cross_file_statics): Likewise.
735
cbe34bb5
JJ
7362017-01-01 Jakub Jelinek <jakub@redhat.com>
737
738 Update copyright years.
739
6c8bf066
GJL
7402016-11-30 Georg-Johann Lay <avr@gjlay.de>
741
742 PR lto/78562
743 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
744 mismatch if the two types are built-in.
745
7fa6a965
PK
7462016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
747
748 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
749
efb71232
RB
7502016-11-23 Richard Biener <rguenther@suse.de>
751
752 PR lto/78472
753 * lto.c (hash_canonical_type): Ignore zero-sized fields.
754
48330c93
BE
7552016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
756
757 PR c++/71973
758 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
759
899ca90e 7602016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
761 Alan Hayward <alan.hayward@arm.com>
762 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
763
764 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
765
65179585
RB
7662016-10-31 Richard Biener <rguenther@suse.de>
767
768 PR lto/78129
769 * lto.c (do_whole_program_analysis): Bail out after errors
770 from WPA analysis.
771
8bc5448f
KV
7722016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
773
774 * lto-partition.c: Include tree-vrp.h.
775 * lto.c: Likewise.
776
68317985
RB
7772016-09-20 Richard Biener <rguenther@suse.de>
778
779 * lto.c (lto_main): Call early_finish with "<artificial>" as
780 filename.
781
321e76fb
RB
7822016-09-19 Richard Biener <rguenther@suse.de>
783
784 * lto.c (lto_main): Invoke early_finish debug hook.
785
ea6e17d5
RB
7862016-07-25 Richard Biener <rguenther@suse.de>
787
788 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
789 (unify_scc): Likewise.
790 (lto_read_decls): Likewise.
791
e9ac1f86
JJ
7922016-06-28 Jakub Jelinek <jakub@redhat.com>
793
794 * Make-lang.in: Don't cat ../stage_current if it does not exist.
795
277d7ee0
AK
7962016-06-23 Andi Kleen <ak@linux.intel.com>
797
798 * Make-lang.in: Add support for autofdo (disabled for now)
799
4d926e34
MS
8002016-06-10 Martin Sebor <msebor@redhat.com>
801
802 PR c/71392
ab20d992 803 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
4d926e34
MS
804 attribute in type-generic builtins.
805
479f99c9
JH
8062016-05-16 Jan Hubicka <hubicka@ucw.cz>
807
808 * lto-partition.c (add_symbol_to_partition_1): Likewise.
809
1a0bf5e1
JH
8102016-05-03 Jan Hubicka <hubicka@ucw.cz>
811
812 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
813
a2e76867
PK
8142016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
815
816 * lto-partition.h (lto_balanced_map): New parameter.
817 * lto-partition.c (lto_balanced_map): New parameter
818 max_partition_size.
819 Check if partition size is greater than max_partition_size.
820 * lto.c (do_whole_program_analysis): Adjust calls to
821 lto_balanced_map() to pass 2nd argument.
822
ea913779
L
8232016-03-17 H.J. Lu <hongjiu.lu@intel.com>
824
825 PR lto/70258
826 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
827 PIE.
828
56aae4b7
JJ
8292016-03-08 Jakub Jelinek <jakub@redhat.com>
830
831 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
832 - becuase -> because.
833
ed5d948d
TV
8342016-02-15 Tom de Vries <tom@codesourcery.com>
835
836 PR lto/69655
837 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
838 argument.
839
4ecbadc7
ML
8402016-01-27 Martin Liska <mliska@suse.cz>
841
842 * lto-partition.c (add_symbol_to_partition_1): Remove usage
843 of hsa_summaries.
844
e49d321f
JH
8452016-01-19 Jan Hubicka <hubicka@ucw.cz>
846
847 PR lto/69136
848 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
849 decls have no assemblernames.
850
b2b40051 8512016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 852 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
853
854 * lto-partition.c: Include "hsa.h"
855 (add_symbol_to_partition_1): Put hsa implementations into the
856 same partition as host implementations.
857
5803bd01
JH
8582016-01-12 Jan Hubicka <hubicka@ucw.cz>
859
860 PR lto/69003
861 * lto-partition.c (rename_statics): Fix pasto.
862
13092f61
RB
8632016-01-18 Richard Biener <rguenther@suse.de>
864
865 PR lto/69337
866 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
867 function vs. variable.
868
3c4e91c9
RB
8692016-01-12 Richard Biener <rguenther@suse.de>
870
871 PR lto/69077
872 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
873 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
874
818ab71a
JJ
8752016-01-04 Jakub Jelinek <jakub@redhat.com>
876
877 Update copyright years.
878
3fddb2ef
JH
8792015-12-10 Jan Hubicka <hubicka@ucw.cz>
880
881 PR lto/68878
882 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
883 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
884 (lto_symtab_prevailing_decl): Use it.
885
4a38b02b
IV
8862015-12-15 Ilya Verbin <ilya.verbin@intel.com>
887
888 * lto.c: Include stringpool.h and fold-const.h.
889 (offload_handle_link_vars): New static function.
890 (lto_main): Call offload_handle_link_vars.
891
ca834876
JH
8922015-12-10 Jan Hubicka <hubicka@ucw.cz>
893
894 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
895
958a627f
JH
8962015-12-11 Jan Hubicka <hubicka@ucw.cz>
897
898 PR ipa/61886
899 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
900 values of error and warning attributes.
901
da20571a
JH
9022015-12-08 Jan Hubicka <hubicka@ucw.cz>
903
904 PR lto/68811
905 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
906 DECL.
907 (LTO_NO_PREVAIL): Use gcc_checking_assert.
908
378004b9
JH
9092015-12-08 Jan Hubicka <hubicka@ucw.cz>
910
911 PR lto/68811
912 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
913 by itself.
914
6b9ac179
JH
9152015-12-08 Jan Hubicka <hubicka@ucw.cz>
916
917 PR ipa/61886
918 * lto-symtab.c: Include lto-symtab.h.
919 (lto_cgraph_replace_node): Do not merge profiles here.
920 (lto_symtab_merge_p): New function.
921 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
922 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
923 aliases.
924 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
925 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
926 * lto.c: Include lto-symtab.h
927 * lto-symtab.h: New.
928
41c60c6c
JH
9292015-12-08 Jan Hubicka <hubicka@ucw.cz>
930
931 PR ipa/61886
932 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
933 are not part of the definition.
934 (contained_in_symbol): Likewise.
935 (promote_symbol): When promoting a symbol also promote all transparent
936 aliases.
937 (rename_statics): Weakref needs unique name, too.
938
71e54687
JH
9392015-12-07 Jan Hubicka <hubicka@ucw.cz>
940
941 PR ipa/61886
942 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
943 rename_statics, rename_statics): Handle transparent aliases.
944
88636b62
JH
9452015-12-04 Jan Hubicka <hubicka@ucw.cz>
946
947 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
948 merged_comdat.
949
8c86248e
JH
9502015-12-01 Jan Hubicka <hubicka@ucw.cz>
951
952 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
953
1ff9ed6f
JH
9542015-11-25 Jan Hubicka <jh@suse.cz>
955
956 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
957 * lang.opt (lto_linker_output): New enum.
958 (flinker_output): New flag.
959
22bea0be
JH
9602015-11-24 Jan Hubicka <hubicka@ucw.cz>
961
962 * lto-symtab.c: Include alias.h
963 (warn_type_compatibility_p): Replace types_compatible_p checks by
964 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
965 (lto_symtab_merge): Compare DECL sizes.
966 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
967
aea50b45
JH
9682015-11-24 Jan Hubicka <hubicka@ucw.cz>
969
970 * lto.c (iterative_hash_canonical_type): Recruse for all types
971 which pass !canonical_type_used_p.
972 (gimple_register_canonical_type_1): Sanity check we do not compute
973 canonical type of anything with !canonical_type_used_p.
974 (gimple_register_canonical_type): Skip all types that are
975 !canonical_type_used_p
976
deb3dae6
JH
9772015-11-24 Jan Hubicka <hubicka@ucw.cz>
978
979 * lto.c (unify_scc): Use free_node.
980
f85d2487
JH
9812015-11-21 Jan Hubicka <hubicka@ucw.cz>
982
983 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
984 (gimple_register_canonical_type_1): Check that pointers do not get
985 canonical types.
986 (gimple_register_canonical_type): Do not register pointers.
987
9882015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
989
990 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
991 flag for types that are not ODR; fix loop walking parameters.
992
69f293c9
AM
9932015-11-11 Andrew MacLeod <amacleod@redhat.com>
994
995 * lto-lang.c: Remove unused header files.
996 * lto-object.c: Likewise.
997 * lto-partition.c: Likewise.
998 * lto-symtab.c: Likewise.
999 * lto.c: Likewise.
1000
ee45a32d
EB
10012015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1002
1003 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
1004
0aad0198
RS
10052015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1006
1007 * lto-lang.c: Don't undef DEF_BUILTIN.
1008
2adfab87
AM
10092015-10-29 Andrew MacLeod <amacleod@redhat.com>
1010
1011 * lto-lang.c: Reorder #include's and remove duplicates.
1012 * lto-object.c: Likewise.
1013 * lto-partition.c: Likewise.
1014 * lto-symtab.c: Likewise.
1015 * lto.c: Likewise.
1016
b2b29377
MM
10172015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
1018
1019 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
1020 conditionals.
1021 (lto_fixup_state): Likewise.
1022 (do_whole_program_analysis): Use
1023 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
1024 conditionals.
1025
d9a6bd32
JJ
10262015-10-13 Jakub Jelinek <jakub@redhat.com>
1027
1028 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1029 DEF_FUNCTION_TYPE_11): Define.
1030
9c4eeafc
JH
10312015-10-10 Jan Hubicka <hubicka@ucw.cz>
1032
1033 * lto.c (hash_canonical_type): Honor
1034 type_with_interoperable_signedness.
1035
3e32ee19
NS
10362015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1037
1038 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
1039 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1040
f196d062
RB
10412015-08-31 Richard Biener <rguenther@suse.de>
1042
1043 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
1044 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
1045 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
1046 participate in merging with something else.
1047
45aee888
RB
10482015-08-31 Richard Biener <rguenther@suse.de>
1049
1050 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
1051 test, do not replace a non-builtin with a builtin.
1052 * lto.c (compare_tree_sccs_1): Do not merge things we stream
1053 as builtins vs. non-builtins.
1054
a79683d5
TS
10552015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1056
1057 * lto.h: Remove useless typedefs.
1058
48d859bb
AM
10592015-07-15 Andrew MacLeod <amacleod@redhat.com>
1060
1061 * lto.c: Remove redundant includes.
1062
026c3cfd
AH
10632015-07-12 Aldy Hernandez <aldyh@redhat.com>
1064
1065 * lto-lang.c: Fix double word typos.
1066
9fdcd34e
AM
10672015-07-10 Andrew MacLeod <amacleod@redhat.com>
1068
1069 * lto.c: Include cfghooks.h rather than predict.h.
1070
f51ade33
AM
10712015-07-09 Andrew MacLeod <amacleod@redhat.com>
1072
1073 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1074 lto-streamer.h.
1075 * lto-object.c: Likewise.
1076 * lto-partition.c: Likewise.
1077 * lto-symtab.c: Likewise.
1078
1916bcb5
AM
10792015-07-09 Andrew MacLeod <amacleod@redhat.com>
1080
1081 * lto-lang.c: Adjust includes for flags.h changes.
1082
c7131fb2
AM
10832015-07-07 Andrew MacLeod <amacleod@redhat.com>
1084
1085 * lto-lang.c: Adjust includes.
1086 * lto-object.c: Likewise.
1087 * lto-partition.c: Likewise.
1088 * lto-symtab.c: Likewise.
1089 * lto.c: Likewise.
1090
f0889939
AM
10912015-06-25 Andrew MacLeod <amacleod@redhat.com>
1092
1093 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1094 * lto-object.c: Likewise.
1095 * lto-partition.c: Likewise.
1096 * lto-symtab.c: Likewise.
1097 * lto-tree.h: Likewise.
1098 * lto.c: Likewise.
1099
8d67ee55
RS
11002015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1101
1102 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1103 than typed_noop_remove. Remove redudant typedefs.
1104
abb226c9
AM
11052015-06-17 Andrew MacLeod <amacleod@redhat.com>
1106
1107 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1108 * lto-object.c: Likewise.
1109 * lto-partition.c: Likewise.
1110 * lto-symtab.c: Likewise.
1111 * lto.c: Likewise.
1112
351d90f4
JH
11132015-06-14 Jan Hubicka <hubicka@ucw.cz>
1114
1115 PR ipa/66181
1116 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1117
44c42705
DD
11182015-06-12 DJ Delorie <dj@redhat.com>
1119
1120 * lto-lang.c (lto_type_for_size): Include intN types.
1121 (lto_type_for_mode): Likewise.
1122
64578d98
JH
11232015-06-08 Jan Hubicka <hubicka@ucw.cz>
1124
1125 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1126
13fdf2e2
AM
11272015-06-08 Andrew MacLeod <amacleod@redhat.com>
1128
1129 * lto-lang.c : Adjust include files.
1130 * lto-object.c : Likewise.
1131 * lto-partition.c : Likewise.
1132 * lto-partition.h : Likewise.
1133 * lto-symtab.c : Likewise.
1134 * lto.c : Likewise.
1135 * lto.h : Likewise.
1136
ccb5ad37
JH
11372015-06-06 Jan Hubicka <hubicka@ucw.cz>
1138
6542950e
JH
1139 PR lto/65378
1140 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1141 odr_or_derived_type_p.
1142 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1143
11442015-06-08 Jan Hubicka <hubicka@ucw.cz>
1145
ccb5ad37
JH
1146 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1147 pointers.
1148
d7438551
AH
11492015-06-05 Aldy Hernandez <aldyh@redhat.com>
1150
1151 * lto-lang.c (lto_write_globals): Remove.
1152 (LANG_HOOKS_WRITE_GLOBALS): Same.
1153
ecb9f223
AM
11542015-06-04 Andrew MacLeod <amacleod@redhat.com>
1155
1156 * lto-lang.c: Adjust includes for restructured coretypes.h.
1157 * lto-object.c: Likewise.
1158 * lto-partition.c: Likewise.
1159 * lto-symtab.c: Likewise.
1160 * lto.c: Likewise.
1161
9cb9b937
JH
11622015-06-04 Jan Hubicka <hubicka@ucw.cz>
1163
1164 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1165
93e2aa6d
JH
11662015-06-03 Jan Hubicka <hubicka@ucw.cz>
1167
1168 * lto.c (iterative_hash_canonical_type,
1169 gimple_register_canonical_type): only hash main variants of types
1170
faae53f8
ML
11712015-05-27 Martin Liska <mliska@suse.cz>
1172
1173 * lto-partition.c (new_partition): Reset number of symbols.
1174 (add_symbol_to_partition_1): Increment number of symbols.
1175 (undo_partition): Decrement number of symbols.
1176 (lto_balanced_map): Dump number of symbols and insns that
1177 belong to a partition.
1178 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1179
b727ba74
JH
11802015-05-22 Jan Hubicka <hubicka@ucw.cz>
1181
1182 * lto.c (hash_canonical_type): Be sure we hash only types that
1183 need alias set.
1184 (gimple_register_canonical_type_1): Do not produce canonical
1185 types for types that do not need alias sets.
1186
1d1218fb
JH
11872015-05-22 Jan Hubicka <hubicka@ucw.cz>
1188
1189 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1190
872d5034
JH
11912015-05-19 Jan Hubicka <hubicka@ucw.cz>
1192
1193 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1194
259d29e3
JH
11952015-05-17 Jan Hubicka <hubicka@ucw.cz>
1196
1197 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1198 compare ODR types (if available) and function types.
1199 (lto_symtab_merge): ... here; output ODR violation warnings
1200 and call warn_types_mismatch.
1201
b0845a1e
JH
12022015-04-29 Jan Hubicka <hubicka@ucw.cz>
1203
1204 * lto.c (lto_fixup_state): Call verify_type.
1205
67f58944
TS
12062015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1207
b0845a1e 1208 * lto.c: Adjust for hash_table changes.
67f58944 1209
36ceb0e3
JH
12102015-03-27 Jan Hubicka <hubicka@ucw.cz>
1211
1212 * lto.c (lto_read_decls): Move code registering odr types out
1213 of TYPE_CANONICAL conditional and also register polymorphic types.
1214
afd1e7c6
JH
12152015-03-26 Jan Hubicka <hubicka@ucw.cz>
1216
1217 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1218 DECL_ARTIFICAL symbols.
1219
eaeec5ec
JH
12202015-03-26 Jan Hubicka <hubicka@ucw.cz>
1221
1222 PR lto/65536
1223 * lto.c (unify_scc): Revert location cache when unification
1224 suceeded.
1225 (lto_read_decls): Accept location cache after sucess;
1226 apply location cache before calling debug hooks.
1227
1c4db829
JH
12282015-03-10 Jan Hubicka <hubicka@ucw.cz>
1229
1230 * lto.c (read_cgraph_and_symbols): Do not do merging
1231 at ltrans stage.
1232
db847fa8
JJ
12332015-02-26 Jakub Jelinek <jakub@redhat.com>
1234
1235 * lto.c (lto_mode_identity_table): New variable.
1236 (lto_read_decls): Add mode_table argument to the lto_input_block
1237 constructor.
1238 (lto_file_finalize): Initialize mode_table.
1239 (lto_init): Initialize lto_mode_identity_table.
1240
56a9f6bc
TS
12412015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1242
1243 PR libgomp/64625
1244 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1245 Remove macros.
1246 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1247
ebc8f0bb
JH
12482015-02-03 Jan Hubicka <hubicka@ucw.cz>
1249
1250 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1251
40fecdd6
JM
12522015-01-30 Joseph Myers <joseph@codesourcery.com>
1253
1254 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1255 changed to pass input_location as first argument.
1256
040968a8
JH
12572014-12-11 Jan Hubicka <hubicka@ucw.cz>
1258
1259 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1260
69fe4502
JH
12612014-12-11 Jan Hubicka <hubicka@ucw.cz>
1262
1263 * lto.c (compare_tree_sccs_1): Add comparsion of
1264 DECL_FUNCTION_SPECIFIC_TARGET
1265
41dbbb37
TS
12662015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1267 James Norris <jnorris@codesourcery.com>
1268
1269 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1270 New macros.
1271 * lto.c: Include "gomp-constants.h".
1272
837bac8c
IV
12732015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1274
1275 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1276 from select_what_to_stream.
1277
1b34e6e2
BS
12782015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1279 Jakub Jelinek <jakub@redhat.com>
1280
1281 PR middle-end/64412
1282 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1283 if ACCEL_COMPILER.
1284
adfac8df
JJ
12852015-01-09 Michael Collison <michael.collison@linaro.org>
1286
1287 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1288 input.h, alias.h, symtab.h, options, fold-const.h,
1289 wide-int.h, and inchash.h due to flattening of tree.h.
1290 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1291 input.h, alias.h, symtab.h, fold-const.h,
1292 wide-int.h, and inchash.h due to flattening of tree.h.
1293 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1294 input.h, alias.h, symtab.h, options, fold-const.h,
1295 wide-int.h, and inchash.h due to flattening of tree.h.
1296 * lto-partition.c: Ditto.
1297 * lto-symtab.c: Ditto.
1298
5624e564
JJ
12992015-01-05 Jakub Jelinek <jakub@redhat.com>
1300
1301 Update copyright years.
1302
9a1e784a
ML
13032014-12-22 Martin Liska <mliska@suse.cz>
1304
1305 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1306 is used.
1307 (undo_partition): Likewise.
1308 (lto_balanced_map): Likewise.
1309
dd912cb8
ML
13102014-12-22 Martin Liska <mliska@suse.cz>
1311
1312 * lto-partition.c: Include of symbol-summary.h is added.
1313 * lto-symtab.c: Likewise.
1314 * lto.c: Likewise.
1315
17e0fc92
JH
13162014-12-11 Jan Hubicka <hubicka@ucw.cz>
1317
1318 PR ipa/61324
1319 * lto.c (read_cgraph_and_symbols): Update call of
1320 remove_unreachable_nodes.
1321 (do_whole_program_analysis): Remove call of
1322 symtab->remove_unreachable_nodes
1323
58dddbd2
TS
13242014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1325
1326 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1327 htab with malloc instead of ggc.
1328
907dadbd
TS
13292014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1330
1331 * lto.c: Replace htab with hash_table.
1332
9c71e9df
TS
13332014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1334
1335 * lto.c (lto_read_in_decl_state): Adjust.
1336 (lto_fixup_state): Likewise.
1337
72a4a8b0
JH
13382014-11-17 Jan Hubicka <hubicka@ucw.cz>
1339
1340 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1341
54e774c0
JH
13422014-11-14 Jan Hubicka <hubicka@ucw.cz>
1343
1344 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1345
1f6be682
IV
13462014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1347 Bernd Schmidt <bernds@codesourcery.com>
1348 Andrey Turetskiy <andrey.turetskiy@intel.com>
1349 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1350
ab20d992 1351 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
ec6fe917
IV
1352
13532014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1354 Ilya Tocar <ilya.tocar@intel.com>
1355 Andrey Turetskiy <andrey.turetskiy@intel.com>
1356 Bernd Schmidt <bernds@codesourcery.com>
1357
1f6be682
IV
1358 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1359 LTO_SECTION_NAME_PREFIX.
1360 * lto-partition.c (lto_promote_cross_file_statics): Call
1361 select_what_to_stream.
1362 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1363 LTO_SECTION_NAME_PREFIX.
1364 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1365 being built as an offload compiler.
1366
ef4bddc2
RS
13672014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1368
1369 * lto-lang.c: Remove redundant enum from machine_mode.
1370
c582198b
AM
13712014-10-28 Andrew MacLeod <amacleod@redhat.com>
1372
1373 * lto.c: Adjust include files.
1374 * lto-lang.c: Ditto.
1375 * lto-object.c: Ditto.
1376 * lto-partition.c: Ditto.
1377 * lto-symtab.c: Ditto.
1378
60393bbc
AM
13792014-10-27 Andrew MacLeod <amacleod@redhat.com>
1380
1381 * lto-lang.c: Adjust include files.
1382 * lto-object.c: Ditto.
1383 * lto-partition.c: Ditto.
1384 * lto-symtab.c: Ditto.
1385 * lto.c: Ditto.
1386
957f47e6
DD
13872014-10-16 DJ Delorie <dj@redhat.com>
1388
1389 * lto-object.c (lto_obj_begin_section): In the event that pointer
1390 sizes aren't powers of two, choose a more suitable alignment
1391 than (unsigned)(-1).
1392
78a7c317
DD
13932014-10-14 DJ Delorie <dj@redhat.com>
1394
1395 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1396 size-type as well.
1397 (lto_init): Initialize all intN types, not just int128.
1398
70261a4f
ML
13992014-10-06 Martin Liska <mliska@suse.cz>
1400
1401 * lto.c (stream_out): ARG_UNUSED added for last argument.
1402
00de328a
AH
14032014-09-24 Aldy Hernandez <aldyh@redhat.com>
1404
1405 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1406 DECL_ABSTRACT_P.
1407
7861b648
AK
14082014-09-23 Andi Kleen <ak@linux.intel.com>
1409
1410 * lto-partition.c (node_cmp): Update comment.
1411 (varpool_node_cmp): Use symtab_node for comparison.
1412 (add_sorted_nodes): New function.
1413 (lto_balanced_map): Change to keep ordered queue
1414 of ordered node. Handle no_reorder attribute.
1415
1ee85ee1
JH
14162014-09-11 Jan Hubicka <hubicka@ucw.cz>
1417
1418 * lto.c (lto_read_decls): Register ODR types.
1419
8605403e
JH
14202014-08-20 Jan Hubicka <hubicka@ucw.cz>
1421
1422 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1423 call.
1424 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1425
56b1f114
JH
14262014-08-14 Jan Hubicka <hubicka@ucw.cz>
1427
1428 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1429
833f94c0
RB
14302014-08-14 Richard Biener <rguenther@suse.de>
1431
1432 PR lto/62067
1433 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1434
207c68cd
RB
14352014-08-08 Richard Biener <rguenther@suse.de>
1436
1437 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1438
7c581d61
BC
14392014-08-08 Bin Cheng <bin.cheng@arm.com>
1440
1441 PR lto/62032
1442 * lto-lang.c (lto_init): Switch mis-matched arguments.
1443
39c8aaa4
TS
14442014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1445
1446 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1447
6e2830c3
TS
14482014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1449
1450 * lto-partition.c, lto-partition.h: Use hash_set instead of
1451 pointer_set.
1452
50de5793
AK
14532014-07-31 Andi Kleen <ak@linux.intel.com>
1454
1455 * lto.c (hash_canonical_type): Use inchash::hash
1456 and use inchash::add_expr.
1457 (iterative_hash_canonical_type): Dito.
1458
f6bcdb5e
RB
14592014-07-30 Richard Biener <rguenther@suse.de>
1460
1461 * lto-streamer.h (lto_write_data): New function.
1462 * langhooks.c (lhd_append_data): Do not free block.
1463 * lto-section-out.c (lto_write_data): New function writing
1464 raw data to the current section.
1465 (lto_write_stream): Adjust for langhook semantic change.
1466 (lto_destroy_simple_output_block): Write header directly.
1467 * lto-opts.c (lto_write_options): Write options directly.
1468 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1469 (lto_output_toplevel_asms): Likewise.
1470 (copy_function_or_variable): Copy data directly.
1471 (write_global_references): Output index table directly.
1472 (lto_output_decl_state_refs): Likewise.
1473 (write_symbol): Write data directly.
1474 (produce_symtab): Adjust.
1475 (produce_asm_for_decls): Output header and refs directly.
1476
56fdfd3e
AK
14772014-07-25 Andi Kleen <ak@linux.intel.com>
1478
1479 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1480
0bd8bb04
AK
14812014-07-25 Andi Kleen <ak@linux.intel.com>
1482
1483 * lto.c (hash_canonical_type): Convert to inchash.
1484 (iterative_hash_canonical_type): Dito.
1485
6d8eb96b
AK
14862014-07-25 Andi Kleen <ak@linux.intel.com>
1487
1488 * lto.c: Include inchash.h
1489
ad115a3c
JH
14902014-07-14 Jan Hubicka <hubicka@ucw.cz>
1491
1492 * lto.c (mentions_vars_p_decl_non_common): Skip
1493 DECL_ARGUMENT_FLD.
1494 mentions_vars_p_function): Do DECL_ARGUMENTS.
1495 (lto_fixup_prevailing_decls): Update.
1496
917dd9bf
JH
14972014-07-12 Jan Hubicka <hubicka@ucw.cz>
1498
1499 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1500 timevar
1501 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1502
0b83e688
JH
15032014-07-11 Jan Hubicka <hubicka@ucw.cz>
1504
ab20d992 1505 * lto-partition.c (add_references_to_partition): Use
0b83e688
JH
1506 varpool_ctor_useable_for_folding_p.
1507 * lto.c (lto_read_in_decl_state): Update sanity check.
1508
e55637b7
ML
15092014-07-01 Martin Liska <mliska@suse.cz>
1510
1511 IPA REF alias refactoring
1512 * lto-partition.c (add_symbol_to_partition_1): Usage of
1513 FOR_EACH_ALIAS added.
1514
010f4e27
JH
15152014-06-28 Jan Hubicka <hubicka@ucw.cz>
1516
1517 Revert:
1518 * lto.c (lto_copy_fields_not_streamed): New function.
1519 (compare_tree_sccs_1): Do not compare fields shared in between type
1520 and variant.
1521 (lto_read_decls): Fixup types first before inserting into hash.
1522
b82fe354
AP
15232014-06-28 Andrew Pinski <apinski@cavium.com>
1524
1525 * lto.c (lto_read_decls): Fix comment in comment.
1526
288eeff7
JH
15272014-06-28 Jan Hubicka <hubicka@ucw.cz>
1528
1529 * lto.c (lto_copy_fields_not_streamed): New function.
1530 (compare_tree_sccs_1): Do not compare fields shared in between type
1531 and variant.
1532 (lto_read_decls): Fixup types first before inserting into hash.
1533
e01fa630
ML
15342014-06-25 Martin Liska <mliska@suse.cz>
1535
ab20d992 1536 * lto-partition.c (add_references_to_partition): New IPA REF function
e01fa630
ML
1537 used.
1538 (add_symbol_to_partition_1): Likewise.
1539 (lto_balanced_map): Likewise.
ab20d992 1540 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
e01fa630 1541
aaf8a23e
JH
15422014-06-24 Jan Hubicka <hubicka@ucw.cz>
1543
1544 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1545 (mentions_vars_p_function): ... here.
1546 (compare_tree_sccs_1): Update VINDEX checks.
1547 (lto_fixup_prevailing_decls): Likewise.
1548
1eb68d2d
TS
15492014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1550
1551 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1552 pointer_map.
1553
c203e8a7
TS
15542014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1555
1556 * lto.c: Adjust.
1557
714c800f
JH
15582014-06-20 Jan Hubicka <hubicka@ucw.cz>
1559
1560 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1561
569b1784
JH
15622014-06-20 Jan Hubicka <hubicka@ucw.cz>
1563
1564 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1565
56363ffd
JH
15662014-06-15 Jan Hubicka <hubicka@ucw.cz>
1567
1568 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1569
e257a17c
JH
15702014-06-10 Jan Hubicka <hubicka@ucw.cz>
1571
1572 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1573 (do_whole_program_analysis): Use verify_symtab.
1574
24d047a3
JH
15752014-06-07 Jan Hubicka <hubicka@ucw.cz>
1576
1577 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1578 lto_fixup_prevailing_decls): Skip section names.
1579
9b2b7279
AM
15802014-06-02 Andrew MacLeod <amacleod@redhat.com>
1581
1582 * lto-symtab.c: Include builtins.h.
1583
a9243bfc
RB
15842014-05-26 Richard Biener <rguenther@suse.de>
1585
1586 * lto.c (lto_parse_hex): Use int64_t.
1587 (lto_resolution_read): Likewise.
1588
fd1e9302
JH
15892014-05-23 Jan Hubicka <hubicka@ucw.cz>
1590
1591 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1592
aede2c10
JH
15932014-05-23 Jan Hubicka <hubicka@ucw.cz>
1594
1595 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1596 symtab pointer.
1597 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1598
f6a7cffc
TS
15992014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1600
1601 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1602 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1603 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1604
4000360e
BS
16052012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1606
1607 * lto-object.c: Include "lto-section-names.h".
1608 (LTO_SEGMENT_NAME): Don't define.
1609 * lto.c: Include "lto-section-names.h".
1610
b9559136
JH
16112014-05-17 Jan Hubicka <hubicka@ucw.cz>
1612
1613 PR lto/61012
1614 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1615 mixed with variables.
1616
766090c2
TS
16172014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1618
1619 * lto-tree.h: Don't use variable_size gty attribute.
1620 * lto.c (lto_read_in_decl_state): Adjust.
1621 (create_subid_section_table): Likewise.
1622 (lto_flatten_files): Likewise.
1623 (read_cgraph_and_symbols): Likewise.
1624
1d60af08
KZ
16252014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1626 Mike Stump <mikestump@comcast.net>
1627 Richard Sandiford <rdsandiford@googlemail.com>
1628
1629 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1630 * lto-lang.c (get_nonnull_operand): Likewise.
1631
22869a37
RB
16322014-04-28 Richard Biener <rguenther@suse.de>
1633
1634 PR middle-end/60092
1635 * lto-lang.c: Define flag_isoc11.
1636
7de90a6c
DM
16372014-04-23 David Malcolm <dmalcolm@redhat.com>
1638
1639 * lto-partition.c (add_references_to_partition): Update for
1640 removal of implicit pointer from the is-a.h API.
1641 (add_symbol_to_partition_1): Likewise.
1642 (contained_in_symbol): Likewise.
1643 (undo_partition): Likewise.
1644 (lto_balanced_map): Likewise.
1645 (promote_symbol): Likewise.
1646 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1647 (lto_symtab_merge_symbols): Likewise.
1648 * lto.c (lto_wpa_write_files): Likewise.
1649
783dab6b
RB
16502014-04-15 Richard Biener <rguenther@suse.de>
1651
1652 * lto.c: Include params.h.
1653 (do_whole_program_analysis): Switch on flag_lto_partition value,
1654 add support for LTO_PARTITION_ONE.
1655 * lto-partition.h (lto_balanced_map): Adjust.
1656 * lto-partition.c (lto_balanced_map): Get number of desired
1657 partitions as argument to support -flto-partition=one.
1658
cb90235d
JH
16592014-04-14 Jan Hubicka <hubicka@ucw.cz>
1660
ab20d992 1661 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
cb90235d
JH
1662 tp_first_run.
1663
bbe281da
JH
16642014-03-19 Jan Hubicka <hubicka@ucw.cz>
1665
1666 * lto.c: Include ipa-inline.h
1667 (do_whole_program_analysis): Free inline summary after partitioning.
1668
ce2f49b3
RB
16692014-03-19 Richard Biener <rguenther@suse.de>
1670
1671 PR middle-end/60553
ab20d992 1672 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
ce2f49b3
RB
1673 instead of TREE_CHAIN as chain_next.
1674
e41106fc
RB
16752014-03-19 Richard Biener <rguenther@suse.de>
1676
1677 * lto.c (lto_wpa_write_files): Move call to
1678 lto_promote_cross_file_statics ...
1679 (do_whole_program_analysis): ... here, into the partitioning
1680 block. Do not ggc_collect after lto_wpa_write_files but
1681 for a last time before it.
1682
15df2655
JJ
16832014-03-19 Jakub Jelinek <jakub@redhat.com>
1684
1685 PR lto/60571
1686 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1687 Fix formatting.
1688
415e2e6b
JJ
16892014-03-18 Jakub Jelinek <jakub@redhat.com>
1690
1691 PR sanitizer/60535
1692 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1693 and complex_{float,{,long_}double}_type_node.
1694
f42c637e
PM
16952014-03-08 Paulo Matos <paulo@matos-sorge.com>
1696
415e2e6b
JJ
1697 * lto-lang.c (lto_init): Pass flag_short_double to
1698 build_common_tree_nodes.
f42c637e 1699
6dab804d
JH
17002014-02-14 Jan Hubicka <hubicka@ucw.cz>
1701
1702 PR lto/60295
1703 * lto.c (stream_out): Avoid parallel streaming with
1704 -flto=jobserver until we are able to throttle it down
1705 resonably.
1706
39434bce
JH
17072014-02-14 Jan Hubicka <hubicka@ucw.cz>
1708
1709 * lto-partition.c (add_symbol_to_partition_1,
1710 undo_partition, lto_balanced_map): Aliases have no
1711 defined size.
1712 (lto_balanced_map): Do not follow refering variables
1713 if they can be optimized out.
1714
1966fd99
RB
17152014-02-14 Richard Biener <rguenther@suse.de>
1716
1717 PR lto/60179
1718 * lto.c (compare_tree_sccs_1): Do not compare
1719 DECL_FUNCTION_SPECIFIC_TARGET.
1720 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1721
283416b3
RB
17222014-02-12 Richard Biener <rguenther@suse.de>
1723
1724 PR lto/60060
1725 * lto-lang.c (lto_write_globals): Do not call
1726 wrapup_global_declarations or emit_debug_global_declarations
1727 but emit debug info for non-function scope variables
1728 directly.
1729
b7e85694
JH
17302014-02-06 Jan Hubicka <hubicka@ucw.cz>
1731
1732 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1733
96451279
JH
17342014-02-06 Jan Hubicka <hubicka@ucw.cz>
1735
1736 PR ipa/59469
1737 * lto-partition.c (symbol_class): Move to cgraph.h
1738 (get_symbol_class): Move to symtab.c
1739 (add_references_to_partition, add_symbol_to_partition_1,
1740 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1741 lto_promote_cross_file_statics): Update.
1742
f300e7b8
JH
17432014-02-05 Jan Hubicka <hubicka@ucw.cz>
1744
1745 * lto.c (lto_parallelism): New static var.
1746 (do_stream_out, wait_for_child, stream_out): New static functions.
1747 (lto_wpa_write_files): Add support for parallel streaming.
1748 (do_whole_program_analysis): Set parallelism.
1749 * lang.opt (fwpa): Add parameter.
1750 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1751 (lto_init): Update use of flag_wpa.
1752 * lto-streamer.h (asm_nodes_output): Declare.
1753
f0f91770
RB
17542014-02-05 Richard Biener <rguenther@suse.de>
1755
1756 * lto.h (lto_global_var_decls): Remove.
1757 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1758 (lto_write_globals): Do nothing in WPA stage, gather globals from
1759 the varpool here ...
1760 * lto.c (lto_main): ... not here.
1761 (materialize_cgraph): Do not call rest_of_decl_compilation
1762 on the empty lto_global_var_decls vector.
1763 (lto_global_var_decls): Remove.
1764
d665f8dd
JH
17652014-02-04 Jan Hubicka <hubicka@ucw.cz>
1766
ab20d992 1767 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
d665f8dd
JH
1768 needs duplicating, not generic COMDAT.
1769
c39276b8
RB
17702014-02-04 Richard Biener <rguenther@suse.de>
1771
1772 PR lto/59723
1773 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1774 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1775
5f876ae7
JH
17762014-02-04 Jan Hubicka <hubicka@ucw.cz>
1777 Markus Trippelsdorf
1778
1779 PR ipa/59469
1780 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1781 merge force_output and forced_by_abi flags.
1782
b72271b9
BI
17832014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1784
1785 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1786 flag_cilkplus.
1787
63124c48
RB
17882014-01-09 Richard Biener <rguenther@suse.de>
1789
1790 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1791
d05b9920
RB
17922014-01-09 Richard Biener <rguenther@suse.de>
1793
1794 PR lto/45586
1795 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1796 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1797 (gimple_canonical_types_compatible_p): Do not compare them either.
1798
23a5b65a
RS
17992014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1800
1801 Update copyright years
1802
2c8326a5
OE
18032013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1804
1805 * lto.c: Remove struct tags when referring to class varpool_node.
1806 * lto-partition.c: Likewise.
1807 * lto-symtab.c: Likewise.
1808
e06f9964
JJ
18092013-11-29 Jakub Jelinek <jakub@redhat.com>
1810 Richard Biener <rguenther@suse.de>
1811
1812 PR lto/59326
1813 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1814
c193f58b
JJ
18152013-11-29 Jakub Jelinek <jakub@redhat.com>
1816
1817 PR lto/59326
1818 * lto.c (mentions_vars_p_omp_clause): New function.
1819 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1820 after return stmts.
1821
2fb9a547
AM
18222013-11-22 Andrew MacLeod <amacleod@redhat.com>
1823
1824 * lto.c: Add required include files from gimple.h.
ab20d992
JJ
1825 * lto-lang.c: Likewise.
1826 * lto-object.c: Likewise.
1827 * lto-partition.c: Likewise.
1828 * lto-symtab.c: Likewise.
2fb9a547 1829
fec39fa6
TS
18302013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1831
1832 * lto-partition.c lto-symtab.c lto.c Adjust.
1833
d8a2d370
DN
18342013-11-14 Diego Novillo <dnovillo@google.com>
1835
1836 * lto-lang.c: Include stringpool.h.
1837 Include stor-layout.h.
1838 * lto-partition.c: Include gcc-symtab.h.
1839 * lto.c: Include stor-layout.h.
1840
5e20cdc9
DM
18412013-10-31 David Malcolm <dmalcolm@redhat.com>
1842
1843 Automated part of renaming of symtab_node_base to symtab_node.
1844
1845 Patch autogenerated by rename_symtab.py from
1846 https://github.com/davidmalcolm/gcc-refactoring-scripts
1847 revision 58bb219cc090b2f4516a9297d868c245495ee622
1848
1849 * lto-partition.c (add_symbol_to_partition): Rename
1850 symtab_node_base to symtab_node.
1851 (get_symbol_class): Likewise.
1852 (symbol_partitioned_p): Likewise.
1853 (add_references_to_partition): Likewise.
1854 (add_symbol_to_partition_1): Likewise.
1855 (contained_in_symbol): Likewise.
1856 (add_symbol_to_partition): Likewise.
1857 (lto_1_to_1_map): Likewise.
1858 (lto_max_map): Likewise.
1859 (lto_balanced_map): Likewise.
1860 (privatize_symbol_name): Likewise.
1861 (promote_symbol): Likewise.
1862 (may_need_named_section_p): Likewise.
1863 (rename_statics): Likewise.
1864 (lto_promote_statics_nonwpa): Likewise.
1865 * lto-symtab.c (lto_symtab_merge): Likewise.
1866 (lto_symtab_resolve_replaceable_p): Likewise.
1867 (lto_symtab_symbol_p): Likewise.
1868 (lto_symtab_resolve_can_prevail_p): Likewise.
1869 (lto_symtab_resolve_symbols): Likewise.
1870 (lto_symtab_merge_decls_2): Likewise.
1871 (lto_symtab_merge_decls_1): Likewise.
1872 (lto_symtab_merge_decls): Likewise.
1873 (lto_symtab_merge_symbols_1): Likewise.
1874 (lto_symtab_merge_symbols): Likewise.
1875 (lto_symtab_prevailing_decl): Likewise.
1876 * lto.c (lto_wpa_write_files): Likewise.
1877 (read_cgraph_and_symbols): Likewise.
1878 (do_whole_program_analysis): Likewise.
1879
378cd6b1
DM
18802013-10-30 David Malcolm <dmalcolm@redhat.com>
1881
1882 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1883 declarations onto multiple lines to make things easier for
1884 rename_symtab.py.
1885 (lto_symtab_merge_decls_1): Likewise.
1886 (lto_symtab_merge_symbols_1): Likewise.
1887
939b37da
BI
18882013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1889
1890 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1891 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1892 Plus is enabled.
1893
67348ccc
DM
18942013-10-29 David Malcolm <dmalcolm@redhat.com>
1895
1896 Patch autogenerated by refactor_symtab.py from
1897 https://github.com/davidmalcolm/gcc-refactoring-scripts
1898 revision 58bb219cc090b2f4516a9297d868c245495ee622
1899
1900 * lto-partition.c (lto_promote_cross_file_statics): Update for
1901 conversion of symtab types to a true class hierarchy.
1902 (rename_statics): Likewise.
1903 (promote_symbol): Likewise.
1904 (privatize_symbol_name): Likewise.
1905 (lto_balanced_map): Likewise.
1906 (varpool_node_cmp): Likewise.
1907 (node_cmp): Likewise.
1908 (lto_1_to_1_map): Likewise.
1909 (undo_partition): Likewise.
1910 (add_symbol_to_partition): Likewise.
1911 (contained_in_symbol): Likewise.
1912 (add_symbol_to_partition_1): Likewise.
1913 (add_references_to_partition): Likewise.
1914 (symbol_partitioned_p): Likewise.
1915 (get_symbol_class): Likewise.
1916 (lto_max_map): Likewise.
1917 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1918 (lto_symtab_merge_symbols): Likewise.
1919 (lto_symtab_merge_symbols_1): Likewise.
1920 (lto_symtab_merge_decls): Likewise.
1921 (lto_symtab_merge_decls_1): Likewise.
1922 (lto_symtab_merge_decls_2): Likewise.
1923 (lto_symtab_resolve_symbols): Likewise.
1924 (lto_symtab_resolve_can_prevail_p): Likewise.
1925 (lto_symtab_symbol_p): Likewise.
1926 (lto_symtab_resolve_replaceable_p): Likewise.
1927 (lto_symtab_merge): Likewise.
1928 (lto_varpool_replace_node): Likewise.
1929 (lto_cgraph_replace_node): Likewise.
1930 * lto.c (lto_main): Likewise.
1931 (do_whole_program_analysis): Likewise.
1932 (materialize_cgraph): Likewise.
1933 (read_cgraph_and_symbols): Likewise.
1934 (cmp_partitions_order): Likewise.
1935 (lto_materialize_function): Likewise.
1936 (has_analyzed_clone_p): Likewise.
1937
8e9055ae
AM
19382013-10-29 Andrew MacLeod <amacleod@redhat.com>
1939
ab20d992
JJ
1940 * lto-object.c: Add gimple.h to include list.
1941 * lto-partition.c: Likewise.
8e9055ae 1942
377d9792
AM
19432013-10-18 Andrew MacLeod <amacleod@redhat.com>
1944
1945 * lto.c: Remove tree-flow.h from include list.
1946
fffda8d7
RB
19472013-10-15 Richard Biener <rguenther@suse.de>
1948
1949 * lto.c (hash_canonical_type): Split out from ...
1950 (iterative_hash_canonical_type): ... here. Register types
1951 we recurse to.
1952 (gimple_canonical_type_hash): Adjust.
1953 (gimple_register_canonical_type_1): Split out from ...
1954 (gimple_register_canonical_type): ... here. Cache computed
1955 hash value.
1956 (lto_register_canonical_types): Split into two modes,
1957 clearing and computing TYPE_CANONICAL.
1958 (lto_read_decls): Adjust.
1959 (read_cgraph_and_symbols): Do two passes over global trees,
1960 first clearing then computing TYPE_CANONICAL.
1961
1394237e
RB
19622013-10-14 Richard Biener <rguenther@suse.de>
1963
1964 * lto.c (gimple_canonical_types): Move out-of GC space.
1965 (canonical_type_hash_cache): Make a pointer-map.
1966 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1967 New counters.
1968 (iterative_hash_canonical_type): Adjust.
1969 (read_cgraph_and_symbols): Likewise.
1970 (print_lto_report_1): Likewise.
1971
0a387eca
RB
19722013-10-14 Richard Biener <rguenther@suse.de>
1973
1974 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1975 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1976 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1977 gimple_types_compatible_p_1, gimple_types_compatible_p,
1978 visit, iterative_hash_name, struct type_hash_pair,
1979 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1980 gimple_type_eq, gimple_register_type, num_not_merged_types,
1981 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1982 num_not_merged_types_in_same_scc_trees): Remove old merging code
1983 and statistics.
1984 (lto_read_decls): Do not run old merging code in parallel.
1985 (read_cgraph_and_symbols): Do not init/free old merging
1986 data structures.
1987 (print_lto_report_1): Do not report differences of old vs. new
1988 merging code.
1989
83fd5d11
RB
19902013-10-14 Richard Biener <rguenther@suse.de>
1991
1992 * lto-lang.c (lto_init): Do not re-init canonical types here.
1993 (lto_register_canonical_types): Move to ...
1994 * lto.c (lto_register_canonical_types): ... here.
1995 (gimple_canonical_types, canonical_type_hash_cache,
1996 iterative_hash_canonical_type, gimple_canonical_type_hash,
1997 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1998 gimple_register_canonical_type): Add canonical type merging machinery
1999 moved from gimple.c.
2000 (read_cgraph_and_symbols): Init and free canonical type tables
2001 here.
2002 (print_lto_report_1): Report canonical type table stats here.
2003
acf0174b
JJ
20042013-10-11 Jakub Jelinek <jakub@redhat.com>
2005
2006 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
2007
7c6fedd2
TT
20082013-09-25 Tom Tromey <tromey@redhat.com>
2009
2010 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
2011 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
2012 (lto/lto-object.o): Remove.
2013
35f32ad4
RB
20142013-09-06 Richard Biener <rguenther@suse.de>
2015
2016 * lto-symtab.c: Move from gcc/
2017 * lto.h: Include vec.h.
2018 (lto_global_var_decls): Declare.
2019 * lto.c (lto_global_var_decls): Move definition here.
2020 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
2021 (lto-symtab.o): Add.
2022 * config-lang.in (gtfiles): Add lto.h.
2023
49322b12
JH
20242013-08-31 Jan Hubicka <jh@suse.cz>
2025
ab20d992 2026 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
49322b12
JH
2027 DECL_FIELD_OFFSET can contain an reference to variable.
2028
31f1f73b
JH
20292013-08-31 Jan Hubicka <jh@suse.cz>
2030
2031 * lto.c (tree_with_vars): Turn into vector.
2032 (MAYBE_REMEMBER_WITH_VARS): Change to...
2033 (CHECK_VAR): ... this one.
2034 (CHECK_NO_VAR): New macro.
2035 (maybe_remember_with_vars_typed): Turn to ...
2036 (mentions_vars_p_typed): ... this one.
2037 (maybe_remember_with_vars_common): Turn to ...
2038 (mentions_vars_p_comon): ... this one.
2039 (maybe_remember_with_vars_decl_minimal): Turn to ...
2040 (mentions_vars_p_decl_minmal): ... this one.
2041 (maybe_remember_with_vars_decl_common): Turn to ...
2042 (mentions_vars_p_decl_common): ... this one.
2043 (maybe_remember_with_vars_decl_with_vis): Turn to ...
2044 (mentions_vars_p_decl_with_vis): ... this one.
2045 (maybe_remember_with_vars_decl_non_common): Turn to ...
2046 (mentions_vars_p_decl_non_common): ... this one.
2047 (maybe_remember_with_vars_function): Turn to ...
2048 (mentions_vars_p_function): ... this one.
2049 (maybe_remember_with_vars_field_decl): Turn to ...
2050 (mentions_vars_p_field_decl): ... this one.
2051 (maybe_remember_with_vars_type): Turn to ...
2052 (mentions_vars_p_type): ... this one.
2053 (maybe_remember_with_vars_binfo): Turn to ...
2054 (mentions_vars_p_binfo): ... this one.
2055 (maybe_remember_with_vars_constructor): Turn to ...
2056 (mentions_vars_p_constructor): ... this one.
2057 (maybe_remember_with_vars_expr): Turn to ...
2058 (mentions_vars_p_expr): ... this one.
2059 (maybe_remember_with_vars): Turn to ...
2060 (mentions_vars_p): ... this one.
2061 (lto_read_decls): Update.
2062 (LTO_SET_PREVAIL): Do not call function for internal decls.
2063 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2064 check that something was updated.
2065 (lto_fixup_state): Do not care about internal decls.
2066 (lto_fixup_decls): Update.
2067 (read_cgraph_and_symbols): Update.
2068
256eefa9
JH
20692013-08-29 Jan Hubicka <jh@suse.cz>
2070
2071 * lto.c (read_cgraph_and_symbols): Free decl states.
2072
0170f33c
JH
20732013-08-29 Jan Hubicka <jh@suse.cz>
2074
2075 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2076 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2077 TYPE_FINAL_P.
2078
c01c111b
JH
20792013-08-28 Jan Hubicka <jh@suse.cz>
2080
2081 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2082 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2083 (unify_scc): Do checking assert.
2084
6a49f3c9
JH
20852013-08-06 Jan Hubicka <jh@suse.cz>
2086 Martin Liska <marxin.liska@gmail.com>
2087
ab20d992 2088 * lto-partition.c (lto_balanced_map): Always base order on
6a49f3c9
JH
2089 source file order.
2090
a2e2a668
JH
20912013-08-06 Jan Hubicka <jh@suse.cz>
2092
2093 * lto.c (lto_materialize_function): Do not read body anymore.
2094
815effe1
JH
20952013-08-02 Jan Hubicka <jh@suse.cz>
2096
2097 * lto.c (lto_materialize_function): Do not push struct function.
2098 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2099 (may_need_named_section_p): Even abstract origins may need
2100 named section.
2101
315f8c0e
DM
21022013-07-30 David Malcolm <dmalcolm@redhat.com>
2103
2104 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2105 PASS_MANAGER_H.
2106
2107 * lto.c (do_whole_program_analysis): Update for move of
2108 all_regular_ipa_passes from a global to a field of class
2109 pass_manager.
2110
1aa95df7
OB
21112013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2112
2113 * lto-partition.c: Fix typos.
2114
c525ba9a
JH
21152013-06-20 Jan Hubicka <jh@suse.cz>
2116
2117 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2118 partitioning of variables.
2119
7a89ad00
JH
21202013-06-20 Jan Hubicka <jh@suse.cz>
2121
2122 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2123
6a6dac52
JH
21242013-06-19 Jan Hubicka <jh@suse.cz>
2125
2126 * lto-partition.c (add_references_to_partition): Use
2127 ctor_for_folding.
2128
ac0511f2
RB
21292013-06-18 Richard Biener <rguenther@suse.de>
2130
2131 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2132 and use it.
2133 (lto_register_function_decl_in_symtab): Likewise.
2134 (cmp_tree): New function.
2135 (unify_scc): Instead of using the streamer cache map from entry
2136 to cache index match up the two maps we have by sorting them.
2137 Adjust calls to lto_register_var_decl_in_symtab and
2138 lto_register_function_decl_in_symtab.
2139
ee03e71d
RB
21402013-06-17 Richard Biener <rguenther@suse.de>
2141
2142 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2143 * lto.c: Include data-streamer.h.
2144 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2145 (gimple_type_leader_entry_s, gimple_type_leader,
2146 gimple_lookup_type_leader): Remove.
2147 (gtc_visit): Simplify.
2148 (gimple_types_compatible_p): Likewise.
2149 (gimple_register_type_1): Likewise. Merge into ...
2150 (gimple_register_type): ... this. Keep it as legacy for
2151 statistics purposes for now.
2152 (fixup_integer_cst): Remove.
2153 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2154 rename to ...
2155 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2156 maybe_remember_with_vars_*): ... these.
2157 (uniquify_nodes): Remove.
2158 (lto_fixup_prevailing_type): New function.
2159 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2160 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2161 (num_merged_types, num_prevailing_types, num_not_merged_types,
2162 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2163 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2164 num_scc_compare_collisions): New global counters.
2165 (compare_tree_sccs_1): New function.
2166 (compare_tree_sccs): Likewise.
2167 (unify_scc): Likewise.
2168 (lto_read_decls): Stream in tree SCCs and unify them on the
2169 way in. Finalize prevailing SCC tree members.
2170 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2171 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2172 to ggc-collect during merging.
2173 (print_lto_report_1): Adjust for new merging code.
2174
ca0f62a8
JH
21752013-06-12 Jan Hubicka <jh@suse.cz>
2176
2177 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2178
bbf9ad07
JH
21792013-06-12 Jan Hubicka <jh@suse.cz>
2180
2181 * lto.c (register_resolution): Take lto_file_data argument.
2182 (lto_register_var_decl_in_symtab,
2183 lto_register_function_decl_in_symtab): Update.
2184 (read_cgraph_and_symbols): Update resolution_map handling.
2185
ecdbd01a 21862013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2187
2188 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2189 (add_symbol_to_partition_1): Likewise.
2190 (contained_in_symbol): Likewise.
2191 (lto_balanced_map): Likewise.
2192 (rename_statics): Drop weakref.
2193
a367df53
RB
21942013-06-05 Richard Biener <rguenther@suse.de>
2195
2196 * lto.c (num_merged_types): New global variable.
2197 (uniquify_nodes): Increase num_merged_types when merging a type.
2198 (print_lto_report_1): Output the number of merged types.
2199
40a7fe1e
JH
22002013-06-01 Jan Hubicka <jh@suse.cz>
2201
2202 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2203 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2204 (do_whole_program_analysis): Update dumping.
2205
e70670cf
JH
22062013-05-29 Jan Hubicka <jh@suse.cz>
2207
2208 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2209 flags.
2210 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2211
8ee05051
JH
22122013-05-15 Jan Hubicka <jh@suse.cz>
2213
2214 * lto-partition.c (privatize_symbol_name): Return true when
2215 privatizing happened.
2216 (rename_statics): Do not go into infinite loop when privatizing
2217 is not needed.
2218
427b248d
JM
22192013-05-16 Jason Merrill <jason@redhat.com>
2220
2221 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2222
9de04252
MJ
22232013-05-15 Martin Jambor <mjambor@suse.cz>
2224
2225 * lto-partition.c (lto_balanced_map): Print symbol order instead
2226 of node uids.
2227
2d6e4603
JH
22282013-05-15 Jan Hubicka <jh@suse.cz>
2229
2230 PR lto/57038
2231 PR lto/47375
2232 * lto-partition.c (get_symbol_class): Fix weakrefs.
2233 (lto_balanced_map): Fix weakrefs.
2234 (privatize_symbol_name): Remove unnecesary label.
2235 (rename_statics): Handle weakrefs as statics.
2236
64cfa6c0
JH
22372013-05-09 Jan Hubicka <jh@suse.cz>
2238 Richard Biener <rguenther@suse.de>
2239
2240 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2241 (lto_register_var_decl_in_symtab): Likewise.
2242 (lto_main): Promote statics.
2243 * lto-partition.c (privatize_symbol_name): New function.
2244 (promote_symbol): Use it.
2245 (may_need_named_section_p): New predicate.
2246 (rename_statics): New functions.
2247 (lto_promote_cross_file_statics): Simplify; do renaming.
2248 (lto_promote_statics_nonwpa): New function.
2249 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2250
e45cde98
RB
22512013-02-08 Richard Biener <rguenther@suse.de>
2252
2253 PR lto/56231
2254 * lto-lang.c (lto_init): Do not enter a dummy file.
2255
6edc3e32
UB
22562013-02-07 Uros Bizjak <ubizjak@gmail.com>
2257
2258 PR bootstrap/56227
2259 * lto.c (lto_resolution_ready): Use %wx instead of
2260 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2261
ed73881e
RG
22622013-02-04 Richard Guenther <rguenther@suse.de>
2263
2264 PR lto/56168
2265 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2266 or lto_fixup_decls at LTRANS time.
2267
a19b1432
JH
22682013-01-09 Jan Hubicka <jh@suse.cz>
2269
2270 PR lto/45375
2271 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2272
49c01f87
L
22732012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2274
2275 PR lto/55466
2276 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2277 variables.
2278 (lto_main): Record the global variables if WPA isn't enabled.
2279
6e1aa848
DN
22802012-11-20 Diego Novillo <dnovillo@google.com>
2281 Jakub Jelinek <jakub@redhat.com>
2282
2283 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2284
9771b263
DN
22852012-11-16 Diego Novillo <dnovillo@google.com>
2286
2287 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2288
2289 * lto-lang.c: Use new vec API in vec.h.
2290 * lto-partition.c: Likewise.
2291 * lto-partition.h: Likewise.
2292 * lto.c: Likewise.
2293
24551b9c
LC
22942012-10-31 Lawrence Crowl <crowl@google.com>
2295
2296 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2297 down-cast via dyn_cast.
2298 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2299 (undo_partition): Likewise.
2300 (lto_balanced_map): Likewise.
2301 (get_symbol_class): Likewise and via is_a.
2302 (lto_balanced_map): Change symtab checking to is_a.
2303
aec06f6f
RB
23042012-10-12 Richard Biener <rguenther@suse.de>
2305
2306 PR lto/54898
2307 * lto.c (gimple_types_compatible_p_1): Also compare
2308 TYPE_MAIN_VARIANT.
2309 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2310
0b8c30f9
TB
23112012-10-09 Tobias Burnus <burnus@net-b.de>
2312
2313 * lto-lang.c (lto_register_builtin_type): Avoid useless
2314 decl creation.
2315 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2316
da3202a8
TB
23172012-10-08 Tobias Burnus <burnus@net-b.de>
2318
2319 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2320 Free lto_file struct after closing the file.
2321
2512a443
JH
23222012-10-08 Jan Hubicka <jh@suse.cz>
2323
ab20d992 2324 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2512a443
JH
2325 (fixup_integer_cst): New functoin.
2326 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2327
e75f8f79
JH
23282012-10-07 Jan Hubicka <jh@suse.cz>
2329
2330 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2331 release input encoders.
2332 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2333
46591697
JH
23342012-10-06 Jan Hubicka <jh@suse.cz>
2335
ab20d992 2336 PR lto/54790
46591697
JH
2337 * lto.c (resolution_map): New static var.
2338 (register_resolution): New function.
2339 (lto_register_var_decl_in_symtab): Use it.
2340 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2341
af16bc76
MJ
23422012-09-20 Martin Jambor <mjambor@suse.cz>
2343
2344 * lto.c (lto_materialize_function): Call push_struct_function and
2345 pop_cfun.
2346
5368224f
DC
23472012-09-19 Dehao Chen <dehao@google.com>
2348
ab20d992 2349 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
5368224f 2350
b5493fb2
JH
23512012-09-19 Jan Hubicka <jh@suse.cz>
2352
2353 * lto.c (lto_materialize_function): Update confused comment.
2354 (read_cgraph_and_symbols): Do not free symtab.
2355
c3c445e1
JH
23562012-09-12 Jan Hubicka <jh@suse.cz>
2357
2358 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2359 AUX pointer cleaning. Add max partitioning.
2360 * lto-partition.c (enum symbol_class): New.
2361 (get_symbol_class): New function.
2362 (symbol_partitioned_p): New function.
2363 (add_references_to_partition): Remove.
2364 (add_aliases_to_partition): Remove.
2365 (add_cgraph_node_to_partition_1): Remove.
2366 (add_cgraph_node_to_partition): Remove.
2367 (add_symbol_to_partition): New function.
2368 (add_symbol_to_partition_1): New function.
2369 (contained_in_symbol): New function.
2370 (partition_cgraph_node_p): Remove.
2371 (partition_varpool_node_p): Remove.
2372 (partition_symbol_p): Remove.
2373 (lto_1_to_1_map): Cleanup.
2374 (lto_max_map): New.
2375 (lto_balanced_map): Update.
2376 (lto_promote_cross_file_statics): Update.
2377 * lto-partition.h (lto_max_map): Declare.
2378 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2379
b5c7cdfb
JH
23802012-09-11 Jan Hubicka <jh@suse.cz>
2381
2382 PR lto/54312
2383 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2384 type is variant leader.
2385
b29402f0
RG
23862012-09-11 Richard Guenther <rguenther@suse.de>
2387
2388 * lto.c (enum gtc_mode): Remove.
2389 (struct type_pair_d): Adjust.
2390 (lookup_type_pair): Likewise.
2391 (gimple_type_leader): Do not mark as deletable.
2392 (gimple_lookup_type_leader): Adjust.
2393 (gtc_visit): Likewise.
2394 (gimple_types_compatible_p_1): Likewise.
2395 (gimple_types_compatible_p): Likewise.
2396 (gimple_type_hash): Likewise.
2397 (gimple_register_type): Likewise.
2398 (read_cgraph_and_symbols): Manage lifetime of tables
2399 here.
2400
b8f4e58f
RG
24012012-09-11 Richard Guenther <rguenther@suse.de>
2402
2403 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2404 struct type_pair_d, lookup_type_pair, struct sccs,
2405 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2406 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2407 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2408 visit, iterative_hash_name, struct type_hash_pair,
2409 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2410 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2411 Move here from gimple.c
2412 (read_cgraph_and_symbols): Free hash tables here.
2413 (print_lto_report_1): New function wrapping print_lto_report.
2414 (do_whole_program_analysis): Call it.
2415 (lto_main): Likewise.
2416
1cdbb3f9
JH
24172012-09-10 Jan Hubicka <jh@suse.cz>
2418
2419 * lto-partition.c (partition_symbol_p): Forward declare.
2420 (add_references_to_partition): Reimplement using partition_symbol_p.
2421 (add_aliases_to_partition): Break out from add_references_to_partition;
2422 reimplement using partition_symbol_p.
2423 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2424 add sanity checks.
2425 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2426 (partition_varpool_node_p): Do not special case aliases.
2427
b4661bfe
JH
24282012-08-12 Jan Hubicka <jh@suse.cz>
2429
2430 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2431 it is deleted after streaming.
2432 * lto-partition.c (partition_symbol_p): New function.
2433 (promote_var, promote_fn): Remove.
2434 (promote_symbol): New function.
2435 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2436 to lookup the actual boundaries instead of computing them ad-hoc.
2437
7b99cca4
JH
24382012-08-12 Jan Hubicka <jh@suse.cz>
2439
2440 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2441 in partitioning.
2442 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2443 by encoder.
2444 * lto-partition.c (new_partition): Update.
2445 * lto.c (cmp_partitions_order): Update.
2446 (lto_wpa_write_files): Update.
2447 (free_ltrans_partitions): Update.
2448 (add_references_to_partition): Update.
2449 (add_cgraph_node_to_partition_1): Update.
2450 (add_cgraph_node_to_partition): Update.
2451 (add_varpool_node_to_partition): Update.
2452 (undo_partition): Update.
2453 (lto_balanced_map): Update.
2454 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2455 set_referenced_from_this_partition_p): Update.
2456 (lto_promote_cross_file_statics): Update.
2457
f27c1867
JH
24582012-08-12 Jan Hubicka <jh@suse.cz>
2459
2460 * lto-partition.c (set_referenced_from_other_partition_p,
2461 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2462 New functions.
2463 (lto_promote_cross_file_statics): Use them.
2464
ab96cc5b
JH
24652012-07-24 Jan Hubicka <jh@suse.cz>
2466
2467 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2468
0229aee9
UB
24692012-07-24 Uros Bizjak <ubizjak@gmail.com>
2470
2471 * lto-tree.h (lang_decl): Add variable_size GTY option.
2472
7ee2468b
SB
24732012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2474
2475 * lto.c: Do not include timevar.h.
2476 * Make-lang.in: Fix dependencies.
2477
a910399d
LC
24782012-06-18 Lawrence Crowl <crowl@google.com>
2479
ab20d992 2480 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2481 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2482 to lto_wpa_write_files.
ab20d992 2483 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
a910399d
LC
2484 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2485 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2486 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2487 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2488 to be a front end, but is not one.
2489
877ab5e9
JH
24902012-05-18 Jan Hubicka <jh@suse.cz>
2491
2492 * lto.c (lto_materialize_constructors_and_inits): Remove.
2493 (read_cgraph_and_symbols): Remove handling of alias pairs.
2494
6649df51
JH
24952012-05-17 Jan Hubicka <jh@suse.cz>
2496
2497 * lto-partition.c (add_references_to_partition): Handle external vars.
2498 (partition_varpool_node_p): Likewise.
2499 (lto_promote_cross_file_statics): Do not promote externals.
2500
d1ede5f4
BS
25012012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2502
2503 * lto-lang.c (handle_fnspec_attribute): New static function.
2504 (lto_attribute_table): Add "fn spec".
2505 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2506
0d6bf48c
JH
25072012-05-04 Jan Hubicka <jh@suse.cz>
2508
2509 * lto.c (do_whole_program_analysis): Set timevars correctly.
2510 (lto_main): Likewise.
d1ede5f4 2511
1d67dde8
RB
25122012-05-04 Richard Guenther <rguenther@suse.de>
2513
2514 * lang.opt (fwpa): Do not mark as Optimization.
2515 (fltrans): Likewise.
2516
65d630d4
JH
25172012-04-30 Jan Hubicka <jh@suse.cz>
2518
2519 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2520 * lto-partition.c (partition_cgraph_node_p): Use
2521 symtab_used_from_object_file_p.
65d630d4
JH
2522 (partition_varpool_node_p): Likewise.
2523
ead84f73
JH
25242012-04-20 Jan Hubicka <jh@suse.cz>
2525
2526 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2527
5932a4d4
JH
25282012-04-18 Jan Hubicka <jh@suse.cz>
2529
2530 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2531 Update for new ipa-ref API.
2532
65c70e6b
JH
25332012-04-16 Jan Hubicka <jh@suse.cz>
2534
2535 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2536 walkers to walk cgraph and varpool.
65c70e6b
JH
2537 (materialize_cgraph): Likewise.
2538 * lto-partition.c (lto_1_to_1_map): Likewise.
2539 (lto_balanced_map): Likewise.
2540 (lto_promote_cross_file_statics): Likewise.
2541
960bfb69
JH
25422012-04-14 Jan Hubicka <jh@suse.cz>
2543
2544 * lto.c: Update field referenced for new cgraph/varpool layout.
2545 * lto-partition.c: Likewise.
2546
a66dc285
JH
25472012-04-11 Jan Hubicka <jh@suse.cz>
2548
2549 * lto.c: Update copyright; remove params.h, ipa-inline.h
2550 and ipa-utils.h inlines; inline lto-partition.h
2551 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2552 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2553 add_references_to_partition, add_cgraph_node_to_partition_1,
2554 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2555 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2556 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2557 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2558 * lto-partition.c: ... here; new file.
2559 * lto-partition.h: New file.
2560 * Make-lang.in (lto.o): Update dependencies.
2561 (lto-partition.o): New.
2562
f3b249e5
RG
25632012-04-05 Richard Guenther <rguenther@suse.de>
2564
2565 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2566 definition.
2567
21fa2faf
RG
25682012-03-12 Richard Guenther <rguenther@suse.de>
2569
2570 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2571
6bb485a3
RG
25722012-03-06 Richard Guenther <rguenther@suse.de>
2573
2574 PR lto/52097
2575 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2576
95510497
RG
25772012-02-28 Richard Guenther <rguenther@suse.de>
2578
2579 PR lto/52400
2580 * lto.c (lto_register_function_decl_in_symtab): Do not register
2581 a reverse renamed decl mapping.
2582
09228fef
JJ
25832012-01-06 Jakub Jelinek <jakub@redhat.com>
2584
2585 PR lto/51774
2586 * lto-lang.c (handle_returns_twice_attribute): New function.
2587 (lto_attribute_table): Add returns_twice attribute.
2588
b03eda0d
RG
25892011-12-21 Richard Guenther <rguenther@suse.de>
2590
2591 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2592 (LTO_FIXUP_TREE): Use it.
2593 (uniquify_nodes): Mark new non-prevailing types and avoid
2594 calling gimple_register_type on others.
2595 (lto_read_decls): Add comment.
2596
4ad9a9de
EB
25972011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2598
2599 * lto.h (lto_parse_hex): Delete.
2600 * lto.c (lto_read_decls): Use 'int' for offsets.
2601 (lto_parse_hex): Make static and return proper 64-bit host type.
2602 (lto_resolution_read): Use proper 64-bit host type.
2603
ea973bad
RG
26042011-12-13 Richard Guenther <rguenther@suse.de>
2605
2606 PR lto/48354
2607 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2608 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2609
c8218030
UB
26102011-12-01 Uros Bizjak <ubizjak@gmail.com>
2611
2612 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2613 (ignore_attribute): New.
2614
57ac2606
AH
26152011-11-21 Aldy Hernandez <aldyh@redhat.com>
2616
2617 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2618 (handle_transaction_pure_attribute): New.
2619
52a35ef7
RG
26202011-11-03 Richard Guenther <rguenther@suse.de>
2621
2622 PR lto/44965
2623 * lto-lang.c (lto_post_options): Do not read file options.
2624 * lto.c (lto_read_all_file_options): Remove.
2625 (lto_init): Call lto_set_in_hooks here.
2626
51973b1e
JH
26272011-10-09 Jan Hubicka <jh@suse.cz>
2628
2629 * lto.c (node_cmp, varpool_node_cmp): New functions.
2630 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2631 (cmp_partitions): Rename to ...
2632 (cmp_partitions_size): ... this one.
2633 (cmp_partitions_order): New function.
2634 (lto_wpa_write_files): Sort partitions by order when
2635 -fno-toplevel-reorder is used.
2636
5958009b
AK
26372011-10-09 Andi Kleen <ak@linux.intel.com>
2638
2639 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2640
e79983f4
MM
26412011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2642
2643 * lto-lang.c (def_builtin_1): Delete old interface with two
2644 parallel arrays to hold standard builtin declarations, and replace
2645 it with a function based interface that can support creating
2646 builtins on the fly in the future. Change all uses, and poison
2647 the old names. Make sure 0 is not a legitimate builtin index.
2648
ecdbd01a 26492011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2650
2651 * lto-object.c (lto_obj_add_section_data): Add list.
2652 (lto_obj_add_section): Fill in list.
2653 (ltoobj_build_section_table): Pass through list.
2654 * lto.c (file_data_list): Declare.
2655 (create_subid_section_table): Pass arguments directly.
2656 Fill in list of file_datas.
2657 (lwstate): Delete.
2658 (lto_create_files_from_ids): Pass in direct arguments.
2659 Don't maintain list.
2660 (lto_file_read): Use explicit section and file data lists.
2661 (lto_read_all_file_options): Pass in section_list.
2662 * lto.h (lto_obj_build_section_table): Add list.
2663 (lto_section_slot): Add next.
2664 (lto_section_list): Declare.
2665
ed0d2da0
JH
26662011-10-02 Jan Hubicka <jh@suse.cz>
2667
2668 PR lto/47247
2669 * common.c (lto_resolution_str): Add new resolution.
2670 * common.h (lto_resolution_str): Likewise.
2671
ad7715f3
L
26722011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2673 Andi Kleen <ak@linux.intel.com>
2674
2675 PR lto/50568
2676 * lto.c (lto_splay_tree_delete_id): New.
2677 (lto_splay_tree_compare_ids): Likewise.
2678 (lto_splay_tree_lookup): Likewise.
2679 (lto_splay_tree_id_equal_p): Likewise.
2680 (lto_splay_tree_insert): Likewise.
2681 (lto_splay_tree_new): Likewise.
2682 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2683 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2684 (create_subid_section_table): Use lto_splay_tree_lookup and
2685 lto_splay_tree_insert.
2686 (lto_file_read): Use lto_splay_tree_new.
2687
ecdbd01a 26882011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2689
2690 * lto.c (lto_resolution_read): Remove id dumping.
2691 (lto_section_with_id): Turn id HOST_WIDE_ID.
2692 (create_subid_section_table): Dito.
2693
892a371f
DS
26942011-08-28 Dodji Seketeli <dodji@redhat.com>
2695
2696 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2697 linemap_add twice.
2698
f82d1a94
MJ
26992011-08-11 Martin Jambor <mjambor@suse.cz>
2700
2701 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2702
f0efc7aa
DN
27032011-08-08 Diego Novillo <dnovillo@google.com>
2704
2705 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2706 * lto.c: Include tree-streamer.h.
2707
1a072294
RG
27082011-07-06 Richard Guenther <rguenther@suse.de>
2709
2710 * lto-lang.c (lto_init):
2711 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2712
7496868d
JH
27132011-06-11 Jan Hubicka <jh@suse.cz>
2714
10f13f22 2715 PR lto/48246
7496868d
JH
2716 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2717 (lto_balanced_map): Likewise.
2718
39e2db00
JH
27192011-06-11 Jan Hubicka <jh@suse.cz>
2720
2721 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2722 (add_cgraph_node_to_partition) ... here; walk aliases.
2723 (lto_1_to_1_map): Remove same body alias code.
2724 (promote_fn): Likewise.
2725 (lto_promote_cross_file_statics): Update comment.
2726
28628ea6
DN
27272011-06-07 Diego Novillo <dnovillo@google.com>
2728
2729 * lto.c (uniquify_nodes): Move code to register decls to
2730 the loop that computes canonical types.
2731
009db074
RG
27322011-06-07 Richard Guenther <rguenther@suse.de>
2733
2734 * lto-lang.c (lto_init): Do not set
2735 size_type_node or call set_sizetype.
2736
47c79d56
DN
27372011-06-04 Diego Novillo <dnovillo@google.com>
2738
2739 * lto.c (lto_init): New.
2740 (lto_main): Call it.
2741
d5828cc7
DN
27422011-06-03 Diego Novillo <dnovillo@google.com>
2743
2744 * lto.c (get_resolution): Move from lto-streamer-in.c.
2745 (lto_register_var_decl_in_symtab): Likewise.
2746 (lto_register_function_decl_in_symtab): Likewise.
2747 (uniquify_nodes): Call lto_register_var_decl and
2748 lto_register_function_decl_in_symtab after reading a new
2749 VAR_DECL or FUNCTION_DECL.
2750
6807da97
RG
27512011-06-01 Richard Guenther <rguenther@suse.de>
2752
2753 * lto-lang.c (lto_register_canonical_types): New function.
2754 (lto_init): Register common nodes with the canonical type machinery.
2755 Do not play tricks with char_type_node.
2756
d74be317
RG
27572011-05-26 Richard Guenther <rguenther@suse.de>
2758
2759 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2760
d9f8303f
NF
27612011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2762
2763 * lto.c (lto_ft_typed): New function.
2764 (lto_ft_common): Call it.
2765 (lto_ft_constructor): Likewise.
2766 (lto_ft_expr): Likewise.
2767 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2768 TREE_CHAIN.
2769
fb291a1e
RG
27702011-05-20 Richard Guenther <rguenther@suse.de>
2771
2772 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2773 (lto_ft_type): Move main-variant and pointer-to chain building ...
2774 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2775 in a separate final loop.
2776
31b3ca64
RG
27772011-05-19 Richard Guenther <rguenther@suse.de>
2778
2779 * lto.c (uniquify_nodes): First register all types before
2780 fixing up the tree SCC.
2781
35d828c5
JH
27822011-05-11 Jan Hubicka <jh@suse.cz>
2783
2784 PR lto/48952
2785 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2786
51545682
NF
27872011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2788
2789 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2790 location of binfo field.
2791 (lto_fixup_prevailing_decls): Likewise.
2792
8242dd04
NF
27932011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2794
2795 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2796 build_function_type_array or build_varargs_function_type_array
2797 instead.
2798
c99c0026
EB
27992011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2800
2801 * lto-lang.c (global_bindings_p): Return bool.
2802
c47d0034
JH
28032011-05-07 Jan Hubicka <jh@suse.cz>
2804
a9bcb3f0
EB
2805 * lto.c (lto_materialize_function): Use
2806 cgraph_function_with_gimple_body_p.
2807 (add_cgraph_node_to_partition): Do not re-add items to partition;
2808 handle thunks.
c47d0034
JH
2809 (add_varpool_node_to_partition): Do not re-add items to partition.
2810
bb3398ca
JH
28112011-05-03 Jan Hubicka <jh@suse.cz>
2812
2813 * lto.c (free_ltrans_partitions): Fix accidental commit.
2814
1cb1a99f
JH
28152011-05-03 Jan Hubicka <jh@suse.cz>
2816
2817 * lto.c (ltrans_partition_def): Remove GTY annotations.
2818 (ltrans_partitions): Move to heap.
2819 (new_partition): Update.
2820 (free_ltrans_partitions): New function.
2821 (lto_wpa_write_files): Use it.
2822
af8bca3c
MJ
28232011-04-29 Martin Jambor <mjambor@suse.cz>
2824
2825 * lto.c: Include ipa-utils.h.
2826 (lto_balanced_map): Update call to ipa_reverse_postorder.
2827 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2828
b823cdfe
MM
28292011-04-29 Michael Matz <matz@suse.de>
2830
2831 * lto.c (toplevel): Include tree-flow.h.
2832 (lto_read_in_decl_state): Don't merge types here.
2833 (tree_with_vars): New static hash table.
2834 (remember_with_vars): New static functions.
2835 (LTO_FIXUP_TYPE): New macro.
2836 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2837 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2838 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2839 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2840 (lto_read_decls): Uniquify while reading in trees.
2841 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2842 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2843 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2844 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2845 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2846 lto_fixup_tree): Remove.
2847 (lto_fixup_state): Remove data argument. Use
2848 lto_symtab_prevailing_decl.
2849 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2850 (lto_fixup_prevailing_decls): New function.
2851 (lto_fixup_state_aux): Argument aux is unused.
2852 (lto_fixup_decls): Don't allocate pointer sets, don't use
2853 lto_fixup_tree, use lto_fixup_prevailing_decls.
2854 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2855 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2856
b9843260
EB
28572011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2858
2859 * lto.c (lto_balanced_map): Fix typos in head comment.
2860 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2861 test.
2862
e7f23018
JH
28632011-04-16 Jan Hubicka <jh@suse.cz>
2864
2865 * lto.c (lto_balanced_map): Update.
2866
10a5dd5d
JH
28672011-04-14 Jan Hubicka <jh@suse.cz>
2868
2869 * lto.c: Include ipa-inline.h
b9843260
EB
2870 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2871 accessor.
10a5dd5d
JH
2872 (ipa_node_duplication_hook): Fix declaration.
2873 * Make-lang.in (lto.o): Update dependencies.
2874
81f653d6
NF
28752011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2876
2877 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2878 calling TREE_CHAIN.
2879 * lto.c (lto_fixup_common): Likewise.
2880
dcf0c47e
NF
28812011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2882
2883 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2884 (handle_type_generic_attribute): Likewise.
2885
e89964e3
MM
28862011-04-03 Michael Matz <matz@suse.de>
2887
2888 * lto.c (lto_materialize_function): Don't read and then discard
2889 sections in WPA mode.
2890 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2891
2892 * lto-lang.c (registered_builtin_fndecls): Remove.
2893 (lto_getdecls): Return NULL_TREE.
2894 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2895
d2b3fe18
RG
28962011-03-31 Richard Guenther <rguenther@suse.de>
2897
2898 PR lto/48246
2899 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2900 partitions when checking is not enabled.
2901
ba78087b
KT
29022011-03-25 Kai Tietz <ktietz@redhat.com>
2903
2904 * lto.c (lto_resolution_read): Use filename_cmp instead
2905 of strcmp.
2906 (lto_read_section_data): Likewise.
2907
0edf1bb2
JL
29082011-03-25 Jeff Law <law@redhat.com>
2909
ab20d992 2910 * lto-lang.c (def_fn_type): Add missing va_end.
0edf1bb2 2911
62d784f7
KT
29122011-03-21 Kai Tietz <ktietz@redhat.com>
2913
2914 PR target/12171
2915 * lto-lang.c (lto_attribute_table): Adjust table.
2916
62dd9571
JJ
29172011-02-18 Jakub Jelinek <jakub@redhat.com>
2918
2919 PR bootstrap/47807
2920 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2921 of lto-streamer.h.
2922
237d6259
RG
29232011-02-18 Richard Guenther <rguenther@suse.de>
2924
2925 PR lto/47798
2926 * lto-tree.h (lto_global_var_decls): Do not declare here.
2927 * lto-lang.c: Include lto-streamer.h.
2928 * Make-lang.in (lto-lang.o): Adjust dependencies.
2929
8ead2223
KT
29302011-02-10 Kai Tietz <kai.tietz@onevision.com>
2931
2932 PR lto/47241
2933 * lto.c (lto_read_section_data): Free
2934 fd_name in failure case.
2935 For mingw targets don't hash file-descriptor.
2936 (read_cgraph_and_symbols): Close current_lto_file
2937 in failure case.
2938
6e701822
JH
29392011-01-11 Jan Hubicka <jh@suse.cz>
2940
2941 PR lto/45721
2942 PR lto/45375
b9843260
EB
2943 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2944 are not partitioned.
6e701822 2945
f4da8dce
NF
29462010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2947
2948 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2949 Use prototype_p.
2950
6b7fb143
RG
29512010-12-06 Richard Guenther <rguenther@suse.de>
2952
2953 PR lto/46796
2954 * lto-lang.c (lto_init): Give names to basic types.
2955
c59ffc41
JM
29562010-11-30 Joseph Myers <joseph@codesourcery.com>
2957
2958 * lto-object.c: Don't include toplev.h.
2959 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2960
7c475d11
JM
29612010-11-30 Joseph Myers <joseph@codesourcery.com>
2962
2963 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2964 $(TOPLEV_H).
2965
71f3e391
JM
29662010-11-29 Joseph Myers <joseph@codesourcery.com>
2967
2968 * lto-endian.h: Delete.
2969 * lto-object.c: Don't include "libiberty.h".
2970 (O_BINARY): Don't define.
2971 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2972 (O_BINARY): Don't define.
2973
9f1718b0
RG
29742010-11-23 Richard Guenther <rguenther@suse.de>
2975
2976 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2977
39c4e298
RG
29782010-11-23 Richard Guenther <rguenther@suse.de>
2979
2980 PR lto/46605
2981 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2982
b37421c6
JM
29832010-11-17 Joseph Myers <joseph@codesourcery.com>
2984
2985 * lto.c (lto_main): Take no arguments.
2986 * lto.h (lto_main): Update prototype.
2987
d82f74d3
ILT
29882010-11-16 Ian Lance Taylor <iant@google.com>
2989
2990 * lto-object.c (lto_obj_file_open): Call
2991 simple_object_attributes_merge rather than
2992 simple_object_attributes_compare.
2993
a4d8c676
JM
29942010-11-12 Joseph Myers <joseph@codesourcery.com>
2995
2996 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2997 * lto-lang.c (lto_handle_option): Take location_t parameter.
2998
d8a07487
JM
29992010-11-10 Joseph Myers <joseph@codesourcery.com>
3000
3001 * lto.c (lto_resolution_read): Start diagnostics with lowercase
3002 letters and remove trailing '.'.
3003 (lto_file_finalize): Start diagnostic with a lowercase letter.
3004
6b3456d1
ILT
30052010-11-02 Ian Lance Taylor <iant@google.com>
3006
3007 * lto-object.c: New file.
3008 * lto-elf.c: Remove file.
3009 * lto-macho.c: Remove file.
3010 * lto-macho.h: Remove file.
3011 * lto-coff.c: Remove file.
3012 * lto-coff.h: Remove file.
3013 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
3014 lto/lto-object.o.
3015 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
3016 (lto/lto-objfile.o): New target.
3017 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
3018 (lto/lto.o): Remove $(LIBIBERTY_H).
3019
030cd86c
JH
30202010-10-22 Jan Hubicka <jh@suse.cz>
3021
3022 * lto.c (add_cgraph_node_to_partition,
3023 add_varpool_node_to_partition): Add debug info.
3024 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
3025 partitioned nodes.
3026 (do_whole_program_analysis): Set function flags before dumping.
3027
4490cae6
RG
30282010-10-22 Richard Guenther <rguenther@suse.de>
3029
3030 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
3031 the new gimple_register_canonical_type.
3032
703cdce3
L
30332010-10-20 H.J. Lu <hongjiu.lu@intel.com>
3034
3035 PR bootstrap/45954
3036 * config-lang.in (boot_language): Set to $enable_lto.
3037
1915c739
JJ
30382010-10-18 Jakub Jelinek <jakub@redhat.com>
3039
3040 PR lto/45638
3041 * Make-lang.in (check-lto): New dummy target.
3042
82971de5
EB
30432010-10-14 Eric Botcazou <ebotcazou@adacore.com>
3044
3045 * lto-elf.c (SHN_XINDEX): Define if not already defined.
3046
a75bfaa6
JM
30472010-10-08 Joseph Myers <joseph@codesourcery.com>
3048
3049 * lto-lang.c (lto_init_options): Change to
3050 lto_init_options_struct. Update parameters.
3051 (LANG_HOOKS_INIT_OPTIONS): Don't define.
3052 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
3053
937f7f69
JH
30542010-10-06 Jan Hubicka <jh@suse.cz>
3055
3056 * lto.c (lto_balanced_map): Fix accounting of program size.
3057
2169830c
JH
30582010-10-06 Jan Hubicka <jh@suse.cz>
3059
3060 * lto.c (lto_balanced_map): Do not produce empty partitions.
3061
ecdbd01a 30622010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
3063
3064 * lto.c (lto_process_name): Add.
3065 (lto_main): Call lto_process_name.
3066
06ed016f
JH
30672010-10-06 Jan Hubicka <jh@suse.cz>
3068
3069 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3070 COMDATs required by the linker.
3071
ae718d66
ILT
30722010-10-05 Ian Lance Taylor <iant@google.com>
3073
3074 * lto.c (lto_section_with_id): Make s a const pointer.
3075
852e4bd2
JH
30762010-10-05 Jan Hubicka <jh@suse.cz>
3077
ab20d992 3078 * lto.c: Include params.h.
852e4bd2
JH
3079 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3080 refcounting in aux field.
3081 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3082 New functions.
3083 (lto_1_to_1_map): Simplify.
3084 (lto_balanced_map): New function.
3085 (do_whole_program_analysis): Chose proper partitioning alg.
3086 * Make-lang.in (lto.o): Add dependency on params.h
3087
ecdbd01a 30882010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
3089
3090 * Make-lang.in (lto1): Add + to build rule.
3091
ecdbd01a 30922010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
3093
3094 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 3095 with fatal_error.
f1e92a43 3096
0d6e14fd
JH
30972010-09-28 Jan Hubicka <jh@suse.cz>
3098
3099 * lto-lang.c (handle_leaf_attribute): New function.
3100 (lto_attribute_tables): Add leaf.
3101
fb462383
JZ
31022010-09-25 Jie Zhang <jie@codesourcery.com>
3103
3104 * lto.c (lto_read_all_file_options): Start a new line after
3105 printing out file names.
3106
051f8cc6
JH
31072010-09-24 Jan Hubicka <jh@suse.cz>
3108
3109 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3110
64e0f5ff
JH
31112010-09-20 Jan Hubicka <jh@suse.cz>
3112
3113 PR tree-optimize/45605
3114 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3115
a929ec3d
GP
31162010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3117
3118 * lto-elf.c (lto_obj_file_open): Also provide filename when
3119 elf_begin fails.
3120
4c588abf
JH
31212010-09-17 Jan Hubicka <jh@suse.cz>
3122
3123 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3124
c3224d6f
RG
31252010-09-17 Richard Guenther <rguenther@suse.de>
3126
3127 * lang.opt (flag_wpa): Also enable for the driver.
3128
52b3b3c7
JH
31292010-09-16 Jan Hubicka <jh@suse.cz>
3130
3131 * lto.c (lto_materialize_function): Do not tamper with STATIC and
ab20d992 3132 EXTERNAL flags.
52b3b3c7 3133
969c37b7
LB
31342010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3135
3136 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3137
098a4f50
JH
31382010-09-08 Jan Hubicka <jh@suse.cz>
3139
3140 * lto.c (real_file_count, real_file_decl_data): New static vars.
3141 (read_cgraph_and_symbols): Use it.
3142
0f443ad0
RG
31432010-09-08 Richard Guenther <rguenther@suse.de>
3144
3145 * lto.c (read_cgraph_and_symbols): Collect again after each
3146 file.
3147
ee187353
JH
31482010-09-07 Jan Hubicka <jh@suse.cz>
3149
3150 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3151
b3ec52d0
RG
31522010-09-03 Richard Guenther <rguenther@suse.de>
3153
3154 * lto-elf.c (validate_file): Always error if validation fails.
3155
f1395d4a
JH
31562010-08-20 Jan Hubicka <jh@suse.cz>
3157
3158 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3159 (lto_wpa_write_files): Update comments.
3160
2429bce3
L
31612010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3162
3163 PR bootstrap/45357
3164 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3165 with has_analyzed_clone_p.
3166
e0f967db
JH
31672010-08-20 Jan Hubicka <jh@suse.cz>
3168
3169 * lto.c (has_analyzed_clone_p): New function
3170 (lto_materialize_function): Use callgraph to determine if
3171 body is needed.
3172 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3173
ac47786e
NF
31742010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3175
3176 * lto.c: Use FOR_EACH_VEC_ELT.
3177
ecdbd01a 31782010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3179
3180 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3181
5f20c657
JM
31822010-07-27 Joseph Myers <joseph@codesourcery.com>
3183
3184 * lto-lang.c (lto_handle_option): Update prototype and return
3185 value type. Remove duplicate assignment to result.
3186
7a9bf9a4
JM
31872010-07-27 Joseph Myers <joseph@codesourcery.com>
3188
3189 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3190 New.
3191 (lto_init_options): Update prototype.
3192 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3193 Define.
3194
ecdbd01a 31952010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3196
3197 PR lto/44992
92a285c1 3198 * lto.c: Include splay-tree.h
73ce4d1e
AK
3199 (lto_resolution_read): Change to walk file_ids tree and parse
3200 extra file_id in resolution file.
3201 (lto_section_with_id): Add.
3202 (create_subid_section_table): Add.
3203 (lwstate): Add.
3204 (lto_create_files_from_ids): Add.
3205 (lto_file_read): Change to handle sub file ids and create list
3206 of file_datas. Add output argument for count.
3207 (get_section_data): Pass file_data to lto_get_section_name.
3208 (lto_flatten_file): Add.
3209 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3210
ecdbd01a 32112010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3212
3213 * lto-coff.c (hash_name, eq_name): Move.
3214 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3215 * lto-elf.c: (hash_name, eq_name): Move.
3216 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3217 * lto-macho.c: (hash_name, eq_name): Move.
3218 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3219 * lto.c: (hash_name, eq_name): Move from lto-*.c
3220 (lto_obj_create_section_hash_table): Add.
3221 (free_with_string): Add.
3222
718f9c0f
MLI
32232010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3224
3225 * lto-coff.c: Include diagnostic-core.h in every file that
3226 includes toplev.h.
3227 * lto-elf.c: Likewise.
3228 * lto-lang.c: Likewise.
3229 * lto-macho.c: Likewise.
3230
1b137837
JJ
32312010-07-07 Jakub Jelinek <jakub@redhat.com>
3232
3233 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3234 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3235 objects.
3236
92eb4438
JH
32372010-07-05 Jan Hubicka <jh@suse.cz>
3238
3239 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3240 nodes from same comdat group as well as all comdat functions referenced
3241 here.
b9843260
EB
3242 (add_varpool_node_to_partition, add_references_to_partition): New
3243 function.
3244 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3245 add_varpool_node_to_partition; clear aux flags when done.
3246 (lto_promote_cross_file_statics): Do not promote stuff that gets
3247 duplicated to each ltrans.
92eb4438 3248
a05541a9
JH
32492010-07-04 Jan Hubicka <jh@suse.cz>
3250
92a285c1 3251 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3252
4a2ac96f
RG
32532010-06-13 Richard Guenther <rguenther@suse.de>
3254
3255 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3256
1d536046
KT
32572010-06-09 Kai Tietz <kai.tietz@onevision.com>
3258
ab20d992 3259 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1d536046
KT
3260 * lto-coff.c (coff_write_object_file): Add braces to if.
3261
a9429e29
LB
32622010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3263
3264 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3265 (lto_file_read): Likewise.
3266 (new_partition): Likewise.
3267 (read_cgraph_and_symbols): Likewise.
3268
5498f011
JM
32692010-06-07 Joseph Myers <joseph@codesourcery.com>
3270
3271 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3272 (lto_handle_option): Don't set flag_signed_char here.
3273
d4c0c9f6
RG
32742010-06-04 Richard Guenther <rguenther@suse.de>
3275
3276 PR lto/41584
3277 * lto.c (lto_1_to_1_map): Use the proper file_data for
3278 varpool nodes.
3279
0a5fa5a1
JH
32802010-05-30 Jan Hubicka <jh@suse.cz>
3281
3282 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3283 partitioning decisions.
3284
9eec9488
JH
32852010-05-29 Jan Hubicka <jh@suse.cz>
3286
3287 * lto.c (bitmap vector): Remove.
3288 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3289 (ltrans_partition_def): New structure.
3290 (ltrans_partition): New type and VECtor.
3291 (new_partition): New function.
3292 (add_cgraph_node_to_partition): New function.
3293 (lto_1_to_1_map): Reorganize for partitions.
3294 (lto_add_inline_clones): Remove.
3295 (lto_add_all_inlinees): Remove.
3296 (lto_promote_cross_file_statics): Use partitions.
3297 (cmp_partitions): New function.
3298 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3299 use partitions; output files sorted by size.
3300
3e097227
SB
33012010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3302
3303 * Make-lang.in: Replace vec.h dependency with VEC_H.
3304
7ca92787
JM
33052010-05-28 Joseph Myers <joseph@codesourcery.com>
3306
3307 * lto-coff.c (coff_errmsg): Remove.
3308 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3309 errors instead of coff_errmsg (-1).
3310 * lto-macho.c (mach_o_errmsg): Remove.
3311 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3312 instead of mach_o_errmsg (-1).
3313 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3314 xstrerror (errno).
3315
b5611987
RG
33162010-05-28 Richard Guenther <rguenther@suse.de>
3317
3318 * lto.c (prefix_name_with_star): Removed.
3319 (strip_extension): Likewise.
3320 (get_filename_for_set): Likewise.
3321 (lto_write_ltrans_list): Fold into ...
3322 (lto_wpa_write_files): ... this. Name LTRANS units
3323 by suffixing the ltrans output list filename.
3324 (do_whole_program_analysis): Adjust.
3325
1da2ed5f
JM
33262010-05-27 Joseph Myers <joseph@codesourcery.com>
3327
3328 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3329 (read_cgraph_and_symbols, lto_main): Use seen_error.
3330 * Make-lang.in (lto/lto.o): Update dependencies.
3331
7951d88a
EB
33322010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3333
3334 PR lto/44230
3335 * lto.h (lto_eh_personality): New prototype.
3336 * lto.c: Include debug.h.
3337 (first_personality_decl): New static variable.
3338 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3339 first function for which it is non-null.
3340 (lto_eh_personality_decl): New static variable.
3341 (lto_eh_personality): New function.
3342 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3343 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3344
e12da9c2
SB
33452010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3346
3347 * lto-lang.c: Do not include expr.h.
3348
468194f4
RG
33492010-05-24 Richard Guenther <rguenther@suse.de>
3350
3351 * lto-elf.c (lto_obj_build_section_table): Work around
3352 FreeBSD libelf issue.
3353
bd9eb5da
RG
33542010-05-22 Richard Guenther <rguenther@suse.de>
3355
3356 * lto.c (read_cgraph_and_symbols): Do not collect.
3357
66576e1b
JH
33582010-05-20 Jan Hubicka <jh@suse.cz>
3359
3360 * lto.c (promote_var, promote_fn): New functions.
3361 (lto_promote_cross_file_statics): Compute correctly boundary including
3362 static initializers of readonly vars.
3363
36576655
JH
33642010-05-18 Jan Hubicka <jh@suse.cz>
3365
66576e1b 3366 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3367 (lto_promote_cross_file_statics): Deal with non-inline clones.
3368
28632d63
JH
33692010-05-18 Jan Hubicka <jh@suse.cz>
3370
3371 * lto.c (lto_materialize_function): Announce function when
3372 reading body; allocate_struct_function only when reading body;
3373 do not finalize local statics; ggc_collect after reading;
3374 do not mark reachable node.
3375 (materialize_cgraph): Do not announce function.
3376
33e42d56
JH
33772010-05-11 Jan Hubicka <jh@suse.cz>
3378
3379 * lto.c (materialize_cgraph): Revert my previous patch.
3380
f6430ea5
KT
33812010-05-11 Kai Tietz <kai.tietz@onevision.com>
3382
3383 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3384 IMAGE_FILE_MACHINE_AMD64.
3385 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3386
0a0b07b7
JH
33872010-05-11 Jan Hubicka <jh@suse.cz>
3388
3389 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3390 (materialize_cgraph): Add it here.
3391
9a809897
JH
33922010-05-11 Jan Hubicka <jh@suse.cz>
3393
3394 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3395 vector.
3396
33972010-05-11 Jan Hubicka <jh@suse.cz>
3398
3399 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3400 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3401 use reachable_from_other_partition_p and
3402 referenced_from_other_partition_p test.
3403
94f64249
KT
34042010-05-11 Kai Tietz <kai.tietz@onevision.com>
3405
3406 * lto-coff.c (validate_file): Add x64-coff support.
3407 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3408 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3409 * lto-lang.c (lto_build_c_type_nodes): Add check for
3410 'long long unsigned int' for x64-windows.
3411 (lto_init): Likewise.
3412
c082f9f3
SB
34132010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3414
3415 * lto.h (struct lto_file_struct): Document offset member.
3416 * lto-endian.h: New file.
3417 * lto-macho.h: New file.
3418 * lto-macho.c: New file.
3419 * Make-lang.in: Add rule for lto-macho.o.
3420
3f8257db 34212010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3422
3423 PR lto/43857
3424 PR lto/43371
3425 * lang.opt (fresolution): Change to ...
3426 (fresolution=): ... this.
3427 * lto-lang.c (lto_handle_option): Adjust.
3428
48cf395b
RB
34292010-05-07 Richard Guenther <rguenther@suse.de>
3430
3431 * lto.c (DUMPBASE_SUFFIX): Remove.
3432 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3433 Rename to ...
3434 (lto_write_ltrans_list): ... only output the list of ltrans files.
3435 (lto_maybe_unlink): Remove.
3436 (do_whole_program_analysis): Do not execute LTRANS phase
3437 from here.
3438
afa83c15
L
34392010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3440
3441 * lto-lang.c (lto_handle_option): Add argument kind.
3442
369451ec
JH
34432010-05-05 Jan Hubicka <jh@suse.cz>
3444
48cf395b
RB
3445 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3446 refs.
369451ec 3447
2f41ecf5
JH
34482010-05-05 Jan Hubicka <jh@suse.cz>
3449
3450 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3451
ace72c88
JH
34522010-04-30 Jan Hubicka <jh@suse.cz>
3453
b9843260
EB
3454 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3455 use default name.
ace72c88
JH
3456 (lto_wpa_write_files): Write any non-empty partition.
3457
05575e07
JH
34582010-04-30 Jan Hubicka <jh@suse.cz>
3459
3460 * lto.c: Do not attempt to make constant pool references global.
3461
49ba8180
JH
34622010-04-28 Jan Hubicka <jh@suse.cz>
3463
ab20d992 3464 * lto.c (lto_read_in_decl_state): Use GGC.
49ba8180
JH
3465 (lto_wpa_write_files): Announce what we are writting.
3466 (all_file_decl_data): New.
3467 (read_cgraph_and_symbols): Use GGC; correct timevars.
3468 (do_whole_program_analysis): Collect.
ab20d992 3469 * Make-lang.in (lto.o): Fix dependency.
49ba8180
JH
3470 * Makefile.in (GTFILES): Add lto-streamer.h.
3471 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3472 (varpool_assemble_pending_decls): Use VAROUT.
3473 * lto-streamer.h (lto_tree_ref_table): Annotate.
3474 (lto_in_decl_state): Annotate.
3475 (lto_file_decl_data): Annotate.
3476
2942c502
JH
34772010-04-28 Jan Hubicka <jh@suse.cz>
3478
3479 * lto.c (lto_varpool_node_sets): New.
3480 (lto_1_to_1_map): Partition varpool too.
3481 (globalize_context_t, globalize_cross_file_statics,
3482 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3483 lto_scan_statics_in_remaining_global_vars): Remove.
3484 (lto_promote_cross_file_statics): Rewrite.
3485 (get_filename_for_set): Take vset argument.
3486 (lto_wpa_write_files): Pass around vsets.
3487
3bec79c5
DK
34882010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3489
3490 PR lto/42776
3491 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3492 hardcoding 'lto-elf.o'.
3493 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3494
3495 * lto-coff.h: New file.
3496 * lto-coff.c: Likewise.
3497
21aac880
RG
34982010-04-26 Richard Guenther <rguenther@suse.de>
3499
3500 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3501
2cee0101
DK
35022010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3503
3504 * lto.h (lto_elf_file_open): Rename prototype from this ...
3505 (lto_obj_file_open): ... to this.
3506 (lto_elf_file_close): Likewise ...
3507 (lto_obj_file_close): ... and likewise.
3508 (lto_elf_build_section_table): Likewise ...
3509 (lto_obj_build_section_table): ... and likewise.
3510 (lto_elf_begin_section): Likewise ...
3511 (lto_obj_begin_section): ... and likewise.
3512 (lto_elf_append_data): Likewise ...
3513 (lto_obj_append_data): ... and likewise.
3514 (lto_elf_end_section): Likewise ...
3515 (lto_obj_end_section): ... and likewise.
3516 * lto.c (lto_file_read): Update references to the above.
3517 (lto_wpa_write_files): Likewise.
3518 (lto_read_all_file_options): Likewise.
3519 (read_cgraph_and_symbols): Likewise.
3520 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3521 (LANG_HOOKS_APPEND_DATA): Likewise.
3522 (LANG_HOOKS_END_SECTION): Likewise.
3523 * lto-elf.c (lto_elf_file_open): Rename from this ...
3524 (lto_obj_file_open): ... to this, updating any references.
3525 (lto_elf_file_close): Likewise ...
3526 (lto_obj_file_close): ... and likewise.
3527 (lto_elf_build_section_table): Likewise ...
3528 (lto_obj_build_section_table): ... and likewise.
3529 (lto_elf_begin_section): Likewise ...
3530 (lto_obj_begin_section): ... and likewise.
3531 (lto_elf_append_data): Likewise ...
3532 (lto_obj_append_data): ... and likewise.
3533 (lto_elf_end_section): Likewise ...
3534 (lto_obj_end_section): ... and likewise.
3535
bc58d7e1
JH
35362010-04-21 Jan Hubicka <jh@suse.cz>
3537
3538 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3539 (materialize_cgraph): Likewise.
3540
e792884f
JH
35412010-04-21 Jan Hubicka <jh@suse.cz>
3542
3543 * lto.c (lto_wpa_write_files): Update.
3544 (read_cgraph_and_symbols): Be more verbose.
3545 (materialize_cgraph): Likewise.
3546 (do_whole_program_analysis): Likewise.
3547
c9945504
JH
35482010-04-21 Jan Hubicka <jh@suse.cz>
3549
3550 * lto.c (globalize_cross_file_statics): When function has address taken,
3551 it needs to be public.
3552
a837268b
JH
35532010-04-20 Jan Hubicka <jh@suse.cz>
3554
3555 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3556 (lto_add_all_inlinees): Likewise.
3557 (lto_wpa_write_files): Likewise.
3558
3b9e5d95
EB
35592010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3560
3561 * lto-lang.c (lto_init): Remove second argument in call to
3562 build_common_tree_nodes.
3563
8ccb78f2
RO
35642010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3565
3566 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3567 function.
3568
2f9b99e6
EB
35692010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3570
3571 PR bootstrap/43276
3572 * lto-elf.c: Define EM_* constants if not already defined.
3573
bef7d288
EB
35742010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3575
3576 * lto-elf.c (is_compatible_architecture): New static function.
3577 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3578
f68df07c
RG
35792010-02-11 Richard Guenther <rguenther@suse.de>
3580
3581 PR driver/43021
3582 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3583 appropriately.
3584
3cdea2b4
AH
35852010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3586
3587 * lto.c (O_BINARY): Define.
3588 (lto_read_section_data): Open file in binary mode.
3589 * lto-elf.c (O_BINARY): Define.
ab20d992 3590 (lto_elf_file_open): Open file in binary mode.
3cdea2b4 3591
c59449fa
RG
35922010-01-08 Richard Guenther <rguenther@suse.de>
3593
3594 PR lto/42528
3595 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3596 (lto_init): Do not init char_type_node in a standard way
3597 but according to flag_signed_char.
3598
d7fb0a6d
L
35992010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3600
3601 PR lto/41564
3602 * lto.c (DUMPBASE_SUFFIX): New.
3603 (lto_execute_ltrans): Append a sequence number to -dumpbase
3604 for LTRANS.
3605
78ce4053
L
36062010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3607
3608 PR lto/42580
3609 * lto-elf.c (lto_elf_file_open): Stop if the command line
3610 option file is missing.
3611
2a71eb48
RG
36122009-12-15 Richard Guenther <rguenther@suse.de>
3613
3614 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3615 (lto_post_options): Do not disable debuginfo.
3616
a818bca1
DG
36172009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3618
3619 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3620
e7d00517
RG
36212009-12-11 Richard Guenther <rguenther@suse.de>
3622
3623 PR lto/42037
3624 * lto.c (lto_resolution_read): Properly grow the vector.
3625
1ab53893
RG
36262009-12-11 Richard Guenther <rguenther@suse.de>
3627
3628 PR lto/41915
3629 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3630 to the C99 default. Do not set flag_unit_at_a_time.
3631
0f900dfa
JJ
36322009-11-28 Jakub Jelinek <jakub@redhat.com>
3633
3634 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3635 variable.
3636
92fa7608
RAE
36372009-11-19 Rafael Avila de Espindola <espindola@google.com>
3638
3639 PR bootstrap/42096
3640 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3641 * lto.c (lto_parse_hex): New.
3642 (lto_resolution_read): Use lto_parse_hex.
3643 * lto.h (lto_parse_hex): New.
3644
9870fe4f
RAE
36452009-11-17 Rafael Avila de Espindola <espindola@google.com>
3646
3647 * lto-elf.c (lto_file_init): Add offset argument.
3648 (lto_elf_file_open): Record the offset.
3649 * lto.c (lto_resolution_read): Change file_name into a lto_file
3650 argument. Check offsets.
3651 (lto_file_read): Update call to lto_resolution_read.
3652 * lto.h (lto_file_struct): Add the offset field.
3653
1b70729f
RAE
36542009-11-16 Rafael Avila de Espindola <espindola@google.com>
3655
3656 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3657
0e3776db
JH
36582009-11-14 Jan Hubicka <jh@suse.cz>
3659
3660 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3661
06bd7f56
RAE
36622009-11-12 Rafael Avila de Espindola <espindola@google.com>
3663
3664 * lang.opt (fresolution): Renamed from resolution.
3665 * lto-lang.c (lto_handle_option): Handle new option name.
3666 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3667
7e9dc421 36682009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3669 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3670
3671 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3672 (lto_elf_file_open): Handle offsets in arguments name@offest.
3673
b207f900
RG
36742009-10-30 Richard Guenther <rguenther@suse.de>
3675
3676 PR lto/41858
3677 * lto.c (lto_file_read): Do not set file_data->fd.
3678 (lto_read_section_data): Use a single-entry file-descriptor cache.
3679 Do not check the result of xmalloc.
3680 (free_section_data): Do not use file_data->fd.
3681 (lto_read_all_file_options): Likewise.
3682
2c928155
RG
36832009-10-22 Richard Guenther <rguenther@suse.de>
3684
3685 * lto.c (lto_fixup_jump_functions): Remove.
3686 (lto_fixup_decls): Do not fixup jump functions.
3687 (read_cgraph_and_symbols): Schedule cgraph merging after
3688 summary reading. Schedule type and decl fixup before
3689 summary reading.
3690
f9c91f8a
RB
36912009-10-22 Richard Guenther <rguenther@suse.de>
3692
3693 * lto.c (lto_fixup_data_t): Remove free_list member.
3694 (lto_fixup_tree): Do not insert into free_list.
3695 (free_decl): Remove.
3696 (lto_fixup_decls): Remove free-list handling.
3697
fb3f88cc
JH
36982009-10-22 Jan Hubicka <jh@suse.cz>
3699
3700 * lto.c (lto_fixup_jump_functions): New function.
3701 (lto_fixup_decls): Use it.
3702
35f1e9f4
RG
37032009-10-16 Richard Guenther <rguenther@suse.de>
3704
3705 PR lto/41715
3706 * lto.c (lto_fixup_tree): Revert last change.
3707
200c8750
RG
37082009-10-14 Richard Guenther <rguenther@suse.de>
3709
3710 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3711 compatible with the one we replace wrap it around a
3712 VIEW_CONVERT_EXPR.
3713
b1b07c92
RG
37142009-10-09 Richard Guenther <rguenther@suse.de>
3715
3716 PR lto/41635
3717 PR lto/41636
3718 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3719 a file.
3720 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3721 (init_ehdr##BITS): Likewise.
3722
3c2e7d45
JM
37232009-10-08 Joseph Myers <joseph@codesourcery.com>
3724
3725 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3726 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3727 diagnostics.
3728 * lto-lang.c (lto_post_options): Remove trailing "." from
3729 diagnostics.
3730
0d0bfe17
RG
37312009-10-08 Richard Guenther <rguenther@suse.de>
3732
3733 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3734 hash tables.
3735
4bedf19a
JM
37362009-10-07 Joseph Myers <joseph@codesourcery.com>
3737
3738 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3739
b20996ff
JH
37402009-10-07 Jan Hubicka <jh@suse.cz>
3741
3742 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3743 ltrans stage; explain why this is needed and should not.
3744
1a735925
RG
37452009-10-05 Richard Guenther <rguenther@suse.de>
3746
3747 PR lto/41552
3748 PR lto/41487
3749 * lto.c (lto_read_decls): Do not register deferred decls.
3750 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3751 until after reading the IPA summaries.
3752
d7f09764
DN
37532009-10-02 Rafael Avila de Espindola <espindola@google.com>
3754
3755 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3756 (lto-lang.c): Don't include lto/common.h.
3757
37582009-10-02 Rafael Avila de Espindola <espindola@google.com>
3759
3760 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3761 (lto/common.o): Remove.
3762 * common.c: Remove.
3763 * common.h (lto_kind_str): Remove.
3764 (lto_visibility_str): Remove.
3765 (lto_resolution_str): Make it static.
3766
37672009-10-01 Diego Novillo <dnovillo@google.com>
3768
3769 * lto.c (lto_read_decls): Add comment.
3770 Call internal_error instead of gcc_assert.
3771 (lto_resolution_read): Likewise.
3772 (lto_add_all_inlinees): Tidy.
3773 * Make-lang.in: Fix copyright boilerplate.
3774 (lto.pdf): New.
3775 (lto.install-pdf): New.
3776 * lto-tree.h: Fix copyright boilerplate.
3777 * lang-specs.h: Likewise.
3778 Remove ".lto" entry from compilers fragment.
3779 * lto-elf.c: Move inclusion of gelf.h after config.h.
3780 Tidy formatting everywhere.
3781 * lto.h: Fix copyright boilerplate.
3782 Tidy formatting everywhere.
3783 * common.c: Likewise.
3784 * config-lang.in: Likewise.
3785 * common.h: Likewise.
3786 * lto-lang.c: Likewise.
3787
37882009-10-01 Richard Guenther <rguenther@suse.de>
3789
3790 * lto.c (lto_read_section_data): Use plain lseek/read.
3791
37922009-10-01 Richard Guenther <rguenther@suse.de>
3793
3794 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3795 use sysconf to query the system page size.
3796 (lto_file_read): Implement fallback using stdio.
3797 (free_section_data): Likewise.
3798
37992009-09-29 Diego Novillo <dnovillo@google.com>
3800
3801 * lto-lang.c (lto_init): Really fix call to
3802 build_common_builtin_nodes.
3803
38042009-09-29 Diego Novillo <dnovillo@google.com>
3805
3806 * lto-lang.c (lto_init): Fix call to
3807 build_common_builtin_nodes.
3808
38092009-09-29 Richard Guenther <rguenther@suse.de>
3810
3811 PR lto/40754
3812 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3813 in bytes.
3814 (first_data_block): New static variable.
3815 (lto_elf_append_data): Align the first data block in each
3816 section.
3817
38182009-09-28 Diego Novillo <dnovillo@google.com>
3819
3820 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3821 * lto.c (strip_extension): New.
3822 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3823 (lto_execute_ltrans): Tidy.
3824 Do not pass -fwpa nor -fltrans-* to LTRANS.
3825 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3826 * tree.c (need_assembler_name_p): Call
3827 lang_hooks.decls.may_need_assembler_name_p if set.
3828 * varasm.c (default_binds_local_p_1): Remove check for
3829 flag_ltrans.
3830 * varpool.c (decide_is_variable_needed): Do not test for
3831 in_lto_p.
3832
38332009-09-22 Richard Guenther <rguenther@suse.de>
3834
3835 PR lto/39276
3836 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3837 * Make-lang.in: Remove ltrans-driver stuff.
3838 * config-lang.in: Likewise.
3839 * lang.opt (fltrans-driver): Remove.
3840 * lto-lang.c (lto_init_options): Remove code initializing
3841 ltrans_driver.
3842 * ltrans-driver: Remove.
3843
38442009-09-21 Diego Novillo <dnovillo@google.com>
3845
3846 * lto-lang.c (lto_define_builtins): Remove superfluous
3847 calls to targetm.init_builtins and build_common_builtin_nodes.
3848 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3849 build_common_builtin_nodes.
3850 * lto.c (lto_materialize_function): Do nothing if NODE is a
3851 clone.
3852
38532009-09-03 Diego Novillo <dnovillo@google.com>
3854
3855 * lto-elf.c (validate_file): Replace call to
3856 elf_getshstrndx with call to elf_getshdrstrndx.
3857
38582009-08-19 Richard Guenther <rguenther@suse.de>
3859
3860 * lto-lang.c (lto_init): Merge char_type_node with the
3861 appropriately signed variant.
3862
38632009-08-19 Richard Guenther <rguenther@suse.de>
3864
3865 PR lto/41071
3866 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3867 (lto_fixup_type): Re-build the pointer-to chain part two.
3868
38692009-08-19 Richard Guenther <rguenther@suse.de>
3870
3871 PR lto/41071
3872 * lto.c (lto_fixup_type): Re-build the type variant chain.
3873
38742009-08-19 Richard Guenther <rguenther@suse.de>
3875
3876 PR lto/41071
3877 * lto.c (lto_fixup_constructor): New function.
3878 (lto_fixup_tree): Replace all types. Properly fixup
3879 constructors and constants.
3880
38812009-08-14 Richard Guenther <rguenther@suse.de>
3882
3883 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3884 for DECL_LANG_SPECIFIC.
3885
38862009-08-13 Richard Guenther <rguenther@suse.de>
3887
3888 PR lto/41032
3889 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3890
38912009-07-30 Richard Guenther <rguenther@suse.de>
3892
3893 PR lto/40903
3894 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3895 the largest decl for output and free TREE_CHAIN for further
3896 use.
3897
38982009-07-24 Diego Novillo <dnovillo@google.com>
3899
3900 * Make-lang.in: Add empty lto.install-plugin target.
3901
39022009-07-13 Diego Novillo <dnovillo@google.com>
3903
3904 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3905
39062009-07-11 Richard Guenther <rguenther@suse.de>
3907
3908 * lto-lang.c (lto_write_globals): Wrapup global decls.
3909
39102009-07-10 Richard Guenther <rguenther@suse.de>
3911
3912 * lto-lang.c (lto_init): Allocate one more location to make
3913 BUILTINS_LOCATION correct.
3914
39152009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3916
3917 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3918
39192009-07-06 Diego Novillo <dnovillo@google.com>
3920
3921 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3922 TYPE_SIZE_UNIT.
3923
39242009-07-06 Diego Novillo <dnovillo@google.com>
3925
3926 * lto.c (preload_common_nodes): Remove.
3927 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3928 (lto_read_decls): Call lto_data_in_create and
3929 lto_data_in_delete.
3930 (free_decl): Do not call ggc_free.
3931 (lto_main): Call lto_init_reader.
3932 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3933 (lto_init): Initialize main_identifier_node if needed.
3934 Make ptrdiff_type_node be integer_type_node.
3935
39362009-06-19 Diego Novillo <dnovillo@google.com>
3937
3938 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3939 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3940 Remove code guarded by #ifdef LOCAL_TRACE.
3941
39422009-06-18 Diego Novillo <dnovillo@google.com>
3943
3944 * lto.c: Update license to GPLv3.
3945 * lto-elf.c: Likewise.
3946 * common.c: Likewise.
3947 * lto-lang.c: Likewise.
3948 * lto.h: Remove superfluous include files. Update all
3949 users.
3950
39512009-06-17 Diego Novillo <dnovillo@google.com>
3952
3953 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3954
39552009-06-02 Diego Novillo <dnovillo@google.com>
3956
3957 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3958 read in.
3959 (materialize_cgraph): Only materialize nodes that have a
3960 representation on file.
3961
39622009-06-01 Diego Novillo <dnovillo@google.com>
3963
3964 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3965
39662009-05-31 Diego Novillo <dnovillo@google.com>
3967
3968 * lto-lang.c (lto_type_for_mode): Handle all the modes
3969 handled in c_common_type_for_mode.
3970
39712009-05-21 Diego Novillo <dnovillo@google.com>
3972
3973 * lto-elf.c: Always include <gelf.h>.
3974 * config-lang.in (target_libs): Remove.
3975 (build_by_default): Set to no.
3976
39772009-05-15 Diego Novillo <dnovillo@google.com>
3978
3979 * lto.c (lto_materialize_function): Assert that DECL is
3980 not a builtin.
3981 (materialize_cgraph): Don't try to materialize builtin
3982 functions.
3983 * lto-section-out.c (write_symbol_vec): Do not write
3984 builtin functions.
3985
39862009-05-13 Diego Novillo <dnovillo@google.com>
3987
3988 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3989
39902009-05-07 Diego Novillo <dnovillo@google.com>
3991
3992 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3993 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3994 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3995 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3996 (lto_fixup_tree): Call gimple_register_type when *TP is a
3997 type.
3998 (lto_main): Call bitmap_obstack_initialize.
3999
40002009-04-22 Diego Novillo <dnovillo@google.com>
4001
4002 * lto.c (free_section_data): Tidy.
4003 (lto_1_to_1_map): Tidy.
4004 (lto_add_all_inlinees): Tidy.
4005 (prefix_name_with_star): New.
4006 (get_filename_for_set): New.
4007 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
4008 to determine what cgraph node sets to write.
4009 Call get_filename_for_set to compute temporary file
4010 names.
4011 (lto_execute_ltrans): Do not execute LTRANS on files with
4012 names that start with '*'.
4013 Move logic to execute LTRANS together so that LTRANS is
4014 invoked only if there are any files to compile.
4015 (do_whole_program_analysis): Only remove output files
4016 that do not start with '*'.
4017
40182009-04-06 Diego Novillo <dnovillo@google.com>
4019
4020 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
4021 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
4022 (lto_add_all_inlinees): Tidy.
4023
40242009-03-26 Diego Novillo <dnovillo@google.com>
4025
4026 * lto.c: Include gimple.h.
4027 (lto_read_in_decl_state): Call gimple_register_type for
4028 every type in every stream.
4029 (lto_fixup_common): Call gimple_register_type if T has a
4030 type.
4031 (do_whole_program_analysis): Call print_lto_report.
4032 (lto_main): Call print_lto_report after cgraph_optimize.
4033 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
4034
40352009-03-24 Diego Novillo <dnovillo@google.com>
4036
4037 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
4038 (lto.o): Add dependency on GIMPLE_H.
4039
40402009-03-10 Simon Baldwin <simonb@google.com>
4041
4042 * lto.c (lto_read_all_file_options): Close any open file descriptor
4043 contained in file_data before freeing.
4044
40452009-02-24 Rafael Avila de Espindola <espindola@google.com>
4046
4047 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4048 for a decl in the original bitmap, not a node.
4049 (lto_add_all_inlinees): Remove original nodes that are not needed.
4050 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4051
40522009-02-24 Diego Novillo <dnovillo@google.com>
4053
4054 * lto.c (lto_materialize_function): Update
4055 lto_stats.num_function_bodies.
4056 (get_section_data): Initialize *LEN to 0.
4057 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
4058 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
4059 Update lto_stats.num_output_files.
4060 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4061 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4062 (lto_main): Initialize lto_stats.
4063 If flag_lto_report is set, call print_lto_report.
4064
40652009-02-19 Diego Novillo <dnovillo@google.com>
4066
4067 Revert
4068
4069 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4070
4071 * lto.c (lto_add_inline_clones): Don't add the
4072 master clone. Check for a decl in the original
4073 bitmap, not a node.
4074 (lto_add_all_inlinees): Remove original nodes
4075 that are not needed.
4076 (lto_scan_statics_in_cgraph_node): Don't care if
4077 the node is the master.
4078 (lto_promote_cross_file_statics): Use a new
4079 context.seen_node_decls for each set
4080
40812009-02-19 Rafael Avila de Espindola <espindola@google.com>
4082
4083 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4084 for a decl in the original bitmap, not a node.
4085 (lto_add_all_inlinees): Remove original nodes that are not needed.
4086 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4087 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4088 for each set
4089
40902009-02-18 Diego Novillo <dnovillo@google.com>
4091
4092 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4093 and TV_WHOPR_WPA_IO.
4094 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4095 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4096 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4097 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4098 depending on command line flags.
4099 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4100 (lto_main): Remove timer uses.
4101
41022009-02-18 Rafael Avila de Espindola <espindola@google.com>
4103
4104 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4105 (lto_wpa_write_files): Update calls to renamed functions.
4106
41072009-02-17 Diego Novillo <dnovillo@google.com>
4108
4109 PR 39203
4110 * lto-lang.c (lto_post_options): Disable -fwhole-program
4111 when running LTRANS.
4112
41132009-02-10 Diego Novillo <dnovillo@google.com>
4114
4115 * lto.c (read_cgraph_and_symbols): Fix comment.
4116
41172009-02-10 Diego Novillo <dnovillo@google.com>
4118
4119 * lto.c (read_cgraph_and_symbols): Read options from all
4120 IL files.
4121
41222009-02-10 Diego Novillo <dnovillo@google.com>
4123
4124 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4125 (materialize_cgraph): Likewise.
4126 (do_whole_program_analysis): Likewise.
4127 (lto_main): Call read_cgraph_and_symbols,
4128 materialize_cgraph and do_whole_program_analysis.
4129
41302009-02-10 Simon Baldwin <simonb@google.com>
4131
4132 * lto.c: Include lto-opts.h.
4133 * (lto_main): Clear file options at loop start, read any saved
4134 options from the first file handled, and re-issue options.
4135 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4136
41372009-02-02 Diego Novillo <dnovillo@google.com>
4138
4139 * lto.c (lto_main): Stop LTO_TIMER and use
4140 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4141
41422009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4143
4144 PR lto/38995
4145 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4146 to POINTER_SIZE.
4147
41482009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4149
ab20d992 4150 * Make-lang.in (LTO_EXE): Link with all
d7f09764
DN
4151 BACKENDLIBS and not only GMPLIBS
4152
41532009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4154
4155 PR bootstrap/38992
4156 * lto-elf.c: Include gelf.h instead of libelf.h.
4157 (lto_elf_file_close): Replace elfx_update_shstrndx with
4158 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4159 gelf_update_ehdr.
4160
41612009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4162
4163 PR middle-end/38996
4164 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4165
41662009-01-26 Diego Novillo <dnovillo@google.com>
4167
4168 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4169
41702009-01-26 Diego Novillo <dnovillo@google.com>
4171
4172 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4173 and rename into gimple_types_compatible_p.
4174
41752009-01-12 Rafael Avila de Espindola <espindola@google.com>
4176
4177 * lto-lang.c (lang_hooks): Remove the const qualifier.
4178
41792009-01-06 Diego Novillo <dnovillo@google.com>
4180
4181 * ltrans-driver: Mark 'all' target as phony.
4182
41832008-12-31 Diego Novillo <dnovillo@google.com>
4184
4185 * ltrans-driver: Execute a NOP action for target 'all'.
4186
41872008-12-19 Diego Novillo <dnovillo@google.com>
4188
4189 * lto.c (lto_1_to_1_map): Tidy.
4190
41912008-12-19 Diego Novillo <dnovillo@google.com>
4192
4193 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4194 be opened, show its name.
4195 * ltrans-driver: If $verbose is set, do not use parallelism.
4196
41972008-12-17 Rafael Avila de Espindola <espindola@google.com>
4198
4199 * lto.c (lto_fixup_function): New.
4200 (lto_fixup_tree): Call lto_fixup_function.
4201
42022008-12-14 Doug Kwan <dougkwan@google.com>
4203
4204 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4205 variables if there is no function.
4206
42072008-12-10 Simon Baldwin <simonb@google.com>
4208
4209 * ltrans-driver: Always run make in silent mode, to avoid make's
4210 trace on stdout interfering with lto-wrapper output.
4211
42122008-12-10 Doug Kwan <dougkwan@google.com>
4213
4214 * lto.c (lto_add_inline_clones): Do not force master clones of
4215 inlined functions already in SET to be static inline.
4216
42172008-12-04 Doug Kwan <dougkwan@google.com>
4218
4219 * lto.c (globalize_context_t): New type to store states in
4220 globalization of cross-file statics.
4221 (globalize_cross_file_statics): New.
4222 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4223 static decls that need to be fixed up.
4224 (lto_scan_statics_in_cgraph_node): Change call interface to use
4225 a globalize_context_t CONTEXT for all states used.
4226 (lto_scan_statics_in_remaining_global_vars): New.
4227 (lto_promote_cross_file_statics): Use new call interface of
4228 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4229 visible vars in the last set.
4230
42312008-12-03 Diego Novillo <dnovillo@google.com>
4232
4233 * lto.c (lto_fixup_tree): Do not emit an error when
4234 PREVAILING throw but T doesn't.
4235
42362008-12-02 Doug Kwan <dougkwan@google.com>
4237
4238 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4239 from code in ...
4240 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4241 variables and functions.
4242 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4243 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4244
42452008-11-29 Diego Novillo <dnovillo@google.com>
4246
4247 * lto.c: Include timevar.h.
4248 (lto_materialize_function): Tidy. Add comments.
4249 (lto_wpa_write_files): Tidy.
4250 (lto_execute_ltrans): Tidy.
4251 (lto_main): Add local variable LTO_TIMER. Initialize it
4252 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4253 Start and stop the timer.
4254 Tidy comments.
4255 * Make-lang.in (lto.o): Add dependency on timevar.h.
4256 * ltrans-driver: React to -v and -save-temps.
4257 Use simple heuristic to determine how much parallelism to
4258 use when executing make.
4259
42602008-11-12 Doug Kwan <dougkwan@google.com>
4261
4262 * lto.c (lto_bitmap_obstack): Remove var.
4263 (lto_materialize_function): Do nothing instead of marking function
4264 body in file if flag_wpa is true.
4265 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4266 (lto_scan_statics_in_cgraph_node): New function.
4267 (lto_promote_cross_file_statics): Same.
4268 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4269 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4270 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4271
42722008-11-09 Diego Novillo <dnovillo@google.com>
4273
ab20d992 4274 * lto.c (lto_fixup_tree): Change error message locus
d7f09764
DN
4275 information to include location of mismatching
4276 declaration.
4277 Use TREE_NO_WARNING to avoid repeated messages.
4278 (lto_main): If lto_fixup_decls emitted any errors, exit.
ab20d992 4279 * lto-lang.c: Don't include libfuncs.h and except.h
d7f09764
DN
4280 (lto_init_options): Don't enable exceptions by default.
4281 (lto_eh_runtime_type): Move to lto-function-in.c
4282 (lto_init_eh): Likewise.
4283 (lto_init): Don't call lto_init_eh.
ab20d992 4284 * Make-lang.in (lto-lang.o): Remove dependency on
d7f09764
DN
4285 libfuncs.h and except.h.
4286
42872008-10-30 Diego Novillo <dnovillo@google.com>
4288
4289 * lto.c (lto_read_decls): Declare debug_main only if
4290 LTO_STREAM_DEBUGGING is enabled.
4291
42922008-10-30 Simon Baldwin <simonb@google.com>
4293
4294 * lto.c (lto_wpa_write_files): Create intermediate files with
4295 make_cwd_temp_file().
4296 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4297 WPA_SAVE_LTRANS is set.
4298 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4299 * ltrans-driver: Do not strip directory from output files.
4300
43012008-10-29 Doug Kwan <dougkwan@google.com>
4302
4303 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4304 DECL.
4305 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4306 (lto/lto-symtab.o): Remove rule.
4307 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4308 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4309 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4310 Remove macros.
4311 lto-symtab.c (File): Move up one level.
4312 lto-lang.c (cgraph.h): Remove include.
4313 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4314 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4315 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4316
ab20d992 43172008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4318
4319 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4320 non prevailing weak symbols.
4321
ab20d992 43222008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4323
4324 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4325
ab20d992 43262008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4327
4328 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4329 different types.
4330
43312008-10-23 Simon Baldwin <simonb@google.com>
4332
4333 * lto-lang.c (input_node): Save the node reference, rather than the
4334 node pointer, in node->inlined_to.
4335 (input_cgraph_1): Convert node references into node pointers.
4336
43372008-10-22 Diego Novillo <dnovillo@google.com>
4338 Rafael Espindola <espindola@google.com>
4339
4340 * lto.c (lto_resolution_read): Tidy.
4341 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4342 abort if RET is NULL.
4343
43442008-10-22 Doug Kwan <dougkwan@google.com>
4345
4346 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4347 exceptions flag is given.
4348 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4349 (lto_init_eh): Remove exceptions flag initialization.
ab20d992 4350 (lto_init): Only call lto_init_eh if exceptions flag is set.
d7f09764
DN
4351
43522008-10-21 Diego Novillo <dnovillo@google.com>
4353
4354 * lto.c: Tidy some formatting.
4355 * lto.h: Likewise.
4356
43572008-10-21 Simon Baldwin <simonb@google.com>
4358
4359 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4360 them is NULL (but not the other).
4361
43622008-10-17 Diego Novillo <dnovillo@google.com>
4363
4364 * ltrans-driver: Divert output from make to a temporary file.
4365 Show it if the call to make failed.
4366
43672008-10-15 Diego Novillo <dnovillo@google.com>
4368
4369 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4370 Do not print TEMP_FILENAME
4371 * ltrans-driver: Call make with -s.
4372
43732008-10-15 Diego Novillo <dnovillo@google.com>
4374
4375 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4376 TREE_STATIC on global symbols.
4377
43782008-10-14 Ollie Wild <aaw@google.com>
4379
4380 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4381 (LTRANS_DRIVER_EXE): Add.
4382 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4383 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4384 (lto.install.common): Remove ltrans-driver.
4385 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4386 (LTRANS_DRIVER_EXE): New build rule.
4387 * config-lang.in (compilers): Add ltrans-driver.
4388
43892008-10-14 Diego Novillo <dnovillo@google.com>
4390
4391 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4392 of program name.
4393
43942008-10-13 Ollie Wild <aaw@google.com>
4395
4396 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4397 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4398 * ltrans-driver (LTRANS_FLAGS): Remove.
4399
44002008-10-08 Doug Kwan <dougkwan@google.com>
4401
4402 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4403 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4404 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4405 from lto_fixup_state to here.
4406 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4407 just a free-list. Fix up types also. Move decl merging code to
4408 lto_fixup_tree.
4409 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4410 object.
4411 (lto_fixup_decls): Use another pointer set to avoid multiple
4412 walking of nodes except for DECLs to be replaced. Pass an
4413 lto_fixup_data_t object to tree-walker.
4414
ab20d992 44152008-10-08 Rafael Espindola <espindola@google.com>
d7f09764
DN
4416
4417 * lto-symtab.c (lto_symtab_set_resolution): New.
4418 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4419 lto_symtab_get_resolution.
4420 (lto_symtab_prevailing_decl): Return decl for non public decls.
4421 (lto_symtab_get_resolution): New.
4422 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4423
ab20d992 44242008-10-06 Rafael Espindola <espindola@google.com>
d7f09764
DN
4425
4426 * lto-lang.c: Include cgraph.h.
4427 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4428 input_cgraph): Moved from lto-cgraph.c.
4429 (LANG_HOOKS_INPUT_CGRAPH): New.
4430
ab20d992 44312008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4432
4433 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4434
ab20d992 44352008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4436
4437 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4438 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4439 prevailing definition. Don't mark TREE_NOTHROW differences.
4440 * lto.c (lto_fixup_tree): New.
4441 (lto_fixup_state): New.
4442 (lto_fixup_state_aux): New.
4443 (free_decl): New.
4444 (lto_fixup_decls): New.
4445 (lto_main): Call lto_fixup_decls.
4446
44472008-10-02 Ollie Wild <aaw@google.com>
4448
4449 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4450 and Init.
4451 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4452 * lto-lang.c (lto_post_options): Add validation and fixups for
4453 -fltrans and -fwpa.
4454
ab20d992 44552008-10-02 Rafael Espindola <espindola@google.com>
d7f09764
DN
4456
4457 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4458 lto_symtab_merge_decl): Return void.
4459 (lto_symtab_prevailing_decl): New.
4460
ab20d992 44612008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4462
4463 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4464 defined symbols.
4465 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4466 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4467 Check for already defined symbols.
4468 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4469 (LTO_IDENTIFIER_RESOLUTION): Remove.
4470 (LTO_DECL_RESOLUTION): New.
4471
ab20d992 44722008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4473
4474 * lto.c (lto_read_decls): Use new input_tree signature.
4475
44762008-09-26 Doug Kwan <dougkwan@google.com>
4477
4478 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4479 bodies affected by exception attribute merging of DECLs.
4480 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
ab20d992 4481 merging.
d7f09764
DN
4482
44832008-09-25 Rafael Espindola <espindola@google.com>
4484
4485 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4486 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4487 * lto-symtab.c (lto_symtab_compatible): New.
4488 (lto_symtab_overwrite_decl): New.
4489 (lto_symtab_merge_decl): Refactor to use the above functions
4490 and the resolution from lang_identifier.
4491 * lto-tree.h: Include plugin-api.h.
4492 (lang_identifier): Add resolution.
4493 (LTO_IDENTIFIER_RESOLUTION): New.
4494
44952008-09-25 Ollie Wild <aaw@google.com>
4496
4497 * lang.opt (fltrans-output-list=): New option.
4498 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4499
ab20d992 45002008-09-25 Rafael Espindola <espindola@google.com>
d7f09764
DN
4501
4502 * lto.c (lto_resolution_read): Initialize ret;
4503
45042008-09-24 Ollie Wild <aaw@google.com>
4505
4506 * lto.c (sys/mman.h): Move include.
4507 (lto_wpa_write_files): Return a list of written files.
4508 (lto_execute_ltrans): New function.
4509 (lto_main): Call lto_execute_ltrans.
4510 (ltrans-driver): New file.
4511 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4512 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4513 (lto_init_options): Initialize ltrans_driver.
4514 (lto_handle_option): Fix incorrect default output value.
4515 * lang.opt (fltrans-driver=): New option.
4516 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4517 (lto.install-common): Add lto/ltrans-driver.
4518
ab20d992 45192008-09-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4520
4521 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4522 (lto/lto.o): Depend on lto/common.h.
4523 (lto/common.o): New.
4524 * lang.opt (resolution): New.
4525 * lto-lang.c (resolution_file_name): New.
4526 (lto_handle_option): Handle OPT_resolution.
4527 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4528 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4529 pass it to lto_symtab_merge_decl.
4530 * lto.c: Include common.h.
4531 (lto_read_decls): Add resolutions and resolutions_size arguments.
4532 Initialize data_in.globals_resolution and
4533 data_in.globals_resolution_size.
4534 (index_and_symbol_resolution): New.
4535 (lto_resolution_read): New.
4536 (lto_file_read): Add argument resolution_file.
4537 Read resolution.
4538 * lto.h (resolution_file_name): New.
4539
ab20d992 45402008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4541
4542 * common.c: Update description.
4543 * common.h: Update description.
4544
ab20d992 45452008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4546
4547 * common.c: Moved from lto-plugin.
4548 * common.h: Moved from lto-plugin.
4549
45502008-09-22 Doug Kwan <dougkwan@google.com>
4551
4552 * lto.c (VEC(bitmap,heap)): Declare.
4553 (lto_materialize_function): Handle WAP mode specially.
4554 (lto_add_inline_clones): New.
4555 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4556 return a bitmap of inlined decls.
4557 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4558 (lto_main): Call reset_inline_failed to reset inlining states.
4559 Check call-graph after WPA inlining.
4560 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4561 unconditionally.
4562
45632008-09-19 Doug Kwan <dougkwan@google.com>
4564
4565 lto.c (lto_main): Remove unsued wrapper code.
4566 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4567
45682008-09-19 Rafael Espindola <espindola@google.com>
4569
4570 * lto-symtab.c: Include lto-tree-in.h.
4571 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4572 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4573 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4574
45752008-09-17 Paolo Bonzini <bonzini@gnu.org>
4576 Rafael Avila de Espindola <espindola@google.com>
4577
4578 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4579 COMPOUND_LITERAL_EXPR_DECL): Remove.
4580 (emit_local_var): Remove.
4581 (lto_expand_expr): Remove.
4582 (lto_staticp): Remove.
4583 (LANG_HOOKS_EXPAND_EXPR): Remove.
4584 (LANG_HOOKS_STATICP): Remove.
4585
45862008-09-11 Diego Novillo <dnovillo@google.com>
4587
4588 * lto-lang.c: Include except.h and libfuncs.h.
4589 (lto_init_eh): New.
4590 (lto_init): Call it.
4591 Set flag_generate_lto to 0.
4592 * Make-lang.in (lto-lang.o): Add dependency on except.h
4593 and libfuncs.h.
4594
45952008-09-09 Bill Maddox <maddox@google.com>
4596
4597 * lto-lang.c: Include header file expr.h.
4598 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4599 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
ab20d992 4600 (emit_local_var): Copied from c-semantics.c.
d7f09764
DN
4601 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4602 and c_staticp in c-common.c.
ab20d992 4603 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
d7f09764
DN
4604
46052008-09-08 Diego Novillo <dnovillo@google.com>
4606
4607 * lto-lang.c (lto_global_bindings_p): Return 1 during
4608 IPA passes.
4609
46102008-09-07 Diego Novillo <dnovillo@google.com>
4611
4612 * lto.c: Tidy formatting.
4613
46142008-08-04 Bill Maddox <maddox@google.com>
4615
4616 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
ab20d992 4617
d7f09764
DN
46182008-09-03 Doug Kwan <dougkwan@google.com>
4619
4620 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4621 CIF_OK instead of NULL.
4622
46232008-09-02 Diego Novillo <dnovillo@google.com>
4624 Simon Baldwin <simonb@google.com>
4625
4626 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4627 c_common_type_for_size.
4628 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4629 (lto_init): Call linemap_add.
4630 (signed_and_unsigned_types): Remove.
4631
46322008-08-29 Diego Novillo <dnovillo@google.com>
4633
4634 * lto-lang.c (handle_noreturn_attribute): New local function.
4635 (handle_const_attribute): New local function.
4636 (handle_malloc_attribute): New local function.
4637 (handle_pure_attribute): New local function.
4638 (handle_novops_attribute): New local function.
4639 (handle_nonnull_attribute): New local function.
4640 (handle_nothrow_attribute): New local function.
4641 (handle_sentinel_attribute): New local function.
4642 (handle_type_generic_attribute): New local function.
4643 (handle_format_attribute): New local function.
4644 (handle_format_arg_attribute): New local function.
4645 (lto_attribute_table): Declare.
4646 (lto_format_attribute_table): Declare.
4647 (lto_init_attributes): New local function.
4648 (lto_define_builtins): Call it.
4649 Call targetm.init_builtins and build_common_builtin_nodes.
4650 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4651 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4652
46532008-08-28 Diego Novillo <dnovillo@google.com>
4654
4655 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4656 $(GIMPLE_H).
4657 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4658 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4659 * lto-symtab.c: Include gimple.h.
4660 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4661 TREE_CHAIN.
4662
46632008-08-27 Doug Kwan <dougkwan@google.com>
4664
4665 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4666 gt-lto-lto.h): New includes.
4667 (lto_materialize_function): Do not read in function body in WPA mode.
4668 Format a line to fit in 80 columns.
4669 (lto_cgraph_node_sets): New garbage collected variable.
4670 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4671 New functions.
4672 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
ab20d992 4673 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
d7f09764
DN
4674 variable LTO_SECTION_IN_H.
4675 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4676 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4677 with variable LTO_SECTION_IN_H.
4678 * config-lang.in (gtfiles): Add lto/lto.c.
4679 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4680 merged DECL_RESULT correctly.
4681
46822008-08-26 Bill Maddox <maddox@google.com>
4683
4684 * lto-lang.c Include tree-gimple.h.
4685 (lto_mark_addressable): Call mark_addressable rather than
4686 asserting.
4687 (lto_post_options): Suppress debug info generation.
4688 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
ab20d992 4689
3f8257db 46902008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4691
4692 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4693 assertion and leave an explanatory comment in its place.
ab20d992 4694
d7f09764
DN
46952008-08-21 Doug Kwan <dougkwan@google.com>
4696
4697 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4698 of common nodes instead of computing locallly.
4699 (lto_read_in_decl_state): New.
4700 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4701 Read global and per-function in-decl states.
4702 * Make-lang.in (LTO_H): Update dependency.
4703 (lto/lto.o): Same.
4704 (lto-symtab.c): Merge (revision 139039)
4705 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4706
47072008-08-21 Rafael Espindola <espindola@google.com>
4708
4709 * config-lang.in (target_libs): New.
4710
47112008-08-20 Bill Maddox <maddox@google.com>
4712
4713 * lto.c (current_lto_file): Remove GTY marker from static
4714 variable. Remove include of file gt-lto-lto.h.
4715 * Make-lang.in: Remove dependency of lto/lto.o on
4716 gt-lto-lto.h.
4717 * lto-elf.c (lto_file_close): Removed.
4718 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4719 allocate lto_elf_file object.
4720 (lto_elf_file_close): Free lto_elf_file object after close.
4721 * lto.h (struct lto_file_struct): Remove GTY marker.
4722 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4723 gtfiles.
ab20d992 4724
d7f09764
DN
47252008-08-20 Bill Maddox <maddox@google.com>
4726
4727 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4728 to conform to its new signature.
4729 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4730 on discarded node here, now called in global_vector_fixup.
ab20d992 4731
d7f09764
DN
47322008-08-09 Bill Maddox <maddox@google.com>
4733
4734 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4735 has not been set to a front-end-specific value.
ab20d992 4736
d7f09764 47372008-08-05 Doug Kwan <dougkwan@google.com>
ab20d992 4738
d7f09764
DN
4739 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4740 build breakage.
4741
47422008-07-30 Bill Maddox <maddox@google.com>
4743
4744 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4745 Remove obsolete comments.
4746 (lto_read_decls): Remove initialization of deleted field data_in.global.
4747 Tidy up comments.
4748 (lto_main): Remove redundant initialization of section_hash_table.
4749 * lto-elf.c: Removed obsolete comments.
4750 * lto.h: Tidy up comments.
4751 * lto-symtab.c (lto_least_common_multiple): New function.
4752 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4753 Tidy up comments.
4754
47552008-07-25 Diego Novillo <dnovillo@google.com>
4756 Bill Maddox <maddox@google.com>
4757
4758 * lto.c: Re-order include files.
4759 Include lto-section-out.h.
4760 (preload_common_nodes): Add debugging output.
4761 Add new local INDEX_TABLE.
4762 Call preload_common_node.
4763 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4764
47652008-07-13 Bill Maddox <maddox@google.com>
4766
4767 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4768 unwanted scaling during pointer addition.
4769
47702008-07-11 Bill Maddox <maddox@google.com>
4771 Diego Novillo <dnovillo@google.com>
4772
4773 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4774 Make code const-correct.
4775 (lto_file_read): Fix C++ compatibility warnings.
ab20d992 4776 (lto_read_section_data): Fix C++ compatibility warnings.
d7f09764
DN
4777 (lto_get_section_data): Use CONST_CAST to avoid warning when
4778 const pointer passed to free.
4779 * lto-elf.c (lto_elf_build_section_table): Fix C++
4780 compatibility warnings.
ab20d992 4781 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
d7f09764 4782 to avoid warning assigning const pointer to d_buf field of Elf_Data.
ab20d992 4783 (lto_get_current_out_file): Fix C++ compatibility warnings.
d7f09764
DN
4784
47852008-07-11 Diego Novillo <dnovillo@google.com>
4786
4787 * Make-lang.in (lto-warn): Define.
4788
47892008-07-03 Simon Baldwin <simonb@google.com>
4790
4791 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4792 LTO_STREAM_DEBUGGING.
4793
47942008-06-27 Ollie Wild <aaw@google.com>
4795
4796 * lto-elf.c (lto-section-out.h): New include.
4797 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4798 and data members.
4799 (cached_file_attrs): New static variable.
4800 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4801 Use cached_file_attrs for checking bits.
4802 (lto_elf_build_section_table): Remove elf_file argument from
4803 lto_elf_get_shdr and lto_elf_free_shdr calls.
4804 (DEFINE_INIT_SHDR): New macro.
4805 (init_shdr32, init_shdr64): New functions defined via the
4806 DEFINE_INIT_SHDR macro.
4807 (lto_elf_begin_section_with_type): New function.
4808 (lto_elf_begin_section): New function.
4809 (lto_elf_append_data): New function.
4810 (lto_elf_end_section): New function.
4811 (DEFINE_VALIDATE_EHDR): New macro.
4812 (validate_ehdr32, validate_ehdr64): New functions defined via the
4813 DEFINE_VALIDATE_EHDR macro.
4814 (validate_file): New function.
4815 (DEFINE_INIT_EHDR): New macro.
4816 (init_ehdr32, init_ehdr64): New functions defined via the
4817 DEFINE_INIT_EHDR macro.
4818 (init_ehdr): New function.
4819 (lto_elf_file_open): Add support for writable files. Move some
4820 validation logic to validate_file.
4821 (lto_elf_file_close): Add support for writable files. Write file data
4822 and free data blocks.
4823 (current_out_file): New static variable.
4824 (lto_set_current_out_file): New function.
4825 (lto_get_current_out_file): New function.
4826 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4827 Add temporary initialization for testing ELF serialization.
4828 * lto.h (lto-section-out.h): New include.
4829 (struct lto_file_struct): Slight modification to comment.
4830 (lto_elf_file_open): Add writable parameter.
4831 (lto_elf_begin_section): New function declaration.
4832 (lto_elf_append_data): New function declaration.
4833 (lto_elf_end_section): New function declaration.
4834 (lto_set_current_out_file, lto_get_current_out_file): New function
4835 declarations.
4836 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4837 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4838 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4839 * Make-lang.in (LTO_H): Add lto-section-out.h.
4840
48412008-06-12 Ollie Wild <aaw@google.com>
4842
4843 * lto.h (struct lto_file_vtable_struct): Remove.
4844 (struct lto_file_struct): Remove vtable member.
4845 * lto-elf.c (lto_file_init): Remove vtable argument.
4846 (lto_elf_map_optional_lto_section): Remove.
4847 (lto_elf_unmap_section): Remove.
4848 (lto_elf_file_vtable): Remove.
4849 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4850 lto_file_init call.
4851 (lto_elf_find_section_data): Remove.
4852
48532008-06-11 Ollie Wild <aaw@google.com>
4854
4855 * lto.c (lto_file_read): Add const qualifier to data variable.
4856
48572008-06-11 Diego Novillo <dnovillo@google.com>
4858
4859 Merge from lto-streamber sub-branch.
4860
4861 2008-06-04 Ollie Wild <aaw@google.com>
4862
4863 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4864 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4865
4866 2008-05-28 Bill Maddox <maddox@google.com>
4867
4868 Replace the DWARF reader in the LTO front-end.
4869
4870 * lto.c: Include lto-tree-in.h, lto-tags.h.
4871 (enum DWARF2_class, DW_cl_constant, struct
4872 DWARF2_form_data, struct lto_context,
4873 lto_fd_init, lto_info_fd_init,
4874 lto_abbrev_fd_init, lto_info_fd_close,
4875 lto_file_init, lto_file_close,
4876 lto_file_corrupt_error, lto_abi_mismatch_error,
4877 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4878 lto_read_uleb128, lto_read_sleb128,
4879 lto_read_initial_length, lto_abbrev_read_attrs,
4880 lto_abbrev_read, lto_abbrev_read_lookup,
4881 lto_read_section_offset,
4882 lto_read_comp_unit_header, find_cu_for_offset,
4883 lto_get_file_name,
4884 lto_resolve_reference,lto_read_form,
4885 attribute_value_as_int,
4886 make_signed_host_wide_int,
4887 attribute_value_as_constant, lto_cache_hash,
4888 lto_cache_eq, lto_cache_store_DIE,
4889 lto_cache_lookup_DIE, lto_find_integral_type,
4890 lto_find_integral_type_1,
4891 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4892 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4893 lto_unsupported_attr_error, lto_get_identifier,
4894 lto_read_referenced_type_DIE,
4895 lto_read_compile_unit_DIE,
4896 lto_read_array_type_DIE,
4897 lto_read_structure_union_class_type_DIE,
4898 lto_read_enumerator_DIE,
4899 lto_read_enumeration_type_DIE,
4900 lto_read_only_for_child_DIEs,
4901 lto_read_only_for_child_DIEs,
4902 lto_read_member_DIE, lto_read_abbrev,
4903 lto_read_variable_formal_parameter_constant_DIE,
4904 lto_get_body): Removed.
4905 (preload_common_nodes): New function.
4906 (lto_read_decls): Convert for new global streamer.
4907 (lto_materialze_file_data,
4908 lto_read_subroutine_type_subprogram_die,
4909 lto_read_unspecified_parameters_DIE,
4910 lto_read_typedef_DIE,
4911 lto_read_pointer_reference_type_DIE,
4912 lto_read_subrange_type_DIE,
4913 lto_read_base_type_DIE,
4914 lto_read_const_volatile_restrict_type_DIE,
4915 lto_read_namespace_DIE,
4916 lto_read_unspecified_type_DIE, lto_read_DIE,
4917 lto_read_child_DIEs, lto_collect_child_DIEs):
4918 Removed.
4919 (lto_info_read, lto_set_cu_context): Removed.
4920 (lto_file_read): Convert for new global streamer.
4921 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4922 lto_resolve_var_ref, lto_resolve_fn_ref,
4923 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4924 lto_resolve_namespacedecl_ref): Removed.
4925 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4926 * lto-tree.h (lto_symtab_merge_var,
4927 lto_symtab_mergee_fun): Declare here.
4928 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4929 (lto_elf_file_open): Removed code to read DWARF debug sections.
4930 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4931 DWARF2_CompUnit, lto_die_ptr,
4932 lto_die_cache_entry, lto_fd, lto_info_fd,
4933 lto_abbrev_fd): Removed.
4934 (lto_file): Removed debug_info and debug_abbrev fields.
4935 (lto_ref): Removed.
4936 (lto_file_init, lto_file_close,
4937 lto_resolve_type_ref, lto_resolve_var_ref,
4938 lto_resolve_fn_ref, lto_resolve_field_ref,
4939 lto_resolve_typedecl_ref,
4940 lto_resolve_namespacedecl_ref,
4941 lto_get_file_name): Removed declarations.
4942 (lto_symtab_merge_var, lto_symtab_merge_fn):
4943 Declarations moved to lto-tree.h.
4944 * lto-symtab.c (lto_compatible_attributes_p):
4945 Lobotomize this, as it barfs on "Hello, world!".
4946 * lto-section-out.c: Include lto-tree-out.h.
4947 (lto_hash_global_slot_node,
4948 lto_eq_global_slot_node, preload_common_nodes,
4949 write_global_stream, write_global_references):
4950 New functions.
4951 (produce_asm_for_decls): Convert for new global streamer.
4952 * lto-section-out.h (lto_hash_global_slot_node,
4953 lto_eq_global_slot_node): Declare.
4954
3f8257db 49552008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 4956 Jan Hubicka <jh@suse.cz>
ab20d992 4957
d7f09764
DN
4958 * lto.c (sys/mman.h, tree-pass.h): New includes.
4959 (lto_materialize_constructors_and_inits,
4960 lto_materialize_function): Keeps length of section.
4961 (lto_materialize_cgraph): Removed.
4962 (lto_read_decls): Initialize fd field.
4963 (lto_file_read): Different return type and removed much code to
4964 lto_main.
4965 (page_mask): New variable.
4966 (lto_read_section_data, get_section_data, free_section_data): New
4967 functions.
4968 (lto_main): Now calls pass manager, sets the hooks so that the ipa
ab20d992
JJ
4969 passes can get the section data.
4970
3f8257db 49712008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4972
4973 * lto.h (lto_read_decls): Made local.
ab20d992 4974 (lto_input_function_body, lto_input_constructors_and_inits,
d7f09764
DN
4975 lto_input_cgraph): Declarations moved to lto-section-in.h.
4976 * lto-section-in.c: Moved to .. .
4977 * lto-cgraph-in.c: Ditto.
4978 * lto-section-in.h: Ditto.
4979 * lto-function-in.c: Ditto.
4980 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4981 (lto_insert_block): Removed.
4982 (LANG_HOOKS_INSERT_BLOCK): Removed.
4983 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4984 lto-section-in.o): Rules moved to lto/Makefile.in.
ab20d992 4985
d7f09764
DN
4986
49872008-05-16 Ollie Wild <aaw@google.com>
4988
4989 * lto-lang.c (tree-inline.h): Include.
4990 (lto_post_options): New function.
4991 (LANG_HOOKS_POST_OPTIONS): Define.
4992 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4993 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4994
49952008-05-13 Diego Novillo <dnovillo@google.com>
4996
4997 * lto-function-in.c (input_ssa_names): Call
4998 make_ssa_name_fn instead of make_ssa_name.
4999
50002008-05-12 Diego Novillo <dnovillo@google.com>
5001
5002 * lto-cgraph-in.c (overwrite_node): Update references to
5003 inline summary fields.
5004 * lto-function-in.c (input_expr_operand): Do not handle
5005 STRUCT_FIELD_TAG.
5006
50072008-05-09 Ollie Wild <aaw@google.com>
5008
5009 * lang.opt: New file.
5010 * lto-lang.c (lto_init_options): New function.
5011 (lto_handle_option): New function.
5012 (lto_init): Move initialization of flag_unit_at_a_time to
5013 lto_init_options.
5014 (LANG_HOOKS_INIT_OPTIONS): Define.
5015 (LANG_HOOKS_HANDLE_OPTION): Define.
5016
50172008-04-29 Ollie Wild <aaw@google.com>
5018
5019 * lto.c (lto_read_namespace_DIE): New function.
5020 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
5021 NAMESPACE_DECL DIE's.
5022 (lto_resolve_namespacedecl_ref): New function.
5023 * lto.h (lto_resolve_namespacedecl_ref): New function.
5024 * lto-section-in.c (lto_read_decls): Read namespace declarations.
5025 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
5026 and num_namespace_decls.
5027 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
5028 * lto-lang.c (lto_init_ts): New function.
5029 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
5030
50312008-04-16 Ollie Wild <aaw@google.com>
5032
5033 * lto-function-in.c (input_type_ref): Updated function description.
5034
50352008-04-16 Ollie Wild <aaw@google.com>
5036
5037 * lto-function-in.c (input_type_ref_1): New function.
5038 (input_type_ref): Split into two functions.
5039 (input_function): Add support for type contexts.
5040
50412008-04-16 Ollie Wild <aaw@google.com>
5042
5043 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
5044 section name
5045
50462008-04-16 Ollie Wild <aaw@google.com>
5047
5048 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
5049 list of supported languages.
5050
3f8257db 50512008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5052
5053 Merge with mainline @133491.
5054
3f8257db 50552008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5056 Jan Hubicka <jh@suse.cz>
5057
5058 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
5059 fd->unmaterialized_fndecls.
5060 (lto_get_file_name, lto_materialize_cgraph): New function.
5061 (lto_materialize_constructors_and_inits,
5062 lto_materialize_function): Read info directly from elf file.
5063 (lto_file_read): Made local and initialize dictionary so that
5064 other lto sections can be read without reprocessing the elf file.
5065 (lto_main): Read all functions after all files have been processed
ab20d992 5066 for their types, globals and cgraph.
d7f09764
DN
5067 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5068 dependencies.
5069 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5070 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5071 (lto_elf_read_symtab): Removed function.
5072 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5073 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5074 (lto_file_read): Made local.
5075 (lto_get_file_name, lto_elf_build_section_table,
ab20d992 5076 lto_input_cgraph):
d7f09764
DN
5077 New function.
5078 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5079 New functions.
5080 (lto_read_decls): Get the file name.
5081 * lto-cgraph-in.c: New file.
5082 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5083 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5084 (input_labels): Fixed latent sizeof issue.
5085 (input_function): Build stmt array to set call sites into cgraph
5086 edges.
5087 (lto_read_body): Reset cfun->curr_properties.
5088 * lto_section_in.h (lto_section_slot): New structure.
5089 (section_hash_table.lto_file_decl_data): New field.
5090
3f8257db 50912008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5092
5093 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5094 reconstruct static initializers.
5095 (lto_get_body, lto_materialize_function): Add lto_section_type as
5096 a parameter.
5097 (lto_materialize_constructors_and_inits,
5098 lto_materialize_file_data): New function.
5099 (lto_materialize_function,
5100 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5101 unmap_section and map_fn_body to map_section.
5102 (lto_set_cu_context): Process functions and static inits
5103 differently.
5104 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5105 lto/lto-section-in.o): Update dependencies.
ab20d992 5106 * lto-elf.c (lto_elf_map_optional_lto_section): Add
d7f09764
DN
5107 lto_section_type parameter.
5108 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
ab20d992 5109 * lto.h (lto_file_vtable_struct): Removed two of the fields and
d7f09764
DN
5110 renamed the other two so that there is only one map function and
5111 one unmap function and each takes a section type parameter.
5112 (lto_read_function_body): Renamed to lto_input_function_body and
5113 added file_data parameter.
5114 (lto_read_var_init): Removed.
5115 (lto_input_constructors_and_inits): New function.
5116 * lto-section-in.c (lto_read_decls): New function.
5117 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5118 var_decls, type_decls, types to lto_file_decl_data.
5119 (input_type_ref, input_expr_operand, lto_read_body): Get
5120 field_decls, fn_decls, var_decls, type_decls, types from different
5121 structure.
5122 (input_globals, input_constructor, lto_read_var_init): Removed.
5123 (input_constructors_or_inits): New function.
5124 (lto_read_function_body, lto_input_constructors_and_inits):
5125 Renamed to lto_input_function_body and takes file_data parameter.
5126 * lto-section-in.h (lto_file_decl_data): New structure.
ab20d992 5127
3f8257db 51282008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5129
5130 * lto-function-in.c (input_globals.c): Changed input type to
5131 lto_function_header.
5132 (input_bb): Removed code to deserialize the stmt number.
5133 (input_function): Renumber all stmts after they are input.
5134 (lto_read_body, lto_read_function_body, lto_read_var_init):
5135 Changed to used new header format and enum section_type.
ab20d992
JJ
5136 *lto-lang.c (success): Removed.
5137
d7f09764
DN
51382008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5139
5140 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5141 (lto_elf_free_sym): Likewise.
5142
5143 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5144 (lto_elf_build_init): Likewise.
5145
3f8257db 51462008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5147
5148 * lto-read.c: Renamed to lto-function-in.c.
5149 (input_1_unsigned): Moved to lto-section-in.c and renamed
5150 lto_input_1_unsigned.
5151 (input_uleb128): Moved to lto-section-in.c and renamed
5152 lto_input_uleb128.
5153 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5154 lto_input_widest_uint_uleb128.
5155 (input_sleb128): Moved to lto-section-in.c and renamed
5156 lto_input_sleb128.
5157 (input_integer): Moved to lto-section-in.c and renamed
5158 lto_input_integer.
5159 (debug_in_fun): Moved to lto-section-in.c and renamed
5160 lto_debug_in_fun.
5161 (input_block): Moved to lto-section-in.h and renamed
5162 lto_input_block.
5163 (input_expr_operand): Fixed to allow lists with more than one
5164 element.
5165 * lto-section-in.h: New file.
5166 * lto-section-in.c: New file with changes from above.
5167 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5168 (lto-section-in.o): New rule.
ab20d992 5169
d7f09764
DN
51702007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5171
5172 * lto-read.c (input_expr_operand): Mark static and external
5173 VAR_DECLs as needed.
5174
51752007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5176
5177 * lto-read.c (input_integer): Use the correct shift amount.
5178
51792007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5180
5181 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5182 (LANG_HOOKS_NAME): Define.
5183
51842007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5185
5186 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5187 original function to...
5188 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5189 don't have a base type.
5190 (lto_read_enumeration_type_DIE): Examine the values of the
5191 enumeration to determine whether we can use an unsigned type for
5192 the base type of the enumeration.
5193
51942007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5195
5196 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5197 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5198
51992007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5200
5201 * lto-lang.c (lto_types_compatible_p): New function.
5202 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5203
52042007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5205 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5206
5207 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5208 (input_local_vars): Read in DECL_INITIAL and context for local
5209 statics that need to be put in unexpanded_vars_list.
5210
52112007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5212
5213 * lto-read.c (input_real): Use a separate null-terminated buffer
5214 for calling real_from_string.
5215 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5216 tell cgraph that it's needed.
5217
52182007-12-19 Doug Kwan <dougkwan@google.com>
5219
5220 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5221
52222007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5223
5224 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5225 (lto_file_read): Reset the members of 'context' every time we read
5226 a toplevel DIE, with special attention to last_param_type.
5227
52282007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5229
5230 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5231 'declaration'. Set the assembler name for non-public functions.
5232
3f8257db 52332007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5234
5235 * lto_read.c (data_in.unexpanded_indexes): New array.
5236 (input_local_var): Added code to read in unexpanded_var_list
5237 indexes for variables. Only read in DECL_CHAIN field for
5238 parameters.
5239 (input_local_vars): Added code to rebuild unexpanded_var_list in
5240 order using unexpanded_indexes.
5241 (input_function): Added code to set DECL_CONTEXT for functions.
5242
52432007-12-13 Doug Kwan <dougkwan@google.com>
5244
5245 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5246 in pointer and reference types.
5247
52482007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5249
5250 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5251 RESULT_DECL.
5252
52532007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5254
5255 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5256 already read the DIE.
5257 (lto_get_body): New function, split out from...
5258 (lto_materialize_function): ...here. Call it.
5259 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5260 determine DECL_EXTERNAL.
5261 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5262 FUNCTION_DECLs when necessary. Use the type of the actual
5263 function definition if we are unable to easily merge types. Ignore
5264 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5265 necessary.
5266
52672007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5268
5269 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5270
52712007-12-12 Bill Maddox <maddox@google.com>
5272
5273 Revert
5274 2007-12-07 Bill Maddox <maddox@google.com>
5275
5276 * lto.c (lto_str_fd_init): New function.
5277 (lto_str_fd_close): New function.
5278 (lto_file_init): Call lto_str_fd_init.
5279 (lto_file_close): Call lto_str_fd_close.
5280 (lto_str_read): New function. Read debug string table.
5281 (lto_str_lookup): New function. Get string for debug
5282 string table offset.
5283 (lto_read_form): Recognize DW_FORM_strp.
5284 (lto_file_read): Invoke lto_str_read.
5285
5286 * lto-elf.c (lto_elf_file_open): Read raw section data
5287 for the .debug_str section, if present.
5288
5289 * lto.h (struct lto_str_fd_struct): New struct.
5290 (struct lto_file_struct): Added new field DEBUG_STR
5291 to hold the file descriptor for the debug string table.
ab20d992 5292
d7f09764
DN
52932007-12-07 Bill Maddox <maddox@google.com>
5294
5295 * lto.c (lto_str_fd_init): New function.
5296 (lto_str_fd_close): New function.
5297 (lto_file_init): Call lto_str_fd_init.
5298 (lto_file_close): Call lto_str_fd_close.
5299 (lto_str_read): New function. Read debug string table.
5300 (lto_str_lookup): New function. Get string for debug
5301 string table offset.
5302 (lto_read_form): Recognize DW_FORM_strp.
5303 (lto_file_read): Invoke lto_str_read.
5304
5305 * lto-elf.c (lto_elf_file_open): Read raw section data
5306 for the .debug_str section, if present.
5307
5308 * lto.h (struct lto_str_fd_struct): New struct.
5309 (struct lto_file_struct): Added new field DEBUG_STR
5310 to hold the file descriptor for the debug string table.
5311
53122007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5313
5314 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5315 Grow the basic_block_info and label_to_block_map vectors if
5316 necessary. Read in the block chain.
5317
53182007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5319
5320 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5321
53222007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5323
5324 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5325
53262007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5327
5328 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5329 (lto_read_body): Don't declare PROP_alias.
5330
53312007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5332
5333 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5334 argument type information.
5335
53362007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5337
5338 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5339 TREE_THIS_VOLATILE if the associated type is a volatile type.
5340 (lto_materialize_function): Remove call to init_ssa_operands.
5341 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5342 variable when reading an SSA_NAME. Do the same when reading a
5343 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5344 (input_cfg): Call init_ssa_operands.
5345 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5346 Move call to init_tree_ssa...
5347 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5348 add_referenced_var on any variables referenced from the body of the
5349 function. Inform the rest of the compiler we are in SSA form and
5350 inform later passes about the current properties.
5351
53522007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5353
5354 * lto.c (lto_materialize_function): Add FIXME.
5355
53562007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5357
5358 * lto-lang.c (enum built_in_attribute): New enum.
5359 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5360 built_in_attributes): New variables.
5361 (def_builtin_1): New function.
5362 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5363
53642007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5365
5366 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5367 DECL_SOURCE_LOCATION for debugging purposes.
5368 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5369 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5370 laying out the decl until later.
5371 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5372 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5373 TREE_ADDRESSABLE.
5374 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5375 operand of an ADDR_EXPR.
5376 * lto-lang.c (enum lto_builtin_type): New enum.
5377 (builtin_type): New typedef.
5378 (builtin_types, string_type_node, const_string_type_node,
5379 wint_type_node, intmax_type_node, uintmax_type_node,
5380 signed_size_type_node): New variables.
5381 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5382 lto_build_c_type_nodes): New functions.
5383 (lto_init): Initialize builtin types.
5384 (lto_set_decl_assembler_name): Let the target machine mangle the
5385 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5386
53872007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5388
5389 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5390 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5391 the type is a constant type. Set the assembler name and inform
5392 the rest of the compiler about the new decl if the decl is not
5393 public.
5394 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5395 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5396 try to read in function bodies for functions that already have bodies.
5397 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5398 equivalency.
5399 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5400 Check for whether we matched a builtin function type before calling
5401 lto_same_type_p on the generated type. Permit cases where the
5402 declaration of an array is unbounded, but the definition is bounded.
5403 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5404 DECL_SIZE_UNIT if necessary.
5405
3f8257db 54062007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5407
ab20d992 5408 * lto-read.c (input_expr_operand): Get types right
d7f09764
DN
5409 for COMPLEX_CST.
5410
3f8257db 54112007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5412
5413 * lto-read.c (make_new_block, input_cfg): Properly set
5414 n_basic_blocks.
ab20d992 5415
d7f09764
DN
54162007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5417
5418 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5419 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5420
54212007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5422
5423 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5424 construct the integer type for bitfields.
5425
3f8257db 54262007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5427
5428 * lto-read.c (data_in.current_node_has_loc): Removed.
5429 (input_line_info): Returns true if node needs line set.
5430 (set_line_info): Always sets line if called.
5431 (clear_line_info): Removed reference to current_node_needs_loc.
5432 (input_expr_operand): Keeps track locally if current node needs a loc.
5433 (input_local_var): Added code to handle DECL_INITIAL for
5434 static local vars. Only set loc if necessary.
ab20d992 5435
d7f09764
DN
54362007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5437
5438 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5439 DECL_CONTEXT.
5440
54412007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5442
5443 * lto.c: Include langhooks.h.
5444 (lto_find_integral_type): Rework logic to handle the case where
5445 got_byte_size is true, but the bitsize requested and that of the
5446 base_type doesn't match.
5447 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5448 asm_name if we are creating a VAR_DECL.
5449 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5450 definition.
5451 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5452 function reference and use the builtin's decl if so. Set the
5453 DECL_CONTEXT of the RESULT_DECL for the function.
5454 * lto-lang.c (registered_builtin_fndecls): New variable.
5455 (lto_getdecls): Return it.
5456 (lto_builtin_function): Chain the new decl onto
5457 registered_builtin_fndecls.
5458
3f8257db 54592007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
ab20d992 5460
d7f09764
DN
5461 * lto-read.c (process_tree_flags, lto_static_init_local):
5462 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5463 (input_line_info, clear_line_info): Fixed new line number code.
5464 (input_expr_operand): Added type to SWITCH_EXPR.
5465 (lto_read_body): Properly initialized data_in.
5466 Clear line info when leaving.
ab20d992 5467
d7f09764
DN
54682007-11-13 Diego Novillo <dnovillo@google.com>
5469
5470 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5471 Initialize ARTIFICIAL.
5472 (lto_read_subroutine_type_subprogram_DIE): Initialize
5473 SAVED_SCOPE.
5474 * lto-read.c (set_line_info): Remove ; from calls to
5475 LINEMAP_POSITION_FOR_COLUMN.
5476
3f8257db 54772007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5478
5479 * lto-read.c (input_type_ref): Renamed from get_type_ref.
ab20d992 5480 (input_expr_operand, input_local_var): Renamed get_type_ref to
d7f09764 5481 input_type_ref.
ab20d992 5482 (input_expr_operand): Get the types correct for
d7f09764 5483 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
ab20d992 5484
d7f09764
DN
54852007-11-13 Doug Kwan <dougkwan@google.com>
5486
5487 * lto-read.c (input_widest_uint_uleb128): New function.
5488 (input_tree_flags, process_tree_flags, input_line_info,
5489 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5490 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5491 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5492 (lto_static_init_local): Add code to assert that lto_flags_type is
5493 wide enough.
5494
54952007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5496
5497 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5498 (lto_read_subroutine_type_subprogram_DIE): Handle
5499 DW_AT_static_link and DW_AT_specification. Return the
5500 specification if present.
5501 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
ab20d992 5502
d7f09764
DN
55032007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5504
5505 * lto-lang.c: Include target.h.
5506 (registered_builtin_types): New variable.
5507 (lto_type_for_mode): Increase number of modes handled.
5508 (lto_builtin_function): Fix argument list and return the decl.
5509 (lto_register_builtin_type): New function.
5510 (lto_init): Initialize target builtins and language-independent
5511 nodes.
5512 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5513
3f8257db 55142007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5515
5516 * lto-read.c (input_expr_operand): Added code to properly handle
5517 index filed. Added new RANGE_EXPR case.
ab20d992 5518
3f8257db 55192007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5520
5521 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5522 (data_in): Added current_node_has_loc field.
5523 (input_line_info, set_line_info, clear_line_info): Added a support
5524 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5525 did not have on on the source side.
5526 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5527 numbers too.
5528
55292007-11-09 Doug Kwan <dougkwan@google.com>
5530
5531 * lto-read.c (input_expr_operand): Change type of operand 2 of
5532 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5533
55342007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5535
5536 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5537 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5538 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5539 the new decl we are creating. Move informing the middle end about
5540 the new decl to...
5541 (lto_main): ...here. Inform the middle end about global variables
5542 after we have read in all the input files.
5543 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5544 variables with internal linkage, so delete the check for internal
5545 linkage. Combine TREE_PUBLIC flags.
5546
55472007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5548
5549 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5550 DW_AT_decl_line.
5551 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5552 builtin specially. Move check for attribute compatibility
5553 earlier.
5554
55552007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5556
5557 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5558 * config-lang.in (gtfiles): Add lto.h and lto.c.
5559 * lto-elf.c: Include ggc.h.
5560 (lto_elf_file_open): Allocate elf_file from GC memory.
5561 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5562 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5563 in GC memory.
5564 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5565 (lto_file_close): Free file from GC memory.
5566 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5567 (lto_read_member_DIE): Fix declaration.
5568 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5569 in GC memory.
5570 (current_lto_file): New variable.
5571 (lto_main): Use it.
5572 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5573 lto_die_cache_entry): Move to...
5574 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5575 declarations accordingly.
5576 (struct lto_file_struct): Declare.
5577 (lto_file_vtable): Use it instead of lto_file.
5578
ab20d992
JJ
55792007-11-06 Alon Dayan <alond@il.ibm.com>
5580 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5581
5582 * lto-read.c (process_flags, lto_static_init_local):
5583 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5584 change global array num_flags_for_code to flags_length_for_code.
5585 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
ab20d992 5586
d7f09764
DN
55872007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5588
5589 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5590 layout functions to compute information about the newly constructed
5591 type.
5592
55932007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5594
5595 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5596 case to use DECL_RESULT if necessary.
5597
3f8257db 55982007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5599
5600 * lto-read.c (input_tree_list): Removed.
5601 (input_tree_flags): Added parameter to force flags no matter what
5602 tree code.
5603 (input_expr_operand): Added parameter to input_tree_flags.
5604 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5605 input_expr_operand rather than input_tree_lists.
5606 (input_local_var): Use input_expr_operand to read attributes
5607 rather then input_tree_list.
5608 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5609
56102007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5611
5612 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5613 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5614 TYPE_DECL for it.
5615 * lto-read.c (lto_read_body): Use correct sizes for calculating
5616 type_decls_offset and types_offset.
5617
56182007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5619
5620 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5621 with GENERIC_NEXT.
5622 * config-lang.in (gtfiles): Add lto-lang.c.
5623 * lto-lang.c: Include gt-lto-lto-lang.h.
5624 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5625 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5626 (lto/lto-read.o): Likewise.
5627
3f8257db 56282007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5629
5630 * lto-read.c (data_in): Added type_decls and current_col fields.
5631 (string_slot): New type to hold canonized file name.
ab20d992 5632 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
d7f09764
DN
5633 input_line_info, set_line_info, clear_line_info): New functions.
5634 (file_name_hash_table): New hash table.
ab20d992 5635 (input_local_var, input_labels, input_local_vars_index,
d7f09764
DN
5636 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5637 (input_uleb128): Changed type of byte var.
5638 (input_expr_operand): Large number of changes to get line numbers
5639 correct. Added TYPE_DECL case.
5640 (input_globals): Added code to get TYPE_DECLs processed.
5641 (input_local_var): Added code to process line numbers and
5642 TREE_CHAIN and DECL_CONTEXT.
5643 (input_function, input_constructor): Added call to
5644 clear_line_number.
5645 (lto_static_init_local): Added code to get line numbers correct.
5646 (lto_read_body): Added code to get TYPE_DECLS read and to change
5647 parameters to the calls above that had their parms reorganized.
5648
d7f09764
DN
56492007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5650
5651 * lto.h (lto_resolve_typedecl_ref): Declare.
5652 * lto.c (lto_resolve_typedecl_ref): New function.
5653
56542007-10-29 Mark Mitchell <mark@codesourcery.com>
5655 Nathan Froyd <froydnj@codesourcery.com>
5656
5657 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5658 DIEs even if we find an abstract origin for this DIE.
5659
56602007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5661
5662 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5663 RESULT_DECL slightly earlier. Only remember the decl for later
5664 if we successfully merge declarations.
5665
3f8257db 56662007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5667
5668 * lto-read.c (input_expr_operand): Give label_values the proper
5669 context and provide switch statements with a default type.
ab20d992 5670
d7f09764
DN
56712007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5672
5673 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5674 * lto.c (lto_materialize_function): ...to here.
5675
56762007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5677
5678 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5679 * lto.c (lto_info_fd_init): Initialize it.
5680 (lto_info_fd_close): Free it.
5681 (lto_materialize_function): New function.
5682 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5683 unmaterialized_fndecls.
5684 (lto_file_read): Read in all the function bodies after we have read
5685 all of the DWARF info.
5686 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5687 reading a function body.
5688
3f8257db 56892007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5690
5691 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5692 semetric with output_tree_flags. Added call to log flags.
5693 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5694 type issues to make everything consistent with flags being
5695 unsigned HOST_WIDE_INTS.
5696 (input_expr_operand): Added call to
5697 recompute_tree_invariant_for_addr_expr.
5698 (input_local_var): Added debugging for tree_chains. Now calls
5699 input_tree_flags.
5700 (input_phi): Made flags unsigned HOST_WIDE_INT.
5701 (input_ssa_names): Now calls input_tree_flags.
5702 (lto_read_body): Now sets cfun.
5703 (lto_read_function_body): Now sets current_function_pointer.
ab20d992 5704
d7f09764
DN
57052007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5706
5707 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5708 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5709 inspecting fields within.
5710 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5711 handle this appropriately.
5712
57132007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5714
5715 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5716 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5717 both DW_AT_abstract_origin and DW_AT_specification.
5718 (lto_read_subroutine_type_subprogram_DIE): Handle
5719 DW_AT_abstract_origin.
5720 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5721 (lto_read_DIE_at_ptr): Define as static to match declaration.
5722 Lookup the PTR in the cache before reading it from the file.
5723 (lto_resolve_var_ref): Adjust accordingly.
5724 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5725 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5726
57272007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5728
5729 * lto.c (lto_read_DIE_at_ptr): New function.
5730 (lto_resolve_var_ref): Use it.
5731 (lto_resolve_fn_ref): Use it.
5732 (lto_resolve_field_ref): Use it.
5733 (lto_read_variable_formal_parameter_constant_DIE): Follow
5734 DW_AT_specification and return the associated decl when appropriate.
5735
57362007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5737
5738 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5739 Implement for scalar integer modes.
5740 (lto_init): Initialize size_type_node.
5741
3f8257db 57422007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5743
5744 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5745 (input_local_var): Add chaining for params.
5746 (input_ssa_names): Add cfun parameter.
5747 (input_function): Remove unnecessary else.
5748
57492007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5750
5751 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5752 (lto_resolve_var_ref): Use proper types.
5753 (lto_resolve_fn_ref): Likewise.
5754 (lto_resolve_field_ref): Likewise.
5755
57562007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5757
5758 * lto-read.c (input_expr_operand): Remove case.
5759
57602007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5761
5762 * lto.c (lto_read_only_for_child_DIEs): New function.
5763 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5764 * lto-elf.c (lto_elf_map_lto_section): Remove.
5765 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5766 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5767 SSA_NAME. Add missing case for mechanical codes.
5768 (input_cfg): Use basic_block_info_for_function instead of
5769 basic_block_info.
5770
3f8257db 57712007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5772
5773 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5774 (input_list): Renamed input_tree_list and modified to follow same
5775 protocol as lto-function-out.c:output_tree_list.
5776 (input_expr_operand): Make asm operands use input_tree_list.
5777 (input_local_var): Now uses input_tree_list.
5778 (lto_read_body): Change placement for setting context of debug_labels.
ab20d992 5779
3f8257db 57802007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5781
5782 * lto-read.c (input_real): Output debugging in proper order.
5783 (input_integer): Compute bit lengths properly.
5784 (input_list): Clean up declaration.
5785 (input_expr_operand): Change calls to input_real to match fix.
5786 Make reading of LTO_bit_field_ref1 match output.
5787 (input_local_var): Make reading of attributes match what is being
5788 written.
5789 (dump_debug_stream): Also print char in hex.
5790 (debug_out_fun): Fix signed unsigned mismatch.
ab20d992 5791
d7f09764
DN
57922007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5793
5794 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5795 DW_AT_GNU_vector specially, as they are not contiguous with the
5796 specified set of attribute names. Use class_mask to check for
5797 errors at the end of the function
5798 (lto_resolve_var_ref): Read the DIE if it is not cached.
5799 (lto_resolve_fn_ref): Likewise.
5800 (lto_resolve_field_ref): Likewise.
5801
58022007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5803
5804 * lto.c: Include dwarf2out.h.
5805 (lto_cache_store_DIE): Assert that we never change the value.
5806 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5807 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5808 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5809 sensible type instead.
5810 (lto_read_structure_union_class_type_DIE): Store the newly
5811 created type prior to reading the members of the structure to
5812 avoid infinite recursion. Avoid computing types and alignments
5813 for structures whose sizes are unknown.
5814 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5815 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5816 DW_AT_const_value, and DW_AT_specification.
5817 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5818 Return early if we have already constructed the function type.
5819 (lto_read_typedef_DIE): Check to see if the type has been cached
5820 already. Cache the type before reading any children.
5821 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5822 (lto_read_DIE): Unset context->skip_non_parameters around reading
5823 the DIE.
5824 (lto_resolve_fn_ref): Delete trailing whitespace.
5825
3f8257db 58262007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5827
5828 * lto-read.c (input_expr_operand): Added type for STRING_CST.
ab20d992 5829
d7f09764
DN
58302007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5831
5832 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5833
58342007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5835
5836 * lto-lang.c (signed_and_unsigned_types): New variable.
5837 (lto_type_for_size): Consult signed_and_unsigned_types to find
5838 an approprite type, creating it if necessary.
5839 (lto_set_decl_assembler_name): Add actual method body.
5840
58412007-09-06 Jim Blandy <jimb@codesourcery.com>
5842
5843 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5844 can't find a var init for this variable, leave its DECL_INITIAL.
5845 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5846 lto_elf_map_fn_body.
5847 (lto_map_lto_section): New function.
5848 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5849 bodies, and lto_elf_map_optional_lto_section for variable
5850 initializers.
5851 (lto_elf_find_section_data): Quietly return NULL if the section is
5852 missing.
5853 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5854
5855 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5856
5857 * lto-read.c (lto_read_body): Doc fix.
5858
3f8257db 58592007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5860
5861 * lto-read.c (fun_in): Renamed to data_in.
5862 (input_expr_operand, input_local_var, input_string_internal,
ab20d992 5863 input_string, input_real, input_list, get_label_decl,
d7f09764 5864 get_type_ref, input_expr_operand, input_globals, input_labels,
ab20d992 5865 input_local_vars_index, input_local_var, input_local_vars,
d7f09764
DN
5866 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5867 (input_constructor): New function.
5868 (lto_read_function_body): Renamed to lto_read_body and generalized
5869 to handle both functions and constructors.
5870 (lto_read_function_body, lto_read_var_init): New function.
ab20d992 5871
3f8257db 58722007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5873
5874 * lto-read.c (input_expr_operand): Assert that there really is a
5875 FUNCTION_DECL.
5876 (input_globals): Removed checks on 0 section.
ab20d992 5877
3f8257db 58782007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5879
5880 * lto-read.c (fun_in): Added local_decls_index and
ab20d992 5881 local_decls_index_d.
d7f09764
DN
5882 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5883 (input_globals): Enabled code to handle FIELD_DECLs.
5884 (input_local_vars_index, input_local_vars): New function.
5885 (input_local_var): Changed to allow locals to be input randomly.
5886 (lto_read_function_body): Added code to input the
5887 local_decls_index and to free various structures.
ab20d992 5888
d7f09764
DN
58892007-08-17 Jim Blandy <jimb@codesourcery.com>
5890
5891 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5892 ATTRIBUTE_UNUSED from 'die' formal.
5893
5894 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5895 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5896 (input_list): Fix type of 'tag'.
5897 (input_expr_operand): Fix type of 'tag' argument. Update
5898 declaration. Fix type of 'ctag'. Add default case to switch,
5899 since the type of the switched value is now an enum.
5900 (input_local_vars): Fix type of 'tag'.
5901 (input_bb): Fix type of 'tag' argument.
5902 (input_function): Fix type of 'tag' argument.
5903
59042007-08-16 Jim Blandy <jimb@codesourcery.com>
5905
5906 * lto.c (lto_read_member_DIE): Record the tree we create in
5907 fd->die_cache. (Our 'die' argument is no longer unused.)
5908 (lto_resolve_field_ref): New function.
5909 * lto.h (lto_resolve_field_ref): New declaration.
5910
59112007-08-15 Jim Blandy <jimb@codesourcery.com>
5912
5913 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5914
59152007-08-07 Jim Blandy <jimb@codesourcery.com>
5916
5917 * lto.c (lto_read_form): Complete attr_classes table.
5918 (DWARF2_form_data): Doc fix.
ab20d992 5919
d7f09764
DN
59202007-08-05 Mark Mitchell <mark@codesourcery.com>
5921
5922 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5923 and unmap_var_init.
5924 (lto_read_var_init): Declare.
5925 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5926 interface for reading variable initializers.
5927 * lto-elf.c (lto_elf_read_var_init): Remove.
5928 (lto_elf_file_vtable): Update initializer.
5929 (lto_elf_read_var_init): Add comment about unused-ness.
5930 * lto-read.c (lto_read_var_init): New.
5931
5932 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5933
3f8257db 59342007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5935
5936 * lto-read.c (lto_read_function_body): Moved declaration of fn
5937 outside of ifdef.
ab20d992 5938
3f8257db 59392007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5940
5941 * lto-read.c (input_uleb128, input_string_internal, input_real,
5942 input_integer, input_record_start, input_list, get_type_ref,
5943 input_flags, input_expr_operand, input_expr_operand,
5944 input_expr_operand, input_local_vars, input_cfg, input_phi,
5945 input_ssa_names, input_bb, input_function): Added semicolons.
5946
ab20d992 5947
3f8257db 59482007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5949
5950 * lto-read.c (input_globals): Remove debugging.
5951 (input_function): Set DECL_ARGUMENTS.
5952
3f8257db 59532007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5954
5955 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5956 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5957 (input_phi): Made work with operands other than SSA_NAMES and
5958 fixed processing of flags.
5959 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5960 (input_flags): New function.
5961 * lto-lang.c (lto_init): Changed state of in_lto_p.
ab20d992
JJ
5962
5963
d7f09764
DN
59642007-07-24 Mark Mitchell <mark@codesourcery.com>
5965
5966 * lto-tree.h (lto_varargs_cookie): Remove.
5967 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5968 skip_non_parameters, skip_parameters.
5969 (lto_varargs_cookie): Remove.
5970 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5971 parameter types.
5972 (lto_read_abbrev): New function.
5973 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5974 child DIEs.
5975 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5976 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5977 (lto_file_read): Initialize new context fields.
5978 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5979 (lto_unsigned_type): Remove.
5980 (lto_signed_type): Likewise.
5981 (lto_signed_or_unsigned_type): Likewise.
5982 (lto_init): Do not create lto_varargs_cookie.
5983 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5984 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5985 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5986
59872007-07-19 Jan Hubicka <jh@suse.cz>
5988
5989 * lto-read.c (lto_read_function_body): Produce empty scope block
5990 to avoid crash.
5991
59922007-07-18 Mark Mitchell <mark@codesourcery.com>
5993
5994 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5995 process local variables.
5996 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5997
3f8257db 59982007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5999
6000 * lto-read.c (input_list, input_expr_operand): Added struct
6001 function parameter.
6002 (init_cfg, finalize_cfg): Removed function.
6003 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
6004 (input_labels, input_local_vars): Now takes input_block parameter rather than
6005 synthsyzing it.
6006 (input_cfg, input_phi, input_ssa_names): New functions.
6007 (input_bb): Now passes in input_blocks. Does not construct cfg
6008 and processes the list of phi functions.
6009 (input_function): Now builds both the cfg and ssa_names table.
6010 (lto_read_function_body): Processes new header fields to construct
6011 streams for the ssa_names and cfg and their debugging.
ab20d992
JJ
6012 * lto-lang.c (lto_init): Set in_lto_p.
6013
6014
d7f09764
DN
60152007-06-28 Mark Mitchell <mark@codesourcery.com>
6016
6017 * lto.h (lto_file_vtable): Add read_var_init.
6018 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
6019 initializers.
6020 (lto_main): Remove bogus asserts.
6021 * lto-elf.c (tm.h): Include it.
6022 (libiberty.y): Likewise.
6023 (lto_elf_file): Add strtab and symtab. Rename
6024 string_table_section_index to sec_strtab.
6025 (lto_elf_file_vtable): Add lto_elf_read_var_init.
6026 (lto_elf_get_shdr): New function.
6027 (lto_elf_free_shdr): Likewise.
6028 (lto_elf_find_section_data): Use them.
6029 (lto_elf_read_symtab): New function.
6030 (lto_elf_lookup_sym): Likewise.
6031 (lto_elf_free_sym): Likewise.
6032 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
6033 (lto_elf_built_init): New function.
6034 (lto_elf_read_var_init): Likewise.
6035 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
6036
3f8257db 60372007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6038
6039 * lto-read (make_new_block): Initialize the stmt_list.
6040 (lto_static_init_local): Add debugging for missing codes.
ab20d992 6041
d7f09764
DN
60422007-06-26 Mark Mitchell <mark@codesourcery.com>
6043
6044 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
ab20d992 6045 unprototyped functions.
d7f09764
DN
6046
60472007-06-23 Mark Mitchell <mark@codesourcery.com>
6048
6049 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
6050 Handle DW_AT_MIPS_linkage_name.
6051 (lto_read_subroutine_type_subprogram): Likewise. Correct
6052 compilation errors.
6053 (lto_main): Remove incorrect assertions.
6054 * lto-symbtab.c: Build function types out of TREE_LISTs.
6055
6056 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
ab20d992 6057
d7f09764 6058 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
ab20d992 6059
3f8257db 60602007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6061
ab20d992 6062 * lto-tree.h (lang_decl, lang_type, language_function): Added
d7f09764 6063 dummy since ggc does not like empty structs.
ab20d992
JJ
6064 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6065 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
d7f09764
DN
6066 expr->common to expr->base.
6067 (make_new_block): Moved stmt_list to proper place.
6068
ab20d992 60692007-03-14 Robert Kennedy <jimbob@google.com>
d7f09764
DN
6070
6071 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6072 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6073 assembler name from DWARF.
6074 * lto-lang.c (lto_set_decl_assembler_name) New function.
6075
60762006-09-10 Mark Mitchell <mark@codesourcery.com>
6077
6078 * lto.h (lto_file_vtable): New structure.
6079 (lto_file): Add vtable pointer.
6080 (lto_file_init): Add vtable paramter.
6081 (lto_read_function_body): New function.
6082 (lto_symtab_merge_fn): New function.
6083 * lto.c (lto_file_init): Add vtable parameter.
6084 (lto_read_form): Fill in entries for DW_AT_prototyped,
6085 DW_AT_frame_base.
6086 (lto_read_subroutine_type_subprogram_DIE): New function.
6087 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6088 DW_TAG_subprogram.
6089 * lto-elf.c (lto_elf_vile_vtable): New variable.
6090 (lto_elf_file_open): Pass it to lto_file_init.
6091 (lto_elf_map_fn_body): New function.
6092 (lto_elf_unmap_fn_body): Likewise.
6093 * lto-read.c: New file.
6094 * lto-symtab.c (lto_symtab_merge_fn): New function.
6095 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6096 tree_rest_of_compilation.
6097 * Make-lang.in (LTO_OBJS): Add lto-read.o
6098 (lto-read.o): New target.
6099
61002006-09-03 Mark Mitchell <mark@codesourcery.com>
6101
6102 * lto.c (<inttypes.h>): Don't include it.
6103 (lto_context): Don't typedef it.
6104 (lto_resolve_reference): New function.
6105 (lto_read_form): Use it.
6106 (lto_resolve_type_ref): New function.
6107 (lto_resolve_var_ref): Likewise.
6108 (lto_resolve_fn_ref): Likewise.
6109 * lto.h (<inttypes.h>): Include it.
6110 (lto_context): New type.
6111 (lto_ref): New structure.
6112 (lto_resolve_type_ref): Declare.
6113 (lto_resolve_var_ref): Likewise.
6114 (lto_resolve_fn_ref): Likewise.
6115
61162006-08-18 Mark Mitchell <mark@codesourcery.com>
6117
6118 * lang-specs.h: New file.
6119
61202006-08-14 Mark Mitchell <mark@codesourcery.com>
6121
6122 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6123 (lto_info_fd_close): Deallocate it.
6124 (lto_die_cache_entry): New structure.
6125 (lto_cache_hash): New function.
6126 (lto_cache_eq): Likewise.
6127 (lto_cache_store_DIE): Likewise.
6128 (lto_cache_lookup_DIE): Likewise.
6129 (lto_read_referenced_type_DIE): Use the cache.
6130 (lto_read_pointer_type_DIE): Robustify.
6131 (lto_read_DIE): Use the cache.
6132 * lto.h (hashtab.h): Include.
6133 (lto_info_fd): Add DIE cache.
6134 * Make-lang.in (LTO_H): New variable.
6135 (lto/lto-lang.o): Use LTO_H.
6136 (lto/lto-elf.o): Likewise.
6137 (lto/lto-symtab.o): Likewise.
6138
61392006-07-09 Mark Mitchell <mark@codesourcery.com>
6140
6141 * lto.c (lto_abi_mismatch_error): New function.
6142 (lto_abbrev_read): Initialize num_abbrevs.
6143 (lto_read_form): Specify allowed form classes for
6144 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6145 (lto_read_variable_formal_parameter_constant_DIE): Handle
6146 DW_AT_declaration. Call lto_symtab_merge_var.
6147 (lto_read_pointer_type_DIE): New function.
6148 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6149 not creat TYPE_DECLs for types that already have them.
6150 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6151 (lto_set_cu_context): Make cu_start point to the header, not the
6152 first DIE.
6153 (lto_file_read): Adjust for change to lto_set_cu_context.
6154 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6155 (lto/lto-symtab.o): New rule.
6156 * lto-tree.h (lang_identifier): Add decl field.
6157 (LANG_IDENTIFIER_CAST): New macro.
6158 (LTO_IDENTIFIER_DECL): Likewise.
6159 (lto_symtab_merge_var): Declare.
6160 * lto-symtab.c: New file.
6161
61622006-07-02 Daniel Berlin <dberlin@dberlin.org>
6163
6164 * lto.c (lto_context): Add current_cu and info_fd members.
6165 (DWARF2_CompUnit): New structure.
6166 (lto_read_DIE): Take lto_info_fd *.
6167 (lto_read_child_DIEs): Ditto.
6168 (lto_file_corrupt_error): Constify argument.
6169 (lto_set_cu_context): New function
6170 (lto_info_fd_init): Ditto.
6171 (lto_info_fd_close): Ditto.
6172 (lto_file_init): Use lto_info_fd_init.
6173 (lto_file_close): Use lto_info_fd_close.
6174 (lto_read_initial_length): Pass in pointer to header size.
6175 (lto_read_comp_unit_header): Correct cu_length to
6176 real length from beginning of header. Take lto_info_fd * as
6177 argument.
6178 (find_cu_for_offset): New function.
6179 (lto_read_form): Change first argument to lto_info_fd *.
6180 Add FORM_CONTEXT argument.
6181 Handle DW_FORM_ref_addr.
ab20d992 6182 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
d7f09764
DN
6183 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6184 Swap contexts if necessary for form.
6185 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6186 lto_file_corrupt_error.
6187 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6188 (lto_read_referenced_type_DIE): Change first argument to
6189 lto_info_fd *. Access lto_fd fields through base pointer.
6190 (lto_read_compile_unit_DIE): Change first argument to an
6191 lto_info_fd *.
6192 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6193 (lto_read_base_type_DIE): Ditto.
6194 (lto_read_child_DIEs): Ditto.
6195 (lto_read_DIE): Ditto. Change type of function pointer.
6196 (lto_info_read): New function.
6197 (lto_set_cu_context): Ditto.
6198 (lto_file_read): Use lto_info_read, walk resulting CU's
6199 (lto_main): Update for lto_info_fd change.
6200 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6201 necessary.
6202 * lto.h (DWARF2_CompUnit): New structure.
6203 (lto_info_fd): Ditto.
6204 (lto_file): Change debug_info to be an lto_info_fd.
ab20d992 6205
d7f09764
DN
62062006-06-25 Mark Mitchell <mark@codesourcery.com>
6207
6208 * lto.c (toplev.h): Include it.
6209 (dwarf2.h): Likewise.
6210 (tree.h): Likewise.
6211 (tm.h): Likewise.
6212 (cgraph.h): Likewise.
6213 (ggc.h): Likewise.
6214 (inttypes.h): Likewise.
6215 (DWARF2_attr): New type.
6216 (DWARF2_abbrev): Likewise.
6217 (DWARF2_class): Likewise.
6218 (DWARF2_form_data): Likewise.
6219 (lto_context): Likewise.
6220 (lto_fd_init): New function.
6221 (lto_abbrev_fd_init): Likewise.
6222 (lto_abbrev_fd_close): Likewise.
6223 (lto_file_init): Use them.
6224 (lto_file_close): New function.
6225 (lto_file_corrupt_error): Likewise.
6226 (LTO_CHECK_INT_VAL): New macro.
6227 (lto_check_size_t_val): New function.
6228 (lto_check_int_val): Likewise.
6229 (LTO_READ_TYPE): New macro.
6230 (lto_read_ubyte): New function.
6231 (lto_read_uhalf): Likewise.
6232 (lto_read_uword): Likewise.
6233 (lto_read_uleb128): Likewise.
6234 (lto_read_initial_length): Likewise.
6235 (lto_abbrev_read_attrs): Likewise.
6236 (lto_abbrev_read): Likewise.
6237 (lto_abbrev_lookup): Likewise.
6238 (lto_read_section_offset): Likewise.
6239 (lto_read_comp_unit_header): Likewise.
6240 (lto_read_form): Likewise.
6241 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6242 (LTO_BEGIN_READ_ATTRS): Likewise.
6243 (LTO_END_READ_ATTRS): Likewise.
6244 (lto_unsupported_attr_error): New function.
6245 (lto_get_identifier): Likewise.
6246 (lto_read_referenced_type_DIE): Likewise.
6247 (lto_read_compile_unit_DIE): Likewise.
6248 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6249 (lto_read_base_type_DIE): Likewise.
6250 (lto_read_DIE): Likewise.
6251 (lto_read_child_DIEs): Likewise.
6252 (lto_file_read): Read DIEs.
6253 (lto_main): Ask middle end to emit entities.
6254 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6255 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6256 (lto_elf_file_close): Likewise.
6257 * lto.h (lto_file): Declare.
6258 (DWARF2_abbrev): Likewise.
6259 (lto_fd): New type.
6260 (lto_abbrev_fd): Likewise.
6261 (lto_file): Use new types.
6262 (lto_file_close): Declare.
6263 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
ab20d992 6264
d7f09764
DN
62652006-06-18 Mark Mitchell <mark@codesourcery.com>
6266
6267 * lto.h: New file.
6268 * lto.c: New file.
6269 * lto-elf.c: New file.
6270 * lto-lang.c (flags.h): Include it.
6271 (lto.h): Likewise.
6272 (lto_init): New function.
6273 (lto_write_globals): Remove.
ab20d992 6274 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
d7f09764
DN
6275 (LANG_HOOKS_INIT): Define.
6276 (LANG_HOOKS_PARSE_FILE): Likewise.
6277 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6278 (LTO_EXE): Link with libelf.
6279 (lto/lto-lang.o): Update dependencies.
6280 (lto/lto.o): New target.
6281 (lto/lto-elf.o): Likewise.
6282
62832006-06-12 Mark Mitchell <mark@codesourcery.com>
6284
6285 * config-lang.in: New file.
6286 * Make-lang.in: Likewise.
6287 * lto-tree.h: Likewise.
6288 * lto-lang.c: Likewise.
818ab71a 6289\f
a5544970 6290Copyright (C) 2006-2019 Free Software Foundation, Inc.
d7f09764 6291
818ab71a
JJ
6292Copying and distribution of this file, with or without modification,
6293are permitted in any medium without royalty provided the copyright
6294notice and this notice are preserved.
This page took 5.76834 seconds and 5 git commands to generate.