]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Add a new option --clean_build to validate_failures.py
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
a5693828 12012-10-12 Richard Biener <rguenther@suse.de>
2
3 PR lto/54898
4 * lto.c (gimple_types_compatible_p_1): Also compare
5 TYPE_MAIN_VARIANT.
6 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
7
883554eb 82012-10-09 Tobias Burnus <burnus@net-b.de>
9
10 * lto-lang.c (lto_register_builtin_type): Avoid useless
11 decl creation.
12 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
13
14c7dd36 142012-10-08 Tobias Burnus <burnus@net-b.de>
15
16 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
17 Free lto_file struct after closing the file.
18
35d3a6eb 192012-10-08 Jan Hubicka <jh@suse.cz>
20
21 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
22 (fixup_integer_cst): New functoin.
23 (lto_ft_type): Fixup BASETYPE of methods and offsets.
24
b8925abd 252012-10-07 Jan Hubicka <jh@suse.cz>
26
27 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
28 release input encoders.
29 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
30
18ff06f9 312012-10-06 Jan Hubicka <jh@suse.cz>
32
33 PR lto/54790
34 * lto.c (resolution_map): New static var.
35 (register_resolution): New function.
36 (lto_register_var_decl_in_symtab): Use it.
37 (read_cgraph_and_symbols): Copy resolutions into the symtab.
38
9078126c 392012-09-20 Martin Jambor <mjambor@suse.cz>
40
41 * lto.c (lto_materialize_function): Call push_struct_function and
42 pop_cfun.
43
5169661d 442012-09-19 Dehao Chen <dehao@google.com>
45
46 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
47
c9aa6453 482012-09-19 Jan Hubicka <jh@suse.cz>
49
50 * lto.c (lto_materialize_function): Update confused comment.
51 (read_cgraph_and_symbols): Do not free symtab.
52
0851d795 532012-09-12 Jan Hubicka <jh@suse.cz>
54
55 * lto.c (do_whole_program_analysis): Care timevars, statistics and
56 AUX pointer cleaning. Add max partitioning.
57 * lto-partition.c (enum symbol_class): New.
58 (get_symbol_class): New function.
59 (symbol_partitioned_p): New function.
60 (add_references_to_partition): Remove.
61 (add_aliases_to_partition): Remove.
62 (add_cgraph_node_to_partition_1): Remove.
63 (add_cgraph_node_to_partition): Remove.
64 (add_symbol_to_partition): New function.
65 (add_symbol_to_partition_1): New function.
66 (contained_in_symbol): New function.
67 (partition_cgraph_node_p): Remove.
68 (partition_varpool_node_p): Remove.
69 (partition_symbol_p): Remove.
70 (lto_1_to_1_map): Cleanup.
71 (lto_max_map): New.
72 (lto_balanced_map): Update.
73 (lto_promote_cross_file_statics): Update.
74 * lto-partition.h (lto_max_map): Declare.
75 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
76
8873e58c 772012-09-11 Jan Hubicka <jh@suse.cz>
78
79 PR lto/54312
80 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
81 type is variant leader.
82
ed29d77f 832012-09-11 Richard Guenther <rguenther@suse.de>
84
85 * lto.c (enum gtc_mode): Remove.
86 (struct type_pair_d): Adjust.
87 (lookup_type_pair): Likewise.
88 (gimple_type_leader): Do not mark as deletable.
89 (gimple_lookup_type_leader): Adjust.
90 (gtc_visit): Likewise.
91 (gimple_types_compatible_p_1): Likewise.
92 (gimple_types_compatible_p): Likewise.
93 (gimple_type_hash): Likewise.
94 (gimple_register_type): Likewise.
95 (read_cgraph_and_symbols): Manage lifetime of tables
96 here.
97
bdaea387 982012-09-11 Richard Guenther <rguenther@suse.de>
99
100 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
101 struct type_pair_d, lookup_type_pair, struct sccs,
102 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
103 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
104 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
105 visit, iterative_hash_name, struct type_hash_pair,
106 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
107 gimple_type_eq, gimple_register_type_1, gimple_register_type):
108 Move here from gimple.c
109 (read_cgraph_and_symbols): Free hash tables here.
110 (print_lto_report_1): New function wrapping print_lto_report.
111 (do_whole_program_analysis): Call it.
112 (lto_main): Likewise.
113
b6f96313 1142012-09-10 Jan Hubicka <jh@suse.cz>
115
116 * lto-partition.c (partition_symbol_p): Forward declare.
117 (add_references_to_partition): Reimplement using partition_symbol_p.
118 (add_aliases_to_partition): Break out from add_references_to_partition;
119 reimplement using partition_symbol_p.
120 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
121 add sanity checks.
122 (add_varpool_node_to_partition): Use add_aliases_to_partition.
123 (partition_varpool_node_p): Do not special case aliases.
124
724462b0 1252012-08-12 Jan Hubicka <jh@suse.cz>
126
127 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
128 it is deleted after streaming.
129 * lto-partition.c (partition_symbol_p): New function.
130 (promote_var, promote_fn): Remove.
131 (promote_symbol): New function.
132 (lto_promote_cross_file_statics): First compute boundaries; rewrite
133 to lookup the actual boundaries instead of computing them ad-hoc.
134
5cf7e051 1352012-08-12 Jan Hubicka <jh@suse.cz>
136
137 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
138 in partitioning.
139 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
140 by encoder.
141 * lto-partition.c (new_partition): Update.
142 * lto.c (cmp_partitions_order): Update.
143 (lto_wpa_write_files): Update.
144 (free_ltrans_partitions): Update.
145 (add_references_to_partition): Update.
146 (add_cgraph_node_to_partition_1): Update.
147 (add_cgraph_node_to_partition): Update.
148 (add_varpool_node_to_partition): Update.
149 (undo_partition): Update.
150 (lto_balanced_map): Update.
151 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
152 set_referenced_from_this_partition_p): Update.
153 (lto_promote_cross_file_statics): Update.
154
eab36a5a 1552012-08-12 Jan Hubicka <jh@suse.cz>
156
157 * lto-partition.c (set_referenced_from_other_partition_p,
158 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
159 New functions.
160 (lto_promote_cross_file_statics): Use them.
161
02b699d5 1622012-07-24 Jan Hubicka <jh@suse.cz>
163
164 * lto.c (read_cgraph_and_symbols): Use input_symtab.
165
a5656b73 1662012-07-24 Uros Bizjak <ubizjak@gmail.com>
167
168 * lto-tree.h (lang_decl): Add variable_size GTY option.
169
b9ed1410 1702012-07-16 Steven Bosscher <steven@gcc.gnu.org>
171
172 * lto.c: Do not include timevar.h.
173 * Make-lang.in: Fix dependencies.
174
161121a9 1752012-06-18 Lawrence Crowl <crowl@google.com>
176
177 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
178 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
179 to lto_wpa_write_files.
180 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
181 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
182 TV_PHASE_SETUP for the call to lto_init. Use new timevar
183 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
184 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
185 to be a front end, but is not one.
186
18a71d50 1872012-05-18 Jan Hubicka <jh@suse.cz>
188
189 * lto.c (lto_materialize_constructors_and_inits): Remove.
190 (read_cgraph_and_symbols): Remove handling of alias pairs.
191
aa419a52 1922012-05-17 Jan Hubicka <jh@suse.cz>
193
194 * lto-partition.c (add_references_to_partition): Handle external vars.
195 (partition_varpool_node_p): Likewise.
196 (lto_promote_cross_file_statics): Do not promote externals.
197
258a168d 1982012-05-14 Bernd Schmidt <bernds@codesourcery.com>
199
200 * lto-lang.c (handle_fnspec_attribute): New static function.
201 (lto_attribute_table): Add "fn spec".
202 (DEF_ATTR_STRING): Define and undefine along with the other macros.
203
3d1c0354 2042012-05-04 Jan Hubicka <jh@suse.cz>
205
206 * lto.c (do_whole_program_analysis): Set timevars correctly.
207 (lto_main): Likewise.
258a168d 208
596c40fb 2092012-05-04 Richard Guenther <rguenther@suse.de>
210
211 * lang.opt (fwpa): Do not mark as Optimization.
212 (fltrans): Likewise.
213
cf951b1a 2142012-04-30 Jan Hubicka <jh@suse.cz>
215
216 * lto.c (lto_main): Use compile ().
596c40fb 217 * lto-partition.c (partition_cgraph_node_p): Use
218 symtab_used_from_object_file_p.
cf951b1a 219 (partition_varpool_node_p): Likewise.
220
8efa224a 2212012-04-20 Jan Hubicka <jh@suse.cz>
222
223 * lto-partition.c (partition_cgraph_node_p): Use force_output.
224
04ec15fa 2252012-04-18 Jan Hubicka <jh@suse.cz>
226
227 * lto-partition.c (add_references_to_partition, lto_balanced_map):
228 Update for new ipa-ref API.
229
7c455d87 2302012-04-16 Jan Hubicka <jh@suse.cz>
231
232 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
233 walkers to walk cgraph and varpool.
234 (materialize_cgraph): Likewise.
235 * lto-partition.c (lto_1_to_1_map): Likewise.
236 (lto_balanced_map): Likewise.
237 (lto_promote_cross_file_statics): Likewise.
238
7d0d0ce1 2392012-04-14 Jan Hubicka <jh@suse.cz>
240
241 * lto.c: Update field referenced for new cgraph/varpool layout.
242 * lto-partition.c: Likewise.
243
50ed40f5 2442012-04-11 Jan Hubicka <jh@suse.cz>
245
246 * lto.c: Update copyright; remove params.h, ipa-inline.h
247 and ipa-utils.h inlines; inline lto-partition.h
248 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
249 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
250 add_references_to_partition, add_cgraph_node_to_partition_1,
251 add_cgraph_node_to_partition, add_varpool_node_to_partition,
252 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
253 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
254 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
255 * lto-partition.c: ... here; new file.
256 * lto-partition.h: New file.
257 * Make-lang.in (lto.o): Update dependencies.
258 (lto-partition.o): New.
259
37e77161 2602012-04-05 Richard Guenther <rguenther@suse.de>
261
262 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
263 definition.
264
a51edb4c 2652012-03-12 Richard Guenther <rguenther@suse.de>
266
267 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
268
90f56810 2692012-03-06 Richard Guenther <rguenther@suse.de>
270
271 PR lto/52097
272 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
273
ff56be02 2742012-02-28 Richard Guenther <rguenther@suse.de>
275
276 PR lto/52400
277 * lto.c (lto_register_function_decl_in_symtab): Do not register
278 a reverse renamed decl mapping.
279
3affb5a8 2802012-01-06 Jakub Jelinek <jakub@redhat.com>
281
282 PR lto/51774
283 * lto-lang.c (handle_returns_twice_attribute): New function.
284 (lto_attribute_table): Add returns_twice attribute.
285
a7a11a02 2862011-12-21 Richard Guenther <rguenther@suse.de>
287
288 * lto.c (GIMPLE_REGISTER_TYPE): New define.
289 (LTO_FIXUP_TREE): Use it.
290 (uniquify_nodes): Mark new non-prevailing types and avoid
291 calling gimple_register_type on others.
292 (lto_read_decls): Add comment.
293
949e5786 2942011-12-13 Eric Botcazou <ebotcazou@adacore.com>
295
296 * lto.h (lto_parse_hex): Delete.
297 * lto.c (lto_read_decls): Use 'int' for offsets.
298 (lto_parse_hex): Make static and return proper 64-bit host type.
299 (lto_resolution_read): Use proper 64-bit host type.
300
6cd6787c 3012011-12-13 Richard Guenther <rguenther@suse.de>
302
303 PR lto/48354
304 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
305 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
306
c8c597a7 3072011-12-01 Uros Bizjak <ubizjak@gmail.com>
308
309 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
310 (ignore_attribute): New.
311
ea0e88d1 3122011-11-21 Aldy Hernandez <aldyh@redhat.com>
313
314 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
315 (handle_transaction_pure_attribute): New.
316
954825c9 3172011-11-03 Richard Guenther <rguenther@suse.de>
318
319 PR lto/44965
320 * lto-lang.c (lto_post_options): Do not read file options.
321 * lto.c (lto_read_all_file_options): Remove.
322 (lto_init): Call lto_set_in_hooks here.
323
bc2cc717 3242011-10-09 Jan Hubicka <jh@suse.cz>
325
326 * lto.c (node_cmp, varpool_node_cmp): New functions.
327 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
328 (cmp_partitions): Rename to ...
329 (cmp_partitions_size): ... this one.
330 (cmp_partitions_order): New function.
331 (lto_wpa_write_files): Sort partitions by order when
332 -fno-toplevel-reorder is used.
333
a5f12044 3342011-10-09 Andi Kleen <ak@linux.intel.com>
335
336 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
337
b9a16870 3382011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
339
340 * lto-lang.c (def_builtin_1): Delete old interface with two
341 parallel arrays to hold standard builtin declarations, and replace
342 it with a function based interface that can support creating
343 builtins on the fly in the future. Change all uses, and poison
344 the old names. Make sure 0 is not a legitimate builtin index.
345
805389b2 3462011-10-02 Andi Kleen <ak@linux.intel.com>
347
348 * lto-object.c (lto_obj_add_section_data): Add list.
349 (lto_obj_add_section): Fill in list.
350 (ltoobj_build_section_table): Pass through list.
351 * lto.c (file_data_list): Declare.
352 (create_subid_section_table): Pass arguments directly.
353 Fill in list of file_datas.
354 (lwstate): Delete.
355 (lto_create_files_from_ids): Pass in direct arguments.
356 Don't maintain list.
357 (lto_file_read): Use explicit section and file data lists.
358 (lto_read_all_file_options): Pass in section_list.
359 * lto.h (lto_obj_build_section_table): Add list.
360 (lto_section_slot): Add next.
361 (lto_section_list): Declare.
362
da722561 3632011-10-02 Jan Hubicka <jh@suse.cz>
364
365 PR lto/47247
366 * common.c (lto_resolution_str): Add new resolution.
367 * common.h (lto_resolution_str): Likewise.
368
15c58191 3692011-09-30 H.J. Lu <hongjiu.lu@intel.com>
370 Andi Kleen <ak@linux.intel.com>
371
372 PR lto/50568
373 * lto.c (lto_splay_tree_delete_id): New.
374 (lto_splay_tree_compare_ids): Likewise.
375 (lto_splay_tree_lookup): Likewise.
376 (lto_splay_tree_id_equal_p): Likewise.
377 (lto_splay_tree_insert): Likewise.
378 (lto_splay_tree_new): Likewise.
379 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
380 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
381 (create_subid_section_table): Use lto_splay_tree_lookup and
382 lto_splay_tree_insert.
383 (lto_file_read): Use lto_splay_tree_new.
384
badc6cfa 3852011-09-26 Andi Kleen <ak@linux.intel.com>
386
387 * lto.c (lto_resolution_read): Remove id dumping.
388 (lto_section_with_id): Turn id HOST_WIDE_ID.
389 (create_subid_section_table): Dito.
390
1dc92c59 3912011-08-28 Dodji Seketeli <dodji@redhat.com>
392
393 * lto-lang.c (lto_init): Likewise. Also, avoid calling
394 linemap_add twice.
395
b6c200c3 3962011-08-11 Martin Jambor <mjambor@suse.cz>
397
398 * lto.c (uniquify_nodes): Use main variant's BINFO too.
399
2541503d 4002011-08-08 Diego Novillo <dnovillo@google.com>
401
402 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
403 * lto.c: Include tree-streamer.h.
404
c38a75b7 4052011-07-06 Richard Guenther <rguenther@suse.de>
406
407 * lto-lang.c (lto_init):
408 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
409
e71f2f1c 4102011-06-11 Jan Hubicka <jh@suse.cz>
411
ac11d294 412 PR lto/48246
e71f2f1c 413 * lto.c (lto_1_to_1_map): Don't create empty partitions.
414 (lto_balanced_map): Likewise.
415
c70f46b0 4162011-06-11 Jan Hubicka <jh@suse.cz>
417
418 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
419 (add_cgraph_node_to_partition) ... here; walk aliases.
420 (lto_1_to_1_map): Remove same body alias code.
421 (promote_fn): Likewise.
422 (lto_promote_cross_file_statics): Update comment.
423
424
bbcef2a7 4252011-06-07 Diego Novillo <dnovillo@google.com>
426
427 * lto.c (uniquify_nodes): Move code to register decls to
428 the loop that computes canonical types.
429
1af0124d 4302011-06-07 Richard Guenther <rguenther@suse.de>
431
432 * lto-lang.c (lto_init): Do not set
433 size_type_node or call set_sizetype.
434
a0605d65 4352011-06-04 Diego Novillo <dnovillo@google.com>
436
437 * lto.c (lto_init): New.
438 (lto_main): Call it.
439
f05c9dfb 4402011-06-03 Diego Novillo <dnovillo@google.com>
441
442 * lto.c (get_resolution): Move from lto-streamer-in.c.
443 (lto_register_var_decl_in_symtab): Likewise.
444 (lto_register_function_decl_in_symtab): Likewise.
445 (uniquify_nodes): Call lto_register_var_decl and
446 lto_register_function_decl_in_symtab after reading a new
447 VAR_DECL or FUNCTION_DECL.
448
ed61b909 4492011-06-01 Richard Guenther <rguenther@suse.de>
450
451 * lto-lang.c (lto_register_canonical_types): New function.
452 (lto_init): Register common nodes with the canonical type machinery.
453 Do not play tricks with char_type_node.
454
8f2b914f 4552011-05-26 Richard Guenther <rguenther@suse.de>
456
457 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
458
1e184c62 4592011-05-25 Nathan Froyd <froydnj@codesourcery.com>
460
461 * lto.c (lto_ft_typed): New function.
462 (lto_ft_common): Call it.
463 (lto_ft_constructor): Likewise.
464 (lto_ft_expr): Likewise.
465 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
466 TREE_CHAIN.
467
4d83607a 4682011-05-20 Richard Guenther <rguenther@suse.de>
469
470 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
471 (lto_ft_type): Move main-variant and pointer-to chain building ...
472 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
473 in a separate final loop.
474
bddb3763 4752011-05-19 Richard Guenther <rguenther@suse.de>
476
477 * lto.c (uniquify_nodes): First register all types before
478 fixing up the tree SCC.
479
c6641d23 4802011-05-11 Jan Hubicka <jh@suse.cz>
481
482 PR lto/48952
483 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
484
8f2eb9e1 4852011-05-11 Nathan Froyd <froydnj@codesourcery.com>
486
487 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
488 location of binfo field.
489 (lto_fixup_prevailing_decls): Likewise.
490
3a939d12 4912011-05-10 Nathan Froyd <froydnj@codesourcery.com>
492
493 * lto-lang.c (def_fn_type): Don't call build_function_type, call
494 build_function_type_array or build_varargs_function_type_array
495 instead.
496
1d2bb655 4972011-05-07 Eric Botcazou <ebotcazou@adacore.com>
498
499 * lto-lang.c (global_bindings_p): Return bool.
500
91bf9d9a 5012011-05-07 Jan Hubicka <jh@suse.cz>
502
56bef313 503 * lto.c (lto_materialize_function): Use
504 cgraph_function_with_gimple_body_p.
505 (add_cgraph_node_to_partition): Do not re-add items to partition;
506 handle thunks.
91bf9d9a 507 (add_varpool_node_to_partition): Do not re-add items to partition.
508
423ba805 5092011-05-03 Jan Hubicka <jh@suse.cz>
510
511 * lto.c (free_ltrans_partitions): Fix accidental commit.
512
19ad01f7 5132011-05-03 Jan Hubicka <jh@suse.cz>
514
515 * lto.c (ltrans_partition_def): Remove GTY annotations.
516 (ltrans_partitions): Move to heap.
517 (new_partition): Update.
518 (free_ltrans_partitions): New function.
519 (lto_wpa_write_files): Use it.
520
7771d558 5212011-04-29 Martin Jambor <mjambor@suse.cz>
522
523 * lto.c: Include ipa-utils.h.
524 (lto_balanced_map): Update call to ipa_reverse_postorder.
525 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
526
d534cab0 5272011-04-29 Michael Matz <matz@suse.de>
528
529 * lto.c (toplevel): Include tree-flow.h.
530 (lto_read_in_decl_state): Don't merge types here.
531 (tree_with_vars): New static hash table.
532 (remember_with_vars): New static functions.
533 (LTO_FIXUP_TYPE): New macro.
534 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
535 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
536 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
537 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
538 (lto_read_decls): Uniquify while reading in trees.
539 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
540 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
541 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
542 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
543 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
544 lto_fixup_tree): Remove.
545 (lto_fixup_state): Remove data argument. Use
546 lto_symtab_prevailing_decl.
547 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
548 (lto_fixup_prevailing_decls): New function.
549 (lto_fixup_state_aux): Argument aux is unused.
550 (lto_fixup_decls): Don't allocate pointer sets, don't use
551 lto_fixup_tree, use lto_fixup_prevailing_decls.
552 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
553 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
554
b630a10e 5552011-04-16 Eric Botcazou <ebotcazou@adacore.com>
556
557 * lto.c (lto_balanced_map): Fix typos in head comment.
558 (lto_promote_cross_file_statics): Fix long lines and remove redundant
559 test.
560
cbd7f5a0 5612011-04-16 Jan Hubicka <jh@suse.cz>
562
563 * lto.c (lto_balanced_map): Update.
564
c7b2cc59 5652011-04-14 Jan Hubicka <jh@suse.cz>
566
567 * lto.c: Include ipa-inline.h
b630a10e 568 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
569 accessor.
c7b2cc59 570 (ipa_node_duplication_hook): Fix declaration.
571 * Make-lang.in (lto.o): Update dependencies.
572
9b88d08d 5732011-04-12 Nathan Froyd <froydnj@codesourcery.com>
574
575 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
576 calling TREE_CHAIN.
577 * lto.c (lto_fixup_common): Likewise.
578
c33080b9 5792011-04-08 Nathan Froyd <froydnj@codesourcery.com>
580
581 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
582 (handle_type_generic_attribute): Likewise.
583
5cd33168 5842011-04-03 Michael Matz <matz@suse.de>
585
586 * lto.c (lto_materialize_function): Don't read and then discard
587 sections in WPA mode.
588 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
589
590 * lto-lang.c (registered_builtin_fndecls): Remove.
591 (lto_getdecls): Return NULL_TREE.
592 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
593
d45127a1 5942011-03-31 Richard Guenther <rguenther@suse.de>
595
596 PR lto/48246
597 * lto.c (lto_wpa_write_files): Disable assert for non-empty
598 partitions when checking is not enabled.
599
82715bcd 6002011-03-25 Kai Tietz <ktietz@redhat.com>
601
602 * lto.c (lto_resolution_read): Use filename_cmp instead
603 of strcmp.
604 (lto_read_section_data): Likewise.
605
451c8e2f 6062011-03-25 Jeff Law <law@redhat.com>
607
608 * lto/lto-lang.c (def_fn_type): Add missing va_end.
609
ac86af5d 6102011-03-21 Kai Tietz <ktietz@redhat.com>
611
612 PR target/12171
613 * lto-lang.c (lto_attribute_table): Adjust table.
614
5a8834a5 6152011-02-18 Jakub Jelinek <jakub@redhat.com>
616
617 PR bootstrap/47807
618 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
619 of lto-streamer.h.
620
30865946 6212011-02-18 Richard Guenther <rguenther@suse.de>
622
623 PR lto/47798
624 * lto-tree.h (lto_global_var_decls): Do not declare here.
625 * lto-lang.c: Include lto-streamer.h.
626 * Make-lang.in (lto-lang.o): Adjust dependencies.
627
fad71d4f 6282011-02-10 Kai Tietz <kai.tietz@onevision.com>
629
630 PR lto/47241
631 * lto.c (lto_read_section_data): Free
632 fd_name in failure case.
633 For mingw targets don't hash file-descriptor.
634 (read_cgraph_and_symbols): Close current_lto_file
635 in failure case.
636
232c9ac7 6372011-01-11 Jan Hubicka <jh@suse.cz>
638
639 PR lto/45721
640 PR lto/45375
b630a10e 641 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
642 are not partitioned.
232c9ac7 643
a36cf284 6442010-12-22 Nathan Froyd <froydnj@codesourcery.com>
645
646 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
647 Use prototype_p.
648
6abc14d6 6492010-12-06 Richard Guenther <rguenther@suse.de>
650
651 PR lto/46796
652 * lto-lang.c (lto_init): Give names to basic types.
653
b96c136c 6542010-11-30 Joseph Myers <joseph@codesourcery.com>
655
656 * lto-object.c: Don't include toplev.h.
657 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
658
92468061 6592010-11-30 Joseph Myers <joseph@codesourcery.com>
660
661 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
662 $(TOPLEV_H).
663
967958e4 6642010-11-29 Joseph Myers <joseph@codesourcery.com>
665
666 * lto-endian.h: Delete.
667 * lto-object.c: Don't include "libiberty.h".
668 (O_BINARY): Don't define.
669 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
670 (O_BINARY): Don't define.
671
baa6eec4 6722010-11-23 Richard Guenther <rguenther@suse.de>
673
674 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
675
4f3aea0d 6762010-11-23 Richard Guenther <rguenther@suse.de>
677
678 PR lto/46605
679 * lto.c (read_cgraph_and_symbols): Bail out after errors.
680
b8ba44e7 6812010-11-17 Joseph Myers <joseph@codesourcery.com>
682
683 * lto.c (lto_main): Take no arguments.
684 * lto.h (lto_main): Update prototype.
685
2e521e13 6862010-11-16 Ian Lance Taylor <iant@google.com>
687
688 * lto-object.c (lto_obj_file_open): Call
689 simple_object_attributes_merge rather than
690 simple_object_attributes_compare.
691
3c6c0e40 6922010-11-12 Joseph Myers <joseph@codesourcery.com>
693
694 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
695 * lto-lang.c (lto_handle_option): Take location_t parameter.
696
bf776685 6972010-11-10 Joseph Myers <joseph@codesourcery.com>
698
699 * lto.c (lto_resolution_read): Start diagnostics with lowercase
700 letters and remove trailing '.'.
701 (lto_file_finalize): Start diagnostic with a lowercase letter.
702
e09108e1 7032010-11-02 Ian Lance Taylor <iant@google.com>
704
705 * lto-object.c: New file.
706 * lto-elf.c: Remove file.
707 * lto-macho.c: Remove file.
708 * lto-macho.h: Remove file.
709 * lto-coff.c: Remove file.
710 * lto-coff.h: Remove file.
711 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
712 lto/lto-object.o.
713 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
714 (lto/lto-objfile.o): New target.
715 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
716 (lto/lto.o): Remove $(LIBIBERTY_H).
717
4037a4c1 7182010-10-22 Jan Hubicka <jh@suse.cz>
719
720 * lto.c (add_cgraph_node_to_partition,
721 add_varpool_node_to_partition): Add debug info.
722 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
723 partitioned nodes.
724 (do_whole_program_analysis): Set function flags before dumping.
725
7a3ccc3b 7262010-10-22 Richard Guenther <rguenther@suse.de>
727
728 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
729 the new gimple_register_canonical_type.
730
55e9d7d7 7312010-10-20 H.J. Lu <hongjiu.lu@intel.com>
732
733 PR bootstrap/45954
734 * config-lang.in (boot_language): Set to $enable_lto.
735
d63880ad 7362010-10-18 Jakub Jelinek <jakub@redhat.com>
737
738 PR lto/45638
739 * Make-lang.in (check-lto): New dummy target.
740
8e8e1ee7 7412010-10-14 Eric Botcazou <ebotcazou@adacore.com>
742
743 * lto-elf.c (SHN_XINDEX): Define if not already defined.
744
f3f006ad 7452010-10-08 Joseph Myers <joseph@codesourcery.com>
746
747 * lto-lang.c (lto_init_options): Change to
748 lto_init_options_struct. Update parameters.
749 (LANG_HOOKS_INIT_OPTIONS): Don't define.
750 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
751
1e52cb3c 7522010-10-06 Jan Hubicka <jh@suse.cz>
753
754 * lto.c (lto_balanced_map): Fix accounting of program size.
755
11da9120 7562010-10-06 Jan Hubicka <jh@suse.cz>
757
758 * lto.c (lto_balanced_map): Do not produce empty partitions.
759
a3de1f55 7602010-10-06 Andi Kleen <ak@linux.intel.com>
761
762 * lto.c (lto_process_name): Add.
763 (lto_main): Call lto_process_name.
764
7ad28d2a 7652010-10-06 Jan Hubicka <jh@suse.cz>
766
767 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
768 COMDATs required by the linker.
769
eaa13879 7702010-10-05 Ian Lance Taylor <iant@google.com>
771
772 * lto.c (lto_section_with_id): Make s a const pointer.
773
48e3ea52 7742010-10-05 Jan Hubicka <jh@suse.cz>
775
776 * lto.c: Include params.h.
777 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
778 refcounting in aux field.
779 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
780 New functions.
781 (lto_1_to_1_map): Simplify.
782 (lto_balanced_map): New function.
783 (do_whole_program_analysis): Chose proper partitioning alg.
784 * Make-lang.in (lto.o): Add dependency on params.h
785
70293f47 7862010-10-04 Andi Kleen <ak@linux.intel.com>
787
788 * Make-lang.in (lto1): Add + to build rule.
789
fd30d60a 7902010-10-03 Andi Kleen <ak@linux.intel.com>
791
792 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
793 with fatal_error.
794
4a68fd3c 7952010-09-28 Jan Hubicka <jh@suse.cz>
796
797 * lto-lang.c (handle_leaf_attribute): New function.
798 (lto_attribute_tables): Add leaf.
799
2edfba82 8002010-09-25 Jie Zhang <jie@codesourcery.com>
801
802 * lto.c (lto_read_all_file_options): Start a new line after
803 printing out file names.
804
9ced88d0 8052010-09-24 Jan Hubicka <jh@suse.cz>
806
807 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
808
7ae8b539 8092010-09-20 Jan Hubicka <jh@suse.cz>
810
811 PR tree-optimize/45605
812 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
813
be1a554f 8142010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
815
816 * lto-elf.c (lto_obj_file_open): Also provide filename when
817 elf_begin fails.
818
7de998de 8192010-09-17 Jan Hubicka <jh@suse.cz>
820
821 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
822
78d063c8 8232010-09-17 Richard Guenther <rguenther@suse.de>
824
825 * lang.opt (flag_wpa): Also enable for the driver.
826
cdc58a66 8272010-09-16 Jan Hubicka <jh@suse.cz>
828
829 * lto.c (lto_materialize_function): Do not tamper with STATIC and
830 EXTERNAL flags.
831
7b80d28f 8322010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
833
834 * lto-tree.h (struct lang_type): Add variable_size GTY option.
835
3210ebe5 8362010-09-08 Jan Hubicka <jh@suse.cz>
837
838 * lto.c (real_file_count, real_file_decl_data): New static vars.
839 (read_cgraph_and_symbols): Use it.
840
7a52b640 8412010-09-08 Richard Guenther <rguenther@suse.de>
842
843 * lto.c (read_cgraph_and_symbols): Collect again after each
844 file.
845
be147e7f 8462010-09-07 Jan Hubicka <jh@suse.cz>
847
848 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
849
56c34a25 8502010-09-03 Richard Guenther <rguenther@suse.de>
851
852 * lto-elf.c (validate_file): Always error if validation fails.
853
c5cc4842 8542010-08-20 Jan Hubicka <jh@suse.cz>
855
856 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
857 (lto_wpa_write_files): Update comments.
858
9543655f 8592010-08-20 H.J. Lu <hongjiu.lu@intel.com>
860
861 PR bootstrap/45357
862 * lto.c (lto_materialize_function): Replace has_analyzed_clone
863 with has_analyzed_clone_p.
864
97b862d3 8652010-08-20 Jan Hubicka <jh@suse.cz>
866
867 * lto.c (has_analyzed_clone_p): New function
868 (lto_materialize_function): Use callgraph to determine if
869 body is needed.
870 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
871
48148244 8722010-08-20 Nathan Froyd <froydnj@codesourcery.com>
873
874 * lto.c: Use FOR_EACH_VEC_ELT.
875
eb219e9c 8762010-07-27 Andi Kleen <ak@linux.intel.com>
877
878 * Make-lang.in (lto.o): Add dependency to splay-tree.h
879
b78351e5 8802010-07-27 Joseph Myers <joseph@codesourcery.com>
881
882 * lto-lang.c (lto_handle_option): Update prototype and return
883 value type. Remove duplicate assignment to result.
884
e88d34f6 8852010-07-27 Joseph Myers <joseph@codesourcery.com>
886
887 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
888 New.
889 (lto_init_options): Update prototype.
890 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
891 Define.
892
f18bad33 8932010-07-10 Andi Kleen <ak@linux.intel.com>
894
895 PR lto/44992
896 * lto.c: Include splay-tree.h
897 (lto_resolution_read): Change to walk file_ids tree and parse
898 extra file_id in resolution file.
899 (lto_section_with_id): Add.
900 (create_subid_section_table): Add.
901 (lwstate): Add.
902 (lto_create_files_from_ids): Add.
903 (lto_file_read): Change to handle sub file ids and create list
904 of file_datas. Add output argument for count.
905 (get_section_data): Pass file_data to lto_get_section_name.
906 (lto_flatten_file): Add.
907 (read_cgraph_and_symbols): Handle linked lists of file_datas.
908
58d9117a 9092010-07-10 Andi Kleen <ak@linux.intel.com>
910
911 * lto-coff.c (hash_name, eq_name): Move.
912 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
913 * lto-elf.c: (hash_name, eq_name): Move.
914 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
915 * lto-macho.c: (hash_name, eq_name): Move.
916 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
917 * lto.c: (hash_name, eq_name): Move from lto-*.c
918 (lto_obj_create_section_hash_table): Add.
919 (free_with_string): Add.
920
0b205f4c 9212010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
922
923 * lto-coff.c: Include diagnostic-core.h in every file that
924 includes toplev.h.
925 * lto-elf.c: Likewise.
926 * lto-lang.c: Likewise.
927 * lto-macho.c: Likewise.
928
9dccd5de 9292010-07-07 Jakub Jelinek <jakub@redhat.com>
930
931 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
932 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
933 objects.
934
7550e1d1 9352010-07-05 Jan Hubicka <jh@suse.cz>
936
937 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
938 nodes from same comdat group as well as all comdat functions referenced
939 here.
b630a10e 940 (add_varpool_node_to_partition, add_references_to_partition): New
941 function.
942 (lto_1_1_map): Skip COMDAT fnctions/variables; use
943 add_varpool_node_to_partition; clear aux flags when done.
944 (lto_promote_cross_file_statics): Do not promote stuff that gets
945 duplicated to each ltrans.
7550e1d1 946
01ec0a6c 9472010-07-04 Jan Hubicka <jh@suse.cz>
948
949 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
950
09eb10ed 9512010-06-13 Richard Guenther <rguenther@suse.de>
952
953 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
954
6c8c5385 9552010-06-09 Kai Tietz <kai.tietz@onevision.com>
956
957 * lto.c (lto_resolution_read): Pre-initialize local variable r.
958 * lto-coff.c (coff_write_object_file): Add braces to if.
959
ba72912a 9602010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
961
962 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
963 (lto_file_read): Likewise.
964 (new_partition): Likewise.
965 (read_cgraph_and_symbols): Likewise.
966
4aafe913 9672010-06-07 Joseph Myers <joseph@codesourcery.com>
968
969 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
970 (lto_handle_option): Don't set flag_signed_char here.
971
fab8a209 9722010-06-04 Richard Guenther <rguenther@suse.de>
973
974 PR lto/41584
975 * lto.c (lto_1_to_1_map): Use the proper file_data for
976 varpool nodes.
977
ecb08119 9782010-05-30 Jan Hubicka <jh@suse.cz>
979
980 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
981 partitioning decisions.
982
68b8d829 9832010-05-29 Jan Hubicka <jh@suse.cz>
984
985 * lto.c (bitmap vector): Remove.
986 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
987 (ltrans_partition_def): New structure.
988 (ltrans_partition): New type and VECtor.
989 (new_partition): New function.
990 (add_cgraph_node_to_partition): New function.
991 (lto_1_to_1_map): Reorganize for partitions.
992 (lto_add_inline_clones): Remove.
993 (lto_add_all_inlinees): Remove.
994 (lto_promote_cross_file_statics): Use partitions.
995 (cmp_partitions): New function.
996 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
997 use partitions; output files sorted by size.
998
ea269688 9992010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1000
1001 * Make-lang.in: Replace vec.h dependency with VEC_H.
1002
8fb69344 10032010-05-28 Joseph Myers <joseph@codesourcery.com>
1004
1005 * lto-coff.c (coff_errmsg): Remove.
1006 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
1007 errors instead of coff_errmsg (-1).
1008 * lto-macho.c (mach_o_errmsg): Remove.
1009 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
1010 instead of mach_o_errmsg (-1).
1011 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
1012 xstrerror (errno).
1013
2024fa7d 10142010-05-28 Richard Guenther <rguenther@suse.de>
1015
1016 * lto.c (prefix_name_with_star): Removed.
1017 (strip_extension): Likewise.
1018 (get_filename_for_set): Likewise.
1019 (lto_write_ltrans_list): Fold into ...
1020 (lto_wpa_write_files): ... this. Name LTRANS units
1021 by suffixing the ltrans output list filename.
1022 (do_whole_program_analysis): Adjust.
1023
852f689e 10242010-05-27 Joseph Myers <joseph@codesourcery.com>
1025
1026 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
1027 (read_cgraph_and_symbols, lto_main): Use seen_error.
1028 * Make-lang.in (lto/lto.o): Update dependencies.
1029
3c9e9cba 10302010-05-27 Eric Botcazou <ebotcazou@adacore.com>
1031
1032 PR lto/44230
1033 * lto.h (lto_eh_personality): New prototype.
1034 * lto.c: Include debug.h.
1035 (first_personality_decl): New static variable.
1036 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
1037 first function for which it is non-null.
1038 (lto_eh_personality_decl): New static variable.
1039 (lto_eh_personality): New function.
1040 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
1041 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
1042
cdd0ea37 10432010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1044
1045 * lto-lang.c: Do not include expr.h.
1046
71eb351d 10472010-05-24 Richard Guenther <rguenther@suse.de>
1048
1049 * lto-elf.c (lto_obj_build_section_table): Work around
1050 FreeBSD libelf issue.
1051
ca3e35a1 10522010-05-22 Richard Guenther <rguenther@suse.de>
1053
1054 * lto.c (read_cgraph_and_symbols): Do not collect.
1055
e5507c85 10562010-05-20 Jan Hubicka <jh@suse.cz>
1057
1058 * lto.c (promote_var, promote_fn): New functions.
1059 (lto_promote_cross_file_statics): Compute correctly boundary including
1060 static initializers of readonly vars.
1061
a510bd8d 10622010-05-18 Jan Hubicka <jh@suse.cz>
1063
e5507c85 1064 * lto.c (lto_1_to_1_map): Partition non-inline clones.
a510bd8d 1065 (lto_promote_cross_file_statics): Deal with non-inline clones.
1066
1375c6f8 10672010-05-18 Jan Hubicka <jh@suse.cz>
1068
1069 * lto.c (lto_materialize_function): Announce function when
1070 reading body; allocate_struct_function only when reading body;
1071 do not finalize local statics; ggc_collect after reading;
1072 do not mark reachable node.
1073 (materialize_cgraph): Do not announce function.
1074
757a3237 10752010-05-11 Jan Hubicka <jh@suse.cz>
1076
1077 * lto.c (materialize_cgraph): Revert my previous patch.
1078
942dc465 10792010-05-11 Kai Tietz <kai.tietz@onevision.com>
1080
1081 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
1082 IMAGE_FILE_MACHINE_AMD64.
1083 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
1084
b4c8770a 10852010-05-11 Jan Hubicka <jh@suse.cz>
1086
1087 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
1088 (materialize_cgraph): Add it here.
1089
25429dc2 10902010-05-11 Jan Hubicka <jh@suse.cz>
1091
1092 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
1093 vector.
1094
10952010-05-11 Jan Hubicka <jh@suse.cz>
1096
1097 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
1098 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
1099 use reachable_from_other_partition_p and
1100 referenced_from_other_partition_p test.
1101
6dd40464 11022010-05-11 Kai Tietz <kai.tietz@onevision.com>
1103
1104 * lto-coff.c (validate_file): Add x64-coff support.
1105 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
1106 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
1107 * lto-lang.c (lto_build_c_type_nodes): Add check for
1108 'long long unsigned int' for x64-windows.
1109 (lto_init): Likewise.
1110
1111
23433d72 11122010-05-07 Steven Bosscher <steven@gcc.gnu.org>
1113
1114 * lto.h (struct lto_file_struct): Document offset member.
1115 * lto-endian.h: New file.
1116 * lto-macho.h: New file.
1117 * lto-macho.c: New file.
1118 * Make-lang.in: Add rule for lto-macho.o.
1119
eb4ef3d1 11202010-05-07 Richard Guenther <rguenther@suse.de>
1121
1122 PR lto/43857
1123 PR lto/43371
1124 * lang.opt (fresolution): Change to ...
1125 (fresolution=): ... this.
1126 * lto-lang.c (lto_handle_option): Adjust.
1127
264cbb51 11282010-05-07 Richard Guenther <rguenther@suse.de>
1129
1130 * lto.c (DUMPBASE_SUFFIX): Remove.
1131 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
1132 Rename to ...
1133 (lto_write_ltrans_list): ... only output the list of ltrans files.
1134 (lto_maybe_unlink): Remove.
1135 (do_whole_program_analysis): Do not execute LTRANS phase
1136 from here.
1137
11dc3713 11382010-05-06 H.J. Lu <hongjiu.lu@intel.com>
1139
1140 * lto-lang.c (lto_handle_option): Add argument kind.
1141
8d810329 11422010-05-05 Jan Hubicka <jh@suse.cz>
1143
264cbb51 1144 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
1145 refs.
8d810329 1146
a238367f 11472010-05-05 Jan Hubicka <jh@suse.cz>
1148
1149 * lto.c (lto_1_to_1_map): Partition only needed nodes.
1150
bf7d782b 11512010-04-30 Jan Hubicka <jh@suse.cz>
1152
b630a10e 1153 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
1154 use default name.
bf7d782b 1155 (lto_wpa_write_files): Write any non-empty partition.
1156
da67d826 11572010-04-30 Jan Hubicka <jh@suse.cz>
1158
1159 * lto.c: Do not attempt to make constant pool references global.
1160
57305941 11612010-04-28 Jan Hubicka <jh@suse.cz>
1162
1163 * lto/lto.c (lto_read_in_decl_state): Use GGC.
1164 (lto_wpa_write_files): Announce what we are writting.
1165 (all_file_decl_data): New.
1166 (read_cgraph_and_symbols): Use GGC; correct timevars.
1167 (do_whole_program_analysis): Collect.
1168 * lto/Make-lang.in (lto.o): Fix dependency.
1169 * Makefile.in (GTFILES): Add lto-streamer.h.
1170 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
1171 (varpool_assemble_pending_decls): Use VAROUT.
1172 * lto-streamer.h (lto_tree_ref_table): Annotate.
1173 (lto_in_decl_state): Annotate.
1174 (lto_file_decl_data): Annotate.
1175
0cddb138 11762010-04-28 Jan Hubicka <jh@suse.cz>
1177
1178 * lto.c (lto_varpool_node_sets): New.
1179 (lto_1_to_1_map): Partition varpool too.
1180 (globalize_context_t, globalize_cross_file_statics,
1181 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
1182 lto_scan_statics_in_remaining_global_vars): Remove.
1183 (lto_promote_cross_file_statics): Rewrite.
1184 (get_filename_for_set): Take vset argument.
1185 (lto_wpa_write_files): Pass around vsets.
1186
4d992eb6 11872010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
1188
1189 PR lto/42776
1190 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
1191 hardcoding 'lto-elf.o'.
1192 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
1193
1194 * lto-coff.h: New file.
1195 * lto-coff.c: Likewise.
1196
9c491711 11972010-04-26 Richard Guenther <rguenther@suse.de>
1198
1199 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
1200
3ba0ce47 12012010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
1202
1203 * lto.h (lto_elf_file_open): Rename prototype from this ...
1204 (lto_obj_file_open): ... to this.
1205 (lto_elf_file_close): Likewise ...
1206 (lto_obj_file_close): ... and likewise.
1207 (lto_elf_build_section_table): Likewise ...
1208 (lto_obj_build_section_table): ... and likewise.
1209 (lto_elf_begin_section): Likewise ...
1210 (lto_obj_begin_section): ... and likewise.
1211 (lto_elf_append_data): Likewise ...
1212 (lto_obj_append_data): ... and likewise.
1213 (lto_elf_end_section): Likewise ...
1214 (lto_obj_end_section): ... and likewise.
1215 * lto.c (lto_file_read): Update references to the above.
1216 (lto_wpa_write_files): Likewise.
1217 (lto_read_all_file_options): Likewise.
1218 (read_cgraph_and_symbols): Likewise.
1219 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
1220 (LANG_HOOKS_APPEND_DATA): Likewise.
1221 (LANG_HOOKS_END_SECTION): Likewise.
1222 * lto-elf.c (lto_elf_file_open): Rename from this ...
1223 (lto_obj_file_open): ... to this, updating any references.
1224 (lto_elf_file_close): Likewise ...
1225 (lto_obj_file_close): ... and likewise.
1226 (lto_elf_build_section_table): Likewise ...
1227 (lto_obj_build_section_table): ... and likewise.
1228 (lto_elf_begin_section): Likewise ...
1229 (lto_obj_begin_section): ... and likewise.
1230 (lto_elf_append_data): Likewise ...
1231 (lto_obj_append_data): ... and likewise.
1232 (lto_elf_end_section): Likewise ...
1233 (lto_obj_end_section): ... and likewise.
1234
5a2aecd6 12352010-04-21 Jan Hubicka <jh@suse.cz>
1236
1237 * lto.c (lto_fixup_tree): Do not call wpa fixup.
1238 (materialize_cgraph): Likewise.
1239
ddc90d88 12402010-04-21 Jan Hubicka <jh@suse.cz>
1241
1242 * lto.c (lto_wpa_write_files): Update.
1243 (read_cgraph_and_symbols): Be more verbose.
1244 (materialize_cgraph): Likewise.
1245 (do_whole_program_analysis): Likewise.
1246
e288c7a9 12472010-04-21 Jan Hubicka <jh@suse.cz>
1248
1249 * lto.c (globalize_cross_file_statics): When function has address taken,
1250 it needs to be public.
1251
08843223 12522010-04-20 Jan Hubicka <jh@suse.cz>
1253
1254 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
1255 (lto_add_all_inlinees): Likewise.
1256 (lto_wpa_write_files): Likewise.
1257
ad086ed4 12582010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1259
1260 * lto-lang.c (lto_init): Remove second argument in call to
1261 build_common_tree_nodes.
1262
d6845139 12632010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1264
1265 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
1266 function.
1267
a5813485 12682010-03-09 Eric Botcazou <ebotcazou@adacore.com>
1269
1270 PR bootstrap/43276
1271 * lto-elf.c: Define EM_* constants if not already defined.
1272
a219f6a5 12732010-03-03 Eric Botcazou <ebotcazou@adacore.com>
1274
1275 * lto-elf.c (is_compatible_architecture): New static function.
1276 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
1277
2bd888dc 12782010-02-11 Richard Guenther <rguenther@suse.de>
1279
1280 PR driver/43021
1281 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
1282 appropriately.
1283
27721832 12842010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
1285
1286 * lto.c (O_BINARY): Define.
1287 (lto_read_section_data): Open file in binary mode.
1288 * lto-elf.c (O_BINARY): Define.
1289 (lto_elf_file_open): Open file in binary mode.
1290
3bfd70ae 12912010-01-08 Richard Guenther <rguenther@suse.de>
1292
1293 PR lto/42528
1294 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
1295 (lto_init): Do not init char_type_node in a standard way
1296 but according to flag_signed_char.
1297
50ca7c37 12982010-01-03 H.J. Lu <hongjiu.lu@intel.com>
1299
1300 PR lto/41564
1301 * lto.c (DUMPBASE_SUFFIX): New.
1302 (lto_execute_ltrans): Append a sequence number to -dumpbase
1303 for LTRANS.
1304
d5e86d20 13052010-01-02 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 PR lto/42580
1308 * lto-elf.c (lto_elf_file_open): Stop if the command line
1309 option file is missing.
1310
08a7e80f 13112009-12-15 Richard Guenther <rguenther@suse.de>
1312
1313 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
1314 (lto_post_options): Do not disable debuginfo.
1315
4af4d09c 13162009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
1317
1318 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
1319
50b2dbd9 13202009-12-11 Richard Guenther <rguenther@suse.de>
1321
1322 PR lto/42037
1323 * lto.c (lto_resolution_read): Properly grow the vector.
1324
97e90c2e 13252009-12-11 Richard Guenther <rguenther@suse.de>
1326
1327 PR lto/41915
1328 * lto-lang.c (lto_init_options): Initialize flag_complex_method
1329 to the C99 default. Do not set flag_unit_at_a_time.
1330
f018d957 13312009-11-28 Jakub Jelinek <jakub@redhat.com>
1332
1333 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
1334 variable.
1335
81897669 13362009-11-19 Rafael Avila de Espindola <espindola@google.com>
1337
1338 PR bootstrap/42096
1339 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
1340 * lto.c (lto_parse_hex): New.
1341 (lto_resolution_read): Use lto_parse_hex.
1342 * lto.h (lto_parse_hex): New.
1343
b7fedf62 13442009-11-17 Rafael Avila de Espindola <espindola@google.com>
1345
1346 * lto-elf.c (lto_file_init): Add offset argument.
1347 (lto_elf_file_open): Record the offset.
1348 * lto.c (lto_resolution_read): Change file_name into a lto_file
1349 argument. Check offsets.
1350 (lto_file_read): Update call to lto_resolution_read.
1351 * lto.h (lto_file_struct): Add the offset field.
1352
6575099f 13532009-11-16 Rafael Avila de Espindola <espindola@google.com>
1354
1355 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
1356
6d1cc52c 13572009-11-14 Jan Hubicka <jh@suse.cz>
1358
1359 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
1360
d405c5a4 13612009-11-12 Rafael Avila de Espindola <espindola@google.com>
1362
1363 * lang.opt (fresolution): Renamed from resolution.
1364 * lto-lang.c (lto_handle_option): Handle new option name.
1365 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
1366
06b9e52b 13672009-11-04 Richard Guenther <rguenther@suse.de>
1368 Rafael Avila de Espindola <espindola@google.com>
1369
1370 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
1371 (lto_elf_file_open): Handle offsets in arguments name@offest.
1372
f5a023c5 13732009-10-30 Richard Guenther <rguenther@suse.de>
1374
1375 PR lto/41858
1376 * lto.c (lto_file_read): Do not set file_data->fd.
1377 (lto_read_section_data): Use a single-entry file-descriptor cache.
1378 Do not check the result of xmalloc.
1379 (free_section_data): Do not use file_data->fd.
1380 (lto_read_all_file_options): Likewise.
1381
21ce3cc7 13822009-10-22 Richard Guenther <rguenther@suse.de>
1383
1384 * lto.c (lto_fixup_jump_functions): Remove.
1385 (lto_fixup_decls): Do not fixup jump functions.
1386 (read_cgraph_and_symbols): Schedule cgraph merging after
1387 summary reading. Schedule type and decl fixup before
1388 summary reading.
1389
5575303a 13902009-10-22 Richard Guenther <rguenther@suse.de>
1391
1392 * lto.c (lto_fixup_data_t): Remove free_list member.
1393 (lto_fixup_tree): Do not insert into free_list.
1394 (free_decl): Remove.
1395 (lto_fixup_decls): Remove free-list handling.
1396
8867b500 13972009-10-22 Jan Hubicka <jh@suse.cz>
1398
1399 * lto.c (lto_fixup_jump_functions): New function.
1400 (lto_fixup_decls): Use it.
1401
b787522e 14022009-10-16 Richard Guenther <rguenther@suse.de>
1403
1404 PR lto/41715
1405 * lto.c (lto_fixup_tree): Revert last change.
1406
bc0ed27c 14072009-10-14 Richard Guenther <rguenther@suse.de>
1408
1409 * lto.c (lto_fixup_tree): In case the prevailing decl is not
1410 compatible with the one we replace wrap it around a
1411 VIEW_CONVERT_EXPR.
1412
c515f146 14132009-10-09 Richard Guenther <rguenther@suse.de>
1414
1415 PR lto/41635
1416 PR lto/41636
1417 * lto.c (read_cgraph_and_symbols): Do not assert we can open
1418 a file.
1419 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
1420 (init_ehdr##BITS): Likewise.
1421
48cf7037 14222009-10-08 Joseph Myers <joseph@codesourcery.com>
1423
1424 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
1425 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
1426 diagnostics.
1427 * lto-lang.c (lto_post_options): Remove trailing "." from
1428 diagnostics.
1429
7366cbe7 14302009-10-08 Richard Guenther <rguenther@suse.de>
1431
1432 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
1433 hash tables.
1434
7c3f71c3 14352009-10-07 Joseph Myers <joseph@codesourcery.com>
1436
1437 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
1438
59dd4830 14392009-10-07 Jan Hubicka <jh@suse.cz>
1440
1441 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
1442 ltrans stage; explain why this is needed and should not.
1443
fd193bcd 14442009-10-05 Richard Guenther <rguenther@suse.de>
1445
1446 PR lto/41552
1447 PR lto/41487
1448 * lto.c (lto_read_decls): Do not register deferred decls.
1449 (read_cgraph_and_symbols): Delay symbol and cgraph merging
1450 until after reading the IPA summaries.
1451
7bfefa9d 14522009-10-02 Rafael Avila de Espindola <espindola@google.com>
1453
1454 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
1455 (lto-lang.c): Don't include lto/common.h.
1456
14572009-10-02 Rafael Avila de Espindola <espindola@google.com>
1458
1459 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
1460 (lto/common.o): Remove.
1461 * common.c: Remove.
1462 * common.h (lto_kind_str): Remove.
1463 (lto_visibility_str): Remove.
1464 (lto_resolution_str): Make it static.
1465
14662009-10-01 Diego Novillo <dnovillo@google.com>
1467
1468 * lto.c (lto_read_decls): Add comment.
1469 Call internal_error instead of gcc_assert.
1470 (lto_resolution_read): Likewise.
1471 (lto_add_all_inlinees): Tidy.
1472 * Make-lang.in: Fix copyright boilerplate.
1473 (lto.pdf): New.
1474 (lto.install-pdf): New.
1475 * lto-tree.h: Fix copyright boilerplate.
1476 * lang-specs.h: Likewise.
1477 Remove ".lto" entry from compilers fragment.
1478 * lto-elf.c: Move inclusion of gelf.h after config.h.
1479 Tidy formatting everywhere.
1480 * lto.h: Fix copyright boilerplate.
1481 Tidy formatting everywhere.
1482 * common.c: Likewise.
1483 * config-lang.in: Likewise.
1484 * common.h: Likewise.
1485 * lto-lang.c: Likewise.
1486
14872009-10-01 Richard Guenther <rguenther@suse.de>
1488
1489 * lto.c (lto_read_section_data): Use plain lseek/read.
1490
14912009-10-01 Richard Guenther <rguenther@suse.de>
1492
1493 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
1494 use sysconf to query the system page size.
1495 (lto_file_read): Implement fallback using stdio.
1496 (free_section_data): Likewise.
1497
14982009-09-29 Diego Novillo <dnovillo@google.com>
1499
1500 * lto-lang.c (lto_init): Really fix call to
1501 build_common_builtin_nodes.
1502
15032009-09-29 Diego Novillo <dnovillo@google.com>
1504
1505 * lto-lang.c (lto_init): Fix call to
1506 build_common_builtin_nodes.
1507
15082009-09-29 Richard Guenther <rguenther@suse.de>
1509
1510 PR lto/40754
1511 * lto-elf.c (init_shdr##BITS): Properly specify alignment
1512 in bytes.
1513 (first_data_block): New static variable.
1514 (lto_elf_append_data): Align the first data block in each
1515 section.
1516
15172009-09-28 Diego Novillo <dnovillo@google.com>
1518
1519 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
1520 * lto.c (strip_extension): New.
1521 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
1522 (lto_execute_ltrans): Tidy.
1523 Do not pass -fwpa nor -fltrans-* to LTRANS.
1524 * opts.c: Tidy formatting and remove stale FIXME lto markers.
1525 * tree.c (need_assembler_name_p): Call
1526 lang_hooks.decls.may_need_assembler_name_p if set.
1527 * varasm.c (default_binds_local_p_1): Remove check for
1528 flag_ltrans.
1529 * varpool.c (decide_is_variable_needed): Do not test for
1530 in_lto_p.
1531
15322009-09-22 Richard Guenther <rguenther@suse.de>
1533
1534 PR lto/39276
1535 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
1536 * Make-lang.in: Remove ltrans-driver stuff.
1537 * config-lang.in: Likewise.
1538 * lang.opt (fltrans-driver): Remove.
1539 * lto-lang.c (lto_init_options): Remove code initializing
1540 ltrans_driver.
1541 * ltrans-driver: Remove.
1542
15432009-09-21 Diego Novillo <dnovillo@google.com>
1544
1545 * lto-lang.c (lto_define_builtins): Remove superfluous
1546 calls to targetm.init_builtins and build_common_builtin_nodes.
1547 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
1548 build_common_builtin_nodes.
1549 * lto.c (lto_materialize_function): Do nothing if NODE is a
1550 clone.
1551
15522009-09-03 Diego Novillo <dnovillo@google.com>
1553
1554 * lto-elf.c (validate_file): Replace call to
1555 elf_getshstrndx with call to elf_getshdrstrndx.
1556
15572009-08-19 Richard Guenther <rguenther@suse.de>
1558
1559 * lto-lang.c (lto_init): Merge char_type_node with the
1560 appropriately signed variant.
1561
15622009-08-19 Richard Guenther <rguenther@suse.de>
1563
1564 PR lto/41071
1565 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
1566 (lto_fixup_type): Re-build the pointer-to chain part two.
1567
15682009-08-19 Richard Guenther <rguenther@suse.de>
1569
1570 PR lto/41071
1571 * lto.c (lto_fixup_type): Re-build the type variant chain.
1572
15732009-08-19 Richard Guenther <rguenther@suse.de>
1574
1575 PR lto/41071
1576 * lto.c (lto_fixup_constructor): New function.
1577 (lto_fixup_tree): Replace all types. Properly fixup
1578 constructors and constants.
1579
15802009-08-14 Richard Guenther <rguenther@suse.de>
1581
1582 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
1583 for DECL_LANG_SPECIFIC.
1584
15852009-08-13 Richard Guenther <rguenther@suse.de>
1586
1587 PR lto/41032
1588 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
1589
15902009-07-30 Richard Guenther <rguenther@suse.de>
1591
1592 PR lto/40903
1593 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
1594 the largest decl for output and free TREE_CHAIN for further
1595 use.
1596
15972009-07-24 Diego Novillo <dnovillo@google.com>
1598
1599 * Make-lang.in: Add empty lto.install-plugin target.
1600
16012009-07-13 Diego Novillo <dnovillo@google.com>
1602
1603 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
1604
16052009-07-11 Richard Guenther <rguenther@suse.de>
1606
1607 * lto-lang.c (lto_write_globals): Wrapup global decls.
1608
16092009-07-10 Richard Guenther <rguenther@suse.de>
1610
1611 * lto-lang.c (lto_init): Allocate one more location to make
1612 BUILTINS_LOCATION correct.
1613
16142009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1615
1616 * lto.c (free_section_data): Cast computed_offset to caddr_t.
1617
16182009-07-06 Diego Novillo <dnovillo@google.com>
1619
1620 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
1621 TYPE_SIZE_UNIT.
1622
16232009-07-06 Diego Novillo <dnovillo@google.com>
1624
1625 * lto.c (preload_common_nodes): Remove.
1626 (lto_read_in_decl_state): Call lto_streamer_cache_get.
1627 (lto_read_decls): Call lto_data_in_create and
1628 lto_data_in_delete.
1629 (free_decl): Do not call ggc_free.
1630 (lto_main): Call lto_init_reader.
1631 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
1632 (lto_init): Initialize main_identifier_node if needed.
1633 Make ptrdiff_type_node be integer_type_node.
1634
16352009-06-19 Diego Novillo <dnovillo@google.com>
1636
1637 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
1638 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
1639 Remove code guarded by #ifdef LOCAL_TRACE.
1640
16412009-06-18 Diego Novillo <dnovillo@google.com>
1642
1643 * lto.c: Update license to GPLv3.
1644 * lto-elf.c: Likewise.
1645 * common.c: Likewise.
1646 * lto-lang.c: Likewise.
1647 * lto.h: Remove superfluous include files. Update all
1648 users.
1649
16502009-06-17 Diego Novillo <dnovillo@google.com>
1651
1652 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
1653
16542009-06-02 Diego Novillo <dnovillo@google.com>
1655
1656 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
1657 read in.
1658 (materialize_cgraph): Only materialize nodes that have a
1659 representation on file.
1660
16612009-06-01 Diego Novillo <dnovillo@google.com>
1662
1663 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
1664
16652009-05-31 Diego Novillo <dnovillo@google.com>
1666
1667 * lto-lang.c (lto_type_for_mode): Handle all the modes
1668 handled in c_common_type_for_mode.
1669
16702009-05-21 Diego Novillo <dnovillo@google.com>
1671
1672 * lto-elf.c: Always include <gelf.h>.
1673 * config-lang.in (target_libs): Remove.
1674 (build_by_default): Set to no.
1675
16762009-05-15 Diego Novillo <dnovillo@google.com>
1677
1678 * lto.c (lto_materialize_function): Assert that DECL is
1679 not a builtin.
1680 (materialize_cgraph): Don't try to materialize builtin
1681 functions.
1682 * lto-section-out.c (write_symbol_vec): Do not write
1683 builtin functions.
1684
16852009-05-13 Diego Novillo <dnovillo@google.com>
1686
1687 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
1688
16892009-05-07 Diego Novillo <dnovillo@google.com>
1690
1691 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
1692 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
1693 (lto_fixup_type): Call it for TYPE_POINTER_TO,
1694 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
1695 (lto_fixup_tree): Call gimple_register_type when *TP is a
1696 type.
1697 (lto_main): Call bitmap_obstack_initialize.
1698
16992009-04-22 Diego Novillo <dnovillo@google.com>
1700
1701 * lto.c (free_section_data): Tidy.
1702 (lto_1_to_1_map): Tidy.
1703 (lto_add_all_inlinees): Tidy.
1704 (prefix_name_with_star): New.
1705 (get_filename_for_set): New.
1706 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
1707 to determine what cgraph node sets to write.
1708 Call get_filename_for_set to compute temporary file
1709 names.
1710 (lto_execute_ltrans): Do not execute LTRANS on files with
1711 names that start with '*'.
1712 Move logic to execute LTRANS together so that LTRANS is
1713 invoked only if there are any files to compile.
1714 (do_whole_program_analysis): Only remove output files
1715 that do not start with '*'.
1716
17172009-04-06 Diego Novillo <dnovillo@google.com>
1718
1719 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
1720 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
1721 (lto_add_all_inlinees): Tidy.
1722
17232009-03-26 Diego Novillo <dnovillo@google.com>
1724
1725 * lto.c: Include gimple.h.
1726 (lto_read_in_decl_state): Call gimple_register_type for
1727 every type in every stream.
1728 (lto_fixup_common): Call gimple_register_type if T has a
1729 type.
1730 (do_whole_program_analysis): Call print_lto_report.
1731 (lto_main): Call print_lto_report after cgraph_optimize.
1732 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
1733
17342009-03-24 Diego Novillo <dnovillo@google.com>
1735
1736 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
1737 (lto.o): Add dependency on GIMPLE_H.
1738
17392009-03-10 Simon Baldwin <simonb@google.com>
1740
1741 * lto.c (lto_read_all_file_options): Close any open file descriptor
1742 contained in file_data before freeing.
1743
17442009-02-24 Rafael Avila de Espindola <espindola@google.com>
1745
1746 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1747 for a decl in the original bitmap, not a node.
1748 (lto_add_all_inlinees): Remove original nodes that are not needed.
1749 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1750
17512009-02-24 Diego Novillo <dnovillo@google.com>
1752
1753 * lto.c (lto_materialize_function): Update
1754 lto_stats.num_function_bodies.
1755 (get_section_data): Initialize *LEN to 0.
1756 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
1757 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
1758 Update lto_stats.num_output_files.
1759 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
1760 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
1761 (lto_main): Initialize lto_stats.
1762 If flag_lto_report is set, call print_lto_report.
1763
17642009-02-19 Diego Novillo <dnovillo@google.com>
1765
1766 Revert
1767
1768 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
1769
1770 * lto.c (lto_add_inline_clones): Don't add the
1771 master clone. Check for a decl in the original
1772 bitmap, not a node.
1773 (lto_add_all_inlinees): Remove original nodes
1774 that are not needed.
1775 (lto_scan_statics_in_cgraph_node): Don't care if
1776 the node is the master.
1777 (lto_promote_cross_file_statics): Use a new
1778 context.seen_node_decls for each set
1779
17802009-02-19 Rafael Avila de Espindola <espindola@google.com>
1781
1782 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1783 for a decl in the original bitmap, not a node.
1784 (lto_add_all_inlinees): Remove original nodes that are not needed.
1785 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1786 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
1787 for each set
1788
17892009-02-18 Diego Novillo <dnovillo@google.com>
1790
1791 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
1792 and TV_WHOPR_WPA_IO.
1793 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
1794 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
1795 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
1796 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
1797 depending on command line flags.
1798 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
1799 (lto_main): Remove timer uses.
1800
18012009-02-18 Rafael Avila de Espindola <espindola@google.com>
1802
1803 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
1804 (lto_wpa_write_files): Update calls to renamed functions.
1805
18062009-02-17 Diego Novillo <dnovillo@google.com>
1807
1808 PR 39203
1809 * lto-lang.c (lto_post_options): Disable -fwhole-program
1810 when running LTRANS.
1811
18122009-02-10 Diego Novillo <dnovillo@google.com>
1813
1814 * lto.c (read_cgraph_and_symbols): Fix comment.
1815
18162009-02-10 Diego Novillo <dnovillo@google.com>
1817
1818 * lto.c (read_cgraph_and_symbols): Read options from all
1819 IL files.
1820
18212009-02-10 Diego Novillo <dnovillo@google.com>
1822
1823 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
1824 (materialize_cgraph): Likewise.
1825 (do_whole_program_analysis): Likewise.
1826 (lto_main): Call read_cgraph_and_symbols,
1827 materialize_cgraph and do_whole_program_analysis.
1828
18292009-02-10 Simon Baldwin <simonb@google.com>
1830
1831 * lto.c: Include lto-opts.h.
1832 * (lto_main): Clear file options at loop start, read any saved
1833 options from the first file handled, and re-issue options.
1834 * Makefile.in (lto.o): Add dependency on lto-opts.h.
1835
18362009-02-02 Diego Novillo <dnovillo@google.com>
1837
1838 * lto.c (lto_main): Stop LTO_TIMER and use
1839 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
1840
18412009-01-30 H.J. Lu <hongjiu.lu@intel.com>
1842
1843 PR lto/38995
1844 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
1845 to POINTER_SIZE.
1846
18472009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
1848
1849 * Make-lang.in (LTO_EXE): Link with all
1850 BACKENDLIBS and not only GMPLIBS
1851
18522009-01-28 H.J. Lu <hongjiu.lu@intel.com>
1853
1854 PR bootstrap/38992
1855 * lto-elf.c: Include gelf.h instead of libelf.h.
1856 (lto_elf_file_close): Replace elfx_update_shstrndx with
1857 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
1858 gelf_update_ehdr.
1859
18602009-01-28 H.J. Lu <hongjiu.lu@intel.com>
1861
1862 PR middle-end/38996
1863 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
1864
18652009-01-26 Diego Novillo <dnovillo@google.com>
1866
1867 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
1868
18692009-01-26 Diego Novillo <dnovillo@google.com>
1870
1871 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
1872 and rename into gimple_types_compatible_p.
1873
18742009-01-12 Rafael Avila de Espindola <espindola@google.com>
1875
1876 * lto-lang.c (lang_hooks): Remove the const qualifier.
1877
18782009-01-06 Diego Novillo <dnovillo@google.com>
1879
1880 * ltrans-driver: Mark 'all' target as phony.
1881
18822008-12-31 Diego Novillo <dnovillo@google.com>
1883
1884 * ltrans-driver: Execute a NOP action for target 'all'.
1885
18862008-12-19 Diego Novillo <dnovillo@google.com>
1887
1888 * lto.c (lto_1_to_1_map): Tidy.
1889
18902008-12-19 Diego Novillo <dnovillo@google.com>
1891
1892 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
1893 be opened, show its name.
1894 * ltrans-driver: If $verbose is set, do not use parallelism.
1895
18962008-12-17 Rafael Avila de Espindola <espindola@google.com>
1897
1898 * lto.c (lto_fixup_function): New.
1899 (lto_fixup_tree): Call lto_fixup_function.
1900
19012008-12-14 Doug Kwan <dougkwan@google.com>
1902
1903 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
1904 variables if there is no function.
1905
19062008-12-10 Simon Baldwin <simonb@google.com>
1907
1908 * ltrans-driver: Always run make in silent mode, to avoid make's
1909 trace on stdout interfering with lto-wrapper output.
1910
19112008-12-10 Doug Kwan <dougkwan@google.com>
1912
1913 * lto.c (lto_add_inline_clones): Do not force master clones of
1914 inlined functions already in SET to be static inline.
1915
19162008-12-04 Doug Kwan <dougkwan@google.com>
1917
1918 * lto.c (globalize_context_t): New type to store states in
1919 globalization of cross-file statics.
1920 (globalize_cross_file_statics): New.
1921 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
1922 static decls that need to be fixed up.
1923 (lto_scan_statics_in_cgraph_node): Change call interface to use
1924 a globalize_context_t CONTEXT for all states used.
1925 (lto_scan_statics_in_remaining_global_vars): New.
1926 (lto_promote_cross_file_statics): Use new call interface of
1927 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
1928 visible vars in the last set.
1929
19302008-12-03 Diego Novillo <dnovillo@google.com>
1931
1932 * lto.c (lto_fixup_tree): Do not emit an error when
1933 PREVAILING throw but T doesn't.
1934
19352008-12-02 Doug Kwan <dougkwan@google.com>
1936
1937 * lto.c (lto_scan_statics_in_ref_table): New function factored out
1938 from code in ...
1939 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
1940 variables and functions.
1941 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
1942 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
1943
19442008-11-29 Diego Novillo <dnovillo@google.com>
1945
1946 * lto.c: Include timevar.h.
1947 (lto_materialize_function): Tidy. Add comments.
1948 (lto_wpa_write_files): Tidy.
1949 (lto_execute_ltrans): Tidy.
1950 (lto_main): Add local variable LTO_TIMER. Initialize it
1951 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
1952 Start and stop the timer.
1953 Tidy comments.
1954 * Make-lang.in (lto.o): Add dependency on timevar.h.
1955 * ltrans-driver: React to -v and -save-temps.
1956 Use simple heuristic to determine how much parallelism to
1957 use when executing make.
1958
19592008-11-12 Doug Kwan <dougkwan@google.com>
1960
1961 * lto.c (lto_bitmap_obstack): Remove var.
1962 (lto_materialize_function): Do nothing instead of marking function
1963 body in file if flag_wpa is true.
1964 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
1965 (lto_scan_statics_in_cgraph_node): New function.
1966 (lto_promote_cross_file_statics): Same.
1967 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
1968 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
1969 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
1970
19712008-11-09 Diego Novillo <dnovillo@google.com>
1972
1973 * lto/lto.c (lto_fixup_tree): Change error message locus
1974 information to include location of mismatching
1975 declaration.
1976 Use TREE_NO_WARNING to avoid repeated messages.
1977 (lto_main): If lto_fixup_decls emitted any errors, exit.
1978 * lto/lto-lang.c: Don't include libfuncs.h and except.h
1979 (lto_init_options): Don't enable exceptions by default.
1980 (lto_eh_runtime_type): Move to lto-function-in.c
1981 (lto_init_eh): Likewise.
1982 (lto_init): Don't call lto_init_eh.
1983 * lto/Make-lang.in (lto-lang.o): Remove dependency on
1984 libfuncs.h and except.h.
1985
19862008-10-30 Diego Novillo <dnovillo@google.com>
1987
1988 * lto.c (lto_read_decls): Declare debug_main only if
1989 LTO_STREAM_DEBUGGING is enabled.
1990
19912008-10-30 Simon Baldwin <simonb@google.com>
1992
1993 * lto.c (lto_wpa_write_files): Create intermediate files with
1994 make_cwd_temp_file().
1995 (lto_maybe_unlink): New. Delete intermediate WPA files unless
1996 WPA_SAVE_LTRANS is set.
1997 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
1998 * ltrans-driver: Do not strip directory from output files.
1999
20002008-10-29 Doug Kwan <dougkwan@google.com>
2001
2002 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
2003 DECL.
2004 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
2005 (lto/lto-symtab.o): Remove rule.
2006 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
2007 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
2008 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
2009 Remove macros.
2010 lto-symtab.c (File): Move up one level.
2011 lto-lang.c (cgraph.h): Remove include.
2012 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2013 input_cgraph): Move to lto-cgraph.c in gcc directory above.
2014 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
2015
20162008-10-24 Rafael Espindola <espindola@google.com>
2017
2018 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
2019 non prevailing weak symbols.
2020
20212008-10-24 Rafael Espindola <espindola@google.com>
2022
2023 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
2024
20252008-10-24 Rafael Espindola <espindola@google.com>
2026
2027 * lto-lang.c (input_node): Avoid casts from pointers to ints of
2028 different types.
2029
20302008-10-23 Simon Baldwin <simonb@google.com>
2031
2032 * lto-lang.c (input_node): Save the node reference, rather than the
2033 node pointer, in node->inlined_to.
2034 (input_cgraph_1): Convert node references into node pointers.
2035
20362008-10-22 Diego Novillo <dnovillo@google.com>
2037 Rafael Espindola <espindola@google.com>
2038
2039 * lto.c (lto_resolution_read): Tidy.
2040 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
2041 abort if RET is NULL.
2042
20432008-10-22 Doug Kwan <dougkwan@google.com>
2044
2045 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
2046 exceptions flag is given.
2047 * lto-lang.c: (lto_init_options) Set default exceptions flag.
2048 (lto_init_eh): Remove exceptions flag initialization.
2049 (lto_init): Only call lto_init_eh if exceptions flag is set.
2050
20512008-10-21 Diego Novillo <dnovillo@google.com>
2052
2053 * lto.c: Tidy some formatting.
2054 * lto.h: Likewise.
2055
20562008-10-21 Simon Baldwin <simonb@google.com>
2057
2058 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
2059 them is NULL (but not the other).
2060
20612008-10-17 Diego Novillo <dnovillo@google.com>
2062
2063 * ltrans-driver: Divert output from make to a temporary file.
2064 Show it if the call to make failed.
2065
20662008-10-15 Diego Novillo <dnovillo@google.com>
2067
2068 * lto.c (lto_wpa_write_files): Reformat do-while loop.
2069 Do not print TEMP_FILENAME
2070 * ltrans-driver: Call make with -s.
2071
20722008-10-15 Diego Novillo <dnovillo@google.com>
2073
2074 * lto-symtab.c (lto_symtab_merge_decl): Do not force
2075 TREE_STATIC on global symbols.
2076
20772008-10-14 Ollie Wild <aaw@google.com>
2078
2079 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
2080 (LTRANS_DRIVER_EXE): Add.
2081 (lto.all.cross): Add LTRANS_DRIVER_EXE.
2082 (lto.all.encap): Add LTRANS_DRIVER_EXE.
2083 (lto.install.common): Remove ltrans-driver.
2084 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
2085 (LTRANS_DRIVER_EXE): New build rule.
2086 * config-lang.in (compilers): Add ltrans-driver.
2087
20882008-10-14 Diego Novillo <dnovillo@google.com>
2089
2090 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
2091 of program name.
2092
20932008-10-13 Ollie Wild <aaw@google.com>
2094
2095 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
2096 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
2097 * ltrans-driver (LTRANS_FLAGS): Remove.
2098
20992008-10-08 Doug Kwan <dougkwan@google.com>
2100
2101 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
2102 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
2103 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
2104 from lto_fixup_state to here.
2105 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
2106 just a free-list. Fix up types also. Move decl merging code to
2107 lto_fixup_tree.
2108 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
2109 object.
2110 (lto_fixup_decls): Use another pointer set to avoid multiple
2111 walking of nodes except for DECLs to be replaced. Pass an
2112 lto_fixup_data_t object to tree-walker.
2113
21142008-10-08 Rafael Espindola <espindola@google.com>
2115
2116 * lto-symtab.c (lto_symtab_set_resolution): New.
2117 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
2118 lto_symtab_get_resolution.
2119 (lto_symtab_prevailing_decl): Return decl for non public decls.
2120 (lto_symtab_get_resolution): New.
2121 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
2122
21232008-10-06 Rafael Espindola <espindola@google.com>
2124
2125 * lto-lang.c: Include cgraph.h.
2126 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2127 input_cgraph): Moved from lto-cgraph.c.
2128 (LANG_HOOKS_INPUT_CGRAPH): New.
2129
21302008-10-03 Rafael Espindola <espindola@google.com>
2131
2132 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
2133
21342008-10-03 Rafael Espindola <espindola@google.com>
2135
2136 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
2137 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
2138 prevailing definition. Don't mark TREE_NOTHROW differences.
2139 * lto.c (lto_fixup_tree): New.
2140 (lto_fixup_state): New.
2141 (lto_fixup_state_aux): New.
2142 (free_decl): New.
2143 (lto_fixup_decls): New.
2144 (lto_main): Call lto_fixup_decls.
2145
21462008-10-02 Ollie Wild <aaw@google.com>
2147
2148 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
2149 and Init.
2150 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
2151 * lto-lang.c (lto_post_options): Add validation and fixups for
2152 -fltrans and -fwpa.
2153
21542008-10-02 Rafael Espindola <espindola@google.com>
2155
2156 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
2157 lto_symtab_merge_decl): Return void.
2158 (lto_symtab_prevailing_decl): New.
2159
21602008-09-30 Rafael Espindola <espindola@google.com>
2161
2162 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
2163 defined symbols.
2164 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
2165 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
2166 Check for already defined symbols.
2167 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
2168 (LTO_IDENTIFIER_RESOLUTION): Remove.
2169 (LTO_DECL_RESOLUTION): New.
2170
21712008-09-30 Rafael Espindola <espindola@google.com>
2172
2173 * lto.c (lto_read_decls): Use new input_tree signature.
2174
21752008-09-26 Doug Kwan <dougkwan@google.com>
2176
2177 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
2178 bodies affected by exception attribute merging of DECLs.
2179 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
2180 merging.
2181
21822008-09-25 Rafael Espindola <espindola@google.com>
2183
2184 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
2185 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
2186 * lto-symtab.c (lto_symtab_compatible): New.
2187 (lto_symtab_overwrite_decl): New.
2188 (lto_symtab_merge_decl): Refactor to use the above functions
2189 and the resolution from lang_identifier.
2190 * lto-tree.h: Include plugin-api.h.
2191 (lang_identifier): Add resolution.
2192 (LTO_IDENTIFIER_RESOLUTION): New.
2193
21942008-09-25 Ollie Wild <aaw@google.com>
2195
2196 * lang.opt (fltrans-output-list=): New option.
2197 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
2198
21992008-09-25 Rafael Espindola <espindola@google.com>
2200
2201 * lto.c (lto_resolution_read): Initialize ret;
2202
22032008-09-24 Ollie Wild <aaw@google.com>
2204
2205 * lto.c (sys/mman.h): Move include.
2206 (lto_wpa_write_files): Return a list of written files.
2207 (lto_execute_ltrans): New function.
2208 (lto_main): Call lto_execute_ltrans.
2209 (ltrans-driver): New file.
2210 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
2211 (DEAULT_LTRANS_DRIVER_LEN): New macro.
2212 (lto_init_options): Initialize ltrans_driver.
2213 (lto_handle_option): Fix incorrect default output value.
2214 * lang.opt (fltrans-driver=): New option.
2215 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
2216 (lto.install-common): Add lto/ltrans-driver.
2217
22182008-09-24 Rafael Espindola <espindola@google.com>
2219
2220 * Make-lang.in (LTO_OBJS): Add lto/common.o.
2221 (lto/lto.o): Depend on lto/common.h.
2222 (lto/common.o): New.
2223 * lang.opt (resolution): New.
2224 * lto-lang.c (resolution_file_name): New.
2225 (lto_handle_option): Handle OPT_resolution.
2226 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
2227 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
2228 pass it to lto_symtab_merge_decl.
2229 * lto.c: Include common.h.
2230 (lto_read_decls): Add resolutions and resolutions_size arguments.
2231 Initialize data_in.globals_resolution and
2232 data_in.globals_resolution_size.
2233 (index_and_symbol_resolution): New.
2234 (lto_resolution_read): New.
2235 (lto_file_read): Add argument resolution_file.
2236 Read resolution.
2237 * lto.h (resolution_file_name): New.
2238
22392008-09-23 Rafael Espindola <espindola@google.com>
2240
2241 * common.c: Update description.
2242 * common.h: Update description.
2243
22442008-09-23 Rafael Espindola <espindola@google.com>
2245
2246 * common.c: Moved from lto-plugin.
2247 * common.h: Moved from lto-plugin.
2248
22492008-09-22 Doug Kwan <dougkwan@google.com>
2250
2251 * lto.c (VEC(bitmap,heap)): Declare.
2252 (lto_materialize_function): Handle WAP mode specially.
2253 (lto_add_inline_clones): New.
2254 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
2255 return a bitmap of inlined decls.
2256 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
2257 (lto_main): Call reset_inline_failed to reset inlining states.
2258 Check call-graph after WPA inlining.
2259 * lto-lang.c (lto_init): Do not clear flag_generate_lto
2260 unconditionally.
2261
22622008-09-19 Doug Kwan <dougkwan@google.com>
2263
2264 lto.c (lto_main): Remove unsued wrapper code.
2265 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
2266
22672008-09-19 Rafael Espindola <espindola@google.com>
2268
2269 * lto-symtab.c: Include lto-tree-in.h.
2270 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
2271 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
2272 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
2273
22742008-09-17 Paolo Bonzini <bonzini@gnu.org>
2275 Rafael Avila de Espindola <espindola@google.com>
2276
2277 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
2278 COMPOUND_LITERAL_EXPR_DECL): Remove.
2279 (emit_local_var): Remove.
2280 (lto_expand_expr): Remove.
2281 (lto_staticp): Remove.
2282 (LANG_HOOKS_EXPAND_EXPR): Remove.
2283 (LANG_HOOKS_STATICP): Remove.
2284
22852008-09-11 Diego Novillo <dnovillo@google.com>
2286
2287 * lto-lang.c: Include except.h and libfuncs.h.
2288 (lto_init_eh): New.
2289 (lto_init): Call it.
2290 Set flag_generate_lto to 0.
2291 * Make-lang.in (lto-lang.o): Add dependency on except.h
2292 and libfuncs.h.
2293
22942008-09-09 Bill Maddox <maddox@google.com>
2295
2296 * lto-lang.c: Include header file expr.h.
2297 (COMPOUND_LITERAL_EXPR_DECL_STMT,
2298 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
2299 (emit_local_var): Copied from c-semantics.c.
2300 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
2301 and c_staticp in c-common.c.
2302 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
2303
23042008-09-08 Diego Novillo <dnovillo@google.com>
2305
2306 * lto-lang.c (lto_global_bindings_p): Return 1 during
2307 IPA passes.
2308
23092008-09-07 Diego Novillo <dnovillo@google.com>
2310
2311 * lto.c: Tidy formatting.
2312
23132008-08-04 Bill Maddox <maddox@google.com>
2314
2315 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
2316
23172008-09-03 Doug Kwan <dougkwan@google.com>
2318
2319 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
2320 CIF_OK instead of NULL.
2321
23222008-09-02 Diego Novillo <dnovillo@google.com>
2323 Simon Baldwin <simonb@google.com>
2324
2325 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
2326 c_common_type_for_size.
2327 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
2328 (lto_init): Call linemap_add.
2329 (signed_and_unsigned_types): Remove.
2330
23312008-08-29 Diego Novillo <dnovillo@google.com>
2332
2333 * lto-lang.c (handle_noreturn_attribute): New local function.
2334 (handle_const_attribute): New local function.
2335 (handle_malloc_attribute): New local function.
2336 (handle_pure_attribute): New local function.
2337 (handle_novops_attribute): New local function.
2338 (handle_nonnull_attribute): New local function.
2339 (handle_nothrow_attribute): New local function.
2340 (handle_sentinel_attribute): New local function.
2341 (handle_type_generic_attribute): New local function.
2342 (handle_format_attribute): New local function.
2343 (handle_format_arg_attribute): New local function.
2344 (lto_attribute_table): Declare.
2345 (lto_format_attribute_table): Declare.
2346 (lto_init_attributes): New local function.
2347 (lto_define_builtins): Call it.
2348 Call targetm.init_builtins and build_common_builtin_nodes.
2349 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
2350 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
2351
23522008-08-28 Diego Novillo <dnovillo@google.com>
2353
2354 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
2355 $(GIMPLE_H).
2356 (lto-symtab.o): Add dependency on $(GIMPLE_H).
2357 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
2358 * lto-symtab.c: Include gimple.h.
2359 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
2360 TREE_CHAIN.
2361
23622008-08-27 Doug Kwan <dougkwan@google.com>
2363
2364 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
2365 gt-lto-lto.h): New includes.
2366 (lto_materialize_function): Do not read in function body in WPA mode.
2367 Format a line to fit in 80 columns.
2368 (lto_cgraph_node_sets): New garbage collected variable.
2369 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
2370 New functions.
2371 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
2372 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
2373 variable LTO_SECTION_IN_H.
2374 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
2375 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
2376 with variable LTO_SECTION_IN_H.
2377 * config-lang.in (gtfiles): Add lto/lto.c.
2378 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
2379 merged DECL_RESULT correctly.
2380
23812008-08-26 Bill Maddox <maddox@google.com>
2382
2383 * lto-lang.c Include tree-gimple.h.
2384 (lto_mark_addressable): Call mark_addressable rather than
2385 asserting.
2386 (lto_post_options): Suppress debug info generation.
2387 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
2388
23892008-08-25 Bill Maddox <maddox@google.com>
2390
2391 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
2392 assertion and leave an explanatory comment in its place.
2393
23942008-08-21 Doug Kwan <dougkwan@google.com>
2395
2396 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
2397 of common nodes instead of computing locallly.
2398 (lto_read_in_decl_state): New.
2399 (lto_read_decls): Change code for udpate in struct lto_decl_header.
2400 Read global and per-function in-decl states.
2401 * Make-lang.in (LTO_H): Update dependency.
2402 (lto/lto.o): Same.
2403 (lto-symtab.c): Merge (revision 139039)
2404 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
2405
24062008-08-21 Rafael Espindola <espindola@google.com>
2407
2408 * config-lang.in (target_libs): New.
2409
24102008-08-20 Bill Maddox <maddox@google.com>
2411
2412 * lto.c (current_lto_file): Remove GTY marker from static
2413 variable. Remove include of file gt-lto-lto.h.
2414 * Make-lang.in: Remove dependency of lto/lto.o on
2415 gt-lto-lto.h.
2416 * lto-elf.c (lto_file_close): Removed.
2417 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
2418 allocate lto_elf_file object.
2419 (lto_elf_file_close): Free lto_elf_file object after close.
2420 * lto.h (struct lto_file_struct): Remove GTY marker.
2421 * config-lang.in: Remove lto/lto.h and lto/lto.c from
2422 gtfiles.
2423
24242008-08-20 Bill Maddox <maddox@google.com>
2425
2426 * lto.c (lto_read_decls): Provide dummy argument to input_tree
2427 to conform to its new signature.
2428 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
2429 on discarded node here, now called in global_vector_fixup.
2430
24312008-08-09 Bill Maddox <maddox@google.com>
2432
2433 * lto.c (preload_common_nodes): Verify that fileptr_type_node
2434 has not been set to a front-end-specific value.
2435
24362008-08-05 Doug Kwan <dougkwan@google.com>
2437
2438 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
2439 build breakage.
2440
24412008-07-30 Bill Maddox <maddox@google.com>
2442
2443 * lto.c (lto_materialize_function): Call lto_original_decl_name.
2444 Remove obsolete comments.
2445 (lto_read_decls): Remove initialization of deleted field data_in.global.
2446 Tidy up comments.
2447 (lto_main): Remove redundant initialization of section_hash_table.
2448 * lto-elf.c: Removed obsolete comments.
2449 * lto.h: Tidy up comments.
2450 * lto-symtab.c (lto_least_common_multiple): New function.
2451 (lto_symtab_merge_decl): Merge variable alignments in some cases.
2452 Tidy up comments.
2453
24542008-07-25 Diego Novillo <dnovillo@google.com>
2455 Bill Maddox <maddox@google.com>
2456
2457 * lto.c: Re-order include files.
2458 Include lto-section-out.h.
2459 (preload_common_nodes): Add debugging output.
2460 Add new local INDEX_TABLE.
2461 Call preload_common_node.
2462 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
2463
24642008-07-13 Bill Maddox <maddox@google.com>
2465
2466 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
2467 unwanted scaling during pointer addition.
2468
24692008-07-11 Bill Maddox <maddox@google.com>
2470 Diego Novillo <dnovillo@google.com>
2471
2472 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
2473 Make code const-correct.
2474 (lto_file_read): Fix C++ compatibility warnings.
2475 (lto_read_section_data): Fix C++ compatibility warnings.
2476 (lto_get_section_data): Use CONST_CAST to avoid warning when
2477 const pointer passed to free.
2478 * lto-elf.c (lto_elf_build_section_table): Fix C++
2479 compatibility warnings.
2480 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
2481 to avoid warning assigning const pointer to d_buf field of Elf_Data.
2482 (lto_get_current_out_file): Fix C++ compatibility warnings.
2483
24842008-07-11 Diego Novillo <dnovillo@google.com>
2485
2486 * Make-lang.in (lto-warn): Define.
2487
24882008-07-03 Simon Baldwin <simonb@google.com>
2489
2490 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
2491 LTO_STREAM_DEBUGGING.
2492
24932008-06-27 Ollie Wild <aaw@google.com>
2494
2495 * lto-elf.c (lto-section-out.h): New include.
2496 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
2497 and data members.
2498 (cached_file_attrs): New static variable.
2499 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
2500 Use cached_file_attrs for checking bits.
2501 (lto_elf_build_section_table): Remove elf_file argument from
2502 lto_elf_get_shdr and lto_elf_free_shdr calls.
2503 (DEFINE_INIT_SHDR): New macro.
2504 (init_shdr32, init_shdr64): New functions defined via the
2505 DEFINE_INIT_SHDR macro.
2506 (lto_elf_begin_section_with_type): New function.
2507 (lto_elf_begin_section): New function.
2508 (lto_elf_append_data): New function.
2509 (lto_elf_end_section): New function.
2510 (DEFINE_VALIDATE_EHDR): New macro.
2511 (validate_ehdr32, validate_ehdr64): New functions defined via the
2512 DEFINE_VALIDATE_EHDR macro.
2513 (validate_file): New function.
2514 (DEFINE_INIT_EHDR): New macro.
2515 (init_ehdr32, init_ehdr64): New functions defined via the
2516 DEFINE_INIT_EHDR macro.
2517 (init_ehdr): New function.
2518 (lto_elf_file_open): Add support for writable files. Move some
2519 validation logic to validate_file.
2520 (lto_elf_file_close): Add support for writable files. Write file data
2521 and free data blocks.
2522 (current_out_file): New static variable.
2523 (lto_set_current_out_file): New function.
2524 (lto_get_current_out_file): New function.
2525 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
2526 Add temporary initialization for testing ELF serialization.
2527 * lto.h (lto-section-out.h): New include.
2528 (struct lto_file_struct): Slight modification to comment.
2529 (lto_elf_file_open): Add writable parameter.
2530 (lto_elf_begin_section): New function declaration.
2531 (lto_elf_append_data): New function declaration.
2532 (lto_elf_end_section): New function declaration.
2533 (lto_set_current_out_file, lto_get_current_out_file): New function
2534 declarations.
2535 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
2536 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
2537 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
2538 * Make-lang.in (LTO_H): Add lto-section-out.h.
2539
25402008-06-12 Ollie Wild <aaw@google.com>
2541
2542 * lto.h (struct lto_file_vtable_struct): Remove.
2543 (struct lto_file_struct): Remove vtable member.
2544 * lto-elf.c (lto_file_init): Remove vtable argument.
2545 (lto_elf_map_optional_lto_section): Remove.
2546 (lto_elf_unmap_section): Remove.
2547 (lto_elf_file_vtable): Remove.
2548 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
2549 lto_file_init call.
2550 (lto_elf_find_section_data): Remove.
2551
25522008-06-11 Ollie Wild <aaw@google.com>
2553
2554 * lto.c (lto_file_read): Add const qualifier to data variable.
2555
25562008-06-11 Diego Novillo <dnovillo@google.com>
2557
2558 Merge from lto-streamber sub-branch.
2559
2560 2008-06-04 Ollie Wild <aaw@google.com>
2561
2562 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
2563 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
2564
2565 2008-05-28 Bill Maddox <maddox@google.com>
2566
2567 Replace the DWARF reader in the LTO front-end.
2568
2569 * lto.c: Include lto-tree-in.h, lto-tags.h.
2570 (enum DWARF2_class, DW_cl_constant, struct
2571 DWARF2_form_data, struct lto_context,
2572 lto_fd_init, lto_info_fd_init,
2573 lto_abbrev_fd_init, lto_info_fd_close,
2574 lto_file_init, lto_file_close,
2575 lto_file_corrupt_error, lto_abi_mismatch_error,
2576 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
2577 lto_read_uleb128, lto_read_sleb128,
2578 lto_read_initial_length, lto_abbrev_read_attrs,
2579 lto_abbrev_read, lto_abbrev_read_lookup,
2580 lto_read_section_offset,
2581 lto_read_comp_unit_header, find_cu_for_offset,
2582 lto_get_file_name,
2583 lto_resolve_reference,lto_read_form,
2584 attribute_value_as_int,
2585 make_signed_host_wide_int,
2586 attribute_value_as_constant, lto_cache_hash,
2587 lto_cache_eq, lto_cache_store_DIE,
2588 lto_cache_lookup_DIE, lto_find_integral_type,
2589 lto_find_integral_type_1,
2590 LTO_BEGIN_READ_ATTRS_UNCHECKED,
2591 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
2592 lto_unsupported_attr_error, lto_get_identifier,
2593 lto_read_referenced_type_DIE,
2594 lto_read_compile_unit_DIE,
2595 lto_read_array_type_DIE,
2596 lto_read_structure_union_class_type_DIE,
2597 lto_read_enumerator_DIE,
2598 lto_read_enumeration_type_DIE,
2599 lto_read_only_for_child_DIEs,
2600 lto_read_only_for_child_DIEs,
2601 lto_read_member_DIE, lto_read_abbrev,
2602 lto_read_variable_formal_parameter_constant_DIE,
2603 lto_get_body): Removed.
2604 (preload_common_nodes): New function.
2605 (lto_read_decls): Convert for new global streamer.
2606 (lto_materialze_file_data,
2607 lto_read_subroutine_type_subprogram_die,
2608 lto_read_unspecified_parameters_DIE,
2609 lto_read_typedef_DIE,
2610 lto_read_pointer_reference_type_DIE,
2611 lto_read_subrange_type_DIE,
2612 lto_read_base_type_DIE,
2613 lto_read_const_volatile_restrict_type_DIE,
2614 lto_read_namespace_DIE,
2615 lto_read_unspecified_type_DIE, lto_read_DIE,
2616 lto_read_child_DIEs, lto_collect_child_DIEs):
2617 Removed.
2618 (lto_info_read, lto_set_cu_context): Removed.
2619 (lto_file_read): Convert for new global streamer.
2620 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
2621 lto_resolve_var_ref, lto_resolve_fn_ref,
2622 lto_resolve_field_ref, lto_resolve_typedecl_ref,
2623 lto_resolve_namespacedecl_ref): Removed.
2624 (lto_file_init, lto_file_close): Moved to lto-elf.c.
2625 * lto-tree.h (lto_symtab_merge_var,
2626 lto_symtab_mergee_fun): Declare here.
2627 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
2628 (lto_elf_file_open): Removed code to read DWARF debug sections.
2629 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
2630 DWARF2_CompUnit, lto_die_ptr,
2631 lto_die_cache_entry, lto_fd, lto_info_fd,
2632 lto_abbrev_fd): Removed.
2633 (lto_file): Removed debug_info and debug_abbrev fields.
2634 (lto_ref): Removed.
2635 (lto_file_init, lto_file_close,
2636 lto_resolve_type_ref, lto_resolve_var_ref,
2637 lto_resolve_fn_ref, lto_resolve_field_ref,
2638 lto_resolve_typedecl_ref,
2639 lto_resolve_namespacedecl_ref,
2640 lto_get_file_name): Removed declarations.
2641 (lto_symtab_merge_var, lto_symtab_merge_fn):
2642 Declarations moved to lto-tree.h.
2643 * lto-symtab.c (lto_compatible_attributes_p):
2644 Lobotomize this, as it barfs on "Hello, world!".
2645 * lto-section-out.c: Include lto-tree-out.h.
2646 (lto_hash_global_slot_node,
2647 lto_eq_global_slot_node, preload_common_nodes,
2648 write_global_stream, write_global_references):
2649 New functions.
2650 (produce_asm_for_decls): Convert for new global streamer.
2651 * lto-section-out.h (lto_hash_global_slot_node,
2652 lto_eq_global_slot_node): Declare.
2653
26542008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2655 Jan Hubicka <jh@suse.cz>
2656
2657 * lto.c (sys/mman.h, tree-pass.h): New includes.
2658 (lto_materialize_constructors_and_inits,
2659 lto_materialize_function): Keeps length of section.
2660 (lto_materialize_cgraph): Removed.
2661 (lto_read_decls): Initialize fd field.
2662 (lto_file_read): Different return type and removed much code to
2663 lto_main.
2664 (page_mask): New variable.
2665 (lto_read_section_data, get_section_data, free_section_data): New
2666 functions.
2667 (lto_main): Now calls pass manager, sets the hooks so that the ipa
2668 passes can get the section data.
2669
26702008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
2671
2672 * lto.h (lto_read_decls): Made local.
2673 (lto_input_function_body, lto_input_constructors_and_inits,
2674 lto_input_cgraph): Declarations moved to lto-section-in.h.
2675 * lto-section-in.c: Moved to .. .
2676 * lto-cgraph-in.c: Ditto.
2677 * lto-section-in.h: Ditto.
2678 * lto-function-in.c: Ditto.
2679 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
2680 (lto_insert_block): Removed.
2681 (LANG_HOOKS_INSERT_BLOCK): Removed.
2682 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
2683 lto-section-in.o): Rules moved to lto/Makefile.in.
2684
2685
26862008-05-16 Ollie Wild <aaw@google.com>
2687
2688 * lto-lang.c (tree-inline.h): Include.
2689 (lto_post_options): New function.
2690 (LANG_HOOKS_POST_OPTIONS): Define.
2691 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
2692 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
2693
26942008-05-13 Diego Novillo <dnovillo@google.com>
2695
2696 * lto-function-in.c (input_ssa_names): Call
2697 make_ssa_name_fn instead of make_ssa_name.
2698
26992008-05-12 Diego Novillo <dnovillo@google.com>
2700
2701 * lto-cgraph-in.c (overwrite_node): Update references to
2702 inline summary fields.
2703 * lto-function-in.c (input_expr_operand): Do not handle
2704 STRUCT_FIELD_TAG.
2705
27062008-05-09 Ollie Wild <aaw@google.com>
2707
2708 * lang.opt: New file.
2709 * lto-lang.c (lto_init_options): New function.
2710 (lto_handle_option): New function.
2711 (lto_init): Move initialization of flag_unit_at_a_time to
2712 lto_init_options.
2713 (LANG_HOOKS_INIT_OPTIONS): Define.
2714 (LANG_HOOKS_HANDLE_OPTION): Define.
2715
27162008-04-29 Ollie Wild <aaw@google.com>
2717
2718 * lto.c (lto_read_namespace_DIE): New function.
2719 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
2720 NAMESPACE_DECL DIE's.
2721 (lto_resolve_namespacedecl_ref): New function.
2722 * lto.h (lto_resolve_namespacedecl_ref): New function.
2723 * lto-section-in.c (lto_read_decls): Read namespace declarations.
2724 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
2725 and num_namespace_decls.
2726 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
2727 * lto-lang.c (lto_init_ts): New function.
2728 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
2729
27302008-04-16 Ollie Wild <aaw@google.com>
2731
2732 * lto-function-in.c (input_type_ref): Updated function description.
2733
27342008-04-16 Ollie Wild <aaw@google.com>
2735
2736 * lto-function-in.c (input_type_ref_1): New function.
2737 (input_type_ref): Split into two functions.
2738 (input_function): Add support for type contexts.
2739
27402008-04-16 Ollie Wild <aaw@google.com>
2741
2742 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
2743 section name
2744
27452008-04-16 Ollie Wild <aaw@google.com>
2746
2747 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
2748 list of supported languages.
2749
27502008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
2751
2752 Merge with mainline @133491.
2753
27542008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
2755 Jan Hubicka <jh@suse.cz>
2756
2757 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
2758 fd->unmaterialized_fndecls.
2759 (lto_get_file_name, lto_materialize_cgraph): New function.
2760 (lto_materialize_constructors_and_inits,
2761 lto_materialize_function): Read info directly from elf file.
2762 (lto_file_read): Made local and initialize dictionary so that
2763 other lto sections can be read without reprocessing the elf file.
2764 (lto_main): Read all functions after all files have been processed
2765 for their types, globals and cgraph.
2766 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
2767 dependencies.
2768 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
2769 (hash_name, eq_name, lto_elf_build_section_table): New functions.
2770 (lto_elf_read_symtab): Removed function.
2771 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
2772 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
2773 (lto_file_read): Made local.
2774 (lto_get_file_name, lto_elf_build_section_table,
2775 lto_input_cgraph):
2776 New function.
2777 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
2778 New functions.
2779 (lto_read_decls): Get the file name.
2780 * lto-cgraph-in.c: New file.
2781 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
2782 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
2783 (input_labels): Fixed latent sizeof issue.
2784 (input_function): Build stmt array to set call sites into cgraph
2785 edges.
2786 (lto_read_body): Reset cfun->curr_properties.
2787 * lto_section_in.h (lto_section_slot): New structure.
2788 (section_hash_table.lto_file_decl_data): New field.
2789
2790
27912008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
2792
2793 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
2794 reconstruct static initializers.
2795 (lto_get_body, lto_materialize_function): Add lto_section_type as
2796 a parameter.
2797 (lto_materialize_constructors_and_inits,
2798 lto_materialize_file_data): New function.
2799 (lto_materialize_function,
2800 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
2801 unmap_section and map_fn_body to map_section.
2802 (lto_set_cu_context): Process functions and static inits
2803 differently.
2804 * Make-lang.in (LTO_H, lto/lto-function-in.o,
2805 lto/lto-section-in.o): Update dependencies.
2806 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
2807 lto_section_type parameter.
2808 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
2809 * lto.h (lto_file_vtable_struct): Removed two of the fields and
2810 renamed the other two so that there is only one map function and
2811 one unmap function and each takes a section type parameter.
2812 (lto_read_function_body): Renamed to lto_input_function_body and
2813 added file_data parameter.
2814 (lto_read_var_init): Removed.
2815 (lto_input_constructors_and_inits): New function.
2816 * lto-section-in.c (lto_read_decls): New function.
2817 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
2818 var_decls, type_decls, types to lto_file_decl_data.
2819 (input_type_ref, input_expr_operand, lto_read_body): Get
2820 field_decls, fn_decls, var_decls, type_decls, types from different
2821 structure.
2822 (input_globals, input_constructor, lto_read_var_init): Removed.
2823 (input_constructors_or_inits): New function.
2824 (lto_read_function_body, lto_input_constructors_and_inits):
2825 Renamed to lto_input_function_body and takes file_data parameter.
2826 * lto-section-in.h (lto_file_decl_data): New structure.
2827
28282008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
2829
2830 * lto-function-in.c (input_globals.c): Changed input type to
2831 lto_function_header.
2832 (input_bb): Removed code to deserialize the stmt number.
2833 (input_function): Renumber all stmts after they are input.
2834 (lto_read_body, lto_read_function_body, lto_read_var_init):
2835 Changed to used new header format and enum section_type.
2836 *lto-lang.c (success): Removed.
2837
28382008-01-28 Nathan Froyd <froydnj@codesourcery.com>
2839
2840 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
2841 (lto_elf_free_sym): Likewise.
2842
2843 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
2844 (lto_elf_build_init): Likewise.
2845
28462008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
2847
2848 * lto-read.c: Renamed to lto-function-in.c.
2849 (input_1_unsigned): Moved to lto-section-in.c and renamed
2850 lto_input_1_unsigned.
2851 (input_uleb128): Moved to lto-section-in.c and renamed
2852 lto_input_uleb128.
2853 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
2854 lto_input_widest_uint_uleb128.
2855 (input_sleb128): Moved to lto-section-in.c and renamed
2856 lto_input_sleb128.
2857 (input_integer): Moved to lto-section-in.c and renamed
2858 lto_input_integer.
2859 (debug_in_fun): Moved to lto-section-in.c and renamed
2860 lto_debug_in_fun.
2861 (input_block): Moved to lto-section-in.h and renamed
2862 lto_input_block.
2863 (input_expr_operand): Fixed to allow lists with more than one
2864 element.
2865 * lto-section-in.h: New file.
2866 * lto-section-in.c: New file with changes from above.
2867 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
2868 (lto-section-in.o): New rule.
2869
28702007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2871
2872 * lto-read.c (input_expr_operand): Mark static and external
2873 VAR_DECLs as needed.
2874
28752007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2876
2877 * lto-read.c (input_integer): Use the correct shift amount.
2878
28792007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2880
2881 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
2882 (LANG_HOOKS_NAME): Define.
2883
28842007-12-27 Nathan Froyd <froydnj@codesourcery.com>
2885
2886 * lto.c (lto_find_integral_type): Define as a macro. Rename the
2887 original function to...
2888 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
2889 don't have a base type.
2890 (lto_read_enumeration_type_DIE): Examine the values of the
2891 enumeration to determine whether we can use an unsigned type for
2892 the base type of the enumeration.
2893
28942007-12-24 Nathan Froyd <froydnj@codesourcery.com>
2895
2896 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
2897 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
2898
28992007-12-22 Nathan Froyd <froydnj@codesourcery.com>
2900
2901 * lto-lang.c (lto_types_compatible_p): New function.
2902 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
2903
29042007-12-22 Nathan Froyd <froydnj@codesourcery.com>
2905 Kenneth Zadeck <zadeck@naturalbridge.com>
2906
2907 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
2908 (input_local_vars): Read in DECL_INITIAL and context for local
2909 statics that need to be put in unexpanded_vars_list.
2910
29112007-12-21 Nathan Froyd <froydnj@codesourcery.com>
2912
2913 * lto-read.c (input_real): Use a separate null-terminated buffer
2914 for calling real_from_string.
2915 (input_expr_operand): If we take the address of a FUNCTION_DECL,
2916 tell cgraph that it's needed.
2917
29182007-12-19 Doug Kwan <dougkwan@google.com>
2919
2920 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
2921
29222007-12-18 Nathan Froyd <froydnj@codesourcery.com>
2923
2924 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
2925 (lto_file_read): Reset the members of 'context' every time we read
2926 a toplevel DIE, with special attention to last_param_type.
2927
29282007-12-18 Nathan Froyd <froydnj@codesourcery.com>
2929
2930 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
2931 'declaration'. Set the assembler name for non-public functions.
2932
29332007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
2934
2935 * lto_read.c (data_in.unexpanded_indexes): New array.
2936 (input_local_var): Added code to read in unexpanded_var_list
2937 indexes for variables. Only read in DECL_CHAIN field for
2938 parameters.
2939 (input_local_vars): Added code to rebuild unexpanded_var_list in
2940 order using unexpanded_indexes.
2941 (input_function): Added code to set DECL_CONTEXT for functions.
2942
29432007-12-13 Doug Kwan <dougkwan@google.com>
2944
2945 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
2946 in pointer and reference types.
2947
29482007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2949
2950 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
2951 RESULT_DECL.
2952
29532007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2954
2955 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
2956 already read the DIE.
2957 (lto_get_body): New function, split out from...
2958 (lto_materialize_function): ...here. Call it.
2959 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
2960 determine DECL_EXTERNAL.
2961 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
2962 FUNCTION_DECLs when necessary. Use the type of the actual
2963 function definition if we are unable to easily merge types. Ignore
2964 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
2965 necessary.
2966
29672007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2968
2969 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
2970
29712007-12-12 Bill Maddox <maddox@google.com>
2972
2973 Revert
2974 2007-12-07 Bill Maddox <maddox@google.com>
2975
2976 * lto.c (lto_str_fd_init): New function.
2977 (lto_str_fd_close): New function.
2978 (lto_file_init): Call lto_str_fd_init.
2979 (lto_file_close): Call lto_str_fd_close.
2980 (lto_str_read): New function. Read debug string table.
2981 (lto_str_lookup): New function. Get string for debug
2982 string table offset.
2983 (lto_read_form): Recognize DW_FORM_strp.
2984 (lto_file_read): Invoke lto_str_read.
2985
2986 * lto-elf.c (lto_elf_file_open): Read raw section data
2987 for the .debug_str section, if present.
2988
2989 * lto.h (struct lto_str_fd_struct): New struct.
2990 (struct lto_file_struct): Added new field DEBUG_STR
2991 to hold the file descriptor for the debug string table.
2992
29932007-12-07 Bill Maddox <maddox@google.com>
2994
2995 * lto.c (lto_str_fd_init): New function.
2996 (lto_str_fd_close): New function.
2997 (lto_file_init): Call lto_str_fd_init.
2998 (lto_file_close): Call lto_str_fd_close.
2999 (lto_str_read): New function. Read debug string table.
3000 (lto_str_lookup): New function. Get string for debug
3001 string table offset.
3002 (lto_read_form): Recognize DW_FORM_strp.
3003 (lto_file_read): Invoke lto_str_read.
3004
3005 * lto-elf.c (lto_elf_file_open): Read raw section data
3006 for the .debug_str section, if present.
3007
3008 * lto.h (struct lto_str_fd_struct): New struct.
3009 (struct lto_file_struct): Added new field DEBUG_STR
3010 to hold the file descriptor for the debug string table.
3011
30122007-12-07 Nathan Froyd <froydnj@codesourcery.com>
3013
3014 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
3015 Grow the basic_block_info and label_to_block_map vectors if
3016 necessary. Read in the block chain.
3017
30182007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3019
3020 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
3021
30222007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3023
3024 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
3025
30262007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3027
3028 * lto-read.c (input_expr_operand): Don't check for MTAGs.
3029 (lto_read_body): Don't declare PROP_alias.
3030
30312007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3032
3033 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
3034 argument type information.
3035
30362007-12-03 Nathan Froyd <froydnj@codesourcery.com>
3037
3038 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3039 TREE_THIS_VOLATILE if the associated type is a volatile type.
3040 (lto_materialize_function): Remove call to init_ssa_operands.
3041 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
3042 variable when reading an SSA_NAME. Do the same when reading a
3043 RESULT_DECL, a RETURN_EXPR, or an MTAG.
3044 (input_cfg): Call init_ssa_operands.
3045 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
3046 Move call to init_tree_ssa...
3047 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
3048 add_referenced_var on any variables referenced from the body of the
3049 function. Inform the rest of the compiler we are in SSA form and
3050 inform later passes about the current properties.
3051
30522007-11-30 Nathan Froyd <froydnj@codesourcery.com>
3053
3054 * lto.c (lto_materialize_function): Add FIXME.
3055
30562007-11-29 Nathan Froyd <froydnj@codesourcery.com>
3057
3058 * lto-lang.c (enum built_in_attribute): New enum.
3059 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
3060 built_in_attributes): New variables.
3061 (def_builtin_1): New function.
3062 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
3063
30642007-11-28 Nathan Froyd <froydnj@codesourcery.com>
3065
3066 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3067 DECL_SOURCE_LOCATION for debugging purposes.
3068 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
3069 bitfield, use the type specified by the DIE for TREE_TYPE and defer
3070 laying out the decl until later.
3071 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
3072 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
3073 TREE_ADDRESSABLE.
3074 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
3075 operand of an ADDR_EXPR.
3076 * lto-lang.c (enum lto_builtin_type): New enum.
3077 (builtin_type): New typedef.
3078 (builtin_types, string_type_node, const_string_type_node,
3079 wint_type_node, intmax_type_node, uintmax_type_node,
3080 signed_size_type_node): New variables.
3081 (def_fn_type, builtin_type_for_size, lto_define_builtins,
3082 lto_build_c_type_nodes): New functions.
3083 (lto_init): Initialize builtin types.
3084 (lto_set_decl_assembler_name): Let the target machine mangle the
3085 name if the decl is TREE_PUBLIC, otherwise uniquify it.
3086
30872007-11-21 Nathan Froyd <froydnj@codesourcery.com>
3088
3089 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
3090 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
3091 the type is a constant type. Set the assembler name and inform
3092 the rest of the compiler about the new decl if the decl is not
3093 public.
3094 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
3095 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
3096 try to read in function bodies for functions that already have bodies.
3097 * lto-symtab.c (lto_same_type_p): Check for unbounded array
3098 equivalency.
3099 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
3100 Check for whether we matched a builtin function type before calling
3101 lto_same_type_p on the generated type. Permit cases where the
3102 declaration of an array is unbounded, but the definition is bounded.
3103 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
3104 DECL_SIZE_UNIT if necessary.
3105
31062007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3107
3108 * lto-read.c (input_expr_operand): Get types right
3109 for COMPLEX_CST.
3110
31112007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3112
3113 * lto-read.c (make_new_block, input_cfg): Properly set
3114 n_basic_blocks.
3115
31162007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3117
3118 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
3119 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
3120
31212007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3122
3123 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
3124 construct the integer type for bitfields.
3125
31262007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3127
3128 * lto-read.c (data_in.current_node_has_loc): Removed.
3129 (input_line_info): Returns true if node needs line set.
3130 (set_line_info): Always sets line if called.
3131 (clear_line_info): Removed reference to current_node_needs_loc.
3132 (input_expr_operand): Keeps track locally if current node needs a loc.
3133 (input_local_var): Added code to handle DECL_INITIAL for
3134 static local vars. Only set loc if necessary.
3135
31362007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3137
3138 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
3139 DECL_CONTEXT.
3140
31412007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3142
3143 * lto.c: Include langhooks.h.
3144 (lto_find_integral_type): Rework logic to handle the case where
3145 got_byte_size is true, but the bitsize requested and that of the
3146 base_type doesn't match.
3147 (lto_read_variable_formal_parameter_constant_DIE): Only check for
3148 asm_name if we are creating a VAR_DECL.
3149 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
3150 definition.
3151 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
3152 function reference and use the builtin's decl if so. Set the
3153 DECL_CONTEXT of the RESULT_DECL for the function.
3154 * lto-lang.c (registered_builtin_fndecls): New variable.
3155 (lto_getdecls): Return it.
3156 (lto_builtin_function): Chain the new decl onto
3157 registered_builtin_fndecls.
3158
31592007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
3160
3161 * lto-read.c (process_tree_flags, lto_static_init_local):
3162 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
3163 (input_line_info, clear_line_info): Fixed new line number code.
3164 (input_expr_operand): Added type to SWITCH_EXPR.
3165 (lto_read_body): Properly initialized data_in.
3166 Clear line info when leaving.
3167
31682007-11-13 Diego Novillo <dnovillo@google.com>
3169
3170 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3171 Initialize ARTIFICIAL.
3172 (lto_read_subroutine_type_subprogram_DIE): Initialize
3173 SAVED_SCOPE.
3174 * lto-read.c (set_line_info): Remove ; from calls to
3175 LINEMAP_POSITION_FOR_COLUMN.
3176
31772007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3178
3179 * lto-read.c (input_type_ref): Renamed from get_type_ref.
3180 (input_expr_operand, input_local_var): Renamed get_type_ref to
3181 input_type_ref.
3182 (input_expr_operand): Get the types correct for
3183 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
3184
31852007-11-13 Doug Kwan <dougkwan@google.com>
3186
3187 * lto-read.c (input_widest_uint_uleb128): New function.
3188 (input_tree_flags, process_tree_flags, input_line_info,
3189 input_expr_operand, input_local_var, input_phi, input_ssa_names):
3190 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
3191 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
3192 (lto_static_init_local): Add code to assert that lto_flags_type is
3193 wide enough.
3194
31952007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3196
3197 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
3198 (lto_read_subroutine_type_subprogram_DIE): Handle
3199 DW_AT_static_link and DW_AT_specification. Return the
3200 specification if present.
3201 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
3202
32032007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3204
3205 * lto-lang.c: Include target.h.
3206 (registered_builtin_types): New variable.
3207 (lto_type_for_mode): Increase number of modes handled.
3208 (lto_builtin_function): Fix argument list and return the decl.
3209 (lto_register_builtin_type): New function.
3210 (lto_init): Initialize target builtins and language-independent
3211 nodes.
3212 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
3213
32142007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3215
3216 * lto-read.c (input_expr_operand): Added code to properly handle
3217 index filed. Added new RANGE_EXPR case.
3218
32192007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3220
3221 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
3222 (data_in): Added current_node_has_loc field.
3223 (input_line_info, set_line_info, clear_line_info): Added a support
3224 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
3225 did not have on on the source side.
3226 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
3227 numbers too.
3228
32292007-11-09 Doug Kwan <dougkwan@google.com>
3230
3231 * lto-read.c (input_expr_operand): Change type of operand 2 of
3232 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
3233
32342007-11-09 Nathan Froyd <froydnj@codesourcery.com>
3235
3236 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
3237 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
3238 from a DW_AT_specification or DW_AT_abstract_origin attribute to
3239 the new decl we are creating. Move informing the middle end about
3240 the new decl to...
3241 (lto_main): ...here. Inform the middle end about global variables
3242 after we have read in all the input files.
3243 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
3244 variables with internal linkage, so delete the check for internal
3245 linkage. Combine TREE_PUBLIC flags.
3246
32472007-11-08 Nathan Froyd <froydnj@codesourcery.com>
3248
3249 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3250 DW_AT_decl_line.
3251 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
3252 builtin specially. Move check for attribute compatibility
3253 earlier.
3254
32552007-11-07 Nathan Froyd <froydnj@codesourcery.com>
3256
3257 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
3258 * config-lang.in (gtfiles): Add lto.h and lto.c.
3259 * lto-elf.c: Include ggc.h.
3260 (lto_elf_file_open): Allocate elf_file from GC memory.
3261 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
3262 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
3263 in GC memory.
3264 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
3265 (lto_file_close): Free file from GC memory.
3266 (lto_cache_store_DIE): Allocate the new entry in GC memory.
3267 (lto_read_member_DIE): Fix declaration.
3268 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
3269 in GC memory.
3270 (current_lto_file): New variable.
3271 (lto_main): Use it.
3272 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
3273 lto_die_cache_entry): Move to...
3274 * lto.h: ...here and add GTY markers as appropriate. Delete forward
3275 declarations accordingly.
3276 (struct lto_file_struct): Declare.
3277 (lto_file_vtable): Use it instead of lto_file.
3278
32792007-11-06 Alon Dayan <alond@il.ibm.com>
3280 Kenneth Zadeck <zadeck@naturalbridge.com>
3281
3282 * lto-read.c (process_flags, lto_static_init_local):
3283 read flags of VAR_DECL and FUNCTION_DECL of size>1.
3284 change global array num_flags_for_code to flags_length_for_code.
3285 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
3286
32872007-11-05 Nathan Froyd <froydnj@codesourcery.com>
3288
3289 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
3290 layout functions to compute information about the newly constructed
3291 type.
3292
32932007-11-02 Nathan Froyd <froydnj@codesourcery.com>
3294
3295 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
3296 case to use DECL_RESULT if necessary.
3297
32982007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3299
3300 * lto-read.c (input_tree_list): Removed.
3301 (input_tree_flags): Added parameter to force flags no matter what
3302 tree code.
3303 (input_expr_operand): Added parameter to input_tree_flags.
3304 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
3305 input_expr_operand rather than input_tree_lists.
3306 (input_local_var): Use input_expr_operand to read attributes
3307 rather then input_tree_list.
3308 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
3309
33102007-10-31 Nathan Froyd <froydnj@codesourcery.com>
3311
3312 * lto.c (lto_read_typedef_DIE): Fix comment typo.
3313 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
3314 TYPE_DECL for it.
3315 * lto-read.c (lto_read_body): Use correct sizes for calculating
3316 type_decls_offset and types_offset.
3317
33182007-10-30 Nathan Froyd <froydnj@codesourcery.com>
3319
3320 * lto-tree.h (union lang_tree_node): Change GTY description to chain
3321 with GENERIC_NEXT.
3322 * config-lang.in (gtfiles): Add lto-lang.c.
3323 * lto-lang.c: Include gt-lto-lto-lang.h.
3324 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
3325 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
3326 (lto/lto-read.o): Likewise.
3327
33282007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3329
3330 * lto-read.c (data_in): Added type_decls and current_col fields.
3331 (string_slot): New type to hold canonized file name.
3332 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
3333 input_line_info, set_line_info, clear_line_info): New functions.
3334 (file_name_hash_table): New hash table.
3335 (input_local_var, input_labels, input_local_vars_index,
3336 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
3337 (input_uleb128): Changed type of byte var.
3338 (input_expr_operand): Large number of changes to get line numbers
3339 correct. Added TYPE_DECL case.
3340 (input_globals): Added code to get TYPE_DECLs processed.
3341 (input_local_var): Added code to process line numbers and
3342 TREE_CHAIN and DECL_CONTEXT.
3343 (input_function, input_constructor): Added call to
3344 clear_line_number.
3345 (lto_static_init_local): Added code to get line numbers correct.
3346 (lto_read_body): Added code to get TYPE_DECLS read and to change
3347 parameters to the calls above that had their parms reorganized.
3348
3349
33502007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3351
3352 * lto.h (lto_resolve_typedecl_ref): Declare.
3353 * lto.c (lto_resolve_typedecl_ref): New function.
3354
33552007-10-29 Mark Mitchell <mark@codesourcery.com>
3356 Nathan Froyd <froydnj@codesourcery.com>
3357
3358 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
3359 DIEs even if we find an abstract origin for this DIE.
3360
33612007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3362
3363 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
3364 RESULT_DECL slightly earlier. Only remember the decl for later
3365 if we successfully merge declarations.
3366
33672007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
3368
3369 * lto-read.c (input_expr_operand): Give label_values the proper
3370 context and provide switch statements with a default type.
3371
33722007-10-23 Nathan Froyd <froydnj@codesourcery.com>
3373
3374 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
3375 * lto.c (lto_materialize_function): ...to here.
3376
33772007-10-22 Nathan Froyd <froydnj@codesourcery.com>
3378
3379 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
3380 * lto.c (lto_info_fd_init): Initialize it.
3381 (lto_info_fd_close): Free it.
3382 (lto_materialize_function): New function.
3383 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
3384 unmaterialized_fndecls.
3385 (lto_file_read): Read in all the function bodies after we have read
3386 all of the DWARF info.
3387 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
3388 reading a function body.
3389
33902007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
3391
3392 * lto-read.c (input_tree_flags): Renamed from input_flags to be
3393 semetric with output_tree_flags. Added call to log flags.
3394 (process_tree_flags): Renamed from process_flags. Fixed a lot of
3395 type issues to make everything consistent with flags being
3396 unsigned HOST_WIDE_INTS.
3397 (input_expr_operand): Added call to
3398 recompute_tree_invariant_for_addr_expr.
3399 (input_local_var): Added debugging for tree_chains. Now calls
3400 input_tree_flags.
3401 (input_phi): Made flags unsigned HOST_WIDE_INT.
3402 (input_ssa_names): Now calls input_tree_flags.
3403 (lto_read_body): Now sets cfun.
3404 (lto_read_function_body): Now sets current_function_pointer.
3405
34062007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3407
3408 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
3409 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
3410 inspecting fields within.
3411 (lto_read_DIE_at_ptr): Delete check for null result; let callers
3412 handle this appropriately.
3413
34142007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3415
3416 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
3417 DW_AT_abstract_origin properly. Ensure that we're not dealing with
3418 both DW_AT_abstract_origin and DW_AT_specification.
3419 (lto_read_subroutine_type_subprogram_DIE): Handle
3420 DW_AT_abstract_origin.
3421 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
3422 (lto_read_DIE_at_ptr): Define as static to match declaration.
3423 Lookup the PTR in the cache before reading it from the file.
3424 (lto_resolve_var_ref): Adjust accordingly.
3425 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
3426 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
3427
34282007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3429
3430 * lto.c (lto_read_DIE_at_ptr): New function.
3431 (lto_resolve_var_ref): Use it.
3432 (lto_resolve_fn_ref): Use it.
3433 (lto_resolve_field_ref): Use it.
3434 (lto_read_variable_formal_parameter_constant_DIE): Follow
3435 DW_AT_specification and return the associated decl when appropriate.
3436
34372007-10-18 Nathan Froyd <froydnj@codesourcery.com>
3438
3439 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
3440 Implement for scalar integer modes.
3441 (lto_init): Initialize size_type_node.
3442
34432007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
3444
3445 * lto-read.c (input_expr_operand): Remove ssa name asserts.
3446 (input_local_var): Add chaining for params.
3447 (input_ssa_names): Add cfun parameter.
3448 (input_function): Remove unnecessary else.
3449
34502007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3451
3452 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
3453 (lto_resolve_var_ref): Use proper types.
3454 (lto_resolve_fn_ref): Likewise.
3455 (lto_resolve_field_ref): Likewise.
3456
34572007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3458
3459 * lto-read.c (input_expr_operand): Remove case.
3460
34612007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3462
3463 * lto.c (lto_read_only_for_child_DIEs): New function.
3464 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
3465 * lto-elf.c (lto_elf_map_lto_section): Remove.
3466 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
3467 * lto-read.c (input_expr_operand): Assert that we never read a NULL
3468 SSA_NAME. Add missing case for mechanical codes.
3469 (input_cfg): Use basic_block_info_for_function instead of
3470 basic_block_info.
3471
34722007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3473
3474 * lto-read.c (input_sleb128, input_integer): Use proper casts.
3475 (input_list): Renamed input_tree_list and modified to follow same
3476 protocol as lto-function-out.c:output_tree_list.
3477 (input_expr_operand): Make asm operands use input_tree_list.
3478 (input_local_var): Now uses input_tree_list.
3479 (lto_read_body): Change placement for setting context of debug_labels.
3480
3481
34822007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3483
3484 * lto-read.c (input_real): Output debugging in proper order.
3485 (input_integer): Compute bit lengths properly.
3486 (input_list): Clean up declaration.
3487 (input_expr_operand): Change calls to input_real to match fix.
3488 Make reading of LTO_bit_field_ref1 match output.
3489 (input_local_var): Make reading of attributes match what is being
3490 written.
3491 (dump_debug_stream): Also print char in hex.
3492 (debug_out_fun): Fix signed unsigned mismatch.
3493
34942007-10-10 Nathan Froyd <froydnj@codesourcery.com>
3495
3496 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
3497 DW_AT_GNU_vector specially, as they are not contiguous with the
3498 specified set of attribute names. Use class_mask to check for
3499 errors at the end of the function
3500 (lto_resolve_var_ref): Read the DIE if it is not cached.
3501 (lto_resolve_fn_ref): Likewise.
3502 (lto_resolve_field_ref): Likewise.
3503
35042007-10-05 Nathan Froyd <froydnj@codesourcery.com>
3505
3506 * lto.c: Include dwarf2out.h.
3507 (lto_cache_store_DIE): Assert that we never change the value.
3508 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
3509 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
3510 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
3511 sensible type instead.
3512 (lto_read_structure_union_class_type_DIE): Store the newly
3513 created type prior to reading the members of the structure to
3514 avoid infinite recursion. Avoid computing types and alignments
3515 for structures whose sizes are unknown.
3516 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
3517 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
3518 DW_AT_const_value, and DW_AT_specification.
3519 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
3520 Return early if we have already constructed the function type.
3521 (lto_read_typedef_DIE): Check to see if the type has been cached
3522 already. Cache the type before reading any children.
3523 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
3524 (lto_read_DIE): Unset context->skip_non_parameters around reading
3525 the DIE.
3526 (lto_resolve_fn_ref): Delete trailing whitespace.
3527
35282007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3529
3530 * lto-read.c (input_expr_operand): Added type for STRING_CST.
3531
35322007-09-10 Nathan Froyd <froydnj@codesourcery.com>
3533
3534 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
3535
35362007-09-07 Nathan Froyd <froydnj@codesourcery.com>
3537
3538 * lto-lang.c (signed_and_unsigned_types): New variable.
3539 (lto_type_for_size): Consult signed_and_unsigned_types to find
3540 an approprite type, creating it if necessary.
3541 (lto_set_decl_assembler_name): Add actual method body.
3542
35432007-09-06 Jim Blandy <jimb@codesourcery.com>
3544
3545 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
3546 can't find a var init for this variable, leave its DECL_INITIAL.
3547 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
3548 lto_elf_map_fn_body.
3549 (lto_map_lto_section): New function.
3550 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
3551 bodies, and lto_elf_map_optional_lto_section for variable
3552 initializers.
3553 (lto_elf_find_section_data): Quietly return NULL if the section is
3554 missing.
3555 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
3556
3557 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
3558
3559 * lto-read.c (lto_read_body): Doc fix.
3560
35612007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3562
3563 * lto-read.c (fun_in): Renamed to data_in.
3564 (input_expr_operand, input_local_var, input_string_internal,
3565 input_string, input_real, input_list, get_label_decl,
3566 get_type_ref, input_expr_operand, input_globals, input_labels,
3567 input_local_vars_index, input_local_var, input_local_vars,
3568 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
3569 (input_constructor): New function.
3570 (lto_read_function_body): Renamed to lto_read_body and generalized
3571 to handle both functions and constructors.
3572 (lto_read_function_body, lto_read_var_init): New function.
3573
3574
35752007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3576
3577 * lto-read.c (input_expr_operand): Assert that there really is a
3578 FUNCTION_DECL.
3579 (input_globals): Removed checks on 0 section.
3580
35812007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3582
3583 * lto-read.c (fun_in): Added local_decls_index and
3584 local_decls_index_d.
3585 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
3586 (input_globals): Enabled code to handle FIELD_DECLs.
3587 (input_local_vars_index, input_local_vars): New function.
3588 (input_local_var): Changed to allow locals to be input randomly.
3589 (lto_read_function_body): Added code to input the
3590 local_decls_index and to free various structures.
3591
35922007-08-17 Jim Blandy <jimb@codesourcery.com>
3593
3594 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
3595 ATTRIBUTE_UNUSED from 'die' formal.
3596
3597 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
3598 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
3599 (input_list): Fix type of 'tag'.
3600 (input_expr_operand): Fix type of 'tag' argument. Update
3601 declaration. Fix type of 'ctag'. Add default case to switch,
3602 since the type of the switched value is now an enum.
3603 (input_local_vars): Fix type of 'tag'.
3604 (input_bb): Fix type of 'tag' argument.
3605 (input_function): Fix type of 'tag' argument.
3606
36072007-08-16 Jim Blandy <jimb@codesourcery.com>
3608
3609 * lto.c (lto_read_member_DIE): Record the tree we create in
3610 fd->die_cache. (Our 'die' argument is no longer unused.)
3611 (lto_resolve_field_ref): New function.
3612 * lto.h (lto_resolve_field_ref): New declaration.
3613
36142007-08-15 Jim Blandy <jimb@codesourcery.com>
3615
3616 * lto-read.c (lto_read_var_init): Mark arguments as unused.
3617
36182007-08-07 Jim Blandy <jimb@codesourcery.com>
3619
3620 * lto.c (lto_read_form): Complete attr_classes table.
3621 (DWARF2_form_data): Doc fix.
3622
36232007-08-05 Mark Mitchell <mark@codesourcery.com>
3624
3625 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
3626 and unmap_var_init.
3627 (lto_read_var_init): Declare.
3628 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
3629 interface for reading variable initializers.
3630 * lto-elf.c (lto_elf_read_var_init): Remove.
3631 (lto_elf_file_vtable): Update initializer.
3632 (lto_elf_read_var_init): Add comment about unused-ness.
3633 * lto-read.c (lto_read_var_init): New.
3634
3635 * lto.c (lto_read_form): Add entry for DW_AT_inline.
3636
36372007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
3638
3639 * lto-read.c (lto_read_function_body): Moved declaration of fn
3640 outside of ifdef.
3641
36422007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3643
3644 * lto-read.c (input_uleb128, input_string_internal, input_real,
3645 input_integer, input_record_start, input_list, get_type_ref,
3646 input_flags, input_expr_operand, input_expr_operand,
3647 input_expr_operand, input_local_vars, input_cfg, input_phi,
3648 input_ssa_names, input_bb, input_function): Added semicolons.
3649
3650
36512007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3652
3653 * lto-read.c (input_globals): Remove debugging.
3654 (input_function): Set DECL_ARGUMENTS.
3655
3656
36572007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3658
3659 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
3660 RETURN_EXPR, MODIFY_EXPR and processing of flags.
3661 (input_phi): Made work with operands other than SSA_NAMES and
3662 fixed processing of flags.
3663 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
3664 (input_flags): New function.
3665 * lto-lang.c (lto_init): Changed state of in_lto_p.
3666
3667
36682007-07-24 Mark Mitchell <mark@codesourcery.com>
3669
3670 * lto-tree.h (lto_varargs_cookie): Remove.
3671 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
3672 skip_non_parameters, skip_parameters.
3673 (lto_varargs_cookie): Remove.
3674 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
3675 parameter types.
3676 (lto_read_abbrev): New function.
3677 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
3678 child DIEs.
3679 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
3680 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
3681 (lto_file_read): Initialize new context fields.
3682 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
3683 (lto_unsigned_type): Remove.
3684 (lto_signed_type): Likewise.
3685 (lto_signed_or_unsigned_type): Likewise.
3686 (lto_init): Do not create lto_varargs_cookie.
3687 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
3688 (LANG_HOOKS_SIGNED_TYPE): Likewise.
3689 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
3690
36912007-07-19 Jan Hubicka <jh@suse.cz>
3692
3693 * lto-read.c (lto_read_function_body): Produce empty scope block
3694 to avoid crash.
3695
36962007-07-18 Mark Mitchell <mark@codesourcery.com>
3697
3698 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
3699 process local variables.
3700 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
3701
37022007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3703
3704 * lto-read.c (input_list, input_expr_operand): Added struct
3705 function parameter.
3706 (init_cfg, finalize_cfg): Removed function.
3707 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
3708 (input_labels, input_local_vars): Now takes input_block parameter rather than
3709 synthsyzing it.
3710 (input_cfg, input_phi, input_ssa_names): New functions.
3711 (input_bb): Now passes in input_blocks. Does not construct cfg
3712 and processes the list of phi functions.
3713 (input_function): Now builds both the cfg and ssa_names table.
3714 (lto_read_function_body): Processes new header fields to construct
3715 streams for the ssa_names and cfg and their debugging.
3716 * lto/lto-lang.c (lto_init): Set in_lto_p.
3717
3718
37192007-06-28 Mark Mitchell <mark@codesourcery.com>
3720
3721 * lto.h (lto_file_vtable): Add read_var_init.
3722 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
3723 initializers.
3724 (lto_main): Remove bogus asserts.
3725 * lto-elf.c (tm.h): Include it.
3726 (libiberty.y): Likewise.
3727 (lto_elf_file): Add strtab and symtab. Rename
3728 string_table_section_index to sec_strtab.
3729 (lto_elf_file_vtable): Add lto_elf_read_var_init.
3730 (lto_elf_get_shdr): New function.
3731 (lto_elf_free_shdr): Likewise.
3732 (lto_elf_find_section_data): Use them.
3733 (lto_elf_read_symtab): New function.
3734 (lto_elf_lookup_sym): Likewise.
3735 (lto_elf_free_sym): Likewise.
3736 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
3737 (lto_elf_built_init): New function.
3738 (lto_elf_read_var_init): Likewise.
3739 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
3740
37412007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
3742
3743 * lto-read (make_new_block): Initialize the stmt_list.
3744 (lto_static_init_local): Add debugging for missing codes.
3745
37462007-06-26 Mark Mitchell <mark@codesourcery.com>
3747
3748 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3749 unprototyped functions.
3750
37512007-06-23 Mark Mitchell <mark@codesourcery.com>
3752
3753 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3754 Handle DW_AT_MIPS_linkage_name.
3755 (lto_read_subroutine_type_subprogram): Likewise. Correct
3756 compilation errors.
3757 (lto_main): Remove incorrect assertions.
3758 * lto-symbtab.c: Build function types out of TREE_LISTs.
3759
3760 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
3761
3762 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
3763
37642007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
3765
3766 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
3767 dummy since ggc does not like empty structs.
3768 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
3769 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
3770 expr->common to expr->base.
3771 (make_new_block): Moved stmt_list to proper place.
3772
3773
37742007-03-14 Robert Kennedy <jimbob@google.com>
3775
3776 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
3777 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
3778 assembler name from DWARF.
3779 * lto-lang.c (lto_set_decl_assembler_name) New function.
3780
37812006-09-10 Mark Mitchell <mark@codesourcery.com>
3782
3783 * lto.h (lto_file_vtable): New structure.
3784 (lto_file): Add vtable pointer.
3785 (lto_file_init): Add vtable paramter.
3786 (lto_read_function_body): New function.
3787 (lto_symtab_merge_fn): New function.
3788 * lto.c (lto_file_init): Add vtable parameter.
3789 (lto_read_form): Fill in entries for DW_AT_prototyped,
3790 DW_AT_frame_base.
3791 (lto_read_subroutine_type_subprogram_DIE): New function.
3792 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
3793 DW_TAG_subprogram.
3794 * lto-elf.c (lto_elf_vile_vtable): New variable.
3795 (lto_elf_file_open): Pass it to lto_file_init.
3796 (lto_elf_map_fn_body): New function.
3797 (lto_elf_unmap_fn_body): Likewise.
3798 * lto-read.c: New file.
3799 * lto-symtab.c (lto_symtab_merge_fn): New function.
3800 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
3801 tree_rest_of_compilation.
3802 * Make-lang.in (LTO_OBJS): Add lto-read.o
3803 (lto-read.o): New target.
3804
38052006-09-03 Mark Mitchell <mark@codesourcery.com>
3806
3807 * lto.c (<inttypes.h>): Don't include it.
3808 (lto_context): Don't typedef it.
3809 (lto_resolve_reference): New function.
3810 (lto_read_form): Use it.
3811 (lto_resolve_type_ref): New function.
3812 (lto_resolve_var_ref): Likewise.
3813 (lto_resolve_fn_ref): Likewise.
3814 * lto.h (<inttypes.h>): Include it.
3815 (lto_context): New type.
3816 (lto_ref): New structure.
3817 (lto_resolve_type_ref): Declare.
3818 (lto_resolve_var_ref): Likewise.
3819 (lto_resolve_fn_ref): Likewise.
3820
38212006-08-18 Mark Mitchell <mark@codesourcery.com>
3822
3823 * lang-specs.h: New file.
3824
38252006-08-14 Mark Mitchell <mark@codesourcery.com>
3826
3827 * lto.c (lto_info_fd_init): Allocate the DIE cache.
3828 (lto_info_fd_close): Deallocate it.
3829 (lto_die_cache_entry): New structure.
3830 (lto_cache_hash): New function.
3831 (lto_cache_eq): Likewise.
3832 (lto_cache_store_DIE): Likewise.
3833 (lto_cache_lookup_DIE): Likewise.
3834 (lto_read_referenced_type_DIE): Use the cache.
3835 (lto_read_pointer_type_DIE): Robustify.
3836 (lto_read_DIE): Use the cache.
3837 * lto.h (hashtab.h): Include.
3838 (lto_info_fd): Add DIE cache.
3839 * Make-lang.in (LTO_H): New variable.
3840 (lto/lto-lang.o): Use LTO_H.
3841 (lto/lto-elf.o): Likewise.
3842 (lto/lto-symtab.o): Likewise.
3843
38442006-07-09 Mark Mitchell <mark@codesourcery.com>
3845
3846 * lto.c (lto_abi_mismatch_error): New function.
3847 (lto_abbrev_read): Initialize num_abbrevs.
3848 (lto_read_form): Specify allowed form classes for
3849 DW_AT_declaration. Adjust for change to lto_set_cu_context.
3850 (lto_read_variable_formal_parameter_constant_DIE): Handle
3851 DW_AT_declaration. Call lto_symtab_merge_var.
3852 (lto_read_pointer_type_DIE): New function.
3853 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
3854 not creat TYPE_DECLs for types that already have them.
3855 (lto_read_DIE): Add lto_read_pointer_type_DIE.
3856 (lto_set_cu_context): Make cu_start point to the header, not the
3857 first DIE.
3858 (lto_file_read): Adjust for change to lto_set_cu_context.
3859 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
3860 (lto/lto-symtab.o): New rule.
3861 * lto-tree.h (lang_identifier): Add decl field.
3862 (LANG_IDENTIFIER_CAST): New macro.
3863 (LTO_IDENTIFIER_DECL): Likewise.
3864 (lto_symtab_merge_var): Declare.
3865 * lto-symtab.c: New file.
3866
38672006-07-02 Daniel Berlin <dberlin@dberlin.org>
3868
3869 * lto.c (lto_context): Add current_cu and info_fd members.
3870 (DWARF2_CompUnit): New structure.
3871 (lto_read_DIE): Take lto_info_fd *.
3872 (lto_read_child_DIEs): Ditto.
3873 (lto_file_corrupt_error): Constify argument.
3874 (lto_set_cu_context): New function
3875 (lto_info_fd_init): Ditto.
3876 (lto_info_fd_close): Ditto.
3877 (lto_file_init): Use lto_info_fd_init.
3878 (lto_file_close): Use lto_info_fd_close.
3879 (lto_read_initial_length): Pass in pointer to header size.
3880 (lto_read_comp_unit_header): Correct cu_length to
3881 real length from beginning of header. Take lto_info_fd * as
3882 argument.
3883 (find_cu_for_offset): New function.
3884 (lto_read_form): Change first argument to lto_info_fd *.
3885 Add FORM_CONTEXT argument.
3886 Handle DW_FORM_ref_addr.
3887 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
3888 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
3889 Swap contexts if necessary for form.
3890 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
3891 lto_file_corrupt_error.
3892 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
3893 (lto_read_referenced_type_DIE): Change first argument to
3894 lto_info_fd *. Access lto_fd fields through base pointer.
3895 (lto_read_compile_unit_DIE): Change first argument to an
3896 lto_info_fd *.
3897 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
3898 (lto_read_base_type_DIE): Ditto.
3899 (lto_read_child_DIEs): Ditto.
3900 (lto_read_DIE): Ditto. Change type of function pointer.
3901 (lto_info_read): New function.
3902 (lto_set_cu_context): Ditto.
3903 (lto_file_read): Use lto_info_read, walk resulting CU's
3904 (lto_main): Update for lto_info_fd change.
3905 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
3906 necessary.
3907 * lto.h (DWARF2_CompUnit): New structure.
3908 (lto_info_fd): Ditto.
3909 (lto_file): Change debug_info to be an lto_info_fd.
3910
39112006-06-25 Mark Mitchell <mark@codesourcery.com>
3912
3913 * lto.c (toplev.h): Include it.
3914 (dwarf2.h): Likewise.
3915 (tree.h): Likewise.
3916 (tm.h): Likewise.
3917 (cgraph.h): Likewise.
3918 (ggc.h): Likewise.
3919 (inttypes.h): Likewise.
3920 (DWARF2_attr): New type.
3921 (DWARF2_abbrev): Likewise.
3922 (DWARF2_class): Likewise.
3923 (DWARF2_form_data): Likewise.
3924 (lto_context): Likewise.
3925 (lto_fd_init): New function.
3926 (lto_abbrev_fd_init): Likewise.
3927 (lto_abbrev_fd_close): Likewise.
3928 (lto_file_init): Use them.
3929 (lto_file_close): New function.
3930 (lto_file_corrupt_error): Likewise.
3931 (LTO_CHECK_INT_VAL): New macro.
3932 (lto_check_size_t_val): New function.
3933 (lto_check_int_val): Likewise.
3934 (LTO_READ_TYPE): New macro.
3935 (lto_read_ubyte): New function.
3936 (lto_read_uhalf): Likewise.
3937 (lto_read_uword): Likewise.
3938 (lto_read_uleb128): Likewise.
3939 (lto_read_initial_length): Likewise.
3940 (lto_abbrev_read_attrs): Likewise.
3941 (lto_abbrev_read): Likewise.
3942 (lto_abbrev_lookup): Likewise.
3943 (lto_read_section_offset): Likewise.
3944 (lto_read_comp_unit_header): Likewise.
3945 (lto_read_form): Likewise.
3946 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
3947 (LTO_BEGIN_READ_ATTRS): Likewise.
3948 (LTO_END_READ_ATTRS): Likewise.
3949 (lto_unsupported_attr_error): New function.
3950 (lto_get_identifier): Likewise.
3951 (lto_read_referenced_type_DIE): Likewise.
3952 (lto_read_compile_unit_DIE): Likewise.
3953 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
3954 (lto_read_base_type_DIE): Likewise.
3955 (lto_read_DIE): Likewise.
3956 (lto_read_child_DIEs): Likewise.
3957 (lto_file_read): Read DIEs.
3958 (lto_main): Ask middle end to emit entities.
3959 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
3960 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
3961 (lto_elf_file_close): Likewise.
3962 * lto.h (lto_file): Declare.
3963 (DWARF2_abbrev): Likewise.
3964 (lto_fd): New type.
3965 (lto_abbrev_fd): Likewise.
3966 (lto_file): Use new types.
3967 (lto_file_close): Declare.
3968 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
3969
39702006-06-18 Mark Mitchell <mark@codesourcery.com>
3971
3972 * lto.h: New file.
3973 * lto.c: New file.
3974 * lto-elf.c: New file.
3975 * lto-lang.c (flags.h): Include it.
3976 (lto.h): Likewise.
3977 (lto_init): New function.
3978 (lto_write_globals): Remove.
3979 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
3980 (LANG_HOOKS_INIT): Define.
3981 (LANG_HOOKS_PARSE_FILE): Likewise.
3982 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
3983 (LTO_EXE): Link with libelf.
3984 (lto/lto-lang.o): Update dependencies.
3985 (lto/lto.o): New target.
3986 (lto/lto-elf.o): Likewise.
3987
39882006-06-12 Mark Mitchell <mark@codesourcery.com>
3989
3990 * config-lang.in: New file.
3991 * Make-lang.in: Likewise.
3992 * lto-tree.h: Likewise.
3993 * lto-lang.c: Likewise.
3994