]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Replace 8 spaces with a tabular in ChangeLog files.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
3d78e008
ML
12018-08-27 Martin Liska <mliska@suse.cz>
2
3 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
4 fndecl_built_in_p and remove check for FUNCTION_DECL if
5 possible.
3d78e008
ML
6 * lto-symtab.c (lto_symtab_merge_p): Likewise.
7 (lto_symtab_merge_decls_1): Likewise.
8 (lto_symtab_merge_symbols): Likewise.
9 * lto.c (lto_maybe_register_decl): Likewise.
10 (read_cgraph_and_symbols): Likewise.
11
efd9eb29
TV
122018-08-21 Tom de Vries <tdevries@suse.de>
13
14 * lto.c (lto_main): Call debuginfo_early_start and
15 debuginfo_early_stop.
16
00abf86c
MS
172018-07-20 Martin Sebor <msebor@redhat.com>
18
19 PR middle-end/82063
20 * lto-lang.c (lto_handle_option): Change function argument
21 to HOST_WIDE_INT.
22
efe0e6cd
RB
232018-07-20 Richard Biener <rguenther@suse.de>
24
25 PR debug/86585
26 * lto.c (unify_scc): Before we throw away an SCC see if we
27 can amend prevailing single-entry SCC with debug refs.
28
814f3331
JH
292018-07-13 Jan Hubicka <hubicka@ucw.cz>
30
31 * lto.c (do_stream_out): Add PART parameter; open dump file.
32 (stream_out): Add PART parameter; pass it to do_stream_out.
33 (lto_wpa_write_files): Update call of stream_out.
34
c518c102
ML
352018-07-04 Martin Liska <mliska@suse.cz>
36
37 PR middle-end/66240
38 PR target/45996
39 PR c/84100
40 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
41 instead of memcmp.
42
b54006ae
ML
432018-06-20 Martin Liska <mliska@suse.cz>
44
45 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 46 FIXME comment.
b54006ae 47
56f62793
ML
482018-06-19 Martin Liska <mliska@suse.cz>
49
50 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 51 of get_create.
56f62793
ML
52 (undo_partition): Likewise.
53 (lto_balanced_map): Likewise.
54
1724941e
ML
552018-06-19 Martin Liska <mliska@suse.cz>
56
57 * config-lang.in: Remove stagestuff.
58
29a50dfb
JH
592018-06-08 Jan Hubicka <hubicka@ucw.cz>
60
61 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
62 New global vars.
63 (lto_register_dumps): New hook.
64 (LANG_HOOKS_REGISTER_DUMPS): New.
65 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
66 * lto-symtab.c: Include lto.h; dump into dump_file instead of
67 symtab->dump_file.
68 (lto_symtab_merge_decls): Initialize dump file.
69 * lto.c (read_cgraph_and_symbols): Initialize dump file.
70 (do_whole_program_analysis): Likewise.
71
74644756
ML
722018-06-08 Martin Liska <mliska@suse.cz>
73
74 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
75 instead of summary_uid.
76
99353fcf
ML
772018-06-08 Martin Liska <mliska@suse.cz>
78
79 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
80 of get.
81 (undo_partition): Likewise.
82 (lto_balanced_map): Likewise.
83
31db0fe0
ML
842018-06-08 Martin Liska <mliska@suse.cz>
85
86 * lto-partition.c (add_references_to_partition): Remove support
87 for MPX (macros, related functions, fields in cgraph_node, ...).
88 (add_symbol_to_partition_1): Likewise.
89 (privatize_symbol_name): Likewise.
90 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
91
f115c9b5
RB
922018-06-05 Richard Biener <rguenther@suse.de>
93
94 * lto.c (cmp_type_location): Expand locations only once.
95
5b42d196
JH
962018-05-30 Jan Hubicka <hubicka@ucw.cz>
97
98 * lang.opt (lto_linker_output): Add nolto-rel.
99 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
100 and LTO_LINKER_OUTPUT_NOLTOREL.
101 (lto_init): Generate lto when doing incremental link.
102 * lto.c (lto_precess_name): Add lto1-inclink.
103
ab168044
JH
1042018-05-18 Jan Hubicka <jh@suse.cz>
105
106 PR lto/85583
107 * lto-partition.c (account_reference_p): Do not account
108 references from aliases; do not account refernces from
109 external initializers.
110
b6e33d73
JH
1112018-04-30 Jan Hubicka <jh@suse.cz>
112
113 * lto.c (cmp_partitions_size): Remove.
114 (lto_wpa_write_files): Also output priorities; do not sort partitions.
115 (cmp_partition_order): Move to ...
116 * lto-partition.c (cmp_partition_order): ...
117 (lto_1_to_1_map): Sort partitions.
118
e693ebce
JH
1192018-04-20 Jan Hubicka <jh@suse.cz>
120
121 * lto-partition.c (lto_balanced_map): Fix sanity check.
122
ddb0b824
JH
1232018-04-19 Jan Hubicka <jh@suse.cz>
124
125 * lto-partition.c: Include sreal.h
126 (add_symbol_to_partition_1): Use size instead of self_size
127 for size estimate.
128 (account_reference_p): New.
129 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
130 fix accounting errors in boundary size; add debug output; combine cost
131 as cost/size instead of cost/internal; reduce the partitioning error to
132 +- 1/8 of the parttion size.
133
1781a04f
ML
1342018-04-19 Martin Liska <mliska@suse.cz>
135
136 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
137 for multiple PREVAILING_DEF_IRONLY for common symbols.
138
6867cd69
ML
1392018-04-18 Martin Liska <mliska@suse.cz>
140
141 * lto.c (lto_read_decls): Fix GNU coding style and typos.
142
af597536
ML
1432018-04-18 Martin Liska <mliska@suse.cz>
144
145 PR ipa/83983
146 PR ipa/85391
147 * lto.c (cmp_type_location): New function.
148 (lto_read_decls): First collect all types, then
149 sort them according by location before register_odr_type
150 is called.
151
7d6051b1
JH
1522018-04-18 Jan Hubicka <jh@suse.cz>
153 Martin Liska <mliska@suse.cz>
154
155 PR lto/85391
156 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
157 types.
158
23d87577
ML
1592018-04-11 Martin Liska <mliska@suse.cz>
160
161 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
162 function.
163
c16833dc
ML
1642018-04-10 Martin Liska <mliska@suse.cz>
165
166 PR lto/85248
167 * lto-symtab.c (lto_symtab_merge_p): Do not check for
168 TREE_VALUES of error attributes.
169
8d96e546
ML
1702018-04-10 Richard Biener <rguenther@suse.de>
171 Martin Liska <mliska@suse.cz>
172
173 PR lto/85248
174 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
175
97bb4812
JH
1762018-02-08 Jan Hubicka <hubicka@ucw.cz>
177
178 * lto-partition.c (lto_balanced_map): Watch overflow.
179
39aa9b23
JH
1802018-02-08 Jan Hubicka <hubicka@ucw.cz>
181
182 PR ipa/81360
183 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
184 (read_cgraph_and_symbols): Use
185 symtab_node::output_to_lto_symbol_table_p.
186
26a823f0
JH
1872018-01-30 Jan Hubicka <hubicka@ucw.cz>
188
189 * lto.c (register_resolution): Remove forgotten sanity check.
190
43fbc2e9
JH
1912018-01-30 Jan Hubicka <hubicka@ucw.cz>
192
193 PR lto/81004
194 * lto.c: Include builtins.h
195 (register_resolution): Merge resolutions in case trees was
196 merged across units.
197 (lto_maybe_register_decl): Break out from ...
198 (lto_read_decls): ... here.
199 (unify_scc): Also register decls here.
200 (read_cgraph_and_symbols): Sanity check that all resolutions was
201 read.
202
ee034d31
EB
2032018-02-02 Eric Botcazou <ebotcazou@adacore.com>
204
205 PR lto/83954
206 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
207 component type of array types with non-aliased component.
208
44c945e6
JH
2092018-01-30 Jan Hubicka <hubicka@ucw.cz>
210
211 PR lto/83954
212 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
213 for type match warning on arrays of pointers.
214
cde9b2f8
ML
2152018-01-23 Martin Liska <mliska@suse.cz>
216
217 PR lto/81440
218 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
219 trailing arrays at the end of a struct.
220
5c0caeb3
RS
2212018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
222 Alan Hayward <alan.hayward@arm.com>
223 David Sherwood <david.sherwood@arm.com>
224
225 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
226
928686b1
RS
2272018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
228 Alan Hayward <alan.hayward@arm.com>
229 David Sherwood <david.sherwood@arm.com>
230
231 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
232 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
233
85ec4feb
JJ
2342018-01-03 Jakub Jelinek <jakub@redhat.com>
235
236 Update copyright years.
237
4849deb1
JJ
2382017-12-15 Jakub Jelinek <jakub@redhat.com>
239
240 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
241 affects_type_identity and handler fields, adjust comments.
242
734914b6
RS
2432017-12-07 Richard Sandiford <richard.sandiford@arm.com>
244
245 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
246
5d9ae53d
MS
2472017-12-07 Martin Sebor <msebor@redhat.com>
248
249 PR c/81544
250 * lto-lang.c (lto_attribute_table): Initialize new member of struct
251 attribute_spec.
252
5de73c05
JJ
2532017-11-30 Jakub Jelinek <jakub@redhat.com>
254
255 * lto.c (create_subid_section_table): Use ; instead of ;;.
256
974aedcc
MP
2572017-11-22 Marek Polacek <polacek@redhat.com>
258
259 PR c++/60336
260 PR middle-end/67239
261 PR target/68355
262 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
263
1bad9c18
JH
2642017-11-10 Jan Hubicka <hubicka@ucw.cz>
265
266 * lto-partition.c (lto_balanced_map): Use frequency accessor.
267
65991ea3
JH
2682017-10-13 Jan Hubicka <hubicka@ucw.cz>
269
270 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
271
4e7d0260
NS
2722017-10-11 Nathan Sidwell <nathan@acm.org>
273
274 * lto.c (mentions_vars_p_decl_with_vis): Use
275 DECL_ASSEMBLER_NAME_RAW.
276 (lto_fixup_prevailing_decls): Likewise.
277
8e6cdc90
RS
2782017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
279
280 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
281 operating on trees as wide_ints.
282
357b7604
RS
2832017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
284 Alan Hayward <alan.hayward@arm.com>
285 David Sherwood <david.sherwood@arm.com>
286
287 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
288
1ea85365
RB
2892017-08-21 Richard Biener <rguenther@suse.de>
290
92a285c1
ML
291 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
292 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
293 TYPE_DECL debug processing, register DIE references from
294 prevailing SCCs with the debug machinery.
295 (lto_section_with_id): Handle LTO debug sections.
1ea85365 296
8e093270
NS
2972017-08-16 Nathan Sidwell <nathan@acm.org>
298
299 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
300 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
301 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
302
eac3ab4a
TV
3032017-08-08 Tom de Vries <tom@codesourcery.com>
304
305 * lto.c: Include attribs.h.
306
314e6352
ML
3072017-08-08 Martin Liska <mliska@suse.cz>
308
309 * lto-lang.c: Include header files.
310 * lto-symtab.c: Likewise.
311
63e434ca
RB
3122017-08-03 Richard Biener <rguenther@suse.de>
313
314 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
315 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
316 use DECL_LANG_FLAG_0.
317 (lto_symtab_prevail_decl): Likewise.
318
417ca011
TD
3192017-07-07 Torsten Duwe <duwe@suse.de>
320
321 * lto-lang.c (lto_attribute_table): Add entry for
322 "patchable_function_entry".
323
20deef65
NS
3242017-07-19 Nathan Sidwell <nathan@acm.org>
325
326 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
327 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
328
0eaf0bfe
JH
3292017-07-06 Jan Hubicka <hubicka@ucw.cz>
330
331 * lto-partition.c (lto_balanced_map): Do not check
332 flag_toplevel_reorder.
2db9b7cd 333
0eaf0bfe 3342017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
335 * lto-lang.c (lto_init): Use builtin_structptr_types.
336
d1eed638
JH
3372017-06-15 Jan Hubicka <hubicka@ucw.cz>
338 Thomas Preud'homme <thomas.preudhomme@arm.com>
339
340 PR lto/69866
341 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
342 that resolved externally.
343
d2db2e6b
JH
3442017-05-23 Jan Hubicka <hubicka@ucw.cz>
345
346 * lto.c (do_whole_program_analysis): Replace inline_free_summary
347 by ipa_free_fn_summary.
348
464d0118
ML
3492017-05-23 Martin Liska <mliska@suse.cz>
350
351 * lto-symtab.c (lto_cgraph_replace_node): Use
352 symtab_node::dump_{asm_,}name functions.
353 * lto.c (read_cgraph_and_symbols): Likewise.
354 (do_whole_program_analysis): Likewise.
355
6c52831d
ML
3562017-05-23 Martin Liska <mliska@suse.cz>
357
358 * lto.c (read_cgraph_and_symbols): Use the renamed function.
359 (do_whole_program_analysis): Use the renamed function.
360
27d020cf
JH
3612017-05-22 Jan Hubicka <hubicka@ucw.cz>
362
363 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
364 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
365
815d9cc6
XR
3662017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
367
92a285c1 368 PR c++/80038
815d9cc6
XR
369 * lto-lang.c (lto_init): Set in_lto_p earlier.
370
350792ff
RB
3712017-04-12 Richard Biener <rguenther@suse.de>
372 Bernd Edlinger <bernd.edlinger@hotmail.de>
373
374 PR middle-end/79671
375 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
376
4a44a5f3
ML
3772017-02-14 Martin Liska <mliska@suse.cz>
378
379 * lto.c (do_stream_out): Free LTO file filename string.
380
8a3a6ab4
DM
3812017-01-19 David Malcolm <dmalcolm@redhat.com>
382
383 * lto-lang.c (builtin_type_for_size): Convert call to
384 lto_type_for_size to one through the langhook.
385 (lto_type_for_size): Move to langhooks.c and rename to
386 lhd_type_for_size.
387 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
388
4c4b4703
JJ
3892017-01-11 Jakub Jelinek <jakub@redhat.com>
390
391 PR middle-end/50199
392 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
393 if it was 0.
394
bd2c6270
JJ
3952017-01-09 Jakub Jelinek <jakub@redhat.com>
396
397 PR translation/79019
398 PR translation/79020
399 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
400
24d3f325
NS
4012017-01-06 Nathan Sidwell <nathan@acm.org>
402
5406184c
NS
403 * lto-partition.c (promote_symbol): Write to dump file sooner,
404 include alias promoting too.
405
24d3f325
NS
406 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
407 (may_need_named_section_p): Likewise.
408 (rename_statics): Likewise.
409 (lto_promote_cross_file_statics): Likewise.
410
cbe34bb5
JJ
4112017-01-01 Jakub Jelinek <jakub@redhat.com>
412
413 Update copyright years.
414
6c8bf066
GJL
4152016-11-30 Georg-Johann Lay <avr@gjlay.de>
416
417 PR lto/78562
418 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
419 mismatch if the two types are built-in.
420
7fa6a965
PK
4212016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
422
423 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
424
efb71232
RB
4252016-11-23 Richard Biener <rguenther@suse.de>
426
427 PR lto/78472
428 * lto.c (hash_canonical_type): Ignore zero-sized fields.
429
48330c93
BE
4302016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
431
432 PR c++/71973
433 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
434
899ca90e 4352016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
436 Alan Hayward <alan.hayward@arm.com>
437 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
438
439 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
440
65179585
RB
4412016-10-31 Richard Biener <rguenther@suse.de>
442
443 PR lto/78129
444 * lto.c (do_whole_program_analysis): Bail out after errors
445 from WPA analysis.
446
8bc5448f
KV
4472016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
448
449 * lto-partition.c: Include tree-vrp.h.
450 * lto.c: Likewise.
451
68317985
RB
4522016-09-20 Richard Biener <rguenther@suse.de>
453
454 * lto.c (lto_main): Call early_finish with "<artificial>" as
455 filename.
456
321e76fb
RB
4572016-09-19 Richard Biener <rguenther@suse.de>
458
459 * lto.c (lto_main): Invoke early_finish debug hook.
460
ea6e17d5
RB
4612016-07-25 Richard Biener <rguenther@suse.de>
462
463 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
464 (unify_scc): Likewise.
465 (lto_read_decls): Likewise.
466
e9ac1f86
JJ
4672016-06-28 Jakub Jelinek <jakub@redhat.com>
468
469 * Make-lang.in: Don't cat ../stage_current if it does not exist.
470
277d7ee0
AK
4712016-06-23 Andi Kleen <ak@linux.intel.com>
472
473 * Make-lang.in: Add support for autofdo (disabled for now)
474
4d926e34
MS
4752016-06-10 Martin Sebor <msebor@redhat.com>
476
477 PR c/71392
478 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
479 attribute in type-generic builtins.
480
479f99c9
JH
4812016-05-16 Jan Hubicka <hubicka@ucw.cz>
482
483 * lto-partition.c (add_symbol_to_partition_1): Likewise.
484
1a0bf5e1
JH
4852016-05-03 Jan Hubicka <hubicka@ucw.cz>
486
487 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
488
a2e76867
PK
4892016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
490
491 * lto-partition.h (lto_balanced_map): New parameter.
492 * lto-partition.c (lto_balanced_map): New parameter
493 max_partition_size.
494 Check if partition size is greater than max_partition_size.
495 * lto.c (do_whole_program_analysis): Adjust calls to
496 lto_balanced_map() to pass 2nd argument.
497
ea913779
L
4982016-03-17 H.J. Lu <hongjiu.lu@intel.com>
499
500 PR lto/70258
501 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
502 PIE.
503
56aae4b7
JJ
5042016-03-08 Jakub Jelinek <jakub@redhat.com>
505
506 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
507 - becuase -> because.
508
ed5d948d
TV
5092016-02-15 Tom de Vries <tom@codesourcery.com>
510
511 PR lto/69655
512 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
513 argument.
514
4ecbadc7
ML
5152016-01-27 Martin Liska <mliska@suse.cz>
516
517 * lto-partition.c (add_symbol_to_partition_1): Remove usage
518 of hsa_summaries.
519
e49d321f
JH
5202016-01-19 Jan Hubicka <hubicka@ucw.cz>
521
522 PR lto/69136
523 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
524 decls have no assemblernames.
525
b2b40051 5262016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 527 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
528
529 * lto-partition.c: Include "hsa.h"
530 (add_symbol_to_partition_1): Put hsa implementations into the
531 same partition as host implementations.
532
5803bd01
JH
5332016-01-12 Jan Hubicka <hubicka@ucw.cz>
534
535 PR lto/69003
536 * lto-partition.c (rename_statics): Fix pasto.
537
13092f61
RB
5382016-01-18 Richard Biener <rguenther@suse.de>
539
540 PR lto/69337
541 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
542 function vs. variable.
543
3c4e91c9
RB
5442016-01-12 Richard Biener <rguenther@suse.de>
545
546 PR lto/69077
547 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
548 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
549
818ab71a
JJ
5502016-01-04 Jakub Jelinek <jakub@redhat.com>
551
552 Update copyright years.
553
3fddb2ef
JH
5542015-12-10 Jan Hubicka <hubicka@ucw.cz>
555
556 PR lto/68878
557 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
558 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
559 (lto_symtab_prevailing_decl): Use it.
560
4a38b02b
IV
5612015-12-15 Ilya Verbin <ilya.verbin@intel.com>
562
563 * lto.c: Include stringpool.h and fold-const.h.
564 (offload_handle_link_vars): New static function.
565 (lto_main): Call offload_handle_link_vars.
566
ca834876
JH
5672015-12-10 Jan Hubicka <hubicka@ucw.cz>
568
569 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
570
958a627f
JH
5712015-12-11 Jan Hubicka <hubicka@ucw.cz>
572
573 PR ipa/61886
574 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
575 values of error and warning attributes.
576
da20571a
JH
5772015-12-08 Jan Hubicka <hubicka@ucw.cz>
578
579 PR lto/68811
580 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
581 DECL.
582 (LTO_NO_PREVAIL): Use gcc_checking_assert.
583
378004b9
JH
5842015-12-08 Jan Hubicka <hubicka@ucw.cz>
585
586 PR lto/68811
587 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
588 by itself.
589
6b9ac179
JH
5902015-12-08 Jan Hubicka <hubicka@ucw.cz>
591
592 PR ipa/61886
593 * lto-symtab.c: Include lto-symtab.h.
594 (lto_cgraph_replace_node): Do not merge profiles here.
595 (lto_symtab_merge_p): New function.
596 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
597 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
598 aliases.
599 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
600 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
601 * lto.c: Include lto-symtab.h
602 * lto-symtab.h: New.
603
41c60c6c
JH
6042015-12-08 Jan Hubicka <hubicka@ucw.cz>
605
606 PR ipa/61886
607 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
608 are not part of the definition.
609 (contained_in_symbol): Likewise.
610 (promote_symbol): When promoting a symbol also promote all transparent
611 aliases.
612 (rename_statics): Weakref needs unique name, too.
613
71e54687
JH
6142015-12-07 Jan Hubicka <hubicka@ucw.cz>
615
616 PR ipa/61886
617 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
618 rename_statics, rename_statics): Handle transparent aliases.
619
88636b62
JH
6202015-12-04 Jan Hubicka <hubicka@ucw.cz>
621
622 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
623 merged_comdat.
624
8c86248e
JH
6252015-12-01 Jan Hubicka <hubicka@ucw.cz>
626
627 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
628
1ff9ed6f
JH
6292015-11-25 Jan Hubicka <jh@suse.cz>
630
631 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
632 * lang.opt (lto_linker_output): New enum.
633 (flinker_output): New flag.
634
22bea0be
JH
6352015-11-24 Jan Hubicka <hubicka@ucw.cz>
636
637 * lto-symtab.c: Include alias.h
638 (warn_type_compatibility_p): Replace types_compatible_p checks by
639 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
640 (lto_symtab_merge): Compare DECL sizes.
641 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
642
aea50b45
JH
6432015-11-24 Jan Hubicka <hubicka@ucw.cz>
644
645 * lto.c (iterative_hash_canonical_type): Recruse for all types
646 which pass !canonical_type_used_p.
647 (gimple_register_canonical_type_1): Sanity check we do not compute
648 canonical type of anything with !canonical_type_used_p.
649 (gimple_register_canonical_type): Skip all types that are
650 !canonical_type_used_p
651
deb3dae6
JH
6522015-11-24 Jan Hubicka <hubicka@ucw.cz>
653
654 * lto.c (unify_scc): Use free_node.
655
f85d2487
JH
6562015-11-21 Jan Hubicka <hubicka@ucw.cz>
657
658 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
659 (gimple_register_canonical_type_1): Check that pointers do not get
660 canonical types.
661 (gimple_register_canonical_type): Do not register pointers.
662
6632015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
664
665 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
666 flag for types that are not ODR; fix loop walking parameters.
667
69f293c9
AM
6682015-11-11 Andrew MacLeod <amacleod@redhat.com>
669
670 * lto-lang.c: Remove unused header files.
671 * lto-object.c: Likewise.
672 * lto-partition.c: Likewise.
673 * lto-symtab.c: Likewise.
674 * lto.c: Likewise.
675
ee45a32d
EB
6762015-11-08 Eric Botcazou <ebotcazou@adacore.com>
677
678 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
679
0aad0198
RS
6802015-11-07 Richard Sandiford <richard.sandiford@arm.com>
681
682 * lto-lang.c: Don't undef DEF_BUILTIN.
683
2adfab87
AM
6842015-10-29 Andrew MacLeod <amacleod@redhat.com>
685
686 * lto-lang.c: Reorder #include's and remove duplicates.
687 * lto-object.c: Likewise.
688 * lto-partition.c: Likewise.
689 * lto-symtab.c: Likewise.
690 * lto.c: Likewise.
691
b2b29377
MM
6922015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
693
694 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
695 conditionals.
696 (lto_fixup_state): Likewise.
697 (do_whole_program_analysis): Use
698 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
699 conditionals.
700
d9a6bd32
JJ
7012015-10-13 Jakub Jelinek <jakub@redhat.com>
702
703 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
704 DEF_FUNCTION_TYPE_11): Define.
705
9c4eeafc
JH
7062015-10-10 Jan Hubicka <hubicka@ucw.cz>
707
708 * lto.c (hash_canonical_type): Honor
709 type_with_interoperable_signedness.
710
3e32ee19
NS
7112015-09-28 Nathan Sidwell <nathan@codesourcery.com>
712
713 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
714 (DEF_FUNCTION_TYPE_VAR_11): Delete.
715
f196d062
RB
7162015-08-31 Richard Biener <rguenther@suse.de>
717
718 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
719 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
720 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
721 participate in merging with something else.
722
45aee888
RB
7232015-08-31 Richard Biener <rguenther@suse.de>
724
725 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
726 test, do not replace a non-builtin with a builtin.
727 * lto.c (compare_tree_sccs_1): Do not merge things we stream
728 as builtins vs. non-builtins.
729
a79683d5
TS
7302015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
731
732 * lto.h: Remove useless typedefs.
733
48d859bb
AM
7342015-07-15 Andrew MacLeod <amacleod@redhat.com>
735
736 * lto.c: Remove redundant includes.
737
026c3cfd
AH
7382015-07-12 Aldy Hernandez <aldyh@redhat.com>
739
740 * lto-lang.c: Fix double word typos.
741
9fdcd34e
AM
7422015-07-10 Andrew MacLeod <amacleod@redhat.com>
743
744 * lto.c: Include cfghooks.h rather than predict.h.
745
f51ade33
AM
7462015-07-09 Andrew MacLeod <amacleod@redhat.com>
747
748 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
749 lto-streamer.h.
750 * lto-object.c: Likewise.
751 * lto-partition.c: Likewise.
752 * lto-symtab.c: Likewise.
753
1916bcb5
AM
7542015-07-09 Andrew MacLeod <amacleod@redhat.com>
755
756 * lto-lang.c: Adjust includes for flags.h changes.
757
c7131fb2
AM
7582015-07-07 Andrew MacLeod <amacleod@redhat.com>
759
760 * lto-lang.c: Adjust includes.
761 * lto-object.c: Likewise.
762 * lto-partition.c: Likewise.
763 * lto-symtab.c: Likewise.
764 * lto.c: Likewise.
765
f0889939
AM
7662015-06-25 Andrew MacLeod <amacleod@redhat.com>
767
768 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
769 * lto-object.c: Likewise.
770 * lto-partition.c: Likewise.
771 * lto-symtab.c: Likewise.
772 * lto-tree.h: Likewise.
773 * lto.c: Likewise.
774
8d67ee55
RS
7752015-06-25 Richard Sandiford <richard.sandiford@arm.com>
776
777 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
778 than typed_noop_remove. Remove redudant typedefs.
779
abb226c9
AM
7802015-06-17 Andrew MacLeod <amacleod@redhat.com>
781
782 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
783 * lto-object.c: Likewise.
784 * lto-partition.c: Likewise.
785 * lto-symtab.c: Likewise.
786 * lto.c: Likewise.
787
351d90f4
JH
7882015-06-14 Jan Hubicka <hubicka@ucw.cz>
789
790 PR ipa/66181
791 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
792
44c42705
DD
7932015-06-12 DJ Delorie <dj@redhat.com>
794
795 * lto-lang.c (lto_type_for_size): Include intN types.
796 (lto_type_for_mode): Likewise.
797
64578d98
JH
7982015-06-08 Jan Hubicka <hubicka@ucw.cz>
799
800 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
801
13fdf2e2
AM
8022015-06-08 Andrew MacLeod <amacleod@redhat.com>
803
804 * lto-lang.c : Adjust include files.
805 * lto-object.c : Likewise.
806 * lto-partition.c : Likewise.
807 * lto-partition.h : Likewise.
808 * lto-symtab.c : Likewise.
809 * lto.c : Likewise.
810 * lto.h : Likewise.
811
ccb5ad37
JH
8122015-06-06 Jan Hubicka <hubicka@ucw.cz>
813
6542950e
JH
814 PR lto/65378
815 * lto-symtab.c (warn_type_compatibility_p): Fix call of
816 odr_or_derived_type_p.
817 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
818
8192015-06-08 Jan Hubicka <hubicka@ucw.cz>
820
821
ccb5ad37
JH
822 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
823 pointers.
824
d7438551
AH
8252015-06-05 Aldy Hernandez <aldyh@redhat.com>
826
827 * lto-lang.c (lto_write_globals): Remove.
828 (LANG_HOOKS_WRITE_GLOBALS): Same.
829
ecb9f223
AM
8302015-06-04 Andrew MacLeod <amacleod@redhat.com>
831
832 * lto-lang.c: Adjust includes for restructured coretypes.h.
833 * lto-object.c: Likewise.
834 * lto-partition.c: Likewise.
835 * lto-symtab.c: Likewise.
836 * lto.c: Likewise.
837
9cb9b937
JH
8382015-06-04 Jan Hubicka <hubicka@ucw.cz>
839
840 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
841
93e2aa6d
JH
8422015-06-03 Jan Hubicka <hubicka@ucw.cz>
843
844 * lto.c (iterative_hash_canonical_type,
845 gimple_register_canonical_type): only hash main variants of types
846
faae53f8
ML
8472015-05-27 Martin Liska <mliska@suse.cz>
848
849 * lto-partition.c (new_partition): Reset number of symbols.
850 (add_symbol_to_partition_1): Increment number of symbols.
851 (undo_partition): Decrement number of symbols.
852 (lto_balanced_map): Dump number of symbols and insns that
853 belong to a partition.
854 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
855
b727ba74
JH
8562015-05-22 Jan Hubicka <hubicka@ucw.cz>
857
858 * lto.c (hash_canonical_type): Be sure we hash only types that
859 need alias set.
860 (gimple_register_canonical_type_1): Do not produce canonical
861 types for types that do not need alias sets.
862
1d1218fb
JH
8632015-05-22 Jan Hubicka <hubicka@ucw.cz>
864
865 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
866
872d5034
JH
8672015-05-19 Jan Hubicka <hubicka@ucw.cz>
868
869 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
870
259d29e3
JH
8712015-05-17 Jan Hubicka <hubicka@ucw.cz>
872
873 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
874 compare ODR types (if available) and function types.
875 (lto_symtab_merge): ... here; output ODR violation warnings
876 and call warn_types_mismatch.
877
b0845a1e
JH
8782015-04-29 Jan Hubicka <hubicka@ucw.cz>
879
880 * lto.c (lto_fixup_state): Call verify_type.
881
67f58944
TS
8822015-04-18 Trevor Saunders <tsaunders@mozilla.com>
883
b0845a1e 884 * lto.c: Adjust for hash_table changes.
67f58944 885
36ceb0e3
JH
8862015-03-27 Jan Hubicka <hubicka@ucw.cz>
887
888 * lto.c (lto_read_decls): Move code registering odr types out
889 of TYPE_CANONICAL conditional and also register polymorphic types.
890
afd1e7c6
JH
8912015-03-26 Jan Hubicka <hubicka@ucw.cz>
892
893 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
894 DECL_ARTIFICAL symbols.
895
eaeec5ec
JH
8962015-03-26 Jan Hubicka <hubicka@ucw.cz>
897
898 PR lto/65536
899 * lto.c (unify_scc): Revert location cache when unification
900 suceeded.
901 (lto_read_decls): Accept location cache after sucess;
902 apply location cache before calling debug hooks.
903
1c4db829
JH
9042015-03-10 Jan Hubicka <hubicka@ucw.cz>
905
906 * lto.c (read_cgraph_and_symbols): Do not do merging
907 at ltrans stage.
908
db847fa8
JJ
9092015-02-26 Jakub Jelinek <jakub@redhat.com>
910
911 * lto.c (lto_mode_identity_table): New variable.
912 (lto_read_decls): Add mode_table argument to the lto_input_block
913 constructor.
914 (lto_file_finalize): Initialize mode_table.
915 (lto_init): Initialize lto_mode_identity_table.
916
56a9f6bc
TS
9172015-02-24 Thomas Schwinge <thomas@codesourcery.com>
918
919 PR libgomp/64625
920 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
921 Remove macros.
922 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
923
ebc8f0bb
JH
9242015-02-03 Jan Hubicka <hubicka@ucw.cz>
925
926 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
927
40fecdd6
JM
9282015-01-30 Joseph Myers <joseph@codesourcery.com>
929
930 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
931 changed to pass input_location as first argument.
932
040968a8
JH
9332014-12-11 Jan Hubicka <hubicka@ucw.cz>
934
935 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
936
69fe4502
JH
9372014-12-11 Jan Hubicka <hubicka@ucw.cz>
938
939 * lto.c (compare_tree_sccs_1): Add comparsion of
940 DECL_FUNCTION_SPECIFIC_TARGET
941
41dbbb37
TS
9422015-01-15 Thomas Schwinge <thomas@codesourcery.com>
943 James Norris <jnorris@codesourcery.com>
944
945 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
946 New macros.
947 * lto.c: Include "gomp-constants.h".
948
837bac8c
IV
9492015-01-14 Ilya Verbin <ilya.verbin@intel.com>
950
951 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
952 from select_what_to_stream.
953
1b34e6e2
BS
9542015-01-09 Bernd Schmidt <bernds@codesourcery.com>
955 Jakub Jelinek <jakub@redhat.com>
956
957 PR middle-end/64412
958 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
959 if ACCEL_COMPILER.
960
adfac8df
JJ
9612015-01-09 Michael Collison <michael.collison@linaro.org>
962
963 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
964 input.h, alias.h, symtab.h, options, fold-const.h,
965 wide-int.h, and inchash.h due to flattening of tree.h.
966 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
967 input.h, alias.h, symtab.h, fold-const.h,
968 wide-int.h, and inchash.h due to flattening of tree.h.
969 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
970 input.h, alias.h, symtab.h, options, fold-const.h,
971 wide-int.h, and inchash.h due to flattening of tree.h.
972 * lto-partition.c: Ditto.
973 * lto-symtab.c: Ditto.
974
5624e564
JJ
9752015-01-05 Jakub Jelinek <jakub@redhat.com>
976
977 Update copyright years.
978
9a1e784a
ML
9792014-12-22 Martin Liska <mliska@suse.cz>
980
981 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
982 is used.
983 (undo_partition): Likewise.
984 (lto_balanced_map): Likewise.
985
dd912cb8
ML
9862014-12-22 Martin Liska <mliska@suse.cz>
987
988 * lto-partition.c: Include of symbol-summary.h is added.
989 * lto-symtab.c: Likewise.
990 * lto.c: Likewise.
991
17e0fc92
JH
9922014-12-11 Jan Hubicka <hubicka@ucw.cz>
993
994 PR ipa/61324
995 * lto.c (read_cgraph_and_symbols): Update call of
996 remove_unreachable_nodes.
997 (do_whole_program_analysis): Remove call of
998 symtab->remove_unreachable_nodes
999
58dddbd2
TS
10002014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1001
1002 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1003 htab with malloc instead of ggc.
1004
907dadbd
TS
10052014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1006
1007 * lto.c: Replace htab with hash_table.
1008
9c71e9df
TS
10092014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1010
1011 * lto.c (lto_read_in_decl_state): Adjust.
1012 (lto_fixup_state): Likewise.
1013
72a4a8b0
JH
10142014-11-17 Jan Hubicka <hubicka@ucw.cz>
1015
1016 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1017
54e774c0
JH
10182014-11-14 Jan Hubicka <hubicka@ucw.cz>
1019
1020 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1021
1f6be682
IV
10222014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1023 Bernd Schmidt <bernds@codesourcery.com>
1024 Andrey Turetskiy <andrey.turetskiy@intel.com>
1025 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1026
ec6fe917
IV
1027 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1028
10292014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1030 Ilya Tocar <ilya.tocar@intel.com>
1031 Andrey Turetskiy <andrey.turetskiy@intel.com>
1032 Bernd Schmidt <bernds@codesourcery.com>
1033
1f6be682
IV
1034 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1035 LTO_SECTION_NAME_PREFIX.
1036 * lto-partition.c (lto_promote_cross_file_statics): Call
1037 select_what_to_stream.
1038 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1039 LTO_SECTION_NAME_PREFIX.
1040 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1041 being built as an offload compiler.
1042
ef4bddc2
RS
10432014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1044
1045 * lto-lang.c: Remove redundant enum from machine_mode.
1046
c582198b
AM
10472014-10-28 Andrew MacLeod <amacleod@redhat.com>
1048
1049 * lto.c: Adjust include files.
1050 * lto-lang.c: Ditto.
1051 * lto-object.c: Ditto.
1052 * lto-partition.c: Ditto.
1053 * lto-symtab.c: Ditto.
1054
60393bbc
AM
10552014-10-27 Andrew MacLeod <amacleod@redhat.com>
1056
1057 * lto-lang.c: Adjust include files.
1058 * lto-object.c: Ditto.
1059 * lto-partition.c: Ditto.
1060 * lto-symtab.c: Ditto.
1061 * lto.c: Ditto.
1062
957f47e6
DD
10632014-10-16 DJ Delorie <dj@redhat.com>
1064
1065 * lto-object.c (lto_obj_begin_section): In the event that pointer
1066 sizes aren't powers of two, choose a more suitable alignment
1067 than (unsigned)(-1).
1068
78a7c317
DD
10692014-10-14 DJ Delorie <dj@redhat.com>
1070
1071 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1072 size-type as well.
1073 (lto_init): Initialize all intN types, not just int128.
1074
70261a4f
ML
10752014-10-06 Martin Liska <mliska@suse.cz>
1076
1077 * lto.c (stream_out): ARG_UNUSED added for last argument.
1078
00de328a
AH
10792014-09-24 Aldy Hernandez <aldyh@redhat.com>
1080
1081 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1082 DECL_ABSTRACT_P.
1083
7861b648
AK
10842014-09-23 Andi Kleen <ak@linux.intel.com>
1085
1086 * lto-partition.c (node_cmp): Update comment.
1087 (varpool_node_cmp): Use symtab_node for comparison.
1088 (add_sorted_nodes): New function.
1089 (lto_balanced_map): Change to keep ordered queue
1090 of ordered node. Handle no_reorder attribute.
1091
1ee85ee1
JH
10922014-09-11 Jan Hubicka <hubicka@ucw.cz>
1093
1094 * lto.c (lto_read_decls): Register ODR types.
1095
8605403e
JH
10962014-08-20 Jan Hubicka <hubicka@ucw.cz>
1097
1098 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1099 call.
1100 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1101
56b1f114
JH
11022014-08-14 Jan Hubicka <hubicka@ucw.cz>
1103
1104 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1105
833f94c0
RB
11062014-08-14 Richard Biener <rguenther@suse.de>
1107
1108 PR lto/62067
1109 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1110
207c68cd
RB
11112014-08-08 Richard Biener <rguenther@suse.de>
1112
1113 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1114
7c581d61
BC
11152014-08-08 Bin Cheng <bin.cheng@arm.com>
1116
1117 PR lto/62032
1118 * lto-lang.c (lto_init): Switch mis-matched arguments.
1119
39c8aaa4
TS
11202014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1121
1122 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1123
6e2830c3
TS
11242014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1125
1126 * lto-partition.c, lto-partition.h: Use hash_set instead of
1127 pointer_set.
1128
50de5793
AK
11292014-07-31 Andi Kleen <ak@linux.intel.com>
1130
1131 * lto.c (hash_canonical_type): Use inchash::hash
1132 and use inchash::add_expr.
1133 (iterative_hash_canonical_type): Dito.
1134
f6bcdb5e
RB
11352014-07-30 Richard Biener <rguenther@suse.de>
1136
1137 * lto-streamer.h (lto_write_data): New function.
1138 * langhooks.c (lhd_append_data): Do not free block.
1139 * lto-section-out.c (lto_write_data): New function writing
1140 raw data to the current section.
1141 (lto_write_stream): Adjust for langhook semantic change.
1142 (lto_destroy_simple_output_block): Write header directly.
1143 * lto-opts.c (lto_write_options): Write options directly.
1144 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1145 (lto_output_toplevel_asms): Likewise.
1146 (copy_function_or_variable): Copy data directly.
1147 (write_global_references): Output index table directly.
1148 (lto_output_decl_state_refs): Likewise.
1149 (write_symbol): Write data directly.
1150 (produce_symtab): Adjust.
1151 (produce_asm_for_decls): Output header and refs directly.
1152
56fdfd3e
AK
11532014-07-25 Andi Kleen <ak@linux.intel.com>
1154
1155 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1156
0bd8bb04
AK
11572014-07-25 Andi Kleen <ak@linux.intel.com>
1158
1159 * lto.c (hash_canonical_type): Convert to inchash.
1160 (iterative_hash_canonical_type): Dito.
1161
6d8eb96b
AK
11622014-07-25 Andi Kleen <ak@linux.intel.com>
1163
1164 * lto.c: Include inchash.h
1165
ad115a3c
JH
11662014-07-14 Jan Hubicka <hubicka@ucw.cz>
1167
1168 * lto.c (mentions_vars_p_decl_non_common): Skip
1169 DECL_ARGUMENT_FLD.
1170 mentions_vars_p_function): Do DECL_ARGUMENTS.
1171 (lto_fixup_prevailing_decls): Update.
1172
917dd9bf
JH
11732014-07-12 Jan Hubicka <hubicka@ucw.cz>
1174
1175 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1176 timevar
1177 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1178
0b83e688
JH
11792014-07-11 Jan Hubicka <hubicka@ucw.cz>
1180
1181 * lto-partition.c (add_references_to_partition): Use
1182 varpool_ctor_useable_for_folding_p.
1183 * lto.c (lto_read_in_decl_state): Update sanity check.
1184
e55637b7
ML
11852014-07-01 Martin Liska <mliska@suse.cz>
1186
1187 IPA REF alias refactoring
1188 * lto-partition.c (add_symbol_to_partition_1): Usage of
1189 FOR_EACH_ALIAS added.
1190
010f4e27
JH
11912014-06-28 Jan Hubicka <hubicka@ucw.cz>
1192
1193 Revert:
1194 * lto.c (lto_copy_fields_not_streamed): New function.
1195 (compare_tree_sccs_1): Do not compare fields shared in between type
1196 and variant.
1197 (lto_read_decls): Fixup types first before inserting into hash.
1198
b82fe354
AP
11992014-06-28 Andrew Pinski <apinski@cavium.com>
1200
1201 * lto.c (lto_read_decls): Fix comment in comment.
1202
288eeff7
JH
12032014-06-28 Jan Hubicka <hubicka@ucw.cz>
1204
1205 * lto.c (lto_copy_fields_not_streamed): New function.
1206 (compare_tree_sccs_1): Do not compare fields shared in between type
1207 and variant.
1208 (lto_read_decls): Fixup types first before inserting into hash.
1209
e01fa630
ML
12102014-06-25 Martin Liska <mliska@suse.cz>
1211
1212 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
1213 used.
1214 (add_symbol_to_partition_1): Likewise.
1215 (lto_balanced_map): Likewise.
1216 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
1217
aaf8a23e
JH
12182014-06-24 Jan Hubicka <hubicka@ucw.cz>
1219
1220 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1221 (mentions_vars_p_function): ... here.
1222 (compare_tree_sccs_1): Update VINDEX checks.
1223 (lto_fixup_prevailing_decls): Likewise.
1224
1eb68d2d
TS
12252014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1226
1227 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1228 pointer_map.
1229
c203e8a7
TS
12302014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1231
1232 * lto.c: Adjust.
1233
714c800f
JH
12342014-06-20 Jan Hubicka <hubicka@ucw.cz>
1235
1236 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1237
569b1784
JH
12382014-06-20 Jan Hubicka <hubicka@ucw.cz>
1239
1240 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1241
56363ffd
JH
12422014-06-15 Jan Hubicka <hubicka@ucw.cz>
1243
1244 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1245
e257a17c
JH
12462014-06-10 Jan Hubicka <hubicka@ucw.cz>
1247
1248 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1249 (do_whole_program_analysis): Use verify_symtab.
1250
24d047a3
JH
12512014-06-07 Jan Hubicka <hubicka@ucw.cz>
1252
1253 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1254 lto_fixup_prevailing_decls): Skip section names.
1255
9b2b7279
AM
12562014-06-02 Andrew MacLeod <amacleod@redhat.com>
1257
1258 * lto-symtab.c: Include builtins.h.
1259
a9243bfc
RB
12602014-05-26 Richard Biener <rguenther@suse.de>
1261
1262 * lto.c (lto_parse_hex): Use int64_t.
1263 (lto_resolution_read): Likewise.
1264
fd1e9302
JH
12652014-05-23 Jan Hubicka <hubicka@ucw.cz>
1266
1267 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1268
aede2c10
JH
12692014-05-23 Jan Hubicka <hubicka@ucw.cz>
1270
1271 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1272 symtab pointer.
1273 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1274
f6a7cffc
TS
12752014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1276
1277 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1278 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1279 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1280
4000360e
BS
12812012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1282
1283 * lto-object.c: Include "lto-section-names.h".
1284 (LTO_SEGMENT_NAME): Don't define.
1285 * lto.c: Include "lto-section-names.h".
1286
b9559136
JH
12872014-05-17 Jan Hubicka <hubicka@ucw.cz>
1288
1289 PR lto/61012
1290 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1291 mixed with variables.
1292
766090c2
TS
12932014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1294
1295 * lto-tree.h: Don't use variable_size gty attribute.
1296 * lto.c (lto_read_in_decl_state): Adjust.
1297 (create_subid_section_table): Likewise.
1298 (lto_flatten_files): Likewise.
1299 (read_cgraph_and_symbols): Likewise.
1300
1d60af08
KZ
13012014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1302 Mike Stump <mikestump@comcast.net>
1303 Richard Sandiford <rdsandiford@googlemail.com>
1304
1305 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1306 * lto-lang.c (get_nonnull_operand): Likewise.
1307
22869a37
RB
13082014-04-28 Richard Biener <rguenther@suse.de>
1309
1310 PR middle-end/60092
1311 * lto-lang.c: Define flag_isoc11.
1312
7de90a6c
DM
13132014-04-23 David Malcolm <dmalcolm@redhat.com>
1314
1315 * lto-partition.c (add_references_to_partition): Update for
1316 removal of implicit pointer from the is-a.h API.
1317 (add_symbol_to_partition_1): Likewise.
1318 (contained_in_symbol): Likewise.
1319 (undo_partition): Likewise.
1320 (lto_balanced_map): Likewise.
1321 (promote_symbol): Likewise.
1322 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1323 (lto_symtab_merge_symbols): Likewise.
1324 * lto.c (lto_wpa_write_files): Likewise.
1325
783dab6b
RB
13262014-04-15 Richard Biener <rguenther@suse.de>
1327
1328 * lto.c: Include params.h.
1329 (do_whole_program_analysis): Switch on flag_lto_partition value,
1330 add support for LTO_PARTITION_ONE.
1331 * lto-partition.h (lto_balanced_map): Adjust.
1332 * lto-partition.c (lto_balanced_map): Get number of desired
1333 partitions as argument to support -flto-partition=one.
1334
cb90235d
JH
13352014-04-14 Jan Hubicka <hubicka@ucw.cz>
1336
1337 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1338 tp_first_run.
1339
bbe281da
JH
13402014-03-19 Jan Hubicka <hubicka@ucw.cz>
1341
1342 * lto.c: Include ipa-inline.h
1343 (do_whole_program_analysis): Free inline summary after partitioning.
1344
ce2f49b3
RB
13452014-03-19 Richard Biener <rguenther@suse.de>
1346
1347 PR middle-end/60553
1348 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1349 instead of TREE_CHAIN as chain_next.
1350
e41106fc
RB
13512014-03-19 Richard Biener <rguenther@suse.de>
1352
1353 * lto.c (lto_wpa_write_files): Move call to
1354 lto_promote_cross_file_statics ...
1355 (do_whole_program_analysis): ... here, into the partitioning
1356 block. Do not ggc_collect after lto_wpa_write_files but
1357 for a last time before it.
1358
15df2655
JJ
13592014-03-19 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR lto/60571
1362 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1363 Fix formatting.
1364
415e2e6b
JJ
13652014-03-18 Jakub Jelinek <jakub@redhat.com>
1366
1367 PR sanitizer/60535
1368 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1369 and complex_{float,{,long_}double}_type_node.
1370
f42c637e
PM
13712014-03-08 Paulo Matos <paulo@matos-sorge.com>
1372
415e2e6b
JJ
1373 * lto-lang.c (lto_init): Pass flag_short_double to
1374 build_common_tree_nodes.
f42c637e 1375
6dab804d
JH
13762014-02-14 Jan Hubicka <hubicka@ucw.cz>
1377
1378 PR lto/60295
1379 * lto.c (stream_out): Avoid parallel streaming with
1380 -flto=jobserver until we are able to throttle it down
1381 resonably.
1382
39434bce
JH
13832014-02-14 Jan Hubicka <hubicka@ucw.cz>
1384
1385 * lto-partition.c (add_symbol_to_partition_1,
1386 undo_partition, lto_balanced_map): Aliases have no
1387 defined size.
1388 (lto_balanced_map): Do not follow refering variables
1389 if they can be optimized out.
1390
1966fd99
RB
13912014-02-14 Richard Biener <rguenther@suse.de>
1392
1393 PR lto/60179
1394 * lto.c (compare_tree_sccs_1): Do not compare
1395 DECL_FUNCTION_SPECIFIC_TARGET.
1396 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1397
283416b3
RB
13982014-02-12 Richard Biener <rguenther@suse.de>
1399
1400 PR lto/60060
1401 * lto-lang.c (lto_write_globals): Do not call
1402 wrapup_global_declarations or emit_debug_global_declarations
1403 but emit debug info for non-function scope variables
1404 directly.
1405
b7e85694
JH
14062014-02-06 Jan Hubicka <hubicka@ucw.cz>
1407
1408 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1409
96451279
JH
14102014-02-06 Jan Hubicka <hubicka@ucw.cz>
1411
1412 PR ipa/59469
1413 * lto-partition.c (symbol_class): Move to cgraph.h
1414 (get_symbol_class): Move to symtab.c
1415 (add_references_to_partition, add_symbol_to_partition_1,
1416 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1417 lto_promote_cross_file_statics): Update.
1418
f300e7b8
JH
14192014-02-05 Jan Hubicka <hubicka@ucw.cz>
1420
1421 * lto.c (lto_parallelism): New static var.
1422 (do_stream_out, wait_for_child, stream_out): New static functions.
1423 (lto_wpa_write_files): Add support for parallel streaming.
1424 (do_whole_program_analysis): Set parallelism.
1425 * lang.opt (fwpa): Add parameter.
1426 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1427 (lto_init): Update use of flag_wpa.
1428 * lto-streamer.h (asm_nodes_output): Declare.
1429
f0f91770
RB
14302014-02-05 Richard Biener <rguenther@suse.de>
1431
1432 * lto.h (lto_global_var_decls): Remove.
1433 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1434 (lto_write_globals): Do nothing in WPA stage, gather globals from
1435 the varpool here ...
1436 * lto.c (lto_main): ... not here.
1437 (materialize_cgraph): Do not call rest_of_decl_compilation
1438 on the empty lto_global_var_decls vector.
1439 (lto_global_var_decls): Remove.
1440
d665f8dd
JH
14412014-02-04 Jan Hubicka <hubicka@ucw.cz>
1442
1443 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1444 needs duplicating, not generic COMDAT.
1445
c39276b8
RB
14462014-02-04 Richard Biener <rguenther@suse.de>
1447
1448 PR lto/59723
1449 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1450 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1451
5f876ae7
JH
14522014-02-04 Jan Hubicka <hubicka@ucw.cz>
1453 Markus Trippelsdorf
1454
1455 PR ipa/59469
1456 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1457 merge force_output and forced_by_abi flags.
1458
b72271b9
BI
14592014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1460
1461 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1462 flag_cilkplus.
1463
63124c48
RB
14642014-01-09 Richard Biener <rguenther@suse.de>
1465
1466 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1467
d05b9920
RB
14682014-01-09 Richard Biener <rguenther@suse.de>
1469
1470 PR lto/45586
1471 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1472 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1473 (gimple_canonical_types_compatible_p): Do not compare them either.
1474
23a5b65a
RS
14752014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1476
1477 Update copyright years
1478
2c8326a5
OE
14792013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1480
1481 * lto.c: Remove struct tags when referring to class varpool_node.
1482 * lto-partition.c: Likewise.
1483 * lto-symtab.c: Likewise.
1484
e06f9964
JJ
14852013-11-29 Jakub Jelinek <jakub@redhat.com>
1486 Richard Biener <rguenther@suse.de>
1487
1488 PR lto/59326
1489 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1490
c193f58b
JJ
14912013-11-29 Jakub Jelinek <jakub@redhat.com>
1492
1493 PR lto/59326
1494 * lto.c (mentions_vars_p_omp_clause): New function.
1495 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1496 after return stmts.
1497
2fb9a547
AM
14982013-11-22 Andrew MacLeod <amacleod@redhat.com>
1499
1500 * lto.c: Add required include files from gimple.h.
1501 * lto-lang.c: Likewise
1502 * lto-object.c: Likewise
1503 * lto-partition.c: Likewise
1504 * lto-symtab.c: Likewise
1505
fec39fa6
TS
15062013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1507
1508 * lto-partition.c lto-symtab.c lto.c Adjust.
1509
d8a2d370
DN
15102013-11-14 Diego Novillo <dnovillo@google.com>
1511
1512 * lto-lang.c: Include stringpool.h.
1513 Include stor-layout.h.
1514 * lto-partition.c: Include gcc-symtab.h.
1515 * lto.c: Include stor-layout.h.
1516
5e20cdc9
DM
15172013-10-31 David Malcolm <dmalcolm@redhat.com>
1518
1519 Automated part of renaming of symtab_node_base to symtab_node.
1520
1521 Patch autogenerated by rename_symtab.py from
1522 https://github.com/davidmalcolm/gcc-refactoring-scripts
1523 revision 58bb219cc090b2f4516a9297d868c245495ee622
1524
1525 * lto-partition.c (add_symbol_to_partition): Rename
1526 symtab_node_base to symtab_node.
1527 (get_symbol_class): Likewise.
1528 (symbol_partitioned_p): Likewise.
1529 (add_references_to_partition): Likewise.
1530 (add_symbol_to_partition_1): Likewise.
1531 (contained_in_symbol): Likewise.
1532 (add_symbol_to_partition): Likewise.
1533 (lto_1_to_1_map): Likewise.
1534 (lto_max_map): Likewise.
1535 (lto_balanced_map): Likewise.
1536 (privatize_symbol_name): Likewise.
1537 (promote_symbol): Likewise.
1538 (may_need_named_section_p): Likewise.
1539 (rename_statics): Likewise.
1540 (lto_promote_statics_nonwpa): Likewise.
1541 * lto-symtab.c (lto_symtab_merge): Likewise.
1542 (lto_symtab_resolve_replaceable_p): Likewise.
1543 (lto_symtab_symbol_p): Likewise.
1544 (lto_symtab_resolve_can_prevail_p): Likewise.
1545 (lto_symtab_resolve_symbols): Likewise.
1546 (lto_symtab_merge_decls_2): Likewise.
1547 (lto_symtab_merge_decls_1): Likewise.
1548 (lto_symtab_merge_decls): Likewise.
1549 (lto_symtab_merge_symbols_1): Likewise.
1550 (lto_symtab_merge_symbols): Likewise.
1551 (lto_symtab_prevailing_decl): Likewise.
1552 * lto.c (lto_wpa_write_files): Likewise.
1553 (read_cgraph_and_symbols): Likewise.
1554 (do_whole_program_analysis): Likewise.
1555
378cd6b1
DM
15562013-10-30 David Malcolm <dmalcolm@redhat.com>
1557
1558 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1559 declarations onto multiple lines to make things easier for
1560 rename_symtab.py.
1561 (lto_symtab_merge_decls_1): Likewise.
1562 (lto_symtab_merge_symbols_1): Likewise.
1563
939b37da
BI
15642013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1565
1566 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1567 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1568 Plus is enabled.
1569
67348ccc
DM
15702013-10-29 David Malcolm <dmalcolm@redhat.com>
1571
1572 Patch autogenerated by refactor_symtab.py from
1573 https://github.com/davidmalcolm/gcc-refactoring-scripts
1574 revision 58bb219cc090b2f4516a9297d868c245495ee622
1575
1576 * lto-partition.c (lto_promote_cross_file_statics): Update for
1577 conversion of symtab types to a true class hierarchy.
1578 (rename_statics): Likewise.
1579 (promote_symbol): Likewise.
1580 (privatize_symbol_name): Likewise.
1581 (lto_balanced_map): Likewise.
1582 (varpool_node_cmp): Likewise.
1583 (node_cmp): Likewise.
1584 (lto_1_to_1_map): Likewise.
1585 (undo_partition): Likewise.
1586 (add_symbol_to_partition): Likewise.
1587 (contained_in_symbol): Likewise.
1588 (add_symbol_to_partition_1): Likewise.
1589 (add_references_to_partition): Likewise.
1590 (symbol_partitioned_p): Likewise.
1591 (get_symbol_class): Likewise.
1592 (lto_max_map): Likewise.
1593 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1594 (lto_symtab_merge_symbols): Likewise.
1595 (lto_symtab_merge_symbols_1): Likewise.
1596 (lto_symtab_merge_decls): Likewise.
1597 (lto_symtab_merge_decls_1): Likewise.
1598 (lto_symtab_merge_decls_2): Likewise.
1599 (lto_symtab_resolve_symbols): Likewise.
1600 (lto_symtab_resolve_can_prevail_p): Likewise.
1601 (lto_symtab_symbol_p): Likewise.
1602 (lto_symtab_resolve_replaceable_p): Likewise.
1603 (lto_symtab_merge): Likewise.
1604 (lto_varpool_replace_node): Likewise.
1605 (lto_cgraph_replace_node): Likewise.
1606 * lto.c (lto_main): Likewise.
1607 (do_whole_program_analysis): Likewise.
1608 (materialize_cgraph): Likewise.
1609 (read_cgraph_and_symbols): Likewise.
1610 (cmp_partitions_order): Likewise.
1611 (lto_materialize_function): Likewise.
1612 (has_analyzed_clone_p): Likewise.
1613
8e9055ae
AM
16142013-10-29 Andrew MacLeod <amacleod@redhat.com>
1615
1616 * lto/lto-object.c: Add gimple.h to include list.
1617 * lto/lto-partition.c: Likewise.
1618
377d9792
AM
16192013-10-18 Andrew MacLeod <amacleod@redhat.com>
1620
1621 * lto.c: Remove tree-flow.h from include list.
1622
fffda8d7
RB
16232013-10-15 Richard Biener <rguenther@suse.de>
1624
1625 * lto.c (hash_canonical_type): Split out from ...
1626 (iterative_hash_canonical_type): ... here. Register types
1627 we recurse to.
1628 (gimple_canonical_type_hash): Adjust.
1629 (gimple_register_canonical_type_1): Split out from ...
1630 (gimple_register_canonical_type): ... here. Cache computed
1631 hash value.
1632 (lto_register_canonical_types): Split into two modes,
1633 clearing and computing TYPE_CANONICAL.
1634 (lto_read_decls): Adjust.
1635 (read_cgraph_and_symbols): Do two passes over global trees,
1636 first clearing then computing TYPE_CANONICAL.
1637
1394237e
RB
16382013-10-14 Richard Biener <rguenther@suse.de>
1639
1640 * lto.c (gimple_canonical_types): Move out-of GC space.
1641 (canonical_type_hash_cache): Make a pointer-map.
1642 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1643 New counters.
1644 (iterative_hash_canonical_type): Adjust.
1645 (read_cgraph_and_symbols): Likewise.
1646 (print_lto_report_1): Likewise.
1647
0a387eca
RB
16482013-10-14 Richard Biener <rguenther@suse.de>
1649
1650 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1651 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1652 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1653 gimple_types_compatible_p_1, gimple_types_compatible_p,
1654 visit, iterative_hash_name, struct type_hash_pair,
1655 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1656 gimple_type_eq, gimple_register_type, num_not_merged_types,
1657 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1658 num_not_merged_types_in_same_scc_trees): Remove old merging code
1659 and statistics.
1660 (lto_read_decls): Do not run old merging code in parallel.
1661 (read_cgraph_and_symbols): Do not init/free old merging
1662 data structures.
1663 (print_lto_report_1): Do not report differences of old vs. new
1664 merging code.
1665
83fd5d11
RB
16662013-10-14 Richard Biener <rguenther@suse.de>
1667
1668 * lto-lang.c (lto_init): Do not re-init canonical types here.
1669 (lto_register_canonical_types): Move to ...
1670 * lto.c (lto_register_canonical_types): ... here.
1671 (gimple_canonical_types, canonical_type_hash_cache,
1672 iterative_hash_canonical_type, gimple_canonical_type_hash,
1673 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1674 gimple_register_canonical_type): Add canonical type merging machinery
1675 moved from gimple.c.
1676 (read_cgraph_and_symbols): Init and free canonical type tables
1677 here.
1678 (print_lto_report_1): Report canonical type table stats here.
1679
acf0174b
JJ
16802013-10-11 Jakub Jelinek <jakub@redhat.com>
1681
1682 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1683
7c6fedd2
TT
16842013-09-25 Tom Tromey <tromey@redhat.com>
1685
1686 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1687 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1688 (lto/lto-object.o): Remove.
1689
35f32ad4
RB
16902013-09-06 Richard Biener <rguenther@suse.de>
1691
1692 * lto-symtab.c: Move from gcc/
1693 * lto.h: Include vec.h.
1694 (lto_global_var_decls): Declare.
1695 * lto.c (lto_global_var_decls): Move definition here.
1696 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1697 (lto-symtab.o): Add.
1698 * config-lang.in (gtfiles): Add lto.h.
1699
49322b12
JH
17002013-08-31 Jan Hubicka <jh@suse.cz>
1701
1702 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1703 DECL_FIELD_OFFSET can contain an reference to variable.
1704
31f1f73b
JH
17052013-08-31 Jan Hubicka <jh@suse.cz>
1706
1707 * lto.c (tree_with_vars): Turn into vector.
1708 (MAYBE_REMEMBER_WITH_VARS): Change to...
1709 (CHECK_VAR): ... this one.
1710 (CHECK_NO_VAR): New macro.
1711 (maybe_remember_with_vars_typed): Turn to ...
1712 (mentions_vars_p_typed): ... this one.
1713 (maybe_remember_with_vars_common): Turn to ...
1714 (mentions_vars_p_comon): ... this one.
1715 (maybe_remember_with_vars_decl_minimal): Turn to ...
1716 (mentions_vars_p_decl_minmal): ... this one.
1717 (maybe_remember_with_vars_decl_common): Turn to ...
1718 (mentions_vars_p_decl_common): ... this one.
1719 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1720 (mentions_vars_p_decl_with_vis): ... this one.
1721 (maybe_remember_with_vars_decl_non_common): Turn to ...
1722 (mentions_vars_p_decl_non_common): ... this one.
1723 (maybe_remember_with_vars_function): Turn to ...
1724 (mentions_vars_p_function): ... this one.
1725 (maybe_remember_with_vars_field_decl): Turn to ...
1726 (mentions_vars_p_field_decl): ... this one.
1727 (maybe_remember_with_vars_type): Turn to ...
1728 (mentions_vars_p_type): ... this one.
1729 (maybe_remember_with_vars_binfo): Turn to ...
1730 (mentions_vars_p_binfo): ... this one.
1731 (maybe_remember_with_vars_constructor): Turn to ...
1732 (mentions_vars_p_constructor): ... this one.
1733 (maybe_remember_with_vars_expr): Turn to ...
1734 (mentions_vars_p_expr): ... this one.
1735 (maybe_remember_with_vars): Turn to ...
1736 (mentions_vars_p): ... this one.
1737 (lto_read_decls): Update.
1738 (LTO_SET_PREVAIL): Do not call function for internal decls.
1739 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1740 check that something was updated.
1741 (lto_fixup_state): Do not care about internal decls.
1742 (lto_fixup_decls): Update.
1743 (read_cgraph_and_symbols): Update.
1744
256eefa9
JH
17452013-08-29 Jan Hubicka <jh@suse.cz>
1746
1747 * lto.c (read_cgraph_and_symbols): Free decl states.
1748
0170f33c
JH
17492013-08-29 Jan Hubicka <jh@suse.cz>
1750
1751 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1752 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1753 TYPE_FINAL_P.
1754
c01c111b
JH
17552013-08-28 Jan Hubicka <jh@suse.cz>
1756
1757 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1758 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1759 (unify_scc): Do checking assert.
1760
6a49f3c9
JH
17612013-08-06 Jan Hubicka <jh@suse.cz>
1762 Martin Liska <marxin.liska@gmail.com>
1763
1764 * lto-partition.c (lto_balanced_map): Always base order on
1765 source file order.
1766
a2e2a668
JH
17672013-08-06 Jan Hubicka <jh@suse.cz>
1768
1769 * lto.c (lto_materialize_function): Do not read body anymore.
1770
815effe1
JH
17712013-08-02 Jan Hubicka <jh@suse.cz>
1772
1773 * lto.c (lto_materialize_function): Do not push struct function.
1774 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1775 (may_need_named_section_p): Even abstract origins may need
1776 named section.
1777
315f8c0e
DM
17782013-07-30 David Malcolm <dmalcolm@redhat.com>
1779
1780 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1781 PASS_MANAGER_H.
1782
1783 * lto.c (do_whole_program_analysis): Update for move of
1784 all_regular_ipa_passes from a global to a field of class
1785 pass_manager.
1786
1aa95df7
OB
17872013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1788
1789 * lto-partition.c: Fix typos.
1790
c525ba9a
JH
17912013-06-20 Jan Hubicka <jh@suse.cz>
1792
1793 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1794 partitioning of variables.
1795
7a89ad00
JH
17962013-06-20 Jan Hubicka <jh@suse.cz>
1797
1798 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1799
6a6dac52
JH
18002013-06-19 Jan Hubicka <jh@suse.cz>
1801
1802 * lto-partition.c (add_references_to_partition): Use
1803 ctor_for_folding.
1804
ac0511f2
RB
18052013-06-18 Richard Biener <rguenther@suse.de>
1806
1807 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1808 and use it.
1809 (lto_register_function_decl_in_symtab): Likewise.
1810 (cmp_tree): New function.
1811 (unify_scc): Instead of using the streamer cache map from entry
1812 to cache index match up the two maps we have by sorting them.
1813 Adjust calls to lto_register_var_decl_in_symtab and
1814 lto_register_function_decl_in_symtab.
1815
ee03e71d
RB
18162013-06-17 Richard Biener <rguenther@suse.de>
1817
1818 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1819 * lto.c: Include data-streamer.h.
1820 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1821 (gimple_type_leader_entry_s, gimple_type_leader,
1822 gimple_lookup_type_leader): Remove.
1823 (gtc_visit): Simplify.
1824 (gimple_types_compatible_p): Likewise.
1825 (gimple_register_type_1): Likewise. Merge into ...
1826 (gimple_register_type): ... this. Keep it as legacy for
1827 statistics purposes for now.
1828 (fixup_integer_cst): Remove.
1829 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1830 rename to ...
1831 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1832 maybe_remember_with_vars_*): ... these.
1833 (uniquify_nodes): Remove.
1834 (lto_fixup_prevailing_type): New function.
1835 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1836 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1837 (num_merged_types, num_prevailing_types, num_not_merged_types,
1838 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1839 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1840 num_scc_compare_collisions): New global counters.
1841 (compare_tree_sccs_1): New function.
1842 (compare_tree_sccs): Likewise.
1843 (unify_scc): Likewise.
1844 (lto_read_decls): Stream in tree SCCs and unify them on the
1845 way in. Finalize prevailing SCC tree members.
1846 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1847 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1848 to ggc-collect during merging.
1849 (print_lto_report_1): Adjust for new merging code.
1850
ca0f62a8
JH
18512013-06-12 Jan Hubicka <jh@suse.cz>
1852
1853 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1854
bbf9ad07
JH
18552013-06-12 Jan Hubicka <jh@suse.cz>
1856
1857 * lto.c (register_resolution): Take lto_file_data argument.
1858 (lto_register_var_decl_in_symtab,
1859 lto_register_function_decl_in_symtab): Update.
1860 (read_cgraph_and_symbols): Update resolution_map handling.
1861
ecdbd01a 18622013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
1863
1864 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1865 (add_symbol_to_partition_1): Likewise.
1866 (contained_in_symbol): Likewise.
1867 (lto_balanced_map): Likewise.
1868 (rename_statics): Drop weakref.
1869
a367df53
RB
18702013-06-05 Richard Biener <rguenther@suse.de>
1871
1872 * lto.c (num_merged_types): New global variable.
1873 (uniquify_nodes): Increase num_merged_types when merging a type.
1874 (print_lto_report_1): Output the number of merged types.
1875
40a7fe1e
JH
18762013-06-01 Jan Hubicka <jh@suse.cz>
1877
1878 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1879 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1880 (do_whole_program_analysis): Update dumping.
1881
e70670cf
JH
18822013-05-29 Jan Hubicka <jh@suse.cz>
1883
1884 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1885 flags.
1886 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1887
8ee05051
JH
18882013-05-15 Jan Hubicka <jh@suse.cz>
1889
1890 * lto-partition.c (privatize_symbol_name): Return true when
1891 privatizing happened.
1892 (rename_statics): Do not go into infinite loop when privatizing
1893 is not needed.
1894
427b248d
JM
18952013-05-16 Jason Merrill <jason@redhat.com>
1896
1897 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1898
9de04252
MJ
18992013-05-15 Martin Jambor <mjambor@suse.cz>
1900
1901 * lto-partition.c (lto_balanced_map): Print symbol order instead
1902 of node uids.
1903
2d6e4603
JH
19042013-05-15 Jan Hubicka <jh@suse.cz>
1905
1906 PR lto/57038
1907 PR lto/47375
1908 * lto-partition.c (get_symbol_class): Fix weakrefs.
1909 (lto_balanced_map): Fix weakrefs.
1910 (privatize_symbol_name): Remove unnecesary label.
1911 (rename_statics): Handle weakrefs as statics.
1912
64cfa6c0
JH
19132013-05-09 Jan Hubicka <jh@suse.cz>
1914 Richard Biener <rguenther@suse.de>
1915
1916 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1917 (lto_register_var_decl_in_symtab): Likewise.
1918 (lto_main): Promote statics.
1919 * lto-partition.c (privatize_symbol_name): New function.
1920 (promote_symbol): Use it.
1921 (may_need_named_section_p): New predicate.
1922 (rename_statics): New functions.
1923 (lto_promote_cross_file_statics): Simplify; do renaming.
1924 (lto_promote_statics_nonwpa): New function.
1925 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1926
e45cde98
RB
19272013-02-08 Richard Biener <rguenther@suse.de>
1928
1929 PR lto/56231
1930 * lto-lang.c (lto_init): Do not enter a dummy file.
1931
6edc3e32
UB
19322013-02-07 Uros Bizjak <ubizjak@gmail.com>
1933
1934 PR bootstrap/56227
1935 * lto.c (lto_resolution_ready): Use %wx instead of
1936 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1937
ed73881e
RG
19382013-02-04 Richard Guenther <rguenther@suse.de>
1939
1940 PR lto/56168
1941 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1942 or lto_fixup_decls at LTRANS time.
1943
a19b1432
JH
19442013-01-09 Jan Hubicka <jh@suse.cz>
1945
1946 PR lto/45375
1947 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1948
49c01f87
L
19492012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1950
1951 PR lto/55466
1952 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1953 variables.
1954 (lto_main): Record the global variables if WPA isn't enabled.
1955
6e1aa848
DN
19562012-11-20 Diego Novillo <dnovillo@google.com>
1957 Jakub Jelinek <jakub@redhat.com>
1958
1959 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1960
9771b263
DN
19612012-11-16 Diego Novillo <dnovillo@google.com>
1962
1963 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1964
1965 * lto-lang.c: Use new vec API in vec.h.
1966 * lto-partition.c: Likewise.
1967 * lto-partition.h: Likewise.
1968 * lto.c: Likewise.
1969
24551b9c
LC
19702012-10-31 Lawrence Crowl <crowl@google.com>
1971
1972 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1973 down-cast via dyn_cast.
1974 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1975 (undo_partition): Likewise.
1976 (lto_balanced_map): Likewise.
1977 (get_symbol_class): Likewise and via is_a.
1978 (lto_balanced_map): Change symtab checking to is_a.
1979
aec06f6f
RB
19802012-10-12 Richard Biener <rguenther@suse.de>
1981
1982 PR lto/54898
1983 * lto.c (gimple_types_compatible_p_1): Also compare
1984 TYPE_MAIN_VARIANT.
1985 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1986
0b8c30f9
TB
19872012-10-09 Tobias Burnus <burnus@net-b.de>
1988
1989 * lto-lang.c (lto_register_builtin_type): Avoid useless
1990 decl creation.
1991 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1992
da3202a8
TB
19932012-10-08 Tobias Burnus <burnus@net-b.de>
1994
1995 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1996 Free lto_file struct after closing the file.
1997
2512a443
JH
19982012-10-08 Jan Hubicka <jh@suse.cz>
1999
2000 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
2001 (fixup_integer_cst): New functoin.
2002 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2003
e75f8f79
JH
20042012-10-07 Jan Hubicka <jh@suse.cz>
2005
2006 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2007 release input encoders.
2008 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2009
46591697
JH
20102012-10-06 Jan Hubicka <jh@suse.cz>
2011
2012 PR lto/54790
2013 * lto.c (resolution_map): New static var.
2014 (register_resolution): New function.
2015 (lto_register_var_decl_in_symtab): Use it.
2016 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2017
af16bc76
MJ
20182012-09-20 Martin Jambor <mjambor@suse.cz>
2019
2020 * lto.c (lto_materialize_function): Call push_struct_function and
2021 pop_cfun.
2022
5368224f
DC
20232012-09-19 Dehao Chen <dehao@google.com>
2024
2025 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2026
b5493fb2
JH
20272012-09-19 Jan Hubicka <jh@suse.cz>
2028
2029 * lto.c (lto_materialize_function): Update confused comment.
2030 (read_cgraph_and_symbols): Do not free symtab.
2031
c3c445e1
JH
20322012-09-12 Jan Hubicka <jh@suse.cz>
2033
2034 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2035 AUX pointer cleaning. Add max partitioning.
2036 * lto-partition.c (enum symbol_class): New.
2037 (get_symbol_class): New function.
2038 (symbol_partitioned_p): New function.
2039 (add_references_to_partition): Remove.
2040 (add_aliases_to_partition): Remove.
2041 (add_cgraph_node_to_partition_1): Remove.
2042 (add_cgraph_node_to_partition): Remove.
2043 (add_symbol_to_partition): New function.
2044 (add_symbol_to_partition_1): New function.
2045 (contained_in_symbol): New function.
2046 (partition_cgraph_node_p): Remove.
2047 (partition_varpool_node_p): Remove.
2048 (partition_symbol_p): Remove.
2049 (lto_1_to_1_map): Cleanup.
2050 (lto_max_map): New.
2051 (lto_balanced_map): Update.
2052 (lto_promote_cross_file_statics): Update.
2053 * lto-partition.h (lto_max_map): Declare.
2054 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2055
b5c7cdfb
JH
20562012-09-11 Jan Hubicka <jh@suse.cz>
2057
2058 PR lto/54312
2059 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2060 type is variant leader.
2061
b29402f0
RG
20622012-09-11 Richard Guenther <rguenther@suse.de>
2063
2064 * lto.c (enum gtc_mode): Remove.
2065 (struct type_pair_d): Adjust.
2066 (lookup_type_pair): Likewise.
2067 (gimple_type_leader): Do not mark as deletable.
2068 (gimple_lookup_type_leader): Adjust.
2069 (gtc_visit): Likewise.
2070 (gimple_types_compatible_p_1): Likewise.
2071 (gimple_types_compatible_p): Likewise.
2072 (gimple_type_hash): Likewise.
2073 (gimple_register_type): Likewise.
2074 (read_cgraph_and_symbols): Manage lifetime of tables
2075 here.
2076
b8f4e58f
RG
20772012-09-11 Richard Guenther <rguenther@suse.de>
2078
2079 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2080 struct type_pair_d, lookup_type_pair, struct sccs,
2081 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2082 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2083 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2084 visit, iterative_hash_name, struct type_hash_pair,
2085 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2086 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2087 Move here from gimple.c
2088 (read_cgraph_and_symbols): Free hash tables here.
2089 (print_lto_report_1): New function wrapping print_lto_report.
2090 (do_whole_program_analysis): Call it.
2091 (lto_main): Likewise.
2092
1cdbb3f9
JH
20932012-09-10 Jan Hubicka <jh@suse.cz>
2094
2095 * lto-partition.c (partition_symbol_p): Forward declare.
2096 (add_references_to_partition): Reimplement using partition_symbol_p.
2097 (add_aliases_to_partition): Break out from add_references_to_partition;
2098 reimplement using partition_symbol_p.
2099 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2100 add sanity checks.
2101 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2102 (partition_varpool_node_p): Do not special case aliases.
2103
b4661bfe
JH
21042012-08-12 Jan Hubicka <jh@suse.cz>
2105
2106 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2107 it is deleted after streaming.
2108 * lto-partition.c (partition_symbol_p): New function.
2109 (promote_var, promote_fn): Remove.
2110 (promote_symbol): New function.
2111 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2112 to lookup the actual boundaries instead of computing them ad-hoc.
2113
7b99cca4
JH
21142012-08-12 Jan Hubicka <jh@suse.cz>
2115
2116 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2117 in partitioning.
2118 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2119 by encoder.
2120 * lto-partition.c (new_partition): Update.
2121 * lto.c (cmp_partitions_order): Update.
2122 (lto_wpa_write_files): Update.
2123 (free_ltrans_partitions): Update.
2124 (add_references_to_partition): Update.
2125 (add_cgraph_node_to_partition_1): Update.
2126 (add_cgraph_node_to_partition): Update.
2127 (add_varpool_node_to_partition): Update.
2128 (undo_partition): Update.
2129 (lto_balanced_map): Update.
2130 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2131 set_referenced_from_this_partition_p): Update.
2132 (lto_promote_cross_file_statics): Update.
2133
f27c1867
JH
21342012-08-12 Jan Hubicka <jh@suse.cz>
2135
2136 * lto-partition.c (set_referenced_from_other_partition_p,
2137 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2138 New functions.
2139 (lto_promote_cross_file_statics): Use them.
2140
ab96cc5b
JH
21412012-07-24 Jan Hubicka <jh@suse.cz>
2142
2143 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2144
0229aee9
UB
21452012-07-24 Uros Bizjak <ubizjak@gmail.com>
2146
2147 * lto-tree.h (lang_decl): Add variable_size GTY option.
2148
7ee2468b
SB
21492012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2150
2151 * lto.c: Do not include timevar.h.
2152 * Make-lang.in: Fix dependencies.
2153
a910399d
LC
21542012-06-18 Lawrence Crowl <crowl@google.com>
2155
92a285c1 2156 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2157 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2158 to lto_wpa_write_files.
2159 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2160 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2161 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2162 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2163 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2164 to be a front end, but is not one.
2165
877ab5e9
JH
21662012-05-18 Jan Hubicka <jh@suse.cz>
2167
2168 * lto.c (lto_materialize_constructors_and_inits): Remove.
2169 (read_cgraph_and_symbols): Remove handling of alias pairs.
2170
6649df51
JH
21712012-05-17 Jan Hubicka <jh@suse.cz>
2172
2173 * lto-partition.c (add_references_to_partition): Handle external vars.
2174 (partition_varpool_node_p): Likewise.
2175 (lto_promote_cross_file_statics): Do not promote externals.
2176
d1ede5f4
BS
21772012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2178
2179 * lto-lang.c (handle_fnspec_attribute): New static function.
2180 (lto_attribute_table): Add "fn spec".
2181 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2182
0d6bf48c
JH
21832012-05-04 Jan Hubicka <jh@suse.cz>
2184
2185 * lto.c (do_whole_program_analysis): Set timevars correctly.
2186 (lto_main): Likewise.
d1ede5f4 2187
1d67dde8
RB
21882012-05-04 Richard Guenther <rguenther@suse.de>
2189
2190 * lang.opt (fwpa): Do not mark as Optimization.
2191 (fltrans): Likewise.
2192
65d630d4
JH
21932012-04-30 Jan Hubicka <jh@suse.cz>
2194
2195 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2196 * lto-partition.c (partition_cgraph_node_p): Use
2197 symtab_used_from_object_file_p.
65d630d4
JH
2198 (partition_varpool_node_p): Likewise.
2199
ead84f73
JH
22002012-04-20 Jan Hubicka <jh@suse.cz>
2201
2202 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2203
5932a4d4
JH
22042012-04-18 Jan Hubicka <jh@suse.cz>
2205
2206 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2207 Update for new ipa-ref API.
2208
65c70e6b
JH
22092012-04-16 Jan Hubicka <jh@suse.cz>
2210
2211 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2212 walkers to walk cgraph and varpool.
65c70e6b
JH
2213 (materialize_cgraph): Likewise.
2214 * lto-partition.c (lto_1_to_1_map): Likewise.
2215 (lto_balanced_map): Likewise.
2216 (lto_promote_cross_file_statics): Likewise.
2217
960bfb69
JH
22182012-04-14 Jan Hubicka <jh@suse.cz>
2219
2220 * lto.c: Update field referenced for new cgraph/varpool layout.
2221 * lto-partition.c: Likewise.
2222
a66dc285
JH
22232012-04-11 Jan Hubicka <jh@suse.cz>
2224
2225 * lto.c: Update copyright; remove params.h, ipa-inline.h
2226 and ipa-utils.h inlines; inline lto-partition.h
2227 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2228 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2229 add_references_to_partition, add_cgraph_node_to_partition_1,
2230 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2231 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2232 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2233 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2234 * lto-partition.c: ... here; new file.
2235 * lto-partition.h: New file.
2236 * Make-lang.in (lto.o): Update dependencies.
2237 (lto-partition.o): New.
2238
f3b249e5
RG
22392012-04-05 Richard Guenther <rguenther@suse.de>
2240
2241 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2242 definition.
2243
21fa2faf
RG
22442012-03-12 Richard Guenther <rguenther@suse.de>
2245
2246 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2247
6bb485a3
RG
22482012-03-06 Richard Guenther <rguenther@suse.de>
2249
2250 PR lto/52097
2251 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2252
95510497
RG
22532012-02-28 Richard Guenther <rguenther@suse.de>
2254
2255 PR lto/52400
2256 * lto.c (lto_register_function_decl_in_symtab): Do not register
2257 a reverse renamed decl mapping.
2258
09228fef
JJ
22592012-01-06 Jakub Jelinek <jakub@redhat.com>
2260
2261 PR lto/51774
2262 * lto-lang.c (handle_returns_twice_attribute): New function.
2263 (lto_attribute_table): Add returns_twice attribute.
2264
b03eda0d
RG
22652011-12-21 Richard Guenther <rguenther@suse.de>
2266
2267 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2268 (LTO_FIXUP_TREE): Use it.
2269 (uniquify_nodes): Mark new non-prevailing types and avoid
2270 calling gimple_register_type on others.
2271 (lto_read_decls): Add comment.
2272
4ad9a9de
EB
22732011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2274
2275 * lto.h (lto_parse_hex): Delete.
2276 * lto.c (lto_read_decls): Use 'int' for offsets.
2277 (lto_parse_hex): Make static and return proper 64-bit host type.
2278 (lto_resolution_read): Use proper 64-bit host type.
2279
ea973bad
RG
22802011-12-13 Richard Guenther <rguenther@suse.de>
2281
2282 PR lto/48354
2283 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2284 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2285
c8218030
UB
22862011-12-01 Uros Bizjak <ubizjak@gmail.com>
2287
2288 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2289 (ignore_attribute): New.
2290
57ac2606
AH
22912011-11-21 Aldy Hernandez <aldyh@redhat.com>
2292
2293 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2294 (handle_transaction_pure_attribute): New.
2295
52a35ef7
RG
22962011-11-03 Richard Guenther <rguenther@suse.de>
2297
2298 PR lto/44965
2299 * lto-lang.c (lto_post_options): Do not read file options.
2300 * lto.c (lto_read_all_file_options): Remove.
2301 (lto_init): Call lto_set_in_hooks here.
2302
51973b1e
JH
23032011-10-09 Jan Hubicka <jh@suse.cz>
2304
2305 * lto.c (node_cmp, varpool_node_cmp): New functions.
2306 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2307 (cmp_partitions): Rename to ...
2308 (cmp_partitions_size): ... this one.
2309 (cmp_partitions_order): New function.
2310 (lto_wpa_write_files): Sort partitions by order when
2311 -fno-toplevel-reorder is used.
2312
5958009b
AK
23132011-10-09 Andi Kleen <ak@linux.intel.com>
2314
2315 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2316
e79983f4
MM
23172011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2318
2319 * lto-lang.c (def_builtin_1): Delete old interface with two
2320 parallel arrays to hold standard builtin declarations, and replace
2321 it with a function based interface that can support creating
2322 builtins on the fly in the future. Change all uses, and poison
2323 the old names. Make sure 0 is not a legitimate builtin index.
2324
ecdbd01a 23252011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2326
2327 * lto-object.c (lto_obj_add_section_data): Add list.
2328 (lto_obj_add_section): Fill in list.
2329 (ltoobj_build_section_table): Pass through list.
2330 * lto.c (file_data_list): Declare.
2331 (create_subid_section_table): Pass arguments directly.
2332 Fill in list of file_datas.
2333 (lwstate): Delete.
2334 (lto_create_files_from_ids): Pass in direct arguments.
2335 Don't maintain list.
2336 (lto_file_read): Use explicit section and file data lists.
2337 (lto_read_all_file_options): Pass in section_list.
2338 * lto.h (lto_obj_build_section_table): Add list.
2339 (lto_section_slot): Add next.
2340 (lto_section_list): Declare.
2341
ed0d2da0
JH
23422011-10-02 Jan Hubicka <jh@suse.cz>
2343
2344 PR lto/47247
2345 * common.c (lto_resolution_str): Add new resolution.
2346 * common.h (lto_resolution_str): Likewise.
2347
ad7715f3
L
23482011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2349 Andi Kleen <ak@linux.intel.com>
2350
2351 PR lto/50568
2352 * lto.c (lto_splay_tree_delete_id): New.
2353 (lto_splay_tree_compare_ids): Likewise.
2354 (lto_splay_tree_lookup): Likewise.
2355 (lto_splay_tree_id_equal_p): Likewise.
2356 (lto_splay_tree_insert): Likewise.
2357 (lto_splay_tree_new): Likewise.
2358 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2359 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2360 (create_subid_section_table): Use lto_splay_tree_lookup and
2361 lto_splay_tree_insert.
2362 (lto_file_read): Use lto_splay_tree_new.
2363
ecdbd01a 23642011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2365
2366 * lto.c (lto_resolution_read): Remove id dumping.
2367 (lto_section_with_id): Turn id HOST_WIDE_ID.
2368 (create_subid_section_table): Dito.
2369
892a371f
DS
23702011-08-28 Dodji Seketeli <dodji@redhat.com>
2371
2372 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2373 linemap_add twice.
2374
f82d1a94
MJ
23752011-08-11 Martin Jambor <mjambor@suse.cz>
2376
2377 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2378
f0efc7aa
DN
23792011-08-08 Diego Novillo <dnovillo@google.com>
2380
2381 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2382 * lto.c: Include tree-streamer.h.
2383
1a072294
RG
23842011-07-06 Richard Guenther <rguenther@suse.de>
2385
2386 * lto-lang.c (lto_init):
2387 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2388
7496868d
JH
23892011-06-11 Jan Hubicka <jh@suse.cz>
2390
10f13f22 2391 PR lto/48246
7496868d
JH
2392 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2393 (lto_balanced_map): Likewise.
2394
39e2db00
JH
23952011-06-11 Jan Hubicka <jh@suse.cz>
2396
2397 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2398 (add_cgraph_node_to_partition) ... here; walk aliases.
2399 (lto_1_to_1_map): Remove same body alias code.
2400 (promote_fn): Likewise.
2401 (lto_promote_cross_file_statics): Update comment.
2402
2403
28628ea6
DN
24042011-06-07 Diego Novillo <dnovillo@google.com>
2405
2406 * lto.c (uniquify_nodes): Move code to register decls to
2407 the loop that computes canonical types.
2408
009db074
RG
24092011-06-07 Richard Guenther <rguenther@suse.de>
2410
2411 * lto-lang.c (lto_init): Do not set
2412 size_type_node or call set_sizetype.
2413
47c79d56
DN
24142011-06-04 Diego Novillo <dnovillo@google.com>
2415
2416 * lto.c (lto_init): New.
2417 (lto_main): Call it.
2418
d5828cc7
DN
24192011-06-03 Diego Novillo <dnovillo@google.com>
2420
2421 * lto.c (get_resolution): Move from lto-streamer-in.c.
2422 (lto_register_var_decl_in_symtab): Likewise.
2423 (lto_register_function_decl_in_symtab): Likewise.
2424 (uniquify_nodes): Call lto_register_var_decl and
2425 lto_register_function_decl_in_symtab after reading a new
2426 VAR_DECL or FUNCTION_DECL.
2427
6807da97
RG
24282011-06-01 Richard Guenther <rguenther@suse.de>
2429
2430 * lto-lang.c (lto_register_canonical_types): New function.
2431 (lto_init): Register common nodes with the canonical type machinery.
2432 Do not play tricks with char_type_node.
2433
d74be317
RG
24342011-05-26 Richard Guenther <rguenther@suse.de>
2435
2436 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2437
d9f8303f
NF
24382011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2439
2440 * lto.c (lto_ft_typed): New function.
2441 (lto_ft_common): Call it.
2442 (lto_ft_constructor): Likewise.
2443 (lto_ft_expr): Likewise.
2444 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2445 TREE_CHAIN.
2446
fb291a1e
RG
24472011-05-20 Richard Guenther <rguenther@suse.de>
2448
2449 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2450 (lto_ft_type): Move main-variant and pointer-to chain building ...
2451 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2452 in a separate final loop.
2453
31b3ca64
RG
24542011-05-19 Richard Guenther <rguenther@suse.de>
2455
2456 * lto.c (uniquify_nodes): First register all types before
2457 fixing up the tree SCC.
2458
35d828c5
JH
24592011-05-11 Jan Hubicka <jh@suse.cz>
2460
2461 PR lto/48952
2462 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2463
51545682
NF
24642011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2465
2466 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2467 location of binfo field.
2468 (lto_fixup_prevailing_decls): Likewise.
2469
8242dd04
NF
24702011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2471
2472 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2473 build_function_type_array or build_varargs_function_type_array
2474 instead.
2475
c99c0026
EB
24762011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2477
2478 * lto-lang.c (global_bindings_p): Return bool.
2479
c47d0034
JH
24802011-05-07 Jan Hubicka <jh@suse.cz>
2481
a9bcb3f0
EB
2482 * lto.c (lto_materialize_function): Use
2483 cgraph_function_with_gimple_body_p.
2484 (add_cgraph_node_to_partition): Do not re-add items to partition;
2485 handle thunks.
c47d0034
JH
2486 (add_varpool_node_to_partition): Do not re-add items to partition.
2487
bb3398ca
JH
24882011-05-03 Jan Hubicka <jh@suse.cz>
2489
2490 * lto.c (free_ltrans_partitions): Fix accidental commit.
2491
1cb1a99f
JH
24922011-05-03 Jan Hubicka <jh@suse.cz>
2493
2494 * lto.c (ltrans_partition_def): Remove GTY annotations.
2495 (ltrans_partitions): Move to heap.
2496 (new_partition): Update.
2497 (free_ltrans_partitions): New function.
2498 (lto_wpa_write_files): Use it.
2499
af8bca3c
MJ
25002011-04-29 Martin Jambor <mjambor@suse.cz>
2501
2502 * lto.c: Include ipa-utils.h.
2503 (lto_balanced_map): Update call to ipa_reverse_postorder.
2504 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2505
b823cdfe
MM
25062011-04-29 Michael Matz <matz@suse.de>
2507
2508 * lto.c (toplevel): Include tree-flow.h.
2509 (lto_read_in_decl_state): Don't merge types here.
2510 (tree_with_vars): New static hash table.
2511 (remember_with_vars): New static functions.
2512 (LTO_FIXUP_TYPE): New macro.
2513 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2514 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2515 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2516 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2517 (lto_read_decls): Uniquify while reading in trees.
2518 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2519 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2520 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2521 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2522 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2523 lto_fixup_tree): Remove.
2524 (lto_fixup_state): Remove data argument. Use
2525 lto_symtab_prevailing_decl.
2526 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2527 (lto_fixup_prevailing_decls): New function.
2528 (lto_fixup_state_aux): Argument aux is unused.
2529 (lto_fixup_decls): Don't allocate pointer sets, don't use
2530 lto_fixup_tree, use lto_fixup_prevailing_decls.
2531 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2532 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2533
b9843260
EB
25342011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2535
2536 * lto.c (lto_balanced_map): Fix typos in head comment.
2537 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2538 test.
2539
e7f23018
JH
25402011-04-16 Jan Hubicka <jh@suse.cz>
2541
2542 * lto.c (lto_balanced_map): Update.
2543
10a5dd5d
JH
25442011-04-14 Jan Hubicka <jh@suse.cz>
2545
2546 * lto.c: Include ipa-inline.h
b9843260
EB
2547 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2548 accessor.
10a5dd5d
JH
2549 (ipa_node_duplication_hook): Fix declaration.
2550 * Make-lang.in (lto.o): Update dependencies.
2551
81f653d6
NF
25522011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2553
2554 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2555 calling TREE_CHAIN.
2556 * lto.c (lto_fixup_common): Likewise.
2557
dcf0c47e
NF
25582011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2559
2560 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2561 (handle_type_generic_attribute): Likewise.
2562
e89964e3
MM
25632011-04-03 Michael Matz <matz@suse.de>
2564
2565 * lto.c (lto_materialize_function): Don't read and then discard
2566 sections in WPA mode.
2567 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2568
2569 * lto-lang.c (registered_builtin_fndecls): Remove.
2570 (lto_getdecls): Return NULL_TREE.
2571 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2572
d2b3fe18
RG
25732011-03-31 Richard Guenther <rguenther@suse.de>
2574
2575 PR lto/48246
2576 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2577 partitions when checking is not enabled.
2578
ba78087b
KT
25792011-03-25 Kai Tietz <ktietz@redhat.com>
2580
2581 * lto.c (lto_resolution_read): Use filename_cmp instead
2582 of strcmp.
2583 (lto_read_section_data): Likewise.
2584
0edf1bb2
JL
25852011-03-25 Jeff Law <law@redhat.com>
2586
2587 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2588
62d784f7
KT
25892011-03-21 Kai Tietz <ktietz@redhat.com>
2590
2591 PR target/12171
2592 * lto-lang.c (lto_attribute_table): Adjust table.
2593
62dd9571
JJ
25942011-02-18 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR bootstrap/47807
2597 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2598 of lto-streamer.h.
2599
237d6259
RG
26002011-02-18 Richard Guenther <rguenther@suse.de>
2601
2602 PR lto/47798
2603 * lto-tree.h (lto_global_var_decls): Do not declare here.
2604 * lto-lang.c: Include lto-streamer.h.
2605 * Make-lang.in (lto-lang.o): Adjust dependencies.
2606
8ead2223
KT
26072011-02-10 Kai Tietz <kai.tietz@onevision.com>
2608
2609 PR lto/47241
2610 * lto.c (lto_read_section_data): Free
2611 fd_name in failure case.
2612 For mingw targets don't hash file-descriptor.
2613 (read_cgraph_and_symbols): Close current_lto_file
2614 in failure case.
2615
6e701822
JH
26162011-01-11 Jan Hubicka <jh@suse.cz>
2617
2618 PR lto/45721
2619 PR lto/45375
b9843260
EB
2620 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2621 are not partitioned.
6e701822 2622
f4da8dce
NF
26232010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2624
2625 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2626 Use prototype_p.
2627
6b7fb143
RG
26282010-12-06 Richard Guenther <rguenther@suse.de>
2629
2630 PR lto/46796
2631 * lto-lang.c (lto_init): Give names to basic types.
2632
c59ffc41
JM
26332010-11-30 Joseph Myers <joseph@codesourcery.com>
2634
2635 * lto-object.c: Don't include toplev.h.
2636 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2637
7c475d11
JM
26382010-11-30 Joseph Myers <joseph@codesourcery.com>
2639
2640 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2641 $(TOPLEV_H).
2642
71f3e391
JM
26432010-11-29 Joseph Myers <joseph@codesourcery.com>
2644
2645 * lto-endian.h: Delete.
2646 * lto-object.c: Don't include "libiberty.h".
2647 (O_BINARY): Don't define.
2648 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2649 (O_BINARY): Don't define.
2650
9f1718b0
RG
26512010-11-23 Richard Guenther <rguenther@suse.de>
2652
2653 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2654
39c4e298
RG
26552010-11-23 Richard Guenther <rguenther@suse.de>
2656
2657 PR lto/46605
2658 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2659
b37421c6
JM
26602010-11-17 Joseph Myers <joseph@codesourcery.com>
2661
2662 * lto.c (lto_main): Take no arguments.
2663 * lto.h (lto_main): Update prototype.
2664
d82f74d3
ILT
26652010-11-16 Ian Lance Taylor <iant@google.com>
2666
2667 * lto-object.c (lto_obj_file_open): Call
2668 simple_object_attributes_merge rather than
2669 simple_object_attributes_compare.
2670
a4d8c676
JM
26712010-11-12 Joseph Myers <joseph@codesourcery.com>
2672
2673 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2674 * lto-lang.c (lto_handle_option): Take location_t parameter.
2675
d8a07487
JM
26762010-11-10 Joseph Myers <joseph@codesourcery.com>
2677
2678 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2679 letters and remove trailing '.'.
2680 (lto_file_finalize): Start diagnostic with a lowercase letter.
2681
6b3456d1
ILT
26822010-11-02 Ian Lance Taylor <iant@google.com>
2683
2684 * lto-object.c: New file.
2685 * lto-elf.c: Remove file.
2686 * lto-macho.c: Remove file.
2687 * lto-macho.h: Remove file.
2688 * lto-coff.c: Remove file.
2689 * lto-coff.h: Remove file.
2690 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2691 lto/lto-object.o.
2692 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2693 (lto/lto-objfile.o): New target.
2694 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2695 (lto/lto.o): Remove $(LIBIBERTY_H).
2696
030cd86c
JH
26972010-10-22 Jan Hubicka <jh@suse.cz>
2698
2699 * lto.c (add_cgraph_node_to_partition,
2700 add_varpool_node_to_partition): Add debug info.
2701 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2702 partitioned nodes.
2703 (do_whole_program_analysis): Set function flags before dumping.
2704
4490cae6
RG
27052010-10-22 Richard Guenther <rguenther@suse.de>
2706
2707 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2708 the new gimple_register_canonical_type.
2709
703cdce3
L
27102010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2711
2712 PR bootstrap/45954
2713 * config-lang.in (boot_language): Set to $enable_lto.
2714
1915c739
JJ
27152010-10-18 Jakub Jelinek <jakub@redhat.com>
2716
2717 PR lto/45638
2718 * Make-lang.in (check-lto): New dummy target.
2719
82971de5
EB
27202010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2721
2722 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2723
a75bfaa6
JM
27242010-10-08 Joseph Myers <joseph@codesourcery.com>
2725
2726 * lto-lang.c (lto_init_options): Change to
2727 lto_init_options_struct. Update parameters.
2728 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2729 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2730
937f7f69
JH
27312010-10-06 Jan Hubicka <jh@suse.cz>
2732
2733 * lto.c (lto_balanced_map): Fix accounting of program size.
2734
2169830c
JH
27352010-10-06 Jan Hubicka <jh@suse.cz>
2736
2737 * lto.c (lto_balanced_map): Do not produce empty partitions.
2738
ecdbd01a 27392010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2740
2741 * lto.c (lto_process_name): Add.
2742 (lto_main): Call lto_process_name.
2743
06ed016f
JH
27442010-10-06 Jan Hubicka <jh@suse.cz>
2745
2746 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2747 COMDATs required by the linker.
2748
ae718d66
ILT
27492010-10-05 Ian Lance Taylor <iant@google.com>
2750
2751 * lto.c (lto_section_with_id): Make s a const pointer.
2752
852e4bd2
JH
27532010-10-05 Jan Hubicka <jh@suse.cz>
2754
2755 * lto.c: Include params.h.
2756 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2757 refcounting in aux field.
2758 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2759 New functions.
2760 (lto_1_to_1_map): Simplify.
2761 (lto_balanced_map): New function.
2762 (do_whole_program_analysis): Chose proper partitioning alg.
2763 * Make-lang.in (lto.o): Add dependency on params.h
2764
ecdbd01a 27652010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2766
2767 * Make-lang.in (lto1): Add + to build rule.
2768
ecdbd01a 27692010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2770
2771 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 2772 with fatal_error.
f1e92a43 2773
0d6e14fd
JH
27742010-09-28 Jan Hubicka <jh@suse.cz>
2775
2776 * lto-lang.c (handle_leaf_attribute): New function.
2777 (lto_attribute_tables): Add leaf.
2778
fb462383
JZ
27792010-09-25 Jie Zhang <jie@codesourcery.com>
2780
2781 * lto.c (lto_read_all_file_options): Start a new line after
2782 printing out file names.
2783
051f8cc6
JH
27842010-09-24 Jan Hubicka <jh@suse.cz>
2785
2786 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2787
64e0f5ff
JH
27882010-09-20 Jan Hubicka <jh@suse.cz>
2789
2790 PR tree-optimize/45605
2791 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2792
a929ec3d
GP
27932010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2794
2795 * lto-elf.c (lto_obj_file_open): Also provide filename when
2796 elf_begin fails.
2797
4c588abf
JH
27982010-09-17 Jan Hubicka <jh@suse.cz>
2799
2800 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2801
c3224d6f
RG
28022010-09-17 Richard Guenther <rguenther@suse.de>
2803
2804 * lang.opt (flag_wpa): Also enable for the driver.
2805
52b3b3c7
JH
28062010-09-16 Jan Hubicka <jh@suse.cz>
2807
2808 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2809 EXTERNAL flags.
2810
969c37b7
LB
28112010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2812
2813 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2814
098a4f50
JH
28152010-09-08 Jan Hubicka <jh@suse.cz>
2816
2817 * lto.c (real_file_count, real_file_decl_data): New static vars.
2818 (read_cgraph_and_symbols): Use it.
2819
0f443ad0
RG
28202010-09-08 Richard Guenther <rguenther@suse.de>
2821
2822 * lto.c (read_cgraph_and_symbols): Collect again after each
2823 file.
2824
ee187353
JH
28252010-09-07 Jan Hubicka <jh@suse.cz>
2826
2827 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2828
b3ec52d0
RG
28292010-09-03 Richard Guenther <rguenther@suse.de>
2830
2831 * lto-elf.c (validate_file): Always error if validation fails.
2832
f1395d4a
JH
28332010-08-20 Jan Hubicka <jh@suse.cz>
2834
2835 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2836 (lto_wpa_write_files): Update comments.
2837
2429bce3
L
28382010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2839
2840 PR bootstrap/45357
2841 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2842 with has_analyzed_clone_p.
2843
e0f967db
JH
28442010-08-20 Jan Hubicka <jh@suse.cz>
2845
2846 * lto.c (has_analyzed_clone_p): New function
2847 (lto_materialize_function): Use callgraph to determine if
2848 body is needed.
2849 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2850
ac47786e
NF
28512010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2852
2853 * lto.c: Use FOR_EACH_VEC_ELT.
2854
ecdbd01a 28552010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
2856
2857 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2858
5f20c657
JM
28592010-07-27 Joseph Myers <joseph@codesourcery.com>
2860
2861 * lto-lang.c (lto_handle_option): Update prototype and return
2862 value type. Remove duplicate assignment to result.
2863
7a9bf9a4
JM
28642010-07-27 Joseph Myers <joseph@codesourcery.com>
2865
2866 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2867 New.
2868 (lto_init_options): Update prototype.
2869 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2870 Define.
2871
ecdbd01a 28722010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
2873
2874 PR lto/44992
92a285c1 2875 * lto.c: Include splay-tree.h
73ce4d1e
AK
2876 (lto_resolution_read): Change to walk file_ids tree and parse
2877 extra file_id in resolution file.
2878 (lto_section_with_id): Add.
2879 (create_subid_section_table): Add.
2880 (lwstate): Add.
2881 (lto_create_files_from_ids): Add.
2882 (lto_file_read): Change to handle sub file ids and create list
2883 of file_datas. Add output argument for count.
2884 (get_section_data): Pass file_data to lto_get_section_name.
2885 (lto_flatten_file): Add.
2886 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2887
ecdbd01a 28882010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
2889
2890 * lto-coff.c (hash_name, eq_name): Move.
2891 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2892 * lto-elf.c: (hash_name, eq_name): Move.
2893 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2894 * lto-macho.c: (hash_name, eq_name): Move.
2895 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2896 * lto.c: (hash_name, eq_name): Move from lto-*.c
2897 (lto_obj_create_section_hash_table): Add.
2898 (free_with_string): Add.
2899
718f9c0f
MLI
29002010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2901
2902 * lto-coff.c: Include diagnostic-core.h in every file that
2903 includes toplev.h.
2904 * lto-elf.c: Likewise.
2905 * lto-lang.c: Likewise.
2906 * lto-macho.c: Likewise.
2907
1b137837
JJ
29082010-07-07 Jakub Jelinek <jakub@redhat.com>
2909
2910 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2911 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2912 objects.
2913
92eb4438
JH
29142010-07-05 Jan Hubicka <jh@suse.cz>
2915
2916 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2917 nodes from same comdat group as well as all comdat functions referenced
2918 here.
b9843260
EB
2919 (add_varpool_node_to_partition, add_references_to_partition): New
2920 function.
2921 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2922 add_varpool_node_to_partition; clear aux flags when done.
2923 (lto_promote_cross_file_statics): Do not promote stuff that gets
2924 duplicated to each ltrans.
92eb4438 2925
a05541a9
JH
29262010-07-04 Jan Hubicka <jh@suse.cz>
2927
92a285c1 2928 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 2929
4a2ac96f
RG
29302010-06-13 Richard Guenther <rguenther@suse.de>
2931
2932 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2933
1d536046
KT
29342010-06-09 Kai Tietz <kai.tietz@onevision.com>
2935
2936 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2937 * lto-coff.c (coff_write_object_file): Add braces to if.
2938
a9429e29
LB
29392010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2940
2941 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2942 (lto_file_read): Likewise.
2943 (new_partition): Likewise.
2944 (read_cgraph_and_symbols): Likewise.
2945
5498f011
JM
29462010-06-07 Joseph Myers <joseph@codesourcery.com>
2947
2948 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2949 (lto_handle_option): Don't set flag_signed_char here.
2950
d4c0c9f6
RG
29512010-06-04 Richard Guenther <rguenther@suse.de>
2952
2953 PR lto/41584
2954 * lto.c (lto_1_to_1_map): Use the proper file_data for
2955 varpool nodes.
2956
0a5fa5a1
JH
29572010-05-30 Jan Hubicka <jh@suse.cz>
2958
2959 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2960 partitioning decisions.
2961
9eec9488
JH
29622010-05-29 Jan Hubicka <jh@suse.cz>
2963
2964 * lto.c (bitmap vector): Remove.
2965 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2966 (ltrans_partition_def): New structure.
2967 (ltrans_partition): New type and VECtor.
2968 (new_partition): New function.
2969 (add_cgraph_node_to_partition): New function.
2970 (lto_1_to_1_map): Reorganize for partitions.
2971 (lto_add_inline_clones): Remove.
2972 (lto_add_all_inlinees): Remove.
2973 (lto_promote_cross_file_statics): Use partitions.
2974 (cmp_partitions): New function.
2975 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2976 use partitions; output files sorted by size.
2977
3e097227
SB
29782010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2979
2980 * Make-lang.in: Replace vec.h dependency with VEC_H.
2981
7ca92787
JM
29822010-05-28 Joseph Myers <joseph@codesourcery.com>
2983
2984 * lto-coff.c (coff_errmsg): Remove.
2985 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2986 errors instead of coff_errmsg (-1).
2987 * lto-macho.c (mach_o_errmsg): Remove.
2988 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2989 instead of mach_o_errmsg (-1).
2990 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2991 xstrerror (errno).
2992
b5611987
RG
29932010-05-28 Richard Guenther <rguenther@suse.de>
2994
2995 * lto.c (prefix_name_with_star): Removed.
2996 (strip_extension): Likewise.
2997 (get_filename_for_set): Likewise.
2998 (lto_write_ltrans_list): Fold into ...
2999 (lto_wpa_write_files): ... this. Name LTRANS units
3000 by suffixing the ltrans output list filename.
3001 (do_whole_program_analysis): Adjust.
3002
1da2ed5f
JM
30032010-05-27 Joseph Myers <joseph@codesourcery.com>
3004
3005 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3006 (read_cgraph_and_symbols, lto_main): Use seen_error.
3007 * Make-lang.in (lto/lto.o): Update dependencies.
3008
7951d88a
EB
30092010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3010
3011 PR lto/44230
3012 * lto.h (lto_eh_personality): New prototype.
3013 * lto.c: Include debug.h.
3014 (first_personality_decl): New static variable.
3015 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3016 first function for which it is non-null.
3017 (lto_eh_personality_decl): New static variable.
3018 (lto_eh_personality): New function.
3019 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3020 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3021
e12da9c2
SB
30222010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3023
3024 * lto-lang.c: Do not include expr.h.
3025
468194f4
RG
30262010-05-24 Richard Guenther <rguenther@suse.de>
3027
3028 * lto-elf.c (lto_obj_build_section_table): Work around
3029 FreeBSD libelf issue.
3030
bd9eb5da
RG
30312010-05-22 Richard Guenther <rguenther@suse.de>
3032
3033 * lto.c (read_cgraph_and_symbols): Do not collect.
3034
66576e1b
JH
30352010-05-20 Jan Hubicka <jh@suse.cz>
3036
3037 * lto.c (promote_var, promote_fn): New functions.
3038 (lto_promote_cross_file_statics): Compute correctly boundary including
3039 static initializers of readonly vars.
3040
36576655
JH
30412010-05-18 Jan Hubicka <jh@suse.cz>
3042
66576e1b 3043 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3044 (lto_promote_cross_file_statics): Deal with non-inline clones.
3045
28632d63
JH
30462010-05-18 Jan Hubicka <jh@suse.cz>
3047
3048 * lto.c (lto_materialize_function): Announce function when
3049 reading body; allocate_struct_function only when reading body;
3050 do not finalize local statics; ggc_collect after reading;
3051 do not mark reachable node.
3052 (materialize_cgraph): Do not announce function.
3053
33e42d56
JH
30542010-05-11 Jan Hubicka <jh@suse.cz>
3055
3056 * lto.c (materialize_cgraph): Revert my previous patch.
3057
f6430ea5
KT
30582010-05-11 Kai Tietz <kai.tietz@onevision.com>
3059
3060 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3061 IMAGE_FILE_MACHINE_AMD64.
3062 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3063
0a0b07b7
JH
30642010-05-11 Jan Hubicka <jh@suse.cz>
3065
3066 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3067 (materialize_cgraph): Add it here.
3068
9a809897
JH
30692010-05-11 Jan Hubicka <jh@suse.cz>
3070
3071 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3072 vector.
3073
30742010-05-11 Jan Hubicka <jh@suse.cz>
3075
3076 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3077 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3078 use reachable_from_other_partition_p and
3079 referenced_from_other_partition_p test.
3080
94f64249
KT
30812010-05-11 Kai Tietz <kai.tietz@onevision.com>
3082
3083 * lto-coff.c (validate_file): Add x64-coff support.
3084 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3085 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3086 * lto-lang.c (lto_build_c_type_nodes): Add check for
3087 'long long unsigned int' for x64-windows.
3088 (lto_init): Likewise.
3089
3090
c082f9f3
SB
30912010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3092
3093 * lto.h (struct lto_file_struct): Document offset member.
3094 * lto-endian.h: New file.
3095 * lto-macho.h: New file.
3096 * lto-macho.c: New file.
3097 * Make-lang.in: Add rule for lto-macho.o.
3098
3f8257db 30992010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3100
3101 PR lto/43857
3102 PR lto/43371
3103 * lang.opt (fresolution): Change to ...
3104 (fresolution=): ... this.
3105 * lto-lang.c (lto_handle_option): Adjust.
3106
48cf395b
RB
31072010-05-07 Richard Guenther <rguenther@suse.de>
3108
3109 * lto.c (DUMPBASE_SUFFIX): Remove.
3110 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3111 Rename to ...
3112 (lto_write_ltrans_list): ... only output the list of ltrans files.
3113 (lto_maybe_unlink): Remove.
3114 (do_whole_program_analysis): Do not execute LTRANS phase
3115 from here.
3116
afa83c15
L
31172010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3118
3119 * lto-lang.c (lto_handle_option): Add argument kind.
3120
369451ec
JH
31212010-05-05 Jan Hubicka <jh@suse.cz>
3122
48cf395b
RB
3123 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3124 refs.
369451ec 3125
2f41ecf5
JH
31262010-05-05 Jan Hubicka <jh@suse.cz>
3127
3128 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3129
ace72c88
JH
31302010-04-30 Jan Hubicka <jh@suse.cz>
3131
b9843260
EB
3132 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3133 use default name.
ace72c88
JH
3134 (lto_wpa_write_files): Write any non-empty partition.
3135
05575e07
JH
31362010-04-30 Jan Hubicka <jh@suse.cz>
3137
3138 * lto.c: Do not attempt to make constant pool references global.
3139
49ba8180
JH
31402010-04-28 Jan Hubicka <jh@suse.cz>
3141
3142 * lto/lto.c (lto_read_in_decl_state): Use GGC.
3143 (lto_wpa_write_files): Announce what we are writting.
3144 (all_file_decl_data): New.
3145 (read_cgraph_and_symbols): Use GGC; correct timevars.
3146 (do_whole_program_analysis): Collect.
3147 * lto/Make-lang.in (lto.o): Fix dependency.
3148 * Makefile.in (GTFILES): Add lto-streamer.h.
3149 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3150 (varpool_assemble_pending_decls): Use VAROUT.
3151 * lto-streamer.h (lto_tree_ref_table): Annotate.
3152 (lto_in_decl_state): Annotate.
3153 (lto_file_decl_data): Annotate.
3154
2942c502
JH
31552010-04-28 Jan Hubicka <jh@suse.cz>
3156
3157 * lto.c (lto_varpool_node_sets): New.
3158 (lto_1_to_1_map): Partition varpool too.
3159 (globalize_context_t, globalize_cross_file_statics,
3160 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3161 lto_scan_statics_in_remaining_global_vars): Remove.
3162 (lto_promote_cross_file_statics): Rewrite.
3163 (get_filename_for_set): Take vset argument.
3164 (lto_wpa_write_files): Pass around vsets.
3165
3bec79c5
DK
31662010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3167
3168 PR lto/42776
3169 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3170 hardcoding 'lto-elf.o'.
3171 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3172
3173 * lto-coff.h: New file.
3174 * lto-coff.c: Likewise.
3175
21aac880
RG
31762010-04-26 Richard Guenther <rguenther@suse.de>
3177
3178 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3179
2cee0101
DK
31802010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3181
3182 * lto.h (lto_elf_file_open): Rename prototype from this ...
3183 (lto_obj_file_open): ... to this.
3184 (lto_elf_file_close): Likewise ...
3185 (lto_obj_file_close): ... and likewise.
3186 (lto_elf_build_section_table): Likewise ...
3187 (lto_obj_build_section_table): ... and likewise.
3188 (lto_elf_begin_section): Likewise ...
3189 (lto_obj_begin_section): ... and likewise.
3190 (lto_elf_append_data): Likewise ...
3191 (lto_obj_append_data): ... and likewise.
3192 (lto_elf_end_section): Likewise ...
3193 (lto_obj_end_section): ... and likewise.
3194 * lto.c (lto_file_read): Update references to the above.
3195 (lto_wpa_write_files): Likewise.
3196 (lto_read_all_file_options): Likewise.
3197 (read_cgraph_and_symbols): Likewise.
3198 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3199 (LANG_HOOKS_APPEND_DATA): Likewise.
3200 (LANG_HOOKS_END_SECTION): Likewise.
3201 * lto-elf.c (lto_elf_file_open): Rename from this ...
3202 (lto_obj_file_open): ... to this, updating any references.
3203 (lto_elf_file_close): Likewise ...
3204 (lto_obj_file_close): ... and likewise.
3205 (lto_elf_build_section_table): Likewise ...
3206 (lto_obj_build_section_table): ... and likewise.
3207 (lto_elf_begin_section): Likewise ...
3208 (lto_obj_begin_section): ... and likewise.
3209 (lto_elf_append_data): Likewise ...
3210 (lto_obj_append_data): ... and likewise.
3211 (lto_elf_end_section): Likewise ...
3212 (lto_obj_end_section): ... and likewise.
3213
bc58d7e1
JH
32142010-04-21 Jan Hubicka <jh@suse.cz>
3215
3216 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3217 (materialize_cgraph): Likewise.
3218
e792884f
JH
32192010-04-21 Jan Hubicka <jh@suse.cz>
3220
3221 * lto.c (lto_wpa_write_files): Update.
3222 (read_cgraph_and_symbols): Be more verbose.
3223 (materialize_cgraph): Likewise.
3224 (do_whole_program_analysis): Likewise.
3225
c9945504
JH
32262010-04-21 Jan Hubicka <jh@suse.cz>
3227
3228 * lto.c (globalize_cross_file_statics): When function has address taken,
3229 it needs to be public.
3230
a837268b
JH
32312010-04-20 Jan Hubicka <jh@suse.cz>
3232
3233 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3234 (lto_add_all_inlinees): Likewise.
3235 (lto_wpa_write_files): Likewise.
3236
3b9e5d95
EB
32372010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3238
3239 * lto-lang.c (lto_init): Remove second argument in call to
3240 build_common_tree_nodes.
3241
8ccb78f2
RO
32422010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3243
3244 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3245 function.
3246
2f9b99e6
EB
32472010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3248
3249 PR bootstrap/43276
3250 * lto-elf.c: Define EM_* constants if not already defined.
3251
bef7d288
EB
32522010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3253
3254 * lto-elf.c (is_compatible_architecture): New static function.
3255 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3256
f68df07c
RG
32572010-02-11 Richard Guenther <rguenther@suse.de>
3258
3259 PR driver/43021
3260 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3261 appropriately.
3262
3cdea2b4
AH
32632010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3264
3265 * lto.c (O_BINARY): Define.
3266 (lto_read_section_data): Open file in binary mode.
3267 * lto-elf.c (O_BINARY): Define.
3268 (lto_elf_file_open): Open file in binary mode.
3269
c59449fa
RG
32702010-01-08 Richard Guenther <rguenther@suse.de>
3271
3272 PR lto/42528
3273 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3274 (lto_init): Do not init char_type_node in a standard way
3275 but according to flag_signed_char.
3276
d7fb0a6d
L
32772010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3278
3279 PR lto/41564
3280 * lto.c (DUMPBASE_SUFFIX): New.
3281 (lto_execute_ltrans): Append a sequence number to -dumpbase
3282 for LTRANS.
3283
78ce4053
L
32842010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3285
3286 PR lto/42580
3287 * lto-elf.c (lto_elf_file_open): Stop if the command line
3288 option file is missing.
3289
2a71eb48
RG
32902009-12-15 Richard Guenther <rguenther@suse.de>
3291
3292 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3293 (lto_post_options): Do not disable debuginfo.
3294
a818bca1
DG
32952009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3296
3297 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3298
e7d00517
RG
32992009-12-11 Richard Guenther <rguenther@suse.de>
3300
3301 PR lto/42037
3302 * lto.c (lto_resolution_read): Properly grow the vector.
3303
1ab53893
RG
33042009-12-11 Richard Guenther <rguenther@suse.de>
3305
3306 PR lto/41915
3307 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3308 to the C99 default. Do not set flag_unit_at_a_time.
3309
0f900dfa
JJ
33102009-11-28 Jakub Jelinek <jakub@redhat.com>
3311
3312 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3313 variable.
3314
92fa7608
RAE
33152009-11-19 Rafael Avila de Espindola <espindola@google.com>
3316
3317 PR bootstrap/42096
3318 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3319 * lto.c (lto_parse_hex): New.
3320 (lto_resolution_read): Use lto_parse_hex.
3321 * lto.h (lto_parse_hex): New.
3322
9870fe4f
RAE
33232009-11-17 Rafael Avila de Espindola <espindola@google.com>
3324
3325 * lto-elf.c (lto_file_init): Add offset argument.
3326 (lto_elf_file_open): Record the offset.
3327 * lto.c (lto_resolution_read): Change file_name into a lto_file
3328 argument. Check offsets.
3329 (lto_file_read): Update call to lto_resolution_read.
3330 * lto.h (lto_file_struct): Add the offset field.
3331
1b70729f
RAE
33322009-11-16 Rafael Avila de Espindola <espindola@google.com>
3333
3334 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3335
0e3776db
JH
33362009-11-14 Jan Hubicka <jh@suse.cz>
3337
3338 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3339
06bd7f56
RAE
33402009-11-12 Rafael Avila de Espindola <espindola@google.com>
3341
3342 * lang.opt (fresolution): Renamed from resolution.
3343 * lto-lang.c (lto_handle_option): Handle new option name.
3344 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3345
7e9dc421 33462009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3347 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3348
3349 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3350 (lto_elf_file_open): Handle offsets in arguments name@offest.
3351
b207f900
RG
33522009-10-30 Richard Guenther <rguenther@suse.de>
3353
3354 PR lto/41858
3355 * lto.c (lto_file_read): Do not set file_data->fd.
3356 (lto_read_section_data): Use a single-entry file-descriptor cache.
3357 Do not check the result of xmalloc.
3358 (free_section_data): Do not use file_data->fd.
3359 (lto_read_all_file_options): Likewise.
3360
2c928155
RG
33612009-10-22 Richard Guenther <rguenther@suse.de>
3362
3363 * lto.c (lto_fixup_jump_functions): Remove.
3364 (lto_fixup_decls): Do not fixup jump functions.
3365 (read_cgraph_and_symbols): Schedule cgraph merging after
3366 summary reading. Schedule type and decl fixup before
3367 summary reading.
3368
f9c91f8a
RB
33692009-10-22 Richard Guenther <rguenther@suse.de>
3370
3371 * lto.c (lto_fixup_data_t): Remove free_list member.
3372 (lto_fixup_tree): Do not insert into free_list.
3373 (free_decl): Remove.
3374 (lto_fixup_decls): Remove free-list handling.
3375
fb3f88cc
JH
33762009-10-22 Jan Hubicka <jh@suse.cz>
3377
3378 * lto.c (lto_fixup_jump_functions): New function.
3379 (lto_fixup_decls): Use it.
3380
35f1e9f4
RG
33812009-10-16 Richard Guenther <rguenther@suse.de>
3382
3383 PR lto/41715
3384 * lto.c (lto_fixup_tree): Revert last change.
3385
200c8750
RG
33862009-10-14 Richard Guenther <rguenther@suse.de>
3387
3388 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3389 compatible with the one we replace wrap it around a
3390 VIEW_CONVERT_EXPR.
3391
b1b07c92
RG
33922009-10-09 Richard Guenther <rguenther@suse.de>
3393
3394 PR lto/41635
3395 PR lto/41636
3396 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3397 a file.
3398 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3399 (init_ehdr##BITS): Likewise.
3400
3c2e7d45
JM
34012009-10-08 Joseph Myers <joseph@codesourcery.com>
3402
3403 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3404 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3405 diagnostics.
3406 * lto-lang.c (lto_post_options): Remove trailing "." from
3407 diagnostics.
3408
0d0bfe17
RG
34092009-10-08 Richard Guenther <rguenther@suse.de>
3410
3411 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3412 hash tables.
3413
4bedf19a
JM
34142009-10-07 Joseph Myers <joseph@codesourcery.com>
3415
3416 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3417
b20996ff
JH
34182009-10-07 Jan Hubicka <jh@suse.cz>
3419
3420 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3421 ltrans stage; explain why this is needed and should not.
3422
1a735925
RG
34232009-10-05 Richard Guenther <rguenther@suse.de>
3424
3425 PR lto/41552
3426 PR lto/41487
3427 * lto.c (lto_read_decls): Do not register deferred decls.
3428 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3429 until after reading the IPA summaries.
3430
d7f09764
DN
34312009-10-02 Rafael Avila de Espindola <espindola@google.com>
3432
3433 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3434 (lto-lang.c): Don't include lto/common.h.
3435
34362009-10-02 Rafael Avila de Espindola <espindola@google.com>
3437
3438 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3439 (lto/common.o): Remove.
3440 * common.c: Remove.
3441 * common.h (lto_kind_str): Remove.
3442 (lto_visibility_str): Remove.
3443 (lto_resolution_str): Make it static.
3444
34452009-10-01 Diego Novillo <dnovillo@google.com>
3446
3447 * lto.c (lto_read_decls): Add comment.
3448 Call internal_error instead of gcc_assert.
3449 (lto_resolution_read): Likewise.
3450 (lto_add_all_inlinees): Tidy.
3451 * Make-lang.in: Fix copyright boilerplate.
3452 (lto.pdf): New.
3453 (lto.install-pdf): New.
3454 * lto-tree.h: Fix copyright boilerplate.
3455 * lang-specs.h: Likewise.
3456 Remove ".lto" entry from compilers fragment.
3457 * lto-elf.c: Move inclusion of gelf.h after config.h.
3458 Tidy formatting everywhere.
3459 * lto.h: Fix copyright boilerplate.
3460 Tidy formatting everywhere.
3461 * common.c: Likewise.
3462 * config-lang.in: Likewise.
3463 * common.h: Likewise.
3464 * lto-lang.c: Likewise.
3465
34662009-10-01 Richard Guenther <rguenther@suse.de>
3467
3468 * lto.c (lto_read_section_data): Use plain lseek/read.
3469
34702009-10-01 Richard Guenther <rguenther@suse.de>
3471
3472 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3473 use sysconf to query the system page size.
3474 (lto_file_read): Implement fallback using stdio.
3475 (free_section_data): Likewise.
3476
34772009-09-29 Diego Novillo <dnovillo@google.com>
3478
3479 * lto-lang.c (lto_init): Really fix call to
3480 build_common_builtin_nodes.
3481
34822009-09-29 Diego Novillo <dnovillo@google.com>
3483
3484 * lto-lang.c (lto_init): Fix call to
3485 build_common_builtin_nodes.
3486
34872009-09-29 Richard Guenther <rguenther@suse.de>
3488
3489 PR lto/40754
3490 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3491 in bytes.
3492 (first_data_block): New static variable.
3493 (lto_elf_append_data): Align the first data block in each
3494 section.
3495
34962009-09-28 Diego Novillo <dnovillo@google.com>
3497
3498 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3499 * lto.c (strip_extension): New.
3500 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3501 (lto_execute_ltrans): Tidy.
3502 Do not pass -fwpa nor -fltrans-* to LTRANS.
3503 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3504 * tree.c (need_assembler_name_p): Call
3505 lang_hooks.decls.may_need_assembler_name_p if set.
3506 * varasm.c (default_binds_local_p_1): Remove check for
3507 flag_ltrans.
3508 * varpool.c (decide_is_variable_needed): Do not test for
3509 in_lto_p.
3510
35112009-09-22 Richard Guenther <rguenther@suse.de>
3512
3513 PR lto/39276
3514 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3515 * Make-lang.in: Remove ltrans-driver stuff.
3516 * config-lang.in: Likewise.
3517 * lang.opt (fltrans-driver): Remove.
3518 * lto-lang.c (lto_init_options): Remove code initializing
3519 ltrans_driver.
3520 * ltrans-driver: Remove.
3521
35222009-09-21 Diego Novillo <dnovillo@google.com>
3523
3524 * lto-lang.c (lto_define_builtins): Remove superfluous
3525 calls to targetm.init_builtins and build_common_builtin_nodes.
3526 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3527 build_common_builtin_nodes.
3528 * lto.c (lto_materialize_function): Do nothing if NODE is a
3529 clone.
3530
35312009-09-03 Diego Novillo <dnovillo@google.com>
3532
3533 * lto-elf.c (validate_file): Replace call to
3534 elf_getshstrndx with call to elf_getshdrstrndx.
3535
35362009-08-19 Richard Guenther <rguenther@suse.de>
3537
3538 * lto-lang.c (lto_init): Merge char_type_node with the
3539 appropriately signed variant.
3540
35412009-08-19 Richard Guenther <rguenther@suse.de>
3542
3543 PR lto/41071
3544 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3545 (lto_fixup_type): Re-build the pointer-to chain part two.
3546
35472009-08-19 Richard Guenther <rguenther@suse.de>
3548
3549 PR lto/41071
3550 * lto.c (lto_fixup_type): Re-build the type variant chain.
3551
35522009-08-19 Richard Guenther <rguenther@suse.de>
3553
3554 PR lto/41071
3555 * lto.c (lto_fixup_constructor): New function.
3556 (lto_fixup_tree): Replace all types. Properly fixup
3557 constructors and constants.
3558
35592009-08-14 Richard Guenther <rguenther@suse.de>
3560
3561 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3562 for DECL_LANG_SPECIFIC.
3563
35642009-08-13 Richard Guenther <rguenther@suse.de>
3565
3566 PR lto/41032
3567 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3568
35692009-07-30 Richard Guenther <rguenther@suse.de>
3570
3571 PR lto/40903
3572 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3573 the largest decl for output and free TREE_CHAIN for further
3574 use.
3575
35762009-07-24 Diego Novillo <dnovillo@google.com>
3577
3578 * Make-lang.in: Add empty lto.install-plugin target.
3579
35802009-07-13 Diego Novillo <dnovillo@google.com>
3581
3582 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3583
35842009-07-11 Richard Guenther <rguenther@suse.de>
3585
3586 * lto-lang.c (lto_write_globals): Wrapup global decls.
3587
35882009-07-10 Richard Guenther <rguenther@suse.de>
3589
3590 * lto-lang.c (lto_init): Allocate one more location to make
3591 BUILTINS_LOCATION correct.
3592
35932009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3594
3595 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3596
35972009-07-06 Diego Novillo <dnovillo@google.com>
3598
3599 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3600 TYPE_SIZE_UNIT.
3601
36022009-07-06 Diego Novillo <dnovillo@google.com>
3603
3604 * lto.c (preload_common_nodes): Remove.
3605 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3606 (lto_read_decls): Call lto_data_in_create and
3607 lto_data_in_delete.
3608 (free_decl): Do not call ggc_free.
3609 (lto_main): Call lto_init_reader.
3610 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3611 (lto_init): Initialize main_identifier_node if needed.
3612 Make ptrdiff_type_node be integer_type_node.
3613
36142009-06-19 Diego Novillo <dnovillo@google.com>
3615
3616 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3617 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3618 Remove code guarded by #ifdef LOCAL_TRACE.
3619
36202009-06-18 Diego Novillo <dnovillo@google.com>
3621
3622 * lto.c: Update license to GPLv3.
3623 * lto-elf.c: Likewise.
3624 * common.c: Likewise.
3625 * lto-lang.c: Likewise.
3626 * lto.h: Remove superfluous include files. Update all
3627 users.
3628
36292009-06-17 Diego Novillo <dnovillo@google.com>
3630
3631 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3632
36332009-06-02 Diego Novillo <dnovillo@google.com>
3634
3635 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3636 read in.
3637 (materialize_cgraph): Only materialize nodes that have a
3638 representation on file.
3639
36402009-06-01 Diego Novillo <dnovillo@google.com>
3641
3642 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3643
36442009-05-31 Diego Novillo <dnovillo@google.com>
3645
3646 * lto-lang.c (lto_type_for_mode): Handle all the modes
3647 handled in c_common_type_for_mode.
3648
36492009-05-21 Diego Novillo <dnovillo@google.com>
3650
3651 * lto-elf.c: Always include <gelf.h>.
3652 * config-lang.in (target_libs): Remove.
3653 (build_by_default): Set to no.
3654
36552009-05-15 Diego Novillo <dnovillo@google.com>
3656
3657 * lto.c (lto_materialize_function): Assert that DECL is
3658 not a builtin.
3659 (materialize_cgraph): Don't try to materialize builtin
3660 functions.
3661 * lto-section-out.c (write_symbol_vec): Do not write
3662 builtin functions.
3663
36642009-05-13 Diego Novillo <dnovillo@google.com>
3665
3666 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3667
36682009-05-07 Diego Novillo <dnovillo@google.com>
3669
3670 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3671 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3672 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3673 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3674 (lto_fixup_tree): Call gimple_register_type when *TP is a
3675 type.
3676 (lto_main): Call bitmap_obstack_initialize.
3677
36782009-04-22 Diego Novillo <dnovillo@google.com>
3679
3680 * lto.c (free_section_data): Tidy.
3681 (lto_1_to_1_map): Tidy.
3682 (lto_add_all_inlinees): Tidy.
3683 (prefix_name_with_star): New.
3684 (get_filename_for_set): New.
3685 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3686 to determine what cgraph node sets to write.
3687 Call get_filename_for_set to compute temporary file
3688 names.
3689 (lto_execute_ltrans): Do not execute LTRANS on files with
3690 names that start with '*'.
3691 Move logic to execute LTRANS together so that LTRANS is
3692 invoked only if there are any files to compile.
3693 (do_whole_program_analysis): Only remove output files
3694 that do not start with '*'.
3695
36962009-04-06 Diego Novillo <dnovillo@google.com>
3697
3698 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3699 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3700 (lto_add_all_inlinees): Tidy.
3701
37022009-03-26 Diego Novillo <dnovillo@google.com>
3703
3704 * lto.c: Include gimple.h.
3705 (lto_read_in_decl_state): Call gimple_register_type for
3706 every type in every stream.
3707 (lto_fixup_common): Call gimple_register_type if T has a
3708 type.
3709 (do_whole_program_analysis): Call print_lto_report.
3710 (lto_main): Call print_lto_report after cgraph_optimize.
3711 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3712
37132009-03-24 Diego Novillo <dnovillo@google.com>
3714
3715 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3716 (lto.o): Add dependency on GIMPLE_H.
3717
37182009-03-10 Simon Baldwin <simonb@google.com>
3719
3720 * lto.c (lto_read_all_file_options): Close any open file descriptor
3721 contained in file_data before freeing.
3722
37232009-02-24 Rafael Avila de Espindola <espindola@google.com>
3724
3725 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3726 for a decl in the original bitmap, not a node.
3727 (lto_add_all_inlinees): Remove original nodes that are not needed.
3728 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3729
37302009-02-24 Diego Novillo <dnovillo@google.com>
3731
3732 * lto.c (lto_materialize_function): Update
3733 lto_stats.num_function_bodies.
3734 (get_section_data): Initialize *LEN to 0.
3735 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3736 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3737 Update lto_stats.num_output_files.
3738 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3739 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3740 (lto_main): Initialize lto_stats.
3741 If flag_lto_report is set, call print_lto_report.
3742
37432009-02-19 Diego Novillo <dnovillo@google.com>
3744
3745 Revert
3746
3747 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3748
3749 * lto.c (lto_add_inline_clones): Don't add the
3750 master clone. Check for a decl in the original
3751 bitmap, not a node.
3752 (lto_add_all_inlinees): Remove original nodes
3753 that are not needed.
3754 (lto_scan_statics_in_cgraph_node): Don't care if
3755 the node is the master.
3756 (lto_promote_cross_file_statics): Use a new
3757 context.seen_node_decls for each set
3758
37592009-02-19 Rafael Avila de Espindola <espindola@google.com>
3760
3761 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3762 for a decl in the original bitmap, not a node.
3763 (lto_add_all_inlinees): Remove original nodes that are not needed.
3764 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3765 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3766 for each set
3767
37682009-02-18 Diego Novillo <dnovillo@google.com>
3769
3770 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3771 and TV_WHOPR_WPA_IO.
3772 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3773 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3774 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3775 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3776 depending on command line flags.
3777 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3778 (lto_main): Remove timer uses.
3779
37802009-02-18 Rafael Avila de Espindola <espindola@google.com>
3781
3782 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3783 (lto_wpa_write_files): Update calls to renamed functions.
3784
37852009-02-17 Diego Novillo <dnovillo@google.com>
3786
3787 PR 39203
3788 * lto-lang.c (lto_post_options): Disable -fwhole-program
3789 when running LTRANS.
3790
37912009-02-10 Diego Novillo <dnovillo@google.com>
3792
3793 * lto.c (read_cgraph_and_symbols): Fix comment.
3794
37952009-02-10 Diego Novillo <dnovillo@google.com>
3796
3797 * lto.c (read_cgraph_and_symbols): Read options from all
3798 IL files.
3799
38002009-02-10 Diego Novillo <dnovillo@google.com>
3801
3802 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3803 (materialize_cgraph): Likewise.
3804 (do_whole_program_analysis): Likewise.
3805 (lto_main): Call read_cgraph_and_symbols,
3806 materialize_cgraph and do_whole_program_analysis.
3807
38082009-02-10 Simon Baldwin <simonb@google.com>
3809
3810 * lto.c: Include lto-opts.h.
3811 * (lto_main): Clear file options at loop start, read any saved
3812 options from the first file handled, and re-issue options.
3813 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3814
38152009-02-02 Diego Novillo <dnovillo@google.com>
3816
3817 * lto.c (lto_main): Stop LTO_TIMER and use
3818 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3819
38202009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3821
3822 PR lto/38995
3823 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3824 to POINTER_SIZE.
3825
38262009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3827
3828 * Make-lang.in (LTO_EXE): Link with all
3829 BACKENDLIBS and not only GMPLIBS
3830
38312009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3832
3833 PR bootstrap/38992
3834 * lto-elf.c: Include gelf.h instead of libelf.h.
3835 (lto_elf_file_close): Replace elfx_update_shstrndx with
3836 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3837 gelf_update_ehdr.
3838
38392009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3840
3841 PR middle-end/38996
3842 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3843
38442009-01-26 Diego Novillo <dnovillo@google.com>
3845
3846 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3847
38482009-01-26 Diego Novillo <dnovillo@google.com>
3849
3850 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3851 and rename into gimple_types_compatible_p.
3852
38532009-01-12 Rafael Avila de Espindola <espindola@google.com>
3854
3855 * lto-lang.c (lang_hooks): Remove the const qualifier.
3856
38572009-01-06 Diego Novillo <dnovillo@google.com>
3858
3859 * ltrans-driver: Mark 'all' target as phony.
3860
38612008-12-31 Diego Novillo <dnovillo@google.com>
3862
3863 * ltrans-driver: Execute a NOP action for target 'all'.
3864
38652008-12-19 Diego Novillo <dnovillo@google.com>
3866
3867 * lto.c (lto_1_to_1_map): Tidy.
3868
38692008-12-19 Diego Novillo <dnovillo@google.com>
3870
3871 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3872 be opened, show its name.
3873 * ltrans-driver: If $verbose is set, do not use parallelism.
3874
38752008-12-17 Rafael Avila de Espindola <espindola@google.com>
3876
3877 * lto.c (lto_fixup_function): New.
3878 (lto_fixup_tree): Call lto_fixup_function.
3879
38802008-12-14 Doug Kwan <dougkwan@google.com>
3881
3882 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3883 variables if there is no function.
3884
38852008-12-10 Simon Baldwin <simonb@google.com>
3886
3887 * ltrans-driver: Always run make in silent mode, to avoid make's
3888 trace on stdout interfering with lto-wrapper output.
3889
38902008-12-10 Doug Kwan <dougkwan@google.com>
3891
3892 * lto.c (lto_add_inline_clones): Do not force master clones of
3893 inlined functions already in SET to be static inline.
3894
38952008-12-04 Doug Kwan <dougkwan@google.com>
3896
3897 * lto.c (globalize_context_t): New type to store states in
3898 globalization of cross-file statics.
3899 (globalize_cross_file_statics): New.
3900 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3901 static decls that need to be fixed up.
3902 (lto_scan_statics_in_cgraph_node): Change call interface to use
3903 a globalize_context_t CONTEXT for all states used.
3904 (lto_scan_statics_in_remaining_global_vars): New.
3905 (lto_promote_cross_file_statics): Use new call interface of
3906 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3907 visible vars in the last set.
3908
39092008-12-03 Diego Novillo <dnovillo@google.com>
3910
3911 * lto.c (lto_fixup_tree): Do not emit an error when
3912 PREVAILING throw but T doesn't.
3913
39142008-12-02 Doug Kwan <dougkwan@google.com>
3915
3916 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3917 from code in ...
3918 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3919 variables and functions.
3920 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3921 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3922
39232008-11-29 Diego Novillo <dnovillo@google.com>
3924
3925 * lto.c: Include timevar.h.
3926 (lto_materialize_function): Tidy. Add comments.
3927 (lto_wpa_write_files): Tidy.
3928 (lto_execute_ltrans): Tidy.
3929 (lto_main): Add local variable LTO_TIMER. Initialize it
3930 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3931 Start and stop the timer.
3932 Tidy comments.
3933 * Make-lang.in (lto.o): Add dependency on timevar.h.
3934 * ltrans-driver: React to -v and -save-temps.
3935 Use simple heuristic to determine how much parallelism to
3936 use when executing make.
3937
39382008-11-12 Doug Kwan <dougkwan@google.com>
3939
3940 * lto.c (lto_bitmap_obstack): Remove var.
3941 (lto_materialize_function): Do nothing instead of marking function
3942 body in file if flag_wpa is true.
3943 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3944 (lto_scan_statics_in_cgraph_node): New function.
3945 (lto_promote_cross_file_statics): Same.
3946 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3947 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3948 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3949
39502008-11-09 Diego Novillo <dnovillo@google.com>
3951
3952 * lto/lto.c (lto_fixup_tree): Change error message locus
3953 information to include location of mismatching
3954 declaration.
3955 Use TREE_NO_WARNING to avoid repeated messages.
3956 (lto_main): If lto_fixup_decls emitted any errors, exit.
3957 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3958 (lto_init_options): Don't enable exceptions by default.
3959 (lto_eh_runtime_type): Move to lto-function-in.c
3960 (lto_init_eh): Likewise.
3961 (lto_init): Don't call lto_init_eh.
3962 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3963 libfuncs.h and except.h.
3964
39652008-10-30 Diego Novillo <dnovillo@google.com>
3966
3967 * lto.c (lto_read_decls): Declare debug_main only if
3968 LTO_STREAM_DEBUGGING is enabled.
3969
39702008-10-30 Simon Baldwin <simonb@google.com>
3971
3972 * lto.c (lto_wpa_write_files): Create intermediate files with
3973 make_cwd_temp_file().
3974 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3975 WPA_SAVE_LTRANS is set.
3976 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3977 * ltrans-driver: Do not strip directory from output files.
3978
39792008-10-29 Doug Kwan <dougkwan@google.com>
3980
3981 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3982 DECL.
3983 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3984 (lto/lto-symtab.o): Remove rule.
3985 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3986 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3987 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3988 Remove macros.
3989 lto-symtab.c (File): Move up one level.
3990 lto-lang.c (cgraph.h): Remove include.
3991 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3992 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3993 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3994
39952008-10-24 Rafael Espindola <espindola@google.com>
3996
3997 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3998 non prevailing weak symbols.
3999
40002008-10-24 Rafael Espindola <espindola@google.com>
4001
4002 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4003
40042008-10-24 Rafael Espindola <espindola@google.com>
4005
4006 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4007 different types.
4008
40092008-10-23 Simon Baldwin <simonb@google.com>
4010
4011 * lto-lang.c (input_node): Save the node reference, rather than the
4012 node pointer, in node->inlined_to.
4013 (input_cgraph_1): Convert node references into node pointers.
4014
40152008-10-22 Diego Novillo <dnovillo@google.com>
4016 Rafael Espindola <espindola@google.com>
4017
4018 * lto.c (lto_resolution_read): Tidy.
4019 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4020 abort if RET is NULL.
4021
40222008-10-22 Doug Kwan <dougkwan@google.com>
4023
4024 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4025 exceptions flag is given.
4026 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4027 (lto_init_eh): Remove exceptions flag initialization.
4028 (lto_init): Only call lto_init_eh if exceptions flag is set.
4029
40302008-10-21 Diego Novillo <dnovillo@google.com>
4031
4032 * lto.c: Tidy some formatting.
4033 * lto.h: Likewise.
4034
40352008-10-21 Simon Baldwin <simonb@google.com>
4036
4037 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4038 them is NULL (but not the other).
4039
40402008-10-17 Diego Novillo <dnovillo@google.com>
4041
4042 * ltrans-driver: Divert output from make to a temporary file.
4043 Show it if the call to make failed.
4044
40452008-10-15 Diego Novillo <dnovillo@google.com>
4046
4047 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4048 Do not print TEMP_FILENAME
4049 * ltrans-driver: Call make with -s.
4050
40512008-10-15 Diego Novillo <dnovillo@google.com>
4052
4053 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4054 TREE_STATIC on global symbols.
4055
40562008-10-14 Ollie Wild <aaw@google.com>
4057
4058 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4059 (LTRANS_DRIVER_EXE): Add.
4060 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4061 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4062 (lto.install.common): Remove ltrans-driver.
4063 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4064 (LTRANS_DRIVER_EXE): New build rule.
4065 * config-lang.in (compilers): Add ltrans-driver.
4066
40672008-10-14 Diego Novillo <dnovillo@google.com>
4068
4069 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4070 of program name.
4071
40722008-10-13 Ollie Wild <aaw@google.com>
4073
4074 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4075 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4076 * ltrans-driver (LTRANS_FLAGS): Remove.
4077
40782008-10-08 Doug Kwan <dougkwan@google.com>
4079
4080 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4081 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4082 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4083 from lto_fixup_state to here.
4084 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4085 just a free-list. Fix up types also. Move decl merging code to
4086 lto_fixup_tree.
4087 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4088 object.
4089 (lto_fixup_decls): Use another pointer set to avoid multiple
4090 walking of nodes except for DECLs to be replaced. Pass an
4091 lto_fixup_data_t object to tree-walker.
4092
40932008-10-08 Rafael Espindola <espindola@google.com>
4094
4095 * lto-symtab.c (lto_symtab_set_resolution): New.
4096 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4097 lto_symtab_get_resolution.
4098 (lto_symtab_prevailing_decl): Return decl for non public decls.
4099 (lto_symtab_get_resolution): New.
4100 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4101
41022008-10-06 Rafael Espindola <espindola@google.com>
4103
4104 * lto-lang.c: Include cgraph.h.
4105 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4106 input_cgraph): Moved from lto-cgraph.c.
4107 (LANG_HOOKS_INPUT_CGRAPH): New.
4108
41092008-10-03 Rafael Espindola <espindola@google.com>
4110
4111 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4112
41132008-10-03 Rafael Espindola <espindola@google.com>
4114
4115 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4116 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4117 prevailing definition. Don't mark TREE_NOTHROW differences.
4118 * lto.c (lto_fixup_tree): New.
4119 (lto_fixup_state): New.
4120 (lto_fixup_state_aux): New.
4121 (free_decl): New.
4122 (lto_fixup_decls): New.
4123 (lto_main): Call lto_fixup_decls.
4124
41252008-10-02 Ollie Wild <aaw@google.com>
4126
4127 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4128 and Init.
4129 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4130 * lto-lang.c (lto_post_options): Add validation and fixups for
4131 -fltrans and -fwpa.
4132
41332008-10-02 Rafael Espindola <espindola@google.com>
4134
4135 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4136 lto_symtab_merge_decl): Return void.
4137 (lto_symtab_prevailing_decl): New.
4138
41392008-09-30 Rafael Espindola <espindola@google.com>
4140
4141 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4142 defined symbols.
4143 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4144 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4145 Check for already defined symbols.
4146 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4147 (LTO_IDENTIFIER_RESOLUTION): Remove.
4148 (LTO_DECL_RESOLUTION): New.
4149
41502008-09-30 Rafael Espindola <espindola@google.com>
4151
4152 * lto.c (lto_read_decls): Use new input_tree signature.
4153
41542008-09-26 Doug Kwan <dougkwan@google.com>
4155
4156 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4157 bodies affected by exception attribute merging of DECLs.
4158 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4159 merging.
4160
41612008-09-25 Rafael Espindola <espindola@google.com>
4162
4163 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4164 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4165 * lto-symtab.c (lto_symtab_compatible): New.
4166 (lto_symtab_overwrite_decl): New.
4167 (lto_symtab_merge_decl): Refactor to use the above functions
4168 and the resolution from lang_identifier.
4169 * lto-tree.h: Include plugin-api.h.
4170 (lang_identifier): Add resolution.
4171 (LTO_IDENTIFIER_RESOLUTION): New.
4172
41732008-09-25 Ollie Wild <aaw@google.com>
4174
4175 * lang.opt (fltrans-output-list=): New option.
4176 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4177
41782008-09-25 Rafael Espindola <espindola@google.com>
4179
4180 * lto.c (lto_resolution_read): Initialize ret;
4181
41822008-09-24 Ollie Wild <aaw@google.com>
4183
4184 * lto.c (sys/mman.h): Move include.
4185 (lto_wpa_write_files): Return a list of written files.
4186 (lto_execute_ltrans): New function.
4187 (lto_main): Call lto_execute_ltrans.
4188 (ltrans-driver): New file.
4189 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4190 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4191 (lto_init_options): Initialize ltrans_driver.
4192 (lto_handle_option): Fix incorrect default output value.
4193 * lang.opt (fltrans-driver=): New option.
4194 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4195 (lto.install-common): Add lto/ltrans-driver.
4196
41972008-09-24 Rafael Espindola <espindola@google.com>
4198
4199 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4200 (lto/lto.o): Depend on lto/common.h.
4201 (lto/common.o): New.
4202 * lang.opt (resolution): New.
4203 * lto-lang.c (resolution_file_name): New.
4204 (lto_handle_option): Handle OPT_resolution.
4205 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4206 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4207 pass it to lto_symtab_merge_decl.
4208 * lto.c: Include common.h.
4209 (lto_read_decls): Add resolutions and resolutions_size arguments.
4210 Initialize data_in.globals_resolution and
4211 data_in.globals_resolution_size.
4212 (index_and_symbol_resolution): New.
4213 (lto_resolution_read): New.
4214 (lto_file_read): Add argument resolution_file.
4215 Read resolution.
4216 * lto.h (resolution_file_name): New.
4217
42182008-09-23 Rafael Espindola <espindola@google.com>
4219
4220 * common.c: Update description.
4221 * common.h: Update description.
4222
42232008-09-23 Rafael Espindola <espindola@google.com>
4224
4225 * common.c: Moved from lto-plugin.
4226 * common.h: Moved from lto-plugin.
4227
42282008-09-22 Doug Kwan <dougkwan@google.com>
4229
4230 * lto.c (VEC(bitmap,heap)): Declare.
4231 (lto_materialize_function): Handle WAP mode specially.
4232 (lto_add_inline_clones): New.
4233 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4234 return a bitmap of inlined decls.
4235 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4236 (lto_main): Call reset_inline_failed to reset inlining states.
4237 Check call-graph after WPA inlining.
4238 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4239 unconditionally.
4240
42412008-09-19 Doug Kwan <dougkwan@google.com>
4242
4243 lto.c (lto_main): Remove unsued wrapper code.
4244 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4245
42462008-09-19 Rafael Espindola <espindola@google.com>
4247
4248 * lto-symtab.c: Include lto-tree-in.h.
4249 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4250 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4251 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4252
42532008-09-17 Paolo Bonzini <bonzini@gnu.org>
4254 Rafael Avila de Espindola <espindola@google.com>
4255
4256 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4257 COMPOUND_LITERAL_EXPR_DECL): Remove.
4258 (emit_local_var): Remove.
4259 (lto_expand_expr): Remove.
4260 (lto_staticp): Remove.
4261 (LANG_HOOKS_EXPAND_EXPR): Remove.
4262 (LANG_HOOKS_STATICP): Remove.
4263
42642008-09-11 Diego Novillo <dnovillo@google.com>
4265
4266 * lto-lang.c: Include except.h and libfuncs.h.
4267 (lto_init_eh): New.
4268 (lto_init): Call it.
4269 Set flag_generate_lto to 0.
4270 * Make-lang.in (lto-lang.o): Add dependency on except.h
4271 and libfuncs.h.
4272
42732008-09-09 Bill Maddox <maddox@google.com>
4274
4275 * lto-lang.c: Include header file expr.h.
4276 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4277 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4278 (emit_local_var): Copied from c-semantics.c.
4279 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4280 and c_staticp in c-common.c.
4281 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4282
42832008-09-08 Diego Novillo <dnovillo@google.com>
4284
4285 * lto-lang.c (lto_global_bindings_p): Return 1 during
4286 IPA passes.
4287
42882008-09-07 Diego Novillo <dnovillo@google.com>
4289
4290 * lto.c: Tidy formatting.
4291
42922008-08-04 Bill Maddox <maddox@google.com>
4293
4294 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4295
42962008-09-03 Doug Kwan <dougkwan@google.com>
4297
4298 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4299 CIF_OK instead of NULL.
4300
43012008-09-02 Diego Novillo <dnovillo@google.com>
4302 Simon Baldwin <simonb@google.com>
4303
4304 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4305 c_common_type_for_size.
4306 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4307 (lto_init): Call linemap_add.
4308 (signed_and_unsigned_types): Remove.
4309
43102008-08-29 Diego Novillo <dnovillo@google.com>
4311
4312 * lto-lang.c (handle_noreturn_attribute): New local function.
4313 (handle_const_attribute): New local function.
4314 (handle_malloc_attribute): New local function.
4315 (handle_pure_attribute): New local function.
4316 (handle_novops_attribute): New local function.
4317 (handle_nonnull_attribute): New local function.
4318 (handle_nothrow_attribute): New local function.
4319 (handle_sentinel_attribute): New local function.
4320 (handle_type_generic_attribute): New local function.
4321 (handle_format_attribute): New local function.
4322 (handle_format_arg_attribute): New local function.
4323 (lto_attribute_table): Declare.
4324 (lto_format_attribute_table): Declare.
4325 (lto_init_attributes): New local function.
4326 (lto_define_builtins): Call it.
4327 Call targetm.init_builtins and build_common_builtin_nodes.
4328 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4329 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4330
43312008-08-28 Diego Novillo <dnovillo@google.com>
4332
4333 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4334 $(GIMPLE_H).
4335 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4336 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4337 * lto-symtab.c: Include gimple.h.
4338 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4339 TREE_CHAIN.
4340
43412008-08-27 Doug Kwan <dougkwan@google.com>
4342
4343 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4344 gt-lto-lto.h): New includes.
4345 (lto_materialize_function): Do not read in function body in WPA mode.
4346 Format a line to fit in 80 columns.
4347 (lto_cgraph_node_sets): New garbage collected variable.
4348 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4349 New functions.
4350 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4351 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4352 variable LTO_SECTION_IN_H.
4353 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4354 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4355 with variable LTO_SECTION_IN_H.
4356 * config-lang.in (gtfiles): Add lto/lto.c.
4357 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4358 merged DECL_RESULT correctly.
4359
43602008-08-26 Bill Maddox <maddox@google.com>
4361
4362 * lto-lang.c Include tree-gimple.h.
4363 (lto_mark_addressable): Call mark_addressable rather than
4364 asserting.
4365 (lto_post_options): Suppress debug info generation.
4366 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4367
3f8257db 43682008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4369
4370 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4371 assertion and leave an explanatory comment in its place.
4372
43732008-08-21 Doug Kwan <dougkwan@google.com>
4374
4375 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4376 of common nodes instead of computing locallly.
4377 (lto_read_in_decl_state): New.
4378 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4379 Read global and per-function in-decl states.
4380 * Make-lang.in (LTO_H): Update dependency.
4381 (lto/lto.o): Same.
4382 (lto-symtab.c): Merge (revision 139039)
4383 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4384
43852008-08-21 Rafael Espindola <espindola@google.com>
4386
4387 * config-lang.in (target_libs): New.
4388
43892008-08-20 Bill Maddox <maddox@google.com>
4390
4391 * lto.c (current_lto_file): Remove GTY marker from static
4392 variable. Remove include of file gt-lto-lto.h.
4393 * Make-lang.in: Remove dependency of lto/lto.o on
4394 gt-lto-lto.h.
4395 * lto-elf.c (lto_file_close): Removed.
4396 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4397 allocate lto_elf_file object.
4398 (lto_elf_file_close): Free lto_elf_file object after close.
4399 * lto.h (struct lto_file_struct): Remove GTY marker.
4400 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4401 gtfiles.
4402
44032008-08-20 Bill Maddox <maddox@google.com>
4404
4405 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4406 to conform to its new signature.
4407 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4408 on discarded node here, now called in global_vector_fixup.
4409
44102008-08-09 Bill Maddox <maddox@google.com>
4411
4412 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4413 has not been set to a front-end-specific value.
4414
44152008-08-05 Doug Kwan <dougkwan@google.com>
4416
4417 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4418 build breakage.
4419
44202008-07-30 Bill Maddox <maddox@google.com>
4421
4422 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4423 Remove obsolete comments.
4424 (lto_read_decls): Remove initialization of deleted field data_in.global.
4425 Tidy up comments.
4426 (lto_main): Remove redundant initialization of section_hash_table.
4427 * lto-elf.c: Removed obsolete comments.
4428 * lto.h: Tidy up comments.
4429 * lto-symtab.c (lto_least_common_multiple): New function.
4430 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4431 Tidy up comments.
4432
44332008-07-25 Diego Novillo <dnovillo@google.com>
4434 Bill Maddox <maddox@google.com>
4435
4436 * lto.c: Re-order include files.
4437 Include lto-section-out.h.
4438 (preload_common_nodes): Add debugging output.
4439 Add new local INDEX_TABLE.
4440 Call preload_common_node.
4441 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4442
44432008-07-13 Bill Maddox <maddox@google.com>
4444
4445 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4446 unwanted scaling during pointer addition.
4447
44482008-07-11 Bill Maddox <maddox@google.com>
4449 Diego Novillo <dnovillo@google.com>
4450
4451 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4452 Make code const-correct.
4453 (lto_file_read): Fix C++ compatibility warnings.
4454 (lto_read_section_data): Fix C++ compatibility warnings.
4455 (lto_get_section_data): Use CONST_CAST to avoid warning when
4456 const pointer passed to free.
4457 * lto-elf.c (lto_elf_build_section_table): Fix C++
4458 compatibility warnings.
4459 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4460 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4461 (lto_get_current_out_file): Fix C++ compatibility warnings.
4462
44632008-07-11 Diego Novillo <dnovillo@google.com>
4464
4465 * Make-lang.in (lto-warn): Define.
4466
44672008-07-03 Simon Baldwin <simonb@google.com>
4468
4469 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4470 LTO_STREAM_DEBUGGING.
4471
44722008-06-27 Ollie Wild <aaw@google.com>
4473
4474 * lto-elf.c (lto-section-out.h): New include.
4475 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4476 and data members.
4477 (cached_file_attrs): New static variable.
4478 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4479 Use cached_file_attrs for checking bits.
4480 (lto_elf_build_section_table): Remove elf_file argument from
4481 lto_elf_get_shdr and lto_elf_free_shdr calls.
4482 (DEFINE_INIT_SHDR): New macro.
4483 (init_shdr32, init_shdr64): New functions defined via the
4484 DEFINE_INIT_SHDR macro.
4485 (lto_elf_begin_section_with_type): New function.
4486 (lto_elf_begin_section): New function.
4487 (lto_elf_append_data): New function.
4488 (lto_elf_end_section): New function.
4489 (DEFINE_VALIDATE_EHDR): New macro.
4490 (validate_ehdr32, validate_ehdr64): New functions defined via the
4491 DEFINE_VALIDATE_EHDR macro.
4492 (validate_file): New function.
4493 (DEFINE_INIT_EHDR): New macro.
4494 (init_ehdr32, init_ehdr64): New functions defined via the
4495 DEFINE_INIT_EHDR macro.
4496 (init_ehdr): New function.
4497 (lto_elf_file_open): Add support for writable files. Move some
4498 validation logic to validate_file.
4499 (lto_elf_file_close): Add support for writable files. Write file data
4500 and free data blocks.
4501 (current_out_file): New static variable.
4502 (lto_set_current_out_file): New function.
4503 (lto_get_current_out_file): New function.
4504 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4505 Add temporary initialization for testing ELF serialization.
4506 * lto.h (lto-section-out.h): New include.
4507 (struct lto_file_struct): Slight modification to comment.
4508 (lto_elf_file_open): Add writable parameter.
4509 (lto_elf_begin_section): New function declaration.
4510 (lto_elf_append_data): New function declaration.
4511 (lto_elf_end_section): New function declaration.
4512 (lto_set_current_out_file, lto_get_current_out_file): New function
4513 declarations.
4514 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4515 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4516 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4517 * Make-lang.in (LTO_H): Add lto-section-out.h.
4518
45192008-06-12 Ollie Wild <aaw@google.com>
4520
4521 * lto.h (struct lto_file_vtable_struct): Remove.
4522 (struct lto_file_struct): Remove vtable member.
4523 * lto-elf.c (lto_file_init): Remove vtable argument.
4524 (lto_elf_map_optional_lto_section): Remove.
4525 (lto_elf_unmap_section): Remove.
4526 (lto_elf_file_vtable): Remove.
4527 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4528 lto_file_init call.
4529 (lto_elf_find_section_data): Remove.
4530
45312008-06-11 Ollie Wild <aaw@google.com>
4532
4533 * lto.c (lto_file_read): Add const qualifier to data variable.
4534
45352008-06-11 Diego Novillo <dnovillo@google.com>
4536
4537 Merge from lto-streamber sub-branch.
4538
4539 2008-06-04 Ollie Wild <aaw@google.com>
4540
4541 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4542 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4543
4544 2008-05-28 Bill Maddox <maddox@google.com>
4545
4546 Replace the DWARF reader in the LTO front-end.
4547
4548 * lto.c: Include lto-tree-in.h, lto-tags.h.
4549 (enum DWARF2_class, DW_cl_constant, struct
4550 DWARF2_form_data, struct lto_context,
4551 lto_fd_init, lto_info_fd_init,
4552 lto_abbrev_fd_init, lto_info_fd_close,
4553 lto_file_init, lto_file_close,
4554 lto_file_corrupt_error, lto_abi_mismatch_error,
4555 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4556 lto_read_uleb128, lto_read_sleb128,
4557 lto_read_initial_length, lto_abbrev_read_attrs,
4558 lto_abbrev_read, lto_abbrev_read_lookup,
4559 lto_read_section_offset,
4560 lto_read_comp_unit_header, find_cu_for_offset,
4561 lto_get_file_name,
4562 lto_resolve_reference,lto_read_form,
4563 attribute_value_as_int,
4564 make_signed_host_wide_int,
4565 attribute_value_as_constant, lto_cache_hash,
4566 lto_cache_eq, lto_cache_store_DIE,
4567 lto_cache_lookup_DIE, lto_find_integral_type,
4568 lto_find_integral_type_1,
4569 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4570 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4571 lto_unsupported_attr_error, lto_get_identifier,
4572 lto_read_referenced_type_DIE,
4573 lto_read_compile_unit_DIE,
4574 lto_read_array_type_DIE,
4575 lto_read_structure_union_class_type_DIE,
4576 lto_read_enumerator_DIE,
4577 lto_read_enumeration_type_DIE,
4578 lto_read_only_for_child_DIEs,
4579 lto_read_only_for_child_DIEs,
4580 lto_read_member_DIE, lto_read_abbrev,
4581 lto_read_variable_formal_parameter_constant_DIE,
4582 lto_get_body): Removed.
4583 (preload_common_nodes): New function.
4584 (lto_read_decls): Convert for new global streamer.
4585 (lto_materialze_file_data,
4586 lto_read_subroutine_type_subprogram_die,
4587 lto_read_unspecified_parameters_DIE,
4588 lto_read_typedef_DIE,
4589 lto_read_pointer_reference_type_DIE,
4590 lto_read_subrange_type_DIE,
4591 lto_read_base_type_DIE,
4592 lto_read_const_volatile_restrict_type_DIE,
4593 lto_read_namespace_DIE,
4594 lto_read_unspecified_type_DIE, lto_read_DIE,
4595 lto_read_child_DIEs, lto_collect_child_DIEs):
4596 Removed.
4597 (lto_info_read, lto_set_cu_context): Removed.
4598 (lto_file_read): Convert for new global streamer.
4599 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4600 lto_resolve_var_ref, lto_resolve_fn_ref,
4601 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4602 lto_resolve_namespacedecl_ref): Removed.
4603 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4604 * lto-tree.h (lto_symtab_merge_var,
4605 lto_symtab_mergee_fun): Declare here.
4606 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4607 (lto_elf_file_open): Removed code to read DWARF debug sections.
4608 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4609 DWARF2_CompUnit, lto_die_ptr,
4610 lto_die_cache_entry, lto_fd, lto_info_fd,
4611 lto_abbrev_fd): Removed.
4612 (lto_file): Removed debug_info and debug_abbrev fields.
4613 (lto_ref): Removed.
4614 (lto_file_init, lto_file_close,
4615 lto_resolve_type_ref, lto_resolve_var_ref,
4616 lto_resolve_fn_ref, lto_resolve_field_ref,
4617 lto_resolve_typedecl_ref,
4618 lto_resolve_namespacedecl_ref,
4619 lto_get_file_name): Removed declarations.
4620 (lto_symtab_merge_var, lto_symtab_merge_fn):
4621 Declarations moved to lto-tree.h.
4622 * lto-symtab.c (lto_compatible_attributes_p):
4623 Lobotomize this, as it barfs on "Hello, world!".
4624 * lto-section-out.c: Include lto-tree-out.h.
4625 (lto_hash_global_slot_node,
4626 lto_eq_global_slot_node, preload_common_nodes,
4627 write_global_stream, write_global_references):
4628 New functions.
4629 (produce_asm_for_decls): Convert for new global streamer.
4630 * lto-section-out.h (lto_hash_global_slot_node,
4631 lto_eq_global_slot_node): Declare.
4632
3f8257db 46332008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4634 Jan Hubicka <jh@suse.cz>
4635
4636 * lto.c (sys/mman.h, tree-pass.h): New includes.
4637 (lto_materialize_constructors_and_inits,
4638 lto_materialize_function): Keeps length of section.
4639 (lto_materialize_cgraph): Removed.
4640 (lto_read_decls): Initialize fd field.
4641 (lto_file_read): Different return type and removed much code to
4642 lto_main.
4643 (page_mask): New variable.
4644 (lto_read_section_data, get_section_data, free_section_data): New
4645 functions.
4646 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4647 passes can get the section data.
4648
3f8257db 46492008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4650
4651 * lto.h (lto_read_decls): Made local.
4652 (lto_input_function_body, lto_input_constructors_and_inits,
4653 lto_input_cgraph): Declarations moved to lto-section-in.h.
4654 * lto-section-in.c: Moved to .. .
4655 * lto-cgraph-in.c: Ditto.
4656 * lto-section-in.h: Ditto.
4657 * lto-function-in.c: Ditto.
4658 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4659 (lto_insert_block): Removed.
4660 (LANG_HOOKS_INSERT_BLOCK): Removed.
4661 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4662 lto-section-in.o): Rules moved to lto/Makefile.in.
4663
4664
46652008-05-16 Ollie Wild <aaw@google.com>
4666
4667 * lto-lang.c (tree-inline.h): Include.
4668 (lto_post_options): New function.
4669 (LANG_HOOKS_POST_OPTIONS): Define.
4670 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4671 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4672
46732008-05-13 Diego Novillo <dnovillo@google.com>
4674
4675 * lto-function-in.c (input_ssa_names): Call
4676 make_ssa_name_fn instead of make_ssa_name.
4677
46782008-05-12 Diego Novillo <dnovillo@google.com>
4679
4680 * lto-cgraph-in.c (overwrite_node): Update references to
4681 inline summary fields.
4682 * lto-function-in.c (input_expr_operand): Do not handle
4683 STRUCT_FIELD_TAG.
4684
46852008-05-09 Ollie Wild <aaw@google.com>
4686
4687 * lang.opt: New file.
4688 * lto-lang.c (lto_init_options): New function.
4689 (lto_handle_option): New function.
4690 (lto_init): Move initialization of flag_unit_at_a_time to
4691 lto_init_options.
4692 (LANG_HOOKS_INIT_OPTIONS): Define.
4693 (LANG_HOOKS_HANDLE_OPTION): Define.
4694
46952008-04-29 Ollie Wild <aaw@google.com>
4696
4697 * lto.c (lto_read_namespace_DIE): New function.
4698 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4699 NAMESPACE_DECL DIE's.
4700 (lto_resolve_namespacedecl_ref): New function.
4701 * lto.h (lto_resolve_namespacedecl_ref): New function.
4702 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4703 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4704 and num_namespace_decls.
4705 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4706 * lto-lang.c (lto_init_ts): New function.
4707 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4708
47092008-04-16 Ollie Wild <aaw@google.com>
4710
4711 * lto-function-in.c (input_type_ref): Updated function description.
4712
47132008-04-16 Ollie Wild <aaw@google.com>
4714
4715 * lto-function-in.c (input_type_ref_1): New function.
4716 (input_type_ref): Split into two functions.
4717 (input_function): Add support for type contexts.
4718
47192008-04-16 Ollie Wild <aaw@google.com>
4720
4721 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4722 section name
4723
47242008-04-16 Ollie Wild <aaw@google.com>
4725
4726 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4727 list of supported languages.
4728
3f8257db 47292008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4730
4731 Merge with mainline @133491.
4732
3f8257db 47332008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4734 Jan Hubicka <jh@suse.cz>
4735
4736 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4737 fd->unmaterialized_fndecls.
4738 (lto_get_file_name, lto_materialize_cgraph): New function.
4739 (lto_materialize_constructors_and_inits,
4740 lto_materialize_function): Read info directly from elf file.
4741 (lto_file_read): Made local and initialize dictionary so that
4742 other lto sections can be read without reprocessing the elf file.
4743 (lto_main): Read all functions after all files have been processed
4744 for their types, globals and cgraph.
4745 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4746 dependencies.
4747 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4748 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4749 (lto_elf_read_symtab): Removed function.
4750 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4751 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4752 (lto_file_read): Made local.
4753 (lto_get_file_name, lto_elf_build_section_table,
4754 lto_input_cgraph):
4755 New function.
4756 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4757 New functions.
4758 (lto_read_decls): Get the file name.
4759 * lto-cgraph-in.c: New file.
4760 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4761 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4762 (input_labels): Fixed latent sizeof issue.
4763 (input_function): Build stmt array to set call sites into cgraph
4764 edges.
4765 (lto_read_body): Reset cfun->curr_properties.
4766 * lto_section_in.h (lto_section_slot): New structure.
4767 (section_hash_table.lto_file_decl_data): New field.
4768
4769
3f8257db 47702008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4771
4772 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4773 reconstruct static initializers.
4774 (lto_get_body, lto_materialize_function): Add lto_section_type as
4775 a parameter.
4776 (lto_materialize_constructors_and_inits,
4777 lto_materialize_file_data): New function.
4778 (lto_materialize_function,
4779 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4780 unmap_section and map_fn_body to map_section.
4781 (lto_set_cu_context): Process functions and static inits
4782 differently.
4783 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4784 lto/lto-section-in.o): Update dependencies.
4785 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4786 lto_section_type parameter.
4787 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4788 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4789 renamed the other two so that there is only one map function and
4790 one unmap function and each takes a section type parameter.
4791 (lto_read_function_body): Renamed to lto_input_function_body and
4792 added file_data parameter.
4793 (lto_read_var_init): Removed.
4794 (lto_input_constructors_and_inits): New function.
4795 * lto-section-in.c (lto_read_decls): New function.
4796 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4797 var_decls, type_decls, types to lto_file_decl_data.
4798 (input_type_ref, input_expr_operand, lto_read_body): Get
4799 field_decls, fn_decls, var_decls, type_decls, types from different
4800 structure.
4801 (input_globals, input_constructor, lto_read_var_init): Removed.
4802 (input_constructors_or_inits): New function.
4803 (lto_read_function_body, lto_input_constructors_and_inits):
4804 Renamed to lto_input_function_body and takes file_data parameter.
4805 * lto-section-in.h (lto_file_decl_data): New structure.
4806
3f8257db 48072008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4808
4809 * lto-function-in.c (input_globals.c): Changed input type to
4810 lto_function_header.
4811 (input_bb): Removed code to deserialize the stmt number.
4812 (input_function): Renumber all stmts after they are input.
4813 (lto_read_body, lto_read_function_body, lto_read_var_init):
4814 Changed to used new header format and enum section_type.
4815 *lto-lang.c (success): Removed.
4816
48172008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4818
4819 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4820 (lto_elf_free_sym): Likewise.
4821
4822 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4823 (lto_elf_build_init): Likewise.
4824
3f8257db 48252008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4826
4827 * lto-read.c: Renamed to lto-function-in.c.
4828 (input_1_unsigned): Moved to lto-section-in.c and renamed
4829 lto_input_1_unsigned.
4830 (input_uleb128): Moved to lto-section-in.c and renamed
4831 lto_input_uleb128.
4832 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4833 lto_input_widest_uint_uleb128.
4834 (input_sleb128): Moved to lto-section-in.c and renamed
4835 lto_input_sleb128.
4836 (input_integer): Moved to lto-section-in.c and renamed
4837 lto_input_integer.
4838 (debug_in_fun): Moved to lto-section-in.c and renamed
4839 lto_debug_in_fun.
4840 (input_block): Moved to lto-section-in.h and renamed
4841 lto_input_block.
4842 (input_expr_operand): Fixed to allow lists with more than one
4843 element.
4844 * lto-section-in.h: New file.
4845 * lto-section-in.c: New file with changes from above.
4846 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4847 (lto-section-in.o): New rule.
4848
48492007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4850
4851 * lto-read.c (input_expr_operand): Mark static and external
4852 VAR_DECLs as needed.
4853
48542007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4855
4856 * lto-read.c (input_integer): Use the correct shift amount.
4857
48582007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4859
4860 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4861 (LANG_HOOKS_NAME): Define.
4862
48632007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4864
4865 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4866 original function to...
4867 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4868 don't have a base type.
4869 (lto_read_enumeration_type_DIE): Examine the values of the
4870 enumeration to determine whether we can use an unsigned type for
4871 the base type of the enumeration.
4872
48732007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4874
4875 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4876 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4877
48782007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4879
4880 * lto-lang.c (lto_types_compatible_p): New function.
4881 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4882
48832007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 4884 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4885
4886 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4887 (input_local_vars): Read in DECL_INITIAL and context for local
4888 statics that need to be put in unexpanded_vars_list.
4889
48902007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4891
4892 * lto-read.c (input_real): Use a separate null-terminated buffer
4893 for calling real_from_string.
4894 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4895 tell cgraph that it's needed.
4896
48972007-12-19 Doug Kwan <dougkwan@google.com>
4898
4899 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4900
49012007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4902
4903 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4904 (lto_file_read): Reset the members of 'context' every time we read
4905 a toplevel DIE, with special attention to last_param_type.
4906
49072007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4908
4909 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4910 'declaration'. Set the assembler name for non-public functions.
4911
3f8257db 49122007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4913
4914 * lto_read.c (data_in.unexpanded_indexes): New array.
4915 (input_local_var): Added code to read in unexpanded_var_list
4916 indexes for variables. Only read in DECL_CHAIN field for
4917 parameters.
4918 (input_local_vars): Added code to rebuild unexpanded_var_list in
4919 order using unexpanded_indexes.
4920 (input_function): Added code to set DECL_CONTEXT for functions.
4921
49222007-12-13 Doug Kwan <dougkwan@google.com>
4923
4924 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4925 in pointer and reference types.
4926
49272007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4928
4929 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4930 RESULT_DECL.
4931
49322007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4933
4934 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4935 already read the DIE.
4936 (lto_get_body): New function, split out from...
4937 (lto_materialize_function): ...here. Call it.
4938 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4939 determine DECL_EXTERNAL.
4940 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4941 FUNCTION_DECLs when necessary. Use the type of the actual
4942 function definition if we are unable to easily merge types. Ignore
4943 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4944 necessary.
4945
49462007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4947
4948 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4949
49502007-12-12 Bill Maddox <maddox@google.com>
4951
4952 Revert
4953 2007-12-07 Bill Maddox <maddox@google.com>
4954
4955 * lto.c (lto_str_fd_init): New function.
4956 (lto_str_fd_close): New function.
4957 (lto_file_init): Call lto_str_fd_init.
4958 (lto_file_close): Call lto_str_fd_close.
4959 (lto_str_read): New function. Read debug string table.
4960 (lto_str_lookup): New function. Get string for debug
4961 string table offset.
4962 (lto_read_form): Recognize DW_FORM_strp.
4963 (lto_file_read): Invoke lto_str_read.
4964
4965 * lto-elf.c (lto_elf_file_open): Read raw section data
4966 for the .debug_str section, if present.
4967
4968 * lto.h (struct lto_str_fd_struct): New struct.
4969 (struct lto_file_struct): Added new field DEBUG_STR
4970 to hold the file descriptor for the debug string table.
4971
49722007-12-07 Bill Maddox <maddox@google.com>
4973
4974 * lto.c (lto_str_fd_init): New function.
4975 (lto_str_fd_close): New function.
4976 (lto_file_init): Call lto_str_fd_init.
4977 (lto_file_close): Call lto_str_fd_close.
4978 (lto_str_read): New function. Read debug string table.
4979 (lto_str_lookup): New function. Get string for debug
4980 string table offset.
4981 (lto_read_form): Recognize DW_FORM_strp.
4982 (lto_file_read): Invoke lto_str_read.
4983
4984 * lto-elf.c (lto_elf_file_open): Read raw section data
4985 for the .debug_str section, if present.
4986
4987 * lto.h (struct lto_str_fd_struct): New struct.
4988 (struct lto_file_struct): Added new field DEBUG_STR
4989 to hold the file descriptor for the debug string table.
4990
49912007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4992
4993 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4994 Grow the basic_block_info and label_to_block_map vectors if
4995 necessary. Read in the block chain.
4996
49972007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4998
4999 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5000
50012007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5002
5003 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5004
50052007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5006
5007 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5008 (lto_read_body): Don't declare PROP_alias.
5009
50102007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5011
5012 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5013 argument type information.
5014
50152007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5016
5017 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5018 TREE_THIS_VOLATILE if the associated type is a volatile type.
5019 (lto_materialize_function): Remove call to init_ssa_operands.
5020 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5021 variable when reading an SSA_NAME. Do the same when reading a
5022 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5023 (input_cfg): Call init_ssa_operands.
5024 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5025 Move call to init_tree_ssa...
5026 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5027 add_referenced_var on any variables referenced from the body of the
5028 function. Inform the rest of the compiler we are in SSA form and
5029 inform later passes about the current properties.
5030
50312007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5032
5033 * lto.c (lto_materialize_function): Add FIXME.
5034
50352007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5036
5037 * lto-lang.c (enum built_in_attribute): New enum.
5038 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5039 built_in_attributes): New variables.
5040 (def_builtin_1): New function.
5041 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5042
50432007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5044
5045 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5046 DECL_SOURCE_LOCATION for debugging purposes.
5047 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5048 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5049 laying out the decl until later.
5050 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5051 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5052 TREE_ADDRESSABLE.
5053 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5054 operand of an ADDR_EXPR.
5055 * lto-lang.c (enum lto_builtin_type): New enum.
5056 (builtin_type): New typedef.
5057 (builtin_types, string_type_node, const_string_type_node,
5058 wint_type_node, intmax_type_node, uintmax_type_node,
5059 signed_size_type_node): New variables.
5060 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5061 lto_build_c_type_nodes): New functions.
5062 (lto_init): Initialize builtin types.
5063 (lto_set_decl_assembler_name): Let the target machine mangle the
5064 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5065
50662007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5067
5068 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5069 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5070 the type is a constant type. Set the assembler name and inform
5071 the rest of the compiler about the new decl if the decl is not
5072 public.
5073 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5074 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5075 try to read in function bodies for functions that already have bodies.
5076 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5077 equivalency.
5078 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5079 Check for whether we matched a builtin function type before calling
5080 lto_same_type_p on the generated type. Permit cases where the
5081 declaration of an array is unbounded, but the definition is bounded.
5082 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5083 DECL_SIZE_UNIT if necessary.
5084
3f8257db 50852007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5086
5087 * lto-read.c (input_expr_operand): Get types right
5088 for COMPLEX_CST.
5089
3f8257db 50902007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5091
5092 * lto-read.c (make_new_block, input_cfg): Properly set
5093 n_basic_blocks.
5094
50952007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5096
5097 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5098 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5099
51002007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5101
5102 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5103 construct the integer type for bitfields.
5104
3f8257db 51052007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5106
5107 * lto-read.c (data_in.current_node_has_loc): Removed.
5108 (input_line_info): Returns true if node needs line set.
5109 (set_line_info): Always sets line if called.
5110 (clear_line_info): Removed reference to current_node_needs_loc.
5111 (input_expr_operand): Keeps track locally if current node needs a loc.
5112 (input_local_var): Added code to handle DECL_INITIAL for
5113 static local vars. Only set loc if necessary.
5114
51152007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5116
5117 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5118 DECL_CONTEXT.
5119
51202007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5121
5122 * lto.c: Include langhooks.h.
5123 (lto_find_integral_type): Rework logic to handle the case where
5124 got_byte_size is true, but the bitsize requested and that of the
5125 base_type doesn't match.
5126 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5127 asm_name if we are creating a VAR_DECL.
5128 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5129 definition.
5130 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5131 function reference and use the builtin's decl if so. Set the
5132 DECL_CONTEXT of the RESULT_DECL for the function.
5133 * lto-lang.c (registered_builtin_fndecls): New variable.
5134 (lto_getdecls): Return it.
5135 (lto_builtin_function): Chain the new decl onto
5136 registered_builtin_fndecls.
5137
3f8257db 51382007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5139
5140 * lto-read.c (process_tree_flags, lto_static_init_local):
5141 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5142 (input_line_info, clear_line_info): Fixed new line number code.
5143 (input_expr_operand): Added type to SWITCH_EXPR.
5144 (lto_read_body): Properly initialized data_in.
5145 Clear line info when leaving.
5146
51472007-11-13 Diego Novillo <dnovillo@google.com>
5148
5149 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5150 Initialize ARTIFICIAL.
5151 (lto_read_subroutine_type_subprogram_DIE): Initialize
5152 SAVED_SCOPE.
5153 * lto-read.c (set_line_info): Remove ; from calls to
5154 LINEMAP_POSITION_FOR_COLUMN.
5155
3f8257db 51562007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5157
5158 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5159 (input_expr_operand, input_local_var): Renamed get_type_ref to
5160 input_type_ref.
5161 (input_expr_operand): Get the types correct for
5162 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5163
51642007-11-13 Doug Kwan <dougkwan@google.com>
5165
5166 * lto-read.c (input_widest_uint_uleb128): New function.
5167 (input_tree_flags, process_tree_flags, input_line_info,
5168 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5169 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5170 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5171 (lto_static_init_local): Add code to assert that lto_flags_type is
5172 wide enough.
5173
51742007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5175
5176 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5177 (lto_read_subroutine_type_subprogram_DIE): Handle
5178 DW_AT_static_link and DW_AT_specification. Return the
5179 specification if present.
5180 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5181
51822007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5183
5184 * lto-lang.c: Include target.h.
5185 (registered_builtin_types): New variable.
5186 (lto_type_for_mode): Increase number of modes handled.
5187 (lto_builtin_function): Fix argument list and return the decl.
5188 (lto_register_builtin_type): New function.
5189 (lto_init): Initialize target builtins and language-independent
5190 nodes.
5191 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5192
3f8257db 51932007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5194
5195 * lto-read.c (input_expr_operand): Added code to properly handle
5196 index filed. Added new RANGE_EXPR case.
5197
3f8257db 51982007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5199
5200 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5201 (data_in): Added current_node_has_loc field.
5202 (input_line_info, set_line_info, clear_line_info): Added a support
5203 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5204 did not have on on the source side.
5205 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5206 numbers too.
5207
52082007-11-09 Doug Kwan <dougkwan@google.com>
5209
5210 * lto-read.c (input_expr_operand): Change type of operand 2 of
5211 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5212
52132007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5214
5215 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5216 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5217 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5218 the new decl we are creating. Move informing the middle end about
5219 the new decl to...
5220 (lto_main): ...here. Inform the middle end about global variables
5221 after we have read in all the input files.
5222 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5223 variables with internal linkage, so delete the check for internal
5224 linkage. Combine TREE_PUBLIC flags.
5225
52262007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5227
5228 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5229 DW_AT_decl_line.
5230 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5231 builtin specially. Move check for attribute compatibility
5232 earlier.
5233
52342007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5235
5236 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5237 * config-lang.in (gtfiles): Add lto.h and lto.c.
5238 * lto-elf.c: Include ggc.h.
5239 (lto_elf_file_open): Allocate elf_file from GC memory.
5240 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5241 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5242 in GC memory.
5243 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5244 (lto_file_close): Free file from GC memory.
5245 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5246 (lto_read_member_DIE): Fix declaration.
5247 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5248 in GC memory.
5249 (current_lto_file): New variable.
5250 (lto_main): Use it.
5251 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5252 lto_die_cache_entry): Move to...
5253 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5254 declarations accordingly.
5255 (struct lto_file_struct): Declare.
5256 (lto_file_vtable): Use it instead of lto_file.
5257
52582007-11-06 Alon Dayan <alond@il.ibm.com>
3f8257db 5259 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5260
5261 * lto-read.c (process_flags, lto_static_init_local):
5262 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5263 change global array num_flags_for_code to flags_length_for_code.
5264 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5265
52662007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5267
5268 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5269 layout functions to compute information about the newly constructed
5270 type.
5271
52722007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5273
5274 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5275 case to use DECL_RESULT if necessary.
5276
3f8257db 52772007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5278
5279 * lto-read.c (input_tree_list): Removed.
5280 (input_tree_flags): Added parameter to force flags no matter what
5281 tree code.
5282 (input_expr_operand): Added parameter to input_tree_flags.
5283 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5284 input_expr_operand rather than input_tree_lists.
5285 (input_local_var): Use input_expr_operand to read attributes
5286 rather then input_tree_list.
5287 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5288
52892007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5290
5291 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5292 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5293 TYPE_DECL for it.
5294 * lto-read.c (lto_read_body): Use correct sizes for calculating
5295 type_decls_offset and types_offset.
5296
52972007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5298
5299 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5300 with GENERIC_NEXT.
5301 * config-lang.in (gtfiles): Add lto-lang.c.
5302 * lto-lang.c: Include gt-lto-lto-lang.h.
5303 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5304 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5305 (lto/lto-read.o): Likewise.
5306
3f8257db 53072007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5308
5309 * lto-read.c (data_in): Added type_decls and current_col fields.
5310 (string_slot): New type to hold canonized file name.
5311 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5312 input_line_info, set_line_info, clear_line_info): New functions.
5313 (file_name_hash_table): New hash table.
5314 (input_local_var, input_labels, input_local_vars_index,
5315 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5316 (input_uleb128): Changed type of byte var.
5317 (input_expr_operand): Large number of changes to get line numbers
5318 correct. Added TYPE_DECL case.
5319 (input_globals): Added code to get TYPE_DECLs processed.
5320 (input_local_var): Added code to process line numbers and
5321 TREE_CHAIN and DECL_CONTEXT.
5322 (input_function, input_constructor): Added call to
5323 clear_line_number.
5324 (lto_static_init_local): Added code to get line numbers correct.
5325 (lto_read_body): Added code to get TYPE_DECLS read and to change
5326 parameters to the calls above that had their parms reorganized.
5327
5328
53292007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5330
5331 * lto.h (lto_resolve_typedecl_ref): Declare.
5332 * lto.c (lto_resolve_typedecl_ref): New function.
5333
53342007-10-29 Mark Mitchell <mark@codesourcery.com>
5335 Nathan Froyd <froydnj@codesourcery.com>
5336
5337 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5338 DIEs even if we find an abstract origin for this DIE.
5339
53402007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5341
5342 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5343 RESULT_DECL slightly earlier. Only remember the decl for later
5344 if we successfully merge declarations.
5345
3f8257db 53462007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5347
5348 * lto-read.c (input_expr_operand): Give label_values the proper
5349 context and provide switch statements with a default type.
5350
53512007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5352
5353 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5354 * lto.c (lto_materialize_function): ...to here.
5355
53562007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5357
5358 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5359 * lto.c (lto_info_fd_init): Initialize it.
5360 (lto_info_fd_close): Free it.
5361 (lto_materialize_function): New function.
5362 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5363 unmaterialized_fndecls.
5364 (lto_file_read): Read in all the function bodies after we have read
5365 all of the DWARF info.
5366 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5367 reading a function body.
5368
3f8257db 53692007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5370
5371 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5372 semetric with output_tree_flags. Added call to log flags.
5373 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5374 type issues to make everything consistent with flags being
5375 unsigned HOST_WIDE_INTS.
5376 (input_expr_operand): Added call to
5377 recompute_tree_invariant_for_addr_expr.
5378 (input_local_var): Added debugging for tree_chains. Now calls
5379 input_tree_flags.
5380 (input_phi): Made flags unsigned HOST_WIDE_INT.
5381 (input_ssa_names): Now calls input_tree_flags.
5382 (lto_read_body): Now sets cfun.
5383 (lto_read_function_body): Now sets current_function_pointer.
5384
53852007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5386
5387 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5388 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5389 inspecting fields within.
5390 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5391 handle this appropriately.
5392
53932007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5394
5395 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5396 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5397 both DW_AT_abstract_origin and DW_AT_specification.
5398 (lto_read_subroutine_type_subprogram_DIE): Handle
5399 DW_AT_abstract_origin.
5400 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5401 (lto_read_DIE_at_ptr): Define as static to match declaration.
5402 Lookup the PTR in the cache before reading it from the file.
5403 (lto_resolve_var_ref): Adjust accordingly.
5404 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5405 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5406
54072007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5408
5409 * lto.c (lto_read_DIE_at_ptr): New function.
5410 (lto_resolve_var_ref): Use it.
5411 (lto_resolve_fn_ref): Use it.
5412 (lto_resolve_field_ref): Use it.
5413 (lto_read_variable_formal_parameter_constant_DIE): Follow
5414 DW_AT_specification and return the associated decl when appropriate.
5415
54162007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5417
5418 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5419 Implement for scalar integer modes.
5420 (lto_init): Initialize size_type_node.
5421
3f8257db 54222007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5423
5424 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5425 (input_local_var): Add chaining for params.
5426 (input_ssa_names): Add cfun parameter.
5427 (input_function): Remove unnecessary else.
5428
54292007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5430
5431 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5432 (lto_resolve_var_ref): Use proper types.
5433 (lto_resolve_fn_ref): Likewise.
5434 (lto_resolve_field_ref): Likewise.
5435
54362007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5437
5438 * lto-read.c (input_expr_operand): Remove case.
5439
54402007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5441
5442 * lto.c (lto_read_only_for_child_DIEs): New function.
5443 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5444 * lto-elf.c (lto_elf_map_lto_section): Remove.
5445 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5446 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5447 SSA_NAME. Add missing case for mechanical codes.
5448 (input_cfg): Use basic_block_info_for_function instead of
5449 basic_block_info.
5450
3f8257db 54512007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5452
5453 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5454 (input_list): Renamed input_tree_list and modified to follow same
5455 protocol as lto-function-out.c:output_tree_list.
5456 (input_expr_operand): Make asm operands use input_tree_list.
5457 (input_local_var): Now uses input_tree_list.
5458 (lto_read_body): Change placement for setting context of debug_labels.
5459
5460
3f8257db 54612007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5462
5463 * lto-read.c (input_real): Output debugging in proper order.
5464 (input_integer): Compute bit lengths properly.
5465 (input_list): Clean up declaration.
5466 (input_expr_operand): Change calls to input_real to match fix.
5467 Make reading of LTO_bit_field_ref1 match output.
5468 (input_local_var): Make reading of attributes match what is being
5469 written.
5470 (dump_debug_stream): Also print char in hex.
5471 (debug_out_fun): Fix signed unsigned mismatch.
5472
54732007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5474
5475 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5476 DW_AT_GNU_vector specially, as they are not contiguous with the
5477 specified set of attribute names. Use class_mask to check for
5478 errors at the end of the function
5479 (lto_resolve_var_ref): Read the DIE if it is not cached.
5480 (lto_resolve_fn_ref): Likewise.
5481 (lto_resolve_field_ref): Likewise.
5482
54832007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5484
5485 * lto.c: Include dwarf2out.h.
5486 (lto_cache_store_DIE): Assert that we never change the value.
5487 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5488 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5489 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5490 sensible type instead.
5491 (lto_read_structure_union_class_type_DIE): Store the newly
5492 created type prior to reading the members of the structure to
5493 avoid infinite recursion. Avoid computing types and alignments
5494 for structures whose sizes are unknown.
5495 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5496 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5497 DW_AT_const_value, and DW_AT_specification.
5498 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5499 Return early if we have already constructed the function type.
5500 (lto_read_typedef_DIE): Check to see if the type has been cached
5501 already. Cache the type before reading any children.
5502 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5503 (lto_read_DIE): Unset context->skip_non_parameters around reading
5504 the DIE.
5505 (lto_resolve_fn_ref): Delete trailing whitespace.
5506
3f8257db 55072007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5508
5509 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5510
55112007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5512
5513 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5514
55152007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5516
5517 * lto-lang.c (signed_and_unsigned_types): New variable.
5518 (lto_type_for_size): Consult signed_and_unsigned_types to find
5519 an approprite type, creating it if necessary.
5520 (lto_set_decl_assembler_name): Add actual method body.
5521
55222007-09-06 Jim Blandy <jimb@codesourcery.com>
5523
5524 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5525 can't find a var init for this variable, leave its DECL_INITIAL.
5526 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5527 lto_elf_map_fn_body.
5528 (lto_map_lto_section): New function.
5529 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5530 bodies, and lto_elf_map_optional_lto_section for variable
5531 initializers.
5532 (lto_elf_find_section_data): Quietly return NULL if the section is
5533 missing.
5534 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5535
5536 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5537
5538 * lto-read.c (lto_read_body): Doc fix.
5539
3f8257db 55402007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5541
5542 * lto-read.c (fun_in): Renamed to data_in.
5543 (input_expr_operand, input_local_var, input_string_internal,
5544 input_string, input_real, input_list, get_label_decl,
5545 get_type_ref, input_expr_operand, input_globals, input_labels,
5546 input_local_vars_index, input_local_var, input_local_vars,
5547 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5548 (input_constructor): New function.
5549 (lto_read_function_body): Renamed to lto_read_body and generalized
5550 to handle both functions and constructors.
5551 (lto_read_function_body, lto_read_var_init): New function.
5552
5553
3f8257db 55542007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5555
5556 * lto-read.c (input_expr_operand): Assert that there really is a
5557 FUNCTION_DECL.
5558 (input_globals): Removed checks on 0 section.
5559
3f8257db 55602007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5561
5562 * lto-read.c (fun_in): Added local_decls_index and
5563 local_decls_index_d.
5564 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5565 (input_globals): Enabled code to handle FIELD_DECLs.
5566 (input_local_vars_index, input_local_vars): New function.
5567 (input_local_var): Changed to allow locals to be input randomly.
5568 (lto_read_function_body): Added code to input the
5569 local_decls_index and to free various structures.
5570
55712007-08-17 Jim Blandy <jimb@codesourcery.com>
5572
5573 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5574 ATTRIBUTE_UNUSED from 'die' formal.
5575
5576 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5577 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5578 (input_list): Fix type of 'tag'.
5579 (input_expr_operand): Fix type of 'tag' argument. Update
5580 declaration. Fix type of 'ctag'. Add default case to switch,
5581 since the type of the switched value is now an enum.
5582 (input_local_vars): Fix type of 'tag'.
5583 (input_bb): Fix type of 'tag' argument.
5584 (input_function): Fix type of 'tag' argument.
5585
55862007-08-16 Jim Blandy <jimb@codesourcery.com>
5587
5588 * lto.c (lto_read_member_DIE): Record the tree we create in
5589 fd->die_cache. (Our 'die' argument is no longer unused.)
5590 (lto_resolve_field_ref): New function.
5591 * lto.h (lto_resolve_field_ref): New declaration.
5592
55932007-08-15 Jim Blandy <jimb@codesourcery.com>
5594
5595 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5596
55972007-08-07 Jim Blandy <jimb@codesourcery.com>
5598
5599 * lto.c (lto_read_form): Complete attr_classes table.
5600 (DWARF2_form_data): Doc fix.
5601
56022007-08-05 Mark Mitchell <mark@codesourcery.com>
5603
5604 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5605 and unmap_var_init.
5606 (lto_read_var_init): Declare.
5607 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5608 interface for reading variable initializers.
5609 * lto-elf.c (lto_elf_read_var_init): Remove.
5610 (lto_elf_file_vtable): Update initializer.
5611 (lto_elf_read_var_init): Add comment about unused-ness.
5612 * lto-read.c (lto_read_var_init): New.
5613
5614 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5615
3f8257db 56162007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5617
5618 * lto-read.c (lto_read_function_body): Moved declaration of fn
5619 outside of ifdef.
5620
3f8257db 56212007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5622
5623 * lto-read.c (input_uleb128, input_string_internal, input_real,
5624 input_integer, input_record_start, input_list, get_type_ref,
5625 input_flags, input_expr_operand, input_expr_operand,
5626 input_expr_operand, input_local_vars, input_cfg, input_phi,
5627 input_ssa_names, input_bb, input_function): Added semicolons.
5628
5629
3f8257db 56302007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5631
5632 * lto-read.c (input_globals): Remove debugging.
5633 (input_function): Set DECL_ARGUMENTS.
5634
3f8257db 56352007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5636
5637 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5638 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5639 (input_phi): Made work with operands other than SSA_NAMES and
5640 fixed processing of flags.
5641 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5642 (input_flags): New function.
5643 * lto-lang.c (lto_init): Changed state of in_lto_p.
5644
5645
56462007-07-24 Mark Mitchell <mark@codesourcery.com>
5647
5648 * lto-tree.h (lto_varargs_cookie): Remove.
5649 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5650 skip_non_parameters, skip_parameters.
5651 (lto_varargs_cookie): Remove.
5652 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5653 parameter types.
5654 (lto_read_abbrev): New function.
5655 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5656 child DIEs.
5657 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5658 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5659 (lto_file_read): Initialize new context fields.
5660 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5661 (lto_unsigned_type): Remove.
5662 (lto_signed_type): Likewise.
5663 (lto_signed_or_unsigned_type): Likewise.
5664 (lto_init): Do not create lto_varargs_cookie.
5665 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5666 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5667 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5668
56692007-07-19 Jan Hubicka <jh@suse.cz>
5670
5671 * lto-read.c (lto_read_function_body): Produce empty scope block
5672 to avoid crash.
5673
56742007-07-18 Mark Mitchell <mark@codesourcery.com>
5675
5676 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5677 process local variables.
5678 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5679
3f8257db 56802007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5681
5682 * lto-read.c (input_list, input_expr_operand): Added struct
5683 function parameter.
5684 (init_cfg, finalize_cfg): Removed function.
5685 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5686 (input_labels, input_local_vars): Now takes input_block parameter rather than
5687 synthsyzing it.
5688 (input_cfg, input_phi, input_ssa_names): New functions.
5689 (input_bb): Now passes in input_blocks. Does not construct cfg
5690 and processes the list of phi functions.
5691 (input_function): Now builds both the cfg and ssa_names table.
5692 (lto_read_function_body): Processes new header fields to construct
5693 streams for the ssa_names and cfg and their debugging.
5694 * lto/lto-lang.c (lto_init): Set in_lto_p.
5695
5696
56972007-06-28 Mark Mitchell <mark@codesourcery.com>
5698
5699 * lto.h (lto_file_vtable): Add read_var_init.
5700 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5701 initializers.
5702 (lto_main): Remove bogus asserts.
5703 * lto-elf.c (tm.h): Include it.
5704 (libiberty.y): Likewise.
5705 (lto_elf_file): Add strtab and symtab. Rename
5706 string_table_section_index to sec_strtab.
5707 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5708 (lto_elf_get_shdr): New function.
5709 (lto_elf_free_shdr): Likewise.
5710 (lto_elf_find_section_data): Use them.
5711 (lto_elf_read_symtab): New function.
5712 (lto_elf_lookup_sym): Likewise.
5713 (lto_elf_free_sym): Likewise.
5714 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5715 (lto_elf_built_init): New function.
5716 (lto_elf_read_var_init): Likewise.
5717 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5718
3f8257db 57192007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5720
5721 * lto-read (make_new_block): Initialize the stmt_list.
5722 (lto_static_init_local): Add debugging for missing codes.
5723
57242007-06-26 Mark Mitchell <mark@codesourcery.com>
5725
5726 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5727 unprototyped functions.
5728
57292007-06-23 Mark Mitchell <mark@codesourcery.com>
5730
5731 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5732 Handle DW_AT_MIPS_linkage_name.
5733 (lto_read_subroutine_type_subprogram): Likewise. Correct
5734 compilation errors.
5735 (lto_main): Remove incorrect assertions.
5736 * lto-symbtab.c: Build function types out of TREE_LISTs.
5737
5738 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5739
5740 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5741
3f8257db 57422007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5743
5744 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5745 dummy since ggc does not like empty structs.
5746 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5747 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5748 expr->common to expr->base.
5749 (make_new_block): Moved stmt_list to proper place.
5750
5751
57522007-03-14 Robert Kennedy <jimbob@google.com>
5753
5754 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5755 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5756 assembler name from DWARF.
5757 * lto-lang.c (lto_set_decl_assembler_name) New function.
5758
57592006-09-10 Mark Mitchell <mark@codesourcery.com>
5760
5761 * lto.h (lto_file_vtable): New structure.
5762 (lto_file): Add vtable pointer.
5763 (lto_file_init): Add vtable paramter.
5764 (lto_read_function_body): New function.
5765 (lto_symtab_merge_fn): New function.
5766 * lto.c (lto_file_init): Add vtable parameter.
5767 (lto_read_form): Fill in entries for DW_AT_prototyped,
5768 DW_AT_frame_base.
5769 (lto_read_subroutine_type_subprogram_DIE): New function.
5770 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5771 DW_TAG_subprogram.
5772 * lto-elf.c (lto_elf_vile_vtable): New variable.
5773 (lto_elf_file_open): Pass it to lto_file_init.
5774 (lto_elf_map_fn_body): New function.
5775 (lto_elf_unmap_fn_body): Likewise.
5776 * lto-read.c: New file.
5777 * lto-symtab.c (lto_symtab_merge_fn): New function.
5778 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5779 tree_rest_of_compilation.
5780 * Make-lang.in (LTO_OBJS): Add lto-read.o
5781 (lto-read.o): New target.
5782
57832006-09-03 Mark Mitchell <mark@codesourcery.com>
5784
5785 * lto.c (<inttypes.h>): Don't include it.
5786 (lto_context): Don't typedef it.
5787 (lto_resolve_reference): New function.
5788 (lto_read_form): Use it.
5789 (lto_resolve_type_ref): New function.
5790 (lto_resolve_var_ref): Likewise.
5791 (lto_resolve_fn_ref): Likewise.
5792 * lto.h (<inttypes.h>): Include it.
5793 (lto_context): New type.
5794 (lto_ref): New structure.
5795 (lto_resolve_type_ref): Declare.
5796 (lto_resolve_var_ref): Likewise.
5797 (lto_resolve_fn_ref): Likewise.
5798
57992006-08-18 Mark Mitchell <mark@codesourcery.com>
5800
5801 * lang-specs.h: New file.
5802
58032006-08-14 Mark Mitchell <mark@codesourcery.com>
5804
5805 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5806 (lto_info_fd_close): Deallocate it.
5807 (lto_die_cache_entry): New structure.
5808 (lto_cache_hash): New function.
5809 (lto_cache_eq): Likewise.
5810 (lto_cache_store_DIE): Likewise.
5811 (lto_cache_lookup_DIE): Likewise.
5812 (lto_read_referenced_type_DIE): Use the cache.
5813 (lto_read_pointer_type_DIE): Robustify.
5814 (lto_read_DIE): Use the cache.
5815 * lto.h (hashtab.h): Include.
5816 (lto_info_fd): Add DIE cache.
5817 * Make-lang.in (LTO_H): New variable.
5818 (lto/lto-lang.o): Use LTO_H.
5819 (lto/lto-elf.o): Likewise.
5820 (lto/lto-symtab.o): Likewise.
5821
58222006-07-09 Mark Mitchell <mark@codesourcery.com>
5823
5824 * lto.c (lto_abi_mismatch_error): New function.
5825 (lto_abbrev_read): Initialize num_abbrevs.
5826 (lto_read_form): Specify allowed form classes for
5827 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5828 (lto_read_variable_formal_parameter_constant_DIE): Handle
5829 DW_AT_declaration. Call lto_symtab_merge_var.
5830 (lto_read_pointer_type_DIE): New function.
5831 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5832 not creat TYPE_DECLs for types that already have them.
5833 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5834 (lto_set_cu_context): Make cu_start point to the header, not the
5835 first DIE.
5836 (lto_file_read): Adjust for change to lto_set_cu_context.
5837 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5838 (lto/lto-symtab.o): New rule.
5839 * lto-tree.h (lang_identifier): Add decl field.
5840 (LANG_IDENTIFIER_CAST): New macro.
5841 (LTO_IDENTIFIER_DECL): Likewise.
5842 (lto_symtab_merge_var): Declare.
5843 * lto-symtab.c: New file.
5844
58452006-07-02 Daniel Berlin <dberlin@dberlin.org>
5846
5847 * lto.c (lto_context): Add current_cu and info_fd members.
5848 (DWARF2_CompUnit): New structure.
5849 (lto_read_DIE): Take lto_info_fd *.
5850 (lto_read_child_DIEs): Ditto.
5851 (lto_file_corrupt_error): Constify argument.
5852 (lto_set_cu_context): New function
5853 (lto_info_fd_init): Ditto.
5854 (lto_info_fd_close): Ditto.
5855 (lto_file_init): Use lto_info_fd_init.
5856 (lto_file_close): Use lto_info_fd_close.
5857 (lto_read_initial_length): Pass in pointer to header size.
5858 (lto_read_comp_unit_header): Correct cu_length to
5859 real length from beginning of header. Take lto_info_fd * as
5860 argument.
5861 (find_cu_for_offset): New function.
5862 (lto_read_form): Change first argument to lto_info_fd *.
5863 Add FORM_CONTEXT argument.
5864 Handle DW_FORM_ref_addr.
5865 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5866 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5867 Swap contexts if necessary for form.
5868 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5869 lto_file_corrupt_error.
5870 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5871 (lto_read_referenced_type_DIE): Change first argument to
5872 lto_info_fd *. Access lto_fd fields through base pointer.
5873 (lto_read_compile_unit_DIE): Change first argument to an
5874 lto_info_fd *.
5875 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5876 (lto_read_base_type_DIE): Ditto.
5877 (lto_read_child_DIEs): Ditto.
5878 (lto_read_DIE): Ditto. Change type of function pointer.
5879 (lto_info_read): New function.
5880 (lto_set_cu_context): Ditto.
5881 (lto_file_read): Use lto_info_read, walk resulting CU's
5882 (lto_main): Update for lto_info_fd change.
5883 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5884 necessary.
5885 * lto.h (DWARF2_CompUnit): New structure.
5886 (lto_info_fd): Ditto.
5887 (lto_file): Change debug_info to be an lto_info_fd.
5888
58892006-06-25 Mark Mitchell <mark@codesourcery.com>
5890
5891 * lto.c (toplev.h): Include it.
5892 (dwarf2.h): Likewise.
5893 (tree.h): Likewise.
5894 (tm.h): Likewise.
5895 (cgraph.h): Likewise.
5896 (ggc.h): Likewise.
5897 (inttypes.h): Likewise.
5898 (DWARF2_attr): New type.
5899 (DWARF2_abbrev): Likewise.
5900 (DWARF2_class): Likewise.
5901 (DWARF2_form_data): Likewise.
5902 (lto_context): Likewise.
5903 (lto_fd_init): New function.
5904 (lto_abbrev_fd_init): Likewise.
5905 (lto_abbrev_fd_close): Likewise.
5906 (lto_file_init): Use them.
5907 (lto_file_close): New function.
5908 (lto_file_corrupt_error): Likewise.
5909 (LTO_CHECK_INT_VAL): New macro.
5910 (lto_check_size_t_val): New function.
5911 (lto_check_int_val): Likewise.
5912 (LTO_READ_TYPE): New macro.
5913 (lto_read_ubyte): New function.
5914 (lto_read_uhalf): Likewise.
5915 (lto_read_uword): Likewise.
5916 (lto_read_uleb128): Likewise.
5917 (lto_read_initial_length): Likewise.
5918 (lto_abbrev_read_attrs): Likewise.
5919 (lto_abbrev_read): Likewise.
5920 (lto_abbrev_lookup): Likewise.
5921 (lto_read_section_offset): Likewise.
5922 (lto_read_comp_unit_header): Likewise.
5923 (lto_read_form): Likewise.
5924 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5925 (LTO_BEGIN_READ_ATTRS): Likewise.
5926 (LTO_END_READ_ATTRS): Likewise.
5927 (lto_unsupported_attr_error): New function.
5928 (lto_get_identifier): Likewise.
5929 (lto_read_referenced_type_DIE): Likewise.
5930 (lto_read_compile_unit_DIE): Likewise.
5931 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5932 (lto_read_base_type_DIE): Likewise.
5933 (lto_read_DIE): Likewise.
5934 (lto_read_child_DIEs): Likewise.
5935 (lto_file_read): Read DIEs.
5936 (lto_main): Ask middle end to emit entities.
5937 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5938 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5939 (lto_elf_file_close): Likewise.
5940 * lto.h (lto_file): Declare.
5941 (DWARF2_abbrev): Likewise.
5942 (lto_fd): New type.
5943 (lto_abbrev_fd): Likewise.
5944 (lto_file): Use new types.
5945 (lto_file_close): Declare.
5946 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5947
59482006-06-18 Mark Mitchell <mark@codesourcery.com>
5949
5950 * lto.h: New file.
5951 * lto.c: New file.
5952 * lto-elf.c: New file.
5953 * lto-lang.c (flags.h): Include it.
5954 (lto.h): Likewise.
5955 (lto_init): New function.
5956 (lto_write_globals): Remove.
5957 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5958 (LANG_HOOKS_INIT): Define.
5959 (LANG_HOOKS_PARSE_FILE): Likewise.
5960 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5961 (LTO_EXE): Link with libelf.
5962 (lto/lto-lang.o): Update dependencies.
5963 (lto/lto.o): New target.
5964 (lto/lto-elf.o): Likewise.
5965
59662006-06-12 Mark Mitchell <mark@codesourcery.com>
5967
5968 * config-lang.in: New file.
5969 * Make-lang.in: Likewise.
5970 * lto-tree.h: Likewise.
5971 * lto-lang.c: Likewise.
818ab71a 5972\f
85ec4feb 5973Copyright (C) 2006-2018 Free Software Foundation, Inc.
d7f09764 5974
818ab71a
JJ
5975Copying and distribution of this file, with or without modification,
5976are permitted in any medium without royalty provided the copyright
5977notice and this notice are preserved.