]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
67d5b10e
GA
12024-02-10 Jakub Jelinek <jakub@redhat.com>
2
3 * lto-common.cc (print_lto_report_1): Use HOST_SIZE_T_PRINT_DEC
4 and casts to fmt_size_t instead of "%ld" and casts to long. Use
5 %d instead of %ld and casts to long for searches and collisions.
6
81d1a6e9
GA
72024-01-04 David Malcolm <dmalcolm@redhat.com>
8
9 * lang.opt.urls: New file, autogenerated by
10 regenerate-opt-urls.py.
11
3dd09cd9
GA
122023-12-05 Richard Sandiford <richard.sandiford@arm.com>
13
14 * lto-lang.cc (lto_gnu_attribute_table): Add extra braces to work
15 around PR 16333 in older compilers.
16 (lto_format_attribute_table): Likewise.
17
04d4a494
GA
182023-12-02 Richard Sandiford <richard.sandiford@arm.com>
19
20 * lto-lang.cc (lto_format_attribute_table): Change type to
21 scoped_attribute_specs, using...
22 (lto_format_attributes): ...this as the underlying array.
23 (lto_attribute_table): Change to an array of scoped_attribute_specs
24 pointers, using...
25 (lto_gnu_attributes, lto_gnu_attribute_table): ...these new globals
26 for the original array. Include the format attributes.
27 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
28 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
29 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
30
c48f1056
GA
312023-11-07 Joseph Myers <joseph@codesourcery.com>
32
33 * lto-lang.cc (flag_isoc2x): Rename to flag_isoc23.
34
125781fb
GA
352023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
36
37 * Make-lang.in: Make create_fdas_for_lto1 target not .PHONY
38
590a8bec
GA
392023-09-19 Thomas Schwinge <thomas@codesourcery.com>
40 Pan Li <pan2.li@intel.com>
41
42 * lto-common.cc (lto_mode_identity_table): Remove.
43 (lto_file_finalize) [!ACCEL_COMPILER]: 'NULL'-intialize
44 'file_data->mode_table'.
45 (lto_fe_init): Don't initialize 'lto_mode_identity_table'.
46 * lto-common.h (lto_mode_identity_table): Remove.
47
5158918a
GA
482023-07-05 Robin Dapp <rdapp@ventanamicro.com>
49 Juzhe-Zhong <juzhe.zhong@rivai.ai>
50
51 * lto-lang.cc (lto_type_for_mode): Ditto.
52
6d966f9f
GA
532023-07-04 Pan Li <pan2.li@intel.com>
54 Thomas Schwinge <thomas@codesourcery.com>
55
56 * lto-common.cc (lto_file_finalize) [!ACCEL_COMPILER]: Initialize
57 'file_data->mode_bits'.
58
592023-07-04 Thomas Schwinge <thomas@codesourcery.com>
60
61 * lto-common.cc (lto_read_decls): Adjust.
62
14bfda60
GA
632023-06-29 Qing Zhao <qing.zhao@oracle.com>
64
65 * lto-common.cc (compare_tree_sccs_1): Compare bit
66 TYPE_NO_NAMED_ARGS_STDARG_P or TYPE_INCLUDES_FLEXARRAY properly
67 for its corresponding type.
68
692023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
70
71 * Make-lang.in: Pass correct stage lto when processing
72 profile data collected while building target libraries
73
5f590ee3
GA
742023-06-28 Richard Biener <rguenther@suse.de>
75
76 * lto-common.cc (compare_tree_sccs_1): Use TYPE_PRECISION_RAW.
77
b2776076
GA
782023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
79
80 * lto-common.cc (lto_maybe_register_decl): Use _P defines from tree.h.
81 * lto-symtab.cc (warn_type_compatibility_p): Ditto.
82 (lto_symtab_resolve_replaceable_p): Ditto.
83 (lto_symtab_merge_decls_1): Ditto.
84 * lto-symtab.h (lto_symtab_prevailing_decl): Ditto.
85
50205195
GA
862023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
87
88 * Make-lang.in: Merge perf data collected when compiling lto1 and runtime libraries
89
c88a7c63
GA
902023-03-01 Jakub Jelinek <jakub@redhat.com>
91
92 PR target/108910
93 * lto-common.cc (lto_fixup_prevailing_type): Don't add t to
94 TYPE_POINTER_TO or TYPE_REFERENCE_TO chain if it has
95 TYPE_ATTRIBUTES or is TYPE_REF_IS_RVALUE.
96
5013c3bb
GA
972023-01-13 Richard Biener <rguenther@suse.de>
98
99 * lto-lang.cc (lto_type_for_mode): Sync with
100 c_common_type_for_mode.
101
faccda27
GA
1022023-01-04 Jan Hubicka <hubicka@ucw.cz>
103
104 * lto-partition.cc (may_need_named_section_p): Clones with no body
105 need no remaning.
106
bbab9c83
GA
1072022-12-29 Alexandre Oliva <oliva@adacore.com>
108
109 * lto-partition.cc (lto_1_to_1_map): Drop NULL partition
110 mapping.
111
40b8ac12
GA
1122022-12-22 Richard Biener <rguenther@suse.de>
113
114 * lto-common.cc (compare_tree_sccs_1): Compare DECL_NOT_FLEXARRAY.
115
de282a20
GA
1162022-12-21 Jan Hubicka <hubicka@ucw.cz>
117
118 * lto-common.cc (lto_resolution_read): With incremental linking
119 and whole program ignore turn LDPR_PREVAILING_DEF_IRONLY to
120 LDPR_PREVAILING_DEF_IRONLY_EXP
121 * lto-lang.cc (lto_post_options): Do not clear flag_whole_program
122 for incremental link
123
9a1b4f1d
GA
1242022-11-25 Martin Liska <mliska@suse.cz>
125
126 PR lto/107829
127 * lto.cc (materialize_cgraph): Call timevar_push before
128 materialization starts.
129
f36bba01
GA
1302022-10-29 Thomas Schwinge <thomas@codesourcery.com>
131
132 * lang.opt: Better separate 'LTO' vs. 'LTODump'.
133
3055829a
GA
1342022-10-28 Joseph Myers <joseph@codesourcery.com>
135
136 * lto-common.cc (compare_tree_sccs_1): Compare
137 TYPE_NO_NAMED_ARGS_STDARG_P.
138
1392022-10-28 Martin Liska <mliska@suse.cz>
140
141 * lto-dump.cc (dump_list): Remove trailing return.
142 (dump_symbol): Likewise.
143 (dump_body): Filter name based on mangled name.
144 (dump_tool_help): Use GIMPLE wording.
145 (lto_main): Update wording.
146
96069d84
GA
1472022-10-27 Martin Liska <mliska@suse.cz>
148
149 PR lto/107418
150 * lto-dump.cc (lto_main): Do not load LTO stream for aliases.
151
d0fc05e8
GA
1522022-09-15 Richard Biener <rguenther@suse.de>
153
154 * lto-lang.cc (lto_build_c_type_nodes): Do not initialize
155 void_list_node.
156
3b2e3fa3
GA
1572022-08-22 Martin Liska <mliska@suse.cz>
158
159 PR lto/106700
160 * lto.cc (wait_for_child): Ask if we are connected to jobserver.
161 (stream_out_partitions): Likewise.
162
e1298640
GA
1632022-08-10 Martin Liska <mliska@suse.cz>
164
165 PR lto/106328
166 * lto.cc (wait_for_child): Decrement nruns once a process
167 finishes.
168 (stream_out_partitions): Use job server if active.
169 (do_whole_program_analysis): Likewise.
170
0fe604a2
GA
1712022-07-08 Martin Liska <mliska@suse.cz>
172
173 * lto-dump.cc (lto_main): Exit in the function
174 as we don't want any LTO bytecode processing.
175
9d3dd218
GA
1762022-06-27 David Malcolm <dmalcolm@redhat.com>
177
178 * lto-dump.cc: Add "final" and "override" to various vfunc
179 implementations, removing redundant "virtual" as appropriate.
180
702bd11f
GA
1812022-05-16 Martin Liska <mliska@suse.cz>
182
183 * lto-common.cc (lto_resolution_read): Use ARRAY_SIZE.
184 * lto-lang.cc (lto_init): Likewise.
185
d1ca63a1
GA
1862022-03-23 Tobias Burnus <tobias@codesourcery.com>
187
188 PR middle-end/104285
189 * lto-partition.cc (maybe_rewrite_identifier): Use get_identifier
190 for the returned string to be usable as hash key.
191 (validize_symbol_for_target): Hence, use return value directly.
192 (privatize_symbol_name_1): Track maybe_rewrite_identifier renames.
193 * lto.cc (offload_handle_link_vars): Move function up before ...
194 (do_whole_program_analysis): Call it after static renamings.
195 (lto_main): Move call after static renamings.
196
3c1cbde1
GA
1972022-02-04 Richard Biener <rguenther@suse.de>
198
199 PR middle-end/90348
200 PR middle-end/104092
201 * lto-common.cc (compare_tree_sccs_1): Compare CLOBBER_KIND.
202
88944e13
GA
2032022-02-02 Martin Liska <mliska@suse.cz>
204
205 PR lto/104333
206 * lto-common.cc (read_cgraph_and_symbols): Move resolution
207 checking for number of files later and report a reasonable
208 error message.
209 * lto-object.cc (lto_obj_file_open): Make error fatal.
210
fc829782
GA
2112022-01-17 Martin Liska <mliska@suse.cz>
212
213 * config-lang.in: Rename .c names to .cc.
214 * lang-specs.h: Likewise.
215 * lto-common.cc (gimple_register_canonical_type_1): Likewise.
216 * lto-common.h: Likewise.
217 * lto-dump.cc (lto_main): Likewise.
218 * lto-lang.cc (handle_fnspec_attribute): Likewise.
219 (lto_getdecls): Likewise.
220 (lto_init): Likewise.
221 * lto.cc (lto_main): Likewise.
222 * lto.h: Likewise.
223
2242022-01-17 Martin Liska <mliska@suse.cz>
225
226 * common.c: Moved to...
227 * common.cc: ...here.
228 * lto-common.c: Moved to...
229 * lto-common.cc: ...here.
230 * lto-dump.c: Moved to...
231 * lto-dump.cc: ...here.
232 * lto-lang.c: Moved to...
233 * lto-lang.cc: ...here.
234 * lto-object.c: Moved to...
235 * lto-object.cc: ...here.
236 * lto-partition.c: Moved to...
237 * lto-partition.cc: ...here.
238 * lto-symtab.c: Moved to...
239 * lto-symtab.cc: ...here.
240 * lto.c: Moved to...
241 * lto.cc: ...here.
242
483092d3
GA
2432021-11-18 Jan Hubicka <hubicka@ucw.cz>
244
245 * lto-partition.c (promote_symbol): Clear semantic_interposition flag.
246
9defce62
GA
2472021-11-06 Jan Hubicka <hubicka@ucw.cz>
248
249 PR ipa/103070
250 PR ipa/103058
251 * lto-partition.c (must_not_rename): Update comment.
252 (promote_symbol): Set resolution to LDPR_PREVAILING_DEF_IRONLY.
253
c2bd5d8a
GA
2542021-10-22 Eric Gallager <egallager@gcc.gnu.org>
255
256 PR other/102663
257 * Make-lang.in: Add dummy lto.install-dvi target.
258
cf966403
GA
2592021-09-27 Martin Liska <mliska@suse.cz>
260
261 * lto-lang.c (lto_init_options_struct): Set also
3d3b561f 262 x_flag_default_complex_method.
cf966403 263
7b739540
GA
2642021-09-03 Jakub Jelinek <jakub@redhat.com>
265
266 PR target/102024
267 * lto-common.c (compare_tree_sccs_1): Also compare
268 DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD values.
269
9f7c2bad
GA
2702021-09-02 liuhongt <hongtao.liu@intel.com>
271
272 * lto-lang.c (lto_type_for_mode): Return float16_type_node
273 when mode == TYPE_MODE (float16_type_node).
274
ee682192
GA
2752021-05-31 Martin Liska <mliska@suse.cz>
276
277 * lto-common.c (compare_tree_sccs_1): Compare
278 FUNCTION_DECL_DECL_TYPE.
279
637569df
GA
2802021-05-24 Wang Liushuai <wangliushuai@bytedance.com>
281
282 * lto-dump.c (get_size): Fix the NPD error about the thunk symbol.
283
ee351f7f
GA
2842021-04-15 Jan Hubicka <hubicka@ucw.cz>
285
286 PR lto/98599
287 * lto.c (lto_wpa_write_files): Fix handling of clones.
288
019a9220
GA
2892021-04-08 Martin Sebor <msebor@redhat.com>
290
291 PR middle-end/99883
292 * lto-lang.c (lto_post_options): Correct spelling.
293
2c83c3fb
GA
2942021-02-28 Jakub Jelinek <jakub@redhat.com>
295
296 PR c/99304
297 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Fix comment
298 typos - refernced -> referenced and
299 devirtualizaiton -> devirtualization.
300
eefe499f
GA
3012020-12-16 Martin Liska <mliska@suse.cz>
302
303 * lang.opt: Remove usage of Report.
304
82e5048e
GA
3052020-11-20 Jakub Jelinek <jakub@redhat.com>
306
307 PR other/97911
308 * Make-lang.in (lto1.serial, lto2.serial): Change from goals to
309 variables.
310 (.PHONY): Drop lto1.serial, lto2.serial, lto1.prev and lto2.prev.
311 ($(LTO_EXE)): Depend on $(lto1.serial) rather than lto1.serial.
312 ($(LTO_DUMP_EXE)): Depend on $(lto2.serial) rather than lto2.serial.
313
25bb75f8
GA
3142020-11-18 Jerry Clcanny <a837940593@gmail.com>
315
316 * lto-symtab.c (lto_symtab_merge_symbols): Fix typos in comment.
317
3182020-11-18 Jakub Jelinek <jakub@redhat.com>
319
320 * Make-lang.in (lto, lto1.serial, lto2.serial): New goals.
321 (.PHONY): Add lto lto1.serial lto1.prev lto2.serial lto2.prev.
322 (lto.all.cross, lto.start.encap): Remove dependencies.
323 ($(LTO_EXE)): Depend on lto1.prev. Call LINK_PROGRESS.
324 ($(LTO_DUMP_EXE)): Depend on lto2.prev. Call LINK_PROGRESS.
325
4dabb037
GA
3262020-11-17 Jan Hubicka <jh@suse.cz>
327
328 PR bootstrap/97857
329 * lto-common.c (gimple_register_canonical_type_1): Only
330 register types with TYPE_CXX_ODR_P flag; sanity check that no
331 conflict happens at ltrans time.
332
44cab2d8
GA
3332020-11-06 Nathan Sidwell <nathan@acm.org>
334
335 * lto-symtab.c (lto_symtab_merge_decls_1): Rename
336 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
337
e93aae4a
GA
3382020-10-28 Jakub Jelinek <jakub@redhat.com>
339
340 PR lto/96680
341 * lto-common.c (lto_fixup_prevailing_decls): Don't use
342 LTO_NO_PREVAIL on TREE_LIST's TREE_PURPOSE.
343 * lto-partition.c (lto_balanced_map): Treat declare_variant_alt
344 nodes like definitions.
345
efe71fcc
GA
3462020-10-23 Jan Hubicka <hubicka@ucw.cz>
347
348 * lto-partition.c (add_symbol_to_partition_1): Update for new thunk
349 api.
350
8b394f01
GA
3512020-08-27 Martin Liska <mliska@suse.cz>
352
353 * lto-common.c (lto_file_finalize): Set exact argument of a vector
354 growth function to true.
355
9a5b7438
GA
3562020-06-03 Jan Hubicka <hubicka@ucw.cz>
357
358 * lto-common.c (compare_tree_sccs_1): Do not compare TYPE_VALUES.
359
bcb63eb2
JH
3602020-05-22 Jan Hubicka <hubicka@ucw.cz>
361
362 * lto-common.c (lto_read_decls): Do not skip stray refs.
363
03d90a20
JH
3642020-05-20 Jan Hubicka <hubicka@ucw.cz>
365
366 * lto-common.c (compare_tree_sccs_1): Sanity check that we never
367 read TRANSLATION_UNIT_DECL.
368 (process_dref): Break out from ...
369 (unify_scc): ... here.
370 (process_new_tree): Break out from ...
371 (lto_read_decls): ... here; handle streaming of singleton trees.
372 (print_lto_report_1): Update statistics.
373
eb72dc66
RB
3742020-05-07 Richard Biener <rguenther@suse.de>
375
376 PR middle-end/94703
377 * lto-common.c (compare_tree_sccs_1): Compare
378 DECL_NOT_GIMPLE_REG_P.
379
575ac27f
JJ
3802020-04-29 Jakub Jelinek <jakub@redhat.com>
381
382 PR target/94707
383 * lto-common.c (compare_tree_sccs_1): Handle DECL_FIELD_ABI_IGNORED.
384
b835645c
ML
3852020-04-17 Martin Liska <mliska@suse.cz>
386
387 PR lto/94612
388 * lto-common.c: Initialize file_data->lto_section_header
389 before lto_mode_identity_table call. It is needed because
390 it decompresses a LTO section.
391
70df40ca
ML
3922020-04-08 Martin Liska <mliska@suse.cz>
393
394 PR c++/94314
395 * lto-common.c (compare_tree_sccs_1): Compare also
396 DECL_IS_REPLACEABLE_OPERATOR.
397
158cccea
JJ
3982020-03-25 Jakub Jelinek <jakub@redhat.com>
399
400 PR c++/94223
401 * lto-lang.c (lto_set_decl_assembler_name): Use a static ulong
402 counter instead of DECL_UID.
403
c2211a60
TB
4042020-03-24 Tobias Burnus <tobias@codesourcery.com>
405
406 PR libgomp/81689
407 * lto.c (offload_handle_link_vars): Propagate TREE_PUBLIC state.
408
ce641308
TB
4092020-01-29 Tobias Burnus <tobias@codesourcery.com>
410
411 * lto.c (offload_handle_link_vars): Reduce chance of
412 naming clashes of generated linkptr variable.
413
b809f0b6
TB
4142020-01-29 Tobias Burnus <tobias@codesourcery.com>
415
416 PR middle-end/94233
417 * lto.c (offload_handle_link_vars): Cleanup; call
418 build_decl to ensure alignment is set.
419
27736735
ML
4202020-02-05 Martin Liska <mliska@suse.cz>
421
422 PR lto/93489
423 * lto-dump.c (dump_list_functions): Do not
424 load body for aliases.
425 (dump_body): Likewise here.
426
f48c6014
ML
4272020-01-16 Martin Liska <mliska@suse.cz>
428
429 * lto-partition.c (lto_balanced_map): Remember
430 best_noreorder_pos and then restore to it
431 when we revert.
432
3629ff8a
ML
4332020-01-08 Martin Liska <mliska@suse.cz>
434
435 * lto-partition.c (add_symbol_to_partition_1): Use ::dump_name or
436 ::dump_asm_name instead of (::name or ::asm_name).
437 (lto_balanced_map): Likewise.
438 (promote_symbol): Likewise.
439 (rename_statics): Likewise.
440 * lto.c (lto_wpa_write_files): Likewise.
441
d597b944
ML
4422020-01-08 Martin Liska <mliska@suse.cz>
443
444 * lto-partition.c (lto_balanced_map): Use symtab_node::dump_name.
445
8d9254fc
JJ
4462020-01-01 Jakub Jelinek <jakub@redhat.com>
447
448 Update copyright years.
449
40ebe1fc
JH
4502019-12-19 Jan Hubicka <hubicka@ucw.cz>
451 Xi Ruoyao <xry111@mengyan1223.wang>
452
453 * lto-common.c (read_cgraph_and_symbols): Work around binutils
454 PR25424
455
6d8fd122 4562019-12-07 Jan Hubicka <hubicka@ucw.cz>
5b8d9367 457
59c7b29e
JH
458 * lto-partition.c (lto_balanced_map): Fix printing of tp_first_run.
459
4602019-12-10 Jan Hubicka <hubicka@ucw.cz>
461
6d8fd122
JH
462 * lto-partition.c (node_cmp): Turn into simple order comparsions.
463 (varpool_node_cmp): Remove.
464 (add_sorted_nodes): Use node_cmp.
465 (lto_balanced_map): Use tp_first_run_node_cmp.
466
59c7b29e
JH
4672019-11-25 Joseph Myers <joseph@codesourcery.com>
468
5b8d9367
JM
469 PR c/91985
470 * lto-lang.c (lto_type_for_mode): Handle decimal floating-point
471 types being NULL_TREE.
472
9fd052e7
JH
4732019-11-22 Jan Hubicka <jh@suse.cz>
474
475 * lto.c (lto_wpa_write_files): Call memory_block_pool::trim.
476
e61d0e4e
ML
4772019-11-14 Martin Liska <mliska@suse.cz>
478
479 * Make-lang.in: Remove wrong dependency
480 of LTO_DUMP_EXE on LTO_EXE.
481
0c29cac4
ML
4822019-11-12 Martin Liska <mliska@suse.cz>
483
484 * lto-common.c: Do not include params.h.
485 * lto-partition.c: Likewise.
486 * lto.c: Likewise.
487
028d4092
ML
4882019-11-12 Martin Liska <mliska@suse.cz>
489
490 * lto-partition.c (lto_balanced_map): Replace old parameter syntax
491 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
492 macro.
493 * lto.c (do_whole_program_analysis): Likewise.
494
fe1d1a8b
ML
4952019-11-11 Martin Liska <mliska@suse.cz>
496
497 * Make-lang.in: Relax dependency of lto-dump.o to
498 LTO_OBJS which will allow faster linking (mainly with LTO).
499
c38ee9a2
JH
5002019-11-07 Jan Hubicka <hubicka@ucw.cz>
501
502 * lto.c (do_whole_program_analysis): Call lto_free_file_name_hash.
503
c9ef0409
JH
5042019-11-02 Jan Hubicka <hubicka@ucw.cz>
505
506 * lto-common.c (read_cgraph_and_symbols): Improve -Q reporting.
507 * lto.c (lto_wpa_write_files): Likewise.
508
6773658a
JJ
5092019-10-31 Jakub Jelinek <jakub@redhat.com>
510
511 PR middle-end/92231
512 * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
513 on *node that is not FUNCTION_DECL.
514
3c56d8d8
ML
5152019-10-30 Martin Liska <mliska@suse.cz>
516
517 PR lto/91393
518 PR lto/88220
519 * lto-common.c (lto_file_finalize): Use lto_get_summary_section_data.
520 (get_section_data): Add order argument.
521
3518424d
ML
5222019-10-29 Martin Liska <mliska@suse.cz>
523
524 * lto.c (do_whole_program_analysis): Pass
525 title as dump_memory_report argument.
526
c5281d50
ML
5272019-10-29 Martin Liska <mliska@suse.cz>
528
529 * lto.c (do_whole_program_analysis): Remove argument.
530
f658ad30
JH
5312019-10-24 Jan Hubicka <hubicka@ucw.cz>
532
533 * lto-partition.c (add_symbol_to_partition_1): Update.
534 (undo_parittion): Update.
535
ebad2eee
JH
5362019-10-23 Jan Hubicka <hubicka@ucw.cz>
537
538 * lto-common.c (lto_file_finalize): Add order attribute.
539 (lto_create_files_from_ids): Pass order.
540 (lto_file_read): UPdate call of lto_create_files_from_ids.
541
7cc47709
JH
5422019-10-12 Jan Hubicka <hubicka@ucw.cz>
543
544 * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
545 summary streaming.
546
f8cf94cd
JH
5472019-10-12 Jan Hubicka <hubicka@ucw.cz>
548
549 * lto.c (lto_wpa_write_files): Do not update bodies of clones.
550
e5207f1a
JH
5512019-10-11 Jan Hubicka <hubicka@ucw.cz>
552
553 * lto.c (lto_wpa_write_files): Call ggc_trim.
554
1fcf52a6
JH
5552019-10-11 Jan Hubicka <hubicka@ucw.cz>
556
557 * lto.c (lto_wpa_write_files): Prepare all bodies for streaming.
558
9142736e
RB
5592019-10-10 Richard Biener <rguenther@suse.de>
560
561 * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
562
0fa00483
JM
5632019-10-04 Joseph Myers <joseph@codesourcery.com>
564
565 * lto-lang.c (flag_isoc2x): New variable.
566
a3d09469
RB
5672019-09-18 Richard Biener <rguenther@suse.de>
568
569 PR lto/91763
570 * lto.c (lto_materialize_function): Initialize EH by looking
571 at the function personality and flag_exceptions setting.
572
df375b03
JJ
5732019-08-23 Jakub Jelinek <jakub@redhat.com>
574
575 PR middle-end/91283
576 * lto-lang.c (lto_post_options): Set flag_excess_precision instead of
577 flag_excess_precision_cmdline. Remove comment.
578
4d732405
RS
5792019-08-13 Richard Sandiford <richard.sandiford@arm.com>
580
581 PR middle-end/91421
582 * lto-common.c (compare_tree_sccs_1): Use DECL_UNCHECKED_FUNCTION_CODE
583 instead of DECL_FUNCTION_CODE.
584 * lto-symtab.c (lto_symtab_merge_p): Likewise.
585
6e42c90c
BE
5862019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
587
588 * Make-lang.in (lto.install-common): Remove unnecessary slash
589 between $(DESTDIR) and $(bindir).
590
cb50701e
ML
5912019-07-25 Martin Liska <mliska@suse.cz>
592
593 * lto-common.c (compare_tree_sccs_1): Use new macros
594 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
595
34e64622
GB
5962019-07-22 Giuliano Belinassi <giuliano.belinassi@usp.br>
597
598 * lang.opt (flag_dump_callgraph): New flag.
599 * lto-dump.c (dump_symtab_graphviz): New function.
600 (dump_tool_help): New option.
601 (lto_main): Handle graphviz dumping.
602
b01659aa
JH
6032019-07-18 Jan Hubicka <hubicka@ucw.cz>
604
605 * lto-common.c (gimple_register_canonical_type_1): Do not look for
606 non-ODR conflicts of types in anonymous namespaces.
607 (unify_scc): Do not merge anonymous namespace types.
608
99b1c316
MS
6092019-07-09 Martin Sebor <msebor@redhat.com>
610
611 PR c++/61339
612 * lto-common.c (lto_splay_tree_new): : Change class-key of PODs
613 to struct and others to class.
614 (mentions_vars_p): Same.
615 (register_resolution): Same.
616 (lto_register_var_decl_in_symtab): Same.
617 (lto_register_function_decl_in_symtab): Same.
618 (cmp_tree): Same.
619 (lto_read_decls): Same.
620
6c1dae73
MS
6212019-07-09 Martin Sebor <msebor@redhat.com>
622
623 PR c++/61339
624 * lto-dump.c: Change class-key from class to struct and vice versa
625 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
626
70980ea2
ML
6272019-07-04 Martin Liska <mliska@suse.cz>
628
629 PR lto/91078
630 * lto-common.c (lto_file_finalize): Use memcpy to set
631 file_data->lto_section_header.
632
88614dfa
ML
6332019-07-03 Martin Liska <mliska@suse.cz>
634
635 * lto-common.c: Read LTO section and verify header.
636
606a9a8c
JH
6372019-06-27 Jan Hubicka <jh@suse.cz>
638
639 * lto-common.c (lto_register_canonical_types_for_odr_types):
640 Copy CXX_ODR_P from the main variant.
641
85693eef
JH
6422019-06-27 Jan Hubicka <jh@suse.cz>
643
644 * lto-common.c: tree-pretty-print.h
645 (type_streaming_finished): New static var.
646 (gimple_register_canonical_type_1): Return updated hash; handle ODR
647 types.
648 (iterative_hash_canonical_type): Update use of
649 gimple_register_canonical_type_1.
650
c2f7a665
ML
6512019-06-27 Martin Liska <mliska@suse.cz>
652
653 * lto-dump.c (struct symbol_entry): Add default dtor.
654 (struct variable_entry): Likewise.
655 (struct function_entry): Likewise.
656 (dump_list_functions): Release memory.
657 (dump_list_variables): Likewise.
658
ab20d992
JJ
6592019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
660
661 * lto-lang.c (lto_build_c_type_nodes): Accept "__intN__"
662 format of "__intN" types for SIZE_TYPE.
663
f4af4019
JH
6642019-06-24 Jan Hubicka <jh@suse.cz>
665
666 * lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
667 compare STRING_FLAG only for arrays and integers.
668
0ecf545c
MS
6692019-06-05 Martin Sebor <msebor@redhat.com>
670
671 * lto-common.c (lto_file_finalize): Adjust quoting and hyphenation.
672
a9c697b8
MS
6732019-05-16 Martin Sebor <msebor@redhat.com>
674
ab20d992
JJ
675 * lto-dump.c (lto_main): Same.
676 * lto.c (stream_out): Same.
a9c697b8 677
38613b9b
ML
6782019-05-10 Martin Liska <mliska@suse.cz>
679
680 * Make-lang.in: Use program_transform_name for lto-dump.
681 * config-lang.in: Do not mark lto-dump compiler as we don't
682 want to have it installed at
683 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
684
03de2955
RO
6852019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
686
687 * lto-common.c (lto_file_read): Print section->start as int64_t,
688 section->len as uint64_t.
689 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
690
ee7a003f
ML
6912019-05-06 Martin Liska <mliska@suse.cz>
692
693 * lto-common.c: Update coding style.
694 * lto.c (materialize_cgraph): Likewise.
695
66d62d9f
HK
6962019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
697 Martin Liska <mliska@suse.cz>
698
699 * Make-lang.in: Add lto_dump-related definition.
700 * config-lang.in: Likewise.
701 * lang.opt: Add new language LTODump and options related
702 to LTO dump tool.
703 * lto-common.c (lto_read_decls): Support type statistics dump.
704 (lto_file_read): Likewise for object files.
705 * lto-dump.c: New file.
706 * lto-lang.c (lto_option_lang_mask): Move from ..
707 * lto.c (lto_option_lang_mask): .. here.
708 * lto.h (lto_option_lang_mask): New declaration.
709
a79420f9
ML
7102019-05-06 Martin Liska <mliska@suse.cz>
711 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
712
713 * Make-lang.in: Add lto-common.o.
714 * config-lang.in: Likewise for gtfiles.
715 * lto-common.c: New file.
716 * lto-common.h: New file.
717 * lto-lang.c: Include lto-common.h.
718 * lto.c: Move most of the functionality
719 into lto-common.c file.
720
0c7f51e4
JH
7212019-04-12 Jan Hubicka <hubicka@ucw.cz>
722
723 * lto.c (do_stream_out): rename to ...
724 (stream_out): ... this one; move original code to ...
725 (stream_out_partitions_1, stream_out_partitions): ... these new
726 functions.
727 (lto_wpa_write_files): Honnor lto_parallelism
728
303389b1
ML
7292019-03-26 Martin Liska <mliska@suse.cz>
730
731 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
139fc820 732 wrapping.
303389b1 733
a3f9f006
ML
7342019-03-11 Martin Liska <mliska@suse.cz>
735
736 * lto-lang.c (lto_post_options): Wrap an option name
737 in a string format message and fix GNU coding style.
738 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
739
04e5c73d
JJ
7402019-03-09 Jakub Jelinek <jakub@redhat.com>
741
742 PR target/79645
743 * lang.opt: Terminate description text with a dot.
744
80f52b40
JM
7452019-02-28 Jason Merrill <jason@redhat.com>
746
747 PR c++/88049 - ICE with undefined destructor and anon namespace.
748 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
749 for a type in an anonymous namespace.
750
67914693
SL
7512019-01-09 Sandra Loosemore <sandra@codesourcery.com>
752
753 PR other/16615
754
755 * lto-partition.c: Mechanically replace "can not" with "cannot".
756 * lto-symtab.c: Likewise.
757 * lto.c: Likewise.
758
a5544970
JJ
7592019-01-01 Jakub Jelinek <jakub@redhat.com>
760
761 Update copyright years.
762
d840d7a2
JH
7632018-12-24 Jan Hubicka <hubicka@ucw.cz>
764
765 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
766 for method whose basetype was already reported.
767
ed1b53a0
MP
7682018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
769
770 Minimize clone counter memory usage in LTO.
771 * lto-partition.c (privatize_symbol_name_1): Keep track of
772 non-unique symbol counters in the lto_clone_numbers hash
773 map.
774 (lto_promote_cross_file_statics): Allocate and free the
775 lto_clone_numbers hash map.
776 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
777 map.
778
ad42aa96
JH
7792018-11-28 Jan Hubicka <jh@suse.cz>
780
781 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
782
d7dce787
JH
7832018-11-22 Jan Hubicka <jh@suse.cz>
784
785 * lto.c (cmp_type_location): Remove.
786 (lto_read_decls): Do not allocate odr_types.
787
f615cb16
ML
7882018-11-19 Martin Liska <mliska@suse.cz>
789
790 PR lto/88077
791 * lto-symtab.c (lto_symtab_merge): Transform the
792 condition before r256989.
793
12eac232
ML
7942018-11-16 Martin Liska <mliska@suse.cz>
795
796 PR lto/88004
797 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
798 lto_symtab_symbol_p as it does checking of transparent alias.
799 These needs to be also merged in the function.
800
7958186b
MP
8012018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
802
803 * lto-partition.c (privatize_symbol_name_1): Use
3d3b561f 804 clone_function_name_numbered.
7958186b 805
abb967da
JH
8062018-10-26 Jan Hubicka <jh@suse.cz>
807
ab20d992 808 * lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
abb967da 809
033eb567
DM
8102018-10-17 David Malcolm <dmalcolm@redhat.com>
811
812 * Make-lang.in (selftest-lto): New.
813
9ed6dbee
ML
8142018-08-29 Martin Liska <mliska@suse.cz>
815
816 PR bootstrap/87130
817 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
818 to behavior before r263887.
819
3d78e008
ML
8202018-08-27 Martin Liska <mliska@suse.cz>
821
822 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
823 fndecl_built_in_p and remove check for FUNCTION_DECL if
824 possible.
3d78e008
ML
825 * lto-symtab.c (lto_symtab_merge_p): Likewise.
826 (lto_symtab_merge_decls_1): Likewise.
827 (lto_symtab_merge_symbols): Likewise.
828 * lto.c (lto_maybe_register_decl): Likewise.
829 (read_cgraph_and_symbols): Likewise.
830
efd9eb29
TV
8312018-08-21 Tom de Vries <tdevries@suse.de>
832
ab20d992 833 * lto.c (lto_main): Call debuginfo_early_start and
efd9eb29
TV
834 debuginfo_early_stop.
835
00abf86c
MS
8362018-07-20 Martin Sebor <msebor@redhat.com>
837
838 PR middle-end/82063
839 * lto-lang.c (lto_handle_option): Change function argument
840 to HOST_WIDE_INT.
841
efe0e6cd
RB
8422018-07-20 Richard Biener <rguenther@suse.de>
843
844 PR debug/86585
845 * lto.c (unify_scc): Before we throw away an SCC see if we
846 can amend prevailing single-entry SCC with debug refs.
847
814f3331
JH
8482018-07-13 Jan Hubicka <hubicka@ucw.cz>
849
850 * lto.c (do_stream_out): Add PART parameter; open dump file.
851 (stream_out): Add PART parameter; pass it to do_stream_out.
852 (lto_wpa_write_files): Update call of stream_out.
853
c518c102
ML
8542018-07-04 Martin Liska <mliska@suse.cz>
855
856 PR middle-end/66240
857 PR target/45996
858 PR c/84100
859 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
860 instead of memcmp.
861
b54006ae
ML
8622018-06-20 Martin Liska <mliska@suse.cz>
863
864 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 865 FIXME comment.
b54006ae 866
56f62793
ML
8672018-06-19 Martin Liska <mliska@suse.cz>
868
869 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 870 of get_create.
56f62793
ML
871 (undo_partition): Likewise.
872 (lto_balanced_map): Likewise.
873
1724941e
ML
8742018-06-19 Martin Liska <mliska@suse.cz>
875
876 * config-lang.in: Remove stagestuff.
877
29a50dfb
JH
8782018-06-08 Jan Hubicka <hubicka@ucw.cz>
879
880 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
881 New global vars.
882 (lto_register_dumps): New hook.
883 (LANG_HOOKS_REGISTER_DUMPS): New.
884 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
885 * lto-symtab.c: Include lto.h; dump into dump_file instead of
886 symtab->dump_file.
887 (lto_symtab_merge_decls): Initialize dump file.
888 * lto.c (read_cgraph_and_symbols): Initialize dump file.
889 (do_whole_program_analysis): Likewise.
890
74644756
ML
8912018-06-08 Martin Liska <mliska@suse.cz>
892
893 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
894 instead of summary_uid.
895
99353fcf
ML
8962018-06-08 Martin Liska <mliska@suse.cz>
897
898 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
899 of get.
900 (undo_partition): Likewise.
901 (lto_balanced_map): Likewise.
902
31db0fe0
ML
9032018-06-08 Martin Liska <mliska@suse.cz>
904
905 * lto-partition.c (add_references_to_partition): Remove support
906 for MPX (macros, related functions, fields in cgraph_node, ...).
907 (add_symbol_to_partition_1): Likewise.
908 (privatize_symbol_name): Likewise.
909 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
910
f115c9b5
RB
9112018-06-05 Richard Biener <rguenther@suse.de>
912
913 * lto.c (cmp_type_location): Expand locations only once.
914
5b42d196
JH
9152018-05-30 Jan Hubicka <hubicka@ucw.cz>
916
917 * lang.opt (lto_linker_output): Add nolto-rel.
918 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
919 and LTO_LINKER_OUTPUT_NOLTOREL.
920 (lto_init): Generate lto when doing incremental link.
921 * lto.c (lto_precess_name): Add lto1-inclink.
922
ab168044
JH
9232018-05-18 Jan Hubicka <jh@suse.cz>
924
925 PR lto/85583
926 * lto-partition.c (account_reference_p): Do not account
927 references from aliases; do not account refernces from
928 external initializers.
929
b6e33d73
JH
9302018-04-30 Jan Hubicka <jh@suse.cz>
931
932 * lto.c (cmp_partitions_size): Remove.
933 (lto_wpa_write_files): Also output priorities; do not sort partitions.
934 (cmp_partition_order): Move to ...
935 * lto-partition.c (cmp_partition_order): ...
936 (lto_1_to_1_map): Sort partitions.
937
e693ebce
JH
9382018-04-20 Jan Hubicka <jh@suse.cz>
939
940 * lto-partition.c (lto_balanced_map): Fix sanity check.
941
ddb0b824
JH
9422018-04-19 Jan Hubicka <jh@suse.cz>
943
944 * lto-partition.c: Include sreal.h
945 (add_symbol_to_partition_1): Use size instead of self_size
946 for size estimate.
947 (account_reference_p): New.
948 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
949 fix accounting errors in boundary size; add debug output; combine cost
950 as cost/size instead of cost/internal; reduce the partitioning error to
951 +- 1/8 of the parttion size.
952
1781a04f
ML
9532018-04-19 Martin Liska <mliska@suse.cz>
954
955 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
956 for multiple PREVAILING_DEF_IRONLY for common symbols.
957
6867cd69
ML
9582018-04-18 Martin Liska <mliska@suse.cz>
959
960 * lto.c (lto_read_decls): Fix GNU coding style and typos.
961
af597536
ML
9622018-04-18 Martin Liska <mliska@suse.cz>
963
964 PR ipa/83983
965 PR ipa/85391
966 * lto.c (cmp_type_location): New function.
967 (lto_read_decls): First collect all types, then
968 sort them according by location before register_odr_type
969 is called.
970
7d6051b1
JH
9712018-04-18 Jan Hubicka <jh@suse.cz>
972 Martin Liska <mliska@suse.cz>
973
974 PR lto/85391
975 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
976 types.
977
23d87577
ML
9782018-04-11 Martin Liska <mliska@suse.cz>
979
980 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
981 function.
982
c16833dc
ML
9832018-04-10 Martin Liska <mliska@suse.cz>
984
985 PR lto/85248
986 * lto-symtab.c (lto_symtab_merge_p): Do not check for
987 TREE_VALUES of error attributes.
988
8d96e546
ML
9892018-04-10 Richard Biener <rguenther@suse.de>
990 Martin Liska <mliska@suse.cz>
991
992 PR lto/85248
993 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
994
97bb4812
JH
9952018-02-08 Jan Hubicka <hubicka@ucw.cz>
996
997 * lto-partition.c (lto_balanced_map): Watch overflow.
998
39aa9b23
JH
9992018-02-08 Jan Hubicka <hubicka@ucw.cz>
1000
1001 PR ipa/81360
1002 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
1003 (read_cgraph_and_symbols): Use
1004 symtab_node::output_to_lto_symbol_table_p.
1005
26a823f0
JH
10062018-01-30 Jan Hubicka <hubicka@ucw.cz>
1007
1008 * lto.c (register_resolution): Remove forgotten sanity check.
1009
43fbc2e9
JH
10102018-01-30 Jan Hubicka <hubicka@ucw.cz>
1011
1012 PR lto/81004
1013 * lto.c: Include builtins.h
1014 (register_resolution): Merge resolutions in case trees was
1015 merged across units.
1016 (lto_maybe_register_decl): Break out from ...
1017 (lto_read_decls): ... here.
1018 (unify_scc): Also register decls here.
1019 (read_cgraph_and_symbols): Sanity check that all resolutions was
1020 read.
1021
ee034d31
EB
10222018-02-02 Eric Botcazou <ebotcazou@adacore.com>
1023
1024 PR lto/83954
1025 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
1026 component type of array types with non-aliased component.
1027
44c945e6
JH
10282018-01-30 Jan Hubicka <hubicka@ucw.cz>
1029
1030 PR lto/83954
1031 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
1032 for type match warning on arrays of pointers.
1033
cde9b2f8
ML
10342018-01-23 Martin Liska <mliska@suse.cz>
1035
1036 PR lto/81440
1037 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
1038 trailing arrays at the end of a struct.
1039
5c0caeb3
RS
10402018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1041 Alan Hayward <alan.hayward@arm.com>
1042 David Sherwood <david.sherwood@arm.com>
1043
1044 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
1045
928686b1
RS
10462018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1047 Alan Hayward <alan.hayward@arm.com>
1048 David Sherwood <david.sherwood@arm.com>
1049
1050 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
1051 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
1052
85ec4feb
JJ
10532018-01-03 Jakub Jelinek <jakub@redhat.com>
1054
1055 Update copyright years.
1056
4849deb1
JJ
10572017-12-15 Jakub Jelinek <jakub@redhat.com>
1058
1059 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
1060 affects_type_identity and handler fields, adjust comments.
1061
734914b6
RS
10622017-12-07 Richard Sandiford <richard.sandiford@arm.com>
1063
1064 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
1065
5d9ae53d
MS
10662017-12-07 Martin Sebor <msebor@redhat.com>
1067
1068 PR c/81544
1069 * lto-lang.c (lto_attribute_table): Initialize new member of struct
1070 attribute_spec.
1071
5de73c05
JJ
10722017-11-30 Jakub Jelinek <jakub@redhat.com>
1073
1074 * lto.c (create_subid_section_table): Use ; instead of ;;.
1075
974aedcc
MP
10762017-11-22 Marek Polacek <polacek@redhat.com>
1077
1078 PR c++/60336
1079 PR middle-end/67239
1080 PR target/68355
1081 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
1082
1bad9c18
JH
10832017-11-10 Jan Hubicka <hubicka@ucw.cz>
1084
1085 * lto-partition.c (lto_balanced_map): Use frequency accessor.
1086
65991ea3
JH
10872017-10-13 Jan Hubicka <hubicka@ucw.cz>
1088
1089 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
1090
4e7d0260
NS
10912017-10-11 Nathan Sidwell <nathan@acm.org>
1092
1093 * lto.c (mentions_vars_p_decl_with_vis): Use
1094 DECL_ASSEMBLER_NAME_RAW.
1095 (lto_fixup_prevailing_decls): Likewise.
1096
8e6cdc90
RS
10972017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1098
1099 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
1100 operating on trees as wide_ints.
1101
357b7604
RS
11022017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1103 Alan Hayward <alan.hayward@arm.com>
1104 David Sherwood <david.sherwood@arm.com>
1105
1106 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
1107
1ea85365
RB
11082017-08-21 Richard Biener <rguenther@suse.de>
1109
92a285c1
ML
1110 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
1111 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
1112 TYPE_DECL debug processing, register DIE references from
1113 prevailing SCCs with the debug machinery.
1114 (lto_section_with_id): Handle LTO debug sections.
1ea85365 1115
8e093270
NS
11162017-08-16 Nathan Sidwell <nathan@acm.org>
1117
1118 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
1119 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
1120 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
1121
eac3ab4a
TV
11222017-08-08 Tom de Vries <tom@codesourcery.com>
1123
1124 * lto.c: Include attribs.h.
1125
314e6352
ML
11262017-08-08 Martin Liska <mliska@suse.cz>
1127
1128 * lto-lang.c: Include header files.
1129 * lto-symtab.c: Likewise.
1130
63e434ca
RB
11312017-08-03 Richard Biener <rguenther@suse.de>
1132
1133 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
1134 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
1135 use DECL_LANG_FLAG_0.
1136 (lto_symtab_prevail_decl): Likewise.
1137
417ca011
TD
11382017-07-07 Torsten Duwe <duwe@suse.de>
1139
1140 * lto-lang.c (lto_attribute_table): Add entry for
1141 "patchable_function_entry".
1142
20deef65
NS
11432017-07-19 Nathan Sidwell <nathan@acm.org>
1144
1145 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
1146 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
1147
0eaf0bfe
JH
11482017-07-06 Jan Hubicka <hubicka@ucw.cz>
1149
1150 * lto-partition.c (lto_balanced_map): Do not check
1151 flag_toplevel_reorder.
2db9b7cd 1152
0eaf0bfe 11532017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
1154 * lto-lang.c (lto_init): Use builtin_structptr_types.
1155
d1eed638
JH
11562017-06-15 Jan Hubicka <hubicka@ucw.cz>
1157 Thomas Preud'homme <thomas.preudhomme@arm.com>
1158
1159 PR lto/69866
1160 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
1161 that resolved externally.
1162
d2db2e6b
JH
11632017-05-23 Jan Hubicka <hubicka@ucw.cz>
1164
1165 * lto.c (do_whole_program_analysis): Replace inline_free_summary
1166 by ipa_free_fn_summary.
1167
464d0118
ML
11682017-05-23 Martin Liska <mliska@suse.cz>
1169
1170 * lto-symtab.c (lto_cgraph_replace_node): Use
1171 symtab_node::dump_{asm_,}name functions.
1172 * lto.c (read_cgraph_and_symbols): Likewise.
1173 (do_whole_program_analysis): Likewise.
1174
6c52831d
ML
11752017-05-23 Martin Liska <mliska@suse.cz>
1176
1177 * lto.c (read_cgraph_and_symbols): Use the renamed function.
1178 (do_whole_program_analysis): Use the renamed function.
1179
27d020cf
JH
11802017-05-22 Jan Hubicka <hubicka@ucw.cz>
1181
1182 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
1183 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
1184
815d9cc6
XR
11852017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1186
92a285c1 1187 PR c++/80038
815d9cc6
XR
1188 * lto-lang.c (lto_init): Set in_lto_p earlier.
1189
350792ff 11902017-04-12 Richard Biener <rguenther@suse.de>
ab20d992 1191 Bernd Edlinger <bernd.edlinger@hotmail.de>
350792ff
RB
1192
1193 PR middle-end/79671
1194 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
1195
4a44a5f3
ML
11962017-02-14 Martin Liska <mliska@suse.cz>
1197
1198 * lto.c (do_stream_out): Free LTO file filename string.
1199
8a3a6ab4
DM
12002017-01-19 David Malcolm <dmalcolm@redhat.com>
1201
1202 * lto-lang.c (builtin_type_for_size): Convert call to
1203 lto_type_for_size to one through the langhook.
1204 (lto_type_for_size): Move to langhooks.c and rename to
1205 lhd_type_for_size.
1206 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
1207
4c4b4703
JJ
12082017-01-11 Jakub Jelinek <jakub@redhat.com>
1209
1210 PR middle-end/50199
1211 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
1212 if it was 0.
1213
bd2c6270
JJ
12142017-01-09 Jakub Jelinek <jakub@redhat.com>
1215
1216 PR translation/79019
1217 PR translation/79020
1218 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
1219
24d3f325
NS
12202017-01-06 Nathan Sidwell <nathan@acm.org>
1221
5406184c
NS
1222 * lto-partition.c (promote_symbol): Write to dump file sooner,
1223 include alias promoting too.
1224
24d3f325
NS
1225 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
1226 (may_need_named_section_p): Likewise.
1227 (rename_statics): Likewise.
1228 (lto_promote_cross_file_statics): Likewise.
1229
cbe34bb5
JJ
12302017-01-01 Jakub Jelinek <jakub@redhat.com>
1231
1232 Update copyright years.
1233
6c8bf066
GJL
12342016-11-30 Georg-Johann Lay <avr@gjlay.de>
1235
1236 PR lto/78562
1237 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
1238 mismatch if the two types are built-in.
1239
7fa6a965
PK
12402016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1241
1242 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
1243
efb71232
RB
12442016-11-23 Richard Biener <rguenther@suse.de>
1245
1246 PR lto/78472
1247 * lto.c (hash_canonical_type): Ignore zero-sized fields.
1248
48330c93
BE
12492016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1250
1251 PR c++/71973
1252 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
1253
899ca90e 12542016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1255 Alan Hayward <alan.hayward@arm.com>
1256 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1257
1258 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
1259
65179585
RB
12602016-10-31 Richard Biener <rguenther@suse.de>
1261
1262 PR lto/78129
1263 * lto.c (do_whole_program_analysis): Bail out after errors
1264 from WPA analysis.
1265
8bc5448f
KV
12662016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
1267
1268 * lto-partition.c: Include tree-vrp.h.
1269 * lto.c: Likewise.
1270
68317985
RB
12712016-09-20 Richard Biener <rguenther@suse.de>
1272
1273 * lto.c (lto_main): Call early_finish with "<artificial>" as
1274 filename.
1275
321e76fb
RB
12762016-09-19 Richard Biener <rguenther@suse.de>
1277
1278 * lto.c (lto_main): Invoke early_finish debug hook.
1279
ea6e17d5
RB
12802016-07-25 Richard Biener <rguenther@suse.de>
1281
1282 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
1283 (unify_scc): Likewise.
1284 (lto_read_decls): Likewise.
1285
e9ac1f86
JJ
12862016-06-28 Jakub Jelinek <jakub@redhat.com>
1287
1288 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1289
277d7ee0
AK
12902016-06-23 Andi Kleen <ak@linux.intel.com>
1291
1292 * Make-lang.in: Add support for autofdo (disabled for now)
1293
4d926e34
MS
12942016-06-10 Martin Sebor <msebor@redhat.com>
1295
1296 PR c/71392
ab20d992 1297 * lto-lang.c (handle_nonnull_attribute): Accept the nonnull
4d926e34
MS
1298 attribute in type-generic builtins.
1299
479f99c9
JH
13002016-05-16 Jan Hubicka <hubicka@ucw.cz>
1301
1302 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1303
1a0bf5e1
JH
13042016-05-03 Jan Hubicka <hubicka@ucw.cz>
1305
1306 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
1307
a2e76867
PK
13082016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1309
1310 * lto-partition.h (lto_balanced_map): New parameter.
1311 * lto-partition.c (lto_balanced_map): New parameter
1312 max_partition_size.
1313 Check if partition size is greater than max_partition_size.
1314 * lto.c (do_whole_program_analysis): Adjust calls to
1315 lto_balanced_map() to pass 2nd argument.
1316
ea913779
L
13172016-03-17 H.J. Lu <hongjiu.lu@intel.com>
1318
1319 PR lto/70258
1320 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
1321 PIE.
1322
56aae4b7
JJ
13232016-03-08 Jakub Jelinek <jakub@redhat.com>
1324
1325 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
1326 - becuase -> because.
1327
ed5d948d
TV
13282016-02-15 Tom de Vries <tom@codesourcery.com>
1329
1330 PR lto/69655
1331 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
1332 argument.
1333
4ecbadc7
ML
13342016-01-27 Martin Liska <mliska@suse.cz>
1335
1336 * lto-partition.c (add_symbol_to_partition_1): Remove usage
1337 of hsa_summaries.
1338
e49d321f
JH
13392016-01-19 Jan Hubicka <hubicka@ucw.cz>
1340
1341 PR lto/69136
1342 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
1343 decls have no assemblernames.
1344
b2b40051 13452016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 1346 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
1347
1348 * lto-partition.c: Include "hsa.h"
1349 (add_symbol_to_partition_1): Put hsa implementations into the
1350 same partition as host implementations.
1351
5803bd01
JH
13522016-01-12 Jan Hubicka <hubicka@ucw.cz>
1353
1354 PR lto/69003
1355 * lto-partition.c (rename_statics): Fix pasto.
1356
13092f61
RB
13572016-01-18 Richard Biener <rguenther@suse.de>
1358
1359 PR lto/69337
1360 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
1361 function vs. variable.
1362
3c4e91c9
RB
13632016-01-12 Richard Biener <rguenther@suse.de>
1364
1365 PR lto/69077
1366 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
1367 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
1368
818ab71a
JJ
13692016-01-04 Jakub Jelinek <jakub@redhat.com>
1370
1371 Update copyright years.
1372
3fddb2ef
JH
13732015-12-10 Jan Hubicka <hubicka@ucw.cz>
1374
1375 PR lto/68878
1376 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
1377 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
1378 (lto_symtab_prevailing_decl): Use it.
1379
4a38b02b
IV
13802015-12-15 Ilya Verbin <ilya.verbin@intel.com>
1381
1382 * lto.c: Include stringpool.h and fold-const.h.
1383 (offload_handle_link_vars): New static function.
1384 (lto_main): Call offload_handle_link_vars.
1385
ca834876
JH
13862015-12-10 Jan Hubicka <hubicka@ucw.cz>
1387
1388 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
1389
958a627f
JH
13902015-12-11 Jan Hubicka <hubicka@ucw.cz>
1391
1392 PR ipa/61886
1393 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
1394 values of error and warning attributes.
1395
da20571a
JH
13962015-12-08 Jan Hubicka <hubicka@ucw.cz>
1397
1398 PR lto/68811
1399 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
1400 DECL.
1401 (LTO_NO_PREVAIL): Use gcc_checking_assert.
1402
378004b9
JH
14032015-12-08 Jan Hubicka <hubicka@ucw.cz>
1404
1405 PR lto/68811
1406 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
1407 by itself.
1408
6b9ac179
JH
14092015-12-08 Jan Hubicka <hubicka@ucw.cz>
1410
1411 PR ipa/61886
1412 * lto-symtab.c: Include lto-symtab.h.
1413 (lto_cgraph_replace_node): Do not merge profiles here.
1414 (lto_symtab_merge_p): New function.
1415 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
1416 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
1417 aliases.
1418 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
1419 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
1420 * lto.c: Include lto-symtab.h
1421 * lto-symtab.h: New.
1422
41c60c6c
JH
14232015-12-08 Jan Hubicka <hubicka@ucw.cz>
1424
1425 PR ipa/61886
1426 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
1427 are not part of the definition.
1428 (contained_in_symbol): Likewise.
1429 (promote_symbol): When promoting a symbol also promote all transparent
1430 aliases.
1431 (rename_statics): Weakref needs unique name, too.
1432
71e54687
JH
14332015-12-07 Jan Hubicka <hubicka@ucw.cz>
1434
1435 PR ipa/61886
1436 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
1437 rename_statics, rename_statics): Handle transparent aliases.
1438
88636b62
JH
14392015-12-04 Jan Hubicka <hubicka@ucw.cz>
1440
1441 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
1442 merged_comdat.
1443
8c86248e
JH
14442015-12-01 Jan Hubicka <hubicka@ucw.cz>
1445
1446 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
1447
1ff9ed6f
JH
14482015-11-25 Jan Hubicka <jh@suse.cz>
1449
1450 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
1451 * lang.opt (lto_linker_output): New enum.
1452 (flinker_output): New flag.
1453
22bea0be
JH
14542015-11-24 Jan Hubicka <hubicka@ucw.cz>
1455
1456 * lto-symtab.c: Include alias.h
1457 (warn_type_compatibility_p): Replace types_compatible_p checks by
1458 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
1459 (lto_symtab_merge): Compare DECL sizes.
1460 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
1461
aea50b45
JH
14622015-11-24 Jan Hubicka <hubicka@ucw.cz>
1463
1464 * lto.c (iterative_hash_canonical_type): Recruse for all types
1465 which pass !canonical_type_used_p.
1466 (gimple_register_canonical_type_1): Sanity check we do not compute
1467 canonical type of anything with !canonical_type_used_p.
1468 (gimple_register_canonical_type): Skip all types that are
1469 !canonical_type_used_p
1470
deb3dae6
JH
14712015-11-24 Jan Hubicka <hubicka@ucw.cz>
1472
1473 * lto.c (unify_scc): Use free_node.
1474
f85d2487
JH
14752015-11-21 Jan Hubicka <hubicka@ucw.cz>
1476
1477 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
1478 (gimple_register_canonical_type_1): Check that pointers do not get
1479 canonical types.
1480 (gimple_register_canonical_type): Do not register pointers.
1481
14822015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
1483
1484 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
1485 flag for types that are not ODR; fix loop walking parameters.
1486
69f293c9
AM
14872015-11-11 Andrew MacLeod <amacleod@redhat.com>
1488
1489 * lto-lang.c: Remove unused header files.
1490 * lto-object.c: Likewise.
1491 * lto-partition.c: Likewise.
1492 * lto-symtab.c: Likewise.
1493 * lto.c: Likewise.
1494
ee45a32d
EB
14952015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1496
1497 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
1498
0aad0198
RS
14992015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1500
1501 * lto-lang.c: Don't undef DEF_BUILTIN.
1502
2adfab87
AM
15032015-10-29 Andrew MacLeod <amacleod@redhat.com>
1504
1505 * lto-lang.c: Reorder #include's and remove duplicates.
1506 * lto-object.c: Likewise.
1507 * lto-partition.c: Likewise.
1508 * lto-symtab.c: Likewise.
1509 * lto.c: Likewise.
1510
b2b29377
MM
15112015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
1512
1513 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
1514 conditionals.
1515 (lto_fixup_state): Likewise.
1516 (do_whole_program_analysis): Use
1517 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
1518 conditionals.
1519
d9a6bd32
JJ
15202015-10-13 Jakub Jelinek <jakub@redhat.com>
1521
1522 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1523 DEF_FUNCTION_TYPE_11): Define.
1524
9c4eeafc
JH
15252015-10-10 Jan Hubicka <hubicka@ucw.cz>
1526
1527 * lto.c (hash_canonical_type): Honor
1528 type_with_interoperable_signedness.
1529
3e32ee19
NS
15302015-09-28 Nathan Sidwell <nathan@codesourcery.com>
1531
1532 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
1533 (DEF_FUNCTION_TYPE_VAR_11): Delete.
1534
f196d062
RB
15352015-08-31 Richard Biener <rguenther@suse.de>
1536
1537 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
1538 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
1539 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
1540 participate in merging with something else.
1541
45aee888
RB
15422015-08-31 Richard Biener <rguenther@suse.de>
1543
1544 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
1545 test, do not replace a non-builtin with a builtin.
1546 * lto.c (compare_tree_sccs_1): Do not merge things we stream
1547 as builtins vs. non-builtins.
1548
a79683d5
TS
15492015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1550
1551 * lto.h: Remove useless typedefs.
1552
48d859bb
AM
15532015-07-15 Andrew MacLeod <amacleod@redhat.com>
1554
1555 * lto.c: Remove redundant includes.
1556
026c3cfd
AH
15572015-07-12 Aldy Hernandez <aldyh@redhat.com>
1558
1559 * lto-lang.c: Fix double word typos.
1560
9fdcd34e
AM
15612015-07-10 Andrew MacLeod <amacleod@redhat.com>
1562
1563 * lto.c: Include cfghooks.h rather than predict.h.
1564
f51ade33
AM
15652015-07-09 Andrew MacLeod <amacleod@redhat.com>
1566
1567 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
1568 lto-streamer.h.
1569 * lto-object.c: Likewise.
1570 * lto-partition.c: Likewise.
1571 * lto-symtab.c: Likewise.
1572
1916bcb5
AM
15732015-07-09 Andrew MacLeod <amacleod@redhat.com>
1574
1575 * lto-lang.c: Adjust includes for flags.h changes.
1576
c7131fb2
AM
15772015-07-07 Andrew MacLeod <amacleod@redhat.com>
1578
1579 * lto-lang.c: Adjust includes.
1580 * lto-object.c: Likewise.
1581 * lto-partition.c: Likewise.
1582 * lto-symtab.c: Likewise.
1583 * lto.c: Likewise.
1584
f0889939
AM
15852015-06-25 Andrew MacLeod <amacleod@redhat.com>
1586
1587 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1588 * lto-object.c: Likewise.
1589 * lto-partition.c: Likewise.
1590 * lto-symtab.c: Likewise.
1591 * lto-tree.h: Likewise.
1592 * lto.c: Likewise.
1593
8d67ee55
RS
15942015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1595
1596 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
1597 than typed_noop_remove. Remove redudant typedefs.
1598
abb226c9
AM
15992015-06-17 Andrew MacLeod <amacleod@redhat.com>
1600
1601 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
1602 * lto-object.c: Likewise.
1603 * lto-partition.c: Likewise.
1604 * lto-symtab.c: Likewise.
1605 * lto.c: Likewise.
1606
351d90f4
JH
16072015-06-14 Jan Hubicka <hubicka@ucw.cz>
1608
1609 PR ipa/66181
1610 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
1611
44c42705
DD
16122015-06-12 DJ Delorie <dj@redhat.com>
1613
1614 * lto-lang.c (lto_type_for_size): Include intN types.
1615 (lto_type_for_mode): Likewise.
1616
64578d98
JH
16172015-06-08 Jan Hubicka <hubicka@ucw.cz>
1618
1619 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
1620
13fdf2e2
AM
16212015-06-08 Andrew MacLeod <amacleod@redhat.com>
1622
1623 * lto-lang.c : Adjust include files.
1624 * lto-object.c : Likewise.
1625 * lto-partition.c : Likewise.
1626 * lto-partition.h : Likewise.
1627 * lto-symtab.c : Likewise.
1628 * lto.c : Likewise.
1629 * lto.h : Likewise.
1630
ccb5ad37
JH
16312015-06-06 Jan Hubicka <hubicka@ucw.cz>
1632
6542950e
JH
1633 PR lto/65378
1634 * lto-symtab.c (warn_type_compatibility_p): Fix call of
1635 odr_or_derived_type_p.
1636 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
1637
16382015-06-08 Jan Hubicka <hubicka@ucw.cz>
1639
ccb5ad37
JH
1640 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
1641 pointers.
1642
d7438551
AH
16432015-06-05 Aldy Hernandez <aldyh@redhat.com>
1644
1645 * lto-lang.c (lto_write_globals): Remove.
1646 (LANG_HOOKS_WRITE_GLOBALS): Same.
1647
ecb9f223
AM
16482015-06-04 Andrew MacLeod <amacleod@redhat.com>
1649
1650 * lto-lang.c: Adjust includes for restructured coretypes.h.
1651 * lto-object.c: Likewise.
1652 * lto-partition.c: Likewise.
1653 * lto-symtab.c: Likewise.
1654 * lto.c: Likewise.
1655
9cb9b937
JH
16562015-06-04 Jan Hubicka <hubicka@ucw.cz>
1657
1658 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
1659
93e2aa6d
JH
16602015-06-03 Jan Hubicka <hubicka@ucw.cz>
1661
1662 * lto.c (iterative_hash_canonical_type,
1663 gimple_register_canonical_type): only hash main variants of types
1664
faae53f8
ML
16652015-05-27 Martin Liska <mliska@suse.cz>
1666
1667 * lto-partition.c (new_partition): Reset number of symbols.
1668 (add_symbol_to_partition_1): Increment number of symbols.
1669 (undo_partition): Decrement number of symbols.
1670 (lto_balanced_map): Dump number of symbols and insns that
1671 belong to a partition.
1672 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1673
b727ba74
JH
16742015-05-22 Jan Hubicka <hubicka@ucw.cz>
1675
1676 * lto.c (hash_canonical_type): Be sure we hash only types that
1677 need alias set.
1678 (gimple_register_canonical_type_1): Do not produce canonical
1679 types for types that do not need alias sets.
1680
1d1218fb
JH
16812015-05-22 Jan Hubicka <hubicka@ucw.cz>
1682
1683 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1684
872d5034
JH
16852015-05-19 Jan Hubicka <hubicka@ucw.cz>
1686
1687 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1688
259d29e3
JH
16892015-05-17 Jan Hubicka <hubicka@ucw.cz>
1690
1691 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1692 compare ODR types (if available) and function types.
1693 (lto_symtab_merge): ... here; output ODR violation warnings
1694 and call warn_types_mismatch.
1695
b0845a1e
JH
16962015-04-29 Jan Hubicka <hubicka@ucw.cz>
1697
1698 * lto.c (lto_fixup_state): Call verify_type.
1699
67f58944
TS
17002015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1701
b0845a1e 1702 * lto.c: Adjust for hash_table changes.
67f58944 1703
36ceb0e3
JH
17042015-03-27 Jan Hubicka <hubicka@ucw.cz>
1705
1706 * lto.c (lto_read_decls): Move code registering odr types out
1707 of TYPE_CANONICAL conditional and also register polymorphic types.
1708
afd1e7c6
JH
17092015-03-26 Jan Hubicka <hubicka@ucw.cz>
1710
1711 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1712 DECL_ARTIFICAL symbols.
1713
eaeec5ec
JH
17142015-03-26 Jan Hubicka <hubicka@ucw.cz>
1715
1716 PR lto/65536
1717 * lto.c (unify_scc): Revert location cache when unification
1718 suceeded.
1719 (lto_read_decls): Accept location cache after sucess;
1720 apply location cache before calling debug hooks.
1721
1c4db829
JH
17222015-03-10 Jan Hubicka <hubicka@ucw.cz>
1723
1724 * lto.c (read_cgraph_and_symbols): Do not do merging
1725 at ltrans stage.
1726
db847fa8
JJ
17272015-02-26 Jakub Jelinek <jakub@redhat.com>
1728
1729 * lto.c (lto_mode_identity_table): New variable.
1730 (lto_read_decls): Add mode_table argument to the lto_input_block
1731 constructor.
1732 (lto_file_finalize): Initialize mode_table.
1733 (lto_init): Initialize lto_mode_identity_table.
1734
56a9f6bc
TS
17352015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1736
1737 PR libgomp/64625
1738 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1739 Remove macros.
1740 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1741
ebc8f0bb
JH
17422015-02-03 Jan Hubicka <hubicka@ucw.cz>
1743
1744 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1745
40fecdd6
JM
17462015-01-30 Joseph Myers <joseph@codesourcery.com>
1747
1748 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1749 changed to pass input_location as first argument.
1750
040968a8
JH
17512014-12-11 Jan Hubicka <hubicka@ucw.cz>
1752
1753 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1754
69fe4502
JH
17552014-12-11 Jan Hubicka <hubicka@ucw.cz>
1756
1757 * lto.c (compare_tree_sccs_1): Add comparsion of
1758 DECL_FUNCTION_SPECIFIC_TARGET
1759
41dbbb37
TS
17602015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1761 James Norris <jnorris@codesourcery.com>
1762
1763 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1764 New macros.
1765 * lto.c: Include "gomp-constants.h".
1766
837bac8c
IV
17672015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1768
1769 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1770 from select_what_to_stream.
1771
1b34e6e2
BS
17722015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1773 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR middle-end/64412
1776 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1777 if ACCEL_COMPILER.
1778
adfac8df
JJ
17792015-01-09 Michael Collison <michael.collison@linaro.org>
1780
1781 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1782 input.h, alias.h, symtab.h, options, fold-const.h,
1783 wide-int.h, and inchash.h due to flattening of tree.h.
1784 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1785 input.h, alias.h, symtab.h, fold-const.h,
1786 wide-int.h, and inchash.h due to flattening of tree.h.
1787 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1788 input.h, alias.h, symtab.h, options, fold-const.h,
1789 wide-int.h, and inchash.h due to flattening of tree.h.
1790 * lto-partition.c: Ditto.
1791 * lto-symtab.c: Ditto.
1792
5624e564
JJ
17932015-01-05 Jakub Jelinek <jakub@redhat.com>
1794
1795 Update copyright years.
1796
9a1e784a
ML
17972014-12-22 Martin Liska <mliska@suse.cz>
1798
1799 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1800 is used.
1801 (undo_partition): Likewise.
1802 (lto_balanced_map): Likewise.
1803
dd912cb8
ML
18042014-12-22 Martin Liska <mliska@suse.cz>
1805
1806 * lto-partition.c: Include of symbol-summary.h is added.
1807 * lto-symtab.c: Likewise.
1808 * lto.c: Likewise.
1809
17e0fc92
JH
18102014-12-11 Jan Hubicka <hubicka@ucw.cz>
1811
1812 PR ipa/61324
1813 * lto.c (read_cgraph_and_symbols): Update call of
1814 remove_unreachable_nodes.
1815 (do_whole_program_analysis): Remove call of
1816 symtab->remove_unreachable_nodes
1817
58dddbd2
TS
18182014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1819
1820 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1821 htab with malloc instead of ggc.
1822
907dadbd
TS
18232014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1824
1825 * lto.c: Replace htab with hash_table.
1826
9c71e9df
TS
18272014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1828
1829 * lto.c (lto_read_in_decl_state): Adjust.
1830 (lto_fixup_state): Likewise.
1831
72a4a8b0
JH
18322014-11-17 Jan Hubicka <hubicka@ucw.cz>
1833
1834 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1835
54e774c0
JH
18362014-11-14 Jan Hubicka <hubicka@ucw.cz>
1837
1838 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1839
1f6be682
IV
18402014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1841 Bernd Schmidt <bernds@codesourcery.com>
1842 Andrey Turetskiy <andrey.turetskiy@intel.com>
1843 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1844
ab20d992 1845 * lto.c (read_cgraph_and_symbols): Call input_offload_tables.
ec6fe917
IV
1846
18472014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1848 Ilya Tocar <ilya.tocar@intel.com>
1849 Andrey Turetskiy <andrey.turetskiy@intel.com>
1850 Bernd Schmidt <bernds@codesourcery.com>
1851
1f6be682
IV
1852 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1853 LTO_SECTION_NAME_PREFIX.
1854 * lto-partition.c (lto_promote_cross_file_statics): Call
1855 select_what_to_stream.
1856 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1857 LTO_SECTION_NAME_PREFIX.
1858 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1859 being built as an offload compiler.
1860
ef4bddc2
RS
18612014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1862
1863 * lto-lang.c: Remove redundant enum from machine_mode.
1864
c582198b
AM
18652014-10-28 Andrew MacLeod <amacleod@redhat.com>
1866
1867 * lto.c: Adjust include files.
1868 * lto-lang.c: Ditto.
1869 * lto-object.c: Ditto.
1870 * lto-partition.c: Ditto.
1871 * lto-symtab.c: Ditto.
1872
60393bbc
AM
18732014-10-27 Andrew MacLeod <amacleod@redhat.com>
1874
1875 * lto-lang.c: Adjust include files.
1876 * lto-object.c: Ditto.
1877 * lto-partition.c: Ditto.
1878 * lto-symtab.c: Ditto.
1879 * lto.c: Ditto.
1880
957f47e6
DD
18812014-10-16 DJ Delorie <dj@redhat.com>
1882
1883 * lto-object.c (lto_obj_begin_section): In the event that pointer
1884 sizes aren't powers of two, choose a more suitable alignment
1885 than (unsigned)(-1).
1886
78a7c317
DD
18872014-10-14 DJ Delorie <dj@redhat.com>
1888
1889 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1890 size-type as well.
1891 (lto_init): Initialize all intN types, not just int128.
1892
70261a4f
ML
18932014-10-06 Martin Liska <mliska@suse.cz>
1894
1895 * lto.c (stream_out): ARG_UNUSED added for last argument.
1896
00de328a
AH
18972014-09-24 Aldy Hernandez <aldyh@redhat.com>
1898
1899 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1900 DECL_ABSTRACT_P.
1901
7861b648
AK
19022014-09-23 Andi Kleen <ak@linux.intel.com>
1903
1904 * lto-partition.c (node_cmp): Update comment.
1905 (varpool_node_cmp): Use symtab_node for comparison.
1906 (add_sorted_nodes): New function.
1907 (lto_balanced_map): Change to keep ordered queue
1908 of ordered node. Handle no_reorder attribute.
1909
1ee85ee1
JH
19102014-09-11 Jan Hubicka <hubicka@ucw.cz>
1911
1912 * lto.c (lto_read_decls): Register ODR types.
1913
8605403e
JH
19142014-08-20 Jan Hubicka <hubicka@ucw.cz>
1915
1916 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1917 call.
1918 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1919
56b1f114
JH
19202014-08-14 Jan Hubicka <hubicka@ucw.cz>
1921
1922 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1923
833f94c0
RB
19242014-08-14 Richard Biener <rguenther@suse.de>
1925
1926 PR lto/62067
1927 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1928
207c68cd
RB
19292014-08-08 Richard Biener <rguenther@suse.de>
1930
1931 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1932
7c581d61
BC
19332014-08-08 Bin Cheng <bin.cheng@arm.com>
1934
1935 PR lto/62032
1936 * lto-lang.c (lto_init): Switch mis-matched arguments.
1937
39c8aaa4
TS
19382014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1939
1940 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1941
6e2830c3
TS
19422014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1943
1944 * lto-partition.c, lto-partition.h: Use hash_set instead of
1945 pointer_set.
1946
50de5793
AK
19472014-07-31 Andi Kleen <ak@linux.intel.com>
1948
1949 * lto.c (hash_canonical_type): Use inchash::hash
1950 and use inchash::add_expr.
1951 (iterative_hash_canonical_type): Dito.
1952
f6bcdb5e
RB
19532014-07-30 Richard Biener <rguenther@suse.de>
1954
1955 * lto-streamer.h (lto_write_data): New function.
1956 * langhooks.c (lhd_append_data): Do not free block.
1957 * lto-section-out.c (lto_write_data): New function writing
1958 raw data to the current section.
1959 (lto_write_stream): Adjust for langhook semantic change.
1960 (lto_destroy_simple_output_block): Write header directly.
1961 * lto-opts.c (lto_write_options): Write options directly.
1962 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1963 (lto_output_toplevel_asms): Likewise.
1964 (copy_function_or_variable): Copy data directly.
1965 (write_global_references): Output index table directly.
1966 (lto_output_decl_state_refs): Likewise.
1967 (write_symbol): Write data directly.
1968 (produce_symtab): Adjust.
1969 (produce_asm_for_decls): Output header and refs directly.
1970
56fdfd3e
AK
19712014-07-25 Andi Kleen <ak@linux.intel.com>
1972
1973 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1974
0bd8bb04
AK
19752014-07-25 Andi Kleen <ak@linux.intel.com>
1976
1977 * lto.c (hash_canonical_type): Convert to inchash.
1978 (iterative_hash_canonical_type): Dito.
1979
6d8eb96b
AK
19802014-07-25 Andi Kleen <ak@linux.intel.com>
1981
1982 * lto.c: Include inchash.h
1983
ad115a3c
JH
19842014-07-14 Jan Hubicka <hubicka@ucw.cz>
1985
1986 * lto.c (mentions_vars_p_decl_non_common): Skip
1987 DECL_ARGUMENT_FLD.
1988 mentions_vars_p_function): Do DECL_ARGUMENTS.
1989 (lto_fixup_prevailing_decls): Update.
1990
917dd9bf
JH
19912014-07-12 Jan Hubicka <hubicka@ucw.cz>
1992
1993 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1994 timevar
1995 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1996
0b83e688
JH
19972014-07-11 Jan Hubicka <hubicka@ucw.cz>
1998
ab20d992 1999 * lto-partition.c (add_references_to_partition): Use
0b83e688
JH
2000 varpool_ctor_useable_for_folding_p.
2001 * lto.c (lto_read_in_decl_state): Update sanity check.
2002
e55637b7
ML
20032014-07-01 Martin Liska <mliska@suse.cz>
2004
2005 IPA REF alias refactoring
2006 * lto-partition.c (add_symbol_to_partition_1): Usage of
2007 FOR_EACH_ALIAS added.
2008
010f4e27
JH
20092014-06-28 Jan Hubicka <hubicka@ucw.cz>
2010
2011 Revert:
2012 * lto.c (lto_copy_fields_not_streamed): New function.
2013 (compare_tree_sccs_1): Do not compare fields shared in between type
2014 and variant.
2015 (lto_read_decls): Fixup types first before inserting into hash.
2016
b82fe354
AP
20172014-06-28 Andrew Pinski <apinski@cavium.com>
2018
2019 * lto.c (lto_read_decls): Fix comment in comment.
2020
288eeff7
JH
20212014-06-28 Jan Hubicka <hubicka@ucw.cz>
2022
2023 * lto.c (lto_copy_fields_not_streamed): New function.
2024 (compare_tree_sccs_1): Do not compare fields shared in between type
2025 and variant.
2026 (lto_read_decls): Fixup types first before inserting into hash.
2027
e01fa630
ML
20282014-06-25 Martin Liska <mliska@suse.cz>
2029
ab20d992 2030 * lto-partition.c (add_references_to_partition): New IPA REF function
e01fa630
ML
2031 used.
2032 (add_symbol_to_partition_1): Likewise.
2033 (lto_balanced_map): Likewise.
ab20d992 2034 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
e01fa630 2035
aaf8a23e
JH
20362014-06-24 Jan Hubicka <hubicka@ucw.cz>
2037
2038 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
2039 (mentions_vars_p_function): ... here.
2040 (compare_tree_sccs_1): Update VINDEX checks.
2041 (lto_fixup_prevailing_decls): Likewise.
2042
1eb68d2d
TS
20432014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2044
2045 * lto.c (canonical_type_hash_cache): Use hash_map instead of
2046 pointer_map.
2047
c203e8a7
TS
20482014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2049
2050 * lto.c: Adjust.
2051
714c800f
JH
20522014-06-20 Jan Hubicka <hubicka@ucw.cz>
2053
2054 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
2055
569b1784
JH
20562014-06-20 Jan Hubicka <hubicka@ucw.cz>
2057
2058 * lto.c (compare_tree_sccs_1): Do not compare priorities.
2059
56363ffd
JH
20602014-06-15 Jan Hubicka <hubicka@ucw.cz>
2061
2062 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
2063
e257a17c
JH
20642014-06-10 Jan Hubicka <hubicka@ucw.cz>
2065
2066 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
2067 (do_whole_program_analysis): Use verify_symtab.
2068
24d047a3
JH
20692014-06-07 Jan Hubicka <hubicka@ucw.cz>
2070
2071 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
2072 lto_fixup_prevailing_decls): Skip section names.
2073
9b2b7279
AM
20742014-06-02 Andrew MacLeod <amacleod@redhat.com>
2075
2076 * lto-symtab.c: Include builtins.h.
2077
a9243bfc
RB
20782014-05-26 Richard Biener <rguenther@suse.de>
2079
2080 * lto.c (lto_parse_hex): Use int64_t.
2081 (lto_resolution_read): Likewise.
2082
fd1e9302
JH
20832014-05-23 Jan Hubicka <hubicka@ucw.cz>
2084
2085 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
2086
aede2c10
JH
20872014-05-23 Jan Hubicka <hubicka@ucw.cz>
2088
2089 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
2090 symtab pointer.
2091 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
2092
f6a7cffc
TS
20932014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2094
2095 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2096 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2097 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2098
4000360e
BS
20992012-05-22 Bernd Schmidt <bernds@codesourcery.com>
2100
2101 * lto-object.c: Include "lto-section-names.h".
2102 (LTO_SEGMENT_NAME): Don't define.
2103 * lto.c: Include "lto-section-names.h".
2104
b9559136
JH
21052014-05-17 Jan Hubicka <hubicka@ucw.cz>
2106
2107 PR lto/61012
2108 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
2109 mixed with variables.
2110
766090c2
TS
21112014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2112
2113 * lto-tree.h: Don't use variable_size gty attribute.
2114 * lto.c (lto_read_in_decl_state): Adjust.
2115 (create_subid_section_table): Likewise.
2116 (lto_flatten_files): Likewise.
2117 (read_cgraph_and_symbols): Likewise.
2118
1d60af08
KZ
21192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2120 Mike Stump <mikestump@comcast.net>
2121 Richard Sandiford <rdsandiford@googlemail.com>
2122
2123 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
2124 * lto-lang.c (get_nonnull_operand): Likewise.
2125
22869a37
RB
21262014-04-28 Richard Biener <rguenther@suse.de>
2127
2128 PR middle-end/60092
2129 * lto-lang.c: Define flag_isoc11.
2130
7de90a6c
DM
21312014-04-23 David Malcolm <dmalcolm@redhat.com>
2132
2133 * lto-partition.c (add_references_to_partition): Update for
2134 removal of implicit pointer from the is-a.h API.
2135 (add_symbol_to_partition_1): Likewise.
2136 (contained_in_symbol): Likewise.
2137 (undo_partition): Likewise.
2138 (lto_balanced_map): Likewise.
2139 (promote_symbol): Likewise.
2140 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
2141 (lto_symtab_merge_symbols): Likewise.
2142 * lto.c (lto_wpa_write_files): Likewise.
2143
783dab6b
RB
21442014-04-15 Richard Biener <rguenther@suse.de>
2145
2146 * lto.c: Include params.h.
2147 (do_whole_program_analysis): Switch on flag_lto_partition value,
2148 add support for LTO_PARTITION_ONE.
2149 * lto-partition.h (lto_balanced_map): Adjust.
2150 * lto-partition.c (lto_balanced_map): Get number of desired
2151 partitions as argument to support -flto-partition=one.
2152
cb90235d
JH
21532014-04-14 Jan Hubicka <hubicka@ucw.cz>
2154
ab20d992 2155 * lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
cb90235d
JH
2156 tp_first_run.
2157
bbe281da
JH
21582014-03-19 Jan Hubicka <hubicka@ucw.cz>
2159
2160 * lto.c: Include ipa-inline.h
2161 (do_whole_program_analysis): Free inline summary after partitioning.
2162
ce2f49b3
RB
21632014-03-19 Richard Biener <rguenther@suse.de>
2164
2165 PR middle-end/60553
ab20d992 2166 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
ce2f49b3
RB
2167 instead of TREE_CHAIN as chain_next.
2168
e41106fc
RB
21692014-03-19 Richard Biener <rguenther@suse.de>
2170
2171 * lto.c (lto_wpa_write_files): Move call to
2172 lto_promote_cross_file_statics ...
2173 (do_whole_program_analysis): ... here, into the partitioning
2174 block. Do not ggc_collect after lto_wpa_write_files but
2175 for a last time before it.
2176
15df2655
JJ
21772014-03-19 Jakub Jelinek <jakub@redhat.com>
2178
2179 PR lto/60571
2180 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
2181 Fix formatting.
2182
415e2e6b
JJ
21832014-03-18 Jakub Jelinek <jakub@redhat.com>
2184
2185 PR sanitizer/60535
2186 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
2187 and complex_{float,{,long_}double}_type_node.
2188
f42c637e
PM
21892014-03-08 Paulo Matos <paulo@matos-sorge.com>
2190
415e2e6b
JJ
2191 * lto-lang.c (lto_init): Pass flag_short_double to
2192 build_common_tree_nodes.
f42c637e 2193
6dab804d
JH
21942014-02-14 Jan Hubicka <hubicka@ucw.cz>
2195
2196 PR lto/60295
2197 * lto.c (stream_out): Avoid parallel streaming with
2198 -flto=jobserver until we are able to throttle it down
2199 resonably.
2200
39434bce
JH
22012014-02-14 Jan Hubicka <hubicka@ucw.cz>
2202
2203 * lto-partition.c (add_symbol_to_partition_1,
2204 undo_partition, lto_balanced_map): Aliases have no
2205 defined size.
2206 (lto_balanced_map): Do not follow refering variables
2207 if they can be optimized out.
2208
1966fd99
RB
22092014-02-14 Richard Biener <rguenther@suse.de>
2210
2211 PR lto/60179
2212 * lto.c (compare_tree_sccs_1): Do not compare
2213 DECL_FUNCTION_SPECIFIC_TARGET.
2214 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
2215
283416b3
RB
22162014-02-12 Richard Biener <rguenther@suse.de>
2217
2218 PR lto/60060
2219 * lto-lang.c (lto_write_globals): Do not call
2220 wrapup_global_declarations or emit_debug_global_declarations
2221 but emit debug info for non-function scope variables
2222 directly.
2223
b7e85694
JH
22242014-02-06 Jan Hubicka <hubicka@ucw.cz>
2225
2226 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
2227
96451279
JH
22282014-02-06 Jan Hubicka <hubicka@ucw.cz>
2229
2230 PR ipa/59469
2231 * lto-partition.c (symbol_class): Move to cgraph.h
2232 (get_symbol_class): Move to symtab.c
2233 (add_references_to_partition, add_symbol_to_partition_1,
2234 lto_max_map, lto_1_to_1_map, lto_balanced_map,
2235 lto_promote_cross_file_statics): Update.
2236
f300e7b8
JH
22372014-02-05 Jan Hubicka <hubicka@ucw.cz>
2238
2239 * lto.c (lto_parallelism): New static var.
2240 (do_stream_out, wait_for_child, stream_out): New static functions.
2241 (lto_wpa_write_files): Add support for parallel streaming.
2242 (do_whole_program_analysis): Set parallelism.
2243 * lang.opt (fwpa): Add parameter.
2244 * lto-lang.c (lto_handle_option): Handle flag_wpa.
2245 (lto_init): Update use of flag_wpa.
2246 * lto-streamer.h (asm_nodes_output): Declare.
2247
f0f91770
RB
22482014-02-05 Richard Biener <rguenther@suse.de>
2249
2250 * lto.h (lto_global_var_decls): Remove.
2251 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
2252 (lto_write_globals): Do nothing in WPA stage, gather globals from
2253 the varpool here ...
2254 * lto.c (lto_main): ... not here.
2255 (materialize_cgraph): Do not call rest_of_decl_compilation
2256 on the empty lto_global_var_decls vector.
2257 (lto_global_var_decls): Remove.
2258
d665f8dd
JH
22592014-02-04 Jan Hubicka <hubicka@ucw.cz>
2260
ab20d992 2261 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
d665f8dd
JH
2262 needs duplicating, not generic COMDAT.
2263
c39276b8
RB
22642014-02-04 Richard Biener <rguenther@suse.de>
2265
2266 PR lto/59723
2267 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
2268 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
2269
5f876ae7 22702014-02-04 Jan Hubicka <hubicka@ucw.cz>
3d3b561f 2271 Markus Trippelsdorf
5f876ae7
JH
2272
2273 PR ipa/59469
2274 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
2275 merge force_output and forced_by_abi flags.
2276
b72271b9
BI
22772014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2278
2279 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
2280 flag_cilkplus.
2281
63124c48
RB
22822014-01-09 Richard Biener <rguenther@suse.de>
2283
2284 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
2285
d05b9920
RB
22862014-01-09 Richard Biener <rguenther@suse.de>
2287
2288 PR lto/45586
2289 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
2290 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
2291 (gimple_canonical_types_compatible_p): Do not compare them either.
2292
23a5b65a
RS
22932014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2294
2295 Update copyright years
2296
2c8326a5
OE
22972013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
2298
2299 * lto.c: Remove struct tags when referring to class varpool_node.
2300 * lto-partition.c: Likewise.
2301 * lto-symtab.c: Likewise.
2302
e06f9964
JJ
23032013-11-29 Jakub Jelinek <jakub@redhat.com>
2304 Richard Biener <rguenther@suse.de>
2305
2306 PR lto/59326
2307 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
2308
c193f58b
JJ
23092013-11-29 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR lto/59326
2312 * lto.c (mentions_vars_p_omp_clause): New function.
2313 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
2314 after return stmts.
2315
2fb9a547
AM
23162013-11-22 Andrew MacLeod <amacleod@redhat.com>
2317
2318 * lto.c: Add required include files from gimple.h.
ab20d992
JJ
2319 * lto-lang.c: Likewise.
2320 * lto-object.c: Likewise.
2321 * lto-partition.c: Likewise.
2322 * lto-symtab.c: Likewise.
2fb9a547 2323
fec39fa6
TS
23242013-11-18 Trevor Saunders <tsaunders@mozilla.com>
2325
2326 * lto-partition.c lto-symtab.c lto.c Adjust.
2327
d8a2d370
DN
23282013-11-14 Diego Novillo <dnovillo@google.com>
2329
2330 * lto-lang.c: Include stringpool.h.
2331 Include stor-layout.h.
2332 * lto-partition.c: Include gcc-symtab.h.
2333 * lto.c: Include stor-layout.h.
2334
5e20cdc9
DM
23352013-10-31 David Malcolm <dmalcolm@redhat.com>
2336
2337 Automated part of renaming of symtab_node_base to symtab_node.
2338
2339 Patch autogenerated by rename_symtab.py from
2340 https://github.com/davidmalcolm/gcc-refactoring-scripts
2341 revision 58bb219cc090b2f4516a9297d868c245495ee622
2342
2343 * lto-partition.c (add_symbol_to_partition): Rename
2344 symtab_node_base to symtab_node.
2345 (get_symbol_class): Likewise.
2346 (symbol_partitioned_p): Likewise.
2347 (add_references_to_partition): Likewise.
2348 (add_symbol_to_partition_1): Likewise.
2349 (contained_in_symbol): Likewise.
2350 (add_symbol_to_partition): Likewise.
2351 (lto_1_to_1_map): Likewise.
2352 (lto_max_map): Likewise.
2353 (lto_balanced_map): Likewise.
2354 (privatize_symbol_name): Likewise.
2355 (promote_symbol): Likewise.
2356 (may_need_named_section_p): Likewise.
2357 (rename_statics): Likewise.
2358 (lto_promote_statics_nonwpa): Likewise.
2359 * lto-symtab.c (lto_symtab_merge): Likewise.
2360 (lto_symtab_resolve_replaceable_p): Likewise.
2361 (lto_symtab_symbol_p): Likewise.
2362 (lto_symtab_resolve_can_prevail_p): Likewise.
2363 (lto_symtab_resolve_symbols): Likewise.
2364 (lto_symtab_merge_decls_2): Likewise.
2365 (lto_symtab_merge_decls_1): Likewise.
2366 (lto_symtab_merge_decls): Likewise.
2367 (lto_symtab_merge_symbols_1): Likewise.
2368 (lto_symtab_merge_symbols): Likewise.
2369 (lto_symtab_prevailing_decl): Likewise.
2370 * lto.c (lto_wpa_write_files): Likewise.
2371 (read_cgraph_and_symbols): Likewise.
2372 (do_whole_program_analysis): Likewise.
2373
378cd6b1
DM
23742013-10-30 David Malcolm <dmalcolm@redhat.com>
2375
2376 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
2377 declarations onto multiple lines to make things easier for
2378 rename_symtab.py.
2379 (lto_symtab_merge_decls_1): Likewise.
2380 (lto_symtab_merge_symbols_1): Likewise.
2381
939b37da
BI
23822013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2383
2384 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
2385 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
2386 Plus is enabled.
2387
67348ccc
DM
23882013-10-29 David Malcolm <dmalcolm@redhat.com>
2389
2390 Patch autogenerated by refactor_symtab.py from
2391 https://github.com/davidmalcolm/gcc-refactoring-scripts
2392 revision 58bb219cc090b2f4516a9297d868c245495ee622
2393
2394 * lto-partition.c (lto_promote_cross_file_statics): Update for
2395 conversion of symtab types to a true class hierarchy.
2396 (rename_statics): Likewise.
2397 (promote_symbol): Likewise.
2398 (privatize_symbol_name): Likewise.
2399 (lto_balanced_map): Likewise.
2400 (varpool_node_cmp): Likewise.
2401 (node_cmp): Likewise.
2402 (lto_1_to_1_map): Likewise.
2403 (undo_partition): Likewise.
2404 (add_symbol_to_partition): Likewise.
2405 (contained_in_symbol): Likewise.
2406 (add_symbol_to_partition_1): Likewise.
2407 (add_references_to_partition): Likewise.
2408 (symbol_partitioned_p): Likewise.
2409 (get_symbol_class): Likewise.
2410 (lto_max_map): Likewise.
2411 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
2412 (lto_symtab_merge_symbols): Likewise.
2413 (lto_symtab_merge_symbols_1): Likewise.
2414 (lto_symtab_merge_decls): Likewise.
2415 (lto_symtab_merge_decls_1): Likewise.
2416 (lto_symtab_merge_decls_2): Likewise.
2417 (lto_symtab_resolve_symbols): Likewise.
2418 (lto_symtab_resolve_can_prevail_p): Likewise.
2419 (lto_symtab_symbol_p): Likewise.
2420 (lto_symtab_resolve_replaceable_p): Likewise.
2421 (lto_symtab_merge): Likewise.
2422 (lto_varpool_replace_node): Likewise.
2423 (lto_cgraph_replace_node): Likewise.
2424 * lto.c (lto_main): Likewise.
2425 (do_whole_program_analysis): Likewise.
2426 (materialize_cgraph): Likewise.
2427 (read_cgraph_and_symbols): Likewise.
2428 (cmp_partitions_order): Likewise.
2429 (lto_materialize_function): Likewise.
2430 (has_analyzed_clone_p): Likewise.
2431
8e9055ae
AM
24322013-10-29 Andrew MacLeod <amacleod@redhat.com>
2433
ab20d992
JJ
2434 * lto-object.c: Add gimple.h to include list.
2435 * lto-partition.c: Likewise.
8e9055ae 2436
377d9792
AM
24372013-10-18 Andrew MacLeod <amacleod@redhat.com>
2438
2439 * lto.c: Remove tree-flow.h from include list.
2440
fffda8d7
RB
24412013-10-15 Richard Biener <rguenther@suse.de>
2442
2443 * lto.c (hash_canonical_type): Split out from ...
2444 (iterative_hash_canonical_type): ... here. Register types
2445 we recurse to.
2446 (gimple_canonical_type_hash): Adjust.
2447 (gimple_register_canonical_type_1): Split out from ...
2448 (gimple_register_canonical_type): ... here. Cache computed
2449 hash value.
2450 (lto_register_canonical_types): Split into two modes,
2451 clearing and computing TYPE_CANONICAL.
2452 (lto_read_decls): Adjust.
2453 (read_cgraph_and_symbols): Do two passes over global trees,
2454 first clearing then computing TYPE_CANONICAL.
2455
1394237e
RB
24562013-10-14 Richard Biener <rguenther@suse.de>
2457
2458 * lto.c (gimple_canonical_types): Move out-of GC space.
2459 (canonical_type_hash_cache): Make a pointer-map.
2460 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
2461 New counters.
2462 (iterative_hash_canonical_type): Adjust.
2463 (read_cgraph_and_symbols): Likewise.
2464 (print_lto_report_1): Likewise.
2465
0a387eca
RB
24662013-10-14 Richard Biener <rguenther@suse.de>
2467
2468 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
2469 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
2470 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
2471 gimple_types_compatible_p_1, gimple_types_compatible_p,
2472 visit, iterative_hash_name, struct type_hash_pair,
2473 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2474 gimple_type_eq, gimple_register_type, num_not_merged_types,
2475 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
2476 num_not_merged_types_in_same_scc_trees): Remove old merging code
2477 and statistics.
2478 (lto_read_decls): Do not run old merging code in parallel.
2479 (read_cgraph_and_symbols): Do not init/free old merging
2480 data structures.
2481 (print_lto_report_1): Do not report differences of old vs. new
2482 merging code.
2483
83fd5d11
RB
24842013-10-14 Richard Biener <rguenther@suse.de>
2485
2486 * lto-lang.c (lto_init): Do not re-init canonical types here.
2487 (lto_register_canonical_types): Move to ...
2488 * lto.c (lto_register_canonical_types): ... here.
2489 (gimple_canonical_types, canonical_type_hash_cache,
2490 iterative_hash_canonical_type, gimple_canonical_type_hash,
2491 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
2492 gimple_register_canonical_type): Add canonical type merging machinery
2493 moved from gimple.c.
2494 (read_cgraph_and_symbols): Init and free canonical type tables
2495 here.
2496 (print_lto_report_1): Report canonical type table stats here.
2497
acf0174b
JJ
24982013-10-11 Jakub Jelinek <jakub@redhat.com>
2499
2500 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
2501
7c6fedd2
TT
25022013-09-25 Tom Tromey <tromey@redhat.com>
2503
2504 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
2505 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
2506 (lto/lto-object.o): Remove.
2507
35f32ad4
RB
25082013-09-06 Richard Biener <rguenther@suse.de>
2509
2510 * lto-symtab.c: Move from gcc/
2511 * lto.h: Include vec.h.
2512 (lto_global_var_decls): Declare.
2513 * lto.c (lto_global_var_decls): Move definition here.
2514 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
2515 (lto-symtab.o): Add.
2516 * config-lang.in (gtfiles): Add lto.h.
2517
49322b12
JH
25182013-08-31 Jan Hubicka <jh@suse.cz>
2519
ab20d992 2520 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
49322b12
JH
2521 DECL_FIELD_OFFSET can contain an reference to variable.
2522
31f1f73b
JH
25232013-08-31 Jan Hubicka <jh@suse.cz>
2524
2525 * lto.c (tree_with_vars): Turn into vector.
2526 (MAYBE_REMEMBER_WITH_VARS): Change to...
2527 (CHECK_VAR): ... this one.
2528 (CHECK_NO_VAR): New macro.
2529 (maybe_remember_with_vars_typed): Turn to ...
2530 (mentions_vars_p_typed): ... this one.
2531 (maybe_remember_with_vars_common): Turn to ...
2532 (mentions_vars_p_comon): ... this one.
2533 (maybe_remember_with_vars_decl_minimal): Turn to ...
2534 (mentions_vars_p_decl_minmal): ... this one.
2535 (maybe_remember_with_vars_decl_common): Turn to ...
2536 (mentions_vars_p_decl_common): ... this one.
2537 (maybe_remember_with_vars_decl_with_vis): Turn to ...
2538 (mentions_vars_p_decl_with_vis): ... this one.
2539 (maybe_remember_with_vars_decl_non_common): Turn to ...
2540 (mentions_vars_p_decl_non_common): ... this one.
2541 (maybe_remember_with_vars_function): Turn to ...
2542 (mentions_vars_p_function): ... this one.
2543 (maybe_remember_with_vars_field_decl): Turn to ...
2544 (mentions_vars_p_field_decl): ... this one.
2545 (maybe_remember_with_vars_type): Turn to ...
2546 (mentions_vars_p_type): ... this one.
2547 (maybe_remember_with_vars_binfo): Turn to ...
2548 (mentions_vars_p_binfo): ... this one.
2549 (maybe_remember_with_vars_constructor): Turn to ...
2550 (mentions_vars_p_constructor): ... this one.
2551 (maybe_remember_with_vars_expr): Turn to ...
2552 (mentions_vars_p_expr): ... this one.
2553 (maybe_remember_with_vars): Turn to ...
2554 (mentions_vars_p): ... this one.
2555 (lto_read_decls): Update.
2556 (LTO_SET_PREVAIL): Do not call function for internal decls.
2557 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
2558 check that something was updated.
2559 (lto_fixup_state): Do not care about internal decls.
2560 (lto_fixup_decls): Update.
2561 (read_cgraph_and_symbols): Update.
2562
256eefa9
JH
25632013-08-29 Jan Hubicka <jh@suse.cz>
2564
2565 * lto.c (read_cgraph_and_symbols): Free decl states.
2566
0170f33c
JH
25672013-08-29 Jan Hubicka <jh@suse.cz>
2568
2569 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
2570 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
2571 TYPE_FINAL_P.
2572
c01c111b
JH
25732013-08-28 Jan Hubicka <jh@suse.cz>
2574
2575 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
2576 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
2577 (unify_scc): Do checking assert.
2578
6a49f3c9
JH
25792013-08-06 Jan Hubicka <jh@suse.cz>
2580 Martin Liska <marxin.liska@gmail.com>
2581
ab20d992 2582 * lto-partition.c (lto_balanced_map): Always base order on
6a49f3c9
JH
2583 source file order.
2584
a2e2a668
JH
25852013-08-06 Jan Hubicka <jh@suse.cz>
2586
2587 * lto.c (lto_materialize_function): Do not read body anymore.
2588
815effe1
JH
25892013-08-02 Jan Hubicka <jh@suse.cz>
2590
2591 * lto.c (lto_materialize_function): Do not push struct function.
2592 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
2593 (may_need_named_section_p): Even abstract origins may need
2594 named section.
2595
315f8c0e
DM
25962013-07-30 David Malcolm <dmalcolm@redhat.com>
2597
2598 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
2599 PASS_MANAGER_H.
2600
2601 * lto.c (do_whole_program_analysis): Update for move of
2602 all_regular_ipa_passes from a global to a field of class
2603 pass_manager.
2604
1aa95df7
OB
26052013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
2606
2607 * lto-partition.c: Fix typos.
2608
c525ba9a
JH
26092013-06-20 Jan Hubicka <jh@suse.cz>
2610
2611 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
2612 partitioning of variables.
2613
7a89ad00
JH
26142013-06-20 Jan Hubicka <jh@suse.cz>
2615
2616 * lto.c (read_cgraph_and_symbols): Set cgraph state.
2617
6a6dac52
JH
26182013-06-19 Jan Hubicka <jh@suse.cz>
2619
2620 * lto-partition.c (add_references_to_partition): Use
2621 ctor_for_folding.
2622
ac0511f2
RB
26232013-06-18 Richard Biener <rguenther@suse.de>
2624
2625 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
2626 and use it.
2627 (lto_register_function_decl_in_symtab): Likewise.
2628 (cmp_tree): New function.
2629 (unify_scc): Instead of using the streamer cache map from entry
2630 to cache index match up the two maps we have by sorting them.
2631 Adjust calls to lto_register_var_decl_in_symtab and
2632 lto_register_function_decl_in_symtab.
2633
ee03e71d
RB
26342013-06-17 Richard Biener <rguenther@suse.de>
2635
2636 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
2637 * lto.c: Include data-streamer.h.
2638 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
2639 (gimple_type_leader_entry_s, gimple_type_leader,
2640 gimple_lookup_type_leader): Remove.
2641 (gtc_visit): Simplify.
2642 (gimple_types_compatible_p): Likewise.
2643 (gimple_register_type_1): Likewise. Merge into ...
2644 (gimple_register_type): ... this. Keep it as legacy for
2645 statistics purposes for now.
2646 (fixup_integer_cst): Remove.
2647 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
2648 rename to ...
2649 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
2650 maybe_remember_with_vars_*): ... these.
2651 (uniquify_nodes): Remove.
2652 (lto_fixup_prevailing_type): New function.
2653 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
2654 (tree_scc_hash, tree_scc_hash_obstack): New globals.
2655 (num_merged_types, num_prevailing_types, num_not_merged_types,
2656 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
2657 total_scc_size_merged, num_sccs_merged, num_scc_compares,
2658 num_scc_compare_collisions): New global counters.
2659 (compare_tree_sccs_1): New function.
2660 (compare_tree_sccs): Likewise.
2661 (unify_scc): Likewise.
2662 (lto_read_decls): Stream in tree SCCs and unify them on the
2663 way in. Finalize prevailing SCC tree members.
2664 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
2665 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
2666 to ggc-collect during merging.
2667 (print_lto_report_1): Adjust for new merging code.
2668
ca0f62a8
JH
26692013-06-12 Jan Hubicka <jh@suse.cz>
2670
2671 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2672
bbf9ad07
JH
26732013-06-12 Jan Hubicka <jh@suse.cz>
2674
2675 * lto.c (register_resolution): Take lto_file_data argument.
2676 (lto_register_var_decl_in_symtab,
2677 lto_register_function_decl_in_symtab): Update.
2678 (read_cgraph_and_symbols): Update resolution_map handling.
2679
ecdbd01a 26802013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
2681
2682 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2683 (add_symbol_to_partition_1): Likewise.
2684 (contained_in_symbol): Likewise.
2685 (lto_balanced_map): Likewise.
2686 (rename_statics): Drop weakref.
2687
a367df53
RB
26882013-06-05 Richard Biener <rguenther@suse.de>
2689
2690 * lto.c (num_merged_types): New global variable.
2691 (uniquify_nodes): Increase num_merged_types when merging a type.
2692 (print_lto_report_1): Output the number of merged types.
2693
40a7fe1e
JH
26942013-06-01 Jan Hubicka <jh@suse.cz>
2695
2696 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2697 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2698 (do_whole_program_analysis): Update dumping.
2699
e70670cf
JH
27002013-05-29 Jan Hubicka <jh@suse.cz>
2701
2702 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2703 flags.
2704 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2705
8ee05051
JH
27062013-05-15 Jan Hubicka <jh@suse.cz>
2707
2708 * lto-partition.c (privatize_symbol_name): Return true when
2709 privatizing happened.
2710 (rename_statics): Do not go into infinite loop when privatizing
2711 is not needed.
2712
427b248d
JM
27132013-05-16 Jason Merrill <jason@redhat.com>
2714
2715 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2716
9de04252
MJ
27172013-05-15 Martin Jambor <mjambor@suse.cz>
2718
2719 * lto-partition.c (lto_balanced_map): Print symbol order instead
2720 of node uids.
2721
2d6e4603
JH
27222013-05-15 Jan Hubicka <jh@suse.cz>
2723
2724 PR lto/57038
2725 PR lto/47375
2726 * lto-partition.c (get_symbol_class): Fix weakrefs.
2727 (lto_balanced_map): Fix weakrefs.
2728 (privatize_symbol_name): Remove unnecesary label.
2729 (rename_statics): Handle weakrefs as statics.
2730
64cfa6c0
JH
27312013-05-09 Jan Hubicka <jh@suse.cz>
2732 Richard Biener <rguenther@suse.de>
2733
2734 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2735 (lto_register_var_decl_in_symtab): Likewise.
2736 (lto_main): Promote statics.
2737 * lto-partition.c (privatize_symbol_name): New function.
2738 (promote_symbol): Use it.
2739 (may_need_named_section_p): New predicate.
2740 (rename_statics): New functions.
2741 (lto_promote_cross_file_statics): Simplify; do renaming.
2742 (lto_promote_statics_nonwpa): New function.
2743 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2744
e45cde98
RB
27452013-02-08 Richard Biener <rguenther@suse.de>
2746
2747 PR lto/56231
2748 * lto-lang.c (lto_init): Do not enter a dummy file.
2749
6edc3e32
UB
27502013-02-07 Uros Bizjak <ubizjak@gmail.com>
2751
2752 PR bootstrap/56227
2753 * lto.c (lto_resolution_ready): Use %wx instead of
2754 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2755
ed73881e
RG
27562013-02-04 Richard Guenther <rguenther@suse.de>
2757
2758 PR lto/56168
2759 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2760 or lto_fixup_decls at LTRANS time.
2761
a19b1432
JH
27622013-01-09 Jan Hubicka <jh@suse.cz>
2763
2764 PR lto/45375
2765 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2766
49c01f87
L
27672012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2768
2769 PR lto/55466
2770 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2771 variables.
2772 (lto_main): Record the global variables if WPA isn't enabled.
2773
6e1aa848
DN
27742012-11-20 Diego Novillo <dnovillo@google.com>
2775 Jakub Jelinek <jakub@redhat.com>
2776
2777 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2778
9771b263
DN
27792012-11-16 Diego Novillo <dnovillo@google.com>
2780
2781 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2782
2783 * lto-lang.c: Use new vec API in vec.h.
2784 * lto-partition.c: Likewise.
2785 * lto-partition.h: Likewise.
2786 * lto.c: Likewise.
2787
24551b9c
LC
27882012-10-31 Lawrence Crowl <crowl@google.com>
2789
2790 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2791 down-cast via dyn_cast.
2792 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2793 (undo_partition): Likewise.
2794 (lto_balanced_map): Likewise.
2795 (get_symbol_class): Likewise and via is_a.
2796 (lto_balanced_map): Change symtab checking to is_a.
2797
aec06f6f
RB
27982012-10-12 Richard Biener <rguenther@suse.de>
2799
2800 PR lto/54898
2801 * lto.c (gimple_types_compatible_p_1): Also compare
2802 TYPE_MAIN_VARIANT.
2803 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2804
0b8c30f9
TB
28052012-10-09 Tobias Burnus <burnus@net-b.de>
2806
2807 * lto-lang.c (lto_register_builtin_type): Avoid useless
2808 decl creation.
2809 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2810
da3202a8
TB
28112012-10-08 Tobias Burnus <burnus@net-b.de>
2812
2813 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2814 Free lto_file struct after closing the file.
2815
2512a443
JH
28162012-10-08 Jan Hubicka <jh@suse.cz>
2817
ab20d992 2818 * lto.c (remember_with_vars): Also fixup INTEGER_CST.
2512a443
JH
2819 (fixup_integer_cst): New functoin.
2820 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2821
e75f8f79
JH
28222012-10-07 Jan Hubicka <jh@suse.cz>
2823
2824 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2825 release input encoders.
2826 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2827
46591697
JH
28282012-10-06 Jan Hubicka <jh@suse.cz>
2829
ab20d992 2830 PR lto/54790
46591697
JH
2831 * lto.c (resolution_map): New static var.
2832 (register_resolution): New function.
2833 (lto_register_var_decl_in_symtab): Use it.
2834 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2835
af16bc76
MJ
28362012-09-20 Martin Jambor <mjambor@suse.cz>
2837
2838 * lto.c (lto_materialize_function): Call push_struct_function and
2839 pop_cfun.
2840
5368224f
DC
28412012-09-19 Dehao Chen <dehao@google.com>
2842
ab20d992 2843 * lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
5368224f 2844
b5493fb2
JH
28452012-09-19 Jan Hubicka <jh@suse.cz>
2846
2847 * lto.c (lto_materialize_function): Update confused comment.
2848 (read_cgraph_and_symbols): Do not free symtab.
2849
c3c445e1
JH
28502012-09-12 Jan Hubicka <jh@suse.cz>
2851
2852 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2853 AUX pointer cleaning. Add max partitioning.
2854 * lto-partition.c (enum symbol_class): New.
2855 (get_symbol_class): New function.
2856 (symbol_partitioned_p): New function.
2857 (add_references_to_partition): Remove.
2858 (add_aliases_to_partition): Remove.
2859 (add_cgraph_node_to_partition_1): Remove.
2860 (add_cgraph_node_to_partition): Remove.
2861 (add_symbol_to_partition): New function.
2862 (add_symbol_to_partition_1): New function.
2863 (contained_in_symbol): New function.
2864 (partition_cgraph_node_p): Remove.
2865 (partition_varpool_node_p): Remove.
2866 (partition_symbol_p): Remove.
2867 (lto_1_to_1_map): Cleanup.
2868 (lto_max_map): New.
2869 (lto_balanced_map): Update.
2870 (lto_promote_cross_file_statics): Update.
2871 * lto-partition.h (lto_max_map): Declare.
2872 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2873
b5c7cdfb
JH
28742012-09-11 Jan Hubicka <jh@suse.cz>
2875
2876 PR lto/54312
2877 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2878 type is variant leader.
2879
b29402f0
RG
28802012-09-11 Richard Guenther <rguenther@suse.de>
2881
2882 * lto.c (enum gtc_mode): Remove.
2883 (struct type_pair_d): Adjust.
2884 (lookup_type_pair): Likewise.
2885 (gimple_type_leader): Do not mark as deletable.
2886 (gimple_lookup_type_leader): Adjust.
2887 (gtc_visit): Likewise.
2888 (gimple_types_compatible_p_1): Likewise.
2889 (gimple_types_compatible_p): Likewise.
2890 (gimple_type_hash): Likewise.
2891 (gimple_register_type): Likewise.
2892 (read_cgraph_and_symbols): Manage lifetime of tables
2893 here.
2894
b8f4e58f
RG
28952012-09-11 Richard Guenther <rguenther@suse.de>
2896
2897 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2898 struct type_pair_d, lookup_type_pair, struct sccs,
2899 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2900 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2901 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2902 visit, iterative_hash_name, struct type_hash_pair,
2903 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2904 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2905 Move here from gimple.c
2906 (read_cgraph_and_symbols): Free hash tables here.
2907 (print_lto_report_1): New function wrapping print_lto_report.
2908 (do_whole_program_analysis): Call it.
2909 (lto_main): Likewise.
2910
1cdbb3f9
JH
29112012-09-10 Jan Hubicka <jh@suse.cz>
2912
2913 * lto-partition.c (partition_symbol_p): Forward declare.
2914 (add_references_to_partition): Reimplement using partition_symbol_p.
2915 (add_aliases_to_partition): Break out from add_references_to_partition;
2916 reimplement using partition_symbol_p.
2917 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2918 add sanity checks.
2919 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2920 (partition_varpool_node_p): Do not special case aliases.
2921
b4661bfe
JH
29222012-08-12 Jan Hubicka <jh@suse.cz>
2923
2924 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2925 it is deleted after streaming.
2926 * lto-partition.c (partition_symbol_p): New function.
2927 (promote_var, promote_fn): Remove.
2928 (promote_symbol): New function.
2929 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2930 to lookup the actual boundaries instead of computing them ad-hoc.
2931
7b99cca4
JH
29322012-08-12 Jan Hubicka <jh@suse.cz>
2933
2934 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2935 in partitioning.
2936 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2937 by encoder.
2938 * lto-partition.c (new_partition): Update.
2939 * lto.c (cmp_partitions_order): Update.
2940 (lto_wpa_write_files): Update.
2941 (free_ltrans_partitions): Update.
2942 (add_references_to_partition): Update.
2943 (add_cgraph_node_to_partition_1): Update.
2944 (add_cgraph_node_to_partition): Update.
2945 (add_varpool_node_to_partition): Update.
2946 (undo_partition): Update.
2947 (lto_balanced_map): Update.
2948 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2949 set_referenced_from_this_partition_p): Update.
2950 (lto_promote_cross_file_statics): Update.
2951
f27c1867
JH
29522012-08-12 Jan Hubicka <jh@suse.cz>
2953
2954 * lto-partition.c (set_referenced_from_other_partition_p,
2955 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2956 New functions.
2957 (lto_promote_cross_file_statics): Use them.
2958
ab96cc5b
JH
29592012-07-24 Jan Hubicka <jh@suse.cz>
2960
2961 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2962
0229aee9
UB
29632012-07-24 Uros Bizjak <ubizjak@gmail.com>
2964
2965 * lto-tree.h (lang_decl): Add variable_size GTY option.
2966
7ee2468b
SB
29672012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2968
2969 * lto.c: Do not include timevar.h.
2970 * Make-lang.in: Fix dependencies.
2971
a910399d
LC
29722012-06-18 Lawrence Crowl <crowl@google.com>
2973
ab20d992 2974 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2975 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2976 to lto_wpa_write_files.
ab20d992 2977 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
a910399d
LC
2978 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2979 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2980 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2981 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2982 to be a front end, but is not one.
2983
877ab5e9
JH
29842012-05-18 Jan Hubicka <jh@suse.cz>
2985
2986 * lto.c (lto_materialize_constructors_and_inits): Remove.
2987 (read_cgraph_and_symbols): Remove handling of alias pairs.
2988
6649df51
JH
29892012-05-17 Jan Hubicka <jh@suse.cz>
2990
2991 * lto-partition.c (add_references_to_partition): Handle external vars.
2992 (partition_varpool_node_p): Likewise.
2993 (lto_promote_cross_file_statics): Do not promote externals.
2994
d1ede5f4
BS
29952012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2996
2997 * lto-lang.c (handle_fnspec_attribute): New static function.
2998 (lto_attribute_table): Add "fn spec".
2999 (DEF_ATTR_STRING): Define and undefine along with the other macros.
3000
0d6bf48c
JH
30012012-05-04 Jan Hubicka <jh@suse.cz>
3002
3003 * lto.c (do_whole_program_analysis): Set timevars correctly.
3004 (lto_main): Likewise.
d1ede5f4 3005
1d67dde8
RB
30062012-05-04 Richard Guenther <rguenther@suse.de>
3007
3008 * lang.opt (fwpa): Do not mark as Optimization.
3009 (fltrans): Likewise.
3010
65d630d4
JH
30112012-04-30 Jan Hubicka <jh@suse.cz>
3012
3013 * lto.c (lto_main): Use compile ().
1d67dde8
RB
3014 * lto-partition.c (partition_cgraph_node_p): Use
3015 symtab_used_from_object_file_p.
65d630d4
JH
3016 (partition_varpool_node_p): Likewise.
3017
ead84f73
JH
30182012-04-20 Jan Hubicka <jh@suse.cz>
3019
3020 * lto-partition.c (partition_cgraph_node_p): Use force_output.
3021
5932a4d4
JH
30222012-04-18 Jan Hubicka <jh@suse.cz>
3023
3024 * lto-partition.c (add_references_to_partition, lto_balanced_map):
3025 Update for new ipa-ref API.
3026
65c70e6b
JH
30272012-04-16 Jan Hubicka <jh@suse.cz>
3028
3029 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 3030 walkers to walk cgraph and varpool.
65c70e6b
JH
3031 (materialize_cgraph): Likewise.
3032 * lto-partition.c (lto_1_to_1_map): Likewise.
3033 (lto_balanced_map): Likewise.
3034 (lto_promote_cross_file_statics): Likewise.
3035
960bfb69
JH
30362012-04-14 Jan Hubicka <jh@suse.cz>
3037
3038 * lto.c: Update field referenced for new cgraph/varpool layout.
3039 * lto-partition.c: Likewise.
3040
a66dc285
JH
30412012-04-11 Jan Hubicka <jh@suse.cz>
3042
3043 * lto.c: Update copyright; remove params.h, ipa-inline.h
3044 and ipa-utils.h inlines; inline lto-partition.h
3045 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
3046 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
3047 add_references_to_partition, add_cgraph_node_to_partition_1,
3048 add_cgraph_node_to_partition, add_varpool_node_to_partition,
3049 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
3050 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
3051 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
3052 * lto-partition.c: ... here; new file.
3053 * lto-partition.h: New file.
3054 * Make-lang.in (lto.o): Update dependencies.
3055 (lto-partition.o): New.
3056
f3b249e5
RG
30572012-04-05 Richard Guenther <rguenther@suse.de>
3058
3059 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
3060 definition.
3061
21fa2faf
RG
30622012-03-12 Richard Guenther <rguenther@suse.de>
3063
3064 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
3065
6bb485a3
RG
30662012-03-06 Richard Guenther <rguenther@suse.de>
3067
3068 PR lto/52097
3069 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
3070
95510497
RG
30712012-02-28 Richard Guenther <rguenther@suse.de>
3072
3073 PR lto/52400
3074 * lto.c (lto_register_function_decl_in_symtab): Do not register
3075 a reverse renamed decl mapping.
3076
09228fef
JJ
30772012-01-06 Jakub Jelinek <jakub@redhat.com>
3078
3079 PR lto/51774
3080 * lto-lang.c (handle_returns_twice_attribute): New function.
3081 (lto_attribute_table): Add returns_twice attribute.
3082
b03eda0d
RG
30832011-12-21 Richard Guenther <rguenther@suse.de>
3084
3085 * lto.c (GIMPLE_REGISTER_TYPE): New define.
3086 (LTO_FIXUP_TREE): Use it.
3087 (uniquify_nodes): Mark new non-prevailing types and avoid
3088 calling gimple_register_type on others.
3089 (lto_read_decls): Add comment.
3090
4ad9a9de
EB
30912011-12-13 Eric Botcazou <ebotcazou@adacore.com>
3092
3093 * lto.h (lto_parse_hex): Delete.
3094 * lto.c (lto_read_decls): Use 'int' for offsets.
3095 (lto_parse_hex): Make static and return proper 64-bit host type.
3096 (lto_resolution_read): Use proper 64-bit host type.
3097
ea973bad
RG
30982011-12-13 Richard Guenther <rguenther@suse.de>
3099
3100 PR lto/48354
3101 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
3102 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
3103
c8218030
UB
31042011-12-01 Uros Bizjak <ubizjak@gmail.com>
3105
3106 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
3107 (ignore_attribute): New.
3108
57ac2606
AH
31092011-11-21 Aldy Hernandez <aldyh@redhat.com>
3110
3111 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
3112 (handle_transaction_pure_attribute): New.
3113
52a35ef7
RG
31142011-11-03 Richard Guenther <rguenther@suse.de>
3115
3116 PR lto/44965
3117 * lto-lang.c (lto_post_options): Do not read file options.
3118 * lto.c (lto_read_all_file_options): Remove.
3119 (lto_init): Call lto_set_in_hooks here.
3120
51973b1e
JH
31212011-10-09 Jan Hubicka <jh@suse.cz>
3122
3123 * lto.c (node_cmp, varpool_node_cmp): New functions.
3124 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
3125 (cmp_partitions): Rename to ...
3126 (cmp_partitions_size): ... this one.
3127 (cmp_partitions_order): New function.
3128 (lto_wpa_write_files): Sort partitions by order when
3129 -fno-toplevel-reorder is used.
3130
5958009b
AK
31312011-10-09 Andi Kleen <ak@linux.intel.com>
3132
3133 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
3134
e79983f4
MM
31352011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
3136
3137 * lto-lang.c (def_builtin_1): Delete old interface with two
3138 parallel arrays to hold standard builtin declarations, and replace
3139 it with a function based interface that can support creating
3140 builtins on the fly in the future. Change all uses, and poison
3141 the old names. Make sure 0 is not a legitimate builtin index.
3142
ecdbd01a 31432011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
3144
3145 * lto-object.c (lto_obj_add_section_data): Add list.
3146 (lto_obj_add_section): Fill in list.
3147 (ltoobj_build_section_table): Pass through list.
3148 * lto.c (file_data_list): Declare.
3149 (create_subid_section_table): Pass arguments directly.
3150 Fill in list of file_datas.
3151 (lwstate): Delete.
3152 (lto_create_files_from_ids): Pass in direct arguments.
3153 Don't maintain list.
3154 (lto_file_read): Use explicit section and file data lists.
3155 (lto_read_all_file_options): Pass in section_list.
3156 * lto.h (lto_obj_build_section_table): Add list.
3157 (lto_section_slot): Add next.
3158 (lto_section_list): Declare.
3159
ed0d2da0
JH
31602011-10-02 Jan Hubicka <jh@suse.cz>
3161
3162 PR lto/47247
3163 * common.c (lto_resolution_str): Add new resolution.
3164 * common.h (lto_resolution_str): Likewise.
3165
ad7715f3
L
31662011-09-30 H.J. Lu <hongjiu.lu@intel.com>
3167 Andi Kleen <ak@linux.intel.com>
3168
3169 PR lto/50568
3170 * lto.c (lto_splay_tree_delete_id): New.
3171 (lto_splay_tree_compare_ids): Likewise.
3172 (lto_splay_tree_lookup): Likewise.
3173 (lto_splay_tree_id_equal_p): Likewise.
3174 (lto_splay_tree_insert): Likewise.
3175 (lto_splay_tree_new): Likewise.
3176 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
3177 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
3178 (create_subid_section_table): Use lto_splay_tree_lookup and
3179 lto_splay_tree_insert.
3180 (lto_file_read): Use lto_splay_tree_new.
3181
ecdbd01a 31822011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
3183
3184 * lto.c (lto_resolution_read): Remove id dumping.
3185 (lto_section_with_id): Turn id HOST_WIDE_ID.
3186 (create_subid_section_table): Dito.
3187
892a371f
DS
31882011-08-28 Dodji Seketeli <dodji@redhat.com>
3189
3190 * lto-lang.c (lto_init): Likewise. Also, avoid calling
3191 linemap_add twice.
3192
f82d1a94
MJ
31932011-08-11 Martin Jambor <mjambor@suse.cz>
3194
3195 * lto.c (uniquify_nodes): Use main variant's BINFO too.
3196
f0efc7aa
DN
31972011-08-08 Diego Novillo <dnovillo@google.com>
3198
3199 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
3200 * lto.c: Include tree-streamer.h.
3201
1a072294
RG
32022011-07-06 Richard Guenther <rguenther@suse.de>
3203
3204 * lto-lang.c (lto_init):
3205 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
3206
7496868d
JH
32072011-06-11 Jan Hubicka <jh@suse.cz>
3208
10f13f22 3209 PR lto/48246
7496868d
JH
3210 * lto.c (lto_1_to_1_map): Don't create empty partitions.
3211 (lto_balanced_map): Likewise.
3212
39e2db00
JH
32132011-06-11 Jan Hubicka <jh@suse.cz>
3214
3215 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
3216 (add_cgraph_node_to_partition) ... here; walk aliases.
3217 (lto_1_to_1_map): Remove same body alias code.
3218 (promote_fn): Likewise.
3219 (lto_promote_cross_file_statics): Update comment.
3220
28628ea6
DN
32212011-06-07 Diego Novillo <dnovillo@google.com>
3222
3223 * lto.c (uniquify_nodes): Move code to register decls to
3224 the loop that computes canonical types.
3225
009db074
RG
32262011-06-07 Richard Guenther <rguenther@suse.de>
3227
3228 * lto-lang.c (lto_init): Do not set
3229 size_type_node or call set_sizetype.
3230
47c79d56
DN
32312011-06-04 Diego Novillo <dnovillo@google.com>
3232
3233 * lto.c (lto_init): New.
3234 (lto_main): Call it.
3235
d5828cc7
DN
32362011-06-03 Diego Novillo <dnovillo@google.com>
3237
3238 * lto.c (get_resolution): Move from lto-streamer-in.c.
3239 (lto_register_var_decl_in_symtab): Likewise.
3240 (lto_register_function_decl_in_symtab): Likewise.
3241 (uniquify_nodes): Call lto_register_var_decl and
3242 lto_register_function_decl_in_symtab after reading a new
3243 VAR_DECL or FUNCTION_DECL.
3244
6807da97
RG
32452011-06-01 Richard Guenther <rguenther@suse.de>
3246
3247 * lto-lang.c (lto_register_canonical_types): New function.
3248 (lto_init): Register common nodes with the canonical type machinery.
3249 Do not play tricks with char_type_node.
3250
d74be317
RG
32512011-05-26 Richard Guenther <rguenther@suse.de>
3252
3253 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
3254
d9f8303f
NF
32552011-05-25 Nathan Froyd <froydnj@codesourcery.com>
3256
3257 * lto.c (lto_ft_typed): New function.
3258 (lto_ft_common): Call it.
3259 (lto_ft_constructor): Likewise.
3260 (lto_ft_expr): Likewise.
3261 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
3262 TREE_CHAIN.
3263
fb291a1e
RG
32642011-05-20 Richard Guenther <rguenther@suse.de>
3265
3266 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
3267 (lto_ft_type): Move main-variant and pointer-to chain building ...
3268 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
3269 in a separate final loop.
3270
31b3ca64
RG
32712011-05-19 Richard Guenther <rguenther@suse.de>
3272
3273 * lto.c (uniquify_nodes): First register all types before
3274 fixing up the tree SCC.
3275
35d828c5
JH
32762011-05-11 Jan Hubicka <jh@suse.cz>
3277
3278 PR lto/48952
3279 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
3280
51545682
NF
32812011-05-11 Nathan Froyd <froydnj@codesourcery.com>
3282
3283 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
3284 location of binfo field.
3285 (lto_fixup_prevailing_decls): Likewise.
3286
8242dd04
NF
32872011-05-10 Nathan Froyd <froydnj@codesourcery.com>
3288
3289 * lto-lang.c (def_fn_type): Don't call build_function_type, call
3290 build_function_type_array or build_varargs_function_type_array
3291 instead.
3292
c99c0026
EB
32932011-05-07 Eric Botcazou <ebotcazou@adacore.com>
3294
3295 * lto-lang.c (global_bindings_p): Return bool.
3296
c47d0034
JH
32972011-05-07 Jan Hubicka <jh@suse.cz>
3298
a9bcb3f0
EB
3299 * lto.c (lto_materialize_function): Use
3300 cgraph_function_with_gimple_body_p.
3301 (add_cgraph_node_to_partition): Do not re-add items to partition;
3302 handle thunks.
c47d0034
JH
3303 (add_varpool_node_to_partition): Do not re-add items to partition.
3304
bb3398ca
JH
33052011-05-03 Jan Hubicka <jh@suse.cz>
3306
3307 * lto.c (free_ltrans_partitions): Fix accidental commit.
3308
1cb1a99f
JH
33092011-05-03 Jan Hubicka <jh@suse.cz>
3310
3311 * lto.c (ltrans_partition_def): Remove GTY annotations.
3312 (ltrans_partitions): Move to heap.
3313 (new_partition): Update.
3314 (free_ltrans_partitions): New function.
3315 (lto_wpa_write_files): Use it.
3316
af8bca3c
MJ
33172011-04-29 Martin Jambor <mjambor@suse.cz>
3318
3319 * lto.c: Include ipa-utils.h.
3320 (lto_balanced_map): Update call to ipa_reverse_postorder.
3321 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
3322
b823cdfe
MM
33232011-04-29 Michael Matz <matz@suse.de>
3324
3325 * lto.c (toplevel): Include tree-flow.h.
3326 (lto_read_in_decl_state): Don't merge types here.
3327 (tree_with_vars): New static hash table.
3328 (remember_with_vars): New static functions.
3329 (LTO_FIXUP_TYPE): New macro.
3330 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
3331 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
3332 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
3333 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
3334 (lto_read_decls): Uniquify while reading in trees.
3335 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
3336 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
3337 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
3338 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
3339 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
3340 lto_fixup_tree): Remove.
3341 (lto_fixup_state): Remove data argument. Use
3342 lto_symtab_prevailing_decl.
3343 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
3344 (lto_fixup_prevailing_decls): New function.
3345 (lto_fixup_state_aux): Argument aux is unused.
3346 (lto_fixup_decls): Don't allocate pointer sets, don't use
3347 lto_fixup_tree, use lto_fixup_prevailing_decls.
3348 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
3349 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
3350
b9843260
EB
33512011-04-16 Eric Botcazou <ebotcazou@adacore.com>
3352
3353 * lto.c (lto_balanced_map): Fix typos in head comment.
3354 (lto_promote_cross_file_statics): Fix long lines and remove redundant
3355 test.
3356
e7f23018
JH
33572011-04-16 Jan Hubicka <jh@suse.cz>
3358
3359 * lto.c (lto_balanced_map): Update.
3360
10a5dd5d
JH
33612011-04-14 Jan Hubicka <jh@suse.cz>
3362
3363 * lto.c: Include ipa-inline.h
b9843260
EB
3364 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
3365 accessor.
10a5dd5d
JH
3366 (ipa_node_duplication_hook): Fix declaration.
3367 * Make-lang.in (lto.o): Update dependencies.
3368
81f653d6
NF
33692011-04-12 Nathan Froyd <froydnj@codesourcery.com>
3370
3371 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
3372 calling TREE_CHAIN.
3373 * lto.c (lto_fixup_common): Likewise.
3374
dcf0c47e
NF
33752011-04-08 Nathan Froyd <froydnj@codesourcery.com>
3376
3377 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
3378 (handle_type_generic_attribute): Likewise.
3379
e89964e3
MM
33802011-04-03 Michael Matz <matz@suse.de>
3381
3382 * lto.c (lto_materialize_function): Don't read and then discard
3383 sections in WPA mode.
3384 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
3385
3386 * lto-lang.c (registered_builtin_fndecls): Remove.
3387 (lto_getdecls): Return NULL_TREE.
3388 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
3389
d2b3fe18
RG
33902011-03-31 Richard Guenther <rguenther@suse.de>
3391
3392 PR lto/48246
3393 * lto.c (lto_wpa_write_files): Disable assert for non-empty
3394 partitions when checking is not enabled.
3395
ba78087b
KT
33962011-03-25 Kai Tietz <ktietz@redhat.com>
3397
3398 * lto.c (lto_resolution_read): Use filename_cmp instead
3399 of strcmp.
3400 (lto_read_section_data): Likewise.
3401
0edf1bb2
JL
34022011-03-25 Jeff Law <law@redhat.com>
3403
ab20d992 3404 * lto-lang.c (def_fn_type): Add missing va_end.
0edf1bb2 3405
62d784f7
KT
34062011-03-21 Kai Tietz <ktietz@redhat.com>
3407
3408 PR target/12171
3409 * lto-lang.c (lto_attribute_table): Adjust table.
3410
62dd9571
JJ
34112011-02-18 Jakub Jelinek <jakub@redhat.com>
3412
3413 PR bootstrap/47807
3414 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
3415 of lto-streamer.h.
3416
237d6259
RG
34172011-02-18 Richard Guenther <rguenther@suse.de>
3418
3419 PR lto/47798
3420 * lto-tree.h (lto_global_var_decls): Do not declare here.
3421 * lto-lang.c: Include lto-streamer.h.
3422 * Make-lang.in (lto-lang.o): Adjust dependencies.
3423
8ead2223
KT
34242011-02-10 Kai Tietz <kai.tietz@onevision.com>
3425
3426 PR lto/47241
3427 * lto.c (lto_read_section_data): Free
3428 fd_name in failure case.
3429 For mingw targets don't hash file-descriptor.
3430 (read_cgraph_and_symbols): Close current_lto_file
3431 in failure case.
3432
6e701822
JH
34332011-01-11 Jan Hubicka <jh@suse.cz>
3434
3435 PR lto/45721
3436 PR lto/45375
b9843260
EB
3437 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
3438 are not partitioned.
6e701822 3439
f4da8dce
NF
34402010-12-22 Nathan Froyd <froydnj@codesourcery.com>
3441
3442 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
3443 Use prototype_p.
3444
6b7fb143
RG
34452010-12-06 Richard Guenther <rguenther@suse.de>
3446
3447 PR lto/46796
3448 * lto-lang.c (lto_init): Give names to basic types.
3449
c59ffc41
JM
34502010-11-30 Joseph Myers <joseph@codesourcery.com>
3451
3452 * lto-object.c: Don't include toplev.h.
3453 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
3454
7c475d11
JM
34552010-11-30 Joseph Myers <joseph@codesourcery.com>
3456
3457 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
3458 $(TOPLEV_H).
3459
71f3e391
JM
34602010-11-29 Joseph Myers <joseph@codesourcery.com>
3461
3462 * lto-endian.h: Delete.
3463 * lto-object.c: Don't include "libiberty.h".
3464 (O_BINARY): Don't define.
3465 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
3466 (O_BINARY): Don't define.
3467
9f1718b0
RG
34682010-11-23 Richard Guenther <rguenther@suse.de>
3469
3470 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
3471
39c4e298
RG
34722010-11-23 Richard Guenther <rguenther@suse.de>
3473
3474 PR lto/46605
3475 * lto.c (read_cgraph_and_symbols): Bail out after errors.
3476
b37421c6
JM
34772010-11-17 Joseph Myers <joseph@codesourcery.com>
3478
3479 * lto.c (lto_main): Take no arguments.
3480 * lto.h (lto_main): Update prototype.
3481
d82f74d3
ILT
34822010-11-16 Ian Lance Taylor <iant@google.com>
3483
3484 * lto-object.c (lto_obj_file_open): Call
3485 simple_object_attributes_merge rather than
3486 simple_object_attributes_compare.
3487
a4d8c676
JM
34882010-11-12 Joseph Myers <joseph@codesourcery.com>
3489
3490 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
3491 * lto-lang.c (lto_handle_option): Take location_t parameter.
3492
d8a07487
JM
34932010-11-10 Joseph Myers <joseph@codesourcery.com>
3494
3495 * lto.c (lto_resolution_read): Start diagnostics with lowercase
3496 letters and remove trailing '.'.
3497 (lto_file_finalize): Start diagnostic with a lowercase letter.
3498
6b3456d1
ILT
34992010-11-02 Ian Lance Taylor <iant@google.com>
3500
3501 * lto-object.c: New file.
3502 * lto-elf.c: Remove file.
3503 * lto-macho.c: Remove file.
3504 * lto-macho.h: Remove file.
3505 * lto-coff.c: Remove file.
3506 * lto-coff.h: Remove file.
3507 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
3508 lto/lto-object.o.
3509 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
3510 (lto/lto-objfile.o): New target.
3511 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
3512 (lto/lto.o): Remove $(LIBIBERTY_H).
3513
030cd86c
JH
35142010-10-22 Jan Hubicka <jh@suse.cz>
3515
3516 * lto.c (add_cgraph_node_to_partition,
3517 add_varpool_node_to_partition): Add debug info.
3518 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
3519 partitioned nodes.
3520 (do_whole_program_analysis): Set function flags before dumping.
3521
4490cae6
RG
35222010-10-22 Richard Guenther <rguenther@suse.de>
3523
3524 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
3525 the new gimple_register_canonical_type.
3526
703cdce3
L
35272010-10-20 H.J. Lu <hongjiu.lu@intel.com>
3528
3529 PR bootstrap/45954
3530 * config-lang.in (boot_language): Set to $enable_lto.
3531
1915c739
JJ
35322010-10-18 Jakub Jelinek <jakub@redhat.com>
3533
3534 PR lto/45638
3535 * Make-lang.in (check-lto): New dummy target.
3536
82971de5
EB
35372010-10-14 Eric Botcazou <ebotcazou@adacore.com>
3538
3539 * lto-elf.c (SHN_XINDEX): Define if not already defined.
3540
a75bfaa6
JM
35412010-10-08 Joseph Myers <joseph@codesourcery.com>
3542
3543 * lto-lang.c (lto_init_options): Change to
3544 lto_init_options_struct. Update parameters.
3545 (LANG_HOOKS_INIT_OPTIONS): Don't define.
3546 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
3547
937f7f69
JH
35482010-10-06 Jan Hubicka <jh@suse.cz>
3549
3550 * lto.c (lto_balanced_map): Fix accounting of program size.
3551
2169830c
JH
35522010-10-06 Jan Hubicka <jh@suse.cz>
3553
3554 * lto.c (lto_balanced_map): Do not produce empty partitions.
3555
ecdbd01a 35562010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
3557
3558 * lto.c (lto_process_name): Add.
3559 (lto_main): Call lto_process_name.
3560
06ed016f
JH
35612010-10-06 Jan Hubicka <jh@suse.cz>
3562
3563 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
3564 COMDATs required by the linker.
3565
ae718d66
ILT
35662010-10-05 Ian Lance Taylor <iant@google.com>
3567
3568 * lto.c (lto_section_with_id): Make s a const pointer.
3569
852e4bd2
JH
35702010-10-05 Jan Hubicka <jh@suse.cz>
3571
ab20d992 3572 * lto.c: Include params.h.
852e4bd2
JH
3573 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
3574 refcounting in aux field.
3575 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
3576 New functions.
3577 (lto_1_to_1_map): Simplify.
3578 (lto_balanced_map): New function.
3579 (do_whole_program_analysis): Chose proper partitioning alg.
3580 * Make-lang.in (lto.o): Add dependency on params.h
3581
ecdbd01a 35822010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
3583
3584 * Make-lang.in (lto1): Add + to build rule.
3585
ecdbd01a 35862010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
3587
3588 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
3d3b561f 3589 with fatal_error.
f1e92a43 3590
0d6e14fd
JH
35912010-09-28 Jan Hubicka <jh@suse.cz>
3592
3593 * lto-lang.c (handle_leaf_attribute): New function.
3594 (lto_attribute_tables): Add leaf.
3595
fb462383
JZ
35962010-09-25 Jie Zhang <jie@codesourcery.com>
3597
3598 * lto.c (lto_read_all_file_options): Start a new line after
3599 printing out file names.
3600
051f8cc6
JH
36012010-09-24 Jan Hubicka <jh@suse.cz>
3602
3603 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3604
64e0f5ff
JH
36052010-09-20 Jan Hubicka <jh@suse.cz>
3606
3607 PR tree-optimize/45605
3608 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
3609
a929ec3d
GP
36102010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
3611
3612 * lto-elf.c (lto_obj_file_open): Also provide filename when
3613 elf_begin fails.
3614
4c588abf
JH
36152010-09-17 Jan Hubicka <jh@suse.cz>
3616
3617 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
3618
c3224d6f
RG
36192010-09-17 Richard Guenther <rguenther@suse.de>
3620
3621 * lang.opt (flag_wpa): Also enable for the driver.
3622
52b3b3c7
JH
36232010-09-16 Jan Hubicka <jh@suse.cz>
3624
3625 * lto.c (lto_materialize_function): Do not tamper with STATIC and
ab20d992 3626 EXTERNAL flags.
52b3b3c7 3627
969c37b7
LB
36282010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3629
3630 * lto-tree.h (struct lang_type): Add variable_size GTY option.
3631
098a4f50
JH
36322010-09-08 Jan Hubicka <jh@suse.cz>
3633
3634 * lto.c (real_file_count, real_file_decl_data): New static vars.
3635 (read_cgraph_and_symbols): Use it.
3636
0f443ad0
RG
36372010-09-08 Richard Guenther <rguenther@suse.de>
3638
3639 * lto.c (read_cgraph_and_symbols): Collect again after each
3640 file.
3641
ee187353
JH
36422010-09-07 Jan Hubicka <jh@suse.cz>
3643
3644 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
3645
b3ec52d0
RG
36462010-09-03 Richard Guenther <rguenther@suse.de>
3647
3648 * lto-elf.c (validate_file): Always error if validation fails.
3649
f1395d4a
JH
36502010-08-20 Jan Hubicka <jh@suse.cz>
3651
3652 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
3653 (lto_wpa_write_files): Update comments.
3654
2429bce3
L
36552010-08-20 H.J. Lu <hongjiu.lu@intel.com>
3656
3657 PR bootstrap/45357
3658 * lto.c (lto_materialize_function): Replace has_analyzed_clone
3659 with has_analyzed_clone_p.
3660
e0f967db
JH
36612010-08-20 Jan Hubicka <jh@suse.cz>
3662
3663 * lto.c (has_analyzed_clone_p): New function
3664 (lto_materialize_function): Use callgraph to determine if
3665 body is needed.
3666 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
3667
ac47786e
NF
36682010-08-20 Nathan Froyd <froydnj@codesourcery.com>
3669
3670 * lto.c: Use FOR_EACH_VEC_ELT.
3671
ecdbd01a 36722010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
3673
3674 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3675
5f20c657
JM
36762010-07-27 Joseph Myers <joseph@codesourcery.com>
3677
3678 * lto-lang.c (lto_handle_option): Update prototype and return
3679 value type. Remove duplicate assignment to result.
3680
7a9bf9a4
JM
36812010-07-27 Joseph Myers <joseph@codesourcery.com>
3682
3683 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3684 New.
3685 (lto_init_options): Update prototype.
3686 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3687 Define.
3688
ecdbd01a 36892010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
3690
3691 PR lto/44992
92a285c1 3692 * lto.c: Include splay-tree.h
73ce4d1e
AK
3693 (lto_resolution_read): Change to walk file_ids tree and parse
3694 extra file_id in resolution file.
3695 (lto_section_with_id): Add.
3696 (create_subid_section_table): Add.
3697 (lwstate): Add.
3698 (lto_create_files_from_ids): Add.
3699 (lto_file_read): Change to handle sub file ids and create list
3700 of file_datas. Add output argument for count.
3701 (get_section_data): Pass file_data to lto_get_section_name.
3702 (lto_flatten_file): Add.
3703 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3704
ecdbd01a 37052010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
3706
3707 * lto-coff.c (hash_name, eq_name): Move.
3708 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3709 * lto-elf.c: (hash_name, eq_name): Move.
3710 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3711 * lto-macho.c: (hash_name, eq_name): Move.
3712 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3713 * lto.c: (hash_name, eq_name): Move from lto-*.c
3714 (lto_obj_create_section_hash_table): Add.
3715 (free_with_string): Add.
3716
718f9c0f
MLI
37172010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3718
3719 * lto-coff.c: Include diagnostic-core.h in every file that
3720 includes toplev.h.
3721 * lto-elf.c: Likewise.
3722 * lto-lang.c: Likewise.
3723 * lto-macho.c: Likewise.
3724
1b137837
JJ
37252010-07-07 Jakub Jelinek <jakub@redhat.com>
3726
3727 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3728 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3729 objects.
3730
92eb4438
JH
37312010-07-05 Jan Hubicka <jh@suse.cz>
3732
3733 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3734 nodes from same comdat group as well as all comdat functions referenced
3735 here.
b9843260
EB
3736 (add_varpool_node_to_partition, add_references_to_partition): New
3737 function.
3738 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3739 add_varpool_node_to_partition; clear aux flags when done.
3740 (lto_promote_cross_file_statics): Do not promote stuff that gets
3741 duplicated to each ltrans.
92eb4438 3742
a05541a9
JH
37432010-07-04 Jan Hubicka <jh@suse.cz>
3744
92a285c1 3745 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 3746
4a2ac96f
RG
37472010-06-13 Richard Guenther <rguenther@suse.de>
3748
3749 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3750
1d536046
KT
37512010-06-09 Kai Tietz <kai.tietz@onevision.com>
3752
ab20d992 3753 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1d536046
KT
3754 * lto-coff.c (coff_write_object_file): Add braces to if.
3755
a9429e29
LB
37562010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3757
3758 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3759 (lto_file_read): Likewise.
3760 (new_partition): Likewise.
3761 (read_cgraph_and_symbols): Likewise.
3762
5498f011
JM
37632010-06-07 Joseph Myers <joseph@codesourcery.com>
3764
3765 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3766 (lto_handle_option): Don't set flag_signed_char here.
3767
d4c0c9f6
RG
37682010-06-04 Richard Guenther <rguenther@suse.de>
3769
3770 PR lto/41584
3771 * lto.c (lto_1_to_1_map): Use the proper file_data for
3772 varpool nodes.
3773
0a5fa5a1
JH
37742010-05-30 Jan Hubicka <jh@suse.cz>
3775
3776 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3777 partitioning decisions.
3778
9eec9488
JH
37792010-05-29 Jan Hubicka <jh@suse.cz>
3780
3781 * lto.c (bitmap vector): Remove.
3782 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3783 (ltrans_partition_def): New structure.
3784 (ltrans_partition): New type and VECtor.
3785 (new_partition): New function.
3786 (add_cgraph_node_to_partition): New function.
3787 (lto_1_to_1_map): Reorganize for partitions.
3788 (lto_add_inline_clones): Remove.
3789 (lto_add_all_inlinees): Remove.
3790 (lto_promote_cross_file_statics): Use partitions.
3791 (cmp_partitions): New function.
3792 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3793 use partitions; output files sorted by size.
3794
3e097227
SB
37952010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3796
3797 * Make-lang.in: Replace vec.h dependency with VEC_H.
3798
7ca92787
JM
37992010-05-28 Joseph Myers <joseph@codesourcery.com>
3800
3801 * lto-coff.c (coff_errmsg): Remove.
3802 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3803 errors instead of coff_errmsg (-1).
3804 * lto-macho.c (mach_o_errmsg): Remove.
3805 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3806 instead of mach_o_errmsg (-1).
3807 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3808 xstrerror (errno).
3809
b5611987
RG
38102010-05-28 Richard Guenther <rguenther@suse.de>
3811
3812 * lto.c (prefix_name_with_star): Removed.
3813 (strip_extension): Likewise.
3814 (get_filename_for_set): Likewise.
3815 (lto_write_ltrans_list): Fold into ...
3816 (lto_wpa_write_files): ... this. Name LTRANS units
3817 by suffixing the ltrans output list filename.
3818 (do_whole_program_analysis): Adjust.
3819
1da2ed5f
JM
38202010-05-27 Joseph Myers <joseph@codesourcery.com>
3821
3822 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3823 (read_cgraph_and_symbols, lto_main): Use seen_error.
3824 * Make-lang.in (lto/lto.o): Update dependencies.
3825
7951d88a
EB
38262010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3827
3828 PR lto/44230
3829 * lto.h (lto_eh_personality): New prototype.
3830 * lto.c: Include debug.h.
3831 (first_personality_decl): New static variable.
3832 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3833 first function for which it is non-null.
3834 (lto_eh_personality_decl): New static variable.
3835 (lto_eh_personality): New function.
3836 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3837 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3838
e12da9c2
SB
38392010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3840
3841 * lto-lang.c: Do not include expr.h.
3842
468194f4
RG
38432010-05-24 Richard Guenther <rguenther@suse.de>
3844
3845 * lto-elf.c (lto_obj_build_section_table): Work around
3846 FreeBSD libelf issue.
3847
bd9eb5da
RG
38482010-05-22 Richard Guenther <rguenther@suse.de>
3849
3850 * lto.c (read_cgraph_and_symbols): Do not collect.
3851
66576e1b
JH
38522010-05-20 Jan Hubicka <jh@suse.cz>
3853
3854 * lto.c (promote_var, promote_fn): New functions.
3855 (lto_promote_cross_file_statics): Compute correctly boundary including
3856 static initializers of readonly vars.
3857
36576655
JH
38582010-05-18 Jan Hubicka <jh@suse.cz>
3859
66576e1b 3860 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3861 (lto_promote_cross_file_statics): Deal with non-inline clones.
3862
28632d63
JH
38632010-05-18 Jan Hubicka <jh@suse.cz>
3864
3865 * lto.c (lto_materialize_function): Announce function when
3866 reading body; allocate_struct_function only when reading body;
3867 do not finalize local statics; ggc_collect after reading;
3868 do not mark reachable node.
3869 (materialize_cgraph): Do not announce function.
3870
33e42d56
JH
38712010-05-11 Jan Hubicka <jh@suse.cz>
3872
3873 * lto.c (materialize_cgraph): Revert my previous patch.
3874
f6430ea5
KT
38752010-05-11 Kai Tietz <kai.tietz@onevision.com>
3876
3877 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3878 IMAGE_FILE_MACHINE_AMD64.
3879 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3880
0a0b07b7
JH
38812010-05-11 Jan Hubicka <jh@suse.cz>
3882
3883 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3884 (materialize_cgraph): Add it here.
3885
9a809897
JH
38862010-05-11 Jan Hubicka <jh@suse.cz>
3887
3888 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3889 vector.
3890
38912010-05-11 Jan Hubicka <jh@suse.cz>
3892
3893 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3894 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3895 use reachable_from_other_partition_p and
3896 referenced_from_other_partition_p test.
3897
94f64249
KT
38982010-05-11 Kai Tietz <kai.tietz@onevision.com>
3899
3900 * lto-coff.c (validate_file): Add x64-coff support.
3901 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3902 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3903 * lto-lang.c (lto_build_c_type_nodes): Add check for
3904 'long long unsigned int' for x64-windows.
3905 (lto_init): Likewise.
3906
c082f9f3
SB
39072010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3908
3909 * lto.h (struct lto_file_struct): Document offset member.
3910 * lto-endian.h: New file.
3911 * lto-macho.h: New file.
3912 * lto-macho.c: New file.
3913 * Make-lang.in: Add rule for lto-macho.o.
3914
3f8257db 39152010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3916
3917 PR lto/43857
3918 PR lto/43371
3919 * lang.opt (fresolution): Change to ...
3920 (fresolution=): ... this.
3921 * lto-lang.c (lto_handle_option): Adjust.
3922
48cf395b
RB
39232010-05-07 Richard Guenther <rguenther@suse.de>
3924
3925 * lto.c (DUMPBASE_SUFFIX): Remove.
3926 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3927 Rename to ...
3928 (lto_write_ltrans_list): ... only output the list of ltrans files.
3929 (lto_maybe_unlink): Remove.
3930 (do_whole_program_analysis): Do not execute LTRANS phase
3931 from here.
3932
afa83c15
L
39332010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3934
3935 * lto-lang.c (lto_handle_option): Add argument kind.
3936
369451ec
JH
39372010-05-05 Jan Hubicka <jh@suse.cz>
3938
48cf395b
RB
3939 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3940 refs.
369451ec 3941
2f41ecf5
JH
39422010-05-05 Jan Hubicka <jh@suse.cz>
3943
3944 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3945
ace72c88
JH
39462010-04-30 Jan Hubicka <jh@suse.cz>
3947
b9843260
EB
3948 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3949 use default name.
ace72c88
JH
3950 (lto_wpa_write_files): Write any non-empty partition.
3951
05575e07
JH
39522010-04-30 Jan Hubicka <jh@suse.cz>
3953
3954 * lto.c: Do not attempt to make constant pool references global.
3955
49ba8180
JH
39562010-04-28 Jan Hubicka <jh@suse.cz>
3957
ab20d992 3958 * lto.c (lto_read_in_decl_state): Use GGC.
49ba8180
JH
3959 (lto_wpa_write_files): Announce what we are writting.
3960 (all_file_decl_data): New.
3961 (read_cgraph_and_symbols): Use GGC; correct timevars.
3962 (do_whole_program_analysis): Collect.
ab20d992 3963 * Make-lang.in (lto.o): Fix dependency.
49ba8180
JH
3964 * Makefile.in (GTFILES): Add lto-streamer.h.
3965 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3966 (varpool_assemble_pending_decls): Use VAROUT.
3967 * lto-streamer.h (lto_tree_ref_table): Annotate.
3968 (lto_in_decl_state): Annotate.
3969 (lto_file_decl_data): Annotate.
3970
2942c502
JH
39712010-04-28 Jan Hubicka <jh@suse.cz>
3972
3973 * lto.c (lto_varpool_node_sets): New.
3974 (lto_1_to_1_map): Partition varpool too.
3975 (globalize_context_t, globalize_cross_file_statics,
3976 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3977 lto_scan_statics_in_remaining_global_vars): Remove.
3978 (lto_promote_cross_file_statics): Rewrite.
3979 (get_filename_for_set): Take vset argument.
3980 (lto_wpa_write_files): Pass around vsets.
3981
3bec79c5
DK
39822010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3983
3984 PR lto/42776
3985 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3986 hardcoding 'lto-elf.o'.
3987 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3988
3989 * lto-coff.h: New file.
3990 * lto-coff.c: Likewise.
3991
21aac880
RG
39922010-04-26 Richard Guenther <rguenther@suse.de>
3993
3994 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3995
2cee0101
DK
39962010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3997
3998 * lto.h (lto_elf_file_open): Rename prototype from this ...
3999 (lto_obj_file_open): ... to this.
4000 (lto_elf_file_close): Likewise ...
4001 (lto_obj_file_close): ... and likewise.
4002 (lto_elf_build_section_table): Likewise ...
4003 (lto_obj_build_section_table): ... and likewise.
4004 (lto_elf_begin_section): Likewise ...
4005 (lto_obj_begin_section): ... and likewise.
4006 (lto_elf_append_data): Likewise ...
4007 (lto_obj_append_data): ... and likewise.
4008 (lto_elf_end_section): Likewise ...
4009 (lto_obj_end_section): ... and likewise.
4010 * lto.c (lto_file_read): Update references to the above.
4011 (lto_wpa_write_files): Likewise.
4012 (lto_read_all_file_options): Likewise.
4013 (read_cgraph_and_symbols): Likewise.
4014 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
4015 (LANG_HOOKS_APPEND_DATA): Likewise.
4016 (LANG_HOOKS_END_SECTION): Likewise.
4017 * lto-elf.c (lto_elf_file_open): Rename from this ...
4018 (lto_obj_file_open): ... to this, updating any references.
4019 (lto_elf_file_close): Likewise ...
4020 (lto_obj_file_close): ... and likewise.
4021 (lto_elf_build_section_table): Likewise ...
4022 (lto_obj_build_section_table): ... and likewise.
4023 (lto_elf_begin_section): Likewise ...
4024 (lto_obj_begin_section): ... and likewise.
4025 (lto_elf_append_data): Likewise ...
4026 (lto_obj_append_data): ... and likewise.
4027 (lto_elf_end_section): Likewise ...
4028 (lto_obj_end_section): ... and likewise.
4029
bc58d7e1
JH
40302010-04-21 Jan Hubicka <jh@suse.cz>
4031
4032 * lto.c (lto_fixup_tree): Do not call wpa fixup.
4033 (materialize_cgraph): Likewise.
4034
e792884f
JH
40352010-04-21 Jan Hubicka <jh@suse.cz>
4036
4037 * lto.c (lto_wpa_write_files): Update.
4038 (read_cgraph_and_symbols): Be more verbose.
4039 (materialize_cgraph): Likewise.
4040 (do_whole_program_analysis): Likewise.
4041
c9945504
JH
40422010-04-21 Jan Hubicka <jh@suse.cz>
4043
4044 * lto.c (globalize_cross_file_statics): When function has address taken,
4045 it needs to be public.
4046
a837268b
JH
40472010-04-20 Jan Hubicka <jh@suse.cz>
4048
4049 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
4050 (lto_add_all_inlinees): Likewise.
4051 (lto_wpa_write_files): Likewise.
4052
3b9e5d95
EB
40532010-04-18 Eric Botcazou <ebotcazou@adacore.com>
4054
4055 * lto-lang.c (lto_init): Remove second argument in call to
4056 build_common_tree_nodes.
4057
8ccb78f2
RO
40582010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4059
4060 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
4061 function.
4062
2f9b99e6
EB
40632010-03-09 Eric Botcazou <ebotcazou@adacore.com>
4064
4065 PR bootstrap/43276
4066 * lto-elf.c: Define EM_* constants if not already defined.
4067
bef7d288
EB
40682010-03-03 Eric Botcazou <ebotcazou@adacore.com>
4069
4070 * lto-elf.c (is_compatible_architecture): New static function.
4071 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
4072
f68df07c
RG
40732010-02-11 Richard Guenther <rguenther@suse.de>
4074
4075 PR driver/43021
4076 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
4077 appropriately.
4078
3cdea2b4
AH
40792010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
4080
4081 * lto.c (O_BINARY): Define.
4082 (lto_read_section_data): Open file in binary mode.
4083 * lto-elf.c (O_BINARY): Define.
ab20d992 4084 (lto_elf_file_open): Open file in binary mode.
3cdea2b4 4085
c59449fa
RG
40862010-01-08 Richard Guenther <rguenther@suse.de>
4087
4088 PR lto/42528
4089 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
4090 (lto_init): Do not init char_type_node in a standard way
4091 but according to flag_signed_char.
4092
d7fb0a6d
L
40932010-01-03 H.J. Lu <hongjiu.lu@intel.com>
4094
4095 PR lto/41564
4096 * lto.c (DUMPBASE_SUFFIX): New.
4097 (lto_execute_ltrans): Append a sequence number to -dumpbase
4098 for LTRANS.
4099
78ce4053
L
41002010-01-02 H.J. Lu <hongjiu.lu@intel.com>
4101
4102 PR lto/42580
4103 * lto-elf.c (lto_elf_file_open): Stop if the command line
4104 option file is missing.
4105
2a71eb48
RG
41062009-12-15 Richard Guenther <rguenther@suse.de>
4107
4108 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
4109 (lto_post_options): Do not disable debuginfo.
4110
a818bca1
DG
41112009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
4112
4113 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
4114
e7d00517
RG
41152009-12-11 Richard Guenther <rguenther@suse.de>
4116
4117 PR lto/42037
4118 * lto.c (lto_resolution_read): Properly grow the vector.
4119
1ab53893
RG
41202009-12-11 Richard Guenther <rguenther@suse.de>
4121
4122 PR lto/41915
4123 * lto-lang.c (lto_init_options): Initialize flag_complex_method
4124 to the C99 default. Do not set flag_unit_at_a_time.
4125
0f900dfa
JJ
41262009-11-28 Jakub Jelinek <jakub@redhat.com>
4127
4128 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
4129 variable.
4130
92fa7608
RAE
41312009-11-19 Rafael Avila de Espindola <espindola@google.com>
4132
4133 PR bootstrap/42096
4134 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
4135 * lto.c (lto_parse_hex): New.
4136 (lto_resolution_read): Use lto_parse_hex.
4137 * lto.h (lto_parse_hex): New.
4138
9870fe4f
RAE
41392009-11-17 Rafael Avila de Espindola <espindola@google.com>
4140
4141 * lto-elf.c (lto_file_init): Add offset argument.
4142 (lto_elf_file_open): Record the offset.
4143 * lto.c (lto_resolution_read): Change file_name into a lto_file
4144 argument. Check offsets.
4145 (lto_file_read): Update call to lto_resolution_read.
4146 * lto.h (lto_file_struct): Add the offset field.
4147
1b70729f
RAE
41482009-11-16 Rafael Avila de Espindola <espindola@google.com>
4149
4150 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
4151
0e3776db
JH
41522009-11-14 Jan Hubicka <jh@suse.cz>
4153
4154 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
4155
06bd7f56
RAE
41562009-11-12 Rafael Avila de Espindola <espindola@google.com>
4157
4158 * lang.opt (fresolution): Renamed from resolution.
4159 * lto-lang.c (lto_handle_option): Handle new option name.
4160 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
4161
7e9dc421 41622009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 4163 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
4164
4165 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
4166 (lto_elf_file_open): Handle offsets in arguments name@offest.
4167
b207f900
RG
41682009-10-30 Richard Guenther <rguenther@suse.de>
4169
4170 PR lto/41858
4171 * lto.c (lto_file_read): Do not set file_data->fd.
4172 (lto_read_section_data): Use a single-entry file-descriptor cache.
4173 Do not check the result of xmalloc.
4174 (free_section_data): Do not use file_data->fd.
4175 (lto_read_all_file_options): Likewise.
4176
2c928155
RG
41772009-10-22 Richard Guenther <rguenther@suse.de>
4178
4179 * lto.c (lto_fixup_jump_functions): Remove.
4180 (lto_fixup_decls): Do not fixup jump functions.
4181 (read_cgraph_and_symbols): Schedule cgraph merging after
4182 summary reading. Schedule type and decl fixup before
4183 summary reading.
4184
f9c91f8a
RB
41852009-10-22 Richard Guenther <rguenther@suse.de>
4186
4187 * lto.c (lto_fixup_data_t): Remove free_list member.
4188 (lto_fixup_tree): Do not insert into free_list.
4189 (free_decl): Remove.
4190 (lto_fixup_decls): Remove free-list handling.
4191
fb3f88cc
JH
41922009-10-22 Jan Hubicka <jh@suse.cz>
4193
4194 * lto.c (lto_fixup_jump_functions): New function.
4195 (lto_fixup_decls): Use it.
4196
35f1e9f4
RG
41972009-10-16 Richard Guenther <rguenther@suse.de>
4198
4199 PR lto/41715
4200 * lto.c (lto_fixup_tree): Revert last change.
4201
200c8750
RG
42022009-10-14 Richard Guenther <rguenther@suse.de>
4203
4204 * lto.c (lto_fixup_tree): In case the prevailing decl is not
4205 compatible with the one we replace wrap it around a
4206 VIEW_CONVERT_EXPR.
4207
b1b07c92
RG
42082009-10-09 Richard Guenther <rguenther@suse.de>
4209
4210 PR lto/41635
4211 PR lto/41636
4212 * lto.c (read_cgraph_and_symbols): Do not assert we can open
4213 a file.
4214 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
4215 (init_ehdr##BITS): Likewise.
4216
3c2e7d45
JM
42172009-10-08 Joseph Myers <joseph@codesourcery.com>
4218
4219 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
4220 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
4221 diagnostics.
4222 * lto-lang.c (lto_post_options): Remove trailing "." from
4223 diagnostics.
4224
0d0bfe17
RG
42252009-10-08 Richard Guenther <rguenther@suse.de>
4226
4227 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
4228 hash tables.
4229
4bedf19a
JM
42302009-10-07 Joseph Myers <joseph@codesourcery.com>
4231
4232 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
4233
b20996ff
JH
42342009-10-07 Jan Hubicka <jh@suse.cz>
4235
4236 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
4237 ltrans stage; explain why this is needed and should not.
4238
1a735925
RG
42392009-10-05 Richard Guenther <rguenther@suse.de>
4240
4241 PR lto/41552
4242 PR lto/41487
4243 * lto.c (lto_read_decls): Do not register deferred decls.
4244 (read_cgraph_and_symbols): Delay symbol and cgraph merging
4245 until after reading the IPA summaries.
4246
d7f09764
DN
42472009-10-02 Rafael Avila de Espindola <espindola@google.com>
4248
4249 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
4250 (lto-lang.c): Don't include lto/common.h.
4251
42522009-10-02 Rafael Avila de Espindola <espindola@google.com>
4253
4254 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
4255 (lto/common.o): Remove.
4256 * common.c: Remove.
4257 * common.h (lto_kind_str): Remove.
4258 (lto_visibility_str): Remove.
4259 (lto_resolution_str): Make it static.
4260
42612009-10-01 Diego Novillo <dnovillo@google.com>
4262
4263 * lto.c (lto_read_decls): Add comment.
4264 Call internal_error instead of gcc_assert.
4265 (lto_resolution_read): Likewise.
4266 (lto_add_all_inlinees): Tidy.
4267 * Make-lang.in: Fix copyright boilerplate.
4268 (lto.pdf): New.
4269 (lto.install-pdf): New.
4270 * lto-tree.h: Fix copyright boilerplate.
4271 * lang-specs.h: Likewise.
4272 Remove ".lto" entry from compilers fragment.
4273 * lto-elf.c: Move inclusion of gelf.h after config.h.
4274 Tidy formatting everywhere.
4275 * lto.h: Fix copyright boilerplate.
4276 Tidy formatting everywhere.
4277 * common.c: Likewise.
4278 * config-lang.in: Likewise.
4279 * common.h: Likewise.
4280 * lto-lang.c: Likewise.
4281
42822009-10-01 Richard Guenther <rguenther@suse.de>
4283
4284 * lto.c (lto_read_section_data): Use plain lseek/read.
4285
42862009-10-01 Richard Guenther <rguenther@suse.de>
4287
4288 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
4289 use sysconf to query the system page size.
4290 (lto_file_read): Implement fallback using stdio.
4291 (free_section_data): Likewise.
4292
42932009-09-29 Diego Novillo <dnovillo@google.com>
4294
4295 * lto-lang.c (lto_init): Really fix call to
4296 build_common_builtin_nodes.
4297
42982009-09-29 Diego Novillo <dnovillo@google.com>
4299
4300 * lto-lang.c (lto_init): Fix call to
4301 build_common_builtin_nodes.
4302
43032009-09-29 Richard Guenther <rguenther@suse.de>
4304
4305 PR lto/40754
4306 * lto-elf.c (init_shdr##BITS): Properly specify alignment
4307 in bytes.
4308 (first_data_block): New static variable.
4309 (lto_elf_append_data): Align the first data block in each
4310 section.
4311
43122009-09-28 Diego Novillo <dnovillo@google.com>
4313
4314 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
4315 * lto.c (strip_extension): New.
4316 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
4317 (lto_execute_ltrans): Tidy.
4318 Do not pass -fwpa nor -fltrans-* to LTRANS.
4319 * opts.c: Tidy formatting and remove stale FIXME lto markers.
4320 * tree.c (need_assembler_name_p): Call
4321 lang_hooks.decls.may_need_assembler_name_p if set.
4322 * varasm.c (default_binds_local_p_1): Remove check for
4323 flag_ltrans.
4324 * varpool.c (decide_is_variable_needed): Do not test for
4325 in_lto_p.
4326
43272009-09-22 Richard Guenther <rguenther@suse.de>
4328
4329 PR lto/39276
4330 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
4331 * Make-lang.in: Remove ltrans-driver stuff.
4332 * config-lang.in: Likewise.
4333 * lang.opt (fltrans-driver): Remove.
4334 * lto-lang.c (lto_init_options): Remove code initializing
4335 ltrans_driver.
4336 * ltrans-driver: Remove.
4337
43382009-09-21 Diego Novillo <dnovillo@google.com>
4339
4340 * lto-lang.c (lto_define_builtins): Remove superfluous
4341 calls to targetm.init_builtins and build_common_builtin_nodes.
4342 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
4343 build_common_builtin_nodes.
4344 * lto.c (lto_materialize_function): Do nothing if NODE is a
4345 clone.
4346
43472009-09-03 Diego Novillo <dnovillo@google.com>
4348
4349 * lto-elf.c (validate_file): Replace call to
4350 elf_getshstrndx with call to elf_getshdrstrndx.
4351
43522009-08-19 Richard Guenther <rguenther@suse.de>
4353
4354 * lto-lang.c (lto_init): Merge char_type_node with the
4355 appropriately signed variant.
4356
43572009-08-19 Richard Guenther <rguenther@suse.de>
4358
4359 PR lto/41071
4360 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
4361 (lto_fixup_type): Re-build the pointer-to chain part two.
4362
43632009-08-19 Richard Guenther <rguenther@suse.de>
4364
4365 PR lto/41071
4366 * lto.c (lto_fixup_type): Re-build the type variant chain.
4367
43682009-08-19 Richard Guenther <rguenther@suse.de>
4369
4370 PR lto/41071
4371 * lto.c (lto_fixup_constructor): New function.
4372 (lto_fixup_tree): Replace all types. Properly fixup
4373 constructors and constants.
4374
43752009-08-14 Richard Guenther <rguenther@suse.de>
4376
4377 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
4378 for DECL_LANG_SPECIFIC.
4379
43802009-08-13 Richard Guenther <rguenther@suse.de>
4381
4382 PR lto/41032
4383 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
4384
43852009-07-30 Richard Guenther <rguenther@suse.de>
4386
4387 PR lto/40903
4388 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
4389 the largest decl for output and free TREE_CHAIN for further
4390 use.
4391
43922009-07-24 Diego Novillo <dnovillo@google.com>
4393
4394 * Make-lang.in: Add empty lto.install-plugin target.
4395
43962009-07-13 Diego Novillo <dnovillo@google.com>
4397
4398 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
4399
44002009-07-11 Richard Guenther <rguenther@suse.de>
4401
4402 * lto-lang.c (lto_write_globals): Wrapup global decls.
4403
44042009-07-10 Richard Guenther <rguenther@suse.de>
4405
4406 * lto-lang.c (lto_init): Allocate one more location to make
4407 BUILTINS_LOCATION correct.
4408
44092009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4410
4411 * lto.c (free_section_data): Cast computed_offset to caddr_t.
4412
44132009-07-06 Diego Novillo <dnovillo@google.com>
4414
4415 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
4416 TYPE_SIZE_UNIT.
4417
44182009-07-06 Diego Novillo <dnovillo@google.com>
4419
4420 * lto.c (preload_common_nodes): Remove.
4421 (lto_read_in_decl_state): Call lto_streamer_cache_get.
4422 (lto_read_decls): Call lto_data_in_create and
4423 lto_data_in_delete.
4424 (free_decl): Do not call ggc_free.
4425 (lto_main): Call lto_init_reader.
4426 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
4427 (lto_init): Initialize main_identifier_node if needed.
4428 Make ptrdiff_type_node be integer_type_node.
4429
44302009-06-19 Diego Novillo <dnovillo@google.com>
4431
4432 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
4433 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
4434 Remove code guarded by #ifdef LOCAL_TRACE.
4435
44362009-06-18 Diego Novillo <dnovillo@google.com>
4437
4438 * lto.c: Update license to GPLv3.
4439 * lto-elf.c: Likewise.
4440 * common.c: Likewise.
4441 * lto-lang.c: Likewise.
4442 * lto.h: Remove superfluous include files. Update all
4443 users.
4444
44452009-06-17 Diego Novillo <dnovillo@google.com>
4446
4447 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
4448
44492009-06-02 Diego Novillo <dnovillo@google.com>
4450
4451 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
4452 read in.
4453 (materialize_cgraph): Only materialize nodes that have a
4454 representation on file.
4455
44562009-06-01 Diego Novillo <dnovillo@google.com>
4457
4458 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
4459
44602009-05-31 Diego Novillo <dnovillo@google.com>
4461
4462 * lto-lang.c (lto_type_for_mode): Handle all the modes
4463 handled in c_common_type_for_mode.
4464
44652009-05-21 Diego Novillo <dnovillo@google.com>
4466
4467 * lto-elf.c: Always include <gelf.h>.
4468 * config-lang.in (target_libs): Remove.
4469 (build_by_default): Set to no.
4470
44712009-05-15 Diego Novillo <dnovillo@google.com>
4472
4473 * lto.c (lto_materialize_function): Assert that DECL is
4474 not a builtin.
4475 (materialize_cgraph): Don't try to materialize builtin
4476 functions.
4477 * lto-section-out.c (write_symbol_vec): Do not write
4478 builtin functions.
4479
44802009-05-13 Diego Novillo <dnovillo@google.com>
4481
4482 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
4483
44842009-05-07 Diego Novillo <dnovillo@google.com>
4485
4486 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
4487 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
4488 (lto_fixup_type): Call it for TYPE_POINTER_TO,
4489 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
4490 (lto_fixup_tree): Call gimple_register_type when *TP is a
4491 type.
4492 (lto_main): Call bitmap_obstack_initialize.
4493
44942009-04-22 Diego Novillo <dnovillo@google.com>
4495
4496 * lto.c (free_section_data): Tidy.
4497 (lto_1_to_1_map): Tidy.
4498 (lto_add_all_inlinees): Tidy.
4499 (prefix_name_with_star): New.
4500 (get_filename_for_set): New.
4501 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
4502 to determine what cgraph node sets to write.
4503 Call get_filename_for_set to compute temporary file
4504 names.
4505 (lto_execute_ltrans): Do not execute LTRANS on files with
4506 names that start with '*'.
4507 Move logic to execute LTRANS together so that LTRANS is
4508 invoked only if there are any files to compile.
4509 (do_whole_program_analysis): Only remove output files
4510 that do not start with '*'.
4511
45122009-04-06 Diego Novillo <dnovillo@google.com>
4513
4514 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
4515 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
4516 (lto_add_all_inlinees): Tidy.
4517
45182009-03-26 Diego Novillo <dnovillo@google.com>
4519
4520 * lto.c: Include gimple.h.
4521 (lto_read_in_decl_state): Call gimple_register_type for
4522 every type in every stream.
4523 (lto_fixup_common): Call gimple_register_type if T has a
4524 type.
4525 (do_whole_program_analysis): Call print_lto_report.
4526 (lto_main): Call print_lto_report after cgraph_optimize.
4527 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
4528
45292009-03-24 Diego Novillo <dnovillo@google.com>
4530
4531 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
4532 (lto.o): Add dependency on GIMPLE_H.
4533
45342009-03-10 Simon Baldwin <simonb@google.com>
4535
4536 * lto.c (lto_read_all_file_options): Close any open file descriptor
4537 contained in file_data before freeing.
4538
45392009-02-24 Rafael Avila de Espindola <espindola@google.com>
4540
4541 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4542 for a decl in the original bitmap, not a node.
4543 (lto_add_all_inlinees): Remove original nodes that are not needed.
4544 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4545
45462009-02-24 Diego Novillo <dnovillo@google.com>
4547
4548 * lto.c (lto_materialize_function): Update
4549 lto_stats.num_function_bodies.
4550 (get_section_data): Initialize *LEN to 0.
4551 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
4552 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
4553 Update lto_stats.num_output_files.
4554 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
4555 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
4556 (lto_main): Initialize lto_stats.
4557 If flag_lto_report is set, call print_lto_report.
4558
45592009-02-19 Diego Novillo <dnovillo@google.com>
4560
4561 Revert
4562
4563 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
4564
4565 * lto.c (lto_add_inline_clones): Don't add the
4566 master clone. Check for a decl in the original
4567 bitmap, not a node.
4568 (lto_add_all_inlinees): Remove original nodes
4569 that are not needed.
4570 (lto_scan_statics_in_cgraph_node): Don't care if
4571 the node is the master.
4572 (lto_promote_cross_file_statics): Use a new
4573 context.seen_node_decls for each set
4574
45752009-02-19 Rafael Avila de Espindola <espindola@google.com>
4576
4577 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
4578 for a decl in the original bitmap, not a node.
4579 (lto_add_all_inlinees): Remove original nodes that are not needed.
4580 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
4581 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
4582 for each set
4583
45842009-02-18 Diego Novillo <dnovillo@google.com>
4585
4586 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
4587 and TV_WHOPR_WPA_IO.
4588 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
4589 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
4590 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
4591 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
4592 depending on command line flags.
4593 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
4594 (lto_main): Remove timer uses.
4595
45962009-02-18 Rafael Avila de Espindola <espindola@google.com>
4597
4598 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
4599 (lto_wpa_write_files): Update calls to renamed functions.
4600
46012009-02-17 Diego Novillo <dnovillo@google.com>
4602
4603 PR 39203
4604 * lto-lang.c (lto_post_options): Disable -fwhole-program
4605 when running LTRANS.
4606
46072009-02-10 Diego Novillo <dnovillo@google.com>
4608
4609 * lto.c (read_cgraph_and_symbols): Fix comment.
4610
46112009-02-10 Diego Novillo <dnovillo@google.com>
4612
4613 * lto.c (read_cgraph_and_symbols): Read options from all
4614 IL files.
4615
46162009-02-10 Diego Novillo <dnovillo@google.com>
4617
4618 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
4619 (materialize_cgraph): Likewise.
4620 (do_whole_program_analysis): Likewise.
4621 (lto_main): Call read_cgraph_and_symbols,
4622 materialize_cgraph and do_whole_program_analysis.
4623
46242009-02-10 Simon Baldwin <simonb@google.com>
4625
4626 * lto.c: Include lto-opts.h.
4627 * (lto_main): Clear file options at loop start, read any saved
4628 options from the first file handled, and re-issue options.
4629 * Makefile.in (lto.o): Add dependency on lto-opts.h.
4630
46312009-02-02 Diego Novillo <dnovillo@google.com>
4632
4633 * lto.c (lto_main): Stop LTO_TIMER and use
4634 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
4635
46362009-01-30 H.J. Lu <hongjiu.lu@intel.com>
4637
4638 PR lto/38995
4639 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
4640 to POINTER_SIZE.
4641
46422009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
4643
ab20d992 4644 * Make-lang.in (LTO_EXE): Link with all
d7f09764
DN
4645 BACKENDLIBS and not only GMPLIBS
4646
46472009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4648
4649 PR bootstrap/38992
4650 * lto-elf.c: Include gelf.h instead of libelf.h.
4651 (lto_elf_file_close): Replace elfx_update_shstrndx with
4652 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
4653 gelf_update_ehdr.
4654
46552009-01-28 H.J. Lu <hongjiu.lu@intel.com>
4656
4657 PR middle-end/38996
4658 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
4659
46602009-01-26 Diego Novillo <dnovillo@google.com>
4661
4662 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
4663
46642009-01-26 Diego Novillo <dnovillo@google.com>
4665
4666 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
4667 and rename into gimple_types_compatible_p.
4668
46692009-01-12 Rafael Avila de Espindola <espindola@google.com>
4670
4671 * lto-lang.c (lang_hooks): Remove the const qualifier.
4672
46732009-01-06 Diego Novillo <dnovillo@google.com>
4674
4675 * ltrans-driver: Mark 'all' target as phony.
4676
46772008-12-31 Diego Novillo <dnovillo@google.com>
4678
4679 * ltrans-driver: Execute a NOP action for target 'all'.
4680
46812008-12-19 Diego Novillo <dnovillo@google.com>
4682
4683 * lto.c (lto_1_to_1_map): Tidy.
4684
46852008-12-19 Diego Novillo <dnovillo@google.com>
4686
4687 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4688 be opened, show its name.
4689 * ltrans-driver: If $verbose is set, do not use parallelism.
4690
46912008-12-17 Rafael Avila de Espindola <espindola@google.com>
4692
4693 * lto.c (lto_fixup_function): New.
4694 (lto_fixup_tree): Call lto_fixup_function.
4695
46962008-12-14 Doug Kwan <dougkwan@google.com>
4697
4698 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4699 variables if there is no function.
4700
47012008-12-10 Simon Baldwin <simonb@google.com>
4702
4703 * ltrans-driver: Always run make in silent mode, to avoid make's
4704 trace on stdout interfering with lto-wrapper output.
4705
47062008-12-10 Doug Kwan <dougkwan@google.com>
4707
4708 * lto.c (lto_add_inline_clones): Do not force master clones of
4709 inlined functions already in SET to be static inline.
4710
47112008-12-04 Doug Kwan <dougkwan@google.com>
4712
4713 * lto.c (globalize_context_t): New type to store states in
4714 globalization of cross-file statics.
4715 (globalize_cross_file_statics): New.
4716 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4717 static decls that need to be fixed up.
4718 (lto_scan_statics_in_cgraph_node): Change call interface to use
4719 a globalize_context_t CONTEXT for all states used.
4720 (lto_scan_statics_in_remaining_global_vars): New.
4721 (lto_promote_cross_file_statics): Use new call interface of
4722 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4723 visible vars in the last set.
4724
47252008-12-03 Diego Novillo <dnovillo@google.com>
4726
4727 * lto.c (lto_fixup_tree): Do not emit an error when
4728 PREVAILING throw but T doesn't.
4729
47302008-12-02 Doug Kwan <dougkwan@google.com>
4731
4732 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4733 from code in ...
4734 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4735 variables and functions.
4736 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4737 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4738
47392008-11-29 Diego Novillo <dnovillo@google.com>
4740
4741 * lto.c: Include timevar.h.
4742 (lto_materialize_function): Tidy. Add comments.
4743 (lto_wpa_write_files): Tidy.
4744 (lto_execute_ltrans): Tidy.
4745 (lto_main): Add local variable LTO_TIMER. Initialize it
4746 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4747 Start and stop the timer.
4748 Tidy comments.
4749 * Make-lang.in (lto.o): Add dependency on timevar.h.
4750 * ltrans-driver: React to -v and -save-temps.
4751 Use simple heuristic to determine how much parallelism to
4752 use when executing make.
4753
47542008-11-12 Doug Kwan <dougkwan@google.com>
4755
4756 * lto.c (lto_bitmap_obstack): Remove var.
4757 (lto_materialize_function): Do nothing instead of marking function
4758 body in file if flag_wpa is true.
4759 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4760 (lto_scan_statics_in_cgraph_node): New function.
4761 (lto_promote_cross_file_statics): Same.
4762 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4763 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4764 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4765
47662008-11-09 Diego Novillo <dnovillo@google.com>
4767
ab20d992 4768 * lto.c (lto_fixup_tree): Change error message locus
d7f09764
DN
4769 information to include location of mismatching
4770 declaration.
4771 Use TREE_NO_WARNING to avoid repeated messages.
4772 (lto_main): If lto_fixup_decls emitted any errors, exit.
ab20d992 4773 * lto-lang.c: Don't include libfuncs.h and except.h
d7f09764
DN
4774 (lto_init_options): Don't enable exceptions by default.
4775 (lto_eh_runtime_type): Move to lto-function-in.c
4776 (lto_init_eh): Likewise.
4777 (lto_init): Don't call lto_init_eh.
ab20d992 4778 * Make-lang.in (lto-lang.o): Remove dependency on
d7f09764
DN
4779 libfuncs.h and except.h.
4780
47812008-10-30 Diego Novillo <dnovillo@google.com>
4782
4783 * lto.c (lto_read_decls): Declare debug_main only if
4784 LTO_STREAM_DEBUGGING is enabled.
4785
47862008-10-30 Simon Baldwin <simonb@google.com>
4787
4788 * lto.c (lto_wpa_write_files): Create intermediate files with
4789 make_cwd_temp_file().
4790 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4791 WPA_SAVE_LTRANS is set.
4792 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4793 * ltrans-driver: Do not strip directory from output files.
4794
47952008-10-29 Doug Kwan <dougkwan@google.com>
4796
4797 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4798 DECL.
4799 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4800 (lto/lto-symtab.o): Remove rule.
4801 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4802 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4803 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4804 Remove macros.
4805 lto-symtab.c (File): Move up one level.
4806 lto-lang.c (cgraph.h): Remove include.
4807 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4808 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4809 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4810
ab20d992 48112008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4812
4813 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4814 non prevailing weak symbols.
4815
ab20d992 48162008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4817
4818 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4819
ab20d992 48202008-10-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
4821
4822 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4823 different types.
4824
48252008-10-23 Simon Baldwin <simonb@google.com>
4826
4827 * lto-lang.c (input_node): Save the node reference, rather than the
4828 node pointer, in node->inlined_to.
4829 (input_cgraph_1): Convert node references into node pointers.
4830
48312008-10-22 Diego Novillo <dnovillo@google.com>
4832 Rafael Espindola <espindola@google.com>
4833
4834 * lto.c (lto_resolution_read): Tidy.
4835 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4836 abort if RET is NULL.
4837
48382008-10-22 Doug Kwan <dougkwan@google.com>
4839
4840 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4841 exceptions flag is given.
4842 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4843 (lto_init_eh): Remove exceptions flag initialization.
ab20d992 4844 (lto_init): Only call lto_init_eh if exceptions flag is set.
d7f09764
DN
4845
48462008-10-21 Diego Novillo <dnovillo@google.com>
4847
4848 * lto.c: Tidy some formatting.
4849 * lto.h: Likewise.
4850
48512008-10-21 Simon Baldwin <simonb@google.com>
4852
4853 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4854 them is NULL (but not the other).
4855
48562008-10-17 Diego Novillo <dnovillo@google.com>
4857
4858 * ltrans-driver: Divert output from make to a temporary file.
4859 Show it if the call to make failed.
4860
48612008-10-15 Diego Novillo <dnovillo@google.com>
4862
4863 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4864 Do not print TEMP_FILENAME
4865 * ltrans-driver: Call make with -s.
4866
48672008-10-15 Diego Novillo <dnovillo@google.com>
4868
4869 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4870 TREE_STATIC on global symbols.
4871
48722008-10-14 Ollie Wild <aaw@google.com>
4873
4874 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4875 (LTRANS_DRIVER_EXE): Add.
4876 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4877 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4878 (lto.install.common): Remove ltrans-driver.
4879 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4880 (LTRANS_DRIVER_EXE): New build rule.
4881 * config-lang.in (compilers): Add ltrans-driver.
4882
48832008-10-14 Diego Novillo <dnovillo@google.com>
4884
4885 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4886 of program name.
4887
48882008-10-13 Ollie Wild <aaw@google.com>
4889
4890 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4891 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4892 * ltrans-driver (LTRANS_FLAGS): Remove.
4893
48942008-10-08 Doug Kwan <dougkwan@google.com>
4895
4896 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4897 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4898 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4899 from lto_fixup_state to here.
4900 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4901 just a free-list. Fix up types also. Move decl merging code to
4902 lto_fixup_tree.
4903 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4904 object.
4905 (lto_fixup_decls): Use another pointer set to avoid multiple
4906 walking of nodes except for DECLs to be replaced. Pass an
4907 lto_fixup_data_t object to tree-walker.
4908
ab20d992 49092008-10-08 Rafael Espindola <espindola@google.com>
d7f09764
DN
4910
4911 * lto-symtab.c (lto_symtab_set_resolution): New.
4912 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4913 lto_symtab_get_resolution.
4914 (lto_symtab_prevailing_decl): Return decl for non public decls.
4915 (lto_symtab_get_resolution): New.
4916 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4917
ab20d992 49182008-10-06 Rafael Espindola <espindola@google.com>
d7f09764
DN
4919
4920 * lto-lang.c: Include cgraph.h.
4921 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4922 input_cgraph): Moved from lto-cgraph.c.
4923 (LANG_HOOKS_INPUT_CGRAPH): New.
4924
ab20d992 49252008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4926
4927 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4928
ab20d992 49292008-10-03 Rafael Espindola <espindola@google.com>
d7f09764
DN
4930
4931 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4932 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4933 prevailing definition. Don't mark TREE_NOTHROW differences.
4934 * lto.c (lto_fixup_tree): New.
4935 (lto_fixup_state): New.
4936 (lto_fixup_state_aux): New.
4937 (free_decl): New.
4938 (lto_fixup_decls): New.
4939 (lto_main): Call lto_fixup_decls.
4940
49412008-10-02 Ollie Wild <aaw@google.com>
4942
4943 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4944 and Init.
4945 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4946 * lto-lang.c (lto_post_options): Add validation and fixups for
4947 -fltrans and -fwpa.
4948
ab20d992 49492008-10-02 Rafael Espindola <espindola@google.com>
d7f09764
DN
4950
4951 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4952 lto_symtab_merge_decl): Return void.
4953 (lto_symtab_prevailing_decl): New.
4954
ab20d992 49552008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4956
4957 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4958 defined symbols.
4959 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4960 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4961 Check for already defined symbols.
4962 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4963 (LTO_IDENTIFIER_RESOLUTION): Remove.
4964 (LTO_DECL_RESOLUTION): New.
4965
ab20d992 49662008-09-30 Rafael Espindola <espindola@google.com>
d7f09764
DN
4967
4968 * lto.c (lto_read_decls): Use new input_tree signature.
4969
49702008-09-26 Doug Kwan <dougkwan@google.com>
4971
4972 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4973 bodies affected by exception attribute merging of DECLs.
4974 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
ab20d992 4975 merging.
d7f09764
DN
4976
49772008-09-25 Rafael Espindola <espindola@google.com>
4978
4979 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4980 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4981 * lto-symtab.c (lto_symtab_compatible): New.
4982 (lto_symtab_overwrite_decl): New.
4983 (lto_symtab_merge_decl): Refactor to use the above functions
4984 and the resolution from lang_identifier.
4985 * lto-tree.h: Include plugin-api.h.
4986 (lang_identifier): Add resolution.
4987 (LTO_IDENTIFIER_RESOLUTION): New.
4988
49892008-09-25 Ollie Wild <aaw@google.com>
4990
4991 * lang.opt (fltrans-output-list=): New option.
4992 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4993
ab20d992 49942008-09-25 Rafael Espindola <espindola@google.com>
d7f09764
DN
4995
4996 * lto.c (lto_resolution_read): Initialize ret;
4997
49982008-09-24 Ollie Wild <aaw@google.com>
4999
5000 * lto.c (sys/mman.h): Move include.
5001 (lto_wpa_write_files): Return a list of written files.
5002 (lto_execute_ltrans): New function.
5003 (lto_main): Call lto_execute_ltrans.
5004 (ltrans-driver): New file.
5005 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
5006 (DEAULT_LTRANS_DRIVER_LEN): New macro.
5007 (lto_init_options): Initialize ltrans_driver.
5008 (lto_handle_option): Fix incorrect default output value.
5009 * lang.opt (fltrans-driver=): New option.
5010 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
5011 (lto.install-common): Add lto/ltrans-driver.
5012
ab20d992 50132008-09-24 Rafael Espindola <espindola@google.com>
d7f09764
DN
5014
5015 * Make-lang.in (LTO_OBJS): Add lto/common.o.
5016 (lto/lto.o): Depend on lto/common.h.
5017 (lto/common.o): New.
5018 * lang.opt (resolution): New.
5019 * lto-lang.c (resolution_file_name): New.
5020 (lto_handle_option): Handle OPT_resolution.
5021 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
5022 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
5023 pass it to lto_symtab_merge_decl.
5024 * lto.c: Include common.h.
5025 (lto_read_decls): Add resolutions and resolutions_size arguments.
5026 Initialize data_in.globals_resolution and
5027 data_in.globals_resolution_size.
5028 (index_and_symbol_resolution): New.
5029 (lto_resolution_read): New.
5030 (lto_file_read): Add argument resolution_file.
5031 Read resolution.
5032 * lto.h (resolution_file_name): New.
5033
ab20d992 50342008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
5035
5036 * common.c: Update description.
5037 * common.h: Update description.
5038
ab20d992 50392008-09-23 Rafael Espindola <espindola@google.com>
d7f09764
DN
5040
5041 * common.c: Moved from lto-plugin.
5042 * common.h: Moved from lto-plugin.
5043
50442008-09-22 Doug Kwan <dougkwan@google.com>
5045
5046 * lto.c (VEC(bitmap,heap)): Declare.
5047 (lto_materialize_function): Handle WAP mode specially.
5048 (lto_add_inline_clones): New.
5049 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
5050 return a bitmap of inlined decls.
5051 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
5052 (lto_main): Call reset_inline_failed to reset inlining states.
5053 Check call-graph after WPA inlining.
5054 * lto-lang.c (lto_init): Do not clear flag_generate_lto
5055 unconditionally.
5056
50572008-09-19 Doug Kwan <dougkwan@google.com>
5058
5059 lto.c (lto_main): Remove unsued wrapper code.
5060 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
5061
50622008-09-19 Rafael Espindola <espindola@google.com>
5063
5064 * lto-symtab.c: Include lto-tree-in.h.
5065 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
5066 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
5067 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
5068
50692008-09-17 Paolo Bonzini <bonzini@gnu.org>
5070 Rafael Avila de Espindola <espindola@google.com>
5071
5072 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
5073 COMPOUND_LITERAL_EXPR_DECL): Remove.
5074 (emit_local_var): Remove.
5075 (lto_expand_expr): Remove.
5076 (lto_staticp): Remove.
5077 (LANG_HOOKS_EXPAND_EXPR): Remove.
5078 (LANG_HOOKS_STATICP): Remove.
5079
50802008-09-11 Diego Novillo <dnovillo@google.com>
5081
5082 * lto-lang.c: Include except.h and libfuncs.h.
5083 (lto_init_eh): New.
5084 (lto_init): Call it.
5085 Set flag_generate_lto to 0.
5086 * Make-lang.in (lto-lang.o): Add dependency on except.h
5087 and libfuncs.h.
5088
50892008-09-09 Bill Maddox <maddox@google.com>
5090
5091 * lto-lang.c: Include header file expr.h.
5092 (COMPOUND_LITERAL_EXPR_DECL_STMT,
5093 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
ab20d992 5094 (emit_local_var): Copied from c-semantics.c.
d7f09764
DN
5095 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
5096 and c_staticp in c-common.c.
ab20d992 5097 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
d7f09764
DN
5098
50992008-09-08 Diego Novillo <dnovillo@google.com>
5100
5101 * lto-lang.c (lto_global_bindings_p): Return 1 during
5102 IPA passes.
5103
51042008-09-07 Diego Novillo <dnovillo@google.com>
5105
5106 * lto.c: Tidy formatting.
5107
51082008-08-04 Bill Maddox <maddox@google.com>
5109
5110 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
ab20d992 5111
d7f09764
DN
51122008-09-03 Doug Kwan <dougkwan@google.com>
5113
5114 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
5115 CIF_OK instead of NULL.
5116
51172008-09-02 Diego Novillo <dnovillo@google.com>
5118 Simon Baldwin <simonb@google.com>
5119
5120 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
5121 c_common_type_for_size.
5122 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
5123 (lto_init): Call linemap_add.
5124 (signed_and_unsigned_types): Remove.
5125
51262008-08-29 Diego Novillo <dnovillo@google.com>
5127
5128 * lto-lang.c (handle_noreturn_attribute): New local function.
5129 (handle_const_attribute): New local function.
5130 (handle_malloc_attribute): New local function.
5131 (handle_pure_attribute): New local function.
5132 (handle_novops_attribute): New local function.
5133 (handle_nonnull_attribute): New local function.
5134 (handle_nothrow_attribute): New local function.
5135 (handle_sentinel_attribute): New local function.
5136 (handle_type_generic_attribute): New local function.
5137 (handle_format_attribute): New local function.
5138 (handle_format_arg_attribute): New local function.
5139 (lto_attribute_table): Declare.
5140 (lto_format_attribute_table): Declare.
5141 (lto_init_attributes): New local function.
5142 (lto_define_builtins): Call it.
5143 Call targetm.init_builtins and build_common_builtin_nodes.
5144 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
5145 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
5146
51472008-08-28 Diego Novillo <dnovillo@google.com>
5148
5149 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
5150 $(GIMPLE_H).
5151 (lto-symtab.o): Add dependency on $(GIMPLE_H).
5152 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
5153 * lto-symtab.c: Include gimple.h.
5154 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
5155 TREE_CHAIN.
5156
51572008-08-27 Doug Kwan <dougkwan@google.com>
5158
5159 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
5160 gt-lto-lto.h): New includes.
5161 (lto_materialize_function): Do not read in function body in WPA mode.
5162 Format a line to fit in 80 columns.
5163 (lto_cgraph_node_sets): New garbage collected variable.
5164 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
5165 New functions.
5166 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
ab20d992 5167 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
d7f09764
DN
5168 variable LTO_SECTION_IN_H.
5169 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
5170 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
5171 with variable LTO_SECTION_IN_H.
5172 * config-lang.in (gtfiles): Add lto/lto.c.
5173 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
5174 merged DECL_RESULT correctly.
5175
51762008-08-26 Bill Maddox <maddox@google.com>
5177
5178 * lto-lang.c Include tree-gimple.h.
5179 (lto_mark_addressable): Call mark_addressable rather than
5180 asserting.
5181 (lto_post_options): Suppress debug info generation.
5182 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
ab20d992 5183
3f8257db 51842008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
5185
5186 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
5187 assertion and leave an explanatory comment in its place.
ab20d992 5188
d7f09764
DN
51892008-08-21 Doug Kwan <dougkwan@google.com>
5190
5191 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
5192 of common nodes instead of computing locallly.
5193 (lto_read_in_decl_state): New.
5194 (lto_read_decls): Change code for udpate in struct lto_decl_header.
5195 Read global and per-function in-decl states.
5196 * Make-lang.in (LTO_H): Update dependency.
5197 (lto/lto.o): Same.
5198 (lto-symtab.c): Merge (revision 139039)
5199 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
5200
52012008-08-21 Rafael Espindola <espindola@google.com>
5202
5203 * config-lang.in (target_libs): New.
5204
52052008-08-20 Bill Maddox <maddox@google.com>
5206
5207 * lto.c (current_lto_file): Remove GTY marker from static
5208 variable. Remove include of file gt-lto-lto.h.
5209 * Make-lang.in: Remove dependency of lto/lto.o on
5210 gt-lto-lto.h.
5211 * lto-elf.c (lto_file_close): Removed.
5212 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
5213 allocate lto_elf_file object.
5214 (lto_elf_file_close): Free lto_elf_file object after close.
5215 * lto.h (struct lto_file_struct): Remove GTY marker.
5216 * config-lang.in: Remove lto/lto.h and lto/lto.c from
5217 gtfiles.
ab20d992 5218
d7f09764
DN
52192008-08-20 Bill Maddox <maddox@google.com>
5220
5221 * lto.c (lto_read_decls): Provide dummy argument to input_tree
5222 to conform to its new signature.
5223 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
5224 on discarded node here, now called in global_vector_fixup.
ab20d992 5225
d7f09764
DN
52262008-08-09 Bill Maddox <maddox@google.com>
5227
5228 * lto.c (preload_common_nodes): Verify that fileptr_type_node
5229 has not been set to a front-end-specific value.
ab20d992 5230
d7f09764 52312008-08-05 Doug Kwan <dougkwan@google.com>
ab20d992 5232
d7f09764
DN
5233 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
5234 build breakage.
5235
52362008-07-30 Bill Maddox <maddox@google.com>
5237
5238 * lto.c (lto_materialize_function): Call lto_original_decl_name.
5239 Remove obsolete comments.
5240 (lto_read_decls): Remove initialization of deleted field data_in.global.
5241 Tidy up comments.
5242 (lto_main): Remove redundant initialization of section_hash_table.
5243 * lto-elf.c: Removed obsolete comments.
5244 * lto.h: Tidy up comments.
5245 * lto-symtab.c (lto_least_common_multiple): New function.
5246 (lto_symtab_merge_decl): Merge variable alignments in some cases.
5247 Tidy up comments.
5248
52492008-07-25 Diego Novillo <dnovillo@google.com>
5250 Bill Maddox <maddox@google.com>
5251
5252 * lto.c: Re-order include files.
5253 Include lto-section-out.h.
5254 (preload_common_nodes): Add debugging output.
5255 Add new local INDEX_TABLE.
5256 Call preload_common_node.
5257 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
5258
52592008-07-13 Bill Maddox <maddox@google.com>
5260
5261 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
5262 unwanted scaling during pointer addition.
5263
52642008-07-11 Bill Maddox <maddox@google.com>
5265 Diego Novillo <dnovillo@google.com>
5266
5267 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
5268 Make code const-correct.
5269 (lto_file_read): Fix C++ compatibility warnings.
ab20d992 5270 (lto_read_section_data): Fix C++ compatibility warnings.
d7f09764
DN
5271 (lto_get_section_data): Use CONST_CAST to avoid warning when
5272 const pointer passed to free.
5273 * lto-elf.c (lto_elf_build_section_table): Fix C++
5274 compatibility warnings.
ab20d992 5275 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
d7f09764 5276 to avoid warning assigning const pointer to d_buf field of Elf_Data.
ab20d992 5277 (lto_get_current_out_file): Fix C++ compatibility warnings.
d7f09764
DN
5278
52792008-07-11 Diego Novillo <dnovillo@google.com>
5280
5281 * Make-lang.in (lto-warn): Define.
5282
52832008-07-03 Simon Baldwin <simonb@google.com>
5284
5285 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
5286 LTO_STREAM_DEBUGGING.
5287
52882008-06-27 Ollie Wild <aaw@google.com>
5289
5290 * lto-elf.c (lto-section-out.h): New include.
5291 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
5292 and data members.
5293 (cached_file_attrs): New static variable.
5294 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
5295 Use cached_file_attrs for checking bits.
5296 (lto_elf_build_section_table): Remove elf_file argument from
5297 lto_elf_get_shdr and lto_elf_free_shdr calls.
5298 (DEFINE_INIT_SHDR): New macro.
5299 (init_shdr32, init_shdr64): New functions defined via the
5300 DEFINE_INIT_SHDR macro.
5301 (lto_elf_begin_section_with_type): New function.
5302 (lto_elf_begin_section): New function.
5303 (lto_elf_append_data): New function.
5304 (lto_elf_end_section): New function.
5305 (DEFINE_VALIDATE_EHDR): New macro.
5306 (validate_ehdr32, validate_ehdr64): New functions defined via the
5307 DEFINE_VALIDATE_EHDR macro.
5308 (validate_file): New function.
5309 (DEFINE_INIT_EHDR): New macro.
5310 (init_ehdr32, init_ehdr64): New functions defined via the
5311 DEFINE_INIT_EHDR macro.
5312 (init_ehdr): New function.
5313 (lto_elf_file_open): Add support for writable files. Move some
5314 validation logic to validate_file.
5315 (lto_elf_file_close): Add support for writable files. Write file data
5316 and free data blocks.
5317 (current_out_file): New static variable.
5318 (lto_set_current_out_file): New function.
5319 (lto_get_current_out_file): New function.
5320 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
5321 Add temporary initialization for testing ELF serialization.
5322 * lto.h (lto-section-out.h): New include.
5323 (struct lto_file_struct): Slight modification to comment.
5324 (lto_elf_file_open): Add writable parameter.
5325 (lto_elf_begin_section): New function declaration.
5326 (lto_elf_append_data): New function declaration.
5327 (lto_elf_end_section): New function declaration.
5328 (lto_set_current_out_file, lto_get_current_out_file): New function
5329 declarations.
5330 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
5331 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
5332 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
5333 * Make-lang.in (LTO_H): Add lto-section-out.h.
5334
53352008-06-12 Ollie Wild <aaw@google.com>
5336
5337 * lto.h (struct lto_file_vtable_struct): Remove.
5338 (struct lto_file_struct): Remove vtable member.
5339 * lto-elf.c (lto_file_init): Remove vtable argument.
5340 (lto_elf_map_optional_lto_section): Remove.
5341 (lto_elf_unmap_section): Remove.
5342 (lto_elf_file_vtable): Remove.
5343 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
5344 lto_file_init call.
5345 (lto_elf_find_section_data): Remove.
5346
53472008-06-11 Ollie Wild <aaw@google.com>
5348
5349 * lto.c (lto_file_read): Add const qualifier to data variable.
5350
53512008-06-11 Diego Novillo <dnovillo@google.com>
5352
5353 Merge from lto-streamber sub-branch.
5354
5355 2008-06-04 Ollie Wild <aaw@google.com>
5356
5357 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
5358 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
5359
5360 2008-05-28 Bill Maddox <maddox@google.com>
5361
5362 Replace the DWARF reader in the LTO front-end.
5363
5364 * lto.c: Include lto-tree-in.h, lto-tags.h.
5365 (enum DWARF2_class, DW_cl_constant, struct
5366 DWARF2_form_data, struct lto_context,
5367 lto_fd_init, lto_info_fd_init,
5368 lto_abbrev_fd_init, lto_info_fd_close,
5369 lto_file_init, lto_file_close,
5370 lto_file_corrupt_error, lto_abi_mismatch_error,
5371 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
5372 lto_read_uleb128, lto_read_sleb128,
5373 lto_read_initial_length, lto_abbrev_read_attrs,
5374 lto_abbrev_read, lto_abbrev_read_lookup,
5375 lto_read_section_offset,
5376 lto_read_comp_unit_header, find_cu_for_offset,
5377 lto_get_file_name,
5378 lto_resolve_reference,lto_read_form,
5379 attribute_value_as_int,
5380 make_signed_host_wide_int,
5381 attribute_value_as_constant, lto_cache_hash,
5382 lto_cache_eq, lto_cache_store_DIE,
5383 lto_cache_lookup_DIE, lto_find_integral_type,
5384 lto_find_integral_type_1,
5385 LTO_BEGIN_READ_ATTRS_UNCHECKED,
5386 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
5387 lto_unsupported_attr_error, lto_get_identifier,
5388 lto_read_referenced_type_DIE,
5389 lto_read_compile_unit_DIE,
5390 lto_read_array_type_DIE,
5391 lto_read_structure_union_class_type_DIE,
5392 lto_read_enumerator_DIE,
5393 lto_read_enumeration_type_DIE,
5394 lto_read_only_for_child_DIEs,
5395 lto_read_only_for_child_DIEs,
5396 lto_read_member_DIE, lto_read_abbrev,
5397 lto_read_variable_formal_parameter_constant_DIE,
5398 lto_get_body): Removed.
5399 (preload_common_nodes): New function.
5400 (lto_read_decls): Convert for new global streamer.
5401 (lto_materialze_file_data,
5402 lto_read_subroutine_type_subprogram_die,
5403 lto_read_unspecified_parameters_DIE,
5404 lto_read_typedef_DIE,
5405 lto_read_pointer_reference_type_DIE,
5406 lto_read_subrange_type_DIE,
5407 lto_read_base_type_DIE,
5408 lto_read_const_volatile_restrict_type_DIE,
5409 lto_read_namespace_DIE,
5410 lto_read_unspecified_type_DIE, lto_read_DIE,
5411 lto_read_child_DIEs, lto_collect_child_DIEs):
5412 Removed.
5413 (lto_info_read, lto_set_cu_context): Removed.
5414 (lto_file_read): Convert for new global streamer.
5415 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
5416 lto_resolve_var_ref, lto_resolve_fn_ref,
5417 lto_resolve_field_ref, lto_resolve_typedecl_ref,
5418 lto_resolve_namespacedecl_ref): Removed.
5419 (lto_file_init, lto_file_close): Moved to lto-elf.c.
5420 * lto-tree.h (lto_symtab_merge_var,
5421 lto_symtab_mergee_fun): Declare here.
5422 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
5423 (lto_elf_file_open): Removed code to read DWARF debug sections.
5424 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
5425 DWARF2_CompUnit, lto_die_ptr,
5426 lto_die_cache_entry, lto_fd, lto_info_fd,
5427 lto_abbrev_fd): Removed.
5428 (lto_file): Removed debug_info and debug_abbrev fields.
5429 (lto_ref): Removed.
5430 (lto_file_init, lto_file_close,
5431 lto_resolve_type_ref, lto_resolve_var_ref,
5432 lto_resolve_fn_ref, lto_resolve_field_ref,
5433 lto_resolve_typedecl_ref,
5434 lto_resolve_namespacedecl_ref,
5435 lto_get_file_name): Removed declarations.
5436 (lto_symtab_merge_var, lto_symtab_merge_fn):
5437 Declarations moved to lto-tree.h.
5438 * lto-symtab.c (lto_compatible_attributes_p):
5439 Lobotomize this, as it barfs on "Hello, world!".
5440 * lto-section-out.c: Include lto-tree-out.h.
5441 (lto_hash_global_slot_node,
5442 lto_eq_global_slot_node, preload_common_nodes,
5443 write_global_stream, write_global_references):
5444 New functions.
5445 (produce_asm_for_decls): Convert for new global streamer.
5446 * lto-section-out.h (lto_hash_global_slot_node,
5447 lto_eq_global_slot_node): Declare.
5448
3f8257db 54492008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5450 Jan Hubicka <jh@suse.cz>
ab20d992 5451
d7f09764
DN
5452 * lto.c (sys/mman.h, tree-pass.h): New includes.
5453 (lto_materialize_constructors_and_inits,
5454 lto_materialize_function): Keeps length of section.
5455 (lto_materialize_cgraph): Removed.
5456 (lto_read_decls): Initialize fd field.
5457 (lto_file_read): Different return type and removed much code to
5458 lto_main.
5459 (page_mask): New variable.
5460 (lto_read_section_data, get_section_data, free_section_data): New
5461 functions.
5462 (lto_main): Now calls pass manager, sets the hooks so that the ipa
ab20d992
JJ
5463 passes can get the section data.
5464
3f8257db 54652008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5466
5467 * lto.h (lto_read_decls): Made local.
ab20d992 5468 (lto_input_function_body, lto_input_constructors_and_inits,
d7f09764
DN
5469 lto_input_cgraph): Declarations moved to lto-section-in.h.
5470 * lto-section-in.c: Moved to .. .
5471 * lto-cgraph-in.c: Ditto.
5472 * lto-section-in.h: Ditto.
5473 * lto-function-in.c: Ditto.
5474 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
5475 (lto_insert_block): Removed.
5476 (LANG_HOOKS_INSERT_BLOCK): Removed.
5477 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
5478 lto-section-in.o): Rules moved to lto/Makefile.in.
ab20d992 5479
d7f09764
DN
5480
54812008-05-16 Ollie Wild <aaw@google.com>
5482
5483 * lto-lang.c (tree-inline.h): Include.
5484 (lto_post_options): New function.
5485 (LANG_HOOKS_POST_OPTIONS): Define.
5486 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
5487 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
5488
54892008-05-13 Diego Novillo <dnovillo@google.com>
5490
5491 * lto-function-in.c (input_ssa_names): Call
5492 make_ssa_name_fn instead of make_ssa_name.
5493
54942008-05-12 Diego Novillo <dnovillo@google.com>
5495
5496 * lto-cgraph-in.c (overwrite_node): Update references to
5497 inline summary fields.
5498 * lto-function-in.c (input_expr_operand): Do not handle
5499 STRUCT_FIELD_TAG.
5500
55012008-05-09 Ollie Wild <aaw@google.com>
5502
5503 * lang.opt: New file.
5504 * lto-lang.c (lto_init_options): New function.
5505 (lto_handle_option): New function.
5506 (lto_init): Move initialization of flag_unit_at_a_time to
5507 lto_init_options.
5508 (LANG_HOOKS_INIT_OPTIONS): Define.
5509 (LANG_HOOKS_HANDLE_OPTION): Define.
5510
55112008-04-29 Ollie Wild <aaw@google.com>
5512
5513 * lto.c (lto_read_namespace_DIE): New function.
5514 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
5515 NAMESPACE_DECL DIE's.
5516 (lto_resolve_namespacedecl_ref): New function.
5517 * lto.h (lto_resolve_namespacedecl_ref): New function.
5518 * lto-section-in.c (lto_read_decls): Read namespace declarations.
5519 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
5520 and num_namespace_decls.
5521 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
5522 * lto-lang.c (lto_init_ts): New function.
5523 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
5524
55252008-04-16 Ollie Wild <aaw@google.com>
5526
5527 * lto-function-in.c (input_type_ref): Updated function description.
5528
55292008-04-16 Ollie Wild <aaw@google.com>
5530
5531 * lto-function-in.c (input_type_ref_1): New function.
5532 (input_type_ref): Split into two functions.
5533 (input_function): Add support for type contexts.
5534
55352008-04-16 Ollie Wild <aaw@google.com>
5536
5537 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
5538 section name
5539
55402008-04-16 Ollie Wild <aaw@google.com>
5541
5542 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
5543 list of supported languages.
5544
3f8257db 55452008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5546
5547 Merge with mainline @133491.
5548
3f8257db 55492008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5550 Jan Hubicka <jh@suse.cz>
5551
5552 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
5553 fd->unmaterialized_fndecls.
5554 (lto_get_file_name, lto_materialize_cgraph): New function.
5555 (lto_materialize_constructors_and_inits,
5556 lto_materialize_function): Read info directly from elf file.
5557 (lto_file_read): Made local and initialize dictionary so that
5558 other lto sections can be read without reprocessing the elf file.
5559 (lto_main): Read all functions after all files have been processed
ab20d992 5560 for their types, globals and cgraph.
d7f09764
DN
5561 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
5562 dependencies.
5563 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
5564 (hash_name, eq_name, lto_elf_build_section_table): New functions.
5565 (lto_elf_read_symtab): Removed function.
5566 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
5567 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
5568 (lto_file_read): Made local.
5569 (lto_get_file_name, lto_elf_build_section_table,
ab20d992 5570 lto_input_cgraph):
d7f09764
DN
5571 New function.
5572 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
5573 New functions.
5574 (lto_read_decls): Get the file name.
5575 * lto-cgraph-in.c: New file.
5576 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
5577 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
5578 (input_labels): Fixed latent sizeof issue.
5579 (input_function): Build stmt array to set call sites into cgraph
5580 edges.
5581 (lto_read_body): Reset cfun->curr_properties.
5582 * lto_section_in.h (lto_section_slot): New structure.
5583 (section_hash_table.lto_file_decl_data): New field.
5584
3f8257db 55852008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5586
5587 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
5588 reconstruct static initializers.
5589 (lto_get_body, lto_materialize_function): Add lto_section_type as
5590 a parameter.
5591 (lto_materialize_constructors_and_inits,
5592 lto_materialize_file_data): New function.
5593 (lto_materialize_function,
5594 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
5595 unmap_section and map_fn_body to map_section.
5596 (lto_set_cu_context): Process functions and static inits
5597 differently.
5598 * Make-lang.in (LTO_H, lto/lto-function-in.o,
5599 lto/lto-section-in.o): Update dependencies.
ab20d992 5600 * lto-elf.c (lto_elf_map_optional_lto_section): Add
d7f09764
DN
5601 lto_section_type parameter.
5602 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
ab20d992 5603 * lto.h (lto_file_vtable_struct): Removed two of the fields and
d7f09764
DN
5604 renamed the other two so that there is only one map function and
5605 one unmap function and each takes a section type parameter.
5606 (lto_read_function_body): Renamed to lto_input_function_body and
5607 added file_data parameter.
5608 (lto_read_var_init): Removed.
5609 (lto_input_constructors_and_inits): New function.
5610 * lto-section-in.c (lto_read_decls): New function.
5611 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
5612 var_decls, type_decls, types to lto_file_decl_data.
5613 (input_type_ref, input_expr_operand, lto_read_body): Get
5614 field_decls, fn_decls, var_decls, type_decls, types from different
5615 structure.
5616 (input_globals, input_constructor, lto_read_var_init): Removed.
5617 (input_constructors_or_inits): New function.
5618 (lto_read_function_body, lto_input_constructors_and_inits):
5619 Renamed to lto_input_function_body and takes file_data parameter.
5620 * lto-section-in.h (lto_file_decl_data): New structure.
ab20d992 5621
3f8257db 56222008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5623
5624 * lto-function-in.c (input_globals.c): Changed input type to
5625 lto_function_header.
5626 (input_bb): Removed code to deserialize the stmt number.
5627 (input_function): Renumber all stmts after they are input.
5628 (lto_read_body, lto_read_function_body, lto_read_var_init):
5629 Changed to used new header format and enum section_type.
ab20d992
JJ
5630 *lto-lang.c (success): Removed.
5631
d7f09764
DN
56322008-01-28 Nathan Froyd <froydnj@codesourcery.com>
5633
5634 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
5635 (lto_elf_free_sym): Likewise.
5636
5637 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
5638 (lto_elf_build_init): Likewise.
5639
3f8257db 56402008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5641
5642 * lto-read.c: Renamed to lto-function-in.c.
5643 (input_1_unsigned): Moved to lto-section-in.c and renamed
5644 lto_input_1_unsigned.
5645 (input_uleb128): Moved to lto-section-in.c and renamed
5646 lto_input_uleb128.
5647 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
5648 lto_input_widest_uint_uleb128.
5649 (input_sleb128): Moved to lto-section-in.c and renamed
5650 lto_input_sleb128.
5651 (input_integer): Moved to lto-section-in.c and renamed
5652 lto_input_integer.
5653 (debug_in_fun): Moved to lto-section-in.c and renamed
5654 lto_debug_in_fun.
5655 (input_block): Moved to lto-section-in.h and renamed
5656 lto_input_block.
5657 (input_expr_operand): Fixed to allow lists with more than one
5658 element.
5659 * lto-section-in.h: New file.
5660 * lto-section-in.c: New file with changes from above.
5661 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
5662 (lto-section-in.o): New rule.
ab20d992 5663
d7f09764
DN
56642007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5665
5666 * lto-read.c (input_expr_operand): Mark static and external
5667 VAR_DECLs as needed.
5668
56692007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5670
5671 * lto-read.c (input_integer): Use the correct shift amount.
5672
56732007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5674
5675 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5676 (LANG_HOOKS_NAME): Define.
5677
56782007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5679
5680 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5681 original function to...
5682 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5683 don't have a base type.
5684 (lto_read_enumeration_type_DIE): Examine the values of the
5685 enumeration to determine whether we can use an unsigned type for
5686 the base type of the enumeration.
5687
56882007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5689
5690 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5691 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5692
56932007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5694
5695 * lto-lang.c (lto_types_compatible_p): New function.
5696 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5697
56982007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 5699 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5700
5701 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5702 (input_local_vars): Read in DECL_INITIAL and context for local
5703 statics that need to be put in unexpanded_vars_list.
5704
57052007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5706
5707 * lto-read.c (input_real): Use a separate null-terminated buffer
5708 for calling real_from_string.
5709 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5710 tell cgraph that it's needed.
5711
57122007-12-19 Doug Kwan <dougkwan@google.com>
5713
5714 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5715
57162007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5717
5718 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5719 (lto_file_read): Reset the members of 'context' every time we read
5720 a toplevel DIE, with special attention to last_param_type.
5721
57222007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5723
5724 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5725 'declaration'. Set the assembler name for non-public functions.
5726
3f8257db 57272007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5728
5729 * lto_read.c (data_in.unexpanded_indexes): New array.
5730 (input_local_var): Added code to read in unexpanded_var_list
5731 indexes for variables. Only read in DECL_CHAIN field for
5732 parameters.
5733 (input_local_vars): Added code to rebuild unexpanded_var_list in
5734 order using unexpanded_indexes.
5735 (input_function): Added code to set DECL_CONTEXT for functions.
5736
57372007-12-13 Doug Kwan <dougkwan@google.com>
5738
5739 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5740 in pointer and reference types.
5741
57422007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5743
5744 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5745 RESULT_DECL.
5746
57472007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5748
5749 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5750 already read the DIE.
5751 (lto_get_body): New function, split out from...
5752 (lto_materialize_function): ...here. Call it.
5753 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5754 determine DECL_EXTERNAL.
5755 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5756 FUNCTION_DECLs when necessary. Use the type of the actual
5757 function definition if we are unable to easily merge types. Ignore
5758 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5759 necessary.
5760
57612007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5762
5763 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5764
57652007-12-12 Bill Maddox <maddox@google.com>
5766
5767 Revert
5768 2007-12-07 Bill Maddox <maddox@google.com>
5769
5770 * lto.c (lto_str_fd_init): New function.
5771 (lto_str_fd_close): New function.
5772 (lto_file_init): Call lto_str_fd_init.
5773 (lto_file_close): Call lto_str_fd_close.
5774 (lto_str_read): New function. Read debug string table.
5775 (lto_str_lookup): New function. Get string for debug
5776 string table offset.
5777 (lto_read_form): Recognize DW_FORM_strp.
5778 (lto_file_read): Invoke lto_str_read.
5779
5780 * lto-elf.c (lto_elf_file_open): Read raw section data
5781 for the .debug_str section, if present.
5782
5783 * lto.h (struct lto_str_fd_struct): New struct.
5784 (struct lto_file_struct): Added new field DEBUG_STR
5785 to hold the file descriptor for the debug string table.
ab20d992 5786
d7f09764
DN
57872007-12-07 Bill Maddox <maddox@google.com>
5788
5789 * lto.c (lto_str_fd_init): New function.
5790 (lto_str_fd_close): New function.
5791 (lto_file_init): Call lto_str_fd_init.
5792 (lto_file_close): Call lto_str_fd_close.
5793 (lto_str_read): New function. Read debug string table.
5794 (lto_str_lookup): New function. Get string for debug
5795 string table offset.
5796 (lto_read_form): Recognize DW_FORM_strp.
5797 (lto_file_read): Invoke lto_str_read.
5798
5799 * lto-elf.c (lto_elf_file_open): Read raw section data
5800 for the .debug_str section, if present.
5801
5802 * lto.h (struct lto_str_fd_struct): New struct.
5803 (struct lto_file_struct): Added new field DEBUG_STR
5804 to hold the file descriptor for the debug string table.
5805
58062007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5807
5808 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5809 Grow the basic_block_info and label_to_block_map vectors if
5810 necessary. Read in the block chain.
5811
58122007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5813
5814 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5815
58162007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5817
5818 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5819
58202007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5821
5822 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5823 (lto_read_body): Don't declare PROP_alias.
5824
58252007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5826
5827 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5828 argument type information.
5829
58302007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5831
5832 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5833 TREE_THIS_VOLATILE if the associated type is a volatile type.
5834 (lto_materialize_function): Remove call to init_ssa_operands.
5835 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5836 variable when reading an SSA_NAME. Do the same when reading a
5837 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5838 (input_cfg): Call init_ssa_operands.
5839 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5840 Move call to init_tree_ssa...
5841 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5842 add_referenced_var on any variables referenced from the body of the
5843 function. Inform the rest of the compiler we are in SSA form and
5844 inform later passes about the current properties.
5845
58462007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5847
5848 * lto.c (lto_materialize_function): Add FIXME.
5849
58502007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5851
5852 * lto-lang.c (enum built_in_attribute): New enum.
5853 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5854 built_in_attributes): New variables.
5855 (def_builtin_1): New function.
5856 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5857
58582007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5859
5860 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5861 DECL_SOURCE_LOCATION for debugging purposes.
5862 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5863 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5864 laying out the decl until later.
5865 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5866 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5867 TREE_ADDRESSABLE.
5868 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5869 operand of an ADDR_EXPR.
5870 * lto-lang.c (enum lto_builtin_type): New enum.
5871 (builtin_type): New typedef.
5872 (builtin_types, string_type_node, const_string_type_node,
5873 wint_type_node, intmax_type_node, uintmax_type_node,
5874 signed_size_type_node): New variables.
5875 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5876 lto_build_c_type_nodes): New functions.
5877 (lto_init): Initialize builtin types.
5878 (lto_set_decl_assembler_name): Let the target machine mangle the
5879 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5880
58812007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5882
5883 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5884 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5885 the type is a constant type. Set the assembler name and inform
5886 the rest of the compiler about the new decl if the decl is not
5887 public.
5888 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5889 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5890 try to read in function bodies for functions that already have bodies.
5891 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5892 equivalency.
5893 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5894 Check for whether we matched a builtin function type before calling
5895 lto_same_type_p on the generated type. Permit cases where the
5896 declaration of an array is unbounded, but the definition is bounded.
5897 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5898 DECL_SIZE_UNIT if necessary.
5899
3f8257db 59002007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 5901
ab20d992 5902 * lto-read.c (input_expr_operand): Get types right
d7f09764
DN
5903 for COMPLEX_CST.
5904
3f8257db 59052007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5906
5907 * lto-read.c (make_new_block, input_cfg): Properly set
5908 n_basic_blocks.
ab20d992 5909
d7f09764
DN
59102007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5911
5912 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5913 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5914
59152007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5916
5917 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5918 construct the integer type for bitfields.
5919
3f8257db 59202007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5921
5922 * lto-read.c (data_in.current_node_has_loc): Removed.
5923 (input_line_info): Returns true if node needs line set.
5924 (set_line_info): Always sets line if called.
5925 (clear_line_info): Removed reference to current_node_needs_loc.
5926 (input_expr_operand): Keeps track locally if current node needs a loc.
5927 (input_local_var): Added code to handle DECL_INITIAL for
5928 static local vars. Only set loc if necessary.
ab20d992 5929
d7f09764
DN
59302007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5931
5932 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5933 DECL_CONTEXT.
5934
59352007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5936
5937 * lto.c: Include langhooks.h.
5938 (lto_find_integral_type): Rework logic to handle the case where
5939 got_byte_size is true, but the bitsize requested and that of the
5940 base_type doesn't match.
5941 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5942 asm_name if we are creating a VAR_DECL.
5943 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5944 definition.
5945 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5946 function reference and use the builtin's decl if so. Set the
5947 DECL_CONTEXT of the RESULT_DECL for the function.
5948 * lto-lang.c (registered_builtin_fndecls): New variable.
5949 (lto_getdecls): Return it.
5950 (lto_builtin_function): Chain the new decl onto
5951 registered_builtin_fndecls.
5952
3f8257db 59532007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
ab20d992 5954
d7f09764
DN
5955 * lto-read.c (process_tree_flags, lto_static_init_local):
5956 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5957 (input_line_info, clear_line_info): Fixed new line number code.
5958 (input_expr_operand): Added type to SWITCH_EXPR.
5959 (lto_read_body): Properly initialized data_in.
5960 Clear line info when leaving.
ab20d992 5961
d7f09764
DN
59622007-11-13 Diego Novillo <dnovillo@google.com>
5963
5964 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5965 Initialize ARTIFICIAL.
5966 (lto_read_subroutine_type_subprogram_DIE): Initialize
5967 SAVED_SCOPE.
5968 * lto-read.c (set_line_info): Remove ; from calls to
5969 LINEMAP_POSITION_FOR_COLUMN.
5970
3f8257db 59712007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5972
5973 * lto-read.c (input_type_ref): Renamed from get_type_ref.
ab20d992 5974 (input_expr_operand, input_local_var): Renamed get_type_ref to
d7f09764 5975 input_type_ref.
ab20d992 5976 (input_expr_operand): Get the types correct for
d7f09764 5977 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
ab20d992 5978
d7f09764
DN
59792007-11-13 Doug Kwan <dougkwan@google.com>
5980
5981 * lto-read.c (input_widest_uint_uleb128): New function.
5982 (input_tree_flags, process_tree_flags, input_line_info,
5983 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5984 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5985 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5986 (lto_static_init_local): Add code to assert that lto_flags_type is
5987 wide enough.
5988
59892007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5990
5991 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5992 (lto_read_subroutine_type_subprogram_DIE): Handle
5993 DW_AT_static_link and DW_AT_specification. Return the
5994 specification if present.
5995 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
ab20d992 5996
d7f09764
DN
59972007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5998
5999 * lto-lang.c: Include target.h.
6000 (registered_builtin_types): New variable.
6001 (lto_type_for_mode): Increase number of modes handled.
6002 (lto_builtin_function): Fix argument list and return the decl.
6003 (lto_register_builtin_type): New function.
6004 (lto_init): Initialize target builtins and language-independent
6005 nodes.
6006 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
6007
3f8257db 60082007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6009
6010 * lto-read.c (input_expr_operand): Added code to properly handle
6011 index filed. Added new RANGE_EXPR case.
ab20d992 6012
3f8257db 60132007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6014
6015 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
6016 (data_in): Added current_node_has_loc field.
6017 (input_line_info, set_line_info, clear_line_info): Added a support
6018 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
6019 did not have on on the source side.
6020 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
6021 numbers too.
6022
60232007-11-09 Doug Kwan <dougkwan@google.com>
6024
6025 * lto-read.c (input_expr_operand): Change type of operand 2 of
6026 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
6027
60282007-11-09 Nathan Froyd <froydnj@codesourcery.com>
6029
6030 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
6031 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
6032 from a DW_AT_specification or DW_AT_abstract_origin attribute to
6033 the new decl we are creating. Move informing the middle end about
6034 the new decl to...
6035 (lto_main): ...here. Inform the middle end about global variables
6036 after we have read in all the input files.
6037 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
6038 variables with internal linkage, so delete the check for internal
6039 linkage. Combine TREE_PUBLIC flags.
6040
60412007-11-08 Nathan Froyd <froydnj@codesourcery.com>
6042
6043 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
6044 DW_AT_decl_line.
6045 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
6046 builtin specially. Move check for attribute compatibility
6047 earlier.
6048
60492007-11-07 Nathan Froyd <froydnj@codesourcery.com>
6050
6051 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
6052 * config-lang.in (gtfiles): Add lto.h and lto.c.
6053 * lto-elf.c: Include ggc.h.
6054 (lto_elf_file_open): Allocate elf_file from GC memory.
6055 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
6056 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
6057 in GC memory.
6058 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
6059 (lto_file_close): Free file from GC memory.
6060 (lto_cache_store_DIE): Allocate the new entry in GC memory.
6061 (lto_read_member_DIE): Fix declaration.
6062 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
6063 in GC memory.
6064 (current_lto_file): New variable.
6065 (lto_main): Use it.
6066 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
6067 lto_die_cache_entry): Move to...
6068 * lto.h: ...here and add GTY markers as appropriate. Delete forward
6069 declarations accordingly.
6070 (struct lto_file_struct): Declare.
6071 (lto_file_vtable): Use it instead of lto_file.
6072
ab20d992
JJ
60732007-11-06 Alon Dayan <alond@il.ibm.com>
6074 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6075
3d3b561f
ML
6076 * lto-read.c (process_flags, lto_static_init_local):
6077 read flags of VAR_DECL and FUNCTION_DECL of size>1.
6078 change global array num_flags_for_code to flags_length_for_code.
6079 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
ab20d992 6080
d7f09764
DN
60812007-11-05 Nathan Froyd <froydnj@codesourcery.com>
6082
6083 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
6084 layout functions to compute information about the newly constructed
6085 type.
6086
60872007-11-02 Nathan Froyd <froydnj@codesourcery.com>
6088
6089 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
6090 case to use DECL_RESULT if necessary.
6091
3f8257db 60922007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6093
6094 * lto-read.c (input_tree_list): Removed.
6095 (input_tree_flags): Added parameter to force flags no matter what
6096 tree code.
6097 (input_expr_operand): Added parameter to input_tree_flags.
6098 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
6099 input_expr_operand rather than input_tree_lists.
6100 (input_local_var): Use input_expr_operand to read attributes
6101 rather then input_tree_list.
6102 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
6103
61042007-10-31 Nathan Froyd <froydnj@codesourcery.com>
6105
6106 * lto.c (lto_read_typedef_DIE): Fix comment typo.
6107 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
6108 TYPE_DECL for it.
6109 * lto-read.c (lto_read_body): Use correct sizes for calculating
6110 type_decls_offset and types_offset.
6111
61122007-10-30 Nathan Froyd <froydnj@codesourcery.com>
6113
6114 * lto-tree.h (union lang_tree_node): Change GTY description to chain
6115 with GENERIC_NEXT.
6116 * config-lang.in (gtfiles): Add lto-lang.c.
6117 * lto-lang.c: Include gt-lto-lto-lang.h.
6118 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
6119 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
6120 (lto/lto-read.o): Likewise.
6121
3f8257db 61222007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6123
6124 * lto-read.c (data_in): Added type_decls and current_col fields.
6125 (string_slot): New type to hold canonized file name.
ab20d992 6126 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
d7f09764
DN
6127 input_line_info, set_line_info, clear_line_info): New functions.
6128 (file_name_hash_table): New hash table.
ab20d992 6129 (input_local_var, input_labels, input_local_vars_index,
d7f09764
DN
6130 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
6131 (input_uleb128): Changed type of byte var.
6132 (input_expr_operand): Large number of changes to get line numbers
6133 correct. Added TYPE_DECL case.
6134 (input_globals): Added code to get TYPE_DECLs processed.
6135 (input_local_var): Added code to process line numbers and
6136 TREE_CHAIN and DECL_CONTEXT.
6137 (input_function, input_constructor): Added call to
6138 clear_line_number.
6139 (lto_static_init_local): Added code to get line numbers correct.
6140 (lto_read_body): Added code to get TYPE_DECLS read and to change
6141 parameters to the calls above that had their parms reorganized.
6142
d7f09764
DN
61432007-10-29 Nathan Froyd <froydnj@codesourcery.com>
6144
6145 * lto.h (lto_resolve_typedecl_ref): Declare.
6146 * lto.c (lto_resolve_typedecl_ref): New function.
6147
61482007-10-29 Mark Mitchell <mark@codesourcery.com>
6149 Nathan Froyd <froydnj@codesourcery.com>
6150
6151 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
6152 DIEs even if we find an abstract origin for this DIE.
6153
61542007-10-29 Nathan Froyd <froydnj@codesourcery.com>
6155
6156 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
6157 RESULT_DECL slightly earlier. Only remember the decl for later
6158 if we successfully merge declarations.
6159
3f8257db 61602007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6161
6162 * lto-read.c (input_expr_operand): Give label_values the proper
6163 context and provide switch statements with a default type.
ab20d992 6164
d7f09764
DN
61652007-10-23 Nathan Froyd <froydnj@codesourcery.com>
6166
6167 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
6168 * lto.c (lto_materialize_function): ...to here.
6169
61702007-10-22 Nathan Froyd <froydnj@codesourcery.com>
6171
6172 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
6173 * lto.c (lto_info_fd_init): Initialize it.
6174 (lto_info_fd_close): Free it.
6175 (lto_materialize_function): New function.
6176 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
6177 unmaterialized_fndecls.
6178 (lto_file_read): Read in all the function bodies after we have read
6179 all of the DWARF info.
6180 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
6181 reading a function body.
6182
3f8257db 61832007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6184
6185 * lto-read.c (input_tree_flags): Renamed from input_flags to be
6186 semetric with output_tree_flags. Added call to log flags.
6187 (process_tree_flags): Renamed from process_flags. Fixed a lot of
6188 type issues to make everything consistent with flags being
6189 unsigned HOST_WIDE_INTS.
6190 (input_expr_operand): Added call to
6191 recompute_tree_invariant_for_addr_expr.
6192 (input_local_var): Added debugging for tree_chains. Now calls
6193 input_tree_flags.
6194 (input_phi): Made flags unsigned HOST_WIDE_INT.
6195 (input_ssa_names): Now calls input_tree_flags.
6196 (lto_read_body): Now sets cfun.
6197 (lto_read_function_body): Now sets current_function_pointer.
ab20d992 6198
d7f09764
DN
61992007-10-19 Nathan Froyd <froydnj@codesourcery.com>
6200
6201 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
6202 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
6203 inspecting fields within.
6204 (lto_read_DIE_at_ptr): Delete check for null result; let callers
6205 handle this appropriately.
6206
62072007-10-19 Nathan Froyd <froydnj@codesourcery.com>
6208
6209 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
6210 DW_AT_abstract_origin properly. Ensure that we're not dealing with
6211 both DW_AT_abstract_origin and DW_AT_specification.
6212 (lto_read_subroutine_type_subprogram_DIE): Handle
6213 DW_AT_abstract_origin.
6214 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
6215 (lto_read_DIE_at_ptr): Define as static to match declaration.
6216 Lookup the PTR in the cache before reading it from the file.
6217 (lto_resolve_var_ref): Adjust accordingly.
6218 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
6219 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
6220
62212007-10-19 Nathan Froyd <froydnj@codesourcery.com>
6222
6223 * lto.c (lto_read_DIE_at_ptr): New function.
6224 (lto_resolve_var_ref): Use it.
6225 (lto_resolve_fn_ref): Use it.
6226 (lto_resolve_field_ref): Use it.
6227 (lto_read_variable_formal_parameter_constant_DIE): Follow
6228 DW_AT_specification and return the associated decl when appropriate.
6229
62302007-10-18 Nathan Froyd <froydnj@codesourcery.com>
6231
6232 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
6233 Implement for scalar integer modes.
6234 (lto_init): Initialize size_type_node.
6235
3f8257db 62362007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6237
6238 * lto-read.c (input_expr_operand): Remove ssa name asserts.
6239 (input_local_var): Add chaining for params.
6240 (input_ssa_names): Add cfun parameter.
6241 (input_function): Remove unnecessary else.
6242
62432007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6244
6245 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
6246 (lto_resolve_var_ref): Use proper types.
6247 (lto_resolve_fn_ref): Likewise.
6248 (lto_resolve_field_ref): Likewise.
6249
62502007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6251
6252 * lto-read.c (input_expr_operand): Remove case.
6253
62542007-10-17 Nathan Froyd <froydnj@codesourcery.com>
6255
6256 * lto.c (lto_read_only_for_child_DIEs): New function.
6257 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
6258 * lto-elf.c (lto_elf_map_lto_section): Remove.
6259 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
6260 * lto-read.c (input_expr_operand): Assert that we never read a NULL
6261 SSA_NAME. Add missing case for mechanical codes.
6262 (input_cfg): Use basic_block_info_for_function instead of
6263 basic_block_info.
6264
3f8257db 62652007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6266
6267 * lto-read.c (input_sleb128, input_integer): Use proper casts.
6268 (input_list): Renamed input_tree_list and modified to follow same
6269 protocol as lto-function-out.c:output_tree_list.
6270 (input_expr_operand): Make asm operands use input_tree_list.
6271 (input_local_var): Now uses input_tree_list.
6272 (lto_read_body): Change placement for setting context of debug_labels.
ab20d992 6273
3f8257db 62742007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6275
6276 * lto-read.c (input_real): Output debugging in proper order.
6277 (input_integer): Compute bit lengths properly.
6278 (input_list): Clean up declaration.
6279 (input_expr_operand): Change calls to input_real to match fix.
6280 Make reading of LTO_bit_field_ref1 match output.
6281 (input_local_var): Make reading of attributes match what is being
6282 written.
6283 (dump_debug_stream): Also print char in hex.
6284 (debug_out_fun): Fix signed unsigned mismatch.
ab20d992 6285
d7f09764
DN
62862007-10-10 Nathan Froyd <froydnj@codesourcery.com>
6287
6288 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
6289 DW_AT_GNU_vector specially, as they are not contiguous with the
6290 specified set of attribute names. Use class_mask to check for
6291 errors at the end of the function
6292 (lto_resolve_var_ref): Read the DIE if it is not cached.
6293 (lto_resolve_fn_ref): Likewise.
6294 (lto_resolve_field_ref): Likewise.
6295
62962007-10-05 Nathan Froyd <froydnj@codesourcery.com>
6297
6298 * lto.c: Include dwarf2out.h.
6299 (lto_cache_store_DIE): Assert that we never change the value.
6300 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
6301 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
6302 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
6303 sensible type instead.
6304 (lto_read_structure_union_class_type_DIE): Store the newly
6305 created type prior to reading the members of the structure to
6306 avoid infinite recursion. Avoid computing types and alignments
6307 for structures whose sizes are unknown.
6308 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
6309 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
6310 DW_AT_const_value, and DW_AT_specification.
6311 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
6312 Return early if we have already constructed the function type.
6313 (lto_read_typedef_DIE): Check to see if the type has been cached
6314 already. Cache the type before reading any children.
6315 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
6316 (lto_read_DIE): Unset context->skip_non_parameters around reading
6317 the DIE.
6318 (lto_resolve_fn_ref): Delete trailing whitespace.
6319
3f8257db 63202007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6321
6322 * lto-read.c (input_expr_operand): Added type for STRING_CST.
ab20d992 6323
d7f09764
DN
63242007-09-10 Nathan Froyd <froydnj@codesourcery.com>
6325
6326 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
6327
63282007-09-07 Nathan Froyd <froydnj@codesourcery.com>
6329
6330 * lto-lang.c (signed_and_unsigned_types): New variable.
6331 (lto_type_for_size): Consult signed_and_unsigned_types to find
6332 an approprite type, creating it if necessary.
6333 (lto_set_decl_assembler_name): Add actual method body.
6334
63352007-09-06 Jim Blandy <jimb@codesourcery.com>
6336
6337 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
6338 can't find a var init for this variable, leave its DECL_INITIAL.
6339 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
6340 lto_elf_map_fn_body.
6341 (lto_map_lto_section): New function.
6342 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
6343 bodies, and lto_elf_map_optional_lto_section for variable
6344 initializers.
6345 (lto_elf_find_section_data): Quietly return NULL if the section is
6346 missing.
6347 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
6348
6349 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
6350
6351 * lto-read.c (lto_read_body): Doc fix.
6352
3f8257db 63532007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6354
6355 * lto-read.c (fun_in): Renamed to data_in.
6356 (input_expr_operand, input_local_var, input_string_internal,
ab20d992 6357 input_string, input_real, input_list, get_label_decl,
d7f09764 6358 get_type_ref, input_expr_operand, input_globals, input_labels,
ab20d992 6359 input_local_vars_index, input_local_var, input_local_vars,
d7f09764
DN
6360 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
6361 (input_constructor): New function.
6362 (lto_read_function_body): Renamed to lto_read_body and generalized
6363 to handle both functions and constructors.
6364 (lto_read_function_body, lto_read_var_init): New function.
ab20d992 6365
3f8257db 63662007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6367
6368 * lto-read.c (input_expr_operand): Assert that there really is a
6369 FUNCTION_DECL.
6370 (input_globals): Removed checks on 0 section.
ab20d992 6371
3f8257db 63722007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6373
6374 * lto-read.c (fun_in): Added local_decls_index and
ab20d992 6375 local_decls_index_d.
d7f09764
DN
6376 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
6377 (input_globals): Enabled code to handle FIELD_DECLs.
6378 (input_local_vars_index, input_local_vars): New function.
6379 (input_local_var): Changed to allow locals to be input randomly.
6380 (lto_read_function_body): Added code to input the
6381 local_decls_index and to free various structures.
ab20d992 6382
d7f09764
DN
63832007-08-17 Jim Blandy <jimb@codesourcery.com>
6384
6385 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
6386 ATTRIBUTE_UNUSED from 'die' formal.
6387
6388 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
6389 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
6390 (input_list): Fix type of 'tag'.
6391 (input_expr_operand): Fix type of 'tag' argument. Update
6392 declaration. Fix type of 'ctag'. Add default case to switch,
6393 since the type of the switched value is now an enum.
6394 (input_local_vars): Fix type of 'tag'.
6395 (input_bb): Fix type of 'tag' argument.
6396 (input_function): Fix type of 'tag' argument.
6397
63982007-08-16 Jim Blandy <jimb@codesourcery.com>
6399
6400 * lto.c (lto_read_member_DIE): Record the tree we create in
6401 fd->die_cache. (Our 'die' argument is no longer unused.)
6402 (lto_resolve_field_ref): New function.
6403 * lto.h (lto_resolve_field_ref): New declaration.
6404
64052007-08-15 Jim Blandy <jimb@codesourcery.com>
6406
6407 * lto-read.c (lto_read_var_init): Mark arguments as unused.
6408
64092007-08-07 Jim Blandy <jimb@codesourcery.com>
6410
6411 * lto.c (lto_read_form): Complete attr_classes table.
6412 (DWARF2_form_data): Doc fix.
ab20d992 6413
d7f09764
DN
64142007-08-05 Mark Mitchell <mark@codesourcery.com>
6415
6416 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
6417 and unmap_var_init.
6418 (lto_read_var_init): Declare.
6419 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
6420 interface for reading variable initializers.
6421 * lto-elf.c (lto_elf_read_var_init): Remove.
6422 (lto_elf_file_vtable): Update initializer.
6423 (lto_elf_read_var_init): Add comment about unused-ness.
6424 * lto-read.c (lto_read_var_init): New.
6425
6426 * lto.c (lto_read_form): Add entry for DW_AT_inline.
6427
3f8257db 64282007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6429
6430 * lto-read.c (lto_read_function_body): Moved declaration of fn
6431 outside of ifdef.
ab20d992 6432
3f8257db 64332007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6434
6435 * lto-read.c (input_uleb128, input_string_internal, input_real,
6436 input_integer, input_record_start, input_list, get_type_ref,
6437 input_flags, input_expr_operand, input_expr_operand,
6438 input_expr_operand, input_local_vars, input_cfg, input_phi,
6439 input_ssa_names, input_bb, input_function): Added semicolons.
6440
ab20d992 6441
3f8257db 64422007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6443
6444 * lto-read.c (input_globals): Remove debugging.
6445 (input_function): Set DECL_ARGUMENTS.
6446
3f8257db 64472007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6448
6449 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
6450 RETURN_EXPR, MODIFY_EXPR and processing of flags.
6451 (input_phi): Made work with operands other than SSA_NAMES and
6452 fixed processing of flags.
6453 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
6454 (input_flags): New function.
6455 * lto-lang.c (lto_init): Changed state of in_lto_p.
ab20d992
JJ
6456
6457
d7f09764
DN
64582007-07-24 Mark Mitchell <mark@codesourcery.com>
6459
6460 * lto-tree.h (lto_varargs_cookie): Remove.
6461 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
6462 skip_non_parameters, skip_parameters.
6463 (lto_varargs_cookie): Remove.
6464 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
6465 parameter types.
6466 (lto_read_abbrev): New function.
6467 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
6468 child DIEs.
6469 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
6470 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
6471 (lto_file_read): Initialize new context fields.
6472 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
6473 (lto_unsigned_type): Remove.
6474 (lto_signed_type): Likewise.
6475 (lto_signed_or_unsigned_type): Likewise.
6476 (lto_init): Do not create lto_varargs_cookie.
6477 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
6478 (LANG_HOOKS_SIGNED_TYPE): Likewise.
6479 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
6480
64812007-07-19 Jan Hubicka <jh@suse.cz>
6482
6483 * lto-read.c (lto_read_function_body): Produce empty scope block
6484 to avoid crash.
6485
64862007-07-18 Mark Mitchell <mark@codesourcery.com>
6487
6488 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
6489 process local variables.
6490 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
6491
3f8257db 64922007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6493
6494 * lto-read.c (input_list, input_expr_operand): Added struct
6495 function parameter.
6496 (init_cfg, finalize_cfg): Removed function.
6497 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
6498 (input_labels, input_local_vars): Now takes input_block parameter rather than
6499 synthsyzing it.
6500 (input_cfg, input_phi, input_ssa_names): New functions.
6501 (input_bb): Now passes in input_blocks. Does not construct cfg
6502 and processes the list of phi functions.
6503 (input_function): Now builds both the cfg and ssa_names table.
6504 (lto_read_function_body): Processes new header fields to construct
6505 streams for the ssa_names and cfg and their debugging.
ab20d992
JJ
6506 * lto-lang.c (lto_init): Set in_lto_p.
6507
6508
d7f09764
DN
65092007-06-28 Mark Mitchell <mark@codesourcery.com>
6510
6511 * lto.h (lto_file_vtable): Add read_var_init.
6512 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
6513 initializers.
6514 (lto_main): Remove bogus asserts.
6515 * lto-elf.c (tm.h): Include it.
6516 (libiberty.y): Likewise.
6517 (lto_elf_file): Add strtab and symtab. Rename
6518 string_table_section_index to sec_strtab.
6519 (lto_elf_file_vtable): Add lto_elf_read_var_init.
6520 (lto_elf_get_shdr): New function.
6521 (lto_elf_free_shdr): Likewise.
6522 (lto_elf_find_section_data): Use them.
6523 (lto_elf_read_symtab): New function.
6524 (lto_elf_lookup_sym): Likewise.
6525 (lto_elf_free_sym): Likewise.
6526 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
6527 (lto_elf_built_init): New function.
6528 (lto_elf_read_var_init): Likewise.
6529 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
6530
3f8257db 65312007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
6532
6533 * lto-read (make_new_block): Initialize the stmt_list.
6534 (lto_static_init_local): Add debugging for missing codes.
ab20d992 6535
d7f09764
DN
65362007-06-26 Mark Mitchell <mark@codesourcery.com>
6537
6538 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
ab20d992 6539 unprototyped functions.
d7f09764
DN
6540
65412007-06-23 Mark Mitchell <mark@codesourcery.com>
6542
6543 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
6544 Handle DW_AT_MIPS_linkage_name.
6545 (lto_read_subroutine_type_subprogram): Likewise. Correct
6546 compilation errors.
6547 (lto_main): Remove incorrect assertions.
6548 * lto-symbtab.c: Build function types out of TREE_LISTs.
6549
6550 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
ab20d992 6551
d7f09764 6552 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
ab20d992 6553
3f8257db 65542007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764 6555
ab20d992 6556 * lto-tree.h (lang_decl, lang_type, language_function): Added
d7f09764 6557 dummy since ggc does not like empty structs.
ab20d992
JJ
6558 * lto-elf.c (libelf.h): Changed to libelf/libelf.h.
6559 * lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
d7f09764
DN
6560 expr->common to expr->base.
6561 (make_new_block): Moved stmt_list to proper place.
6562
ab20d992 65632007-03-14 Robert Kennedy <jimbob@google.com>
d7f09764
DN
6564
6565 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
6566 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
6567 assembler name from DWARF.
6568 * lto-lang.c (lto_set_decl_assembler_name) New function.
6569
65702006-09-10 Mark Mitchell <mark@codesourcery.com>
6571
6572 * lto.h (lto_file_vtable): New structure.
6573 (lto_file): Add vtable pointer.
6574 (lto_file_init): Add vtable paramter.
6575 (lto_read_function_body): New function.
6576 (lto_symtab_merge_fn): New function.
6577 * lto.c (lto_file_init): Add vtable parameter.
6578 (lto_read_form): Fill in entries for DW_AT_prototyped,
6579 DW_AT_frame_base.
6580 (lto_read_subroutine_type_subprogram_DIE): New function.
6581 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
6582 DW_TAG_subprogram.
6583 * lto-elf.c (lto_elf_vile_vtable): New variable.
6584 (lto_elf_file_open): Pass it to lto_file_init.
6585 (lto_elf_map_fn_body): New function.
6586 (lto_elf_unmap_fn_body): Likewise.
6587 * lto-read.c: New file.
6588 * lto-symtab.c (lto_symtab_merge_fn): New function.
6589 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
6590 tree_rest_of_compilation.
6591 * Make-lang.in (LTO_OBJS): Add lto-read.o
6592 (lto-read.o): New target.
6593
65942006-09-03 Mark Mitchell <mark@codesourcery.com>
6595
6596 * lto.c (<inttypes.h>): Don't include it.
6597 (lto_context): Don't typedef it.
6598 (lto_resolve_reference): New function.
6599 (lto_read_form): Use it.
6600 (lto_resolve_type_ref): New function.
6601 (lto_resolve_var_ref): Likewise.
6602 (lto_resolve_fn_ref): Likewise.
6603 * lto.h (<inttypes.h>): Include it.
6604 (lto_context): New type.
6605 (lto_ref): New structure.
6606 (lto_resolve_type_ref): Declare.
6607 (lto_resolve_var_ref): Likewise.
6608 (lto_resolve_fn_ref): Likewise.
6609
66102006-08-18 Mark Mitchell <mark@codesourcery.com>
6611
6612 * lang-specs.h: New file.
6613
66142006-08-14 Mark Mitchell <mark@codesourcery.com>
6615
6616 * lto.c (lto_info_fd_init): Allocate the DIE cache.
6617 (lto_info_fd_close): Deallocate it.
6618 (lto_die_cache_entry): New structure.
6619 (lto_cache_hash): New function.
6620 (lto_cache_eq): Likewise.
6621 (lto_cache_store_DIE): Likewise.
6622 (lto_cache_lookup_DIE): Likewise.
6623 (lto_read_referenced_type_DIE): Use the cache.
6624 (lto_read_pointer_type_DIE): Robustify.
6625 (lto_read_DIE): Use the cache.
6626 * lto.h (hashtab.h): Include.
6627 (lto_info_fd): Add DIE cache.
6628 * Make-lang.in (LTO_H): New variable.
6629 (lto/lto-lang.o): Use LTO_H.
6630 (lto/lto-elf.o): Likewise.
6631 (lto/lto-symtab.o): Likewise.
6632
66332006-07-09 Mark Mitchell <mark@codesourcery.com>
6634
6635 * lto.c (lto_abi_mismatch_error): New function.
6636 (lto_abbrev_read): Initialize num_abbrevs.
6637 (lto_read_form): Specify allowed form classes for
6638 DW_AT_declaration. Adjust for change to lto_set_cu_context.
6639 (lto_read_variable_formal_parameter_constant_DIE): Handle
6640 DW_AT_declaration. Call lto_symtab_merge_var.
6641 (lto_read_pointer_type_DIE): New function.
6642 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
6643 not creat TYPE_DECLs for types that already have them.
6644 (lto_read_DIE): Add lto_read_pointer_type_DIE.
6645 (lto_set_cu_context): Make cu_start point to the header, not the
6646 first DIE.
6647 (lto_file_read): Adjust for change to lto_set_cu_context.
6648 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
6649 (lto/lto-symtab.o): New rule.
6650 * lto-tree.h (lang_identifier): Add decl field.
6651 (LANG_IDENTIFIER_CAST): New macro.
6652 (LTO_IDENTIFIER_DECL): Likewise.
6653 (lto_symtab_merge_var): Declare.
6654 * lto-symtab.c: New file.
6655
66562006-07-02 Daniel Berlin <dberlin@dberlin.org>
6657
6658 * lto.c (lto_context): Add current_cu and info_fd members.
6659 (DWARF2_CompUnit): New structure.
6660 (lto_read_DIE): Take lto_info_fd *.
6661 (lto_read_child_DIEs): Ditto.
6662 (lto_file_corrupt_error): Constify argument.
6663 (lto_set_cu_context): New function
6664 (lto_info_fd_init): Ditto.
6665 (lto_info_fd_close): Ditto.
6666 (lto_file_init): Use lto_info_fd_init.
6667 (lto_file_close): Use lto_info_fd_close.
6668 (lto_read_initial_length): Pass in pointer to header size.
6669 (lto_read_comp_unit_header): Correct cu_length to
6670 real length from beginning of header. Take lto_info_fd * as
6671 argument.
6672 (find_cu_for_offset): New function.
6673 (lto_read_form): Change first argument to lto_info_fd *.
6674 Add FORM_CONTEXT argument.
6675 Handle DW_FORM_ref_addr.
ab20d992 6676 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
d7f09764
DN
6677 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6678 Swap contexts if necessary for form.
6679 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6680 lto_file_corrupt_error.
6681 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6682 (lto_read_referenced_type_DIE): Change first argument to
6683 lto_info_fd *. Access lto_fd fields through base pointer.
6684 (lto_read_compile_unit_DIE): Change first argument to an
6685 lto_info_fd *.
6686 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6687 (lto_read_base_type_DIE): Ditto.
6688 (lto_read_child_DIEs): Ditto.
6689 (lto_read_DIE): Ditto. Change type of function pointer.
6690 (lto_info_read): New function.
6691 (lto_set_cu_context): Ditto.
6692 (lto_file_read): Use lto_info_read, walk resulting CU's
6693 (lto_main): Update for lto_info_fd change.
6694 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6695 necessary.
6696 * lto.h (DWARF2_CompUnit): New structure.
6697 (lto_info_fd): Ditto.
6698 (lto_file): Change debug_info to be an lto_info_fd.
ab20d992 6699
d7f09764
DN
67002006-06-25 Mark Mitchell <mark@codesourcery.com>
6701
6702 * lto.c (toplev.h): Include it.
6703 (dwarf2.h): Likewise.
6704 (tree.h): Likewise.
6705 (tm.h): Likewise.
6706 (cgraph.h): Likewise.
6707 (ggc.h): Likewise.
6708 (inttypes.h): Likewise.
6709 (DWARF2_attr): New type.
6710 (DWARF2_abbrev): Likewise.
6711 (DWARF2_class): Likewise.
6712 (DWARF2_form_data): Likewise.
6713 (lto_context): Likewise.
6714 (lto_fd_init): New function.
6715 (lto_abbrev_fd_init): Likewise.
6716 (lto_abbrev_fd_close): Likewise.
6717 (lto_file_init): Use them.
6718 (lto_file_close): New function.
6719 (lto_file_corrupt_error): Likewise.
6720 (LTO_CHECK_INT_VAL): New macro.
6721 (lto_check_size_t_val): New function.
6722 (lto_check_int_val): Likewise.
6723 (LTO_READ_TYPE): New macro.
6724 (lto_read_ubyte): New function.
6725 (lto_read_uhalf): Likewise.
6726 (lto_read_uword): Likewise.
6727 (lto_read_uleb128): Likewise.
6728 (lto_read_initial_length): Likewise.
6729 (lto_abbrev_read_attrs): Likewise.
6730 (lto_abbrev_read): Likewise.
6731 (lto_abbrev_lookup): Likewise.
6732 (lto_read_section_offset): Likewise.
6733 (lto_read_comp_unit_header): Likewise.
6734 (lto_read_form): Likewise.
6735 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6736 (LTO_BEGIN_READ_ATTRS): Likewise.
6737 (LTO_END_READ_ATTRS): Likewise.
6738 (lto_unsupported_attr_error): New function.
6739 (lto_get_identifier): Likewise.
6740 (lto_read_referenced_type_DIE): Likewise.
6741 (lto_read_compile_unit_DIE): Likewise.
6742 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6743 (lto_read_base_type_DIE): Likewise.
6744 (lto_read_DIE): Likewise.
6745 (lto_read_child_DIEs): Likewise.
6746 (lto_file_read): Read DIEs.
6747 (lto_main): Ask middle end to emit entities.
6748 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6749 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6750 (lto_elf_file_close): Likewise.
6751 * lto.h (lto_file): Declare.
6752 (DWARF2_abbrev): Likewise.
6753 (lto_fd): New type.
6754 (lto_abbrev_fd): Likewise.
6755 (lto_file): Use new types.
6756 (lto_file_close): Declare.
6757 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
ab20d992 6758
d7f09764
DN
67592006-06-18 Mark Mitchell <mark@codesourcery.com>
6760
6761 * lto.h: New file.
6762 * lto.c: New file.
6763 * lto-elf.c: New file.
6764 * lto-lang.c (flags.h): Include it.
6765 (lto.h): Likewise.
6766 (lto_init): New function.
6767 (lto_write_globals): Remove.
ab20d992 6768 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
d7f09764
DN
6769 (LANG_HOOKS_INIT): Define.
6770 (LANG_HOOKS_PARSE_FILE): Likewise.
6771 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6772 (LTO_EXE): Link with libelf.
6773 (lto/lto-lang.o): Update dependencies.
6774 (lto/lto.o): New target.
6775 (lto/lto-elf.o): Likewise.
6776
67772006-06-12 Mark Mitchell <mark@codesourcery.com>
6778
6779 * config-lang.in: New file.
6780 * Make-lang.in: Likewise.
6781 * lto-tree.h: Likewise.
6782 * lto-lang.c: Likewise.
818ab71a 6783\f
6a720d41 6784Copyright (C) 2006-2024 Free Software Foundation, Inc.
d7f09764 6785
818ab71a
JJ
6786Copying and distribution of this file, with or without modification,
6787are permitted in any medium without royalty provided the copyright
6788notice and this notice are preserved.