]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
update-copyright.py: Add Mentor Graphics Corporation and Yoshinori Sato as external...
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
40ebe1fc
JH
12019-12-19 Jan Hubicka <hubicka@ucw.cz>
2 Xi Ruoyao <xry111@mengyan1223.wang>
3
4 * lto-common.c (read_cgraph_and_symbols): Work around binutils
5 PR25424
6
6d8fd122 72019-12-07 Jan Hubicka <hubicka@ucw.cz>
5b8d9367 8
59c7b29e
JH
9 * lto-partition.c (lto_balanced_map): Fix printing of tp_first_run.
10
112019-12-10 Jan Hubicka <hubicka@ucw.cz>
12
6d8fd122
JH
13 * lto-partition.c (node_cmp): Turn into simple order comparsions.
14 (varpool_node_cmp): Remove.
15 (add_sorted_nodes): Use node_cmp.
16 (lto_balanced_map): Use tp_first_run_node_cmp.
17
59c7b29e
JH
182019-11-25 Joseph Myers <joseph@codesourcery.com>
19
5b8d9367
JM
20 PR c/91985
21 * lto-lang.c (lto_type_for_mode): Handle decimal floating-point
22 types being NULL_TREE.
23
9fd052e7
JH
242019-11-22 Jan Hubicka <jh@suse.cz>
25
26 * lto.c (lto_wpa_write_files): Call memory_block_pool::trim.
27
e61d0e4e
ML
282019-11-14 Martin Liska <mliska@suse.cz>
29
30 * Make-lang.in: Remove wrong dependency
31 of LTO_DUMP_EXE on LTO_EXE.
32
0c29cac4
ML
332019-11-12 Martin Liska <mliska@suse.cz>
34
35 * lto-common.c: Do not include params.h.
36 * lto-partition.c: Likewise.
37 * lto.c: Likewise.
38
028d4092
ML
392019-11-12 Martin Liska <mliska@suse.cz>
40
41 * lto-partition.c (lto_balanced_map): Replace old parameter syntax
42 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
43 macro.
44 * lto.c (do_whole_program_analysis): Likewise.
45
fe1d1a8b
ML
462019-11-11 Martin Liska <mliska@suse.cz>
47
48 * Make-lang.in: Relax dependency of lto-dump.o to
49 LTO_OBJS which will allow faster linking (mainly with LTO).
50
c38ee9a2
JH
512019-11-07 Jan Hubicka <hubicka@ucw.cz>
52
53 * lto.c (do_whole_program_analysis): Call lto_free_file_name_hash.
54
c9ef0409
JH
552019-11-02 Jan Hubicka <hubicka@ucw.cz>
56
57 * lto-common.c (read_cgraph_and_symbols): Improve -Q reporting.
58 * lto.c (lto_wpa_write_files): Likewise.
59
6773658a
JJ
602019-10-31 Jakub Jelinek <jakub@redhat.com>
61
62 PR middle-end/92231
63 * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
64 on *node that is not FUNCTION_DECL.
65
3c56d8d8
ML
662019-10-30 Martin Liska <mliska@suse.cz>
67
68 PR lto/91393
69 PR lto/88220
70 * lto-common.c (lto_file_finalize): Use lto_get_summary_section_data.
71 (get_section_data): Add order argument.
72
3518424d
ML
732019-10-29 Martin Liska <mliska@suse.cz>
74
75 * lto.c (do_whole_program_analysis): Pass
76 title as dump_memory_report argument.
77
c5281d50
ML
782019-10-29 Martin Liska <mliska@suse.cz>
79
80 * lto.c (do_whole_program_analysis): Remove argument.
81
f658ad30
JH
822019-10-24 Jan Hubicka <hubicka@ucw.cz>
83
84 * lto-partition.c (add_symbol_to_partition_1): Update.
85 (undo_parittion): Update.
86
ebad2eee
JH
872019-10-23 Jan Hubicka <hubicka@ucw.cz>
88
89 * lto-common.c (lto_file_finalize): Add order attribute.
90 (lto_create_files_from_ids): Pass order.
91 (lto_file_read): UPdate call of lto_create_files_from_ids.
92
7cc47709
JH
932019-10-12 Jan Hubicka <hubicka@ucw.cz>
94
95 * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
96 summary streaming.
97
f8cf94cd
JH
982019-10-12 Jan Hubicka <hubicka@ucw.cz>
99
100 * lto.c (lto_wpa_write_files): Do not update bodies of clones.
101
e5207f1a
JH
1022019-10-11 Jan Hubicka <hubicka@ucw.cz>
103
104 * lto.c (lto_wpa_write_files): Call ggc_trim.
105
1fcf52a6
JH
1062019-10-11 Jan Hubicka <hubicka@ucw.cz>
107
108 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
109
9142736e
RB
1102019-10-10 Richard Biener <rguenther@suse.de>
111
112 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
113
0fa00483
JM
1142019-10-04 Joseph Myers <joseph@codesourcery.com>
115
116 * lto-lang.c (flag_isoc2x): New variable.
117
a3d09469
RB
1182019-09-18 Richard Biener <rguenther@suse.de>
119
120 PR lto/91763
121 * lto.c (lto_materialize_function): Initialize EH by looking
122 at the function personality and flag_exceptions setting.
123
df375b03
JJ
1242019-08-23 Jakub Jelinek <jakub@redhat.com>
125
126 PR middle-end/91283
127 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
128 flag_excess_precision_cmdline. Remove comment.
129
4d732405
RS
1302019-08-13 Richard Sandiford <richard.sandiford@arm.com>
131
132 PR middle-end/91421
133 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
134 instead of DECL_FUNCTION_CODE.
135 * lto-symtab.c (lto_symtab_merge_p): Likewise.
136
6e42c90c
BE
1372019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
138
139 * Make-lang.in (lto.install-common): Remove unnecessary slash
140 between $(DESTDIR) and $(bindir).
141
cb50701e
ML
1422019-07-25 Martin Liska <mliska@suse.cz>
143
144 * lto-common.c (compare_tree_sccs_1): Use new macros
145 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
146
34e64622
GB
1472019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
148
149 * lang.opt (flag_dump_callgraph): New flag.
150 * lto-dump.c (dump_symtab_graphviz): New function.
151 (dump_tool_help): New option.
152 (lto_main): Handle graphviz dumping.
153
b01659aa
JH
1542019-07-18 Jan Hubicka <hubicka@ucw.cz>
155
156 * lto-common.c (gimple_register_canonical_type_1): Do not look for
157 non-ODR conflicts of types in anonymous namespaces.
158 (unify_scc): Do not merge anonymous namespace types.
159
99b1c316
MS
1602019-07-09 Martin Sebor <msebor@redhat.com>
161
162 PR c++/61339
163 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
164 to struct and others to class.
165 (mentions_vars_p): Same.
166 (register_resolution): Same.
167 (lto_register_var_decl_in_symtab): Same.
168 (lto_register_function_decl_in_symtab): Same.
169 (cmp_tree): Same.
170 (lto_read_decls): Same.
171
6c1dae73
MS
1722019-07-09 Martin Sebor <msebor@redhat.com>
173
174 PR c++/61339
175 * lto-dump.c: Change class-key from class to struct and vice versa
176 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
177
70980ea2
ML
1782019-07-04 Martin Liska <mliska@suse.cz>
179
180 PR lto/91078
181 * lto-common.c (lto_file_finalize): Use memcpy to set
182 file_data->lto_section_header.
183
88614dfa
ML
1842019-07-03 Martin Liska <mliska@suse.cz>
185
186 * lto-common.c: Read LTO section and verify header.
187
606a9a8c
JH
1882019-06-27 Jan Hubicka <jh@suse.cz>
189
190 * lto-common.c (lto_register_canonical_types_for_odr_types):
191 Copy CXX_ODR_P from the main variant.
192
85693eef
JH
1932019-06-27 Jan Hubicka <jh@suse.cz>
194
195 * lto-common.c: tree-pretty-print.h
196 (type_streaming_finished): New static var.
197 (gimple_register_canonical_type_1): Return updated hash; handle ODR
198 types.
199 (iterative_hash_canonical_type): Update use of
200 gimple_register_canonical_type_1.
201
c2f7a665
ML
2022019-06-27 Martin Liska <mliska@suse.cz>
203
204 * lto-dump.c (struct symbol_entry): Add default dtor.
205 (struct variable_entry): Likewise.
206 (struct function_entry): Likewise.
207 (dump_list_functions): Release memory.
208 (dump_list_variables): Likewise.
209
ab20d992
JJ
2102019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
211
212 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
213 format of "__intN" types for SIZE_TYPE.
214
f4af4019
JH
2152019-06-24 Jan Hubicka <jh@suse.cz>
216
217 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
218 compare STRING_FLAG only for arrays and integers.
219
0ecf545c
MS
2202019-06-05 Martin Sebor <msebor@redhat.com>
221
222 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
223
a9c697b8
MS
2242019-05-16 Martin Sebor <msebor@redhat.com>
225
ab20d992
JJ
226 * lto-dump.c (lto_main): Same.
227 * lto.c (stream_out): Same.
a9c697b8 228
38613b9b
ML
2292019-05-10 Martin Liska <mliska@suse.cz>
230
231 * Make-lang.in: Use program_transform_name for lto-dump.
232 * config-lang.in: Do not mark lto-dump compiler as we don't
233 want to have it installed at
234 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
235
03de2955
RO
2362019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
237
238 * lto-common.c (lto_file_read): Print section->start as int64_t,
239 section->len as uint64_t.
240 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
241
ee7a003f
ML
2422019-05-06 Martin Liska <mliska@suse.cz>
243
244 * lto-common.c: Update coding style.
245 * lto.c (materialize_cgraph): Likewise.
246
66d62d9f
HK
2472019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
248 Martin Liska <mliska@suse.cz>
249
250 * Make-lang.in: Add lto_dump-related definition.
251 * config-lang.in: Likewise.
252 * lang.opt: Add new language LTODump and options related
253 to LTO dump tool.
254 * lto-common.c (lto_read_decls): Support type statistics dump.
255 (lto_file_read): Likewise for object files.
256 * lto-dump.c: New file.
257 * lto-lang.c (lto_option_lang_mask): Move from ..
258 * lto.c (lto_option_lang_mask): .. here.
259 * lto.h (lto_option_lang_mask): New declaration.
260
a79420f9
ML
2612019-05-06 Martin Liska <mliska@suse.cz>
262 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
263
264 * Make-lang.in: Add lto-common.o.
265 * config-lang.in: Likewise for gtfiles.
266 * lto-common.c: New file.
267 * lto-common.h: New file.
268 * lto-lang.c: Include lto-common.h.
269 * lto.c: Move most of the functionality
270 into lto-common.c file.
271
0c7f51e4
JH
2722019-04-12 Jan Hubicka <hubicka@ucw.cz>
273
274 * lto.c (do_stream_out): rename to ...
275 (stream_out): ... this one; move original code to ...
276 (stream_out_partitions_1, stream_out_partitions): ... these new
277 functions.
278 (lto_wpa_write_files): Honnor lto_parallelism
279
303389b1
ML
2802019-03-26 Martin Liska <mliska@suse.cz>
281
282 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 283 wrapping.
303389b1 284
a3f9f006
ML
2852019-03-11 Martin Liska <mliska@suse.cz>
286
287 * lto-lang.c (lto_post_options): Wrap an option name
288 in a string format message and fix GNU coding style.
289 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
290
04e5c73d
JJ
2912019-03-09 Jakub Jelinek <jakub@redhat.com>
292
293 PR target/79645
294 * lang.opt: Terminate description text with a dot.
295
80f52b40
JM
2962019-02-28 Jason Merrill <jason@redhat.com>
297
298 PR c++/88049 - ICE with undefined destructor and anon namespace.
299 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
300 for a type in an anonymous namespace.
301
67914693
SL
3022019-01-09 Sandra Loosemore <sandra@codesourcery.com>
303
304 PR other/16615
305
306 * lto-partition.c: Mechanically replace "can not" with "cannot".
307 * lto-symtab.c: Likewise.
308 * lto.c: Likewise.
309
a5544970
JJ
3102019-01-01 Jakub Jelinek <jakub@redhat.com>
311
312 Update copyright years.
313
d840d7a2
JH
3142018-12-24 Jan Hubicka <hubicka@ucw.cz>
315
316 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
317 for method whose basetype was already reported.
318
ed1b53a0
MP
3192018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
320
321 Minimize clone counter memory usage in LTO.
322 * lto-partition.c (privatize_symbol_name_1): Keep track of
323 non-unique symbol counters in the lto_clone_numbers hash
324 map.
325 (lto_promote_cross_file_statics): Allocate and free the
326 lto_clone_numbers hash map.
327 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
328 map.
329
ad42aa96
JH
3302018-11-28 Jan Hubicka <jh@suse.cz>
331
332 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
333
d7dce787
JH
3342018-11-22 Jan Hubicka <jh@suse.cz>
335
336 * lto.c (cmp_type_location): Remove.
337 (lto_read_decls): Do not allocate odr_types.
338
f615cb16
ML
3392018-11-19 Martin Liska <mliska@suse.cz>
340
341 PR lto/88077
342 * lto-symtab.c (lto_symtab_merge): Transform the
343 condition before r256989.
344
12eac232
ML
3452018-11-16 Martin Liska <mliska@suse.cz>
346
347 PR lto/88004
348 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
349 lto_symtab_symbol_p as it does checking of transparent alias.
350 These needs to be also merged in the function.
351
7958186b
MP
3522018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
353
354 * lto-partition.c (privatize_symbol_name_1): Use
355 clone_function_name_numbered.
356
abb967da
JH
3572018-10-26 Jan Hubicka <jh@suse.cz>
358
ab20d992 359 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
abb967da 360
033eb567
DM
3612018-10-17 David Malcolm <dmalcolm@redhat.com>
362
363 * Make-lang.in (selftest-lto): New.
364
9ed6dbee
ML
3652018-08-29 Martin Liska <mliska@suse.cz>
366
367 PR bootstrap/87130
368 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
369 to behavior before r263887.
370
3d78e008
ML
3712018-08-27 Martin Liska <mliska@suse.cz>
372
373 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
374 fndecl_built_in_p and remove check for FUNCTION_DECL if
375 possible.
3d78e008
ML
376 * lto-symtab.c (lto_symtab_merge_p): Likewise.
377 (lto_symtab_merge_decls_1): Likewise.
378 (lto_symtab_merge_symbols): Likewise.
379 * lto.c (lto_maybe_register_decl): Likewise.
380 (read_cgraph_and_symbols): Likewise.
381
efd9eb29
TV
3822018-08-21 Tom de Vries <tdevries@suse.de>
383
ab20d992 384 * lto.c (lto_main): Call debuginfo_early_start and
efd9eb29
TV
385 debuginfo_early_stop.
386
00abf86c
MS
3872018-07-20 Martin Sebor <msebor@redhat.com>
388
389 PR middle-end/82063
390 * lto-lang.c (lto_handle_option): Change function argument
391 to HOST_WIDE_INT.
392
efe0e6cd
RB
3932018-07-20 Richard Biener <rguenther@suse.de>
394
395 PR debug/86585
396 * lto.c (unify_scc): Before we throw away an SCC see if we
397 can amend prevailing single-entry SCC with debug refs.
398
814f3331
JH
3992018-07-13 Jan Hubicka <hubicka@ucw.cz>
400
401 * lto.c (do_stream_out): Add PART parameter; open dump file.
402 (stream_out): Add PART parameter; pass it to do_stream_out.
403 (lto_wpa_write_files): Update call of stream_out.
404
c518c102
ML
4052018-07-04 Martin Liska <mliska@suse.cz>
406
407 PR middle-end/66240
408 PR target/45996
409 PR c/84100
410 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
411 instead of memcmp.
412
b54006ae
ML
4132018-06-20 Martin Liska <mliska@suse.cz>
414
415 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 416 FIXME comment.
b54006ae 417
56f62793
ML
4182018-06-19 Martin Liska <mliska@suse.cz>
419
420 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 421 of get_create.
56f62793
ML
422 (undo_partition): Likewise.
423 (lto_balanced_map): Likewise.
424
1724941e
ML
4252018-06-19 Martin Liska <mliska@suse.cz>
426
427 * config-lang.in: Remove stagestuff.
428
29a50dfb
JH
4292018-06-08 Jan Hubicka <hubicka@ucw.cz>
430
431 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
432 New global vars.
433 (lto_register_dumps): New hook.
434 (LANG_HOOKS_REGISTER_DUMPS): New.
435 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
436 * lto-symtab.c: Include lto.h; dump into dump_file instead of
437 symtab->dump_file.
438 (lto_symtab_merge_decls): Initialize dump file.
439 * lto.c (read_cgraph_and_symbols): Initialize dump file.
440 (do_whole_program_analysis): Likewise.
441
74644756
ML
4422018-06-08 Martin Liska <mliska@suse.cz>
443
444 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
445 instead of summary_uid.
446
99353fcf
ML
4472018-06-08 Martin Liska <mliska@suse.cz>
448
449 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
450 of get.
451 (undo_partition): Likewise.
452 (lto_balanced_map): Likewise.
453
31db0fe0
ML
4542018-06-08 Martin Liska <mliska@suse.cz>
455
456 * lto-partition.c (add_references_to_partition): Remove support
457 for MPX (macros, related functions, fields in cgraph_node, ...).
458 (add_symbol_to_partition_1): Likewise.
459 (privatize_symbol_name): Likewise.
460 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
461
f115c9b5
RB
4622018-06-05 Richard Biener <rguenther@suse.de>
463
464 * lto.c (cmp_type_location): Expand locations only once.
465
5b42d196
JH
4662018-05-30 Jan Hubicka <hubicka@ucw.cz>
467
468 * lang.opt (lto_linker_output): Add nolto-rel.
469 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
470 and LTO_LINKER_OUTPUT_NOLTOREL.
471 (lto_init): Generate lto when doing incremental link.
472 * lto.c (lto_precess_name): Add lto1-inclink.
473
ab168044
JH
4742018-05-18 Jan Hubicka <jh@suse.cz>
475
476 PR lto/85583
477 * lto-partition.c (account_reference_p): Do not account
478 references from aliases; do not account refernces from
479 external initializers.
480
b6e33d73
JH
4812018-04-30 Jan Hubicka <jh@suse.cz>
482
483 * lto.c (cmp_partitions_size): Remove.
484 (lto_wpa_write_files): Also output priorities; do not sort partitions.
485 (cmp_partition_order): Move to ...
486 * lto-partition.c (cmp_partition_order): ...
487 (lto_1_to_1_map): Sort partitions.
488
e693ebce
JH
4892018-04-20 Jan Hubicka <jh@suse.cz>
490
491 * lto-partition.c (lto_balanced_map): Fix sanity check.
492
ddb0b824
JH
4932018-04-19 Jan Hubicka <jh@suse.cz>
494
495 * lto-partition.c: Include sreal.h
496 (add_symbol_to_partition_1): Use size instead of self_size
497 for size estimate.
498 (account_reference_p): New.
499 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
500 fix accounting errors in boundary size; add debug output; combine cost
501 as cost/size instead of cost/internal; reduce the partitioning error to
502 +- 1/8 of the parttion size.
503
1781a04f
ML
5042018-04-19 Martin Liska <mliska@suse.cz>
505
506 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
507 for multiple PREVAILING_DEF_IRONLY for common symbols.
508
6867cd69
ML
5092018-04-18 Martin Liska <mliska@suse.cz>
510
511 * lto.c (lto_read_decls): Fix GNU coding style and typos.
512
af597536
ML
5132018-04-18 Martin Liska <mliska@suse.cz>
514
515 PR ipa/83983
516 PR ipa/85391
517 * lto.c (cmp_type_location): New function.
518 (lto_read_decls): First collect all types, then
519 sort them according by location before register_odr_type
520 is called.
521
7d6051b1
JH
5222018-04-18 Jan Hubicka <jh@suse.cz>
523 Martin Liska <mliska@suse.cz>
524
525 PR lto/85391
526 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
527 types.
528
23d87577
ML
5292018-04-11 Martin Liska <mliska@suse.cz>
530
531 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
532 function.
533
c16833dc
ML
5342018-04-10 Martin Liska <mliska@suse.cz>
535
536 PR lto/85248
537 * lto-symtab.c (lto_symtab_merge_p): Do not check for
538 TREE_VALUES of error attributes.
539
8d96e546
ML
5402018-04-10 Richard Biener <rguenther@suse.de>
541 Martin Liska <mliska@suse.cz>
542
543 PR lto/85248
544 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
545
97bb4812
JH
5462018-02-08 Jan Hubicka <hubicka@ucw.cz>
547
548 * lto-partition.c (lto_balanced_map): Watch overflow.
549
39aa9b23
JH
5502018-02-08 Jan Hubicka <hubicka@ucw.cz>
551
552 PR ipa/81360
553 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
554 (read_cgraph_and_symbols): Use
555 symtab_node::output_to_lto_symbol_table_p.
556
26a823f0
JH
5572018-01-30 Jan Hubicka <hubicka@ucw.cz>
558
559 * lto.c (register_resolution): Remove forgotten sanity check.
560
43fbc2e9
JH
5612018-01-30 Jan Hubicka <hubicka@ucw.cz>
562
563 PR lto/81004
564 * lto.c: Include builtins.h
565 (register_resolution): Merge resolutions in case trees was
566 merged across units.
567 (lto_maybe_register_decl): Break out from ...
568 (lto_read_decls): ... here.
569 (unify_scc): Also register decls here.
570 (read_cgraph_and_symbols): Sanity check that all resolutions was
571 read.
572
ee034d31
EB
5732018-02-02 Eric Botcazou <ebotcazou@adacore.com>
574
575 PR lto/83954
576 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
577 component type of array types with non-aliased component.
578
44c945e6
JH
5792018-01-30 Jan Hubicka <hubicka@ucw.cz>
580
581 PR lto/83954
582 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
583 for type match warning on arrays of pointers.
584
cde9b2f8
ML
5852018-01-23 Martin Liska <mliska@suse.cz>
586
587 PR lto/81440
588 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
589 trailing arrays at the end of a struct.
590
5c0caeb3
RS
5912018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
592 Alan Hayward <alan.hayward@arm.com>
593 David Sherwood <david.sherwood@arm.com>
594
595 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
596
928686b1
RS
5972018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
598 Alan Hayward <alan.hayward@arm.com>
599 David Sherwood <david.sherwood@arm.com>
600
601 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
602 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
603
85ec4feb
JJ
6042018-01-03 Jakub Jelinek <jakub@redhat.com>
605
606 Update copyright years.
607
4849deb1
JJ
6082017-12-15 Jakub Jelinek <jakub@redhat.com>
609
610 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
611 affects_type_identity and handler fields, adjust comments.
612
734914b6
RS
6132017-12-07 Richard Sandiford <richard.sandiford@arm.com>
614
615 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
616
5d9ae53d
MS
6172017-12-07 Martin Sebor <msebor@redhat.com>
618
619 PR c/81544
620 * lto-lang.c (lto_attribute_table): Initialize new member of struct
621 attribute_spec.
622
5de73c05
JJ
6232017-11-30 Jakub Jelinek <jakub@redhat.com>
624
625 * lto.c (create_subid_section_table): Use ; instead of ;;.
626
974aedcc
MP
6272017-11-22 Marek Polacek <polacek@redhat.com>
628
629 PR c++/60336
630 PR middle-end/67239
631 PR target/68355
632 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
633
1bad9c18
JH
6342017-11-10 Jan Hubicka <hubicka@ucw.cz>
635
636 * lto-partition.c (lto_balanced_map): Use frequency accessor.
637
65991ea3
JH
6382017-10-13 Jan Hubicka <hubicka@ucw.cz>
639
640 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
641
4e7d0260
NS
6422017-10-11 Nathan Sidwell <nathan@acm.org>
643
644 * lto.c (mentions_vars_p_decl_with_vis): Use
645 DECL_ASSEMBLER_NAME_RAW.
646 (lto_fixup_prevailing_decls): Likewise.
647
8e6cdc90
RS
6482017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
649
650 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
651 operating on trees as wide_ints.
652
357b7604
RS
6532017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
654 Alan Hayward <alan.hayward@arm.com>
655 David Sherwood <david.sherwood@arm.com>
656
657 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
658
1ea85365
RB
6592017-08-21 Richard Biener <rguenther@suse.de>
660
92a285c1
ML
661 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
662 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
663 TYPE_DECL debug processing, register DIE references from
664 prevailing SCCs with the debug machinery.
665 (lto_section_with_id): Handle LTO debug sections.
1ea85365 666
8e093270
NS
6672017-08-16 Nathan Sidwell <nathan@acm.org>
668
669 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
670 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
671 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
672
eac3ab4a
TV
6732017-08-08 Tom de Vries <tom@codesourcery.com>
674
675 * lto.c: Include attribs.h.
676
314e6352
ML
6772017-08-08 Martin Liska <mliska@suse.cz>
678
679 * lto-lang.c: Include header files.
680 * lto-symtab.c: Likewise.
681
63e434ca
RB
6822017-08-03 Richard Biener <rguenther@suse.de>
683
684 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
685 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
686 use DECL_LANG_FLAG_0.
687 (lto_symtab_prevail_decl): Likewise.
688
417ca011
TD
6892017-07-07 Torsten Duwe <duwe@suse.de>
690
691 * lto-lang.c (lto_attribute_table): Add entry for
692 "patchable_function_entry".
693
20deef65
NS
6942017-07-19 Nathan Sidwell <nathan@acm.org>
695
696 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
697 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
698
0eaf0bfe
JH
6992017-07-06 Jan Hubicka <hubicka@ucw.cz>
700
701 * lto-partition.c (lto_balanced_map): Do not check
702 flag_toplevel_reorder.
2db9b7cd 703
0eaf0bfe 7042017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
705 * lto-lang.c (lto_init): Use builtin_structptr_types.
706
d1eed638
JH
7072017-06-15 Jan Hubicka <hubicka@ucw.cz>
708 Thomas Preud'homme <thomas.preudhomme@arm.com>
709
710 PR lto/69866
711 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
712 that resolved externally.
713
d2db2e6b
JH
7142017-05-23 Jan Hubicka <hubicka@ucw.cz>
715
716 * lto.c (do_whole_program_analysis): Replace inline_free_summary
717 by ipa_free_fn_summary.
718
464d0118
ML
7192017-05-23 Martin Liska <mliska@suse.cz>
720
721 * lto-symtab.c (lto_cgraph_replace_node): Use
722 symtab_node::dump_{asm_,}name functions.
723 * lto.c (read_cgraph_and_symbols): Likewise.
724 (do_whole_program_analysis): Likewise.
725
6c52831d
ML
7262017-05-23 Martin Liska <mliska@suse.cz>
727
728 * lto.c (read_cgraph_and_symbols): Use the renamed function.
729 (do_whole_program_analysis): Use the renamed function.
730
27d020cf
JH
7312017-05-22 Jan Hubicka <hubicka@ucw.cz>
732
733 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
734 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
735
815d9cc6
XR
7362017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
737
92a285c1 738 PR c++/80038
815d9cc6
XR
739 * lto-lang.c (lto_init): Set in_lto_p earlier.
740
350792ff 7412017-04-12 Richard Biener <rguenther@suse.de>
ab20d992 742 Bernd Edlinger <bernd.edlinger@hotmail.de>
350792ff
RB
743
744 PR middle-end/79671
745 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
746
4a44a5f3
ML
7472017-02-14 Martin Liska <mliska@suse.cz>
748
749 * lto.c (do_stream_out): Free LTO file filename string.
750
8a3a6ab4
DM
7512017-01-19 David Malcolm <dmalcolm@redhat.com>
752
753 * lto-lang.c (builtin_type_for_size): Convert call to
754 lto_type_for_size to one through the langhook.
755 (lto_type_for_size): Move to langhooks.c and rename to
756 lhd_type_for_size.
757 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
758
4c4b4703
JJ
7592017-01-11 Jakub Jelinek <jakub@redhat.com>
760
761 PR middle-end/50199
762 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
763 if it was 0.
764
bd2c6270
JJ
7652017-01-09 Jakub Jelinek <jakub@redhat.com>
766
767 PR translation/79019
768 PR translation/79020
769 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
770
24d3f325
NS
7712017-01-06 Nathan Sidwell <nathan@acm.org>
772
5406184c
NS
773 * lto-partition.c (promote_symbol): Write to dump file sooner,
774 include alias promoting too.
775
24d3f325
NS
776 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
777 (may_need_named_section_p): Likewise.
778 (rename_statics): Likewise.
779 (lto_promote_cross_file_statics): Likewise.
780
cbe34bb5
JJ
7812017-01-01 Jakub Jelinek <jakub@redhat.com>
782
783 Update copyright years.
784
6c8bf066
GJL
7852016-11-30 Georg-Johann Lay <avr@gjlay.de>
786
787 PR lto/78562
788 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
789 mismatch if the two types are built-in.
790
7fa6a965
PK
7912016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
792
793 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
794
efb71232
RB
7952016-11-23 Richard Biener <rguenther@suse.de>
796
797 PR lto/78472
798 * lto.c (hash_canonical_type): Ignore zero-sized fields.
799
48330c93
BE
8002016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
801
802 PR c++/71973
803 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
804
899ca90e 8052016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
806 Alan Hayward <alan.hayward@arm.com>
807 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
808
809 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
810
65179585
RB
8112016-10-31 Richard Biener <rguenther@suse.de>
812
813 PR lto/78129
814 * lto.c (do_whole_program_analysis): Bail out after errors
815 from WPA analysis.
816
8bc5448f
KV
8172016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
818
819 * lto-partition.c: Include tree-vrp.h.
820 * lto.c: Likewise.
821
68317985
RB
8222016-09-20 Richard Biener <rguenther@suse.de>
823
824 * lto.c (lto_main): Call early_finish with "<artificial>" as
825 filename.
826
321e76fb
RB
8272016-09-19 Richard Biener <rguenther@suse.de>
828
829 * lto.c (lto_main): Invoke early_finish debug hook.
830
ea6e17d5
RB
8312016-07-25 Richard Biener <rguenther@suse.de>
832
833 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
834 (unify_scc): Likewise.
835 (lto_read_decls): Likewise.
836
e9ac1f86
JJ
8372016-06-28 Jakub Jelinek <jakub@redhat.com>
838
839 * Make-lang.in: Don't cat ../stage_current if it does not exist.
840
277d7ee0
AK
8412016-06-23 Andi Kleen <ak@linux.intel.com>
842
843 * Make-lang.in: Add support for autofdo (disabled for now)
844
4d926e34
MS
8452016-06-10 Martin Sebor <msebor@redhat.com>
846
847 PR c/71392
ab20d992 848 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
4d926e34
MS
849 attribute in type-generic builtins.
850
479f99c9
JH
8512016-05-16 Jan Hubicka <hubicka@ucw.cz>
852
853 * lto-partition.c (add_symbol_to_partition_1): Likewise.
854
1a0bf5e1
JH
8552016-05-03 Jan Hubicka <hubicka@ucw.cz>
856
857 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
858
a2e76867
PK
8592016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
860
861 * lto-partition.h (lto_balanced_map): New parameter.
862 * lto-partition.c (lto_balanced_map): New parameter
863 max_partition_size.
864 Check if partition size is greater than max_partition_size.
865 * lto.c (do_whole_program_analysis): Adjust calls to
866 lto_balanced_map() to pass 2nd argument.
867
ea913779
L
8682016-03-17 H.J. Lu <hongjiu.lu@intel.com>
869
870 PR lto/70258
871 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
872 PIE.
873
56aae4b7
JJ
8742016-03-08 Jakub Jelinek <jakub@redhat.com>
875
876 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
877 - becuase -> because.
878
ed5d948d
TV
8792016-02-15 Tom de Vries <tom@codesourcery.com>
880
881 PR lto/69655
882 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
883 argument.
884
4ecbadc7
ML
8852016-01-27 Martin Liska <mliska@suse.cz>
886
887 * lto-partition.c (add_symbol_to_partition_1): Remove usage
888 of hsa_summaries.
889
e49d321f
JH
8902016-01-19 Jan Hubicka <hubicka@ucw.cz>
891
892 PR lto/69136
893 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
894 decls have no assemblernames.
895
b2b40051 8962016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 897 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
898
899 * lto-partition.c: Include "hsa.h"
900 (add_symbol_to_partition_1): Put hsa implementations into the
901 same partition as host implementations.
902
5803bd01
JH
9032016-01-12 Jan Hubicka <hubicka@ucw.cz>
904
905 PR lto/69003
906 * lto-partition.c (rename_statics): Fix pasto.
907
13092f61
RB
9082016-01-18 Richard Biener <rguenther@suse.de>
909
910 PR lto/69337
911 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
912 function vs. variable.
913
3c4e91c9
RB
9142016-01-12 Richard Biener <rguenther@suse.de>
915
916 PR lto/69077
917 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
918 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
919
818ab71a
JJ
9202016-01-04 Jakub Jelinek <jakub@redhat.com>
921
922 Update copyright years.
923
3fddb2ef
JH
9242015-12-10 Jan Hubicka <hubicka@ucw.cz>
925
926 PR lto/68878
927 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
928 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
929 (lto_symtab_prevailing_decl): Use it.
930
4a38b02b
IV
9312015-12-15 Ilya Verbin <ilya.verbin@intel.com>
932
933 * lto.c: Include stringpool.h and fold-const.h.
934 (offload_handle_link_vars): New static function.
935 (lto_main): Call offload_handle_link_vars.
936
ca834876
JH
9372015-12-10 Jan Hubicka <hubicka@ucw.cz>
938
939 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
940
958a627f
JH
9412015-12-11 Jan Hubicka <hubicka@ucw.cz>
942
943 PR ipa/61886
944 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
945 values of error and warning attributes.
946
da20571a
JH
9472015-12-08 Jan Hubicka <hubicka@ucw.cz>
948
949 PR lto/68811
950 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
951 DECL.
952 (LTO_NO_PREVAIL): Use gcc_checking_assert.
953
378004b9
JH
9542015-12-08 Jan Hubicka <hubicka@ucw.cz>
955
956 PR lto/68811
957 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
958 by itself.
959
6b9ac179
JH
9602015-12-08 Jan Hubicka <hubicka@ucw.cz>
961
962 PR ipa/61886
963 * lto-symtab.c: Include lto-symtab.h.
964 (lto_cgraph_replace_node): Do not merge profiles here.
965 (lto_symtab_merge_p): New function.
966 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
967 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
968 aliases.
969 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
970 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
971 * lto.c: Include lto-symtab.h
972 * lto-symtab.h: New.
973
41c60c6c
JH
9742015-12-08 Jan Hubicka <hubicka@ucw.cz>
975
976 PR ipa/61886
977 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
978 are not part of the definition.
979 (contained_in_symbol): Likewise.
980 (promote_symbol): When promoting a symbol also promote all transparent
981 aliases.
982 (rename_statics): Weakref needs unique name, too.
983
71e54687
JH
9842015-12-07 Jan Hubicka <hubicka@ucw.cz>
985
986 PR ipa/61886
987 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
988 rename_statics, rename_statics): Handle transparent aliases.
989
88636b62
JH
9902015-12-04 Jan Hubicka <hubicka@ucw.cz>
991
992 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
993 merged_comdat.
994
8c86248e
JH
9952015-12-01 Jan Hubicka <hubicka@ucw.cz>
996
997 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
998
1ff9ed6f
JH
9992015-11-25 Jan Hubicka <jh@suse.cz>
1000
1001 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
1002 * lang.opt (lto_linker_output): New enum.
1003 (flinker_output): New flag.
1004
22bea0be
JH
10052015-11-24 Jan Hubicka <hubicka@ucw.cz>
1006
1007 * lto-symtab.c: Include alias.h
1008 (warn_type_compatibility_p): Replace types_compatible_p checks by
1009 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
1010 (lto_symtab_merge): Compare DECL sizes.
1011 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
1012
aea50b45
JH
10132015-11-24 Jan Hubicka <hubicka@ucw.cz>
1014
1015 * lto.c (iterative_hash_canonical_type): Recruse for all types
1016 which pass !canonical_type_used_p.
1017 (gimple_register_canonical_type_1): Sanity check we do not compute
1018 canonical type of anything with !canonical_type_used_p.
1019 (gimple_register_canonical_type): Skip all types that are
1020 !canonical_type_used_p
1021
deb3dae6
JH
10222015-11-24 Jan Hubicka <hubicka@ucw.cz>
1023
1024 * lto.c (unify_scc): Use free_node.
1025
f85d2487
JH
10262015-11-21 Jan Hubicka <hubicka@ucw.cz>
1027
1028 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
1029 (gimple_register_canonical_type_1): Check that pointers do not get
1030 canonical types.
1031 (gimple_register_canonical_type): Do not register pointers.
1032
10332015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
1034
1035 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
1036 flag for types that are not ODR; fix loop walking parameters.
1037
69f293c9
AM
10382015-11-11 Andrew MacLeod <amacleod@redhat.com>
1039
1040 * lto-lang.c: Remove unused header files.
1041 * lto-object.c: Likewise.
1042 * lto-partition.c: Likewise.
1043 * lto-symtab.c: Likewise.
1044 * lto.c: Likewise.
1045
ee45a32d
EB
10462015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1047
1048 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
1049
0aad0198
RS
10502015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1051
1052 * lto-lang.c: Don't undef DEF_BUILTIN.
1053
2adfab87
AM
10542015-10-29 Andrew MacLeod <amacleod@redhat.com>
1055
1056 * lto-lang.c: Reorder #include's and remove duplicates.
1057 * lto-object.c: Likewise.
1058 * lto-partition.c: Likewise.
1059 * lto-symtab.c: Likewise.
1060 * lto.c: Likewise.
1061
b2b29377
MM
10622015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
1063
1064 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
1065 conditionals.
1066 (lto_fixup_state): Likewise.
1067 (do_whole_program_analysis): Use
1068 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
1069 conditionals.
1070
d9a6bd32
JJ
10712015-10-13 Jakub Jelinek <jakub@redhat.com>
1072
1073 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1074 DEF_FUNCTION_TYPE_11): Define.
1075
9c4eeafc
JH
10762015-10-10 Jan Hubicka <hubicka@ucw.cz>
1077
1078 * lto.c (hash_canonical_type): Honor
1079 type_with_interoperable_signedness.
1080
3e32ee19
NS
10812015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1082
1083 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
1084 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1085
f196d062
RB
10862015-08-31 Richard Biener <rguenther@suse.de>
1087
1088 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
1089 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
1090 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
1091 participate in merging with something else.
1092
45aee888
RB
10932015-08-31 Richard Biener <rguenther@suse.de>
1094
1095 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
1096 test, do not replace a non-builtin with a builtin.
1097 * lto.c (compare_tree_sccs_1): Do not merge things we stream
1098 as builtins vs. non-builtins.
1099
a79683d5
TS
11002015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1101
1102 * lto.h: Remove useless typedefs.
1103
48d859bb
AM
11042015-07-15 Andrew MacLeod <amacleod@redhat.com>
1105
1106 * lto.c: Remove redundant includes.
1107
026c3cfd
AH
11082015-07-12 Aldy Hernandez <aldyh@redhat.com>
1109
1110 * lto-lang.c: Fix double word typos.
1111
9fdcd34e
AM
11122015-07-10 Andrew MacLeod <amacleod@redhat.com>
1113
1114 * lto.c: Include cfghooks.h rather than predict.h.
1115
f51ade33
AM
11162015-07-09 Andrew MacLeod <amacleod@redhat.com>
1117
1118 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1119 lto-streamer.h.
1120 * lto-object.c: Likewise.
1121 * lto-partition.c: Likewise.
1122 * lto-symtab.c: Likewise.
1123
1916bcb5
AM
11242015-07-09 Andrew MacLeod <amacleod@redhat.com>
1125
1126 * lto-lang.c: Adjust includes for flags.h changes.
1127
c7131fb2
AM
11282015-07-07 Andrew MacLeod <amacleod@redhat.com>
1129
1130 * lto-lang.c: Adjust includes.
1131 * lto-object.c: Likewise.
1132 * lto-partition.c: Likewise.
1133 * lto-symtab.c: Likewise.
1134 * lto.c: Likewise.
1135
f0889939
AM
11362015-06-25 Andrew MacLeod <amacleod@redhat.com>
1137
1138 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1139 * lto-object.c: Likewise.
1140 * lto-partition.c: Likewise.
1141 * lto-symtab.c: Likewise.
1142 * lto-tree.h: Likewise.
1143 * lto.c: Likewise.
1144
8d67ee55
RS
11452015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1146
1147 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1148 than typed_noop_remove. Remove redudant typedefs.
1149
abb226c9
AM
11502015-06-17 Andrew MacLeod <amacleod@redhat.com>
1151
1152 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1153 * lto-object.c: Likewise.
1154 * lto-partition.c: Likewise.
1155 * lto-symtab.c: Likewise.
1156 * lto.c: Likewise.
1157
351d90f4
JH
11582015-06-14 Jan Hubicka <hubicka@ucw.cz>
1159
1160 PR ipa/66181
1161 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1162
44c42705
DD
11632015-06-12 DJ Delorie <dj@redhat.com>
1164
1165 * lto-lang.c (lto_type_for_size): Include intN types.
1166 (lto_type_for_mode): Likewise.
1167
64578d98
JH
11682015-06-08 Jan Hubicka <hubicka@ucw.cz>
1169
1170 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1171
13fdf2e2
AM
11722015-06-08 Andrew MacLeod <amacleod@redhat.com>
1173
1174 * lto-lang.c : Adjust include files.
1175 * lto-object.c : Likewise.
1176 * lto-partition.c : Likewise.
1177 * lto-partition.h : Likewise.
1178 * lto-symtab.c : Likewise.
1179 * lto.c : Likewise.
1180 * lto.h : Likewise.
1181
ccb5ad37
JH
11822015-06-06 Jan Hubicka <hubicka@ucw.cz>
1183
6542950e
JH
1184 PR lto/65378
1185 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1186 odr_or_derived_type_p.
1187 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1188
11892015-06-08 Jan Hubicka <hubicka@ucw.cz>
1190
ccb5ad37
JH
1191 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1192 pointers.
1193
d7438551
AH
11942015-06-05 Aldy Hernandez <aldyh@redhat.com>
1195
1196 * lto-lang.c (lto_write_globals): Remove.
1197 (LANG_HOOKS_WRITE_GLOBALS): Same.
1198
ecb9f223
AM
11992015-06-04 Andrew MacLeod <amacleod@redhat.com>
1200
1201 * lto-lang.c: Adjust includes for restructured coretypes.h.
1202 * lto-object.c: Likewise.
1203 * lto-partition.c: Likewise.
1204 * lto-symtab.c: Likewise.
1205 * lto.c: Likewise.
1206
9cb9b937
JH
12072015-06-04 Jan Hubicka <hubicka@ucw.cz>
1208
1209 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1210
93e2aa6d
JH
12112015-06-03 Jan Hubicka <hubicka@ucw.cz>
1212
1213 * lto.c (iterative_hash_canonical_type,
1214 gimple_register_canonical_type): only hash main variants of types
1215
faae53f8
ML
12162015-05-27 Martin Liska <mliska@suse.cz>
1217
1218 * lto-partition.c (new_partition): Reset number of symbols.
1219 (add_symbol_to_partition_1): Increment number of symbols.
1220 (undo_partition): Decrement number of symbols.
1221 (lto_balanced_map): Dump number of symbols and insns that
1222 belong to a partition.
1223 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1224
b727ba74
JH
12252015-05-22 Jan Hubicka <hubicka@ucw.cz>
1226
1227 * lto.c (hash_canonical_type): Be sure we hash only types that
1228 need alias set.
1229 (gimple_register_canonical_type_1): Do not produce canonical
1230 types for types that do not need alias sets.
1231
1d1218fb
JH
12322015-05-22 Jan Hubicka <hubicka@ucw.cz>
1233
1234 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1235
872d5034
JH
12362015-05-19 Jan Hubicka <hubicka@ucw.cz>
1237
1238 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1239
259d29e3
JH
12402015-05-17 Jan Hubicka <hubicka@ucw.cz>
1241
1242 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1243 compare ODR types (if available) and function types.
1244 (lto_symtab_merge): ... here; output ODR violation warnings
1245 and call warn_types_mismatch.
1246
b0845a1e
JH
12472015-04-29 Jan Hubicka <hubicka@ucw.cz>
1248
1249 * lto.c (lto_fixup_state): Call verify_type.
1250
67f58944
TS
12512015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1252
b0845a1e 1253 * lto.c: Adjust for hash_table changes.
67f58944 1254
36ceb0e3
JH
12552015-03-27 Jan Hubicka <hubicka@ucw.cz>
1256
1257 * lto.c (lto_read_decls): Move code registering odr types out
1258 of TYPE_CANONICAL conditional and also register polymorphic types.
1259
afd1e7c6
JH
12602015-03-26 Jan Hubicka <hubicka@ucw.cz>
1261
1262 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1263 DECL_ARTIFICAL symbols.
1264
eaeec5ec
JH
12652015-03-26 Jan Hubicka <hubicka@ucw.cz>
1266
1267 PR lto/65536
1268 * lto.c (unify_scc): Revert location cache when unification
1269 suceeded.
1270 (lto_read_decls): Accept location cache after sucess;
1271 apply location cache before calling debug hooks.
1272
1c4db829
JH
12732015-03-10 Jan Hubicka <hubicka@ucw.cz>
1274
1275 * lto.c (read_cgraph_and_symbols): Do not do merging
1276 at ltrans stage.
1277
db847fa8
JJ
12782015-02-26 Jakub Jelinek <jakub@redhat.com>
1279
1280 * lto.c (lto_mode_identity_table): New variable.
1281 (lto_read_decls): Add mode_table argument to the lto_input_block
1282 constructor.
1283 (lto_file_finalize): Initialize mode_table.
1284 (lto_init): Initialize lto_mode_identity_table.
1285
56a9f6bc
TS
12862015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1287
1288 PR libgomp/64625
1289 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1290 Remove macros.
1291 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1292
ebc8f0bb
JH
12932015-02-03 Jan Hubicka <hubicka@ucw.cz>
1294
1295 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1296
40fecdd6
JM
12972015-01-30 Joseph Myers <joseph@codesourcery.com>
1298
1299 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1300 changed to pass input_location as first argument.
1301
040968a8
JH
13022014-12-11 Jan Hubicka <hubicka@ucw.cz>
1303
1304 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1305
69fe4502
JH
13062014-12-11 Jan Hubicka <hubicka@ucw.cz>
1307
1308 * lto.c (compare_tree_sccs_1): Add comparsion of
1309 DECL_FUNCTION_SPECIFIC_TARGET
1310
41dbbb37
TS
13112015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1312 James Norris <jnorris@codesourcery.com>
1313
1314 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1315 New macros.
1316 * lto.c: Include "gomp-constants.h".
1317
837bac8c
IV
13182015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1319
1320 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1321 from select_what_to_stream.
1322
1b34e6e2
BS
13232015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1324 Jakub Jelinek <jakub@redhat.com>
1325
1326 PR middle-end/64412
1327 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1328 if ACCEL_COMPILER.
1329
adfac8df
JJ
13302015-01-09 Michael Collison <michael.collison@linaro.org>
1331
1332 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1333 input.h, alias.h, symtab.h, options, fold-const.h,
1334 wide-int.h, and inchash.h due to flattening of tree.h.
1335 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1336 input.h, alias.h, symtab.h, fold-const.h,
1337 wide-int.h, and inchash.h due to flattening of tree.h.
1338 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1339 input.h, alias.h, symtab.h, options, fold-const.h,
1340 wide-int.h, and inchash.h due to flattening of tree.h.
1341 * lto-partition.c: Ditto.
1342 * lto-symtab.c: Ditto.
1343
5624e564
JJ
13442015-01-05 Jakub Jelinek <jakub@redhat.com>
1345
1346 Update copyright years.
1347
9a1e784a
ML
13482014-12-22 Martin Liska <mliska@suse.cz>
1349
1350 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1351 is used.
1352 (undo_partition): Likewise.
1353 (lto_balanced_map): Likewise.
1354
dd912cb8
ML
13552014-12-22 Martin Liska <mliska@suse.cz>
1356
1357 * lto-partition.c: Include of symbol-summary.h is added.
1358 * lto-symtab.c: Likewise.
1359 * lto.c: Likewise.
1360
17e0fc92
JH
13612014-12-11 Jan Hubicka <hubicka@ucw.cz>
1362
1363 PR ipa/61324
1364 * lto.c (read_cgraph_and_symbols): Update call of
1365 remove_unreachable_nodes.
1366 (do_whole_program_analysis): Remove call of
1367 symtab->remove_unreachable_nodes
1368
58dddbd2
TS
13692014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1370
1371 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1372 htab with malloc instead of ggc.
1373
907dadbd
TS
13742014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1375
1376 * lto.c: Replace htab with hash_table.
1377
9c71e9df
TS
13782014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1379
1380 * lto.c (lto_read_in_decl_state): Adjust.
1381 (lto_fixup_state): Likewise.
1382
72a4a8b0
JH
13832014-11-17 Jan Hubicka <hubicka@ucw.cz>
1384
1385 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1386
54e774c0
JH
13872014-11-14 Jan Hubicka <hubicka@ucw.cz>
1388
1389 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1390
1f6be682
IV
13912014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1392 Bernd Schmidt <bernds@codesourcery.com>
1393 Andrey Turetskiy <andrey.turetskiy@intel.com>
1394 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1395
ab20d992 1396 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
ec6fe917
IV
1397
13982014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1399 Ilya Tocar <ilya.tocar@intel.com>
1400 Andrey Turetskiy <andrey.turetskiy@intel.com>
1401 Bernd Schmidt <bernds@codesourcery.com>
1402
1f6be682
IV
1403 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1404 LTO_SECTION_NAME_PREFIX.
1405 * lto-partition.c (lto_promote_cross_file_statics): Call
1406 select_what_to_stream.
1407 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1408 LTO_SECTION_NAME_PREFIX.
1409 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1410 being built as an offload compiler.
1411
ef4bddc2
RS
14122014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1413
1414 * lto-lang.c: Remove redundant enum from machine_mode.
1415
c582198b
AM
14162014-10-28 Andrew MacLeod <amacleod@redhat.com>
1417
1418 * lto.c: Adjust include files.
1419 * lto-lang.c: Ditto.
1420 * lto-object.c: Ditto.
1421 * lto-partition.c: Ditto.
1422 * lto-symtab.c: Ditto.
1423
60393bbc
AM
14242014-10-27 Andrew MacLeod <amacleod@redhat.com>
1425
1426 * lto-lang.c: Adjust include files.
1427 * lto-object.c: Ditto.
1428 * lto-partition.c: Ditto.
1429 * lto-symtab.c: Ditto.
1430 * lto.c: Ditto.
1431
957f47e6
DD
14322014-10-16 DJ Delorie <dj@redhat.com>
1433
1434 * lto-object.c (lto_obj_begin_section): In the event that pointer
1435 sizes aren't powers of two, choose a more suitable alignment
1436 than (unsigned)(-1).
1437
78a7c317
DD
14382014-10-14 DJ Delorie <dj@redhat.com>
1439
1440 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1441 size-type as well.
1442 (lto_init): Initialize all intN types, not just int128.
1443
70261a4f
ML
14442014-10-06 Martin Liska <mliska@suse.cz>
1445
1446 * lto.c (stream_out): ARG_UNUSED added for last argument.
1447
00de328a
AH
14482014-09-24 Aldy Hernandez <aldyh@redhat.com>
1449
1450 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1451 DECL_ABSTRACT_P.
1452
7861b648
AK
14532014-09-23 Andi Kleen <ak@linux.intel.com>
1454
1455 * lto-partition.c (node_cmp): Update comment.
1456 (varpool_node_cmp): Use symtab_node for comparison.
1457 (add_sorted_nodes): New function.
1458 (lto_balanced_map): Change to keep ordered queue
1459 of ordered node. Handle no_reorder attribute.
1460
1ee85ee1
JH
14612014-09-11 Jan Hubicka <hubicka@ucw.cz>
1462
1463 * lto.c (lto_read_decls): Register ODR types.
1464
8605403e
JH
14652014-08-20 Jan Hubicka <hubicka@ucw.cz>
1466
1467 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1468 call.
1469 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1470
56b1f114
JH
14712014-08-14 Jan Hubicka <hubicka@ucw.cz>
1472
1473 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1474
833f94c0
RB
14752014-08-14 Richard Biener <rguenther@suse.de>
1476
1477 PR lto/62067
1478 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1479
207c68cd
RB
14802014-08-08 Richard Biener <rguenther@suse.de>
1481
1482 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1483
7c581d61
BC
14842014-08-08 Bin Cheng <bin.cheng@arm.com>
1485
1486 PR lto/62032
1487 * lto-lang.c (lto_init): Switch mis-matched arguments.
1488
39c8aaa4
TS
14892014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1490
1491 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1492
6e2830c3
TS
14932014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1494
1495 * lto-partition.c, lto-partition.h: Use hash_set instead of
1496 pointer_set.
1497
50de5793
AK
14982014-07-31 Andi Kleen <ak@linux.intel.com>
1499
1500 * lto.c (hash_canonical_type): Use inchash::hash
1501 and use inchash::add_expr.
1502 (iterative_hash_canonical_type): Dito.
1503
f6bcdb5e
RB
15042014-07-30 Richard Biener <rguenther@suse.de>
1505
1506 * lto-streamer.h (lto_write_data): New function.
1507 * langhooks.c (lhd_append_data): Do not free block.
1508 * lto-section-out.c (lto_write_data): New function writing
1509 raw data to the current section.
1510 (lto_write_stream): Adjust for langhook semantic change.
1511 (lto_destroy_simple_output_block): Write header directly.
1512 * lto-opts.c (lto_write_options): Write options directly.
1513 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1514 (lto_output_toplevel_asms): Likewise.
1515 (copy_function_or_variable): Copy data directly.
1516 (write_global_references): Output index table directly.
1517 (lto_output_decl_state_refs): Likewise.
1518 (write_symbol): Write data directly.
1519 (produce_symtab): Adjust.
1520 (produce_asm_for_decls): Output header and refs directly.
1521
56fdfd3e
AK
15222014-07-25 Andi Kleen <ak@linux.intel.com>
1523
1524 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1525
0bd8bb04
AK
15262014-07-25 Andi Kleen <ak@linux.intel.com>
1527
1528 * lto.c (hash_canonical_type): Convert to inchash.
1529 (iterative_hash_canonical_type): Dito.
1530
6d8eb96b
AK
15312014-07-25 Andi Kleen <ak@linux.intel.com>
1532
1533 * lto.c: Include inchash.h
1534
ad115a3c
JH
15352014-07-14 Jan Hubicka <hubicka@ucw.cz>
1536
1537 * lto.c (mentions_vars_p_decl_non_common): Skip
1538 DECL_ARGUMENT_FLD.
1539 mentions_vars_p_function): Do DECL_ARGUMENTS.
1540 (lto_fixup_prevailing_decls): Update.
1541
917dd9bf
JH
15422014-07-12 Jan Hubicka <hubicka@ucw.cz>
1543
1544 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1545 timevar
1546 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1547
0b83e688
JH
15482014-07-11 Jan Hubicka <hubicka@ucw.cz>
1549
ab20d992 1550 * lto-partition.c (add_references_to_partition): Use
0b83e688
JH
1551 varpool_ctor_useable_for_folding_p.
1552 * lto.c (lto_read_in_decl_state): Update sanity check.
1553
e55637b7
ML
15542014-07-01 Martin Liska <mliska@suse.cz>
1555
1556 IPA REF alias refactoring
1557 * lto-partition.c (add_symbol_to_partition_1): Usage of
1558 FOR_EACH_ALIAS added.
1559
010f4e27
JH
15602014-06-28 Jan Hubicka <hubicka@ucw.cz>
1561
1562 Revert:
1563 * lto.c (lto_copy_fields_not_streamed): New function.
1564 (compare_tree_sccs_1): Do not compare fields shared in between type
1565 and variant.
1566 (lto_read_decls): Fixup types first before inserting into hash.
1567
b82fe354
AP
15682014-06-28 Andrew Pinski <apinski@cavium.com>
1569
1570 * lto.c (lto_read_decls): Fix comment in comment.
1571
288eeff7
JH
15722014-06-28 Jan Hubicka <hubicka@ucw.cz>
1573
1574 * lto.c (lto_copy_fields_not_streamed): New function.
1575 (compare_tree_sccs_1): Do not compare fields shared in between type
1576 and variant.
1577 (lto_read_decls): Fixup types first before inserting into hash.
1578
e01fa630
ML
15792014-06-25 Martin Liska <mliska@suse.cz>
1580
ab20d992 1581 * lto-partition.c (add_references_to_partition): New IPA REF function
e01fa630
ML
1582 used.
1583 (add_symbol_to_partition_1): Likewise.
1584 (lto_balanced_map): Likewise.
ab20d992 1585 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
e01fa630 1586
aaf8a23e
JH
15872014-06-24 Jan Hubicka <hubicka@ucw.cz>
1588
1589 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1590 (mentions_vars_p_function): ... here.
1591 (compare_tree_sccs_1): Update VINDEX checks.
1592 (lto_fixup_prevailing_decls): Likewise.
1593
1eb68d2d
TS
15942014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1595
1596 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1597 pointer_map.
1598
c203e8a7
TS
15992014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1600
1601 * lto.c: Adjust.
1602
714c800f
JH
16032014-06-20 Jan Hubicka <hubicka@ucw.cz>
1604
1605 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1606
569b1784
JH
16072014-06-20 Jan Hubicka <hubicka@ucw.cz>
1608
1609 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1610
56363ffd
JH
16112014-06-15 Jan Hubicka <hubicka@ucw.cz>
1612
1613 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1614
e257a17c
JH
16152014-06-10 Jan Hubicka <hubicka@ucw.cz>
1616
1617 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1618 (do_whole_program_analysis): Use verify_symtab.
1619
24d047a3
JH
16202014-06-07 Jan Hubicka <hubicka@ucw.cz>
1621
1622 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1623 lto_fixup_prevailing_decls): Skip section names.
1624
9b2b7279
AM
16252014-06-02 Andrew MacLeod <amacleod@redhat.com>
1626
1627 * lto-symtab.c: Include builtins.h.
1628
a9243bfc
RB
16292014-05-26 Richard Biener <rguenther@suse.de>
1630
1631 * lto.c (lto_parse_hex): Use int64_t.
1632 (lto_resolution_read): Likewise.
1633
fd1e9302
JH
16342014-05-23 Jan Hubicka <hubicka@ucw.cz>
1635
1636 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1637
aede2c10
JH
16382014-05-23 Jan Hubicka <hubicka@ucw.cz>
1639
1640 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1641 symtab pointer.
1642 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1643
f6a7cffc
TS
16442014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1645
1646 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1647 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1648 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1649
4000360e
BS
16502012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1651
1652 * lto-object.c: Include "lto-section-names.h".
1653 (LTO_SEGMENT_NAME): Don't define.
1654 * lto.c: Include "lto-section-names.h".
1655
b9559136
JH
16562014-05-17 Jan Hubicka <hubicka@ucw.cz>
1657
1658 PR lto/61012
1659 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1660 mixed with variables.
1661
766090c2
TS
16622014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1663
1664 * lto-tree.h: Don't use variable_size gty attribute.
1665 * lto.c (lto_read_in_decl_state): Adjust.
1666 (create_subid_section_table): Likewise.
1667 (lto_flatten_files): Likewise.
1668 (read_cgraph_and_symbols): Likewise.
1669
1d60af08
KZ
16702014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1671 Mike Stump <mikestump@comcast.net>
1672 Richard Sandiford <rdsandiford@googlemail.com>
1673
1674 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1675 * lto-lang.c (get_nonnull_operand): Likewise.
1676
22869a37
RB
16772014-04-28 Richard Biener <rguenther@suse.de>
1678
1679 PR middle-end/60092
1680 * lto-lang.c: Define flag_isoc11.
1681
7de90a6c
DM
16822014-04-23 David Malcolm <dmalcolm@redhat.com>
1683
1684 * lto-partition.c (add_references_to_partition): Update for
1685 removal of implicit pointer from the is-a.h API.
1686 (add_symbol_to_partition_1): Likewise.
1687 (contained_in_symbol): Likewise.
1688 (undo_partition): Likewise.
1689 (lto_balanced_map): Likewise.
1690 (promote_symbol): Likewise.
1691 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1692 (lto_symtab_merge_symbols): Likewise.
1693 * lto.c (lto_wpa_write_files): Likewise.
1694
783dab6b
RB
16952014-04-15 Richard Biener <rguenther@suse.de>
1696
1697 * lto.c: Include params.h.
1698 (do_whole_program_analysis): Switch on flag_lto_partition value,
1699 add support for LTO_PARTITION_ONE.
1700 * lto-partition.h (lto_balanced_map): Adjust.
1701 * lto-partition.c (lto_balanced_map): Get number of desired
1702 partitions as argument to support -flto-partition=one.
1703
cb90235d
JH
17042014-04-14 Jan Hubicka <hubicka@ucw.cz>
1705
ab20d992 1706 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
cb90235d
JH
1707 tp_first_run.
1708
bbe281da
JH
17092014-03-19 Jan Hubicka <hubicka@ucw.cz>
1710
1711 * lto.c: Include ipa-inline.h
1712 (do_whole_program_analysis): Free inline summary after partitioning.
1713
ce2f49b3
RB
17142014-03-19 Richard Biener <rguenther@suse.de>
1715
1716 PR middle-end/60553
ab20d992 1717 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
ce2f49b3
RB
1718 instead of TREE_CHAIN as chain_next.
1719
e41106fc
RB
17202014-03-19 Richard Biener <rguenther@suse.de>
1721
1722 * lto.c (lto_wpa_write_files): Move call to
1723 lto_promote_cross_file_statics ...
1724 (do_whole_program_analysis): ... here, into the partitioning
1725 block. Do not ggc_collect after lto_wpa_write_files but
1726 for a last time before it.
1727
15df2655
JJ
17282014-03-19 Jakub Jelinek <jakub@redhat.com>
1729
1730 PR lto/60571
1731 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1732 Fix formatting.
1733
415e2e6b
JJ
17342014-03-18 Jakub Jelinek <jakub@redhat.com>
1735
1736 PR sanitizer/60535
1737 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1738 and complex_{float,{,long_}double}_type_node.
1739
f42c637e
PM
17402014-03-08 Paulo Matos <paulo@matos-sorge.com>
1741
415e2e6b
JJ
1742 * lto-lang.c (lto_init): Pass flag_short_double to
1743 build_common_tree_nodes.
f42c637e 1744
6dab804d
JH
17452014-02-14 Jan Hubicka <hubicka@ucw.cz>
1746
1747 PR lto/60295
1748 * lto.c (stream_out): Avoid parallel streaming with
1749 -flto=jobserver until we are able to throttle it down
1750 resonably.
1751
39434bce
JH
17522014-02-14 Jan Hubicka <hubicka@ucw.cz>
1753
1754 * lto-partition.c (add_symbol_to_partition_1,
1755 undo_partition, lto_balanced_map): Aliases have no
1756 defined size.
1757 (lto_balanced_map): Do not follow refering variables
1758 if they can be optimized out.
1759
1966fd99
RB
17602014-02-14 Richard Biener <rguenther@suse.de>
1761
1762 PR lto/60179
1763 * lto.c (compare_tree_sccs_1): Do not compare
1764 DECL_FUNCTION_SPECIFIC_TARGET.
1765 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1766
283416b3
RB
17672014-02-12 Richard Biener <rguenther@suse.de>
1768
1769 PR lto/60060
1770 * lto-lang.c (lto_write_globals): Do not call
1771 wrapup_global_declarations or emit_debug_global_declarations
1772 but emit debug info for non-function scope variables
1773 directly.
1774
b7e85694
JH
17752014-02-06 Jan Hubicka <hubicka@ucw.cz>
1776
1777 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1778
96451279
JH
17792014-02-06 Jan Hubicka <hubicka@ucw.cz>
1780
1781 PR ipa/59469
1782 * lto-partition.c (symbol_class): Move to cgraph.h
1783 (get_symbol_class): Move to symtab.c
1784 (add_references_to_partition, add_symbol_to_partition_1,
1785 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1786 lto_promote_cross_file_statics): Update.
1787
f300e7b8
JH
17882014-02-05 Jan Hubicka <hubicka@ucw.cz>
1789
1790 * lto.c (lto_parallelism): New static var.
1791 (do_stream_out, wait_for_child, stream_out): New static functions.
1792 (lto_wpa_write_files): Add support for parallel streaming.
1793 (do_whole_program_analysis): Set parallelism.
1794 * lang.opt (fwpa): Add parameter.
1795 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1796 (lto_init): Update use of flag_wpa.
1797 * lto-streamer.h (asm_nodes_output): Declare.
1798
f0f91770
RB
17992014-02-05 Richard Biener <rguenther@suse.de>
1800
1801 * lto.h (lto_global_var_decls): Remove.
1802 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1803 (lto_write_globals): Do nothing in WPA stage, gather globals from
1804 the varpool here ...
1805 * lto.c (lto_main): ... not here.
1806 (materialize_cgraph): Do not call rest_of_decl_compilation
1807 on the empty lto_global_var_decls vector.
1808 (lto_global_var_decls): Remove.
1809
d665f8dd
JH
18102014-02-04 Jan Hubicka <hubicka@ucw.cz>
1811
ab20d992 1812 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
d665f8dd
JH
1813 needs duplicating, not generic COMDAT.
1814
c39276b8
RB
18152014-02-04 Richard Biener <rguenther@suse.de>
1816
1817 PR lto/59723
1818 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1819 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1820
5f876ae7
JH
18212014-02-04 Jan Hubicka <hubicka@ucw.cz>
1822 Markus Trippelsdorf
1823
1824 PR ipa/59469
1825 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1826 merge force_output and forced_by_abi flags.
1827
b72271b9
BI
18282014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1829
1830 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1831 flag_cilkplus.
1832
63124c48
RB
18332014-01-09 Richard Biener <rguenther@suse.de>
1834
1835 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1836
d05b9920
RB
18372014-01-09 Richard Biener <rguenther@suse.de>
1838
1839 PR lto/45586
1840 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1841 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1842 (gimple_canonical_types_compatible_p): Do not compare them either.
1843
23a5b65a
RS
18442014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1845
1846 Update copyright years
1847
2c8326a5
OE
18482013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1849
1850 * lto.c: Remove struct tags when referring to class varpool_node.
1851 * lto-partition.c: Likewise.
1852 * lto-symtab.c: Likewise.
1853
e06f9964
JJ
18542013-11-29 Jakub Jelinek <jakub@redhat.com>
1855 Richard Biener <rguenther@suse.de>
1856
1857 PR lto/59326
1858 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1859
c193f58b
JJ
18602013-11-29 Jakub Jelinek <jakub@redhat.com>
1861
1862 PR lto/59326
1863 * lto.c (mentions_vars_p_omp_clause): New function.
1864 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1865 after return stmts.
1866
2fb9a547
AM
18672013-11-22 Andrew MacLeod <amacleod@redhat.com>
1868
1869 * lto.c: Add required include files from gimple.h.
ab20d992
JJ
1870 * lto-lang.c: Likewise.
1871 * lto-object.c: Likewise.
1872 * lto-partition.c: Likewise.
1873 * lto-symtab.c: Likewise.
2fb9a547 1874
fec39fa6
TS
18752013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1876
1877 * lto-partition.c lto-symtab.c lto.c Adjust.
1878
d8a2d370
DN
18792013-11-14 Diego Novillo <dnovillo@google.com>
1880
1881 * lto-lang.c: Include stringpool.h.
1882 Include stor-layout.h.
1883 * lto-partition.c: Include gcc-symtab.h.
1884 * lto.c: Include stor-layout.h.
1885
5e20cdc9
DM
18862013-10-31 David Malcolm <dmalcolm@redhat.com>
1887
1888 Automated part of renaming of symtab_node_base to symtab_node.
1889
1890 Patch autogenerated by rename_symtab.py from
1891 https://github.com/davidmalcolm/gcc-refactoring-scripts
1892 revision 58bb219cc090b2f4516a9297d868c245495ee622
1893
1894 * lto-partition.c (add_symbol_to_partition): Rename
1895 symtab_node_base to symtab_node.
1896 (get_symbol_class): Likewise.
1897 (symbol_partitioned_p): Likewise.
1898 (add_references_to_partition): Likewise.
1899 (add_symbol_to_partition_1): Likewise.
1900 (contained_in_symbol): Likewise.
1901 (add_symbol_to_partition): Likewise.
1902 (lto_1_to_1_map): Likewise.
1903 (lto_max_map): Likewise.
1904 (lto_balanced_map): Likewise.
1905 (privatize_symbol_name): Likewise.
1906 (promote_symbol): Likewise.
1907 (may_need_named_section_p): Likewise.
1908 (rename_statics): Likewise.
1909 (lto_promote_statics_nonwpa): Likewise.
1910 * lto-symtab.c (lto_symtab_merge): Likewise.
1911 (lto_symtab_resolve_replaceable_p): Likewise.
1912 (lto_symtab_symbol_p): Likewise.
1913 (lto_symtab_resolve_can_prevail_p): Likewise.
1914 (lto_symtab_resolve_symbols): Likewise.
1915 (lto_symtab_merge_decls_2): Likewise.
1916 (lto_symtab_merge_decls_1): Likewise.
1917 (lto_symtab_merge_decls): Likewise.
1918 (lto_symtab_merge_symbols_1): Likewise.
1919 (lto_symtab_merge_symbols): Likewise.
1920 (lto_symtab_prevailing_decl): Likewise.
1921 * lto.c (lto_wpa_write_files): Likewise.
1922 (read_cgraph_and_symbols): Likewise.
1923 (do_whole_program_analysis): Likewise.
1924
378cd6b1
DM
19252013-10-30 David Malcolm <dmalcolm@redhat.com>
1926
1927 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1928 declarations onto multiple lines to make things easier for
1929 rename_symtab.py.
1930 (lto_symtab_merge_decls_1): Likewise.
1931 (lto_symtab_merge_symbols_1): Likewise.
1932
939b37da
BI
19332013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1934
1935 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1936 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1937 Plus is enabled.
1938
67348ccc
DM
19392013-10-29 David Malcolm <dmalcolm@redhat.com>
1940
1941 Patch autogenerated by refactor_symtab.py from
1942 https://github.com/davidmalcolm/gcc-refactoring-scripts
1943 revision 58bb219cc090b2f4516a9297d868c245495ee622
1944
1945 * lto-partition.c (lto_promote_cross_file_statics): Update for
1946 conversion of symtab types to a true class hierarchy.
1947 (rename_statics): Likewise.
1948 (promote_symbol): Likewise.
1949 (privatize_symbol_name): Likewise.
1950 (lto_balanced_map): Likewise.
1951 (varpool_node_cmp): Likewise.
1952 (node_cmp): Likewise.
1953 (lto_1_to_1_map): Likewise.
1954 (undo_partition): Likewise.
1955 (add_symbol_to_partition): Likewise.
1956 (contained_in_symbol): Likewise.
1957 (add_symbol_to_partition_1): Likewise.
1958 (add_references_to_partition): Likewise.
1959 (symbol_partitioned_p): Likewise.
1960 (get_symbol_class): Likewise.
1961 (lto_max_map): Likewise.
1962 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1963 (lto_symtab_merge_symbols): Likewise.
1964 (lto_symtab_merge_symbols_1): Likewise.
1965 (lto_symtab_merge_decls): Likewise.
1966 (lto_symtab_merge_decls_1): Likewise.
1967 (lto_symtab_merge_decls_2): Likewise.
1968 (lto_symtab_resolve_symbols): Likewise.
1969 (lto_symtab_resolve_can_prevail_p): Likewise.
1970 (lto_symtab_symbol_p): Likewise.
1971 (lto_symtab_resolve_replaceable_p): Likewise.
1972 (lto_symtab_merge): Likewise.
1973 (lto_varpool_replace_node): Likewise.
1974 (lto_cgraph_replace_node): Likewise.
1975 * lto.c (lto_main): Likewise.
1976 (do_whole_program_analysis): Likewise.
1977 (materialize_cgraph): Likewise.
1978 (read_cgraph_and_symbols): Likewise.
1979 (cmp_partitions_order): Likewise.
1980 (lto_materialize_function): Likewise.
1981 (has_analyzed_clone_p): Likewise.
1982
8e9055ae
AM
19832013-10-29 Andrew MacLeod <amacleod@redhat.com>
1984
ab20d992
JJ
1985 * lto-object.c: Add gimple.h to include list.
1986 * lto-partition.c: Likewise.
8e9055ae 1987
377d9792
AM
19882013-10-18 Andrew MacLeod <amacleod@redhat.com>
1989
1990 * lto.c: Remove tree-flow.h from include list.
1991
fffda8d7
RB
19922013-10-15 Richard Biener <rguenther@suse.de>
1993
1994 * lto.c (hash_canonical_type): Split out from ...
1995 (iterative_hash_canonical_type): ... here. Register types
1996 we recurse to.
1997 (gimple_canonical_type_hash): Adjust.
1998 (gimple_register_canonical_type_1): Split out from ...
1999 (gimple_register_canonical_type): ... here. Cache computed
2000 hash value.
2001 (lto_register_canonical_types): Split into two modes,
2002 clearing and computing TYPE_CANONICAL.
2003 (lto_read_decls): Adjust.
2004 (read_cgraph_and_symbols): Do two passes over global trees,
2005 first clearing then computing TYPE_CANONICAL.
2006
1394237e
RB
20072013-10-14 Richard Biener <rguenther@suse.de>
2008
2009 * lto.c (gimple_canonical_types): Move out-of GC space.
2010 (canonical_type_hash_cache): Make a pointer-map.
2011 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
2012 New counters.
2013 (iterative_hash_canonical_type): Adjust.
2014 (read_cgraph_and_symbols): Likewise.
2015 (print_lto_report_1): Likewise.
2016
0a387eca
RB
20172013-10-14 Richard Biener <rguenther@suse.de>
2018
2019 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
2020 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
2021 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
2022 gimple_types_compatible_p_1, gimple_types_compatible_p,
2023 visit, iterative_hash_name, struct type_hash_pair,
2024 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2025 gimple_type_eq, gimple_register_type, num_not_merged_types,
2026 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
2027 num_not_merged_types_in_same_scc_trees): Remove old merging code
2028 and statistics.
2029 (lto_read_decls): Do not run old merging code in parallel.
2030 (read_cgraph_and_symbols): Do not init/free old merging
2031 data structures.
2032 (print_lto_report_1): Do not report differences of old vs. new
2033 merging code.
2034
83fd5d11
RB
20352013-10-14 Richard Biener <rguenther@suse.de>
2036
2037 * lto-lang.c (lto_init): Do not re-init canonical types here.
2038 (lto_register_canonical_types): Move to ...
2039 * lto.c (lto_register_canonical_types): ... here.
2040 (gimple_canonical_types, canonical_type_hash_cache,
2041 iterative_hash_canonical_type, gimple_canonical_type_hash,
2042 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
2043 gimple_register_canonical_type): Add canonical type merging machinery
2044 moved from gimple.c.
2045 (read_cgraph_and_symbols): Init and free canonical type tables
2046 here.
2047 (print_lto_report_1): Report canonical type table stats here.
2048
acf0174b
JJ
20492013-10-11 Jakub Jelinek <jakub@redhat.com>
2050
2051 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
2052
7c6fedd2
TT
20532013-09-25 Tom Tromey <tromey@redhat.com>
2054
2055 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
2056 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
2057 (lto/lto-object.o): Remove.
2058
35f32ad4
RB
20592013-09-06 Richard Biener <rguenther@suse.de>
2060
2061 * lto-symtab.c: Move from gcc/
2062 * lto.h: Include vec.h.
2063 (lto_global_var_decls): Declare.
2064 * lto.c (lto_global_var_decls): Move definition here.
2065 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
2066 (lto-symtab.o): Add.
2067 * config-lang.in (gtfiles): Add lto.h.
2068
49322b12
JH
20692013-08-31 Jan Hubicka <jh@suse.cz>
2070
ab20d992 2071 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
49322b12
JH
2072 DECL_FIELD_OFFSET can contain an reference to variable.
2073
31f1f73b
JH
20742013-08-31 Jan Hubicka <jh@suse.cz>
2075
2076 * lto.c (tree_with_vars): Turn into vector.
2077 (MAYBE_REMEMBER_WITH_VARS): Change to...
2078 (CHECK_VAR): ... this one.
2079 (CHECK_NO_VAR): New macro.
2080 (maybe_remember_with_vars_typed): Turn to ...
2081 (mentions_vars_p_typed): ... this one.
2082 (maybe_remember_with_vars_common): Turn to ...
2083 (mentions_vars_p_comon): ... this one.
2084 (maybe_remember_with_vars_decl_minimal): Turn to ...
2085 (mentions_vars_p_decl_minmal): ... this one.
2086 (maybe_remember_with_vars_decl_common): Turn to ...
2087 (mentions_vars_p_decl_common): ... this one.
2088 (maybe_remember_with_vars_decl_with_vis): Turn to ...
2089 (mentions_vars_p_decl_with_vis): ... this one.
2090 (maybe_remember_with_vars_decl_non_common): Turn to ...
2091 (mentions_vars_p_decl_non_common): ... this one.
2092 (maybe_remember_with_vars_function): Turn to ...
2093 (mentions_vars_p_function): ... this one.
2094 (maybe_remember_with_vars_field_decl): Turn to ...
2095 (mentions_vars_p_field_decl): ... this one.
2096 (maybe_remember_with_vars_type): Turn to ...
2097 (mentions_vars_p_type): ... this one.
2098 (maybe_remember_with_vars_binfo): Turn to ...
2099 (mentions_vars_p_binfo): ... this one.
2100 (maybe_remember_with_vars_constructor): Turn to ...
2101 (mentions_vars_p_constructor): ... this one.
2102 (maybe_remember_with_vars_expr): Turn to ...
2103 (mentions_vars_p_expr): ... this one.
2104 (maybe_remember_with_vars): Turn to ...
2105 (mentions_vars_p): ... this one.
2106 (lto_read_decls): Update.
2107 (LTO_SET_PREVAIL): Do not call function for internal decls.
2108 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2109 check that something was updated.
2110 (lto_fixup_state): Do not care about internal decls.
2111 (lto_fixup_decls): Update.
2112 (read_cgraph_and_symbols): Update.
2113
256eefa9
JH
21142013-08-29 Jan Hubicka <jh@suse.cz>
2115
2116 * lto.c (read_cgraph_and_symbols): Free decl states.
2117
0170f33c
JH
21182013-08-29 Jan Hubicka <jh@suse.cz>
2119
2120 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2121 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2122 TYPE_FINAL_P.
2123
c01c111b
JH
21242013-08-28 Jan Hubicka <jh@suse.cz>
2125
2126 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2127 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2128 (unify_scc): Do checking assert.
2129
6a49f3c9
JH
21302013-08-06 Jan Hubicka <jh@suse.cz>
2131 Martin Liska <marxin.liska@gmail.com>
2132
ab20d992 2133 * lto-partition.c (lto_balanced_map): Always base order on
6a49f3c9
JH
2134 source file order.
2135
a2e2a668
JH
21362013-08-06 Jan Hubicka <jh@suse.cz>
2137
2138 * lto.c (lto_materialize_function): Do not read body anymore.
2139
815effe1
JH
21402013-08-02 Jan Hubicka <jh@suse.cz>
2141
2142 * lto.c (lto_materialize_function): Do not push struct function.
2143 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2144 (may_need_named_section_p): Even abstract origins may need
2145 named section.
2146
315f8c0e
DM
21472013-07-30 David Malcolm <dmalcolm@redhat.com>
2148
2149 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2150 PASS_MANAGER_H.
2151
2152 * lto.c (do_whole_program_analysis): Update for move of
2153 all_regular_ipa_passes from a global to a field of class
2154 pass_manager.
2155
1aa95df7
OB
21562013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2157
2158 * lto-partition.c: Fix typos.
2159
c525ba9a
JH
21602013-06-20 Jan Hubicka <jh@suse.cz>
2161
2162 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2163 partitioning of variables.
2164
7a89ad00
JH
21652013-06-20 Jan Hubicka <jh@suse.cz>
2166
2167 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2168
6a6dac52
JH
21692013-06-19 Jan Hubicka <jh@suse.cz>
2170
2171 * lto-partition.c (add_references_to_partition): Use
2172 ctor_for_folding.
2173
ac0511f2
RB
21742013-06-18 Richard Biener <rguenther@suse.de>
2175
2176 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2177 and use it.
2178 (lto_register_function_decl_in_symtab): Likewise.
2179 (cmp_tree): New function.
2180 (unify_scc): Instead of using the streamer cache map from entry
2181 to cache index match up the two maps we have by sorting them.
2182 Adjust calls to lto_register_var_decl_in_symtab and
2183 lto_register_function_decl_in_symtab.
2184
ee03e71d
RB
21852013-06-17 Richard Biener <rguenther@suse.de>
2186
2187 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2188 * lto.c: Include data-streamer.h.
2189 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2190 (gimple_type_leader_entry_s, gimple_type_leader,
2191 gimple_lookup_type_leader): Remove.
2192 (gtc_visit): Simplify.
2193 (gimple_types_compatible_p): Likewise.
2194 (gimple_register_type_1): Likewise. Merge into ...
2195 (gimple_register_type): ... this. Keep it as legacy for
2196 statistics purposes for now.
2197 (fixup_integer_cst): Remove.
2198 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2199 rename to ...
2200 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2201 maybe_remember_with_vars_*): ... these.
2202 (uniquify_nodes): Remove.
2203 (lto_fixup_prevailing_type): New function.
2204 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2205 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2206 (num_merged_types, num_prevailing_types, num_not_merged_types,
2207 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2208 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2209 num_scc_compare_collisions): New global counters.
2210 (compare_tree_sccs_1): New function.
2211 (compare_tree_sccs): Likewise.
2212 (unify_scc): Likewise.
2213 (lto_read_decls): Stream in tree SCCs and unify them on the
2214 way in. Finalize prevailing SCC tree members.
2215 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2216 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2217 to ggc-collect during merging.
2218 (print_lto_report_1): Adjust for new merging code.
2219
ca0f62a8
JH
22202013-06-12 Jan Hubicka <jh@suse.cz>
2221
2222 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2223
bbf9ad07
JH
22242013-06-12 Jan Hubicka <jh@suse.cz>
2225
2226 * lto.c (register_resolution): Take lto_file_data argument.
2227 (lto_register_var_decl_in_symtab,
2228 lto_register_function_decl_in_symtab): Update.
2229 (read_cgraph_and_symbols): Update resolution_map handling.
2230
ecdbd01a 22312013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2232
2233 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2234 (add_symbol_to_partition_1): Likewise.
2235 (contained_in_symbol): Likewise.
2236 (lto_balanced_map): Likewise.
2237 (rename_statics): Drop weakref.
2238
a367df53
RB
22392013-06-05 Richard Biener <rguenther@suse.de>
2240
2241 * lto.c (num_merged_types): New global variable.
2242 (uniquify_nodes): Increase num_merged_types when merging a type.
2243 (print_lto_report_1): Output the number of merged types.
2244
40a7fe1e
JH
22452013-06-01 Jan Hubicka <jh@suse.cz>
2246
2247 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2248 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2249 (do_whole_program_analysis): Update dumping.
2250
e70670cf
JH
22512013-05-29 Jan Hubicka <jh@suse.cz>
2252
2253 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2254 flags.
2255 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2256
8ee05051
JH
22572013-05-15 Jan Hubicka <jh@suse.cz>
2258
2259 * lto-partition.c (privatize_symbol_name): Return true when
2260 privatizing happened.
2261 (rename_statics): Do not go into infinite loop when privatizing
2262 is not needed.
2263
427b248d
JM
22642013-05-16 Jason Merrill <jason@redhat.com>
2265
2266 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2267
9de04252
MJ
22682013-05-15 Martin Jambor <mjambor@suse.cz>
2269
2270 * lto-partition.c (lto_balanced_map): Print symbol order instead
2271 of node uids.
2272
2d6e4603
JH
22732013-05-15 Jan Hubicka <jh@suse.cz>
2274
2275 PR lto/57038
2276 PR lto/47375
2277 * lto-partition.c (get_symbol_class): Fix weakrefs.
2278 (lto_balanced_map): Fix weakrefs.
2279 (privatize_symbol_name): Remove unnecesary label.
2280 (rename_statics): Handle weakrefs as statics.
2281
64cfa6c0
JH
22822013-05-09 Jan Hubicka <jh@suse.cz>
2283 Richard Biener <rguenther@suse.de>
2284
2285 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2286 (lto_register_var_decl_in_symtab): Likewise.
2287 (lto_main): Promote statics.
2288 * lto-partition.c (privatize_symbol_name): New function.
2289 (promote_symbol): Use it.
2290 (may_need_named_section_p): New predicate.
2291 (rename_statics): New functions.
2292 (lto_promote_cross_file_statics): Simplify; do renaming.
2293 (lto_promote_statics_nonwpa): New function.
2294 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2295
e45cde98
RB
22962013-02-08 Richard Biener <rguenther@suse.de>
2297
2298 PR lto/56231
2299 * lto-lang.c (lto_init): Do not enter a dummy file.
2300
6edc3e32
UB
23012013-02-07 Uros Bizjak <ubizjak@gmail.com>
2302
2303 PR bootstrap/56227
2304 * lto.c (lto_resolution_ready): Use %wx instead of
2305 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2306
ed73881e
RG
23072013-02-04 Richard Guenther <rguenther@suse.de>
2308
2309 PR lto/56168
2310 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2311 or lto_fixup_decls at LTRANS time.
2312
a19b1432
JH
23132013-01-09 Jan Hubicka <jh@suse.cz>
2314
2315 PR lto/45375
2316 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2317
49c01f87
L
23182012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2319
2320 PR lto/55466
2321 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2322 variables.
2323 (lto_main): Record the global variables if WPA isn't enabled.
2324
6e1aa848
DN
23252012-11-20 Diego Novillo <dnovillo@google.com>
2326 Jakub Jelinek <jakub@redhat.com>
2327
2328 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2329
9771b263
DN
23302012-11-16 Diego Novillo <dnovillo@google.com>
2331
2332 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2333
2334 * lto-lang.c: Use new vec API in vec.h.
2335 * lto-partition.c: Likewise.
2336 * lto-partition.h: Likewise.
2337 * lto.c: Likewise.
2338
24551b9c
LC
23392012-10-31 Lawrence Crowl <crowl@google.com>
2340
2341 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2342 down-cast via dyn_cast.
2343 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2344 (undo_partition): Likewise.
2345 (lto_balanced_map): Likewise.
2346 (get_symbol_class): Likewise and via is_a.
2347 (lto_balanced_map): Change symtab checking to is_a.
2348
aec06f6f
RB
23492012-10-12 Richard Biener <rguenther@suse.de>
2350
2351 PR lto/54898
2352 * lto.c (gimple_types_compatible_p_1): Also compare
2353 TYPE_MAIN_VARIANT.
2354 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2355
0b8c30f9
TB
23562012-10-09 Tobias Burnus <burnus@net-b.de>
2357
2358 * lto-lang.c (lto_register_builtin_type): Avoid useless
2359 decl creation.
2360 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2361
da3202a8
TB
23622012-10-08 Tobias Burnus <burnus@net-b.de>
2363
2364 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2365 Free lto_file struct after closing the file.
2366
2512a443
JH
23672012-10-08 Jan Hubicka <jh@suse.cz>
2368
ab20d992 2369 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2512a443
JH
2370 (fixup_integer_cst): New functoin.
2371 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2372
e75f8f79
JH
23732012-10-07 Jan Hubicka <jh@suse.cz>
2374
2375 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2376 release input encoders.
2377 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2378
46591697
JH
23792012-10-06 Jan Hubicka <jh@suse.cz>
2380
ab20d992 2381 PR lto/54790
46591697
JH
2382 * lto.c (resolution_map): New static var.
2383 (register_resolution): New function.
2384 (lto_register_var_decl_in_symtab): Use it.
2385 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2386
af16bc76
MJ
23872012-09-20 Martin Jambor <mjambor@suse.cz>
2388
2389 * lto.c (lto_materialize_function): Call push_struct_function and
2390 pop_cfun.
2391
5368224f
DC
23922012-09-19 Dehao Chen <dehao@google.com>
2393
ab20d992 2394 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
5368224f 2395
b5493fb2
JH
23962012-09-19 Jan Hubicka <jh@suse.cz>
2397
2398 * lto.c (lto_materialize_function): Update confused comment.
2399 (read_cgraph_and_symbols): Do not free symtab.
2400
c3c445e1
JH
24012012-09-12 Jan Hubicka <jh@suse.cz>
2402
2403 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2404 AUX pointer cleaning. Add max partitioning.
2405 * lto-partition.c (enum symbol_class): New.
2406 (get_symbol_class): New function.
2407 (symbol_partitioned_p): New function.
2408 (add_references_to_partition): Remove.
2409 (add_aliases_to_partition): Remove.
2410 (add_cgraph_node_to_partition_1): Remove.
2411 (add_cgraph_node_to_partition): Remove.
2412 (add_symbol_to_partition): New function.
2413 (add_symbol_to_partition_1): New function.
2414 (contained_in_symbol): New function.
2415 (partition_cgraph_node_p): Remove.
2416 (partition_varpool_node_p): Remove.
2417 (partition_symbol_p): Remove.
2418 (lto_1_to_1_map): Cleanup.
2419 (lto_max_map): New.
2420 (lto_balanced_map): Update.
2421 (lto_promote_cross_file_statics): Update.
2422 * lto-partition.h (lto_max_map): Declare.
2423 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2424
b5c7cdfb
JH
24252012-09-11 Jan Hubicka <jh@suse.cz>
2426
2427 PR lto/54312
2428 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2429 type is variant leader.
2430
b29402f0
RG
24312012-09-11 Richard Guenther <rguenther@suse.de>
2432
2433 * lto.c (enum gtc_mode): Remove.
2434 (struct type_pair_d): Adjust.
2435 (lookup_type_pair): Likewise.
2436 (gimple_type_leader): Do not mark as deletable.
2437 (gimple_lookup_type_leader): Adjust.
2438 (gtc_visit): Likewise.
2439 (gimple_types_compatible_p_1): Likewise.
2440 (gimple_types_compatible_p): Likewise.
2441 (gimple_type_hash): Likewise.
2442 (gimple_register_type): Likewise.
2443 (read_cgraph_and_symbols): Manage lifetime of tables
2444 here.
2445
b8f4e58f
RG
24462012-09-11 Richard Guenther <rguenther@suse.de>
2447
2448 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2449 struct type_pair_d, lookup_type_pair, struct sccs,
2450 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2451 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2452 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2453 visit, iterative_hash_name, struct type_hash_pair,
2454 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2455 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2456 Move here from gimple.c
2457 (read_cgraph_and_symbols): Free hash tables here.
2458 (print_lto_report_1): New function wrapping print_lto_report.
2459 (do_whole_program_analysis): Call it.
2460 (lto_main): Likewise.
2461
1cdbb3f9
JH
24622012-09-10 Jan Hubicka <jh@suse.cz>
2463
2464 * lto-partition.c (partition_symbol_p): Forward declare.
2465 (add_references_to_partition): Reimplement using partition_symbol_p.
2466 (add_aliases_to_partition): Break out from add_references_to_partition;
2467 reimplement using partition_symbol_p.
2468 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2469 add sanity checks.
2470 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2471 (partition_varpool_node_p): Do not special case aliases.
2472
b4661bfe
JH
24732012-08-12 Jan Hubicka <jh@suse.cz>
2474
2475 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2476 it is deleted after streaming.
2477 * lto-partition.c (partition_symbol_p): New function.
2478 (promote_var, promote_fn): Remove.
2479 (promote_symbol): New function.
2480 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2481 to lookup the actual boundaries instead of computing them ad-hoc.
2482
7b99cca4
JH
24832012-08-12 Jan Hubicka <jh@suse.cz>
2484
2485 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2486 in partitioning.
2487 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2488 by encoder.
2489 * lto-partition.c (new_partition): Update.
2490 * lto.c (cmp_partitions_order): Update.
2491 (lto_wpa_write_files): Update.
2492 (free_ltrans_partitions): Update.
2493 (add_references_to_partition): Update.
2494 (add_cgraph_node_to_partition_1): Update.
2495 (add_cgraph_node_to_partition): Update.
2496 (add_varpool_node_to_partition): Update.
2497 (undo_partition): Update.
2498 (lto_balanced_map): Update.
2499 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2500 set_referenced_from_this_partition_p): Update.
2501 (lto_promote_cross_file_statics): Update.
2502
f27c1867
JH
25032012-08-12 Jan Hubicka <jh@suse.cz>
2504
2505 * lto-partition.c (set_referenced_from_other_partition_p,
2506 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2507 New functions.
2508 (lto_promote_cross_file_statics): Use them.
2509
ab96cc5b
JH
25102012-07-24 Jan Hubicka <jh@suse.cz>
2511
2512 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2513
0229aee9
UB
25142012-07-24 Uros Bizjak <ubizjak@gmail.com>
2515
2516 * lto-tree.h (lang_decl): Add variable_size GTY option.
2517
7ee2468b
SB
25182012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2519
2520 * lto.c: Do not include timevar.h.
2521 * Make-lang.in: Fix dependencies.
2522
a910399d
LC
25232012-06-18 Lawrence Crowl <crowl@google.com>
2524
ab20d992 2525 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2526 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2527 to lto_wpa_write_files.
ab20d992 2528 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
a910399d
LC
2529 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2530 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2531 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2532 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2533 to be a front end, but is not one.
2534
877ab5e9
JH
25352012-05-18 Jan Hubicka <jh@suse.cz>
2536
2537 * lto.c (lto_materialize_constructors_and_inits): Remove.
2538 (read_cgraph_and_symbols): Remove handling of alias pairs.
2539
6649df51
JH
25402012-05-17 Jan Hubicka <jh@suse.cz>
2541
2542 * lto-partition.c (add_references_to_partition): Handle external vars.
2543 (partition_varpool_node_p): Likewise.
2544 (lto_promote_cross_file_statics): Do not promote externals.
2545
d1ede5f4
BS
25462012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2547
2548 * lto-lang.c (handle_fnspec_attribute): New static function.
2549 (lto_attribute_table): Add "fn spec".
2550 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2551
0d6bf48c
JH
25522012-05-04 Jan Hubicka <jh@suse.cz>
2553
2554 * lto.c (do_whole_program_analysis): Set timevars correctly.
2555 (lto_main): Likewise.
d1ede5f4 2556
1d67dde8
RB
25572012-05-04 Richard Guenther <rguenther@suse.de>
2558
2559 * lang.opt (fwpa): Do not mark as Optimization.
2560 (fltrans): Likewise.
2561
65d630d4
JH
25622012-04-30 Jan Hubicka <jh@suse.cz>
2563
2564 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2565 * lto-partition.c (partition_cgraph_node_p): Use
2566 symtab_used_from_object_file_p.
65d630d4
JH
2567 (partition_varpool_node_p): Likewise.
2568
ead84f73
JH
25692012-04-20 Jan Hubicka <jh@suse.cz>
2570
2571 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2572
5932a4d4
JH
25732012-04-18 Jan Hubicka <jh@suse.cz>
2574
2575 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2576 Update for new ipa-ref API.
2577
65c70e6b
JH
25782012-04-16 Jan Hubicka <jh@suse.cz>
2579
2580 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2581 walkers to walk cgraph and varpool.
65c70e6b
JH
2582 (materialize_cgraph): Likewise.
2583 * lto-partition.c (lto_1_to_1_map): Likewise.
2584 (lto_balanced_map): Likewise.
2585 (lto_promote_cross_file_statics): Likewise.
2586
960bfb69
JH
25872012-04-14 Jan Hubicka <jh@suse.cz>
2588
2589 * lto.c: Update field referenced for new cgraph/varpool layout.
2590 * lto-partition.c: Likewise.
2591
a66dc285
JH
25922012-04-11 Jan Hubicka <jh@suse.cz>
2593
2594 * lto.c: Update copyright; remove params.h, ipa-inline.h
2595 and ipa-utils.h inlines; inline lto-partition.h
2596 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2597 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2598 add_references_to_partition, add_cgraph_node_to_partition_1,
2599 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2600 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2601 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2602 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2603 * lto-partition.c: ... here; new file.
2604 * lto-partition.h: New file.
2605 * Make-lang.in (lto.o): Update dependencies.
2606 (lto-partition.o): New.
2607
f3b249e5
RG
26082012-04-05 Richard Guenther <rguenther@suse.de>
2609
2610 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2611 definition.
2612
21fa2faf
RG
26132012-03-12 Richard Guenther <rguenther@suse.de>
2614
2615 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2616
6bb485a3
RG
26172012-03-06 Richard Guenther <rguenther@suse.de>
2618
2619 PR lto/52097
2620 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2621
95510497
RG
26222012-02-28 Richard Guenther <rguenther@suse.de>
2623
2624 PR lto/52400
2625 * lto.c (lto_register_function_decl_in_symtab): Do not register
2626 a reverse renamed decl mapping.
2627
09228fef
JJ
26282012-01-06 Jakub Jelinek <jakub@redhat.com>
2629
2630 PR lto/51774
2631 * lto-lang.c (handle_returns_twice_attribute): New function.
2632 (lto_attribute_table): Add returns_twice attribute.
2633
b03eda0d
RG
26342011-12-21 Richard Guenther <rguenther@suse.de>
2635
2636 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2637 (LTO_FIXUP_TREE): Use it.
2638 (uniquify_nodes): Mark new non-prevailing types and avoid
2639 calling gimple_register_type on others.
2640 (lto_read_decls): Add comment.
2641
4ad9a9de
EB
26422011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2643
2644 * lto.h (lto_parse_hex): Delete.
2645 * lto.c (lto_read_decls): Use 'int' for offsets.
2646 (lto_parse_hex): Make static and return proper 64-bit host type.
2647 (lto_resolution_read): Use proper 64-bit host type.
2648
ea973bad
RG
26492011-12-13 Richard Guenther <rguenther@suse.de>
2650
2651 PR lto/48354
2652 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2653 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2654
c8218030
UB
26552011-12-01 Uros Bizjak <ubizjak@gmail.com>
2656
2657 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2658 (ignore_attribute): New.
2659
57ac2606
AH
26602011-11-21 Aldy Hernandez <aldyh@redhat.com>
2661
2662 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2663 (handle_transaction_pure_attribute): New.
2664
52a35ef7
RG
26652011-11-03 Richard Guenther <rguenther@suse.de>
2666
2667 PR lto/44965
2668 * lto-lang.c (lto_post_options): Do not read file options.
2669 * lto.c (lto_read_all_file_options): Remove.
2670 (lto_init): Call lto_set_in_hooks here.
2671
51973b1e
JH
26722011-10-09 Jan Hubicka <jh@suse.cz>
2673
2674 * lto.c (node_cmp, varpool_node_cmp): New functions.
2675 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2676 (cmp_partitions): Rename to ...
2677 (cmp_partitions_size): ... this one.
2678 (cmp_partitions_order): New function.
2679 (lto_wpa_write_files): Sort partitions by order when
2680 -fno-toplevel-reorder is used.
2681
5958009b
AK
26822011-10-09 Andi Kleen <ak@linux.intel.com>
2683
2684 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2685
e79983f4
MM
26862011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2687
2688 * lto-lang.c (def_builtin_1): Delete old interface with two
2689 parallel arrays to hold standard builtin declarations, and replace
2690 it with a function based interface that can support creating
2691 builtins on the fly in the future. Change all uses, and poison
2692 the old names. Make sure 0 is not a legitimate builtin index.
2693
ecdbd01a 26942011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2695
2696 * lto-object.c (lto_obj_add_section_data): Add list.
2697 (lto_obj_add_section): Fill in list.
2698 (ltoobj_build_section_table): Pass through list.
2699 * lto.c (file_data_list): Declare.
2700 (create_subid_section_table): Pass arguments directly.
2701 Fill in list of file_datas.
2702 (lwstate): Delete.
2703 (lto_create_files_from_ids): Pass in direct arguments.
2704 Don't maintain list.
2705 (lto_file_read): Use explicit section and file data lists.
2706 (lto_read_all_file_options): Pass in section_list.
2707 * lto.h (lto_obj_build_section_table): Add list.
2708 (lto_section_slot): Add next.
2709 (lto_section_list): Declare.
2710
ed0d2da0
JH
27112011-10-02 Jan Hubicka <jh@suse.cz>
2712
2713 PR lto/47247
2714 * common.c (lto_resolution_str): Add new resolution.
2715 * common.h (lto_resolution_str): Likewise.
2716
ad7715f3
L
27172011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2718 Andi Kleen <ak@linux.intel.com>
2719
2720 PR lto/50568
2721 * lto.c (lto_splay_tree_delete_id): New.
2722 (lto_splay_tree_compare_ids): Likewise.
2723 (lto_splay_tree_lookup): Likewise.
2724 (lto_splay_tree_id_equal_p): Likewise.
2725 (lto_splay_tree_insert): Likewise.
2726 (lto_splay_tree_new): Likewise.
2727 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2728 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2729 (create_subid_section_table): Use lto_splay_tree_lookup and
2730 lto_splay_tree_insert.
2731 (lto_file_read): Use lto_splay_tree_new.
2732
ecdbd01a 27332011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2734
2735 * lto.c (lto_resolution_read): Remove id dumping.
2736 (lto_section_with_id): Turn id HOST_WIDE_ID.
2737 (create_subid_section_table): Dito.
2738
892a371f
DS
27392011-08-28 Dodji Seketeli <dodji@redhat.com>
2740
2741 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2742 linemap_add twice.
2743
f82d1a94
MJ
27442011-08-11 Martin Jambor <mjambor@suse.cz>
2745
2746 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2747
f0efc7aa
DN
27482011-08-08 Diego Novillo <dnovillo@google.com>
2749
2750 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2751 * lto.c: Include tree-streamer.h.
2752
1a072294
RG
27532011-07-06 Richard Guenther <rguenther@suse.de>
2754
2755 * lto-lang.c (lto_init):
2756 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2757
7496868d
JH
27582011-06-11 Jan Hubicka <jh@suse.cz>
2759
10f13f22 2760 PR lto/48246
7496868d
JH
2761 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2762 (lto_balanced_map): Likewise.
2763
39e2db00
JH
27642011-06-11 Jan Hubicka <jh@suse.cz>
2765
2766 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2767 (add_cgraph_node_to_partition) ... here; walk aliases.
2768 (lto_1_to_1_map): Remove same body alias code.
2769 (promote_fn): Likewise.
2770 (lto_promote_cross_file_statics): Update comment.
2771
28628ea6
DN
27722011-06-07 Diego Novillo <dnovillo@google.com>
2773
2774 * lto.c (uniquify_nodes): Move code to register decls to
2775 the loop that computes canonical types.
2776
009db074
RG
27772011-06-07 Richard Guenther <rguenther@suse.de>
2778
2779 * lto-lang.c (lto_init): Do not set
2780 size_type_node or call set_sizetype.
2781
47c79d56
DN
27822011-06-04 Diego Novillo <dnovillo@google.com>
2783
2784 * lto.c (lto_init): New.
2785 (lto_main): Call it.
2786
d5828cc7
DN
27872011-06-03 Diego Novillo <dnovillo@google.com>
2788
2789 * lto.c (get_resolution): Move from lto-streamer-in.c.
2790 (lto_register_var_decl_in_symtab): Likewise.
2791 (lto_register_function_decl_in_symtab): Likewise.
2792 (uniquify_nodes): Call lto_register_var_decl and
2793 lto_register_function_decl_in_symtab after reading a new
2794 VAR_DECL or FUNCTION_DECL.
2795
6807da97
RG
27962011-06-01 Richard Guenther <rguenther@suse.de>
2797
2798 * lto-lang.c (lto_register_canonical_types): New function.
2799 (lto_init): Register common nodes with the canonical type machinery.
2800 Do not play tricks with char_type_node.
2801
d74be317
RG
28022011-05-26 Richard Guenther <rguenther@suse.de>
2803
2804 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2805
d9f8303f
NF
28062011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2807
2808 * lto.c (lto_ft_typed): New function.
2809 (lto_ft_common): Call it.
2810 (lto_ft_constructor): Likewise.
2811 (lto_ft_expr): Likewise.
2812 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2813 TREE_CHAIN.
2814
fb291a1e
RG
28152011-05-20 Richard Guenther <rguenther@suse.de>
2816
2817 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2818 (lto_ft_type): Move main-variant and pointer-to chain building ...
2819 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2820 in a separate final loop.
2821
31b3ca64
RG
28222011-05-19 Richard Guenther <rguenther@suse.de>
2823
2824 * lto.c (uniquify_nodes): First register all types before
2825 fixing up the tree SCC.
2826
35d828c5
JH
28272011-05-11 Jan Hubicka <jh@suse.cz>
2828
2829 PR lto/48952
2830 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2831
51545682
NF
28322011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2833
2834 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2835 location of binfo field.
2836 (lto_fixup_prevailing_decls): Likewise.
2837
8242dd04
NF
28382011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2839
2840 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2841 build_function_type_array or build_varargs_function_type_array
2842 instead.
2843
c99c0026
EB
28442011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2845
2846 * lto-lang.c (global_bindings_p): Return bool.
2847
c47d0034
JH
28482011-05-07 Jan Hubicka <jh@suse.cz>
2849
a9bcb3f0
EB
2850 * lto.c (lto_materialize_function): Use
2851 cgraph_function_with_gimple_body_p.
2852 (add_cgraph_node_to_partition): Do not re-add items to partition;
2853 handle thunks.
c47d0034
JH
2854 (add_varpool_node_to_partition): Do not re-add items to partition.
2855
bb3398ca
JH
28562011-05-03 Jan Hubicka <jh@suse.cz>
2857
2858 * lto.c (free_ltrans_partitions): Fix accidental commit.
2859
1cb1a99f
JH
28602011-05-03 Jan Hubicka <jh@suse.cz>
2861
2862 * lto.c (ltrans_partition_def): Remove GTY annotations.
2863 (ltrans_partitions): Move to heap.
2864 (new_partition): Update.
2865 (free_ltrans_partitions): New function.
2866 (lto_wpa_write_files): Use it.
2867
af8bca3c
MJ
28682011-04-29 Martin Jambor <mjambor@suse.cz>
2869
2870 * lto.c: Include ipa-utils.h.
2871 (lto_balanced_map): Update call to ipa_reverse_postorder.
2872 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2873
b823cdfe
MM
28742011-04-29 Michael Matz <matz@suse.de>
2875
2876 * lto.c (toplevel): Include tree-flow.h.
2877 (lto_read_in_decl_state): Don't merge types here.
2878 (tree_with_vars): New static hash table.
2879 (remember_with_vars): New static functions.
2880 (LTO_FIXUP_TYPE): New macro.
2881 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2882 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2883 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2884 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2885 (lto_read_decls): Uniquify while reading in trees.
2886 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2887 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2888 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2889 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2890 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2891 lto_fixup_tree): Remove.
2892 (lto_fixup_state): Remove data argument. Use
2893 lto_symtab_prevailing_decl.
2894 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2895 (lto_fixup_prevailing_decls): New function.
2896 (lto_fixup_state_aux): Argument aux is unused.
2897 (lto_fixup_decls): Don't allocate pointer sets, don't use
2898 lto_fixup_tree, use lto_fixup_prevailing_decls.
2899 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2900 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2901
b9843260
EB
29022011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2903
2904 * lto.c (lto_balanced_map): Fix typos in head comment.
2905 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2906 test.
2907
e7f23018
JH
29082011-04-16 Jan Hubicka <jh@suse.cz>
2909
2910 * lto.c (lto_balanced_map): Update.
2911
10a5dd5d
JH
29122011-04-14 Jan Hubicka <jh@suse.cz>
2913
2914 * lto.c: Include ipa-inline.h
b9843260
EB
2915 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2916 accessor.
10a5dd5d
JH
2917 (ipa_node_duplication_hook): Fix declaration.
2918 * Make-lang.in (lto.o): Update dependencies.
2919
81f653d6
NF
29202011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2921
2922 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2923 calling TREE_CHAIN.
2924 * lto.c (lto_fixup_common): Likewise.
2925
dcf0c47e
NF
29262011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2927
2928 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2929 (handle_type_generic_attribute): Likewise.
2930
e89964e3
MM
29312011-04-03 Michael Matz <matz@suse.de>
2932
2933 * lto.c (lto_materialize_function): Don't read and then discard
2934 sections in WPA mode.
2935 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2936
2937 * lto-lang.c (registered_builtin_fndecls): Remove.
2938 (lto_getdecls): Return NULL_TREE.
2939 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2940
d2b3fe18
RG
29412011-03-31 Richard Guenther <rguenther@suse.de>
2942
2943 PR lto/48246
2944 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2945 partitions when checking is not enabled.
2946
ba78087b
KT
29472011-03-25 Kai Tietz <ktietz@redhat.com>
2948
2949 * lto.c (lto_resolution_read): Use filename_cmp instead
2950 of strcmp.
2951 (lto_read_section_data): Likewise.
2952
0edf1bb2
JL
29532011-03-25 Jeff Law <law@redhat.com>
2954
ab20d992 2955 * lto-lang.c (def_fn_type): Add missing va_end.
0edf1bb2 2956
62d784f7
KT
29572011-03-21 Kai Tietz <ktietz@redhat.com>
2958
2959 PR target/12171
2960 * lto-lang.c (lto_attribute_table): Adjust table.
2961
62dd9571
JJ
29622011-02-18 Jakub Jelinek <jakub@redhat.com>
2963
2964 PR bootstrap/47807
2965 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2966 of lto-streamer.h.
2967
237d6259
RG
29682011-02-18 Richard Guenther <rguenther@suse.de>
2969
2970 PR lto/47798
2971 * lto-tree.h (lto_global_var_decls): Do not declare here.
2972 * lto-lang.c: Include lto-streamer.h.
2973 * Make-lang.in (lto-lang.o): Adjust dependencies.
2974
8ead2223
KT
29752011-02-10 Kai Tietz <kai.tietz@onevision.com>
2976
2977 PR lto/47241
2978 * lto.c (lto_read_section_data): Free
2979 fd_name in failure case.
2980 For mingw targets don't hash file-descriptor.
2981 (read_cgraph_and_symbols): Close current_lto_file
2982 in failure case.
2983
6e701822
JH
29842011-01-11 Jan Hubicka <jh@suse.cz>
2985
2986 PR lto/45721
2987 PR lto/45375
b9843260
EB
2988 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2989 are not partitioned.
6e701822 2990
f4da8dce
NF
29912010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2992
2993 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2994 Use prototype_p.
2995
6b7fb143
RG
29962010-12-06 Richard Guenther <rguenther@suse.de>
2997
2998 PR lto/46796
2999 * lto-lang.c (lto_init): Give names to basic types.
3000
c59ffc41
JM
30012010-11-30 Joseph Myers <joseph@codesourcery.com>
3002
3003 * lto-object.c: Don't include toplev.h.
3004 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
3005
7c475d11
JM
30062010-11-30 Joseph Myers <joseph@codesourcery.com>
3007
3008 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
3009 $(TOPLEV_H).
3010
71f3e391
JM
30112010-11-29 Joseph Myers <joseph@codesourcery.com>
3012
3013 * lto-endian.h: Delete.
3014 * lto-object.c: Don't include "libiberty.h".
3015 (O_BINARY): Don't define.
3016 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
3017 (O_BINARY): Don't define.
3018
9f1718b0
RG
30192010-11-23 Richard Guenther <rguenther@suse.de>
3020
3021 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
3022
39c4e298
RG
30232010-11-23 Richard Guenther <rguenther@suse.de>
3024
3025 PR lto/46605
3026 * lto.c (read_cgraph_and_symbols): Bail out after errors.
3027
b37421c6
JM
30282010-11-17 Joseph Myers <joseph@codesourcery.com>
3029
3030 * lto.c (lto_main): Take no arguments.
3031 * lto.h (lto_main): Update prototype.
3032
d82f74d3
ILT
30332010-11-16 Ian Lance Taylor <iant@google.com>
3034
3035 * lto-object.c (lto_obj_file_open): Call
3036 simple_object_attributes_merge rather than
3037 simple_object_attributes_compare.
3038
a4d8c676
JM
30392010-11-12 Joseph Myers <joseph@codesourcery.com>
3040
3041 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
3042 * lto-lang.c (lto_handle_option): Take location_t parameter.
3043
d8a07487
JM
30442010-11-10 Joseph Myers <joseph@codesourcery.com>
3045
3046 * lto.c (lto_resolution_read): Start diagnostics with lowercase
3047 letters and remove trailing '.'.
3048 (lto_file_finalize): Start diagnostic with a lowercase letter.
3049
6b3456d1
ILT
30502010-11-02 Ian Lance Taylor <iant@google.com>
3051
3052 * lto-object.c: New file.
3053 * lto-elf.c: Remove file.
3054 * lto-macho.c: Remove file.
3055 * lto-macho.h: Remove file.
3056 * lto-coff.c: Remove file.
3057 * lto-coff.h: Remove file.
3058 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
3059 lto/lto-object.o.
3060 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
3061 (lto/lto-objfile.o): New target.
3062 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
3063 (lto/lto.o): Remove $(LIBIBERTY_H).
3064
030cd86c
JH
30652010-10-22 Jan Hubicka <jh@suse.cz>
3066
3067 * lto.c (add_cgraph_node_to_partition,
3068 add_varpool_node_to_partition): Add debug info.
3069 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
3070 partitioned nodes.
3071 (do_whole_program_analysis): Set function flags before dumping.
3072
4490cae6
RG
30732010-10-22 Richard Guenther <rguenther@suse.de>
3074
3075 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
3076 the new gimple_register_canonical_type.
3077
703cdce3
L
30782010-10-20 H.J. Lu <hongjiu.lu@intel.com>
3079
3080 PR bootstrap/45954
3081 * config-lang.in (boot_language): Set to $enable_lto.
3082
1915c739
JJ
30832010-10-18 Jakub Jelinek <jakub@redhat.com>
3084
3085 PR lto/45638
3086 * Make-lang.in (check-lto): New dummy target.
3087
82971de5
EB
30882010-10-14 Eric Botcazou <ebotcazou@adacore.com>
3089
3090 * lto-elf.c (SHN_XINDEX): Define if not already defined.
3091
a75bfaa6
JM
30922010-10-08 Joseph Myers <joseph@codesourcery.com>
3093
3094 * lto-lang.c (lto_init_options): Change to
3095 lto_init_options_struct. Update parameters.
3096 (LANG_HOOKS_INIT_OPTIONS): Don't define.
3097 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
3098
937f7f69
JH
30992010-10-06 Jan Hubicka <jh@suse.cz>
3100
3101 * lto.c (lto_balanced_map): Fix accounting of program size.
3102
2169830c
JH
31032010-10-06 Jan Hubicka <jh@suse.cz>
3104
3105 * lto.c (lto_balanced_map): Do not produce empty partitions.
3106
ecdbd01a 31072010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
3108
3109 * lto.c (lto_process_name): Add.
3110 (lto_main): Call lto_process_name.
3111
06ed016f
JH
31122010-10-06 Jan Hubicka <jh@suse.cz>
3113
3114 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3115 COMDATs required by the linker.
3116
ae718d66
ILT
31172010-10-05 Ian Lance Taylor <iant@google.com>
3118
3119 * lto.c (lto_section_with_id): Make s a const pointer.
3120
852e4bd2
JH
31212010-10-05 Jan Hubicka <jh@suse.cz>
3122
ab20d992 3123 * lto.c: Include params.h.
852e4bd2
JH
3124 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3125 refcounting in aux field.
3126 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3127 New functions.
3128 (lto_1_to_1_map): Simplify.
3129 (lto_balanced_map): New function.
3130 (do_whole_program_analysis): Chose proper partitioning alg.
3131 * Make-lang.in (lto.o): Add dependency on params.h
3132
ecdbd01a 31332010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
3134
3135 * Make-lang.in (lto1): Add + to build rule.
3136
ecdbd01a 31372010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
3138
3139 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 3140 with fatal_error.
f1e92a43 3141
0d6e14fd
JH
31422010-09-28 Jan Hubicka <jh@suse.cz>
3143
3144 * lto-lang.c (handle_leaf_attribute): New function.
3145 (lto_attribute_tables): Add leaf.
3146
fb462383
JZ
31472010-09-25 Jie Zhang <jie@codesourcery.com>
3148
3149 * lto.c (lto_read_all_file_options): Start a new line after
3150 printing out file names.
3151
051f8cc6
JH
31522010-09-24 Jan Hubicka <jh@suse.cz>
3153
3154 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3155
64e0f5ff
JH
31562010-09-20 Jan Hubicka <jh@suse.cz>
3157
3158 PR tree-optimize/45605
3159 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3160
a929ec3d
GP
31612010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3162
3163 * lto-elf.c (lto_obj_file_open): Also provide filename when
3164 elf_begin fails.
3165
4c588abf
JH
31662010-09-17 Jan Hubicka <jh@suse.cz>
3167
3168 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3169
c3224d6f
RG
31702010-09-17 Richard Guenther <rguenther@suse.de>
3171
3172 * lang.opt (flag_wpa): Also enable for the driver.
3173
52b3b3c7
JH
31742010-09-16 Jan Hubicka <jh@suse.cz>
3175
3176 * lto.c (lto_materialize_function): Do not tamper with STATIC and
ab20d992 3177 EXTERNAL flags.
52b3b3c7 3178
969c37b7
LB
31792010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3180
3181 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3182
098a4f50
JH
31832010-09-08 Jan Hubicka <jh@suse.cz>
3184
3185 * lto.c (real_file_count, real_file_decl_data): New static vars.
3186 (read_cgraph_and_symbols): Use it.
3187
0f443ad0
RG
31882010-09-08 Richard Guenther <rguenther@suse.de>
3189
3190 * lto.c (read_cgraph_and_symbols): Collect again after each
3191 file.
3192
ee187353
JH
31932010-09-07 Jan Hubicka <jh@suse.cz>
3194
3195 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3196
b3ec52d0
RG
31972010-09-03 Richard Guenther <rguenther@suse.de>
3198
3199 * lto-elf.c (validate_file): Always error if validation fails.
3200
f1395d4a
JH
32012010-08-20 Jan Hubicka <jh@suse.cz>
3202
3203 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3204 (lto_wpa_write_files): Update comments.
3205
2429bce3
L
32062010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3207
3208 PR bootstrap/45357
3209 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3210 with has_analyzed_clone_p.
3211
e0f967db
JH
32122010-08-20 Jan Hubicka <jh@suse.cz>
3213
3214 * lto.c (has_analyzed_clone_p): New function
3215 (lto_materialize_function): Use callgraph to determine if
3216 body is needed.
3217 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3218
ac47786e
NF
32192010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3220
3221 * lto.c: Use FOR_EACH_VEC_ELT.
3222
ecdbd01a 32232010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3224
3225 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3226
5f20c657
JM
32272010-07-27 Joseph Myers <joseph@codesourcery.com>
3228
3229 * lto-lang.c (lto_handle_option): Update prototype and return
3230 value type. Remove duplicate assignment to result.
3231
7a9bf9a4
JM
32322010-07-27 Joseph Myers <joseph@codesourcery.com>
3233
3234 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3235 New.
3236 (lto_init_options): Update prototype.
3237 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3238 Define.
3239
ecdbd01a 32402010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3241
3242 PR lto/44992
92a285c1 3243 * lto.c: Include splay-tree.h
73ce4d1e
AK
3244 (lto_resolution_read): Change to walk file_ids tree and parse
3245 extra file_id in resolution file.
3246 (lto_section_with_id): Add.
3247 (create_subid_section_table): Add.
3248 (lwstate): Add.
3249 (lto_create_files_from_ids): Add.
3250 (lto_file_read): Change to handle sub file ids and create list
3251 of file_datas. Add output argument for count.
3252 (get_section_data): Pass file_data to lto_get_section_name.
3253 (lto_flatten_file): Add.
3254 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3255
ecdbd01a 32562010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3257
3258 * lto-coff.c (hash_name, eq_name): Move.
3259 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3260 * lto-elf.c: (hash_name, eq_name): Move.
3261 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3262 * lto-macho.c: (hash_name, eq_name): Move.
3263 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3264 * lto.c: (hash_name, eq_name): Move from lto-*.c
3265 (lto_obj_create_section_hash_table): Add.
3266 (free_with_string): Add.
3267
718f9c0f
MLI
32682010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3269
3270 * lto-coff.c: Include diagnostic-core.h in every file that
3271 includes toplev.h.
3272 * lto-elf.c: Likewise.
3273 * lto-lang.c: Likewise.
3274 * lto-macho.c: Likewise.
3275
1b137837
JJ
32762010-07-07 Jakub Jelinek <jakub@redhat.com>
3277
3278 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3279 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3280 objects.
3281
92eb4438
JH
32822010-07-05 Jan Hubicka <jh@suse.cz>
3283
3284 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3285 nodes from same comdat group as well as all comdat functions referenced
3286 here.
b9843260
EB
3287 (add_varpool_node_to_partition, add_references_to_partition): New
3288 function.
3289 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3290 add_varpool_node_to_partition; clear aux flags when done.
3291 (lto_promote_cross_file_statics): Do not promote stuff that gets
3292 duplicated to each ltrans.
92eb4438 3293
a05541a9
JH
32942010-07-04 Jan Hubicka <jh@suse.cz>
3295
92a285c1 3296 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3297
4a2ac96f
RG
32982010-06-13 Richard Guenther <rguenther@suse.de>
3299
3300 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3301
1d536046
KT
33022010-06-09 Kai Tietz <kai.tietz@onevision.com>
3303
ab20d992 3304 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1d536046
KT
3305 * lto-coff.c (coff_write_object_file): Add braces to if.
3306
a9429e29
LB
33072010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3308
3309 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3310 (lto_file_read): Likewise.
3311 (new_partition): Likewise.
3312 (read_cgraph_and_symbols): Likewise.
3313
5498f011
JM
33142010-06-07 Joseph Myers <joseph@codesourcery.com>
3315
3316 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3317 (lto_handle_option): Don't set flag_signed_char here.
3318
d4c0c9f6
RG
33192010-06-04 Richard Guenther <rguenther@suse.de>
3320
3321 PR lto/41584
3322 * lto.c (lto_1_to_1_map): Use the proper file_data for
3323 varpool nodes.
3324
0a5fa5a1
JH
33252010-05-30 Jan Hubicka <jh@suse.cz>
3326
3327 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3328 partitioning decisions.
3329
9eec9488
JH
33302010-05-29 Jan Hubicka <jh@suse.cz>
3331
3332 * lto.c (bitmap vector): Remove.
3333 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3334 (ltrans_partition_def): New structure.
3335 (ltrans_partition): New type and VECtor.
3336 (new_partition): New function.
3337 (add_cgraph_node_to_partition): New function.
3338 (lto_1_to_1_map): Reorganize for partitions.
3339 (lto_add_inline_clones): Remove.
3340 (lto_add_all_inlinees): Remove.
3341 (lto_promote_cross_file_statics): Use partitions.
3342 (cmp_partitions): New function.
3343 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3344 use partitions; output files sorted by size.
3345
3e097227
SB
33462010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3347
3348 * Make-lang.in: Replace vec.h dependency with VEC_H.
3349
7ca92787
JM
33502010-05-28 Joseph Myers <joseph@codesourcery.com>
3351
3352 * lto-coff.c (coff_errmsg): Remove.
3353 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3354 errors instead of coff_errmsg (-1).
3355 * lto-macho.c (mach_o_errmsg): Remove.
3356 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3357 instead of mach_o_errmsg (-1).
3358 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3359 xstrerror (errno).
3360
b5611987
RG
33612010-05-28 Richard Guenther <rguenther@suse.de>
3362
3363 * lto.c (prefix_name_with_star): Removed.
3364 (strip_extension): Likewise.
3365 (get_filename_for_set): Likewise.
3366 (lto_write_ltrans_list): Fold into ...
3367 (lto_wpa_write_files): ... this. Name LTRANS units
3368 by suffixing the ltrans output list filename.
3369 (do_whole_program_analysis): Adjust.
3370
1da2ed5f
JM
33712010-05-27 Joseph Myers <joseph@codesourcery.com>
3372
3373 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3374 (read_cgraph_and_symbols, lto_main): Use seen_error.
3375 * Make-lang.in (lto/lto.o): Update dependencies.
3376
7951d88a
EB
33772010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3378
3379 PR lto/44230
3380 * lto.h (lto_eh_personality): New prototype.
3381 * lto.c: Include debug.h.
3382 (first_personality_decl): New static variable.
3383 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3384 first function for which it is non-null.
3385 (lto_eh_personality_decl): New static variable.
3386 (lto_eh_personality): New function.
3387 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3388 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3389
e12da9c2
SB
33902010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3391
3392 * lto-lang.c: Do not include expr.h.
3393
468194f4
RG
33942010-05-24 Richard Guenther <rguenther@suse.de>
3395
3396 * lto-elf.c (lto_obj_build_section_table): Work around
3397 FreeBSD libelf issue.
3398
bd9eb5da
RG
33992010-05-22 Richard Guenther <rguenther@suse.de>
3400
3401 * lto.c (read_cgraph_and_symbols): Do not collect.
3402
66576e1b
JH
34032010-05-20 Jan Hubicka <jh@suse.cz>
3404
3405 * lto.c (promote_var, promote_fn): New functions.
3406 (lto_promote_cross_file_statics): Compute correctly boundary including
3407 static initializers of readonly vars.
3408
36576655
JH
34092010-05-18 Jan Hubicka <jh@suse.cz>
3410
66576e1b 3411 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3412 (lto_promote_cross_file_statics): Deal with non-inline clones.
3413
28632d63
JH
34142010-05-18 Jan Hubicka <jh@suse.cz>
3415
3416 * lto.c (lto_materialize_function): Announce function when
3417 reading body; allocate_struct_function only when reading body;
3418 do not finalize local statics; ggc_collect after reading;
3419 do not mark reachable node.
3420 (materialize_cgraph): Do not announce function.
3421
33e42d56
JH
34222010-05-11 Jan Hubicka <jh@suse.cz>
3423
3424 * lto.c (materialize_cgraph): Revert my previous patch.
3425
f6430ea5
KT
34262010-05-11 Kai Tietz <kai.tietz@onevision.com>
3427
3428 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3429 IMAGE_FILE_MACHINE_AMD64.
3430 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3431
0a0b07b7
JH
34322010-05-11 Jan Hubicka <jh@suse.cz>
3433
3434 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3435 (materialize_cgraph): Add it here.
3436
9a809897
JH
34372010-05-11 Jan Hubicka <jh@suse.cz>
3438
3439 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3440 vector.
3441
34422010-05-11 Jan Hubicka <jh@suse.cz>
3443
3444 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3445 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3446 use reachable_from_other_partition_p and
3447 referenced_from_other_partition_p test.
3448
94f64249
KT
34492010-05-11 Kai Tietz <kai.tietz@onevision.com>
3450
3451 * lto-coff.c (validate_file): Add x64-coff support.
3452 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3453 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3454 * lto-lang.c (lto_build_c_type_nodes): Add check for
3455 'long long unsigned int' for x64-windows.
3456 (lto_init): Likewise.
3457
c082f9f3
SB
34582010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3459
3460 * lto.h (struct lto_file_struct): Document offset member.
3461 * lto-endian.h: New file.
3462 * lto-macho.h: New file.
3463 * lto-macho.c: New file.
3464 * Make-lang.in: Add rule for lto-macho.o.
3465
3f8257db 34662010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3467
3468 PR lto/43857
3469 PR lto/43371
3470 * lang.opt (fresolution): Change to ...
3471 (fresolution=): ... this.
3472 * lto-lang.c (lto_handle_option): Adjust.
3473
48cf395b
RB
34742010-05-07 Richard Guenther <rguenther@suse.de>
3475
3476 * lto.c (DUMPBASE_SUFFIX): Remove.
3477 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3478 Rename to ...
3479 (lto_write_ltrans_list): ... only output the list of ltrans files.
3480 (lto_maybe_unlink): Remove.
3481 (do_whole_program_analysis): Do not execute LTRANS phase
3482 from here.
3483
afa83c15
L
34842010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3485
3486 * lto-lang.c (lto_handle_option): Add argument kind.
3487
369451ec
JH
34882010-05-05 Jan Hubicka <jh@suse.cz>
3489
48cf395b
RB
3490 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3491 refs.
369451ec 3492
2f41ecf5
JH
34932010-05-05 Jan Hubicka <jh@suse.cz>
3494
3495 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3496
ace72c88
JH
34972010-04-30 Jan Hubicka <jh@suse.cz>
3498
b9843260
EB
3499 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3500 use default name.
ace72c88
JH
3501 (lto_wpa_write_files): Write any non-empty partition.
3502
05575e07
JH
35032010-04-30 Jan Hubicka <jh@suse.cz>
3504
3505 * lto.c: Do not attempt to make constant pool references global.
3506
49ba8180
JH
35072010-04-28 Jan Hubicka <jh@suse.cz>
3508
ab20d992 3509 * lto.c (lto_read_in_decl_state): Use GGC.
49ba8180
JH
3510 (lto_wpa_write_files): Announce what we are writting.
3511 (all_file_decl_data): New.
3512 (read_cgraph_and_symbols): Use GGC; correct timevars.
3513 (do_whole_program_analysis): Collect.
ab20d992 3514 * Make-lang.in (lto.o): Fix dependency.
49ba8180
JH
3515 * Makefile.in (GTFILES): Add lto-streamer.h.
3516 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3517 (varpool_assemble_pending_decls): Use VAROUT.
3518 * lto-streamer.h (lto_tree_ref_table): Annotate.
3519 (lto_in_decl_state): Annotate.
3520 (lto_file_decl_data): Annotate.
3521
2942c502
JH
35222010-04-28 Jan Hubicka <jh@suse.cz>
3523
3524 * lto.c (lto_varpool_node_sets): New.
3525 (lto_1_to_1_map): Partition varpool too.
3526 (globalize_context_t, globalize_cross_file_statics,
3527 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3528 lto_scan_statics_in_remaining_global_vars): Remove.
3529 (lto_promote_cross_file_statics): Rewrite.
3530 (get_filename_for_set): Take vset argument.
3531 (lto_wpa_write_files): Pass around vsets.
3532
3bec79c5
DK
35332010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3534
3535 PR lto/42776
3536 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3537 hardcoding 'lto-elf.o'.
3538 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3539
3540 * lto-coff.h: New file.
3541 * lto-coff.c: Likewise.
3542
21aac880
RG
35432010-04-26 Richard Guenther <rguenther@suse.de>
3544
3545 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3546
2cee0101
DK
35472010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3548
3549 * lto.h (lto_elf_file_open): Rename prototype from this ...
3550 (lto_obj_file_open): ... to this.
3551 (lto_elf_file_close): Likewise ...
3552 (lto_obj_file_close): ... and likewise.
3553 (lto_elf_build_section_table): Likewise ...
3554 (lto_obj_build_section_table): ... and likewise.
3555 (lto_elf_begin_section): Likewise ...
3556 (lto_obj_begin_section): ... and likewise.
3557 (lto_elf_append_data): Likewise ...
3558 (lto_obj_append_data): ... and likewise.
3559 (lto_elf_end_section): Likewise ...
3560 (lto_obj_end_section): ... and likewise.
3561 * lto.c (lto_file_read): Update references to the above.
3562 (lto_wpa_write_files): Likewise.
3563 (lto_read_all_file_options): Likewise.
3564 (read_cgraph_and_symbols): Likewise.
3565 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3566 (LANG_HOOKS_APPEND_DATA): Likewise.
3567 (LANG_HOOKS_END_SECTION): Likewise.
3568 * lto-elf.c (lto_elf_file_open): Rename from this ...
3569 (lto_obj_file_open): ... to this, updating any references.
3570 (lto_elf_file_close): Likewise ...
3571 (lto_obj_file_close): ... and likewise.
3572 (lto_elf_build_section_table): Likewise ...
3573 (lto_obj_build_section_table): ... and likewise.
3574 (lto_elf_begin_section): Likewise ...
3575 (lto_obj_begin_section): ... and likewise.
3576 (lto_elf_append_data): Likewise ...
3577 (lto_obj_append_data): ... and likewise.
3578 (lto_elf_end_section): Likewise ...
3579 (lto_obj_end_section): ... and likewise.
3580
bc58d7e1
JH
35812010-04-21 Jan Hubicka <jh@suse.cz>
3582
3583 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3584 (materialize_cgraph): Likewise.
3585
e792884f
JH
35862010-04-21 Jan Hubicka <jh@suse.cz>
3587
3588 * lto.c (lto_wpa_write_files): Update.
3589 (read_cgraph_and_symbols): Be more verbose.
3590 (materialize_cgraph): Likewise.
3591 (do_whole_program_analysis): Likewise.
3592
c9945504
JH
35932010-04-21 Jan Hubicka <jh@suse.cz>
3594
3595 * lto.c (globalize_cross_file_statics): When function has address taken,
3596 it needs to be public.
3597
a837268b
JH
35982010-04-20 Jan Hubicka <jh@suse.cz>
3599
3600 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3601 (lto_add_all_inlinees): Likewise.
3602 (lto_wpa_write_files): Likewise.
3603
3b9e5d95
EB
36042010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3605
3606 * lto-lang.c (lto_init): Remove second argument in call to
3607 build_common_tree_nodes.
3608
8ccb78f2
RO
36092010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3610
3611 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3612 function.
3613
2f9b99e6
EB
36142010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3615
3616 PR bootstrap/43276
3617 * lto-elf.c: Define EM_* constants if not already defined.
3618
bef7d288
EB
36192010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3620
3621 * lto-elf.c (is_compatible_architecture): New static function.
3622 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3623
f68df07c
RG
36242010-02-11 Richard Guenther <rguenther@suse.de>
3625
3626 PR driver/43021
3627 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3628 appropriately.
3629
3cdea2b4
AH
36302010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3631
3632 * lto.c (O_BINARY): Define.
3633 (lto_read_section_data): Open file in binary mode.
3634 * lto-elf.c (O_BINARY): Define.
ab20d992 3635 (lto_elf_file_open): Open file in binary mode.
3cdea2b4 3636
c59449fa
RG
36372010-01-08 Richard Guenther <rguenther@suse.de>
3638
3639 PR lto/42528
3640 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3641 (lto_init): Do not init char_type_node in a standard way
3642 but according to flag_signed_char.
3643
d7fb0a6d
L
36442010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3645
3646 PR lto/41564
3647 * lto.c (DUMPBASE_SUFFIX): New.
3648 (lto_execute_ltrans): Append a sequence number to -dumpbase
3649 for LTRANS.
3650
78ce4053
L
36512010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3652
3653 PR lto/42580
3654 * lto-elf.c (lto_elf_file_open): Stop if the command line
3655 option file is missing.
3656
2a71eb48
RG
36572009-12-15 Richard Guenther <rguenther@suse.de>
3658
3659 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3660 (lto_post_options): Do not disable debuginfo.
3661
a818bca1
DG
36622009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3663
3664 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3665
e7d00517
RG
36662009-12-11 Richard Guenther <rguenther@suse.de>
3667
3668 PR lto/42037
3669 * lto.c (lto_resolution_read): Properly grow the vector.
3670
1ab53893
RG
36712009-12-11 Richard Guenther <rguenther@suse.de>
3672
3673 PR lto/41915
3674 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3675 to the C99 default. Do not set flag_unit_at_a_time.
3676
0f900dfa
JJ
36772009-11-28 Jakub Jelinek <jakub@redhat.com>
3678
3679 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3680 variable.
3681
92fa7608
RAE
36822009-11-19 Rafael Avila de Espindola <espindola@google.com>
3683
3684 PR bootstrap/42096
3685 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3686 * lto.c (lto_parse_hex): New.
3687 (lto_resolution_read): Use lto_parse_hex.
3688 * lto.h (lto_parse_hex): New.
3689
9870fe4f
RAE
36902009-11-17 Rafael Avila de Espindola <espindola@google.com>
3691
3692 * lto-elf.c (lto_file_init): Add offset argument.
3693 (lto_elf_file_open): Record the offset.
3694 * lto.c (lto_resolution_read): Change file_name into a lto_file
3695 argument. Check offsets.
3696 (lto_file_read): Update call to lto_resolution_read.
3697 * lto.h (lto_file_struct): Add the offset field.
3698
1b70729f
RAE
36992009-11-16 Rafael Avila de Espindola <espindola@google.com>
3700
3701 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3702
0e3776db
JH
37032009-11-14 Jan Hubicka <jh@suse.cz>
3704
3705 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3706
06bd7f56
RAE
37072009-11-12 Rafael Avila de Espindola <espindola@google.com>
3708
3709 * lang.opt (fresolution): Renamed from resolution.
3710 * lto-lang.c (lto_handle_option): Handle new option name.
3711 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3712
7e9dc421 37132009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3714 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3715
3716 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3717 (lto_elf_file_open): Handle offsets in arguments name@offest.
3718
b207f900
RG
37192009-10-30 Richard Guenther <rguenther@suse.de>
3720
3721 PR lto/41858
3722 * lto.c (lto_file_read): Do not set file_data->fd.
3723 (lto_read_section_data): Use a single-entry file-descriptor cache.
3724 Do not check the result of xmalloc.
3725 (free_section_data): Do not use file_data->fd.
3726 (lto_read_all_file_options): Likewise.
3727
2c928155
RG
37282009-10-22 Richard Guenther <rguenther@suse.de>
3729
3730 * lto.c (lto_fixup_jump_functions): Remove.
3731 (lto_fixup_decls): Do not fixup jump functions.
3732 (read_cgraph_and_symbols): Schedule cgraph merging after
3733 summary reading. Schedule type and decl fixup before
3734 summary reading.
3735
f9c91f8a
RB
37362009-10-22 Richard Guenther <rguenther@suse.de>
3737
3738 * lto.c (lto_fixup_data_t): Remove free_list member.
3739 (lto_fixup_tree): Do not insert into free_list.
3740 (free_decl): Remove.
3741 (lto_fixup_decls): Remove free-list handling.
3742
fb3f88cc
JH
37432009-10-22 Jan Hubicka <jh@suse.cz>
3744
3745 * lto.c (lto_fixup_jump_functions): New function.
3746 (lto_fixup_decls): Use it.
3747
35f1e9f4
RG
37482009-10-16 Richard Guenther <rguenther@suse.de>
3749
3750 PR lto/41715
3751 * lto.c (lto_fixup_tree): Revert last change.
3752
200c8750
RG
37532009-10-14 Richard Guenther <rguenther@suse.de>
3754
3755 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3756 compatible with the one we replace wrap it around a
3757 VIEW_CONVERT_EXPR.
3758
b1b07c92
RG
37592009-10-09 Richard Guenther <rguenther@suse.de>
3760
3761 PR lto/41635
3762 PR lto/41636
3763 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3764 a file.
3765 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3766 (init_ehdr##BITS): Likewise.
3767
3c2e7d45
JM
37682009-10-08 Joseph Myers <joseph@codesourcery.com>
3769
3770 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3771 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3772 diagnostics.
3773 * lto-lang.c (lto_post_options): Remove trailing "." from
3774 diagnostics.
3775
0d0bfe17
RG
37762009-10-08 Richard Guenther <rguenther@suse.de>
3777
3778 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3779 hash tables.
3780
4bedf19a
JM
37812009-10-07 Joseph Myers <joseph@codesourcery.com>
3782
3783 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3784
b20996ff
JH
37852009-10-07 Jan Hubicka <jh@suse.cz>
3786
3787 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3788 ltrans stage; explain why this is needed and should not.
3789
1a735925
RG
37902009-10-05 Richard Guenther <rguenther@suse.de>
3791
3792 PR lto/41552
3793 PR lto/41487
3794 * lto.c (lto_read_decls): Do not register deferred decls.
3795 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3796 until after reading the IPA summaries.
3797
d7f09764
DN
37982009-10-02 Rafael Avila de Espindola <espindola@google.com>
3799
3800 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3801 (lto-lang.c): Don't include lto/common.h.
3802
38032009-10-02 Rafael Avila de Espindola <espindola@google.com>
3804
3805 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3806 (lto/common.o): Remove.
3807 * common.c: Remove.
3808 * common.h (lto_kind_str): Remove.
3809 (lto_visibility_str): Remove.
3810 (lto_resolution_str): Make it static.
3811
38122009-10-01 Diego Novillo <dnovillo@google.com>
3813
3814 * lto.c (lto_read_decls): Add comment.
3815 Call internal_error instead of gcc_assert.
3816 (lto_resolution_read): Likewise.
3817 (lto_add_all_inlinees): Tidy.
3818 * Make-lang.in: Fix copyright boilerplate.
3819 (lto.pdf): New.
3820 (lto.install-pdf): New.
3821 * lto-tree.h: Fix copyright boilerplate.
3822 * lang-specs.h: Likewise.
3823 Remove ".lto" entry from compilers fragment.
3824 * lto-elf.c: Move inclusion of gelf.h after config.h.
3825 Tidy formatting everywhere.
3826 * lto.h: Fix copyright boilerplate.
3827 Tidy formatting everywhere.
3828 * common.c: Likewise.
3829 * config-lang.in: Likewise.
3830 * common.h: Likewise.
3831 * lto-lang.c: Likewise.
3832
38332009-10-01 Richard Guenther <rguenther@suse.de>
3834
3835 * lto.c (lto_read_section_data): Use plain lseek/read.
3836
38372009-10-01 Richard Guenther <rguenther@suse.de>
3838
3839 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3840 use sysconf to query the system page size.
3841 (lto_file_read): Implement fallback using stdio.
3842 (free_section_data): Likewise.
3843
38442009-09-29 Diego Novillo <dnovillo@google.com>
3845
3846 * lto-lang.c (lto_init): Really fix call to
3847 build_common_builtin_nodes.
3848
38492009-09-29 Diego Novillo <dnovillo@google.com>
3850
3851 * lto-lang.c (lto_init): Fix call to
3852 build_common_builtin_nodes.
3853
38542009-09-29 Richard Guenther <rguenther@suse.de>
3855
3856 PR lto/40754
3857 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3858 in bytes.
3859 (first_data_block): New static variable.
3860 (lto_elf_append_data): Align the first data block in each
3861 section.
3862
38632009-09-28 Diego Novillo <dnovillo@google.com>
3864
3865 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3866 * lto.c (strip_extension): New.
3867 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3868 (lto_execute_ltrans): Tidy.
3869 Do not pass -fwpa nor -fltrans-* to LTRANS.
3870 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3871 * tree.c (need_assembler_name_p): Call
3872 lang_hooks.decls.may_need_assembler_name_p if set.
3873 * varasm.c (default_binds_local_p_1): Remove check for
3874 flag_ltrans.
3875 * varpool.c (decide_is_variable_needed): Do not test for
3876 in_lto_p.
3877
38782009-09-22 Richard Guenther <rguenther@suse.de>
3879
3880 PR lto/39276
3881 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3882 * Make-lang.in: Remove ltrans-driver stuff.
3883 * config-lang.in: Likewise.
3884 * lang.opt (fltrans-driver): Remove.
3885 * lto-lang.c (lto_init_options): Remove code initializing
3886 ltrans_driver.
3887 * ltrans-driver: Remove.
3888
38892009-09-21 Diego Novillo <dnovillo@google.com>
3890
3891 * lto-lang.c (lto_define_builtins): Remove superfluous
3892 calls to targetm.init_builtins and build_common_builtin_nodes.
3893 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3894 build_common_builtin_nodes.
3895 * lto.c (lto_materialize_function): Do nothing if NODE is a
3896 clone.
3897
38982009-09-03 Diego Novillo <dnovillo@google.com>
3899
3900 * lto-elf.c (validate_file): Replace call to
3901 elf_getshstrndx with call to elf_getshdrstrndx.
3902
39032009-08-19 Richard Guenther <rguenther@suse.de>
3904
3905 * lto-lang.c (lto_init): Merge char_type_node with the
3906 appropriately signed variant.
3907
39082009-08-19 Richard Guenther <rguenther@suse.de>
3909
3910 PR lto/41071
3911 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3912 (lto_fixup_type): Re-build the pointer-to chain part two.
3913
39142009-08-19 Richard Guenther <rguenther@suse.de>
3915
3916 PR lto/41071
3917 * lto.c (lto_fixup_type): Re-build the type variant chain.
3918
39192009-08-19 Richard Guenther <rguenther@suse.de>
3920
3921 PR lto/41071
3922 * lto.c (lto_fixup_constructor): New function.
3923 (lto_fixup_tree): Replace all types. Properly fixup
3924 constructors and constants.
3925
39262009-08-14 Richard Guenther <rguenther@suse.de>
3927
3928 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3929 for DECL_LANG_SPECIFIC.
3930
39312009-08-13 Richard Guenther <rguenther@suse.de>
3932
3933 PR lto/41032
3934 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3935
39362009-07-30 Richard Guenther <rguenther@suse.de>
3937
3938 PR lto/40903
3939 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3940 the largest decl for output and free TREE_CHAIN for further
3941 use.
3942
39432009-07-24 Diego Novillo <dnovillo@google.com>
3944
3945 * Make-lang.in: Add empty lto.install-plugin target.
3946
39472009-07-13 Diego Novillo <dnovillo@google.com>
3948
3949 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3950
39512009-07-11 Richard Guenther <rguenther@suse.de>
3952
3953 * lto-lang.c (lto_write_globals): Wrapup global decls.
3954
39552009-07-10 Richard Guenther <rguenther@suse.de>
3956
3957 * lto-lang.c (lto_init): Allocate one more location to make
3958 BUILTINS_LOCATION correct.
3959
39602009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3961
3962 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3963
39642009-07-06 Diego Novillo <dnovillo@google.com>
3965
3966 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3967 TYPE_SIZE_UNIT.
3968
39692009-07-06 Diego Novillo <dnovillo@google.com>
3970
3971 * lto.c (preload_common_nodes): Remove.
3972 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3973 (lto_read_decls): Call lto_data_in_create and
3974 lto_data_in_delete.
3975 (free_decl): Do not call ggc_free.
3976 (lto_main): Call lto_init_reader.
3977 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3978 (lto_init): Initialize main_identifier_node if needed.
3979 Make ptrdiff_type_node be integer_type_node.
3980
39812009-06-19 Diego Novillo <dnovillo@google.com>
3982
3983 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3984 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3985 Remove code guarded by #ifdef LOCAL_TRACE.
3986
39872009-06-18 Diego Novillo <dnovillo@google.com>
3988
3989 * lto.c: Update license to GPLv3.
3990 * lto-elf.c: Likewise.
3991 * common.c: Likewise.
3992 * lto-lang.c: Likewise.
3993 * lto.h: Remove superfluous include files. Update all
3994 users.
3995
39962009-06-17 Diego Novillo <dnovillo@google.com>
3997
3998 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3999
40002009-06-02 Diego Novillo <dnovillo@google.com>
4001
4002 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
4003 read in.
4004 (materialize_cgraph): Only materialize nodes that have a
4005 representation on file.
4006
40072009-06-01 Diego Novillo <dnovillo@google.com>
4008
4009 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
4010
40112009-05-31 Diego Novillo <dnovillo@google.com>
4012
4013 * lto-lang.c (lto_type_for_mode): Handle all the modes
4014 handled in c_common_type_for_mode.
4015
40162009-05-21 Diego Novillo <dnovillo@google.com>
4017
4018 * lto-elf.c: Always include <gelf.h>.
4019 * config-lang.in (target_libs): Remove.
4020 (build_by_default): Set to no.
4021
40222009-05-15 Diego Novillo <dnovillo@google.com>
4023
4024 * lto.c (lto_materialize_function): Assert that DECL is
4025 not a builtin.
4026 (materialize_cgraph): Don't try to materialize builtin
4027 functions.
4028 * lto-section-out.c (write_symbol_vec): Do not write
4029 builtin functions.
4030
40312009-05-13 Diego Novillo <dnovillo@google.com>
4032
4033 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
4034
40352009-05-07 Diego Novillo <dnovillo@google.com>
4036
4037 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
4038 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
4039 (lto_fixup_type): Call it for TYPE_POINTER_TO,
4040 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
4041 (lto_fixup_tree): Call gimple_register_type when *TP is a
4042 type.
4043 (lto_main): Call bitmap_obstack_initialize.
4044
40452009-04-22 Diego Novillo <dnovillo@google.com>
4046
4047 * lto.c (free_section_data): Tidy.
4048 (lto_1_to_1_map): Tidy.
4049 (lto_add_all_inlinees): Tidy.
4050 (prefix_name_with_star): New.
4051 (get_filename_for_set): New.
4052 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
4053 to determine what cgraph node sets to write.
4054 Call get_filename_for_set to compute temporary file
4055 names.
4056 (lto_execute_ltrans): Do not execute LTRANS on files with
4057 names that start with '*'.
4058 Move logic to execute LTRANS together so that LTRANS is
4059 invoked only if there are any files to compile.
4060 (do_whole_program_analysis): Only remove output files
4061 that do not start with '*'.
4062
40632009-04-06 Diego Novillo <dnovillo@google.com>
4064
4065 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
4066 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
4067 (lto_add_all_inlinees): Tidy.
4068
40692009-03-26 Diego Novillo <dnovillo@google.com>
4070
4071 * lto.c: Include gimple.h.
4072 (lto_read_in_decl_state): Call gimple_register_type for
4073 every type in every stream.
4074 (lto_fixup_common): Call gimple_register_type if T has a
4075 type.
4076 (do_whole_program_analysis): Call print_lto_report.
4077 (lto_main): Call print_lto_report after cgraph_optimize.
4078 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
4079
40802009-03-24 Diego Novillo <dnovillo@google.com>
4081
4082 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
4083 (lto.o): Add dependency on GIMPLE_H.
4084
40852009-03-10 Simon Baldwin <simonb@google.com>
4086
4087 * lto.c (lto_read_all_file_options): Close any open file descriptor
4088 contained in file_data before freeing.
4089
40902009-02-24 Rafael Avila de Espindola <espindola@google.com>
4091
4092 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4093 for a decl in the original bitmap, not a node.
4094 (lto_add_all_inlinees): Remove original nodes that are not needed.
4095 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4096
40972009-02-24 Diego Novillo <dnovillo@google.com>
4098
4099 * lto.c (lto_materialize_function): Update
4100 lto_stats.num_function_bodies.
4101 (get_section_data): Initialize *LEN to 0.
4102 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
4103 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
4104 Update lto_stats.num_output_files.
4105 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4106 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4107 (lto_main): Initialize lto_stats.
4108 If flag_lto_report is set, call print_lto_report.
4109
41102009-02-19 Diego Novillo <dnovillo@google.com>
4111
4112 Revert
4113
4114 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4115
4116 * lto.c (lto_add_inline_clones): Don't add the
4117 master clone. Check for a decl in the original
4118 bitmap, not a node.
4119 (lto_add_all_inlinees): Remove original nodes
4120 that are not needed.
4121 (lto_scan_statics_in_cgraph_node): Don't care if
4122 the node is the master.
4123 (lto_promote_cross_file_statics): Use a new
4124 context.seen_node_decls for each set
4125
41262009-02-19 Rafael Avila de Espindola <espindola@google.com>
4127
4128 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4129 for a decl in the original bitmap, not a node.
4130 (lto_add_all_inlinees): Remove original nodes that are not needed.
4131 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4132 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4133 for each set
4134
41352009-02-18 Diego Novillo <dnovillo@google.com>
4136
4137 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4138 and TV_WHOPR_WPA_IO.
4139 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4140 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4141 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4142 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4143 depending on command line flags.
4144 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4145 (lto_main): Remove timer uses.
4146
41472009-02-18 Rafael Avila de Espindola <espindola@google.com>
4148
4149 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4150 (lto_wpa_write_files): Update calls to renamed functions.
4151
41522009-02-17 Diego Novillo <dnovillo@google.com>
4153
4154 PR 39203
4155 * lto-lang.c (lto_post_options): Disable -fwhole-program
4156 when running LTRANS.
4157
41582009-02-10 Diego Novillo <dnovillo@google.com>
4159
4160 * lto.c (read_cgraph_and_symbols): Fix comment.
4161
41622009-02-10 Diego Novillo <dnovillo@google.com>
4163
4164 * lto.c (read_cgraph_and_symbols): Read options from all
4165 IL files.
4166
41672009-02-10 Diego Novillo <dnovillo@google.com>
4168
4169 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4170 (materialize_cgraph): Likewise.
4171 (do_whole_program_analysis): Likewise.
4172 (lto_main): Call read_cgraph_and_symbols,
4173 materialize_cgraph and do_whole_program_analysis.
4174
41752009-02-10 Simon Baldwin <simonb@google.com>
4176
4177 * lto.c: Include lto-opts.h.
4178 * (lto_main): Clear file options at loop start, read any saved
4179 options from the first file handled, and re-issue options.
4180 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4181
41822009-02-02 Diego Novillo <dnovillo@google.com>
4183
4184 * lto.c (lto_main): Stop LTO_TIMER and use
4185 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4186
41872009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4188
4189 PR lto/38995
4190 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4191 to POINTER_SIZE.
4192
41932009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4194
ab20d992 4195 * Make-lang.in (LTO_EXE): Link with all
d7f09764
DN
4196 BACKENDLIBS and not only GMPLIBS
4197
41982009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4199
4200 PR bootstrap/38992
4201 * lto-elf.c: Include gelf.h instead of libelf.h.
4202 (lto_elf_file_close): Replace elfx_update_shstrndx with
4203 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4204 gelf_update_ehdr.
4205
42062009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4207
4208 PR middle-end/38996
4209 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4210
42112009-01-26 Diego Novillo <dnovillo@google.com>
4212
4213 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4214
42152009-01-26 Diego Novillo <dnovillo@google.com>
4216
4217 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4218 and rename into gimple_types_compatible_p.
4219
42202009-01-12 Rafael Avila de Espindola <espindola@google.com>
4221
4222 * lto-lang.c (lang_hooks): Remove the const qualifier.
4223
42242009-01-06 Diego Novillo <dnovillo@google.com>
4225
4226 * ltrans-driver: Mark 'all' target as phony.
4227
42282008-12-31 Diego Novillo <dnovillo@google.com>
4229
4230 * ltrans-driver: Execute a NOP action for target 'all'.
4231
42322008-12-19 Diego Novillo <dnovillo@google.com>
4233
4234 * lto.c (lto_1_to_1_map): Tidy.
4235
42362008-12-19 Diego Novillo <dnovillo@google.com>
4237
4238 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4239 be opened, show its name.
4240 * ltrans-driver: If $verbose is set, do not use parallelism.
4241
42422008-12-17 Rafael Avila de Espindola <espindola@google.com>
4243
4244 * lto.c (lto_fixup_function): New.
4245 (lto_fixup_tree): Call lto_fixup_function.
4246
42472008-12-14 Doug Kwan <dougkwan@google.com>
4248
4249 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4250 variables if there is no function.
4251
42522008-12-10 Simon Baldwin <simonb@google.com>
4253
4254 * ltrans-driver: Always run make in silent mode, to avoid make's
4255 trace on stdout interfering with lto-wrapper output.
4256
42572008-12-10 Doug Kwan <dougkwan@google.com>
4258
4259 * lto.c (lto_add_inline_clones): Do not force master clones of
4260 inlined functions already in SET to be static inline.
4261
42622008-12-04 Doug Kwan <dougkwan@google.com>
4263
4264 * lto.c (globalize_context_t): New type to store states in
4265 globalization of cross-file statics.
4266 (globalize_cross_file_statics): New.
4267 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4268 static decls that need to be fixed up.
4269 (lto_scan_statics_in_cgraph_node): Change call interface to use
4270 a globalize_context_t CONTEXT for all states used.
4271 (lto_scan_statics_in_remaining_global_vars): New.
4272 (lto_promote_cross_file_statics): Use new call interface of
4273 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4274 visible vars in the last set.
4275
42762008-12-03 Diego Novillo <dnovillo@google.com>
4277
4278 * lto.c (lto_fixup_tree): Do not emit an error when
4279 PREVAILING throw but T doesn't.
4280
42812008-12-02 Doug Kwan <dougkwan@google.com>
4282
4283 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4284 from code in ...
4285 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4286 variables and functions.
4287 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4288 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4289
42902008-11-29 Diego Novillo <dnovillo@google.com>
4291
4292 * lto.c: Include timevar.h.
4293 (lto_materialize_function): Tidy. Add comments.
4294 (lto_wpa_write_files): Tidy.
4295 (lto_execute_ltrans): Tidy.
4296 (lto_main): Add local variable LTO_TIMER. Initialize it
4297 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4298 Start and stop the timer.
4299 Tidy comments.
4300 * Make-lang.in (lto.o): Add dependency on timevar.h.
4301 * ltrans-driver: React to -v and -save-temps.
4302 Use simple heuristic to determine how much parallelism to
4303 use when executing make.
4304
43052008-11-12 Doug Kwan <dougkwan@google.com>
4306
4307 * lto.c (lto_bitmap_obstack): Remove var.
4308 (lto_materialize_function): Do nothing instead of marking function
4309 body in file if flag_wpa is true.
4310 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4311 (lto_scan_statics_in_cgraph_node): New function.
4312 (lto_promote_cross_file_statics): Same.
4313 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4314 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4315 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4316
43172008-11-09 Diego Novillo <dnovillo@google.com>
4318
ab20d992 4319 * lto.c (lto_fixup_tree): Change error message locus
d7f09764
DN
4320 information to include location of mismatching
4321 declaration.
4322 Use TREE_NO_WARNING to avoid repeated messages.
4323 (lto_main): If lto_fixup_decls emitted any errors, exit.
ab20d992 4324 * lto-lang.c: Don't include libfuncs.h and except.h
d7f09764
DN
4325 (lto_init_options): Don't enable exceptions by default.
4326 (lto_eh_runtime_type): Move to lto-function-in.c
4327 (lto_init_eh): Likewise.
4328 (lto_init): Don't call lto_init_eh.
ab20d992 4329 * Make-lang.in (lto-lang.o): Remove dependency on
d7f09764
DN
4330 libfuncs.h and except.h.
4331
43322008-10-30 Diego Novillo <dnovillo@google.com>
4333
4334 * lto.c (lto_read_decls): Declare debug_main only if
4335 LTO_STREAM_DEBUGGING is enabled.
4336
43372008-10-30 Simon Baldwin <simonb@google.com>
4338
4339 * lto.c (lto_wpa_write_files): Create intermediate files with
4340 make_cwd_temp_file().
4341 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4342 WPA_SAVE_LTRANS is set.
4343 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4344 * ltrans-driver: Do not strip directory from output files.
4345
43462008-10-29 Doug Kwan <dougkwan@google.com>
4347
4348 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4349 DECL.
4350 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4351 (lto/lto-symtab.o): Remove rule.
4352 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4353 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4354 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4355 Remove macros.
4356 lto-symtab.c (File): Move up one level.
4357 lto-lang.c (cgraph.h): Remove include.
4358 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4359 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4360 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4361
ab20d992 43622008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4363
4364 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4365 non prevailing weak symbols.
4366
ab20d992 43672008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4368
4369 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4370
ab20d992 43712008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4372
4373 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4374 different types.
4375
43762008-10-23 Simon Baldwin <simonb@google.com>
4377
4378 * lto-lang.c (input_node): Save the node reference, rather than the
4379 node pointer, in node->inlined_to.
4380 (input_cgraph_1): Convert node references into node pointers.
4381
43822008-10-22 Diego Novillo <dnovillo@google.com>
4383 Rafael Espindola <espindola@google.com>
4384
4385 * lto.c (lto_resolution_read): Tidy.
4386 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4387 abort if RET is NULL.
4388
43892008-10-22 Doug Kwan <dougkwan@google.com>
4390
4391 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4392 exceptions flag is given.
4393 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4394 (lto_init_eh): Remove exceptions flag initialization.
ab20d992 4395 (lto_init): Only call lto_init_eh if exceptions flag is set.
d7f09764
DN
4396
43972008-10-21 Diego Novillo <dnovillo@google.com>
4398
4399 * lto.c: Tidy some formatting.
4400 * lto.h: Likewise.
4401
44022008-10-21 Simon Baldwin <simonb@google.com>
4403
4404 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4405 them is NULL (but not the other).
4406
44072008-10-17 Diego Novillo <dnovillo@google.com>
4408
4409 * ltrans-driver: Divert output from make to a temporary file.
4410 Show it if the call to make failed.
4411
44122008-10-15 Diego Novillo <dnovillo@google.com>
4413
4414 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4415 Do not print TEMP_FILENAME
4416 * ltrans-driver: Call make with -s.
4417
44182008-10-15 Diego Novillo <dnovillo@google.com>
4419
4420 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4421 TREE_STATIC on global symbols.
4422
44232008-10-14 Ollie Wild <aaw@google.com>
4424
4425 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4426 (LTRANS_DRIVER_EXE): Add.
4427 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4428 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4429 (lto.install.common): Remove ltrans-driver.
4430 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4431 (LTRANS_DRIVER_EXE): New build rule.
4432 * config-lang.in (compilers): Add ltrans-driver.
4433
44342008-10-14 Diego Novillo <dnovillo@google.com>
4435
4436 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4437 of program name.
4438
44392008-10-13 Ollie Wild <aaw@google.com>
4440
4441 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4442 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4443 * ltrans-driver (LTRANS_FLAGS): Remove.
4444
44452008-10-08 Doug Kwan <dougkwan@google.com>
4446
4447 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4448 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4449 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4450 from lto_fixup_state to here.
4451 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4452 just a free-list. Fix up types also. Move decl merging code to
4453 lto_fixup_tree.
4454 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4455 object.
4456 (lto_fixup_decls): Use another pointer set to avoid multiple
4457 walking of nodes except for DECLs to be replaced. Pass an
4458 lto_fixup_data_t object to tree-walker.
4459
ab20d992 44602008-10-08 Rafael Espindola <espindola@google.com>
d7f09764
DN
4461
4462 * lto-symtab.c (lto_symtab_set_resolution): New.
4463 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4464 lto_symtab_get_resolution.
4465 (lto_symtab_prevailing_decl): Return decl for non public decls.
4466 (lto_symtab_get_resolution): New.
4467 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4468
ab20d992 44692008-10-06 Rafael Espindola <espindola@google.com>
d7f09764
DN
4470
4471 * lto-lang.c: Include cgraph.h.
4472 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4473 input_cgraph): Moved from lto-cgraph.c.
4474 (LANG_HOOKS_INPUT_CGRAPH): New.
4475
ab20d992 44762008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4477
4478 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4479
ab20d992 44802008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4481
4482 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4483 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4484 prevailing definition. Don't mark TREE_NOTHROW differences.
4485 * lto.c (lto_fixup_tree): New.
4486 (lto_fixup_state): New.
4487 (lto_fixup_state_aux): New.
4488 (free_decl): New.
4489 (lto_fixup_decls): New.
4490 (lto_main): Call lto_fixup_decls.
4491
44922008-10-02 Ollie Wild <aaw@google.com>
4493
4494 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4495 and Init.
4496 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4497 * lto-lang.c (lto_post_options): Add validation and fixups for
4498 -fltrans and -fwpa.
4499
ab20d992 45002008-10-02 Rafael Espindola <espindola@google.com>
d7f09764
DN
4501
4502 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4503 lto_symtab_merge_decl): Return void.
4504 (lto_symtab_prevailing_decl): New.
4505
ab20d992 45062008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4507
4508 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4509 defined symbols.
4510 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4511 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4512 Check for already defined symbols.
4513 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4514 (LTO_IDENTIFIER_RESOLUTION): Remove.
4515 (LTO_DECL_RESOLUTION): New.
4516
ab20d992 45172008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4518
4519 * lto.c (lto_read_decls): Use new input_tree signature.
4520
45212008-09-26 Doug Kwan <dougkwan@google.com>
4522
4523 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4524 bodies affected by exception attribute merging of DECLs.
4525 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
ab20d992 4526 merging.
d7f09764
DN
4527
45282008-09-25 Rafael Espindola <espindola@google.com>
4529
4530 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4531 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4532 * lto-symtab.c (lto_symtab_compatible): New.
4533 (lto_symtab_overwrite_decl): New.
4534 (lto_symtab_merge_decl): Refactor to use the above functions
4535 and the resolution from lang_identifier.
4536 * lto-tree.h: Include plugin-api.h.
4537 (lang_identifier): Add resolution.
4538 (LTO_IDENTIFIER_RESOLUTION): New.
4539
45402008-09-25 Ollie Wild <aaw@google.com>
4541
4542 * lang.opt (fltrans-output-list=): New option.
4543 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4544
ab20d992 45452008-09-25 Rafael Espindola <espindola@google.com>
d7f09764
DN
4546
4547 * lto.c (lto_resolution_read): Initialize ret;
4548
45492008-09-24 Ollie Wild <aaw@google.com>
4550
4551 * lto.c (sys/mman.h): Move include.
4552 (lto_wpa_write_files): Return a list of written files.
4553 (lto_execute_ltrans): New function.
4554 (lto_main): Call lto_execute_ltrans.
4555 (ltrans-driver): New file.
4556 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4557 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4558 (lto_init_options): Initialize ltrans_driver.
4559 (lto_handle_option): Fix incorrect default output value.
4560 * lang.opt (fltrans-driver=): New option.
4561 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4562 (lto.install-common): Add lto/ltrans-driver.
4563
ab20d992 45642008-09-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4565
4566 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4567 (lto/lto.o): Depend on lto/common.h.
4568 (lto/common.o): New.
4569 * lang.opt (resolution): New.
4570 * lto-lang.c (resolution_file_name): New.
4571 (lto_handle_option): Handle OPT_resolution.
4572 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4573 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4574 pass it to lto_symtab_merge_decl.
4575 * lto.c: Include common.h.
4576 (lto_read_decls): Add resolutions and resolutions_size arguments.
4577 Initialize data_in.globals_resolution and
4578 data_in.globals_resolution_size.
4579 (index_and_symbol_resolution): New.
4580 (lto_resolution_read): New.
4581 (lto_file_read): Add argument resolution_file.
4582 Read resolution.
4583 * lto.h (resolution_file_name): New.
4584
ab20d992 45852008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4586
4587 * common.c: Update description.
4588 * common.h: Update description.
4589
ab20d992 45902008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4591
4592 * common.c: Moved from lto-plugin.
4593 * common.h: Moved from lto-plugin.
4594
45952008-09-22 Doug Kwan <dougkwan@google.com>
4596
4597 * lto.c (VEC(bitmap,heap)): Declare.
4598 (lto_materialize_function): Handle WAP mode specially.
4599 (lto_add_inline_clones): New.
4600 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4601 return a bitmap of inlined decls.
4602 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4603 (lto_main): Call reset_inline_failed to reset inlining states.
4604 Check call-graph after WPA inlining.
4605 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4606 unconditionally.
4607
46082008-09-19 Doug Kwan <dougkwan@google.com>
4609
4610 lto.c (lto_main): Remove unsued wrapper code.
4611 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4612
46132008-09-19 Rafael Espindola <espindola@google.com>
4614
4615 * lto-symtab.c: Include lto-tree-in.h.
4616 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4617 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4618 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4619
46202008-09-17 Paolo Bonzini <bonzini@gnu.org>
4621 Rafael Avila de Espindola <espindola@google.com>
4622
4623 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4624 COMPOUND_LITERAL_EXPR_DECL): Remove.
4625 (emit_local_var): Remove.
4626 (lto_expand_expr): Remove.
4627 (lto_staticp): Remove.
4628 (LANG_HOOKS_EXPAND_EXPR): Remove.
4629 (LANG_HOOKS_STATICP): Remove.
4630
46312008-09-11 Diego Novillo <dnovillo@google.com>
4632
4633 * lto-lang.c: Include except.h and libfuncs.h.
4634 (lto_init_eh): New.
4635 (lto_init): Call it.
4636 Set flag_generate_lto to 0.
4637 * Make-lang.in (lto-lang.o): Add dependency on except.h
4638 and libfuncs.h.
4639
46402008-09-09 Bill Maddox <maddox@google.com>
4641
4642 * lto-lang.c: Include header file expr.h.
4643 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4644 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
ab20d992 4645 (emit_local_var): Copied from c-semantics.c.
d7f09764
DN
4646 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4647 and c_staticp in c-common.c.
ab20d992 4648 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
d7f09764
DN
4649
46502008-09-08 Diego Novillo <dnovillo@google.com>
4651
4652 * lto-lang.c (lto_global_bindings_p): Return 1 during
4653 IPA passes.
4654
46552008-09-07 Diego Novillo <dnovillo@google.com>
4656
4657 * lto.c: Tidy formatting.
4658
46592008-08-04 Bill Maddox <maddox@google.com>
4660
4661 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
ab20d992 4662
d7f09764
DN
46632008-09-03 Doug Kwan <dougkwan@google.com>
4664
4665 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4666 CIF_OK instead of NULL.
4667
46682008-09-02 Diego Novillo <dnovillo@google.com>
4669 Simon Baldwin <simonb@google.com>
4670
4671 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4672 c_common_type_for_size.
4673 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4674 (lto_init): Call linemap_add.
4675 (signed_and_unsigned_types): Remove.
4676
46772008-08-29 Diego Novillo <dnovillo@google.com>
4678
4679 * lto-lang.c (handle_noreturn_attribute): New local function.
4680 (handle_const_attribute): New local function.
4681 (handle_malloc_attribute): New local function.
4682 (handle_pure_attribute): New local function.
4683 (handle_novops_attribute): New local function.
4684 (handle_nonnull_attribute): New local function.
4685 (handle_nothrow_attribute): New local function.
4686 (handle_sentinel_attribute): New local function.
4687 (handle_type_generic_attribute): New local function.
4688 (handle_format_attribute): New local function.
4689 (handle_format_arg_attribute): New local function.
4690 (lto_attribute_table): Declare.
4691 (lto_format_attribute_table): Declare.
4692 (lto_init_attributes): New local function.
4693 (lto_define_builtins): Call it.
4694 Call targetm.init_builtins and build_common_builtin_nodes.
4695 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4696 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4697
46982008-08-28 Diego Novillo <dnovillo@google.com>
4699
4700 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4701 $(GIMPLE_H).
4702 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4703 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4704 * lto-symtab.c: Include gimple.h.
4705 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4706 TREE_CHAIN.
4707
47082008-08-27 Doug Kwan <dougkwan@google.com>
4709
4710 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4711 gt-lto-lto.h): New includes.
4712 (lto_materialize_function): Do not read in function body in WPA mode.
4713 Format a line to fit in 80 columns.
4714 (lto_cgraph_node_sets): New garbage collected variable.
4715 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4716 New functions.
4717 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
ab20d992 4718 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
d7f09764
DN
4719 variable LTO_SECTION_IN_H.
4720 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4721 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4722 with variable LTO_SECTION_IN_H.
4723 * config-lang.in (gtfiles): Add lto/lto.c.
4724 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4725 merged DECL_RESULT correctly.
4726
47272008-08-26 Bill Maddox <maddox@google.com>
4728
4729 * lto-lang.c Include tree-gimple.h.
4730 (lto_mark_addressable): Call mark_addressable rather than
4731 asserting.
4732 (lto_post_options): Suppress debug info generation.
4733 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
ab20d992 4734
3f8257db 47352008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4736
4737 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4738 assertion and leave an explanatory comment in its place.
ab20d992 4739
d7f09764
DN
47402008-08-21 Doug Kwan <dougkwan@google.com>
4741
4742 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4743 of common nodes instead of computing locallly.
4744 (lto_read_in_decl_state): New.
4745 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4746 Read global and per-function in-decl states.
4747 * Make-lang.in (LTO_H): Update dependency.
4748 (lto/lto.o): Same.
4749 (lto-symtab.c): Merge (revision 139039)
4750 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4751
47522008-08-21 Rafael Espindola <espindola@google.com>
4753
4754 * config-lang.in (target_libs): New.
4755
47562008-08-20 Bill Maddox <maddox@google.com>
4757
4758 * lto.c (current_lto_file): Remove GTY marker from static
4759 variable. Remove include of file gt-lto-lto.h.
4760 * Make-lang.in: Remove dependency of lto/lto.o on
4761 gt-lto-lto.h.
4762 * lto-elf.c (lto_file_close): Removed.
4763 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4764 allocate lto_elf_file object.
4765 (lto_elf_file_close): Free lto_elf_file object after close.
4766 * lto.h (struct lto_file_struct): Remove GTY marker.
4767 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4768 gtfiles.
ab20d992 4769
d7f09764
DN
47702008-08-20 Bill Maddox <maddox@google.com>
4771
4772 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4773 to conform to its new signature.
4774 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4775 on discarded node here, now called in global_vector_fixup.
ab20d992 4776
d7f09764
DN
47772008-08-09 Bill Maddox <maddox@google.com>
4778
4779 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4780 has not been set to a front-end-specific value.
ab20d992 4781
d7f09764 47822008-08-05 Doug Kwan <dougkwan@google.com>
ab20d992 4783
d7f09764
DN
4784 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4785 build breakage.
4786
47872008-07-30 Bill Maddox <maddox@google.com>
4788
4789 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4790 Remove obsolete comments.
4791 (lto_read_decls): Remove initialization of deleted field data_in.global.
4792 Tidy up comments.
4793 (lto_main): Remove redundant initialization of section_hash_table.
4794 * lto-elf.c: Removed obsolete comments.
4795 * lto.h: Tidy up comments.
4796 * lto-symtab.c (lto_least_common_multiple): New function.
4797 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4798 Tidy up comments.
4799
48002008-07-25 Diego Novillo <dnovillo@google.com>
4801 Bill Maddox <maddox@google.com>
4802
4803 * lto.c: Re-order include files.
4804 Include lto-section-out.h.
4805 (preload_common_nodes): Add debugging output.
4806 Add new local INDEX_TABLE.
4807 Call preload_common_node.
4808 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4809
48102008-07-13 Bill Maddox <maddox@google.com>
4811
4812 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4813 unwanted scaling during pointer addition.
4814
48152008-07-11 Bill Maddox <maddox@google.com>
4816 Diego Novillo <dnovillo@google.com>
4817
4818 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4819 Make code const-correct.
4820 (lto_file_read): Fix C++ compatibility warnings.
ab20d992 4821 (lto_read_section_data): Fix C++ compatibility warnings.
d7f09764
DN
4822 (lto_get_section_data): Use CONST_CAST to avoid warning when
4823 const pointer passed to free.
4824 * lto-elf.c (lto_elf_build_section_table): Fix C++
4825 compatibility warnings.
ab20d992 4826 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
d7f09764 4827 to avoid warning assigning const pointer to d_buf field of Elf_Data.
ab20d992 4828 (lto_get_current_out_file): Fix C++ compatibility warnings.
d7f09764
DN
4829
48302008-07-11 Diego Novillo <dnovillo@google.com>
4831
4832 * Make-lang.in (lto-warn): Define.
4833
48342008-07-03 Simon Baldwin <simonb@google.com>
4835
4836 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4837 LTO_STREAM_DEBUGGING.
4838
48392008-06-27 Ollie Wild <aaw@google.com>
4840
4841 * lto-elf.c (lto-section-out.h): New include.
4842 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4843 and data members.
4844 (cached_file_attrs): New static variable.
4845 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4846 Use cached_file_attrs for checking bits.
4847 (lto_elf_build_section_table): Remove elf_file argument from
4848 lto_elf_get_shdr and lto_elf_free_shdr calls.
4849 (DEFINE_INIT_SHDR): New macro.
4850 (init_shdr32, init_shdr64): New functions defined via the
4851 DEFINE_INIT_SHDR macro.
4852 (lto_elf_begin_section_with_type): New function.
4853 (lto_elf_begin_section): New function.
4854 (lto_elf_append_data): New function.
4855 (lto_elf_end_section): New function.
4856 (DEFINE_VALIDATE_EHDR): New macro.
4857 (validate_ehdr32, validate_ehdr64): New functions defined via the
4858 DEFINE_VALIDATE_EHDR macro.
4859 (validate_file): New function.
4860 (DEFINE_INIT_EHDR): New macro.
4861 (init_ehdr32, init_ehdr64): New functions defined via the
4862 DEFINE_INIT_EHDR macro.
4863 (init_ehdr): New function.
4864 (lto_elf_file_open): Add support for writable files. Move some
4865 validation logic to validate_file.
4866 (lto_elf_file_close): Add support for writable files. Write file data
4867 and free data blocks.
4868 (current_out_file): New static variable.
4869 (lto_set_current_out_file): New function.
4870 (lto_get_current_out_file): New function.
4871 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4872 Add temporary initialization for testing ELF serialization.
4873 * lto.h (lto-section-out.h): New include.
4874 (struct lto_file_struct): Slight modification to comment.
4875 (lto_elf_file_open): Add writable parameter.
4876 (lto_elf_begin_section): New function declaration.
4877 (lto_elf_append_data): New function declaration.
4878 (lto_elf_end_section): New function declaration.
4879 (lto_set_current_out_file, lto_get_current_out_file): New function
4880 declarations.
4881 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4882 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4883 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4884 * Make-lang.in (LTO_H): Add lto-section-out.h.
4885
48862008-06-12 Ollie Wild <aaw@google.com>
4887
4888 * lto.h (struct lto_file_vtable_struct): Remove.
4889 (struct lto_file_struct): Remove vtable member.
4890 * lto-elf.c (lto_file_init): Remove vtable argument.
4891 (lto_elf_map_optional_lto_section): Remove.
4892 (lto_elf_unmap_section): Remove.
4893 (lto_elf_file_vtable): Remove.
4894 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4895 lto_file_init call.
4896 (lto_elf_find_section_data): Remove.
4897
48982008-06-11 Ollie Wild <aaw@google.com>
4899
4900 * lto.c (lto_file_read): Add const qualifier to data variable.
4901
49022008-06-11 Diego Novillo <dnovillo@google.com>
4903
4904 Merge from lto-streamber sub-branch.
4905
4906 2008-06-04 Ollie Wild <aaw@google.com>
4907
4908 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4909 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4910
4911 2008-05-28 Bill Maddox <maddox@google.com>
4912
4913 Replace the DWARF reader in the LTO front-end.
4914
4915 * lto.c: Include lto-tree-in.h, lto-tags.h.
4916 (enum DWARF2_class, DW_cl_constant, struct
4917 DWARF2_form_data, struct lto_context,
4918 lto_fd_init, lto_info_fd_init,
4919 lto_abbrev_fd_init, lto_info_fd_close,
4920 lto_file_init, lto_file_close,
4921 lto_file_corrupt_error, lto_abi_mismatch_error,
4922 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4923 lto_read_uleb128, lto_read_sleb128,
4924 lto_read_initial_length, lto_abbrev_read_attrs,
4925 lto_abbrev_read, lto_abbrev_read_lookup,
4926 lto_read_section_offset,
4927 lto_read_comp_unit_header, find_cu_for_offset,
4928 lto_get_file_name,
4929 lto_resolve_reference,lto_read_form,
4930 attribute_value_as_int,
4931 make_signed_host_wide_int,
4932 attribute_value_as_constant, lto_cache_hash,
4933 lto_cache_eq, lto_cache_store_DIE,
4934 lto_cache_lookup_DIE, lto_find_integral_type,
4935 lto_find_integral_type_1,
4936 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4937 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4938 lto_unsupported_attr_error, lto_get_identifier,
4939 lto_read_referenced_type_DIE,
4940 lto_read_compile_unit_DIE,
4941 lto_read_array_type_DIE,
4942 lto_read_structure_union_class_type_DIE,
4943 lto_read_enumerator_DIE,
4944 lto_read_enumeration_type_DIE,
4945 lto_read_only_for_child_DIEs,
4946 lto_read_only_for_child_DIEs,
4947 lto_read_member_DIE, lto_read_abbrev,
4948 lto_read_variable_formal_parameter_constant_DIE,
4949 lto_get_body): Removed.
4950 (preload_common_nodes): New function.
4951 (lto_read_decls): Convert for new global streamer.
4952 (lto_materialze_file_data,
4953 lto_read_subroutine_type_subprogram_die,
4954 lto_read_unspecified_parameters_DIE,
4955 lto_read_typedef_DIE,
4956 lto_read_pointer_reference_type_DIE,
4957 lto_read_subrange_type_DIE,
4958 lto_read_base_type_DIE,
4959 lto_read_const_volatile_restrict_type_DIE,
4960 lto_read_namespace_DIE,
4961 lto_read_unspecified_type_DIE, lto_read_DIE,
4962 lto_read_child_DIEs, lto_collect_child_DIEs):
4963 Removed.
4964 (lto_info_read, lto_set_cu_context): Removed.
4965 (lto_file_read): Convert for new global streamer.
4966 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4967 lto_resolve_var_ref, lto_resolve_fn_ref,
4968 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4969 lto_resolve_namespacedecl_ref): Removed.
4970 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4971 * lto-tree.h (lto_symtab_merge_var,
4972 lto_symtab_mergee_fun): Declare here.
4973 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4974 (lto_elf_file_open): Removed code to read DWARF debug sections.
4975 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4976 DWARF2_CompUnit, lto_die_ptr,
4977 lto_die_cache_entry, lto_fd, lto_info_fd,
4978 lto_abbrev_fd): Removed.
4979 (lto_file): Removed debug_info and debug_abbrev fields.
4980 (lto_ref): Removed.
4981 (lto_file_init, lto_file_close,
4982 lto_resolve_type_ref, lto_resolve_var_ref,
4983 lto_resolve_fn_ref, lto_resolve_field_ref,
4984 lto_resolve_typedecl_ref,
4985 lto_resolve_namespacedecl_ref,
4986 lto_get_file_name): Removed declarations.
4987 (lto_symtab_merge_var, lto_symtab_merge_fn):
4988 Declarations moved to lto-tree.h.
4989 * lto-symtab.c (lto_compatible_attributes_p):
4990 Lobotomize this, as it barfs on "Hello, world!".
4991 * lto-section-out.c: Include lto-tree-out.h.
4992 (lto_hash_global_slot_node,
4993 lto_eq_global_slot_node, preload_common_nodes,
4994 write_global_stream, write_global_references):
4995 New functions.
4996 (produce_asm_for_decls): Convert for new global streamer.
4997 * lto-section-out.h (lto_hash_global_slot_node,
4998 lto_eq_global_slot_node): Declare.
4999
3f8257db 50002008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5001 Jan Hubicka <jh@suse.cz>
ab20d992 5002
d7f09764
DN
5003 * lto.c (sys/mman.h, tree-pass.h): New includes.
5004 (lto_materialize_constructors_and_inits,
5005 lto_materialize_function): Keeps length of section.
5006 (lto_materialize_cgraph): Removed.
5007 (lto_read_decls): Initialize fd field.
5008 (lto_file_read): Different return type and removed much code to
5009 lto_main.
5010 (page_mask): New variable.
5011 (lto_read_section_data, get_section_data, free_section_data): New
5012 functions.
5013 (lto_main): Now calls pass manager, sets the hooks so that the ipa
ab20d992
JJ
5014 passes can get the section data.
5015
3f8257db 50162008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5017
5018 * lto.h (lto_read_decls): Made local.
ab20d992 5019 (lto_input_function_body, lto_input_constructors_and_inits,
d7f09764
DN
5020 lto_input_cgraph): Declarations moved to lto-section-in.h.
5021 * lto-section-in.c: Moved to .. .
5022 * lto-cgraph-in.c: Ditto.
5023 * lto-section-in.h: Ditto.
5024 * lto-function-in.c: Ditto.
5025 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
5026 (lto_insert_block): Removed.
5027 (LANG_HOOKS_INSERT_BLOCK): Removed.
5028 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
5029 lto-section-in.o): Rules moved to lto/Makefile.in.
ab20d992 5030
d7f09764
DN
5031
50322008-05-16 Ollie Wild <aaw@google.com>
5033
5034 * lto-lang.c (tree-inline.h): Include.
5035 (lto_post_options): New function.
5036 (LANG_HOOKS_POST_OPTIONS): Define.
5037 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
5038 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
5039
50402008-05-13 Diego Novillo <dnovillo@google.com>
5041
5042 * lto-function-in.c (input_ssa_names): Call
5043 make_ssa_name_fn instead of make_ssa_name.
5044
50452008-05-12 Diego Novillo <dnovillo@google.com>
5046
5047 * lto-cgraph-in.c (overwrite_node): Update references to
5048 inline summary fields.
5049 * lto-function-in.c (input_expr_operand): Do not handle
5050 STRUCT_FIELD_TAG.
5051
50522008-05-09 Ollie Wild <aaw@google.com>
5053
5054 * lang.opt: New file.
5055 * lto-lang.c (lto_init_options): New function.
5056 (lto_handle_option): New function.
5057 (lto_init): Move initialization of flag_unit_at_a_time to
5058 lto_init_options.
5059 (LANG_HOOKS_INIT_OPTIONS): Define.
5060 (LANG_HOOKS_HANDLE_OPTION): Define.
5061
50622008-04-29 Ollie Wild <aaw@google.com>
5063
5064 * lto.c (lto_read_namespace_DIE): New function.
5065 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
5066 NAMESPACE_DECL DIE's.
5067 (lto_resolve_namespacedecl_ref): New function.
5068 * lto.h (lto_resolve_namespacedecl_ref): New function.
5069 * lto-section-in.c (lto_read_decls): Read namespace declarations.
5070 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
5071 and num_namespace_decls.
5072 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
5073 * lto-lang.c (lto_init_ts): New function.
5074 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
5075
50762008-04-16 Ollie Wild <aaw@google.com>
5077
5078 * lto-function-in.c (input_type_ref): Updated function description.
5079
50802008-04-16 Ollie Wild <aaw@google.com>
5081
5082 * lto-function-in.c (input_type_ref_1): New function.
5083 (input_type_ref): Split into two functions.
5084 (input_function): Add support for type contexts.
5085
50862008-04-16 Ollie Wild <aaw@google.com>
5087
5088 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
5089 section name
5090
50912008-04-16 Ollie Wild <aaw@google.com>
5092
5093 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
5094 list of supported languages.
5095
3f8257db 50962008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5097
5098 Merge with mainline @133491.
5099
3f8257db 51002008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5101 Jan Hubicka <jh@suse.cz>
5102
5103 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
5104 fd->unmaterialized_fndecls.
5105 (lto_get_file_name, lto_materialize_cgraph): New function.
5106 (lto_materialize_constructors_and_inits,
5107 lto_materialize_function): Read info directly from elf file.
5108 (lto_file_read): Made local and initialize dictionary so that
5109 other lto sections can be read without reprocessing the elf file.
5110 (lto_main): Read all functions after all files have been processed
ab20d992 5111 for their types, globals and cgraph.
d7f09764
DN
5112 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5113 dependencies.
5114 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5115 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5116 (lto_elf_read_symtab): Removed function.
5117 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5118 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5119 (lto_file_read): Made local.
5120 (lto_get_file_name, lto_elf_build_section_table,
ab20d992 5121 lto_input_cgraph):
d7f09764
DN
5122 New function.
5123 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5124 New functions.
5125 (lto_read_decls): Get the file name.
5126 * lto-cgraph-in.c: New file.
5127 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5128 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5129 (input_labels): Fixed latent sizeof issue.
5130 (input_function): Build stmt array to set call sites into cgraph
5131 edges.
5132 (lto_read_body): Reset cfun->curr_properties.
5133 * lto_section_in.h (lto_section_slot): New structure.
5134 (section_hash_table.lto_file_decl_data): New field.
5135
3f8257db 51362008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5137
5138 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5139 reconstruct static initializers.
5140 (lto_get_body, lto_materialize_function): Add lto_section_type as
5141 a parameter.
5142 (lto_materialize_constructors_and_inits,
5143 lto_materialize_file_data): New function.
5144 (lto_materialize_function,
5145 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5146 unmap_section and map_fn_body to map_section.
5147 (lto_set_cu_context): Process functions and static inits
5148 differently.
5149 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5150 lto/lto-section-in.o): Update dependencies.
ab20d992 5151 * lto-elf.c (lto_elf_map_optional_lto_section): Add
d7f09764
DN
5152 lto_section_type parameter.
5153 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
ab20d992 5154 * lto.h (lto_file_vtable_struct): Removed two of the fields and
d7f09764
DN
5155 renamed the other two so that there is only one map function and
5156 one unmap function and each takes a section type parameter.
5157 (lto_read_function_body): Renamed to lto_input_function_body and
5158 added file_data parameter.
5159 (lto_read_var_init): Removed.
5160 (lto_input_constructors_and_inits): New function.
5161 * lto-section-in.c (lto_read_decls): New function.
5162 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5163 var_decls, type_decls, types to lto_file_decl_data.
5164 (input_type_ref, input_expr_operand, lto_read_body): Get
5165 field_decls, fn_decls, var_decls, type_decls, types from different
5166 structure.
5167 (input_globals, input_constructor, lto_read_var_init): Removed.
5168 (input_constructors_or_inits): New function.
5169 (lto_read_function_body, lto_input_constructors_and_inits):
5170 Renamed to lto_input_function_body and takes file_data parameter.
5171 * lto-section-in.h (lto_file_decl_data): New structure.
ab20d992 5172
3f8257db 51732008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5174
5175 * lto-function-in.c (input_globals.c): Changed input type to
5176 lto_function_header.
5177 (input_bb): Removed code to deserialize the stmt number.
5178 (input_function): Renumber all stmts after they are input.
5179 (lto_read_body, lto_read_function_body, lto_read_var_init):
5180 Changed to used new header format and enum section_type.
ab20d992
JJ
5181 *lto-lang.c (success): Removed.
5182
d7f09764
DN
51832008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5184
5185 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5186 (lto_elf_free_sym): Likewise.
5187
5188 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5189 (lto_elf_build_init): Likewise.
5190
3f8257db 51912008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5192
5193 * lto-read.c: Renamed to lto-function-in.c.
5194 (input_1_unsigned): Moved to lto-section-in.c and renamed
5195 lto_input_1_unsigned.
5196 (input_uleb128): Moved to lto-section-in.c and renamed
5197 lto_input_uleb128.
5198 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5199 lto_input_widest_uint_uleb128.
5200 (input_sleb128): Moved to lto-section-in.c and renamed
5201 lto_input_sleb128.
5202 (input_integer): Moved to lto-section-in.c and renamed
5203 lto_input_integer.
5204 (debug_in_fun): Moved to lto-section-in.c and renamed
5205 lto_debug_in_fun.
5206 (input_block): Moved to lto-section-in.h and renamed
5207 lto_input_block.
5208 (input_expr_operand): Fixed to allow lists with more than one
5209 element.
5210 * lto-section-in.h: New file.
5211 * lto-section-in.c: New file with changes from above.
5212 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5213 (lto-section-in.o): New rule.
ab20d992 5214
d7f09764
DN
52152007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5216
5217 * lto-read.c (input_expr_operand): Mark static and external
5218 VAR_DECLs as needed.
5219
52202007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5221
5222 * lto-read.c (input_integer): Use the correct shift amount.
5223
52242007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5225
5226 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5227 (LANG_HOOKS_NAME): Define.
5228
52292007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5230
5231 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5232 original function to...
5233 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5234 don't have a base type.
5235 (lto_read_enumeration_type_DIE): Examine the values of the
5236 enumeration to determine whether we can use an unsigned type for
5237 the base type of the enumeration.
5238
52392007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5240
5241 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5242 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5243
52442007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5245
5246 * lto-lang.c (lto_types_compatible_p): New function.
5247 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5248
52492007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5250 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5251
5252 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5253 (input_local_vars): Read in DECL_INITIAL and context for local
5254 statics that need to be put in unexpanded_vars_list.
5255
52562007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5257
5258 * lto-read.c (input_real): Use a separate null-terminated buffer
5259 for calling real_from_string.
5260 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5261 tell cgraph that it's needed.
5262
52632007-12-19 Doug Kwan <dougkwan@google.com>
5264
5265 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5266
52672007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5268
5269 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5270 (lto_file_read): Reset the members of 'context' every time we read
5271 a toplevel DIE, with special attention to last_param_type.
5272
52732007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5274
5275 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5276 'declaration'. Set the assembler name for non-public functions.
5277
3f8257db 52782007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5279
5280 * lto_read.c (data_in.unexpanded_indexes): New array.
5281 (input_local_var): Added code to read in unexpanded_var_list
5282 indexes for variables. Only read in DECL_CHAIN field for
5283 parameters.
5284 (input_local_vars): Added code to rebuild unexpanded_var_list in
5285 order using unexpanded_indexes.
5286 (input_function): Added code to set DECL_CONTEXT for functions.
5287
52882007-12-13 Doug Kwan <dougkwan@google.com>
5289
5290 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5291 in pointer and reference types.
5292
52932007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5294
5295 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5296 RESULT_DECL.
5297
52982007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5299
5300 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5301 already read the DIE.
5302 (lto_get_body): New function, split out from...
5303 (lto_materialize_function): ...here. Call it.
5304 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5305 determine DECL_EXTERNAL.
5306 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5307 FUNCTION_DECLs when necessary. Use the type of the actual
5308 function definition if we are unable to easily merge types. Ignore
5309 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5310 necessary.
5311
53122007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5313
5314 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5315
53162007-12-12 Bill Maddox <maddox@google.com>
5317
5318 Revert
5319 2007-12-07 Bill Maddox <maddox@google.com>
5320
5321 * lto.c (lto_str_fd_init): New function.
5322 (lto_str_fd_close): New function.
5323 (lto_file_init): Call lto_str_fd_init.
5324 (lto_file_close): Call lto_str_fd_close.
5325 (lto_str_read): New function. Read debug string table.
5326 (lto_str_lookup): New function. Get string for debug
5327 string table offset.
5328 (lto_read_form): Recognize DW_FORM_strp.
5329 (lto_file_read): Invoke lto_str_read.
5330
5331 * lto-elf.c (lto_elf_file_open): Read raw section data
5332 for the .debug_str section, if present.
5333
5334 * lto.h (struct lto_str_fd_struct): New struct.
5335 (struct lto_file_struct): Added new field DEBUG_STR
5336 to hold the file descriptor for the debug string table.
ab20d992 5337
d7f09764
DN
53382007-12-07 Bill Maddox <maddox@google.com>
5339
5340 * lto.c (lto_str_fd_init): New function.
5341 (lto_str_fd_close): New function.
5342 (lto_file_init): Call lto_str_fd_init.
5343 (lto_file_close): Call lto_str_fd_close.
5344 (lto_str_read): New function. Read debug string table.
5345 (lto_str_lookup): New function. Get string for debug
5346 string table offset.
5347 (lto_read_form): Recognize DW_FORM_strp.
5348 (lto_file_read): Invoke lto_str_read.
5349
5350 * lto-elf.c (lto_elf_file_open): Read raw section data
5351 for the .debug_str section, if present.
5352
5353 * lto.h (struct lto_str_fd_struct): New struct.
5354 (struct lto_file_struct): Added new field DEBUG_STR
5355 to hold the file descriptor for the debug string table.
5356
53572007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5358
5359 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5360 Grow the basic_block_info and label_to_block_map vectors if
5361 necessary. Read in the block chain.
5362
53632007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5364
5365 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5366
53672007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5368
5369 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5370
53712007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5372
5373 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5374 (lto_read_body): Don't declare PROP_alias.
5375
53762007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5377
5378 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5379 argument type information.
5380
53812007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5382
5383 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5384 TREE_THIS_VOLATILE if the associated type is a volatile type.
5385 (lto_materialize_function): Remove call to init_ssa_operands.
5386 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5387 variable when reading an SSA_NAME. Do the same when reading a
5388 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5389 (input_cfg): Call init_ssa_operands.
5390 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5391 Move call to init_tree_ssa...
5392 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5393 add_referenced_var on any variables referenced from the body of the
5394 function. Inform the rest of the compiler we are in SSA form and
5395 inform later passes about the current properties.
5396
53972007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5398
5399 * lto.c (lto_materialize_function): Add FIXME.
5400
54012007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5402
5403 * lto-lang.c (enum built_in_attribute): New enum.
5404 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5405 built_in_attributes): New variables.
5406 (def_builtin_1): New function.
5407 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5408
54092007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5410
5411 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5412 DECL_SOURCE_LOCATION for debugging purposes.
5413 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5414 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5415 laying out the decl until later.
5416 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5417 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5418 TREE_ADDRESSABLE.
5419 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5420 operand of an ADDR_EXPR.
5421 * lto-lang.c (enum lto_builtin_type): New enum.
5422 (builtin_type): New typedef.
5423 (builtin_types, string_type_node, const_string_type_node,
5424 wint_type_node, intmax_type_node, uintmax_type_node,
5425 signed_size_type_node): New variables.
5426 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5427 lto_build_c_type_nodes): New functions.
5428 (lto_init): Initialize builtin types.
5429 (lto_set_decl_assembler_name): Let the target machine mangle the
5430 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5431
54322007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5433
5434 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5435 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5436 the type is a constant type. Set the assembler name and inform
5437 the rest of the compiler about the new decl if the decl is not
5438 public.
5439 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5440 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5441 try to read in function bodies for functions that already have bodies.
5442 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5443 equivalency.
5444 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5445 Check for whether we matched a builtin function type before calling
5446 lto_same_type_p on the generated type. Permit cases where the
5447 declaration of an array is unbounded, but the definition is bounded.
5448 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5449 DECL_SIZE_UNIT if necessary.
5450
3f8257db 54512007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5452
ab20d992 5453 * lto-read.c (input_expr_operand): Get types right
d7f09764
DN
5454 for COMPLEX_CST.
5455
3f8257db 54562007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5457
5458 * lto-read.c (make_new_block, input_cfg): Properly set
5459 n_basic_blocks.
ab20d992 5460
d7f09764
DN
54612007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5462
5463 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5464 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5465
54662007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5467
5468 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5469 construct the integer type for bitfields.
5470
3f8257db 54712007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5472
5473 * lto-read.c (data_in.current_node_has_loc): Removed.
5474 (input_line_info): Returns true if node needs line set.
5475 (set_line_info): Always sets line if called.
5476 (clear_line_info): Removed reference to current_node_needs_loc.
5477 (input_expr_operand): Keeps track locally if current node needs a loc.
5478 (input_local_var): Added code to handle DECL_INITIAL for
5479 static local vars. Only set loc if necessary.
ab20d992 5480
d7f09764
DN
54812007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5482
5483 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5484 DECL_CONTEXT.
5485
54862007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5487
5488 * lto.c: Include langhooks.h.
5489 (lto_find_integral_type): Rework logic to handle the case where
5490 got_byte_size is true, but the bitsize requested and that of the
5491 base_type doesn't match.
5492 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5493 asm_name if we are creating a VAR_DECL.
5494 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5495 definition.
5496 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5497 function reference and use the builtin's decl if so. Set the
5498 DECL_CONTEXT of the RESULT_DECL for the function.
5499 * lto-lang.c (registered_builtin_fndecls): New variable.
5500 (lto_getdecls): Return it.
5501 (lto_builtin_function): Chain the new decl onto
5502 registered_builtin_fndecls.
5503
3f8257db 55042007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
ab20d992 5505
d7f09764
DN
5506 * lto-read.c (process_tree_flags, lto_static_init_local):
5507 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5508 (input_line_info, clear_line_info): Fixed new line number code.
5509 (input_expr_operand): Added type to SWITCH_EXPR.
5510 (lto_read_body): Properly initialized data_in.
5511 Clear line info when leaving.
ab20d992 5512
d7f09764
DN
55132007-11-13 Diego Novillo <dnovillo@google.com>
5514
5515 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5516 Initialize ARTIFICIAL.
5517 (lto_read_subroutine_type_subprogram_DIE): Initialize
5518 SAVED_SCOPE.
5519 * lto-read.c (set_line_info): Remove ; from calls to
5520 LINEMAP_POSITION_FOR_COLUMN.
5521
3f8257db 55222007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5523
5524 * lto-read.c (input_type_ref): Renamed from get_type_ref.
ab20d992 5525 (input_expr_operand, input_local_var): Renamed get_type_ref to
d7f09764 5526 input_type_ref.
ab20d992 5527 (input_expr_operand): Get the types correct for
d7f09764 5528 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
ab20d992 5529
d7f09764
DN
55302007-11-13 Doug Kwan <dougkwan@google.com>
5531
5532 * lto-read.c (input_widest_uint_uleb128): New function.
5533 (input_tree_flags, process_tree_flags, input_line_info,
5534 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5535 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5536 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5537 (lto_static_init_local): Add code to assert that lto_flags_type is
5538 wide enough.
5539
55402007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5541
5542 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5543 (lto_read_subroutine_type_subprogram_DIE): Handle
5544 DW_AT_static_link and DW_AT_specification. Return the
5545 specification if present.
5546 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
ab20d992 5547
d7f09764
DN
55482007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5549
5550 * lto-lang.c: Include target.h.
5551 (registered_builtin_types): New variable.
5552 (lto_type_for_mode): Increase number of modes handled.
5553 (lto_builtin_function): Fix argument list and return the decl.
5554 (lto_register_builtin_type): New function.
5555 (lto_init): Initialize target builtins and language-independent
5556 nodes.
5557 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5558
3f8257db 55592007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5560
5561 * lto-read.c (input_expr_operand): Added code to properly handle
5562 index filed. Added new RANGE_EXPR case.
ab20d992 5563
3f8257db 55642007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5565
5566 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5567 (data_in): Added current_node_has_loc field.
5568 (input_line_info, set_line_info, clear_line_info): Added a support
5569 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5570 did not have on on the source side.
5571 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5572 numbers too.
5573
55742007-11-09 Doug Kwan <dougkwan@google.com>
5575
5576 * lto-read.c (input_expr_operand): Change type of operand 2 of
5577 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5578
55792007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5580
5581 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5582 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5583 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5584 the new decl we are creating. Move informing the middle end about
5585 the new decl to...
5586 (lto_main): ...here. Inform the middle end about global variables
5587 after we have read in all the input files.
5588 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5589 variables with internal linkage, so delete the check for internal
5590 linkage. Combine TREE_PUBLIC flags.
5591
55922007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5593
5594 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5595 DW_AT_decl_line.
5596 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5597 builtin specially. Move check for attribute compatibility
5598 earlier.
5599
56002007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5601
5602 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5603 * config-lang.in (gtfiles): Add lto.h and lto.c.
5604 * lto-elf.c: Include ggc.h.
5605 (lto_elf_file_open): Allocate elf_file from GC memory.
5606 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5607 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5608 in GC memory.
5609 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5610 (lto_file_close): Free file from GC memory.
5611 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5612 (lto_read_member_DIE): Fix declaration.
5613 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5614 in GC memory.
5615 (current_lto_file): New variable.
5616 (lto_main): Use it.
5617 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5618 lto_die_cache_entry): Move to...
5619 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5620 declarations accordingly.
5621 (struct lto_file_struct): Declare.
5622 (lto_file_vtable): Use it instead of lto_file.
5623
ab20d992
JJ
56242007-11-06 Alon Dayan <alond@il.ibm.com>
5625 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5626
5627 * lto-read.c (process_flags, lto_static_init_local):
5628 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5629 change global array num_flags_for_code to flags_length_for_code.
5630 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
ab20d992 5631
d7f09764
DN
56322007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5633
5634 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5635 layout functions to compute information about the newly constructed
5636 type.
5637
56382007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5639
5640 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5641 case to use DECL_RESULT if necessary.
5642
3f8257db 56432007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5644
5645 * lto-read.c (input_tree_list): Removed.
5646 (input_tree_flags): Added parameter to force flags no matter what
5647 tree code.
5648 (input_expr_operand): Added parameter to input_tree_flags.
5649 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5650 input_expr_operand rather than input_tree_lists.
5651 (input_local_var): Use input_expr_operand to read attributes
5652 rather then input_tree_list.
5653 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5654
56552007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5656
5657 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5658 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5659 TYPE_DECL for it.
5660 * lto-read.c (lto_read_body): Use correct sizes for calculating
5661 type_decls_offset and types_offset.
5662
56632007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5664
5665 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5666 with GENERIC_NEXT.
5667 * config-lang.in (gtfiles): Add lto-lang.c.
5668 * lto-lang.c: Include gt-lto-lto-lang.h.
5669 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5670 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5671 (lto/lto-read.o): Likewise.
5672
3f8257db 56732007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5674
5675 * lto-read.c (data_in): Added type_decls and current_col fields.
5676 (string_slot): New type to hold canonized file name.
ab20d992 5677 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
d7f09764
DN
5678 input_line_info, set_line_info, clear_line_info): New functions.
5679 (file_name_hash_table): New hash table.
ab20d992 5680 (input_local_var, input_labels, input_local_vars_index,
d7f09764
DN
5681 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5682 (input_uleb128): Changed type of byte var.
5683 (input_expr_operand): Large number of changes to get line numbers
5684 correct. Added TYPE_DECL case.
5685 (input_globals): Added code to get TYPE_DECLs processed.
5686 (input_local_var): Added code to process line numbers and
5687 TREE_CHAIN and DECL_CONTEXT.
5688 (input_function, input_constructor): Added call to
5689 clear_line_number.
5690 (lto_static_init_local): Added code to get line numbers correct.
5691 (lto_read_body): Added code to get TYPE_DECLS read and to change
5692 parameters to the calls above that had their parms reorganized.
5693
d7f09764
DN
56942007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5695
5696 * lto.h (lto_resolve_typedecl_ref): Declare.
5697 * lto.c (lto_resolve_typedecl_ref): New function.
5698
56992007-10-29 Mark Mitchell <mark@codesourcery.com>
5700 Nathan Froyd <froydnj@codesourcery.com>
5701
5702 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5703 DIEs even if we find an abstract origin for this DIE.
5704
57052007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5706
5707 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5708 RESULT_DECL slightly earlier. Only remember the decl for later
5709 if we successfully merge declarations.
5710
3f8257db 57112007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5712
5713 * lto-read.c (input_expr_operand): Give label_values the proper
5714 context and provide switch statements with a default type.
ab20d992 5715
d7f09764
DN
57162007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5717
5718 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5719 * lto.c (lto_materialize_function): ...to here.
5720
57212007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5722
5723 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5724 * lto.c (lto_info_fd_init): Initialize it.
5725 (lto_info_fd_close): Free it.
5726 (lto_materialize_function): New function.
5727 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5728 unmaterialized_fndecls.
5729 (lto_file_read): Read in all the function bodies after we have read
5730 all of the DWARF info.
5731 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5732 reading a function body.
5733
3f8257db 57342007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5735
5736 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5737 semetric with output_tree_flags. Added call to log flags.
5738 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5739 type issues to make everything consistent with flags being
5740 unsigned HOST_WIDE_INTS.
5741 (input_expr_operand): Added call to
5742 recompute_tree_invariant_for_addr_expr.
5743 (input_local_var): Added debugging for tree_chains. Now calls
5744 input_tree_flags.
5745 (input_phi): Made flags unsigned HOST_WIDE_INT.
5746 (input_ssa_names): Now calls input_tree_flags.
5747 (lto_read_body): Now sets cfun.
5748 (lto_read_function_body): Now sets current_function_pointer.
ab20d992 5749
d7f09764
DN
57502007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5751
5752 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5753 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5754 inspecting fields within.
5755 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5756 handle this appropriately.
5757
57582007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5759
5760 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5761 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5762 both DW_AT_abstract_origin and DW_AT_specification.
5763 (lto_read_subroutine_type_subprogram_DIE): Handle
5764 DW_AT_abstract_origin.
5765 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5766 (lto_read_DIE_at_ptr): Define as static to match declaration.
5767 Lookup the PTR in the cache before reading it from the file.
5768 (lto_resolve_var_ref): Adjust accordingly.
5769 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5770 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5771
57722007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5773
5774 * lto.c (lto_read_DIE_at_ptr): New function.
5775 (lto_resolve_var_ref): Use it.
5776 (lto_resolve_fn_ref): Use it.
5777 (lto_resolve_field_ref): Use it.
5778 (lto_read_variable_formal_parameter_constant_DIE): Follow
5779 DW_AT_specification and return the associated decl when appropriate.
5780
57812007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5782
5783 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5784 Implement for scalar integer modes.
5785 (lto_init): Initialize size_type_node.
5786
3f8257db 57872007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5788
5789 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5790 (input_local_var): Add chaining for params.
5791 (input_ssa_names): Add cfun parameter.
5792 (input_function): Remove unnecessary else.
5793
57942007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5795
5796 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5797 (lto_resolve_var_ref): Use proper types.
5798 (lto_resolve_fn_ref): Likewise.
5799 (lto_resolve_field_ref): Likewise.
5800
58012007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5802
5803 * lto-read.c (input_expr_operand): Remove case.
5804
58052007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5806
5807 * lto.c (lto_read_only_for_child_DIEs): New function.
5808 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5809 * lto-elf.c (lto_elf_map_lto_section): Remove.
5810 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5811 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5812 SSA_NAME. Add missing case for mechanical codes.
5813 (input_cfg): Use basic_block_info_for_function instead of
5814 basic_block_info.
5815
3f8257db 58162007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5817
5818 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5819 (input_list): Renamed input_tree_list and modified to follow same
5820 protocol as lto-function-out.c:output_tree_list.
5821 (input_expr_operand): Make asm operands use input_tree_list.
5822 (input_local_var): Now uses input_tree_list.
5823 (lto_read_body): Change placement for setting context of debug_labels.
ab20d992 5824
3f8257db 58252007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5826
5827 * lto-read.c (input_real): Output debugging in proper order.
5828 (input_integer): Compute bit lengths properly.
5829 (input_list): Clean up declaration.
5830 (input_expr_operand): Change calls to input_real to match fix.
5831 Make reading of LTO_bit_field_ref1 match output.
5832 (input_local_var): Make reading of attributes match what is being
5833 written.
5834 (dump_debug_stream): Also print char in hex.
5835 (debug_out_fun): Fix signed unsigned mismatch.
ab20d992 5836
d7f09764
DN
58372007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5838
5839 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5840 DW_AT_GNU_vector specially, as they are not contiguous with the
5841 specified set of attribute names. Use class_mask to check for
5842 errors at the end of the function
5843 (lto_resolve_var_ref): Read the DIE if it is not cached.
5844 (lto_resolve_fn_ref): Likewise.
5845 (lto_resolve_field_ref): Likewise.
5846
58472007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5848
5849 * lto.c: Include dwarf2out.h.
5850 (lto_cache_store_DIE): Assert that we never change the value.
5851 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5852 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5853 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5854 sensible type instead.
5855 (lto_read_structure_union_class_type_DIE): Store the newly
5856 created type prior to reading the members of the structure to
5857 avoid infinite recursion. Avoid computing types and alignments
5858 for structures whose sizes are unknown.
5859 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5860 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5861 DW_AT_const_value, and DW_AT_specification.
5862 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5863 Return early if we have already constructed the function type.
5864 (lto_read_typedef_DIE): Check to see if the type has been cached
5865 already. Cache the type before reading any children.
5866 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5867 (lto_read_DIE): Unset context->skip_non_parameters around reading
5868 the DIE.
5869 (lto_resolve_fn_ref): Delete trailing whitespace.
5870
3f8257db 58712007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5872
5873 * lto-read.c (input_expr_operand): Added type for STRING_CST.
ab20d992 5874
d7f09764
DN
58752007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5876
5877 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5878
58792007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5880
5881 * lto-lang.c (signed_and_unsigned_types): New variable.
5882 (lto_type_for_size): Consult signed_and_unsigned_types to find
5883 an approprite type, creating it if necessary.
5884 (lto_set_decl_assembler_name): Add actual method body.
5885
58862007-09-06 Jim Blandy <jimb@codesourcery.com>
5887
5888 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5889 can't find a var init for this variable, leave its DECL_INITIAL.
5890 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5891 lto_elf_map_fn_body.
5892 (lto_map_lto_section): New function.
5893 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5894 bodies, and lto_elf_map_optional_lto_section for variable
5895 initializers.
5896 (lto_elf_find_section_data): Quietly return NULL if the section is
5897 missing.
5898 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5899
5900 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5901
5902 * lto-read.c (lto_read_body): Doc fix.
5903
3f8257db 59042007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5905
5906 * lto-read.c (fun_in): Renamed to data_in.
5907 (input_expr_operand, input_local_var, input_string_internal,
ab20d992 5908 input_string, input_real, input_list, get_label_decl,
d7f09764 5909 get_type_ref, input_expr_operand, input_globals, input_labels,
ab20d992 5910 input_local_vars_index, input_local_var, input_local_vars,
d7f09764
DN
5911 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5912 (input_constructor): New function.
5913 (lto_read_function_body): Renamed to lto_read_body and generalized
5914 to handle both functions and constructors.
5915 (lto_read_function_body, lto_read_var_init): New function.
ab20d992 5916
3f8257db 59172007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5918
5919 * lto-read.c (input_expr_operand): Assert that there really is a
5920 FUNCTION_DECL.
5921 (input_globals): Removed checks on 0 section.
ab20d992 5922
3f8257db 59232007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5924
5925 * lto-read.c (fun_in): Added local_decls_index and
ab20d992 5926 local_decls_index_d.
d7f09764
DN
5927 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5928 (input_globals): Enabled code to handle FIELD_DECLs.
5929 (input_local_vars_index, input_local_vars): New function.
5930 (input_local_var): Changed to allow locals to be input randomly.
5931 (lto_read_function_body): Added code to input the
5932 local_decls_index and to free various structures.
ab20d992 5933
d7f09764
DN
59342007-08-17 Jim Blandy <jimb@codesourcery.com>
5935
5936 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5937 ATTRIBUTE_UNUSED from 'die' formal.
5938
5939 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5940 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5941 (input_list): Fix type of 'tag'.
5942 (input_expr_operand): Fix type of 'tag' argument. Update
5943 declaration. Fix type of 'ctag'. Add default case to switch,
5944 since the type of the switched value is now an enum.
5945 (input_local_vars): Fix type of 'tag'.
5946 (input_bb): Fix type of 'tag' argument.
5947 (input_function): Fix type of 'tag' argument.
5948
59492007-08-16 Jim Blandy <jimb@codesourcery.com>
5950
5951 * lto.c (lto_read_member_DIE): Record the tree we create in
5952 fd->die_cache. (Our 'die' argument is no longer unused.)
5953 (lto_resolve_field_ref): New function.
5954 * lto.h (lto_resolve_field_ref): New declaration.
5955
59562007-08-15 Jim Blandy <jimb@codesourcery.com>
5957
5958 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5959
59602007-08-07 Jim Blandy <jimb@codesourcery.com>
5961
5962 * lto.c (lto_read_form): Complete attr_classes table.
5963 (DWARF2_form_data): Doc fix.
ab20d992 5964
d7f09764
DN
59652007-08-05 Mark Mitchell <mark@codesourcery.com>
5966
5967 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5968 and unmap_var_init.
5969 (lto_read_var_init): Declare.
5970 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5971 interface for reading variable initializers.
5972 * lto-elf.c (lto_elf_read_var_init): Remove.
5973 (lto_elf_file_vtable): Update initializer.
5974 (lto_elf_read_var_init): Add comment about unused-ness.
5975 * lto-read.c (lto_read_var_init): New.
5976
5977 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5978
3f8257db 59792007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5980
5981 * lto-read.c (lto_read_function_body): Moved declaration of fn
5982 outside of ifdef.
ab20d992 5983
3f8257db 59842007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5985
5986 * lto-read.c (input_uleb128, input_string_internal, input_real,
5987 input_integer, input_record_start, input_list, get_type_ref,
5988 input_flags, input_expr_operand, input_expr_operand,
5989 input_expr_operand, input_local_vars, input_cfg, input_phi,
5990 input_ssa_names, input_bb, input_function): Added semicolons.
5991
ab20d992 5992
3f8257db 59932007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5994
5995 * lto-read.c (input_globals): Remove debugging.
5996 (input_function): Set DECL_ARGUMENTS.
5997
3f8257db 59982007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5999
6000 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
6001 RETURN_EXPR, MODIFY_EXPR and processing of flags.
6002 (input_phi): Made work with operands other than SSA_NAMES and
6003 fixed processing of flags.
6004 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
6005 (input_flags): New function.
6006 * lto-lang.c (lto_init): Changed state of in_lto_p.
ab20d992
JJ
6007
6008
d7f09764
DN
60092007-07-24 Mark Mitchell <mark@codesourcery.com>
6010
6011 * lto-tree.h (lto_varargs_cookie): Remove.
6012 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
6013 skip_non_parameters, skip_parameters.
6014 (lto_varargs_cookie): Remove.
6015 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
6016 parameter types.
6017 (lto_read_abbrev): New function.
6018 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
6019 child DIEs.
6020 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
6021 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
6022 (lto_file_read): Initialize new context fields.
6023 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
6024 (lto_unsigned_type): Remove.
6025 (lto_signed_type): Likewise.
6026 (lto_signed_or_unsigned_type): Likewise.
6027 (lto_init): Do not create lto_varargs_cookie.
6028 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
6029 (LANG_HOOKS_SIGNED_TYPE): Likewise.
6030 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
6031
60322007-07-19 Jan Hubicka <jh@suse.cz>
6033
6034 * lto-read.c (lto_read_function_body): Produce empty scope block
6035 to avoid crash.
6036
60372007-07-18 Mark Mitchell <mark@codesourcery.com>
6038
6039 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
6040 process local variables.
6041 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
6042
3f8257db 60432007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6044
6045 * lto-read.c (input_list, input_expr_operand): Added struct
6046 function parameter.
6047 (init_cfg, finalize_cfg): Removed function.
6048 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
6049 (input_labels, input_local_vars): Now takes input_block parameter rather than
6050 synthsyzing it.
6051 (input_cfg, input_phi, input_ssa_names): New functions.
6052 (input_bb): Now passes in input_blocks. Does not construct cfg
6053 and processes the list of phi functions.
6054 (input_function): Now builds both the cfg and ssa_names table.
6055 (lto_read_function_body): Processes new header fields to construct
6056 streams for the ssa_names and cfg and their debugging.
ab20d992
JJ
6057 * lto-lang.c (lto_init): Set in_lto_p.
6058
6059
d7f09764
DN
60602007-06-28 Mark Mitchell <mark@codesourcery.com>
6061
6062 * lto.h (lto_file_vtable): Add read_var_init.
6063 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
6064 initializers.
6065 (lto_main): Remove bogus asserts.
6066 * lto-elf.c (tm.h): Include it.
6067 (libiberty.y): Likewise.
6068 (lto_elf_file): Add strtab and symtab. Rename
6069 string_table_section_index to sec_strtab.
6070 (lto_elf_file_vtable): Add lto_elf_read_var_init.
6071 (lto_elf_get_shdr): New function.
6072 (lto_elf_free_shdr): Likewise.
6073 (lto_elf_find_section_data): Use them.
6074 (lto_elf_read_symtab): New function.
6075 (lto_elf_lookup_sym): Likewise.
6076 (lto_elf_free_sym): Likewise.
6077 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
6078 (lto_elf_built_init): New function.
6079 (lto_elf_read_var_init): Likewise.
6080 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
6081
3f8257db 60822007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6083
6084 * lto-read (make_new_block): Initialize the stmt_list.
6085 (lto_static_init_local): Add debugging for missing codes.
ab20d992 6086
d7f09764
DN
60872007-06-26 Mark Mitchell <mark@codesourcery.com>
6088
6089 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
ab20d992 6090 unprototyped functions.
d7f09764
DN
6091
60922007-06-23 Mark Mitchell <mark@codesourcery.com>
6093
6094 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
6095 Handle DW_AT_MIPS_linkage_name.
6096 (lto_read_subroutine_type_subprogram): Likewise. Correct
6097 compilation errors.
6098 (lto_main): Remove incorrect assertions.
6099 * lto-symbtab.c: Build function types out of TREE_LISTs.
6100
6101 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
ab20d992 6102
d7f09764 6103 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
ab20d992 6104
3f8257db 61052007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6106
ab20d992 6107 * lto-tree.h (lang_decl, lang_type, language_function): Added
d7f09764 6108 dummy since ggc does not like empty structs.
ab20d992
JJ
6109 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6110 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
d7f09764
DN
6111 expr->common to expr->base.
6112 (make_new_block): Moved stmt_list to proper place.
6113
ab20d992 61142007-03-14 Robert Kennedy <jimbob@google.com>
d7f09764
DN
6115
6116 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6117 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6118 assembler name from DWARF.
6119 * lto-lang.c (lto_set_decl_assembler_name) New function.
6120
61212006-09-10 Mark Mitchell <mark@codesourcery.com>
6122
6123 * lto.h (lto_file_vtable): New structure.
6124 (lto_file): Add vtable pointer.
6125 (lto_file_init): Add vtable paramter.
6126 (lto_read_function_body): New function.
6127 (lto_symtab_merge_fn): New function.
6128 * lto.c (lto_file_init): Add vtable parameter.
6129 (lto_read_form): Fill in entries for DW_AT_prototyped,
6130 DW_AT_frame_base.
6131 (lto_read_subroutine_type_subprogram_DIE): New function.
6132 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6133 DW_TAG_subprogram.
6134 * lto-elf.c (lto_elf_vile_vtable): New variable.
6135 (lto_elf_file_open): Pass it to lto_file_init.
6136 (lto_elf_map_fn_body): New function.
6137 (lto_elf_unmap_fn_body): Likewise.
6138 * lto-read.c: New file.
6139 * lto-symtab.c (lto_symtab_merge_fn): New function.
6140 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6141 tree_rest_of_compilation.
6142 * Make-lang.in (LTO_OBJS): Add lto-read.o
6143 (lto-read.o): New target.
6144
61452006-09-03 Mark Mitchell <mark@codesourcery.com>
6146
6147 * lto.c (<inttypes.h>): Don't include it.
6148 (lto_context): Don't typedef it.
6149 (lto_resolve_reference): New function.
6150 (lto_read_form): Use it.
6151 (lto_resolve_type_ref): New function.
6152 (lto_resolve_var_ref): Likewise.
6153 (lto_resolve_fn_ref): Likewise.
6154 * lto.h (<inttypes.h>): Include it.
6155 (lto_context): New type.
6156 (lto_ref): New structure.
6157 (lto_resolve_type_ref): Declare.
6158 (lto_resolve_var_ref): Likewise.
6159 (lto_resolve_fn_ref): Likewise.
6160
61612006-08-18 Mark Mitchell <mark@codesourcery.com>
6162
6163 * lang-specs.h: New file.
6164
61652006-08-14 Mark Mitchell <mark@codesourcery.com>
6166
6167 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6168 (lto_info_fd_close): Deallocate it.
6169 (lto_die_cache_entry): New structure.
6170 (lto_cache_hash): New function.
6171 (lto_cache_eq): Likewise.
6172 (lto_cache_store_DIE): Likewise.
6173 (lto_cache_lookup_DIE): Likewise.
6174 (lto_read_referenced_type_DIE): Use the cache.
6175 (lto_read_pointer_type_DIE): Robustify.
6176 (lto_read_DIE): Use the cache.
6177 * lto.h (hashtab.h): Include.
6178 (lto_info_fd): Add DIE cache.
6179 * Make-lang.in (LTO_H): New variable.
6180 (lto/lto-lang.o): Use LTO_H.
6181 (lto/lto-elf.o): Likewise.
6182 (lto/lto-symtab.o): Likewise.
6183
61842006-07-09 Mark Mitchell <mark@codesourcery.com>
6185
6186 * lto.c (lto_abi_mismatch_error): New function.
6187 (lto_abbrev_read): Initialize num_abbrevs.
6188 (lto_read_form): Specify allowed form classes for
6189 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6190 (lto_read_variable_formal_parameter_constant_DIE): Handle
6191 DW_AT_declaration. Call lto_symtab_merge_var.
6192 (lto_read_pointer_type_DIE): New function.
6193 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6194 not creat TYPE_DECLs for types that already have them.
6195 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6196 (lto_set_cu_context): Make cu_start point to the header, not the
6197 first DIE.
6198 (lto_file_read): Adjust for change to lto_set_cu_context.
6199 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6200 (lto/lto-symtab.o): New rule.
6201 * lto-tree.h (lang_identifier): Add decl field.
6202 (LANG_IDENTIFIER_CAST): New macro.
6203 (LTO_IDENTIFIER_DECL): Likewise.
6204 (lto_symtab_merge_var): Declare.
6205 * lto-symtab.c: New file.
6206
62072006-07-02 Daniel Berlin <dberlin@dberlin.org>
6208
6209 * lto.c (lto_context): Add current_cu and info_fd members.
6210 (DWARF2_CompUnit): New structure.
6211 (lto_read_DIE): Take lto_info_fd *.
6212 (lto_read_child_DIEs): Ditto.
6213 (lto_file_corrupt_error): Constify argument.
6214 (lto_set_cu_context): New function
6215 (lto_info_fd_init): Ditto.
6216 (lto_info_fd_close): Ditto.
6217 (lto_file_init): Use lto_info_fd_init.
6218 (lto_file_close): Use lto_info_fd_close.
6219 (lto_read_initial_length): Pass in pointer to header size.
6220 (lto_read_comp_unit_header): Correct cu_length to
6221 real length from beginning of header. Take lto_info_fd * as
6222 argument.
6223 (find_cu_for_offset): New function.
6224 (lto_read_form): Change first argument to lto_info_fd *.
6225 Add FORM_CONTEXT argument.
6226 Handle DW_FORM_ref_addr.
ab20d992 6227 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
d7f09764
DN
6228 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6229 Swap contexts if necessary for form.
6230 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6231 lto_file_corrupt_error.
6232 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6233 (lto_read_referenced_type_DIE): Change first argument to
6234 lto_info_fd *. Access lto_fd fields through base pointer.
6235 (lto_read_compile_unit_DIE): Change first argument to an
6236 lto_info_fd *.
6237 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6238 (lto_read_base_type_DIE): Ditto.
6239 (lto_read_child_DIEs): Ditto.
6240 (lto_read_DIE): Ditto. Change type of function pointer.
6241 (lto_info_read): New function.
6242 (lto_set_cu_context): Ditto.
6243 (lto_file_read): Use lto_info_read, walk resulting CU's
6244 (lto_main): Update for lto_info_fd change.
6245 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6246 necessary.
6247 * lto.h (DWARF2_CompUnit): New structure.
6248 (lto_info_fd): Ditto.
6249 (lto_file): Change debug_info to be an lto_info_fd.
ab20d992 6250
d7f09764
DN
62512006-06-25 Mark Mitchell <mark@codesourcery.com>
6252
6253 * lto.c (toplev.h): Include it.
6254 (dwarf2.h): Likewise.
6255 (tree.h): Likewise.
6256 (tm.h): Likewise.
6257 (cgraph.h): Likewise.
6258 (ggc.h): Likewise.
6259 (inttypes.h): Likewise.
6260 (DWARF2_attr): New type.
6261 (DWARF2_abbrev): Likewise.
6262 (DWARF2_class): Likewise.
6263 (DWARF2_form_data): Likewise.
6264 (lto_context): Likewise.
6265 (lto_fd_init): New function.
6266 (lto_abbrev_fd_init): Likewise.
6267 (lto_abbrev_fd_close): Likewise.
6268 (lto_file_init): Use them.
6269 (lto_file_close): New function.
6270 (lto_file_corrupt_error): Likewise.
6271 (LTO_CHECK_INT_VAL): New macro.
6272 (lto_check_size_t_val): New function.
6273 (lto_check_int_val): Likewise.
6274 (LTO_READ_TYPE): New macro.
6275 (lto_read_ubyte): New function.
6276 (lto_read_uhalf): Likewise.
6277 (lto_read_uword): Likewise.
6278 (lto_read_uleb128): Likewise.
6279 (lto_read_initial_length): Likewise.
6280 (lto_abbrev_read_attrs): Likewise.
6281 (lto_abbrev_read): Likewise.
6282 (lto_abbrev_lookup): Likewise.
6283 (lto_read_section_offset): Likewise.
6284 (lto_read_comp_unit_header): Likewise.
6285 (lto_read_form): Likewise.
6286 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6287 (LTO_BEGIN_READ_ATTRS): Likewise.
6288 (LTO_END_READ_ATTRS): Likewise.
6289 (lto_unsupported_attr_error): New function.
6290 (lto_get_identifier): Likewise.
6291 (lto_read_referenced_type_DIE): Likewise.
6292 (lto_read_compile_unit_DIE): Likewise.
6293 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6294 (lto_read_base_type_DIE): Likewise.
6295 (lto_read_DIE): Likewise.
6296 (lto_read_child_DIEs): Likewise.
6297 (lto_file_read): Read DIEs.
6298 (lto_main): Ask middle end to emit entities.
6299 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6300 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6301 (lto_elf_file_close): Likewise.
6302 * lto.h (lto_file): Declare.
6303 (DWARF2_abbrev): Likewise.
6304 (lto_fd): New type.
6305 (lto_abbrev_fd): Likewise.
6306 (lto_file): Use new types.
6307 (lto_file_close): Declare.
6308 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
ab20d992 6309
d7f09764
DN
63102006-06-18 Mark Mitchell <mark@codesourcery.com>
6311
6312 * lto.h: New file.
6313 * lto.c: New file.
6314 * lto-elf.c: New file.
6315 * lto-lang.c (flags.h): Include it.
6316 (lto.h): Likewise.
6317 (lto_init): New function.
6318 (lto_write_globals): Remove.
ab20d992 6319 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
d7f09764
DN
6320 (LANG_HOOKS_INIT): Define.
6321 (LANG_HOOKS_PARSE_FILE): Likewise.
6322 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6323 (LTO_EXE): Link with libelf.
6324 (lto/lto-lang.o): Update dependencies.
6325 (lto/lto.o): New target.
6326 (lto/lto-elf.o): Likewise.
6327
63282006-06-12 Mark Mitchell <mark@codesourcery.com>
6329
6330 * config-lang.in: New file.
6331 * Make-lang.in: Likewise.
6332 * lto-tree.h: Likewise.
6333 * lto-lang.c: Likewise.
818ab71a 6334\f
a5544970 6335Copyright (C) 2006-2019 Free Software Foundation, Inc.
d7f09764 6336
818ab71a
JJ
6337Copying and distribution of this file, with or without modification,
6338are permitted in any medium without royalty provided the copyright
6339notice and this notice are preserved.
This page took 5.644097 seconds and 5 git commands to generate.