]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
re PR go/78628 (GO fails to build a translation unit decl)
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
1ea85365
RB
12017-08-21 Richard Biener <rguenther@suse.de>
2
3 * lto.c (unify_scc): Truncate DIE reference queue for dropped SCCs.
4 (lto_read_decls): Process TRANSLATION_UNIT_DECLs. Remove
5 TYPE_DECL debug processing, register DIE references from
6 prevailing SCCs with the debug machinery.
7 (lto_section_with_id): Handle LTO debug sections.
8
8e093270
NS
92017-08-16 Nathan Sidwell <nathan@acm.org>
10
11 * lto.c (mentions_vars_p_type): Use TYPE_LANG_SLOT_1.
12 (compare_tree_sccs_1): No need to compare TYPE_BINFO directly.
13 (lto_fixup_prevailing_decls): Use TYPE_LANG_SLOT_1.
14
eac3ab4a
TV
152017-08-08 Tom de Vries <tom@codesourcery.com>
16
17 * lto.c: Include attribs.h.
18
314e6352
ML
192017-08-08 Martin Liska <mliska@suse.cz>
20
21 * lto-lang.c: Include header files.
22 * lto-symtab.c: Likewise.
23
63e434ca
RB
242017-08-03 Richard Biener <rguenther@suse.de>
25
26 * lto-symtab.h (lto_symtab_prevail_decl): Do not use
27 DECL_ABSTRACT_ORIGIN as flag we can end up using that. Instead
28 use DECL_LANG_FLAG_0.
29 (lto_symtab_prevail_decl): Likewise.
30
417ca011
TD
312017-07-07 Torsten Duwe <duwe@suse.de>
32
33 * lto-lang.c (lto_attribute_table): Add entry for
34 "patchable_function_entry".
35
20deef65
NS
362017-07-19 Nathan Sidwell <nathan@acm.org>
37
38 * lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
39 (compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.
40
0eaf0bfe
JH
412017-07-06 Jan Hubicka <hubicka@ucw.cz>
42
43 * lto-partition.c (lto_balanced_map): Do not check
44 flag_toplevel_reorder.
2db9b7cd 45
0eaf0bfe 462017-06-23 Marc Glisse <marc.glisse@inria.fr>
2db9b7cd
MG
47 * lto-lang.c (lto_init): Use builtin_structptr_types.
48
d1eed638
JH
492017-06-15 Jan Hubicka <hubicka@ucw.cz>
50 Thomas Preud'homme <thomas.preudhomme@arm.com>
51
52 PR lto/69866
53 * lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
54 that resolved externally.
55
d2db2e6b
JH
562017-05-23 Jan Hubicka <hubicka@ucw.cz>
57
58 * lto.c (do_whole_program_analysis): Replace inline_free_summary
59 by ipa_free_fn_summary.
60
464d0118
ML
612017-05-23 Martin Liska <mliska@suse.cz>
62
63 * lto-symtab.c (lto_cgraph_replace_node): Use
64 symtab_node::dump_{asm_,}name functions.
65 * lto.c (read_cgraph_and_symbols): Likewise.
66 (do_whole_program_analysis): Likewise.
67
6c52831d
ML
682017-05-23 Martin Liska <mliska@suse.cz>
69
70 * lto.c (read_cgraph_and_symbols): Use the renamed function.
71 (do_whole_program_analysis): Use the renamed function.
72
27d020cf
JH
732017-05-22 Jan Hubicka <hubicka@ucw.cz>
74
75 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
76 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
77
815d9cc6
XR
782017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
79
80 PR c++/80038
81 * lto-lang.c (lto_init): Set in_lto_p earlier.
82
350792ff
RB
832017-04-12 Richard Biener <rguenther@suse.de>
84 Bernd Edlinger <bernd.edlinger@hotmail.de>
85
86 PR middle-end/79671
87 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
88
4a44a5f3
ML
892017-02-14 Martin Liska <mliska@suse.cz>
90
91 * lto.c (do_stream_out): Free LTO file filename string.
92
8a3a6ab4
DM
932017-01-19 David Malcolm <dmalcolm@redhat.com>
94
95 * lto-lang.c (builtin_type_for_size): Convert call to
96 lto_type_for_size to one through the langhook.
97 (lto_type_for_size): Move to langhooks.c and rename to
98 lhd_type_for_size.
99 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
100
4c4b4703
JJ
1012017-01-11 Jakub Jelinek <jakub@redhat.com>
102
103 PR middle-end/50199
104 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
105 if it was 0.
106
bd2c6270
JJ
1072017-01-09 Jakub Jelinek <jakub@redhat.com>
108
109 PR translation/79019
110 PR translation/79020
111 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
112
24d3f325
NS
1132017-01-06 Nathan Sidwell <nathan@acm.org>
114
5406184c
NS
115 * lto-partition.c (promote_symbol): Write to dump file sooner,
116 include alias promoting too.
117
24d3f325
NS
118 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
119 (may_need_named_section_p): Likewise.
120 (rename_statics): Likewise.
121 (lto_promote_cross_file_statics): Likewise.
122
cbe34bb5
JJ
1232017-01-01 Jakub Jelinek <jakub@redhat.com>
124
125 Update copyright years.
126
6c8bf066
GJL
1272016-11-30 Georg-Johann Lay <avr@gjlay.de>
128
129 PR lto/78562
130 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
131 mismatch if the two types are built-in.
132
7fa6a965
PK
1332016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
134
135 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
136
efb71232
RB
1372016-11-23 Richard Biener <rguenther@suse.de>
138
139 PR lto/78472
140 * lto.c (hash_canonical_type): Ignore zero-sized fields.
141
48330c93
BE
1422016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
143
144 PR c++/71973
145 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
146
899ca90e 1472016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
148 Alan Hayward <alan.hayward@arm.com>
149 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
150
151 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
152
65179585
RB
1532016-10-31 Richard Biener <rguenther@suse.de>
154
155 PR lto/78129
156 * lto.c (do_whole_program_analysis): Bail out after errors
157 from WPA analysis.
158
8bc5448f
KV
1592016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
160
161 * lto-partition.c: Include tree-vrp.h.
162 * lto.c: Likewise.
163
68317985
RB
1642016-09-20 Richard Biener <rguenther@suse.de>
165
166 * lto.c (lto_main): Call early_finish with "<artificial>" as
167 filename.
168
321e76fb
RB
1692016-09-19 Richard Biener <rguenther@suse.de>
170
171 * lto.c (lto_main): Invoke early_finish debug hook.
172
ea6e17d5
RB
1732016-07-25 Richard Biener <rguenther@suse.de>
174
175 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
176 (unify_scc): Likewise.
177 (lto_read_decls): Likewise.
178
e9ac1f86
JJ
1792016-06-28 Jakub Jelinek <jakub@redhat.com>
180
181 * Make-lang.in: Don't cat ../stage_current if it does not exist.
182
277d7ee0
AK
1832016-06-23 Andi Kleen <ak@linux.intel.com>
184
185 * Make-lang.in: Add support for autofdo (disabled for now)
186
4d926e34
MS
1872016-06-10 Martin Sebor <msebor@redhat.com>
188
189 PR c/71392
190 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
191 attribute in type-generic builtins.
192
479f99c9
JH
1932016-05-16 Jan Hubicka <hubicka@ucw.cz>
194
195 * lto-partition.c (add_symbol_to_partition_1): Likewise.
196
1a0bf5e1
JH
1972016-05-03 Jan Hubicka <hubicka@ucw.cz>
198
199 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
200
a2e76867
PK
2012016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
202
203 * lto-partition.h (lto_balanced_map): New parameter.
204 * lto-partition.c (lto_balanced_map): New parameter
205 max_partition_size.
206 Check if partition size is greater than max_partition_size.
207 * lto.c (do_whole_program_analysis): Adjust calls to
208 lto_balanced_map() to pass 2nd argument.
209
ea913779
L
2102016-03-17 H.J. Lu <hongjiu.lu@intel.com>
211
212 PR lto/70258
213 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
214 PIE.
215
56aae4b7
JJ
2162016-03-08 Jakub Jelinek <jakub@redhat.com>
217
218 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
219 - becuase -> because.
220
ed5d948d
TV
2212016-02-15 Tom de Vries <tom@codesourcery.com>
222
223 PR lto/69655
224 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
225 argument.
226
4ecbadc7
ML
2272016-01-27 Martin Liska <mliska@suse.cz>
228
229 * lto-partition.c (add_symbol_to_partition_1): Remove usage
230 of hsa_summaries.
231
e49d321f
JH
2322016-01-19 Jan Hubicka <hubicka@ucw.cz>
233
234 PR lto/69136
235 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
236 decls have no assemblernames.
237
b2b40051
MJ
2382016-01-19 Martin Liska <mliska@suse.cz>
239 Martin Jambor <mjambor@suse.cz>
240
241 * lto-partition.c: Include "hsa.h"
242 (add_symbol_to_partition_1): Put hsa implementations into the
243 same partition as host implementations.
244
5803bd01
JH
2452016-01-12 Jan Hubicka <hubicka@ucw.cz>
246
247 PR lto/69003
248 * lto-partition.c (rename_statics): Fix pasto.
249
13092f61
RB
2502016-01-18 Richard Biener <rguenther@suse.de>
251
252 PR lto/69337
253 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
254 function vs. variable.
255
3c4e91c9
RB
2562016-01-12 Richard Biener <rguenther@suse.de>
257
258 PR lto/69077
259 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
260 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
261
818ab71a
JJ
2622016-01-04 Jakub Jelinek <jakub@redhat.com>
263
264 Update copyright years.
265
3fddb2ef
JH
2662015-12-10 Jan Hubicka <hubicka@ucw.cz>
267
268 PR lto/68878
269 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
270 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
271 (lto_symtab_prevailing_decl): Use it.
272
4a38b02b
IV
2732015-12-15 Ilya Verbin <ilya.verbin@intel.com>
274
275 * lto.c: Include stringpool.h and fold-const.h.
276 (offload_handle_link_vars): New static function.
277 (lto_main): Call offload_handle_link_vars.
278
ca834876
JH
2792015-12-10 Jan Hubicka <hubicka@ucw.cz>
280
281 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
282
958a627f
JH
2832015-12-11 Jan Hubicka <hubicka@ucw.cz>
284
285 PR ipa/61886
286 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
287 values of error and warning attributes.
288
da20571a
JH
2892015-12-08 Jan Hubicka <hubicka@ucw.cz>
290
291 PR lto/68811
292 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
293 DECL.
294 (LTO_NO_PREVAIL): Use gcc_checking_assert.
295
378004b9
JH
2962015-12-08 Jan Hubicka <hubicka@ucw.cz>
297
298 PR lto/68811
299 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
300 by itself.
301
6b9ac179
JH
3022015-12-08 Jan Hubicka <hubicka@ucw.cz>
303
304 PR ipa/61886
305 * lto-symtab.c: Include lto-symtab.h.
306 (lto_cgraph_replace_node): Do not merge profiles here.
307 (lto_symtab_merge_p): New function.
308 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
309 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
310 aliases.
311 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
312 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
313 * lto.c: Include lto-symtab.h
314 * lto-symtab.h: New.
315
41c60c6c
JH
3162015-12-08 Jan Hubicka <hubicka@ucw.cz>
317
318 PR ipa/61886
319 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
320 are not part of the definition.
321 (contained_in_symbol): Likewise.
322 (promote_symbol): When promoting a symbol also promote all transparent
323 aliases.
324 (rename_statics): Weakref needs unique name, too.
325
71e54687
JH
3262015-12-07 Jan Hubicka <hubicka@ucw.cz>
327
328 PR ipa/61886
329 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
330 rename_statics, rename_statics): Handle transparent aliases.
331
88636b62
JH
3322015-12-04 Jan Hubicka <hubicka@ucw.cz>
333
334 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
335 merged_comdat.
336
8c86248e
JH
3372015-12-01 Jan Hubicka <hubicka@ucw.cz>
338
339 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
340
1ff9ed6f
JH
3412015-11-25 Jan Hubicka <jh@suse.cz>
342
343 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
344 * lang.opt (lto_linker_output): New enum.
345 (flinker_output): New flag.
346
22bea0be
JH
3472015-11-24 Jan Hubicka <hubicka@ucw.cz>
348
349 * lto-symtab.c: Include alias.h
350 (warn_type_compatibility_p): Replace types_compatible_p checks by
351 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
352 (lto_symtab_merge): Compare DECL sizes.
353 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
354
aea50b45
JH
3552015-11-24 Jan Hubicka <hubicka@ucw.cz>
356
357 * lto.c (iterative_hash_canonical_type): Recruse for all types
358 which pass !canonical_type_used_p.
359 (gimple_register_canonical_type_1): Sanity check we do not compute
360 canonical type of anything with !canonical_type_used_p.
361 (gimple_register_canonical_type): Skip all types that are
362 !canonical_type_used_p
363
deb3dae6
JH
3642015-11-24 Jan Hubicka <hubicka@ucw.cz>
365
366 * lto.c (unify_scc): Use free_node.
367
f85d2487
JH
3682015-11-21 Jan Hubicka <hubicka@ucw.cz>
369
370 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
371 (gimple_register_canonical_type_1): Check that pointers do not get
372 canonical types.
373 (gimple_register_canonical_type): Do not register pointers.
374
3752015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
376
377 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
378 flag for types that are not ODR; fix loop walking parameters.
379
69f293c9
AM
3802015-11-11 Andrew MacLeod <amacleod@redhat.com>
381
382 * lto-lang.c: Remove unused header files.
383 * lto-object.c: Likewise.
384 * lto-partition.c: Likewise.
385 * lto-symtab.c: Likewise.
386 * lto.c: Likewise.
387
ee45a32d
EB
3882015-11-08 Eric Botcazou <ebotcazou@adacore.com>
389
390 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
391
0aad0198
RS
3922015-11-07 Richard Sandiford <richard.sandiford@arm.com>
393
394 * lto-lang.c: Don't undef DEF_BUILTIN.
395
2adfab87
AM
3962015-10-29 Andrew MacLeod <amacleod@redhat.com>
397
398 * lto-lang.c: Reorder #include's and remove duplicates.
399 * lto-object.c: Likewise.
400 * lto-partition.c: Likewise.
401 * lto-symtab.c: Likewise.
402 * lto.c: Likewise.
403
b2b29377
MM
4042015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
405
406 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
407 conditionals.
408 (lto_fixup_state): Likewise.
409 (do_whole_program_analysis): Use
410 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
411 conditionals.
412
d9a6bd32
JJ
4132015-10-13 Jakub Jelinek <jakub@redhat.com>
414
415 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
416 DEF_FUNCTION_TYPE_11): Define.
417
9c4eeafc
JH
4182015-10-10 Jan Hubicka <hubicka@ucw.cz>
419
420 * lto.c (hash_canonical_type): Honor
421 type_with_interoperable_signedness.
422
3e32ee19
NS
4232015-09-28 Nathan Sidwell <nathan@codesourcery.com>
424
425 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
426 (DEF_FUNCTION_TYPE_VAR_11): Delete.
427
f196d062
RB
4282015-08-31 Richard Biener <rguenther@suse.de>
429
430 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
431 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
432 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
433 participate in merging with something else.
434
45aee888
RB
4352015-08-31 Richard Biener <rguenther@suse.de>
436
437 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
438 test, do not replace a non-builtin with a builtin.
439 * lto.c (compare_tree_sccs_1): Do not merge things we stream
440 as builtins vs. non-builtins.
441
a79683d5
TS
4422015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
443
444 * lto.h: Remove useless typedefs.
445
48d859bb
AM
4462015-07-15 Andrew MacLeod <amacleod@redhat.com>
447
448 * lto.c: Remove redundant includes.
449
026c3cfd
AH
4502015-07-12 Aldy Hernandez <aldyh@redhat.com>
451
452 * lto-lang.c: Fix double word typos.
453
9fdcd34e
AM
4542015-07-10 Andrew MacLeod <amacleod@redhat.com>
455
456 * lto.c: Include cfghooks.h rather than predict.h.
457
f51ade33
AM
4582015-07-09 Andrew MacLeod <amacleod@redhat.com>
459
460 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
461 lto-streamer.h.
462 * lto-object.c: Likewise.
463 * lto-partition.c: Likewise.
464 * lto-symtab.c: Likewise.
465
1916bcb5
AM
4662015-07-09 Andrew MacLeod <amacleod@redhat.com>
467
468 * lto-lang.c: Adjust includes for flags.h changes.
469
c7131fb2
AM
4702015-07-07 Andrew MacLeod <amacleod@redhat.com>
471
472 * lto-lang.c: Adjust includes.
473 * lto-object.c: Likewise.
474 * lto-partition.c: Likewise.
475 * lto-symtab.c: Likewise.
476 * lto.c: Likewise.
477
f0889939
AM
4782015-06-25 Andrew MacLeod <amacleod@redhat.com>
479
480 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
481 * lto-object.c: Likewise.
482 * lto-partition.c: Likewise.
483 * lto-symtab.c: Likewise.
484 * lto-tree.h: Likewise.
485 * lto.c: Likewise.
486
8d67ee55
RS
4872015-06-25 Richard Sandiford <richard.sandiford@arm.com>
488
489 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
490 than typed_noop_remove. Remove redudant typedefs.
491
abb226c9
AM
4922015-06-17 Andrew MacLeod <amacleod@redhat.com>
493
494 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
495 * lto-object.c: Likewise.
496 * lto-partition.c: Likewise.
497 * lto-symtab.c: Likewise.
498 * lto.c: Likewise.
499
351d90f4
JH
5002015-06-14 Jan Hubicka <hubicka@ucw.cz>
501
502 PR ipa/66181
503 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
504
44c42705
DD
5052015-06-12 DJ Delorie <dj@redhat.com>
506
507 * lto-lang.c (lto_type_for_size): Include intN types.
508 (lto_type_for_mode): Likewise.
509
64578d98
JH
5102015-06-08 Jan Hubicka <hubicka@ucw.cz>
511
512 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
513
13fdf2e2
AM
5142015-06-08 Andrew MacLeod <amacleod@redhat.com>
515
516 * lto-lang.c : Adjust include files.
517 * lto-object.c : Likewise.
518 * lto-partition.c : Likewise.
519 * lto-partition.h : Likewise.
520 * lto-symtab.c : Likewise.
521 * lto.c : Likewise.
522 * lto.h : Likewise.
523
ccb5ad37
JH
5242015-06-06 Jan Hubicka <hubicka@ucw.cz>
525
6542950e
JH
526 PR lto/65378
527 * lto-symtab.c (warn_type_compatibility_p): Fix call of
528 odr_or_derived_type_p.
529 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
530
5312015-06-08 Jan Hubicka <hubicka@ucw.cz>
532
533
ccb5ad37
JH
534 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
535 pointers.
536
d7438551
AH
5372015-06-05 Aldy Hernandez <aldyh@redhat.com>
538
539 * lto-lang.c (lto_write_globals): Remove.
540 (LANG_HOOKS_WRITE_GLOBALS): Same.
541
ecb9f223
AM
5422015-06-04 Andrew MacLeod <amacleod@redhat.com>
543
544 * lto-lang.c: Adjust includes for restructured coretypes.h.
545 * lto-object.c: Likewise.
546 * lto-partition.c: Likewise.
547 * lto-symtab.c: Likewise.
548 * lto.c: Likewise.
549
9cb9b937
JH
5502015-06-04 Jan Hubicka <hubicka@ucw.cz>
551
552 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
553
93e2aa6d
JH
5542015-06-03 Jan Hubicka <hubicka@ucw.cz>
555
556 * lto.c (iterative_hash_canonical_type,
557 gimple_register_canonical_type): only hash main variants of types
558
faae53f8
ML
5592015-05-27 Martin Liska <mliska@suse.cz>
560
561 * lto-partition.c (new_partition): Reset number of symbols.
562 (add_symbol_to_partition_1): Increment number of symbols.
563 (undo_partition): Decrement number of symbols.
564 (lto_balanced_map): Dump number of symbols and insns that
565 belong to a partition.
566 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
567
b727ba74
JH
5682015-05-22 Jan Hubicka <hubicka@ucw.cz>
569
570 * lto.c (hash_canonical_type): Be sure we hash only types that
571 need alias set.
572 (gimple_register_canonical_type_1): Do not produce canonical
573 types for types that do not need alias sets.
574
1d1218fb
JH
5752015-05-22 Jan Hubicka <hubicka@ucw.cz>
576
577 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
578
872d5034
JH
5792015-05-19 Jan Hubicka <hubicka@ucw.cz>
580
581 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
582
259d29e3
JH
5832015-05-17 Jan Hubicka <hubicka@ucw.cz>
584
585 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
586 compare ODR types (if available) and function types.
587 (lto_symtab_merge): ... here; output ODR violation warnings
588 and call warn_types_mismatch.
589
b0845a1e
JH
5902015-04-29 Jan Hubicka <hubicka@ucw.cz>
591
592 * lto.c (lto_fixup_state): Call verify_type.
593
67f58944
TS
5942015-04-18 Trevor Saunders <tsaunders@mozilla.com>
595
b0845a1e 596 * lto.c: Adjust for hash_table changes.
67f58944 597
36ceb0e3
JH
5982015-03-27 Jan Hubicka <hubicka@ucw.cz>
599
600 * lto.c (lto_read_decls): Move code registering odr types out
601 of TYPE_CANONICAL conditional and also register polymorphic types.
602
afd1e7c6
JH
6032015-03-26 Jan Hubicka <hubicka@ucw.cz>
604
605 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
606 DECL_ARTIFICAL symbols.
607
eaeec5ec
JH
6082015-03-26 Jan Hubicka <hubicka@ucw.cz>
609
610 PR lto/65536
611 * lto.c (unify_scc): Revert location cache when unification
612 suceeded.
613 (lto_read_decls): Accept location cache after sucess;
614 apply location cache before calling debug hooks.
615
1c4db829
JH
6162015-03-10 Jan Hubicka <hubicka@ucw.cz>
617
618 * lto.c (read_cgraph_and_symbols): Do not do merging
619 at ltrans stage.
620
db847fa8
JJ
6212015-02-26 Jakub Jelinek <jakub@redhat.com>
622
623 * lto.c (lto_mode_identity_table): New variable.
624 (lto_read_decls): Add mode_table argument to the lto_input_block
625 constructor.
626 (lto_file_finalize): Initialize mode_table.
627 (lto_init): Initialize lto_mode_identity_table.
628
56a9f6bc
TS
6292015-02-24 Thomas Schwinge <thomas@codesourcery.com>
630
631 PR libgomp/64625
632 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
633 Remove macros.
634 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
635
ebc8f0bb
JH
6362015-02-03 Jan Hubicka <hubicka@ucw.cz>
637
638 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
639
40fecdd6
JM
6402015-01-30 Joseph Myers <joseph@codesourcery.com>
641
642 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
643 changed to pass input_location as first argument.
644
040968a8
JH
6452014-12-11 Jan Hubicka <hubicka@ucw.cz>
646
647 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
648
69fe4502
JH
6492014-12-11 Jan Hubicka <hubicka@ucw.cz>
650
651 * lto.c (compare_tree_sccs_1): Add comparsion of
652 DECL_FUNCTION_SPECIFIC_TARGET
653
41dbbb37
TS
6542015-01-15 Thomas Schwinge <thomas@codesourcery.com>
655 James Norris <jnorris@codesourcery.com>
656
657 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
658 New macros.
659 * lto.c: Include "gomp-constants.h".
660
837bac8c
IV
6612015-01-14 Ilya Verbin <ilya.verbin@intel.com>
662
663 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
664 from select_what_to_stream.
665
1b34e6e2
BS
6662015-01-09 Bernd Schmidt <bernds@codesourcery.com>
667 Jakub Jelinek <jakub@redhat.com>
668
669 PR middle-end/64412
670 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
671 if ACCEL_COMPILER.
672
adfac8df
JJ
6732015-01-09 Michael Collison <michael.collison@linaro.org>
674
675 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
676 input.h, alias.h, symtab.h, options, fold-const.h,
677 wide-int.h, and inchash.h due to flattening of tree.h.
678 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
679 input.h, alias.h, symtab.h, fold-const.h,
680 wide-int.h, and inchash.h due to flattening of tree.h.
681 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
682 input.h, alias.h, symtab.h, options, fold-const.h,
683 wide-int.h, and inchash.h due to flattening of tree.h.
684 * lto-partition.c: Ditto.
685 * lto-symtab.c: Ditto.
686
5624e564
JJ
6872015-01-05 Jakub Jelinek <jakub@redhat.com>
688
689 Update copyright years.
690
9a1e784a
ML
6912014-12-22 Martin Liska <mliska@suse.cz>
692
693 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
694 is used.
695 (undo_partition): Likewise.
696 (lto_balanced_map): Likewise.
697
dd912cb8
ML
6982014-12-22 Martin Liska <mliska@suse.cz>
699
700 * lto-partition.c: Include of symbol-summary.h is added.
701 * lto-symtab.c: Likewise.
702 * lto.c: Likewise.
703
17e0fc92
JH
7042014-12-11 Jan Hubicka <hubicka@ucw.cz>
705
706 PR ipa/61324
707 * lto.c (read_cgraph_and_symbols): Update call of
708 remove_unreachable_nodes.
709 (do_whole_program_analysis): Remove call of
710 symtab->remove_unreachable_nodes
711
58dddbd2
TS
7122014-12-08 Trevor Saunders <tsaunders@mozilla.com>
713
714 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
715 htab with malloc instead of ggc.
716
907dadbd
TS
7172014-11-20 Trevor Saunders <tsaunders@mozilla.com>
718
719 * lto.c: Replace htab with hash_table.
720
9c71e9df
TS
7212014-11-20 Trevor Saunders <tsaunders@mozilla.com>
722
723 * lto.c (lto_read_in_decl_state): Adjust.
724 (lto_fixup_state): Likewise.
725
72a4a8b0
JH
7262014-11-17 Jan Hubicka <hubicka@ucw.cz>
727
728 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
729
54e774c0
JH
7302014-11-14 Jan Hubicka <hubicka@ucw.cz>
731
732 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
733
1f6be682
IV
7342014-11-13 Ilya Verbin <ilya.verbin@intel.com>
735 Bernd Schmidt <bernds@codesourcery.com>
736 Andrey Turetskiy <andrey.turetskiy@intel.com>
737 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
738
ec6fe917
IV
739 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
740
7412014-11-13 Ilya Verbin <ilya.verbin@intel.com>
742 Ilya Tocar <ilya.tocar@intel.com>
743 Andrey Turetskiy <andrey.turetskiy@intel.com>
744 Bernd Schmidt <bernds@codesourcery.com>
745
1f6be682
IV
746 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
747 LTO_SECTION_NAME_PREFIX.
748 * lto-partition.c (lto_promote_cross_file_statics): Call
749 select_what_to_stream.
750 * lto.c (lto_section_with_id): Use section_name_prefix instead of
751 LTO_SECTION_NAME_PREFIX.
752 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
753 being built as an offload compiler.
754
ef4bddc2
RS
7552014-10-29 Richard Sandiford <richard.sandiford@arm.com>
756
757 * lto-lang.c: Remove redundant enum from machine_mode.
758
c582198b
AM
7592014-10-28 Andrew MacLeod <amacleod@redhat.com>
760
761 * lto.c: Adjust include files.
762 * lto-lang.c: Ditto.
763 * lto-object.c: Ditto.
764 * lto-partition.c: Ditto.
765 * lto-symtab.c: Ditto.
766
60393bbc
AM
7672014-10-27 Andrew MacLeod <amacleod@redhat.com>
768
769 * lto-lang.c: Adjust include files.
770 * lto-object.c: Ditto.
771 * lto-partition.c: Ditto.
772 * lto-symtab.c: Ditto.
773 * lto.c: Ditto.
774
957f47e6
DD
7752014-10-16 DJ Delorie <dj@redhat.com>
776
777 * lto-object.c (lto_obj_begin_section): In the event that pointer
778 sizes aren't powers of two, choose a more suitable alignment
779 than (unsigned)(-1).
780
78a7c317
DD
7812014-10-14 DJ Delorie <dj@redhat.com>
782
783 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
784 size-type as well.
785 (lto_init): Initialize all intN types, not just int128.
786
70261a4f
ML
7872014-10-06 Martin Liska <mliska@suse.cz>
788
789 * lto.c (stream_out): ARG_UNUSED added for last argument.
790
00de328a
AH
7912014-09-24 Aldy Hernandez <aldyh@redhat.com>
792
793 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
794 DECL_ABSTRACT_P.
795
7861b648
AK
7962014-09-23 Andi Kleen <ak@linux.intel.com>
797
798 * lto-partition.c (node_cmp): Update comment.
799 (varpool_node_cmp): Use symtab_node for comparison.
800 (add_sorted_nodes): New function.
801 (lto_balanced_map): Change to keep ordered queue
802 of ordered node. Handle no_reorder attribute.
803
1ee85ee1
JH
8042014-09-11 Jan Hubicka <hubicka@ucw.cz>
805
806 * lto.c (lto_read_decls): Register ODR types.
807
8605403e
JH
8082014-08-20 Jan Hubicka <hubicka@ucw.cz>
809
810 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
811 call.
812 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
813
56b1f114
JH
8142014-08-14 Jan Hubicka <hubicka@ucw.cz>
815
816 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
817
833f94c0
RB
8182014-08-14 Richard Biener <rguenther@suse.de>
819
820 PR lto/62067
821 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
822
207c68cd
RB
8232014-08-08 Richard Biener <rguenther@suse.de>
824
825 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
826
7c581d61
BC
8272014-08-08 Bin Cheng <bin.cheng@arm.com>
828
829 PR lto/62032
830 * lto-lang.c (lto_init): Switch mis-matched arguments.
831
39c8aaa4
TS
8322014-08-07 Trevor Saunders <tsaunders@mozilla.com>
833
834 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
835
6e2830c3
TS
8362014-08-02 Trevor Saunders <tsaunders@mozilla.com>
837
838 * lto-partition.c, lto-partition.h: Use hash_set instead of
839 pointer_set.
840
50de5793
AK
8412014-07-31 Andi Kleen <ak@linux.intel.com>
842
843 * lto.c (hash_canonical_type): Use inchash::hash
844 and use inchash::add_expr.
845 (iterative_hash_canonical_type): Dito.
846
f6bcdb5e
RB
8472014-07-30 Richard Biener <rguenther@suse.de>
848
849 * lto-streamer.h (lto_write_data): New function.
850 * langhooks.c (lhd_append_data): Do not free block.
851 * lto-section-out.c (lto_write_data): New function writing
852 raw data to the current section.
853 (lto_write_stream): Adjust for langhook semantic change.
854 (lto_destroy_simple_output_block): Write header directly.
855 * lto-opts.c (lto_write_options): Write options directly.
856 * lto-streamer-out.c (produce_asm): Write heaeder directly.
857 (lto_output_toplevel_asms): Likewise.
858 (copy_function_or_variable): Copy data directly.
859 (write_global_references): Output index table directly.
860 (lto_output_decl_state_refs): Likewise.
861 (write_symbol): Write data directly.
862 (produce_symtab): Adjust.
863 (produce_asm_for_decls): Output header and refs directly.
864
56fdfd3e
AK
8652014-07-25 Andi Kleen <ak@linux.intel.com>
866
867 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
868
0bd8bb04
AK
8692014-07-25 Andi Kleen <ak@linux.intel.com>
870
871 * lto.c (hash_canonical_type): Convert to inchash.
872 (iterative_hash_canonical_type): Dito.
873
6d8eb96b
AK
8742014-07-25 Andi Kleen <ak@linux.intel.com>
875
876 * lto.c: Include inchash.h
877
ad115a3c
JH
8782014-07-14 Jan Hubicka <hubicka@ucw.cz>
879
880 * lto.c (mentions_vars_p_decl_non_common): Skip
881 DECL_ARGUMENT_FLD.
882 mentions_vars_p_function): Do DECL_ARGUMENTS.
883 (lto_fixup_prevailing_decls): Update.
884
917dd9bf
JH
8852014-07-12 Jan Hubicka <hubicka@ucw.cz>
886
887 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
888 timevar
889 (materialize_cgraph): Do not push GIMPLE_IN timevar.
890
0b83e688
JH
8912014-07-11 Jan Hubicka <hubicka@ucw.cz>
892
893 * lto-partition.c (add_references_to_partition): Use
894 varpool_ctor_useable_for_folding_p.
895 * lto.c (lto_read_in_decl_state): Update sanity check.
896
e55637b7
ML
8972014-07-01 Martin Liska <mliska@suse.cz>
898
899 IPA REF alias refactoring
900 * lto-partition.c (add_symbol_to_partition_1): Usage of
901 FOR_EACH_ALIAS added.
902
010f4e27
JH
9032014-06-28 Jan Hubicka <hubicka@ucw.cz>
904
905 Revert:
906 * lto.c (lto_copy_fields_not_streamed): New function.
907 (compare_tree_sccs_1): Do not compare fields shared in between type
908 and variant.
909 (lto_read_decls): Fixup types first before inserting into hash.
910
b82fe354
AP
9112014-06-28 Andrew Pinski <apinski@cavium.com>
912
913 * lto.c (lto_read_decls): Fix comment in comment.
914
288eeff7
JH
9152014-06-28 Jan Hubicka <hubicka@ucw.cz>
916
917 * lto.c (lto_copy_fields_not_streamed): New function.
918 (compare_tree_sccs_1): Do not compare fields shared in between type
919 and variant.
920 (lto_read_decls): Fixup types first before inserting into hash.
921
e01fa630
ML
9222014-06-25 Martin Liska <mliska@suse.cz>
923
924 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
925 used.
926 (add_symbol_to_partition_1): Likewise.
927 (lto_balanced_map): Likewise.
928 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
929
aaf8a23e
JH
9302014-06-24 Jan Hubicka <hubicka@ucw.cz>
931
932 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
933 (mentions_vars_p_function): ... here.
934 (compare_tree_sccs_1): Update VINDEX checks.
935 (lto_fixup_prevailing_decls): Likewise.
936
1eb68d2d
TS
9372014-06-24 Trevor Saunders <tsaunders@mozilla.com>
938
939 * lto.c (canonical_type_hash_cache): Use hash_map instead of
940 pointer_map.
941
c203e8a7
TS
9422014-06-24 Trevor Saunders <tsaunders@mozilla.com>
943
944 * lto.c: Adjust.
945
714c800f
JH
9462014-06-20 Jan Hubicka <hubicka@ucw.cz>
947
948 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
949
569b1784
JH
9502014-06-20 Jan Hubicka <hubicka@ucw.cz>
951
952 * lto.c (compare_tree_sccs_1): Do not compare priorities.
953
56363ffd
JH
9542014-06-15 Jan Hubicka <hubicka@ucw.cz>
955
956 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
957
e257a17c
JH
9582014-06-10 Jan Hubicka <hubicka@ucw.cz>
959
960 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
961 (do_whole_program_analysis): Use verify_symtab.
962
24d047a3
JH
9632014-06-07 Jan Hubicka <hubicka@ucw.cz>
964
965 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
966 lto_fixup_prevailing_decls): Skip section names.
967
9b2b7279
AM
9682014-06-02 Andrew MacLeod <amacleod@redhat.com>
969
970 * lto-symtab.c: Include builtins.h.
971
a9243bfc
RB
9722014-05-26 Richard Biener <rguenther@suse.de>
973
974 * lto.c (lto_parse_hex): Use int64_t.
975 (lto_resolution_read): Likewise.
976
fd1e9302
JH
9772014-05-23 Jan Hubicka <hubicka@ucw.cz>
978
979 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
980
aede2c10
JH
9812014-05-23 Jan Hubicka <hubicka@ucw.cz>
982
983 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
984 symtab pointer.
985 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
986
f6a7cffc
TS
9872014-05-22 Thomas Schwinge <thomas@codesourcery.com>
988
989 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
990 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
991 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
992
4000360e
BS
9932012-05-22 Bernd Schmidt <bernds@codesourcery.com>
994
995 * lto-object.c: Include "lto-section-names.h".
996 (LTO_SEGMENT_NAME): Don't define.
997 * lto.c: Include "lto-section-names.h".
998
b9559136
JH
9992014-05-17 Jan Hubicka <hubicka@ucw.cz>
1000
1001 PR lto/61012
1002 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
1003 mixed with variables.
1004
766090c2
TS
10052014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1006
1007 * lto-tree.h: Don't use variable_size gty attribute.
1008 * lto.c (lto_read_in_decl_state): Adjust.
1009 (create_subid_section_table): Likewise.
1010 (lto_flatten_files): Likewise.
1011 (read_cgraph_and_symbols): Likewise.
1012
1d60af08
KZ
10132014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1014 Mike Stump <mikestump@comcast.net>
1015 Richard Sandiford <rdsandiford@googlemail.com>
1016
1017 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
1018 * lto-lang.c (get_nonnull_operand): Likewise.
1019
22869a37
RB
10202014-04-28 Richard Biener <rguenther@suse.de>
1021
1022 PR middle-end/60092
1023 * lto-lang.c: Define flag_isoc11.
1024
7de90a6c
DM
10252014-04-23 David Malcolm <dmalcolm@redhat.com>
1026
1027 * lto-partition.c (add_references_to_partition): Update for
1028 removal of implicit pointer from the is-a.h API.
1029 (add_symbol_to_partition_1): Likewise.
1030 (contained_in_symbol): Likewise.
1031 (undo_partition): Likewise.
1032 (lto_balanced_map): Likewise.
1033 (promote_symbol): Likewise.
1034 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
1035 (lto_symtab_merge_symbols): Likewise.
1036 * lto.c (lto_wpa_write_files): Likewise.
1037
783dab6b
RB
10382014-04-15 Richard Biener <rguenther@suse.de>
1039
1040 * lto.c: Include params.h.
1041 (do_whole_program_analysis): Switch on flag_lto_partition value,
1042 add support for LTO_PARTITION_ONE.
1043 * lto-partition.h (lto_balanced_map): Adjust.
1044 * lto-partition.c (lto_balanced_map): Get number of desired
1045 partitions as argument to support -flto-partition=one.
1046
cb90235d
JH
10472014-04-14 Jan Hubicka <hubicka@ucw.cz>
1048
1049 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
1050 tp_first_run.
1051
bbe281da
JH
10522014-03-19 Jan Hubicka <hubicka@ucw.cz>
1053
1054 * lto.c: Include ipa-inline.h
1055 (do_whole_program_analysis): Free inline summary after partitioning.
1056
ce2f49b3
RB
10572014-03-19 Richard Biener <rguenther@suse.de>
1058
1059 PR middle-end/60553
1060 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
1061 instead of TREE_CHAIN as chain_next.
1062
e41106fc
RB
10632014-03-19 Richard Biener <rguenther@suse.de>
1064
1065 * lto.c (lto_wpa_write_files): Move call to
1066 lto_promote_cross_file_statics ...
1067 (do_whole_program_analysis): ... here, into the partitioning
1068 block. Do not ggc_collect after lto_wpa_write_files but
1069 for a last time before it.
1070
15df2655
JJ
10712014-03-19 Jakub Jelinek <jakub@redhat.com>
1072
1073 PR lto/60571
1074 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1075 Fix formatting.
1076
415e2e6b
JJ
10772014-03-18 Jakub Jelinek <jakub@redhat.com>
1078
1079 PR sanitizer/60535
1080 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1081 and complex_{float,{,long_}double}_type_node.
1082
f42c637e
PM
10832014-03-08 Paulo Matos <paulo@matos-sorge.com>
1084
415e2e6b
JJ
1085 * lto-lang.c (lto_init): Pass flag_short_double to
1086 build_common_tree_nodes.
f42c637e 1087
6dab804d
JH
10882014-02-14 Jan Hubicka <hubicka@ucw.cz>
1089
1090 PR lto/60295
1091 * lto.c (stream_out): Avoid parallel streaming with
1092 -flto=jobserver until we are able to throttle it down
1093 resonably.
1094
39434bce
JH
10952014-02-14 Jan Hubicka <hubicka@ucw.cz>
1096
1097 * lto-partition.c (add_symbol_to_partition_1,
1098 undo_partition, lto_balanced_map): Aliases have no
1099 defined size.
1100 (lto_balanced_map): Do not follow refering variables
1101 if they can be optimized out.
1102
1966fd99
RB
11032014-02-14 Richard Biener <rguenther@suse.de>
1104
1105 PR lto/60179
1106 * lto.c (compare_tree_sccs_1): Do not compare
1107 DECL_FUNCTION_SPECIFIC_TARGET.
1108 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1109
283416b3
RB
11102014-02-12 Richard Biener <rguenther@suse.de>
1111
1112 PR lto/60060
1113 * lto-lang.c (lto_write_globals): Do not call
1114 wrapup_global_declarations or emit_debug_global_declarations
1115 but emit debug info for non-function scope variables
1116 directly.
1117
b7e85694
JH
11182014-02-06 Jan Hubicka <hubicka@ucw.cz>
1119
1120 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1121
96451279
JH
11222014-02-06 Jan Hubicka <hubicka@ucw.cz>
1123
1124 PR ipa/59469
1125 * lto-partition.c (symbol_class): Move to cgraph.h
1126 (get_symbol_class): Move to symtab.c
1127 (add_references_to_partition, add_symbol_to_partition_1,
1128 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1129 lto_promote_cross_file_statics): Update.
1130
f300e7b8
JH
11312014-02-05 Jan Hubicka <hubicka@ucw.cz>
1132
1133 * lto.c (lto_parallelism): New static var.
1134 (do_stream_out, wait_for_child, stream_out): New static functions.
1135 (lto_wpa_write_files): Add support for parallel streaming.
1136 (do_whole_program_analysis): Set parallelism.
1137 * lang.opt (fwpa): Add parameter.
1138 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1139 (lto_init): Update use of flag_wpa.
1140 * lto-streamer.h (asm_nodes_output): Declare.
1141
f0f91770
RB
11422014-02-05 Richard Biener <rguenther@suse.de>
1143
1144 * lto.h (lto_global_var_decls): Remove.
1145 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1146 (lto_write_globals): Do nothing in WPA stage, gather globals from
1147 the varpool here ...
1148 * lto.c (lto_main): ... not here.
1149 (materialize_cgraph): Do not call rest_of_decl_compilation
1150 on the empty lto_global_var_decls vector.
1151 (lto_global_var_decls): Remove.
1152
d665f8dd
JH
11532014-02-04 Jan Hubicka <hubicka@ucw.cz>
1154
1155 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1156 needs duplicating, not generic COMDAT.
1157
c39276b8
RB
11582014-02-04 Richard Biener <rguenther@suse.de>
1159
1160 PR lto/59723
1161 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1162 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1163
5f876ae7
JH
11642014-02-04 Jan Hubicka <hubicka@ucw.cz>
1165 Markus Trippelsdorf
1166
1167 PR ipa/59469
1168 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1169 merge force_output and forced_by_abi flags.
1170
b72271b9
BI
11712014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1172
1173 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1174 flag_cilkplus.
1175
63124c48
RB
11762014-01-09 Richard Biener <rguenther@suse.de>
1177
1178 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1179
d05b9920
RB
11802014-01-09 Richard Biener <rguenther@suse.de>
1181
1182 PR lto/45586
1183 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1184 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1185 (gimple_canonical_types_compatible_p): Do not compare them either.
1186
23a5b65a
RS
11872014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1188
1189 Update copyright years
1190
2c8326a5
OE
11912013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1192
1193 * lto.c: Remove struct tags when referring to class varpool_node.
1194 * lto-partition.c: Likewise.
1195 * lto-symtab.c: Likewise.
1196
e06f9964
JJ
11972013-11-29 Jakub Jelinek <jakub@redhat.com>
1198 Richard Biener <rguenther@suse.de>
1199
1200 PR lto/59326
1201 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1202
c193f58b
JJ
12032013-11-29 Jakub Jelinek <jakub@redhat.com>
1204
1205 PR lto/59326
1206 * lto.c (mentions_vars_p_omp_clause): New function.
1207 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1208 after return stmts.
1209
2fb9a547
AM
12102013-11-22 Andrew MacLeod <amacleod@redhat.com>
1211
1212 * lto.c: Add required include files from gimple.h.
1213 * lto-lang.c: Likewise
1214 * lto-object.c: Likewise
1215 * lto-partition.c: Likewise
1216 * lto-symtab.c: Likewise
1217
fec39fa6
TS
12182013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1219
1220 * lto-partition.c lto-symtab.c lto.c Adjust.
1221
d8a2d370
DN
12222013-11-14 Diego Novillo <dnovillo@google.com>
1223
1224 * lto-lang.c: Include stringpool.h.
1225 Include stor-layout.h.
1226 * lto-partition.c: Include gcc-symtab.h.
1227 * lto.c: Include stor-layout.h.
1228
5e20cdc9
DM
12292013-10-31 David Malcolm <dmalcolm@redhat.com>
1230
1231 Automated part of renaming of symtab_node_base to symtab_node.
1232
1233 Patch autogenerated by rename_symtab.py from
1234 https://github.com/davidmalcolm/gcc-refactoring-scripts
1235 revision 58bb219cc090b2f4516a9297d868c245495ee622
1236
1237 * lto-partition.c (add_symbol_to_partition): Rename
1238 symtab_node_base to symtab_node.
1239 (get_symbol_class): Likewise.
1240 (symbol_partitioned_p): Likewise.
1241 (add_references_to_partition): Likewise.
1242 (add_symbol_to_partition_1): Likewise.
1243 (contained_in_symbol): Likewise.
1244 (add_symbol_to_partition): Likewise.
1245 (lto_1_to_1_map): Likewise.
1246 (lto_max_map): Likewise.
1247 (lto_balanced_map): Likewise.
1248 (privatize_symbol_name): Likewise.
1249 (promote_symbol): Likewise.
1250 (may_need_named_section_p): Likewise.
1251 (rename_statics): Likewise.
1252 (lto_promote_statics_nonwpa): Likewise.
1253 * lto-symtab.c (lto_symtab_merge): Likewise.
1254 (lto_symtab_resolve_replaceable_p): Likewise.
1255 (lto_symtab_symbol_p): Likewise.
1256 (lto_symtab_resolve_can_prevail_p): Likewise.
1257 (lto_symtab_resolve_symbols): Likewise.
1258 (lto_symtab_merge_decls_2): Likewise.
1259 (lto_symtab_merge_decls_1): Likewise.
1260 (lto_symtab_merge_decls): Likewise.
1261 (lto_symtab_merge_symbols_1): Likewise.
1262 (lto_symtab_merge_symbols): Likewise.
1263 (lto_symtab_prevailing_decl): Likewise.
1264 * lto.c (lto_wpa_write_files): Likewise.
1265 (read_cgraph_and_symbols): Likewise.
1266 (do_whole_program_analysis): Likewise.
1267
378cd6b1
DM
12682013-10-30 David Malcolm <dmalcolm@redhat.com>
1269
1270 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1271 declarations onto multiple lines to make things easier for
1272 rename_symtab.py.
1273 (lto_symtab_merge_decls_1): Likewise.
1274 (lto_symtab_merge_symbols_1): Likewise.
1275
939b37da
BI
12762013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1277
1278 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1279 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1280 Plus is enabled.
1281
67348ccc
DM
12822013-10-29 David Malcolm <dmalcolm@redhat.com>
1283
1284 Patch autogenerated by refactor_symtab.py from
1285 https://github.com/davidmalcolm/gcc-refactoring-scripts
1286 revision 58bb219cc090b2f4516a9297d868c245495ee622
1287
1288 * lto-partition.c (lto_promote_cross_file_statics): Update for
1289 conversion of symtab types to a true class hierarchy.
1290 (rename_statics): Likewise.
1291 (promote_symbol): Likewise.
1292 (privatize_symbol_name): Likewise.
1293 (lto_balanced_map): Likewise.
1294 (varpool_node_cmp): Likewise.
1295 (node_cmp): Likewise.
1296 (lto_1_to_1_map): Likewise.
1297 (undo_partition): Likewise.
1298 (add_symbol_to_partition): Likewise.
1299 (contained_in_symbol): Likewise.
1300 (add_symbol_to_partition_1): Likewise.
1301 (add_references_to_partition): Likewise.
1302 (symbol_partitioned_p): Likewise.
1303 (get_symbol_class): Likewise.
1304 (lto_max_map): Likewise.
1305 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1306 (lto_symtab_merge_symbols): Likewise.
1307 (lto_symtab_merge_symbols_1): Likewise.
1308 (lto_symtab_merge_decls): Likewise.
1309 (lto_symtab_merge_decls_1): Likewise.
1310 (lto_symtab_merge_decls_2): Likewise.
1311 (lto_symtab_resolve_symbols): Likewise.
1312 (lto_symtab_resolve_can_prevail_p): Likewise.
1313 (lto_symtab_symbol_p): Likewise.
1314 (lto_symtab_resolve_replaceable_p): Likewise.
1315 (lto_symtab_merge): Likewise.
1316 (lto_varpool_replace_node): Likewise.
1317 (lto_cgraph_replace_node): Likewise.
1318 * lto.c (lto_main): Likewise.
1319 (do_whole_program_analysis): Likewise.
1320 (materialize_cgraph): Likewise.
1321 (read_cgraph_and_symbols): Likewise.
1322 (cmp_partitions_order): Likewise.
1323 (lto_materialize_function): Likewise.
1324 (has_analyzed_clone_p): Likewise.
1325
8e9055ae
AM
13262013-10-29 Andrew MacLeod <amacleod@redhat.com>
1327
1328 * lto/lto-object.c: Add gimple.h to include list.
1329 * lto/lto-partition.c: Likewise.
1330
377d9792
AM
13312013-10-18 Andrew MacLeod <amacleod@redhat.com>
1332
1333 * lto.c: Remove tree-flow.h from include list.
1334
fffda8d7
RB
13352013-10-15 Richard Biener <rguenther@suse.de>
1336
1337 * lto.c (hash_canonical_type): Split out from ...
1338 (iterative_hash_canonical_type): ... here. Register types
1339 we recurse to.
1340 (gimple_canonical_type_hash): Adjust.
1341 (gimple_register_canonical_type_1): Split out from ...
1342 (gimple_register_canonical_type): ... here. Cache computed
1343 hash value.
1344 (lto_register_canonical_types): Split into two modes,
1345 clearing and computing TYPE_CANONICAL.
1346 (lto_read_decls): Adjust.
1347 (read_cgraph_and_symbols): Do two passes over global trees,
1348 first clearing then computing TYPE_CANONICAL.
1349
1394237e
RB
13502013-10-14 Richard Biener <rguenther@suse.de>
1351
1352 * lto.c (gimple_canonical_types): Move out-of GC space.
1353 (canonical_type_hash_cache): Make a pointer-map.
1354 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1355 New counters.
1356 (iterative_hash_canonical_type): Adjust.
1357 (read_cgraph_and_symbols): Likewise.
1358 (print_lto_report_1): Likewise.
1359
0a387eca
RB
13602013-10-14 Richard Biener <rguenther@suse.de>
1361
1362 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1363 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1364 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1365 gimple_types_compatible_p_1, gimple_types_compatible_p,
1366 visit, iterative_hash_name, struct type_hash_pair,
1367 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1368 gimple_type_eq, gimple_register_type, num_not_merged_types,
1369 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1370 num_not_merged_types_in_same_scc_trees): Remove old merging code
1371 and statistics.
1372 (lto_read_decls): Do not run old merging code in parallel.
1373 (read_cgraph_and_symbols): Do not init/free old merging
1374 data structures.
1375 (print_lto_report_1): Do not report differences of old vs. new
1376 merging code.
1377
83fd5d11
RB
13782013-10-14 Richard Biener <rguenther@suse.de>
1379
1380 * lto-lang.c (lto_init): Do not re-init canonical types here.
1381 (lto_register_canonical_types): Move to ...
1382 * lto.c (lto_register_canonical_types): ... here.
1383 (gimple_canonical_types, canonical_type_hash_cache,
1384 iterative_hash_canonical_type, gimple_canonical_type_hash,
1385 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1386 gimple_register_canonical_type): Add canonical type merging machinery
1387 moved from gimple.c.
1388 (read_cgraph_and_symbols): Init and free canonical type tables
1389 here.
1390 (print_lto_report_1): Report canonical type table stats here.
1391
acf0174b
JJ
13922013-10-11 Jakub Jelinek <jakub@redhat.com>
1393
1394 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1395
7c6fedd2
TT
13962013-09-25 Tom Tromey <tromey@redhat.com>
1397
1398 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1399 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1400 (lto/lto-object.o): Remove.
1401
35f32ad4
RB
14022013-09-06 Richard Biener <rguenther@suse.de>
1403
1404 * lto-symtab.c: Move from gcc/
1405 * lto.h: Include vec.h.
1406 (lto_global_var_decls): Declare.
1407 * lto.c (lto_global_var_decls): Move definition here.
1408 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1409 (lto-symtab.o): Add.
1410 * config-lang.in (gtfiles): Add lto.h.
1411
49322b12
JH
14122013-08-31 Jan Hubicka <jh@suse.cz>
1413
1414 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1415 DECL_FIELD_OFFSET can contain an reference to variable.
1416
31f1f73b
JH
14172013-08-31 Jan Hubicka <jh@suse.cz>
1418
1419 * lto.c (tree_with_vars): Turn into vector.
1420 (MAYBE_REMEMBER_WITH_VARS): Change to...
1421 (CHECK_VAR): ... this one.
1422 (CHECK_NO_VAR): New macro.
1423 (maybe_remember_with_vars_typed): Turn to ...
1424 (mentions_vars_p_typed): ... this one.
1425 (maybe_remember_with_vars_common): Turn to ...
1426 (mentions_vars_p_comon): ... this one.
1427 (maybe_remember_with_vars_decl_minimal): Turn to ...
1428 (mentions_vars_p_decl_minmal): ... this one.
1429 (maybe_remember_with_vars_decl_common): Turn to ...
1430 (mentions_vars_p_decl_common): ... this one.
1431 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1432 (mentions_vars_p_decl_with_vis): ... this one.
1433 (maybe_remember_with_vars_decl_non_common): Turn to ...
1434 (mentions_vars_p_decl_non_common): ... this one.
1435 (maybe_remember_with_vars_function): Turn to ...
1436 (mentions_vars_p_function): ... this one.
1437 (maybe_remember_with_vars_field_decl): Turn to ...
1438 (mentions_vars_p_field_decl): ... this one.
1439 (maybe_remember_with_vars_type): Turn to ...
1440 (mentions_vars_p_type): ... this one.
1441 (maybe_remember_with_vars_binfo): Turn to ...
1442 (mentions_vars_p_binfo): ... this one.
1443 (maybe_remember_with_vars_constructor): Turn to ...
1444 (mentions_vars_p_constructor): ... this one.
1445 (maybe_remember_with_vars_expr): Turn to ...
1446 (mentions_vars_p_expr): ... this one.
1447 (maybe_remember_with_vars): Turn to ...
1448 (mentions_vars_p): ... this one.
1449 (lto_read_decls): Update.
1450 (LTO_SET_PREVAIL): Do not call function for internal decls.
1451 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1452 check that something was updated.
1453 (lto_fixup_state): Do not care about internal decls.
1454 (lto_fixup_decls): Update.
1455 (read_cgraph_and_symbols): Update.
1456
256eefa9
JH
14572013-08-29 Jan Hubicka <jh@suse.cz>
1458
1459 * lto.c (read_cgraph_and_symbols): Free decl states.
1460
0170f33c
JH
14612013-08-29 Jan Hubicka <jh@suse.cz>
1462
1463 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1464 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1465 TYPE_FINAL_P.
1466
c01c111b
JH
14672013-08-28 Jan Hubicka <jh@suse.cz>
1468
1469 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1470 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1471 (unify_scc): Do checking assert.
1472
6a49f3c9
JH
14732013-08-06 Jan Hubicka <jh@suse.cz>
1474 Martin Liska <marxin.liska@gmail.com>
1475
1476 * lto-partition.c (lto_balanced_map): Always base order on
1477 source file order.
1478
a2e2a668
JH
14792013-08-06 Jan Hubicka <jh@suse.cz>
1480
1481 * lto.c (lto_materialize_function): Do not read body anymore.
1482
815effe1
JH
14832013-08-02 Jan Hubicka <jh@suse.cz>
1484
1485 * lto.c (lto_materialize_function): Do not push struct function.
1486 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1487 (may_need_named_section_p): Even abstract origins may need
1488 named section.
1489
315f8c0e
DM
14902013-07-30 David Malcolm <dmalcolm@redhat.com>
1491
1492 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1493 PASS_MANAGER_H.
1494
1495 * lto.c (do_whole_program_analysis): Update for move of
1496 all_regular_ipa_passes from a global to a field of class
1497 pass_manager.
1498
1aa95df7
OB
14992013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1500
1501 * lto-partition.c: Fix typos.
1502
c525ba9a
JH
15032013-06-20 Jan Hubicka <jh@suse.cz>
1504
1505 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1506 partitioning of variables.
1507
7a89ad00
JH
15082013-06-20 Jan Hubicka <jh@suse.cz>
1509
1510 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1511
6a6dac52
JH
15122013-06-19 Jan Hubicka <jh@suse.cz>
1513
1514 * lto-partition.c (add_references_to_partition): Use
1515 ctor_for_folding.
1516
ac0511f2
RB
15172013-06-18 Richard Biener <rguenther@suse.de>
1518
1519 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1520 and use it.
1521 (lto_register_function_decl_in_symtab): Likewise.
1522 (cmp_tree): New function.
1523 (unify_scc): Instead of using the streamer cache map from entry
1524 to cache index match up the two maps we have by sorting them.
1525 Adjust calls to lto_register_var_decl_in_symtab and
1526 lto_register_function_decl_in_symtab.
1527
ee03e71d
RB
15282013-06-17 Richard Biener <rguenther@suse.de>
1529
1530 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1531 * lto.c: Include data-streamer.h.
1532 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1533 (gimple_type_leader_entry_s, gimple_type_leader,
1534 gimple_lookup_type_leader): Remove.
1535 (gtc_visit): Simplify.
1536 (gimple_types_compatible_p): Likewise.
1537 (gimple_register_type_1): Likewise. Merge into ...
1538 (gimple_register_type): ... this. Keep it as legacy for
1539 statistics purposes for now.
1540 (fixup_integer_cst): Remove.
1541 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1542 rename to ...
1543 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1544 maybe_remember_with_vars_*): ... these.
1545 (uniquify_nodes): Remove.
1546 (lto_fixup_prevailing_type): New function.
1547 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1548 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1549 (num_merged_types, num_prevailing_types, num_not_merged_types,
1550 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1551 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1552 num_scc_compare_collisions): New global counters.
1553 (compare_tree_sccs_1): New function.
1554 (compare_tree_sccs): Likewise.
1555 (unify_scc): Likewise.
1556 (lto_read_decls): Stream in tree SCCs and unify them on the
1557 way in. Finalize prevailing SCC tree members.
1558 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1559 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1560 to ggc-collect during merging.
1561 (print_lto_report_1): Adjust for new merging code.
1562
ca0f62a8
JH
15632013-06-12 Jan Hubicka <jh@suse.cz>
1564
1565 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1566
bbf9ad07
JH
15672013-06-12 Jan Hubicka <jh@suse.cz>
1568
1569 * lto.c (register_resolution): Take lto_file_data argument.
1570 (lto_register_var_decl_in_symtab,
1571 lto_register_function_decl_in_symtab): Update.
1572 (read_cgraph_and_symbols): Update resolution_map handling.
1573
ecdbd01a 15742013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
1575
1576 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1577 (add_symbol_to_partition_1): Likewise.
1578 (contained_in_symbol): Likewise.
1579 (lto_balanced_map): Likewise.
1580 (rename_statics): Drop weakref.
1581
a367df53
RB
15822013-06-05 Richard Biener <rguenther@suse.de>
1583
1584 * lto.c (num_merged_types): New global variable.
1585 (uniquify_nodes): Increase num_merged_types when merging a type.
1586 (print_lto_report_1): Output the number of merged types.
1587
40a7fe1e
JH
15882013-06-01 Jan Hubicka <jh@suse.cz>
1589
1590 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1591 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1592 (do_whole_program_analysis): Update dumping.
1593
e70670cf
JH
15942013-05-29 Jan Hubicka <jh@suse.cz>
1595
1596 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1597 flags.
1598 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1599
8ee05051
JH
16002013-05-15 Jan Hubicka <jh@suse.cz>
1601
1602 * lto-partition.c (privatize_symbol_name): Return true when
1603 privatizing happened.
1604 (rename_statics): Do not go into infinite loop when privatizing
1605 is not needed.
1606
427b248d
JM
16072013-05-16 Jason Merrill <jason@redhat.com>
1608
1609 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1610
9de04252
MJ
16112013-05-15 Martin Jambor <mjambor@suse.cz>
1612
1613 * lto-partition.c (lto_balanced_map): Print symbol order instead
1614 of node uids.
1615
2d6e4603
JH
16162013-05-15 Jan Hubicka <jh@suse.cz>
1617
1618 PR lto/57038
1619 PR lto/47375
1620 * lto-partition.c (get_symbol_class): Fix weakrefs.
1621 (lto_balanced_map): Fix weakrefs.
1622 (privatize_symbol_name): Remove unnecesary label.
1623 (rename_statics): Handle weakrefs as statics.
1624
64cfa6c0
JH
16252013-05-09 Jan Hubicka <jh@suse.cz>
1626 Richard Biener <rguenther@suse.de>
1627
1628 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1629 (lto_register_var_decl_in_symtab): Likewise.
1630 (lto_main): Promote statics.
1631 * lto-partition.c (privatize_symbol_name): New function.
1632 (promote_symbol): Use it.
1633 (may_need_named_section_p): New predicate.
1634 (rename_statics): New functions.
1635 (lto_promote_cross_file_statics): Simplify; do renaming.
1636 (lto_promote_statics_nonwpa): New function.
1637 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1638
e45cde98
RB
16392013-02-08 Richard Biener <rguenther@suse.de>
1640
1641 PR lto/56231
1642 * lto-lang.c (lto_init): Do not enter a dummy file.
1643
6edc3e32
UB
16442013-02-07 Uros Bizjak <ubizjak@gmail.com>
1645
1646 PR bootstrap/56227
1647 * lto.c (lto_resolution_ready): Use %wx instead of
1648 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1649
ed73881e
RG
16502013-02-04 Richard Guenther <rguenther@suse.de>
1651
1652 PR lto/56168
1653 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1654 or lto_fixup_decls at LTRANS time.
1655
a19b1432
JH
16562013-01-09 Jan Hubicka <jh@suse.cz>
1657
1658 PR lto/45375
1659 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1660
49c01f87
L
16612012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1662
1663 PR lto/55466
1664 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1665 variables.
1666 (lto_main): Record the global variables if WPA isn't enabled.
1667
6e1aa848
DN
16682012-11-20 Diego Novillo <dnovillo@google.com>
1669 Jakub Jelinek <jakub@redhat.com>
1670
1671 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1672
9771b263
DN
16732012-11-16 Diego Novillo <dnovillo@google.com>
1674
1675 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1676
1677 * lto-lang.c: Use new vec API in vec.h.
1678 * lto-partition.c: Likewise.
1679 * lto-partition.h: Likewise.
1680 * lto.c: Likewise.
1681
24551b9c
LC
16822012-10-31 Lawrence Crowl <crowl@google.com>
1683
1684 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1685 down-cast via dyn_cast.
1686 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1687 (undo_partition): Likewise.
1688 (lto_balanced_map): Likewise.
1689 (get_symbol_class): Likewise and via is_a.
1690 (lto_balanced_map): Change symtab checking to is_a.
1691
aec06f6f
RB
16922012-10-12 Richard Biener <rguenther@suse.de>
1693
1694 PR lto/54898
1695 * lto.c (gimple_types_compatible_p_1): Also compare
1696 TYPE_MAIN_VARIANT.
1697 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1698
0b8c30f9
TB
16992012-10-09 Tobias Burnus <burnus@net-b.de>
1700
1701 * lto-lang.c (lto_register_builtin_type): Avoid useless
1702 decl creation.
1703 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1704
da3202a8
TB
17052012-10-08 Tobias Burnus <burnus@net-b.de>
1706
1707 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1708 Free lto_file struct after closing the file.
1709
2512a443
JH
17102012-10-08 Jan Hubicka <jh@suse.cz>
1711
1712 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1713 (fixup_integer_cst): New functoin.
1714 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1715
e75f8f79
JH
17162012-10-07 Jan Hubicka <jh@suse.cz>
1717
1718 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1719 release input encoders.
1720 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1721
46591697
JH
17222012-10-06 Jan Hubicka <jh@suse.cz>
1723
1724 PR lto/54790
1725 * lto.c (resolution_map): New static var.
1726 (register_resolution): New function.
1727 (lto_register_var_decl_in_symtab): Use it.
1728 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1729
af16bc76
MJ
17302012-09-20 Martin Jambor <mjambor@suse.cz>
1731
1732 * lto.c (lto_materialize_function): Call push_struct_function and
1733 pop_cfun.
1734
5368224f
DC
17352012-09-19 Dehao Chen <dehao@google.com>
1736
1737 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1738
b5493fb2
JH
17392012-09-19 Jan Hubicka <jh@suse.cz>
1740
1741 * lto.c (lto_materialize_function): Update confused comment.
1742 (read_cgraph_and_symbols): Do not free symtab.
1743
c3c445e1
JH
17442012-09-12 Jan Hubicka <jh@suse.cz>
1745
1746 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1747 AUX pointer cleaning. Add max partitioning.
1748 * lto-partition.c (enum symbol_class): New.
1749 (get_symbol_class): New function.
1750 (symbol_partitioned_p): New function.
1751 (add_references_to_partition): Remove.
1752 (add_aliases_to_partition): Remove.
1753 (add_cgraph_node_to_partition_1): Remove.
1754 (add_cgraph_node_to_partition): Remove.
1755 (add_symbol_to_partition): New function.
1756 (add_symbol_to_partition_1): New function.
1757 (contained_in_symbol): New function.
1758 (partition_cgraph_node_p): Remove.
1759 (partition_varpool_node_p): Remove.
1760 (partition_symbol_p): Remove.
1761 (lto_1_to_1_map): Cleanup.
1762 (lto_max_map): New.
1763 (lto_balanced_map): Update.
1764 (lto_promote_cross_file_statics): Update.
1765 * lto-partition.h (lto_max_map): Declare.
1766 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1767
b5c7cdfb
JH
17682012-09-11 Jan Hubicka <jh@suse.cz>
1769
1770 PR lto/54312
1771 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1772 type is variant leader.
1773
b29402f0
RG
17742012-09-11 Richard Guenther <rguenther@suse.de>
1775
1776 * lto.c (enum gtc_mode): Remove.
1777 (struct type_pair_d): Adjust.
1778 (lookup_type_pair): Likewise.
1779 (gimple_type_leader): Do not mark as deletable.
1780 (gimple_lookup_type_leader): Adjust.
1781 (gtc_visit): Likewise.
1782 (gimple_types_compatible_p_1): Likewise.
1783 (gimple_types_compatible_p): Likewise.
1784 (gimple_type_hash): Likewise.
1785 (gimple_register_type): Likewise.
1786 (read_cgraph_and_symbols): Manage lifetime of tables
1787 here.
1788
b8f4e58f
RG
17892012-09-11 Richard Guenther <rguenther@suse.de>
1790
1791 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1792 struct type_pair_d, lookup_type_pair, struct sccs,
1793 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1794 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1795 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1796 visit, iterative_hash_name, struct type_hash_pair,
1797 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1798 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1799 Move here from gimple.c
1800 (read_cgraph_and_symbols): Free hash tables here.
1801 (print_lto_report_1): New function wrapping print_lto_report.
1802 (do_whole_program_analysis): Call it.
1803 (lto_main): Likewise.
1804
1cdbb3f9
JH
18052012-09-10 Jan Hubicka <jh@suse.cz>
1806
1807 * lto-partition.c (partition_symbol_p): Forward declare.
1808 (add_references_to_partition): Reimplement using partition_symbol_p.
1809 (add_aliases_to_partition): Break out from add_references_to_partition;
1810 reimplement using partition_symbol_p.
1811 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1812 add sanity checks.
1813 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1814 (partition_varpool_node_p): Do not special case aliases.
1815
b4661bfe
JH
18162012-08-12 Jan Hubicka <jh@suse.cz>
1817
1818 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1819 it is deleted after streaming.
1820 * lto-partition.c (partition_symbol_p): New function.
1821 (promote_var, promote_fn): Remove.
1822 (promote_symbol): New function.
1823 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1824 to lookup the actual boundaries instead of computing them ad-hoc.
1825
7b99cca4
JH
18262012-08-12 Jan Hubicka <jh@suse.cz>
1827
1828 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1829 in partitioning.
1830 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1831 by encoder.
1832 * lto-partition.c (new_partition): Update.
1833 * lto.c (cmp_partitions_order): Update.
1834 (lto_wpa_write_files): Update.
1835 (free_ltrans_partitions): Update.
1836 (add_references_to_partition): Update.
1837 (add_cgraph_node_to_partition_1): Update.
1838 (add_cgraph_node_to_partition): Update.
1839 (add_varpool_node_to_partition): Update.
1840 (undo_partition): Update.
1841 (lto_balanced_map): Update.
1842 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1843 set_referenced_from_this_partition_p): Update.
1844 (lto_promote_cross_file_statics): Update.
1845
f27c1867
JH
18462012-08-12 Jan Hubicka <jh@suse.cz>
1847
1848 * lto-partition.c (set_referenced_from_other_partition_p,
1849 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1850 New functions.
1851 (lto_promote_cross_file_statics): Use them.
1852
ab96cc5b
JH
18532012-07-24 Jan Hubicka <jh@suse.cz>
1854
1855 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1856
0229aee9
UB
18572012-07-24 Uros Bizjak <ubizjak@gmail.com>
1858
1859 * lto-tree.h (lang_decl): Add variable_size GTY option.
1860
7ee2468b
SB
18612012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1862
1863 * lto.c: Do not include timevar.h.
1864 * Make-lang.in: Fix dependencies.
1865
a910399d
LC
18662012-06-18 Lawrence Crowl <crowl@google.com>
1867
1868 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1869 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1870 to lto_wpa_write_files.
1871 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1872 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1873 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1874 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1875 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1876 to be a front end, but is not one.
1877
877ab5e9
JH
18782012-05-18 Jan Hubicka <jh@suse.cz>
1879
1880 * lto.c (lto_materialize_constructors_and_inits): Remove.
1881 (read_cgraph_and_symbols): Remove handling of alias pairs.
1882
6649df51
JH
18832012-05-17 Jan Hubicka <jh@suse.cz>
1884
1885 * lto-partition.c (add_references_to_partition): Handle external vars.
1886 (partition_varpool_node_p): Likewise.
1887 (lto_promote_cross_file_statics): Do not promote externals.
1888
d1ede5f4
BS
18892012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1890
1891 * lto-lang.c (handle_fnspec_attribute): New static function.
1892 (lto_attribute_table): Add "fn spec".
1893 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1894
0d6bf48c
JH
18952012-05-04 Jan Hubicka <jh@suse.cz>
1896
1897 * lto.c (do_whole_program_analysis): Set timevars correctly.
1898 (lto_main): Likewise.
d1ede5f4 1899
1d67dde8
RB
19002012-05-04 Richard Guenther <rguenther@suse.de>
1901
1902 * lang.opt (fwpa): Do not mark as Optimization.
1903 (fltrans): Likewise.
1904
65d630d4
JH
19052012-04-30 Jan Hubicka <jh@suse.cz>
1906
1907 * lto.c (lto_main): Use compile ().
1d67dde8
RB
1908 * lto-partition.c (partition_cgraph_node_p): Use
1909 symtab_used_from_object_file_p.
65d630d4
JH
1910 (partition_varpool_node_p): Likewise.
1911
ead84f73
JH
19122012-04-20 Jan Hubicka <jh@suse.cz>
1913
1914 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1915
5932a4d4
JH
19162012-04-18 Jan Hubicka <jh@suse.cz>
1917
1918 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1919 Update for new ipa-ref API.
1920
65c70e6b
JH
19212012-04-16 Jan Hubicka <jh@suse.cz>
1922
1923 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1924 walkers to walk cgraph and varpool.
1925 (materialize_cgraph): Likewise.
1926 * lto-partition.c (lto_1_to_1_map): Likewise.
1927 (lto_balanced_map): Likewise.
1928 (lto_promote_cross_file_statics): Likewise.
1929
960bfb69
JH
19302012-04-14 Jan Hubicka <jh@suse.cz>
1931
1932 * lto.c: Update field referenced for new cgraph/varpool layout.
1933 * lto-partition.c: Likewise.
1934
a66dc285
JH
19352012-04-11 Jan Hubicka <jh@suse.cz>
1936
1937 * lto.c: Update copyright; remove params.h, ipa-inline.h
1938 and ipa-utils.h inlines; inline lto-partition.h
1939 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1940 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1941 add_references_to_partition, add_cgraph_node_to_partition_1,
1942 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1943 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1944 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1945 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1946 * lto-partition.c: ... here; new file.
1947 * lto-partition.h: New file.
1948 * Make-lang.in (lto.o): Update dependencies.
1949 (lto-partition.o): New.
1950
f3b249e5
RG
19512012-04-05 Richard Guenther <rguenther@suse.de>
1952
1953 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1954 definition.
1955
21fa2faf
RG
19562012-03-12 Richard Guenther <rguenther@suse.de>
1957
1958 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1959
6bb485a3
RG
19602012-03-06 Richard Guenther <rguenther@suse.de>
1961
1962 PR lto/52097
1963 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1964
95510497
RG
19652012-02-28 Richard Guenther <rguenther@suse.de>
1966
1967 PR lto/52400
1968 * lto.c (lto_register_function_decl_in_symtab): Do not register
1969 a reverse renamed decl mapping.
1970
09228fef
JJ
19712012-01-06 Jakub Jelinek <jakub@redhat.com>
1972
1973 PR lto/51774
1974 * lto-lang.c (handle_returns_twice_attribute): New function.
1975 (lto_attribute_table): Add returns_twice attribute.
1976
b03eda0d
RG
19772011-12-21 Richard Guenther <rguenther@suse.de>
1978
1979 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1980 (LTO_FIXUP_TREE): Use it.
1981 (uniquify_nodes): Mark new non-prevailing types and avoid
1982 calling gimple_register_type on others.
1983 (lto_read_decls): Add comment.
1984
4ad9a9de
EB
19852011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1986
1987 * lto.h (lto_parse_hex): Delete.
1988 * lto.c (lto_read_decls): Use 'int' for offsets.
1989 (lto_parse_hex): Make static and return proper 64-bit host type.
1990 (lto_resolution_read): Use proper 64-bit host type.
1991
ea973bad
RG
19922011-12-13 Richard Guenther <rguenther@suse.de>
1993
1994 PR lto/48354
1995 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1996 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1997
c8218030
UB
19982011-12-01 Uros Bizjak <ubizjak@gmail.com>
1999
2000 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
2001 (ignore_attribute): New.
2002
57ac2606
AH
20032011-11-21 Aldy Hernandez <aldyh@redhat.com>
2004
2005 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
2006 (handle_transaction_pure_attribute): New.
2007
52a35ef7
RG
20082011-11-03 Richard Guenther <rguenther@suse.de>
2009
2010 PR lto/44965
2011 * lto-lang.c (lto_post_options): Do not read file options.
2012 * lto.c (lto_read_all_file_options): Remove.
2013 (lto_init): Call lto_set_in_hooks here.
2014
51973b1e
JH
20152011-10-09 Jan Hubicka <jh@suse.cz>
2016
2017 * lto.c (node_cmp, varpool_node_cmp): New functions.
2018 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
2019 (cmp_partitions): Rename to ...
2020 (cmp_partitions_size): ... this one.
2021 (cmp_partitions_order): New function.
2022 (lto_wpa_write_files): Sort partitions by order when
2023 -fno-toplevel-reorder is used.
2024
5958009b
AK
20252011-10-09 Andi Kleen <ak@linux.intel.com>
2026
2027 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
2028
e79983f4
MM
20292011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2030
2031 * lto-lang.c (def_builtin_1): Delete old interface with two
2032 parallel arrays to hold standard builtin declarations, and replace
2033 it with a function based interface that can support creating
2034 builtins on the fly in the future. Change all uses, and poison
2035 the old names. Make sure 0 is not a legitimate builtin index.
2036
ecdbd01a 20372011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
2038
2039 * lto-object.c (lto_obj_add_section_data): Add list.
2040 (lto_obj_add_section): Fill in list.
2041 (ltoobj_build_section_table): Pass through list.
2042 * lto.c (file_data_list): Declare.
2043 (create_subid_section_table): Pass arguments directly.
2044 Fill in list of file_datas.
2045 (lwstate): Delete.
2046 (lto_create_files_from_ids): Pass in direct arguments.
2047 Don't maintain list.
2048 (lto_file_read): Use explicit section and file data lists.
2049 (lto_read_all_file_options): Pass in section_list.
2050 * lto.h (lto_obj_build_section_table): Add list.
2051 (lto_section_slot): Add next.
2052 (lto_section_list): Declare.
2053
ed0d2da0
JH
20542011-10-02 Jan Hubicka <jh@suse.cz>
2055
2056 PR lto/47247
2057 * common.c (lto_resolution_str): Add new resolution.
2058 * common.h (lto_resolution_str): Likewise.
2059
ad7715f3
L
20602011-09-30 H.J. Lu <hongjiu.lu@intel.com>
2061 Andi Kleen <ak@linux.intel.com>
2062
2063 PR lto/50568
2064 * lto.c (lto_splay_tree_delete_id): New.
2065 (lto_splay_tree_compare_ids): Likewise.
2066 (lto_splay_tree_lookup): Likewise.
2067 (lto_splay_tree_id_equal_p): Likewise.
2068 (lto_splay_tree_insert): Likewise.
2069 (lto_splay_tree_new): Likewise.
2070 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
2071 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2072 (create_subid_section_table): Use lto_splay_tree_lookup and
2073 lto_splay_tree_insert.
2074 (lto_file_read): Use lto_splay_tree_new.
2075
ecdbd01a 20762011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2077
2078 * lto.c (lto_resolution_read): Remove id dumping.
2079 (lto_section_with_id): Turn id HOST_WIDE_ID.
2080 (create_subid_section_table): Dito.
2081
892a371f
DS
20822011-08-28 Dodji Seketeli <dodji@redhat.com>
2083
2084 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2085 linemap_add twice.
2086
f82d1a94
MJ
20872011-08-11 Martin Jambor <mjambor@suse.cz>
2088
2089 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2090
f0efc7aa
DN
20912011-08-08 Diego Novillo <dnovillo@google.com>
2092
2093 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2094 * lto.c: Include tree-streamer.h.
2095
1a072294
RG
20962011-07-06 Richard Guenther <rguenther@suse.de>
2097
2098 * lto-lang.c (lto_init):
2099 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2100
7496868d
JH
21012011-06-11 Jan Hubicka <jh@suse.cz>
2102
10f13f22 2103 PR lto/48246
7496868d
JH
2104 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2105 (lto_balanced_map): Likewise.
2106
39e2db00
JH
21072011-06-11 Jan Hubicka <jh@suse.cz>
2108
2109 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2110 (add_cgraph_node_to_partition) ... here; walk aliases.
2111 (lto_1_to_1_map): Remove same body alias code.
2112 (promote_fn): Likewise.
2113 (lto_promote_cross_file_statics): Update comment.
2114
2115
28628ea6
DN
21162011-06-07 Diego Novillo <dnovillo@google.com>
2117
2118 * lto.c (uniquify_nodes): Move code to register decls to
2119 the loop that computes canonical types.
2120
009db074
RG
21212011-06-07 Richard Guenther <rguenther@suse.de>
2122
2123 * lto-lang.c (lto_init): Do not set
2124 size_type_node or call set_sizetype.
2125
47c79d56
DN
21262011-06-04 Diego Novillo <dnovillo@google.com>
2127
2128 * lto.c (lto_init): New.
2129 (lto_main): Call it.
2130
d5828cc7
DN
21312011-06-03 Diego Novillo <dnovillo@google.com>
2132
2133 * lto.c (get_resolution): Move from lto-streamer-in.c.
2134 (lto_register_var_decl_in_symtab): Likewise.
2135 (lto_register_function_decl_in_symtab): Likewise.
2136 (uniquify_nodes): Call lto_register_var_decl and
2137 lto_register_function_decl_in_symtab after reading a new
2138 VAR_DECL or FUNCTION_DECL.
2139
6807da97
RG
21402011-06-01 Richard Guenther <rguenther@suse.de>
2141
2142 * lto-lang.c (lto_register_canonical_types): New function.
2143 (lto_init): Register common nodes with the canonical type machinery.
2144 Do not play tricks with char_type_node.
2145
d74be317
RG
21462011-05-26 Richard Guenther <rguenther@suse.de>
2147
2148 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2149
d9f8303f
NF
21502011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2151
2152 * lto.c (lto_ft_typed): New function.
2153 (lto_ft_common): Call it.
2154 (lto_ft_constructor): Likewise.
2155 (lto_ft_expr): Likewise.
2156 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2157 TREE_CHAIN.
2158
fb291a1e
RG
21592011-05-20 Richard Guenther <rguenther@suse.de>
2160
2161 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2162 (lto_ft_type): Move main-variant and pointer-to chain building ...
2163 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2164 in a separate final loop.
2165
31b3ca64
RG
21662011-05-19 Richard Guenther <rguenther@suse.de>
2167
2168 * lto.c (uniquify_nodes): First register all types before
2169 fixing up the tree SCC.
2170
35d828c5
JH
21712011-05-11 Jan Hubicka <jh@suse.cz>
2172
2173 PR lto/48952
2174 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2175
51545682
NF
21762011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2177
2178 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2179 location of binfo field.
2180 (lto_fixup_prevailing_decls): Likewise.
2181
8242dd04
NF
21822011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2183
2184 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2185 build_function_type_array or build_varargs_function_type_array
2186 instead.
2187
c99c0026
EB
21882011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2189
2190 * lto-lang.c (global_bindings_p): Return bool.
2191
c47d0034
JH
21922011-05-07 Jan Hubicka <jh@suse.cz>
2193
a9bcb3f0
EB
2194 * lto.c (lto_materialize_function): Use
2195 cgraph_function_with_gimple_body_p.
2196 (add_cgraph_node_to_partition): Do not re-add items to partition;
2197 handle thunks.
c47d0034
JH
2198 (add_varpool_node_to_partition): Do not re-add items to partition.
2199
bb3398ca
JH
22002011-05-03 Jan Hubicka <jh@suse.cz>
2201
2202 * lto.c (free_ltrans_partitions): Fix accidental commit.
2203
1cb1a99f
JH
22042011-05-03 Jan Hubicka <jh@suse.cz>
2205
2206 * lto.c (ltrans_partition_def): Remove GTY annotations.
2207 (ltrans_partitions): Move to heap.
2208 (new_partition): Update.
2209 (free_ltrans_partitions): New function.
2210 (lto_wpa_write_files): Use it.
2211
af8bca3c
MJ
22122011-04-29 Martin Jambor <mjambor@suse.cz>
2213
2214 * lto.c: Include ipa-utils.h.
2215 (lto_balanced_map): Update call to ipa_reverse_postorder.
2216 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2217
b823cdfe
MM
22182011-04-29 Michael Matz <matz@suse.de>
2219
2220 * lto.c (toplevel): Include tree-flow.h.
2221 (lto_read_in_decl_state): Don't merge types here.
2222 (tree_with_vars): New static hash table.
2223 (remember_with_vars): New static functions.
2224 (LTO_FIXUP_TYPE): New macro.
2225 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2226 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2227 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2228 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2229 (lto_read_decls): Uniquify while reading in trees.
2230 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2231 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2232 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2233 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2234 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2235 lto_fixup_tree): Remove.
2236 (lto_fixup_state): Remove data argument. Use
2237 lto_symtab_prevailing_decl.
2238 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2239 (lto_fixup_prevailing_decls): New function.
2240 (lto_fixup_state_aux): Argument aux is unused.
2241 (lto_fixup_decls): Don't allocate pointer sets, don't use
2242 lto_fixup_tree, use lto_fixup_prevailing_decls.
2243 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2244 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2245
b9843260
EB
22462011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2247
2248 * lto.c (lto_balanced_map): Fix typos in head comment.
2249 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2250 test.
2251
e7f23018
JH
22522011-04-16 Jan Hubicka <jh@suse.cz>
2253
2254 * lto.c (lto_balanced_map): Update.
2255
10a5dd5d
JH
22562011-04-14 Jan Hubicka <jh@suse.cz>
2257
2258 * lto.c: Include ipa-inline.h
b9843260
EB
2259 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2260 accessor.
10a5dd5d
JH
2261 (ipa_node_duplication_hook): Fix declaration.
2262 * Make-lang.in (lto.o): Update dependencies.
2263
81f653d6
NF
22642011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2265
2266 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2267 calling TREE_CHAIN.
2268 * lto.c (lto_fixup_common): Likewise.
2269
dcf0c47e
NF
22702011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2271
2272 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2273 (handle_type_generic_attribute): Likewise.
2274
e89964e3
MM
22752011-04-03 Michael Matz <matz@suse.de>
2276
2277 * lto.c (lto_materialize_function): Don't read and then discard
2278 sections in WPA mode.
2279 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2280
2281 * lto-lang.c (registered_builtin_fndecls): Remove.
2282 (lto_getdecls): Return NULL_TREE.
2283 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2284
d2b3fe18
RG
22852011-03-31 Richard Guenther <rguenther@suse.de>
2286
2287 PR lto/48246
2288 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2289 partitions when checking is not enabled.
2290
ba78087b
KT
22912011-03-25 Kai Tietz <ktietz@redhat.com>
2292
2293 * lto.c (lto_resolution_read): Use filename_cmp instead
2294 of strcmp.
2295 (lto_read_section_data): Likewise.
2296
0edf1bb2
JL
22972011-03-25 Jeff Law <law@redhat.com>
2298
2299 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2300
62d784f7
KT
23012011-03-21 Kai Tietz <ktietz@redhat.com>
2302
2303 PR target/12171
2304 * lto-lang.c (lto_attribute_table): Adjust table.
2305
62dd9571
JJ
23062011-02-18 Jakub Jelinek <jakub@redhat.com>
2307
2308 PR bootstrap/47807
2309 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2310 of lto-streamer.h.
2311
237d6259
RG
23122011-02-18 Richard Guenther <rguenther@suse.de>
2313
2314 PR lto/47798
2315 * lto-tree.h (lto_global_var_decls): Do not declare here.
2316 * lto-lang.c: Include lto-streamer.h.
2317 * Make-lang.in (lto-lang.o): Adjust dependencies.
2318
8ead2223
KT
23192011-02-10 Kai Tietz <kai.tietz@onevision.com>
2320
2321 PR lto/47241
2322 * lto.c (lto_read_section_data): Free
2323 fd_name in failure case.
2324 For mingw targets don't hash file-descriptor.
2325 (read_cgraph_and_symbols): Close current_lto_file
2326 in failure case.
2327
6e701822
JH
23282011-01-11 Jan Hubicka <jh@suse.cz>
2329
2330 PR lto/45721
2331 PR lto/45375
b9843260
EB
2332 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2333 are not partitioned.
6e701822 2334
f4da8dce
NF
23352010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2336
2337 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2338 Use prototype_p.
2339
6b7fb143
RG
23402010-12-06 Richard Guenther <rguenther@suse.de>
2341
2342 PR lto/46796
2343 * lto-lang.c (lto_init): Give names to basic types.
2344
c59ffc41
JM
23452010-11-30 Joseph Myers <joseph@codesourcery.com>
2346
2347 * lto-object.c: Don't include toplev.h.
2348 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2349
7c475d11
JM
23502010-11-30 Joseph Myers <joseph@codesourcery.com>
2351
2352 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2353 $(TOPLEV_H).
2354
71f3e391
JM
23552010-11-29 Joseph Myers <joseph@codesourcery.com>
2356
2357 * lto-endian.h: Delete.
2358 * lto-object.c: Don't include "libiberty.h".
2359 (O_BINARY): Don't define.
2360 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2361 (O_BINARY): Don't define.
2362
9f1718b0
RG
23632010-11-23 Richard Guenther <rguenther@suse.de>
2364
2365 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2366
39c4e298
RG
23672010-11-23 Richard Guenther <rguenther@suse.de>
2368
2369 PR lto/46605
2370 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2371
b37421c6
JM
23722010-11-17 Joseph Myers <joseph@codesourcery.com>
2373
2374 * lto.c (lto_main): Take no arguments.
2375 * lto.h (lto_main): Update prototype.
2376
d82f74d3
ILT
23772010-11-16 Ian Lance Taylor <iant@google.com>
2378
2379 * lto-object.c (lto_obj_file_open): Call
2380 simple_object_attributes_merge rather than
2381 simple_object_attributes_compare.
2382
a4d8c676
JM
23832010-11-12 Joseph Myers <joseph@codesourcery.com>
2384
2385 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2386 * lto-lang.c (lto_handle_option): Take location_t parameter.
2387
d8a07487
JM
23882010-11-10 Joseph Myers <joseph@codesourcery.com>
2389
2390 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2391 letters and remove trailing '.'.
2392 (lto_file_finalize): Start diagnostic with a lowercase letter.
2393
6b3456d1
ILT
23942010-11-02 Ian Lance Taylor <iant@google.com>
2395
2396 * lto-object.c: New file.
2397 * lto-elf.c: Remove file.
2398 * lto-macho.c: Remove file.
2399 * lto-macho.h: Remove file.
2400 * lto-coff.c: Remove file.
2401 * lto-coff.h: Remove file.
2402 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2403 lto/lto-object.o.
2404 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2405 (lto/lto-objfile.o): New target.
2406 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2407 (lto/lto.o): Remove $(LIBIBERTY_H).
2408
030cd86c
JH
24092010-10-22 Jan Hubicka <jh@suse.cz>
2410
2411 * lto.c (add_cgraph_node_to_partition,
2412 add_varpool_node_to_partition): Add debug info.
2413 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2414 partitioned nodes.
2415 (do_whole_program_analysis): Set function flags before dumping.
2416
4490cae6
RG
24172010-10-22 Richard Guenther <rguenther@suse.de>
2418
2419 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2420 the new gimple_register_canonical_type.
2421
703cdce3
L
24222010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2423
2424 PR bootstrap/45954
2425 * config-lang.in (boot_language): Set to $enable_lto.
2426
1915c739
JJ
24272010-10-18 Jakub Jelinek <jakub@redhat.com>
2428
2429 PR lto/45638
2430 * Make-lang.in (check-lto): New dummy target.
2431
82971de5
EB
24322010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2433
2434 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2435
a75bfaa6
JM
24362010-10-08 Joseph Myers <joseph@codesourcery.com>
2437
2438 * lto-lang.c (lto_init_options): Change to
2439 lto_init_options_struct. Update parameters.
2440 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2441 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2442
937f7f69
JH
24432010-10-06 Jan Hubicka <jh@suse.cz>
2444
2445 * lto.c (lto_balanced_map): Fix accounting of program size.
2446
2169830c
JH
24472010-10-06 Jan Hubicka <jh@suse.cz>
2448
2449 * lto.c (lto_balanced_map): Do not produce empty partitions.
2450
ecdbd01a 24512010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2452
2453 * lto.c (lto_process_name): Add.
2454 (lto_main): Call lto_process_name.
2455
06ed016f
JH
24562010-10-06 Jan Hubicka <jh@suse.cz>
2457
2458 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2459 COMDATs required by the linker.
2460
ae718d66
ILT
24612010-10-05 Ian Lance Taylor <iant@google.com>
2462
2463 * lto.c (lto_section_with_id): Make s a const pointer.
2464
852e4bd2
JH
24652010-10-05 Jan Hubicka <jh@suse.cz>
2466
2467 * lto.c: Include params.h.
2468 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2469 refcounting in aux field.
2470 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2471 New functions.
2472 (lto_1_to_1_map): Simplify.
2473 (lto_balanced_map): New function.
2474 (do_whole_program_analysis): Chose proper partitioning alg.
2475 * Make-lang.in (lto.o): Add dependency on params.h
2476
ecdbd01a 24772010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2478
2479 * Make-lang.in (lto1): Add + to build rule.
2480
ecdbd01a 24812010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2482
2483 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2484 with fatal_error.
2485
0d6e14fd
JH
24862010-09-28 Jan Hubicka <jh@suse.cz>
2487
2488 * lto-lang.c (handle_leaf_attribute): New function.
2489 (lto_attribute_tables): Add leaf.
2490
fb462383
JZ
24912010-09-25 Jie Zhang <jie@codesourcery.com>
2492
2493 * lto.c (lto_read_all_file_options): Start a new line after
2494 printing out file names.
2495
051f8cc6
JH
24962010-09-24 Jan Hubicka <jh@suse.cz>
2497
2498 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2499
64e0f5ff
JH
25002010-09-20 Jan Hubicka <jh@suse.cz>
2501
2502 PR tree-optimize/45605
2503 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2504
a929ec3d
GP
25052010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2506
2507 * lto-elf.c (lto_obj_file_open): Also provide filename when
2508 elf_begin fails.
2509
4c588abf
JH
25102010-09-17 Jan Hubicka <jh@suse.cz>
2511
2512 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2513
c3224d6f
RG
25142010-09-17 Richard Guenther <rguenther@suse.de>
2515
2516 * lang.opt (flag_wpa): Also enable for the driver.
2517
52b3b3c7
JH
25182010-09-16 Jan Hubicka <jh@suse.cz>
2519
2520 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2521 EXTERNAL flags.
2522
969c37b7
LB
25232010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2524
2525 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2526
098a4f50
JH
25272010-09-08 Jan Hubicka <jh@suse.cz>
2528
2529 * lto.c (real_file_count, real_file_decl_data): New static vars.
2530 (read_cgraph_and_symbols): Use it.
2531
0f443ad0
RG
25322010-09-08 Richard Guenther <rguenther@suse.de>
2533
2534 * lto.c (read_cgraph_and_symbols): Collect again after each
2535 file.
2536
ee187353
JH
25372010-09-07 Jan Hubicka <jh@suse.cz>
2538
2539 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2540
b3ec52d0
RG
25412010-09-03 Richard Guenther <rguenther@suse.de>
2542
2543 * lto-elf.c (validate_file): Always error if validation fails.
2544
f1395d4a
JH
25452010-08-20 Jan Hubicka <jh@suse.cz>
2546
2547 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2548 (lto_wpa_write_files): Update comments.
2549
2429bce3
L
25502010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2551
2552 PR bootstrap/45357
2553 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2554 with has_analyzed_clone_p.
2555
e0f967db
JH
25562010-08-20 Jan Hubicka <jh@suse.cz>
2557
2558 * lto.c (has_analyzed_clone_p): New function
2559 (lto_materialize_function): Use callgraph to determine if
2560 body is needed.
2561 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2562
ac47786e
NF
25632010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2564
2565 * lto.c: Use FOR_EACH_VEC_ELT.
2566
ecdbd01a 25672010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
2568
2569 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2570
5f20c657
JM
25712010-07-27 Joseph Myers <joseph@codesourcery.com>
2572
2573 * lto-lang.c (lto_handle_option): Update prototype and return
2574 value type. Remove duplicate assignment to result.
2575
7a9bf9a4
JM
25762010-07-27 Joseph Myers <joseph@codesourcery.com>
2577
2578 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2579 New.
2580 (lto_init_options): Update prototype.
2581 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2582 Define.
2583
ecdbd01a 25842010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
2585
2586 PR lto/44992
2587 * lto.c: Include splay-tree.h
2588 (lto_resolution_read): Change to walk file_ids tree and parse
2589 extra file_id in resolution file.
2590 (lto_section_with_id): Add.
2591 (create_subid_section_table): Add.
2592 (lwstate): Add.
2593 (lto_create_files_from_ids): Add.
2594 (lto_file_read): Change to handle sub file ids and create list
2595 of file_datas. Add output argument for count.
2596 (get_section_data): Pass file_data to lto_get_section_name.
2597 (lto_flatten_file): Add.
2598 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2599
ecdbd01a 26002010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
2601
2602 * lto-coff.c (hash_name, eq_name): Move.
2603 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2604 * lto-elf.c: (hash_name, eq_name): Move.
2605 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2606 * lto-macho.c: (hash_name, eq_name): Move.
2607 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2608 * lto.c: (hash_name, eq_name): Move from lto-*.c
2609 (lto_obj_create_section_hash_table): Add.
2610 (free_with_string): Add.
2611
718f9c0f
MLI
26122010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2613
2614 * lto-coff.c: Include diagnostic-core.h in every file that
2615 includes toplev.h.
2616 * lto-elf.c: Likewise.
2617 * lto-lang.c: Likewise.
2618 * lto-macho.c: Likewise.
2619
1b137837
JJ
26202010-07-07 Jakub Jelinek <jakub@redhat.com>
2621
2622 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2623 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2624 objects.
2625
92eb4438
JH
26262010-07-05 Jan Hubicka <jh@suse.cz>
2627
2628 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2629 nodes from same comdat group as well as all comdat functions referenced
2630 here.
b9843260
EB
2631 (add_varpool_node_to_partition, add_references_to_partition): New
2632 function.
2633 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2634 add_varpool_node_to_partition; clear aux flags when done.
2635 (lto_promote_cross_file_statics): Do not promote stuff that gets
2636 duplicated to each ltrans.
92eb4438 2637
a05541a9
JH
26382010-07-04 Jan Hubicka <jh@suse.cz>
2639
2640 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2641
4a2ac96f
RG
26422010-06-13 Richard Guenther <rguenther@suse.de>
2643
2644 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2645
1d536046
KT
26462010-06-09 Kai Tietz <kai.tietz@onevision.com>
2647
2648 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2649 * lto-coff.c (coff_write_object_file): Add braces to if.
2650
a9429e29
LB
26512010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2652
2653 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2654 (lto_file_read): Likewise.
2655 (new_partition): Likewise.
2656 (read_cgraph_and_symbols): Likewise.
2657
5498f011
JM
26582010-06-07 Joseph Myers <joseph@codesourcery.com>
2659
2660 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2661 (lto_handle_option): Don't set flag_signed_char here.
2662
d4c0c9f6
RG
26632010-06-04 Richard Guenther <rguenther@suse.de>
2664
2665 PR lto/41584
2666 * lto.c (lto_1_to_1_map): Use the proper file_data for
2667 varpool nodes.
2668
0a5fa5a1
JH
26692010-05-30 Jan Hubicka <jh@suse.cz>
2670
2671 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2672 partitioning decisions.
2673
9eec9488
JH
26742010-05-29 Jan Hubicka <jh@suse.cz>
2675
2676 * lto.c (bitmap vector): Remove.
2677 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2678 (ltrans_partition_def): New structure.
2679 (ltrans_partition): New type and VECtor.
2680 (new_partition): New function.
2681 (add_cgraph_node_to_partition): New function.
2682 (lto_1_to_1_map): Reorganize for partitions.
2683 (lto_add_inline_clones): Remove.
2684 (lto_add_all_inlinees): Remove.
2685 (lto_promote_cross_file_statics): Use partitions.
2686 (cmp_partitions): New function.
2687 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2688 use partitions; output files sorted by size.
2689
3e097227
SB
26902010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2691
2692 * Make-lang.in: Replace vec.h dependency with VEC_H.
2693
7ca92787
JM
26942010-05-28 Joseph Myers <joseph@codesourcery.com>
2695
2696 * lto-coff.c (coff_errmsg): Remove.
2697 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2698 errors instead of coff_errmsg (-1).
2699 * lto-macho.c (mach_o_errmsg): Remove.
2700 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2701 instead of mach_o_errmsg (-1).
2702 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2703 xstrerror (errno).
2704
b5611987
RG
27052010-05-28 Richard Guenther <rguenther@suse.de>
2706
2707 * lto.c (prefix_name_with_star): Removed.
2708 (strip_extension): Likewise.
2709 (get_filename_for_set): Likewise.
2710 (lto_write_ltrans_list): Fold into ...
2711 (lto_wpa_write_files): ... this. Name LTRANS units
2712 by suffixing the ltrans output list filename.
2713 (do_whole_program_analysis): Adjust.
2714
1da2ed5f
JM
27152010-05-27 Joseph Myers <joseph@codesourcery.com>
2716
2717 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2718 (read_cgraph_and_symbols, lto_main): Use seen_error.
2719 * Make-lang.in (lto/lto.o): Update dependencies.
2720
7951d88a
EB
27212010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2722
2723 PR lto/44230
2724 * lto.h (lto_eh_personality): New prototype.
2725 * lto.c: Include debug.h.
2726 (first_personality_decl): New static variable.
2727 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2728 first function for which it is non-null.
2729 (lto_eh_personality_decl): New static variable.
2730 (lto_eh_personality): New function.
2731 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2732 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2733
e12da9c2
SB
27342010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2735
2736 * lto-lang.c: Do not include expr.h.
2737
468194f4
RG
27382010-05-24 Richard Guenther <rguenther@suse.de>
2739
2740 * lto-elf.c (lto_obj_build_section_table): Work around
2741 FreeBSD libelf issue.
2742
bd9eb5da
RG
27432010-05-22 Richard Guenther <rguenther@suse.de>
2744
2745 * lto.c (read_cgraph_and_symbols): Do not collect.
2746
66576e1b
JH
27472010-05-20 Jan Hubicka <jh@suse.cz>
2748
2749 * lto.c (promote_var, promote_fn): New functions.
2750 (lto_promote_cross_file_statics): Compute correctly boundary including
2751 static initializers of readonly vars.
2752
36576655
JH
27532010-05-18 Jan Hubicka <jh@suse.cz>
2754
66576e1b 2755 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
2756 (lto_promote_cross_file_statics): Deal with non-inline clones.
2757
28632d63
JH
27582010-05-18 Jan Hubicka <jh@suse.cz>
2759
2760 * lto.c (lto_materialize_function): Announce function when
2761 reading body; allocate_struct_function only when reading body;
2762 do not finalize local statics; ggc_collect after reading;
2763 do not mark reachable node.
2764 (materialize_cgraph): Do not announce function.
2765
33e42d56
JH
27662010-05-11 Jan Hubicka <jh@suse.cz>
2767
2768 * lto.c (materialize_cgraph): Revert my previous patch.
2769
f6430ea5
KT
27702010-05-11 Kai Tietz <kai.tietz@onevision.com>
2771
2772 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2773 IMAGE_FILE_MACHINE_AMD64.
2774 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2775
0a0b07b7
JH
27762010-05-11 Jan Hubicka <jh@suse.cz>
2777
2778 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2779 (materialize_cgraph): Add it here.
2780
9a809897
JH
27812010-05-11 Jan Hubicka <jh@suse.cz>
2782
2783 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2784 vector.
2785
27862010-05-11 Jan Hubicka <jh@suse.cz>
2787
2788 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2789 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2790 use reachable_from_other_partition_p and
2791 referenced_from_other_partition_p test.
2792
94f64249
KT
27932010-05-11 Kai Tietz <kai.tietz@onevision.com>
2794
2795 * lto-coff.c (validate_file): Add x64-coff support.
2796 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2797 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2798 * lto-lang.c (lto_build_c_type_nodes): Add check for
2799 'long long unsigned int' for x64-windows.
2800 (lto_init): Likewise.
2801
2802
c082f9f3
SB
28032010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2804
2805 * lto.h (struct lto_file_struct): Document offset member.
2806 * lto-endian.h: New file.
2807 * lto-macho.h: New file.
2808 * lto-macho.c: New file.
2809 * Make-lang.in: Add rule for lto-macho.o.
2810
3f8257db 28112010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
2812
2813 PR lto/43857
2814 PR lto/43371
2815 * lang.opt (fresolution): Change to ...
2816 (fresolution=): ... this.
2817 * lto-lang.c (lto_handle_option): Adjust.
2818
48cf395b
RB
28192010-05-07 Richard Guenther <rguenther@suse.de>
2820
2821 * lto.c (DUMPBASE_SUFFIX): Remove.
2822 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2823 Rename to ...
2824 (lto_write_ltrans_list): ... only output the list of ltrans files.
2825 (lto_maybe_unlink): Remove.
2826 (do_whole_program_analysis): Do not execute LTRANS phase
2827 from here.
2828
afa83c15
L
28292010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2830
2831 * lto-lang.c (lto_handle_option): Add argument kind.
2832
369451ec
JH
28332010-05-05 Jan Hubicka <jh@suse.cz>
2834
48cf395b
RB
2835 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2836 refs.
369451ec 2837
2f41ecf5
JH
28382010-05-05 Jan Hubicka <jh@suse.cz>
2839
2840 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2841
ace72c88
JH
28422010-04-30 Jan Hubicka <jh@suse.cz>
2843
b9843260
EB
2844 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2845 use default name.
ace72c88
JH
2846 (lto_wpa_write_files): Write any non-empty partition.
2847
05575e07
JH
28482010-04-30 Jan Hubicka <jh@suse.cz>
2849
2850 * lto.c: Do not attempt to make constant pool references global.
2851
49ba8180
JH
28522010-04-28 Jan Hubicka <jh@suse.cz>
2853
2854 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2855 (lto_wpa_write_files): Announce what we are writting.
2856 (all_file_decl_data): New.
2857 (read_cgraph_and_symbols): Use GGC; correct timevars.
2858 (do_whole_program_analysis): Collect.
2859 * lto/Make-lang.in (lto.o): Fix dependency.
2860 * Makefile.in (GTFILES): Add lto-streamer.h.
2861 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2862 (varpool_assemble_pending_decls): Use VAROUT.
2863 * lto-streamer.h (lto_tree_ref_table): Annotate.
2864 (lto_in_decl_state): Annotate.
2865 (lto_file_decl_data): Annotate.
2866
2942c502
JH
28672010-04-28 Jan Hubicka <jh@suse.cz>
2868
2869 * lto.c (lto_varpool_node_sets): New.
2870 (lto_1_to_1_map): Partition varpool too.
2871 (globalize_context_t, globalize_cross_file_statics,
2872 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2873 lto_scan_statics_in_remaining_global_vars): Remove.
2874 (lto_promote_cross_file_statics): Rewrite.
2875 (get_filename_for_set): Take vset argument.
2876 (lto_wpa_write_files): Pass around vsets.
2877
3bec79c5
DK
28782010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2879
2880 PR lto/42776
2881 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2882 hardcoding 'lto-elf.o'.
2883 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2884
2885 * lto-coff.h: New file.
2886 * lto-coff.c: Likewise.
2887
21aac880
RG
28882010-04-26 Richard Guenther <rguenther@suse.de>
2889
2890 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2891
2cee0101
DK
28922010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2893
2894 * lto.h (lto_elf_file_open): Rename prototype from this ...
2895 (lto_obj_file_open): ... to this.
2896 (lto_elf_file_close): Likewise ...
2897 (lto_obj_file_close): ... and likewise.
2898 (lto_elf_build_section_table): Likewise ...
2899 (lto_obj_build_section_table): ... and likewise.
2900 (lto_elf_begin_section): Likewise ...
2901 (lto_obj_begin_section): ... and likewise.
2902 (lto_elf_append_data): Likewise ...
2903 (lto_obj_append_data): ... and likewise.
2904 (lto_elf_end_section): Likewise ...
2905 (lto_obj_end_section): ... and likewise.
2906 * lto.c (lto_file_read): Update references to the above.
2907 (lto_wpa_write_files): Likewise.
2908 (lto_read_all_file_options): Likewise.
2909 (read_cgraph_and_symbols): Likewise.
2910 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2911 (LANG_HOOKS_APPEND_DATA): Likewise.
2912 (LANG_HOOKS_END_SECTION): Likewise.
2913 * lto-elf.c (lto_elf_file_open): Rename from this ...
2914 (lto_obj_file_open): ... to this, updating any references.
2915 (lto_elf_file_close): Likewise ...
2916 (lto_obj_file_close): ... and likewise.
2917 (lto_elf_build_section_table): Likewise ...
2918 (lto_obj_build_section_table): ... and likewise.
2919 (lto_elf_begin_section): Likewise ...
2920 (lto_obj_begin_section): ... and likewise.
2921 (lto_elf_append_data): Likewise ...
2922 (lto_obj_append_data): ... and likewise.
2923 (lto_elf_end_section): Likewise ...
2924 (lto_obj_end_section): ... and likewise.
2925
bc58d7e1
JH
29262010-04-21 Jan Hubicka <jh@suse.cz>
2927
2928 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2929 (materialize_cgraph): Likewise.
2930
e792884f
JH
29312010-04-21 Jan Hubicka <jh@suse.cz>
2932
2933 * lto.c (lto_wpa_write_files): Update.
2934 (read_cgraph_and_symbols): Be more verbose.
2935 (materialize_cgraph): Likewise.
2936 (do_whole_program_analysis): Likewise.
2937
c9945504
JH
29382010-04-21 Jan Hubicka <jh@suse.cz>
2939
2940 * lto.c (globalize_cross_file_statics): When function has address taken,
2941 it needs to be public.
2942
a837268b
JH
29432010-04-20 Jan Hubicka <jh@suse.cz>
2944
2945 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2946 (lto_add_all_inlinees): Likewise.
2947 (lto_wpa_write_files): Likewise.
2948
3b9e5d95
EB
29492010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2950
2951 * lto-lang.c (lto_init): Remove second argument in call to
2952 build_common_tree_nodes.
2953
8ccb78f2
RO
29542010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2955
2956 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2957 function.
2958
2f9b99e6
EB
29592010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2960
2961 PR bootstrap/43276
2962 * lto-elf.c: Define EM_* constants if not already defined.
2963
bef7d288
EB
29642010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2965
2966 * lto-elf.c (is_compatible_architecture): New static function.
2967 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2968
f68df07c
RG
29692010-02-11 Richard Guenther <rguenther@suse.de>
2970
2971 PR driver/43021
2972 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2973 appropriately.
2974
3cdea2b4
AH
29752010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2976
2977 * lto.c (O_BINARY): Define.
2978 (lto_read_section_data): Open file in binary mode.
2979 * lto-elf.c (O_BINARY): Define.
2980 (lto_elf_file_open): Open file in binary mode.
2981
c59449fa
RG
29822010-01-08 Richard Guenther <rguenther@suse.de>
2983
2984 PR lto/42528
2985 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2986 (lto_init): Do not init char_type_node in a standard way
2987 but according to flag_signed_char.
2988
d7fb0a6d
L
29892010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2990
2991 PR lto/41564
2992 * lto.c (DUMPBASE_SUFFIX): New.
2993 (lto_execute_ltrans): Append a sequence number to -dumpbase
2994 for LTRANS.
2995
78ce4053
L
29962010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2997
2998 PR lto/42580
2999 * lto-elf.c (lto_elf_file_open): Stop if the command line
3000 option file is missing.
3001
2a71eb48
RG
30022009-12-15 Richard Guenther <rguenther@suse.de>
3003
3004 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
3005 (lto_post_options): Do not disable debuginfo.
3006
a818bca1
DG
30072009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
3008
3009 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
3010
e7d00517
RG
30112009-12-11 Richard Guenther <rguenther@suse.de>
3012
3013 PR lto/42037
3014 * lto.c (lto_resolution_read): Properly grow the vector.
3015
1ab53893
RG
30162009-12-11 Richard Guenther <rguenther@suse.de>
3017
3018 PR lto/41915
3019 * lto-lang.c (lto_init_options): Initialize flag_complex_method
3020 to the C99 default. Do not set flag_unit_at_a_time.
3021
0f900dfa
JJ
30222009-11-28 Jakub Jelinek <jakub@redhat.com>
3023
3024 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
3025 variable.
3026
92fa7608
RAE
30272009-11-19 Rafael Avila de Espindola <espindola@google.com>
3028
3029 PR bootstrap/42096
3030 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
3031 * lto.c (lto_parse_hex): New.
3032 (lto_resolution_read): Use lto_parse_hex.
3033 * lto.h (lto_parse_hex): New.
3034
9870fe4f
RAE
30352009-11-17 Rafael Avila de Espindola <espindola@google.com>
3036
3037 * lto-elf.c (lto_file_init): Add offset argument.
3038 (lto_elf_file_open): Record the offset.
3039 * lto.c (lto_resolution_read): Change file_name into a lto_file
3040 argument. Check offsets.
3041 (lto_file_read): Update call to lto_resolution_read.
3042 * lto.h (lto_file_struct): Add the offset field.
3043
1b70729f
RAE
30442009-11-16 Rafael Avila de Espindola <espindola@google.com>
3045
3046 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
3047
0e3776db
JH
30482009-11-14 Jan Hubicka <jh@suse.cz>
3049
3050 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
3051
06bd7f56
RAE
30522009-11-12 Rafael Avila de Espindola <espindola@google.com>
3053
3054 * lang.opt (fresolution): Renamed from resolution.
3055 * lto-lang.c (lto_handle_option): Handle new option name.
3056 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
3057
7e9dc421
RG
30582009-11-04 Richard Guenther <rguenther@suse.de>
3059 Rafael Avila de Espindola <espindola@google.com>
3060
3061 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
3062 (lto_elf_file_open): Handle offsets in arguments name@offest.
3063
b207f900
RG
30642009-10-30 Richard Guenther <rguenther@suse.de>
3065
3066 PR lto/41858
3067 * lto.c (lto_file_read): Do not set file_data->fd.
3068 (lto_read_section_data): Use a single-entry file-descriptor cache.
3069 Do not check the result of xmalloc.
3070 (free_section_data): Do not use file_data->fd.
3071 (lto_read_all_file_options): Likewise.
3072
2c928155
RG
30732009-10-22 Richard Guenther <rguenther@suse.de>
3074
3075 * lto.c (lto_fixup_jump_functions): Remove.
3076 (lto_fixup_decls): Do not fixup jump functions.
3077 (read_cgraph_and_symbols): Schedule cgraph merging after
3078 summary reading. Schedule type and decl fixup before
3079 summary reading.
3080
f9c91f8a
RB
30812009-10-22 Richard Guenther <rguenther@suse.de>
3082
3083 * lto.c (lto_fixup_data_t): Remove free_list member.
3084 (lto_fixup_tree): Do not insert into free_list.
3085 (free_decl): Remove.
3086 (lto_fixup_decls): Remove free-list handling.
3087
fb3f88cc
JH
30882009-10-22 Jan Hubicka <jh@suse.cz>
3089
3090 * lto.c (lto_fixup_jump_functions): New function.
3091 (lto_fixup_decls): Use it.
3092
35f1e9f4
RG
30932009-10-16 Richard Guenther <rguenther@suse.de>
3094
3095 PR lto/41715
3096 * lto.c (lto_fixup_tree): Revert last change.
3097
200c8750
RG
30982009-10-14 Richard Guenther <rguenther@suse.de>
3099
3100 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3101 compatible with the one we replace wrap it around a
3102 VIEW_CONVERT_EXPR.
3103
b1b07c92
RG
31042009-10-09 Richard Guenther <rguenther@suse.de>
3105
3106 PR lto/41635
3107 PR lto/41636
3108 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3109 a file.
3110 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3111 (init_ehdr##BITS): Likewise.
3112
3c2e7d45
JM
31132009-10-08 Joseph Myers <joseph@codesourcery.com>
3114
3115 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3116 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3117 diagnostics.
3118 * lto-lang.c (lto_post_options): Remove trailing "." from
3119 diagnostics.
3120
0d0bfe17
RG
31212009-10-08 Richard Guenther <rguenther@suse.de>
3122
3123 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3124 hash tables.
3125
4bedf19a
JM
31262009-10-07 Joseph Myers <joseph@codesourcery.com>
3127
3128 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3129
b20996ff
JH
31302009-10-07 Jan Hubicka <jh@suse.cz>
3131
3132 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3133 ltrans stage; explain why this is needed and should not.
3134
1a735925
RG
31352009-10-05 Richard Guenther <rguenther@suse.de>
3136
3137 PR lto/41552
3138 PR lto/41487
3139 * lto.c (lto_read_decls): Do not register deferred decls.
3140 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3141 until after reading the IPA summaries.
3142
d7f09764
DN
31432009-10-02 Rafael Avila de Espindola <espindola@google.com>
3144
3145 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3146 (lto-lang.c): Don't include lto/common.h.
3147
31482009-10-02 Rafael Avila de Espindola <espindola@google.com>
3149
3150 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3151 (lto/common.o): Remove.
3152 * common.c: Remove.
3153 * common.h (lto_kind_str): Remove.
3154 (lto_visibility_str): Remove.
3155 (lto_resolution_str): Make it static.
3156
31572009-10-01 Diego Novillo <dnovillo@google.com>
3158
3159 * lto.c (lto_read_decls): Add comment.
3160 Call internal_error instead of gcc_assert.
3161 (lto_resolution_read): Likewise.
3162 (lto_add_all_inlinees): Tidy.
3163 * Make-lang.in: Fix copyright boilerplate.
3164 (lto.pdf): New.
3165 (lto.install-pdf): New.
3166 * lto-tree.h: Fix copyright boilerplate.
3167 * lang-specs.h: Likewise.
3168 Remove ".lto" entry from compilers fragment.
3169 * lto-elf.c: Move inclusion of gelf.h after config.h.
3170 Tidy formatting everywhere.
3171 * lto.h: Fix copyright boilerplate.
3172 Tidy formatting everywhere.
3173 * common.c: Likewise.
3174 * config-lang.in: Likewise.
3175 * common.h: Likewise.
3176 * lto-lang.c: Likewise.
3177
31782009-10-01 Richard Guenther <rguenther@suse.de>
3179
3180 * lto.c (lto_read_section_data): Use plain lseek/read.
3181
31822009-10-01 Richard Guenther <rguenther@suse.de>
3183
3184 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3185 use sysconf to query the system page size.
3186 (lto_file_read): Implement fallback using stdio.
3187 (free_section_data): Likewise.
3188
31892009-09-29 Diego Novillo <dnovillo@google.com>
3190
3191 * lto-lang.c (lto_init): Really fix call to
3192 build_common_builtin_nodes.
3193
31942009-09-29 Diego Novillo <dnovillo@google.com>
3195
3196 * lto-lang.c (lto_init): Fix call to
3197 build_common_builtin_nodes.
3198
31992009-09-29 Richard Guenther <rguenther@suse.de>
3200
3201 PR lto/40754
3202 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3203 in bytes.
3204 (first_data_block): New static variable.
3205 (lto_elf_append_data): Align the first data block in each
3206 section.
3207
32082009-09-28 Diego Novillo <dnovillo@google.com>
3209
3210 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3211 * lto.c (strip_extension): New.
3212 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3213 (lto_execute_ltrans): Tidy.
3214 Do not pass -fwpa nor -fltrans-* to LTRANS.
3215 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3216 * tree.c (need_assembler_name_p): Call
3217 lang_hooks.decls.may_need_assembler_name_p if set.
3218 * varasm.c (default_binds_local_p_1): Remove check for
3219 flag_ltrans.
3220 * varpool.c (decide_is_variable_needed): Do not test for
3221 in_lto_p.
3222
32232009-09-22 Richard Guenther <rguenther@suse.de>
3224
3225 PR lto/39276
3226 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3227 * Make-lang.in: Remove ltrans-driver stuff.
3228 * config-lang.in: Likewise.
3229 * lang.opt (fltrans-driver): Remove.
3230 * lto-lang.c (lto_init_options): Remove code initializing
3231 ltrans_driver.
3232 * ltrans-driver: Remove.
3233
32342009-09-21 Diego Novillo <dnovillo@google.com>
3235
3236 * lto-lang.c (lto_define_builtins): Remove superfluous
3237 calls to targetm.init_builtins and build_common_builtin_nodes.
3238 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3239 build_common_builtin_nodes.
3240 * lto.c (lto_materialize_function): Do nothing if NODE is a
3241 clone.
3242
32432009-09-03 Diego Novillo <dnovillo@google.com>
3244
3245 * lto-elf.c (validate_file): Replace call to
3246 elf_getshstrndx with call to elf_getshdrstrndx.
3247
32482009-08-19 Richard Guenther <rguenther@suse.de>
3249
3250 * lto-lang.c (lto_init): Merge char_type_node with the
3251 appropriately signed variant.
3252
32532009-08-19 Richard Guenther <rguenther@suse.de>
3254
3255 PR lto/41071
3256 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3257 (lto_fixup_type): Re-build the pointer-to chain part two.
3258
32592009-08-19 Richard Guenther <rguenther@suse.de>
3260
3261 PR lto/41071
3262 * lto.c (lto_fixup_type): Re-build the type variant chain.
3263
32642009-08-19 Richard Guenther <rguenther@suse.de>
3265
3266 PR lto/41071
3267 * lto.c (lto_fixup_constructor): New function.
3268 (lto_fixup_tree): Replace all types. Properly fixup
3269 constructors and constants.
3270
32712009-08-14 Richard Guenther <rguenther@suse.de>
3272
3273 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3274 for DECL_LANG_SPECIFIC.
3275
32762009-08-13 Richard Guenther <rguenther@suse.de>
3277
3278 PR lto/41032
3279 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3280
32812009-07-30 Richard Guenther <rguenther@suse.de>
3282
3283 PR lto/40903
3284 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3285 the largest decl for output and free TREE_CHAIN for further
3286 use.
3287
32882009-07-24 Diego Novillo <dnovillo@google.com>
3289
3290 * Make-lang.in: Add empty lto.install-plugin target.
3291
32922009-07-13 Diego Novillo <dnovillo@google.com>
3293
3294 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3295
32962009-07-11 Richard Guenther <rguenther@suse.de>
3297
3298 * lto-lang.c (lto_write_globals): Wrapup global decls.
3299
33002009-07-10 Richard Guenther <rguenther@suse.de>
3301
3302 * lto-lang.c (lto_init): Allocate one more location to make
3303 BUILTINS_LOCATION correct.
3304
33052009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3306
3307 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3308
33092009-07-06 Diego Novillo <dnovillo@google.com>
3310
3311 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3312 TYPE_SIZE_UNIT.
3313
33142009-07-06 Diego Novillo <dnovillo@google.com>
3315
3316 * lto.c (preload_common_nodes): Remove.
3317 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3318 (lto_read_decls): Call lto_data_in_create and
3319 lto_data_in_delete.
3320 (free_decl): Do not call ggc_free.
3321 (lto_main): Call lto_init_reader.
3322 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3323 (lto_init): Initialize main_identifier_node if needed.
3324 Make ptrdiff_type_node be integer_type_node.
3325
33262009-06-19 Diego Novillo <dnovillo@google.com>
3327
3328 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3329 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3330 Remove code guarded by #ifdef LOCAL_TRACE.
3331
33322009-06-18 Diego Novillo <dnovillo@google.com>
3333
3334 * lto.c: Update license to GPLv3.
3335 * lto-elf.c: Likewise.
3336 * common.c: Likewise.
3337 * lto-lang.c: Likewise.
3338 * lto.h: Remove superfluous include files. Update all
3339 users.
3340
33412009-06-17 Diego Novillo <dnovillo@google.com>
3342
3343 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3344
33452009-06-02 Diego Novillo <dnovillo@google.com>
3346
3347 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3348 read in.
3349 (materialize_cgraph): Only materialize nodes that have a
3350 representation on file.
3351
33522009-06-01 Diego Novillo <dnovillo@google.com>
3353
3354 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3355
33562009-05-31 Diego Novillo <dnovillo@google.com>
3357
3358 * lto-lang.c (lto_type_for_mode): Handle all the modes
3359 handled in c_common_type_for_mode.
3360
33612009-05-21 Diego Novillo <dnovillo@google.com>
3362
3363 * lto-elf.c: Always include <gelf.h>.
3364 * config-lang.in (target_libs): Remove.
3365 (build_by_default): Set to no.
3366
33672009-05-15 Diego Novillo <dnovillo@google.com>
3368
3369 * lto.c (lto_materialize_function): Assert that DECL is
3370 not a builtin.
3371 (materialize_cgraph): Don't try to materialize builtin
3372 functions.
3373 * lto-section-out.c (write_symbol_vec): Do not write
3374 builtin functions.
3375
33762009-05-13 Diego Novillo <dnovillo@google.com>
3377
3378 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3379
33802009-05-07 Diego Novillo <dnovillo@google.com>
3381
3382 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3383 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3384 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3385 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3386 (lto_fixup_tree): Call gimple_register_type when *TP is a
3387 type.
3388 (lto_main): Call bitmap_obstack_initialize.
3389
33902009-04-22 Diego Novillo <dnovillo@google.com>
3391
3392 * lto.c (free_section_data): Tidy.
3393 (lto_1_to_1_map): Tidy.
3394 (lto_add_all_inlinees): Tidy.
3395 (prefix_name_with_star): New.
3396 (get_filename_for_set): New.
3397 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3398 to determine what cgraph node sets to write.
3399 Call get_filename_for_set to compute temporary file
3400 names.
3401 (lto_execute_ltrans): Do not execute LTRANS on files with
3402 names that start with '*'.
3403 Move logic to execute LTRANS together so that LTRANS is
3404 invoked only if there are any files to compile.
3405 (do_whole_program_analysis): Only remove output files
3406 that do not start with '*'.
3407
34082009-04-06 Diego Novillo <dnovillo@google.com>
3409
3410 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3411 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3412 (lto_add_all_inlinees): Tidy.
3413
34142009-03-26 Diego Novillo <dnovillo@google.com>
3415
3416 * lto.c: Include gimple.h.
3417 (lto_read_in_decl_state): Call gimple_register_type for
3418 every type in every stream.
3419 (lto_fixup_common): Call gimple_register_type if T has a
3420 type.
3421 (do_whole_program_analysis): Call print_lto_report.
3422 (lto_main): Call print_lto_report after cgraph_optimize.
3423 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3424
34252009-03-24 Diego Novillo <dnovillo@google.com>
3426
3427 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3428 (lto.o): Add dependency on GIMPLE_H.
3429
34302009-03-10 Simon Baldwin <simonb@google.com>
3431
3432 * lto.c (lto_read_all_file_options): Close any open file descriptor
3433 contained in file_data before freeing.
3434
34352009-02-24 Rafael Avila de Espindola <espindola@google.com>
3436
3437 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3438 for a decl in the original bitmap, not a node.
3439 (lto_add_all_inlinees): Remove original nodes that are not needed.
3440 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3441
34422009-02-24 Diego Novillo <dnovillo@google.com>
3443
3444 * lto.c (lto_materialize_function): Update
3445 lto_stats.num_function_bodies.
3446 (get_section_data): Initialize *LEN to 0.
3447 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3448 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3449 Update lto_stats.num_output_files.
3450 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3451 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3452 (lto_main): Initialize lto_stats.
3453 If flag_lto_report is set, call print_lto_report.
3454
34552009-02-19 Diego Novillo <dnovillo@google.com>
3456
3457 Revert
3458
3459 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3460
3461 * lto.c (lto_add_inline_clones): Don't add the
3462 master clone. Check for a decl in the original
3463 bitmap, not a node.
3464 (lto_add_all_inlinees): Remove original nodes
3465 that are not needed.
3466 (lto_scan_statics_in_cgraph_node): Don't care if
3467 the node is the master.
3468 (lto_promote_cross_file_statics): Use a new
3469 context.seen_node_decls for each set
3470
34712009-02-19 Rafael Avila de Espindola <espindola@google.com>
3472
3473 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3474 for a decl in the original bitmap, not a node.
3475 (lto_add_all_inlinees): Remove original nodes that are not needed.
3476 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3477 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3478 for each set
3479
34802009-02-18 Diego Novillo <dnovillo@google.com>
3481
3482 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3483 and TV_WHOPR_WPA_IO.
3484 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3485 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3486 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3487 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3488 depending on command line flags.
3489 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3490 (lto_main): Remove timer uses.
3491
34922009-02-18 Rafael Avila de Espindola <espindola@google.com>
3493
3494 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3495 (lto_wpa_write_files): Update calls to renamed functions.
3496
34972009-02-17 Diego Novillo <dnovillo@google.com>
3498
3499 PR 39203
3500 * lto-lang.c (lto_post_options): Disable -fwhole-program
3501 when running LTRANS.
3502
35032009-02-10 Diego Novillo <dnovillo@google.com>
3504
3505 * lto.c (read_cgraph_and_symbols): Fix comment.
3506
35072009-02-10 Diego Novillo <dnovillo@google.com>
3508
3509 * lto.c (read_cgraph_and_symbols): Read options from all
3510 IL files.
3511
35122009-02-10 Diego Novillo <dnovillo@google.com>
3513
3514 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3515 (materialize_cgraph): Likewise.
3516 (do_whole_program_analysis): Likewise.
3517 (lto_main): Call read_cgraph_and_symbols,
3518 materialize_cgraph and do_whole_program_analysis.
3519
35202009-02-10 Simon Baldwin <simonb@google.com>
3521
3522 * lto.c: Include lto-opts.h.
3523 * (lto_main): Clear file options at loop start, read any saved
3524 options from the first file handled, and re-issue options.
3525 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3526
35272009-02-02 Diego Novillo <dnovillo@google.com>
3528
3529 * lto.c (lto_main): Stop LTO_TIMER and use
3530 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3531
35322009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3533
3534 PR lto/38995
3535 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3536 to POINTER_SIZE.
3537
35382009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3539
3540 * Make-lang.in (LTO_EXE): Link with all
3541 BACKENDLIBS and not only GMPLIBS
3542
35432009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3544
3545 PR bootstrap/38992
3546 * lto-elf.c: Include gelf.h instead of libelf.h.
3547 (lto_elf_file_close): Replace elfx_update_shstrndx with
3548 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3549 gelf_update_ehdr.
3550
35512009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3552
3553 PR middle-end/38996
3554 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3555
35562009-01-26 Diego Novillo <dnovillo@google.com>
3557
3558 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3559
35602009-01-26 Diego Novillo <dnovillo@google.com>
3561
3562 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3563 and rename into gimple_types_compatible_p.
3564
35652009-01-12 Rafael Avila de Espindola <espindola@google.com>
3566
3567 * lto-lang.c (lang_hooks): Remove the const qualifier.
3568
35692009-01-06 Diego Novillo <dnovillo@google.com>
3570
3571 * ltrans-driver: Mark 'all' target as phony.
3572
35732008-12-31 Diego Novillo <dnovillo@google.com>
3574
3575 * ltrans-driver: Execute a NOP action for target 'all'.
3576
35772008-12-19 Diego Novillo <dnovillo@google.com>
3578
3579 * lto.c (lto_1_to_1_map): Tidy.
3580
35812008-12-19 Diego Novillo <dnovillo@google.com>
3582
3583 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3584 be opened, show its name.
3585 * ltrans-driver: If $verbose is set, do not use parallelism.
3586
35872008-12-17 Rafael Avila de Espindola <espindola@google.com>
3588
3589 * lto.c (lto_fixup_function): New.
3590 (lto_fixup_tree): Call lto_fixup_function.
3591
35922008-12-14 Doug Kwan <dougkwan@google.com>
3593
3594 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3595 variables if there is no function.
3596
35972008-12-10 Simon Baldwin <simonb@google.com>
3598
3599 * ltrans-driver: Always run make in silent mode, to avoid make's
3600 trace on stdout interfering with lto-wrapper output.
3601
36022008-12-10 Doug Kwan <dougkwan@google.com>
3603
3604 * lto.c (lto_add_inline_clones): Do not force master clones of
3605 inlined functions already in SET to be static inline.
3606
36072008-12-04 Doug Kwan <dougkwan@google.com>
3608
3609 * lto.c (globalize_context_t): New type to store states in
3610 globalization of cross-file statics.
3611 (globalize_cross_file_statics): New.
3612 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3613 static decls that need to be fixed up.
3614 (lto_scan_statics_in_cgraph_node): Change call interface to use
3615 a globalize_context_t CONTEXT for all states used.
3616 (lto_scan_statics_in_remaining_global_vars): New.
3617 (lto_promote_cross_file_statics): Use new call interface of
3618 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3619 visible vars in the last set.
3620
36212008-12-03 Diego Novillo <dnovillo@google.com>
3622
3623 * lto.c (lto_fixup_tree): Do not emit an error when
3624 PREVAILING throw but T doesn't.
3625
36262008-12-02 Doug Kwan <dougkwan@google.com>
3627
3628 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3629 from code in ...
3630 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3631 variables and functions.
3632 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3633 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3634
36352008-11-29 Diego Novillo <dnovillo@google.com>
3636
3637 * lto.c: Include timevar.h.
3638 (lto_materialize_function): Tidy. Add comments.
3639 (lto_wpa_write_files): Tidy.
3640 (lto_execute_ltrans): Tidy.
3641 (lto_main): Add local variable LTO_TIMER. Initialize it
3642 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3643 Start and stop the timer.
3644 Tidy comments.
3645 * Make-lang.in (lto.o): Add dependency on timevar.h.
3646 * ltrans-driver: React to -v and -save-temps.
3647 Use simple heuristic to determine how much parallelism to
3648 use when executing make.
3649
36502008-11-12 Doug Kwan <dougkwan@google.com>
3651
3652 * lto.c (lto_bitmap_obstack): Remove var.
3653 (lto_materialize_function): Do nothing instead of marking function
3654 body in file if flag_wpa is true.
3655 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3656 (lto_scan_statics_in_cgraph_node): New function.
3657 (lto_promote_cross_file_statics): Same.
3658 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3659 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3660 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3661
36622008-11-09 Diego Novillo <dnovillo@google.com>
3663
3664 * lto/lto.c (lto_fixup_tree): Change error message locus
3665 information to include location of mismatching
3666 declaration.
3667 Use TREE_NO_WARNING to avoid repeated messages.
3668 (lto_main): If lto_fixup_decls emitted any errors, exit.
3669 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3670 (lto_init_options): Don't enable exceptions by default.
3671 (lto_eh_runtime_type): Move to lto-function-in.c
3672 (lto_init_eh): Likewise.
3673 (lto_init): Don't call lto_init_eh.
3674 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3675 libfuncs.h and except.h.
3676
36772008-10-30 Diego Novillo <dnovillo@google.com>
3678
3679 * lto.c (lto_read_decls): Declare debug_main only if
3680 LTO_STREAM_DEBUGGING is enabled.
3681
36822008-10-30 Simon Baldwin <simonb@google.com>
3683
3684 * lto.c (lto_wpa_write_files): Create intermediate files with
3685 make_cwd_temp_file().
3686 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3687 WPA_SAVE_LTRANS is set.
3688 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3689 * ltrans-driver: Do not strip directory from output files.
3690
36912008-10-29 Doug Kwan <dougkwan@google.com>
3692
3693 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3694 DECL.
3695 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3696 (lto/lto-symtab.o): Remove rule.
3697 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3698 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3699 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3700 Remove macros.
3701 lto-symtab.c (File): Move up one level.
3702 lto-lang.c (cgraph.h): Remove include.
3703 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3704 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3705 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3706
37072008-10-24 Rafael Espindola <espindola@google.com>
3708
3709 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3710 non prevailing weak symbols.
3711
37122008-10-24 Rafael Espindola <espindola@google.com>
3713
3714 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3715
37162008-10-24 Rafael Espindola <espindola@google.com>
3717
3718 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3719 different types.
3720
37212008-10-23 Simon Baldwin <simonb@google.com>
3722
3723 * lto-lang.c (input_node): Save the node reference, rather than the
3724 node pointer, in node->inlined_to.
3725 (input_cgraph_1): Convert node references into node pointers.
3726
37272008-10-22 Diego Novillo <dnovillo@google.com>
3728 Rafael Espindola <espindola@google.com>
3729
3730 * lto.c (lto_resolution_read): Tidy.
3731 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3732 abort if RET is NULL.
3733
37342008-10-22 Doug Kwan <dougkwan@google.com>
3735
3736 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3737 exceptions flag is given.
3738 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3739 (lto_init_eh): Remove exceptions flag initialization.
3740 (lto_init): Only call lto_init_eh if exceptions flag is set.
3741
37422008-10-21 Diego Novillo <dnovillo@google.com>
3743
3744 * lto.c: Tidy some formatting.
3745 * lto.h: Likewise.
3746
37472008-10-21 Simon Baldwin <simonb@google.com>
3748
3749 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3750 them is NULL (but not the other).
3751
37522008-10-17 Diego Novillo <dnovillo@google.com>
3753
3754 * ltrans-driver: Divert output from make to a temporary file.
3755 Show it if the call to make failed.
3756
37572008-10-15 Diego Novillo <dnovillo@google.com>
3758
3759 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3760 Do not print TEMP_FILENAME
3761 * ltrans-driver: Call make with -s.
3762
37632008-10-15 Diego Novillo <dnovillo@google.com>
3764
3765 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3766 TREE_STATIC on global symbols.
3767
37682008-10-14 Ollie Wild <aaw@google.com>
3769
3770 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3771 (LTRANS_DRIVER_EXE): Add.
3772 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3773 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3774 (lto.install.common): Remove ltrans-driver.
3775 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3776 (LTRANS_DRIVER_EXE): New build rule.
3777 * config-lang.in (compilers): Add ltrans-driver.
3778
37792008-10-14 Diego Novillo <dnovillo@google.com>
3780
3781 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3782 of program name.
3783
37842008-10-13 Ollie Wild <aaw@google.com>
3785
3786 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3787 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3788 * ltrans-driver (LTRANS_FLAGS): Remove.
3789
37902008-10-08 Doug Kwan <dougkwan@google.com>
3791
3792 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3793 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3794 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3795 from lto_fixup_state to here.
3796 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3797 just a free-list. Fix up types also. Move decl merging code to
3798 lto_fixup_tree.
3799 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3800 object.
3801 (lto_fixup_decls): Use another pointer set to avoid multiple
3802 walking of nodes except for DECLs to be replaced. Pass an
3803 lto_fixup_data_t object to tree-walker.
3804
38052008-10-08 Rafael Espindola <espindola@google.com>
3806
3807 * lto-symtab.c (lto_symtab_set_resolution): New.
3808 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3809 lto_symtab_get_resolution.
3810 (lto_symtab_prevailing_decl): Return decl for non public decls.
3811 (lto_symtab_get_resolution): New.
3812 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3813
38142008-10-06 Rafael Espindola <espindola@google.com>
3815
3816 * lto-lang.c: Include cgraph.h.
3817 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3818 input_cgraph): Moved from lto-cgraph.c.
3819 (LANG_HOOKS_INPUT_CGRAPH): New.
3820
38212008-10-03 Rafael Espindola <espindola@google.com>
3822
3823 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3824
38252008-10-03 Rafael Espindola <espindola@google.com>
3826
3827 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3828 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3829 prevailing definition. Don't mark TREE_NOTHROW differences.
3830 * lto.c (lto_fixup_tree): New.
3831 (lto_fixup_state): New.
3832 (lto_fixup_state_aux): New.
3833 (free_decl): New.
3834 (lto_fixup_decls): New.
3835 (lto_main): Call lto_fixup_decls.
3836
38372008-10-02 Ollie Wild <aaw@google.com>
3838
3839 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3840 and Init.
3841 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3842 * lto-lang.c (lto_post_options): Add validation and fixups for
3843 -fltrans and -fwpa.
3844
38452008-10-02 Rafael Espindola <espindola@google.com>
3846
3847 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3848 lto_symtab_merge_decl): Return void.
3849 (lto_symtab_prevailing_decl): New.
3850
38512008-09-30 Rafael Espindola <espindola@google.com>
3852
3853 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3854 defined symbols.
3855 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3856 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3857 Check for already defined symbols.
3858 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3859 (LTO_IDENTIFIER_RESOLUTION): Remove.
3860 (LTO_DECL_RESOLUTION): New.
3861
38622008-09-30 Rafael Espindola <espindola@google.com>
3863
3864 * lto.c (lto_read_decls): Use new input_tree signature.
3865
38662008-09-26 Doug Kwan <dougkwan@google.com>
3867
3868 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3869 bodies affected by exception attribute merging of DECLs.
3870 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3871 merging.
3872
38732008-09-25 Rafael Espindola <espindola@google.com>
3874
3875 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3876 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3877 * lto-symtab.c (lto_symtab_compatible): New.
3878 (lto_symtab_overwrite_decl): New.
3879 (lto_symtab_merge_decl): Refactor to use the above functions
3880 and the resolution from lang_identifier.
3881 * lto-tree.h: Include plugin-api.h.
3882 (lang_identifier): Add resolution.
3883 (LTO_IDENTIFIER_RESOLUTION): New.
3884
38852008-09-25 Ollie Wild <aaw@google.com>
3886
3887 * lang.opt (fltrans-output-list=): New option.
3888 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3889
38902008-09-25 Rafael Espindola <espindola@google.com>
3891
3892 * lto.c (lto_resolution_read): Initialize ret;
3893
38942008-09-24 Ollie Wild <aaw@google.com>
3895
3896 * lto.c (sys/mman.h): Move include.
3897 (lto_wpa_write_files): Return a list of written files.
3898 (lto_execute_ltrans): New function.
3899 (lto_main): Call lto_execute_ltrans.
3900 (ltrans-driver): New file.
3901 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3902 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3903 (lto_init_options): Initialize ltrans_driver.
3904 (lto_handle_option): Fix incorrect default output value.
3905 * lang.opt (fltrans-driver=): New option.
3906 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3907 (lto.install-common): Add lto/ltrans-driver.
3908
39092008-09-24 Rafael Espindola <espindola@google.com>
3910
3911 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3912 (lto/lto.o): Depend on lto/common.h.
3913 (lto/common.o): New.
3914 * lang.opt (resolution): New.
3915 * lto-lang.c (resolution_file_name): New.
3916 (lto_handle_option): Handle OPT_resolution.
3917 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3918 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3919 pass it to lto_symtab_merge_decl.
3920 * lto.c: Include common.h.
3921 (lto_read_decls): Add resolutions and resolutions_size arguments.
3922 Initialize data_in.globals_resolution and
3923 data_in.globals_resolution_size.
3924 (index_and_symbol_resolution): New.
3925 (lto_resolution_read): New.
3926 (lto_file_read): Add argument resolution_file.
3927 Read resolution.
3928 * lto.h (resolution_file_name): New.
3929
39302008-09-23 Rafael Espindola <espindola@google.com>
3931
3932 * common.c: Update description.
3933 * common.h: Update description.
3934
39352008-09-23 Rafael Espindola <espindola@google.com>
3936
3937 * common.c: Moved from lto-plugin.
3938 * common.h: Moved from lto-plugin.
3939
39402008-09-22 Doug Kwan <dougkwan@google.com>
3941
3942 * lto.c (VEC(bitmap,heap)): Declare.
3943 (lto_materialize_function): Handle WAP mode specially.
3944 (lto_add_inline_clones): New.
3945 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3946 return a bitmap of inlined decls.
3947 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3948 (lto_main): Call reset_inline_failed to reset inlining states.
3949 Check call-graph after WPA inlining.
3950 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3951 unconditionally.
3952
39532008-09-19 Doug Kwan <dougkwan@google.com>
3954
3955 lto.c (lto_main): Remove unsued wrapper code.
3956 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3957
39582008-09-19 Rafael Espindola <espindola@google.com>
3959
3960 * lto-symtab.c: Include lto-tree-in.h.
3961 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3962 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3963 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3964
39652008-09-17 Paolo Bonzini <bonzini@gnu.org>
3966 Rafael Avila de Espindola <espindola@google.com>
3967
3968 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3969 COMPOUND_LITERAL_EXPR_DECL): Remove.
3970 (emit_local_var): Remove.
3971 (lto_expand_expr): Remove.
3972 (lto_staticp): Remove.
3973 (LANG_HOOKS_EXPAND_EXPR): Remove.
3974 (LANG_HOOKS_STATICP): Remove.
3975
39762008-09-11 Diego Novillo <dnovillo@google.com>
3977
3978 * lto-lang.c: Include except.h and libfuncs.h.
3979 (lto_init_eh): New.
3980 (lto_init): Call it.
3981 Set flag_generate_lto to 0.
3982 * Make-lang.in (lto-lang.o): Add dependency on except.h
3983 and libfuncs.h.
3984
39852008-09-09 Bill Maddox <maddox@google.com>
3986
3987 * lto-lang.c: Include header file expr.h.
3988 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3989 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3990 (emit_local_var): Copied from c-semantics.c.
3991 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3992 and c_staticp in c-common.c.
3993 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3994
39952008-09-08 Diego Novillo <dnovillo@google.com>
3996
3997 * lto-lang.c (lto_global_bindings_p): Return 1 during
3998 IPA passes.
3999
40002008-09-07 Diego Novillo <dnovillo@google.com>
4001
4002 * lto.c: Tidy formatting.
4003
40042008-08-04 Bill Maddox <maddox@google.com>
4005
4006 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
4007
40082008-09-03 Doug Kwan <dougkwan@google.com>
4009
4010 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
4011 CIF_OK instead of NULL.
4012
40132008-09-02 Diego Novillo <dnovillo@google.com>
4014 Simon Baldwin <simonb@google.com>
4015
4016 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
4017 c_common_type_for_size.
4018 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
4019 (lto_init): Call linemap_add.
4020 (signed_and_unsigned_types): Remove.
4021
40222008-08-29 Diego Novillo <dnovillo@google.com>
4023
4024 * lto-lang.c (handle_noreturn_attribute): New local function.
4025 (handle_const_attribute): New local function.
4026 (handle_malloc_attribute): New local function.
4027 (handle_pure_attribute): New local function.
4028 (handle_novops_attribute): New local function.
4029 (handle_nonnull_attribute): New local function.
4030 (handle_nothrow_attribute): New local function.
4031 (handle_sentinel_attribute): New local function.
4032 (handle_type_generic_attribute): New local function.
4033 (handle_format_attribute): New local function.
4034 (handle_format_arg_attribute): New local function.
4035 (lto_attribute_table): Declare.
4036 (lto_format_attribute_table): Declare.
4037 (lto_init_attributes): New local function.
4038 (lto_define_builtins): Call it.
4039 Call targetm.init_builtins and build_common_builtin_nodes.
4040 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
4041 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
4042
40432008-08-28 Diego Novillo <dnovillo@google.com>
4044
4045 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
4046 $(GIMPLE_H).
4047 (lto-symtab.o): Add dependency on $(GIMPLE_H).
4048 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
4049 * lto-symtab.c: Include gimple.h.
4050 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
4051 TREE_CHAIN.
4052
40532008-08-27 Doug Kwan <dougkwan@google.com>
4054
4055 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
4056 gt-lto-lto.h): New includes.
4057 (lto_materialize_function): Do not read in function body in WPA mode.
4058 Format a line to fit in 80 columns.
4059 (lto_cgraph_node_sets): New garbage collected variable.
4060 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
4061 New functions.
4062 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
4063 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
4064 variable LTO_SECTION_IN_H.
4065 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
4066 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
4067 with variable LTO_SECTION_IN_H.
4068 * config-lang.in (gtfiles): Add lto/lto.c.
4069 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
4070 merged DECL_RESULT correctly.
4071
40722008-08-26 Bill Maddox <maddox@google.com>
4073
4074 * lto-lang.c Include tree-gimple.h.
4075 (lto_mark_addressable): Call mark_addressable rather than
4076 asserting.
4077 (lto_post_options): Suppress debug info generation.
4078 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4079
3f8257db 40802008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4081
4082 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4083 assertion and leave an explanatory comment in its place.
4084
40852008-08-21 Doug Kwan <dougkwan@google.com>
4086
4087 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4088 of common nodes instead of computing locallly.
4089 (lto_read_in_decl_state): New.
4090 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4091 Read global and per-function in-decl states.
4092 * Make-lang.in (LTO_H): Update dependency.
4093 (lto/lto.o): Same.
4094 (lto-symtab.c): Merge (revision 139039)
4095 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4096
40972008-08-21 Rafael Espindola <espindola@google.com>
4098
4099 * config-lang.in (target_libs): New.
4100
41012008-08-20 Bill Maddox <maddox@google.com>
4102
4103 * lto.c (current_lto_file): Remove GTY marker from static
4104 variable. Remove include of file gt-lto-lto.h.
4105 * Make-lang.in: Remove dependency of lto/lto.o on
4106 gt-lto-lto.h.
4107 * lto-elf.c (lto_file_close): Removed.
4108 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4109 allocate lto_elf_file object.
4110 (lto_elf_file_close): Free lto_elf_file object after close.
4111 * lto.h (struct lto_file_struct): Remove GTY marker.
4112 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4113 gtfiles.
4114
41152008-08-20 Bill Maddox <maddox@google.com>
4116
4117 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4118 to conform to its new signature.
4119 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4120 on discarded node here, now called in global_vector_fixup.
4121
41222008-08-09 Bill Maddox <maddox@google.com>
4123
4124 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4125 has not been set to a front-end-specific value.
4126
41272008-08-05 Doug Kwan <dougkwan@google.com>
4128
4129 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4130 build breakage.
4131
41322008-07-30 Bill Maddox <maddox@google.com>
4133
4134 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4135 Remove obsolete comments.
4136 (lto_read_decls): Remove initialization of deleted field data_in.global.
4137 Tidy up comments.
4138 (lto_main): Remove redundant initialization of section_hash_table.
4139 * lto-elf.c: Removed obsolete comments.
4140 * lto.h: Tidy up comments.
4141 * lto-symtab.c (lto_least_common_multiple): New function.
4142 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4143 Tidy up comments.
4144
41452008-07-25 Diego Novillo <dnovillo@google.com>
4146 Bill Maddox <maddox@google.com>
4147
4148 * lto.c: Re-order include files.
4149 Include lto-section-out.h.
4150 (preload_common_nodes): Add debugging output.
4151 Add new local INDEX_TABLE.
4152 Call preload_common_node.
4153 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4154
41552008-07-13 Bill Maddox <maddox@google.com>
4156
4157 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4158 unwanted scaling during pointer addition.
4159
41602008-07-11 Bill Maddox <maddox@google.com>
4161 Diego Novillo <dnovillo@google.com>
4162
4163 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4164 Make code const-correct.
4165 (lto_file_read): Fix C++ compatibility warnings.
4166 (lto_read_section_data): Fix C++ compatibility warnings.
4167 (lto_get_section_data): Use CONST_CAST to avoid warning when
4168 const pointer passed to free.
4169 * lto-elf.c (lto_elf_build_section_table): Fix C++
4170 compatibility warnings.
4171 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4172 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4173 (lto_get_current_out_file): Fix C++ compatibility warnings.
4174
41752008-07-11 Diego Novillo <dnovillo@google.com>
4176
4177 * Make-lang.in (lto-warn): Define.
4178
41792008-07-03 Simon Baldwin <simonb@google.com>
4180
4181 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4182 LTO_STREAM_DEBUGGING.
4183
41842008-06-27 Ollie Wild <aaw@google.com>
4185
4186 * lto-elf.c (lto-section-out.h): New include.
4187 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4188 and data members.
4189 (cached_file_attrs): New static variable.
4190 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4191 Use cached_file_attrs for checking bits.
4192 (lto_elf_build_section_table): Remove elf_file argument from
4193 lto_elf_get_shdr and lto_elf_free_shdr calls.
4194 (DEFINE_INIT_SHDR): New macro.
4195 (init_shdr32, init_shdr64): New functions defined via the
4196 DEFINE_INIT_SHDR macro.
4197 (lto_elf_begin_section_with_type): New function.
4198 (lto_elf_begin_section): New function.
4199 (lto_elf_append_data): New function.
4200 (lto_elf_end_section): New function.
4201 (DEFINE_VALIDATE_EHDR): New macro.
4202 (validate_ehdr32, validate_ehdr64): New functions defined via the
4203 DEFINE_VALIDATE_EHDR macro.
4204 (validate_file): New function.
4205 (DEFINE_INIT_EHDR): New macro.
4206 (init_ehdr32, init_ehdr64): New functions defined via the
4207 DEFINE_INIT_EHDR macro.
4208 (init_ehdr): New function.
4209 (lto_elf_file_open): Add support for writable files. Move some
4210 validation logic to validate_file.
4211 (lto_elf_file_close): Add support for writable files. Write file data
4212 and free data blocks.
4213 (current_out_file): New static variable.
4214 (lto_set_current_out_file): New function.
4215 (lto_get_current_out_file): New function.
4216 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4217 Add temporary initialization for testing ELF serialization.
4218 * lto.h (lto-section-out.h): New include.
4219 (struct lto_file_struct): Slight modification to comment.
4220 (lto_elf_file_open): Add writable parameter.
4221 (lto_elf_begin_section): New function declaration.
4222 (lto_elf_append_data): New function declaration.
4223 (lto_elf_end_section): New function declaration.
4224 (lto_set_current_out_file, lto_get_current_out_file): New function
4225 declarations.
4226 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4227 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4228 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4229 * Make-lang.in (LTO_H): Add lto-section-out.h.
4230
42312008-06-12 Ollie Wild <aaw@google.com>
4232
4233 * lto.h (struct lto_file_vtable_struct): Remove.
4234 (struct lto_file_struct): Remove vtable member.
4235 * lto-elf.c (lto_file_init): Remove vtable argument.
4236 (lto_elf_map_optional_lto_section): Remove.
4237 (lto_elf_unmap_section): Remove.
4238 (lto_elf_file_vtable): Remove.
4239 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4240 lto_file_init call.
4241 (lto_elf_find_section_data): Remove.
4242
42432008-06-11 Ollie Wild <aaw@google.com>
4244
4245 * lto.c (lto_file_read): Add const qualifier to data variable.
4246
42472008-06-11 Diego Novillo <dnovillo@google.com>
4248
4249 Merge from lto-streamber sub-branch.
4250
4251 2008-06-04 Ollie Wild <aaw@google.com>
4252
4253 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4254 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4255
4256 2008-05-28 Bill Maddox <maddox@google.com>
4257
4258 Replace the DWARF reader in the LTO front-end.
4259
4260 * lto.c: Include lto-tree-in.h, lto-tags.h.
4261 (enum DWARF2_class, DW_cl_constant, struct
4262 DWARF2_form_data, struct lto_context,
4263 lto_fd_init, lto_info_fd_init,
4264 lto_abbrev_fd_init, lto_info_fd_close,
4265 lto_file_init, lto_file_close,
4266 lto_file_corrupt_error, lto_abi_mismatch_error,
4267 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4268 lto_read_uleb128, lto_read_sleb128,
4269 lto_read_initial_length, lto_abbrev_read_attrs,
4270 lto_abbrev_read, lto_abbrev_read_lookup,
4271 lto_read_section_offset,
4272 lto_read_comp_unit_header, find_cu_for_offset,
4273 lto_get_file_name,
4274 lto_resolve_reference,lto_read_form,
4275 attribute_value_as_int,
4276 make_signed_host_wide_int,
4277 attribute_value_as_constant, lto_cache_hash,
4278 lto_cache_eq, lto_cache_store_DIE,
4279 lto_cache_lookup_DIE, lto_find_integral_type,
4280 lto_find_integral_type_1,
4281 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4282 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4283 lto_unsupported_attr_error, lto_get_identifier,
4284 lto_read_referenced_type_DIE,
4285 lto_read_compile_unit_DIE,
4286 lto_read_array_type_DIE,
4287 lto_read_structure_union_class_type_DIE,
4288 lto_read_enumerator_DIE,
4289 lto_read_enumeration_type_DIE,
4290 lto_read_only_for_child_DIEs,
4291 lto_read_only_for_child_DIEs,
4292 lto_read_member_DIE, lto_read_abbrev,
4293 lto_read_variable_formal_parameter_constant_DIE,
4294 lto_get_body): Removed.
4295 (preload_common_nodes): New function.
4296 (lto_read_decls): Convert for new global streamer.
4297 (lto_materialze_file_data,
4298 lto_read_subroutine_type_subprogram_die,
4299 lto_read_unspecified_parameters_DIE,
4300 lto_read_typedef_DIE,
4301 lto_read_pointer_reference_type_DIE,
4302 lto_read_subrange_type_DIE,
4303 lto_read_base_type_DIE,
4304 lto_read_const_volatile_restrict_type_DIE,
4305 lto_read_namespace_DIE,
4306 lto_read_unspecified_type_DIE, lto_read_DIE,
4307 lto_read_child_DIEs, lto_collect_child_DIEs):
4308 Removed.
4309 (lto_info_read, lto_set_cu_context): Removed.
4310 (lto_file_read): Convert for new global streamer.
4311 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4312 lto_resolve_var_ref, lto_resolve_fn_ref,
4313 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4314 lto_resolve_namespacedecl_ref): Removed.
4315 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4316 * lto-tree.h (lto_symtab_merge_var,
4317 lto_symtab_mergee_fun): Declare here.
4318 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4319 (lto_elf_file_open): Removed code to read DWARF debug sections.
4320 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4321 DWARF2_CompUnit, lto_die_ptr,
4322 lto_die_cache_entry, lto_fd, lto_info_fd,
4323 lto_abbrev_fd): Removed.
4324 (lto_file): Removed debug_info and debug_abbrev fields.
4325 (lto_ref): Removed.
4326 (lto_file_init, lto_file_close,
4327 lto_resolve_type_ref, lto_resolve_var_ref,
4328 lto_resolve_fn_ref, lto_resolve_field_ref,
4329 lto_resolve_typedecl_ref,
4330 lto_resolve_namespacedecl_ref,
4331 lto_get_file_name): Removed declarations.
4332 (lto_symtab_merge_var, lto_symtab_merge_fn):
4333 Declarations moved to lto-tree.h.
4334 * lto-symtab.c (lto_compatible_attributes_p):
4335 Lobotomize this, as it barfs on "Hello, world!".
4336 * lto-section-out.c: Include lto-tree-out.h.
4337 (lto_hash_global_slot_node,
4338 lto_eq_global_slot_node, preload_common_nodes,
4339 write_global_stream, write_global_references):
4340 New functions.
4341 (produce_asm_for_decls): Convert for new global streamer.
4342 * lto-section-out.h (lto_hash_global_slot_node,
4343 lto_eq_global_slot_node): Declare.
4344
3f8257db 43452008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4346 Jan Hubicka <jh@suse.cz>
4347
4348 * lto.c (sys/mman.h, tree-pass.h): New includes.
4349 (lto_materialize_constructors_and_inits,
4350 lto_materialize_function): Keeps length of section.
4351 (lto_materialize_cgraph): Removed.
4352 (lto_read_decls): Initialize fd field.
4353 (lto_file_read): Different return type and removed much code to
4354 lto_main.
4355 (page_mask): New variable.
4356 (lto_read_section_data, get_section_data, free_section_data): New
4357 functions.
4358 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4359 passes can get the section data.
4360
3f8257db 43612008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4362
4363 * lto.h (lto_read_decls): Made local.
4364 (lto_input_function_body, lto_input_constructors_and_inits,
4365 lto_input_cgraph): Declarations moved to lto-section-in.h.
4366 * lto-section-in.c: Moved to .. .
4367 * lto-cgraph-in.c: Ditto.
4368 * lto-section-in.h: Ditto.
4369 * lto-function-in.c: Ditto.
4370 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4371 (lto_insert_block): Removed.
4372 (LANG_HOOKS_INSERT_BLOCK): Removed.
4373 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4374 lto-section-in.o): Rules moved to lto/Makefile.in.
4375
4376
43772008-05-16 Ollie Wild <aaw@google.com>
4378
4379 * lto-lang.c (tree-inline.h): Include.
4380 (lto_post_options): New function.
4381 (LANG_HOOKS_POST_OPTIONS): Define.
4382 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4383 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4384
43852008-05-13 Diego Novillo <dnovillo@google.com>
4386
4387 * lto-function-in.c (input_ssa_names): Call
4388 make_ssa_name_fn instead of make_ssa_name.
4389
43902008-05-12 Diego Novillo <dnovillo@google.com>
4391
4392 * lto-cgraph-in.c (overwrite_node): Update references to
4393 inline summary fields.
4394 * lto-function-in.c (input_expr_operand): Do not handle
4395 STRUCT_FIELD_TAG.
4396
43972008-05-09 Ollie Wild <aaw@google.com>
4398
4399 * lang.opt: New file.
4400 * lto-lang.c (lto_init_options): New function.
4401 (lto_handle_option): New function.
4402 (lto_init): Move initialization of flag_unit_at_a_time to
4403 lto_init_options.
4404 (LANG_HOOKS_INIT_OPTIONS): Define.
4405 (LANG_HOOKS_HANDLE_OPTION): Define.
4406
44072008-04-29 Ollie Wild <aaw@google.com>
4408
4409 * lto.c (lto_read_namespace_DIE): New function.
4410 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4411 NAMESPACE_DECL DIE's.
4412 (lto_resolve_namespacedecl_ref): New function.
4413 * lto.h (lto_resolve_namespacedecl_ref): New function.
4414 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4415 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4416 and num_namespace_decls.
4417 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4418 * lto-lang.c (lto_init_ts): New function.
4419 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4420
44212008-04-16 Ollie Wild <aaw@google.com>
4422
4423 * lto-function-in.c (input_type_ref): Updated function description.
4424
44252008-04-16 Ollie Wild <aaw@google.com>
4426
4427 * lto-function-in.c (input_type_ref_1): New function.
4428 (input_type_ref): Split into two functions.
4429 (input_function): Add support for type contexts.
4430
44312008-04-16 Ollie Wild <aaw@google.com>
4432
4433 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4434 section name
4435
44362008-04-16 Ollie Wild <aaw@google.com>
4437
4438 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4439 list of supported languages.
4440
3f8257db 44412008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4442
4443 Merge with mainline @133491.
4444
3f8257db 44452008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4446 Jan Hubicka <jh@suse.cz>
4447
4448 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4449 fd->unmaterialized_fndecls.
4450 (lto_get_file_name, lto_materialize_cgraph): New function.
4451 (lto_materialize_constructors_and_inits,
4452 lto_materialize_function): Read info directly from elf file.
4453 (lto_file_read): Made local and initialize dictionary so that
4454 other lto sections can be read without reprocessing the elf file.
4455 (lto_main): Read all functions after all files have been processed
4456 for their types, globals and cgraph.
4457 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4458 dependencies.
4459 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4460 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4461 (lto_elf_read_symtab): Removed function.
4462 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4463 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4464 (lto_file_read): Made local.
4465 (lto_get_file_name, lto_elf_build_section_table,
4466 lto_input_cgraph):
4467 New function.
4468 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4469 New functions.
4470 (lto_read_decls): Get the file name.
4471 * lto-cgraph-in.c: New file.
4472 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4473 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4474 (input_labels): Fixed latent sizeof issue.
4475 (input_function): Build stmt array to set call sites into cgraph
4476 edges.
4477 (lto_read_body): Reset cfun->curr_properties.
4478 * lto_section_in.h (lto_section_slot): New structure.
4479 (section_hash_table.lto_file_decl_data): New field.
4480
4481
3f8257db 44822008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4483
4484 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4485 reconstruct static initializers.
4486 (lto_get_body, lto_materialize_function): Add lto_section_type as
4487 a parameter.
4488 (lto_materialize_constructors_and_inits,
4489 lto_materialize_file_data): New function.
4490 (lto_materialize_function,
4491 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4492 unmap_section and map_fn_body to map_section.
4493 (lto_set_cu_context): Process functions and static inits
4494 differently.
4495 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4496 lto/lto-section-in.o): Update dependencies.
4497 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4498 lto_section_type parameter.
4499 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4500 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4501 renamed the other two so that there is only one map function and
4502 one unmap function and each takes a section type parameter.
4503 (lto_read_function_body): Renamed to lto_input_function_body and
4504 added file_data parameter.
4505 (lto_read_var_init): Removed.
4506 (lto_input_constructors_and_inits): New function.
4507 * lto-section-in.c (lto_read_decls): New function.
4508 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4509 var_decls, type_decls, types to lto_file_decl_data.
4510 (input_type_ref, input_expr_operand, lto_read_body): Get
4511 field_decls, fn_decls, var_decls, type_decls, types from different
4512 structure.
4513 (input_globals, input_constructor, lto_read_var_init): Removed.
4514 (input_constructors_or_inits): New function.
4515 (lto_read_function_body, lto_input_constructors_and_inits):
4516 Renamed to lto_input_function_body and takes file_data parameter.
4517 * lto-section-in.h (lto_file_decl_data): New structure.
4518
3f8257db 45192008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4520
4521 * lto-function-in.c (input_globals.c): Changed input type to
4522 lto_function_header.
4523 (input_bb): Removed code to deserialize the stmt number.
4524 (input_function): Renumber all stmts after they are input.
4525 (lto_read_body, lto_read_function_body, lto_read_var_init):
4526 Changed to used new header format and enum section_type.
4527 *lto-lang.c (success): Removed.
4528
45292008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4530
4531 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4532 (lto_elf_free_sym): Likewise.
4533
4534 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4535 (lto_elf_build_init): Likewise.
4536
3f8257db 45372008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4538
4539 * lto-read.c: Renamed to lto-function-in.c.
4540 (input_1_unsigned): Moved to lto-section-in.c and renamed
4541 lto_input_1_unsigned.
4542 (input_uleb128): Moved to lto-section-in.c and renamed
4543 lto_input_uleb128.
4544 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4545 lto_input_widest_uint_uleb128.
4546 (input_sleb128): Moved to lto-section-in.c and renamed
4547 lto_input_sleb128.
4548 (input_integer): Moved to lto-section-in.c and renamed
4549 lto_input_integer.
4550 (debug_in_fun): Moved to lto-section-in.c and renamed
4551 lto_debug_in_fun.
4552 (input_block): Moved to lto-section-in.h and renamed
4553 lto_input_block.
4554 (input_expr_operand): Fixed to allow lists with more than one
4555 element.
4556 * lto-section-in.h: New file.
4557 * lto-section-in.c: New file with changes from above.
4558 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4559 (lto-section-in.o): New rule.
4560
45612007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4562
4563 * lto-read.c (input_expr_operand): Mark static and external
4564 VAR_DECLs as needed.
4565
45662007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4567
4568 * lto-read.c (input_integer): Use the correct shift amount.
4569
45702007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4571
4572 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4573 (LANG_HOOKS_NAME): Define.
4574
45752007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4576
4577 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4578 original function to...
4579 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4580 don't have a base type.
4581 (lto_read_enumeration_type_DIE): Examine the values of the
4582 enumeration to determine whether we can use an unsigned type for
4583 the base type of the enumeration.
4584
45852007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4586
4587 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4588 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4589
45902007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4591
4592 * lto-lang.c (lto_types_compatible_p): New function.
4593 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4594
45952007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 4596 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4597
4598 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4599 (input_local_vars): Read in DECL_INITIAL and context for local
4600 statics that need to be put in unexpanded_vars_list.
4601
46022007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4603
4604 * lto-read.c (input_real): Use a separate null-terminated buffer
4605 for calling real_from_string.
4606 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4607 tell cgraph that it's needed.
4608
46092007-12-19 Doug Kwan <dougkwan@google.com>
4610
4611 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4612
46132007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4614
4615 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4616 (lto_file_read): Reset the members of 'context' every time we read
4617 a toplevel DIE, with special attention to last_param_type.
4618
46192007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4620
4621 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4622 'declaration'. Set the assembler name for non-public functions.
4623
3f8257db 46242007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4625
4626 * lto_read.c (data_in.unexpanded_indexes): New array.
4627 (input_local_var): Added code to read in unexpanded_var_list
4628 indexes for variables. Only read in DECL_CHAIN field for
4629 parameters.
4630 (input_local_vars): Added code to rebuild unexpanded_var_list in
4631 order using unexpanded_indexes.
4632 (input_function): Added code to set DECL_CONTEXT for functions.
4633
46342007-12-13 Doug Kwan <dougkwan@google.com>
4635
4636 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4637 in pointer and reference types.
4638
46392007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4640
4641 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4642 RESULT_DECL.
4643
46442007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4645
4646 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4647 already read the DIE.
4648 (lto_get_body): New function, split out from...
4649 (lto_materialize_function): ...here. Call it.
4650 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4651 determine DECL_EXTERNAL.
4652 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4653 FUNCTION_DECLs when necessary. Use the type of the actual
4654 function definition if we are unable to easily merge types. Ignore
4655 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4656 necessary.
4657
46582007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4659
4660 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4661
46622007-12-12 Bill Maddox <maddox@google.com>
4663
4664 Revert
4665 2007-12-07 Bill Maddox <maddox@google.com>
4666
4667 * lto.c (lto_str_fd_init): New function.
4668 (lto_str_fd_close): New function.
4669 (lto_file_init): Call lto_str_fd_init.
4670 (lto_file_close): Call lto_str_fd_close.
4671 (lto_str_read): New function. Read debug string table.
4672 (lto_str_lookup): New function. Get string for debug
4673 string table offset.
4674 (lto_read_form): Recognize DW_FORM_strp.
4675 (lto_file_read): Invoke lto_str_read.
4676
4677 * lto-elf.c (lto_elf_file_open): Read raw section data
4678 for the .debug_str section, if present.
4679
4680 * lto.h (struct lto_str_fd_struct): New struct.
4681 (struct lto_file_struct): Added new field DEBUG_STR
4682 to hold the file descriptor for the debug string table.
4683
46842007-12-07 Bill Maddox <maddox@google.com>
4685
4686 * lto.c (lto_str_fd_init): New function.
4687 (lto_str_fd_close): New function.
4688 (lto_file_init): Call lto_str_fd_init.
4689 (lto_file_close): Call lto_str_fd_close.
4690 (lto_str_read): New function. Read debug string table.
4691 (lto_str_lookup): New function. Get string for debug
4692 string table offset.
4693 (lto_read_form): Recognize DW_FORM_strp.
4694 (lto_file_read): Invoke lto_str_read.
4695
4696 * lto-elf.c (lto_elf_file_open): Read raw section data
4697 for the .debug_str section, if present.
4698
4699 * lto.h (struct lto_str_fd_struct): New struct.
4700 (struct lto_file_struct): Added new field DEBUG_STR
4701 to hold the file descriptor for the debug string table.
4702
47032007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4704
4705 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4706 Grow the basic_block_info and label_to_block_map vectors if
4707 necessary. Read in the block chain.
4708
47092007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4710
4711 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4712
47132007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4714
4715 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4716
47172007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4718
4719 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4720 (lto_read_body): Don't declare PROP_alias.
4721
47222007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4723
4724 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4725 argument type information.
4726
47272007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4728
4729 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4730 TREE_THIS_VOLATILE if the associated type is a volatile type.
4731 (lto_materialize_function): Remove call to init_ssa_operands.
4732 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4733 variable when reading an SSA_NAME. Do the same when reading a
4734 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4735 (input_cfg): Call init_ssa_operands.
4736 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4737 Move call to init_tree_ssa...
4738 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4739 add_referenced_var on any variables referenced from the body of the
4740 function. Inform the rest of the compiler we are in SSA form and
4741 inform later passes about the current properties.
4742
47432007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4744
4745 * lto.c (lto_materialize_function): Add FIXME.
4746
47472007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4748
4749 * lto-lang.c (enum built_in_attribute): New enum.
4750 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4751 built_in_attributes): New variables.
4752 (def_builtin_1): New function.
4753 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4754
47552007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4756
4757 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4758 DECL_SOURCE_LOCATION for debugging purposes.
4759 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4760 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4761 laying out the decl until later.
4762 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4763 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4764 TREE_ADDRESSABLE.
4765 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4766 operand of an ADDR_EXPR.
4767 * lto-lang.c (enum lto_builtin_type): New enum.
4768 (builtin_type): New typedef.
4769 (builtin_types, string_type_node, const_string_type_node,
4770 wint_type_node, intmax_type_node, uintmax_type_node,
4771 signed_size_type_node): New variables.
4772 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4773 lto_build_c_type_nodes): New functions.
4774 (lto_init): Initialize builtin types.
4775 (lto_set_decl_assembler_name): Let the target machine mangle the
4776 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4777
47782007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4779
4780 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4781 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4782 the type is a constant type. Set the assembler name and inform
4783 the rest of the compiler about the new decl if the decl is not
4784 public.
4785 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4786 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4787 try to read in function bodies for functions that already have bodies.
4788 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4789 equivalency.
4790 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4791 Check for whether we matched a builtin function type before calling
4792 lto_same_type_p on the generated type. Permit cases where the
4793 declaration of an array is unbounded, but the definition is bounded.
4794 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4795 DECL_SIZE_UNIT if necessary.
4796
3f8257db 47972007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4798
4799 * lto-read.c (input_expr_operand): Get types right
4800 for COMPLEX_CST.
4801
3f8257db 48022007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4803
4804 * lto-read.c (make_new_block, input_cfg): Properly set
4805 n_basic_blocks.
4806
48072007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4808
4809 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4810 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4811
48122007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4813
4814 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4815 construct the integer type for bitfields.
4816
3f8257db 48172007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4818
4819 * lto-read.c (data_in.current_node_has_loc): Removed.
4820 (input_line_info): Returns true if node needs line set.
4821 (set_line_info): Always sets line if called.
4822 (clear_line_info): Removed reference to current_node_needs_loc.
4823 (input_expr_operand): Keeps track locally if current node needs a loc.
4824 (input_local_var): Added code to handle DECL_INITIAL for
4825 static local vars. Only set loc if necessary.
4826
48272007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4828
4829 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4830 DECL_CONTEXT.
4831
48322007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4833
4834 * lto.c: Include langhooks.h.
4835 (lto_find_integral_type): Rework logic to handle the case where
4836 got_byte_size is true, but the bitsize requested and that of the
4837 base_type doesn't match.
4838 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4839 asm_name if we are creating a VAR_DECL.
4840 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4841 definition.
4842 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4843 function reference and use the builtin's decl if so. Set the
4844 DECL_CONTEXT of the RESULT_DECL for the function.
4845 * lto-lang.c (registered_builtin_fndecls): New variable.
4846 (lto_getdecls): Return it.
4847 (lto_builtin_function): Chain the new decl onto
4848 registered_builtin_fndecls.
4849
3f8257db 48502007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4851
4852 * lto-read.c (process_tree_flags, lto_static_init_local):
4853 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4854 (input_line_info, clear_line_info): Fixed new line number code.
4855 (input_expr_operand): Added type to SWITCH_EXPR.
4856 (lto_read_body): Properly initialized data_in.
4857 Clear line info when leaving.
4858
48592007-11-13 Diego Novillo <dnovillo@google.com>
4860
4861 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4862 Initialize ARTIFICIAL.
4863 (lto_read_subroutine_type_subprogram_DIE): Initialize
4864 SAVED_SCOPE.
4865 * lto-read.c (set_line_info): Remove ; from calls to
4866 LINEMAP_POSITION_FOR_COLUMN.
4867
3f8257db 48682007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4869
4870 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4871 (input_expr_operand, input_local_var): Renamed get_type_ref to
4872 input_type_ref.
4873 (input_expr_operand): Get the types correct for
4874 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4875
48762007-11-13 Doug Kwan <dougkwan@google.com>
4877
4878 * lto-read.c (input_widest_uint_uleb128): New function.
4879 (input_tree_flags, process_tree_flags, input_line_info,
4880 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4881 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4882 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4883 (lto_static_init_local): Add code to assert that lto_flags_type is
4884 wide enough.
4885
48862007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4887
4888 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4889 (lto_read_subroutine_type_subprogram_DIE): Handle
4890 DW_AT_static_link and DW_AT_specification. Return the
4891 specification if present.
4892 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4893
48942007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4895
4896 * lto-lang.c: Include target.h.
4897 (registered_builtin_types): New variable.
4898 (lto_type_for_mode): Increase number of modes handled.
4899 (lto_builtin_function): Fix argument list and return the decl.
4900 (lto_register_builtin_type): New function.
4901 (lto_init): Initialize target builtins and language-independent
4902 nodes.
4903 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4904
3f8257db 49052007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4906
4907 * lto-read.c (input_expr_operand): Added code to properly handle
4908 index filed. Added new RANGE_EXPR case.
4909
3f8257db 49102007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4911
4912 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4913 (data_in): Added current_node_has_loc field.
4914 (input_line_info, set_line_info, clear_line_info): Added a support
4915 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4916 did not have on on the source side.
4917 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4918 numbers too.
4919
49202007-11-09 Doug Kwan <dougkwan@google.com>
4921
4922 * lto-read.c (input_expr_operand): Change type of operand 2 of
4923 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4924
49252007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4926
4927 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4928 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4929 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4930 the new decl we are creating. Move informing the middle end about
4931 the new decl to...
4932 (lto_main): ...here. Inform the middle end about global variables
4933 after we have read in all the input files.
4934 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4935 variables with internal linkage, so delete the check for internal
4936 linkage. Combine TREE_PUBLIC flags.
4937
49382007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4939
4940 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4941 DW_AT_decl_line.
4942 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4943 builtin specially. Move check for attribute compatibility
4944 earlier.
4945
49462007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4947
4948 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4949 * config-lang.in (gtfiles): Add lto.h and lto.c.
4950 * lto-elf.c: Include ggc.h.
4951 (lto_elf_file_open): Allocate elf_file from GC memory.
4952 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4953 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4954 in GC memory.
4955 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4956 (lto_file_close): Free file from GC memory.
4957 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4958 (lto_read_member_DIE): Fix declaration.
4959 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4960 in GC memory.
4961 (current_lto_file): New variable.
4962 (lto_main): Use it.
4963 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4964 lto_die_cache_entry): Move to...
4965 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4966 declarations accordingly.
4967 (struct lto_file_struct): Declare.
4968 (lto_file_vtable): Use it instead of lto_file.
4969
49702007-11-06 Alon Dayan <alond@il.ibm.com>
3f8257db 4971 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4972
4973 * lto-read.c (process_flags, lto_static_init_local):
4974 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4975 change global array num_flags_for_code to flags_length_for_code.
4976 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4977
49782007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4979
4980 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4981 layout functions to compute information about the newly constructed
4982 type.
4983
49842007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4985
4986 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4987 case to use DECL_RESULT if necessary.
4988
3f8257db 49892007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4990
4991 * lto-read.c (input_tree_list): Removed.
4992 (input_tree_flags): Added parameter to force flags no matter what
4993 tree code.
4994 (input_expr_operand): Added parameter to input_tree_flags.
4995 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4996 input_expr_operand rather than input_tree_lists.
4997 (input_local_var): Use input_expr_operand to read attributes
4998 rather then input_tree_list.
4999 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
5000
50012007-10-31 Nathan Froyd <froydnj@codesourcery.com>
5002
5003 * lto.c (lto_read_typedef_DIE): Fix comment typo.
5004 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
5005 TYPE_DECL for it.
5006 * lto-read.c (lto_read_body): Use correct sizes for calculating
5007 type_decls_offset and types_offset.
5008
50092007-10-30 Nathan Froyd <froydnj@codesourcery.com>
5010
5011 * lto-tree.h (union lang_tree_node): Change GTY description to chain
5012 with GENERIC_NEXT.
5013 * config-lang.in (gtfiles): Add lto-lang.c.
5014 * lto-lang.c: Include gt-lto-lto-lang.h.
5015 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
5016 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
5017 (lto/lto-read.o): Likewise.
5018
3f8257db 50192007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5020
5021 * lto-read.c (data_in): Added type_decls and current_col fields.
5022 (string_slot): New type to hold canonized file name.
5023 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
5024 input_line_info, set_line_info, clear_line_info): New functions.
5025 (file_name_hash_table): New hash table.
5026 (input_local_var, input_labels, input_local_vars_index,
5027 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
5028 (input_uleb128): Changed type of byte var.
5029 (input_expr_operand): Large number of changes to get line numbers
5030 correct. Added TYPE_DECL case.
5031 (input_globals): Added code to get TYPE_DECLs processed.
5032 (input_local_var): Added code to process line numbers and
5033 TREE_CHAIN and DECL_CONTEXT.
5034 (input_function, input_constructor): Added call to
5035 clear_line_number.
5036 (lto_static_init_local): Added code to get line numbers correct.
5037 (lto_read_body): Added code to get TYPE_DECLS read and to change
5038 parameters to the calls above that had their parms reorganized.
5039
5040
50412007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5042
5043 * lto.h (lto_resolve_typedecl_ref): Declare.
5044 * lto.c (lto_resolve_typedecl_ref): New function.
5045
50462007-10-29 Mark Mitchell <mark@codesourcery.com>
5047 Nathan Froyd <froydnj@codesourcery.com>
5048
5049 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
5050 DIEs even if we find an abstract origin for this DIE.
5051
50522007-10-29 Nathan Froyd <froydnj@codesourcery.com>
5053
5054 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
5055 RESULT_DECL slightly earlier. Only remember the decl for later
5056 if we successfully merge declarations.
5057
3f8257db 50582007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5059
5060 * lto-read.c (input_expr_operand): Give label_values the proper
5061 context and provide switch statements with a default type.
5062
50632007-10-23 Nathan Froyd <froydnj@codesourcery.com>
5064
5065 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
5066 * lto.c (lto_materialize_function): ...to here.
5067
50682007-10-22 Nathan Froyd <froydnj@codesourcery.com>
5069
5070 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
5071 * lto.c (lto_info_fd_init): Initialize it.
5072 (lto_info_fd_close): Free it.
5073 (lto_materialize_function): New function.
5074 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5075 unmaterialized_fndecls.
5076 (lto_file_read): Read in all the function bodies after we have read
5077 all of the DWARF info.
5078 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5079 reading a function body.
5080
3f8257db 50812007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5082
5083 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5084 semetric with output_tree_flags. Added call to log flags.
5085 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5086 type issues to make everything consistent with flags being
5087 unsigned HOST_WIDE_INTS.
5088 (input_expr_operand): Added call to
5089 recompute_tree_invariant_for_addr_expr.
5090 (input_local_var): Added debugging for tree_chains. Now calls
5091 input_tree_flags.
5092 (input_phi): Made flags unsigned HOST_WIDE_INT.
5093 (input_ssa_names): Now calls input_tree_flags.
5094 (lto_read_body): Now sets cfun.
5095 (lto_read_function_body): Now sets current_function_pointer.
5096
50972007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5098
5099 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5100 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5101 inspecting fields within.
5102 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5103 handle this appropriately.
5104
51052007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5106
5107 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5108 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5109 both DW_AT_abstract_origin and DW_AT_specification.
5110 (lto_read_subroutine_type_subprogram_DIE): Handle
5111 DW_AT_abstract_origin.
5112 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5113 (lto_read_DIE_at_ptr): Define as static to match declaration.
5114 Lookup the PTR in the cache before reading it from the file.
5115 (lto_resolve_var_ref): Adjust accordingly.
5116 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5117 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5118
51192007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5120
5121 * lto.c (lto_read_DIE_at_ptr): New function.
5122 (lto_resolve_var_ref): Use it.
5123 (lto_resolve_fn_ref): Use it.
5124 (lto_resolve_field_ref): Use it.
5125 (lto_read_variable_formal_parameter_constant_DIE): Follow
5126 DW_AT_specification and return the associated decl when appropriate.
5127
51282007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5129
5130 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5131 Implement for scalar integer modes.
5132 (lto_init): Initialize size_type_node.
5133
3f8257db 51342007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5135
5136 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5137 (input_local_var): Add chaining for params.
5138 (input_ssa_names): Add cfun parameter.
5139 (input_function): Remove unnecessary else.
5140
51412007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5142
5143 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5144 (lto_resolve_var_ref): Use proper types.
5145 (lto_resolve_fn_ref): Likewise.
5146 (lto_resolve_field_ref): Likewise.
5147
51482007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5149
5150 * lto-read.c (input_expr_operand): Remove case.
5151
51522007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5153
5154 * lto.c (lto_read_only_for_child_DIEs): New function.
5155 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5156 * lto-elf.c (lto_elf_map_lto_section): Remove.
5157 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5158 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5159 SSA_NAME. Add missing case for mechanical codes.
5160 (input_cfg): Use basic_block_info_for_function instead of
5161 basic_block_info.
5162
3f8257db 51632007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5164
5165 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5166 (input_list): Renamed input_tree_list and modified to follow same
5167 protocol as lto-function-out.c:output_tree_list.
5168 (input_expr_operand): Make asm operands use input_tree_list.
5169 (input_local_var): Now uses input_tree_list.
5170 (lto_read_body): Change placement for setting context of debug_labels.
5171
5172
3f8257db 51732007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5174
5175 * lto-read.c (input_real): Output debugging in proper order.
5176 (input_integer): Compute bit lengths properly.
5177 (input_list): Clean up declaration.
5178 (input_expr_operand): Change calls to input_real to match fix.
5179 Make reading of LTO_bit_field_ref1 match output.
5180 (input_local_var): Make reading of attributes match what is being
5181 written.
5182 (dump_debug_stream): Also print char in hex.
5183 (debug_out_fun): Fix signed unsigned mismatch.
5184
51852007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5186
5187 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5188 DW_AT_GNU_vector specially, as they are not contiguous with the
5189 specified set of attribute names. Use class_mask to check for
5190 errors at the end of the function
5191 (lto_resolve_var_ref): Read the DIE if it is not cached.
5192 (lto_resolve_fn_ref): Likewise.
5193 (lto_resolve_field_ref): Likewise.
5194
51952007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5196
5197 * lto.c: Include dwarf2out.h.
5198 (lto_cache_store_DIE): Assert that we never change the value.
5199 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5200 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5201 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5202 sensible type instead.
5203 (lto_read_structure_union_class_type_DIE): Store the newly
5204 created type prior to reading the members of the structure to
5205 avoid infinite recursion. Avoid computing types and alignments
5206 for structures whose sizes are unknown.
5207 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5208 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5209 DW_AT_const_value, and DW_AT_specification.
5210 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5211 Return early if we have already constructed the function type.
5212 (lto_read_typedef_DIE): Check to see if the type has been cached
5213 already. Cache the type before reading any children.
5214 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5215 (lto_read_DIE): Unset context->skip_non_parameters around reading
5216 the DIE.
5217 (lto_resolve_fn_ref): Delete trailing whitespace.
5218
3f8257db 52192007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5220
5221 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5222
52232007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5224
5225 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5226
52272007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5228
5229 * lto-lang.c (signed_and_unsigned_types): New variable.
5230 (lto_type_for_size): Consult signed_and_unsigned_types to find
5231 an approprite type, creating it if necessary.
5232 (lto_set_decl_assembler_name): Add actual method body.
5233
52342007-09-06 Jim Blandy <jimb@codesourcery.com>
5235
5236 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5237 can't find a var init for this variable, leave its DECL_INITIAL.
5238 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5239 lto_elf_map_fn_body.
5240 (lto_map_lto_section): New function.
5241 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5242 bodies, and lto_elf_map_optional_lto_section for variable
5243 initializers.
5244 (lto_elf_find_section_data): Quietly return NULL if the section is
5245 missing.
5246 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5247
5248 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5249
5250 * lto-read.c (lto_read_body): Doc fix.
5251
3f8257db 52522007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5253
5254 * lto-read.c (fun_in): Renamed to data_in.
5255 (input_expr_operand, input_local_var, input_string_internal,
5256 input_string, input_real, input_list, get_label_decl,
5257 get_type_ref, input_expr_operand, input_globals, input_labels,
5258 input_local_vars_index, input_local_var, input_local_vars,
5259 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5260 (input_constructor): New function.
5261 (lto_read_function_body): Renamed to lto_read_body and generalized
5262 to handle both functions and constructors.
5263 (lto_read_function_body, lto_read_var_init): New function.
5264
5265
3f8257db 52662007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5267
5268 * lto-read.c (input_expr_operand): Assert that there really is a
5269 FUNCTION_DECL.
5270 (input_globals): Removed checks on 0 section.
5271
3f8257db 52722007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5273
5274 * lto-read.c (fun_in): Added local_decls_index and
5275 local_decls_index_d.
5276 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5277 (input_globals): Enabled code to handle FIELD_DECLs.
5278 (input_local_vars_index, input_local_vars): New function.
5279 (input_local_var): Changed to allow locals to be input randomly.
5280 (lto_read_function_body): Added code to input the
5281 local_decls_index and to free various structures.
5282
52832007-08-17 Jim Blandy <jimb@codesourcery.com>
5284
5285 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5286 ATTRIBUTE_UNUSED from 'die' formal.
5287
5288 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5289 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5290 (input_list): Fix type of 'tag'.
5291 (input_expr_operand): Fix type of 'tag' argument. Update
5292 declaration. Fix type of 'ctag'. Add default case to switch,
5293 since the type of the switched value is now an enum.
5294 (input_local_vars): Fix type of 'tag'.
5295 (input_bb): Fix type of 'tag' argument.
5296 (input_function): Fix type of 'tag' argument.
5297
52982007-08-16 Jim Blandy <jimb@codesourcery.com>
5299
5300 * lto.c (lto_read_member_DIE): Record the tree we create in
5301 fd->die_cache. (Our 'die' argument is no longer unused.)
5302 (lto_resolve_field_ref): New function.
5303 * lto.h (lto_resolve_field_ref): New declaration.
5304
53052007-08-15 Jim Blandy <jimb@codesourcery.com>
5306
5307 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5308
53092007-08-07 Jim Blandy <jimb@codesourcery.com>
5310
5311 * lto.c (lto_read_form): Complete attr_classes table.
5312 (DWARF2_form_data): Doc fix.
5313
53142007-08-05 Mark Mitchell <mark@codesourcery.com>
5315
5316 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5317 and unmap_var_init.
5318 (lto_read_var_init): Declare.
5319 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5320 interface for reading variable initializers.
5321 * lto-elf.c (lto_elf_read_var_init): Remove.
5322 (lto_elf_file_vtable): Update initializer.
5323 (lto_elf_read_var_init): Add comment about unused-ness.
5324 * lto-read.c (lto_read_var_init): New.
5325
5326 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5327
3f8257db 53282007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5329
5330 * lto-read.c (lto_read_function_body): Moved declaration of fn
5331 outside of ifdef.
5332
3f8257db 53332007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5334
5335 * lto-read.c (input_uleb128, input_string_internal, input_real,
5336 input_integer, input_record_start, input_list, get_type_ref,
5337 input_flags, input_expr_operand, input_expr_operand,
5338 input_expr_operand, input_local_vars, input_cfg, input_phi,
5339 input_ssa_names, input_bb, input_function): Added semicolons.
5340
5341
3f8257db 53422007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5343
5344 * lto-read.c (input_globals): Remove debugging.
5345 (input_function): Set DECL_ARGUMENTS.
5346
3f8257db 53472007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5348
5349 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5350 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5351 (input_phi): Made work with operands other than SSA_NAMES and
5352 fixed processing of flags.
5353 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5354 (input_flags): New function.
5355 * lto-lang.c (lto_init): Changed state of in_lto_p.
5356
5357
53582007-07-24 Mark Mitchell <mark@codesourcery.com>
5359
5360 * lto-tree.h (lto_varargs_cookie): Remove.
5361 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5362 skip_non_parameters, skip_parameters.
5363 (lto_varargs_cookie): Remove.
5364 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5365 parameter types.
5366 (lto_read_abbrev): New function.
5367 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5368 child DIEs.
5369 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5370 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5371 (lto_file_read): Initialize new context fields.
5372 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5373 (lto_unsigned_type): Remove.
5374 (lto_signed_type): Likewise.
5375 (lto_signed_or_unsigned_type): Likewise.
5376 (lto_init): Do not create lto_varargs_cookie.
5377 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5378 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5379 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5380
53812007-07-19 Jan Hubicka <jh@suse.cz>
5382
5383 * lto-read.c (lto_read_function_body): Produce empty scope block
5384 to avoid crash.
5385
53862007-07-18 Mark Mitchell <mark@codesourcery.com>
5387
5388 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5389 process local variables.
5390 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5391
3f8257db 53922007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5393
5394 * lto-read.c (input_list, input_expr_operand): Added struct
5395 function parameter.
5396 (init_cfg, finalize_cfg): Removed function.
5397 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5398 (input_labels, input_local_vars): Now takes input_block parameter rather than
5399 synthsyzing it.
5400 (input_cfg, input_phi, input_ssa_names): New functions.
5401 (input_bb): Now passes in input_blocks. Does not construct cfg
5402 and processes the list of phi functions.
5403 (input_function): Now builds both the cfg and ssa_names table.
5404 (lto_read_function_body): Processes new header fields to construct
5405 streams for the ssa_names and cfg and their debugging.
5406 * lto/lto-lang.c (lto_init): Set in_lto_p.
5407
5408
54092007-06-28 Mark Mitchell <mark@codesourcery.com>
5410
5411 * lto.h (lto_file_vtable): Add read_var_init.
5412 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5413 initializers.
5414 (lto_main): Remove bogus asserts.
5415 * lto-elf.c (tm.h): Include it.
5416 (libiberty.y): Likewise.
5417 (lto_elf_file): Add strtab and symtab. Rename
5418 string_table_section_index to sec_strtab.
5419 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5420 (lto_elf_get_shdr): New function.
5421 (lto_elf_free_shdr): Likewise.
5422 (lto_elf_find_section_data): Use them.
5423 (lto_elf_read_symtab): New function.
5424 (lto_elf_lookup_sym): Likewise.
5425 (lto_elf_free_sym): Likewise.
5426 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5427 (lto_elf_built_init): New function.
5428 (lto_elf_read_var_init): Likewise.
5429 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5430
3f8257db 54312007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5432
5433 * lto-read (make_new_block): Initialize the stmt_list.
5434 (lto_static_init_local): Add debugging for missing codes.
5435
54362007-06-26 Mark Mitchell <mark@codesourcery.com>
5437
5438 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5439 unprototyped functions.
5440
54412007-06-23 Mark Mitchell <mark@codesourcery.com>
5442
5443 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5444 Handle DW_AT_MIPS_linkage_name.
5445 (lto_read_subroutine_type_subprogram): Likewise. Correct
5446 compilation errors.
5447 (lto_main): Remove incorrect assertions.
5448 * lto-symbtab.c: Build function types out of TREE_LISTs.
5449
5450 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5451
5452 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5453
3f8257db 54542007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5455
5456 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5457 dummy since ggc does not like empty structs.
5458 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5459 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5460 expr->common to expr->base.
5461 (make_new_block): Moved stmt_list to proper place.
5462
5463
54642007-03-14 Robert Kennedy <jimbob@google.com>
5465
5466 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5467 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5468 assembler name from DWARF.
5469 * lto-lang.c (lto_set_decl_assembler_name) New function.
5470
54712006-09-10 Mark Mitchell <mark@codesourcery.com>
5472
5473 * lto.h (lto_file_vtable): New structure.
5474 (lto_file): Add vtable pointer.
5475 (lto_file_init): Add vtable paramter.
5476 (lto_read_function_body): New function.
5477 (lto_symtab_merge_fn): New function.
5478 * lto.c (lto_file_init): Add vtable parameter.
5479 (lto_read_form): Fill in entries for DW_AT_prototyped,
5480 DW_AT_frame_base.
5481 (lto_read_subroutine_type_subprogram_DIE): New function.
5482 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5483 DW_TAG_subprogram.
5484 * lto-elf.c (lto_elf_vile_vtable): New variable.
5485 (lto_elf_file_open): Pass it to lto_file_init.
5486 (lto_elf_map_fn_body): New function.
5487 (lto_elf_unmap_fn_body): Likewise.
5488 * lto-read.c: New file.
5489 * lto-symtab.c (lto_symtab_merge_fn): New function.
5490 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5491 tree_rest_of_compilation.
5492 * Make-lang.in (LTO_OBJS): Add lto-read.o
5493 (lto-read.o): New target.
5494
54952006-09-03 Mark Mitchell <mark@codesourcery.com>
5496
5497 * lto.c (<inttypes.h>): Don't include it.
5498 (lto_context): Don't typedef it.
5499 (lto_resolve_reference): New function.
5500 (lto_read_form): Use it.
5501 (lto_resolve_type_ref): New function.
5502 (lto_resolve_var_ref): Likewise.
5503 (lto_resolve_fn_ref): Likewise.
5504 * lto.h (<inttypes.h>): Include it.
5505 (lto_context): New type.
5506 (lto_ref): New structure.
5507 (lto_resolve_type_ref): Declare.
5508 (lto_resolve_var_ref): Likewise.
5509 (lto_resolve_fn_ref): Likewise.
5510
55112006-08-18 Mark Mitchell <mark@codesourcery.com>
5512
5513 * lang-specs.h: New file.
5514
55152006-08-14 Mark Mitchell <mark@codesourcery.com>
5516
5517 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5518 (lto_info_fd_close): Deallocate it.
5519 (lto_die_cache_entry): New structure.
5520 (lto_cache_hash): New function.
5521 (lto_cache_eq): Likewise.
5522 (lto_cache_store_DIE): Likewise.
5523 (lto_cache_lookup_DIE): Likewise.
5524 (lto_read_referenced_type_DIE): Use the cache.
5525 (lto_read_pointer_type_DIE): Robustify.
5526 (lto_read_DIE): Use the cache.
5527 * lto.h (hashtab.h): Include.
5528 (lto_info_fd): Add DIE cache.
5529 * Make-lang.in (LTO_H): New variable.
5530 (lto/lto-lang.o): Use LTO_H.
5531 (lto/lto-elf.o): Likewise.
5532 (lto/lto-symtab.o): Likewise.
5533
55342006-07-09 Mark Mitchell <mark@codesourcery.com>
5535
5536 * lto.c (lto_abi_mismatch_error): New function.
5537 (lto_abbrev_read): Initialize num_abbrevs.
5538 (lto_read_form): Specify allowed form classes for
5539 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5540 (lto_read_variable_formal_parameter_constant_DIE): Handle
5541 DW_AT_declaration. Call lto_symtab_merge_var.
5542 (lto_read_pointer_type_DIE): New function.
5543 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5544 not creat TYPE_DECLs for types that already have them.
5545 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5546 (lto_set_cu_context): Make cu_start point to the header, not the
5547 first DIE.
5548 (lto_file_read): Adjust for change to lto_set_cu_context.
5549 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5550 (lto/lto-symtab.o): New rule.
5551 * lto-tree.h (lang_identifier): Add decl field.
5552 (LANG_IDENTIFIER_CAST): New macro.
5553 (LTO_IDENTIFIER_DECL): Likewise.
5554 (lto_symtab_merge_var): Declare.
5555 * lto-symtab.c: New file.
5556
55572006-07-02 Daniel Berlin <dberlin@dberlin.org>
5558
5559 * lto.c (lto_context): Add current_cu and info_fd members.
5560 (DWARF2_CompUnit): New structure.
5561 (lto_read_DIE): Take lto_info_fd *.
5562 (lto_read_child_DIEs): Ditto.
5563 (lto_file_corrupt_error): Constify argument.
5564 (lto_set_cu_context): New function
5565 (lto_info_fd_init): Ditto.
5566 (lto_info_fd_close): Ditto.
5567 (lto_file_init): Use lto_info_fd_init.
5568 (lto_file_close): Use lto_info_fd_close.
5569 (lto_read_initial_length): Pass in pointer to header size.
5570 (lto_read_comp_unit_header): Correct cu_length to
5571 real length from beginning of header. Take lto_info_fd * as
5572 argument.
5573 (find_cu_for_offset): New function.
5574 (lto_read_form): Change first argument to lto_info_fd *.
5575 Add FORM_CONTEXT argument.
5576 Handle DW_FORM_ref_addr.
5577 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5578 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5579 Swap contexts if necessary for form.
5580 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5581 lto_file_corrupt_error.
5582 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5583 (lto_read_referenced_type_DIE): Change first argument to
5584 lto_info_fd *. Access lto_fd fields through base pointer.
5585 (lto_read_compile_unit_DIE): Change first argument to an
5586 lto_info_fd *.
5587 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5588 (lto_read_base_type_DIE): Ditto.
5589 (lto_read_child_DIEs): Ditto.
5590 (lto_read_DIE): Ditto. Change type of function pointer.
5591 (lto_info_read): New function.
5592 (lto_set_cu_context): Ditto.
5593 (lto_file_read): Use lto_info_read, walk resulting CU's
5594 (lto_main): Update for lto_info_fd change.
5595 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5596 necessary.
5597 * lto.h (DWARF2_CompUnit): New structure.
5598 (lto_info_fd): Ditto.
5599 (lto_file): Change debug_info to be an lto_info_fd.
5600
56012006-06-25 Mark Mitchell <mark@codesourcery.com>
5602
5603 * lto.c (toplev.h): Include it.
5604 (dwarf2.h): Likewise.
5605 (tree.h): Likewise.
5606 (tm.h): Likewise.
5607 (cgraph.h): Likewise.
5608 (ggc.h): Likewise.
5609 (inttypes.h): Likewise.
5610 (DWARF2_attr): New type.
5611 (DWARF2_abbrev): Likewise.
5612 (DWARF2_class): Likewise.
5613 (DWARF2_form_data): Likewise.
5614 (lto_context): Likewise.
5615 (lto_fd_init): New function.
5616 (lto_abbrev_fd_init): Likewise.
5617 (lto_abbrev_fd_close): Likewise.
5618 (lto_file_init): Use them.
5619 (lto_file_close): New function.
5620 (lto_file_corrupt_error): Likewise.
5621 (LTO_CHECK_INT_VAL): New macro.
5622 (lto_check_size_t_val): New function.
5623 (lto_check_int_val): Likewise.
5624 (LTO_READ_TYPE): New macro.
5625 (lto_read_ubyte): New function.
5626 (lto_read_uhalf): Likewise.
5627 (lto_read_uword): Likewise.
5628 (lto_read_uleb128): Likewise.
5629 (lto_read_initial_length): Likewise.
5630 (lto_abbrev_read_attrs): Likewise.
5631 (lto_abbrev_read): Likewise.
5632 (lto_abbrev_lookup): Likewise.
5633 (lto_read_section_offset): Likewise.
5634 (lto_read_comp_unit_header): Likewise.
5635 (lto_read_form): Likewise.
5636 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5637 (LTO_BEGIN_READ_ATTRS): Likewise.
5638 (LTO_END_READ_ATTRS): Likewise.
5639 (lto_unsupported_attr_error): New function.
5640 (lto_get_identifier): Likewise.
5641 (lto_read_referenced_type_DIE): Likewise.
5642 (lto_read_compile_unit_DIE): Likewise.
5643 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5644 (lto_read_base_type_DIE): Likewise.
5645 (lto_read_DIE): Likewise.
5646 (lto_read_child_DIEs): Likewise.
5647 (lto_file_read): Read DIEs.
5648 (lto_main): Ask middle end to emit entities.
5649 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5650 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5651 (lto_elf_file_close): Likewise.
5652 * lto.h (lto_file): Declare.
5653 (DWARF2_abbrev): Likewise.
5654 (lto_fd): New type.
5655 (lto_abbrev_fd): Likewise.
5656 (lto_file): Use new types.
5657 (lto_file_close): Declare.
5658 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5659
56602006-06-18 Mark Mitchell <mark@codesourcery.com>
5661
5662 * lto.h: New file.
5663 * lto.c: New file.
5664 * lto-elf.c: New file.
5665 * lto-lang.c (flags.h): Include it.
5666 (lto.h): Likewise.
5667 (lto_init): New function.
5668 (lto_write_globals): Remove.
5669 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5670 (LANG_HOOKS_INIT): Define.
5671 (LANG_HOOKS_PARSE_FILE): Likewise.
5672 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5673 (LTO_EXE): Link with libelf.
5674 (lto/lto-lang.o): Update dependencies.
5675 (lto/lto.o): New target.
5676 (lto/lto-elf.o): Likewise.
5677
56782006-06-12 Mark Mitchell <mark@codesourcery.com>
5679
5680 * config-lang.in: New file.
5681 * Make-lang.in: Likewise.
5682 * lto-tree.h: Likewise.
5683 * lto-lang.c: Likewise.
818ab71a 5684\f
cbe34bb5 5685Copyright (C) 2006-2017 Free Software Foundation, Inc.
d7f09764 5686
818ab71a
JJ
5687Copying and distribution of this file, with or without modification,
5688are permitted in any medium without royalty provided the copyright
5689notice and this notice are preserved.