]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Merge of HSA
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
b2b40051
MJ
12016-01-19 Martin Liska <mliska@suse.cz>
2 Martin Jambor <mjambor@suse.cz>
3
4 * lto-partition.c: Include "hsa.h"
5 (add_symbol_to_partition_1): Put hsa implementations into the
6 same partition as host implementations.
7
5803bd01
JH
82016-01-12 Jan Hubicka <hubicka@ucw.cz>
9
10 PR lto/69003
11 * lto-partition.c (rename_statics): Fix pasto.
12
13092f61
RB
132016-01-18 Richard Biener <rguenther@suse.de>
14
15 PR lto/69337
16 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
17 function vs. variable.
18
3c4e91c9
RB
192016-01-12 Richard Biener <rguenther@suse.de>
20
21 PR lto/69077
22 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
23 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
24
818ab71a
JJ
252016-01-04 Jakub Jelinek <jakub@redhat.com>
26
27 Update copyright years.
28
3fddb2ef
JH
292015-12-10 Jan Hubicka <hubicka@ucw.cz>
30
31 PR lto/68878
32 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
33 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
34 (lto_symtab_prevailing_decl): Use it.
35
4a38b02b
IV
362015-12-15 Ilya Verbin <ilya.verbin@intel.com>
37
38 * lto.c: Include stringpool.h and fold-const.h.
39 (offload_handle_link_vars): New static function.
40 (lto_main): Call offload_handle_link_vars.
41
ca834876
JH
422015-12-10 Jan Hubicka <hubicka@ucw.cz>
43
44 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
45
958a627f
JH
462015-12-11 Jan Hubicka <hubicka@ucw.cz>
47
48 PR ipa/61886
49 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
50 values of error and warning attributes.
51
da20571a
JH
522015-12-08 Jan Hubicka <hubicka@ucw.cz>
53
54 PR lto/68811
55 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
56 DECL.
57 (LTO_NO_PREVAIL): Use gcc_checking_assert.
58
378004b9
JH
592015-12-08 Jan Hubicka <hubicka@ucw.cz>
60
61 PR lto/68811
62 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
63 by itself.
64
6b9ac179
JH
652015-12-08 Jan Hubicka <hubicka@ucw.cz>
66
67 PR ipa/61886
68 * lto-symtab.c: Include lto-symtab.h.
69 (lto_cgraph_replace_node): Do not merge profiles here.
70 (lto_symtab_merge_p): New function.
71 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
72 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
73 aliases.
74 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
75 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
76 * lto.c: Include lto-symtab.h
77 * lto-symtab.h: New.
78
41c60c6c
JH
792015-12-08 Jan Hubicka <hubicka@ucw.cz>
80
81 PR ipa/61886
82 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
83 are not part of the definition.
84 (contained_in_symbol): Likewise.
85 (promote_symbol): When promoting a symbol also promote all transparent
86 aliases.
87 (rename_statics): Weakref needs unique name, too.
88
71e54687
JH
892015-12-07 Jan Hubicka <hubicka@ucw.cz>
90
91 PR ipa/61886
92 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
93 rename_statics, rename_statics): Handle transparent aliases.
94
88636b62
JH
952015-12-04 Jan Hubicka <hubicka@ucw.cz>
96
97 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
98 merged_comdat.
99
8c86248e
JH
1002015-12-01 Jan Hubicka <hubicka@ucw.cz>
101
102 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
103
1ff9ed6f
JH
1042015-11-25 Jan Hubicka <jh@suse.cz>
105
106 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
107 * lang.opt (lto_linker_output): New enum.
108 (flinker_output): New flag.
109
22bea0be
JH
1102015-11-24 Jan Hubicka <hubicka@ucw.cz>
111
112 * lto-symtab.c: Include alias.h
113 (warn_type_compatibility_p): Replace types_compatible_p checks by
114 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
115 (lto_symtab_merge): Compare DECL sizes.
116 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
117
aea50b45
JH
1182015-11-24 Jan Hubicka <hubicka@ucw.cz>
119
120 * lto.c (iterative_hash_canonical_type): Recruse for all types
121 which pass !canonical_type_used_p.
122 (gimple_register_canonical_type_1): Sanity check we do not compute
123 canonical type of anything with !canonical_type_used_p.
124 (gimple_register_canonical_type): Skip all types that are
125 !canonical_type_used_p
126
deb3dae6
JH
1272015-11-24 Jan Hubicka <hubicka@ucw.cz>
128
129 * lto.c (unify_scc): Use free_node.
130
f85d2487
JH
1312015-11-21 Jan Hubicka <hubicka@ucw.cz>
132
133 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
134 (gimple_register_canonical_type_1): Check that pointers do not get
135 canonical types.
136 (gimple_register_canonical_type): Do not register pointers.
137
1382015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
139
140 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
141 flag for types that are not ODR; fix loop walking parameters.
142
69f293c9
AM
1432015-11-11 Andrew MacLeod <amacleod@redhat.com>
144
145 * lto-lang.c: Remove unused header files.
146 * lto-object.c: Likewise.
147 * lto-partition.c: Likewise.
148 * lto-symtab.c: Likewise.
149 * lto.c: Likewise.
150
ee45a32d
EB
1512015-11-08 Eric Botcazou <ebotcazou@adacore.com>
152
153 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
154
0aad0198
RS
1552015-11-07 Richard Sandiford <richard.sandiford@arm.com>
156
157 * lto-lang.c: Don't undef DEF_BUILTIN.
158
2adfab87
AM
1592015-10-29 Andrew MacLeod <amacleod@redhat.com>
160
161 * lto-lang.c: Reorder #include's and remove duplicates.
162 * lto-object.c: Likewise.
163 * lto-partition.c: Likewise.
164 * lto-symtab.c: Likewise.
165 * lto.c: Likewise.
166
b2b29377
MM
1672015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
168
169 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
170 conditionals.
171 (lto_fixup_state): Likewise.
172 (do_whole_program_analysis): Use
173 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
174 conditionals.
175
d9a6bd32
JJ
1762015-10-13 Jakub Jelinek <jakub@redhat.com>
177
178 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
179 DEF_FUNCTION_TYPE_11): Define.
180
9c4eeafc
JH
1812015-10-10 Jan Hubicka <hubicka@ucw.cz>
182
183 * lto.c (hash_canonical_type): Honor
184 type_with_interoperable_signedness.
185
3e32ee19
NS
1862015-09-28 Nathan Sidwell <nathan@codesourcery.com>
187
188 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
189 (DEF_FUNCTION_TYPE_VAR_11): Delete.
190
f196d062
RB
1912015-08-31 Richard Biener <rguenther@suse.de>
192
193 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
194 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
195 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
196 participate in merging with something else.
197
45aee888
RB
1982015-08-31 Richard Biener <rguenther@suse.de>
199
200 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
201 test, do not replace a non-builtin with a builtin.
202 * lto.c (compare_tree_sccs_1): Do not merge things we stream
203 as builtins vs. non-builtins.
204
a79683d5
TS
2052015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
206
207 * lto.h: Remove useless typedefs.
208
48d859bb
AM
2092015-07-15 Andrew MacLeod <amacleod@redhat.com>
210
211 * lto.c: Remove redundant includes.
212
026c3cfd
AH
2132015-07-12 Aldy Hernandez <aldyh@redhat.com>
214
215 * lto-lang.c: Fix double word typos.
216
9fdcd34e
AM
2172015-07-10 Andrew MacLeod <amacleod@redhat.com>
218
219 * lto.c: Include cfghooks.h rather than predict.h.
220
f51ade33
AM
2212015-07-09 Andrew MacLeod <amacleod@redhat.com>
222
223 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
224 lto-streamer.h.
225 * lto-object.c: Likewise.
226 * lto-partition.c: Likewise.
227 * lto-symtab.c: Likewise.
228
1916bcb5
AM
2292015-07-09 Andrew MacLeod <amacleod@redhat.com>
230
231 * lto-lang.c: Adjust includes for flags.h changes.
232
c7131fb2
AM
2332015-07-07 Andrew MacLeod <amacleod@redhat.com>
234
235 * lto-lang.c: Adjust includes.
236 * lto-object.c: Likewise.
237 * lto-partition.c: Likewise.
238 * lto-symtab.c: Likewise.
239 * lto.c: Likewise.
240
f0889939
AM
2412015-06-25 Andrew MacLeod <amacleod@redhat.com>
242
243 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
244 * lto-object.c: Likewise.
245 * lto-partition.c: Likewise.
246 * lto-symtab.c: Likewise.
247 * lto-tree.h: Likewise.
248 * lto.c: Likewise.
249
8d67ee55
RS
2502015-06-25 Richard Sandiford <richard.sandiford@arm.com>
251
252 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
253 than typed_noop_remove. Remove redudant typedefs.
254
abb226c9
AM
2552015-06-17 Andrew MacLeod <amacleod@redhat.com>
256
257 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
258 * lto-object.c: Likewise.
259 * lto-partition.c: Likewise.
260 * lto-symtab.c: Likewise.
261 * lto.c: Likewise.
262
351d90f4
JH
2632015-06-14 Jan Hubicka <hubicka@ucw.cz>
264
265 PR ipa/66181
266 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
267
44c42705
DD
2682015-06-12 DJ Delorie <dj@redhat.com>
269
270 * lto-lang.c (lto_type_for_size): Include intN types.
271 (lto_type_for_mode): Likewise.
272
64578d98
JH
2732015-06-08 Jan Hubicka <hubicka@ucw.cz>
274
275 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
276
13fdf2e2
AM
2772015-06-08 Andrew MacLeod <amacleod@redhat.com>
278
279 * lto-lang.c : Adjust include files.
280 * lto-object.c : Likewise.
281 * lto-partition.c : Likewise.
282 * lto-partition.h : Likewise.
283 * lto-symtab.c : Likewise.
284 * lto.c : Likewise.
285 * lto.h : Likewise.
286
ccb5ad37
JH
2872015-06-06 Jan Hubicka <hubicka@ucw.cz>
288
6542950e
JH
289 PR lto/65378
290 * lto-symtab.c (warn_type_compatibility_p): Fix call of
291 odr_or_derived_type_p.
292 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
293
2942015-06-08 Jan Hubicka <hubicka@ucw.cz>
295
296
ccb5ad37
JH
297 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
298 pointers.
299
d7438551
AH
3002015-06-05 Aldy Hernandez <aldyh@redhat.com>
301
302 * lto-lang.c (lto_write_globals): Remove.
303 (LANG_HOOKS_WRITE_GLOBALS): Same.
304
ecb9f223
AM
3052015-06-04 Andrew MacLeod <amacleod@redhat.com>
306
307 * lto-lang.c: Adjust includes for restructured coretypes.h.
308 * lto-object.c: Likewise.
309 * lto-partition.c: Likewise.
310 * lto-symtab.c: Likewise.
311 * lto.c: Likewise.
312
9cb9b937
JH
3132015-06-04 Jan Hubicka <hubicka@ucw.cz>
314
315 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
316
93e2aa6d
JH
3172015-06-03 Jan Hubicka <hubicka@ucw.cz>
318
319 * lto.c (iterative_hash_canonical_type,
320 gimple_register_canonical_type): only hash main variants of types
321
faae53f8
ML
3222015-05-27 Martin Liska <mliska@suse.cz>
323
324 * lto-partition.c (new_partition): Reset number of symbols.
325 (add_symbol_to_partition_1): Increment number of symbols.
326 (undo_partition): Decrement number of symbols.
327 (lto_balanced_map): Dump number of symbols and insns that
328 belong to a partition.
329 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
330
b727ba74
JH
3312015-05-22 Jan Hubicka <hubicka@ucw.cz>
332
333 * lto.c (hash_canonical_type): Be sure we hash only types that
334 need alias set.
335 (gimple_register_canonical_type_1): Do not produce canonical
336 types for types that do not need alias sets.
337
1d1218fb
JH
3382015-05-22 Jan Hubicka <hubicka@ucw.cz>
339
340 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
341
872d5034
JH
3422015-05-19 Jan Hubicka <hubicka@ucw.cz>
343
344 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
345
259d29e3
JH
3462015-05-17 Jan Hubicka <hubicka@ucw.cz>
347
348 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
349 compare ODR types (if available) and function types.
350 (lto_symtab_merge): ... here; output ODR violation warnings
351 and call warn_types_mismatch.
352
b0845a1e
JH
3532015-04-29 Jan Hubicka <hubicka@ucw.cz>
354
355 * lto.c (lto_fixup_state): Call verify_type.
356
67f58944
TS
3572015-04-18 Trevor Saunders <tsaunders@mozilla.com>
358
b0845a1e 359 * lto.c: Adjust for hash_table changes.
67f58944 360
36ceb0e3
JH
3612015-03-27 Jan Hubicka <hubicka@ucw.cz>
362
363 * lto.c (lto_read_decls): Move code registering odr types out
364 of TYPE_CANONICAL conditional and also register polymorphic types.
365
afd1e7c6
JH
3662015-03-26 Jan Hubicka <hubicka@ucw.cz>
367
368 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
369 DECL_ARTIFICAL symbols.
370
eaeec5ec
JH
3712015-03-26 Jan Hubicka <hubicka@ucw.cz>
372
373 PR lto/65536
374 * lto.c (unify_scc): Revert location cache when unification
375 suceeded.
376 (lto_read_decls): Accept location cache after sucess;
377 apply location cache before calling debug hooks.
378
1c4db829
JH
3792015-03-10 Jan Hubicka <hubicka@ucw.cz>
380
381 * lto.c (read_cgraph_and_symbols): Do not do merging
382 at ltrans stage.
383
db847fa8
JJ
3842015-02-26 Jakub Jelinek <jakub@redhat.com>
385
386 * lto.c (lto_mode_identity_table): New variable.
387 (lto_read_decls): Add mode_table argument to the lto_input_block
388 constructor.
389 (lto_file_finalize): Initialize mode_table.
390 (lto_init): Initialize lto_mode_identity_table.
391
56a9f6bc
TS
3922015-02-24 Thomas Schwinge <thomas@codesourcery.com>
393
394 PR libgomp/64625
395 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
396 Remove macros.
397 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
398
ebc8f0bb
JH
3992015-02-03 Jan Hubicka <hubicka@ucw.cz>
400
401 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
402
40fecdd6
JM
4032015-01-30 Joseph Myers <joseph@codesourcery.com>
404
405 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
406 changed to pass input_location as first argument.
407
040968a8
JH
4082014-12-11 Jan Hubicka <hubicka@ucw.cz>
409
410 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
411
69fe4502
JH
4122014-12-11 Jan Hubicka <hubicka@ucw.cz>
413
414 * lto.c (compare_tree_sccs_1): Add comparsion of
415 DECL_FUNCTION_SPECIFIC_TARGET
416
41dbbb37
TS
4172015-01-15 Thomas Schwinge <thomas@codesourcery.com>
418 James Norris <jnorris@codesourcery.com>
419
420 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
421 New macros.
422 * lto.c: Include "gomp-constants.h".
423
837bac8c
IV
4242015-01-14 Ilya Verbin <ilya.verbin@intel.com>
425
426 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
427 from select_what_to_stream.
428
1b34e6e2
BS
4292015-01-09 Bernd Schmidt <bernds@codesourcery.com>
430 Jakub Jelinek <jakub@redhat.com>
431
432 PR middle-end/64412
433 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
434 if ACCEL_COMPILER.
435
adfac8df
JJ
4362015-01-09 Michael Collison <michael.collison@linaro.org>
437
438 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
439 input.h, alias.h, symtab.h, options, fold-const.h,
440 wide-int.h, and inchash.h due to flattening of tree.h.
441 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
442 input.h, alias.h, symtab.h, fold-const.h,
443 wide-int.h, and inchash.h due to flattening of tree.h.
444 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
445 input.h, alias.h, symtab.h, options, fold-const.h,
446 wide-int.h, and inchash.h due to flattening of tree.h.
447 * lto-partition.c: Ditto.
448 * lto-symtab.c: Ditto.
449
5624e564
JJ
4502015-01-05 Jakub Jelinek <jakub@redhat.com>
451
452 Update copyright years.
453
9a1e784a
ML
4542014-12-22 Martin Liska <mliska@suse.cz>
455
456 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
457 is used.
458 (undo_partition): Likewise.
459 (lto_balanced_map): Likewise.
460
dd912cb8
ML
4612014-12-22 Martin Liska <mliska@suse.cz>
462
463 * lto-partition.c: Include of symbol-summary.h is added.
464 * lto-symtab.c: Likewise.
465 * lto.c: Likewise.
466
17e0fc92
JH
4672014-12-11 Jan Hubicka <hubicka@ucw.cz>
468
469 PR ipa/61324
470 * lto.c (read_cgraph_and_symbols): Update call of
471 remove_unreachable_nodes.
472 (do_whole_program_analysis): Remove call of
473 symtab->remove_unreachable_nodes
474
58dddbd2
TS
4752014-12-08 Trevor Saunders <tsaunders@mozilla.com>
476
477 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
478 htab with malloc instead of ggc.
479
907dadbd
TS
4802014-11-20 Trevor Saunders <tsaunders@mozilla.com>
481
482 * lto.c: Replace htab with hash_table.
483
9c71e9df
TS
4842014-11-20 Trevor Saunders <tsaunders@mozilla.com>
485
486 * lto.c (lto_read_in_decl_state): Adjust.
487 (lto_fixup_state): Likewise.
488
72a4a8b0
JH
4892014-11-17 Jan Hubicka <hubicka@ucw.cz>
490
491 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
492
54e774c0
JH
4932014-11-14 Jan Hubicka <hubicka@ucw.cz>
494
495 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
496
1f6be682
IV
4972014-11-13 Ilya Verbin <ilya.verbin@intel.com>
498 Bernd Schmidt <bernds@codesourcery.com>
499 Andrey Turetskiy <andrey.turetskiy@intel.com>
500 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
501
ec6fe917
IV
502 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
503
5042014-11-13 Ilya Verbin <ilya.verbin@intel.com>
505 Ilya Tocar <ilya.tocar@intel.com>
506 Andrey Turetskiy <andrey.turetskiy@intel.com>
507 Bernd Schmidt <bernds@codesourcery.com>
508
1f6be682
IV
509 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
510 LTO_SECTION_NAME_PREFIX.
511 * lto-partition.c (lto_promote_cross_file_statics): Call
512 select_what_to_stream.
513 * lto.c (lto_section_with_id): Use section_name_prefix instead of
514 LTO_SECTION_NAME_PREFIX.
515 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
516 being built as an offload compiler.
517
ef4bddc2
RS
5182014-10-29 Richard Sandiford <richard.sandiford@arm.com>
519
520 * lto-lang.c: Remove redundant enum from machine_mode.
521
c582198b
AM
5222014-10-28 Andrew MacLeod <amacleod@redhat.com>
523
524 * lto.c: Adjust include files.
525 * lto-lang.c: Ditto.
526 * lto-object.c: Ditto.
527 * lto-partition.c: Ditto.
528 * lto-symtab.c: Ditto.
529
60393bbc
AM
5302014-10-27 Andrew MacLeod <amacleod@redhat.com>
531
532 * lto-lang.c: Adjust include files.
533 * lto-object.c: Ditto.
534 * lto-partition.c: Ditto.
535 * lto-symtab.c: Ditto.
536 * lto.c: Ditto.
537
957f47e6
DD
5382014-10-16 DJ Delorie <dj@redhat.com>
539
540 * lto-object.c (lto_obj_begin_section): In the event that pointer
541 sizes aren't powers of two, choose a more suitable alignment
542 than (unsigned)(-1).
543
78a7c317
DD
5442014-10-14 DJ Delorie <dj@redhat.com>
545
546 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
547 size-type as well.
548 (lto_init): Initialize all intN types, not just int128.
549
70261a4f
ML
5502014-10-06 Martin Liska <mliska@suse.cz>
551
552 * lto.c (stream_out): ARG_UNUSED added for last argument.
553
00de328a
AH
5542014-09-24 Aldy Hernandez <aldyh@redhat.com>
555
556 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
557 DECL_ABSTRACT_P.
558
7861b648
AK
5592014-09-23 Andi Kleen <ak@linux.intel.com>
560
561 * lto-partition.c (node_cmp): Update comment.
562 (varpool_node_cmp): Use symtab_node for comparison.
563 (add_sorted_nodes): New function.
564 (lto_balanced_map): Change to keep ordered queue
565 of ordered node. Handle no_reorder attribute.
566
1ee85ee1
JH
5672014-09-11 Jan Hubicka <hubicka@ucw.cz>
568
569 * lto.c (lto_read_decls): Register ODR types.
570
8605403e
JH
5712014-08-20 Jan Hubicka <hubicka@ucw.cz>
572
573 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
574 call.
575 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
576
56b1f114
JH
5772014-08-14 Jan Hubicka <hubicka@ucw.cz>
578
579 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
580
833f94c0
RB
5812014-08-14 Richard Biener <rguenther@suse.de>
582
583 PR lto/62067
584 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
585
207c68cd
RB
5862014-08-08 Richard Biener <rguenther@suse.de>
587
588 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
589
7c581d61
BC
5902014-08-08 Bin Cheng <bin.cheng@arm.com>
591
592 PR lto/62032
593 * lto-lang.c (lto_init): Switch mis-matched arguments.
594
39c8aaa4
TS
5952014-08-07 Trevor Saunders <tsaunders@mozilla.com>
596
597 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
598
6e2830c3
TS
5992014-08-02 Trevor Saunders <tsaunders@mozilla.com>
600
601 * lto-partition.c, lto-partition.h: Use hash_set instead of
602 pointer_set.
603
50de5793
AK
6042014-07-31 Andi Kleen <ak@linux.intel.com>
605
606 * lto.c (hash_canonical_type): Use inchash::hash
607 and use inchash::add_expr.
608 (iterative_hash_canonical_type): Dito.
609
f6bcdb5e
RB
6102014-07-30 Richard Biener <rguenther@suse.de>
611
612 * lto-streamer.h (lto_write_data): New function.
613 * langhooks.c (lhd_append_data): Do not free block.
614 * lto-section-out.c (lto_write_data): New function writing
615 raw data to the current section.
616 (lto_write_stream): Adjust for langhook semantic change.
617 (lto_destroy_simple_output_block): Write header directly.
618 * lto-opts.c (lto_write_options): Write options directly.
619 * lto-streamer-out.c (produce_asm): Write heaeder directly.
620 (lto_output_toplevel_asms): Likewise.
621 (copy_function_or_variable): Copy data directly.
622 (write_global_references): Output index table directly.
623 (lto_output_decl_state_refs): Likewise.
624 (write_symbol): Write data directly.
625 (produce_symtab): Adjust.
626 (produce_asm_for_decls): Output header and refs directly.
627
56fdfd3e
AK
6282014-07-25 Andi Kleen <ak@linux.intel.com>
629
630 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
631
0bd8bb04
AK
6322014-07-25 Andi Kleen <ak@linux.intel.com>
633
634 * lto.c (hash_canonical_type): Convert to inchash.
635 (iterative_hash_canonical_type): Dito.
636
6d8eb96b
AK
6372014-07-25 Andi Kleen <ak@linux.intel.com>
638
639 * lto.c: Include inchash.h
640
ad115a3c
JH
6412014-07-14 Jan Hubicka <hubicka@ucw.cz>
642
643 * lto.c (mentions_vars_p_decl_non_common): Skip
644 DECL_ARGUMENT_FLD.
645 mentions_vars_p_function): Do DECL_ARGUMENTS.
646 (lto_fixup_prevailing_decls): Update.
647
917dd9bf
JH
6482014-07-12 Jan Hubicka <hubicka@ucw.cz>
649
650 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
651 timevar
652 (materialize_cgraph): Do not push GIMPLE_IN timevar.
653
0b83e688
JH
6542014-07-11 Jan Hubicka <hubicka@ucw.cz>
655
656 * lto-partition.c (add_references_to_partition): Use
657 varpool_ctor_useable_for_folding_p.
658 * lto.c (lto_read_in_decl_state): Update sanity check.
659
e55637b7
ML
6602014-07-01 Martin Liska <mliska@suse.cz>
661
662 IPA REF alias refactoring
663 * lto-partition.c (add_symbol_to_partition_1): Usage of
664 FOR_EACH_ALIAS added.
665
010f4e27
JH
6662014-06-28 Jan Hubicka <hubicka@ucw.cz>
667
668 Revert:
669 * lto.c (lto_copy_fields_not_streamed): New function.
670 (compare_tree_sccs_1): Do not compare fields shared in between type
671 and variant.
672 (lto_read_decls): Fixup types first before inserting into hash.
673
b82fe354
AP
6742014-06-28 Andrew Pinski <apinski@cavium.com>
675
676 * lto.c (lto_read_decls): Fix comment in comment.
677
288eeff7
JH
6782014-06-28 Jan Hubicka <hubicka@ucw.cz>
679
680 * lto.c (lto_copy_fields_not_streamed): New function.
681 (compare_tree_sccs_1): Do not compare fields shared in between type
682 and variant.
683 (lto_read_decls): Fixup types first before inserting into hash.
684
e01fa630
ML
6852014-06-25 Martin Liska <mliska@suse.cz>
686
687 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
688 used.
689 (add_symbol_to_partition_1): Likewise.
690 (lto_balanced_map): Likewise.
691 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
692
aaf8a23e
JH
6932014-06-24 Jan Hubicka <hubicka@ucw.cz>
694
695 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
696 (mentions_vars_p_function): ... here.
697 (compare_tree_sccs_1): Update VINDEX checks.
698 (lto_fixup_prevailing_decls): Likewise.
699
1eb68d2d
TS
7002014-06-24 Trevor Saunders <tsaunders@mozilla.com>
701
702 * lto.c (canonical_type_hash_cache): Use hash_map instead of
703 pointer_map.
704
c203e8a7
TS
7052014-06-24 Trevor Saunders <tsaunders@mozilla.com>
706
707 * lto.c: Adjust.
708
714c800f
JH
7092014-06-20 Jan Hubicka <hubicka@ucw.cz>
710
711 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
712
569b1784
JH
7132014-06-20 Jan Hubicka <hubicka@ucw.cz>
714
715 * lto.c (compare_tree_sccs_1): Do not compare priorities.
716
56363ffd
JH
7172014-06-15 Jan Hubicka <hubicka@ucw.cz>
718
719 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
720
e257a17c
JH
7212014-06-10 Jan Hubicka <hubicka@ucw.cz>
722
723 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
724 (do_whole_program_analysis): Use verify_symtab.
725
24d047a3
JH
7262014-06-07 Jan Hubicka <hubicka@ucw.cz>
727
728 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
729 lto_fixup_prevailing_decls): Skip section names.
730
9b2b7279
AM
7312014-06-02 Andrew MacLeod <amacleod@redhat.com>
732
733 * lto-symtab.c: Include builtins.h.
734
a9243bfc
RB
7352014-05-26 Richard Biener <rguenther@suse.de>
736
737 * lto.c (lto_parse_hex): Use int64_t.
738 (lto_resolution_read): Likewise.
739
fd1e9302
JH
7402014-05-23 Jan Hubicka <hubicka@ucw.cz>
741
742 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
743
aede2c10
JH
7442014-05-23 Jan Hubicka <hubicka@ucw.cz>
745
746 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
747 symtab pointer.
748 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
749
f6a7cffc
TS
7502014-05-22 Thomas Schwinge <thomas@codesourcery.com>
751
752 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
753 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
754 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
755
4000360e
BS
7562012-05-22 Bernd Schmidt <bernds@codesourcery.com>
757
758 * lto-object.c: Include "lto-section-names.h".
759 (LTO_SEGMENT_NAME): Don't define.
760 * lto.c: Include "lto-section-names.h".
761
b9559136
JH
7622014-05-17 Jan Hubicka <hubicka@ucw.cz>
763
764 PR lto/61012
765 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
766 mixed with variables.
767
766090c2
TS
7682014-05-17 Trevor Saunders <tsaunders@mozilla.com>
769
770 * lto-tree.h: Don't use variable_size gty attribute.
771 * lto.c (lto_read_in_decl_state): Adjust.
772 (create_subid_section_table): Likewise.
773 (lto_flatten_files): Likewise.
774 (read_cgraph_and_symbols): Likewise.
775
1d60af08
KZ
7762014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
777 Mike Stump <mikestump@comcast.net>
778 Richard Sandiford <rdsandiford@googlemail.com>
779
780 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
781 * lto-lang.c (get_nonnull_operand): Likewise.
782
22869a37
RB
7832014-04-28 Richard Biener <rguenther@suse.de>
784
785 PR middle-end/60092
786 * lto-lang.c: Define flag_isoc11.
787
7de90a6c
DM
7882014-04-23 David Malcolm <dmalcolm@redhat.com>
789
790 * lto-partition.c (add_references_to_partition): Update for
791 removal of implicit pointer from the is-a.h API.
792 (add_symbol_to_partition_1): Likewise.
793 (contained_in_symbol): Likewise.
794 (undo_partition): Likewise.
795 (lto_balanced_map): Likewise.
796 (promote_symbol): Likewise.
797 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
798 (lto_symtab_merge_symbols): Likewise.
799 * lto.c (lto_wpa_write_files): Likewise.
800
783dab6b
RB
8012014-04-15 Richard Biener <rguenther@suse.de>
802
803 * lto.c: Include params.h.
804 (do_whole_program_analysis): Switch on flag_lto_partition value,
805 add support for LTO_PARTITION_ONE.
806 * lto-partition.h (lto_balanced_map): Adjust.
807 * lto-partition.c (lto_balanced_map): Get number of desired
808 partitions as argument to support -flto-partition=one.
809
cb90235d
JH
8102014-04-14 Jan Hubicka <hubicka@ucw.cz>
811
812 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
813 tp_first_run.
814
bbe281da
JH
8152014-03-19 Jan Hubicka <hubicka@ucw.cz>
816
817 * lto.c: Include ipa-inline.h
818 (do_whole_program_analysis): Free inline summary after partitioning.
819
ce2f49b3
RB
8202014-03-19 Richard Biener <rguenther@suse.de>
821
822 PR middle-end/60553
823 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
824 instead of TREE_CHAIN as chain_next.
825
e41106fc
RB
8262014-03-19 Richard Biener <rguenther@suse.de>
827
828 * lto.c (lto_wpa_write_files): Move call to
829 lto_promote_cross_file_statics ...
830 (do_whole_program_analysis): ... here, into the partitioning
831 block. Do not ggc_collect after lto_wpa_write_files but
832 for a last time before it.
833
15df2655
JJ
8342014-03-19 Jakub Jelinek <jakub@redhat.com>
835
836 PR lto/60571
837 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
838 Fix formatting.
839
415e2e6b
JJ
8402014-03-18 Jakub Jelinek <jakub@redhat.com>
841
842 PR sanitizer/60535
843 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
844 and complex_{float,{,long_}double}_type_node.
845
f42c637e
PM
8462014-03-08 Paulo Matos <paulo@matos-sorge.com>
847
415e2e6b
JJ
848 * lto-lang.c (lto_init): Pass flag_short_double to
849 build_common_tree_nodes.
f42c637e 850
6dab804d
JH
8512014-02-14 Jan Hubicka <hubicka@ucw.cz>
852
853 PR lto/60295
854 * lto.c (stream_out): Avoid parallel streaming with
855 -flto=jobserver until we are able to throttle it down
856 resonably.
857
39434bce
JH
8582014-02-14 Jan Hubicka <hubicka@ucw.cz>
859
860 * lto-partition.c (add_symbol_to_partition_1,
861 undo_partition, lto_balanced_map): Aliases have no
862 defined size.
863 (lto_balanced_map): Do not follow refering variables
864 if they can be optimized out.
865
1966fd99
RB
8662014-02-14 Richard Biener <rguenther@suse.de>
867
868 PR lto/60179
869 * lto.c (compare_tree_sccs_1): Do not compare
870 DECL_FUNCTION_SPECIFIC_TARGET.
871 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
872
283416b3
RB
8732014-02-12 Richard Biener <rguenther@suse.de>
874
875 PR lto/60060
876 * lto-lang.c (lto_write_globals): Do not call
877 wrapup_global_declarations or emit_debug_global_declarations
878 but emit debug info for non-function scope variables
879 directly.
880
b7e85694
JH
8812014-02-06 Jan Hubicka <hubicka@ucw.cz>
882
883 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
884
96451279
JH
8852014-02-06 Jan Hubicka <hubicka@ucw.cz>
886
887 PR ipa/59469
888 * lto-partition.c (symbol_class): Move to cgraph.h
889 (get_symbol_class): Move to symtab.c
890 (add_references_to_partition, add_symbol_to_partition_1,
891 lto_max_map, lto_1_to_1_map, lto_balanced_map,
892 lto_promote_cross_file_statics): Update.
893
f300e7b8
JH
8942014-02-05 Jan Hubicka <hubicka@ucw.cz>
895
896 * lto.c (lto_parallelism): New static var.
897 (do_stream_out, wait_for_child, stream_out): New static functions.
898 (lto_wpa_write_files): Add support for parallel streaming.
899 (do_whole_program_analysis): Set parallelism.
900 * lang.opt (fwpa): Add parameter.
901 * lto-lang.c (lto_handle_option): Handle flag_wpa.
902 (lto_init): Update use of flag_wpa.
903 * lto-streamer.h (asm_nodes_output): Declare.
904
f0f91770
RB
9052014-02-05 Richard Biener <rguenther@suse.de>
906
907 * lto.h (lto_global_var_decls): Remove.
908 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
909 (lto_write_globals): Do nothing in WPA stage, gather globals from
910 the varpool here ...
911 * lto.c (lto_main): ... not here.
912 (materialize_cgraph): Do not call rest_of_decl_compilation
913 on the empty lto_global_var_decls vector.
914 (lto_global_var_decls): Remove.
915
d665f8dd
JH
9162014-02-04 Jan Hubicka <hubicka@ucw.cz>
917
918 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
919 needs duplicating, not generic COMDAT.
920
c39276b8
RB
9212014-02-04 Richard Biener <rguenther@suse.de>
922
923 PR lto/59723
924 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
925 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
926
5f876ae7
JH
9272014-02-04 Jan Hubicka <hubicka@ucw.cz>
928 Markus Trippelsdorf
929
930 PR ipa/59469
931 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
932 merge force_output and forced_by_abi flags.
933
b72271b9
BI
9342014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
935
936 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
937 flag_cilkplus.
938
63124c48
RB
9392014-01-09 Richard Biener <rguenther@suse.de>
940
941 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
942
d05b9920
RB
9432014-01-09 Richard Biener <rguenther@suse.de>
944
945 PR lto/45586
946 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
947 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
948 (gimple_canonical_types_compatible_p): Do not compare them either.
949
23a5b65a
RS
9502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
951
952 Update copyright years
953
2c8326a5
OE
9542013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
955
956 * lto.c: Remove struct tags when referring to class varpool_node.
957 * lto-partition.c: Likewise.
958 * lto-symtab.c: Likewise.
959
e06f9964
JJ
9602013-11-29 Jakub Jelinek <jakub@redhat.com>
961 Richard Biener <rguenther@suse.de>
962
963 PR lto/59326
964 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
965
c193f58b
JJ
9662013-11-29 Jakub Jelinek <jakub@redhat.com>
967
968 PR lto/59326
969 * lto.c (mentions_vars_p_omp_clause): New function.
970 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
971 after return stmts.
972
2fb9a547
AM
9732013-11-22 Andrew MacLeod <amacleod@redhat.com>
974
975 * lto.c: Add required include files from gimple.h.
976 * lto-lang.c: Likewise
977 * lto-object.c: Likewise
978 * lto-partition.c: Likewise
979 * lto-symtab.c: Likewise
980
fec39fa6
TS
9812013-11-18 Trevor Saunders <tsaunders@mozilla.com>
982
983 * lto-partition.c lto-symtab.c lto.c Adjust.
984
d8a2d370
DN
9852013-11-14 Diego Novillo <dnovillo@google.com>
986
987 * lto-lang.c: Include stringpool.h.
988 Include stor-layout.h.
989 * lto-partition.c: Include gcc-symtab.h.
990 * lto.c: Include stor-layout.h.
991
5e20cdc9
DM
9922013-10-31 David Malcolm <dmalcolm@redhat.com>
993
994 Automated part of renaming of symtab_node_base to symtab_node.
995
996 Patch autogenerated by rename_symtab.py from
997 https://github.com/davidmalcolm/gcc-refactoring-scripts
998 revision 58bb219cc090b2f4516a9297d868c245495ee622
999
1000 * lto-partition.c (add_symbol_to_partition): Rename
1001 symtab_node_base to symtab_node.
1002 (get_symbol_class): Likewise.
1003 (symbol_partitioned_p): Likewise.
1004 (add_references_to_partition): Likewise.
1005 (add_symbol_to_partition_1): Likewise.
1006 (contained_in_symbol): Likewise.
1007 (add_symbol_to_partition): Likewise.
1008 (lto_1_to_1_map): Likewise.
1009 (lto_max_map): Likewise.
1010 (lto_balanced_map): Likewise.
1011 (privatize_symbol_name): Likewise.
1012 (promote_symbol): Likewise.
1013 (may_need_named_section_p): Likewise.
1014 (rename_statics): Likewise.
1015 (lto_promote_statics_nonwpa): Likewise.
1016 * lto-symtab.c (lto_symtab_merge): Likewise.
1017 (lto_symtab_resolve_replaceable_p): Likewise.
1018 (lto_symtab_symbol_p): Likewise.
1019 (lto_symtab_resolve_can_prevail_p): Likewise.
1020 (lto_symtab_resolve_symbols): Likewise.
1021 (lto_symtab_merge_decls_2): Likewise.
1022 (lto_symtab_merge_decls_1): Likewise.
1023 (lto_symtab_merge_decls): Likewise.
1024 (lto_symtab_merge_symbols_1): Likewise.
1025 (lto_symtab_merge_symbols): Likewise.
1026 (lto_symtab_prevailing_decl): Likewise.
1027 * lto.c (lto_wpa_write_files): Likewise.
1028 (read_cgraph_and_symbols): Likewise.
1029 (do_whole_program_analysis): Likewise.
1030
378cd6b1
DM
10312013-10-30 David Malcolm <dmalcolm@redhat.com>
1032
1033 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1034 declarations onto multiple lines to make things easier for
1035 rename_symtab.py.
1036 (lto_symtab_merge_decls_1): Likewise.
1037 (lto_symtab_merge_symbols_1): Likewise.
1038
939b37da
BI
10392013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1040
1041 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1042 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1043 Plus is enabled.
1044
67348ccc
DM
10452013-10-29 David Malcolm <dmalcolm@redhat.com>
1046
1047 Patch autogenerated by refactor_symtab.py from
1048 https://github.com/davidmalcolm/gcc-refactoring-scripts
1049 revision 58bb219cc090b2f4516a9297d868c245495ee622
1050
1051 * lto-partition.c (lto_promote_cross_file_statics): Update for
1052 conversion of symtab types to a true class hierarchy.
1053 (rename_statics): Likewise.
1054 (promote_symbol): Likewise.
1055 (privatize_symbol_name): Likewise.
1056 (lto_balanced_map): Likewise.
1057 (varpool_node_cmp): Likewise.
1058 (node_cmp): Likewise.
1059 (lto_1_to_1_map): Likewise.
1060 (undo_partition): Likewise.
1061 (add_symbol_to_partition): Likewise.
1062 (contained_in_symbol): Likewise.
1063 (add_symbol_to_partition_1): Likewise.
1064 (add_references_to_partition): Likewise.
1065 (symbol_partitioned_p): Likewise.
1066 (get_symbol_class): Likewise.
1067 (lto_max_map): Likewise.
1068 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1069 (lto_symtab_merge_symbols): Likewise.
1070 (lto_symtab_merge_symbols_1): Likewise.
1071 (lto_symtab_merge_decls): Likewise.
1072 (lto_symtab_merge_decls_1): Likewise.
1073 (lto_symtab_merge_decls_2): Likewise.
1074 (lto_symtab_resolve_symbols): Likewise.
1075 (lto_symtab_resolve_can_prevail_p): Likewise.
1076 (lto_symtab_symbol_p): Likewise.
1077 (lto_symtab_resolve_replaceable_p): Likewise.
1078 (lto_symtab_merge): Likewise.
1079 (lto_varpool_replace_node): Likewise.
1080 (lto_cgraph_replace_node): Likewise.
1081 * lto.c (lto_main): Likewise.
1082 (do_whole_program_analysis): Likewise.
1083 (materialize_cgraph): Likewise.
1084 (read_cgraph_and_symbols): Likewise.
1085 (cmp_partitions_order): Likewise.
1086 (lto_materialize_function): Likewise.
1087 (has_analyzed_clone_p): Likewise.
1088
8e9055ae
AM
10892013-10-29 Andrew MacLeod <amacleod@redhat.com>
1090
1091 * lto/lto-object.c: Add gimple.h to include list.
1092 * lto/lto-partition.c: Likewise.
1093
377d9792
AM
10942013-10-18 Andrew MacLeod <amacleod@redhat.com>
1095
1096 * lto.c: Remove tree-flow.h from include list.
1097
fffda8d7
RB
10982013-10-15 Richard Biener <rguenther@suse.de>
1099
1100 * lto.c (hash_canonical_type): Split out from ...
1101 (iterative_hash_canonical_type): ... here. Register types
1102 we recurse to.
1103 (gimple_canonical_type_hash): Adjust.
1104 (gimple_register_canonical_type_1): Split out from ...
1105 (gimple_register_canonical_type): ... here. Cache computed
1106 hash value.
1107 (lto_register_canonical_types): Split into two modes,
1108 clearing and computing TYPE_CANONICAL.
1109 (lto_read_decls): Adjust.
1110 (read_cgraph_and_symbols): Do two passes over global trees,
1111 first clearing then computing TYPE_CANONICAL.
1112
1394237e
RB
11132013-10-14 Richard Biener <rguenther@suse.de>
1114
1115 * lto.c (gimple_canonical_types): Move out-of GC space.
1116 (canonical_type_hash_cache): Make a pointer-map.
1117 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1118 New counters.
1119 (iterative_hash_canonical_type): Adjust.
1120 (read_cgraph_and_symbols): Likewise.
1121 (print_lto_report_1): Likewise.
1122
0a387eca
RB
11232013-10-14 Richard Biener <rguenther@suse.de>
1124
1125 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1126 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1127 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1128 gimple_types_compatible_p_1, gimple_types_compatible_p,
1129 visit, iterative_hash_name, struct type_hash_pair,
1130 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1131 gimple_type_eq, gimple_register_type, num_not_merged_types,
1132 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1133 num_not_merged_types_in_same_scc_trees): Remove old merging code
1134 and statistics.
1135 (lto_read_decls): Do not run old merging code in parallel.
1136 (read_cgraph_and_symbols): Do not init/free old merging
1137 data structures.
1138 (print_lto_report_1): Do not report differences of old vs. new
1139 merging code.
1140
83fd5d11
RB
11412013-10-14 Richard Biener <rguenther@suse.de>
1142
1143 * lto-lang.c (lto_init): Do not re-init canonical types here.
1144 (lto_register_canonical_types): Move to ...
1145 * lto.c (lto_register_canonical_types): ... here.
1146 (gimple_canonical_types, canonical_type_hash_cache,
1147 iterative_hash_canonical_type, gimple_canonical_type_hash,
1148 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1149 gimple_register_canonical_type): Add canonical type merging machinery
1150 moved from gimple.c.
1151 (read_cgraph_and_symbols): Init and free canonical type tables
1152 here.
1153 (print_lto_report_1): Report canonical type table stats here.
1154
acf0174b
JJ
11552013-10-11 Jakub Jelinek <jakub@redhat.com>
1156
1157 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1158
7c6fedd2
TT
11592013-09-25 Tom Tromey <tromey@redhat.com>
1160
1161 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1162 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1163 (lto/lto-object.o): Remove.
1164
35f32ad4
RB
11652013-09-06 Richard Biener <rguenther@suse.de>
1166
1167 * lto-symtab.c: Move from gcc/
1168 * lto.h: Include vec.h.
1169 (lto_global_var_decls): Declare.
1170 * lto.c (lto_global_var_decls): Move definition here.
1171 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1172 (lto-symtab.o): Add.
1173 * config-lang.in (gtfiles): Add lto.h.
1174
49322b12
JH
11752013-08-31 Jan Hubicka <jh@suse.cz>
1176
1177 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1178 DECL_FIELD_OFFSET can contain an reference to variable.
1179
31f1f73b
JH
11802013-08-31 Jan Hubicka <jh@suse.cz>
1181
1182 * lto.c (tree_with_vars): Turn into vector.
1183 (MAYBE_REMEMBER_WITH_VARS): Change to...
1184 (CHECK_VAR): ... this one.
1185 (CHECK_NO_VAR): New macro.
1186 (maybe_remember_with_vars_typed): Turn to ...
1187 (mentions_vars_p_typed): ... this one.
1188 (maybe_remember_with_vars_common): Turn to ...
1189 (mentions_vars_p_comon): ... this one.
1190 (maybe_remember_with_vars_decl_minimal): Turn to ...
1191 (mentions_vars_p_decl_minmal): ... this one.
1192 (maybe_remember_with_vars_decl_common): Turn to ...
1193 (mentions_vars_p_decl_common): ... this one.
1194 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1195 (mentions_vars_p_decl_with_vis): ... this one.
1196 (maybe_remember_with_vars_decl_non_common): Turn to ...
1197 (mentions_vars_p_decl_non_common): ... this one.
1198 (maybe_remember_with_vars_function): Turn to ...
1199 (mentions_vars_p_function): ... this one.
1200 (maybe_remember_with_vars_field_decl): Turn to ...
1201 (mentions_vars_p_field_decl): ... this one.
1202 (maybe_remember_with_vars_type): Turn to ...
1203 (mentions_vars_p_type): ... this one.
1204 (maybe_remember_with_vars_binfo): Turn to ...
1205 (mentions_vars_p_binfo): ... this one.
1206 (maybe_remember_with_vars_constructor): Turn to ...
1207 (mentions_vars_p_constructor): ... this one.
1208 (maybe_remember_with_vars_expr): Turn to ...
1209 (mentions_vars_p_expr): ... this one.
1210 (maybe_remember_with_vars): Turn to ...
1211 (mentions_vars_p): ... this one.
1212 (lto_read_decls): Update.
1213 (LTO_SET_PREVAIL): Do not call function for internal decls.
1214 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1215 check that something was updated.
1216 (lto_fixup_state): Do not care about internal decls.
1217 (lto_fixup_decls): Update.
1218 (read_cgraph_and_symbols): Update.
1219
256eefa9
JH
12202013-08-29 Jan Hubicka <jh@suse.cz>
1221
1222 * lto.c (read_cgraph_and_symbols): Free decl states.
1223
0170f33c
JH
12242013-08-29 Jan Hubicka <jh@suse.cz>
1225
1226 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1227 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1228 TYPE_FINAL_P.
1229
c01c111b
JH
12302013-08-28 Jan Hubicka <jh@suse.cz>
1231
1232 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1233 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1234 (unify_scc): Do checking assert.
1235
6a49f3c9
JH
12362013-08-06 Jan Hubicka <jh@suse.cz>
1237 Martin Liska <marxin.liska@gmail.com>
1238
1239 * lto-partition.c (lto_balanced_map): Always base order on
1240 source file order.
1241
a2e2a668
JH
12422013-08-06 Jan Hubicka <jh@suse.cz>
1243
1244 * lto.c (lto_materialize_function): Do not read body anymore.
1245
815effe1
JH
12462013-08-02 Jan Hubicka <jh@suse.cz>
1247
1248 * lto.c (lto_materialize_function): Do not push struct function.
1249 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1250 (may_need_named_section_p): Even abstract origins may need
1251 named section.
1252
315f8c0e
DM
12532013-07-30 David Malcolm <dmalcolm@redhat.com>
1254
1255 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1256 PASS_MANAGER_H.
1257
1258 * lto.c (do_whole_program_analysis): Update for move of
1259 all_regular_ipa_passes from a global to a field of class
1260 pass_manager.
1261
1aa95df7
OB
12622013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1263
1264 * lto-partition.c: Fix typos.
1265
c525ba9a
JH
12662013-06-20 Jan Hubicka <jh@suse.cz>
1267
1268 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1269 partitioning of variables.
1270
7a89ad00
JH
12712013-06-20 Jan Hubicka <jh@suse.cz>
1272
1273 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1274
6a6dac52
JH
12752013-06-19 Jan Hubicka <jh@suse.cz>
1276
1277 * lto-partition.c (add_references_to_partition): Use
1278 ctor_for_folding.
1279
ac0511f2
RB
12802013-06-18 Richard Biener <rguenther@suse.de>
1281
1282 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1283 and use it.
1284 (lto_register_function_decl_in_symtab): Likewise.
1285 (cmp_tree): New function.
1286 (unify_scc): Instead of using the streamer cache map from entry
1287 to cache index match up the two maps we have by sorting them.
1288 Adjust calls to lto_register_var_decl_in_symtab and
1289 lto_register_function_decl_in_symtab.
1290
ee03e71d
RB
12912013-06-17 Richard Biener <rguenther@suse.de>
1292
1293 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1294 * lto.c: Include data-streamer.h.
1295 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1296 (gimple_type_leader_entry_s, gimple_type_leader,
1297 gimple_lookup_type_leader): Remove.
1298 (gtc_visit): Simplify.
1299 (gimple_types_compatible_p): Likewise.
1300 (gimple_register_type_1): Likewise. Merge into ...
1301 (gimple_register_type): ... this. Keep it as legacy for
1302 statistics purposes for now.
1303 (fixup_integer_cst): Remove.
1304 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1305 rename to ...
1306 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1307 maybe_remember_with_vars_*): ... these.
1308 (uniquify_nodes): Remove.
1309 (lto_fixup_prevailing_type): New function.
1310 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1311 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1312 (num_merged_types, num_prevailing_types, num_not_merged_types,
1313 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1314 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1315 num_scc_compare_collisions): New global counters.
1316 (compare_tree_sccs_1): New function.
1317 (compare_tree_sccs): Likewise.
1318 (unify_scc): Likewise.
1319 (lto_read_decls): Stream in tree SCCs and unify them on the
1320 way in. Finalize prevailing SCC tree members.
1321 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1322 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1323 to ggc-collect during merging.
1324 (print_lto_report_1): Adjust for new merging code.
1325
ca0f62a8
JH
13262013-06-12 Jan Hubicka <jh@suse.cz>
1327
1328 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1329
bbf9ad07
JH
13302013-06-12 Jan Hubicka <jh@suse.cz>
1331
1332 * lto.c (register_resolution): Take lto_file_data argument.
1333 (lto_register_var_decl_in_symtab,
1334 lto_register_function_decl_in_symtab): Update.
1335 (read_cgraph_and_symbols): Update resolution_map handling.
1336
ecdbd01a 13372013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
1338
1339 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1340 (add_symbol_to_partition_1): Likewise.
1341 (contained_in_symbol): Likewise.
1342 (lto_balanced_map): Likewise.
1343 (rename_statics): Drop weakref.
1344
a367df53
RB
13452013-06-05 Richard Biener <rguenther@suse.de>
1346
1347 * lto.c (num_merged_types): New global variable.
1348 (uniquify_nodes): Increase num_merged_types when merging a type.
1349 (print_lto_report_1): Output the number of merged types.
1350
40a7fe1e
JH
13512013-06-01 Jan Hubicka <jh@suse.cz>
1352
1353 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1354 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1355 (do_whole_program_analysis): Update dumping.
1356
e70670cf
JH
13572013-05-29 Jan Hubicka <jh@suse.cz>
1358
1359 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1360 flags.
1361 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1362
8ee05051
JH
13632013-05-15 Jan Hubicka <jh@suse.cz>
1364
1365 * lto-partition.c (privatize_symbol_name): Return true when
1366 privatizing happened.
1367 (rename_statics): Do not go into infinite loop when privatizing
1368 is not needed.
1369
427b248d
JM
13702013-05-16 Jason Merrill <jason@redhat.com>
1371
1372 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1373
9de04252
MJ
13742013-05-15 Martin Jambor <mjambor@suse.cz>
1375
1376 * lto-partition.c (lto_balanced_map): Print symbol order instead
1377 of node uids.
1378
2d6e4603
JH
13792013-05-15 Jan Hubicka <jh@suse.cz>
1380
1381 PR lto/57038
1382 PR lto/47375
1383 * lto-partition.c (get_symbol_class): Fix weakrefs.
1384 (lto_balanced_map): Fix weakrefs.
1385 (privatize_symbol_name): Remove unnecesary label.
1386 (rename_statics): Handle weakrefs as statics.
1387
64cfa6c0
JH
13882013-05-09 Jan Hubicka <jh@suse.cz>
1389 Richard Biener <rguenther@suse.de>
1390
1391 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1392 (lto_register_var_decl_in_symtab): Likewise.
1393 (lto_main): Promote statics.
1394 * lto-partition.c (privatize_symbol_name): New function.
1395 (promote_symbol): Use it.
1396 (may_need_named_section_p): New predicate.
1397 (rename_statics): New functions.
1398 (lto_promote_cross_file_statics): Simplify; do renaming.
1399 (lto_promote_statics_nonwpa): New function.
1400 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1401
e45cde98
RB
14022013-02-08 Richard Biener <rguenther@suse.de>
1403
1404 PR lto/56231
1405 * lto-lang.c (lto_init): Do not enter a dummy file.
1406
6edc3e32
UB
14072013-02-07 Uros Bizjak <ubizjak@gmail.com>
1408
1409 PR bootstrap/56227
1410 * lto.c (lto_resolution_ready): Use %wx instead of
1411 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1412
ed73881e
RG
14132013-02-04 Richard Guenther <rguenther@suse.de>
1414
1415 PR lto/56168
1416 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1417 or lto_fixup_decls at LTRANS time.
1418
a19b1432
JH
14192013-01-09 Jan Hubicka <jh@suse.cz>
1420
1421 PR lto/45375
1422 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1423
49c01f87
L
14242012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1425
1426 PR lto/55466
1427 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1428 variables.
1429 (lto_main): Record the global variables if WPA isn't enabled.
1430
6e1aa848
DN
14312012-11-20 Diego Novillo <dnovillo@google.com>
1432 Jakub Jelinek <jakub@redhat.com>
1433
1434 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1435
9771b263
DN
14362012-11-16 Diego Novillo <dnovillo@google.com>
1437
1438 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1439
1440 * lto-lang.c: Use new vec API in vec.h.
1441 * lto-partition.c: Likewise.
1442 * lto-partition.h: Likewise.
1443 * lto.c: Likewise.
1444
24551b9c
LC
14452012-10-31 Lawrence Crowl <crowl@google.com>
1446
1447 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1448 down-cast via dyn_cast.
1449 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1450 (undo_partition): Likewise.
1451 (lto_balanced_map): Likewise.
1452 (get_symbol_class): Likewise and via is_a.
1453 (lto_balanced_map): Change symtab checking to is_a.
1454
aec06f6f
RB
14552012-10-12 Richard Biener <rguenther@suse.de>
1456
1457 PR lto/54898
1458 * lto.c (gimple_types_compatible_p_1): Also compare
1459 TYPE_MAIN_VARIANT.
1460 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1461
0b8c30f9
TB
14622012-10-09 Tobias Burnus <burnus@net-b.de>
1463
1464 * lto-lang.c (lto_register_builtin_type): Avoid useless
1465 decl creation.
1466 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1467
da3202a8
TB
14682012-10-08 Tobias Burnus <burnus@net-b.de>
1469
1470 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1471 Free lto_file struct after closing the file.
1472
2512a443
JH
14732012-10-08 Jan Hubicka <jh@suse.cz>
1474
1475 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1476 (fixup_integer_cst): New functoin.
1477 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1478
e75f8f79
JH
14792012-10-07 Jan Hubicka <jh@suse.cz>
1480
1481 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1482 release input encoders.
1483 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1484
46591697
JH
14852012-10-06 Jan Hubicka <jh@suse.cz>
1486
1487 PR lto/54790
1488 * lto.c (resolution_map): New static var.
1489 (register_resolution): New function.
1490 (lto_register_var_decl_in_symtab): Use it.
1491 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1492
af16bc76
MJ
14932012-09-20 Martin Jambor <mjambor@suse.cz>
1494
1495 * lto.c (lto_materialize_function): Call push_struct_function and
1496 pop_cfun.
1497
5368224f
DC
14982012-09-19 Dehao Chen <dehao@google.com>
1499
1500 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1501
b5493fb2
JH
15022012-09-19 Jan Hubicka <jh@suse.cz>
1503
1504 * lto.c (lto_materialize_function): Update confused comment.
1505 (read_cgraph_and_symbols): Do not free symtab.
1506
c3c445e1
JH
15072012-09-12 Jan Hubicka <jh@suse.cz>
1508
1509 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1510 AUX pointer cleaning. Add max partitioning.
1511 * lto-partition.c (enum symbol_class): New.
1512 (get_symbol_class): New function.
1513 (symbol_partitioned_p): New function.
1514 (add_references_to_partition): Remove.
1515 (add_aliases_to_partition): Remove.
1516 (add_cgraph_node_to_partition_1): Remove.
1517 (add_cgraph_node_to_partition): Remove.
1518 (add_symbol_to_partition): New function.
1519 (add_symbol_to_partition_1): New function.
1520 (contained_in_symbol): New function.
1521 (partition_cgraph_node_p): Remove.
1522 (partition_varpool_node_p): Remove.
1523 (partition_symbol_p): Remove.
1524 (lto_1_to_1_map): Cleanup.
1525 (lto_max_map): New.
1526 (lto_balanced_map): Update.
1527 (lto_promote_cross_file_statics): Update.
1528 * lto-partition.h (lto_max_map): Declare.
1529 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1530
b5c7cdfb
JH
15312012-09-11 Jan Hubicka <jh@suse.cz>
1532
1533 PR lto/54312
1534 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1535 type is variant leader.
1536
b29402f0
RG
15372012-09-11 Richard Guenther <rguenther@suse.de>
1538
1539 * lto.c (enum gtc_mode): Remove.
1540 (struct type_pair_d): Adjust.
1541 (lookup_type_pair): Likewise.
1542 (gimple_type_leader): Do not mark as deletable.
1543 (gimple_lookup_type_leader): Adjust.
1544 (gtc_visit): Likewise.
1545 (gimple_types_compatible_p_1): Likewise.
1546 (gimple_types_compatible_p): Likewise.
1547 (gimple_type_hash): Likewise.
1548 (gimple_register_type): Likewise.
1549 (read_cgraph_and_symbols): Manage lifetime of tables
1550 here.
1551
b8f4e58f
RG
15522012-09-11 Richard Guenther <rguenther@suse.de>
1553
1554 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1555 struct type_pair_d, lookup_type_pair, struct sccs,
1556 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1557 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1558 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1559 visit, iterative_hash_name, struct type_hash_pair,
1560 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1561 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1562 Move here from gimple.c
1563 (read_cgraph_and_symbols): Free hash tables here.
1564 (print_lto_report_1): New function wrapping print_lto_report.
1565 (do_whole_program_analysis): Call it.
1566 (lto_main): Likewise.
1567
1cdbb3f9
JH
15682012-09-10 Jan Hubicka <jh@suse.cz>
1569
1570 * lto-partition.c (partition_symbol_p): Forward declare.
1571 (add_references_to_partition): Reimplement using partition_symbol_p.
1572 (add_aliases_to_partition): Break out from add_references_to_partition;
1573 reimplement using partition_symbol_p.
1574 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1575 add sanity checks.
1576 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1577 (partition_varpool_node_p): Do not special case aliases.
1578
b4661bfe
JH
15792012-08-12 Jan Hubicka <jh@suse.cz>
1580
1581 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1582 it is deleted after streaming.
1583 * lto-partition.c (partition_symbol_p): New function.
1584 (promote_var, promote_fn): Remove.
1585 (promote_symbol): New function.
1586 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1587 to lookup the actual boundaries instead of computing them ad-hoc.
1588
7b99cca4
JH
15892012-08-12 Jan Hubicka <jh@suse.cz>
1590
1591 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1592 in partitioning.
1593 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1594 by encoder.
1595 * lto-partition.c (new_partition): Update.
1596 * lto.c (cmp_partitions_order): Update.
1597 (lto_wpa_write_files): Update.
1598 (free_ltrans_partitions): Update.
1599 (add_references_to_partition): Update.
1600 (add_cgraph_node_to_partition_1): Update.
1601 (add_cgraph_node_to_partition): Update.
1602 (add_varpool_node_to_partition): Update.
1603 (undo_partition): Update.
1604 (lto_balanced_map): Update.
1605 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1606 set_referenced_from_this_partition_p): Update.
1607 (lto_promote_cross_file_statics): Update.
1608
f27c1867
JH
16092012-08-12 Jan Hubicka <jh@suse.cz>
1610
1611 * lto-partition.c (set_referenced_from_other_partition_p,
1612 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1613 New functions.
1614 (lto_promote_cross_file_statics): Use them.
1615
ab96cc5b
JH
16162012-07-24 Jan Hubicka <jh@suse.cz>
1617
1618 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1619
0229aee9
UB
16202012-07-24 Uros Bizjak <ubizjak@gmail.com>
1621
1622 * lto-tree.h (lang_decl): Add variable_size GTY option.
1623
7ee2468b
SB
16242012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1625
1626 * lto.c: Do not include timevar.h.
1627 * Make-lang.in: Fix dependencies.
1628
a910399d
LC
16292012-06-18 Lawrence Crowl <crowl@google.com>
1630
1631 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1632 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1633 to lto_wpa_write_files.
1634 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1635 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1636 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1637 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1638 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1639 to be a front end, but is not one.
1640
877ab5e9
JH
16412012-05-18 Jan Hubicka <jh@suse.cz>
1642
1643 * lto.c (lto_materialize_constructors_and_inits): Remove.
1644 (read_cgraph_and_symbols): Remove handling of alias pairs.
1645
6649df51
JH
16462012-05-17 Jan Hubicka <jh@suse.cz>
1647
1648 * lto-partition.c (add_references_to_partition): Handle external vars.
1649 (partition_varpool_node_p): Likewise.
1650 (lto_promote_cross_file_statics): Do not promote externals.
1651
d1ede5f4
BS
16522012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1653
1654 * lto-lang.c (handle_fnspec_attribute): New static function.
1655 (lto_attribute_table): Add "fn spec".
1656 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1657
0d6bf48c
JH
16582012-05-04 Jan Hubicka <jh@suse.cz>
1659
1660 * lto.c (do_whole_program_analysis): Set timevars correctly.
1661 (lto_main): Likewise.
d1ede5f4 1662
1d67dde8
RB
16632012-05-04 Richard Guenther <rguenther@suse.de>
1664
1665 * lang.opt (fwpa): Do not mark as Optimization.
1666 (fltrans): Likewise.
1667
65d630d4
JH
16682012-04-30 Jan Hubicka <jh@suse.cz>
1669
1670 * lto.c (lto_main): Use compile ().
1d67dde8
RB
1671 * lto-partition.c (partition_cgraph_node_p): Use
1672 symtab_used_from_object_file_p.
65d630d4
JH
1673 (partition_varpool_node_p): Likewise.
1674
ead84f73
JH
16752012-04-20 Jan Hubicka <jh@suse.cz>
1676
1677 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1678
5932a4d4
JH
16792012-04-18 Jan Hubicka <jh@suse.cz>
1680
1681 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1682 Update for new ipa-ref API.
1683
65c70e6b
JH
16842012-04-16 Jan Hubicka <jh@suse.cz>
1685
1686 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1687 walkers to walk cgraph and varpool.
1688 (materialize_cgraph): Likewise.
1689 * lto-partition.c (lto_1_to_1_map): Likewise.
1690 (lto_balanced_map): Likewise.
1691 (lto_promote_cross_file_statics): Likewise.
1692
960bfb69
JH
16932012-04-14 Jan Hubicka <jh@suse.cz>
1694
1695 * lto.c: Update field referenced for new cgraph/varpool layout.
1696 * lto-partition.c: Likewise.
1697
a66dc285
JH
16982012-04-11 Jan Hubicka <jh@suse.cz>
1699
1700 * lto.c: Update copyright; remove params.h, ipa-inline.h
1701 and ipa-utils.h inlines; inline lto-partition.h
1702 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1703 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1704 add_references_to_partition, add_cgraph_node_to_partition_1,
1705 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1706 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1707 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1708 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1709 * lto-partition.c: ... here; new file.
1710 * lto-partition.h: New file.
1711 * Make-lang.in (lto.o): Update dependencies.
1712 (lto-partition.o): New.
1713
f3b249e5
RG
17142012-04-05 Richard Guenther <rguenther@suse.de>
1715
1716 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1717 definition.
1718
21fa2faf
RG
17192012-03-12 Richard Guenther <rguenther@suse.de>
1720
1721 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1722
6bb485a3
RG
17232012-03-06 Richard Guenther <rguenther@suse.de>
1724
1725 PR lto/52097
1726 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1727
95510497
RG
17282012-02-28 Richard Guenther <rguenther@suse.de>
1729
1730 PR lto/52400
1731 * lto.c (lto_register_function_decl_in_symtab): Do not register
1732 a reverse renamed decl mapping.
1733
09228fef
JJ
17342012-01-06 Jakub Jelinek <jakub@redhat.com>
1735
1736 PR lto/51774
1737 * lto-lang.c (handle_returns_twice_attribute): New function.
1738 (lto_attribute_table): Add returns_twice attribute.
1739
b03eda0d
RG
17402011-12-21 Richard Guenther <rguenther@suse.de>
1741
1742 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1743 (LTO_FIXUP_TREE): Use it.
1744 (uniquify_nodes): Mark new non-prevailing types and avoid
1745 calling gimple_register_type on others.
1746 (lto_read_decls): Add comment.
1747
4ad9a9de
EB
17482011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1749
1750 * lto.h (lto_parse_hex): Delete.
1751 * lto.c (lto_read_decls): Use 'int' for offsets.
1752 (lto_parse_hex): Make static and return proper 64-bit host type.
1753 (lto_resolution_read): Use proper 64-bit host type.
1754
ea973bad
RG
17552011-12-13 Richard Guenther <rguenther@suse.de>
1756
1757 PR lto/48354
1758 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1759 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1760
c8218030
UB
17612011-12-01 Uros Bizjak <ubizjak@gmail.com>
1762
1763 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1764 (ignore_attribute): New.
1765
57ac2606
AH
17662011-11-21 Aldy Hernandez <aldyh@redhat.com>
1767
1768 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1769 (handle_transaction_pure_attribute): New.
1770
52a35ef7
RG
17712011-11-03 Richard Guenther <rguenther@suse.de>
1772
1773 PR lto/44965
1774 * lto-lang.c (lto_post_options): Do not read file options.
1775 * lto.c (lto_read_all_file_options): Remove.
1776 (lto_init): Call lto_set_in_hooks here.
1777
51973b1e
JH
17782011-10-09 Jan Hubicka <jh@suse.cz>
1779
1780 * lto.c (node_cmp, varpool_node_cmp): New functions.
1781 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1782 (cmp_partitions): Rename to ...
1783 (cmp_partitions_size): ... this one.
1784 (cmp_partitions_order): New function.
1785 (lto_wpa_write_files): Sort partitions by order when
1786 -fno-toplevel-reorder is used.
1787
5958009b
AK
17882011-10-09 Andi Kleen <ak@linux.intel.com>
1789
1790 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1791
e79983f4
MM
17922011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1793
1794 * lto-lang.c (def_builtin_1): Delete old interface with two
1795 parallel arrays to hold standard builtin declarations, and replace
1796 it with a function based interface that can support creating
1797 builtins on the fly in the future. Change all uses, and poison
1798 the old names. Make sure 0 is not a legitimate builtin index.
1799
ecdbd01a 18002011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
1801
1802 * lto-object.c (lto_obj_add_section_data): Add list.
1803 (lto_obj_add_section): Fill in list.
1804 (ltoobj_build_section_table): Pass through list.
1805 * lto.c (file_data_list): Declare.
1806 (create_subid_section_table): Pass arguments directly.
1807 Fill in list of file_datas.
1808 (lwstate): Delete.
1809 (lto_create_files_from_ids): Pass in direct arguments.
1810 Don't maintain list.
1811 (lto_file_read): Use explicit section and file data lists.
1812 (lto_read_all_file_options): Pass in section_list.
1813 * lto.h (lto_obj_build_section_table): Add list.
1814 (lto_section_slot): Add next.
1815 (lto_section_list): Declare.
1816
ed0d2da0
JH
18172011-10-02 Jan Hubicka <jh@suse.cz>
1818
1819 PR lto/47247
1820 * common.c (lto_resolution_str): Add new resolution.
1821 * common.h (lto_resolution_str): Likewise.
1822
ad7715f3
L
18232011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1824 Andi Kleen <ak@linux.intel.com>
1825
1826 PR lto/50568
1827 * lto.c (lto_splay_tree_delete_id): New.
1828 (lto_splay_tree_compare_ids): Likewise.
1829 (lto_splay_tree_lookup): Likewise.
1830 (lto_splay_tree_id_equal_p): Likewise.
1831 (lto_splay_tree_insert): Likewise.
1832 (lto_splay_tree_new): Likewise.
1833 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1834 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1835 (create_subid_section_table): Use lto_splay_tree_lookup and
1836 lto_splay_tree_insert.
1837 (lto_file_read): Use lto_splay_tree_new.
1838
ecdbd01a 18392011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
1840
1841 * lto.c (lto_resolution_read): Remove id dumping.
1842 (lto_section_with_id): Turn id HOST_WIDE_ID.
1843 (create_subid_section_table): Dito.
1844
892a371f
DS
18452011-08-28 Dodji Seketeli <dodji@redhat.com>
1846
1847 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1848 linemap_add twice.
1849
f82d1a94
MJ
18502011-08-11 Martin Jambor <mjambor@suse.cz>
1851
1852 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1853
f0efc7aa
DN
18542011-08-08 Diego Novillo <dnovillo@google.com>
1855
1856 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1857 * lto.c: Include tree-streamer.h.
1858
1a072294
RG
18592011-07-06 Richard Guenther <rguenther@suse.de>
1860
1861 * lto-lang.c (lto_init):
1862 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1863
7496868d
JH
18642011-06-11 Jan Hubicka <jh@suse.cz>
1865
10f13f22 1866 PR lto/48246
7496868d
JH
1867 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1868 (lto_balanced_map): Likewise.
1869
39e2db00
JH
18702011-06-11 Jan Hubicka <jh@suse.cz>
1871
1872 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1873 (add_cgraph_node_to_partition) ... here; walk aliases.
1874 (lto_1_to_1_map): Remove same body alias code.
1875 (promote_fn): Likewise.
1876 (lto_promote_cross_file_statics): Update comment.
1877
1878
28628ea6
DN
18792011-06-07 Diego Novillo <dnovillo@google.com>
1880
1881 * lto.c (uniquify_nodes): Move code to register decls to
1882 the loop that computes canonical types.
1883
009db074
RG
18842011-06-07 Richard Guenther <rguenther@suse.de>
1885
1886 * lto-lang.c (lto_init): Do not set
1887 size_type_node or call set_sizetype.
1888
47c79d56
DN
18892011-06-04 Diego Novillo <dnovillo@google.com>
1890
1891 * lto.c (lto_init): New.
1892 (lto_main): Call it.
1893
d5828cc7
DN
18942011-06-03 Diego Novillo <dnovillo@google.com>
1895
1896 * lto.c (get_resolution): Move from lto-streamer-in.c.
1897 (lto_register_var_decl_in_symtab): Likewise.
1898 (lto_register_function_decl_in_symtab): Likewise.
1899 (uniquify_nodes): Call lto_register_var_decl and
1900 lto_register_function_decl_in_symtab after reading a new
1901 VAR_DECL or FUNCTION_DECL.
1902
6807da97
RG
19032011-06-01 Richard Guenther <rguenther@suse.de>
1904
1905 * lto-lang.c (lto_register_canonical_types): New function.
1906 (lto_init): Register common nodes with the canonical type machinery.
1907 Do not play tricks with char_type_node.
1908
d74be317
RG
19092011-05-26 Richard Guenther <rguenther@suse.de>
1910
1911 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1912
d9f8303f
NF
19132011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1914
1915 * lto.c (lto_ft_typed): New function.
1916 (lto_ft_common): Call it.
1917 (lto_ft_constructor): Likewise.
1918 (lto_ft_expr): Likewise.
1919 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1920 TREE_CHAIN.
1921
fb291a1e
RG
19222011-05-20 Richard Guenther <rguenther@suse.de>
1923
1924 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1925 (lto_ft_type): Move main-variant and pointer-to chain building ...
1926 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1927 in a separate final loop.
1928
31b3ca64
RG
19292011-05-19 Richard Guenther <rguenther@suse.de>
1930
1931 * lto.c (uniquify_nodes): First register all types before
1932 fixing up the tree SCC.
1933
35d828c5
JH
19342011-05-11 Jan Hubicka <jh@suse.cz>
1935
1936 PR lto/48952
1937 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1938
51545682
NF
19392011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1940
1941 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1942 location of binfo field.
1943 (lto_fixup_prevailing_decls): Likewise.
1944
8242dd04
NF
19452011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1946
1947 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1948 build_function_type_array or build_varargs_function_type_array
1949 instead.
1950
c99c0026
EB
19512011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1952
1953 * lto-lang.c (global_bindings_p): Return bool.
1954
c47d0034
JH
19552011-05-07 Jan Hubicka <jh@suse.cz>
1956
a9bcb3f0
EB
1957 * lto.c (lto_materialize_function): Use
1958 cgraph_function_with_gimple_body_p.
1959 (add_cgraph_node_to_partition): Do not re-add items to partition;
1960 handle thunks.
c47d0034
JH
1961 (add_varpool_node_to_partition): Do not re-add items to partition.
1962
bb3398ca
JH
19632011-05-03 Jan Hubicka <jh@suse.cz>
1964
1965 * lto.c (free_ltrans_partitions): Fix accidental commit.
1966
1cb1a99f
JH
19672011-05-03 Jan Hubicka <jh@suse.cz>
1968
1969 * lto.c (ltrans_partition_def): Remove GTY annotations.
1970 (ltrans_partitions): Move to heap.
1971 (new_partition): Update.
1972 (free_ltrans_partitions): New function.
1973 (lto_wpa_write_files): Use it.
1974
af8bca3c
MJ
19752011-04-29 Martin Jambor <mjambor@suse.cz>
1976
1977 * lto.c: Include ipa-utils.h.
1978 (lto_balanced_map): Update call to ipa_reverse_postorder.
1979 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1980
b823cdfe
MM
19812011-04-29 Michael Matz <matz@suse.de>
1982
1983 * lto.c (toplevel): Include tree-flow.h.
1984 (lto_read_in_decl_state): Don't merge types here.
1985 (tree_with_vars): New static hash table.
1986 (remember_with_vars): New static functions.
1987 (LTO_FIXUP_TYPE): New macro.
1988 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1989 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1990 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1991 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1992 (lto_read_decls): Uniquify while reading in trees.
1993 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1994 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1995 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1996 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1997 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1998 lto_fixup_tree): Remove.
1999 (lto_fixup_state): Remove data argument. Use
2000 lto_symtab_prevailing_decl.
2001 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2002 (lto_fixup_prevailing_decls): New function.
2003 (lto_fixup_state_aux): Argument aux is unused.
2004 (lto_fixup_decls): Don't allocate pointer sets, don't use
2005 lto_fixup_tree, use lto_fixup_prevailing_decls.
2006 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2007 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2008
b9843260
EB
20092011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2010
2011 * lto.c (lto_balanced_map): Fix typos in head comment.
2012 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2013 test.
2014
e7f23018
JH
20152011-04-16 Jan Hubicka <jh@suse.cz>
2016
2017 * lto.c (lto_balanced_map): Update.
2018
10a5dd5d
JH
20192011-04-14 Jan Hubicka <jh@suse.cz>
2020
2021 * lto.c: Include ipa-inline.h
b9843260
EB
2022 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2023 accessor.
10a5dd5d
JH
2024 (ipa_node_duplication_hook): Fix declaration.
2025 * Make-lang.in (lto.o): Update dependencies.
2026
81f653d6
NF
20272011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2028
2029 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2030 calling TREE_CHAIN.
2031 * lto.c (lto_fixup_common): Likewise.
2032
dcf0c47e
NF
20332011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2034
2035 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2036 (handle_type_generic_attribute): Likewise.
2037
e89964e3
MM
20382011-04-03 Michael Matz <matz@suse.de>
2039
2040 * lto.c (lto_materialize_function): Don't read and then discard
2041 sections in WPA mode.
2042 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2043
2044 * lto-lang.c (registered_builtin_fndecls): Remove.
2045 (lto_getdecls): Return NULL_TREE.
2046 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2047
d2b3fe18
RG
20482011-03-31 Richard Guenther <rguenther@suse.de>
2049
2050 PR lto/48246
2051 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2052 partitions when checking is not enabled.
2053
ba78087b
KT
20542011-03-25 Kai Tietz <ktietz@redhat.com>
2055
2056 * lto.c (lto_resolution_read): Use filename_cmp instead
2057 of strcmp.
2058 (lto_read_section_data): Likewise.
2059
0edf1bb2
JL
20602011-03-25 Jeff Law <law@redhat.com>
2061
2062 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2063
62d784f7
KT
20642011-03-21 Kai Tietz <ktietz@redhat.com>
2065
2066 PR target/12171
2067 * lto-lang.c (lto_attribute_table): Adjust table.
2068
62dd9571
JJ
20692011-02-18 Jakub Jelinek <jakub@redhat.com>
2070
2071 PR bootstrap/47807
2072 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2073 of lto-streamer.h.
2074
237d6259
RG
20752011-02-18 Richard Guenther <rguenther@suse.de>
2076
2077 PR lto/47798
2078 * lto-tree.h (lto_global_var_decls): Do not declare here.
2079 * lto-lang.c: Include lto-streamer.h.
2080 * Make-lang.in (lto-lang.o): Adjust dependencies.
2081
8ead2223
KT
20822011-02-10 Kai Tietz <kai.tietz@onevision.com>
2083
2084 PR lto/47241
2085 * lto.c (lto_read_section_data): Free
2086 fd_name in failure case.
2087 For mingw targets don't hash file-descriptor.
2088 (read_cgraph_and_symbols): Close current_lto_file
2089 in failure case.
2090
6e701822
JH
20912011-01-11 Jan Hubicka <jh@suse.cz>
2092
2093 PR lto/45721
2094 PR lto/45375
b9843260
EB
2095 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2096 are not partitioned.
6e701822 2097
f4da8dce
NF
20982010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2099
2100 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2101 Use prototype_p.
2102
6b7fb143
RG
21032010-12-06 Richard Guenther <rguenther@suse.de>
2104
2105 PR lto/46796
2106 * lto-lang.c (lto_init): Give names to basic types.
2107
c59ffc41
JM
21082010-11-30 Joseph Myers <joseph@codesourcery.com>
2109
2110 * lto-object.c: Don't include toplev.h.
2111 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2112
7c475d11
JM
21132010-11-30 Joseph Myers <joseph@codesourcery.com>
2114
2115 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2116 $(TOPLEV_H).
2117
71f3e391
JM
21182010-11-29 Joseph Myers <joseph@codesourcery.com>
2119
2120 * lto-endian.h: Delete.
2121 * lto-object.c: Don't include "libiberty.h".
2122 (O_BINARY): Don't define.
2123 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2124 (O_BINARY): Don't define.
2125
9f1718b0
RG
21262010-11-23 Richard Guenther <rguenther@suse.de>
2127
2128 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2129
39c4e298
RG
21302010-11-23 Richard Guenther <rguenther@suse.de>
2131
2132 PR lto/46605
2133 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2134
b37421c6
JM
21352010-11-17 Joseph Myers <joseph@codesourcery.com>
2136
2137 * lto.c (lto_main): Take no arguments.
2138 * lto.h (lto_main): Update prototype.
2139
d82f74d3
ILT
21402010-11-16 Ian Lance Taylor <iant@google.com>
2141
2142 * lto-object.c (lto_obj_file_open): Call
2143 simple_object_attributes_merge rather than
2144 simple_object_attributes_compare.
2145
a4d8c676
JM
21462010-11-12 Joseph Myers <joseph@codesourcery.com>
2147
2148 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2149 * lto-lang.c (lto_handle_option): Take location_t parameter.
2150
d8a07487
JM
21512010-11-10 Joseph Myers <joseph@codesourcery.com>
2152
2153 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2154 letters and remove trailing '.'.
2155 (lto_file_finalize): Start diagnostic with a lowercase letter.
2156
6b3456d1
ILT
21572010-11-02 Ian Lance Taylor <iant@google.com>
2158
2159 * lto-object.c: New file.
2160 * lto-elf.c: Remove file.
2161 * lto-macho.c: Remove file.
2162 * lto-macho.h: Remove file.
2163 * lto-coff.c: Remove file.
2164 * lto-coff.h: Remove file.
2165 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2166 lto/lto-object.o.
2167 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2168 (lto/lto-objfile.o): New target.
2169 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2170 (lto/lto.o): Remove $(LIBIBERTY_H).
2171
030cd86c
JH
21722010-10-22 Jan Hubicka <jh@suse.cz>
2173
2174 * lto.c (add_cgraph_node_to_partition,
2175 add_varpool_node_to_partition): Add debug info.
2176 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2177 partitioned nodes.
2178 (do_whole_program_analysis): Set function flags before dumping.
2179
4490cae6
RG
21802010-10-22 Richard Guenther <rguenther@suse.de>
2181
2182 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2183 the new gimple_register_canonical_type.
2184
703cdce3
L
21852010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2186
2187 PR bootstrap/45954
2188 * config-lang.in (boot_language): Set to $enable_lto.
2189
1915c739
JJ
21902010-10-18 Jakub Jelinek <jakub@redhat.com>
2191
2192 PR lto/45638
2193 * Make-lang.in (check-lto): New dummy target.
2194
82971de5
EB
21952010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2196
2197 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2198
a75bfaa6
JM
21992010-10-08 Joseph Myers <joseph@codesourcery.com>
2200
2201 * lto-lang.c (lto_init_options): Change to
2202 lto_init_options_struct. Update parameters.
2203 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2204 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2205
937f7f69
JH
22062010-10-06 Jan Hubicka <jh@suse.cz>
2207
2208 * lto.c (lto_balanced_map): Fix accounting of program size.
2209
2169830c
JH
22102010-10-06 Jan Hubicka <jh@suse.cz>
2211
2212 * lto.c (lto_balanced_map): Do not produce empty partitions.
2213
ecdbd01a 22142010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2215
2216 * lto.c (lto_process_name): Add.
2217 (lto_main): Call lto_process_name.
2218
06ed016f
JH
22192010-10-06 Jan Hubicka <jh@suse.cz>
2220
2221 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2222 COMDATs required by the linker.
2223
ae718d66
ILT
22242010-10-05 Ian Lance Taylor <iant@google.com>
2225
2226 * lto.c (lto_section_with_id): Make s a const pointer.
2227
852e4bd2
JH
22282010-10-05 Jan Hubicka <jh@suse.cz>
2229
2230 * lto.c: Include params.h.
2231 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2232 refcounting in aux field.
2233 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2234 New functions.
2235 (lto_1_to_1_map): Simplify.
2236 (lto_balanced_map): New function.
2237 (do_whole_program_analysis): Chose proper partitioning alg.
2238 * Make-lang.in (lto.o): Add dependency on params.h
2239
ecdbd01a 22402010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2241
2242 * Make-lang.in (lto1): Add + to build rule.
2243
ecdbd01a 22442010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2245
2246 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2247 with fatal_error.
2248
0d6e14fd
JH
22492010-09-28 Jan Hubicka <jh@suse.cz>
2250
2251 * lto-lang.c (handle_leaf_attribute): New function.
2252 (lto_attribute_tables): Add leaf.
2253
fb462383
JZ
22542010-09-25 Jie Zhang <jie@codesourcery.com>
2255
2256 * lto.c (lto_read_all_file_options): Start a new line after
2257 printing out file names.
2258
051f8cc6
JH
22592010-09-24 Jan Hubicka <jh@suse.cz>
2260
2261 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2262
64e0f5ff
JH
22632010-09-20 Jan Hubicka <jh@suse.cz>
2264
2265 PR tree-optimize/45605
2266 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2267
a929ec3d
GP
22682010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2269
2270 * lto-elf.c (lto_obj_file_open): Also provide filename when
2271 elf_begin fails.
2272
4c588abf
JH
22732010-09-17 Jan Hubicka <jh@suse.cz>
2274
2275 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2276
c3224d6f
RG
22772010-09-17 Richard Guenther <rguenther@suse.de>
2278
2279 * lang.opt (flag_wpa): Also enable for the driver.
2280
52b3b3c7
JH
22812010-09-16 Jan Hubicka <jh@suse.cz>
2282
2283 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2284 EXTERNAL flags.
2285
969c37b7
LB
22862010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2287
2288 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2289
098a4f50
JH
22902010-09-08 Jan Hubicka <jh@suse.cz>
2291
2292 * lto.c (real_file_count, real_file_decl_data): New static vars.
2293 (read_cgraph_and_symbols): Use it.
2294
0f443ad0
RG
22952010-09-08 Richard Guenther <rguenther@suse.de>
2296
2297 * lto.c (read_cgraph_and_symbols): Collect again after each
2298 file.
2299
ee187353
JH
23002010-09-07 Jan Hubicka <jh@suse.cz>
2301
2302 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2303
b3ec52d0
RG
23042010-09-03 Richard Guenther <rguenther@suse.de>
2305
2306 * lto-elf.c (validate_file): Always error if validation fails.
2307
f1395d4a
JH
23082010-08-20 Jan Hubicka <jh@suse.cz>
2309
2310 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2311 (lto_wpa_write_files): Update comments.
2312
2429bce3
L
23132010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2314
2315 PR bootstrap/45357
2316 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2317 with has_analyzed_clone_p.
2318
e0f967db
JH
23192010-08-20 Jan Hubicka <jh@suse.cz>
2320
2321 * lto.c (has_analyzed_clone_p): New function
2322 (lto_materialize_function): Use callgraph to determine if
2323 body is needed.
2324 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2325
ac47786e
NF
23262010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2327
2328 * lto.c: Use FOR_EACH_VEC_ELT.
2329
ecdbd01a 23302010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
2331
2332 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2333
5f20c657
JM
23342010-07-27 Joseph Myers <joseph@codesourcery.com>
2335
2336 * lto-lang.c (lto_handle_option): Update prototype and return
2337 value type. Remove duplicate assignment to result.
2338
7a9bf9a4
JM
23392010-07-27 Joseph Myers <joseph@codesourcery.com>
2340
2341 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2342 New.
2343 (lto_init_options): Update prototype.
2344 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2345 Define.
2346
ecdbd01a 23472010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
2348
2349 PR lto/44992
2350 * lto.c: Include splay-tree.h
2351 (lto_resolution_read): Change to walk file_ids tree and parse
2352 extra file_id in resolution file.
2353 (lto_section_with_id): Add.
2354 (create_subid_section_table): Add.
2355 (lwstate): Add.
2356 (lto_create_files_from_ids): Add.
2357 (lto_file_read): Change to handle sub file ids and create list
2358 of file_datas. Add output argument for count.
2359 (get_section_data): Pass file_data to lto_get_section_name.
2360 (lto_flatten_file): Add.
2361 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2362
ecdbd01a 23632010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
2364
2365 * lto-coff.c (hash_name, eq_name): Move.
2366 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2367 * lto-elf.c: (hash_name, eq_name): Move.
2368 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2369 * lto-macho.c: (hash_name, eq_name): Move.
2370 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2371 * lto.c: (hash_name, eq_name): Move from lto-*.c
2372 (lto_obj_create_section_hash_table): Add.
2373 (free_with_string): Add.
2374
718f9c0f
MLI
23752010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2376
2377 * lto-coff.c: Include diagnostic-core.h in every file that
2378 includes toplev.h.
2379 * lto-elf.c: Likewise.
2380 * lto-lang.c: Likewise.
2381 * lto-macho.c: Likewise.
2382
1b137837
JJ
23832010-07-07 Jakub Jelinek <jakub@redhat.com>
2384
2385 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2386 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2387 objects.
2388
92eb4438
JH
23892010-07-05 Jan Hubicka <jh@suse.cz>
2390
2391 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2392 nodes from same comdat group as well as all comdat functions referenced
2393 here.
b9843260
EB
2394 (add_varpool_node_to_partition, add_references_to_partition): New
2395 function.
2396 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2397 add_varpool_node_to_partition; clear aux flags when done.
2398 (lto_promote_cross_file_statics): Do not promote stuff that gets
2399 duplicated to each ltrans.
92eb4438 2400
a05541a9
JH
24012010-07-04 Jan Hubicka <jh@suse.cz>
2402
2403 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2404
4a2ac96f
RG
24052010-06-13 Richard Guenther <rguenther@suse.de>
2406
2407 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2408
1d536046
KT
24092010-06-09 Kai Tietz <kai.tietz@onevision.com>
2410
2411 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2412 * lto-coff.c (coff_write_object_file): Add braces to if.
2413
a9429e29
LB
24142010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2415
2416 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2417 (lto_file_read): Likewise.
2418 (new_partition): Likewise.
2419 (read_cgraph_and_symbols): Likewise.
2420
5498f011
JM
24212010-06-07 Joseph Myers <joseph@codesourcery.com>
2422
2423 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2424 (lto_handle_option): Don't set flag_signed_char here.
2425
d4c0c9f6
RG
24262010-06-04 Richard Guenther <rguenther@suse.de>
2427
2428 PR lto/41584
2429 * lto.c (lto_1_to_1_map): Use the proper file_data for
2430 varpool nodes.
2431
0a5fa5a1
JH
24322010-05-30 Jan Hubicka <jh@suse.cz>
2433
2434 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2435 partitioning decisions.
2436
9eec9488
JH
24372010-05-29 Jan Hubicka <jh@suse.cz>
2438
2439 * lto.c (bitmap vector): Remove.
2440 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2441 (ltrans_partition_def): New structure.
2442 (ltrans_partition): New type and VECtor.
2443 (new_partition): New function.
2444 (add_cgraph_node_to_partition): New function.
2445 (lto_1_to_1_map): Reorganize for partitions.
2446 (lto_add_inline_clones): Remove.
2447 (lto_add_all_inlinees): Remove.
2448 (lto_promote_cross_file_statics): Use partitions.
2449 (cmp_partitions): New function.
2450 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2451 use partitions; output files sorted by size.
2452
3e097227
SB
24532010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2454
2455 * Make-lang.in: Replace vec.h dependency with VEC_H.
2456
7ca92787
JM
24572010-05-28 Joseph Myers <joseph@codesourcery.com>
2458
2459 * lto-coff.c (coff_errmsg): Remove.
2460 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2461 errors instead of coff_errmsg (-1).
2462 * lto-macho.c (mach_o_errmsg): Remove.
2463 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2464 instead of mach_o_errmsg (-1).
2465 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2466 xstrerror (errno).
2467
b5611987
RG
24682010-05-28 Richard Guenther <rguenther@suse.de>
2469
2470 * lto.c (prefix_name_with_star): Removed.
2471 (strip_extension): Likewise.
2472 (get_filename_for_set): Likewise.
2473 (lto_write_ltrans_list): Fold into ...
2474 (lto_wpa_write_files): ... this. Name LTRANS units
2475 by suffixing the ltrans output list filename.
2476 (do_whole_program_analysis): Adjust.
2477
1da2ed5f
JM
24782010-05-27 Joseph Myers <joseph@codesourcery.com>
2479
2480 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2481 (read_cgraph_and_symbols, lto_main): Use seen_error.
2482 * Make-lang.in (lto/lto.o): Update dependencies.
2483
7951d88a
EB
24842010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2485
2486 PR lto/44230
2487 * lto.h (lto_eh_personality): New prototype.
2488 * lto.c: Include debug.h.
2489 (first_personality_decl): New static variable.
2490 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2491 first function for which it is non-null.
2492 (lto_eh_personality_decl): New static variable.
2493 (lto_eh_personality): New function.
2494 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2495 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2496
e12da9c2
SB
24972010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2498
2499 * lto-lang.c: Do not include expr.h.
2500
468194f4
RG
25012010-05-24 Richard Guenther <rguenther@suse.de>
2502
2503 * lto-elf.c (lto_obj_build_section_table): Work around
2504 FreeBSD libelf issue.
2505
bd9eb5da
RG
25062010-05-22 Richard Guenther <rguenther@suse.de>
2507
2508 * lto.c (read_cgraph_and_symbols): Do not collect.
2509
66576e1b
JH
25102010-05-20 Jan Hubicka <jh@suse.cz>
2511
2512 * lto.c (promote_var, promote_fn): New functions.
2513 (lto_promote_cross_file_statics): Compute correctly boundary including
2514 static initializers of readonly vars.
2515
36576655
JH
25162010-05-18 Jan Hubicka <jh@suse.cz>
2517
66576e1b 2518 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
2519 (lto_promote_cross_file_statics): Deal with non-inline clones.
2520
28632d63
JH
25212010-05-18 Jan Hubicka <jh@suse.cz>
2522
2523 * lto.c (lto_materialize_function): Announce function when
2524 reading body; allocate_struct_function only when reading body;
2525 do not finalize local statics; ggc_collect after reading;
2526 do not mark reachable node.
2527 (materialize_cgraph): Do not announce function.
2528
33e42d56
JH
25292010-05-11 Jan Hubicka <jh@suse.cz>
2530
2531 * lto.c (materialize_cgraph): Revert my previous patch.
2532
f6430ea5
KT
25332010-05-11 Kai Tietz <kai.tietz@onevision.com>
2534
2535 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2536 IMAGE_FILE_MACHINE_AMD64.
2537 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2538
0a0b07b7
JH
25392010-05-11 Jan Hubicka <jh@suse.cz>
2540
2541 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2542 (materialize_cgraph): Add it here.
2543
9a809897
JH
25442010-05-11 Jan Hubicka <jh@suse.cz>
2545
2546 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2547 vector.
2548
25492010-05-11 Jan Hubicka <jh@suse.cz>
2550
2551 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2552 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2553 use reachable_from_other_partition_p and
2554 referenced_from_other_partition_p test.
2555
94f64249
KT
25562010-05-11 Kai Tietz <kai.tietz@onevision.com>
2557
2558 * lto-coff.c (validate_file): Add x64-coff support.
2559 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2560 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2561 * lto-lang.c (lto_build_c_type_nodes): Add check for
2562 'long long unsigned int' for x64-windows.
2563 (lto_init): Likewise.
2564
2565
c082f9f3
SB
25662010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2567
2568 * lto.h (struct lto_file_struct): Document offset member.
2569 * lto-endian.h: New file.
2570 * lto-macho.h: New file.
2571 * lto-macho.c: New file.
2572 * Make-lang.in: Add rule for lto-macho.o.
2573
5cd0e96b
RG
25742010-05-07 Richard Guenther <rguenther@suse.de>
2575
2576 PR lto/43857
2577 PR lto/43371
2578 * lang.opt (fresolution): Change to ...
2579 (fresolution=): ... this.
2580 * lto-lang.c (lto_handle_option): Adjust.
2581
48cf395b
RB
25822010-05-07 Richard Guenther <rguenther@suse.de>
2583
2584 * lto.c (DUMPBASE_SUFFIX): Remove.
2585 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2586 Rename to ...
2587 (lto_write_ltrans_list): ... only output the list of ltrans files.
2588 (lto_maybe_unlink): Remove.
2589 (do_whole_program_analysis): Do not execute LTRANS phase
2590 from here.
2591
afa83c15
L
25922010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2593
2594 * lto-lang.c (lto_handle_option): Add argument kind.
2595
369451ec
JH
25962010-05-05 Jan Hubicka <jh@suse.cz>
2597
48cf395b
RB
2598 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2599 refs.
369451ec 2600
2f41ecf5
JH
26012010-05-05 Jan Hubicka <jh@suse.cz>
2602
2603 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2604
ace72c88
JH
26052010-04-30 Jan Hubicka <jh@suse.cz>
2606
b9843260
EB
2607 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2608 use default name.
ace72c88
JH
2609 (lto_wpa_write_files): Write any non-empty partition.
2610
05575e07
JH
26112010-04-30 Jan Hubicka <jh@suse.cz>
2612
2613 * lto.c: Do not attempt to make constant pool references global.
2614
49ba8180
JH
26152010-04-28 Jan Hubicka <jh@suse.cz>
2616
2617 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2618 (lto_wpa_write_files): Announce what we are writting.
2619 (all_file_decl_data): New.
2620 (read_cgraph_and_symbols): Use GGC; correct timevars.
2621 (do_whole_program_analysis): Collect.
2622 * lto/Make-lang.in (lto.o): Fix dependency.
2623 * Makefile.in (GTFILES): Add lto-streamer.h.
2624 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2625 (varpool_assemble_pending_decls): Use VAROUT.
2626 * lto-streamer.h (lto_tree_ref_table): Annotate.
2627 (lto_in_decl_state): Annotate.
2628 (lto_file_decl_data): Annotate.
2629
2942c502
JH
26302010-04-28 Jan Hubicka <jh@suse.cz>
2631
2632 * lto.c (lto_varpool_node_sets): New.
2633 (lto_1_to_1_map): Partition varpool too.
2634 (globalize_context_t, globalize_cross_file_statics,
2635 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2636 lto_scan_statics_in_remaining_global_vars): Remove.
2637 (lto_promote_cross_file_statics): Rewrite.
2638 (get_filename_for_set): Take vset argument.
2639 (lto_wpa_write_files): Pass around vsets.
2640
3bec79c5
DK
26412010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2642
2643 PR lto/42776
2644 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2645 hardcoding 'lto-elf.o'.
2646 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2647
2648 * lto-coff.h: New file.
2649 * lto-coff.c: Likewise.
2650
21aac880
RG
26512010-04-26 Richard Guenther <rguenther@suse.de>
2652
2653 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2654
2cee0101
DK
26552010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2656
2657 * lto.h (lto_elf_file_open): Rename prototype from this ...
2658 (lto_obj_file_open): ... to this.
2659 (lto_elf_file_close): Likewise ...
2660 (lto_obj_file_close): ... and likewise.
2661 (lto_elf_build_section_table): Likewise ...
2662 (lto_obj_build_section_table): ... and likewise.
2663 (lto_elf_begin_section): Likewise ...
2664 (lto_obj_begin_section): ... and likewise.
2665 (lto_elf_append_data): Likewise ...
2666 (lto_obj_append_data): ... and likewise.
2667 (lto_elf_end_section): Likewise ...
2668 (lto_obj_end_section): ... and likewise.
2669 * lto.c (lto_file_read): Update references to the above.
2670 (lto_wpa_write_files): Likewise.
2671 (lto_read_all_file_options): Likewise.
2672 (read_cgraph_and_symbols): Likewise.
2673 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2674 (LANG_HOOKS_APPEND_DATA): Likewise.
2675 (LANG_HOOKS_END_SECTION): Likewise.
2676 * lto-elf.c (lto_elf_file_open): Rename from this ...
2677 (lto_obj_file_open): ... to this, updating any references.
2678 (lto_elf_file_close): Likewise ...
2679 (lto_obj_file_close): ... and likewise.
2680 (lto_elf_build_section_table): Likewise ...
2681 (lto_obj_build_section_table): ... and likewise.
2682 (lto_elf_begin_section): Likewise ...
2683 (lto_obj_begin_section): ... and likewise.
2684 (lto_elf_append_data): Likewise ...
2685 (lto_obj_append_data): ... and likewise.
2686 (lto_elf_end_section): Likewise ...
2687 (lto_obj_end_section): ... and likewise.
2688
bc58d7e1
JH
26892010-04-21 Jan Hubicka <jh@suse.cz>
2690
2691 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2692 (materialize_cgraph): Likewise.
2693
e792884f
JH
26942010-04-21 Jan Hubicka <jh@suse.cz>
2695
2696 * lto.c (lto_wpa_write_files): Update.
2697 (read_cgraph_and_symbols): Be more verbose.
2698 (materialize_cgraph): Likewise.
2699 (do_whole_program_analysis): Likewise.
2700
c9945504
JH
27012010-04-21 Jan Hubicka <jh@suse.cz>
2702
2703 * lto.c (globalize_cross_file_statics): When function has address taken,
2704 it needs to be public.
2705
a837268b
JH
27062010-04-20 Jan Hubicka <jh@suse.cz>
2707
2708 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2709 (lto_add_all_inlinees): Likewise.
2710 (lto_wpa_write_files): Likewise.
2711
3b9e5d95
EB
27122010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2713
2714 * lto-lang.c (lto_init): Remove second argument in call to
2715 build_common_tree_nodes.
2716
8ccb78f2
RO
27172010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2718
2719 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2720 function.
2721
2f9b99e6
EB
27222010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2723
2724 PR bootstrap/43276
2725 * lto-elf.c: Define EM_* constants if not already defined.
2726
bef7d288
EB
27272010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2728
2729 * lto-elf.c (is_compatible_architecture): New static function.
2730 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2731
f68df07c
RG
27322010-02-11 Richard Guenther <rguenther@suse.de>
2733
2734 PR driver/43021
2735 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2736 appropriately.
2737
3cdea2b4
AH
27382010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2739
2740 * lto.c (O_BINARY): Define.
2741 (lto_read_section_data): Open file in binary mode.
2742 * lto-elf.c (O_BINARY): Define.
2743 (lto_elf_file_open): Open file in binary mode.
2744
c59449fa
RG
27452010-01-08 Richard Guenther <rguenther@suse.de>
2746
2747 PR lto/42528
2748 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2749 (lto_init): Do not init char_type_node in a standard way
2750 but according to flag_signed_char.
2751
d7fb0a6d
L
27522010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2753
2754 PR lto/41564
2755 * lto.c (DUMPBASE_SUFFIX): New.
2756 (lto_execute_ltrans): Append a sequence number to -dumpbase
2757 for LTRANS.
2758
78ce4053
L
27592010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2760
2761 PR lto/42580
2762 * lto-elf.c (lto_elf_file_open): Stop if the command line
2763 option file is missing.
2764
2a71eb48
RG
27652009-12-15 Richard Guenther <rguenther@suse.de>
2766
2767 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2768 (lto_post_options): Do not disable debuginfo.
2769
a818bca1
DG
27702009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2771
2772 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2773
e7d00517
RG
27742009-12-11 Richard Guenther <rguenther@suse.de>
2775
2776 PR lto/42037
2777 * lto.c (lto_resolution_read): Properly grow the vector.
2778
1ab53893
RG
27792009-12-11 Richard Guenther <rguenther@suse.de>
2780
2781 PR lto/41915
2782 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2783 to the C99 default. Do not set flag_unit_at_a_time.
2784
0f900dfa
JJ
27852009-11-28 Jakub Jelinek <jakub@redhat.com>
2786
2787 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2788 variable.
2789
92fa7608
RAE
27902009-11-19 Rafael Avila de Espindola <espindola@google.com>
2791
2792 PR bootstrap/42096
2793 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2794 * lto.c (lto_parse_hex): New.
2795 (lto_resolution_read): Use lto_parse_hex.
2796 * lto.h (lto_parse_hex): New.
2797
9870fe4f
RAE
27982009-11-17 Rafael Avila de Espindola <espindola@google.com>
2799
2800 * lto-elf.c (lto_file_init): Add offset argument.
2801 (lto_elf_file_open): Record the offset.
2802 * lto.c (lto_resolution_read): Change file_name into a lto_file
2803 argument. Check offsets.
2804 (lto_file_read): Update call to lto_resolution_read.
2805 * lto.h (lto_file_struct): Add the offset field.
2806
1b70729f
RAE
28072009-11-16 Rafael Avila de Espindola <espindola@google.com>
2808
2809 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2810
0e3776db
JH
28112009-11-14 Jan Hubicka <jh@suse.cz>
2812
2813 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2814
06bd7f56
RAE
28152009-11-12 Rafael Avila de Espindola <espindola@google.com>
2816
2817 * lang.opt (fresolution): Renamed from resolution.
2818 * lto-lang.c (lto_handle_option): Handle new option name.
2819 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2820
7e9dc421
RG
28212009-11-04 Richard Guenther <rguenther@suse.de>
2822 Rafael Avila de Espindola <espindola@google.com>
2823
2824 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2825 (lto_elf_file_open): Handle offsets in arguments name@offest.
2826
b207f900
RG
28272009-10-30 Richard Guenther <rguenther@suse.de>
2828
2829 PR lto/41858
2830 * lto.c (lto_file_read): Do not set file_data->fd.
2831 (lto_read_section_data): Use a single-entry file-descriptor cache.
2832 Do not check the result of xmalloc.
2833 (free_section_data): Do not use file_data->fd.
2834 (lto_read_all_file_options): Likewise.
2835
2c928155
RG
28362009-10-22 Richard Guenther <rguenther@suse.de>
2837
2838 * lto.c (lto_fixup_jump_functions): Remove.
2839 (lto_fixup_decls): Do not fixup jump functions.
2840 (read_cgraph_and_symbols): Schedule cgraph merging after
2841 summary reading. Schedule type and decl fixup before
2842 summary reading.
2843
f9c91f8a
RB
28442009-10-22 Richard Guenther <rguenther@suse.de>
2845
2846 * lto.c (lto_fixup_data_t): Remove free_list member.
2847 (lto_fixup_tree): Do not insert into free_list.
2848 (free_decl): Remove.
2849 (lto_fixup_decls): Remove free-list handling.
2850
fb3f88cc
JH
28512009-10-22 Jan Hubicka <jh@suse.cz>
2852
2853 * lto.c (lto_fixup_jump_functions): New function.
2854 (lto_fixup_decls): Use it.
2855
35f1e9f4
RG
28562009-10-16 Richard Guenther <rguenther@suse.de>
2857
2858 PR lto/41715
2859 * lto.c (lto_fixup_tree): Revert last change.
2860
200c8750
RG
28612009-10-14 Richard Guenther <rguenther@suse.de>
2862
2863 * lto.c (lto_fixup_tree): In case the prevailing decl is not
2864 compatible with the one we replace wrap it around a
2865 VIEW_CONVERT_EXPR.
2866
b1b07c92
RG
28672009-10-09 Richard Guenther <rguenther@suse.de>
2868
2869 PR lto/41635
2870 PR lto/41636
2871 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2872 a file.
2873 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2874 (init_ehdr##BITS): Likewise.
2875
3c2e7d45
JM
28762009-10-08 Joseph Myers <joseph@codesourcery.com>
2877
2878 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2879 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2880 diagnostics.
2881 * lto-lang.c (lto_post_options): Remove trailing "." from
2882 diagnostics.
2883
0d0bfe17
RG
28842009-10-08 Richard Guenther <rguenther@suse.de>
2885
2886 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2887 hash tables.
2888
4bedf19a
JM
28892009-10-07 Joseph Myers <joseph@codesourcery.com>
2890
2891 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2892
b20996ff
JH
28932009-10-07 Jan Hubicka <jh@suse.cz>
2894
2895 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2896 ltrans stage; explain why this is needed and should not.
2897
1a735925
RG
28982009-10-05 Richard Guenther <rguenther@suse.de>
2899
2900 PR lto/41552
2901 PR lto/41487
2902 * lto.c (lto_read_decls): Do not register deferred decls.
2903 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2904 until after reading the IPA summaries.
2905
d7f09764
DN
29062009-10-02 Rafael Avila de Espindola <espindola@google.com>
2907
2908 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2909 (lto-lang.c): Don't include lto/common.h.
2910
29112009-10-02 Rafael Avila de Espindola <espindola@google.com>
2912
2913 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2914 (lto/common.o): Remove.
2915 * common.c: Remove.
2916 * common.h (lto_kind_str): Remove.
2917 (lto_visibility_str): Remove.
2918 (lto_resolution_str): Make it static.
2919
29202009-10-01 Diego Novillo <dnovillo@google.com>
2921
2922 * lto.c (lto_read_decls): Add comment.
2923 Call internal_error instead of gcc_assert.
2924 (lto_resolution_read): Likewise.
2925 (lto_add_all_inlinees): Tidy.
2926 * Make-lang.in: Fix copyright boilerplate.
2927 (lto.pdf): New.
2928 (lto.install-pdf): New.
2929 * lto-tree.h: Fix copyright boilerplate.
2930 * lang-specs.h: Likewise.
2931 Remove ".lto" entry from compilers fragment.
2932 * lto-elf.c: Move inclusion of gelf.h after config.h.
2933 Tidy formatting everywhere.
2934 * lto.h: Fix copyright boilerplate.
2935 Tidy formatting everywhere.
2936 * common.c: Likewise.
2937 * config-lang.in: Likewise.
2938 * common.h: Likewise.
2939 * lto-lang.c: Likewise.
2940
29412009-10-01 Richard Guenther <rguenther@suse.de>
2942
2943 * lto.c (lto_read_section_data): Use plain lseek/read.
2944
29452009-10-01 Richard Guenther <rguenther@suse.de>
2946
2947 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2948 use sysconf to query the system page size.
2949 (lto_file_read): Implement fallback using stdio.
2950 (free_section_data): Likewise.
2951
29522009-09-29 Diego Novillo <dnovillo@google.com>
2953
2954 * lto-lang.c (lto_init): Really fix call to
2955 build_common_builtin_nodes.
2956
29572009-09-29 Diego Novillo <dnovillo@google.com>
2958
2959 * lto-lang.c (lto_init): Fix call to
2960 build_common_builtin_nodes.
2961
29622009-09-29 Richard Guenther <rguenther@suse.de>
2963
2964 PR lto/40754
2965 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2966 in bytes.
2967 (first_data_block): New static variable.
2968 (lto_elf_append_data): Align the first data block in each
2969 section.
2970
29712009-09-28 Diego Novillo <dnovillo@google.com>
2972
2973 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2974 * lto.c (strip_extension): New.
2975 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2976 (lto_execute_ltrans): Tidy.
2977 Do not pass -fwpa nor -fltrans-* to LTRANS.
2978 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2979 * tree.c (need_assembler_name_p): Call
2980 lang_hooks.decls.may_need_assembler_name_p if set.
2981 * varasm.c (default_binds_local_p_1): Remove check for
2982 flag_ltrans.
2983 * varpool.c (decide_is_variable_needed): Do not test for
2984 in_lto_p.
2985
29862009-09-22 Richard Guenther <rguenther@suse.de>
2987
2988 PR lto/39276
2989 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2990 * Make-lang.in: Remove ltrans-driver stuff.
2991 * config-lang.in: Likewise.
2992 * lang.opt (fltrans-driver): Remove.
2993 * lto-lang.c (lto_init_options): Remove code initializing
2994 ltrans_driver.
2995 * ltrans-driver: Remove.
2996
29972009-09-21 Diego Novillo <dnovillo@google.com>
2998
2999 * lto-lang.c (lto_define_builtins): Remove superfluous
3000 calls to targetm.init_builtins and build_common_builtin_nodes.
3001 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3002 build_common_builtin_nodes.
3003 * lto.c (lto_materialize_function): Do nothing if NODE is a
3004 clone.
3005
30062009-09-03 Diego Novillo <dnovillo@google.com>
3007
3008 * lto-elf.c (validate_file): Replace call to
3009 elf_getshstrndx with call to elf_getshdrstrndx.
3010
30112009-08-19 Richard Guenther <rguenther@suse.de>
3012
3013 * lto-lang.c (lto_init): Merge char_type_node with the
3014 appropriately signed variant.
3015
30162009-08-19 Richard Guenther <rguenther@suse.de>
3017
3018 PR lto/41071
3019 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3020 (lto_fixup_type): Re-build the pointer-to chain part two.
3021
30222009-08-19 Richard Guenther <rguenther@suse.de>
3023
3024 PR lto/41071
3025 * lto.c (lto_fixup_type): Re-build the type variant chain.
3026
30272009-08-19 Richard Guenther <rguenther@suse.de>
3028
3029 PR lto/41071
3030 * lto.c (lto_fixup_constructor): New function.
3031 (lto_fixup_tree): Replace all types. Properly fixup
3032 constructors and constants.
3033
30342009-08-14 Richard Guenther <rguenther@suse.de>
3035
3036 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3037 for DECL_LANG_SPECIFIC.
3038
30392009-08-13 Richard Guenther <rguenther@suse.de>
3040
3041 PR lto/41032
3042 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3043
30442009-07-30 Richard Guenther <rguenther@suse.de>
3045
3046 PR lto/40903
3047 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3048 the largest decl for output and free TREE_CHAIN for further
3049 use.
3050
30512009-07-24 Diego Novillo <dnovillo@google.com>
3052
3053 * Make-lang.in: Add empty lto.install-plugin target.
3054
30552009-07-13 Diego Novillo <dnovillo@google.com>
3056
3057 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3058
30592009-07-11 Richard Guenther <rguenther@suse.de>
3060
3061 * lto-lang.c (lto_write_globals): Wrapup global decls.
3062
30632009-07-10 Richard Guenther <rguenther@suse.de>
3064
3065 * lto-lang.c (lto_init): Allocate one more location to make
3066 BUILTINS_LOCATION correct.
3067
30682009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3069
3070 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3071
30722009-07-06 Diego Novillo <dnovillo@google.com>
3073
3074 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3075 TYPE_SIZE_UNIT.
3076
30772009-07-06 Diego Novillo <dnovillo@google.com>
3078
3079 * lto.c (preload_common_nodes): Remove.
3080 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3081 (lto_read_decls): Call lto_data_in_create and
3082 lto_data_in_delete.
3083 (free_decl): Do not call ggc_free.
3084 (lto_main): Call lto_init_reader.
3085 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3086 (lto_init): Initialize main_identifier_node if needed.
3087 Make ptrdiff_type_node be integer_type_node.
3088
30892009-06-19 Diego Novillo <dnovillo@google.com>
3090
3091 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3092 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3093 Remove code guarded by #ifdef LOCAL_TRACE.
3094
30952009-06-18 Diego Novillo <dnovillo@google.com>
3096
3097 * lto.c: Update license to GPLv3.
3098 * lto-elf.c: Likewise.
3099 * common.c: Likewise.
3100 * lto-lang.c: Likewise.
3101 * lto.h: Remove superfluous include files. Update all
3102 users.
3103
31042009-06-17 Diego Novillo <dnovillo@google.com>
3105
3106 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3107
31082009-06-02 Diego Novillo <dnovillo@google.com>
3109
3110 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3111 read in.
3112 (materialize_cgraph): Only materialize nodes that have a
3113 representation on file.
3114
31152009-06-01 Diego Novillo <dnovillo@google.com>
3116
3117 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3118
31192009-05-31 Diego Novillo <dnovillo@google.com>
3120
3121 * lto-lang.c (lto_type_for_mode): Handle all the modes
3122 handled in c_common_type_for_mode.
3123
31242009-05-21 Diego Novillo <dnovillo@google.com>
3125
3126 * lto-elf.c: Always include <gelf.h>.
3127 * config-lang.in (target_libs): Remove.
3128 (build_by_default): Set to no.
3129
31302009-05-15 Diego Novillo <dnovillo@google.com>
3131
3132 * lto.c (lto_materialize_function): Assert that DECL is
3133 not a builtin.
3134 (materialize_cgraph): Don't try to materialize builtin
3135 functions.
3136 * lto-section-out.c (write_symbol_vec): Do not write
3137 builtin functions.
3138
31392009-05-13 Diego Novillo <dnovillo@google.com>
3140
3141 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3142
31432009-05-07 Diego Novillo <dnovillo@google.com>
3144
3145 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3146 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3147 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3148 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3149 (lto_fixup_tree): Call gimple_register_type when *TP is a
3150 type.
3151 (lto_main): Call bitmap_obstack_initialize.
3152
31532009-04-22 Diego Novillo <dnovillo@google.com>
3154
3155 * lto.c (free_section_data): Tidy.
3156 (lto_1_to_1_map): Tidy.
3157 (lto_add_all_inlinees): Tidy.
3158 (prefix_name_with_star): New.
3159 (get_filename_for_set): New.
3160 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3161 to determine what cgraph node sets to write.
3162 Call get_filename_for_set to compute temporary file
3163 names.
3164 (lto_execute_ltrans): Do not execute LTRANS on files with
3165 names that start with '*'.
3166 Move logic to execute LTRANS together so that LTRANS is
3167 invoked only if there are any files to compile.
3168 (do_whole_program_analysis): Only remove output files
3169 that do not start with '*'.
3170
31712009-04-06 Diego Novillo <dnovillo@google.com>
3172
3173 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3174 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3175 (lto_add_all_inlinees): Tidy.
3176
31772009-03-26 Diego Novillo <dnovillo@google.com>
3178
3179 * lto.c: Include gimple.h.
3180 (lto_read_in_decl_state): Call gimple_register_type for
3181 every type in every stream.
3182 (lto_fixup_common): Call gimple_register_type if T has a
3183 type.
3184 (do_whole_program_analysis): Call print_lto_report.
3185 (lto_main): Call print_lto_report after cgraph_optimize.
3186 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3187
31882009-03-24 Diego Novillo <dnovillo@google.com>
3189
3190 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3191 (lto.o): Add dependency on GIMPLE_H.
3192
31932009-03-10 Simon Baldwin <simonb@google.com>
3194
3195 * lto.c (lto_read_all_file_options): Close any open file descriptor
3196 contained in file_data before freeing.
3197
31982009-02-24 Rafael Avila de Espindola <espindola@google.com>
3199
3200 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3201 for a decl in the original bitmap, not a node.
3202 (lto_add_all_inlinees): Remove original nodes that are not needed.
3203 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3204
32052009-02-24 Diego Novillo <dnovillo@google.com>
3206
3207 * lto.c (lto_materialize_function): Update
3208 lto_stats.num_function_bodies.
3209 (get_section_data): Initialize *LEN to 0.
3210 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3211 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3212 Update lto_stats.num_output_files.
3213 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3214 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3215 (lto_main): Initialize lto_stats.
3216 If flag_lto_report is set, call print_lto_report.
3217
32182009-02-19 Diego Novillo <dnovillo@google.com>
3219
3220 Revert
3221
3222 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3223
3224 * lto.c (lto_add_inline_clones): Don't add the
3225 master clone. Check for a decl in the original
3226 bitmap, not a node.
3227 (lto_add_all_inlinees): Remove original nodes
3228 that are not needed.
3229 (lto_scan_statics_in_cgraph_node): Don't care if
3230 the node is the master.
3231 (lto_promote_cross_file_statics): Use a new
3232 context.seen_node_decls for each set
3233
32342009-02-19 Rafael Avila de Espindola <espindola@google.com>
3235
3236 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3237 for a decl in the original bitmap, not a node.
3238 (lto_add_all_inlinees): Remove original nodes that are not needed.
3239 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3240 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3241 for each set
3242
32432009-02-18 Diego Novillo <dnovillo@google.com>
3244
3245 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3246 and TV_WHOPR_WPA_IO.
3247 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3248 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3249 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3250 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3251 depending on command line flags.
3252 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3253 (lto_main): Remove timer uses.
3254
32552009-02-18 Rafael Avila de Espindola <espindola@google.com>
3256
3257 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3258 (lto_wpa_write_files): Update calls to renamed functions.
3259
32602009-02-17 Diego Novillo <dnovillo@google.com>
3261
3262 PR 39203
3263 * lto-lang.c (lto_post_options): Disable -fwhole-program
3264 when running LTRANS.
3265
32662009-02-10 Diego Novillo <dnovillo@google.com>
3267
3268 * lto.c (read_cgraph_and_symbols): Fix comment.
3269
32702009-02-10 Diego Novillo <dnovillo@google.com>
3271
3272 * lto.c (read_cgraph_and_symbols): Read options from all
3273 IL files.
3274
32752009-02-10 Diego Novillo <dnovillo@google.com>
3276
3277 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3278 (materialize_cgraph): Likewise.
3279 (do_whole_program_analysis): Likewise.
3280 (lto_main): Call read_cgraph_and_symbols,
3281 materialize_cgraph and do_whole_program_analysis.
3282
32832009-02-10 Simon Baldwin <simonb@google.com>
3284
3285 * lto.c: Include lto-opts.h.
3286 * (lto_main): Clear file options at loop start, read any saved
3287 options from the first file handled, and re-issue options.
3288 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3289
32902009-02-02 Diego Novillo <dnovillo@google.com>
3291
3292 * lto.c (lto_main): Stop LTO_TIMER and use
3293 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3294
32952009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3296
3297 PR lto/38995
3298 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3299 to POINTER_SIZE.
3300
33012009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3302
3303 * Make-lang.in (LTO_EXE): Link with all
3304 BACKENDLIBS and not only GMPLIBS
3305
33062009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3307
3308 PR bootstrap/38992
3309 * lto-elf.c: Include gelf.h instead of libelf.h.
3310 (lto_elf_file_close): Replace elfx_update_shstrndx with
3311 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3312 gelf_update_ehdr.
3313
33142009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3315
3316 PR middle-end/38996
3317 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3318
33192009-01-26 Diego Novillo <dnovillo@google.com>
3320
3321 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3322
33232009-01-26 Diego Novillo <dnovillo@google.com>
3324
3325 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3326 and rename into gimple_types_compatible_p.
3327
33282009-01-12 Rafael Avila de Espindola <espindola@google.com>
3329
3330 * lto-lang.c (lang_hooks): Remove the const qualifier.
3331
33322009-01-06 Diego Novillo <dnovillo@google.com>
3333
3334 * ltrans-driver: Mark 'all' target as phony.
3335
33362008-12-31 Diego Novillo <dnovillo@google.com>
3337
3338 * ltrans-driver: Execute a NOP action for target 'all'.
3339
33402008-12-19 Diego Novillo <dnovillo@google.com>
3341
3342 * lto.c (lto_1_to_1_map): Tidy.
3343
33442008-12-19 Diego Novillo <dnovillo@google.com>
3345
3346 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3347 be opened, show its name.
3348 * ltrans-driver: If $verbose is set, do not use parallelism.
3349
33502008-12-17 Rafael Avila de Espindola <espindola@google.com>
3351
3352 * lto.c (lto_fixup_function): New.
3353 (lto_fixup_tree): Call lto_fixup_function.
3354
33552008-12-14 Doug Kwan <dougkwan@google.com>
3356
3357 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3358 variables if there is no function.
3359
33602008-12-10 Simon Baldwin <simonb@google.com>
3361
3362 * ltrans-driver: Always run make in silent mode, to avoid make's
3363 trace on stdout interfering with lto-wrapper output.
3364
33652008-12-10 Doug Kwan <dougkwan@google.com>
3366
3367 * lto.c (lto_add_inline_clones): Do not force master clones of
3368 inlined functions already in SET to be static inline.
3369
33702008-12-04 Doug Kwan <dougkwan@google.com>
3371
3372 * lto.c (globalize_context_t): New type to store states in
3373 globalization of cross-file statics.
3374 (globalize_cross_file_statics): New.
3375 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3376 static decls that need to be fixed up.
3377 (lto_scan_statics_in_cgraph_node): Change call interface to use
3378 a globalize_context_t CONTEXT for all states used.
3379 (lto_scan_statics_in_remaining_global_vars): New.
3380 (lto_promote_cross_file_statics): Use new call interface of
3381 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3382 visible vars in the last set.
3383
33842008-12-03 Diego Novillo <dnovillo@google.com>
3385
3386 * lto.c (lto_fixup_tree): Do not emit an error when
3387 PREVAILING throw but T doesn't.
3388
33892008-12-02 Doug Kwan <dougkwan@google.com>
3390
3391 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3392 from code in ...
3393 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3394 variables and functions.
3395 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3396 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3397
33982008-11-29 Diego Novillo <dnovillo@google.com>
3399
3400 * lto.c: Include timevar.h.
3401 (lto_materialize_function): Tidy. Add comments.
3402 (lto_wpa_write_files): Tidy.
3403 (lto_execute_ltrans): Tidy.
3404 (lto_main): Add local variable LTO_TIMER. Initialize it
3405 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3406 Start and stop the timer.
3407 Tidy comments.
3408 * Make-lang.in (lto.o): Add dependency on timevar.h.
3409 * ltrans-driver: React to -v and -save-temps.
3410 Use simple heuristic to determine how much parallelism to
3411 use when executing make.
3412
34132008-11-12 Doug Kwan <dougkwan@google.com>
3414
3415 * lto.c (lto_bitmap_obstack): Remove var.
3416 (lto_materialize_function): Do nothing instead of marking function
3417 body in file if flag_wpa is true.
3418 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3419 (lto_scan_statics_in_cgraph_node): New function.
3420 (lto_promote_cross_file_statics): Same.
3421 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3422 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3423 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3424
34252008-11-09 Diego Novillo <dnovillo@google.com>
3426
3427 * lto/lto.c (lto_fixup_tree): Change error message locus
3428 information to include location of mismatching
3429 declaration.
3430 Use TREE_NO_WARNING to avoid repeated messages.
3431 (lto_main): If lto_fixup_decls emitted any errors, exit.
3432 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3433 (lto_init_options): Don't enable exceptions by default.
3434 (lto_eh_runtime_type): Move to lto-function-in.c
3435 (lto_init_eh): Likewise.
3436 (lto_init): Don't call lto_init_eh.
3437 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3438 libfuncs.h and except.h.
3439
34402008-10-30 Diego Novillo <dnovillo@google.com>
3441
3442 * lto.c (lto_read_decls): Declare debug_main only if
3443 LTO_STREAM_DEBUGGING is enabled.
3444
34452008-10-30 Simon Baldwin <simonb@google.com>
3446
3447 * lto.c (lto_wpa_write_files): Create intermediate files with
3448 make_cwd_temp_file().
3449 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3450 WPA_SAVE_LTRANS is set.
3451 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3452 * ltrans-driver: Do not strip directory from output files.
3453
34542008-10-29 Doug Kwan <dougkwan@google.com>
3455
3456 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3457 DECL.
3458 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3459 (lto/lto-symtab.o): Remove rule.
3460 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3461 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3462 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3463 Remove macros.
3464 lto-symtab.c (File): Move up one level.
3465 lto-lang.c (cgraph.h): Remove include.
3466 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3467 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3468 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3469
34702008-10-24 Rafael Espindola <espindola@google.com>
3471
3472 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3473 non prevailing weak symbols.
3474
34752008-10-24 Rafael Espindola <espindola@google.com>
3476
3477 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3478
34792008-10-24 Rafael Espindola <espindola@google.com>
3480
3481 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3482 different types.
3483
34842008-10-23 Simon Baldwin <simonb@google.com>
3485
3486 * lto-lang.c (input_node): Save the node reference, rather than the
3487 node pointer, in node->inlined_to.
3488 (input_cgraph_1): Convert node references into node pointers.
3489
34902008-10-22 Diego Novillo <dnovillo@google.com>
3491 Rafael Espindola <espindola@google.com>
3492
3493 * lto.c (lto_resolution_read): Tidy.
3494 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3495 abort if RET is NULL.
3496
34972008-10-22 Doug Kwan <dougkwan@google.com>
3498
3499 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3500 exceptions flag is given.
3501 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3502 (lto_init_eh): Remove exceptions flag initialization.
3503 (lto_init): Only call lto_init_eh if exceptions flag is set.
3504
35052008-10-21 Diego Novillo <dnovillo@google.com>
3506
3507 * lto.c: Tidy some formatting.
3508 * lto.h: Likewise.
3509
35102008-10-21 Simon Baldwin <simonb@google.com>
3511
3512 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3513 them is NULL (but not the other).
3514
35152008-10-17 Diego Novillo <dnovillo@google.com>
3516
3517 * ltrans-driver: Divert output from make to a temporary file.
3518 Show it if the call to make failed.
3519
35202008-10-15 Diego Novillo <dnovillo@google.com>
3521
3522 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3523 Do not print TEMP_FILENAME
3524 * ltrans-driver: Call make with -s.
3525
35262008-10-15 Diego Novillo <dnovillo@google.com>
3527
3528 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3529 TREE_STATIC on global symbols.
3530
35312008-10-14 Ollie Wild <aaw@google.com>
3532
3533 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3534 (LTRANS_DRIVER_EXE): Add.
3535 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3536 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3537 (lto.install.common): Remove ltrans-driver.
3538 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3539 (LTRANS_DRIVER_EXE): New build rule.
3540 * config-lang.in (compilers): Add ltrans-driver.
3541
35422008-10-14 Diego Novillo <dnovillo@google.com>
3543
3544 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3545 of program name.
3546
35472008-10-13 Ollie Wild <aaw@google.com>
3548
3549 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3550 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3551 * ltrans-driver (LTRANS_FLAGS): Remove.
3552
35532008-10-08 Doug Kwan <dougkwan@google.com>
3554
3555 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3556 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3557 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3558 from lto_fixup_state to here.
3559 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3560 just a free-list. Fix up types also. Move decl merging code to
3561 lto_fixup_tree.
3562 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3563 object.
3564 (lto_fixup_decls): Use another pointer set to avoid multiple
3565 walking of nodes except for DECLs to be replaced. Pass an
3566 lto_fixup_data_t object to tree-walker.
3567
35682008-10-08 Rafael Espindola <espindola@google.com>
3569
3570 * lto-symtab.c (lto_symtab_set_resolution): New.
3571 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3572 lto_symtab_get_resolution.
3573 (lto_symtab_prevailing_decl): Return decl for non public decls.
3574 (lto_symtab_get_resolution): New.
3575 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3576
35772008-10-06 Rafael Espindola <espindola@google.com>
3578
3579 * lto-lang.c: Include cgraph.h.
3580 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3581 input_cgraph): Moved from lto-cgraph.c.
3582 (LANG_HOOKS_INPUT_CGRAPH): New.
3583
35842008-10-03 Rafael Espindola <espindola@google.com>
3585
3586 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3587
35882008-10-03 Rafael Espindola <espindola@google.com>
3589
3590 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3591 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3592 prevailing definition. Don't mark TREE_NOTHROW differences.
3593 * lto.c (lto_fixup_tree): New.
3594 (lto_fixup_state): New.
3595 (lto_fixup_state_aux): New.
3596 (free_decl): New.
3597 (lto_fixup_decls): New.
3598 (lto_main): Call lto_fixup_decls.
3599
36002008-10-02 Ollie Wild <aaw@google.com>
3601
3602 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3603 and Init.
3604 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3605 * lto-lang.c (lto_post_options): Add validation and fixups for
3606 -fltrans and -fwpa.
3607
36082008-10-02 Rafael Espindola <espindola@google.com>
3609
3610 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3611 lto_symtab_merge_decl): Return void.
3612 (lto_symtab_prevailing_decl): New.
3613
36142008-09-30 Rafael Espindola <espindola@google.com>
3615
3616 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3617 defined symbols.
3618 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3619 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3620 Check for already defined symbols.
3621 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3622 (LTO_IDENTIFIER_RESOLUTION): Remove.
3623 (LTO_DECL_RESOLUTION): New.
3624
36252008-09-30 Rafael Espindola <espindola@google.com>
3626
3627 * lto.c (lto_read_decls): Use new input_tree signature.
3628
36292008-09-26 Doug Kwan <dougkwan@google.com>
3630
3631 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3632 bodies affected by exception attribute merging of DECLs.
3633 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3634 merging.
3635
36362008-09-25 Rafael Espindola <espindola@google.com>
3637
3638 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3639 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3640 * lto-symtab.c (lto_symtab_compatible): New.
3641 (lto_symtab_overwrite_decl): New.
3642 (lto_symtab_merge_decl): Refactor to use the above functions
3643 and the resolution from lang_identifier.
3644 * lto-tree.h: Include plugin-api.h.
3645 (lang_identifier): Add resolution.
3646 (LTO_IDENTIFIER_RESOLUTION): New.
3647
36482008-09-25 Ollie Wild <aaw@google.com>
3649
3650 * lang.opt (fltrans-output-list=): New option.
3651 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3652
36532008-09-25 Rafael Espindola <espindola@google.com>
3654
3655 * lto.c (lto_resolution_read): Initialize ret;
3656
36572008-09-24 Ollie Wild <aaw@google.com>
3658
3659 * lto.c (sys/mman.h): Move include.
3660 (lto_wpa_write_files): Return a list of written files.
3661 (lto_execute_ltrans): New function.
3662 (lto_main): Call lto_execute_ltrans.
3663 (ltrans-driver): New file.
3664 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3665 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3666 (lto_init_options): Initialize ltrans_driver.
3667 (lto_handle_option): Fix incorrect default output value.
3668 * lang.opt (fltrans-driver=): New option.
3669 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3670 (lto.install-common): Add lto/ltrans-driver.
3671
36722008-09-24 Rafael Espindola <espindola@google.com>
3673
3674 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3675 (lto/lto.o): Depend on lto/common.h.
3676 (lto/common.o): New.
3677 * lang.opt (resolution): New.
3678 * lto-lang.c (resolution_file_name): New.
3679 (lto_handle_option): Handle OPT_resolution.
3680 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3681 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3682 pass it to lto_symtab_merge_decl.
3683 * lto.c: Include common.h.
3684 (lto_read_decls): Add resolutions and resolutions_size arguments.
3685 Initialize data_in.globals_resolution and
3686 data_in.globals_resolution_size.
3687 (index_and_symbol_resolution): New.
3688 (lto_resolution_read): New.
3689 (lto_file_read): Add argument resolution_file.
3690 Read resolution.
3691 * lto.h (resolution_file_name): New.
3692
36932008-09-23 Rafael Espindola <espindola@google.com>
3694
3695 * common.c: Update description.
3696 * common.h: Update description.
3697
36982008-09-23 Rafael Espindola <espindola@google.com>
3699
3700 * common.c: Moved from lto-plugin.
3701 * common.h: Moved from lto-plugin.
3702
37032008-09-22 Doug Kwan <dougkwan@google.com>
3704
3705 * lto.c (VEC(bitmap,heap)): Declare.
3706 (lto_materialize_function): Handle WAP mode specially.
3707 (lto_add_inline_clones): New.
3708 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3709 return a bitmap of inlined decls.
3710 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3711 (lto_main): Call reset_inline_failed to reset inlining states.
3712 Check call-graph after WPA inlining.
3713 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3714 unconditionally.
3715
37162008-09-19 Doug Kwan <dougkwan@google.com>
3717
3718 lto.c (lto_main): Remove unsued wrapper code.
3719 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3720
37212008-09-19 Rafael Espindola <espindola@google.com>
3722
3723 * lto-symtab.c: Include lto-tree-in.h.
3724 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3725 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3726 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3727
37282008-09-17 Paolo Bonzini <bonzini@gnu.org>
3729 Rafael Avila de Espindola <espindola@google.com>
3730
3731 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3732 COMPOUND_LITERAL_EXPR_DECL): Remove.
3733 (emit_local_var): Remove.
3734 (lto_expand_expr): Remove.
3735 (lto_staticp): Remove.
3736 (LANG_HOOKS_EXPAND_EXPR): Remove.
3737 (LANG_HOOKS_STATICP): Remove.
3738
37392008-09-11 Diego Novillo <dnovillo@google.com>
3740
3741 * lto-lang.c: Include except.h and libfuncs.h.
3742 (lto_init_eh): New.
3743 (lto_init): Call it.
3744 Set flag_generate_lto to 0.
3745 * Make-lang.in (lto-lang.o): Add dependency on except.h
3746 and libfuncs.h.
3747
37482008-09-09 Bill Maddox <maddox@google.com>
3749
3750 * lto-lang.c: Include header file expr.h.
3751 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3752 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3753 (emit_local_var): Copied from c-semantics.c.
3754 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3755 and c_staticp in c-common.c.
3756 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3757
37582008-09-08 Diego Novillo <dnovillo@google.com>
3759
3760 * lto-lang.c (lto_global_bindings_p): Return 1 during
3761 IPA passes.
3762
37632008-09-07 Diego Novillo <dnovillo@google.com>
3764
3765 * lto.c: Tidy formatting.
3766
37672008-08-04 Bill Maddox <maddox@google.com>
3768
3769 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3770
37712008-09-03 Doug Kwan <dougkwan@google.com>
3772
3773 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3774 CIF_OK instead of NULL.
3775
37762008-09-02 Diego Novillo <dnovillo@google.com>
3777 Simon Baldwin <simonb@google.com>
3778
3779 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3780 c_common_type_for_size.
3781 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3782 (lto_init): Call linemap_add.
3783 (signed_and_unsigned_types): Remove.
3784
37852008-08-29 Diego Novillo <dnovillo@google.com>
3786
3787 * lto-lang.c (handle_noreturn_attribute): New local function.
3788 (handle_const_attribute): New local function.
3789 (handle_malloc_attribute): New local function.
3790 (handle_pure_attribute): New local function.
3791 (handle_novops_attribute): New local function.
3792 (handle_nonnull_attribute): New local function.
3793 (handle_nothrow_attribute): New local function.
3794 (handle_sentinel_attribute): New local function.
3795 (handle_type_generic_attribute): New local function.
3796 (handle_format_attribute): New local function.
3797 (handle_format_arg_attribute): New local function.
3798 (lto_attribute_table): Declare.
3799 (lto_format_attribute_table): Declare.
3800 (lto_init_attributes): New local function.
3801 (lto_define_builtins): Call it.
3802 Call targetm.init_builtins and build_common_builtin_nodes.
3803 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3804 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3805
38062008-08-28 Diego Novillo <dnovillo@google.com>
3807
3808 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3809 $(GIMPLE_H).
3810 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3811 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3812 * lto-symtab.c: Include gimple.h.
3813 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3814 TREE_CHAIN.
3815
38162008-08-27 Doug Kwan <dougkwan@google.com>
3817
3818 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3819 gt-lto-lto.h): New includes.
3820 (lto_materialize_function): Do not read in function body in WPA mode.
3821 Format a line to fit in 80 columns.
3822 (lto_cgraph_node_sets): New garbage collected variable.
3823 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3824 New functions.
3825 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3826 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3827 variable LTO_SECTION_IN_H.
3828 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3829 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3830 with variable LTO_SECTION_IN_H.
3831 * config-lang.in (gtfiles): Add lto/lto.c.
3832 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3833 merged DECL_RESULT correctly.
3834
38352008-08-26 Bill Maddox <maddox@google.com>
3836
3837 * lto-lang.c Include tree-gimple.h.
3838 (lto_mark_addressable): Call mark_addressable rather than
3839 asserting.
3840 (lto_post_options): Suppress debug info generation.
3841 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3842
38432008-08-25 Bill Maddox <maddox@google.com>
3844
3845 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3846 assertion and leave an explanatory comment in its place.
3847
38482008-08-21 Doug Kwan <dougkwan@google.com>
3849
3850 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3851 of common nodes instead of computing locallly.
3852 (lto_read_in_decl_state): New.
3853 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3854 Read global and per-function in-decl states.
3855 * Make-lang.in (LTO_H): Update dependency.
3856 (lto/lto.o): Same.
3857 (lto-symtab.c): Merge (revision 139039)
3858 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3859
38602008-08-21 Rafael Espindola <espindola@google.com>
3861
3862 * config-lang.in (target_libs): New.
3863
38642008-08-20 Bill Maddox <maddox@google.com>
3865
3866 * lto.c (current_lto_file): Remove GTY marker from static
3867 variable. Remove include of file gt-lto-lto.h.
3868 * Make-lang.in: Remove dependency of lto/lto.o on
3869 gt-lto-lto.h.
3870 * lto-elf.c (lto_file_close): Removed.
3871 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3872 allocate lto_elf_file object.
3873 (lto_elf_file_close): Free lto_elf_file object after close.
3874 * lto.h (struct lto_file_struct): Remove GTY marker.
3875 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3876 gtfiles.
3877
38782008-08-20 Bill Maddox <maddox@google.com>
3879
3880 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3881 to conform to its new signature.
3882 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3883 on discarded node here, now called in global_vector_fixup.
3884
38852008-08-09 Bill Maddox <maddox@google.com>
3886
3887 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3888 has not been set to a front-end-specific value.
3889
38902008-08-05 Doug Kwan <dougkwan@google.com>
3891
3892 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3893 build breakage.
3894
38952008-07-30 Bill Maddox <maddox@google.com>
3896
3897 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3898 Remove obsolete comments.
3899 (lto_read_decls): Remove initialization of deleted field data_in.global.
3900 Tidy up comments.
3901 (lto_main): Remove redundant initialization of section_hash_table.
3902 * lto-elf.c: Removed obsolete comments.
3903 * lto.h: Tidy up comments.
3904 * lto-symtab.c (lto_least_common_multiple): New function.
3905 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3906 Tidy up comments.
3907
39082008-07-25 Diego Novillo <dnovillo@google.com>
3909 Bill Maddox <maddox@google.com>
3910
3911 * lto.c: Re-order include files.
3912 Include lto-section-out.h.
3913 (preload_common_nodes): Add debugging output.
3914 Add new local INDEX_TABLE.
3915 Call preload_common_node.
3916 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3917
39182008-07-13 Bill Maddox <maddox@google.com>
3919
3920 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3921 unwanted scaling during pointer addition.
3922
39232008-07-11 Bill Maddox <maddox@google.com>
3924 Diego Novillo <dnovillo@google.com>
3925
3926 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3927 Make code const-correct.
3928 (lto_file_read): Fix C++ compatibility warnings.
3929 (lto_read_section_data): Fix C++ compatibility warnings.
3930 (lto_get_section_data): Use CONST_CAST to avoid warning when
3931 const pointer passed to free.
3932 * lto-elf.c (lto_elf_build_section_table): Fix C++
3933 compatibility warnings.
3934 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3935 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3936 (lto_get_current_out_file): Fix C++ compatibility warnings.
3937
39382008-07-11 Diego Novillo <dnovillo@google.com>
3939
3940 * Make-lang.in (lto-warn): Define.
3941
39422008-07-03 Simon Baldwin <simonb@google.com>
3943
3944 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3945 LTO_STREAM_DEBUGGING.
3946
39472008-06-27 Ollie Wild <aaw@google.com>
3948
3949 * lto-elf.c (lto-section-out.h): New include.
3950 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3951 and data members.
3952 (cached_file_attrs): New static variable.
3953 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3954 Use cached_file_attrs for checking bits.
3955 (lto_elf_build_section_table): Remove elf_file argument from
3956 lto_elf_get_shdr and lto_elf_free_shdr calls.
3957 (DEFINE_INIT_SHDR): New macro.
3958 (init_shdr32, init_shdr64): New functions defined via the
3959 DEFINE_INIT_SHDR macro.
3960 (lto_elf_begin_section_with_type): New function.
3961 (lto_elf_begin_section): New function.
3962 (lto_elf_append_data): New function.
3963 (lto_elf_end_section): New function.
3964 (DEFINE_VALIDATE_EHDR): New macro.
3965 (validate_ehdr32, validate_ehdr64): New functions defined via the
3966 DEFINE_VALIDATE_EHDR macro.
3967 (validate_file): New function.
3968 (DEFINE_INIT_EHDR): New macro.
3969 (init_ehdr32, init_ehdr64): New functions defined via the
3970 DEFINE_INIT_EHDR macro.
3971 (init_ehdr): New function.
3972 (lto_elf_file_open): Add support for writable files. Move some
3973 validation logic to validate_file.
3974 (lto_elf_file_close): Add support for writable files. Write file data
3975 and free data blocks.
3976 (current_out_file): New static variable.
3977 (lto_set_current_out_file): New function.
3978 (lto_get_current_out_file): New function.
3979 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3980 Add temporary initialization for testing ELF serialization.
3981 * lto.h (lto-section-out.h): New include.
3982 (struct lto_file_struct): Slight modification to comment.
3983 (lto_elf_file_open): Add writable parameter.
3984 (lto_elf_begin_section): New function declaration.
3985 (lto_elf_append_data): New function declaration.
3986 (lto_elf_end_section): New function declaration.
3987 (lto_set_current_out_file, lto_get_current_out_file): New function
3988 declarations.
3989 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3990 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3991 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3992 * Make-lang.in (LTO_H): Add lto-section-out.h.
3993
39942008-06-12 Ollie Wild <aaw@google.com>
3995
3996 * lto.h (struct lto_file_vtable_struct): Remove.
3997 (struct lto_file_struct): Remove vtable member.
3998 * lto-elf.c (lto_file_init): Remove vtable argument.
3999 (lto_elf_map_optional_lto_section): Remove.
4000 (lto_elf_unmap_section): Remove.
4001 (lto_elf_file_vtable): Remove.
4002 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4003 lto_file_init call.
4004 (lto_elf_find_section_data): Remove.
4005
40062008-06-11 Ollie Wild <aaw@google.com>
4007
4008 * lto.c (lto_file_read): Add const qualifier to data variable.
4009
40102008-06-11 Diego Novillo <dnovillo@google.com>
4011
4012 Merge from lto-streamber sub-branch.
4013
4014 2008-06-04 Ollie Wild <aaw@google.com>
4015
4016 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4017 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4018
4019 2008-05-28 Bill Maddox <maddox@google.com>
4020
4021 Replace the DWARF reader in the LTO front-end.
4022
4023 * lto.c: Include lto-tree-in.h, lto-tags.h.
4024 (enum DWARF2_class, DW_cl_constant, struct
4025 DWARF2_form_data, struct lto_context,
4026 lto_fd_init, lto_info_fd_init,
4027 lto_abbrev_fd_init, lto_info_fd_close,
4028 lto_file_init, lto_file_close,
4029 lto_file_corrupt_error, lto_abi_mismatch_error,
4030 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4031 lto_read_uleb128, lto_read_sleb128,
4032 lto_read_initial_length, lto_abbrev_read_attrs,
4033 lto_abbrev_read, lto_abbrev_read_lookup,
4034 lto_read_section_offset,
4035 lto_read_comp_unit_header, find_cu_for_offset,
4036 lto_get_file_name,
4037 lto_resolve_reference,lto_read_form,
4038 attribute_value_as_int,
4039 make_signed_host_wide_int,
4040 attribute_value_as_constant, lto_cache_hash,
4041 lto_cache_eq, lto_cache_store_DIE,
4042 lto_cache_lookup_DIE, lto_find_integral_type,
4043 lto_find_integral_type_1,
4044 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4045 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4046 lto_unsupported_attr_error, lto_get_identifier,
4047 lto_read_referenced_type_DIE,
4048 lto_read_compile_unit_DIE,
4049 lto_read_array_type_DIE,
4050 lto_read_structure_union_class_type_DIE,
4051 lto_read_enumerator_DIE,
4052 lto_read_enumeration_type_DIE,
4053 lto_read_only_for_child_DIEs,
4054 lto_read_only_for_child_DIEs,
4055 lto_read_member_DIE, lto_read_abbrev,
4056 lto_read_variable_formal_parameter_constant_DIE,
4057 lto_get_body): Removed.
4058 (preload_common_nodes): New function.
4059 (lto_read_decls): Convert for new global streamer.
4060 (lto_materialze_file_data,
4061 lto_read_subroutine_type_subprogram_die,
4062 lto_read_unspecified_parameters_DIE,
4063 lto_read_typedef_DIE,
4064 lto_read_pointer_reference_type_DIE,
4065 lto_read_subrange_type_DIE,
4066 lto_read_base_type_DIE,
4067 lto_read_const_volatile_restrict_type_DIE,
4068 lto_read_namespace_DIE,
4069 lto_read_unspecified_type_DIE, lto_read_DIE,
4070 lto_read_child_DIEs, lto_collect_child_DIEs):
4071 Removed.
4072 (lto_info_read, lto_set_cu_context): Removed.
4073 (lto_file_read): Convert for new global streamer.
4074 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4075 lto_resolve_var_ref, lto_resolve_fn_ref,
4076 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4077 lto_resolve_namespacedecl_ref): Removed.
4078 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4079 * lto-tree.h (lto_symtab_merge_var,
4080 lto_symtab_mergee_fun): Declare here.
4081 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4082 (lto_elf_file_open): Removed code to read DWARF debug sections.
4083 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4084 DWARF2_CompUnit, lto_die_ptr,
4085 lto_die_cache_entry, lto_fd, lto_info_fd,
4086 lto_abbrev_fd): Removed.
4087 (lto_file): Removed debug_info and debug_abbrev fields.
4088 (lto_ref): Removed.
4089 (lto_file_init, lto_file_close,
4090 lto_resolve_type_ref, lto_resolve_var_ref,
4091 lto_resolve_fn_ref, lto_resolve_field_ref,
4092 lto_resolve_typedecl_ref,
4093 lto_resolve_namespacedecl_ref,
4094 lto_get_file_name): Removed declarations.
4095 (lto_symtab_merge_var, lto_symtab_merge_fn):
4096 Declarations moved to lto-tree.h.
4097 * lto-symtab.c (lto_compatible_attributes_p):
4098 Lobotomize this, as it barfs on "Hello, world!".
4099 * lto-section-out.c: Include lto-tree-out.h.
4100 (lto_hash_global_slot_node,
4101 lto_eq_global_slot_node, preload_common_nodes,
4102 write_global_stream, write_global_references):
4103 New functions.
4104 (produce_asm_for_decls): Convert for new global streamer.
4105 * lto-section-out.h (lto_hash_global_slot_node,
4106 lto_eq_global_slot_node): Declare.
4107
41082008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
4109 Jan Hubicka <jh@suse.cz>
4110
4111 * lto.c (sys/mman.h, tree-pass.h): New includes.
4112 (lto_materialize_constructors_and_inits,
4113 lto_materialize_function): Keeps length of section.
4114 (lto_materialize_cgraph): Removed.
4115 (lto_read_decls): Initialize fd field.
4116 (lto_file_read): Different return type and removed much code to
4117 lto_main.
4118 (page_mask): New variable.
4119 (lto_read_section_data, get_section_data, free_section_data): New
4120 functions.
4121 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4122 passes can get the section data.
4123
41242008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
4125
4126 * lto.h (lto_read_decls): Made local.
4127 (lto_input_function_body, lto_input_constructors_and_inits,
4128 lto_input_cgraph): Declarations moved to lto-section-in.h.
4129 * lto-section-in.c: Moved to .. .
4130 * lto-cgraph-in.c: Ditto.
4131 * lto-section-in.h: Ditto.
4132 * lto-function-in.c: Ditto.
4133 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4134 (lto_insert_block): Removed.
4135 (LANG_HOOKS_INSERT_BLOCK): Removed.
4136 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4137 lto-section-in.o): Rules moved to lto/Makefile.in.
4138
4139
41402008-05-16 Ollie Wild <aaw@google.com>
4141
4142 * lto-lang.c (tree-inline.h): Include.
4143 (lto_post_options): New function.
4144 (LANG_HOOKS_POST_OPTIONS): Define.
4145 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4146 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4147
41482008-05-13 Diego Novillo <dnovillo@google.com>
4149
4150 * lto-function-in.c (input_ssa_names): Call
4151 make_ssa_name_fn instead of make_ssa_name.
4152
41532008-05-12 Diego Novillo <dnovillo@google.com>
4154
4155 * lto-cgraph-in.c (overwrite_node): Update references to
4156 inline summary fields.
4157 * lto-function-in.c (input_expr_operand): Do not handle
4158 STRUCT_FIELD_TAG.
4159
41602008-05-09 Ollie Wild <aaw@google.com>
4161
4162 * lang.opt: New file.
4163 * lto-lang.c (lto_init_options): New function.
4164 (lto_handle_option): New function.
4165 (lto_init): Move initialization of flag_unit_at_a_time to
4166 lto_init_options.
4167 (LANG_HOOKS_INIT_OPTIONS): Define.
4168 (LANG_HOOKS_HANDLE_OPTION): Define.
4169
41702008-04-29 Ollie Wild <aaw@google.com>
4171
4172 * lto.c (lto_read_namespace_DIE): New function.
4173 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4174 NAMESPACE_DECL DIE's.
4175 (lto_resolve_namespacedecl_ref): New function.
4176 * lto.h (lto_resolve_namespacedecl_ref): New function.
4177 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4178 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4179 and num_namespace_decls.
4180 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4181 * lto-lang.c (lto_init_ts): New function.
4182 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4183
41842008-04-16 Ollie Wild <aaw@google.com>
4185
4186 * lto-function-in.c (input_type_ref): Updated function description.
4187
41882008-04-16 Ollie Wild <aaw@google.com>
4189
4190 * lto-function-in.c (input_type_ref_1): New function.
4191 (input_type_ref): Split into two functions.
4192 (input_function): Add support for type contexts.
4193
41942008-04-16 Ollie Wild <aaw@google.com>
4195
4196 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4197 section name
4198
41992008-04-16 Ollie Wild <aaw@google.com>
4200
4201 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4202 list of supported languages.
4203
42042008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
4205
4206 Merge with mainline @133491.
4207
42082008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
4209 Jan Hubicka <jh@suse.cz>
4210
4211 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4212 fd->unmaterialized_fndecls.
4213 (lto_get_file_name, lto_materialize_cgraph): New function.
4214 (lto_materialize_constructors_and_inits,
4215 lto_materialize_function): Read info directly from elf file.
4216 (lto_file_read): Made local and initialize dictionary so that
4217 other lto sections can be read without reprocessing the elf file.
4218 (lto_main): Read all functions after all files have been processed
4219 for their types, globals and cgraph.
4220 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4221 dependencies.
4222 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4223 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4224 (lto_elf_read_symtab): Removed function.
4225 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4226 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4227 (lto_file_read): Made local.
4228 (lto_get_file_name, lto_elf_build_section_table,
4229 lto_input_cgraph):
4230 New function.
4231 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4232 New functions.
4233 (lto_read_decls): Get the file name.
4234 * lto-cgraph-in.c: New file.
4235 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4236 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4237 (input_labels): Fixed latent sizeof issue.
4238 (input_function): Build stmt array to set call sites into cgraph
4239 edges.
4240 (lto_read_body): Reset cfun->curr_properties.
4241 * lto_section_in.h (lto_section_slot): New structure.
4242 (section_hash_table.lto_file_decl_data): New field.
4243
4244
42452008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
4246
4247 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4248 reconstruct static initializers.
4249 (lto_get_body, lto_materialize_function): Add lto_section_type as
4250 a parameter.
4251 (lto_materialize_constructors_and_inits,
4252 lto_materialize_file_data): New function.
4253 (lto_materialize_function,
4254 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4255 unmap_section and map_fn_body to map_section.
4256 (lto_set_cu_context): Process functions and static inits
4257 differently.
4258 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4259 lto/lto-section-in.o): Update dependencies.
4260 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4261 lto_section_type parameter.
4262 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4263 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4264 renamed the other two so that there is only one map function and
4265 one unmap function and each takes a section type parameter.
4266 (lto_read_function_body): Renamed to lto_input_function_body and
4267 added file_data parameter.
4268 (lto_read_var_init): Removed.
4269 (lto_input_constructors_and_inits): New function.
4270 * lto-section-in.c (lto_read_decls): New function.
4271 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4272 var_decls, type_decls, types to lto_file_decl_data.
4273 (input_type_ref, input_expr_operand, lto_read_body): Get
4274 field_decls, fn_decls, var_decls, type_decls, types from different
4275 structure.
4276 (input_globals, input_constructor, lto_read_var_init): Removed.
4277 (input_constructors_or_inits): New function.
4278 (lto_read_function_body, lto_input_constructors_and_inits):
4279 Renamed to lto_input_function_body and takes file_data parameter.
4280 * lto-section-in.h (lto_file_decl_data): New structure.
4281
42822008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4283
4284 * lto-function-in.c (input_globals.c): Changed input type to
4285 lto_function_header.
4286 (input_bb): Removed code to deserialize the stmt number.
4287 (input_function): Renumber all stmts after they are input.
4288 (lto_read_body, lto_read_function_body, lto_read_var_init):
4289 Changed to used new header format and enum section_type.
4290 *lto-lang.c (success): Removed.
4291
42922008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4293
4294 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4295 (lto_elf_free_sym): Likewise.
4296
4297 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4298 (lto_elf_build_init): Likewise.
4299
43002008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
4301
4302 * lto-read.c: Renamed to lto-function-in.c.
4303 (input_1_unsigned): Moved to lto-section-in.c and renamed
4304 lto_input_1_unsigned.
4305 (input_uleb128): Moved to lto-section-in.c and renamed
4306 lto_input_uleb128.
4307 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4308 lto_input_widest_uint_uleb128.
4309 (input_sleb128): Moved to lto-section-in.c and renamed
4310 lto_input_sleb128.
4311 (input_integer): Moved to lto-section-in.c and renamed
4312 lto_input_integer.
4313 (debug_in_fun): Moved to lto-section-in.c and renamed
4314 lto_debug_in_fun.
4315 (input_block): Moved to lto-section-in.h and renamed
4316 lto_input_block.
4317 (input_expr_operand): Fixed to allow lists with more than one
4318 element.
4319 * lto-section-in.h: New file.
4320 * lto-section-in.c: New file with changes from above.
4321 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4322 (lto-section-in.o): New rule.
4323
43242007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4325
4326 * lto-read.c (input_expr_operand): Mark static and external
4327 VAR_DECLs as needed.
4328
43292007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4330
4331 * lto-read.c (input_integer): Use the correct shift amount.
4332
43332007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4334
4335 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4336 (LANG_HOOKS_NAME): Define.
4337
43382007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4339
4340 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4341 original function to...
4342 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4343 don't have a base type.
4344 (lto_read_enumeration_type_DIE): Examine the values of the
4345 enumeration to determine whether we can use an unsigned type for
4346 the base type of the enumeration.
4347
43482007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4349
4350 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4351 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4352
43532007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4354
4355 * lto-lang.c (lto_types_compatible_p): New function.
4356 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4357
43582007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4359 Kenneth Zadeck <zadeck@naturalbridge.com>
4360
4361 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4362 (input_local_vars): Read in DECL_INITIAL and context for local
4363 statics that need to be put in unexpanded_vars_list.
4364
43652007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4366
4367 * lto-read.c (input_real): Use a separate null-terminated buffer
4368 for calling real_from_string.
4369 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4370 tell cgraph that it's needed.
4371
43722007-12-19 Doug Kwan <dougkwan@google.com>
4373
4374 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4375
43762007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4377
4378 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4379 (lto_file_read): Reset the members of 'context' every time we read
4380 a toplevel DIE, with special attention to last_param_type.
4381
43822007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4383
4384 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4385 'declaration'. Set the assembler name for non-public functions.
4386
43872007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
4388
4389 * lto_read.c (data_in.unexpanded_indexes): New array.
4390 (input_local_var): Added code to read in unexpanded_var_list
4391 indexes for variables. Only read in DECL_CHAIN field for
4392 parameters.
4393 (input_local_vars): Added code to rebuild unexpanded_var_list in
4394 order using unexpanded_indexes.
4395 (input_function): Added code to set DECL_CONTEXT for functions.
4396
43972007-12-13 Doug Kwan <dougkwan@google.com>
4398
4399 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4400 in pointer and reference types.
4401
44022007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4403
4404 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4405 RESULT_DECL.
4406
44072007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4408
4409 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4410 already read the DIE.
4411 (lto_get_body): New function, split out from...
4412 (lto_materialize_function): ...here. Call it.
4413 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4414 determine DECL_EXTERNAL.
4415 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4416 FUNCTION_DECLs when necessary. Use the type of the actual
4417 function definition if we are unable to easily merge types. Ignore
4418 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4419 necessary.
4420
44212007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4422
4423 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4424
44252007-12-12 Bill Maddox <maddox@google.com>
4426
4427 Revert
4428 2007-12-07 Bill Maddox <maddox@google.com>
4429
4430 * lto.c (lto_str_fd_init): New function.
4431 (lto_str_fd_close): New function.
4432 (lto_file_init): Call lto_str_fd_init.
4433 (lto_file_close): Call lto_str_fd_close.
4434 (lto_str_read): New function. Read debug string table.
4435 (lto_str_lookup): New function. Get string for debug
4436 string table offset.
4437 (lto_read_form): Recognize DW_FORM_strp.
4438 (lto_file_read): Invoke lto_str_read.
4439
4440 * lto-elf.c (lto_elf_file_open): Read raw section data
4441 for the .debug_str section, if present.
4442
4443 * lto.h (struct lto_str_fd_struct): New struct.
4444 (struct lto_file_struct): Added new field DEBUG_STR
4445 to hold the file descriptor for the debug string table.
4446
44472007-12-07 Bill Maddox <maddox@google.com>
4448
4449 * lto.c (lto_str_fd_init): New function.
4450 (lto_str_fd_close): New function.
4451 (lto_file_init): Call lto_str_fd_init.
4452 (lto_file_close): Call lto_str_fd_close.
4453 (lto_str_read): New function. Read debug string table.
4454 (lto_str_lookup): New function. Get string for debug
4455 string table offset.
4456 (lto_read_form): Recognize DW_FORM_strp.
4457 (lto_file_read): Invoke lto_str_read.
4458
4459 * lto-elf.c (lto_elf_file_open): Read raw section data
4460 for the .debug_str section, if present.
4461
4462 * lto.h (struct lto_str_fd_struct): New struct.
4463 (struct lto_file_struct): Added new field DEBUG_STR
4464 to hold the file descriptor for the debug string table.
4465
44662007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4467
4468 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4469 Grow the basic_block_info and label_to_block_map vectors if
4470 necessary. Read in the block chain.
4471
44722007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4473
4474 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4475
44762007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4477
4478 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4479
44802007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4481
4482 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4483 (lto_read_body): Don't declare PROP_alias.
4484
44852007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4486
4487 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4488 argument type information.
4489
44902007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4491
4492 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4493 TREE_THIS_VOLATILE if the associated type is a volatile type.
4494 (lto_materialize_function): Remove call to init_ssa_operands.
4495 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4496 variable when reading an SSA_NAME. Do the same when reading a
4497 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4498 (input_cfg): Call init_ssa_operands.
4499 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4500 Move call to init_tree_ssa...
4501 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4502 add_referenced_var on any variables referenced from the body of the
4503 function. Inform the rest of the compiler we are in SSA form and
4504 inform later passes about the current properties.
4505
45062007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4507
4508 * lto.c (lto_materialize_function): Add FIXME.
4509
45102007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4511
4512 * lto-lang.c (enum built_in_attribute): New enum.
4513 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4514 built_in_attributes): New variables.
4515 (def_builtin_1): New function.
4516 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4517
45182007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4519
4520 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4521 DECL_SOURCE_LOCATION for debugging purposes.
4522 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4523 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4524 laying out the decl until later.
4525 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4526 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4527 TREE_ADDRESSABLE.
4528 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4529 operand of an ADDR_EXPR.
4530 * lto-lang.c (enum lto_builtin_type): New enum.
4531 (builtin_type): New typedef.
4532 (builtin_types, string_type_node, const_string_type_node,
4533 wint_type_node, intmax_type_node, uintmax_type_node,
4534 signed_size_type_node): New variables.
4535 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4536 lto_build_c_type_nodes): New functions.
4537 (lto_init): Initialize builtin types.
4538 (lto_set_decl_assembler_name): Let the target machine mangle the
4539 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4540
45412007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4542
4543 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4544 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4545 the type is a constant type. Set the assembler name and inform
4546 the rest of the compiler about the new decl if the decl is not
4547 public.
4548 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4549 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4550 try to read in function bodies for functions that already have bodies.
4551 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4552 equivalency.
4553 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4554 Check for whether we matched a builtin function type before calling
4555 lto_same_type_p on the generated type. Permit cases where the
4556 declaration of an array is unbounded, but the definition is bounded.
4557 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4558 DECL_SIZE_UNIT if necessary.
4559
45602007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4561
4562 * lto-read.c (input_expr_operand): Get types right
4563 for COMPLEX_CST.
4564
45652007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4566
4567 * lto-read.c (make_new_block, input_cfg): Properly set
4568 n_basic_blocks.
4569
45702007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4571
4572 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4573 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4574
45752007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4576
4577 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4578 construct the integer type for bitfields.
4579
45802007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4581
4582 * lto-read.c (data_in.current_node_has_loc): Removed.
4583 (input_line_info): Returns true if node needs line set.
4584 (set_line_info): Always sets line if called.
4585 (clear_line_info): Removed reference to current_node_needs_loc.
4586 (input_expr_operand): Keeps track locally if current node needs a loc.
4587 (input_local_var): Added code to handle DECL_INITIAL for
4588 static local vars. Only set loc if necessary.
4589
45902007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4591
4592 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4593 DECL_CONTEXT.
4594
45952007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4596
4597 * lto.c: Include langhooks.h.
4598 (lto_find_integral_type): Rework logic to handle the case where
4599 got_byte_size is true, but the bitsize requested and that of the
4600 base_type doesn't match.
4601 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4602 asm_name if we are creating a VAR_DECL.
4603 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4604 definition.
4605 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4606 function reference and use the builtin's decl if so. Set the
4607 DECL_CONTEXT of the RESULT_DECL for the function.
4608 * lto-lang.c (registered_builtin_fndecls): New variable.
4609 (lto_getdecls): Return it.
4610 (lto_builtin_function): Chain the new decl onto
4611 registered_builtin_fndecls.
4612
46132007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
4614
4615 * lto-read.c (process_tree_flags, lto_static_init_local):
4616 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4617 (input_line_info, clear_line_info): Fixed new line number code.
4618 (input_expr_operand): Added type to SWITCH_EXPR.
4619 (lto_read_body): Properly initialized data_in.
4620 Clear line info when leaving.
4621
46222007-11-13 Diego Novillo <dnovillo@google.com>
4623
4624 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4625 Initialize ARTIFICIAL.
4626 (lto_read_subroutine_type_subprogram_DIE): Initialize
4627 SAVED_SCOPE.
4628 * lto-read.c (set_line_info): Remove ; from calls to
4629 LINEMAP_POSITION_FOR_COLUMN.
4630
46312007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4632
4633 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4634 (input_expr_operand, input_local_var): Renamed get_type_ref to
4635 input_type_ref.
4636 (input_expr_operand): Get the types correct for
4637 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4638
46392007-11-13 Doug Kwan <dougkwan@google.com>
4640
4641 * lto-read.c (input_widest_uint_uleb128): New function.
4642 (input_tree_flags, process_tree_flags, input_line_info,
4643 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4644 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4645 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4646 (lto_static_init_local): Add code to assert that lto_flags_type is
4647 wide enough.
4648
46492007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4650
4651 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4652 (lto_read_subroutine_type_subprogram_DIE): Handle
4653 DW_AT_static_link and DW_AT_specification. Return the
4654 specification if present.
4655 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4656
46572007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4658
4659 * lto-lang.c: Include target.h.
4660 (registered_builtin_types): New variable.
4661 (lto_type_for_mode): Increase number of modes handled.
4662 (lto_builtin_function): Fix argument list and return the decl.
4663 (lto_register_builtin_type): New function.
4664 (lto_init): Initialize target builtins and language-independent
4665 nodes.
4666 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4667
46682007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4669
4670 * lto-read.c (input_expr_operand): Added code to properly handle
4671 index filed. Added new RANGE_EXPR case.
4672
46732007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4674
4675 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4676 (data_in): Added current_node_has_loc field.
4677 (input_line_info, set_line_info, clear_line_info): Added a support
4678 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4679 did not have on on the source side.
4680 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4681 numbers too.
4682
46832007-11-09 Doug Kwan <dougkwan@google.com>
4684
4685 * lto-read.c (input_expr_operand): Change type of operand 2 of
4686 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4687
46882007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4689
4690 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4691 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4692 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4693 the new decl we are creating. Move informing the middle end about
4694 the new decl to...
4695 (lto_main): ...here. Inform the middle end about global variables
4696 after we have read in all the input files.
4697 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4698 variables with internal linkage, so delete the check for internal
4699 linkage. Combine TREE_PUBLIC flags.
4700
47012007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4702
4703 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4704 DW_AT_decl_line.
4705 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4706 builtin specially. Move check for attribute compatibility
4707 earlier.
4708
47092007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4710
4711 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4712 * config-lang.in (gtfiles): Add lto.h and lto.c.
4713 * lto-elf.c: Include ggc.h.
4714 (lto_elf_file_open): Allocate elf_file from GC memory.
4715 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4716 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4717 in GC memory.
4718 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4719 (lto_file_close): Free file from GC memory.
4720 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4721 (lto_read_member_DIE): Fix declaration.
4722 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4723 in GC memory.
4724 (current_lto_file): New variable.
4725 (lto_main): Use it.
4726 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4727 lto_die_cache_entry): Move to...
4728 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4729 declarations accordingly.
4730 (struct lto_file_struct): Declare.
4731 (lto_file_vtable): Use it instead of lto_file.
4732
47332007-11-06 Alon Dayan <alond@il.ibm.com>
4734 Kenneth Zadeck <zadeck@naturalbridge.com>
4735
4736 * lto-read.c (process_flags, lto_static_init_local):
4737 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4738 change global array num_flags_for_code to flags_length_for_code.
4739 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4740
47412007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4742
4743 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4744 layout functions to compute information about the newly constructed
4745 type.
4746
47472007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4748
4749 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4750 case to use DECL_RESULT if necessary.
4751
47522007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4753
4754 * lto-read.c (input_tree_list): Removed.
4755 (input_tree_flags): Added parameter to force flags no matter what
4756 tree code.
4757 (input_expr_operand): Added parameter to input_tree_flags.
4758 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4759 input_expr_operand rather than input_tree_lists.
4760 (input_local_var): Use input_expr_operand to read attributes
4761 rather then input_tree_list.
4762 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4763
47642007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4765
4766 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4767 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4768 TYPE_DECL for it.
4769 * lto-read.c (lto_read_body): Use correct sizes for calculating
4770 type_decls_offset and types_offset.
4771
47722007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4773
4774 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4775 with GENERIC_NEXT.
4776 * config-lang.in (gtfiles): Add lto-lang.c.
4777 * lto-lang.c: Include gt-lto-lto-lang.h.
4778 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4779 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4780 (lto/lto-read.o): Likewise.
4781
47822007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4783
4784 * lto-read.c (data_in): Added type_decls and current_col fields.
4785 (string_slot): New type to hold canonized file name.
4786 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4787 input_line_info, set_line_info, clear_line_info): New functions.
4788 (file_name_hash_table): New hash table.
4789 (input_local_var, input_labels, input_local_vars_index,
4790 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4791 (input_uleb128): Changed type of byte var.
4792 (input_expr_operand): Large number of changes to get line numbers
4793 correct. Added TYPE_DECL case.
4794 (input_globals): Added code to get TYPE_DECLs processed.
4795 (input_local_var): Added code to process line numbers and
4796 TREE_CHAIN and DECL_CONTEXT.
4797 (input_function, input_constructor): Added call to
4798 clear_line_number.
4799 (lto_static_init_local): Added code to get line numbers correct.
4800 (lto_read_body): Added code to get TYPE_DECLS read and to change
4801 parameters to the calls above that had their parms reorganized.
4802
4803
48042007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4805
4806 * lto.h (lto_resolve_typedecl_ref): Declare.
4807 * lto.c (lto_resolve_typedecl_ref): New function.
4808
48092007-10-29 Mark Mitchell <mark@codesourcery.com>
4810 Nathan Froyd <froydnj@codesourcery.com>
4811
4812 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4813 DIEs even if we find an abstract origin for this DIE.
4814
48152007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4816
4817 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4818 RESULT_DECL slightly earlier. Only remember the decl for later
4819 if we successfully merge declarations.
4820
48212007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4822
4823 * lto-read.c (input_expr_operand): Give label_values the proper
4824 context and provide switch statements with a default type.
4825
48262007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4827
4828 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4829 * lto.c (lto_materialize_function): ...to here.
4830
48312007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4832
4833 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4834 * lto.c (lto_info_fd_init): Initialize it.
4835 (lto_info_fd_close): Free it.
4836 (lto_materialize_function): New function.
4837 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4838 unmaterialized_fndecls.
4839 (lto_file_read): Read in all the function bodies after we have read
4840 all of the DWARF info.
4841 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4842 reading a function body.
4843
48442007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4845
4846 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4847 semetric with output_tree_flags. Added call to log flags.
4848 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4849 type issues to make everything consistent with flags being
4850 unsigned HOST_WIDE_INTS.
4851 (input_expr_operand): Added call to
4852 recompute_tree_invariant_for_addr_expr.
4853 (input_local_var): Added debugging for tree_chains. Now calls
4854 input_tree_flags.
4855 (input_phi): Made flags unsigned HOST_WIDE_INT.
4856 (input_ssa_names): Now calls input_tree_flags.
4857 (lto_read_body): Now sets cfun.
4858 (lto_read_function_body): Now sets current_function_pointer.
4859
48602007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4861
4862 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4863 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4864 inspecting fields within.
4865 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4866 handle this appropriately.
4867
48682007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4869
4870 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4871 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4872 both DW_AT_abstract_origin and DW_AT_specification.
4873 (lto_read_subroutine_type_subprogram_DIE): Handle
4874 DW_AT_abstract_origin.
4875 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4876 (lto_read_DIE_at_ptr): Define as static to match declaration.
4877 Lookup the PTR in the cache before reading it from the file.
4878 (lto_resolve_var_ref): Adjust accordingly.
4879 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4880 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4881
48822007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4883
4884 * lto.c (lto_read_DIE_at_ptr): New function.
4885 (lto_resolve_var_ref): Use it.
4886 (lto_resolve_fn_ref): Use it.
4887 (lto_resolve_field_ref): Use it.
4888 (lto_read_variable_formal_parameter_constant_DIE): Follow
4889 DW_AT_specification and return the associated decl when appropriate.
4890
48912007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4892
4893 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4894 Implement for scalar integer modes.
4895 (lto_init): Initialize size_type_node.
4896
48972007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4898
4899 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4900 (input_local_var): Add chaining for params.
4901 (input_ssa_names): Add cfun parameter.
4902 (input_function): Remove unnecessary else.
4903
49042007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4905
4906 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4907 (lto_resolve_var_ref): Use proper types.
4908 (lto_resolve_fn_ref): Likewise.
4909 (lto_resolve_field_ref): Likewise.
4910
49112007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4912
4913 * lto-read.c (input_expr_operand): Remove case.
4914
49152007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4916
4917 * lto.c (lto_read_only_for_child_DIEs): New function.
4918 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4919 * lto-elf.c (lto_elf_map_lto_section): Remove.
4920 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4921 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4922 SSA_NAME. Add missing case for mechanical codes.
4923 (input_cfg): Use basic_block_info_for_function instead of
4924 basic_block_info.
4925
49262007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4927
4928 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4929 (input_list): Renamed input_tree_list and modified to follow same
4930 protocol as lto-function-out.c:output_tree_list.
4931 (input_expr_operand): Make asm operands use input_tree_list.
4932 (input_local_var): Now uses input_tree_list.
4933 (lto_read_body): Change placement for setting context of debug_labels.
4934
4935
49362007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4937
4938 * lto-read.c (input_real): Output debugging in proper order.
4939 (input_integer): Compute bit lengths properly.
4940 (input_list): Clean up declaration.
4941 (input_expr_operand): Change calls to input_real to match fix.
4942 Make reading of LTO_bit_field_ref1 match output.
4943 (input_local_var): Make reading of attributes match what is being
4944 written.
4945 (dump_debug_stream): Also print char in hex.
4946 (debug_out_fun): Fix signed unsigned mismatch.
4947
49482007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4949
4950 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4951 DW_AT_GNU_vector specially, as they are not contiguous with the
4952 specified set of attribute names. Use class_mask to check for
4953 errors at the end of the function
4954 (lto_resolve_var_ref): Read the DIE if it is not cached.
4955 (lto_resolve_fn_ref): Likewise.
4956 (lto_resolve_field_ref): Likewise.
4957
49582007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4959
4960 * lto.c: Include dwarf2out.h.
4961 (lto_cache_store_DIE): Assert that we never change the value.
4962 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4963 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4964 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4965 sensible type instead.
4966 (lto_read_structure_union_class_type_DIE): Store the newly
4967 created type prior to reading the members of the structure to
4968 avoid infinite recursion. Avoid computing types and alignments
4969 for structures whose sizes are unknown.
4970 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4971 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4972 DW_AT_const_value, and DW_AT_specification.
4973 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4974 Return early if we have already constructed the function type.
4975 (lto_read_typedef_DIE): Check to see if the type has been cached
4976 already. Cache the type before reading any children.
4977 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4978 (lto_read_DIE): Unset context->skip_non_parameters around reading
4979 the DIE.
4980 (lto_resolve_fn_ref): Delete trailing whitespace.
4981
49822007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4983
4984 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4985
49862007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4987
4988 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4989
49902007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4991
4992 * lto-lang.c (signed_and_unsigned_types): New variable.
4993 (lto_type_for_size): Consult signed_and_unsigned_types to find
4994 an approprite type, creating it if necessary.
4995 (lto_set_decl_assembler_name): Add actual method body.
4996
49972007-09-06 Jim Blandy <jimb@codesourcery.com>
4998
4999 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5000 can't find a var init for this variable, leave its DECL_INITIAL.
5001 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5002 lto_elf_map_fn_body.
5003 (lto_map_lto_section): New function.
5004 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5005 bodies, and lto_elf_map_optional_lto_section for variable
5006 initializers.
5007 (lto_elf_find_section_data): Quietly return NULL if the section is
5008 missing.
5009 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5010
5011 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5012
5013 * lto-read.c (lto_read_body): Doc fix.
5014
50152007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
5016
5017 * lto-read.c (fun_in): Renamed to data_in.
5018 (input_expr_operand, input_local_var, input_string_internal,
5019 input_string, input_real, input_list, get_label_decl,
5020 get_type_ref, input_expr_operand, input_globals, input_labels,
5021 input_local_vars_index, input_local_var, input_local_vars,
5022 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5023 (input_constructor): New function.
5024 (lto_read_function_body): Renamed to lto_read_body and generalized
5025 to handle both functions and constructors.
5026 (lto_read_function_body, lto_read_var_init): New function.
5027
5028
50292007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5030
5031 * lto-read.c (input_expr_operand): Assert that there really is a
5032 FUNCTION_DECL.
5033 (input_globals): Removed checks on 0 section.
5034
50352007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
5036
5037 * lto-read.c (fun_in): Added local_decls_index and
5038 local_decls_index_d.
5039 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5040 (input_globals): Enabled code to handle FIELD_DECLs.
5041 (input_local_vars_index, input_local_vars): New function.
5042 (input_local_var): Changed to allow locals to be input randomly.
5043 (lto_read_function_body): Added code to input the
5044 local_decls_index and to free various structures.
5045
50462007-08-17 Jim Blandy <jimb@codesourcery.com>
5047
5048 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5049 ATTRIBUTE_UNUSED from 'die' formal.
5050
5051 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5052 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5053 (input_list): Fix type of 'tag'.
5054 (input_expr_operand): Fix type of 'tag' argument. Update
5055 declaration. Fix type of 'ctag'. Add default case to switch,
5056 since the type of the switched value is now an enum.
5057 (input_local_vars): Fix type of 'tag'.
5058 (input_bb): Fix type of 'tag' argument.
5059 (input_function): Fix type of 'tag' argument.
5060
50612007-08-16 Jim Blandy <jimb@codesourcery.com>
5062
5063 * lto.c (lto_read_member_DIE): Record the tree we create in
5064 fd->die_cache. (Our 'die' argument is no longer unused.)
5065 (lto_resolve_field_ref): New function.
5066 * lto.h (lto_resolve_field_ref): New declaration.
5067
50682007-08-15 Jim Blandy <jimb@codesourcery.com>
5069
5070 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5071
50722007-08-07 Jim Blandy <jimb@codesourcery.com>
5073
5074 * lto.c (lto_read_form): Complete attr_classes table.
5075 (DWARF2_form_data): Doc fix.
5076
50772007-08-05 Mark Mitchell <mark@codesourcery.com>
5078
5079 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5080 and unmap_var_init.
5081 (lto_read_var_init): Declare.
5082 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5083 interface for reading variable initializers.
5084 * lto-elf.c (lto_elf_read_var_init): Remove.
5085 (lto_elf_file_vtable): Update initializer.
5086 (lto_elf_read_var_init): Add comment about unused-ness.
5087 * lto-read.c (lto_read_var_init): New.
5088
5089 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5090
50912007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
5092
5093 * lto-read.c (lto_read_function_body): Moved declaration of fn
5094 outside of ifdef.
5095
50962007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
5097
5098 * lto-read.c (input_uleb128, input_string_internal, input_real,
5099 input_integer, input_record_start, input_list, get_type_ref,
5100 input_flags, input_expr_operand, input_expr_operand,
5101 input_expr_operand, input_local_vars, input_cfg, input_phi,
5102 input_ssa_names, input_bb, input_function): Added semicolons.
5103
5104
51052007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5106
5107 * lto-read.c (input_globals): Remove debugging.
5108 (input_function): Set DECL_ARGUMENTS.
5109
5110
51112007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
5112
5113 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5114 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5115 (input_phi): Made work with operands other than SSA_NAMES and
5116 fixed processing of flags.
5117 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5118 (input_flags): New function.
5119 * lto-lang.c (lto_init): Changed state of in_lto_p.
5120
5121
51222007-07-24 Mark Mitchell <mark@codesourcery.com>
5123
5124 * lto-tree.h (lto_varargs_cookie): Remove.
5125 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5126 skip_non_parameters, skip_parameters.
5127 (lto_varargs_cookie): Remove.
5128 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5129 parameter types.
5130 (lto_read_abbrev): New function.
5131 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5132 child DIEs.
5133 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5134 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5135 (lto_file_read): Initialize new context fields.
5136 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5137 (lto_unsigned_type): Remove.
5138 (lto_signed_type): Likewise.
5139 (lto_signed_or_unsigned_type): Likewise.
5140 (lto_init): Do not create lto_varargs_cookie.
5141 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5142 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5143 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5144
51452007-07-19 Jan Hubicka <jh@suse.cz>
5146
5147 * lto-read.c (lto_read_function_body): Produce empty scope block
5148 to avoid crash.
5149
51502007-07-18 Mark Mitchell <mark@codesourcery.com>
5151
5152 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5153 process local variables.
5154 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5155
51562007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
5157
5158 * lto-read.c (input_list, input_expr_operand): Added struct
5159 function parameter.
5160 (init_cfg, finalize_cfg): Removed function.
5161 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5162 (input_labels, input_local_vars): Now takes input_block parameter rather than
5163 synthsyzing it.
5164 (input_cfg, input_phi, input_ssa_names): New functions.
5165 (input_bb): Now passes in input_blocks. Does not construct cfg
5166 and processes the list of phi functions.
5167 (input_function): Now builds both the cfg and ssa_names table.
5168 (lto_read_function_body): Processes new header fields to construct
5169 streams for the ssa_names and cfg and their debugging.
5170 * lto/lto-lang.c (lto_init): Set in_lto_p.
5171
5172
51732007-06-28 Mark Mitchell <mark@codesourcery.com>
5174
5175 * lto.h (lto_file_vtable): Add read_var_init.
5176 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5177 initializers.
5178 (lto_main): Remove bogus asserts.
5179 * lto-elf.c (tm.h): Include it.
5180 (libiberty.y): Likewise.
5181 (lto_elf_file): Add strtab and symtab. Rename
5182 string_table_section_index to sec_strtab.
5183 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5184 (lto_elf_get_shdr): New function.
5185 (lto_elf_free_shdr): Likewise.
5186 (lto_elf_find_section_data): Use them.
5187 (lto_elf_read_symtab): New function.
5188 (lto_elf_lookup_sym): Likewise.
5189 (lto_elf_free_sym): Likewise.
5190 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5191 (lto_elf_built_init): New function.
5192 (lto_elf_read_var_init): Likewise.
5193 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5194
51952007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
5196
5197 * lto-read (make_new_block): Initialize the stmt_list.
5198 (lto_static_init_local): Add debugging for missing codes.
5199
52002007-06-26 Mark Mitchell <mark@codesourcery.com>
5201
5202 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5203 unprototyped functions.
5204
52052007-06-23 Mark Mitchell <mark@codesourcery.com>
5206
5207 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5208 Handle DW_AT_MIPS_linkage_name.
5209 (lto_read_subroutine_type_subprogram): Likewise. Correct
5210 compilation errors.
5211 (lto_main): Remove incorrect assertions.
5212 * lto-symbtab.c: Build function types out of TREE_LISTs.
5213
5214 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5215
5216 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5217
52182007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
5219
5220 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5221 dummy since ggc does not like empty structs.
5222 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5223 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5224 expr->common to expr->base.
5225 (make_new_block): Moved stmt_list to proper place.
5226
5227
52282007-03-14 Robert Kennedy <jimbob@google.com>
5229
5230 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5231 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5232 assembler name from DWARF.
5233 * lto-lang.c (lto_set_decl_assembler_name) New function.
5234
52352006-09-10 Mark Mitchell <mark@codesourcery.com>
5236
5237 * lto.h (lto_file_vtable): New structure.
5238 (lto_file): Add vtable pointer.
5239 (lto_file_init): Add vtable paramter.
5240 (lto_read_function_body): New function.
5241 (lto_symtab_merge_fn): New function.
5242 * lto.c (lto_file_init): Add vtable parameter.
5243 (lto_read_form): Fill in entries for DW_AT_prototyped,
5244 DW_AT_frame_base.
5245 (lto_read_subroutine_type_subprogram_DIE): New function.
5246 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5247 DW_TAG_subprogram.
5248 * lto-elf.c (lto_elf_vile_vtable): New variable.
5249 (lto_elf_file_open): Pass it to lto_file_init.
5250 (lto_elf_map_fn_body): New function.
5251 (lto_elf_unmap_fn_body): Likewise.
5252 * lto-read.c: New file.
5253 * lto-symtab.c (lto_symtab_merge_fn): New function.
5254 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5255 tree_rest_of_compilation.
5256 * Make-lang.in (LTO_OBJS): Add lto-read.o
5257 (lto-read.o): New target.
5258
52592006-09-03 Mark Mitchell <mark@codesourcery.com>
5260
5261 * lto.c (<inttypes.h>): Don't include it.
5262 (lto_context): Don't typedef it.
5263 (lto_resolve_reference): New function.
5264 (lto_read_form): Use it.
5265 (lto_resolve_type_ref): New function.
5266 (lto_resolve_var_ref): Likewise.
5267 (lto_resolve_fn_ref): Likewise.
5268 * lto.h (<inttypes.h>): Include it.
5269 (lto_context): New type.
5270 (lto_ref): New structure.
5271 (lto_resolve_type_ref): Declare.
5272 (lto_resolve_var_ref): Likewise.
5273 (lto_resolve_fn_ref): Likewise.
5274
52752006-08-18 Mark Mitchell <mark@codesourcery.com>
5276
5277 * lang-specs.h: New file.
5278
52792006-08-14 Mark Mitchell <mark@codesourcery.com>
5280
5281 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5282 (lto_info_fd_close): Deallocate it.
5283 (lto_die_cache_entry): New structure.
5284 (lto_cache_hash): New function.
5285 (lto_cache_eq): Likewise.
5286 (lto_cache_store_DIE): Likewise.
5287 (lto_cache_lookup_DIE): Likewise.
5288 (lto_read_referenced_type_DIE): Use the cache.
5289 (lto_read_pointer_type_DIE): Robustify.
5290 (lto_read_DIE): Use the cache.
5291 * lto.h (hashtab.h): Include.
5292 (lto_info_fd): Add DIE cache.
5293 * Make-lang.in (LTO_H): New variable.
5294 (lto/lto-lang.o): Use LTO_H.
5295 (lto/lto-elf.o): Likewise.
5296 (lto/lto-symtab.o): Likewise.
5297
52982006-07-09 Mark Mitchell <mark@codesourcery.com>
5299
5300 * lto.c (lto_abi_mismatch_error): New function.
5301 (lto_abbrev_read): Initialize num_abbrevs.
5302 (lto_read_form): Specify allowed form classes for
5303 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5304 (lto_read_variable_formal_parameter_constant_DIE): Handle
5305 DW_AT_declaration. Call lto_symtab_merge_var.
5306 (lto_read_pointer_type_DIE): New function.
5307 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5308 not creat TYPE_DECLs for types that already have them.
5309 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5310 (lto_set_cu_context): Make cu_start point to the header, not the
5311 first DIE.
5312 (lto_file_read): Adjust for change to lto_set_cu_context.
5313 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5314 (lto/lto-symtab.o): New rule.
5315 * lto-tree.h (lang_identifier): Add decl field.
5316 (LANG_IDENTIFIER_CAST): New macro.
5317 (LTO_IDENTIFIER_DECL): Likewise.
5318 (lto_symtab_merge_var): Declare.
5319 * lto-symtab.c: New file.
5320
53212006-07-02 Daniel Berlin <dberlin@dberlin.org>
5322
5323 * lto.c (lto_context): Add current_cu and info_fd members.
5324 (DWARF2_CompUnit): New structure.
5325 (lto_read_DIE): Take lto_info_fd *.
5326 (lto_read_child_DIEs): Ditto.
5327 (lto_file_corrupt_error): Constify argument.
5328 (lto_set_cu_context): New function
5329 (lto_info_fd_init): Ditto.
5330 (lto_info_fd_close): Ditto.
5331 (lto_file_init): Use lto_info_fd_init.
5332 (lto_file_close): Use lto_info_fd_close.
5333 (lto_read_initial_length): Pass in pointer to header size.
5334 (lto_read_comp_unit_header): Correct cu_length to
5335 real length from beginning of header. Take lto_info_fd * as
5336 argument.
5337 (find_cu_for_offset): New function.
5338 (lto_read_form): Change first argument to lto_info_fd *.
5339 Add FORM_CONTEXT argument.
5340 Handle DW_FORM_ref_addr.
5341 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5342 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5343 Swap contexts if necessary for form.
5344 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5345 lto_file_corrupt_error.
5346 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5347 (lto_read_referenced_type_DIE): Change first argument to
5348 lto_info_fd *. Access lto_fd fields through base pointer.
5349 (lto_read_compile_unit_DIE): Change first argument to an
5350 lto_info_fd *.
5351 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5352 (lto_read_base_type_DIE): Ditto.
5353 (lto_read_child_DIEs): Ditto.
5354 (lto_read_DIE): Ditto. Change type of function pointer.
5355 (lto_info_read): New function.
5356 (lto_set_cu_context): Ditto.
5357 (lto_file_read): Use lto_info_read, walk resulting CU's
5358 (lto_main): Update for lto_info_fd change.
5359 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5360 necessary.
5361 * lto.h (DWARF2_CompUnit): New structure.
5362 (lto_info_fd): Ditto.
5363 (lto_file): Change debug_info to be an lto_info_fd.
5364
53652006-06-25 Mark Mitchell <mark@codesourcery.com>
5366
5367 * lto.c (toplev.h): Include it.
5368 (dwarf2.h): Likewise.
5369 (tree.h): Likewise.
5370 (tm.h): Likewise.
5371 (cgraph.h): Likewise.
5372 (ggc.h): Likewise.
5373 (inttypes.h): Likewise.
5374 (DWARF2_attr): New type.
5375 (DWARF2_abbrev): Likewise.
5376 (DWARF2_class): Likewise.
5377 (DWARF2_form_data): Likewise.
5378 (lto_context): Likewise.
5379 (lto_fd_init): New function.
5380 (lto_abbrev_fd_init): Likewise.
5381 (lto_abbrev_fd_close): Likewise.
5382 (lto_file_init): Use them.
5383 (lto_file_close): New function.
5384 (lto_file_corrupt_error): Likewise.
5385 (LTO_CHECK_INT_VAL): New macro.
5386 (lto_check_size_t_val): New function.
5387 (lto_check_int_val): Likewise.
5388 (LTO_READ_TYPE): New macro.
5389 (lto_read_ubyte): New function.
5390 (lto_read_uhalf): Likewise.
5391 (lto_read_uword): Likewise.
5392 (lto_read_uleb128): Likewise.
5393 (lto_read_initial_length): Likewise.
5394 (lto_abbrev_read_attrs): Likewise.
5395 (lto_abbrev_read): Likewise.
5396 (lto_abbrev_lookup): Likewise.
5397 (lto_read_section_offset): Likewise.
5398 (lto_read_comp_unit_header): Likewise.
5399 (lto_read_form): Likewise.
5400 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5401 (LTO_BEGIN_READ_ATTRS): Likewise.
5402 (LTO_END_READ_ATTRS): Likewise.
5403 (lto_unsupported_attr_error): New function.
5404 (lto_get_identifier): Likewise.
5405 (lto_read_referenced_type_DIE): Likewise.
5406 (lto_read_compile_unit_DIE): Likewise.
5407 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5408 (lto_read_base_type_DIE): Likewise.
5409 (lto_read_DIE): Likewise.
5410 (lto_read_child_DIEs): Likewise.
5411 (lto_file_read): Read DIEs.
5412 (lto_main): Ask middle end to emit entities.
5413 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5414 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5415 (lto_elf_file_close): Likewise.
5416 * lto.h (lto_file): Declare.
5417 (DWARF2_abbrev): Likewise.
5418 (lto_fd): New type.
5419 (lto_abbrev_fd): Likewise.
5420 (lto_file): Use new types.
5421 (lto_file_close): Declare.
5422 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5423
54242006-06-18 Mark Mitchell <mark@codesourcery.com>
5425
5426 * lto.h: New file.
5427 * lto.c: New file.
5428 * lto-elf.c: New file.
5429 * lto-lang.c (flags.h): Include it.
5430 (lto.h): Likewise.
5431 (lto_init): New function.
5432 (lto_write_globals): Remove.
5433 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5434 (LANG_HOOKS_INIT): Define.
5435 (LANG_HOOKS_PARSE_FILE): Likewise.
5436 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5437 (LTO_EXE): Link with libelf.
5438 (lto/lto-lang.o): Update dependencies.
5439 (lto/lto.o): New target.
5440 (lto/lto-elf.o): Likewise.
5441
54422006-06-12 Mark Mitchell <mark@codesourcery.com>
5443
5444 * config-lang.in: New file.
5445 * Make-lang.in: Likewise.
5446 * lto-tree.h: Likewise.
5447 * lto-lang.c: Likewise.
818ab71a
JJ
5448\f
5449Copyright (C) 2006-2016 Free Software Foundation, Inc.
d7f09764 5450
818ab71a
JJ
5451Copying and distribution of this file, with or without modification,
5452are permitted in any medium without royalty provided the copyright
5453notice and this notice are preserved.