]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
i386.c (ix86_option_override_internal, [...]): Formatting fixes.
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
f615cb16
ML
12018-11-19 Martin Liska <mliska@suse.cz>
2
3 PR lto/88077
4 * lto-symtab.c (lto_symtab_merge): Transform the
5 condition before r256989.
6
12eac232
ML
72018-11-16 Martin Liska <mliska@suse.cz>
8
9 PR lto/88004
10 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
11 lto_symtab_symbol_p as it does checking of transparent alias.
12 These needs to be also merged in the function.
13
7958186b
MP
142018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
15
16 * lto-partition.c (privatize_symbol_name_1): Use
17 clone_function_name_numbered.
18
abb967da
JH
192018-10-26 Jan Hubicka <jh@suse.cz>
20
21 * lto/lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
22
033eb567
DM
232018-10-17 David Malcolm <dmalcolm@redhat.com>
24
25 * Make-lang.in (selftest-lto): New.
26
9ed6dbee
ML
272018-08-29 Martin Liska <mliska@suse.cz>
28
29 PR bootstrap/87130
30 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
31 to behavior before r263887.
32
3d78e008
ML
332018-08-27 Martin Liska <mliska@suse.cz>
34
35 * lto-lang.c (handle_const_attribute): Use new function
92a285c1
ML
36 fndecl_built_in_p and remove check for FUNCTION_DECL if
37 possible.
3d78e008
ML
38 * lto-symtab.c (lto_symtab_merge_p): Likewise.
39 (lto_symtab_merge_decls_1): Likewise.
40 (lto_symtab_merge_symbols): Likewise.
41 * lto.c (lto_maybe_register_decl): Likewise.
42 (read_cgraph_and_symbols): Likewise.
43
efd9eb29
TV
442018-08-21 Tom de Vries <tdevries@suse.de>
45
46 * lto.c (lto_main): Call debuginfo_early_start and
47 debuginfo_early_stop.
48
00abf86c
MS
492018-07-20 Martin Sebor <msebor@redhat.com>
50
51 PR middle-end/82063
52 * lto-lang.c (lto_handle_option): Change function argument
53 to HOST_WIDE_INT.
54
efe0e6cd
RB
552018-07-20 Richard Biener <rguenther@suse.de>
56
57 PR debug/86585
58 * lto.c (unify_scc): Before we throw away an SCC see if we
59 can amend prevailing single-entry SCC with debug refs.
60
814f3331
JH
612018-07-13 Jan Hubicka <hubicka@ucw.cz>
62
63 * lto.c (do_stream_out): Add PART parameter; open dump file.
64 (stream_out): Add PART parameter; pass it to do_stream_out.
65 (lto_wpa_write_files): Update call of stream_out.
66
c518c102
ML
672018-07-04 Martin Liska <mliska@suse.cz>
68
69 PR middle-end/66240
70 PR target/45996
71 PR c/84100
72 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
73 instead of memcmp.
74
b54006ae
ML
752018-06-20 Martin Liska <mliska@suse.cz>
76
77 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
92a285c1 78 FIXME comment.
b54006ae 79
56f62793
ML
802018-06-19 Martin Liska <mliska@suse.cz>
81
82 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
92a285c1 83 of get_create.
56f62793
ML
84 (undo_partition): Likewise.
85 (lto_balanced_map): Likewise.
86
1724941e
ML
872018-06-19 Martin Liska <mliska@suse.cz>
88
89 * config-lang.in: Remove stagestuff.
90
29a50dfb
JH
912018-06-08 Jan Hubicka <hubicka@ucw.cz>
92
93 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
94 New global vars.
95 (lto_register_dumps): New hook.
96 (LANG_HOOKS_REGISTER_DUMPS): New.
97 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
98 * lto-symtab.c: Include lto.h; dump into dump_file instead of
99 symtab->dump_file.
100 (lto_symtab_merge_decls): Initialize dump file.
101 * lto.c (read_cgraph_and_symbols): Initialize dump file.
102 (do_whole_program_analysis): Likewise.
103
74644756
ML
1042018-06-08 Martin Liska <mliska@suse.cz>
105
106 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
107 instead of summary_uid.
108
99353fcf
ML
1092018-06-08 Martin Liska <mliska@suse.cz>
110
111 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
112 of get.
113 (undo_partition): Likewise.
114 (lto_balanced_map): Likewise.
115
31db0fe0
ML
1162018-06-08 Martin Liska <mliska@suse.cz>
117
118 * lto-partition.c (add_references_to_partition): Remove support
119 for MPX (macros, related functions, fields in cgraph_node, ...).
120 (add_symbol_to_partition_1): Likewise.
121 (privatize_symbol_name): Likewise.
122 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
123
f115c9b5
RB
1242018-06-05 Richard Biener <rguenther@suse.de>
125
126 * lto.c (cmp_type_location): Expand locations only once.
127
5b42d196
JH
1282018-05-30 Jan Hubicka <hubicka@ucw.cz>
129
130 * lang.opt (lto_linker_output): Add nolto-rel.
131 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
132 and LTO_LINKER_OUTPUT_NOLTOREL.
133 (lto_init): Generate lto when doing incremental link.
134 * lto.c (lto_precess_name): Add lto1-inclink.
135
ab168044
JH
1362018-05-18 Jan Hubicka <jh@suse.cz>
137
138 PR lto/85583
139 * lto-partition.c (account_reference_p): Do not account
140 references from aliases; do not account refernces from
141 external initializers.
142
b6e33d73
JH
1432018-04-30 Jan Hubicka <jh@suse.cz>
144
145 * lto.c (cmp_partitions_size): Remove.
146 (lto_wpa_write_files): Also output priorities; do not sort partitions.
147 (cmp_partition_order): Move to ...
148 * lto-partition.c (cmp_partition_order): ...
149 (lto_1_to_1_map): Sort partitions.
150
e693ebce
JH
1512018-04-20 Jan Hubicka <jh@suse.cz>
152
153 * lto-partition.c (lto_balanced_map): Fix sanity check.
154
ddb0b824
JH
1552018-04-19 Jan Hubicka <jh@suse.cz>
156
157 * lto-partition.c: Include sreal.h
158 (add_symbol_to_partition_1): Use size instead of self_size
159 for size estimate.
160 (account_reference_p): New.
161 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
162 fix accounting errors in boundary size; add debug output; combine cost
163 as cost/size instead of cost/internal; reduce the partitioning error to
164 +- 1/8 of the parttion size.
165
1781a04f
ML
1662018-04-19 Martin Liska <mliska@suse.cz>
167
168 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
169 for multiple PREVAILING_DEF_IRONLY for common symbols.
170
6867cd69
ML
1712018-04-18 Martin Liska <mliska@suse.cz>
172
173 * lto.c (lto_read_decls): Fix GNU coding style and typos.
174
af597536
ML
1752018-04-18 Martin Liska <mliska@suse.cz>
176
177 PR ipa/83983
178 PR ipa/85391
179 * lto.c (cmp_type_location): New function.
180 (lto_read_decls): First collect all types, then
181 sort them according by location before register_odr_type
182 is called.
183
7d6051b1
JH
1842018-04-18 Jan Hubicka <jh@suse.cz>
185 Martin Liska <mliska@suse.cz>
186
187 PR lto/85391
188 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
189 types.
190
23d87577
ML
1912018-04-11 Martin Liska <mliska@suse.cz>
192
193 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
194 function.
195
c16833dc
ML
1962018-04-10 Martin Liska <mliska@suse.cz>
197
198 PR lto/85248
199 * lto-symtab.c (lto_symtab_merge_p): Do not check for
200 TREE_VALUES of error attributes.
201
8d96e546
ML
2022018-04-10 Richard Biener <rguenther@suse.de>
203 Martin Liska <mliska@suse.cz>
204
205 PR lto/85248
206 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
207
97bb4812
JH
2082018-02-08 Jan Hubicka <hubicka@ucw.cz>
209
210 * lto-partition.c (lto_balanced_map): Watch overflow.
211
39aa9b23
JH
2122018-02-08 Jan Hubicka <hubicka@ucw.cz>
213
214 PR ipa/81360
215 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
216 (read_cgraph_and_symbols): Use
217 symtab_node::output_to_lto_symbol_table_p.
218
26a823f0
JH
2192018-01-30 Jan Hubicka <hubicka@ucw.cz>
220
221 * lto.c (register_resolution): Remove forgotten sanity check.
222
43fbc2e9
JH
2232018-01-30 Jan Hubicka <hubicka@ucw.cz>
224
225 PR lto/81004
226 * lto.c: Include builtins.h
227 (register_resolution): Merge resolutions in case trees was
228 merged across units.
229 (lto_maybe_register_decl): Break out from ...
230 (lto_read_decls): ... here.
231 (unify_scc): Also register decls here.
232 (read_cgraph_and_symbols): Sanity check that all resolutions was
233 read.
234
ee034d31
EB
2352018-02-02 Eric Botcazou <ebotcazou@adacore.com>
236
237 PR lto/83954
238 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
239 component type of array types with non-aliased component.
240
44c945e6
JH
2412018-01-30 Jan Hubicka <hubicka@ucw.cz>
242
243 PR lto/83954
244 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
245 for type match warning on arrays of pointers.
246
cde9b2f8
ML
2472018-01-23 Martin Liska <mliska@suse.cz>
248
249 PR lto/81440
250 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
251 trailing arrays at the end of a struct.
252
5c0caeb3
RS
2532018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
254 Alan Hayward <alan.hayward@arm.com>
255 David Sherwood <david.sherwood@arm.com>
256
257 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
258
928686b1
RS
2592018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
260 Alan Hayward <alan.hayward@arm.com>
261 David Sherwood <david.sherwood@arm.com>
262
263 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
264 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
265
85ec4feb
JJ
2662018-01-03 Jakub Jelinek <jakub@redhat.com>
267
268 Update copyright years.
269
4849deb1
JJ
2702017-12-15 Jakub Jelinek <jakub@redhat.com>
271
272 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
273 affects_type_identity and handler fields, adjust comments.
274
734914b6
RS
2752017-12-07 Richard Sandiford <richard.sandiford@arm.com>
276
277 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
278
5d9ae53d
MS
2792017-12-07 Martin Sebor <msebor@redhat.com>
280
281 PR c/81544
282 * lto-lang.c (lto_attribute_table): Initialize new member of struct
283 attribute_spec.
284
5de73c05
JJ
2852017-11-30 Jakub Jelinek <jakub@redhat.com>
286
287 * lto.c (create_subid_section_table): Use ; instead of ;;.
288
974aedcc
MP
2892017-11-22 Marek Polacek <polacek@redhat.com>
290
291 PR c++/60336
292 PR middle-end/67239
293 PR target/68355
294 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
295
1bad9c18
JH
2962017-11-10 Jan Hubicka <hubicka@ucw.cz>
297
298 * lto-partition.c (lto_balanced_map): Use frequency accessor.
299
65991ea3
JH
3002017-10-13 Jan Hubicka <hubicka@ucw.cz>
301
302 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
303
4e7d0260
NS
3042017-10-11 Nathan Sidwell <nathan@acm.org>
305
306 * lto.c (mentions_vars_p_decl_with_vis): Use
307 DECL_ASSEMBLER_NAME_RAW.
308 (lto_fixup_prevailing_decls): Likewise.
309
8e6cdc90
RS
3102017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
311
312 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
313 operating on trees as wide_ints.
314
357b7604
RS
3152017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
316 Alan Hayward <alan.hayward@arm.com>
317 David Sherwood <david.sherwood@arm.com>
318
319 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
320
1ea85365
RB
3212017-08-21 Richard Biener <rguenther@suse.de>
322
92a285c1
ML
323 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
324 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
325 TYPE_DECL debug processing, register DIE references from
326 prevailing SCCs with the debug machinery.
327 (lto_section_with_id): Handle LTO debug sections.
1ea85365 328
8e093270
NS
3292017-08-16 Nathan Sidwell <nathan@acm.org>
330
331 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
332 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
333 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
334
eac3ab4a
TV
3352017-08-08 Tom de Vries <tom@codesourcery.com>
336
337 * lto.c: Include attribs.h.
338
314e6352
ML
3392017-08-08 Martin Liska <mliska@suse.cz>
340
341 * lto-lang.c: Include header files.
342 * lto-symtab.c: Likewise.
343
63e434ca
RB
3442017-08-03 Richard Biener <rguenther@suse.de>
345
346 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
347 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
348 use DECL_LANG_FLAG_0.
349 (lto_symtab_prevail_decl): Likewise.
350
417ca011
TD
3512017-07-07 Torsten Duwe <duwe@suse.de>
352
353 * lto-lang.c (lto_attribute_table): Add entry for
354 "patchable_function_entry".
355
20deef65
NS
3562017-07-19 Nathan Sidwell <nathan@acm.org>
357
358 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
359 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
360
0eaf0bfe
JH
3612017-07-06 Jan Hubicka <hubicka@ucw.cz>
362
363 * lto-partition.c (lto_balanced_map): Do not check
364 flag_toplevel_reorder.
2db9b7cd 365
0eaf0bfe 3662017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
367 * lto-lang.c (lto_init): Use builtin_structptr_types.
368
d1eed638
JH
3692017-06-15 Jan Hubicka <hubicka@ucw.cz>
370 Thomas Preud'homme <thomas.preudhomme@arm.com>
371
372 PR lto/69866
373 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
374 that resolved externally.
375
d2db2e6b
JH
3762017-05-23 Jan Hubicka <hubicka@ucw.cz>
377
378 * lto.c (do_whole_program_analysis): Replace inline_free_summary
379 by ipa_free_fn_summary.
380
464d0118
ML
3812017-05-23 Martin Liska <mliska@suse.cz>
382
383 * lto-symtab.c (lto_cgraph_replace_node): Use
384 symtab_node::dump_{asm_,}name functions.
385 * lto.c (read_cgraph_and_symbols): Likewise.
386 (do_whole_program_analysis): Likewise.
387
6c52831d
ML
3882017-05-23 Martin Liska <mliska@suse.cz>
389
390 * lto.c (read_cgraph_and_symbols): Use the renamed function.
391 (do_whole_program_analysis): Use the renamed function.
392
27d020cf
JH
3932017-05-22 Jan Hubicka <hubicka@ucw.cz>
394
395 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
396 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
397
815d9cc6
XR
3982017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
399
92a285c1 400 PR c++/80038
815d9cc6
XR
401 * lto-lang.c (lto_init): Set in_lto_p earlier.
402
350792ff
RB
4032017-04-12 Richard Biener <rguenther@suse.de>
404 Bernd Edlinger <bernd.edlinger@hotmail.de>
405
406 PR middle-end/79671
407 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
408
4a44a5f3
ML
4092017-02-14 Martin Liska <mliska@suse.cz>
410
411 * lto.c (do_stream_out): Free LTO file filename string.
412
8a3a6ab4
DM
4132017-01-19 David Malcolm <dmalcolm@redhat.com>
414
415 * lto-lang.c (builtin_type_for_size): Convert call to
416 lto_type_for_size to one through the langhook.
417 (lto_type_for_size): Move to langhooks.c and rename to
418 lhd_type_for_size.
419 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
420
4c4b4703
JJ
4212017-01-11 Jakub Jelinek <jakub@redhat.com>
422
423 PR middle-end/50199
424 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
425 if it was 0.
426
bd2c6270
JJ
4272017-01-09 Jakub Jelinek <jakub@redhat.com>
428
429 PR translation/79019
430 PR translation/79020
431 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
432
24d3f325
NS
4332017-01-06 Nathan Sidwell <nathan@acm.org>
434
5406184c
NS
435 * lto-partition.c (promote_symbol): Write to dump file sooner,
436 include alias promoting too.
437
24d3f325
NS
438 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
439 (may_need_named_section_p): Likewise.
440 (rename_statics): Likewise.
441 (lto_promote_cross_file_statics): Likewise.
442
cbe34bb5
JJ
4432017-01-01 Jakub Jelinek <jakub@redhat.com>
444
445 Update copyright years.
446
6c8bf066
GJL
4472016-11-30 Georg-Johann Lay <avr@gjlay.de>
448
449 PR lto/78562
450 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
451 mismatch if the two types are built-in.
452
7fa6a965
PK
4532016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
454
455 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
456
efb71232
RB
4572016-11-23 Richard Biener <rguenther@suse.de>
458
459 PR lto/78472
460 * lto.c (hash_canonical_type): Ignore zero-sized fields.
461
48330c93
BE
4622016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
463
464 PR c++/71973
465 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
466
899ca90e 4672016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
468 Alan Hayward <alan.hayward@arm.com>
469 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
470
471 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
472
65179585
RB
4732016-10-31 Richard Biener <rguenther@suse.de>
474
475 PR lto/78129
476 * lto.c (do_whole_program_analysis): Bail out after errors
477 from WPA analysis.
478
8bc5448f
KV
4792016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
480
481 * lto-partition.c: Include tree-vrp.h.
482 * lto.c: Likewise.
483
68317985
RB
4842016-09-20 Richard Biener <rguenther@suse.de>
485
486 * lto.c (lto_main): Call early_finish with "<artificial>" as
487 filename.
488
321e76fb
RB
4892016-09-19 Richard Biener <rguenther@suse.de>
490
491 * lto.c (lto_main): Invoke early_finish debug hook.
492
ea6e17d5
RB
4932016-07-25 Richard Biener <rguenther@suse.de>
494
495 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
496 (unify_scc): Likewise.
497 (lto_read_decls): Likewise.
498
e9ac1f86
JJ
4992016-06-28 Jakub Jelinek <jakub@redhat.com>
500
501 * Make-lang.in: Don't cat ../stage_current if it does not exist.
502
277d7ee0
AK
5032016-06-23 Andi Kleen <ak@linux.intel.com>
504
505 * Make-lang.in: Add support for autofdo (disabled for now)
506
4d926e34
MS
5072016-06-10 Martin Sebor <msebor@redhat.com>
508
509 PR c/71392
510 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
511 attribute in type-generic builtins.
512
479f99c9
JH
5132016-05-16 Jan Hubicka <hubicka@ucw.cz>
514
515 * lto-partition.c (add_symbol_to_partition_1): Likewise.
516
1a0bf5e1
JH
5172016-05-03 Jan Hubicka <hubicka@ucw.cz>
518
519 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
520
a2e76867
PK
5212016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
522
523 * lto-partition.h (lto_balanced_map): New parameter.
524 * lto-partition.c (lto_balanced_map): New parameter
525 max_partition_size.
526 Check if partition size is greater than max_partition_size.
527 * lto.c (do_whole_program_analysis): Adjust calls to
528 lto_balanced_map() to pass 2nd argument.
529
ea913779
L
5302016-03-17 H.J. Lu <hongjiu.lu@intel.com>
531
532 PR lto/70258
533 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
534 PIE.
535
56aae4b7
JJ
5362016-03-08 Jakub Jelinek <jakub@redhat.com>
537
538 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
539 - becuase -> because.
540
ed5d948d
TV
5412016-02-15 Tom de Vries <tom@codesourcery.com>
542
543 PR lto/69655
544 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
545 argument.
546
4ecbadc7
ML
5472016-01-27 Martin Liska <mliska@suse.cz>
548
549 * lto-partition.c (add_symbol_to_partition_1): Remove usage
550 of hsa_summaries.
551
e49d321f
JH
5522016-01-19 Jan Hubicka <hubicka@ucw.cz>
553
554 PR lto/69136
555 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
556 decls have no assemblernames.
557
b2b40051 5582016-01-19 Martin Liska <mliska@suse.cz>
92a285c1 559 Martin Jambor <mjambor@suse.cz>
b2b40051
MJ
560
561 * lto-partition.c: Include "hsa.h"
562 (add_symbol_to_partition_1): Put hsa implementations into the
563 same partition as host implementations.
564
5803bd01
JH
5652016-01-12 Jan Hubicka <hubicka@ucw.cz>
566
567 PR lto/69003
568 * lto-partition.c (rename_statics): Fix pasto.
569
13092f61
RB
5702016-01-18 Richard Biener <rguenther@suse.de>
571
572 PR lto/69337
573 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
574 function vs. variable.
575
3c4e91c9
RB
5762016-01-12 Richard Biener <rguenther@suse.de>
577
578 PR lto/69077
579 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
580 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
581
818ab71a
JJ
5822016-01-04 Jakub Jelinek <jakub@redhat.com>
583
584 Update copyright years.
585
3fddb2ef
JH
5862015-12-10 Jan Hubicka <hubicka@ucw.cz>
587
588 PR lto/68878
589 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
590 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
591 (lto_symtab_prevailing_decl): Use it.
592
4a38b02b
IV
5932015-12-15 Ilya Verbin <ilya.verbin@intel.com>
594
595 * lto.c: Include stringpool.h and fold-const.h.
596 (offload_handle_link_vars): New static function.
597 (lto_main): Call offload_handle_link_vars.
598
ca834876
JH
5992015-12-10 Jan Hubicka <hubicka@ucw.cz>
600
601 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
602
958a627f
JH
6032015-12-11 Jan Hubicka <hubicka@ucw.cz>
604
605 PR ipa/61886
606 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
607 values of error and warning attributes.
608
da20571a
JH
6092015-12-08 Jan Hubicka <hubicka@ucw.cz>
610
611 PR lto/68811
612 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
613 DECL.
614 (LTO_NO_PREVAIL): Use gcc_checking_assert.
615
378004b9
JH
6162015-12-08 Jan Hubicka <hubicka@ucw.cz>
617
618 PR lto/68811
619 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
620 by itself.
621
6b9ac179
JH
6222015-12-08 Jan Hubicka <hubicka@ucw.cz>
623
624 PR ipa/61886
625 * lto-symtab.c: Include lto-symtab.h.
626 (lto_cgraph_replace_node): Do not merge profiles here.
627 (lto_symtab_merge_p): New function.
628 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
629 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
630 aliases.
631 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
632 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
633 * lto.c: Include lto-symtab.h
634 * lto-symtab.h: New.
635
41c60c6c
JH
6362015-12-08 Jan Hubicka <hubicka@ucw.cz>
637
638 PR ipa/61886
639 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
640 are not part of the definition.
641 (contained_in_symbol): Likewise.
642 (promote_symbol): When promoting a symbol also promote all transparent
643 aliases.
644 (rename_statics): Weakref needs unique name, too.
645
71e54687
JH
6462015-12-07 Jan Hubicka <hubicka@ucw.cz>
647
648 PR ipa/61886
649 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
650 rename_statics, rename_statics): Handle transparent aliases.
651
88636b62
JH
6522015-12-04 Jan Hubicka <hubicka@ucw.cz>
653
654 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
655 merged_comdat.
656
8c86248e
JH
6572015-12-01 Jan Hubicka <hubicka@ucw.cz>
658
659 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
660
1ff9ed6f
JH
6612015-11-25 Jan Hubicka <jh@suse.cz>
662
663 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
664 * lang.opt (lto_linker_output): New enum.
665 (flinker_output): New flag.
666
22bea0be
JH
6672015-11-24 Jan Hubicka <hubicka@ucw.cz>
668
669 * lto-symtab.c: Include alias.h
670 (warn_type_compatibility_p): Replace types_compatible_p checks by
671 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
672 (lto_symtab_merge): Compare DECL sizes.
673 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
674
aea50b45
JH
6752015-11-24 Jan Hubicka <hubicka@ucw.cz>
676
677 * lto.c (iterative_hash_canonical_type): Recruse for all types
678 which pass !canonical_type_used_p.
679 (gimple_register_canonical_type_1): Sanity check we do not compute
680 canonical type of anything with !canonical_type_used_p.
681 (gimple_register_canonical_type): Skip all types that are
682 !canonical_type_used_p
683
deb3dae6
JH
6842015-11-24 Jan Hubicka <hubicka@ucw.cz>
685
686 * lto.c (unify_scc): Use free_node.
687
f85d2487
JH
6882015-11-21 Jan Hubicka <hubicka@ucw.cz>
689
690 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
691 (gimple_register_canonical_type_1): Check that pointers do not get
692 canonical types.
693 (gimple_register_canonical_type): Do not register pointers.
694
6952015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
696
697 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
698 flag for types that are not ODR; fix loop walking parameters.
699
69f293c9
AM
7002015-11-11 Andrew MacLeod <amacleod@redhat.com>
701
702 * lto-lang.c: Remove unused header files.
703 * lto-object.c: Likewise.
704 * lto-partition.c: Likewise.
705 * lto-symtab.c: Likewise.
706 * lto.c: Likewise.
707
ee45a32d
EB
7082015-11-08 Eric Botcazou <ebotcazou@adacore.com>
709
710 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
711
0aad0198
RS
7122015-11-07 Richard Sandiford <richard.sandiford@arm.com>
713
714 * lto-lang.c: Don't undef DEF_BUILTIN.
715
2adfab87
AM
7162015-10-29 Andrew MacLeod <amacleod@redhat.com>
717
718 * lto-lang.c: Reorder #include's and remove duplicates.
719 * lto-object.c: Likewise.
720 * lto-partition.c: Likewise.
721 * lto-symtab.c: Likewise.
722 * lto.c: Likewise.
723
b2b29377
MM
7242015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
725
726 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
727 conditionals.
728 (lto_fixup_state): Likewise.
729 (do_whole_program_analysis): Use
730 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
731 conditionals.
732
d9a6bd32
JJ
7332015-10-13 Jakub Jelinek <jakub@redhat.com>
734
735 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
736 DEF_FUNCTION_TYPE_11): Define.
737
9c4eeafc
JH
7382015-10-10 Jan Hubicka <hubicka@ucw.cz>
739
740 * lto.c (hash_canonical_type): Honor
741 type_with_interoperable_signedness.
742
3e32ee19
NS
7432015-09-28 Nathan Sidwell <nathan@codesourcery.com>
744
745 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
746 (DEF_FUNCTION_TYPE_VAR_11): Delete.
747
f196d062
RB
7482015-08-31 Richard Biener <rguenther@suse.de>
749
750 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
751 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
752 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
753 participate in merging with something else.
754
45aee888
RB
7552015-08-31 Richard Biener <rguenther@suse.de>
756
757 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
758 test, do not replace a non-builtin with a builtin.
759 * lto.c (compare_tree_sccs_1): Do not merge things we stream
760 as builtins vs. non-builtins.
761
a79683d5
TS
7622015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
763
764 * lto.h: Remove useless typedefs.
765
48d859bb
AM
7662015-07-15 Andrew MacLeod <amacleod@redhat.com>
767
768 * lto.c: Remove redundant includes.
769
026c3cfd
AH
7702015-07-12 Aldy Hernandez <aldyh@redhat.com>
771
772 * lto-lang.c: Fix double word typos.
773
9fdcd34e
AM
7742015-07-10 Andrew MacLeod <amacleod@redhat.com>
775
776 * lto.c: Include cfghooks.h rather than predict.h.
777
f51ade33
AM
7782015-07-09 Andrew MacLeod <amacleod@redhat.com>
779
780 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
781 lto-streamer.h.
782 * lto-object.c: Likewise.
783 * lto-partition.c: Likewise.
784 * lto-symtab.c: Likewise.
785
1916bcb5
AM
7862015-07-09 Andrew MacLeod <amacleod@redhat.com>
787
788 * lto-lang.c: Adjust includes for flags.h changes.
789
c7131fb2
AM
7902015-07-07 Andrew MacLeod <amacleod@redhat.com>
791
792 * lto-lang.c: Adjust includes.
793 * lto-object.c: Likewise.
794 * lto-partition.c: Likewise.
795 * lto-symtab.c: Likewise.
796 * lto.c: Likewise.
797
f0889939
AM
7982015-06-25 Andrew MacLeod <amacleod@redhat.com>
799
800 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
801 * lto-object.c: Likewise.
802 * lto-partition.c: Likewise.
803 * lto-symtab.c: Likewise.
804 * lto-tree.h: Likewise.
805 * lto.c: Likewise.
806
8d67ee55
RS
8072015-06-25 Richard Sandiford <richard.sandiford@arm.com>
808
809 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
810 than typed_noop_remove. Remove redudant typedefs.
811
abb226c9
AM
8122015-06-17 Andrew MacLeod <amacleod@redhat.com>
813
814 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
815 * lto-object.c: Likewise.
816 * lto-partition.c: Likewise.
817 * lto-symtab.c: Likewise.
818 * lto.c: Likewise.
819
351d90f4
JH
8202015-06-14 Jan Hubicka <hubicka@ucw.cz>
821
822 PR ipa/66181
823 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
824
44c42705
DD
8252015-06-12 DJ Delorie <dj@redhat.com>
826
827 * lto-lang.c (lto_type_for_size): Include intN types.
828 (lto_type_for_mode): Likewise.
829
64578d98
JH
8302015-06-08 Jan Hubicka <hubicka@ucw.cz>
831
832 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
833
13fdf2e2
AM
8342015-06-08 Andrew MacLeod <amacleod@redhat.com>
835
836 * lto-lang.c : Adjust include files.
837 * lto-object.c : Likewise.
838 * lto-partition.c : Likewise.
839 * lto-partition.h : Likewise.
840 * lto-symtab.c : Likewise.
841 * lto.c : Likewise.
842 * lto.h : Likewise.
843
ccb5ad37
JH
8442015-06-06 Jan Hubicka <hubicka@ucw.cz>
845
6542950e
JH
846 PR lto/65378
847 * lto-symtab.c (warn_type_compatibility_p): Fix call of
848 odr_or_derived_type_p.
849 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
850
8512015-06-08 Jan Hubicka <hubicka@ucw.cz>
852
853
ccb5ad37
JH
854 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
855 pointers.
856
d7438551
AH
8572015-06-05 Aldy Hernandez <aldyh@redhat.com>
858
859 * lto-lang.c (lto_write_globals): Remove.
860 (LANG_HOOKS_WRITE_GLOBALS): Same.
861
ecb9f223
AM
8622015-06-04 Andrew MacLeod <amacleod@redhat.com>
863
864 * lto-lang.c: Adjust includes for restructured coretypes.h.
865 * lto-object.c: Likewise.
866 * lto-partition.c: Likewise.
867 * lto-symtab.c: Likewise.
868 * lto.c: Likewise.
869
9cb9b937
JH
8702015-06-04 Jan Hubicka <hubicka@ucw.cz>
871
872 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
873
93e2aa6d
JH
8742015-06-03 Jan Hubicka <hubicka@ucw.cz>
875
876 * lto.c (iterative_hash_canonical_type,
877 gimple_register_canonical_type): only hash main variants of types
878
faae53f8
ML
8792015-05-27 Martin Liska <mliska@suse.cz>
880
881 * lto-partition.c (new_partition): Reset number of symbols.
882 (add_symbol_to_partition_1): Increment number of symbols.
883 (undo_partition): Decrement number of symbols.
884 (lto_balanced_map): Dump number of symbols and insns that
885 belong to a partition.
886 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
887
b727ba74
JH
8882015-05-22 Jan Hubicka <hubicka@ucw.cz>
889
890 * lto.c (hash_canonical_type): Be sure we hash only types that
891 need alias set.
892 (gimple_register_canonical_type_1): Do not produce canonical
893 types for types that do not need alias sets.
894
1d1218fb
JH
8952015-05-22 Jan Hubicka <hubicka@ucw.cz>
896
897 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
898
872d5034
JH
8992015-05-19 Jan Hubicka <hubicka@ucw.cz>
900
901 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
902
259d29e3
JH
9032015-05-17 Jan Hubicka <hubicka@ucw.cz>
904
905 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
906 compare ODR types (if available) and function types.
907 (lto_symtab_merge): ... here; output ODR violation warnings
908 and call warn_types_mismatch.
909
b0845a1e
JH
9102015-04-29 Jan Hubicka <hubicka@ucw.cz>
911
912 * lto.c (lto_fixup_state): Call verify_type.
913
67f58944
TS
9142015-04-18 Trevor Saunders <tsaunders@mozilla.com>
915
b0845a1e 916 * lto.c: Adjust for hash_table changes.
67f58944 917
36ceb0e3
JH
9182015-03-27 Jan Hubicka <hubicka@ucw.cz>
919
920 * lto.c (lto_read_decls): Move code registering odr types out
921 of TYPE_CANONICAL conditional and also register polymorphic types.
922
afd1e7c6
JH
9232015-03-26 Jan Hubicka <hubicka@ucw.cz>
924
925 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
926 DECL_ARTIFICAL symbols.
927
eaeec5ec
JH
9282015-03-26 Jan Hubicka <hubicka@ucw.cz>
929
930 PR lto/65536
931 * lto.c (unify_scc): Revert location cache when unification
932 suceeded.
933 (lto_read_decls): Accept location cache after sucess;
934 apply location cache before calling debug hooks.
935
1c4db829
JH
9362015-03-10 Jan Hubicka <hubicka@ucw.cz>
937
938 * lto.c (read_cgraph_and_symbols): Do not do merging
939 at ltrans stage.
940
db847fa8
JJ
9412015-02-26 Jakub Jelinek <jakub@redhat.com>
942
943 * lto.c (lto_mode_identity_table): New variable.
944 (lto_read_decls): Add mode_table argument to the lto_input_block
945 constructor.
946 (lto_file_finalize): Initialize mode_table.
947 (lto_init): Initialize lto_mode_identity_table.
948
56a9f6bc
TS
9492015-02-24 Thomas Schwinge <thomas@codesourcery.com>
950
951 PR libgomp/64625
952 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
953 Remove macros.
954 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
955
ebc8f0bb
JH
9562015-02-03 Jan Hubicka <hubicka@ucw.cz>
957
958 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
959
40fecdd6
JM
9602015-01-30 Joseph Myers <joseph@codesourcery.com>
961
962 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
963 changed to pass input_location as first argument.
964
040968a8
JH
9652014-12-11 Jan Hubicka <hubicka@ucw.cz>
966
967 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
968
69fe4502
JH
9692014-12-11 Jan Hubicka <hubicka@ucw.cz>
970
971 * lto.c (compare_tree_sccs_1): Add comparsion of
972 DECL_FUNCTION_SPECIFIC_TARGET
973
41dbbb37
TS
9742015-01-15 Thomas Schwinge <thomas@codesourcery.com>
975 James Norris <jnorris@codesourcery.com>
976
977 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
978 New macros.
979 * lto.c: Include "gomp-constants.h".
980
837bac8c
IV
9812015-01-14 Ilya Verbin <ilya.verbin@intel.com>
982
983 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
984 from select_what_to_stream.
985
1b34e6e2
BS
9862015-01-09 Bernd Schmidt <bernds@codesourcery.com>
987 Jakub Jelinek <jakub@redhat.com>
988
989 PR middle-end/64412
990 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
991 if ACCEL_COMPILER.
992
adfac8df
JJ
9932015-01-09 Michael Collison <michael.collison@linaro.org>
994
995 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
996 input.h, alias.h, symtab.h, options, fold-const.h,
997 wide-int.h, and inchash.h due to flattening of tree.h.
998 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
999 input.h, alias.h, symtab.h, fold-const.h,
1000 wide-int.h, and inchash.h due to flattening of tree.h.
1001 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1002 input.h, alias.h, symtab.h, options, fold-const.h,
1003 wide-int.h, and inchash.h due to flattening of tree.h.
1004 * lto-partition.c: Ditto.
1005 * lto-symtab.c: Ditto.
1006
5624e564
JJ
10072015-01-05 Jakub Jelinek <jakub@redhat.com>
1008
1009 Update copyright years.
1010
9a1e784a
ML
10112014-12-22 Martin Liska <mliska@suse.cz>
1012
1013 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1014 is used.
1015 (undo_partition): Likewise.
1016 (lto_balanced_map): Likewise.
1017
dd912cb8
ML
10182014-12-22 Martin Liska <mliska@suse.cz>
1019
1020 * lto-partition.c: Include of symbol-summary.h is added.
1021 * lto-symtab.c: Likewise.
1022 * lto.c: Likewise.
1023
17e0fc92
JH
10242014-12-11 Jan Hubicka <hubicka@ucw.cz>
1025
1026 PR ipa/61324
1027 * lto.c (read_cgraph_and_symbols): Update call of
1028 remove_unreachable_nodes.
1029 (do_whole_program_analysis): Remove call of
1030 symtab->remove_unreachable_nodes
1031
58dddbd2
TS
10322014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1033
1034 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1035 htab with malloc instead of ggc.
1036
907dadbd
TS
10372014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1038
1039 * lto.c: Replace htab with hash_table.
1040
9c71e9df
TS
10412014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1042
1043 * lto.c (lto_read_in_decl_state): Adjust.
1044 (lto_fixup_state): Likewise.
1045
72a4a8b0
JH
10462014-11-17 Jan Hubicka <hubicka@ucw.cz>
1047
1048 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1049
54e774c0
JH
10502014-11-14 Jan Hubicka <hubicka@ucw.cz>
1051
1052 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1053
1f6be682
IV
10542014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1055 Bernd Schmidt <bernds@codesourcery.com>
1056 Andrey Turetskiy <andrey.turetskiy@intel.com>
1057 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1058
ec6fe917
IV
1059 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1060
10612014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1062 Ilya Tocar <ilya.tocar@intel.com>
1063 Andrey Turetskiy <andrey.turetskiy@intel.com>
1064 Bernd Schmidt <bernds@codesourcery.com>
1065
1f6be682
IV
1066 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1067 LTO_SECTION_NAME_PREFIX.
1068 * lto-partition.c (lto_promote_cross_file_statics): Call
1069 select_what_to_stream.
1070 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1071 LTO_SECTION_NAME_PREFIX.
1072 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1073 being built as an offload compiler.
1074
ef4bddc2
RS
10752014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1076
1077 * lto-lang.c: Remove redundant enum from machine_mode.
1078
c582198b
AM
10792014-10-28 Andrew MacLeod <amacleod@redhat.com>
1080
1081 * lto.c: Adjust include files.
1082 * lto-lang.c: Ditto.
1083 * lto-object.c: Ditto.
1084 * lto-partition.c: Ditto.
1085 * lto-symtab.c: Ditto.
1086
60393bbc
AM
10872014-10-27 Andrew MacLeod <amacleod@redhat.com>
1088
1089 * lto-lang.c: Adjust include files.
1090 * lto-object.c: Ditto.
1091 * lto-partition.c: Ditto.
1092 * lto-symtab.c: Ditto.
1093 * lto.c: Ditto.
1094
957f47e6
DD
10952014-10-16 DJ Delorie <dj@redhat.com>
1096
1097 * lto-object.c (lto_obj_begin_section): In the event that pointer
1098 sizes aren't powers of two, choose a more suitable alignment
1099 than (unsigned)(-1).
1100
78a7c317
DD
11012014-10-14 DJ Delorie <dj@redhat.com>
1102
1103 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1104 size-type as well.
1105 (lto_init): Initialize all intN types, not just int128.
1106
70261a4f
ML
11072014-10-06 Martin Liska <mliska@suse.cz>
1108
1109 * lto.c (stream_out): ARG_UNUSED added for last argument.
1110
00de328a
AH
11112014-09-24 Aldy Hernandez <aldyh@redhat.com>
1112
1113 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1114 DECL_ABSTRACT_P.
1115
7861b648
AK
11162014-09-23 Andi Kleen <ak@linux.intel.com>
1117
1118 * lto-partition.c (node_cmp): Update comment.
1119 (varpool_node_cmp): Use symtab_node for comparison.
1120 (add_sorted_nodes): New function.
1121 (lto_balanced_map): Change to keep ordered queue
1122 of ordered node. Handle no_reorder attribute.
1123
1ee85ee1
JH
11242014-09-11 Jan Hubicka <hubicka@ucw.cz>
1125
1126 * lto.c (lto_read_decls): Register ODR types.
1127
8605403e
JH
11282014-08-20 Jan Hubicka <hubicka@ucw.cz>
1129
1130 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1131 call.
1132 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1133
56b1f114
JH
11342014-08-14 Jan Hubicka <hubicka@ucw.cz>
1135
1136 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1137
833f94c0
RB
11382014-08-14 Richard Biener <rguenther@suse.de>
1139
1140 PR lto/62067
1141 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1142
207c68cd
RB
11432014-08-08 Richard Biener <rguenther@suse.de>
1144
1145 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1146
7c581d61
BC
11472014-08-08 Bin Cheng <bin.cheng@arm.com>
1148
1149 PR lto/62032
1150 * lto-lang.c (lto_init): Switch mis-matched arguments.
1151
39c8aaa4
TS
11522014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1153
1154 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1155
6e2830c3
TS
11562014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1157
1158 * lto-partition.c, lto-partition.h: Use hash_set instead of
1159 pointer_set.
1160
50de5793
AK
11612014-07-31 Andi Kleen <ak@linux.intel.com>
1162
1163 * lto.c (hash_canonical_type): Use inchash::hash
1164 and use inchash::add_expr.
1165 (iterative_hash_canonical_type): Dito.
1166
f6bcdb5e
RB
11672014-07-30 Richard Biener <rguenther@suse.de>
1168
1169 * lto-streamer.h (lto_write_data): New function.
1170 * langhooks.c (lhd_append_data): Do not free block.
1171 * lto-section-out.c (lto_write_data): New function writing
1172 raw data to the current section.
1173 (lto_write_stream): Adjust for langhook semantic change.
1174 (lto_destroy_simple_output_block): Write header directly.
1175 * lto-opts.c (lto_write_options): Write options directly.
1176 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1177 (lto_output_toplevel_asms): Likewise.
1178 (copy_function_or_variable): Copy data directly.
1179 (write_global_references): Output index table directly.
1180 (lto_output_decl_state_refs): Likewise.
1181 (write_symbol): Write data directly.
1182 (produce_symtab): Adjust.
1183 (produce_asm_for_decls): Output header and refs directly.
1184
56fdfd3e
AK
11852014-07-25 Andi Kleen <ak@linux.intel.com>
1186
1187 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1188
0bd8bb04
AK
11892014-07-25 Andi Kleen <ak@linux.intel.com>
1190
1191 * lto.c (hash_canonical_type): Convert to inchash.
1192 (iterative_hash_canonical_type): Dito.
1193
6d8eb96b
AK
11942014-07-25 Andi Kleen <ak@linux.intel.com>
1195
1196 * lto.c: Include inchash.h
1197
ad115a3c
JH
11982014-07-14 Jan Hubicka <hubicka@ucw.cz>
1199
1200 * lto.c (mentions_vars_p_decl_non_common): Skip
1201 DECL_ARGUMENT_FLD.
1202 mentions_vars_p_function): Do DECL_ARGUMENTS.
1203 (lto_fixup_prevailing_decls): Update.
1204
917dd9bf
JH
12052014-07-12 Jan Hubicka <hubicka@ucw.cz>
1206
1207 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1208 timevar
1209 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1210
0b83e688
JH
12112014-07-11 Jan Hubicka <hubicka@ucw.cz>
1212
1213 * lto-partition.c (add_references_to_partition): Use
1214 varpool_ctor_useable_for_folding_p.
1215 * lto.c (lto_read_in_decl_state): Update sanity check.
1216
e55637b7
ML
12172014-07-01 Martin Liska <mliska@suse.cz>
1218
1219 IPA REF alias refactoring
1220 * lto-partition.c (add_symbol_to_partition_1): Usage of
1221 FOR_EACH_ALIAS added.
1222
010f4e27
JH
12232014-06-28 Jan Hubicka <hubicka@ucw.cz>
1224
1225 Revert:
1226 * lto.c (lto_copy_fields_not_streamed): New function.
1227 (compare_tree_sccs_1): Do not compare fields shared in between type
1228 and variant.
1229 (lto_read_decls): Fixup types first before inserting into hash.
1230
b82fe354
AP
12312014-06-28 Andrew Pinski <apinski@cavium.com>
1232
1233 * lto.c (lto_read_decls): Fix comment in comment.
1234
288eeff7
JH
12352014-06-28 Jan Hubicka <hubicka@ucw.cz>
1236
1237 * lto.c (lto_copy_fields_not_streamed): New function.
1238 (compare_tree_sccs_1): Do not compare fields shared in between type
1239 and variant.
1240 (lto_read_decls): Fixup types first before inserting into hash.
1241
e01fa630
ML
12422014-06-25 Martin Liska <mliska@suse.cz>
1243
1244 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
1245 used.
1246 (add_symbol_to_partition_1): Likewise.
1247 (lto_balanced_map): Likewise.
1248 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
1249
aaf8a23e
JH
12502014-06-24 Jan Hubicka <hubicka@ucw.cz>
1251
1252 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1253 (mentions_vars_p_function): ... here.
1254 (compare_tree_sccs_1): Update VINDEX checks.
1255 (lto_fixup_prevailing_decls): Likewise.
1256
1eb68d2d
TS
12572014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1258
1259 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1260 pointer_map.
1261
c203e8a7
TS
12622014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1263
1264 * lto.c: Adjust.
1265
714c800f
JH
12662014-06-20 Jan Hubicka <hubicka@ucw.cz>
1267
1268 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1269
569b1784
JH
12702014-06-20 Jan Hubicka <hubicka@ucw.cz>
1271
1272 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1273
56363ffd
JH
12742014-06-15 Jan Hubicka <hubicka@ucw.cz>
1275
1276 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1277
e257a17c
JH
12782014-06-10 Jan Hubicka <hubicka@ucw.cz>
1279
1280 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1281 (do_whole_program_analysis): Use verify_symtab.
1282
24d047a3
JH
12832014-06-07 Jan Hubicka <hubicka@ucw.cz>
1284
1285 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1286 lto_fixup_prevailing_decls): Skip section names.
1287
9b2b7279
AM
12882014-06-02 Andrew MacLeod <amacleod@redhat.com>
1289
1290 * lto-symtab.c: Include builtins.h.
1291
a9243bfc
RB
12922014-05-26 Richard Biener <rguenther@suse.de>
1293
1294 * lto.c (lto_parse_hex): Use int64_t.
1295 (lto_resolution_read): Likewise.
1296
fd1e9302
JH
12972014-05-23 Jan Hubicka <hubicka@ucw.cz>
1298
1299 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1300
aede2c10
JH
13012014-05-23 Jan Hubicka <hubicka@ucw.cz>
1302
1303 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1304 symtab pointer.
1305 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1306
f6a7cffc
TS
13072014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1308
1309 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1310 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1311 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1312
4000360e
BS
13132012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1314
1315 * lto-object.c: Include "lto-section-names.h".
1316 (LTO_SEGMENT_NAME): Don't define.
1317 * lto.c: Include "lto-section-names.h".
1318
b9559136
JH
13192014-05-17 Jan Hubicka <hubicka@ucw.cz>
1320
1321 PR lto/61012
1322 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1323 mixed with variables.
1324
766090c2
TS
13252014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1326
1327 * lto-tree.h: Don't use variable_size gty attribute.
1328 * lto.c (lto_read_in_decl_state): Adjust.
1329 (create_subid_section_table): Likewise.
1330 (lto_flatten_files): Likewise.
1331 (read_cgraph_and_symbols): Likewise.
1332
1d60af08
KZ
13332014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1334 Mike Stump <mikestump@comcast.net>
1335 Richard Sandiford <rdsandiford@googlemail.com>
1336
1337 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1338 * lto-lang.c (get_nonnull_operand): Likewise.
1339
22869a37
RB
13402014-04-28 Richard Biener <rguenther@suse.de>
1341
1342 PR middle-end/60092
1343 * lto-lang.c: Define flag_isoc11.
1344
7de90a6c
DM
13452014-04-23 David Malcolm <dmalcolm@redhat.com>
1346
1347 * lto-partition.c (add_references_to_partition): Update for
1348 removal of implicit pointer from the is-a.h API.
1349 (add_symbol_to_partition_1): Likewise.
1350 (contained_in_symbol): Likewise.
1351 (undo_partition): Likewise.
1352 (lto_balanced_map): Likewise.
1353 (promote_symbol): Likewise.
1354 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1355 (lto_symtab_merge_symbols): Likewise.
1356 * lto.c (lto_wpa_write_files): Likewise.
1357
783dab6b
RB
13582014-04-15 Richard Biener <rguenther@suse.de>
1359
1360 * lto.c: Include params.h.
1361 (do_whole_program_analysis): Switch on flag_lto_partition value,
1362 add support for LTO_PARTITION_ONE.
1363 * lto-partition.h (lto_balanced_map): Adjust.
1364 * lto-partition.c (lto_balanced_map): Get number of desired
1365 partitions as argument to support -flto-partition=one.
1366
cb90235d
JH
13672014-04-14 Jan Hubicka <hubicka@ucw.cz>
1368
1369 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1370 tp_first_run.
1371
bbe281da
JH
13722014-03-19 Jan Hubicka <hubicka@ucw.cz>
1373
1374 * lto.c: Include ipa-inline.h
1375 (do_whole_program_analysis): Free inline summary after partitioning.
1376
ce2f49b3
RB
13772014-03-19 Richard Biener <rguenther@suse.de>
1378
1379 PR middle-end/60553
1380 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1381 instead of TREE_CHAIN as chain_next.
1382
e41106fc
RB
13832014-03-19 Richard Biener <rguenther@suse.de>
1384
1385 * lto.c (lto_wpa_write_files): Move call to
1386 lto_promote_cross_file_statics ...
1387 (do_whole_program_analysis): ... here, into the partitioning
1388 block. Do not ggc_collect after lto_wpa_write_files but
1389 for a last time before it.
1390
15df2655
JJ
13912014-03-19 Jakub Jelinek <jakub@redhat.com>
1392
1393 PR lto/60571
1394 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1395 Fix formatting.
1396
415e2e6b
JJ
13972014-03-18 Jakub Jelinek <jakub@redhat.com>
1398
1399 PR sanitizer/60535
1400 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1401 and complex_{float,{,long_}double}_type_node.
1402
f42c637e
PM
14032014-03-08 Paulo Matos <paulo@matos-sorge.com>
1404
415e2e6b
JJ
1405 * lto-lang.c (lto_init): Pass flag_short_double to
1406 build_common_tree_nodes.
f42c637e 1407
6dab804d
JH
14082014-02-14 Jan Hubicka <hubicka@ucw.cz>
1409
1410 PR lto/60295
1411 * lto.c (stream_out): Avoid parallel streaming with
1412 -flto=jobserver until we are able to throttle it down
1413 resonably.
1414
39434bce
JH
14152014-02-14 Jan Hubicka <hubicka@ucw.cz>
1416
1417 * lto-partition.c (add_symbol_to_partition_1,
1418 undo_partition, lto_balanced_map): Aliases have no
1419 defined size.
1420 (lto_balanced_map): Do not follow refering variables
1421 if they can be optimized out.
1422
1966fd99
RB
14232014-02-14 Richard Biener <rguenther@suse.de>
1424
1425 PR lto/60179
1426 * lto.c (compare_tree_sccs_1): Do not compare
1427 DECL_FUNCTION_SPECIFIC_TARGET.
1428 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1429
283416b3
RB
14302014-02-12 Richard Biener <rguenther@suse.de>
1431
1432 PR lto/60060
1433 * lto-lang.c (lto_write_globals): Do not call
1434 wrapup_global_declarations or emit_debug_global_declarations
1435 but emit debug info for non-function scope variables
1436 directly.
1437
b7e85694
JH
14382014-02-06 Jan Hubicka <hubicka@ucw.cz>
1439
1440 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1441
96451279
JH
14422014-02-06 Jan Hubicka <hubicka@ucw.cz>
1443
1444 PR ipa/59469
1445 * lto-partition.c (symbol_class): Move to cgraph.h
1446 (get_symbol_class): Move to symtab.c
1447 (add_references_to_partition, add_symbol_to_partition_1,
1448 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1449 lto_promote_cross_file_statics): Update.
1450
f300e7b8
JH
14512014-02-05 Jan Hubicka <hubicka@ucw.cz>
1452
1453 * lto.c (lto_parallelism): New static var.
1454 (do_stream_out, wait_for_child, stream_out): New static functions.
1455 (lto_wpa_write_files): Add support for parallel streaming.
1456 (do_whole_program_analysis): Set parallelism.
1457 * lang.opt (fwpa): Add parameter.
1458 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1459 (lto_init): Update use of flag_wpa.
1460 * lto-streamer.h (asm_nodes_output): Declare.
1461
f0f91770
RB
14622014-02-05 Richard Biener <rguenther@suse.de>
1463
1464 * lto.h (lto_global_var_decls): Remove.
1465 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1466 (lto_write_globals): Do nothing in WPA stage, gather globals from
1467 the varpool here ...
1468 * lto.c (lto_main): ... not here.
1469 (materialize_cgraph): Do not call rest_of_decl_compilation
1470 on the empty lto_global_var_decls vector.
1471 (lto_global_var_decls): Remove.
1472
d665f8dd
JH
14732014-02-04 Jan Hubicka <hubicka@ucw.cz>
1474
1475 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1476 needs duplicating, not generic COMDAT.
1477
c39276b8
RB
14782014-02-04 Richard Biener <rguenther@suse.de>
1479
1480 PR lto/59723
1481 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1482 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1483
5f876ae7
JH
14842014-02-04 Jan Hubicka <hubicka@ucw.cz>
1485 Markus Trippelsdorf
1486
1487 PR ipa/59469
1488 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1489 merge force_output and forced_by_abi flags.
1490
b72271b9
BI
14912014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1492
1493 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1494 flag_cilkplus.
1495
63124c48
RB
14962014-01-09 Richard Biener <rguenther@suse.de>
1497
1498 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1499
d05b9920
RB
15002014-01-09 Richard Biener <rguenther@suse.de>
1501
1502 PR lto/45586
1503 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1504 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1505 (gimple_canonical_types_compatible_p): Do not compare them either.
1506
23a5b65a
RS
15072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1508
1509 Update copyright years
1510
2c8326a5
OE
15112013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1512
1513 * lto.c: Remove struct tags when referring to class varpool_node.
1514 * lto-partition.c: Likewise.
1515 * lto-symtab.c: Likewise.
1516
e06f9964
JJ
15172013-11-29 Jakub Jelinek <jakub@redhat.com>
1518 Richard Biener <rguenther@suse.de>
1519
1520 PR lto/59326
1521 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1522
c193f58b
JJ
15232013-11-29 Jakub Jelinek <jakub@redhat.com>
1524
1525 PR lto/59326
1526 * lto.c (mentions_vars_p_omp_clause): New function.
1527 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1528 after return stmts.
1529
2fb9a547
AM
15302013-11-22 Andrew MacLeod <amacleod@redhat.com>
1531
1532 * lto.c: Add required include files from gimple.h.
1533 * lto-lang.c: Likewise
1534 * lto-object.c: Likewise
1535 * lto-partition.c: Likewise
1536 * lto-symtab.c: Likewise
1537
fec39fa6
TS
15382013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1539
1540 * lto-partition.c lto-symtab.c lto.c Adjust.
1541
d8a2d370
DN
15422013-11-14 Diego Novillo <dnovillo@google.com>
1543
1544 * lto-lang.c: Include stringpool.h.
1545 Include stor-layout.h.
1546 * lto-partition.c: Include gcc-symtab.h.
1547 * lto.c: Include stor-layout.h.
1548
5e20cdc9
DM
15492013-10-31 David Malcolm <dmalcolm@redhat.com>
1550
1551 Automated part of renaming of symtab_node_base to symtab_node.
1552
1553 Patch autogenerated by rename_symtab.py from
1554 https://github.com/davidmalcolm/gcc-refactoring-scripts
1555 revision 58bb219cc090b2f4516a9297d868c245495ee622
1556
1557 * lto-partition.c (add_symbol_to_partition): Rename
1558 symtab_node_base to symtab_node.
1559 (get_symbol_class): Likewise.
1560 (symbol_partitioned_p): Likewise.
1561 (add_references_to_partition): Likewise.
1562 (add_symbol_to_partition_1): Likewise.
1563 (contained_in_symbol): Likewise.
1564 (add_symbol_to_partition): Likewise.
1565 (lto_1_to_1_map): Likewise.
1566 (lto_max_map): Likewise.
1567 (lto_balanced_map): Likewise.
1568 (privatize_symbol_name): Likewise.
1569 (promote_symbol): Likewise.
1570 (may_need_named_section_p): Likewise.
1571 (rename_statics): Likewise.
1572 (lto_promote_statics_nonwpa): Likewise.
1573 * lto-symtab.c (lto_symtab_merge): Likewise.
1574 (lto_symtab_resolve_replaceable_p): Likewise.
1575 (lto_symtab_symbol_p): Likewise.
1576 (lto_symtab_resolve_can_prevail_p): Likewise.
1577 (lto_symtab_resolve_symbols): Likewise.
1578 (lto_symtab_merge_decls_2): Likewise.
1579 (lto_symtab_merge_decls_1): Likewise.
1580 (lto_symtab_merge_decls): Likewise.
1581 (lto_symtab_merge_symbols_1): Likewise.
1582 (lto_symtab_merge_symbols): Likewise.
1583 (lto_symtab_prevailing_decl): Likewise.
1584 * lto.c (lto_wpa_write_files): Likewise.
1585 (read_cgraph_and_symbols): Likewise.
1586 (do_whole_program_analysis): Likewise.
1587
378cd6b1
DM
15882013-10-30 David Malcolm <dmalcolm@redhat.com>
1589
1590 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1591 declarations onto multiple lines to make things easier for
1592 rename_symtab.py.
1593 (lto_symtab_merge_decls_1): Likewise.
1594 (lto_symtab_merge_symbols_1): Likewise.
1595
939b37da
BI
15962013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1597
1598 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1599 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1600 Plus is enabled.
1601
67348ccc
DM
16022013-10-29 David Malcolm <dmalcolm@redhat.com>
1603
1604 Patch autogenerated by refactor_symtab.py from
1605 https://github.com/davidmalcolm/gcc-refactoring-scripts
1606 revision 58bb219cc090b2f4516a9297d868c245495ee622
1607
1608 * lto-partition.c (lto_promote_cross_file_statics): Update for
1609 conversion of symtab types to a true class hierarchy.
1610 (rename_statics): Likewise.
1611 (promote_symbol): Likewise.
1612 (privatize_symbol_name): Likewise.
1613 (lto_balanced_map): Likewise.
1614 (varpool_node_cmp): Likewise.
1615 (node_cmp): Likewise.
1616 (lto_1_to_1_map): Likewise.
1617 (undo_partition): Likewise.
1618 (add_symbol_to_partition): Likewise.
1619 (contained_in_symbol): Likewise.
1620 (add_symbol_to_partition_1): Likewise.
1621 (add_references_to_partition): Likewise.
1622 (symbol_partitioned_p): Likewise.
1623 (get_symbol_class): Likewise.
1624 (lto_max_map): Likewise.
1625 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1626 (lto_symtab_merge_symbols): Likewise.
1627 (lto_symtab_merge_symbols_1): Likewise.
1628 (lto_symtab_merge_decls): Likewise.
1629 (lto_symtab_merge_decls_1): Likewise.
1630 (lto_symtab_merge_decls_2): Likewise.
1631 (lto_symtab_resolve_symbols): Likewise.
1632 (lto_symtab_resolve_can_prevail_p): Likewise.
1633 (lto_symtab_symbol_p): Likewise.
1634 (lto_symtab_resolve_replaceable_p): Likewise.
1635 (lto_symtab_merge): Likewise.
1636 (lto_varpool_replace_node): Likewise.
1637 (lto_cgraph_replace_node): Likewise.
1638 * lto.c (lto_main): Likewise.
1639 (do_whole_program_analysis): Likewise.
1640 (materialize_cgraph): Likewise.
1641 (read_cgraph_and_symbols): Likewise.
1642 (cmp_partitions_order): Likewise.
1643 (lto_materialize_function): Likewise.
1644 (has_analyzed_clone_p): Likewise.
1645
8e9055ae
AM
16462013-10-29 Andrew MacLeod <amacleod@redhat.com>
1647
1648 * lto/lto-object.c: Add gimple.h to include list.
1649 * lto/lto-partition.c: Likewise.
1650
377d9792
AM
16512013-10-18 Andrew MacLeod <amacleod@redhat.com>
1652
1653 * lto.c: Remove tree-flow.h from include list.
1654
fffda8d7
RB
16552013-10-15 Richard Biener <rguenther@suse.de>
1656
1657 * lto.c (hash_canonical_type): Split out from ...
1658 (iterative_hash_canonical_type): ... here. Register types
1659 we recurse to.
1660 (gimple_canonical_type_hash): Adjust.
1661 (gimple_register_canonical_type_1): Split out from ...
1662 (gimple_register_canonical_type): ... here. Cache computed
1663 hash value.
1664 (lto_register_canonical_types): Split into two modes,
1665 clearing and computing TYPE_CANONICAL.
1666 (lto_read_decls): Adjust.
1667 (read_cgraph_and_symbols): Do two passes over global trees,
1668 first clearing then computing TYPE_CANONICAL.
1669
1394237e
RB
16702013-10-14 Richard Biener <rguenther@suse.de>
1671
1672 * lto.c (gimple_canonical_types): Move out-of GC space.
1673 (canonical_type_hash_cache): Make a pointer-map.
1674 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1675 New counters.
1676 (iterative_hash_canonical_type): Adjust.
1677 (read_cgraph_and_symbols): Likewise.
1678 (print_lto_report_1): Likewise.
1679
0a387eca
RB
16802013-10-14 Richard Biener <rguenther@suse.de>
1681
1682 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1683 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1684 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1685 gimple_types_compatible_p_1, gimple_types_compatible_p,
1686 visit, iterative_hash_name, struct type_hash_pair,
1687 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1688 gimple_type_eq, gimple_register_type, num_not_merged_types,
1689 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1690 num_not_merged_types_in_same_scc_trees): Remove old merging code
1691 and statistics.
1692 (lto_read_decls): Do not run old merging code in parallel.
1693 (read_cgraph_and_symbols): Do not init/free old merging
1694 data structures.
1695 (print_lto_report_1): Do not report differences of old vs. new
1696 merging code.
1697
83fd5d11
RB
16982013-10-14 Richard Biener <rguenther@suse.de>
1699
1700 * lto-lang.c (lto_init): Do not re-init canonical types here.
1701 (lto_register_canonical_types): Move to ...
1702 * lto.c (lto_register_canonical_types): ... here.
1703 (gimple_canonical_types, canonical_type_hash_cache,
1704 iterative_hash_canonical_type, gimple_canonical_type_hash,
1705 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1706 gimple_register_canonical_type): Add canonical type merging machinery
1707 moved from gimple.c.
1708 (read_cgraph_and_symbols): Init and free canonical type tables
1709 here.
1710 (print_lto_report_1): Report canonical type table stats here.
1711
acf0174b
JJ
17122013-10-11 Jakub Jelinek <jakub@redhat.com>
1713
1714 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1715
7c6fedd2
TT
17162013-09-25 Tom Tromey <tromey@redhat.com>
1717
1718 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1719 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1720 (lto/lto-object.o): Remove.
1721
35f32ad4
RB
17222013-09-06 Richard Biener <rguenther@suse.de>
1723
1724 * lto-symtab.c: Move from gcc/
1725 * lto.h: Include vec.h.
1726 (lto_global_var_decls): Declare.
1727 * lto.c (lto_global_var_decls): Move definition here.
1728 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1729 (lto-symtab.o): Add.
1730 * config-lang.in (gtfiles): Add lto.h.
1731
49322b12
JH
17322013-08-31 Jan Hubicka <jh@suse.cz>
1733
1734 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1735 DECL_FIELD_OFFSET can contain an reference to variable.
1736
31f1f73b
JH
17372013-08-31 Jan Hubicka <jh@suse.cz>
1738
1739 * lto.c (tree_with_vars): Turn into vector.
1740 (MAYBE_REMEMBER_WITH_VARS): Change to...
1741 (CHECK_VAR): ... this one.
1742 (CHECK_NO_VAR): New macro.
1743 (maybe_remember_with_vars_typed): Turn to ...
1744 (mentions_vars_p_typed): ... this one.
1745 (maybe_remember_with_vars_common): Turn to ...
1746 (mentions_vars_p_comon): ... this one.
1747 (maybe_remember_with_vars_decl_minimal): Turn to ...
1748 (mentions_vars_p_decl_minmal): ... this one.
1749 (maybe_remember_with_vars_decl_common): Turn to ...
1750 (mentions_vars_p_decl_common): ... this one.
1751 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1752 (mentions_vars_p_decl_with_vis): ... this one.
1753 (maybe_remember_with_vars_decl_non_common): Turn to ...
1754 (mentions_vars_p_decl_non_common): ... this one.
1755 (maybe_remember_with_vars_function): Turn to ...
1756 (mentions_vars_p_function): ... this one.
1757 (maybe_remember_with_vars_field_decl): Turn to ...
1758 (mentions_vars_p_field_decl): ... this one.
1759 (maybe_remember_with_vars_type): Turn to ...
1760 (mentions_vars_p_type): ... this one.
1761 (maybe_remember_with_vars_binfo): Turn to ...
1762 (mentions_vars_p_binfo): ... this one.
1763 (maybe_remember_with_vars_constructor): Turn to ...
1764 (mentions_vars_p_constructor): ... this one.
1765 (maybe_remember_with_vars_expr): Turn to ...
1766 (mentions_vars_p_expr): ... this one.
1767 (maybe_remember_with_vars): Turn to ...
1768 (mentions_vars_p): ... this one.
1769 (lto_read_decls): Update.
1770 (LTO_SET_PREVAIL): Do not call function for internal decls.
1771 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1772 check that something was updated.
1773 (lto_fixup_state): Do not care about internal decls.
1774 (lto_fixup_decls): Update.
1775 (read_cgraph_and_symbols): Update.
1776
256eefa9
JH
17772013-08-29 Jan Hubicka <jh@suse.cz>
1778
1779 * lto.c (read_cgraph_and_symbols): Free decl states.
1780
0170f33c
JH
17812013-08-29 Jan Hubicka <jh@suse.cz>
1782
1783 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1784 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1785 TYPE_FINAL_P.
1786
c01c111b
JH
17872013-08-28 Jan Hubicka <jh@suse.cz>
1788
1789 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1790 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1791 (unify_scc): Do checking assert.
1792
6a49f3c9
JH
17932013-08-06 Jan Hubicka <jh@suse.cz>
1794 Martin Liska <marxin.liska@gmail.com>
1795
1796 * lto-partition.c (lto_balanced_map): Always base order on
1797 source file order.
1798
a2e2a668
JH
17992013-08-06 Jan Hubicka <jh@suse.cz>
1800
1801 * lto.c (lto_materialize_function): Do not read body anymore.
1802
815effe1
JH
18032013-08-02 Jan Hubicka <jh@suse.cz>
1804
1805 * lto.c (lto_materialize_function): Do not push struct function.
1806 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1807 (may_need_named_section_p): Even abstract origins may need
1808 named section.
1809
315f8c0e
DM
18102013-07-30 David Malcolm <dmalcolm@redhat.com>
1811
1812 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1813 PASS_MANAGER_H.
1814
1815 * lto.c (do_whole_program_analysis): Update for move of
1816 all_regular_ipa_passes from a global to a field of class
1817 pass_manager.
1818
1aa95df7
OB
18192013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1820
1821 * lto-partition.c: Fix typos.
1822
c525ba9a
JH
18232013-06-20 Jan Hubicka <jh@suse.cz>
1824
1825 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1826 partitioning of variables.
1827
7a89ad00
JH
18282013-06-20 Jan Hubicka <jh@suse.cz>
1829
1830 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1831
6a6dac52
JH
18322013-06-19 Jan Hubicka <jh@suse.cz>
1833
1834 * lto-partition.c (add_references_to_partition): Use
1835 ctor_for_folding.
1836
ac0511f2
RB
18372013-06-18 Richard Biener <rguenther@suse.de>
1838
1839 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1840 and use it.
1841 (lto_register_function_decl_in_symtab): Likewise.
1842 (cmp_tree): New function.
1843 (unify_scc): Instead of using the streamer cache map from entry
1844 to cache index match up the two maps we have by sorting them.
1845 Adjust calls to lto_register_var_decl_in_symtab and
1846 lto_register_function_decl_in_symtab.
1847
ee03e71d
RB
18482013-06-17 Richard Biener <rguenther@suse.de>
1849
1850 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1851 * lto.c: Include data-streamer.h.
1852 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1853 (gimple_type_leader_entry_s, gimple_type_leader,
1854 gimple_lookup_type_leader): Remove.
1855 (gtc_visit): Simplify.
1856 (gimple_types_compatible_p): Likewise.
1857 (gimple_register_type_1): Likewise. Merge into ...
1858 (gimple_register_type): ... this. Keep it as legacy for
1859 statistics purposes for now.
1860 (fixup_integer_cst): Remove.
1861 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1862 rename to ...
1863 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1864 maybe_remember_with_vars_*): ... these.
1865 (uniquify_nodes): Remove.
1866 (lto_fixup_prevailing_type): New function.
1867 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1868 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1869 (num_merged_types, num_prevailing_types, num_not_merged_types,
1870 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1871 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1872 num_scc_compare_collisions): New global counters.
1873 (compare_tree_sccs_1): New function.
1874 (compare_tree_sccs): Likewise.
1875 (unify_scc): Likewise.
1876 (lto_read_decls): Stream in tree SCCs and unify them on the
1877 way in. Finalize prevailing SCC tree members.
1878 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1879 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1880 to ggc-collect during merging.
1881 (print_lto_report_1): Adjust for new merging code.
1882
ca0f62a8
JH
18832013-06-12 Jan Hubicka <jh@suse.cz>
1884
1885 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1886
bbf9ad07
JH
18872013-06-12 Jan Hubicka <jh@suse.cz>
1888
1889 * lto.c (register_resolution): Take lto_file_data argument.
1890 (lto_register_var_decl_in_symtab,
1891 lto_register_function_decl_in_symtab): Update.
1892 (read_cgraph_and_symbols): Update resolution_map handling.
1893
ecdbd01a 18942013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
1895
1896 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1897 (add_symbol_to_partition_1): Likewise.
1898 (contained_in_symbol): Likewise.
1899 (lto_balanced_map): Likewise.
1900 (rename_statics): Drop weakref.
1901
a367df53
RB
19022013-06-05 Richard Biener <rguenther@suse.de>
1903
1904 * lto.c (num_merged_types): New global variable.
1905 (uniquify_nodes): Increase num_merged_types when merging a type.
1906 (print_lto_report_1): Output the number of merged types.
1907
40a7fe1e
JH
19082013-06-01 Jan Hubicka <jh@suse.cz>
1909
1910 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1911 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1912 (do_whole_program_analysis): Update dumping.
1913
e70670cf
JH
19142013-05-29 Jan Hubicka <jh@suse.cz>
1915
1916 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1917 flags.
1918 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1919
8ee05051
JH
19202013-05-15 Jan Hubicka <jh@suse.cz>
1921
1922 * lto-partition.c (privatize_symbol_name): Return true when
1923 privatizing happened.
1924 (rename_statics): Do not go into infinite loop when privatizing
1925 is not needed.
1926
427b248d
JM
19272013-05-16 Jason Merrill <jason@redhat.com>
1928
1929 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1930
9de04252
MJ
19312013-05-15 Martin Jambor <mjambor@suse.cz>
1932
1933 * lto-partition.c (lto_balanced_map): Print symbol order instead
1934 of node uids.
1935
2d6e4603
JH
19362013-05-15 Jan Hubicka <jh@suse.cz>
1937
1938 PR lto/57038
1939 PR lto/47375
1940 * lto-partition.c (get_symbol_class): Fix weakrefs.
1941 (lto_balanced_map): Fix weakrefs.
1942 (privatize_symbol_name): Remove unnecesary label.
1943 (rename_statics): Handle weakrefs as statics.
1944
64cfa6c0
JH
19452013-05-09 Jan Hubicka <jh@suse.cz>
1946 Richard Biener <rguenther@suse.de>
1947
1948 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1949 (lto_register_var_decl_in_symtab): Likewise.
1950 (lto_main): Promote statics.
1951 * lto-partition.c (privatize_symbol_name): New function.
1952 (promote_symbol): Use it.
1953 (may_need_named_section_p): New predicate.
1954 (rename_statics): New functions.
1955 (lto_promote_cross_file_statics): Simplify; do renaming.
1956 (lto_promote_statics_nonwpa): New function.
1957 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1958
e45cde98
RB
19592013-02-08 Richard Biener <rguenther@suse.de>
1960
1961 PR lto/56231
1962 * lto-lang.c (lto_init): Do not enter a dummy file.
1963
6edc3e32
UB
19642013-02-07 Uros Bizjak <ubizjak@gmail.com>
1965
1966 PR bootstrap/56227
1967 * lto.c (lto_resolution_ready): Use %wx instead of
1968 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1969
ed73881e
RG
19702013-02-04 Richard Guenther <rguenther@suse.de>
1971
1972 PR lto/56168
1973 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1974 or lto_fixup_decls at LTRANS time.
1975
a19b1432
JH
19762013-01-09 Jan Hubicka <jh@suse.cz>
1977
1978 PR lto/45375
1979 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1980
49c01f87
L
19812012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1982
1983 PR lto/55466
1984 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1985 variables.
1986 (lto_main): Record the global variables if WPA isn't enabled.
1987
6e1aa848
DN
19882012-11-20 Diego Novillo <dnovillo@google.com>
1989 Jakub Jelinek <jakub@redhat.com>
1990
1991 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1992
9771b263
DN
19932012-11-16 Diego Novillo <dnovillo@google.com>
1994
1995 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1996
1997 * lto-lang.c: Use new vec API in vec.h.
1998 * lto-partition.c: Likewise.
1999 * lto-partition.h: Likewise.
2000 * lto.c: Likewise.
2001
24551b9c
LC
20022012-10-31 Lawrence Crowl <crowl@google.com>
2003
2004 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2005 down-cast via dyn_cast.
2006 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2007 (undo_partition): Likewise.
2008 (lto_balanced_map): Likewise.
2009 (get_symbol_class): Likewise and via is_a.
2010 (lto_balanced_map): Change symtab checking to is_a.
2011
aec06f6f
RB
20122012-10-12 Richard Biener <rguenther@suse.de>
2013
2014 PR lto/54898
2015 * lto.c (gimple_types_compatible_p_1): Also compare
2016 TYPE_MAIN_VARIANT.
2017 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2018
0b8c30f9
TB
20192012-10-09 Tobias Burnus <burnus@net-b.de>
2020
2021 * lto-lang.c (lto_register_builtin_type): Avoid useless
2022 decl creation.
2023 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2024
da3202a8
TB
20252012-10-08 Tobias Burnus <burnus@net-b.de>
2026
2027 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2028 Free lto_file struct after closing the file.
2029
2512a443
JH
20302012-10-08 Jan Hubicka <jh@suse.cz>
2031
2032 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
2033 (fixup_integer_cst): New functoin.
2034 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2035
e75f8f79
JH
20362012-10-07 Jan Hubicka <jh@suse.cz>
2037
2038 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2039 release input encoders.
2040 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2041
46591697
JH
20422012-10-06 Jan Hubicka <jh@suse.cz>
2043
2044 PR lto/54790
2045 * lto.c (resolution_map): New static var.
2046 (register_resolution): New function.
2047 (lto_register_var_decl_in_symtab): Use it.
2048 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2049
af16bc76
MJ
20502012-09-20 Martin Jambor <mjambor@suse.cz>
2051
2052 * lto.c (lto_materialize_function): Call push_struct_function and
2053 pop_cfun.
2054
5368224f
DC
20552012-09-19 Dehao Chen <dehao@google.com>
2056
2057 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2058
b5493fb2
JH
20592012-09-19 Jan Hubicka <jh@suse.cz>
2060
2061 * lto.c (lto_materialize_function): Update confused comment.
2062 (read_cgraph_and_symbols): Do not free symtab.
2063
c3c445e1
JH
20642012-09-12 Jan Hubicka <jh@suse.cz>
2065
2066 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2067 AUX pointer cleaning. Add max partitioning.
2068 * lto-partition.c (enum symbol_class): New.
2069 (get_symbol_class): New function.
2070 (symbol_partitioned_p): New function.
2071 (add_references_to_partition): Remove.
2072 (add_aliases_to_partition): Remove.
2073 (add_cgraph_node_to_partition_1): Remove.
2074 (add_cgraph_node_to_partition): Remove.
2075 (add_symbol_to_partition): New function.
2076 (add_symbol_to_partition_1): New function.
2077 (contained_in_symbol): New function.
2078 (partition_cgraph_node_p): Remove.
2079 (partition_varpool_node_p): Remove.
2080 (partition_symbol_p): Remove.
2081 (lto_1_to_1_map): Cleanup.
2082 (lto_max_map): New.
2083 (lto_balanced_map): Update.
2084 (lto_promote_cross_file_statics): Update.
2085 * lto-partition.h (lto_max_map): Declare.
2086 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2087
b5c7cdfb
JH
20882012-09-11 Jan Hubicka <jh@suse.cz>
2089
2090 PR lto/54312
2091 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2092 type is variant leader.
2093
b29402f0
RG
20942012-09-11 Richard Guenther <rguenther@suse.de>
2095
2096 * lto.c (enum gtc_mode): Remove.
2097 (struct type_pair_d): Adjust.
2098 (lookup_type_pair): Likewise.
2099 (gimple_type_leader): Do not mark as deletable.
2100 (gimple_lookup_type_leader): Adjust.
2101 (gtc_visit): Likewise.
2102 (gimple_types_compatible_p_1): Likewise.
2103 (gimple_types_compatible_p): Likewise.
2104 (gimple_type_hash): Likewise.
2105 (gimple_register_type): Likewise.
2106 (read_cgraph_and_symbols): Manage lifetime of tables
2107 here.
2108
b8f4e58f
RG
21092012-09-11 Richard Guenther <rguenther@suse.de>
2110
2111 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2112 struct type_pair_d, lookup_type_pair, struct sccs,
2113 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2114 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2115 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2116 visit, iterative_hash_name, struct type_hash_pair,
2117 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2118 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2119 Move here from gimple.c
2120 (read_cgraph_and_symbols): Free hash tables here.
2121 (print_lto_report_1): New function wrapping print_lto_report.
2122 (do_whole_program_analysis): Call it.
2123 (lto_main): Likewise.
2124
1cdbb3f9
JH
21252012-09-10 Jan Hubicka <jh@suse.cz>
2126
2127 * lto-partition.c (partition_symbol_p): Forward declare.
2128 (add_references_to_partition): Reimplement using partition_symbol_p.
2129 (add_aliases_to_partition): Break out from add_references_to_partition;
2130 reimplement using partition_symbol_p.
2131 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2132 add sanity checks.
2133 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2134 (partition_varpool_node_p): Do not special case aliases.
2135
b4661bfe
JH
21362012-08-12 Jan Hubicka <jh@suse.cz>
2137
2138 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2139 it is deleted after streaming.
2140 * lto-partition.c (partition_symbol_p): New function.
2141 (promote_var, promote_fn): Remove.
2142 (promote_symbol): New function.
2143 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2144 to lookup the actual boundaries instead of computing them ad-hoc.
2145
7b99cca4
JH
21462012-08-12 Jan Hubicka <jh@suse.cz>
2147
2148 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2149 in partitioning.
2150 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2151 by encoder.
2152 * lto-partition.c (new_partition): Update.
2153 * lto.c (cmp_partitions_order): Update.
2154 (lto_wpa_write_files): Update.
2155 (free_ltrans_partitions): Update.
2156 (add_references_to_partition): Update.
2157 (add_cgraph_node_to_partition_1): Update.
2158 (add_cgraph_node_to_partition): Update.
2159 (add_varpool_node_to_partition): Update.
2160 (undo_partition): Update.
2161 (lto_balanced_map): Update.
2162 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2163 set_referenced_from_this_partition_p): Update.
2164 (lto_promote_cross_file_statics): Update.
2165
f27c1867
JH
21662012-08-12 Jan Hubicka <jh@suse.cz>
2167
2168 * lto-partition.c (set_referenced_from_other_partition_p,
2169 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2170 New functions.
2171 (lto_promote_cross_file_statics): Use them.
2172
ab96cc5b
JH
21732012-07-24 Jan Hubicka <jh@suse.cz>
2174
2175 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2176
0229aee9
UB
21772012-07-24 Uros Bizjak <ubizjak@gmail.com>
2178
2179 * lto-tree.h (lang_decl): Add variable_size GTY option.
2180
7ee2468b
SB
21812012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2182
2183 * lto.c: Do not include timevar.h.
2184 * Make-lang.in: Fix dependencies.
2185
a910399d
LC
21862012-06-18 Lawrence Crowl <crowl@google.com>
2187
92a285c1 2188 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
a910399d
LC
2189 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2190 to lto_wpa_write_files.
2191 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2192 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2193 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2194 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2195 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2196 to be a front end, but is not one.
2197
877ab5e9
JH
21982012-05-18 Jan Hubicka <jh@suse.cz>
2199
2200 * lto.c (lto_materialize_constructors_and_inits): Remove.
2201 (read_cgraph_and_symbols): Remove handling of alias pairs.
2202
6649df51
JH
22032012-05-17 Jan Hubicka <jh@suse.cz>
2204
2205 * lto-partition.c (add_references_to_partition): Handle external vars.
2206 (partition_varpool_node_p): Likewise.
2207 (lto_promote_cross_file_statics): Do not promote externals.
2208
d1ede5f4
BS
22092012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2210
2211 * lto-lang.c (handle_fnspec_attribute): New static function.
2212 (lto_attribute_table): Add "fn spec".
2213 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2214
0d6bf48c
JH
22152012-05-04 Jan Hubicka <jh@suse.cz>
2216
2217 * lto.c (do_whole_program_analysis): Set timevars correctly.
2218 (lto_main): Likewise.
d1ede5f4 2219
1d67dde8
RB
22202012-05-04 Richard Guenther <rguenther@suse.de>
2221
2222 * lang.opt (fwpa): Do not mark as Optimization.
2223 (fltrans): Likewise.
2224
65d630d4
JH
22252012-04-30 Jan Hubicka <jh@suse.cz>
2226
2227 * lto.c (lto_main): Use compile ().
1d67dde8
RB
2228 * lto-partition.c (partition_cgraph_node_p): Use
2229 symtab_used_from_object_file_p.
65d630d4
JH
2230 (partition_varpool_node_p): Likewise.
2231
ead84f73
JH
22322012-04-20 Jan Hubicka <jh@suse.cz>
2233
2234 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2235
5932a4d4
JH
22362012-04-18 Jan Hubicka <jh@suse.cz>
2237
2238 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2239 Update for new ipa-ref API.
2240
65c70e6b
JH
22412012-04-16 Jan Hubicka <jh@suse.cz>
2242
2243 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
92a285c1 2244 walkers to walk cgraph and varpool.
65c70e6b
JH
2245 (materialize_cgraph): Likewise.
2246 * lto-partition.c (lto_1_to_1_map): Likewise.
2247 (lto_balanced_map): Likewise.
2248 (lto_promote_cross_file_statics): Likewise.
2249
960bfb69
JH
22502012-04-14 Jan Hubicka <jh@suse.cz>
2251
2252 * lto.c: Update field referenced for new cgraph/varpool layout.
2253 * lto-partition.c: Likewise.
2254
a66dc285
JH
22552012-04-11 Jan Hubicka <jh@suse.cz>
2256
2257 * lto.c: Update copyright; remove params.h, ipa-inline.h
2258 and ipa-utils.h inlines; inline lto-partition.h
2259 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2260 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2261 add_references_to_partition, add_cgraph_node_to_partition_1,
2262 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2263 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2264 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2265 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2266 * lto-partition.c: ... here; new file.
2267 * lto-partition.h: New file.
2268 * Make-lang.in (lto.o): Update dependencies.
2269 (lto-partition.o): New.
2270
f3b249e5
RG
22712012-04-05 Richard Guenther <rguenther@suse.de>
2272
2273 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2274 definition.
2275
21fa2faf
RG
22762012-03-12 Richard Guenther <rguenther@suse.de>
2277
2278 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2279
6bb485a3
RG
22802012-03-06 Richard Guenther <rguenther@suse.de>
2281
2282 PR lto/52097
2283 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2284
95510497
RG
22852012-02-28 Richard Guenther <rguenther@suse.de>
2286
2287 PR lto/52400
2288 * lto.c (lto_register_function_decl_in_symtab): Do not register
2289 a reverse renamed decl mapping.
2290
09228fef
JJ
22912012-01-06 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR lto/51774
2294 * lto-lang.c (handle_returns_twice_attribute): New function.
2295 (lto_attribute_table): Add returns_twice attribute.
2296
b03eda0d
RG
22972011-12-21 Richard Guenther <rguenther@suse.de>
2298
2299 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2300 (LTO_FIXUP_TREE): Use it.
2301 (uniquify_nodes): Mark new non-prevailing types and avoid
2302 calling gimple_register_type on others.
2303 (lto_read_decls): Add comment.
2304
4ad9a9de
EB
23052011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2306
2307 * lto.h (lto_parse_hex): Delete.
2308 * lto.c (lto_read_decls): Use 'int' for offsets.
2309 (lto_parse_hex): Make static and return proper 64-bit host type.
2310 (lto_resolution_read): Use proper 64-bit host type.
2311
ea973bad
RG
23122011-12-13 Richard Guenther <rguenther@suse.de>
2313
2314 PR lto/48354
2315 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2316 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2317
c8218030
UB
23182011-12-01 Uros Bizjak <ubizjak@gmail.com>
2319
2320 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2321 (ignore_attribute): New.
2322
57ac2606
AH
23232011-11-21 Aldy Hernandez <aldyh@redhat.com>
2324
2325 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2326 (handle_transaction_pure_attribute): New.
2327
52a35ef7
RG
23282011-11-03 Richard Guenther <rguenther@suse.de>
2329
2330 PR lto/44965
2331 * lto-lang.c (lto_post_options): Do not read file options.
2332 * lto.c (lto_read_all_file_options): Remove.
2333 (lto_init): Call lto_set_in_hooks here.
2334
51973b1e
JH
23352011-10-09 Jan Hubicka <jh@suse.cz>
2336
2337 * lto.c (node_cmp, varpool_node_cmp): New functions.
2338 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2339 (cmp_partitions): Rename to ...
2340 (cmp_partitions_size): ... this one.
2341 (cmp_partitions_order): New function.
2342 (lto_wpa_write_files): Sort partitions by order when
2343 -fno-toplevel-reorder is used.
2344
5958009b
AK
23452011-10-09 Andi Kleen <ak@linux.intel.com>
2346
2347 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2348
e79983f4
MM
23492011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2350
2351 * lto-lang.c (def_builtin_1): Delete old interface with two
2352 parallel arrays to hold standard builtin declarations, and replace
2353 it with a function based interface that can support creating
2354 builtins on the fly in the future. Change all uses, and poison
2355 the old names. Make sure 0 is not a legitimate builtin index.
2356
ecdbd01a 23572011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2358
2359 * lto-object.c (lto_obj_add_section_data): Add list.
2360 (lto_obj_add_section): Fill in list.
2361 (ltoobj_build_section_table): Pass through list.
2362 * lto.c (file_data_list): Declare.
2363 (create_subid_section_table): Pass arguments directly.
2364 Fill in list of file_datas.
2365 (lwstate): Delete.
2366 (lto_create_files_from_ids): Pass in direct arguments.
2367 Don't maintain list.
2368 (lto_file_read): Use explicit section and file data lists.
2369 (lto_read_all_file_options): Pass in section_list.
2370 * lto.h (lto_obj_build_section_table): Add list.
2371 (lto_section_slot): Add next.
2372 (lto_section_list): Declare.
2373
ed0d2da0
JH
23742011-10-02 Jan Hubicka <jh@suse.cz>
2375
2376 PR lto/47247
2377 * common.c (lto_resolution_str): Add new resolution.
2378 * common.h (lto_resolution_str): Likewise.
2379
ad7715f3
L
23802011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2381 Andi Kleen <ak@linux.intel.com>
2382
2383 PR lto/50568
2384 * lto.c (lto_splay_tree_delete_id): New.
2385 (lto_splay_tree_compare_ids): Likewise.
2386 (lto_splay_tree_lookup): Likewise.
2387 (lto_splay_tree_id_equal_p): Likewise.
2388 (lto_splay_tree_insert): Likewise.
2389 (lto_splay_tree_new): Likewise.
2390 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2391 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2392 (create_subid_section_table): Use lto_splay_tree_lookup and
2393 lto_splay_tree_insert.
2394 (lto_file_read): Use lto_splay_tree_new.
2395
ecdbd01a 23962011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2397
2398 * lto.c (lto_resolution_read): Remove id dumping.
2399 (lto_section_with_id): Turn id HOST_WIDE_ID.
2400 (create_subid_section_table): Dito.
2401
892a371f
DS
24022011-08-28 Dodji Seketeli <dodji@redhat.com>
2403
2404 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2405 linemap_add twice.
2406
f82d1a94
MJ
24072011-08-11 Martin Jambor <mjambor@suse.cz>
2408
2409 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2410
f0efc7aa
DN
24112011-08-08 Diego Novillo <dnovillo@google.com>
2412
2413 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2414 * lto.c: Include tree-streamer.h.
2415
1a072294
RG
24162011-07-06 Richard Guenther <rguenther@suse.de>
2417
2418 * lto-lang.c (lto_init):
2419 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2420
7496868d
JH
24212011-06-11 Jan Hubicka <jh@suse.cz>
2422
10f13f22 2423 PR lto/48246
7496868d
JH
2424 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2425 (lto_balanced_map): Likewise.
2426
39e2db00
JH
24272011-06-11 Jan Hubicka <jh@suse.cz>
2428
2429 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2430 (add_cgraph_node_to_partition) ... here; walk aliases.
2431 (lto_1_to_1_map): Remove same body alias code.
2432 (promote_fn): Likewise.
2433 (lto_promote_cross_file_statics): Update comment.
2434
2435
28628ea6
DN
24362011-06-07 Diego Novillo <dnovillo@google.com>
2437
2438 * lto.c (uniquify_nodes): Move code to register decls to
2439 the loop that computes canonical types.
2440
009db074
RG
24412011-06-07 Richard Guenther <rguenther@suse.de>
2442
2443 * lto-lang.c (lto_init): Do not set
2444 size_type_node or call set_sizetype.
2445
47c79d56
DN
24462011-06-04 Diego Novillo <dnovillo@google.com>
2447
2448 * lto.c (lto_init): New.
2449 (lto_main): Call it.
2450
d5828cc7
DN
24512011-06-03 Diego Novillo <dnovillo@google.com>
2452
2453 * lto.c (get_resolution): Move from lto-streamer-in.c.
2454 (lto_register_var_decl_in_symtab): Likewise.
2455 (lto_register_function_decl_in_symtab): Likewise.
2456 (uniquify_nodes): Call lto_register_var_decl and
2457 lto_register_function_decl_in_symtab after reading a new
2458 VAR_DECL or FUNCTION_DECL.
2459
6807da97
RG
24602011-06-01 Richard Guenther <rguenther@suse.de>
2461
2462 * lto-lang.c (lto_register_canonical_types): New function.
2463 (lto_init): Register common nodes with the canonical type machinery.
2464 Do not play tricks with char_type_node.
2465
d74be317
RG
24662011-05-26 Richard Guenther <rguenther@suse.de>
2467
2468 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2469
d9f8303f
NF
24702011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2471
2472 * lto.c (lto_ft_typed): New function.
2473 (lto_ft_common): Call it.
2474 (lto_ft_constructor): Likewise.
2475 (lto_ft_expr): Likewise.
2476 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2477 TREE_CHAIN.
2478
fb291a1e
RG
24792011-05-20 Richard Guenther <rguenther@suse.de>
2480
2481 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2482 (lto_ft_type): Move main-variant and pointer-to chain building ...
2483 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2484 in a separate final loop.
2485
31b3ca64
RG
24862011-05-19 Richard Guenther <rguenther@suse.de>
2487
2488 * lto.c (uniquify_nodes): First register all types before
2489 fixing up the tree SCC.
2490
35d828c5
JH
24912011-05-11 Jan Hubicka <jh@suse.cz>
2492
2493 PR lto/48952
2494 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2495
51545682
NF
24962011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2497
2498 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2499 location of binfo field.
2500 (lto_fixup_prevailing_decls): Likewise.
2501
8242dd04
NF
25022011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2503
2504 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2505 build_function_type_array or build_varargs_function_type_array
2506 instead.
2507
c99c0026
EB
25082011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2509
2510 * lto-lang.c (global_bindings_p): Return bool.
2511
c47d0034
JH
25122011-05-07 Jan Hubicka <jh@suse.cz>
2513
a9bcb3f0
EB
2514 * lto.c (lto_materialize_function): Use
2515 cgraph_function_with_gimple_body_p.
2516 (add_cgraph_node_to_partition): Do not re-add items to partition;
2517 handle thunks.
c47d0034
JH
2518 (add_varpool_node_to_partition): Do not re-add items to partition.
2519
bb3398ca
JH
25202011-05-03 Jan Hubicka <jh@suse.cz>
2521
2522 * lto.c (free_ltrans_partitions): Fix accidental commit.
2523
1cb1a99f
JH
25242011-05-03 Jan Hubicka <jh@suse.cz>
2525
2526 * lto.c (ltrans_partition_def): Remove GTY annotations.
2527 (ltrans_partitions): Move to heap.
2528 (new_partition): Update.
2529 (free_ltrans_partitions): New function.
2530 (lto_wpa_write_files): Use it.
2531
af8bca3c
MJ
25322011-04-29 Martin Jambor <mjambor@suse.cz>
2533
2534 * lto.c: Include ipa-utils.h.
2535 (lto_balanced_map): Update call to ipa_reverse_postorder.
2536 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2537
b823cdfe
MM
25382011-04-29 Michael Matz <matz@suse.de>
2539
2540 * lto.c (toplevel): Include tree-flow.h.
2541 (lto_read_in_decl_state): Don't merge types here.
2542 (tree_with_vars): New static hash table.
2543 (remember_with_vars): New static functions.
2544 (LTO_FIXUP_TYPE): New macro.
2545 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2546 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2547 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2548 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2549 (lto_read_decls): Uniquify while reading in trees.
2550 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2551 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2552 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2553 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2554 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2555 lto_fixup_tree): Remove.
2556 (lto_fixup_state): Remove data argument. Use
2557 lto_symtab_prevailing_decl.
2558 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2559 (lto_fixup_prevailing_decls): New function.
2560 (lto_fixup_state_aux): Argument aux is unused.
2561 (lto_fixup_decls): Don't allocate pointer sets, don't use
2562 lto_fixup_tree, use lto_fixup_prevailing_decls.
2563 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2564 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2565
b9843260
EB
25662011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2567
2568 * lto.c (lto_balanced_map): Fix typos in head comment.
2569 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2570 test.
2571
e7f23018
JH
25722011-04-16 Jan Hubicka <jh@suse.cz>
2573
2574 * lto.c (lto_balanced_map): Update.
2575
10a5dd5d
JH
25762011-04-14 Jan Hubicka <jh@suse.cz>
2577
2578 * lto.c: Include ipa-inline.h
b9843260
EB
2579 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2580 accessor.
10a5dd5d
JH
2581 (ipa_node_duplication_hook): Fix declaration.
2582 * Make-lang.in (lto.o): Update dependencies.
2583
81f653d6
NF
25842011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2585
2586 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2587 calling TREE_CHAIN.
2588 * lto.c (lto_fixup_common): Likewise.
2589
dcf0c47e
NF
25902011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2591
2592 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2593 (handle_type_generic_attribute): Likewise.
2594
e89964e3
MM
25952011-04-03 Michael Matz <matz@suse.de>
2596
2597 * lto.c (lto_materialize_function): Don't read and then discard
2598 sections in WPA mode.
2599 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2600
2601 * lto-lang.c (registered_builtin_fndecls): Remove.
2602 (lto_getdecls): Return NULL_TREE.
2603 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2604
d2b3fe18
RG
26052011-03-31 Richard Guenther <rguenther@suse.de>
2606
2607 PR lto/48246
2608 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2609 partitions when checking is not enabled.
2610
ba78087b
KT
26112011-03-25 Kai Tietz <ktietz@redhat.com>
2612
2613 * lto.c (lto_resolution_read): Use filename_cmp instead
2614 of strcmp.
2615 (lto_read_section_data): Likewise.
2616
0edf1bb2
JL
26172011-03-25 Jeff Law <law@redhat.com>
2618
2619 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2620
62d784f7
KT
26212011-03-21 Kai Tietz <ktietz@redhat.com>
2622
2623 PR target/12171
2624 * lto-lang.c (lto_attribute_table): Adjust table.
2625
62dd9571
JJ
26262011-02-18 Jakub Jelinek <jakub@redhat.com>
2627
2628 PR bootstrap/47807
2629 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2630 of lto-streamer.h.
2631
237d6259
RG
26322011-02-18 Richard Guenther <rguenther@suse.de>
2633
2634 PR lto/47798
2635 * lto-tree.h (lto_global_var_decls): Do not declare here.
2636 * lto-lang.c: Include lto-streamer.h.
2637 * Make-lang.in (lto-lang.o): Adjust dependencies.
2638
8ead2223
KT
26392011-02-10 Kai Tietz <kai.tietz@onevision.com>
2640
2641 PR lto/47241
2642 * lto.c (lto_read_section_data): Free
2643 fd_name in failure case.
2644 For mingw targets don't hash file-descriptor.
2645 (read_cgraph_and_symbols): Close current_lto_file
2646 in failure case.
2647
6e701822
JH
26482011-01-11 Jan Hubicka <jh@suse.cz>
2649
2650 PR lto/45721
2651 PR lto/45375
b9843260
EB
2652 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2653 are not partitioned.
6e701822 2654
f4da8dce
NF
26552010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2656
2657 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2658 Use prototype_p.
2659
6b7fb143
RG
26602010-12-06 Richard Guenther <rguenther@suse.de>
2661
2662 PR lto/46796
2663 * lto-lang.c (lto_init): Give names to basic types.
2664
c59ffc41
JM
26652010-11-30 Joseph Myers <joseph@codesourcery.com>
2666
2667 * lto-object.c: Don't include toplev.h.
2668 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2669
7c475d11
JM
26702010-11-30 Joseph Myers <joseph@codesourcery.com>
2671
2672 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2673 $(TOPLEV_H).
2674
71f3e391
JM
26752010-11-29 Joseph Myers <joseph@codesourcery.com>
2676
2677 * lto-endian.h: Delete.
2678 * lto-object.c: Don't include "libiberty.h".
2679 (O_BINARY): Don't define.
2680 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2681 (O_BINARY): Don't define.
2682
9f1718b0
RG
26832010-11-23 Richard Guenther <rguenther@suse.de>
2684
2685 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2686
39c4e298
RG
26872010-11-23 Richard Guenther <rguenther@suse.de>
2688
2689 PR lto/46605
2690 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2691
b37421c6
JM
26922010-11-17 Joseph Myers <joseph@codesourcery.com>
2693
2694 * lto.c (lto_main): Take no arguments.
2695 * lto.h (lto_main): Update prototype.
2696
d82f74d3
ILT
26972010-11-16 Ian Lance Taylor <iant@google.com>
2698
2699 * lto-object.c (lto_obj_file_open): Call
2700 simple_object_attributes_merge rather than
2701 simple_object_attributes_compare.
2702
a4d8c676
JM
27032010-11-12 Joseph Myers <joseph@codesourcery.com>
2704
2705 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2706 * lto-lang.c (lto_handle_option): Take location_t parameter.
2707
d8a07487
JM
27082010-11-10 Joseph Myers <joseph@codesourcery.com>
2709
2710 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2711 letters and remove trailing '.'.
2712 (lto_file_finalize): Start diagnostic with a lowercase letter.
2713
6b3456d1
ILT
27142010-11-02 Ian Lance Taylor <iant@google.com>
2715
2716 * lto-object.c: New file.
2717 * lto-elf.c: Remove file.
2718 * lto-macho.c: Remove file.
2719 * lto-macho.h: Remove file.
2720 * lto-coff.c: Remove file.
2721 * lto-coff.h: Remove file.
2722 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2723 lto/lto-object.o.
2724 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2725 (lto/lto-objfile.o): New target.
2726 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2727 (lto/lto.o): Remove $(LIBIBERTY_H).
2728
030cd86c
JH
27292010-10-22 Jan Hubicka <jh@suse.cz>
2730
2731 * lto.c (add_cgraph_node_to_partition,
2732 add_varpool_node_to_partition): Add debug info.
2733 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2734 partitioned nodes.
2735 (do_whole_program_analysis): Set function flags before dumping.
2736
4490cae6
RG
27372010-10-22 Richard Guenther <rguenther@suse.de>
2738
2739 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2740 the new gimple_register_canonical_type.
2741
703cdce3
L
27422010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2743
2744 PR bootstrap/45954
2745 * config-lang.in (boot_language): Set to $enable_lto.
2746
1915c739
JJ
27472010-10-18 Jakub Jelinek <jakub@redhat.com>
2748
2749 PR lto/45638
2750 * Make-lang.in (check-lto): New dummy target.
2751
82971de5
EB
27522010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2753
2754 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2755
a75bfaa6
JM
27562010-10-08 Joseph Myers <joseph@codesourcery.com>
2757
2758 * lto-lang.c (lto_init_options): Change to
2759 lto_init_options_struct. Update parameters.
2760 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2761 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2762
937f7f69
JH
27632010-10-06 Jan Hubicka <jh@suse.cz>
2764
2765 * lto.c (lto_balanced_map): Fix accounting of program size.
2766
2169830c
JH
27672010-10-06 Jan Hubicka <jh@suse.cz>
2768
2769 * lto.c (lto_balanced_map): Do not produce empty partitions.
2770
ecdbd01a 27712010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2772
2773 * lto.c (lto_process_name): Add.
2774 (lto_main): Call lto_process_name.
2775
06ed016f
JH
27762010-10-06 Jan Hubicka <jh@suse.cz>
2777
2778 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2779 COMDATs required by the linker.
2780
ae718d66
ILT
27812010-10-05 Ian Lance Taylor <iant@google.com>
2782
2783 * lto.c (lto_section_with_id): Make s a const pointer.
2784
852e4bd2
JH
27852010-10-05 Jan Hubicka <jh@suse.cz>
2786
2787 * lto.c: Include params.h.
2788 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2789 refcounting in aux field.
2790 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2791 New functions.
2792 (lto_1_to_1_map): Simplify.
2793 (lto_balanced_map): New function.
2794 (do_whole_program_analysis): Chose proper partitioning alg.
2795 * Make-lang.in (lto.o): Add dependency on params.h
2796
ecdbd01a 27972010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2798
2799 * Make-lang.in (lto1): Add + to build rule.
2800
ecdbd01a 28012010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2802
2803 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
92a285c1 2804 with fatal_error.
f1e92a43 2805
0d6e14fd
JH
28062010-09-28 Jan Hubicka <jh@suse.cz>
2807
2808 * lto-lang.c (handle_leaf_attribute): New function.
2809 (lto_attribute_tables): Add leaf.
2810
fb462383
JZ
28112010-09-25 Jie Zhang <jie@codesourcery.com>
2812
2813 * lto.c (lto_read_all_file_options): Start a new line after
2814 printing out file names.
2815
051f8cc6
JH
28162010-09-24 Jan Hubicka <jh@suse.cz>
2817
2818 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2819
64e0f5ff
JH
28202010-09-20 Jan Hubicka <jh@suse.cz>
2821
2822 PR tree-optimize/45605
2823 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2824
a929ec3d
GP
28252010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2826
2827 * lto-elf.c (lto_obj_file_open): Also provide filename when
2828 elf_begin fails.
2829
4c588abf
JH
28302010-09-17 Jan Hubicka <jh@suse.cz>
2831
2832 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2833
c3224d6f
RG
28342010-09-17 Richard Guenther <rguenther@suse.de>
2835
2836 * lang.opt (flag_wpa): Also enable for the driver.
2837
52b3b3c7
JH
28382010-09-16 Jan Hubicka <jh@suse.cz>
2839
2840 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2841 EXTERNAL flags.
2842
969c37b7
LB
28432010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2844
2845 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2846
098a4f50
JH
28472010-09-08 Jan Hubicka <jh@suse.cz>
2848
2849 * lto.c (real_file_count, real_file_decl_data): New static vars.
2850 (read_cgraph_and_symbols): Use it.
2851
0f443ad0
RG
28522010-09-08 Richard Guenther <rguenther@suse.de>
2853
2854 * lto.c (read_cgraph_and_symbols): Collect again after each
2855 file.
2856
ee187353
JH
28572010-09-07 Jan Hubicka <jh@suse.cz>
2858
2859 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2860
b3ec52d0
RG
28612010-09-03 Richard Guenther <rguenther@suse.de>
2862
2863 * lto-elf.c (validate_file): Always error if validation fails.
2864
f1395d4a
JH
28652010-08-20 Jan Hubicka <jh@suse.cz>
2866
2867 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2868 (lto_wpa_write_files): Update comments.
2869
2429bce3
L
28702010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2871
2872 PR bootstrap/45357
2873 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2874 with has_analyzed_clone_p.
2875
e0f967db
JH
28762010-08-20 Jan Hubicka <jh@suse.cz>
2877
2878 * lto.c (has_analyzed_clone_p): New function
2879 (lto_materialize_function): Use callgraph to determine if
2880 body is needed.
2881 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2882
ac47786e
NF
28832010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2884
2885 * lto.c: Use FOR_EACH_VEC_ELT.
2886
ecdbd01a 28872010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
2888
2889 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2890
5f20c657
JM
28912010-07-27 Joseph Myers <joseph@codesourcery.com>
2892
2893 * lto-lang.c (lto_handle_option): Update prototype and return
2894 value type. Remove duplicate assignment to result.
2895
7a9bf9a4
JM
28962010-07-27 Joseph Myers <joseph@codesourcery.com>
2897
2898 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2899 New.
2900 (lto_init_options): Update prototype.
2901 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2902 Define.
2903
ecdbd01a 29042010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
2905
2906 PR lto/44992
92a285c1 2907 * lto.c: Include splay-tree.h
73ce4d1e
AK
2908 (lto_resolution_read): Change to walk file_ids tree and parse
2909 extra file_id in resolution file.
2910 (lto_section_with_id): Add.
2911 (create_subid_section_table): Add.
2912 (lwstate): Add.
2913 (lto_create_files_from_ids): Add.
2914 (lto_file_read): Change to handle sub file ids and create list
2915 of file_datas. Add output argument for count.
2916 (get_section_data): Pass file_data to lto_get_section_name.
2917 (lto_flatten_file): Add.
2918 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2919
ecdbd01a 29202010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
2921
2922 * lto-coff.c (hash_name, eq_name): Move.
2923 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2924 * lto-elf.c: (hash_name, eq_name): Move.
2925 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2926 * lto-macho.c: (hash_name, eq_name): Move.
2927 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2928 * lto.c: (hash_name, eq_name): Move from lto-*.c
2929 (lto_obj_create_section_hash_table): Add.
2930 (free_with_string): Add.
2931
718f9c0f
MLI
29322010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2933
2934 * lto-coff.c: Include diagnostic-core.h in every file that
2935 includes toplev.h.
2936 * lto-elf.c: Likewise.
2937 * lto-lang.c: Likewise.
2938 * lto-macho.c: Likewise.
2939
1b137837
JJ
29402010-07-07 Jakub Jelinek <jakub@redhat.com>
2941
2942 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2943 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2944 objects.
2945
92eb4438
JH
29462010-07-05 Jan Hubicka <jh@suse.cz>
2947
2948 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2949 nodes from same comdat group as well as all comdat functions referenced
2950 here.
b9843260
EB
2951 (add_varpool_node_to_partition, add_references_to_partition): New
2952 function.
2953 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2954 add_varpool_node_to_partition; clear aux flags when done.
2955 (lto_promote_cross_file_statics): Do not promote stuff that gets
2956 duplicated to each ltrans.
92eb4438 2957
a05541a9
JH
29582010-07-04 Jan Hubicka <jh@suse.cz>
2959
92a285c1 2960 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
a05541a9 2961
4a2ac96f
RG
29622010-06-13 Richard Guenther <rguenther@suse.de>
2963
2964 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2965
1d536046
KT
29662010-06-09 Kai Tietz <kai.tietz@onevision.com>
2967
2968 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2969 * lto-coff.c (coff_write_object_file): Add braces to if.
2970
a9429e29
LB
29712010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2972
2973 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2974 (lto_file_read): Likewise.
2975 (new_partition): Likewise.
2976 (read_cgraph_and_symbols): Likewise.
2977
5498f011
JM
29782010-06-07 Joseph Myers <joseph@codesourcery.com>
2979
2980 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2981 (lto_handle_option): Don't set flag_signed_char here.
2982
d4c0c9f6
RG
29832010-06-04 Richard Guenther <rguenther@suse.de>
2984
2985 PR lto/41584
2986 * lto.c (lto_1_to_1_map): Use the proper file_data for
2987 varpool nodes.
2988
0a5fa5a1
JH
29892010-05-30 Jan Hubicka <jh@suse.cz>
2990
2991 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2992 partitioning decisions.
2993
9eec9488
JH
29942010-05-29 Jan Hubicka <jh@suse.cz>
2995
2996 * lto.c (bitmap vector): Remove.
2997 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2998 (ltrans_partition_def): New structure.
2999 (ltrans_partition): New type and VECtor.
3000 (new_partition): New function.
3001 (add_cgraph_node_to_partition): New function.
3002 (lto_1_to_1_map): Reorganize for partitions.
3003 (lto_add_inline_clones): Remove.
3004 (lto_add_all_inlinees): Remove.
3005 (lto_promote_cross_file_statics): Use partitions.
3006 (cmp_partitions): New function.
3007 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3008 use partitions; output files sorted by size.
3009
3e097227
SB
30102010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3011
3012 * Make-lang.in: Replace vec.h dependency with VEC_H.
3013
7ca92787
JM
30142010-05-28 Joseph Myers <joseph@codesourcery.com>
3015
3016 * lto-coff.c (coff_errmsg): Remove.
3017 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3018 errors instead of coff_errmsg (-1).
3019 * lto-macho.c (mach_o_errmsg): Remove.
3020 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3021 instead of mach_o_errmsg (-1).
3022 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3023 xstrerror (errno).
3024
b5611987
RG
30252010-05-28 Richard Guenther <rguenther@suse.de>
3026
3027 * lto.c (prefix_name_with_star): Removed.
3028 (strip_extension): Likewise.
3029 (get_filename_for_set): Likewise.
3030 (lto_write_ltrans_list): Fold into ...
3031 (lto_wpa_write_files): ... this. Name LTRANS units
3032 by suffixing the ltrans output list filename.
3033 (do_whole_program_analysis): Adjust.
3034
1da2ed5f
JM
30352010-05-27 Joseph Myers <joseph@codesourcery.com>
3036
3037 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3038 (read_cgraph_and_symbols, lto_main): Use seen_error.
3039 * Make-lang.in (lto/lto.o): Update dependencies.
3040
7951d88a
EB
30412010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3042
3043 PR lto/44230
3044 * lto.h (lto_eh_personality): New prototype.
3045 * lto.c: Include debug.h.
3046 (first_personality_decl): New static variable.
3047 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3048 first function for which it is non-null.
3049 (lto_eh_personality_decl): New static variable.
3050 (lto_eh_personality): New function.
3051 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3052 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3053
e12da9c2
SB
30542010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3055
3056 * lto-lang.c: Do not include expr.h.
3057
468194f4
RG
30582010-05-24 Richard Guenther <rguenther@suse.de>
3059
3060 * lto-elf.c (lto_obj_build_section_table): Work around
3061 FreeBSD libelf issue.
3062
bd9eb5da
RG
30632010-05-22 Richard Guenther <rguenther@suse.de>
3064
3065 * lto.c (read_cgraph_and_symbols): Do not collect.
3066
66576e1b
JH
30672010-05-20 Jan Hubicka <jh@suse.cz>
3068
3069 * lto.c (promote_var, promote_fn): New functions.
3070 (lto_promote_cross_file_statics): Compute correctly boundary including
3071 static initializers of readonly vars.
3072
36576655
JH
30732010-05-18 Jan Hubicka <jh@suse.cz>
3074
66576e1b 3075 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
3076 (lto_promote_cross_file_statics): Deal with non-inline clones.
3077
28632d63
JH
30782010-05-18 Jan Hubicka <jh@suse.cz>
3079
3080 * lto.c (lto_materialize_function): Announce function when
3081 reading body; allocate_struct_function only when reading body;
3082 do not finalize local statics; ggc_collect after reading;
3083 do not mark reachable node.
3084 (materialize_cgraph): Do not announce function.
3085
33e42d56
JH
30862010-05-11 Jan Hubicka <jh@suse.cz>
3087
3088 * lto.c (materialize_cgraph): Revert my previous patch.
3089
f6430ea5
KT
30902010-05-11 Kai Tietz <kai.tietz@onevision.com>
3091
3092 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3093 IMAGE_FILE_MACHINE_AMD64.
3094 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3095
0a0b07b7
JH
30962010-05-11 Jan Hubicka <jh@suse.cz>
3097
3098 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3099 (materialize_cgraph): Add it here.
3100
9a809897
JH
31012010-05-11 Jan Hubicka <jh@suse.cz>
3102
3103 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3104 vector.
3105
31062010-05-11 Jan Hubicka <jh@suse.cz>
3107
3108 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3109 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3110 use reachable_from_other_partition_p and
3111 referenced_from_other_partition_p test.
3112
94f64249
KT
31132010-05-11 Kai Tietz <kai.tietz@onevision.com>
3114
3115 * lto-coff.c (validate_file): Add x64-coff support.
3116 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3117 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3118 * lto-lang.c (lto_build_c_type_nodes): Add check for
3119 'long long unsigned int' for x64-windows.
3120 (lto_init): Likewise.
3121
3122
c082f9f3
SB
31232010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3124
3125 * lto.h (struct lto_file_struct): Document offset member.
3126 * lto-endian.h: New file.
3127 * lto-macho.h: New file.
3128 * lto-macho.c: New file.
3129 * Make-lang.in: Add rule for lto-macho.o.
3130
3f8257db 31312010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
3132
3133 PR lto/43857
3134 PR lto/43371
3135 * lang.opt (fresolution): Change to ...
3136 (fresolution=): ... this.
3137 * lto-lang.c (lto_handle_option): Adjust.
3138
48cf395b
RB
31392010-05-07 Richard Guenther <rguenther@suse.de>
3140
3141 * lto.c (DUMPBASE_SUFFIX): Remove.
3142 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3143 Rename to ...
3144 (lto_write_ltrans_list): ... only output the list of ltrans files.
3145 (lto_maybe_unlink): Remove.
3146 (do_whole_program_analysis): Do not execute LTRANS phase
3147 from here.
3148
afa83c15
L
31492010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3150
3151 * lto-lang.c (lto_handle_option): Add argument kind.
3152
369451ec
JH
31532010-05-05 Jan Hubicka <jh@suse.cz>
3154
48cf395b
RB
3155 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3156 refs.
369451ec 3157
2f41ecf5
JH
31582010-05-05 Jan Hubicka <jh@suse.cz>
3159
3160 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3161
ace72c88
JH
31622010-04-30 Jan Hubicka <jh@suse.cz>
3163
b9843260
EB
3164 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3165 use default name.
ace72c88
JH
3166 (lto_wpa_write_files): Write any non-empty partition.
3167
05575e07
JH
31682010-04-30 Jan Hubicka <jh@suse.cz>
3169
3170 * lto.c: Do not attempt to make constant pool references global.
3171
49ba8180
JH
31722010-04-28 Jan Hubicka <jh@suse.cz>
3173
3174 * lto/lto.c (lto_read_in_decl_state): Use GGC.
3175 (lto_wpa_write_files): Announce what we are writting.
3176 (all_file_decl_data): New.
3177 (read_cgraph_and_symbols): Use GGC; correct timevars.
3178 (do_whole_program_analysis): Collect.
3179 * lto/Make-lang.in (lto.o): Fix dependency.
3180 * Makefile.in (GTFILES): Add lto-streamer.h.
3181 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3182 (varpool_assemble_pending_decls): Use VAROUT.
3183 * lto-streamer.h (lto_tree_ref_table): Annotate.
3184 (lto_in_decl_state): Annotate.
3185 (lto_file_decl_data): Annotate.
3186
2942c502
JH
31872010-04-28 Jan Hubicka <jh@suse.cz>
3188
3189 * lto.c (lto_varpool_node_sets): New.
3190 (lto_1_to_1_map): Partition varpool too.
3191 (globalize_context_t, globalize_cross_file_statics,
3192 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3193 lto_scan_statics_in_remaining_global_vars): Remove.
3194 (lto_promote_cross_file_statics): Rewrite.
3195 (get_filename_for_set): Take vset argument.
3196 (lto_wpa_write_files): Pass around vsets.
3197
3bec79c5
DK
31982010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3199
3200 PR lto/42776
3201 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3202 hardcoding 'lto-elf.o'.
3203 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3204
3205 * lto-coff.h: New file.
3206 * lto-coff.c: Likewise.
3207
21aac880
RG
32082010-04-26 Richard Guenther <rguenther@suse.de>
3209
3210 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3211
2cee0101
DK
32122010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3213
3214 * lto.h (lto_elf_file_open): Rename prototype from this ...
3215 (lto_obj_file_open): ... to this.
3216 (lto_elf_file_close): Likewise ...
3217 (lto_obj_file_close): ... and likewise.
3218 (lto_elf_build_section_table): Likewise ...
3219 (lto_obj_build_section_table): ... and likewise.
3220 (lto_elf_begin_section): Likewise ...
3221 (lto_obj_begin_section): ... and likewise.
3222 (lto_elf_append_data): Likewise ...
3223 (lto_obj_append_data): ... and likewise.
3224 (lto_elf_end_section): Likewise ...
3225 (lto_obj_end_section): ... and likewise.
3226 * lto.c (lto_file_read): Update references to the above.
3227 (lto_wpa_write_files): Likewise.
3228 (lto_read_all_file_options): Likewise.
3229 (read_cgraph_and_symbols): Likewise.
3230 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3231 (LANG_HOOKS_APPEND_DATA): Likewise.
3232 (LANG_HOOKS_END_SECTION): Likewise.
3233 * lto-elf.c (lto_elf_file_open): Rename from this ...
3234 (lto_obj_file_open): ... to this, updating any references.
3235 (lto_elf_file_close): Likewise ...
3236 (lto_obj_file_close): ... and likewise.
3237 (lto_elf_build_section_table): Likewise ...
3238 (lto_obj_build_section_table): ... and likewise.
3239 (lto_elf_begin_section): Likewise ...
3240 (lto_obj_begin_section): ... and likewise.
3241 (lto_elf_append_data): Likewise ...
3242 (lto_obj_append_data): ... and likewise.
3243 (lto_elf_end_section): Likewise ...
3244 (lto_obj_end_section): ... and likewise.
3245
bc58d7e1
JH
32462010-04-21 Jan Hubicka <jh@suse.cz>
3247
3248 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3249 (materialize_cgraph): Likewise.
3250
e792884f
JH
32512010-04-21 Jan Hubicka <jh@suse.cz>
3252
3253 * lto.c (lto_wpa_write_files): Update.
3254 (read_cgraph_and_symbols): Be more verbose.
3255 (materialize_cgraph): Likewise.
3256 (do_whole_program_analysis): Likewise.
3257
c9945504
JH
32582010-04-21 Jan Hubicka <jh@suse.cz>
3259
3260 * lto.c (globalize_cross_file_statics): When function has address taken,
3261 it needs to be public.
3262
a837268b
JH
32632010-04-20 Jan Hubicka <jh@suse.cz>
3264
3265 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3266 (lto_add_all_inlinees): Likewise.
3267 (lto_wpa_write_files): Likewise.
3268
3b9e5d95
EB
32692010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3270
3271 * lto-lang.c (lto_init): Remove second argument in call to
3272 build_common_tree_nodes.
3273
8ccb78f2
RO
32742010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3275
3276 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3277 function.
3278
2f9b99e6
EB
32792010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3280
3281 PR bootstrap/43276
3282 * lto-elf.c: Define EM_* constants if not already defined.
3283
bef7d288
EB
32842010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3285
3286 * lto-elf.c (is_compatible_architecture): New static function.
3287 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3288
f68df07c
RG
32892010-02-11 Richard Guenther <rguenther@suse.de>
3290
3291 PR driver/43021
3292 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3293 appropriately.
3294
3cdea2b4
AH
32952010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3296
3297 * lto.c (O_BINARY): Define.
3298 (lto_read_section_data): Open file in binary mode.
3299 * lto-elf.c (O_BINARY): Define.
3300 (lto_elf_file_open): Open file in binary mode.
3301
c59449fa
RG
33022010-01-08 Richard Guenther <rguenther@suse.de>
3303
3304 PR lto/42528
3305 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3306 (lto_init): Do not init char_type_node in a standard way
3307 but according to flag_signed_char.
3308
d7fb0a6d
L
33092010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3310
3311 PR lto/41564
3312 * lto.c (DUMPBASE_SUFFIX): New.
3313 (lto_execute_ltrans): Append a sequence number to -dumpbase
3314 for LTRANS.
3315
78ce4053
L
33162010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3317
3318 PR lto/42580
3319 * lto-elf.c (lto_elf_file_open): Stop if the command line
3320 option file is missing.
3321
2a71eb48
RG
33222009-12-15 Richard Guenther <rguenther@suse.de>
3323
3324 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3325 (lto_post_options): Do not disable debuginfo.
3326
a818bca1
DG
33272009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3328
3329 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3330
e7d00517
RG
33312009-12-11 Richard Guenther <rguenther@suse.de>
3332
3333 PR lto/42037
3334 * lto.c (lto_resolution_read): Properly grow the vector.
3335
1ab53893
RG
33362009-12-11 Richard Guenther <rguenther@suse.de>
3337
3338 PR lto/41915
3339 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3340 to the C99 default. Do not set flag_unit_at_a_time.
3341
0f900dfa
JJ
33422009-11-28 Jakub Jelinek <jakub@redhat.com>
3343
3344 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3345 variable.
3346
92fa7608
RAE
33472009-11-19 Rafael Avila de Espindola <espindola@google.com>
3348
3349 PR bootstrap/42096
3350 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3351 * lto.c (lto_parse_hex): New.
3352 (lto_resolution_read): Use lto_parse_hex.
3353 * lto.h (lto_parse_hex): New.
3354
9870fe4f
RAE
33552009-11-17 Rafael Avila de Espindola <espindola@google.com>
3356
3357 * lto-elf.c (lto_file_init): Add offset argument.
3358 (lto_elf_file_open): Record the offset.
3359 * lto.c (lto_resolution_read): Change file_name into a lto_file
3360 argument. Check offsets.
3361 (lto_file_read): Update call to lto_resolution_read.
3362 * lto.h (lto_file_struct): Add the offset field.
3363
1b70729f
RAE
33642009-11-16 Rafael Avila de Espindola <espindola@google.com>
3365
3366 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3367
0e3776db
JH
33682009-11-14 Jan Hubicka <jh@suse.cz>
3369
3370 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3371
06bd7f56
RAE
33722009-11-12 Rafael Avila de Espindola <espindola@google.com>
3373
3374 * lang.opt (fresolution): Renamed from resolution.
3375 * lto-lang.c (lto_handle_option): Handle new option name.
3376 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3377
7e9dc421 33782009-11-04 Richard Guenther <rguenther@suse.de>
92a285c1 3379 Rafael Avila de Espindola <espindola@google.com>
7e9dc421
RG
3380
3381 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3382 (lto_elf_file_open): Handle offsets in arguments name@offest.
3383
b207f900
RG
33842009-10-30 Richard Guenther <rguenther@suse.de>
3385
3386 PR lto/41858
3387 * lto.c (lto_file_read): Do not set file_data->fd.
3388 (lto_read_section_data): Use a single-entry file-descriptor cache.
3389 Do not check the result of xmalloc.
3390 (free_section_data): Do not use file_data->fd.
3391 (lto_read_all_file_options): Likewise.
3392
2c928155
RG
33932009-10-22 Richard Guenther <rguenther@suse.de>
3394
3395 * lto.c (lto_fixup_jump_functions): Remove.
3396 (lto_fixup_decls): Do not fixup jump functions.
3397 (read_cgraph_and_symbols): Schedule cgraph merging after
3398 summary reading. Schedule type and decl fixup before
3399 summary reading.
3400
f9c91f8a
RB
34012009-10-22 Richard Guenther <rguenther@suse.de>
3402
3403 * lto.c (lto_fixup_data_t): Remove free_list member.
3404 (lto_fixup_tree): Do not insert into free_list.
3405 (free_decl): Remove.
3406 (lto_fixup_decls): Remove free-list handling.
3407
fb3f88cc
JH
34082009-10-22 Jan Hubicka <jh@suse.cz>
3409
3410 * lto.c (lto_fixup_jump_functions): New function.
3411 (lto_fixup_decls): Use it.
3412
35f1e9f4
RG
34132009-10-16 Richard Guenther <rguenther@suse.de>
3414
3415 PR lto/41715
3416 * lto.c (lto_fixup_tree): Revert last change.
3417
200c8750
RG
34182009-10-14 Richard Guenther <rguenther@suse.de>
3419
3420 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3421 compatible with the one we replace wrap it around a
3422 VIEW_CONVERT_EXPR.
3423
b1b07c92
RG
34242009-10-09 Richard Guenther <rguenther@suse.de>
3425
3426 PR lto/41635
3427 PR lto/41636
3428 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3429 a file.
3430 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3431 (init_ehdr##BITS): Likewise.
3432
3c2e7d45
JM
34332009-10-08 Joseph Myers <joseph@codesourcery.com>
3434
3435 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3436 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3437 diagnostics.
3438 * lto-lang.c (lto_post_options): Remove trailing "." from
3439 diagnostics.
3440
0d0bfe17
RG
34412009-10-08 Richard Guenther <rguenther@suse.de>
3442
3443 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3444 hash tables.
3445
4bedf19a
JM
34462009-10-07 Joseph Myers <joseph@codesourcery.com>
3447
3448 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3449
b20996ff
JH
34502009-10-07 Jan Hubicka <jh@suse.cz>
3451
3452 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3453 ltrans stage; explain why this is needed and should not.
3454
1a735925
RG
34552009-10-05 Richard Guenther <rguenther@suse.de>
3456
3457 PR lto/41552
3458 PR lto/41487
3459 * lto.c (lto_read_decls): Do not register deferred decls.
3460 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3461 until after reading the IPA summaries.
3462
d7f09764
DN
34632009-10-02 Rafael Avila de Espindola <espindola@google.com>
3464
3465 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3466 (lto-lang.c): Don't include lto/common.h.
3467
34682009-10-02 Rafael Avila de Espindola <espindola@google.com>
3469
3470 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3471 (lto/common.o): Remove.
3472 * common.c: Remove.
3473 * common.h (lto_kind_str): Remove.
3474 (lto_visibility_str): Remove.
3475 (lto_resolution_str): Make it static.
3476
34772009-10-01 Diego Novillo <dnovillo@google.com>
3478
3479 * lto.c (lto_read_decls): Add comment.
3480 Call internal_error instead of gcc_assert.
3481 (lto_resolution_read): Likewise.
3482 (lto_add_all_inlinees): Tidy.
3483 * Make-lang.in: Fix copyright boilerplate.
3484 (lto.pdf): New.
3485 (lto.install-pdf): New.
3486 * lto-tree.h: Fix copyright boilerplate.
3487 * lang-specs.h: Likewise.
3488 Remove ".lto" entry from compilers fragment.
3489 * lto-elf.c: Move inclusion of gelf.h after config.h.
3490 Tidy formatting everywhere.
3491 * lto.h: Fix copyright boilerplate.
3492 Tidy formatting everywhere.
3493 * common.c: Likewise.
3494 * config-lang.in: Likewise.
3495 * common.h: Likewise.
3496 * lto-lang.c: Likewise.
3497
34982009-10-01 Richard Guenther <rguenther@suse.de>
3499
3500 * lto.c (lto_read_section_data): Use plain lseek/read.
3501
35022009-10-01 Richard Guenther <rguenther@suse.de>
3503
3504 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3505 use sysconf to query the system page size.
3506 (lto_file_read): Implement fallback using stdio.
3507 (free_section_data): Likewise.
3508
35092009-09-29 Diego Novillo <dnovillo@google.com>
3510
3511 * lto-lang.c (lto_init): Really fix call to
3512 build_common_builtin_nodes.
3513
35142009-09-29 Diego Novillo <dnovillo@google.com>
3515
3516 * lto-lang.c (lto_init): Fix call to
3517 build_common_builtin_nodes.
3518
35192009-09-29 Richard Guenther <rguenther@suse.de>
3520
3521 PR lto/40754
3522 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3523 in bytes.
3524 (first_data_block): New static variable.
3525 (lto_elf_append_data): Align the first data block in each
3526 section.
3527
35282009-09-28 Diego Novillo <dnovillo@google.com>
3529
3530 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3531 * lto.c (strip_extension): New.
3532 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3533 (lto_execute_ltrans): Tidy.
3534 Do not pass -fwpa nor -fltrans-* to LTRANS.
3535 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3536 * tree.c (need_assembler_name_p): Call
3537 lang_hooks.decls.may_need_assembler_name_p if set.
3538 * varasm.c (default_binds_local_p_1): Remove check for
3539 flag_ltrans.
3540 * varpool.c (decide_is_variable_needed): Do not test for
3541 in_lto_p.
3542
35432009-09-22 Richard Guenther <rguenther@suse.de>
3544
3545 PR lto/39276
3546 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3547 * Make-lang.in: Remove ltrans-driver stuff.
3548 * config-lang.in: Likewise.
3549 * lang.opt (fltrans-driver): Remove.
3550 * lto-lang.c (lto_init_options): Remove code initializing
3551 ltrans_driver.
3552 * ltrans-driver: Remove.
3553
35542009-09-21 Diego Novillo <dnovillo@google.com>
3555
3556 * lto-lang.c (lto_define_builtins): Remove superfluous
3557 calls to targetm.init_builtins and build_common_builtin_nodes.
3558 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3559 build_common_builtin_nodes.
3560 * lto.c (lto_materialize_function): Do nothing if NODE is a
3561 clone.
3562
35632009-09-03 Diego Novillo <dnovillo@google.com>
3564
3565 * lto-elf.c (validate_file): Replace call to
3566 elf_getshstrndx with call to elf_getshdrstrndx.
3567
35682009-08-19 Richard Guenther <rguenther@suse.de>
3569
3570 * lto-lang.c (lto_init): Merge char_type_node with the
3571 appropriately signed variant.
3572
35732009-08-19 Richard Guenther <rguenther@suse.de>
3574
3575 PR lto/41071
3576 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3577 (lto_fixup_type): Re-build the pointer-to chain part two.
3578
35792009-08-19 Richard Guenther <rguenther@suse.de>
3580
3581 PR lto/41071
3582 * lto.c (lto_fixup_type): Re-build the type variant chain.
3583
35842009-08-19 Richard Guenther <rguenther@suse.de>
3585
3586 PR lto/41071
3587 * lto.c (lto_fixup_constructor): New function.
3588 (lto_fixup_tree): Replace all types. Properly fixup
3589 constructors and constants.
3590
35912009-08-14 Richard Guenther <rguenther@suse.de>
3592
3593 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3594 for DECL_LANG_SPECIFIC.
3595
35962009-08-13 Richard Guenther <rguenther@suse.de>
3597
3598 PR lto/41032
3599 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3600
36012009-07-30 Richard Guenther <rguenther@suse.de>
3602
3603 PR lto/40903
3604 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3605 the largest decl for output and free TREE_CHAIN for further
3606 use.
3607
36082009-07-24 Diego Novillo <dnovillo@google.com>
3609
3610 * Make-lang.in: Add empty lto.install-plugin target.
3611
36122009-07-13 Diego Novillo <dnovillo@google.com>
3613
3614 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3615
36162009-07-11 Richard Guenther <rguenther@suse.de>
3617
3618 * lto-lang.c (lto_write_globals): Wrapup global decls.
3619
36202009-07-10 Richard Guenther <rguenther@suse.de>
3621
3622 * lto-lang.c (lto_init): Allocate one more location to make
3623 BUILTINS_LOCATION correct.
3624
36252009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3626
3627 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3628
36292009-07-06 Diego Novillo <dnovillo@google.com>
3630
3631 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3632 TYPE_SIZE_UNIT.
3633
36342009-07-06 Diego Novillo <dnovillo@google.com>
3635
3636 * lto.c (preload_common_nodes): Remove.
3637 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3638 (lto_read_decls): Call lto_data_in_create and
3639 lto_data_in_delete.
3640 (free_decl): Do not call ggc_free.
3641 (lto_main): Call lto_init_reader.
3642 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3643 (lto_init): Initialize main_identifier_node if needed.
3644 Make ptrdiff_type_node be integer_type_node.
3645
36462009-06-19 Diego Novillo <dnovillo@google.com>
3647
3648 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3649 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3650 Remove code guarded by #ifdef LOCAL_TRACE.
3651
36522009-06-18 Diego Novillo <dnovillo@google.com>
3653
3654 * lto.c: Update license to GPLv3.
3655 * lto-elf.c: Likewise.
3656 * common.c: Likewise.
3657 * lto-lang.c: Likewise.
3658 * lto.h: Remove superfluous include files. Update all
3659 users.
3660
36612009-06-17 Diego Novillo <dnovillo@google.com>
3662
3663 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3664
36652009-06-02 Diego Novillo <dnovillo@google.com>
3666
3667 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3668 read in.
3669 (materialize_cgraph): Only materialize nodes that have a
3670 representation on file.
3671
36722009-06-01 Diego Novillo <dnovillo@google.com>
3673
3674 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3675
36762009-05-31 Diego Novillo <dnovillo@google.com>
3677
3678 * lto-lang.c (lto_type_for_mode): Handle all the modes
3679 handled in c_common_type_for_mode.
3680
36812009-05-21 Diego Novillo <dnovillo@google.com>
3682
3683 * lto-elf.c: Always include <gelf.h>.
3684 * config-lang.in (target_libs): Remove.
3685 (build_by_default): Set to no.
3686
36872009-05-15 Diego Novillo <dnovillo@google.com>
3688
3689 * lto.c (lto_materialize_function): Assert that DECL is
3690 not a builtin.
3691 (materialize_cgraph): Don't try to materialize builtin
3692 functions.
3693 * lto-section-out.c (write_symbol_vec): Do not write
3694 builtin functions.
3695
36962009-05-13 Diego Novillo <dnovillo@google.com>
3697
3698 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3699
37002009-05-07 Diego Novillo <dnovillo@google.com>
3701
3702 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3703 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3704 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3705 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3706 (lto_fixup_tree): Call gimple_register_type when *TP is a
3707 type.
3708 (lto_main): Call bitmap_obstack_initialize.
3709
37102009-04-22 Diego Novillo <dnovillo@google.com>
3711
3712 * lto.c (free_section_data): Tidy.
3713 (lto_1_to_1_map): Tidy.
3714 (lto_add_all_inlinees): Tidy.
3715 (prefix_name_with_star): New.
3716 (get_filename_for_set): New.
3717 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3718 to determine what cgraph node sets to write.
3719 Call get_filename_for_set to compute temporary file
3720 names.
3721 (lto_execute_ltrans): Do not execute LTRANS on files with
3722 names that start with '*'.
3723 Move logic to execute LTRANS together so that LTRANS is
3724 invoked only if there are any files to compile.
3725 (do_whole_program_analysis): Only remove output files
3726 that do not start with '*'.
3727
37282009-04-06 Diego Novillo <dnovillo@google.com>
3729
3730 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3731 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3732 (lto_add_all_inlinees): Tidy.
3733
37342009-03-26 Diego Novillo <dnovillo@google.com>
3735
3736 * lto.c: Include gimple.h.
3737 (lto_read_in_decl_state): Call gimple_register_type for
3738 every type in every stream.
3739 (lto_fixup_common): Call gimple_register_type if T has a
3740 type.
3741 (do_whole_program_analysis): Call print_lto_report.
3742 (lto_main): Call print_lto_report after cgraph_optimize.
3743 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3744
37452009-03-24 Diego Novillo <dnovillo@google.com>
3746
3747 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3748 (lto.o): Add dependency on GIMPLE_H.
3749
37502009-03-10 Simon Baldwin <simonb@google.com>
3751
3752 * lto.c (lto_read_all_file_options): Close any open file descriptor
3753 contained in file_data before freeing.
3754
37552009-02-24 Rafael Avila de Espindola <espindola@google.com>
3756
3757 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3758 for a decl in the original bitmap, not a node.
3759 (lto_add_all_inlinees): Remove original nodes that are not needed.
3760 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3761
37622009-02-24 Diego Novillo <dnovillo@google.com>
3763
3764 * lto.c (lto_materialize_function): Update
3765 lto_stats.num_function_bodies.
3766 (get_section_data): Initialize *LEN to 0.
3767 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3768 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3769 Update lto_stats.num_output_files.
3770 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3771 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3772 (lto_main): Initialize lto_stats.
3773 If flag_lto_report is set, call print_lto_report.
3774
37752009-02-19 Diego Novillo <dnovillo@google.com>
3776
3777 Revert
3778
3779 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3780
3781 * lto.c (lto_add_inline_clones): Don't add the
3782 master clone. Check for a decl in the original
3783 bitmap, not a node.
3784 (lto_add_all_inlinees): Remove original nodes
3785 that are not needed.
3786 (lto_scan_statics_in_cgraph_node): Don't care if
3787 the node is the master.
3788 (lto_promote_cross_file_statics): Use a new
3789 context.seen_node_decls for each set
3790
37912009-02-19 Rafael Avila de Espindola <espindola@google.com>
3792
3793 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3794 for a decl in the original bitmap, not a node.
3795 (lto_add_all_inlinees): Remove original nodes that are not needed.
3796 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3797 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3798 for each set
3799
38002009-02-18 Diego Novillo <dnovillo@google.com>
3801
3802 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3803 and TV_WHOPR_WPA_IO.
3804 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3805 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3806 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3807 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3808 depending on command line flags.
3809 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3810 (lto_main): Remove timer uses.
3811
38122009-02-18 Rafael Avila de Espindola <espindola@google.com>
3813
3814 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3815 (lto_wpa_write_files): Update calls to renamed functions.
3816
38172009-02-17 Diego Novillo <dnovillo@google.com>
3818
3819 PR 39203
3820 * lto-lang.c (lto_post_options): Disable -fwhole-program
3821 when running LTRANS.
3822
38232009-02-10 Diego Novillo <dnovillo@google.com>
3824
3825 * lto.c (read_cgraph_and_symbols): Fix comment.
3826
38272009-02-10 Diego Novillo <dnovillo@google.com>
3828
3829 * lto.c (read_cgraph_and_symbols): Read options from all
3830 IL files.
3831
38322009-02-10 Diego Novillo <dnovillo@google.com>
3833
3834 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3835 (materialize_cgraph): Likewise.
3836 (do_whole_program_analysis): Likewise.
3837 (lto_main): Call read_cgraph_and_symbols,
3838 materialize_cgraph and do_whole_program_analysis.
3839
38402009-02-10 Simon Baldwin <simonb@google.com>
3841
3842 * lto.c: Include lto-opts.h.
3843 * (lto_main): Clear file options at loop start, read any saved
3844 options from the first file handled, and re-issue options.
3845 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3846
38472009-02-02 Diego Novillo <dnovillo@google.com>
3848
3849 * lto.c (lto_main): Stop LTO_TIMER and use
3850 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3851
38522009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3853
3854 PR lto/38995
3855 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3856 to POINTER_SIZE.
3857
38582009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3859
3860 * Make-lang.in (LTO_EXE): Link with all
3861 BACKENDLIBS and not only GMPLIBS
3862
38632009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3864
3865 PR bootstrap/38992
3866 * lto-elf.c: Include gelf.h instead of libelf.h.
3867 (lto_elf_file_close): Replace elfx_update_shstrndx with
3868 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3869 gelf_update_ehdr.
3870
38712009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3872
3873 PR middle-end/38996
3874 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3875
38762009-01-26 Diego Novillo <dnovillo@google.com>
3877
3878 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3879
38802009-01-26 Diego Novillo <dnovillo@google.com>
3881
3882 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3883 and rename into gimple_types_compatible_p.
3884
38852009-01-12 Rafael Avila de Espindola <espindola@google.com>
3886
3887 * lto-lang.c (lang_hooks): Remove the const qualifier.
3888
38892009-01-06 Diego Novillo <dnovillo@google.com>
3890
3891 * ltrans-driver: Mark 'all' target as phony.
3892
38932008-12-31 Diego Novillo <dnovillo@google.com>
3894
3895 * ltrans-driver: Execute a NOP action for target 'all'.
3896
38972008-12-19 Diego Novillo <dnovillo@google.com>
3898
3899 * lto.c (lto_1_to_1_map): Tidy.
3900
39012008-12-19 Diego Novillo <dnovillo@google.com>
3902
3903 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3904 be opened, show its name.
3905 * ltrans-driver: If $verbose is set, do not use parallelism.
3906
39072008-12-17 Rafael Avila de Espindola <espindola@google.com>
3908
3909 * lto.c (lto_fixup_function): New.
3910 (lto_fixup_tree): Call lto_fixup_function.
3911
39122008-12-14 Doug Kwan <dougkwan@google.com>
3913
3914 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3915 variables if there is no function.
3916
39172008-12-10 Simon Baldwin <simonb@google.com>
3918
3919 * ltrans-driver: Always run make in silent mode, to avoid make's
3920 trace on stdout interfering with lto-wrapper output.
3921
39222008-12-10 Doug Kwan <dougkwan@google.com>
3923
3924 * lto.c (lto_add_inline_clones): Do not force master clones of
3925 inlined functions already in SET to be static inline.
3926
39272008-12-04 Doug Kwan <dougkwan@google.com>
3928
3929 * lto.c (globalize_context_t): New type to store states in
3930 globalization of cross-file statics.
3931 (globalize_cross_file_statics): New.
3932 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3933 static decls that need to be fixed up.
3934 (lto_scan_statics_in_cgraph_node): Change call interface to use
3935 a globalize_context_t CONTEXT for all states used.
3936 (lto_scan_statics_in_remaining_global_vars): New.
3937 (lto_promote_cross_file_statics): Use new call interface of
3938 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3939 visible vars in the last set.
3940
39412008-12-03 Diego Novillo <dnovillo@google.com>
3942
3943 * lto.c (lto_fixup_tree): Do not emit an error when
3944 PREVAILING throw but T doesn't.
3945
39462008-12-02 Doug Kwan <dougkwan@google.com>
3947
3948 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3949 from code in ...
3950 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3951 variables and functions.
3952 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3953 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3954
39552008-11-29 Diego Novillo <dnovillo@google.com>
3956
3957 * lto.c: Include timevar.h.
3958 (lto_materialize_function): Tidy. Add comments.
3959 (lto_wpa_write_files): Tidy.
3960 (lto_execute_ltrans): Tidy.
3961 (lto_main): Add local variable LTO_TIMER. Initialize it
3962 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3963 Start and stop the timer.
3964 Tidy comments.
3965 * Make-lang.in (lto.o): Add dependency on timevar.h.
3966 * ltrans-driver: React to -v and -save-temps.
3967 Use simple heuristic to determine how much parallelism to
3968 use when executing make.
3969
39702008-11-12 Doug Kwan <dougkwan@google.com>
3971
3972 * lto.c (lto_bitmap_obstack): Remove var.
3973 (lto_materialize_function): Do nothing instead of marking function
3974 body in file if flag_wpa is true.
3975 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3976 (lto_scan_statics_in_cgraph_node): New function.
3977 (lto_promote_cross_file_statics): Same.
3978 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3979 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3980 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3981
39822008-11-09 Diego Novillo <dnovillo@google.com>
3983
3984 * lto/lto.c (lto_fixup_tree): Change error message locus
3985 information to include location of mismatching
3986 declaration.
3987 Use TREE_NO_WARNING to avoid repeated messages.
3988 (lto_main): If lto_fixup_decls emitted any errors, exit.
3989 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3990 (lto_init_options): Don't enable exceptions by default.
3991 (lto_eh_runtime_type): Move to lto-function-in.c
3992 (lto_init_eh): Likewise.
3993 (lto_init): Don't call lto_init_eh.
3994 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3995 libfuncs.h and except.h.
3996
39972008-10-30 Diego Novillo <dnovillo@google.com>
3998
3999 * lto.c (lto_read_decls): Declare debug_main only if
4000 LTO_STREAM_DEBUGGING is enabled.
4001
40022008-10-30 Simon Baldwin <simonb@google.com>
4003
4004 * lto.c (lto_wpa_write_files): Create intermediate files with
4005 make_cwd_temp_file().
4006 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4007 WPA_SAVE_LTRANS is set.
4008 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4009 * ltrans-driver: Do not strip directory from output files.
4010
40112008-10-29 Doug Kwan <dougkwan@google.com>
4012
4013 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4014 DECL.
4015 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4016 (lto/lto-symtab.o): Remove rule.
4017 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4018 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4019 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4020 Remove macros.
4021 lto-symtab.c (File): Move up one level.
4022 lto-lang.c (cgraph.h): Remove include.
4023 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4024 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4025 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4026
40272008-10-24 Rafael Espindola <espindola@google.com>
4028
4029 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4030 non prevailing weak symbols.
4031
40322008-10-24 Rafael Espindola <espindola@google.com>
4033
4034 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4035
40362008-10-24 Rafael Espindola <espindola@google.com>
4037
4038 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4039 different types.
4040
40412008-10-23 Simon Baldwin <simonb@google.com>
4042
4043 * lto-lang.c (input_node): Save the node reference, rather than the
4044 node pointer, in node->inlined_to.
4045 (input_cgraph_1): Convert node references into node pointers.
4046
40472008-10-22 Diego Novillo <dnovillo@google.com>
4048 Rafael Espindola <espindola@google.com>
4049
4050 * lto.c (lto_resolution_read): Tidy.
4051 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4052 abort if RET is NULL.
4053
40542008-10-22 Doug Kwan <dougkwan@google.com>
4055
4056 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4057 exceptions flag is given.
4058 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4059 (lto_init_eh): Remove exceptions flag initialization.
4060 (lto_init): Only call lto_init_eh if exceptions flag is set.
4061
40622008-10-21 Diego Novillo <dnovillo@google.com>
4063
4064 * lto.c: Tidy some formatting.
4065 * lto.h: Likewise.
4066
40672008-10-21 Simon Baldwin <simonb@google.com>
4068
4069 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4070 them is NULL (but not the other).
4071
40722008-10-17 Diego Novillo <dnovillo@google.com>
4073
4074 * ltrans-driver: Divert output from make to a temporary file.
4075 Show it if the call to make failed.
4076
40772008-10-15 Diego Novillo <dnovillo@google.com>
4078
4079 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4080 Do not print TEMP_FILENAME
4081 * ltrans-driver: Call make with -s.
4082
40832008-10-15 Diego Novillo <dnovillo@google.com>
4084
4085 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4086 TREE_STATIC on global symbols.
4087
40882008-10-14 Ollie Wild <aaw@google.com>
4089
4090 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4091 (LTRANS_DRIVER_EXE): Add.
4092 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4093 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4094 (lto.install.common): Remove ltrans-driver.
4095 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4096 (LTRANS_DRIVER_EXE): New build rule.
4097 * config-lang.in (compilers): Add ltrans-driver.
4098
40992008-10-14 Diego Novillo <dnovillo@google.com>
4100
4101 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4102 of program name.
4103
41042008-10-13 Ollie Wild <aaw@google.com>
4105
4106 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4107 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4108 * ltrans-driver (LTRANS_FLAGS): Remove.
4109
41102008-10-08 Doug Kwan <dougkwan@google.com>
4111
4112 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4113 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4114 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4115 from lto_fixup_state to here.
4116 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4117 just a free-list. Fix up types also. Move decl merging code to
4118 lto_fixup_tree.
4119 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4120 object.
4121 (lto_fixup_decls): Use another pointer set to avoid multiple
4122 walking of nodes except for DECLs to be replaced. Pass an
4123 lto_fixup_data_t object to tree-walker.
4124
41252008-10-08 Rafael Espindola <espindola@google.com>
4126
4127 * lto-symtab.c (lto_symtab_set_resolution): New.
4128 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4129 lto_symtab_get_resolution.
4130 (lto_symtab_prevailing_decl): Return decl for non public decls.
4131 (lto_symtab_get_resolution): New.
4132 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4133
41342008-10-06 Rafael Espindola <espindola@google.com>
4135
4136 * lto-lang.c: Include cgraph.h.
4137 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4138 input_cgraph): Moved from lto-cgraph.c.
4139 (LANG_HOOKS_INPUT_CGRAPH): New.
4140
41412008-10-03 Rafael Espindola <espindola@google.com>
4142
4143 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4144
41452008-10-03 Rafael Espindola <espindola@google.com>
4146
4147 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4148 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4149 prevailing definition. Don't mark TREE_NOTHROW differences.
4150 * lto.c (lto_fixup_tree): New.
4151 (lto_fixup_state): New.
4152 (lto_fixup_state_aux): New.
4153 (free_decl): New.
4154 (lto_fixup_decls): New.
4155 (lto_main): Call lto_fixup_decls.
4156
41572008-10-02 Ollie Wild <aaw@google.com>
4158
4159 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4160 and Init.
4161 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4162 * lto-lang.c (lto_post_options): Add validation and fixups for
4163 -fltrans and -fwpa.
4164
41652008-10-02 Rafael Espindola <espindola@google.com>
4166
4167 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4168 lto_symtab_merge_decl): Return void.
4169 (lto_symtab_prevailing_decl): New.
4170
41712008-09-30 Rafael Espindola <espindola@google.com>
4172
4173 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4174 defined symbols.
4175 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4176 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4177 Check for already defined symbols.
4178 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4179 (LTO_IDENTIFIER_RESOLUTION): Remove.
4180 (LTO_DECL_RESOLUTION): New.
4181
41822008-09-30 Rafael Espindola <espindola@google.com>
4183
4184 * lto.c (lto_read_decls): Use new input_tree signature.
4185
41862008-09-26 Doug Kwan <dougkwan@google.com>
4187
4188 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4189 bodies affected by exception attribute merging of DECLs.
4190 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4191 merging.
4192
41932008-09-25 Rafael Espindola <espindola@google.com>
4194
4195 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4196 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4197 * lto-symtab.c (lto_symtab_compatible): New.
4198 (lto_symtab_overwrite_decl): New.
4199 (lto_symtab_merge_decl): Refactor to use the above functions
4200 and the resolution from lang_identifier.
4201 * lto-tree.h: Include plugin-api.h.
4202 (lang_identifier): Add resolution.
4203 (LTO_IDENTIFIER_RESOLUTION): New.
4204
42052008-09-25 Ollie Wild <aaw@google.com>
4206
4207 * lang.opt (fltrans-output-list=): New option.
4208 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4209
42102008-09-25 Rafael Espindola <espindola@google.com>
4211
4212 * lto.c (lto_resolution_read): Initialize ret;
4213
42142008-09-24 Ollie Wild <aaw@google.com>
4215
4216 * lto.c (sys/mman.h): Move include.
4217 (lto_wpa_write_files): Return a list of written files.
4218 (lto_execute_ltrans): New function.
4219 (lto_main): Call lto_execute_ltrans.
4220 (ltrans-driver): New file.
4221 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4222 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4223 (lto_init_options): Initialize ltrans_driver.
4224 (lto_handle_option): Fix incorrect default output value.
4225 * lang.opt (fltrans-driver=): New option.
4226 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4227 (lto.install-common): Add lto/ltrans-driver.
4228
42292008-09-24 Rafael Espindola <espindola@google.com>
4230
4231 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4232 (lto/lto.o): Depend on lto/common.h.
4233 (lto/common.o): New.
4234 * lang.opt (resolution): New.
4235 * lto-lang.c (resolution_file_name): New.
4236 (lto_handle_option): Handle OPT_resolution.
4237 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4238 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4239 pass it to lto_symtab_merge_decl.
4240 * lto.c: Include common.h.
4241 (lto_read_decls): Add resolutions and resolutions_size arguments.
4242 Initialize data_in.globals_resolution and
4243 data_in.globals_resolution_size.
4244 (index_and_symbol_resolution): New.
4245 (lto_resolution_read): New.
4246 (lto_file_read): Add argument resolution_file.
4247 Read resolution.
4248 * lto.h (resolution_file_name): New.
4249
42502008-09-23 Rafael Espindola <espindola@google.com>
4251
4252 * common.c: Update description.
4253 * common.h: Update description.
4254
42552008-09-23 Rafael Espindola <espindola@google.com>
4256
4257 * common.c: Moved from lto-plugin.
4258 * common.h: Moved from lto-plugin.
4259
42602008-09-22 Doug Kwan <dougkwan@google.com>
4261
4262 * lto.c (VEC(bitmap,heap)): Declare.
4263 (lto_materialize_function): Handle WAP mode specially.
4264 (lto_add_inline_clones): New.
4265 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4266 return a bitmap of inlined decls.
4267 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4268 (lto_main): Call reset_inline_failed to reset inlining states.
4269 Check call-graph after WPA inlining.
4270 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4271 unconditionally.
4272
42732008-09-19 Doug Kwan <dougkwan@google.com>
4274
4275 lto.c (lto_main): Remove unsued wrapper code.
4276 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4277
42782008-09-19 Rafael Espindola <espindola@google.com>
4279
4280 * lto-symtab.c: Include lto-tree-in.h.
4281 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4282 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4283 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4284
42852008-09-17 Paolo Bonzini <bonzini@gnu.org>
4286 Rafael Avila de Espindola <espindola@google.com>
4287
4288 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4289 COMPOUND_LITERAL_EXPR_DECL): Remove.
4290 (emit_local_var): Remove.
4291 (lto_expand_expr): Remove.
4292 (lto_staticp): Remove.
4293 (LANG_HOOKS_EXPAND_EXPR): Remove.
4294 (LANG_HOOKS_STATICP): Remove.
4295
42962008-09-11 Diego Novillo <dnovillo@google.com>
4297
4298 * lto-lang.c: Include except.h and libfuncs.h.
4299 (lto_init_eh): New.
4300 (lto_init): Call it.
4301 Set flag_generate_lto to 0.
4302 * Make-lang.in (lto-lang.o): Add dependency on except.h
4303 and libfuncs.h.
4304
43052008-09-09 Bill Maddox <maddox@google.com>
4306
4307 * lto-lang.c: Include header file expr.h.
4308 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4309 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4310 (emit_local_var): Copied from c-semantics.c.
4311 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4312 and c_staticp in c-common.c.
4313 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4314
43152008-09-08 Diego Novillo <dnovillo@google.com>
4316
4317 * lto-lang.c (lto_global_bindings_p): Return 1 during
4318 IPA passes.
4319
43202008-09-07 Diego Novillo <dnovillo@google.com>
4321
4322 * lto.c: Tidy formatting.
4323
43242008-08-04 Bill Maddox <maddox@google.com>
4325
4326 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4327
43282008-09-03 Doug Kwan <dougkwan@google.com>
4329
4330 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4331 CIF_OK instead of NULL.
4332
43332008-09-02 Diego Novillo <dnovillo@google.com>
4334 Simon Baldwin <simonb@google.com>
4335
4336 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4337 c_common_type_for_size.
4338 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4339 (lto_init): Call linemap_add.
4340 (signed_and_unsigned_types): Remove.
4341
43422008-08-29 Diego Novillo <dnovillo@google.com>
4343
4344 * lto-lang.c (handle_noreturn_attribute): New local function.
4345 (handle_const_attribute): New local function.
4346 (handle_malloc_attribute): New local function.
4347 (handle_pure_attribute): New local function.
4348 (handle_novops_attribute): New local function.
4349 (handle_nonnull_attribute): New local function.
4350 (handle_nothrow_attribute): New local function.
4351 (handle_sentinel_attribute): New local function.
4352 (handle_type_generic_attribute): New local function.
4353 (handle_format_attribute): New local function.
4354 (handle_format_arg_attribute): New local function.
4355 (lto_attribute_table): Declare.
4356 (lto_format_attribute_table): Declare.
4357 (lto_init_attributes): New local function.
4358 (lto_define_builtins): Call it.
4359 Call targetm.init_builtins and build_common_builtin_nodes.
4360 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4361 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4362
43632008-08-28 Diego Novillo <dnovillo@google.com>
4364
4365 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4366 $(GIMPLE_H).
4367 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4368 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4369 * lto-symtab.c: Include gimple.h.
4370 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4371 TREE_CHAIN.
4372
43732008-08-27 Doug Kwan <dougkwan@google.com>
4374
4375 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4376 gt-lto-lto.h): New includes.
4377 (lto_materialize_function): Do not read in function body in WPA mode.
4378 Format a line to fit in 80 columns.
4379 (lto_cgraph_node_sets): New garbage collected variable.
4380 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4381 New functions.
4382 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4383 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4384 variable LTO_SECTION_IN_H.
4385 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4386 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4387 with variable LTO_SECTION_IN_H.
4388 * config-lang.in (gtfiles): Add lto/lto.c.
4389 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4390 merged DECL_RESULT correctly.
4391
43922008-08-26 Bill Maddox <maddox@google.com>
4393
4394 * lto-lang.c Include tree-gimple.h.
4395 (lto_mark_addressable): Call mark_addressable rather than
4396 asserting.
4397 (lto_post_options): Suppress debug info generation.
4398 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4399
3f8257db 44002008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4401
4402 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4403 assertion and leave an explanatory comment in its place.
4404
44052008-08-21 Doug Kwan <dougkwan@google.com>
4406
4407 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4408 of common nodes instead of computing locallly.
4409 (lto_read_in_decl_state): New.
4410 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4411 Read global and per-function in-decl states.
4412 * Make-lang.in (LTO_H): Update dependency.
4413 (lto/lto.o): Same.
4414 (lto-symtab.c): Merge (revision 139039)
4415 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4416
44172008-08-21 Rafael Espindola <espindola@google.com>
4418
4419 * config-lang.in (target_libs): New.
4420
44212008-08-20 Bill Maddox <maddox@google.com>
4422
4423 * lto.c (current_lto_file): Remove GTY marker from static
4424 variable. Remove include of file gt-lto-lto.h.
4425 * Make-lang.in: Remove dependency of lto/lto.o on
4426 gt-lto-lto.h.
4427 * lto-elf.c (lto_file_close): Removed.
4428 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4429 allocate lto_elf_file object.
4430 (lto_elf_file_close): Free lto_elf_file object after close.
4431 * lto.h (struct lto_file_struct): Remove GTY marker.
4432 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4433 gtfiles.
4434
44352008-08-20 Bill Maddox <maddox@google.com>
4436
4437 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4438 to conform to its new signature.
4439 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4440 on discarded node here, now called in global_vector_fixup.
4441
44422008-08-09 Bill Maddox <maddox@google.com>
4443
4444 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4445 has not been set to a front-end-specific value.
4446
44472008-08-05 Doug Kwan <dougkwan@google.com>
4448
4449 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4450 build breakage.
4451
44522008-07-30 Bill Maddox <maddox@google.com>
4453
4454 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4455 Remove obsolete comments.
4456 (lto_read_decls): Remove initialization of deleted field data_in.global.
4457 Tidy up comments.
4458 (lto_main): Remove redundant initialization of section_hash_table.
4459 * lto-elf.c: Removed obsolete comments.
4460 * lto.h: Tidy up comments.
4461 * lto-symtab.c (lto_least_common_multiple): New function.
4462 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4463 Tidy up comments.
4464
44652008-07-25 Diego Novillo <dnovillo@google.com>
4466 Bill Maddox <maddox@google.com>
4467
4468 * lto.c: Re-order include files.
4469 Include lto-section-out.h.
4470 (preload_common_nodes): Add debugging output.
4471 Add new local INDEX_TABLE.
4472 Call preload_common_node.
4473 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4474
44752008-07-13 Bill Maddox <maddox@google.com>
4476
4477 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4478 unwanted scaling during pointer addition.
4479
44802008-07-11 Bill Maddox <maddox@google.com>
4481 Diego Novillo <dnovillo@google.com>
4482
4483 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4484 Make code const-correct.
4485 (lto_file_read): Fix C++ compatibility warnings.
4486 (lto_read_section_data): Fix C++ compatibility warnings.
4487 (lto_get_section_data): Use CONST_CAST to avoid warning when
4488 const pointer passed to free.
4489 * lto-elf.c (lto_elf_build_section_table): Fix C++
4490 compatibility warnings.
4491 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4492 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4493 (lto_get_current_out_file): Fix C++ compatibility warnings.
4494
44952008-07-11 Diego Novillo <dnovillo@google.com>
4496
4497 * Make-lang.in (lto-warn): Define.
4498
44992008-07-03 Simon Baldwin <simonb@google.com>
4500
4501 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4502 LTO_STREAM_DEBUGGING.
4503
45042008-06-27 Ollie Wild <aaw@google.com>
4505
4506 * lto-elf.c (lto-section-out.h): New include.
4507 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4508 and data members.
4509 (cached_file_attrs): New static variable.
4510 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4511 Use cached_file_attrs for checking bits.
4512 (lto_elf_build_section_table): Remove elf_file argument from
4513 lto_elf_get_shdr and lto_elf_free_shdr calls.
4514 (DEFINE_INIT_SHDR): New macro.
4515 (init_shdr32, init_shdr64): New functions defined via the
4516 DEFINE_INIT_SHDR macro.
4517 (lto_elf_begin_section_with_type): New function.
4518 (lto_elf_begin_section): New function.
4519 (lto_elf_append_data): New function.
4520 (lto_elf_end_section): New function.
4521 (DEFINE_VALIDATE_EHDR): New macro.
4522 (validate_ehdr32, validate_ehdr64): New functions defined via the
4523 DEFINE_VALIDATE_EHDR macro.
4524 (validate_file): New function.
4525 (DEFINE_INIT_EHDR): New macro.
4526 (init_ehdr32, init_ehdr64): New functions defined via the
4527 DEFINE_INIT_EHDR macro.
4528 (init_ehdr): New function.
4529 (lto_elf_file_open): Add support for writable files. Move some
4530 validation logic to validate_file.
4531 (lto_elf_file_close): Add support for writable files. Write file data
4532 and free data blocks.
4533 (current_out_file): New static variable.
4534 (lto_set_current_out_file): New function.
4535 (lto_get_current_out_file): New function.
4536 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4537 Add temporary initialization for testing ELF serialization.
4538 * lto.h (lto-section-out.h): New include.
4539 (struct lto_file_struct): Slight modification to comment.
4540 (lto_elf_file_open): Add writable parameter.
4541 (lto_elf_begin_section): New function declaration.
4542 (lto_elf_append_data): New function declaration.
4543 (lto_elf_end_section): New function declaration.
4544 (lto_set_current_out_file, lto_get_current_out_file): New function
4545 declarations.
4546 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4547 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4548 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4549 * Make-lang.in (LTO_H): Add lto-section-out.h.
4550
45512008-06-12 Ollie Wild <aaw@google.com>
4552
4553 * lto.h (struct lto_file_vtable_struct): Remove.
4554 (struct lto_file_struct): Remove vtable member.
4555 * lto-elf.c (lto_file_init): Remove vtable argument.
4556 (lto_elf_map_optional_lto_section): Remove.
4557 (lto_elf_unmap_section): Remove.
4558 (lto_elf_file_vtable): Remove.
4559 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4560 lto_file_init call.
4561 (lto_elf_find_section_data): Remove.
4562
45632008-06-11 Ollie Wild <aaw@google.com>
4564
4565 * lto.c (lto_file_read): Add const qualifier to data variable.
4566
45672008-06-11 Diego Novillo <dnovillo@google.com>
4568
4569 Merge from lto-streamber sub-branch.
4570
4571 2008-06-04 Ollie Wild <aaw@google.com>
4572
4573 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4574 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4575
4576 2008-05-28 Bill Maddox <maddox@google.com>
4577
4578 Replace the DWARF reader in the LTO front-end.
4579
4580 * lto.c: Include lto-tree-in.h, lto-tags.h.
4581 (enum DWARF2_class, DW_cl_constant, struct
4582 DWARF2_form_data, struct lto_context,
4583 lto_fd_init, lto_info_fd_init,
4584 lto_abbrev_fd_init, lto_info_fd_close,
4585 lto_file_init, lto_file_close,
4586 lto_file_corrupt_error, lto_abi_mismatch_error,
4587 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4588 lto_read_uleb128, lto_read_sleb128,
4589 lto_read_initial_length, lto_abbrev_read_attrs,
4590 lto_abbrev_read, lto_abbrev_read_lookup,
4591 lto_read_section_offset,
4592 lto_read_comp_unit_header, find_cu_for_offset,
4593 lto_get_file_name,
4594 lto_resolve_reference,lto_read_form,
4595 attribute_value_as_int,
4596 make_signed_host_wide_int,
4597 attribute_value_as_constant, lto_cache_hash,
4598 lto_cache_eq, lto_cache_store_DIE,
4599 lto_cache_lookup_DIE, lto_find_integral_type,
4600 lto_find_integral_type_1,
4601 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4602 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4603 lto_unsupported_attr_error, lto_get_identifier,
4604 lto_read_referenced_type_DIE,
4605 lto_read_compile_unit_DIE,
4606 lto_read_array_type_DIE,
4607 lto_read_structure_union_class_type_DIE,
4608 lto_read_enumerator_DIE,
4609 lto_read_enumeration_type_DIE,
4610 lto_read_only_for_child_DIEs,
4611 lto_read_only_for_child_DIEs,
4612 lto_read_member_DIE, lto_read_abbrev,
4613 lto_read_variable_formal_parameter_constant_DIE,
4614 lto_get_body): Removed.
4615 (preload_common_nodes): New function.
4616 (lto_read_decls): Convert for new global streamer.
4617 (lto_materialze_file_data,
4618 lto_read_subroutine_type_subprogram_die,
4619 lto_read_unspecified_parameters_DIE,
4620 lto_read_typedef_DIE,
4621 lto_read_pointer_reference_type_DIE,
4622 lto_read_subrange_type_DIE,
4623 lto_read_base_type_DIE,
4624 lto_read_const_volatile_restrict_type_DIE,
4625 lto_read_namespace_DIE,
4626 lto_read_unspecified_type_DIE, lto_read_DIE,
4627 lto_read_child_DIEs, lto_collect_child_DIEs):
4628 Removed.
4629 (lto_info_read, lto_set_cu_context): Removed.
4630 (lto_file_read): Convert for new global streamer.
4631 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4632 lto_resolve_var_ref, lto_resolve_fn_ref,
4633 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4634 lto_resolve_namespacedecl_ref): Removed.
4635 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4636 * lto-tree.h (lto_symtab_merge_var,
4637 lto_symtab_mergee_fun): Declare here.
4638 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4639 (lto_elf_file_open): Removed code to read DWARF debug sections.
4640 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4641 DWARF2_CompUnit, lto_die_ptr,
4642 lto_die_cache_entry, lto_fd, lto_info_fd,
4643 lto_abbrev_fd): Removed.
4644 (lto_file): Removed debug_info and debug_abbrev fields.
4645 (lto_ref): Removed.
4646 (lto_file_init, lto_file_close,
4647 lto_resolve_type_ref, lto_resolve_var_ref,
4648 lto_resolve_fn_ref, lto_resolve_field_ref,
4649 lto_resolve_typedecl_ref,
4650 lto_resolve_namespacedecl_ref,
4651 lto_get_file_name): Removed declarations.
4652 (lto_symtab_merge_var, lto_symtab_merge_fn):
4653 Declarations moved to lto-tree.h.
4654 * lto-symtab.c (lto_compatible_attributes_p):
4655 Lobotomize this, as it barfs on "Hello, world!".
4656 * lto-section-out.c: Include lto-tree-out.h.
4657 (lto_hash_global_slot_node,
4658 lto_eq_global_slot_node, preload_common_nodes,
4659 write_global_stream, write_global_references):
4660 New functions.
4661 (produce_asm_for_decls): Convert for new global streamer.
4662 * lto-section-out.h (lto_hash_global_slot_node,
4663 lto_eq_global_slot_node): Declare.
4664
3f8257db 46652008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4666 Jan Hubicka <jh@suse.cz>
4667
4668 * lto.c (sys/mman.h, tree-pass.h): New includes.
4669 (lto_materialize_constructors_and_inits,
4670 lto_materialize_function): Keeps length of section.
4671 (lto_materialize_cgraph): Removed.
4672 (lto_read_decls): Initialize fd field.
4673 (lto_file_read): Different return type and removed much code to
4674 lto_main.
4675 (page_mask): New variable.
4676 (lto_read_section_data, get_section_data, free_section_data): New
4677 functions.
4678 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4679 passes can get the section data.
4680
3f8257db 46812008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4682
4683 * lto.h (lto_read_decls): Made local.
4684 (lto_input_function_body, lto_input_constructors_and_inits,
4685 lto_input_cgraph): Declarations moved to lto-section-in.h.
4686 * lto-section-in.c: Moved to .. .
4687 * lto-cgraph-in.c: Ditto.
4688 * lto-section-in.h: Ditto.
4689 * lto-function-in.c: Ditto.
4690 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4691 (lto_insert_block): Removed.
4692 (LANG_HOOKS_INSERT_BLOCK): Removed.
4693 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4694 lto-section-in.o): Rules moved to lto/Makefile.in.
4695
4696
46972008-05-16 Ollie Wild <aaw@google.com>
4698
4699 * lto-lang.c (tree-inline.h): Include.
4700 (lto_post_options): New function.
4701 (LANG_HOOKS_POST_OPTIONS): Define.
4702 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4703 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4704
47052008-05-13 Diego Novillo <dnovillo@google.com>
4706
4707 * lto-function-in.c (input_ssa_names): Call
4708 make_ssa_name_fn instead of make_ssa_name.
4709
47102008-05-12 Diego Novillo <dnovillo@google.com>
4711
4712 * lto-cgraph-in.c (overwrite_node): Update references to
4713 inline summary fields.
4714 * lto-function-in.c (input_expr_operand): Do not handle
4715 STRUCT_FIELD_TAG.
4716
47172008-05-09 Ollie Wild <aaw@google.com>
4718
4719 * lang.opt: New file.
4720 * lto-lang.c (lto_init_options): New function.
4721 (lto_handle_option): New function.
4722 (lto_init): Move initialization of flag_unit_at_a_time to
4723 lto_init_options.
4724 (LANG_HOOKS_INIT_OPTIONS): Define.
4725 (LANG_HOOKS_HANDLE_OPTION): Define.
4726
47272008-04-29 Ollie Wild <aaw@google.com>
4728
4729 * lto.c (lto_read_namespace_DIE): New function.
4730 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4731 NAMESPACE_DECL DIE's.
4732 (lto_resolve_namespacedecl_ref): New function.
4733 * lto.h (lto_resolve_namespacedecl_ref): New function.
4734 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4735 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4736 and num_namespace_decls.
4737 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4738 * lto-lang.c (lto_init_ts): New function.
4739 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4740
47412008-04-16 Ollie Wild <aaw@google.com>
4742
4743 * lto-function-in.c (input_type_ref): Updated function description.
4744
47452008-04-16 Ollie Wild <aaw@google.com>
4746
4747 * lto-function-in.c (input_type_ref_1): New function.
4748 (input_type_ref): Split into two functions.
4749 (input_function): Add support for type contexts.
4750
47512008-04-16 Ollie Wild <aaw@google.com>
4752
4753 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4754 section name
4755
47562008-04-16 Ollie Wild <aaw@google.com>
4757
4758 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4759 list of supported languages.
4760
3f8257db 47612008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4762
4763 Merge with mainline @133491.
4764
3f8257db 47652008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4766 Jan Hubicka <jh@suse.cz>
4767
4768 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4769 fd->unmaterialized_fndecls.
4770 (lto_get_file_name, lto_materialize_cgraph): New function.
4771 (lto_materialize_constructors_and_inits,
4772 lto_materialize_function): Read info directly from elf file.
4773 (lto_file_read): Made local and initialize dictionary so that
4774 other lto sections can be read without reprocessing the elf file.
4775 (lto_main): Read all functions after all files have been processed
4776 for their types, globals and cgraph.
4777 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4778 dependencies.
4779 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4780 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4781 (lto_elf_read_symtab): Removed function.
4782 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4783 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4784 (lto_file_read): Made local.
4785 (lto_get_file_name, lto_elf_build_section_table,
4786 lto_input_cgraph):
4787 New function.
4788 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4789 New functions.
4790 (lto_read_decls): Get the file name.
4791 * lto-cgraph-in.c: New file.
4792 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4793 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4794 (input_labels): Fixed latent sizeof issue.
4795 (input_function): Build stmt array to set call sites into cgraph
4796 edges.
4797 (lto_read_body): Reset cfun->curr_properties.
4798 * lto_section_in.h (lto_section_slot): New structure.
4799 (section_hash_table.lto_file_decl_data): New field.
4800
4801
3f8257db 48022008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4803
4804 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4805 reconstruct static initializers.
4806 (lto_get_body, lto_materialize_function): Add lto_section_type as
4807 a parameter.
4808 (lto_materialize_constructors_and_inits,
4809 lto_materialize_file_data): New function.
4810 (lto_materialize_function,
4811 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4812 unmap_section and map_fn_body to map_section.
4813 (lto_set_cu_context): Process functions and static inits
4814 differently.
4815 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4816 lto/lto-section-in.o): Update dependencies.
4817 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4818 lto_section_type parameter.
4819 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4820 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4821 renamed the other two so that there is only one map function and
4822 one unmap function and each takes a section type parameter.
4823 (lto_read_function_body): Renamed to lto_input_function_body and
4824 added file_data parameter.
4825 (lto_read_var_init): Removed.
4826 (lto_input_constructors_and_inits): New function.
4827 * lto-section-in.c (lto_read_decls): New function.
4828 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4829 var_decls, type_decls, types to lto_file_decl_data.
4830 (input_type_ref, input_expr_operand, lto_read_body): Get
4831 field_decls, fn_decls, var_decls, type_decls, types from different
4832 structure.
4833 (input_globals, input_constructor, lto_read_var_init): Removed.
4834 (input_constructors_or_inits): New function.
4835 (lto_read_function_body, lto_input_constructors_and_inits):
4836 Renamed to lto_input_function_body and takes file_data parameter.
4837 * lto-section-in.h (lto_file_decl_data): New structure.
4838
3f8257db 48392008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4840
4841 * lto-function-in.c (input_globals.c): Changed input type to
4842 lto_function_header.
4843 (input_bb): Removed code to deserialize the stmt number.
4844 (input_function): Renumber all stmts after they are input.
4845 (lto_read_body, lto_read_function_body, lto_read_var_init):
4846 Changed to used new header format and enum section_type.
4847 *lto-lang.c (success): Removed.
4848
48492008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4850
4851 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4852 (lto_elf_free_sym): Likewise.
4853
4854 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4855 (lto_elf_build_init): Likewise.
4856
3f8257db 48572008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4858
4859 * lto-read.c: Renamed to lto-function-in.c.
4860 (input_1_unsigned): Moved to lto-section-in.c and renamed
4861 lto_input_1_unsigned.
4862 (input_uleb128): Moved to lto-section-in.c and renamed
4863 lto_input_uleb128.
4864 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4865 lto_input_widest_uint_uleb128.
4866 (input_sleb128): Moved to lto-section-in.c and renamed
4867 lto_input_sleb128.
4868 (input_integer): Moved to lto-section-in.c and renamed
4869 lto_input_integer.
4870 (debug_in_fun): Moved to lto-section-in.c and renamed
4871 lto_debug_in_fun.
4872 (input_block): Moved to lto-section-in.h and renamed
4873 lto_input_block.
4874 (input_expr_operand): Fixed to allow lists with more than one
4875 element.
4876 * lto-section-in.h: New file.
4877 * lto-section-in.c: New file with changes from above.
4878 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4879 (lto-section-in.o): New rule.
4880
48812007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4882
4883 * lto-read.c (input_expr_operand): Mark static and external
4884 VAR_DECLs as needed.
4885
48862007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4887
4888 * lto-read.c (input_integer): Use the correct shift amount.
4889
48902007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4891
4892 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4893 (LANG_HOOKS_NAME): Define.
4894
48952007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4896
4897 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4898 original function to...
4899 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4900 don't have a base type.
4901 (lto_read_enumeration_type_DIE): Examine the values of the
4902 enumeration to determine whether we can use an unsigned type for
4903 the base type of the enumeration.
4904
49052007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4906
4907 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4908 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4909
49102007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4911
4912 * lto-lang.c (lto_types_compatible_p): New function.
4913 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4914
49152007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 4916 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4917
4918 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4919 (input_local_vars): Read in DECL_INITIAL and context for local
4920 statics that need to be put in unexpanded_vars_list.
4921
49222007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4923
4924 * lto-read.c (input_real): Use a separate null-terminated buffer
4925 for calling real_from_string.
4926 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4927 tell cgraph that it's needed.
4928
49292007-12-19 Doug Kwan <dougkwan@google.com>
4930
4931 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4932
49332007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4934
4935 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4936 (lto_file_read): Reset the members of 'context' every time we read
4937 a toplevel DIE, with special attention to last_param_type.
4938
49392007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4940
4941 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4942 'declaration'. Set the assembler name for non-public functions.
4943
3f8257db 49442007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4945
4946 * lto_read.c (data_in.unexpanded_indexes): New array.
4947 (input_local_var): Added code to read in unexpanded_var_list
4948 indexes for variables. Only read in DECL_CHAIN field for
4949 parameters.
4950 (input_local_vars): Added code to rebuild unexpanded_var_list in
4951 order using unexpanded_indexes.
4952 (input_function): Added code to set DECL_CONTEXT for functions.
4953
49542007-12-13 Doug Kwan <dougkwan@google.com>
4955
4956 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4957 in pointer and reference types.
4958
49592007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4960
4961 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4962 RESULT_DECL.
4963
49642007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4965
4966 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4967 already read the DIE.
4968 (lto_get_body): New function, split out from...
4969 (lto_materialize_function): ...here. Call it.
4970 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4971 determine DECL_EXTERNAL.
4972 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4973 FUNCTION_DECLs when necessary. Use the type of the actual
4974 function definition if we are unable to easily merge types. Ignore
4975 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4976 necessary.
4977
49782007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4979
4980 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4981
49822007-12-12 Bill Maddox <maddox@google.com>
4983
4984 Revert
4985 2007-12-07 Bill Maddox <maddox@google.com>
4986
4987 * lto.c (lto_str_fd_init): New function.
4988 (lto_str_fd_close): New function.
4989 (lto_file_init): Call lto_str_fd_init.
4990 (lto_file_close): Call lto_str_fd_close.
4991 (lto_str_read): New function. Read debug string table.
4992 (lto_str_lookup): New function. Get string for debug
4993 string table offset.
4994 (lto_read_form): Recognize DW_FORM_strp.
4995 (lto_file_read): Invoke lto_str_read.
4996
4997 * lto-elf.c (lto_elf_file_open): Read raw section data
4998 for the .debug_str section, if present.
4999
5000 * lto.h (struct lto_str_fd_struct): New struct.
5001 (struct lto_file_struct): Added new field DEBUG_STR
5002 to hold the file descriptor for the debug string table.
5003
50042007-12-07 Bill Maddox <maddox@google.com>
5005
5006 * lto.c (lto_str_fd_init): New function.
5007 (lto_str_fd_close): New function.
5008 (lto_file_init): Call lto_str_fd_init.
5009 (lto_file_close): Call lto_str_fd_close.
5010 (lto_str_read): New function. Read debug string table.
5011 (lto_str_lookup): New function. Get string for debug
5012 string table offset.
5013 (lto_read_form): Recognize DW_FORM_strp.
5014 (lto_file_read): Invoke lto_str_read.
5015
5016 * lto-elf.c (lto_elf_file_open): Read raw section data
5017 for the .debug_str section, if present.
5018
5019 * lto.h (struct lto_str_fd_struct): New struct.
5020 (struct lto_file_struct): Added new field DEBUG_STR
5021 to hold the file descriptor for the debug string table.
5022
50232007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5024
5025 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5026 Grow the basic_block_info and label_to_block_map vectors if
5027 necessary. Read in the block chain.
5028
50292007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5030
5031 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5032
50332007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5034
5035 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5036
50372007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5038
5039 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5040 (lto_read_body): Don't declare PROP_alias.
5041
50422007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5043
5044 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5045 argument type information.
5046
50472007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5048
5049 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5050 TREE_THIS_VOLATILE if the associated type is a volatile type.
5051 (lto_materialize_function): Remove call to init_ssa_operands.
5052 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5053 variable when reading an SSA_NAME. Do the same when reading a
5054 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5055 (input_cfg): Call init_ssa_operands.
5056 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5057 Move call to init_tree_ssa...
5058 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5059 add_referenced_var on any variables referenced from the body of the
5060 function. Inform the rest of the compiler we are in SSA form and
5061 inform later passes about the current properties.
5062
50632007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5064
5065 * lto.c (lto_materialize_function): Add FIXME.
5066
50672007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5068
5069 * lto-lang.c (enum built_in_attribute): New enum.
5070 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5071 built_in_attributes): New variables.
5072 (def_builtin_1): New function.
5073 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5074
50752007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5076
5077 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5078 DECL_SOURCE_LOCATION for debugging purposes.
5079 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5080 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5081 laying out the decl until later.
5082 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5083 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5084 TREE_ADDRESSABLE.
5085 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5086 operand of an ADDR_EXPR.
5087 * lto-lang.c (enum lto_builtin_type): New enum.
5088 (builtin_type): New typedef.
5089 (builtin_types, string_type_node, const_string_type_node,
5090 wint_type_node, intmax_type_node, uintmax_type_node,
5091 signed_size_type_node): New variables.
5092 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5093 lto_build_c_type_nodes): New functions.
5094 (lto_init): Initialize builtin types.
5095 (lto_set_decl_assembler_name): Let the target machine mangle the
5096 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5097
50982007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5099
5100 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5101 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5102 the type is a constant type. Set the assembler name and inform
5103 the rest of the compiler about the new decl if the decl is not
5104 public.
5105 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5106 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5107 try to read in function bodies for functions that already have bodies.
5108 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5109 equivalency.
5110 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5111 Check for whether we matched a builtin function type before calling
5112 lto_same_type_p on the generated type. Permit cases where the
5113 declaration of an array is unbounded, but the definition is bounded.
5114 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5115 DECL_SIZE_UNIT if necessary.
5116
3f8257db 51172007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5118
5119 * lto-read.c (input_expr_operand): Get types right
5120 for COMPLEX_CST.
5121
3f8257db 51222007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5123
5124 * lto-read.c (make_new_block, input_cfg): Properly set
5125 n_basic_blocks.
5126
51272007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5128
5129 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5130 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5131
51322007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5133
5134 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5135 construct the integer type for bitfields.
5136
3f8257db 51372007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5138
5139 * lto-read.c (data_in.current_node_has_loc): Removed.
5140 (input_line_info): Returns true if node needs line set.
5141 (set_line_info): Always sets line if called.
5142 (clear_line_info): Removed reference to current_node_needs_loc.
5143 (input_expr_operand): Keeps track locally if current node needs a loc.
5144 (input_local_var): Added code to handle DECL_INITIAL for
5145 static local vars. Only set loc if necessary.
5146
51472007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5148
5149 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5150 DECL_CONTEXT.
5151
51522007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5153
5154 * lto.c: Include langhooks.h.
5155 (lto_find_integral_type): Rework logic to handle the case where
5156 got_byte_size is true, but the bitsize requested and that of the
5157 base_type doesn't match.
5158 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5159 asm_name if we are creating a VAR_DECL.
5160 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5161 definition.
5162 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5163 function reference and use the builtin's decl if so. Set the
5164 DECL_CONTEXT of the RESULT_DECL for the function.
5165 * lto-lang.c (registered_builtin_fndecls): New variable.
5166 (lto_getdecls): Return it.
5167 (lto_builtin_function): Chain the new decl onto
5168 registered_builtin_fndecls.
5169
3f8257db 51702007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5171
5172 * lto-read.c (process_tree_flags, lto_static_init_local):
5173 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5174 (input_line_info, clear_line_info): Fixed new line number code.
5175 (input_expr_operand): Added type to SWITCH_EXPR.
5176 (lto_read_body): Properly initialized data_in.
5177 Clear line info when leaving.
5178
51792007-11-13 Diego Novillo <dnovillo@google.com>
5180
5181 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5182 Initialize ARTIFICIAL.
5183 (lto_read_subroutine_type_subprogram_DIE): Initialize
5184 SAVED_SCOPE.
5185 * lto-read.c (set_line_info): Remove ; from calls to
5186 LINEMAP_POSITION_FOR_COLUMN.
5187
3f8257db 51882007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5189
5190 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5191 (input_expr_operand, input_local_var): Renamed get_type_ref to
5192 input_type_ref.
5193 (input_expr_operand): Get the types correct for
5194 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5195
51962007-11-13 Doug Kwan <dougkwan@google.com>
5197
5198 * lto-read.c (input_widest_uint_uleb128): New function.
5199 (input_tree_flags, process_tree_flags, input_line_info,
5200 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5201 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5202 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5203 (lto_static_init_local): Add code to assert that lto_flags_type is
5204 wide enough.
5205
52062007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5207
5208 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5209 (lto_read_subroutine_type_subprogram_DIE): Handle
5210 DW_AT_static_link and DW_AT_specification. Return the
5211 specification if present.
5212 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5213
52142007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5215
5216 * lto-lang.c: Include target.h.
5217 (registered_builtin_types): New variable.
5218 (lto_type_for_mode): Increase number of modes handled.
5219 (lto_builtin_function): Fix argument list and return the decl.
5220 (lto_register_builtin_type): New function.
5221 (lto_init): Initialize target builtins and language-independent
5222 nodes.
5223 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5224
3f8257db 52252007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5226
5227 * lto-read.c (input_expr_operand): Added code to properly handle
5228 index filed. Added new RANGE_EXPR case.
5229
3f8257db 52302007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5231
5232 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5233 (data_in): Added current_node_has_loc field.
5234 (input_line_info, set_line_info, clear_line_info): Added a support
5235 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5236 did not have on on the source side.
5237 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5238 numbers too.
5239
52402007-11-09 Doug Kwan <dougkwan@google.com>
5241
5242 * lto-read.c (input_expr_operand): Change type of operand 2 of
5243 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5244
52452007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5246
5247 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5248 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5249 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5250 the new decl we are creating. Move informing the middle end about
5251 the new decl to...
5252 (lto_main): ...here. Inform the middle end about global variables
5253 after we have read in all the input files.
5254 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5255 variables with internal linkage, so delete the check for internal
5256 linkage. Combine TREE_PUBLIC flags.
5257
52582007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5259
5260 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5261 DW_AT_decl_line.
5262 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5263 builtin specially. Move check for attribute compatibility
5264 earlier.
5265
52662007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5267
5268 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5269 * config-lang.in (gtfiles): Add lto.h and lto.c.
5270 * lto-elf.c: Include ggc.h.
5271 (lto_elf_file_open): Allocate elf_file from GC memory.
5272 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5273 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5274 in GC memory.
5275 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5276 (lto_file_close): Free file from GC memory.
5277 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5278 (lto_read_member_DIE): Fix declaration.
5279 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5280 in GC memory.
5281 (current_lto_file): New variable.
5282 (lto_main): Use it.
5283 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5284 lto_die_cache_entry): Move to...
5285 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5286 declarations accordingly.
5287 (struct lto_file_struct): Declare.
5288 (lto_file_vtable): Use it instead of lto_file.
5289
52902007-11-06 Alon Dayan <alond@il.ibm.com>
3f8257db 5291 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5292
5293 * lto-read.c (process_flags, lto_static_init_local):
5294 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5295 change global array num_flags_for_code to flags_length_for_code.
5296 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5297
52982007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5299
5300 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5301 layout functions to compute information about the newly constructed
5302 type.
5303
53042007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5305
5306 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5307 case to use DECL_RESULT if necessary.
5308
3f8257db 53092007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5310
5311 * lto-read.c (input_tree_list): Removed.
5312 (input_tree_flags): Added parameter to force flags no matter what
5313 tree code.
5314 (input_expr_operand): Added parameter to input_tree_flags.
5315 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5316 input_expr_operand rather than input_tree_lists.
5317 (input_local_var): Use input_expr_operand to read attributes
5318 rather then input_tree_list.
5319 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5320
53212007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5322
5323 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5324 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5325 TYPE_DECL for it.
5326 * lto-read.c (lto_read_body): Use correct sizes for calculating
5327 type_decls_offset and types_offset.
5328
53292007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5330
5331 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5332 with GENERIC_NEXT.
5333 * config-lang.in (gtfiles): Add lto-lang.c.
5334 * lto-lang.c: Include gt-lto-lto-lang.h.
5335 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5336 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5337 (lto/lto-read.o): Likewise.
5338
3f8257db 53392007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5340
5341 * lto-read.c (data_in): Added type_decls and current_col fields.
5342 (string_slot): New type to hold canonized file name.
5343 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5344 input_line_info, set_line_info, clear_line_info): New functions.
5345 (file_name_hash_table): New hash table.
5346 (input_local_var, input_labels, input_local_vars_index,
5347 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5348 (input_uleb128): Changed type of byte var.
5349 (input_expr_operand): Large number of changes to get line numbers
5350 correct. Added TYPE_DECL case.
5351 (input_globals): Added code to get TYPE_DECLs processed.
5352 (input_local_var): Added code to process line numbers and
5353 TREE_CHAIN and DECL_CONTEXT.
5354 (input_function, input_constructor): Added call to
5355 clear_line_number.
5356 (lto_static_init_local): Added code to get line numbers correct.
5357 (lto_read_body): Added code to get TYPE_DECLS read and to change
5358 parameters to the calls above that had their parms reorganized.
5359
5360
53612007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5362
5363 * lto.h (lto_resolve_typedecl_ref): Declare.
5364 * lto.c (lto_resolve_typedecl_ref): New function.
5365
53662007-10-29 Mark Mitchell <mark@codesourcery.com>
5367 Nathan Froyd <froydnj@codesourcery.com>
5368
5369 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5370 DIEs even if we find an abstract origin for this DIE.
5371
53722007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5373
5374 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5375 RESULT_DECL slightly earlier. Only remember the decl for later
5376 if we successfully merge declarations.
5377
3f8257db 53782007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5379
5380 * lto-read.c (input_expr_operand): Give label_values the proper
5381 context and provide switch statements with a default type.
5382
53832007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5384
5385 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5386 * lto.c (lto_materialize_function): ...to here.
5387
53882007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5389
5390 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5391 * lto.c (lto_info_fd_init): Initialize it.
5392 (lto_info_fd_close): Free it.
5393 (lto_materialize_function): New function.
5394 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5395 unmaterialized_fndecls.
5396 (lto_file_read): Read in all the function bodies after we have read
5397 all of the DWARF info.
5398 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5399 reading a function body.
5400
3f8257db 54012007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5402
5403 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5404 semetric with output_tree_flags. Added call to log flags.
5405 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5406 type issues to make everything consistent with flags being
5407 unsigned HOST_WIDE_INTS.
5408 (input_expr_operand): Added call to
5409 recompute_tree_invariant_for_addr_expr.
5410 (input_local_var): Added debugging for tree_chains. Now calls
5411 input_tree_flags.
5412 (input_phi): Made flags unsigned HOST_WIDE_INT.
5413 (input_ssa_names): Now calls input_tree_flags.
5414 (lto_read_body): Now sets cfun.
5415 (lto_read_function_body): Now sets current_function_pointer.
5416
54172007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5418
5419 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5420 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5421 inspecting fields within.
5422 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5423 handle this appropriately.
5424
54252007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5426
5427 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5428 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5429 both DW_AT_abstract_origin and DW_AT_specification.
5430 (lto_read_subroutine_type_subprogram_DIE): Handle
5431 DW_AT_abstract_origin.
5432 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5433 (lto_read_DIE_at_ptr): Define as static to match declaration.
5434 Lookup the PTR in the cache before reading it from the file.
5435 (lto_resolve_var_ref): Adjust accordingly.
5436 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5437 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5438
54392007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5440
5441 * lto.c (lto_read_DIE_at_ptr): New function.
5442 (lto_resolve_var_ref): Use it.
5443 (lto_resolve_fn_ref): Use it.
5444 (lto_resolve_field_ref): Use it.
5445 (lto_read_variable_formal_parameter_constant_DIE): Follow
5446 DW_AT_specification and return the associated decl when appropriate.
5447
54482007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5449
5450 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5451 Implement for scalar integer modes.
5452 (lto_init): Initialize size_type_node.
5453
3f8257db 54542007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5455
5456 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5457 (input_local_var): Add chaining for params.
5458 (input_ssa_names): Add cfun parameter.
5459 (input_function): Remove unnecessary else.
5460
54612007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5462
5463 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5464 (lto_resolve_var_ref): Use proper types.
5465 (lto_resolve_fn_ref): Likewise.
5466 (lto_resolve_field_ref): Likewise.
5467
54682007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5469
5470 * lto-read.c (input_expr_operand): Remove case.
5471
54722007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5473
5474 * lto.c (lto_read_only_for_child_DIEs): New function.
5475 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5476 * lto-elf.c (lto_elf_map_lto_section): Remove.
5477 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5478 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5479 SSA_NAME. Add missing case for mechanical codes.
5480 (input_cfg): Use basic_block_info_for_function instead of
5481 basic_block_info.
5482
3f8257db 54832007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5484
5485 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5486 (input_list): Renamed input_tree_list and modified to follow same
5487 protocol as lto-function-out.c:output_tree_list.
5488 (input_expr_operand): Make asm operands use input_tree_list.
5489 (input_local_var): Now uses input_tree_list.
5490 (lto_read_body): Change placement for setting context of debug_labels.
5491
5492
3f8257db 54932007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5494
5495 * lto-read.c (input_real): Output debugging in proper order.
5496 (input_integer): Compute bit lengths properly.
5497 (input_list): Clean up declaration.
5498 (input_expr_operand): Change calls to input_real to match fix.
5499 Make reading of LTO_bit_field_ref1 match output.
5500 (input_local_var): Make reading of attributes match what is being
5501 written.
5502 (dump_debug_stream): Also print char in hex.
5503 (debug_out_fun): Fix signed unsigned mismatch.
5504
55052007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5506
5507 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5508 DW_AT_GNU_vector specially, as they are not contiguous with the
5509 specified set of attribute names. Use class_mask to check for
5510 errors at the end of the function
5511 (lto_resolve_var_ref): Read the DIE if it is not cached.
5512 (lto_resolve_fn_ref): Likewise.
5513 (lto_resolve_field_ref): Likewise.
5514
55152007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5516
5517 * lto.c: Include dwarf2out.h.
5518 (lto_cache_store_DIE): Assert that we never change the value.
5519 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5520 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5521 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5522 sensible type instead.
5523 (lto_read_structure_union_class_type_DIE): Store the newly
5524 created type prior to reading the members of the structure to
5525 avoid infinite recursion. Avoid computing types and alignments
5526 for structures whose sizes are unknown.
5527 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5528 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5529 DW_AT_const_value, and DW_AT_specification.
5530 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5531 Return early if we have already constructed the function type.
5532 (lto_read_typedef_DIE): Check to see if the type has been cached
5533 already. Cache the type before reading any children.
5534 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5535 (lto_read_DIE): Unset context->skip_non_parameters around reading
5536 the DIE.
5537 (lto_resolve_fn_ref): Delete trailing whitespace.
5538
3f8257db 55392007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5540
5541 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5542
55432007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5544
5545 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5546
55472007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5548
5549 * lto-lang.c (signed_and_unsigned_types): New variable.
5550 (lto_type_for_size): Consult signed_and_unsigned_types to find
5551 an approprite type, creating it if necessary.
5552 (lto_set_decl_assembler_name): Add actual method body.
5553
55542007-09-06 Jim Blandy <jimb@codesourcery.com>
5555
5556 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5557 can't find a var init for this variable, leave its DECL_INITIAL.
5558 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5559 lto_elf_map_fn_body.
5560 (lto_map_lto_section): New function.
5561 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5562 bodies, and lto_elf_map_optional_lto_section for variable
5563 initializers.
5564 (lto_elf_find_section_data): Quietly return NULL if the section is
5565 missing.
5566 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5567
5568 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5569
5570 * lto-read.c (lto_read_body): Doc fix.
5571
3f8257db 55722007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5573
5574 * lto-read.c (fun_in): Renamed to data_in.
5575 (input_expr_operand, input_local_var, input_string_internal,
5576 input_string, input_real, input_list, get_label_decl,
5577 get_type_ref, input_expr_operand, input_globals, input_labels,
5578 input_local_vars_index, input_local_var, input_local_vars,
5579 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5580 (input_constructor): New function.
5581 (lto_read_function_body): Renamed to lto_read_body and generalized
5582 to handle both functions and constructors.
5583 (lto_read_function_body, lto_read_var_init): New function.
5584
5585
3f8257db 55862007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5587
5588 * lto-read.c (input_expr_operand): Assert that there really is a
5589 FUNCTION_DECL.
5590 (input_globals): Removed checks on 0 section.
5591
3f8257db 55922007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5593
5594 * lto-read.c (fun_in): Added local_decls_index and
5595 local_decls_index_d.
5596 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5597 (input_globals): Enabled code to handle FIELD_DECLs.
5598 (input_local_vars_index, input_local_vars): New function.
5599 (input_local_var): Changed to allow locals to be input randomly.
5600 (lto_read_function_body): Added code to input the
5601 local_decls_index and to free various structures.
5602
56032007-08-17 Jim Blandy <jimb@codesourcery.com>
5604
5605 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5606 ATTRIBUTE_UNUSED from 'die' formal.
5607
5608 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5609 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5610 (input_list): Fix type of 'tag'.
5611 (input_expr_operand): Fix type of 'tag' argument. Update
5612 declaration. Fix type of 'ctag'. Add default case to switch,
5613 since the type of the switched value is now an enum.
5614 (input_local_vars): Fix type of 'tag'.
5615 (input_bb): Fix type of 'tag' argument.
5616 (input_function): Fix type of 'tag' argument.
5617
56182007-08-16 Jim Blandy <jimb@codesourcery.com>
5619
5620 * lto.c (lto_read_member_DIE): Record the tree we create in
5621 fd->die_cache. (Our 'die' argument is no longer unused.)
5622 (lto_resolve_field_ref): New function.
5623 * lto.h (lto_resolve_field_ref): New declaration.
5624
56252007-08-15 Jim Blandy <jimb@codesourcery.com>
5626
5627 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5628
56292007-08-07 Jim Blandy <jimb@codesourcery.com>
5630
5631 * lto.c (lto_read_form): Complete attr_classes table.
5632 (DWARF2_form_data): Doc fix.
5633
56342007-08-05 Mark Mitchell <mark@codesourcery.com>
5635
5636 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5637 and unmap_var_init.
5638 (lto_read_var_init): Declare.
5639 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5640 interface for reading variable initializers.
5641 * lto-elf.c (lto_elf_read_var_init): Remove.
5642 (lto_elf_file_vtable): Update initializer.
5643 (lto_elf_read_var_init): Add comment about unused-ness.
5644 * lto-read.c (lto_read_var_init): New.
5645
5646 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5647
3f8257db 56482007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5649
5650 * lto-read.c (lto_read_function_body): Moved declaration of fn
5651 outside of ifdef.
5652
3f8257db 56532007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5654
5655 * lto-read.c (input_uleb128, input_string_internal, input_real,
5656 input_integer, input_record_start, input_list, get_type_ref,
5657 input_flags, input_expr_operand, input_expr_operand,
5658 input_expr_operand, input_local_vars, input_cfg, input_phi,
5659 input_ssa_names, input_bb, input_function): Added semicolons.
5660
5661
3f8257db 56622007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5663
5664 * lto-read.c (input_globals): Remove debugging.
5665 (input_function): Set DECL_ARGUMENTS.
5666
3f8257db 56672007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5668
5669 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5670 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5671 (input_phi): Made work with operands other than SSA_NAMES and
5672 fixed processing of flags.
5673 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5674 (input_flags): New function.
5675 * lto-lang.c (lto_init): Changed state of in_lto_p.
5676
5677
56782007-07-24 Mark Mitchell <mark@codesourcery.com>
5679
5680 * lto-tree.h (lto_varargs_cookie): Remove.
5681 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5682 skip_non_parameters, skip_parameters.
5683 (lto_varargs_cookie): Remove.
5684 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5685 parameter types.
5686 (lto_read_abbrev): New function.
5687 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5688 child DIEs.
5689 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5690 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5691 (lto_file_read): Initialize new context fields.
5692 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5693 (lto_unsigned_type): Remove.
5694 (lto_signed_type): Likewise.
5695 (lto_signed_or_unsigned_type): Likewise.
5696 (lto_init): Do not create lto_varargs_cookie.
5697 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5698 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5699 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5700
57012007-07-19 Jan Hubicka <jh@suse.cz>
5702
5703 * lto-read.c (lto_read_function_body): Produce empty scope block
5704 to avoid crash.
5705
57062007-07-18 Mark Mitchell <mark@codesourcery.com>
5707
5708 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5709 process local variables.
5710 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5711
3f8257db 57122007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5713
5714 * lto-read.c (input_list, input_expr_operand): Added struct
5715 function parameter.
5716 (init_cfg, finalize_cfg): Removed function.
5717 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5718 (input_labels, input_local_vars): Now takes input_block parameter rather than
5719 synthsyzing it.
5720 (input_cfg, input_phi, input_ssa_names): New functions.
5721 (input_bb): Now passes in input_blocks. Does not construct cfg
5722 and processes the list of phi functions.
5723 (input_function): Now builds both the cfg and ssa_names table.
5724 (lto_read_function_body): Processes new header fields to construct
5725 streams for the ssa_names and cfg and their debugging.
5726 * lto/lto-lang.c (lto_init): Set in_lto_p.
5727
5728
57292007-06-28 Mark Mitchell <mark@codesourcery.com>
5730
5731 * lto.h (lto_file_vtable): Add read_var_init.
5732 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5733 initializers.
5734 (lto_main): Remove bogus asserts.
5735 * lto-elf.c (tm.h): Include it.
5736 (libiberty.y): Likewise.
5737 (lto_elf_file): Add strtab and symtab. Rename
5738 string_table_section_index to sec_strtab.
5739 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5740 (lto_elf_get_shdr): New function.
5741 (lto_elf_free_shdr): Likewise.
5742 (lto_elf_find_section_data): Use them.
5743 (lto_elf_read_symtab): New function.
5744 (lto_elf_lookup_sym): Likewise.
5745 (lto_elf_free_sym): Likewise.
5746 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5747 (lto_elf_built_init): New function.
5748 (lto_elf_read_var_init): Likewise.
5749 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5750
3f8257db 57512007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5752
5753 * lto-read (make_new_block): Initialize the stmt_list.
5754 (lto_static_init_local): Add debugging for missing codes.
5755
57562007-06-26 Mark Mitchell <mark@codesourcery.com>
5757
5758 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5759 unprototyped functions.
5760
57612007-06-23 Mark Mitchell <mark@codesourcery.com>
5762
5763 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5764 Handle DW_AT_MIPS_linkage_name.
5765 (lto_read_subroutine_type_subprogram): Likewise. Correct
5766 compilation errors.
5767 (lto_main): Remove incorrect assertions.
5768 * lto-symbtab.c: Build function types out of TREE_LISTs.
5769
5770 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5771
5772 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5773
3f8257db 57742007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5775
5776 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5777 dummy since ggc does not like empty structs.
5778 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5779 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5780 expr->common to expr->base.
5781 (make_new_block): Moved stmt_list to proper place.
5782
5783
57842007-03-14 Robert Kennedy <jimbob@google.com>
5785
5786 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5787 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5788 assembler name from DWARF.
5789 * lto-lang.c (lto_set_decl_assembler_name) New function.
5790
57912006-09-10 Mark Mitchell <mark@codesourcery.com>
5792
5793 * lto.h (lto_file_vtable): New structure.
5794 (lto_file): Add vtable pointer.
5795 (lto_file_init): Add vtable paramter.
5796 (lto_read_function_body): New function.
5797 (lto_symtab_merge_fn): New function.
5798 * lto.c (lto_file_init): Add vtable parameter.
5799 (lto_read_form): Fill in entries for DW_AT_prototyped,
5800 DW_AT_frame_base.
5801 (lto_read_subroutine_type_subprogram_DIE): New function.
5802 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5803 DW_TAG_subprogram.
5804 * lto-elf.c (lto_elf_vile_vtable): New variable.
5805 (lto_elf_file_open): Pass it to lto_file_init.
5806 (lto_elf_map_fn_body): New function.
5807 (lto_elf_unmap_fn_body): Likewise.
5808 * lto-read.c: New file.
5809 * lto-symtab.c (lto_symtab_merge_fn): New function.
5810 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5811 tree_rest_of_compilation.
5812 * Make-lang.in (LTO_OBJS): Add lto-read.o
5813 (lto-read.o): New target.
5814
58152006-09-03 Mark Mitchell <mark@codesourcery.com>
5816
5817 * lto.c (<inttypes.h>): Don't include it.
5818 (lto_context): Don't typedef it.
5819 (lto_resolve_reference): New function.
5820 (lto_read_form): Use it.
5821 (lto_resolve_type_ref): New function.
5822 (lto_resolve_var_ref): Likewise.
5823 (lto_resolve_fn_ref): Likewise.
5824 * lto.h (<inttypes.h>): Include it.
5825 (lto_context): New type.
5826 (lto_ref): New structure.
5827 (lto_resolve_type_ref): Declare.
5828 (lto_resolve_var_ref): Likewise.
5829 (lto_resolve_fn_ref): Likewise.
5830
58312006-08-18 Mark Mitchell <mark@codesourcery.com>
5832
5833 * lang-specs.h: New file.
5834
58352006-08-14 Mark Mitchell <mark@codesourcery.com>
5836
5837 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5838 (lto_info_fd_close): Deallocate it.
5839 (lto_die_cache_entry): New structure.
5840 (lto_cache_hash): New function.
5841 (lto_cache_eq): Likewise.
5842 (lto_cache_store_DIE): Likewise.
5843 (lto_cache_lookup_DIE): Likewise.
5844 (lto_read_referenced_type_DIE): Use the cache.
5845 (lto_read_pointer_type_DIE): Robustify.
5846 (lto_read_DIE): Use the cache.
5847 * lto.h (hashtab.h): Include.
5848 (lto_info_fd): Add DIE cache.
5849 * Make-lang.in (LTO_H): New variable.
5850 (lto/lto-lang.o): Use LTO_H.
5851 (lto/lto-elf.o): Likewise.
5852 (lto/lto-symtab.o): Likewise.
5853
58542006-07-09 Mark Mitchell <mark@codesourcery.com>
5855
5856 * lto.c (lto_abi_mismatch_error): New function.
5857 (lto_abbrev_read): Initialize num_abbrevs.
5858 (lto_read_form): Specify allowed form classes for
5859 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5860 (lto_read_variable_formal_parameter_constant_DIE): Handle
5861 DW_AT_declaration. Call lto_symtab_merge_var.
5862 (lto_read_pointer_type_DIE): New function.
5863 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5864 not creat TYPE_DECLs for types that already have them.
5865 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5866 (lto_set_cu_context): Make cu_start point to the header, not the
5867 first DIE.
5868 (lto_file_read): Adjust for change to lto_set_cu_context.
5869 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5870 (lto/lto-symtab.o): New rule.
5871 * lto-tree.h (lang_identifier): Add decl field.
5872 (LANG_IDENTIFIER_CAST): New macro.
5873 (LTO_IDENTIFIER_DECL): Likewise.
5874 (lto_symtab_merge_var): Declare.
5875 * lto-symtab.c: New file.
5876
58772006-07-02 Daniel Berlin <dberlin@dberlin.org>
5878
5879 * lto.c (lto_context): Add current_cu and info_fd members.
5880 (DWARF2_CompUnit): New structure.
5881 (lto_read_DIE): Take lto_info_fd *.
5882 (lto_read_child_DIEs): Ditto.
5883 (lto_file_corrupt_error): Constify argument.
5884 (lto_set_cu_context): New function
5885 (lto_info_fd_init): Ditto.
5886 (lto_info_fd_close): Ditto.
5887 (lto_file_init): Use lto_info_fd_init.
5888 (lto_file_close): Use lto_info_fd_close.
5889 (lto_read_initial_length): Pass in pointer to header size.
5890 (lto_read_comp_unit_header): Correct cu_length to
5891 real length from beginning of header. Take lto_info_fd * as
5892 argument.
5893 (find_cu_for_offset): New function.
5894 (lto_read_form): Change first argument to lto_info_fd *.
5895 Add FORM_CONTEXT argument.
5896 Handle DW_FORM_ref_addr.
5897 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5898 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5899 Swap contexts if necessary for form.
5900 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5901 lto_file_corrupt_error.
5902 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5903 (lto_read_referenced_type_DIE): Change first argument to
5904 lto_info_fd *. Access lto_fd fields through base pointer.
5905 (lto_read_compile_unit_DIE): Change first argument to an
5906 lto_info_fd *.
5907 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5908 (lto_read_base_type_DIE): Ditto.
5909 (lto_read_child_DIEs): Ditto.
5910 (lto_read_DIE): Ditto. Change type of function pointer.
5911 (lto_info_read): New function.
5912 (lto_set_cu_context): Ditto.
5913 (lto_file_read): Use lto_info_read, walk resulting CU's
5914 (lto_main): Update for lto_info_fd change.
5915 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5916 necessary.
5917 * lto.h (DWARF2_CompUnit): New structure.
5918 (lto_info_fd): Ditto.
5919 (lto_file): Change debug_info to be an lto_info_fd.
5920
59212006-06-25 Mark Mitchell <mark@codesourcery.com>
5922
5923 * lto.c (toplev.h): Include it.
5924 (dwarf2.h): Likewise.
5925 (tree.h): Likewise.
5926 (tm.h): Likewise.
5927 (cgraph.h): Likewise.
5928 (ggc.h): Likewise.
5929 (inttypes.h): Likewise.
5930 (DWARF2_attr): New type.
5931 (DWARF2_abbrev): Likewise.
5932 (DWARF2_class): Likewise.
5933 (DWARF2_form_data): Likewise.
5934 (lto_context): Likewise.
5935 (lto_fd_init): New function.
5936 (lto_abbrev_fd_init): Likewise.
5937 (lto_abbrev_fd_close): Likewise.
5938 (lto_file_init): Use them.
5939 (lto_file_close): New function.
5940 (lto_file_corrupt_error): Likewise.
5941 (LTO_CHECK_INT_VAL): New macro.
5942 (lto_check_size_t_val): New function.
5943 (lto_check_int_val): Likewise.
5944 (LTO_READ_TYPE): New macro.
5945 (lto_read_ubyte): New function.
5946 (lto_read_uhalf): Likewise.
5947 (lto_read_uword): Likewise.
5948 (lto_read_uleb128): Likewise.
5949 (lto_read_initial_length): Likewise.
5950 (lto_abbrev_read_attrs): Likewise.
5951 (lto_abbrev_read): Likewise.
5952 (lto_abbrev_lookup): Likewise.
5953 (lto_read_section_offset): Likewise.
5954 (lto_read_comp_unit_header): Likewise.
5955 (lto_read_form): Likewise.
5956 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5957 (LTO_BEGIN_READ_ATTRS): Likewise.
5958 (LTO_END_READ_ATTRS): Likewise.
5959 (lto_unsupported_attr_error): New function.
5960 (lto_get_identifier): Likewise.
5961 (lto_read_referenced_type_DIE): Likewise.
5962 (lto_read_compile_unit_DIE): Likewise.
5963 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5964 (lto_read_base_type_DIE): Likewise.
5965 (lto_read_DIE): Likewise.
5966 (lto_read_child_DIEs): Likewise.
5967 (lto_file_read): Read DIEs.
5968 (lto_main): Ask middle end to emit entities.
5969 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5970 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5971 (lto_elf_file_close): Likewise.
5972 * lto.h (lto_file): Declare.
5973 (DWARF2_abbrev): Likewise.
5974 (lto_fd): New type.
5975 (lto_abbrev_fd): Likewise.
5976 (lto_file): Use new types.
5977 (lto_file_close): Declare.
5978 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5979
59802006-06-18 Mark Mitchell <mark@codesourcery.com>
5981
5982 * lto.h: New file.
5983 * lto.c: New file.
5984 * lto-elf.c: New file.
5985 * lto-lang.c (flags.h): Include it.
5986 (lto.h): Likewise.
5987 (lto_init): New function.
5988 (lto_write_globals): Remove.
5989 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5990 (LANG_HOOKS_INIT): Define.
5991 (LANG_HOOKS_PARSE_FILE): Likewise.
5992 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5993 (LTO_EXE): Link with libelf.
5994 (lto/lto-lang.o): Update dependencies.
5995 (lto/lto.o): New target.
5996 (lto/lto-elf.o): Likewise.
5997
59982006-06-12 Mark Mitchell <mark@codesourcery.com>
5999
6000 * config-lang.in: New file.
6001 * Make-lang.in: Likewise.
6002 * lto-tree.h: Likewise.
6003 * lto-lang.c: Likewise.
818ab71a 6004\f
85ec4feb 6005Copyright (C) 2006-2018 Free Software Foundation, Inc.
d7f09764 6006
818ab71a
JJ
6007Copying and distribution of this file, with or without modification,
6008are permitted in any medium without royalty provided the copyright
6009notice and this notice are preserved.
This page took 5.198071 seconds and 5 git commands to generate.