]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
590a8bec
GA
12023-09-19 Thomas Schwinge <thomas@codesourcery.com>
2 Pan Li <pan2.li@intel.com>
3
4 * lto-common.cc (lto_mode_identity_table): Remove.
5 (lto_file_finalize) [!ACCEL_COMPILER]: 'NULL'-intialize
6 'file_data->mode_table'.
7 (lto_fe_init): Don't initialize 'lto_mode_identity_table'.
8 * lto-common.h (lto_mode_identity_table): Remove.
9
5158918a
GA
102023-07-05 Robin Dapp <rdapp@ventanamicro.com>
11 Juzhe-Zhong <juzhe.zhong@rivai.ai>
12
13 * lto-lang.cc (lto_type_for_mode): Ditto.
14
6d966f9f
GA
152023-07-04 Pan Li <pan2.li@intel.com>
16 Thomas Schwinge <thomas@codesourcery.com>
17
18 * lto-common.cc (lto_file_finalize) [!ACCEL_COMPILER]: Initialize
19 'file_data->mode_bits'.
20
212023-07-04 Thomas Schwinge <thomas@codesourcery.com>
22
23 * lto-common.cc (lto_read_decls): Adjust.
24
14bfda60
GA
252023-06-29 Qing Zhao <qing.zhao@oracle.com>
26
27 * lto-common.cc (compare_tree_sccs_1): Compare bit
28 TYPE_NO_NAMED_ARGS_STDARG_P or TYPE_INCLUDES_FLEXARRAY properly
29 for its corresponding type.
30
312023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
32
33 * Make-lang.in: Pass correct stage lto when processing
34 profile data collected while building target libraries
35
5f590ee3
GA
362023-06-28 Richard Biener <rguenther@suse.de>
37
38 * lto-common.cc (compare_tree_sccs_1): Use TYPE_PRECISION_RAW.
39
b2776076
GA
402023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
41
42 * lto-common.cc (lto_maybe_register_decl): Use _P defines from tree.h.
43 * lto-symtab.cc (warn_type_compatibility_p): Ditto.
44 (lto_symtab_resolve_replaceable_p): Ditto.
45 (lto_symtab_merge_decls_1): Ditto.
46 * lto-symtab.h (lto_symtab_prevailing_decl): Ditto.
47
50205195
GA
482023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
49
50 * Make-lang.in: Merge perf data collected when compiling lto1 and runtime libraries
51
c88a7c63
GA
522023-03-01 Jakub Jelinek <jakub@redhat.com>
53
54 PR target/108910
55 * lto-common.cc (lto_fixup_prevailing_type): Don't add t to
56 TYPE_POINTER_TO or TYPE_REFERENCE_TO chain if it has
57 TYPE_ATTRIBUTES or is TYPE_REF_IS_RVALUE.
58
5013c3bb
GA
592023-01-13 Richard Biener <rguenther@suse.de>
60
61 * lto-lang.cc (lto_type_for_mode): Sync with
62 c_common_type_for_mode.
63
faccda27
GA
642023-01-04 Jan Hubicka <hubicka@ucw.cz>
65
66 * lto-partition.cc (may_need_named_section_p): Clones with no body
67 need no remaning.
68
bbab9c83
GA
692022-12-29 Alexandre Oliva <oliva@adacore.com>
70
71 * lto-partition.cc (lto_1_to_1_map): Drop NULL partition
72 mapping.
73
40b8ac12
GA
742022-12-22 Richard Biener <rguenther@suse.de>
75
76 * lto-common.cc (compare_tree_sccs_1): Compare DECL_NOT_FLEXARRAY.
77
de282a20
GA
782022-12-21 Jan Hubicka <hubicka@ucw.cz>
79
80 * lto-common.cc (lto_resolution_read): With incremental linking
81 and whole program ignore turn LDPR_PREVAILING_DEF_IRONLY to
82 LDPR_PREVAILING_DEF_IRONLY_EXP
83 * lto-lang.cc (lto_post_options): Do not clear flag_whole_program
84 for incremental link
85
9a1b4f1d
GA
862022-11-25 Martin Liska <mliska@suse.cz>
87
88 PR lto/107829
89 * lto.cc (materialize_cgraph): Call timevar_push before
90 materialization starts.
91
f36bba01
GA
922022-10-29 Thomas Schwinge <thomas@codesourcery.com>
93
94 * lang.opt: Better separate 'LTO' vs. 'LTODump'.
95
3055829a
GA
962022-10-28 Joseph Myers <joseph@codesourcery.com>
97
98 * lto-common.cc (compare_tree_sccs_1): Compare
99 TYPE_NO_NAMED_ARGS_STDARG_P.
100
1012022-10-28 Martin Liska <mliska@suse.cz>
102
103 * lto-dump.cc (dump_list): Remove trailing return.
104 (dump_symbol): Likewise.
105 (dump_body): Filter name based on mangled name.
106 (dump_tool_help): Use GIMPLE wording.
107 (lto_main): Update wording.
108
96069d84
GA
1092022-10-27 Martin Liska <mliska@suse.cz>
110
111 PR lto/107418
112 * lto-dump.cc (lto_main): Do not load LTO stream for aliases.
113
d0fc05e8
GA
1142022-09-15 Richard Biener <rguenther@suse.de>
115
116 * lto-lang.cc (lto_build_c_type_nodes): Do not initialize
117 void_list_node.
118
3b2e3fa3
GA
1192022-08-22 Martin Liska <mliska@suse.cz>
120
121 PR lto/106700
122 * lto.cc (wait_for_child): Ask if we are connected to jobserver.
123 (stream_out_partitions): Likewise.
124
e1298640
GA
1252022-08-10 Martin Liska <mliska@suse.cz>
126
127 PR lto/106328
128 * lto.cc (wait_for_child): Decrement nruns once a process
129 finishes.
130 (stream_out_partitions): Use job server if active.
131 (do_whole_program_analysis): Likewise.
132
0fe604a2
GA
1332022-07-08 Martin Liska <mliska@suse.cz>
134
135 * lto-dump.cc (lto_main): Exit in the function
136 as we don't want any LTO bytecode processing.
137
9d3dd218
GA
1382022-06-27 David Malcolm <dmalcolm@redhat.com>
139
140 * lto-dump.cc: Add "final" and "override" to various vfunc
141 implementations, removing redundant "virtual" as appropriate.
142
702bd11f
GA
1432022-05-16 Martin Liska <mliska@suse.cz>
144
145 * lto-common.cc (lto_resolution_read): Use ARRAY_SIZE.
146 * lto-lang.cc (lto_init): Likewise.
147
d1ca63a1
GA
1482022-03-23 Tobias Burnus <tobias@codesourcery.com>
149
150 PR middle-end/104285
151 * lto-partition.cc (maybe_rewrite_identifier): Use get_identifier
152 for the returned string to be usable as hash key.
153 (validize_symbol_for_target): Hence, use return value directly.
154 (privatize_symbol_name_1): Track maybe_rewrite_identifier renames.
155 * lto.cc (offload_handle_link_vars): Move function up before ...
156 (do_whole_program_analysis): Call it after static renamings.
157 (lto_main): Move call after static renamings.
158
3c1cbde1
GA
1592022-02-04 Richard Biener <rguenther@suse.de>
160
161 PR middle-end/90348
162 PR middle-end/104092
163 * lto-common.cc (compare_tree_sccs_1): Compare CLOBBER_KIND.
164
88944e13
GA
1652022-02-02 Martin Liska <mliska@suse.cz>
166
167 PR lto/104333
168 * lto-common.cc (read_cgraph_and_symbols): Move resolution
169 checking for number of files later and report a reasonable
170 error message.
171 * lto-object.cc (lto_obj_file_open): Make error fatal.
172
fc829782
GA
1732022-01-17 Martin Liska <mliska@suse.cz>
174
175 * config-lang.in: Rename .c names to .cc.
176 * lang-specs.h: Likewise.
177 * lto-common.cc (gimple_register_canonical_type_1): Likewise.
178 * lto-common.h: Likewise.
179 * lto-dump.cc (lto_main): Likewise.
180 * lto-lang.cc (handle_fnspec_attribute): Likewise.
181 (lto_getdecls): Likewise.
182 (lto_init): Likewise.
183 * lto.cc (lto_main): Likewise.
184 * lto.h: Likewise.
185
1862022-01-17 Martin Liska <mliska@suse.cz>
187
188 * common.c: Moved to...
189 * common.cc: ...here.
190 * lto-common.c: Moved to...
191 * lto-common.cc: ...here.
192 * lto-dump.c: Moved to...
193 * lto-dump.cc: ...here.
194 * lto-lang.c: Moved to...
195 * lto-lang.cc: ...here.
196 * lto-object.c: Moved to...
197 * lto-object.cc: ...here.
198 * lto-partition.c: Moved to...
199 * lto-partition.cc: ...here.
200 * lto-symtab.c: Moved to...
201 * lto-symtab.cc: ...here.
202 * lto.c: Moved to...
203 * lto.cc: ...here.
204
483092d3
GA
2052021-11-18 Jan Hubicka <hubicka@ucw.cz>
206
207 * lto-partition.c (promote_symbol): Clear semantic_interposition flag.
208
9defce62
GA
2092021-11-06 Jan Hubicka <hubicka@ucw.cz>
210
211 PR ipa/103070
212 PR ipa/103058
213 * lto-partition.c (must_not_rename): Update comment.
214 (promote_symbol): Set resolution to LDPR_PREVAILING_DEF_IRONLY.
215
c2bd5d8a
GA
2162021-10-22 Eric Gallager <egallager@gcc.gnu.org>
217
218 PR other/102663
219 * Make-lang.in: Add dummy lto.install-dvi target.
220
cf966403
GA
2212021-09-27 Martin Liska <mliska@suse.cz>
222
223 * lto-lang.c (lto_init_options_struct): Set also
3d3b561f 224 x_flag_default_complex_method.
cf966403 225
7b739540
GA
2262021-09-03 Jakub Jelinek <jakub@redhat.com>
227
228 PR target/102024
229 * lto-common.c (compare_tree_sccs_1): Also compare
230 DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD values.
231
9f7c2bad
GA
2322021-09-02 liuhongt <hongtao.liu@intel.com>
233
234 * lto-lang.c (lto_type_for_mode): Return float16_type_node
235 when mode == TYPE_MODE (float16_type_node).
236
ee682192
GA
2372021-05-31 Martin Liska <mliska@suse.cz>
238
239 * lto-common.c (compare_tree_sccs_1): Compare
240 FUNCTION_DECL_DECL_TYPE.
241
637569df
GA
2422021-05-24 Wang Liushuai <wangliushuai@bytedance.com>
243
244 * lto-dump.c (get_size): Fix the NPD error about the thunk symbol.
245
ee351f7f
GA
2462021-04-15 Jan Hubicka <hubicka@ucw.cz>
247
248 PR lto/98599
249 * lto.c (lto_wpa_write_files): Fix handling of clones.
250
019a9220
GA
2512021-04-08 Martin Sebor <msebor@redhat.com>
252
253 PR middle-end/99883
254 * lto-lang.c (lto_post_options): Correct spelling.
255
2c83c3fb
GA
2562021-02-28 Jakub Jelinek <jakub@redhat.com>
257
258 PR c/99304
259 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Fix comment
260 typos - refernced -> referenced and
261 devirtualizaiton -> devirtualization.
262
eefe499f
GA
2632020-12-16 Martin Liska <mliska@suse.cz>
264
265 * lang.opt: Remove usage of Report.
266
82e5048e
GA
2672020-11-20 Jakub Jelinek <jakub@redhat.com>
268
269 PR other/97911
270 * Make-lang.in (lto1.serial, lto2.serial): Change from goals to
271 variables.
272 (.PHONY): Drop lto1.serial, lto2.serial, lto1.prev and lto2.prev.
273 ($(LTO_EXE)): Depend on $(lto1.serial) rather than lto1.serial.
274 ($(LTO_DUMP_EXE)): Depend on $(lto2.serial) rather than lto2.serial.
275
25bb75f8
GA
2762020-11-18 Jerry Clcanny <a837940593@gmail.com>
277
278 * lto-symtab.c (lto_symtab_merge_symbols): Fix typos in comment.
279
2802020-11-18 Jakub Jelinek <jakub@redhat.com>
281
282 * Make-lang.in (lto, lto1.serial, lto2.serial): New goals.
283 (.PHONY): Add lto lto1.serial lto1.prev lto2.serial lto2.prev.
284 (lto.all.cross, lto.start.encap): Remove dependencies.
285 ($(LTO_EXE)): Depend on lto1.prev. Call LINK_PROGRESS.
286 ($(LTO_DUMP_EXE)): Depend on lto2.prev. Call LINK_PROGRESS.
287
4dabb037
GA
2882020-11-17 Jan Hubicka <jh@suse.cz>
289
290 PR bootstrap/97857
291 * lto-common.c (gimple_register_canonical_type_1): Only
292 register types with TYPE_CXX_ODR_P flag; sanity check that no
293 conflict happens at ltrans time.
294
44cab2d8
GA
2952020-11-06 Nathan Sidwell <nathan@acm.org>
296
297 * lto-symtab.c (lto_symtab_merge_decls_1): Rename
298 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
299
e93aae4a
GA
3002020-10-28 Jakub Jelinek <jakub@redhat.com>
301
302 PR lto/96680
303 * lto-common.c (lto_fixup_prevailing_decls): Don't use
304 LTO_NO_PREVAIL on TREE_LIST's TREE_PURPOSE.
305 * lto-partition.c (lto_balanced_map): Treat declare_variant_alt
306 nodes like definitions.
307
efe71fcc
GA
3082020-10-23 Jan Hubicka <hubicka@ucw.cz>
309
310 * lto-partition.c (add_symbol_to_partition_1): Update for new thunk
311 api.
312
8b394f01
GA
3132020-08-27 Martin Liska <mliska@suse.cz>
314
315 * lto-common.c (lto_file_finalize): Set exact argument of a vector
316 growth function to true.
317
9a5b7438
GA
3182020-06-03 Jan Hubicka <hubicka@ucw.cz>
319
320 * lto-common.c (compare_tree_sccs_1): Do not compare TYPE_VALUES.
321
bcb63eb2
JH
3222020-05-22 Jan Hubicka <hubicka@ucw.cz>
323
324 * lto-common.c (lto_read_decls): Do not skip stray refs.
325
03d90a20
JH
3262020-05-20 Jan Hubicka <hubicka@ucw.cz>
327
328 * lto-common.c (compare_tree_sccs_1): Sanity check that we never
329 read TRANSLATION_UNIT_DECL.
330 (process_dref): Break out from ...
331 (unify_scc): ... here.
332 (process_new_tree): Break out from ...
333 (lto_read_decls): ... here; handle streaming of singleton trees.
334 (print_lto_report_1): Update statistics.
335
eb72dc66
RB
3362020-05-07 Richard Biener <rguenther@suse.de>
337
338 PR middle-end/94703
339 * lto-common.c (compare_tree_sccs_1): Compare
340 DECL_NOT_GIMPLE_REG_P.
341
575ac27f
JJ
3422020-04-29 Jakub Jelinek <jakub@redhat.com>
343
344 PR target/94707
345 * lto-common.c (compare_tree_sccs_1): Handle DECL_FIELD_ABI_IGNORED.
346
b835645c
ML
3472020-04-17 Martin Liska <mliska@suse.cz>
348
349 PR lto/94612
350 * lto-common.c: Initialize file_data->lto_section_header
351 before lto_mode_identity_table call. It is needed because
352 it decompresses a LTO section.
353
70df40ca
ML
3542020-04-08 Martin Liska <mliska@suse.cz>
355
356 PR c++/94314
357 * lto-common.c (compare_tree_sccs_1): Compare also
358 DECL_IS_REPLACEABLE_OPERATOR.
359
158cccea
JJ
3602020-03-25 Jakub Jelinek <jakub@redhat.com>
361
362 PR c++/94223
363 * lto-lang.c (lto_set_decl_assembler_name): Use a static ulong
364 counter instead of DECL_UID.
365
c2211a60
TB
3662020-03-24 Tobias Burnus <tobias@codesourcery.com>
367
368 PR libgomp/81689
369 * lto.c (offload_handle_link_vars): Propagate TREE_PUBLIC state.
370
ce641308
TB
3712020-01-29 Tobias Burnus <tobias@codesourcery.com>
372
373 * lto.c (offload_handle_link_vars): Reduce chance of
374 naming clashes of generated linkptr variable.
375
b809f0b6
TB
3762020-01-29 Tobias Burnus <tobias@codesourcery.com>
377
378 PR middle-end/94233
379 * lto.c (offload_handle_link_vars): Cleanup; call
380 build_decl to ensure alignment is set.
381
27736735
ML
3822020-02-05 Martin Liska <mliska@suse.cz>
383
384 PR lto/93489
385 * lto-dump.c (dump_list_functions): Do not
386 load body for aliases.
387 (dump_body): Likewise here.
388
f48c6014
ML
3892020-01-16 Martin Liska <mliska@suse.cz>
390
391 * lto-partition.c (lto_balanced_map): Remember
392 best_noreorder_pos and then restore to it
393 when we revert.
394
3629ff8a
ML
3952020-01-08 Martin Liska <mliska@suse.cz>
396
397 * lto-partition.c (add_symbol_to_partition_1): Use ::dump_name or
398 ::dump_asm_name instead of (::name or ::asm_name).
399 (lto_balanced_map): Likewise.
400 (promote_symbol): Likewise.
401 (rename_statics): Likewise.
402 * lto.c (lto_wpa_write_files): Likewise.
403
d597b944
ML
4042020-01-08 Martin Liska <mliska@suse.cz>
405
406 * lto-partition.c (lto_balanced_map): Use symtab_node::dump_name.
407
8d9254fc
JJ
4082020-01-01 Jakub Jelinek <jakub@redhat.com>
409
410 Update copyright years.
411
40ebe1fc
JH
4122019-12-19 Jan Hubicka <hubicka@ucw.cz>
413 Xi Ruoyao <xry111@mengyan1223.wang>
414
415 * lto-common.c (read_cgraph_and_symbols): Work around binutils
416 PR25424
417
6d8fd122 4182019-12-07 Jan Hubicka <hubicka@ucw.cz>
5b8d9367 419
59c7b29e
JH
420 * lto-partition.c (lto_balanced_map): Fix printing of tp_first_run.
421
4222019-12-10 Jan Hubicka <hubicka@ucw.cz>
423
6d8fd122
JH
424 * lto-partition.c (node_cmp): Turn into simple order comparsions.
425 (varpool_node_cmp): Remove.
426 (add_sorted_nodes): Use node_cmp.
427 (lto_balanced_map): Use tp_first_run_node_cmp.
428
59c7b29e
JH
4292019-11-25 Joseph Myers <joseph@codesourcery.com>
430
5b8d9367
JM
431 PR c/91985
432 * lto-lang.c (lto_type_for_mode): Handle decimal floating-point
433 types being NULL_TREE.
434
9fd052e7
JH
4352019-11-22 Jan Hubicka <jh@suse.cz>
436
437 * lto.c (lto_wpa_write_files): Call memory_block_pool::trim.
438
e61d0e4e
ML
4392019-11-14 Martin Liska <mliska@suse.cz>
440
441 * Make-lang.in: Remove wrong dependency
442 of LTO_DUMP_EXE on LTO_EXE.
443
0c29cac4
ML
4442019-11-12 Martin Liska <mliska@suse.cz>
445
446 * lto-common.c: Do not include params.h.
447 * lto-partition.c: Likewise.
448 * lto.c: Likewise.
449
028d4092
ML
4502019-11-12 Martin Liska <mliska@suse.cz>
451
452 * lto-partition.c (lto_balanced_map): Replace old parameter syntax
453 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
454 macro.
455 * lto.c (do_whole_program_analysis): Likewise.
456
fe1d1a8b
ML
4572019-11-11 Martin Liska <mliska@suse.cz>
458
459 * Make-lang.in: Relax dependency of lto-dump.o to
460 LTO_OBJS which will allow faster linking (mainly with LTO).
461
c38ee9a2
JH
4622019-11-07 Jan Hubicka <hubicka@ucw.cz>
463
464 * lto.c (do_whole_program_analysis): Call lto_free_file_name_hash.
465
c9ef0409
JH
4662019-11-02 Jan Hubicka <hubicka@ucw.cz>
467
468 * lto-common.c (read_cgraph_and_symbols): Improve -Q reporting.
469 * lto.c (lto_wpa_write_files): Likewise.
470
6773658a
JJ
4712019-10-31 Jakub Jelinek <jakub@redhat.com>
472
473 PR middle-end/92231
474 * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
475 on *node that is not FUNCTION_DECL.
476
3c56d8d8
ML
4772019-10-30 Martin Liska <mliska@suse.cz>
478
479 PR lto/91393
480 PR lto/88220
481 * lto-common.c (lto_file_finalize): Use lto_get_summary_section_data.
482 (get_section_data): Add order argument.
483
3518424d
ML
4842019-10-29 Martin Liska <mliska@suse.cz>
485
486 * lto.c (do_whole_program_analysis): Pass
487 title as dump_memory_report argument.
488
c5281d50
ML
4892019-10-29 Martin Liska <mliska@suse.cz>
490
491 * lto.c (do_whole_program_analysis): Remove argument.
492
f658ad30
JH
4932019-10-24 Jan Hubicka <hubicka@ucw.cz>
494
495 * lto-partition.c (add_symbol_to_partition_1): Update.
496 (undo_parittion): Update.
497
ebad2eee
JH
4982019-10-23 Jan Hubicka <hubicka@ucw.cz>
499
500 * lto-common.c (lto_file_finalize): Add order attribute.
501 (lto_create_files_from_ids): Pass order.
502 (lto_file_read): UPdate call of lto_create_files_from_ids.
503
7cc47709
JH
5042019-10-12 Jan Hubicka <hubicka@ucw.cz>
505
506 * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
507 summary streaming.
508
f8cf94cd
JH
5092019-10-12 Jan Hubicka <hubicka@ucw.cz>
510
511 * lto.c (lto_wpa_write_files): Do not update bodies of clones.
512
e5207f1a
JH
5132019-10-11 Jan Hubicka <hubicka@ucw.cz>
514
515 * lto.c (lto_wpa_write_files): Call ggc_trim.
516
1fcf52a6
JH
5172019-10-11 Jan Hubicka <hubicka@ucw.cz>
518
519 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
520
9142736e
RB
5212019-10-10 Richard Biener <rguenther@suse.de>
522
523 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
524
0fa00483
JM
5252019-10-04 Joseph Myers <joseph@codesourcery.com>
526
527 * lto-lang.c (flag_isoc2x): New variable.
528
a3d09469
RB
5292019-09-18 Richard Biener <rguenther@suse.de>
530
531 PR lto/91763
532 * lto.c (lto_materialize_function): Initialize EH by looking
533 at the function personality and flag_exceptions setting.
534
df375b03
JJ
5352019-08-23 Jakub Jelinek <jakub@redhat.com>
536
537 PR middle-end/91283
538 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
539 flag_excess_precision_cmdline. Remove comment.
540
4d732405
RS
5412019-08-13 Richard Sandiford <richard.sandiford@arm.com>
542
543 PR middle-end/91421
544 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
545 instead of DECL_FUNCTION_CODE.
546 * lto-symtab.c (lto_symtab_merge_p): Likewise.
547
6e42c90c
BE
5482019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
549
550 * Make-lang.in (lto.install-common): Remove unnecessary slash
551 between $(DESTDIR) and $(bindir).
552
cb50701e
ML
5532019-07-25 Martin Liska <mliska@suse.cz>
554
555 * lto-common.c (compare_tree_sccs_1): Use new macros
556 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
557
34e64622
GB
5582019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
559
560 * lang.opt (flag_dump_callgraph): New flag.
561 * lto-dump.c (dump_symtab_graphviz): New function.
562 (dump_tool_help): New option.
563 (lto_main): Handle graphviz dumping.
564
b01659aa
JH
5652019-07-18 Jan Hubicka <hubicka@ucw.cz>
566
567 * lto-common.c (gimple_register_canonical_type_1): Do not look for
568 non-ODR conflicts of types in anonymous namespaces.
569 (unify_scc): Do not merge anonymous namespace types.
570
99b1c316
MS
5712019-07-09 Martin Sebor <msebor@redhat.com>
572
573 PR c++/61339
574 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
575 to struct and others to class.
576 (mentions_vars_p): Same.
577 (register_resolution): Same.
578 (lto_register_var_decl_in_symtab): Same.
579 (lto_register_function_decl_in_symtab): Same.
580 (cmp_tree): Same.
581 (lto_read_decls): Same.
582
6c1dae73
MS
5832019-07-09 Martin Sebor <msebor@redhat.com>
584
585 PR c++/61339
586 * lto-dump.c: Change class-key from class to struct and vice versa
587 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
588
70980ea2
ML
5892019-07-04 Martin Liska <mliska@suse.cz>
590
591 PR lto/91078
592 * lto-common.c (lto_file_finalize): Use memcpy to set
593 file_data->lto_section_header.
594
88614dfa
ML
5952019-07-03 Martin Liska <mliska@suse.cz>
596
597 * lto-common.c: Read LTO section and verify header.
598
606a9a8c
JH
5992019-06-27 Jan Hubicka <jh@suse.cz>
600
601 * lto-common.c (lto_register_canonical_types_for_odr_types):
602 Copy CXX_ODR_P from the main variant.
603
85693eef
JH
6042019-06-27 Jan Hubicka <jh@suse.cz>
605
606 * lto-common.c: tree-pretty-print.h
607 (type_streaming_finished): New static var.
608 (gimple_register_canonical_type_1): Return updated hash; handle ODR
609 types.
610 (iterative_hash_canonical_type): Update use of
611 gimple_register_canonical_type_1.
612
c2f7a665
ML
6132019-06-27 Martin Liska <mliska@suse.cz>
614
615 * lto-dump.c (struct symbol_entry): Add default dtor.
616 (struct variable_entry): Likewise.
617 (struct function_entry): Likewise.
618 (dump_list_functions): Release memory.
619 (dump_list_variables): Likewise.
620
ab20d992
JJ
6212019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
622
623 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
624 format of "__intN" types for SIZE_TYPE.
625
f4af4019
JH
6262019-06-24 Jan Hubicka <jh@suse.cz>
627
628 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
629 compare STRING_FLAG only for arrays and integers.
630
0ecf545c
MS
6312019-06-05 Martin Sebor <msebor@redhat.com>
632
633 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
634
a9c697b8
MS
6352019-05-16 Martin Sebor <msebor@redhat.com>
636
ab20d992
JJ
637 * lto-dump.c (lto_main): Same.
638 * lto.c (stream_out): Same.
a9c697b8 639
38613b9b
ML
6402019-05-10 Martin Liska <mliska@suse.cz>
641
642 * Make-lang.in: Use program_transform_name for lto-dump.
643 * config-lang.in: Do not mark lto-dump compiler as we don't
644 want to have it installed at
645 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
646
03de2955
RO
6472019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
648
649 * lto-common.c (lto_file_read): Print section->start as int64_t,
650 section->len as uint64_t.
651 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
652
ee7a003f
ML
6532019-05-06 Martin Liska <mliska@suse.cz>
654
655 * lto-common.c: Update coding style.
656 * lto.c (materialize_cgraph): Likewise.
657
66d62d9f
HK
6582019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
659 Martin Liska <mliska@suse.cz>
660
661 * Make-lang.in: Add lto_dump-related definition.
662 * config-lang.in: Likewise.
663 * lang.opt: Add new language LTODump and options related
664 to LTO dump tool.
665 * lto-common.c (lto_read_decls): Support type statistics dump.
666 (lto_file_read): Likewise for object files.
667 * lto-dump.c: New file.
668 * lto-lang.c (lto_option_lang_mask): Move from ..
669 * lto.c (lto_option_lang_mask): .. here.
670 * lto.h (lto_option_lang_mask): New declaration.
671
a79420f9
ML
6722019-05-06 Martin Liska <mliska@suse.cz>
673 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
674
675 * Make-lang.in: Add lto-common.o.
676 * config-lang.in: Likewise for gtfiles.
677 * lto-common.c: New file.
678 * lto-common.h: New file.
679 * lto-lang.c: Include lto-common.h.
680 * lto.c: Move most of the functionality
681 into lto-common.c file.
682
0c7f51e4
JH
6832019-04-12 Jan Hubicka <hubicka@ucw.cz>
684
685 * lto.c (do_stream_out): rename to ...
686 (stream_out): ... this one; move original code to ...
687 (stream_out_partitions_1, stream_out_partitions): ... these new
688 functions.
689 (lto_wpa_write_files): Honnor lto_parallelism
690
303389b1
ML
6912019-03-26 Martin Liska <mliska@suse.cz>
692
693 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 694 wrapping.
303389b1 695
a3f9f006
ML
6962019-03-11 Martin Liska <mliska@suse.cz>
697
698 * lto-lang.c (lto_post_options): Wrap an option name
699 in a string format message and fix GNU coding style.
700 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
701
04e5c73d
JJ
7022019-03-09 Jakub Jelinek <jakub@redhat.com>
703
704 PR target/79645
705 * lang.opt: Terminate description text with a dot.
706
80f52b40
JM
7072019-02-28 Jason Merrill <jason@redhat.com>
708
709 PR c++/88049 - ICE with undefined destructor and anon namespace.
710 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
711 for a type in an anonymous namespace.
712
67914693
SL
7132019-01-09 Sandra Loosemore <sandra@codesourcery.com>
714
715 PR other/16615
716
717 * lto-partition.c: Mechanically replace "can not" with "cannot".
718 * lto-symtab.c: Likewise.
719 * lto.c: Likewise.
720
a5544970
JJ
7212019-01-01 Jakub Jelinek <jakub@redhat.com>
722
723 Update copyright years.
724
d840d7a2
JH
7252018-12-24 Jan Hubicka <hubicka@ucw.cz>
726
727 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
728 for method whose basetype was already reported.
729
ed1b53a0
MP
7302018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
731
732 Minimize clone counter memory usage in LTO.
733 * lto-partition.c (privatize_symbol_name_1): Keep track of
734 non-unique symbol counters in the lto_clone_numbers hash
735 map.
736 (lto_promote_cross_file_statics): Allocate and free the
737 lto_clone_numbers hash map.
738 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
739 map.
740
ad42aa96
JH
7412018-11-28 Jan Hubicka <jh@suse.cz>
742
743 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
744
d7dce787
JH
7452018-11-22 Jan Hubicka <jh@suse.cz>
746
747 * lto.c (cmp_type_location): Remove.
748 (lto_read_decls): Do not allocate odr_types.
749
f615cb16
ML
7502018-11-19 Martin Liska <mliska@suse.cz>
751
752 PR lto/88077
753 * lto-symtab.c (lto_symtab_merge): Transform the
754 condition before r256989.
755
12eac232
ML
7562018-11-16 Martin Liska <mliska@suse.cz>
757
758 PR lto/88004
759 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
760 lto_symtab_symbol_p as it does checking of transparent alias.
761 These needs to be also merged in the function.
762
7958186b
MP
7632018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
764
765 * lto-partition.c (privatize_symbol_name_1): Use
3d3b561f 766 clone_function_name_numbered.
7958186b 767
abb967da
JH
7682018-10-26 Jan Hubicka <jh@suse.cz>
769
ab20d992 770 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
abb967da 771
033eb567
DM
7722018-10-17 David Malcolm <dmalcolm@redhat.com>
773
774 * Make-lang.in (selftest-lto): New.
775
9ed6dbee
ML
7762018-08-29 Martin Liska <mliska@suse.cz>
777
778 PR bootstrap/87130
779 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
780 to behavior before r263887.
781
3d78e008
ML
7822018-08-27 Martin Liska <mliska@suse.cz>
783
784 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
785 fndecl_built_in_p and remove check for FUNCTION_DECL if
786 possible.
3d78e008
ML
787 * lto-symtab.c (lto_symtab_merge_p): Likewise.
788 (lto_symtab_merge_decls_1): Likewise.
789 (lto_symtab_merge_symbols): Likewise.
790 * lto.c (lto_maybe_register_decl): Likewise.
791 (read_cgraph_and_symbols): Likewise.
792
efd9eb29
TV
7932018-08-21 Tom de Vries <tdevries@suse.de>
794
ab20d992 795 * lto.c (lto_main): Call debuginfo_early_start and
efd9eb29
TV
796 debuginfo_early_stop.
797
00abf86c
MS
7982018-07-20 Martin Sebor <msebor@redhat.com>
799
800 PR middle-end/82063
801 * lto-lang.c (lto_handle_option): Change function argument
802 to HOST_WIDE_INT.
803
efe0e6cd
RB
8042018-07-20 Richard Biener <rguenther@suse.de>
805
806 PR debug/86585
807 * lto.c (unify_scc): Before we throw away an SCC see if we
808 can amend prevailing single-entry SCC with debug refs.
809
814f3331
JH
8102018-07-13 Jan Hubicka <hubicka@ucw.cz>
811
812 * lto.c (do_stream_out): Add PART parameter; open dump file.
813 (stream_out): Add PART parameter; pass it to do_stream_out.
814 (lto_wpa_write_files): Update call of stream_out.
815
c518c102
ML
8162018-07-04 Martin Liska <mliska@suse.cz>
817
818 PR middle-end/66240
819 PR target/45996
820 PR c/84100
821 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
822 instead of memcmp.
823
b54006ae
ML
8242018-06-20 Martin Liska <mliska@suse.cz>
825
826 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 827 FIXME comment.
b54006ae 828
56f62793
ML
8292018-06-19 Martin Liska <mliska@suse.cz>
830
831 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 832 of get_create.
56f62793
ML
833 (undo_partition): Likewise.
834 (lto_balanced_map): Likewise.
835
1724941e
ML
8362018-06-19 Martin Liska <mliska@suse.cz>
837
838 * config-lang.in: Remove stagestuff.
839
29a50dfb
JH
8402018-06-08 Jan Hubicka <hubicka@ucw.cz>
841
842 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
843 New global vars.
844 (lto_register_dumps): New hook.
845 (LANG_HOOKS_REGISTER_DUMPS): New.
846 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
847 * lto-symtab.c: Include lto.h; dump into dump_file instead of
848 symtab->dump_file.
849 (lto_symtab_merge_decls): Initialize dump file.
850 * lto.c (read_cgraph_and_symbols): Initialize dump file.
851 (do_whole_program_analysis): Likewise.
852
74644756
ML
8532018-06-08 Martin Liska <mliska@suse.cz>
854
855 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
856 instead of summary_uid.
857
99353fcf
ML
8582018-06-08 Martin Liska <mliska@suse.cz>
859
860 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
861 of get.
862 (undo_partition): Likewise.
863 (lto_balanced_map): Likewise.
864
31db0fe0
ML
8652018-06-08 Martin Liska <mliska@suse.cz>
866
867 * lto-partition.c (add_references_to_partition): Remove support
868 for MPX (macros, related functions, fields in cgraph_node, ...).
869 (add_symbol_to_partition_1): Likewise.
870 (privatize_symbol_name): Likewise.
871 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
872
f115c9b5
RB
8732018-06-05 Richard Biener <rguenther@suse.de>
874
875 * lto.c (cmp_type_location): Expand locations only once.
876
5b42d196
JH
8772018-05-30 Jan Hubicka <hubicka@ucw.cz>
878
879 * lang.opt (lto_linker_output): Add nolto-rel.
880 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
881 and LTO_LINKER_OUTPUT_NOLTOREL.
882 (lto_init): Generate lto when doing incremental link.
883 * lto.c (lto_precess_name): Add lto1-inclink.
884
ab168044
JH
8852018-05-18 Jan Hubicka <jh@suse.cz>
886
887 PR lto/85583
888 * lto-partition.c (account_reference_p): Do not account
889 references from aliases; do not account refernces from
890 external initializers.
891
b6e33d73
JH
8922018-04-30 Jan Hubicka <jh@suse.cz>
893
894 * lto.c (cmp_partitions_size): Remove.
895 (lto_wpa_write_files): Also output priorities; do not sort partitions.
896 (cmp_partition_order): Move to ...
897 * lto-partition.c (cmp_partition_order): ...
898 (lto_1_to_1_map): Sort partitions.
899
e693ebce
JH
9002018-04-20 Jan Hubicka <jh@suse.cz>
901
902 * lto-partition.c (lto_balanced_map): Fix sanity check.
903
ddb0b824
JH
9042018-04-19 Jan Hubicka <jh@suse.cz>
905
906 * lto-partition.c: Include sreal.h
907 (add_symbol_to_partition_1): Use size instead of self_size
908 for size estimate.
909 (account_reference_p): New.
910 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
911 fix accounting errors in boundary size; add debug output; combine cost
912 as cost/size instead of cost/internal; reduce the partitioning error to
913 +- 1/8 of the parttion size.
914
1781a04f
ML
9152018-04-19 Martin Liska <mliska@suse.cz>
916
917 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
918 for multiple PREVAILING_DEF_IRONLY for common symbols.
919
6867cd69
ML
9202018-04-18 Martin Liska <mliska@suse.cz>
921
922 * lto.c (lto_read_decls): Fix GNU coding style and typos.
923
af597536
ML
9242018-04-18 Martin Liska <mliska@suse.cz>
925
926 PR ipa/83983
927 PR ipa/85391
928 * lto.c (cmp_type_location): New function.
929 (lto_read_decls): First collect all types, then
930 sort them according by location before register_odr_type
931 is called.
932
7d6051b1
JH
9332018-04-18 Jan Hubicka <jh@suse.cz>
934 Martin Liska <mliska@suse.cz>
935
936 PR lto/85391
937 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
938 types.
939
23d87577
ML
9402018-04-11 Martin Liska <mliska@suse.cz>
941
942 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
943 function.
944
c16833dc
ML
9452018-04-10 Martin Liska <mliska@suse.cz>
946
947 PR lto/85248
948 * lto-symtab.c (lto_symtab_merge_p): Do not check for
949 TREE_VALUES of error attributes.
950
8d96e546
ML
9512018-04-10 Richard Biener <rguenther@suse.de>
952 Martin Liska <mliska@suse.cz>
953
954 PR lto/85248
955 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
956
97bb4812
JH
9572018-02-08 Jan Hubicka <hubicka@ucw.cz>
958
959 * lto-partition.c (lto_balanced_map): Watch overflow.
960
39aa9b23
JH
9612018-02-08 Jan Hubicka <hubicka@ucw.cz>
962
963 PR ipa/81360
964 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
965 (read_cgraph_and_symbols): Use
966 symtab_node::output_to_lto_symbol_table_p.
967
26a823f0
JH
9682018-01-30 Jan Hubicka <hubicka@ucw.cz>
969
970 * lto.c (register_resolution): Remove forgotten sanity check.
971
43fbc2e9
JH
9722018-01-30 Jan Hubicka <hubicka@ucw.cz>
973
974 PR lto/81004
975 * lto.c: Include builtins.h
976 (register_resolution): Merge resolutions in case trees was
977 merged across units.
978 (lto_maybe_register_decl): Break out from ...
979 (lto_read_decls): ... here.
980 (unify_scc): Also register decls here.
981 (read_cgraph_and_symbols): Sanity check that all resolutions was
982 read.
983
ee034d31
EB
9842018-02-02 Eric Botcazou <ebotcazou@adacore.com>
985
986 PR lto/83954
987 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
988 component type of array types with non-aliased component.
989
44c945e6
JH
9902018-01-30 Jan Hubicka <hubicka@ucw.cz>
991
992 PR lto/83954
993 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
994 for type match warning on arrays of pointers.
995
cde9b2f8
ML
9962018-01-23 Martin Liska <mliska@suse.cz>
997
998 PR lto/81440
999 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
1000 trailing arrays at the end of a struct.
1001
5c0caeb3
RS
10022018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1003 Alan Hayward <alan.hayward@arm.com>
1004 David Sherwood <david.sherwood@arm.com>
1005
1006 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
1007
928686b1
RS
10082018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1009 Alan Hayward <alan.hayward@arm.com>
1010 David Sherwood <david.sherwood@arm.com>
1011
1012 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
1013 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
1014
85ec4feb
JJ
10152018-01-03 Jakub Jelinek <jakub@redhat.com>
1016
1017 Update copyright years.
1018
4849deb1
JJ
10192017-12-15 Jakub Jelinek <jakub@redhat.com>
1020
1021 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
1022 affects_type_identity and handler fields, adjust comments.
1023
734914b6
RS
10242017-12-07 Richard Sandiford <richard.sandiford@arm.com>
1025
1026 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
1027
5d9ae53d
MS
10282017-12-07 Martin Sebor <msebor@redhat.com>
1029
1030 PR c/81544
1031 * lto-lang.c (lto_attribute_table): Initialize new member of struct
1032 attribute_spec.
1033
5de73c05
JJ
10342017-11-30 Jakub Jelinek <jakub@redhat.com>
1035
1036 * lto.c (create_subid_section_table): Use ; instead of ;;.
1037
974aedcc
MP
10382017-11-22 Marek Polacek <polacek@redhat.com>
1039
1040 PR c++/60336
1041 PR middle-end/67239
1042 PR target/68355
1043 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
1044
1bad9c18
JH
10452017-11-10 Jan Hubicka <hubicka@ucw.cz>
1046
1047 * lto-partition.c (lto_balanced_map): Use frequency accessor.
1048
65991ea3
JH
10492017-10-13 Jan Hubicka <hubicka@ucw.cz>
1050
1051 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
1052
4e7d0260
NS
10532017-10-11 Nathan Sidwell <nathan@acm.org>
1054
1055 * lto.c (mentions_vars_p_decl_with_vis): Use
1056 DECL_ASSEMBLER_NAME_RAW.
1057 (lto_fixup_prevailing_decls): Likewise.
1058
8e6cdc90
RS
10592017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1060
1061 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
1062 operating on trees as wide_ints.
1063
357b7604
RS
10642017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1065 Alan Hayward <alan.hayward@arm.com>
1066 David Sherwood <david.sherwood@arm.com>
1067
1068 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
1069
1ea85365
RB
10702017-08-21 Richard Biener <rguenther@suse.de>
1071
92a285c1
ML
1072 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
1073 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
1074 TYPE_DECL debug processing, register DIE references from
1075 prevailing SCCs with the debug machinery.
1076 (lto_section_with_id): Handle LTO debug sections.
1ea85365 1077
8e093270
NS
10782017-08-16 Nathan Sidwell <nathan@acm.org>
1079
1080 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
1081 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
1082 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
1083
eac3ab4a
TV
10842017-08-08 Tom de Vries <tom@codesourcery.com>
1085
1086 * lto.c: Include attribs.h.
1087
314e6352
ML
10882017-08-08 Martin Liska <mliska@suse.cz>
1089
1090 * lto-lang.c: Include header files.
1091 * lto-symtab.c: Likewise.
1092
63e434ca
RB
10932017-08-03 Richard Biener <rguenther@suse.de>
1094
1095 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
1096 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
1097 use DECL_LANG_FLAG_0.
1098 (lto_symtab_prevail_decl): Likewise.
1099
417ca011
TD
11002017-07-07 Torsten Duwe <duwe@suse.de>
1101
1102 * lto-lang.c (lto_attribute_table): Add entry for
1103 "patchable_function_entry".
1104
20deef65
NS
11052017-07-19 Nathan Sidwell <nathan@acm.org>
1106
1107 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
1108 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
1109
0eaf0bfe
JH
11102017-07-06 Jan Hubicka <hubicka@ucw.cz>
1111
1112 * lto-partition.c (lto_balanced_map): Do not check
1113 flag_toplevel_reorder.
2db9b7cd 1114
0eaf0bfe 11152017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
1116 * lto-lang.c (lto_init): Use builtin_structptr_types.
1117
d1eed638
JH
11182017-06-15 Jan Hubicka <hubicka@ucw.cz>
1119 Thomas Preud'homme <thomas.preudhomme@arm.com>
1120
1121 PR lto/69866
1122 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
1123 that resolved externally.
1124
d2db2e6b
JH
11252017-05-23 Jan Hubicka <hubicka@ucw.cz>
1126
1127 * lto.c (do_whole_program_analysis): Replace inline_free_summary
1128 by ipa_free_fn_summary.
1129
464d0118
ML
11302017-05-23 Martin Liska <mliska@suse.cz>
1131
1132 * lto-symtab.c (lto_cgraph_replace_node): Use
1133 symtab_node::dump_{asm_,}name functions.
1134 * lto.c (read_cgraph_and_symbols): Likewise.
1135 (do_whole_program_analysis): Likewise.
1136
6c52831d
ML
11372017-05-23 Martin Liska <mliska@suse.cz>
1138
1139 * lto.c (read_cgraph_and_symbols): Use the renamed function.
1140 (do_whole_program_analysis): Use the renamed function.
1141
27d020cf
JH
11422017-05-22 Jan Hubicka <hubicka@ucw.cz>
1143
1144 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
1145 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
1146
815d9cc6
XR
11472017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1148
92a285c1 1149 PR c++/80038
815d9cc6
XR
1150 * lto-lang.c (lto_init): Set in_lto_p earlier.
1151
350792ff 11522017-04-12 Richard Biener <rguenther@suse.de>
ab20d992 1153 Bernd Edlinger <bernd.edlinger@hotmail.de>
350792ff
RB
1154
1155 PR middle-end/79671
1156 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
1157
4a44a5f3
ML
11582017-02-14 Martin Liska <mliska@suse.cz>
1159
1160 * lto.c (do_stream_out): Free LTO file filename string.
1161
8a3a6ab4
DM
11622017-01-19 David Malcolm <dmalcolm@redhat.com>
1163
1164 * lto-lang.c (builtin_type_for_size): Convert call to
1165 lto_type_for_size to one through the langhook.
1166 (lto_type_for_size): Move to langhooks.c and rename to
1167 lhd_type_for_size.
1168 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
1169
4c4b4703
JJ
11702017-01-11 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR middle-end/50199
1173 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
1174 if it was 0.
1175
bd2c6270
JJ
11762017-01-09 Jakub Jelinek <jakub@redhat.com>
1177
1178 PR translation/79019
1179 PR translation/79020
1180 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
1181
24d3f325
NS
11822017-01-06 Nathan Sidwell <nathan@acm.org>
1183
5406184c
NS
1184 * lto-partition.c (promote_symbol): Write to dump file sooner,
1185 include alias promoting too.
1186
24d3f325
NS
1187 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
1188 (may_need_named_section_p): Likewise.
1189 (rename_statics): Likewise.
1190 (lto_promote_cross_file_statics): Likewise.
1191
cbe34bb5
JJ
11922017-01-01 Jakub Jelinek <jakub@redhat.com>
1193
1194 Update copyright years.
1195
6c8bf066
GJL
11962016-11-30 Georg-Johann Lay <avr@gjlay.de>
1197
1198 PR lto/78562
1199 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
1200 mismatch if the two types are built-in.
1201
7fa6a965
PK
12022016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1203
1204 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
1205
efb71232
RB
12062016-11-23 Richard Biener <rguenther@suse.de>
1207
1208 PR lto/78472
1209 * lto.c (hash_canonical_type): Ignore zero-sized fields.
1210
48330c93
BE
12112016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1212
1213 PR c++/71973
1214 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
1215
899ca90e 12162016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1217 Alan Hayward <alan.hayward@arm.com>
1218 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1219
1220 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
1221
65179585
RB
12222016-10-31 Richard Biener <rguenther@suse.de>
1223
1224 PR lto/78129
1225 * lto.c (do_whole_program_analysis): Bail out after errors
1226 from WPA analysis.
1227
8bc5448f
KV
12282016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
1229
1230 * lto-partition.c: Include tree-vrp.h.
1231 * lto.c: Likewise.
1232
68317985
RB
12332016-09-20 Richard Biener <rguenther@suse.de>
1234
1235 * lto.c (lto_main): Call early_finish with "<artificial>" as
1236 filename.
1237
321e76fb
RB
12382016-09-19 Richard Biener <rguenther@suse.de>
1239
1240 * lto.c (lto_main): Invoke early_finish debug hook.
1241
ea6e17d5
RB
12422016-07-25 Richard Biener <rguenther@suse.de>
1243
1244 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
1245 (unify_scc): Likewise.
1246 (lto_read_decls): Likewise.
1247
e9ac1f86
JJ
12482016-06-28 Jakub Jelinek <jakub@redhat.com>
1249
1250 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1251
277d7ee0
AK
12522016-06-23 Andi Kleen <ak@linux.intel.com>
1253
1254 * Make-lang.in: Add support for autofdo (disabled for now)
1255
4d926e34
MS
12562016-06-10 Martin Sebor <msebor@redhat.com>
1257
1258 PR c/71392
ab20d992 1259 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
4d926e34
MS
1260 attribute in type-generic builtins.
1261
479f99c9
JH
12622016-05-16 Jan Hubicka <hubicka@ucw.cz>
1263
1264 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1265
1a0bf5e1
JH
12662016-05-03 Jan Hubicka <hubicka@ucw.cz>
1267
1268 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
1269
a2e76867
PK
12702016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1271
1272 * lto-partition.h (lto_balanced_map): New parameter.
1273 * lto-partition.c (lto_balanced_map): New parameter
1274 max_partition_size.
1275 Check if partition size is greater than max_partition_size.
1276 * lto.c (do_whole_program_analysis): Adjust calls to
1277 lto_balanced_map() to pass 2nd argument.
1278
ea913779
L
12792016-03-17 H.J. Lu <hongjiu.lu@intel.com>
1280
1281 PR lto/70258
1282 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
1283 PIE.
1284
56aae4b7
JJ
12852016-03-08 Jakub Jelinek <jakub@redhat.com>
1286
1287 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
1288 - becuase -> because.
1289
ed5d948d
TV
12902016-02-15 Tom de Vries <tom@codesourcery.com>
1291
1292 PR lto/69655
1293 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
1294 argument.
1295
4ecbadc7
ML
12962016-01-27 Martin Liska <mliska@suse.cz>
1297
1298 * lto-partition.c (add_symbol_to_partition_1): Remove usage
1299 of hsa_summaries.
1300
e49d321f
JH
13012016-01-19 Jan Hubicka <hubicka@ucw.cz>
1302
1303 PR lto/69136
1304 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
1305 decls have no assemblernames.
1306
b2b40051 13072016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 1308 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
1309
1310 * lto-partition.c: Include "hsa.h"
1311 (add_symbol_to_partition_1): Put hsa implementations into the
1312 same partition as host implementations.
1313
5803bd01
JH
13142016-01-12 Jan Hubicka <hubicka@ucw.cz>
1315
1316 PR lto/69003
1317 * lto-partition.c (rename_statics): Fix pasto.
1318
13092f61
RB
13192016-01-18 Richard Biener <rguenther@suse.de>
1320
1321 PR lto/69337
1322 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
1323 function vs. variable.
1324
3c4e91c9
RB
13252016-01-12 Richard Biener <rguenther@suse.de>
1326
1327 PR lto/69077
1328 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
1329 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
1330
818ab71a
JJ
13312016-01-04 Jakub Jelinek <jakub@redhat.com>
1332
1333 Update copyright years.
1334
3fddb2ef
JH
13352015-12-10 Jan Hubicka <hubicka@ucw.cz>
1336
1337 PR lto/68878
1338 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
1339 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
1340 (lto_symtab_prevailing_decl): Use it.
1341
4a38b02b
IV
13422015-12-15 Ilya Verbin <ilya.verbin@intel.com>
1343
1344 * lto.c: Include stringpool.h and fold-const.h.
1345 (offload_handle_link_vars): New static function.
1346 (lto_main): Call offload_handle_link_vars.
1347
ca834876
JH
13482015-12-10 Jan Hubicka <hubicka@ucw.cz>
1349
1350 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
1351
958a627f
JH
13522015-12-11 Jan Hubicka <hubicka@ucw.cz>
1353
1354 PR ipa/61886
1355 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
1356 values of error and warning attributes.
1357
da20571a
JH
13582015-12-08 Jan Hubicka <hubicka@ucw.cz>
1359
1360 PR lto/68811
1361 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
1362 DECL.
1363 (LTO_NO_PREVAIL): Use gcc_checking_assert.
1364
378004b9
JH
13652015-12-08 Jan Hubicka <hubicka@ucw.cz>
1366
1367 PR lto/68811
1368 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
1369 by itself.
1370
6b9ac179
JH
13712015-12-08 Jan Hubicka <hubicka@ucw.cz>
1372
1373 PR ipa/61886
1374 * lto-symtab.c: Include lto-symtab.h.
1375 (lto_cgraph_replace_node): Do not merge profiles here.
1376 (lto_symtab_merge_p): New function.
1377 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
1378 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
1379 aliases.
1380 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
1381 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
1382 * lto.c: Include lto-symtab.h
1383 * lto-symtab.h: New.
1384
41c60c6c
JH
13852015-12-08 Jan Hubicka <hubicka@ucw.cz>
1386
1387 PR ipa/61886
1388 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
1389 are not part of the definition.
1390 (contained_in_symbol): Likewise.
1391 (promote_symbol): When promoting a symbol also promote all transparent
1392 aliases.
1393 (rename_statics): Weakref needs unique name, too.
1394
71e54687
JH
13952015-12-07 Jan Hubicka <hubicka@ucw.cz>
1396
1397 PR ipa/61886
1398 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
1399 rename_statics, rename_statics): Handle transparent aliases.
1400
88636b62
JH
14012015-12-04 Jan Hubicka <hubicka@ucw.cz>
1402
1403 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
1404 merged_comdat.
1405
8c86248e
JH
14062015-12-01 Jan Hubicka <hubicka@ucw.cz>
1407
1408 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
1409
1ff9ed6f
JH
14102015-11-25 Jan Hubicka <jh@suse.cz>
1411
1412 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
1413 * lang.opt (lto_linker_output): New enum.
1414 (flinker_output): New flag.
1415
22bea0be
JH
14162015-11-24 Jan Hubicka <hubicka@ucw.cz>
1417
1418 * lto-symtab.c: Include alias.h
1419 (warn_type_compatibility_p): Replace types_compatible_p checks by
1420 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
1421 (lto_symtab_merge): Compare DECL sizes.
1422 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
1423
aea50b45
JH
14242015-11-24 Jan Hubicka <hubicka@ucw.cz>
1425
1426 * lto.c (iterative_hash_canonical_type): Recruse for all types
1427 which pass !canonical_type_used_p.
1428 (gimple_register_canonical_type_1): Sanity check we do not compute
1429 canonical type of anything with !canonical_type_used_p.
1430 (gimple_register_canonical_type): Skip all types that are
1431 !canonical_type_used_p
1432
deb3dae6
JH
14332015-11-24 Jan Hubicka <hubicka@ucw.cz>
1434
1435 * lto.c (unify_scc): Use free_node.
1436
f85d2487
JH
14372015-11-21 Jan Hubicka <hubicka@ucw.cz>
1438
1439 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
1440 (gimple_register_canonical_type_1): Check that pointers do not get
1441 canonical types.
1442 (gimple_register_canonical_type): Do not register pointers.
1443
14442015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
1445
1446 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
1447 flag for types that are not ODR; fix loop walking parameters.
1448
69f293c9
AM
14492015-11-11 Andrew MacLeod <amacleod@redhat.com>
1450
1451 * lto-lang.c: Remove unused header files.
1452 * lto-object.c: Likewise.
1453 * lto-partition.c: Likewise.
1454 * lto-symtab.c: Likewise.
1455 * lto.c: Likewise.
1456
ee45a32d
EB
14572015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1458
1459 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
1460
0aad0198
RS
14612015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1462
1463 * lto-lang.c: Don't undef DEF_BUILTIN.
1464
2adfab87
AM
14652015-10-29 Andrew MacLeod <amacleod@redhat.com>
1466
1467 * lto-lang.c: Reorder #include's and remove duplicates.
1468 * lto-object.c: Likewise.
1469 * lto-partition.c: Likewise.
1470 * lto-symtab.c: Likewise.
1471 * lto.c: Likewise.
1472
b2b29377
MM
14732015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
1474
1475 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
1476 conditionals.
1477 (lto_fixup_state): Likewise.
1478 (do_whole_program_analysis): Use
1479 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
1480 conditionals.
1481
d9a6bd32
JJ
14822015-10-13 Jakub Jelinek <jakub@redhat.com>
1483
1484 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1485 DEF_FUNCTION_TYPE_11): Define.
1486
9c4eeafc
JH
14872015-10-10 Jan Hubicka <hubicka@ucw.cz>
1488
1489 * lto.c (hash_canonical_type): Honor
1490 type_with_interoperable_signedness.
1491
3e32ee19
NS
14922015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1493
1494 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
1495 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1496
f196d062
RB
14972015-08-31 Richard Biener <rguenther@suse.de>
1498
1499 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
1500 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
1501 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
1502 participate in merging with something else.
1503
45aee888
RB
15042015-08-31 Richard Biener <rguenther@suse.de>
1505
1506 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
1507 test, do not replace a non-builtin with a builtin.
1508 * lto.c (compare_tree_sccs_1): Do not merge things we stream
1509 as builtins vs. non-builtins.
1510
a79683d5
TS
15112015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1512
1513 * lto.h: Remove useless typedefs.
1514
48d859bb
AM
15152015-07-15 Andrew MacLeod <amacleod@redhat.com>
1516
1517 * lto.c: Remove redundant includes.
1518
026c3cfd
AH
15192015-07-12 Aldy Hernandez <aldyh@redhat.com>
1520
1521 * lto-lang.c: Fix double word typos.
1522
9fdcd34e
AM
15232015-07-10 Andrew MacLeod <amacleod@redhat.com>
1524
1525 * lto.c: Include cfghooks.h rather than predict.h.
1526
f51ade33
AM
15272015-07-09 Andrew MacLeod <amacleod@redhat.com>
1528
1529 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1530 lto-streamer.h.
1531 * lto-object.c: Likewise.
1532 * lto-partition.c: Likewise.
1533 * lto-symtab.c: Likewise.
1534
1916bcb5
AM
15352015-07-09 Andrew MacLeod <amacleod@redhat.com>
1536
1537 * lto-lang.c: Adjust includes for flags.h changes.
1538
c7131fb2
AM
15392015-07-07 Andrew MacLeod <amacleod@redhat.com>
1540
1541 * lto-lang.c: Adjust includes.
1542 * lto-object.c: Likewise.
1543 * lto-partition.c: Likewise.
1544 * lto-symtab.c: Likewise.
1545 * lto.c: Likewise.
1546
f0889939
AM
15472015-06-25 Andrew MacLeod <amacleod@redhat.com>
1548
1549 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1550 * lto-object.c: Likewise.
1551 * lto-partition.c: Likewise.
1552 * lto-symtab.c: Likewise.
1553 * lto-tree.h: Likewise.
1554 * lto.c: Likewise.
1555
8d67ee55
RS
15562015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1557
1558 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1559 than typed_noop_remove. Remove redudant typedefs.
1560
abb226c9
AM
15612015-06-17 Andrew MacLeod <amacleod@redhat.com>
1562
1563 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1564 * lto-object.c: Likewise.
1565 * lto-partition.c: Likewise.
1566 * lto-symtab.c: Likewise.
1567 * lto.c: Likewise.
1568
351d90f4
JH
15692015-06-14 Jan Hubicka <hubicka@ucw.cz>
1570
1571 PR ipa/66181
1572 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1573
44c42705
DD
15742015-06-12 DJ Delorie <dj@redhat.com>
1575
1576 * lto-lang.c (lto_type_for_size): Include intN types.
1577 (lto_type_for_mode): Likewise.
1578
64578d98
JH
15792015-06-08 Jan Hubicka <hubicka@ucw.cz>
1580
1581 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1582
13fdf2e2
AM
15832015-06-08 Andrew MacLeod <amacleod@redhat.com>
1584
1585 * lto-lang.c : Adjust include files.
1586 * lto-object.c : Likewise.
1587 * lto-partition.c : Likewise.
1588 * lto-partition.h : Likewise.
1589 * lto-symtab.c : Likewise.
1590 * lto.c : Likewise.
1591 * lto.h : Likewise.
1592
ccb5ad37
JH
15932015-06-06 Jan Hubicka <hubicka@ucw.cz>
1594
6542950e
JH
1595 PR lto/65378
1596 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1597 odr_or_derived_type_p.
1598 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1599
16002015-06-08 Jan Hubicka <hubicka@ucw.cz>
1601
ccb5ad37
JH
1602 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1603 pointers.
1604
d7438551
AH
16052015-06-05 Aldy Hernandez <aldyh@redhat.com>
1606
1607 * lto-lang.c (lto_write_globals): Remove.
1608 (LANG_HOOKS_WRITE_GLOBALS): Same.
1609
ecb9f223
AM
16102015-06-04 Andrew MacLeod <amacleod@redhat.com>
1611
1612 * lto-lang.c: Adjust includes for restructured coretypes.h.
1613 * lto-object.c: Likewise.
1614 * lto-partition.c: Likewise.
1615 * lto-symtab.c: Likewise.
1616 * lto.c: Likewise.
1617
9cb9b937
JH
16182015-06-04 Jan Hubicka <hubicka@ucw.cz>
1619
1620 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1621
93e2aa6d
JH
16222015-06-03 Jan Hubicka <hubicka@ucw.cz>
1623
1624 * lto.c (iterative_hash_canonical_type,
1625 gimple_register_canonical_type): only hash main variants of types
1626
faae53f8
ML
16272015-05-27 Martin Liska <mliska@suse.cz>
1628
1629 * lto-partition.c (new_partition): Reset number of symbols.
1630 (add_symbol_to_partition_1): Increment number of symbols.
1631 (undo_partition): Decrement number of symbols.
1632 (lto_balanced_map): Dump number of symbols and insns that
1633 belong to a partition.
1634 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1635
b727ba74
JH
16362015-05-22 Jan Hubicka <hubicka@ucw.cz>
1637
1638 * lto.c (hash_canonical_type): Be sure we hash only types that
1639 need alias set.
1640 (gimple_register_canonical_type_1): Do not produce canonical
1641 types for types that do not need alias sets.
1642
1d1218fb
JH
16432015-05-22 Jan Hubicka <hubicka@ucw.cz>
1644
1645 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1646
872d5034
JH
16472015-05-19 Jan Hubicka <hubicka@ucw.cz>
1648
1649 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1650
259d29e3
JH
16512015-05-17 Jan Hubicka <hubicka@ucw.cz>
1652
1653 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1654 compare ODR types (if available) and function types.
1655 (lto_symtab_merge): ... here; output ODR violation warnings
1656 and call warn_types_mismatch.
1657
b0845a1e
JH
16582015-04-29 Jan Hubicka <hubicka@ucw.cz>
1659
1660 * lto.c (lto_fixup_state): Call verify_type.
1661
67f58944
TS
16622015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1663
b0845a1e 1664 * lto.c: Adjust for hash_table changes.
67f58944 1665
36ceb0e3
JH
16662015-03-27 Jan Hubicka <hubicka@ucw.cz>
1667
1668 * lto.c (lto_read_decls): Move code registering odr types out
1669 of TYPE_CANONICAL conditional and also register polymorphic types.
1670
afd1e7c6
JH
16712015-03-26 Jan Hubicka <hubicka@ucw.cz>
1672
1673 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1674 DECL_ARTIFICAL symbols.
1675
eaeec5ec
JH
16762015-03-26 Jan Hubicka <hubicka@ucw.cz>
1677
1678 PR lto/65536
1679 * lto.c (unify_scc): Revert location cache when unification
1680 suceeded.
1681 (lto_read_decls): Accept location cache after sucess;
1682 apply location cache before calling debug hooks.
1683
1c4db829
JH
16842015-03-10 Jan Hubicka <hubicka@ucw.cz>
1685
1686 * lto.c (read_cgraph_and_symbols): Do not do merging
1687 at ltrans stage.
1688
db847fa8
JJ
16892015-02-26 Jakub Jelinek <jakub@redhat.com>
1690
1691 * lto.c (lto_mode_identity_table): New variable.
1692 (lto_read_decls): Add mode_table argument to the lto_input_block
1693 constructor.
1694 (lto_file_finalize): Initialize mode_table.
1695 (lto_init): Initialize lto_mode_identity_table.
1696
56a9f6bc
TS
16972015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1698
1699 PR libgomp/64625
1700 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1701 Remove macros.
1702 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1703
ebc8f0bb
JH
17042015-02-03 Jan Hubicka <hubicka@ucw.cz>
1705
1706 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1707
40fecdd6
JM
17082015-01-30 Joseph Myers <joseph@codesourcery.com>
1709
1710 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1711 changed to pass input_location as first argument.
1712
040968a8
JH
17132014-12-11 Jan Hubicka <hubicka@ucw.cz>
1714
1715 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1716
69fe4502
JH
17172014-12-11 Jan Hubicka <hubicka@ucw.cz>
1718
1719 * lto.c (compare_tree_sccs_1): Add comparsion of
1720 DECL_FUNCTION_SPECIFIC_TARGET
1721
41dbbb37
TS
17222015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1723 James Norris <jnorris@codesourcery.com>
1724
1725 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1726 New macros.
1727 * lto.c: Include "gomp-constants.h".
1728
837bac8c
IV
17292015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1730
1731 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1732 from select_what_to_stream.
1733
1b34e6e2
BS
17342015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1735 Jakub Jelinek <jakub@redhat.com>
1736
1737 PR middle-end/64412
1738 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1739 if ACCEL_COMPILER.
1740
adfac8df
JJ
17412015-01-09 Michael Collison <michael.collison@linaro.org>
1742
1743 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1744 input.h, alias.h, symtab.h, options, fold-const.h,
1745 wide-int.h, and inchash.h due to flattening of tree.h.
1746 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1747 input.h, alias.h, symtab.h, fold-const.h,
1748 wide-int.h, and inchash.h due to flattening of tree.h.
1749 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1750 input.h, alias.h, symtab.h, options, fold-const.h,
1751 wide-int.h, and inchash.h due to flattening of tree.h.
1752 * lto-partition.c: Ditto.
1753 * lto-symtab.c: Ditto.
1754
5624e564
JJ
17552015-01-05 Jakub Jelinek <jakub@redhat.com>
1756
1757 Update copyright years.
1758
9a1e784a
ML
17592014-12-22 Martin Liska <mliska@suse.cz>
1760
1761 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1762 is used.
1763 (undo_partition): Likewise.
1764 (lto_balanced_map): Likewise.
1765
dd912cb8
ML
17662014-12-22 Martin Liska <mliska@suse.cz>
1767
1768 * lto-partition.c: Include of symbol-summary.h is added.
1769 * lto-symtab.c: Likewise.
1770 * lto.c: Likewise.
1771
17e0fc92
JH
17722014-12-11 Jan Hubicka <hubicka@ucw.cz>
1773
1774 PR ipa/61324
1775 * lto.c (read_cgraph_and_symbols): Update call of
1776 remove_unreachable_nodes.
1777 (do_whole_program_analysis): Remove call of
1778 symtab->remove_unreachable_nodes
1779
58dddbd2
TS
17802014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1781
1782 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1783 htab with malloc instead of ggc.
1784
907dadbd
TS
17852014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1786
1787 * lto.c: Replace htab with hash_table.
1788
9c71e9df
TS
17892014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1790
1791 * lto.c (lto_read_in_decl_state): Adjust.
1792 (lto_fixup_state): Likewise.
1793
72a4a8b0
JH
17942014-11-17 Jan Hubicka <hubicka@ucw.cz>
1795
1796 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1797
54e774c0
JH
17982014-11-14 Jan Hubicka <hubicka@ucw.cz>
1799
1800 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1801
1f6be682
IV
18022014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1803 Bernd Schmidt <bernds@codesourcery.com>
1804 Andrey Turetskiy <andrey.turetskiy@intel.com>
1805 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1806
ab20d992 1807 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
ec6fe917
IV
1808
18092014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1810 Ilya Tocar <ilya.tocar@intel.com>
1811 Andrey Turetskiy <andrey.turetskiy@intel.com>
1812 Bernd Schmidt <bernds@codesourcery.com>
1813
1f6be682
IV
1814 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1815 LTO_SECTION_NAME_PREFIX.
1816 * lto-partition.c (lto_promote_cross_file_statics): Call
1817 select_what_to_stream.
1818 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1819 LTO_SECTION_NAME_PREFIX.
1820 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1821 being built as an offload compiler.
1822
ef4bddc2
RS
18232014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1824
1825 * lto-lang.c: Remove redundant enum from machine_mode.
1826
c582198b
AM
18272014-10-28 Andrew MacLeod <amacleod@redhat.com>
1828
1829 * lto.c: Adjust include files.
1830 * lto-lang.c: Ditto.
1831 * lto-object.c: Ditto.
1832 * lto-partition.c: Ditto.
1833 * lto-symtab.c: Ditto.
1834
60393bbc
AM
18352014-10-27 Andrew MacLeod <amacleod@redhat.com>
1836
1837 * lto-lang.c: Adjust include files.
1838 * lto-object.c: Ditto.
1839 * lto-partition.c: Ditto.
1840 * lto-symtab.c: Ditto.
1841 * lto.c: Ditto.
1842
957f47e6
DD
18432014-10-16 DJ Delorie <dj@redhat.com>
1844
1845 * lto-object.c (lto_obj_begin_section): In the event that pointer
1846 sizes aren't powers of two, choose a more suitable alignment
1847 than (unsigned)(-1).
1848
78a7c317
DD
18492014-10-14 DJ Delorie <dj@redhat.com>
1850
1851 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1852 size-type as well.
1853 (lto_init): Initialize all intN types, not just int128.
1854
70261a4f
ML
18552014-10-06 Martin Liska <mliska@suse.cz>
1856
1857 * lto.c (stream_out): ARG_UNUSED added for last argument.
1858
00de328a
AH
18592014-09-24 Aldy Hernandez <aldyh@redhat.com>
1860
1861 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1862 DECL_ABSTRACT_P.
1863
7861b648
AK
18642014-09-23 Andi Kleen <ak@linux.intel.com>
1865
1866 * lto-partition.c (node_cmp): Update comment.
1867 (varpool_node_cmp): Use symtab_node for comparison.
1868 (add_sorted_nodes): New function.
1869 (lto_balanced_map): Change to keep ordered queue
1870 of ordered node. Handle no_reorder attribute.
1871
1ee85ee1
JH
18722014-09-11 Jan Hubicka <hubicka@ucw.cz>
1873
1874 * lto.c (lto_read_decls): Register ODR types.
1875
8605403e
JH
18762014-08-20 Jan Hubicka <hubicka@ucw.cz>
1877
1878 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1879 call.
1880 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1881
56b1f114
JH
18822014-08-14 Jan Hubicka <hubicka@ucw.cz>
1883
1884 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1885
833f94c0
RB
18862014-08-14 Richard Biener <rguenther@suse.de>
1887
1888 PR lto/62067
1889 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1890
207c68cd
RB
18912014-08-08 Richard Biener <rguenther@suse.de>
1892
1893 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1894
7c581d61
BC
18952014-08-08 Bin Cheng <bin.cheng@arm.com>
1896
1897 PR lto/62032
1898 * lto-lang.c (lto_init): Switch mis-matched arguments.
1899
39c8aaa4
TS
19002014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1901
1902 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1903
6e2830c3
TS
19042014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1905
1906 * lto-partition.c, lto-partition.h: Use hash_set instead of
1907 pointer_set.
1908
50de5793
AK
19092014-07-31 Andi Kleen <ak@linux.intel.com>
1910
1911 * lto.c (hash_canonical_type): Use inchash::hash
1912 and use inchash::add_expr.
1913 (iterative_hash_canonical_type): Dito.
1914
f6bcdb5e
RB
19152014-07-30 Richard Biener <rguenther@suse.de>
1916
1917 * lto-streamer.h (lto_write_data): New function.
1918 * langhooks.c (lhd_append_data): Do not free block.
1919 * lto-section-out.c (lto_write_data): New function writing
1920 raw data to the current section.
1921 (lto_write_stream): Adjust for langhook semantic change.
1922 (lto_destroy_simple_output_block): Write header directly.
1923 * lto-opts.c (lto_write_options): Write options directly.
1924 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1925 (lto_output_toplevel_asms): Likewise.
1926 (copy_function_or_variable): Copy data directly.
1927 (write_global_references): Output index table directly.
1928 (lto_output_decl_state_refs): Likewise.
1929 (write_symbol): Write data directly.
1930 (produce_symtab): Adjust.
1931 (produce_asm_for_decls): Output header and refs directly.
1932
56fdfd3e
AK
19332014-07-25 Andi Kleen <ak@linux.intel.com>
1934
1935 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1936
0bd8bb04
AK
19372014-07-25 Andi Kleen <ak@linux.intel.com>
1938
1939 * lto.c (hash_canonical_type): Convert to inchash.
1940 (iterative_hash_canonical_type): Dito.
1941
6d8eb96b
AK
19422014-07-25 Andi Kleen <ak@linux.intel.com>
1943
1944 * lto.c: Include inchash.h
1945
ad115a3c
JH
19462014-07-14 Jan Hubicka <hubicka@ucw.cz>
1947
1948 * lto.c (mentions_vars_p_decl_non_common): Skip
1949 DECL_ARGUMENT_FLD.
1950 mentions_vars_p_function): Do DECL_ARGUMENTS.
1951 (lto_fixup_prevailing_decls): Update.
1952
917dd9bf
JH
19532014-07-12 Jan Hubicka <hubicka@ucw.cz>
1954
1955 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1956 timevar
1957 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1958
0b83e688
JH
19592014-07-11 Jan Hubicka <hubicka@ucw.cz>
1960
ab20d992 1961 * lto-partition.c (add_references_to_partition): Use
0b83e688
JH
1962 varpool_ctor_useable_for_folding_p.
1963 * lto.c (lto_read_in_decl_state): Update sanity check.
1964
e55637b7
ML
19652014-07-01 Martin Liska <mliska@suse.cz>
1966
1967 IPA REF alias refactoring
1968 * lto-partition.c (add_symbol_to_partition_1): Usage of
1969 FOR_EACH_ALIAS added.
1970
010f4e27
JH
19712014-06-28 Jan Hubicka <hubicka@ucw.cz>
1972
1973 Revert:
1974 * lto.c (lto_copy_fields_not_streamed): New function.
1975 (compare_tree_sccs_1): Do not compare fields shared in between type
1976 and variant.
1977 (lto_read_decls): Fixup types first before inserting into hash.
1978
b82fe354
AP
19792014-06-28 Andrew Pinski <apinski@cavium.com>
1980
1981 * lto.c (lto_read_decls): Fix comment in comment.
1982
288eeff7
JH
19832014-06-28 Jan Hubicka <hubicka@ucw.cz>
1984
1985 * lto.c (lto_copy_fields_not_streamed): New function.
1986 (compare_tree_sccs_1): Do not compare fields shared in between type
1987 and variant.
1988 (lto_read_decls): Fixup types first before inserting into hash.
1989
e01fa630
ML
19902014-06-25 Martin Liska <mliska@suse.cz>
1991
ab20d992 1992 * lto-partition.c (add_references_to_partition): New IPA REF function
e01fa630
ML
1993 used.
1994 (add_symbol_to_partition_1): Likewise.
1995 (lto_balanced_map): Likewise.
ab20d992 1996 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
e01fa630 1997
aaf8a23e
JH
19982014-06-24 Jan Hubicka <hubicka@ucw.cz>
1999
2000 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
2001 (mentions_vars_p_function): ... here.
2002 (compare_tree_sccs_1): Update VINDEX checks.
2003 (lto_fixup_prevailing_decls): Likewise.
2004
1eb68d2d
TS
20052014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2006
2007 * lto.c (canonical_type_hash_cache): Use hash_map instead of
2008 pointer_map.
2009
c203e8a7
TS
20102014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2011
2012 * lto.c: Adjust.
2013
714c800f
JH
20142014-06-20 Jan Hubicka <hubicka@ucw.cz>
2015
2016 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
2017
569b1784
JH
20182014-06-20 Jan Hubicka <hubicka@ucw.cz>
2019
2020 * lto.c (compare_tree_sccs_1): Do not compare priorities.
2021
56363ffd
JH
20222014-06-15 Jan Hubicka <hubicka@ucw.cz>
2023
2024 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
2025
e257a17c
JH
20262014-06-10 Jan Hubicka <hubicka@ucw.cz>
2027
2028 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
2029 (do_whole_program_analysis): Use verify_symtab.
2030
24d047a3
JH
20312014-06-07 Jan Hubicka <hubicka@ucw.cz>
2032
2033 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
2034 lto_fixup_prevailing_decls): Skip section names.
2035
9b2b7279
AM
20362014-06-02 Andrew MacLeod <amacleod@redhat.com>
2037
2038 * lto-symtab.c: Include builtins.h.
2039
a9243bfc
RB
20402014-05-26 Richard Biener <rguenther@suse.de>
2041
2042 * lto.c (lto_parse_hex): Use int64_t.
2043 (lto_resolution_read): Likewise.
2044
fd1e9302
JH
20452014-05-23 Jan Hubicka <hubicka@ucw.cz>
2046
2047 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
2048
aede2c10
JH
20492014-05-23 Jan Hubicka <hubicka@ucw.cz>
2050
2051 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
2052 symtab pointer.
2053 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
2054
f6a7cffc
TS
20552014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2056
2057 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2058 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2059 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2060
4000360e
BS
20612012-05-22 Bernd Schmidt <bernds@codesourcery.com>
2062
2063 * lto-object.c: Include "lto-section-names.h".
2064 (LTO_SEGMENT_NAME): Don't define.
2065 * lto.c: Include "lto-section-names.h".
2066
b9559136
JH
20672014-05-17 Jan Hubicka <hubicka@ucw.cz>
2068
2069 PR lto/61012
2070 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
2071 mixed with variables.
2072
766090c2
TS
20732014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2074
2075 * lto-tree.h: Don't use variable_size gty attribute.
2076 * lto.c (lto_read_in_decl_state): Adjust.
2077 (create_subid_section_table): Likewise.
2078 (lto_flatten_files): Likewise.
2079 (read_cgraph_and_symbols): Likewise.
2080
1d60af08
KZ
20812014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2082 Mike Stump <mikestump@comcast.net>
2083 Richard Sandiford <rdsandiford@googlemail.com>
2084
2085 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
2086 * lto-lang.c (get_nonnull_operand): Likewise.
2087
22869a37
RB
20882014-04-28 Richard Biener <rguenther@suse.de>
2089
2090 PR middle-end/60092
2091 * lto-lang.c: Define flag_isoc11.
2092
7de90a6c
DM
20932014-04-23 David Malcolm <dmalcolm@redhat.com>
2094
2095 * lto-partition.c (add_references_to_partition): Update for
2096 removal of implicit pointer from the is-a.h API.
2097 (add_symbol_to_partition_1): Likewise.
2098 (contained_in_symbol): Likewise.
2099 (undo_partition): Likewise.
2100 (lto_balanced_map): Likewise.
2101 (promote_symbol): Likewise.
2102 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
2103 (lto_symtab_merge_symbols): Likewise.
2104 * lto.c (lto_wpa_write_files): Likewise.
2105
783dab6b
RB
21062014-04-15 Richard Biener <rguenther@suse.de>
2107
2108 * lto.c: Include params.h.
2109 (do_whole_program_analysis): Switch on flag_lto_partition value,
2110 add support for LTO_PARTITION_ONE.
2111 * lto-partition.h (lto_balanced_map): Adjust.
2112 * lto-partition.c (lto_balanced_map): Get number of desired
2113 partitions as argument to support -flto-partition=one.
2114
cb90235d
JH
21152014-04-14 Jan Hubicka <hubicka@ucw.cz>
2116
ab20d992 2117 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
cb90235d
JH
2118 tp_first_run.
2119
bbe281da
JH
21202014-03-19 Jan Hubicka <hubicka@ucw.cz>
2121
2122 * lto.c: Include ipa-inline.h
2123 (do_whole_program_analysis): Free inline summary after partitioning.
2124
ce2f49b3
RB
21252014-03-19 Richard Biener <rguenther@suse.de>
2126
2127 PR middle-end/60553
ab20d992 2128 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
ce2f49b3
RB
2129 instead of TREE_CHAIN as chain_next.
2130
e41106fc
RB
21312014-03-19 Richard Biener <rguenther@suse.de>
2132
2133 * lto.c (lto_wpa_write_files): Move call to
2134 lto_promote_cross_file_statics ...
2135 (do_whole_program_analysis): ... here, into the partitioning
2136 block. Do not ggc_collect after lto_wpa_write_files but
2137 for a last time before it.
2138
15df2655
JJ
21392014-03-19 Jakub Jelinek <jakub@redhat.com>
2140
2141 PR lto/60571
2142 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
2143 Fix formatting.
2144
415e2e6b
JJ
21452014-03-18 Jakub Jelinek <jakub@redhat.com>
2146
2147 PR sanitizer/60535
2148 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
2149 and complex_{float,{,long_}double}_type_node.
2150
f42c637e
PM
21512014-03-08 Paulo Matos <paulo@matos-sorge.com>
2152
415e2e6b
JJ
2153 * lto-lang.c (lto_init): Pass flag_short_double to
2154 build_common_tree_nodes.
f42c637e 2155
6dab804d
JH
21562014-02-14 Jan Hubicka <hubicka@ucw.cz>
2157
2158 PR lto/60295
2159 * lto.c (stream_out): Avoid parallel streaming with
2160 -flto=jobserver until we are able to throttle it down
2161 resonably.
2162
39434bce
JH
21632014-02-14 Jan Hubicka <hubicka@ucw.cz>
2164
2165 * lto-partition.c (add_symbol_to_partition_1,
2166 undo_partition, lto_balanced_map): Aliases have no
2167 defined size.
2168 (lto_balanced_map): Do not follow refering variables
2169 if they can be optimized out.
2170
1966fd99
RB
21712014-02-14 Richard Biener <rguenther@suse.de>
2172
2173 PR lto/60179
2174 * lto.c (compare_tree_sccs_1): Do not compare
2175 DECL_FUNCTION_SPECIFIC_TARGET.
2176 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
2177
283416b3
RB
21782014-02-12 Richard Biener <rguenther@suse.de>
2179
2180 PR lto/60060
2181 * lto-lang.c (lto_write_globals): Do not call
2182 wrapup_global_declarations or emit_debug_global_declarations
2183 but emit debug info for non-function scope variables
2184 directly.
2185
b7e85694
JH
21862014-02-06 Jan Hubicka <hubicka@ucw.cz>
2187
2188 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
2189
96451279
JH
21902014-02-06 Jan Hubicka <hubicka@ucw.cz>
2191
2192 PR ipa/59469
2193 * lto-partition.c (symbol_class): Move to cgraph.h
2194 (get_symbol_class): Move to symtab.c
2195 (add_references_to_partition, add_symbol_to_partition_1,
2196 lto_max_map, lto_1_to_1_map, lto_balanced_map,
2197 lto_promote_cross_file_statics): Update.
2198
f300e7b8
JH
21992014-02-05 Jan Hubicka <hubicka@ucw.cz>
2200
2201 * lto.c (lto_parallelism): New static var.
2202 (do_stream_out, wait_for_child, stream_out): New static functions.
2203 (lto_wpa_write_files): Add support for parallel streaming.
2204 (do_whole_program_analysis): Set parallelism.
2205 * lang.opt (fwpa): Add parameter.
2206 * lto-lang.c (lto_handle_option): Handle flag_wpa.
2207 (lto_init): Update use of flag_wpa.
2208 * lto-streamer.h (asm_nodes_output): Declare.
2209
f0f91770
RB
22102014-02-05 Richard Biener <rguenther@suse.de>
2211
2212 * lto.h (lto_global_var_decls): Remove.
2213 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
2214 (lto_write_globals): Do nothing in WPA stage, gather globals from
2215 the varpool here ...
2216 * lto.c (lto_main): ... not here.
2217 (materialize_cgraph): Do not call rest_of_decl_compilation
2218 on the empty lto_global_var_decls vector.
2219 (lto_global_var_decls): Remove.
2220
d665f8dd
JH
22212014-02-04 Jan Hubicka <hubicka@ucw.cz>
2222
ab20d992 2223 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
d665f8dd
JH
2224 needs duplicating, not generic COMDAT.
2225
c39276b8
RB
22262014-02-04 Richard Biener <rguenther@suse.de>
2227
2228 PR lto/59723
2229 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
2230 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
2231
5f876ae7 22322014-02-04 Jan Hubicka <hubicka@ucw.cz>
3d3b561f 2233 Markus Trippelsdorf
5f876ae7
JH
2234
2235 PR ipa/59469
2236 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
2237 merge force_output and forced_by_abi flags.
2238
b72271b9
BI
22392014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2240
2241 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
2242 flag_cilkplus.
2243
63124c48
RB
22442014-01-09 Richard Biener <rguenther@suse.de>
2245
2246 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
2247
d05b9920
RB
22482014-01-09 Richard Biener <rguenther@suse.de>
2249
2250 PR lto/45586
2251 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
2252 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
2253 (gimple_canonical_types_compatible_p): Do not compare them either.
2254
23a5b65a
RS
22552014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2256
2257 Update copyright years
2258
2c8326a5
OE
22592013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
2260
2261 * lto.c: Remove struct tags when referring to class varpool_node.
2262 * lto-partition.c: Likewise.
2263 * lto-symtab.c: Likewise.
2264
e06f9964
JJ
22652013-11-29 Jakub Jelinek <jakub@redhat.com>
2266 Richard Biener <rguenther@suse.de>
2267
2268 PR lto/59326
2269 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
2270
c193f58b
JJ
22712013-11-29 Jakub Jelinek <jakub@redhat.com>
2272
2273 PR lto/59326
2274 * lto.c (mentions_vars_p_omp_clause): New function.
2275 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
2276 after return stmts.
2277
2fb9a547
AM
22782013-11-22 Andrew MacLeod <amacleod@redhat.com>
2279
2280 * lto.c: Add required include files from gimple.h.
ab20d992
JJ
2281 * lto-lang.c: Likewise.
2282 * lto-object.c: Likewise.
2283 * lto-partition.c: Likewise.
2284 * lto-symtab.c: Likewise.
2fb9a547 2285
fec39fa6
TS
22862013-11-18 Trevor Saunders <tsaunders@mozilla.com>
2287
2288 * lto-partition.c lto-symtab.c lto.c Adjust.
2289
d8a2d370
DN
22902013-11-14 Diego Novillo <dnovillo@google.com>
2291
2292 * lto-lang.c: Include stringpool.h.
2293 Include stor-layout.h.
2294 * lto-partition.c: Include gcc-symtab.h.
2295 * lto.c: Include stor-layout.h.
2296
5e20cdc9
DM
22972013-10-31 David Malcolm <dmalcolm@redhat.com>
2298
2299 Automated part of renaming of symtab_node_base to symtab_node.
2300
2301 Patch autogenerated by rename_symtab.py from
2302 https://github.com/davidmalcolm/gcc-refactoring-scripts
2303 revision 58bb219cc090b2f4516a9297d868c245495ee622
2304
2305 * lto-partition.c (add_symbol_to_partition): Rename
2306 symtab_node_base to symtab_node.
2307 (get_symbol_class): Likewise.
2308 (symbol_partitioned_p): Likewise.
2309 (add_references_to_partition): Likewise.
2310 (add_symbol_to_partition_1): Likewise.
2311 (contained_in_symbol): Likewise.
2312 (add_symbol_to_partition): Likewise.
2313 (lto_1_to_1_map): Likewise.
2314 (lto_max_map): Likewise.
2315 (lto_balanced_map): Likewise.
2316 (privatize_symbol_name): Likewise.
2317 (promote_symbol): Likewise.
2318 (may_need_named_section_p): Likewise.
2319 (rename_statics): Likewise.
2320 (lto_promote_statics_nonwpa): Likewise.
2321 * lto-symtab.c (lto_symtab_merge): Likewise.
2322 (lto_symtab_resolve_replaceable_p): Likewise.
2323 (lto_symtab_symbol_p): Likewise.
2324 (lto_symtab_resolve_can_prevail_p): Likewise.
2325 (lto_symtab_resolve_symbols): Likewise.
2326 (lto_symtab_merge_decls_2): Likewise.
2327 (lto_symtab_merge_decls_1): Likewise.
2328 (lto_symtab_merge_decls): Likewise.
2329 (lto_symtab_merge_symbols_1): Likewise.
2330 (lto_symtab_merge_symbols): Likewise.
2331 (lto_symtab_prevailing_decl): Likewise.
2332 * lto.c (lto_wpa_write_files): Likewise.
2333 (read_cgraph_and_symbols): Likewise.
2334 (do_whole_program_analysis): Likewise.
2335
378cd6b1
DM
23362013-10-30 David Malcolm <dmalcolm@redhat.com>
2337
2338 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
2339 declarations onto multiple lines to make things easier for
2340 rename_symtab.py.
2341 (lto_symtab_merge_decls_1): Likewise.
2342 (lto_symtab_merge_symbols_1): Likewise.
2343
939b37da
BI
23442013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2345
2346 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
2347 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
2348 Plus is enabled.
2349
67348ccc
DM
23502013-10-29 David Malcolm <dmalcolm@redhat.com>
2351
2352 Patch autogenerated by refactor_symtab.py from
2353 https://github.com/davidmalcolm/gcc-refactoring-scripts
2354 revision 58bb219cc090b2f4516a9297d868c245495ee622
2355
2356 * lto-partition.c (lto_promote_cross_file_statics): Update for
2357 conversion of symtab types to a true class hierarchy.
2358 (rename_statics): Likewise.
2359 (promote_symbol): Likewise.
2360 (privatize_symbol_name): Likewise.
2361 (lto_balanced_map): Likewise.
2362 (varpool_node_cmp): Likewise.
2363 (node_cmp): Likewise.
2364 (lto_1_to_1_map): Likewise.
2365 (undo_partition): Likewise.
2366 (add_symbol_to_partition): Likewise.
2367 (contained_in_symbol): Likewise.
2368 (add_symbol_to_partition_1): Likewise.
2369 (add_references_to_partition): Likewise.
2370 (symbol_partitioned_p): Likewise.
2371 (get_symbol_class): Likewise.
2372 (lto_max_map): Likewise.
2373 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
2374 (lto_symtab_merge_symbols): Likewise.
2375 (lto_symtab_merge_symbols_1): Likewise.
2376 (lto_symtab_merge_decls): Likewise.
2377 (lto_symtab_merge_decls_1): Likewise.
2378 (lto_symtab_merge_decls_2): Likewise.
2379 (lto_symtab_resolve_symbols): Likewise.
2380 (lto_symtab_resolve_can_prevail_p): Likewise.
2381 (lto_symtab_symbol_p): Likewise.
2382 (lto_symtab_resolve_replaceable_p): Likewise.
2383 (lto_symtab_merge): Likewise.
2384 (lto_varpool_replace_node): Likewise.
2385 (lto_cgraph_replace_node): Likewise.
2386 * lto.c (lto_main): Likewise.
2387 (do_whole_program_analysis): Likewise.
2388 (materialize_cgraph): Likewise.
2389 (read_cgraph_and_symbols): Likewise.
2390 (cmp_partitions_order): Likewise.
2391 (lto_materialize_function): Likewise.
2392 (has_analyzed_clone_p): Likewise.
2393
8e9055ae
AM
23942013-10-29 Andrew MacLeod <amacleod@redhat.com>
2395
ab20d992
JJ
2396 * lto-object.c: Add gimple.h to include list.
2397 * lto-partition.c: Likewise.
8e9055ae 2398
377d9792
AM
23992013-10-18 Andrew MacLeod <amacleod@redhat.com>
2400
2401 * lto.c: Remove tree-flow.h from include list.
2402
fffda8d7
RB
24032013-10-15 Richard Biener <rguenther@suse.de>
2404
2405 * lto.c (hash_canonical_type): Split out from ...
2406 (iterative_hash_canonical_type): ... here. Register types
2407 we recurse to.
2408 (gimple_canonical_type_hash): Adjust.
2409 (gimple_register_canonical_type_1): Split out from ...
2410 (gimple_register_canonical_type): ... here. Cache computed
2411 hash value.
2412 (lto_register_canonical_types): Split into two modes,
2413 clearing and computing TYPE_CANONICAL.
2414 (lto_read_decls): Adjust.
2415 (read_cgraph_and_symbols): Do two passes over global trees,
2416 first clearing then computing TYPE_CANONICAL.
2417
1394237e
RB
24182013-10-14 Richard Biener <rguenther@suse.de>
2419
2420 * lto.c (gimple_canonical_types): Move out-of GC space.
2421 (canonical_type_hash_cache): Make a pointer-map.
2422 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
2423 New counters.
2424 (iterative_hash_canonical_type): Adjust.
2425 (read_cgraph_and_symbols): Likewise.
2426 (print_lto_report_1): Likewise.
2427
0a387eca
RB
24282013-10-14 Richard Biener <rguenther@suse.de>
2429
2430 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
2431 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
2432 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
2433 gimple_types_compatible_p_1, gimple_types_compatible_p,
2434 visit, iterative_hash_name, struct type_hash_pair,
2435 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2436 gimple_type_eq, gimple_register_type, num_not_merged_types,
2437 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
2438 num_not_merged_types_in_same_scc_trees): Remove old merging code
2439 and statistics.
2440 (lto_read_decls): Do not run old merging code in parallel.
2441 (read_cgraph_and_symbols): Do not init/free old merging
2442 data structures.
2443 (print_lto_report_1): Do not report differences of old vs. new
2444 merging code.
2445
83fd5d11
RB
24462013-10-14 Richard Biener <rguenther@suse.de>
2447
2448 * lto-lang.c (lto_init): Do not re-init canonical types here.
2449 (lto_register_canonical_types): Move to ...
2450 * lto.c (lto_register_canonical_types): ... here.
2451 (gimple_canonical_types, canonical_type_hash_cache,
2452 iterative_hash_canonical_type, gimple_canonical_type_hash,
2453 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
2454 gimple_register_canonical_type): Add canonical type merging machinery
2455 moved from gimple.c.
2456 (read_cgraph_and_symbols): Init and free canonical type tables
2457 here.
2458 (print_lto_report_1): Report canonical type table stats here.
2459
acf0174b
JJ
24602013-10-11 Jakub Jelinek <jakub@redhat.com>
2461
2462 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
2463
7c6fedd2
TT
24642013-09-25 Tom Tromey <tromey@redhat.com>
2465
2466 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
2467 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
2468 (lto/lto-object.o): Remove.
2469
35f32ad4
RB
24702013-09-06 Richard Biener <rguenther@suse.de>
2471
2472 * lto-symtab.c: Move from gcc/
2473 * lto.h: Include vec.h.
2474 (lto_global_var_decls): Declare.
2475 * lto.c (lto_global_var_decls): Move definition here.
2476 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
2477 (lto-symtab.o): Add.
2478 * config-lang.in (gtfiles): Add lto.h.
2479
49322b12
JH
24802013-08-31 Jan Hubicka <jh@suse.cz>
2481
ab20d992 2482 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
49322b12
JH
2483 DECL_FIELD_OFFSET can contain an reference to variable.
2484
31f1f73b
JH
24852013-08-31 Jan Hubicka <jh@suse.cz>
2486
2487 * lto.c (tree_with_vars): Turn into vector.
2488 (MAYBE_REMEMBER_WITH_VARS): Change to...
2489 (CHECK_VAR): ... this one.
2490 (CHECK_NO_VAR): New macro.
2491 (maybe_remember_with_vars_typed): Turn to ...
2492 (mentions_vars_p_typed): ... this one.
2493 (maybe_remember_with_vars_common): Turn to ...
2494 (mentions_vars_p_comon): ... this one.
2495 (maybe_remember_with_vars_decl_minimal): Turn to ...
2496 (mentions_vars_p_decl_minmal): ... this one.
2497 (maybe_remember_with_vars_decl_common): Turn to ...
2498 (mentions_vars_p_decl_common): ... this one.
2499 (maybe_remember_with_vars_decl_with_vis): Turn to ...
2500 (mentions_vars_p_decl_with_vis): ... this one.
2501 (maybe_remember_with_vars_decl_non_common): Turn to ...
2502 (mentions_vars_p_decl_non_common): ... this one.
2503 (maybe_remember_with_vars_function): Turn to ...
2504 (mentions_vars_p_function): ... this one.
2505 (maybe_remember_with_vars_field_decl): Turn to ...
2506 (mentions_vars_p_field_decl): ... this one.
2507 (maybe_remember_with_vars_type): Turn to ...
2508 (mentions_vars_p_type): ... this one.
2509 (maybe_remember_with_vars_binfo): Turn to ...
2510 (mentions_vars_p_binfo): ... this one.
2511 (maybe_remember_with_vars_constructor): Turn to ...
2512 (mentions_vars_p_constructor): ... this one.
2513 (maybe_remember_with_vars_expr): Turn to ...
2514 (mentions_vars_p_expr): ... this one.
2515 (maybe_remember_with_vars): Turn to ...
2516 (mentions_vars_p): ... this one.
2517 (lto_read_decls): Update.
2518 (LTO_SET_PREVAIL): Do not call function for internal decls.
2519 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2520 check that something was updated.
2521 (lto_fixup_state): Do not care about internal decls.
2522 (lto_fixup_decls): Update.
2523 (read_cgraph_and_symbols): Update.
2524
256eefa9
JH
25252013-08-29 Jan Hubicka <jh@suse.cz>
2526
2527 * lto.c (read_cgraph_and_symbols): Free decl states.
2528
0170f33c
JH
25292013-08-29 Jan Hubicka <jh@suse.cz>
2530
2531 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2532 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2533 TYPE_FINAL_P.
2534
c01c111b
JH
25352013-08-28 Jan Hubicka <jh@suse.cz>
2536
2537 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2538 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2539 (unify_scc): Do checking assert.
2540
6a49f3c9
JH
25412013-08-06 Jan Hubicka <jh@suse.cz>
2542 Martin Liska <marxin.liska@gmail.com>
2543
ab20d992 2544 * lto-partition.c (lto_balanced_map): Always base order on
6a49f3c9
JH
2545 source file order.
2546
a2e2a668
JH
25472013-08-06 Jan Hubicka <jh@suse.cz>
2548
2549 * lto.c (lto_materialize_function): Do not read body anymore.
2550
815effe1
JH
25512013-08-02 Jan Hubicka <jh@suse.cz>
2552
2553 * lto.c (lto_materialize_function): Do not push struct function.
2554 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2555 (may_need_named_section_p): Even abstract origins may need
2556 named section.
2557
315f8c0e
DM
25582013-07-30 David Malcolm <dmalcolm@redhat.com>
2559
2560 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2561 PASS_MANAGER_H.
2562
2563 * lto.c (do_whole_program_analysis): Update for move of
2564 all_regular_ipa_passes from a global to a field of class
2565 pass_manager.
2566
1aa95df7
OB
25672013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2568
2569 * lto-partition.c: Fix typos.
2570
c525ba9a
JH
25712013-06-20 Jan Hubicka <jh@suse.cz>
2572
2573 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2574 partitioning of variables.
2575
7a89ad00
JH
25762013-06-20 Jan Hubicka <jh@suse.cz>
2577
2578 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2579
6a6dac52
JH
25802013-06-19 Jan Hubicka <jh@suse.cz>
2581
2582 * lto-partition.c (add_references_to_partition): Use
2583 ctor_for_folding.
2584
ac0511f2
RB
25852013-06-18 Richard Biener <rguenther@suse.de>
2586
2587 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2588 and use it.
2589 (lto_register_function_decl_in_symtab): Likewise.
2590 (cmp_tree): New function.
2591 (unify_scc): Instead of using the streamer cache map from entry
2592 to cache index match up the two maps we have by sorting them.
2593 Adjust calls to lto_register_var_decl_in_symtab and
2594 lto_register_function_decl_in_symtab.
2595
ee03e71d
RB
25962013-06-17 Richard Biener <rguenther@suse.de>
2597
2598 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2599 * lto.c: Include data-streamer.h.
2600 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2601 (gimple_type_leader_entry_s, gimple_type_leader,
2602 gimple_lookup_type_leader): Remove.
2603 (gtc_visit): Simplify.
2604 (gimple_types_compatible_p): Likewise.
2605 (gimple_register_type_1): Likewise. Merge into ...
2606 (gimple_register_type): ... this. Keep it as legacy for
2607 statistics purposes for now.
2608 (fixup_integer_cst): Remove.
2609 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2610 rename to ...
2611 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2612 maybe_remember_with_vars_*): ... these.
2613 (uniquify_nodes): Remove.
2614 (lto_fixup_prevailing_type): New function.
2615 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2616 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2617 (num_merged_types, num_prevailing_types, num_not_merged_types,
2618 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2619 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2620 num_scc_compare_collisions): New global counters.
2621 (compare_tree_sccs_1): New function.
2622 (compare_tree_sccs): Likewise.
2623 (unify_scc): Likewise.
2624 (lto_read_decls): Stream in tree SCCs and unify them on the
2625 way in. Finalize prevailing SCC tree members.
2626 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2627 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2628 to ggc-collect during merging.
2629 (print_lto_report_1): Adjust for new merging code.
2630
ca0f62a8
JH
26312013-06-12 Jan Hubicka <jh@suse.cz>
2632
2633 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2634
bbf9ad07
JH
26352013-06-12 Jan Hubicka <jh@suse.cz>
2636
2637 * lto.c (register_resolution): Take lto_file_data argument.
2638 (lto_register_var_decl_in_symtab,
2639 lto_register_function_decl_in_symtab): Update.
2640 (read_cgraph_and_symbols): Update resolution_map handling.
2641
ecdbd01a 26422013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2643
2644 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2645 (add_symbol_to_partition_1): Likewise.
2646 (contained_in_symbol): Likewise.
2647 (lto_balanced_map): Likewise.
2648 (rename_statics): Drop weakref.
2649
a367df53
RB
26502013-06-05 Richard Biener <rguenther@suse.de>
2651
2652 * lto.c (num_merged_types): New global variable.
2653 (uniquify_nodes): Increase num_merged_types when merging a type.
2654 (print_lto_report_1): Output the number of merged types.
2655
40a7fe1e
JH
26562013-06-01 Jan Hubicka <jh@suse.cz>
2657
2658 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2659 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2660 (do_whole_program_analysis): Update dumping.
2661
e70670cf
JH
26622013-05-29 Jan Hubicka <jh@suse.cz>
2663
2664 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2665 flags.
2666 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2667
8ee05051
JH
26682013-05-15 Jan Hubicka <jh@suse.cz>
2669
2670 * lto-partition.c (privatize_symbol_name): Return true when
2671 privatizing happened.
2672 (rename_statics): Do not go into infinite loop when privatizing
2673 is not needed.
2674
427b248d
JM
26752013-05-16 Jason Merrill <jason@redhat.com>
2676
2677 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2678
9de04252
MJ
26792013-05-15 Martin Jambor <mjambor@suse.cz>
2680
2681 * lto-partition.c (lto_balanced_map): Print symbol order instead
2682 of node uids.
2683
2d6e4603
JH
26842013-05-15 Jan Hubicka <jh@suse.cz>
2685
2686 PR lto/57038
2687 PR lto/47375
2688 * lto-partition.c (get_symbol_class): Fix weakrefs.
2689 (lto_balanced_map): Fix weakrefs.
2690 (privatize_symbol_name): Remove unnecesary label.
2691 (rename_statics): Handle weakrefs as statics.
2692
64cfa6c0
JH
26932013-05-09 Jan Hubicka <jh@suse.cz>
2694 Richard Biener <rguenther@suse.de>
2695
2696 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2697 (lto_register_var_decl_in_symtab): Likewise.
2698 (lto_main): Promote statics.
2699 * lto-partition.c (privatize_symbol_name): New function.
2700 (promote_symbol): Use it.
2701 (may_need_named_section_p): New predicate.
2702 (rename_statics): New functions.
2703 (lto_promote_cross_file_statics): Simplify; do renaming.
2704 (lto_promote_statics_nonwpa): New function.
2705 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2706
e45cde98
RB
27072013-02-08 Richard Biener <rguenther@suse.de>
2708
2709 PR lto/56231
2710 * lto-lang.c (lto_init): Do not enter a dummy file.
2711
6edc3e32
UB
27122013-02-07 Uros Bizjak <ubizjak@gmail.com>
2713
2714 PR bootstrap/56227
2715 * lto.c (lto_resolution_ready): Use %wx instead of
2716 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2717
ed73881e
RG
27182013-02-04 Richard Guenther <rguenther@suse.de>
2719
2720 PR lto/56168
2721 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2722 or lto_fixup_decls at LTRANS time.
2723
a19b1432
JH
27242013-01-09 Jan Hubicka <jh@suse.cz>
2725
2726 PR lto/45375
2727 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2728
49c01f87
L
27292012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2730
2731 PR lto/55466
2732 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2733 variables.
2734 (lto_main): Record the global variables if WPA isn't enabled.
2735
6e1aa848
DN
27362012-11-20 Diego Novillo <dnovillo@google.com>
2737 Jakub Jelinek <jakub@redhat.com>
2738
2739 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2740
9771b263
DN
27412012-11-16 Diego Novillo <dnovillo@google.com>
2742
2743 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2744
2745 * lto-lang.c: Use new vec API in vec.h.
2746 * lto-partition.c: Likewise.
2747 * lto-partition.h: Likewise.
2748 * lto.c: Likewise.
2749
24551b9c
LC
27502012-10-31 Lawrence Crowl <crowl@google.com>
2751
2752 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2753 down-cast via dyn_cast.
2754 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2755 (undo_partition): Likewise.
2756 (lto_balanced_map): Likewise.
2757 (get_symbol_class): Likewise and via is_a.
2758 (lto_balanced_map): Change symtab checking to is_a.
2759
aec06f6f
RB
27602012-10-12 Richard Biener <rguenther@suse.de>
2761
2762 PR lto/54898
2763 * lto.c (gimple_types_compatible_p_1): Also compare
2764 TYPE_MAIN_VARIANT.
2765 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2766
0b8c30f9
TB
27672012-10-09 Tobias Burnus <burnus@net-b.de>
2768
2769 * lto-lang.c (lto_register_builtin_type): Avoid useless
2770 decl creation.
2771 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2772
da3202a8
TB
27732012-10-08 Tobias Burnus <burnus@net-b.de>
2774
2775 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2776 Free lto_file struct after closing the file.
2777
2512a443
JH
27782012-10-08 Jan Hubicka <jh@suse.cz>
2779
ab20d992 2780 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2512a443
JH
2781 (fixup_integer_cst): New functoin.
2782 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2783
e75f8f79
JH
27842012-10-07 Jan Hubicka <jh@suse.cz>
2785
2786 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2787 release input encoders.
2788 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2789
46591697
JH
27902012-10-06 Jan Hubicka <jh@suse.cz>
2791
ab20d992 2792 PR lto/54790
46591697
JH
2793 * lto.c (resolution_map): New static var.
2794 (register_resolution): New function.
2795 (lto_register_var_decl_in_symtab): Use it.
2796 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2797
af16bc76
MJ
27982012-09-20 Martin Jambor <mjambor@suse.cz>
2799
2800 * lto.c (lto_materialize_function): Call push_struct_function and
2801 pop_cfun.
2802
5368224f
DC
28032012-09-19 Dehao Chen <dehao@google.com>
2804
ab20d992 2805 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
5368224f 2806
b5493fb2
JH
28072012-09-19 Jan Hubicka <jh@suse.cz>
2808
2809 * lto.c (lto_materialize_function): Update confused comment.
2810 (read_cgraph_and_symbols): Do not free symtab.
2811
c3c445e1
JH
28122012-09-12 Jan Hubicka <jh@suse.cz>
2813
2814 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2815 AUX pointer cleaning. Add max partitioning.
2816 * lto-partition.c (enum symbol_class): New.
2817 (get_symbol_class): New function.
2818 (symbol_partitioned_p): New function.
2819 (add_references_to_partition): Remove.
2820 (add_aliases_to_partition): Remove.
2821 (add_cgraph_node_to_partition_1): Remove.
2822 (add_cgraph_node_to_partition): Remove.
2823 (add_symbol_to_partition): New function.
2824 (add_symbol_to_partition_1): New function.
2825 (contained_in_symbol): New function.
2826 (partition_cgraph_node_p): Remove.
2827 (partition_varpool_node_p): Remove.
2828 (partition_symbol_p): Remove.
2829 (lto_1_to_1_map): Cleanup.
2830 (lto_max_map): New.
2831 (lto_balanced_map): Update.
2832 (lto_promote_cross_file_statics): Update.
2833 * lto-partition.h (lto_max_map): Declare.
2834 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2835
b5c7cdfb
JH
28362012-09-11 Jan Hubicka <jh@suse.cz>
2837
2838 PR lto/54312
2839 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2840 type is variant leader.
2841
b29402f0
RG
28422012-09-11 Richard Guenther <rguenther@suse.de>
2843
2844 * lto.c (enum gtc_mode): Remove.
2845 (struct type_pair_d): Adjust.
2846 (lookup_type_pair): Likewise.
2847 (gimple_type_leader): Do not mark as deletable.
2848 (gimple_lookup_type_leader): Adjust.
2849 (gtc_visit): Likewise.
2850 (gimple_types_compatible_p_1): Likewise.
2851 (gimple_types_compatible_p): Likewise.
2852 (gimple_type_hash): Likewise.
2853 (gimple_register_type): Likewise.
2854 (read_cgraph_and_symbols): Manage lifetime of tables
2855 here.
2856
b8f4e58f
RG
28572012-09-11 Richard Guenther <rguenther@suse.de>
2858
2859 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2860 struct type_pair_d, lookup_type_pair, struct sccs,
2861 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2862 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2863 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2864 visit, iterative_hash_name, struct type_hash_pair,
2865 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2866 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2867 Move here from gimple.c
2868 (read_cgraph_and_symbols): Free hash tables here.
2869 (print_lto_report_1): New function wrapping print_lto_report.
2870 (do_whole_program_analysis): Call it.
2871 (lto_main): Likewise.
2872
1cdbb3f9
JH
28732012-09-10 Jan Hubicka <jh@suse.cz>
2874
2875 * lto-partition.c (partition_symbol_p): Forward declare.
2876 (add_references_to_partition): Reimplement using partition_symbol_p.
2877 (add_aliases_to_partition): Break out from add_references_to_partition;
2878 reimplement using partition_symbol_p.
2879 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2880 add sanity checks.
2881 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2882 (partition_varpool_node_p): Do not special case aliases.
2883
b4661bfe
JH
28842012-08-12 Jan Hubicka <jh@suse.cz>
2885
2886 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2887 it is deleted after streaming.
2888 * lto-partition.c (partition_symbol_p): New function.
2889 (promote_var, promote_fn): Remove.
2890 (promote_symbol): New function.
2891 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2892 to lookup the actual boundaries instead of computing them ad-hoc.
2893
7b99cca4
JH
28942012-08-12 Jan Hubicka <jh@suse.cz>
2895
2896 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2897 in partitioning.
2898 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2899 by encoder.
2900 * lto-partition.c (new_partition): Update.
2901 * lto.c (cmp_partitions_order): Update.
2902 (lto_wpa_write_files): Update.
2903 (free_ltrans_partitions): Update.
2904 (add_references_to_partition): Update.
2905 (add_cgraph_node_to_partition_1): Update.
2906 (add_cgraph_node_to_partition): Update.
2907 (add_varpool_node_to_partition): Update.
2908 (undo_partition): Update.
2909 (lto_balanced_map): Update.
2910 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2911 set_referenced_from_this_partition_p): Update.
2912 (lto_promote_cross_file_statics): Update.
2913
f27c1867
JH
29142012-08-12 Jan Hubicka <jh@suse.cz>
2915
2916 * lto-partition.c (set_referenced_from_other_partition_p,
2917 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2918 New functions.
2919 (lto_promote_cross_file_statics): Use them.
2920
ab96cc5b
JH
29212012-07-24 Jan Hubicka <jh@suse.cz>
2922
2923 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2924
0229aee9
UB
29252012-07-24 Uros Bizjak <ubizjak@gmail.com>
2926
2927 * lto-tree.h (lang_decl): Add variable_size GTY option.
2928
7ee2468b
SB
29292012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2930
2931 * lto.c: Do not include timevar.h.
2932 * Make-lang.in: Fix dependencies.
2933
a910399d
LC
29342012-06-18 Lawrence Crowl <crowl@google.com>
2935
ab20d992 2936 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2937 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2938 to lto_wpa_write_files.
ab20d992 2939 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
a910399d
LC
2940 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2941 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2942 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2943 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2944 to be a front end, but is not one.
2945
877ab5e9
JH
29462012-05-18 Jan Hubicka <jh@suse.cz>
2947
2948 * lto.c (lto_materialize_constructors_and_inits): Remove.
2949 (read_cgraph_and_symbols): Remove handling of alias pairs.
2950
6649df51
JH
29512012-05-17 Jan Hubicka <jh@suse.cz>
2952
2953 * lto-partition.c (add_references_to_partition): Handle external vars.
2954 (partition_varpool_node_p): Likewise.
2955 (lto_promote_cross_file_statics): Do not promote externals.
2956
d1ede5f4
BS
29572012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2958
2959 * lto-lang.c (handle_fnspec_attribute): New static function.
2960 (lto_attribute_table): Add "fn spec".
2961 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2962
0d6bf48c
JH
29632012-05-04 Jan Hubicka <jh@suse.cz>
2964
2965 * lto.c (do_whole_program_analysis): Set timevars correctly.
2966 (lto_main): Likewise.
d1ede5f4 2967
1d67dde8
RB
29682012-05-04 Richard Guenther <rguenther@suse.de>
2969
2970 * lang.opt (fwpa): Do not mark as Optimization.
2971 (fltrans): Likewise.
2972
65d630d4
JH
29732012-04-30 Jan Hubicka <jh@suse.cz>
2974
2975 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2976 * lto-partition.c (partition_cgraph_node_p): Use
2977 symtab_used_from_object_file_p.
65d630d4
JH
2978 (partition_varpool_node_p): Likewise.
2979
ead84f73
JH
29802012-04-20 Jan Hubicka <jh@suse.cz>
2981
2982 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2983
5932a4d4
JH
29842012-04-18 Jan Hubicka <jh@suse.cz>
2985
2986 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2987 Update for new ipa-ref API.
2988
65c70e6b
JH
29892012-04-16 Jan Hubicka <jh@suse.cz>
2990
2991 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2992 walkers to walk cgraph and varpool.
65c70e6b
JH
2993 (materialize_cgraph): Likewise.
2994 * lto-partition.c (lto_1_to_1_map): Likewise.
2995 (lto_balanced_map): Likewise.
2996 (lto_promote_cross_file_statics): Likewise.
2997
960bfb69
JH
29982012-04-14 Jan Hubicka <jh@suse.cz>
2999
3000 * lto.c: Update field referenced for new cgraph/varpool layout.
3001 * lto-partition.c: Likewise.
3002
a66dc285
JH
30032012-04-11 Jan Hubicka <jh@suse.cz>
3004
3005 * lto.c: Update copyright; remove params.h, ipa-inline.h
3006 and ipa-utils.h inlines; inline lto-partition.h
3007 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
3008 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
3009 add_references_to_partition, add_cgraph_node_to_partition_1,
3010 add_cgraph_node_to_partition, add_varpool_node_to_partition,
3011 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
3012 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
3013 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
3014 * lto-partition.c: ... here; new file.
3015 * lto-partition.h: New file.
3016 * Make-lang.in (lto.o): Update dependencies.
3017 (lto-partition.o): New.
3018
f3b249e5
RG
30192012-04-05 Richard Guenther <rguenther@suse.de>
3020
3021 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
3022 definition.
3023
21fa2faf
RG
30242012-03-12 Richard Guenther <rguenther@suse.de>
3025
3026 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
3027
6bb485a3
RG
30282012-03-06 Richard Guenther <rguenther@suse.de>
3029
3030 PR lto/52097
3031 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
3032
95510497
RG
30332012-02-28 Richard Guenther <rguenther@suse.de>
3034
3035 PR lto/52400
3036 * lto.c (lto_register_function_decl_in_symtab): Do not register
3037 a reverse renamed decl mapping.
3038
09228fef
JJ
30392012-01-06 Jakub Jelinek <jakub@redhat.com>
3040
3041 PR lto/51774
3042 * lto-lang.c (handle_returns_twice_attribute): New function.
3043 (lto_attribute_table): Add returns_twice attribute.
3044
b03eda0d
RG
30452011-12-21 Richard Guenther <rguenther@suse.de>
3046
3047 * lto.c (GIMPLE_REGISTER_TYPE): New define.
3048 (LTO_FIXUP_TREE): Use it.
3049 (uniquify_nodes): Mark new non-prevailing types and avoid
3050 calling gimple_register_type on others.
3051 (lto_read_decls): Add comment.
3052
4ad9a9de
EB
30532011-12-13 Eric Botcazou <ebotcazou@adacore.com>
3054
3055 * lto.h (lto_parse_hex): Delete.
3056 * lto.c (lto_read_decls): Use 'int' for offsets.
3057 (lto_parse_hex): Make static and return proper 64-bit host type.
3058 (lto_resolution_read): Use proper 64-bit host type.
3059
ea973bad
RG
30602011-12-13 Richard Guenther <rguenther@suse.de>
3061
3062 PR lto/48354
3063 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
3064 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
3065
c8218030
UB
30662011-12-01 Uros Bizjak <ubizjak@gmail.com>
3067
3068 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
3069 (ignore_attribute): New.
3070
57ac2606
AH
30712011-11-21 Aldy Hernandez <aldyh@redhat.com>
3072
3073 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
3074 (handle_transaction_pure_attribute): New.
3075
52a35ef7
RG
30762011-11-03 Richard Guenther <rguenther@suse.de>
3077
3078 PR lto/44965
3079 * lto-lang.c (lto_post_options): Do not read file options.
3080 * lto.c (lto_read_all_file_options): Remove.
3081 (lto_init): Call lto_set_in_hooks here.
3082
51973b1e
JH
30832011-10-09 Jan Hubicka <jh@suse.cz>
3084
3085 * lto.c (node_cmp, varpool_node_cmp): New functions.
3086 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
3087 (cmp_partitions): Rename to ...
3088 (cmp_partitions_size): ... this one.
3089 (cmp_partitions_order): New function.
3090 (lto_wpa_write_files): Sort partitions by order when
3091 -fno-toplevel-reorder is used.
3092
5958009b
AK
30932011-10-09 Andi Kleen <ak@linux.intel.com>
3094
3095 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
3096
e79983f4
MM
30972011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3098
3099 * lto-lang.c (def_builtin_1): Delete old interface with two
3100 parallel arrays to hold standard builtin declarations, and replace
3101 it with a function based interface that can support creating
3102 builtins on the fly in the future. Change all uses, and poison
3103 the old names. Make sure 0 is not a legitimate builtin index.
3104
ecdbd01a 31052011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
3106
3107 * lto-object.c (lto_obj_add_section_data): Add list.
3108 (lto_obj_add_section): Fill in list.
3109 (ltoobj_build_section_table): Pass through list.
3110 * lto.c (file_data_list): Declare.
3111 (create_subid_section_table): Pass arguments directly.
3112 Fill in list of file_datas.
3113 (lwstate): Delete.
3114 (lto_create_files_from_ids): Pass in direct arguments.
3115 Don't maintain list.
3116 (lto_file_read): Use explicit section and file data lists.
3117 (lto_read_all_file_options): Pass in section_list.
3118 * lto.h (lto_obj_build_section_table): Add list.
3119 (lto_section_slot): Add next.
3120 (lto_section_list): Declare.
3121
ed0d2da0
JH
31222011-10-02 Jan Hubicka <jh@suse.cz>
3123
3124 PR lto/47247
3125 * common.c (lto_resolution_str): Add new resolution.
3126 * common.h (lto_resolution_str): Likewise.
3127
ad7715f3
L
31282011-09-30 H.J. Lu <hongjiu.lu@intel.com>
3129 Andi Kleen <ak@linux.intel.com>
3130
3131 PR lto/50568
3132 * lto.c (lto_splay_tree_delete_id): New.
3133 (lto_splay_tree_compare_ids): Likewise.
3134 (lto_splay_tree_lookup): Likewise.
3135 (lto_splay_tree_id_equal_p): Likewise.
3136 (lto_splay_tree_insert): Likewise.
3137 (lto_splay_tree_new): Likewise.
3138 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
3139 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
3140 (create_subid_section_table): Use lto_splay_tree_lookup and
3141 lto_splay_tree_insert.
3142 (lto_file_read): Use lto_splay_tree_new.
3143
ecdbd01a 31442011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
3145
3146 * lto.c (lto_resolution_read): Remove id dumping.
3147 (lto_section_with_id): Turn id HOST_WIDE_ID.
3148 (create_subid_section_table): Dito.
3149
892a371f
DS
31502011-08-28 Dodji Seketeli <dodji@redhat.com>
3151
3152 * lto-lang.c (lto_init): Likewise. Also, avoid calling
3153 linemap_add twice.
3154
f82d1a94
MJ
31552011-08-11 Martin Jambor <mjambor@suse.cz>
3156
3157 * lto.c (uniquify_nodes): Use main variant's BINFO too.
3158
f0efc7aa
DN
31592011-08-08 Diego Novillo <dnovillo@google.com>
3160
3161 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
3162 * lto.c: Include tree-streamer.h.
3163
1a072294
RG
31642011-07-06 Richard Guenther <rguenther@suse.de>
3165
3166 * lto-lang.c (lto_init):
3167 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
3168
7496868d
JH
31692011-06-11 Jan Hubicka <jh@suse.cz>
3170
10f13f22 3171 PR lto/48246
7496868d
JH
3172 * lto.c (lto_1_to_1_map): Don't create empty partitions.
3173 (lto_balanced_map): Likewise.
3174
39e2db00
JH
31752011-06-11 Jan Hubicka <jh@suse.cz>
3176
3177 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
3178 (add_cgraph_node_to_partition) ... here; walk aliases.
3179 (lto_1_to_1_map): Remove same body alias code.
3180 (promote_fn): Likewise.
3181 (lto_promote_cross_file_statics): Update comment.
3182
28628ea6
DN
31832011-06-07 Diego Novillo <dnovillo@google.com>
3184
3185 * lto.c (uniquify_nodes): Move code to register decls to
3186 the loop that computes canonical types.
3187
009db074
RG
31882011-06-07 Richard Guenther <rguenther@suse.de>
3189
3190 * lto-lang.c (lto_init): Do not set
3191 size_type_node or call set_sizetype.
3192
47c79d56
DN
31932011-06-04 Diego Novillo <dnovillo@google.com>
3194
3195 * lto.c (lto_init): New.
3196 (lto_main): Call it.
3197
d5828cc7
DN
31982011-06-03 Diego Novillo <dnovillo@google.com>
3199
3200 * lto.c (get_resolution): Move from lto-streamer-in.c.
3201 (lto_register_var_decl_in_symtab): Likewise.
3202 (lto_register_function_decl_in_symtab): Likewise.
3203 (uniquify_nodes): Call lto_register_var_decl and
3204 lto_register_function_decl_in_symtab after reading a new
3205 VAR_DECL or FUNCTION_DECL.
3206
6807da97
RG
32072011-06-01 Richard Guenther <rguenther@suse.de>
3208
3209 * lto-lang.c (lto_register_canonical_types): New function.
3210 (lto_init): Register common nodes with the canonical type machinery.
3211 Do not play tricks with char_type_node.
3212
d74be317
RG
32132011-05-26 Richard Guenther <rguenther@suse.de>
3214
3215 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
3216
d9f8303f
NF
32172011-05-25 Nathan Froyd <froydnj@codesourcery.com>
3218
3219 * lto.c (lto_ft_typed): New function.
3220 (lto_ft_common): Call it.
3221 (lto_ft_constructor): Likewise.
3222 (lto_ft_expr): Likewise.
3223 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
3224 TREE_CHAIN.
3225
fb291a1e
RG
32262011-05-20 Richard Guenther <rguenther@suse.de>
3227
3228 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
3229 (lto_ft_type): Move main-variant and pointer-to chain building ...
3230 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
3231 in a separate final loop.
3232
31b3ca64
RG
32332011-05-19 Richard Guenther <rguenther@suse.de>
3234
3235 * lto.c (uniquify_nodes): First register all types before
3236 fixing up the tree SCC.
3237
35d828c5
JH
32382011-05-11 Jan Hubicka <jh@suse.cz>
3239
3240 PR lto/48952
3241 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
3242
51545682
NF
32432011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3244
3245 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
3246 location of binfo field.
3247 (lto_fixup_prevailing_decls): Likewise.
3248
8242dd04
NF
32492011-05-10 Nathan Froyd <froydnj@codesourcery.com>
3250
3251 * lto-lang.c (def_fn_type): Don't call build_function_type, call
3252 build_function_type_array or build_varargs_function_type_array
3253 instead.
3254
c99c0026
EB
32552011-05-07 Eric Botcazou <ebotcazou@adacore.com>
3256
3257 * lto-lang.c (global_bindings_p): Return bool.
3258
c47d0034
JH
32592011-05-07 Jan Hubicka <jh@suse.cz>
3260
a9bcb3f0
EB
3261 * lto.c (lto_materialize_function): Use
3262 cgraph_function_with_gimple_body_p.
3263 (add_cgraph_node_to_partition): Do not re-add items to partition;
3264 handle thunks.
c47d0034
JH
3265 (add_varpool_node_to_partition): Do not re-add items to partition.
3266
bb3398ca
JH
32672011-05-03 Jan Hubicka <jh@suse.cz>
3268
3269 * lto.c (free_ltrans_partitions): Fix accidental commit.
3270
1cb1a99f
JH
32712011-05-03 Jan Hubicka <jh@suse.cz>
3272
3273 * lto.c (ltrans_partition_def): Remove GTY annotations.
3274 (ltrans_partitions): Move to heap.
3275 (new_partition): Update.
3276 (free_ltrans_partitions): New function.
3277 (lto_wpa_write_files): Use it.
3278
af8bca3c
MJ
32792011-04-29 Martin Jambor <mjambor@suse.cz>
3280
3281 * lto.c: Include ipa-utils.h.
3282 (lto_balanced_map): Update call to ipa_reverse_postorder.
3283 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
3284
b823cdfe
MM
32852011-04-29 Michael Matz <matz@suse.de>
3286
3287 * lto.c (toplevel): Include tree-flow.h.
3288 (lto_read_in_decl_state): Don't merge types here.
3289 (tree_with_vars): New static hash table.
3290 (remember_with_vars): New static functions.
3291 (LTO_FIXUP_TYPE): New macro.
3292 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
3293 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
3294 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
3295 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
3296 (lto_read_decls): Uniquify while reading in trees.
3297 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
3298 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
3299 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
3300 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
3301 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
3302 lto_fixup_tree): Remove.
3303 (lto_fixup_state): Remove data argument. Use
3304 lto_symtab_prevailing_decl.
3305 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
3306 (lto_fixup_prevailing_decls): New function.
3307 (lto_fixup_state_aux): Argument aux is unused.
3308 (lto_fixup_decls): Don't allocate pointer sets, don't use
3309 lto_fixup_tree, use lto_fixup_prevailing_decls.
3310 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
3311 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
3312
b9843260
EB
33132011-04-16 Eric Botcazou <ebotcazou@adacore.com>
3314
3315 * lto.c (lto_balanced_map): Fix typos in head comment.
3316 (lto_promote_cross_file_statics): Fix long lines and remove redundant
3317 test.
3318
e7f23018
JH
33192011-04-16 Jan Hubicka <jh@suse.cz>
3320
3321 * lto.c (lto_balanced_map): Update.
3322
10a5dd5d
JH
33232011-04-14 Jan Hubicka <jh@suse.cz>
3324
3325 * lto.c: Include ipa-inline.h
b9843260
EB
3326 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
3327 accessor.
10a5dd5d
JH
3328 (ipa_node_duplication_hook): Fix declaration.
3329 * Make-lang.in (lto.o): Update dependencies.
3330
81f653d6
NF
33312011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3332
3333 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
3334 calling TREE_CHAIN.
3335 * lto.c (lto_fixup_common): Likewise.
3336
dcf0c47e
NF
33372011-04-08 Nathan Froyd <froydnj@codesourcery.com>
3338
3339 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
3340 (handle_type_generic_attribute): Likewise.
3341
e89964e3
MM
33422011-04-03 Michael Matz <matz@suse.de>
3343
3344 * lto.c (lto_materialize_function): Don't read and then discard
3345 sections in WPA mode.
3346 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
3347
3348 * lto-lang.c (registered_builtin_fndecls): Remove.
3349 (lto_getdecls): Return NULL_TREE.
3350 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
3351
d2b3fe18
RG
33522011-03-31 Richard Guenther <rguenther@suse.de>
3353
3354 PR lto/48246
3355 * lto.c (lto_wpa_write_files): Disable assert for non-empty
3356 partitions when checking is not enabled.
3357
ba78087b
KT
33582011-03-25 Kai Tietz <ktietz@redhat.com>
3359
3360 * lto.c (lto_resolution_read): Use filename_cmp instead
3361 of strcmp.
3362 (lto_read_section_data): Likewise.
3363
0edf1bb2
JL
33642011-03-25 Jeff Law <law@redhat.com>
3365
ab20d992 3366 * lto-lang.c (def_fn_type): Add missing va_end.
0edf1bb2 3367
62d784f7
KT
33682011-03-21 Kai Tietz <ktietz@redhat.com>
3369
3370 PR target/12171
3371 * lto-lang.c (lto_attribute_table): Adjust table.
3372
62dd9571
JJ
33732011-02-18 Jakub Jelinek <jakub@redhat.com>
3374
3375 PR bootstrap/47807
3376 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
3377 of lto-streamer.h.
3378
237d6259
RG
33792011-02-18 Richard Guenther <rguenther@suse.de>
3380
3381 PR lto/47798
3382 * lto-tree.h (lto_global_var_decls): Do not declare here.
3383 * lto-lang.c: Include lto-streamer.h.
3384 * Make-lang.in (lto-lang.o): Adjust dependencies.
3385
8ead2223
KT
33862011-02-10 Kai Tietz <kai.tietz@onevision.com>
3387
3388 PR lto/47241
3389 * lto.c (lto_read_section_data): Free
3390 fd_name in failure case.
3391 For mingw targets don't hash file-descriptor.
3392 (read_cgraph_and_symbols): Close current_lto_file
3393 in failure case.
3394
6e701822
JH
33952011-01-11 Jan Hubicka <jh@suse.cz>
3396
3397 PR lto/45721
3398 PR lto/45375
b9843260
EB
3399 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
3400 are not partitioned.
6e701822 3401
f4da8dce
NF
34022010-12-22 Nathan Froyd <froydnj@codesourcery.com>
3403
3404 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
3405 Use prototype_p.
3406
6b7fb143
RG
34072010-12-06 Richard Guenther <rguenther@suse.de>
3408
3409 PR lto/46796
3410 * lto-lang.c (lto_init): Give names to basic types.
3411
c59ffc41
JM
34122010-11-30 Joseph Myers <joseph@codesourcery.com>
3413
3414 * lto-object.c: Don't include toplev.h.
3415 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
3416
7c475d11
JM
34172010-11-30 Joseph Myers <joseph@codesourcery.com>
3418
3419 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
3420 $(TOPLEV_H).
3421
71f3e391
JM
34222010-11-29 Joseph Myers <joseph@codesourcery.com>
3423
3424 * lto-endian.h: Delete.
3425 * lto-object.c: Don't include "libiberty.h".
3426 (O_BINARY): Don't define.
3427 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
3428 (O_BINARY): Don't define.
3429
9f1718b0
RG
34302010-11-23 Richard Guenther <rguenther@suse.de>
3431
3432 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
3433
39c4e298
RG
34342010-11-23 Richard Guenther <rguenther@suse.de>
3435
3436 PR lto/46605
3437 * lto.c (read_cgraph_and_symbols): Bail out after errors.
3438
b37421c6
JM
34392010-11-17 Joseph Myers <joseph@codesourcery.com>
3440
3441 * lto.c (lto_main): Take no arguments.
3442 * lto.h (lto_main): Update prototype.
3443
d82f74d3
ILT
34442010-11-16 Ian Lance Taylor <iant@google.com>
3445
3446 * lto-object.c (lto_obj_file_open): Call
3447 simple_object_attributes_merge rather than
3448 simple_object_attributes_compare.
3449
a4d8c676
JM
34502010-11-12 Joseph Myers <joseph@codesourcery.com>
3451
3452 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
3453 * lto-lang.c (lto_handle_option): Take location_t parameter.
3454
d8a07487
JM
34552010-11-10 Joseph Myers <joseph@codesourcery.com>
3456
3457 * lto.c (lto_resolution_read): Start diagnostics with lowercase
3458 letters and remove trailing '.'.
3459 (lto_file_finalize): Start diagnostic with a lowercase letter.
3460
6b3456d1
ILT
34612010-11-02 Ian Lance Taylor <iant@google.com>
3462
3463 * lto-object.c: New file.
3464 * lto-elf.c: Remove file.
3465 * lto-macho.c: Remove file.
3466 * lto-macho.h: Remove file.
3467 * lto-coff.c: Remove file.
3468 * lto-coff.h: Remove file.
3469 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
3470 lto/lto-object.o.
3471 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
3472 (lto/lto-objfile.o): New target.
3473 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
3474 (lto/lto.o): Remove $(LIBIBERTY_H).
3475
030cd86c
JH
34762010-10-22 Jan Hubicka <jh@suse.cz>
3477
3478 * lto.c (add_cgraph_node_to_partition,
3479 add_varpool_node_to_partition): Add debug info.
3480 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
3481 partitioned nodes.
3482 (do_whole_program_analysis): Set function flags before dumping.
3483
4490cae6
RG
34842010-10-22 Richard Guenther <rguenther@suse.de>
3485
3486 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
3487 the new gimple_register_canonical_type.
3488
703cdce3
L
34892010-10-20 H.J. Lu <hongjiu.lu@intel.com>
3490
3491 PR bootstrap/45954
3492 * config-lang.in (boot_language): Set to $enable_lto.
3493
1915c739
JJ
34942010-10-18 Jakub Jelinek <jakub@redhat.com>
3495
3496 PR lto/45638
3497 * Make-lang.in (check-lto): New dummy target.
3498
82971de5
EB
34992010-10-14 Eric Botcazou <ebotcazou@adacore.com>
3500
3501 * lto-elf.c (SHN_XINDEX): Define if not already defined.
3502
a75bfaa6
JM
35032010-10-08 Joseph Myers <joseph@codesourcery.com>
3504
3505 * lto-lang.c (lto_init_options): Change to
3506 lto_init_options_struct. Update parameters.
3507 (LANG_HOOKS_INIT_OPTIONS): Don't define.
3508 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
3509
937f7f69
JH
35102010-10-06 Jan Hubicka <jh@suse.cz>
3511
3512 * lto.c (lto_balanced_map): Fix accounting of program size.
3513
2169830c
JH
35142010-10-06 Jan Hubicka <jh@suse.cz>
3515
3516 * lto.c (lto_balanced_map): Do not produce empty partitions.
3517
ecdbd01a 35182010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
3519
3520 * lto.c (lto_process_name): Add.
3521 (lto_main): Call lto_process_name.
3522
06ed016f
JH
35232010-10-06 Jan Hubicka <jh@suse.cz>
3524
3525 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3526 COMDATs required by the linker.
3527
ae718d66
ILT
35282010-10-05 Ian Lance Taylor <iant@google.com>
3529
3530 * lto.c (lto_section_with_id): Make s a const pointer.
3531
852e4bd2
JH
35322010-10-05 Jan Hubicka <jh@suse.cz>
3533
ab20d992 3534 * lto.c: Include params.h.
852e4bd2
JH
3535 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3536 refcounting in aux field.
3537 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3538 New functions.
3539 (lto_1_to_1_map): Simplify.
3540 (lto_balanced_map): New function.
3541 (do_whole_program_analysis): Chose proper partitioning alg.
3542 * Make-lang.in (lto.o): Add dependency on params.h
3543
ecdbd01a 35442010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
3545
3546 * Make-lang.in (lto1): Add + to build rule.
3547
ecdbd01a 35482010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
3549
3550 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
3d3b561f 3551 with fatal_error.
f1e92a43 3552
0d6e14fd
JH
35532010-09-28 Jan Hubicka <jh@suse.cz>
3554
3555 * lto-lang.c (handle_leaf_attribute): New function.
3556 (lto_attribute_tables): Add leaf.
3557
fb462383
JZ
35582010-09-25 Jie Zhang <jie@codesourcery.com>
3559
3560 * lto.c (lto_read_all_file_options): Start a new line after
3561 printing out file names.
3562
051f8cc6
JH
35632010-09-24 Jan Hubicka <jh@suse.cz>
3564
3565 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3566
64e0f5ff
JH
35672010-09-20 Jan Hubicka <jh@suse.cz>
3568
3569 PR tree-optimize/45605
3570 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3571
a929ec3d
GP
35722010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3573
3574 * lto-elf.c (lto_obj_file_open): Also provide filename when
3575 elf_begin fails.
3576
4c588abf
JH
35772010-09-17 Jan Hubicka <jh@suse.cz>
3578
3579 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3580
c3224d6f
RG
35812010-09-17 Richard Guenther <rguenther@suse.de>
3582
3583 * lang.opt (flag_wpa): Also enable for the driver.
3584
52b3b3c7
JH
35852010-09-16 Jan Hubicka <jh@suse.cz>
3586
3587 * lto.c (lto_materialize_function): Do not tamper with STATIC and
ab20d992 3588 EXTERNAL flags.
52b3b3c7 3589
969c37b7
LB
35902010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3591
3592 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3593
098a4f50
JH
35942010-09-08 Jan Hubicka <jh@suse.cz>
3595
3596 * lto.c (real_file_count, real_file_decl_data): New static vars.
3597 (read_cgraph_and_symbols): Use it.
3598
0f443ad0
RG
35992010-09-08 Richard Guenther <rguenther@suse.de>
3600
3601 * lto.c (read_cgraph_and_symbols): Collect again after each
3602 file.
3603
ee187353
JH
36042010-09-07 Jan Hubicka <jh@suse.cz>
3605
3606 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3607
b3ec52d0
RG
36082010-09-03 Richard Guenther <rguenther@suse.de>
3609
3610 * lto-elf.c (validate_file): Always error if validation fails.
3611
f1395d4a
JH
36122010-08-20 Jan Hubicka <jh@suse.cz>
3613
3614 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3615 (lto_wpa_write_files): Update comments.
3616
2429bce3
L
36172010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3618
3619 PR bootstrap/45357
3620 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3621 with has_analyzed_clone_p.
3622
e0f967db
JH
36232010-08-20 Jan Hubicka <jh@suse.cz>
3624
3625 * lto.c (has_analyzed_clone_p): New function
3626 (lto_materialize_function): Use callgraph to determine if
3627 body is needed.
3628 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3629
ac47786e
NF
36302010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3631
3632 * lto.c: Use FOR_EACH_VEC_ELT.
3633
ecdbd01a 36342010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3635
3636 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3637
5f20c657
JM
36382010-07-27 Joseph Myers <joseph@codesourcery.com>
3639
3640 * lto-lang.c (lto_handle_option): Update prototype and return
3641 value type. Remove duplicate assignment to result.
3642
7a9bf9a4
JM
36432010-07-27 Joseph Myers <joseph@codesourcery.com>
3644
3645 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3646 New.
3647 (lto_init_options): Update prototype.
3648 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3649 Define.
3650
ecdbd01a 36512010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3652
3653 PR lto/44992
92a285c1 3654 * lto.c: Include splay-tree.h
73ce4d1e
AK
3655 (lto_resolution_read): Change to walk file_ids tree and parse
3656 extra file_id in resolution file.
3657 (lto_section_with_id): Add.
3658 (create_subid_section_table): Add.
3659 (lwstate): Add.
3660 (lto_create_files_from_ids): Add.
3661 (lto_file_read): Change to handle sub file ids and create list
3662 of file_datas. Add output argument for count.
3663 (get_section_data): Pass file_data to lto_get_section_name.
3664 (lto_flatten_file): Add.
3665 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3666
ecdbd01a 36672010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3668
3669 * lto-coff.c (hash_name, eq_name): Move.
3670 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3671 * lto-elf.c: (hash_name, eq_name): Move.
3672 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3673 * lto-macho.c: (hash_name, eq_name): Move.
3674 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3675 * lto.c: (hash_name, eq_name): Move from lto-*.c
3676 (lto_obj_create_section_hash_table): Add.
3677 (free_with_string): Add.
3678
718f9c0f
MLI
36792010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3680
3681 * lto-coff.c: Include diagnostic-core.h in every file that
3682 includes toplev.h.
3683 * lto-elf.c: Likewise.
3684 * lto-lang.c: Likewise.
3685 * lto-macho.c: Likewise.
3686
1b137837
JJ
36872010-07-07 Jakub Jelinek <jakub@redhat.com>
3688
3689 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3690 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3691 objects.
3692
92eb4438
JH
36932010-07-05 Jan Hubicka <jh@suse.cz>
3694
3695 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3696 nodes from same comdat group as well as all comdat functions referenced
3697 here.
b9843260
EB
3698 (add_varpool_node_to_partition, add_references_to_partition): New
3699 function.
3700 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3701 add_varpool_node_to_partition; clear aux flags when done.
3702 (lto_promote_cross_file_statics): Do not promote stuff that gets
3703 duplicated to each ltrans.
92eb4438 3704
a05541a9
JH
37052010-07-04 Jan Hubicka <jh@suse.cz>
3706
92a285c1 3707 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3708
4a2ac96f
RG
37092010-06-13 Richard Guenther <rguenther@suse.de>
3710
3711 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3712
1d536046
KT
37132010-06-09 Kai Tietz <kai.tietz@onevision.com>
3714
ab20d992 3715 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1d536046
KT
3716 * lto-coff.c (coff_write_object_file): Add braces to if.
3717
a9429e29
LB
37182010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3719
3720 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3721 (lto_file_read): Likewise.
3722 (new_partition): Likewise.
3723 (read_cgraph_and_symbols): Likewise.
3724
5498f011
JM
37252010-06-07 Joseph Myers <joseph@codesourcery.com>
3726
3727 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3728 (lto_handle_option): Don't set flag_signed_char here.
3729
d4c0c9f6
RG
37302010-06-04 Richard Guenther <rguenther@suse.de>
3731
3732 PR lto/41584
3733 * lto.c (lto_1_to_1_map): Use the proper file_data for
3734 varpool nodes.
3735
0a5fa5a1
JH
37362010-05-30 Jan Hubicka <jh@suse.cz>
3737
3738 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3739 partitioning decisions.
3740
9eec9488
JH
37412010-05-29 Jan Hubicka <jh@suse.cz>
3742
3743 * lto.c (bitmap vector): Remove.
3744 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3745 (ltrans_partition_def): New structure.
3746 (ltrans_partition): New type and VECtor.
3747 (new_partition): New function.
3748 (add_cgraph_node_to_partition): New function.
3749 (lto_1_to_1_map): Reorganize for partitions.
3750 (lto_add_inline_clones): Remove.
3751 (lto_add_all_inlinees): Remove.
3752 (lto_promote_cross_file_statics): Use partitions.
3753 (cmp_partitions): New function.
3754 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3755 use partitions; output files sorted by size.
3756
3e097227
SB
37572010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3758
3759 * Make-lang.in: Replace vec.h dependency with VEC_H.
3760
7ca92787
JM
37612010-05-28 Joseph Myers <joseph@codesourcery.com>
3762
3763 * lto-coff.c (coff_errmsg): Remove.
3764 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3765 errors instead of coff_errmsg (-1).
3766 * lto-macho.c (mach_o_errmsg): Remove.
3767 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3768 instead of mach_o_errmsg (-1).
3769 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3770 xstrerror (errno).
3771
b5611987
RG
37722010-05-28 Richard Guenther <rguenther@suse.de>
3773
3774 * lto.c (prefix_name_with_star): Removed.
3775 (strip_extension): Likewise.
3776 (get_filename_for_set): Likewise.
3777 (lto_write_ltrans_list): Fold into ...
3778 (lto_wpa_write_files): ... this. Name LTRANS units
3779 by suffixing the ltrans output list filename.
3780 (do_whole_program_analysis): Adjust.
3781
1da2ed5f
JM
37822010-05-27 Joseph Myers <joseph@codesourcery.com>
3783
3784 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3785 (read_cgraph_and_symbols, lto_main): Use seen_error.
3786 * Make-lang.in (lto/lto.o): Update dependencies.
3787
7951d88a
EB
37882010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3789
3790 PR lto/44230
3791 * lto.h (lto_eh_personality): New prototype.
3792 * lto.c: Include debug.h.
3793 (first_personality_decl): New static variable.
3794 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3795 first function for which it is non-null.
3796 (lto_eh_personality_decl): New static variable.
3797 (lto_eh_personality): New function.
3798 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3799 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3800
e12da9c2
SB
38012010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3802
3803 * lto-lang.c: Do not include expr.h.
3804
468194f4
RG
38052010-05-24 Richard Guenther <rguenther@suse.de>
3806
3807 * lto-elf.c (lto_obj_build_section_table): Work around
3808 FreeBSD libelf issue.
3809
bd9eb5da
RG
38102010-05-22 Richard Guenther <rguenther@suse.de>
3811
3812 * lto.c (read_cgraph_and_symbols): Do not collect.
3813
66576e1b
JH
38142010-05-20 Jan Hubicka <jh@suse.cz>
3815
3816 * lto.c (promote_var, promote_fn): New functions.
3817 (lto_promote_cross_file_statics): Compute correctly boundary including
3818 static initializers of readonly vars.
3819
36576655
JH
38202010-05-18 Jan Hubicka <jh@suse.cz>
3821
66576e1b 3822 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3823 (lto_promote_cross_file_statics): Deal with non-inline clones.
3824
28632d63
JH
38252010-05-18 Jan Hubicka <jh@suse.cz>
3826
3827 * lto.c (lto_materialize_function): Announce function when
3828 reading body; allocate_struct_function only when reading body;
3829 do not finalize local statics; ggc_collect after reading;
3830 do not mark reachable node.
3831 (materialize_cgraph): Do not announce function.
3832
33e42d56
JH
38332010-05-11 Jan Hubicka <jh@suse.cz>
3834
3835 * lto.c (materialize_cgraph): Revert my previous patch.
3836
f6430ea5
KT
38372010-05-11 Kai Tietz <kai.tietz@onevision.com>
3838
3839 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3840 IMAGE_FILE_MACHINE_AMD64.
3841 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3842
0a0b07b7
JH
38432010-05-11 Jan Hubicka <jh@suse.cz>
3844
3845 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3846 (materialize_cgraph): Add it here.
3847
9a809897
JH
38482010-05-11 Jan Hubicka <jh@suse.cz>
3849
3850 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3851 vector.
3852
38532010-05-11 Jan Hubicka <jh@suse.cz>
3854
3855 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3856 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3857 use reachable_from_other_partition_p and
3858 referenced_from_other_partition_p test.
3859
94f64249
KT
38602010-05-11 Kai Tietz <kai.tietz@onevision.com>
3861
3862 * lto-coff.c (validate_file): Add x64-coff support.
3863 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3864 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3865 * lto-lang.c (lto_build_c_type_nodes): Add check for
3866 'long long unsigned int' for x64-windows.
3867 (lto_init): Likewise.
3868
c082f9f3
SB
38692010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3870
3871 * lto.h (struct lto_file_struct): Document offset member.
3872 * lto-endian.h: New file.
3873 * lto-macho.h: New file.
3874 * lto-macho.c: New file.
3875 * Make-lang.in: Add rule for lto-macho.o.
3876
3f8257db 38772010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3878
3879 PR lto/43857
3880 PR lto/43371
3881 * lang.opt (fresolution): Change to ...
3882 (fresolution=): ... this.
3883 * lto-lang.c (lto_handle_option): Adjust.
3884
48cf395b
RB
38852010-05-07 Richard Guenther <rguenther@suse.de>
3886
3887 * lto.c (DUMPBASE_SUFFIX): Remove.
3888 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3889 Rename to ...
3890 (lto_write_ltrans_list): ... only output the list of ltrans files.
3891 (lto_maybe_unlink): Remove.
3892 (do_whole_program_analysis): Do not execute LTRANS phase
3893 from here.
3894
afa83c15
L
38952010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3896
3897 * lto-lang.c (lto_handle_option): Add argument kind.
3898
369451ec
JH
38992010-05-05 Jan Hubicka <jh@suse.cz>
3900
48cf395b
RB
3901 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3902 refs.
369451ec 3903
2f41ecf5
JH
39042010-05-05 Jan Hubicka <jh@suse.cz>
3905
3906 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3907
ace72c88
JH
39082010-04-30 Jan Hubicka <jh@suse.cz>
3909
b9843260
EB
3910 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3911 use default name.
ace72c88
JH
3912 (lto_wpa_write_files): Write any non-empty partition.
3913
05575e07
JH
39142010-04-30 Jan Hubicka <jh@suse.cz>
3915
3916 * lto.c: Do not attempt to make constant pool references global.
3917
49ba8180
JH
39182010-04-28 Jan Hubicka <jh@suse.cz>
3919
ab20d992 3920 * lto.c (lto_read_in_decl_state): Use GGC.
49ba8180
JH
3921 (lto_wpa_write_files): Announce what we are writting.
3922 (all_file_decl_data): New.
3923 (read_cgraph_and_symbols): Use GGC; correct timevars.
3924 (do_whole_program_analysis): Collect.
ab20d992 3925 * Make-lang.in (lto.o): Fix dependency.
49ba8180
JH
3926 * Makefile.in (GTFILES): Add lto-streamer.h.
3927 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3928 (varpool_assemble_pending_decls): Use VAROUT.
3929 * lto-streamer.h (lto_tree_ref_table): Annotate.
3930 (lto_in_decl_state): Annotate.
3931 (lto_file_decl_data): Annotate.
3932
2942c502
JH
39332010-04-28 Jan Hubicka <jh@suse.cz>
3934
3935 * lto.c (lto_varpool_node_sets): New.
3936 (lto_1_to_1_map): Partition varpool too.
3937 (globalize_context_t, globalize_cross_file_statics,
3938 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3939 lto_scan_statics_in_remaining_global_vars): Remove.
3940 (lto_promote_cross_file_statics): Rewrite.
3941 (get_filename_for_set): Take vset argument.
3942 (lto_wpa_write_files): Pass around vsets.
3943
3bec79c5
DK
39442010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3945
3946 PR lto/42776
3947 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3948 hardcoding 'lto-elf.o'.
3949 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3950
3951 * lto-coff.h: New file.
3952 * lto-coff.c: Likewise.
3953
21aac880
RG
39542010-04-26 Richard Guenther <rguenther@suse.de>
3955
3956 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3957
2cee0101
DK
39582010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3959
3960 * lto.h (lto_elf_file_open): Rename prototype from this ...
3961 (lto_obj_file_open): ... to this.
3962 (lto_elf_file_close): Likewise ...
3963 (lto_obj_file_close): ... and likewise.
3964 (lto_elf_build_section_table): Likewise ...
3965 (lto_obj_build_section_table): ... and likewise.
3966 (lto_elf_begin_section): Likewise ...
3967 (lto_obj_begin_section): ... and likewise.
3968 (lto_elf_append_data): Likewise ...
3969 (lto_obj_append_data): ... and likewise.
3970 (lto_elf_end_section): Likewise ...
3971 (lto_obj_end_section): ... and likewise.
3972 * lto.c (lto_file_read): Update references to the above.
3973 (lto_wpa_write_files): Likewise.
3974 (lto_read_all_file_options): Likewise.
3975 (read_cgraph_and_symbols): Likewise.
3976 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3977 (LANG_HOOKS_APPEND_DATA): Likewise.
3978 (LANG_HOOKS_END_SECTION): Likewise.
3979 * lto-elf.c (lto_elf_file_open): Rename from this ...
3980 (lto_obj_file_open): ... to this, updating any references.
3981 (lto_elf_file_close): Likewise ...
3982 (lto_obj_file_close): ... and likewise.
3983 (lto_elf_build_section_table): Likewise ...
3984 (lto_obj_build_section_table): ... and likewise.
3985 (lto_elf_begin_section): Likewise ...
3986 (lto_obj_begin_section): ... and likewise.
3987 (lto_elf_append_data): Likewise ...
3988 (lto_obj_append_data): ... and likewise.
3989 (lto_elf_end_section): Likewise ...
3990 (lto_obj_end_section): ... and likewise.
3991
bc58d7e1
JH
39922010-04-21 Jan Hubicka <jh@suse.cz>
3993
3994 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3995 (materialize_cgraph): Likewise.
3996
e792884f
JH
39972010-04-21 Jan Hubicka <jh@suse.cz>
3998
3999 * lto.c (lto_wpa_write_files): Update.
4000 (read_cgraph_and_symbols): Be more verbose.
4001 (materialize_cgraph): Likewise.
4002 (do_whole_program_analysis): Likewise.
4003
c9945504
JH
40042010-04-21 Jan Hubicka <jh@suse.cz>
4005
4006 * lto.c (globalize_cross_file_statics): When function has address taken,
4007 it needs to be public.
4008
a837268b
JH
40092010-04-20 Jan Hubicka <jh@suse.cz>
4010
4011 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
4012 (lto_add_all_inlinees): Likewise.
4013 (lto_wpa_write_files): Likewise.
4014
3b9e5d95
EB
40152010-04-18 Eric Botcazou <ebotcazou@adacore.com>
4016
4017 * lto-lang.c (lto_init): Remove second argument in call to
4018 build_common_tree_nodes.
4019
8ccb78f2
RO
40202010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4021
4022 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
4023 function.
4024
2f9b99e6
EB
40252010-03-09 Eric Botcazou <ebotcazou@adacore.com>
4026
4027 PR bootstrap/43276
4028 * lto-elf.c: Define EM_* constants if not already defined.
4029
bef7d288
EB
40302010-03-03 Eric Botcazou <ebotcazou@adacore.com>
4031
4032 * lto-elf.c (is_compatible_architecture): New static function.
4033 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
4034
f68df07c
RG
40352010-02-11 Richard Guenther <rguenther@suse.de>
4036
4037 PR driver/43021
4038 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
4039 appropriately.
4040
3cdea2b4
AH
40412010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
4042
4043 * lto.c (O_BINARY): Define.
4044 (lto_read_section_data): Open file in binary mode.
4045 * lto-elf.c (O_BINARY): Define.
ab20d992 4046 (lto_elf_file_open): Open file in binary mode.
3cdea2b4 4047
c59449fa
RG
40482010-01-08 Richard Guenther <rguenther@suse.de>
4049
4050 PR lto/42528
4051 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
4052 (lto_init): Do not init char_type_node in a standard way
4053 but according to flag_signed_char.
4054
d7fb0a6d
L
40552010-01-03 H.J. Lu <hongjiu.lu@intel.com>
4056
4057 PR lto/41564
4058 * lto.c (DUMPBASE_SUFFIX): New.
4059 (lto_execute_ltrans): Append a sequence number to -dumpbase
4060 for LTRANS.
4061
78ce4053
L
40622010-01-02 H.J. Lu <hongjiu.lu@intel.com>
4063
4064 PR lto/42580
4065 * lto-elf.c (lto_elf_file_open): Stop if the command line
4066 option file is missing.
4067
2a71eb48
RG
40682009-12-15 Richard Guenther <rguenther@suse.de>
4069
4070 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
4071 (lto_post_options): Do not disable debuginfo.
4072
a818bca1
DG
40732009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
4074
4075 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
4076
e7d00517
RG
40772009-12-11 Richard Guenther <rguenther@suse.de>
4078
4079 PR lto/42037
4080 * lto.c (lto_resolution_read): Properly grow the vector.
4081
1ab53893
RG
40822009-12-11 Richard Guenther <rguenther@suse.de>
4083
4084 PR lto/41915
4085 * lto-lang.c (lto_init_options): Initialize flag_complex_method
4086 to the C99 default. Do not set flag_unit_at_a_time.
4087
0f900dfa
JJ
40882009-11-28 Jakub Jelinek <jakub@redhat.com>
4089
4090 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
4091 variable.
4092
92fa7608
RAE
40932009-11-19 Rafael Avila de Espindola <espindola@google.com>
4094
4095 PR bootstrap/42096
4096 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
4097 * lto.c (lto_parse_hex): New.
4098 (lto_resolution_read): Use lto_parse_hex.
4099 * lto.h (lto_parse_hex): New.
4100
9870fe4f
RAE
41012009-11-17 Rafael Avila de Espindola <espindola@google.com>
4102
4103 * lto-elf.c (lto_file_init): Add offset argument.
4104 (lto_elf_file_open): Record the offset.
4105 * lto.c (lto_resolution_read): Change file_name into a lto_file
4106 argument. Check offsets.
4107 (lto_file_read): Update call to lto_resolution_read.
4108 * lto.h (lto_file_struct): Add the offset field.
4109
1b70729f
RAE
41102009-11-16 Rafael Avila de Espindola <espindola@google.com>
4111
4112 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
4113
0e3776db
JH
41142009-11-14 Jan Hubicka <jh@suse.cz>
4115
4116 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
4117
06bd7f56
RAE
41182009-11-12 Rafael Avila de Espindola <espindola@google.com>
4119
4120 * lang.opt (fresolution): Renamed from resolution.
4121 * lto-lang.c (lto_handle_option): Handle new option name.
4122 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
4123
7e9dc421 41242009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 4125 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
4126
4127 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
4128 (lto_elf_file_open): Handle offsets in arguments name@offest.
4129
b207f900
RG
41302009-10-30 Richard Guenther <rguenther@suse.de>
4131
4132 PR lto/41858
4133 * lto.c (lto_file_read): Do not set file_data->fd.
4134 (lto_read_section_data): Use a single-entry file-descriptor cache.
4135 Do not check the result of xmalloc.
4136 (free_section_data): Do not use file_data->fd.
4137 (lto_read_all_file_options): Likewise.
4138
2c928155
RG
41392009-10-22 Richard Guenther <rguenther@suse.de>
4140
4141 * lto.c (lto_fixup_jump_functions): Remove.
4142 (lto_fixup_decls): Do not fixup jump functions.
4143 (read_cgraph_and_symbols): Schedule cgraph merging after
4144 summary reading. Schedule type and decl fixup before
4145 summary reading.
4146
f9c91f8a
RB
41472009-10-22 Richard Guenther <rguenther@suse.de>
4148
4149 * lto.c (lto_fixup_data_t): Remove free_list member.
4150 (lto_fixup_tree): Do not insert into free_list.
4151 (free_decl): Remove.
4152 (lto_fixup_decls): Remove free-list handling.
4153
fb3f88cc
JH
41542009-10-22 Jan Hubicka <jh@suse.cz>
4155
4156 * lto.c (lto_fixup_jump_functions): New function.
4157 (lto_fixup_decls): Use it.
4158
35f1e9f4
RG
41592009-10-16 Richard Guenther <rguenther@suse.de>
4160
4161 PR lto/41715
4162 * lto.c (lto_fixup_tree): Revert last change.
4163
200c8750
RG
41642009-10-14 Richard Guenther <rguenther@suse.de>
4165
4166 * lto.c (lto_fixup_tree): In case the prevailing decl is not
4167 compatible with the one we replace wrap it around a
4168 VIEW_CONVERT_EXPR.
4169
b1b07c92
RG
41702009-10-09 Richard Guenther <rguenther@suse.de>
4171
4172 PR lto/41635
4173 PR lto/41636
4174 * lto.c (read_cgraph_and_symbols): Do not assert we can open
4175 a file.
4176 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
4177 (init_ehdr##BITS): Likewise.
4178
3c2e7d45
JM
41792009-10-08 Joseph Myers <joseph@codesourcery.com>
4180
4181 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
4182 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
4183 diagnostics.
4184 * lto-lang.c (lto_post_options): Remove trailing "." from
4185 diagnostics.
4186
0d0bfe17
RG
41872009-10-08 Richard Guenther <rguenther@suse.de>
4188
4189 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
4190 hash tables.
4191
4bedf19a
JM
41922009-10-07 Joseph Myers <joseph@codesourcery.com>
4193
4194 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
4195
b20996ff
JH
41962009-10-07 Jan Hubicka <jh@suse.cz>
4197
4198 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
4199 ltrans stage; explain why this is needed and should not.
4200
1a735925
RG
42012009-10-05 Richard Guenther <rguenther@suse.de>
4202
4203 PR lto/41552
4204 PR lto/41487
4205 * lto.c (lto_read_decls): Do not register deferred decls.
4206 (read_cgraph_and_symbols): Delay symbol and cgraph merging
4207 until after reading the IPA summaries.
4208
d7f09764
DN
42092009-10-02 Rafael Avila de Espindola <espindola@google.com>
4210
4211 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
4212 (lto-lang.c): Don't include lto/common.h.
4213
42142009-10-02 Rafael Avila de Espindola <espindola@google.com>
4215
4216 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
4217 (lto/common.o): Remove.
4218 * common.c: Remove.
4219 * common.h (lto_kind_str): Remove.
4220 (lto_visibility_str): Remove.
4221 (lto_resolution_str): Make it static.
4222
42232009-10-01 Diego Novillo <dnovillo@google.com>
4224
4225 * lto.c (lto_read_decls): Add comment.
4226 Call internal_error instead of gcc_assert.
4227 (lto_resolution_read): Likewise.
4228 (lto_add_all_inlinees): Tidy.
4229 * Make-lang.in: Fix copyright boilerplate.
4230 (lto.pdf): New.
4231 (lto.install-pdf): New.
4232 * lto-tree.h: Fix copyright boilerplate.
4233 * lang-specs.h: Likewise.
4234 Remove ".lto" entry from compilers fragment.
4235 * lto-elf.c: Move inclusion of gelf.h after config.h.
4236 Tidy formatting everywhere.
4237 * lto.h: Fix copyright boilerplate.
4238 Tidy formatting everywhere.
4239 * common.c: Likewise.
4240 * config-lang.in: Likewise.
4241 * common.h: Likewise.
4242 * lto-lang.c: Likewise.
4243
42442009-10-01 Richard Guenther <rguenther@suse.de>
4245
4246 * lto.c (lto_read_section_data): Use plain lseek/read.
4247
42482009-10-01 Richard Guenther <rguenther@suse.de>
4249
4250 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
4251 use sysconf to query the system page size.
4252 (lto_file_read): Implement fallback using stdio.
4253 (free_section_data): Likewise.
4254
42552009-09-29 Diego Novillo <dnovillo@google.com>
4256
4257 * lto-lang.c (lto_init): Really fix call to
4258 build_common_builtin_nodes.
4259
42602009-09-29 Diego Novillo <dnovillo@google.com>
4261
4262 * lto-lang.c (lto_init): Fix call to
4263 build_common_builtin_nodes.
4264
42652009-09-29 Richard Guenther <rguenther@suse.de>
4266
4267 PR lto/40754
4268 * lto-elf.c (init_shdr##BITS): Properly specify alignment
4269 in bytes.
4270 (first_data_block): New static variable.
4271 (lto_elf_append_data): Align the first data block in each
4272 section.
4273
42742009-09-28 Diego Novillo <dnovillo@google.com>
4275
4276 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
4277 * lto.c (strip_extension): New.
4278 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
4279 (lto_execute_ltrans): Tidy.
4280 Do not pass -fwpa nor -fltrans-* to LTRANS.
4281 * opts.c: Tidy formatting and remove stale FIXME lto markers.
4282 * tree.c (need_assembler_name_p): Call
4283 lang_hooks.decls.may_need_assembler_name_p if set.
4284 * varasm.c (default_binds_local_p_1): Remove check for
4285 flag_ltrans.
4286 * varpool.c (decide_is_variable_needed): Do not test for
4287 in_lto_p.
4288
42892009-09-22 Richard Guenther <rguenther@suse.de>
4290
4291 PR lto/39276
4292 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
4293 * Make-lang.in: Remove ltrans-driver stuff.
4294 * config-lang.in: Likewise.
4295 * lang.opt (fltrans-driver): Remove.
4296 * lto-lang.c (lto_init_options): Remove code initializing
4297 ltrans_driver.
4298 * ltrans-driver: Remove.
4299
43002009-09-21 Diego Novillo <dnovillo@google.com>
4301
4302 * lto-lang.c (lto_define_builtins): Remove superfluous
4303 calls to targetm.init_builtins and build_common_builtin_nodes.
4304 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
4305 build_common_builtin_nodes.
4306 * lto.c (lto_materialize_function): Do nothing if NODE is a
4307 clone.
4308
43092009-09-03 Diego Novillo <dnovillo@google.com>
4310
4311 * lto-elf.c (validate_file): Replace call to
4312 elf_getshstrndx with call to elf_getshdrstrndx.
4313
43142009-08-19 Richard Guenther <rguenther@suse.de>
4315
4316 * lto-lang.c (lto_init): Merge char_type_node with the
4317 appropriately signed variant.
4318
43192009-08-19 Richard Guenther <rguenther@suse.de>
4320
4321 PR lto/41071
4322 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
4323 (lto_fixup_type): Re-build the pointer-to chain part two.
4324
43252009-08-19 Richard Guenther <rguenther@suse.de>
4326
4327 PR lto/41071
4328 * lto.c (lto_fixup_type): Re-build the type variant chain.
4329
43302009-08-19 Richard Guenther <rguenther@suse.de>
4331
4332 PR lto/41071
4333 * lto.c (lto_fixup_constructor): New function.
4334 (lto_fixup_tree): Replace all types. Properly fixup
4335 constructors and constants.
4336
43372009-08-14 Richard Guenther <rguenther@suse.de>
4338
4339 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
4340 for DECL_LANG_SPECIFIC.
4341
43422009-08-13 Richard Guenther <rguenther@suse.de>
4343
4344 PR lto/41032
4345 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
4346
43472009-07-30 Richard Guenther <rguenther@suse.de>
4348
4349 PR lto/40903
4350 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
4351 the largest decl for output and free TREE_CHAIN for further
4352 use.
4353
43542009-07-24 Diego Novillo <dnovillo@google.com>
4355
4356 * Make-lang.in: Add empty lto.install-plugin target.
4357
43582009-07-13 Diego Novillo <dnovillo@google.com>
4359
4360 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
4361
43622009-07-11 Richard Guenther <rguenther@suse.de>
4363
4364 * lto-lang.c (lto_write_globals): Wrapup global decls.
4365
43662009-07-10 Richard Guenther <rguenther@suse.de>
4367
4368 * lto-lang.c (lto_init): Allocate one more location to make
4369 BUILTINS_LOCATION correct.
4370
43712009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4372
4373 * lto.c (free_section_data): Cast computed_offset to caddr_t.
4374
43752009-07-06 Diego Novillo <dnovillo@google.com>
4376
4377 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
4378 TYPE_SIZE_UNIT.
4379
43802009-07-06 Diego Novillo <dnovillo@google.com>
4381
4382 * lto.c (preload_common_nodes): Remove.
4383 (lto_read_in_decl_state): Call lto_streamer_cache_get.
4384 (lto_read_decls): Call lto_data_in_create and
4385 lto_data_in_delete.
4386 (free_decl): Do not call ggc_free.
4387 (lto_main): Call lto_init_reader.
4388 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
4389 (lto_init): Initialize main_identifier_node if needed.
4390 Make ptrdiff_type_node be integer_type_node.
4391
43922009-06-19 Diego Novillo <dnovillo@google.com>
4393
4394 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
4395 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
4396 Remove code guarded by #ifdef LOCAL_TRACE.
4397
43982009-06-18 Diego Novillo <dnovillo@google.com>
4399
4400 * lto.c: Update license to GPLv3.
4401 * lto-elf.c: Likewise.
4402 * common.c: Likewise.
4403 * lto-lang.c: Likewise.
4404 * lto.h: Remove superfluous include files. Update all
4405 users.
4406
44072009-06-17 Diego Novillo <dnovillo@google.com>
4408
4409 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
4410
44112009-06-02 Diego Novillo <dnovillo@google.com>
4412
4413 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
4414 read in.
4415 (materialize_cgraph): Only materialize nodes that have a
4416 representation on file.
4417
44182009-06-01 Diego Novillo <dnovillo@google.com>
4419
4420 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
4421
44222009-05-31 Diego Novillo <dnovillo@google.com>
4423
4424 * lto-lang.c (lto_type_for_mode): Handle all the modes
4425 handled in c_common_type_for_mode.
4426
44272009-05-21 Diego Novillo <dnovillo@google.com>
4428
4429 * lto-elf.c: Always include <gelf.h>.
4430 * config-lang.in (target_libs): Remove.
4431 (build_by_default): Set to no.
4432
44332009-05-15 Diego Novillo <dnovillo@google.com>
4434
4435 * lto.c (lto_materialize_function): Assert that DECL is
4436 not a builtin.
4437 (materialize_cgraph): Don't try to materialize builtin
4438 functions.
4439 * lto-section-out.c (write_symbol_vec): Do not write
4440 builtin functions.
4441
44422009-05-13 Diego Novillo <dnovillo@google.com>
4443
4444 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
4445
44462009-05-07 Diego Novillo <dnovillo@google.com>
4447
4448 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
4449 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
4450 (lto_fixup_type): Call it for TYPE_POINTER_TO,
4451 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
4452 (lto_fixup_tree): Call gimple_register_type when *TP is a
4453 type.
4454 (lto_main): Call bitmap_obstack_initialize.
4455
44562009-04-22 Diego Novillo <dnovillo@google.com>
4457
4458 * lto.c (free_section_data): Tidy.
4459 (lto_1_to_1_map): Tidy.
4460 (lto_add_all_inlinees): Tidy.
4461 (prefix_name_with_star): New.
4462 (get_filename_for_set): New.
4463 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
4464 to determine what cgraph node sets to write.
4465 Call get_filename_for_set to compute temporary file
4466 names.
4467 (lto_execute_ltrans): Do not execute LTRANS on files with
4468 names that start with '*'.
4469 Move logic to execute LTRANS together so that LTRANS is
4470 invoked only if there are any files to compile.
4471 (do_whole_program_analysis): Only remove output files
4472 that do not start with '*'.
4473
44742009-04-06 Diego Novillo <dnovillo@google.com>
4475
4476 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
4477 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
4478 (lto_add_all_inlinees): Tidy.
4479
44802009-03-26 Diego Novillo <dnovillo@google.com>
4481
4482 * lto.c: Include gimple.h.
4483 (lto_read_in_decl_state): Call gimple_register_type for
4484 every type in every stream.
4485 (lto_fixup_common): Call gimple_register_type if T has a
4486 type.
4487 (do_whole_program_analysis): Call print_lto_report.
4488 (lto_main): Call print_lto_report after cgraph_optimize.
4489 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
4490
44912009-03-24 Diego Novillo <dnovillo@google.com>
4492
4493 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
4494 (lto.o): Add dependency on GIMPLE_H.
4495
44962009-03-10 Simon Baldwin <simonb@google.com>
4497
4498 * lto.c (lto_read_all_file_options): Close any open file descriptor
4499 contained in file_data before freeing.
4500
45012009-02-24 Rafael Avila de Espindola <espindola@google.com>
4502
4503 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4504 for a decl in the original bitmap, not a node.
4505 (lto_add_all_inlinees): Remove original nodes that are not needed.
4506 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4507
45082009-02-24 Diego Novillo <dnovillo@google.com>
4509
4510 * lto.c (lto_materialize_function): Update
4511 lto_stats.num_function_bodies.
4512 (get_section_data): Initialize *LEN to 0.
4513 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
4514 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
4515 Update lto_stats.num_output_files.
4516 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4517 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4518 (lto_main): Initialize lto_stats.
4519 If flag_lto_report is set, call print_lto_report.
4520
45212009-02-19 Diego Novillo <dnovillo@google.com>
4522
4523 Revert
4524
4525 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4526
4527 * lto.c (lto_add_inline_clones): Don't add the
4528 master clone. Check for a decl in the original
4529 bitmap, not a node.
4530 (lto_add_all_inlinees): Remove original nodes
4531 that are not needed.
4532 (lto_scan_statics_in_cgraph_node): Don't care if
4533 the node is the master.
4534 (lto_promote_cross_file_statics): Use a new
4535 context.seen_node_decls for each set
4536
45372009-02-19 Rafael Avila de Espindola <espindola@google.com>
4538
4539 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4540 for a decl in the original bitmap, not a node.
4541 (lto_add_all_inlinees): Remove original nodes that are not needed.
4542 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4543 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4544 for each set
4545
45462009-02-18 Diego Novillo <dnovillo@google.com>
4547
4548 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4549 and TV_WHOPR_WPA_IO.
4550 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4551 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4552 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4553 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4554 depending on command line flags.
4555 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4556 (lto_main): Remove timer uses.
4557
45582009-02-18 Rafael Avila de Espindola <espindola@google.com>
4559
4560 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4561 (lto_wpa_write_files): Update calls to renamed functions.
4562
45632009-02-17 Diego Novillo <dnovillo@google.com>
4564
4565 PR 39203
4566 * lto-lang.c (lto_post_options): Disable -fwhole-program
4567 when running LTRANS.
4568
45692009-02-10 Diego Novillo <dnovillo@google.com>
4570
4571 * lto.c (read_cgraph_and_symbols): Fix comment.
4572
45732009-02-10 Diego Novillo <dnovillo@google.com>
4574
4575 * lto.c (read_cgraph_and_symbols): Read options from all
4576 IL files.
4577
45782009-02-10 Diego Novillo <dnovillo@google.com>
4579
4580 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4581 (materialize_cgraph): Likewise.
4582 (do_whole_program_analysis): Likewise.
4583 (lto_main): Call read_cgraph_and_symbols,
4584 materialize_cgraph and do_whole_program_analysis.
4585
45862009-02-10 Simon Baldwin <simonb@google.com>
4587
4588 * lto.c: Include lto-opts.h.
4589 * (lto_main): Clear file options at loop start, read any saved
4590 options from the first file handled, and re-issue options.
4591 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4592
45932009-02-02 Diego Novillo <dnovillo@google.com>
4594
4595 * lto.c (lto_main): Stop LTO_TIMER and use
4596 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4597
45982009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4599
4600 PR lto/38995
4601 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4602 to POINTER_SIZE.
4603
46042009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4605
ab20d992 4606 * Make-lang.in (LTO_EXE): Link with all
d7f09764
DN
4607 BACKENDLIBS and not only GMPLIBS
4608
46092009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4610
4611 PR bootstrap/38992
4612 * lto-elf.c: Include gelf.h instead of libelf.h.
4613 (lto_elf_file_close): Replace elfx_update_shstrndx with
4614 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4615 gelf_update_ehdr.
4616
46172009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4618
4619 PR middle-end/38996
4620 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4621
46222009-01-26 Diego Novillo <dnovillo@google.com>
4623
4624 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4625
46262009-01-26 Diego Novillo <dnovillo@google.com>
4627
4628 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4629 and rename into gimple_types_compatible_p.
4630
46312009-01-12 Rafael Avila de Espindola <espindola@google.com>
4632
4633 * lto-lang.c (lang_hooks): Remove the const qualifier.
4634
46352009-01-06 Diego Novillo <dnovillo@google.com>
4636
4637 * ltrans-driver: Mark 'all' target as phony.
4638
46392008-12-31 Diego Novillo <dnovillo@google.com>
4640
4641 * ltrans-driver: Execute a NOP action for target 'all'.
4642
46432008-12-19 Diego Novillo <dnovillo@google.com>
4644
4645 * lto.c (lto_1_to_1_map): Tidy.
4646
46472008-12-19 Diego Novillo <dnovillo@google.com>
4648
4649 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4650 be opened, show its name.
4651 * ltrans-driver: If $verbose is set, do not use parallelism.
4652
46532008-12-17 Rafael Avila de Espindola <espindola@google.com>
4654
4655 * lto.c (lto_fixup_function): New.
4656 (lto_fixup_tree): Call lto_fixup_function.
4657
46582008-12-14 Doug Kwan <dougkwan@google.com>
4659
4660 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4661 variables if there is no function.
4662
46632008-12-10 Simon Baldwin <simonb@google.com>
4664
4665 * ltrans-driver: Always run make in silent mode, to avoid make's
4666 trace on stdout interfering with lto-wrapper output.
4667
46682008-12-10 Doug Kwan <dougkwan@google.com>
4669
4670 * lto.c (lto_add_inline_clones): Do not force master clones of
4671 inlined functions already in SET to be static inline.
4672
46732008-12-04 Doug Kwan <dougkwan@google.com>
4674
4675 * lto.c (globalize_context_t): New type to store states in
4676 globalization of cross-file statics.
4677 (globalize_cross_file_statics): New.
4678 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4679 static decls that need to be fixed up.
4680 (lto_scan_statics_in_cgraph_node): Change call interface to use
4681 a globalize_context_t CONTEXT for all states used.
4682 (lto_scan_statics_in_remaining_global_vars): New.
4683 (lto_promote_cross_file_statics): Use new call interface of
4684 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4685 visible vars in the last set.
4686
46872008-12-03 Diego Novillo <dnovillo@google.com>
4688
4689 * lto.c (lto_fixup_tree): Do not emit an error when
4690 PREVAILING throw but T doesn't.
4691
46922008-12-02 Doug Kwan <dougkwan@google.com>
4693
4694 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4695 from code in ...
4696 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4697 variables and functions.
4698 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4699 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4700
47012008-11-29 Diego Novillo <dnovillo@google.com>
4702
4703 * lto.c: Include timevar.h.
4704 (lto_materialize_function): Tidy. Add comments.
4705 (lto_wpa_write_files): Tidy.
4706 (lto_execute_ltrans): Tidy.
4707 (lto_main): Add local variable LTO_TIMER. Initialize it
4708 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4709 Start and stop the timer.
4710 Tidy comments.
4711 * Make-lang.in (lto.o): Add dependency on timevar.h.
4712 * ltrans-driver: React to -v and -save-temps.
4713 Use simple heuristic to determine how much parallelism to
4714 use when executing make.
4715
47162008-11-12 Doug Kwan <dougkwan@google.com>
4717
4718 * lto.c (lto_bitmap_obstack): Remove var.
4719 (lto_materialize_function): Do nothing instead of marking function
4720 body in file if flag_wpa is true.
4721 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4722 (lto_scan_statics_in_cgraph_node): New function.
4723 (lto_promote_cross_file_statics): Same.
4724 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4725 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4726 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4727
47282008-11-09 Diego Novillo <dnovillo@google.com>
4729
ab20d992 4730 * lto.c (lto_fixup_tree): Change error message locus
d7f09764
DN
4731 information to include location of mismatching
4732 declaration.
4733 Use TREE_NO_WARNING to avoid repeated messages.
4734 (lto_main): If lto_fixup_decls emitted any errors, exit.
ab20d992 4735 * lto-lang.c: Don't include libfuncs.h and except.h
d7f09764
DN
4736 (lto_init_options): Don't enable exceptions by default.
4737 (lto_eh_runtime_type): Move to lto-function-in.c
4738 (lto_init_eh): Likewise.
4739 (lto_init): Don't call lto_init_eh.
ab20d992 4740 * Make-lang.in (lto-lang.o): Remove dependency on
d7f09764
DN
4741 libfuncs.h and except.h.
4742
47432008-10-30 Diego Novillo <dnovillo@google.com>
4744
4745 * lto.c (lto_read_decls): Declare debug_main only if
4746 LTO_STREAM_DEBUGGING is enabled.
4747
47482008-10-30 Simon Baldwin <simonb@google.com>
4749
4750 * lto.c (lto_wpa_write_files): Create intermediate files with
4751 make_cwd_temp_file().
4752 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4753 WPA_SAVE_LTRANS is set.
4754 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4755 * ltrans-driver: Do not strip directory from output files.
4756
47572008-10-29 Doug Kwan <dougkwan@google.com>
4758
4759 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4760 DECL.
4761 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4762 (lto/lto-symtab.o): Remove rule.
4763 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4764 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4765 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4766 Remove macros.
4767 lto-symtab.c (File): Move up one level.
4768 lto-lang.c (cgraph.h): Remove include.
4769 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4770 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4771 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4772
ab20d992 47732008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4774
4775 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4776 non prevailing weak symbols.
4777
ab20d992 47782008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4779
4780 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4781
ab20d992 47822008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4783
4784 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4785 different types.
4786
47872008-10-23 Simon Baldwin <simonb@google.com>
4788
4789 * lto-lang.c (input_node): Save the node reference, rather than the
4790 node pointer, in node->inlined_to.
4791 (input_cgraph_1): Convert node references into node pointers.
4792
47932008-10-22 Diego Novillo <dnovillo@google.com>
4794 Rafael Espindola <espindola@google.com>
4795
4796 * lto.c (lto_resolution_read): Tidy.
4797 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4798 abort if RET is NULL.
4799
48002008-10-22 Doug Kwan <dougkwan@google.com>
4801
4802 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4803 exceptions flag is given.
4804 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4805 (lto_init_eh): Remove exceptions flag initialization.
ab20d992 4806 (lto_init): Only call lto_init_eh if exceptions flag is set.
d7f09764
DN
4807
48082008-10-21 Diego Novillo <dnovillo@google.com>
4809
4810 * lto.c: Tidy some formatting.
4811 * lto.h: Likewise.
4812
48132008-10-21 Simon Baldwin <simonb@google.com>
4814
4815 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4816 them is NULL (but not the other).
4817
48182008-10-17 Diego Novillo <dnovillo@google.com>
4819
4820 * ltrans-driver: Divert output from make to a temporary file.
4821 Show it if the call to make failed.
4822
48232008-10-15 Diego Novillo <dnovillo@google.com>
4824
4825 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4826 Do not print TEMP_FILENAME
4827 * ltrans-driver: Call make with -s.
4828
48292008-10-15 Diego Novillo <dnovillo@google.com>
4830
4831 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4832 TREE_STATIC on global symbols.
4833
48342008-10-14 Ollie Wild <aaw@google.com>
4835
4836 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4837 (LTRANS_DRIVER_EXE): Add.
4838 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4839 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4840 (lto.install.common): Remove ltrans-driver.
4841 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4842 (LTRANS_DRIVER_EXE): New build rule.
4843 * config-lang.in (compilers): Add ltrans-driver.
4844
48452008-10-14 Diego Novillo <dnovillo@google.com>
4846
4847 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4848 of program name.
4849
48502008-10-13 Ollie Wild <aaw@google.com>
4851
4852 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4853 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4854 * ltrans-driver (LTRANS_FLAGS): Remove.
4855
48562008-10-08 Doug Kwan <dougkwan@google.com>
4857
4858 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4859 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4860 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4861 from lto_fixup_state to here.
4862 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4863 just a free-list. Fix up types also. Move decl merging code to
4864 lto_fixup_tree.
4865 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4866 object.
4867 (lto_fixup_decls): Use another pointer set to avoid multiple
4868 walking of nodes except for DECLs to be replaced. Pass an
4869 lto_fixup_data_t object to tree-walker.
4870
ab20d992 48712008-10-08 Rafael Espindola <espindola@google.com>
d7f09764
DN
4872
4873 * lto-symtab.c (lto_symtab_set_resolution): New.
4874 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4875 lto_symtab_get_resolution.
4876 (lto_symtab_prevailing_decl): Return decl for non public decls.
4877 (lto_symtab_get_resolution): New.
4878 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4879
ab20d992 48802008-10-06 Rafael Espindola <espindola@google.com>
d7f09764
DN
4881
4882 * lto-lang.c: Include cgraph.h.
4883 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4884 input_cgraph): Moved from lto-cgraph.c.
4885 (LANG_HOOKS_INPUT_CGRAPH): New.
4886
ab20d992 48872008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4888
4889 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4890
ab20d992 48912008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4892
4893 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4894 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4895 prevailing definition. Don't mark TREE_NOTHROW differences.
4896 * lto.c (lto_fixup_tree): New.
4897 (lto_fixup_state): New.
4898 (lto_fixup_state_aux): New.
4899 (free_decl): New.
4900 (lto_fixup_decls): New.
4901 (lto_main): Call lto_fixup_decls.
4902
49032008-10-02 Ollie Wild <aaw@google.com>
4904
4905 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4906 and Init.
4907 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4908 * lto-lang.c (lto_post_options): Add validation and fixups for
4909 -fltrans and -fwpa.
4910
ab20d992 49112008-10-02 Rafael Espindola <espindola@google.com>
d7f09764
DN
4912
4913 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4914 lto_symtab_merge_decl): Return void.
4915 (lto_symtab_prevailing_decl): New.
4916
ab20d992 49172008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4918
4919 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4920 defined symbols.
4921 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4922 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4923 Check for already defined symbols.
4924 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4925 (LTO_IDENTIFIER_RESOLUTION): Remove.
4926 (LTO_DECL_RESOLUTION): New.
4927
ab20d992 49282008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4929
4930 * lto.c (lto_read_decls): Use new input_tree signature.
4931
49322008-09-26 Doug Kwan <dougkwan@google.com>
4933
4934 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4935 bodies affected by exception attribute merging of DECLs.
4936 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
ab20d992 4937 merging.
d7f09764
DN
4938
49392008-09-25 Rafael Espindola <espindola@google.com>
4940
4941 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4942 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4943 * lto-symtab.c (lto_symtab_compatible): New.
4944 (lto_symtab_overwrite_decl): New.
4945 (lto_symtab_merge_decl): Refactor to use the above functions
4946 and the resolution from lang_identifier.
4947 * lto-tree.h: Include plugin-api.h.
4948 (lang_identifier): Add resolution.
4949 (LTO_IDENTIFIER_RESOLUTION): New.
4950
49512008-09-25 Ollie Wild <aaw@google.com>
4952
4953 * lang.opt (fltrans-output-list=): New option.
4954 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4955
ab20d992 49562008-09-25 Rafael Espindola <espindola@google.com>
d7f09764
DN
4957
4958 * lto.c (lto_resolution_read): Initialize ret;
4959
49602008-09-24 Ollie Wild <aaw@google.com>
4961
4962 * lto.c (sys/mman.h): Move include.
4963 (lto_wpa_write_files): Return a list of written files.
4964 (lto_execute_ltrans): New function.
4965 (lto_main): Call lto_execute_ltrans.
4966 (ltrans-driver): New file.
4967 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4968 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4969 (lto_init_options): Initialize ltrans_driver.
4970 (lto_handle_option): Fix incorrect default output value.
4971 * lang.opt (fltrans-driver=): New option.
4972 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4973 (lto.install-common): Add lto/ltrans-driver.
4974
ab20d992 49752008-09-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4976
4977 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4978 (lto/lto.o): Depend on lto/common.h.
4979 (lto/common.o): New.
4980 * lang.opt (resolution): New.
4981 * lto-lang.c (resolution_file_name): New.
4982 (lto_handle_option): Handle OPT_resolution.
4983 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4984 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4985 pass it to lto_symtab_merge_decl.
4986 * lto.c: Include common.h.
4987 (lto_read_decls): Add resolutions and resolutions_size arguments.
4988 Initialize data_in.globals_resolution and
4989 data_in.globals_resolution_size.
4990 (index_and_symbol_resolution): New.
4991 (lto_resolution_read): New.
4992 (lto_file_read): Add argument resolution_file.
4993 Read resolution.
4994 * lto.h (resolution_file_name): New.
4995
ab20d992 49962008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
4997
4998 * common.c: Update description.
4999 * common.h: Update description.
5000
ab20d992 50012008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
5002
5003 * common.c: Moved from lto-plugin.
5004 * common.h: Moved from lto-plugin.
5005
50062008-09-22 Doug Kwan <dougkwan@google.com>
5007
5008 * lto.c (VEC(bitmap,heap)): Declare.
5009 (lto_materialize_function): Handle WAP mode specially.
5010 (lto_add_inline_clones): New.
5011 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
5012 return a bitmap of inlined decls.
5013 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
5014 (lto_main): Call reset_inline_failed to reset inlining states.
5015 Check call-graph after WPA inlining.
5016 * lto-lang.c (lto_init): Do not clear flag_generate_lto
5017 unconditionally.
5018
50192008-09-19 Doug Kwan <dougkwan@google.com>
5020
5021 lto.c (lto_main): Remove unsued wrapper code.
5022 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
5023
50242008-09-19 Rafael Espindola <espindola@google.com>
5025
5026 * lto-symtab.c: Include lto-tree-in.h.
5027 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
5028 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
5029 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
5030
50312008-09-17 Paolo Bonzini <bonzini@gnu.org>
5032 Rafael Avila de Espindola <espindola@google.com>
5033
5034 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
5035 COMPOUND_LITERAL_EXPR_DECL): Remove.
5036 (emit_local_var): Remove.
5037 (lto_expand_expr): Remove.
5038 (lto_staticp): Remove.
5039 (LANG_HOOKS_EXPAND_EXPR): Remove.
5040 (LANG_HOOKS_STATICP): Remove.
5041
50422008-09-11 Diego Novillo <dnovillo@google.com>
5043
5044 * lto-lang.c: Include except.h and libfuncs.h.
5045 (lto_init_eh): New.
5046 (lto_init): Call it.
5047 Set flag_generate_lto to 0.
5048 * Make-lang.in (lto-lang.o): Add dependency on except.h
5049 and libfuncs.h.
5050
50512008-09-09 Bill Maddox <maddox@google.com>
5052
5053 * lto-lang.c: Include header file expr.h.
5054 (COMPOUND_LITERAL_EXPR_DECL_STMT,
5055 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
ab20d992 5056 (emit_local_var): Copied from c-semantics.c.
d7f09764
DN
5057 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
5058 and c_staticp in c-common.c.
ab20d992 5059 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
d7f09764
DN
5060
50612008-09-08 Diego Novillo <dnovillo@google.com>
5062
5063 * lto-lang.c (lto_global_bindings_p): Return 1 during
5064 IPA passes.
5065
50662008-09-07 Diego Novillo <dnovillo@google.com>
5067
5068 * lto.c: Tidy formatting.
5069
50702008-08-04 Bill Maddox <maddox@google.com>
5071
5072 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
ab20d992 5073
d7f09764
DN
50742008-09-03 Doug Kwan <dougkwan@google.com>
5075
5076 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
5077 CIF_OK instead of NULL.
5078
50792008-09-02 Diego Novillo <dnovillo@google.com>
5080 Simon Baldwin <simonb@google.com>
5081
5082 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
5083 c_common_type_for_size.
5084 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
5085 (lto_init): Call linemap_add.
5086 (signed_and_unsigned_types): Remove.
5087
50882008-08-29 Diego Novillo <dnovillo@google.com>
5089
5090 * lto-lang.c (handle_noreturn_attribute): New local function.
5091 (handle_const_attribute): New local function.
5092 (handle_malloc_attribute): New local function.
5093 (handle_pure_attribute): New local function.
5094 (handle_novops_attribute): New local function.
5095 (handle_nonnull_attribute): New local function.
5096 (handle_nothrow_attribute): New local function.
5097 (handle_sentinel_attribute): New local function.
5098 (handle_type_generic_attribute): New local function.
5099 (handle_format_attribute): New local function.
5100 (handle_format_arg_attribute): New local function.
5101 (lto_attribute_table): Declare.
5102 (lto_format_attribute_table): Declare.
5103 (lto_init_attributes): New local function.
5104 (lto_define_builtins): Call it.
5105 Call targetm.init_builtins and build_common_builtin_nodes.
5106 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
5107 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
5108
51092008-08-28 Diego Novillo <dnovillo@google.com>
5110
5111 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
5112 $(GIMPLE_H).
5113 (lto-symtab.o): Add dependency on $(GIMPLE_H).
5114 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
5115 * lto-symtab.c: Include gimple.h.
5116 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
5117 TREE_CHAIN.
5118
51192008-08-27 Doug Kwan <dougkwan@google.com>
5120
5121 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
5122 gt-lto-lto.h): New includes.
5123 (lto_materialize_function): Do not read in function body in WPA mode.
5124 Format a line to fit in 80 columns.
5125 (lto_cgraph_node_sets): New garbage collected variable.
5126 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
5127 New functions.
5128 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
ab20d992 5129 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
d7f09764
DN
5130 variable LTO_SECTION_IN_H.
5131 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
5132 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
5133 with variable LTO_SECTION_IN_H.
5134 * config-lang.in (gtfiles): Add lto/lto.c.
5135 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
5136 merged DECL_RESULT correctly.
5137
51382008-08-26 Bill Maddox <maddox@google.com>
5139
5140 * lto-lang.c Include tree-gimple.h.
5141 (lto_mark_addressable): Call mark_addressable rather than
5142 asserting.
5143 (lto_post_options): Suppress debug info generation.
5144 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
ab20d992 5145
3f8257db 51462008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
5147
5148 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
5149 assertion and leave an explanatory comment in its place.
ab20d992 5150
d7f09764
DN
51512008-08-21 Doug Kwan <dougkwan@google.com>
5152
5153 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
5154 of common nodes instead of computing locallly.
5155 (lto_read_in_decl_state): New.
5156 (lto_read_decls): Change code for udpate in struct lto_decl_header.
5157 Read global and per-function in-decl states.
5158 * Make-lang.in (LTO_H): Update dependency.
5159 (lto/lto.o): Same.
5160 (lto-symtab.c): Merge (revision 139039)
5161 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
5162
51632008-08-21 Rafael Espindola <espindola@google.com>
5164
5165 * config-lang.in (target_libs): New.
5166
51672008-08-20 Bill Maddox <maddox@google.com>
5168
5169 * lto.c (current_lto_file): Remove GTY marker from static
5170 variable. Remove include of file gt-lto-lto.h.
5171 * Make-lang.in: Remove dependency of lto/lto.o on
5172 gt-lto-lto.h.
5173 * lto-elf.c (lto_file_close): Removed.
5174 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
5175 allocate lto_elf_file object.
5176 (lto_elf_file_close): Free lto_elf_file object after close.
5177 * lto.h (struct lto_file_struct): Remove GTY marker.
5178 * config-lang.in: Remove lto/lto.h and lto/lto.c from
5179 gtfiles.
ab20d992 5180
d7f09764
DN
51812008-08-20 Bill Maddox <maddox@google.com>
5182
5183 * lto.c (lto_read_decls): Provide dummy argument to input_tree
5184 to conform to its new signature.
5185 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
5186 on discarded node here, now called in global_vector_fixup.
ab20d992 5187
d7f09764
DN
51882008-08-09 Bill Maddox <maddox@google.com>
5189
5190 * lto.c (preload_common_nodes): Verify that fileptr_type_node
5191 has not been set to a front-end-specific value.
ab20d992 5192
d7f09764 51932008-08-05 Doug Kwan <dougkwan@google.com>
ab20d992 5194
d7f09764
DN
5195 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
5196 build breakage.
5197
51982008-07-30 Bill Maddox <maddox@google.com>
5199
5200 * lto.c (lto_materialize_function): Call lto_original_decl_name.
5201 Remove obsolete comments.
5202 (lto_read_decls): Remove initialization of deleted field data_in.global.
5203 Tidy up comments.
5204 (lto_main): Remove redundant initialization of section_hash_table.
5205 * lto-elf.c: Removed obsolete comments.
5206 * lto.h: Tidy up comments.
5207 * lto-symtab.c (lto_least_common_multiple): New function.
5208 (lto_symtab_merge_decl): Merge variable alignments in some cases.
5209 Tidy up comments.
5210
52112008-07-25 Diego Novillo <dnovillo@google.com>
5212 Bill Maddox <maddox@google.com>
5213
5214 * lto.c: Re-order include files.
5215 Include lto-section-out.h.
5216 (preload_common_nodes): Add debugging output.
5217 Add new local INDEX_TABLE.
5218 Call preload_common_node.
5219 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
5220
52212008-07-13 Bill Maddox <maddox@google.com>
5222
5223 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
5224 unwanted scaling during pointer addition.
5225
52262008-07-11 Bill Maddox <maddox@google.com>
5227 Diego Novillo <dnovillo@google.com>
5228
5229 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
5230 Make code const-correct.
5231 (lto_file_read): Fix C++ compatibility warnings.
ab20d992 5232 (lto_read_section_data): Fix C++ compatibility warnings.
d7f09764
DN
5233 (lto_get_section_data): Use CONST_CAST to avoid warning when
5234 const pointer passed to free.
5235 * lto-elf.c (lto_elf_build_section_table): Fix C++
5236 compatibility warnings.
ab20d992 5237 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
d7f09764 5238 to avoid warning assigning const pointer to d_buf field of Elf_Data.
ab20d992 5239 (lto_get_current_out_file): Fix C++ compatibility warnings.
d7f09764
DN
5240
52412008-07-11 Diego Novillo <dnovillo@google.com>
5242
5243 * Make-lang.in (lto-warn): Define.
5244
52452008-07-03 Simon Baldwin <simonb@google.com>
5246
5247 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
5248 LTO_STREAM_DEBUGGING.
5249
52502008-06-27 Ollie Wild <aaw@google.com>
5251
5252 * lto-elf.c (lto-section-out.h): New include.
5253 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
5254 and data members.
5255 (cached_file_attrs): New static variable.
5256 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
5257 Use cached_file_attrs for checking bits.
5258 (lto_elf_build_section_table): Remove elf_file argument from
5259 lto_elf_get_shdr and lto_elf_free_shdr calls.
5260 (DEFINE_INIT_SHDR): New macro.
5261 (init_shdr32, init_shdr64): New functions defined via the
5262 DEFINE_INIT_SHDR macro.
5263 (lto_elf_begin_section_with_type): New function.
5264 (lto_elf_begin_section): New function.
5265 (lto_elf_append_data): New function.
5266 (lto_elf_end_section): New function.
5267 (DEFINE_VALIDATE_EHDR): New macro.
5268 (validate_ehdr32, validate_ehdr64): New functions defined via the
5269 DEFINE_VALIDATE_EHDR macro.
5270 (validate_file): New function.
5271 (DEFINE_INIT_EHDR): New macro.
5272 (init_ehdr32, init_ehdr64): New functions defined via the
5273 DEFINE_INIT_EHDR macro.
5274 (init_ehdr): New function.
5275 (lto_elf_file_open): Add support for writable files. Move some
5276 validation logic to validate_file.
5277 (lto_elf_file_close): Add support for writable files. Write file data
5278 and free data blocks.
5279 (current_out_file): New static variable.
5280 (lto_set_current_out_file): New function.
5281 (lto_get_current_out_file): New function.
5282 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
5283 Add temporary initialization for testing ELF serialization.
5284 * lto.h (lto-section-out.h): New include.
5285 (struct lto_file_struct): Slight modification to comment.
5286 (lto_elf_file_open): Add writable parameter.
5287 (lto_elf_begin_section): New function declaration.
5288 (lto_elf_append_data): New function declaration.
5289 (lto_elf_end_section): New function declaration.
5290 (lto_set_current_out_file, lto_get_current_out_file): New function
5291 declarations.
5292 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
5293 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
5294 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
5295 * Make-lang.in (LTO_H): Add lto-section-out.h.
5296
52972008-06-12 Ollie Wild <aaw@google.com>
5298
5299 * lto.h (struct lto_file_vtable_struct): Remove.
5300 (struct lto_file_struct): Remove vtable member.
5301 * lto-elf.c (lto_file_init): Remove vtable argument.
5302 (lto_elf_map_optional_lto_section): Remove.
5303 (lto_elf_unmap_section): Remove.
5304 (lto_elf_file_vtable): Remove.
5305 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
5306 lto_file_init call.
5307 (lto_elf_find_section_data): Remove.
5308
53092008-06-11 Ollie Wild <aaw@google.com>
5310
5311 * lto.c (lto_file_read): Add const qualifier to data variable.
5312
53132008-06-11 Diego Novillo <dnovillo@google.com>
5314
5315 Merge from lto-streamber sub-branch.
5316
5317 2008-06-04 Ollie Wild <aaw@google.com>
5318
5319 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
5320 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
5321
5322 2008-05-28 Bill Maddox <maddox@google.com>
5323
5324 Replace the DWARF reader in the LTO front-end.
5325
5326 * lto.c: Include lto-tree-in.h, lto-tags.h.
5327 (enum DWARF2_class, DW_cl_constant, struct
5328 DWARF2_form_data, struct lto_context,
5329 lto_fd_init, lto_info_fd_init,
5330 lto_abbrev_fd_init, lto_info_fd_close,
5331 lto_file_init, lto_file_close,
5332 lto_file_corrupt_error, lto_abi_mismatch_error,
5333 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
5334 lto_read_uleb128, lto_read_sleb128,
5335 lto_read_initial_length, lto_abbrev_read_attrs,
5336 lto_abbrev_read, lto_abbrev_read_lookup,
5337 lto_read_section_offset,
5338 lto_read_comp_unit_header, find_cu_for_offset,
5339 lto_get_file_name,
5340 lto_resolve_reference,lto_read_form,
5341 attribute_value_as_int,
5342 make_signed_host_wide_int,
5343 attribute_value_as_constant, lto_cache_hash,
5344 lto_cache_eq, lto_cache_store_DIE,
5345 lto_cache_lookup_DIE, lto_find_integral_type,
5346 lto_find_integral_type_1,
5347 LTO_BEGIN_READ_ATTRS_UNCHECKED,
5348 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
5349 lto_unsupported_attr_error, lto_get_identifier,
5350 lto_read_referenced_type_DIE,
5351 lto_read_compile_unit_DIE,
5352 lto_read_array_type_DIE,
5353 lto_read_structure_union_class_type_DIE,
5354 lto_read_enumerator_DIE,
5355 lto_read_enumeration_type_DIE,
5356 lto_read_only_for_child_DIEs,
5357 lto_read_only_for_child_DIEs,
5358 lto_read_member_DIE, lto_read_abbrev,
5359 lto_read_variable_formal_parameter_constant_DIE,
5360 lto_get_body): Removed.
5361 (preload_common_nodes): New function.
5362 (lto_read_decls): Convert for new global streamer.
5363 (lto_materialze_file_data,
5364 lto_read_subroutine_type_subprogram_die,
5365 lto_read_unspecified_parameters_DIE,
5366 lto_read_typedef_DIE,
5367 lto_read_pointer_reference_type_DIE,
5368 lto_read_subrange_type_DIE,
5369 lto_read_base_type_DIE,
5370 lto_read_const_volatile_restrict_type_DIE,
5371 lto_read_namespace_DIE,
5372 lto_read_unspecified_type_DIE, lto_read_DIE,
5373 lto_read_child_DIEs, lto_collect_child_DIEs):
5374 Removed.
5375 (lto_info_read, lto_set_cu_context): Removed.
5376 (lto_file_read): Convert for new global streamer.
5377 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
5378 lto_resolve_var_ref, lto_resolve_fn_ref,
5379 lto_resolve_field_ref, lto_resolve_typedecl_ref,
5380 lto_resolve_namespacedecl_ref): Removed.
5381 (lto_file_init, lto_file_close): Moved to lto-elf.c.
5382 * lto-tree.h (lto_symtab_merge_var,
5383 lto_symtab_mergee_fun): Declare here.
5384 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
5385 (lto_elf_file_open): Removed code to read DWARF debug sections.
5386 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
5387 DWARF2_CompUnit, lto_die_ptr,
5388 lto_die_cache_entry, lto_fd, lto_info_fd,
5389 lto_abbrev_fd): Removed.
5390 (lto_file): Removed debug_info and debug_abbrev fields.
5391 (lto_ref): Removed.
5392 (lto_file_init, lto_file_close,
5393 lto_resolve_type_ref, lto_resolve_var_ref,
5394 lto_resolve_fn_ref, lto_resolve_field_ref,
5395 lto_resolve_typedecl_ref,
5396 lto_resolve_namespacedecl_ref,
5397 lto_get_file_name): Removed declarations.
5398 (lto_symtab_merge_var, lto_symtab_merge_fn):
5399 Declarations moved to lto-tree.h.
5400 * lto-symtab.c (lto_compatible_attributes_p):
5401 Lobotomize this, as it barfs on "Hello, world!".
5402 * lto-section-out.c: Include lto-tree-out.h.
5403 (lto_hash_global_slot_node,
5404 lto_eq_global_slot_node, preload_common_nodes,
5405 write_global_stream, write_global_references):
5406 New functions.
5407 (produce_asm_for_decls): Convert for new global streamer.
5408 * lto-section-out.h (lto_hash_global_slot_node,
5409 lto_eq_global_slot_node): Declare.
5410
3f8257db 54112008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5412 Jan Hubicka <jh@suse.cz>
ab20d992 5413
d7f09764
DN
5414 * lto.c (sys/mman.h, tree-pass.h): New includes.
5415 (lto_materialize_constructors_and_inits,
5416 lto_materialize_function): Keeps length of section.
5417 (lto_materialize_cgraph): Removed.
5418 (lto_read_decls): Initialize fd field.
5419 (lto_file_read): Different return type and removed much code to
5420 lto_main.
5421 (page_mask): New variable.
5422 (lto_read_section_data, get_section_data, free_section_data): New
5423 functions.
5424 (lto_main): Now calls pass manager, sets the hooks so that the ipa
ab20d992
JJ
5425 passes can get the section data.
5426
3f8257db 54272008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5428
5429 * lto.h (lto_read_decls): Made local.
ab20d992 5430 (lto_input_function_body, lto_input_constructors_and_inits,
d7f09764
DN
5431 lto_input_cgraph): Declarations moved to lto-section-in.h.
5432 * lto-section-in.c: Moved to .. .
5433 * lto-cgraph-in.c: Ditto.
5434 * lto-section-in.h: Ditto.
5435 * lto-function-in.c: Ditto.
5436 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
5437 (lto_insert_block): Removed.
5438 (LANG_HOOKS_INSERT_BLOCK): Removed.
5439 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
5440 lto-section-in.o): Rules moved to lto/Makefile.in.
ab20d992 5441
d7f09764
DN
5442
54432008-05-16 Ollie Wild <aaw@google.com>
5444
5445 * lto-lang.c (tree-inline.h): Include.
5446 (lto_post_options): New function.
5447 (LANG_HOOKS_POST_OPTIONS): Define.
5448 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
5449 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
5450
54512008-05-13 Diego Novillo <dnovillo@google.com>
5452
5453 * lto-function-in.c (input_ssa_names): Call
5454 make_ssa_name_fn instead of make_ssa_name.
5455
54562008-05-12 Diego Novillo <dnovillo@google.com>
5457
5458 * lto-cgraph-in.c (overwrite_node): Update references to
5459 inline summary fields.
5460 * lto-function-in.c (input_expr_operand): Do not handle
5461 STRUCT_FIELD_TAG.
5462
54632008-05-09 Ollie Wild <aaw@google.com>
5464
5465 * lang.opt: New file.
5466 * lto-lang.c (lto_init_options): New function.
5467 (lto_handle_option): New function.
5468 (lto_init): Move initialization of flag_unit_at_a_time to
5469 lto_init_options.
5470 (LANG_HOOKS_INIT_OPTIONS): Define.
5471 (LANG_HOOKS_HANDLE_OPTION): Define.
5472
54732008-04-29 Ollie Wild <aaw@google.com>
5474
5475 * lto.c (lto_read_namespace_DIE): New function.
5476 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
5477 NAMESPACE_DECL DIE's.
5478 (lto_resolve_namespacedecl_ref): New function.
5479 * lto.h (lto_resolve_namespacedecl_ref): New function.
5480 * lto-section-in.c (lto_read_decls): Read namespace declarations.
5481 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
5482 and num_namespace_decls.
5483 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
5484 * lto-lang.c (lto_init_ts): New function.
5485 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
5486
54872008-04-16 Ollie Wild <aaw@google.com>
5488
5489 * lto-function-in.c (input_type_ref): Updated function description.
5490
54912008-04-16 Ollie Wild <aaw@google.com>
5492
5493 * lto-function-in.c (input_type_ref_1): New function.
5494 (input_type_ref): Split into two functions.
5495 (input_function): Add support for type contexts.
5496
54972008-04-16 Ollie Wild <aaw@google.com>
5498
5499 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
5500 section name
5501
55022008-04-16 Ollie Wild <aaw@google.com>
5503
5504 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
5505 list of supported languages.
5506
3f8257db 55072008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5508
5509 Merge with mainline @133491.
5510
3f8257db 55112008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5512 Jan Hubicka <jh@suse.cz>
5513
5514 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
5515 fd->unmaterialized_fndecls.
5516 (lto_get_file_name, lto_materialize_cgraph): New function.
5517 (lto_materialize_constructors_and_inits,
5518 lto_materialize_function): Read info directly from elf file.
5519 (lto_file_read): Made local and initialize dictionary so that
5520 other lto sections can be read without reprocessing the elf file.
5521 (lto_main): Read all functions after all files have been processed
ab20d992 5522 for their types, globals and cgraph.
d7f09764
DN
5523 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5524 dependencies.
5525 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5526 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5527 (lto_elf_read_symtab): Removed function.
5528 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5529 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5530 (lto_file_read): Made local.
5531 (lto_get_file_name, lto_elf_build_section_table,
ab20d992 5532 lto_input_cgraph):
d7f09764
DN
5533 New function.
5534 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5535 New functions.
5536 (lto_read_decls): Get the file name.
5537 * lto-cgraph-in.c: New file.
5538 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5539 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5540 (input_labels): Fixed latent sizeof issue.
5541 (input_function): Build stmt array to set call sites into cgraph
5542 edges.
5543 (lto_read_body): Reset cfun->curr_properties.
5544 * lto_section_in.h (lto_section_slot): New structure.
5545 (section_hash_table.lto_file_decl_data): New field.
5546
3f8257db 55472008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5548
5549 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5550 reconstruct static initializers.
5551 (lto_get_body, lto_materialize_function): Add lto_section_type as
5552 a parameter.
5553 (lto_materialize_constructors_and_inits,
5554 lto_materialize_file_data): New function.
5555 (lto_materialize_function,
5556 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5557 unmap_section and map_fn_body to map_section.
5558 (lto_set_cu_context): Process functions and static inits
5559 differently.
5560 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5561 lto/lto-section-in.o): Update dependencies.
ab20d992 5562 * lto-elf.c (lto_elf_map_optional_lto_section): Add
d7f09764
DN
5563 lto_section_type parameter.
5564 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
ab20d992 5565 * lto.h (lto_file_vtable_struct): Removed two of the fields and
d7f09764
DN
5566 renamed the other two so that there is only one map function and
5567 one unmap function and each takes a section type parameter.
5568 (lto_read_function_body): Renamed to lto_input_function_body and
5569 added file_data parameter.
5570 (lto_read_var_init): Removed.
5571 (lto_input_constructors_and_inits): New function.
5572 * lto-section-in.c (lto_read_decls): New function.
5573 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5574 var_decls, type_decls, types to lto_file_decl_data.
5575 (input_type_ref, input_expr_operand, lto_read_body): Get
5576 field_decls, fn_decls, var_decls, type_decls, types from different
5577 structure.
5578 (input_globals, input_constructor, lto_read_var_init): Removed.
5579 (input_constructors_or_inits): New function.
5580 (lto_read_function_body, lto_input_constructors_and_inits):
5581 Renamed to lto_input_function_body and takes file_data parameter.
5582 * lto-section-in.h (lto_file_decl_data): New structure.
ab20d992 5583
3f8257db 55842008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5585
5586 * lto-function-in.c (input_globals.c): Changed input type to
5587 lto_function_header.
5588 (input_bb): Removed code to deserialize the stmt number.
5589 (input_function): Renumber all stmts after they are input.
5590 (lto_read_body, lto_read_function_body, lto_read_var_init):
5591 Changed to used new header format and enum section_type.
ab20d992
JJ
5592 *lto-lang.c (success): Removed.
5593
d7f09764
DN
55942008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5595
5596 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5597 (lto_elf_free_sym): Likewise.
5598
5599 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5600 (lto_elf_build_init): Likewise.
5601
3f8257db 56022008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5603
5604 * lto-read.c: Renamed to lto-function-in.c.
5605 (input_1_unsigned): Moved to lto-section-in.c and renamed
5606 lto_input_1_unsigned.
5607 (input_uleb128): Moved to lto-section-in.c and renamed
5608 lto_input_uleb128.
5609 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5610 lto_input_widest_uint_uleb128.
5611 (input_sleb128): Moved to lto-section-in.c and renamed
5612 lto_input_sleb128.
5613 (input_integer): Moved to lto-section-in.c and renamed
5614 lto_input_integer.
5615 (debug_in_fun): Moved to lto-section-in.c and renamed
5616 lto_debug_in_fun.
5617 (input_block): Moved to lto-section-in.h and renamed
5618 lto_input_block.
5619 (input_expr_operand): Fixed to allow lists with more than one
5620 element.
5621 * lto-section-in.h: New file.
5622 * lto-section-in.c: New file with changes from above.
5623 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5624 (lto-section-in.o): New rule.
ab20d992 5625
d7f09764
DN
56262007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5627
5628 * lto-read.c (input_expr_operand): Mark static and external
5629 VAR_DECLs as needed.
5630
56312007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5632
5633 * lto-read.c (input_integer): Use the correct shift amount.
5634
56352007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5636
5637 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5638 (LANG_HOOKS_NAME): Define.
5639
56402007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5641
5642 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5643 original function to...
5644 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5645 don't have a base type.
5646 (lto_read_enumeration_type_DIE): Examine the values of the
5647 enumeration to determine whether we can use an unsigned type for
5648 the base type of the enumeration.
5649
56502007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5651
5652 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5653 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5654
56552007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5656
5657 * lto-lang.c (lto_types_compatible_p): New function.
5658 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5659
56602007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5661 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5662
5663 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5664 (input_local_vars): Read in DECL_INITIAL and context for local
5665 statics that need to be put in unexpanded_vars_list.
5666
56672007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5668
5669 * lto-read.c (input_real): Use a separate null-terminated buffer
5670 for calling real_from_string.
5671 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5672 tell cgraph that it's needed.
5673
56742007-12-19 Doug Kwan <dougkwan@google.com>
5675
5676 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5677
56782007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5679
5680 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5681 (lto_file_read): Reset the members of 'context' every time we read
5682 a toplevel DIE, with special attention to last_param_type.
5683
56842007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5685
5686 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5687 'declaration'. Set the assembler name for non-public functions.
5688
3f8257db 56892007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5690
5691 * lto_read.c (data_in.unexpanded_indexes): New array.
5692 (input_local_var): Added code to read in unexpanded_var_list
5693 indexes for variables. Only read in DECL_CHAIN field for
5694 parameters.
5695 (input_local_vars): Added code to rebuild unexpanded_var_list in
5696 order using unexpanded_indexes.
5697 (input_function): Added code to set DECL_CONTEXT for functions.
5698
56992007-12-13 Doug Kwan <dougkwan@google.com>
5700
5701 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5702 in pointer and reference types.
5703
57042007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5705
5706 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5707 RESULT_DECL.
5708
57092007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5710
5711 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5712 already read the DIE.
5713 (lto_get_body): New function, split out from...
5714 (lto_materialize_function): ...here. Call it.
5715 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5716 determine DECL_EXTERNAL.
5717 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5718 FUNCTION_DECLs when necessary. Use the type of the actual
5719 function definition if we are unable to easily merge types. Ignore
5720 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5721 necessary.
5722
57232007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5724
5725 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5726
57272007-12-12 Bill Maddox <maddox@google.com>
5728
5729 Revert
5730 2007-12-07 Bill Maddox <maddox@google.com>
5731
5732 * lto.c (lto_str_fd_init): New function.
5733 (lto_str_fd_close): New function.
5734 (lto_file_init): Call lto_str_fd_init.
5735 (lto_file_close): Call lto_str_fd_close.
5736 (lto_str_read): New function. Read debug string table.
5737 (lto_str_lookup): New function. Get string for debug
5738 string table offset.
5739 (lto_read_form): Recognize DW_FORM_strp.
5740 (lto_file_read): Invoke lto_str_read.
5741
5742 * lto-elf.c (lto_elf_file_open): Read raw section data
5743 for the .debug_str section, if present.
5744
5745 * lto.h (struct lto_str_fd_struct): New struct.
5746 (struct lto_file_struct): Added new field DEBUG_STR
5747 to hold the file descriptor for the debug string table.
ab20d992 5748
d7f09764
DN
57492007-12-07 Bill Maddox <maddox@google.com>
5750
5751 * lto.c (lto_str_fd_init): New function.
5752 (lto_str_fd_close): New function.
5753 (lto_file_init): Call lto_str_fd_init.
5754 (lto_file_close): Call lto_str_fd_close.
5755 (lto_str_read): New function. Read debug string table.
5756 (lto_str_lookup): New function. Get string for debug
5757 string table offset.
5758 (lto_read_form): Recognize DW_FORM_strp.
5759 (lto_file_read): Invoke lto_str_read.
5760
5761 * lto-elf.c (lto_elf_file_open): Read raw section data
5762 for the .debug_str section, if present.
5763
5764 * lto.h (struct lto_str_fd_struct): New struct.
5765 (struct lto_file_struct): Added new field DEBUG_STR
5766 to hold the file descriptor for the debug string table.
5767
57682007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5769
5770 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5771 Grow the basic_block_info and label_to_block_map vectors if
5772 necessary. Read in the block chain.
5773
57742007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5775
5776 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5777
57782007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5779
5780 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5781
57822007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5783
5784 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5785 (lto_read_body): Don't declare PROP_alias.
5786
57872007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5788
5789 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5790 argument type information.
5791
57922007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5793
5794 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5795 TREE_THIS_VOLATILE if the associated type is a volatile type.
5796 (lto_materialize_function): Remove call to init_ssa_operands.
5797 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5798 variable when reading an SSA_NAME. Do the same when reading a
5799 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5800 (input_cfg): Call init_ssa_operands.
5801 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5802 Move call to init_tree_ssa...
5803 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5804 add_referenced_var on any variables referenced from the body of the
5805 function. Inform the rest of the compiler we are in SSA form and
5806 inform later passes about the current properties.
5807
58082007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5809
5810 * lto.c (lto_materialize_function): Add FIXME.
5811
58122007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5813
5814 * lto-lang.c (enum built_in_attribute): New enum.
5815 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5816 built_in_attributes): New variables.
5817 (def_builtin_1): New function.
5818 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5819
58202007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5821
5822 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5823 DECL_SOURCE_LOCATION for debugging purposes.
5824 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5825 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5826 laying out the decl until later.
5827 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5828 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5829 TREE_ADDRESSABLE.
5830 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5831 operand of an ADDR_EXPR.
5832 * lto-lang.c (enum lto_builtin_type): New enum.
5833 (builtin_type): New typedef.
5834 (builtin_types, string_type_node, const_string_type_node,
5835 wint_type_node, intmax_type_node, uintmax_type_node,
5836 signed_size_type_node): New variables.
5837 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5838 lto_build_c_type_nodes): New functions.
5839 (lto_init): Initialize builtin types.
5840 (lto_set_decl_assembler_name): Let the target machine mangle the
5841 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5842
58432007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5844
5845 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5846 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5847 the type is a constant type. Set the assembler name and inform
5848 the rest of the compiler about the new decl if the decl is not
5849 public.
5850 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5851 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5852 try to read in function bodies for functions that already have bodies.
5853 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5854 equivalency.
5855 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5856 Check for whether we matched a builtin function type before calling
5857 lto_same_type_p on the generated type. Permit cases where the
5858 declaration of an array is unbounded, but the definition is bounded.
5859 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5860 DECL_SIZE_UNIT if necessary.
5861
3f8257db 58622007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5863
ab20d992 5864 * lto-read.c (input_expr_operand): Get types right
d7f09764
DN
5865 for COMPLEX_CST.
5866
3f8257db 58672007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5868
5869 * lto-read.c (make_new_block, input_cfg): Properly set
5870 n_basic_blocks.
ab20d992 5871
d7f09764
DN
58722007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5873
5874 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5875 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5876
58772007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5878
5879 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5880 construct the integer type for bitfields.
5881
3f8257db 58822007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5883
5884 * lto-read.c (data_in.current_node_has_loc): Removed.
5885 (input_line_info): Returns true if node needs line set.
5886 (set_line_info): Always sets line if called.
5887 (clear_line_info): Removed reference to current_node_needs_loc.
5888 (input_expr_operand): Keeps track locally if current node needs a loc.
5889 (input_local_var): Added code to handle DECL_INITIAL for
5890 static local vars. Only set loc if necessary.
ab20d992 5891
d7f09764
DN
58922007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5893
5894 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5895 DECL_CONTEXT.
5896
58972007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5898
5899 * lto.c: Include langhooks.h.
5900 (lto_find_integral_type): Rework logic to handle the case where
5901 got_byte_size is true, but the bitsize requested and that of the
5902 base_type doesn't match.
5903 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5904 asm_name if we are creating a VAR_DECL.
5905 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5906 definition.
5907 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5908 function reference and use the builtin's decl if so. Set the
5909 DECL_CONTEXT of the RESULT_DECL for the function.
5910 * lto-lang.c (registered_builtin_fndecls): New variable.
5911 (lto_getdecls): Return it.
5912 (lto_builtin_function): Chain the new decl onto
5913 registered_builtin_fndecls.
5914
3f8257db 59152007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
ab20d992 5916
d7f09764
DN
5917 * lto-read.c (process_tree_flags, lto_static_init_local):
5918 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5919 (input_line_info, clear_line_info): Fixed new line number code.
5920 (input_expr_operand): Added type to SWITCH_EXPR.
5921 (lto_read_body): Properly initialized data_in.
5922 Clear line info when leaving.
ab20d992 5923
d7f09764
DN
59242007-11-13 Diego Novillo <dnovillo@google.com>
5925
5926 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5927 Initialize ARTIFICIAL.
5928 (lto_read_subroutine_type_subprogram_DIE): Initialize
5929 SAVED_SCOPE.
5930 * lto-read.c (set_line_info): Remove ; from calls to
5931 LINEMAP_POSITION_FOR_COLUMN.
5932
3f8257db 59332007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5934
5935 * lto-read.c (input_type_ref): Renamed from get_type_ref.
ab20d992 5936 (input_expr_operand, input_local_var): Renamed get_type_ref to
d7f09764 5937 input_type_ref.
ab20d992 5938 (input_expr_operand): Get the types correct for
d7f09764 5939 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
ab20d992 5940
d7f09764
DN
59412007-11-13 Doug Kwan <dougkwan@google.com>
5942
5943 * lto-read.c (input_widest_uint_uleb128): New function.
5944 (input_tree_flags, process_tree_flags, input_line_info,
5945 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5946 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5947 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5948 (lto_static_init_local): Add code to assert that lto_flags_type is
5949 wide enough.
5950
59512007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5952
5953 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5954 (lto_read_subroutine_type_subprogram_DIE): Handle
5955 DW_AT_static_link and DW_AT_specification. Return the
5956 specification if present.
5957 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
ab20d992 5958
d7f09764
DN
59592007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5960
5961 * lto-lang.c: Include target.h.
5962 (registered_builtin_types): New variable.
5963 (lto_type_for_mode): Increase number of modes handled.
5964 (lto_builtin_function): Fix argument list and return the decl.
5965 (lto_register_builtin_type): New function.
5966 (lto_init): Initialize target builtins and language-independent
5967 nodes.
5968 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5969
3f8257db 59702007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5971
5972 * lto-read.c (input_expr_operand): Added code to properly handle
5973 index filed. Added new RANGE_EXPR case.
ab20d992 5974
3f8257db 59752007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5976
5977 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5978 (data_in): Added current_node_has_loc field.
5979 (input_line_info, set_line_info, clear_line_info): Added a support
5980 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5981 did not have on on the source side.
5982 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5983 numbers too.
5984
59852007-11-09 Doug Kwan <dougkwan@google.com>
5986
5987 * lto-read.c (input_expr_operand): Change type of operand 2 of
5988 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5989
59902007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5991
5992 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5993 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5994 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5995 the new decl we are creating. Move informing the middle end about
5996 the new decl to...
5997 (lto_main): ...here. Inform the middle end about global variables
5998 after we have read in all the input files.
5999 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
6000 variables with internal linkage, so delete the check for internal
6001 linkage. Combine TREE_PUBLIC flags.
6002
60032007-11-08 Nathan Froyd <froydnj@codesourcery.com>
6004
6005 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
6006 DW_AT_decl_line.
6007 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
6008 builtin specially. Move check for attribute compatibility
6009 earlier.
6010
60112007-11-07 Nathan Froyd <froydnj@codesourcery.com>
6012
6013 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
6014 * config-lang.in (gtfiles): Add lto.h and lto.c.
6015 * lto-elf.c: Include ggc.h.
6016 (lto_elf_file_open): Allocate elf_file from GC memory.
6017 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
6018 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
6019 in GC memory.
6020 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
6021 (lto_file_close): Free file from GC memory.
6022 (lto_cache_store_DIE): Allocate the new entry in GC memory.
6023 (lto_read_member_DIE): Fix declaration.
6024 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
6025 in GC memory.
6026 (current_lto_file): New variable.
6027 (lto_main): Use it.
6028 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
6029 lto_die_cache_entry): Move to...
6030 * lto.h: ...here and add GTY markers as appropriate. Delete forward
6031 declarations accordingly.
6032 (struct lto_file_struct): Declare.
6033 (lto_file_vtable): Use it instead of lto_file.
6034
ab20d992
JJ
60352007-11-06 Alon Dayan <alond@il.ibm.com>
6036 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6037
3d3b561f
ML
6038 * lto-read.c (process_flags, lto_static_init_local):
6039 read flags of VAR_DECL and FUNCTION_DECL of size>1.
6040 change global array num_flags_for_code to flags_length_for_code.
6041 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
ab20d992 6042
d7f09764
DN
60432007-11-05 Nathan Froyd <froydnj@codesourcery.com>
6044
6045 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
6046 layout functions to compute information about the newly constructed
6047 type.
6048
60492007-11-02 Nathan Froyd <froydnj@codesourcery.com>
6050
6051 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
6052 case to use DECL_RESULT if necessary.
6053
3f8257db 60542007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6055
6056 * lto-read.c (input_tree_list): Removed.
6057 (input_tree_flags): Added parameter to force flags no matter what
6058 tree code.
6059 (input_expr_operand): Added parameter to input_tree_flags.
6060 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
6061 input_expr_operand rather than input_tree_lists.
6062 (input_local_var): Use input_expr_operand to read attributes
6063 rather then input_tree_list.
6064 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
6065
60662007-10-31 Nathan Froyd <froydnj@codesourcery.com>
6067
6068 * lto.c (lto_read_typedef_DIE): Fix comment typo.
6069 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
6070 TYPE_DECL for it.
6071 * lto-read.c (lto_read_body): Use correct sizes for calculating
6072 type_decls_offset and types_offset.
6073
60742007-10-30 Nathan Froyd <froydnj@codesourcery.com>
6075
6076 * lto-tree.h (union lang_tree_node): Change GTY description to chain
6077 with GENERIC_NEXT.
6078 * config-lang.in (gtfiles): Add lto-lang.c.
6079 * lto-lang.c: Include gt-lto-lto-lang.h.
6080 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
6081 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
6082 (lto/lto-read.o): Likewise.
6083
3f8257db 60842007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6085
6086 * lto-read.c (data_in): Added type_decls and current_col fields.
6087 (string_slot): New type to hold canonized file name.
ab20d992 6088 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
d7f09764
DN
6089 input_line_info, set_line_info, clear_line_info): New functions.
6090 (file_name_hash_table): New hash table.
ab20d992 6091 (input_local_var, input_labels, input_local_vars_index,
d7f09764
DN
6092 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
6093 (input_uleb128): Changed type of byte var.
6094 (input_expr_operand): Large number of changes to get line numbers
6095 correct. Added TYPE_DECL case.
6096 (input_globals): Added code to get TYPE_DECLs processed.
6097 (input_local_var): Added code to process line numbers and
6098 TREE_CHAIN and DECL_CONTEXT.
6099 (input_function, input_constructor): Added call to
6100 clear_line_number.
6101 (lto_static_init_local): Added code to get line numbers correct.
6102 (lto_read_body): Added code to get TYPE_DECLS read and to change
6103 parameters to the calls above that had their parms reorganized.
6104
d7f09764
DN
61052007-10-29 Nathan Froyd <froydnj@codesourcery.com>
6106
6107 * lto.h (lto_resolve_typedecl_ref): Declare.
6108 * lto.c (lto_resolve_typedecl_ref): New function.
6109
61102007-10-29 Mark Mitchell <mark@codesourcery.com>
6111 Nathan Froyd <froydnj@codesourcery.com>
6112
6113 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
6114 DIEs even if we find an abstract origin for this DIE.
6115
61162007-10-29 Nathan Froyd <froydnj@codesourcery.com>
6117
6118 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
6119 RESULT_DECL slightly earlier. Only remember the decl for later
6120 if we successfully merge declarations.
6121
3f8257db 61222007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6123
6124 * lto-read.c (input_expr_operand): Give label_values the proper
6125 context and provide switch statements with a default type.
ab20d992 6126
d7f09764
DN
61272007-10-23 Nathan Froyd <froydnj@codesourcery.com>
6128
6129 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
6130 * lto.c (lto_materialize_function): ...to here.
6131
61322007-10-22 Nathan Froyd <froydnj@codesourcery.com>
6133
6134 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
6135 * lto.c (lto_info_fd_init): Initialize it.
6136 (lto_info_fd_close): Free it.
6137 (lto_materialize_function): New function.
6138 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
6139 unmaterialized_fndecls.
6140 (lto_file_read): Read in all the function bodies after we have read
6141 all of the DWARF info.
6142 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
6143 reading a function body.
6144
3f8257db 61452007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6146
6147 * lto-read.c (input_tree_flags): Renamed from input_flags to be
6148 semetric with output_tree_flags. Added call to log flags.
6149 (process_tree_flags): Renamed from process_flags. Fixed a lot of
6150 type issues to make everything consistent with flags being
6151 unsigned HOST_WIDE_INTS.
6152 (input_expr_operand): Added call to
6153 recompute_tree_invariant_for_addr_expr.
6154 (input_local_var): Added debugging for tree_chains. Now calls
6155 input_tree_flags.
6156 (input_phi): Made flags unsigned HOST_WIDE_INT.
6157 (input_ssa_names): Now calls input_tree_flags.
6158 (lto_read_body): Now sets cfun.
6159 (lto_read_function_body): Now sets current_function_pointer.
ab20d992 6160
d7f09764
DN
61612007-10-19 Nathan Froyd <froydnj@codesourcery.com>
6162
6163 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
6164 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
6165 inspecting fields within.
6166 (lto_read_DIE_at_ptr): Delete check for null result; let callers
6167 handle this appropriately.
6168
61692007-10-19 Nathan Froyd <froydnj@codesourcery.com>
6170
6171 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
6172 DW_AT_abstract_origin properly. Ensure that we're not dealing with
6173 both DW_AT_abstract_origin and DW_AT_specification.
6174 (lto_read_subroutine_type_subprogram_DIE): Handle
6175 DW_AT_abstract_origin.
6176 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
6177 (lto_read_DIE_at_ptr): Define as static to match declaration.
6178 Lookup the PTR in the cache before reading it from the file.
6179 (lto_resolve_var_ref): Adjust accordingly.
6180 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
6181 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
6182
61832007-10-19 Nathan Froyd <froydnj@codesourcery.com>
6184
6185 * lto.c (lto_read_DIE_at_ptr): New function.
6186 (lto_resolve_var_ref): Use it.
6187 (lto_resolve_fn_ref): Use it.
6188 (lto_resolve_field_ref): Use it.
6189 (lto_read_variable_formal_parameter_constant_DIE): Follow
6190 DW_AT_specification and return the associated decl when appropriate.
6191
61922007-10-18 Nathan Froyd <froydnj@codesourcery.com>
6193
6194 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
6195 Implement for scalar integer modes.
6196 (lto_init): Initialize size_type_node.
6197
3f8257db 61982007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6199
6200 * lto-read.c (input_expr_operand): Remove ssa name asserts.
6201 (input_local_var): Add chaining for params.
6202 (input_ssa_names): Add cfun parameter.
6203 (input_function): Remove unnecessary else.
6204
62052007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6206
6207 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
6208 (lto_resolve_var_ref): Use proper types.
6209 (lto_resolve_fn_ref): Likewise.
6210 (lto_resolve_field_ref): Likewise.
6211
62122007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6213
6214 * lto-read.c (input_expr_operand): Remove case.
6215
62162007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6217
6218 * lto.c (lto_read_only_for_child_DIEs): New function.
6219 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
6220 * lto-elf.c (lto_elf_map_lto_section): Remove.
6221 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
6222 * lto-read.c (input_expr_operand): Assert that we never read a NULL
6223 SSA_NAME. Add missing case for mechanical codes.
6224 (input_cfg): Use basic_block_info_for_function instead of
6225 basic_block_info.
6226
3f8257db 62272007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6228
6229 * lto-read.c (input_sleb128, input_integer): Use proper casts.
6230 (input_list): Renamed input_tree_list and modified to follow same
6231 protocol as lto-function-out.c:output_tree_list.
6232 (input_expr_operand): Make asm operands use input_tree_list.
6233 (input_local_var): Now uses input_tree_list.
6234 (lto_read_body): Change placement for setting context of debug_labels.
ab20d992 6235
3f8257db 62362007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6237
6238 * lto-read.c (input_real): Output debugging in proper order.
6239 (input_integer): Compute bit lengths properly.
6240 (input_list): Clean up declaration.
6241 (input_expr_operand): Change calls to input_real to match fix.
6242 Make reading of LTO_bit_field_ref1 match output.
6243 (input_local_var): Make reading of attributes match what is being
6244 written.
6245 (dump_debug_stream): Also print char in hex.
6246 (debug_out_fun): Fix signed unsigned mismatch.
ab20d992 6247
d7f09764
DN
62482007-10-10 Nathan Froyd <froydnj@codesourcery.com>
6249
6250 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
6251 DW_AT_GNU_vector specially, as they are not contiguous with the
6252 specified set of attribute names. Use class_mask to check for
6253 errors at the end of the function
6254 (lto_resolve_var_ref): Read the DIE if it is not cached.
6255 (lto_resolve_fn_ref): Likewise.
6256 (lto_resolve_field_ref): Likewise.
6257
62582007-10-05 Nathan Froyd <froydnj@codesourcery.com>
6259
6260 * lto.c: Include dwarf2out.h.
6261 (lto_cache_store_DIE): Assert that we never change the value.
6262 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
6263 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
6264 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
6265 sensible type instead.
6266 (lto_read_structure_union_class_type_DIE): Store the newly
6267 created type prior to reading the members of the structure to
6268 avoid infinite recursion. Avoid computing types and alignments
6269 for structures whose sizes are unknown.
6270 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
6271 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
6272 DW_AT_const_value, and DW_AT_specification.
6273 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
6274 Return early if we have already constructed the function type.
6275 (lto_read_typedef_DIE): Check to see if the type has been cached
6276 already. Cache the type before reading any children.
6277 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
6278 (lto_read_DIE): Unset context->skip_non_parameters around reading
6279 the DIE.
6280 (lto_resolve_fn_ref): Delete trailing whitespace.
6281
3f8257db 62822007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6283
6284 * lto-read.c (input_expr_operand): Added type for STRING_CST.
ab20d992 6285
d7f09764
DN
62862007-09-10 Nathan Froyd <froydnj@codesourcery.com>
6287
6288 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
6289
62902007-09-07 Nathan Froyd <froydnj@codesourcery.com>
6291
6292 * lto-lang.c (signed_and_unsigned_types): New variable.
6293 (lto_type_for_size): Consult signed_and_unsigned_types to find
6294 an approprite type, creating it if necessary.
6295 (lto_set_decl_assembler_name): Add actual method body.
6296
62972007-09-06 Jim Blandy <jimb@codesourcery.com>
6298
6299 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
6300 can't find a var init for this variable, leave its DECL_INITIAL.
6301 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
6302 lto_elf_map_fn_body.
6303 (lto_map_lto_section): New function.
6304 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
6305 bodies, and lto_elf_map_optional_lto_section for variable
6306 initializers.
6307 (lto_elf_find_section_data): Quietly return NULL if the section is
6308 missing.
6309 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
6310
6311 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
6312
6313 * lto-read.c (lto_read_body): Doc fix.
6314
3f8257db 63152007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6316
6317 * lto-read.c (fun_in): Renamed to data_in.
6318 (input_expr_operand, input_local_var, input_string_internal,
ab20d992 6319 input_string, input_real, input_list, get_label_decl,
d7f09764 6320 get_type_ref, input_expr_operand, input_globals, input_labels,
ab20d992 6321 input_local_vars_index, input_local_var, input_local_vars,
d7f09764
DN
6322 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
6323 (input_constructor): New function.
6324 (lto_read_function_body): Renamed to lto_read_body and generalized
6325 to handle both functions and constructors.
6326 (lto_read_function_body, lto_read_var_init): New function.
ab20d992 6327
3f8257db 63282007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6329
6330 * lto-read.c (input_expr_operand): Assert that there really is a
6331 FUNCTION_DECL.
6332 (input_globals): Removed checks on 0 section.
ab20d992 6333
3f8257db 63342007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6335
6336 * lto-read.c (fun_in): Added local_decls_index and
ab20d992 6337 local_decls_index_d.
d7f09764
DN
6338 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
6339 (input_globals): Enabled code to handle FIELD_DECLs.
6340 (input_local_vars_index, input_local_vars): New function.
6341 (input_local_var): Changed to allow locals to be input randomly.
6342 (lto_read_function_body): Added code to input the
6343 local_decls_index and to free various structures.
ab20d992 6344
d7f09764
DN
63452007-08-17 Jim Blandy <jimb@codesourcery.com>
6346
6347 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
6348 ATTRIBUTE_UNUSED from 'die' formal.
6349
6350 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
6351 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
6352 (input_list): Fix type of 'tag'.
6353 (input_expr_operand): Fix type of 'tag' argument. Update
6354 declaration. Fix type of 'ctag'. Add default case to switch,
6355 since the type of the switched value is now an enum.
6356 (input_local_vars): Fix type of 'tag'.
6357 (input_bb): Fix type of 'tag' argument.
6358 (input_function): Fix type of 'tag' argument.
6359
63602007-08-16 Jim Blandy <jimb@codesourcery.com>
6361
6362 * lto.c (lto_read_member_DIE): Record the tree we create in
6363 fd->die_cache. (Our 'die' argument is no longer unused.)
6364 (lto_resolve_field_ref): New function.
6365 * lto.h (lto_resolve_field_ref): New declaration.
6366
63672007-08-15 Jim Blandy <jimb@codesourcery.com>
6368
6369 * lto-read.c (lto_read_var_init): Mark arguments as unused.
6370
63712007-08-07 Jim Blandy <jimb@codesourcery.com>
6372
6373 * lto.c (lto_read_form): Complete attr_classes table.
6374 (DWARF2_form_data): Doc fix.
ab20d992 6375
d7f09764
DN
63762007-08-05 Mark Mitchell <mark@codesourcery.com>
6377
6378 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
6379 and unmap_var_init.
6380 (lto_read_var_init): Declare.
6381 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
6382 interface for reading variable initializers.
6383 * lto-elf.c (lto_elf_read_var_init): Remove.
6384 (lto_elf_file_vtable): Update initializer.
6385 (lto_elf_read_var_init): Add comment about unused-ness.
6386 * lto-read.c (lto_read_var_init): New.
6387
6388 * lto.c (lto_read_form): Add entry for DW_AT_inline.
6389
3f8257db 63902007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6391
6392 * lto-read.c (lto_read_function_body): Moved declaration of fn
6393 outside of ifdef.
ab20d992 6394
3f8257db 63952007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6396
6397 * lto-read.c (input_uleb128, input_string_internal, input_real,
6398 input_integer, input_record_start, input_list, get_type_ref,
6399 input_flags, input_expr_operand, input_expr_operand,
6400 input_expr_operand, input_local_vars, input_cfg, input_phi,
6401 input_ssa_names, input_bb, input_function): Added semicolons.
6402
ab20d992 6403
3f8257db 64042007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6405
6406 * lto-read.c (input_globals): Remove debugging.
6407 (input_function): Set DECL_ARGUMENTS.
6408
3f8257db 64092007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6410
6411 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
6412 RETURN_EXPR, MODIFY_EXPR and processing of flags.
6413 (input_phi): Made work with operands other than SSA_NAMES and
6414 fixed processing of flags.
6415 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
6416 (input_flags): New function.
6417 * lto-lang.c (lto_init): Changed state of in_lto_p.
ab20d992
JJ
6418
6419
d7f09764
DN
64202007-07-24 Mark Mitchell <mark@codesourcery.com>
6421
6422 * lto-tree.h (lto_varargs_cookie): Remove.
6423 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
6424 skip_non_parameters, skip_parameters.
6425 (lto_varargs_cookie): Remove.
6426 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
6427 parameter types.
6428 (lto_read_abbrev): New function.
6429 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
6430 child DIEs.
6431 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
6432 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
6433 (lto_file_read): Initialize new context fields.
6434 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
6435 (lto_unsigned_type): Remove.
6436 (lto_signed_type): Likewise.
6437 (lto_signed_or_unsigned_type): Likewise.
6438 (lto_init): Do not create lto_varargs_cookie.
6439 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
6440 (LANG_HOOKS_SIGNED_TYPE): Likewise.
6441 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
6442
64432007-07-19 Jan Hubicka <jh@suse.cz>
6444
6445 * lto-read.c (lto_read_function_body): Produce empty scope block
6446 to avoid crash.
6447
64482007-07-18 Mark Mitchell <mark@codesourcery.com>
6449
6450 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
6451 process local variables.
6452 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
6453
3f8257db 64542007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6455
6456 * lto-read.c (input_list, input_expr_operand): Added struct
6457 function parameter.
6458 (init_cfg, finalize_cfg): Removed function.
6459 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
6460 (input_labels, input_local_vars): Now takes input_block parameter rather than
6461 synthsyzing it.
6462 (input_cfg, input_phi, input_ssa_names): New functions.
6463 (input_bb): Now passes in input_blocks. Does not construct cfg
6464 and processes the list of phi functions.
6465 (input_function): Now builds both the cfg and ssa_names table.
6466 (lto_read_function_body): Processes new header fields to construct
6467 streams for the ssa_names and cfg and their debugging.
ab20d992
JJ
6468 * lto-lang.c (lto_init): Set in_lto_p.
6469
6470
d7f09764
DN
64712007-06-28 Mark Mitchell <mark@codesourcery.com>
6472
6473 * lto.h (lto_file_vtable): Add read_var_init.
6474 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
6475 initializers.
6476 (lto_main): Remove bogus asserts.
6477 * lto-elf.c (tm.h): Include it.
6478 (libiberty.y): Likewise.
6479 (lto_elf_file): Add strtab and symtab. Rename
6480 string_table_section_index to sec_strtab.
6481 (lto_elf_file_vtable): Add lto_elf_read_var_init.
6482 (lto_elf_get_shdr): New function.
6483 (lto_elf_free_shdr): Likewise.
6484 (lto_elf_find_section_data): Use them.
6485 (lto_elf_read_symtab): New function.
6486 (lto_elf_lookup_sym): Likewise.
6487 (lto_elf_free_sym): Likewise.
6488 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
6489 (lto_elf_built_init): New function.
6490 (lto_elf_read_var_init): Likewise.
6491 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
6492
3f8257db 64932007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6494
6495 * lto-read (make_new_block): Initialize the stmt_list.
6496 (lto_static_init_local): Add debugging for missing codes.
ab20d992 6497
d7f09764
DN
64982007-06-26 Mark Mitchell <mark@codesourcery.com>
6499
6500 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
ab20d992 6501 unprototyped functions.
d7f09764
DN
6502
65032007-06-23 Mark Mitchell <mark@codesourcery.com>
6504
6505 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
6506 Handle DW_AT_MIPS_linkage_name.
6507 (lto_read_subroutine_type_subprogram): Likewise. Correct
6508 compilation errors.
6509 (lto_main): Remove incorrect assertions.
6510 * lto-symbtab.c: Build function types out of TREE_LISTs.
6511
6512 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
ab20d992 6513
d7f09764 6514 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
ab20d992 6515
3f8257db 65162007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6517
ab20d992 6518 * lto-tree.h (lang_decl, lang_type, language_function): Added
d7f09764 6519 dummy since ggc does not like empty structs.
ab20d992
JJ
6520 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6521 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
d7f09764
DN
6522 expr->common to expr->base.
6523 (make_new_block): Moved stmt_list to proper place.
6524
ab20d992 65252007-03-14 Robert Kennedy <jimbob@google.com>
d7f09764
DN
6526
6527 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6528 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6529 assembler name from DWARF.
6530 * lto-lang.c (lto_set_decl_assembler_name) New function.
6531
65322006-09-10 Mark Mitchell <mark@codesourcery.com>
6533
6534 * lto.h (lto_file_vtable): New structure.
6535 (lto_file): Add vtable pointer.
6536 (lto_file_init): Add vtable paramter.
6537 (lto_read_function_body): New function.
6538 (lto_symtab_merge_fn): New function.
6539 * lto.c (lto_file_init): Add vtable parameter.
6540 (lto_read_form): Fill in entries for DW_AT_prototyped,
6541 DW_AT_frame_base.
6542 (lto_read_subroutine_type_subprogram_DIE): New function.
6543 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6544 DW_TAG_subprogram.
6545 * lto-elf.c (lto_elf_vile_vtable): New variable.
6546 (lto_elf_file_open): Pass it to lto_file_init.
6547 (lto_elf_map_fn_body): New function.
6548 (lto_elf_unmap_fn_body): Likewise.
6549 * lto-read.c: New file.
6550 * lto-symtab.c (lto_symtab_merge_fn): New function.
6551 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6552 tree_rest_of_compilation.
6553 * Make-lang.in (LTO_OBJS): Add lto-read.o
6554 (lto-read.o): New target.
6555
65562006-09-03 Mark Mitchell <mark@codesourcery.com>
6557
6558 * lto.c (<inttypes.h>): Don't include it.
6559 (lto_context): Don't typedef it.
6560 (lto_resolve_reference): New function.
6561 (lto_read_form): Use it.
6562 (lto_resolve_type_ref): New function.
6563 (lto_resolve_var_ref): Likewise.
6564 (lto_resolve_fn_ref): Likewise.
6565 * lto.h (<inttypes.h>): Include it.
6566 (lto_context): New type.
6567 (lto_ref): New structure.
6568 (lto_resolve_type_ref): Declare.
6569 (lto_resolve_var_ref): Likewise.
6570 (lto_resolve_fn_ref): Likewise.
6571
65722006-08-18 Mark Mitchell <mark@codesourcery.com>
6573
6574 * lang-specs.h: New file.
6575
65762006-08-14 Mark Mitchell <mark@codesourcery.com>
6577
6578 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6579 (lto_info_fd_close): Deallocate it.
6580 (lto_die_cache_entry): New structure.
6581 (lto_cache_hash): New function.
6582 (lto_cache_eq): Likewise.
6583 (lto_cache_store_DIE): Likewise.
6584 (lto_cache_lookup_DIE): Likewise.
6585 (lto_read_referenced_type_DIE): Use the cache.
6586 (lto_read_pointer_type_DIE): Robustify.
6587 (lto_read_DIE): Use the cache.
6588 * lto.h (hashtab.h): Include.
6589 (lto_info_fd): Add DIE cache.
6590 * Make-lang.in (LTO_H): New variable.
6591 (lto/lto-lang.o): Use LTO_H.
6592 (lto/lto-elf.o): Likewise.
6593 (lto/lto-symtab.o): Likewise.
6594
65952006-07-09 Mark Mitchell <mark@codesourcery.com>
6596
6597 * lto.c (lto_abi_mismatch_error): New function.
6598 (lto_abbrev_read): Initialize num_abbrevs.
6599 (lto_read_form): Specify allowed form classes for
6600 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6601 (lto_read_variable_formal_parameter_constant_DIE): Handle
6602 DW_AT_declaration. Call lto_symtab_merge_var.
6603 (lto_read_pointer_type_DIE): New function.
6604 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6605 not creat TYPE_DECLs for types that already have them.
6606 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6607 (lto_set_cu_context): Make cu_start point to the header, not the
6608 first DIE.
6609 (lto_file_read): Adjust for change to lto_set_cu_context.
6610 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6611 (lto/lto-symtab.o): New rule.
6612 * lto-tree.h (lang_identifier): Add decl field.
6613 (LANG_IDENTIFIER_CAST): New macro.
6614 (LTO_IDENTIFIER_DECL): Likewise.
6615 (lto_symtab_merge_var): Declare.
6616 * lto-symtab.c: New file.
6617
66182006-07-02 Daniel Berlin <dberlin@dberlin.org>
6619
6620 * lto.c (lto_context): Add current_cu and info_fd members.
6621 (DWARF2_CompUnit): New structure.
6622 (lto_read_DIE): Take lto_info_fd *.
6623 (lto_read_child_DIEs): Ditto.
6624 (lto_file_corrupt_error): Constify argument.
6625 (lto_set_cu_context): New function
6626 (lto_info_fd_init): Ditto.
6627 (lto_info_fd_close): Ditto.
6628 (lto_file_init): Use lto_info_fd_init.
6629 (lto_file_close): Use lto_info_fd_close.
6630 (lto_read_initial_length): Pass in pointer to header size.
6631 (lto_read_comp_unit_header): Correct cu_length to
6632 real length from beginning of header. Take lto_info_fd * as
6633 argument.
6634 (find_cu_for_offset): New function.
6635 (lto_read_form): Change first argument to lto_info_fd *.
6636 Add FORM_CONTEXT argument.
6637 Handle DW_FORM_ref_addr.
ab20d992 6638 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
d7f09764
DN
6639 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6640 Swap contexts if necessary for form.
6641 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6642 lto_file_corrupt_error.
6643 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6644 (lto_read_referenced_type_DIE): Change first argument to
6645 lto_info_fd *. Access lto_fd fields through base pointer.
6646 (lto_read_compile_unit_DIE): Change first argument to an
6647 lto_info_fd *.
6648 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6649 (lto_read_base_type_DIE): Ditto.
6650 (lto_read_child_DIEs): Ditto.
6651 (lto_read_DIE): Ditto. Change type of function pointer.
6652 (lto_info_read): New function.
6653 (lto_set_cu_context): Ditto.
6654 (lto_file_read): Use lto_info_read, walk resulting CU's
6655 (lto_main): Update for lto_info_fd change.
6656 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6657 necessary.
6658 * lto.h (DWARF2_CompUnit): New structure.
6659 (lto_info_fd): Ditto.
6660 (lto_file): Change debug_info to be an lto_info_fd.
ab20d992 6661
d7f09764
DN
66622006-06-25 Mark Mitchell <mark@codesourcery.com>
6663
6664 * lto.c (toplev.h): Include it.
6665 (dwarf2.h): Likewise.
6666 (tree.h): Likewise.
6667 (tm.h): Likewise.
6668 (cgraph.h): Likewise.
6669 (ggc.h): Likewise.
6670 (inttypes.h): Likewise.
6671 (DWARF2_attr): New type.
6672 (DWARF2_abbrev): Likewise.
6673 (DWARF2_class): Likewise.
6674 (DWARF2_form_data): Likewise.
6675 (lto_context): Likewise.
6676 (lto_fd_init): New function.
6677 (lto_abbrev_fd_init): Likewise.
6678 (lto_abbrev_fd_close): Likewise.
6679 (lto_file_init): Use them.
6680 (lto_file_close): New function.
6681 (lto_file_corrupt_error): Likewise.
6682 (LTO_CHECK_INT_VAL): New macro.
6683 (lto_check_size_t_val): New function.
6684 (lto_check_int_val): Likewise.
6685 (LTO_READ_TYPE): New macro.
6686 (lto_read_ubyte): New function.
6687 (lto_read_uhalf): Likewise.
6688 (lto_read_uword): Likewise.
6689 (lto_read_uleb128): Likewise.
6690 (lto_read_initial_length): Likewise.
6691 (lto_abbrev_read_attrs): Likewise.
6692 (lto_abbrev_read): Likewise.
6693 (lto_abbrev_lookup): Likewise.
6694 (lto_read_section_offset): Likewise.
6695 (lto_read_comp_unit_header): Likewise.
6696 (lto_read_form): Likewise.
6697 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6698 (LTO_BEGIN_READ_ATTRS): Likewise.
6699 (LTO_END_READ_ATTRS): Likewise.
6700 (lto_unsupported_attr_error): New function.
6701 (lto_get_identifier): Likewise.
6702 (lto_read_referenced_type_DIE): Likewise.
6703 (lto_read_compile_unit_DIE): Likewise.
6704 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6705 (lto_read_base_type_DIE): Likewise.
6706 (lto_read_DIE): Likewise.
6707 (lto_read_child_DIEs): Likewise.
6708 (lto_file_read): Read DIEs.
6709 (lto_main): Ask middle end to emit entities.
6710 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6711 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6712 (lto_elf_file_close): Likewise.
6713 * lto.h (lto_file): Declare.
6714 (DWARF2_abbrev): Likewise.
6715 (lto_fd): New type.
6716 (lto_abbrev_fd): Likewise.
6717 (lto_file): Use new types.
6718 (lto_file_close): Declare.
6719 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
ab20d992 6720
d7f09764
DN
67212006-06-18 Mark Mitchell <mark@codesourcery.com>
6722
6723 * lto.h: New file.
6724 * lto.c: New file.
6725 * lto-elf.c: New file.
6726 * lto-lang.c (flags.h): Include it.
6727 (lto.h): Likewise.
6728 (lto_init): New function.
6729 (lto_write_globals): Remove.
ab20d992 6730 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
d7f09764
DN
6731 (LANG_HOOKS_INIT): Define.
6732 (LANG_HOOKS_PARSE_FILE): Likewise.
6733 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6734 (LTO_EXE): Link with libelf.
6735 (lto/lto-lang.o): Update dependencies.
6736 (lto/lto.o): New target.
6737 (lto/lto-elf.o): Likewise.
6738
67392006-06-12 Mark Mitchell <mark@codesourcery.com>
6740
6741 * config-lang.in: New file.
6742 * Make-lang.in: Likewise.
6743 * lto-tree.h: Likewise.
6744 * lto-lang.c: Likewise.
818ab71a 6745\f
68127a8e 6746Copyright (C) 2006-2023 Free Software Foundation, Inc.
d7f09764 6747
818ab71a
JJ
6748Copying and distribution of this file, with or without modification,
6749are permitted in any medium without royalty provided the copyright
6750notice and this notice are preserved.