]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
Move Leak in GCC memory report to the first column.
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
c5281d50
ML
12019-10-29 Martin Liska <mliska@suse.cz>
2
3 * lto.c (do_whole_program_analysis): Remove argument.
4
f658ad30
JH
52019-10-24 Jan Hubicka <hubicka@ucw.cz>
6
7 * lto-partition.c (add_symbol_to_partition_1): Update.
8 (undo_parittion): Update.
9
ebad2eee
JH
102019-10-23 Jan Hubicka <hubicka@ucw.cz>
11
12 * lto-common.c (lto_file_finalize): Add order attribute.
13 (lto_create_files_from_ids): Pass order.
14 (lto_file_read): UPdate call of lto_create_files_from_ids.
15
7cc47709
JH
162019-10-12 Jan Hubicka <hubicka@ucw.cz>
17
18 * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
19 summary streaming.
20
f8cf94cd
JH
212019-10-12 Jan Hubicka <hubicka@ucw.cz>
22
23 * lto.c (lto_wpa_write_files): Do not update bodies of clones.
24
e5207f1a
JH
252019-10-11 Jan Hubicka <hubicka@ucw.cz>
26
27 * lto.c (lto_wpa_write_files): Call ggc_trim.
28
1fcf52a6
JH
292019-10-11 Jan Hubicka <hubicka@ucw.cz>
30
31 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
32
9142736e
RB
332019-10-10 Richard Biener <rguenther@suse.de>
34
35 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
36
0fa00483
JM
372019-10-04 Joseph Myers <joseph@codesourcery.com>
38
39 * lto-lang.c (flag_isoc2x): New variable.
40
a3d09469
RB
412019-09-18 Richard Biener <rguenther@suse.de>
42
43 PR lto/91763
44 * lto.c (lto_materialize_function): Initialize EH by looking
45 at the function personality and flag_exceptions setting.
46
df375b03
JJ
472019-08-23 Jakub Jelinek <jakub@redhat.com>
48
49 PR middle-end/91283
50 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
51 flag_excess_precision_cmdline. Remove comment.
52
4d732405
RS
532019-08-13 Richard Sandiford <richard.sandiford@arm.com>
54
55 PR middle-end/91421
56 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
57 instead of DECL_FUNCTION_CODE.
58 * lto-symtab.c (lto_symtab_merge_p): Likewise.
59
6e42c90c
BE
602019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
61
62 * Make-lang.in (lto.install-common): Remove unnecessary slash
63 between $(DESTDIR) and $(bindir).
64
cb50701e
ML
652019-07-25 Martin Liska <mliska@suse.cz>
66
67 * lto-common.c (compare_tree_sccs_1): Use new macros
68 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
69
34e64622
GB
702019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
71
72 * lang.opt (flag_dump_callgraph): New flag.
73 * lto-dump.c (dump_symtab_graphviz): New function.
74 (dump_tool_help): New option.
75 (lto_main): Handle graphviz dumping.
76
b01659aa
JH
772019-07-18 Jan Hubicka <hubicka@ucw.cz>
78
79 * lto-common.c (gimple_register_canonical_type_1): Do not look for
80 non-ODR conflicts of types in anonymous namespaces.
81 (unify_scc): Do not merge anonymous namespace types.
82
99b1c316
MS
832019-07-09 Martin Sebor <msebor@redhat.com>
84
85 PR c++/61339
86 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
87 to struct and others to class.
88 (mentions_vars_p): Same.
89 (register_resolution): Same.
90 (lto_register_var_decl_in_symtab): Same.
91 (lto_register_function_decl_in_symtab): Same.
92 (cmp_tree): Same.
93 (lto_read_decls): Same.
94
6c1dae73
MS
952019-07-09 Martin Sebor <msebor@redhat.com>
96
97 PR c++/61339
98 * lto-dump.c: Change class-key from class to struct and vice versa
99 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
100
70980ea2
ML
1012019-07-04 Martin Liska <mliska@suse.cz>
102
103 PR lto/91078
104 * lto-common.c (lto_file_finalize): Use memcpy to set
105 file_data->lto_section_header.
106
88614dfa
ML
1072019-07-03 Martin Liska <mliska@suse.cz>
108
109 * lto-common.c: Read LTO section and verify header.
110
606a9a8c
JH
1112019-06-27 Jan Hubicka <jh@suse.cz>
112
113 * lto-common.c (lto_register_canonical_types_for_odr_types):
114 Copy CXX_ODR_P from the main variant.
115
85693eef
JH
1162019-06-27 Jan Hubicka <jh@suse.cz>
117
118 * lto-common.c: tree-pretty-print.h
119 (type_streaming_finished): New static var.
120 (gimple_register_canonical_type_1): Return updated hash; handle ODR
121 types.
122 (iterative_hash_canonical_type): Update use of
123 gimple_register_canonical_type_1.
124
c2f7a665
ML
1252019-06-27 Martin Liska <mliska@suse.cz>
126
127 * lto-dump.c (struct symbol_entry): Add default dtor.
128 (struct variable_entry): Likewise.
129 (struct function_entry): Likewise.
130 (dump_list_functions): Release memory.
131 (dump_list_variables): Likewise.
132
ab20d992
JJ
1332019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
134
135 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
136 format of "__intN" types for SIZE_TYPE.
137
f4af4019
JH
1382019-06-24 Jan Hubicka <jh@suse.cz>
139
140 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
141 compare STRING_FLAG only for arrays and integers.
142
0ecf545c
MS
1432019-06-05 Martin Sebor <msebor@redhat.com>
144
145 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
146
a9c697b8
MS
1472019-05-16 Martin Sebor <msebor@redhat.com>
148
ab20d992
JJ
149 * lto-dump.c (lto_main): Same.
150 * lto.c (stream_out): Same.
a9c697b8 151
38613b9b
ML
1522019-05-10 Martin Liska <mliska@suse.cz>
153
154 * Make-lang.in: Use program_transform_name for lto-dump.
155 * config-lang.in: Do not mark lto-dump compiler as we don't
156 want to have it installed at
157 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
158
03de2955
RO
1592019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
160
161 * lto-common.c (lto_file_read): Print section->start as int64_t,
162 section->len as uint64_t.
163 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
164
ee7a003f
ML
1652019-05-06 Martin Liska <mliska@suse.cz>
166
167 * lto-common.c: Update coding style.
168 * lto.c (materialize_cgraph): Likewise.
169
66d62d9f
HK
1702019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
171 Martin Liska <mliska@suse.cz>
172
173 * Make-lang.in: Add lto_dump-related definition.
174 * config-lang.in: Likewise.
175 * lang.opt: Add new language LTODump and options related
176 to LTO dump tool.
177 * lto-common.c (lto_read_decls): Support type statistics dump.
178 (lto_file_read): Likewise for object files.
179 * lto-dump.c: New file.
180 * lto-lang.c (lto_option_lang_mask): Move from ..
181 * lto.c (lto_option_lang_mask): .. here.
182 * lto.h (lto_option_lang_mask): New declaration.
183
a79420f9
ML
1842019-05-06 Martin Liska <mliska@suse.cz>
185 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
186
187 * Make-lang.in: Add lto-common.o.
188 * config-lang.in: Likewise for gtfiles.
189 * lto-common.c: New file.
190 * lto-common.h: New file.
191 * lto-lang.c: Include lto-common.h.
192 * lto.c: Move most of the functionality
193 into lto-common.c file.
194
0c7f51e4
JH
1952019-04-12 Jan Hubicka <hubicka@ucw.cz>
196
197 * lto.c (do_stream_out): rename to ...
198 (stream_out): ... this one; move original code to ...
199 (stream_out_partitions_1, stream_out_partitions): ... these new
200 functions.
201 (lto_wpa_write_files): Honnor lto_parallelism
202
303389b1
ML
2032019-03-26 Martin Liska <mliska@suse.cz>
204
205 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 206 wrapping.
303389b1 207
a3f9f006
ML
2082019-03-11 Martin Liska <mliska@suse.cz>
209
210 * lto-lang.c (lto_post_options): Wrap an option name
211 in a string format message and fix GNU coding style.
212 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
213
04e5c73d
JJ
2142019-03-09 Jakub Jelinek <jakub@redhat.com>
215
216 PR target/79645
217 * lang.opt: Terminate description text with a dot.
218
80f52b40
JM
2192019-02-28 Jason Merrill <jason@redhat.com>
220
221 PR c++/88049 - ICE with undefined destructor and anon namespace.
222 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
223 for a type in an anonymous namespace.
224
67914693
SL
2252019-01-09 Sandra Loosemore <sandra@codesourcery.com>
226
227 PR other/16615
228
229 * lto-partition.c: Mechanically replace "can not" with "cannot".
230 * lto-symtab.c: Likewise.
231 * lto.c: Likewise.
232
a5544970
JJ
2332019-01-01 Jakub Jelinek <jakub@redhat.com>
234
235 Update copyright years.
236
d840d7a2
JH
2372018-12-24 Jan Hubicka <hubicka@ucw.cz>
238
239 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
240 for method whose basetype was already reported.
241
ed1b53a0
MP
2422018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
243
244 Minimize clone counter memory usage in LTO.
245 * lto-partition.c (privatize_symbol_name_1): Keep track of
246 non-unique symbol counters in the lto_clone_numbers hash
247 map.
248 (lto_promote_cross_file_statics): Allocate and free the
249 lto_clone_numbers hash map.
250 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
251 map.
252
ad42aa96
JH
2532018-11-28 Jan Hubicka <jh@suse.cz>
254
255 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
256
d7dce787
JH
2572018-11-22 Jan Hubicka <jh@suse.cz>
258
259 * lto.c (cmp_type_location): Remove.
260 (lto_read_decls): Do not allocate odr_types.
261
f615cb16
ML
2622018-11-19 Martin Liska <mliska@suse.cz>
263
264 PR lto/88077
265 * lto-symtab.c (lto_symtab_merge): Transform the
266 condition before r256989.
267
12eac232
ML
2682018-11-16 Martin Liska <mliska@suse.cz>
269
270 PR lto/88004
271 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
272 lto_symtab_symbol_p as it does checking of transparent alias.
273 These needs to be also merged in the function.
274
7958186b
MP
2752018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
276
277 * lto-partition.c (privatize_symbol_name_1): Use
278 clone_function_name_numbered.
279
abb967da
JH
2802018-10-26 Jan Hubicka <jh@suse.cz>
281
ab20d992 282 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
abb967da 283
033eb567
DM
2842018-10-17 David Malcolm <dmalcolm@redhat.com>
285
286 * Make-lang.in (selftest-lto): New.
287
9ed6dbee
ML
2882018-08-29 Martin Liska <mliska@suse.cz>
289
290 PR bootstrap/87130
291 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
292 to behavior before r263887.
293
3d78e008
ML
2942018-08-27 Martin Liska <mliska@suse.cz>
295
296 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
297 fndecl_built_in_p and remove check for FUNCTION_DECL if
298 possible.
3d78e008
ML
299 * lto-symtab.c (lto_symtab_merge_p): Likewise.
300 (lto_symtab_merge_decls_1): Likewise.
301 (lto_symtab_merge_symbols): Likewise.
302 * lto.c (lto_maybe_register_decl): Likewise.
303 (read_cgraph_and_symbols): Likewise.
304
efd9eb29
TV
3052018-08-21 Tom de Vries <tdevries@suse.de>
306
ab20d992 307 * lto.c (lto_main): Call debuginfo_early_start and
efd9eb29
TV
308 debuginfo_early_stop.
309
00abf86c
MS
3102018-07-20 Martin Sebor <msebor@redhat.com>
311
312 PR middle-end/82063
313 * lto-lang.c (lto_handle_option): Change function argument
314 to HOST_WIDE_INT.
315
efe0e6cd
RB
3162018-07-20 Richard Biener <rguenther@suse.de>
317
318 PR debug/86585
319 * lto.c (unify_scc): Before we throw away an SCC see if we
320 can amend prevailing single-entry SCC with debug refs.
321
814f3331
JH
3222018-07-13 Jan Hubicka <hubicka@ucw.cz>
323
324 * lto.c (do_stream_out): Add PART parameter; open dump file.
325 (stream_out): Add PART parameter; pass it to do_stream_out.
326 (lto_wpa_write_files): Update call of stream_out.
327
c518c102
ML
3282018-07-04 Martin Liska <mliska@suse.cz>
329
330 PR middle-end/66240
331 PR target/45996
332 PR c/84100
333 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
334 instead of memcmp.
335
b54006ae
ML
3362018-06-20 Martin Liska <mliska@suse.cz>
337
338 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 339 FIXME comment.
b54006ae 340
56f62793
ML
3412018-06-19 Martin Liska <mliska@suse.cz>
342
343 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 344 of get_create.
56f62793
ML
345 (undo_partition): Likewise.
346 (lto_balanced_map): Likewise.
347
1724941e
ML
3482018-06-19 Martin Liska <mliska@suse.cz>
349
350 * config-lang.in: Remove stagestuff.
351
29a50dfb
JH
3522018-06-08 Jan Hubicka <hubicka@ucw.cz>
353
354 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
355 New global vars.
356 (lto_register_dumps): New hook.
357 (LANG_HOOKS_REGISTER_DUMPS): New.
358 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
359 * lto-symtab.c: Include lto.h; dump into dump_file instead of
360 symtab->dump_file.
361 (lto_symtab_merge_decls): Initialize dump file.
362 * lto.c (read_cgraph_and_symbols): Initialize dump file.
363 (do_whole_program_analysis): Likewise.
364
74644756
ML
3652018-06-08 Martin Liska <mliska@suse.cz>
366
367 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
368 instead of summary_uid.
369
99353fcf
ML
3702018-06-08 Martin Liska <mliska@suse.cz>
371
372 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
373 of get.
374 (undo_partition): Likewise.
375 (lto_balanced_map): Likewise.
376
31db0fe0
ML
3772018-06-08 Martin Liska <mliska@suse.cz>
378
379 * lto-partition.c (add_references_to_partition): Remove support
380 for MPX (macros, related functions, fields in cgraph_node, ...).
381 (add_symbol_to_partition_1): Likewise.
382 (privatize_symbol_name): Likewise.
383 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
384
f115c9b5
RB
3852018-06-05 Richard Biener <rguenther@suse.de>
386
387 * lto.c (cmp_type_location): Expand locations only once.
388
5b42d196
JH
3892018-05-30 Jan Hubicka <hubicka@ucw.cz>
390
391 * lang.opt (lto_linker_output): Add nolto-rel.
392 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
393 and LTO_LINKER_OUTPUT_NOLTOREL.
394 (lto_init): Generate lto when doing incremental link.
395 * lto.c (lto_precess_name): Add lto1-inclink.
396
ab168044
JH
3972018-05-18 Jan Hubicka <jh@suse.cz>
398
399 PR lto/85583
400 * lto-partition.c (account_reference_p): Do not account
401 references from aliases; do not account refernces from
402 external initializers.
403
b6e33d73
JH
4042018-04-30 Jan Hubicka <jh@suse.cz>
405
406 * lto.c (cmp_partitions_size): Remove.
407 (lto_wpa_write_files): Also output priorities; do not sort partitions.
408 (cmp_partition_order): Move to ...
409 * lto-partition.c (cmp_partition_order): ...
410 (lto_1_to_1_map): Sort partitions.
411
e693ebce
JH
4122018-04-20 Jan Hubicka <jh@suse.cz>
413
414 * lto-partition.c (lto_balanced_map): Fix sanity check.
415
ddb0b824
JH
4162018-04-19 Jan Hubicka <jh@suse.cz>
417
418 * lto-partition.c: Include sreal.h
419 (add_symbol_to_partition_1): Use size instead of self_size
420 for size estimate.
421 (account_reference_p): New.
422 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
423 fix accounting errors in boundary size; add debug output; combine cost
424 as cost/size instead of cost/internal; reduce the partitioning error to
425 +- 1/8 of the parttion size.
426
1781a04f
ML
4272018-04-19 Martin Liska <mliska@suse.cz>
428
429 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
430 for multiple PREVAILING_DEF_IRONLY for common symbols.
431
6867cd69
ML
4322018-04-18 Martin Liska <mliska@suse.cz>
433
434 * lto.c (lto_read_decls): Fix GNU coding style and typos.
435
af597536
ML
4362018-04-18 Martin Liska <mliska@suse.cz>
437
438 PR ipa/83983
439 PR ipa/85391
440 * lto.c (cmp_type_location): New function.
441 (lto_read_decls): First collect all types, then
442 sort them according by location before register_odr_type
443 is called.
444
7d6051b1
JH
4452018-04-18 Jan Hubicka <jh@suse.cz>
446 Martin Liska <mliska@suse.cz>
447
448 PR lto/85391
449 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
450 types.
451
23d87577
ML
4522018-04-11 Martin Liska <mliska@suse.cz>
453
454 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
455 function.
456
c16833dc
ML
4572018-04-10 Martin Liska <mliska@suse.cz>
458
459 PR lto/85248
460 * lto-symtab.c (lto_symtab_merge_p): Do not check for
461 TREE_VALUES of error attributes.
462
8d96e546
ML
4632018-04-10 Richard Biener <rguenther@suse.de>
464 Martin Liska <mliska@suse.cz>
465
466 PR lto/85248
467 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
468
97bb4812
JH
4692018-02-08 Jan Hubicka <hubicka@ucw.cz>
470
471 * lto-partition.c (lto_balanced_map): Watch overflow.
472
39aa9b23
JH
4732018-02-08 Jan Hubicka <hubicka@ucw.cz>
474
475 PR ipa/81360
476 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
477 (read_cgraph_and_symbols): Use
478 symtab_node::output_to_lto_symbol_table_p.
479
26a823f0
JH
4802018-01-30 Jan Hubicka <hubicka@ucw.cz>
481
482 * lto.c (register_resolution): Remove forgotten sanity check.
483
43fbc2e9
JH
4842018-01-30 Jan Hubicka <hubicka@ucw.cz>
485
486 PR lto/81004
487 * lto.c: Include builtins.h
488 (register_resolution): Merge resolutions in case trees was
489 merged across units.
490 (lto_maybe_register_decl): Break out from ...
491 (lto_read_decls): ... here.
492 (unify_scc): Also register decls here.
493 (read_cgraph_and_symbols): Sanity check that all resolutions was
494 read.
495
ee034d31
EB
4962018-02-02 Eric Botcazou <ebotcazou@adacore.com>
497
498 PR lto/83954
499 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
500 component type of array types with non-aliased component.
501
44c945e6
JH
5022018-01-30 Jan Hubicka <hubicka@ucw.cz>
503
504 PR lto/83954
505 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
506 for type match warning on arrays of pointers.
507
cde9b2f8
ML
5082018-01-23 Martin Liska <mliska@suse.cz>
509
510 PR lto/81440
511 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
512 trailing arrays at the end of a struct.
513
5c0caeb3
RS
5142018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
515 Alan Hayward <alan.hayward@arm.com>
516 David Sherwood <david.sherwood@arm.com>
517
518 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
519
928686b1
RS
5202018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
521 Alan Hayward <alan.hayward@arm.com>
522 David Sherwood <david.sherwood@arm.com>
523
524 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
525 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
526
85ec4feb
JJ
5272018-01-03 Jakub Jelinek <jakub@redhat.com>
528
529 Update copyright years.
530
4849deb1
JJ
5312017-12-15 Jakub Jelinek <jakub@redhat.com>
532
533 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
534 affects_type_identity and handler fields, adjust comments.
535
734914b6
RS
5362017-12-07 Richard Sandiford <richard.sandiford@arm.com>
537
538 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
539
5d9ae53d
MS
5402017-12-07 Martin Sebor <msebor@redhat.com>
541
542 PR c/81544
543 * lto-lang.c (lto_attribute_table): Initialize new member of struct
544 attribute_spec.
545
5de73c05
JJ
5462017-11-30 Jakub Jelinek <jakub@redhat.com>
547
548 * lto.c (create_subid_section_table): Use ; instead of ;;.
549
974aedcc
MP
5502017-11-22 Marek Polacek <polacek@redhat.com>
551
552 PR c++/60336
553 PR middle-end/67239
554 PR target/68355
555 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
556
1bad9c18
JH
5572017-11-10 Jan Hubicka <hubicka@ucw.cz>
558
559 * lto-partition.c (lto_balanced_map): Use frequency accessor.
560
65991ea3
JH
5612017-10-13 Jan Hubicka <hubicka@ucw.cz>
562
563 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
564
4e7d0260
NS
5652017-10-11 Nathan Sidwell <nathan@acm.org>
566
567 * lto.c (mentions_vars_p_decl_with_vis): Use
568 DECL_ASSEMBLER_NAME_RAW.
569 (lto_fixup_prevailing_decls): Likewise.
570
8e6cdc90
RS
5712017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
572
573 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
574 operating on trees as wide_ints.
575
357b7604
RS
5762017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
577 Alan Hayward <alan.hayward@arm.com>
578 David Sherwood <david.sherwood@arm.com>
579
580 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
581
1ea85365
RB
5822017-08-21 Richard Biener <rguenther@suse.de>
583
92a285c1
ML
584 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
585 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
586 TYPE_DECL debug processing, register DIE references from
587 prevailing SCCs with the debug machinery.
588 (lto_section_with_id): Handle LTO debug sections.
1ea85365 589
8e093270
NS
5902017-08-16 Nathan Sidwell <nathan@acm.org>
591
592 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
593 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
594 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
595
eac3ab4a
TV
5962017-08-08 Tom de Vries <tom@codesourcery.com>
597
598 * lto.c: Include attribs.h.
599
314e6352
ML
6002017-08-08 Martin Liska <mliska@suse.cz>
601
602 * lto-lang.c: Include header files.
603 * lto-symtab.c: Likewise.
604
63e434ca
RB
6052017-08-03 Richard Biener <rguenther@suse.de>
606
607 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
608 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
609 use DECL_LANG_FLAG_0.
610 (lto_symtab_prevail_decl): Likewise.
611
417ca011
TD
6122017-07-07 Torsten Duwe <duwe@suse.de>
613
614 * lto-lang.c (lto_attribute_table): Add entry for
615 "patchable_function_entry".
616
20deef65
NS
6172017-07-19 Nathan Sidwell <nathan@acm.org>
618
619 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
620 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
621
0eaf0bfe
JH
6222017-07-06 Jan Hubicka <hubicka@ucw.cz>
623
624 * lto-partition.c (lto_balanced_map): Do not check
625 flag_toplevel_reorder.
2db9b7cd 626
0eaf0bfe 6272017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
628 * lto-lang.c (lto_init): Use builtin_structptr_types.
629
d1eed638
JH
6302017-06-15 Jan Hubicka <hubicka@ucw.cz>
631 Thomas Preud'homme <thomas.preudhomme@arm.com>
632
633 PR lto/69866
634 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
635 that resolved externally.
636
d2db2e6b
JH
6372017-05-23 Jan Hubicka <hubicka@ucw.cz>
638
639 * lto.c (do_whole_program_analysis): Replace inline_free_summary
640 by ipa_free_fn_summary.
641
464d0118
ML
6422017-05-23 Martin Liska <mliska@suse.cz>
643
644 * lto-symtab.c (lto_cgraph_replace_node): Use
645 symtab_node::dump_{asm_,}name functions.
646 * lto.c (read_cgraph_and_symbols): Likewise.
647 (do_whole_program_analysis): Likewise.
648
6c52831d
ML
6492017-05-23 Martin Liska <mliska@suse.cz>
650
651 * lto.c (read_cgraph_and_symbols): Use the renamed function.
652 (do_whole_program_analysis): Use the renamed function.
653
27d020cf
JH
6542017-05-22 Jan Hubicka <hubicka@ucw.cz>
655
656 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
657 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
658
815d9cc6
XR
6592017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
660
92a285c1 661 PR c++/80038
815d9cc6
XR
662 * lto-lang.c (lto_init): Set in_lto_p earlier.
663
350792ff 6642017-04-12 Richard Biener <rguenther@suse.de>
ab20d992 665 Bernd Edlinger <bernd.edlinger@hotmail.de>
350792ff
RB
666
667 PR middle-end/79671
668 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
669
4a44a5f3
ML
6702017-02-14 Martin Liska <mliska@suse.cz>
671
672 * lto.c (do_stream_out): Free LTO file filename string.
673
8a3a6ab4
DM
6742017-01-19 David Malcolm <dmalcolm@redhat.com>
675
676 * lto-lang.c (builtin_type_for_size): Convert call to
677 lto_type_for_size to one through the langhook.
678 (lto_type_for_size): Move to langhooks.c and rename to
679 lhd_type_for_size.
680 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
681
4c4b4703
JJ
6822017-01-11 Jakub Jelinek <jakub@redhat.com>
683
684 PR middle-end/50199
685 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
686 if it was 0.
687
bd2c6270
JJ
6882017-01-09 Jakub Jelinek <jakub@redhat.com>
689
690 PR translation/79019
691 PR translation/79020
692 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
693
24d3f325
NS
6942017-01-06 Nathan Sidwell <nathan@acm.org>
695
5406184c
NS
696 * lto-partition.c (promote_symbol): Write to dump file sooner,
697 include alias promoting too.
698
24d3f325
NS
699 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
700 (may_need_named_section_p): Likewise.
701 (rename_statics): Likewise.
702 (lto_promote_cross_file_statics): Likewise.
703
cbe34bb5
JJ
7042017-01-01 Jakub Jelinek <jakub@redhat.com>
705
706 Update copyright years.
707
6c8bf066
GJL
7082016-11-30 Georg-Johann Lay <avr@gjlay.de>
709
710 PR lto/78562
711 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
712 mismatch if the two types are built-in.
713
7fa6a965
PK
7142016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
715
716 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
717
efb71232
RB
7182016-11-23 Richard Biener <rguenther@suse.de>
719
720 PR lto/78472
721 * lto.c (hash_canonical_type): Ignore zero-sized fields.
722
48330c93
BE
7232016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
724
725 PR c++/71973
726 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
727
899ca90e 7282016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
729 Alan Hayward <alan.hayward@arm.com>
730 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
731
732 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
733
65179585
RB
7342016-10-31 Richard Biener <rguenther@suse.de>
735
736 PR lto/78129
737 * lto.c (do_whole_program_analysis): Bail out after errors
738 from WPA analysis.
739
8bc5448f
KV
7402016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
741
742 * lto-partition.c: Include tree-vrp.h.
743 * lto.c: Likewise.
744
68317985
RB
7452016-09-20 Richard Biener <rguenther@suse.de>
746
747 * lto.c (lto_main): Call early_finish with "<artificial>" as
748 filename.
749
321e76fb
RB
7502016-09-19 Richard Biener <rguenther@suse.de>
751
752 * lto.c (lto_main): Invoke early_finish debug hook.
753
ea6e17d5
RB
7542016-07-25 Richard Biener <rguenther@suse.de>
755
756 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
757 (unify_scc): Likewise.
758 (lto_read_decls): Likewise.
759
e9ac1f86
JJ
7602016-06-28 Jakub Jelinek <jakub@redhat.com>
761
762 * Make-lang.in: Don't cat ../stage_current if it does not exist.
763
277d7ee0
AK
7642016-06-23 Andi Kleen <ak@linux.intel.com>
765
766 * Make-lang.in: Add support for autofdo (disabled for now)
767
4d926e34
MS
7682016-06-10 Martin Sebor <msebor@redhat.com>
769
770 PR c/71392
ab20d992 771 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
4d926e34
MS
772 attribute in type-generic builtins.
773
479f99c9
JH
7742016-05-16 Jan Hubicka <hubicka@ucw.cz>
775
776 * lto-partition.c (add_symbol_to_partition_1): Likewise.
777
1a0bf5e1
JH
7782016-05-03 Jan Hubicka <hubicka@ucw.cz>
779
780 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
781
a2e76867
PK
7822016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
783
784 * lto-partition.h (lto_balanced_map): New parameter.
785 * lto-partition.c (lto_balanced_map): New parameter
786 max_partition_size.
787 Check if partition size is greater than max_partition_size.
788 * lto.c (do_whole_program_analysis): Adjust calls to
789 lto_balanced_map() to pass 2nd argument.
790
ea913779
L
7912016-03-17 H.J. Lu <hongjiu.lu@intel.com>
792
793 PR lto/70258
794 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
795 PIE.
796
56aae4b7
JJ
7972016-03-08 Jakub Jelinek <jakub@redhat.com>
798
799 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
800 - becuase -> because.
801
ed5d948d
TV
8022016-02-15 Tom de Vries <tom@codesourcery.com>
803
804 PR lto/69655
805 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
806 argument.
807
4ecbadc7
ML
8082016-01-27 Martin Liska <mliska@suse.cz>
809
810 * lto-partition.c (add_symbol_to_partition_1): Remove usage
811 of hsa_summaries.
812
e49d321f
JH
8132016-01-19 Jan Hubicka <hubicka@ucw.cz>
814
815 PR lto/69136
816 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
817 decls have no assemblernames.
818
b2b40051 8192016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 820 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
821
822 * lto-partition.c: Include "hsa.h"
823 (add_symbol_to_partition_1): Put hsa implementations into the
824 same partition as host implementations.
825
5803bd01
JH
8262016-01-12 Jan Hubicka <hubicka@ucw.cz>
827
828 PR lto/69003
829 * lto-partition.c (rename_statics): Fix pasto.
830
13092f61
RB
8312016-01-18 Richard Biener <rguenther@suse.de>
832
833 PR lto/69337
834 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
835 function vs. variable.
836
3c4e91c9
RB
8372016-01-12 Richard Biener <rguenther@suse.de>
838
839 PR lto/69077
840 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
841 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
842
818ab71a
JJ
8432016-01-04 Jakub Jelinek <jakub@redhat.com>
844
845 Update copyright years.
846
3fddb2ef
JH
8472015-12-10 Jan Hubicka <hubicka@ucw.cz>
848
849 PR lto/68878
850 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
851 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
852 (lto_symtab_prevailing_decl): Use it.
853
4a38b02b
IV
8542015-12-15 Ilya Verbin <ilya.verbin@intel.com>
855
856 * lto.c: Include stringpool.h and fold-const.h.
857 (offload_handle_link_vars): New static function.
858 (lto_main): Call offload_handle_link_vars.
859
ca834876
JH
8602015-12-10 Jan Hubicka <hubicka@ucw.cz>
861
862 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
863
958a627f
JH
8642015-12-11 Jan Hubicka <hubicka@ucw.cz>
865
866 PR ipa/61886
867 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
868 values of error and warning attributes.
869
da20571a
JH
8702015-12-08 Jan Hubicka <hubicka@ucw.cz>
871
872 PR lto/68811
873 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
874 DECL.
875 (LTO_NO_PREVAIL): Use gcc_checking_assert.
876
378004b9
JH
8772015-12-08 Jan Hubicka <hubicka@ucw.cz>
878
879 PR lto/68811
880 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
881 by itself.
882
6b9ac179
JH
8832015-12-08 Jan Hubicka <hubicka@ucw.cz>
884
885 PR ipa/61886
886 * lto-symtab.c: Include lto-symtab.h.
887 (lto_cgraph_replace_node): Do not merge profiles here.
888 (lto_symtab_merge_p): New function.
889 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
890 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
891 aliases.
892 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
893 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
894 * lto.c: Include lto-symtab.h
895 * lto-symtab.h: New.
896
41c60c6c
JH
8972015-12-08 Jan Hubicka <hubicka@ucw.cz>
898
899 PR ipa/61886
900 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
901 are not part of the definition.
902 (contained_in_symbol): Likewise.
903 (promote_symbol): When promoting a symbol also promote all transparent
904 aliases.
905 (rename_statics): Weakref needs unique name, too.
906
71e54687
JH
9072015-12-07 Jan Hubicka <hubicka@ucw.cz>
908
909 PR ipa/61886
910 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
911 rename_statics, rename_statics): Handle transparent aliases.
912
88636b62
JH
9132015-12-04 Jan Hubicka <hubicka@ucw.cz>
914
915 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
916 merged_comdat.
917
8c86248e
JH
9182015-12-01 Jan Hubicka <hubicka@ucw.cz>
919
920 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
921
1ff9ed6f
JH
9222015-11-25 Jan Hubicka <jh@suse.cz>
923
924 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
925 * lang.opt (lto_linker_output): New enum.
926 (flinker_output): New flag.
927
22bea0be
JH
9282015-11-24 Jan Hubicka <hubicka@ucw.cz>
929
930 * lto-symtab.c: Include alias.h
931 (warn_type_compatibility_p): Replace types_compatible_p checks by
932 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
933 (lto_symtab_merge): Compare DECL sizes.
934 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
935
aea50b45
JH
9362015-11-24 Jan Hubicka <hubicka@ucw.cz>
937
938 * lto.c (iterative_hash_canonical_type): Recruse for all types
939 which pass !canonical_type_used_p.
940 (gimple_register_canonical_type_1): Sanity check we do not compute
941 canonical type of anything with !canonical_type_used_p.
942 (gimple_register_canonical_type): Skip all types that are
943 !canonical_type_used_p
944
deb3dae6
JH
9452015-11-24 Jan Hubicka <hubicka@ucw.cz>
946
947 * lto.c (unify_scc): Use free_node.
948
f85d2487
JH
9492015-11-21 Jan Hubicka <hubicka@ucw.cz>
950
951 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
952 (gimple_register_canonical_type_1): Check that pointers do not get
953 canonical types.
954 (gimple_register_canonical_type): Do not register pointers.
955
9562015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
957
958 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
959 flag for types that are not ODR; fix loop walking parameters.
960
69f293c9
AM
9612015-11-11 Andrew MacLeod <amacleod@redhat.com>
962
963 * lto-lang.c: Remove unused header files.
964 * lto-object.c: Likewise.
965 * lto-partition.c: Likewise.
966 * lto-symtab.c: Likewise.
967 * lto.c: Likewise.
968
ee45a32d
EB
9692015-11-08 Eric Botcazou <ebotcazou@adacore.com>
970
971 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
972
0aad0198
RS
9732015-11-07 Richard Sandiford <richard.sandiford@arm.com>
974
975 * lto-lang.c: Don't undef DEF_BUILTIN.
976
2adfab87
AM
9772015-10-29 Andrew MacLeod <amacleod@redhat.com>
978
979 * lto-lang.c: Reorder #include's and remove duplicates.
980 * lto-object.c: Likewise.
981 * lto-partition.c: Likewise.
982 * lto-symtab.c: Likewise.
983 * lto.c: Likewise.
984
b2b29377
MM
9852015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
986
987 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
988 conditionals.
989 (lto_fixup_state): Likewise.
990 (do_whole_program_analysis): Use
991 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
992 conditionals.
993
d9a6bd32
JJ
9942015-10-13 Jakub Jelinek <jakub@redhat.com>
995
996 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
997 DEF_FUNCTION_TYPE_11): Define.
998
9c4eeafc
JH
9992015-10-10 Jan Hubicka <hubicka@ucw.cz>
1000
1001 * lto.c (hash_canonical_type): Honor
1002 type_with_interoperable_signedness.
1003
3e32ee19
NS
10042015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1005
1006 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
1007 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1008
f196d062
RB
10092015-08-31 Richard Biener <rguenther@suse.de>
1010
1011 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
1012 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
1013 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
1014 participate in merging with something else.
1015
45aee888
RB
10162015-08-31 Richard Biener <rguenther@suse.de>
1017
1018 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
1019 test, do not replace a non-builtin with a builtin.
1020 * lto.c (compare_tree_sccs_1): Do not merge things we stream
1021 as builtins vs. non-builtins.
1022
a79683d5
TS
10232015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1024
1025 * lto.h: Remove useless typedefs.
1026
48d859bb
AM
10272015-07-15 Andrew MacLeod <amacleod@redhat.com>
1028
1029 * lto.c: Remove redundant includes.
1030
026c3cfd
AH
10312015-07-12 Aldy Hernandez <aldyh@redhat.com>
1032
1033 * lto-lang.c: Fix double word typos.
1034
9fdcd34e
AM
10352015-07-10 Andrew MacLeod <amacleod@redhat.com>
1036
1037 * lto.c: Include cfghooks.h rather than predict.h.
1038
f51ade33
AM
10392015-07-09 Andrew MacLeod <amacleod@redhat.com>
1040
1041 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1042 lto-streamer.h.
1043 * lto-object.c: Likewise.
1044 * lto-partition.c: Likewise.
1045 * lto-symtab.c: Likewise.
1046
1916bcb5
AM
10472015-07-09 Andrew MacLeod <amacleod@redhat.com>
1048
1049 * lto-lang.c: Adjust includes for flags.h changes.
1050
c7131fb2
AM
10512015-07-07 Andrew MacLeod <amacleod@redhat.com>
1052
1053 * lto-lang.c: Adjust includes.
1054 * lto-object.c: Likewise.
1055 * lto-partition.c: Likewise.
1056 * lto-symtab.c: Likewise.
1057 * lto.c: Likewise.
1058
f0889939
AM
10592015-06-25 Andrew MacLeod <amacleod@redhat.com>
1060
1061 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1062 * lto-object.c: Likewise.
1063 * lto-partition.c: Likewise.
1064 * lto-symtab.c: Likewise.
1065 * lto-tree.h: Likewise.
1066 * lto.c: Likewise.
1067
8d67ee55
RS
10682015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1069
1070 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1071 than typed_noop_remove. Remove redudant typedefs.
1072
abb226c9
AM
10732015-06-17 Andrew MacLeod <amacleod@redhat.com>
1074
1075 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1076 * lto-object.c: Likewise.
1077 * lto-partition.c: Likewise.
1078 * lto-symtab.c: Likewise.
1079 * lto.c: Likewise.
1080
351d90f4
JH
10812015-06-14 Jan Hubicka <hubicka@ucw.cz>
1082
1083 PR ipa/66181
1084 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1085
44c42705
DD
10862015-06-12 DJ Delorie <dj@redhat.com>
1087
1088 * lto-lang.c (lto_type_for_size): Include intN types.
1089 (lto_type_for_mode): Likewise.
1090
64578d98
JH
10912015-06-08 Jan Hubicka <hubicka@ucw.cz>
1092
1093 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1094
13fdf2e2
AM
10952015-06-08 Andrew MacLeod <amacleod@redhat.com>
1096
1097 * lto-lang.c : Adjust include files.
1098 * lto-object.c : Likewise.
1099 * lto-partition.c : Likewise.
1100 * lto-partition.h : Likewise.
1101 * lto-symtab.c : Likewise.
1102 * lto.c : Likewise.
1103 * lto.h : Likewise.
1104
ccb5ad37
JH
11052015-06-06 Jan Hubicka <hubicka@ucw.cz>
1106
6542950e
JH
1107 PR lto/65378
1108 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1109 odr_or_derived_type_p.
1110 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1111
11122015-06-08 Jan Hubicka <hubicka@ucw.cz>
1113
ccb5ad37
JH
1114 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1115 pointers.
1116
d7438551
AH
11172015-06-05 Aldy Hernandez <aldyh@redhat.com>
1118
1119 * lto-lang.c (lto_write_globals): Remove.
1120 (LANG_HOOKS_WRITE_GLOBALS): Same.
1121
ecb9f223
AM
11222015-06-04 Andrew MacLeod <amacleod@redhat.com>
1123
1124 * lto-lang.c: Adjust includes for restructured coretypes.h.
1125 * lto-object.c: Likewise.
1126 * lto-partition.c: Likewise.
1127 * lto-symtab.c: Likewise.
1128 * lto.c: Likewise.
1129
9cb9b937
JH
11302015-06-04 Jan Hubicka <hubicka@ucw.cz>
1131
1132 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1133
93e2aa6d
JH
11342015-06-03 Jan Hubicka <hubicka@ucw.cz>
1135
1136 * lto.c (iterative_hash_canonical_type,
1137 gimple_register_canonical_type): only hash main variants of types
1138
faae53f8
ML
11392015-05-27 Martin Liska <mliska@suse.cz>
1140
1141 * lto-partition.c (new_partition): Reset number of symbols.
1142 (add_symbol_to_partition_1): Increment number of symbols.
1143 (undo_partition): Decrement number of symbols.
1144 (lto_balanced_map): Dump number of symbols and insns that
1145 belong to a partition.
1146 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1147
b727ba74
JH
11482015-05-22 Jan Hubicka <hubicka@ucw.cz>
1149
1150 * lto.c (hash_canonical_type): Be sure we hash only types that
1151 need alias set.
1152 (gimple_register_canonical_type_1): Do not produce canonical
1153 types for types that do not need alias sets.
1154
1d1218fb
JH
11552015-05-22 Jan Hubicka <hubicka@ucw.cz>
1156
1157 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1158
872d5034
JH
11592015-05-19 Jan Hubicka <hubicka@ucw.cz>
1160
1161 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1162
259d29e3
JH
11632015-05-17 Jan Hubicka <hubicka@ucw.cz>
1164
1165 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1166 compare ODR types (if available) and function types.
1167 (lto_symtab_merge): ... here; output ODR violation warnings
1168 and call warn_types_mismatch.
1169
b0845a1e
JH
11702015-04-29 Jan Hubicka <hubicka@ucw.cz>
1171
1172 * lto.c (lto_fixup_state): Call verify_type.
1173
67f58944
TS
11742015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1175
b0845a1e 1176 * lto.c: Adjust for hash_table changes.
67f58944 1177
36ceb0e3
JH
11782015-03-27 Jan Hubicka <hubicka@ucw.cz>
1179
1180 * lto.c (lto_read_decls): Move code registering odr types out
1181 of TYPE_CANONICAL conditional and also register polymorphic types.
1182
afd1e7c6
JH
11832015-03-26 Jan Hubicka <hubicka@ucw.cz>
1184
1185 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1186 DECL_ARTIFICAL symbols.
1187
eaeec5ec
JH
11882015-03-26 Jan Hubicka <hubicka@ucw.cz>
1189
1190 PR lto/65536
1191 * lto.c (unify_scc): Revert location cache when unification
1192 suceeded.
1193 (lto_read_decls): Accept location cache after sucess;
1194 apply location cache before calling debug hooks.
1195
1c4db829
JH
11962015-03-10 Jan Hubicka <hubicka@ucw.cz>
1197
1198 * lto.c (read_cgraph_and_symbols): Do not do merging
1199 at ltrans stage.
1200
db847fa8
JJ
12012015-02-26 Jakub Jelinek <jakub@redhat.com>
1202
1203 * lto.c (lto_mode_identity_table): New variable.
1204 (lto_read_decls): Add mode_table argument to the lto_input_block
1205 constructor.
1206 (lto_file_finalize): Initialize mode_table.
1207 (lto_init): Initialize lto_mode_identity_table.
1208
56a9f6bc
TS
12092015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1210
1211 PR libgomp/64625
1212 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1213 Remove macros.
1214 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1215
ebc8f0bb
JH
12162015-02-03 Jan Hubicka <hubicka@ucw.cz>
1217
1218 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1219
40fecdd6
JM
12202015-01-30 Joseph Myers <joseph@codesourcery.com>
1221
1222 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1223 changed to pass input_location as first argument.
1224
040968a8
JH
12252014-12-11 Jan Hubicka <hubicka@ucw.cz>
1226
1227 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1228
69fe4502
JH
12292014-12-11 Jan Hubicka <hubicka@ucw.cz>
1230
1231 * lto.c (compare_tree_sccs_1): Add comparsion of
1232 DECL_FUNCTION_SPECIFIC_TARGET
1233
41dbbb37
TS
12342015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1235 James Norris <jnorris@codesourcery.com>
1236
1237 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1238 New macros.
1239 * lto.c: Include "gomp-constants.h".
1240
837bac8c
IV
12412015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1242
1243 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1244 from select_what_to_stream.
1245
1b34e6e2
BS
12462015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1247 Jakub Jelinek <jakub@redhat.com>
1248
1249 PR middle-end/64412
1250 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1251 if ACCEL_COMPILER.
1252
adfac8df
JJ
12532015-01-09 Michael Collison <michael.collison@linaro.org>
1254
1255 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1256 input.h, alias.h, symtab.h, options, fold-const.h,
1257 wide-int.h, and inchash.h due to flattening of tree.h.
1258 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1259 input.h, alias.h, symtab.h, fold-const.h,
1260 wide-int.h, and inchash.h due to flattening of tree.h.
1261 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1262 input.h, alias.h, symtab.h, options, fold-const.h,
1263 wide-int.h, and inchash.h due to flattening of tree.h.
1264 * lto-partition.c: Ditto.
1265 * lto-symtab.c: Ditto.
1266
5624e564
JJ
12672015-01-05 Jakub Jelinek <jakub@redhat.com>
1268
1269 Update copyright years.
1270
9a1e784a
ML
12712014-12-22 Martin Liska <mliska@suse.cz>
1272
1273 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1274 is used.
1275 (undo_partition): Likewise.
1276 (lto_balanced_map): Likewise.
1277
dd912cb8
ML
12782014-12-22 Martin Liska <mliska@suse.cz>
1279
1280 * lto-partition.c: Include of symbol-summary.h is added.
1281 * lto-symtab.c: Likewise.
1282 * lto.c: Likewise.
1283
17e0fc92
JH
12842014-12-11 Jan Hubicka <hubicka@ucw.cz>
1285
1286 PR ipa/61324
1287 * lto.c (read_cgraph_and_symbols): Update call of
1288 remove_unreachable_nodes.
1289 (do_whole_program_analysis): Remove call of
1290 symtab->remove_unreachable_nodes
1291
58dddbd2
TS
12922014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1293
1294 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1295 htab with malloc instead of ggc.
1296
907dadbd
TS
12972014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1298
1299 * lto.c: Replace htab with hash_table.
1300
9c71e9df
TS
13012014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1302
1303 * lto.c (lto_read_in_decl_state): Adjust.
1304 (lto_fixup_state): Likewise.
1305
72a4a8b0
JH
13062014-11-17 Jan Hubicka <hubicka@ucw.cz>
1307
1308 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1309
54e774c0
JH
13102014-11-14 Jan Hubicka <hubicka@ucw.cz>
1311
1312 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1313
1f6be682
IV
13142014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1315 Bernd Schmidt <bernds@codesourcery.com>
1316 Andrey Turetskiy <andrey.turetskiy@intel.com>
1317 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1318
ab20d992 1319 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
ec6fe917
IV
1320
13212014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1322 Ilya Tocar <ilya.tocar@intel.com>
1323 Andrey Turetskiy <andrey.turetskiy@intel.com>
1324 Bernd Schmidt <bernds@codesourcery.com>
1325
1f6be682
IV
1326 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1327 LTO_SECTION_NAME_PREFIX.
1328 * lto-partition.c (lto_promote_cross_file_statics): Call
1329 select_what_to_stream.
1330 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1331 LTO_SECTION_NAME_PREFIX.
1332 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1333 being built as an offload compiler.
1334
ef4bddc2
RS
13352014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1336
1337 * lto-lang.c: Remove redundant enum from machine_mode.
1338
c582198b
AM
13392014-10-28 Andrew MacLeod <amacleod@redhat.com>
1340
1341 * lto.c: Adjust include files.
1342 * lto-lang.c: Ditto.
1343 * lto-object.c: Ditto.
1344 * lto-partition.c: Ditto.
1345 * lto-symtab.c: Ditto.
1346
60393bbc
AM
13472014-10-27 Andrew MacLeod <amacleod@redhat.com>
1348
1349 * lto-lang.c: Adjust include files.
1350 * lto-object.c: Ditto.
1351 * lto-partition.c: Ditto.
1352 * lto-symtab.c: Ditto.
1353 * lto.c: Ditto.
1354
957f47e6
DD
13552014-10-16 DJ Delorie <dj@redhat.com>
1356
1357 * lto-object.c (lto_obj_begin_section): In the event that pointer
1358 sizes aren't powers of two, choose a more suitable alignment
1359 than (unsigned)(-1).
1360
78a7c317
DD
13612014-10-14 DJ Delorie <dj@redhat.com>
1362
1363 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1364 size-type as well.
1365 (lto_init): Initialize all intN types, not just int128.
1366
70261a4f
ML
13672014-10-06 Martin Liska <mliska@suse.cz>
1368
1369 * lto.c (stream_out): ARG_UNUSED added for last argument.
1370
00de328a
AH
13712014-09-24 Aldy Hernandez <aldyh@redhat.com>
1372
1373 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1374 DECL_ABSTRACT_P.
1375
7861b648
AK
13762014-09-23 Andi Kleen <ak@linux.intel.com>
1377
1378 * lto-partition.c (node_cmp): Update comment.
1379 (varpool_node_cmp): Use symtab_node for comparison.
1380 (add_sorted_nodes): New function.
1381 (lto_balanced_map): Change to keep ordered queue
1382 of ordered node. Handle no_reorder attribute.
1383
1ee85ee1
JH
13842014-09-11 Jan Hubicka <hubicka@ucw.cz>
1385
1386 * lto.c (lto_read_decls): Register ODR types.
1387
8605403e
JH
13882014-08-20 Jan Hubicka <hubicka@ucw.cz>
1389
1390 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1391 call.
1392 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1393
56b1f114
JH
13942014-08-14 Jan Hubicka <hubicka@ucw.cz>
1395
1396 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1397
833f94c0
RB
13982014-08-14 Richard Biener <rguenther@suse.de>
1399
1400 PR lto/62067
1401 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1402
207c68cd
RB
14032014-08-08 Richard Biener <rguenther@suse.de>
1404
1405 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1406
7c581d61
BC
14072014-08-08 Bin Cheng <bin.cheng@arm.com>
1408
1409 PR lto/62032
1410 * lto-lang.c (lto_init): Switch mis-matched arguments.
1411
39c8aaa4
TS
14122014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1413
1414 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1415
6e2830c3
TS
14162014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1417
1418 * lto-partition.c, lto-partition.h: Use hash_set instead of
1419 pointer_set.
1420
50de5793
AK
14212014-07-31 Andi Kleen <ak@linux.intel.com>
1422
1423 * lto.c (hash_canonical_type): Use inchash::hash
1424 and use inchash::add_expr.
1425 (iterative_hash_canonical_type): Dito.
1426
f6bcdb5e
RB
14272014-07-30 Richard Biener <rguenther@suse.de>
1428
1429 * lto-streamer.h (lto_write_data): New function.
1430 * langhooks.c (lhd_append_data): Do not free block.
1431 * lto-section-out.c (lto_write_data): New function writing
1432 raw data to the current section.
1433 (lto_write_stream): Adjust for langhook semantic change.
1434 (lto_destroy_simple_output_block): Write header directly.
1435 * lto-opts.c (lto_write_options): Write options directly.
1436 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1437 (lto_output_toplevel_asms): Likewise.
1438 (copy_function_or_variable): Copy data directly.
1439 (write_global_references): Output index table directly.
1440 (lto_output_decl_state_refs): Likewise.
1441 (write_symbol): Write data directly.
1442 (produce_symtab): Adjust.
1443 (produce_asm_for_decls): Output header and refs directly.
1444
56fdfd3e
AK
14452014-07-25 Andi Kleen <ak@linux.intel.com>
1446
1447 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1448
0bd8bb04
AK
14492014-07-25 Andi Kleen <ak@linux.intel.com>
1450
1451 * lto.c (hash_canonical_type): Convert to inchash.
1452 (iterative_hash_canonical_type): Dito.
1453
6d8eb96b
AK
14542014-07-25 Andi Kleen <ak@linux.intel.com>
1455
1456 * lto.c: Include inchash.h
1457
ad115a3c
JH
14582014-07-14 Jan Hubicka <hubicka@ucw.cz>
1459
1460 * lto.c (mentions_vars_p_decl_non_common): Skip
1461 DECL_ARGUMENT_FLD.
1462 mentions_vars_p_function): Do DECL_ARGUMENTS.
1463 (lto_fixup_prevailing_decls): Update.
1464
917dd9bf
JH
14652014-07-12 Jan Hubicka <hubicka@ucw.cz>
1466
1467 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1468 timevar
1469 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1470
0b83e688
JH
14712014-07-11 Jan Hubicka <hubicka@ucw.cz>
1472
ab20d992 1473 * lto-partition.c (add_references_to_partition): Use
0b83e688
JH
1474 varpool_ctor_useable_for_folding_p.
1475 * lto.c (lto_read_in_decl_state): Update sanity check.
1476
e55637b7
ML
14772014-07-01 Martin Liska <mliska@suse.cz>
1478
1479 IPA REF alias refactoring
1480 * lto-partition.c (add_symbol_to_partition_1): Usage of
1481 FOR_EACH_ALIAS added.
1482
010f4e27
JH
14832014-06-28 Jan Hubicka <hubicka@ucw.cz>
1484
1485 Revert:
1486 * lto.c (lto_copy_fields_not_streamed): New function.
1487 (compare_tree_sccs_1): Do not compare fields shared in between type
1488 and variant.
1489 (lto_read_decls): Fixup types first before inserting into hash.
1490
b82fe354
AP
14912014-06-28 Andrew Pinski <apinski@cavium.com>
1492
1493 * lto.c (lto_read_decls): Fix comment in comment.
1494
288eeff7
JH
14952014-06-28 Jan Hubicka <hubicka@ucw.cz>
1496
1497 * lto.c (lto_copy_fields_not_streamed): New function.
1498 (compare_tree_sccs_1): Do not compare fields shared in between type
1499 and variant.
1500 (lto_read_decls): Fixup types first before inserting into hash.
1501
e01fa630
ML
15022014-06-25 Martin Liska <mliska@suse.cz>
1503
ab20d992 1504 * lto-partition.c (add_references_to_partition): New IPA REF function
e01fa630
ML
1505 used.
1506 (add_symbol_to_partition_1): Likewise.
1507 (lto_balanced_map): Likewise.
ab20d992 1508 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
e01fa630 1509
aaf8a23e
JH
15102014-06-24 Jan Hubicka <hubicka@ucw.cz>
1511
1512 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1513 (mentions_vars_p_function): ... here.
1514 (compare_tree_sccs_1): Update VINDEX checks.
1515 (lto_fixup_prevailing_decls): Likewise.
1516
1eb68d2d
TS
15172014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1518
1519 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1520 pointer_map.
1521
c203e8a7
TS
15222014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1523
1524 * lto.c: Adjust.
1525
714c800f
JH
15262014-06-20 Jan Hubicka <hubicka@ucw.cz>
1527
1528 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1529
569b1784
JH
15302014-06-20 Jan Hubicka <hubicka@ucw.cz>
1531
1532 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1533
56363ffd
JH
15342014-06-15 Jan Hubicka <hubicka@ucw.cz>
1535
1536 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1537
e257a17c
JH
15382014-06-10 Jan Hubicka <hubicka@ucw.cz>
1539
1540 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1541 (do_whole_program_analysis): Use verify_symtab.
1542
24d047a3
JH
15432014-06-07 Jan Hubicka <hubicka@ucw.cz>
1544
1545 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1546 lto_fixup_prevailing_decls): Skip section names.
1547
9b2b7279
AM
15482014-06-02 Andrew MacLeod <amacleod@redhat.com>
1549
1550 * lto-symtab.c: Include builtins.h.
1551
a9243bfc
RB
15522014-05-26 Richard Biener <rguenther@suse.de>
1553
1554 * lto.c (lto_parse_hex): Use int64_t.
1555 (lto_resolution_read): Likewise.
1556
fd1e9302
JH
15572014-05-23 Jan Hubicka <hubicka@ucw.cz>
1558
1559 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1560
aede2c10
JH
15612014-05-23 Jan Hubicka <hubicka@ucw.cz>
1562
1563 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1564 symtab pointer.
1565 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1566
f6a7cffc
TS
15672014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1568
1569 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1570 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1571 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1572
4000360e
BS
15732012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1574
1575 * lto-object.c: Include "lto-section-names.h".
1576 (LTO_SEGMENT_NAME): Don't define.
1577 * lto.c: Include "lto-section-names.h".
1578
b9559136
JH
15792014-05-17 Jan Hubicka <hubicka@ucw.cz>
1580
1581 PR lto/61012
1582 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1583 mixed with variables.
1584
766090c2
TS
15852014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1586
1587 * lto-tree.h: Don't use variable_size gty attribute.
1588 * lto.c (lto_read_in_decl_state): Adjust.
1589 (create_subid_section_table): Likewise.
1590 (lto_flatten_files): Likewise.
1591 (read_cgraph_and_symbols): Likewise.
1592
1d60af08
KZ
15932014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1594 Mike Stump <mikestump@comcast.net>
1595 Richard Sandiford <rdsandiford@googlemail.com>
1596
1597 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1598 * lto-lang.c (get_nonnull_operand): Likewise.
1599
22869a37
RB
16002014-04-28 Richard Biener <rguenther@suse.de>
1601
1602 PR middle-end/60092
1603 * lto-lang.c: Define flag_isoc11.
1604
7de90a6c
DM
16052014-04-23 David Malcolm <dmalcolm@redhat.com>
1606
1607 * lto-partition.c (add_references_to_partition): Update for
1608 removal of implicit pointer from the is-a.h API.
1609 (add_symbol_to_partition_1): Likewise.
1610 (contained_in_symbol): Likewise.
1611 (undo_partition): Likewise.
1612 (lto_balanced_map): Likewise.
1613 (promote_symbol): Likewise.
1614 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1615 (lto_symtab_merge_symbols): Likewise.
1616 * lto.c (lto_wpa_write_files): Likewise.
1617
783dab6b
RB
16182014-04-15 Richard Biener <rguenther@suse.de>
1619
1620 * lto.c: Include params.h.
1621 (do_whole_program_analysis): Switch on flag_lto_partition value,
1622 add support for LTO_PARTITION_ONE.
1623 * lto-partition.h (lto_balanced_map): Adjust.
1624 * lto-partition.c (lto_balanced_map): Get number of desired
1625 partitions as argument to support -flto-partition=one.
1626
cb90235d
JH
16272014-04-14 Jan Hubicka <hubicka@ucw.cz>
1628
ab20d992 1629 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
cb90235d
JH
1630 tp_first_run.
1631
bbe281da
JH
16322014-03-19 Jan Hubicka <hubicka@ucw.cz>
1633
1634 * lto.c: Include ipa-inline.h
1635 (do_whole_program_analysis): Free inline summary after partitioning.
1636
ce2f49b3
RB
16372014-03-19 Richard Biener <rguenther@suse.de>
1638
1639 PR middle-end/60553
ab20d992 1640 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
ce2f49b3
RB
1641 instead of TREE_CHAIN as chain_next.
1642
e41106fc
RB
16432014-03-19 Richard Biener <rguenther@suse.de>
1644
1645 * lto.c (lto_wpa_write_files): Move call to
1646 lto_promote_cross_file_statics ...
1647 (do_whole_program_analysis): ... here, into the partitioning
1648 block. Do not ggc_collect after lto_wpa_write_files but
1649 for a last time before it.
1650
15df2655
JJ
16512014-03-19 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR lto/60571
1654 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1655 Fix formatting.
1656
415e2e6b
JJ
16572014-03-18 Jakub Jelinek <jakub@redhat.com>
1658
1659 PR sanitizer/60535
1660 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1661 and complex_{float,{,long_}double}_type_node.
1662
f42c637e
PM
16632014-03-08 Paulo Matos <paulo@matos-sorge.com>
1664
415e2e6b
JJ
1665 * lto-lang.c (lto_init): Pass flag_short_double to
1666 build_common_tree_nodes.
f42c637e 1667
6dab804d
JH
16682014-02-14 Jan Hubicka <hubicka@ucw.cz>
1669
1670 PR lto/60295
1671 * lto.c (stream_out): Avoid parallel streaming with
1672 -flto=jobserver until we are able to throttle it down
1673 resonably.
1674
39434bce
JH
16752014-02-14 Jan Hubicka <hubicka@ucw.cz>
1676
1677 * lto-partition.c (add_symbol_to_partition_1,
1678 undo_partition, lto_balanced_map): Aliases have no
1679 defined size.
1680 (lto_balanced_map): Do not follow refering variables
1681 if they can be optimized out.
1682
1966fd99
RB
16832014-02-14 Richard Biener <rguenther@suse.de>
1684
1685 PR lto/60179
1686 * lto.c (compare_tree_sccs_1): Do not compare
1687 DECL_FUNCTION_SPECIFIC_TARGET.
1688 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1689
283416b3
RB
16902014-02-12 Richard Biener <rguenther@suse.de>
1691
1692 PR lto/60060
1693 * lto-lang.c (lto_write_globals): Do not call
1694 wrapup_global_declarations or emit_debug_global_declarations
1695 but emit debug info for non-function scope variables
1696 directly.
1697
b7e85694
JH
16982014-02-06 Jan Hubicka <hubicka@ucw.cz>
1699
1700 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1701
96451279
JH
17022014-02-06 Jan Hubicka <hubicka@ucw.cz>
1703
1704 PR ipa/59469
1705 * lto-partition.c (symbol_class): Move to cgraph.h
1706 (get_symbol_class): Move to symtab.c
1707 (add_references_to_partition, add_symbol_to_partition_1,
1708 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1709 lto_promote_cross_file_statics): Update.
1710
f300e7b8
JH
17112014-02-05 Jan Hubicka <hubicka@ucw.cz>
1712
1713 * lto.c (lto_parallelism): New static var.
1714 (do_stream_out, wait_for_child, stream_out): New static functions.
1715 (lto_wpa_write_files): Add support for parallel streaming.
1716 (do_whole_program_analysis): Set parallelism.
1717 * lang.opt (fwpa): Add parameter.
1718 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1719 (lto_init): Update use of flag_wpa.
1720 * lto-streamer.h (asm_nodes_output): Declare.
1721
f0f91770
RB
17222014-02-05 Richard Biener <rguenther@suse.de>
1723
1724 * lto.h (lto_global_var_decls): Remove.
1725 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1726 (lto_write_globals): Do nothing in WPA stage, gather globals from
1727 the varpool here ...
1728 * lto.c (lto_main): ... not here.
1729 (materialize_cgraph): Do not call rest_of_decl_compilation
1730 on the empty lto_global_var_decls vector.
1731 (lto_global_var_decls): Remove.
1732
d665f8dd
JH
17332014-02-04 Jan Hubicka <hubicka@ucw.cz>
1734
ab20d992 1735 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
d665f8dd
JH
1736 needs duplicating, not generic COMDAT.
1737
c39276b8
RB
17382014-02-04 Richard Biener <rguenther@suse.de>
1739
1740 PR lto/59723
1741 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1742 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1743
5f876ae7
JH
17442014-02-04 Jan Hubicka <hubicka@ucw.cz>
1745 Markus Trippelsdorf
1746
1747 PR ipa/59469
1748 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1749 merge force_output and forced_by_abi flags.
1750
b72271b9
BI
17512014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1752
1753 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1754 flag_cilkplus.
1755
63124c48
RB
17562014-01-09 Richard Biener <rguenther@suse.de>
1757
1758 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1759
d05b9920
RB
17602014-01-09 Richard Biener <rguenther@suse.de>
1761
1762 PR lto/45586
1763 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1764 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1765 (gimple_canonical_types_compatible_p): Do not compare them either.
1766
23a5b65a
RS
17672014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1768
1769 Update copyright years
1770
2c8326a5
OE
17712013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1772
1773 * lto.c: Remove struct tags when referring to class varpool_node.
1774 * lto-partition.c: Likewise.
1775 * lto-symtab.c: Likewise.
1776
e06f9964
JJ
17772013-11-29 Jakub Jelinek <jakub@redhat.com>
1778 Richard Biener <rguenther@suse.de>
1779
1780 PR lto/59326
1781 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1782
c193f58b
JJ
17832013-11-29 Jakub Jelinek <jakub@redhat.com>
1784
1785 PR lto/59326
1786 * lto.c (mentions_vars_p_omp_clause): New function.
1787 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1788 after return stmts.
1789
2fb9a547
AM
17902013-11-22 Andrew MacLeod <amacleod@redhat.com>
1791
1792 * lto.c: Add required include files from gimple.h.
ab20d992
JJ
1793 * lto-lang.c: Likewise.
1794 * lto-object.c: Likewise.
1795 * lto-partition.c: Likewise.
1796 * lto-symtab.c: Likewise.
2fb9a547 1797
fec39fa6
TS
17982013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1799
1800 * lto-partition.c lto-symtab.c lto.c Adjust.
1801
d8a2d370
DN
18022013-11-14 Diego Novillo <dnovillo@google.com>
1803
1804 * lto-lang.c: Include stringpool.h.
1805 Include stor-layout.h.
1806 * lto-partition.c: Include gcc-symtab.h.
1807 * lto.c: Include stor-layout.h.
1808
5e20cdc9
DM
18092013-10-31 David Malcolm <dmalcolm@redhat.com>
1810
1811 Automated part of renaming of symtab_node_base to symtab_node.
1812
1813 Patch autogenerated by rename_symtab.py from
1814 https://github.com/davidmalcolm/gcc-refactoring-scripts
1815 revision 58bb219cc090b2f4516a9297d868c245495ee622
1816
1817 * lto-partition.c (add_symbol_to_partition): Rename
1818 symtab_node_base to symtab_node.
1819 (get_symbol_class): Likewise.
1820 (symbol_partitioned_p): Likewise.
1821 (add_references_to_partition): Likewise.
1822 (add_symbol_to_partition_1): Likewise.
1823 (contained_in_symbol): Likewise.
1824 (add_symbol_to_partition): Likewise.
1825 (lto_1_to_1_map): Likewise.
1826 (lto_max_map): Likewise.
1827 (lto_balanced_map): Likewise.
1828 (privatize_symbol_name): Likewise.
1829 (promote_symbol): Likewise.
1830 (may_need_named_section_p): Likewise.
1831 (rename_statics): Likewise.
1832 (lto_promote_statics_nonwpa): Likewise.
1833 * lto-symtab.c (lto_symtab_merge): Likewise.
1834 (lto_symtab_resolve_replaceable_p): Likewise.
1835 (lto_symtab_symbol_p): Likewise.
1836 (lto_symtab_resolve_can_prevail_p): Likewise.
1837 (lto_symtab_resolve_symbols): Likewise.
1838 (lto_symtab_merge_decls_2): Likewise.
1839 (lto_symtab_merge_decls_1): Likewise.
1840 (lto_symtab_merge_decls): Likewise.
1841 (lto_symtab_merge_symbols_1): Likewise.
1842 (lto_symtab_merge_symbols): Likewise.
1843 (lto_symtab_prevailing_decl): Likewise.
1844 * lto.c (lto_wpa_write_files): Likewise.
1845 (read_cgraph_and_symbols): Likewise.
1846 (do_whole_program_analysis): Likewise.
1847
378cd6b1
DM
18482013-10-30 David Malcolm <dmalcolm@redhat.com>
1849
1850 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1851 declarations onto multiple lines to make things easier for
1852 rename_symtab.py.
1853 (lto_symtab_merge_decls_1): Likewise.
1854 (lto_symtab_merge_symbols_1): Likewise.
1855
939b37da
BI
18562013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1857
1858 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1859 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1860 Plus is enabled.
1861
67348ccc
DM
18622013-10-29 David Malcolm <dmalcolm@redhat.com>
1863
1864 Patch autogenerated by refactor_symtab.py from
1865 https://github.com/davidmalcolm/gcc-refactoring-scripts
1866 revision 58bb219cc090b2f4516a9297d868c245495ee622
1867
1868 * lto-partition.c (lto_promote_cross_file_statics): Update for
1869 conversion of symtab types to a true class hierarchy.
1870 (rename_statics): Likewise.
1871 (promote_symbol): Likewise.
1872 (privatize_symbol_name): Likewise.
1873 (lto_balanced_map): Likewise.
1874 (varpool_node_cmp): Likewise.
1875 (node_cmp): Likewise.
1876 (lto_1_to_1_map): Likewise.
1877 (undo_partition): Likewise.
1878 (add_symbol_to_partition): Likewise.
1879 (contained_in_symbol): Likewise.
1880 (add_symbol_to_partition_1): Likewise.
1881 (add_references_to_partition): Likewise.
1882 (symbol_partitioned_p): Likewise.
1883 (get_symbol_class): Likewise.
1884 (lto_max_map): Likewise.
1885 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1886 (lto_symtab_merge_symbols): Likewise.
1887 (lto_symtab_merge_symbols_1): Likewise.
1888 (lto_symtab_merge_decls): Likewise.
1889 (lto_symtab_merge_decls_1): Likewise.
1890 (lto_symtab_merge_decls_2): Likewise.
1891 (lto_symtab_resolve_symbols): Likewise.
1892 (lto_symtab_resolve_can_prevail_p): Likewise.
1893 (lto_symtab_symbol_p): Likewise.
1894 (lto_symtab_resolve_replaceable_p): Likewise.
1895 (lto_symtab_merge): Likewise.
1896 (lto_varpool_replace_node): Likewise.
1897 (lto_cgraph_replace_node): Likewise.
1898 * lto.c (lto_main): Likewise.
1899 (do_whole_program_analysis): Likewise.
1900 (materialize_cgraph): Likewise.
1901 (read_cgraph_and_symbols): Likewise.
1902 (cmp_partitions_order): Likewise.
1903 (lto_materialize_function): Likewise.
1904 (has_analyzed_clone_p): Likewise.
1905
8e9055ae
AM
19062013-10-29 Andrew MacLeod <amacleod@redhat.com>
1907
ab20d992
JJ
1908 * lto-object.c: Add gimple.h to include list.
1909 * lto-partition.c: Likewise.
8e9055ae 1910
377d9792
AM
19112013-10-18 Andrew MacLeod <amacleod@redhat.com>
1912
1913 * lto.c: Remove tree-flow.h from include list.
1914
fffda8d7
RB
19152013-10-15 Richard Biener <rguenther@suse.de>
1916
1917 * lto.c (hash_canonical_type): Split out from ...
1918 (iterative_hash_canonical_type): ... here. Register types
1919 we recurse to.
1920 (gimple_canonical_type_hash): Adjust.
1921 (gimple_register_canonical_type_1): Split out from ...
1922 (gimple_register_canonical_type): ... here. Cache computed
1923 hash value.
1924 (lto_register_canonical_types): Split into two modes,
1925 clearing and computing TYPE_CANONICAL.
1926 (lto_read_decls): Adjust.
1927 (read_cgraph_and_symbols): Do two passes over global trees,
1928 first clearing then computing TYPE_CANONICAL.
1929
1394237e
RB
19302013-10-14 Richard Biener <rguenther@suse.de>
1931
1932 * lto.c (gimple_canonical_types): Move out-of GC space.
1933 (canonical_type_hash_cache): Make a pointer-map.
1934 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1935 New counters.
1936 (iterative_hash_canonical_type): Adjust.
1937 (read_cgraph_and_symbols): Likewise.
1938 (print_lto_report_1): Likewise.
1939
0a387eca
RB
19402013-10-14 Richard Biener <rguenther@suse.de>
1941
1942 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1943 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1944 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1945 gimple_types_compatible_p_1, gimple_types_compatible_p,
1946 visit, iterative_hash_name, struct type_hash_pair,
1947 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1948 gimple_type_eq, gimple_register_type, num_not_merged_types,
1949 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1950 num_not_merged_types_in_same_scc_trees): Remove old merging code
1951 and statistics.
1952 (lto_read_decls): Do not run old merging code in parallel.
1953 (read_cgraph_and_symbols): Do not init/free old merging
1954 data structures.
1955 (print_lto_report_1): Do not report differences of old vs. new
1956 merging code.
1957
83fd5d11
RB
19582013-10-14 Richard Biener <rguenther@suse.de>
1959
1960 * lto-lang.c (lto_init): Do not re-init canonical types here.
1961 (lto_register_canonical_types): Move to ...
1962 * lto.c (lto_register_canonical_types): ... here.
1963 (gimple_canonical_types, canonical_type_hash_cache,
1964 iterative_hash_canonical_type, gimple_canonical_type_hash,
1965 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1966 gimple_register_canonical_type): Add canonical type merging machinery
1967 moved from gimple.c.
1968 (read_cgraph_and_symbols): Init and free canonical type tables
1969 here.
1970 (print_lto_report_1): Report canonical type table stats here.
1971
acf0174b
JJ
19722013-10-11 Jakub Jelinek <jakub@redhat.com>
1973
1974 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1975
7c6fedd2
TT
19762013-09-25 Tom Tromey <tromey@redhat.com>
1977
1978 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1979 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1980 (lto/lto-object.o): Remove.
1981
35f32ad4
RB
19822013-09-06 Richard Biener <rguenther@suse.de>
1983
1984 * lto-symtab.c: Move from gcc/
1985 * lto.h: Include vec.h.
1986 (lto_global_var_decls): Declare.
1987 * lto.c (lto_global_var_decls): Move definition here.
1988 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1989 (lto-symtab.o): Add.
1990 * config-lang.in (gtfiles): Add lto.h.
1991
49322b12
JH
19922013-08-31 Jan Hubicka <jh@suse.cz>
1993
ab20d992 1994 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
49322b12
JH
1995 DECL_FIELD_OFFSET can contain an reference to variable.
1996
31f1f73b
JH
19972013-08-31 Jan Hubicka <jh@suse.cz>
1998
1999 * lto.c (tree_with_vars): Turn into vector.
2000 (MAYBE_REMEMBER_WITH_VARS): Change to...
2001 (CHECK_VAR): ... this one.
2002 (CHECK_NO_VAR): New macro.
2003 (maybe_remember_with_vars_typed): Turn to ...
2004 (mentions_vars_p_typed): ... this one.
2005 (maybe_remember_with_vars_common): Turn to ...
2006 (mentions_vars_p_comon): ... this one.
2007 (maybe_remember_with_vars_decl_minimal): Turn to ...
2008 (mentions_vars_p_decl_minmal): ... this one.
2009 (maybe_remember_with_vars_decl_common): Turn to ...
2010 (mentions_vars_p_decl_common): ... this one.
2011 (maybe_remember_with_vars_decl_with_vis): Turn to ...
2012 (mentions_vars_p_decl_with_vis): ... this one.
2013 (maybe_remember_with_vars_decl_non_common): Turn to ...
2014 (mentions_vars_p_decl_non_common): ... this one.
2015 (maybe_remember_with_vars_function): Turn to ...
2016 (mentions_vars_p_function): ... this one.
2017 (maybe_remember_with_vars_field_decl): Turn to ...
2018 (mentions_vars_p_field_decl): ... this one.
2019 (maybe_remember_with_vars_type): Turn to ...
2020 (mentions_vars_p_type): ... this one.
2021 (maybe_remember_with_vars_binfo): Turn to ...
2022 (mentions_vars_p_binfo): ... this one.
2023 (maybe_remember_with_vars_constructor): Turn to ...
2024 (mentions_vars_p_constructor): ... this one.
2025 (maybe_remember_with_vars_expr): Turn to ...
2026 (mentions_vars_p_expr): ... this one.
2027 (maybe_remember_with_vars): Turn to ...
2028 (mentions_vars_p): ... this one.
2029 (lto_read_decls): Update.
2030 (LTO_SET_PREVAIL): Do not call function for internal decls.
2031 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2032 check that something was updated.
2033 (lto_fixup_state): Do not care about internal decls.
2034 (lto_fixup_decls): Update.
2035 (read_cgraph_and_symbols): Update.
2036
256eefa9
JH
20372013-08-29 Jan Hubicka <jh@suse.cz>
2038
2039 * lto.c (read_cgraph_and_symbols): Free decl states.
2040
0170f33c
JH
20412013-08-29 Jan Hubicka <jh@suse.cz>
2042
2043 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2044 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2045 TYPE_FINAL_P.
2046
c01c111b
JH
20472013-08-28 Jan Hubicka <jh@suse.cz>
2048
2049 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2050 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2051 (unify_scc): Do checking assert.
2052
6a49f3c9
JH
20532013-08-06 Jan Hubicka <jh@suse.cz>
2054 Martin Liska <marxin.liska@gmail.com>
2055
ab20d992 2056 * lto-partition.c (lto_balanced_map): Always base order on
6a49f3c9
JH
2057 source file order.
2058
a2e2a668
JH
20592013-08-06 Jan Hubicka <jh@suse.cz>
2060
2061 * lto.c (lto_materialize_function): Do not read body anymore.
2062
815effe1
JH
20632013-08-02 Jan Hubicka <jh@suse.cz>
2064
2065 * lto.c (lto_materialize_function): Do not push struct function.
2066 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2067 (may_need_named_section_p): Even abstract origins may need
2068 named section.
2069
315f8c0e
DM
20702013-07-30 David Malcolm <dmalcolm@redhat.com>
2071
2072 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2073 PASS_MANAGER_H.
2074
2075 * lto.c (do_whole_program_analysis): Update for move of
2076 all_regular_ipa_passes from a global to a field of class
2077 pass_manager.
2078
1aa95df7
OB
20792013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2080
2081 * lto-partition.c: Fix typos.
2082
c525ba9a
JH
20832013-06-20 Jan Hubicka <jh@suse.cz>
2084
2085 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2086 partitioning of variables.
2087
7a89ad00
JH
20882013-06-20 Jan Hubicka <jh@suse.cz>
2089
2090 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2091
6a6dac52
JH
20922013-06-19 Jan Hubicka <jh@suse.cz>
2093
2094 * lto-partition.c (add_references_to_partition): Use
2095 ctor_for_folding.
2096
ac0511f2
RB
20972013-06-18 Richard Biener <rguenther@suse.de>
2098
2099 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2100 and use it.
2101 (lto_register_function_decl_in_symtab): Likewise.
2102 (cmp_tree): New function.
2103 (unify_scc): Instead of using the streamer cache map from entry
2104 to cache index match up the two maps we have by sorting them.
2105 Adjust calls to lto_register_var_decl_in_symtab and
2106 lto_register_function_decl_in_symtab.
2107
ee03e71d
RB
21082013-06-17 Richard Biener <rguenther@suse.de>
2109
2110 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2111 * lto.c: Include data-streamer.h.
2112 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2113 (gimple_type_leader_entry_s, gimple_type_leader,
2114 gimple_lookup_type_leader): Remove.
2115 (gtc_visit): Simplify.
2116 (gimple_types_compatible_p): Likewise.
2117 (gimple_register_type_1): Likewise. Merge into ...
2118 (gimple_register_type): ... this. Keep it as legacy for
2119 statistics purposes for now.
2120 (fixup_integer_cst): Remove.
2121 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2122 rename to ...
2123 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2124 maybe_remember_with_vars_*): ... these.
2125 (uniquify_nodes): Remove.
2126 (lto_fixup_prevailing_type): New function.
2127 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2128 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2129 (num_merged_types, num_prevailing_types, num_not_merged_types,
2130 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2131 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2132 num_scc_compare_collisions): New global counters.
2133 (compare_tree_sccs_1): New function.
2134 (compare_tree_sccs): Likewise.
2135 (unify_scc): Likewise.
2136 (lto_read_decls): Stream in tree SCCs and unify them on the
2137 way in. Finalize prevailing SCC tree members.
2138 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2139 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2140 to ggc-collect during merging.
2141 (print_lto_report_1): Adjust for new merging code.
2142
ca0f62a8
JH
21432013-06-12 Jan Hubicka <jh@suse.cz>
2144
2145 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2146
bbf9ad07
JH
21472013-06-12 Jan Hubicka <jh@suse.cz>
2148
2149 * lto.c (register_resolution): Take lto_file_data argument.
2150 (lto_register_var_decl_in_symtab,
2151 lto_register_function_decl_in_symtab): Update.
2152 (read_cgraph_and_symbols): Update resolution_map handling.
2153
ecdbd01a 21542013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2155
2156 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2157 (add_symbol_to_partition_1): Likewise.
2158 (contained_in_symbol): Likewise.
2159 (lto_balanced_map): Likewise.
2160 (rename_statics): Drop weakref.
2161
a367df53
RB
21622013-06-05 Richard Biener <rguenther@suse.de>
2163
2164 * lto.c (num_merged_types): New global variable.
2165 (uniquify_nodes): Increase num_merged_types when merging a type.
2166 (print_lto_report_1): Output the number of merged types.
2167
40a7fe1e
JH
21682013-06-01 Jan Hubicka <jh@suse.cz>
2169
2170 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2171 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2172 (do_whole_program_analysis): Update dumping.
2173
e70670cf
JH
21742013-05-29 Jan Hubicka <jh@suse.cz>
2175
2176 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2177 flags.
2178 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2179
8ee05051
JH
21802013-05-15 Jan Hubicka <jh@suse.cz>
2181
2182 * lto-partition.c (privatize_symbol_name): Return true when
2183 privatizing happened.
2184 (rename_statics): Do not go into infinite loop when privatizing
2185 is not needed.
2186
427b248d
JM
21872013-05-16 Jason Merrill <jason@redhat.com>
2188
2189 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2190
9de04252
MJ
21912013-05-15 Martin Jambor <mjambor@suse.cz>
2192
2193 * lto-partition.c (lto_balanced_map): Print symbol order instead
2194 of node uids.
2195
2d6e4603
JH
21962013-05-15 Jan Hubicka <jh@suse.cz>
2197
2198 PR lto/57038
2199 PR lto/47375
2200 * lto-partition.c (get_symbol_class): Fix weakrefs.
2201 (lto_balanced_map): Fix weakrefs.
2202 (privatize_symbol_name): Remove unnecesary label.
2203 (rename_statics): Handle weakrefs as statics.
2204
64cfa6c0
JH
22052013-05-09 Jan Hubicka <jh@suse.cz>
2206 Richard Biener <rguenther@suse.de>
2207
2208 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2209 (lto_register_var_decl_in_symtab): Likewise.
2210 (lto_main): Promote statics.
2211 * lto-partition.c (privatize_symbol_name): New function.
2212 (promote_symbol): Use it.
2213 (may_need_named_section_p): New predicate.
2214 (rename_statics): New functions.
2215 (lto_promote_cross_file_statics): Simplify; do renaming.
2216 (lto_promote_statics_nonwpa): New function.
2217 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2218
e45cde98
RB
22192013-02-08 Richard Biener <rguenther@suse.de>
2220
2221 PR lto/56231
2222 * lto-lang.c (lto_init): Do not enter a dummy file.
2223
6edc3e32
UB
22242013-02-07 Uros Bizjak <ubizjak@gmail.com>
2225
2226 PR bootstrap/56227
2227 * lto.c (lto_resolution_ready): Use %wx instead of
2228 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2229
ed73881e
RG
22302013-02-04 Richard Guenther <rguenther@suse.de>
2231
2232 PR lto/56168
2233 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2234 or lto_fixup_decls at LTRANS time.
2235
a19b1432
JH
22362013-01-09 Jan Hubicka <jh@suse.cz>
2237
2238 PR lto/45375
2239 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2240
49c01f87
L
22412012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2242
2243 PR lto/55466
2244 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2245 variables.
2246 (lto_main): Record the global variables if WPA isn't enabled.
2247
6e1aa848
DN
22482012-11-20 Diego Novillo <dnovillo@google.com>
2249 Jakub Jelinek <jakub@redhat.com>
2250
2251 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2252
9771b263
DN
22532012-11-16 Diego Novillo <dnovillo@google.com>
2254
2255 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2256
2257 * lto-lang.c: Use new vec API in vec.h.
2258 * lto-partition.c: Likewise.
2259 * lto-partition.h: Likewise.
2260 * lto.c: Likewise.
2261
24551b9c
LC
22622012-10-31 Lawrence Crowl <crowl@google.com>
2263
2264 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2265 down-cast via dyn_cast.
2266 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2267 (undo_partition): Likewise.
2268 (lto_balanced_map): Likewise.
2269 (get_symbol_class): Likewise and via is_a.
2270 (lto_balanced_map): Change symtab checking to is_a.
2271
aec06f6f
RB
22722012-10-12 Richard Biener <rguenther@suse.de>
2273
2274 PR lto/54898
2275 * lto.c (gimple_types_compatible_p_1): Also compare
2276 TYPE_MAIN_VARIANT.
2277 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2278
0b8c30f9
TB
22792012-10-09 Tobias Burnus <burnus@net-b.de>
2280
2281 * lto-lang.c (lto_register_builtin_type): Avoid useless
2282 decl creation.
2283 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2284
da3202a8
TB
22852012-10-08 Tobias Burnus <burnus@net-b.de>
2286
2287 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2288 Free lto_file struct after closing the file.
2289
2512a443
JH
22902012-10-08 Jan Hubicka <jh@suse.cz>
2291
ab20d992 2292 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2512a443
JH
2293 (fixup_integer_cst): New functoin.
2294 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2295
e75f8f79
JH
22962012-10-07 Jan Hubicka <jh@suse.cz>
2297
2298 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2299 release input encoders.
2300 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2301
46591697
JH
23022012-10-06 Jan Hubicka <jh@suse.cz>
2303
ab20d992 2304 PR lto/54790
46591697
JH
2305 * lto.c (resolution_map): New static var.
2306 (register_resolution): New function.
2307 (lto_register_var_decl_in_symtab): Use it.
2308 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2309
af16bc76
MJ
23102012-09-20 Martin Jambor <mjambor@suse.cz>
2311
2312 * lto.c (lto_materialize_function): Call push_struct_function and
2313 pop_cfun.
2314
5368224f
DC
23152012-09-19 Dehao Chen <dehao@google.com>
2316
ab20d992 2317 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
5368224f 2318
b5493fb2
JH
23192012-09-19 Jan Hubicka <jh@suse.cz>
2320
2321 * lto.c (lto_materialize_function): Update confused comment.
2322 (read_cgraph_and_symbols): Do not free symtab.
2323
c3c445e1
JH
23242012-09-12 Jan Hubicka <jh@suse.cz>
2325
2326 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2327 AUX pointer cleaning. Add max partitioning.
2328 * lto-partition.c (enum symbol_class): New.
2329 (get_symbol_class): New function.
2330 (symbol_partitioned_p): New function.
2331 (add_references_to_partition): Remove.
2332 (add_aliases_to_partition): Remove.
2333 (add_cgraph_node_to_partition_1): Remove.
2334 (add_cgraph_node_to_partition): Remove.
2335 (add_symbol_to_partition): New function.
2336 (add_symbol_to_partition_1): New function.
2337 (contained_in_symbol): New function.
2338 (partition_cgraph_node_p): Remove.
2339 (partition_varpool_node_p): Remove.
2340 (partition_symbol_p): Remove.
2341 (lto_1_to_1_map): Cleanup.
2342 (lto_max_map): New.
2343 (lto_balanced_map): Update.
2344 (lto_promote_cross_file_statics): Update.
2345 * lto-partition.h (lto_max_map): Declare.
2346 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2347
b5c7cdfb
JH
23482012-09-11 Jan Hubicka <jh@suse.cz>
2349
2350 PR lto/54312
2351 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2352 type is variant leader.
2353
b29402f0
RG
23542012-09-11 Richard Guenther <rguenther@suse.de>
2355
2356 * lto.c (enum gtc_mode): Remove.
2357 (struct type_pair_d): Adjust.
2358 (lookup_type_pair): Likewise.
2359 (gimple_type_leader): Do not mark as deletable.
2360 (gimple_lookup_type_leader): Adjust.
2361 (gtc_visit): Likewise.
2362 (gimple_types_compatible_p_1): Likewise.
2363 (gimple_types_compatible_p): Likewise.
2364 (gimple_type_hash): Likewise.
2365 (gimple_register_type): Likewise.
2366 (read_cgraph_and_symbols): Manage lifetime of tables
2367 here.
2368
b8f4e58f
RG
23692012-09-11 Richard Guenther <rguenther@suse.de>
2370
2371 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2372 struct type_pair_d, lookup_type_pair, struct sccs,
2373 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2374 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2375 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2376 visit, iterative_hash_name, struct type_hash_pair,
2377 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2378 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2379 Move here from gimple.c
2380 (read_cgraph_and_symbols): Free hash tables here.
2381 (print_lto_report_1): New function wrapping print_lto_report.
2382 (do_whole_program_analysis): Call it.
2383 (lto_main): Likewise.
2384
1cdbb3f9
JH
23852012-09-10 Jan Hubicka <jh@suse.cz>
2386
2387 * lto-partition.c (partition_symbol_p): Forward declare.
2388 (add_references_to_partition): Reimplement using partition_symbol_p.
2389 (add_aliases_to_partition): Break out from add_references_to_partition;
2390 reimplement using partition_symbol_p.
2391 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2392 add sanity checks.
2393 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2394 (partition_varpool_node_p): Do not special case aliases.
2395
b4661bfe
JH
23962012-08-12 Jan Hubicka <jh@suse.cz>
2397
2398 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2399 it is deleted after streaming.
2400 * lto-partition.c (partition_symbol_p): New function.
2401 (promote_var, promote_fn): Remove.
2402 (promote_symbol): New function.
2403 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2404 to lookup the actual boundaries instead of computing them ad-hoc.
2405
7b99cca4
JH
24062012-08-12 Jan Hubicka <jh@suse.cz>
2407
2408 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2409 in partitioning.
2410 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2411 by encoder.
2412 * lto-partition.c (new_partition): Update.
2413 * lto.c (cmp_partitions_order): Update.
2414 (lto_wpa_write_files): Update.
2415 (free_ltrans_partitions): Update.
2416 (add_references_to_partition): Update.
2417 (add_cgraph_node_to_partition_1): Update.
2418 (add_cgraph_node_to_partition): Update.
2419 (add_varpool_node_to_partition): Update.
2420 (undo_partition): Update.
2421 (lto_balanced_map): Update.
2422 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2423 set_referenced_from_this_partition_p): Update.
2424 (lto_promote_cross_file_statics): Update.
2425
f27c1867
JH
24262012-08-12 Jan Hubicka <jh@suse.cz>
2427
2428 * lto-partition.c (set_referenced_from_other_partition_p,
2429 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2430 New functions.
2431 (lto_promote_cross_file_statics): Use them.
2432
ab96cc5b
JH
24332012-07-24 Jan Hubicka <jh@suse.cz>
2434
2435 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2436
0229aee9
UB
24372012-07-24 Uros Bizjak <ubizjak@gmail.com>
2438
2439 * lto-tree.h (lang_decl): Add variable_size GTY option.
2440
7ee2468b
SB
24412012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2442
2443 * lto.c: Do not include timevar.h.
2444 * Make-lang.in: Fix dependencies.
2445
a910399d
LC
24462012-06-18 Lawrence Crowl <crowl@google.com>
2447
ab20d992 2448 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2449 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2450 to lto_wpa_write_files.
ab20d992 2451 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
a910399d
LC
2452 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2453 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2454 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2455 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2456 to be a front end, but is not one.
2457
877ab5e9
JH
24582012-05-18 Jan Hubicka <jh@suse.cz>
2459
2460 * lto.c (lto_materialize_constructors_and_inits): Remove.
2461 (read_cgraph_and_symbols): Remove handling of alias pairs.
2462
6649df51
JH
24632012-05-17 Jan Hubicka <jh@suse.cz>
2464
2465 * lto-partition.c (add_references_to_partition): Handle external vars.
2466 (partition_varpool_node_p): Likewise.
2467 (lto_promote_cross_file_statics): Do not promote externals.
2468
d1ede5f4
BS
24692012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2470
2471 * lto-lang.c (handle_fnspec_attribute): New static function.
2472 (lto_attribute_table): Add "fn spec".
2473 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2474
0d6bf48c
JH
24752012-05-04 Jan Hubicka <jh@suse.cz>
2476
2477 * lto.c (do_whole_program_analysis): Set timevars correctly.
2478 (lto_main): Likewise.
d1ede5f4 2479
1d67dde8
RB
24802012-05-04 Richard Guenther <rguenther@suse.de>
2481
2482 * lang.opt (fwpa): Do not mark as Optimization.
2483 (fltrans): Likewise.
2484
65d630d4
JH
24852012-04-30 Jan Hubicka <jh@suse.cz>
2486
2487 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2488 * lto-partition.c (partition_cgraph_node_p): Use
2489 symtab_used_from_object_file_p.
65d630d4
JH
2490 (partition_varpool_node_p): Likewise.
2491
ead84f73
JH
24922012-04-20 Jan Hubicka <jh@suse.cz>
2493
2494 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2495
5932a4d4
JH
24962012-04-18 Jan Hubicka <jh@suse.cz>
2497
2498 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2499 Update for new ipa-ref API.
2500
65c70e6b
JH
25012012-04-16 Jan Hubicka <jh@suse.cz>
2502
2503 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2504 walkers to walk cgraph and varpool.
65c70e6b
JH
2505 (materialize_cgraph): Likewise.
2506 * lto-partition.c (lto_1_to_1_map): Likewise.
2507 (lto_balanced_map): Likewise.
2508 (lto_promote_cross_file_statics): Likewise.
2509
960bfb69
JH
25102012-04-14 Jan Hubicka <jh@suse.cz>
2511
2512 * lto.c: Update field referenced for new cgraph/varpool layout.
2513 * lto-partition.c: Likewise.
2514
a66dc285
JH
25152012-04-11 Jan Hubicka <jh@suse.cz>
2516
2517 * lto.c: Update copyright; remove params.h, ipa-inline.h
2518 and ipa-utils.h inlines; inline lto-partition.h
2519 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2520 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2521 add_references_to_partition, add_cgraph_node_to_partition_1,
2522 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2523 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2524 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2525 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2526 * lto-partition.c: ... here; new file.
2527 * lto-partition.h: New file.
2528 * Make-lang.in (lto.o): Update dependencies.
2529 (lto-partition.o): New.
2530
f3b249e5
RG
25312012-04-05 Richard Guenther <rguenther@suse.de>
2532
2533 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2534 definition.
2535
21fa2faf
RG
25362012-03-12 Richard Guenther <rguenther@suse.de>
2537
2538 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2539
6bb485a3
RG
25402012-03-06 Richard Guenther <rguenther@suse.de>
2541
2542 PR lto/52097
2543 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2544
95510497
RG
25452012-02-28 Richard Guenther <rguenther@suse.de>
2546
2547 PR lto/52400
2548 * lto.c (lto_register_function_decl_in_symtab): Do not register
2549 a reverse renamed decl mapping.
2550
09228fef
JJ
25512012-01-06 Jakub Jelinek <jakub@redhat.com>
2552
2553 PR lto/51774
2554 * lto-lang.c (handle_returns_twice_attribute): New function.
2555 (lto_attribute_table): Add returns_twice attribute.
2556
b03eda0d
RG
25572011-12-21 Richard Guenther <rguenther@suse.de>
2558
2559 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2560 (LTO_FIXUP_TREE): Use it.
2561 (uniquify_nodes): Mark new non-prevailing types and avoid
2562 calling gimple_register_type on others.
2563 (lto_read_decls): Add comment.
2564
4ad9a9de
EB
25652011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2566
2567 * lto.h (lto_parse_hex): Delete.
2568 * lto.c (lto_read_decls): Use 'int' for offsets.
2569 (lto_parse_hex): Make static and return proper 64-bit host type.
2570 (lto_resolution_read): Use proper 64-bit host type.
2571
ea973bad
RG
25722011-12-13 Richard Guenther <rguenther@suse.de>
2573
2574 PR lto/48354
2575 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2576 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2577
c8218030
UB
25782011-12-01 Uros Bizjak <ubizjak@gmail.com>
2579
2580 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2581 (ignore_attribute): New.
2582
57ac2606
AH
25832011-11-21 Aldy Hernandez <aldyh@redhat.com>
2584
2585 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2586 (handle_transaction_pure_attribute): New.
2587
52a35ef7
RG
25882011-11-03 Richard Guenther <rguenther@suse.de>
2589
2590 PR lto/44965
2591 * lto-lang.c (lto_post_options): Do not read file options.
2592 * lto.c (lto_read_all_file_options): Remove.
2593 (lto_init): Call lto_set_in_hooks here.
2594
51973b1e
JH
25952011-10-09 Jan Hubicka <jh@suse.cz>
2596
2597 * lto.c (node_cmp, varpool_node_cmp): New functions.
2598 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2599 (cmp_partitions): Rename to ...
2600 (cmp_partitions_size): ... this one.
2601 (cmp_partitions_order): New function.
2602 (lto_wpa_write_files): Sort partitions by order when
2603 -fno-toplevel-reorder is used.
2604
5958009b
AK
26052011-10-09 Andi Kleen <ak@linux.intel.com>
2606
2607 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2608
e79983f4
MM
26092011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2610
2611 * lto-lang.c (def_builtin_1): Delete old interface with two
2612 parallel arrays to hold standard builtin declarations, and replace
2613 it with a function based interface that can support creating
2614 builtins on the fly in the future. Change all uses, and poison
2615 the old names. Make sure 0 is not a legitimate builtin index.
2616
ecdbd01a 26172011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2618
2619 * lto-object.c (lto_obj_add_section_data): Add list.
2620 (lto_obj_add_section): Fill in list.
2621 (ltoobj_build_section_table): Pass through list.
2622 * lto.c (file_data_list): Declare.
2623 (create_subid_section_table): Pass arguments directly.
2624 Fill in list of file_datas.
2625 (lwstate): Delete.
2626 (lto_create_files_from_ids): Pass in direct arguments.
2627 Don't maintain list.
2628 (lto_file_read): Use explicit section and file data lists.
2629 (lto_read_all_file_options): Pass in section_list.
2630 * lto.h (lto_obj_build_section_table): Add list.
2631 (lto_section_slot): Add next.
2632 (lto_section_list): Declare.
2633
ed0d2da0
JH
26342011-10-02 Jan Hubicka <jh@suse.cz>
2635
2636 PR lto/47247
2637 * common.c (lto_resolution_str): Add new resolution.
2638 * common.h (lto_resolution_str): Likewise.
2639
ad7715f3
L
26402011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2641 Andi Kleen <ak@linux.intel.com>
2642
2643 PR lto/50568
2644 * lto.c (lto_splay_tree_delete_id): New.
2645 (lto_splay_tree_compare_ids): Likewise.
2646 (lto_splay_tree_lookup): Likewise.
2647 (lto_splay_tree_id_equal_p): Likewise.
2648 (lto_splay_tree_insert): Likewise.
2649 (lto_splay_tree_new): Likewise.
2650 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2651 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2652 (create_subid_section_table): Use lto_splay_tree_lookup and
2653 lto_splay_tree_insert.
2654 (lto_file_read): Use lto_splay_tree_new.
2655
ecdbd01a 26562011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2657
2658 * lto.c (lto_resolution_read): Remove id dumping.
2659 (lto_section_with_id): Turn id HOST_WIDE_ID.
2660 (create_subid_section_table): Dito.
2661
892a371f
DS
26622011-08-28 Dodji Seketeli <dodji@redhat.com>
2663
2664 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2665 linemap_add twice.
2666
f82d1a94
MJ
26672011-08-11 Martin Jambor <mjambor@suse.cz>
2668
2669 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2670
f0efc7aa
DN
26712011-08-08 Diego Novillo <dnovillo@google.com>
2672
2673 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2674 * lto.c: Include tree-streamer.h.
2675
1a072294
RG
26762011-07-06 Richard Guenther <rguenther@suse.de>
2677
2678 * lto-lang.c (lto_init):
2679 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2680
7496868d
JH
26812011-06-11 Jan Hubicka <jh@suse.cz>
2682
10f13f22 2683 PR lto/48246
7496868d
JH
2684 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2685 (lto_balanced_map): Likewise.
2686
39e2db00
JH
26872011-06-11 Jan Hubicka <jh@suse.cz>
2688
2689 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2690 (add_cgraph_node_to_partition) ... here; walk aliases.
2691 (lto_1_to_1_map): Remove same body alias code.
2692 (promote_fn): Likewise.
2693 (lto_promote_cross_file_statics): Update comment.
2694
28628ea6
DN
26952011-06-07 Diego Novillo <dnovillo@google.com>
2696
2697 * lto.c (uniquify_nodes): Move code to register decls to
2698 the loop that computes canonical types.
2699
009db074
RG
27002011-06-07 Richard Guenther <rguenther@suse.de>
2701
2702 * lto-lang.c (lto_init): Do not set
2703 size_type_node or call set_sizetype.
2704
47c79d56
DN
27052011-06-04 Diego Novillo <dnovillo@google.com>
2706
2707 * lto.c (lto_init): New.
2708 (lto_main): Call it.
2709
d5828cc7
DN
27102011-06-03 Diego Novillo <dnovillo@google.com>
2711
2712 * lto.c (get_resolution): Move from lto-streamer-in.c.
2713 (lto_register_var_decl_in_symtab): Likewise.
2714 (lto_register_function_decl_in_symtab): Likewise.
2715 (uniquify_nodes): Call lto_register_var_decl and
2716 lto_register_function_decl_in_symtab after reading a new
2717 VAR_DECL or FUNCTION_DECL.
2718
6807da97
RG
27192011-06-01 Richard Guenther <rguenther@suse.de>
2720
2721 * lto-lang.c (lto_register_canonical_types): New function.
2722 (lto_init): Register common nodes with the canonical type machinery.
2723 Do not play tricks with char_type_node.
2724
d74be317
RG
27252011-05-26 Richard Guenther <rguenther@suse.de>
2726
2727 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2728
d9f8303f
NF
27292011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2730
2731 * lto.c (lto_ft_typed): New function.
2732 (lto_ft_common): Call it.
2733 (lto_ft_constructor): Likewise.
2734 (lto_ft_expr): Likewise.
2735 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2736 TREE_CHAIN.
2737
fb291a1e
RG
27382011-05-20 Richard Guenther <rguenther@suse.de>
2739
2740 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2741 (lto_ft_type): Move main-variant and pointer-to chain building ...
2742 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2743 in a separate final loop.
2744
31b3ca64
RG
27452011-05-19 Richard Guenther <rguenther@suse.de>
2746
2747 * lto.c (uniquify_nodes): First register all types before
2748 fixing up the tree SCC.
2749
35d828c5
JH
27502011-05-11 Jan Hubicka <jh@suse.cz>
2751
2752 PR lto/48952
2753 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2754
51545682
NF
27552011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2756
2757 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2758 location of binfo field.
2759 (lto_fixup_prevailing_decls): Likewise.
2760
8242dd04
NF
27612011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2762
2763 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2764 build_function_type_array or build_varargs_function_type_array
2765 instead.
2766
c99c0026
EB
27672011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2768
2769 * lto-lang.c (global_bindings_p): Return bool.
2770
c47d0034
JH
27712011-05-07 Jan Hubicka <jh@suse.cz>
2772
a9bcb3f0
EB
2773 * lto.c (lto_materialize_function): Use
2774 cgraph_function_with_gimple_body_p.
2775 (add_cgraph_node_to_partition): Do not re-add items to partition;
2776 handle thunks.
c47d0034
JH
2777 (add_varpool_node_to_partition): Do not re-add items to partition.
2778
bb3398ca
JH
27792011-05-03 Jan Hubicka <jh@suse.cz>
2780
2781 * lto.c (free_ltrans_partitions): Fix accidental commit.
2782
1cb1a99f
JH
27832011-05-03 Jan Hubicka <jh@suse.cz>
2784
2785 * lto.c (ltrans_partition_def): Remove GTY annotations.
2786 (ltrans_partitions): Move to heap.
2787 (new_partition): Update.
2788 (free_ltrans_partitions): New function.
2789 (lto_wpa_write_files): Use it.
2790
af8bca3c
MJ
27912011-04-29 Martin Jambor <mjambor@suse.cz>
2792
2793 * lto.c: Include ipa-utils.h.
2794 (lto_balanced_map): Update call to ipa_reverse_postorder.
2795 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2796
b823cdfe
MM
27972011-04-29 Michael Matz <matz@suse.de>
2798
2799 * lto.c (toplevel): Include tree-flow.h.
2800 (lto_read_in_decl_state): Don't merge types here.
2801 (tree_with_vars): New static hash table.
2802 (remember_with_vars): New static functions.
2803 (LTO_FIXUP_TYPE): New macro.
2804 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2805 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2806 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2807 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2808 (lto_read_decls): Uniquify while reading in trees.
2809 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2810 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2811 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2812 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2813 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2814 lto_fixup_tree): Remove.
2815 (lto_fixup_state): Remove data argument. Use
2816 lto_symtab_prevailing_decl.
2817 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2818 (lto_fixup_prevailing_decls): New function.
2819 (lto_fixup_state_aux): Argument aux is unused.
2820 (lto_fixup_decls): Don't allocate pointer sets, don't use
2821 lto_fixup_tree, use lto_fixup_prevailing_decls.
2822 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2823 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2824
b9843260
EB
28252011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2826
2827 * lto.c (lto_balanced_map): Fix typos in head comment.
2828 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2829 test.
2830
e7f23018
JH
28312011-04-16 Jan Hubicka <jh@suse.cz>
2832
2833 * lto.c (lto_balanced_map): Update.
2834
10a5dd5d
JH
28352011-04-14 Jan Hubicka <jh@suse.cz>
2836
2837 * lto.c: Include ipa-inline.h
b9843260
EB
2838 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2839 accessor.
10a5dd5d
JH
2840 (ipa_node_duplication_hook): Fix declaration.
2841 * Make-lang.in (lto.o): Update dependencies.
2842
81f653d6
NF
28432011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2844
2845 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2846 calling TREE_CHAIN.
2847 * lto.c (lto_fixup_common): Likewise.
2848
dcf0c47e
NF
28492011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2850
2851 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2852 (handle_type_generic_attribute): Likewise.
2853
e89964e3
MM
28542011-04-03 Michael Matz <matz@suse.de>
2855
2856 * lto.c (lto_materialize_function): Don't read and then discard
2857 sections in WPA mode.
2858 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2859
2860 * lto-lang.c (registered_builtin_fndecls): Remove.
2861 (lto_getdecls): Return NULL_TREE.
2862 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2863
d2b3fe18
RG
28642011-03-31 Richard Guenther <rguenther@suse.de>
2865
2866 PR lto/48246
2867 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2868 partitions when checking is not enabled.
2869
ba78087b
KT
28702011-03-25 Kai Tietz <ktietz@redhat.com>
2871
2872 * lto.c (lto_resolution_read): Use filename_cmp instead
2873 of strcmp.
2874 (lto_read_section_data): Likewise.
2875
0edf1bb2
JL
28762011-03-25 Jeff Law <law@redhat.com>
2877
ab20d992 2878 * lto-lang.c (def_fn_type): Add missing va_end.
0edf1bb2 2879
62d784f7
KT
28802011-03-21 Kai Tietz <ktietz@redhat.com>
2881
2882 PR target/12171
2883 * lto-lang.c (lto_attribute_table): Adjust table.
2884
62dd9571
JJ
28852011-02-18 Jakub Jelinek <jakub@redhat.com>
2886
2887 PR bootstrap/47807
2888 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2889 of lto-streamer.h.
2890
237d6259
RG
28912011-02-18 Richard Guenther <rguenther@suse.de>
2892
2893 PR lto/47798
2894 * lto-tree.h (lto_global_var_decls): Do not declare here.
2895 * lto-lang.c: Include lto-streamer.h.
2896 * Make-lang.in (lto-lang.o): Adjust dependencies.
2897
8ead2223
KT
28982011-02-10 Kai Tietz <kai.tietz@onevision.com>
2899
2900 PR lto/47241
2901 * lto.c (lto_read_section_data): Free
2902 fd_name in failure case.
2903 For mingw targets don't hash file-descriptor.
2904 (read_cgraph_and_symbols): Close current_lto_file
2905 in failure case.
2906
6e701822
JH
29072011-01-11 Jan Hubicka <jh@suse.cz>
2908
2909 PR lto/45721
2910 PR lto/45375
b9843260
EB
2911 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2912 are not partitioned.
6e701822 2913
f4da8dce
NF
29142010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2915
2916 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2917 Use prototype_p.
2918
6b7fb143
RG
29192010-12-06 Richard Guenther <rguenther@suse.de>
2920
2921 PR lto/46796
2922 * lto-lang.c (lto_init): Give names to basic types.
2923
c59ffc41
JM
29242010-11-30 Joseph Myers <joseph@codesourcery.com>
2925
2926 * lto-object.c: Don't include toplev.h.
2927 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2928
7c475d11
JM
29292010-11-30 Joseph Myers <joseph@codesourcery.com>
2930
2931 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2932 $(TOPLEV_H).
2933
71f3e391
JM
29342010-11-29 Joseph Myers <joseph@codesourcery.com>
2935
2936 * lto-endian.h: Delete.
2937 * lto-object.c: Don't include "libiberty.h".
2938 (O_BINARY): Don't define.
2939 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2940 (O_BINARY): Don't define.
2941
9f1718b0
RG
29422010-11-23 Richard Guenther <rguenther@suse.de>
2943
2944 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2945
39c4e298
RG
29462010-11-23 Richard Guenther <rguenther@suse.de>
2947
2948 PR lto/46605
2949 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2950
b37421c6
JM
29512010-11-17 Joseph Myers <joseph@codesourcery.com>
2952
2953 * lto.c (lto_main): Take no arguments.
2954 * lto.h (lto_main): Update prototype.
2955
d82f74d3
ILT
29562010-11-16 Ian Lance Taylor <iant@google.com>
2957
2958 * lto-object.c (lto_obj_file_open): Call
2959 simple_object_attributes_merge rather than
2960 simple_object_attributes_compare.
2961
a4d8c676
JM
29622010-11-12 Joseph Myers <joseph@codesourcery.com>
2963
2964 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2965 * lto-lang.c (lto_handle_option): Take location_t parameter.
2966
d8a07487
JM
29672010-11-10 Joseph Myers <joseph@codesourcery.com>
2968
2969 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2970 letters and remove trailing '.'.
2971 (lto_file_finalize): Start diagnostic with a lowercase letter.
2972
6b3456d1
ILT
29732010-11-02 Ian Lance Taylor <iant@google.com>
2974
2975 * lto-object.c: New file.
2976 * lto-elf.c: Remove file.
2977 * lto-macho.c: Remove file.
2978 * lto-macho.h: Remove file.
2979 * lto-coff.c: Remove file.
2980 * lto-coff.h: Remove file.
2981 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2982 lto/lto-object.o.
2983 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2984 (lto/lto-objfile.o): New target.
2985 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2986 (lto/lto.o): Remove $(LIBIBERTY_H).
2987
030cd86c
JH
29882010-10-22 Jan Hubicka <jh@suse.cz>
2989
2990 * lto.c (add_cgraph_node_to_partition,
2991 add_varpool_node_to_partition): Add debug info.
2992 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2993 partitioned nodes.
2994 (do_whole_program_analysis): Set function flags before dumping.
2995
4490cae6
RG
29962010-10-22 Richard Guenther <rguenther@suse.de>
2997
2998 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2999 the new gimple_register_canonical_type.
3000
703cdce3
L
30012010-10-20 H.J. Lu <hongjiu.lu@intel.com>
3002
3003 PR bootstrap/45954
3004 * config-lang.in (boot_language): Set to $enable_lto.
3005
1915c739
JJ
30062010-10-18 Jakub Jelinek <jakub@redhat.com>
3007
3008 PR lto/45638
3009 * Make-lang.in (check-lto): New dummy target.
3010
82971de5
EB
30112010-10-14 Eric Botcazou <ebotcazou@adacore.com>
3012
3013 * lto-elf.c (SHN_XINDEX): Define if not already defined.
3014
a75bfaa6
JM
30152010-10-08 Joseph Myers <joseph@codesourcery.com>
3016
3017 * lto-lang.c (lto_init_options): Change to
3018 lto_init_options_struct. Update parameters.
3019 (LANG_HOOKS_INIT_OPTIONS): Don't define.
3020 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
3021
937f7f69
JH
30222010-10-06 Jan Hubicka <jh@suse.cz>
3023
3024 * lto.c (lto_balanced_map): Fix accounting of program size.
3025
2169830c
JH
30262010-10-06 Jan Hubicka <jh@suse.cz>
3027
3028 * lto.c (lto_balanced_map): Do not produce empty partitions.
3029
ecdbd01a 30302010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
3031
3032 * lto.c (lto_process_name): Add.
3033 (lto_main): Call lto_process_name.
3034
06ed016f
JH
30352010-10-06 Jan Hubicka <jh@suse.cz>
3036
3037 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3038 COMDATs required by the linker.
3039
ae718d66
ILT
30402010-10-05 Ian Lance Taylor <iant@google.com>
3041
3042 * lto.c (lto_section_with_id): Make s a const pointer.
3043
852e4bd2
JH
30442010-10-05 Jan Hubicka <jh@suse.cz>
3045
ab20d992 3046 * lto.c: Include params.h.
852e4bd2
JH
3047 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3048 refcounting in aux field.
3049 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3050 New functions.
3051 (lto_1_to_1_map): Simplify.
3052 (lto_balanced_map): New function.
3053 (do_whole_program_analysis): Chose proper partitioning alg.
3054 * Make-lang.in (lto.o): Add dependency on params.h
3055
ecdbd01a 30562010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
3057
3058 * Make-lang.in (lto1): Add + to build rule.
3059
ecdbd01a 30602010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
3061
3062 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 3063 with fatal_error.
f1e92a43 3064
0d6e14fd
JH
30652010-09-28 Jan Hubicka <jh@suse.cz>
3066
3067 * lto-lang.c (handle_leaf_attribute): New function.
3068 (lto_attribute_tables): Add leaf.
3069
fb462383
JZ
30702010-09-25 Jie Zhang <jie@codesourcery.com>
3071
3072 * lto.c (lto_read_all_file_options): Start a new line after
3073 printing out file names.
3074
051f8cc6
JH
30752010-09-24 Jan Hubicka <jh@suse.cz>
3076
3077 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3078
64e0f5ff
JH
30792010-09-20 Jan Hubicka <jh@suse.cz>
3080
3081 PR tree-optimize/45605
3082 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3083
a929ec3d
GP
30842010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3085
3086 * lto-elf.c (lto_obj_file_open): Also provide filename when
3087 elf_begin fails.
3088
4c588abf
JH
30892010-09-17 Jan Hubicka <jh@suse.cz>
3090
3091 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3092
c3224d6f
RG
30932010-09-17 Richard Guenther <rguenther@suse.de>
3094
3095 * lang.opt (flag_wpa): Also enable for the driver.
3096
52b3b3c7
JH
30972010-09-16 Jan Hubicka <jh@suse.cz>
3098
3099 * lto.c (lto_materialize_function): Do not tamper with STATIC and
ab20d992 3100 EXTERNAL flags.
52b3b3c7 3101
969c37b7
LB
31022010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3103
3104 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3105
098a4f50
JH
31062010-09-08 Jan Hubicka <jh@suse.cz>
3107
3108 * lto.c (real_file_count, real_file_decl_data): New static vars.
3109 (read_cgraph_and_symbols): Use it.
3110
0f443ad0
RG
31112010-09-08 Richard Guenther <rguenther@suse.de>
3112
3113 * lto.c (read_cgraph_and_symbols): Collect again after each
3114 file.
3115
ee187353
JH
31162010-09-07 Jan Hubicka <jh@suse.cz>
3117
3118 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3119
b3ec52d0
RG
31202010-09-03 Richard Guenther <rguenther@suse.de>
3121
3122 * lto-elf.c (validate_file): Always error if validation fails.
3123
f1395d4a
JH
31242010-08-20 Jan Hubicka <jh@suse.cz>
3125
3126 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3127 (lto_wpa_write_files): Update comments.
3128
2429bce3
L
31292010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3130
3131 PR bootstrap/45357
3132 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3133 with has_analyzed_clone_p.
3134
e0f967db
JH
31352010-08-20 Jan Hubicka <jh@suse.cz>
3136
3137 * lto.c (has_analyzed_clone_p): New function
3138 (lto_materialize_function): Use callgraph to determine if
3139 body is needed.
3140 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3141
ac47786e
NF
31422010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3143
3144 * lto.c: Use FOR_EACH_VEC_ELT.
3145
ecdbd01a 31462010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3147
3148 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3149
5f20c657
JM
31502010-07-27 Joseph Myers <joseph@codesourcery.com>
3151
3152 * lto-lang.c (lto_handle_option): Update prototype and return
3153 value type. Remove duplicate assignment to result.
3154
7a9bf9a4
JM
31552010-07-27 Joseph Myers <joseph@codesourcery.com>
3156
3157 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3158 New.
3159 (lto_init_options): Update prototype.
3160 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3161 Define.
3162
ecdbd01a 31632010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3164
3165 PR lto/44992
92a285c1 3166 * lto.c: Include splay-tree.h
73ce4d1e
AK
3167 (lto_resolution_read): Change to walk file_ids tree and parse
3168 extra file_id in resolution file.
3169 (lto_section_with_id): Add.
3170 (create_subid_section_table): Add.
3171 (lwstate): Add.
3172 (lto_create_files_from_ids): Add.
3173 (lto_file_read): Change to handle sub file ids and create list
3174 of file_datas. Add output argument for count.
3175 (get_section_data): Pass file_data to lto_get_section_name.
3176 (lto_flatten_file): Add.
3177 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3178
ecdbd01a 31792010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3180
3181 * lto-coff.c (hash_name, eq_name): Move.
3182 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3183 * lto-elf.c: (hash_name, eq_name): Move.
3184 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3185 * lto-macho.c: (hash_name, eq_name): Move.
3186 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3187 * lto.c: (hash_name, eq_name): Move from lto-*.c
3188 (lto_obj_create_section_hash_table): Add.
3189 (free_with_string): Add.
3190
718f9c0f
MLI
31912010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3192
3193 * lto-coff.c: Include diagnostic-core.h in every file that
3194 includes toplev.h.
3195 * lto-elf.c: Likewise.
3196 * lto-lang.c: Likewise.
3197 * lto-macho.c: Likewise.
3198
1b137837
JJ
31992010-07-07 Jakub Jelinek <jakub@redhat.com>
3200
3201 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3202 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3203 objects.
3204
92eb4438
JH
32052010-07-05 Jan Hubicka <jh@suse.cz>
3206
3207 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3208 nodes from same comdat group as well as all comdat functions referenced
3209 here.
b9843260
EB
3210 (add_varpool_node_to_partition, add_references_to_partition): New
3211 function.
3212 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3213 add_varpool_node_to_partition; clear aux flags when done.
3214 (lto_promote_cross_file_statics): Do not promote stuff that gets
3215 duplicated to each ltrans.
92eb4438 3216
a05541a9
JH
32172010-07-04 Jan Hubicka <jh@suse.cz>
3218
92a285c1 3219 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3220
4a2ac96f
RG
32212010-06-13 Richard Guenther <rguenther@suse.de>
3222
3223 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3224
1d536046
KT
32252010-06-09 Kai Tietz <kai.tietz@onevision.com>
3226
ab20d992 3227 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1d536046
KT
3228 * lto-coff.c (coff_write_object_file): Add braces to if.
3229
a9429e29
LB
32302010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3231
3232 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3233 (lto_file_read): Likewise.
3234 (new_partition): Likewise.
3235 (read_cgraph_and_symbols): Likewise.
3236
5498f011
JM
32372010-06-07 Joseph Myers <joseph@codesourcery.com>
3238
3239 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3240 (lto_handle_option): Don't set flag_signed_char here.
3241
d4c0c9f6
RG
32422010-06-04 Richard Guenther <rguenther@suse.de>
3243
3244 PR lto/41584
3245 * lto.c (lto_1_to_1_map): Use the proper file_data for
3246 varpool nodes.
3247
0a5fa5a1
JH
32482010-05-30 Jan Hubicka <jh@suse.cz>
3249
3250 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3251 partitioning decisions.
3252
9eec9488
JH
32532010-05-29 Jan Hubicka <jh@suse.cz>
3254
3255 * lto.c (bitmap vector): Remove.
3256 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3257 (ltrans_partition_def): New structure.
3258 (ltrans_partition): New type and VECtor.
3259 (new_partition): New function.
3260 (add_cgraph_node_to_partition): New function.
3261 (lto_1_to_1_map): Reorganize for partitions.
3262 (lto_add_inline_clones): Remove.
3263 (lto_add_all_inlinees): Remove.
3264 (lto_promote_cross_file_statics): Use partitions.
3265 (cmp_partitions): New function.
3266 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3267 use partitions; output files sorted by size.
3268
3e097227
SB
32692010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3270
3271 * Make-lang.in: Replace vec.h dependency with VEC_H.
3272
7ca92787
JM
32732010-05-28 Joseph Myers <joseph@codesourcery.com>
3274
3275 * lto-coff.c (coff_errmsg): Remove.
3276 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3277 errors instead of coff_errmsg (-1).
3278 * lto-macho.c (mach_o_errmsg): Remove.
3279 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3280 instead of mach_o_errmsg (-1).
3281 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3282 xstrerror (errno).
3283
b5611987
RG
32842010-05-28 Richard Guenther <rguenther@suse.de>
3285
3286 * lto.c (prefix_name_with_star): Removed.
3287 (strip_extension): Likewise.
3288 (get_filename_for_set): Likewise.
3289 (lto_write_ltrans_list): Fold into ...
3290 (lto_wpa_write_files): ... this. Name LTRANS units
3291 by suffixing the ltrans output list filename.
3292 (do_whole_program_analysis): Adjust.
3293
1da2ed5f
JM
32942010-05-27 Joseph Myers <joseph@codesourcery.com>
3295
3296 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3297 (read_cgraph_and_symbols, lto_main): Use seen_error.
3298 * Make-lang.in (lto/lto.o): Update dependencies.
3299
7951d88a
EB
33002010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3301
3302 PR lto/44230
3303 * lto.h (lto_eh_personality): New prototype.
3304 * lto.c: Include debug.h.
3305 (first_personality_decl): New static variable.
3306 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3307 first function for which it is non-null.
3308 (lto_eh_personality_decl): New static variable.
3309 (lto_eh_personality): New function.
3310 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3311 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3312
e12da9c2
SB
33132010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3314
3315 * lto-lang.c: Do not include expr.h.
3316
468194f4
RG
33172010-05-24 Richard Guenther <rguenther@suse.de>
3318
3319 * lto-elf.c (lto_obj_build_section_table): Work around
3320 FreeBSD libelf issue.
3321
bd9eb5da
RG
33222010-05-22 Richard Guenther <rguenther@suse.de>
3323
3324 * lto.c (read_cgraph_and_symbols): Do not collect.
3325
66576e1b
JH
33262010-05-20 Jan Hubicka <jh@suse.cz>
3327
3328 * lto.c (promote_var, promote_fn): New functions.
3329 (lto_promote_cross_file_statics): Compute correctly boundary including
3330 static initializers of readonly vars.
3331
36576655
JH
33322010-05-18 Jan Hubicka <jh@suse.cz>
3333
66576e1b 3334 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3335 (lto_promote_cross_file_statics): Deal with non-inline clones.
3336
28632d63
JH
33372010-05-18 Jan Hubicka <jh@suse.cz>
3338
3339 * lto.c (lto_materialize_function): Announce function when
3340 reading body; allocate_struct_function only when reading body;
3341 do not finalize local statics; ggc_collect after reading;
3342 do not mark reachable node.
3343 (materialize_cgraph): Do not announce function.
3344
33e42d56
JH
33452010-05-11 Jan Hubicka <jh@suse.cz>
3346
3347 * lto.c (materialize_cgraph): Revert my previous patch.
3348
f6430ea5
KT
33492010-05-11 Kai Tietz <kai.tietz@onevision.com>
3350
3351 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3352 IMAGE_FILE_MACHINE_AMD64.
3353 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3354
0a0b07b7
JH
33552010-05-11 Jan Hubicka <jh@suse.cz>
3356
3357 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3358 (materialize_cgraph): Add it here.
3359
9a809897
JH
33602010-05-11 Jan Hubicka <jh@suse.cz>
3361
3362 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3363 vector.
3364
33652010-05-11 Jan Hubicka <jh@suse.cz>
3366
3367 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3368 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3369 use reachable_from_other_partition_p and
3370 referenced_from_other_partition_p test.
3371
94f64249
KT
33722010-05-11 Kai Tietz <kai.tietz@onevision.com>
3373
3374 * lto-coff.c (validate_file): Add x64-coff support.
3375 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3376 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3377 * lto-lang.c (lto_build_c_type_nodes): Add check for
3378 'long long unsigned int' for x64-windows.
3379 (lto_init): Likewise.
3380
c082f9f3
SB
33812010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3382
3383 * lto.h (struct lto_file_struct): Document offset member.
3384 * lto-endian.h: New file.
3385 * lto-macho.h: New file.
3386 * lto-macho.c: New file.
3387 * Make-lang.in: Add rule for lto-macho.o.
3388
3f8257db 33892010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3390
3391 PR lto/43857
3392 PR lto/43371
3393 * lang.opt (fresolution): Change to ...
3394 (fresolution=): ... this.
3395 * lto-lang.c (lto_handle_option): Adjust.
3396
48cf395b
RB
33972010-05-07 Richard Guenther <rguenther@suse.de>
3398
3399 * lto.c (DUMPBASE_SUFFIX): Remove.
3400 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3401 Rename to ...
3402 (lto_write_ltrans_list): ... only output the list of ltrans files.
3403 (lto_maybe_unlink): Remove.
3404 (do_whole_program_analysis): Do not execute LTRANS phase
3405 from here.
3406
afa83c15
L
34072010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3408
3409 * lto-lang.c (lto_handle_option): Add argument kind.
3410
369451ec
JH
34112010-05-05 Jan Hubicka <jh@suse.cz>
3412
48cf395b
RB
3413 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3414 refs.
369451ec 3415
2f41ecf5
JH
34162010-05-05 Jan Hubicka <jh@suse.cz>
3417
3418 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3419
ace72c88
JH
34202010-04-30 Jan Hubicka <jh@suse.cz>
3421
b9843260
EB
3422 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3423 use default name.
ace72c88
JH
3424 (lto_wpa_write_files): Write any non-empty partition.
3425
05575e07
JH
34262010-04-30 Jan Hubicka <jh@suse.cz>
3427
3428 * lto.c: Do not attempt to make constant pool references global.
3429
49ba8180
JH
34302010-04-28 Jan Hubicka <jh@suse.cz>
3431
ab20d992 3432 * lto.c (lto_read_in_decl_state): Use GGC.
49ba8180
JH
3433 (lto_wpa_write_files): Announce what we are writting.
3434 (all_file_decl_data): New.
3435 (read_cgraph_and_symbols): Use GGC; correct timevars.
3436 (do_whole_program_analysis): Collect.
ab20d992 3437 * Make-lang.in (lto.o): Fix dependency.
49ba8180
JH
3438 * Makefile.in (GTFILES): Add lto-streamer.h.
3439 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3440 (varpool_assemble_pending_decls): Use VAROUT.
3441 * lto-streamer.h (lto_tree_ref_table): Annotate.
3442 (lto_in_decl_state): Annotate.
3443 (lto_file_decl_data): Annotate.
3444
2942c502
JH
34452010-04-28 Jan Hubicka <jh@suse.cz>
3446
3447 * lto.c (lto_varpool_node_sets): New.
3448 (lto_1_to_1_map): Partition varpool too.
3449 (globalize_context_t, globalize_cross_file_statics,
3450 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3451 lto_scan_statics_in_remaining_global_vars): Remove.
3452 (lto_promote_cross_file_statics): Rewrite.
3453 (get_filename_for_set): Take vset argument.
3454 (lto_wpa_write_files): Pass around vsets.
3455
3bec79c5
DK
34562010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3457
3458 PR lto/42776
3459 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3460 hardcoding 'lto-elf.o'.
3461 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3462
3463 * lto-coff.h: New file.
3464 * lto-coff.c: Likewise.
3465
21aac880
RG
34662010-04-26 Richard Guenther <rguenther@suse.de>
3467
3468 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3469
2cee0101
DK
34702010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3471
3472 * lto.h (lto_elf_file_open): Rename prototype from this ...
3473 (lto_obj_file_open): ... to this.
3474 (lto_elf_file_close): Likewise ...
3475 (lto_obj_file_close): ... and likewise.
3476 (lto_elf_build_section_table): Likewise ...
3477 (lto_obj_build_section_table): ... and likewise.
3478 (lto_elf_begin_section): Likewise ...
3479 (lto_obj_begin_section): ... and likewise.
3480 (lto_elf_append_data): Likewise ...
3481 (lto_obj_append_data): ... and likewise.
3482 (lto_elf_end_section): Likewise ...
3483 (lto_obj_end_section): ... and likewise.
3484 * lto.c (lto_file_read): Update references to the above.
3485 (lto_wpa_write_files): Likewise.
3486 (lto_read_all_file_options): Likewise.
3487 (read_cgraph_and_symbols): Likewise.
3488 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3489 (LANG_HOOKS_APPEND_DATA): Likewise.
3490 (LANG_HOOKS_END_SECTION): Likewise.
3491 * lto-elf.c (lto_elf_file_open): Rename from this ...
3492 (lto_obj_file_open): ... to this, updating any references.
3493 (lto_elf_file_close): Likewise ...
3494 (lto_obj_file_close): ... and likewise.
3495 (lto_elf_build_section_table): Likewise ...
3496 (lto_obj_build_section_table): ... and likewise.
3497 (lto_elf_begin_section): Likewise ...
3498 (lto_obj_begin_section): ... and likewise.
3499 (lto_elf_append_data): Likewise ...
3500 (lto_obj_append_data): ... and likewise.
3501 (lto_elf_end_section): Likewise ...
3502 (lto_obj_end_section): ... and likewise.
3503
bc58d7e1
JH
35042010-04-21 Jan Hubicka <jh@suse.cz>
3505
3506 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3507 (materialize_cgraph): Likewise.
3508
e792884f
JH
35092010-04-21 Jan Hubicka <jh@suse.cz>
3510
3511 * lto.c (lto_wpa_write_files): Update.
3512 (read_cgraph_and_symbols): Be more verbose.
3513 (materialize_cgraph): Likewise.
3514 (do_whole_program_analysis): Likewise.
3515
c9945504
JH
35162010-04-21 Jan Hubicka <jh@suse.cz>
3517
3518 * lto.c (globalize_cross_file_statics): When function has address taken,
3519 it needs to be public.
3520
a837268b
JH
35212010-04-20 Jan Hubicka <jh@suse.cz>
3522
3523 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3524 (lto_add_all_inlinees): Likewise.
3525 (lto_wpa_write_files): Likewise.
3526
3b9e5d95
EB
35272010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3528
3529 * lto-lang.c (lto_init): Remove second argument in call to
3530 build_common_tree_nodes.
3531
8ccb78f2
RO
35322010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3533
3534 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3535 function.
3536
2f9b99e6
EB
35372010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3538
3539 PR bootstrap/43276
3540 * lto-elf.c: Define EM_* constants if not already defined.
3541
bef7d288
EB
35422010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3543
3544 * lto-elf.c (is_compatible_architecture): New static function.
3545 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3546
f68df07c
RG
35472010-02-11 Richard Guenther <rguenther@suse.de>
3548
3549 PR driver/43021
3550 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3551 appropriately.
3552
3cdea2b4
AH
35532010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3554
3555 * lto.c (O_BINARY): Define.
3556 (lto_read_section_data): Open file in binary mode.
3557 * lto-elf.c (O_BINARY): Define.
ab20d992 3558 (lto_elf_file_open): Open file in binary mode.
3cdea2b4 3559
c59449fa
RG
35602010-01-08 Richard Guenther <rguenther@suse.de>
3561
3562 PR lto/42528
3563 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3564 (lto_init): Do not init char_type_node in a standard way
3565 but according to flag_signed_char.
3566
d7fb0a6d
L
35672010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3568
3569 PR lto/41564
3570 * lto.c (DUMPBASE_SUFFIX): New.
3571 (lto_execute_ltrans): Append a sequence number to -dumpbase
3572 for LTRANS.
3573
78ce4053
L
35742010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3575
3576 PR lto/42580
3577 * lto-elf.c (lto_elf_file_open): Stop if the command line
3578 option file is missing.
3579
2a71eb48
RG
35802009-12-15 Richard Guenther <rguenther@suse.de>
3581
3582 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3583 (lto_post_options): Do not disable debuginfo.
3584
a818bca1
DG
35852009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3586
3587 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3588
e7d00517
RG
35892009-12-11 Richard Guenther <rguenther@suse.de>
3590
3591 PR lto/42037
3592 * lto.c (lto_resolution_read): Properly grow the vector.
3593
1ab53893
RG
35942009-12-11 Richard Guenther <rguenther@suse.de>
3595
3596 PR lto/41915
3597 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3598 to the C99 default. Do not set flag_unit_at_a_time.
3599
0f900dfa
JJ
36002009-11-28 Jakub Jelinek <jakub@redhat.com>
3601
3602 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3603 variable.
3604
92fa7608
RAE
36052009-11-19 Rafael Avila de Espindola <espindola@google.com>
3606
3607 PR bootstrap/42096
3608 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3609 * lto.c (lto_parse_hex): New.
3610 (lto_resolution_read): Use lto_parse_hex.
3611 * lto.h (lto_parse_hex): New.
3612
9870fe4f
RAE
36132009-11-17 Rafael Avila de Espindola <espindola@google.com>
3614
3615 * lto-elf.c (lto_file_init): Add offset argument.
3616 (lto_elf_file_open): Record the offset.
3617 * lto.c (lto_resolution_read): Change file_name into a lto_file
3618 argument. Check offsets.
3619 (lto_file_read): Update call to lto_resolution_read.
3620 * lto.h (lto_file_struct): Add the offset field.
3621
1b70729f
RAE
36222009-11-16 Rafael Avila de Espindola <espindola@google.com>
3623
3624 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3625
0e3776db
JH
36262009-11-14 Jan Hubicka <jh@suse.cz>
3627
3628 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3629
06bd7f56
RAE
36302009-11-12 Rafael Avila de Espindola <espindola@google.com>
3631
3632 * lang.opt (fresolution): Renamed from resolution.
3633 * lto-lang.c (lto_handle_option): Handle new option name.
3634 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3635
7e9dc421 36362009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3637 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3638
3639 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3640 (lto_elf_file_open): Handle offsets in arguments name@offest.
3641
b207f900
RG
36422009-10-30 Richard Guenther <rguenther@suse.de>
3643
3644 PR lto/41858
3645 * lto.c (lto_file_read): Do not set file_data->fd.
3646 (lto_read_section_data): Use a single-entry file-descriptor cache.
3647 Do not check the result of xmalloc.
3648 (free_section_data): Do not use file_data->fd.
3649 (lto_read_all_file_options): Likewise.
3650
2c928155
RG
36512009-10-22 Richard Guenther <rguenther@suse.de>
3652
3653 * lto.c (lto_fixup_jump_functions): Remove.
3654 (lto_fixup_decls): Do not fixup jump functions.
3655 (read_cgraph_and_symbols): Schedule cgraph merging after
3656 summary reading. Schedule type and decl fixup before
3657 summary reading.
3658
f9c91f8a
RB
36592009-10-22 Richard Guenther <rguenther@suse.de>
3660
3661 * lto.c (lto_fixup_data_t): Remove free_list member.
3662 (lto_fixup_tree): Do not insert into free_list.
3663 (free_decl): Remove.
3664 (lto_fixup_decls): Remove free-list handling.
3665
fb3f88cc
JH
36662009-10-22 Jan Hubicka <jh@suse.cz>
3667
3668 * lto.c (lto_fixup_jump_functions): New function.
3669 (lto_fixup_decls): Use it.
3670
35f1e9f4
RG
36712009-10-16 Richard Guenther <rguenther@suse.de>
3672
3673 PR lto/41715
3674 * lto.c (lto_fixup_tree): Revert last change.
3675
200c8750
RG
36762009-10-14 Richard Guenther <rguenther@suse.de>
3677
3678 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3679 compatible with the one we replace wrap it around a
3680 VIEW_CONVERT_EXPR.
3681
b1b07c92
RG
36822009-10-09 Richard Guenther <rguenther@suse.de>
3683
3684 PR lto/41635
3685 PR lto/41636
3686 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3687 a file.
3688 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3689 (init_ehdr##BITS): Likewise.
3690
3c2e7d45
JM
36912009-10-08 Joseph Myers <joseph@codesourcery.com>
3692
3693 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3694 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3695 diagnostics.
3696 * lto-lang.c (lto_post_options): Remove trailing "." from
3697 diagnostics.
3698
0d0bfe17
RG
36992009-10-08 Richard Guenther <rguenther@suse.de>
3700
3701 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3702 hash tables.
3703
4bedf19a
JM
37042009-10-07 Joseph Myers <joseph@codesourcery.com>
3705
3706 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3707
b20996ff
JH
37082009-10-07 Jan Hubicka <jh@suse.cz>
3709
3710 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3711 ltrans stage; explain why this is needed and should not.
3712
1a735925
RG
37132009-10-05 Richard Guenther <rguenther@suse.de>
3714
3715 PR lto/41552
3716 PR lto/41487
3717 * lto.c (lto_read_decls): Do not register deferred decls.
3718 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3719 until after reading the IPA summaries.
3720
d7f09764
DN
37212009-10-02 Rafael Avila de Espindola <espindola@google.com>
3722
3723 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3724 (lto-lang.c): Don't include lto/common.h.
3725
37262009-10-02 Rafael Avila de Espindola <espindola@google.com>
3727
3728 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3729 (lto/common.o): Remove.
3730 * common.c: Remove.
3731 * common.h (lto_kind_str): Remove.
3732 (lto_visibility_str): Remove.
3733 (lto_resolution_str): Make it static.
3734
37352009-10-01 Diego Novillo <dnovillo@google.com>
3736
3737 * lto.c (lto_read_decls): Add comment.
3738 Call internal_error instead of gcc_assert.
3739 (lto_resolution_read): Likewise.
3740 (lto_add_all_inlinees): Tidy.
3741 * Make-lang.in: Fix copyright boilerplate.
3742 (lto.pdf): New.
3743 (lto.install-pdf): New.
3744 * lto-tree.h: Fix copyright boilerplate.
3745 * lang-specs.h: Likewise.
3746 Remove ".lto" entry from compilers fragment.
3747 * lto-elf.c: Move inclusion of gelf.h after config.h.
3748 Tidy formatting everywhere.
3749 * lto.h: Fix copyright boilerplate.
3750 Tidy formatting everywhere.
3751 * common.c: Likewise.
3752 * config-lang.in: Likewise.
3753 * common.h: Likewise.
3754 * lto-lang.c: Likewise.
3755
37562009-10-01 Richard Guenther <rguenther@suse.de>
3757
3758 * lto.c (lto_read_section_data): Use plain lseek/read.
3759
37602009-10-01 Richard Guenther <rguenther@suse.de>
3761
3762 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3763 use sysconf to query the system page size.
3764 (lto_file_read): Implement fallback using stdio.
3765 (free_section_data): Likewise.
3766
37672009-09-29 Diego Novillo <dnovillo@google.com>
3768
3769 * lto-lang.c (lto_init): Really fix call to
3770 build_common_builtin_nodes.
3771
37722009-09-29 Diego Novillo <dnovillo@google.com>
3773
3774 * lto-lang.c (lto_init): Fix call to
3775 build_common_builtin_nodes.
3776
37772009-09-29 Richard Guenther <rguenther@suse.de>
3778
3779 PR lto/40754
3780 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3781 in bytes.
3782 (first_data_block): New static variable.
3783 (lto_elf_append_data): Align the first data block in each
3784 section.
3785
37862009-09-28 Diego Novillo <dnovillo@google.com>
3787
3788 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3789 * lto.c (strip_extension): New.
3790 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3791 (lto_execute_ltrans): Tidy.
3792 Do not pass -fwpa nor -fltrans-* to LTRANS.
3793 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3794 * tree.c (need_assembler_name_p): Call
3795 lang_hooks.decls.may_need_assembler_name_p if set.
3796 * varasm.c (default_binds_local_p_1): Remove check for
3797 flag_ltrans.
3798 * varpool.c (decide_is_variable_needed): Do not test for
3799 in_lto_p.
3800
38012009-09-22 Richard Guenther <rguenther@suse.de>
3802
3803 PR lto/39276
3804 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3805 * Make-lang.in: Remove ltrans-driver stuff.
3806 * config-lang.in: Likewise.
3807 * lang.opt (fltrans-driver): Remove.
3808 * lto-lang.c (lto_init_options): Remove code initializing
3809 ltrans_driver.
3810 * ltrans-driver: Remove.
3811
38122009-09-21 Diego Novillo <dnovillo@google.com>
3813
3814 * lto-lang.c (lto_define_builtins): Remove superfluous
3815 calls to targetm.init_builtins and build_common_builtin_nodes.
3816 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3817 build_common_builtin_nodes.
3818 * lto.c (lto_materialize_function): Do nothing if NODE is a
3819 clone.
3820
38212009-09-03 Diego Novillo <dnovillo@google.com>
3822
3823 * lto-elf.c (validate_file): Replace call to
3824 elf_getshstrndx with call to elf_getshdrstrndx.
3825
38262009-08-19 Richard Guenther <rguenther@suse.de>
3827
3828 * lto-lang.c (lto_init): Merge char_type_node with the
3829 appropriately signed variant.
3830
38312009-08-19 Richard Guenther <rguenther@suse.de>
3832
3833 PR lto/41071
3834 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3835 (lto_fixup_type): Re-build the pointer-to chain part two.
3836
38372009-08-19 Richard Guenther <rguenther@suse.de>
3838
3839 PR lto/41071
3840 * lto.c (lto_fixup_type): Re-build the type variant chain.
3841
38422009-08-19 Richard Guenther <rguenther@suse.de>
3843
3844 PR lto/41071
3845 * lto.c (lto_fixup_constructor): New function.
3846 (lto_fixup_tree): Replace all types. Properly fixup
3847 constructors and constants.
3848
38492009-08-14 Richard Guenther <rguenther@suse.de>
3850
3851 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3852 for DECL_LANG_SPECIFIC.
3853
38542009-08-13 Richard Guenther <rguenther@suse.de>
3855
3856 PR lto/41032
3857 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3858
38592009-07-30 Richard Guenther <rguenther@suse.de>
3860
3861 PR lto/40903
3862 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3863 the largest decl for output and free TREE_CHAIN for further
3864 use.
3865
38662009-07-24 Diego Novillo <dnovillo@google.com>
3867
3868 * Make-lang.in: Add empty lto.install-plugin target.
3869
38702009-07-13 Diego Novillo <dnovillo@google.com>
3871
3872 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3873
38742009-07-11 Richard Guenther <rguenther@suse.de>
3875
3876 * lto-lang.c (lto_write_globals): Wrapup global decls.
3877
38782009-07-10 Richard Guenther <rguenther@suse.de>
3879
3880 * lto-lang.c (lto_init): Allocate one more location to make
3881 BUILTINS_LOCATION correct.
3882
38832009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3884
3885 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3886
38872009-07-06 Diego Novillo <dnovillo@google.com>
3888
3889 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3890 TYPE_SIZE_UNIT.
3891
38922009-07-06 Diego Novillo <dnovillo@google.com>
3893
3894 * lto.c (preload_common_nodes): Remove.
3895 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3896 (lto_read_decls): Call lto_data_in_create and
3897 lto_data_in_delete.
3898 (free_decl): Do not call ggc_free.
3899 (lto_main): Call lto_init_reader.
3900 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3901 (lto_init): Initialize main_identifier_node if needed.
3902 Make ptrdiff_type_node be integer_type_node.
3903
39042009-06-19 Diego Novillo <dnovillo@google.com>
3905
3906 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3907 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3908 Remove code guarded by #ifdef LOCAL_TRACE.
3909
39102009-06-18 Diego Novillo <dnovillo@google.com>
3911
3912 * lto.c: Update license to GPLv3.
3913 * lto-elf.c: Likewise.
3914 * common.c: Likewise.
3915 * lto-lang.c: Likewise.
3916 * lto.h: Remove superfluous include files. Update all
3917 users.
3918
39192009-06-17 Diego Novillo <dnovillo@google.com>
3920
3921 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3922
39232009-06-02 Diego Novillo <dnovillo@google.com>
3924
3925 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3926 read in.
3927 (materialize_cgraph): Only materialize nodes that have a
3928 representation on file.
3929
39302009-06-01 Diego Novillo <dnovillo@google.com>
3931
3932 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3933
39342009-05-31 Diego Novillo <dnovillo@google.com>
3935
3936 * lto-lang.c (lto_type_for_mode): Handle all the modes
3937 handled in c_common_type_for_mode.
3938
39392009-05-21 Diego Novillo <dnovillo@google.com>
3940
3941 * lto-elf.c: Always include <gelf.h>.
3942 * config-lang.in (target_libs): Remove.
3943 (build_by_default): Set to no.
3944
39452009-05-15 Diego Novillo <dnovillo@google.com>
3946
3947 * lto.c (lto_materialize_function): Assert that DECL is
3948 not a builtin.
3949 (materialize_cgraph): Don't try to materialize builtin
3950 functions.
3951 * lto-section-out.c (write_symbol_vec): Do not write
3952 builtin functions.
3953
39542009-05-13 Diego Novillo <dnovillo@google.com>
3955
3956 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3957
39582009-05-07 Diego Novillo <dnovillo@google.com>
3959
3960 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3961 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3962 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3963 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3964 (lto_fixup_tree): Call gimple_register_type when *TP is a
3965 type.
3966 (lto_main): Call bitmap_obstack_initialize.
3967
39682009-04-22 Diego Novillo <dnovillo@google.com>
3969
3970 * lto.c (free_section_data): Tidy.
3971 (lto_1_to_1_map): Tidy.
3972 (lto_add_all_inlinees): Tidy.
3973 (prefix_name_with_star): New.
3974 (get_filename_for_set): New.
3975 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3976 to determine what cgraph node sets to write.
3977 Call get_filename_for_set to compute temporary file
3978 names.
3979 (lto_execute_ltrans): Do not execute LTRANS on files with
3980 names that start with '*'.
3981 Move logic to execute LTRANS together so that LTRANS is
3982 invoked only if there are any files to compile.
3983 (do_whole_program_analysis): Only remove output files
3984 that do not start with '*'.
3985
39862009-04-06 Diego Novillo <dnovillo@google.com>
3987
3988 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3989 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3990 (lto_add_all_inlinees): Tidy.
3991
39922009-03-26 Diego Novillo <dnovillo@google.com>
3993
3994 * lto.c: Include gimple.h.
3995 (lto_read_in_decl_state): Call gimple_register_type for
3996 every type in every stream.
3997 (lto_fixup_common): Call gimple_register_type if T has a
3998 type.
3999 (do_whole_program_analysis): Call print_lto_report.
4000 (lto_main): Call print_lto_report after cgraph_optimize.
4001 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
4002
40032009-03-24 Diego Novillo <dnovillo@google.com>
4004
4005 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
4006 (lto.o): Add dependency on GIMPLE_H.
4007
40082009-03-10 Simon Baldwin <simonb@google.com>
4009
4010 * lto.c (lto_read_all_file_options): Close any open file descriptor
4011 contained in file_data before freeing.
4012
40132009-02-24 Rafael Avila de Espindola <espindola@google.com>
4014
4015 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4016 for a decl in the original bitmap, not a node.
4017 (lto_add_all_inlinees): Remove original nodes that are not needed.
4018 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4019
40202009-02-24 Diego Novillo <dnovillo@google.com>
4021
4022 * lto.c (lto_materialize_function): Update
4023 lto_stats.num_function_bodies.
4024 (get_section_data): Initialize *LEN to 0.
4025 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
4026 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
4027 Update lto_stats.num_output_files.
4028 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4029 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4030 (lto_main): Initialize lto_stats.
4031 If flag_lto_report is set, call print_lto_report.
4032
40332009-02-19 Diego Novillo <dnovillo@google.com>
4034
4035 Revert
4036
4037 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4038
4039 * lto.c (lto_add_inline_clones): Don't add the
4040 master clone. Check for a decl in the original
4041 bitmap, not a node.
4042 (lto_add_all_inlinees): Remove original nodes
4043 that are not needed.
4044 (lto_scan_statics_in_cgraph_node): Don't care if
4045 the node is the master.
4046 (lto_promote_cross_file_statics): Use a new
4047 context.seen_node_decls for each set
4048
40492009-02-19 Rafael Avila de Espindola <espindola@google.com>
4050
4051 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4052 for a decl in the original bitmap, not a node.
4053 (lto_add_all_inlinees): Remove original nodes that are not needed.
4054 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4055 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4056 for each set
4057
40582009-02-18 Diego Novillo <dnovillo@google.com>
4059
4060 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4061 and TV_WHOPR_WPA_IO.
4062 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4063 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4064 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4065 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4066 depending on command line flags.
4067 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4068 (lto_main): Remove timer uses.
4069
40702009-02-18 Rafael Avila de Espindola <espindola@google.com>
4071
4072 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4073 (lto_wpa_write_files): Update calls to renamed functions.
4074
40752009-02-17 Diego Novillo <dnovillo@google.com>
4076
4077 PR 39203
4078 * lto-lang.c (lto_post_options): Disable -fwhole-program
4079 when running LTRANS.
4080
40812009-02-10 Diego Novillo <dnovillo@google.com>
4082
4083 * lto.c (read_cgraph_and_symbols): Fix comment.
4084
40852009-02-10 Diego Novillo <dnovillo@google.com>
4086
4087 * lto.c (read_cgraph_and_symbols): Read options from all
4088 IL files.
4089
40902009-02-10 Diego Novillo <dnovillo@google.com>
4091
4092 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4093 (materialize_cgraph): Likewise.
4094 (do_whole_program_analysis): Likewise.
4095 (lto_main): Call read_cgraph_and_symbols,
4096 materialize_cgraph and do_whole_program_analysis.
4097
40982009-02-10 Simon Baldwin <simonb@google.com>
4099
4100 * lto.c: Include lto-opts.h.
4101 * (lto_main): Clear file options at loop start, read any saved
4102 options from the first file handled, and re-issue options.
4103 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4104
41052009-02-02 Diego Novillo <dnovillo@google.com>
4106
4107 * lto.c (lto_main): Stop LTO_TIMER and use
4108 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4109
41102009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4111
4112 PR lto/38995
4113 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4114 to POINTER_SIZE.
4115
41162009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4117
ab20d992 4118 * Make-lang.in (LTO_EXE): Link with all
d7f09764
DN
4119 BACKENDLIBS and not only GMPLIBS
4120
41212009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4122
4123 PR bootstrap/38992
4124 * lto-elf.c: Include gelf.h instead of libelf.h.
4125 (lto_elf_file_close): Replace elfx_update_shstrndx with
4126 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4127 gelf_update_ehdr.
4128
41292009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4130
4131 PR middle-end/38996
4132 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4133
41342009-01-26 Diego Novillo <dnovillo@google.com>
4135
4136 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4137
41382009-01-26 Diego Novillo <dnovillo@google.com>
4139
4140 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4141 and rename into gimple_types_compatible_p.
4142
41432009-01-12 Rafael Avila de Espindola <espindola@google.com>
4144
4145 * lto-lang.c (lang_hooks): Remove the const qualifier.
4146
41472009-01-06 Diego Novillo <dnovillo@google.com>
4148
4149 * ltrans-driver: Mark 'all' target as phony.
4150
41512008-12-31 Diego Novillo <dnovillo@google.com>
4152
4153 * ltrans-driver: Execute a NOP action for target 'all'.
4154
41552008-12-19 Diego Novillo <dnovillo@google.com>
4156
4157 * lto.c (lto_1_to_1_map): Tidy.
4158
41592008-12-19 Diego Novillo <dnovillo@google.com>
4160
4161 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4162 be opened, show its name.
4163 * ltrans-driver: If $verbose is set, do not use parallelism.
4164
41652008-12-17 Rafael Avila de Espindola <espindola@google.com>
4166
4167 * lto.c (lto_fixup_function): New.
4168 (lto_fixup_tree): Call lto_fixup_function.
4169
41702008-12-14 Doug Kwan <dougkwan@google.com>
4171
4172 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4173 variables if there is no function.
4174
41752008-12-10 Simon Baldwin <simonb@google.com>
4176
4177 * ltrans-driver: Always run make in silent mode, to avoid make's
4178 trace on stdout interfering with lto-wrapper output.
4179
41802008-12-10 Doug Kwan <dougkwan@google.com>
4181
4182 * lto.c (lto_add_inline_clones): Do not force master clones of
4183 inlined functions already in SET to be static inline.
4184
41852008-12-04 Doug Kwan <dougkwan@google.com>
4186
4187 * lto.c (globalize_context_t): New type to store states in
4188 globalization of cross-file statics.
4189 (globalize_cross_file_statics): New.
4190 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4191 static decls that need to be fixed up.
4192 (lto_scan_statics_in_cgraph_node): Change call interface to use
4193 a globalize_context_t CONTEXT for all states used.
4194 (lto_scan_statics_in_remaining_global_vars): New.
4195 (lto_promote_cross_file_statics): Use new call interface of
4196 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4197 visible vars in the last set.
4198
41992008-12-03 Diego Novillo <dnovillo@google.com>
4200
4201 * lto.c (lto_fixup_tree): Do not emit an error when
4202 PREVAILING throw but T doesn't.
4203
42042008-12-02 Doug Kwan <dougkwan@google.com>
4205
4206 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4207 from code in ...
4208 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4209 variables and functions.
4210 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4211 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4212
42132008-11-29 Diego Novillo <dnovillo@google.com>
4214
4215 * lto.c: Include timevar.h.
4216 (lto_materialize_function): Tidy. Add comments.
4217 (lto_wpa_write_files): Tidy.
4218 (lto_execute_ltrans): Tidy.
4219 (lto_main): Add local variable LTO_TIMER. Initialize it
4220 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4221 Start and stop the timer.
4222 Tidy comments.
4223 * Make-lang.in (lto.o): Add dependency on timevar.h.
4224 * ltrans-driver: React to -v and -save-temps.
4225 Use simple heuristic to determine how much parallelism to
4226 use when executing make.
4227
42282008-11-12 Doug Kwan <dougkwan@google.com>
4229
4230 * lto.c (lto_bitmap_obstack): Remove var.
4231 (lto_materialize_function): Do nothing instead of marking function
4232 body in file if flag_wpa is true.
4233 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4234 (lto_scan_statics_in_cgraph_node): New function.
4235 (lto_promote_cross_file_statics): Same.
4236 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4237 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4238 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4239
42402008-11-09 Diego Novillo <dnovillo@google.com>
4241
ab20d992 4242 * lto.c (lto_fixup_tree): Change error message locus
d7f09764
DN
4243 information to include location of mismatching
4244 declaration.
4245 Use TREE_NO_WARNING to avoid repeated messages.
4246 (lto_main): If lto_fixup_decls emitted any errors, exit.
ab20d992 4247 * lto-lang.c: Don't include libfuncs.h and except.h
d7f09764
DN
4248 (lto_init_options): Don't enable exceptions by default.
4249 (lto_eh_runtime_type): Move to lto-function-in.c
4250 (lto_init_eh): Likewise.
4251 (lto_init): Don't call lto_init_eh.
ab20d992 4252 * Make-lang.in (lto-lang.o): Remove dependency on
d7f09764
DN
4253 libfuncs.h and except.h.
4254
42552008-10-30 Diego Novillo <dnovillo@google.com>
4256
4257 * lto.c (lto_read_decls): Declare debug_main only if
4258 LTO_STREAM_DEBUGGING is enabled.
4259
42602008-10-30 Simon Baldwin <simonb@google.com>
4261
4262 * lto.c (lto_wpa_write_files): Create intermediate files with
4263 make_cwd_temp_file().
4264 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4265 WPA_SAVE_LTRANS is set.
4266 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4267 * ltrans-driver: Do not strip directory from output files.
4268
42692008-10-29 Doug Kwan <dougkwan@google.com>
4270
4271 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4272 DECL.
4273 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4274 (lto/lto-symtab.o): Remove rule.
4275 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4276 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4277 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4278 Remove macros.
4279 lto-symtab.c (File): Move up one level.
4280 lto-lang.c (cgraph.h): Remove include.
4281 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4282 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4283 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4284
ab20d992 42852008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4286
4287 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4288 non prevailing weak symbols.
4289
ab20d992 42902008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4291
4292 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4293
ab20d992 42942008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4295
4296 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4297 different types.
4298
42992008-10-23 Simon Baldwin <simonb@google.com>
4300
4301 * lto-lang.c (input_node): Save the node reference, rather than the
4302 node pointer, in node->inlined_to.
4303 (input_cgraph_1): Convert node references into node pointers.
4304
43052008-10-22 Diego Novillo <dnovillo@google.com>
4306 Rafael Espindola <espindola@google.com>
4307
4308 * lto.c (lto_resolution_read): Tidy.
4309 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4310 abort if RET is NULL.
4311
43122008-10-22 Doug Kwan <dougkwan@google.com>
4313
4314 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4315 exceptions flag is given.
4316 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4317 (lto_init_eh): Remove exceptions flag initialization.
ab20d992 4318 (lto_init): Only call lto_init_eh if exceptions flag is set.
d7f09764
DN
4319
43202008-10-21 Diego Novillo <dnovillo@google.com>
4321
4322 * lto.c: Tidy some formatting.
4323 * lto.h: Likewise.
4324
43252008-10-21 Simon Baldwin <simonb@google.com>
4326
4327 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4328 them is NULL (but not the other).
4329
43302008-10-17 Diego Novillo <dnovillo@google.com>
4331
4332 * ltrans-driver: Divert output from make to a temporary file.
4333 Show it if the call to make failed.
4334
43352008-10-15 Diego Novillo <dnovillo@google.com>
4336
4337 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4338 Do not print TEMP_FILENAME
4339 * ltrans-driver: Call make with -s.
4340
43412008-10-15 Diego Novillo <dnovillo@google.com>
4342
4343 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4344 TREE_STATIC on global symbols.
4345
43462008-10-14 Ollie Wild <aaw@google.com>
4347
4348 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4349 (LTRANS_DRIVER_EXE): Add.
4350 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4351 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4352 (lto.install.common): Remove ltrans-driver.
4353 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4354 (LTRANS_DRIVER_EXE): New build rule.
4355 * config-lang.in (compilers): Add ltrans-driver.
4356
43572008-10-14 Diego Novillo <dnovillo@google.com>
4358
4359 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4360 of program name.
4361
43622008-10-13 Ollie Wild <aaw@google.com>
4363
4364 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4365 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4366 * ltrans-driver (LTRANS_FLAGS): Remove.
4367
43682008-10-08 Doug Kwan <dougkwan@google.com>
4369
4370 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4371 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4372 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4373 from lto_fixup_state to here.
4374 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4375 just a free-list. Fix up types also. Move decl merging code to
4376 lto_fixup_tree.
4377 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4378 object.
4379 (lto_fixup_decls): Use another pointer set to avoid multiple
4380 walking of nodes except for DECLs to be replaced. Pass an
4381 lto_fixup_data_t object to tree-walker.
4382
ab20d992 43832008-10-08 Rafael Espindola <espindola@google.com>
d7f09764
DN
4384
4385 * lto-symtab.c (lto_symtab_set_resolution): New.
4386 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4387 lto_symtab_get_resolution.
4388 (lto_symtab_prevailing_decl): Return decl for non public decls.
4389 (lto_symtab_get_resolution): New.
4390 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4391
ab20d992 43922008-10-06 Rafael Espindola <espindola@google.com>
d7f09764
DN
4393
4394 * lto-lang.c: Include cgraph.h.
4395 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4396 input_cgraph): Moved from lto-cgraph.c.
4397 (LANG_HOOKS_INPUT_CGRAPH): New.
4398
ab20d992 43992008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4400
4401 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4402
ab20d992 44032008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4404
4405 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4406 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4407 prevailing definition. Don't mark TREE_NOTHROW differences.
4408 * lto.c (lto_fixup_tree): New.
4409 (lto_fixup_state): New.
4410 (lto_fixup_state_aux): New.
4411 (free_decl): New.
4412 (lto_fixup_decls): New.
4413 (lto_main): Call lto_fixup_decls.
4414
44152008-10-02 Ollie Wild <aaw@google.com>
4416
4417 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4418 and Init.
4419 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4420 * lto-lang.c (lto_post_options): Add validation and fixups for
4421 -fltrans and -fwpa.
4422
ab20d992 44232008-10-02 Rafael Espindola <espindola@google.com>
d7f09764
DN
4424
4425 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4426 lto_symtab_merge_decl): Return void.
4427 (lto_symtab_prevailing_decl): New.
4428
ab20d992 44292008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4430
4431 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4432 defined symbols.
4433 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4434 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4435 Check for already defined symbols.
4436 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4437 (LTO_IDENTIFIER_RESOLUTION): Remove.
4438 (LTO_DECL_RESOLUTION): New.
4439
ab20d992 44402008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4441
4442 * lto.c (lto_read_decls): Use new input_tree signature.
4443
44442008-09-26 Doug Kwan <dougkwan@google.com>
4445
4446 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4447 bodies affected by exception attribute merging of DECLs.
4448 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
ab20d992 4449 merging.
d7f09764
DN
4450
44512008-09-25 Rafael Espindola <espindola@google.com>
4452
4453 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4454 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4455 * lto-symtab.c (lto_symtab_compatible): New.
4456 (lto_symtab_overwrite_decl): New.
4457 (lto_symtab_merge_decl): Refactor to use the above functions
4458 and the resolution from lang_identifier.
4459 * lto-tree.h: Include plugin-api.h.
4460 (lang_identifier): Add resolution.
4461 (LTO_IDENTIFIER_RESOLUTION): New.
4462
44632008-09-25 Ollie Wild <aaw@google.com>
4464
4465 * lang.opt (fltrans-output-list=): New option.
4466 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4467
ab20d992 44682008-09-25 Rafael Espindola <espindola@google.com>
d7f09764
DN
4469
4470 * lto.c (lto_resolution_read): Initialize ret;
4471
44722008-09-24 Ollie Wild <aaw@google.com>
4473
4474 * lto.c (sys/mman.h): Move include.
4475 (lto_wpa_write_files): Return a list of written files.
4476 (lto_execute_ltrans): New function.
4477 (lto_main): Call lto_execute_ltrans.
4478 (ltrans-driver): New file.
4479 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4480 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4481 (lto_init_options): Initialize ltrans_driver.
4482 (lto_handle_option): Fix incorrect default output value.
4483 * lang.opt (fltrans-driver=): New option.
4484 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4485 (lto.install-common): Add lto/ltrans-driver.
4486
ab20d992 44872008-09-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4488
4489 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4490 (lto/lto.o): Depend on lto/common.h.
4491 (lto/common.o): New.
4492 * lang.opt (resolution): New.
4493 * lto-lang.c (resolution_file_name): New.
4494 (lto_handle_option): Handle OPT_resolution.
4495 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4496 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4497 pass it to lto_symtab_merge_decl.
4498 * lto.c: Include common.h.
4499 (lto_read_decls): Add resolutions and resolutions_size arguments.
4500 Initialize data_in.globals_resolution and
4501 data_in.globals_resolution_size.
4502 (index_and_symbol_resolution): New.
4503 (lto_resolution_read): New.
4504 (lto_file_read): Add argument resolution_file.
4505 Read resolution.
4506 * lto.h (resolution_file_name): New.
4507
ab20d992 45082008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4509
4510 * common.c: Update description.
4511 * common.h: Update description.
4512
ab20d992 45132008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4514
4515 * common.c: Moved from lto-plugin.
4516 * common.h: Moved from lto-plugin.
4517
45182008-09-22 Doug Kwan <dougkwan@google.com>
4519
4520 * lto.c (VEC(bitmap,heap)): Declare.
4521 (lto_materialize_function): Handle WAP mode specially.
4522 (lto_add_inline_clones): New.
4523 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4524 return a bitmap of inlined decls.
4525 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4526 (lto_main): Call reset_inline_failed to reset inlining states.
4527 Check call-graph after WPA inlining.
4528 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4529 unconditionally.
4530
45312008-09-19 Doug Kwan <dougkwan@google.com>
4532
4533 lto.c (lto_main): Remove unsued wrapper code.
4534 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4535
45362008-09-19 Rafael Espindola <espindola@google.com>
4537
4538 * lto-symtab.c: Include lto-tree-in.h.
4539 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4540 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4541 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4542
45432008-09-17 Paolo Bonzini <bonzini@gnu.org>
4544 Rafael Avila de Espindola <espindola@google.com>
4545
4546 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4547 COMPOUND_LITERAL_EXPR_DECL): Remove.
4548 (emit_local_var): Remove.
4549 (lto_expand_expr): Remove.
4550 (lto_staticp): Remove.
4551 (LANG_HOOKS_EXPAND_EXPR): Remove.
4552 (LANG_HOOKS_STATICP): Remove.
4553
45542008-09-11 Diego Novillo <dnovillo@google.com>
4555
4556 * lto-lang.c: Include except.h and libfuncs.h.
4557 (lto_init_eh): New.
4558 (lto_init): Call it.
4559 Set flag_generate_lto to 0.
4560 * Make-lang.in (lto-lang.o): Add dependency on except.h
4561 and libfuncs.h.
4562
45632008-09-09 Bill Maddox <maddox@google.com>
4564
4565 * lto-lang.c: Include header file expr.h.
4566 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4567 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
ab20d992 4568 (emit_local_var): Copied from c-semantics.c.
d7f09764
DN
4569 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4570 and c_staticp in c-common.c.
ab20d992 4571 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
d7f09764
DN
4572
45732008-09-08 Diego Novillo <dnovillo@google.com>
4574
4575 * lto-lang.c (lto_global_bindings_p): Return 1 during
4576 IPA passes.
4577
45782008-09-07 Diego Novillo <dnovillo@google.com>
4579
4580 * lto.c: Tidy formatting.
4581
45822008-08-04 Bill Maddox <maddox@google.com>
4583
4584 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
ab20d992 4585
d7f09764
DN
45862008-09-03 Doug Kwan <dougkwan@google.com>
4587
4588 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4589 CIF_OK instead of NULL.
4590
45912008-09-02 Diego Novillo <dnovillo@google.com>
4592 Simon Baldwin <simonb@google.com>
4593
4594 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4595 c_common_type_for_size.
4596 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4597 (lto_init): Call linemap_add.
4598 (signed_and_unsigned_types): Remove.
4599
46002008-08-29 Diego Novillo <dnovillo@google.com>
4601
4602 * lto-lang.c (handle_noreturn_attribute): New local function.
4603 (handle_const_attribute): New local function.
4604 (handle_malloc_attribute): New local function.
4605 (handle_pure_attribute): New local function.
4606 (handle_novops_attribute): New local function.
4607 (handle_nonnull_attribute): New local function.
4608 (handle_nothrow_attribute): New local function.
4609 (handle_sentinel_attribute): New local function.
4610 (handle_type_generic_attribute): New local function.
4611 (handle_format_attribute): New local function.
4612 (handle_format_arg_attribute): New local function.
4613 (lto_attribute_table): Declare.
4614 (lto_format_attribute_table): Declare.
4615 (lto_init_attributes): New local function.
4616 (lto_define_builtins): Call it.
4617 Call targetm.init_builtins and build_common_builtin_nodes.
4618 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4619 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4620
46212008-08-28 Diego Novillo <dnovillo@google.com>
4622
4623 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4624 $(GIMPLE_H).
4625 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4626 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4627 * lto-symtab.c: Include gimple.h.
4628 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4629 TREE_CHAIN.
4630
46312008-08-27 Doug Kwan <dougkwan@google.com>
4632
4633 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4634 gt-lto-lto.h): New includes.
4635 (lto_materialize_function): Do not read in function body in WPA mode.
4636 Format a line to fit in 80 columns.
4637 (lto_cgraph_node_sets): New garbage collected variable.
4638 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4639 New functions.
4640 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
ab20d992 4641 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
d7f09764
DN
4642 variable LTO_SECTION_IN_H.
4643 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4644 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4645 with variable LTO_SECTION_IN_H.
4646 * config-lang.in (gtfiles): Add lto/lto.c.
4647 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4648 merged DECL_RESULT correctly.
4649
46502008-08-26 Bill Maddox <maddox@google.com>
4651
4652 * lto-lang.c Include tree-gimple.h.
4653 (lto_mark_addressable): Call mark_addressable rather than
4654 asserting.
4655 (lto_post_options): Suppress debug info generation.
4656 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
ab20d992 4657
3f8257db 46582008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4659
4660 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4661 assertion and leave an explanatory comment in its place.
ab20d992 4662
d7f09764
DN
46632008-08-21 Doug Kwan <dougkwan@google.com>
4664
4665 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4666 of common nodes instead of computing locallly.
4667 (lto_read_in_decl_state): New.
4668 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4669 Read global and per-function in-decl states.
4670 * Make-lang.in (LTO_H): Update dependency.
4671 (lto/lto.o): Same.
4672 (lto-symtab.c): Merge (revision 139039)
4673 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4674
46752008-08-21 Rafael Espindola <espindola@google.com>
4676
4677 * config-lang.in (target_libs): New.
4678
46792008-08-20 Bill Maddox <maddox@google.com>
4680
4681 * lto.c (current_lto_file): Remove GTY marker from static
4682 variable. Remove include of file gt-lto-lto.h.
4683 * Make-lang.in: Remove dependency of lto/lto.o on
4684 gt-lto-lto.h.
4685 * lto-elf.c (lto_file_close): Removed.
4686 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4687 allocate lto_elf_file object.
4688 (lto_elf_file_close): Free lto_elf_file object after close.
4689 * lto.h (struct lto_file_struct): Remove GTY marker.
4690 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4691 gtfiles.
ab20d992 4692
d7f09764
DN
46932008-08-20 Bill Maddox <maddox@google.com>
4694
4695 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4696 to conform to its new signature.
4697 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4698 on discarded node here, now called in global_vector_fixup.
ab20d992 4699
d7f09764
DN
47002008-08-09 Bill Maddox <maddox@google.com>
4701
4702 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4703 has not been set to a front-end-specific value.
ab20d992 4704
d7f09764 47052008-08-05 Doug Kwan <dougkwan@google.com>
ab20d992 4706
d7f09764
DN
4707 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4708 build breakage.
4709
47102008-07-30 Bill Maddox <maddox@google.com>
4711
4712 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4713 Remove obsolete comments.
4714 (lto_read_decls): Remove initialization of deleted field data_in.global.
4715 Tidy up comments.
4716 (lto_main): Remove redundant initialization of section_hash_table.
4717 * lto-elf.c: Removed obsolete comments.
4718 * lto.h: Tidy up comments.
4719 * lto-symtab.c (lto_least_common_multiple): New function.
4720 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4721 Tidy up comments.
4722
47232008-07-25 Diego Novillo <dnovillo@google.com>
4724 Bill Maddox <maddox@google.com>
4725
4726 * lto.c: Re-order include files.
4727 Include lto-section-out.h.
4728 (preload_common_nodes): Add debugging output.
4729 Add new local INDEX_TABLE.
4730 Call preload_common_node.
4731 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4732
47332008-07-13 Bill Maddox <maddox@google.com>
4734
4735 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4736 unwanted scaling during pointer addition.
4737
47382008-07-11 Bill Maddox <maddox@google.com>
4739 Diego Novillo <dnovillo@google.com>
4740
4741 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4742 Make code const-correct.
4743 (lto_file_read): Fix C++ compatibility warnings.
ab20d992 4744 (lto_read_section_data): Fix C++ compatibility warnings.
d7f09764
DN
4745 (lto_get_section_data): Use CONST_CAST to avoid warning when
4746 const pointer passed to free.
4747 * lto-elf.c (lto_elf_build_section_table): Fix C++
4748 compatibility warnings.
ab20d992 4749 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
d7f09764 4750 to avoid warning assigning const pointer to d_buf field of Elf_Data.
ab20d992 4751 (lto_get_current_out_file): Fix C++ compatibility warnings.
d7f09764
DN
4752
47532008-07-11 Diego Novillo <dnovillo@google.com>
4754
4755 * Make-lang.in (lto-warn): Define.
4756
47572008-07-03 Simon Baldwin <simonb@google.com>
4758
4759 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4760 LTO_STREAM_DEBUGGING.
4761
47622008-06-27 Ollie Wild <aaw@google.com>
4763
4764 * lto-elf.c (lto-section-out.h): New include.
4765 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4766 and data members.
4767 (cached_file_attrs): New static variable.
4768 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4769 Use cached_file_attrs for checking bits.
4770 (lto_elf_build_section_table): Remove elf_file argument from
4771 lto_elf_get_shdr and lto_elf_free_shdr calls.
4772 (DEFINE_INIT_SHDR): New macro.
4773 (init_shdr32, init_shdr64): New functions defined via the
4774 DEFINE_INIT_SHDR macro.
4775 (lto_elf_begin_section_with_type): New function.
4776 (lto_elf_begin_section): New function.
4777 (lto_elf_append_data): New function.
4778 (lto_elf_end_section): New function.
4779 (DEFINE_VALIDATE_EHDR): New macro.
4780 (validate_ehdr32, validate_ehdr64): New functions defined via the
4781 DEFINE_VALIDATE_EHDR macro.
4782 (validate_file): New function.
4783 (DEFINE_INIT_EHDR): New macro.
4784 (init_ehdr32, init_ehdr64): New functions defined via the
4785 DEFINE_INIT_EHDR macro.
4786 (init_ehdr): New function.
4787 (lto_elf_file_open): Add support for writable files. Move some
4788 validation logic to validate_file.
4789 (lto_elf_file_close): Add support for writable files. Write file data
4790 and free data blocks.
4791 (current_out_file): New static variable.
4792 (lto_set_current_out_file): New function.
4793 (lto_get_current_out_file): New function.
4794 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4795 Add temporary initialization for testing ELF serialization.
4796 * lto.h (lto-section-out.h): New include.
4797 (struct lto_file_struct): Slight modification to comment.
4798 (lto_elf_file_open): Add writable parameter.
4799 (lto_elf_begin_section): New function declaration.
4800 (lto_elf_append_data): New function declaration.
4801 (lto_elf_end_section): New function declaration.
4802 (lto_set_current_out_file, lto_get_current_out_file): New function
4803 declarations.
4804 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4805 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4806 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4807 * Make-lang.in (LTO_H): Add lto-section-out.h.
4808
48092008-06-12 Ollie Wild <aaw@google.com>
4810
4811 * lto.h (struct lto_file_vtable_struct): Remove.
4812 (struct lto_file_struct): Remove vtable member.
4813 * lto-elf.c (lto_file_init): Remove vtable argument.
4814 (lto_elf_map_optional_lto_section): Remove.
4815 (lto_elf_unmap_section): Remove.
4816 (lto_elf_file_vtable): Remove.
4817 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4818 lto_file_init call.
4819 (lto_elf_find_section_data): Remove.
4820
48212008-06-11 Ollie Wild <aaw@google.com>
4822
4823 * lto.c (lto_file_read): Add const qualifier to data variable.
4824
48252008-06-11 Diego Novillo <dnovillo@google.com>
4826
4827 Merge from lto-streamber sub-branch.
4828
4829 2008-06-04 Ollie Wild <aaw@google.com>
4830
4831 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4832 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4833
4834 2008-05-28 Bill Maddox <maddox@google.com>
4835
4836 Replace the DWARF reader in the LTO front-end.
4837
4838 * lto.c: Include lto-tree-in.h, lto-tags.h.
4839 (enum DWARF2_class, DW_cl_constant, struct
4840 DWARF2_form_data, struct lto_context,
4841 lto_fd_init, lto_info_fd_init,
4842 lto_abbrev_fd_init, lto_info_fd_close,
4843 lto_file_init, lto_file_close,
4844 lto_file_corrupt_error, lto_abi_mismatch_error,
4845 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4846 lto_read_uleb128, lto_read_sleb128,
4847 lto_read_initial_length, lto_abbrev_read_attrs,
4848 lto_abbrev_read, lto_abbrev_read_lookup,
4849 lto_read_section_offset,
4850 lto_read_comp_unit_header, find_cu_for_offset,
4851 lto_get_file_name,
4852 lto_resolve_reference,lto_read_form,
4853 attribute_value_as_int,
4854 make_signed_host_wide_int,
4855 attribute_value_as_constant, lto_cache_hash,
4856 lto_cache_eq, lto_cache_store_DIE,
4857 lto_cache_lookup_DIE, lto_find_integral_type,
4858 lto_find_integral_type_1,
4859 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4860 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4861 lto_unsupported_attr_error, lto_get_identifier,
4862 lto_read_referenced_type_DIE,
4863 lto_read_compile_unit_DIE,
4864 lto_read_array_type_DIE,
4865 lto_read_structure_union_class_type_DIE,
4866 lto_read_enumerator_DIE,
4867 lto_read_enumeration_type_DIE,
4868 lto_read_only_for_child_DIEs,
4869 lto_read_only_for_child_DIEs,
4870 lto_read_member_DIE, lto_read_abbrev,
4871 lto_read_variable_formal_parameter_constant_DIE,
4872 lto_get_body): Removed.
4873 (preload_common_nodes): New function.
4874 (lto_read_decls): Convert for new global streamer.
4875 (lto_materialze_file_data,
4876 lto_read_subroutine_type_subprogram_die,
4877 lto_read_unspecified_parameters_DIE,
4878 lto_read_typedef_DIE,
4879 lto_read_pointer_reference_type_DIE,
4880 lto_read_subrange_type_DIE,
4881 lto_read_base_type_DIE,
4882 lto_read_const_volatile_restrict_type_DIE,
4883 lto_read_namespace_DIE,
4884 lto_read_unspecified_type_DIE, lto_read_DIE,
4885 lto_read_child_DIEs, lto_collect_child_DIEs):
4886 Removed.
4887 (lto_info_read, lto_set_cu_context): Removed.
4888 (lto_file_read): Convert for new global streamer.
4889 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4890 lto_resolve_var_ref, lto_resolve_fn_ref,
4891 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4892 lto_resolve_namespacedecl_ref): Removed.
4893 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4894 * lto-tree.h (lto_symtab_merge_var,
4895 lto_symtab_mergee_fun): Declare here.
4896 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4897 (lto_elf_file_open): Removed code to read DWARF debug sections.
4898 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4899 DWARF2_CompUnit, lto_die_ptr,
4900 lto_die_cache_entry, lto_fd, lto_info_fd,
4901 lto_abbrev_fd): Removed.
4902 (lto_file): Removed debug_info and debug_abbrev fields.
4903 (lto_ref): Removed.
4904 (lto_file_init, lto_file_close,
4905 lto_resolve_type_ref, lto_resolve_var_ref,
4906 lto_resolve_fn_ref, lto_resolve_field_ref,
4907 lto_resolve_typedecl_ref,
4908 lto_resolve_namespacedecl_ref,
4909 lto_get_file_name): Removed declarations.
4910 (lto_symtab_merge_var, lto_symtab_merge_fn):
4911 Declarations moved to lto-tree.h.
4912 * lto-symtab.c (lto_compatible_attributes_p):
4913 Lobotomize this, as it barfs on "Hello, world!".
4914 * lto-section-out.c: Include lto-tree-out.h.
4915 (lto_hash_global_slot_node,
4916 lto_eq_global_slot_node, preload_common_nodes,
4917 write_global_stream, write_global_references):
4918 New functions.
4919 (produce_asm_for_decls): Convert for new global streamer.
4920 * lto-section-out.h (lto_hash_global_slot_node,
4921 lto_eq_global_slot_node): Declare.
4922
3f8257db 49232008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 4924 Jan Hubicka <jh@suse.cz>
ab20d992 4925
d7f09764
DN
4926 * lto.c (sys/mman.h, tree-pass.h): New includes.
4927 (lto_materialize_constructors_and_inits,
4928 lto_materialize_function): Keeps length of section.
4929 (lto_materialize_cgraph): Removed.
4930 (lto_read_decls): Initialize fd field.
4931 (lto_file_read): Different return type and removed much code to
4932 lto_main.
4933 (page_mask): New variable.
4934 (lto_read_section_data, get_section_data, free_section_data): New
4935 functions.
4936 (lto_main): Now calls pass manager, sets the hooks so that the ipa
ab20d992
JJ
4937 passes can get the section data.
4938
3f8257db 49392008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4940
4941 * lto.h (lto_read_decls): Made local.
ab20d992 4942 (lto_input_function_body, lto_input_constructors_and_inits,
d7f09764
DN
4943 lto_input_cgraph): Declarations moved to lto-section-in.h.
4944 * lto-section-in.c: Moved to .. .
4945 * lto-cgraph-in.c: Ditto.
4946 * lto-section-in.h: Ditto.
4947 * lto-function-in.c: Ditto.
4948 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4949 (lto_insert_block): Removed.
4950 (LANG_HOOKS_INSERT_BLOCK): Removed.
4951 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4952 lto-section-in.o): Rules moved to lto/Makefile.in.
ab20d992 4953
d7f09764
DN
4954
49552008-05-16 Ollie Wild <aaw@google.com>
4956
4957 * lto-lang.c (tree-inline.h): Include.
4958 (lto_post_options): New function.
4959 (LANG_HOOKS_POST_OPTIONS): Define.
4960 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4961 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4962
49632008-05-13 Diego Novillo <dnovillo@google.com>
4964
4965 * lto-function-in.c (input_ssa_names): Call
4966 make_ssa_name_fn instead of make_ssa_name.
4967
49682008-05-12 Diego Novillo <dnovillo@google.com>
4969
4970 * lto-cgraph-in.c (overwrite_node): Update references to
4971 inline summary fields.
4972 * lto-function-in.c (input_expr_operand): Do not handle
4973 STRUCT_FIELD_TAG.
4974
49752008-05-09 Ollie Wild <aaw@google.com>
4976
4977 * lang.opt: New file.
4978 * lto-lang.c (lto_init_options): New function.
4979 (lto_handle_option): New function.
4980 (lto_init): Move initialization of flag_unit_at_a_time to
4981 lto_init_options.
4982 (LANG_HOOKS_INIT_OPTIONS): Define.
4983 (LANG_HOOKS_HANDLE_OPTION): Define.
4984
49852008-04-29 Ollie Wild <aaw@google.com>
4986
4987 * lto.c (lto_read_namespace_DIE): New function.
4988 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4989 NAMESPACE_DECL DIE's.
4990 (lto_resolve_namespacedecl_ref): New function.
4991 * lto.h (lto_resolve_namespacedecl_ref): New function.
4992 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4993 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4994 and num_namespace_decls.
4995 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4996 * lto-lang.c (lto_init_ts): New function.
4997 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4998
49992008-04-16 Ollie Wild <aaw@google.com>
5000
5001 * lto-function-in.c (input_type_ref): Updated function description.
5002
50032008-04-16 Ollie Wild <aaw@google.com>
5004
5005 * lto-function-in.c (input_type_ref_1): New function.
5006 (input_type_ref): Split into two functions.
5007 (input_function): Add support for type contexts.
5008
50092008-04-16 Ollie Wild <aaw@google.com>
5010
5011 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
5012 section name
5013
50142008-04-16 Ollie Wild <aaw@google.com>
5015
5016 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
5017 list of supported languages.
5018
3f8257db 50192008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5020
5021 Merge with mainline @133491.
5022
3f8257db 50232008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5024 Jan Hubicka <jh@suse.cz>
5025
5026 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
5027 fd->unmaterialized_fndecls.
5028 (lto_get_file_name, lto_materialize_cgraph): New function.
5029 (lto_materialize_constructors_and_inits,
5030 lto_materialize_function): Read info directly from elf file.
5031 (lto_file_read): Made local and initialize dictionary so that
5032 other lto sections can be read without reprocessing the elf file.
5033 (lto_main): Read all functions after all files have been processed
ab20d992 5034 for their types, globals and cgraph.
d7f09764
DN
5035 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5036 dependencies.
5037 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5038 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5039 (lto_elf_read_symtab): Removed function.
5040 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5041 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5042 (lto_file_read): Made local.
5043 (lto_get_file_name, lto_elf_build_section_table,
ab20d992 5044 lto_input_cgraph):
d7f09764
DN
5045 New function.
5046 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5047 New functions.
5048 (lto_read_decls): Get the file name.
5049 * lto-cgraph-in.c: New file.
5050 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5051 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5052 (input_labels): Fixed latent sizeof issue.
5053 (input_function): Build stmt array to set call sites into cgraph
5054 edges.
5055 (lto_read_body): Reset cfun->curr_properties.
5056 * lto_section_in.h (lto_section_slot): New structure.
5057 (section_hash_table.lto_file_decl_data): New field.
5058
3f8257db 50592008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5060
5061 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5062 reconstruct static initializers.
5063 (lto_get_body, lto_materialize_function): Add lto_section_type as
5064 a parameter.
5065 (lto_materialize_constructors_and_inits,
5066 lto_materialize_file_data): New function.
5067 (lto_materialize_function,
5068 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5069 unmap_section and map_fn_body to map_section.
5070 (lto_set_cu_context): Process functions and static inits
5071 differently.
5072 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5073 lto/lto-section-in.o): Update dependencies.
ab20d992 5074 * lto-elf.c (lto_elf_map_optional_lto_section): Add
d7f09764
DN
5075 lto_section_type parameter.
5076 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
ab20d992 5077 * lto.h (lto_file_vtable_struct): Removed two of the fields and
d7f09764
DN
5078 renamed the other two so that there is only one map function and
5079 one unmap function and each takes a section type parameter.
5080 (lto_read_function_body): Renamed to lto_input_function_body and
5081 added file_data parameter.
5082 (lto_read_var_init): Removed.
5083 (lto_input_constructors_and_inits): New function.
5084 * lto-section-in.c (lto_read_decls): New function.
5085 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5086 var_decls, type_decls, types to lto_file_decl_data.
5087 (input_type_ref, input_expr_operand, lto_read_body): Get
5088 field_decls, fn_decls, var_decls, type_decls, types from different
5089 structure.
5090 (input_globals, input_constructor, lto_read_var_init): Removed.
5091 (input_constructors_or_inits): New function.
5092 (lto_read_function_body, lto_input_constructors_and_inits):
5093 Renamed to lto_input_function_body and takes file_data parameter.
5094 * lto-section-in.h (lto_file_decl_data): New structure.
ab20d992 5095
3f8257db 50962008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5097
5098 * lto-function-in.c (input_globals.c): Changed input type to
5099 lto_function_header.
5100 (input_bb): Removed code to deserialize the stmt number.
5101 (input_function): Renumber all stmts after they are input.
5102 (lto_read_body, lto_read_function_body, lto_read_var_init):
5103 Changed to used new header format and enum section_type.
ab20d992
JJ
5104 *lto-lang.c (success): Removed.
5105
d7f09764
DN
51062008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5107
5108 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5109 (lto_elf_free_sym): Likewise.
5110
5111 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5112 (lto_elf_build_init): Likewise.
5113
3f8257db 51142008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5115
5116 * lto-read.c: Renamed to lto-function-in.c.
5117 (input_1_unsigned): Moved to lto-section-in.c and renamed
5118 lto_input_1_unsigned.
5119 (input_uleb128): Moved to lto-section-in.c and renamed
5120 lto_input_uleb128.
5121 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5122 lto_input_widest_uint_uleb128.
5123 (input_sleb128): Moved to lto-section-in.c and renamed
5124 lto_input_sleb128.
5125 (input_integer): Moved to lto-section-in.c and renamed
5126 lto_input_integer.
5127 (debug_in_fun): Moved to lto-section-in.c and renamed
5128 lto_debug_in_fun.
5129 (input_block): Moved to lto-section-in.h and renamed
5130 lto_input_block.
5131 (input_expr_operand): Fixed to allow lists with more than one
5132 element.
5133 * lto-section-in.h: New file.
5134 * lto-section-in.c: New file with changes from above.
5135 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5136 (lto-section-in.o): New rule.
ab20d992 5137
d7f09764
DN
51382007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5139
5140 * lto-read.c (input_expr_operand): Mark static and external
5141 VAR_DECLs as needed.
5142
51432007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5144
5145 * lto-read.c (input_integer): Use the correct shift amount.
5146
51472007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5148
5149 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5150 (LANG_HOOKS_NAME): Define.
5151
51522007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5153
5154 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5155 original function to...
5156 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5157 don't have a base type.
5158 (lto_read_enumeration_type_DIE): Examine the values of the
5159 enumeration to determine whether we can use an unsigned type for
5160 the base type of the enumeration.
5161
51622007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5163
5164 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5165 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5166
51672007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5168
5169 * lto-lang.c (lto_types_compatible_p): New function.
5170 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5171
51722007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5173 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5174
5175 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5176 (input_local_vars): Read in DECL_INITIAL and context for local
5177 statics that need to be put in unexpanded_vars_list.
5178
51792007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5180
5181 * lto-read.c (input_real): Use a separate null-terminated buffer
5182 for calling real_from_string.
5183 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5184 tell cgraph that it's needed.
5185
51862007-12-19 Doug Kwan <dougkwan@google.com>
5187
5188 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5189
51902007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5191
5192 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5193 (lto_file_read): Reset the members of 'context' every time we read
5194 a toplevel DIE, with special attention to last_param_type.
5195
51962007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5197
5198 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5199 'declaration'. Set the assembler name for non-public functions.
5200
3f8257db 52012007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5202
5203 * lto_read.c (data_in.unexpanded_indexes): New array.
5204 (input_local_var): Added code to read in unexpanded_var_list
5205 indexes for variables. Only read in DECL_CHAIN field for
5206 parameters.
5207 (input_local_vars): Added code to rebuild unexpanded_var_list in
5208 order using unexpanded_indexes.
5209 (input_function): Added code to set DECL_CONTEXT for functions.
5210
52112007-12-13 Doug Kwan <dougkwan@google.com>
5212
5213 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5214 in pointer and reference types.
5215
52162007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5217
5218 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5219 RESULT_DECL.
5220
52212007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5222
5223 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5224 already read the DIE.
5225 (lto_get_body): New function, split out from...
5226 (lto_materialize_function): ...here. Call it.
5227 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5228 determine DECL_EXTERNAL.
5229 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5230 FUNCTION_DECLs when necessary. Use the type of the actual
5231 function definition if we are unable to easily merge types. Ignore
5232 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5233 necessary.
5234
52352007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5236
5237 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5238
52392007-12-12 Bill Maddox <maddox@google.com>
5240
5241 Revert
5242 2007-12-07 Bill Maddox <maddox@google.com>
5243
5244 * lto.c (lto_str_fd_init): New function.
5245 (lto_str_fd_close): New function.
5246 (lto_file_init): Call lto_str_fd_init.
5247 (lto_file_close): Call lto_str_fd_close.
5248 (lto_str_read): New function. Read debug string table.
5249 (lto_str_lookup): New function. Get string for debug
5250 string table offset.
5251 (lto_read_form): Recognize DW_FORM_strp.
5252 (lto_file_read): Invoke lto_str_read.
5253
5254 * lto-elf.c (lto_elf_file_open): Read raw section data
5255 for the .debug_str section, if present.
5256
5257 * lto.h (struct lto_str_fd_struct): New struct.
5258 (struct lto_file_struct): Added new field DEBUG_STR
5259 to hold the file descriptor for the debug string table.
ab20d992 5260
d7f09764
DN
52612007-12-07 Bill Maddox <maddox@google.com>
5262
5263 * lto.c (lto_str_fd_init): New function.
5264 (lto_str_fd_close): New function.
5265 (lto_file_init): Call lto_str_fd_init.
5266 (lto_file_close): Call lto_str_fd_close.
5267 (lto_str_read): New function. Read debug string table.
5268 (lto_str_lookup): New function. Get string for debug
5269 string table offset.
5270 (lto_read_form): Recognize DW_FORM_strp.
5271 (lto_file_read): Invoke lto_str_read.
5272
5273 * lto-elf.c (lto_elf_file_open): Read raw section data
5274 for the .debug_str section, if present.
5275
5276 * lto.h (struct lto_str_fd_struct): New struct.
5277 (struct lto_file_struct): Added new field DEBUG_STR
5278 to hold the file descriptor for the debug string table.
5279
52802007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5281
5282 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5283 Grow the basic_block_info and label_to_block_map vectors if
5284 necessary. Read in the block chain.
5285
52862007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5287
5288 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5289
52902007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5291
5292 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5293
52942007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5295
5296 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5297 (lto_read_body): Don't declare PROP_alias.
5298
52992007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5300
5301 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5302 argument type information.
5303
53042007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5305
5306 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5307 TREE_THIS_VOLATILE if the associated type is a volatile type.
5308 (lto_materialize_function): Remove call to init_ssa_operands.
5309 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5310 variable when reading an SSA_NAME. Do the same when reading a
5311 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5312 (input_cfg): Call init_ssa_operands.
5313 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5314 Move call to init_tree_ssa...
5315 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5316 add_referenced_var on any variables referenced from the body of the
5317 function. Inform the rest of the compiler we are in SSA form and
5318 inform later passes about the current properties.
5319
53202007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5321
5322 * lto.c (lto_materialize_function): Add FIXME.
5323
53242007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5325
5326 * lto-lang.c (enum built_in_attribute): New enum.
5327 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5328 built_in_attributes): New variables.
5329 (def_builtin_1): New function.
5330 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5331
53322007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5333
5334 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5335 DECL_SOURCE_LOCATION for debugging purposes.
5336 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5337 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5338 laying out the decl until later.
5339 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5340 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5341 TREE_ADDRESSABLE.
5342 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5343 operand of an ADDR_EXPR.
5344 * lto-lang.c (enum lto_builtin_type): New enum.
5345 (builtin_type): New typedef.
5346 (builtin_types, string_type_node, const_string_type_node,
5347 wint_type_node, intmax_type_node, uintmax_type_node,
5348 signed_size_type_node): New variables.
5349 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5350 lto_build_c_type_nodes): New functions.
5351 (lto_init): Initialize builtin types.
5352 (lto_set_decl_assembler_name): Let the target machine mangle the
5353 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5354
53552007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5356
5357 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5358 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5359 the type is a constant type. Set the assembler name and inform
5360 the rest of the compiler about the new decl if the decl is not
5361 public.
5362 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5363 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5364 try to read in function bodies for functions that already have bodies.
5365 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5366 equivalency.
5367 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5368 Check for whether we matched a builtin function type before calling
5369 lto_same_type_p on the generated type. Permit cases where the
5370 declaration of an array is unbounded, but the definition is bounded.
5371 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5372 DECL_SIZE_UNIT if necessary.
5373
3f8257db 53742007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5375
ab20d992 5376 * lto-read.c (input_expr_operand): Get types right
d7f09764
DN
5377 for COMPLEX_CST.
5378
3f8257db 53792007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5380
5381 * lto-read.c (make_new_block, input_cfg): Properly set
5382 n_basic_blocks.
ab20d992 5383
d7f09764
DN
53842007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5385
5386 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5387 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5388
53892007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5390
5391 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5392 construct the integer type for bitfields.
5393
3f8257db 53942007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5395
5396 * lto-read.c (data_in.current_node_has_loc): Removed.
5397 (input_line_info): Returns true if node needs line set.
5398 (set_line_info): Always sets line if called.
5399 (clear_line_info): Removed reference to current_node_needs_loc.
5400 (input_expr_operand): Keeps track locally if current node needs a loc.
5401 (input_local_var): Added code to handle DECL_INITIAL for
5402 static local vars. Only set loc if necessary.
ab20d992 5403
d7f09764
DN
54042007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5405
5406 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5407 DECL_CONTEXT.
5408
54092007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5410
5411 * lto.c: Include langhooks.h.
5412 (lto_find_integral_type): Rework logic to handle the case where
5413 got_byte_size is true, but the bitsize requested and that of the
5414 base_type doesn't match.
5415 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5416 asm_name if we are creating a VAR_DECL.
5417 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5418 definition.
5419 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5420 function reference and use the builtin's decl if so. Set the
5421 DECL_CONTEXT of the RESULT_DECL for the function.
5422 * lto-lang.c (registered_builtin_fndecls): New variable.
5423 (lto_getdecls): Return it.
5424 (lto_builtin_function): Chain the new decl onto
5425 registered_builtin_fndecls.
5426
3f8257db 54272007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
ab20d992 5428
d7f09764
DN
5429 * lto-read.c (process_tree_flags, lto_static_init_local):
5430 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5431 (input_line_info, clear_line_info): Fixed new line number code.
5432 (input_expr_operand): Added type to SWITCH_EXPR.
5433 (lto_read_body): Properly initialized data_in.
5434 Clear line info when leaving.
ab20d992 5435
d7f09764
DN
54362007-11-13 Diego Novillo <dnovillo@google.com>
5437
5438 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5439 Initialize ARTIFICIAL.
5440 (lto_read_subroutine_type_subprogram_DIE): Initialize
5441 SAVED_SCOPE.
5442 * lto-read.c (set_line_info): Remove ; from calls to
5443 LINEMAP_POSITION_FOR_COLUMN.
5444
3f8257db 54452007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5446
5447 * lto-read.c (input_type_ref): Renamed from get_type_ref.
ab20d992 5448 (input_expr_operand, input_local_var): Renamed get_type_ref to
d7f09764 5449 input_type_ref.
ab20d992 5450 (input_expr_operand): Get the types correct for
d7f09764 5451 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
ab20d992 5452
d7f09764
DN
54532007-11-13 Doug Kwan <dougkwan@google.com>
5454
5455 * lto-read.c (input_widest_uint_uleb128): New function.
5456 (input_tree_flags, process_tree_flags, input_line_info,
5457 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5458 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5459 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5460 (lto_static_init_local): Add code to assert that lto_flags_type is
5461 wide enough.
5462
54632007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5464
5465 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5466 (lto_read_subroutine_type_subprogram_DIE): Handle
5467 DW_AT_static_link and DW_AT_specification. Return the
5468 specification if present.
5469 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
ab20d992 5470
d7f09764
DN
54712007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5472
5473 * lto-lang.c: Include target.h.
5474 (registered_builtin_types): New variable.
5475 (lto_type_for_mode): Increase number of modes handled.
5476 (lto_builtin_function): Fix argument list and return the decl.
5477 (lto_register_builtin_type): New function.
5478 (lto_init): Initialize target builtins and language-independent
5479 nodes.
5480 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5481
3f8257db 54822007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5483
5484 * lto-read.c (input_expr_operand): Added code to properly handle
5485 index filed. Added new RANGE_EXPR case.
ab20d992 5486
3f8257db 54872007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5488
5489 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5490 (data_in): Added current_node_has_loc field.
5491 (input_line_info, set_line_info, clear_line_info): Added a support
5492 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5493 did not have on on the source side.
5494 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5495 numbers too.
5496
54972007-11-09 Doug Kwan <dougkwan@google.com>
5498
5499 * lto-read.c (input_expr_operand): Change type of operand 2 of
5500 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5501
55022007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5503
5504 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5505 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5506 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5507 the new decl we are creating. Move informing the middle end about
5508 the new decl to...
5509 (lto_main): ...here. Inform the middle end about global variables
5510 after we have read in all the input files.
5511 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5512 variables with internal linkage, so delete the check for internal
5513 linkage. Combine TREE_PUBLIC flags.
5514
55152007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5516
5517 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5518 DW_AT_decl_line.
5519 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5520 builtin specially. Move check for attribute compatibility
5521 earlier.
5522
55232007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5524
5525 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5526 * config-lang.in (gtfiles): Add lto.h and lto.c.
5527 * lto-elf.c: Include ggc.h.
5528 (lto_elf_file_open): Allocate elf_file from GC memory.
5529 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5530 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5531 in GC memory.
5532 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5533 (lto_file_close): Free file from GC memory.
5534 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5535 (lto_read_member_DIE): Fix declaration.
5536 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5537 in GC memory.
5538 (current_lto_file): New variable.
5539 (lto_main): Use it.
5540 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5541 lto_die_cache_entry): Move to...
5542 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5543 declarations accordingly.
5544 (struct lto_file_struct): Declare.
5545 (lto_file_vtable): Use it instead of lto_file.
5546
ab20d992
JJ
55472007-11-06 Alon Dayan <alond@il.ibm.com>
5548 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5549
5550 * lto-read.c (process_flags, lto_static_init_local):
5551 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5552 change global array num_flags_for_code to flags_length_for_code.
5553 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
ab20d992 5554
d7f09764
DN
55552007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5556
5557 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5558 layout functions to compute information about the newly constructed
5559 type.
5560
55612007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5562
5563 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5564 case to use DECL_RESULT if necessary.
5565
3f8257db 55662007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5567
5568 * lto-read.c (input_tree_list): Removed.
5569 (input_tree_flags): Added parameter to force flags no matter what
5570 tree code.
5571 (input_expr_operand): Added parameter to input_tree_flags.
5572 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5573 input_expr_operand rather than input_tree_lists.
5574 (input_local_var): Use input_expr_operand to read attributes
5575 rather then input_tree_list.
5576 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5577
55782007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5579
5580 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5581 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5582 TYPE_DECL for it.
5583 * lto-read.c (lto_read_body): Use correct sizes for calculating
5584 type_decls_offset and types_offset.
5585
55862007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5587
5588 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5589 with GENERIC_NEXT.
5590 * config-lang.in (gtfiles): Add lto-lang.c.
5591 * lto-lang.c: Include gt-lto-lto-lang.h.
5592 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5593 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5594 (lto/lto-read.o): Likewise.
5595
3f8257db 55962007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5597
5598 * lto-read.c (data_in): Added type_decls and current_col fields.
5599 (string_slot): New type to hold canonized file name.
ab20d992 5600 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
d7f09764
DN
5601 input_line_info, set_line_info, clear_line_info): New functions.
5602 (file_name_hash_table): New hash table.
ab20d992 5603 (input_local_var, input_labels, input_local_vars_index,
d7f09764
DN
5604 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5605 (input_uleb128): Changed type of byte var.
5606 (input_expr_operand): Large number of changes to get line numbers
5607 correct. Added TYPE_DECL case.
5608 (input_globals): Added code to get TYPE_DECLs processed.
5609 (input_local_var): Added code to process line numbers and
5610 TREE_CHAIN and DECL_CONTEXT.
5611 (input_function, input_constructor): Added call to
5612 clear_line_number.
5613 (lto_static_init_local): Added code to get line numbers correct.
5614 (lto_read_body): Added code to get TYPE_DECLS read and to change
5615 parameters to the calls above that had their parms reorganized.
5616
d7f09764
DN
56172007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5618
5619 * lto.h (lto_resolve_typedecl_ref): Declare.
5620 * lto.c (lto_resolve_typedecl_ref): New function.
5621
56222007-10-29 Mark Mitchell <mark@codesourcery.com>
5623 Nathan Froyd <froydnj@codesourcery.com>
5624
5625 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5626 DIEs even if we find an abstract origin for this DIE.
5627
56282007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5629
5630 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5631 RESULT_DECL slightly earlier. Only remember the decl for later
5632 if we successfully merge declarations.
5633
3f8257db 56342007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5635
5636 * lto-read.c (input_expr_operand): Give label_values the proper
5637 context and provide switch statements with a default type.
ab20d992 5638
d7f09764
DN
56392007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5640
5641 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5642 * lto.c (lto_materialize_function): ...to here.
5643
56442007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5645
5646 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5647 * lto.c (lto_info_fd_init): Initialize it.
5648 (lto_info_fd_close): Free it.
5649 (lto_materialize_function): New function.
5650 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5651 unmaterialized_fndecls.
5652 (lto_file_read): Read in all the function bodies after we have read
5653 all of the DWARF info.
5654 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5655 reading a function body.
5656
3f8257db 56572007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5658
5659 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5660 semetric with output_tree_flags. Added call to log flags.
5661 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5662 type issues to make everything consistent with flags being
5663 unsigned HOST_WIDE_INTS.
5664 (input_expr_operand): Added call to
5665 recompute_tree_invariant_for_addr_expr.
5666 (input_local_var): Added debugging for tree_chains. Now calls
5667 input_tree_flags.
5668 (input_phi): Made flags unsigned HOST_WIDE_INT.
5669 (input_ssa_names): Now calls input_tree_flags.
5670 (lto_read_body): Now sets cfun.
5671 (lto_read_function_body): Now sets current_function_pointer.
ab20d992 5672
d7f09764
DN
56732007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5674
5675 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5676 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5677 inspecting fields within.
5678 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5679 handle this appropriately.
5680
56812007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5682
5683 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5684 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5685 both DW_AT_abstract_origin and DW_AT_specification.
5686 (lto_read_subroutine_type_subprogram_DIE): Handle
5687 DW_AT_abstract_origin.
5688 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5689 (lto_read_DIE_at_ptr): Define as static to match declaration.
5690 Lookup the PTR in the cache before reading it from the file.
5691 (lto_resolve_var_ref): Adjust accordingly.
5692 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5693 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5694
56952007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5696
5697 * lto.c (lto_read_DIE_at_ptr): New function.
5698 (lto_resolve_var_ref): Use it.
5699 (lto_resolve_fn_ref): Use it.
5700 (lto_resolve_field_ref): Use it.
5701 (lto_read_variable_formal_parameter_constant_DIE): Follow
5702 DW_AT_specification and return the associated decl when appropriate.
5703
57042007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5705
5706 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5707 Implement for scalar integer modes.
5708 (lto_init): Initialize size_type_node.
5709
3f8257db 57102007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5711
5712 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5713 (input_local_var): Add chaining for params.
5714 (input_ssa_names): Add cfun parameter.
5715 (input_function): Remove unnecessary else.
5716
57172007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5718
5719 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5720 (lto_resolve_var_ref): Use proper types.
5721 (lto_resolve_fn_ref): Likewise.
5722 (lto_resolve_field_ref): Likewise.
5723
57242007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5725
5726 * lto-read.c (input_expr_operand): Remove case.
5727
57282007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5729
5730 * lto.c (lto_read_only_for_child_DIEs): New function.
5731 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5732 * lto-elf.c (lto_elf_map_lto_section): Remove.
5733 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5734 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5735 SSA_NAME. Add missing case for mechanical codes.
5736 (input_cfg): Use basic_block_info_for_function instead of
5737 basic_block_info.
5738
3f8257db 57392007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5740
5741 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5742 (input_list): Renamed input_tree_list and modified to follow same
5743 protocol as lto-function-out.c:output_tree_list.
5744 (input_expr_operand): Make asm operands use input_tree_list.
5745 (input_local_var): Now uses input_tree_list.
5746 (lto_read_body): Change placement for setting context of debug_labels.
ab20d992 5747
3f8257db 57482007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5749
5750 * lto-read.c (input_real): Output debugging in proper order.
5751 (input_integer): Compute bit lengths properly.
5752 (input_list): Clean up declaration.
5753 (input_expr_operand): Change calls to input_real to match fix.
5754 Make reading of LTO_bit_field_ref1 match output.
5755 (input_local_var): Make reading of attributes match what is being
5756 written.
5757 (dump_debug_stream): Also print char in hex.
5758 (debug_out_fun): Fix signed unsigned mismatch.
ab20d992 5759
d7f09764
DN
57602007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5761
5762 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5763 DW_AT_GNU_vector specially, as they are not contiguous with the
5764 specified set of attribute names. Use class_mask to check for
5765 errors at the end of the function
5766 (lto_resolve_var_ref): Read the DIE if it is not cached.
5767 (lto_resolve_fn_ref): Likewise.
5768 (lto_resolve_field_ref): Likewise.
5769
57702007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5771
5772 * lto.c: Include dwarf2out.h.
5773 (lto_cache_store_DIE): Assert that we never change the value.
5774 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5775 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5776 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5777 sensible type instead.
5778 (lto_read_structure_union_class_type_DIE): Store the newly
5779 created type prior to reading the members of the structure to
5780 avoid infinite recursion. Avoid computing types and alignments
5781 for structures whose sizes are unknown.
5782 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5783 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5784 DW_AT_const_value, and DW_AT_specification.
5785 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5786 Return early if we have already constructed the function type.
5787 (lto_read_typedef_DIE): Check to see if the type has been cached
5788 already. Cache the type before reading any children.
5789 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5790 (lto_read_DIE): Unset context->skip_non_parameters around reading
5791 the DIE.
5792 (lto_resolve_fn_ref): Delete trailing whitespace.
5793
3f8257db 57942007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5795
5796 * lto-read.c (input_expr_operand): Added type for STRING_CST.
ab20d992 5797
d7f09764
DN
57982007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5799
5800 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5801
58022007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5803
5804 * lto-lang.c (signed_and_unsigned_types): New variable.
5805 (lto_type_for_size): Consult signed_and_unsigned_types to find
5806 an approprite type, creating it if necessary.
5807 (lto_set_decl_assembler_name): Add actual method body.
5808
58092007-09-06 Jim Blandy <jimb@codesourcery.com>
5810
5811 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5812 can't find a var init for this variable, leave its DECL_INITIAL.
5813 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5814 lto_elf_map_fn_body.
5815 (lto_map_lto_section): New function.
5816 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5817 bodies, and lto_elf_map_optional_lto_section for variable
5818 initializers.
5819 (lto_elf_find_section_data): Quietly return NULL if the section is
5820 missing.
5821 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5822
5823 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5824
5825 * lto-read.c (lto_read_body): Doc fix.
5826
3f8257db 58272007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5828
5829 * lto-read.c (fun_in): Renamed to data_in.
5830 (input_expr_operand, input_local_var, input_string_internal,
ab20d992 5831 input_string, input_real, input_list, get_label_decl,
d7f09764 5832 get_type_ref, input_expr_operand, input_globals, input_labels,
ab20d992 5833 input_local_vars_index, input_local_var, input_local_vars,
d7f09764
DN
5834 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5835 (input_constructor): New function.
5836 (lto_read_function_body): Renamed to lto_read_body and generalized
5837 to handle both functions and constructors.
5838 (lto_read_function_body, lto_read_var_init): New function.
ab20d992 5839
3f8257db 58402007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5841
5842 * lto-read.c (input_expr_operand): Assert that there really is a
5843 FUNCTION_DECL.
5844 (input_globals): Removed checks on 0 section.
ab20d992 5845
3f8257db 58462007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5847
5848 * lto-read.c (fun_in): Added local_decls_index and
ab20d992 5849 local_decls_index_d.
d7f09764
DN
5850 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5851 (input_globals): Enabled code to handle FIELD_DECLs.
5852 (input_local_vars_index, input_local_vars): New function.
5853 (input_local_var): Changed to allow locals to be input randomly.
5854 (lto_read_function_body): Added code to input the
5855 local_decls_index and to free various structures.
ab20d992 5856
d7f09764
DN
58572007-08-17 Jim Blandy <jimb@codesourcery.com>
5858
5859 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5860 ATTRIBUTE_UNUSED from 'die' formal.
5861
5862 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5863 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5864 (input_list): Fix type of 'tag'.
5865 (input_expr_operand): Fix type of 'tag' argument. Update
5866 declaration. Fix type of 'ctag'. Add default case to switch,
5867 since the type of the switched value is now an enum.
5868 (input_local_vars): Fix type of 'tag'.
5869 (input_bb): Fix type of 'tag' argument.
5870 (input_function): Fix type of 'tag' argument.
5871
58722007-08-16 Jim Blandy <jimb@codesourcery.com>
5873
5874 * lto.c (lto_read_member_DIE): Record the tree we create in
5875 fd->die_cache. (Our 'die' argument is no longer unused.)
5876 (lto_resolve_field_ref): New function.
5877 * lto.h (lto_resolve_field_ref): New declaration.
5878
58792007-08-15 Jim Blandy <jimb@codesourcery.com>
5880
5881 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5882
58832007-08-07 Jim Blandy <jimb@codesourcery.com>
5884
5885 * lto.c (lto_read_form): Complete attr_classes table.
5886 (DWARF2_form_data): Doc fix.
ab20d992 5887
d7f09764
DN
58882007-08-05 Mark Mitchell <mark@codesourcery.com>
5889
5890 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5891 and unmap_var_init.
5892 (lto_read_var_init): Declare.
5893 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5894 interface for reading variable initializers.
5895 * lto-elf.c (lto_elf_read_var_init): Remove.
5896 (lto_elf_file_vtable): Update initializer.
5897 (lto_elf_read_var_init): Add comment about unused-ness.
5898 * lto-read.c (lto_read_var_init): New.
5899
5900 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5901
3f8257db 59022007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5903
5904 * lto-read.c (lto_read_function_body): Moved declaration of fn
5905 outside of ifdef.
ab20d992 5906
3f8257db 59072007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5908
5909 * lto-read.c (input_uleb128, input_string_internal, input_real,
5910 input_integer, input_record_start, input_list, get_type_ref,
5911 input_flags, input_expr_operand, input_expr_operand,
5912 input_expr_operand, input_local_vars, input_cfg, input_phi,
5913 input_ssa_names, input_bb, input_function): Added semicolons.
5914
ab20d992 5915
3f8257db 59162007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5917
5918 * lto-read.c (input_globals): Remove debugging.
5919 (input_function): Set DECL_ARGUMENTS.
5920
3f8257db 59212007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5922
5923 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5924 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5925 (input_phi): Made work with operands other than SSA_NAMES and
5926 fixed processing of flags.
5927 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5928 (input_flags): New function.
5929 * lto-lang.c (lto_init): Changed state of in_lto_p.
ab20d992
JJ
5930
5931
d7f09764
DN
59322007-07-24 Mark Mitchell <mark@codesourcery.com>
5933
5934 * lto-tree.h (lto_varargs_cookie): Remove.
5935 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5936 skip_non_parameters, skip_parameters.
5937 (lto_varargs_cookie): Remove.
5938 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5939 parameter types.
5940 (lto_read_abbrev): New function.
5941 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5942 child DIEs.
5943 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5944 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5945 (lto_file_read): Initialize new context fields.
5946 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5947 (lto_unsigned_type): Remove.
5948 (lto_signed_type): Likewise.
5949 (lto_signed_or_unsigned_type): Likewise.
5950 (lto_init): Do not create lto_varargs_cookie.
5951 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5952 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5953 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5954
59552007-07-19 Jan Hubicka <jh@suse.cz>
5956
5957 * lto-read.c (lto_read_function_body): Produce empty scope block
5958 to avoid crash.
5959
59602007-07-18 Mark Mitchell <mark@codesourcery.com>
5961
5962 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5963 process local variables.
5964 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5965
3f8257db 59662007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5967
5968 * lto-read.c (input_list, input_expr_operand): Added struct
5969 function parameter.
5970 (init_cfg, finalize_cfg): Removed function.
5971 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5972 (input_labels, input_local_vars): Now takes input_block parameter rather than
5973 synthsyzing it.
5974 (input_cfg, input_phi, input_ssa_names): New functions.
5975 (input_bb): Now passes in input_blocks. Does not construct cfg
5976 and processes the list of phi functions.
5977 (input_function): Now builds both the cfg and ssa_names table.
5978 (lto_read_function_body): Processes new header fields to construct
5979 streams for the ssa_names and cfg and their debugging.
ab20d992
JJ
5980 * lto-lang.c (lto_init): Set in_lto_p.
5981
5982
d7f09764
DN
59832007-06-28 Mark Mitchell <mark@codesourcery.com>
5984
5985 * lto.h (lto_file_vtable): Add read_var_init.
5986 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5987 initializers.
5988 (lto_main): Remove bogus asserts.
5989 * lto-elf.c (tm.h): Include it.
5990 (libiberty.y): Likewise.
5991 (lto_elf_file): Add strtab and symtab. Rename
5992 string_table_section_index to sec_strtab.
5993 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5994 (lto_elf_get_shdr): New function.
5995 (lto_elf_free_shdr): Likewise.
5996 (lto_elf_find_section_data): Use them.
5997 (lto_elf_read_symtab): New function.
5998 (lto_elf_lookup_sym): Likewise.
5999 (lto_elf_free_sym): Likewise.
6000 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
6001 (lto_elf_built_init): New function.
6002 (lto_elf_read_var_init): Likewise.
6003 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
6004
3f8257db 60052007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6006
6007 * lto-read (make_new_block): Initialize the stmt_list.
6008 (lto_static_init_local): Add debugging for missing codes.
ab20d992 6009
d7f09764
DN
60102007-06-26 Mark Mitchell <mark@codesourcery.com>
6011
6012 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
ab20d992 6013 unprototyped functions.
d7f09764
DN
6014
60152007-06-23 Mark Mitchell <mark@codesourcery.com>
6016
6017 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
6018 Handle DW_AT_MIPS_linkage_name.
6019 (lto_read_subroutine_type_subprogram): Likewise. Correct
6020 compilation errors.
6021 (lto_main): Remove incorrect assertions.
6022 * lto-symbtab.c: Build function types out of TREE_LISTs.
6023
6024 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
ab20d992 6025
d7f09764 6026 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
ab20d992 6027
3f8257db 60282007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6029
ab20d992 6030 * lto-tree.h (lang_decl, lang_type, language_function): Added
d7f09764 6031 dummy since ggc does not like empty structs.
ab20d992
JJ
6032 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6033 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
d7f09764
DN
6034 expr->common to expr->base.
6035 (make_new_block): Moved stmt_list to proper place.
6036
ab20d992 60372007-03-14 Robert Kennedy <jimbob@google.com>
d7f09764
DN
6038
6039 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6040 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6041 assembler name from DWARF.
6042 * lto-lang.c (lto_set_decl_assembler_name) New function.
6043
60442006-09-10 Mark Mitchell <mark@codesourcery.com>
6045
6046 * lto.h (lto_file_vtable): New structure.
6047 (lto_file): Add vtable pointer.
6048 (lto_file_init): Add vtable paramter.
6049 (lto_read_function_body): New function.
6050 (lto_symtab_merge_fn): New function.
6051 * lto.c (lto_file_init): Add vtable parameter.
6052 (lto_read_form): Fill in entries for DW_AT_prototyped,
6053 DW_AT_frame_base.
6054 (lto_read_subroutine_type_subprogram_DIE): New function.
6055 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6056 DW_TAG_subprogram.
6057 * lto-elf.c (lto_elf_vile_vtable): New variable.
6058 (lto_elf_file_open): Pass it to lto_file_init.
6059 (lto_elf_map_fn_body): New function.
6060 (lto_elf_unmap_fn_body): Likewise.
6061 * lto-read.c: New file.
6062 * lto-symtab.c (lto_symtab_merge_fn): New function.
6063 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6064 tree_rest_of_compilation.
6065 * Make-lang.in (LTO_OBJS): Add lto-read.o
6066 (lto-read.o): New target.
6067
60682006-09-03 Mark Mitchell <mark@codesourcery.com>
6069
6070 * lto.c (<inttypes.h>): Don't include it.
6071 (lto_context): Don't typedef it.
6072 (lto_resolve_reference): New function.
6073 (lto_read_form): Use it.
6074 (lto_resolve_type_ref): New function.
6075 (lto_resolve_var_ref): Likewise.
6076 (lto_resolve_fn_ref): Likewise.
6077 * lto.h (<inttypes.h>): Include it.
6078 (lto_context): New type.
6079 (lto_ref): New structure.
6080 (lto_resolve_type_ref): Declare.
6081 (lto_resolve_var_ref): Likewise.
6082 (lto_resolve_fn_ref): Likewise.
6083
60842006-08-18 Mark Mitchell <mark@codesourcery.com>
6085
6086 * lang-specs.h: New file.
6087
60882006-08-14 Mark Mitchell <mark@codesourcery.com>
6089
6090 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6091 (lto_info_fd_close): Deallocate it.
6092 (lto_die_cache_entry): New structure.
6093 (lto_cache_hash): New function.
6094 (lto_cache_eq): Likewise.
6095 (lto_cache_store_DIE): Likewise.
6096 (lto_cache_lookup_DIE): Likewise.
6097 (lto_read_referenced_type_DIE): Use the cache.
6098 (lto_read_pointer_type_DIE): Robustify.
6099 (lto_read_DIE): Use the cache.
6100 * lto.h (hashtab.h): Include.
6101 (lto_info_fd): Add DIE cache.
6102 * Make-lang.in (LTO_H): New variable.
6103 (lto/lto-lang.o): Use LTO_H.
6104 (lto/lto-elf.o): Likewise.
6105 (lto/lto-symtab.o): Likewise.
6106
61072006-07-09 Mark Mitchell <mark@codesourcery.com>
6108
6109 * lto.c (lto_abi_mismatch_error): New function.
6110 (lto_abbrev_read): Initialize num_abbrevs.
6111 (lto_read_form): Specify allowed form classes for
6112 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6113 (lto_read_variable_formal_parameter_constant_DIE): Handle
6114 DW_AT_declaration. Call lto_symtab_merge_var.
6115 (lto_read_pointer_type_DIE): New function.
6116 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6117 not creat TYPE_DECLs for types that already have them.
6118 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6119 (lto_set_cu_context): Make cu_start point to the header, not the
6120 first DIE.
6121 (lto_file_read): Adjust for change to lto_set_cu_context.
6122 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6123 (lto/lto-symtab.o): New rule.
6124 * lto-tree.h (lang_identifier): Add decl field.
6125 (LANG_IDENTIFIER_CAST): New macro.
6126 (LTO_IDENTIFIER_DECL): Likewise.
6127 (lto_symtab_merge_var): Declare.
6128 * lto-symtab.c: New file.
6129
61302006-07-02 Daniel Berlin <dberlin@dberlin.org>
6131
6132 * lto.c (lto_context): Add current_cu and info_fd members.
6133 (DWARF2_CompUnit): New structure.
6134 (lto_read_DIE): Take lto_info_fd *.
6135 (lto_read_child_DIEs): Ditto.
6136 (lto_file_corrupt_error): Constify argument.
6137 (lto_set_cu_context): New function
6138 (lto_info_fd_init): Ditto.
6139 (lto_info_fd_close): Ditto.
6140 (lto_file_init): Use lto_info_fd_init.
6141 (lto_file_close): Use lto_info_fd_close.
6142 (lto_read_initial_length): Pass in pointer to header size.
6143 (lto_read_comp_unit_header): Correct cu_length to
6144 real length from beginning of header. Take lto_info_fd * as
6145 argument.
6146 (find_cu_for_offset): New function.
6147 (lto_read_form): Change first argument to lto_info_fd *.
6148 Add FORM_CONTEXT argument.
6149 Handle DW_FORM_ref_addr.
ab20d992 6150 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
d7f09764
DN
6151 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6152 Swap contexts if necessary for form.
6153 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6154 lto_file_corrupt_error.
6155 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6156 (lto_read_referenced_type_DIE): Change first argument to
6157 lto_info_fd *. Access lto_fd fields through base pointer.
6158 (lto_read_compile_unit_DIE): Change first argument to an
6159 lto_info_fd *.
6160 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6161 (lto_read_base_type_DIE): Ditto.
6162 (lto_read_child_DIEs): Ditto.
6163 (lto_read_DIE): Ditto. Change type of function pointer.
6164 (lto_info_read): New function.
6165 (lto_set_cu_context): Ditto.
6166 (lto_file_read): Use lto_info_read, walk resulting CU's
6167 (lto_main): Update for lto_info_fd change.
6168 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6169 necessary.
6170 * lto.h (DWARF2_CompUnit): New structure.
6171 (lto_info_fd): Ditto.
6172 (lto_file): Change debug_info to be an lto_info_fd.
ab20d992 6173
d7f09764
DN
61742006-06-25 Mark Mitchell <mark@codesourcery.com>
6175
6176 * lto.c (toplev.h): Include it.
6177 (dwarf2.h): Likewise.
6178 (tree.h): Likewise.
6179 (tm.h): Likewise.
6180 (cgraph.h): Likewise.
6181 (ggc.h): Likewise.
6182 (inttypes.h): Likewise.
6183 (DWARF2_attr): New type.
6184 (DWARF2_abbrev): Likewise.
6185 (DWARF2_class): Likewise.
6186 (DWARF2_form_data): Likewise.
6187 (lto_context): Likewise.
6188 (lto_fd_init): New function.
6189 (lto_abbrev_fd_init): Likewise.
6190 (lto_abbrev_fd_close): Likewise.
6191 (lto_file_init): Use them.
6192 (lto_file_close): New function.
6193 (lto_file_corrupt_error): Likewise.
6194 (LTO_CHECK_INT_VAL): New macro.
6195 (lto_check_size_t_val): New function.
6196 (lto_check_int_val): Likewise.
6197 (LTO_READ_TYPE): New macro.
6198 (lto_read_ubyte): New function.
6199 (lto_read_uhalf): Likewise.
6200 (lto_read_uword): Likewise.
6201 (lto_read_uleb128): Likewise.
6202 (lto_read_initial_length): Likewise.
6203 (lto_abbrev_read_attrs): Likewise.
6204 (lto_abbrev_read): Likewise.
6205 (lto_abbrev_lookup): Likewise.
6206 (lto_read_section_offset): Likewise.
6207 (lto_read_comp_unit_header): Likewise.
6208 (lto_read_form): Likewise.
6209 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6210 (LTO_BEGIN_READ_ATTRS): Likewise.
6211 (LTO_END_READ_ATTRS): Likewise.
6212 (lto_unsupported_attr_error): New function.
6213 (lto_get_identifier): Likewise.
6214 (lto_read_referenced_type_DIE): Likewise.
6215 (lto_read_compile_unit_DIE): Likewise.
6216 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6217 (lto_read_base_type_DIE): Likewise.
6218 (lto_read_DIE): Likewise.
6219 (lto_read_child_DIEs): Likewise.
6220 (lto_file_read): Read DIEs.
6221 (lto_main): Ask middle end to emit entities.
6222 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6223 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6224 (lto_elf_file_close): Likewise.
6225 * lto.h (lto_file): Declare.
6226 (DWARF2_abbrev): Likewise.
6227 (lto_fd): New type.
6228 (lto_abbrev_fd): Likewise.
6229 (lto_file): Use new types.
6230 (lto_file_close): Declare.
6231 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
ab20d992 6232
d7f09764
DN
62332006-06-18 Mark Mitchell <mark@codesourcery.com>
6234
6235 * lto.h: New file.
6236 * lto.c: New file.
6237 * lto-elf.c: New file.
6238 * lto-lang.c (flags.h): Include it.
6239 (lto.h): Likewise.
6240 (lto_init): New function.
6241 (lto_write_globals): Remove.
ab20d992 6242 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
d7f09764
DN
6243 (LANG_HOOKS_INIT): Define.
6244 (LANG_HOOKS_PARSE_FILE): Likewise.
6245 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6246 (LTO_EXE): Link with libelf.
6247 (lto/lto-lang.o): Update dependencies.
6248 (lto/lto.o): New target.
6249 (lto/lto-elf.o): Likewise.
6250
62512006-06-12 Mark Mitchell <mark@codesourcery.com>
6252
6253 * config-lang.in: New file.
6254 * Make-lang.in: Likewise.
6255 * lto-tree.h: Likewise.
6256 * lto-lang.c: Likewise.
818ab71a 6257\f
a5544970 6258Copyright (C) 2006-2019 Free Software Foundation, Inc.
d7f09764 6259
818ab71a
JJ
6260Copying and distribution of this file, with or without modification,
6261are permitted in any medium without royalty provided the copyright
6262notice and this notice are preserved.
This page took 6.096091 seconds and 5 git commands to generate.