]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
gcc/ada/ChangeLog:
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
85b9be9b 12019-05-16 Martin Sebor <msebor@redhat.com>
2
3 * lto-dump.c (lto_main): Same.
4 * lto.c (stream_out): Same.
5
bc65c245 62019-05-10 Martin Liska <mliska@suse.cz>
7
8 * Make-lang.in: Use program_transform_name for lto-dump.
9 * config-lang.in: Do not mark lto-dump compiler as we don't
10 want to have it installed at
11 lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-dump.
12
2c7d1ee3 132019-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14
15 * lto-common.c (lto_file_read): Print section->start as int64_t,
16 section->len as uint64_t.
17 * lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
18
19bf75f8 192019-05-06 Martin Liska <mliska@suse.cz>
20
21 * lto-common.c: Update coding style.
22 * lto.c (materialize_cgraph): Likewise.
23
b340d73f 242019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
25 Martin Liska <mliska@suse.cz>
26
27 * Make-lang.in: Add lto_dump-related definition.
28 * config-lang.in: Likewise.
29 * lang.opt: Add new language LTODump and options related
30 to LTO dump tool.
31 * lto-common.c (lto_read_decls): Support type statistics dump.
32 (lto_file_read): Likewise for object files.
33 * lto-dump.c: New file.
34 * lto-lang.c (lto_option_lang_mask): Move from ..
35 * lto.c (lto_option_lang_mask): .. here.
36 * lto.h (lto_option_lang_mask): New declaration.
37
1c073ad2 382019-05-06 Martin Liska <mliska@suse.cz>
39 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
40
41 * Make-lang.in: Add lto-common.o.
42 * config-lang.in: Likewise for gtfiles.
43 * lto-common.c: New file.
44 * lto-common.h: New file.
45 * lto-lang.c: Include lto-common.h.
46 * lto.c: Move most of the functionality
47 into lto-common.c file.
48
7d4bbc86 492019-04-12 Jan Hubicka <hubicka@ucw.cz>
50
51 * lto.c (do_stream_out): rename to ...
52 (stream_out): ... this one; move original code to ...
53 (stream_out_partitions_1, stream_out_partitions): ... these new
54 functions.
55 (lto_wpa_write_files): Honnor lto_parallelism
56
41f9034e 572019-03-26 Martin Liska <mliska@suse.cz>
58
59 * lto-symtab.c (lto_symtab_merge_decls_2): Fix option name
229faf9e 60 wrapping.
41f9034e 61
2f6d557f 622019-03-11 Martin Liska <mliska@suse.cz>
63
64 * lto-lang.c (lto_post_options): Wrap an option name
65 in a string format message and fix GNU coding style.
66 * lto-symtab.c (lto_symtab_merge_decls_2): Likewise.
67
f673492c 682019-03-09 Jakub Jelinek <jakub@redhat.com>
69
70 PR target/79645
71 * lang.opt: Terminate description text with a dot.
72
323978df 732019-02-28 Jason Merrill <jason@redhat.com>
74
75 PR c++/88049 - ICE with undefined destructor and anon namespace.
76 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
77 for a type in an anonymous namespace.
78
f4d3c071 792019-01-09 Sandra Loosemore <sandra@codesourcery.com>
80
81 PR other/16615
82
83 * lto-partition.c: Mechanically replace "can not" with "cannot".
84 * lto-symtab.c: Likewise.
85 * lto.c: Likewise.
86
fbd26352 872019-01-01 Jakub Jelinek <jakub@redhat.com>
88
89 Update copyright years.
90
c2ef464f 912018-12-24 Jan Hubicka <hubicka@ucw.cz>
92
93 * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
94 for method whose basetype was already reported.
95
a49fad64 962018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
97
98 Minimize clone counter memory usage in LTO.
99 * lto-partition.c (privatize_symbol_name_1): Keep track of
100 non-unique symbol counters in the lto_clone_numbers hash
101 map.
102 (lto_promote_cross_file_statics): Allocate and free the
103 lto_clone_numbers hash map.
104 (lto_promote_statics_nonwpa): Free the lto_clone_numbers hash
105 map.
106
837c58f7 1072018-11-28 Jan Hubicka <jh@suse.cz>
108
109 * lto.c (lto_read_decls): Fix handling of INTEGER_CST.
110
490c362e 1112018-11-22 Jan Hubicka <jh@suse.cz>
112
113 * lto.c (cmp_type_location): Remove.
114 (lto_read_decls): Do not allocate odr_types.
115
f72863ec 1162018-11-19 Martin Liska <mliska@suse.cz>
117
118 PR lto/88077
119 * lto-symtab.c (lto_symtab_merge): Transform the
120 condition before r256989.
121
8ac6652d 1222018-11-16 Martin Liska <mliska@suse.cz>
123
124 PR lto/88004
125 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call
126 lto_symtab_symbol_p as it does checking of transparent alias.
127 These needs to be also merged in the function.
128
87943388 1292018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
130
131 * lto-partition.c (privatize_symbol_name_1): Use
132 clone_function_name_numbered.
133
b5072026 1342018-10-26 Jan Hubicka <jh@suse.cz>
135
136 * lto/lto-symtab.c (lto_symtab_merge_decls_2): Fix extra space.
137
bdb69048 1382018-10-17 David Malcolm <dmalcolm@redhat.com>
139
140 * Make-lang.in (selftest-lto): New.
141
c8c195fa 1422018-08-29 Martin Liska <mliska@suse.cz>
143
144 PR bootstrap/87130
145 * lto.c (read_cgraph_and_symbols): Fix thinko, revert
146 to behavior before r263887.
147
a0e9bfbb 1482018-08-27 Martin Liska <mliska@suse.cz>
149
150 * lto-lang.c (handle_const_attribute): Use new function
c9e63184 151 fndecl_built_in_p and remove check for FUNCTION_DECL if
152 possible.
a0e9bfbb 153 * lto-symtab.c (lto_symtab_merge_p): Likewise.
154 (lto_symtab_merge_decls_1): Likewise.
155 (lto_symtab_merge_symbols): Likewise.
156 * lto.c (lto_maybe_register_decl): Likewise.
157 (read_cgraph_and_symbols): Likewise.
158
36a03e27 1592018-08-21 Tom de Vries <tdevries@suse.de>
160
161 * lto.c (lto_main): Call debuginfo_early_start and
162 debuginfo_early_stop.
163
8e18705e 1642018-07-20 Martin Sebor <msebor@redhat.com>
165
166 PR middle-end/82063
167 * lto-lang.c (lto_handle_option): Change function argument
168 to HOST_WIDE_INT.
169
4556378b 1702018-07-20 Richard Biener <rguenther@suse.de>
171
172 PR debug/86585
173 * lto.c (unify_scc): Before we throw away an SCC see if we
174 can amend prevailing single-entry SCC with debug refs.
175
10f4c874 1762018-07-13 Jan Hubicka <hubicka@ucw.cz>
177
178 * lto.c (do_stream_out): Add PART parameter; open dump file.
179 (stream_out): Add PART parameter; pass it to do_stream_out.
180 (lto_wpa_write_files): Update call of stream_out.
181
6848a0ae 1822018-07-04 Martin Liska <mliska@suse.cz>
183
184 PR middle-end/66240
185 PR target/45996
186 PR c/84100
187 * lto.c (compare_tree_sccs_1): Use cl_optimization_option_eq
188 instead of memcmp.
189
fb4c9101 1902018-06-20 Martin Liska <mliska@suse.cz>
191
192 * lto-symtab.c (lto_symtab_merge_p): Remove not valid
c9e63184 193 FIXME comment.
fb4c9101 194
d2c2513e 1952018-06-19 Martin Liska <mliska@suse.cz>
196
197 * lto-partition.c (add_symbol_to_partition_1): Use symbol_summary::get instead
c9e63184 198 of get_create.
d2c2513e 199 (undo_partition): Likewise.
200 (lto_balanced_map): Likewise.
201
ca8e0e36 2022018-06-19 Martin Liska <mliska@suse.cz>
203
204 * config-lang.in: Remove stagestuff.
205
025fe22b 2062018-06-08 Jan Hubicka <hubicka@ucw.cz>
207
208 * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id):
209 New global vars.
210 (lto_register_dumps): New hook.
211 (LANG_HOOKS_REGISTER_DUMPS): New.
212 * lto-partition.c: Dump into dump_file instead of symtab->dump_file.
213 * lto-symtab.c: Include lto.h; dump into dump_file instead of
214 symtab->dump_file.
215 (lto_symtab_merge_decls): Initialize dump file.
216 * lto.c (read_cgraph_and_symbols): Initialize dump file.
217 (do_whole_program_analysis): Likewise.
218
8a604555 2192018-06-08 Martin Liska <mliska@suse.cz>
220
221 * lto-partition.c (lto_balanced_map): Use cgraph_node::uid
222 instead of summary_uid.
223
b53d4f56 2242018-06-08 Martin Liska <mliska@suse.cz>
225
226 * lto-partition.c (add_symbol_to_partition_1): Use get_create instead
227 of get.
228 (undo_partition): Likewise.
229 (lto_balanced_map): Likewise.
230
1e42d5c6 2312018-06-08 Martin Liska <mliska@suse.cz>
232
233 * lto-partition.c (add_references_to_partition): Remove support
234 for MPX (macros, related functions, fields in cgraph_node, ...).
235 (add_symbol_to_partition_1): Likewise.
236 (privatize_symbol_name): Likewise.
237 * lto-symtab.c (lto_cgraph_replace_node): Likewise.
238
78b10371 2392018-06-05 Richard Biener <rguenther@suse.de>
240
241 * lto.c (cmp_type_location): Expand locations only once.
242
278cec16 2432018-05-30 Jan Hubicka <hubicka@ucw.cz>
244
245 * lang.opt (lto_linker_output): Add nolto-rel.
246 * lto-lang.c (lto_post_options): Handle LTO_LINKER_OUTPUT_REL
247 and LTO_LINKER_OUTPUT_NOLTOREL.
248 (lto_init): Generate lto when doing incremental link.
249 * lto.c (lto_precess_name): Add lto1-inclink.
250
0dbcf2c2 2512018-05-18 Jan Hubicka <jh@suse.cz>
252
253 PR lto/85583
254 * lto-partition.c (account_reference_p): Do not account
255 references from aliases; do not account refernces from
256 external initializers.
257
747c1878 2582018-04-30 Jan Hubicka <jh@suse.cz>
259
260 * lto.c (cmp_partitions_size): Remove.
261 (lto_wpa_write_files): Also output priorities; do not sort partitions.
262 (cmp_partition_order): Move to ...
263 * lto-partition.c (cmp_partition_order): ...
264 (lto_1_to_1_map): Sort partitions.
265
0b9ea699 2662018-04-20 Jan Hubicka <jh@suse.cz>
267
268 * lto-partition.c (lto_balanced_map): Fix sanity check.
269
27f5053b 2702018-04-19 Jan Hubicka <jh@suse.cz>
271
272 * lto-partition.c: Include sreal.h
273 (add_symbol_to_partition_1): Use size instead of self_size
274 for size estimate.
275 (account_reference_p): New.
276 (lto_balanced_map): Use 64bit arithmetics for size calculatoins; cleanup;
277 fix accounting errors in boundary size; add debug output; combine cost
278 as cost/size instead of cost/internal; reduce the partitioning error to
279 +- 1/8 of the parttion size.
280
e077efa5 2812018-04-19 Martin Liska <mliska@suse.cz>
282
283 * lto-symtab.c (lto_symtab_resolve_symbols): Do not bail out
284 for multiple PREVAILING_DEF_IRONLY for common symbols.
285
28893b77 2862018-04-18 Martin Liska <mliska@suse.cz>
287
288 * lto.c (lto_read_decls): Fix GNU coding style and typos.
289
b9308baf 2902018-04-18 Martin Liska <mliska@suse.cz>
291
292 PR ipa/83983
293 PR ipa/85391
294 * lto.c (cmp_type_location): New function.
295 (lto_read_decls): First collect all types, then
296 sort them according by location before register_odr_type
297 is called.
298
ca4a358c 2992018-04-18 Jan Hubicka <jh@suse.cz>
300 Martin Liska <mliska@suse.cz>
301
302 PR lto/85391
303 * lto.c (lto_read_decls): Do not test TYPE_CANONICAL before registering odr
304 types.
305
aade59af 3062018-04-11 Martin Liska <mliska@suse.cz>
307
308 * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
309 function.
310
c3ea4c3d 3112018-04-10 Martin Liska <mliska@suse.cz>
312
313 PR lto/85248
314 * lto-symtab.c (lto_symtab_merge_p): Do not check for
315 TREE_VALUES of error attributes.
316
3c24c320 3172018-04-10 Richard Biener <rguenther@suse.de>
318 Martin Liska <mliska@suse.cz>
319
320 PR lto/85248
321 * lto-symtab.c (lto_symtab_merge_p): Handle noreturn attribute.
322
b19fea61 3232018-02-08 Jan Hubicka <hubicka@ucw.cz>
324
325 * lto-partition.c (lto_balanced_map): Watch overflow.
326
fa30257b 3272018-02-08 Jan Hubicka <hubicka@ucw.cz>
328
329 PR ipa/81360
330 * lto.c (unify_scc): Register prevailing trees, not trees to be freed.
331 (read_cgraph_and_symbols): Use
332 symtab_node::output_to_lto_symbol_table_p.
333
ae57de0e 3342018-01-30 Jan Hubicka <hubicka@ucw.cz>
335
336 * lto.c (register_resolution): Remove forgotten sanity check.
337
35c60783 3382018-01-30 Jan Hubicka <hubicka@ucw.cz>
339
340 PR lto/81004
341 * lto.c: Include builtins.h
342 (register_resolution): Merge resolutions in case trees was
343 merged across units.
344 (lto_maybe_register_decl): Break out from ...
345 (lto_read_decls): ... here.
346 (unify_scc): Also register decls here.
347 (read_cgraph_and_symbols): Sanity check that all resolutions was
348 read.
349
a2b21115 3502018-02-02 Eric Botcazou <ebotcazou@adacore.com>
351
352 PR lto/83954
353 * lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
354 component type of array types with non-aliased component.
355
ce1a948e 3562018-01-30 Jan Hubicka <hubicka@ucw.cz>
357
358 PR lto/83954
359 * lto-symtab.c (warn_type_compatibility_p): Silence false positive
360 for type match warning on arrays of pointers.
361
77cd3f2b 3622018-01-23 Martin Liska <mliska@suse.cz>
363
364 PR lto/81440
365 * lto-symtab.c (lto_symtab_merge): Handle and do not warn about
366 trailing arrays at the end of a struct.
367
8464736b 3682018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
369 Alan Hayward <alan.hayward@arm.com>
370 David Sherwood <david.sherwood@arm.com>
371
372 * lto-lang.c (lto_type_for_mode): Handle MODE_VECTOR_BOOL.
373
f08ee65f 3742018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
375 Alan Hayward <alan.hayward@arm.com>
376 David Sherwood <david.sherwood@arm.com>
377
378 * lto-lang.c (lto_type_for_mode): Check valid_vector_subparts_p.
379 * lto.c (hash_canonical_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
380
8e8f6434 3812018-01-03 Jakub Jelinek <jakub@redhat.com>
382
383 Update copyright years.
384
672bc44d 3852017-12-15 Jakub Jelinek <jakub@redhat.com>
386
387 * lto-lang.c (lto_attribute_table, lto_format_attribute_table): Swap
388 affects_type_identity and handler fields, adjust comments.
389
998afe5d 3902017-12-07 Richard Sandiford <richard.sandiford@arm.com>
391
392 * lto.c (compare_tree_sccs_1): Compare the new VECTOR_CST flags.
393
dab0e385 3942017-12-07 Martin Sebor <msebor@redhat.com>
395
396 PR c/81544
397 * lto-lang.c (lto_attribute_table): Initialize new member of struct
398 attribute_spec.
399
7f38a6aa 4002017-11-30 Jakub Jelinek <jakub@redhat.com>
401
402 * lto.c (create_subid_section_table): Use ; instead of ;;.
403
532d84ff 4042017-11-22 Marek Polacek <polacek@redhat.com>
405
406 PR c++/60336
407 PR middle-end/67239
408 PR target/68355
409 * lto.c (compare_tree_sccs_1): Compare TYPE_EMPTY_P and DECL_PADDING_P.
410
151b9ff5 4112017-11-10 Jan Hubicka <hubicka@ucw.cz>
412
413 * lto-partition.c (lto_balanced_map): Use frequency accessor.
414
12f79006 4152017-10-13 Jan Hubicka <hubicka@ucw.cz>
416
417 * lto-lang.c (lto_post_options): Clean shlib flag when not doing PIC.
418
971295a0 4192017-10-11 Nathan Sidwell <nathan@acm.org>
420
421 * lto.c (mentions_vars_p_decl_with_vis): Use
422 DECL_ASSEMBLER_NAME_RAW.
423 (lto_fixup_prevailing_decls): Likewise.
424
e3d0f65c 4252017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
426
427 * lto.c (compare_tree_sccs_1): Use wi::to_wide when
428 operating on trees as wide_ints.
429
d082dc6e 4302017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
431 Alan Hayward <alan.hayward@arm.com>
432 David Sherwood <david.sherwood@arm.com>
433
434 * lto-lang.c (lto_type_for_mode): Use as_a <scalar_int_mode>.
435
7b53e714 4362017-08-21 Richard Biener <rguenther@suse.de>
437
c9e63184 438 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
439 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
440 TYPE_DECL debug processing, register DIE references from
441 prevailing SCCs with the debug machinery.
442 (lto_section_with_id): Handle LTO debug sections.
7b53e714 443
ff7f27bf 4442017-08-16 Nathan Sidwell <nathan@acm.org>
445
446 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
447 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
448 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
449
47875a37 4502017-08-08 Tom de Vries <tom@codesourcery.com>
451
452 * lto.c: Include attribs.h.
453
30a86690 4542017-08-08 Martin Liska <mliska@suse.cz>
455
456 * lto-lang.c: Include header files.
457 * lto-symtab.c: Likewise.
458
6fd055d3 4592017-08-03 Richard Biener <rguenther@suse.de>
460
461 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
462 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
463 use DECL_LANG_FLAG_0.
464 (lto_symtab_prevail_decl): Likewise.
465
e6c4532a 4662017-07-07 Torsten Duwe <duwe@suse.de>
467
468 * lto-lang.c (lto_attribute_table): Add entry for
469 "patchable_function_entry".
470
c6f56d33 4712017-07-19 Nathan Sidwell <nathan@acm.org>
472
473 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
474 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
475
d508ad6f 4762017-07-06 Jan Hubicka <hubicka@ucw.cz>
477
478 * lto-partition.c (lto_balanced_map): Do not check
479 flag_toplevel_reorder.
4e551c7d 480
d508ad6f 4812017-06-23 Marc Glisse <marc.glisse@inria.fr>
4e551c7d 482 * lto-lang.c (lto_init): Use builtin_structptr_types.
483
8388d80a 4842017-06-15 Jan Hubicka <hubicka@ucw.cz>
485 Thomas Preud'homme <thomas.preudhomme@arm.com>
486
487 PR lto/69866
488 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
489 that resolved externally.
490
a2da7d8a 4912017-05-23 Jan Hubicka <hubicka@ucw.cz>
492
493 * lto.c (do_whole_program_analysis): Replace inline_free_summary
494 by ipa_free_fn_summary.
495
0e388735 4962017-05-23 Martin Liska <mliska@suse.cz>
497
498 * lto-symtab.c (lto_cgraph_replace_node): Use
499 symtab_node::dump_{asm_,}name functions.
500 * lto.c (read_cgraph_and_symbols): Likewise.
501 (do_whole_program_analysis): Likewise.
502
acd183e4 5032017-05-23 Martin Liska <mliska@suse.cz>
504
505 * lto.c (read_cgraph_and_symbols): Use the renamed function.
506 (do_whole_program_analysis): Use the renamed function.
507
b9a58fc5 5082017-05-22 Jan Hubicka <hubicka@ucw.cz>
509
510 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
511 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
512
92bc38e7 5132017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
514
c9e63184 515 PR c++/80038
92bc38e7 516 * lto-lang.c (lto_init): Set in_lto_p earlier.
517
3721b151 5182017-04-12 Richard Biener <rguenther@suse.de>
519 Bernd Edlinger <bernd.edlinger@hotmail.de>
520
521 PR middle-end/79671
522 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
523
3ca5c7c1 5242017-02-14 Martin Liska <mliska@suse.cz>
525
526 * lto.c (do_stream_out): Free LTO file filename string.
527
8950f928 5282017-01-19 David Malcolm <dmalcolm@redhat.com>
529
530 * lto-lang.c (builtin_type_for_size): Convert call to
531 lto_type_for_size to one through the langhook.
532 (lto_type_for_size): Move to langhooks.c and rename to
533 lhd_type_for_size.
534 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
535
2236cf7a 5362017-01-11 Jakub Jelinek <jakub@redhat.com>
537
538 PR middle-end/50199
539 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
540 if it was 0.
541
d0abd9e0 5422017-01-09 Jakub Jelinek <jakub@redhat.com>
543
544 PR translation/79019
545 PR translation/79020
546 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
547
dc824618 5482017-01-06 Nathan Sidwell <nathan@acm.org>
549
e4dea1aa 550 * lto-partition.c (promote_symbol): Write to dump file sooner,
551 include alias promoting too.
552
dc824618 553 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
554 (may_need_named_section_p): Likewise.
555 (rename_statics): Likewise.
556 (lto_promote_cross_file_statics): Likewise.
557
aad93da1 5582017-01-01 Jakub Jelinek <jakub@redhat.com>
559
560 Update copyright years.
561
b8a4902a 5622016-11-30 Georg-Johann Lay <avr@gjlay.de>
563
564 PR lto/78562
565 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
566 mismatch if the two types are built-in.
567
c932c990 5682016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
569
570 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
571
9f8b32f9 5722016-11-23 Richard Biener <rguenther@suse.de>
573
574 PR lto/78472
575 * lto.c (hash_canonical_type): Ignore zero-sized fields.
576
f1b3e1c9 5772016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
578
579 PR c++/71973
580 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
581
adc78298 5822016-11-18 Richard Sandiford <richard.sandiford@arm.com>
f1b3e1c9 583 Alan Hayward <alan.hayward@arm.com>
584 David Sherwood <david.sherwood@arm.com>
adc78298 585
586 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
587
791e0564 5882016-10-31 Richard Biener <rguenther@suse.de>
589
590 PR lto/78129
591 * lto.c (do_whole_program_analysis): Bail out after errors
592 from WPA analysis.
593
25a8e007 5942016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
595
596 * lto-partition.c: Include tree-vrp.h.
597 * lto.c: Likewise.
598
6a4203b6 5992016-09-20 Richard Biener <rguenther@suse.de>
600
601 * lto.c (lto_main): Call early_finish with "<artificial>" as
602 filename.
603
8ee8fe70 6042016-09-19 Richard Biener <rguenther@suse.de>
605
606 * lto.c (lto_main): Invoke early_finish debug hook.
607
c0250021 6082016-07-25 Richard Biener <rguenther@suse.de>
609
610 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
611 (unify_scc): Likewise.
612 (lto_read_decls): Likewise.
613
6eb2402f 6142016-06-28 Jakub Jelinek <jakub@redhat.com>
615
616 * Make-lang.in: Don't cat ../stage_current if it does not exist.
617
b4c71cbb 6182016-06-23 Andi Kleen <ak@linux.intel.com>
619
620 * Make-lang.in: Add support for autofdo (disabled for now)
621
1dc4d519 6222016-06-10 Martin Sebor <msebor@redhat.com>
623
624 PR c/71392
625 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
626 attribute in type-generic builtins.
627
99aee6e3 6282016-05-16 Jan Hubicka <hubicka@ucw.cz>
629
630 * lto-partition.c (add_symbol_to_partition_1): Likewise.
631
0754a747 6322016-05-03 Jan Hubicka <hubicka@ucw.cz>
633
634 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
635
49547b8a 6362016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
637
638 * lto-partition.h (lto_balanced_map): New parameter.
639 * lto-partition.c (lto_balanced_map): New parameter
640 max_partition_size.
641 Check if partition size is greater than max_partition_size.
642 * lto.c (do_whole_program_analysis): Adjust calls to
643 lto_balanced_map() to pass 2nd argument.
644
21dae9f7 6452016-03-17 H.J. Lu <hongjiu.lu@intel.com>
646
647 PR lto/70258
648 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
649 PIE.
650
fe4bc123 6512016-03-08 Jakub Jelinek <jakub@redhat.com>
652
653 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
654 - becuase -> because.
655
bd5653d0 6562016-02-15 Tom de Vries <tom@codesourcery.com>
657
658 PR lto/69655
659 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
660 argument.
661
874e154a 6622016-01-27 Martin Liska <mliska@suse.cz>
663
664 * lto-partition.c (add_symbol_to_partition_1): Remove usage
665 of hsa_summaries.
666
8be55b33 6672016-01-19 Jan Hubicka <hubicka@ucw.cz>
668
669 PR lto/69136
670 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
671 decls have no assemblernames.
672
56686608 6732016-01-19 Martin Liska <mliska@suse.cz>
c9e63184 674 Martin Jambor <mjambor@suse.cz>
56686608 675
676 * lto-partition.c: Include "hsa.h"
677 (add_symbol_to_partition_1): Put hsa implementations into the
678 same partition as host implementations.
679
d03f956e 6802016-01-12 Jan Hubicka <hubicka@ucw.cz>
681
682 PR lto/69003
683 * lto-partition.c (rename_statics): Fix pasto.
684
2fb9248b 6852016-01-18 Richard Biener <rguenther@suse.de>
686
687 PR lto/69337
688 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
689 function vs. variable.
690
e4c96992 6912016-01-12 Richard Biener <rguenther@suse.de>
692
693 PR lto/69077
694 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
695 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
696
f1717362 6972016-01-04 Jakub Jelinek <jakub@redhat.com>
698
699 Update copyright years.
700
c4b4be7f 7012015-12-10 Jan Hubicka <hubicka@ucw.cz>
702
703 PR lto/68878
704 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
705 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
706 (lto_symtab_prevailing_decl): Use it.
707
c0998828 7082015-12-15 Ilya Verbin <ilya.verbin@intel.com>
709
710 * lto.c: Include stringpool.h and fold-const.h.
711 (offload_handle_link_vars): New static function.
712 (lto_main): Call offload_handle_link_vars.
713
6cbd82a6 7142015-12-10 Jan Hubicka <hubicka@ucw.cz>
715
716 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
717
f94693ef 7182015-12-11 Jan Hubicka <hubicka@ucw.cz>
719
720 PR ipa/61886
721 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
722 values of error and warning attributes.
723
7e28e646 7242015-12-08 Jan Hubicka <hubicka@ucw.cz>
725
726 PR lto/68811
727 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
728 DECL.
729 (LTO_NO_PREVAIL): Use gcc_checking_assert.
730
24199c3f 7312015-12-08 Jan Hubicka <hubicka@ucw.cz>
732
733 PR lto/68811
734 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
735 by itself.
736
4e42d239 7372015-12-08 Jan Hubicka <hubicka@ucw.cz>
738
739 PR ipa/61886
740 * lto-symtab.c: Include lto-symtab.h.
741 (lto_cgraph_replace_node): Do not merge profiles here.
742 (lto_symtab_merge_p): New function.
743 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
744 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
745 aliases.
746 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
747 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
748 * lto.c: Include lto-symtab.h
749 * lto-symtab.h: New.
750
ee03cd5e 7512015-12-08 Jan Hubicka <hubicka@ucw.cz>
752
753 PR ipa/61886
754 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
755 are not part of the definition.
756 (contained_in_symbol): Likewise.
757 (promote_symbol): When promoting a symbol also promote all transparent
758 aliases.
759 (rename_statics): Weakref needs unique name, too.
760
e0dec29d 7612015-12-07 Jan Hubicka <hubicka@ucw.cz>
762
763 PR ipa/61886
764 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
765 rename_statics, rename_statics): Handle transparent aliases.
766
7d38b7bc 7672015-12-04 Jan Hubicka <hubicka@ucw.cz>
768
769 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
770 merged_comdat.
771
27e9c5ae 7722015-12-01 Jan Hubicka <hubicka@ucw.cz>
773
774 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
775
4c4a180d 7762015-11-25 Jan Hubicka <jh@suse.cz>
777
778 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
779 * lang.opt (lto_linker_output): New enum.
780 (flinker_output): New flag.
781
3f8f2e54 7822015-11-24 Jan Hubicka <hubicka@ucw.cz>
783
784 * lto-symtab.c: Include alias.h
785 (warn_type_compatibility_p): Replace types_compatible_p checks by
786 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
787 (lto_symtab_merge): Compare DECL sizes.
788 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
789
b89bfdca 7902015-11-24 Jan Hubicka <hubicka@ucw.cz>
791
792 * lto.c (iterative_hash_canonical_type): Recruse for all types
793 which pass !canonical_type_used_p.
794 (gimple_register_canonical_type_1): Sanity check we do not compute
795 canonical type of anything with !canonical_type_used_p.
796 (gimple_register_canonical_type): Skip all types that are
797 !canonical_type_used_p
798
6e06854b 7992015-11-24 Jan Hubicka <hubicka@ucw.cz>
800
801 * lto.c (unify_scc): Use free_node.
802
fc7464ae 8032015-11-21 Jan Hubicka <hubicka@ucw.cz>
804
805 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
806 (gimple_register_canonical_type_1): Check that pointers do not get
807 canonical types.
808 (gimple_register_canonical_type): Do not register pointers.
809
8102015-11-21 Jan Hubicka <hubicka@ucw.cz>
e469587a 811
812 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
813 flag for types that are not ODR; fix loop walking parameters.
814
6e803544 8152015-11-11 Andrew MacLeod <amacleod@redhat.com>
816
817 * lto-lang.c: Remove unused header files.
818 * lto-object.c: Likewise.
819 * lto-partition.c: Likewise.
820 * lto-symtab.c: Likewise.
821 * lto.c: Likewise.
822
292237f3 8232015-11-08 Eric Botcazou <ebotcazou@adacore.com>
824
825 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
826
ac677063 8272015-11-07 Richard Sandiford <richard.sandiford@arm.com>
828
829 * lto-lang.c: Don't undef DEF_BUILTIN.
830
4cba6f60 8312015-10-29 Andrew MacLeod <amacleod@redhat.com>
832
833 * lto-lang.c: Reorder #include's and remove duplicates.
834 * lto-object.c: Likewise.
835 * lto-partition.c: Likewise.
836 * lto-symtab.c: Likewise.
837 * lto.c: Likewise.
838
382ecba7 8392015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
840
841 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
842 conditionals.
843 (lto_fixup_state): Likewise.
844 (do_whole_program_analysis): Use
845 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
846 conditionals.
847
43895be5 8482015-10-13 Jakub Jelinek <jakub@redhat.com>
849
850 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
851 DEF_FUNCTION_TYPE_11): Define.
852
37f21d1f 8532015-10-10 Jan Hubicka <hubicka@ucw.cz>
854
855 * lto.c (hash_canonical_type): Honor
856 type_with_interoperable_signedness.
857
e561d5e1 8582015-09-28 Nathan Sidwell <nathan@codesourcery.com>
859
860 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
861 (DEF_FUNCTION_TYPE_VAR_11): Delete.
862
5a7d537d 8632015-08-31 Richard Biener <rguenther@suse.de>
864
865 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
866 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
867 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
868 participate in merging with something else.
869
a4e1a24d 8702015-08-31 Richard Biener <rguenther@suse.de>
871
872 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
873 test, do not replace a non-builtin with a builtin.
874 * lto.c (compare_tree_sccs_1): Do not merge things we stream
875 as builtins vs. non-builtins.
876
6dc50383 8772015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
878
879 * lto.h: Remove useless typedefs.
880
af015d19 8812015-07-15 Andrew MacLeod <amacleod@redhat.com>
882
883 * lto.c: Remove redundant includes.
884
47ae02b7 8852015-07-12 Aldy Hernandez <aldyh@redhat.com>
886
887 * lto-lang.c: Fix double word typos.
888
d040a5b0 8892015-07-10 Andrew MacLeod <amacleod@redhat.com>
890
891 * lto.c: Include cfghooks.h rather than predict.h.
892
f61de240 8932015-07-09 Andrew MacLeod <amacleod@redhat.com>
894
895 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
896 lto-streamer.h.
897 * lto-object.c: Likewise.
898 * lto-partition.c: Likewise.
899 * lto-symtab.c: Likewise.
900
1eacc14a 9012015-07-09 Andrew MacLeod <amacleod@redhat.com>
902
903 * lto-lang.c: Adjust includes for flags.h changes.
904
9ef16211 9052015-07-07 Andrew MacLeod <amacleod@redhat.com>
906
907 * lto-lang.c: Adjust includes.
908 * lto-object.c: Likewise.
909 * lto-partition.c: Likewise.
910 * lto-symtab.c: Likewise.
911 * lto.c: Likewise.
912
ec2e0095 9132015-06-25 Andrew MacLeod <amacleod@redhat.com>
914
915 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
916 * lto-object.c: Likewise.
917 * lto-partition.c: Likewise.
918 * lto-symtab.c: Likewise.
919 * lto-tree.h: Likewise.
920 * lto.c: Likewise.
921
770ff93b 9222015-06-25 Richard Sandiford <richard.sandiford@arm.com>
923
924 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
925 than typed_noop_remove. Remove redudant typedefs.
926
f2ab3bac 9272015-06-17 Andrew MacLeod <amacleod@redhat.com>
928
929 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
930 * lto-object.c: Likewise.
931 * lto-partition.c: Likewise.
932 * lto-symtab.c: Likewise.
933 * lto.c: Likewise.
934
cb274227 9352015-06-14 Jan Hubicka <hubicka@ucw.cz>
936
937 PR ipa/66181
938 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
939
8f88884c 9402015-06-12 DJ Delorie <dj@redhat.com>
941
942 * lto-lang.c (lto_type_for_size): Include intN types.
943 (lto_type_for_mode): Likewise.
944
1ed0cc85 9452015-06-08 Jan Hubicka <hubicka@ucw.cz>
946
947 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
948
64486212 9492015-06-08 Andrew MacLeod <amacleod@redhat.com>
950
951 * lto-lang.c : Adjust include files.
952 * lto-object.c : Likewise.
953 * lto-partition.c : Likewise.
954 * lto-partition.h : Likewise.
955 * lto-symtab.c : Likewise.
956 * lto.c : Likewise.
957 * lto.h : Likewise.
958
9a8ba0f7 9592015-06-06 Jan Hubicka <hubicka@ucw.cz>
960
379ca7f8 961 PR lto/65378
962 * lto-symtab.c (warn_type_compatibility_p): Fix call of
963 odr_or_derived_type_p.
964 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
965
9662015-06-08 Jan Hubicka <hubicka@ucw.cz>
967
968
9a8ba0f7 969 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
970 pointers.
971
3a1c9df2 9722015-06-05 Aldy Hernandez <aldyh@redhat.com>
973
974 * lto-lang.c (lto_write_globals): Remove.
975 (LANG_HOOKS_WRITE_GLOBALS): Same.
976
f77c0292 9772015-06-04 Andrew MacLeod <amacleod@redhat.com>
978
979 * lto-lang.c: Adjust includes for restructured coretypes.h.
980 * lto-object.c: Likewise.
981 * lto-partition.c: Likewise.
982 * lto-symtab.c: Likewise.
983 * lto.c: Likewise.
984
499e2be8 9852015-06-04 Jan Hubicka <hubicka@ucw.cz>
986
987 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
988
9c0b7e86 9892015-06-03 Jan Hubicka <hubicka@ucw.cz>
990
991 * lto.c (iterative_hash_canonical_type,
992 gimple_register_canonical_type): only hash main variants of types
993
e5b238bf 9942015-05-27 Martin Liska <mliska@suse.cz>
995
996 * lto-partition.c (new_partition): Reset number of symbols.
997 (add_symbol_to_partition_1): Increment number of symbols.
998 (undo_partition): Decrement number of symbols.
999 (lto_balanced_map): Dump number of symbols and insns that
1000 belong to a partition.
1001 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
1002
24a769d9 10032015-05-22 Jan Hubicka <hubicka@ucw.cz>
1004
1005 * lto.c (hash_canonical_type): Be sure we hash only types that
1006 need alias set.
1007 (gimple_register_canonical_type_1): Do not produce canonical
1008 types for types that do not need alias sets.
1009
00c1bd91 10102015-05-22 Jan Hubicka <hubicka@ucw.cz>
1011
1012 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
1013
82915df7 10142015-05-19 Jan Hubicka <hubicka@ucw.cz>
1015
1016 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
1017
40175f70 10182015-05-17 Jan Hubicka <hubicka@ucw.cz>
1019
1020 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
1021 compare ODR types (if available) and function types.
1022 (lto_symtab_merge): ... here; output ODR violation warnings
1023 and call warn_types_mismatch.
1024
988cf7b9 10252015-04-29 Jan Hubicka <hubicka@ucw.cz>
1026
1027 * lto.c (lto_fixup_state): Call verify_type.
1028
9969c043 10292015-04-18 Trevor Saunders <tsaunders@mozilla.com>
1030
988cf7b9 1031 * lto.c: Adjust for hash_table changes.
9969c043 1032
d2e9c252 10332015-03-27 Jan Hubicka <hubicka@ucw.cz>
1034
1035 * lto.c (lto_read_decls): Move code registering odr types out
1036 of TYPE_CANONICAL conditional and also register polymorphic types.
1037
ce87fec0 10382015-03-26 Jan Hubicka <hubicka@ucw.cz>
1039
1040 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
1041 DECL_ARTIFICAL symbols.
1042
da6f3259 10432015-03-26 Jan Hubicka <hubicka@ucw.cz>
1044
1045 PR lto/65536
1046 * lto.c (unify_scc): Revert location cache when unification
1047 suceeded.
1048 (lto_read_decls): Accept location cache after sucess;
1049 apply location cache before calling debug hooks.
1050
e9e2b82f 10512015-03-10 Jan Hubicka <hubicka@ucw.cz>
1052
1053 * lto.c (read_cgraph_and_symbols): Do not do merging
1054 at ltrans stage.
1055
2e971afd 10562015-02-26 Jakub Jelinek <jakub@redhat.com>
1057
1058 * lto.c (lto_mode_identity_table): New variable.
1059 (lto_read_decls): Add mode_table argument to the lto_input_block
1060 constructor.
1061 (lto_file_finalize): Initialize mode_table.
1062 (lto_init): Initialize lto_mode_identity_table.
1063
6349b8cc 10642015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1065
1066 PR libgomp/64625
1067 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1068 Remove macros.
1069 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1070
57e20c4a 10712015-02-03 Jan Hubicka <hubicka@ucw.cz>
1072
1073 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
1074
c05be867 10752015-01-30 Joseph Myers <joseph@codesourcery.com>
1076
1077 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
1078 changed to pass input_location as first argument.
1079
bbcd979a 10802014-12-11 Jan Hubicka <hubicka@ucw.cz>
1081
1082 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
1083
90617f12 10842014-12-11 Jan Hubicka <hubicka@ucw.cz>
1085
1086 * lto.c (compare_tree_sccs_1): Add comparsion of
1087 DECL_FUNCTION_SPECIFIC_TARGET
1088
ca4c3545 10892015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1090 James Norris <jnorris@codesourcery.com>
1091
1092 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1093 New macros.
1094 * lto.c: Include "gomp-constants.h".
1095
9d65fe51 10962015-01-14 Ilya Verbin <ilya.verbin@intel.com>
1097
1098 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
1099 from select_what_to_stream.
1100
ba000093 11012015-01-09 Bernd Schmidt <bernds@codesourcery.com>
1102 Jakub Jelinek <jakub@redhat.com>
1103
1104 PR middle-end/64412
1105 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
1106 if ACCEL_COMPILER.
1107
1f78217c 11082015-01-09 Michael Collison <michael.collison@linaro.org>
1109
1110 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1111 input.h, alias.h, symtab.h, options, fold-const.h,
1112 wide-int.h, and inchash.h due to flattening of tree.h.
1113 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1114 input.h, alias.h, symtab.h, fold-const.h,
1115 wide-int.h, and inchash.h due to flattening of tree.h.
1116 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1117 input.h, alias.h, symtab.h, options, fold-const.h,
1118 wide-int.h, and inchash.h due to flattening of tree.h.
1119 * lto-partition.c: Ditto.
1120 * lto-symtab.c: Ditto.
1121
d353bf18 11222015-01-05 Jakub Jelinek <jakub@redhat.com>
1123
1124 Update copyright years.
1125
b4bae7a0 11262014-12-22 Martin Liska <mliska@suse.cz>
1127
1128 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
1129 is used.
1130 (undo_partition): Likewise.
1131 (lto_balanced_map): Likewise.
1132
2cc80ac3 11332014-12-22 Martin Liska <mliska@suse.cz>
1134
1135 * lto-partition.c: Include of symbol-summary.h is added.
1136 * lto-symtab.c: Likewise.
1137 * lto.c: Likewise.
1138
366970c6 11392014-12-11 Jan Hubicka <hubicka@ucw.cz>
1140
1141 PR ipa/61324
1142 * lto.c (read_cgraph_and_symbols): Update call of
1143 remove_unreachable_nodes.
1144 (do_whole_program_analysis): Remove call of
1145 symtab->remove_unreachable_nodes
1146
9dac2720 11472014-12-08 Trevor Saunders <tsaunders@mozilla.com>
1148
1149 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
1150 htab with malloc instead of ggc.
1151
9f9f871f 11522014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1153
1154 * lto.c: Replace htab with hash_table.
1155
5ecbd52e 11562014-11-20 Trevor Saunders <tsaunders@mozilla.com>
1157
1158 * lto.c (lto_read_in_decl_state): Adjust.
1159 (lto_fixup_state): Likewise.
1160
23de2c1d 11612014-11-17 Jan Hubicka <hubicka@ucw.cz>
1162
1163 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
1164
ab90b67e 11652014-11-14 Jan Hubicka <hubicka@ucw.cz>
1166
1167 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
1168
b0c5e347 11692014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1170 Bernd Schmidt <bernds@codesourcery.com>
1171 Andrey Turetskiy <andrey.turetskiy@intel.com>
1172 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
1173
dccabdd1 1174 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
1175
11762014-11-13 Ilya Verbin <ilya.verbin@intel.com>
1177 Ilya Tocar <ilya.tocar@intel.com>
1178 Andrey Turetskiy <andrey.turetskiy@intel.com>
1179 Bernd Schmidt <bernds@codesourcery.com>
1180
b0c5e347 1181 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
1182 LTO_SECTION_NAME_PREFIX.
1183 * lto-partition.c (lto_promote_cross_file_statics): Call
1184 select_what_to_stream.
1185 * lto.c (lto_section_with_id): Use section_name_prefix instead of
1186 LTO_SECTION_NAME_PREFIX.
1187 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
1188 being built as an offload compiler.
1189
3754d046 11902014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1191
1192 * lto-lang.c: Remove redundant enum from machine_mode.
1193
1140c305 11942014-10-28 Andrew MacLeod <amacleod@redhat.com>
1195
1196 * lto.c: Adjust include files.
1197 * lto-lang.c: Ditto.
1198 * lto-object.c: Ditto.
1199 * lto-partition.c: Ditto.
1200 * lto-symtab.c: Ditto.
1201
94ea8568 12022014-10-27 Andrew MacLeod <amacleod@redhat.com>
1203
1204 * lto-lang.c: Adjust include files.
1205 * lto-object.c: Ditto.
1206 * lto-partition.c: Ditto.
1207 * lto-symtab.c: Ditto.
1208 * lto.c: Ditto.
1209
c219a638 12102014-10-16 DJ Delorie <dj@redhat.com>
1211
1212 * lto-object.c (lto_obj_begin_section): In the event that pointer
1213 sizes aren't powers of two, choose a more suitable alignment
1214 than (unsigned)(-1).
1215
9f75f026 12162014-10-14 DJ Delorie <dj@redhat.com>
1217
1218 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
1219 size-type as well.
1220 (lto_init): Initialize all intN types, not just int128.
1221
120ce989 12222014-10-06 Martin Liska <mliska@suse.cz>
1223
1224 * lto.c (stream_out): ARG_UNUSED added for last argument.
1225
16d41ae2 12262014-09-24 Aldy Hernandez <aldyh@redhat.com>
1227
1228 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
1229 DECL_ABSTRACT_P.
1230
6b722052 12312014-09-23 Andi Kleen <ak@linux.intel.com>
1232
1233 * lto-partition.c (node_cmp): Update comment.
1234 (varpool_node_cmp): Use symtab_node for comparison.
1235 (add_sorted_nodes): New function.
1236 (lto_balanced_map): Change to keep ordered queue
1237 of ordered node. Handle no_reorder attribute.
1238
d585ba22 12392014-09-11 Jan Hubicka <hubicka@ucw.cz>
1240
1241 * lto.c (lto_read_decls): Register ODR types.
1242
289c4db4 12432014-08-20 Jan Hubicka <hubicka@ucw.cz>
1244
1245 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
1246 call.
1247 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
1248
1df805e3 12492014-08-14 Jan Hubicka <hubicka@ucw.cz>
1250
1251 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
1252
62cc770a 12532014-08-14 Richard Biener <rguenther@suse.de>
1254
1255 PR lto/62067
1256 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
1257
472ca566 12582014-08-08 Richard Biener <rguenther@suse.de>
1259
1260 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
1261
fc8393b7 12622014-08-08 Bin Cheng <bin.cheng@arm.com>
1263
1264 PR lto/62032
1265 * lto-lang.c (lto_init): Switch mis-matched arguments.
1266
5f8841a5 12672014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1268
1269 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
1270
431205b7 12712014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1272
1273 * lto-partition.c, lto-partition.h: Use hash_set instead of
1274 pointer_set.
1275
7fdbd1ec 12762014-07-31 Andi Kleen <ak@linux.intel.com>
1277
1278 * lto.c (hash_canonical_type): Use inchash::hash
1279 and use inchash::add_expr.
1280 (iterative_hash_canonical_type): Dito.
1281
2d97af95 12822014-07-30 Richard Biener <rguenther@suse.de>
1283
1284 * lto-streamer.h (lto_write_data): New function.
1285 * langhooks.c (lhd_append_data): Do not free block.
1286 * lto-section-out.c (lto_write_data): New function writing
1287 raw data to the current section.
1288 (lto_write_stream): Adjust for langhook semantic change.
1289 (lto_destroy_simple_output_block): Write header directly.
1290 * lto-opts.c (lto_write_options): Write options directly.
1291 * lto-streamer-out.c (produce_asm): Write heaeder directly.
1292 (lto_output_toplevel_asms): Likewise.
1293 (copy_function_or_variable): Copy data directly.
1294 (write_global_references): Output index table directly.
1295 (lto_output_decl_state_refs): Likewise.
1296 (write_symbol): Write data directly.
1297 (produce_symtab): Adjust.
1298 (produce_asm_for_decls): Output header and refs directly.
1299
045e2f27 13002014-07-25 Andi Kleen <ak@linux.intel.com>
1301
1302 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
1303
e7f95d73 13042014-07-25 Andi Kleen <ak@linux.intel.com>
1305
1306 * lto.c (hash_canonical_type): Convert to inchash.
1307 (iterative_hash_canonical_type): Dito.
1308
6b214d09 13092014-07-25 Andi Kleen <ak@linux.intel.com>
1310
1311 * lto.c: Include inchash.h
1312
83c7dcd8 13132014-07-14 Jan Hubicka <hubicka@ucw.cz>
1314
1315 * lto.c (mentions_vars_p_decl_non_common): Skip
1316 DECL_ARGUMENT_FLD.
1317 mentions_vars_p_function): Do DECL_ARGUMENTS.
1318 (lto_fixup_prevailing_decls): Update.
1319
e52d4978 13202014-07-12 Jan Hubicka <hubicka@ucw.cz>
1321
1322 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
1323 timevar
1324 (materialize_cgraph): Do not push GIMPLE_IN timevar.
1325
afb0d513 13262014-07-11 Jan Hubicka <hubicka@ucw.cz>
1327
1328 * lto-partition.c (add_references_to_partition): Use
1329 varpool_ctor_useable_for_folding_p.
1330 * lto.c (lto_read_in_decl_state): Update sanity check.
1331
e4a2b488 13322014-07-01 Martin Liska <mliska@suse.cz>
1333
1334 IPA REF alias refactoring
1335 * lto-partition.c (add_symbol_to_partition_1): Usage of
1336 FOR_EACH_ALIAS added.
1337
c7be6601 13382014-06-28 Jan Hubicka <hubicka@ucw.cz>
1339
1340 Revert:
1341 * lto.c (lto_copy_fields_not_streamed): New function.
1342 (compare_tree_sccs_1): Do not compare fields shared in between type
1343 and variant.
1344 (lto_read_decls): Fixup types first before inserting into hash.
1345
c1526d28 13462014-06-28 Andrew Pinski <apinski@cavium.com>
1347
1348 * lto.c (lto_read_decls): Fix comment in comment.
1349
28635c35 13502014-06-28 Jan Hubicka <hubicka@ucw.cz>
1351
1352 * lto.c (lto_copy_fields_not_streamed): New function.
1353 (compare_tree_sccs_1): Do not compare fields shared in between type
1354 and variant.
1355 (lto_read_decls): Fixup types first before inserting into hash.
1356
737331e8 13572014-06-25 Martin Liska <mliska@suse.cz>
1358
1359 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
1360 used.
1361 (add_symbol_to_partition_1): Likewise.
1362 (lto_balanced_map): Likewise.
1363 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
1364
9c2e58d0 13652014-06-24 Jan Hubicka <hubicka@ucw.cz>
1366
1367 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
1368 (mentions_vars_p_function): ... here.
1369 (compare_tree_sccs_1): Update VINDEX checks.
1370 (lto_fixup_prevailing_decls): Likewise.
1371
d62dd039 13722014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1373
1374 * lto.c (canonical_type_hash_cache): Use hash_map instead of
1375 pointer_map.
1376
c1f445d2 13772014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1378
1379 * lto.c: Adjust.
1380
b7393cee 13812014-06-20 Jan Hubicka <hubicka@ucw.cz>
1382
1383 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
1384
9db80d42 13852014-06-20 Jan Hubicka <hubicka@ucw.cz>
1386
1387 * lto.c (compare_tree_sccs_1): Do not compare priorities.
1388
5e68df57 13892014-06-15 Jan Hubicka <hubicka@ucw.cz>
1390
1391 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
1392
e4c07a06 13932014-06-10 Jan Hubicka <hubicka@ucw.cz>
1394
1395 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
1396 (do_whole_program_analysis): Use verify_symtab.
1397
71e19e54 13982014-06-07 Jan Hubicka <hubicka@ucw.cz>
1399
1400 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
1401 lto_fixup_prevailing_decls): Skip section names.
1402
f7715905 14032014-06-02 Andrew MacLeod <amacleod@redhat.com>
1404
1405 * lto-symtab.c: Include builtins.h.
1406
3a4303e7 14072014-05-26 Richard Biener <rguenther@suse.de>
1408
1409 * lto.c (lto_parse_hex): Use int64_t.
1410 (lto_resolution_read): Likewise.
1411
4f78e0a8 14122014-05-23 Jan Hubicka <hubicka@ucw.cz>
1413
1414 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
1415
8c016392 14162014-05-23 Jan Hubicka <hubicka@ucw.cz>
1417
1418 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
1419 symtab pointer.
1420 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
1421
3c77ca67 14222014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1423
1424 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
1425 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
1426 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
1427
47131315 14282012-05-22 Bernd Schmidt <bernds@codesourcery.com>
1429
1430 * lto-object.c: Include "lto-section-names.h".
1431 (LTO_SEGMENT_NAME): Don't define.
1432 * lto.c: Include "lto-section-names.h".
1433
24888760 14342014-05-17 Jan Hubicka <hubicka@ucw.cz>
1435
1436 PR lto/61012
1437 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1438 mixed with variables.
1439
25a27413 14402014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1441
1442 * lto-tree.h: Don't use variable_size gty attribute.
1443 * lto.c (lto_read_in_decl_state): Adjust.
1444 (create_subid_section_table): Likewise.
1445 (lto_flatten_files): Likewise.
1446 (read_cgraph_and_symbols): Likewise.
1447
960d5a55 14482014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1449 Mike Stump <mikestump@comcast.net>
1450 Richard Sandiford <rdsandiford@googlemail.com>
1451
1452 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1453 * lto-lang.c (get_nonnull_operand): Likewise.
1454
060fc206 14552014-04-28 Richard Biener <rguenther@suse.de>
1456
1457 PR middle-end/60092
1458 * lto-lang.c: Define flag_isoc11.
1459
13cbeaac 14602014-04-23 David Malcolm <dmalcolm@redhat.com>
1461
1462 * lto-partition.c (add_references_to_partition): Update for
1463 removal of implicit pointer from the is-a.h API.
1464 (add_symbol_to_partition_1): Likewise.
1465 (contained_in_symbol): Likewise.
1466 (undo_partition): Likewise.
1467 (lto_balanced_map): Likewise.
1468 (promote_symbol): Likewise.
1469 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1470 (lto_symtab_merge_symbols): Likewise.
1471 * lto.c (lto_wpa_write_files): Likewise.
1472
4a137074 14732014-04-15 Richard Biener <rguenther@suse.de>
1474
1475 * lto.c: Include params.h.
1476 (do_whole_program_analysis): Switch on flag_lto_partition value,
1477 add support for LTO_PARTITION_ONE.
1478 * lto-partition.h (lto_balanced_map): Adjust.
1479 * lto-partition.c (lto_balanced_map): Get number of desired
1480 partitions as argument to support -flto-partition=one.
1481
df565eb6 14822014-04-14 Jan Hubicka <hubicka@ucw.cz>
1483
1484 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1485 tp_first_run.
1486
ceaf91ad 14872014-03-19 Jan Hubicka <hubicka@ucw.cz>
1488
1489 * lto.c: Include ipa-inline.h
1490 (do_whole_program_analysis): Free inline summary after partitioning.
1491
73249b1e 14922014-03-19 Richard Biener <rguenther@suse.de>
1493
1494 PR middle-end/60553
1495 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1496 instead of TREE_CHAIN as chain_next.
1497
4e6f2fb9 14982014-03-19 Richard Biener <rguenther@suse.de>
1499
1500 * lto.c (lto_wpa_write_files): Move call to
1501 lto_promote_cross_file_statics ...
1502 (do_whole_program_analysis): ... here, into the partitioning
1503 block. Do not ggc_collect after lto_wpa_write_files but
1504 for a last time before it.
1505
e629dc34 15062014-03-19 Jakub Jelinek <jakub@redhat.com>
1507
1508 PR lto/60571
1509 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1510 Fix formatting.
1511
0baf842d 15122014-03-18 Jakub Jelinek <jakub@redhat.com>
1513
1514 PR sanitizer/60535
1515 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1516 and complex_{float,{,long_}double}_type_node.
1517
c9a24b37 15182014-03-08 Paulo Matos <paulo@matos-sorge.com>
1519
0baf842d 1520 * lto-lang.c (lto_init): Pass flag_short_double to
1521 build_common_tree_nodes.
c9a24b37 1522
a2223fa9 15232014-02-14 Jan Hubicka <hubicka@ucw.cz>
1524
1525 PR lto/60295
1526 * lto.c (stream_out): Avoid parallel streaming with
1527 -flto=jobserver until we are able to throttle it down
1528 resonably.
1529
8c075206 15302014-02-14 Jan Hubicka <hubicka@ucw.cz>
1531
1532 * lto-partition.c (add_symbol_to_partition_1,
1533 undo_partition, lto_balanced_map): Aliases have no
1534 defined size.
1535 (lto_balanced_map): Do not follow refering variables
1536 if they can be optimized out.
1537
f4c35256 15382014-02-14 Richard Biener <rguenther@suse.de>
1539
1540 PR lto/60179
1541 * lto.c (compare_tree_sccs_1): Do not compare
1542 DECL_FUNCTION_SPECIFIC_TARGET.
1543 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1544
f5cbf731 15452014-02-12 Richard Biener <rguenther@suse.de>
1546
1547 PR lto/60060
1548 * lto-lang.c (lto_write_globals): Do not call
1549 wrapup_global_declarations or emit_debug_global_declarations
1550 but emit debug info for non-function scope variables
1551 directly.
1552
a973177e 15532014-02-06 Jan Hubicka <hubicka@ucw.cz>
1554
1555 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1556
94107507 15572014-02-06 Jan Hubicka <hubicka@ucw.cz>
1558
1559 PR ipa/59469
1560 * lto-partition.c (symbol_class): Move to cgraph.h
1561 (get_symbol_class): Move to symtab.c
1562 (add_references_to_partition, add_symbol_to_partition_1,
1563 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1564 lto_promote_cross_file_statics): Update.
1565
3e17769e 15662014-02-05 Jan Hubicka <hubicka@ucw.cz>
1567
1568 * lto.c (lto_parallelism): New static var.
1569 (do_stream_out, wait_for_child, stream_out): New static functions.
1570 (lto_wpa_write_files): Add support for parallel streaming.
1571 (do_whole_program_analysis): Set parallelism.
1572 * lang.opt (fwpa): Add parameter.
1573 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1574 (lto_init): Update use of flag_wpa.
1575 * lto-streamer.h (asm_nodes_output): Declare.
1576
00288439 15772014-02-05 Richard Biener <rguenther@suse.de>
1578
1579 * lto.h (lto_global_var_decls): Remove.
1580 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1581 (lto_write_globals): Do nothing in WPA stage, gather globals from
1582 the varpool here ...
1583 * lto.c (lto_main): ... not here.
1584 (materialize_cgraph): Do not call rest_of_decl_compilation
1585 on the empty lto_global_var_decls vector.
1586 (lto_global_var_decls): Remove.
1587
96a3dc39 15882014-02-04 Jan Hubicka <hubicka@ucw.cz>
1589
1590 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1591 needs duplicating, not generic COMDAT.
1592
6541e9a1 15932014-02-04 Richard Biener <rguenther@suse.de>
1594
1595 PR lto/59723
1596 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1597 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1598
b89ce5e3 15992014-02-04 Jan Hubicka <hubicka@ucw.cz>
1600 Markus Trippelsdorf
1601
1602 PR ipa/59469
1603 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1604 merge force_output and forced_by_abi flags.
1605
a89e6c15 16062014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1607
1608 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1609 flag_cilkplus.
1610
c205a71b 16112014-01-09 Richard Biener <rguenther@suse.de>
1612
1613 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1614
f1105f81 16152014-01-09 Richard Biener <rguenther@suse.de>
1616
1617 PR lto/45586
1618 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1619 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1620 (gimple_canonical_types_compatible_p): Do not compare them either.
1621
3aea1f79 16222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1623
1624 Update copyright years
1625
098f44bc 16262013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1627
1628 * lto.c: Remove struct tags when referring to class varpool_node.
1629 * lto-partition.c: Likewise.
1630 * lto-symtab.c: Likewise.
1631
ea0695f9 16322013-11-29 Jakub Jelinek <jakub@redhat.com>
1633 Richard Biener <rguenther@suse.de>
1634
1635 PR lto/59326
1636 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1637
fe3e3369 16382013-11-29 Jakub Jelinek <jakub@redhat.com>
1639
1640 PR lto/59326
1641 * lto.c (mentions_vars_p_omp_clause): New function.
1642 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1643 after return stmts.
1644
bc61cadb 16452013-11-22 Andrew MacLeod <amacleod@redhat.com>
1646
1647 * lto.c: Add required include files from gimple.h.
1648 * lto-lang.c: Likewise
1649 * lto-object.c: Likewise
1650 * lto-partition.c: Likewise
1651 * lto-symtab.c: Likewise
1652
f1c8b4d7 16532013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1654
1655 * lto-partition.c lto-symtab.c lto.c Adjust.
1656
9ed99284 16572013-11-14 Diego Novillo <dnovillo@google.com>
1658
1659 * lto-lang.c: Include stringpool.h.
1660 Include stor-layout.h.
1661 * lto-partition.c: Include gcc-symtab.h.
1662 * lto.c: Include stor-layout.h.
1663
452659af 16642013-10-31 David Malcolm <dmalcolm@redhat.com>
1665
1666 Automated part of renaming of symtab_node_base to symtab_node.
1667
1668 Patch autogenerated by rename_symtab.py from
1669 https://github.com/davidmalcolm/gcc-refactoring-scripts
1670 revision 58bb219cc090b2f4516a9297d868c245495ee622
1671
1672 * lto-partition.c (add_symbol_to_partition): Rename
1673 symtab_node_base to symtab_node.
1674 (get_symbol_class): Likewise.
1675 (symbol_partitioned_p): Likewise.
1676 (add_references_to_partition): Likewise.
1677 (add_symbol_to_partition_1): Likewise.
1678 (contained_in_symbol): Likewise.
1679 (add_symbol_to_partition): Likewise.
1680 (lto_1_to_1_map): Likewise.
1681 (lto_max_map): Likewise.
1682 (lto_balanced_map): Likewise.
1683 (privatize_symbol_name): Likewise.
1684 (promote_symbol): Likewise.
1685 (may_need_named_section_p): Likewise.
1686 (rename_statics): Likewise.
1687 (lto_promote_statics_nonwpa): Likewise.
1688 * lto-symtab.c (lto_symtab_merge): Likewise.
1689 (lto_symtab_resolve_replaceable_p): Likewise.
1690 (lto_symtab_symbol_p): Likewise.
1691 (lto_symtab_resolve_can_prevail_p): Likewise.
1692 (lto_symtab_resolve_symbols): Likewise.
1693 (lto_symtab_merge_decls_2): Likewise.
1694 (lto_symtab_merge_decls_1): Likewise.
1695 (lto_symtab_merge_decls): Likewise.
1696 (lto_symtab_merge_symbols_1): Likewise.
1697 (lto_symtab_merge_symbols): Likewise.
1698 (lto_symtab_prevailing_decl): Likewise.
1699 * lto.c (lto_wpa_write_files): Likewise.
1700 (read_cgraph_and_symbols): Likewise.
1701 (do_whole_program_analysis): Likewise.
1702
d03e6917 17032013-10-30 David Malcolm <dmalcolm@redhat.com>
1704
1705 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1706 declarations onto multiple lines to make things easier for
1707 rename_symtab.py.
1708 (lto_symtab_merge_decls_1): Likewise.
1709 (lto_symtab_merge_symbols_1): Likewise.
1710
d037099f 17112013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1712
1713 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1714 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1715 Plus is enabled.
1716
02774f2d 17172013-10-29 David Malcolm <dmalcolm@redhat.com>
1718
1719 Patch autogenerated by refactor_symtab.py from
1720 https://github.com/davidmalcolm/gcc-refactoring-scripts
1721 revision 58bb219cc090b2f4516a9297d868c245495ee622
1722
1723 * lto-partition.c (lto_promote_cross_file_statics): Update for
1724 conversion of symtab types to a true class hierarchy.
1725 (rename_statics): Likewise.
1726 (promote_symbol): Likewise.
1727 (privatize_symbol_name): Likewise.
1728 (lto_balanced_map): Likewise.
1729 (varpool_node_cmp): Likewise.
1730 (node_cmp): Likewise.
1731 (lto_1_to_1_map): Likewise.
1732 (undo_partition): Likewise.
1733 (add_symbol_to_partition): Likewise.
1734 (contained_in_symbol): Likewise.
1735 (add_symbol_to_partition_1): Likewise.
1736 (add_references_to_partition): Likewise.
1737 (symbol_partitioned_p): Likewise.
1738 (get_symbol_class): Likewise.
1739 (lto_max_map): Likewise.
1740 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1741 (lto_symtab_merge_symbols): Likewise.
1742 (lto_symtab_merge_symbols_1): Likewise.
1743 (lto_symtab_merge_decls): Likewise.
1744 (lto_symtab_merge_decls_1): Likewise.
1745 (lto_symtab_merge_decls_2): Likewise.
1746 (lto_symtab_resolve_symbols): Likewise.
1747 (lto_symtab_resolve_can_prevail_p): Likewise.
1748 (lto_symtab_symbol_p): Likewise.
1749 (lto_symtab_resolve_replaceable_p): Likewise.
1750 (lto_symtab_merge): Likewise.
1751 (lto_varpool_replace_node): Likewise.
1752 (lto_cgraph_replace_node): Likewise.
1753 * lto.c (lto_main): Likewise.
1754 (do_whole_program_analysis): Likewise.
1755 (materialize_cgraph): Likewise.
1756 (read_cgraph_and_symbols): Likewise.
1757 (cmp_partitions_order): Likewise.
1758 (lto_materialize_function): Likewise.
1759 (has_analyzed_clone_p): Likewise.
1760
b23fb4cb 17612013-10-29 Andrew MacLeod <amacleod@redhat.com>
1762
1763 * lto/lto-object.c: Add gimple.h to include list.
1764 * lto/lto-partition.c: Likewise.
1765
dd9784d4 17662013-10-18 Andrew MacLeod <amacleod@redhat.com>
1767
1768 * lto.c: Remove tree-flow.h from include list.
1769
fdbb424a 17702013-10-15 Richard Biener <rguenther@suse.de>
1771
1772 * lto.c (hash_canonical_type): Split out from ...
1773 (iterative_hash_canonical_type): ... here. Register types
1774 we recurse to.
1775 (gimple_canonical_type_hash): Adjust.
1776 (gimple_register_canonical_type_1): Split out from ...
1777 (gimple_register_canonical_type): ... here. Cache computed
1778 hash value.
1779 (lto_register_canonical_types): Split into two modes,
1780 clearing and computing TYPE_CANONICAL.
1781 (lto_read_decls): Adjust.
1782 (read_cgraph_and_symbols): Do two passes over global trees,
1783 first clearing then computing TYPE_CANONICAL.
1784
fb26741a 17852013-10-14 Richard Biener <rguenther@suse.de>
1786
1787 * lto.c (gimple_canonical_types): Move out-of GC space.
1788 (canonical_type_hash_cache): Make a pointer-map.
1789 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1790 New counters.
1791 (iterative_hash_canonical_type): Adjust.
1792 (read_cgraph_and_symbols): Likewise.
1793 (print_lto_report_1): Likewise.
1794
d7009cf6 17952013-10-14 Richard Biener <rguenther@suse.de>
1796
1797 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1798 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1799 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1800 gimple_types_compatible_p_1, gimple_types_compatible_p,
1801 visit, iterative_hash_name, struct type_hash_pair,
1802 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1803 gimple_type_eq, gimple_register_type, num_not_merged_types,
1804 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1805 num_not_merged_types_in_same_scc_trees): Remove old merging code
1806 and statistics.
1807 (lto_read_decls): Do not run old merging code in parallel.
1808 (read_cgraph_and_symbols): Do not init/free old merging
1809 data structures.
1810 (print_lto_report_1): Do not report differences of old vs. new
1811 merging code.
1812
700d6a0b 18132013-10-14 Richard Biener <rguenther@suse.de>
1814
1815 * lto-lang.c (lto_init): Do not re-init canonical types here.
1816 (lto_register_canonical_types): Move to ...
1817 * lto.c (lto_register_canonical_types): ... here.
1818 (gimple_canonical_types, canonical_type_hash_cache,
1819 iterative_hash_canonical_type, gimple_canonical_type_hash,
1820 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1821 gimple_register_canonical_type): Add canonical type merging machinery
1822 moved from gimple.c.
1823 (read_cgraph_and_symbols): Init and free canonical type tables
1824 here.
1825 (print_lto_report_1): Report canonical type table stats here.
1826
bc7bff74 18272013-10-11 Jakub Jelinek <jakub@redhat.com>
1828
1829 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1830
d2681e34 18312013-09-25 Tom Tromey <tromey@redhat.com>
1832
1833 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1834 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1835 (lto/lto-object.o): Remove.
1836
94956000 18372013-09-06 Richard Biener <rguenther@suse.de>
1838
1839 * lto-symtab.c: Move from gcc/
1840 * lto.h: Include vec.h.
1841 (lto_global_var_decls): Declare.
1842 * lto.c (lto_global_var_decls): Move definition here.
1843 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1844 (lto-symtab.o): Add.
1845 * config-lang.in (gtfiles): Add lto.h.
1846
93cb0915 18472013-08-31 Jan Hubicka <jh@suse.cz>
1848
1849 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1850 DECL_FIELD_OFFSET can contain an reference to variable.
1851
d21755bc 18522013-08-31 Jan Hubicka <jh@suse.cz>
1853
1854 * lto.c (tree_with_vars): Turn into vector.
1855 (MAYBE_REMEMBER_WITH_VARS): Change to...
1856 (CHECK_VAR): ... this one.
1857 (CHECK_NO_VAR): New macro.
1858 (maybe_remember_with_vars_typed): Turn to ...
1859 (mentions_vars_p_typed): ... this one.
1860 (maybe_remember_with_vars_common): Turn to ...
1861 (mentions_vars_p_comon): ... this one.
1862 (maybe_remember_with_vars_decl_minimal): Turn to ...
1863 (mentions_vars_p_decl_minmal): ... this one.
1864 (maybe_remember_with_vars_decl_common): Turn to ...
1865 (mentions_vars_p_decl_common): ... this one.
1866 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1867 (mentions_vars_p_decl_with_vis): ... this one.
1868 (maybe_remember_with_vars_decl_non_common): Turn to ...
1869 (mentions_vars_p_decl_non_common): ... this one.
1870 (maybe_remember_with_vars_function): Turn to ...
1871 (mentions_vars_p_function): ... this one.
1872 (maybe_remember_with_vars_field_decl): Turn to ...
1873 (mentions_vars_p_field_decl): ... this one.
1874 (maybe_remember_with_vars_type): Turn to ...
1875 (mentions_vars_p_type): ... this one.
1876 (maybe_remember_with_vars_binfo): Turn to ...
1877 (mentions_vars_p_binfo): ... this one.
1878 (maybe_remember_with_vars_constructor): Turn to ...
1879 (mentions_vars_p_constructor): ... this one.
1880 (maybe_remember_with_vars_expr): Turn to ...
1881 (mentions_vars_p_expr): ... this one.
1882 (maybe_remember_with_vars): Turn to ...
1883 (mentions_vars_p): ... this one.
1884 (lto_read_decls): Update.
1885 (LTO_SET_PREVAIL): Do not call function for internal decls.
1886 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1887 check that something was updated.
1888 (lto_fixup_state): Do not care about internal decls.
1889 (lto_fixup_decls): Update.
1890 (read_cgraph_and_symbols): Update.
1891
5f74a074 18922013-08-29 Jan Hubicka <jh@suse.cz>
1893
1894 * lto.c (read_cgraph_and_symbols): Free decl states.
1895
2d9cc481 18962013-08-29 Jan Hubicka <jh@suse.cz>
1897
1898 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1899 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1900 TYPE_FINAL_P.
1901
881fe02c 19022013-08-28 Jan Hubicka <jh@suse.cz>
1903
1904 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1905 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1906 (unify_scc): Do checking assert.
1907
66d78392 19082013-08-06 Jan Hubicka <jh@suse.cz>
1909 Martin Liska <marxin.liska@gmail.com>
1910
1911 * lto-partition.c (lto_balanced_map): Always base order on
1912 source file order.
1913
eaad46f2 19142013-08-06 Jan Hubicka <jh@suse.cz>
1915
1916 * lto.c (lto_materialize_function): Do not read body anymore.
1917
4df870fd 19182013-08-02 Jan Hubicka <jh@suse.cz>
1919
1920 * lto.c (lto_materialize_function): Do not push struct function.
1921 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1922 (may_need_named_section_p): Even abstract origins may need
1923 named section.
1924
3ea50c01 19252013-07-30 David Malcolm <dmalcolm@redhat.com>
1926
1927 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1928 PASS_MANAGER_H.
1929
1930 * lto.c (do_whole_program_analysis): Update for move of
1931 all_regular_ipa_passes from a global to a field of class
1932 pass_manager.
1933
75de4aa2 19342013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1935
1936 * lto-partition.c: Fix typos.
1937
593309df 19382013-06-20 Jan Hubicka <jh@suse.cz>
1939
1940 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1941 partitioning of variables.
1942
fdbe58cf 19432013-06-20 Jan Hubicka <jh@suse.cz>
1944
1945 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1946
df8d3e89 19472013-06-19 Jan Hubicka <jh@suse.cz>
1948
1949 * lto-partition.c (add_references_to_partition): Use
1950 ctor_for_folding.
1951
be1cd111 19522013-06-18 Richard Biener <rguenther@suse.de>
1953
1954 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1955 and use it.
1956 (lto_register_function_decl_in_symtab): Likewise.
1957 (cmp_tree): New function.
1958 (unify_scc): Instead of using the streamer cache map from entry
1959 to cache index match up the two maps we have by sorting them.
1960 Adjust calls to lto_register_var_decl_in_symtab and
1961 lto_register_function_decl_in_symtab.
1962
8ceff600 19632013-06-17 Richard Biener <rguenther@suse.de>
1964
1965 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1966 * lto.c: Include data-streamer.h.
1967 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1968 (gimple_type_leader_entry_s, gimple_type_leader,
1969 gimple_lookup_type_leader): Remove.
1970 (gtc_visit): Simplify.
1971 (gimple_types_compatible_p): Likewise.
1972 (gimple_register_type_1): Likewise. Merge into ...
1973 (gimple_register_type): ... this. Keep it as legacy for
1974 statistics purposes for now.
1975 (fixup_integer_cst): Remove.
1976 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1977 rename to ...
1978 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1979 maybe_remember_with_vars_*): ... these.
1980 (uniquify_nodes): Remove.
1981 (lto_fixup_prevailing_type): New function.
1982 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1983 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1984 (num_merged_types, num_prevailing_types, num_not_merged_types,
1985 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1986 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1987 num_scc_compare_collisions): New global counters.
1988 (compare_tree_sccs_1): New function.
1989 (compare_tree_sccs): Likewise.
1990 (unify_scc): Likewise.
1991 (lto_read_decls): Stream in tree SCCs and unify them on the
1992 way in. Finalize prevailing SCC tree members.
1993 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1994 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1995 to ggc-collect during merging.
1996 (print_lto_report_1): Adjust for new merging code.
1997
da4b8721 19982013-06-12 Jan Hubicka <jh@suse.cz>
1999
2000 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
2001
9e9c3e92 20022013-06-12 Jan Hubicka <jh@suse.cz>
2003
2004 * lto.c (register_resolution): Take lto_file_data argument.
2005 (lto_register_var_decl_in_symtab,
2006 lto_register_function_decl_in_symtab): Update.
2007 (read_cgraph_and_symbols): Update resolution_map handling.
2008
21ebaa24 20092013-06-11 Jan Hubicka <jh@suse.cz>
f2526cce 2010
2011 * lto-partition.c (get_symbol_class): Simplify weakref handling.
2012 (add_symbol_to_partition_1): Likewise.
2013 (contained_in_symbol): Likewise.
2014 (lto_balanced_map): Likewise.
2015 (rename_statics): Drop weakref.
2016
4b927f54 20172013-06-05 Richard Biener <rguenther@suse.de>
2018
2019 * lto.c (num_merged_types): New global variable.
2020 (uniquify_nodes): Increase num_merged_types when merging a type.
2021 (print_lto_report_1): Output the number of merged types.
2022
48669653 20232013-06-01 Jan Hubicka <jh@suse.cz>
2024
2025 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
2026 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
2027 (do_whole_program_analysis): Update dumping.
2028
15ca8f90 20292013-05-29 Jan Hubicka <jh@suse.cz>
2030
2031 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
2032 flags.
2033 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
2034
59651d3b 20352013-05-15 Jan Hubicka <jh@suse.cz>
2036
2037 * lto-partition.c (privatize_symbol_name): Return true when
2038 privatizing happened.
2039 (rename_statics): Do not go into infinite loop when privatizing
2040 is not needed.
2041
be5f9e46 20422013-05-16 Jason Merrill <jason@redhat.com>
2043
2044 * Make-lang.in ($(LTO_EXE)): Use link mutex.
2045
15c999e3 20462013-05-15 Martin Jambor <mjambor@suse.cz>
2047
2048 * lto-partition.c (lto_balanced_map): Print symbol order instead
2049 of node uids.
2050
33864132 20512013-05-15 Jan Hubicka <jh@suse.cz>
2052
2053 PR lto/57038
2054 PR lto/47375
2055 * lto-partition.c (get_symbol_class): Fix weakrefs.
2056 (lto_balanced_map): Fix weakrefs.
2057 (privatize_symbol_name): Remove unnecesary label.
2058 (rename_statics): Handle weakrefs as statics.
2059
85b7ebb2 20602013-05-09 Jan Hubicka <jh@suse.cz>
2061 Richard Biener <rguenther@suse.de>
2062
2063 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
2064 (lto_register_var_decl_in_symtab): Likewise.
2065 (lto_main): Promote statics.
2066 * lto-partition.c (privatize_symbol_name): New function.
2067 (promote_symbol): Use it.
2068 (may_need_named_section_p): New predicate.
2069 (rename_statics): New functions.
2070 (lto_promote_cross_file_statics): Simplify; do renaming.
2071 (lto_promote_statics_nonwpa): New function.
2072 * lto-partition.h (lto_promote_statics_nonwpa): New function.
2073
ab3c0986 20742013-02-08 Richard Biener <rguenther@suse.de>
2075
2076 PR lto/56231
2077 * lto-lang.c (lto_init): Do not enter a dummy file.
2078
7a87c8e1 20792013-02-07 Uros Bizjak <ubizjak@gmail.com>
2080
2081 PR bootstrap/56227
2082 * lto.c (lto_resolution_ready): Use %wx instead of
2083 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
2084
871609a8 20852013-02-04 Richard Guenther <rguenther@suse.de>
2086
2087 PR lto/56168
2088 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
2089 or lto_fixup_decls at LTRANS time.
2090
c7fbaa62 20912013-01-09 Jan Hubicka <jh@suse.cz>
2092
2093 PR lto/45375
2094 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
2095
d9501635 20962012-12-10 H.J. Lu <hongjiu.lu@intel.com>
2097
2098 PR lto/55466
2099 * lto.c (lto_register_var_decl_in_symtab): Don't record static
2100 variables.
2101 (lto_main): Record the global variables if WPA isn't enabled.
2102
1e094109 21032012-11-20 Diego Novillo <dnovillo@google.com>
2104 Jakub Jelinek <jakub@redhat.com>
2105
2106 * lto.c: Replace all vec<T, A>() initializers with vNULL.
2107
f1f41a6c 21082012-11-16 Diego Novillo <dnovillo@google.com>
2109
2110 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2111
2112 * lto-lang.c: Use new vec API in vec.h.
2113 * lto-partition.c: Likewise.
2114 * lto-partition.h: Likewise.
2115 * lto.c: Likewise.
2116
d2313b52 21172012-10-31 Lawrence Crowl <crowl@google.com>
2118
2119 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
2120 down-cast via dyn_cast.
2121 * lto-partition.c (add_symbol_to_partition_1): Likewise.
2122 (undo_partition): Likewise.
2123 (lto_balanced_map): Likewise.
2124 (get_symbol_class): Likewise and via is_a.
2125 (lto_balanced_map): Change symtab checking to is_a.
2126
a5693828 21272012-10-12 Richard Biener <rguenther@suse.de>
2128
2129 PR lto/54898
2130 * lto.c (gimple_types_compatible_p_1): Also compare
2131 TYPE_MAIN_VARIANT.
2132 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
2133
883554eb 21342012-10-09 Tobias Burnus <burnus@net-b.de>
2135
2136 * lto-lang.c (lto_register_builtin_type): Avoid useless
2137 decl creation.
2138 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
2139
14c7dd36 21402012-10-08 Tobias Burnus <burnus@net-b.de>
2141
2142 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
2143 Free lto_file struct after closing the file.
2144
35d3a6eb 21452012-10-08 Jan Hubicka <jh@suse.cz>
2146
2147 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
2148 (fixup_integer_cst): New functoin.
2149 (lto_ft_type): Fixup BASETYPE of methods and offsets.
2150
b8925abd 21512012-10-07 Jan Hubicka <jh@suse.cz>
2152
2153 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
2154 release input encoders.
2155 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
2156
18ff06f9 21572012-10-06 Jan Hubicka <jh@suse.cz>
2158
2159 PR lto/54790
2160 * lto.c (resolution_map): New static var.
2161 (register_resolution): New function.
2162 (lto_register_var_decl_in_symtab): Use it.
2163 (read_cgraph_and_symbols): Copy resolutions into the symtab.
2164
9078126c 21652012-09-20 Martin Jambor <mjambor@suse.cz>
2166
2167 * lto.c (lto_materialize_function): Call push_struct_function and
2168 pop_cfun.
2169
5169661d 21702012-09-19 Dehao Chen <dehao@google.com>
2171
2172 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
2173
c9aa6453 21742012-09-19 Jan Hubicka <jh@suse.cz>
2175
2176 * lto.c (lto_materialize_function): Update confused comment.
2177 (read_cgraph_and_symbols): Do not free symtab.
2178
0851d795 21792012-09-12 Jan Hubicka <jh@suse.cz>
2180
2181 * lto.c (do_whole_program_analysis): Care timevars, statistics and
2182 AUX pointer cleaning. Add max partitioning.
2183 * lto-partition.c (enum symbol_class): New.
2184 (get_symbol_class): New function.
2185 (symbol_partitioned_p): New function.
2186 (add_references_to_partition): Remove.
2187 (add_aliases_to_partition): Remove.
2188 (add_cgraph_node_to_partition_1): Remove.
2189 (add_cgraph_node_to_partition): Remove.
2190 (add_symbol_to_partition): New function.
2191 (add_symbol_to_partition_1): New function.
2192 (contained_in_symbol): New function.
2193 (partition_cgraph_node_p): Remove.
2194 (partition_varpool_node_p): Remove.
2195 (partition_symbol_p): Remove.
2196 (lto_1_to_1_map): Cleanup.
2197 (lto_max_map): New.
2198 (lto_balanced_map): Update.
2199 (lto_promote_cross_file_statics): Update.
2200 * lto-partition.h (lto_max_map): Declare.
2201 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
2202
8873e58c 22032012-09-11 Jan Hubicka <jh@suse.cz>
2204
2205 PR lto/54312
2206 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
2207 type is variant leader.
2208
ed29d77f 22092012-09-11 Richard Guenther <rguenther@suse.de>
2210
2211 * lto.c (enum gtc_mode): Remove.
2212 (struct type_pair_d): Adjust.
2213 (lookup_type_pair): Likewise.
2214 (gimple_type_leader): Do not mark as deletable.
2215 (gimple_lookup_type_leader): Adjust.
2216 (gtc_visit): Likewise.
2217 (gimple_types_compatible_p_1): Likewise.
2218 (gimple_types_compatible_p): Likewise.
2219 (gimple_type_hash): Likewise.
2220 (gimple_register_type): Likewise.
2221 (read_cgraph_and_symbols): Manage lifetime of tables
2222 here.
2223
bdaea387 22242012-09-11 Richard Guenther <rguenther@suse.de>
2225
2226 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
2227 struct type_pair_d, lookup_type_pair, struct sccs,
2228 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
2229 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
2230 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
2231 visit, iterative_hash_name, struct type_hash_pair,
2232 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
2233 gimple_type_eq, gimple_register_type_1, gimple_register_type):
2234 Move here from gimple.c
2235 (read_cgraph_and_symbols): Free hash tables here.
2236 (print_lto_report_1): New function wrapping print_lto_report.
2237 (do_whole_program_analysis): Call it.
2238 (lto_main): Likewise.
2239
b6f96313 22402012-09-10 Jan Hubicka <jh@suse.cz>
2241
2242 * lto-partition.c (partition_symbol_p): Forward declare.
2243 (add_references_to_partition): Reimplement using partition_symbol_p.
2244 (add_aliases_to_partition): Break out from add_references_to_partition;
2245 reimplement using partition_symbol_p.
2246 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
2247 add sanity checks.
2248 (add_varpool_node_to_partition): Use add_aliases_to_partition.
2249 (partition_varpool_node_p): Do not special case aliases.
2250
724462b0 22512012-08-12 Jan Hubicka <jh@suse.cz>
2252
2253 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
2254 it is deleted after streaming.
2255 * lto-partition.c (partition_symbol_p): New function.
2256 (promote_var, promote_fn): Remove.
2257 (promote_symbol): New function.
2258 (lto_promote_cross_file_statics): First compute boundaries; rewrite
2259 to lookup the actual boundaries instead of computing them ad-hoc.
2260
5cf7e051 22612012-08-12 Jan Hubicka <jh@suse.cz>
2262
2263 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
2264 in partitioning.
2265 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
2266 by encoder.
2267 * lto-partition.c (new_partition): Update.
2268 * lto.c (cmp_partitions_order): Update.
2269 (lto_wpa_write_files): Update.
2270 (free_ltrans_partitions): Update.
2271 (add_references_to_partition): Update.
2272 (add_cgraph_node_to_partition_1): Update.
2273 (add_cgraph_node_to_partition): Update.
2274 (add_varpool_node_to_partition): Update.
2275 (undo_partition): Update.
2276 (lto_balanced_map): Update.
2277 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
2278 set_referenced_from_this_partition_p): Update.
2279 (lto_promote_cross_file_statics): Update.
2280
eab36a5a 22812012-08-12 Jan Hubicka <jh@suse.cz>
2282
2283 * lto-partition.c (set_referenced_from_other_partition_p,
2284 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
2285 New functions.
2286 (lto_promote_cross_file_statics): Use them.
2287
02b699d5 22882012-07-24 Jan Hubicka <jh@suse.cz>
2289
2290 * lto.c (read_cgraph_and_symbols): Use input_symtab.
2291
a5656b73 22922012-07-24 Uros Bizjak <ubizjak@gmail.com>
2293
2294 * lto-tree.h (lang_decl): Add variable_size GTY option.
2295
b9ed1410 22962012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2297
2298 * lto.c: Do not include timevar.h.
2299 * Make-lang.in: Fix dependencies.
2300
161121a9 23012012-06-18 Lawrence Crowl <crowl@google.com>
2302
c9e63184 2303 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
161121a9 2304 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
2305 to lto_wpa_write_files.
2306 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
2307 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
2308 TV_PHASE_SETUP for the call to lto_init. Use new timevar
2309 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
2310 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
2311 to be a front end, but is not one.
2312
18a71d50 23132012-05-18 Jan Hubicka <jh@suse.cz>
2314
2315 * lto.c (lto_materialize_constructors_and_inits): Remove.
2316 (read_cgraph_and_symbols): Remove handling of alias pairs.
2317
aa419a52 23182012-05-17 Jan Hubicka <jh@suse.cz>
2319
2320 * lto-partition.c (add_references_to_partition): Handle external vars.
2321 (partition_varpool_node_p): Likewise.
2322 (lto_promote_cross_file_statics): Do not promote externals.
2323
258a168d 23242012-05-14 Bernd Schmidt <bernds@codesourcery.com>
2325
2326 * lto-lang.c (handle_fnspec_attribute): New static function.
2327 (lto_attribute_table): Add "fn spec".
2328 (DEF_ATTR_STRING): Define and undefine along with the other macros.
2329
3d1c0354 23302012-05-04 Jan Hubicka <jh@suse.cz>
2331
2332 * lto.c (do_whole_program_analysis): Set timevars correctly.
2333 (lto_main): Likewise.
258a168d 2334
596c40fb 23352012-05-04 Richard Guenther <rguenther@suse.de>
2336
2337 * lang.opt (fwpa): Do not mark as Optimization.
2338 (fltrans): Likewise.
2339
cf951b1a 23402012-04-30 Jan Hubicka <jh@suse.cz>
2341
2342 * lto.c (lto_main): Use compile ().
596c40fb 2343 * lto-partition.c (partition_cgraph_node_p): Use
2344 symtab_used_from_object_file_p.
cf951b1a 2345 (partition_varpool_node_p): Likewise.
2346
8efa224a 23472012-04-20 Jan Hubicka <jh@suse.cz>
2348
2349 * lto-partition.c (partition_cgraph_node_p): Use force_output.
2350
04ec15fa 23512012-04-18 Jan Hubicka <jh@suse.cz>
2352
2353 * lto-partition.c (add_references_to_partition, lto_balanced_map):
2354 Update for new ipa-ref API.
2355
7c455d87 23562012-04-16 Jan Hubicka <jh@suse.cz>
2357
2358 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
c9e63184 2359 walkers to walk cgraph and varpool.
7c455d87 2360 (materialize_cgraph): Likewise.
2361 * lto-partition.c (lto_1_to_1_map): Likewise.
2362 (lto_balanced_map): Likewise.
2363 (lto_promote_cross_file_statics): Likewise.
2364
7d0d0ce1 23652012-04-14 Jan Hubicka <jh@suse.cz>
2366
2367 * lto.c: Update field referenced for new cgraph/varpool layout.
2368 * lto-partition.c: Likewise.
2369
50ed40f5 23702012-04-11 Jan Hubicka <jh@suse.cz>
2371
2372 * lto.c: Update copyright; remove params.h, ipa-inline.h
2373 and ipa-utils.h inlines; inline lto-partition.h
2374 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
2375 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
2376 add_references_to_partition, add_cgraph_node_to_partition_1,
2377 add_cgraph_node_to_partition, add_varpool_node_to_partition,
2378 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
2379 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
2380 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
2381 * lto-partition.c: ... here; new file.
2382 * lto-partition.h: New file.
2383 * Make-lang.in (lto.o): Update dependencies.
2384 (lto-partition.o): New.
2385
37e77161 23862012-04-05 Richard Guenther <rguenther@suse.de>
2387
2388 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
2389 definition.
2390
a51edb4c 23912012-03-12 Richard Guenther <rguenther@suse.de>
2392
2393 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
2394
90f56810 23952012-03-06 Richard Guenther <rguenther@suse.de>
2396
2397 PR lto/52097
2398 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
2399
ff56be02 24002012-02-28 Richard Guenther <rguenther@suse.de>
2401
2402 PR lto/52400
2403 * lto.c (lto_register_function_decl_in_symtab): Do not register
2404 a reverse renamed decl mapping.
2405
3affb5a8 24062012-01-06 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR lto/51774
2409 * lto-lang.c (handle_returns_twice_attribute): New function.
2410 (lto_attribute_table): Add returns_twice attribute.
2411
a7a11a02 24122011-12-21 Richard Guenther <rguenther@suse.de>
2413
2414 * lto.c (GIMPLE_REGISTER_TYPE): New define.
2415 (LTO_FIXUP_TREE): Use it.
2416 (uniquify_nodes): Mark new non-prevailing types and avoid
2417 calling gimple_register_type on others.
2418 (lto_read_decls): Add comment.
2419
949e5786 24202011-12-13 Eric Botcazou <ebotcazou@adacore.com>
2421
2422 * lto.h (lto_parse_hex): Delete.
2423 * lto.c (lto_read_decls): Use 'int' for offsets.
2424 (lto_parse_hex): Make static and return proper 64-bit host type.
2425 (lto_resolution_read): Use proper 64-bit host type.
2426
6cd6787c 24272011-12-13 Richard Guenther <rguenther@suse.de>
2428
2429 PR lto/48354
2430 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
2431 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
2432
c8c597a7 24332011-12-01 Uros Bizjak <ubizjak@gmail.com>
2434
2435 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2436 (ignore_attribute): New.
2437
ea0e88d1 24382011-11-21 Aldy Hernandez <aldyh@redhat.com>
2439
2440 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2441 (handle_transaction_pure_attribute): New.
2442
954825c9 24432011-11-03 Richard Guenther <rguenther@suse.de>
2444
2445 PR lto/44965
2446 * lto-lang.c (lto_post_options): Do not read file options.
2447 * lto.c (lto_read_all_file_options): Remove.
2448 (lto_init): Call lto_set_in_hooks here.
2449
bc2cc717 24502011-10-09 Jan Hubicka <jh@suse.cz>
2451
2452 * lto.c (node_cmp, varpool_node_cmp): New functions.
2453 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2454 (cmp_partitions): Rename to ...
2455 (cmp_partitions_size): ... this one.
2456 (cmp_partitions_order): New function.
2457 (lto_wpa_write_files): Sort partitions by order when
2458 -fno-toplevel-reorder is used.
2459
a5f12044 24602011-10-09 Andi Kleen <ak@linux.intel.com>
2461
2462 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2463
b9a16870 24642011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2465
2466 * lto-lang.c (def_builtin_1): Delete old interface with two
2467 parallel arrays to hold standard builtin declarations, and replace
2468 it with a function based interface that can support creating
2469 builtins on the fly in the future. Change all uses, and poison
2470 the old names. Make sure 0 is not a legitimate builtin index.
2471
21ebaa24 24722011-10-02 Andi Kleen <ak@linux.intel.com>
805389b2 2473
2474 * lto-object.c (lto_obj_add_section_data): Add list.
2475 (lto_obj_add_section): Fill in list.
2476 (ltoobj_build_section_table): Pass through list.
2477 * lto.c (file_data_list): Declare.
2478 (create_subid_section_table): Pass arguments directly.
2479 Fill in list of file_datas.
2480 (lwstate): Delete.
2481 (lto_create_files_from_ids): Pass in direct arguments.
2482 Don't maintain list.
2483 (lto_file_read): Use explicit section and file data lists.
2484 (lto_read_all_file_options): Pass in section_list.
2485 * lto.h (lto_obj_build_section_table): Add list.
2486 (lto_section_slot): Add next.
2487 (lto_section_list): Declare.
2488
da722561 24892011-10-02 Jan Hubicka <jh@suse.cz>
2490
2491 PR lto/47247
2492 * common.c (lto_resolution_str): Add new resolution.
2493 * common.h (lto_resolution_str): Likewise.
2494
15c58191 24952011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2496 Andi Kleen <ak@linux.intel.com>
2497
2498 PR lto/50568
2499 * lto.c (lto_splay_tree_delete_id): New.
2500 (lto_splay_tree_compare_ids): Likewise.
2501 (lto_splay_tree_lookup): Likewise.
2502 (lto_splay_tree_id_equal_p): Likewise.
2503 (lto_splay_tree_insert): Likewise.
2504 (lto_splay_tree_new): Likewise.
2505 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2506 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2507 (create_subid_section_table): Use lto_splay_tree_lookup and
2508 lto_splay_tree_insert.
2509 (lto_file_read): Use lto_splay_tree_new.
2510
21ebaa24 25112011-09-26 Andi Kleen <ak@linux.intel.com>
badc6cfa 2512
2513 * lto.c (lto_resolution_read): Remove id dumping.
2514 (lto_section_with_id): Turn id HOST_WIDE_ID.
2515 (create_subid_section_table): Dito.
2516
1dc92c59 25172011-08-28 Dodji Seketeli <dodji@redhat.com>
2518
2519 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2520 linemap_add twice.
2521
b6c200c3 25222011-08-11 Martin Jambor <mjambor@suse.cz>
2523
2524 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2525
2541503d 25262011-08-08 Diego Novillo <dnovillo@google.com>
2527
2528 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2529 * lto.c: Include tree-streamer.h.
2530
c38a75b7 25312011-07-06 Richard Guenther <rguenther@suse.de>
2532
2533 * lto-lang.c (lto_init):
2534 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2535
e71f2f1c 25362011-06-11 Jan Hubicka <jh@suse.cz>
2537
ac11d294 2538 PR lto/48246
e71f2f1c 2539 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2540 (lto_balanced_map): Likewise.
2541
c70f46b0 25422011-06-11 Jan Hubicka <jh@suse.cz>
2543
2544 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2545 (add_cgraph_node_to_partition) ... here; walk aliases.
2546 (lto_1_to_1_map): Remove same body alias code.
2547 (promote_fn): Likewise.
2548 (lto_promote_cross_file_statics): Update comment.
2549
2550
bbcef2a7 25512011-06-07 Diego Novillo <dnovillo@google.com>
2552
2553 * lto.c (uniquify_nodes): Move code to register decls to
2554 the loop that computes canonical types.
2555
1af0124d 25562011-06-07 Richard Guenther <rguenther@suse.de>
2557
2558 * lto-lang.c (lto_init): Do not set
2559 size_type_node or call set_sizetype.
2560
a0605d65 25612011-06-04 Diego Novillo <dnovillo@google.com>
2562
2563 * lto.c (lto_init): New.
2564 (lto_main): Call it.
2565
f05c9dfb 25662011-06-03 Diego Novillo <dnovillo@google.com>
2567
2568 * lto.c (get_resolution): Move from lto-streamer-in.c.
2569 (lto_register_var_decl_in_symtab): Likewise.
2570 (lto_register_function_decl_in_symtab): Likewise.
2571 (uniquify_nodes): Call lto_register_var_decl and
2572 lto_register_function_decl_in_symtab after reading a new
2573 VAR_DECL or FUNCTION_DECL.
2574
ed61b909 25752011-06-01 Richard Guenther <rguenther@suse.de>
2576
2577 * lto-lang.c (lto_register_canonical_types): New function.
2578 (lto_init): Register common nodes with the canonical type machinery.
2579 Do not play tricks with char_type_node.
2580
8f2b914f 25812011-05-26 Richard Guenther <rguenther@suse.de>
2582
2583 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2584
1e184c62 25852011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2586
2587 * lto.c (lto_ft_typed): New function.
2588 (lto_ft_common): Call it.
2589 (lto_ft_constructor): Likewise.
2590 (lto_ft_expr): Likewise.
2591 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2592 TREE_CHAIN.
2593
4d83607a 25942011-05-20 Richard Guenther <rguenther@suse.de>
2595
2596 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2597 (lto_ft_type): Move main-variant and pointer-to chain building ...
2598 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2599 in a separate final loop.
2600
bddb3763 26012011-05-19 Richard Guenther <rguenther@suse.de>
2602
2603 * lto.c (uniquify_nodes): First register all types before
2604 fixing up the tree SCC.
2605
c6641d23 26062011-05-11 Jan Hubicka <jh@suse.cz>
2607
2608 PR lto/48952
2609 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2610
8f2eb9e1 26112011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2612
2613 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2614 location of binfo field.
2615 (lto_fixup_prevailing_decls): Likewise.
2616
3a939d12 26172011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2618
2619 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2620 build_function_type_array or build_varargs_function_type_array
2621 instead.
2622
1d2bb655 26232011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2624
2625 * lto-lang.c (global_bindings_p): Return bool.
2626
91bf9d9a 26272011-05-07 Jan Hubicka <jh@suse.cz>
2628
56bef313 2629 * lto.c (lto_materialize_function): Use
2630 cgraph_function_with_gimple_body_p.
2631 (add_cgraph_node_to_partition): Do not re-add items to partition;
2632 handle thunks.
91bf9d9a 2633 (add_varpool_node_to_partition): Do not re-add items to partition.
2634
423ba805 26352011-05-03 Jan Hubicka <jh@suse.cz>
2636
2637 * lto.c (free_ltrans_partitions): Fix accidental commit.
2638
19ad01f7 26392011-05-03 Jan Hubicka <jh@suse.cz>
2640
2641 * lto.c (ltrans_partition_def): Remove GTY annotations.
2642 (ltrans_partitions): Move to heap.
2643 (new_partition): Update.
2644 (free_ltrans_partitions): New function.
2645 (lto_wpa_write_files): Use it.
2646
7771d558 26472011-04-29 Martin Jambor <mjambor@suse.cz>
2648
2649 * lto.c: Include ipa-utils.h.
2650 (lto_balanced_map): Update call to ipa_reverse_postorder.
2651 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2652
d534cab0 26532011-04-29 Michael Matz <matz@suse.de>
2654
2655 * lto.c (toplevel): Include tree-flow.h.
2656 (lto_read_in_decl_state): Don't merge types here.
2657 (tree_with_vars): New static hash table.
2658 (remember_with_vars): New static functions.
2659 (LTO_FIXUP_TYPE): New macro.
2660 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2661 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2662 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2663 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2664 (lto_read_decls): Uniquify while reading in trees.
2665 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2666 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2667 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2668 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2669 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2670 lto_fixup_tree): Remove.
2671 (lto_fixup_state): Remove data argument. Use
2672 lto_symtab_prevailing_decl.
2673 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2674 (lto_fixup_prevailing_decls): New function.
2675 (lto_fixup_state_aux): Argument aux is unused.
2676 (lto_fixup_decls): Don't allocate pointer sets, don't use
2677 lto_fixup_tree, use lto_fixup_prevailing_decls.
2678 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2679 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2680
b630a10e 26812011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2682
2683 * lto.c (lto_balanced_map): Fix typos in head comment.
2684 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2685 test.
2686
cbd7f5a0 26872011-04-16 Jan Hubicka <jh@suse.cz>
2688
2689 * lto.c (lto_balanced_map): Update.
2690
c7b2cc59 26912011-04-14 Jan Hubicka <jh@suse.cz>
2692
2693 * lto.c: Include ipa-inline.h
b630a10e 2694 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2695 accessor.
c7b2cc59 2696 (ipa_node_duplication_hook): Fix declaration.
2697 * Make-lang.in (lto.o): Update dependencies.
2698
9b88d08d 26992011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2700
2701 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2702 calling TREE_CHAIN.
2703 * lto.c (lto_fixup_common): Likewise.
2704
c33080b9 27052011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2706
2707 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2708 (handle_type_generic_attribute): Likewise.
2709
5cd33168 27102011-04-03 Michael Matz <matz@suse.de>
2711
2712 * lto.c (lto_materialize_function): Don't read and then discard
2713 sections in WPA mode.
2714 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2715
2716 * lto-lang.c (registered_builtin_fndecls): Remove.
2717 (lto_getdecls): Return NULL_TREE.
2718 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2719
d45127a1 27202011-03-31 Richard Guenther <rguenther@suse.de>
2721
2722 PR lto/48246
2723 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2724 partitions when checking is not enabled.
2725
82715bcd 27262011-03-25 Kai Tietz <ktietz@redhat.com>
2727
2728 * lto.c (lto_resolution_read): Use filename_cmp instead
2729 of strcmp.
2730 (lto_read_section_data): Likewise.
2731
451c8e2f 27322011-03-25 Jeff Law <law@redhat.com>
2733
2734 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2735
ac86af5d 27362011-03-21 Kai Tietz <ktietz@redhat.com>
2737
2738 PR target/12171
2739 * lto-lang.c (lto_attribute_table): Adjust table.
2740
5a8834a5 27412011-02-18 Jakub Jelinek <jakub@redhat.com>
2742
2743 PR bootstrap/47807
2744 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2745 of lto-streamer.h.
2746
30865946 27472011-02-18 Richard Guenther <rguenther@suse.de>
2748
2749 PR lto/47798
2750 * lto-tree.h (lto_global_var_decls): Do not declare here.
2751 * lto-lang.c: Include lto-streamer.h.
2752 * Make-lang.in (lto-lang.o): Adjust dependencies.
2753
fad71d4f 27542011-02-10 Kai Tietz <kai.tietz@onevision.com>
2755
2756 PR lto/47241
2757 * lto.c (lto_read_section_data): Free
2758 fd_name in failure case.
2759 For mingw targets don't hash file-descriptor.
2760 (read_cgraph_and_symbols): Close current_lto_file
2761 in failure case.
2762
232c9ac7 27632011-01-11 Jan Hubicka <jh@suse.cz>
2764
2765 PR lto/45721
2766 PR lto/45375
b630a10e 2767 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2768 are not partitioned.
232c9ac7 2769
a36cf284 27702010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2771
2772 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2773 Use prototype_p.
2774
6abc14d6 27752010-12-06 Richard Guenther <rguenther@suse.de>
2776
2777 PR lto/46796
2778 * lto-lang.c (lto_init): Give names to basic types.
2779
b96c136c 27802010-11-30 Joseph Myers <joseph@codesourcery.com>
2781
2782 * lto-object.c: Don't include toplev.h.
2783 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2784
92468061 27852010-11-30 Joseph Myers <joseph@codesourcery.com>
2786
2787 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2788 $(TOPLEV_H).
2789
967958e4 27902010-11-29 Joseph Myers <joseph@codesourcery.com>
2791
2792 * lto-endian.h: Delete.
2793 * lto-object.c: Don't include "libiberty.h".
2794 (O_BINARY): Don't define.
2795 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2796 (O_BINARY): Don't define.
2797
baa6eec4 27982010-11-23 Richard Guenther <rguenther@suse.de>
2799
2800 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2801
4f3aea0d 28022010-11-23 Richard Guenther <rguenther@suse.de>
2803
2804 PR lto/46605
2805 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2806
b8ba44e7 28072010-11-17 Joseph Myers <joseph@codesourcery.com>
2808
2809 * lto.c (lto_main): Take no arguments.
2810 * lto.h (lto_main): Update prototype.
2811
2e521e13 28122010-11-16 Ian Lance Taylor <iant@google.com>
2813
2814 * lto-object.c (lto_obj_file_open): Call
2815 simple_object_attributes_merge rather than
2816 simple_object_attributes_compare.
2817
3c6c0e40 28182010-11-12 Joseph Myers <joseph@codesourcery.com>
2819
2820 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2821 * lto-lang.c (lto_handle_option): Take location_t parameter.
2822
bf776685 28232010-11-10 Joseph Myers <joseph@codesourcery.com>
2824
2825 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2826 letters and remove trailing '.'.
2827 (lto_file_finalize): Start diagnostic with a lowercase letter.
2828
e09108e1 28292010-11-02 Ian Lance Taylor <iant@google.com>
2830
2831 * lto-object.c: New file.
2832 * lto-elf.c: Remove file.
2833 * lto-macho.c: Remove file.
2834 * lto-macho.h: Remove file.
2835 * lto-coff.c: Remove file.
2836 * lto-coff.h: Remove file.
2837 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2838 lto/lto-object.o.
2839 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2840 (lto/lto-objfile.o): New target.
2841 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2842 (lto/lto.o): Remove $(LIBIBERTY_H).
2843
4037a4c1 28442010-10-22 Jan Hubicka <jh@suse.cz>
2845
2846 * lto.c (add_cgraph_node_to_partition,
2847 add_varpool_node_to_partition): Add debug info.
2848 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2849 partitioned nodes.
2850 (do_whole_program_analysis): Set function flags before dumping.
2851
7a3ccc3b 28522010-10-22 Richard Guenther <rguenther@suse.de>
2853
2854 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2855 the new gimple_register_canonical_type.
2856
55e9d7d7 28572010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2858
2859 PR bootstrap/45954
2860 * config-lang.in (boot_language): Set to $enable_lto.
2861
d63880ad 28622010-10-18 Jakub Jelinek <jakub@redhat.com>
2863
2864 PR lto/45638
2865 * Make-lang.in (check-lto): New dummy target.
2866
8e8e1ee7 28672010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2868
2869 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2870
f3f006ad 28712010-10-08 Joseph Myers <joseph@codesourcery.com>
2872
2873 * lto-lang.c (lto_init_options): Change to
2874 lto_init_options_struct. Update parameters.
2875 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2876 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2877
1e52cb3c 28782010-10-06 Jan Hubicka <jh@suse.cz>
2879
2880 * lto.c (lto_balanced_map): Fix accounting of program size.
2881
11da9120 28822010-10-06 Jan Hubicka <jh@suse.cz>
2883
2884 * lto.c (lto_balanced_map): Do not produce empty partitions.
2885
21ebaa24 28862010-10-06 Andi Kleen <ak@linux.intel.com>
a3de1f55 2887
2888 * lto.c (lto_process_name): Add.
2889 (lto_main): Call lto_process_name.
2890
7ad28d2a 28912010-10-06 Jan Hubicka <jh@suse.cz>
2892
2893 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2894 COMDATs required by the linker.
2895
eaa13879 28962010-10-05 Ian Lance Taylor <iant@google.com>
2897
2898 * lto.c (lto_section_with_id): Make s a const pointer.
2899
48e3ea52 29002010-10-05 Jan Hubicka <jh@suse.cz>
2901
2902 * lto.c: Include params.h.
2903 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2904 refcounting in aux field.
2905 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2906 New functions.
2907 (lto_1_to_1_map): Simplify.
2908 (lto_balanced_map): New function.
2909 (do_whole_program_analysis): Chose proper partitioning alg.
2910 * Make-lang.in (lto.o): Add dependency on params.h
2911
21ebaa24 29122010-10-04 Andi Kleen <ak@linux.intel.com>
70293f47 2913
2914 * Make-lang.in (lto1): Add + to build rule.
2915
21ebaa24 29162010-10-03 Andi Kleen <ak@linux.intel.com>
fd30d60a 2917
2918 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
c9e63184 2919 with fatal_error.
fd30d60a 2920
4a68fd3c 29212010-09-28 Jan Hubicka <jh@suse.cz>
2922
2923 * lto-lang.c (handle_leaf_attribute): New function.
2924 (lto_attribute_tables): Add leaf.
2925
2edfba82 29262010-09-25 Jie Zhang <jie@codesourcery.com>
2927
2928 * lto.c (lto_read_all_file_options): Start a new line after
2929 printing out file names.
2930
9ced88d0 29312010-09-24 Jan Hubicka <jh@suse.cz>
2932
2933 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2934
7ae8b539 29352010-09-20 Jan Hubicka <jh@suse.cz>
2936
2937 PR tree-optimize/45605
2938 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2939
be1a554f 29402010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2941
2942 * lto-elf.c (lto_obj_file_open): Also provide filename when
2943 elf_begin fails.
2944
7de998de 29452010-09-17 Jan Hubicka <jh@suse.cz>
2946
2947 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2948
78d063c8 29492010-09-17 Richard Guenther <rguenther@suse.de>
2950
2951 * lang.opt (flag_wpa): Also enable for the driver.
2952
cdc58a66 29532010-09-16 Jan Hubicka <jh@suse.cz>
2954
2955 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2956 EXTERNAL flags.
2957
7b80d28f 29582010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2959
2960 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2961
3210ebe5 29622010-09-08 Jan Hubicka <jh@suse.cz>
2963
2964 * lto.c (real_file_count, real_file_decl_data): New static vars.
2965 (read_cgraph_and_symbols): Use it.
2966
7a52b640 29672010-09-08 Richard Guenther <rguenther@suse.de>
2968
2969 * lto.c (read_cgraph_and_symbols): Collect again after each
2970 file.
2971
be147e7f 29722010-09-07 Jan Hubicka <jh@suse.cz>
2973
2974 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2975
56c34a25 29762010-09-03 Richard Guenther <rguenther@suse.de>
2977
2978 * lto-elf.c (validate_file): Always error if validation fails.
2979
c5cc4842 29802010-08-20 Jan Hubicka <jh@suse.cz>
2981
2982 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2983 (lto_wpa_write_files): Update comments.
2984
9543655f 29852010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2986
2987 PR bootstrap/45357
2988 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2989 with has_analyzed_clone_p.
2990
97b862d3 29912010-08-20 Jan Hubicka <jh@suse.cz>
2992
2993 * lto.c (has_analyzed_clone_p): New function
2994 (lto_materialize_function): Use callgraph to determine if
2995 body is needed.
2996 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2997
48148244 29982010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2999
3000 * lto.c: Use FOR_EACH_VEC_ELT.
3001
21ebaa24 30022010-07-27 Andi Kleen <ak@linux.intel.com>
eb219e9c 3003
3004 * Make-lang.in (lto.o): Add dependency to splay-tree.h
3005
b78351e5 30062010-07-27 Joseph Myers <joseph@codesourcery.com>
3007
3008 * lto-lang.c (lto_handle_option): Update prototype and return
3009 value type. Remove duplicate assignment to result.
3010
e88d34f6 30112010-07-27 Joseph Myers <joseph@codesourcery.com>
3012
3013 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
3014 New.
3015 (lto_init_options): Update prototype.
3016 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
3017 Define.
3018
21ebaa24 30192010-07-10 Andi Kleen <ak@linux.intel.com>
f18bad33 3020
3021 PR lto/44992
c9e63184 3022 * lto.c: Include splay-tree.h
f18bad33 3023 (lto_resolution_read): Change to walk file_ids tree and parse
3024 extra file_id in resolution file.
3025 (lto_section_with_id): Add.
3026 (create_subid_section_table): Add.
3027 (lwstate): Add.
3028 (lto_create_files_from_ids): Add.
3029 (lto_file_read): Change to handle sub file ids and create list
3030 of file_datas. Add output argument for count.
3031 (get_section_data): Pass file_data to lto_get_section_name.
3032 (lto_flatten_file): Add.
3033 (read_cgraph_and_symbols): Handle linked lists of file_datas.
3034
21ebaa24 30352010-07-10 Andi Kleen <ak@linux.intel.com>
58d9117a 3036
3037 * lto-coff.c (hash_name, eq_name): Move.
3038 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3039 * lto-elf.c: (hash_name, eq_name): Move.
3040 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3041 * lto-macho.c: (hash_name, eq_name): Move.
3042 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
3043 * lto.c: (hash_name, eq_name): Move from lto-*.c
3044 (lto_obj_create_section_hash_table): Add.
3045 (free_with_string): Add.
3046
0b205f4c 30472010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
3048
3049 * lto-coff.c: Include diagnostic-core.h in every file that
3050 includes toplev.h.
3051 * lto-elf.c: Likewise.
3052 * lto-lang.c: Likewise.
3053 * lto-macho.c: Likewise.
3054
9dccd5de 30552010-07-07 Jakub Jelinek <jakub@redhat.com>
3056
3057 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
3058 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
3059 objects.
3060
7550e1d1 30612010-07-05 Jan Hubicka <jh@suse.cz>
3062
3063 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
3064 nodes from same comdat group as well as all comdat functions referenced
3065 here.
b630a10e 3066 (add_varpool_node_to_partition, add_references_to_partition): New
3067 function.
3068 (lto_1_1_map): Skip COMDAT fnctions/variables; use
3069 add_varpool_node_to_partition; clear aux flags when done.
3070 (lto_promote_cross_file_statics): Do not promote stuff that gets
3071 duplicated to each ltrans.
7550e1d1 3072
01ec0a6c 30732010-07-04 Jan Hubicka <jh@suse.cz>
3074
c9e63184 3075 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
01ec0a6c 3076
09eb10ed 30772010-06-13 Richard Guenther <rguenther@suse.de>
3078
3079 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
3080
6c8c5385 30812010-06-09 Kai Tietz <kai.tietz@onevision.com>
3082
3083 * lto.c (lto_resolution_read): Pre-initialize local variable r.
3084 * lto-coff.c (coff_write_object_file): Add braces to if.
3085
ba72912a 30862010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3087
3088 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
3089 (lto_file_read): Likewise.
3090 (new_partition): Likewise.
3091 (read_cgraph_and_symbols): Likewise.
3092
4aafe913 30932010-06-07 Joseph Myers <joseph@codesourcery.com>
3094
3095 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
3096 (lto_handle_option): Don't set flag_signed_char here.
3097
fab8a209 30982010-06-04 Richard Guenther <rguenther@suse.de>
3099
3100 PR lto/41584
3101 * lto.c (lto_1_to_1_map): Use the proper file_data for
3102 varpool nodes.
3103
ecb08119 31042010-05-30 Jan Hubicka <jh@suse.cz>
3105
3106 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
3107 partitioning decisions.
3108
68b8d829 31092010-05-29 Jan Hubicka <jh@suse.cz>
3110
3111 * lto.c (bitmap vector): Remove.
3112 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
3113 (ltrans_partition_def): New structure.
3114 (ltrans_partition): New type and VECtor.
3115 (new_partition): New function.
3116 (add_cgraph_node_to_partition): New function.
3117 (lto_1_to_1_map): Reorganize for partitions.
3118 (lto_add_inline_clones): Remove.
3119 (lto_add_all_inlinees): Remove.
3120 (lto_promote_cross_file_statics): Use partitions.
3121 (cmp_partitions): New function.
3122 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
3123 use partitions; output files sorted by size.
3124
ea269688 31252010-05-29 Steven Bosscher <steven@gcc.gnu.org>
3126
3127 * Make-lang.in: Replace vec.h dependency with VEC_H.
3128
8fb69344 31292010-05-28 Joseph Myers <joseph@codesourcery.com>
3130
3131 * lto-coff.c (coff_errmsg): Remove.
3132 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
3133 errors instead of coff_errmsg (-1).
3134 * lto-macho.c (mach_o_errmsg): Remove.
3135 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
3136 instead of mach_o_errmsg (-1).
3137 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
3138 xstrerror (errno).
3139
2024fa7d 31402010-05-28 Richard Guenther <rguenther@suse.de>
3141
3142 * lto.c (prefix_name_with_star): Removed.
3143 (strip_extension): Likewise.
3144 (get_filename_for_set): Likewise.
3145 (lto_write_ltrans_list): Fold into ...
3146 (lto_wpa_write_files): ... this. Name LTRANS units
3147 by suffixing the ltrans output list filename.
3148 (do_whole_program_analysis): Adjust.
3149
852f689e 31502010-05-27 Joseph Myers <joseph@codesourcery.com>
3151
3152 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
3153 (read_cgraph_and_symbols, lto_main): Use seen_error.
3154 * Make-lang.in (lto/lto.o): Update dependencies.
3155
3c9e9cba 31562010-05-27 Eric Botcazou <ebotcazou@adacore.com>
3157
3158 PR lto/44230
3159 * lto.h (lto_eh_personality): New prototype.
3160 * lto.c: Include debug.h.
3161 (first_personality_decl): New static variable.
3162 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
3163 first function for which it is non-null.
3164 (lto_eh_personality_decl): New static variable.
3165 (lto_eh_personality): New function.
3166 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
3167 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
3168
cdd0ea37 31692010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3170
3171 * lto-lang.c: Do not include expr.h.
3172
71eb351d 31732010-05-24 Richard Guenther <rguenther@suse.de>
3174
3175 * lto-elf.c (lto_obj_build_section_table): Work around
3176 FreeBSD libelf issue.
3177
ca3e35a1 31782010-05-22 Richard Guenther <rguenther@suse.de>
3179
3180 * lto.c (read_cgraph_and_symbols): Do not collect.
3181
e5507c85 31822010-05-20 Jan Hubicka <jh@suse.cz>
3183
3184 * lto.c (promote_var, promote_fn): New functions.
3185 (lto_promote_cross_file_statics): Compute correctly boundary including
3186 static initializers of readonly vars.
3187
a510bd8d 31882010-05-18 Jan Hubicka <jh@suse.cz>
3189
e5507c85 3190 * lto.c (lto_1_to_1_map): Partition non-inline clones.
a510bd8d 3191 (lto_promote_cross_file_statics): Deal with non-inline clones.
3192
1375c6f8 31932010-05-18 Jan Hubicka <jh@suse.cz>
3194
3195 * lto.c (lto_materialize_function): Announce function when
3196 reading body; allocate_struct_function only when reading body;
3197 do not finalize local statics; ggc_collect after reading;
3198 do not mark reachable node.
3199 (materialize_cgraph): Do not announce function.
3200
757a3237 32012010-05-11 Jan Hubicka <jh@suse.cz>
3202
3203 * lto.c (materialize_cgraph): Revert my previous patch.
3204
942dc465 32052010-05-11 Kai Tietz <kai.tietz@onevision.com>
3206
3207 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
3208 IMAGE_FILE_MACHINE_AMD64.
3209 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
3210
b4c8770a 32112010-05-11 Jan Hubicka <jh@suse.cz>
3212
3213 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
3214 (materialize_cgraph): Add it here.
3215
25429dc2 32162010-05-11 Jan Hubicka <jh@suse.cz>
3217
3218 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
3219 vector.
3220
32212010-05-11 Jan Hubicka <jh@suse.cz>
3222
3223 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
3224 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
3225 use reachable_from_other_partition_p and
3226 referenced_from_other_partition_p test.
3227
6dd40464 32282010-05-11 Kai Tietz <kai.tietz@onevision.com>
3229
3230 * lto-coff.c (validate_file): Add x64-coff support.
3231 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
3232 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
3233 * lto-lang.c (lto_build_c_type_nodes): Add check for
3234 'long long unsigned int' for x64-windows.
3235 (lto_init): Likewise.
3236
3237
23433d72 32382010-05-07 Steven Bosscher <steven@gcc.gnu.org>
3239
3240 * lto.h (struct lto_file_struct): Document offset member.
3241 * lto-endian.h: New file.
3242 * lto-macho.h: New file.
3243 * lto-macho.c: New file.
3244 * Make-lang.in: Add rule for lto-macho.o.
3245
92a44a68 32462010-05-07 Richard Guenther <rguenther@suse.de>
eb4ef3d1 3247
3248 PR lto/43857
3249 PR lto/43371
3250 * lang.opt (fresolution): Change to ...
3251 (fresolution=): ... this.
3252 * lto-lang.c (lto_handle_option): Adjust.
3253
264cbb51 32542010-05-07 Richard Guenther <rguenther@suse.de>
3255
3256 * lto.c (DUMPBASE_SUFFIX): Remove.
3257 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
3258 Rename to ...
3259 (lto_write_ltrans_list): ... only output the list of ltrans files.
3260 (lto_maybe_unlink): Remove.
3261 (do_whole_program_analysis): Do not execute LTRANS phase
3262 from here.
3263
11dc3713 32642010-05-06 H.J. Lu <hongjiu.lu@intel.com>
3265
3266 * lto-lang.c (lto_handle_option): Add argument kind.
3267
8d810329 32682010-05-05 Jan Hubicka <jh@suse.cz>
3269
264cbb51 3270 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
3271 refs.
8d810329 3272
a238367f 32732010-05-05 Jan Hubicka <jh@suse.cz>
3274
3275 * lto.c (lto_1_to_1_map): Partition only needed nodes.
3276
bf7d782b 32772010-04-30 Jan Hubicka <jh@suse.cz>
3278
b630a10e 3279 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
3280 use default name.
bf7d782b 3281 (lto_wpa_write_files): Write any non-empty partition.
3282
da67d826 32832010-04-30 Jan Hubicka <jh@suse.cz>
3284
3285 * lto.c: Do not attempt to make constant pool references global.
3286
57305941 32872010-04-28 Jan Hubicka <jh@suse.cz>
3288
3289 * lto/lto.c (lto_read_in_decl_state): Use GGC.
3290 (lto_wpa_write_files): Announce what we are writting.
3291 (all_file_decl_data): New.
3292 (read_cgraph_and_symbols): Use GGC; correct timevars.
3293 (do_whole_program_analysis): Collect.
3294 * lto/Make-lang.in (lto.o): Fix dependency.
3295 * Makefile.in (GTFILES): Add lto-streamer.h.
3296 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
3297 (varpool_assemble_pending_decls): Use VAROUT.
3298 * lto-streamer.h (lto_tree_ref_table): Annotate.
3299 (lto_in_decl_state): Annotate.
3300 (lto_file_decl_data): Annotate.
3301
0cddb138 33022010-04-28 Jan Hubicka <jh@suse.cz>
3303
3304 * lto.c (lto_varpool_node_sets): New.
3305 (lto_1_to_1_map): Partition varpool too.
3306 (globalize_context_t, globalize_cross_file_statics,
3307 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
3308 lto_scan_statics_in_remaining_global_vars): Remove.
3309 (lto_promote_cross_file_statics): Rewrite.
3310 (get_filename_for_set): Take vset argument.
3311 (lto_wpa_write_files): Pass around vsets.
3312
4d992eb6 33132010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
3314
3315 PR lto/42776
3316 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
3317 hardcoding 'lto-elf.o'.
3318 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
3319
3320 * lto-coff.h: New file.
3321 * lto-coff.c: Likewise.
3322
9c491711 33232010-04-26 Richard Guenther <rguenther@suse.de>
3324
3325 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
3326
3ba0ce47 33272010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
3328
3329 * lto.h (lto_elf_file_open): Rename prototype from this ...
3330 (lto_obj_file_open): ... to this.
3331 (lto_elf_file_close): Likewise ...
3332 (lto_obj_file_close): ... and likewise.
3333 (lto_elf_build_section_table): Likewise ...
3334 (lto_obj_build_section_table): ... and likewise.
3335 (lto_elf_begin_section): Likewise ...
3336 (lto_obj_begin_section): ... and likewise.
3337 (lto_elf_append_data): Likewise ...
3338 (lto_obj_append_data): ... and likewise.
3339 (lto_elf_end_section): Likewise ...
3340 (lto_obj_end_section): ... and likewise.
3341 * lto.c (lto_file_read): Update references to the above.
3342 (lto_wpa_write_files): Likewise.
3343 (lto_read_all_file_options): Likewise.
3344 (read_cgraph_and_symbols): Likewise.
3345 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
3346 (LANG_HOOKS_APPEND_DATA): Likewise.
3347 (LANG_HOOKS_END_SECTION): Likewise.
3348 * lto-elf.c (lto_elf_file_open): Rename from this ...
3349 (lto_obj_file_open): ... to this, updating any references.
3350 (lto_elf_file_close): Likewise ...
3351 (lto_obj_file_close): ... and likewise.
3352 (lto_elf_build_section_table): Likewise ...
3353 (lto_obj_build_section_table): ... and likewise.
3354 (lto_elf_begin_section): Likewise ...
3355 (lto_obj_begin_section): ... and likewise.
3356 (lto_elf_append_data): Likewise ...
3357 (lto_obj_append_data): ... and likewise.
3358 (lto_elf_end_section): Likewise ...
3359 (lto_obj_end_section): ... and likewise.
3360
5a2aecd6 33612010-04-21 Jan Hubicka <jh@suse.cz>
3362
3363 * lto.c (lto_fixup_tree): Do not call wpa fixup.
3364 (materialize_cgraph): Likewise.
3365
ddc90d88 33662010-04-21 Jan Hubicka <jh@suse.cz>
3367
3368 * lto.c (lto_wpa_write_files): Update.
3369 (read_cgraph_and_symbols): Be more verbose.
3370 (materialize_cgraph): Likewise.
3371 (do_whole_program_analysis): Likewise.
3372
e288c7a9 33732010-04-21 Jan Hubicka <jh@suse.cz>
3374
3375 * lto.c (globalize_cross_file_statics): When function has address taken,
3376 it needs to be public.
3377
08843223 33782010-04-20 Jan Hubicka <jh@suse.cz>
3379
3380 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
3381 (lto_add_all_inlinees): Likewise.
3382 (lto_wpa_write_files): Likewise.
3383
ad086ed4 33842010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3385
3386 * lto-lang.c (lto_init): Remove second argument in call to
3387 build_common_tree_nodes.
3388
d6845139 33892010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3390
3391 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
3392 function.
3393
a5813485 33942010-03-09 Eric Botcazou <ebotcazou@adacore.com>
3395
3396 PR bootstrap/43276
3397 * lto-elf.c: Define EM_* constants if not already defined.
3398
a219f6a5 33992010-03-03 Eric Botcazou <ebotcazou@adacore.com>
3400
3401 * lto-elf.c (is_compatible_architecture): New static function.
3402 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
3403
2bd888dc 34042010-02-11 Richard Guenther <rguenther@suse.de>
3405
3406 PR driver/43021
3407 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
3408 appropriately.
3409
27721832 34102010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
3411
3412 * lto.c (O_BINARY): Define.
3413 (lto_read_section_data): Open file in binary mode.
3414 * lto-elf.c (O_BINARY): Define.
3415 (lto_elf_file_open): Open file in binary mode.
3416
3bfd70ae 34172010-01-08 Richard Guenther <rguenther@suse.de>
3418
3419 PR lto/42528
3420 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
3421 (lto_init): Do not init char_type_node in a standard way
3422 but according to flag_signed_char.
3423
50ca7c37 34242010-01-03 H.J. Lu <hongjiu.lu@intel.com>
3425
3426 PR lto/41564
3427 * lto.c (DUMPBASE_SUFFIX): New.
3428 (lto_execute_ltrans): Append a sequence number to -dumpbase
3429 for LTRANS.
3430
d5e86d20 34312010-01-02 H.J. Lu <hongjiu.lu@intel.com>
3432
3433 PR lto/42580
3434 * lto-elf.c (lto_elf_file_open): Stop if the command line
3435 option file is missing.
3436
08a7e80f 34372009-12-15 Richard Guenther <rguenther@suse.de>
3438
3439 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3440 (lto_post_options): Do not disable debuginfo.
3441
4af4d09c 34422009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3443
3444 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3445
50b2dbd9 34462009-12-11 Richard Guenther <rguenther@suse.de>
3447
3448 PR lto/42037
3449 * lto.c (lto_resolution_read): Properly grow the vector.
3450
97e90c2e 34512009-12-11 Richard Guenther <rguenther@suse.de>
3452
3453 PR lto/41915
3454 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3455 to the C99 default. Do not set flag_unit_at_a_time.
3456
f018d957 34572009-11-28 Jakub Jelinek <jakub@redhat.com>
3458
3459 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3460 variable.
3461
81897669 34622009-11-19 Rafael Avila de Espindola <espindola@google.com>
3463
3464 PR bootstrap/42096
3465 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3466 * lto.c (lto_parse_hex): New.
3467 (lto_resolution_read): Use lto_parse_hex.
3468 * lto.h (lto_parse_hex): New.
3469
b7fedf62 34702009-11-17 Rafael Avila de Espindola <espindola@google.com>
3471
3472 * lto-elf.c (lto_file_init): Add offset argument.
3473 (lto_elf_file_open): Record the offset.
3474 * lto.c (lto_resolution_read): Change file_name into a lto_file
3475 argument. Check offsets.
3476 (lto_file_read): Update call to lto_resolution_read.
3477 * lto.h (lto_file_struct): Add the offset field.
3478
6575099f 34792009-11-16 Rafael Avila de Espindola <espindola@google.com>
3480
3481 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3482
6d1cc52c 34832009-11-14 Jan Hubicka <jh@suse.cz>
3484
3485 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3486
d405c5a4 34872009-11-12 Rafael Avila de Espindola <espindola@google.com>
3488
3489 * lang.opt (fresolution): Renamed from resolution.
3490 * lto-lang.c (lto_handle_option): Handle new option name.
3491 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3492
06b9e52b 34932009-11-04 Richard Guenther <rguenther@suse.de>
c9e63184 3494 Rafael Avila de Espindola <espindola@google.com>
06b9e52b 3495
3496 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3497 (lto_elf_file_open): Handle offsets in arguments name@offest.
3498
f5a023c5 34992009-10-30 Richard Guenther <rguenther@suse.de>
3500
3501 PR lto/41858
3502 * lto.c (lto_file_read): Do not set file_data->fd.
3503 (lto_read_section_data): Use a single-entry file-descriptor cache.
3504 Do not check the result of xmalloc.
3505 (free_section_data): Do not use file_data->fd.
3506 (lto_read_all_file_options): Likewise.
3507
21ce3cc7 35082009-10-22 Richard Guenther <rguenther@suse.de>
3509
3510 * lto.c (lto_fixup_jump_functions): Remove.
3511 (lto_fixup_decls): Do not fixup jump functions.
3512 (read_cgraph_and_symbols): Schedule cgraph merging after
3513 summary reading. Schedule type and decl fixup before
3514 summary reading.
3515
5575303a 35162009-10-22 Richard Guenther <rguenther@suse.de>
3517
3518 * lto.c (lto_fixup_data_t): Remove free_list member.
3519 (lto_fixup_tree): Do not insert into free_list.
3520 (free_decl): Remove.
3521 (lto_fixup_decls): Remove free-list handling.
3522
8867b500 35232009-10-22 Jan Hubicka <jh@suse.cz>
3524
3525 * lto.c (lto_fixup_jump_functions): New function.
3526 (lto_fixup_decls): Use it.
3527
b787522e 35282009-10-16 Richard Guenther <rguenther@suse.de>
3529
3530 PR lto/41715
3531 * lto.c (lto_fixup_tree): Revert last change.
3532
bc0ed27c 35332009-10-14 Richard Guenther <rguenther@suse.de>
3534
3535 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3536 compatible with the one we replace wrap it around a
3537 VIEW_CONVERT_EXPR.
3538
c515f146 35392009-10-09 Richard Guenther <rguenther@suse.de>
3540
3541 PR lto/41635
3542 PR lto/41636
3543 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3544 a file.
3545 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3546 (init_ehdr##BITS): Likewise.
3547
48cf7037 35482009-10-08 Joseph Myers <joseph@codesourcery.com>
3549
3550 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3551 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3552 diagnostics.
3553 * lto-lang.c (lto_post_options): Remove trailing "." from
3554 diagnostics.
3555
7366cbe7 35562009-10-08 Richard Guenther <rguenther@suse.de>
3557
3558 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3559 hash tables.
3560
7c3f71c3 35612009-10-07 Joseph Myers <joseph@codesourcery.com>
3562
3563 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3564
59dd4830 35652009-10-07 Jan Hubicka <jh@suse.cz>
3566
3567 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3568 ltrans stage; explain why this is needed and should not.
3569
fd193bcd 35702009-10-05 Richard Guenther <rguenther@suse.de>
3571
3572 PR lto/41552
3573 PR lto/41487
3574 * lto.c (lto_read_decls): Do not register deferred decls.
3575 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3576 until after reading the IPA summaries.
3577
7bfefa9d 35782009-10-02 Rafael Avila de Espindola <espindola@google.com>
3579
3580 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3581 (lto-lang.c): Don't include lto/common.h.
3582
35832009-10-02 Rafael Avila de Espindola <espindola@google.com>
3584
3585 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3586 (lto/common.o): Remove.
3587 * common.c: Remove.
3588 * common.h (lto_kind_str): Remove.
3589 (lto_visibility_str): Remove.
3590 (lto_resolution_str): Make it static.
3591
35922009-10-01 Diego Novillo <dnovillo@google.com>
3593
3594 * lto.c (lto_read_decls): Add comment.
3595 Call internal_error instead of gcc_assert.
3596 (lto_resolution_read): Likewise.
3597 (lto_add_all_inlinees): Tidy.
3598 * Make-lang.in: Fix copyright boilerplate.
3599 (lto.pdf): New.
3600 (lto.install-pdf): New.
3601 * lto-tree.h: Fix copyright boilerplate.
3602 * lang-specs.h: Likewise.
3603 Remove ".lto" entry from compilers fragment.
3604 * lto-elf.c: Move inclusion of gelf.h after config.h.
3605 Tidy formatting everywhere.
3606 * lto.h: Fix copyright boilerplate.
3607 Tidy formatting everywhere.
3608 * common.c: Likewise.
3609 * config-lang.in: Likewise.
3610 * common.h: Likewise.
3611 * lto-lang.c: Likewise.
3612
36132009-10-01 Richard Guenther <rguenther@suse.de>
3614
3615 * lto.c (lto_read_section_data): Use plain lseek/read.
3616
36172009-10-01 Richard Guenther <rguenther@suse.de>
3618
3619 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3620 use sysconf to query the system page size.
3621 (lto_file_read): Implement fallback using stdio.
3622 (free_section_data): Likewise.
3623
36242009-09-29 Diego Novillo <dnovillo@google.com>
3625
3626 * lto-lang.c (lto_init): Really fix call to
3627 build_common_builtin_nodes.
3628
36292009-09-29 Diego Novillo <dnovillo@google.com>
3630
3631 * lto-lang.c (lto_init): Fix call to
3632 build_common_builtin_nodes.
3633
36342009-09-29 Richard Guenther <rguenther@suse.de>
3635
3636 PR lto/40754
3637 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3638 in bytes.
3639 (first_data_block): New static variable.
3640 (lto_elf_append_data): Align the first data block in each
3641 section.
3642
36432009-09-28 Diego Novillo <dnovillo@google.com>
3644
3645 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3646 * lto.c (strip_extension): New.
3647 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3648 (lto_execute_ltrans): Tidy.
3649 Do not pass -fwpa nor -fltrans-* to LTRANS.
3650 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3651 * tree.c (need_assembler_name_p): Call
3652 lang_hooks.decls.may_need_assembler_name_p if set.
3653 * varasm.c (default_binds_local_p_1): Remove check for
3654 flag_ltrans.
3655 * varpool.c (decide_is_variable_needed): Do not test for
3656 in_lto_p.
3657
36582009-09-22 Richard Guenther <rguenther@suse.de>
3659
3660 PR lto/39276
3661 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3662 * Make-lang.in: Remove ltrans-driver stuff.
3663 * config-lang.in: Likewise.
3664 * lang.opt (fltrans-driver): Remove.
3665 * lto-lang.c (lto_init_options): Remove code initializing
3666 ltrans_driver.
3667 * ltrans-driver: Remove.
3668
36692009-09-21 Diego Novillo <dnovillo@google.com>
3670
3671 * lto-lang.c (lto_define_builtins): Remove superfluous
3672 calls to targetm.init_builtins and build_common_builtin_nodes.
3673 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3674 build_common_builtin_nodes.
3675 * lto.c (lto_materialize_function): Do nothing if NODE is a
3676 clone.
3677
36782009-09-03 Diego Novillo <dnovillo@google.com>
3679
3680 * lto-elf.c (validate_file): Replace call to
3681 elf_getshstrndx with call to elf_getshdrstrndx.
3682
36832009-08-19 Richard Guenther <rguenther@suse.de>
3684
3685 * lto-lang.c (lto_init): Merge char_type_node with the
3686 appropriately signed variant.
3687
36882009-08-19 Richard Guenther <rguenther@suse.de>
3689
3690 PR lto/41071
3691 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3692 (lto_fixup_type): Re-build the pointer-to chain part two.
3693
36942009-08-19 Richard Guenther <rguenther@suse.de>
3695
3696 PR lto/41071
3697 * lto.c (lto_fixup_type): Re-build the type variant chain.
3698
36992009-08-19 Richard Guenther <rguenther@suse.de>
3700
3701 PR lto/41071
3702 * lto.c (lto_fixup_constructor): New function.
3703 (lto_fixup_tree): Replace all types. Properly fixup
3704 constructors and constants.
3705
37062009-08-14 Richard Guenther <rguenther@suse.de>
3707
3708 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3709 for DECL_LANG_SPECIFIC.
3710
37112009-08-13 Richard Guenther <rguenther@suse.de>
3712
3713 PR lto/41032
3714 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3715
37162009-07-30 Richard Guenther <rguenther@suse.de>
3717
3718 PR lto/40903
3719 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3720 the largest decl for output and free TREE_CHAIN for further
3721 use.
3722
37232009-07-24 Diego Novillo <dnovillo@google.com>
3724
3725 * Make-lang.in: Add empty lto.install-plugin target.
3726
37272009-07-13 Diego Novillo <dnovillo@google.com>
3728
3729 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3730
37312009-07-11 Richard Guenther <rguenther@suse.de>
3732
3733 * lto-lang.c (lto_write_globals): Wrapup global decls.
3734
37352009-07-10 Richard Guenther <rguenther@suse.de>
3736
3737 * lto-lang.c (lto_init): Allocate one more location to make
3738 BUILTINS_LOCATION correct.
3739
37402009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3741
3742 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3743
37442009-07-06 Diego Novillo <dnovillo@google.com>
3745
3746 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3747 TYPE_SIZE_UNIT.
3748
37492009-07-06 Diego Novillo <dnovillo@google.com>
3750
3751 * lto.c (preload_common_nodes): Remove.
3752 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3753 (lto_read_decls): Call lto_data_in_create and
3754 lto_data_in_delete.
3755 (free_decl): Do not call ggc_free.
3756 (lto_main): Call lto_init_reader.
3757 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3758 (lto_init): Initialize main_identifier_node if needed.
3759 Make ptrdiff_type_node be integer_type_node.
3760
37612009-06-19 Diego Novillo <dnovillo@google.com>
3762
3763 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3764 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3765 Remove code guarded by #ifdef LOCAL_TRACE.
3766
37672009-06-18 Diego Novillo <dnovillo@google.com>
3768
3769 * lto.c: Update license to GPLv3.
3770 * lto-elf.c: Likewise.
3771 * common.c: Likewise.
3772 * lto-lang.c: Likewise.
3773 * lto.h: Remove superfluous include files. Update all
3774 users.
3775
37762009-06-17 Diego Novillo <dnovillo@google.com>
3777
3778 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3779
37802009-06-02 Diego Novillo <dnovillo@google.com>
3781
3782 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3783 read in.
3784 (materialize_cgraph): Only materialize nodes that have a
3785 representation on file.
3786
37872009-06-01 Diego Novillo <dnovillo@google.com>
3788
3789 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3790
37912009-05-31 Diego Novillo <dnovillo@google.com>
3792
3793 * lto-lang.c (lto_type_for_mode): Handle all the modes
3794 handled in c_common_type_for_mode.
3795
37962009-05-21 Diego Novillo <dnovillo@google.com>
3797
3798 * lto-elf.c: Always include <gelf.h>.
3799 * config-lang.in (target_libs): Remove.
3800 (build_by_default): Set to no.
3801
38022009-05-15 Diego Novillo <dnovillo@google.com>
3803
3804 * lto.c (lto_materialize_function): Assert that DECL is
3805 not a builtin.
3806 (materialize_cgraph): Don't try to materialize builtin
3807 functions.
3808 * lto-section-out.c (write_symbol_vec): Do not write
3809 builtin functions.
3810
38112009-05-13 Diego Novillo <dnovillo@google.com>
3812
3813 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3814
38152009-05-07 Diego Novillo <dnovillo@google.com>
3816
3817 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3818 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3819 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3820 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3821 (lto_fixup_tree): Call gimple_register_type when *TP is a
3822 type.
3823 (lto_main): Call bitmap_obstack_initialize.
3824
38252009-04-22 Diego Novillo <dnovillo@google.com>
3826
3827 * lto.c (free_section_data): Tidy.
3828 (lto_1_to_1_map): Tidy.
3829 (lto_add_all_inlinees): Tidy.
3830 (prefix_name_with_star): New.
3831 (get_filename_for_set): New.
3832 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3833 to determine what cgraph node sets to write.
3834 Call get_filename_for_set to compute temporary file
3835 names.
3836 (lto_execute_ltrans): Do not execute LTRANS on files with
3837 names that start with '*'.
3838 Move logic to execute LTRANS together so that LTRANS is
3839 invoked only if there are any files to compile.
3840 (do_whole_program_analysis): Only remove output files
3841 that do not start with '*'.
3842
38432009-04-06 Diego Novillo <dnovillo@google.com>
3844
3845 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3846 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3847 (lto_add_all_inlinees): Tidy.
3848
38492009-03-26 Diego Novillo <dnovillo@google.com>
3850
3851 * lto.c: Include gimple.h.
3852 (lto_read_in_decl_state): Call gimple_register_type for
3853 every type in every stream.
3854 (lto_fixup_common): Call gimple_register_type if T has a
3855 type.
3856 (do_whole_program_analysis): Call print_lto_report.
3857 (lto_main): Call print_lto_report after cgraph_optimize.
3858 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3859
38602009-03-24 Diego Novillo <dnovillo@google.com>
3861
3862 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3863 (lto.o): Add dependency on GIMPLE_H.
3864
38652009-03-10 Simon Baldwin <simonb@google.com>
3866
3867 * lto.c (lto_read_all_file_options): Close any open file descriptor
3868 contained in file_data before freeing.
3869
38702009-02-24 Rafael Avila de Espindola <espindola@google.com>
3871
3872 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3873 for a decl in the original bitmap, not a node.
3874 (lto_add_all_inlinees): Remove original nodes that are not needed.
3875 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3876
38772009-02-24 Diego Novillo <dnovillo@google.com>
3878
3879 * lto.c (lto_materialize_function): Update
3880 lto_stats.num_function_bodies.
3881 (get_section_data): Initialize *LEN to 0.
3882 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3883 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3884 Update lto_stats.num_output_files.
3885 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3886 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3887 (lto_main): Initialize lto_stats.
3888 If flag_lto_report is set, call print_lto_report.
3889
38902009-02-19 Diego Novillo <dnovillo@google.com>
3891
3892 Revert
3893
3894 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3895
3896 * lto.c (lto_add_inline_clones): Don't add the
3897 master clone. Check for a decl in the original
3898 bitmap, not a node.
3899 (lto_add_all_inlinees): Remove original nodes
3900 that are not needed.
3901 (lto_scan_statics_in_cgraph_node): Don't care if
3902 the node is the master.
3903 (lto_promote_cross_file_statics): Use a new
3904 context.seen_node_decls for each set
3905
39062009-02-19 Rafael Avila de Espindola <espindola@google.com>
3907
3908 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3909 for a decl in the original bitmap, not a node.
3910 (lto_add_all_inlinees): Remove original nodes that are not needed.
3911 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3912 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3913 for each set
3914
39152009-02-18 Diego Novillo <dnovillo@google.com>
3916
3917 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3918 and TV_WHOPR_WPA_IO.
3919 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3920 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3921 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3922 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3923 depending on command line flags.
3924 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3925 (lto_main): Remove timer uses.
3926
39272009-02-18 Rafael Avila de Espindola <espindola@google.com>
3928
3929 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3930 (lto_wpa_write_files): Update calls to renamed functions.
3931
39322009-02-17 Diego Novillo <dnovillo@google.com>
3933
3934 PR 39203
3935 * lto-lang.c (lto_post_options): Disable -fwhole-program
3936 when running LTRANS.
3937
39382009-02-10 Diego Novillo <dnovillo@google.com>
3939
3940 * lto.c (read_cgraph_and_symbols): Fix comment.
3941
39422009-02-10 Diego Novillo <dnovillo@google.com>
3943
3944 * lto.c (read_cgraph_and_symbols): Read options from all
3945 IL files.
3946
39472009-02-10 Diego Novillo <dnovillo@google.com>
3948
3949 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3950 (materialize_cgraph): Likewise.
3951 (do_whole_program_analysis): Likewise.
3952 (lto_main): Call read_cgraph_and_symbols,
3953 materialize_cgraph and do_whole_program_analysis.
3954
39552009-02-10 Simon Baldwin <simonb@google.com>
3956
3957 * lto.c: Include lto-opts.h.
3958 * (lto_main): Clear file options at loop start, read any saved
3959 options from the first file handled, and re-issue options.
3960 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3961
39622009-02-02 Diego Novillo <dnovillo@google.com>
3963
3964 * lto.c (lto_main): Stop LTO_TIMER and use
3965 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3966
39672009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3968
3969 PR lto/38995
3970 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3971 to POINTER_SIZE.
3972
39732009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3974
3975 * Make-lang.in (LTO_EXE): Link with all
3976 BACKENDLIBS and not only GMPLIBS
3977
39782009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3979
3980 PR bootstrap/38992
3981 * lto-elf.c: Include gelf.h instead of libelf.h.
3982 (lto_elf_file_close): Replace elfx_update_shstrndx with
3983 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3984 gelf_update_ehdr.
3985
39862009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3987
3988 PR middle-end/38996
3989 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3990
39912009-01-26 Diego Novillo <dnovillo@google.com>
3992
3993 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3994
39952009-01-26 Diego Novillo <dnovillo@google.com>
3996
3997 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3998 and rename into gimple_types_compatible_p.
3999
40002009-01-12 Rafael Avila de Espindola <espindola@google.com>
4001
4002 * lto-lang.c (lang_hooks): Remove the const qualifier.
4003
40042009-01-06 Diego Novillo <dnovillo@google.com>
4005
4006 * ltrans-driver: Mark 'all' target as phony.
4007
40082008-12-31 Diego Novillo <dnovillo@google.com>
4009
4010 * ltrans-driver: Execute a NOP action for target 'all'.
4011
40122008-12-19 Diego Novillo <dnovillo@google.com>
4013
4014 * lto.c (lto_1_to_1_map): Tidy.
4015
40162008-12-19 Diego Novillo <dnovillo@google.com>
4017
4018 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
4019 be opened, show its name.
4020 * ltrans-driver: If $verbose is set, do not use parallelism.
4021
40222008-12-17 Rafael Avila de Espindola <espindola@google.com>
4023
4024 * lto.c (lto_fixup_function): New.
4025 (lto_fixup_tree): Call lto_fixup_function.
4026
40272008-12-14 Doug Kwan <dougkwan@google.com>
4028
4029 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
4030 variables if there is no function.
4031
40322008-12-10 Simon Baldwin <simonb@google.com>
4033
4034 * ltrans-driver: Always run make in silent mode, to avoid make's
4035 trace on stdout interfering with lto-wrapper output.
4036
40372008-12-10 Doug Kwan <dougkwan@google.com>
4038
4039 * lto.c (lto_add_inline_clones): Do not force master clones of
4040 inlined functions already in SET to be static inline.
4041
40422008-12-04 Doug Kwan <dougkwan@google.com>
4043
4044 * lto.c (globalize_context_t): New type to store states in
4045 globalization of cross-file statics.
4046 (globalize_cross_file_statics): New.
4047 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
4048 static decls that need to be fixed up.
4049 (lto_scan_statics_in_cgraph_node): Change call interface to use
4050 a globalize_context_t CONTEXT for all states used.
4051 (lto_scan_statics_in_remaining_global_vars): New.
4052 (lto_promote_cross_file_statics): Use new call interface of
4053 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
4054 visible vars in the last set.
4055
40562008-12-03 Diego Novillo <dnovillo@google.com>
4057
4058 * lto.c (lto_fixup_tree): Do not emit an error when
4059 PREVAILING throw but T doesn't.
4060
40612008-12-02 Doug Kwan <dougkwan@google.com>
4062
4063 * lto.c (lto_scan_statics_in_ref_table): New function factored out
4064 from code in ...
4065 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
4066 variables and functions.
4067 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
4068 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
4069
40702008-11-29 Diego Novillo <dnovillo@google.com>
4071
4072 * lto.c: Include timevar.h.
4073 (lto_materialize_function): Tidy. Add comments.
4074 (lto_wpa_write_files): Tidy.
4075 (lto_execute_ltrans): Tidy.
4076 (lto_main): Add local variable LTO_TIMER. Initialize it
4077 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
4078 Start and stop the timer.
4079 Tidy comments.
4080 * Make-lang.in (lto.o): Add dependency on timevar.h.
4081 * ltrans-driver: React to -v and -save-temps.
4082 Use simple heuristic to determine how much parallelism to
4083 use when executing make.
4084
40852008-11-12 Doug Kwan <dougkwan@google.com>
4086
4087 * lto.c (lto_bitmap_obstack): Remove var.
4088 (lto_materialize_function): Do nothing instead of marking function
4089 body in file if flag_wpa is true.
4090 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
4091 (lto_scan_statics_in_cgraph_node): New function.
4092 (lto_promote_cross_file_statics): Same.
4093 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
4094 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
4095 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
4096
40972008-11-09 Diego Novillo <dnovillo@google.com>
4098
4099 * lto/lto.c (lto_fixup_tree): Change error message locus
4100 information to include location of mismatching
4101 declaration.
4102 Use TREE_NO_WARNING to avoid repeated messages.
4103 (lto_main): If lto_fixup_decls emitted any errors, exit.
4104 * lto/lto-lang.c: Don't include libfuncs.h and except.h
4105 (lto_init_options): Don't enable exceptions by default.
4106 (lto_eh_runtime_type): Move to lto-function-in.c
4107 (lto_init_eh): Likewise.
4108 (lto_init): Don't call lto_init_eh.
4109 * lto/Make-lang.in (lto-lang.o): Remove dependency on
4110 libfuncs.h and except.h.
4111
41122008-10-30 Diego Novillo <dnovillo@google.com>
4113
4114 * lto.c (lto_read_decls): Declare debug_main only if
4115 LTO_STREAM_DEBUGGING is enabled.
4116
41172008-10-30 Simon Baldwin <simonb@google.com>
4118
4119 * lto.c (lto_wpa_write_files): Create intermediate files with
4120 make_cwd_temp_file().
4121 (lto_maybe_unlink): New. Delete intermediate WPA files unless
4122 WPA_SAVE_LTRANS is set.
4123 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
4124 * ltrans-driver: Do not strip directory from output files.
4125
41262008-10-29 Doug Kwan <dougkwan@google.com>
4127
4128 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
4129 DECL.
4130 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
4131 (lto/lto-symtab.o): Remove rule.
4132 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
4133 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
4134 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
4135 Remove macros.
4136 lto-symtab.c (File): Move up one level.
4137 lto-lang.c (cgraph.h): Remove include.
4138 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4139 input_cgraph): Move to lto-cgraph.c in gcc directory above.
4140 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
4141
41422008-10-24 Rafael Espindola <espindola@google.com>
4143
4144 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
4145 non prevailing weak symbols.
4146
41472008-10-24 Rafael Espindola <espindola@google.com>
4148
4149 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
4150
41512008-10-24 Rafael Espindola <espindola@google.com>
4152
4153 * lto-lang.c (input_node): Avoid casts from pointers to ints of
4154 different types.
4155
41562008-10-23 Simon Baldwin <simonb@google.com>
4157
4158 * lto-lang.c (input_node): Save the node reference, rather than the
4159 node pointer, in node->inlined_to.
4160 (input_cgraph_1): Convert node references into node pointers.
4161
41622008-10-22 Diego Novillo <dnovillo@google.com>
4163 Rafael Espindola <espindola@google.com>
4164
4165 * lto.c (lto_resolution_read): Tidy.
4166 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
4167 abort if RET is NULL.
4168
41692008-10-22 Doug Kwan <dougkwan@google.com>
4170
4171 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
4172 exceptions flag is given.
4173 * lto-lang.c: (lto_init_options) Set default exceptions flag.
4174 (lto_init_eh): Remove exceptions flag initialization.
4175 (lto_init): Only call lto_init_eh if exceptions flag is set.
4176
41772008-10-21 Diego Novillo <dnovillo@google.com>
4178
4179 * lto.c: Tidy some formatting.
4180 * lto.h: Likewise.
4181
41822008-10-21 Simon Baldwin <simonb@google.com>
4183
4184 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
4185 them is NULL (but not the other).
4186
41872008-10-17 Diego Novillo <dnovillo@google.com>
4188
4189 * ltrans-driver: Divert output from make to a temporary file.
4190 Show it if the call to make failed.
4191
41922008-10-15 Diego Novillo <dnovillo@google.com>
4193
4194 * lto.c (lto_wpa_write_files): Reformat do-while loop.
4195 Do not print TEMP_FILENAME
4196 * ltrans-driver: Call make with -s.
4197
41982008-10-15 Diego Novillo <dnovillo@google.com>
4199
4200 * lto-symtab.c (lto_symtab_merge_decl): Do not force
4201 TREE_STATIC on global symbols.
4202
42032008-10-14 Ollie Wild <aaw@google.com>
4204
4205 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
4206 (LTRANS_DRIVER_EXE): Add.
4207 (lto.all.cross): Add LTRANS_DRIVER_EXE.
4208 (lto.all.encap): Add LTRANS_DRIVER_EXE.
4209 (lto.install.common): Remove ltrans-driver.
4210 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
4211 (LTRANS_DRIVER_EXE): New build rule.
4212 * config-lang.in (compilers): Add ltrans-driver.
4213
42142008-10-14 Diego Novillo <dnovillo@google.com>
4215
4216 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
4217 of program name.
4218
42192008-10-13 Ollie Wild <aaw@google.com>
4220
4221 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
4222 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
4223 * ltrans-driver (LTRANS_FLAGS): Remove.
4224
42252008-10-08 Doug Kwan <dougkwan@google.com>
4226
4227 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
4228 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
4229 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
4230 from lto_fixup_state to here.
4231 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
4232 just a free-list. Fix up types also. Move decl merging code to
4233 lto_fixup_tree.
4234 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
4235 object.
4236 (lto_fixup_decls): Use another pointer set to avoid multiple
4237 walking of nodes except for DECLs to be replaced. Pass an
4238 lto_fixup_data_t object to tree-walker.
4239
42402008-10-08 Rafael Espindola <espindola@google.com>
4241
4242 * lto-symtab.c (lto_symtab_set_resolution): New.
4243 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
4244 lto_symtab_get_resolution.
4245 (lto_symtab_prevailing_decl): Return decl for non public decls.
4246 (lto_symtab_get_resolution): New.
4247 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
4248
42492008-10-06 Rafael Espindola <espindola@google.com>
4250
4251 * lto-lang.c: Include cgraph.h.
4252 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
4253 input_cgraph): Moved from lto-cgraph.c.
4254 (LANG_HOOKS_INPUT_CGRAPH): New.
4255
42562008-10-03 Rafael Espindola <espindola@google.com>
4257
4258 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
4259
42602008-10-03 Rafael Espindola <espindola@google.com>
4261
4262 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
4263 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
4264 prevailing definition. Don't mark TREE_NOTHROW differences.
4265 * lto.c (lto_fixup_tree): New.
4266 (lto_fixup_state): New.
4267 (lto_fixup_state_aux): New.
4268 (free_decl): New.
4269 (lto_fixup_decls): New.
4270 (lto_main): Call lto_fixup_decls.
4271
42722008-10-02 Ollie Wild <aaw@google.com>
4273
4274 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
4275 and Init.
4276 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
4277 * lto-lang.c (lto_post_options): Add validation and fixups for
4278 -fltrans and -fwpa.
4279
42802008-10-02 Rafael Espindola <espindola@google.com>
4281
4282 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
4283 lto_symtab_merge_decl): Return void.
4284 (lto_symtab_prevailing_decl): New.
4285
42862008-09-30 Rafael Espindola <espindola@google.com>
4287
4288 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
4289 defined symbols.
4290 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
4291 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
4292 Check for already defined symbols.
4293 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
4294 (LTO_IDENTIFIER_RESOLUTION): Remove.
4295 (LTO_DECL_RESOLUTION): New.
4296
42972008-09-30 Rafael Espindola <espindola@google.com>
4298
4299 * lto.c (lto_read_decls): Use new input_tree signature.
4300
43012008-09-26 Doug Kwan <dougkwan@google.com>
4302
4303 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
4304 bodies affected by exception attribute merging of DECLs.
4305 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
4306 merging.
4307
43082008-09-25 Rafael Espindola <espindola@google.com>
4309
4310 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
4311 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
4312 * lto-symtab.c (lto_symtab_compatible): New.
4313 (lto_symtab_overwrite_decl): New.
4314 (lto_symtab_merge_decl): Refactor to use the above functions
4315 and the resolution from lang_identifier.
4316 * lto-tree.h: Include plugin-api.h.
4317 (lang_identifier): Add resolution.
4318 (LTO_IDENTIFIER_RESOLUTION): New.
4319
43202008-09-25 Ollie Wild <aaw@google.com>
4321
4322 * lang.opt (fltrans-output-list=): New option.
4323 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
4324
43252008-09-25 Rafael Espindola <espindola@google.com>
4326
4327 * lto.c (lto_resolution_read): Initialize ret;
4328
43292008-09-24 Ollie Wild <aaw@google.com>
4330
4331 * lto.c (sys/mman.h): Move include.
4332 (lto_wpa_write_files): Return a list of written files.
4333 (lto_execute_ltrans): New function.
4334 (lto_main): Call lto_execute_ltrans.
4335 (ltrans-driver): New file.
4336 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
4337 (DEAULT_LTRANS_DRIVER_LEN): New macro.
4338 (lto_init_options): Initialize ltrans_driver.
4339 (lto_handle_option): Fix incorrect default output value.
4340 * lang.opt (fltrans-driver=): New option.
4341 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
4342 (lto.install-common): Add lto/ltrans-driver.
4343
43442008-09-24 Rafael Espindola <espindola@google.com>
4345
4346 * Make-lang.in (LTO_OBJS): Add lto/common.o.
4347 (lto/lto.o): Depend on lto/common.h.
4348 (lto/common.o): New.
4349 * lang.opt (resolution): New.
4350 * lto-lang.c (resolution_file_name): New.
4351 (lto_handle_option): Handle OPT_resolution.
4352 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
4353 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
4354 pass it to lto_symtab_merge_decl.
4355 * lto.c: Include common.h.
4356 (lto_read_decls): Add resolutions and resolutions_size arguments.
4357 Initialize data_in.globals_resolution and
4358 data_in.globals_resolution_size.
4359 (index_and_symbol_resolution): New.
4360 (lto_resolution_read): New.
4361 (lto_file_read): Add argument resolution_file.
4362 Read resolution.
4363 * lto.h (resolution_file_name): New.
4364
43652008-09-23 Rafael Espindola <espindola@google.com>
4366
4367 * common.c: Update description.
4368 * common.h: Update description.
4369
43702008-09-23 Rafael Espindola <espindola@google.com>
4371
4372 * common.c: Moved from lto-plugin.
4373 * common.h: Moved from lto-plugin.
4374
43752008-09-22 Doug Kwan <dougkwan@google.com>
4376
4377 * lto.c (VEC(bitmap,heap)): Declare.
4378 (lto_materialize_function): Handle WAP mode specially.
4379 (lto_add_inline_clones): New.
4380 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
4381 return a bitmap of inlined decls.
4382 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
4383 (lto_main): Call reset_inline_failed to reset inlining states.
4384 Check call-graph after WPA inlining.
4385 * lto-lang.c (lto_init): Do not clear flag_generate_lto
4386 unconditionally.
4387
43882008-09-19 Doug Kwan <dougkwan@google.com>
4389
4390 lto.c (lto_main): Remove unsued wrapper code.
4391 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
4392
43932008-09-19 Rafael Espindola <espindola@google.com>
4394
4395 * lto-symtab.c: Include lto-tree-in.h.
4396 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
4397 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
4398 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
4399
44002008-09-17 Paolo Bonzini <bonzini@gnu.org>
4401 Rafael Avila de Espindola <espindola@google.com>
4402
4403 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
4404 COMPOUND_LITERAL_EXPR_DECL): Remove.
4405 (emit_local_var): Remove.
4406 (lto_expand_expr): Remove.
4407 (lto_staticp): Remove.
4408 (LANG_HOOKS_EXPAND_EXPR): Remove.
4409 (LANG_HOOKS_STATICP): Remove.
4410
44112008-09-11 Diego Novillo <dnovillo@google.com>
4412
4413 * lto-lang.c: Include except.h and libfuncs.h.
4414 (lto_init_eh): New.
4415 (lto_init): Call it.
4416 Set flag_generate_lto to 0.
4417 * Make-lang.in (lto-lang.o): Add dependency on except.h
4418 and libfuncs.h.
4419
44202008-09-09 Bill Maddox <maddox@google.com>
4421
4422 * lto-lang.c: Include header file expr.h.
4423 (COMPOUND_LITERAL_EXPR_DECL_STMT,
4424 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
4425 (emit_local_var): Copied from c-semantics.c.
4426 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
4427 and c_staticp in c-common.c.
4428 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
4429
44302008-09-08 Diego Novillo <dnovillo@google.com>
4431
4432 * lto-lang.c (lto_global_bindings_p): Return 1 during
4433 IPA passes.
4434
44352008-09-07 Diego Novillo <dnovillo@google.com>
4436
4437 * lto.c: Tidy formatting.
4438
44392008-08-04 Bill Maddox <maddox@google.com>
4440
4441 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4442
44432008-09-03 Doug Kwan <dougkwan@google.com>
4444
4445 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4446 CIF_OK instead of NULL.
4447
44482008-09-02 Diego Novillo <dnovillo@google.com>
4449 Simon Baldwin <simonb@google.com>
4450
4451 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4452 c_common_type_for_size.
4453 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4454 (lto_init): Call linemap_add.
4455 (signed_and_unsigned_types): Remove.
4456
44572008-08-29 Diego Novillo <dnovillo@google.com>
4458
4459 * lto-lang.c (handle_noreturn_attribute): New local function.
4460 (handle_const_attribute): New local function.
4461 (handle_malloc_attribute): New local function.
4462 (handle_pure_attribute): New local function.
4463 (handle_novops_attribute): New local function.
4464 (handle_nonnull_attribute): New local function.
4465 (handle_nothrow_attribute): New local function.
4466 (handle_sentinel_attribute): New local function.
4467 (handle_type_generic_attribute): New local function.
4468 (handle_format_attribute): New local function.
4469 (handle_format_arg_attribute): New local function.
4470 (lto_attribute_table): Declare.
4471 (lto_format_attribute_table): Declare.
4472 (lto_init_attributes): New local function.
4473 (lto_define_builtins): Call it.
4474 Call targetm.init_builtins and build_common_builtin_nodes.
4475 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4476 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4477
44782008-08-28 Diego Novillo <dnovillo@google.com>
4479
4480 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4481 $(GIMPLE_H).
4482 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4483 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4484 * lto-symtab.c: Include gimple.h.
4485 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4486 TREE_CHAIN.
4487
44882008-08-27 Doug Kwan <dougkwan@google.com>
4489
4490 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4491 gt-lto-lto.h): New includes.
4492 (lto_materialize_function): Do not read in function body in WPA mode.
4493 Format a line to fit in 80 columns.
4494 (lto_cgraph_node_sets): New garbage collected variable.
4495 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4496 New functions.
4497 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4498 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4499 variable LTO_SECTION_IN_H.
4500 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4501 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4502 with variable LTO_SECTION_IN_H.
4503 * config-lang.in (gtfiles): Add lto/lto.c.
4504 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4505 merged DECL_RESULT correctly.
4506
45072008-08-26 Bill Maddox <maddox@google.com>
4508
4509 * lto-lang.c Include tree-gimple.h.
4510 (lto_mark_addressable): Call mark_addressable rather than
4511 asserting.
4512 (lto_post_options): Suppress debug info generation.
4513 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4514
92a44a68 45152008-08-25 Bill Maddox <maddox@google.com>
7bfefa9d 4516
4517 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4518 assertion and leave an explanatory comment in its place.
4519
45202008-08-21 Doug Kwan <dougkwan@google.com>
4521
4522 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4523 of common nodes instead of computing locallly.
4524 (lto_read_in_decl_state): New.
4525 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4526 Read global and per-function in-decl states.
4527 * Make-lang.in (LTO_H): Update dependency.
4528 (lto/lto.o): Same.
4529 (lto-symtab.c): Merge (revision 139039)
4530 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4531
45322008-08-21 Rafael Espindola <espindola@google.com>
4533
4534 * config-lang.in (target_libs): New.
4535
45362008-08-20 Bill Maddox <maddox@google.com>
4537
4538 * lto.c (current_lto_file): Remove GTY marker from static
4539 variable. Remove include of file gt-lto-lto.h.
4540 * Make-lang.in: Remove dependency of lto/lto.o on
4541 gt-lto-lto.h.
4542 * lto-elf.c (lto_file_close): Removed.
4543 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4544 allocate lto_elf_file object.
4545 (lto_elf_file_close): Free lto_elf_file object after close.
4546 * lto.h (struct lto_file_struct): Remove GTY marker.
4547 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4548 gtfiles.
4549
45502008-08-20 Bill Maddox <maddox@google.com>
4551
4552 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4553 to conform to its new signature.
4554 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4555 on discarded node here, now called in global_vector_fixup.
4556
45572008-08-09 Bill Maddox <maddox@google.com>
4558
4559 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4560 has not been set to a front-end-specific value.
4561
45622008-08-05 Doug Kwan <dougkwan@google.com>
4563
4564 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4565 build breakage.
4566
45672008-07-30 Bill Maddox <maddox@google.com>
4568
4569 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4570 Remove obsolete comments.
4571 (lto_read_decls): Remove initialization of deleted field data_in.global.
4572 Tidy up comments.
4573 (lto_main): Remove redundant initialization of section_hash_table.
4574 * lto-elf.c: Removed obsolete comments.
4575 * lto.h: Tidy up comments.
4576 * lto-symtab.c (lto_least_common_multiple): New function.
4577 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4578 Tidy up comments.
4579
45802008-07-25 Diego Novillo <dnovillo@google.com>
4581 Bill Maddox <maddox@google.com>
4582
4583 * lto.c: Re-order include files.
4584 Include lto-section-out.h.
4585 (preload_common_nodes): Add debugging output.
4586 Add new local INDEX_TABLE.
4587 Call preload_common_node.
4588 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4589
45902008-07-13 Bill Maddox <maddox@google.com>
4591
4592 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4593 unwanted scaling during pointer addition.
4594
45952008-07-11 Bill Maddox <maddox@google.com>
4596 Diego Novillo <dnovillo@google.com>
4597
4598 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4599 Make code const-correct.
4600 (lto_file_read): Fix C++ compatibility warnings.
4601 (lto_read_section_data): Fix C++ compatibility warnings.
4602 (lto_get_section_data): Use CONST_CAST to avoid warning when
4603 const pointer passed to free.
4604 * lto-elf.c (lto_elf_build_section_table): Fix C++
4605 compatibility warnings.
4606 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4607 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4608 (lto_get_current_out_file): Fix C++ compatibility warnings.
4609
46102008-07-11 Diego Novillo <dnovillo@google.com>
4611
4612 * Make-lang.in (lto-warn): Define.
4613
46142008-07-03 Simon Baldwin <simonb@google.com>
4615
4616 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4617 LTO_STREAM_DEBUGGING.
4618
46192008-06-27 Ollie Wild <aaw@google.com>
4620
4621 * lto-elf.c (lto-section-out.h): New include.
4622 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4623 and data members.
4624 (cached_file_attrs): New static variable.
4625 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4626 Use cached_file_attrs for checking bits.
4627 (lto_elf_build_section_table): Remove elf_file argument from
4628 lto_elf_get_shdr and lto_elf_free_shdr calls.
4629 (DEFINE_INIT_SHDR): New macro.
4630 (init_shdr32, init_shdr64): New functions defined via the
4631 DEFINE_INIT_SHDR macro.
4632 (lto_elf_begin_section_with_type): New function.
4633 (lto_elf_begin_section): New function.
4634 (lto_elf_append_data): New function.
4635 (lto_elf_end_section): New function.
4636 (DEFINE_VALIDATE_EHDR): New macro.
4637 (validate_ehdr32, validate_ehdr64): New functions defined via the
4638 DEFINE_VALIDATE_EHDR macro.
4639 (validate_file): New function.
4640 (DEFINE_INIT_EHDR): New macro.
4641 (init_ehdr32, init_ehdr64): New functions defined via the
4642 DEFINE_INIT_EHDR macro.
4643 (init_ehdr): New function.
4644 (lto_elf_file_open): Add support for writable files. Move some
4645 validation logic to validate_file.
4646 (lto_elf_file_close): Add support for writable files. Write file data
4647 and free data blocks.
4648 (current_out_file): New static variable.
4649 (lto_set_current_out_file): New function.
4650 (lto_get_current_out_file): New function.
4651 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4652 Add temporary initialization for testing ELF serialization.
4653 * lto.h (lto-section-out.h): New include.
4654 (struct lto_file_struct): Slight modification to comment.
4655 (lto_elf_file_open): Add writable parameter.
4656 (lto_elf_begin_section): New function declaration.
4657 (lto_elf_append_data): New function declaration.
4658 (lto_elf_end_section): New function declaration.
4659 (lto_set_current_out_file, lto_get_current_out_file): New function
4660 declarations.
4661 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4662 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4663 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4664 * Make-lang.in (LTO_H): Add lto-section-out.h.
4665
46662008-06-12 Ollie Wild <aaw@google.com>
4667
4668 * lto.h (struct lto_file_vtable_struct): Remove.
4669 (struct lto_file_struct): Remove vtable member.
4670 * lto-elf.c (lto_file_init): Remove vtable argument.
4671 (lto_elf_map_optional_lto_section): Remove.
4672 (lto_elf_unmap_section): Remove.
4673 (lto_elf_file_vtable): Remove.
4674 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4675 lto_file_init call.
4676 (lto_elf_find_section_data): Remove.
4677
46782008-06-11 Ollie Wild <aaw@google.com>
4679
4680 * lto.c (lto_file_read): Add const qualifier to data variable.
4681
46822008-06-11 Diego Novillo <dnovillo@google.com>
4683
4684 Merge from lto-streamber sub-branch.
4685
4686 2008-06-04 Ollie Wild <aaw@google.com>
4687
4688 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4689 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4690
4691 2008-05-28 Bill Maddox <maddox@google.com>
4692
4693 Replace the DWARF reader in the LTO front-end.
4694
4695 * lto.c: Include lto-tree-in.h, lto-tags.h.
4696 (enum DWARF2_class, DW_cl_constant, struct
4697 DWARF2_form_data, struct lto_context,
4698 lto_fd_init, lto_info_fd_init,
4699 lto_abbrev_fd_init, lto_info_fd_close,
4700 lto_file_init, lto_file_close,
4701 lto_file_corrupt_error, lto_abi_mismatch_error,
4702 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4703 lto_read_uleb128, lto_read_sleb128,
4704 lto_read_initial_length, lto_abbrev_read_attrs,
4705 lto_abbrev_read, lto_abbrev_read_lookup,
4706 lto_read_section_offset,
4707 lto_read_comp_unit_header, find_cu_for_offset,
4708 lto_get_file_name,
4709 lto_resolve_reference,lto_read_form,
4710 attribute_value_as_int,
4711 make_signed_host_wide_int,
4712 attribute_value_as_constant, lto_cache_hash,
4713 lto_cache_eq, lto_cache_store_DIE,
4714 lto_cache_lookup_DIE, lto_find_integral_type,
4715 lto_find_integral_type_1,
4716 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4717 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4718 lto_unsupported_attr_error, lto_get_identifier,
4719 lto_read_referenced_type_DIE,
4720 lto_read_compile_unit_DIE,
4721 lto_read_array_type_DIE,
4722 lto_read_structure_union_class_type_DIE,
4723 lto_read_enumerator_DIE,
4724 lto_read_enumeration_type_DIE,
4725 lto_read_only_for_child_DIEs,
4726 lto_read_only_for_child_DIEs,
4727 lto_read_member_DIE, lto_read_abbrev,
4728 lto_read_variable_formal_parameter_constant_DIE,
4729 lto_get_body): Removed.
4730 (preload_common_nodes): New function.
4731 (lto_read_decls): Convert for new global streamer.
4732 (lto_materialze_file_data,
4733 lto_read_subroutine_type_subprogram_die,
4734 lto_read_unspecified_parameters_DIE,
4735 lto_read_typedef_DIE,
4736 lto_read_pointer_reference_type_DIE,
4737 lto_read_subrange_type_DIE,
4738 lto_read_base_type_DIE,
4739 lto_read_const_volatile_restrict_type_DIE,
4740 lto_read_namespace_DIE,
4741 lto_read_unspecified_type_DIE, lto_read_DIE,
4742 lto_read_child_DIEs, lto_collect_child_DIEs):
4743 Removed.
4744 (lto_info_read, lto_set_cu_context): Removed.
4745 (lto_file_read): Convert for new global streamer.
4746 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4747 lto_resolve_var_ref, lto_resolve_fn_ref,
4748 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4749 lto_resolve_namespacedecl_ref): Removed.
4750 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4751 * lto-tree.h (lto_symtab_merge_var,
4752 lto_symtab_mergee_fun): Declare here.
4753 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4754 (lto_elf_file_open): Removed code to read DWARF debug sections.
4755 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4756 DWARF2_CompUnit, lto_die_ptr,
4757 lto_die_cache_entry, lto_fd, lto_info_fd,
4758 lto_abbrev_fd): Removed.
4759 (lto_file): Removed debug_info and debug_abbrev fields.
4760 (lto_ref): Removed.
4761 (lto_file_init, lto_file_close,
4762 lto_resolve_type_ref, lto_resolve_var_ref,
4763 lto_resolve_fn_ref, lto_resolve_field_ref,
4764 lto_resolve_typedecl_ref,
4765 lto_resolve_namespacedecl_ref,
4766 lto_get_file_name): Removed declarations.
4767 (lto_symtab_merge_var, lto_symtab_merge_fn):
4768 Declarations moved to lto-tree.h.
4769 * lto-symtab.c (lto_compatible_attributes_p):
4770 Lobotomize this, as it barfs on "Hello, world!".
4771 * lto-section-out.c: Include lto-tree-out.h.
4772 (lto_hash_global_slot_node,
4773 lto_eq_global_slot_node, preload_common_nodes,
4774 write_global_stream, write_global_references):
4775 New functions.
4776 (produce_asm_for_decls): Convert for new global streamer.
4777 * lto-section-out.h (lto_hash_global_slot_node,
4778 lto_eq_global_slot_node): Declare.
4779
92a44a68 47802008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4781 Jan Hubicka <jh@suse.cz>
4782
4783 * lto.c (sys/mman.h, tree-pass.h): New includes.
4784 (lto_materialize_constructors_and_inits,
4785 lto_materialize_function): Keeps length of section.
4786 (lto_materialize_cgraph): Removed.
4787 (lto_read_decls): Initialize fd field.
4788 (lto_file_read): Different return type and removed much code to
4789 lto_main.
4790 (page_mask): New variable.
4791 (lto_read_section_data, get_section_data, free_section_data): New
4792 functions.
4793 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4794 passes can get the section data.
4795
92a44a68 47962008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4797
4798 * lto.h (lto_read_decls): Made local.
4799 (lto_input_function_body, lto_input_constructors_and_inits,
4800 lto_input_cgraph): Declarations moved to lto-section-in.h.
4801 * lto-section-in.c: Moved to .. .
4802 * lto-cgraph-in.c: Ditto.
4803 * lto-section-in.h: Ditto.
4804 * lto-function-in.c: Ditto.
4805 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4806 (lto_insert_block): Removed.
4807 (LANG_HOOKS_INSERT_BLOCK): Removed.
4808 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4809 lto-section-in.o): Rules moved to lto/Makefile.in.
4810
4811
48122008-05-16 Ollie Wild <aaw@google.com>
4813
4814 * lto-lang.c (tree-inline.h): Include.
4815 (lto_post_options): New function.
4816 (LANG_HOOKS_POST_OPTIONS): Define.
4817 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4818 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4819
48202008-05-13 Diego Novillo <dnovillo@google.com>
4821
4822 * lto-function-in.c (input_ssa_names): Call
4823 make_ssa_name_fn instead of make_ssa_name.
4824
48252008-05-12 Diego Novillo <dnovillo@google.com>
4826
4827 * lto-cgraph-in.c (overwrite_node): Update references to
4828 inline summary fields.
4829 * lto-function-in.c (input_expr_operand): Do not handle
4830 STRUCT_FIELD_TAG.
4831
48322008-05-09 Ollie Wild <aaw@google.com>
4833
4834 * lang.opt: New file.
4835 * lto-lang.c (lto_init_options): New function.
4836 (lto_handle_option): New function.
4837 (lto_init): Move initialization of flag_unit_at_a_time to
4838 lto_init_options.
4839 (LANG_HOOKS_INIT_OPTIONS): Define.
4840 (LANG_HOOKS_HANDLE_OPTION): Define.
4841
48422008-04-29 Ollie Wild <aaw@google.com>
4843
4844 * lto.c (lto_read_namespace_DIE): New function.
4845 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4846 NAMESPACE_DECL DIE's.
4847 (lto_resolve_namespacedecl_ref): New function.
4848 * lto.h (lto_resolve_namespacedecl_ref): New function.
4849 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4850 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4851 and num_namespace_decls.
4852 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4853 * lto-lang.c (lto_init_ts): New function.
4854 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4855
48562008-04-16 Ollie Wild <aaw@google.com>
4857
4858 * lto-function-in.c (input_type_ref): Updated function description.
4859
48602008-04-16 Ollie Wild <aaw@google.com>
4861
4862 * lto-function-in.c (input_type_ref_1): New function.
4863 (input_type_ref): Split into two functions.
4864 (input_function): Add support for type contexts.
4865
48662008-04-16 Ollie Wild <aaw@google.com>
4867
4868 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4869 section name
4870
48712008-04-16 Ollie Wild <aaw@google.com>
4872
4873 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4874 list of supported languages.
4875
92a44a68 48762008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4877
4878 Merge with mainline @133491.
4879
92a44a68 48802008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4881 Jan Hubicka <jh@suse.cz>
4882
4883 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4884 fd->unmaterialized_fndecls.
4885 (lto_get_file_name, lto_materialize_cgraph): New function.
4886 (lto_materialize_constructors_and_inits,
4887 lto_materialize_function): Read info directly from elf file.
4888 (lto_file_read): Made local and initialize dictionary so that
4889 other lto sections can be read without reprocessing the elf file.
4890 (lto_main): Read all functions after all files have been processed
4891 for their types, globals and cgraph.
4892 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4893 dependencies.
4894 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4895 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4896 (lto_elf_read_symtab): Removed function.
4897 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4898 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4899 (lto_file_read): Made local.
4900 (lto_get_file_name, lto_elf_build_section_table,
4901 lto_input_cgraph):
4902 New function.
4903 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4904 New functions.
4905 (lto_read_decls): Get the file name.
4906 * lto-cgraph-in.c: New file.
4907 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4908 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4909 (input_labels): Fixed latent sizeof issue.
4910 (input_function): Build stmt array to set call sites into cgraph
4911 edges.
4912 (lto_read_body): Reset cfun->curr_properties.
4913 * lto_section_in.h (lto_section_slot): New structure.
4914 (section_hash_table.lto_file_decl_data): New field.
4915
4916
92a44a68 49172008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4918
4919 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4920 reconstruct static initializers.
4921 (lto_get_body, lto_materialize_function): Add lto_section_type as
4922 a parameter.
4923 (lto_materialize_constructors_and_inits,
4924 lto_materialize_file_data): New function.
4925 (lto_materialize_function,
4926 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4927 unmap_section and map_fn_body to map_section.
4928 (lto_set_cu_context): Process functions and static inits
4929 differently.
4930 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4931 lto/lto-section-in.o): Update dependencies.
4932 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4933 lto_section_type parameter.
4934 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4935 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4936 renamed the other two so that there is only one map function and
4937 one unmap function and each takes a section type parameter.
4938 (lto_read_function_body): Renamed to lto_input_function_body and
4939 added file_data parameter.
4940 (lto_read_var_init): Removed.
4941 (lto_input_constructors_and_inits): New function.
4942 * lto-section-in.c (lto_read_decls): New function.
4943 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4944 var_decls, type_decls, types to lto_file_decl_data.
4945 (input_type_ref, input_expr_operand, lto_read_body): Get
4946 field_decls, fn_decls, var_decls, type_decls, types from different
4947 structure.
4948 (input_globals, input_constructor, lto_read_var_init): Removed.
4949 (input_constructors_or_inits): New function.
4950 (lto_read_function_body, lto_input_constructors_and_inits):
4951 Renamed to lto_input_function_body and takes file_data parameter.
4952 * lto-section-in.h (lto_file_decl_data): New structure.
4953
92a44a68 49542008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4955
4956 * lto-function-in.c (input_globals.c): Changed input type to
4957 lto_function_header.
4958 (input_bb): Removed code to deserialize the stmt number.
4959 (input_function): Renumber all stmts after they are input.
4960 (lto_read_body, lto_read_function_body, lto_read_var_init):
4961 Changed to used new header format and enum section_type.
4962 *lto-lang.c (success): Removed.
4963
49642008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4965
4966 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4967 (lto_elf_free_sym): Likewise.
4968
4969 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4970 (lto_elf_build_init): Likewise.
4971
92a44a68 49722008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 4973
4974 * lto-read.c: Renamed to lto-function-in.c.
4975 (input_1_unsigned): Moved to lto-section-in.c and renamed
4976 lto_input_1_unsigned.
4977 (input_uleb128): Moved to lto-section-in.c and renamed
4978 lto_input_uleb128.
4979 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4980 lto_input_widest_uint_uleb128.
4981 (input_sleb128): Moved to lto-section-in.c and renamed
4982 lto_input_sleb128.
4983 (input_integer): Moved to lto-section-in.c and renamed
4984 lto_input_integer.
4985 (debug_in_fun): Moved to lto-section-in.c and renamed
4986 lto_debug_in_fun.
4987 (input_block): Moved to lto-section-in.h and renamed
4988 lto_input_block.
4989 (input_expr_operand): Fixed to allow lists with more than one
4990 element.
4991 * lto-section-in.h: New file.
4992 * lto-section-in.c: New file with changes from above.
4993 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4994 (lto-section-in.o): New rule.
4995
49962007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4997
4998 * lto-read.c (input_expr_operand): Mark static and external
4999 VAR_DECLs as needed.
5000
50012007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5002
5003 * lto-read.c (input_integer): Use the correct shift amount.
5004
50052007-12-29 Nathan Froyd <froydnj@codesourcery.com>
5006
5007 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
5008 (LANG_HOOKS_NAME): Define.
5009
50102007-12-27 Nathan Froyd <froydnj@codesourcery.com>
5011
5012 * lto.c (lto_find_integral_type): Define as a macro. Rename the
5013 original function to...
5014 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
5015 don't have a base type.
5016 (lto_read_enumeration_type_DIE): Examine the values of the
5017 enumeration to determine whether we can use an unsigned type for
5018 the base type of the enumeration.
5019
50202007-12-24 Nathan Froyd <froydnj@codesourcery.com>
5021
5022 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
5023 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
5024
50252007-12-22 Nathan Froyd <froydnj@codesourcery.com>
5026
5027 * lto-lang.c (lto_types_compatible_p): New function.
5028 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
5029
50302007-12-22 Nathan Froyd <froydnj@codesourcery.com>
92a44a68 5031 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5032
5033 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
5034 (input_local_vars): Read in DECL_INITIAL and context for local
5035 statics that need to be put in unexpanded_vars_list.
5036
50372007-12-21 Nathan Froyd <froydnj@codesourcery.com>
5038
5039 * lto-read.c (input_real): Use a separate null-terminated buffer
5040 for calling real_from_string.
5041 (input_expr_operand): If we take the address of a FUNCTION_DECL,
5042 tell cgraph that it's needed.
5043
50442007-12-19 Doug Kwan <dougkwan@google.com>
5045
5046 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
5047
50482007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5049
5050 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
5051 (lto_file_read): Reset the members of 'context' every time we read
5052 a toplevel DIE, with special attention to last_param_type.
5053
50542007-12-18 Nathan Froyd <froydnj@codesourcery.com>
5055
5056 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
5057 'declaration'. Set the assembler name for non-public functions.
5058
92a44a68 50592007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5060
5061 * lto_read.c (data_in.unexpanded_indexes): New array.
5062 (input_local_var): Added code to read in unexpanded_var_list
5063 indexes for variables. Only read in DECL_CHAIN field for
5064 parameters.
5065 (input_local_vars): Added code to rebuild unexpanded_var_list in
5066 order using unexpanded_indexes.
5067 (input_function): Added code to set DECL_CONTEXT for functions.
5068
50692007-12-13 Doug Kwan <dougkwan@google.com>
5070
5071 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
5072 in pointer and reference types.
5073
50742007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5075
5076 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
5077 RESULT_DECL.
5078
50792007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5080
5081 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
5082 already read the DIE.
5083 (lto_get_body): New function, split out from...
5084 (lto_materialize_function): ...here. Call it.
5085 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
5086 determine DECL_EXTERNAL.
5087 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
5088 FUNCTION_DECLs when necessary. Use the type of the actual
5089 function definition if we are unable to easily merge types. Ignore
5090 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
5091 necessary.
5092
50932007-12-13 Nathan Froyd <froydnj@codesourcery.com>
5094
5095 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
5096
50972007-12-12 Bill Maddox <maddox@google.com>
5098
5099 Revert
5100 2007-12-07 Bill Maddox <maddox@google.com>
5101
5102 * lto.c (lto_str_fd_init): New function.
5103 (lto_str_fd_close): New function.
5104 (lto_file_init): Call lto_str_fd_init.
5105 (lto_file_close): Call lto_str_fd_close.
5106 (lto_str_read): New function. Read debug string table.
5107 (lto_str_lookup): New function. Get string for debug
5108 string table offset.
5109 (lto_read_form): Recognize DW_FORM_strp.
5110 (lto_file_read): Invoke lto_str_read.
5111
5112 * lto-elf.c (lto_elf_file_open): Read raw section data
5113 for the .debug_str section, if present.
5114
5115 * lto.h (struct lto_str_fd_struct): New struct.
5116 (struct lto_file_struct): Added new field DEBUG_STR
5117 to hold the file descriptor for the debug string table.
5118
51192007-12-07 Bill Maddox <maddox@google.com>
5120
5121 * lto.c (lto_str_fd_init): New function.
5122 (lto_str_fd_close): New function.
5123 (lto_file_init): Call lto_str_fd_init.
5124 (lto_file_close): Call lto_str_fd_close.
5125 (lto_str_read): New function. Read debug string table.
5126 (lto_str_lookup): New function. Get string for debug
5127 string table offset.
5128 (lto_read_form): Recognize DW_FORM_strp.
5129 (lto_file_read): Invoke lto_str_read.
5130
5131 * lto-elf.c (lto_elf_file_open): Read raw section data
5132 for the .debug_str section, if present.
5133
5134 * lto.h (struct lto_str_fd_struct): New struct.
5135 (struct lto_file_struct): Added new field DEBUG_STR
5136 to hold the file descriptor for the debug string table.
5137
51382007-12-07 Nathan Froyd <froydnj@codesourcery.com>
5139
5140 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
5141 Grow the basic_block_info and label_to_block_map vectors if
5142 necessary. Read in the block chain.
5143
51442007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5145
5146 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
5147
51482007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5149
5150 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
5151
51522007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5153
5154 * lto-read.c (input_expr_operand): Don't check for MTAGs.
5155 (lto_read_body): Don't declare PROP_alias.
5156
51572007-12-06 Nathan Froyd <froydnj@codesourcery.com>
5158
5159 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
5160 argument type information.
5161
51622007-12-03 Nathan Froyd <froydnj@codesourcery.com>
5163
5164 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5165 TREE_THIS_VOLATILE if the associated type is a volatile type.
5166 (lto_materialize_function): Remove call to init_ssa_operands.
5167 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
5168 variable when reading an SSA_NAME. Do the same when reading a
5169 RESULT_DECL, a RETURN_EXPR, or an MTAG.
5170 (input_cfg): Call init_ssa_operands.
5171 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
5172 Move call to init_tree_ssa...
5173 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
5174 add_referenced_var on any variables referenced from the body of the
5175 function. Inform the rest of the compiler we are in SSA form and
5176 inform later passes about the current properties.
5177
51782007-11-30 Nathan Froyd <froydnj@codesourcery.com>
5179
5180 * lto.c (lto_materialize_function): Add FIXME.
5181
51822007-11-29 Nathan Froyd <froydnj@codesourcery.com>
5183
5184 * lto-lang.c (enum built_in_attribute): New enum.
5185 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
5186 built_in_attributes): New variables.
5187 (def_builtin_1): New function.
5188 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
5189
51902007-11-28 Nathan Froyd <froydnj@codesourcery.com>
5191
5192 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
5193 DECL_SOURCE_LOCATION for debugging purposes.
5194 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
5195 bitfield, use the type specified by the DIE for TREE_TYPE and defer
5196 laying out the decl until later.
5197 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
5198 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
5199 TREE_ADDRESSABLE.
5200 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
5201 operand of an ADDR_EXPR.
5202 * lto-lang.c (enum lto_builtin_type): New enum.
5203 (builtin_type): New typedef.
5204 (builtin_types, string_type_node, const_string_type_node,
5205 wint_type_node, intmax_type_node, uintmax_type_node,
5206 signed_size_type_node): New variables.
5207 (def_fn_type, builtin_type_for_size, lto_define_builtins,
5208 lto_build_c_type_nodes): New functions.
5209 (lto_init): Initialize builtin types.
5210 (lto_set_decl_assembler_name): Let the target machine mangle the
5211 name if the decl is TREE_PUBLIC, otherwise uniquify it.
5212
52132007-11-21 Nathan Froyd <froydnj@codesourcery.com>
5214
5215 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
5216 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
5217 the type is a constant type. Set the assembler name and inform
5218 the rest of the compiler about the new decl if the decl is not
5219 public.
5220 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
5221 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
5222 try to read in function bodies for functions that already have bodies.
5223 * lto-symtab.c (lto_same_type_p): Check for unbounded array
5224 equivalency.
5225 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
5226 Check for whether we matched a builtin function type before calling
5227 lto_same_type_p on the generated type. Permit cases where the
5228 declaration of an array is unbounded, but the definition is bounded.
5229 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
5230 DECL_SIZE_UNIT if necessary.
5231
92a44a68 52322007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5233
5234 * lto-read.c (input_expr_operand): Get types right
5235 for COMPLEX_CST.
5236
92a44a68 52372007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5238
5239 * lto-read.c (make_new_block, input_cfg): Properly set
5240 n_basic_blocks.
5241
52422007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5243
5244 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
5245 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
5246
52472007-11-16 Nathan Froyd <froydnj@codesourcery.com>
5248
5249 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
5250 construct the integer type for bitfields.
5251
92a44a68 52522007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5253
5254 * lto-read.c (data_in.current_node_has_loc): Removed.
5255 (input_line_info): Returns true if node needs line set.
5256 (set_line_info): Always sets line if called.
5257 (clear_line_info): Removed reference to current_node_needs_loc.
5258 (input_expr_operand): Keeps track locally if current node needs a loc.
5259 (input_local_var): Added code to handle DECL_INITIAL for
5260 static local vars. Only set loc if necessary.
5261
52622007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5263
5264 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
5265 DECL_CONTEXT.
5266
52672007-11-15 Nathan Froyd <froydnj@codesourcery.com>
5268
5269 * lto.c: Include langhooks.h.
5270 (lto_find_integral_type): Rework logic to handle the case where
5271 got_byte_size is true, but the bitsize requested and that of the
5272 base_type doesn't match.
5273 (lto_read_variable_formal_parameter_constant_DIE): Only check for
5274 asm_name if we are creating a VAR_DECL.
5275 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
5276 definition.
5277 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
5278 function reference and use the builtin's decl if so. Set the
5279 DECL_CONTEXT of the RESULT_DECL for the function.
5280 * lto-lang.c (registered_builtin_fndecls): New variable.
5281 (lto_getdecls): Return it.
5282 (lto_builtin_function): Chain the new decl onto
5283 registered_builtin_fndecls.
5284
92a44a68 52852007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5286
5287 * lto-read.c (process_tree_flags, lto_static_init_local):
5288 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
5289 (input_line_info, clear_line_info): Fixed new line number code.
5290 (input_expr_operand): Added type to SWITCH_EXPR.
5291 (lto_read_body): Properly initialized data_in.
5292 Clear line info when leaving.
5293
52942007-11-13 Diego Novillo <dnovillo@google.com>
5295
5296 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5297 Initialize ARTIFICIAL.
5298 (lto_read_subroutine_type_subprogram_DIE): Initialize
5299 SAVED_SCOPE.
5300 * lto-read.c (set_line_info): Remove ; from calls to
5301 LINEMAP_POSITION_FOR_COLUMN.
5302
92a44a68 53032007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5304
5305 * lto-read.c (input_type_ref): Renamed from get_type_ref.
5306 (input_expr_operand, input_local_var): Renamed get_type_ref to
5307 input_type_ref.
5308 (input_expr_operand): Get the types correct for
5309 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
5310
53112007-11-13 Doug Kwan <dougkwan@google.com>
5312
5313 * lto-read.c (input_widest_uint_uleb128): New function.
5314 (input_tree_flags, process_tree_flags, input_line_info,
5315 input_expr_operand, input_local_var, input_phi, input_ssa_names):
5316 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
5317 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
5318 (lto_static_init_local): Add code to assert that lto_flags_type is
5319 wide enough.
5320
53212007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5322
5323 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
5324 (lto_read_subroutine_type_subprogram_DIE): Handle
5325 DW_AT_static_link and DW_AT_specification. Return the
5326 specification if present.
5327 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
5328
53292007-11-13 Nathan Froyd <froydnj@codesourcery.com>
5330
5331 * lto-lang.c: Include target.h.
5332 (registered_builtin_types): New variable.
5333 (lto_type_for_mode): Increase number of modes handled.
5334 (lto_builtin_function): Fix argument list and return the decl.
5335 (lto_register_builtin_type): New function.
5336 (lto_init): Initialize target builtins and language-independent
5337 nodes.
5338 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
5339
92a44a68 53402007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5341
5342 * lto-read.c (input_expr_operand): Added code to properly handle
5343 index filed. Added new RANGE_EXPR case.
5344
92a44a68 53452007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5346
5347 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
5348 (data_in): Added current_node_has_loc field.
5349 (input_line_info, set_line_info, clear_line_info): Added a support
5350 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
5351 did not have on on the source side.
5352 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
5353 numbers too.
5354
53552007-11-09 Doug Kwan <dougkwan@google.com>
5356
5357 * lto-read.c (input_expr_operand): Change type of operand 2 of
5358 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
5359
53602007-11-09 Nathan Froyd <froydnj@codesourcery.com>
5361
5362 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
5363 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
5364 from a DW_AT_specification or DW_AT_abstract_origin attribute to
5365 the new decl we are creating. Move informing the middle end about
5366 the new decl to...
5367 (lto_main): ...here. Inform the middle end about global variables
5368 after we have read in all the input files.
5369 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
5370 variables with internal linkage, so delete the check for internal
5371 linkage. Combine TREE_PUBLIC flags.
5372
53732007-11-08 Nathan Froyd <froydnj@codesourcery.com>
5374
5375 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5376 DW_AT_decl_line.
5377 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
5378 builtin specially. Move check for attribute compatibility
5379 earlier.
5380
53812007-11-07 Nathan Froyd <froydnj@codesourcery.com>
5382
5383 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
5384 * config-lang.in (gtfiles): Add lto.h and lto.c.
5385 * lto-elf.c: Include ggc.h.
5386 (lto_elf_file_open): Allocate elf_file from GC memory.
5387 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
5388 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
5389 in GC memory.
5390 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
5391 (lto_file_close): Free file from GC memory.
5392 (lto_cache_store_DIE): Allocate the new entry in GC memory.
5393 (lto_read_member_DIE): Fix declaration.
5394 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
5395 in GC memory.
5396 (current_lto_file): New variable.
5397 (lto_main): Use it.
5398 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
5399 lto_die_cache_entry): Move to...
5400 * lto.h: ...here and add GTY markers as appropriate. Delete forward
5401 declarations accordingly.
5402 (struct lto_file_struct): Declare.
5403 (lto_file_vtable): Use it instead of lto_file.
5404
54052007-11-06 Alon Dayan <alond@il.ibm.com>
92a44a68 5406 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5407
5408 * lto-read.c (process_flags, lto_static_init_local):
5409 read flags of VAR_DECL and FUNCTION_DECL of size>1.
5410 change global array num_flags_for_code to flags_length_for_code.
5411 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
5412
54132007-11-05 Nathan Froyd <froydnj@codesourcery.com>
5414
5415 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
5416 layout functions to compute information about the newly constructed
5417 type.
5418
54192007-11-02 Nathan Froyd <froydnj@codesourcery.com>
5420
5421 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
5422 case to use DECL_RESULT if necessary.
5423
92a44a68 54242007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5425
5426 * lto-read.c (input_tree_list): Removed.
5427 (input_tree_flags): Added parameter to force flags no matter what
5428 tree code.
5429 (input_expr_operand): Added parameter to input_tree_flags.
5430 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
5431 input_expr_operand rather than input_tree_lists.
5432 (input_local_var): Use input_expr_operand to read attributes
5433 rather then input_tree_list.
5434 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5435
54362007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5437
5438 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5439 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5440 TYPE_DECL for it.
5441 * lto-read.c (lto_read_body): Use correct sizes for calculating
5442 type_decls_offset and types_offset.
5443
54442007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5445
5446 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5447 with GENERIC_NEXT.
5448 * config-lang.in (gtfiles): Add lto-lang.c.
5449 * lto-lang.c: Include gt-lto-lto-lang.h.
5450 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5451 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5452 (lto/lto-read.o): Likewise.
5453
92a44a68 54542007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5455
5456 * lto-read.c (data_in): Added type_decls and current_col fields.
5457 (string_slot): New type to hold canonized file name.
5458 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5459 input_line_info, set_line_info, clear_line_info): New functions.
5460 (file_name_hash_table): New hash table.
5461 (input_local_var, input_labels, input_local_vars_index,
5462 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5463 (input_uleb128): Changed type of byte var.
5464 (input_expr_operand): Large number of changes to get line numbers
5465 correct. Added TYPE_DECL case.
5466 (input_globals): Added code to get TYPE_DECLs processed.
5467 (input_local_var): Added code to process line numbers and
5468 TREE_CHAIN and DECL_CONTEXT.
5469 (input_function, input_constructor): Added call to
5470 clear_line_number.
5471 (lto_static_init_local): Added code to get line numbers correct.
5472 (lto_read_body): Added code to get TYPE_DECLS read and to change
5473 parameters to the calls above that had their parms reorganized.
5474
5475
54762007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5477
5478 * lto.h (lto_resolve_typedecl_ref): Declare.
5479 * lto.c (lto_resolve_typedecl_ref): New function.
5480
54812007-10-29 Mark Mitchell <mark@codesourcery.com>
5482 Nathan Froyd <froydnj@codesourcery.com>
5483
5484 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5485 DIEs even if we find an abstract origin for this DIE.
5486
54872007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5488
5489 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5490 RESULT_DECL slightly earlier. Only remember the decl for later
5491 if we successfully merge declarations.
5492
92a44a68 54932007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5494
5495 * lto-read.c (input_expr_operand): Give label_values the proper
5496 context and provide switch statements with a default type.
5497
54982007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5499
5500 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5501 * lto.c (lto_materialize_function): ...to here.
5502
55032007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5504
5505 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5506 * lto.c (lto_info_fd_init): Initialize it.
5507 (lto_info_fd_close): Free it.
5508 (lto_materialize_function): New function.
5509 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5510 unmaterialized_fndecls.
5511 (lto_file_read): Read in all the function bodies after we have read
5512 all of the DWARF info.
5513 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5514 reading a function body.
5515
92a44a68 55162007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5517
5518 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5519 semetric with output_tree_flags. Added call to log flags.
5520 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5521 type issues to make everything consistent with flags being
5522 unsigned HOST_WIDE_INTS.
5523 (input_expr_operand): Added call to
5524 recompute_tree_invariant_for_addr_expr.
5525 (input_local_var): Added debugging for tree_chains. Now calls
5526 input_tree_flags.
5527 (input_phi): Made flags unsigned HOST_WIDE_INT.
5528 (input_ssa_names): Now calls input_tree_flags.
5529 (lto_read_body): Now sets cfun.
5530 (lto_read_function_body): Now sets current_function_pointer.
5531
55322007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5533
5534 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5535 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5536 inspecting fields within.
5537 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5538 handle this appropriately.
5539
55402007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5541
5542 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5543 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5544 both DW_AT_abstract_origin and DW_AT_specification.
5545 (lto_read_subroutine_type_subprogram_DIE): Handle
5546 DW_AT_abstract_origin.
5547 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5548 (lto_read_DIE_at_ptr): Define as static to match declaration.
5549 Lookup the PTR in the cache before reading it from the file.
5550 (lto_resolve_var_ref): Adjust accordingly.
5551 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5552 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5553
55542007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5555
5556 * lto.c (lto_read_DIE_at_ptr): New function.
5557 (lto_resolve_var_ref): Use it.
5558 (lto_resolve_fn_ref): Use it.
5559 (lto_resolve_field_ref): Use it.
5560 (lto_read_variable_formal_parameter_constant_DIE): Follow
5561 DW_AT_specification and return the associated decl when appropriate.
5562
55632007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5564
5565 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5566 Implement for scalar integer modes.
5567 (lto_init): Initialize size_type_node.
5568
92a44a68 55692007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5570
5571 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5572 (input_local_var): Add chaining for params.
5573 (input_ssa_names): Add cfun parameter.
5574 (input_function): Remove unnecessary else.
5575
55762007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5577
5578 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5579 (lto_resolve_var_ref): Use proper types.
5580 (lto_resolve_fn_ref): Likewise.
5581 (lto_resolve_field_ref): Likewise.
5582
55832007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5584
5585 * lto-read.c (input_expr_operand): Remove case.
5586
55872007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5588
5589 * lto.c (lto_read_only_for_child_DIEs): New function.
5590 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5591 * lto-elf.c (lto_elf_map_lto_section): Remove.
5592 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5593 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5594 SSA_NAME. Add missing case for mechanical codes.
5595 (input_cfg): Use basic_block_info_for_function instead of
5596 basic_block_info.
5597
92a44a68 55982007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5599
5600 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5601 (input_list): Renamed input_tree_list and modified to follow same
5602 protocol as lto-function-out.c:output_tree_list.
5603 (input_expr_operand): Make asm operands use input_tree_list.
5604 (input_local_var): Now uses input_tree_list.
5605 (lto_read_body): Change placement for setting context of debug_labels.
5606
5607
92a44a68 56082007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5609
5610 * lto-read.c (input_real): Output debugging in proper order.
5611 (input_integer): Compute bit lengths properly.
5612 (input_list): Clean up declaration.
5613 (input_expr_operand): Change calls to input_real to match fix.
5614 Make reading of LTO_bit_field_ref1 match output.
5615 (input_local_var): Make reading of attributes match what is being
5616 written.
5617 (dump_debug_stream): Also print char in hex.
5618 (debug_out_fun): Fix signed unsigned mismatch.
5619
56202007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5621
5622 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5623 DW_AT_GNU_vector specially, as they are not contiguous with the
5624 specified set of attribute names. Use class_mask to check for
5625 errors at the end of the function
5626 (lto_resolve_var_ref): Read the DIE if it is not cached.
5627 (lto_resolve_fn_ref): Likewise.
5628 (lto_resolve_field_ref): Likewise.
5629
56302007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5631
5632 * lto.c: Include dwarf2out.h.
5633 (lto_cache_store_DIE): Assert that we never change the value.
5634 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5635 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5636 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5637 sensible type instead.
5638 (lto_read_structure_union_class_type_DIE): Store the newly
5639 created type prior to reading the members of the structure to
5640 avoid infinite recursion. Avoid computing types and alignments
5641 for structures whose sizes are unknown.
5642 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5643 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5644 DW_AT_const_value, and DW_AT_specification.
5645 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5646 Return early if we have already constructed the function type.
5647 (lto_read_typedef_DIE): Check to see if the type has been cached
5648 already. Cache the type before reading any children.
5649 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5650 (lto_read_DIE): Unset context->skip_non_parameters around reading
5651 the DIE.
5652 (lto_resolve_fn_ref): Delete trailing whitespace.
5653
92a44a68 56542007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5655
5656 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5657
56582007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5659
5660 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5661
56622007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5663
5664 * lto-lang.c (signed_and_unsigned_types): New variable.
5665 (lto_type_for_size): Consult signed_and_unsigned_types to find
5666 an approprite type, creating it if necessary.
5667 (lto_set_decl_assembler_name): Add actual method body.
5668
56692007-09-06 Jim Blandy <jimb@codesourcery.com>
5670
5671 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5672 can't find a var init for this variable, leave its DECL_INITIAL.
5673 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5674 lto_elf_map_fn_body.
5675 (lto_map_lto_section): New function.
5676 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5677 bodies, and lto_elf_map_optional_lto_section for variable
5678 initializers.
5679 (lto_elf_find_section_data): Quietly return NULL if the section is
5680 missing.
5681 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5682
5683 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5684
5685 * lto-read.c (lto_read_body): Doc fix.
5686
92a44a68 56872007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5688
5689 * lto-read.c (fun_in): Renamed to data_in.
5690 (input_expr_operand, input_local_var, input_string_internal,
5691 input_string, input_real, input_list, get_label_decl,
5692 get_type_ref, input_expr_operand, input_globals, input_labels,
5693 input_local_vars_index, input_local_var, input_local_vars,
5694 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5695 (input_constructor): New function.
5696 (lto_read_function_body): Renamed to lto_read_body and generalized
5697 to handle both functions and constructors.
5698 (lto_read_function_body, lto_read_var_init): New function.
5699
5700
92a44a68 57012007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5702
5703 * lto-read.c (input_expr_operand): Assert that there really is a
5704 FUNCTION_DECL.
5705 (input_globals): Removed checks on 0 section.
5706
92a44a68 57072007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5708
5709 * lto-read.c (fun_in): Added local_decls_index and
5710 local_decls_index_d.
5711 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5712 (input_globals): Enabled code to handle FIELD_DECLs.
5713 (input_local_vars_index, input_local_vars): New function.
5714 (input_local_var): Changed to allow locals to be input randomly.
5715 (lto_read_function_body): Added code to input the
5716 local_decls_index and to free various structures.
5717
57182007-08-17 Jim Blandy <jimb@codesourcery.com>
5719
5720 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5721 ATTRIBUTE_UNUSED from 'die' formal.
5722
5723 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5724 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5725 (input_list): Fix type of 'tag'.
5726 (input_expr_operand): Fix type of 'tag' argument. Update
5727 declaration. Fix type of 'ctag'. Add default case to switch,
5728 since the type of the switched value is now an enum.
5729 (input_local_vars): Fix type of 'tag'.
5730 (input_bb): Fix type of 'tag' argument.
5731 (input_function): Fix type of 'tag' argument.
5732
57332007-08-16 Jim Blandy <jimb@codesourcery.com>
5734
5735 * lto.c (lto_read_member_DIE): Record the tree we create in
5736 fd->die_cache. (Our 'die' argument is no longer unused.)
5737 (lto_resolve_field_ref): New function.
5738 * lto.h (lto_resolve_field_ref): New declaration.
5739
57402007-08-15 Jim Blandy <jimb@codesourcery.com>
5741
5742 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5743
57442007-08-07 Jim Blandy <jimb@codesourcery.com>
5745
5746 * lto.c (lto_read_form): Complete attr_classes table.
5747 (DWARF2_form_data): Doc fix.
5748
57492007-08-05 Mark Mitchell <mark@codesourcery.com>
5750
5751 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5752 and unmap_var_init.
5753 (lto_read_var_init): Declare.
5754 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5755 interface for reading variable initializers.
5756 * lto-elf.c (lto_elf_read_var_init): Remove.
5757 (lto_elf_file_vtable): Update initializer.
5758 (lto_elf_read_var_init): Add comment about unused-ness.
5759 * lto-read.c (lto_read_var_init): New.
5760
5761 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5762
92a44a68 57632007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5764
5765 * lto-read.c (lto_read_function_body): Moved declaration of fn
5766 outside of ifdef.
5767
92a44a68 57682007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5769
5770 * lto-read.c (input_uleb128, input_string_internal, input_real,
5771 input_integer, input_record_start, input_list, get_type_ref,
5772 input_flags, input_expr_operand, input_expr_operand,
5773 input_expr_operand, input_local_vars, input_cfg, input_phi,
5774 input_ssa_names, input_bb, input_function): Added semicolons.
5775
5776
92a44a68 57772007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5778
5779 * lto-read.c (input_globals): Remove debugging.
5780 (input_function): Set DECL_ARGUMENTS.
5781
92a44a68 57822007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5783
5784 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5785 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5786 (input_phi): Made work with operands other than SSA_NAMES and
5787 fixed processing of flags.
5788 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5789 (input_flags): New function.
5790 * lto-lang.c (lto_init): Changed state of in_lto_p.
5791
5792
57932007-07-24 Mark Mitchell <mark@codesourcery.com>
5794
5795 * lto-tree.h (lto_varargs_cookie): Remove.
5796 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5797 skip_non_parameters, skip_parameters.
5798 (lto_varargs_cookie): Remove.
5799 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5800 parameter types.
5801 (lto_read_abbrev): New function.
5802 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5803 child DIEs.
5804 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5805 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5806 (lto_file_read): Initialize new context fields.
5807 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5808 (lto_unsigned_type): Remove.
5809 (lto_signed_type): Likewise.
5810 (lto_signed_or_unsigned_type): Likewise.
5811 (lto_init): Do not create lto_varargs_cookie.
5812 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5813 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5814 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5815
58162007-07-19 Jan Hubicka <jh@suse.cz>
5817
5818 * lto-read.c (lto_read_function_body): Produce empty scope block
5819 to avoid crash.
5820
58212007-07-18 Mark Mitchell <mark@codesourcery.com>
5822
5823 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5824 process local variables.
5825 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5826
92a44a68 58272007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5828
5829 * lto-read.c (input_list, input_expr_operand): Added struct
5830 function parameter.
5831 (init_cfg, finalize_cfg): Removed function.
5832 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5833 (input_labels, input_local_vars): Now takes input_block parameter rather than
5834 synthsyzing it.
5835 (input_cfg, input_phi, input_ssa_names): New functions.
5836 (input_bb): Now passes in input_blocks. Does not construct cfg
5837 and processes the list of phi functions.
5838 (input_function): Now builds both the cfg and ssa_names table.
5839 (lto_read_function_body): Processes new header fields to construct
5840 streams for the ssa_names and cfg and their debugging.
5841 * lto/lto-lang.c (lto_init): Set in_lto_p.
5842
5843
58442007-06-28 Mark Mitchell <mark@codesourcery.com>
5845
5846 * lto.h (lto_file_vtable): Add read_var_init.
5847 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5848 initializers.
5849 (lto_main): Remove bogus asserts.
5850 * lto-elf.c (tm.h): Include it.
5851 (libiberty.y): Likewise.
5852 (lto_elf_file): Add strtab and symtab. Rename
5853 string_table_section_index to sec_strtab.
5854 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5855 (lto_elf_get_shdr): New function.
5856 (lto_elf_free_shdr): Likewise.
5857 (lto_elf_find_section_data): Use them.
5858 (lto_elf_read_symtab): New function.
5859 (lto_elf_lookup_sym): Likewise.
5860 (lto_elf_free_sym): Likewise.
5861 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5862 (lto_elf_built_init): New function.
5863 (lto_elf_read_var_init): Likewise.
5864 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5865
92a44a68 58662007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5867
5868 * lto-read (make_new_block): Initialize the stmt_list.
5869 (lto_static_init_local): Add debugging for missing codes.
5870
58712007-06-26 Mark Mitchell <mark@codesourcery.com>
5872
5873 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5874 unprototyped functions.
5875
58762007-06-23 Mark Mitchell <mark@codesourcery.com>
5877
5878 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5879 Handle DW_AT_MIPS_linkage_name.
5880 (lto_read_subroutine_type_subprogram): Likewise. Correct
5881 compilation errors.
5882 (lto_main): Remove incorrect assertions.
5883 * lto-symbtab.c: Build function types out of TREE_LISTs.
5884
5885 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5886
5887 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5888
92a44a68 58892007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
7bfefa9d 5890
5891 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5892 dummy since ggc does not like empty structs.
5893 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5894 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5895 expr->common to expr->base.
5896 (make_new_block): Moved stmt_list to proper place.
5897
5898
58992007-03-14 Robert Kennedy <jimbob@google.com>
5900
5901 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5902 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5903 assembler name from DWARF.
5904 * lto-lang.c (lto_set_decl_assembler_name) New function.
5905
59062006-09-10 Mark Mitchell <mark@codesourcery.com>
5907
5908 * lto.h (lto_file_vtable): New structure.
5909 (lto_file): Add vtable pointer.
5910 (lto_file_init): Add vtable paramter.
5911 (lto_read_function_body): New function.
5912 (lto_symtab_merge_fn): New function.
5913 * lto.c (lto_file_init): Add vtable parameter.
5914 (lto_read_form): Fill in entries for DW_AT_prototyped,
5915 DW_AT_frame_base.
5916 (lto_read_subroutine_type_subprogram_DIE): New function.
5917 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5918 DW_TAG_subprogram.
5919 * lto-elf.c (lto_elf_vile_vtable): New variable.
5920 (lto_elf_file_open): Pass it to lto_file_init.
5921 (lto_elf_map_fn_body): New function.
5922 (lto_elf_unmap_fn_body): Likewise.
5923 * lto-read.c: New file.
5924 * lto-symtab.c (lto_symtab_merge_fn): New function.
5925 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5926 tree_rest_of_compilation.
5927 * Make-lang.in (LTO_OBJS): Add lto-read.o
5928 (lto-read.o): New target.
5929
59302006-09-03 Mark Mitchell <mark@codesourcery.com>
5931
5932 * lto.c (<inttypes.h>): Don't include it.
5933 (lto_context): Don't typedef it.
5934 (lto_resolve_reference): New function.
5935 (lto_read_form): Use it.
5936 (lto_resolve_type_ref): New function.
5937 (lto_resolve_var_ref): Likewise.
5938 (lto_resolve_fn_ref): Likewise.
5939 * lto.h (<inttypes.h>): Include it.
5940 (lto_context): New type.
5941 (lto_ref): New structure.
5942 (lto_resolve_type_ref): Declare.
5943 (lto_resolve_var_ref): Likewise.
5944 (lto_resolve_fn_ref): Likewise.
5945
59462006-08-18 Mark Mitchell <mark@codesourcery.com>
5947
5948 * lang-specs.h: New file.
5949
59502006-08-14 Mark Mitchell <mark@codesourcery.com>
5951
5952 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5953 (lto_info_fd_close): Deallocate it.
5954 (lto_die_cache_entry): New structure.
5955 (lto_cache_hash): New function.
5956 (lto_cache_eq): Likewise.
5957 (lto_cache_store_DIE): Likewise.
5958 (lto_cache_lookup_DIE): Likewise.
5959 (lto_read_referenced_type_DIE): Use the cache.
5960 (lto_read_pointer_type_DIE): Robustify.
5961 (lto_read_DIE): Use the cache.
5962 * lto.h (hashtab.h): Include.
5963 (lto_info_fd): Add DIE cache.
5964 * Make-lang.in (LTO_H): New variable.
5965 (lto/lto-lang.o): Use LTO_H.
5966 (lto/lto-elf.o): Likewise.
5967 (lto/lto-symtab.o): Likewise.
5968
59692006-07-09 Mark Mitchell <mark@codesourcery.com>
5970
5971 * lto.c (lto_abi_mismatch_error): New function.
5972 (lto_abbrev_read): Initialize num_abbrevs.
5973 (lto_read_form): Specify allowed form classes for
5974 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5975 (lto_read_variable_formal_parameter_constant_DIE): Handle
5976 DW_AT_declaration. Call lto_symtab_merge_var.
5977 (lto_read_pointer_type_DIE): New function.
5978 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5979 not creat TYPE_DECLs for types that already have them.
5980 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5981 (lto_set_cu_context): Make cu_start point to the header, not the
5982 first DIE.
5983 (lto_file_read): Adjust for change to lto_set_cu_context.
5984 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5985 (lto/lto-symtab.o): New rule.
5986 * lto-tree.h (lang_identifier): Add decl field.
5987 (LANG_IDENTIFIER_CAST): New macro.
5988 (LTO_IDENTIFIER_DECL): Likewise.
5989 (lto_symtab_merge_var): Declare.
5990 * lto-symtab.c: New file.
5991
59922006-07-02 Daniel Berlin <dberlin@dberlin.org>
5993
5994 * lto.c (lto_context): Add current_cu and info_fd members.
5995 (DWARF2_CompUnit): New structure.
5996 (lto_read_DIE): Take lto_info_fd *.
5997 (lto_read_child_DIEs): Ditto.
5998 (lto_file_corrupt_error): Constify argument.
5999 (lto_set_cu_context): New function
6000 (lto_info_fd_init): Ditto.
6001 (lto_info_fd_close): Ditto.
6002 (lto_file_init): Use lto_info_fd_init.
6003 (lto_file_close): Use lto_info_fd_close.
6004 (lto_read_initial_length): Pass in pointer to header size.
6005 (lto_read_comp_unit_header): Correct cu_length to
6006 real length from beginning of header. Take lto_info_fd * as
6007 argument.
6008 (find_cu_for_offset): New function.
6009 (lto_read_form): Change first argument to lto_info_fd *.
6010 Add FORM_CONTEXT argument.
6011 Handle DW_FORM_ref_addr.
6012 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
6013 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
6014 Swap contexts if necessary for form.
6015 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
6016 lto_file_corrupt_error.
6017 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
6018 (lto_read_referenced_type_DIE): Change first argument to
6019 lto_info_fd *. Access lto_fd fields through base pointer.
6020 (lto_read_compile_unit_DIE): Change first argument to an
6021 lto_info_fd *.
6022 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
6023 (lto_read_base_type_DIE): Ditto.
6024 (lto_read_child_DIEs): Ditto.
6025 (lto_read_DIE): Ditto. Change type of function pointer.
6026 (lto_info_read): New function.
6027 (lto_set_cu_context): Ditto.
6028 (lto_file_read): Use lto_info_read, walk resulting CU's
6029 (lto_main): Update for lto_info_fd change.
6030 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
6031 necessary.
6032 * lto.h (DWARF2_CompUnit): New structure.
6033 (lto_info_fd): Ditto.
6034 (lto_file): Change debug_info to be an lto_info_fd.
6035
60362006-06-25 Mark Mitchell <mark@codesourcery.com>
6037
6038 * lto.c (toplev.h): Include it.
6039 (dwarf2.h): Likewise.
6040 (tree.h): Likewise.
6041 (tm.h): Likewise.
6042 (cgraph.h): Likewise.
6043 (ggc.h): Likewise.
6044 (inttypes.h): Likewise.
6045 (DWARF2_attr): New type.
6046 (DWARF2_abbrev): Likewise.
6047 (DWARF2_class): Likewise.
6048 (DWARF2_form_data): Likewise.
6049 (lto_context): Likewise.
6050 (lto_fd_init): New function.
6051 (lto_abbrev_fd_init): Likewise.
6052 (lto_abbrev_fd_close): Likewise.
6053 (lto_file_init): Use them.
6054 (lto_file_close): New function.
6055 (lto_file_corrupt_error): Likewise.
6056 (LTO_CHECK_INT_VAL): New macro.
6057 (lto_check_size_t_val): New function.
6058 (lto_check_int_val): Likewise.
6059 (LTO_READ_TYPE): New macro.
6060 (lto_read_ubyte): New function.
6061 (lto_read_uhalf): Likewise.
6062 (lto_read_uword): Likewise.
6063 (lto_read_uleb128): Likewise.
6064 (lto_read_initial_length): Likewise.
6065 (lto_abbrev_read_attrs): Likewise.
6066 (lto_abbrev_read): Likewise.
6067 (lto_abbrev_lookup): Likewise.
6068 (lto_read_section_offset): Likewise.
6069 (lto_read_comp_unit_header): Likewise.
6070 (lto_read_form): Likewise.
6071 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
6072 (LTO_BEGIN_READ_ATTRS): Likewise.
6073 (LTO_END_READ_ATTRS): Likewise.
6074 (lto_unsupported_attr_error): New function.
6075 (lto_get_identifier): Likewise.
6076 (lto_read_referenced_type_DIE): Likewise.
6077 (lto_read_compile_unit_DIE): Likewise.
6078 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
6079 (lto_read_base_type_DIE): Likewise.
6080 (lto_read_DIE): Likewise.
6081 (lto_read_child_DIEs): Likewise.
6082 (lto_file_read): Read DIEs.
6083 (lto_main): Ask middle end to emit entities.
6084 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
6085 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
6086 (lto_elf_file_close): Likewise.
6087 * lto.h (lto_file): Declare.
6088 (DWARF2_abbrev): Likewise.
6089 (lto_fd): New type.
6090 (lto_abbrev_fd): Likewise.
6091 (lto_file): Use new types.
6092 (lto_file_close): Declare.
6093 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
6094
60952006-06-18 Mark Mitchell <mark@codesourcery.com>
6096
6097 * lto.h: New file.
6098 * lto.c: New file.
6099 * lto-elf.c: New file.
6100 * lto-lang.c (flags.h): Include it.
6101 (lto.h): Likewise.
6102 (lto_init): New function.
6103 (lto_write_globals): Remove.
6104 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
6105 (LANG_HOOKS_INIT): Define.
6106 (LANG_HOOKS_PARSE_FILE): Likewise.
6107 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
6108 (LTO_EXE): Link with libelf.
6109 (lto/lto-lang.o): Update dependencies.
6110 (lto/lto.o): New target.
6111 (lto/lto-elf.o): Likewise.
6112
61132006-06-12 Mark Mitchell <mark@codesourcery.com>
6114
6115 * config-lang.in: New file.
6116 * Make-lang.in: Likewise.
6117 * lto-tree.h: Likewise.
6118 * lto-lang.c: Likewise.
f1717362 6119\f
fbd26352 6120Copyright (C) 2006-2019 Free Software Foundation, Inc.
7bfefa9d 6121
f1717362 6122Copying and distribution of this file, with or without modification,
6123are permitted in any medium without royalty provided the copyright
6124notice and this notice are preserved.