]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
c-common.c (handle_tls_model_attribute): Use set_decl_tls_model.
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
56363ffd
JH
12014-06-15 Jan Hubicka <hubicka@ucw.cz>
2
3 * lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
4
e257a17c
JH
52014-06-10 Jan Hubicka <hubicka@ucw.cz>
6
7 * lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
8 (do_whole_program_analysis): Use verify_symtab.
9
24d047a3
JH
102014-06-07 Jan Hubicka <hubicka@ucw.cz>
11
12 * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1,
13 lto_fixup_prevailing_decls): Skip section names.
14
9b2b7279
AM
152014-06-02 Andrew MacLeod <amacleod@redhat.com>
16
17 * lto-symtab.c: Include builtins.h.
18
a9243bfc
RB
192014-05-26 Richard Biener <rguenther@suse.de>
20
21 * lto.c (lto_parse_hex): Use int64_t.
22 (lto_resolution_read): Likewise.
23
fd1e9302
JH
242014-05-23 Jan Hubicka <hubicka@ucw.cz>
25
26 * lto.c (read_cgraph_and_symbols): Grow ggc memory after streaming.
27
aede2c10
JH
282014-05-23 Jan Hubicka <hubicka@ucw.cz>
29
30 * lto-symtab.c (lto_symtab_merge_symbols): Update code setting
31 symtab pointer.
32 * lto.c (compare_tree_sccs_1): Do not compare comdat groups.
33
f6a7cffc
TS
342014-05-22 Thomas Schwinge <thomas@codesourcery.com>
35
36 * lto-lang.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
37 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
38 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
39
4000360e
BS
402012-05-22 Bernd Schmidt <bernds@codesourcery.com>
41
42 * lto-object.c: Include "lto-section-names.h".
43 (LTO_SEGMENT_NAME): Don't define.
44 * lto.c: Include "lto-section-names.h".
45
b9559136
JH
462014-05-17 Jan Hubicka <hubicka@ucw.cz>
47
48 PR lto/61012
49 * lto-symtab.c (lto_symtab_merge_decls_1): Do not ICE on undefined externals
50 mixed with variables.
51
766090c2
TS
522014-05-17 Trevor Saunders <tsaunders@mozilla.com>
53
54 * lto-tree.h: Don't use variable_size gty attribute.
55 * lto.c (lto_read_in_decl_state): Adjust.
56 (create_subid_section_table): Likewise.
57 (lto_flatten_files): Likewise.
58 (read_cgraph_and_symbols): Likewise.
59
1d60af08
KZ
602014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
61 Mike Stump <mikestump@comcast.net>
62 Richard Sandiford <rdsandiford@googlemail.com>
63
64 * lto.c (compare_tree_sccs_1): Use wide-int interfaces.
65 * lto-lang.c (get_nonnull_operand): Likewise.
66
22869a37
RB
672014-04-28 Richard Biener <rguenther@suse.de>
68
69 PR middle-end/60092
70 * lto-lang.c: Define flag_isoc11.
71
7de90a6c
DM
722014-04-23 David Malcolm <dmalcolm@redhat.com>
73
74 * lto-partition.c (add_references_to_partition): Update for
75 removal of implicit pointer from the is-a.h API.
76 (add_symbol_to_partition_1): Likewise.
77 (contained_in_symbol): Likewise.
78 (undo_partition): Likewise.
79 (lto_balanced_map): Likewise.
80 (promote_symbol): Likewise.
81 * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise.
82 (lto_symtab_merge_symbols): Likewise.
83 * lto.c (lto_wpa_write_files): Likewise.
84
783dab6b
RB
852014-04-15 Richard Biener <rguenther@suse.de>
86
87 * lto.c: Include params.h.
88 (do_whole_program_analysis): Switch on flag_lto_partition value,
89 add support for LTO_PARTITION_ONE.
90 * lto-partition.h (lto_balanced_map): Adjust.
91 * lto-partition.c (lto_balanced_map): Get number of desired
92 partitions as argument to support -flto-partition=one.
93
cb90235d
JH
942014-04-14 Jan Hubicka <hubicka@ucw.cz>
95
96 * lto/lto-symtab.c (lto_cgraph_replace_node): Don't re-merge
97 tp_first_run.
98
bbe281da
JH
992014-03-19 Jan Hubicka <hubicka@ucw.cz>
100
101 * lto.c: Include ipa-inline.h
102 (do_whole_program_analysis): Free inline summary after partitioning.
103
ce2f49b3
RB
1042014-03-19 Richard Biener <rguenther@suse.de>
105
106 PR middle-end/60553
107 * lto-tree.h (lang_tree_node): For types use TYPE_NEXT_VARIANT
108 instead of TREE_CHAIN as chain_next.
109
e41106fc
RB
1102014-03-19 Richard Biener <rguenther@suse.de>
111
112 * lto.c (lto_wpa_write_files): Move call to
113 lto_promote_cross_file_statics ...
114 (do_whole_program_analysis): ... here, into the partitioning
115 block. Do not ggc_collect after lto_wpa_write_files but
116 for a last time before it.
117
15df2655
JJ
1182014-03-19 Jakub Jelinek <jakub@redhat.com>
119
120 PR lto/60571
121 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0.
122 Fix formatting.
123
415e2e6b
JJ
1242014-03-18 Jakub Jelinek <jakub@redhat.com>
125
126 PR sanitizer/60535
127 * lto-lang.c (lto_init): Add NAME_TYPE for int128_integer_type_node
128 and complex_{float,{,long_}double}_type_node.
129
f42c637e
PM
1302014-03-08 Paulo Matos <paulo@matos-sorge.com>
131
415e2e6b
JJ
132 * lto-lang.c (lto_init): Pass flag_short_double to
133 build_common_tree_nodes.
f42c637e 134
6dab804d
JH
1352014-02-14 Jan Hubicka <hubicka@ucw.cz>
136
137 PR lto/60295
138 * lto.c (stream_out): Avoid parallel streaming with
139 -flto=jobserver until we are able to throttle it down
140 resonably.
141
39434bce
JH
1422014-02-14 Jan Hubicka <hubicka@ucw.cz>
143
144 * lto-partition.c (add_symbol_to_partition_1,
145 undo_partition, lto_balanced_map): Aliases have no
146 defined size.
147 (lto_balanced_map): Do not follow refering variables
148 if they can be optimized out.
149
1966fd99
RB
1502014-02-14 Richard Biener <rguenther@suse.de>
151
152 PR lto/60179
153 * lto.c (compare_tree_sccs_1): Do not compare
154 DECL_FUNCTION_SPECIFIC_TARGET.
155 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
156
283416b3
RB
1572014-02-12 Richard Biener <rguenther@suse.de>
158
159 PR lto/60060
160 * lto-lang.c (lto_write_globals): Do not call
161 wrapup_global_declarations or emit_debug_global_declarations
162 but emit debug info for non-function scope variables
163 directly.
164
b7e85694
JH
1652014-02-06 Jan Hubicka <hubicka@ucw.cz>
166
167 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
168
96451279
JH
1692014-02-06 Jan Hubicka <hubicka@ucw.cz>
170
171 PR ipa/59469
172 * lto-partition.c (symbol_class): Move to cgraph.h
173 (get_symbol_class): Move to symtab.c
174 (add_references_to_partition, add_symbol_to_partition_1,
175 lto_max_map, lto_1_to_1_map, lto_balanced_map,
176 lto_promote_cross_file_statics): Update.
177
f300e7b8
JH
1782014-02-05 Jan Hubicka <hubicka@ucw.cz>
179
180 * lto.c (lto_parallelism): New static var.
181 (do_stream_out, wait_for_child, stream_out): New static functions.
182 (lto_wpa_write_files): Add support for parallel streaming.
183 (do_whole_program_analysis): Set parallelism.
184 * lang.opt (fwpa): Add parameter.
185 * lto-lang.c (lto_handle_option): Handle flag_wpa.
186 (lto_init): Update use of flag_wpa.
187 * lto-streamer.h (asm_nodes_output): Declare.
188
f0f91770
RB
1892014-02-05 Richard Biener <rguenther@suse.de>
190
191 * lto.h (lto_global_var_decls): Remove.
192 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
193 (lto_write_globals): Do nothing in WPA stage, gather globals from
194 the varpool here ...
195 * lto.c (lto_main): ... not here.
196 (materialize_cgraph): Do not call rest_of_decl_compilation
197 on the empty lto_global_var_decls vector.
198 (lto_global_var_decls): Remove.
199
d665f8dd
JH
2002014-02-04 Jan Hubicka <hubicka@ucw.cz>
201
202 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
203 needs duplicating, not generic COMDAT.
204
c39276b8
RB
2052014-02-04 Richard Biener <rguenther@suse.de>
206
207 PR lto/59723
208 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
209 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
210
5f876ae7
JH
2112014-02-04 Jan Hubicka <hubicka@ucw.cz>
212 Markus Trippelsdorf
213
214 PR ipa/59469
215 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
216 merge force_output and forced_by_abi flags.
217
b72271b9
BI
2182014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
219
220 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
221 flag_cilkplus.
222
63124c48
RB
2232014-01-09 Richard Biener <rguenther@suse.de>
224
225 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
226
d05b9920
RB
2272014-01-09 Richard Biener <rguenther@suse.de>
228
229 PR lto/45586
230 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
231 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
232 (gimple_canonical_types_compatible_p): Do not compare them either.
233
23a5b65a
RS
2342014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
235
236 Update copyright years
237
2c8326a5
OE
2382013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
239
240 * lto.c: Remove struct tags when referring to class varpool_node.
241 * lto-partition.c: Likewise.
242 * lto-symtab.c: Likewise.
243
e06f9964
JJ
2442013-11-29 Jakub Jelinek <jakub@redhat.com>
245 Richard Biener <rguenther@suse.de>
246
247 PR lto/59326
248 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
249
c193f58b
JJ
2502013-11-29 Jakub Jelinek <jakub@redhat.com>
251
252 PR lto/59326
253 * lto.c (mentions_vars_p_omp_clause): New function.
254 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
255 after return stmts.
256
2fb9a547
AM
2572013-11-22 Andrew MacLeod <amacleod@redhat.com>
258
259 * lto.c: Add required include files from gimple.h.
260 * lto-lang.c: Likewise
261 * lto-object.c: Likewise
262 * lto-partition.c: Likewise
263 * lto-symtab.c: Likewise
264
fec39fa6
TS
2652013-11-18 Trevor Saunders <tsaunders@mozilla.com>
266
267 * lto-partition.c lto-symtab.c lto.c Adjust.
268
d8a2d370
DN
2692013-11-14 Diego Novillo <dnovillo@google.com>
270
271 * lto-lang.c: Include stringpool.h.
272 Include stor-layout.h.
273 * lto-partition.c: Include gcc-symtab.h.
274 * lto.c: Include stor-layout.h.
275
5e20cdc9
DM
2762013-10-31 David Malcolm <dmalcolm@redhat.com>
277
278 Automated part of renaming of symtab_node_base to symtab_node.
279
280 Patch autogenerated by rename_symtab.py from
281 https://github.com/davidmalcolm/gcc-refactoring-scripts
282 revision 58bb219cc090b2f4516a9297d868c245495ee622
283
284 * lto-partition.c (add_symbol_to_partition): Rename
285 symtab_node_base to symtab_node.
286 (get_symbol_class): Likewise.
287 (symbol_partitioned_p): Likewise.
288 (add_references_to_partition): Likewise.
289 (add_symbol_to_partition_1): Likewise.
290 (contained_in_symbol): Likewise.
291 (add_symbol_to_partition): Likewise.
292 (lto_1_to_1_map): Likewise.
293 (lto_max_map): Likewise.
294 (lto_balanced_map): Likewise.
295 (privatize_symbol_name): Likewise.
296 (promote_symbol): Likewise.
297 (may_need_named_section_p): Likewise.
298 (rename_statics): Likewise.
299 (lto_promote_statics_nonwpa): Likewise.
300 * lto-symtab.c (lto_symtab_merge): Likewise.
301 (lto_symtab_resolve_replaceable_p): Likewise.
302 (lto_symtab_symbol_p): Likewise.
303 (lto_symtab_resolve_can_prevail_p): Likewise.
304 (lto_symtab_resolve_symbols): Likewise.
305 (lto_symtab_merge_decls_2): Likewise.
306 (lto_symtab_merge_decls_1): Likewise.
307 (lto_symtab_merge_decls): Likewise.
308 (lto_symtab_merge_symbols_1): Likewise.
309 (lto_symtab_merge_symbols): Likewise.
310 (lto_symtab_prevailing_decl): Likewise.
311 * lto.c (lto_wpa_write_files): Likewise.
312 (read_cgraph_and_symbols): Likewise.
313 (do_whole_program_analysis): Likewise.
314
378cd6b1
DM
3152013-10-30 David Malcolm <dmalcolm@redhat.com>
316
317 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
318 declarations onto multiple lines to make things easier for
319 rename_symtab.py.
320 (lto_symtab_merge_decls_1): Likewise.
321 (lto_symtab_merge_symbols_1): Likewise.
322
939b37da
BI
3232013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
324
325 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
326 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
327 Plus is enabled.
328
67348ccc
DM
3292013-10-29 David Malcolm <dmalcolm@redhat.com>
330
331 Patch autogenerated by refactor_symtab.py from
332 https://github.com/davidmalcolm/gcc-refactoring-scripts
333 revision 58bb219cc090b2f4516a9297d868c245495ee622
334
335 * lto-partition.c (lto_promote_cross_file_statics): Update for
336 conversion of symtab types to a true class hierarchy.
337 (rename_statics): Likewise.
338 (promote_symbol): Likewise.
339 (privatize_symbol_name): Likewise.
340 (lto_balanced_map): Likewise.
341 (varpool_node_cmp): Likewise.
342 (node_cmp): Likewise.
343 (lto_1_to_1_map): Likewise.
344 (undo_partition): Likewise.
345 (add_symbol_to_partition): Likewise.
346 (contained_in_symbol): Likewise.
347 (add_symbol_to_partition_1): Likewise.
348 (add_references_to_partition): Likewise.
349 (symbol_partitioned_p): Likewise.
350 (get_symbol_class): Likewise.
351 (lto_max_map): Likewise.
352 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
353 (lto_symtab_merge_symbols): Likewise.
354 (lto_symtab_merge_symbols_1): Likewise.
355 (lto_symtab_merge_decls): Likewise.
356 (lto_symtab_merge_decls_1): Likewise.
357 (lto_symtab_merge_decls_2): Likewise.
358 (lto_symtab_resolve_symbols): Likewise.
359 (lto_symtab_resolve_can_prevail_p): Likewise.
360 (lto_symtab_symbol_p): Likewise.
361 (lto_symtab_resolve_replaceable_p): Likewise.
362 (lto_symtab_merge): Likewise.
363 (lto_varpool_replace_node): Likewise.
364 (lto_cgraph_replace_node): Likewise.
365 * lto.c (lto_main): Likewise.
366 (do_whole_program_analysis): Likewise.
367 (materialize_cgraph): Likewise.
368 (read_cgraph_and_symbols): Likewise.
369 (cmp_partitions_order): Likewise.
370 (lto_materialize_function): Likewise.
371 (has_analyzed_clone_p): Likewise.
372
8e9055ae
AM
3732013-10-29 Andrew MacLeod <amacleod@redhat.com>
374
375 * lto/lto-object.c: Add gimple.h to include list.
376 * lto/lto-partition.c: Likewise.
377
377d9792
AM
3782013-10-18 Andrew MacLeod <amacleod@redhat.com>
379
380 * lto.c: Remove tree-flow.h from include list.
381
fffda8d7
RB
3822013-10-15 Richard Biener <rguenther@suse.de>
383
384 * lto.c (hash_canonical_type): Split out from ...
385 (iterative_hash_canonical_type): ... here. Register types
386 we recurse to.
387 (gimple_canonical_type_hash): Adjust.
388 (gimple_register_canonical_type_1): Split out from ...
389 (gimple_register_canonical_type): ... here. Cache computed
390 hash value.
391 (lto_register_canonical_types): Split into two modes,
392 clearing and computing TYPE_CANONICAL.
393 (lto_read_decls): Adjust.
394 (read_cgraph_and_symbols): Do two passes over global trees,
395 first clearing then computing TYPE_CANONICAL.
396
1394237e
RB
3972013-10-14 Richard Biener <rguenther@suse.de>
398
399 * lto.c (gimple_canonical_types): Move out-of GC space.
400 (canonical_type_hash_cache): Make a pointer-map.
401 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
402 New counters.
403 (iterative_hash_canonical_type): Adjust.
404 (read_cgraph_and_symbols): Likewise.
405 (print_lto_report_1): Likewise.
406
0a387eca
RB
4072013-10-14 Richard Biener <rguenther@suse.de>
408
409 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
410 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
411 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
412 gimple_types_compatible_p_1, gimple_types_compatible_p,
413 visit, iterative_hash_name, struct type_hash_pair,
414 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
415 gimple_type_eq, gimple_register_type, num_not_merged_types,
416 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
417 num_not_merged_types_in_same_scc_trees): Remove old merging code
418 and statistics.
419 (lto_read_decls): Do not run old merging code in parallel.
420 (read_cgraph_and_symbols): Do not init/free old merging
421 data structures.
422 (print_lto_report_1): Do not report differences of old vs. new
423 merging code.
424
83fd5d11
RB
4252013-10-14 Richard Biener <rguenther@suse.de>
426
427 * lto-lang.c (lto_init): Do not re-init canonical types here.
428 (lto_register_canonical_types): Move to ...
429 * lto.c (lto_register_canonical_types): ... here.
430 (gimple_canonical_types, canonical_type_hash_cache,
431 iterative_hash_canonical_type, gimple_canonical_type_hash,
432 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
433 gimple_register_canonical_type): Add canonical type merging machinery
434 moved from gimple.c.
435 (read_cgraph_and_symbols): Init and free canonical type tables
436 here.
437 (print_lto_report_1): Report canonical type table stats here.
438
acf0174b
JJ
4392013-10-11 Jakub Jelinek <jakub@redhat.com>
440
441 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
442
7c6fedd2
TT
4432013-09-25 Tom Tromey <tromey@redhat.com>
444
445 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
446 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
447 (lto/lto-object.o): Remove.
448
35f32ad4
RB
4492013-09-06 Richard Biener <rguenther@suse.de>
450
451 * lto-symtab.c: Move from gcc/
452 * lto.h: Include vec.h.
453 (lto_global_var_decls): Declare.
454 * lto.c (lto_global_var_decls): Move definition here.
455 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
456 (lto-symtab.o): Add.
457 * config-lang.in (gtfiles): Add lto.h.
458
49322b12
JH
4592013-08-31 Jan Hubicka <jh@suse.cz>
460
461 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
462 DECL_FIELD_OFFSET can contain an reference to variable.
463
31f1f73b
JH
4642013-08-31 Jan Hubicka <jh@suse.cz>
465
466 * lto.c (tree_with_vars): Turn into vector.
467 (MAYBE_REMEMBER_WITH_VARS): Change to...
468 (CHECK_VAR): ... this one.
469 (CHECK_NO_VAR): New macro.
470 (maybe_remember_with_vars_typed): Turn to ...
471 (mentions_vars_p_typed): ... this one.
472 (maybe_remember_with_vars_common): Turn to ...
473 (mentions_vars_p_comon): ... this one.
474 (maybe_remember_with_vars_decl_minimal): Turn to ...
475 (mentions_vars_p_decl_minmal): ... this one.
476 (maybe_remember_with_vars_decl_common): Turn to ...
477 (mentions_vars_p_decl_common): ... this one.
478 (maybe_remember_with_vars_decl_with_vis): Turn to ...
479 (mentions_vars_p_decl_with_vis): ... this one.
480 (maybe_remember_with_vars_decl_non_common): Turn to ...
481 (mentions_vars_p_decl_non_common): ... this one.
482 (maybe_remember_with_vars_function): Turn to ...
483 (mentions_vars_p_function): ... this one.
484 (maybe_remember_with_vars_field_decl): Turn to ...
485 (mentions_vars_p_field_decl): ... this one.
486 (maybe_remember_with_vars_type): Turn to ...
487 (mentions_vars_p_type): ... this one.
488 (maybe_remember_with_vars_binfo): Turn to ...
489 (mentions_vars_p_binfo): ... this one.
490 (maybe_remember_with_vars_constructor): Turn to ...
491 (mentions_vars_p_constructor): ... this one.
492 (maybe_remember_with_vars_expr): Turn to ...
493 (mentions_vars_p_expr): ... this one.
494 (maybe_remember_with_vars): Turn to ...
495 (mentions_vars_p): ... this one.
496 (lto_read_decls): Update.
497 (LTO_SET_PREVAIL): Do not call function for internal decls.
498 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
499 check that something was updated.
500 (lto_fixup_state): Do not care about internal decls.
501 (lto_fixup_decls): Update.
502 (read_cgraph_and_symbols): Update.
503
256eefa9
JH
5042013-08-29 Jan Hubicka <jh@suse.cz>
505
506 * lto.c (read_cgraph_and_symbols): Free decl states.
507
0170f33c
JH
5082013-08-29 Jan Hubicka <jh@suse.cz>
509
510 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
511 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
512 TYPE_FINAL_P.
513
c01c111b
JH
5142013-08-28 Jan Hubicka <jh@suse.cz>
515
516 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
517 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
518 (unify_scc): Do checking assert.
519
6a49f3c9
JH
5202013-08-06 Jan Hubicka <jh@suse.cz>
521 Martin Liska <marxin.liska@gmail.com>
522
523 * lto-partition.c (lto_balanced_map): Always base order on
524 source file order.
525
a2e2a668
JH
5262013-08-06 Jan Hubicka <jh@suse.cz>
527
528 * lto.c (lto_materialize_function): Do not read body anymore.
529
815effe1
JH
5302013-08-02 Jan Hubicka <jh@suse.cz>
531
532 * lto.c (lto_materialize_function): Do not push struct function.
533 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
534 (may_need_named_section_p): Even abstract origins may need
535 named section.
536
315f8c0e
DM
5372013-07-30 David Malcolm <dmalcolm@redhat.com>
538
539 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
540 PASS_MANAGER_H.
541
542 * lto.c (do_whole_program_analysis): Update for move of
543 all_regular_ipa_passes from a global to a field of class
544 pass_manager.
545
1aa95df7
OB
5462013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
547
548 * lto-partition.c: Fix typos.
549
c525ba9a
JH
5502013-06-20 Jan Hubicka <jh@suse.cz>
551
552 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
553 partitioning of variables.
554
7a89ad00
JH
5552013-06-20 Jan Hubicka <jh@suse.cz>
556
557 * lto.c (read_cgraph_and_symbols): Set cgraph state.
558
6a6dac52
JH
5592013-06-19 Jan Hubicka <jh@suse.cz>
560
561 * lto-partition.c (add_references_to_partition): Use
562 ctor_for_folding.
563
ac0511f2
RB
5642013-06-18 Richard Biener <rguenther@suse.de>
565
566 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
567 and use it.
568 (lto_register_function_decl_in_symtab): Likewise.
569 (cmp_tree): New function.
570 (unify_scc): Instead of using the streamer cache map from entry
571 to cache index match up the two maps we have by sorting them.
572 Adjust calls to lto_register_var_decl_in_symtab and
573 lto_register_function_decl_in_symtab.
574
ee03e71d
RB
5752013-06-17 Richard Biener <rguenther@suse.de>
576
577 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
578 * lto.c: Include data-streamer.h.
579 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
580 (gimple_type_leader_entry_s, gimple_type_leader,
581 gimple_lookup_type_leader): Remove.
582 (gtc_visit): Simplify.
583 (gimple_types_compatible_p): Likewise.
584 (gimple_register_type_1): Likewise. Merge into ...
585 (gimple_register_type): ... this. Keep it as legacy for
586 statistics purposes for now.
587 (fixup_integer_cst): Remove.
588 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
589 rename to ...
590 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
591 maybe_remember_with_vars_*): ... these.
592 (uniquify_nodes): Remove.
593 (lto_fixup_prevailing_type): New function.
594 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
595 (tree_scc_hash, tree_scc_hash_obstack): New globals.
596 (num_merged_types, num_prevailing_types, num_not_merged_types,
597 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
598 total_scc_size_merged, num_sccs_merged, num_scc_compares,
599 num_scc_compare_collisions): New global counters.
600 (compare_tree_sccs_1): New function.
601 (compare_tree_sccs): Likewise.
602 (unify_scc): Likewise.
603 (lto_read_decls): Stream in tree SCCs and unify them on the
604 way in. Finalize prevailing SCC tree members.
605 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
606 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
607 to ggc-collect during merging.
608 (print_lto_report_1): Adjust for new merging code.
609
ca0f62a8
JH
6102013-06-12 Jan Hubicka <jh@suse.cz>
611
612 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
613
bbf9ad07
JH
6142013-06-12 Jan Hubicka <jh@suse.cz>
615
616 * lto.c (register_resolution): Take lto_file_data argument.
617 (lto_register_var_decl_in_symtab,
618 lto_register_function_decl_in_symtab): Update.
619 (read_cgraph_and_symbols): Update resolution_map handling.
620
ecdbd01a 6212013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
622
623 * lto-partition.c (get_symbol_class): Simplify weakref handling.
624 (add_symbol_to_partition_1): Likewise.
625 (contained_in_symbol): Likewise.
626 (lto_balanced_map): Likewise.
627 (rename_statics): Drop weakref.
628
a367df53
RB
6292013-06-05 Richard Biener <rguenther@suse.de>
630
631 * lto.c (num_merged_types): New global variable.
632 (uniquify_nodes): Increase num_merged_types when merging a type.
633 (print_lto_report_1): Output the number of merged types.
634
40a7fe1e
JH
6352013-06-01 Jan Hubicka <jh@suse.cz>
636
637 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
638 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
639 (do_whole_program_analysis): Update dumping.
640
e70670cf
JH
6412013-05-29 Jan Hubicka <jh@suse.cz>
642
643 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
644 flags.
645 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
646
8ee05051
JH
6472013-05-15 Jan Hubicka <jh@suse.cz>
648
649 * lto-partition.c (privatize_symbol_name): Return true when
650 privatizing happened.
651 (rename_statics): Do not go into infinite loop when privatizing
652 is not needed.
653
427b248d
JM
6542013-05-16 Jason Merrill <jason@redhat.com>
655
656 * Make-lang.in ($(LTO_EXE)): Use link mutex.
657
9de04252
MJ
6582013-05-15 Martin Jambor <mjambor@suse.cz>
659
660 * lto-partition.c (lto_balanced_map): Print symbol order instead
661 of node uids.
662
2d6e4603
JH
6632013-05-15 Jan Hubicka <jh@suse.cz>
664
665 PR lto/57038
666 PR lto/47375
667 * lto-partition.c (get_symbol_class): Fix weakrefs.
668 (lto_balanced_map): Fix weakrefs.
669 (privatize_symbol_name): Remove unnecesary label.
670 (rename_statics): Handle weakrefs as statics.
671
64cfa6c0
JH
6722013-05-09 Jan Hubicka <jh@suse.cz>
673 Richard Biener <rguenther@suse.de>
674
675 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
676 (lto_register_var_decl_in_symtab): Likewise.
677 (lto_main): Promote statics.
678 * lto-partition.c (privatize_symbol_name): New function.
679 (promote_symbol): Use it.
680 (may_need_named_section_p): New predicate.
681 (rename_statics): New functions.
682 (lto_promote_cross_file_statics): Simplify; do renaming.
683 (lto_promote_statics_nonwpa): New function.
684 * lto-partition.h (lto_promote_statics_nonwpa): New function.
685
e45cde98
RB
6862013-02-08 Richard Biener <rguenther@suse.de>
687
688 PR lto/56231
689 * lto-lang.c (lto_init): Do not enter a dummy file.
690
6edc3e32
UB
6912013-02-07 Uros Bizjak <ubizjak@gmail.com>
692
693 PR bootstrap/56227
694 * lto.c (lto_resolution_ready): Use %wx instead of
695 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
696
ed73881e
RG
6972013-02-04 Richard Guenther <rguenther@suse.de>
698
699 PR lto/56168
700 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
701 or lto_fixup_decls at LTRANS time.
702
a19b1432
JH
7032013-01-09 Jan Hubicka <jh@suse.cz>
704
705 PR lto/45375
706 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
707
49c01f87
L
7082012-12-10 H.J. Lu <hongjiu.lu@intel.com>
709
710 PR lto/55466
711 * lto.c (lto_register_var_decl_in_symtab): Don't record static
712 variables.
713 (lto_main): Record the global variables if WPA isn't enabled.
714
6e1aa848
DN
7152012-11-20 Diego Novillo <dnovillo@google.com>
716 Jakub Jelinek <jakub@redhat.com>
717
718 * lto.c: Replace all vec<T, A>() initializers with vNULL.
719
9771b263
DN
7202012-11-16 Diego Novillo <dnovillo@google.com>
721
722 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
723
724 * lto-lang.c: Use new vec API in vec.h.
725 * lto-partition.c: Likewise.
726 * lto-partition.h: Likewise.
727 * lto.c: Likewise.
728
24551b9c
LC
7292012-10-31 Lawrence Crowl <crowl@google.com>
730
731 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
732 down-cast via dyn_cast.
733 * lto-partition.c (add_symbol_to_partition_1): Likewise.
734 (undo_partition): Likewise.
735 (lto_balanced_map): Likewise.
736 (get_symbol_class): Likewise and via is_a.
737 (lto_balanced_map): Change symtab checking to is_a.
738
aec06f6f
RB
7392012-10-12 Richard Biener <rguenther@suse.de>
740
741 PR lto/54898
742 * lto.c (gimple_types_compatible_p_1): Also compare
743 TYPE_MAIN_VARIANT.
744 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
745
0b8c30f9
TB
7462012-10-09 Tobias Burnus <burnus@net-b.de>
747
748 * lto-lang.c (lto_register_builtin_type): Avoid useless
749 decl creation.
750 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
751
da3202a8
TB
7522012-10-08 Tobias Burnus <burnus@net-b.de>
753
754 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
755 Free lto_file struct after closing the file.
756
2512a443
JH
7572012-10-08 Jan Hubicka <jh@suse.cz>
758
759 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
760 (fixup_integer_cst): New functoin.
761 (lto_ft_type): Fixup BASETYPE of methods and offsets.
762
e75f8f79
JH
7632012-10-07 Jan Hubicka <jh@suse.cz>
764
765 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
766 release input encoders.
767 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
768
46591697
JH
7692012-10-06 Jan Hubicka <jh@suse.cz>
770
771 PR lto/54790
772 * lto.c (resolution_map): New static var.
773 (register_resolution): New function.
774 (lto_register_var_decl_in_symtab): Use it.
775 (read_cgraph_and_symbols): Copy resolutions into the symtab.
776
af16bc76
MJ
7772012-09-20 Martin Jambor <mjambor@suse.cz>
778
779 * lto.c (lto_materialize_function): Call push_struct_function and
780 pop_cfun.
781
5368224f
DC
7822012-09-19 Dehao Chen <dehao@google.com>
783
784 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
785
b5493fb2
JH
7862012-09-19 Jan Hubicka <jh@suse.cz>
787
788 * lto.c (lto_materialize_function): Update confused comment.
789 (read_cgraph_and_symbols): Do not free symtab.
790
c3c445e1
JH
7912012-09-12 Jan Hubicka <jh@suse.cz>
792
793 * lto.c (do_whole_program_analysis): Care timevars, statistics and
794 AUX pointer cleaning. Add max partitioning.
795 * lto-partition.c (enum symbol_class): New.
796 (get_symbol_class): New function.
797 (symbol_partitioned_p): New function.
798 (add_references_to_partition): Remove.
799 (add_aliases_to_partition): Remove.
800 (add_cgraph_node_to_partition_1): Remove.
801 (add_cgraph_node_to_partition): Remove.
802 (add_symbol_to_partition): New function.
803 (add_symbol_to_partition_1): New function.
804 (contained_in_symbol): New function.
805 (partition_cgraph_node_p): Remove.
806 (partition_varpool_node_p): Remove.
807 (partition_symbol_p): Remove.
808 (lto_1_to_1_map): Cleanup.
809 (lto_max_map): New.
810 (lto_balanced_map): Update.
811 (lto_promote_cross_file_statics): Update.
812 * lto-partition.h (lto_max_map): Declare.
813 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
814
b5c7cdfb
JH
8152012-09-11 Jan Hubicka <jh@suse.cz>
816
817 PR lto/54312
818 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
819 type is variant leader.
820
b29402f0
RG
8212012-09-11 Richard Guenther <rguenther@suse.de>
822
823 * lto.c (enum gtc_mode): Remove.
824 (struct type_pair_d): Adjust.
825 (lookup_type_pair): Likewise.
826 (gimple_type_leader): Do not mark as deletable.
827 (gimple_lookup_type_leader): Adjust.
828 (gtc_visit): Likewise.
829 (gimple_types_compatible_p_1): Likewise.
830 (gimple_types_compatible_p): Likewise.
831 (gimple_type_hash): Likewise.
832 (gimple_register_type): Likewise.
833 (read_cgraph_and_symbols): Manage lifetime of tables
834 here.
835
b8f4e58f
RG
8362012-09-11 Richard Guenther <rguenther@suse.de>
837
838 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
839 struct type_pair_d, lookup_type_pair, struct sccs,
840 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
841 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
842 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
843 visit, iterative_hash_name, struct type_hash_pair,
844 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
845 gimple_type_eq, gimple_register_type_1, gimple_register_type):
846 Move here from gimple.c
847 (read_cgraph_and_symbols): Free hash tables here.
848 (print_lto_report_1): New function wrapping print_lto_report.
849 (do_whole_program_analysis): Call it.
850 (lto_main): Likewise.
851
1cdbb3f9
JH
8522012-09-10 Jan Hubicka <jh@suse.cz>
853
854 * lto-partition.c (partition_symbol_p): Forward declare.
855 (add_references_to_partition): Reimplement using partition_symbol_p.
856 (add_aliases_to_partition): Break out from add_references_to_partition;
857 reimplement using partition_symbol_p.
858 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
859 add sanity checks.
860 (add_varpool_node_to_partition): Use add_aliases_to_partition.
861 (partition_varpool_node_p): Do not special case aliases.
862
b4661bfe
JH
8632012-08-12 Jan Hubicka <jh@suse.cz>
864
865 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
866 it is deleted after streaming.
867 * lto-partition.c (partition_symbol_p): New function.
868 (promote_var, promote_fn): Remove.
869 (promote_symbol): New function.
870 (lto_promote_cross_file_statics): First compute boundaries; rewrite
871 to lookup the actual boundaries instead of computing them ad-hoc.
872
7b99cca4
JH
8732012-08-12 Jan Hubicka <jh@suse.cz>
874
875 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
876 in partitioning.
877 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
878 by encoder.
879 * lto-partition.c (new_partition): Update.
880 * lto.c (cmp_partitions_order): Update.
881 (lto_wpa_write_files): Update.
882 (free_ltrans_partitions): Update.
883 (add_references_to_partition): Update.
884 (add_cgraph_node_to_partition_1): Update.
885 (add_cgraph_node_to_partition): Update.
886 (add_varpool_node_to_partition): Update.
887 (undo_partition): Update.
888 (lto_balanced_map): Update.
889 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
890 set_referenced_from_this_partition_p): Update.
891 (lto_promote_cross_file_statics): Update.
892
f27c1867
JH
8932012-08-12 Jan Hubicka <jh@suse.cz>
894
895 * lto-partition.c (set_referenced_from_other_partition_p,
896 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
897 New functions.
898 (lto_promote_cross_file_statics): Use them.
899
ab96cc5b
JH
9002012-07-24 Jan Hubicka <jh@suse.cz>
901
902 * lto.c (read_cgraph_and_symbols): Use input_symtab.
903
0229aee9
UB
9042012-07-24 Uros Bizjak <ubizjak@gmail.com>
905
906 * lto-tree.h (lang_decl): Add variable_size GTY option.
907
7ee2468b
SB
9082012-07-16 Steven Bosscher <steven@gcc.gnu.org>
909
910 * lto.c: Do not include timevar.h.
911 * Make-lang.in: Fix dependencies.
912
a910399d
LC
9132012-06-18 Lawrence Crowl <crowl@google.com>
914
915 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
916 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
917 to lto_wpa_write_files.
918 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
919 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
920 TV_PHASE_SETUP for the call to lto_init. Use new timevar
921 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
922 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
923 to be a front end, but is not one.
924
877ab5e9
JH
9252012-05-18 Jan Hubicka <jh@suse.cz>
926
927 * lto.c (lto_materialize_constructors_and_inits): Remove.
928 (read_cgraph_and_symbols): Remove handling of alias pairs.
929
6649df51
JH
9302012-05-17 Jan Hubicka <jh@suse.cz>
931
932 * lto-partition.c (add_references_to_partition): Handle external vars.
933 (partition_varpool_node_p): Likewise.
934 (lto_promote_cross_file_statics): Do not promote externals.
935
d1ede5f4
BS
9362012-05-14 Bernd Schmidt <bernds@codesourcery.com>
937
938 * lto-lang.c (handle_fnspec_attribute): New static function.
939 (lto_attribute_table): Add "fn spec".
940 (DEF_ATTR_STRING): Define and undefine along with the other macros.
941
0d6bf48c
JH
9422012-05-04 Jan Hubicka <jh@suse.cz>
943
944 * lto.c (do_whole_program_analysis): Set timevars correctly.
945 (lto_main): Likewise.
d1ede5f4 946
1d67dde8
RB
9472012-05-04 Richard Guenther <rguenther@suse.de>
948
949 * lang.opt (fwpa): Do not mark as Optimization.
950 (fltrans): Likewise.
951
65d630d4
JH
9522012-04-30 Jan Hubicka <jh@suse.cz>
953
954 * lto.c (lto_main): Use compile ().
1d67dde8
RB
955 * lto-partition.c (partition_cgraph_node_p): Use
956 symtab_used_from_object_file_p.
65d630d4
JH
957 (partition_varpool_node_p): Likewise.
958
ead84f73
JH
9592012-04-20 Jan Hubicka <jh@suse.cz>
960
961 * lto-partition.c (partition_cgraph_node_p): Use force_output.
962
5932a4d4
JH
9632012-04-18 Jan Hubicka <jh@suse.cz>
964
965 * lto-partition.c (add_references_to_partition, lto_balanced_map):
966 Update for new ipa-ref API.
967
65c70e6b
JH
9682012-04-16 Jan Hubicka <jh@suse.cz>
969
970 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
971 walkers to walk cgraph and varpool.
972 (materialize_cgraph): Likewise.
973 * lto-partition.c (lto_1_to_1_map): Likewise.
974 (lto_balanced_map): Likewise.
975 (lto_promote_cross_file_statics): Likewise.
976
960bfb69
JH
9772012-04-14 Jan Hubicka <jh@suse.cz>
978
979 * lto.c: Update field referenced for new cgraph/varpool layout.
980 * lto-partition.c: Likewise.
981
a66dc285
JH
9822012-04-11 Jan Hubicka <jh@suse.cz>
983
984 * lto.c: Update copyright; remove params.h, ipa-inline.h
985 and ipa-utils.h inlines; inline lto-partition.h
986 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
987 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
988 add_references_to_partition, add_cgraph_node_to_partition_1,
989 add_cgraph_node_to_partition, add_varpool_node_to_partition,
990 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
991 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
992 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
993 * lto-partition.c: ... here; new file.
994 * lto-partition.h: New file.
995 * Make-lang.in (lto.o): Update dependencies.
996 (lto-partition.o): New.
997
f3b249e5
RG
9982012-04-05 Richard Guenther <rguenther@suse.de>
999
1000 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
1001 definition.
1002
21fa2faf
RG
10032012-03-12 Richard Guenther <rguenther@suse.de>
1004
1005 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
1006
6bb485a3
RG
10072012-03-06 Richard Guenther <rguenther@suse.de>
1008
1009 PR lto/52097
1010 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
1011
95510497
RG
10122012-02-28 Richard Guenther <rguenther@suse.de>
1013
1014 PR lto/52400
1015 * lto.c (lto_register_function_decl_in_symtab): Do not register
1016 a reverse renamed decl mapping.
1017
09228fef
JJ
10182012-01-06 Jakub Jelinek <jakub@redhat.com>
1019
1020 PR lto/51774
1021 * lto-lang.c (handle_returns_twice_attribute): New function.
1022 (lto_attribute_table): Add returns_twice attribute.
1023
b03eda0d
RG
10242011-12-21 Richard Guenther <rguenther@suse.de>
1025
1026 * lto.c (GIMPLE_REGISTER_TYPE): New define.
1027 (LTO_FIXUP_TREE): Use it.
1028 (uniquify_nodes): Mark new non-prevailing types and avoid
1029 calling gimple_register_type on others.
1030 (lto_read_decls): Add comment.
1031
4ad9a9de
EB
10322011-12-13 Eric Botcazou <ebotcazou@adacore.com>
1033
1034 * lto.h (lto_parse_hex): Delete.
1035 * lto.c (lto_read_decls): Use 'int' for offsets.
1036 (lto_parse_hex): Make static and return proper 64-bit host type.
1037 (lto_resolution_read): Use proper 64-bit host type.
1038
ea973bad
RG
10392011-12-13 Richard Guenther <rguenther@suse.de>
1040
1041 PR lto/48354
1042 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
1043 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
1044
c8218030
UB
10452011-12-01 Uros Bizjak <ubizjak@gmail.com>
1046
1047 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
1048 (ignore_attribute): New.
1049
57ac2606
AH
10502011-11-21 Aldy Hernandez <aldyh@redhat.com>
1051
1052 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
1053 (handle_transaction_pure_attribute): New.
1054
52a35ef7
RG
10552011-11-03 Richard Guenther <rguenther@suse.de>
1056
1057 PR lto/44965
1058 * lto-lang.c (lto_post_options): Do not read file options.
1059 * lto.c (lto_read_all_file_options): Remove.
1060 (lto_init): Call lto_set_in_hooks here.
1061
51973b1e
JH
10622011-10-09 Jan Hubicka <jh@suse.cz>
1063
1064 * lto.c (node_cmp, varpool_node_cmp): New functions.
1065 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
1066 (cmp_partitions): Rename to ...
1067 (cmp_partitions_size): ... this one.
1068 (cmp_partitions_order): New function.
1069 (lto_wpa_write_files): Sort partitions by order when
1070 -fno-toplevel-reorder is used.
1071
5958009b
AK
10722011-10-09 Andi Kleen <ak@linux.intel.com>
1073
1074 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
1075
e79983f4
MM
10762011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1077
1078 * lto-lang.c (def_builtin_1): Delete old interface with two
1079 parallel arrays to hold standard builtin declarations, and replace
1080 it with a function based interface that can support creating
1081 builtins on the fly in the future. Change all uses, and poison
1082 the old names. Make sure 0 is not a legitimate builtin index.
1083
ecdbd01a 10842011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
1085
1086 * lto-object.c (lto_obj_add_section_data): Add list.
1087 (lto_obj_add_section): Fill in list.
1088 (ltoobj_build_section_table): Pass through list.
1089 * lto.c (file_data_list): Declare.
1090 (create_subid_section_table): Pass arguments directly.
1091 Fill in list of file_datas.
1092 (lwstate): Delete.
1093 (lto_create_files_from_ids): Pass in direct arguments.
1094 Don't maintain list.
1095 (lto_file_read): Use explicit section and file data lists.
1096 (lto_read_all_file_options): Pass in section_list.
1097 * lto.h (lto_obj_build_section_table): Add list.
1098 (lto_section_slot): Add next.
1099 (lto_section_list): Declare.
1100
ed0d2da0
JH
11012011-10-02 Jan Hubicka <jh@suse.cz>
1102
1103 PR lto/47247
1104 * common.c (lto_resolution_str): Add new resolution.
1105 * common.h (lto_resolution_str): Likewise.
1106
ad7715f3
L
11072011-09-30 H.J. Lu <hongjiu.lu@intel.com>
1108 Andi Kleen <ak@linux.intel.com>
1109
1110 PR lto/50568
1111 * lto.c (lto_splay_tree_delete_id): New.
1112 (lto_splay_tree_compare_ids): Likewise.
1113 (lto_splay_tree_lookup): Likewise.
1114 (lto_splay_tree_id_equal_p): Likewise.
1115 (lto_splay_tree_insert): Likewise.
1116 (lto_splay_tree_new): Likewise.
1117 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
1118 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
1119 (create_subid_section_table): Use lto_splay_tree_lookup and
1120 lto_splay_tree_insert.
1121 (lto_file_read): Use lto_splay_tree_new.
1122
ecdbd01a 11232011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
1124
1125 * lto.c (lto_resolution_read): Remove id dumping.
1126 (lto_section_with_id): Turn id HOST_WIDE_ID.
1127 (create_subid_section_table): Dito.
1128
892a371f
DS
11292011-08-28 Dodji Seketeli <dodji@redhat.com>
1130
1131 * lto-lang.c (lto_init): Likewise. Also, avoid calling
1132 linemap_add twice.
1133
f82d1a94
MJ
11342011-08-11 Martin Jambor <mjambor@suse.cz>
1135
1136 * lto.c (uniquify_nodes): Use main variant's BINFO too.
1137
f0efc7aa
DN
11382011-08-08 Diego Novillo <dnovillo@google.com>
1139
1140 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
1141 * lto.c: Include tree-streamer.h.
1142
1a072294
RG
11432011-07-06 Richard Guenther <rguenther@suse.de>
1144
1145 * lto-lang.c (lto_init):
1146 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1147
7496868d
JH
11482011-06-11 Jan Hubicka <jh@suse.cz>
1149
10f13f22 1150 PR lto/48246
7496868d
JH
1151 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1152 (lto_balanced_map): Likewise.
1153
39e2db00
JH
11542011-06-11 Jan Hubicka <jh@suse.cz>
1155
1156 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1157 (add_cgraph_node_to_partition) ... here; walk aliases.
1158 (lto_1_to_1_map): Remove same body alias code.
1159 (promote_fn): Likewise.
1160 (lto_promote_cross_file_statics): Update comment.
1161
1162
28628ea6
DN
11632011-06-07 Diego Novillo <dnovillo@google.com>
1164
1165 * lto.c (uniquify_nodes): Move code to register decls to
1166 the loop that computes canonical types.
1167
009db074
RG
11682011-06-07 Richard Guenther <rguenther@suse.de>
1169
1170 * lto-lang.c (lto_init): Do not set
1171 size_type_node or call set_sizetype.
1172
47c79d56
DN
11732011-06-04 Diego Novillo <dnovillo@google.com>
1174
1175 * lto.c (lto_init): New.
1176 (lto_main): Call it.
1177
d5828cc7
DN
11782011-06-03 Diego Novillo <dnovillo@google.com>
1179
1180 * lto.c (get_resolution): Move from lto-streamer-in.c.
1181 (lto_register_var_decl_in_symtab): Likewise.
1182 (lto_register_function_decl_in_symtab): Likewise.
1183 (uniquify_nodes): Call lto_register_var_decl and
1184 lto_register_function_decl_in_symtab after reading a new
1185 VAR_DECL or FUNCTION_DECL.
1186
6807da97
RG
11872011-06-01 Richard Guenther <rguenther@suse.de>
1188
1189 * lto-lang.c (lto_register_canonical_types): New function.
1190 (lto_init): Register common nodes with the canonical type machinery.
1191 Do not play tricks with char_type_node.
1192
d74be317
RG
11932011-05-26 Richard Guenther <rguenther@suse.de>
1194
1195 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1196
d9f8303f
NF
11972011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1198
1199 * lto.c (lto_ft_typed): New function.
1200 (lto_ft_common): Call it.
1201 (lto_ft_constructor): Likewise.
1202 (lto_ft_expr): Likewise.
1203 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1204 TREE_CHAIN.
1205
fb291a1e
RG
12062011-05-20 Richard Guenther <rguenther@suse.de>
1207
1208 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1209 (lto_ft_type): Move main-variant and pointer-to chain building ...
1210 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1211 in a separate final loop.
1212
31b3ca64
RG
12132011-05-19 Richard Guenther <rguenther@suse.de>
1214
1215 * lto.c (uniquify_nodes): First register all types before
1216 fixing up the tree SCC.
1217
35d828c5
JH
12182011-05-11 Jan Hubicka <jh@suse.cz>
1219
1220 PR lto/48952
1221 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1222
51545682
NF
12232011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1224
1225 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1226 location of binfo field.
1227 (lto_fixup_prevailing_decls): Likewise.
1228
8242dd04
NF
12292011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1230
1231 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1232 build_function_type_array or build_varargs_function_type_array
1233 instead.
1234
c99c0026
EB
12352011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1236
1237 * lto-lang.c (global_bindings_p): Return bool.
1238
c47d0034
JH
12392011-05-07 Jan Hubicka <jh@suse.cz>
1240
a9bcb3f0
EB
1241 * lto.c (lto_materialize_function): Use
1242 cgraph_function_with_gimple_body_p.
1243 (add_cgraph_node_to_partition): Do not re-add items to partition;
1244 handle thunks.
c47d0034
JH
1245 (add_varpool_node_to_partition): Do not re-add items to partition.
1246
bb3398ca
JH
12472011-05-03 Jan Hubicka <jh@suse.cz>
1248
1249 * lto.c (free_ltrans_partitions): Fix accidental commit.
1250
1cb1a99f
JH
12512011-05-03 Jan Hubicka <jh@suse.cz>
1252
1253 * lto.c (ltrans_partition_def): Remove GTY annotations.
1254 (ltrans_partitions): Move to heap.
1255 (new_partition): Update.
1256 (free_ltrans_partitions): New function.
1257 (lto_wpa_write_files): Use it.
1258
af8bca3c
MJ
12592011-04-29 Martin Jambor <mjambor@suse.cz>
1260
1261 * lto.c: Include ipa-utils.h.
1262 (lto_balanced_map): Update call to ipa_reverse_postorder.
1263 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1264
b823cdfe
MM
12652011-04-29 Michael Matz <matz@suse.de>
1266
1267 * lto.c (toplevel): Include tree-flow.h.
1268 (lto_read_in_decl_state): Don't merge types here.
1269 (tree_with_vars): New static hash table.
1270 (remember_with_vars): New static functions.
1271 (LTO_FIXUP_TYPE): New macro.
1272 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1273 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1274 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1275 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1276 (lto_read_decls): Uniquify while reading in trees.
1277 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1278 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1279 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1280 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1281 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1282 lto_fixup_tree): Remove.
1283 (lto_fixup_state): Remove data argument. Use
1284 lto_symtab_prevailing_decl.
1285 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1286 (lto_fixup_prevailing_decls): New function.
1287 (lto_fixup_state_aux): Argument aux is unused.
1288 (lto_fixup_decls): Don't allocate pointer sets, don't use
1289 lto_fixup_tree, use lto_fixup_prevailing_decls.
1290 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1291 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1292
b9843260
EB
12932011-04-16 Eric Botcazou <ebotcazou@adacore.com>
1294
1295 * lto.c (lto_balanced_map): Fix typos in head comment.
1296 (lto_promote_cross_file_statics): Fix long lines and remove redundant
1297 test.
1298
e7f23018
JH
12992011-04-16 Jan Hubicka <jh@suse.cz>
1300
1301 * lto.c (lto_balanced_map): Update.
1302
10a5dd5d
JH
13032011-04-14 Jan Hubicka <jh@suse.cz>
1304
1305 * lto.c: Include ipa-inline.h
b9843260
EB
1306 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
1307 accessor.
10a5dd5d
JH
1308 (ipa_node_duplication_hook): Fix declaration.
1309 * Make-lang.in (lto.o): Update dependencies.
1310
81f653d6
NF
13112011-04-12 Nathan Froyd <froydnj@codesourcery.com>
1312
1313 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
1314 calling TREE_CHAIN.
1315 * lto.c (lto_fixup_common): Likewise.
1316
dcf0c47e
NF
13172011-04-08 Nathan Froyd <froydnj@codesourcery.com>
1318
1319 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
1320 (handle_type_generic_attribute): Likewise.
1321
e89964e3
MM
13222011-04-03 Michael Matz <matz@suse.de>
1323
1324 * lto.c (lto_materialize_function): Don't read and then discard
1325 sections in WPA mode.
1326 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
1327
1328 * lto-lang.c (registered_builtin_fndecls): Remove.
1329 (lto_getdecls): Return NULL_TREE.
1330 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
1331
d2b3fe18
RG
13322011-03-31 Richard Guenther <rguenther@suse.de>
1333
1334 PR lto/48246
1335 * lto.c (lto_wpa_write_files): Disable assert for non-empty
1336 partitions when checking is not enabled.
1337
ba78087b
KT
13382011-03-25 Kai Tietz <ktietz@redhat.com>
1339
1340 * lto.c (lto_resolution_read): Use filename_cmp instead
1341 of strcmp.
1342 (lto_read_section_data): Likewise.
1343
0edf1bb2
JL
13442011-03-25 Jeff Law <law@redhat.com>
1345
1346 * lto/lto-lang.c (def_fn_type): Add missing va_end.
1347
62d784f7
KT
13482011-03-21 Kai Tietz <ktietz@redhat.com>
1349
1350 PR target/12171
1351 * lto-lang.c (lto_attribute_table): Adjust table.
1352
62dd9571
JJ
13532011-02-18 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR bootstrap/47807
1356 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
1357 of lto-streamer.h.
1358
237d6259
RG
13592011-02-18 Richard Guenther <rguenther@suse.de>
1360
1361 PR lto/47798
1362 * lto-tree.h (lto_global_var_decls): Do not declare here.
1363 * lto-lang.c: Include lto-streamer.h.
1364 * Make-lang.in (lto-lang.o): Adjust dependencies.
1365
8ead2223
KT
13662011-02-10 Kai Tietz <kai.tietz@onevision.com>
1367
1368 PR lto/47241
1369 * lto.c (lto_read_section_data): Free
1370 fd_name in failure case.
1371 For mingw targets don't hash file-descriptor.
1372 (read_cgraph_and_symbols): Close current_lto_file
1373 in failure case.
1374
6e701822
JH
13752011-01-11 Jan Hubicka <jh@suse.cz>
1376
1377 PR lto/45721
1378 PR lto/45375
b9843260
EB
1379 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
1380 are not partitioned.
6e701822 1381
f4da8dce
NF
13822010-12-22 Nathan Froyd <froydnj@codesourcery.com>
1383
1384 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
1385 Use prototype_p.
1386
6b7fb143
RG
13872010-12-06 Richard Guenther <rguenther@suse.de>
1388
1389 PR lto/46796
1390 * lto-lang.c (lto_init): Give names to basic types.
1391
c59ffc41
JM
13922010-11-30 Joseph Myers <joseph@codesourcery.com>
1393
1394 * lto-object.c: Don't include toplev.h.
1395 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
1396
7c475d11
JM
13972010-11-30 Joseph Myers <joseph@codesourcery.com>
1398
1399 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
1400 $(TOPLEV_H).
1401
71f3e391
JM
14022010-11-29 Joseph Myers <joseph@codesourcery.com>
1403
1404 * lto-endian.h: Delete.
1405 * lto-object.c: Don't include "libiberty.h".
1406 (O_BINARY): Don't define.
1407 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
1408 (O_BINARY): Don't define.
1409
9f1718b0
RG
14102010-11-23 Richard Guenther <rguenther@suse.de>
1411
1412 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
1413
39c4e298
RG
14142010-11-23 Richard Guenther <rguenther@suse.de>
1415
1416 PR lto/46605
1417 * lto.c (read_cgraph_and_symbols): Bail out after errors.
1418
b37421c6
JM
14192010-11-17 Joseph Myers <joseph@codesourcery.com>
1420
1421 * lto.c (lto_main): Take no arguments.
1422 * lto.h (lto_main): Update prototype.
1423
d82f74d3
ILT
14242010-11-16 Ian Lance Taylor <iant@google.com>
1425
1426 * lto-object.c (lto_obj_file_open): Call
1427 simple_object_attributes_merge rather than
1428 simple_object_attributes_compare.
1429
a4d8c676
JM
14302010-11-12 Joseph Myers <joseph@codesourcery.com>
1431
1432 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
1433 * lto-lang.c (lto_handle_option): Take location_t parameter.
1434
d8a07487
JM
14352010-11-10 Joseph Myers <joseph@codesourcery.com>
1436
1437 * lto.c (lto_resolution_read): Start diagnostics with lowercase
1438 letters and remove trailing '.'.
1439 (lto_file_finalize): Start diagnostic with a lowercase letter.
1440
6b3456d1
ILT
14412010-11-02 Ian Lance Taylor <iant@google.com>
1442
1443 * lto-object.c: New file.
1444 * lto-elf.c: Remove file.
1445 * lto-macho.c: Remove file.
1446 * lto-macho.h: Remove file.
1447 * lto-coff.c: Remove file.
1448 * lto-coff.h: Remove file.
1449 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
1450 lto/lto-object.o.
1451 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
1452 (lto/lto-objfile.o): New target.
1453 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
1454 (lto/lto.o): Remove $(LIBIBERTY_H).
1455
030cd86c
JH
14562010-10-22 Jan Hubicka <jh@suse.cz>
1457
1458 * lto.c (add_cgraph_node_to_partition,
1459 add_varpool_node_to_partition): Add debug info.
1460 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
1461 partitioned nodes.
1462 (do_whole_program_analysis): Set function flags before dumping.
1463
4490cae6
RG
14642010-10-22 Richard Guenther <rguenther@suse.de>
1465
1466 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
1467 the new gimple_register_canonical_type.
1468
703cdce3
L
14692010-10-20 H.J. Lu <hongjiu.lu@intel.com>
1470
1471 PR bootstrap/45954
1472 * config-lang.in (boot_language): Set to $enable_lto.
1473
1915c739
JJ
14742010-10-18 Jakub Jelinek <jakub@redhat.com>
1475
1476 PR lto/45638
1477 * Make-lang.in (check-lto): New dummy target.
1478
82971de5
EB
14792010-10-14 Eric Botcazou <ebotcazou@adacore.com>
1480
1481 * lto-elf.c (SHN_XINDEX): Define if not already defined.
1482
a75bfaa6
JM
14832010-10-08 Joseph Myers <joseph@codesourcery.com>
1484
1485 * lto-lang.c (lto_init_options): Change to
1486 lto_init_options_struct. Update parameters.
1487 (LANG_HOOKS_INIT_OPTIONS): Don't define.
1488 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
1489
937f7f69
JH
14902010-10-06 Jan Hubicka <jh@suse.cz>
1491
1492 * lto.c (lto_balanced_map): Fix accounting of program size.
1493
2169830c
JH
14942010-10-06 Jan Hubicka <jh@suse.cz>
1495
1496 * lto.c (lto_balanced_map): Do not produce empty partitions.
1497
ecdbd01a 14982010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
1499
1500 * lto.c (lto_process_name): Add.
1501 (lto_main): Call lto_process_name.
1502
06ed016f
JH
15032010-10-06 Jan Hubicka <jh@suse.cz>
1504
1505 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
1506 COMDATs required by the linker.
1507
ae718d66
ILT
15082010-10-05 Ian Lance Taylor <iant@google.com>
1509
1510 * lto.c (lto_section_with_id): Make s a const pointer.
1511
852e4bd2
JH
15122010-10-05 Jan Hubicka <jh@suse.cz>
1513
1514 * lto.c: Include params.h.
1515 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
1516 refcounting in aux field.
1517 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
1518 New functions.
1519 (lto_1_to_1_map): Simplify.
1520 (lto_balanced_map): New function.
1521 (do_whole_program_analysis): Chose proper partitioning alg.
1522 * Make-lang.in (lto.o): Add dependency on params.h
1523
ecdbd01a 15242010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
1525
1526 * Make-lang.in (lto1): Add + to build rule.
1527
ecdbd01a 15282010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
1529
1530 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
1531 with fatal_error.
1532
0d6e14fd
JH
15332010-09-28 Jan Hubicka <jh@suse.cz>
1534
1535 * lto-lang.c (handle_leaf_attribute): New function.
1536 (lto_attribute_tables): Add leaf.
1537
fb462383
JZ
15382010-09-25 Jie Zhang <jie@codesourcery.com>
1539
1540 * lto.c (lto_read_all_file_options): Start a new line after
1541 printing out file names.
1542
051f8cc6
JH
15432010-09-24 Jan Hubicka <jh@suse.cz>
1544
1545 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1546
64e0f5ff
JH
15472010-09-20 Jan Hubicka <jh@suse.cz>
1548
1549 PR tree-optimize/45605
1550 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1551
a929ec3d
GP
15522010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
1553
1554 * lto-elf.c (lto_obj_file_open): Also provide filename when
1555 elf_begin fails.
1556
4c588abf
JH
15572010-09-17 Jan Hubicka <jh@suse.cz>
1558
1559 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
1560
c3224d6f
RG
15612010-09-17 Richard Guenther <rguenther@suse.de>
1562
1563 * lang.opt (flag_wpa): Also enable for the driver.
1564
52b3b3c7
JH
15652010-09-16 Jan Hubicka <jh@suse.cz>
1566
1567 * lto.c (lto_materialize_function): Do not tamper with STATIC and
1568 EXTERNAL flags.
1569
969c37b7
LB
15702010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1571
1572 * lto-tree.h (struct lang_type): Add variable_size GTY option.
1573
098a4f50
JH
15742010-09-08 Jan Hubicka <jh@suse.cz>
1575
1576 * lto.c (real_file_count, real_file_decl_data): New static vars.
1577 (read_cgraph_and_symbols): Use it.
1578
0f443ad0
RG
15792010-09-08 Richard Guenther <rguenther@suse.de>
1580
1581 * lto.c (read_cgraph_and_symbols): Collect again after each
1582 file.
1583
ee187353
JH
15842010-09-07 Jan Hubicka <jh@suse.cz>
1585
1586 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
1587
b3ec52d0
RG
15882010-09-03 Richard Guenther <rguenther@suse.de>
1589
1590 * lto-elf.c (validate_file): Always error if validation fails.
1591
f1395d4a
JH
15922010-08-20 Jan Hubicka <jh@suse.cz>
1593
1594 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
1595 (lto_wpa_write_files): Update comments.
1596
2429bce3
L
15972010-08-20 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 PR bootstrap/45357
1600 * lto.c (lto_materialize_function): Replace has_analyzed_clone
1601 with has_analyzed_clone_p.
1602
e0f967db
JH
16032010-08-20 Jan Hubicka <jh@suse.cz>
1604
1605 * lto.c (has_analyzed_clone_p): New function
1606 (lto_materialize_function): Use callgraph to determine if
1607 body is needed.
1608 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
1609
ac47786e
NF
16102010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1611
1612 * lto.c: Use FOR_EACH_VEC_ELT.
1613
ecdbd01a 16142010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
1615
1616 * Make-lang.in (lto.o): Add dependency to splay-tree.h
1617
5f20c657
JM
16182010-07-27 Joseph Myers <joseph@codesourcery.com>
1619
1620 * lto-lang.c (lto_handle_option): Update prototype and return
1621 value type. Remove duplicate assignment to result.
1622
7a9bf9a4
JM
16232010-07-27 Joseph Myers <joseph@codesourcery.com>
1624
1625 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
1626 New.
1627 (lto_init_options): Update prototype.
1628 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
1629 Define.
1630
ecdbd01a 16312010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
1632
1633 PR lto/44992
1634 * lto.c: Include splay-tree.h
1635 (lto_resolution_read): Change to walk file_ids tree and parse
1636 extra file_id in resolution file.
1637 (lto_section_with_id): Add.
1638 (create_subid_section_table): Add.
1639 (lwstate): Add.
1640 (lto_create_files_from_ids): Add.
1641 (lto_file_read): Change to handle sub file ids and create list
1642 of file_datas. Add output argument for count.
1643 (get_section_data): Pass file_data to lto_get_section_name.
1644 (lto_flatten_file): Add.
1645 (read_cgraph_and_symbols): Handle linked lists of file_datas.
1646
ecdbd01a 16472010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
1648
1649 * lto-coff.c (hash_name, eq_name): Move.
1650 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1651 * lto-elf.c: (hash_name, eq_name): Move.
1652 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1653 * lto-macho.c: (hash_name, eq_name): Move.
1654 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1655 * lto.c: (hash_name, eq_name): Move from lto-*.c
1656 (lto_obj_create_section_hash_table): Add.
1657 (free_with_string): Add.
1658
718f9c0f
MLI
16592010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1660
1661 * lto-coff.c: Include diagnostic-core.h in every file that
1662 includes toplev.h.
1663 * lto-elf.c: Likewise.
1664 * lto-lang.c: Likewise.
1665 * lto-macho.c: Likewise.
1666
1b137837
JJ
16672010-07-07 Jakub Jelinek <jakub@redhat.com>
1668
1669 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
1670 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
1671 objects.
1672
92eb4438
JH
16732010-07-05 Jan Hubicka <jh@suse.cz>
1674
1675 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
1676 nodes from same comdat group as well as all comdat functions referenced
1677 here.
b9843260
EB
1678 (add_varpool_node_to_partition, add_references_to_partition): New
1679 function.
1680 (lto_1_1_map): Skip COMDAT fnctions/variables; use
1681 add_varpool_node_to_partition; clear aux flags when done.
1682 (lto_promote_cross_file_statics): Do not promote stuff that gets
1683 duplicated to each ltrans.
92eb4438 1684
a05541a9
JH
16852010-07-04 Jan Hubicka <jh@suse.cz>
1686
1687 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
1688
4a2ac96f
RG
16892010-06-13 Richard Guenther <rguenther@suse.de>
1690
1691 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
1692
1d536046
KT
16932010-06-09 Kai Tietz <kai.tietz@onevision.com>
1694
1695 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1696 * lto-coff.c (coff_write_object_file): Add braces to if.
1697
a9429e29
LB
16982010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1699
1700 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
1701 (lto_file_read): Likewise.
1702 (new_partition): Likewise.
1703 (read_cgraph_and_symbols): Likewise.
1704
5498f011
JM
17052010-06-07 Joseph Myers <joseph@codesourcery.com>
1706
1707 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
1708 (lto_handle_option): Don't set flag_signed_char here.
1709
d4c0c9f6
RG
17102010-06-04 Richard Guenther <rguenther@suse.de>
1711
1712 PR lto/41584
1713 * lto.c (lto_1_to_1_map): Use the proper file_data for
1714 varpool nodes.
1715
0a5fa5a1
JH
17162010-05-30 Jan Hubicka <jh@suse.cz>
1717
1718 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
1719 partitioning decisions.
1720
9eec9488
JH
17212010-05-29 Jan Hubicka <jh@suse.cz>
1722
1723 * lto.c (bitmap vector): Remove.
1724 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
1725 (ltrans_partition_def): New structure.
1726 (ltrans_partition): New type and VECtor.
1727 (new_partition): New function.
1728 (add_cgraph_node_to_partition): New function.
1729 (lto_1_to_1_map): Reorganize for partitions.
1730 (lto_add_inline_clones): Remove.
1731 (lto_add_all_inlinees): Remove.
1732 (lto_promote_cross_file_statics): Use partitions.
1733 (cmp_partitions): New function.
1734 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
1735 use partitions; output files sorted by size.
1736
3e097227
SB
17372010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1738
1739 * Make-lang.in: Replace vec.h dependency with VEC_H.
1740
7ca92787
JM
17412010-05-28 Joseph Myers <joseph@codesourcery.com>
1742
1743 * lto-coff.c (coff_errmsg): Remove.
1744 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
1745 errors instead of coff_errmsg (-1).
1746 * lto-macho.c (mach_o_errmsg): Remove.
1747 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
1748 instead of mach_o_errmsg (-1).
1749 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
1750 xstrerror (errno).
1751
b5611987
RG
17522010-05-28 Richard Guenther <rguenther@suse.de>
1753
1754 * lto.c (prefix_name_with_star): Removed.
1755 (strip_extension): Likewise.
1756 (get_filename_for_set): Likewise.
1757 (lto_write_ltrans_list): Fold into ...
1758 (lto_wpa_write_files): ... this. Name LTRANS units
1759 by suffixing the ltrans output list filename.
1760 (do_whole_program_analysis): Adjust.
1761
1da2ed5f
JM
17622010-05-27 Joseph Myers <joseph@codesourcery.com>
1763
1764 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
1765 (read_cgraph_and_symbols, lto_main): Use seen_error.
1766 * Make-lang.in (lto/lto.o): Update dependencies.
1767
7951d88a
EB
17682010-05-27 Eric Botcazou <ebotcazou@adacore.com>
1769
1770 PR lto/44230
1771 * lto.h (lto_eh_personality): New prototype.
1772 * lto.c: Include debug.h.
1773 (first_personality_decl): New static variable.
1774 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
1775 first function for which it is non-null.
1776 (lto_eh_personality_decl): New static variable.
1777 (lto_eh_personality): New function.
1778 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
1779 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
1780
e12da9c2
SB
17812010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1782
1783 * lto-lang.c: Do not include expr.h.
1784
468194f4
RG
17852010-05-24 Richard Guenther <rguenther@suse.de>
1786
1787 * lto-elf.c (lto_obj_build_section_table): Work around
1788 FreeBSD libelf issue.
1789
bd9eb5da
RG
17902010-05-22 Richard Guenther <rguenther@suse.de>
1791
1792 * lto.c (read_cgraph_and_symbols): Do not collect.
1793
66576e1b
JH
17942010-05-20 Jan Hubicka <jh@suse.cz>
1795
1796 * lto.c (promote_var, promote_fn): New functions.
1797 (lto_promote_cross_file_statics): Compute correctly boundary including
1798 static initializers of readonly vars.
1799
36576655
JH
18002010-05-18 Jan Hubicka <jh@suse.cz>
1801
66576e1b 1802 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
1803 (lto_promote_cross_file_statics): Deal with non-inline clones.
1804
28632d63
JH
18052010-05-18 Jan Hubicka <jh@suse.cz>
1806
1807 * lto.c (lto_materialize_function): Announce function when
1808 reading body; allocate_struct_function only when reading body;
1809 do not finalize local statics; ggc_collect after reading;
1810 do not mark reachable node.
1811 (materialize_cgraph): Do not announce function.
1812
33e42d56
JH
18132010-05-11 Jan Hubicka <jh@suse.cz>
1814
1815 * lto.c (materialize_cgraph): Revert my previous patch.
1816
f6430ea5
KT
18172010-05-11 Kai Tietz <kai.tietz@onevision.com>
1818
1819 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
1820 IMAGE_FILE_MACHINE_AMD64.
1821 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
1822
0a0b07b7
JH
18232010-05-11 Jan Hubicka <jh@suse.cz>
1824
1825 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
1826 (materialize_cgraph): Add it here.
1827
9a809897
JH
18282010-05-11 Jan Hubicka <jh@suse.cz>
1829
1830 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
1831 vector.
1832
18332010-05-11 Jan Hubicka <jh@suse.cz>
1834
1835 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
1836 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
1837 use reachable_from_other_partition_p and
1838 referenced_from_other_partition_p test.
1839
94f64249
KT
18402010-05-11 Kai Tietz <kai.tietz@onevision.com>
1841
1842 * lto-coff.c (validate_file): Add x64-coff support.
1843 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
1844 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
1845 * lto-lang.c (lto_build_c_type_nodes): Add check for
1846 'long long unsigned int' for x64-windows.
1847 (lto_init): Likewise.
1848
1849
c082f9f3
SB
18502010-05-07 Steven Bosscher <steven@gcc.gnu.org>
1851
1852 * lto.h (struct lto_file_struct): Document offset member.
1853 * lto-endian.h: New file.
1854 * lto-macho.h: New file.
1855 * lto-macho.c: New file.
1856 * Make-lang.in: Add rule for lto-macho.o.
1857
5cd0e96b
RG
18582010-05-07 Richard Guenther <rguenther@suse.de>
1859
1860 PR lto/43857
1861 PR lto/43371
1862 * lang.opt (fresolution): Change to ...
1863 (fresolution=): ... this.
1864 * lto-lang.c (lto_handle_option): Adjust.
1865
48cf395b
RB
18662010-05-07 Richard Guenther <rguenther@suse.de>
1867
1868 * lto.c (DUMPBASE_SUFFIX): Remove.
1869 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
1870 Rename to ...
1871 (lto_write_ltrans_list): ... only output the list of ltrans files.
1872 (lto_maybe_unlink): Remove.
1873 (do_whole_program_analysis): Do not execute LTRANS phase
1874 from here.
1875
afa83c15
L
18762010-05-06 H.J. Lu <hongjiu.lu@intel.com>
1877
1878 * lto-lang.c (lto_handle_option): Add argument kind.
1879
369451ec
JH
18802010-05-05 Jan Hubicka <jh@suse.cz>
1881
48cf395b
RB
1882 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
1883 refs.
369451ec 1884
2f41ecf5
JH
18852010-05-05 Jan Hubicka <jh@suse.cz>
1886
1887 * lto.c (lto_1_to_1_map): Partition only needed nodes.
1888
ace72c88
JH
18892010-04-30 Jan Hubicka <jh@suse.cz>
1890
b9843260
EB
1891 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
1892 use default name.
ace72c88
JH
1893 (lto_wpa_write_files): Write any non-empty partition.
1894
05575e07
JH
18952010-04-30 Jan Hubicka <jh@suse.cz>
1896
1897 * lto.c: Do not attempt to make constant pool references global.
1898
49ba8180
JH
18992010-04-28 Jan Hubicka <jh@suse.cz>
1900
1901 * lto/lto.c (lto_read_in_decl_state): Use GGC.
1902 (lto_wpa_write_files): Announce what we are writting.
1903 (all_file_decl_data): New.
1904 (read_cgraph_and_symbols): Use GGC; correct timevars.
1905 (do_whole_program_analysis): Collect.
1906 * lto/Make-lang.in (lto.o): Fix dependency.
1907 * Makefile.in (GTFILES): Add lto-streamer.h.
1908 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
1909 (varpool_assemble_pending_decls): Use VAROUT.
1910 * lto-streamer.h (lto_tree_ref_table): Annotate.
1911 (lto_in_decl_state): Annotate.
1912 (lto_file_decl_data): Annotate.
1913
2942c502
JH
19142010-04-28 Jan Hubicka <jh@suse.cz>
1915
1916 * lto.c (lto_varpool_node_sets): New.
1917 (lto_1_to_1_map): Partition varpool too.
1918 (globalize_context_t, globalize_cross_file_statics,
1919 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
1920 lto_scan_statics_in_remaining_global_vars): Remove.
1921 (lto_promote_cross_file_statics): Rewrite.
1922 (get_filename_for_set): Take vset argument.
1923 (lto_wpa_write_files): Pass around vsets.
1924
3bec79c5
DK
19252010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
1926
1927 PR lto/42776
1928 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
1929 hardcoding 'lto-elf.o'.
1930 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
1931
1932 * lto-coff.h: New file.
1933 * lto-coff.c: Likewise.
1934
21aac880
RG
19352010-04-26 Richard Guenther <rguenther@suse.de>
1936
1937 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
1938
2cee0101
DK
19392010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
1940
1941 * lto.h (lto_elf_file_open): Rename prototype from this ...
1942 (lto_obj_file_open): ... to this.
1943 (lto_elf_file_close): Likewise ...
1944 (lto_obj_file_close): ... and likewise.
1945 (lto_elf_build_section_table): Likewise ...
1946 (lto_obj_build_section_table): ... and likewise.
1947 (lto_elf_begin_section): Likewise ...
1948 (lto_obj_begin_section): ... and likewise.
1949 (lto_elf_append_data): Likewise ...
1950 (lto_obj_append_data): ... and likewise.
1951 (lto_elf_end_section): Likewise ...
1952 (lto_obj_end_section): ... and likewise.
1953 * lto.c (lto_file_read): Update references to the above.
1954 (lto_wpa_write_files): Likewise.
1955 (lto_read_all_file_options): Likewise.
1956 (read_cgraph_and_symbols): Likewise.
1957 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
1958 (LANG_HOOKS_APPEND_DATA): Likewise.
1959 (LANG_HOOKS_END_SECTION): Likewise.
1960 * lto-elf.c (lto_elf_file_open): Rename from this ...
1961 (lto_obj_file_open): ... to this, updating any references.
1962 (lto_elf_file_close): Likewise ...
1963 (lto_obj_file_close): ... and likewise.
1964 (lto_elf_build_section_table): Likewise ...
1965 (lto_obj_build_section_table): ... and likewise.
1966 (lto_elf_begin_section): Likewise ...
1967 (lto_obj_begin_section): ... and likewise.
1968 (lto_elf_append_data): Likewise ...
1969 (lto_obj_append_data): ... and likewise.
1970 (lto_elf_end_section): Likewise ...
1971 (lto_obj_end_section): ... and likewise.
1972
bc58d7e1
JH
19732010-04-21 Jan Hubicka <jh@suse.cz>
1974
1975 * lto.c (lto_fixup_tree): Do not call wpa fixup.
1976 (materialize_cgraph): Likewise.
1977
e792884f
JH
19782010-04-21 Jan Hubicka <jh@suse.cz>
1979
1980 * lto.c (lto_wpa_write_files): Update.
1981 (read_cgraph_and_symbols): Be more verbose.
1982 (materialize_cgraph): Likewise.
1983 (do_whole_program_analysis): Likewise.
1984
c9945504
JH
19852010-04-21 Jan Hubicka <jh@suse.cz>
1986
1987 * lto.c (globalize_cross_file_statics): When function has address taken,
1988 it needs to be public.
1989
a837268b
JH
19902010-04-20 Jan Hubicka <jh@suse.cz>
1991
1992 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
1993 (lto_add_all_inlinees): Likewise.
1994 (lto_wpa_write_files): Likewise.
1995
3b9e5d95
EB
19962010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1997
1998 * lto-lang.c (lto_init): Remove second argument in call to
1999 build_common_tree_nodes.
2000
8ccb78f2
RO
20012010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2002
2003 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
2004 function.
2005
2f9b99e6
EB
20062010-03-09 Eric Botcazou <ebotcazou@adacore.com>
2007
2008 PR bootstrap/43276
2009 * lto-elf.c: Define EM_* constants if not already defined.
2010
bef7d288
EB
20112010-03-03 Eric Botcazou <ebotcazou@adacore.com>
2012
2013 * lto-elf.c (is_compatible_architecture): New static function.
2014 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
2015
f68df07c
RG
20162010-02-11 Richard Guenther <rguenther@suse.de>
2017
2018 PR driver/43021
2019 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
2020 appropriately.
2021
3cdea2b4
AH
20222010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
2023
2024 * lto.c (O_BINARY): Define.
2025 (lto_read_section_data): Open file in binary mode.
2026 * lto-elf.c (O_BINARY): Define.
2027 (lto_elf_file_open): Open file in binary mode.
2028
c59449fa
RG
20292010-01-08 Richard Guenther <rguenther@suse.de>
2030
2031 PR lto/42528
2032 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
2033 (lto_init): Do not init char_type_node in a standard way
2034 but according to flag_signed_char.
2035
d7fb0a6d
L
20362010-01-03 H.J. Lu <hongjiu.lu@intel.com>
2037
2038 PR lto/41564
2039 * lto.c (DUMPBASE_SUFFIX): New.
2040 (lto_execute_ltrans): Append a sequence number to -dumpbase
2041 for LTRANS.
2042
78ce4053
L
20432010-01-02 H.J. Lu <hongjiu.lu@intel.com>
2044
2045 PR lto/42580
2046 * lto-elf.c (lto_elf_file_open): Stop if the command line
2047 option file is missing.
2048
2a71eb48
RG
20492009-12-15 Richard Guenther <rguenther@suse.de>
2050
2051 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
2052 (lto_post_options): Do not disable debuginfo.
2053
a818bca1
DG
20542009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
2055
2056 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
2057
e7d00517
RG
20582009-12-11 Richard Guenther <rguenther@suse.de>
2059
2060 PR lto/42037
2061 * lto.c (lto_resolution_read): Properly grow the vector.
2062
1ab53893
RG
20632009-12-11 Richard Guenther <rguenther@suse.de>
2064
2065 PR lto/41915
2066 * lto-lang.c (lto_init_options): Initialize flag_complex_method
2067 to the C99 default. Do not set flag_unit_at_a_time.
2068
0f900dfa
JJ
20692009-11-28 Jakub Jelinek <jakub@redhat.com>
2070
2071 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
2072 variable.
2073
92fa7608
RAE
20742009-11-19 Rafael Avila de Espindola <espindola@google.com>
2075
2076 PR bootstrap/42096
2077 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
2078 * lto.c (lto_parse_hex): New.
2079 (lto_resolution_read): Use lto_parse_hex.
2080 * lto.h (lto_parse_hex): New.
2081
9870fe4f
RAE
20822009-11-17 Rafael Avila de Espindola <espindola@google.com>
2083
2084 * lto-elf.c (lto_file_init): Add offset argument.
2085 (lto_elf_file_open): Record the offset.
2086 * lto.c (lto_resolution_read): Change file_name into a lto_file
2087 argument. Check offsets.
2088 (lto_file_read): Update call to lto_resolution_read.
2089 * lto.h (lto_file_struct): Add the offset field.
2090
1b70729f
RAE
20912009-11-16 Rafael Avila de Espindola <espindola@google.com>
2092
2093 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
2094
0e3776db
JH
20952009-11-14 Jan Hubicka <jh@suse.cz>
2096
2097 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
2098
06bd7f56
RAE
20992009-11-12 Rafael Avila de Espindola <espindola@google.com>
2100
2101 * lang.opt (fresolution): Renamed from resolution.
2102 * lto-lang.c (lto_handle_option): Handle new option name.
2103 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
2104
7e9dc421
RG
21052009-11-04 Richard Guenther <rguenther@suse.de>
2106 Rafael Avila de Espindola <espindola@google.com>
2107
2108 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
2109 (lto_elf_file_open): Handle offsets in arguments name@offest.
2110
b207f900
RG
21112009-10-30 Richard Guenther <rguenther@suse.de>
2112
2113 PR lto/41858
2114 * lto.c (lto_file_read): Do not set file_data->fd.
2115 (lto_read_section_data): Use a single-entry file-descriptor cache.
2116 Do not check the result of xmalloc.
2117 (free_section_data): Do not use file_data->fd.
2118 (lto_read_all_file_options): Likewise.
2119
2c928155
RG
21202009-10-22 Richard Guenther <rguenther@suse.de>
2121
2122 * lto.c (lto_fixup_jump_functions): Remove.
2123 (lto_fixup_decls): Do not fixup jump functions.
2124 (read_cgraph_and_symbols): Schedule cgraph merging after
2125 summary reading. Schedule type and decl fixup before
2126 summary reading.
2127
f9c91f8a
RB
21282009-10-22 Richard Guenther <rguenther@suse.de>
2129
2130 * lto.c (lto_fixup_data_t): Remove free_list member.
2131 (lto_fixup_tree): Do not insert into free_list.
2132 (free_decl): Remove.
2133 (lto_fixup_decls): Remove free-list handling.
2134
fb3f88cc
JH
21352009-10-22 Jan Hubicka <jh@suse.cz>
2136
2137 * lto.c (lto_fixup_jump_functions): New function.
2138 (lto_fixup_decls): Use it.
2139
35f1e9f4
RG
21402009-10-16 Richard Guenther <rguenther@suse.de>
2141
2142 PR lto/41715
2143 * lto.c (lto_fixup_tree): Revert last change.
2144
200c8750
RG
21452009-10-14 Richard Guenther <rguenther@suse.de>
2146
2147 * lto.c (lto_fixup_tree): In case the prevailing decl is not
2148 compatible with the one we replace wrap it around a
2149 VIEW_CONVERT_EXPR.
2150
b1b07c92
RG
21512009-10-09 Richard Guenther <rguenther@suse.de>
2152
2153 PR lto/41635
2154 PR lto/41636
2155 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2156 a file.
2157 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2158 (init_ehdr##BITS): Likewise.
2159
3c2e7d45
JM
21602009-10-08 Joseph Myers <joseph@codesourcery.com>
2161
2162 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2163 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2164 diagnostics.
2165 * lto-lang.c (lto_post_options): Remove trailing "." from
2166 diagnostics.
2167
0d0bfe17
RG
21682009-10-08 Richard Guenther <rguenther@suse.de>
2169
2170 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2171 hash tables.
2172
4bedf19a
JM
21732009-10-07 Joseph Myers <joseph@codesourcery.com>
2174
2175 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2176
b20996ff
JH
21772009-10-07 Jan Hubicka <jh@suse.cz>
2178
2179 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2180 ltrans stage; explain why this is needed and should not.
2181
1a735925
RG
21822009-10-05 Richard Guenther <rguenther@suse.de>
2183
2184 PR lto/41552
2185 PR lto/41487
2186 * lto.c (lto_read_decls): Do not register deferred decls.
2187 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2188 until after reading the IPA summaries.
2189
d7f09764
DN
21902009-10-02 Rafael Avila de Espindola <espindola@google.com>
2191
2192 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2193 (lto-lang.c): Don't include lto/common.h.
2194
21952009-10-02 Rafael Avila de Espindola <espindola@google.com>
2196
2197 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2198 (lto/common.o): Remove.
2199 * common.c: Remove.
2200 * common.h (lto_kind_str): Remove.
2201 (lto_visibility_str): Remove.
2202 (lto_resolution_str): Make it static.
2203
22042009-10-01 Diego Novillo <dnovillo@google.com>
2205
2206 * lto.c (lto_read_decls): Add comment.
2207 Call internal_error instead of gcc_assert.
2208 (lto_resolution_read): Likewise.
2209 (lto_add_all_inlinees): Tidy.
2210 * Make-lang.in: Fix copyright boilerplate.
2211 (lto.pdf): New.
2212 (lto.install-pdf): New.
2213 * lto-tree.h: Fix copyright boilerplate.
2214 * lang-specs.h: Likewise.
2215 Remove ".lto" entry from compilers fragment.
2216 * lto-elf.c: Move inclusion of gelf.h after config.h.
2217 Tidy formatting everywhere.
2218 * lto.h: Fix copyright boilerplate.
2219 Tidy formatting everywhere.
2220 * common.c: Likewise.
2221 * config-lang.in: Likewise.
2222 * common.h: Likewise.
2223 * lto-lang.c: Likewise.
2224
22252009-10-01 Richard Guenther <rguenther@suse.de>
2226
2227 * lto.c (lto_read_section_data): Use plain lseek/read.
2228
22292009-10-01 Richard Guenther <rguenther@suse.de>
2230
2231 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2232 use sysconf to query the system page size.
2233 (lto_file_read): Implement fallback using stdio.
2234 (free_section_data): Likewise.
2235
22362009-09-29 Diego Novillo <dnovillo@google.com>
2237
2238 * lto-lang.c (lto_init): Really fix call to
2239 build_common_builtin_nodes.
2240
22412009-09-29 Diego Novillo <dnovillo@google.com>
2242
2243 * lto-lang.c (lto_init): Fix call to
2244 build_common_builtin_nodes.
2245
22462009-09-29 Richard Guenther <rguenther@suse.de>
2247
2248 PR lto/40754
2249 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2250 in bytes.
2251 (first_data_block): New static variable.
2252 (lto_elf_append_data): Align the first data block in each
2253 section.
2254
22552009-09-28 Diego Novillo <dnovillo@google.com>
2256
2257 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2258 * lto.c (strip_extension): New.
2259 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2260 (lto_execute_ltrans): Tidy.
2261 Do not pass -fwpa nor -fltrans-* to LTRANS.
2262 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2263 * tree.c (need_assembler_name_p): Call
2264 lang_hooks.decls.may_need_assembler_name_p if set.
2265 * varasm.c (default_binds_local_p_1): Remove check for
2266 flag_ltrans.
2267 * varpool.c (decide_is_variable_needed): Do not test for
2268 in_lto_p.
2269
22702009-09-22 Richard Guenther <rguenther@suse.de>
2271
2272 PR lto/39276
2273 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2274 * Make-lang.in: Remove ltrans-driver stuff.
2275 * config-lang.in: Likewise.
2276 * lang.opt (fltrans-driver): Remove.
2277 * lto-lang.c (lto_init_options): Remove code initializing
2278 ltrans_driver.
2279 * ltrans-driver: Remove.
2280
22812009-09-21 Diego Novillo <dnovillo@google.com>
2282
2283 * lto-lang.c (lto_define_builtins): Remove superfluous
2284 calls to targetm.init_builtins and build_common_builtin_nodes.
2285 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2286 build_common_builtin_nodes.
2287 * lto.c (lto_materialize_function): Do nothing if NODE is a
2288 clone.
2289
22902009-09-03 Diego Novillo <dnovillo@google.com>
2291
2292 * lto-elf.c (validate_file): Replace call to
2293 elf_getshstrndx with call to elf_getshdrstrndx.
2294
22952009-08-19 Richard Guenther <rguenther@suse.de>
2296
2297 * lto-lang.c (lto_init): Merge char_type_node with the
2298 appropriately signed variant.
2299
23002009-08-19 Richard Guenther <rguenther@suse.de>
2301
2302 PR lto/41071
2303 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
2304 (lto_fixup_type): Re-build the pointer-to chain part two.
2305
23062009-08-19 Richard Guenther <rguenther@suse.de>
2307
2308 PR lto/41071
2309 * lto.c (lto_fixup_type): Re-build the type variant chain.
2310
23112009-08-19 Richard Guenther <rguenther@suse.de>
2312
2313 PR lto/41071
2314 * lto.c (lto_fixup_constructor): New function.
2315 (lto_fixup_tree): Replace all types. Properly fixup
2316 constructors and constants.
2317
23182009-08-14 Richard Guenther <rguenther@suse.de>
2319
2320 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
2321 for DECL_LANG_SPECIFIC.
2322
23232009-08-13 Richard Guenther <rguenther@suse.de>
2324
2325 PR lto/41032
2326 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
2327
23282009-07-30 Richard Guenther <rguenther@suse.de>
2329
2330 PR lto/40903
2331 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
2332 the largest decl for output and free TREE_CHAIN for further
2333 use.
2334
23352009-07-24 Diego Novillo <dnovillo@google.com>
2336
2337 * Make-lang.in: Add empty lto.install-plugin target.
2338
23392009-07-13 Diego Novillo <dnovillo@google.com>
2340
2341 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
2342
23432009-07-11 Richard Guenther <rguenther@suse.de>
2344
2345 * lto-lang.c (lto_write_globals): Wrapup global decls.
2346
23472009-07-10 Richard Guenther <rguenther@suse.de>
2348
2349 * lto-lang.c (lto_init): Allocate one more location to make
2350 BUILTINS_LOCATION correct.
2351
23522009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2353
2354 * lto.c (free_section_data): Cast computed_offset to caddr_t.
2355
23562009-07-06 Diego Novillo <dnovillo@google.com>
2357
2358 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
2359 TYPE_SIZE_UNIT.
2360
23612009-07-06 Diego Novillo <dnovillo@google.com>
2362
2363 * lto.c (preload_common_nodes): Remove.
2364 (lto_read_in_decl_state): Call lto_streamer_cache_get.
2365 (lto_read_decls): Call lto_data_in_create and
2366 lto_data_in_delete.
2367 (free_decl): Do not call ggc_free.
2368 (lto_main): Call lto_init_reader.
2369 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
2370 (lto_init): Initialize main_identifier_node if needed.
2371 Make ptrdiff_type_node be integer_type_node.
2372
23732009-06-19 Diego Novillo <dnovillo@google.com>
2374
2375 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
2376 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
2377 Remove code guarded by #ifdef LOCAL_TRACE.
2378
23792009-06-18 Diego Novillo <dnovillo@google.com>
2380
2381 * lto.c: Update license to GPLv3.
2382 * lto-elf.c: Likewise.
2383 * common.c: Likewise.
2384 * lto-lang.c: Likewise.
2385 * lto.h: Remove superfluous include files. Update all
2386 users.
2387
23882009-06-17 Diego Novillo <dnovillo@google.com>
2389
2390 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
2391
23922009-06-02 Diego Novillo <dnovillo@google.com>
2393
2394 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
2395 read in.
2396 (materialize_cgraph): Only materialize nodes that have a
2397 representation on file.
2398
23992009-06-01 Diego Novillo <dnovillo@google.com>
2400
2401 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
2402
24032009-05-31 Diego Novillo <dnovillo@google.com>
2404
2405 * lto-lang.c (lto_type_for_mode): Handle all the modes
2406 handled in c_common_type_for_mode.
2407
24082009-05-21 Diego Novillo <dnovillo@google.com>
2409
2410 * lto-elf.c: Always include <gelf.h>.
2411 * config-lang.in (target_libs): Remove.
2412 (build_by_default): Set to no.
2413
24142009-05-15 Diego Novillo <dnovillo@google.com>
2415
2416 * lto.c (lto_materialize_function): Assert that DECL is
2417 not a builtin.
2418 (materialize_cgraph): Don't try to materialize builtin
2419 functions.
2420 * lto-section-out.c (write_symbol_vec): Do not write
2421 builtin functions.
2422
24232009-05-13 Diego Novillo <dnovillo@google.com>
2424
2425 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
2426
24272009-05-07 Diego Novillo <dnovillo@google.com>
2428
2429 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
2430 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
2431 (lto_fixup_type): Call it for TYPE_POINTER_TO,
2432 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
2433 (lto_fixup_tree): Call gimple_register_type when *TP is a
2434 type.
2435 (lto_main): Call bitmap_obstack_initialize.
2436
24372009-04-22 Diego Novillo <dnovillo@google.com>
2438
2439 * lto.c (free_section_data): Tidy.
2440 (lto_1_to_1_map): Tidy.
2441 (lto_add_all_inlinees): Tidy.
2442 (prefix_name_with_star): New.
2443 (get_filename_for_set): New.
2444 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
2445 to determine what cgraph node sets to write.
2446 Call get_filename_for_set to compute temporary file
2447 names.
2448 (lto_execute_ltrans): Do not execute LTRANS on files with
2449 names that start with '*'.
2450 Move logic to execute LTRANS together so that LTRANS is
2451 invoked only if there are any files to compile.
2452 (do_whole_program_analysis): Only remove output files
2453 that do not start with '*'.
2454
24552009-04-06 Diego Novillo <dnovillo@google.com>
2456
2457 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
2458 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
2459 (lto_add_all_inlinees): Tidy.
2460
24612009-03-26 Diego Novillo <dnovillo@google.com>
2462
2463 * lto.c: Include gimple.h.
2464 (lto_read_in_decl_state): Call gimple_register_type for
2465 every type in every stream.
2466 (lto_fixup_common): Call gimple_register_type if T has a
2467 type.
2468 (do_whole_program_analysis): Call print_lto_report.
2469 (lto_main): Call print_lto_report after cgraph_optimize.
2470 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
2471
24722009-03-24 Diego Novillo <dnovillo@google.com>
2473
2474 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
2475 (lto.o): Add dependency on GIMPLE_H.
2476
24772009-03-10 Simon Baldwin <simonb@google.com>
2478
2479 * lto.c (lto_read_all_file_options): Close any open file descriptor
2480 contained in file_data before freeing.
2481
24822009-02-24 Rafael Avila de Espindola <espindola@google.com>
2483
2484 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2485 for a decl in the original bitmap, not a node.
2486 (lto_add_all_inlinees): Remove original nodes that are not needed.
2487 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2488
24892009-02-24 Diego Novillo <dnovillo@google.com>
2490
2491 * lto.c (lto_materialize_function): Update
2492 lto_stats.num_function_bodies.
2493 (get_section_data): Initialize *LEN to 0.
2494 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
2495 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
2496 Update lto_stats.num_output_files.
2497 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
2498 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
2499 (lto_main): Initialize lto_stats.
2500 If flag_lto_report is set, call print_lto_report.
2501
25022009-02-19 Diego Novillo <dnovillo@google.com>
2503
2504 Revert
2505
2506 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
2507
2508 * lto.c (lto_add_inline_clones): Don't add the
2509 master clone. Check for a decl in the original
2510 bitmap, not a node.
2511 (lto_add_all_inlinees): Remove original nodes
2512 that are not needed.
2513 (lto_scan_statics_in_cgraph_node): Don't care if
2514 the node is the master.
2515 (lto_promote_cross_file_statics): Use a new
2516 context.seen_node_decls for each set
2517
25182009-02-19 Rafael Avila de Espindola <espindola@google.com>
2519
2520 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2521 for a decl in the original bitmap, not a node.
2522 (lto_add_all_inlinees): Remove original nodes that are not needed.
2523 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2524 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
2525 for each set
2526
25272009-02-18 Diego Novillo <dnovillo@google.com>
2528
2529 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
2530 and TV_WHOPR_WPA_IO.
2531 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
2532 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
2533 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
2534 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
2535 depending on command line flags.
2536 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
2537 (lto_main): Remove timer uses.
2538
25392009-02-18 Rafael Avila de Espindola <espindola@google.com>
2540
2541 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
2542 (lto_wpa_write_files): Update calls to renamed functions.
2543
25442009-02-17 Diego Novillo <dnovillo@google.com>
2545
2546 PR 39203
2547 * lto-lang.c (lto_post_options): Disable -fwhole-program
2548 when running LTRANS.
2549
25502009-02-10 Diego Novillo <dnovillo@google.com>
2551
2552 * lto.c (read_cgraph_and_symbols): Fix comment.
2553
25542009-02-10 Diego Novillo <dnovillo@google.com>
2555
2556 * lto.c (read_cgraph_and_symbols): Read options from all
2557 IL files.
2558
25592009-02-10 Diego Novillo <dnovillo@google.com>
2560
2561 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
2562 (materialize_cgraph): Likewise.
2563 (do_whole_program_analysis): Likewise.
2564 (lto_main): Call read_cgraph_and_symbols,
2565 materialize_cgraph and do_whole_program_analysis.
2566
25672009-02-10 Simon Baldwin <simonb@google.com>
2568
2569 * lto.c: Include lto-opts.h.
2570 * (lto_main): Clear file options at loop start, read any saved
2571 options from the first file handled, and re-issue options.
2572 * Makefile.in (lto.o): Add dependency on lto-opts.h.
2573
25742009-02-02 Diego Novillo <dnovillo@google.com>
2575
2576 * lto.c (lto_main): Stop LTO_TIMER and use
2577 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
2578
25792009-01-30 H.J. Lu <hongjiu.lu@intel.com>
2580
2581 PR lto/38995
2582 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
2583 to POINTER_SIZE.
2584
25852009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
2586
2587 * Make-lang.in (LTO_EXE): Link with all
2588 BACKENDLIBS and not only GMPLIBS
2589
25902009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2591
2592 PR bootstrap/38992
2593 * lto-elf.c: Include gelf.h instead of libelf.h.
2594 (lto_elf_file_close): Replace elfx_update_shstrndx with
2595 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
2596 gelf_update_ehdr.
2597
25982009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2599
2600 PR middle-end/38996
2601 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
2602
26032009-01-26 Diego Novillo <dnovillo@google.com>
2604
2605 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
2606
26072009-01-26 Diego Novillo <dnovillo@google.com>
2608
2609 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
2610 and rename into gimple_types_compatible_p.
2611
26122009-01-12 Rafael Avila de Espindola <espindola@google.com>
2613
2614 * lto-lang.c (lang_hooks): Remove the const qualifier.
2615
26162009-01-06 Diego Novillo <dnovillo@google.com>
2617
2618 * ltrans-driver: Mark 'all' target as phony.
2619
26202008-12-31 Diego Novillo <dnovillo@google.com>
2621
2622 * ltrans-driver: Execute a NOP action for target 'all'.
2623
26242008-12-19 Diego Novillo <dnovillo@google.com>
2625
2626 * lto.c (lto_1_to_1_map): Tidy.
2627
26282008-12-19 Diego Novillo <dnovillo@google.com>
2629
2630 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
2631 be opened, show its name.
2632 * ltrans-driver: If $verbose is set, do not use parallelism.
2633
26342008-12-17 Rafael Avila de Espindola <espindola@google.com>
2635
2636 * lto.c (lto_fixup_function): New.
2637 (lto_fixup_tree): Call lto_fixup_function.
2638
26392008-12-14 Doug Kwan <dougkwan@google.com>
2640
2641 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
2642 variables if there is no function.
2643
26442008-12-10 Simon Baldwin <simonb@google.com>
2645
2646 * ltrans-driver: Always run make in silent mode, to avoid make's
2647 trace on stdout interfering with lto-wrapper output.
2648
26492008-12-10 Doug Kwan <dougkwan@google.com>
2650
2651 * lto.c (lto_add_inline_clones): Do not force master clones of
2652 inlined functions already in SET to be static inline.
2653
26542008-12-04 Doug Kwan <dougkwan@google.com>
2655
2656 * lto.c (globalize_context_t): New type to store states in
2657 globalization of cross-file statics.
2658 (globalize_cross_file_statics): New.
2659 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
2660 static decls that need to be fixed up.
2661 (lto_scan_statics_in_cgraph_node): Change call interface to use
2662 a globalize_context_t CONTEXT for all states used.
2663 (lto_scan_statics_in_remaining_global_vars): New.
2664 (lto_promote_cross_file_statics): Use new call interface of
2665 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
2666 visible vars in the last set.
2667
26682008-12-03 Diego Novillo <dnovillo@google.com>
2669
2670 * lto.c (lto_fixup_tree): Do not emit an error when
2671 PREVAILING throw but T doesn't.
2672
26732008-12-02 Doug Kwan <dougkwan@google.com>
2674
2675 * lto.c (lto_scan_statics_in_ref_table): New function factored out
2676 from code in ...
2677 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
2678 variables and functions.
2679 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
2680 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
2681
26822008-11-29 Diego Novillo <dnovillo@google.com>
2683
2684 * lto.c: Include timevar.h.
2685 (lto_materialize_function): Tidy. Add comments.
2686 (lto_wpa_write_files): Tidy.
2687 (lto_execute_ltrans): Tidy.
2688 (lto_main): Add local variable LTO_TIMER. Initialize it
2689 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
2690 Start and stop the timer.
2691 Tidy comments.
2692 * Make-lang.in (lto.o): Add dependency on timevar.h.
2693 * ltrans-driver: React to -v and -save-temps.
2694 Use simple heuristic to determine how much parallelism to
2695 use when executing make.
2696
26972008-11-12 Doug Kwan <dougkwan@google.com>
2698
2699 * lto.c (lto_bitmap_obstack): Remove var.
2700 (lto_materialize_function): Do nothing instead of marking function
2701 body in file if flag_wpa is true.
2702 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
2703 (lto_scan_statics_in_cgraph_node): New function.
2704 (lto_promote_cross_file_statics): Same.
2705 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
2706 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
2707 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
2708
27092008-11-09 Diego Novillo <dnovillo@google.com>
2710
2711 * lto/lto.c (lto_fixup_tree): Change error message locus
2712 information to include location of mismatching
2713 declaration.
2714 Use TREE_NO_WARNING to avoid repeated messages.
2715 (lto_main): If lto_fixup_decls emitted any errors, exit.
2716 * lto/lto-lang.c: Don't include libfuncs.h and except.h
2717 (lto_init_options): Don't enable exceptions by default.
2718 (lto_eh_runtime_type): Move to lto-function-in.c
2719 (lto_init_eh): Likewise.
2720 (lto_init): Don't call lto_init_eh.
2721 * lto/Make-lang.in (lto-lang.o): Remove dependency on
2722 libfuncs.h and except.h.
2723
27242008-10-30 Diego Novillo <dnovillo@google.com>
2725
2726 * lto.c (lto_read_decls): Declare debug_main only if
2727 LTO_STREAM_DEBUGGING is enabled.
2728
27292008-10-30 Simon Baldwin <simonb@google.com>
2730
2731 * lto.c (lto_wpa_write_files): Create intermediate files with
2732 make_cwd_temp_file().
2733 (lto_maybe_unlink): New. Delete intermediate WPA files unless
2734 WPA_SAVE_LTRANS is set.
2735 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
2736 * ltrans-driver: Do not strip directory from output files.
2737
27382008-10-29 Doug Kwan <dougkwan@google.com>
2739
2740 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
2741 DECL.
2742 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
2743 (lto/lto-symtab.o): Remove rule.
2744 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
2745 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
2746 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
2747 Remove macros.
2748 lto-symtab.c (File): Move up one level.
2749 lto-lang.c (cgraph.h): Remove include.
2750 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2751 input_cgraph): Move to lto-cgraph.c in gcc directory above.
2752 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
2753
27542008-10-24 Rafael Espindola <espindola@google.com>
2755
2756 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
2757 non prevailing weak symbols.
2758
27592008-10-24 Rafael Espindola <espindola@google.com>
2760
2761 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
2762
27632008-10-24 Rafael Espindola <espindola@google.com>
2764
2765 * lto-lang.c (input_node): Avoid casts from pointers to ints of
2766 different types.
2767
27682008-10-23 Simon Baldwin <simonb@google.com>
2769
2770 * lto-lang.c (input_node): Save the node reference, rather than the
2771 node pointer, in node->inlined_to.
2772 (input_cgraph_1): Convert node references into node pointers.
2773
27742008-10-22 Diego Novillo <dnovillo@google.com>
2775 Rafael Espindola <espindola@google.com>
2776
2777 * lto.c (lto_resolution_read): Tidy.
2778 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
2779 abort if RET is NULL.
2780
27812008-10-22 Doug Kwan <dougkwan@google.com>
2782
2783 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
2784 exceptions flag is given.
2785 * lto-lang.c: (lto_init_options) Set default exceptions flag.
2786 (lto_init_eh): Remove exceptions flag initialization.
2787 (lto_init): Only call lto_init_eh if exceptions flag is set.
2788
27892008-10-21 Diego Novillo <dnovillo@google.com>
2790
2791 * lto.c: Tidy some formatting.
2792 * lto.h: Likewise.
2793
27942008-10-21 Simon Baldwin <simonb@google.com>
2795
2796 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
2797 them is NULL (but not the other).
2798
27992008-10-17 Diego Novillo <dnovillo@google.com>
2800
2801 * ltrans-driver: Divert output from make to a temporary file.
2802 Show it if the call to make failed.
2803
28042008-10-15 Diego Novillo <dnovillo@google.com>
2805
2806 * lto.c (lto_wpa_write_files): Reformat do-while loop.
2807 Do not print TEMP_FILENAME
2808 * ltrans-driver: Call make with -s.
2809
28102008-10-15 Diego Novillo <dnovillo@google.com>
2811
2812 * lto-symtab.c (lto_symtab_merge_decl): Do not force
2813 TREE_STATIC on global symbols.
2814
28152008-10-14 Ollie Wild <aaw@google.com>
2816
2817 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
2818 (LTRANS_DRIVER_EXE): Add.
2819 (lto.all.cross): Add LTRANS_DRIVER_EXE.
2820 (lto.all.encap): Add LTRANS_DRIVER_EXE.
2821 (lto.install.common): Remove ltrans-driver.
2822 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
2823 (LTRANS_DRIVER_EXE): New build rule.
2824 * config-lang.in (compilers): Add ltrans-driver.
2825
28262008-10-14 Diego Novillo <dnovillo@google.com>
2827
2828 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
2829 of program name.
2830
28312008-10-13 Ollie Wild <aaw@google.com>
2832
2833 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
2834 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
2835 * ltrans-driver (LTRANS_FLAGS): Remove.
2836
28372008-10-08 Doug Kwan <dougkwan@google.com>
2838
2839 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
2840 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
2841 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
2842 from lto_fixup_state to here.
2843 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
2844 just a free-list. Fix up types also. Move decl merging code to
2845 lto_fixup_tree.
2846 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
2847 object.
2848 (lto_fixup_decls): Use another pointer set to avoid multiple
2849 walking of nodes except for DECLs to be replaced. Pass an
2850 lto_fixup_data_t object to tree-walker.
2851
28522008-10-08 Rafael Espindola <espindola@google.com>
2853
2854 * lto-symtab.c (lto_symtab_set_resolution): New.
2855 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
2856 lto_symtab_get_resolution.
2857 (lto_symtab_prevailing_decl): Return decl for non public decls.
2858 (lto_symtab_get_resolution): New.
2859 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
2860
28612008-10-06 Rafael Espindola <espindola@google.com>
2862
2863 * lto-lang.c: Include cgraph.h.
2864 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2865 input_cgraph): Moved from lto-cgraph.c.
2866 (LANG_HOOKS_INPUT_CGRAPH): New.
2867
28682008-10-03 Rafael Espindola <espindola@google.com>
2869
2870 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
2871
28722008-10-03 Rafael Espindola <espindola@google.com>
2873
2874 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
2875 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
2876 prevailing definition. Don't mark TREE_NOTHROW differences.
2877 * lto.c (lto_fixup_tree): New.
2878 (lto_fixup_state): New.
2879 (lto_fixup_state_aux): New.
2880 (free_decl): New.
2881 (lto_fixup_decls): New.
2882 (lto_main): Call lto_fixup_decls.
2883
28842008-10-02 Ollie Wild <aaw@google.com>
2885
2886 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
2887 and Init.
2888 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
2889 * lto-lang.c (lto_post_options): Add validation and fixups for
2890 -fltrans and -fwpa.
2891
28922008-10-02 Rafael Espindola <espindola@google.com>
2893
2894 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
2895 lto_symtab_merge_decl): Return void.
2896 (lto_symtab_prevailing_decl): New.
2897
28982008-09-30 Rafael Espindola <espindola@google.com>
2899
2900 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
2901 defined symbols.
2902 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
2903 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
2904 Check for already defined symbols.
2905 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
2906 (LTO_IDENTIFIER_RESOLUTION): Remove.
2907 (LTO_DECL_RESOLUTION): New.
2908
29092008-09-30 Rafael Espindola <espindola@google.com>
2910
2911 * lto.c (lto_read_decls): Use new input_tree signature.
2912
29132008-09-26 Doug Kwan <dougkwan@google.com>
2914
2915 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
2916 bodies affected by exception attribute merging of DECLs.
2917 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
2918 merging.
2919
29202008-09-25 Rafael Espindola <espindola@google.com>
2921
2922 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
2923 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
2924 * lto-symtab.c (lto_symtab_compatible): New.
2925 (lto_symtab_overwrite_decl): New.
2926 (lto_symtab_merge_decl): Refactor to use the above functions
2927 and the resolution from lang_identifier.
2928 * lto-tree.h: Include plugin-api.h.
2929 (lang_identifier): Add resolution.
2930 (LTO_IDENTIFIER_RESOLUTION): New.
2931
29322008-09-25 Ollie Wild <aaw@google.com>
2933
2934 * lang.opt (fltrans-output-list=): New option.
2935 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
2936
29372008-09-25 Rafael Espindola <espindola@google.com>
2938
2939 * lto.c (lto_resolution_read): Initialize ret;
2940
29412008-09-24 Ollie Wild <aaw@google.com>
2942
2943 * lto.c (sys/mman.h): Move include.
2944 (lto_wpa_write_files): Return a list of written files.
2945 (lto_execute_ltrans): New function.
2946 (lto_main): Call lto_execute_ltrans.
2947 (ltrans-driver): New file.
2948 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
2949 (DEAULT_LTRANS_DRIVER_LEN): New macro.
2950 (lto_init_options): Initialize ltrans_driver.
2951 (lto_handle_option): Fix incorrect default output value.
2952 * lang.opt (fltrans-driver=): New option.
2953 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
2954 (lto.install-common): Add lto/ltrans-driver.
2955
29562008-09-24 Rafael Espindola <espindola@google.com>
2957
2958 * Make-lang.in (LTO_OBJS): Add lto/common.o.
2959 (lto/lto.o): Depend on lto/common.h.
2960 (lto/common.o): New.
2961 * lang.opt (resolution): New.
2962 * lto-lang.c (resolution_file_name): New.
2963 (lto_handle_option): Handle OPT_resolution.
2964 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
2965 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
2966 pass it to lto_symtab_merge_decl.
2967 * lto.c: Include common.h.
2968 (lto_read_decls): Add resolutions and resolutions_size arguments.
2969 Initialize data_in.globals_resolution and
2970 data_in.globals_resolution_size.
2971 (index_and_symbol_resolution): New.
2972 (lto_resolution_read): New.
2973 (lto_file_read): Add argument resolution_file.
2974 Read resolution.
2975 * lto.h (resolution_file_name): New.
2976
29772008-09-23 Rafael Espindola <espindola@google.com>
2978
2979 * common.c: Update description.
2980 * common.h: Update description.
2981
29822008-09-23 Rafael Espindola <espindola@google.com>
2983
2984 * common.c: Moved from lto-plugin.
2985 * common.h: Moved from lto-plugin.
2986
29872008-09-22 Doug Kwan <dougkwan@google.com>
2988
2989 * lto.c (VEC(bitmap,heap)): Declare.
2990 (lto_materialize_function): Handle WAP mode specially.
2991 (lto_add_inline_clones): New.
2992 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
2993 return a bitmap of inlined decls.
2994 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
2995 (lto_main): Call reset_inline_failed to reset inlining states.
2996 Check call-graph after WPA inlining.
2997 * lto-lang.c (lto_init): Do not clear flag_generate_lto
2998 unconditionally.
2999
30002008-09-19 Doug Kwan <dougkwan@google.com>
3001
3002 lto.c (lto_main): Remove unsued wrapper code.
3003 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
3004
30052008-09-19 Rafael Espindola <espindola@google.com>
3006
3007 * lto-symtab.c: Include lto-tree-in.h.
3008 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
3009 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
3010 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
3011
30122008-09-17 Paolo Bonzini <bonzini@gnu.org>
3013 Rafael Avila de Espindola <espindola@google.com>
3014
3015 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
3016 COMPOUND_LITERAL_EXPR_DECL): Remove.
3017 (emit_local_var): Remove.
3018 (lto_expand_expr): Remove.
3019 (lto_staticp): Remove.
3020 (LANG_HOOKS_EXPAND_EXPR): Remove.
3021 (LANG_HOOKS_STATICP): Remove.
3022
30232008-09-11 Diego Novillo <dnovillo@google.com>
3024
3025 * lto-lang.c: Include except.h and libfuncs.h.
3026 (lto_init_eh): New.
3027 (lto_init): Call it.
3028 Set flag_generate_lto to 0.
3029 * Make-lang.in (lto-lang.o): Add dependency on except.h
3030 and libfuncs.h.
3031
30322008-09-09 Bill Maddox <maddox@google.com>
3033
3034 * lto-lang.c: Include header file expr.h.
3035 (COMPOUND_LITERAL_EXPR_DECL_STMT,
3036 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
3037 (emit_local_var): Copied from c-semantics.c.
3038 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
3039 and c_staticp in c-common.c.
3040 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
3041
30422008-09-08 Diego Novillo <dnovillo@google.com>
3043
3044 * lto-lang.c (lto_global_bindings_p): Return 1 during
3045 IPA passes.
3046
30472008-09-07 Diego Novillo <dnovillo@google.com>
3048
3049 * lto.c: Tidy formatting.
3050
30512008-08-04 Bill Maddox <maddox@google.com>
3052
3053 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
3054
30552008-09-03 Doug Kwan <dougkwan@google.com>
3056
3057 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
3058 CIF_OK instead of NULL.
3059
30602008-09-02 Diego Novillo <dnovillo@google.com>
3061 Simon Baldwin <simonb@google.com>
3062
3063 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
3064 c_common_type_for_size.
3065 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
3066 (lto_init): Call linemap_add.
3067 (signed_and_unsigned_types): Remove.
3068
30692008-08-29 Diego Novillo <dnovillo@google.com>
3070
3071 * lto-lang.c (handle_noreturn_attribute): New local function.
3072 (handle_const_attribute): New local function.
3073 (handle_malloc_attribute): New local function.
3074 (handle_pure_attribute): New local function.
3075 (handle_novops_attribute): New local function.
3076 (handle_nonnull_attribute): New local function.
3077 (handle_nothrow_attribute): New local function.
3078 (handle_sentinel_attribute): New local function.
3079 (handle_type_generic_attribute): New local function.
3080 (handle_format_attribute): New local function.
3081 (handle_format_arg_attribute): New local function.
3082 (lto_attribute_table): Declare.
3083 (lto_format_attribute_table): Declare.
3084 (lto_init_attributes): New local function.
3085 (lto_define_builtins): Call it.
3086 Call targetm.init_builtins and build_common_builtin_nodes.
3087 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
3088 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
3089
30902008-08-28 Diego Novillo <dnovillo@google.com>
3091
3092 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
3093 $(GIMPLE_H).
3094 (lto-symtab.o): Add dependency on $(GIMPLE_H).
3095 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
3096 * lto-symtab.c: Include gimple.h.
3097 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
3098 TREE_CHAIN.
3099
31002008-08-27 Doug Kwan <dougkwan@google.com>
3101
3102 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
3103 gt-lto-lto.h): New includes.
3104 (lto_materialize_function): Do not read in function body in WPA mode.
3105 Format a line to fit in 80 columns.
3106 (lto_cgraph_node_sets): New garbage collected variable.
3107 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
3108 New functions.
3109 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
3110 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
3111 variable LTO_SECTION_IN_H.
3112 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
3113 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
3114 with variable LTO_SECTION_IN_H.
3115 * config-lang.in (gtfiles): Add lto/lto.c.
3116 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
3117 merged DECL_RESULT correctly.
3118
31192008-08-26 Bill Maddox <maddox@google.com>
3120
3121 * lto-lang.c Include tree-gimple.h.
3122 (lto_mark_addressable): Call mark_addressable rather than
3123 asserting.
3124 (lto_post_options): Suppress debug info generation.
3125 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
3126
31272008-08-25 Bill Maddox <maddox@google.com>
3128
3129 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
3130 assertion and leave an explanatory comment in its place.
3131
31322008-08-21 Doug Kwan <dougkwan@google.com>
3133
3134 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
3135 of common nodes instead of computing locallly.
3136 (lto_read_in_decl_state): New.
3137 (lto_read_decls): Change code for udpate in struct lto_decl_header.
3138 Read global and per-function in-decl states.
3139 * Make-lang.in (LTO_H): Update dependency.
3140 (lto/lto.o): Same.
3141 (lto-symtab.c): Merge (revision 139039)
3142 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
3143
31442008-08-21 Rafael Espindola <espindola@google.com>
3145
3146 * config-lang.in (target_libs): New.
3147
31482008-08-20 Bill Maddox <maddox@google.com>
3149
3150 * lto.c (current_lto_file): Remove GTY marker from static
3151 variable. Remove include of file gt-lto-lto.h.
3152 * Make-lang.in: Remove dependency of lto/lto.o on
3153 gt-lto-lto.h.
3154 * lto-elf.c (lto_file_close): Removed.
3155 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3156 allocate lto_elf_file object.
3157 (lto_elf_file_close): Free lto_elf_file object after close.
3158 * lto.h (struct lto_file_struct): Remove GTY marker.
3159 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3160 gtfiles.
3161
31622008-08-20 Bill Maddox <maddox@google.com>
3163
3164 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3165 to conform to its new signature.
3166 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3167 on discarded node here, now called in global_vector_fixup.
3168
31692008-08-09 Bill Maddox <maddox@google.com>
3170
3171 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3172 has not been set to a front-end-specific value.
3173
31742008-08-05 Doug Kwan <dougkwan@google.com>
3175
3176 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3177 build breakage.
3178
31792008-07-30 Bill Maddox <maddox@google.com>
3180
3181 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3182 Remove obsolete comments.
3183 (lto_read_decls): Remove initialization of deleted field data_in.global.
3184 Tidy up comments.
3185 (lto_main): Remove redundant initialization of section_hash_table.
3186 * lto-elf.c: Removed obsolete comments.
3187 * lto.h: Tidy up comments.
3188 * lto-symtab.c (lto_least_common_multiple): New function.
3189 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3190 Tidy up comments.
3191
31922008-07-25 Diego Novillo <dnovillo@google.com>
3193 Bill Maddox <maddox@google.com>
3194
3195 * lto.c: Re-order include files.
3196 Include lto-section-out.h.
3197 (preload_common_nodes): Add debugging output.
3198 Add new local INDEX_TABLE.
3199 Call preload_common_node.
3200 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3201
32022008-07-13 Bill Maddox <maddox@google.com>
3203
3204 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3205 unwanted scaling during pointer addition.
3206
32072008-07-11 Bill Maddox <maddox@google.com>
3208 Diego Novillo <dnovillo@google.com>
3209
3210 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3211 Make code const-correct.
3212 (lto_file_read): Fix C++ compatibility warnings.
3213 (lto_read_section_data): Fix C++ compatibility warnings.
3214 (lto_get_section_data): Use CONST_CAST to avoid warning when
3215 const pointer passed to free.
3216 * lto-elf.c (lto_elf_build_section_table): Fix C++
3217 compatibility warnings.
3218 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3219 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3220 (lto_get_current_out_file): Fix C++ compatibility warnings.
3221
32222008-07-11 Diego Novillo <dnovillo@google.com>
3223
3224 * Make-lang.in (lto-warn): Define.
3225
32262008-07-03 Simon Baldwin <simonb@google.com>
3227
3228 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3229 LTO_STREAM_DEBUGGING.
3230
32312008-06-27 Ollie Wild <aaw@google.com>
3232
3233 * lto-elf.c (lto-section-out.h): New include.
3234 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3235 and data members.
3236 (cached_file_attrs): New static variable.
3237 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3238 Use cached_file_attrs for checking bits.
3239 (lto_elf_build_section_table): Remove elf_file argument from
3240 lto_elf_get_shdr and lto_elf_free_shdr calls.
3241 (DEFINE_INIT_SHDR): New macro.
3242 (init_shdr32, init_shdr64): New functions defined via the
3243 DEFINE_INIT_SHDR macro.
3244 (lto_elf_begin_section_with_type): New function.
3245 (lto_elf_begin_section): New function.
3246 (lto_elf_append_data): New function.
3247 (lto_elf_end_section): New function.
3248 (DEFINE_VALIDATE_EHDR): New macro.
3249 (validate_ehdr32, validate_ehdr64): New functions defined via the
3250 DEFINE_VALIDATE_EHDR macro.
3251 (validate_file): New function.
3252 (DEFINE_INIT_EHDR): New macro.
3253 (init_ehdr32, init_ehdr64): New functions defined via the
3254 DEFINE_INIT_EHDR macro.
3255 (init_ehdr): New function.
3256 (lto_elf_file_open): Add support for writable files. Move some
3257 validation logic to validate_file.
3258 (lto_elf_file_close): Add support for writable files. Write file data
3259 and free data blocks.
3260 (current_out_file): New static variable.
3261 (lto_set_current_out_file): New function.
3262 (lto_get_current_out_file): New function.
3263 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3264 Add temporary initialization for testing ELF serialization.
3265 * lto.h (lto-section-out.h): New include.
3266 (struct lto_file_struct): Slight modification to comment.
3267 (lto_elf_file_open): Add writable parameter.
3268 (lto_elf_begin_section): New function declaration.
3269 (lto_elf_append_data): New function declaration.
3270 (lto_elf_end_section): New function declaration.
3271 (lto_set_current_out_file, lto_get_current_out_file): New function
3272 declarations.
3273 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3274 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3275 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3276 * Make-lang.in (LTO_H): Add lto-section-out.h.
3277
32782008-06-12 Ollie Wild <aaw@google.com>
3279
3280 * lto.h (struct lto_file_vtable_struct): Remove.
3281 (struct lto_file_struct): Remove vtable member.
3282 * lto-elf.c (lto_file_init): Remove vtable argument.
3283 (lto_elf_map_optional_lto_section): Remove.
3284 (lto_elf_unmap_section): Remove.
3285 (lto_elf_file_vtable): Remove.
3286 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3287 lto_file_init call.
3288 (lto_elf_find_section_data): Remove.
3289
32902008-06-11 Ollie Wild <aaw@google.com>
3291
3292 * lto.c (lto_file_read): Add const qualifier to data variable.
3293
32942008-06-11 Diego Novillo <dnovillo@google.com>
3295
3296 Merge from lto-streamber sub-branch.
3297
3298 2008-06-04 Ollie Wild <aaw@google.com>
3299
3300 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
3301 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
3302
3303 2008-05-28 Bill Maddox <maddox@google.com>
3304
3305 Replace the DWARF reader in the LTO front-end.
3306
3307 * lto.c: Include lto-tree-in.h, lto-tags.h.
3308 (enum DWARF2_class, DW_cl_constant, struct
3309 DWARF2_form_data, struct lto_context,
3310 lto_fd_init, lto_info_fd_init,
3311 lto_abbrev_fd_init, lto_info_fd_close,
3312 lto_file_init, lto_file_close,
3313 lto_file_corrupt_error, lto_abi_mismatch_error,
3314 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
3315 lto_read_uleb128, lto_read_sleb128,
3316 lto_read_initial_length, lto_abbrev_read_attrs,
3317 lto_abbrev_read, lto_abbrev_read_lookup,
3318 lto_read_section_offset,
3319 lto_read_comp_unit_header, find_cu_for_offset,
3320 lto_get_file_name,
3321 lto_resolve_reference,lto_read_form,
3322 attribute_value_as_int,
3323 make_signed_host_wide_int,
3324 attribute_value_as_constant, lto_cache_hash,
3325 lto_cache_eq, lto_cache_store_DIE,
3326 lto_cache_lookup_DIE, lto_find_integral_type,
3327 lto_find_integral_type_1,
3328 LTO_BEGIN_READ_ATTRS_UNCHECKED,
3329 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
3330 lto_unsupported_attr_error, lto_get_identifier,
3331 lto_read_referenced_type_DIE,
3332 lto_read_compile_unit_DIE,
3333 lto_read_array_type_DIE,
3334 lto_read_structure_union_class_type_DIE,
3335 lto_read_enumerator_DIE,
3336 lto_read_enumeration_type_DIE,
3337 lto_read_only_for_child_DIEs,
3338 lto_read_only_for_child_DIEs,
3339 lto_read_member_DIE, lto_read_abbrev,
3340 lto_read_variable_formal_parameter_constant_DIE,
3341 lto_get_body): Removed.
3342 (preload_common_nodes): New function.
3343 (lto_read_decls): Convert for new global streamer.
3344 (lto_materialze_file_data,
3345 lto_read_subroutine_type_subprogram_die,
3346 lto_read_unspecified_parameters_DIE,
3347 lto_read_typedef_DIE,
3348 lto_read_pointer_reference_type_DIE,
3349 lto_read_subrange_type_DIE,
3350 lto_read_base_type_DIE,
3351 lto_read_const_volatile_restrict_type_DIE,
3352 lto_read_namespace_DIE,
3353 lto_read_unspecified_type_DIE, lto_read_DIE,
3354 lto_read_child_DIEs, lto_collect_child_DIEs):
3355 Removed.
3356 (lto_info_read, lto_set_cu_context): Removed.
3357 (lto_file_read): Convert for new global streamer.
3358 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
3359 lto_resolve_var_ref, lto_resolve_fn_ref,
3360 lto_resolve_field_ref, lto_resolve_typedecl_ref,
3361 lto_resolve_namespacedecl_ref): Removed.
3362 (lto_file_init, lto_file_close): Moved to lto-elf.c.
3363 * lto-tree.h (lto_symtab_merge_var,
3364 lto_symtab_mergee_fun): Declare here.
3365 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
3366 (lto_elf_file_open): Removed code to read DWARF debug sections.
3367 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
3368 DWARF2_CompUnit, lto_die_ptr,
3369 lto_die_cache_entry, lto_fd, lto_info_fd,
3370 lto_abbrev_fd): Removed.
3371 (lto_file): Removed debug_info and debug_abbrev fields.
3372 (lto_ref): Removed.
3373 (lto_file_init, lto_file_close,
3374 lto_resolve_type_ref, lto_resolve_var_ref,
3375 lto_resolve_fn_ref, lto_resolve_field_ref,
3376 lto_resolve_typedecl_ref,
3377 lto_resolve_namespacedecl_ref,
3378 lto_get_file_name): Removed declarations.
3379 (lto_symtab_merge_var, lto_symtab_merge_fn):
3380 Declarations moved to lto-tree.h.
3381 * lto-symtab.c (lto_compatible_attributes_p):
3382 Lobotomize this, as it barfs on "Hello, world!".
3383 * lto-section-out.c: Include lto-tree-out.h.
3384 (lto_hash_global_slot_node,
3385 lto_eq_global_slot_node, preload_common_nodes,
3386 write_global_stream, write_global_references):
3387 New functions.
3388 (produce_asm_for_decls): Convert for new global streamer.
3389 * lto-section-out.h (lto_hash_global_slot_node,
3390 lto_eq_global_slot_node): Declare.
3391
33922008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
3393 Jan Hubicka <jh@suse.cz>
3394
3395 * lto.c (sys/mman.h, tree-pass.h): New includes.
3396 (lto_materialize_constructors_and_inits,
3397 lto_materialize_function): Keeps length of section.
3398 (lto_materialize_cgraph): Removed.
3399 (lto_read_decls): Initialize fd field.
3400 (lto_file_read): Different return type and removed much code to
3401 lto_main.
3402 (page_mask): New variable.
3403 (lto_read_section_data, get_section_data, free_section_data): New
3404 functions.
3405 (lto_main): Now calls pass manager, sets the hooks so that the ipa
3406 passes can get the section data.
3407
34082008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
3409
3410 * lto.h (lto_read_decls): Made local.
3411 (lto_input_function_body, lto_input_constructors_and_inits,
3412 lto_input_cgraph): Declarations moved to lto-section-in.h.
3413 * lto-section-in.c: Moved to .. .
3414 * lto-cgraph-in.c: Ditto.
3415 * lto-section-in.h: Ditto.
3416 * lto-function-in.c: Ditto.
3417 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
3418 (lto_insert_block): Removed.
3419 (LANG_HOOKS_INSERT_BLOCK): Removed.
3420 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
3421 lto-section-in.o): Rules moved to lto/Makefile.in.
3422
3423
34242008-05-16 Ollie Wild <aaw@google.com>
3425
3426 * lto-lang.c (tree-inline.h): Include.
3427 (lto_post_options): New function.
3428 (LANG_HOOKS_POST_OPTIONS): Define.
3429 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
3430 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
3431
34322008-05-13 Diego Novillo <dnovillo@google.com>
3433
3434 * lto-function-in.c (input_ssa_names): Call
3435 make_ssa_name_fn instead of make_ssa_name.
3436
34372008-05-12 Diego Novillo <dnovillo@google.com>
3438
3439 * lto-cgraph-in.c (overwrite_node): Update references to
3440 inline summary fields.
3441 * lto-function-in.c (input_expr_operand): Do not handle
3442 STRUCT_FIELD_TAG.
3443
34442008-05-09 Ollie Wild <aaw@google.com>
3445
3446 * lang.opt: New file.
3447 * lto-lang.c (lto_init_options): New function.
3448 (lto_handle_option): New function.
3449 (lto_init): Move initialization of flag_unit_at_a_time to
3450 lto_init_options.
3451 (LANG_HOOKS_INIT_OPTIONS): Define.
3452 (LANG_HOOKS_HANDLE_OPTION): Define.
3453
34542008-04-29 Ollie Wild <aaw@google.com>
3455
3456 * lto.c (lto_read_namespace_DIE): New function.
3457 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
3458 NAMESPACE_DECL DIE's.
3459 (lto_resolve_namespacedecl_ref): New function.
3460 * lto.h (lto_resolve_namespacedecl_ref): New function.
3461 * lto-section-in.c (lto_read_decls): Read namespace declarations.
3462 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
3463 and num_namespace_decls.
3464 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
3465 * lto-lang.c (lto_init_ts): New function.
3466 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
3467
34682008-04-16 Ollie Wild <aaw@google.com>
3469
3470 * lto-function-in.c (input_type_ref): Updated function description.
3471
34722008-04-16 Ollie Wild <aaw@google.com>
3473
3474 * lto-function-in.c (input_type_ref_1): New function.
3475 (input_type_ref): Split into two functions.
3476 (input_function): Add support for type contexts.
3477
34782008-04-16 Ollie Wild <aaw@google.com>
3479
3480 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
3481 section name
3482
34832008-04-16 Ollie Wild <aaw@google.com>
3484
3485 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
3486 list of supported languages.
3487
34882008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
3489
3490 Merge with mainline @133491.
3491
34922008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
3493 Jan Hubicka <jh@suse.cz>
3494
3495 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
3496 fd->unmaterialized_fndecls.
3497 (lto_get_file_name, lto_materialize_cgraph): New function.
3498 (lto_materialize_constructors_and_inits,
3499 lto_materialize_function): Read info directly from elf file.
3500 (lto_file_read): Made local and initialize dictionary so that
3501 other lto sections can be read without reprocessing the elf file.
3502 (lto_main): Read all functions after all files have been processed
3503 for their types, globals and cgraph.
3504 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
3505 dependencies.
3506 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
3507 (hash_name, eq_name, lto_elf_build_section_table): New functions.
3508 (lto_elf_read_symtab): Removed function.
3509 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
3510 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
3511 (lto_file_read): Made local.
3512 (lto_get_file_name, lto_elf_build_section_table,
3513 lto_input_cgraph):
3514 New function.
3515 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
3516 New functions.
3517 (lto_read_decls): Get the file name.
3518 * lto-cgraph-in.c: New file.
3519 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
3520 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
3521 (input_labels): Fixed latent sizeof issue.
3522 (input_function): Build stmt array to set call sites into cgraph
3523 edges.
3524 (lto_read_body): Reset cfun->curr_properties.
3525 * lto_section_in.h (lto_section_slot): New structure.
3526 (section_hash_table.lto_file_decl_data): New field.
3527
3528
35292008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
3530
3531 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
3532 reconstruct static initializers.
3533 (lto_get_body, lto_materialize_function): Add lto_section_type as
3534 a parameter.
3535 (lto_materialize_constructors_and_inits,
3536 lto_materialize_file_data): New function.
3537 (lto_materialize_function,
3538 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
3539 unmap_section and map_fn_body to map_section.
3540 (lto_set_cu_context): Process functions and static inits
3541 differently.
3542 * Make-lang.in (LTO_H, lto/lto-function-in.o,
3543 lto/lto-section-in.o): Update dependencies.
3544 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
3545 lto_section_type parameter.
3546 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
3547 * lto.h (lto_file_vtable_struct): Removed two of the fields and
3548 renamed the other two so that there is only one map function and
3549 one unmap function and each takes a section type parameter.
3550 (lto_read_function_body): Renamed to lto_input_function_body and
3551 added file_data parameter.
3552 (lto_read_var_init): Removed.
3553 (lto_input_constructors_and_inits): New function.
3554 * lto-section-in.c (lto_read_decls): New function.
3555 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
3556 var_decls, type_decls, types to lto_file_decl_data.
3557 (input_type_ref, input_expr_operand, lto_read_body): Get
3558 field_decls, fn_decls, var_decls, type_decls, types from different
3559 structure.
3560 (input_globals, input_constructor, lto_read_var_init): Removed.
3561 (input_constructors_or_inits): New function.
3562 (lto_read_function_body, lto_input_constructors_and_inits):
3563 Renamed to lto_input_function_body and takes file_data parameter.
3564 * lto-section-in.h (lto_file_decl_data): New structure.
3565
35662008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3567
3568 * lto-function-in.c (input_globals.c): Changed input type to
3569 lto_function_header.
3570 (input_bb): Removed code to deserialize the stmt number.
3571 (input_function): Renumber all stmts after they are input.
3572 (lto_read_body, lto_read_function_body, lto_read_var_init):
3573 Changed to used new header format and enum section_type.
3574 *lto-lang.c (success): Removed.
3575
35762008-01-28 Nathan Froyd <froydnj@codesourcery.com>
3577
3578 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
3579 (lto_elf_free_sym): Likewise.
3580
3581 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
3582 (lto_elf_build_init): Likewise.
3583
35842008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
3585
3586 * lto-read.c: Renamed to lto-function-in.c.
3587 (input_1_unsigned): Moved to lto-section-in.c and renamed
3588 lto_input_1_unsigned.
3589 (input_uleb128): Moved to lto-section-in.c and renamed
3590 lto_input_uleb128.
3591 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
3592 lto_input_widest_uint_uleb128.
3593 (input_sleb128): Moved to lto-section-in.c and renamed
3594 lto_input_sleb128.
3595 (input_integer): Moved to lto-section-in.c and renamed
3596 lto_input_integer.
3597 (debug_in_fun): Moved to lto-section-in.c and renamed
3598 lto_debug_in_fun.
3599 (input_block): Moved to lto-section-in.h and renamed
3600 lto_input_block.
3601 (input_expr_operand): Fixed to allow lists with more than one
3602 element.
3603 * lto-section-in.h: New file.
3604 * lto-section-in.c: New file with changes from above.
3605 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
3606 (lto-section-in.o): New rule.
3607
36082007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3609
3610 * lto-read.c (input_expr_operand): Mark static and external
3611 VAR_DECLs as needed.
3612
36132007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3614
3615 * lto-read.c (input_integer): Use the correct shift amount.
3616
36172007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3618
3619 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
3620 (LANG_HOOKS_NAME): Define.
3621
36222007-12-27 Nathan Froyd <froydnj@codesourcery.com>
3623
3624 * lto.c (lto_find_integral_type): Define as a macro. Rename the
3625 original function to...
3626 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
3627 don't have a base type.
3628 (lto_read_enumeration_type_DIE): Examine the values of the
3629 enumeration to determine whether we can use an unsigned type for
3630 the base type of the enumeration.
3631
36322007-12-24 Nathan Froyd <froydnj@codesourcery.com>
3633
3634 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
3635 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
3636
36372007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3638
3639 * lto-lang.c (lto_types_compatible_p): New function.
3640 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
3641
36422007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3643 Kenneth Zadeck <zadeck@naturalbridge.com>
3644
3645 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
3646 (input_local_vars): Read in DECL_INITIAL and context for local
3647 statics that need to be put in unexpanded_vars_list.
3648
36492007-12-21 Nathan Froyd <froydnj@codesourcery.com>
3650
3651 * lto-read.c (input_real): Use a separate null-terminated buffer
3652 for calling real_from_string.
3653 (input_expr_operand): If we take the address of a FUNCTION_DECL,
3654 tell cgraph that it's needed.
3655
36562007-12-19 Doug Kwan <dougkwan@google.com>
3657
3658 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
3659
36602007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3661
3662 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
3663 (lto_file_read): Reset the members of 'context' every time we read
3664 a toplevel DIE, with special attention to last_param_type.
3665
36662007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3667
3668 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
3669 'declaration'. Set the assembler name for non-public functions.
3670
36712007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
3672
3673 * lto_read.c (data_in.unexpanded_indexes): New array.
3674 (input_local_var): Added code to read in unexpanded_var_list
3675 indexes for variables. Only read in DECL_CHAIN field for
3676 parameters.
3677 (input_local_vars): Added code to rebuild unexpanded_var_list in
3678 order using unexpanded_indexes.
3679 (input_function): Added code to set DECL_CONTEXT for functions.
3680
36812007-12-13 Doug Kwan <dougkwan@google.com>
3682
3683 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
3684 in pointer and reference types.
3685
36862007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3687
3688 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
3689 RESULT_DECL.
3690
36912007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3692
3693 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
3694 already read the DIE.
3695 (lto_get_body): New function, split out from...
3696 (lto_materialize_function): ...here. Call it.
3697 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
3698 determine DECL_EXTERNAL.
3699 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
3700 FUNCTION_DECLs when necessary. Use the type of the actual
3701 function definition if we are unable to easily merge types. Ignore
3702 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
3703 necessary.
3704
37052007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3706
3707 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
3708
37092007-12-12 Bill Maddox <maddox@google.com>
3710
3711 Revert
3712 2007-12-07 Bill Maddox <maddox@google.com>
3713
3714 * lto.c (lto_str_fd_init): New function.
3715 (lto_str_fd_close): New function.
3716 (lto_file_init): Call lto_str_fd_init.
3717 (lto_file_close): Call lto_str_fd_close.
3718 (lto_str_read): New function. Read debug string table.
3719 (lto_str_lookup): New function. Get string for debug
3720 string table offset.
3721 (lto_read_form): Recognize DW_FORM_strp.
3722 (lto_file_read): Invoke lto_str_read.
3723
3724 * lto-elf.c (lto_elf_file_open): Read raw section data
3725 for the .debug_str section, if present.
3726
3727 * lto.h (struct lto_str_fd_struct): New struct.
3728 (struct lto_file_struct): Added new field DEBUG_STR
3729 to hold the file descriptor for the debug string table.
3730
37312007-12-07 Bill Maddox <maddox@google.com>
3732
3733 * lto.c (lto_str_fd_init): New function.
3734 (lto_str_fd_close): New function.
3735 (lto_file_init): Call lto_str_fd_init.
3736 (lto_file_close): Call lto_str_fd_close.
3737 (lto_str_read): New function. Read debug string table.
3738 (lto_str_lookup): New function. Get string for debug
3739 string table offset.
3740 (lto_read_form): Recognize DW_FORM_strp.
3741 (lto_file_read): Invoke lto_str_read.
3742
3743 * lto-elf.c (lto_elf_file_open): Read raw section data
3744 for the .debug_str section, if present.
3745
3746 * lto.h (struct lto_str_fd_struct): New struct.
3747 (struct lto_file_struct): Added new field DEBUG_STR
3748 to hold the file descriptor for the debug string table.
3749
37502007-12-07 Nathan Froyd <froydnj@codesourcery.com>
3751
3752 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
3753 Grow the basic_block_info and label_to_block_map vectors if
3754 necessary. Read in the block chain.
3755
37562007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3757
3758 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
3759
37602007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3761
3762 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
3763
37642007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3765
3766 * lto-read.c (input_expr_operand): Don't check for MTAGs.
3767 (lto_read_body): Don't declare PROP_alias.
3768
37692007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3770
3771 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
3772 argument type information.
3773
37742007-12-03 Nathan Froyd <froydnj@codesourcery.com>
3775
3776 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3777 TREE_THIS_VOLATILE if the associated type is a volatile type.
3778 (lto_materialize_function): Remove call to init_ssa_operands.
3779 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
3780 variable when reading an SSA_NAME. Do the same when reading a
3781 RESULT_DECL, a RETURN_EXPR, or an MTAG.
3782 (input_cfg): Call init_ssa_operands.
3783 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
3784 Move call to init_tree_ssa...
3785 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
3786 add_referenced_var on any variables referenced from the body of the
3787 function. Inform the rest of the compiler we are in SSA form and
3788 inform later passes about the current properties.
3789
37902007-11-30 Nathan Froyd <froydnj@codesourcery.com>
3791
3792 * lto.c (lto_materialize_function): Add FIXME.
3793
37942007-11-29 Nathan Froyd <froydnj@codesourcery.com>
3795
3796 * lto-lang.c (enum built_in_attribute): New enum.
3797 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
3798 built_in_attributes): New variables.
3799 (def_builtin_1): New function.
3800 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
3801
38022007-11-28 Nathan Froyd <froydnj@codesourcery.com>
3803
3804 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3805 DECL_SOURCE_LOCATION for debugging purposes.
3806 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
3807 bitfield, use the type specified by the DIE for TREE_TYPE and defer
3808 laying out the decl until later.
3809 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
3810 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
3811 TREE_ADDRESSABLE.
3812 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
3813 operand of an ADDR_EXPR.
3814 * lto-lang.c (enum lto_builtin_type): New enum.
3815 (builtin_type): New typedef.
3816 (builtin_types, string_type_node, const_string_type_node,
3817 wint_type_node, intmax_type_node, uintmax_type_node,
3818 signed_size_type_node): New variables.
3819 (def_fn_type, builtin_type_for_size, lto_define_builtins,
3820 lto_build_c_type_nodes): New functions.
3821 (lto_init): Initialize builtin types.
3822 (lto_set_decl_assembler_name): Let the target machine mangle the
3823 name if the decl is TREE_PUBLIC, otherwise uniquify it.
3824
38252007-11-21 Nathan Froyd <froydnj@codesourcery.com>
3826
3827 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
3828 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
3829 the type is a constant type. Set the assembler name and inform
3830 the rest of the compiler about the new decl if the decl is not
3831 public.
3832 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
3833 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
3834 try to read in function bodies for functions that already have bodies.
3835 * lto-symtab.c (lto_same_type_p): Check for unbounded array
3836 equivalency.
3837 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
3838 Check for whether we matched a builtin function type before calling
3839 lto_same_type_p on the generated type. Permit cases where the
3840 declaration of an array is unbounded, but the definition is bounded.
3841 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
3842 DECL_SIZE_UNIT if necessary.
3843
38442007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3845
3846 * lto-read.c (input_expr_operand): Get types right
3847 for COMPLEX_CST.
3848
38492007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3850
3851 * lto-read.c (make_new_block, input_cfg): Properly set
3852 n_basic_blocks.
3853
38542007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3855
3856 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
3857 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
3858
38592007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3860
3861 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
3862 construct the integer type for bitfields.
3863
38642007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3865
3866 * lto-read.c (data_in.current_node_has_loc): Removed.
3867 (input_line_info): Returns true if node needs line set.
3868 (set_line_info): Always sets line if called.
3869 (clear_line_info): Removed reference to current_node_needs_loc.
3870 (input_expr_operand): Keeps track locally if current node needs a loc.
3871 (input_local_var): Added code to handle DECL_INITIAL for
3872 static local vars. Only set loc if necessary.
3873
38742007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3875
3876 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
3877 DECL_CONTEXT.
3878
38792007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3880
3881 * lto.c: Include langhooks.h.
3882 (lto_find_integral_type): Rework logic to handle the case where
3883 got_byte_size is true, but the bitsize requested and that of the
3884 base_type doesn't match.
3885 (lto_read_variable_formal_parameter_constant_DIE): Only check for
3886 asm_name if we are creating a VAR_DECL.
3887 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
3888 definition.
3889 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
3890 function reference and use the builtin's decl if so. Set the
3891 DECL_CONTEXT of the RESULT_DECL for the function.
3892 * lto-lang.c (registered_builtin_fndecls): New variable.
3893 (lto_getdecls): Return it.
3894 (lto_builtin_function): Chain the new decl onto
3895 registered_builtin_fndecls.
3896
38972007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
3898
3899 * lto-read.c (process_tree_flags, lto_static_init_local):
3900 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
3901 (input_line_info, clear_line_info): Fixed new line number code.
3902 (input_expr_operand): Added type to SWITCH_EXPR.
3903 (lto_read_body): Properly initialized data_in.
3904 Clear line info when leaving.
3905
39062007-11-13 Diego Novillo <dnovillo@google.com>
3907
3908 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3909 Initialize ARTIFICIAL.
3910 (lto_read_subroutine_type_subprogram_DIE): Initialize
3911 SAVED_SCOPE.
3912 * lto-read.c (set_line_info): Remove ; from calls to
3913 LINEMAP_POSITION_FOR_COLUMN.
3914
39152007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3916
3917 * lto-read.c (input_type_ref): Renamed from get_type_ref.
3918 (input_expr_operand, input_local_var): Renamed get_type_ref to
3919 input_type_ref.
3920 (input_expr_operand): Get the types correct for
3921 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
3922
39232007-11-13 Doug Kwan <dougkwan@google.com>
3924
3925 * lto-read.c (input_widest_uint_uleb128): New function.
3926 (input_tree_flags, process_tree_flags, input_line_info,
3927 input_expr_operand, input_local_var, input_phi, input_ssa_names):
3928 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
3929 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
3930 (lto_static_init_local): Add code to assert that lto_flags_type is
3931 wide enough.
3932
39332007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3934
3935 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
3936 (lto_read_subroutine_type_subprogram_DIE): Handle
3937 DW_AT_static_link and DW_AT_specification. Return the
3938 specification if present.
3939 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
3940
39412007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3942
3943 * lto-lang.c: Include target.h.
3944 (registered_builtin_types): New variable.
3945 (lto_type_for_mode): Increase number of modes handled.
3946 (lto_builtin_function): Fix argument list and return the decl.
3947 (lto_register_builtin_type): New function.
3948 (lto_init): Initialize target builtins and language-independent
3949 nodes.
3950 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
3951
39522007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3953
3954 * lto-read.c (input_expr_operand): Added code to properly handle
3955 index filed. Added new RANGE_EXPR case.
3956
39572007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3958
3959 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
3960 (data_in): Added current_node_has_loc field.
3961 (input_line_info, set_line_info, clear_line_info): Added a support
3962 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
3963 did not have on on the source side.
3964 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
3965 numbers too.
3966
39672007-11-09 Doug Kwan <dougkwan@google.com>
3968
3969 * lto-read.c (input_expr_operand): Change type of operand 2 of
3970 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
3971
39722007-11-09 Nathan Froyd <froydnj@codesourcery.com>
3973
3974 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
3975 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
3976 from a DW_AT_specification or DW_AT_abstract_origin attribute to
3977 the new decl we are creating. Move informing the middle end about
3978 the new decl to...
3979 (lto_main): ...here. Inform the middle end about global variables
3980 after we have read in all the input files.
3981 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
3982 variables with internal linkage, so delete the check for internal
3983 linkage. Combine TREE_PUBLIC flags.
3984
39852007-11-08 Nathan Froyd <froydnj@codesourcery.com>
3986
3987 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3988 DW_AT_decl_line.
3989 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
3990 builtin specially. Move check for attribute compatibility
3991 earlier.
3992
39932007-11-07 Nathan Froyd <froydnj@codesourcery.com>
3994
3995 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
3996 * config-lang.in (gtfiles): Add lto.h and lto.c.
3997 * lto-elf.c: Include ggc.h.
3998 (lto_elf_file_open): Allocate elf_file from GC memory.
3999 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
4000 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
4001 in GC memory.
4002 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
4003 (lto_file_close): Free file from GC memory.
4004 (lto_cache_store_DIE): Allocate the new entry in GC memory.
4005 (lto_read_member_DIE): Fix declaration.
4006 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
4007 in GC memory.
4008 (current_lto_file): New variable.
4009 (lto_main): Use it.
4010 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
4011 lto_die_cache_entry): Move to...
4012 * lto.h: ...here and add GTY markers as appropriate. Delete forward
4013 declarations accordingly.
4014 (struct lto_file_struct): Declare.
4015 (lto_file_vtable): Use it instead of lto_file.
4016
40172007-11-06 Alon Dayan <alond@il.ibm.com>
4018 Kenneth Zadeck <zadeck@naturalbridge.com>
4019
4020 * lto-read.c (process_flags, lto_static_init_local):
4021 read flags of VAR_DECL and FUNCTION_DECL of size>1.
4022 change global array num_flags_for_code to flags_length_for_code.
4023 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
4024
40252007-11-05 Nathan Froyd <froydnj@codesourcery.com>
4026
4027 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
4028 layout functions to compute information about the newly constructed
4029 type.
4030
40312007-11-02 Nathan Froyd <froydnj@codesourcery.com>
4032
4033 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
4034 case to use DECL_RESULT if necessary.
4035
40362007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4037
4038 * lto-read.c (input_tree_list): Removed.
4039 (input_tree_flags): Added parameter to force flags no matter what
4040 tree code.
4041 (input_expr_operand): Added parameter to input_tree_flags.
4042 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
4043 input_expr_operand rather than input_tree_lists.
4044 (input_local_var): Use input_expr_operand to read attributes
4045 rather then input_tree_list.
4046 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
4047
40482007-10-31 Nathan Froyd <froydnj@codesourcery.com>
4049
4050 * lto.c (lto_read_typedef_DIE): Fix comment typo.
4051 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
4052 TYPE_DECL for it.
4053 * lto-read.c (lto_read_body): Use correct sizes for calculating
4054 type_decls_offset and types_offset.
4055
40562007-10-30 Nathan Froyd <froydnj@codesourcery.com>
4057
4058 * lto-tree.h (union lang_tree_node): Change GTY description to chain
4059 with GENERIC_NEXT.
4060 * config-lang.in (gtfiles): Add lto-lang.c.
4061 * lto-lang.c: Include gt-lto-lto-lang.h.
4062 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
4063 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
4064 (lto/lto-read.o): Likewise.
4065
40662007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4067
4068 * lto-read.c (data_in): Added type_decls and current_col fields.
4069 (string_slot): New type to hold canonized file name.
4070 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
4071 input_line_info, set_line_info, clear_line_info): New functions.
4072 (file_name_hash_table): New hash table.
4073 (input_local_var, input_labels, input_local_vars_index,
4074 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
4075 (input_uleb128): Changed type of byte var.
4076 (input_expr_operand): Large number of changes to get line numbers
4077 correct. Added TYPE_DECL case.
4078 (input_globals): Added code to get TYPE_DECLs processed.
4079 (input_local_var): Added code to process line numbers and
4080 TREE_CHAIN and DECL_CONTEXT.
4081 (input_function, input_constructor): Added call to
4082 clear_line_number.
4083 (lto_static_init_local): Added code to get line numbers correct.
4084 (lto_read_body): Added code to get TYPE_DECLS read and to change
4085 parameters to the calls above that had their parms reorganized.
4086
4087
40882007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4089
4090 * lto.h (lto_resolve_typedecl_ref): Declare.
4091 * lto.c (lto_resolve_typedecl_ref): New function.
4092
40932007-10-29 Mark Mitchell <mark@codesourcery.com>
4094 Nathan Froyd <froydnj@codesourcery.com>
4095
4096 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
4097 DIEs even if we find an abstract origin for this DIE.
4098
40992007-10-29 Nathan Froyd <froydnj@codesourcery.com>
4100
4101 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
4102 RESULT_DECL slightly earlier. Only remember the decl for later
4103 if we successfully merge declarations.
4104
41052007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
4106
4107 * lto-read.c (input_expr_operand): Give label_values the proper
4108 context and provide switch statements with a default type.
4109
41102007-10-23 Nathan Froyd <froydnj@codesourcery.com>
4111
4112 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
4113 * lto.c (lto_materialize_function): ...to here.
4114
41152007-10-22 Nathan Froyd <froydnj@codesourcery.com>
4116
4117 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
4118 * lto.c (lto_info_fd_init): Initialize it.
4119 (lto_info_fd_close): Free it.
4120 (lto_materialize_function): New function.
4121 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
4122 unmaterialized_fndecls.
4123 (lto_file_read): Read in all the function bodies after we have read
4124 all of the DWARF info.
4125 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
4126 reading a function body.
4127
41282007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4129
4130 * lto-read.c (input_tree_flags): Renamed from input_flags to be
4131 semetric with output_tree_flags. Added call to log flags.
4132 (process_tree_flags): Renamed from process_flags. Fixed a lot of
4133 type issues to make everything consistent with flags being
4134 unsigned HOST_WIDE_INTS.
4135 (input_expr_operand): Added call to
4136 recompute_tree_invariant_for_addr_expr.
4137 (input_local_var): Added debugging for tree_chains. Now calls
4138 input_tree_flags.
4139 (input_phi): Made flags unsigned HOST_WIDE_INT.
4140 (input_ssa_names): Now calls input_tree_flags.
4141 (lto_read_body): Now sets cfun.
4142 (lto_read_function_body): Now sets current_function_pointer.
4143
41442007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4145
4146 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
4147 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
4148 inspecting fields within.
4149 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4150 handle this appropriately.
4151
41522007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4153
4154 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4155 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4156 both DW_AT_abstract_origin and DW_AT_specification.
4157 (lto_read_subroutine_type_subprogram_DIE): Handle
4158 DW_AT_abstract_origin.
4159 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4160 (lto_read_DIE_at_ptr): Define as static to match declaration.
4161 Lookup the PTR in the cache before reading it from the file.
4162 (lto_resolve_var_ref): Adjust accordingly.
4163 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4164 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4165
41662007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4167
4168 * lto.c (lto_read_DIE_at_ptr): New function.
4169 (lto_resolve_var_ref): Use it.
4170 (lto_resolve_fn_ref): Use it.
4171 (lto_resolve_field_ref): Use it.
4172 (lto_read_variable_formal_parameter_constant_DIE): Follow
4173 DW_AT_specification and return the associated decl when appropriate.
4174
41752007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4176
4177 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4178 Implement for scalar integer modes.
4179 (lto_init): Initialize size_type_node.
4180
41812007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4182
4183 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4184 (input_local_var): Add chaining for params.
4185 (input_ssa_names): Add cfun parameter.
4186 (input_function): Remove unnecessary else.
4187
41882007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4189
4190 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4191 (lto_resolve_var_ref): Use proper types.
4192 (lto_resolve_fn_ref): Likewise.
4193 (lto_resolve_field_ref): Likewise.
4194
41952007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4196
4197 * lto-read.c (input_expr_operand): Remove case.
4198
41992007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4200
4201 * lto.c (lto_read_only_for_child_DIEs): New function.
4202 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4203 * lto-elf.c (lto_elf_map_lto_section): Remove.
4204 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4205 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4206 SSA_NAME. Add missing case for mechanical codes.
4207 (input_cfg): Use basic_block_info_for_function instead of
4208 basic_block_info.
4209
42102007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4211
4212 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4213 (input_list): Renamed input_tree_list and modified to follow same
4214 protocol as lto-function-out.c:output_tree_list.
4215 (input_expr_operand): Make asm operands use input_tree_list.
4216 (input_local_var): Now uses input_tree_list.
4217 (lto_read_body): Change placement for setting context of debug_labels.
4218
4219
42202007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4221
4222 * lto-read.c (input_real): Output debugging in proper order.
4223 (input_integer): Compute bit lengths properly.
4224 (input_list): Clean up declaration.
4225 (input_expr_operand): Change calls to input_real to match fix.
4226 Make reading of LTO_bit_field_ref1 match output.
4227 (input_local_var): Make reading of attributes match what is being
4228 written.
4229 (dump_debug_stream): Also print char in hex.
4230 (debug_out_fun): Fix signed unsigned mismatch.
4231
42322007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4233
4234 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4235 DW_AT_GNU_vector specially, as they are not contiguous with the
4236 specified set of attribute names. Use class_mask to check for
4237 errors at the end of the function
4238 (lto_resolve_var_ref): Read the DIE if it is not cached.
4239 (lto_resolve_fn_ref): Likewise.
4240 (lto_resolve_field_ref): Likewise.
4241
42422007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4243
4244 * lto.c: Include dwarf2out.h.
4245 (lto_cache_store_DIE): Assert that we never change the value.
4246 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4247 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4248 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4249 sensible type instead.
4250 (lto_read_structure_union_class_type_DIE): Store the newly
4251 created type prior to reading the members of the structure to
4252 avoid infinite recursion. Avoid computing types and alignments
4253 for structures whose sizes are unknown.
4254 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4255 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4256 DW_AT_const_value, and DW_AT_specification.
4257 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4258 Return early if we have already constructed the function type.
4259 (lto_read_typedef_DIE): Check to see if the type has been cached
4260 already. Cache the type before reading any children.
4261 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4262 (lto_read_DIE): Unset context->skip_non_parameters around reading
4263 the DIE.
4264 (lto_resolve_fn_ref): Delete trailing whitespace.
4265
42662007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4267
4268 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4269
42702007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4271
4272 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4273
42742007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4275
4276 * lto-lang.c (signed_and_unsigned_types): New variable.
4277 (lto_type_for_size): Consult signed_and_unsigned_types to find
4278 an approprite type, creating it if necessary.
4279 (lto_set_decl_assembler_name): Add actual method body.
4280
42812007-09-06 Jim Blandy <jimb@codesourcery.com>
4282
4283 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4284 can't find a var init for this variable, leave its DECL_INITIAL.
4285 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4286 lto_elf_map_fn_body.
4287 (lto_map_lto_section): New function.
4288 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4289 bodies, and lto_elf_map_optional_lto_section for variable
4290 initializers.
4291 (lto_elf_find_section_data): Quietly return NULL if the section is
4292 missing.
4293 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4294
4295 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
4296
4297 * lto-read.c (lto_read_body): Doc fix.
4298
42992007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4300
4301 * lto-read.c (fun_in): Renamed to data_in.
4302 (input_expr_operand, input_local_var, input_string_internal,
4303 input_string, input_real, input_list, get_label_decl,
4304 get_type_ref, input_expr_operand, input_globals, input_labels,
4305 input_local_vars_index, input_local_var, input_local_vars,
4306 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
4307 (input_constructor): New function.
4308 (lto_read_function_body): Renamed to lto_read_body and generalized
4309 to handle both functions and constructors.
4310 (lto_read_function_body, lto_read_var_init): New function.
4311
4312
43132007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4314
4315 * lto-read.c (input_expr_operand): Assert that there really is a
4316 FUNCTION_DECL.
4317 (input_globals): Removed checks on 0 section.
4318
43192007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4320
4321 * lto-read.c (fun_in): Added local_decls_index and
4322 local_decls_index_d.
4323 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
4324 (input_globals): Enabled code to handle FIELD_DECLs.
4325 (input_local_vars_index, input_local_vars): New function.
4326 (input_local_var): Changed to allow locals to be input randomly.
4327 (lto_read_function_body): Added code to input the
4328 local_decls_index and to free various structures.
4329
43302007-08-17 Jim Blandy <jimb@codesourcery.com>
4331
4332 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
4333 ATTRIBUTE_UNUSED from 'die' formal.
4334
4335 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
4336 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
4337 (input_list): Fix type of 'tag'.
4338 (input_expr_operand): Fix type of 'tag' argument. Update
4339 declaration. Fix type of 'ctag'. Add default case to switch,
4340 since the type of the switched value is now an enum.
4341 (input_local_vars): Fix type of 'tag'.
4342 (input_bb): Fix type of 'tag' argument.
4343 (input_function): Fix type of 'tag' argument.
4344
43452007-08-16 Jim Blandy <jimb@codesourcery.com>
4346
4347 * lto.c (lto_read_member_DIE): Record the tree we create in
4348 fd->die_cache. (Our 'die' argument is no longer unused.)
4349 (lto_resolve_field_ref): New function.
4350 * lto.h (lto_resolve_field_ref): New declaration.
4351
43522007-08-15 Jim Blandy <jimb@codesourcery.com>
4353
4354 * lto-read.c (lto_read_var_init): Mark arguments as unused.
4355
43562007-08-07 Jim Blandy <jimb@codesourcery.com>
4357
4358 * lto.c (lto_read_form): Complete attr_classes table.
4359 (DWARF2_form_data): Doc fix.
4360
43612007-08-05 Mark Mitchell <mark@codesourcery.com>
4362
4363 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
4364 and unmap_var_init.
4365 (lto_read_var_init): Declare.
4366 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
4367 interface for reading variable initializers.
4368 * lto-elf.c (lto_elf_read_var_init): Remove.
4369 (lto_elf_file_vtable): Update initializer.
4370 (lto_elf_read_var_init): Add comment about unused-ness.
4371 * lto-read.c (lto_read_var_init): New.
4372
4373 * lto.c (lto_read_form): Add entry for DW_AT_inline.
4374
43752007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
4376
4377 * lto-read.c (lto_read_function_body): Moved declaration of fn
4378 outside of ifdef.
4379
43802007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4381
4382 * lto-read.c (input_uleb128, input_string_internal, input_real,
4383 input_integer, input_record_start, input_list, get_type_ref,
4384 input_flags, input_expr_operand, input_expr_operand,
4385 input_expr_operand, input_local_vars, input_cfg, input_phi,
4386 input_ssa_names, input_bb, input_function): Added semicolons.
4387
4388
43892007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4390
4391 * lto-read.c (input_globals): Remove debugging.
4392 (input_function): Set DECL_ARGUMENTS.
4393
4394
43952007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4396
4397 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
4398 RETURN_EXPR, MODIFY_EXPR and processing of flags.
4399 (input_phi): Made work with operands other than SSA_NAMES and
4400 fixed processing of flags.
4401 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
4402 (input_flags): New function.
4403 * lto-lang.c (lto_init): Changed state of in_lto_p.
4404
4405
44062007-07-24 Mark Mitchell <mark@codesourcery.com>
4407
4408 * lto-tree.h (lto_varargs_cookie): Remove.
4409 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
4410 skip_non_parameters, skip_parameters.
4411 (lto_varargs_cookie): Remove.
4412 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
4413 parameter types.
4414 (lto_read_abbrev): New function.
4415 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
4416 child DIEs.
4417 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
4418 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
4419 (lto_file_read): Initialize new context fields.
4420 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
4421 (lto_unsigned_type): Remove.
4422 (lto_signed_type): Likewise.
4423 (lto_signed_or_unsigned_type): Likewise.
4424 (lto_init): Do not create lto_varargs_cookie.
4425 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
4426 (LANG_HOOKS_SIGNED_TYPE): Likewise.
4427 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
4428
44292007-07-19 Jan Hubicka <jh@suse.cz>
4430
4431 * lto-read.c (lto_read_function_body): Produce empty scope block
4432 to avoid crash.
4433
44342007-07-18 Mark Mitchell <mark@codesourcery.com>
4435
4436 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
4437 process local variables.
4438 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
4439
44402007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4441
4442 * lto-read.c (input_list, input_expr_operand): Added struct
4443 function parameter.
4444 (init_cfg, finalize_cfg): Removed function.
4445 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
4446 (input_labels, input_local_vars): Now takes input_block parameter rather than
4447 synthsyzing it.
4448 (input_cfg, input_phi, input_ssa_names): New functions.
4449 (input_bb): Now passes in input_blocks. Does not construct cfg
4450 and processes the list of phi functions.
4451 (input_function): Now builds both the cfg and ssa_names table.
4452 (lto_read_function_body): Processes new header fields to construct
4453 streams for the ssa_names and cfg and their debugging.
4454 * lto/lto-lang.c (lto_init): Set in_lto_p.
4455
4456
44572007-06-28 Mark Mitchell <mark@codesourcery.com>
4458
4459 * lto.h (lto_file_vtable): Add read_var_init.
4460 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
4461 initializers.
4462 (lto_main): Remove bogus asserts.
4463 * lto-elf.c (tm.h): Include it.
4464 (libiberty.y): Likewise.
4465 (lto_elf_file): Add strtab and symtab. Rename
4466 string_table_section_index to sec_strtab.
4467 (lto_elf_file_vtable): Add lto_elf_read_var_init.
4468 (lto_elf_get_shdr): New function.
4469 (lto_elf_free_shdr): Likewise.
4470 (lto_elf_find_section_data): Use them.
4471 (lto_elf_read_symtab): New function.
4472 (lto_elf_lookup_sym): Likewise.
4473 (lto_elf_free_sym): Likewise.
4474 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
4475 (lto_elf_built_init): New function.
4476 (lto_elf_read_var_init): Likewise.
4477 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
4478
44792007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
4480
4481 * lto-read (make_new_block): Initialize the stmt_list.
4482 (lto_static_init_local): Add debugging for missing codes.
4483
44842007-06-26 Mark Mitchell <mark@codesourcery.com>
4485
4486 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4487 unprototyped functions.
4488
44892007-06-23 Mark Mitchell <mark@codesourcery.com>
4490
4491 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4492 Handle DW_AT_MIPS_linkage_name.
4493 (lto_read_subroutine_type_subprogram): Likewise. Correct
4494 compilation errors.
4495 (lto_main): Remove incorrect assertions.
4496 * lto-symbtab.c: Build function types out of TREE_LISTs.
4497
4498 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
4499
4500 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
4501
45022007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
4503
4504 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
4505 dummy since ggc does not like empty structs.
4506 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
4507 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
4508 expr->common to expr->base.
4509 (make_new_block): Moved stmt_list to proper place.
4510
4511
45122007-03-14 Robert Kennedy <jimbob@google.com>
4513
4514 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
4515 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
4516 assembler name from DWARF.
4517 * lto-lang.c (lto_set_decl_assembler_name) New function.
4518
45192006-09-10 Mark Mitchell <mark@codesourcery.com>
4520
4521 * lto.h (lto_file_vtable): New structure.
4522 (lto_file): Add vtable pointer.
4523 (lto_file_init): Add vtable paramter.
4524 (lto_read_function_body): New function.
4525 (lto_symtab_merge_fn): New function.
4526 * lto.c (lto_file_init): Add vtable parameter.
4527 (lto_read_form): Fill in entries for DW_AT_prototyped,
4528 DW_AT_frame_base.
4529 (lto_read_subroutine_type_subprogram_DIE): New function.
4530 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
4531 DW_TAG_subprogram.
4532 * lto-elf.c (lto_elf_vile_vtable): New variable.
4533 (lto_elf_file_open): Pass it to lto_file_init.
4534 (lto_elf_map_fn_body): New function.
4535 (lto_elf_unmap_fn_body): Likewise.
4536 * lto-read.c: New file.
4537 * lto-symtab.c (lto_symtab_merge_fn): New function.
4538 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
4539 tree_rest_of_compilation.
4540 * Make-lang.in (LTO_OBJS): Add lto-read.o
4541 (lto-read.o): New target.
4542
45432006-09-03 Mark Mitchell <mark@codesourcery.com>
4544
4545 * lto.c (<inttypes.h>): Don't include it.
4546 (lto_context): Don't typedef it.
4547 (lto_resolve_reference): New function.
4548 (lto_read_form): Use it.
4549 (lto_resolve_type_ref): New function.
4550 (lto_resolve_var_ref): Likewise.
4551 (lto_resolve_fn_ref): Likewise.
4552 * lto.h (<inttypes.h>): Include it.
4553 (lto_context): New type.
4554 (lto_ref): New structure.
4555 (lto_resolve_type_ref): Declare.
4556 (lto_resolve_var_ref): Likewise.
4557 (lto_resolve_fn_ref): Likewise.
4558
45592006-08-18 Mark Mitchell <mark@codesourcery.com>
4560
4561 * lang-specs.h: New file.
4562
45632006-08-14 Mark Mitchell <mark@codesourcery.com>
4564
4565 * lto.c (lto_info_fd_init): Allocate the DIE cache.
4566 (lto_info_fd_close): Deallocate it.
4567 (lto_die_cache_entry): New structure.
4568 (lto_cache_hash): New function.
4569 (lto_cache_eq): Likewise.
4570 (lto_cache_store_DIE): Likewise.
4571 (lto_cache_lookup_DIE): Likewise.
4572 (lto_read_referenced_type_DIE): Use the cache.
4573 (lto_read_pointer_type_DIE): Robustify.
4574 (lto_read_DIE): Use the cache.
4575 * lto.h (hashtab.h): Include.
4576 (lto_info_fd): Add DIE cache.
4577 * Make-lang.in (LTO_H): New variable.
4578 (lto/lto-lang.o): Use LTO_H.
4579 (lto/lto-elf.o): Likewise.
4580 (lto/lto-symtab.o): Likewise.
4581
45822006-07-09 Mark Mitchell <mark@codesourcery.com>
4583
4584 * lto.c (lto_abi_mismatch_error): New function.
4585 (lto_abbrev_read): Initialize num_abbrevs.
4586 (lto_read_form): Specify allowed form classes for
4587 DW_AT_declaration. Adjust for change to lto_set_cu_context.
4588 (lto_read_variable_formal_parameter_constant_DIE): Handle
4589 DW_AT_declaration. Call lto_symtab_merge_var.
4590 (lto_read_pointer_type_DIE): New function.
4591 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
4592 not creat TYPE_DECLs for types that already have them.
4593 (lto_read_DIE): Add lto_read_pointer_type_DIE.
4594 (lto_set_cu_context): Make cu_start point to the header, not the
4595 first DIE.
4596 (lto_file_read): Adjust for change to lto_set_cu_context.
4597 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
4598 (lto/lto-symtab.o): New rule.
4599 * lto-tree.h (lang_identifier): Add decl field.
4600 (LANG_IDENTIFIER_CAST): New macro.
4601 (LTO_IDENTIFIER_DECL): Likewise.
4602 (lto_symtab_merge_var): Declare.
4603 * lto-symtab.c: New file.
4604
46052006-07-02 Daniel Berlin <dberlin@dberlin.org>
4606
4607 * lto.c (lto_context): Add current_cu and info_fd members.
4608 (DWARF2_CompUnit): New structure.
4609 (lto_read_DIE): Take lto_info_fd *.
4610 (lto_read_child_DIEs): Ditto.
4611 (lto_file_corrupt_error): Constify argument.
4612 (lto_set_cu_context): New function
4613 (lto_info_fd_init): Ditto.
4614 (lto_info_fd_close): Ditto.
4615 (lto_file_init): Use lto_info_fd_init.
4616 (lto_file_close): Use lto_info_fd_close.
4617 (lto_read_initial_length): Pass in pointer to header size.
4618 (lto_read_comp_unit_header): Correct cu_length to
4619 real length from beginning of header. Take lto_info_fd * as
4620 argument.
4621 (find_cu_for_offset): New function.
4622 (lto_read_form): Change first argument to lto_info_fd *.
4623 Add FORM_CONTEXT argument.
4624 Handle DW_FORM_ref_addr.
4625 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
4626 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
4627 Swap contexts if necessary for form.
4628 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
4629 lto_file_corrupt_error.
4630 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
4631 (lto_read_referenced_type_DIE): Change first argument to
4632 lto_info_fd *. Access lto_fd fields through base pointer.
4633 (lto_read_compile_unit_DIE): Change first argument to an
4634 lto_info_fd *.
4635 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
4636 (lto_read_base_type_DIE): Ditto.
4637 (lto_read_child_DIEs): Ditto.
4638 (lto_read_DIE): Ditto. Change type of function pointer.
4639 (lto_info_read): New function.
4640 (lto_set_cu_context): Ditto.
4641 (lto_file_read): Use lto_info_read, walk resulting CU's
4642 (lto_main): Update for lto_info_fd change.
4643 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
4644 necessary.
4645 * lto.h (DWARF2_CompUnit): New structure.
4646 (lto_info_fd): Ditto.
4647 (lto_file): Change debug_info to be an lto_info_fd.
4648
46492006-06-25 Mark Mitchell <mark@codesourcery.com>
4650
4651 * lto.c (toplev.h): Include it.
4652 (dwarf2.h): Likewise.
4653 (tree.h): Likewise.
4654 (tm.h): Likewise.
4655 (cgraph.h): Likewise.
4656 (ggc.h): Likewise.
4657 (inttypes.h): Likewise.
4658 (DWARF2_attr): New type.
4659 (DWARF2_abbrev): Likewise.
4660 (DWARF2_class): Likewise.
4661 (DWARF2_form_data): Likewise.
4662 (lto_context): Likewise.
4663 (lto_fd_init): New function.
4664 (lto_abbrev_fd_init): Likewise.
4665 (lto_abbrev_fd_close): Likewise.
4666 (lto_file_init): Use them.
4667 (lto_file_close): New function.
4668 (lto_file_corrupt_error): Likewise.
4669 (LTO_CHECK_INT_VAL): New macro.
4670 (lto_check_size_t_val): New function.
4671 (lto_check_int_val): Likewise.
4672 (LTO_READ_TYPE): New macro.
4673 (lto_read_ubyte): New function.
4674 (lto_read_uhalf): Likewise.
4675 (lto_read_uword): Likewise.
4676 (lto_read_uleb128): Likewise.
4677 (lto_read_initial_length): Likewise.
4678 (lto_abbrev_read_attrs): Likewise.
4679 (lto_abbrev_read): Likewise.
4680 (lto_abbrev_lookup): Likewise.
4681 (lto_read_section_offset): Likewise.
4682 (lto_read_comp_unit_header): Likewise.
4683 (lto_read_form): Likewise.
4684 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
4685 (LTO_BEGIN_READ_ATTRS): Likewise.
4686 (LTO_END_READ_ATTRS): Likewise.
4687 (lto_unsupported_attr_error): New function.
4688 (lto_get_identifier): Likewise.
4689 (lto_read_referenced_type_DIE): Likewise.
4690 (lto_read_compile_unit_DIE): Likewise.
4691 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
4692 (lto_read_base_type_DIE): Likewise.
4693 (lto_read_DIE): Likewise.
4694 (lto_read_child_DIEs): Likewise.
4695 (lto_file_read): Read DIEs.
4696 (lto_main): Ask middle end to emit entities.
4697 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
4698 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
4699 (lto_elf_file_close): Likewise.
4700 * lto.h (lto_file): Declare.
4701 (DWARF2_abbrev): Likewise.
4702 (lto_fd): New type.
4703 (lto_abbrev_fd): Likewise.
4704 (lto_file): Use new types.
4705 (lto_file_close): Declare.
4706 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
4707
47082006-06-18 Mark Mitchell <mark@codesourcery.com>
4709
4710 * lto.h: New file.
4711 * lto.c: New file.
4712 * lto-elf.c: New file.
4713 * lto-lang.c (flags.h): Include it.
4714 (lto.h): Likewise.
4715 (lto_init): New function.
4716 (lto_write_globals): Remove.
4717 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
4718 (LANG_HOOKS_INIT): Define.
4719 (LANG_HOOKS_PARSE_FILE): Likewise.
4720 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
4721 (LTO_EXE): Link with libelf.
4722 (lto/lto-lang.o): Update dependencies.
4723 (lto/lto.o): New target.
4724 (lto/lto-elf.o): Likewise.
4725
47262006-06-12 Mark Mitchell <mark@codesourcery.com>
4727
4728 * config-lang.in: New file.
4729 * Make-lang.in: Likewise.
4730 * lto-tree.h: Likewise.
4731 * lto-lang.c: Likewise.
4732
This page took 2.621952 seconds and 5 git commands to generate.