]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check that nonconst...
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
27d020cf
JH
12017-05-22 Jan Hubicka <hubicka@ucw.cz>
2
3 * lto.c: Replace ipa-inline.h by ipa-fnsummary.h
4 * lto-partition.c: Replace ipa-inline.h by ipa-fnsummary.h
5
815d9cc6
XR
62017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
7
8 PR c++/80038
9 * lto-lang.c (lto_init): Set in_lto_p earlier.
10
350792ff
RB
112017-04-12 Richard Biener <rguenther@suse.de>
12 Bernd Edlinger <bernd.edlinger@hotmail.de>
13
14 PR middle-end/79671
15 * lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
16
4a44a5f3
ML
172017-02-14 Martin Liska <mliska@suse.cz>
18
19 * lto.c (do_stream_out): Free LTO file filename string.
20
8a3a6ab4
DM
212017-01-19 David Malcolm <dmalcolm@redhat.com>
22
23 * lto-lang.c (builtin_type_for_size): Convert call to
24 lto_type_for_size to one through the langhook.
25 (lto_type_for_size): Move to langhooks.c and rename to
26 lhd_type_for_size.
27 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
28
4c4b4703
JJ
292017-01-11 Jakub Jelinek <jakub@redhat.com>
30
31 PR middle-end/50199
32 * lto-lang.c (lto_post_options): Force flag_merge_constants = 1
33 if it was 0.
34
bd2c6270
JJ
352017-01-09 Jakub Jelinek <jakub@redhat.com>
36
37 PR translation/79019
38 PR translation/79020
39 * lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
40
24d3f325
NS
412017-01-06 Nathan Sidwell <nathan@acm.org>
42
5406184c
NS
43 * lto-partition.c (promote_symbol): Write to dump file sooner,
44 include alias promoting too.
45
24d3f325
NS
46 * lto-partition.c (lto_balanced_map): Reformat/respell comment.
47 (may_need_named_section_p): Likewise.
48 (rename_statics): Likewise.
49 (lto_promote_cross_file_statics): Likewise.
50
cbe34bb5
JJ
512017-01-01 Jakub Jelinek <jakub@redhat.com>
52
53 Update copyright years.
54
6c8bf066
GJL
552016-11-30 Georg-Johann Lay <avr@gjlay.de>
56
57 PR lto/78562
58 * lto-symtab.c (lto_symtab_merge_decls_2): Don't diagnose type
59 mismatch if the two types are built-in.
60
7fa6a965
PK
612016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
62
63 * lto-lang.c (lto_init): Remove initialization of ptrdiff_type_node.
64
efb71232
RB
652016-11-23 Richard Biener <rguenther@suse.de>
66
67 PR lto/78472
68 * lto.c (hash_canonical_type): Ignore zero-sized fields.
69
48330c93
BE
702016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
71
72 PR c++/71973
73 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
74
899ca90e 752016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
76 Alan Hayward <alan.hayward@arm.com>
77 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
78
79 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
80
65179585
RB
812016-10-31 Richard Biener <rguenther@suse.de>
82
83 PR lto/78129
84 * lto.c (do_whole_program_analysis): Bail out after errors
85 from WPA analysis.
86
8bc5448f
KV
872016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
88
89 * lto-partition.c: Include tree-vrp.h.
90 * lto.c: Likewise.
91
68317985
RB
922016-09-20 Richard Biener <rguenther@suse.de>
93
94 * lto.c (lto_main): Call early_finish with "<artificial>" as
95 filename.
96
321e76fb
RB
972016-09-19 Richard Biener <rguenther@suse.de>
98
99 * lto.c (lto_main): Invoke early_finish debug hook.
100
ea6e17d5
RB
1012016-07-25 Richard Biener <rguenther@suse.de>
102
103 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
104 (unify_scc): Likewise.
105 (lto_read_decls): Likewise.
106
e9ac1f86
JJ
1072016-06-28 Jakub Jelinek <jakub@redhat.com>
108
109 * Make-lang.in: Don't cat ../stage_current if it does not exist.
110
277d7ee0
AK
1112016-06-23 Andi Kleen <ak@linux.intel.com>
112
113 * Make-lang.in: Add support for autofdo (disabled for now)
114
4d926e34
MS
1152016-06-10 Martin Sebor <msebor@redhat.com>
116
117 PR c/71392
118 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
119 attribute in type-generic builtins.
120
479f99c9
JH
1212016-05-16 Jan Hubicka <hubicka@ucw.cz>
122
123 * lto-partition.c (add_symbol_to_partition_1): Likewise.
124
1a0bf5e1
JH
1252016-05-03 Jan Hubicka <hubicka@ucw.cz>
126
127 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
128
a2e76867
PK
1292016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
130
131 * lto-partition.h (lto_balanced_map): New parameter.
132 * lto-partition.c (lto_balanced_map): New parameter
133 max_partition_size.
134 Check if partition size is greater than max_partition_size.
135 * lto.c (do_whole_program_analysis): Adjust calls to
136 lto_balanced_map() to pass 2nd argument.
137
ea913779
L
1382016-03-17 H.J. Lu <hongjiu.lu@intel.com>
139
140 PR lto/70258
141 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
142 PIE.
143
56aae4b7
JJ
1442016-03-08 Jakub Jelinek <jakub@redhat.com>
145
146 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
147 - becuase -> because.
148
ed5d948d
TV
1492016-02-15 Tom de Vries <tom@codesourcery.com>
150
151 PR lto/69655
152 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
153 argument.
154
4ecbadc7
ML
1552016-01-27 Martin Liska <mliska@suse.cz>
156
157 * lto-partition.c (add_symbol_to_partition_1): Remove usage
158 of hsa_summaries.
159
e49d321f
JH
1602016-01-19 Jan Hubicka <hubicka@ucw.cz>
161
162 PR lto/69136
163 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
164 decls have no assemblernames.
165
b2b40051
MJ
1662016-01-19 Martin Liska <mliska@suse.cz>
167 Martin Jambor <mjambor@suse.cz>
168
169 * lto-partition.c: Include "hsa.h"
170 (add_symbol_to_partition_1): Put hsa implementations into the
171 same partition as host implementations.
172
5803bd01
JH
1732016-01-12 Jan Hubicka <hubicka@ucw.cz>
174
175 PR lto/69003
176 * lto-partition.c (rename_statics): Fix pasto.
177
13092f61
RB
1782016-01-18 Richard Biener <rguenther@suse.de>
179
180 PR lto/69337
181 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
182 function vs. variable.
183
3c4e91c9
RB
1842016-01-12 Richard Biener <rguenther@suse.de>
185
186 PR lto/69077
187 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
188 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
189
818ab71a
JJ
1902016-01-04 Jakub Jelinek <jakub@redhat.com>
191
192 Update copyright years.
193
3fddb2ef
JH
1942015-12-10 Jan Hubicka <hubicka@ucw.cz>
195
196 PR lto/68878
197 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
198 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
199 (lto_symtab_prevailing_decl): Use it.
200
4a38b02b
IV
2012015-12-15 Ilya Verbin <ilya.verbin@intel.com>
202
203 * lto.c: Include stringpool.h and fold-const.h.
204 (offload_handle_link_vars): New static function.
205 (lto_main): Call offload_handle_link_vars.
206
ca834876
JH
2072015-12-10 Jan Hubicka <hubicka@ucw.cz>
208
209 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
210
958a627f
JH
2112015-12-11 Jan Hubicka <hubicka@ucw.cz>
212
213 PR ipa/61886
214 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
215 values of error and warning attributes.
216
da20571a
JH
2172015-12-08 Jan Hubicka <hubicka@ucw.cz>
218
219 PR lto/68811
220 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
221 DECL.
222 (LTO_NO_PREVAIL): Use gcc_checking_assert.
223
378004b9
JH
2242015-12-08 Jan Hubicka <hubicka@ucw.cz>
225
226 PR lto/68811
227 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
228 by itself.
229
6b9ac179
JH
2302015-12-08 Jan Hubicka <hubicka@ucw.cz>
231
232 PR ipa/61886
233 * lto-symtab.c: Include lto-symtab.h.
234 (lto_cgraph_replace_node): Do not merge profiles here.
235 (lto_symtab_merge_p): New function.
236 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
237 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
238 aliases.
239 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
240 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
241 * lto.c: Include lto-symtab.h
242 * lto-symtab.h: New.
243
41c60c6c
JH
2442015-12-08 Jan Hubicka <hubicka@ucw.cz>
245
246 PR ipa/61886
247 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
248 are not part of the definition.
249 (contained_in_symbol): Likewise.
250 (promote_symbol): When promoting a symbol also promote all transparent
251 aliases.
252 (rename_statics): Weakref needs unique name, too.
253
71e54687
JH
2542015-12-07 Jan Hubicka <hubicka@ucw.cz>
255
256 PR ipa/61886
257 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
258 rename_statics, rename_statics): Handle transparent aliases.
259
88636b62
JH
2602015-12-04 Jan Hubicka <hubicka@ucw.cz>
261
262 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
263 merged_comdat.
264
8c86248e
JH
2652015-12-01 Jan Hubicka <hubicka@ucw.cz>
266
267 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
268
1ff9ed6f
JH
2692015-11-25 Jan Hubicka <jh@suse.cz>
270
271 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
272 * lang.opt (lto_linker_output): New enum.
273 (flinker_output): New flag.
274
22bea0be
JH
2752015-11-24 Jan Hubicka <hubicka@ucw.cz>
276
277 * lto-symtab.c: Include alias.h
278 (warn_type_compatibility_p): Replace types_compatible_p checks by
279 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
280 (lto_symtab_merge): Compare DECL sizes.
281 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
282
aea50b45
JH
2832015-11-24 Jan Hubicka <hubicka@ucw.cz>
284
285 * lto.c (iterative_hash_canonical_type): Recruse for all types
286 which pass !canonical_type_used_p.
287 (gimple_register_canonical_type_1): Sanity check we do not compute
288 canonical type of anything with !canonical_type_used_p.
289 (gimple_register_canonical_type): Skip all types that are
290 !canonical_type_used_p
291
deb3dae6
JH
2922015-11-24 Jan Hubicka <hubicka@ucw.cz>
293
294 * lto.c (unify_scc): Use free_node.
295
f85d2487
JH
2962015-11-21 Jan Hubicka <hubicka@ucw.cz>
297
298 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
299 (gimple_register_canonical_type_1): Check that pointers do not get
300 canonical types.
301 (gimple_register_canonical_type): Do not register pointers.
302
3032015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
304
305 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
306 flag for types that are not ODR; fix loop walking parameters.
307
69f293c9
AM
3082015-11-11 Andrew MacLeod <amacleod@redhat.com>
309
310 * lto-lang.c: Remove unused header files.
311 * lto-object.c: Likewise.
312 * lto-partition.c: Likewise.
313 * lto-symtab.c: Likewise.
314 * lto.c: Likewise.
315
ee45a32d
EB
3162015-11-08 Eric Botcazou <ebotcazou@adacore.com>
317
318 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
319
0aad0198
RS
3202015-11-07 Richard Sandiford <richard.sandiford@arm.com>
321
322 * lto-lang.c: Don't undef DEF_BUILTIN.
323
2adfab87
AM
3242015-10-29 Andrew MacLeod <amacleod@redhat.com>
325
326 * lto-lang.c: Reorder #include's and remove duplicates.
327 * lto-object.c: Likewise.
328 * lto-partition.c: Likewise.
329 * lto-symtab.c: Likewise.
330 * lto.c: Likewise.
331
b2b29377
MM
3322015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
333
334 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
335 conditionals.
336 (lto_fixup_state): Likewise.
337 (do_whole_program_analysis): Use
338 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
339 conditionals.
340
d9a6bd32
JJ
3412015-10-13 Jakub Jelinek <jakub@redhat.com>
342
343 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
344 DEF_FUNCTION_TYPE_11): Define.
345
9c4eeafc
JH
3462015-10-10 Jan Hubicka <hubicka@ucw.cz>
347
348 * lto.c (hash_canonical_type): Honor
349 type_with_interoperable_signedness.
350
3e32ee19
NS
3512015-09-28 Nathan Sidwell <nathan@codesourcery.com>
352
353 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
354 (DEF_FUNCTION_TYPE_VAR_11): Delete.
355
f196d062
RB
3562015-08-31 Richard Biener <rguenther@suse.de>
357
358 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
359 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
360 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
361 participate in merging with something else.
362
45aee888
RB
3632015-08-31 Richard Biener <rguenther@suse.de>
364
365 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
366 test, do not replace a non-builtin with a builtin.
367 * lto.c (compare_tree_sccs_1): Do not merge things we stream
368 as builtins vs. non-builtins.
369
a79683d5
TS
3702015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
371
372 * lto.h: Remove useless typedefs.
373
48d859bb
AM
3742015-07-15 Andrew MacLeod <amacleod@redhat.com>
375
376 * lto.c: Remove redundant includes.
377
026c3cfd
AH
3782015-07-12 Aldy Hernandez <aldyh@redhat.com>
379
380 * lto-lang.c: Fix double word typos.
381
9fdcd34e
AM
3822015-07-10 Andrew MacLeod <amacleod@redhat.com>
383
384 * lto.c: Include cfghooks.h rather than predict.h.
385
f51ade33
AM
3862015-07-09 Andrew MacLeod <amacleod@redhat.com>
387
388 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
389 lto-streamer.h.
390 * lto-object.c: Likewise.
391 * lto-partition.c: Likewise.
392 * lto-symtab.c: Likewise.
393
1916bcb5
AM
3942015-07-09 Andrew MacLeod <amacleod@redhat.com>
395
396 * lto-lang.c: Adjust includes for flags.h changes.
397
c7131fb2
AM
3982015-07-07 Andrew MacLeod <amacleod@redhat.com>
399
400 * lto-lang.c: Adjust includes.
401 * lto-object.c: Likewise.
402 * lto-partition.c: Likewise.
403 * lto-symtab.c: Likewise.
404 * lto.c: Likewise.
405
f0889939
AM
4062015-06-25 Andrew MacLeod <amacleod@redhat.com>
407
408 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
409 * lto-object.c: Likewise.
410 * lto-partition.c: Likewise.
411 * lto-symtab.c: Likewise.
412 * lto-tree.h: Likewise.
413 * lto.c: Likewise.
414
8d67ee55
RS
4152015-06-25 Richard Sandiford <richard.sandiford@arm.com>
416
417 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
418 than typed_noop_remove. Remove redudant typedefs.
419
abb226c9
AM
4202015-06-17 Andrew MacLeod <amacleod@redhat.com>
421
422 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
423 * lto-object.c: Likewise.
424 * lto-partition.c: Likewise.
425 * lto-symtab.c: Likewise.
426 * lto.c: Likewise.
427
351d90f4
JH
4282015-06-14 Jan Hubicka <hubicka@ucw.cz>
429
430 PR ipa/66181
431 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
432
44c42705
DD
4332015-06-12 DJ Delorie <dj@redhat.com>
434
435 * lto-lang.c (lto_type_for_size): Include intN types.
436 (lto_type_for_mode): Likewise.
437
64578d98
JH
4382015-06-08 Jan Hubicka <hubicka@ucw.cz>
439
440 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
441
13fdf2e2
AM
4422015-06-08 Andrew MacLeod <amacleod@redhat.com>
443
444 * lto-lang.c : Adjust include files.
445 * lto-object.c : Likewise.
446 * lto-partition.c : Likewise.
447 * lto-partition.h : Likewise.
448 * lto-symtab.c : Likewise.
449 * lto.c : Likewise.
450 * lto.h : Likewise.
451
ccb5ad37
JH
4522015-06-06 Jan Hubicka <hubicka@ucw.cz>
453
6542950e
JH
454 PR lto/65378
455 * lto-symtab.c (warn_type_compatibility_p): Fix call of
456 odr_or_derived_type_p.
457 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
458
4592015-06-08 Jan Hubicka <hubicka@ucw.cz>
460
461
ccb5ad37
JH
462 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
463 pointers.
464
d7438551
AH
4652015-06-05 Aldy Hernandez <aldyh@redhat.com>
466
467 * lto-lang.c (lto_write_globals): Remove.
468 (LANG_HOOKS_WRITE_GLOBALS): Same.
469
ecb9f223
AM
4702015-06-04 Andrew MacLeod <amacleod@redhat.com>
471
472 * lto-lang.c: Adjust includes for restructured coretypes.h.
473 * lto-object.c: Likewise.
474 * lto-partition.c: Likewise.
475 * lto-symtab.c: Likewise.
476 * lto.c: Likewise.
477
9cb9b937
JH
4782015-06-04 Jan Hubicka <hubicka@ucw.cz>
479
480 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
481
93e2aa6d
JH
4822015-06-03 Jan Hubicka <hubicka@ucw.cz>
483
484 * lto.c (iterative_hash_canonical_type,
485 gimple_register_canonical_type): only hash main variants of types
486
faae53f8
ML
4872015-05-27 Martin Liska <mliska@suse.cz>
488
489 * lto-partition.c (new_partition): Reset number of symbols.
490 (add_symbol_to_partition_1): Increment number of symbols.
491 (undo_partition): Decrement number of symbols.
492 (lto_balanced_map): Dump number of symbols and insns that
493 belong to a partition.
494 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
495
b727ba74
JH
4962015-05-22 Jan Hubicka <hubicka@ucw.cz>
497
498 * lto.c (hash_canonical_type): Be sure we hash only types that
499 need alias set.
500 (gimple_register_canonical_type_1): Do not produce canonical
501 types for types that do not need alias sets.
502
1d1218fb
JH
5032015-05-22 Jan Hubicka <hubicka@ucw.cz>
504
505 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
506
872d5034
JH
5072015-05-19 Jan Hubicka <hubicka@ucw.cz>
508
509 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
510
259d29e3
JH
5112015-05-17 Jan Hubicka <hubicka@ucw.cz>
512
513 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
514 compare ODR types (if available) and function types.
515 (lto_symtab_merge): ... here; output ODR violation warnings
516 and call warn_types_mismatch.
517
b0845a1e
JH
5182015-04-29 Jan Hubicka <hubicka@ucw.cz>
519
520 * lto.c (lto_fixup_state): Call verify_type.
521
67f58944
TS
5222015-04-18 Trevor Saunders <tsaunders@mozilla.com>
523
b0845a1e 524 * lto.c: Adjust for hash_table changes.
67f58944 525
36ceb0e3
JH
5262015-03-27 Jan Hubicka <hubicka@ucw.cz>
527
528 * lto.c (lto_read_decls): Move code registering odr types out
529 of TYPE_CANONICAL conditional and also register polymorphic types.
530
afd1e7c6
JH
5312015-03-26 Jan Hubicka <hubicka@ucw.cz>
532
533 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
534 DECL_ARTIFICAL symbols.
535
eaeec5ec
JH
5362015-03-26 Jan Hubicka <hubicka@ucw.cz>
537
538 PR lto/65536
539 * lto.c (unify_scc): Revert location cache when unification
540 suceeded.
541 (lto_read_decls): Accept location cache after sucess;
542 apply location cache before calling debug hooks.
543
1c4db829
JH
5442015-03-10 Jan Hubicka <hubicka@ucw.cz>
545
546 * lto.c (read_cgraph_and_symbols): Do not do merging
547 at ltrans stage.
548
db847fa8
JJ
5492015-02-26 Jakub Jelinek <jakub@redhat.com>
550
551 * lto.c (lto_mode_identity_table): New variable.
552 (lto_read_decls): Add mode_table argument to the lto_input_block
553 constructor.
554 (lto_file_finalize): Initialize mode_table.
555 (lto_init): Initialize lto_mode_identity_table.
556
56a9f6bc
TS
5572015-02-24 Thomas Schwinge <thomas@codesourcery.com>
558
559 PR libgomp/64625
560 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
561 Remove macros.
562 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
563
ebc8f0bb
JH
5642015-02-03 Jan Hubicka <hubicka@ucw.cz>
565
566 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
567
40fecdd6
JM
5682015-01-30 Joseph Myers <joseph@codesourcery.com>
569
570 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
571 changed to pass input_location as first argument.
572
040968a8
JH
5732014-12-11 Jan Hubicka <hubicka@ucw.cz>
574
575 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
576
69fe4502
JH
5772014-12-11 Jan Hubicka <hubicka@ucw.cz>
578
579 * lto.c (compare_tree_sccs_1): Add comparsion of
580 DECL_FUNCTION_SPECIFIC_TARGET
581
41dbbb37
TS
5822015-01-15 Thomas Schwinge <thomas@codesourcery.com>
583 James Norris <jnorris@codesourcery.com>
584
585 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
586 New macros.
587 * lto.c: Include "gomp-constants.h".
588
837bac8c
IV
5892015-01-14 Ilya Verbin <ilya.verbin@intel.com>
590
591 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
592 from select_what_to_stream.
593
1b34e6e2
BS
5942015-01-09 Bernd Schmidt <bernds@codesourcery.com>
595 Jakub Jelinek <jakub@redhat.com>
596
597 PR middle-end/64412
598 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
599 if ACCEL_COMPILER.
600
adfac8df
JJ
6012015-01-09 Michael Collison <michael.collison@linaro.org>
602
603 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
604 input.h, alias.h, symtab.h, options, fold-const.h,
605 wide-int.h, and inchash.h due to flattening of tree.h.
606 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
607 input.h, alias.h, symtab.h, fold-const.h,
608 wide-int.h, and inchash.h due to flattening of tree.h.
609 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
610 input.h, alias.h, symtab.h, options, fold-const.h,
611 wide-int.h, and inchash.h due to flattening of tree.h.
612 * lto-partition.c: Ditto.
613 * lto-symtab.c: Ditto.
614
5624e564
JJ
6152015-01-05 Jakub Jelinek <jakub@redhat.com>
616
617 Update copyright years.
618
9a1e784a
ML
6192014-12-22 Martin Liska <mliska@suse.cz>
620
621 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
622 is used.
623 (undo_partition): Likewise.
624 (lto_balanced_map): Likewise.
625
dd912cb8
ML
6262014-12-22 Martin Liska <mliska@suse.cz>
627
628 * lto-partition.c: Include of symbol-summary.h is added.
629 * lto-symtab.c: Likewise.
630 * lto.c: Likewise.
631
17e0fc92
JH
6322014-12-11 Jan Hubicka <hubicka@ucw.cz>
633
634 PR ipa/61324
635 * lto.c (read_cgraph_and_symbols): Update call of
636 remove_unreachable_nodes.
637 (do_whole_program_analysis): Remove call of
638 symtab->remove_unreachable_nodes
639
58dddbd2
TS
6402014-12-08 Trevor Saunders <tsaunders@mozilla.com>
641
642 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
643 htab with malloc instead of ggc.
644
907dadbd
TS
6452014-11-20 Trevor Saunders <tsaunders@mozilla.com>
646
647 * lto.c: Replace htab with hash_table.
648
9c71e9df
TS
6492014-11-20 Trevor Saunders <tsaunders@mozilla.com>
650
651 * lto.c (lto_read_in_decl_state): Adjust.
652 (lto_fixup_state): Likewise.
653
72a4a8b0
JH
6542014-11-17 Jan Hubicka <hubicka@ucw.cz>
655
656 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
657
54e774c0
JH
6582014-11-14 Jan Hubicka <hubicka@ucw.cz>
659
660 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
661
1f6be682
IV
6622014-11-13 Ilya Verbin <ilya.verbin@intel.com>
663 Bernd Schmidt <bernds@codesourcery.com>
664 Andrey Turetskiy <andrey.turetskiy@intel.com>
665 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
666
ec6fe917
IV
667 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
668
6692014-11-13 Ilya Verbin <ilya.verbin@intel.com>
670 Ilya Tocar <ilya.tocar@intel.com>
671 Andrey Turetskiy <andrey.turetskiy@intel.com>
672 Bernd Schmidt <bernds@codesourcery.com>
673
1f6be682
IV
674 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
675 LTO_SECTION_NAME_PREFIX.
676 * lto-partition.c (lto_promote_cross_file_statics): Call
677 select_what_to_stream.
678 * lto.c (lto_section_with_id): Use section_name_prefix instead of
679 LTO_SECTION_NAME_PREFIX.
680 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
681 being built as an offload compiler.
682
ef4bddc2
RS
6832014-10-29 Richard Sandiford <richard.sandiford@arm.com>
684
685 * lto-lang.c: Remove redundant enum from machine_mode.
686
c582198b
AM
6872014-10-28 Andrew MacLeod <amacleod@redhat.com>
688
689 * lto.c: Adjust include files.
690 * lto-lang.c: Ditto.
691 * lto-object.c: Ditto.
692 * lto-partition.c: Ditto.
693 * lto-symtab.c: Ditto.
694
60393bbc
AM
6952014-10-27 Andrew MacLeod <amacleod@redhat.com>
696
697 * lto-lang.c: Adjust include files.
698 * lto-object.c: Ditto.
699 * lto-partition.c: Ditto.
700 * lto-symtab.c: Ditto.
701 * lto.c: Ditto.
702
957f47e6
DD
7032014-10-16 DJ Delorie <dj@redhat.com>
704
705 * lto-object.c (lto_obj_begin_section): In the event that pointer
706 sizes aren't powers of two, choose a more suitable alignment
707 than (unsigned)(-1).
708
78a7c317
DD
7092014-10-14 DJ Delorie <dj@redhat.com>
710
711 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
712 size-type as well.
713 (lto_init): Initialize all intN types, not just int128.
714
70261a4f
ML
7152014-10-06 Martin Liska <mliska@suse.cz>
716
717 * lto.c (stream_out): ARG_UNUSED added for last argument.
718
00de328a
AH
7192014-09-24 Aldy Hernandez <aldyh@redhat.com>
720
721 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
722 DECL_ABSTRACT_P.
723
7861b648
AK
7242014-09-23 Andi Kleen <ak@linux.intel.com>
725
726 * lto-partition.c (node_cmp): Update comment.
727 (varpool_node_cmp): Use symtab_node for comparison.
728 (add_sorted_nodes): New function.
729 (lto_balanced_map): Change to keep ordered queue
730 of ordered node. Handle no_reorder attribute.
731
1ee85ee1
JH
7322014-09-11 Jan Hubicka <hubicka@ucw.cz>
733
734 * lto.c (lto_read_decls): Register ODR types.
735
8605403e
JH
7362014-08-20 Jan Hubicka <hubicka@ucw.cz>
737
738 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
739 call.
740 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
741
56b1f114
JH
7422014-08-14 Jan Hubicka <hubicka@ucw.cz>
743
744 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
745
833f94c0
RB
7462014-08-14 Richard Biener <rguenther@suse.de>
747
748 PR lto/62067
749 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
750
207c68cd
RB
7512014-08-08 Richard Biener <rguenther@suse.de>
752
753 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
754
7c581d61
BC
7552014-08-08 Bin Cheng <bin.cheng@arm.com>
756
757 PR lto/62032
758 * lto-lang.c (lto_init): Switch mis-matched arguments.
759
39c8aaa4
TS
7602014-08-07 Trevor Saunders <tsaunders@mozilla.com>
761
762 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
763
6e2830c3
TS
7642014-08-02 Trevor Saunders <tsaunders@mozilla.com>
765
766 * lto-partition.c, lto-partition.h: Use hash_set instead of
767 pointer_set.
768
50de5793
AK
7692014-07-31 Andi Kleen <ak@linux.intel.com>
770
771 * lto.c (hash_canonical_type): Use inchash::hash
772 and use inchash::add_expr.
773 (iterative_hash_canonical_type): Dito.
774
f6bcdb5e
RB
7752014-07-30 Richard Biener <rguenther@suse.de>
776
777 * lto-streamer.h (lto_write_data): New function.
778 * langhooks.c (lhd_append_data): Do not free block.
779 * lto-section-out.c (lto_write_data): New function writing
780 raw data to the current section.
781 (lto_write_stream): Adjust for langhook semantic change.
782 (lto_destroy_simple_output_block): Write header directly.
783 * lto-opts.c (lto_write_options): Write options directly.
784 * lto-streamer-out.c (produce_asm): Write heaeder directly.
785 (lto_output_toplevel_asms): Likewise.
786 (copy_function_or_variable): Copy data directly.
787 (write_global_references): Output index table directly.
788 (lto_output_decl_state_refs): Likewise.
789 (write_symbol): Write data directly.
790 (produce_symtab): Adjust.
791 (produce_asm_for_decls): Output header and refs directly.
792
56fdfd3e
AK
7932014-07-25 Andi Kleen <ak@linux.intel.com>
794
795 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
796
0bd8bb04
AK
7972014-07-25 Andi Kleen <ak@linux.intel.com>
798
799 * lto.c (hash_canonical_type): Convert to inchash.
800 (iterative_hash_canonical_type): Dito.
801
6d8eb96b
AK
8022014-07-25 Andi Kleen <ak@linux.intel.com>
803
804 * lto.c: Include inchash.h
805
ad115a3c
JH
8062014-07-14 Jan Hubicka <hubicka@ucw.cz>
807
808 * lto.c (mentions_vars_p_decl_non_common): Skip
809 DECL_ARGUMENT_FLD.
810 mentions_vars_p_function): Do DECL_ARGUMENTS.
811 (lto_fixup_prevailing_decls): Update.
812
917dd9bf
JH
8132014-07-12 Jan Hubicka <hubicka@ucw.cz>
814
815 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
816 timevar
817 (materialize_cgraph): Do not push GIMPLE_IN timevar.
818
0b83e688
JH
8192014-07-11 Jan Hubicka <hubicka@ucw.cz>
820
821 * lto-partition.c (add_references_to_partition): Use
822 varpool_ctor_useable_for_folding_p.
823 * lto.c (lto_read_in_decl_state): Update sanity check.
824
e55637b7
ML
8252014-07-01 Martin Liska <mliska@suse.cz>
826
827 IPA REF alias refactoring
828 * lto-partition.c (add_symbol_to_partition_1): Usage of
829 FOR_EACH_ALIAS added.
830
010f4e27
JH
8312014-06-28 Jan Hubicka <hubicka@ucw.cz>
832
833 Revert:
834 * lto.c (lto_copy_fields_not_streamed): New function.
835 (compare_tree_sccs_1): Do not compare fields shared in between type
836 and variant.
837 (lto_read_decls): Fixup types first before inserting into hash.
838
b82fe354
AP
8392014-06-28 Andrew Pinski <apinski@cavium.com>
840
841 * lto.c (lto_read_decls): Fix comment in comment.
842
288eeff7
JH
8432014-06-28 Jan Hubicka <hubicka@ucw.cz>
844
845 * lto.c (lto_copy_fields_not_streamed): New function.
846 (compare_tree_sccs_1): Do not compare fields shared in between type
847 and variant.
848 (lto_read_decls): Fixup types first before inserting into hash.
849
e01fa630
ML
8502014-06-25 Martin Liska <mliska@suse.cz>
851
852 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
853 used.
854 (add_symbol_to_partition_1): Likewise.
855 (lto_balanced_map): Likewise.
856 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
857
aaf8a23e
JH
8582014-06-24 Jan Hubicka <hubicka@ucw.cz>
859
860 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
861 (mentions_vars_p_function): ... here.
862 (compare_tree_sccs_1): Update VINDEX checks.
863 (lto_fixup_prevailing_decls): Likewise.
864
1eb68d2d
TS
8652014-06-24 Trevor Saunders <tsaunders@mozilla.com>
866
867 * lto.c (canonical_type_hash_cache): Use hash_map instead of
868 pointer_map.
869
c203e8a7
TS
8702014-06-24 Trevor Saunders <tsaunders@mozilla.com>
871
872 * lto.c: Adjust.
873
714c800f
JH
8742014-06-20 Jan Hubicka <hubicka@ucw.cz>
875
876 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
877
569b1784
JH
8782014-06-20 Jan Hubicka <hubicka@ucw.cz>
879
880 * lto.c (compare_tree_sccs_1): Do not compare priorities.
881
56363ffd
JH
8822014-06-15 Jan Hubicka <hubicka@ucw.cz>
883
884 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
885
e257a17c
JH
8862014-06-10 Jan Hubicka <hubicka@ucw.cz>
887
888 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
889 (do_whole_program_analysis): Use verify_symtab.
890
24d047a3
JH
8912014-06-07 Jan Hubicka <hubicka@ucw.cz>
892
893 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
894 lto_fixup_prevailing_decls): Skip section names.
895
9b2b7279
AM
8962014-06-02 Andrew MacLeod <amacleod@redhat.com>
897
898 * lto-symtab.c: Include builtins.h.
899
a9243bfc
RB
9002014-05-26 Richard Biener <rguenther@suse.de>
901
902 * lto.c (lto_parse_hex): Use int64_t.
903 (lto_resolution_read): Likewise.
904
fd1e9302
JH
9052014-05-23 Jan Hubicka <hubicka@ucw.cz>
906
907 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
908
aede2c10
JH
9092014-05-23 Jan Hubicka <hubicka@ucw.cz>
910
911 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
912 symtab pointer.
913 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
914
f6a7cffc
TS
9152014-05-22 Thomas Schwinge <thomas@codesourcery.com>
916
917 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
918 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
919 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
920
4000360e
BS
9212012-05-22 Bernd Schmidt <bernds@codesourcery.com>
922
923 * lto-object.c: Include "lto-section-names.h".
924 (LTO_SEGMENT_NAME): Don't define.
925 * lto.c: Include "lto-section-names.h".
926
b9559136
JH
9272014-05-17 Jan Hubicka <hubicka@ucw.cz>
928
929 PR lto/61012
930 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
931 mixed with variables.
932
766090c2
TS
9332014-05-17 Trevor Saunders <tsaunders@mozilla.com>
934
935 * lto-tree.h: Don't use variable_size gty attribute.
936 * lto.c (lto_read_in_decl_state): Adjust.
937 (create_subid_section_table): Likewise.
938 (lto_flatten_files): Likewise.
939 (read_cgraph_and_symbols): Likewise.
940
1d60af08
KZ
9412014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
942 Mike Stump <mikestump@comcast.net>
943 Richard Sandiford <rdsandiford@googlemail.com>
944
945 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
946 * lto-lang.c (get_nonnull_operand): Likewise.
947
22869a37
RB
9482014-04-28 Richard Biener <rguenther@suse.de>
949
950 PR middle-end/60092
951 * lto-lang.c: Define flag_isoc11.
952
7de90a6c
DM
9532014-04-23 David Malcolm <dmalcolm@redhat.com>
954
955 * lto-partition.c (add_references_to_partition): Update for
956 removal of implicit pointer from the is-a.h API.
957 (add_symbol_to_partition_1): Likewise.
958 (contained_in_symbol): Likewise.
959 (undo_partition): Likewise.
960 (lto_balanced_map): Likewise.
961 (promote_symbol): Likewise.
962 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
963 (lto_symtab_merge_symbols): Likewise.
964 * lto.c (lto_wpa_write_files): Likewise.
965
783dab6b
RB
9662014-04-15 Richard Biener <rguenther@suse.de>
967
968 * lto.c: Include params.h.
969 (do_whole_program_analysis): Switch on flag_lto_partition value,
970 add support for LTO_PARTITION_ONE.
971 * lto-partition.h (lto_balanced_map): Adjust.
972 * lto-partition.c (lto_balanced_map): Get number of desired
973 partitions as argument to support -flto-partition=one.
974
cb90235d
JH
9752014-04-14 Jan Hubicka <hubicka@ucw.cz>
976
977 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
978 tp_first_run.
979
bbe281da
JH
9802014-03-19 Jan Hubicka <hubicka@ucw.cz>
981
982 * lto.c: Include ipa-inline.h
983 (do_whole_program_analysis): Free inline summary after partitioning.
984
ce2f49b3
RB
9852014-03-19 Richard Biener <rguenther@suse.de>
986
987 PR middle-end/60553
988 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
989 instead of TREE_CHAIN as chain_next.
990
e41106fc
RB
9912014-03-19 Richard Biener <rguenther@suse.de>
992
993 * lto.c (lto_wpa_write_files): Move call to
994 lto_promote_cross_file_statics ...
995 (do_whole_program_analysis): ... here, into the partitioning
996 block. Do not ggc_collect after lto_wpa_write_files but
997 for a last time before it.
998
15df2655
JJ
9992014-03-19 Jakub Jelinek <jakub@redhat.com>
1000
1001 PR lto/60571
1002 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
1003 Fix formatting.
1004
415e2e6b
JJ
10052014-03-18 Jakub Jelinek <jakub@redhat.com>
1006
1007 PR sanitizer/60535
1008 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
1009 and complex_{float,{,long_}double}_type_node.
1010
f42c637e
PM
10112014-03-08 Paulo Matos <paulo@matos-sorge.com>
1012
415e2e6b
JJ
1013 * lto-lang.c (lto_init): Pass flag_short_double to
1014 build_common_tree_nodes.
f42c637e 1015
6dab804d
JH
10162014-02-14 Jan Hubicka <hubicka@ucw.cz>
1017
1018 PR lto/60295
1019 * lto.c (stream_out): Avoid parallel streaming with
1020 -flto=jobserver until we are able to throttle it down
1021 resonably.
1022
39434bce
JH
10232014-02-14 Jan Hubicka <hubicka@ucw.cz>
1024
1025 * lto-partition.c (add_symbol_to_partition_1,
1026 undo_partition, lto_balanced_map): Aliases have no
1027 defined size.
1028 (lto_balanced_map): Do not follow refering variables
1029 if they can be optimized out.
1030
1966fd99
RB
10312014-02-14 Richard Biener <rguenther@suse.de>
1032
1033 PR lto/60179
1034 * lto.c (compare_tree_sccs_1): Do not compare
1035 DECL_FUNCTION_SPECIFIC_TARGET.
1036 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
1037
283416b3
RB
10382014-02-12 Richard Biener <rguenther@suse.de>
1039
1040 PR lto/60060
1041 * lto-lang.c (lto_write_globals): Do not call
1042 wrapup_global_declarations or emit_debug_global_declarations
1043 but emit debug info for non-function scope variables
1044 directly.
1045
b7e85694
JH
10462014-02-06 Jan Hubicka <hubicka@ucw.cz>
1047
1048 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
1049
96451279
JH
10502014-02-06 Jan Hubicka <hubicka@ucw.cz>
1051
1052 PR ipa/59469
1053 * lto-partition.c (symbol_class): Move to cgraph.h
1054 (get_symbol_class): Move to symtab.c
1055 (add_references_to_partition, add_symbol_to_partition_1,
1056 lto_max_map, lto_1_to_1_map, lto_balanced_map,
1057 lto_promote_cross_file_statics): Update.
1058
f300e7b8
JH
10592014-02-05 Jan Hubicka <hubicka@ucw.cz>
1060
1061 * lto.c (lto_parallelism): New static var.
1062 (do_stream_out, wait_for_child, stream_out): New static functions.
1063 (lto_wpa_write_files): Add support for parallel streaming.
1064 (do_whole_program_analysis): Set parallelism.
1065 * lang.opt (fwpa): Add parameter.
1066 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1067 (lto_init): Update use of flag_wpa.
1068 * lto-streamer.h (asm_nodes_output): Declare.
1069
f0f91770
RB
10702014-02-05 Richard Biener <rguenther@suse.de>
1071
1072 * lto.h (lto_global_var_decls): Remove.
1073 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1074 (lto_write_globals): Do nothing in WPA stage, gather globals from
1075 the varpool here ...
1076 * lto.c (lto_main): ... not here.
1077 (materialize_cgraph): Do not call rest_of_decl_compilation
1078 on the empty lto_global_var_decls vector.
1079 (lto_global_var_decls): Remove.
1080
d665f8dd
JH
10812014-02-04 Jan Hubicka <hubicka@ucw.cz>
1082
1083 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1084 needs duplicating, not generic COMDAT.
1085
c39276b8
RB
10862014-02-04 Richard Biener <rguenther@suse.de>
1087
1088 PR lto/59723
1089 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1090 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1091
5f876ae7
JH
10922014-02-04 Jan Hubicka <hubicka@ucw.cz>
1093 Markus Trippelsdorf
1094
1095 PR ipa/59469
1096 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1097 merge force_output and forced_by_abi flags.
1098
b72271b9
BI
10992014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1100
1101 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1102 flag_cilkplus.
1103
63124c48
RB
11042014-01-09 Richard Biener <rguenther@suse.de>
1105
1106 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1107
d05b9920
RB
11082014-01-09 Richard Biener <rguenther@suse.de>
1109
1110 PR lto/45586
1111 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1112 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1113 (gimple_canonical_types_compatible_p): Do not compare them either.
1114
23a5b65a
RS
11152014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1116
1117 Update copyright years
1118
2c8326a5
OE
11192013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1120
1121 * lto.c: Remove struct tags when referring to class varpool_node.
1122 * lto-partition.c: Likewise.
1123 * lto-symtab.c: Likewise.
1124
e06f9964
JJ
11252013-11-29 Jakub Jelinek <jakub@redhat.com>
1126 Richard Biener <rguenther@suse.de>
1127
1128 PR lto/59326
1129 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1130
c193f58b
JJ
11312013-11-29 Jakub Jelinek <jakub@redhat.com>
1132
1133 PR lto/59326
1134 * lto.c (mentions_vars_p_omp_clause): New function.
1135 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1136 after return stmts.
1137
2fb9a547
AM
11382013-11-22 Andrew MacLeod <amacleod@redhat.com>
1139
1140 * lto.c: Add required include files from gimple.h.
1141 * lto-lang.c: Likewise
1142 * lto-object.c: Likewise
1143 * lto-partition.c: Likewise
1144 * lto-symtab.c: Likewise
1145
fec39fa6
TS
11462013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1147
1148 * lto-partition.c lto-symtab.c lto.c Adjust.
1149
d8a2d370
DN
11502013-11-14 Diego Novillo <dnovillo@google.com>
1151
1152 * lto-lang.c: Include stringpool.h.
1153 Include stor-layout.h.
1154 * lto-partition.c: Include gcc-symtab.h.
1155 * lto.c: Include stor-layout.h.
1156
5e20cdc9
DM
11572013-10-31 David Malcolm <dmalcolm@redhat.com>
1158
1159 Automated part of renaming of symtab_node_base to symtab_node.
1160
1161 Patch autogenerated by rename_symtab.py from
1162 https://github.com/davidmalcolm/gcc-refactoring-scripts
1163 revision 58bb219cc090b2f4516a9297d868c245495ee622
1164
1165 * lto-partition.c (add_symbol_to_partition): Rename
1166 symtab_node_base to symtab_node.
1167 (get_symbol_class): Likewise.
1168 (symbol_partitioned_p): Likewise.
1169 (add_references_to_partition): Likewise.
1170 (add_symbol_to_partition_1): Likewise.
1171 (contained_in_symbol): Likewise.
1172 (add_symbol_to_partition): Likewise.
1173 (lto_1_to_1_map): Likewise.
1174 (lto_max_map): Likewise.
1175 (lto_balanced_map): Likewise.
1176 (privatize_symbol_name): Likewise.
1177 (promote_symbol): Likewise.
1178 (may_need_named_section_p): Likewise.
1179 (rename_statics): Likewise.
1180 (lto_promote_statics_nonwpa): Likewise.
1181 * lto-symtab.c (lto_symtab_merge): Likewise.
1182 (lto_symtab_resolve_replaceable_p): Likewise.
1183 (lto_symtab_symbol_p): Likewise.
1184 (lto_symtab_resolve_can_prevail_p): Likewise.
1185 (lto_symtab_resolve_symbols): Likewise.
1186 (lto_symtab_merge_decls_2): Likewise.
1187 (lto_symtab_merge_decls_1): Likewise.
1188 (lto_symtab_merge_decls): Likewise.
1189 (lto_symtab_merge_symbols_1): Likewise.
1190 (lto_symtab_merge_symbols): Likewise.
1191 (lto_symtab_prevailing_decl): Likewise.
1192 * lto.c (lto_wpa_write_files): Likewise.
1193 (read_cgraph_and_symbols): Likewise.
1194 (do_whole_program_analysis): Likewise.
1195
378cd6b1
DM
11962013-10-30 David Malcolm <dmalcolm@redhat.com>
1197
1198 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1199 declarations onto multiple lines to make things easier for
1200 rename_symtab.py.
1201 (lto_symtab_merge_decls_1): Likewise.
1202 (lto_symtab_merge_symbols_1): Likewise.
1203
939b37da
BI
12042013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1205
1206 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1207 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1208 Plus is enabled.
1209
67348ccc
DM
12102013-10-29 David Malcolm <dmalcolm@redhat.com>
1211
1212 Patch autogenerated by refactor_symtab.py from
1213 https://github.com/davidmalcolm/gcc-refactoring-scripts
1214 revision 58bb219cc090b2f4516a9297d868c245495ee622
1215
1216 * lto-partition.c (lto_promote_cross_file_statics): Update for
1217 conversion of symtab types to a true class hierarchy.
1218 (rename_statics): Likewise.
1219 (promote_symbol): Likewise.
1220 (privatize_symbol_name): Likewise.
1221 (lto_balanced_map): Likewise.
1222 (varpool_node_cmp): Likewise.
1223 (node_cmp): Likewise.
1224 (lto_1_to_1_map): Likewise.
1225 (undo_partition): Likewise.
1226 (add_symbol_to_partition): Likewise.
1227 (contained_in_symbol): Likewise.
1228 (add_symbol_to_partition_1): Likewise.
1229 (add_references_to_partition): Likewise.
1230 (symbol_partitioned_p): Likewise.
1231 (get_symbol_class): Likewise.
1232 (lto_max_map): Likewise.
1233 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1234 (lto_symtab_merge_symbols): Likewise.
1235 (lto_symtab_merge_symbols_1): Likewise.
1236 (lto_symtab_merge_decls): Likewise.
1237 (lto_symtab_merge_decls_1): Likewise.
1238 (lto_symtab_merge_decls_2): Likewise.
1239 (lto_symtab_resolve_symbols): Likewise.
1240 (lto_symtab_resolve_can_prevail_p): Likewise.
1241 (lto_symtab_symbol_p): Likewise.
1242 (lto_symtab_resolve_replaceable_p): Likewise.
1243 (lto_symtab_merge): Likewise.
1244 (lto_varpool_replace_node): Likewise.
1245 (lto_cgraph_replace_node): Likewise.
1246 * lto.c (lto_main): Likewise.
1247 (do_whole_program_analysis): Likewise.
1248 (materialize_cgraph): Likewise.
1249 (read_cgraph_and_symbols): Likewise.
1250 (cmp_partitions_order): Likewise.
1251 (lto_materialize_function): Likewise.
1252 (has_analyzed_clone_p): Likewise.
1253
8e9055ae
AM
12542013-10-29 Andrew MacLeod <amacleod@redhat.com>
1255
1256 * lto/lto-object.c: Add gimple.h to include list.
1257 * lto/lto-partition.c: Likewise.
1258
377d9792
AM
12592013-10-18 Andrew MacLeod <amacleod@redhat.com>
1260
1261 * lto.c: Remove tree-flow.h from include list.
1262
fffda8d7
RB
12632013-10-15 Richard Biener <rguenther@suse.de>
1264
1265 * lto.c (hash_canonical_type): Split out from ...
1266 (iterative_hash_canonical_type): ... here. Register types
1267 we recurse to.
1268 (gimple_canonical_type_hash): Adjust.
1269 (gimple_register_canonical_type_1): Split out from ...
1270 (gimple_register_canonical_type): ... here. Cache computed
1271 hash value.
1272 (lto_register_canonical_types): Split into two modes,
1273 clearing and computing TYPE_CANONICAL.
1274 (lto_read_decls): Adjust.
1275 (read_cgraph_and_symbols): Do two passes over global trees,
1276 first clearing then computing TYPE_CANONICAL.
1277
1394237e
RB
12782013-10-14 Richard Biener <rguenther@suse.de>
1279
1280 * lto.c (gimple_canonical_types): Move out-of GC space.
1281 (canonical_type_hash_cache): Make a pointer-map.
1282 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1283 New counters.
1284 (iterative_hash_canonical_type): Adjust.
1285 (read_cgraph_and_symbols): Likewise.
1286 (print_lto_report_1): Likewise.
1287
0a387eca
RB
12882013-10-14 Richard Biener <rguenther@suse.de>
1289
1290 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1291 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1292 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1293 gimple_types_compatible_p_1, gimple_types_compatible_p,
1294 visit, iterative_hash_name, struct type_hash_pair,
1295 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1296 gimple_type_eq, gimple_register_type, num_not_merged_types,
1297 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1298 num_not_merged_types_in_same_scc_trees): Remove old merging code
1299 and statistics.
1300 (lto_read_decls): Do not run old merging code in parallel.
1301 (read_cgraph_and_symbols): Do not init/free old merging
1302 data structures.
1303 (print_lto_report_1): Do not report differences of old vs. new
1304 merging code.
1305
83fd5d11
RB
13062013-10-14 Richard Biener <rguenther@suse.de>
1307
1308 * lto-lang.c (lto_init): Do not re-init canonical types here.
1309 (lto_register_canonical_types): Move to ...
1310 * lto.c (lto_register_canonical_types): ... here.
1311 (gimple_canonical_types, canonical_type_hash_cache,
1312 iterative_hash_canonical_type, gimple_canonical_type_hash,
1313 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1314 gimple_register_canonical_type): Add canonical type merging machinery
1315 moved from gimple.c.
1316 (read_cgraph_and_symbols): Init and free canonical type tables
1317 here.
1318 (print_lto_report_1): Report canonical type table stats here.
1319
acf0174b
JJ
13202013-10-11 Jakub Jelinek <jakub@redhat.com>
1321
1322 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1323
7c6fedd2
TT
13242013-09-25 Tom Tromey <tromey@redhat.com>
1325
1326 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1327 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1328 (lto/lto-object.o): Remove.
1329
35f32ad4
RB
13302013-09-06 Richard Biener <rguenther@suse.de>
1331
1332 * lto-symtab.c: Move from gcc/
1333 * lto.h: Include vec.h.
1334 (lto_global_var_decls): Declare.
1335 * lto.c (lto_global_var_decls): Move definition here.
1336 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1337 (lto-symtab.o): Add.
1338 * config-lang.in (gtfiles): Add lto.h.
1339
49322b12
JH
13402013-08-31 Jan Hubicka <jh@suse.cz>
1341
1342 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1343 DECL_FIELD_OFFSET can contain an reference to variable.
1344
31f1f73b
JH
13452013-08-31 Jan Hubicka <jh@suse.cz>
1346
1347 * lto.c (tree_with_vars): Turn into vector.
1348 (MAYBE_REMEMBER_WITH_VARS): Change to...
1349 (CHECK_VAR): ... this one.
1350 (CHECK_NO_VAR): New macro.
1351 (maybe_remember_with_vars_typed): Turn to ...
1352 (mentions_vars_p_typed): ... this one.
1353 (maybe_remember_with_vars_common): Turn to ...
1354 (mentions_vars_p_comon): ... this one.
1355 (maybe_remember_with_vars_decl_minimal): Turn to ...
1356 (mentions_vars_p_decl_minmal): ... this one.
1357 (maybe_remember_with_vars_decl_common): Turn to ...
1358 (mentions_vars_p_decl_common): ... this one.
1359 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1360 (mentions_vars_p_decl_with_vis): ... this one.
1361 (maybe_remember_with_vars_decl_non_common): Turn to ...
1362 (mentions_vars_p_decl_non_common): ... this one.
1363 (maybe_remember_with_vars_function): Turn to ...
1364 (mentions_vars_p_function): ... this one.
1365 (maybe_remember_with_vars_field_decl): Turn to ...
1366 (mentions_vars_p_field_decl): ... this one.
1367 (maybe_remember_with_vars_type): Turn to ...
1368 (mentions_vars_p_type): ... this one.
1369 (maybe_remember_with_vars_binfo): Turn to ...
1370 (mentions_vars_p_binfo): ... this one.
1371 (maybe_remember_with_vars_constructor): Turn to ...
1372 (mentions_vars_p_constructor): ... this one.
1373 (maybe_remember_with_vars_expr): Turn to ...
1374 (mentions_vars_p_expr): ... this one.
1375 (maybe_remember_with_vars): Turn to ...
1376 (mentions_vars_p): ... this one.
1377 (lto_read_decls): Update.
1378 (LTO_SET_PREVAIL): Do not call function for internal decls.
1379 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1380 check that something was updated.
1381 (lto_fixup_state): Do not care about internal decls.
1382 (lto_fixup_decls): Update.
1383 (read_cgraph_and_symbols): Update.
1384
256eefa9
JH
13852013-08-29 Jan Hubicka <jh@suse.cz>
1386
1387 * lto.c (read_cgraph_and_symbols): Free decl states.
1388
0170f33c
JH
13892013-08-29 Jan Hubicka <jh@suse.cz>
1390
1391 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1392 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1393 TYPE_FINAL_P.
1394
c01c111b
JH
13952013-08-28 Jan Hubicka <jh@suse.cz>
1396
1397 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1398 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1399 (unify_scc): Do checking assert.
1400
6a49f3c9
JH
14012013-08-06 Jan Hubicka <jh@suse.cz>
1402 Martin Liska <marxin.liska@gmail.com>
1403
1404 * lto-partition.c (lto_balanced_map): Always base order on
1405 source file order.
1406
a2e2a668
JH
14072013-08-06 Jan Hubicka <jh@suse.cz>
1408
1409 * lto.c (lto_materialize_function): Do not read body anymore.
1410
815effe1
JH
14112013-08-02 Jan Hubicka <jh@suse.cz>
1412
1413 * lto.c (lto_materialize_function): Do not push struct function.
1414 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1415 (may_need_named_section_p): Even abstract origins may need
1416 named section.
1417
315f8c0e
DM
14182013-07-30 David Malcolm <dmalcolm@redhat.com>
1419
1420 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1421 PASS_MANAGER_H.
1422
1423 * lto.c (do_whole_program_analysis): Update for move of
1424 all_regular_ipa_passes from a global to a field of class
1425 pass_manager.
1426
1aa95df7
OB
14272013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1428
1429 * lto-partition.c: Fix typos.
1430
c525ba9a
JH
14312013-06-20 Jan Hubicka <jh@suse.cz>
1432
1433 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1434 partitioning of variables.
1435
7a89ad00
JH
14362013-06-20 Jan Hubicka <jh@suse.cz>
1437
1438 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1439
6a6dac52
JH
14402013-06-19 Jan Hubicka <jh@suse.cz>
1441
1442 * lto-partition.c (add_references_to_partition): Use
1443 ctor_for_folding.
1444
ac0511f2
RB
14452013-06-18 Richard Biener <rguenther@suse.de>
1446
1447 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1448 and use it.
1449 (lto_register_function_decl_in_symtab): Likewise.
1450 (cmp_tree): New function.
1451 (unify_scc): Instead of using the streamer cache map from entry
1452 to cache index match up the two maps we have by sorting them.
1453 Adjust calls to lto_register_var_decl_in_symtab and
1454 lto_register_function_decl_in_symtab.
1455
ee03e71d
RB
14562013-06-17 Richard Biener <rguenther@suse.de>
1457
1458 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1459 * lto.c: Include data-streamer.h.
1460 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1461 (gimple_type_leader_entry_s, gimple_type_leader,
1462 gimple_lookup_type_leader): Remove.
1463 (gtc_visit): Simplify.
1464 (gimple_types_compatible_p): Likewise.
1465 (gimple_register_type_1): Likewise. Merge into ...
1466 (gimple_register_type): ... this. Keep it as legacy for
1467 statistics purposes for now.
1468 (fixup_integer_cst): Remove.
1469 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1470 rename to ...
1471 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1472 maybe_remember_with_vars_*): ... these.
1473 (uniquify_nodes): Remove.
1474 (lto_fixup_prevailing_type): New function.
1475 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1476 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1477 (num_merged_types, num_prevailing_types, num_not_merged_types,
1478 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1479 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1480 num_scc_compare_collisions): New global counters.
1481 (compare_tree_sccs_1): New function.
1482 (compare_tree_sccs): Likewise.
1483 (unify_scc): Likewise.
1484 (lto_read_decls): Stream in tree SCCs and unify them on the
1485 way in. Finalize prevailing SCC tree members.
1486 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1487 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1488 to ggc-collect during merging.
1489 (print_lto_report_1): Adjust for new merging code.
1490
ca0f62a8
JH
14912013-06-12 Jan Hubicka <jh@suse.cz>
1492
1493 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1494
bbf9ad07
JH
14952013-06-12 Jan Hubicka <jh@suse.cz>
1496
1497 * lto.c (register_resolution): Take lto_file_data argument.
1498 (lto_register_var_decl_in_symtab,
1499 lto_register_function_decl_in_symtab): Update.
1500 (read_cgraph_and_symbols): Update resolution_map handling.
1501
ecdbd01a 15022013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
1503
1504 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1505 (add_symbol_to_partition_1): Likewise.
1506 (contained_in_symbol): Likewise.
1507 (lto_balanced_map): Likewise.
1508 (rename_statics): Drop weakref.
1509
a367df53
RB
15102013-06-05 Richard Biener <rguenther@suse.de>
1511
1512 * lto.c (num_merged_types): New global variable.
1513 (uniquify_nodes): Increase num_merged_types when merging a type.
1514 (print_lto_report_1): Output the number of merged types.
1515
40a7fe1e
JH
15162013-06-01 Jan Hubicka <jh@suse.cz>
1517
1518 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1519 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1520 (do_whole_program_analysis): Update dumping.
1521
e70670cf
JH
15222013-05-29 Jan Hubicka <jh@suse.cz>
1523
1524 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1525 flags.
1526 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1527
8ee05051
JH
15282013-05-15 Jan Hubicka <jh@suse.cz>
1529
1530 * lto-partition.c (privatize_symbol_name): Return true when
1531 privatizing happened.
1532 (rename_statics): Do not go into infinite loop when privatizing
1533 is not needed.
1534
427b248d
JM
15352013-05-16 Jason Merrill <jason@redhat.com>
1536
1537 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1538
9de04252
MJ
15392013-05-15 Martin Jambor <mjambor@suse.cz>
1540
1541 * lto-partition.c (lto_balanced_map): Print symbol order instead
1542 of node uids.
1543
2d6e4603
JH
15442013-05-15 Jan Hubicka <jh@suse.cz>
1545
1546 PR lto/57038
1547 PR lto/47375
1548 * lto-partition.c (get_symbol_class): Fix weakrefs.
1549 (lto_balanced_map): Fix weakrefs.
1550 (privatize_symbol_name): Remove unnecesary label.
1551 (rename_statics): Handle weakrefs as statics.
1552
64cfa6c0
JH
15532013-05-09 Jan Hubicka <jh@suse.cz>
1554 Richard Biener <rguenther@suse.de>
1555
1556 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1557 (lto_register_var_decl_in_symtab): Likewise.
1558 (lto_main): Promote statics.
1559 * lto-partition.c (privatize_symbol_name): New function.
1560 (promote_symbol): Use it.
1561 (may_need_named_section_p): New predicate.
1562 (rename_statics): New functions.
1563 (lto_promote_cross_file_statics): Simplify; do renaming.
1564 (lto_promote_statics_nonwpa): New function.
1565 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1566
e45cde98
RB
15672013-02-08 Richard Biener <rguenther@suse.de>
1568
1569 PR lto/56231
1570 * lto-lang.c (lto_init): Do not enter a dummy file.
1571
6edc3e32
UB
15722013-02-07 Uros Bizjak <ubizjak@gmail.com>
1573
1574 PR bootstrap/56227
1575 * lto.c (lto_resolution_ready): Use %wx instead of
1576 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1577
ed73881e
RG
15782013-02-04 Richard Guenther <rguenther@suse.de>
1579
1580 PR lto/56168
1581 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1582 or lto_fixup_decls at LTRANS time.
1583
a19b1432
JH
15842013-01-09 Jan Hubicka <jh@suse.cz>
1585
1586 PR lto/45375
1587 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1588
49c01f87
L
15892012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1590
1591 PR lto/55466
1592 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1593 variables.
1594 (lto_main): Record the global variables if WPA isn't enabled.
1595
6e1aa848
DN
15962012-11-20 Diego Novillo <dnovillo@google.com>
1597 Jakub Jelinek <jakub@redhat.com>
1598
1599 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1600
9771b263
DN
16012012-11-16 Diego Novillo <dnovillo@google.com>
1602
1603 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1604
1605 * lto-lang.c: Use new vec API in vec.h.
1606 * lto-partition.c: Likewise.
1607 * lto-partition.h: Likewise.
1608 * lto.c: Likewise.
1609
24551b9c
LC
16102012-10-31 Lawrence Crowl <crowl@google.com>
1611
1612 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1613 down-cast via dyn_cast.
1614 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1615 (undo_partition): Likewise.
1616 (lto_balanced_map): Likewise.
1617 (get_symbol_class): Likewise and via is_a.
1618 (lto_balanced_map): Change symtab checking to is_a.
1619
aec06f6f
RB
16202012-10-12 Richard Biener <rguenther@suse.de>
1621
1622 PR lto/54898
1623 * lto.c (gimple_types_compatible_p_1): Also compare
1624 TYPE_MAIN_VARIANT.
1625 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1626
0b8c30f9
TB
16272012-10-09 Tobias Burnus <burnus@net-b.de>
1628
1629 * lto-lang.c (lto_register_builtin_type): Avoid useless
1630 decl creation.
1631 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1632
da3202a8
TB
16332012-10-08 Tobias Burnus <burnus@net-b.de>
1634
1635 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1636 Free lto_file struct after closing the file.
1637
2512a443
JH
16382012-10-08 Jan Hubicka <jh@suse.cz>
1639
1640 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1641 (fixup_integer_cst): New functoin.
1642 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1643
e75f8f79
JH
16442012-10-07 Jan Hubicka <jh@suse.cz>
1645
1646 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1647 release input encoders.
1648 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1649
46591697
JH
16502012-10-06 Jan Hubicka <jh@suse.cz>
1651
1652 PR lto/54790
1653 * lto.c (resolution_map): New static var.
1654 (register_resolution): New function.
1655 (lto_register_var_decl_in_symtab): Use it.
1656 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1657
af16bc76
MJ
16582012-09-20 Martin Jambor <mjambor@suse.cz>
1659
1660 * lto.c (lto_materialize_function): Call push_struct_function and
1661 pop_cfun.
1662
5368224f
DC
16632012-09-19 Dehao Chen <dehao@google.com>
1664
1665 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1666
b5493fb2
JH
16672012-09-19 Jan Hubicka <jh@suse.cz>
1668
1669 * lto.c (lto_materialize_function): Update confused comment.
1670 (read_cgraph_and_symbols): Do not free symtab.
1671
c3c445e1
JH
16722012-09-12 Jan Hubicka <jh@suse.cz>
1673
1674 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1675 AUX pointer cleaning. Add max partitioning.
1676 * lto-partition.c (enum symbol_class): New.
1677 (get_symbol_class): New function.
1678 (symbol_partitioned_p): New function.
1679 (add_references_to_partition): Remove.
1680 (add_aliases_to_partition): Remove.
1681 (add_cgraph_node_to_partition_1): Remove.
1682 (add_cgraph_node_to_partition): Remove.
1683 (add_symbol_to_partition): New function.
1684 (add_symbol_to_partition_1): New function.
1685 (contained_in_symbol): New function.
1686 (partition_cgraph_node_p): Remove.
1687 (partition_varpool_node_p): Remove.
1688 (partition_symbol_p): Remove.
1689 (lto_1_to_1_map): Cleanup.
1690 (lto_max_map): New.
1691 (lto_balanced_map): Update.
1692 (lto_promote_cross_file_statics): Update.
1693 * lto-partition.h (lto_max_map): Declare.
1694 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1695
b5c7cdfb
JH
16962012-09-11 Jan Hubicka <jh@suse.cz>
1697
1698 PR lto/54312
1699 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1700 type is variant leader.
1701
b29402f0
RG
17022012-09-11 Richard Guenther <rguenther@suse.de>
1703
1704 * lto.c (enum gtc_mode): Remove.
1705 (struct type_pair_d): Adjust.
1706 (lookup_type_pair): Likewise.
1707 (gimple_type_leader): Do not mark as deletable.
1708 (gimple_lookup_type_leader): Adjust.
1709 (gtc_visit): Likewise.
1710 (gimple_types_compatible_p_1): Likewise.
1711 (gimple_types_compatible_p): Likewise.
1712 (gimple_type_hash): Likewise.
1713 (gimple_register_type): Likewise.
1714 (read_cgraph_and_symbols): Manage lifetime of tables
1715 here.
1716
b8f4e58f
RG
17172012-09-11 Richard Guenther <rguenther@suse.de>
1718
1719 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1720 struct type_pair_d, lookup_type_pair, struct sccs,
1721 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1722 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1723 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1724 visit, iterative_hash_name, struct type_hash_pair,
1725 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1726 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1727 Move here from gimple.c
1728 (read_cgraph_and_symbols): Free hash tables here.
1729 (print_lto_report_1): New function wrapping print_lto_report.
1730 (do_whole_program_analysis): Call it.
1731 (lto_main): Likewise.
1732
1cdbb3f9
JH
17332012-09-10 Jan Hubicka <jh@suse.cz>
1734
1735 * lto-partition.c (partition_symbol_p): Forward declare.
1736 (add_references_to_partition): Reimplement using partition_symbol_p.
1737 (add_aliases_to_partition): Break out from add_references_to_partition;
1738 reimplement using partition_symbol_p.
1739 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1740 add sanity checks.
1741 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1742 (partition_varpool_node_p): Do not special case aliases.
1743
b4661bfe
JH
17442012-08-12 Jan Hubicka <jh@suse.cz>
1745
1746 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1747 it is deleted after streaming.
1748 * lto-partition.c (partition_symbol_p): New function.
1749 (promote_var, promote_fn): Remove.
1750 (promote_symbol): New function.
1751 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1752 to lookup the actual boundaries instead of computing them ad-hoc.
1753
7b99cca4
JH
17542012-08-12 Jan Hubicka <jh@suse.cz>
1755
1756 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1757 in partitioning.
1758 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1759 by encoder.
1760 * lto-partition.c (new_partition): Update.
1761 * lto.c (cmp_partitions_order): Update.
1762 (lto_wpa_write_files): Update.
1763 (free_ltrans_partitions): Update.
1764 (add_references_to_partition): Update.
1765 (add_cgraph_node_to_partition_1): Update.
1766 (add_cgraph_node_to_partition): Update.
1767 (add_varpool_node_to_partition): Update.
1768 (undo_partition): Update.
1769 (lto_balanced_map): Update.
1770 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1771 set_referenced_from_this_partition_p): Update.
1772 (lto_promote_cross_file_statics): Update.
1773
f27c1867
JH
17742012-08-12 Jan Hubicka <jh@suse.cz>
1775
1776 * lto-partition.c (set_referenced_from_other_partition_p,
1777 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1778 New functions.
1779 (lto_promote_cross_file_statics): Use them.
1780
ab96cc5b
JH
17812012-07-24 Jan Hubicka <jh@suse.cz>
1782
1783 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1784
0229aee9
UB
17852012-07-24 Uros Bizjak <ubizjak@gmail.com>
1786
1787 * lto-tree.h (lang_decl): Add variable_size GTY option.
1788
7ee2468b
SB
17892012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1790
1791 * lto.c: Do not include timevar.h.
1792 * Make-lang.in: Fix dependencies.
1793
a910399d
LC
17942012-06-18 Lawrence Crowl <crowl@google.com>
1795
1796 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1797 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1798 to lto_wpa_write_files.
1799 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1800 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1801 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1802 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1803 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1804 to be a front end, but is not one.
1805
877ab5e9
JH
18062012-05-18 Jan Hubicka <jh@suse.cz>
1807
1808 * lto.c (lto_materialize_constructors_and_inits): Remove.
1809 (read_cgraph_and_symbols): Remove handling of alias pairs.
1810
6649df51
JH
18112012-05-17 Jan Hubicka <jh@suse.cz>
1812
1813 * lto-partition.c (add_references_to_partition): Handle external vars.
1814 (partition_varpool_node_p): Likewise.
1815 (lto_promote_cross_file_statics): Do not promote externals.
1816
d1ede5f4
BS
18172012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1818
1819 * lto-lang.c (handle_fnspec_attribute): New static function.
1820 (lto_attribute_table): Add "fn spec".
1821 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1822
0d6bf48c
JH
18232012-05-04 Jan Hubicka <jh@suse.cz>
1824
1825 * lto.c (do_whole_program_analysis): Set timevars correctly.
1826 (lto_main): Likewise.
d1ede5f4 1827
1d67dde8
RB
18282012-05-04 Richard Guenther <rguenther@suse.de>
1829
1830 * lang.opt (fwpa): Do not mark as Optimization.
1831 (fltrans): Likewise.
1832
65d630d4
JH
18332012-04-30 Jan Hubicka <jh@suse.cz>
1834
1835 * lto.c (lto_main): Use compile ().
1d67dde8
RB
1836 * lto-partition.c (partition_cgraph_node_p): Use
1837 symtab_used_from_object_file_p.
65d630d4
JH
1838 (partition_varpool_node_p): Likewise.
1839
ead84f73
JH
18402012-04-20 Jan Hubicka <jh@suse.cz>
1841
1842 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1843
5932a4d4
JH
18442012-04-18 Jan Hubicka <jh@suse.cz>
1845
1846 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1847 Update for new ipa-ref API.
1848
65c70e6b
JH
18492012-04-16 Jan Hubicka <jh@suse.cz>
1850
1851 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1852 walkers to walk cgraph and varpool.
1853 (materialize_cgraph): Likewise.
1854 * lto-partition.c (lto_1_to_1_map): Likewise.
1855 (lto_balanced_map): Likewise.
1856 (lto_promote_cross_file_statics): Likewise.
1857
960bfb69
JH
18582012-04-14 Jan Hubicka <jh@suse.cz>
1859
1860 * lto.c: Update field referenced for new cgraph/varpool layout.
1861 * lto-partition.c: Likewise.
1862
a66dc285
JH
18632012-04-11 Jan Hubicka <jh@suse.cz>
1864
1865 * lto.c: Update copyright; remove params.h, ipa-inline.h
1866 and ipa-utils.h inlines; inline lto-partition.h
1867 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1868 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1869 add_references_to_partition, add_cgraph_node_to_partition_1,
1870 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1871 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1872 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1873 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1874 * lto-partition.c: ... here; new file.
1875 * lto-partition.h: New file.
1876 * Make-lang.in (lto.o): Update dependencies.
1877 (lto-partition.o): New.
1878
f3b249e5
RG
18792012-04-05 Richard Guenther <rguenther@suse.de>
1880
1881 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1882 definition.
1883
21fa2faf
RG
18842012-03-12 Richard Guenther <rguenther@suse.de>
1885
1886 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1887
6bb485a3
RG
18882012-03-06 Richard Guenther <rguenther@suse.de>
1889
1890 PR lto/52097
1891 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1892
95510497
RG
18932012-02-28 Richard Guenther <rguenther@suse.de>
1894
1895 PR lto/52400
1896 * lto.c (lto_register_function_decl_in_symtab): Do not register
1897 a reverse renamed decl mapping.
1898
09228fef
JJ
18992012-01-06 Jakub Jelinek <jakub@redhat.com>
1900
1901 PR lto/51774
1902 * lto-lang.c (handle_returns_twice_attribute): New function.
1903 (lto_attribute_table): Add returns_twice attribute.
1904
b03eda0d
RG
19052011-12-21 Richard Guenther <rguenther@suse.de>
1906
1907 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1908 (LTO_FIXUP_TREE): Use it.
1909 (uniquify_nodes): Mark new non-prevailing types and avoid
1910 calling gimple_register_type on others.
1911 (lto_read_decls): Add comment.
1912
4ad9a9de
EB
19132011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1914
1915 * lto.h (lto_parse_hex): Delete.
1916 * lto.c (lto_read_decls): Use 'int' for offsets.
1917 (lto_parse_hex): Make static and return proper 64-bit host type.
1918 (lto_resolution_read): Use proper 64-bit host type.
1919
ea973bad
RG
19202011-12-13 Richard Guenther <rguenther@suse.de>
1921
1922 PR lto/48354
1923 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1924 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1925
c8218030
UB
19262011-12-01 Uros Bizjak <ubizjak@gmail.com>
1927
1928 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1929 (ignore_attribute): New.
1930
57ac2606
AH
19312011-11-21 Aldy Hernandez <aldyh@redhat.com>
1932
1933 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1934 (handle_transaction_pure_attribute): New.
1935
52a35ef7
RG
19362011-11-03 Richard Guenther <rguenther@suse.de>
1937
1938 PR lto/44965
1939 * lto-lang.c (lto_post_options): Do not read file options.
1940 * lto.c (lto_read_all_file_options): Remove.
1941 (lto_init): Call lto_set_in_hooks here.
1942
51973b1e
JH
19432011-10-09 Jan Hubicka <jh@suse.cz>
1944
1945 * lto.c (node_cmp, varpool_node_cmp): New functions.
1946 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1947 (cmp_partitions): Rename to ...
1948 (cmp_partitions_size): ... this one.
1949 (cmp_partitions_order): New function.
1950 (lto_wpa_write_files): Sort partitions by order when
1951 -fno-toplevel-reorder is used.
1952
5958009b
AK
19532011-10-09 Andi Kleen <ak@linux.intel.com>
1954
1955 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1956
e79983f4
MM
19572011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1958
1959 * lto-lang.c (def_builtin_1): Delete old interface with two
1960 parallel arrays to hold standard builtin declarations, and replace
1961 it with a function based interface that can support creating
1962 builtins on the fly in the future. Change all uses, and poison
1963 the old names. Make sure 0 is not a legitimate builtin index.
1964
ecdbd01a 19652011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
1966
1967 * lto-object.c (lto_obj_add_section_data): Add list.
1968 (lto_obj_add_section): Fill in list.
1969 (ltoobj_build_section_table): Pass through list.
1970 * lto.c (file_data_list): Declare.
1971 (create_subid_section_table): Pass arguments directly.
1972 Fill in list of file_datas.
1973 (lwstate): Delete.
1974 (lto_create_files_from_ids): Pass in direct arguments.
1975 Don't maintain list.
1976 (lto_file_read): Use explicit section and file data lists.
1977 (lto_read_all_file_options): Pass in section_list.
1978 * lto.h (lto_obj_build_section_table): Add list.
1979 (lto_section_slot): Add next.
1980 (lto_section_list): Declare.
1981
ed0d2da0
JH
19822011-10-02 Jan Hubicka <jh@suse.cz>
1983
1984 PR lto/47247
1985 * common.c (lto_resolution_str): Add new resolution.
1986 * common.h (lto_resolution_str): Likewise.
1987
ad7715f3
L
19882011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1989 Andi Kleen <ak@linux.intel.com>
1990
1991 PR lto/50568
1992 * lto.c (lto_splay_tree_delete_id): New.
1993 (lto_splay_tree_compare_ids): Likewise.
1994 (lto_splay_tree_lookup): Likewise.
1995 (lto_splay_tree_id_equal_p): Likewise.
1996 (lto_splay_tree_insert): Likewise.
1997 (lto_splay_tree_new): Likewise.
1998 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1999 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
2000 (create_subid_section_table): Use lto_splay_tree_lookup and
2001 lto_splay_tree_insert.
2002 (lto_file_read): Use lto_splay_tree_new.
2003
ecdbd01a 20042011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
2005
2006 * lto.c (lto_resolution_read): Remove id dumping.
2007 (lto_section_with_id): Turn id HOST_WIDE_ID.
2008 (create_subid_section_table): Dito.
2009
892a371f
DS
20102011-08-28 Dodji Seketeli <dodji@redhat.com>
2011
2012 * lto-lang.c (lto_init): Likewise. Also, avoid calling
2013 linemap_add twice.
2014
f82d1a94
MJ
20152011-08-11 Martin Jambor <mjambor@suse.cz>
2016
2017 * lto.c (uniquify_nodes): Use main variant's BINFO too.
2018
f0efc7aa
DN
20192011-08-08 Diego Novillo <dnovillo@google.com>
2020
2021 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
2022 * lto.c: Include tree-streamer.h.
2023
1a072294
RG
20242011-07-06 Richard Guenther <rguenther@suse.de>
2025
2026 * lto-lang.c (lto_init):
2027 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
2028
7496868d
JH
20292011-06-11 Jan Hubicka <jh@suse.cz>
2030
10f13f22 2031 PR lto/48246
7496868d
JH
2032 * lto.c (lto_1_to_1_map): Don't create empty partitions.
2033 (lto_balanced_map): Likewise.
2034
39e2db00
JH
20352011-06-11 Jan Hubicka <jh@suse.cz>
2036
2037 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
2038 (add_cgraph_node_to_partition) ... here; walk aliases.
2039 (lto_1_to_1_map): Remove same body alias code.
2040 (promote_fn): Likewise.
2041 (lto_promote_cross_file_statics): Update comment.
2042
2043
28628ea6
DN
20442011-06-07 Diego Novillo <dnovillo@google.com>
2045
2046 * lto.c (uniquify_nodes): Move code to register decls to
2047 the loop that computes canonical types.
2048
009db074
RG
20492011-06-07 Richard Guenther <rguenther@suse.de>
2050
2051 * lto-lang.c (lto_init): Do not set
2052 size_type_node or call set_sizetype.
2053
47c79d56
DN
20542011-06-04 Diego Novillo <dnovillo@google.com>
2055
2056 * lto.c (lto_init): New.
2057 (lto_main): Call it.
2058
d5828cc7
DN
20592011-06-03 Diego Novillo <dnovillo@google.com>
2060
2061 * lto.c (get_resolution): Move from lto-streamer-in.c.
2062 (lto_register_var_decl_in_symtab): Likewise.
2063 (lto_register_function_decl_in_symtab): Likewise.
2064 (uniquify_nodes): Call lto_register_var_decl and
2065 lto_register_function_decl_in_symtab after reading a new
2066 VAR_DECL or FUNCTION_DECL.
2067
6807da97
RG
20682011-06-01 Richard Guenther <rguenther@suse.de>
2069
2070 * lto-lang.c (lto_register_canonical_types): New function.
2071 (lto_init): Register common nodes with the canonical type machinery.
2072 Do not play tricks with char_type_node.
2073
d74be317
RG
20742011-05-26 Richard Guenther <rguenther@suse.de>
2075
2076 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2077
d9f8303f
NF
20782011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2079
2080 * lto.c (lto_ft_typed): New function.
2081 (lto_ft_common): Call it.
2082 (lto_ft_constructor): Likewise.
2083 (lto_ft_expr): Likewise.
2084 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2085 TREE_CHAIN.
2086
fb291a1e
RG
20872011-05-20 Richard Guenther <rguenther@suse.de>
2088
2089 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2090 (lto_ft_type): Move main-variant and pointer-to chain building ...
2091 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2092 in a separate final loop.
2093
31b3ca64
RG
20942011-05-19 Richard Guenther <rguenther@suse.de>
2095
2096 * lto.c (uniquify_nodes): First register all types before
2097 fixing up the tree SCC.
2098
35d828c5
JH
20992011-05-11 Jan Hubicka <jh@suse.cz>
2100
2101 PR lto/48952
2102 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2103
51545682
NF
21042011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2105
2106 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2107 location of binfo field.
2108 (lto_fixup_prevailing_decls): Likewise.
2109
8242dd04
NF
21102011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2111
2112 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2113 build_function_type_array or build_varargs_function_type_array
2114 instead.
2115
c99c0026
EB
21162011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2117
2118 * lto-lang.c (global_bindings_p): Return bool.
2119
c47d0034
JH
21202011-05-07 Jan Hubicka <jh@suse.cz>
2121
a9bcb3f0
EB
2122 * lto.c (lto_materialize_function): Use
2123 cgraph_function_with_gimple_body_p.
2124 (add_cgraph_node_to_partition): Do not re-add items to partition;
2125 handle thunks.
c47d0034
JH
2126 (add_varpool_node_to_partition): Do not re-add items to partition.
2127
bb3398ca
JH
21282011-05-03 Jan Hubicka <jh@suse.cz>
2129
2130 * lto.c (free_ltrans_partitions): Fix accidental commit.
2131
1cb1a99f
JH
21322011-05-03 Jan Hubicka <jh@suse.cz>
2133
2134 * lto.c (ltrans_partition_def): Remove GTY annotations.
2135 (ltrans_partitions): Move to heap.
2136 (new_partition): Update.
2137 (free_ltrans_partitions): New function.
2138 (lto_wpa_write_files): Use it.
2139
af8bca3c
MJ
21402011-04-29 Martin Jambor <mjambor@suse.cz>
2141
2142 * lto.c: Include ipa-utils.h.
2143 (lto_balanced_map): Update call to ipa_reverse_postorder.
2144 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2145
b823cdfe
MM
21462011-04-29 Michael Matz <matz@suse.de>
2147
2148 * lto.c (toplevel): Include tree-flow.h.
2149 (lto_read_in_decl_state): Don't merge types here.
2150 (tree_with_vars): New static hash table.
2151 (remember_with_vars): New static functions.
2152 (LTO_FIXUP_TYPE): New macro.
2153 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2154 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2155 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2156 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2157 (lto_read_decls): Uniquify while reading in trees.
2158 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2159 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2160 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2161 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2162 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2163 lto_fixup_tree): Remove.
2164 (lto_fixup_state): Remove data argument. Use
2165 lto_symtab_prevailing_decl.
2166 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2167 (lto_fixup_prevailing_decls): New function.
2168 (lto_fixup_state_aux): Argument aux is unused.
2169 (lto_fixup_decls): Don't allocate pointer sets, don't use
2170 lto_fixup_tree, use lto_fixup_prevailing_decls.
2171 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2172 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2173
b9843260
EB
21742011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2175
2176 * lto.c (lto_balanced_map): Fix typos in head comment.
2177 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2178 test.
2179
e7f23018
JH
21802011-04-16 Jan Hubicka <jh@suse.cz>
2181
2182 * lto.c (lto_balanced_map): Update.
2183
10a5dd5d
JH
21842011-04-14 Jan Hubicka <jh@suse.cz>
2185
2186 * lto.c: Include ipa-inline.h
b9843260
EB
2187 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2188 accessor.
10a5dd5d
JH
2189 (ipa_node_duplication_hook): Fix declaration.
2190 * Make-lang.in (lto.o): Update dependencies.
2191
81f653d6
NF
21922011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2193
2194 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2195 calling TREE_CHAIN.
2196 * lto.c (lto_fixup_common): Likewise.
2197
dcf0c47e
NF
21982011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2199
2200 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2201 (handle_type_generic_attribute): Likewise.
2202
e89964e3
MM
22032011-04-03 Michael Matz <matz@suse.de>
2204
2205 * lto.c (lto_materialize_function): Don't read and then discard
2206 sections in WPA mode.
2207 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2208
2209 * lto-lang.c (registered_builtin_fndecls): Remove.
2210 (lto_getdecls): Return NULL_TREE.
2211 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2212
d2b3fe18
RG
22132011-03-31 Richard Guenther <rguenther@suse.de>
2214
2215 PR lto/48246
2216 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2217 partitions when checking is not enabled.
2218
ba78087b
KT
22192011-03-25 Kai Tietz <ktietz@redhat.com>
2220
2221 * lto.c (lto_resolution_read): Use filename_cmp instead
2222 of strcmp.
2223 (lto_read_section_data): Likewise.
2224
0edf1bb2
JL
22252011-03-25 Jeff Law <law@redhat.com>
2226
2227 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2228
62d784f7
KT
22292011-03-21 Kai Tietz <ktietz@redhat.com>
2230
2231 PR target/12171
2232 * lto-lang.c (lto_attribute_table): Adjust table.
2233
62dd9571
JJ
22342011-02-18 Jakub Jelinek <jakub@redhat.com>
2235
2236 PR bootstrap/47807
2237 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2238 of lto-streamer.h.
2239
237d6259
RG
22402011-02-18 Richard Guenther <rguenther@suse.de>
2241
2242 PR lto/47798
2243 * lto-tree.h (lto_global_var_decls): Do not declare here.
2244 * lto-lang.c: Include lto-streamer.h.
2245 * Make-lang.in (lto-lang.o): Adjust dependencies.
2246
8ead2223
KT
22472011-02-10 Kai Tietz <kai.tietz@onevision.com>
2248
2249 PR lto/47241
2250 * lto.c (lto_read_section_data): Free
2251 fd_name in failure case.
2252 For mingw targets don't hash file-descriptor.
2253 (read_cgraph_and_symbols): Close current_lto_file
2254 in failure case.
2255
6e701822
JH
22562011-01-11 Jan Hubicka <jh@suse.cz>
2257
2258 PR lto/45721
2259 PR lto/45375
b9843260
EB
2260 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2261 are not partitioned.
6e701822 2262
f4da8dce
NF
22632010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2264
2265 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2266 Use prototype_p.
2267
6b7fb143
RG
22682010-12-06 Richard Guenther <rguenther@suse.de>
2269
2270 PR lto/46796
2271 * lto-lang.c (lto_init): Give names to basic types.
2272
c59ffc41
JM
22732010-11-30 Joseph Myers <joseph@codesourcery.com>
2274
2275 * lto-object.c: Don't include toplev.h.
2276 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2277
7c475d11
JM
22782010-11-30 Joseph Myers <joseph@codesourcery.com>
2279
2280 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2281 $(TOPLEV_H).
2282
71f3e391
JM
22832010-11-29 Joseph Myers <joseph@codesourcery.com>
2284
2285 * lto-endian.h: Delete.
2286 * lto-object.c: Don't include "libiberty.h".
2287 (O_BINARY): Don't define.
2288 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2289 (O_BINARY): Don't define.
2290
9f1718b0
RG
22912010-11-23 Richard Guenther <rguenther@suse.de>
2292
2293 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2294
39c4e298
RG
22952010-11-23 Richard Guenther <rguenther@suse.de>
2296
2297 PR lto/46605
2298 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2299
b37421c6
JM
23002010-11-17 Joseph Myers <joseph@codesourcery.com>
2301
2302 * lto.c (lto_main): Take no arguments.
2303 * lto.h (lto_main): Update prototype.
2304
d82f74d3
ILT
23052010-11-16 Ian Lance Taylor <iant@google.com>
2306
2307 * lto-object.c (lto_obj_file_open): Call
2308 simple_object_attributes_merge rather than
2309 simple_object_attributes_compare.
2310
a4d8c676
JM
23112010-11-12 Joseph Myers <joseph@codesourcery.com>
2312
2313 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2314 * lto-lang.c (lto_handle_option): Take location_t parameter.
2315
d8a07487
JM
23162010-11-10 Joseph Myers <joseph@codesourcery.com>
2317
2318 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2319 letters and remove trailing '.'.
2320 (lto_file_finalize): Start diagnostic with a lowercase letter.
2321
6b3456d1
ILT
23222010-11-02 Ian Lance Taylor <iant@google.com>
2323
2324 * lto-object.c: New file.
2325 * lto-elf.c: Remove file.
2326 * lto-macho.c: Remove file.
2327 * lto-macho.h: Remove file.
2328 * lto-coff.c: Remove file.
2329 * lto-coff.h: Remove file.
2330 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2331 lto/lto-object.o.
2332 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2333 (lto/lto-objfile.o): New target.
2334 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2335 (lto/lto.o): Remove $(LIBIBERTY_H).
2336
030cd86c
JH
23372010-10-22 Jan Hubicka <jh@suse.cz>
2338
2339 * lto.c (add_cgraph_node_to_partition,
2340 add_varpool_node_to_partition): Add debug info.
2341 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2342 partitioned nodes.
2343 (do_whole_program_analysis): Set function flags before dumping.
2344
4490cae6
RG
23452010-10-22 Richard Guenther <rguenther@suse.de>
2346
2347 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2348 the new gimple_register_canonical_type.
2349
703cdce3
L
23502010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2351
2352 PR bootstrap/45954
2353 * config-lang.in (boot_language): Set to $enable_lto.
2354
1915c739
JJ
23552010-10-18 Jakub Jelinek <jakub@redhat.com>
2356
2357 PR lto/45638
2358 * Make-lang.in (check-lto): New dummy target.
2359
82971de5
EB
23602010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2361
2362 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2363
a75bfaa6
JM
23642010-10-08 Joseph Myers <joseph@codesourcery.com>
2365
2366 * lto-lang.c (lto_init_options): Change to
2367 lto_init_options_struct. Update parameters.
2368 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2369 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2370
937f7f69
JH
23712010-10-06 Jan Hubicka <jh@suse.cz>
2372
2373 * lto.c (lto_balanced_map): Fix accounting of program size.
2374
2169830c
JH
23752010-10-06 Jan Hubicka <jh@suse.cz>
2376
2377 * lto.c (lto_balanced_map): Do not produce empty partitions.
2378
ecdbd01a 23792010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2380
2381 * lto.c (lto_process_name): Add.
2382 (lto_main): Call lto_process_name.
2383
06ed016f
JH
23842010-10-06 Jan Hubicka <jh@suse.cz>
2385
2386 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2387 COMDATs required by the linker.
2388
ae718d66
ILT
23892010-10-05 Ian Lance Taylor <iant@google.com>
2390
2391 * lto.c (lto_section_with_id): Make s a const pointer.
2392
852e4bd2
JH
23932010-10-05 Jan Hubicka <jh@suse.cz>
2394
2395 * lto.c: Include params.h.
2396 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2397 refcounting in aux field.
2398 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2399 New functions.
2400 (lto_1_to_1_map): Simplify.
2401 (lto_balanced_map): New function.
2402 (do_whole_program_analysis): Chose proper partitioning alg.
2403 * Make-lang.in (lto.o): Add dependency on params.h
2404
ecdbd01a 24052010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2406
2407 * Make-lang.in (lto1): Add + to build rule.
2408
ecdbd01a 24092010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2410
2411 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2412 with fatal_error.
2413
0d6e14fd
JH
24142010-09-28 Jan Hubicka <jh@suse.cz>
2415
2416 * lto-lang.c (handle_leaf_attribute): New function.
2417 (lto_attribute_tables): Add leaf.
2418
fb462383
JZ
24192010-09-25 Jie Zhang <jie@codesourcery.com>
2420
2421 * lto.c (lto_read_all_file_options): Start a new line after
2422 printing out file names.
2423
051f8cc6
JH
24242010-09-24 Jan Hubicka <jh@suse.cz>
2425
2426 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2427
64e0f5ff
JH
24282010-09-20 Jan Hubicka <jh@suse.cz>
2429
2430 PR tree-optimize/45605
2431 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2432
a929ec3d
GP
24332010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2434
2435 * lto-elf.c (lto_obj_file_open): Also provide filename when
2436 elf_begin fails.
2437
4c588abf
JH
24382010-09-17 Jan Hubicka <jh@suse.cz>
2439
2440 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2441
c3224d6f
RG
24422010-09-17 Richard Guenther <rguenther@suse.de>
2443
2444 * lang.opt (flag_wpa): Also enable for the driver.
2445
52b3b3c7
JH
24462010-09-16 Jan Hubicka <jh@suse.cz>
2447
2448 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2449 EXTERNAL flags.
2450
969c37b7
LB
24512010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2452
2453 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2454
098a4f50
JH
24552010-09-08 Jan Hubicka <jh@suse.cz>
2456
2457 * lto.c (real_file_count, real_file_decl_data): New static vars.
2458 (read_cgraph_and_symbols): Use it.
2459
0f443ad0
RG
24602010-09-08 Richard Guenther <rguenther@suse.de>
2461
2462 * lto.c (read_cgraph_and_symbols): Collect again after each
2463 file.
2464
ee187353
JH
24652010-09-07 Jan Hubicka <jh@suse.cz>
2466
2467 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2468
b3ec52d0
RG
24692010-09-03 Richard Guenther <rguenther@suse.de>
2470
2471 * lto-elf.c (validate_file): Always error if validation fails.
2472
f1395d4a
JH
24732010-08-20 Jan Hubicka <jh@suse.cz>
2474
2475 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2476 (lto_wpa_write_files): Update comments.
2477
2429bce3
L
24782010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2479
2480 PR bootstrap/45357
2481 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2482 with has_analyzed_clone_p.
2483
e0f967db
JH
24842010-08-20 Jan Hubicka <jh@suse.cz>
2485
2486 * lto.c (has_analyzed_clone_p): New function
2487 (lto_materialize_function): Use callgraph to determine if
2488 body is needed.
2489 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2490
ac47786e
NF
24912010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2492
2493 * lto.c: Use FOR_EACH_VEC_ELT.
2494
ecdbd01a 24952010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
2496
2497 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2498
5f20c657
JM
24992010-07-27 Joseph Myers <joseph@codesourcery.com>
2500
2501 * lto-lang.c (lto_handle_option): Update prototype and return
2502 value type. Remove duplicate assignment to result.
2503
7a9bf9a4
JM
25042010-07-27 Joseph Myers <joseph@codesourcery.com>
2505
2506 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2507 New.
2508 (lto_init_options): Update prototype.
2509 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2510 Define.
2511
ecdbd01a 25122010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
2513
2514 PR lto/44992
2515 * lto.c: Include splay-tree.h
2516 (lto_resolution_read): Change to walk file_ids tree and parse
2517 extra file_id in resolution file.
2518 (lto_section_with_id): Add.
2519 (create_subid_section_table): Add.
2520 (lwstate): Add.
2521 (lto_create_files_from_ids): Add.
2522 (lto_file_read): Change to handle sub file ids and create list
2523 of file_datas. Add output argument for count.
2524 (get_section_data): Pass file_data to lto_get_section_name.
2525 (lto_flatten_file): Add.
2526 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2527
ecdbd01a 25282010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
2529
2530 * lto-coff.c (hash_name, eq_name): Move.
2531 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2532 * lto-elf.c: (hash_name, eq_name): Move.
2533 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2534 * lto-macho.c: (hash_name, eq_name): Move.
2535 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2536 * lto.c: (hash_name, eq_name): Move from lto-*.c
2537 (lto_obj_create_section_hash_table): Add.
2538 (free_with_string): Add.
2539
718f9c0f
MLI
25402010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2541
2542 * lto-coff.c: Include diagnostic-core.h in every file that
2543 includes toplev.h.
2544 * lto-elf.c: Likewise.
2545 * lto-lang.c: Likewise.
2546 * lto-macho.c: Likewise.
2547
1b137837
JJ
25482010-07-07 Jakub Jelinek <jakub@redhat.com>
2549
2550 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2551 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2552 objects.
2553
92eb4438
JH
25542010-07-05 Jan Hubicka <jh@suse.cz>
2555
2556 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2557 nodes from same comdat group as well as all comdat functions referenced
2558 here.
b9843260
EB
2559 (add_varpool_node_to_partition, add_references_to_partition): New
2560 function.
2561 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2562 add_varpool_node_to_partition; clear aux flags when done.
2563 (lto_promote_cross_file_statics): Do not promote stuff that gets
2564 duplicated to each ltrans.
92eb4438 2565
a05541a9
JH
25662010-07-04 Jan Hubicka <jh@suse.cz>
2567
2568 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2569
4a2ac96f
RG
25702010-06-13 Richard Guenther <rguenther@suse.de>
2571
2572 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2573
1d536046
KT
25742010-06-09 Kai Tietz <kai.tietz@onevision.com>
2575
2576 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2577 * lto-coff.c (coff_write_object_file): Add braces to if.
2578
a9429e29
LB
25792010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2580
2581 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2582 (lto_file_read): Likewise.
2583 (new_partition): Likewise.
2584 (read_cgraph_and_symbols): Likewise.
2585
5498f011
JM
25862010-06-07 Joseph Myers <joseph@codesourcery.com>
2587
2588 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2589 (lto_handle_option): Don't set flag_signed_char here.
2590
d4c0c9f6
RG
25912010-06-04 Richard Guenther <rguenther@suse.de>
2592
2593 PR lto/41584
2594 * lto.c (lto_1_to_1_map): Use the proper file_data for
2595 varpool nodes.
2596
0a5fa5a1
JH
25972010-05-30 Jan Hubicka <jh@suse.cz>
2598
2599 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2600 partitioning decisions.
2601
9eec9488
JH
26022010-05-29 Jan Hubicka <jh@suse.cz>
2603
2604 * lto.c (bitmap vector): Remove.
2605 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2606 (ltrans_partition_def): New structure.
2607 (ltrans_partition): New type and VECtor.
2608 (new_partition): New function.
2609 (add_cgraph_node_to_partition): New function.
2610 (lto_1_to_1_map): Reorganize for partitions.
2611 (lto_add_inline_clones): Remove.
2612 (lto_add_all_inlinees): Remove.
2613 (lto_promote_cross_file_statics): Use partitions.
2614 (cmp_partitions): New function.
2615 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2616 use partitions; output files sorted by size.
2617
3e097227
SB
26182010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2619
2620 * Make-lang.in: Replace vec.h dependency with VEC_H.
2621
7ca92787
JM
26222010-05-28 Joseph Myers <joseph@codesourcery.com>
2623
2624 * lto-coff.c (coff_errmsg): Remove.
2625 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2626 errors instead of coff_errmsg (-1).
2627 * lto-macho.c (mach_o_errmsg): Remove.
2628 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2629 instead of mach_o_errmsg (-1).
2630 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2631 xstrerror (errno).
2632
b5611987
RG
26332010-05-28 Richard Guenther <rguenther@suse.de>
2634
2635 * lto.c (prefix_name_with_star): Removed.
2636 (strip_extension): Likewise.
2637 (get_filename_for_set): Likewise.
2638 (lto_write_ltrans_list): Fold into ...
2639 (lto_wpa_write_files): ... this. Name LTRANS units
2640 by suffixing the ltrans output list filename.
2641 (do_whole_program_analysis): Adjust.
2642
1da2ed5f
JM
26432010-05-27 Joseph Myers <joseph@codesourcery.com>
2644
2645 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2646 (read_cgraph_and_symbols, lto_main): Use seen_error.
2647 * Make-lang.in (lto/lto.o): Update dependencies.
2648
7951d88a
EB
26492010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2650
2651 PR lto/44230
2652 * lto.h (lto_eh_personality): New prototype.
2653 * lto.c: Include debug.h.
2654 (first_personality_decl): New static variable.
2655 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2656 first function for which it is non-null.
2657 (lto_eh_personality_decl): New static variable.
2658 (lto_eh_personality): New function.
2659 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2660 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2661
e12da9c2
SB
26622010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2663
2664 * lto-lang.c: Do not include expr.h.
2665
468194f4
RG
26662010-05-24 Richard Guenther <rguenther@suse.de>
2667
2668 * lto-elf.c (lto_obj_build_section_table): Work around
2669 FreeBSD libelf issue.
2670
bd9eb5da
RG
26712010-05-22 Richard Guenther <rguenther@suse.de>
2672
2673 * lto.c (read_cgraph_and_symbols): Do not collect.
2674
66576e1b
JH
26752010-05-20 Jan Hubicka <jh@suse.cz>
2676
2677 * lto.c (promote_var, promote_fn): New functions.
2678 (lto_promote_cross_file_statics): Compute correctly boundary including
2679 static initializers of readonly vars.
2680
36576655
JH
26812010-05-18 Jan Hubicka <jh@suse.cz>
2682
66576e1b 2683 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
2684 (lto_promote_cross_file_statics): Deal with non-inline clones.
2685
28632d63
JH
26862010-05-18 Jan Hubicka <jh@suse.cz>
2687
2688 * lto.c (lto_materialize_function): Announce function when
2689 reading body; allocate_struct_function only when reading body;
2690 do not finalize local statics; ggc_collect after reading;
2691 do not mark reachable node.
2692 (materialize_cgraph): Do not announce function.
2693
33e42d56
JH
26942010-05-11 Jan Hubicka <jh@suse.cz>
2695
2696 * lto.c (materialize_cgraph): Revert my previous patch.
2697
f6430ea5
KT
26982010-05-11 Kai Tietz <kai.tietz@onevision.com>
2699
2700 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2701 IMAGE_FILE_MACHINE_AMD64.
2702 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2703
0a0b07b7
JH
27042010-05-11 Jan Hubicka <jh@suse.cz>
2705
2706 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2707 (materialize_cgraph): Add it here.
2708
9a809897
JH
27092010-05-11 Jan Hubicka <jh@suse.cz>
2710
2711 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2712 vector.
2713
27142010-05-11 Jan Hubicka <jh@suse.cz>
2715
2716 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2717 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2718 use reachable_from_other_partition_p and
2719 referenced_from_other_partition_p test.
2720
94f64249
KT
27212010-05-11 Kai Tietz <kai.tietz@onevision.com>
2722
2723 * lto-coff.c (validate_file): Add x64-coff support.
2724 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2725 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2726 * lto-lang.c (lto_build_c_type_nodes): Add check for
2727 'long long unsigned int' for x64-windows.
2728 (lto_init): Likewise.
2729
2730
c082f9f3
SB
27312010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2732
2733 * lto.h (struct lto_file_struct): Document offset member.
2734 * lto-endian.h: New file.
2735 * lto-macho.h: New file.
2736 * lto-macho.c: New file.
2737 * Make-lang.in: Add rule for lto-macho.o.
2738
3f8257db 27392010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
2740
2741 PR lto/43857
2742 PR lto/43371
2743 * lang.opt (fresolution): Change to ...
2744 (fresolution=): ... this.
2745 * lto-lang.c (lto_handle_option): Adjust.
2746
48cf395b
RB
27472010-05-07 Richard Guenther <rguenther@suse.de>
2748
2749 * lto.c (DUMPBASE_SUFFIX): Remove.
2750 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2751 Rename to ...
2752 (lto_write_ltrans_list): ... only output the list of ltrans files.
2753 (lto_maybe_unlink): Remove.
2754 (do_whole_program_analysis): Do not execute LTRANS phase
2755 from here.
2756
afa83c15
L
27572010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2758
2759 * lto-lang.c (lto_handle_option): Add argument kind.
2760
369451ec
JH
27612010-05-05 Jan Hubicka <jh@suse.cz>
2762
48cf395b
RB
2763 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2764 refs.
369451ec 2765
2f41ecf5
JH
27662010-05-05 Jan Hubicka <jh@suse.cz>
2767
2768 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2769
ace72c88
JH
27702010-04-30 Jan Hubicka <jh@suse.cz>
2771
b9843260
EB
2772 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2773 use default name.
ace72c88
JH
2774 (lto_wpa_write_files): Write any non-empty partition.
2775
05575e07
JH
27762010-04-30 Jan Hubicka <jh@suse.cz>
2777
2778 * lto.c: Do not attempt to make constant pool references global.
2779
49ba8180
JH
27802010-04-28 Jan Hubicka <jh@suse.cz>
2781
2782 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2783 (lto_wpa_write_files): Announce what we are writting.
2784 (all_file_decl_data): New.
2785 (read_cgraph_and_symbols): Use GGC; correct timevars.
2786 (do_whole_program_analysis): Collect.
2787 * lto/Make-lang.in (lto.o): Fix dependency.
2788 * Makefile.in (GTFILES): Add lto-streamer.h.
2789 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2790 (varpool_assemble_pending_decls): Use VAROUT.
2791 * lto-streamer.h (lto_tree_ref_table): Annotate.
2792 (lto_in_decl_state): Annotate.
2793 (lto_file_decl_data): Annotate.
2794
2942c502
JH
27952010-04-28 Jan Hubicka <jh@suse.cz>
2796
2797 * lto.c (lto_varpool_node_sets): New.
2798 (lto_1_to_1_map): Partition varpool too.
2799 (globalize_context_t, globalize_cross_file_statics,
2800 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2801 lto_scan_statics_in_remaining_global_vars): Remove.
2802 (lto_promote_cross_file_statics): Rewrite.
2803 (get_filename_for_set): Take vset argument.
2804 (lto_wpa_write_files): Pass around vsets.
2805
3bec79c5
DK
28062010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2807
2808 PR lto/42776
2809 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2810 hardcoding 'lto-elf.o'.
2811 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2812
2813 * lto-coff.h: New file.
2814 * lto-coff.c: Likewise.
2815
21aac880
RG
28162010-04-26 Richard Guenther <rguenther@suse.de>
2817
2818 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2819
2cee0101
DK
28202010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2821
2822 * lto.h (lto_elf_file_open): Rename prototype from this ...
2823 (lto_obj_file_open): ... to this.
2824 (lto_elf_file_close): Likewise ...
2825 (lto_obj_file_close): ... and likewise.
2826 (lto_elf_build_section_table): Likewise ...
2827 (lto_obj_build_section_table): ... and likewise.
2828 (lto_elf_begin_section): Likewise ...
2829 (lto_obj_begin_section): ... and likewise.
2830 (lto_elf_append_data): Likewise ...
2831 (lto_obj_append_data): ... and likewise.
2832 (lto_elf_end_section): Likewise ...
2833 (lto_obj_end_section): ... and likewise.
2834 * lto.c (lto_file_read): Update references to the above.
2835 (lto_wpa_write_files): Likewise.
2836 (lto_read_all_file_options): Likewise.
2837 (read_cgraph_and_symbols): Likewise.
2838 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2839 (LANG_HOOKS_APPEND_DATA): Likewise.
2840 (LANG_HOOKS_END_SECTION): Likewise.
2841 * lto-elf.c (lto_elf_file_open): Rename from this ...
2842 (lto_obj_file_open): ... to this, updating any references.
2843 (lto_elf_file_close): Likewise ...
2844 (lto_obj_file_close): ... and likewise.
2845 (lto_elf_build_section_table): Likewise ...
2846 (lto_obj_build_section_table): ... and likewise.
2847 (lto_elf_begin_section): Likewise ...
2848 (lto_obj_begin_section): ... and likewise.
2849 (lto_elf_append_data): Likewise ...
2850 (lto_obj_append_data): ... and likewise.
2851 (lto_elf_end_section): Likewise ...
2852 (lto_obj_end_section): ... and likewise.
2853
bc58d7e1
JH
28542010-04-21 Jan Hubicka <jh@suse.cz>
2855
2856 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2857 (materialize_cgraph): Likewise.
2858
e792884f
JH
28592010-04-21 Jan Hubicka <jh@suse.cz>
2860
2861 * lto.c (lto_wpa_write_files): Update.
2862 (read_cgraph_and_symbols): Be more verbose.
2863 (materialize_cgraph): Likewise.
2864 (do_whole_program_analysis): Likewise.
2865
c9945504
JH
28662010-04-21 Jan Hubicka <jh@suse.cz>
2867
2868 * lto.c (globalize_cross_file_statics): When function has address taken,
2869 it needs to be public.
2870
a837268b
JH
28712010-04-20 Jan Hubicka <jh@suse.cz>
2872
2873 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2874 (lto_add_all_inlinees): Likewise.
2875 (lto_wpa_write_files): Likewise.
2876
3b9e5d95
EB
28772010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2878
2879 * lto-lang.c (lto_init): Remove second argument in call to
2880 build_common_tree_nodes.
2881
8ccb78f2
RO
28822010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2883
2884 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2885 function.
2886
2f9b99e6
EB
28872010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2888
2889 PR bootstrap/43276
2890 * lto-elf.c: Define EM_* constants if not already defined.
2891
bef7d288
EB
28922010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2893
2894 * lto-elf.c (is_compatible_architecture): New static function.
2895 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2896
f68df07c
RG
28972010-02-11 Richard Guenther <rguenther@suse.de>
2898
2899 PR driver/43021
2900 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2901 appropriately.
2902
3cdea2b4
AH
29032010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2904
2905 * lto.c (O_BINARY): Define.
2906 (lto_read_section_data): Open file in binary mode.
2907 * lto-elf.c (O_BINARY): Define.
2908 (lto_elf_file_open): Open file in binary mode.
2909
c59449fa
RG
29102010-01-08 Richard Guenther <rguenther@suse.de>
2911
2912 PR lto/42528
2913 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2914 (lto_init): Do not init char_type_node in a standard way
2915 but according to flag_signed_char.
2916
d7fb0a6d
L
29172010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2918
2919 PR lto/41564
2920 * lto.c (DUMPBASE_SUFFIX): New.
2921 (lto_execute_ltrans): Append a sequence number to -dumpbase
2922 for LTRANS.
2923
78ce4053
L
29242010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2925
2926 PR lto/42580
2927 * lto-elf.c (lto_elf_file_open): Stop if the command line
2928 option file is missing.
2929
2a71eb48
RG
29302009-12-15 Richard Guenther <rguenther@suse.de>
2931
2932 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2933 (lto_post_options): Do not disable debuginfo.
2934
a818bca1
DG
29352009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2936
2937 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2938
e7d00517
RG
29392009-12-11 Richard Guenther <rguenther@suse.de>
2940
2941 PR lto/42037
2942 * lto.c (lto_resolution_read): Properly grow the vector.
2943
1ab53893
RG
29442009-12-11 Richard Guenther <rguenther@suse.de>
2945
2946 PR lto/41915
2947 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2948 to the C99 default. Do not set flag_unit_at_a_time.
2949
0f900dfa
JJ
29502009-11-28 Jakub Jelinek <jakub@redhat.com>
2951
2952 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2953 variable.
2954
92fa7608
RAE
29552009-11-19 Rafael Avila de Espindola <espindola@google.com>
2956
2957 PR bootstrap/42096
2958 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2959 * lto.c (lto_parse_hex): New.
2960 (lto_resolution_read): Use lto_parse_hex.
2961 * lto.h (lto_parse_hex): New.
2962
9870fe4f
RAE
29632009-11-17 Rafael Avila de Espindola <espindola@google.com>
2964
2965 * lto-elf.c (lto_file_init): Add offset argument.
2966 (lto_elf_file_open): Record the offset.
2967 * lto.c (lto_resolution_read): Change file_name into a lto_file
2968 argument. Check offsets.
2969 (lto_file_read): Update call to lto_resolution_read.
2970 * lto.h (lto_file_struct): Add the offset field.
2971
1b70729f
RAE
29722009-11-16 Rafael Avila de Espindola <espindola@google.com>
2973
2974 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2975
0e3776db
JH
29762009-11-14 Jan Hubicka <jh@suse.cz>
2977
2978 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2979
06bd7f56
RAE
29802009-11-12 Rafael Avila de Espindola <espindola@google.com>
2981
2982 * lang.opt (fresolution): Renamed from resolution.
2983 * lto-lang.c (lto_handle_option): Handle new option name.
2984 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2985
7e9dc421
RG
29862009-11-04 Richard Guenther <rguenther@suse.de>
2987 Rafael Avila de Espindola <espindola@google.com>
2988
2989 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2990 (lto_elf_file_open): Handle offsets in arguments name@offest.
2991
b207f900
RG
29922009-10-30 Richard Guenther <rguenther@suse.de>
2993
2994 PR lto/41858
2995 * lto.c (lto_file_read): Do not set file_data->fd.
2996 (lto_read_section_data): Use a single-entry file-descriptor cache.
2997 Do not check the result of xmalloc.
2998 (free_section_data): Do not use file_data->fd.
2999 (lto_read_all_file_options): Likewise.
3000
2c928155
RG
30012009-10-22 Richard Guenther <rguenther@suse.de>
3002
3003 * lto.c (lto_fixup_jump_functions): Remove.
3004 (lto_fixup_decls): Do not fixup jump functions.
3005 (read_cgraph_and_symbols): Schedule cgraph merging after
3006 summary reading. Schedule type and decl fixup before
3007 summary reading.
3008
f9c91f8a
RB
30092009-10-22 Richard Guenther <rguenther@suse.de>
3010
3011 * lto.c (lto_fixup_data_t): Remove free_list member.
3012 (lto_fixup_tree): Do not insert into free_list.
3013 (free_decl): Remove.
3014 (lto_fixup_decls): Remove free-list handling.
3015
fb3f88cc
JH
30162009-10-22 Jan Hubicka <jh@suse.cz>
3017
3018 * lto.c (lto_fixup_jump_functions): New function.
3019 (lto_fixup_decls): Use it.
3020
35f1e9f4
RG
30212009-10-16 Richard Guenther <rguenther@suse.de>
3022
3023 PR lto/41715
3024 * lto.c (lto_fixup_tree): Revert last change.
3025
200c8750
RG
30262009-10-14 Richard Guenther <rguenther@suse.de>
3027
3028 * lto.c (lto_fixup_tree): In case the prevailing decl is not
3029 compatible with the one we replace wrap it around a
3030 VIEW_CONVERT_EXPR.
3031
b1b07c92
RG
30322009-10-09 Richard Guenther <rguenther@suse.de>
3033
3034 PR lto/41635
3035 PR lto/41636
3036 * lto.c (read_cgraph_and_symbols): Do not assert we can open
3037 a file.
3038 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
3039 (init_ehdr##BITS): Likewise.
3040
3c2e7d45
JM
30412009-10-08 Joseph Myers <joseph@codesourcery.com>
3042
3043 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
3044 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
3045 diagnostics.
3046 * lto-lang.c (lto_post_options): Remove trailing "." from
3047 diagnostics.
3048
0d0bfe17
RG
30492009-10-08 Richard Guenther <rguenther@suse.de>
3050
3051 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
3052 hash tables.
3053
4bedf19a
JM
30542009-10-07 Joseph Myers <joseph@codesourcery.com>
3055
3056 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
3057
b20996ff
JH
30582009-10-07 Jan Hubicka <jh@suse.cz>
3059
3060 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
3061 ltrans stage; explain why this is needed and should not.
3062
1a735925
RG
30632009-10-05 Richard Guenther <rguenther@suse.de>
3064
3065 PR lto/41552
3066 PR lto/41487
3067 * lto.c (lto_read_decls): Do not register deferred decls.
3068 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3069 until after reading the IPA summaries.
3070
d7f09764
DN
30712009-10-02 Rafael Avila de Espindola <espindola@google.com>
3072
3073 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3074 (lto-lang.c): Don't include lto/common.h.
3075
30762009-10-02 Rafael Avila de Espindola <espindola@google.com>
3077
3078 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3079 (lto/common.o): Remove.
3080 * common.c: Remove.
3081 * common.h (lto_kind_str): Remove.
3082 (lto_visibility_str): Remove.
3083 (lto_resolution_str): Make it static.
3084
30852009-10-01 Diego Novillo <dnovillo@google.com>
3086
3087 * lto.c (lto_read_decls): Add comment.
3088 Call internal_error instead of gcc_assert.
3089 (lto_resolution_read): Likewise.
3090 (lto_add_all_inlinees): Tidy.
3091 * Make-lang.in: Fix copyright boilerplate.
3092 (lto.pdf): New.
3093 (lto.install-pdf): New.
3094 * lto-tree.h: Fix copyright boilerplate.
3095 * lang-specs.h: Likewise.
3096 Remove ".lto" entry from compilers fragment.
3097 * lto-elf.c: Move inclusion of gelf.h after config.h.
3098 Tidy formatting everywhere.
3099 * lto.h: Fix copyright boilerplate.
3100 Tidy formatting everywhere.
3101 * common.c: Likewise.
3102 * config-lang.in: Likewise.
3103 * common.h: Likewise.
3104 * lto-lang.c: Likewise.
3105
31062009-10-01 Richard Guenther <rguenther@suse.de>
3107
3108 * lto.c (lto_read_section_data): Use plain lseek/read.
3109
31102009-10-01 Richard Guenther <rguenther@suse.de>
3111
3112 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3113 use sysconf to query the system page size.
3114 (lto_file_read): Implement fallback using stdio.
3115 (free_section_data): Likewise.
3116
31172009-09-29 Diego Novillo <dnovillo@google.com>
3118
3119 * lto-lang.c (lto_init): Really fix call to
3120 build_common_builtin_nodes.
3121
31222009-09-29 Diego Novillo <dnovillo@google.com>
3123
3124 * lto-lang.c (lto_init): Fix call to
3125 build_common_builtin_nodes.
3126
31272009-09-29 Richard Guenther <rguenther@suse.de>
3128
3129 PR lto/40754
3130 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3131 in bytes.
3132 (first_data_block): New static variable.
3133 (lto_elf_append_data): Align the first data block in each
3134 section.
3135
31362009-09-28 Diego Novillo <dnovillo@google.com>
3137
3138 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3139 * lto.c (strip_extension): New.
3140 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3141 (lto_execute_ltrans): Tidy.
3142 Do not pass -fwpa nor -fltrans-* to LTRANS.
3143 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3144 * tree.c (need_assembler_name_p): Call
3145 lang_hooks.decls.may_need_assembler_name_p if set.
3146 * varasm.c (default_binds_local_p_1): Remove check for
3147 flag_ltrans.
3148 * varpool.c (decide_is_variable_needed): Do not test for
3149 in_lto_p.
3150
31512009-09-22 Richard Guenther <rguenther@suse.de>
3152
3153 PR lto/39276
3154 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3155 * Make-lang.in: Remove ltrans-driver stuff.
3156 * config-lang.in: Likewise.
3157 * lang.opt (fltrans-driver): Remove.
3158 * lto-lang.c (lto_init_options): Remove code initializing
3159 ltrans_driver.
3160 * ltrans-driver: Remove.
3161
31622009-09-21 Diego Novillo <dnovillo@google.com>
3163
3164 * lto-lang.c (lto_define_builtins): Remove superfluous
3165 calls to targetm.init_builtins and build_common_builtin_nodes.
3166 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3167 build_common_builtin_nodes.
3168 * lto.c (lto_materialize_function): Do nothing if NODE is a
3169 clone.
3170
31712009-09-03 Diego Novillo <dnovillo@google.com>
3172
3173 * lto-elf.c (validate_file): Replace call to
3174 elf_getshstrndx with call to elf_getshdrstrndx.
3175
31762009-08-19 Richard Guenther <rguenther@suse.de>
3177
3178 * lto-lang.c (lto_init): Merge char_type_node with the
3179 appropriately signed variant.
3180
31812009-08-19 Richard Guenther <rguenther@suse.de>
3182
3183 PR lto/41071
3184 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3185 (lto_fixup_type): Re-build the pointer-to chain part two.
3186
31872009-08-19 Richard Guenther <rguenther@suse.de>
3188
3189 PR lto/41071
3190 * lto.c (lto_fixup_type): Re-build the type variant chain.
3191
31922009-08-19 Richard Guenther <rguenther@suse.de>
3193
3194 PR lto/41071
3195 * lto.c (lto_fixup_constructor): New function.
3196 (lto_fixup_tree): Replace all types. Properly fixup
3197 constructors and constants.
3198
31992009-08-14 Richard Guenther <rguenther@suse.de>
3200
3201 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3202 for DECL_LANG_SPECIFIC.
3203
32042009-08-13 Richard Guenther <rguenther@suse.de>
3205
3206 PR lto/41032
3207 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3208
32092009-07-30 Richard Guenther <rguenther@suse.de>
3210
3211 PR lto/40903
3212 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3213 the largest decl for output and free TREE_CHAIN for further
3214 use.
3215
32162009-07-24 Diego Novillo <dnovillo@google.com>
3217
3218 * Make-lang.in: Add empty lto.install-plugin target.
3219
32202009-07-13 Diego Novillo <dnovillo@google.com>
3221
3222 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3223
32242009-07-11 Richard Guenther <rguenther@suse.de>
3225
3226 * lto-lang.c (lto_write_globals): Wrapup global decls.
3227
32282009-07-10 Richard Guenther <rguenther@suse.de>
3229
3230 * lto-lang.c (lto_init): Allocate one more location to make
3231 BUILTINS_LOCATION correct.
3232
32332009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3234
3235 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3236
32372009-07-06 Diego Novillo <dnovillo@google.com>
3238
3239 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3240 TYPE_SIZE_UNIT.
3241
32422009-07-06 Diego Novillo <dnovillo@google.com>
3243
3244 * lto.c (preload_common_nodes): Remove.
3245 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3246 (lto_read_decls): Call lto_data_in_create and
3247 lto_data_in_delete.
3248 (free_decl): Do not call ggc_free.
3249 (lto_main): Call lto_init_reader.
3250 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3251 (lto_init): Initialize main_identifier_node if needed.
3252 Make ptrdiff_type_node be integer_type_node.
3253
32542009-06-19 Diego Novillo <dnovillo@google.com>
3255
3256 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3257 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3258 Remove code guarded by #ifdef LOCAL_TRACE.
3259
32602009-06-18 Diego Novillo <dnovillo@google.com>
3261
3262 * lto.c: Update license to GPLv3.
3263 * lto-elf.c: Likewise.
3264 * common.c: Likewise.
3265 * lto-lang.c: Likewise.
3266 * lto.h: Remove superfluous include files. Update all
3267 users.
3268
32692009-06-17 Diego Novillo <dnovillo@google.com>
3270
3271 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3272
32732009-06-02 Diego Novillo <dnovillo@google.com>
3274
3275 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3276 read in.
3277 (materialize_cgraph): Only materialize nodes that have a
3278 representation on file.
3279
32802009-06-01 Diego Novillo <dnovillo@google.com>
3281
3282 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3283
32842009-05-31 Diego Novillo <dnovillo@google.com>
3285
3286 * lto-lang.c (lto_type_for_mode): Handle all the modes
3287 handled in c_common_type_for_mode.
3288
32892009-05-21 Diego Novillo <dnovillo@google.com>
3290
3291 * lto-elf.c: Always include <gelf.h>.
3292 * config-lang.in (target_libs): Remove.
3293 (build_by_default): Set to no.
3294
32952009-05-15 Diego Novillo <dnovillo@google.com>
3296
3297 * lto.c (lto_materialize_function): Assert that DECL is
3298 not a builtin.
3299 (materialize_cgraph): Don't try to materialize builtin
3300 functions.
3301 * lto-section-out.c (write_symbol_vec): Do not write
3302 builtin functions.
3303
33042009-05-13 Diego Novillo <dnovillo@google.com>
3305
3306 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3307
33082009-05-07 Diego Novillo <dnovillo@google.com>
3309
3310 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3311 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3312 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3313 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3314 (lto_fixup_tree): Call gimple_register_type when *TP is a
3315 type.
3316 (lto_main): Call bitmap_obstack_initialize.
3317
33182009-04-22 Diego Novillo <dnovillo@google.com>
3319
3320 * lto.c (free_section_data): Tidy.
3321 (lto_1_to_1_map): Tidy.
3322 (lto_add_all_inlinees): Tidy.
3323 (prefix_name_with_star): New.
3324 (get_filename_for_set): New.
3325 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3326 to determine what cgraph node sets to write.
3327 Call get_filename_for_set to compute temporary file
3328 names.
3329 (lto_execute_ltrans): Do not execute LTRANS on files with
3330 names that start with '*'.
3331 Move logic to execute LTRANS together so that LTRANS is
3332 invoked only if there are any files to compile.
3333 (do_whole_program_analysis): Only remove output files
3334 that do not start with '*'.
3335
33362009-04-06 Diego Novillo <dnovillo@google.com>
3337
3338 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3339 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3340 (lto_add_all_inlinees): Tidy.
3341
33422009-03-26 Diego Novillo <dnovillo@google.com>
3343
3344 * lto.c: Include gimple.h.
3345 (lto_read_in_decl_state): Call gimple_register_type for
3346 every type in every stream.
3347 (lto_fixup_common): Call gimple_register_type if T has a
3348 type.
3349 (do_whole_program_analysis): Call print_lto_report.
3350 (lto_main): Call print_lto_report after cgraph_optimize.
3351 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3352
33532009-03-24 Diego Novillo <dnovillo@google.com>
3354
3355 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3356 (lto.o): Add dependency on GIMPLE_H.
3357
33582009-03-10 Simon Baldwin <simonb@google.com>
3359
3360 * lto.c (lto_read_all_file_options): Close any open file descriptor
3361 contained in file_data before freeing.
3362
33632009-02-24 Rafael Avila de Espindola <espindola@google.com>
3364
3365 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3366 for a decl in the original bitmap, not a node.
3367 (lto_add_all_inlinees): Remove original nodes that are not needed.
3368 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3369
33702009-02-24 Diego Novillo <dnovillo@google.com>
3371
3372 * lto.c (lto_materialize_function): Update
3373 lto_stats.num_function_bodies.
3374 (get_section_data): Initialize *LEN to 0.
3375 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3376 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3377 Update lto_stats.num_output_files.
3378 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3379 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3380 (lto_main): Initialize lto_stats.
3381 If flag_lto_report is set, call print_lto_report.
3382
33832009-02-19 Diego Novillo <dnovillo@google.com>
3384
3385 Revert
3386
3387 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3388
3389 * lto.c (lto_add_inline_clones): Don't add the
3390 master clone. Check for a decl in the original
3391 bitmap, not a node.
3392 (lto_add_all_inlinees): Remove original nodes
3393 that are not needed.
3394 (lto_scan_statics_in_cgraph_node): Don't care if
3395 the node is the master.
3396 (lto_promote_cross_file_statics): Use a new
3397 context.seen_node_decls for each set
3398
33992009-02-19 Rafael Avila de Espindola <espindola@google.com>
3400
3401 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3402 for a decl in the original bitmap, not a node.
3403 (lto_add_all_inlinees): Remove original nodes that are not needed.
3404 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3405 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3406 for each set
3407
34082009-02-18 Diego Novillo <dnovillo@google.com>
3409
3410 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3411 and TV_WHOPR_WPA_IO.
3412 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3413 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3414 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3415 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3416 depending on command line flags.
3417 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3418 (lto_main): Remove timer uses.
3419
34202009-02-18 Rafael Avila de Espindola <espindola@google.com>
3421
3422 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3423 (lto_wpa_write_files): Update calls to renamed functions.
3424
34252009-02-17 Diego Novillo <dnovillo@google.com>
3426
3427 PR 39203
3428 * lto-lang.c (lto_post_options): Disable -fwhole-program
3429 when running LTRANS.
3430
34312009-02-10 Diego Novillo <dnovillo@google.com>
3432
3433 * lto.c (read_cgraph_and_symbols): Fix comment.
3434
34352009-02-10 Diego Novillo <dnovillo@google.com>
3436
3437 * lto.c (read_cgraph_and_symbols): Read options from all
3438 IL files.
3439
34402009-02-10 Diego Novillo <dnovillo@google.com>
3441
3442 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3443 (materialize_cgraph): Likewise.
3444 (do_whole_program_analysis): Likewise.
3445 (lto_main): Call read_cgraph_and_symbols,
3446 materialize_cgraph and do_whole_program_analysis.
3447
34482009-02-10 Simon Baldwin <simonb@google.com>
3449
3450 * lto.c: Include lto-opts.h.
3451 * (lto_main): Clear file options at loop start, read any saved
3452 options from the first file handled, and re-issue options.
3453 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3454
34552009-02-02 Diego Novillo <dnovillo@google.com>
3456
3457 * lto.c (lto_main): Stop LTO_TIMER and use
3458 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3459
34602009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3461
3462 PR lto/38995
3463 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3464 to POINTER_SIZE.
3465
34662009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3467
3468 * Make-lang.in (LTO_EXE): Link with all
3469 BACKENDLIBS and not only GMPLIBS
3470
34712009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3472
3473 PR bootstrap/38992
3474 * lto-elf.c: Include gelf.h instead of libelf.h.
3475 (lto_elf_file_close): Replace elfx_update_shstrndx with
3476 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3477 gelf_update_ehdr.
3478
34792009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3480
3481 PR middle-end/38996
3482 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3483
34842009-01-26 Diego Novillo <dnovillo@google.com>
3485
3486 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3487
34882009-01-26 Diego Novillo <dnovillo@google.com>
3489
3490 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3491 and rename into gimple_types_compatible_p.
3492
34932009-01-12 Rafael Avila de Espindola <espindola@google.com>
3494
3495 * lto-lang.c (lang_hooks): Remove the const qualifier.
3496
34972009-01-06 Diego Novillo <dnovillo@google.com>
3498
3499 * ltrans-driver: Mark 'all' target as phony.
3500
35012008-12-31 Diego Novillo <dnovillo@google.com>
3502
3503 * ltrans-driver: Execute a NOP action for target 'all'.
3504
35052008-12-19 Diego Novillo <dnovillo@google.com>
3506
3507 * lto.c (lto_1_to_1_map): Tidy.
3508
35092008-12-19 Diego Novillo <dnovillo@google.com>
3510
3511 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3512 be opened, show its name.
3513 * ltrans-driver: If $verbose is set, do not use parallelism.
3514
35152008-12-17 Rafael Avila de Espindola <espindola@google.com>
3516
3517 * lto.c (lto_fixup_function): New.
3518 (lto_fixup_tree): Call lto_fixup_function.
3519
35202008-12-14 Doug Kwan <dougkwan@google.com>
3521
3522 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3523 variables if there is no function.
3524
35252008-12-10 Simon Baldwin <simonb@google.com>
3526
3527 * ltrans-driver: Always run make in silent mode, to avoid make's
3528 trace on stdout interfering with lto-wrapper output.
3529
35302008-12-10 Doug Kwan <dougkwan@google.com>
3531
3532 * lto.c (lto_add_inline_clones): Do not force master clones of
3533 inlined functions already in SET to be static inline.
3534
35352008-12-04 Doug Kwan <dougkwan@google.com>
3536
3537 * lto.c (globalize_context_t): New type to store states in
3538 globalization of cross-file statics.
3539 (globalize_cross_file_statics): New.
3540 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3541 static decls that need to be fixed up.
3542 (lto_scan_statics_in_cgraph_node): Change call interface to use
3543 a globalize_context_t CONTEXT for all states used.
3544 (lto_scan_statics_in_remaining_global_vars): New.
3545 (lto_promote_cross_file_statics): Use new call interface of
3546 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3547 visible vars in the last set.
3548
35492008-12-03 Diego Novillo <dnovillo@google.com>
3550
3551 * lto.c (lto_fixup_tree): Do not emit an error when
3552 PREVAILING throw but T doesn't.
3553
35542008-12-02 Doug Kwan <dougkwan@google.com>
3555
3556 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3557 from code in ...
3558 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3559 variables and functions.
3560 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3561 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3562
35632008-11-29 Diego Novillo <dnovillo@google.com>
3564
3565 * lto.c: Include timevar.h.
3566 (lto_materialize_function): Tidy. Add comments.
3567 (lto_wpa_write_files): Tidy.
3568 (lto_execute_ltrans): Tidy.
3569 (lto_main): Add local variable LTO_TIMER. Initialize it
3570 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3571 Start and stop the timer.
3572 Tidy comments.
3573 * Make-lang.in (lto.o): Add dependency on timevar.h.
3574 * ltrans-driver: React to -v and -save-temps.
3575 Use simple heuristic to determine how much parallelism to
3576 use when executing make.
3577
35782008-11-12 Doug Kwan <dougkwan@google.com>
3579
3580 * lto.c (lto_bitmap_obstack): Remove var.
3581 (lto_materialize_function): Do nothing instead of marking function
3582 body in file if flag_wpa is true.
3583 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3584 (lto_scan_statics_in_cgraph_node): New function.
3585 (lto_promote_cross_file_statics): Same.
3586 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3587 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3588 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3589
35902008-11-09 Diego Novillo <dnovillo@google.com>
3591
3592 * lto/lto.c (lto_fixup_tree): Change error message locus
3593 information to include location of mismatching
3594 declaration.
3595 Use TREE_NO_WARNING to avoid repeated messages.
3596 (lto_main): If lto_fixup_decls emitted any errors, exit.
3597 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3598 (lto_init_options): Don't enable exceptions by default.
3599 (lto_eh_runtime_type): Move to lto-function-in.c
3600 (lto_init_eh): Likewise.
3601 (lto_init): Don't call lto_init_eh.
3602 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3603 libfuncs.h and except.h.
3604
36052008-10-30 Diego Novillo <dnovillo@google.com>
3606
3607 * lto.c (lto_read_decls): Declare debug_main only if
3608 LTO_STREAM_DEBUGGING is enabled.
3609
36102008-10-30 Simon Baldwin <simonb@google.com>
3611
3612 * lto.c (lto_wpa_write_files): Create intermediate files with
3613 make_cwd_temp_file().
3614 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3615 WPA_SAVE_LTRANS is set.
3616 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3617 * ltrans-driver: Do not strip directory from output files.
3618
36192008-10-29 Doug Kwan <dougkwan@google.com>
3620
3621 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3622 DECL.
3623 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3624 (lto/lto-symtab.o): Remove rule.
3625 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3626 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3627 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3628 Remove macros.
3629 lto-symtab.c (File): Move up one level.
3630 lto-lang.c (cgraph.h): Remove include.
3631 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3632 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3633 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3634
36352008-10-24 Rafael Espindola <espindola@google.com>
3636
3637 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3638 non prevailing weak symbols.
3639
36402008-10-24 Rafael Espindola <espindola@google.com>
3641
3642 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3643
36442008-10-24 Rafael Espindola <espindola@google.com>
3645
3646 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3647 different types.
3648
36492008-10-23 Simon Baldwin <simonb@google.com>
3650
3651 * lto-lang.c (input_node): Save the node reference, rather than the
3652 node pointer, in node->inlined_to.
3653 (input_cgraph_1): Convert node references into node pointers.
3654
36552008-10-22 Diego Novillo <dnovillo@google.com>
3656 Rafael Espindola <espindola@google.com>
3657
3658 * lto.c (lto_resolution_read): Tidy.
3659 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3660 abort if RET is NULL.
3661
36622008-10-22 Doug Kwan <dougkwan@google.com>
3663
3664 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3665 exceptions flag is given.
3666 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3667 (lto_init_eh): Remove exceptions flag initialization.
3668 (lto_init): Only call lto_init_eh if exceptions flag is set.
3669
36702008-10-21 Diego Novillo <dnovillo@google.com>
3671
3672 * lto.c: Tidy some formatting.
3673 * lto.h: Likewise.
3674
36752008-10-21 Simon Baldwin <simonb@google.com>
3676
3677 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3678 them is NULL (but not the other).
3679
36802008-10-17 Diego Novillo <dnovillo@google.com>
3681
3682 * ltrans-driver: Divert output from make to a temporary file.
3683 Show it if the call to make failed.
3684
36852008-10-15 Diego Novillo <dnovillo@google.com>
3686
3687 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3688 Do not print TEMP_FILENAME
3689 * ltrans-driver: Call make with -s.
3690
36912008-10-15 Diego Novillo <dnovillo@google.com>
3692
3693 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3694 TREE_STATIC on global symbols.
3695
36962008-10-14 Ollie Wild <aaw@google.com>
3697
3698 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3699 (LTRANS_DRIVER_EXE): Add.
3700 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3701 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3702 (lto.install.common): Remove ltrans-driver.
3703 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3704 (LTRANS_DRIVER_EXE): New build rule.
3705 * config-lang.in (compilers): Add ltrans-driver.
3706
37072008-10-14 Diego Novillo <dnovillo@google.com>
3708
3709 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3710 of program name.
3711
37122008-10-13 Ollie Wild <aaw@google.com>
3713
3714 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3715 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3716 * ltrans-driver (LTRANS_FLAGS): Remove.
3717
37182008-10-08 Doug Kwan <dougkwan@google.com>
3719
3720 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3721 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3722 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3723 from lto_fixup_state to here.
3724 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3725 just a free-list. Fix up types also. Move decl merging code to
3726 lto_fixup_tree.
3727 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3728 object.
3729 (lto_fixup_decls): Use another pointer set to avoid multiple
3730 walking of nodes except for DECLs to be replaced. Pass an
3731 lto_fixup_data_t object to tree-walker.
3732
37332008-10-08 Rafael Espindola <espindola@google.com>
3734
3735 * lto-symtab.c (lto_symtab_set_resolution): New.
3736 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3737 lto_symtab_get_resolution.
3738 (lto_symtab_prevailing_decl): Return decl for non public decls.
3739 (lto_symtab_get_resolution): New.
3740 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3741
37422008-10-06 Rafael Espindola <espindola@google.com>
3743
3744 * lto-lang.c: Include cgraph.h.
3745 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3746 input_cgraph): Moved from lto-cgraph.c.
3747 (LANG_HOOKS_INPUT_CGRAPH): New.
3748
37492008-10-03 Rafael Espindola <espindola@google.com>
3750
3751 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3752
37532008-10-03 Rafael Espindola <espindola@google.com>
3754
3755 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3756 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3757 prevailing definition. Don't mark TREE_NOTHROW differences.
3758 * lto.c (lto_fixup_tree): New.
3759 (lto_fixup_state): New.
3760 (lto_fixup_state_aux): New.
3761 (free_decl): New.
3762 (lto_fixup_decls): New.
3763 (lto_main): Call lto_fixup_decls.
3764
37652008-10-02 Ollie Wild <aaw@google.com>
3766
3767 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3768 and Init.
3769 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3770 * lto-lang.c (lto_post_options): Add validation and fixups for
3771 -fltrans and -fwpa.
3772
37732008-10-02 Rafael Espindola <espindola@google.com>
3774
3775 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3776 lto_symtab_merge_decl): Return void.
3777 (lto_symtab_prevailing_decl): New.
3778
37792008-09-30 Rafael Espindola <espindola@google.com>
3780
3781 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3782 defined symbols.
3783 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3784 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3785 Check for already defined symbols.
3786 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3787 (LTO_IDENTIFIER_RESOLUTION): Remove.
3788 (LTO_DECL_RESOLUTION): New.
3789
37902008-09-30 Rafael Espindola <espindola@google.com>
3791
3792 * lto.c (lto_read_decls): Use new input_tree signature.
3793
37942008-09-26 Doug Kwan <dougkwan@google.com>
3795
3796 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3797 bodies affected by exception attribute merging of DECLs.
3798 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3799 merging.
3800
38012008-09-25 Rafael Espindola <espindola@google.com>
3802
3803 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3804 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3805 * lto-symtab.c (lto_symtab_compatible): New.
3806 (lto_symtab_overwrite_decl): New.
3807 (lto_symtab_merge_decl): Refactor to use the above functions
3808 and the resolution from lang_identifier.
3809 * lto-tree.h: Include plugin-api.h.
3810 (lang_identifier): Add resolution.
3811 (LTO_IDENTIFIER_RESOLUTION): New.
3812
38132008-09-25 Ollie Wild <aaw@google.com>
3814
3815 * lang.opt (fltrans-output-list=): New option.
3816 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3817
38182008-09-25 Rafael Espindola <espindola@google.com>
3819
3820 * lto.c (lto_resolution_read): Initialize ret;
3821
38222008-09-24 Ollie Wild <aaw@google.com>
3823
3824 * lto.c (sys/mman.h): Move include.
3825 (lto_wpa_write_files): Return a list of written files.
3826 (lto_execute_ltrans): New function.
3827 (lto_main): Call lto_execute_ltrans.
3828 (ltrans-driver): New file.
3829 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3830 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3831 (lto_init_options): Initialize ltrans_driver.
3832 (lto_handle_option): Fix incorrect default output value.
3833 * lang.opt (fltrans-driver=): New option.
3834 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3835 (lto.install-common): Add lto/ltrans-driver.
3836
38372008-09-24 Rafael Espindola <espindola@google.com>
3838
3839 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3840 (lto/lto.o): Depend on lto/common.h.
3841 (lto/common.o): New.
3842 * lang.opt (resolution): New.
3843 * lto-lang.c (resolution_file_name): New.
3844 (lto_handle_option): Handle OPT_resolution.
3845 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3846 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3847 pass it to lto_symtab_merge_decl.
3848 * lto.c: Include common.h.
3849 (lto_read_decls): Add resolutions and resolutions_size arguments.
3850 Initialize data_in.globals_resolution and
3851 data_in.globals_resolution_size.
3852 (index_and_symbol_resolution): New.
3853 (lto_resolution_read): New.
3854 (lto_file_read): Add argument resolution_file.
3855 Read resolution.
3856 * lto.h (resolution_file_name): New.
3857
38582008-09-23 Rafael Espindola <espindola@google.com>
3859
3860 * common.c: Update description.
3861 * common.h: Update description.
3862
38632008-09-23 Rafael Espindola <espindola@google.com>
3864
3865 * common.c: Moved from lto-plugin.
3866 * common.h: Moved from lto-plugin.
3867
38682008-09-22 Doug Kwan <dougkwan@google.com>
3869
3870 * lto.c (VEC(bitmap,heap)): Declare.
3871 (lto_materialize_function): Handle WAP mode specially.
3872 (lto_add_inline_clones): New.
3873 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3874 return a bitmap of inlined decls.
3875 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3876 (lto_main): Call reset_inline_failed to reset inlining states.
3877 Check call-graph after WPA inlining.
3878 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3879 unconditionally.
3880
38812008-09-19 Doug Kwan <dougkwan@google.com>
3882
3883 lto.c (lto_main): Remove unsued wrapper code.
3884 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3885
38862008-09-19 Rafael Espindola <espindola@google.com>
3887
3888 * lto-symtab.c: Include lto-tree-in.h.
3889 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3890 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3891 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3892
38932008-09-17 Paolo Bonzini <bonzini@gnu.org>
3894 Rafael Avila de Espindola <espindola@google.com>
3895
3896 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3897 COMPOUND_LITERAL_EXPR_DECL): Remove.
3898 (emit_local_var): Remove.
3899 (lto_expand_expr): Remove.
3900 (lto_staticp): Remove.
3901 (LANG_HOOKS_EXPAND_EXPR): Remove.
3902 (LANG_HOOKS_STATICP): Remove.
3903
39042008-09-11 Diego Novillo <dnovillo@google.com>
3905
3906 * lto-lang.c: Include except.h and libfuncs.h.
3907 (lto_init_eh): New.
3908 (lto_init): Call it.
3909 Set flag_generate_lto to 0.
3910 * Make-lang.in (lto-lang.o): Add dependency on except.h
3911 and libfuncs.h.
3912
39132008-09-09 Bill Maddox <maddox@google.com>
3914
3915 * lto-lang.c: Include header file expr.h.
3916 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3917 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3918 (emit_local_var): Copied from c-semantics.c.
3919 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3920 and c_staticp in c-common.c.
3921 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3922
39232008-09-08 Diego Novillo <dnovillo@google.com>
3924
3925 * lto-lang.c (lto_global_bindings_p): Return 1 during
3926 IPA passes.
3927
39282008-09-07 Diego Novillo <dnovillo@google.com>
3929
3930 * lto.c: Tidy formatting.
3931
39322008-08-04 Bill Maddox <maddox@google.com>
3933
3934 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3935
39362008-09-03 Doug Kwan <dougkwan@google.com>
3937
3938 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3939 CIF_OK instead of NULL.
3940
39412008-09-02 Diego Novillo <dnovillo@google.com>
3942 Simon Baldwin <simonb@google.com>
3943
3944 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3945 c_common_type_for_size.
3946 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3947 (lto_init): Call linemap_add.
3948 (signed_and_unsigned_types): Remove.
3949
39502008-08-29 Diego Novillo <dnovillo@google.com>
3951
3952 * lto-lang.c (handle_noreturn_attribute): New local function.
3953 (handle_const_attribute): New local function.
3954 (handle_malloc_attribute): New local function.
3955 (handle_pure_attribute): New local function.
3956 (handle_novops_attribute): New local function.
3957 (handle_nonnull_attribute): New local function.
3958 (handle_nothrow_attribute): New local function.
3959 (handle_sentinel_attribute): New local function.
3960 (handle_type_generic_attribute): New local function.
3961 (handle_format_attribute): New local function.
3962 (handle_format_arg_attribute): New local function.
3963 (lto_attribute_table): Declare.
3964 (lto_format_attribute_table): Declare.
3965 (lto_init_attributes): New local function.
3966 (lto_define_builtins): Call it.
3967 Call targetm.init_builtins and build_common_builtin_nodes.
3968 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3969 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3970
39712008-08-28 Diego Novillo <dnovillo@google.com>
3972
3973 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3974 $(GIMPLE_H).
3975 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3976 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3977 * lto-symtab.c: Include gimple.h.
3978 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3979 TREE_CHAIN.
3980
39812008-08-27 Doug Kwan <dougkwan@google.com>
3982
3983 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3984 gt-lto-lto.h): New includes.
3985 (lto_materialize_function): Do not read in function body in WPA mode.
3986 Format a line to fit in 80 columns.
3987 (lto_cgraph_node_sets): New garbage collected variable.
3988 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3989 New functions.
3990 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3991 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3992 variable LTO_SECTION_IN_H.
3993 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3994 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3995 with variable LTO_SECTION_IN_H.
3996 * config-lang.in (gtfiles): Add lto/lto.c.
3997 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3998 merged DECL_RESULT correctly.
3999
40002008-08-26 Bill Maddox <maddox@google.com>
4001
4002 * lto-lang.c Include tree-gimple.h.
4003 (lto_mark_addressable): Call mark_addressable rather than
4004 asserting.
4005 (lto_post_options): Suppress debug info generation.
4006 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
4007
3f8257db 40082008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
4009
4010 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
4011 assertion and leave an explanatory comment in its place.
4012
40132008-08-21 Doug Kwan <dougkwan@google.com>
4014
4015 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
4016 of common nodes instead of computing locallly.
4017 (lto_read_in_decl_state): New.
4018 (lto_read_decls): Change code for udpate in struct lto_decl_header.
4019 Read global and per-function in-decl states.
4020 * Make-lang.in (LTO_H): Update dependency.
4021 (lto/lto.o): Same.
4022 (lto-symtab.c): Merge (revision 139039)
4023 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
4024
40252008-08-21 Rafael Espindola <espindola@google.com>
4026
4027 * config-lang.in (target_libs): New.
4028
40292008-08-20 Bill Maddox <maddox@google.com>
4030
4031 * lto.c (current_lto_file): Remove GTY marker from static
4032 variable. Remove include of file gt-lto-lto.h.
4033 * Make-lang.in: Remove dependency of lto/lto.o on
4034 gt-lto-lto.h.
4035 * lto-elf.c (lto_file_close): Removed.
4036 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
4037 allocate lto_elf_file object.
4038 (lto_elf_file_close): Free lto_elf_file object after close.
4039 * lto.h (struct lto_file_struct): Remove GTY marker.
4040 * config-lang.in: Remove lto/lto.h and lto/lto.c from
4041 gtfiles.
4042
40432008-08-20 Bill Maddox <maddox@google.com>
4044
4045 * lto.c (lto_read_decls): Provide dummy argument to input_tree
4046 to conform to its new signature.
4047 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
4048 on discarded node here, now called in global_vector_fixup.
4049
40502008-08-09 Bill Maddox <maddox@google.com>
4051
4052 * lto.c (preload_common_nodes): Verify that fileptr_type_node
4053 has not been set to a front-end-specific value.
4054
40552008-08-05 Doug Kwan <dougkwan@google.com>
4056
4057 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
4058 build breakage.
4059
40602008-07-30 Bill Maddox <maddox@google.com>
4061
4062 * lto.c (lto_materialize_function): Call lto_original_decl_name.
4063 Remove obsolete comments.
4064 (lto_read_decls): Remove initialization of deleted field data_in.global.
4065 Tidy up comments.
4066 (lto_main): Remove redundant initialization of section_hash_table.
4067 * lto-elf.c: Removed obsolete comments.
4068 * lto.h: Tidy up comments.
4069 * lto-symtab.c (lto_least_common_multiple): New function.
4070 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4071 Tidy up comments.
4072
40732008-07-25 Diego Novillo <dnovillo@google.com>
4074 Bill Maddox <maddox@google.com>
4075
4076 * lto.c: Re-order include files.
4077 Include lto-section-out.h.
4078 (preload_common_nodes): Add debugging output.
4079 Add new local INDEX_TABLE.
4080 Call preload_common_node.
4081 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4082
40832008-07-13 Bill Maddox <maddox@google.com>
4084
4085 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4086 unwanted scaling during pointer addition.
4087
40882008-07-11 Bill Maddox <maddox@google.com>
4089 Diego Novillo <dnovillo@google.com>
4090
4091 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4092 Make code const-correct.
4093 (lto_file_read): Fix C++ compatibility warnings.
4094 (lto_read_section_data): Fix C++ compatibility warnings.
4095 (lto_get_section_data): Use CONST_CAST to avoid warning when
4096 const pointer passed to free.
4097 * lto-elf.c (lto_elf_build_section_table): Fix C++
4098 compatibility warnings.
4099 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4100 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4101 (lto_get_current_out_file): Fix C++ compatibility warnings.
4102
41032008-07-11 Diego Novillo <dnovillo@google.com>
4104
4105 * Make-lang.in (lto-warn): Define.
4106
41072008-07-03 Simon Baldwin <simonb@google.com>
4108
4109 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4110 LTO_STREAM_DEBUGGING.
4111
41122008-06-27 Ollie Wild <aaw@google.com>
4113
4114 * lto-elf.c (lto-section-out.h): New include.
4115 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4116 and data members.
4117 (cached_file_attrs): New static variable.
4118 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4119 Use cached_file_attrs for checking bits.
4120 (lto_elf_build_section_table): Remove elf_file argument from
4121 lto_elf_get_shdr and lto_elf_free_shdr calls.
4122 (DEFINE_INIT_SHDR): New macro.
4123 (init_shdr32, init_shdr64): New functions defined via the
4124 DEFINE_INIT_SHDR macro.
4125 (lto_elf_begin_section_with_type): New function.
4126 (lto_elf_begin_section): New function.
4127 (lto_elf_append_data): New function.
4128 (lto_elf_end_section): New function.
4129 (DEFINE_VALIDATE_EHDR): New macro.
4130 (validate_ehdr32, validate_ehdr64): New functions defined via the
4131 DEFINE_VALIDATE_EHDR macro.
4132 (validate_file): New function.
4133 (DEFINE_INIT_EHDR): New macro.
4134 (init_ehdr32, init_ehdr64): New functions defined via the
4135 DEFINE_INIT_EHDR macro.
4136 (init_ehdr): New function.
4137 (lto_elf_file_open): Add support for writable files. Move some
4138 validation logic to validate_file.
4139 (lto_elf_file_close): Add support for writable files. Write file data
4140 and free data blocks.
4141 (current_out_file): New static variable.
4142 (lto_set_current_out_file): New function.
4143 (lto_get_current_out_file): New function.
4144 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4145 Add temporary initialization for testing ELF serialization.
4146 * lto.h (lto-section-out.h): New include.
4147 (struct lto_file_struct): Slight modification to comment.
4148 (lto_elf_file_open): Add writable parameter.
4149 (lto_elf_begin_section): New function declaration.
4150 (lto_elf_append_data): New function declaration.
4151 (lto_elf_end_section): New function declaration.
4152 (lto_set_current_out_file, lto_get_current_out_file): New function
4153 declarations.
4154 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4155 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4156 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4157 * Make-lang.in (LTO_H): Add lto-section-out.h.
4158
41592008-06-12 Ollie Wild <aaw@google.com>
4160
4161 * lto.h (struct lto_file_vtable_struct): Remove.
4162 (struct lto_file_struct): Remove vtable member.
4163 * lto-elf.c (lto_file_init): Remove vtable argument.
4164 (lto_elf_map_optional_lto_section): Remove.
4165 (lto_elf_unmap_section): Remove.
4166 (lto_elf_file_vtable): Remove.
4167 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4168 lto_file_init call.
4169 (lto_elf_find_section_data): Remove.
4170
41712008-06-11 Ollie Wild <aaw@google.com>
4172
4173 * lto.c (lto_file_read): Add const qualifier to data variable.
4174
41752008-06-11 Diego Novillo <dnovillo@google.com>
4176
4177 Merge from lto-streamber sub-branch.
4178
4179 2008-06-04 Ollie Wild <aaw@google.com>
4180
4181 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4182 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4183
4184 2008-05-28 Bill Maddox <maddox@google.com>
4185
4186 Replace the DWARF reader in the LTO front-end.
4187
4188 * lto.c: Include lto-tree-in.h, lto-tags.h.
4189 (enum DWARF2_class, DW_cl_constant, struct
4190 DWARF2_form_data, struct lto_context,
4191 lto_fd_init, lto_info_fd_init,
4192 lto_abbrev_fd_init, lto_info_fd_close,
4193 lto_file_init, lto_file_close,
4194 lto_file_corrupt_error, lto_abi_mismatch_error,
4195 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4196 lto_read_uleb128, lto_read_sleb128,
4197 lto_read_initial_length, lto_abbrev_read_attrs,
4198 lto_abbrev_read, lto_abbrev_read_lookup,
4199 lto_read_section_offset,
4200 lto_read_comp_unit_header, find_cu_for_offset,
4201 lto_get_file_name,
4202 lto_resolve_reference,lto_read_form,
4203 attribute_value_as_int,
4204 make_signed_host_wide_int,
4205 attribute_value_as_constant, lto_cache_hash,
4206 lto_cache_eq, lto_cache_store_DIE,
4207 lto_cache_lookup_DIE, lto_find_integral_type,
4208 lto_find_integral_type_1,
4209 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4210 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4211 lto_unsupported_attr_error, lto_get_identifier,
4212 lto_read_referenced_type_DIE,
4213 lto_read_compile_unit_DIE,
4214 lto_read_array_type_DIE,
4215 lto_read_structure_union_class_type_DIE,
4216 lto_read_enumerator_DIE,
4217 lto_read_enumeration_type_DIE,
4218 lto_read_only_for_child_DIEs,
4219 lto_read_only_for_child_DIEs,
4220 lto_read_member_DIE, lto_read_abbrev,
4221 lto_read_variable_formal_parameter_constant_DIE,
4222 lto_get_body): Removed.
4223 (preload_common_nodes): New function.
4224 (lto_read_decls): Convert for new global streamer.
4225 (lto_materialze_file_data,
4226 lto_read_subroutine_type_subprogram_die,
4227 lto_read_unspecified_parameters_DIE,
4228 lto_read_typedef_DIE,
4229 lto_read_pointer_reference_type_DIE,
4230 lto_read_subrange_type_DIE,
4231 lto_read_base_type_DIE,
4232 lto_read_const_volatile_restrict_type_DIE,
4233 lto_read_namespace_DIE,
4234 lto_read_unspecified_type_DIE, lto_read_DIE,
4235 lto_read_child_DIEs, lto_collect_child_DIEs):
4236 Removed.
4237 (lto_info_read, lto_set_cu_context): Removed.
4238 (lto_file_read): Convert for new global streamer.
4239 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4240 lto_resolve_var_ref, lto_resolve_fn_ref,
4241 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4242 lto_resolve_namespacedecl_ref): Removed.
4243 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4244 * lto-tree.h (lto_symtab_merge_var,
4245 lto_symtab_mergee_fun): Declare here.
4246 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4247 (lto_elf_file_open): Removed code to read DWARF debug sections.
4248 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4249 DWARF2_CompUnit, lto_die_ptr,
4250 lto_die_cache_entry, lto_fd, lto_info_fd,
4251 lto_abbrev_fd): Removed.
4252 (lto_file): Removed debug_info and debug_abbrev fields.
4253 (lto_ref): Removed.
4254 (lto_file_init, lto_file_close,
4255 lto_resolve_type_ref, lto_resolve_var_ref,
4256 lto_resolve_fn_ref, lto_resolve_field_ref,
4257 lto_resolve_typedecl_ref,
4258 lto_resolve_namespacedecl_ref,
4259 lto_get_file_name): Removed declarations.
4260 (lto_symtab_merge_var, lto_symtab_merge_fn):
4261 Declarations moved to lto-tree.h.
4262 * lto-symtab.c (lto_compatible_attributes_p):
4263 Lobotomize this, as it barfs on "Hello, world!".
4264 * lto-section-out.c: Include lto-tree-out.h.
4265 (lto_hash_global_slot_node,
4266 lto_eq_global_slot_node, preload_common_nodes,
4267 write_global_stream, write_global_references):
4268 New functions.
4269 (produce_asm_for_decls): Convert for new global streamer.
4270 * lto-section-out.h (lto_hash_global_slot_node,
4271 lto_eq_global_slot_node): Declare.
4272
3f8257db 42732008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4274 Jan Hubicka <jh@suse.cz>
4275
4276 * lto.c (sys/mman.h, tree-pass.h): New includes.
4277 (lto_materialize_constructors_and_inits,
4278 lto_materialize_function): Keeps length of section.
4279 (lto_materialize_cgraph): Removed.
4280 (lto_read_decls): Initialize fd field.
4281 (lto_file_read): Different return type and removed much code to
4282 lto_main.
4283 (page_mask): New variable.
4284 (lto_read_section_data, get_section_data, free_section_data): New
4285 functions.
4286 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4287 passes can get the section data.
4288
3f8257db 42892008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4290
4291 * lto.h (lto_read_decls): Made local.
4292 (lto_input_function_body, lto_input_constructors_and_inits,
4293 lto_input_cgraph): Declarations moved to lto-section-in.h.
4294 * lto-section-in.c: Moved to .. .
4295 * lto-cgraph-in.c: Ditto.
4296 * lto-section-in.h: Ditto.
4297 * lto-function-in.c: Ditto.
4298 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4299 (lto_insert_block): Removed.
4300 (LANG_HOOKS_INSERT_BLOCK): Removed.
4301 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4302 lto-section-in.o): Rules moved to lto/Makefile.in.
4303
4304
43052008-05-16 Ollie Wild <aaw@google.com>
4306
4307 * lto-lang.c (tree-inline.h): Include.
4308 (lto_post_options): New function.
4309 (LANG_HOOKS_POST_OPTIONS): Define.
4310 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4311 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4312
43132008-05-13 Diego Novillo <dnovillo@google.com>
4314
4315 * lto-function-in.c (input_ssa_names): Call
4316 make_ssa_name_fn instead of make_ssa_name.
4317
43182008-05-12 Diego Novillo <dnovillo@google.com>
4319
4320 * lto-cgraph-in.c (overwrite_node): Update references to
4321 inline summary fields.
4322 * lto-function-in.c (input_expr_operand): Do not handle
4323 STRUCT_FIELD_TAG.
4324
43252008-05-09 Ollie Wild <aaw@google.com>
4326
4327 * lang.opt: New file.
4328 * lto-lang.c (lto_init_options): New function.
4329 (lto_handle_option): New function.
4330 (lto_init): Move initialization of flag_unit_at_a_time to
4331 lto_init_options.
4332 (LANG_HOOKS_INIT_OPTIONS): Define.
4333 (LANG_HOOKS_HANDLE_OPTION): Define.
4334
43352008-04-29 Ollie Wild <aaw@google.com>
4336
4337 * lto.c (lto_read_namespace_DIE): New function.
4338 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4339 NAMESPACE_DECL DIE's.
4340 (lto_resolve_namespacedecl_ref): New function.
4341 * lto.h (lto_resolve_namespacedecl_ref): New function.
4342 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4343 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4344 and num_namespace_decls.
4345 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4346 * lto-lang.c (lto_init_ts): New function.
4347 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4348
43492008-04-16 Ollie Wild <aaw@google.com>
4350
4351 * lto-function-in.c (input_type_ref): Updated function description.
4352
43532008-04-16 Ollie Wild <aaw@google.com>
4354
4355 * lto-function-in.c (input_type_ref_1): New function.
4356 (input_type_ref): Split into two functions.
4357 (input_function): Add support for type contexts.
4358
43592008-04-16 Ollie Wild <aaw@google.com>
4360
4361 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4362 section name
4363
43642008-04-16 Ollie Wild <aaw@google.com>
4365
4366 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4367 list of supported languages.
4368
3f8257db 43692008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4370
4371 Merge with mainline @133491.
4372
3f8257db 43732008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4374 Jan Hubicka <jh@suse.cz>
4375
4376 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4377 fd->unmaterialized_fndecls.
4378 (lto_get_file_name, lto_materialize_cgraph): New function.
4379 (lto_materialize_constructors_and_inits,
4380 lto_materialize_function): Read info directly from elf file.
4381 (lto_file_read): Made local and initialize dictionary so that
4382 other lto sections can be read without reprocessing the elf file.
4383 (lto_main): Read all functions after all files have been processed
4384 for their types, globals and cgraph.
4385 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4386 dependencies.
4387 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4388 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4389 (lto_elf_read_symtab): Removed function.
4390 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4391 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4392 (lto_file_read): Made local.
4393 (lto_get_file_name, lto_elf_build_section_table,
4394 lto_input_cgraph):
4395 New function.
4396 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4397 New functions.
4398 (lto_read_decls): Get the file name.
4399 * lto-cgraph-in.c: New file.
4400 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4401 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4402 (input_labels): Fixed latent sizeof issue.
4403 (input_function): Build stmt array to set call sites into cgraph
4404 edges.
4405 (lto_read_body): Reset cfun->curr_properties.
4406 * lto_section_in.h (lto_section_slot): New structure.
4407 (section_hash_table.lto_file_decl_data): New field.
4408
4409
3f8257db 44102008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4411
4412 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4413 reconstruct static initializers.
4414 (lto_get_body, lto_materialize_function): Add lto_section_type as
4415 a parameter.
4416 (lto_materialize_constructors_and_inits,
4417 lto_materialize_file_data): New function.
4418 (lto_materialize_function,
4419 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4420 unmap_section and map_fn_body to map_section.
4421 (lto_set_cu_context): Process functions and static inits
4422 differently.
4423 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4424 lto/lto-section-in.o): Update dependencies.
4425 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4426 lto_section_type parameter.
4427 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4428 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4429 renamed the other two so that there is only one map function and
4430 one unmap function and each takes a section type parameter.
4431 (lto_read_function_body): Renamed to lto_input_function_body and
4432 added file_data parameter.
4433 (lto_read_var_init): Removed.
4434 (lto_input_constructors_and_inits): New function.
4435 * lto-section-in.c (lto_read_decls): New function.
4436 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4437 var_decls, type_decls, types to lto_file_decl_data.
4438 (input_type_ref, input_expr_operand, lto_read_body): Get
4439 field_decls, fn_decls, var_decls, type_decls, types from different
4440 structure.
4441 (input_globals, input_constructor, lto_read_var_init): Removed.
4442 (input_constructors_or_inits): New function.
4443 (lto_read_function_body, lto_input_constructors_and_inits):
4444 Renamed to lto_input_function_body and takes file_data parameter.
4445 * lto-section-in.h (lto_file_decl_data): New structure.
4446
3f8257db 44472008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4448
4449 * lto-function-in.c (input_globals.c): Changed input type to
4450 lto_function_header.
4451 (input_bb): Removed code to deserialize the stmt number.
4452 (input_function): Renumber all stmts after they are input.
4453 (lto_read_body, lto_read_function_body, lto_read_var_init):
4454 Changed to used new header format and enum section_type.
4455 *lto-lang.c (success): Removed.
4456
44572008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4458
4459 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4460 (lto_elf_free_sym): Likewise.
4461
4462 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4463 (lto_elf_build_init): Likewise.
4464
3f8257db 44652008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4466
4467 * lto-read.c: Renamed to lto-function-in.c.
4468 (input_1_unsigned): Moved to lto-section-in.c and renamed
4469 lto_input_1_unsigned.
4470 (input_uleb128): Moved to lto-section-in.c and renamed
4471 lto_input_uleb128.
4472 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4473 lto_input_widest_uint_uleb128.
4474 (input_sleb128): Moved to lto-section-in.c and renamed
4475 lto_input_sleb128.
4476 (input_integer): Moved to lto-section-in.c and renamed
4477 lto_input_integer.
4478 (debug_in_fun): Moved to lto-section-in.c and renamed
4479 lto_debug_in_fun.
4480 (input_block): Moved to lto-section-in.h and renamed
4481 lto_input_block.
4482 (input_expr_operand): Fixed to allow lists with more than one
4483 element.
4484 * lto-section-in.h: New file.
4485 * lto-section-in.c: New file with changes from above.
4486 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4487 (lto-section-in.o): New rule.
4488
44892007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4490
4491 * lto-read.c (input_expr_operand): Mark static and external
4492 VAR_DECLs as needed.
4493
44942007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4495
4496 * lto-read.c (input_integer): Use the correct shift amount.
4497
44982007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4499
4500 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4501 (LANG_HOOKS_NAME): Define.
4502
45032007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4504
4505 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4506 original function to...
4507 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4508 don't have a base type.
4509 (lto_read_enumeration_type_DIE): Examine the values of the
4510 enumeration to determine whether we can use an unsigned type for
4511 the base type of the enumeration.
4512
45132007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4514
4515 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4516 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4517
45182007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4519
4520 * lto-lang.c (lto_types_compatible_p): New function.
4521 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4522
45232007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 4524 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4525
4526 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4527 (input_local_vars): Read in DECL_INITIAL and context for local
4528 statics that need to be put in unexpanded_vars_list.
4529
45302007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4531
4532 * lto-read.c (input_real): Use a separate null-terminated buffer
4533 for calling real_from_string.
4534 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4535 tell cgraph that it's needed.
4536
45372007-12-19 Doug Kwan <dougkwan@google.com>
4538
4539 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4540
45412007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4542
4543 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4544 (lto_file_read): Reset the members of 'context' every time we read
4545 a toplevel DIE, with special attention to last_param_type.
4546
45472007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4548
4549 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4550 'declaration'. Set the assembler name for non-public functions.
4551
3f8257db 45522007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4553
4554 * lto_read.c (data_in.unexpanded_indexes): New array.
4555 (input_local_var): Added code to read in unexpanded_var_list
4556 indexes for variables. Only read in DECL_CHAIN field for
4557 parameters.
4558 (input_local_vars): Added code to rebuild unexpanded_var_list in
4559 order using unexpanded_indexes.
4560 (input_function): Added code to set DECL_CONTEXT for functions.
4561
45622007-12-13 Doug Kwan <dougkwan@google.com>
4563
4564 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4565 in pointer and reference types.
4566
45672007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4568
4569 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4570 RESULT_DECL.
4571
45722007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4573
4574 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4575 already read the DIE.
4576 (lto_get_body): New function, split out from...
4577 (lto_materialize_function): ...here. Call it.
4578 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4579 determine DECL_EXTERNAL.
4580 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4581 FUNCTION_DECLs when necessary. Use the type of the actual
4582 function definition if we are unable to easily merge types. Ignore
4583 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4584 necessary.
4585
45862007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4587
4588 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4589
45902007-12-12 Bill Maddox <maddox@google.com>
4591
4592 Revert
4593 2007-12-07 Bill Maddox <maddox@google.com>
4594
4595 * lto.c (lto_str_fd_init): New function.
4596 (lto_str_fd_close): New function.
4597 (lto_file_init): Call lto_str_fd_init.
4598 (lto_file_close): Call lto_str_fd_close.
4599 (lto_str_read): New function. Read debug string table.
4600 (lto_str_lookup): New function. Get string for debug
4601 string table offset.
4602 (lto_read_form): Recognize DW_FORM_strp.
4603 (lto_file_read): Invoke lto_str_read.
4604
4605 * lto-elf.c (lto_elf_file_open): Read raw section data
4606 for the .debug_str section, if present.
4607
4608 * lto.h (struct lto_str_fd_struct): New struct.
4609 (struct lto_file_struct): Added new field DEBUG_STR
4610 to hold the file descriptor for the debug string table.
4611
46122007-12-07 Bill Maddox <maddox@google.com>
4613
4614 * lto.c (lto_str_fd_init): New function.
4615 (lto_str_fd_close): New function.
4616 (lto_file_init): Call lto_str_fd_init.
4617 (lto_file_close): Call lto_str_fd_close.
4618 (lto_str_read): New function. Read debug string table.
4619 (lto_str_lookup): New function. Get string for debug
4620 string table offset.
4621 (lto_read_form): Recognize DW_FORM_strp.
4622 (lto_file_read): Invoke lto_str_read.
4623
4624 * lto-elf.c (lto_elf_file_open): Read raw section data
4625 for the .debug_str section, if present.
4626
4627 * lto.h (struct lto_str_fd_struct): New struct.
4628 (struct lto_file_struct): Added new field DEBUG_STR
4629 to hold the file descriptor for the debug string table.
4630
46312007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4632
4633 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4634 Grow the basic_block_info and label_to_block_map vectors if
4635 necessary. Read in the block chain.
4636
46372007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4638
4639 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4640
46412007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4642
4643 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4644
46452007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4646
4647 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4648 (lto_read_body): Don't declare PROP_alias.
4649
46502007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4651
4652 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4653 argument type information.
4654
46552007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4656
4657 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4658 TREE_THIS_VOLATILE if the associated type is a volatile type.
4659 (lto_materialize_function): Remove call to init_ssa_operands.
4660 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4661 variable when reading an SSA_NAME. Do the same when reading a
4662 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4663 (input_cfg): Call init_ssa_operands.
4664 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4665 Move call to init_tree_ssa...
4666 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4667 add_referenced_var on any variables referenced from the body of the
4668 function. Inform the rest of the compiler we are in SSA form and
4669 inform later passes about the current properties.
4670
46712007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4672
4673 * lto.c (lto_materialize_function): Add FIXME.
4674
46752007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4676
4677 * lto-lang.c (enum built_in_attribute): New enum.
4678 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4679 built_in_attributes): New variables.
4680 (def_builtin_1): New function.
4681 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4682
46832007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4684
4685 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4686 DECL_SOURCE_LOCATION for debugging purposes.
4687 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4688 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4689 laying out the decl until later.
4690 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4691 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4692 TREE_ADDRESSABLE.
4693 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4694 operand of an ADDR_EXPR.
4695 * lto-lang.c (enum lto_builtin_type): New enum.
4696 (builtin_type): New typedef.
4697 (builtin_types, string_type_node, const_string_type_node,
4698 wint_type_node, intmax_type_node, uintmax_type_node,
4699 signed_size_type_node): New variables.
4700 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4701 lto_build_c_type_nodes): New functions.
4702 (lto_init): Initialize builtin types.
4703 (lto_set_decl_assembler_name): Let the target machine mangle the
4704 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4705
47062007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4707
4708 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4709 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4710 the type is a constant type. Set the assembler name and inform
4711 the rest of the compiler about the new decl if the decl is not
4712 public.
4713 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4714 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4715 try to read in function bodies for functions that already have bodies.
4716 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4717 equivalency.
4718 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4719 Check for whether we matched a builtin function type before calling
4720 lto_same_type_p on the generated type. Permit cases where the
4721 declaration of an array is unbounded, but the definition is bounded.
4722 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4723 DECL_SIZE_UNIT if necessary.
4724
3f8257db 47252007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4726
4727 * lto-read.c (input_expr_operand): Get types right
4728 for COMPLEX_CST.
4729
3f8257db 47302007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4731
4732 * lto-read.c (make_new_block, input_cfg): Properly set
4733 n_basic_blocks.
4734
47352007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4736
4737 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4738 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4739
47402007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4741
4742 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4743 construct the integer type for bitfields.
4744
3f8257db 47452007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4746
4747 * lto-read.c (data_in.current_node_has_loc): Removed.
4748 (input_line_info): Returns true if node needs line set.
4749 (set_line_info): Always sets line if called.
4750 (clear_line_info): Removed reference to current_node_needs_loc.
4751 (input_expr_operand): Keeps track locally if current node needs a loc.
4752 (input_local_var): Added code to handle DECL_INITIAL for
4753 static local vars. Only set loc if necessary.
4754
47552007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4756
4757 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4758 DECL_CONTEXT.
4759
47602007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4761
4762 * lto.c: Include langhooks.h.
4763 (lto_find_integral_type): Rework logic to handle the case where
4764 got_byte_size is true, but the bitsize requested and that of the
4765 base_type doesn't match.
4766 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4767 asm_name if we are creating a VAR_DECL.
4768 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4769 definition.
4770 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4771 function reference and use the builtin's decl if so. Set the
4772 DECL_CONTEXT of the RESULT_DECL for the function.
4773 * lto-lang.c (registered_builtin_fndecls): New variable.
4774 (lto_getdecls): Return it.
4775 (lto_builtin_function): Chain the new decl onto
4776 registered_builtin_fndecls.
4777
3f8257db 47782007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4779
4780 * lto-read.c (process_tree_flags, lto_static_init_local):
4781 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4782 (input_line_info, clear_line_info): Fixed new line number code.
4783 (input_expr_operand): Added type to SWITCH_EXPR.
4784 (lto_read_body): Properly initialized data_in.
4785 Clear line info when leaving.
4786
47872007-11-13 Diego Novillo <dnovillo@google.com>
4788
4789 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4790 Initialize ARTIFICIAL.
4791 (lto_read_subroutine_type_subprogram_DIE): Initialize
4792 SAVED_SCOPE.
4793 * lto-read.c (set_line_info): Remove ; from calls to
4794 LINEMAP_POSITION_FOR_COLUMN.
4795
3f8257db 47962007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4797
4798 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4799 (input_expr_operand, input_local_var): Renamed get_type_ref to
4800 input_type_ref.
4801 (input_expr_operand): Get the types correct for
4802 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4803
48042007-11-13 Doug Kwan <dougkwan@google.com>
4805
4806 * lto-read.c (input_widest_uint_uleb128): New function.
4807 (input_tree_flags, process_tree_flags, input_line_info,
4808 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4809 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4810 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4811 (lto_static_init_local): Add code to assert that lto_flags_type is
4812 wide enough.
4813
48142007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4815
4816 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4817 (lto_read_subroutine_type_subprogram_DIE): Handle
4818 DW_AT_static_link and DW_AT_specification. Return the
4819 specification if present.
4820 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4821
48222007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4823
4824 * lto-lang.c: Include target.h.
4825 (registered_builtin_types): New variable.
4826 (lto_type_for_mode): Increase number of modes handled.
4827 (lto_builtin_function): Fix argument list and return the decl.
4828 (lto_register_builtin_type): New function.
4829 (lto_init): Initialize target builtins and language-independent
4830 nodes.
4831 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4832
3f8257db 48332007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4834
4835 * lto-read.c (input_expr_operand): Added code to properly handle
4836 index filed. Added new RANGE_EXPR case.
4837
3f8257db 48382007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4839
4840 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4841 (data_in): Added current_node_has_loc field.
4842 (input_line_info, set_line_info, clear_line_info): Added a support
4843 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4844 did not have on on the source side.
4845 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4846 numbers too.
4847
48482007-11-09 Doug Kwan <dougkwan@google.com>
4849
4850 * lto-read.c (input_expr_operand): Change type of operand 2 of
4851 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4852
48532007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4854
4855 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4856 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4857 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4858 the new decl we are creating. Move informing the middle end about
4859 the new decl to...
4860 (lto_main): ...here. Inform the middle end about global variables
4861 after we have read in all the input files.
4862 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4863 variables with internal linkage, so delete the check for internal
4864 linkage. Combine TREE_PUBLIC flags.
4865
48662007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4867
4868 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4869 DW_AT_decl_line.
4870 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4871 builtin specially. Move check for attribute compatibility
4872 earlier.
4873
48742007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4875
4876 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4877 * config-lang.in (gtfiles): Add lto.h and lto.c.
4878 * lto-elf.c: Include ggc.h.
4879 (lto_elf_file_open): Allocate elf_file from GC memory.
4880 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4881 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4882 in GC memory.
4883 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4884 (lto_file_close): Free file from GC memory.
4885 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4886 (lto_read_member_DIE): Fix declaration.
4887 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4888 in GC memory.
4889 (current_lto_file): New variable.
4890 (lto_main): Use it.
4891 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4892 lto_die_cache_entry): Move to...
4893 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4894 declarations accordingly.
4895 (struct lto_file_struct): Declare.
4896 (lto_file_vtable): Use it instead of lto_file.
4897
48982007-11-06 Alon Dayan <alond@il.ibm.com>
3f8257db 4899 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4900
4901 * lto-read.c (process_flags, lto_static_init_local):
4902 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4903 change global array num_flags_for_code to flags_length_for_code.
4904 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4905
49062007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4907
4908 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4909 layout functions to compute information about the newly constructed
4910 type.
4911
49122007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4913
4914 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4915 case to use DECL_RESULT if necessary.
4916
3f8257db 49172007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4918
4919 * lto-read.c (input_tree_list): Removed.
4920 (input_tree_flags): Added parameter to force flags no matter what
4921 tree code.
4922 (input_expr_operand): Added parameter to input_tree_flags.
4923 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4924 input_expr_operand rather than input_tree_lists.
4925 (input_local_var): Use input_expr_operand to read attributes
4926 rather then input_tree_list.
4927 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4928
49292007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4930
4931 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4932 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4933 TYPE_DECL for it.
4934 * lto-read.c (lto_read_body): Use correct sizes for calculating
4935 type_decls_offset and types_offset.
4936
49372007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4938
4939 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4940 with GENERIC_NEXT.
4941 * config-lang.in (gtfiles): Add lto-lang.c.
4942 * lto-lang.c: Include gt-lto-lto-lang.h.
4943 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4944 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4945 (lto/lto-read.o): Likewise.
4946
3f8257db 49472007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4948
4949 * lto-read.c (data_in): Added type_decls and current_col fields.
4950 (string_slot): New type to hold canonized file name.
4951 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4952 input_line_info, set_line_info, clear_line_info): New functions.
4953 (file_name_hash_table): New hash table.
4954 (input_local_var, input_labels, input_local_vars_index,
4955 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4956 (input_uleb128): Changed type of byte var.
4957 (input_expr_operand): Large number of changes to get line numbers
4958 correct. Added TYPE_DECL case.
4959 (input_globals): Added code to get TYPE_DECLs processed.
4960 (input_local_var): Added code to process line numbers and
4961 TREE_CHAIN and DECL_CONTEXT.
4962 (input_function, input_constructor): Added call to
4963 clear_line_number.
4964 (lto_static_init_local): Added code to get line numbers correct.
4965 (lto_read_body): Added code to get TYPE_DECLS read and to change
4966 parameters to the calls above that had their parms reorganized.
4967
4968
49692007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4970
4971 * lto.h (lto_resolve_typedecl_ref): Declare.
4972 * lto.c (lto_resolve_typedecl_ref): New function.
4973
49742007-10-29 Mark Mitchell <mark@codesourcery.com>
4975 Nathan Froyd <froydnj@codesourcery.com>
4976
4977 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4978 DIEs even if we find an abstract origin for this DIE.
4979
49802007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4981
4982 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4983 RESULT_DECL slightly earlier. Only remember the decl for later
4984 if we successfully merge declarations.
4985
3f8257db 49862007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4987
4988 * lto-read.c (input_expr_operand): Give label_values the proper
4989 context and provide switch statements with a default type.
4990
49912007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4992
4993 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4994 * lto.c (lto_materialize_function): ...to here.
4995
49962007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4997
4998 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4999 * lto.c (lto_info_fd_init): Initialize it.
5000 (lto_info_fd_close): Free it.
5001 (lto_materialize_function): New function.
5002 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
5003 unmaterialized_fndecls.
5004 (lto_file_read): Read in all the function bodies after we have read
5005 all of the DWARF info.
5006 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
5007 reading a function body.
5008
3f8257db 50092007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5010
5011 * lto-read.c (input_tree_flags): Renamed from input_flags to be
5012 semetric with output_tree_flags. Added call to log flags.
5013 (process_tree_flags): Renamed from process_flags. Fixed a lot of
5014 type issues to make everything consistent with flags being
5015 unsigned HOST_WIDE_INTS.
5016 (input_expr_operand): Added call to
5017 recompute_tree_invariant_for_addr_expr.
5018 (input_local_var): Added debugging for tree_chains. Now calls
5019 input_tree_flags.
5020 (input_phi): Made flags unsigned HOST_WIDE_INT.
5021 (input_ssa_names): Now calls input_tree_flags.
5022 (lto_read_body): Now sets cfun.
5023 (lto_read_function_body): Now sets current_function_pointer.
5024
50252007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5026
5027 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
5028 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
5029 inspecting fields within.
5030 (lto_read_DIE_at_ptr): Delete check for null result; let callers
5031 handle this appropriately.
5032
50332007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5034
5035 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
5036 DW_AT_abstract_origin properly. Ensure that we're not dealing with
5037 both DW_AT_abstract_origin and DW_AT_specification.
5038 (lto_read_subroutine_type_subprogram_DIE): Handle
5039 DW_AT_abstract_origin.
5040 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
5041 (lto_read_DIE_at_ptr): Define as static to match declaration.
5042 Lookup the PTR in the cache before reading it from the file.
5043 (lto_resolve_var_ref): Adjust accordingly.
5044 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
5045 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
5046
50472007-10-19 Nathan Froyd <froydnj@codesourcery.com>
5048
5049 * lto.c (lto_read_DIE_at_ptr): New function.
5050 (lto_resolve_var_ref): Use it.
5051 (lto_resolve_fn_ref): Use it.
5052 (lto_resolve_field_ref): Use it.
5053 (lto_read_variable_formal_parameter_constant_DIE): Follow
5054 DW_AT_specification and return the associated decl when appropriate.
5055
50562007-10-18 Nathan Froyd <froydnj@codesourcery.com>
5057
5058 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
5059 Implement for scalar integer modes.
5060 (lto_init): Initialize size_type_node.
5061
3f8257db 50622007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5063
5064 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5065 (input_local_var): Add chaining for params.
5066 (input_ssa_names): Add cfun parameter.
5067 (input_function): Remove unnecessary else.
5068
50692007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5070
5071 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5072 (lto_resolve_var_ref): Use proper types.
5073 (lto_resolve_fn_ref): Likewise.
5074 (lto_resolve_field_ref): Likewise.
5075
50762007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5077
5078 * lto-read.c (input_expr_operand): Remove case.
5079
50802007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5081
5082 * lto.c (lto_read_only_for_child_DIEs): New function.
5083 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5084 * lto-elf.c (lto_elf_map_lto_section): Remove.
5085 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5086 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5087 SSA_NAME. Add missing case for mechanical codes.
5088 (input_cfg): Use basic_block_info_for_function instead of
5089 basic_block_info.
5090
3f8257db 50912007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5092
5093 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5094 (input_list): Renamed input_tree_list and modified to follow same
5095 protocol as lto-function-out.c:output_tree_list.
5096 (input_expr_operand): Make asm operands use input_tree_list.
5097 (input_local_var): Now uses input_tree_list.
5098 (lto_read_body): Change placement for setting context of debug_labels.
5099
5100
3f8257db 51012007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5102
5103 * lto-read.c (input_real): Output debugging in proper order.
5104 (input_integer): Compute bit lengths properly.
5105 (input_list): Clean up declaration.
5106 (input_expr_operand): Change calls to input_real to match fix.
5107 Make reading of LTO_bit_field_ref1 match output.
5108 (input_local_var): Make reading of attributes match what is being
5109 written.
5110 (dump_debug_stream): Also print char in hex.
5111 (debug_out_fun): Fix signed unsigned mismatch.
5112
51132007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5114
5115 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5116 DW_AT_GNU_vector specially, as they are not contiguous with the
5117 specified set of attribute names. Use class_mask to check for
5118 errors at the end of the function
5119 (lto_resolve_var_ref): Read the DIE if it is not cached.
5120 (lto_resolve_fn_ref): Likewise.
5121 (lto_resolve_field_ref): Likewise.
5122
51232007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5124
5125 * lto.c: Include dwarf2out.h.
5126 (lto_cache_store_DIE): Assert that we never change the value.
5127 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5128 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5129 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5130 sensible type instead.
5131 (lto_read_structure_union_class_type_DIE): Store the newly
5132 created type prior to reading the members of the structure to
5133 avoid infinite recursion. Avoid computing types and alignments
5134 for structures whose sizes are unknown.
5135 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5136 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5137 DW_AT_const_value, and DW_AT_specification.
5138 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5139 Return early if we have already constructed the function type.
5140 (lto_read_typedef_DIE): Check to see if the type has been cached
5141 already. Cache the type before reading any children.
5142 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5143 (lto_read_DIE): Unset context->skip_non_parameters around reading
5144 the DIE.
5145 (lto_resolve_fn_ref): Delete trailing whitespace.
5146
3f8257db 51472007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5148
5149 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5150
51512007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5152
5153 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5154
51552007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5156
5157 * lto-lang.c (signed_and_unsigned_types): New variable.
5158 (lto_type_for_size): Consult signed_and_unsigned_types to find
5159 an approprite type, creating it if necessary.
5160 (lto_set_decl_assembler_name): Add actual method body.
5161
51622007-09-06 Jim Blandy <jimb@codesourcery.com>
5163
5164 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5165 can't find a var init for this variable, leave its DECL_INITIAL.
5166 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5167 lto_elf_map_fn_body.
5168 (lto_map_lto_section): New function.
5169 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5170 bodies, and lto_elf_map_optional_lto_section for variable
5171 initializers.
5172 (lto_elf_find_section_data): Quietly return NULL if the section is
5173 missing.
5174 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5175
5176 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5177
5178 * lto-read.c (lto_read_body): Doc fix.
5179
3f8257db 51802007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5181
5182 * lto-read.c (fun_in): Renamed to data_in.
5183 (input_expr_operand, input_local_var, input_string_internal,
5184 input_string, input_real, input_list, get_label_decl,
5185 get_type_ref, input_expr_operand, input_globals, input_labels,
5186 input_local_vars_index, input_local_var, input_local_vars,
5187 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5188 (input_constructor): New function.
5189 (lto_read_function_body): Renamed to lto_read_body and generalized
5190 to handle both functions and constructors.
5191 (lto_read_function_body, lto_read_var_init): New function.
5192
5193
3f8257db 51942007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5195
5196 * lto-read.c (input_expr_operand): Assert that there really is a
5197 FUNCTION_DECL.
5198 (input_globals): Removed checks on 0 section.
5199
3f8257db 52002007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5201
5202 * lto-read.c (fun_in): Added local_decls_index and
5203 local_decls_index_d.
5204 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5205 (input_globals): Enabled code to handle FIELD_DECLs.
5206 (input_local_vars_index, input_local_vars): New function.
5207 (input_local_var): Changed to allow locals to be input randomly.
5208 (lto_read_function_body): Added code to input the
5209 local_decls_index and to free various structures.
5210
52112007-08-17 Jim Blandy <jimb@codesourcery.com>
5212
5213 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5214 ATTRIBUTE_UNUSED from 'die' formal.
5215
5216 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5217 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5218 (input_list): Fix type of 'tag'.
5219 (input_expr_operand): Fix type of 'tag' argument. Update
5220 declaration. Fix type of 'ctag'. Add default case to switch,
5221 since the type of the switched value is now an enum.
5222 (input_local_vars): Fix type of 'tag'.
5223 (input_bb): Fix type of 'tag' argument.
5224 (input_function): Fix type of 'tag' argument.
5225
52262007-08-16 Jim Blandy <jimb@codesourcery.com>
5227
5228 * lto.c (lto_read_member_DIE): Record the tree we create in
5229 fd->die_cache. (Our 'die' argument is no longer unused.)
5230 (lto_resolve_field_ref): New function.
5231 * lto.h (lto_resolve_field_ref): New declaration.
5232
52332007-08-15 Jim Blandy <jimb@codesourcery.com>
5234
5235 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5236
52372007-08-07 Jim Blandy <jimb@codesourcery.com>
5238
5239 * lto.c (lto_read_form): Complete attr_classes table.
5240 (DWARF2_form_data): Doc fix.
5241
52422007-08-05 Mark Mitchell <mark@codesourcery.com>
5243
5244 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5245 and unmap_var_init.
5246 (lto_read_var_init): Declare.
5247 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5248 interface for reading variable initializers.
5249 * lto-elf.c (lto_elf_read_var_init): Remove.
5250 (lto_elf_file_vtable): Update initializer.
5251 (lto_elf_read_var_init): Add comment about unused-ness.
5252 * lto-read.c (lto_read_var_init): New.
5253
5254 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5255
3f8257db 52562007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5257
5258 * lto-read.c (lto_read_function_body): Moved declaration of fn
5259 outside of ifdef.
5260
3f8257db 52612007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5262
5263 * lto-read.c (input_uleb128, input_string_internal, input_real,
5264 input_integer, input_record_start, input_list, get_type_ref,
5265 input_flags, input_expr_operand, input_expr_operand,
5266 input_expr_operand, input_local_vars, input_cfg, input_phi,
5267 input_ssa_names, input_bb, input_function): Added semicolons.
5268
5269
3f8257db 52702007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5271
5272 * lto-read.c (input_globals): Remove debugging.
5273 (input_function): Set DECL_ARGUMENTS.
5274
3f8257db 52752007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5276
5277 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5278 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5279 (input_phi): Made work with operands other than SSA_NAMES and
5280 fixed processing of flags.
5281 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5282 (input_flags): New function.
5283 * lto-lang.c (lto_init): Changed state of in_lto_p.
5284
5285
52862007-07-24 Mark Mitchell <mark@codesourcery.com>
5287
5288 * lto-tree.h (lto_varargs_cookie): Remove.
5289 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5290 skip_non_parameters, skip_parameters.
5291 (lto_varargs_cookie): Remove.
5292 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5293 parameter types.
5294 (lto_read_abbrev): New function.
5295 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5296 child DIEs.
5297 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5298 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5299 (lto_file_read): Initialize new context fields.
5300 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5301 (lto_unsigned_type): Remove.
5302 (lto_signed_type): Likewise.
5303 (lto_signed_or_unsigned_type): Likewise.
5304 (lto_init): Do not create lto_varargs_cookie.
5305 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5306 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5307 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5308
53092007-07-19 Jan Hubicka <jh@suse.cz>
5310
5311 * lto-read.c (lto_read_function_body): Produce empty scope block
5312 to avoid crash.
5313
53142007-07-18 Mark Mitchell <mark@codesourcery.com>
5315
5316 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5317 process local variables.
5318 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5319
3f8257db 53202007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5321
5322 * lto-read.c (input_list, input_expr_operand): Added struct
5323 function parameter.
5324 (init_cfg, finalize_cfg): Removed function.
5325 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5326 (input_labels, input_local_vars): Now takes input_block parameter rather than
5327 synthsyzing it.
5328 (input_cfg, input_phi, input_ssa_names): New functions.
5329 (input_bb): Now passes in input_blocks. Does not construct cfg
5330 and processes the list of phi functions.
5331 (input_function): Now builds both the cfg and ssa_names table.
5332 (lto_read_function_body): Processes new header fields to construct
5333 streams for the ssa_names and cfg and their debugging.
5334 * lto/lto-lang.c (lto_init): Set in_lto_p.
5335
5336
53372007-06-28 Mark Mitchell <mark@codesourcery.com>
5338
5339 * lto.h (lto_file_vtable): Add read_var_init.
5340 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5341 initializers.
5342 (lto_main): Remove bogus asserts.
5343 * lto-elf.c (tm.h): Include it.
5344 (libiberty.y): Likewise.
5345 (lto_elf_file): Add strtab and symtab. Rename
5346 string_table_section_index to sec_strtab.
5347 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5348 (lto_elf_get_shdr): New function.
5349 (lto_elf_free_shdr): Likewise.
5350 (lto_elf_find_section_data): Use them.
5351 (lto_elf_read_symtab): New function.
5352 (lto_elf_lookup_sym): Likewise.
5353 (lto_elf_free_sym): Likewise.
5354 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5355 (lto_elf_built_init): New function.
5356 (lto_elf_read_var_init): Likewise.
5357 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5358
3f8257db 53592007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5360
5361 * lto-read (make_new_block): Initialize the stmt_list.
5362 (lto_static_init_local): Add debugging for missing codes.
5363
53642007-06-26 Mark Mitchell <mark@codesourcery.com>
5365
5366 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5367 unprototyped functions.
5368
53692007-06-23 Mark Mitchell <mark@codesourcery.com>
5370
5371 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5372 Handle DW_AT_MIPS_linkage_name.
5373 (lto_read_subroutine_type_subprogram): Likewise. Correct
5374 compilation errors.
5375 (lto_main): Remove incorrect assertions.
5376 * lto-symbtab.c: Build function types out of TREE_LISTs.
5377
5378 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5379
5380 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5381
3f8257db 53822007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5383
5384 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5385 dummy since ggc does not like empty structs.
5386 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5387 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5388 expr->common to expr->base.
5389 (make_new_block): Moved stmt_list to proper place.
5390
5391
53922007-03-14 Robert Kennedy <jimbob@google.com>
5393
5394 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5395 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5396 assembler name from DWARF.
5397 * lto-lang.c (lto_set_decl_assembler_name) New function.
5398
53992006-09-10 Mark Mitchell <mark@codesourcery.com>
5400
5401 * lto.h (lto_file_vtable): New structure.
5402 (lto_file): Add vtable pointer.
5403 (lto_file_init): Add vtable paramter.
5404 (lto_read_function_body): New function.
5405 (lto_symtab_merge_fn): New function.
5406 * lto.c (lto_file_init): Add vtable parameter.
5407 (lto_read_form): Fill in entries for DW_AT_prototyped,
5408 DW_AT_frame_base.
5409 (lto_read_subroutine_type_subprogram_DIE): New function.
5410 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5411 DW_TAG_subprogram.
5412 * lto-elf.c (lto_elf_vile_vtable): New variable.
5413 (lto_elf_file_open): Pass it to lto_file_init.
5414 (lto_elf_map_fn_body): New function.
5415 (lto_elf_unmap_fn_body): Likewise.
5416 * lto-read.c: New file.
5417 * lto-symtab.c (lto_symtab_merge_fn): New function.
5418 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5419 tree_rest_of_compilation.
5420 * Make-lang.in (LTO_OBJS): Add lto-read.o
5421 (lto-read.o): New target.
5422
54232006-09-03 Mark Mitchell <mark@codesourcery.com>
5424
5425 * lto.c (<inttypes.h>): Don't include it.
5426 (lto_context): Don't typedef it.
5427 (lto_resolve_reference): New function.
5428 (lto_read_form): Use it.
5429 (lto_resolve_type_ref): New function.
5430 (lto_resolve_var_ref): Likewise.
5431 (lto_resolve_fn_ref): Likewise.
5432 * lto.h (<inttypes.h>): Include it.
5433 (lto_context): New type.
5434 (lto_ref): New structure.
5435 (lto_resolve_type_ref): Declare.
5436 (lto_resolve_var_ref): Likewise.
5437 (lto_resolve_fn_ref): Likewise.
5438
54392006-08-18 Mark Mitchell <mark@codesourcery.com>
5440
5441 * lang-specs.h: New file.
5442
54432006-08-14 Mark Mitchell <mark@codesourcery.com>
5444
5445 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5446 (lto_info_fd_close): Deallocate it.
5447 (lto_die_cache_entry): New structure.
5448 (lto_cache_hash): New function.
5449 (lto_cache_eq): Likewise.
5450 (lto_cache_store_DIE): Likewise.
5451 (lto_cache_lookup_DIE): Likewise.
5452 (lto_read_referenced_type_DIE): Use the cache.
5453 (lto_read_pointer_type_DIE): Robustify.
5454 (lto_read_DIE): Use the cache.
5455 * lto.h (hashtab.h): Include.
5456 (lto_info_fd): Add DIE cache.
5457 * Make-lang.in (LTO_H): New variable.
5458 (lto/lto-lang.o): Use LTO_H.
5459 (lto/lto-elf.o): Likewise.
5460 (lto/lto-symtab.o): Likewise.
5461
54622006-07-09 Mark Mitchell <mark@codesourcery.com>
5463
5464 * lto.c (lto_abi_mismatch_error): New function.
5465 (lto_abbrev_read): Initialize num_abbrevs.
5466 (lto_read_form): Specify allowed form classes for
5467 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5468 (lto_read_variable_formal_parameter_constant_DIE): Handle
5469 DW_AT_declaration. Call lto_symtab_merge_var.
5470 (lto_read_pointer_type_DIE): New function.
5471 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5472 not creat TYPE_DECLs for types that already have them.
5473 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5474 (lto_set_cu_context): Make cu_start point to the header, not the
5475 first DIE.
5476 (lto_file_read): Adjust for change to lto_set_cu_context.
5477 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5478 (lto/lto-symtab.o): New rule.
5479 * lto-tree.h (lang_identifier): Add decl field.
5480 (LANG_IDENTIFIER_CAST): New macro.
5481 (LTO_IDENTIFIER_DECL): Likewise.
5482 (lto_symtab_merge_var): Declare.
5483 * lto-symtab.c: New file.
5484
54852006-07-02 Daniel Berlin <dberlin@dberlin.org>
5486
5487 * lto.c (lto_context): Add current_cu and info_fd members.
5488 (DWARF2_CompUnit): New structure.
5489 (lto_read_DIE): Take lto_info_fd *.
5490 (lto_read_child_DIEs): Ditto.
5491 (lto_file_corrupt_error): Constify argument.
5492 (lto_set_cu_context): New function
5493 (lto_info_fd_init): Ditto.
5494 (lto_info_fd_close): Ditto.
5495 (lto_file_init): Use lto_info_fd_init.
5496 (lto_file_close): Use lto_info_fd_close.
5497 (lto_read_initial_length): Pass in pointer to header size.
5498 (lto_read_comp_unit_header): Correct cu_length to
5499 real length from beginning of header. Take lto_info_fd * as
5500 argument.
5501 (find_cu_for_offset): New function.
5502 (lto_read_form): Change first argument to lto_info_fd *.
5503 Add FORM_CONTEXT argument.
5504 Handle DW_FORM_ref_addr.
5505 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5506 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5507 Swap contexts if necessary for form.
5508 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5509 lto_file_corrupt_error.
5510 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5511 (lto_read_referenced_type_DIE): Change first argument to
5512 lto_info_fd *. Access lto_fd fields through base pointer.
5513 (lto_read_compile_unit_DIE): Change first argument to an
5514 lto_info_fd *.
5515 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5516 (lto_read_base_type_DIE): Ditto.
5517 (lto_read_child_DIEs): Ditto.
5518 (lto_read_DIE): Ditto. Change type of function pointer.
5519 (lto_info_read): New function.
5520 (lto_set_cu_context): Ditto.
5521 (lto_file_read): Use lto_info_read, walk resulting CU's
5522 (lto_main): Update for lto_info_fd change.
5523 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5524 necessary.
5525 * lto.h (DWARF2_CompUnit): New structure.
5526 (lto_info_fd): Ditto.
5527 (lto_file): Change debug_info to be an lto_info_fd.
5528
55292006-06-25 Mark Mitchell <mark@codesourcery.com>
5530
5531 * lto.c (toplev.h): Include it.
5532 (dwarf2.h): Likewise.
5533 (tree.h): Likewise.
5534 (tm.h): Likewise.
5535 (cgraph.h): Likewise.
5536 (ggc.h): Likewise.
5537 (inttypes.h): Likewise.
5538 (DWARF2_attr): New type.
5539 (DWARF2_abbrev): Likewise.
5540 (DWARF2_class): Likewise.
5541 (DWARF2_form_data): Likewise.
5542 (lto_context): Likewise.
5543 (lto_fd_init): New function.
5544 (lto_abbrev_fd_init): Likewise.
5545 (lto_abbrev_fd_close): Likewise.
5546 (lto_file_init): Use them.
5547 (lto_file_close): New function.
5548 (lto_file_corrupt_error): Likewise.
5549 (LTO_CHECK_INT_VAL): New macro.
5550 (lto_check_size_t_val): New function.
5551 (lto_check_int_val): Likewise.
5552 (LTO_READ_TYPE): New macro.
5553 (lto_read_ubyte): New function.
5554 (lto_read_uhalf): Likewise.
5555 (lto_read_uword): Likewise.
5556 (lto_read_uleb128): Likewise.
5557 (lto_read_initial_length): Likewise.
5558 (lto_abbrev_read_attrs): Likewise.
5559 (lto_abbrev_read): Likewise.
5560 (lto_abbrev_lookup): Likewise.
5561 (lto_read_section_offset): Likewise.
5562 (lto_read_comp_unit_header): Likewise.
5563 (lto_read_form): Likewise.
5564 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5565 (LTO_BEGIN_READ_ATTRS): Likewise.
5566 (LTO_END_READ_ATTRS): Likewise.
5567 (lto_unsupported_attr_error): New function.
5568 (lto_get_identifier): Likewise.
5569 (lto_read_referenced_type_DIE): Likewise.
5570 (lto_read_compile_unit_DIE): Likewise.
5571 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5572 (lto_read_base_type_DIE): Likewise.
5573 (lto_read_DIE): Likewise.
5574 (lto_read_child_DIEs): Likewise.
5575 (lto_file_read): Read DIEs.
5576 (lto_main): Ask middle end to emit entities.
5577 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5578 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5579 (lto_elf_file_close): Likewise.
5580 * lto.h (lto_file): Declare.
5581 (DWARF2_abbrev): Likewise.
5582 (lto_fd): New type.
5583 (lto_abbrev_fd): Likewise.
5584 (lto_file): Use new types.
5585 (lto_file_close): Declare.
5586 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5587
55882006-06-18 Mark Mitchell <mark@codesourcery.com>
5589
5590 * lto.h: New file.
5591 * lto.c: New file.
5592 * lto-elf.c: New file.
5593 * lto-lang.c (flags.h): Include it.
5594 (lto.h): Likewise.
5595 (lto_init): New function.
5596 (lto_write_globals): Remove.
5597 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5598 (LANG_HOOKS_INIT): Define.
5599 (LANG_HOOKS_PARSE_FILE): Likewise.
5600 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5601 (LTO_EXE): Link with libelf.
5602 (lto/lto-lang.o): Update dependencies.
5603 (lto/lto.o): New target.
5604 (lto/lto-elf.o): Likewise.
5605
56062006-06-12 Mark Mitchell <mark@codesourcery.com>
5607
5608 * config-lang.in: New file.
5609 * Make-lang.in: Likewise.
5610 * lto-tree.h: Likewise.
5611 * lto-lang.c: Likewise.
818ab71a 5612\f
cbe34bb5 5613Copyright (C) 2006-2017 Free Software Foundation, Inc.
d7f09764 5614
818ab71a
JJ
5615Copying and distribution of this file, with or without modification,
5616are permitted in any medium without royalty provided the copyright
5617notice and this notice are preserved.
This page took 4.54489 seconds and 5 git commands to generate.