]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
efb71232
RB
12016-11-23 Richard Biener <rguenther@suse.de>
2
3 PR lto/78472
4 * lto.c (hash_canonical_type): Ignore zero-sized fields.
5
48330c93
BE
62016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7
8 PR c++/71973
9 * lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
10
899ca90e 112016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
12 Alan Hayward <alan.hayward@arm.com>
13 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
14
15 * lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
16
65179585
RB
172016-10-31 Richard Biener <rguenther@suse.de>
18
19 PR lto/78129
20 * lto.c (do_whole_program_analysis): Bail out after errors
21 from WPA analysis.
22
8bc5448f
KV
232016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org>
24
25 * lto-partition.c: Include tree-vrp.h.
26 * lto.c: Likewise.
27
68317985
RB
282016-09-20 Richard Biener <rguenther@suse.de>
29
30 * lto.c (lto_main): Call early_finish with "<artificial>" as
31 filename.
32
321e76fb
RB
332016-09-19 Richard Biener <rguenther@suse.de>
34
35 * lto.c (lto_main): Invoke early_finish debug hook.
36
ea6e17d5
RB
372016-07-25 Richard Biener <rguenther@suse.de>
38
39 * lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
40 (unify_scc): Likewise.
41 (lto_read_decls): Likewise.
42
e9ac1f86
JJ
432016-06-28 Jakub Jelinek <jakub@redhat.com>
44
45 * Make-lang.in: Don't cat ../stage_current if it does not exist.
46
277d7ee0
AK
472016-06-23 Andi Kleen <ak@linux.intel.com>
48
49 * Make-lang.in: Add support for autofdo (disabled for now)
50
4d926e34
MS
512016-06-10 Martin Sebor <msebor@redhat.com>
52
53 PR c/71392
54 * gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
55 attribute in type-generic builtins.
56
479f99c9
JH
572016-05-16 Jan Hubicka <hubicka@ucw.cz>
58
59 * lto-partition.c (add_symbol_to_partition_1): Likewise.
60
1a0bf5e1
JH
612016-05-03 Jan Hubicka <hubicka@ucw.cz>
62
63 * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
64
a2e76867
PK
652016-04-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
66
67 * lto-partition.h (lto_balanced_map): New parameter.
68 * lto-partition.c (lto_balanced_map): New parameter
69 max_partition_size.
70 Check if partition size is greater than max_partition_size.
71 * lto.c (do_whole_program_analysis): Adjust calls to
72 lto_balanced_map() to pass 2nd argument.
73
ea913779
L
742016-03-17 H.J. Lu <hongjiu.lu@intel.com>
75
76 PR lto/70258
77 * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
78 PIE.
79
56aae4b7
JJ
802016-03-08 Jakub Jelinek <jakub@redhat.com>
81
82 * lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
83 - becuase -> because.
84
ed5d948d
TV
852016-02-15 Tom de Vries <tom@codesourcery.com>
86
87 PR lto/69655
88 * lto.c (read_cgraph_and_symbols): Call input_offload_tables with
89 argument.
90
4ecbadc7
ML
912016-01-27 Martin Liska <mliska@suse.cz>
92
93 * lto-partition.c (add_symbol_to_partition_1): Remove usage
94 of hsa_summaries.
95
e49d321f
JH
962016-01-19 Jan Hubicka <hubicka@ucw.cz>
97
98 PR lto/69136
99 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
100 decls have no assemblernames.
101
b2b40051
MJ
1022016-01-19 Martin Liska <mliska@suse.cz>
103 Martin Jambor <mjambor@suse.cz>
104
105 * lto-partition.c: Include "hsa.h"
106 (add_symbol_to_partition_1): Put hsa implementations into the
107 same partition as host implementations.
108
5803bd01
JH
1092016-01-12 Jan Hubicka <hubicka@ucw.cz>
110
111 PR lto/69003
112 * lto-partition.c (rename_statics): Fix pasto.
113
13092f61
RB
1142016-01-18 Richard Biener <rguenther@suse.de>
115
116 PR lto/69337
117 * lto-symtab.c (lto_symtab_merge): Return early for mismatched
118 function vs. variable.
119
3c4e91c9
RB
1202016-01-12 Richard Biener <rguenther@suse.de>
121
122 PR lto/69077
123 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly
124 merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags.
125
818ab71a
JJ
1262016-01-04 Jakub Jelinek <jakub@redhat.com>
127
128 Update copyright years.
129
3fddb2ef
JH
1302015-12-10 Jan Hubicka <hubicka@ucw.cz>
131
132 PR lto/68878
133 * lto-symtab.c (lto_symtab_prevailing_virtual_decl): New function.
134 * lto-symtab.h (lto_symtab_prevailing_virtual_decl): Declare.
135 (lto_symtab_prevailing_decl): Use it.
136
4a38b02b
IV
1372015-12-15 Ilya Verbin <ilya.verbin@intel.com>
138
139 * lto.c: Include stringpool.h and fold-const.h.
140 (offload_handle_link_vars): New static function.
141 (lto_main): Call offload_handle_link_vars.
142
ca834876
JH
1432015-12-10 Jan Hubicka <hubicka@ucw.cz>
144
145 * lto.c (lto_read_in_decl_state): Unpickle compressed bit.
146
958a627f
JH
1472015-12-11 Jan Hubicka <hubicka@ucw.cz>
148
149 PR ipa/61886
150 * lto-symtab.c (lto_symtab_merge_p): Avoid merging across different
151 values of error and warning attributes.
152
da20571a
JH
1532015-12-08 Jan Hubicka <hubicka@ucw.cz>
154
155 PR lto/68811
156 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
157 DECL.
158 (LTO_NO_PREVAIL): Use gcc_checking_assert.
159
378004b9
JH
1602015-12-08 Jan Hubicka <hubicka@ucw.cz>
161
162 PR lto/68811
163 * lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
164 by itself.
165
6b9ac179
JH
1662015-12-08 Jan Hubicka <hubicka@ucw.cz>
167
168 PR ipa/61886
169 * lto-symtab.c: Include lto-symtab.h.
170 (lto_cgraph_replace_node): Do not merge profiles here.
171 (lto_symtab_merge_p): New function.
172 (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p.
173 (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent
174 aliases.
175 (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use it.
176 (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite.
177 * lto.c: Include lto-symtab.h
178 * lto-symtab.h: New.
179
41c60c6c
JH
1802015-12-08 Jan Hubicka <hubicka@ucw.cz>
181
182 PR ipa/61886
183 * lto-partition.c (add_symbol_to_partition_1): Transparent aliases
184 are not part of the definition.
185 (contained_in_symbol): Likewise.
186 (promote_symbol): When promoting a symbol also promote all transparent
187 aliases.
188 (rename_statics): Weakref needs unique name, too.
189
71e54687
JH
1902015-12-07 Jan Hubicka <hubicka@ucw.cz>
191
192 PR ipa/61886
193 * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol,
194 rename_statics, rename_statics): Handle transparent aliases.
195
88636b62
JH
1962015-12-04 Jan Hubicka <hubicka@ucw.cz>
197
198 * lto-symtab.c (lto_cgraph_replace_node): Update code computing
199 merged_comdat.
200
8c86248e
JH
2012015-12-01 Jan Hubicka <hubicka@ucw.cz>
202
203 * lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
204
1ff9ed6f
JH
2052015-11-25 Jan Hubicka <jh@suse.cz>
206
207 * lto-lang.c (lto_post_options): Process flag_lto_linker_output.
208 * lang.opt (lto_linker_output): New enum.
209 (flinker_output): New flag.
210
22bea0be
JH
2112015-11-24 Jan Hubicka <hubicka@ucw.cz>
212
213 * lto-symtab.c: Include alias.h
214 (warn_type_compatibility_p): Replace types_compatible_p checks by
215 TBAA and size checks; set bit 2 if locations are TBAA incompatible.
216 (lto_symtab_merge): Compare DECL sizes.
217 (lto_symtab_merge_decls_2): Warn about TBAA in compatibility.
218
aea50b45
JH
2192015-11-24 Jan Hubicka <hubicka@ucw.cz>
220
221 * lto.c (iterative_hash_canonical_type): Recruse for all types
222 which pass !canonical_type_used_p.
223 (gimple_register_canonical_type_1): Sanity check we do not compute
224 canonical type of anything with !canonical_type_used_p.
225 (gimple_register_canonical_type): Skip all types that are
226 !canonical_type_used_p
227
deb3dae6
JH
2282015-11-24 Jan Hubicka <hubicka@ucw.cz>
229
230 * lto.c (unify_scc): Use free_node.
231
f85d2487
JH
2322015-11-21 Jan Hubicka <hubicka@ucw.cz>
233
234 * lto.c (iterative_hash_canonical_type): Always recurse for pointers.
235 (gimple_register_canonical_type_1): Check that pointers do not get
236 canonical types.
237 (gimple_register_canonical_type): Do not register pointers.
238
2392015-11-21 Jan Hubicka <hubicka@ucw.cz>
feb391fc
JH
240
241 * lto-symtab.c (warn_type_compatibility_p): Do not set ODR mismatch
242 flag for types that are not ODR; fix loop walking parameters.
243
69f293c9
AM
2442015-11-11 Andrew MacLeod <amacleod@redhat.com>
245
246 * lto-lang.c: Remove unused header files.
247 * lto-object.c: Likewise.
248 * lto-partition.c: Likewise.
249 * lto-symtab.c: Likewise.
250 * lto.c: Likewise.
251
ee45a32d
EB
2522015-11-08 Eric Botcazou <ebotcazou@adacore.com>
253
254 * lto.c (compare_tree_sccs_1): Deal with TYPE_REVERSE_STORAGE_ORDER.
255
0aad0198
RS
2562015-11-07 Richard Sandiford <richard.sandiford@arm.com>
257
258 * lto-lang.c: Don't undef DEF_BUILTIN.
259
2adfab87
AM
2602015-10-29 Andrew MacLeod <amacleod@redhat.com>
261
262 * lto-lang.c: Reorder #include's and remove duplicates.
263 * lto-object.c: Likewise.
264 * lto-partition.c: Likewise.
265 * lto-symtab.c: Likewise.
266 * lto.c: Likewise.
267
b2b29377
MM
2682015-10-27 Mikhail Maltsev <maltsevm@gmail.com>
269
270 * lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
271 conditionals.
272 (lto_fixup_state): Likewise.
273 (do_whole_program_analysis): Use
274 symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
275 conditionals.
276
d9a6bd32
JJ
2772015-10-13 Jakub Jelinek <jakub@redhat.com>
278
279 * lto-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
280 DEF_FUNCTION_TYPE_11): Define.
281
9c4eeafc
JH
2822015-10-10 Jan Hubicka <hubicka@ucw.cz>
283
284 * lto.c (hash_canonical_type): Honor
285 type_with_interoperable_signedness.
286
3e32ee19
NS
2872015-09-28 Nathan Sidwell <nathan@codesourcery.com>
288
289 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
290 (DEF_FUNCTION_TYPE_VAR_11): Delete.
291
f196d062
RB
2922015-08-31 Richard Biener <rguenther@suse.de>
293
294 * lto.c (compare_tree_sccs_1): Compare DECL_ABSTRACT_ORIGIN.
295 * lto-symtab.c (lto_symtab_merge): Merge DECL_POSSIBLY_INLINED flag.
296 (lto_symtab_prevailing_decl): Do not replace a decl that didn't
297 participate in merging with something else.
298
45aee888
RB
2992015-08-31 Richard Biener <rguenther@suse.de>
300
301 * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
302 test, do not replace a non-builtin with a builtin.
303 * lto.c (compare_tree_sccs_1): Do not merge things we stream
304 as builtins vs. non-builtins.
305
a79683d5
TS
3062015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
307
308 * lto.h: Remove useless typedefs.
309
48d859bb
AM
3102015-07-15 Andrew MacLeod <amacleod@redhat.com>
311
312 * lto.c: Remove redundant includes.
313
026c3cfd
AH
3142015-07-12 Aldy Hernandez <aldyh@redhat.com>
315
316 * lto-lang.c: Fix double word typos.
317
9fdcd34e
AM
3182015-07-10 Andrew MacLeod <amacleod@redhat.com>
319
320 * lto.c: Include cfghooks.h rather than predict.h.
321
f51ade33
AM
3222015-07-09 Andrew MacLeod <amacleod@redhat.com>
323
324 * lto-lang.c: Adjust includes of target.h, alloc-pool.h and
325 lto-streamer.h.
326 * lto-object.c: Likewise.
327 * lto-partition.c: Likewise.
328 * lto-symtab.c: Likewise.
329
1916bcb5
AM
3302015-07-09 Andrew MacLeod <amacleod@redhat.com>
331
332 * lto-lang.c: Adjust includes for flags.h changes.
333
c7131fb2
AM
3342015-07-07 Andrew MacLeod <amacleod@redhat.com>
335
336 * lto-lang.c: Adjust includes.
337 * lto-object.c: Likewise.
338 * lto-partition.c: Likewise.
339 * lto-symtab.c: Likewise.
340 * lto.c: Likewise.
341
f0889939
AM
3422015-06-25 Andrew MacLeod <amacleod@redhat.com>
343
344 * lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
345 * lto-object.c: Likewise.
346 * lto-partition.c: Likewise.
347 * lto-symtab.c: Likewise.
348 * lto-tree.h: Likewise.
349 * lto.c: Likewise.
350
8d67ee55
RS
3512015-06-25 Richard Sandiford <richard.sandiford@arm.com>
352
353 * lto.c (tree_scc_hasher): Inherit from nofree_ptr_hash rather
354 than typed_noop_remove. Remove redudant typedefs.
355
abb226c9
AM
3562015-06-17 Andrew MacLeod <amacleod@redhat.com>
357
358 * lto-lang.c: Do not include input.h, line-map.h or is-a.h.
359 * lto-object.c: Likewise.
360 * lto-partition.c: Likewise.
361 * lto-symtab.c: Likewise.
362 * lto.c: Likewise.
363
351d90f4
JH
3642015-06-14 Jan Hubicka <hubicka@ucw.cz>
365
366 PR ipa/66181
367 * lto.c (compare_tree_sccs_1): Do not compare TYPE_NO_FORCE_BLK.
368
44c42705
DD
3692015-06-12 DJ Delorie <dj@redhat.com>
370
371 * lto-lang.c (lto_type_for_size): Include intN types.
372 (lto_type_for_mode): Likewise.
373
64578d98
JH
3742015-06-08 Jan Hubicka <hubicka@ucw.cz>
375
376 * lto.c (hash_canonical_type): Drop hashing of TYPE_STRING_FLAG.
377
13fdf2e2
AM
3782015-06-08 Andrew MacLeod <amacleod@redhat.com>
379
380 * lto-lang.c : Adjust include files.
381 * lto-object.c : Likewise.
382 * lto-partition.c : Likewise.
383 * lto-partition.h : Likewise.
384 * lto-symtab.c : Likewise.
385 * lto.c : Likewise.
386 * lto.h : Likewise.
387
ccb5ad37
JH
3882015-06-06 Jan Hubicka <hubicka@ucw.cz>
389
6542950e
JH
390 PR lto/65378
391 * lto-symtab.c (warn_type_compatibility_p): Fix call of
392 odr_or_derived_type_p.
393 (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.
394
3952015-06-08 Jan Hubicka <hubicka@ucw.cz>
396
397
ccb5ad37
JH
398 * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
399 pointers.
400
d7438551
AH
4012015-06-05 Aldy Hernandez <aldyh@redhat.com>
402
403 * lto-lang.c (lto_write_globals): Remove.
404 (LANG_HOOKS_WRITE_GLOBALS): Same.
405
ecb9f223
AM
4062015-06-04 Andrew MacLeod <amacleod@redhat.com>
407
408 * lto-lang.c: Adjust includes for restructured coretypes.h.
409 * lto-object.c: Likewise.
410 * lto-partition.c: Likewise.
411 * lto-symtab.c: Likewise.
412 * lto.c: Likewise.
413
9cb9b937
JH
4142015-06-04 Jan Hubicka <hubicka@ucw.cz>
415
416 * lto.c (hash_canonical_type): Use tree_code_for_canonical_type_merging.
417
93e2aa6d
JH
4182015-06-03 Jan Hubicka <hubicka@ucw.cz>
419
420 * lto.c (iterative_hash_canonical_type,
421 gimple_register_canonical_type): only hash main variants of types
422
faae53f8
ML
4232015-05-27 Martin Liska <mliska@suse.cz>
424
425 * lto-partition.c (new_partition): Reset number of symbols.
426 (add_symbol_to_partition_1): Increment number of symbols.
427 (undo_partition): Decrement number of symbols.
428 (lto_balanced_map): Dump number of symbols and insns that
429 belong to a partition.
430 * lto-partition.h (struct ltrans_partition_def): Add symbol counter.
431
b727ba74
JH
4322015-05-22 Jan Hubicka <hubicka@ucw.cz>
433
434 * lto.c (hash_canonical_type): Be sure we hash only types that
435 need alias set.
436 (gimple_register_canonical_type_1): Do not produce canonical
437 types for types that do not need alias sets.
438
1d1218fb
JH
4392015-05-22 Jan Hubicka <hubicka@ucw.cz>
440
441 * lto.c (hash_canonical_type): Drop hashing of METHOD_BASETYPE.
442
872d5034
JH
4432015-05-19 Jan Hubicka <hubicka@ucw.cz>
444
445 * lto.c (gimple_canonical_types_compatible_p): Move to tree.c
446
259d29e3
JH
4472015-05-17 Jan Hubicka <hubicka@ucw.cz>
448
449 * lto-symtab.c (warn_type_compatibility_p): Break out from ...;
450 compare ODR types (if available) and function types.
451 (lto_symtab_merge): ... here; output ODR violation warnings
452 and call warn_types_mismatch.
453
b0845a1e
JH
4542015-04-29 Jan Hubicka <hubicka@ucw.cz>
455
456 * lto.c (lto_fixup_state): Call verify_type.
457
67f58944
TS
4582015-04-18 Trevor Saunders <tsaunders@mozilla.com>
459
b0845a1e 460 * lto.c: Adjust for hash_table changes.
67f58944 461
36ceb0e3
JH
4622015-03-27 Jan Hubicka <hubicka@ucw.cz>
463
464 * lto.c (lto_read_decls): Move code registering odr types out
465 of TYPE_CANONICAL conditional and also register polymorphic types.
466
afd1e7c6
JH
4672015-03-26 Jan Hubicka <hubicka@ucw.cz>
468
469 * lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
470 DECL_ARTIFICAL symbols.
471
eaeec5ec
JH
4722015-03-26 Jan Hubicka <hubicka@ucw.cz>
473
474 PR lto/65536
475 * lto.c (unify_scc): Revert location cache when unification
476 suceeded.
477 (lto_read_decls): Accept location cache after sucess;
478 apply location cache before calling debug hooks.
479
1c4db829
JH
4802015-03-10 Jan Hubicka <hubicka@ucw.cz>
481
482 * lto.c (read_cgraph_and_symbols): Do not do merging
483 at ltrans stage.
484
db847fa8
JJ
4852015-02-26 Jakub Jelinek <jakub@redhat.com>
486
487 * lto.c (lto_mode_identity_table): New variable.
488 (lto_read_decls): Add mode_table argument to the lto_input_block
489 constructor.
490 (lto_file_finalize): Initialize mode_table.
491 (lto_init): Initialize lto_mode_identity_table.
492
56a9f6bc
TS
4932015-02-24 Thomas Schwinge <thomas@codesourcery.com>
494
495 PR libgomp/64625
496 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
497 Remove macros.
498 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
499
ebc8f0bb
JH
5002015-02-03 Jan Hubicka <hubicka@ucw.cz>
501
502 * lto-symtab.c (lto_cgraph_replace_node): Maintain merged flag.
503
40fecdd6
JM
5042015-01-30 Joseph Myers <joseph@codesourcery.com>
505
506 * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error
507 changed to pass input_location as first argument.
508
040968a8
JH
5092014-12-11 Jan Hubicka <hubicka@ucw.cz>
510
511 * lto-symtab.c (lto_varpool_replace_node): Merge TLS models.
512
69fe4502
JH
5132014-12-11 Jan Hubicka <hubicka@ucw.cz>
514
515 * lto.c (compare_tree_sccs_1): Add comparsion of
516 DECL_FUNCTION_SPECIFIC_TARGET
517
41dbbb37
TS
5182015-01-15 Thomas Schwinge <thomas@codesourcery.com>
519 James Norris <jnorris@codesourcery.com>
520
521 * lto-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
522 New macros.
523 * lto.c: Include "gomp-constants.h".
524
837bac8c
IV
5252015-01-14 Ilya Verbin <ilya.verbin@intel.com>
526
527 * lto-partition.c (lto_promote_cross_file_statics): Remove argument
528 from select_what_to_stream.
529
1b34e6e2
BS
5302015-01-09 Bernd Schmidt <bernds@codesourcery.com>
531 Jakub Jelinek <jakub@redhat.com>
532
533 PR middle-end/64412
534 * lto.c (read_cgraph_and_symbols): Set lto_stream_offload_p
535 if ACCEL_COMPILER.
536
adfac8df
JJ
5372015-01-09 Michael Collison <michael.collison@linaro.org>
538
539 * lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
540 input.h, alias.h, symtab.h, options, fold-const.h,
541 wide-int.h, and inchash.h due to flattening of tree.h.
542 * lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
543 input.h, alias.h, symtab.h, fold-const.h,
544 wide-int.h, and inchash.h due to flattening of tree.h.
545 * lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
546 input.h, alias.h, symtab.h, options, fold-const.h,
547 wide-int.h, and inchash.h due to flattening of tree.h.
548 * lto-partition.c: Ditto.
549 * lto-symtab.c: Ditto.
550
5624e564
JJ
5512015-01-05 Jakub Jelinek <jakub@redhat.com>
552
553 Update copyright years.
554
9a1e784a
ML
5552014-12-22 Martin Liska <mliska@suse.cz>
556
557 * lto-partition.c (add_symbol_to_partition_1): New inline_summaries
558 is used.
559 (undo_partition): Likewise.
560 (lto_balanced_map): Likewise.
561
dd912cb8
ML
5622014-12-22 Martin Liska <mliska@suse.cz>
563
564 * lto-partition.c: Include of symbol-summary.h is added.
565 * lto-symtab.c: Likewise.
566 * lto.c: Likewise.
567
17e0fc92
JH
5682014-12-11 Jan Hubicka <hubicka@ucw.cz>
569
570 PR ipa/61324
571 * lto.c (read_cgraph_and_symbols): Update call of
572 remove_unreachable_nodes.
573 (do_whole_program_analysis): Remove call of
574 symtab->remove_unreachable_nodes
575
58dddbd2
TS
5762014-12-08 Trevor Saunders <tsaunders@mozilla.com>
577
578 * lto.c (read_cgraph_and_symbols): allocate gimple_canonical_types
579 htab with malloc instead of ggc.
580
907dadbd
TS
5812014-11-20 Trevor Saunders <tsaunders@mozilla.com>
582
583 * lto.c: Replace htab with hash_table.
584
9c71e9df
TS
5852014-11-20 Trevor Saunders <tsaunders@mozilla.com>
586
587 * lto.c (lto_read_in_decl_state): Adjust.
588 (lto_fixup_state): Likewise.
589
72a4a8b0
JH
5902014-11-17 Jan Hubicka <hubicka@ucw.cz>
591
592 * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
593
54e774c0
JH
5942014-11-14 Jan Hubicka <hubicka@ucw.cz>
595
596 * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.
597
1f6be682
IV
5982014-11-13 Ilya Verbin <ilya.verbin@intel.com>
599 Bernd Schmidt <bernds@codesourcery.com>
600 Andrey Turetskiy <andrey.turetskiy@intel.com>
601 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
602
ec6fe917
IV
603 * lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
604
6052014-11-13 Ilya Verbin <ilya.verbin@intel.com>
606 Ilya Tocar <ilya.tocar@intel.com>
607 Andrey Turetskiy <andrey.turetskiy@intel.com>
608 Bernd Schmidt <bernds@codesourcery.com>
609
1f6be682
IV
610 * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
611 LTO_SECTION_NAME_PREFIX.
612 * lto-partition.c (lto_promote_cross_file_statics): Call
613 select_what_to_stream.
614 * lto.c (lto_section_with_id): Use section_name_prefix instead of
615 LTO_SECTION_NAME_PREFIX.
616 (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
617 being built as an offload compiler.
618
ef4bddc2
RS
6192014-10-29 Richard Sandiford <richard.sandiford@arm.com>
620
621 * lto-lang.c: Remove redundant enum from machine_mode.
622
c582198b
AM
6232014-10-28 Andrew MacLeod <amacleod@redhat.com>
624
625 * lto.c: Adjust include files.
626 * lto-lang.c: Ditto.
627 * lto-object.c: Ditto.
628 * lto-partition.c: Ditto.
629 * lto-symtab.c: Ditto.
630
60393bbc
AM
6312014-10-27 Andrew MacLeod <amacleod@redhat.com>
632
633 * lto-lang.c: Adjust include files.
634 * lto-object.c: Ditto.
635 * lto-partition.c: Ditto.
636 * lto-symtab.c: Ditto.
637 * lto.c: Ditto.
638
957f47e6
DD
6392014-10-16 DJ Delorie <dj@redhat.com>
640
641 * lto-object.c (lto_obj_begin_section): In the event that pointer
642 sizes aren't powers of two, choose a more suitable alignment
643 than (unsigned)(-1).
644
78a7c317
DD
6452014-10-14 DJ Delorie <dj@redhat.com>
646
647 * lto-lang.c (lto_build_c_type_nodes): Check intN types for
648 size-type as well.
649 (lto_init): Initialize all intN types, not just int128.
650
70261a4f
ML
6512014-10-06 Martin Liska <mliska@suse.cz>
652
653 * lto.c (stream_out): ARG_UNUSED added for last argument.
654
00de328a
AH
6552014-09-24 Aldy Hernandez <aldyh@redhat.com>
656
657 * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
658 DECL_ABSTRACT_P.
659
7861b648
AK
6602014-09-23 Andi Kleen <ak@linux.intel.com>
661
662 * lto-partition.c (node_cmp): Update comment.
663 (varpool_node_cmp): Use symtab_node for comparison.
664 (add_sorted_nodes): New function.
665 (lto_balanced_map): Change to keep ordered queue
666 of ordered node. Handle no_reorder attribute.
667
1ee85ee1
JH
6682014-09-11 Jan Hubicka <hubicka@ucw.cz>
669
670 * lto.c (lto_read_decls): Register ODR types.
671
8605403e
JH
6722014-08-20 Jan Hubicka <hubicka@ucw.cz>
673
674 * lto.c (read_cgraph_and_symbols): Fix symtab_remove_unreachable_nodes
675 call.
676 (do_whole_program_analysis): Only sanity check that IPA passes cleans up.
677
56b1f114
JH
6782014-08-14 Jan Hubicka <hubicka@ucw.cz>
679
680 * lto-symtab.c (lto_varpool_replace_node): Call compare_virtual_tables.
681
833f94c0
RB
6822014-08-14 Richard Biener <rguenther@suse.de>
683
684 PR lto/62067
685 * lto-lang.c (def_fn_type): Fix error handling wrt va_end.
686
207c68cd
RB
6872014-08-08 Richard Biener <rguenther@suse.de>
688
689 * lto.c (lto_read_decls): Adjust for lto_input_block changes.
690
7c581d61
BC
6912014-08-08 Bin Cheng <bin.cheng@arm.com>
692
693 PR lto/62032
694 * lto-lang.c (lto_init): Switch mis-matched arguments.
695
39c8aaa4
TS
6962014-08-07 Trevor Saunders <tsaunders@mozilla.com>
697
698 * lto-partition.c, lto.c: Use hash_map instead of pointer_map.
699
6e2830c3
TS
7002014-08-02 Trevor Saunders <tsaunders@mozilla.com>
701
702 * lto-partition.c, lto-partition.h: Use hash_set instead of
703 pointer_set.
704
50de5793
AK
7052014-07-31 Andi Kleen <ak@linux.intel.com>
706
707 * lto.c (hash_canonical_type): Use inchash::hash
708 and use inchash::add_expr.
709 (iterative_hash_canonical_type): Dito.
710
f6bcdb5e
RB
7112014-07-30 Richard Biener <rguenther@suse.de>
712
713 * lto-streamer.h (lto_write_data): New function.
714 * langhooks.c (lhd_append_data): Do not free block.
715 * lto-section-out.c (lto_write_data): New function writing
716 raw data to the current section.
717 (lto_write_stream): Adjust for langhook semantic change.
718 (lto_destroy_simple_output_block): Write header directly.
719 * lto-opts.c (lto_write_options): Write options directly.
720 * lto-streamer-out.c (produce_asm): Write heaeder directly.
721 (lto_output_toplevel_asms): Likewise.
722 (copy_function_or_variable): Copy data directly.
723 (write_global_references): Output index table directly.
724 (lto_output_decl_state_refs): Likewise.
725 (write_symbol): Write data directly.
726 (produce_symtab): Adjust.
727 (produce_asm_for_decls): Output header and refs directly.
728
56fdfd3e
AK
7292014-07-25 Andi Kleen <ak@linux.intel.com>
730
731 * lto.c (hash_canonical_type): Call iterative_hstate_expr.
732
0bd8bb04
AK
7332014-07-25 Andi Kleen <ak@linux.intel.com>
734
735 * lto.c (hash_canonical_type): Convert to inchash.
736 (iterative_hash_canonical_type): Dito.
737
6d8eb96b
AK
7382014-07-25 Andi Kleen <ak@linux.intel.com>
739
740 * lto.c: Include inchash.h
741
ad115a3c
JH
7422014-07-14 Jan Hubicka <hubicka@ucw.cz>
743
744 * lto.c (mentions_vars_p_decl_non_common): Skip
745 DECL_ARGUMENT_FLD.
746 mentions_vars_p_function): Do DECL_ARGUMENTS.
747 (lto_fixup_prevailing_decls): Update.
748
917dd9bf
JH
7492014-07-12 Jan Hubicka <hubicka@ucw.cz>
750
751 * lto.c (read_cgraph_and_symbols): Do not push DECL_INIT_IO
752 timevar
753 (materialize_cgraph): Do not push GIMPLE_IN timevar.
754
0b83e688
JH
7552014-07-11 Jan Hubicka <hubicka@ucw.cz>
756
757 * lto-partition.c (add_references_to_partition): Use
758 varpool_ctor_useable_for_folding_p.
759 * lto.c (lto_read_in_decl_state): Update sanity check.
760
e55637b7
ML
7612014-07-01 Martin Liska <mliska@suse.cz>
762
763 IPA REF alias refactoring
764 * lto-partition.c (add_symbol_to_partition_1): Usage of
765 FOR_EACH_ALIAS added.
766
010f4e27
JH
7672014-06-28 Jan Hubicka <hubicka@ucw.cz>
768
769 Revert:
770 * lto.c (lto_copy_fields_not_streamed): New function.
771 (compare_tree_sccs_1): Do not compare fields shared in between type
772 and variant.
773 (lto_read_decls): Fixup types first before inserting into hash.
774
b82fe354
AP
7752014-06-28 Andrew Pinski <apinski@cavium.com>
776
777 * lto.c (lto_read_decls): Fix comment in comment.
778
288eeff7
JH
7792014-06-28 Jan Hubicka <hubicka@ucw.cz>
780
781 * lto.c (lto_copy_fields_not_streamed): New function.
782 (compare_tree_sccs_1): Do not compare fields shared in between type
783 and variant.
784 (lto_read_decls): Fixup types first before inserting into hash.
785
e01fa630
ML
7862014-06-25 Martin Liska <mliska@suse.cz>
787
788 * lto/lto-partition.c (add_references_to_partition): New IPA REF function
789 used.
790 (add_symbol_to_partition_1): Likewise.
791 (lto_balanced_map): Likewise.
792 * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise.
793
aaf8a23e
JH
7942014-06-24 Jan Hubicka <hubicka@ucw.cz>
795
796 * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
797 (mentions_vars_p_function): ... here.
798 (compare_tree_sccs_1): Update VINDEX checks.
799 (lto_fixup_prevailing_decls): Likewise.
800
1eb68d2d
TS
8012014-06-24 Trevor Saunders <tsaunders@mozilla.com>
802
803 * lto.c (canonical_type_hash_cache): Use hash_map instead of
804 pointer_map.
805
c203e8a7
TS
8062014-06-24 Trevor Saunders <tsaunders@mozilla.com>
807
808 * lto.c: Adjust.
809
714c800f
JH
8102014-06-20 Jan Hubicka <hubicka@ucw.cz>
811
812 * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
813
569b1784
JH
8142014-06-20 Jan Hubicka <hubicka@ucw.cz>
815
816 * lto.c (compare_tree_sccs_1): Do not compare priorities.
817
56363ffd
JH
8182014-06-15 Jan Hubicka <hubicka@ucw.cz>
819
820 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
821
e257a17c
JH
8222014-06-10 Jan Hubicka <hubicka@ucw.cz>
823
824 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
825 (do_whole_program_analysis): Use verify_symtab.
826
24d047a3
JH
8272014-06-07 Jan Hubicka <hubicka@ucw.cz>
828
829 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
830 lto_fixup_prevailing_decls): Skip section names.
831
9b2b7279
AM
8322014-06-02 Andrew MacLeod <amacleod@redhat.com>
833
834 * lto-symtab.c: Include builtins.h.
835
a9243bfc
RB
8362014-05-26 Richard Biener <rguenther@suse.de>
837
838 * lto.c (lto_parse_hex): Use int64_t.
839 (lto_resolution_read): Likewise.
840
fd1e9302
JH
8412014-05-23 Jan Hubicka <hubicka@ucw.cz>
842
843 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
844
aede2c10
JH
8452014-05-23 Jan Hubicka <hubicka@ucw.cz>
846
847 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
848 symtab pointer.
849 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
850
f6a7cffc
TS
8512014-05-22 Thomas Schwinge <thomas@codesourcery.com>
852
853 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
854 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
855 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
856
4000360e
BS
8572012-05-22 Bernd Schmidt <bernds@codesourcery.com>
858
859 * lto-object.c: Include "lto-section-names.h".
860 (LTO_SEGMENT_NAME): Don't define.
861 * lto.c: Include "lto-section-names.h".
862
b9559136
JH
8632014-05-17 Jan Hubicka <hubicka@ucw.cz>
864
865 PR lto/61012
866 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
867 mixed with variables.
868
766090c2
TS
8692014-05-17 Trevor Saunders <tsaunders@mozilla.com>
870
871 * lto-tree.h: Don't use variable_size gty attribute.
872 * lto.c (lto_read_in_decl_state): Adjust.
873 (create_subid_section_table): Likewise.
874 (lto_flatten_files): Likewise.
875 (read_cgraph_and_symbols): Likewise.
876
1d60af08
KZ
8772014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
878 Mike Stump <mikestump@comcast.net>
879 Richard Sandiford <rdsandiford@googlemail.com>
880
881 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
882 * lto-lang.c (get_nonnull_operand): Likewise.
883
22869a37
RB
8842014-04-28 Richard Biener <rguenther@suse.de>
885
886 PR middle-end/60092
887 * lto-lang.c: Define flag_isoc11.
888
7de90a6c
DM
8892014-04-23 David Malcolm <dmalcolm@redhat.com>
890
891 * lto-partition.c (add_references_to_partition): Update for
892 removal of implicit pointer from the is-a.h API.
893 (add_symbol_to_partition_1): Likewise.
894 (contained_in_symbol): Likewise.
895 (undo_partition): Likewise.
896 (lto_balanced_map): Likewise.
897 (promote_symbol): Likewise.
898 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
899 (lto_symtab_merge_symbols): Likewise.
900 * lto.c (lto_wpa_write_files): Likewise.
901
783dab6b
RB
9022014-04-15 Richard Biener <rguenther@suse.de>
903
904 * lto.c: Include params.h.
905 (do_whole_program_analysis): Switch on flag_lto_partition value,
906 add support for LTO_PARTITION_ONE.
907 * lto-partition.h (lto_balanced_map): Adjust.
908 * lto-partition.c (lto_balanced_map): Get number of desired
909 partitions as argument to support -flto-partition=one.
910
cb90235d
JH
9112014-04-14 Jan Hubicka <hubicka@ucw.cz>
912
913 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
914 tp_first_run.
915
bbe281da
JH
9162014-03-19 Jan Hubicka <hubicka@ucw.cz>
917
918 * lto.c: Include ipa-inline.h
919 (do_whole_program_analysis): Free inline summary after partitioning.
920
ce2f49b3
RB
9212014-03-19 Richard Biener <rguenther@suse.de>
922
923 PR middle-end/60553
924 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
925 instead of TREE_CHAIN as chain_next.
926
e41106fc
RB
9272014-03-19 Richard Biener <rguenther@suse.de>
928
929 * lto.c (lto_wpa_write_files): Move call to
930 lto_promote_cross_file_statics ...
931 (do_whole_program_analysis): ... here, into the partitioning
932 block. Do not ggc_collect after lto_wpa_write_files but
933 for a last time before it.
934
15df2655
JJ
9352014-03-19 Jakub Jelinek <jakub@redhat.com>
936
937 PR lto/60571
938 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
939 Fix formatting.
940
415e2e6b
JJ
9412014-03-18 Jakub Jelinek <jakub@redhat.com>
942
943 PR sanitizer/60535
944 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
945 and complex_{float,{,long_}double}_type_node.
946
f42c637e
PM
9472014-03-08 Paulo Matos <paulo@matos-sorge.com>
948
415e2e6b
JJ
949 * lto-lang.c (lto_init): Pass flag_short_double to
950 build_common_tree_nodes.
f42c637e 951
6dab804d
JH
9522014-02-14 Jan Hubicka <hubicka@ucw.cz>
953
954 PR lto/60295
955 * lto.c (stream_out): Avoid parallel streaming with
956 -flto=jobserver until we are able to throttle it down
957 resonably.
958
39434bce
JH
9592014-02-14 Jan Hubicka <hubicka@ucw.cz>
960
961 * lto-partition.c (add_symbol_to_partition_1,
962 undo_partition, lto_balanced_map): Aliases have no
963 defined size.
964 (lto_balanced_map): Do not follow refering variables
965 if they can be optimized out.
966
1966fd99
RB
9672014-02-14 Richard Biener <rguenther@suse.de>
968
969 PR lto/60179
970 * lto.c (compare_tree_sccs_1): Do not compare
971 DECL_FUNCTION_SPECIFIC_TARGET.
972 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
973
283416b3
RB
9742014-02-12 Richard Biener <rguenther@suse.de>
975
976 PR lto/60060
977 * lto-lang.c (lto_write_globals): Do not call
978 wrapup_global_declarations or emit_debug_global_declarations
979 but emit debug info for non-function scope variables
980 directly.
981
b7e85694
JH
9822014-02-06 Jan Hubicka <hubicka@ucw.cz>
983
984 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
985
96451279
JH
9862014-02-06 Jan Hubicka <hubicka@ucw.cz>
987
988 PR ipa/59469
989 * lto-partition.c (symbol_class): Move to cgraph.h
990 (get_symbol_class): Move to symtab.c
991 (add_references_to_partition, add_symbol_to_partition_1,
992 lto_max_map, lto_1_to_1_map, lto_balanced_map,
993 lto_promote_cross_file_statics): Update.
994
f300e7b8
JH
9952014-02-05 Jan Hubicka <hubicka@ucw.cz>
996
997 * lto.c (lto_parallelism): New static var.
998 (do_stream_out, wait_for_child, stream_out): New static functions.
999 (lto_wpa_write_files): Add support for parallel streaming.
1000 (do_whole_program_analysis): Set parallelism.
1001 * lang.opt (fwpa): Add parameter.
1002 * lto-lang.c (lto_handle_option): Handle flag_wpa.
1003 (lto_init): Update use of flag_wpa.
1004 * lto-streamer.h (asm_nodes_output): Declare.
1005
f0f91770
RB
10062014-02-05 Richard Biener <rguenther@suse.de>
1007
1008 * lto.h (lto_global_var_decls): Remove.
1009 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
1010 (lto_write_globals): Do nothing in WPA stage, gather globals from
1011 the varpool here ...
1012 * lto.c (lto_main): ... not here.
1013 (materialize_cgraph): Do not call rest_of_decl_compilation
1014 on the empty lto_global_var_decls vector.
1015 (lto_global_var_decls): Remove.
1016
d665f8dd
JH
10172014-02-04 Jan Hubicka <hubicka@ucw.cz>
1018
1019 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
1020 needs duplicating, not generic COMDAT.
1021
c39276b8
RB
10222014-02-04 Richard Biener <rguenther@suse.de>
1023
1024 PR lto/59723
1025 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
1026 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
1027
5f876ae7
JH
10282014-02-04 Jan Hubicka <hubicka@ucw.cz>
1029 Markus Trippelsdorf
1030
1031 PR ipa/59469
1032 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
1033 merge force_output and forced_by_abi flags.
1034
b72271b9
BI
10352014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1036
1037 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
1038 flag_cilkplus.
1039
63124c48
RB
10402014-01-09 Richard Biener <rguenther@suse.de>
1041
1042 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
1043
d05b9920
RB
10442014-01-09 Richard Biener <rguenther@suse.de>
1045
1046 PR lto/45586
1047 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
1048 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
1049 (gimple_canonical_types_compatible_p): Do not compare them either.
1050
23a5b65a
RS
10512014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1052
1053 Update copyright years
1054
2c8326a5
OE
10552013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
1056
1057 * lto.c: Remove struct tags when referring to class varpool_node.
1058 * lto-partition.c: Likewise.
1059 * lto-symtab.c: Likewise.
1060
e06f9964
JJ
10612013-11-29 Jakub Jelinek <jakub@redhat.com>
1062 Richard Biener <rguenther@suse.de>
1063
1064 PR lto/59326
1065 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
1066
c193f58b
JJ
10672013-11-29 Jakub Jelinek <jakub@redhat.com>
1068
1069 PR lto/59326
1070 * lto.c (mentions_vars_p_omp_clause): New function.
1071 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
1072 after return stmts.
1073
2fb9a547
AM
10742013-11-22 Andrew MacLeod <amacleod@redhat.com>
1075
1076 * lto.c: Add required include files from gimple.h.
1077 * lto-lang.c: Likewise
1078 * lto-object.c: Likewise
1079 * lto-partition.c: Likewise
1080 * lto-symtab.c: Likewise
1081
fec39fa6
TS
10822013-11-18 Trevor Saunders <tsaunders@mozilla.com>
1083
1084 * lto-partition.c lto-symtab.c lto.c Adjust.
1085
d8a2d370
DN
10862013-11-14 Diego Novillo <dnovillo@google.com>
1087
1088 * lto-lang.c: Include stringpool.h.
1089 Include stor-layout.h.
1090 * lto-partition.c: Include gcc-symtab.h.
1091 * lto.c: Include stor-layout.h.
1092
5e20cdc9
DM
10932013-10-31 David Malcolm <dmalcolm@redhat.com>
1094
1095 Automated part of renaming of symtab_node_base to symtab_node.
1096
1097 Patch autogenerated by rename_symtab.py from
1098 https://github.com/davidmalcolm/gcc-refactoring-scripts
1099 revision 58bb219cc090b2f4516a9297d868c245495ee622
1100
1101 * lto-partition.c (add_symbol_to_partition): Rename
1102 symtab_node_base to symtab_node.
1103 (get_symbol_class): Likewise.
1104 (symbol_partitioned_p): Likewise.
1105 (add_references_to_partition): Likewise.
1106 (add_symbol_to_partition_1): Likewise.
1107 (contained_in_symbol): Likewise.
1108 (add_symbol_to_partition): Likewise.
1109 (lto_1_to_1_map): Likewise.
1110 (lto_max_map): Likewise.
1111 (lto_balanced_map): Likewise.
1112 (privatize_symbol_name): Likewise.
1113 (promote_symbol): Likewise.
1114 (may_need_named_section_p): Likewise.
1115 (rename_statics): Likewise.
1116 (lto_promote_statics_nonwpa): Likewise.
1117 * lto-symtab.c (lto_symtab_merge): Likewise.
1118 (lto_symtab_resolve_replaceable_p): Likewise.
1119 (lto_symtab_symbol_p): Likewise.
1120 (lto_symtab_resolve_can_prevail_p): Likewise.
1121 (lto_symtab_resolve_symbols): Likewise.
1122 (lto_symtab_merge_decls_2): Likewise.
1123 (lto_symtab_merge_decls_1): Likewise.
1124 (lto_symtab_merge_decls): Likewise.
1125 (lto_symtab_merge_symbols_1): Likewise.
1126 (lto_symtab_merge_symbols): Likewise.
1127 (lto_symtab_prevailing_decl): Likewise.
1128 * lto.c (lto_wpa_write_files): Likewise.
1129 (read_cgraph_and_symbols): Likewise.
1130 (do_whole_program_analysis): Likewise.
1131
378cd6b1
DM
11322013-10-30 David Malcolm <dmalcolm@redhat.com>
1133
1134 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
1135 declarations onto multiple lines to make things easier for
1136 rename_symtab.py.
1137 (lto_symtab_merge_decls_1): Likewise.
1138 (lto_symtab_merge_symbols_1): Likewise.
1139
939b37da
BI
11402013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1141
1142 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
1143 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
1144 Plus is enabled.
1145
67348ccc
DM
11462013-10-29 David Malcolm <dmalcolm@redhat.com>
1147
1148 Patch autogenerated by refactor_symtab.py from
1149 https://github.com/davidmalcolm/gcc-refactoring-scripts
1150 revision 58bb219cc090b2f4516a9297d868c245495ee622
1151
1152 * lto-partition.c (lto_promote_cross_file_statics): Update for
1153 conversion of symtab types to a true class hierarchy.
1154 (rename_statics): Likewise.
1155 (promote_symbol): Likewise.
1156 (privatize_symbol_name): Likewise.
1157 (lto_balanced_map): Likewise.
1158 (varpool_node_cmp): Likewise.
1159 (node_cmp): Likewise.
1160 (lto_1_to_1_map): Likewise.
1161 (undo_partition): Likewise.
1162 (add_symbol_to_partition): Likewise.
1163 (contained_in_symbol): Likewise.
1164 (add_symbol_to_partition_1): Likewise.
1165 (add_references_to_partition): Likewise.
1166 (symbol_partitioned_p): Likewise.
1167 (get_symbol_class): Likewise.
1168 (lto_max_map): Likewise.
1169 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
1170 (lto_symtab_merge_symbols): Likewise.
1171 (lto_symtab_merge_symbols_1): Likewise.
1172 (lto_symtab_merge_decls): Likewise.
1173 (lto_symtab_merge_decls_1): Likewise.
1174 (lto_symtab_merge_decls_2): Likewise.
1175 (lto_symtab_resolve_symbols): Likewise.
1176 (lto_symtab_resolve_can_prevail_p): Likewise.
1177 (lto_symtab_symbol_p): Likewise.
1178 (lto_symtab_resolve_replaceable_p): Likewise.
1179 (lto_symtab_merge): Likewise.
1180 (lto_varpool_replace_node): Likewise.
1181 (lto_cgraph_replace_node): Likewise.
1182 * lto.c (lto_main): Likewise.
1183 (do_whole_program_analysis): Likewise.
1184 (materialize_cgraph): Likewise.
1185 (read_cgraph_and_symbols): Likewise.
1186 (cmp_partitions_order): Likewise.
1187 (lto_materialize_function): Likewise.
1188 (has_analyzed_clone_p): Likewise.
1189
8e9055ae
AM
11902013-10-29 Andrew MacLeod <amacleod@redhat.com>
1191
1192 * lto/lto-object.c: Add gimple.h to include list.
1193 * lto/lto-partition.c: Likewise.
1194
377d9792
AM
11952013-10-18 Andrew MacLeod <amacleod@redhat.com>
1196
1197 * lto.c: Remove tree-flow.h from include list.
1198
fffda8d7
RB
11992013-10-15 Richard Biener <rguenther@suse.de>
1200
1201 * lto.c (hash_canonical_type): Split out from ...
1202 (iterative_hash_canonical_type): ... here. Register types
1203 we recurse to.
1204 (gimple_canonical_type_hash): Adjust.
1205 (gimple_register_canonical_type_1): Split out from ...
1206 (gimple_register_canonical_type): ... here. Cache computed
1207 hash value.
1208 (lto_register_canonical_types): Split into two modes,
1209 clearing and computing TYPE_CANONICAL.
1210 (lto_read_decls): Adjust.
1211 (read_cgraph_and_symbols): Do two passes over global trees,
1212 first clearing then computing TYPE_CANONICAL.
1213
1394237e
RB
12142013-10-14 Richard Biener <rguenther@suse.de>
1215
1216 * lto.c (gimple_canonical_types): Move out-of GC space.
1217 (canonical_type_hash_cache): Make a pointer-map.
1218 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
1219 New counters.
1220 (iterative_hash_canonical_type): Adjust.
1221 (read_cgraph_and_symbols): Likewise.
1222 (print_lto_report_1): Likewise.
1223
0a387eca
RB
12242013-10-14 Richard Biener <rguenther@suse.de>
1225
1226 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
1227 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
1228 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
1229 gimple_types_compatible_p_1, gimple_types_compatible_p,
1230 visit, iterative_hash_name, struct type_hash_pair,
1231 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1232 gimple_type_eq, gimple_register_type, num_not_merged_types,
1233 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
1234 num_not_merged_types_in_same_scc_trees): Remove old merging code
1235 and statistics.
1236 (lto_read_decls): Do not run old merging code in parallel.
1237 (read_cgraph_and_symbols): Do not init/free old merging
1238 data structures.
1239 (print_lto_report_1): Do not report differences of old vs. new
1240 merging code.
1241
83fd5d11
RB
12422013-10-14 Richard Biener <rguenther@suse.de>
1243
1244 * lto-lang.c (lto_init): Do not re-init canonical types here.
1245 (lto_register_canonical_types): Move to ...
1246 * lto.c (lto_register_canonical_types): ... here.
1247 (gimple_canonical_types, canonical_type_hash_cache,
1248 iterative_hash_canonical_type, gimple_canonical_type_hash,
1249 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
1250 gimple_register_canonical_type): Add canonical type merging machinery
1251 moved from gimple.c.
1252 (read_cgraph_and_symbols): Init and free canonical type tables
1253 here.
1254 (print_lto_report_1): Report canonical type table stats here.
1255
acf0174b
JJ
12562013-10-11 Jakub Jelinek <jakub@redhat.com>
1257
1258 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
1259
7c6fedd2
TT
12602013-09-25 Tom Tromey <tromey@redhat.com>
1261
1262 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
1263 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
1264 (lto/lto-object.o): Remove.
1265
35f32ad4
RB
12662013-09-06 Richard Biener <rguenther@suse.de>
1267
1268 * lto-symtab.c: Move from gcc/
1269 * lto.h: Include vec.h.
1270 (lto_global_var_decls): Declare.
1271 * lto.c (lto_global_var_decls): Move definition here.
1272 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
1273 (lto-symtab.o): Add.
1274 * config-lang.in (gtfiles): Add lto.h.
1275
49322b12
JH
12762013-08-31 Jan Hubicka <jh@suse.cz>
1277
1278 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
1279 DECL_FIELD_OFFSET can contain an reference to variable.
1280
31f1f73b
JH
12812013-08-31 Jan Hubicka <jh@suse.cz>
1282
1283 * lto.c (tree_with_vars): Turn into vector.
1284 (MAYBE_REMEMBER_WITH_VARS): Change to...
1285 (CHECK_VAR): ... this one.
1286 (CHECK_NO_VAR): New macro.
1287 (maybe_remember_with_vars_typed): Turn to ...
1288 (mentions_vars_p_typed): ... this one.
1289 (maybe_remember_with_vars_common): Turn to ...
1290 (mentions_vars_p_comon): ... this one.
1291 (maybe_remember_with_vars_decl_minimal): Turn to ...
1292 (mentions_vars_p_decl_minmal): ... this one.
1293 (maybe_remember_with_vars_decl_common): Turn to ...
1294 (mentions_vars_p_decl_common): ... this one.
1295 (maybe_remember_with_vars_decl_with_vis): Turn to ...
1296 (mentions_vars_p_decl_with_vis): ... this one.
1297 (maybe_remember_with_vars_decl_non_common): Turn to ...
1298 (mentions_vars_p_decl_non_common): ... this one.
1299 (maybe_remember_with_vars_function): Turn to ...
1300 (mentions_vars_p_function): ... this one.
1301 (maybe_remember_with_vars_field_decl): Turn to ...
1302 (mentions_vars_p_field_decl): ... this one.
1303 (maybe_remember_with_vars_type): Turn to ...
1304 (mentions_vars_p_type): ... this one.
1305 (maybe_remember_with_vars_binfo): Turn to ...
1306 (mentions_vars_p_binfo): ... this one.
1307 (maybe_remember_with_vars_constructor): Turn to ...
1308 (mentions_vars_p_constructor): ... this one.
1309 (maybe_remember_with_vars_expr): Turn to ...
1310 (mentions_vars_p_expr): ... this one.
1311 (maybe_remember_with_vars): Turn to ...
1312 (mentions_vars_p): ... this one.
1313 (lto_read_decls): Update.
1314 (LTO_SET_PREVAIL): Do not call function for internal decls.
1315 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
1316 check that something was updated.
1317 (lto_fixup_state): Do not care about internal decls.
1318 (lto_fixup_decls): Update.
1319 (read_cgraph_and_symbols): Update.
1320
256eefa9
JH
13212013-08-29 Jan Hubicka <jh@suse.cz>
1322
1323 * lto.c (read_cgraph_and_symbols): Free decl states.
1324
0170f33c
JH
13252013-08-29 Jan Hubicka <jh@suse.cz>
1326
1327 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
1328 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
1329 TYPE_FINAL_P.
1330
c01c111b
JH
13312013-08-28 Jan Hubicka <jh@suse.cz>
1332
1333 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
1334 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
1335 (unify_scc): Do checking assert.
1336
6a49f3c9
JH
13372013-08-06 Jan Hubicka <jh@suse.cz>
1338 Martin Liska <marxin.liska@gmail.com>
1339
1340 * lto-partition.c (lto_balanced_map): Always base order on
1341 source file order.
1342
a2e2a668
JH
13432013-08-06 Jan Hubicka <jh@suse.cz>
1344
1345 * lto.c (lto_materialize_function): Do not read body anymore.
1346
815effe1
JH
13472013-08-02 Jan Hubicka <jh@suse.cz>
1348
1349 * lto.c (lto_materialize_function): Do not push struct function.
1350 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
1351 (may_need_named_section_p): Even abstract origins may need
1352 named section.
1353
315f8c0e
DM
13542013-07-30 David Malcolm <dmalcolm@redhat.com>
1355
1356 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
1357 PASS_MANAGER_H.
1358
1359 * lto.c (do_whole_program_analysis): Update for move of
1360 all_regular_ipa_passes from a global to a field of class
1361 pass_manager.
1362
1aa95df7
OB
13632013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
1364
1365 * lto-partition.c: Fix typos.
1366
c525ba9a
JH
13672013-06-20 Jan Hubicka <jh@suse.cz>
1368
1369 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
1370 partitioning of variables.
1371
7a89ad00
JH
13722013-06-20 Jan Hubicka <jh@suse.cz>
1373
1374 * lto.c (read_cgraph_and_symbols): Set cgraph state.
1375
6a6dac52
JH
13762013-06-19 Jan Hubicka <jh@suse.cz>
1377
1378 * lto-partition.c (add_references_to_partition): Use
1379 ctor_for_folding.
1380
ac0511f2
RB
13812013-06-18 Richard Biener <rguenther@suse.de>
1382
1383 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
1384 and use it.
1385 (lto_register_function_decl_in_symtab): Likewise.
1386 (cmp_tree): New function.
1387 (unify_scc): Instead of using the streamer cache map from entry
1388 to cache index match up the two maps we have by sorting them.
1389 Adjust calls to lto_register_var_decl_in_symtab and
1390 lto_register_function_decl_in_symtab.
1391
ee03e71d
RB
13922013-06-17 Richard Biener <rguenther@suse.de>
1393
1394 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
1395 * lto.c: Include data-streamer.h.
1396 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
1397 (gimple_type_leader_entry_s, gimple_type_leader,
1398 gimple_lookup_type_leader): Remove.
1399 (gtc_visit): Simplify.
1400 (gimple_types_compatible_p): Likewise.
1401 (gimple_register_type_1): Likewise. Merge into ...
1402 (gimple_register_type): ... this. Keep it as legacy for
1403 statistics purposes for now.
1404 (fixup_integer_cst): Remove.
1405 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
1406 rename to ...
1407 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
1408 maybe_remember_with_vars_*): ... these.
1409 (uniquify_nodes): Remove.
1410 (lto_fixup_prevailing_type): New function.
1411 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
1412 (tree_scc_hash, tree_scc_hash_obstack): New globals.
1413 (num_merged_types, num_prevailing_types, num_not_merged_types,
1414 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
1415 total_scc_size_merged, num_sccs_merged, num_scc_compares,
1416 num_scc_compare_collisions): New global counters.
1417 (compare_tree_sccs_1): New function.
1418 (compare_tree_sccs): Likewise.
1419 (unify_scc): Likewise.
1420 (lto_read_decls): Stream in tree SCCs and unify them on the
1421 way in. Finalize prevailing SCC tree members.
1422 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
1423 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
1424 to ggc-collect during merging.
1425 (print_lto_report_1): Adjust for new merging code.
1426
ca0f62a8
JH
14272013-06-12 Jan Hubicka <jh@suse.cz>
1428
1429 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
1430
bbf9ad07
JH
14312013-06-12 Jan Hubicka <jh@suse.cz>
1432
1433 * lto.c (register_resolution): Take lto_file_data argument.
1434 (lto_register_var_decl_in_symtab,
1435 lto_register_function_decl_in_symtab): Update.
1436 (read_cgraph_and_symbols): Update resolution_map handling.
1437
ecdbd01a 14382013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
1439
1440 * lto-partition.c (get_symbol_class): Simplify weakref handling.
1441 (add_symbol_to_partition_1): Likewise.
1442 (contained_in_symbol): Likewise.
1443 (lto_balanced_map): Likewise.
1444 (rename_statics): Drop weakref.
1445
a367df53
RB
14462013-06-05 Richard Biener <rguenther@suse.de>
1447
1448 * lto.c (num_merged_types): New global variable.
1449 (uniquify_nodes): Increase num_merged_types when merging a type.
1450 (print_lto_report_1): Output the number of merged types.
1451
40a7fe1e
JH
14522013-06-01 Jan Hubicka <jh@suse.cz>
1453
1454 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
1455 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
1456 (do_whole_program_analysis): Update dumping.
1457
e70670cf
JH
14582013-05-29 Jan Hubicka <jh@suse.cz>
1459
1460 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
1461 flags.
1462 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
1463
8ee05051
JH
14642013-05-15 Jan Hubicka <jh@suse.cz>
1465
1466 * lto-partition.c (privatize_symbol_name): Return true when
1467 privatizing happened.
1468 (rename_statics): Do not go into infinite loop when privatizing
1469 is not needed.
1470
427b248d
JM
14712013-05-16 Jason Merrill <jason@redhat.com>
1472
1473 * Make-lang.in ($(LTO_EXE)): Use link mutex.
1474
9de04252
MJ
14752013-05-15 Martin Jambor <mjambor@suse.cz>
1476
1477 * lto-partition.c (lto_balanced_map): Print symbol order instead
1478 of node uids.
1479
2d6e4603
JH
14802013-05-15 Jan Hubicka <jh@suse.cz>
1481
1482 PR lto/57038
1483 PR lto/47375
1484 * lto-partition.c (get_symbol_class): Fix weakrefs.
1485 (lto_balanced_map): Fix weakrefs.
1486 (privatize_symbol_name): Remove unnecesary label.
1487 (rename_statics): Handle weakrefs as statics.
1488
64cfa6c0
JH
14892013-05-09 Jan Hubicka <jh@suse.cz>
1490 Richard Biener <rguenther@suse.de>
1491
1492 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
1493 (lto_register_var_decl_in_symtab): Likewise.
1494 (lto_main): Promote statics.
1495 * lto-partition.c (privatize_symbol_name): New function.
1496 (promote_symbol): Use it.
1497 (may_need_named_section_p): New predicate.
1498 (rename_statics): New functions.
1499 (lto_promote_cross_file_statics): Simplify; do renaming.
1500 (lto_promote_statics_nonwpa): New function.
1501 * lto-partition.h (lto_promote_statics_nonwpa): New function.
1502
e45cde98
RB
15032013-02-08 Richard Biener <rguenther@suse.de>
1504
1505 PR lto/56231
1506 * lto-lang.c (lto_init): Do not enter a dummy file.
1507
6edc3e32
UB
15082013-02-07 Uros Bizjak <ubizjak@gmail.com>
1509
1510 PR bootstrap/56227
1511 * lto.c (lto_resolution_ready): Use %wx instead of
1512 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
1513
ed73881e
RG
15142013-02-04 Richard Guenther <rguenther@suse.de>
1515
1516 PR lto/56168
1517 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
1518 or lto_fixup_decls at LTRANS time.
1519
a19b1432
JH
15202013-01-09 Jan Hubicka <jh@suse.cz>
1521
1522 PR lto/45375
1523 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
1524
49c01f87
L
15252012-12-10 H.J. Lu <hongjiu.lu@intel.com>
1526
1527 PR lto/55466
1528 * lto.c (lto_register_var_decl_in_symtab): Don't record static
1529 variables.
1530 (lto_main): Record the global variables if WPA isn't enabled.
1531
6e1aa848
DN
15322012-11-20 Diego Novillo <dnovillo@google.com>
1533 Jakub Jelinek <jakub@redhat.com>
1534
1535 * lto.c: Replace all vec<T, A>() initializers with vNULL.
1536
9771b263
DN
15372012-11-16 Diego Novillo <dnovillo@google.com>
1538
1539 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1540
1541 * lto-lang.c: Use new vec API in vec.h.
1542 * lto-partition.c: Likewise.
1543 * lto-partition.h: Likewise.
1544 * lto.c: Likewise.
1545
24551b9c
LC
15462012-10-31 Lawrence Crowl <crowl@google.com>
1547
1548 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
1549 down-cast via dyn_cast.
1550 * lto-partition.c (add_symbol_to_partition_1): Likewise.
1551 (undo_partition): Likewise.
1552 (lto_balanced_map): Likewise.
1553 (get_symbol_class): Likewise and via is_a.
1554 (lto_balanced_map): Change symtab checking to is_a.
1555
aec06f6f
RB
15562012-10-12 Richard Biener <rguenther@suse.de>
1557
1558 PR lto/54898
1559 * lto.c (gimple_types_compatible_p_1): Also compare
1560 TYPE_MAIN_VARIANT.
1561 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
1562
0b8c30f9
TB
15632012-10-09 Tobias Burnus <burnus@net-b.de>
1564
1565 * lto-lang.c (lto_register_builtin_type): Avoid useless
1566 decl creation.
1567 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
1568
da3202a8
TB
15692012-10-08 Tobias Burnus <burnus@net-b.de>
1570
1571 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
1572 Free lto_file struct after closing the file.
1573
2512a443
JH
15742012-10-08 Jan Hubicka <jh@suse.cz>
1575
1576 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
1577 (fixup_integer_cst): New functoin.
1578 (lto_ft_type): Fixup BASETYPE of methods and offsets.
1579
e75f8f79
JH
15802012-10-07 Jan Hubicka <jh@suse.cz>
1581
1582 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
1583 release input encoders.
1584 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
1585
46591697
JH
15862012-10-06 Jan Hubicka <jh@suse.cz>
1587
1588 PR lto/54790
1589 * lto.c (resolution_map): New static var.
1590 (register_resolution): New function.
1591 (lto_register_var_decl_in_symtab): Use it.
1592 (read_cgraph_and_symbols): Copy resolutions into the symtab.
1593
af16bc76
MJ
15942012-09-20 Martin Jambor <mjambor@suse.cz>
1595
1596 * lto.c (lto_materialize_function): Call push_struct_function and
1597 pop_cfun.
1598
5368224f
DC
15992012-09-19 Dehao Chen <dehao@google.com>
1600
1601 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
1602
b5493fb2
JH
16032012-09-19 Jan Hubicka <jh@suse.cz>
1604
1605 * lto.c (lto_materialize_function): Update confused comment.
1606 (read_cgraph_and_symbols): Do not free symtab.
1607
c3c445e1
JH
16082012-09-12 Jan Hubicka <jh@suse.cz>
1609
1610 * lto.c (do_whole_program_analysis): Care timevars, statistics and
1611 AUX pointer cleaning. Add max partitioning.
1612 * lto-partition.c (enum symbol_class): New.
1613 (get_symbol_class): New function.
1614 (symbol_partitioned_p): New function.
1615 (add_references_to_partition): Remove.
1616 (add_aliases_to_partition): Remove.
1617 (add_cgraph_node_to_partition_1): Remove.
1618 (add_cgraph_node_to_partition): Remove.
1619 (add_symbol_to_partition): New function.
1620 (add_symbol_to_partition_1): New function.
1621 (contained_in_symbol): New function.
1622 (partition_cgraph_node_p): Remove.
1623 (partition_varpool_node_p): Remove.
1624 (partition_symbol_p): Remove.
1625 (lto_1_to_1_map): Cleanup.
1626 (lto_max_map): New.
1627 (lto_balanced_map): Update.
1628 (lto_promote_cross_file_statics): Update.
1629 * lto-partition.h (lto_max_map): Declare.
1630 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
1631
b5c7cdfb
JH
16322012-09-11 Jan Hubicka <jh@suse.cz>
1633
1634 PR lto/54312
1635 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
1636 type is variant leader.
1637
b29402f0
RG
16382012-09-11 Richard Guenther <rguenther@suse.de>
1639
1640 * lto.c (enum gtc_mode): Remove.
1641 (struct type_pair_d): Adjust.
1642 (lookup_type_pair): Likewise.
1643 (gimple_type_leader): Do not mark as deletable.
1644 (gimple_lookup_type_leader): Adjust.
1645 (gtc_visit): Likewise.
1646 (gimple_types_compatible_p_1): Likewise.
1647 (gimple_types_compatible_p): Likewise.
1648 (gimple_type_hash): Likewise.
1649 (gimple_register_type): Likewise.
1650 (read_cgraph_and_symbols): Manage lifetime of tables
1651 here.
1652
b8f4e58f
RG
16532012-09-11 Richard Guenther <rguenther@suse.de>
1654
1655 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
1656 struct type_pair_d, lookup_type_pair, struct sccs,
1657 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
1658 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
1659 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
1660 visit, iterative_hash_name, struct type_hash_pair,
1661 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
1662 gimple_type_eq, gimple_register_type_1, gimple_register_type):
1663 Move here from gimple.c
1664 (read_cgraph_and_symbols): Free hash tables here.
1665 (print_lto_report_1): New function wrapping print_lto_report.
1666 (do_whole_program_analysis): Call it.
1667 (lto_main): Likewise.
1668
1cdbb3f9
JH
16692012-09-10 Jan Hubicka <jh@suse.cz>
1670
1671 * lto-partition.c (partition_symbol_p): Forward declare.
1672 (add_references_to_partition): Reimplement using partition_symbol_p.
1673 (add_aliases_to_partition): Break out from add_references_to_partition;
1674 reimplement using partition_symbol_p.
1675 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
1676 add sanity checks.
1677 (add_varpool_node_to_partition): Use add_aliases_to_partition.
1678 (partition_varpool_node_p): Do not special case aliases.
1679
b4661bfe
JH
16802012-08-12 Jan Hubicka <jh@suse.cz>
1681
1682 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
1683 it is deleted after streaming.
1684 * lto-partition.c (partition_symbol_p): New function.
1685 (promote_var, promote_fn): Remove.
1686 (promote_symbol): New function.
1687 (lto_promote_cross_file_statics): First compute boundaries; rewrite
1688 to lookup the actual boundaries instead of computing them ad-hoc.
1689
7b99cca4
JH
16902012-08-12 Jan Hubicka <jh@suse.cz>
1691
1692 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
1693 in partitioning.
1694 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
1695 by encoder.
1696 * lto-partition.c (new_partition): Update.
1697 * lto.c (cmp_partitions_order): Update.
1698 (lto_wpa_write_files): Update.
1699 (free_ltrans_partitions): Update.
1700 (add_references_to_partition): Update.
1701 (add_cgraph_node_to_partition_1): Update.
1702 (add_cgraph_node_to_partition): Update.
1703 (add_varpool_node_to_partition): Update.
1704 (undo_partition): Update.
1705 (lto_balanced_map): Update.
1706 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
1707 set_referenced_from_this_partition_p): Update.
1708 (lto_promote_cross_file_statics): Update.
1709
f27c1867
JH
17102012-08-12 Jan Hubicka <jh@suse.cz>
1711
1712 * lto-partition.c (set_referenced_from_other_partition_p,
1713 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
1714 New functions.
1715 (lto_promote_cross_file_statics): Use them.
1716
ab96cc5b
JH
17172012-07-24 Jan Hubicka <jh@suse.cz>
1718
1719 * lto.c (read_cgraph_and_symbols): Use input_symtab.
1720
0229aee9
UB
17212012-07-24 Uros Bizjak <ubizjak@gmail.com>
1722
1723 * lto-tree.h (lang_decl): Add variable_size GTY option.
1724
7ee2468b
SB
17252012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1726
1727 * lto.c: Do not include timevar.h.
1728 * Make-lang.in: Fix dependencies.
1729
a910399d
LC
17302012-06-18 Lawrence Crowl <crowl@google.com>
1731
1732 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
1733 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
1734 to lto_wpa_write_files.
1735 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
1736 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
1737 TV_PHASE_SETUP for the call to lto_init. Use new timevar
1738 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
1739 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
1740 to be a front end, but is not one.
1741
877ab5e9
JH
17422012-05-18 Jan Hubicka <jh@suse.cz>
1743
1744 * lto.c (lto_materialize_constructors_and_inits): Remove.
1745 (read_cgraph_and_symbols): Remove handling of alias pairs.
1746
6649df51
JH
17472012-05-17 Jan Hubicka <jh@suse.cz>
1748
1749 * lto-partition.c (add_references_to_partition): Handle external vars.
1750 (partition_varpool_node_p): Likewise.
1751 (lto_promote_cross_file_statics): Do not promote externals.
1752
d1ede5f4
BS
17532012-05-14 Bernd Schmidt <bernds@codesourcery.com>
1754
1755 * lto-lang.c (handle_fnspec_attribute): New static function.
1756 (lto_attribute_table): Add "fn spec".
1757 (DEF_ATTR_STRING): Define and undefine along with the other macros.
1758
0d6bf48c
JH
17592012-05-04 Jan Hubicka <jh@suse.cz>
1760
1761 * lto.c (do_whole_program_analysis): Set timevars correctly.
1762 (lto_main): Likewise.
d1ede5f4 1763
1d67dde8
RB
17642012-05-04 Richard Guenther <rguenther@suse.de>
1765
1766 * lang.opt (fwpa): Do not mark as Optimization.
1767 (fltrans): Likewise.
1768
65d630d4
JH
17692012-04-30 Jan Hubicka <jh@suse.cz>
1770
1771 * lto.c (lto_main): Use compile ().
1d67dde8
RB
1772 * lto-partition.c (partition_cgraph_node_p): Use
1773 symtab_used_from_object_file_p.
65d630d4
JH
1774 (partition_varpool_node_p): Likewise.
1775
ead84f73
JH
17762012-04-20 Jan Hubicka <jh@suse.cz>
1777
1778 * lto-partition.c (partition_cgraph_node_p): Use force_output.
1779
5932a4d4
JH
17802012-04-18 Jan Hubicka <jh@suse.cz>
1781
1782 * lto-partition.c (add_references_to_partition, lto_balanced_map):
1783 Update for new ipa-ref API.
1784
65c70e6b
JH
17852012-04-16 Jan Hubicka <jh@suse.cz>
1786
1787 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
1788 walkers to walk cgraph and varpool.
1789 (materialize_cgraph): Likewise.
1790 * lto-partition.c (lto_1_to_1_map): Likewise.
1791 (lto_balanced_map): Likewise.
1792 (lto_promote_cross_file_statics): Likewise.
1793
960bfb69
JH
17942012-04-14 Jan Hubicka <jh@suse.cz>
1795
1796 * lto.c: Update field referenced for new cgraph/varpool layout.
1797 * lto-partition.c: Likewise.
1798
a66dc285
JH
17992012-04-11 Jan Hubicka <jh@suse.cz>
1800
1801 * lto.c: Update copyright; remove params.h, ipa-inline.h
1802 and ipa-utils.h inlines; inline lto-partition.h
1803 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
1804 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
1805 add_references_to_partition, add_cgraph_node_to_partition_1,
1806 add_cgraph_node_to_partition, add_varpool_node_to_partition,
1807 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
1808 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
1809 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
1810 * lto-partition.c: ... here; new file.
1811 * lto-partition.h: New file.
1812 * Make-lang.in (lto.o): Update dependencies.
1813 (lto-partition.o): New.
1814
f3b249e5
RG
18152012-04-05 Richard Guenther <rguenther@suse.de>
1816
1817 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1818 definition.
1819
21fa2faf
RG
18202012-03-12 Richard Guenther <rguenther@suse.de>
1821
1822 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1823
6bb485a3
RG
18242012-03-06 Richard Guenther <rguenther@suse.de>
1825
1826 PR lto/52097
1827 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1828
95510497
RG
18292012-02-28 Richard Guenther <rguenther@suse.de>
1830
1831 PR lto/52400
1832 * lto.c (lto_register_function_decl_in_symtab): Do not register
1833 a reverse renamed decl mapping.
1834
09228fef
JJ
18352012-01-06 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR lto/51774
1838 * lto-lang.c (handle_returns_twice_attribute): New function.
1839 (lto_attribute_table): Add returns_twice attribute.
1840
b03eda0d
RG
18412011-12-21 Richard Guenther <rguenther@suse.de>
1842
1843 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1844 (LTO_FIXUP_TREE): Use it.
1845 (uniquify_nodes): Mark new non-prevailing types and avoid
1846 calling gimple_register_type on others.
1847 (lto_read_decls): Add comment.
1848
4ad9a9de
EB
18492011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1850
1851 * lto.h (lto_parse_hex): Delete.
1852 * lto.c (lto_read_decls): Use 'int' for offsets.
1853 (lto_parse_hex): Make static and return proper 64-bit host type.
1854 (lto_resolution_read): Use proper 64-bit host type.
1855
ea973bad
RG
18562011-12-13 Richard Guenther <rguenther@suse.de>
1857
1858 PR lto/48354
1859 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1860 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1861
c8218030
UB
18622011-12-01 Uros Bizjak <ubizjak@gmail.com>
1863
1864 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1865 (ignore_attribute): New.
1866
57ac2606
AH
18672011-11-21 Aldy Hernandez <aldyh@redhat.com>
1868
1869 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1870 (handle_transaction_pure_attribute): New.
1871
52a35ef7
RG
18722011-11-03 Richard Guenther <rguenther@suse.de>
1873
1874 PR lto/44965
1875 * lto-lang.c (lto_post_options): Do not read file options.
1876 * lto.c (lto_read_all_file_options): Remove.
1877 (lto_init): Call lto_set_in_hooks here.
1878
51973b1e
JH
18792011-10-09 Jan Hubicka <jh@suse.cz>
1880
1881 * lto.c (node_cmp, varpool_node_cmp): New functions.
1882 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1883 (cmp_partitions): Rename to ...
1884 (cmp_partitions_size): ... this one.
1885 (cmp_partitions_order): New function.
1886 (lto_wpa_write_files): Sort partitions by order when
1887 -fno-toplevel-reorder is used.
1888
5958009b
AK
18892011-10-09 Andi Kleen <ak@linux.intel.com>
1890
1891 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1892
e79983f4
MM
18932011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1894
1895 * lto-lang.c (def_builtin_1): Delete old interface with two
1896 parallel arrays to hold standard builtin declarations, and replace
1897 it with a function based interface that can support creating
1898 builtins on the fly in the future. Change all uses, and poison
1899 the old names. Make sure 0 is not a legitimate builtin index.
1900
ecdbd01a 19012011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
1902
1903 * lto-object.c (lto_obj_add_section_data): Add list.
1904 (lto_obj_add_section): Fill in list.
1905 (ltoobj_build_section_table): Pass through list.
1906 * lto.c (file_data_list): Declare.
1907 (create_subid_section_table): Pass arguments directly.
1908 Fill in list of file_datas.
1909 (lwstate): Delete.
1910 (lto_create_files_from_ids): Pass in direct arguments.
1911 Don't maintain list.
1912 (lto_file_read): Use explicit section and file data lists.
1913 (lto_read_all_file_options): Pass in section_list.
1914 * lto.h (lto_obj_build_section_table): Add list.
1915 (lto_section_slot): Add next.
1916 (lto_section_list): Declare.
1917
ed0d2da0
JH
19182011-10-02 Jan Hubicka <jh@suse.cz>
1919
1920 PR lto/47247
1921 * common.c (lto_resolution_str): Add new resolution.
1922 * common.h (lto_resolution_str): Likewise.
1923
ad7715f3
L
19242011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1925 Andi Kleen <ak@linux.intel.com>
1926
1927 PR lto/50568
1928 * lto.c (lto_splay_tree_delete_id): New.
1929 (lto_splay_tree_compare_ids): Likewise.
1930 (lto_splay_tree_lookup): Likewise.
1931 (lto_splay_tree_id_equal_p): Likewise.
1932 (lto_splay_tree_insert): Likewise.
1933 (lto_splay_tree_new): Likewise.
1934 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1935 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1936 (create_subid_section_table): Use lto_splay_tree_lookup and
1937 lto_splay_tree_insert.
1938 (lto_file_read): Use lto_splay_tree_new.
1939
ecdbd01a 19402011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
1941
1942 * lto.c (lto_resolution_read): Remove id dumping.
1943 (lto_section_with_id): Turn id HOST_WIDE_ID.
1944 (create_subid_section_table): Dito.
1945
892a371f
DS
19462011-08-28 Dodji Seketeli <dodji@redhat.com>
1947
1948 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1949 linemap_add twice.
1950
f82d1a94
MJ
19512011-08-11 Martin Jambor <mjambor@suse.cz>
1952
1953 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1954
f0efc7aa
DN
19552011-08-08 Diego Novillo <dnovillo@google.com>
1956
1957 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1958 * lto.c: Include tree-streamer.h.
1959
1a072294
RG
19602011-07-06 Richard Guenther <rguenther@suse.de>
1961
1962 * lto-lang.c (lto_init):
1963 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1964
7496868d
JH
19652011-06-11 Jan Hubicka <jh@suse.cz>
1966
10f13f22 1967 PR lto/48246
7496868d
JH
1968 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1969 (lto_balanced_map): Likewise.
1970
39e2db00
JH
19712011-06-11 Jan Hubicka <jh@suse.cz>
1972
1973 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1974 (add_cgraph_node_to_partition) ... here; walk aliases.
1975 (lto_1_to_1_map): Remove same body alias code.
1976 (promote_fn): Likewise.
1977 (lto_promote_cross_file_statics): Update comment.
1978
1979
28628ea6
DN
19802011-06-07 Diego Novillo <dnovillo@google.com>
1981
1982 * lto.c (uniquify_nodes): Move code to register decls to
1983 the loop that computes canonical types.
1984
009db074
RG
19852011-06-07 Richard Guenther <rguenther@suse.de>
1986
1987 * lto-lang.c (lto_init): Do not set
1988 size_type_node or call set_sizetype.
1989
47c79d56
DN
19902011-06-04 Diego Novillo <dnovillo@google.com>
1991
1992 * lto.c (lto_init): New.
1993 (lto_main): Call it.
1994
d5828cc7
DN
19952011-06-03 Diego Novillo <dnovillo@google.com>
1996
1997 * lto.c (get_resolution): Move from lto-streamer-in.c.
1998 (lto_register_var_decl_in_symtab): Likewise.
1999 (lto_register_function_decl_in_symtab): Likewise.
2000 (uniquify_nodes): Call lto_register_var_decl and
2001 lto_register_function_decl_in_symtab after reading a new
2002 VAR_DECL or FUNCTION_DECL.
2003
6807da97
RG
20042011-06-01 Richard Guenther <rguenther@suse.de>
2005
2006 * lto-lang.c (lto_register_canonical_types): New function.
2007 (lto_init): Register common nodes with the canonical type machinery.
2008 Do not play tricks with char_type_node.
2009
d74be317
RG
20102011-05-26 Richard Guenther <rguenther@suse.de>
2011
2012 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
2013
d9f8303f
NF
20142011-05-25 Nathan Froyd <froydnj@codesourcery.com>
2015
2016 * lto.c (lto_ft_typed): New function.
2017 (lto_ft_common): Call it.
2018 (lto_ft_constructor): Likewise.
2019 (lto_ft_expr): Likewise.
2020 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
2021 TREE_CHAIN.
2022
fb291a1e
RG
20232011-05-20 Richard Guenther <rguenther@suse.de>
2024
2025 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
2026 (lto_ft_type): Move main-variant and pointer-to chain building ...
2027 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
2028 in a separate final loop.
2029
31b3ca64
RG
20302011-05-19 Richard Guenther <rguenther@suse.de>
2031
2032 * lto.c (uniquify_nodes): First register all types before
2033 fixing up the tree SCC.
2034
35d828c5
JH
20352011-05-11 Jan Hubicka <jh@suse.cz>
2036
2037 PR lto/48952
2038 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
2039
51545682
NF
20402011-05-11 Nathan Froyd <froydnj@codesourcery.com>
2041
2042 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
2043 location of binfo field.
2044 (lto_fixup_prevailing_decls): Likewise.
2045
8242dd04
NF
20462011-05-10 Nathan Froyd <froydnj@codesourcery.com>
2047
2048 * lto-lang.c (def_fn_type): Don't call build_function_type, call
2049 build_function_type_array or build_varargs_function_type_array
2050 instead.
2051
c99c0026
EB
20522011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2053
2054 * lto-lang.c (global_bindings_p): Return bool.
2055
c47d0034
JH
20562011-05-07 Jan Hubicka <jh@suse.cz>
2057
a9bcb3f0
EB
2058 * lto.c (lto_materialize_function): Use
2059 cgraph_function_with_gimple_body_p.
2060 (add_cgraph_node_to_partition): Do not re-add items to partition;
2061 handle thunks.
c47d0034
JH
2062 (add_varpool_node_to_partition): Do not re-add items to partition.
2063
bb3398ca
JH
20642011-05-03 Jan Hubicka <jh@suse.cz>
2065
2066 * lto.c (free_ltrans_partitions): Fix accidental commit.
2067
1cb1a99f
JH
20682011-05-03 Jan Hubicka <jh@suse.cz>
2069
2070 * lto.c (ltrans_partition_def): Remove GTY annotations.
2071 (ltrans_partitions): Move to heap.
2072 (new_partition): Update.
2073 (free_ltrans_partitions): New function.
2074 (lto_wpa_write_files): Use it.
2075
af8bca3c
MJ
20762011-04-29 Martin Jambor <mjambor@suse.cz>
2077
2078 * lto.c: Include ipa-utils.h.
2079 (lto_balanced_map): Update call to ipa_reverse_postorder.
2080 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
2081
b823cdfe
MM
20822011-04-29 Michael Matz <matz@suse.de>
2083
2084 * lto.c (toplevel): Include tree-flow.h.
2085 (lto_read_in_decl_state): Don't merge types here.
2086 (tree_with_vars): New static hash table.
2087 (remember_with_vars): New static functions.
2088 (LTO_FIXUP_TYPE): New macro.
2089 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
2090 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
2091 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
2092 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
2093 (lto_read_decls): Uniquify while reading in trees.
2094 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
2095 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
2096 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
2097 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
2098 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
2099 lto_fixup_tree): Remove.
2100 (lto_fixup_state): Remove data argument. Use
2101 lto_symtab_prevailing_decl.
2102 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
2103 (lto_fixup_prevailing_decls): New function.
2104 (lto_fixup_state_aux): Argument aux is unused.
2105 (lto_fixup_decls): Don't allocate pointer sets, don't use
2106 lto_fixup_tree, use lto_fixup_prevailing_decls.
2107 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
2108 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
2109
b9843260
EB
21102011-04-16 Eric Botcazou <ebotcazou@adacore.com>
2111
2112 * lto.c (lto_balanced_map): Fix typos in head comment.
2113 (lto_promote_cross_file_statics): Fix long lines and remove redundant
2114 test.
2115
e7f23018
JH
21162011-04-16 Jan Hubicka <jh@suse.cz>
2117
2118 * lto.c (lto_balanced_map): Update.
2119
10a5dd5d
JH
21202011-04-14 Jan Hubicka <jh@suse.cz>
2121
2122 * lto.c: Include ipa-inline.h
b9843260
EB
2123 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
2124 accessor.
10a5dd5d
JH
2125 (ipa_node_duplication_hook): Fix declaration.
2126 * Make-lang.in (lto.o): Update dependencies.
2127
81f653d6
NF
21282011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2129
2130 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
2131 calling TREE_CHAIN.
2132 * lto.c (lto_fixup_common): Likewise.
2133
dcf0c47e
NF
21342011-04-08 Nathan Froyd <froydnj@codesourcery.com>
2135
2136 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
2137 (handle_type_generic_attribute): Likewise.
2138
e89964e3
MM
21392011-04-03 Michael Matz <matz@suse.de>
2140
2141 * lto.c (lto_materialize_function): Don't read and then discard
2142 sections in WPA mode.
2143 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
2144
2145 * lto-lang.c (registered_builtin_fndecls): Remove.
2146 (lto_getdecls): Return NULL_TREE.
2147 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
2148
d2b3fe18
RG
21492011-03-31 Richard Guenther <rguenther@suse.de>
2150
2151 PR lto/48246
2152 * lto.c (lto_wpa_write_files): Disable assert for non-empty
2153 partitions when checking is not enabled.
2154
ba78087b
KT
21552011-03-25 Kai Tietz <ktietz@redhat.com>
2156
2157 * lto.c (lto_resolution_read): Use filename_cmp instead
2158 of strcmp.
2159 (lto_read_section_data): Likewise.
2160
0edf1bb2
JL
21612011-03-25 Jeff Law <law@redhat.com>
2162
2163 * lto/lto-lang.c (def_fn_type): Add missing va_end.
2164
62d784f7
KT
21652011-03-21 Kai Tietz <ktietz@redhat.com>
2166
2167 PR target/12171
2168 * lto-lang.c (lto_attribute_table): Adjust table.
2169
62dd9571
JJ
21702011-02-18 Jakub Jelinek <jakub@redhat.com>
2171
2172 PR bootstrap/47807
2173 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
2174 of lto-streamer.h.
2175
237d6259
RG
21762011-02-18 Richard Guenther <rguenther@suse.de>
2177
2178 PR lto/47798
2179 * lto-tree.h (lto_global_var_decls): Do not declare here.
2180 * lto-lang.c: Include lto-streamer.h.
2181 * Make-lang.in (lto-lang.o): Adjust dependencies.
2182
8ead2223
KT
21832011-02-10 Kai Tietz <kai.tietz@onevision.com>
2184
2185 PR lto/47241
2186 * lto.c (lto_read_section_data): Free
2187 fd_name in failure case.
2188 For mingw targets don't hash file-descriptor.
2189 (read_cgraph_and_symbols): Close current_lto_file
2190 in failure case.
2191
6e701822
JH
21922011-01-11 Jan Hubicka <jh@suse.cz>
2193
2194 PR lto/45721
2195 PR lto/45375
b9843260
EB
2196 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
2197 are not partitioned.
6e701822 2198
f4da8dce
NF
21992010-12-22 Nathan Froyd <froydnj@codesourcery.com>
2200
2201 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
2202 Use prototype_p.
2203
6b7fb143
RG
22042010-12-06 Richard Guenther <rguenther@suse.de>
2205
2206 PR lto/46796
2207 * lto-lang.c (lto_init): Give names to basic types.
2208
c59ffc41
JM
22092010-11-30 Joseph Myers <joseph@codesourcery.com>
2210
2211 * lto-object.c: Don't include toplev.h.
2212 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
2213
7c475d11
JM
22142010-11-30 Joseph Myers <joseph@codesourcery.com>
2215
2216 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
2217 $(TOPLEV_H).
2218
71f3e391
JM
22192010-11-29 Joseph Myers <joseph@codesourcery.com>
2220
2221 * lto-endian.h: Delete.
2222 * lto-object.c: Don't include "libiberty.h".
2223 (O_BINARY): Don't define.
2224 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
2225 (O_BINARY): Don't define.
2226
9f1718b0
RG
22272010-11-23 Richard Guenther <rguenther@suse.de>
2228
2229 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
2230
39c4e298
RG
22312010-11-23 Richard Guenther <rguenther@suse.de>
2232
2233 PR lto/46605
2234 * lto.c (read_cgraph_and_symbols): Bail out after errors.
2235
b37421c6
JM
22362010-11-17 Joseph Myers <joseph@codesourcery.com>
2237
2238 * lto.c (lto_main): Take no arguments.
2239 * lto.h (lto_main): Update prototype.
2240
d82f74d3
ILT
22412010-11-16 Ian Lance Taylor <iant@google.com>
2242
2243 * lto-object.c (lto_obj_file_open): Call
2244 simple_object_attributes_merge rather than
2245 simple_object_attributes_compare.
2246
a4d8c676
JM
22472010-11-12 Joseph Myers <joseph@codesourcery.com>
2248
2249 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
2250 * lto-lang.c (lto_handle_option): Take location_t parameter.
2251
d8a07487
JM
22522010-11-10 Joseph Myers <joseph@codesourcery.com>
2253
2254 * lto.c (lto_resolution_read): Start diagnostics with lowercase
2255 letters and remove trailing '.'.
2256 (lto_file_finalize): Start diagnostic with a lowercase letter.
2257
6b3456d1
ILT
22582010-11-02 Ian Lance Taylor <iant@google.com>
2259
2260 * lto-object.c: New file.
2261 * lto-elf.c: Remove file.
2262 * lto-macho.c: Remove file.
2263 * lto-macho.h: Remove file.
2264 * lto-coff.c: Remove file.
2265 * lto-coff.h: Remove file.
2266 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
2267 lto/lto-object.o.
2268 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
2269 (lto/lto-objfile.o): New target.
2270 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
2271 (lto/lto.o): Remove $(LIBIBERTY_H).
2272
030cd86c
JH
22732010-10-22 Jan Hubicka <jh@suse.cz>
2274
2275 * lto.c (add_cgraph_node_to_partition,
2276 add_varpool_node_to_partition): Add debug info.
2277 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
2278 partitioned nodes.
2279 (do_whole_program_analysis): Set function flags before dumping.
2280
4490cae6
RG
22812010-10-22 Richard Guenther <rguenther@suse.de>
2282
2283 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
2284 the new gimple_register_canonical_type.
2285
703cdce3
L
22862010-10-20 H.J. Lu <hongjiu.lu@intel.com>
2287
2288 PR bootstrap/45954
2289 * config-lang.in (boot_language): Set to $enable_lto.
2290
1915c739
JJ
22912010-10-18 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR lto/45638
2294 * Make-lang.in (check-lto): New dummy target.
2295
82971de5
EB
22962010-10-14 Eric Botcazou <ebotcazou@adacore.com>
2297
2298 * lto-elf.c (SHN_XINDEX): Define if not already defined.
2299
a75bfaa6
JM
23002010-10-08 Joseph Myers <joseph@codesourcery.com>
2301
2302 * lto-lang.c (lto_init_options): Change to
2303 lto_init_options_struct. Update parameters.
2304 (LANG_HOOKS_INIT_OPTIONS): Don't define.
2305 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
2306
937f7f69
JH
23072010-10-06 Jan Hubicka <jh@suse.cz>
2308
2309 * lto.c (lto_balanced_map): Fix accounting of program size.
2310
2169830c
JH
23112010-10-06 Jan Hubicka <jh@suse.cz>
2312
2313 * lto.c (lto_balanced_map): Do not produce empty partitions.
2314
ecdbd01a 23152010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
2316
2317 * lto.c (lto_process_name): Add.
2318 (lto_main): Call lto_process_name.
2319
06ed016f
JH
23202010-10-06 Jan Hubicka <jh@suse.cz>
2321
2322 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
2323 COMDATs required by the linker.
2324
ae718d66
ILT
23252010-10-05 Ian Lance Taylor <iant@google.com>
2326
2327 * lto.c (lto_section_with_id): Make s a const pointer.
2328
852e4bd2
JH
23292010-10-05 Jan Hubicka <jh@suse.cz>
2330
2331 * lto.c: Include params.h.
2332 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
2333 refcounting in aux field.
2334 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
2335 New functions.
2336 (lto_1_to_1_map): Simplify.
2337 (lto_balanced_map): New function.
2338 (do_whole_program_analysis): Chose proper partitioning alg.
2339 * Make-lang.in (lto.o): Add dependency on params.h
2340
ecdbd01a 23412010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
2342
2343 * Make-lang.in (lto1): Add + to build rule.
2344
ecdbd01a 23452010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
2346
2347 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
2348 with fatal_error.
2349
0d6e14fd
JH
23502010-09-28 Jan Hubicka <jh@suse.cz>
2351
2352 * lto-lang.c (handle_leaf_attribute): New function.
2353 (lto_attribute_tables): Add leaf.
2354
fb462383
JZ
23552010-09-25 Jie Zhang <jie@codesourcery.com>
2356
2357 * lto.c (lto_read_all_file_options): Start a new line after
2358 printing out file names.
2359
051f8cc6
JH
23602010-09-24 Jan Hubicka <jh@suse.cz>
2361
2362 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2363
64e0f5ff
JH
23642010-09-20 Jan Hubicka <jh@suse.cz>
2365
2366 PR tree-optimize/45605
2367 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
2368
a929ec3d
GP
23692010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
2370
2371 * lto-elf.c (lto_obj_file_open): Also provide filename when
2372 elf_begin fails.
2373
4c588abf
JH
23742010-09-17 Jan Hubicka <jh@suse.cz>
2375
2376 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
2377
c3224d6f
RG
23782010-09-17 Richard Guenther <rguenther@suse.de>
2379
2380 * lang.opt (flag_wpa): Also enable for the driver.
2381
52b3b3c7
JH
23822010-09-16 Jan Hubicka <jh@suse.cz>
2383
2384 * lto.c (lto_materialize_function): Do not tamper with STATIC and
2385 EXTERNAL flags.
2386
969c37b7
LB
23872010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2388
2389 * lto-tree.h (struct lang_type): Add variable_size GTY option.
2390
098a4f50
JH
23912010-09-08 Jan Hubicka <jh@suse.cz>
2392
2393 * lto.c (real_file_count, real_file_decl_data): New static vars.
2394 (read_cgraph_and_symbols): Use it.
2395
0f443ad0
RG
23962010-09-08 Richard Guenther <rguenther@suse.de>
2397
2398 * lto.c (read_cgraph_and_symbols): Collect again after each
2399 file.
2400
ee187353
JH
24012010-09-07 Jan Hubicka <jh@suse.cz>
2402
2403 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
2404
b3ec52d0
RG
24052010-09-03 Richard Guenther <rguenther@suse.de>
2406
2407 * lto-elf.c (validate_file): Always error if validation fails.
2408
f1395d4a
JH
24092010-08-20 Jan Hubicka <jh@suse.cz>
2410
2411 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
2412 (lto_wpa_write_files): Update comments.
2413
2429bce3
L
24142010-08-20 H.J. Lu <hongjiu.lu@intel.com>
2415
2416 PR bootstrap/45357
2417 * lto.c (lto_materialize_function): Replace has_analyzed_clone
2418 with has_analyzed_clone_p.
2419
e0f967db
JH
24202010-08-20 Jan Hubicka <jh@suse.cz>
2421
2422 * lto.c (has_analyzed_clone_p): New function
2423 (lto_materialize_function): Use callgraph to determine if
2424 body is needed.
2425 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
2426
ac47786e
NF
24272010-08-20 Nathan Froyd <froydnj@codesourcery.com>
2428
2429 * lto.c: Use FOR_EACH_VEC_ELT.
2430
ecdbd01a 24312010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
2432
2433 * Make-lang.in (lto.o): Add dependency to splay-tree.h
2434
5f20c657
JM
24352010-07-27 Joseph Myers <joseph@codesourcery.com>
2436
2437 * lto-lang.c (lto_handle_option): Update prototype and return
2438 value type. Remove duplicate assignment to result.
2439
7a9bf9a4
JM
24402010-07-27 Joseph Myers <joseph@codesourcery.com>
2441
2442 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
2443 New.
2444 (lto_init_options): Update prototype.
2445 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
2446 Define.
2447
ecdbd01a 24482010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
2449
2450 PR lto/44992
2451 * lto.c: Include splay-tree.h
2452 (lto_resolution_read): Change to walk file_ids tree and parse
2453 extra file_id in resolution file.
2454 (lto_section_with_id): Add.
2455 (create_subid_section_table): Add.
2456 (lwstate): Add.
2457 (lto_create_files_from_ids): Add.
2458 (lto_file_read): Change to handle sub file ids and create list
2459 of file_datas. Add output argument for count.
2460 (get_section_data): Pass file_data to lto_get_section_name.
2461 (lto_flatten_file): Add.
2462 (read_cgraph_and_symbols): Handle linked lists of file_datas.
2463
ecdbd01a 24642010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
2465
2466 * lto-coff.c (hash_name, eq_name): Move.
2467 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2468 * lto-elf.c: (hash_name, eq_name): Move.
2469 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2470 * lto-macho.c: (hash_name, eq_name): Move.
2471 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
2472 * lto.c: (hash_name, eq_name): Move from lto-*.c
2473 (lto_obj_create_section_hash_table): Add.
2474 (free_with_string): Add.
2475
718f9c0f
MLI
24762010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
2477
2478 * lto-coff.c: Include diagnostic-core.h in every file that
2479 includes toplev.h.
2480 * lto-elf.c: Likewise.
2481 * lto-lang.c: Likewise.
2482 * lto-macho.c: Likewise.
2483
1b137837
JJ
24842010-07-07 Jakub Jelinek <jakub@redhat.com>
2485
2486 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
2487 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
2488 objects.
2489
92eb4438
JH
24902010-07-05 Jan Hubicka <jh@suse.cz>
2491
2492 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
2493 nodes from same comdat group as well as all comdat functions referenced
2494 here.
b9843260
EB
2495 (add_varpool_node_to_partition, add_references_to_partition): New
2496 function.
2497 (lto_1_1_map): Skip COMDAT fnctions/variables; use
2498 add_varpool_node_to_partition; clear aux flags when done.
2499 (lto_promote_cross_file_statics): Do not promote stuff that gets
2500 duplicated to each ltrans.
92eb4438 2501
a05541a9
JH
25022010-07-04 Jan Hubicka <jh@suse.cz>
2503
2504 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
2505
4a2ac96f
RG
25062010-06-13 Richard Guenther <rguenther@suse.de>
2507
2508 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
2509
1d536046
KT
25102010-06-09 Kai Tietz <kai.tietz@onevision.com>
2511
2512 * lto.c (lto_resolution_read): Pre-initialize local variable r.
2513 * lto-coff.c (coff_write_object_file): Add braces to if.
2514
a9429e29
LB
25152010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2516
2517 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
2518 (lto_file_read): Likewise.
2519 (new_partition): Likewise.
2520 (read_cgraph_and_symbols): Likewise.
2521
5498f011
JM
25222010-06-07 Joseph Myers <joseph@codesourcery.com>
2523
2524 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
2525 (lto_handle_option): Don't set flag_signed_char here.
2526
d4c0c9f6
RG
25272010-06-04 Richard Guenther <rguenther@suse.de>
2528
2529 PR lto/41584
2530 * lto.c (lto_1_to_1_map): Use the proper file_data for
2531 varpool nodes.
2532
0a5fa5a1
JH
25332010-05-30 Jan Hubicka <jh@suse.cz>
2534
2535 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
2536 partitioning decisions.
2537
9eec9488
JH
25382010-05-29 Jan Hubicka <jh@suse.cz>
2539
2540 * lto.c (bitmap vector): Remove.
2541 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
2542 (ltrans_partition_def): New structure.
2543 (ltrans_partition): New type and VECtor.
2544 (new_partition): New function.
2545 (add_cgraph_node_to_partition): New function.
2546 (lto_1_to_1_map): Reorganize for partitions.
2547 (lto_add_inline_clones): Remove.
2548 (lto_add_all_inlinees): Remove.
2549 (lto_promote_cross_file_statics): Use partitions.
2550 (cmp_partitions): New function.
2551 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
2552 use partitions; output files sorted by size.
2553
3e097227
SB
25542010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2555
2556 * Make-lang.in: Replace vec.h dependency with VEC_H.
2557
7ca92787
JM
25582010-05-28 Joseph Myers <joseph@codesourcery.com>
2559
2560 * lto-coff.c (coff_errmsg): Remove.
2561 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
2562 errors instead of coff_errmsg (-1).
2563 * lto-macho.c (mach_o_errmsg): Remove.
2564 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
2565 instead of mach_o_errmsg (-1).
2566 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
2567 xstrerror (errno).
2568
b5611987
RG
25692010-05-28 Richard Guenther <rguenther@suse.de>
2570
2571 * lto.c (prefix_name_with_star): Removed.
2572 (strip_extension): Likewise.
2573 (get_filename_for_set): Likewise.
2574 (lto_write_ltrans_list): Fold into ...
2575 (lto_wpa_write_files): ... this. Name LTRANS units
2576 by suffixing the ltrans output list filename.
2577 (do_whole_program_analysis): Adjust.
2578
1da2ed5f
JM
25792010-05-27 Joseph Myers <joseph@codesourcery.com>
2580
2581 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
2582 (read_cgraph_and_symbols, lto_main): Use seen_error.
2583 * Make-lang.in (lto/lto.o): Update dependencies.
2584
7951d88a
EB
25852010-05-27 Eric Botcazou <ebotcazou@adacore.com>
2586
2587 PR lto/44230
2588 * lto.h (lto_eh_personality): New prototype.
2589 * lto.c: Include debug.h.
2590 (first_personality_decl): New static variable.
2591 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
2592 first function for which it is non-null.
2593 (lto_eh_personality_decl): New static variable.
2594 (lto_eh_personality): New function.
2595 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
2596 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
2597
e12da9c2
SB
25982010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2599
2600 * lto-lang.c: Do not include expr.h.
2601
468194f4
RG
26022010-05-24 Richard Guenther <rguenther@suse.de>
2603
2604 * lto-elf.c (lto_obj_build_section_table): Work around
2605 FreeBSD libelf issue.
2606
bd9eb5da
RG
26072010-05-22 Richard Guenther <rguenther@suse.de>
2608
2609 * lto.c (read_cgraph_and_symbols): Do not collect.
2610
66576e1b
JH
26112010-05-20 Jan Hubicka <jh@suse.cz>
2612
2613 * lto.c (promote_var, promote_fn): New functions.
2614 (lto_promote_cross_file_statics): Compute correctly boundary including
2615 static initializers of readonly vars.
2616
36576655
JH
26172010-05-18 Jan Hubicka <jh@suse.cz>
2618
66576e1b 2619 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
2620 (lto_promote_cross_file_statics): Deal with non-inline clones.
2621
28632d63
JH
26222010-05-18 Jan Hubicka <jh@suse.cz>
2623
2624 * lto.c (lto_materialize_function): Announce function when
2625 reading body; allocate_struct_function only when reading body;
2626 do not finalize local statics; ggc_collect after reading;
2627 do not mark reachable node.
2628 (materialize_cgraph): Do not announce function.
2629
33e42d56
JH
26302010-05-11 Jan Hubicka <jh@suse.cz>
2631
2632 * lto.c (materialize_cgraph): Revert my previous patch.
2633
f6430ea5
KT
26342010-05-11 Kai Tietz <kai.tietz@onevision.com>
2635
2636 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
2637 IMAGE_FILE_MACHINE_AMD64.
2638 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
2639
0a0b07b7
JH
26402010-05-11 Jan Hubicka <jh@suse.cz>
2641
2642 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
2643 (materialize_cgraph): Add it here.
2644
9a809897
JH
26452010-05-11 Jan Hubicka <jh@suse.cz>
2646
2647 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
2648 vector.
2649
26502010-05-11 Jan Hubicka <jh@suse.cz>
2651
2652 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
2653 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
2654 use reachable_from_other_partition_p and
2655 referenced_from_other_partition_p test.
2656
94f64249
KT
26572010-05-11 Kai Tietz <kai.tietz@onevision.com>
2658
2659 * lto-coff.c (validate_file): Add x64-coff support.
2660 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
2661 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
2662 * lto-lang.c (lto_build_c_type_nodes): Add check for
2663 'long long unsigned int' for x64-windows.
2664 (lto_init): Likewise.
2665
2666
c082f9f3
SB
26672010-05-07 Steven Bosscher <steven@gcc.gnu.org>
2668
2669 * lto.h (struct lto_file_struct): Document offset member.
2670 * lto-endian.h: New file.
2671 * lto-macho.h: New file.
2672 * lto-macho.c: New file.
2673 * Make-lang.in: Add rule for lto-macho.o.
2674
3f8257db 26752010-05-07 Richard Guenther <rguenther@suse.de>
5cd0e96b
RG
2676
2677 PR lto/43857
2678 PR lto/43371
2679 * lang.opt (fresolution): Change to ...
2680 (fresolution=): ... this.
2681 * lto-lang.c (lto_handle_option): Adjust.
2682
48cf395b
RB
26832010-05-07 Richard Guenther <rguenther@suse.de>
2684
2685 * lto.c (DUMPBASE_SUFFIX): Remove.
2686 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
2687 Rename to ...
2688 (lto_write_ltrans_list): ... only output the list of ltrans files.
2689 (lto_maybe_unlink): Remove.
2690 (do_whole_program_analysis): Do not execute LTRANS phase
2691 from here.
2692
afa83c15
L
26932010-05-06 H.J. Lu <hongjiu.lu@intel.com>
2694
2695 * lto-lang.c (lto_handle_option): Add argument kind.
2696
369451ec
JH
26972010-05-05 Jan Hubicka <jh@suse.cz>
2698
48cf395b
RB
2699 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
2700 refs.
369451ec 2701
2f41ecf5
JH
27022010-05-05 Jan Hubicka <jh@suse.cz>
2703
2704 * lto.c (lto_1_to_1_map): Partition only needed nodes.
2705
ace72c88
JH
27062010-04-30 Jan Hubicka <jh@suse.cz>
2707
b9843260
EB
2708 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
2709 use default name.
ace72c88
JH
2710 (lto_wpa_write_files): Write any non-empty partition.
2711
05575e07
JH
27122010-04-30 Jan Hubicka <jh@suse.cz>
2713
2714 * lto.c: Do not attempt to make constant pool references global.
2715
49ba8180
JH
27162010-04-28 Jan Hubicka <jh@suse.cz>
2717
2718 * lto/lto.c (lto_read_in_decl_state): Use GGC.
2719 (lto_wpa_write_files): Announce what we are writting.
2720 (all_file_decl_data): New.
2721 (read_cgraph_and_symbols): Use GGC; correct timevars.
2722 (do_whole_program_analysis): Collect.
2723 * lto/Make-lang.in (lto.o): Fix dependency.
2724 * Makefile.in (GTFILES): Add lto-streamer.h.
2725 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
2726 (varpool_assemble_pending_decls): Use VAROUT.
2727 * lto-streamer.h (lto_tree_ref_table): Annotate.
2728 (lto_in_decl_state): Annotate.
2729 (lto_file_decl_data): Annotate.
2730
2942c502
JH
27312010-04-28 Jan Hubicka <jh@suse.cz>
2732
2733 * lto.c (lto_varpool_node_sets): New.
2734 (lto_1_to_1_map): Partition varpool too.
2735 (globalize_context_t, globalize_cross_file_statics,
2736 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
2737 lto_scan_statics_in_remaining_global_vars): Remove.
2738 (lto_promote_cross_file_statics): Rewrite.
2739 (get_filename_for_set): Take vset argument.
2740 (lto_wpa_write_files): Pass around vsets.
2741
3bec79c5
DK
27422010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
2743
2744 PR lto/42776
2745 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
2746 hardcoding 'lto-elf.o'.
2747 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
2748
2749 * lto-coff.h: New file.
2750 * lto-coff.c: Likewise.
2751
21aac880
RG
27522010-04-26 Richard Guenther <rguenther@suse.de>
2753
2754 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
2755
2cee0101
DK
27562010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
2757
2758 * lto.h (lto_elf_file_open): Rename prototype from this ...
2759 (lto_obj_file_open): ... to this.
2760 (lto_elf_file_close): Likewise ...
2761 (lto_obj_file_close): ... and likewise.
2762 (lto_elf_build_section_table): Likewise ...
2763 (lto_obj_build_section_table): ... and likewise.
2764 (lto_elf_begin_section): Likewise ...
2765 (lto_obj_begin_section): ... and likewise.
2766 (lto_elf_append_data): Likewise ...
2767 (lto_obj_append_data): ... and likewise.
2768 (lto_elf_end_section): Likewise ...
2769 (lto_obj_end_section): ... and likewise.
2770 * lto.c (lto_file_read): Update references to the above.
2771 (lto_wpa_write_files): Likewise.
2772 (lto_read_all_file_options): Likewise.
2773 (read_cgraph_and_symbols): Likewise.
2774 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
2775 (LANG_HOOKS_APPEND_DATA): Likewise.
2776 (LANG_HOOKS_END_SECTION): Likewise.
2777 * lto-elf.c (lto_elf_file_open): Rename from this ...
2778 (lto_obj_file_open): ... to this, updating any references.
2779 (lto_elf_file_close): Likewise ...
2780 (lto_obj_file_close): ... and likewise.
2781 (lto_elf_build_section_table): Likewise ...
2782 (lto_obj_build_section_table): ... and likewise.
2783 (lto_elf_begin_section): Likewise ...
2784 (lto_obj_begin_section): ... and likewise.
2785 (lto_elf_append_data): Likewise ...
2786 (lto_obj_append_data): ... and likewise.
2787 (lto_elf_end_section): Likewise ...
2788 (lto_obj_end_section): ... and likewise.
2789
bc58d7e1
JH
27902010-04-21 Jan Hubicka <jh@suse.cz>
2791
2792 * lto.c (lto_fixup_tree): Do not call wpa fixup.
2793 (materialize_cgraph): Likewise.
2794
e792884f
JH
27952010-04-21 Jan Hubicka <jh@suse.cz>
2796
2797 * lto.c (lto_wpa_write_files): Update.
2798 (read_cgraph_and_symbols): Be more verbose.
2799 (materialize_cgraph): Likewise.
2800 (do_whole_program_analysis): Likewise.
2801
c9945504
JH
28022010-04-21 Jan Hubicka <jh@suse.cz>
2803
2804 * lto.c (globalize_cross_file_statics): When function has address taken,
2805 it needs to be public.
2806
a837268b
JH
28072010-04-20 Jan Hubicka <jh@suse.cz>
2808
2809 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
2810 (lto_add_all_inlinees): Likewise.
2811 (lto_wpa_write_files): Likewise.
2812
3b9e5d95
EB
28132010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2814
2815 * lto-lang.c (lto_init): Remove second argument in call to
2816 build_common_tree_nodes.
2817
8ccb78f2
RO
28182010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2819
2820 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2821 function.
2822
2f9b99e6
EB
28232010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2824
2825 PR bootstrap/43276
2826 * lto-elf.c: Define EM_* constants if not already defined.
2827
bef7d288
EB
28282010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2829
2830 * lto-elf.c (is_compatible_architecture): New static function.
2831 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2832
f68df07c
RG
28332010-02-11 Richard Guenther <rguenther@suse.de>
2834
2835 PR driver/43021
2836 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2837 appropriately.
2838
3cdea2b4
AH
28392010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2840
2841 * lto.c (O_BINARY): Define.
2842 (lto_read_section_data): Open file in binary mode.
2843 * lto-elf.c (O_BINARY): Define.
2844 (lto_elf_file_open): Open file in binary mode.
2845
c59449fa
RG
28462010-01-08 Richard Guenther <rguenther@suse.de>
2847
2848 PR lto/42528
2849 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2850 (lto_init): Do not init char_type_node in a standard way
2851 but according to flag_signed_char.
2852
d7fb0a6d
L
28532010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2854
2855 PR lto/41564
2856 * lto.c (DUMPBASE_SUFFIX): New.
2857 (lto_execute_ltrans): Append a sequence number to -dumpbase
2858 for LTRANS.
2859
78ce4053
L
28602010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2861
2862 PR lto/42580
2863 * lto-elf.c (lto_elf_file_open): Stop if the command line
2864 option file is missing.
2865
2a71eb48
RG
28662009-12-15 Richard Guenther <rguenther@suse.de>
2867
2868 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2869 (lto_post_options): Do not disable debuginfo.
2870
a818bca1
DG
28712009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2872
2873 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2874
e7d00517
RG
28752009-12-11 Richard Guenther <rguenther@suse.de>
2876
2877 PR lto/42037
2878 * lto.c (lto_resolution_read): Properly grow the vector.
2879
1ab53893
RG
28802009-12-11 Richard Guenther <rguenther@suse.de>
2881
2882 PR lto/41915
2883 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2884 to the C99 default. Do not set flag_unit_at_a_time.
2885
0f900dfa
JJ
28862009-11-28 Jakub Jelinek <jakub@redhat.com>
2887
2888 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2889 variable.
2890
92fa7608
RAE
28912009-11-19 Rafael Avila de Espindola <espindola@google.com>
2892
2893 PR bootstrap/42096
2894 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2895 * lto.c (lto_parse_hex): New.
2896 (lto_resolution_read): Use lto_parse_hex.
2897 * lto.h (lto_parse_hex): New.
2898
9870fe4f
RAE
28992009-11-17 Rafael Avila de Espindola <espindola@google.com>
2900
2901 * lto-elf.c (lto_file_init): Add offset argument.
2902 (lto_elf_file_open): Record the offset.
2903 * lto.c (lto_resolution_read): Change file_name into a lto_file
2904 argument. Check offsets.
2905 (lto_file_read): Update call to lto_resolution_read.
2906 * lto.h (lto_file_struct): Add the offset field.
2907
1b70729f
RAE
29082009-11-16 Rafael Avila de Espindola <espindola@google.com>
2909
2910 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2911
0e3776db
JH
29122009-11-14 Jan Hubicka <jh@suse.cz>
2913
2914 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2915
06bd7f56
RAE
29162009-11-12 Rafael Avila de Espindola <espindola@google.com>
2917
2918 * lang.opt (fresolution): Renamed from resolution.
2919 * lto-lang.c (lto_handle_option): Handle new option name.
2920 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2921
7e9dc421
RG
29222009-11-04 Richard Guenther <rguenther@suse.de>
2923 Rafael Avila de Espindola <espindola@google.com>
2924
2925 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2926 (lto_elf_file_open): Handle offsets in arguments name@offest.
2927
b207f900
RG
29282009-10-30 Richard Guenther <rguenther@suse.de>
2929
2930 PR lto/41858
2931 * lto.c (lto_file_read): Do not set file_data->fd.
2932 (lto_read_section_data): Use a single-entry file-descriptor cache.
2933 Do not check the result of xmalloc.
2934 (free_section_data): Do not use file_data->fd.
2935 (lto_read_all_file_options): Likewise.
2936
2c928155
RG
29372009-10-22 Richard Guenther <rguenther@suse.de>
2938
2939 * lto.c (lto_fixup_jump_functions): Remove.
2940 (lto_fixup_decls): Do not fixup jump functions.
2941 (read_cgraph_and_symbols): Schedule cgraph merging after
2942 summary reading. Schedule type and decl fixup before
2943 summary reading.
2944
f9c91f8a
RB
29452009-10-22 Richard Guenther <rguenther@suse.de>
2946
2947 * lto.c (lto_fixup_data_t): Remove free_list member.
2948 (lto_fixup_tree): Do not insert into free_list.
2949 (free_decl): Remove.
2950 (lto_fixup_decls): Remove free-list handling.
2951
fb3f88cc
JH
29522009-10-22 Jan Hubicka <jh@suse.cz>
2953
2954 * lto.c (lto_fixup_jump_functions): New function.
2955 (lto_fixup_decls): Use it.
2956
35f1e9f4
RG
29572009-10-16 Richard Guenther <rguenther@suse.de>
2958
2959 PR lto/41715
2960 * lto.c (lto_fixup_tree): Revert last change.
2961
200c8750
RG
29622009-10-14 Richard Guenther <rguenther@suse.de>
2963
2964 * lto.c (lto_fixup_tree): In case the prevailing decl is not
2965 compatible with the one we replace wrap it around a
2966 VIEW_CONVERT_EXPR.
2967
b1b07c92
RG
29682009-10-09 Richard Guenther <rguenther@suse.de>
2969
2970 PR lto/41635
2971 PR lto/41636
2972 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2973 a file.
2974 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2975 (init_ehdr##BITS): Likewise.
2976
3c2e7d45
JM
29772009-10-08 Joseph Myers <joseph@codesourcery.com>
2978
2979 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2980 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2981 diagnostics.
2982 * lto-lang.c (lto_post_options): Remove trailing "." from
2983 diagnostics.
2984
0d0bfe17
RG
29852009-10-08 Richard Guenther <rguenther@suse.de>
2986
2987 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2988 hash tables.
2989
4bedf19a
JM
29902009-10-07 Joseph Myers <joseph@codesourcery.com>
2991
2992 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2993
b20996ff
JH
29942009-10-07 Jan Hubicka <jh@suse.cz>
2995
2996 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2997 ltrans stage; explain why this is needed and should not.
2998
1a735925
RG
29992009-10-05 Richard Guenther <rguenther@suse.de>
3000
3001 PR lto/41552
3002 PR lto/41487
3003 * lto.c (lto_read_decls): Do not register deferred decls.
3004 (read_cgraph_and_symbols): Delay symbol and cgraph merging
3005 until after reading the IPA summaries.
3006
d7f09764
DN
30072009-10-02 Rafael Avila de Espindola <espindola@google.com>
3008
3009 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
3010 (lto-lang.c): Don't include lto/common.h.
3011
30122009-10-02 Rafael Avila de Espindola <espindola@google.com>
3013
3014 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
3015 (lto/common.o): Remove.
3016 * common.c: Remove.
3017 * common.h (lto_kind_str): Remove.
3018 (lto_visibility_str): Remove.
3019 (lto_resolution_str): Make it static.
3020
30212009-10-01 Diego Novillo <dnovillo@google.com>
3022
3023 * lto.c (lto_read_decls): Add comment.
3024 Call internal_error instead of gcc_assert.
3025 (lto_resolution_read): Likewise.
3026 (lto_add_all_inlinees): Tidy.
3027 * Make-lang.in: Fix copyright boilerplate.
3028 (lto.pdf): New.
3029 (lto.install-pdf): New.
3030 * lto-tree.h: Fix copyright boilerplate.
3031 * lang-specs.h: Likewise.
3032 Remove ".lto" entry from compilers fragment.
3033 * lto-elf.c: Move inclusion of gelf.h after config.h.
3034 Tidy formatting everywhere.
3035 * lto.h: Fix copyright boilerplate.
3036 Tidy formatting everywhere.
3037 * common.c: Likewise.
3038 * config-lang.in: Likewise.
3039 * common.h: Likewise.
3040 * lto-lang.c: Likewise.
3041
30422009-10-01 Richard Guenther <rguenther@suse.de>
3043
3044 * lto.c (lto_read_section_data): Use plain lseek/read.
3045
30462009-10-01 Richard Guenther <rguenther@suse.de>
3047
3048 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
3049 use sysconf to query the system page size.
3050 (lto_file_read): Implement fallback using stdio.
3051 (free_section_data): Likewise.
3052
30532009-09-29 Diego Novillo <dnovillo@google.com>
3054
3055 * lto-lang.c (lto_init): Really fix call to
3056 build_common_builtin_nodes.
3057
30582009-09-29 Diego Novillo <dnovillo@google.com>
3059
3060 * lto-lang.c (lto_init): Fix call to
3061 build_common_builtin_nodes.
3062
30632009-09-29 Richard Guenther <rguenther@suse.de>
3064
3065 PR lto/40754
3066 * lto-elf.c (init_shdr##BITS): Properly specify alignment
3067 in bytes.
3068 (first_data_block): New static variable.
3069 (lto_elf_append_data): Align the first data block in each
3070 section.
3071
30722009-09-28 Diego Novillo <dnovillo@google.com>
3073
3074 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
3075 * lto.c (strip_extension): New.
3076 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
3077 (lto_execute_ltrans): Tidy.
3078 Do not pass -fwpa nor -fltrans-* to LTRANS.
3079 * opts.c: Tidy formatting and remove stale FIXME lto markers.
3080 * tree.c (need_assembler_name_p): Call
3081 lang_hooks.decls.may_need_assembler_name_p if set.
3082 * varasm.c (default_binds_local_p_1): Remove check for
3083 flag_ltrans.
3084 * varpool.c (decide_is_variable_needed): Do not test for
3085 in_lto_p.
3086
30872009-09-22 Richard Guenther <rguenther@suse.de>
3088
3089 PR lto/39276
3090 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
3091 * Make-lang.in: Remove ltrans-driver stuff.
3092 * config-lang.in: Likewise.
3093 * lang.opt (fltrans-driver): Remove.
3094 * lto-lang.c (lto_init_options): Remove code initializing
3095 ltrans_driver.
3096 * ltrans-driver: Remove.
3097
30982009-09-21 Diego Novillo <dnovillo@google.com>
3099
3100 * lto-lang.c (lto_define_builtins): Remove superfluous
3101 calls to targetm.init_builtins and build_common_builtin_nodes.
3102 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
3103 build_common_builtin_nodes.
3104 * lto.c (lto_materialize_function): Do nothing if NODE is a
3105 clone.
3106
31072009-09-03 Diego Novillo <dnovillo@google.com>
3108
3109 * lto-elf.c (validate_file): Replace call to
3110 elf_getshstrndx with call to elf_getshdrstrndx.
3111
31122009-08-19 Richard Guenther <rguenther@suse.de>
3113
3114 * lto-lang.c (lto_init): Merge char_type_node with the
3115 appropriately signed variant.
3116
31172009-08-19 Richard Guenther <rguenther@suse.de>
3118
3119 PR lto/41071
3120 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
3121 (lto_fixup_type): Re-build the pointer-to chain part two.
3122
31232009-08-19 Richard Guenther <rguenther@suse.de>
3124
3125 PR lto/41071
3126 * lto.c (lto_fixup_type): Re-build the type variant chain.
3127
31282009-08-19 Richard Guenther <rguenther@suse.de>
3129
3130 PR lto/41071
3131 * lto.c (lto_fixup_constructor): New function.
3132 (lto_fixup_tree): Replace all types. Properly fixup
3133 constructors and constants.
3134
31352009-08-14 Richard Guenther <rguenther@suse.de>
3136
3137 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
3138 for DECL_LANG_SPECIFIC.
3139
31402009-08-13 Richard Guenther <rguenther@suse.de>
3141
3142 PR lto/41032
3143 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
3144
31452009-07-30 Richard Guenther <rguenther@suse.de>
3146
3147 PR lto/40903
3148 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
3149 the largest decl for output and free TREE_CHAIN for further
3150 use.
3151
31522009-07-24 Diego Novillo <dnovillo@google.com>
3153
3154 * Make-lang.in: Add empty lto.install-plugin target.
3155
31562009-07-13 Diego Novillo <dnovillo@google.com>
3157
3158 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
3159
31602009-07-11 Richard Guenther <rguenther@suse.de>
3161
3162 * lto-lang.c (lto_write_globals): Wrapup global decls.
3163
31642009-07-10 Richard Guenther <rguenther@suse.de>
3165
3166 * lto-lang.c (lto_init): Allocate one more location to make
3167 BUILTINS_LOCATION correct.
3168
31692009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3170
3171 * lto.c (free_section_data): Cast computed_offset to caddr_t.
3172
31732009-07-06 Diego Novillo <dnovillo@google.com>
3174
3175 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
3176 TYPE_SIZE_UNIT.
3177
31782009-07-06 Diego Novillo <dnovillo@google.com>
3179
3180 * lto.c (preload_common_nodes): Remove.
3181 (lto_read_in_decl_state): Call lto_streamer_cache_get.
3182 (lto_read_decls): Call lto_data_in_create and
3183 lto_data_in_delete.
3184 (free_decl): Do not call ggc_free.
3185 (lto_main): Call lto_init_reader.
3186 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
3187 (lto_init): Initialize main_identifier_node if needed.
3188 Make ptrdiff_type_node be integer_type_node.
3189
31902009-06-19 Diego Novillo <dnovillo@google.com>
3191
3192 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
3193 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
3194 Remove code guarded by #ifdef LOCAL_TRACE.
3195
31962009-06-18 Diego Novillo <dnovillo@google.com>
3197
3198 * lto.c: Update license to GPLv3.
3199 * lto-elf.c: Likewise.
3200 * common.c: Likewise.
3201 * lto-lang.c: Likewise.
3202 * lto.h: Remove superfluous include files. Update all
3203 users.
3204
32052009-06-17 Diego Novillo <dnovillo@google.com>
3206
3207 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
3208
32092009-06-02 Diego Novillo <dnovillo@google.com>
3210
3211 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
3212 read in.
3213 (materialize_cgraph): Only materialize nodes that have a
3214 representation on file.
3215
32162009-06-01 Diego Novillo <dnovillo@google.com>
3217
3218 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
3219
32202009-05-31 Diego Novillo <dnovillo@google.com>
3221
3222 * lto-lang.c (lto_type_for_mode): Handle all the modes
3223 handled in c_common_type_for_mode.
3224
32252009-05-21 Diego Novillo <dnovillo@google.com>
3226
3227 * lto-elf.c: Always include <gelf.h>.
3228 * config-lang.in (target_libs): Remove.
3229 (build_by_default): Set to no.
3230
32312009-05-15 Diego Novillo <dnovillo@google.com>
3232
3233 * lto.c (lto_materialize_function): Assert that DECL is
3234 not a builtin.
3235 (materialize_cgraph): Don't try to materialize builtin
3236 functions.
3237 * lto-section-out.c (write_symbol_vec): Do not write
3238 builtin functions.
3239
32402009-05-13 Diego Novillo <dnovillo@google.com>
3241
3242 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
3243
32442009-05-07 Diego Novillo <dnovillo@google.com>
3245
3246 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
3247 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
3248 (lto_fixup_type): Call it for TYPE_POINTER_TO,
3249 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
3250 (lto_fixup_tree): Call gimple_register_type when *TP is a
3251 type.
3252 (lto_main): Call bitmap_obstack_initialize.
3253
32542009-04-22 Diego Novillo <dnovillo@google.com>
3255
3256 * lto.c (free_section_data): Tidy.
3257 (lto_1_to_1_map): Tidy.
3258 (lto_add_all_inlinees): Tidy.
3259 (prefix_name_with_star): New.
3260 (get_filename_for_set): New.
3261 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
3262 to determine what cgraph node sets to write.
3263 Call get_filename_for_set to compute temporary file
3264 names.
3265 (lto_execute_ltrans): Do not execute LTRANS on files with
3266 names that start with '*'.
3267 Move logic to execute LTRANS together so that LTRANS is
3268 invoked only if there are any files to compile.
3269 (do_whole_program_analysis): Only remove output files
3270 that do not start with '*'.
3271
32722009-04-06 Diego Novillo <dnovillo@google.com>
3273
3274 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
3275 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
3276 (lto_add_all_inlinees): Tidy.
3277
32782009-03-26 Diego Novillo <dnovillo@google.com>
3279
3280 * lto.c: Include gimple.h.
3281 (lto_read_in_decl_state): Call gimple_register_type for
3282 every type in every stream.
3283 (lto_fixup_common): Call gimple_register_type if T has a
3284 type.
3285 (do_whole_program_analysis): Call print_lto_report.
3286 (lto_main): Call print_lto_report after cgraph_optimize.
3287 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
3288
32892009-03-24 Diego Novillo <dnovillo@google.com>
3290
3291 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
3292 (lto.o): Add dependency on GIMPLE_H.
3293
32942009-03-10 Simon Baldwin <simonb@google.com>
3295
3296 * lto.c (lto_read_all_file_options): Close any open file descriptor
3297 contained in file_data before freeing.
3298
32992009-02-24 Rafael Avila de Espindola <espindola@google.com>
3300
3301 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3302 for a decl in the original bitmap, not a node.
3303 (lto_add_all_inlinees): Remove original nodes that are not needed.
3304 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3305
33062009-02-24 Diego Novillo <dnovillo@google.com>
3307
3308 * lto.c (lto_materialize_function): Update
3309 lto_stats.num_function_bodies.
3310 (get_section_data): Initialize *LEN to 0.
3311 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
3312 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
3313 Update lto_stats.num_output_files.
3314 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
3315 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
3316 (lto_main): Initialize lto_stats.
3317 If flag_lto_report is set, call print_lto_report.
3318
33192009-02-19 Diego Novillo <dnovillo@google.com>
3320
3321 Revert
3322
3323 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
3324
3325 * lto.c (lto_add_inline_clones): Don't add the
3326 master clone. Check for a decl in the original
3327 bitmap, not a node.
3328 (lto_add_all_inlinees): Remove original nodes
3329 that are not needed.
3330 (lto_scan_statics_in_cgraph_node): Don't care if
3331 the node is the master.
3332 (lto_promote_cross_file_statics): Use a new
3333 context.seen_node_decls for each set
3334
33352009-02-19 Rafael Avila de Espindola <espindola@google.com>
3336
3337 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
3338 for a decl in the original bitmap, not a node.
3339 (lto_add_all_inlinees): Remove original nodes that are not needed.
3340 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
3341 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
3342 for each set
3343
33442009-02-18 Diego Novillo <dnovillo@google.com>
3345
3346 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
3347 and TV_WHOPR_WPA_IO.
3348 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
3349 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
3350 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
3351 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
3352 depending on command line flags.
3353 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
3354 (lto_main): Remove timer uses.
3355
33562009-02-18 Rafael Avila de Espindola <espindola@google.com>
3357
3358 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
3359 (lto_wpa_write_files): Update calls to renamed functions.
3360
33612009-02-17 Diego Novillo <dnovillo@google.com>
3362
3363 PR 39203
3364 * lto-lang.c (lto_post_options): Disable -fwhole-program
3365 when running LTRANS.
3366
33672009-02-10 Diego Novillo <dnovillo@google.com>
3368
3369 * lto.c (read_cgraph_and_symbols): Fix comment.
3370
33712009-02-10 Diego Novillo <dnovillo@google.com>
3372
3373 * lto.c (read_cgraph_and_symbols): Read options from all
3374 IL files.
3375
33762009-02-10 Diego Novillo <dnovillo@google.com>
3377
3378 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
3379 (materialize_cgraph): Likewise.
3380 (do_whole_program_analysis): Likewise.
3381 (lto_main): Call read_cgraph_and_symbols,
3382 materialize_cgraph and do_whole_program_analysis.
3383
33842009-02-10 Simon Baldwin <simonb@google.com>
3385
3386 * lto.c: Include lto-opts.h.
3387 * (lto_main): Clear file options at loop start, read any saved
3388 options from the first file handled, and re-issue options.
3389 * Makefile.in (lto.o): Add dependency on lto-opts.h.
3390
33912009-02-02 Diego Novillo <dnovillo@google.com>
3392
3393 * lto.c (lto_main): Stop LTO_TIMER and use
3394 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
3395
33962009-01-30 H.J. Lu <hongjiu.lu@intel.com>
3397
3398 PR lto/38995
3399 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
3400 to POINTER_SIZE.
3401
34022009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
3403
3404 * Make-lang.in (LTO_EXE): Link with all
3405 BACKENDLIBS and not only GMPLIBS
3406
34072009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3408
3409 PR bootstrap/38992
3410 * lto-elf.c: Include gelf.h instead of libelf.h.
3411 (lto_elf_file_close): Replace elfx_update_shstrndx with
3412 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
3413 gelf_update_ehdr.
3414
34152009-01-28 H.J. Lu <hongjiu.lu@intel.com>
3416
3417 PR middle-end/38996
3418 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
3419
34202009-01-26 Diego Novillo <dnovillo@google.com>
3421
3422 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
3423
34242009-01-26 Diego Novillo <dnovillo@google.com>
3425
3426 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
3427 and rename into gimple_types_compatible_p.
3428
34292009-01-12 Rafael Avila de Espindola <espindola@google.com>
3430
3431 * lto-lang.c (lang_hooks): Remove the const qualifier.
3432
34332009-01-06 Diego Novillo <dnovillo@google.com>
3434
3435 * ltrans-driver: Mark 'all' target as phony.
3436
34372008-12-31 Diego Novillo <dnovillo@google.com>
3438
3439 * ltrans-driver: Execute a NOP action for target 'all'.
3440
34412008-12-19 Diego Novillo <dnovillo@google.com>
3442
3443 * lto.c (lto_1_to_1_map): Tidy.
3444
34452008-12-19 Diego Novillo <dnovillo@google.com>
3446
3447 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
3448 be opened, show its name.
3449 * ltrans-driver: If $verbose is set, do not use parallelism.
3450
34512008-12-17 Rafael Avila de Espindola <espindola@google.com>
3452
3453 * lto.c (lto_fixup_function): New.
3454 (lto_fixup_tree): Call lto_fixup_function.
3455
34562008-12-14 Doug Kwan <dougkwan@google.com>
3457
3458 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
3459 variables if there is no function.
3460
34612008-12-10 Simon Baldwin <simonb@google.com>
3462
3463 * ltrans-driver: Always run make in silent mode, to avoid make's
3464 trace on stdout interfering with lto-wrapper output.
3465
34662008-12-10 Doug Kwan <dougkwan@google.com>
3467
3468 * lto.c (lto_add_inline_clones): Do not force master clones of
3469 inlined functions already in SET to be static inline.
3470
34712008-12-04 Doug Kwan <dougkwan@google.com>
3472
3473 * lto.c (globalize_context_t): New type to store states in
3474 globalization of cross-file statics.
3475 (globalize_cross_file_statics): New.
3476 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
3477 static decls that need to be fixed up.
3478 (lto_scan_statics_in_cgraph_node): Change call interface to use
3479 a globalize_context_t CONTEXT for all states used.
3480 (lto_scan_statics_in_remaining_global_vars): New.
3481 (lto_promote_cross_file_statics): Use new call interface of
3482 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
3483 visible vars in the last set.
3484
34852008-12-03 Diego Novillo <dnovillo@google.com>
3486
3487 * lto.c (lto_fixup_tree): Do not emit an error when
3488 PREVAILING throw but T doesn't.
3489
34902008-12-02 Doug Kwan <dougkwan@google.com>
3491
3492 * lto.c (lto_scan_statics_in_ref_table): New function factored out
3493 from code in ...
3494 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
3495 variables and functions.
3496 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
3497 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
3498
34992008-11-29 Diego Novillo <dnovillo@google.com>
3500
3501 * lto.c: Include timevar.h.
3502 (lto_materialize_function): Tidy. Add comments.
3503 (lto_wpa_write_files): Tidy.
3504 (lto_execute_ltrans): Tidy.
3505 (lto_main): Add local variable LTO_TIMER. Initialize it
3506 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
3507 Start and stop the timer.
3508 Tidy comments.
3509 * Make-lang.in (lto.o): Add dependency on timevar.h.
3510 * ltrans-driver: React to -v and -save-temps.
3511 Use simple heuristic to determine how much parallelism to
3512 use when executing make.
3513
35142008-11-12 Doug Kwan <dougkwan@google.com>
3515
3516 * lto.c (lto_bitmap_obstack): Remove var.
3517 (lto_materialize_function): Do nothing instead of marking function
3518 body in file if flag_wpa is true.
3519 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
3520 (lto_scan_statics_in_cgraph_node): New function.
3521 (lto_promote_cross_file_statics): Same.
3522 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
3523 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
3524 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
3525
35262008-11-09 Diego Novillo <dnovillo@google.com>
3527
3528 * lto/lto.c (lto_fixup_tree): Change error message locus
3529 information to include location of mismatching
3530 declaration.
3531 Use TREE_NO_WARNING to avoid repeated messages.
3532 (lto_main): If lto_fixup_decls emitted any errors, exit.
3533 * lto/lto-lang.c: Don't include libfuncs.h and except.h
3534 (lto_init_options): Don't enable exceptions by default.
3535 (lto_eh_runtime_type): Move to lto-function-in.c
3536 (lto_init_eh): Likewise.
3537 (lto_init): Don't call lto_init_eh.
3538 * lto/Make-lang.in (lto-lang.o): Remove dependency on
3539 libfuncs.h and except.h.
3540
35412008-10-30 Diego Novillo <dnovillo@google.com>
3542
3543 * lto.c (lto_read_decls): Declare debug_main only if
3544 LTO_STREAM_DEBUGGING is enabled.
3545
35462008-10-30 Simon Baldwin <simonb@google.com>
3547
3548 * lto.c (lto_wpa_write_files): Create intermediate files with
3549 make_cwd_temp_file().
3550 (lto_maybe_unlink): New. Delete intermediate WPA files unless
3551 WPA_SAVE_LTRANS is set.
3552 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
3553 * ltrans-driver: Do not strip directory from output files.
3554
35552008-10-29 Doug Kwan <dougkwan@google.com>
3556
3557 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
3558 DECL.
3559 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
3560 (lto/lto-symtab.o): Remove rule.
3561 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
3562 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
3563 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
3564 Remove macros.
3565 lto-symtab.c (File): Move up one level.
3566 lto-lang.c (cgraph.h): Remove include.
3567 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3568 input_cgraph): Move to lto-cgraph.c in gcc directory above.
3569 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
3570
35712008-10-24 Rafael Espindola <espindola@google.com>
3572
3573 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
3574 non prevailing weak symbols.
3575
35762008-10-24 Rafael Espindola <espindola@google.com>
3577
3578 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
3579
35802008-10-24 Rafael Espindola <espindola@google.com>
3581
3582 * lto-lang.c (input_node): Avoid casts from pointers to ints of
3583 different types.
3584
35852008-10-23 Simon Baldwin <simonb@google.com>
3586
3587 * lto-lang.c (input_node): Save the node reference, rather than the
3588 node pointer, in node->inlined_to.
3589 (input_cgraph_1): Convert node references into node pointers.
3590
35912008-10-22 Diego Novillo <dnovillo@google.com>
3592 Rafael Espindola <espindola@google.com>
3593
3594 * lto.c (lto_resolution_read): Tidy.
3595 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
3596 abort if RET is NULL.
3597
35982008-10-22 Doug Kwan <dougkwan@google.com>
3599
3600 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
3601 exceptions flag is given.
3602 * lto-lang.c: (lto_init_options) Set default exceptions flag.
3603 (lto_init_eh): Remove exceptions flag initialization.
3604 (lto_init): Only call lto_init_eh if exceptions flag is set.
3605
36062008-10-21 Diego Novillo <dnovillo@google.com>
3607
3608 * lto.c: Tidy some formatting.
3609 * lto.h: Likewise.
3610
36112008-10-21 Simon Baldwin <simonb@google.com>
3612
3613 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
3614 them is NULL (but not the other).
3615
36162008-10-17 Diego Novillo <dnovillo@google.com>
3617
3618 * ltrans-driver: Divert output from make to a temporary file.
3619 Show it if the call to make failed.
3620
36212008-10-15 Diego Novillo <dnovillo@google.com>
3622
3623 * lto.c (lto_wpa_write_files): Reformat do-while loop.
3624 Do not print TEMP_FILENAME
3625 * ltrans-driver: Call make with -s.
3626
36272008-10-15 Diego Novillo <dnovillo@google.com>
3628
3629 * lto-symtab.c (lto_symtab_merge_decl): Do not force
3630 TREE_STATIC on global symbols.
3631
36322008-10-14 Ollie Wild <aaw@google.com>
3633
3634 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
3635 (LTRANS_DRIVER_EXE): Add.
3636 (lto.all.cross): Add LTRANS_DRIVER_EXE.
3637 (lto.all.encap): Add LTRANS_DRIVER_EXE.
3638 (lto.install.common): Remove ltrans-driver.
3639 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
3640 (LTRANS_DRIVER_EXE): New build rule.
3641 * config-lang.in (compilers): Add ltrans-driver.
3642
36432008-10-14 Diego Novillo <dnovillo@google.com>
3644
3645 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
3646 of program name.
3647
36482008-10-13 Ollie Wild <aaw@google.com>
3649
3650 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
3651 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
3652 * ltrans-driver (LTRANS_FLAGS): Remove.
3653
36542008-10-08 Doug Kwan <dougkwan@google.com>
3655
3656 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
3657 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
3658 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
3659 from lto_fixup_state to here.
3660 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
3661 just a free-list. Fix up types also. Move decl merging code to
3662 lto_fixup_tree.
3663 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
3664 object.
3665 (lto_fixup_decls): Use another pointer set to avoid multiple
3666 walking of nodes except for DECLs to be replaced. Pass an
3667 lto_fixup_data_t object to tree-walker.
3668
36692008-10-08 Rafael Espindola <espindola@google.com>
3670
3671 * lto-symtab.c (lto_symtab_set_resolution): New.
3672 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
3673 lto_symtab_get_resolution.
3674 (lto_symtab_prevailing_decl): Return decl for non public decls.
3675 (lto_symtab_get_resolution): New.
3676 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
3677
36782008-10-06 Rafael Espindola <espindola@google.com>
3679
3680 * lto-lang.c: Include cgraph.h.
3681 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
3682 input_cgraph): Moved from lto-cgraph.c.
3683 (LANG_HOOKS_INPUT_CGRAPH): New.
3684
36852008-10-03 Rafael Espindola <espindola@google.com>
3686
3687 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
3688
36892008-10-03 Rafael Espindola <espindola@google.com>
3690
3691 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
3692 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
3693 prevailing definition. Don't mark TREE_NOTHROW differences.
3694 * lto.c (lto_fixup_tree): New.
3695 (lto_fixup_state): New.
3696 (lto_fixup_state_aux): New.
3697 (free_decl): New.
3698 (lto_fixup_decls): New.
3699 (lto_main): Call lto_fixup_decls.
3700
37012008-10-02 Ollie Wild <aaw@google.com>
3702
3703 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
3704 and Init.
3705 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
3706 * lto-lang.c (lto_post_options): Add validation and fixups for
3707 -fltrans and -fwpa.
3708
37092008-10-02 Rafael Espindola <espindola@google.com>
3710
3711 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
3712 lto_symtab_merge_decl): Return void.
3713 (lto_symtab_prevailing_decl): New.
3714
37152008-09-30 Rafael Espindola <espindola@google.com>
3716
3717 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
3718 defined symbols.
3719 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
3720 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
3721 Check for already defined symbols.
3722 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
3723 (LTO_IDENTIFIER_RESOLUTION): Remove.
3724 (LTO_DECL_RESOLUTION): New.
3725
37262008-09-30 Rafael Espindola <espindola@google.com>
3727
3728 * lto.c (lto_read_decls): Use new input_tree signature.
3729
37302008-09-26 Doug Kwan <dougkwan@google.com>
3731
3732 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
3733 bodies affected by exception attribute merging of DECLs.
3734 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
3735 merging.
3736
37372008-09-25 Rafael Espindola <espindola@google.com>
3738
3739 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
3740 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
3741 * lto-symtab.c (lto_symtab_compatible): New.
3742 (lto_symtab_overwrite_decl): New.
3743 (lto_symtab_merge_decl): Refactor to use the above functions
3744 and the resolution from lang_identifier.
3745 * lto-tree.h: Include plugin-api.h.
3746 (lang_identifier): Add resolution.
3747 (LTO_IDENTIFIER_RESOLUTION): New.
3748
37492008-09-25 Ollie Wild <aaw@google.com>
3750
3751 * lang.opt (fltrans-output-list=): New option.
3752 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
3753
37542008-09-25 Rafael Espindola <espindola@google.com>
3755
3756 * lto.c (lto_resolution_read): Initialize ret;
3757
37582008-09-24 Ollie Wild <aaw@google.com>
3759
3760 * lto.c (sys/mman.h): Move include.
3761 (lto_wpa_write_files): Return a list of written files.
3762 (lto_execute_ltrans): New function.
3763 (lto_main): Call lto_execute_ltrans.
3764 (ltrans-driver): New file.
3765 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
3766 (DEAULT_LTRANS_DRIVER_LEN): New macro.
3767 (lto_init_options): Initialize ltrans_driver.
3768 (lto_handle_option): Fix incorrect default output value.
3769 * lang.opt (fltrans-driver=): New option.
3770 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
3771 (lto.install-common): Add lto/ltrans-driver.
3772
37732008-09-24 Rafael Espindola <espindola@google.com>
3774
3775 * Make-lang.in (LTO_OBJS): Add lto/common.o.
3776 (lto/lto.o): Depend on lto/common.h.
3777 (lto/common.o): New.
3778 * lang.opt (resolution): New.
3779 * lto-lang.c (resolution_file_name): New.
3780 (lto_handle_option): Handle OPT_resolution.
3781 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
3782 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
3783 pass it to lto_symtab_merge_decl.
3784 * lto.c: Include common.h.
3785 (lto_read_decls): Add resolutions and resolutions_size arguments.
3786 Initialize data_in.globals_resolution and
3787 data_in.globals_resolution_size.
3788 (index_and_symbol_resolution): New.
3789 (lto_resolution_read): New.
3790 (lto_file_read): Add argument resolution_file.
3791 Read resolution.
3792 * lto.h (resolution_file_name): New.
3793
37942008-09-23 Rafael Espindola <espindola@google.com>
3795
3796 * common.c: Update description.
3797 * common.h: Update description.
3798
37992008-09-23 Rafael Espindola <espindola@google.com>
3800
3801 * common.c: Moved from lto-plugin.
3802 * common.h: Moved from lto-plugin.
3803
38042008-09-22 Doug Kwan <dougkwan@google.com>
3805
3806 * lto.c (VEC(bitmap,heap)): Declare.
3807 (lto_materialize_function): Handle WAP mode specially.
3808 (lto_add_inline_clones): New.
3809 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
3810 return a bitmap of inlined decls.
3811 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
3812 (lto_main): Call reset_inline_failed to reset inlining states.
3813 Check call-graph after WPA inlining.
3814 * lto-lang.c (lto_init): Do not clear flag_generate_lto
3815 unconditionally.
3816
38172008-09-19 Doug Kwan <dougkwan@google.com>
3818
3819 lto.c (lto_main): Remove unsued wrapper code.
3820 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3821
38222008-09-19 Rafael Espindola <espindola@google.com>
3823
3824 * lto-symtab.c: Include lto-tree-in.h.
3825 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3826 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3827 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3828
38292008-09-17 Paolo Bonzini <bonzini@gnu.org>
3830 Rafael Avila de Espindola <espindola@google.com>
3831
3832 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3833 COMPOUND_LITERAL_EXPR_DECL): Remove.
3834 (emit_local_var): Remove.
3835 (lto_expand_expr): Remove.
3836 (lto_staticp): Remove.
3837 (LANG_HOOKS_EXPAND_EXPR): Remove.
3838 (LANG_HOOKS_STATICP): Remove.
3839
38402008-09-11 Diego Novillo <dnovillo@google.com>
3841
3842 * lto-lang.c: Include except.h and libfuncs.h.
3843 (lto_init_eh): New.
3844 (lto_init): Call it.
3845 Set flag_generate_lto to 0.
3846 * Make-lang.in (lto-lang.o): Add dependency on except.h
3847 and libfuncs.h.
3848
38492008-09-09 Bill Maddox <maddox@google.com>
3850
3851 * lto-lang.c: Include header file expr.h.
3852 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3853 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3854 (emit_local_var): Copied from c-semantics.c.
3855 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3856 and c_staticp in c-common.c.
3857 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3858
38592008-09-08 Diego Novillo <dnovillo@google.com>
3860
3861 * lto-lang.c (lto_global_bindings_p): Return 1 during
3862 IPA passes.
3863
38642008-09-07 Diego Novillo <dnovillo@google.com>
3865
3866 * lto.c: Tidy formatting.
3867
38682008-08-04 Bill Maddox <maddox@google.com>
3869
3870 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3871
38722008-09-03 Doug Kwan <dougkwan@google.com>
3873
3874 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3875 CIF_OK instead of NULL.
3876
38772008-09-02 Diego Novillo <dnovillo@google.com>
3878 Simon Baldwin <simonb@google.com>
3879
3880 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3881 c_common_type_for_size.
3882 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3883 (lto_init): Call linemap_add.
3884 (signed_and_unsigned_types): Remove.
3885
38862008-08-29 Diego Novillo <dnovillo@google.com>
3887
3888 * lto-lang.c (handle_noreturn_attribute): New local function.
3889 (handle_const_attribute): New local function.
3890 (handle_malloc_attribute): New local function.
3891 (handle_pure_attribute): New local function.
3892 (handle_novops_attribute): New local function.
3893 (handle_nonnull_attribute): New local function.
3894 (handle_nothrow_attribute): New local function.
3895 (handle_sentinel_attribute): New local function.
3896 (handle_type_generic_attribute): New local function.
3897 (handle_format_attribute): New local function.
3898 (handle_format_arg_attribute): New local function.
3899 (lto_attribute_table): Declare.
3900 (lto_format_attribute_table): Declare.
3901 (lto_init_attributes): New local function.
3902 (lto_define_builtins): Call it.
3903 Call targetm.init_builtins and build_common_builtin_nodes.
3904 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3905 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3906
39072008-08-28 Diego Novillo <dnovillo@google.com>
3908
3909 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3910 $(GIMPLE_H).
3911 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3912 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3913 * lto-symtab.c: Include gimple.h.
3914 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3915 TREE_CHAIN.
3916
39172008-08-27 Doug Kwan <dougkwan@google.com>
3918
3919 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3920 gt-lto-lto.h): New includes.
3921 (lto_materialize_function): Do not read in function body in WPA mode.
3922 Format a line to fit in 80 columns.
3923 (lto_cgraph_node_sets): New garbage collected variable.
3924 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3925 New functions.
3926 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3927 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3928 variable LTO_SECTION_IN_H.
3929 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3930 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3931 with variable LTO_SECTION_IN_H.
3932 * config-lang.in (gtfiles): Add lto/lto.c.
3933 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3934 merged DECL_RESULT correctly.
3935
39362008-08-26 Bill Maddox <maddox@google.com>
3937
3938 * lto-lang.c Include tree-gimple.h.
3939 (lto_mark_addressable): Call mark_addressable rather than
3940 asserting.
3941 (lto_post_options): Suppress debug info generation.
3942 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3943
3f8257db 39442008-08-25 Bill Maddox <maddox@google.com>
d7f09764
DN
3945
3946 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3947 assertion and leave an explanatory comment in its place.
3948
39492008-08-21 Doug Kwan <dougkwan@google.com>
3950
3951 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3952 of common nodes instead of computing locallly.
3953 (lto_read_in_decl_state): New.
3954 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3955 Read global and per-function in-decl states.
3956 * Make-lang.in (LTO_H): Update dependency.
3957 (lto/lto.o): Same.
3958 (lto-symtab.c): Merge (revision 139039)
3959 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3960
39612008-08-21 Rafael Espindola <espindola@google.com>
3962
3963 * config-lang.in (target_libs): New.
3964
39652008-08-20 Bill Maddox <maddox@google.com>
3966
3967 * lto.c (current_lto_file): Remove GTY marker from static
3968 variable. Remove include of file gt-lto-lto.h.
3969 * Make-lang.in: Remove dependency of lto/lto.o on
3970 gt-lto-lto.h.
3971 * lto-elf.c (lto_file_close): Removed.
3972 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3973 allocate lto_elf_file object.
3974 (lto_elf_file_close): Free lto_elf_file object after close.
3975 * lto.h (struct lto_file_struct): Remove GTY marker.
3976 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3977 gtfiles.
3978
39792008-08-20 Bill Maddox <maddox@google.com>
3980
3981 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3982 to conform to its new signature.
3983 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3984 on discarded node here, now called in global_vector_fixup.
3985
39862008-08-09 Bill Maddox <maddox@google.com>
3987
3988 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3989 has not been set to a front-end-specific value.
3990
39912008-08-05 Doug Kwan <dougkwan@google.com>
3992
3993 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3994 build breakage.
3995
39962008-07-30 Bill Maddox <maddox@google.com>
3997
3998 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3999 Remove obsolete comments.
4000 (lto_read_decls): Remove initialization of deleted field data_in.global.
4001 Tidy up comments.
4002 (lto_main): Remove redundant initialization of section_hash_table.
4003 * lto-elf.c: Removed obsolete comments.
4004 * lto.h: Tidy up comments.
4005 * lto-symtab.c (lto_least_common_multiple): New function.
4006 (lto_symtab_merge_decl): Merge variable alignments in some cases.
4007 Tidy up comments.
4008
40092008-07-25 Diego Novillo <dnovillo@google.com>
4010 Bill Maddox <maddox@google.com>
4011
4012 * lto.c: Re-order include files.
4013 Include lto-section-out.h.
4014 (preload_common_nodes): Add debugging output.
4015 Add new local INDEX_TABLE.
4016 Call preload_common_node.
4017 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
4018
40192008-07-13 Bill Maddox <maddox@google.com>
4020
4021 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
4022 unwanted scaling during pointer addition.
4023
40242008-07-11 Bill Maddox <maddox@google.com>
4025 Diego Novillo <dnovillo@google.com>
4026
4027 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
4028 Make code const-correct.
4029 (lto_file_read): Fix C++ compatibility warnings.
4030 (lto_read_section_data): Fix C++ compatibility warnings.
4031 (lto_get_section_data): Use CONST_CAST to avoid warning when
4032 const pointer passed to free.
4033 * lto-elf.c (lto_elf_build_section_table): Fix C++
4034 compatibility warnings.
4035 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
4036 to avoid warning assigning const pointer to d_buf field of Elf_Data.
4037 (lto_get_current_out_file): Fix C++ compatibility warnings.
4038
40392008-07-11 Diego Novillo <dnovillo@google.com>
4040
4041 * Make-lang.in (lto-warn): Define.
4042
40432008-07-03 Simon Baldwin <simonb@google.com>
4044
4045 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
4046 LTO_STREAM_DEBUGGING.
4047
40482008-06-27 Ollie Wild <aaw@google.com>
4049
4050 * lto-elf.c (lto-section-out.h): New include.
4051 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
4052 and data members.
4053 (cached_file_attrs): New static variable.
4054 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
4055 Use cached_file_attrs for checking bits.
4056 (lto_elf_build_section_table): Remove elf_file argument from
4057 lto_elf_get_shdr and lto_elf_free_shdr calls.
4058 (DEFINE_INIT_SHDR): New macro.
4059 (init_shdr32, init_shdr64): New functions defined via the
4060 DEFINE_INIT_SHDR macro.
4061 (lto_elf_begin_section_with_type): New function.
4062 (lto_elf_begin_section): New function.
4063 (lto_elf_append_data): New function.
4064 (lto_elf_end_section): New function.
4065 (DEFINE_VALIDATE_EHDR): New macro.
4066 (validate_ehdr32, validate_ehdr64): New functions defined via the
4067 DEFINE_VALIDATE_EHDR macro.
4068 (validate_file): New function.
4069 (DEFINE_INIT_EHDR): New macro.
4070 (init_ehdr32, init_ehdr64): New functions defined via the
4071 DEFINE_INIT_EHDR macro.
4072 (init_ehdr): New function.
4073 (lto_elf_file_open): Add support for writable files. Move some
4074 validation logic to validate_file.
4075 (lto_elf_file_close): Add support for writable files. Write file data
4076 and free data blocks.
4077 (current_out_file): New static variable.
4078 (lto_set_current_out_file): New function.
4079 (lto_get_current_out_file): New function.
4080 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
4081 Add temporary initialization for testing ELF serialization.
4082 * lto.h (lto-section-out.h): New include.
4083 (struct lto_file_struct): Slight modification to comment.
4084 (lto_elf_file_open): Add writable parameter.
4085 (lto_elf_begin_section): New function declaration.
4086 (lto_elf_append_data): New function declaration.
4087 (lto_elf_end_section): New function declaration.
4088 (lto_set_current_out_file, lto_get_current_out_file): New function
4089 declarations.
4090 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
4091 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
4092 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
4093 * Make-lang.in (LTO_H): Add lto-section-out.h.
4094
40952008-06-12 Ollie Wild <aaw@google.com>
4096
4097 * lto.h (struct lto_file_vtable_struct): Remove.
4098 (struct lto_file_struct): Remove vtable member.
4099 * lto-elf.c (lto_file_init): Remove vtable argument.
4100 (lto_elf_map_optional_lto_section): Remove.
4101 (lto_elf_unmap_section): Remove.
4102 (lto_elf_file_vtable): Remove.
4103 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
4104 lto_file_init call.
4105 (lto_elf_find_section_data): Remove.
4106
41072008-06-11 Ollie Wild <aaw@google.com>
4108
4109 * lto.c (lto_file_read): Add const qualifier to data variable.
4110
41112008-06-11 Diego Novillo <dnovillo@google.com>
4112
4113 Merge from lto-streamber sub-branch.
4114
4115 2008-06-04 Ollie Wild <aaw@google.com>
4116
4117 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
4118 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
4119
4120 2008-05-28 Bill Maddox <maddox@google.com>
4121
4122 Replace the DWARF reader in the LTO front-end.
4123
4124 * lto.c: Include lto-tree-in.h, lto-tags.h.
4125 (enum DWARF2_class, DW_cl_constant, struct
4126 DWARF2_form_data, struct lto_context,
4127 lto_fd_init, lto_info_fd_init,
4128 lto_abbrev_fd_init, lto_info_fd_close,
4129 lto_file_init, lto_file_close,
4130 lto_file_corrupt_error, lto_abi_mismatch_error,
4131 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
4132 lto_read_uleb128, lto_read_sleb128,
4133 lto_read_initial_length, lto_abbrev_read_attrs,
4134 lto_abbrev_read, lto_abbrev_read_lookup,
4135 lto_read_section_offset,
4136 lto_read_comp_unit_header, find_cu_for_offset,
4137 lto_get_file_name,
4138 lto_resolve_reference,lto_read_form,
4139 attribute_value_as_int,
4140 make_signed_host_wide_int,
4141 attribute_value_as_constant, lto_cache_hash,
4142 lto_cache_eq, lto_cache_store_DIE,
4143 lto_cache_lookup_DIE, lto_find_integral_type,
4144 lto_find_integral_type_1,
4145 LTO_BEGIN_READ_ATTRS_UNCHECKED,
4146 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
4147 lto_unsupported_attr_error, lto_get_identifier,
4148 lto_read_referenced_type_DIE,
4149 lto_read_compile_unit_DIE,
4150 lto_read_array_type_DIE,
4151 lto_read_structure_union_class_type_DIE,
4152 lto_read_enumerator_DIE,
4153 lto_read_enumeration_type_DIE,
4154 lto_read_only_for_child_DIEs,
4155 lto_read_only_for_child_DIEs,
4156 lto_read_member_DIE, lto_read_abbrev,
4157 lto_read_variable_formal_parameter_constant_DIE,
4158 lto_get_body): Removed.
4159 (preload_common_nodes): New function.
4160 (lto_read_decls): Convert for new global streamer.
4161 (lto_materialze_file_data,
4162 lto_read_subroutine_type_subprogram_die,
4163 lto_read_unspecified_parameters_DIE,
4164 lto_read_typedef_DIE,
4165 lto_read_pointer_reference_type_DIE,
4166 lto_read_subrange_type_DIE,
4167 lto_read_base_type_DIE,
4168 lto_read_const_volatile_restrict_type_DIE,
4169 lto_read_namespace_DIE,
4170 lto_read_unspecified_type_DIE, lto_read_DIE,
4171 lto_read_child_DIEs, lto_collect_child_DIEs):
4172 Removed.
4173 (lto_info_read, lto_set_cu_context): Removed.
4174 (lto_file_read): Convert for new global streamer.
4175 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
4176 lto_resolve_var_ref, lto_resolve_fn_ref,
4177 lto_resolve_field_ref, lto_resolve_typedecl_ref,
4178 lto_resolve_namespacedecl_ref): Removed.
4179 (lto_file_init, lto_file_close): Moved to lto-elf.c.
4180 * lto-tree.h (lto_symtab_merge_var,
4181 lto_symtab_mergee_fun): Declare here.
4182 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
4183 (lto_elf_file_open): Removed code to read DWARF debug sections.
4184 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
4185 DWARF2_CompUnit, lto_die_ptr,
4186 lto_die_cache_entry, lto_fd, lto_info_fd,
4187 lto_abbrev_fd): Removed.
4188 (lto_file): Removed debug_info and debug_abbrev fields.
4189 (lto_ref): Removed.
4190 (lto_file_init, lto_file_close,
4191 lto_resolve_type_ref, lto_resolve_var_ref,
4192 lto_resolve_fn_ref, lto_resolve_field_ref,
4193 lto_resolve_typedecl_ref,
4194 lto_resolve_namespacedecl_ref,
4195 lto_get_file_name): Removed declarations.
4196 (lto_symtab_merge_var, lto_symtab_merge_fn):
4197 Declarations moved to lto-tree.h.
4198 * lto-symtab.c (lto_compatible_attributes_p):
4199 Lobotomize this, as it barfs on "Hello, world!".
4200 * lto-section-out.c: Include lto-tree-out.h.
4201 (lto_hash_global_slot_node,
4202 lto_eq_global_slot_node, preload_common_nodes,
4203 write_global_stream, write_global_references):
4204 New functions.
4205 (produce_asm_for_decls): Convert for new global streamer.
4206 * lto-section-out.h (lto_hash_global_slot_node,
4207 lto_eq_global_slot_node): Declare.
4208
3f8257db 42092008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4210 Jan Hubicka <jh@suse.cz>
4211
4212 * lto.c (sys/mman.h, tree-pass.h): New includes.
4213 (lto_materialize_constructors_and_inits,
4214 lto_materialize_function): Keeps length of section.
4215 (lto_materialize_cgraph): Removed.
4216 (lto_read_decls): Initialize fd field.
4217 (lto_file_read): Different return type and removed much code to
4218 lto_main.
4219 (page_mask): New variable.
4220 (lto_read_section_data, get_section_data, free_section_data): New
4221 functions.
4222 (lto_main): Now calls pass manager, sets the hooks so that the ipa
4223 passes can get the section data.
4224
3f8257db 42252008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4226
4227 * lto.h (lto_read_decls): Made local.
4228 (lto_input_function_body, lto_input_constructors_and_inits,
4229 lto_input_cgraph): Declarations moved to lto-section-in.h.
4230 * lto-section-in.c: Moved to .. .
4231 * lto-cgraph-in.c: Ditto.
4232 * lto-section-in.h: Ditto.
4233 * lto-function-in.c: Ditto.
4234 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
4235 (lto_insert_block): Removed.
4236 (LANG_HOOKS_INSERT_BLOCK): Removed.
4237 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
4238 lto-section-in.o): Rules moved to lto/Makefile.in.
4239
4240
42412008-05-16 Ollie Wild <aaw@google.com>
4242
4243 * lto-lang.c (tree-inline.h): Include.
4244 (lto_post_options): New function.
4245 (LANG_HOOKS_POST_OPTIONS): Define.
4246 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
4247 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
4248
42492008-05-13 Diego Novillo <dnovillo@google.com>
4250
4251 * lto-function-in.c (input_ssa_names): Call
4252 make_ssa_name_fn instead of make_ssa_name.
4253
42542008-05-12 Diego Novillo <dnovillo@google.com>
4255
4256 * lto-cgraph-in.c (overwrite_node): Update references to
4257 inline summary fields.
4258 * lto-function-in.c (input_expr_operand): Do not handle
4259 STRUCT_FIELD_TAG.
4260
42612008-05-09 Ollie Wild <aaw@google.com>
4262
4263 * lang.opt: New file.
4264 * lto-lang.c (lto_init_options): New function.
4265 (lto_handle_option): New function.
4266 (lto_init): Move initialization of flag_unit_at_a_time to
4267 lto_init_options.
4268 (LANG_HOOKS_INIT_OPTIONS): Define.
4269 (LANG_HOOKS_HANDLE_OPTION): Define.
4270
42712008-04-29 Ollie Wild <aaw@google.com>
4272
4273 * lto.c (lto_read_namespace_DIE): New function.
4274 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
4275 NAMESPACE_DECL DIE's.
4276 (lto_resolve_namespacedecl_ref): New function.
4277 * lto.h (lto_resolve_namespacedecl_ref): New function.
4278 * lto-section-in.c (lto_read_decls): Read namespace declarations.
4279 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
4280 and num_namespace_decls.
4281 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
4282 * lto-lang.c (lto_init_ts): New function.
4283 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
4284
42852008-04-16 Ollie Wild <aaw@google.com>
4286
4287 * lto-function-in.c (input_type_ref): Updated function description.
4288
42892008-04-16 Ollie Wild <aaw@google.com>
4290
4291 * lto-function-in.c (input_type_ref_1): New function.
4292 (input_type_ref): Split into two functions.
4293 (input_function): Add support for type contexts.
4294
42952008-04-16 Ollie Wild <aaw@google.com>
4296
4297 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
4298 section name
4299
43002008-04-16 Ollie Wild <aaw@google.com>
4301
4302 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
4303 list of supported languages.
4304
3f8257db 43052008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4306
4307 Merge with mainline @133491.
4308
3f8257db 43092008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4310 Jan Hubicka <jh@suse.cz>
4311
4312 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
4313 fd->unmaterialized_fndecls.
4314 (lto_get_file_name, lto_materialize_cgraph): New function.
4315 (lto_materialize_constructors_and_inits,
4316 lto_materialize_function): Read info directly from elf file.
4317 (lto_file_read): Made local and initialize dictionary so that
4318 other lto sections can be read without reprocessing the elf file.
4319 (lto_main): Read all functions after all files have been processed
4320 for their types, globals and cgraph.
4321 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
4322 dependencies.
4323 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
4324 (hash_name, eq_name, lto_elf_build_section_table): New functions.
4325 (lto_elf_read_symtab): Removed function.
4326 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
4327 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
4328 (lto_file_read): Made local.
4329 (lto_get_file_name, lto_elf_build_section_table,
4330 lto_input_cgraph):
4331 New function.
4332 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
4333 New functions.
4334 (lto_read_decls): Get the file name.
4335 * lto-cgraph-in.c: New file.
4336 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
4337 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
4338 (input_labels): Fixed latent sizeof issue.
4339 (input_function): Build stmt array to set call sites into cgraph
4340 edges.
4341 (lto_read_body): Reset cfun->curr_properties.
4342 * lto_section_in.h (lto_section_slot): New structure.
4343 (section_hash_table.lto_file_decl_data): New field.
4344
4345
3f8257db 43462008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4347
4348 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
4349 reconstruct static initializers.
4350 (lto_get_body, lto_materialize_function): Add lto_section_type as
4351 a parameter.
4352 (lto_materialize_constructors_and_inits,
4353 lto_materialize_file_data): New function.
4354 (lto_materialize_function,
4355 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
4356 unmap_section and map_fn_body to map_section.
4357 (lto_set_cu_context): Process functions and static inits
4358 differently.
4359 * Make-lang.in (LTO_H, lto/lto-function-in.o,
4360 lto/lto-section-in.o): Update dependencies.
4361 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
4362 lto_section_type parameter.
4363 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
4364 * lto.h (lto_file_vtable_struct): Removed two of the fields and
4365 renamed the other two so that there is only one map function and
4366 one unmap function and each takes a section type parameter.
4367 (lto_read_function_body): Renamed to lto_input_function_body and
4368 added file_data parameter.
4369 (lto_read_var_init): Removed.
4370 (lto_input_constructors_and_inits): New function.
4371 * lto-section-in.c (lto_read_decls): New function.
4372 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
4373 var_decls, type_decls, types to lto_file_decl_data.
4374 (input_type_ref, input_expr_operand, lto_read_body): Get
4375 field_decls, fn_decls, var_decls, type_decls, types from different
4376 structure.
4377 (input_globals, input_constructor, lto_read_var_init): Removed.
4378 (input_constructors_or_inits): New function.
4379 (lto_read_function_body, lto_input_constructors_and_inits):
4380 Renamed to lto_input_function_body and takes file_data parameter.
4381 * lto-section-in.h (lto_file_decl_data): New structure.
4382
3f8257db 43832008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4384
4385 * lto-function-in.c (input_globals.c): Changed input type to
4386 lto_function_header.
4387 (input_bb): Removed code to deserialize the stmt number.
4388 (input_function): Renumber all stmts after they are input.
4389 (lto_read_body, lto_read_function_body, lto_read_var_init):
4390 Changed to used new header format and enum section_type.
4391 *lto-lang.c (success): Removed.
4392
43932008-01-28 Nathan Froyd <froydnj@codesourcery.com>
4394
4395 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
4396 (lto_elf_free_sym): Likewise.
4397
4398 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
4399 (lto_elf_build_init): Likewise.
4400
3f8257db 44012008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4402
4403 * lto-read.c: Renamed to lto-function-in.c.
4404 (input_1_unsigned): Moved to lto-section-in.c and renamed
4405 lto_input_1_unsigned.
4406 (input_uleb128): Moved to lto-section-in.c and renamed
4407 lto_input_uleb128.
4408 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
4409 lto_input_widest_uint_uleb128.
4410 (input_sleb128): Moved to lto-section-in.c and renamed
4411 lto_input_sleb128.
4412 (input_integer): Moved to lto-section-in.c and renamed
4413 lto_input_integer.
4414 (debug_in_fun): Moved to lto-section-in.c and renamed
4415 lto_debug_in_fun.
4416 (input_block): Moved to lto-section-in.h and renamed
4417 lto_input_block.
4418 (input_expr_operand): Fixed to allow lists with more than one
4419 element.
4420 * lto-section-in.h: New file.
4421 * lto-section-in.c: New file with changes from above.
4422 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
4423 (lto-section-in.o): New rule.
4424
44252007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4426
4427 * lto-read.c (input_expr_operand): Mark static and external
4428 VAR_DECLs as needed.
4429
44302007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4431
4432 * lto-read.c (input_integer): Use the correct shift amount.
4433
44342007-12-29 Nathan Froyd <froydnj@codesourcery.com>
4435
4436 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
4437 (LANG_HOOKS_NAME): Define.
4438
44392007-12-27 Nathan Froyd <froydnj@codesourcery.com>
4440
4441 * lto.c (lto_find_integral_type): Define as a macro. Rename the
4442 original function to...
4443 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
4444 don't have a base type.
4445 (lto_read_enumeration_type_DIE): Examine the values of the
4446 enumeration to determine whether we can use an unsigned type for
4447 the base type of the enumeration.
4448
44492007-12-24 Nathan Froyd <froydnj@codesourcery.com>
4450
4451 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
4452 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
4453
44542007-12-22 Nathan Froyd <froydnj@codesourcery.com>
4455
4456 * lto-lang.c (lto_types_compatible_p): New function.
4457 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
4458
44592007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3f8257db 4460 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4461
4462 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
4463 (input_local_vars): Read in DECL_INITIAL and context for local
4464 statics that need to be put in unexpanded_vars_list.
4465
44662007-12-21 Nathan Froyd <froydnj@codesourcery.com>
4467
4468 * lto-read.c (input_real): Use a separate null-terminated buffer
4469 for calling real_from_string.
4470 (input_expr_operand): If we take the address of a FUNCTION_DECL,
4471 tell cgraph that it's needed.
4472
44732007-12-19 Doug Kwan <dougkwan@google.com>
4474
4475 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
4476
44772007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4478
4479 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
4480 (lto_file_read): Reset the members of 'context' every time we read
4481 a toplevel DIE, with special attention to last_param_type.
4482
44832007-12-18 Nathan Froyd <froydnj@codesourcery.com>
4484
4485 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
4486 'declaration'. Set the assembler name for non-public functions.
4487
3f8257db 44882007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4489
4490 * lto_read.c (data_in.unexpanded_indexes): New array.
4491 (input_local_var): Added code to read in unexpanded_var_list
4492 indexes for variables. Only read in DECL_CHAIN field for
4493 parameters.
4494 (input_local_vars): Added code to rebuild unexpanded_var_list in
4495 order using unexpanded_indexes.
4496 (input_function): Added code to set DECL_CONTEXT for functions.
4497
44982007-12-13 Doug Kwan <dougkwan@google.com>
4499
4500 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
4501 in pointer and reference types.
4502
45032007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4504
4505 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
4506 RESULT_DECL.
4507
45082007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4509
4510 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
4511 already read the DIE.
4512 (lto_get_body): New function, split out from...
4513 (lto_materialize_function): ...here. Call it.
4514 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
4515 determine DECL_EXTERNAL.
4516 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
4517 FUNCTION_DECLs when necessary. Use the type of the actual
4518 function definition if we are unable to easily merge types. Ignore
4519 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
4520 necessary.
4521
45222007-12-13 Nathan Froyd <froydnj@codesourcery.com>
4523
4524 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
4525
45262007-12-12 Bill Maddox <maddox@google.com>
4527
4528 Revert
4529 2007-12-07 Bill Maddox <maddox@google.com>
4530
4531 * lto.c (lto_str_fd_init): New function.
4532 (lto_str_fd_close): New function.
4533 (lto_file_init): Call lto_str_fd_init.
4534 (lto_file_close): Call lto_str_fd_close.
4535 (lto_str_read): New function. Read debug string table.
4536 (lto_str_lookup): New function. Get string for debug
4537 string table offset.
4538 (lto_read_form): Recognize DW_FORM_strp.
4539 (lto_file_read): Invoke lto_str_read.
4540
4541 * lto-elf.c (lto_elf_file_open): Read raw section data
4542 for the .debug_str section, if present.
4543
4544 * lto.h (struct lto_str_fd_struct): New struct.
4545 (struct lto_file_struct): Added new field DEBUG_STR
4546 to hold the file descriptor for the debug string table.
4547
45482007-12-07 Bill Maddox <maddox@google.com>
4549
4550 * lto.c (lto_str_fd_init): New function.
4551 (lto_str_fd_close): New function.
4552 (lto_file_init): Call lto_str_fd_init.
4553 (lto_file_close): Call lto_str_fd_close.
4554 (lto_str_read): New function. Read debug string table.
4555 (lto_str_lookup): New function. Get string for debug
4556 string table offset.
4557 (lto_read_form): Recognize DW_FORM_strp.
4558 (lto_file_read): Invoke lto_str_read.
4559
4560 * lto-elf.c (lto_elf_file_open): Read raw section data
4561 for the .debug_str section, if present.
4562
4563 * lto.h (struct lto_str_fd_struct): New struct.
4564 (struct lto_file_struct): Added new field DEBUG_STR
4565 to hold the file descriptor for the debug string table.
4566
45672007-12-07 Nathan Froyd <froydnj@codesourcery.com>
4568
4569 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
4570 Grow the basic_block_info and label_to_block_map vectors if
4571 necessary. Read in the block chain.
4572
45732007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4574
4575 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
4576
45772007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4578
4579 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
4580
45812007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4582
4583 * lto-read.c (input_expr_operand): Don't check for MTAGs.
4584 (lto_read_body): Don't declare PROP_alias.
4585
45862007-12-06 Nathan Froyd <froydnj@codesourcery.com>
4587
4588 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
4589 argument type information.
4590
45912007-12-03 Nathan Froyd <froydnj@codesourcery.com>
4592
4593 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4594 TREE_THIS_VOLATILE if the associated type is a volatile type.
4595 (lto_materialize_function): Remove call to init_ssa_operands.
4596 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
4597 variable when reading an SSA_NAME. Do the same when reading a
4598 RESULT_DECL, a RETURN_EXPR, or an MTAG.
4599 (input_cfg): Call init_ssa_operands.
4600 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
4601 Move call to init_tree_ssa...
4602 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
4603 add_referenced_var on any variables referenced from the body of the
4604 function. Inform the rest of the compiler we are in SSA form and
4605 inform later passes about the current properties.
4606
46072007-11-30 Nathan Froyd <froydnj@codesourcery.com>
4608
4609 * lto.c (lto_materialize_function): Add FIXME.
4610
46112007-11-29 Nathan Froyd <froydnj@codesourcery.com>
4612
4613 * lto-lang.c (enum built_in_attribute): New enum.
4614 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
4615 built_in_attributes): New variables.
4616 (def_builtin_1): New function.
4617 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
4618
46192007-11-28 Nathan Froyd <froydnj@codesourcery.com>
4620
4621 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
4622 DECL_SOURCE_LOCATION for debugging purposes.
4623 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
4624 bitfield, use the type specified by the DIE for TREE_TYPE and defer
4625 laying out the decl until later.
4626 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
4627 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
4628 TREE_ADDRESSABLE.
4629 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
4630 operand of an ADDR_EXPR.
4631 * lto-lang.c (enum lto_builtin_type): New enum.
4632 (builtin_type): New typedef.
4633 (builtin_types, string_type_node, const_string_type_node,
4634 wint_type_node, intmax_type_node, uintmax_type_node,
4635 signed_size_type_node): New variables.
4636 (def_fn_type, builtin_type_for_size, lto_define_builtins,
4637 lto_build_c_type_nodes): New functions.
4638 (lto_init): Initialize builtin types.
4639 (lto_set_decl_assembler_name): Let the target machine mangle the
4640 name if the decl is TREE_PUBLIC, otherwise uniquify it.
4641
46422007-11-21 Nathan Froyd <froydnj@codesourcery.com>
4643
4644 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
4645 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
4646 the type is a constant type. Set the assembler name and inform
4647 the rest of the compiler about the new decl if the decl is not
4648 public.
4649 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
4650 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
4651 try to read in function bodies for functions that already have bodies.
4652 * lto-symtab.c (lto_same_type_p): Check for unbounded array
4653 equivalency.
4654 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
4655 Check for whether we matched a builtin function type before calling
4656 lto_same_type_p on the generated type. Permit cases where the
4657 declaration of an array is unbounded, but the definition is bounded.
4658 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
4659 DECL_SIZE_UNIT if necessary.
4660
3f8257db 46612007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4662
4663 * lto-read.c (input_expr_operand): Get types right
4664 for COMPLEX_CST.
4665
3f8257db 46662007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4667
4668 * lto-read.c (make_new_block, input_cfg): Properly set
4669 n_basic_blocks.
4670
46712007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4672
4673 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
4674 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
4675
46762007-11-16 Nathan Froyd <froydnj@codesourcery.com>
4677
4678 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
4679 construct the integer type for bitfields.
4680
3f8257db 46812007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4682
4683 * lto-read.c (data_in.current_node_has_loc): Removed.
4684 (input_line_info): Returns true if node needs line set.
4685 (set_line_info): Always sets line if called.
4686 (clear_line_info): Removed reference to current_node_needs_loc.
4687 (input_expr_operand): Keeps track locally if current node needs a loc.
4688 (input_local_var): Added code to handle DECL_INITIAL for
4689 static local vars. Only set loc if necessary.
4690
46912007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4692
4693 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
4694 DECL_CONTEXT.
4695
46962007-11-15 Nathan Froyd <froydnj@codesourcery.com>
4697
4698 * lto.c: Include langhooks.h.
4699 (lto_find_integral_type): Rework logic to handle the case where
4700 got_byte_size is true, but the bitsize requested and that of the
4701 base_type doesn't match.
4702 (lto_read_variable_formal_parameter_constant_DIE): Only check for
4703 asm_name if we are creating a VAR_DECL.
4704 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
4705 definition.
4706 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
4707 function reference and use the builtin's decl if so. Set the
4708 DECL_CONTEXT of the RESULT_DECL for the function.
4709 * lto-lang.c (registered_builtin_fndecls): New variable.
4710 (lto_getdecls): Return it.
4711 (lto_builtin_function): Chain the new decl onto
4712 registered_builtin_fndecls.
4713
3f8257db 47142007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4715
4716 * lto-read.c (process_tree_flags, lto_static_init_local):
4717 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
4718 (input_line_info, clear_line_info): Fixed new line number code.
4719 (input_expr_operand): Added type to SWITCH_EXPR.
4720 (lto_read_body): Properly initialized data_in.
4721 Clear line info when leaving.
4722
47232007-11-13 Diego Novillo <dnovillo@google.com>
4724
4725 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4726 Initialize ARTIFICIAL.
4727 (lto_read_subroutine_type_subprogram_DIE): Initialize
4728 SAVED_SCOPE.
4729 * lto-read.c (set_line_info): Remove ; from calls to
4730 LINEMAP_POSITION_FOR_COLUMN.
4731
3f8257db 47322007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4733
4734 * lto-read.c (input_type_ref): Renamed from get_type_ref.
4735 (input_expr_operand, input_local_var): Renamed get_type_ref to
4736 input_type_ref.
4737 (input_expr_operand): Get the types correct for
4738 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
4739
47402007-11-13 Doug Kwan <dougkwan@google.com>
4741
4742 * lto-read.c (input_widest_uint_uleb128): New function.
4743 (input_tree_flags, process_tree_flags, input_line_info,
4744 input_expr_operand, input_local_var, input_phi, input_ssa_names):
4745 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
4746 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
4747 (lto_static_init_local): Add code to assert that lto_flags_type is
4748 wide enough.
4749
47502007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4751
4752 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
4753 (lto_read_subroutine_type_subprogram_DIE): Handle
4754 DW_AT_static_link and DW_AT_specification. Return the
4755 specification if present.
4756 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
4757
47582007-11-13 Nathan Froyd <froydnj@codesourcery.com>
4759
4760 * lto-lang.c: Include target.h.
4761 (registered_builtin_types): New variable.
4762 (lto_type_for_mode): Increase number of modes handled.
4763 (lto_builtin_function): Fix argument list and return the decl.
4764 (lto_register_builtin_type): New function.
4765 (lto_init): Initialize target builtins and language-independent
4766 nodes.
4767 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
4768
3f8257db 47692007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4770
4771 * lto-read.c (input_expr_operand): Added code to properly handle
4772 index filed. Added new RANGE_EXPR case.
4773
3f8257db 47742007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4775
4776 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
4777 (data_in): Added current_node_has_loc field.
4778 (input_line_info, set_line_info, clear_line_info): Added a support
4779 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
4780 did not have on on the source side.
4781 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
4782 numbers too.
4783
47842007-11-09 Doug Kwan <dougkwan@google.com>
4785
4786 * lto-read.c (input_expr_operand): Change type of operand 2 of
4787 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
4788
47892007-11-09 Nathan Froyd <froydnj@codesourcery.com>
4790
4791 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
4792 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
4793 from a DW_AT_specification or DW_AT_abstract_origin attribute to
4794 the new decl we are creating. Move informing the middle end about
4795 the new decl to...
4796 (lto_main): ...here. Inform the middle end about global variables
4797 after we have read in all the input files.
4798 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
4799 variables with internal linkage, so delete the check for internal
4800 linkage. Combine TREE_PUBLIC flags.
4801
48022007-11-08 Nathan Froyd <froydnj@codesourcery.com>
4803
4804 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4805 DW_AT_decl_line.
4806 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
4807 builtin specially. Move check for attribute compatibility
4808 earlier.
4809
48102007-11-07 Nathan Froyd <froydnj@codesourcery.com>
4811
4812 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
4813 * config-lang.in (gtfiles): Add lto.h and lto.c.
4814 * lto-elf.c: Include ggc.h.
4815 (lto_elf_file_open): Allocate elf_file from GC memory.
4816 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4817 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4818 in GC memory.
4819 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4820 (lto_file_close): Free file from GC memory.
4821 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4822 (lto_read_member_DIE): Fix declaration.
4823 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4824 in GC memory.
4825 (current_lto_file): New variable.
4826 (lto_main): Use it.
4827 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4828 lto_die_cache_entry): Move to...
4829 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4830 declarations accordingly.
4831 (struct lto_file_struct): Declare.
4832 (lto_file_vtable): Use it instead of lto_file.
4833
48342007-11-06 Alon Dayan <alond@il.ibm.com>
3f8257db 4835 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4836
4837 * lto-read.c (process_flags, lto_static_init_local):
4838 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4839 change global array num_flags_for_code to flags_length_for_code.
4840 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4841
48422007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4843
4844 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4845 layout functions to compute information about the newly constructed
4846 type.
4847
48482007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4849
4850 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4851 case to use DECL_RESULT if necessary.
4852
3f8257db 48532007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4854
4855 * lto-read.c (input_tree_list): Removed.
4856 (input_tree_flags): Added parameter to force flags no matter what
4857 tree code.
4858 (input_expr_operand): Added parameter to input_tree_flags.
4859 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4860 input_expr_operand rather than input_tree_lists.
4861 (input_local_var): Use input_expr_operand to read attributes
4862 rather then input_tree_list.
4863 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4864
48652007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4866
4867 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4868 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4869 TYPE_DECL for it.
4870 * lto-read.c (lto_read_body): Use correct sizes for calculating
4871 type_decls_offset and types_offset.
4872
48732007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4874
4875 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4876 with GENERIC_NEXT.
4877 * config-lang.in (gtfiles): Add lto-lang.c.
4878 * lto-lang.c: Include gt-lto-lto-lang.h.
4879 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4880 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4881 (lto/lto-read.o): Likewise.
4882
3f8257db 48832007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4884
4885 * lto-read.c (data_in): Added type_decls and current_col fields.
4886 (string_slot): New type to hold canonized file name.
4887 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4888 input_line_info, set_line_info, clear_line_info): New functions.
4889 (file_name_hash_table): New hash table.
4890 (input_local_var, input_labels, input_local_vars_index,
4891 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4892 (input_uleb128): Changed type of byte var.
4893 (input_expr_operand): Large number of changes to get line numbers
4894 correct. Added TYPE_DECL case.
4895 (input_globals): Added code to get TYPE_DECLs processed.
4896 (input_local_var): Added code to process line numbers and
4897 TREE_CHAIN and DECL_CONTEXT.
4898 (input_function, input_constructor): Added call to
4899 clear_line_number.
4900 (lto_static_init_local): Added code to get line numbers correct.
4901 (lto_read_body): Added code to get TYPE_DECLS read and to change
4902 parameters to the calls above that had their parms reorganized.
4903
4904
49052007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4906
4907 * lto.h (lto_resolve_typedecl_ref): Declare.
4908 * lto.c (lto_resolve_typedecl_ref): New function.
4909
49102007-10-29 Mark Mitchell <mark@codesourcery.com>
4911 Nathan Froyd <froydnj@codesourcery.com>
4912
4913 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4914 DIEs even if we find an abstract origin for this DIE.
4915
49162007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4917
4918 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4919 RESULT_DECL slightly earlier. Only remember the decl for later
4920 if we successfully merge declarations.
4921
3f8257db 49222007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4923
4924 * lto-read.c (input_expr_operand): Give label_values the proper
4925 context and provide switch statements with a default type.
4926
49272007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4928
4929 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4930 * lto.c (lto_materialize_function): ...to here.
4931
49322007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4933
4934 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4935 * lto.c (lto_info_fd_init): Initialize it.
4936 (lto_info_fd_close): Free it.
4937 (lto_materialize_function): New function.
4938 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4939 unmaterialized_fndecls.
4940 (lto_file_read): Read in all the function bodies after we have read
4941 all of the DWARF info.
4942 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4943 reading a function body.
4944
3f8257db 49452007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4946
4947 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4948 semetric with output_tree_flags. Added call to log flags.
4949 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4950 type issues to make everything consistent with flags being
4951 unsigned HOST_WIDE_INTS.
4952 (input_expr_operand): Added call to
4953 recompute_tree_invariant_for_addr_expr.
4954 (input_local_var): Added debugging for tree_chains. Now calls
4955 input_tree_flags.
4956 (input_phi): Made flags unsigned HOST_WIDE_INT.
4957 (input_ssa_names): Now calls input_tree_flags.
4958 (lto_read_body): Now sets cfun.
4959 (lto_read_function_body): Now sets current_function_pointer.
4960
49612007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4962
4963 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4964 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4965 inspecting fields within.
4966 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4967 handle this appropriately.
4968
49692007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4970
4971 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4972 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4973 both DW_AT_abstract_origin and DW_AT_specification.
4974 (lto_read_subroutine_type_subprogram_DIE): Handle
4975 DW_AT_abstract_origin.
4976 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4977 (lto_read_DIE_at_ptr): Define as static to match declaration.
4978 Lookup the PTR in the cache before reading it from the file.
4979 (lto_resolve_var_ref): Adjust accordingly.
4980 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4981 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4982
49832007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4984
4985 * lto.c (lto_read_DIE_at_ptr): New function.
4986 (lto_resolve_var_ref): Use it.
4987 (lto_resolve_fn_ref): Use it.
4988 (lto_resolve_field_ref): Use it.
4989 (lto_read_variable_formal_parameter_constant_DIE): Follow
4990 DW_AT_specification and return the associated decl when appropriate.
4991
49922007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4993
4994 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4995 Implement for scalar integer modes.
4996 (lto_init): Initialize size_type_node.
4997
3f8257db 49982007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
4999
5000 * lto-read.c (input_expr_operand): Remove ssa name asserts.
5001 (input_local_var): Add chaining for params.
5002 (input_ssa_names): Add cfun parameter.
5003 (input_function): Remove unnecessary else.
5004
50052007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5006
5007 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
5008 (lto_resolve_var_ref): Use proper types.
5009 (lto_resolve_fn_ref): Likewise.
5010 (lto_resolve_field_ref): Likewise.
5011
50122007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5013
5014 * lto-read.c (input_expr_operand): Remove case.
5015
50162007-10-17 Nathan Froyd <froydnj@codesourcery.com>
5017
5018 * lto.c (lto_read_only_for_child_DIEs): New function.
5019 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
5020 * lto-elf.c (lto_elf_map_lto_section): Remove.
5021 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
5022 * lto-read.c (input_expr_operand): Assert that we never read a NULL
5023 SSA_NAME. Add missing case for mechanical codes.
5024 (input_cfg): Use basic_block_info_for_function instead of
5025 basic_block_info.
5026
3f8257db 50272007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5028
5029 * lto-read.c (input_sleb128, input_integer): Use proper casts.
5030 (input_list): Renamed input_tree_list and modified to follow same
5031 protocol as lto-function-out.c:output_tree_list.
5032 (input_expr_operand): Make asm operands use input_tree_list.
5033 (input_local_var): Now uses input_tree_list.
5034 (lto_read_body): Change placement for setting context of debug_labels.
5035
5036
3f8257db 50372007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5038
5039 * lto-read.c (input_real): Output debugging in proper order.
5040 (input_integer): Compute bit lengths properly.
5041 (input_list): Clean up declaration.
5042 (input_expr_operand): Change calls to input_real to match fix.
5043 Make reading of LTO_bit_field_ref1 match output.
5044 (input_local_var): Make reading of attributes match what is being
5045 written.
5046 (dump_debug_stream): Also print char in hex.
5047 (debug_out_fun): Fix signed unsigned mismatch.
5048
50492007-10-10 Nathan Froyd <froydnj@codesourcery.com>
5050
5051 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
5052 DW_AT_GNU_vector specially, as they are not contiguous with the
5053 specified set of attribute names. Use class_mask to check for
5054 errors at the end of the function
5055 (lto_resolve_var_ref): Read the DIE if it is not cached.
5056 (lto_resolve_fn_ref): Likewise.
5057 (lto_resolve_field_ref): Likewise.
5058
50592007-10-05 Nathan Froyd <froydnj@codesourcery.com>
5060
5061 * lto.c: Include dwarf2out.h.
5062 (lto_cache_store_DIE): Assert that we never change the value.
5063 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
5064 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
5065 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
5066 sensible type instead.
5067 (lto_read_structure_union_class_type_DIE): Store the newly
5068 created type prior to reading the members of the structure to
5069 avoid infinite recursion. Avoid computing types and alignments
5070 for structures whose sizes are unknown.
5071 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
5072 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
5073 DW_AT_const_value, and DW_AT_specification.
5074 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
5075 Return early if we have already constructed the function type.
5076 (lto_read_typedef_DIE): Check to see if the type has been cached
5077 already. Cache the type before reading any children.
5078 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
5079 (lto_read_DIE): Unset context->skip_non_parameters around reading
5080 the DIE.
5081 (lto_resolve_fn_ref): Delete trailing whitespace.
5082
3f8257db 50832007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5084
5085 * lto-read.c (input_expr_operand): Added type for STRING_CST.
5086
50872007-09-10 Nathan Froyd <froydnj@codesourcery.com>
5088
5089 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
5090
50912007-09-07 Nathan Froyd <froydnj@codesourcery.com>
5092
5093 * lto-lang.c (signed_and_unsigned_types): New variable.
5094 (lto_type_for_size): Consult signed_and_unsigned_types to find
5095 an approprite type, creating it if necessary.
5096 (lto_set_decl_assembler_name): Add actual method body.
5097
50982007-09-06 Jim Blandy <jimb@codesourcery.com>
5099
5100 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
5101 can't find a var init for this variable, leave its DECL_INITIAL.
5102 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
5103 lto_elf_map_fn_body.
5104 (lto_map_lto_section): New function.
5105 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
5106 bodies, and lto_elf_map_optional_lto_section for variable
5107 initializers.
5108 (lto_elf_find_section_data): Quietly return NULL if the section is
5109 missing.
5110 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
5111
5112 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
5113
5114 * lto-read.c (lto_read_body): Doc fix.
5115
3f8257db 51162007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5117
5118 * lto-read.c (fun_in): Renamed to data_in.
5119 (input_expr_operand, input_local_var, input_string_internal,
5120 input_string, input_real, input_list, get_label_decl,
5121 get_type_ref, input_expr_operand, input_globals, input_labels,
5122 input_local_vars_index, input_local_var, input_local_vars,
5123 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
5124 (input_constructor): New function.
5125 (lto_read_function_body): Renamed to lto_read_body and generalized
5126 to handle both functions and constructors.
5127 (lto_read_function_body, lto_read_var_init): New function.
5128
5129
3f8257db 51302007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5131
5132 * lto-read.c (input_expr_operand): Assert that there really is a
5133 FUNCTION_DECL.
5134 (input_globals): Removed checks on 0 section.
5135
3f8257db 51362007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5137
5138 * lto-read.c (fun_in): Added local_decls_index and
5139 local_decls_index_d.
5140 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
5141 (input_globals): Enabled code to handle FIELD_DECLs.
5142 (input_local_vars_index, input_local_vars): New function.
5143 (input_local_var): Changed to allow locals to be input randomly.
5144 (lto_read_function_body): Added code to input the
5145 local_decls_index and to free various structures.
5146
51472007-08-17 Jim Blandy <jimb@codesourcery.com>
5148
5149 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
5150 ATTRIBUTE_UNUSED from 'die' formal.
5151
5152 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
5153 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
5154 (input_list): Fix type of 'tag'.
5155 (input_expr_operand): Fix type of 'tag' argument. Update
5156 declaration. Fix type of 'ctag'. Add default case to switch,
5157 since the type of the switched value is now an enum.
5158 (input_local_vars): Fix type of 'tag'.
5159 (input_bb): Fix type of 'tag' argument.
5160 (input_function): Fix type of 'tag' argument.
5161
51622007-08-16 Jim Blandy <jimb@codesourcery.com>
5163
5164 * lto.c (lto_read_member_DIE): Record the tree we create in
5165 fd->die_cache. (Our 'die' argument is no longer unused.)
5166 (lto_resolve_field_ref): New function.
5167 * lto.h (lto_resolve_field_ref): New declaration.
5168
51692007-08-15 Jim Blandy <jimb@codesourcery.com>
5170
5171 * lto-read.c (lto_read_var_init): Mark arguments as unused.
5172
51732007-08-07 Jim Blandy <jimb@codesourcery.com>
5174
5175 * lto.c (lto_read_form): Complete attr_classes table.
5176 (DWARF2_form_data): Doc fix.
5177
51782007-08-05 Mark Mitchell <mark@codesourcery.com>
5179
5180 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
5181 and unmap_var_init.
5182 (lto_read_var_init): Declare.
5183 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
5184 interface for reading variable initializers.
5185 * lto-elf.c (lto_elf_read_var_init): Remove.
5186 (lto_elf_file_vtable): Update initializer.
5187 (lto_elf_read_var_init): Add comment about unused-ness.
5188 * lto-read.c (lto_read_var_init): New.
5189
5190 * lto.c (lto_read_form): Add entry for DW_AT_inline.
5191
3f8257db 51922007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5193
5194 * lto-read.c (lto_read_function_body): Moved declaration of fn
5195 outside of ifdef.
5196
3f8257db 51972007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5198
5199 * lto-read.c (input_uleb128, input_string_internal, input_real,
5200 input_integer, input_record_start, input_list, get_type_ref,
5201 input_flags, input_expr_operand, input_expr_operand,
5202 input_expr_operand, input_local_vars, input_cfg, input_phi,
5203 input_ssa_names, input_bb, input_function): Added semicolons.
5204
5205
3f8257db 52062007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5207
5208 * lto-read.c (input_globals): Remove debugging.
5209 (input_function): Set DECL_ARGUMENTS.
5210
3f8257db 52112007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5212
5213 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
5214 RETURN_EXPR, MODIFY_EXPR and processing of flags.
5215 (input_phi): Made work with operands other than SSA_NAMES and
5216 fixed processing of flags.
5217 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
5218 (input_flags): New function.
5219 * lto-lang.c (lto_init): Changed state of in_lto_p.
5220
5221
52222007-07-24 Mark Mitchell <mark@codesourcery.com>
5223
5224 * lto-tree.h (lto_varargs_cookie): Remove.
5225 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
5226 skip_non_parameters, skip_parameters.
5227 (lto_varargs_cookie): Remove.
5228 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
5229 parameter types.
5230 (lto_read_abbrev): New function.
5231 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
5232 child DIEs.
5233 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
5234 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
5235 (lto_file_read): Initialize new context fields.
5236 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
5237 (lto_unsigned_type): Remove.
5238 (lto_signed_type): Likewise.
5239 (lto_signed_or_unsigned_type): Likewise.
5240 (lto_init): Do not create lto_varargs_cookie.
5241 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
5242 (LANG_HOOKS_SIGNED_TYPE): Likewise.
5243 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
5244
52452007-07-19 Jan Hubicka <jh@suse.cz>
5246
5247 * lto-read.c (lto_read_function_body): Produce empty scope block
5248 to avoid crash.
5249
52502007-07-18 Mark Mitchell <mark@codesourcery.com>
5251
5252 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
5253 process local variables.
5254 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
5255
3f8257db 52562007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5257
5258 * lto-read.c (input_list, input_expr_operand): Added struct
5259 function parameter.
5260 (init_cfg, finalize_cfg): Removed function.
5261 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
5262 (input_labels, input_local_vars): Now takes input_block parameter rather than
5263 synthsyzing it.
5264 (input_cfg, input_phi, input_ssa_names): New functions.
5265 (input_bb): Now passes in input_blocks. Does not construct cfg
5266 and processes the list of phi functions.
5267 (input_function): Now builds both the cfg and ssa_names table.
5268 (lto_read_function_body): Processes new header fields to construct
5269 streams for the ssa_names and cfg and their debugging.
5270 * lto/lto-lang.c (lto_init): Set in_lto_p.
5271
5272
52732007-06-28 Mark Mitchell <mark@codesourcery.com>
5274
5275 * lto.h (lto_file_vtable): Add read_var_init.
5276 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
5277 initializers.
5278 (lto_main): Remove bogus asserts.
5279 * lto-elf.c (tm.h): Include it.
5280 (libiberty.y): Likewise.
5281 (lto_elf_file): Add strtab and symtab. Rename
5282 string_table_section_index to sec_strtab.
5283 (lto_elf_file_vtable): Add lto_elf_read_var_init.
5284 (lto_elf_get_shdr): New function.
5285 (lto_elf_free_shdr): Likewise.
5286 (lto_elf_find_section_data): Use them.
5287 (lto_elf_read_symtab): New function.
5288 (lto_elf_lookup_sym): Likewise.
5289 (lto_elf_free_sym): Likewise.
5290 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
5291 (lto_elf_built_init): New function.
5292 (lto_elf_read_var_init): Likewise.
5293 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
5294
3f8257db 52952007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5296
5297 * lto-read (make_new_block): Initialize the stmt_list.
5298 (lto_static_init_local): Add debugging for missing codes.
5299
53002007-06-26 Mark Mitchell <mark@codesourcery.com>
5301
5302 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
5303 unprototyped functions.
5304
53052007-06-23 Mark Mitchell <mark@codesourcery.com>
5306
5307 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
5308 Handle DW_AT_MIPS_linkage_name.
5309 (lto_read_subroutine_type_subprogram): Likewise. Correct
5310 compilation errors.
5311 (lto_main): Remove incorrect assertions.
5312 * lto-symbtab.c: Build function types out of TREE_LISTs.
5313
5314 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
5315
5316 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
5317
3f8257db 53182007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
d7f09764
DN
5319
5320 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
5321 dummy since ggc does not like empty structs.
5322 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
5323 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
5324 expr->common to expr->base.
5325 (make_new_block): Moved stmt_list to proper place.
5326
5327
53282007-03-14 Robert Kennedy <jimbob@google.com>
5329
5330 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
5331 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
5332 assembler name from DWARF.
5333 * lto-lang.c (lto_set_decl_assembler_name) New function.
5334
53352006-09-10 Mark Mitchell <mark@codesourcery.com>
5336
5337 * lto.h (lto_file_vtable): New structure.
5338 (lto_file): Add vtable pointer.
5339 (lto_file_init): Add vtable paramter.
5340 (lto_read_function_body): New function.
5341 (lto_symtab_merge_fn): New function.
5342 * lto.c (lto_file_init): Add vtable parameter.
5343 (lto_read_form): Fill in entries for DW_AT_prototyped,
5344 DW_AT_frame_base.
5345 (lto_read_subroutine_type_subprogram_DIE): New function.
5346 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
5347 DW_TAG_subprogram.
5348 * lto-elf.c (lto_elf_vile_vtable): New variable.
5349 (lto_elf_file_open): Pass it to lto_file_init.
5350 (lto_elf_map_fn_body): New function.
5351 (lto_elf_unmap_fn_body): Likewise.
5352 * lto-read.c: New file.
5353 * lto-symtab.c (lto_symtab_merge_fn): New function.
5354 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
5355 tree_rest_of_compilation.
5356 * Make-lang.in (LTO_OBJS): Add lto-read.o
5357 (lto-read.o): New target.
5358
53592006-09-03 Mark Mitchell <mark@codesourcery.com>
5360
5361 * lto.c (<inttypes.h>): Don't include it.
5362 (lto_context): Don't typedef it.
5363 (lto_resolve_reference): New function.
5364 (lto_read_form): Use it.
5365 (lto_resolve_type_ref): New function.
5366 (lto_resolve_var_ref): Likewise.
5367 (lto_resolve_fn_ref): Likewise.
5368 * lto.h (<inttypes.h>): Include it.
5369 (lto_context): New type.
5370 (lto_ref): New structure.
5371 (lto_resolve_type_ref): Declare.
5372 (lto_resolve_var_ref): Likewise.
5373 (lto_resolve_fn_ref): Likewise.
5374
53752006-08-18 Mark Mitchell <mark@codesourcery.com>
5376
5377 * lang-specs.h: New file.
5378
53792006-08-14 Mark Mitchell <mark@codesourcery.com>
5380
5381 * lto.c (lto_info_fd_init): Allocate the DIE cache.
5382 (lto_info_fd_close): Deallocate it.
5383 (lto_die_cache_entry): New structure.
5384 (lto_cache_hash): New function.
5385 (lto_cache_eq): Likewise.
5386 (lto_cache_store_DIE): Likewise.
5387 (lto_cache_lookup_DIE): Likewise.
5388 (lto_read_referenced_type_DIE): Use the cache.
5389 (lto_read_pointer_type_DIE): Robustify.
5390 (lto_read_DIE): Use the cache.
5391 * lto.h (hashtab.h): Include.
5392 (lto_info_fd): Add DIE cache.
5393 * Make-lang.in (LTO_H): New variable.
5394 (lto/lto-lang.o): Use LTO_H.
5395 (lto/lto-elf.o): Likewise.
5396 (lto/lto-symtab.o): Likewise.
5397
53982006-07-09 Mark Mitchell <mark@codesourcery.com>
5399
5400 * lto.c (lto_abi_mismatch_error): New function.
5401 (lto_abbrev_read): Initialize num_abbrevs.
5402 (lto_read_form): Specify allowed form classes for
5403 DW_AT_declaration. Adjust for change to lto_set_cu_context.
5404 (lto_read_variable_formal_parameter_constant_DIE): Handle
5405 DW_AT_declaration. Call lto_symtab_merge_var.
5406 (lto_read_pointer_type_DIE): New function.
5407 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
5408 not creat TYPE_DECLs for types that already have them.
5409 (lto_read_DIE): Add lto_read_pointer_type_DIE.
5410 (lto_set_cu_context): Make cu_start point to the header, not the
5411 first DIE.
5412 (lto_file_read): Adjust for change to lto_set_cu_context.
5413 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
5414 (lto/lto-symtab.o): New rule.
5415 * lto-tree.h (lang_identifier): Add decl field.
5416 (LANG_IDENTIFIER_CAST): New macro.
5417 (LTO_IDENTIFIER_DECL): Likewise.
5418 (lto_symtab_merge_var): Declare.
5419 * lto-symtab.c: New file.
5420
54212006-07-02 Daniel Berlin <dberlin@dberlin.org>
5422
5423 * lto.c (lto_context): Add current_cu and info_fd members.
5424 (DWARF2_CompUnit): New structure.
5425 (lto_read_DIE): Take lto_info_fd *.
5426 (lto_read_child_DIEs): Ditto.
5427 (lto_file_corrupt_error): Constify argument.
5428 (lto_set_cu_context): New function
5429 (lto_info_fd_init): Ditto.
5430 (lto_info_fd_close): Ditto.
5431 (lto_file_init): Use lto_info_fd_init.
5432 (lto_file_close): Use lto_info_fd_close.
5433 (lto_read_initial_length): Pass in pointer to header size.
5434 (lto_read_comp_unit_header): Correct cu_length to
5435 real length from beginning of header. Take lto_info_fd * as
5436 argument.
5437 (find_cu_for_offset): New function.
5438 (lto_read_form): Change first argument to lto_info_fd *.
5439 Add FORM_CONTEXT argument.
5440 Handle DW_FORM_ref_addr.
5441 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
5442 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
5443 Swap contexts if necessary for form.
5444 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
5445 lto_file_corrupt_error.
5446 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
5447 (lto_read_referenced_type_DIE): Change first argument to
5448 lto_info_fd *. Access lto_fd fields through base pointer.
5449 (lto_read_compile_unit_DIE): Change first argument to an
5450 lto_info_fd *.
5451 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
5452 (lto_read_base_type_DIE): Ditto.
5453 (lto_read_child_DIEs): Ditto.
5454 (lto_read_DIE): Ditto. Change type of function pointer.
5455 (lto_info_read): New function.
5456 (lto_set_cu_context): Ditto.
5457 (lto_file_read): Use lto_info_read, walk resulting CU's
5458 (lto_main): Update for lto_info_fd change.
5459 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
5460 necessary.
5461 * lto.h (DWARF2_CompUnit): New structure.
5462 (lto_info_fd): Ditto.
5463 (lto_file): Change debug_info to be an lto_info_fd.
5464
54652006-06-25 Mark Mitchell <mark@codesourcery.com>
5466
5467 * lto.c (toplev.h): Include it.
5468 (dwarf2.h): Likewise.
5469 (tree.h): Likewise.
5470 (tm.h): Likewise.
5471 (cgraph.h): Likewise.
5472 (ggc.h): Likewise.
5473 (inttypes.h): Likewise.
5474 (DWARF2_attr): New type.
5475 (DWARF2_abbrev): Likewise.
5476 (DWARF2_class): Likewise.
5477 (DWARF2_form_data): Likewise.
5478 (lto_context): Likewise.
5479 (lto_fd_init): New function.
5480 (lto_abbrev_fd_init): Likewise.
5481 (lto_abbrev_fd_close): Likewise.
5482 (lto_file_init): Use them.
5483 (lto_file_close): New function.
5484 (lto_file_corrupt_error): Likewise.
5485 (LTO_CHECK_INT_VAL): New macro.
5486 (lto_check_size_t_val): New function.
5487 (lto_check_int_val): Likewise.
5488 (LTO_READ_TYPE): New macro.
5489 (lto_read_ubyte): New function.
5490 (lto_read_uhalf): Likewise.
5491 (lto_read_uword): Likewise.
5492 (lto_read_uleb128): Likewise.
5493 (lto_read_initial_length): Likewise.
5494 (lto_abbrev_read_attrs): Likewise.
5495 (lto_abbrev_read): Likewise.
5496 (lto_abbrev_lookup): Likewise.
5497 (lto_read_section_offset): Likewise.
5498 (lto_read_comp_unit_header): Likewise.
5499 (lto_read_form): Likewise.
5500 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
5501 (LTO_BEGIN_READ_ATTRS): Likewise.
5502 (LTO_END_READ_ATTRS): Likewise.
5503 (lto_unsupported_attr_error): New function.
5504 (lto_get_identifier): Likewise.
5505 (lto_read_referenced_type_DIE): Likewise.
5506 (lto_read_compile_unit_DIE): Likewise.
5507 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
5508 (lto_read_base_type_DIE): Likewise.
5509 (lto_read_DIE): Likewise.
5510 (lto_read_child_DIEs): Likewise.
5511 (lto_file_read): Read DIEs.
5512 (lto_main): Ask middle end to emit entities.
5513 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
5514 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
5515 (lto_elf_file_close): Likewise.
5516 * lto.h (lto_file): Declare.
5517 (DWARF2_abbrev): Likewise.
5518 (lto_fd): New type.
5519 (lto_abbrev_fd): Likewise.
5520 (lto_file): Use new types.
5521 (lto_file_close): Declare.
5522 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
5523
55242006-06-18 Mark Mitchell <mark@codesourcery.com>
5525
5526 * lto.h: New file.
5527 * lto.c: New file.
5528 * lto-elf.c: New file.
5529 * lto-lang.c (flags.h): Include it.
5530 (lto.h): Likewise.
5531 (lto_init): New function.
5532 (lto_write_globals): Remove.
5533 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
5534 (LANG_HOOKS_INIT): Define.
5535 (LANG_HOOKS_PARSE_FILE): Likewise.
5536 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
5537 (LTO_EXE): Link with libelf.
5538 (lto/lto-lang.o): Update dependencies.
5539 (lto/lto.o): New target.
5540 (lto/lto-elf.o): Likewise.
5541
55422006-06-12 Mark Mitchell <mark@codesourcery.com>
5543
5544 * config-lang.in: New file.
5545 * Make-lang.in: Likewise.
5546 * lto-tree.h: Likewise.
5547 * lto-lang.c: Likewise.
818ab71a
JJ
5548\f
5549Copyright (C) 2006-2016 Free Software Foundation, Inc.
d7f09764 5550
818ab71a
JJ
5551Copying and distribution of this file, with or without modification,
5552are permitted in any medium without royalty provided the copyright
5553notice and this notice are preserved.