]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
Fix typos.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
c525ba9a
JH
12013-06-20 Jan Hubicka <jh@suse.cz>
2
3 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
4 partitioning of variables.
5
7a89ad00
JH
62013-06-20 Jan Hubicka <jh@suse.cz>
7
8 * lto.c (read_cgraph_and_symbols): Set cgraph state.
9
6a6dac52
JH
102013-06-19 Jan Hubicka <jh@suse.cz>
11
12 * lto-partition.c (add_references_to_partition): Use
13 ctor_for_folding.
14
ac0511f2
RB
152013-06-18 Richard Biener <rguenther@suse.de>
16
17 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
18 and use it.
19 (lto_register_function_decl_in_symtab): Likewise.
20 (cmp_tree): New function.
21 (unify_scc): Instead of using the streamer cache map from entry
22 to cache index match up the two maps we have by sorting them.
23 Adjust calls to lto_register_var_decl_in_symtab and
24 lto_register_function_decl_in_symtab.
25
ee03e71d
RB
262013-06-17 Richard Biener <rguenther@suse.de>
27
28 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
29 * lto.c: Include data-streamer.h.
30 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
31 (gimple_type_leader_entry_s, gimple_type_leader,
32 gimple_lookup_type_leader): Remove.
33 (gtc_visit): Simplify.
34 (gimple_types_compatible_p): Likewise.
35 (gimple_register_type_1): Likewise. Merge into ...
36 (gimple_register_type): ... this. Keep it as legacy for
37 statistics purposes for now.
38 (fixup_integer_cst): Remove.
39 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
40 rename to ...
41 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
42 maybe_remember_with_vars_*): ... these.
43 (uniquify_nodes): Remove.
44 (lto_fixup_prevailing_type): New function.
45 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
46 (tree_scc_hash, tree_scc_hash_obstack): New globals.
47 (num_merged_types, num_prevailing_types, num_not_merged_types,
48 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
49 total_scc_size_merged, num_sccs_merged, num_scc_compares,
50 num_scc_compare_collisions): New global counters.
51 (compare_tree_sccs_1): New function.
52 (compare_tree_sccs): Likewise.
53 (unify_scc): Likewise.
54 (lto_read_decls): Stream in tree SCCs and unify them on the
55 way in. Finalize prevailing SCC tree members.
56 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
57 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
58 to ggc-collect during merging.
59 (print_lto_report_1): Adjust for new merging code.
60
ca0f62a8
JH
612013-06-12 Jan Hubicka <jh@suse.cz>
62
63 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
64
bbf9ad07
JH
652013-06-12 Jan Hubicka <jh@suse.cz>
66
67 * lto.c (register_resolution): Take lto_file_data argument.
68 (lto_register_var_decl_in_symtab,
69 lto_register_function_decl_in_symtab): Update.
70 (read_cgraph_and_symbols): Update resolution_map handling.
71
08346abd
JH
722013-06-11 Jan Hubicka <jh@suse.cz>
73
74 * lto-partition.c (get_symbol_class): Simplify weakref handling.
75 (add_symbol_to_partition_1): Likewise.
76 (contained_in_symbol): Likewise.
77 (lto_balanced_map): Likewise.
78 (rename_statics): Drop weakref.
79
a367df53
RB
802013-06-05 Richard Biener <rguenther@suse.de>
81
82 * lto.c (num_merged_types): New global variable.
83 (uniquify_nodes): Increase num_merged_types when merging a type.
84 (print_lto_report_1): Output the number of merged types.
85
40a7fe1e
JH
862013-06-01 Jan Hubicka <jh@suse.cz>
87
88 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
89 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
90 (do_whole_program_analysis): Update dumping.
91
e70670cf
JH
922013-05-29 Jan Hubicka <jh@suse.cz>
93
94 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
95 flags.
96 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
97
8ee05051
JH
982013-05-15 Jan Hubicka <jh@suse.cz>
99
100 * lto-partition.c (privatize_symbol_name): Return true when
101 privatizing happened.
102 (rename_statics): Do not go into infinite loop when privatizing
103 is not needed.
104
427b248d
JM
1052013-05-16 Jason Merrill <jason@redhat.com>
106
107 * Make-lang.in ($(LTO_EXE)): Use link mutex.
108
9de04252
MJ
1092013-05-15 Martin Jambor <mjambor@suse.cz>
110
111 * lto-partition.c (lto_balanced_map): Print symbol order instead
112 of node uids.
113
2d6e4603
JH
1142013-05-15 Jan Hubicka <jh@suse.cz>
115
116 PR lto/57038
117 PR lto/47375
118 * lto-partition.c (get_symbol_class): Fix weakrefs.
119 (lto_balanced_map): Fix weakrefs.
120 (privatize_symbol_name): Remove unnecesary label.
121 (rename_statics): Handle weakrefs as statics.
122
64cfa6c0
JH
1232013-05-09 Jan Hubicka <jh@suse.cz>
124 Richard Biener <rguenther@suse.de>
125
126 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
127 (lto_register_var_decl_in_symtab): Likewise.
128 (lto_main): Promote statics.
129 * lto-partition.c (privatize_symbol_name): New function.
130 (promote_symbol): Use it.
131 (may_need_named_section_p): New predicate.
132 (rename_statics): New functions.
133 (lto_promote_cross_file_statics): Simplify; do renaming.
134 (lto_promote_statics_nonwpa): New function.
135 * lto-partition.h (lto_promote_statics_nonwpa): New function.
136
e45cde98
RB
1372013-02-08 Richard Biener <rguenther@suse.de>
138
139 PR lto/56231
140 * lto-lang.c (lto_init): Do not enter a dummy file.
141
6edc3e32
UB
1422013-02-07 Uros Bizjak <ubizjak@gmail.com>
143
144 PR bootstrap/56227
145 * lto.c (lto_resolution_ready): Use %wx instead of
146 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
147
ed73881e
RG
1482013-02-04 Richard Guenther <rguenther@suse.de>
149
150 PR lto/56168
151 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
152 or lto_fixup_decls at LTRANS time.
153
a19b1432
JH
1542013-01-09 Jan Hubicka <jh@suse.cz>
155
156 PR lto/45375
157 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
158
49c01f87
L
1592012-12-10 H.J. Lu <hongjiu.lu@intel.com>
160
161 PR lto/55466
162 * lto.c (lto_register_var_decl_in_symtab): Don't record static
163 variables.
164 (lto_main): Record the global variables if WPA isn't enabled.
165
6e1aa848
DN
1662012-11-20 Diego Novillo <dnovillo@google.com>
167 Jakub Jelinek <jakub@redhat.com>
168
169 * lto.c: Replace all vec<T, A>() initializers with vNULL.
170
9771b263
DN
1712012-11-16 Diego Novillo <dnovillo@google.com>
172
173 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
174
175 * lto-lang.c: Use new vec API in vec.h.
176 * lto-partition.c: Likewise.
177 * lto-partition.h: Likewise.
178 * lto.c: Likewise.
179
24551b9c
LC
1802012-10-31 Lawrence Crowl <crowl@google.com>
181
182 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
183 down-cast via dyn_cast.
184 * lto-partition.c (add_symbol_to_partition_1): Likewise.
185 (undo_partition): Likewise.
186 (lto_balanced_map): Likewise.
187 (get_symbol_class): Likewise and via is_a.
188 (lto_balanced_map): Change symtab checking to is_a.
189
aec06f6f
RB
1902012-10-12 Richard Biener <rguenther@suse.de>
191
192 PR lto/54898
193 * lto.c (gimple_types_compatible_p_1): Also compare
194 TYPE_MAIN_VARIANT.
195 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
196
0b8c30f9
TB
1972012-10-09 Tobias Burnus <burnus@net-b.de>
198
199 * lto-lang.c (lto_register_builtin_type): Avoid useless
200 decl creation.
201 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
202
da3202a8
TB
2032012-10-08 Tobias Burnus <burnus@net-b.de>
204
205 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
206 Free lto_file struct after closing the file.
207
2512a443
JH
2082012-10-08 Jan Hubicka <jh@suse.cz>
209
210 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
211 (fixup_integer_cst): New functoin.
212 (lto_ft_type): Fixup BASETYPE of methods and offsets.
213
e75f8f79
JH
2142012-10-07 Jan Hubicka <jh@suse.cz>
215
216 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
217 release input encoders.
218 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
219
46591697
JH
2202012-10-06 Jan Hubicka <jh@suse.cz>
221
222 PR lto/54790
223 * lto.c (resolution_map): New static var.
224 (register_resolution): New function.
225 (lto_register_var_decl_in_symtab): Use it.
226 (read_cgraph_and_symbols): Copy resolutions into the symtab.
227
af16bc76
MJ
2282012-09-20 Martin Jambor <mjambor@suse.cz>
229
230 * lto.c (lto_materialize_function): Call push_struct_function and
231 pop_cfun.
232
5368224f
DC
2332012-09-19 Dehao Chen <dehao@google.com>
234
235 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
236
b5493fb2
JH
2372012-09-19 Jan Hubicka <jh@suse.cz>
238
239 * lto.c (lto_materialize_function): Update confused comment.
240 (read_cgraph_and_symbols): Do not free symtab.
241
c3c445e1
JH
2422012-09-12 Jan Hubicka <jh@suse.cz>
243
244 * lto.c (do_whole_program_analysis): Care timevars, statistics and
245 AUX pointer cleaning. Add max partitioning.
246 * lto-partition.c (enum symbol_class): New.
247 (get_symbol_class): New function.
248 (symbol_partitioned_p): New function.
249 (add_references_to_partition): Remove.
250 (add_aliases_to_partition): Remove.
251 (add_cgraph_node_to_partition_1): Remove.
252 (add_cgraph_node_to_partition): Remove.
253 (add_symbol_to_partition): New function.
254 (add_symbol_to_partition_1): New function.
255 (contained_in_symbol): New function.
256 (partition_cgraph_node_p): Remove.
257 (partition_varpool_node_p): Remove.
258 (partition_symbol_p): Remove.
259 (lto_1_to_1_map): Cleanup.
260 (lto_max_map): New.
261 (lto_balanced_map): Update.
262 (lto_promote_cross_file_statics): Update.
263 * lto-partition.h (lto_max_map): Declare.
264 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
265
b5c7cdfb
JH
2662012-09-11 Jan Hubicka <jh@suse.cz>
267
268 PR lto/54312
269 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
270 type is variant leader.
271
b29402f0
RG
2722012-09-11 Richard Guenther <rguenther@suse.de>
273
274 * lto.c (enum gtc_mode): Remove.
275 (struct type_pair_d): Adjust.
276 (lookup_type_pair): Likewise.
277 (gimple_type_leader): Do not mark as deletable.
278 (gimple_lookup_type_leader): Adjust.
279 (gtc_visit): Likewise.
280 (gimple_types_compatible_p_1): Likewise.
281 (gimple_types_compatible_p): Likewise.
282 (gimple_type_hash): Likewise.
283 (gimple_register_type): Likewise.
284 (read_cgraph_and_symbols): Manage lifetime of tables
285 here.
286
b8f4e58f
RG
2872012-09-11 Richard Guenther <rguenther@suse.de>
288
289 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
290 struct type_pair_d, lookup_type_pair, struct sccs,
291 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
292 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
293 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
294 visit, iterative_hash_name, struct type_hash_pair,
295 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
296 gimple_type_eq, gimple_register_type_1, gimple_register_type):
297 Move here from gimple.c
298 (read_cgraph_and_symbols): Free hash tables here.
299 (print_lto_report_1): New function wrapping print_lto_report.
300 (do_whole_program_analysis): Call it.
301 (lto_main): Likewise.
302
1cdbb3f9
JH
3032012-09-10 Jan Hubicka <jh@suse.cz>
304
305 * lto-partition.c (partition_symbol_p): Forward declare.
306 (add_references_to_partition): Reimplement using partition_symbol_p.
307 (add_aliases_to_partition): Break out from add_references_to_partition;
308 reimplement using partition_symbol_p.
309 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
310 add sanity checks.
311 (add_varpool_node_to_partition): Use add_aliases_to_partition.
312 (partition_varpool_node_p): Do not special case aliases.
313
b4661bfe
JH
3142012-08-12 Jan Hubicka <jh@suse.cz>
315
316 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
317 it is deleted after streaming.
318 * lto-partition.c (partition_symbol_p): New function.
319 (promote_var, promote_fn): Remove.
320 (promote_symbol): New function.
321 (lto_promote_cross_file_statics): First compute boundaries; rewrite
322 to lookup the actual boundaries instead of computing them ad-hoc.
323
7b99cca4
JH
3242012-08-12 Jan Hubicka <jh@suse.cz>
325
326 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
327 in partitioning.
328 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
329 by encoder.
330 * lto-partition.c (new_partition): Update.
331 * lto.c (cmp_partitions_order): Update.
332 (lto_wpa_write_files): Update.
333 (free_ltrans_partitions): Update.
334 (add_references_to_partition): Update.
335 (add_cgraph_node_to_partition_1): Update.
336 (add_cgraph_node_to_partition): Update.
337 (add_varpool_node_to_partition): Update.
338 (undo_partition): Update.
339 (lto_balanced_map): Update.
340 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
341 set_referenced_from_this_partition_p): Update.
342 (lto_promote_cross_file_statics): Update.
343
f27c1867
JH
3442012-08-12 Jan Hubicka <jh@suse.cz>
345
346 * lto-partition.c (set_referenced_from_other_partition_p,
347 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
348 New functions.
349 (lto_promote_cross_file_statics): Use them.
350
ab96cc5b
JH
3512012-07-24 Jan Hubicka <jh@suse.cz>
352
353 * lto.c (read_cgraph_and_symbols): Use input_symtab.
354
0229aee9
UB
3552012-07-24 Uros Bizjak <ubizjak@gmail.com>
356
357 * lto-tree.h (lang_decl): Add variable_size GTY option.
358
7ee2468b
SB
3592012-07-16 Steven Bosscher <steven@gcc.gnu.org>
360
361 * lto.c: Do not include timevar.h.
362 * Make-lang.in: Fix dependencies.
363
a910399d
LC
3642012-06-18 Lawrence Crowl <crowl@google.com>
365
366 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
367 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
368 to lto_wpa_write_files.
369 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
370 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
371 TV_PHASE_SETUP for the call to lto_init. Use new timevar
372 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
373 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
374 to be a front end, but is not one.
375
877ab5e9
JH
3762012-05-18 Jan Hubicka <jh@suse.cz>
377
378 * lto.c (lto_materialize_constructors_and_inits): Remove.
379 (read_cgraph_and_symbols): Remove handling of alias pairs.
380
6649df51
JH
3812012-05-17 Jan Hubicka <jh@suse.cz>
382
383 * lto-partition.c (add_references_to_partition): Handle external vars.
384 (partition_varpool_node_p): Likewise.
385 (lto_promote_cross_file_statics): Do not promote externals.
386
d1ede5f4
BS
3872012-05-14 Bernd Schmidt <bernds@codesourcery.com>
388
389 * lto-lang.c (handle_fnspec_attribute): New static function.
390 (lto_attribute_table): Add "fn spec".
391 (DEF_ATTR_STRING): Define and undefine along with the other macros.
392
0d6bf48c
JH
3932012-05-04 Jan Hubicka <jh@suse.cz>
394
395 * lto.c (do_whole_program_analysis): Set timevars correctly.
396 (lto_main): Likewise.
d1ede5f4 397
1d67dde8
RB
3982012-05-04 Richard Guenther <rguenther@suse.de>
399
400 * lang.opt (fwpa): Do not mark as Optimization.
401 (fltrans): Likewise.
402
65d630d4
JH
4032012-04-30 Jan Hubicka <jh@suse.cz>
404
405 * lto.c (lto_main): Use compile ().
1d67dde8
RB
406 * lto-partition.c (partition_cgraph_node_p): Use
407 symtab_used_from_object_file_p.
65d630d4
JH
408 (partition_varpool_node_p): Likewise.
409
ead84f73
JH
4102012-04-20 Jan Hubicka <jh@suse.cz>
411
412 * lto-partition.c (partition_cgraph_node_p): Use force_output.
413
5932a4d4
JH
4142012-04-18 Jan Hubicka <jh@suse.cz>
415
416 * lto-partition.c (add_references_to_partition, lto_balanced_map):
417 Update for new ipa-ref API.
418
65c70e6b
JH
4192012-04-16 Jan Hubicka <jh@suse.cz>
420
421 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
422 walkers to walk cgraph and varpool.
423 (materialize_cgraph): Likewise.
424 * lto-partition.c (lto_1_to_1_map): Likewise.
425 (lto_balanced_map): Likewise.
426 (lto_promote_cross_file_statics): Likewise.
427
960bfb69
JH
4282012-04-14 Jan Hubicka <jh@suse.cz>
429
430 * lto.c: Update field referenced for new cgraph/varpool layout.
431 * lto-partition.c: Likewise.
432
a66dc285
JH
4332012-04-11 Jan Hubicka <jh@suse.cz>
434
435 * lto.c: Update copyright; remove params.h, ipa-inline.h
436 and ipa-utils.h inlines; inline lto-partition.h
437 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
438 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
439 add_references_to_partition, add_cgraph_node_to_partition_1,
440 add_cgraph_node_to_partition, add_varpool_node_to_partition,
441 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
442 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
443 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
444 * lto-partition.c: ... here; new file.
445 * lto-partition.h: New file.
446 * Make-lang.in (lto.o): Update dependencies.
447 (lto-partition.o): New.
448
f3b249e5
RG
4492012-04-05 Richard Guenther <rguenther@suse.de>
450
451 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
452 definition.
453
21fa2faf
RG
4542012-03-12 Richard Guenther <rguenther@suse.de>
455
456 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
457
6bb485a3
RG
4582012-03-06 Richard Guenther <rguenther@suse.de>
459
460 PR lto/52097
461 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
462
95510497
RG
4632012-02-28 Richard Guenther <rguenther@suse.de>
464
465 PR lto/52400
466 * lto.c (lto_register_function_decl_in_symtab): Do not register
467 a reverse renamed decl mapping.
468
09228fef
JJ
4692012-01-06 Jakub Jelinek <jakub@redhat.com>
470
471 PR lto/51774
472 * lto-lang.c (handle_returns_twice_attribute): New function.
473 (lto_attribute_table): Add returns_twice attribute.
474
b03eda0d
RG
4752011-12-21 Richard Guenther <rguenther@suse.de>
476
477 * lto.c (GIMPLE_REGISTER_TYPE): New define.
478 (LTO_FIXUP_TREE): Use it.
479 (uniquify_nodes): Mark new non-prevailing types and avoid
480 calling gimple_register_type on others.
481 (lto_read_decls): Add comment.
482
4ad9a9de
EB
4832011-12-13 Eric Botcazou <ebotcazou@adacore.com>
484
485 * lto.h (lto_parse_hex): Delete.
486 * lto.c (lto_read_decls): Use 'int' for offsets.
487 (lto_parse_hex): Make static and return proper 64-bit host type.
488 (lto_resolution_read): Use proper 64-bit host type.
489
ea973bad
RG
4902011-12-13 Richard Guenther <rguenther@suse.de>
491
492 PR lto/48354
493 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
494 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
495
c8218030
UB
4962011-12-01 Uros Bizjak <ubizjak@gmail.com>
497
498 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
499 (ignore_attribute): New.
500
57ac2606
AH
5012011-11-21 Aldy Hernandez <aldyh@redhat.com>
502
503 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
504 (handle_transaction_pure_attribute): New.
505
52a35ef7
RG
5062011-11-03 Richard Guenther <rguenther@suse.de>
507
508 PR lto/44965
509 * lto-lang.c (lto_post_options): Do not read file options.
510 * lto.c (lto_read_all_file_options): Remove.
511 (lto_init): Call lto_set_in_hooks here.
512
51973b1e
JH
5132011-10-09 Jan Hubicka <jh@suse.cz>
514
515 * lto.c (node_cmp, varpool_node_cmp): New functions.
516 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
517 (cmp_partitions): Rename to ...
518 (cmp_partitions_size): ... this one.
519 (cmp_partitions_order): New function.
520 (lto_wpa_write_files): Sort partitions by order when
521 -fno-toplevel-reorder is used.
522
5958009b
AK
5232011-10-09 Andi Kleen <ak@linux.intel.com>
524
525 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
526
e79983f4
MM
5272011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
528
529 * lto-lang.c (def_builtin_1): Delete old interface with two
530 parallel arrays to hold standard builtin declarations, and replace
531 it with a function based interface that can support creating
532 builtins on the fly in the future. Change all uses, and poison
533 the old names. Make sure 0 is not a legitimate builtin index.
534
c17d253c
AK
5352011-10-02 Andi Kleen <ak@linux.intel.com>
536
537 * lto-object.c (lto_obj_add_section_data): Add list.
538 (lto_obj_add_section): Fill in list.
539 (ltoobj_build_section_table): Pass through list.
540 * lto.c (file_data_list): Declare.
541 (create_subid_section_table): Pass arguments directly.
542 Fill in list of file_datas.
543 (lwstate): Delete.
544 (lto_create_files_from_ids): Pass in direct arguments.
545 Don't maintain list.
546 (lto_file_read): Use explicit section and file data lists.
547 (lto_read_all_file_options): Pass in section_list.
548 * lto.h (lto_obj_build_section_table): Add list.
549 (lto_section_slot): Add next.
550 (lto_section_list): Declare.
551
ed0d2da0
JH
5522011-10-02 Jan Hubicka <jh@suse.cz>
553
554 PR lto/47247
555 * common.c (lto_resolution_str): Add new resolution.
556 * common.h (lto_resolution_str): Likewise.
557
ad7715f3
L
5582011-09-30 H.J. Lu <hongjiu.lu@intel.com>
559 Andi Kleen <ak@linux.intel.com>
560
561 PR lto/50568
562 * lto.c (lto_splay_tree_delete_id): New.
563 (lto_splay_tree_compare_ids): Likewise.
564 (lto_splay_tree_lookup): Likewise.
565 (lto_splay_tree_id_equal_p): Likewise.
566 (lto_splay_tree_insert): Likewise.
567 (lto_splay_tree_new): Likewise.
568 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
569 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
570 (create_subid_section_table): Use lto_splay_tree_lookup and
571 lto_splay_tree_insert.
572 (lto_file_read): Use lto_splay_tree_new.
573
dde8b360
AK
5742011-09-26 Andi Kleen <ak@linux.intel.com>
575
576 * lto.c (lto_resolution_read): Remove id dumping.
577 (lto_section_with_id): Turn id HOST_WIDE_ID.
578 (create_subid_section_table): Dito.
579
892a371f
DS
5802011-08-28 Dodji Seketeli <dodji@redhat.com>
581
582 * lto-lang.c (lto_init): Likewise. Also, avoid calling
583 linemap_add twice.
584
f82d1a94
MJ
5852011-08-11 Martin Jambor <mjambor@suse.cz>
586
587 * lto.c (uniquify_nodes): Use main variant's BINFO too.
588
f0efc7aa
DN
5892011-08-08 Diego Novillo <dnovillo@google.com>
590
591 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
592 * lto.c: Include tree-streamer.h.
593
1a072294
RG
5942011-07-06 Richard Guenther <rguenther@suse.de>
595
596 * lto-lang.c (lto_init):
597 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
598
7496868d
JH
5992011-06-11 Jan Hubicka <jh@suse.cz>
600
10f13f22 601 PR lto/48246
7496868d
JH
602 * lto.c (lto_1_to_1_map): Don't create empty partitions.
603 (lto_balanced_map): Likewise.
604
39e2db00
JH
6052011-06-11 Jan Hubicka <jh@suse.cz>
606
607 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
608 (add_cgraph_node_to_partition) ... here; walk aliases.
609 (lto_1_to_1_map): Remove same body alias code.
610 (promote_fn): Likewise.
611 (lto_promote_cross_file_statics): Update comment.
612
613
28628ea6
DN
6142011-06-07 Diego Novillo <dnovillo@google.com>
615
616 * lto.c (uniquify_nodes): Move code to register decls to
617 the loop that computes canonical types.
618
009db074
RG
6192011-06-07 Richard Guenther <rguenther@suse.de>
620
621 * lto-lang.c (lto_init): Do not set
622 size_type_node or call set_sizetype.
623
47c79d56
DN
6242011-06-04 Diego Novillo <dnovillo@google.com>
625
626 * lto.c (lto_init): New.
627 (lto_main): Call it.
628
d5828cc7
DN
6292011-06-03 Diego Novillo <dnovillo@google.com>
630
631 * lto.c (get_resolution): Move from lto-streamer-in.c.
632 (lto_register_var_decl_in_symtab): Likewise.
633 (lto_register_function_decl_in_symtab): Likewise.
634 (uniquify_nodes): Call lto_register_var_decl and
635 lto_register_function_decl_in_symtab after reading a new
636 VAR_DECL or FUNCTION_DECL.
637
6807da97
RG
6382011-06-01 Richard Guenther <rguenther@suse.de>
639
640 * lto-lang.c (lto_register_canonical_types): New function.
641 (lto_init): Register common nodes with the canonical type machinery.
642 Do not play tricks with char_type_node.
643
d74be317
RG
6442011-05-26 Richard Guenther <rguenther@suse.de>
645
646 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
647
d9f8303f
NF
6482011-05-25 Nathan Froyd <froydnj@codesourcery.com>
649
650 * lto.c (lto_ft_typed): New function.
651 (lto_ft_common): Call it.
652 (lto_ft_constructor): Likewise.
653 (lto_ft_expr): Likewise.
654 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
655 TREE_CHAIN.
656
fb291a1e
RG
6572011-05-20 Richard Guenther <rguenther@suse.de>
658
659 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
660 (lto_ft_type): Move main-variant and pointer-to chain building ...
661 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
662 in a separate final loop.
663
31b3ca64
RG
6642011-05-19 Richard Guenther <rguenther@suse.de>
665
666 * lto.c (uniquify_nodes): First register all types before
667 fixing up the tree SCC.
668
35d828c5
JH
6692011-05-11 Jan Hubicka <jh@suse.cz>
670
671 PR lto/48952
672 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
673
51545682
NF
6742011-05-11 Nathan Froyd <froydnj@codesourcery.com>
675
676 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
677 location of binfo field.
678 (lto_fixup_prevailing_decls): Likewise.
679
8242dd04
NF
6802011-05-10 Nathan Froyd <froydnj@codesourcery.com>
681
682 * lto-lang.c (def_fn_type): Don't call build_function_type, call
683 build_function_type_array or build_varargs_function_type_array
684 instead.
685
c99c0026
EB
6862011-05-07 Eric Botcazou <ebotcazou@adacore.com>
687
688 * lto-lang.c (global_bindings_p): Return bool.
689
c47d0034
JH
6902011-05-07 Jan Hubicka <jh@suse.cz>
691
a9bcb3f0
EB
692 * lto.c (lto_materialize_function): Use
693 cgraph_function_with_gimple_body_p.
694 (add_cgraph_node_to_partition): Do not re-add items to partition;
695 handle thunks.
c47d0034
JH
696 (add_varpool_node_to_partition): Do not re-add items to partition.
697
bb3398ca
JH
6982011-05-03 Jan Hubicka <jh@suse.cz>
699
700 * lto.c (free_ltrans_partitions): Fix accidental commit.
701
1cb1a99f
JH
7022011-05-03 Jan Hubicka <jh@suse.cz>
703
704 * lto.c (ltrans_partition_def): Remove GTY annotations.
705 (ltrans_partitions): Move to heap.
706 (new_partition): Update.
707 (free_ltrans_partitions): New function.
708 (lto_wpa_write_files): Use it.
709
af8bca3c
MJ
7102011-04-29 Martin Jambor <mjambor@suse.cz>
711
712 * lto.c: Include ipa-utils.h.
713 (lto_balanced_map): Update call to ipa_reverse_postorder.
714 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
715
b823cdfe
MM
7162011-04-29 Michael Matz <matz@suse.de>
717
718 * lto.c (toplevel): Include tree-flow.h.
719 (lto_read_in_decl_state): Don't merge types here.
720 (tree_with_vars): New static hash table.
721 (remember_with_vars): New static functions.
722 (LTO_FIXUP_TYPE): New macro.
723 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
724 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
725 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
726 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
727 (lto_read_decls): Uniquify while reading in trees.
728 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
729 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
730 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
731 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
732 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
733 lto_fixup_tree): Remove.
734 (lto_fixup_state): Remove data argument. Use
735 lto_symtab_prevailing_decl.
736 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
737 (lto_fixup_prevailing_decls): New function.
738 (lto_fixup_state_aux): Argument aux is unused.
739 (lto_fixup_decls): Don't allocate pointer sets, don't use
740 lto_fixup_tree, use lto_fixup_prevailing_decls.
741 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
742 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
743
b9843260
EB
7442011-04-16 Eric Botcazou <ebotcazou@adacore.com>
745
746 * lto.c (lto_balanced_map): Fix typos in head comment.
747 (lto_promote_cross_file_statics): Fix long lines and remove redundant
748 test.
749
e7f23018
JH
7502011-04-16 Jan Hubicka <jh@suse.cz>
751
752 * lto.c (lto_balanced_map): Update.
753
10a5dd5d
JH
7542011-04-14 Jan Hubicka <jh@suse.cz>
755
756 * lto.c: Include ipa-inline.h
b9843260
EB
757 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
758 accessor.
10a5dd5d
JH
759 (ipa_node_duplication_hook): Fix declaration.
760 * Make-lang.in (lto.o): Update dependencies.
761
81f653d6
NF
7622011-04-12 Nathan Froyd <froydnj@codesourcery.com>
763
764 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
765 calling TREE_CHAIN.
766 * lto.c (lto_fixup_common): Likewise.
767
dcf0c47e
NF
7682011-04-08 Nathan Froyd <froydnj@codesourcery.com>
769
770 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
771 (handle_type_generic_attribute): Likewise.
772
e89964e3
MM
7732011-04-03 Michael Matz <matz@suse.de>
774
775 * lto.c (lto_materialize_function): Don't read and then discard
776 sections in WPA mode.
777 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
778
779 * lto-lang.c (registered_builtin_fndecls): Remove.
780 (lto_getdecls): Return NULL_TREE.
781 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
782
d2b3fe18
RG
7832011-03-31 Richard Guenther <rguenther@suse.de>
784
785 PR lto/48246
786 * lto.c (lto_wpa_write_files): Disable assert for non-empty
787 partitions when checking is not enabled.
788
ba78087b
KT
7892011-03-25 Kai Tietz <ktietz@redhat.com>
790
791 * lto.c (lto_resolution_read): Use filename_cmp instead
792 of strcmp.
793 (lto_read_section_data): Likewise.
794
0edf1bb2
JL
7952011-03-25 Jeff Law <law@redhat.com>
796
797 * lto/lto-lang.c (def_fn_type): Add missing va_end.
798
62d784f7
KT
7992011-03-21 Kai Tietz <ktietz@redhat.com>
800
801 PR target/12171
802 * lto-lang.c (lto_attribute_table): Adjust table.
803
62dd9571
JJ
8042011-02-18 Jakub Jelinek <jakub@redhat.com>
805
806 PR bootstrap/47807
807 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
808 of lto-streamer.h.
809
237d6259
RG
8102011-02-18 Richard Guenther <rguenther@suse.de>
811
812 PR lto/47798
813 * lto-tree.h (lto_global_var_decls): Do not declare here.
814 * lto-lang.c: Include lto-streamer.h.
815 * Make-lang.in (lto-lang.o): Adjust dependencies.
816
8ead2223
KT
8172011-02-10 Kai Tietz <kai.tietz@onevision.com>
818
819 PR lto/47241
820 * lto.c (lto_read_section_data): Free
821 fd_name in failure case.
822 For mingw targets don't hash file-descriptor.
823 (read_cgraph_and_symbols): Close current_lto_file
824 in failure case.
825
6e701822
JH
8262011-01-11 Jan Hubicka <jh@suse.cz>
827
828 PR lto/45721
829 PR lto/45375
b9843260
EB
830 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
831 are not partitioned.
6e701822 832
f4da8dce
NF
8332010-12-22 Nathan Froyd <froydnj@codesourcery.com>
834
835 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
836 Use prototype_p.
837
6b7fb143
RG
8382010-12-06 Richard Guenther <rguenther@suse.de>
839
840 PR lto/46796
841 * lto-lang.c (lto_init): Give names to basic types.
842
c59ffc41
JM
8432010-11-30 Joseph Myers <joseph@codesourcery.com>
844
845 * lto-object.c: Don't include toplev.h.
846 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
847
7c475d11
JM
8482010-11-30 Joseph Myers <joseph@codesourcery.com>
849
850 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
851 $(TOPLEV_H).
852
71f3e391
JM
8532010-11-29 Joseph Myers <joseph@codesourcery.com>
854
855 * lto-endian.h: Delete.
856 * lto-object.c: Don't include "libiberty.h".
857 (O_BINARY): Don't define.
858 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
859 (O_BINARY): Don't define.
860
9f1718b0
RG
8612010-11-23 Richard Guenther <rguenther@suse.de>
862
863 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
864
39c4e298
RG
8652010-11-23 Richard Guenther <rguenther@suse.de>
866
867 PR lto/46605
868 * lto.c (read_cgraph_and_symbols): Bail out after errors.
869
b37421c6
JM
8702010-11-17 Joseph Myers <joseph@codesourcery.com>
871
872 * lto.c (lto_main): Take no arguments.
873 * lto.h (lto_main): Update prototype.
874
d82f74d3
ILT
8752010-11-16 Ian Lance Taylor <iant@google.com>
876
877 * lto-object.c (lto_obj_file_open): Call
878 simple_object_attributes_merge rather than
879 simple_object_attributes_compare.
880
a4d8c676
JM
8812010-11-12 Joseph Myers <joseph@codesourcery.com>
882
883 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
884 * lto-lang.c (lto_handle_option): Take location_t parameter.
885
d8a07487
JM
8862010-11-10 Joseph Myers <joseph@codesourcery.com>
887
888 * lto.c (lto_resolution_read): Start diagnostics with lowercase
889 letters and remove trailing '.'.
890 (lto_file_finalize): Start diagnostic with a lowercase letter.
891
6b3456d1
ILT
8922010-11-02 Ian Lance Taylor <iant@google.com>
893
894 * lto-object.c: New file.
895 * lto-elf.c: Remove file.
896 * lto-macho.c: Remove file.
897 * lto-macho.h: Remove file.
898 * lto-coff.c: Remove file.
899 * lto-coff.h: Remove file.
900 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
901 lto/lto-object.o.
902 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
903 (lto/lto-objfile.o): New target.
904 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
905 (lto/lto.o): Remove $(LIBIBERTY_H).
906
030cd86c
JH
9072010-10-22 Jan Hubicka <jh@suse.cz>
908
909 * lto.c (add_cgraph_node_to_partition,
910 add_varpool_node_to_partition): Add debug info.
911 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
912 partitioned nodes.
913 (do_whole_program_analysis): Set function flags before dumping.
914
4490cae6
RG
9152010-10-22 Richard Guenther <rguenther@suse.de>
916
917 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
918 the new gimple_register_canonical_type.
919
703cdce3
L
9202010-10-20 H.J. Lu <hongjiu.lu@intel.com>
921
922 PR bootstrap/45954
923 * config-lang.in (boot_language): Set to $enable_lto.
924
1915c739
JJ
9252010-10-18 Jakub Jelinek <jakub@redhat.com>
926
927 PR lto/45638
928 * Make-lang.in (check-lto): New dummy target.
929
82971de5
EB
9302010-10-14 Eric Botcazou <ebotcazou@adacore.com>
931
932 * lto-elf.c (SHN_XINDEX): Define if not already defined.
933
a75bfaa6
JM
9342010-10-08 Joseph Myers <joseph@codesourcery.com>
935
936 * lto-lang.c (lto_init_options): Change to
937 lto_init_options_struct. Update parameters.
938 (LANG_HOOKS_INIT_OPTIONS): Don't define.
939 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
940
937f7f69
JH
9412010-10-06 Jan Hubicka <jh@suse.cz>
942
943 * lto.c (lto_balanced_map): Fix accounting of program size.
944
2169830c
JH
9452010-10-06 Jan Hubicka <jh@suse.cz>
946
947 * lto.c (lto_balanced_map): Do not produce empty partitions.
948
6e9bd0f8
AK
9492010-10-06 Andi Kleen <ak@linux.intel.com>
950
951 * lto.c (lto_process_name): Add.
952 (lto_main): Call lto_process_name.
953
06ed016f
JH
9542010-10-06 Jan Hubicka <jh@suse.cz>
955
956 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
957 COMDATs required by the linker.
958
ae718d66
ILT
9592010-10-05 Ian Lance Taylor <iant@google.com>
960
961 * lto.c (lto_section_with_id): Make s a const pointer.
962
852e4bd2
JH
9632010-10-05 Jan Hubicka <jh@suse.cz>
964
965 * lto.c: Include params.h.
966 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
967 refcounting in aux field.
968 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
969 New functions.
970 (lto_1_to_1_map): Simplify.
971 (lto_balanced_map): New function.
972 (do_whole_program_analysis): Chose proper partitioning alg.
973 * Make-lang.in (lto.o): Add dependency on params.h
974
a90163e9
AK
9752010-10-04 Andi Kleen <ak@linux.intel.com>
976
977 * Make-lang.in (lto1): Add + to build rule.
978
f1e92a43
AK
9792010-10-03 Andi Kleen <ak@linux.intel.com>
980
981 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
982 with fatal_error.
983
0d6e14fd
JH
9842010-09-28 Jan Hubicka <jh@suse.cz>
985
986 * lto-lang.c (handle_leaf_attribute): New function.
987 (lto_attribute_tables): Add leaf.
988
fb462383
JZ
9892010-09-25 Jie Zhang <jie@codesourcery.com>
990
991 * lto.c (lto_read_all_file_options): Start a new line after
992 printing out file names.
993
051f8cc6
JH
9942010-09-24 Jan Hubicka <jh@suse.cz>
995
996 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
997
64e0f5ff
JH
9982010-09-20 Jan Hubicka <jh@suse.cz>
999
1000 PR tree-optimize/45605
1001 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1002
a929ec3d
GP
10032010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
1004
1005 * lto-elf.c (lto_obj_file_open): Also provide filename when
1006 elf_begin fails.
1007
4c588abf
JH
10082010-09-17 Jan Hubicka <jh@suse.cz>
1009
1010 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
1011
c3224d6f
RG
10122010-09-17 Richard Guenther <rguenther@suse.de>
1013
1014 * lang.opt (flag_wpa): Also enable for the driver.
1015
52b3b3c7
JH
10162010-09-16 Jan Hubicka <jh@suse.cz>
1017
1018 * lto.c (lto_materialize_function): Do not tamper with STATIC and
1019 EXTERNAL flags.
1020
969c37b7
LB
10212010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1022
1023 * lto-tree.h (struct lang_type): Add variable_size GTY option.
1024
098a4f50
JH
10252010-09-08 Jan Hubicka <jh@suse.cz>
1026
1027 * lto.c (real_file_count, real_file_decl_data): New static vars.
1028 (read_cgraph_and_symbols): Use it.
1029
0f443ad0
RG
10302010-09-08 Richard Guenther <rguenther@suse.de>
1031
1032 * lto.c (read_cgraph_and_symbols): Collect again after each
1033 file.
1034
ee187353
JH
10352010-09-07 Jan Hubicka <jh@suse.cz>
1036
1037 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
1038
b3ec52d0
RG
10392010-09-03 Richard Guenther <rguenther@suse.de>
1040
1041 * lto-elf.c (validate_file): Always error if validation fails.
1042
f1395d4a
JH
10432010-08-20 Jan Hubicka <jh@suse.cz>
1044
1045 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
1046 (lto_wpa_write_files): Update comments.
1047
2429bce3
L
10482010-08-20 H.J. Lu <hongjiu.lu@intel.com>
1049
1050 PR bootstrap/45357
1051 * lto.c (lto_materialize_function): Replace has_analyzed_clone
1052 with has_analyzed_clone_p.
1053
e0f967db
JH
10542010-08-20 Jan Hubicka <jh@suse.cz>
1055
1056 * lto.c (has_analyzed_clone_p): New function
1057 (lto_materialize_function): Use callgraph to determine if
1058 body is needed.
1059 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
1060
ac47786e
NF
10612010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1062
1063 * lto.c: Use FOR_EACH_VEC_ELT.
1064
d720b869
AK
10652010-07-27 Andi Kleen <ak@linux.intel.com>
1066
1067 * Make-lang.in (lto.o): Add dependency to splay-tree.h
1068
5f20c657
JM
10692010-07-27 Joseph Myers <joseph@codesourcery.com>
1070
1071 * lto-lang.c (lto_handle_option): Update prototype and return
1072 value type. Remove duplicate assignment to result.
1073
7a9bf9a4
JM
10742010-07-27 Joseph Myers <joseph@codesourcery.com>
1075
1076 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
1077 New.
1078 (lto_init_options): Update prototype.
1079 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
1080 Define.
1081
73ce4d1e
AK
10822010-07-10 Andi Kleen <ak@linux.intel.com>
1083
1084 PR lto/44992
1085 * lto.c: Include splay-tree.h
1086 (lto_resolution_read): Change to walk file_ids tree and parse
1087 extra file_id in resolution file.
1088 (lto_section_with_id): Add.
1089 (create_subid_section_table): Add.
1090 (lwstate): Add.
1091 (lto_create_files_from_ids): Add.
1092 (lto_file_read): Change to handle sub file ids and create list
1093 of file_datas. Add output argument for count.
1094 (get_section_data): Pass file_data to lto_get_section_name.
1095 (lto_flatten_file): Add.
1096 (read_cgraph_and_symbols): Handle linked lists of file_datas.
1097
2994ee14
AK
10982010-07-10 Andi Kleen <ak@linux.intel.com>
1099
1100 * lto-coff.c (hash_name, eq_name): Move.
1101 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1102 * lto-elf.c: (hash_name, eq_name): Move.
1103 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1104 * lto-macho.c: (hash_name, eq_name): Move.
1105 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1106 * lto.c: (hash_name, eq_name): Move from lto-*.c
1107 (lto_obj_create_section_hash_table): Add.
1108 (free_with_string): Add.
1109
718f9c0f
MLI
11102010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1111
1112 * lto-coff.c: Include diagnostic-core.h in every file that
1113 includes toplev.h.
1114 * lto-elf.c: Likewise.
1115 * lto-lang.c: Likewise.
1116 * lto-macho.c: Likewise.
1117
1b137837
JJ
11182010-07-07 Jakub Jelinek <jakub@redhat.com>
1119
1120 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
1121 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
1122 objects.
1123
92eb4438
JH
11242010-07-05 Jan Hubicka <jh@suse.cz>
1125
1126 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
1127 nodes from same comdat group as well as all comdat functions referenced
1128 here.
b9843260
EB
1129 (add_varpool_node_to_partition, add_references_to_partition): New
1130 function.
1131 (lto_1_1_map): Skip COMDAT fnctions/variables; use
1132 add_varpool_node_to_partition; clear aux flags when done.
1133 (lto_promote_cross_file_statics): Do not promote stuff that gets
1134 duplicated to each ltrans.
92eb4438 1135
a05541a9
JH
11362010-07-04 Jan Hubicka <jh@suse.cz>
1137
1138 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
1139
4a2ac96f
RG
11402010-06-13 Richard Guenther <rguenther@suse.de>
1141
1142 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
1143
1d536046
KT
11442010-06-09 Kai Tietz <kai.tietz@onevision.com>
1145
1146 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1147 * lto-coff.c (coff_write_object_file): Add braces to if.
1148
a9429e29
LB
11492010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1150
1151 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
1152 (lto_file_read): Likewise.
1153 (new_partition): Likewise.
1154 (read_cgraph_and_symbols): Likewise.
1155
5498f011
JM
11562010-06-07 Joseph Myers <joseph@codesourcery.com>
1157
1158 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
1159 (lto_handle_option): Don't set flag_signed_char here.
1160
d4c0c9f6
RG
11612010-06-04 Richard Guenther <rguenther@suse.de>
1162
1163 PR lto/41584
1164 * lto.c (lto_1_to_1_map): Use the proper file_data for
1165 varpool nodes.
1166
0a5fa5a1
JH
11672010-05-30 Jan Hubicka <jh@suse.cz>
1168
1169 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
1170 partitioning decisions.
1171
9eec9488
JH
11722010-05-29 Jan Hubicka <jh@suse.cz>
1173
1174 * lto.c (bitmap vector): Remove.
1175 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
1176 (ltrans_partition_def): New structure.
1177 (ltrans_partition): New type and VECtor.
1178 (new_partition): New function.
1179 (add_cgraph_node_to_partition): New function.
1180 (lto_1_to_1_map): Reorganize for partitions.
1181 (lto_add_inline_clones): Remove.
1182 (lto_add_all_inlinees): Remove.
1183 (lto_promote_cross_file_statics): Use partitions.
1184 (cmp_partitions): New function.
1185 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
1186 use partitions; output files sorted by size.
1187
3e097227
SB
11882010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1189
1190 * Make-lang.in: Replace vec.h dependency with VEC_H.
1191
7ca92787
JM
11922010-05-28 Joseph Myers <joseph@codesourcery.com>
1193
1194 * lto-coff.c (coff_errmsg): Remove.
1195 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
1196 errors instead of coff_errmsg (-1).
1197 * lto-macho.c (mach_o_errmsg): Remove.
1198 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
1199 instead of mach_o_errmsg (-1).
1200 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
1201 xstrerror (errno).
1202
b5611987
RG
12032010-05-28 Richard Guenther <rguenther@suse.de>
1204
1205 * lto.c (prefix_name_with_star): Removed.
1206 (strip_extension): Likewise.
1207 (get_filename_for_set): Likewise.
1208 (lto_write_ltrans_list): Fold into ...
1209 (lto_wpa_write_files): ... this. Name LTRANS units
1210 by suffixing the ltrans output list filename.
1211 (do_whole_program_analysis): Adjust.
1212
1da2ed5f
JM
12132010-05-27 Joseph Myers <joseph@codesourcery.com>
1214
1215 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
1216 (read_cgraph_and_symbols, lto_main): Use seen_error.
1217 * Make-lang.in (lto/lto.o): Update dependencies.
1218
7951d88a
EB
12192010-05-27 Eric Botcazou <ebotcazou@adacore.com>
1220
1221 PR lto/44230
1222 * lto.h (lto_eh_personality): New prototype.
1223 * lto.c: Include debug.h.
1224 (first_personality_decl): New static variable.
1225 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
1226 first function for which it is non-null.
1227 (lto_eh_personality_decl): New static variable.
1228 (lto_eh_personality): New function.
1229 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
1230 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
1231
e12da9c2
SB
12322010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1233
1234 * lto-lang.c: Do not include expr.h.
1235
468194f4
RG
12362010-05-24 Richard Guenther <rguenther@suse.de>
1237
1238 * lto-elf.c (lto_obj_build_section_table): Work around
1239 FreeBSD libelf issue.
1240
bd9eb5da
RG
12412010-05-22 Richard Guenther <rguenther@suse.de>
1242
1243 * lto.c (read_cgraph_and_symbols): Do not collect.
1244
66576e1b
JH
12452010-05-20 Jan Hubicka <jh@suse.cz>
1246
1247 * lto.c (promote_var, promote_fn): New functions.
1248 (lto_promote_cross_file_statics): Compute correctly boundary including
1249 static initializers of readonly vars.
1250
36576655
JH
12512010-05-18 Jan Hubicka <jh@suse.cz>
1252
66576e1b 1253 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
1254 (lto_promote_cross_file_statics): Deal with non-inline clones.
1255
28632d63
JH
12562010-05-18 Jan Hubicka <jh@suse.cz>
1257
1258 * lto.c (lto_materialize_function): Announce function when
1259 reading body; allocate_struct_function only when reading body;
1260 do not finalize local statics; ggc_collect after reading;
1261 do not mark reachable node.
1262 (materialize_cgraph): Do not announce function.
1263
33e42d56
JH
12642010-05-11 Jan Hubicka <jh@suse.cz>
1265
1266 * lto.c (materialize_cgraph): Revert my previous patch.
1267
f6430ea5
KT
12682010-05-11 Kai Tietz <kai.tietz@onevision.com>
1269
1270 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
1271 IMAGE_FILE_MACHINE_AMD64.
1272 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
1273
0a0b07b7
JH
12742010-05-11 Jan Hubicka <jh@suse.cz>
1275
1276 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
1277 (materialize_cgraph): Add it here.
1278
9a809897
JH
12792010-05-11 Jan Hubicka <jh@suse.cz>
1280
1281 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
1282 vector.
1283
12842010-05-11 Jan Hubicka <jh@suse.cz>
1285
1286 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
1287 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
1288 use reachable_from_other_partition_p and
1289 referenced_from_other_partition_p test.
1290
94f64249
KT
12912010-05-11 Kai Tietz <kai.tietz@onevision.com>
1292
1293 * lto-coff.c (validate_file): Add x64-coff support.
1294 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
1295 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
1296 * lto-lang.c (lto_build_c_type_nodes): Add check for
1297 'long long unsigned int' for x64-windows.
1298 (lto_init): Likewise.
1299
1300
c082f9f3
SB
13012010-05-07 Steven Bosscher <steven@gcc.gnu.org>
1302
1303 * lto.h (struct lto_file_struct): Document offset member.
1304 * lto-endian.h: New file.
1305 * lto-macho.h: New file.
1306 * lto-macho.c: New file.
1307 * Make-lang.in: Add rule for lto-macho.o.
1308
5cd0e96b
RG
13092010-05-07 Richard Guenther <rguenther@suse.de>
1310
1311 PR lto/43857
1312 PR lto/43371
1313 * lang.opt (fresolution): Change to ...
1314 (fresolution=): ... this.
1315 * lto-lang.c (lto_handle_option): Adjust.
1316
48cf395b
RB
13172010-05-07 Richard Guenther <rguenther@suse.de>
1318
1319 * lto.c (DUMPBASE_SUFFIX): Remove.
1320 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
1321 Rename to ...
1322 (lto_write_ltrans_list): ... only output the list of ltrans files.
1323 (lto_maybe_unlink): Remove.
1324 (do_whole_program_analysis): Do not execute LTRANS phase
1325 from here.
1326
afa83c15
L
13272010-05-06 H.J. Lu <hongjiu.lu@intel.com>
1328
1329 * lto-lang.c (lto_handle_option): Add argument kind.
1330
369451ec
JH
13312010-05-05 Jan Hubicka <jh@suse.cz>
1332
48cf395b
RB
1333 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
1334 refs.
369451ec 1335
2f41ecf5
JH
13362010-05-05 Jan Hubicka <jh@suse.cz>
1337
1338 * lto.c (lto_1_to_1_map): Partition only needed nodes.
1339
ace72c88
JH
13402010-04-30 Jan Hubicka <jh@suse.cz>
1341
b9843260
EB
1342 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
1343 use default name.
ace72c88
JH
1344 (lto_wpa_write_files): Write any non-empty partition.
1345
05575e07
JH
13462010-04-30 Jan Hubicka <jh@suse.cz>
1347
1348 * lto.c: Do not attempt to make constant pool references global.
1349
49ba8180
JH
13502010-04-28 Jan Hubicka <jh@suse.cz>
1351
1352 * lto/lto.c (lto_read_in_decl_state): Use GGC.
1353 (lto_wpa_write_files): Announce what we are writting.
1354 (all_file_decl_data): New.
1355 (read_cgraph_and_symbols): Use GGC; correct timevars.
1356 (do_whole_program_analysis): Collect.
1357 * lto/Make-lang.in (lto.o): Fix dependency.
1358 * Makefile.in (GTFILES): Add lto-streamer.h.
1359 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
1360 (varpool_assemble_pending_decls): Use VAROUT.
1361 * lto-streamer.h (lto_tree_ref_table): Annotate.
1362 (lto_in_decl_state): Annotate.
1363 (lto_file_decl_data): Annotate.
1364
2942c502
JH
13652010-04-28 Jan Hubicka <jh@suse.cz>
1366
1367 * lto.c (lto_varpool_node_sets): New.
1368 (lto_1_to_1_map): Partition varpool too.
1369 (globalize_context_t, globalize_cross_file_statics,
1370 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
1371 lto_scan_statics_in_remaining_global_vars): Remove.
1372 (lto_promote_cross_file_statics): Rewrite.
1373 (get_filename_for_set): Take vset argument.
1374 (lto_wpa_write_files): Pass around vsets.
1375
3bec79c5
DK
13762010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
1377
1378 PR lto/42776
1379 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
1380 hardcoding 'lto-elf.o'.
1381 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
1382
1383 * lto-coff.h: New file.
1384 * lto-coff.c: Likewise.
1385
21aac880
RG
13862010-04-26 Richard Guenther <rguenther@suse.de>
1387
1388 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
1389
2cee0101
DK
13902010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
1391
1392 * lto.h (lto_elf_file_open): Rename prototype from this ...
1393 (lto_obj_file_open): ... to this.
1394 (lto_elf_file_close): Likewise ...
1395 (lto_obj_file_close): ... and likewise.
1396 (lto_elf_build_section_table): Likewise ...
1397 (lto_obj_build_section_table): ... and likewise.
1398 (lto_elf_begin_section): Likewise ...
1399 (lto_obj_begin_section): ... and likewise.
1400 (lto_elf_append_data): Likewise ...
1401 (lto_obj_append_data): ... and likewise.
1402 (lto_elf_end_section): Likewise ...
1403 (lto_obj_end_section): ... and likewise.
1404 * lto.c (lto_file_read): Update references to the above.
1405 (lto_wpa_write_files): Likewise.
1406 (lto_read_all_file_options): Likewise.
1407 (read_cgraph_and_symbols): Likewise.
1408 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
1409 (LANG_HOOKS_APPEND_DATA): Likewise.
1410 (LANG_HOOKS_END_SECTION): Likewise.
1411 * lto-elf.c (lto_elf_file_open): Rename from this ...
1412 (lto_obj_file_open): ... to this, updating any references.
1413 (lto_elf_file_close): Likewise ...
1414 (lto_obj_file_close): ... and likewise.
1415 (lto_elf_build_section_table): Likewise ...
1416 (lto_obj_build_section_table): ... and likewise.
1417 (lto_elf_begin_section): Likewise ...
1418 (lto_obj_begin_section): ... and likewise.
1419 (lto_elf_append_data): Likewise ...
1420 (lto_obj_append_data): ... and likewise.
1421 (lto_elf_end_section): Likewise ...
1422 (lto_obj_end_section): ... and likewise.
1423
bc58d7e1
JH
14242010-04-21 Jan Hubicka <jh@suse.cz>
1425
1426 * lto.c (lto_fixup_tree): Do not call wpa fixup.
1427 (materialize_cgraph): Likewise.
1428
e792884f
JH
14292010-04-21 Jan Hubicka <jh@suse.cz>
1430
1431 * lto.c (lto_wpa_write_files): Update.
1432 (read_cgraph_and_symbols): Be more verbose.
1433 (materialize_cgraph): Likewise.
1434 (do_whole_program_analysis): Likewise.
1435
c9945504
JH
14362010-04-21 Jan Hubicka <jh@suse.cz>
1437
1438 * lto.c (globalize_cross_file_statics): When function has address taken,
1439 it needs to be public.
1440
a837268b
JH
14412010-04-20 Jan Hubicka <jh@suse.cz>
1442
1443 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
1444 (lto_add_all_inlinees): Likewise.
1445 (lto_wpa_write_files): Likewise.
1446
3b9e5d95
EB
14472010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1448
1449 * lto-lang.c (lto_init): Remove second argument in call to
1450 build_common_tree_nodes.
1451
8ccb78f2
RO
14522010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1453
1454 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
1455 function.
1456
2f9b99e6
EB
14572010-03-09 Eric Botcazou <ebotcazou@adacore.com>
1458
1459 PR bootstrap/43276
1460 * lto-elf.c: Define EM_* constants if not already defined.
1461
bef7d288
EB
14622010-03-03 Eric Botcazou <ebotcazou@adacore.com>
1463
1464 * lto-elf.c (is_compatible_architecture): New static function.
1465 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
1466
f68df07c
RG
14672010-02-11 Richard Guenther <rguenther@suse.de>
1468
1469 PR driver/43021
1470 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
1471 appropriately.
1472
3cdea2b4
AH
14732010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
1474
1475 * lto.c (O_BINARY): Define.
1476 (lto_read_section_data): Open file in binary mode.
1477 * lto-elf.c (O_BINARY): Define.
1478 (lto_elf_file_open): Open file in binary mode.
1479
c59449fa
RG
14802010-01-08 Richard Guenther <rguenther@suse.de>
1481
1482 PR lto/42528
1483 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
1484 (lto_init): Do not init char_type_node in a standard way
1485 but according to flag_signed_char.
1486
d7fb0a6d
L
14872010-01-03 H.J. Lu <hongjiu.lu@intel.com>
1488
1489 PR lto/41564
1490 * lto.c (DUMPBASE_SUFFIX): New.
1491 (lto_execute_ltrans): Append a sequence number to -dumpbase
1492 for LTRANS.
1493
78ce4053
L
14942010-01-02 H.J. Lu <hongjiu.lu@intel.com>
1495
1496 PR lto/42580
1497 * lto-elf.c (lto_elf_file_open): Stop if the command line
1498 option file is missing.
1499
2a71eb48
RG
15002009-12-15 Richard Guenther <rguenther@suse.de>
1501
1502 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
1503 (lto_post_options): Do not disable debuginfo.
1504
a818bca1
DG
15052009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
1506
1507 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
1508
e7d00517
RG
15092009-12-11 Richard Guenther <rguenther@suse.de>
1510
1511 PR lto/42037
1512 * lto.c (lto_resolution_read): Properly grow the vector.
1513
1ab53893
RG
15142009-12-11 Richard Guenther <rguenther@suse.de>
1515
1516 PR lto/41915
1517 * lto-lang.c (lto_init_options): Initialize flag_complex_method
1518 to the C99 default. Do not set flag_unit_at_a_time.
1519
0f900dfa
JJ
15202009-11-28 Jakub Jelinek <jakub@redhat.com>
1521
1522 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
1523 variable.
1524
92fa7608
RAE
15252009-11-19 Rafael Avila de Espindola <espindola@google.com>
1526
1527 PR bootstrap/42096
1528 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
1529 * lto.c (lto_parse_hex): New.
1530 (lto_resolution_read): Use lto_parse_hex.
1531 * lto.h (lto_parse_hex): New.
1532
9870fe4f
RAE
15332009-11-17 Rafael Avila de Espindola <espindola@google.com>
1534
1535 * lto-elf.c (lto_file_init): Add offset argument.
1536 (lto_elf_file_open): Record the offset.
1537 * lto.c (lto_resolution_read): Change file_name into a lto_file
1538 argument. Check offsets.
1539 (lto_file_read): Update call to lto_resolution_read.
1540 * lto.h (lto_file_struct): Add the offset field.
1541
1b70729f
RAE
15422009-11-16 Rafael Avila de Espindola <espindola@google.com>
1543
1544 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
1545
0e3776db
JH
15462009-11-14 Jan Hubicka <jh@suse.cz>
1547
1548 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
1549
06bd7f56
RAE
15502009-11-12 Rafael Avila de Espindola <espindola@google.com>
1551
1552 * lang.opt (fresolution): Renamed from resolution.
1553 * lto-lang.c (lto_handle_option): Handle new option name.
1554 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
1555
7e9dc421
RG
15562009-11-04 Richard Guenther <rguenther@suse.de>
1557 Rafael Avila de Espindola <espindola@google.com>
1558
1559 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
1560 (lto_elf_file_open): Handle offsets in arguments name@offest.
1561
b207f900
RG
15622009-10-30 Richard Guenther <rguenther@suse.de>
1563
1564 PR lto/41858
1565 * lto.c (lto_file_read): Do not set file_data->fd.
1566 (lto_read_section_data): Use a single-entry file-descriptor cache.
1567 Do not check the result of xmalloc.
1568 (free_section_data): Do not use file_data->fd.
1569 (lto_read_all_file_options): Likewise.
1570
2c928155
RG
15712009-10-22 Richard Guenther <rguenther@suse.de>
1572
1573 * lto.c (lto_fixup_jump_functions): Remove.
1574 (lto_fixup_decls): Do not fixup jump functions.
1575 (read_cgraph_and_symbols): Schedule cgraph merging after
1576 summary reading. Schedule type and decl fixup before
1577 summary reading.
1578
f9c91f8a
RB
15792009-10-22 Richard Guenther <rguenther@suse.de>
1580
1581 * lto.c (lto_fixup_data_t): Remove free_list member.
1582 (lto_fixup_tree): Do not insert into free_list.
1583 (free_decl): Remove.
1584 (lto_fixup_decls): Remove free-list handling.
1585
fb3f88cc
JH
15862009-10-22 Jan Hubicka <jh@suse.cz>
1587
1588 * lto.c (lto_fixup_jump_functions): New function.
1589 (lto_fixup_decls): Use it.
1590
35f1e9f4
RG
15912009-10-16 Richard Guenther <rguenther@suse.de>
1592
1593 PR lto/41715
1594 * lto.c (lto_fixup_tree): Revert last change.
1595
200c8750
RG
15962009-10-14 Richard Guenther <rguenther@suse.de>
1597
1598 * lto.c (lto_fixup_tree): In case the prevailing decl is not
1599 compatible with the one we replace wrap it around a
1600 VIEW_CONVERT_EXPR.
1601
b1b07c92
RG
16022009-10-09 Richard Guenther <rguenther@suse.de>
1603
1604 PR lto/41635
1605 PR lto/41636
1606 * lto.c (read_cgraph_and_symbols): Do not assert we can open
1607 a file.
1608 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
1609 (init_ehdr##BITS): Likewise.
1610
3c2e7d45
JM
16112009-10-08 Joseph Myers <joseph@codesourcery.com>
1612
1613 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
1614 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
1615 diagnostics.
1616 * lto-lang.c (lto_post_options): Remove trailing "." from
1617 diagnostics.
1618
0d0bfe17
RG
16192009-10-08 Richard Guenther <rguenther@suse.de>
1620
1621 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
1622 hash tables.
1623
4bedf19a
JM
16242009-10-07 Joseph Myers <joseph@codesourcery.com>
1625
1626 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
1627
b20996ff
JH
16282009-10-07 Jan Hubicka <jh@suse.cz>
1629
1630 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
1631 ltrans stage; explain why this is needed and should not.
1632
1a735925
RG
16332009-10-05 Richard Guenther <rguenther@suse.de>
1634
1635 PR lto/41552
1636 PR lto/41487
1637 * lto.c (lto_read_decls): Do not register deferred decls.
1638 (read_cgraph_and_symbols): Delay symbol and cgraph merging
1639 until after reading the IPA summaries.
1640
d7f09764
DN
16412009-10-02 Rafael Avila de Espindola <espindola@google.com>
1642
1643 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
1644 (lto-lang.c): Don't include lto/common.h.
1645
16462009-10-02 Rafael Avila de Espindola <espindola@google.com>
1647
1648 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
1649 (lto/common.o): Remove.
1650 * common.c: Remove.
1651 * common.h (lto_kind_str): Remove.
1652 (lto_visibility_str): Remove.
1653 (lto_resolution_str): Make it static.
1654
16552009-10-01 Diego Novillo <dnovillo@google.com>
1656
1657 * lto.c (lto_read_decls): Add comment.
1658 Call internal_error instead of gcc_assert.
1659 (lto_resolution_read): Likewise.
1660 (lto_add_all_inlinees): Tidy.
1661 * Make-lang.in: Fix copyright boilerplate.
1662 (lto.pdf): New.
1663 (lto.install-pdf): New.
1664 * lto-tree.h: Fix copyright boilerplate.
1665 * lang-specs.h: Likewise.
1666 Remove ".lto" entry from compilers fragment.
1667 * lto-elf.c: Move inclusion of gelf.h after config.h.
1668 Tidy formatting everywhere.
1669 * lto.h: Fix copyright boilerplate.
1670 Tidy formatting everywhere.
1671 * common.c: Likewise.
1672 * config-lang.in: Likewise.
1673 * common.h: Likewise.
1674 * lto-lang.c: Likewise.
1675
16762009-10-01 Richard Guenther <rguenther@suse.de>
1677
1678 * lto.c (lto_read_section_data): Use plain lseek/read.
1679
16802009-10-01 Richard Guenther <rguenther@suse.de>
1681
1682 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
1683 use sysconf to query the system page size.
1684 (lto_file_read): Implement fallback using stdio.
1685 (free_section_data): Likewise.
1686
16872009-09-29 Diego Novillo <dnovillo@google.com>
1688
1689 * lto-lang.c (lto_init): Really fix call to
1690 build_common_builtin_nodes.
1691
16922009-09-29 Diego Novillo <dnovillo@google.com>
1693
1694 * lto-lang.c (lto_init): Fix call to
1695 build_common_builtin_nodes.
1696
16972009-09-29 Richard Guenther <rguenther@suse.de>
1698
1699 PR lto/40754
1700 * lto-elf.c (init_shdr##BITS): Properly specify alignment
1701 in bytes.
1702 (first_data_block): New static variable.
1703 (lto_elf_append_data): Align the first data block in each
1704 section.
1705
17062009-09-28 Diego Novillo <dnovillo@google.com>
1707
1708 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
1709 * lto.c (strip_extension): New.
1710 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
1711 (lto_execute_ltrans): Tidy.
1712 Do not pass -fwpa nor -fltrans-* to LTRANS.
1713 * opts.c: Tidy formatting and remove stale FIXME lto markers.
1714 * tree.c (need_assembler_name_p): Call
1715 lang_hooks.decls.may_need_assembler_name_p if set.
1716 * varasm.c (default_binds_local_p_1): Remove check for
1717 flag_ltrans.
1718 * varpool.c (decide_is_variable_needed): Do not test for
1719 in_lto_p.
1720
17212009-09-22 Richard Guenther <rguenther@suse.de>
1722
1723 PR lto/39276
1724 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
1725 * Make-lang.in: Remove ltrans-driver stuff.
1726 * config-lang.in: Likewise.
1727 * lang.opt (fltrans-driver): Remove.
1728 * lto-lang.c (lto_init_options): Remove code initializing
1729 ltrans_driver.
1730 * ltrans-driver: Remove.
1731
17322009-09-21 Diego Novillo <dnovillo@google.com>
1733
1734 * lto-lang.c (lto_define_builtins): Remove superfluous
1735 calls to targetm.init_builtins and build_common_builtin_nodes.
1736 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
1737 build_common_builtin_nodes.
1738 * lto.c (lto_materialize_function): Do nothing if NODE is a
1739 clone.
1740
17412009-09-03 Diego Novillo <dnovillo@google.com>
1742
1743 * lto-elf.c (validate_file): Replace call to
1744 elf_getshstrndx with call to elf_getshdrstrndx.
1745
17462009-08-19 Richard Guenther <rguenther@suse.de>
1747
1748 * lto-lang.c (lto_init): Merge char_type_node with the
1749 appropriately signed variant.
1750
17512009-08-19 Richard Guenther <rguenther@suse.de>
1752
1753 PR lto/41071
1754 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
1755 (lto_fixup_type): Re-build the pointer-to chain part two.
1756
17572009-08-19 Richard Guenther <rguenther@suse.de>
1758
1759 PR lto/41071
1760 * lto.c (lto_fixup_type): Re-build the type variant chain.
1761
17622009-08-19 Richard Guenther <rguenther@suse.de>
1763
1764 PR lto/41071
1765 * lto.c (lto_fixup_constructor): New function.
1766 (lto_fixup_tree): Replace all types. Properly fixup
1767 constructors and constants.
1768
17692009-08-14 Richard Guenther <rguenther@suse.de>
1770
1771 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
1772 for DECL_LANG_SPECIFIC.
1773
17742009-08-13 Richard Guenther <rguenther@suse.de>
1775
1776 PR lto/41032
1777 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
1778
17792009-07-30 Richard Guenther <rguenther@suse.de>
1780
1781 PR lto/40903
1782 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
1783 the largest decl for output and free TREE_CHAIN for further
1784 use.
1785
17862009-07-24 Diego Novillo <dnovillo@google.com>
1787
1788 * Make-lang.in: Add empty lto.install-plugin target.
1789
17902009-07-13 Diego Novillo <dnovillo@google.com>
1791
1792 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
1793
17942009-07-11 Richard Guenther <rguenther@suse.de>
1795
1796 * lto-lang.c (lto_write_globals): Wrapup global decls.
1797
17982009-07-10 Richard Guenther <rguenther@suse.de>
1799
1800 * lto-lang.c (lto_init): Allocate one more location to make
1801 BUILTINS_LOCATION correct.
1802
18032009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1804
1805 * lto.c (free_section_data): Cast computed_offset to caddr_t.
1806
18072009-07-06 Diego Novillo <dnovillo@google.com>
1808
1809 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
1810 TYPE_SIZE_UNIT.
1811
18122009-07-06 Diego Novillo <dnovillo@google.com>
1813
1814 * lto.c (preload_common_nodes): Remove.
1815 (lto_read_in_decl_state): Call lto_streamer_cache_get.
1816 (lto_read_decls): Call lto_data_in_create and
1817 lto_data_in_delete.
1818 (free_decl): Do not call ggc_free.
1819 (lto_main): Call lto_init_reader.
1820 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
1821 (lto_init): Initialize main_identifier_node if needed.
1822 Make ptrdiff_type_node be integer_type_node.
1823
18242009-06-19 Diego Novillo <dnovillo@google.com>
1825
1826 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
1827 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
1828 Remove code guarded by #ifdef LOCAL_TRACE.
1829
18302009-06-18 Diego Novillo <dnovillo@google.com>
1831
1832 * lto.c: Update license to GPLv3.
1833 * lto-elf.c: Likewise.
1834 * common.c: Likewise.
1835 * lto-lang.c: Likewise.
1836 * lto.h: Remove superfluous include files. Update all
1837 users.
1838
18392009-06-17 Diego Novillo <dnovillo@google.com>
1840
1841 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
1842
18432009-06-02 Diego Novillo <dnovillo@google.com>
1844
1845 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
1846 read in.
1847 (materialize_cgraph): Only materialize nodes that have a
1848 representation on file.
1849
18502009-06-01 Diego Novillo <dnovillo@google.com>
1851
1852 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
1853
18542009-05-31 Diego Novillo <dnovillo@google.com>
1855
1856 * lto-lang.c (lto_type_for_mode): Handle all the modes
1857 handled in c_common_type_for_mode.
1858
18592009-05-21 Diego Novillo <dnovillo@google.com>
1860
1861 * lto-elf.c: Always include <gelf.h>.
1862 * config-lang.in (target_libs): Remove.
1863 (build_by_default): Set to no.
1864
18652009-05-15 Diego Novillo <dnovillo@google.com>
1866
1867 * lto.c (lto_materialize_function): Assert that DECL is
1868 not a builtin.
1869 (materialize_cgraph): Don't try to materialize builtin
1870 functions.
1871 * lto-section-out.c (write_symbol_vec): Do not write
1872 builtin functions.
1873
18742009-05-13 Diego Novillo <dnovillo@google.com>
1875
1876 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
1877
18782009-05-07 Diego Novillo <dnovillo@google.com>
1879
1880 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
1881 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
1882 (lto_fixup_type): Call it for TYPE_POINTER_TO,
1883 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
1884 (lto_fixup_tree): Call gimple_register_type when *TP is a
1885 type.
1886 (lto_main): Call bitmap_obstack_initialize.
1887
18882009-04-22 Diego Novillo <dnovillo@google.com>
1889
1890 * lto.c (free_section_data): Tidy.
1891 (lto_1_to_1_map): Tidy.
1892 (lto_add_all_inlinees): Tidy.
1893 (prefix_name_with_star): New.
1894 (get_filename_for_set): New.
1895 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
1896 to determine what cgraph node sets to write.
1897 Call get_filename_for_set to compute temporary file
1898 names.
1899 (lto_execute_ltrans): Do not execute LTRANS on files with
1900 names that start with '*'.
1901 Move logic to execute LTRANS together so that LTRANS is
1902 invoked only if there are any files to compile.
1903 (do_whole_program_analysis): Only remove output files
1904 that do not start with '*'.
1905
19062009-04-06 Diego Novillo <dnovillo@google.com>
1907
1908 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
1909 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
1910 (lto_add_all_inlinees): Tidy.
1911
19122009-03-26 Diego Novillo <dnovillo@google.com>
1913
1914 * lto.c: Include gimple.h.
1915 (lto_read_in_decl_state): Call gimple_register_type for
1916 every type in every stream.
1917 (lto_fixup_common): Call gimple_register_type if T has a
1918 type.
1919 (do_whole_program_analysis): Call print_lto_report.
1920 (lto_main): Call print_lto_report after cgraph_optimize.
1921 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
1922
19232009-03-24 Diego Novillo <dnovillo@google.com>
1924
1925 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
1926 (lto.o): Add dependency on GIMPLE_H.
1927
19282009-03-10 Simon Baldwin <simonb@google.com>
1929
1930 * lto.c (lto_read_all_file_options): Close any open file descriptor
1931 contained in file_data before freeing.
1932
19332009-02-24 Rafael Avila de Espindola <espindola@google.com>
1934
1935 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1936 for a decl in the original bitmap, not a node.
1937 (lto_add_all_inlinees): Remove original nodes that are not needed.
1938 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1939
19402009-02-24 Diego Novillo <dnovillo@google.com>
1941
1942 * lto.c (lto_materialize_function): Update
1943 lto_stats.num_function_bodies.
1944 (get_section_data): Initialize *LEN to 0.
1945 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
1946 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
1947 Update lto_stats.num_output_files.
1948 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
1949 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
1950 (lto_main): Initialize lto_stats.
1951 If flag_lto_report is set, call print_lto_report.
1952
19532009-02-19 Diego Novillo <dnovillo@google.com>
1954
1955 Revert
1956
1957 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
1958
1959 * lto.c (lto_add_inline_clones): Don't add the
1960 master clone. Check for a decl in the original
1961 bitmap, not a node.
1962 (lto_add_all_inlinees): Remove original nodes
1963 that are not needed.
1964 (lto_scan_statics_in_cgraph_node): Don't care if
1965 the node is the master.
1966 (lto_promote_cross_file_statics): Use a new
1967 context.seen_node_decls for each set
1968
19692009-02-19 Rafael Avila de Espindola <espindola@google.com>
1970
1971 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1972 for a decl in the original bitmap, not a node.
1973 (lto_add_all_inlinees): Remove original nodes that are not needed.
1974 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1975 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
1976 for each set
1977
19782009-02-18 Diego Novillo <dnovillo@google.com>
1979
1980 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
1981 and TV_WHOPR_WPA_IO.
1982 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
1983 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
1984 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
1985 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
1986 depending on command line flags.
1987 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
1988 (lto_main): Remove timer uses.
1989
19902009-02-18 Rafael Avila de Espindola <espindola@google.com>
1991
1992 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
1993 (lto_wpa_write_files): Update calls to renamed functions.
1994
19952009-02-17 Diego Novillo <dnovillo@google.com>
1996
1997 PR 39203
1998 * lto-lang.c (lto_post_options): Disable -fwhole-program
1999 when running LTRANS.
2000
20012009-02-10 Diego Novillo <dnovillo@google.com>
2002
2003 * lto.c (read_cgraph_and_symbols): Fix comment.
2004
20052009-02-10 Diego Novillo <dnovillo@google.com>
2006
2007 * lto.c (read_cgraph_and_symbols): Read options from all
2008 IL files.
2009
20102009-02-10 Diego Novillo <dnovillo@google.com>
2011
2012 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
2013 (materialize_cgraph): Likewise.
2014 (do_whole_program_analysis): Likewise.
2015 (lto_main): Call read_cgraph_and_symbols,
2016 materialize_cgraph and do_whole_program_analysis.
2017
20182009-02-10 Simon Baldwin <simonb@google.com>
2019
2020 * lto.c: Include lto-opts.h.
2021 * (lto_main): Clear file options at loop start, read any saved
2022 options from the first file handled, and re-issue options.
2023 * Makefile.in (lto.o): Add dependency on lto-opts.h.
2024
20252009-02-02 Diego Novillo <dnovillo@google.com>
2026
2027 * lto.c (lto_main): Stop LTO_TIMER and use
2028 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
2029
20302009-01-30 H.J. Lu <hongjiu.lu@intel.com>
2031
2032 PR lto/38995
2033 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
2034 to POINTER_SIZE.
2035
20362009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
2037
2038 * Make-lang.in (LTO_EXE): Link with all
2039 BACKENDLIBS and not only GMPLIBS
2040
20412009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2042
2043 PR bootstrap/38992
2044 * lto-elf.c: Include gelf.h instead of libelf.h.
2045 (lto_elf_file_close): Replace elfx_update_shstrndx with
2046 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
2047 gelf_update_ehdr.
2048
20492009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2050
2051 PR middle-end/38996
2052 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
2053
20542009-01-26 Diego Novillo <dnovillo@google.com>
2055
2056 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
2057
20582009-01-26 Diego Novillo <dnovillo@google.com>
2059
2060 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
2061 and rename into gimple_types_compatible_p.
2062
20632009-01-12 Rafael Avila de Espindola <espindola@google.com>
2064
2065 * lto-lang.c (lang_hooks): Remove the const qualifier.
2066
20672009-01-06 Diego Novillo <dnovillo@google.com>
2068
2069 * ltrans-driver: Mark 'all' target as phony.
2070
20712008-12-31 Diego Novillo <dnovillo@google.com>
2072
2073 * ltrans-driver: Execute a NOP action for target 'all'.
2074
20752008-12-19 Diego Novillo <dnovillo@google.com>
2076
2077 * lto.c (lto_1_to_1_map): Tidy.
2078
20792008-12-19 Diego Novillo <dnovillo@google.com>
2080
2081 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
2082 be opened, show its name.
2083 * ltrans-driver: If $verbose is set, do not use parallelism.
2084
20852008-12-17 Rafael Avila de Espindola <espindola@google.com>
2086
2087 * lto.c (lto_fixup_function): New.
2088 (lto_fixup_tree): Call lto_fixup_function.
2089
20902008-12-14 Doug Kwan <dougkwan@google.com>
2091
2092 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
2093 variables if there is no function.
2094
20952008-12-10 Simon Baldwin <simonb@google.com>
2096
2097 * ltrans-driver: Always run make in silent mode, to avoid make's
2098 trace on stdout interfering with lto-wrapper output.
2099
21002008-12-10 Doug Kwan <dougkwan@google.com>
2101
2102 * lto.c (lto_add_inline_clones): Do not force master clones of
2103 inlined functions already in SET to be static inline.
2104
21052008-12-04 Doug Kwan <dougkwan@google.com>
2106
2107 * lto.c (globalize_context_t): New type to store states in
2108 globalization of cross-file statics.
2109 (globalize_cross_file_statics): New.
2110 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
2111 static decls that need to be fixed up.
2112 (lto_scan_statics_in_cgraph_node): Change call interface to use
2113 a globalize_context_t CONTEXT for all states used.
2114 (lto_scan_statics_in_remaining_global_vars): New.
2115 (lto_promote_cross_file_statics): Use new call interface of
2116 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
2117 visible vars in the last set.
2118
21192008-12-03 Diego Novillo <dnovillo@google.com>
2120
2121 * lto.c (lto_fixup_tree): Do not emit an error when
2122 PREVAILING throw but T doesn't.
2123
21242008-12-02 Doug Kwan <dougkwan@google.com>
2125
2126 * lto.c (lto_scan_statics_in_ref_table): New function factored out
2127 from code in ...
2128 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
2129 variables and functions.
2130 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
2131 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
2132
21332008-11-29 Diego Novillo <dnovillo@google.com>
2134
2135 * lto.c: Include timevar.h.
2136 (lto_materialize_function): Tidy. Add comments.
2137 (lto_wpa_write_files): Tidy.
2138 (lto_execute_ltrans): Tidy.
2139 (lto_main): Add local variable LTO_TIMER. Initialize it
2140 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
2141 Start and stop the timer.
2142 Tidy comments.
2143 * Make-lang.in (lto.o): Add dependency on timevar.h.
2144 * ltrans-driver: React to -v and -save-temps.
2145 Use simple heuristic to determine how much parallelism to
2146 use when executing make.
2147
21482008-11-12 Doug Kwan <dougkwan@google.com>
2149
2150 * lto.c (lto_bitmap_obstack): Remove var.
2151 (lto_materialize_function): Do nothing instead of marking function
2152 body in file if flag_wpa is true.
2153 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
2154 (lto_scan_statics_in_cgraph_node): New function.
2155 (lto_promote_cross_file_statics): Same.
2156 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
2157 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
2158 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
2159
21602008-11-09 Diego Novillo <dnovillo@google.com>
2161
2162 * lto/lto.c (lto_fixup_tree): Change error message locus
2163 information to include location of mismatching
2164 declaration.
2165 Use TREE_NO_WARNING to avoid repeated messages.
2166 (lto_main): If lto_fixup_decls emitted any errors, exit.
2167 * lto/lto-lang.c: Don't include libfuncs.h and except.h
2168 (lto_init_options): Don't enable exceptions by default.
2169 (lto_eh_runtime_type): Move to lto-function-in.c
2170 (lto_init_eh): Likewise.
2171 (lto_init): Don't call lto_init_eh.
2172 * lto/Make-lang.in (lto-lang.o): Remove dependency on
2173 libfuncs.h and except.h.
2174
21752008-10-30 Diego Novillo <dnovillo@google.com>
2176
2177 * lto.c (lto_read_decls): Declare debug_main only if
2178 LTO_STREAM_DEBUGGING is enabled.
2179
21802008-10-30 Simon Baldwin <simonb@google.com>
2181
2182 * lto.c (lto_wpa_write_files): Create intermediate files with
2183 make_cwd_temp_file().
2184 (lto_maybe_unlink): New. Delete intermediate WPA files unless
2185 WPA_SAVE_LTRANS is set.
2186 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
2187 * ltrans-driver: Do not strip directory from output files.
2188
21892008-10-29 Doug Kwan <dougkwan@google.com>
2190
2191 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
2192 DECL.
2193 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
2194 (lto/lto-symtab.o): Remove rule.
2195 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
2196 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
2197 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
2198 Remove macros.
2199 lto-symtab.c (File): Move up one level.
2200 lto-lang.c (cgraph.h): Remove include.
2201 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2202 input_cgraph): Move to lto-cgraph.c in gcc directory above.
2203 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
2204
22052008-10-24 Rafael Espindola <espindola@google.com>
2206
2207 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
2208 non prevailing weak symbols.
2209
22102008-10-24 Rafael Espindola <espindola@google.com>
2211
2212 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
2213
22142008-10-24 Rafael Espindola <espindola@google.com>
2215
2216 * lto-lang.c (input_node): Avoid casts from pointers to ints of
2217 different types.
2218
22192008-10-23 Simon Baldwin <simonb@google.com>
2220
2221 * lto-lang.c (input_node): Save the node reference, rather than the
2222 node pointer, in node->inlined_to.
2223 (input_cgraph_1): Convert node references into node pointers.
2224
22252008-10-22 Diego Novillo <dnovillo@google.com>
2226 Rafael Espindola <espindola@google.com>
2227
2228 * lto.c (lto_resolution_read): Tidy.
2229 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
2230 abort if RET is NULL.
2231
22322008-10-22 Doug Kwan <dougkwan@google.com>
2233
2234 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
2235 exceptions flag is given.
2236 * lto-lang.c: (lto_init_options) Set default exceptions flag.
2237 (lto_init_eh): Remove exceptions flag initialization.
2238 (lto_init): Only call lto_init_eh if exceptions flag is set.
2239
22402008-10-21 Diego Novillo <dnovillo@google.com>
2241
2242 * lto.c: Tidy some formatting.
2243 * lto.h: Likewise.
2244
22452008-10-21 Simon Baldwin <simonb@google.com>
2246
2247 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
2248 them is NULL (but not the other).
2249
22502008-10-17 Diego Novillo <dnovillo@google.com>
2251
2252 * ltrans-driver: Divert output from make to a temporary file.
2253 Show it if the call to make failed.
2254
22552008-10-15 Diego Novillo <dnovillo@google.com>
2256
2257 * lto.c (lto_wpa_write_files): Reformat do-while loop.
2258 Do not print TEMP_FILENAME
2259 * ltrans-driver: Call make with -s.
2260
22612008-10-15 Diego Novillo <dnovillo@google.com>
2262
2263 * lto-symtab.c (lto_symtab_merge_decl): Do not force
2264 TREE_STATIC on global symbols.
2265
22662008-10-14 Ollie Wild <aaw@google.com>
2267
2268 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
2269 (LTRANS_DRIVER_EXE): Add.
2270 (lto.all.cross): Add LTRANS_DRIVER_EXE.
2271 (lto.all.encap): Add LTRANS_DRIVER_EXE.
2272 (lto.install.common): Remove ltrans-driver.
2273 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
2274 (LTRANS_DRIVER_EXE): New build rule.
2275 * config-lang.in (compilers): Add ltrans-driver.
2276
22772008-10-14 Diego Novillo <dnovillo@google.com>
2278
2279 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
2280 of program name.
2281
22822008-10-13 Ollie Wild <aaw@google.com>
2283
2284 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
2285 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
2286 * ltrans-driver (LTRANS_FLAGS): Remove.
2287
22882008-10-08 Doug Kwan <dougkwan@google.com>
2289
2290 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
2291 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
2292 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
2293 from lto_fixup_state to here.
2294 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
2295 just a free-list. Fix up types also. Move decl merging code to
2296 lto_fixup_tree.
2297 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
2298 object.
2299 (lto_fixup_decls): Use another pointer set to avoid multiple
2300 walking of nodes except for DECLs to be replaced. Pass an
2301 lto_fixup_data_t object to tree-walker.
2302
23032008-10-08 Rafael Espindola <espindola@google.com>
2304
2305 * lto-symtab.c (lto_symtab_set_resolution): New.
2306 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
2307 lto_symtab_get_resolution.
2308 (lto_symtab_prevailing_decl): Return decl for non public decls.
2309 (lto_symtab_get_resolution): New.
2310 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
2311
23122008-10-06 Rafael Espindola <espindola@google.com>
2313
2314 * lto-lang.c: Include cgraph.h.
2315 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2316 input_cgraph): Moved from lto-cgraph.c.
2317 (LANG_HOOKS_INPUT_CGRAPH): New.
2318
23192008-10-03 Rafael Espindola <espindola@google.com>
2320
2321 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
2322
23232008-10-03 Rafael Espindola <espindola@google.com>
2324
2325 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
2326 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
2327 prevailing definition. Don't mark TREE_NOTHROW differences.
2328 * lto.c (lto_fixup_tree): New.
2329 (lto_fixup_state): New.
2330 (lto_fixup_state_aux): New.
2331 (free_decl): New.
2332 (lto_fixup_decls): New.
2333 (lto_main): Call lto_fixup_decls.
2334
23352008-10-02 Ollie Wild <aaw@google.com>
2336
2337 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
2338 and Init.
2339 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
2340 * lto-lang.c (lto_post_options): Add validation and fixups for
2341 -fltrans and -fwpa.
2342
23432008-10-02 Rafael Espindola <espindola@google.com>
2344
2345 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
2346 lto_symtab_merge_decl): Return void.
2347 (lto_symtab_prevailing_decl): New.
2348
23492008-09-30 Rafael Espindola <espindola@google.com>
2350
2351 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
2352 defined symbols.
2353 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
2354 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
2355 Check for already defined symbols.
2356 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
2357 (LTO_IDENTIFIER_RESOLUTION): Remove.
2358 (LTO_DECL_RESOLUTION): New.
2359
23602008-09-30 Rafael Espindola <espindola@google.com>
2361
2362 * lto.c (lto_read_decls): Use new input_tree signature.
2363
23642008-09-26 Doug Kwan <dougkwan@google.com>
2365
2366 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
2367 bodies affected by exception attribute merging of DECLs.
2368 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
2369 merging.
2370
23712008-09-25 Rafael Espindola <espindola@google.com>
2372
2373 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
2374 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
2375 * lto-symtab.c (lto_symtab_compatible): New.
2376 (lto_symtab_overwrite_decl): New.
2377 (lto_symtab_merge_decl): Refactor to use the above functions
2378 and the resolution from lang_identifier.
2379 * lto-tree.h: Include plugin-api.h.
2380 (lang_identifier): Add resolution.
2381 (LTO_IDENTIFIER_RESOLUTION): New.
2382
23832008-09-25 Ollie Wild <aaw@google.com>
2384
2385 * lang.opt (fltrans-output-list=): New option.
2386 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
2387
23882008-09-25 Rafael Espindola <espindola@google.com>
2389
2390 * lto.c (lto_resolution_read): Initialize ret;
2391
23922008-09-24 Ollie Wild <aaw@google.com>
2393
2394 * lto.c (sys/mman.h): Move include.
2395 (lto_wpa_write_files): Return a list of written files.
2396 (lto_execute_ltrans): New function.
2397 (lto_main): Call lto_execute_ltrans.
2398 (ltrans-driver): New file.
2399 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
2400 (DEAULT_LTRANS_DRIVER_LEN): New macro.
2401 (lto_init_options): Initialize ltrans_driver.
2402 (lto_handle_option): Fix incorrect default output value.
2403 * lang.opt (fltrans-driver=): New option.
2404 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
2405 (lto.install-common): Add lto/ltrans-driver.
2406
24072008-09-24 Rafael Espindola <espindola@google.com>
2408
2409 * Make-lang.in (LTO_OBJS): Add lto/common.o.
2410 (lto/lto.o): Depend on lto/common.h.
2411 (lto/common.o): New.
2412 * lang.opt (resolution): New.
2413 * lto-lang.c (resolution_file_name): New.
2414 (lto_handle_option): Handle OPT_resolution.
2415 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
2416 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
2417 pass it to lto_symtab_merge_decl.
2418 * lto.c: Include common.h.
2419 (lto_read_decls): Add resolutions and resolutions_size arguments.
2420 Initialize data_in.globals_resolution and
2421 data_in.globals_resolution_size.
2422 (index_and_symbol_resolution): New.
2423 (lto_resolution_read): New.
2424 (lto_file_read): Add argument resolution_file.
2425 Read resolution.
2426 * lto.h (resolution_file_name): New.
2427
24282008-09-23 Rafael Espindola <espindola@google.com>
2429
2430 * common.c: Update description.
2431 * common.h: Update description.
2432
24332008-09-23 Rafael Espindola <espindola@google.com>
2434
2435 * common.c: Moved from lto-plugin.
2436 * common.h: Moved from lto-plugin.
2437
24382008-09-22 Doug Kwan <dougkwan@google.com>
2439
2440 * lto.c (VEC(bitmap,heap)): Declare.
2441 (lto_materialize_function): Handle WAP mode specially.
2442 (lto_add_inline_clones): New.
2443 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
2444 return a bitmap of inlined decls.
2445 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
2446 (lto_main): Call reset_inline_failed to reset inlining states.
2447 Check call-graph after WPA inlining.
2448 * lto-lang.c (lto_init): Do not clear flag_generate_lto
2449 unconditionally.
2450
24512008-09-19 Doug Kwan <dougkwan@google.com>
2452
2453 lto.c (lto_main): Remove unsued wrapper code.
2454 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
2455
24562008-09-19 Rafael Espindola <espindola@google.com>
2457
2458 * lto-symtab.c: Include lto-tree-in.h.
2459 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
2460 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
2461 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
2462
24632008-09-17 Paolo Bonzini <bonzini@gnu.org>
2464 Rafael Avila de Espindola <espindola@google.com>
2465
2466 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
2467 COMPOUND_LITERAL_EXPR_DECL): Remove.
2468 (emit_local_var): Remove.
2469 (lto_expand_expr): Remove.
2470 (lto_staticp): Remove.
2471 (LANG_HOOKS_EXPAND_EXPR): Remove.
2472 (LANG_HOOKS_STATICP): Remove.
2473
24742008-09-11 Diego Novillo <dnovillo@google.com>
2475
2476 * lto-lang.c: Include except.h and libfuncs.h.
2477 (lto_init_eh): New.
2478 (lto_init): Call it.
2479 Set flag_generate_lto to 0.
2480 * Make-lang.in (lto-lang.o): Add dependency on except.h
2481 and libfuncs.h.
2482
24832008-09-09 Bill Maddox <maddox@google.com>
2484
2485 * lto-lang.c: Include header file expr.h.
2486 (COMPOUND_LITERAL_EXPR_DECL_STMT,
2487 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
2488 (emit_local_var): Copied from c-semantics.c.
2489 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
2490 and c_staticp in c-common.c.
2491 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
2492
24932008-09-08 Diego Novillo <dnovillo@google.com>
2494
2495 * lto-lang.c (lto_global_bindings_p): Return 1 during
2496 IPA passes.
2497
24982008-09-07 Diego Novillo <dnovillo@google.com>
2499
2500 * lto.c: Tidy formatting.
2501
25022008-08-04 Bill Maddox <maddox@google.com>
2503
2504 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
2505
25062008-09-03 Doug Kwan <dougkwan@google.com>
2507
2508 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
2509 CIF_OK instead of NULL.
2510
25112008-09-02 Diego Novillo <dnovillo@google.com>
2512 Simon Baldwin <simonb@google.com>
2513
2514 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
2515 c_common_type_for_size.
2516 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
2517 (lto_init): Call linemap_add.
2518 (signed_and_unsigned_types): Remove.
2519
25202008-08-29 Diego Novillo <dnovillo@google.com>
2521
2522 * lto-lang.c (handle_noreturn_attribute): New local function.
2523 (handle_const_attribute): New local function.
2524 (handle_malloc_attribute): New local function.
2525 (handle_pure_attribute): New local function.
2526 (handle_novops_attribute): New local function.
2527 (handle_nonnull_attribute): New local function.
2528 (handle_nothrow_attribute): New local function.
2529 (handle_sentinel_attribute): New local function.
2530 (handle_type_generic_attribute): New local function.
2531 (handle_format_attribute): New local function.
2532 (handle_format_arg_attribute): New local function.
2533 (lto_attribute_table): Declare.
2534 (lto_format_attribute_table): Declare.
2535 (lto_init_attributes): New local function.
2536 (lto_define_builtins): Call it.
2537 Call targetm.init_builtins and build_common_builtin_nodes.
2538 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
2539 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
2540
25412008-08-28 Diego Novillo <dnovillo@google.com>
2542
2543 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
2544 $(GIMPLE_H).
2545 (lto-symtab.o): Add dependency on $(GIMPLE_H).
2546 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
2547 * lto-symtab.c: Include gimple.h.
2548 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
2549 TREE_CHAIN.
2550
25512008-08-27 Doug Kwan <dougkwan@google.com>
2552
2553 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
2554 gt-lto-lto.h): New includes.
2555 (lto_materialize_function): Do not read in function body in WPA mode.
2556 Format a line to fit in 80 columns.
2557 (lto_cgraph_node_sets): New garbage collected variable.
2558 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
2559 New functions.
2560 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
2561 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
2562 variable LTO_SECTION_IN_H.
2563 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
2564 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
2565 with variable LTO_SECTION_IN_H.
2566 * config-lang.in (gtfiles): Add lto/lto.c.
2567 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
2568 merged DECL_RESULT correctly.
2569
25702008-08-26 Bill Maddox <maddox@google.com>
2571
2572 * lto-lang.c Include tree-gimple.h.
2573 (lto_mark_addressable): Call mark_addressable rather than
2574 asserting.
2575 (lto_post_options): Suppress debug info generation.
2576 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
2577
25782008-08-25 Bill Maddox <maddox@google.com>
2579
2580 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
2581 assertion and leave an explanatory comment in its place.
2582
25832008-08-21 Doug Kwan <dougkwan@google.com>
2584
2585 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
2586 of common nodes instead of computing locallly.
2587 (lto_read_in_decl_state): New.
2588 (lto_read_decls): Change code for udpate in struct lto_decl_header.
2589 Read global and per-function in-decl states.
2590 * Make-lang.in (LTO_H): Update dependency.
2591 (lto/lto.o): Same.
2592 (lto-symtab.c): Merge (revision 139039)
2593 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
2594
25952008-08-21 Rafael Espindola <espindola@google.com>
2596
2597 * config-lang.in (target_libs): New.
2598
25992008-08-20 Bill Maddox <maddox@google.com>
2600
2601 * lto.c (current_lto_file): Remove GTY marker from static
2602 variable. Remove include of file gt-lto-lto.h.
2603 * Make-lang.in: Remove dependency of lto/lto.o on
2604 gt-lto-lto.h.
2605 * lto-elf.c (lto_file_close): Removed.
2606 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
2607 allocate lto_elf_file object.
2608 (lto_elf_file_close): Free lto_elf_file object after close.
2609 * lto.h (struct lto_file_struct): Remove GTY marker.
2610 * config-lang.in: Remove lto/lto.h and lto/lto.c from
2611 gtfiles.
2612
26132008-08-20 Bill Maddox <maddox@google.com>
2614
2615 * lto.c (lto_read_decls): Provide dummy argument to input_tree
2616 to conform to its new signature.
2617 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
2618 on discarded node here, now called in global_vector_fixup.
2619
26202008-08-09 Bill Maddox <maddox@google.com>
2621
2622 * lto.c (preload_common_nodes): Verify that fileptr_type_node
2623 has not been set to a front-end-specific value.
2624
26252008-08-05 Doug Kwan <dougkwan@google.com>
2626
2627 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
2628 build breakage.
2629
26302008-07-30 Bill Maddox <maddox@google.com>
2631
2632 * lto.c (lto_materialize_function): Call lto_original_decl_name.
2633 Remove obsolete comments.
2634 (lto_read_decls): Remove initialization of deleted field data_in.global.
2635 Tidy up comments.
2636 (lto_main): Remove redundant initialization of section_hash_table.
2637 * lto-elf.c: Removed obsolete comments.
2638 * lto.h: Tidy up comments.
2639 * lto-symtab.c (lto_least_common_multiple): New function.
2640 (lto_symtab_merge_decl): Merge variable alignments in some cases.
2641 Tidy up comments.
2642
26432008-07-25 Diego Novillo <dnovillo@google.com>
2644 Bill Maddox <maddox@google.com>
2645
2646 * lto.c: Re-order include files.
2647 Include lto-section-out.h.
2648 (preload_common_nodes): Add debugging output.
2649 Add new local INDEX_TABLE.
2650 Call preload_common_node.
2651 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
2652
26532008-07-13 Bill Maddox <maddox@google.com>
2654
2655 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
2656 unwanted scaling during pointer addition.
2657
26582008-07-11 Bill Maddox <maddox@google.com>
2659 Diego Novillo <dnovillo@google.com>
2660
2661 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
2662 Make code const-correct.
2663 (lto_file_read): Fix C++ compatibility warnings.
2664 (lto_read_section_data): Fix C++ compatibility warnings.
2665 (lto_get_section_data): Use CONST_CAST to avoid warning when
2666 const pointer passed to free.
2667 * lto-elf.c (lto_elf_build_section_table): Fix C++
2668 compatibility warnings.
2669 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
2670 to avoid warning assigning const pointer to d_buf field of Elf_Data.
2671 (lto_get_current_out_file): Fix C++ compatibility warnings.
2672
26732008-07-11 Diego Novillo <dnovillo@google.com>
2674
2675 * Make-lang.in (lto-warn): Define.
2676
26772008-07-03 Simon Baldwin <simonb@google.com>
2678
2679 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
2680 LTO_STREAM_DEBUGGING.
2681
26822008-06-27 Ollie Wild <aaw@google.com>
2683
2684 * lto-elf.c (lto-section-out.h): New include.
2685 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
2686 and data members.
2687 (cached_file_attrs): New static variable.
2688 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
2689 Use cached_file_attrs for checking bits.
2690 (lto_elf_build_section_table): Remove elf_file argument from
2691 lto_elf_get_shdr and lto_elf_free_shdr calls.
2692 (DEFINE_INIT_SHDR): New macro.
2693 (init_shdr32, init_shdr64): New functions defined via the
2694 DEFINE_INIT_SHDR macro.
2695 (lto_elf_begin_section_with_type): New function.
2696 (lto_elf_begin_section): New function.
2697 (lto_elf_append_data): New function.
2698 (lto_elf_end_section): New function.
2699 (DEFINE_VALIDATE_EHDR): New macro.
2700 (validate_ehdr32, validate_ehdr64): New functions defined via the
2701 DEFINE_VALIDATE_EHDR macro.
2702 (validate_file): New function.
2703 (DEFINE_INIT_EHDR): New macro.
2704 (init_ehdr32, init_ehdr64): New functions defined via the
2705 DEFINE_INIT_EHDR macro.
2706 (init_ehdr): New function.
2707 (lto_elf_file_open): Add support for writable files. Move some
2708 validation logic to validate_file.
2709 (lto_elf_file_close): Add support for writable files. Write file data
2710 and free data blocks.
2711 (current_out_file): New static variable.
2712 (lto_set_current_out_file): New function.
2713 (lto_get_current_out_file): New function.
2714 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
2715 Add temporary initialization for testing ELF serialization.
2716 * lto.h (lto-section-out.h): New include.
2717 (struct lto_file_struct): Slight modification to comment.
2718 (lto_elf_file_open): Add writable parameter.
2719 (lto_elf_begin_section): New function declaration.
2720 (lto_elf_append_data): New function declaration.
2721 (lto_elf_end_section): New function declaration.
2722 (lto_set_current_out_file, lto_get_current_out_file): New function
2723 declarations.
2724 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
2725 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
2726 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
2727 * Make-lang.in (LTO_H): Add lto-section-out.h.
2728
27292008-06-12 Ollie Wild <aaw@google.com>
2730
2731 * lto.h (struct lto_file_vtable_struct): Remove.
2732 (struct lto_file_struct): Remove vtable member.
2733 * lto-elf.c (lto_file_init): Remove vtable argument.
2734 (lto_elf_map_optional_lto_section): Remove.
2735 (lto_elf_unmap_section): Remove.
2736 (lto_elf_file_vtable): Remove.
2737 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
2738 lto_file_init call.
2739 (lto_elf_find_section_data): Remove.
2740
27412008-06-11 Ollie Wild <aaw@google.com>
2742
2743 * lto.c (lto_file_read): Add const qualifier to data variable.
2744
27452008-06-11 Diego Novillo <dnovillo@google.com>
2746
2747 Merge from lto-streamber sub-branch.
2748
2749 2008-06-04 Ollie Wild <aaw@google.com>
2750
2751 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
2752 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
2753
2754 2008-05-28 Bill Maddox <maddox@google.com>
2755
2756 Replace the DWARF reader in the LTO front-end.
2757
2758 * lto.c: Include lto-tree-in.h, lto-tags.h.
2759 (enum DWARF2_class, DW_cl_constant, struct
2760 DWARF2_form_data, struct lto_context,
2761 lto_fd_init, lto_info_fd_init,
2762 lto_abbrev_fd_init, lto_info_fd_close,
2763 lto_file_init, lto_file_close,
2764 lto_file_corrupt_error, lto_abi_mismatch_error,
2765 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
2766 lto_read_uleb128, lto_read_sleb128,
2767 lto_read_initial_length, lto_abbrev_read_attrs,
2768 lto_abbrev_read, lto_abbrev_read_lookup,
2769 lto_read_section_offset,
2770 lto_read_comp_unit_header, find_cu_for_offset,
2771 lto_get_file_name,
2772 lto_resolve_reference,lto_read_form,
2773 attribute_value_as_int,
2774 make_signed_host_wide_int,
2775 attribute_value_as_constant, lto_cache_hash,
2776 lto_cache_eq, lto_cache_store_DIE,
2777 lto_cache_lookup_DIE, lto_find_integral_type,
2778 lto_find_integral_type_1,
2779 LTO_BEGIN_READ_ATTRS_UNCHECKED,
2780 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
2781 lto_unsupported_attr_error, lto_get_identifier,
2782 lto_read_referenced_type_DIE,
2783 lto_read_compile_unit_DIE,
2784 lto_read_array_type_DIE,
2785 lto_read_structure_union_class_type_DIE,
2786 lto_read_enumerator_DIE,
2787 lto_read_enumeration_type_DIE,
2788 lto_read_only_for_child_DIEs,
2789 lto_read_only_for_child_DIEs,
2790 lto_read_member_DIE, lto_read_abbrev,
2791 lto_read_variable_formal_parameter_constant_DIE,
2792 lto_get_body): Removed.
2793 (preload_common_nodes): New function.
2794 (lto_read_decls): Convert for new global streamer.
2795 (lto_materialze_file_data,
2796 lto_read_subroutine_type_subprogram_die,
2797 lto_read_unspecified_parameters_DIE,
2798 lto_read_typedef_DIE,
2799 lto_read_pointer_reference_type_DIE,
2800 lto_read_subrange_type_DIE,
2801 lto_read_base_type_DIE,
2802 lto_read_const_volatile_restrict_type_DIE,
2803 lto_read_namespace_DIE,
2804 lto_read_unspecified_type_DIE, lto_read_DIE,
2805 lto_read_child_DIEs, lto_collect_child_DIEs):
2806 Removed.
2807 (lto_info_read, lto_set_cu_context): Removed.
2808 (lto_file_read): Convert for new global streamer.
2809 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
2810 lto_resolve_var_ref, lto_resolve_fn_ref,
2811 lto_resolve_field_ref, lto_resolve_typedecl_ref,
2812 lto_resolve_namespacedecl_ref): Removed.
2813 (lto_file_init, lto_file_close): Moved to lto-elf.c.
2814 * lto-tree.h (lto_symtab_merge_var,
2815 lto_symtab_mergee_fun): Declare here.
2816 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
2817 (lto_elf_file_open): Removed code to read DWARF debug sections.
2818 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
2819 DWARF2_CompUnit, lto_die_ptr,
2820 lto_die_cache_entry, lto_fd, lto_info_fd,
2821 lto_abbrev_fd): Removed.
2822 (lto_file): Removed debug_info and debug_abbrev fields.
2823 (lto_ref): Removed.
2824 (lto_file_init, lto_file_close,
2825 lto_resolve_type_ref, lto_resolve_var_ref,
2826 lto_resolve_fn_ref, lto_resolve_field_ref,
2827 lto_resolve_typedecl_ref,
2828 lto_resolve_namespacedecl_ref,
2829 lto_get_file_name): Removed declarations.
2830 (lto_symtab_merge_var, lto_symtab_merge_fn):
2831 Declarations moved to lto-tree.h.
2832 * lto-symtab.c (lto_compatible_attributes_p):
2833 Lobotomize this, as it barfs on "Hello, world!".
2834 * lto-section-out.c: Include lto-tree-out.h.
2835 (lto_hash_global_slot_node,
2836 lto_eq_global_slot_node, preload_common_nodes,
2837 write_global_stream, write_global_references):
2838 New functions.
2839 (produce_asm_for_decls): Convert for new global streamer.
2840 * lto-section-out.h (lto_hash_global_slot_node,
2841 lto_eq_global_slot_node): Declare.
2842
28432008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2844 Jan Hubicka <jh@suse.cz>
2845
2846 * lto.c (sys/mman.h, tree-pass.h): New includes.
2847 (lto_materialize_constructors_and_inits,
2848 lto_materialize_function): Keeps length of section.
2849 (lto_materialize_cgraph): Removed.
2850 (lto_read_decls): Initialize fd field.
2851 (lto_file_read): Different return type and removed much code to
2852 lto_main.
2853 (page_mask): New variable.
2854 (lto_read_section_data, get_section_data, free_section_data): New
2855 functions.
2856 (lto_main): Now calls pass manager, sets the hooks so that the ipa
2857 passes can get the section data.
2858
28592008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
2860
2861 * lto.h (lto_read_decls): Made local.
2862 (lto_input_function_body, lto_input_constructors_and_inits,
2863 lto_input_cgraph): Declarations moved to lto-section-in.h.
2864 * lto-section-in.c: Moved to .. .
2865 * lto-cgraph-in.c: Ditto.
2866 * lto-section-in.h: Ditto.
2867 * lto-function-in.c: Ditto.
2868 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
2869 (lto_insert_block): Removed.
2870 (LANG_HOOKS_INSERT_BLOCK): Removed.
2871 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
2872 lto-section-in.o): Rules moved to lto/Makefile.in.
2873
2874
28752008-05-16 Ollie Wild <aaw@google.com>
2876
2877 * lto-lang.c (tree-inline.h): Include.
2878 (lto_post_options): New function.
2879 (LANG_HOOKS_POST_OPTIONS): Define.
2880 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
2881 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
2882
28832008-05-13 Diego Novillo <dnovillo@google.com>
2884
2885 * lto-function-in.c (input_ssa_names): Call
2886 make_ssa_name_fn instead of make_ssa_name.
2887
28882008-05-12 Diego Novillo <dnovillo@google.com>
2889
2890 * lto-cgraph-in.c (overwrite_node): Update references to
2891 inline summary fields.
2892 * lto-function-in.c (input_expr_operand): Do not handle
2893 STRUCT_FIELD_TAG.
2894
28952008-05-09 Ollie Wild <aaw@google.com>
2896
2897 * lang.opt: New file.
2898 * lto-lang.c (lto_init_options): New function.
2899 (lto_handle_option): New function.
2900 (lto_init): Move initialization of flag_unit_at_a_time to
2901 lto_init_options.
2902 (LANG_HOOKS_INIT_OPTIONS): Define.
2903 (LANG_HOOKS_HANDLE_OPTION): Define.
2904
29052008-04-29 Ollie Wild <aaw@google.com>
2906
2907 * lto.c (lto_read_namespace_DIE): New function.
2908 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
2909 NAMESPACE_DECL DIE's.
2910 (lto_resolve_namespacedecl_ref): New function.
2911 * lto.h (lto_resolve_namespacedecl_ref): New function.
2912 * lto-section-in.c (lto_read_decls): Read namespace declarations.
2913 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
2914 and num_namespace_decls.
2915 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
2916 * lto-lang.c (lto_init_ts): New function.
2917 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
2918
29192008-04-16 Ollie Wild <aaw@google.com>
2920
2921 * lto-function-in.c (input_type_ref): Updated function description.
2922
29232008-04-16 Ollie Wild <aaw@google.com>
2924
2925 * lto-function-in.c (input_type_ref_1): New function.
2926 (input_type_ref): Split into two functions.
2927 (input_function): Add support for type contexts.
2928
29292008-04-16 Ollie Wild <aaw@google.com>
2930
2931 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
2932 section name
2933
29342008-04-16 Ollie Wild <aaw@google.com>
2935
2936 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
2937 list of supported languages.
2938
29392008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
2940
2941 Merge with mainline @133491.
2942
29432008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
2944 Jan Hubicka <jh@suse.cz>
2945
2946 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
2947 fd->unmaterialized_fndecls.
2948 (lto_get_file_name, lto_materialize_cgraph): New function.
2949 (lto_materialize_constructors_and_inits,
2950 lto_materialize_function): Read info directly from elf file.
2951 (lto_file_read): Made local and initialize dictionary so that
2952 other lto sections can be read without reprocessing the elf file.
2953 (lto_main): Read all functions after all files have been processed
2954 for their types, globals and cgraph.
2955 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
2956 dependencies.
2957 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
2958 (hash_name, eq_name, lto_elf_build_section_table): New functions.
2959 (lto_elf_read_symtab): Removed function.
2960 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
2961 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
2962 (lto_file_read): Made local.
2963 (lto_get_file_name, lto_elf_build_section_table,
2964 lto_input_cgraph):
2965 New function.
2966 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
2967 New functions.
2968 (lto_read_decls): Get the file name.
2969 * lto-cgraph-in.c: New file.
2970 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
2971 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
2972 (input_labels): Fixed latent sizeof issue.
2973 (input_function): Build stmt array to set call sites into cgraph
2974 edges.
2975 (lto_read_body): Reset cfun->curr_properties.
2976 * lto_section_in.h (lto_section_slot): New structure.
2977 (section_hash_table.lto_file_decl_data): New field.
2978
2979
29802008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
2981
2982 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
2983 reconstruct static initializers.
2984 (lto_get_body, lto_materialize_function): Add lto_section_type as
2985 a parameter.
2986 (lto_materialize_constructors_and_inits,
2987 lto_materialize_file_data): New function.
2988 (lto_materialize_function,
2989 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
2990 unmap_section and map_fn_body to map_section.
2991 (lto_set_cu_context): Process functions and static inits
2992 differently.
2993 * Make-lang.in (LTO_H, lto/lto-function-in.o,
2994 lto/lto-section-in.o): Update dependencies.
2995 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
2996 lto_section_type parameter.
2997 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
2998 * lto.h (lto_file_vtable_struct): Removed two of the fields and
2999 renamed the other two so that there is only one map function and
3000 one unmap function and each takes a section type parameter.
3001 (lto_read_function_body): Renamed to lto_input_function_body and
3002 added file_data parameter.
3003 (lto_read_var_init): Removed.
3004 (lto_input_constructors_and_inits): New function.
3005 * lto-section-in.c (lto_read_decls): New function.
3006 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
3007 var_decls, type_decls, types to lto_file_decl_data.
3008 (input_type_ref, input_expr_operand, lto_read_body): Get
3009 field_decls, fn_decls, var_decls, type_decls, types from different
3010 structure.
3011 (input_globals, input_constructor, lto_read_var_init): Removed.
3012 (input_constructors_or_inits): New function.
3013 (lto_read_function_body, lto_input_constructors_and_inits):
3014 Renamed to lto_input_function_body and takes file_data parameter.
3015 * lto-section-in.h (lto_file_decl_data): New structure.
3016
30172008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3018
3019 * lto-function-in.c (input_globals.c): Changed input type to
3020 lto_function_header.
3021 (input_bb): Removed code to deserialize the stmt number.
3022 (input_function): Renumber all stmts after they are input.
3023 (lto_read_body, lto_read_function_body, lto_read_var_init):
3024 Changed to used new header format and enum section_type.
3025 *lto-lang.c (success): Removed.
3026
30272008-01-28 Nathan Froyd <froydnj@codesourcery.com>
3028
3029 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
3030 (lto_elf_free_sym): Likewise.
3031
3032 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
3033 (lto_elf_build_init): Likewise.
3034
30352008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
3036
3037 * lto-read.c: Renamed to lto-function-in.c.
3038 (input_1_unsigned): Moved to lto-section-in.c and renamed
3039 lto_input_1_unsigned.
3040 (input_uleb128): Moved to lto-section-in.c and renamed
3041 lto_input_uleb128.
3042 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
3043 lto_input_widest_uint_uleb128.
3044 (input_sleb128): Moved to lto-section-in.c and renamed
3045 lto_input_sleb128.
3046 (input_integer): Moved to lto-section-in.c and renamed
3047 lto_input_integer.
3048 (debug_in_fun): Moved to lto-section-in.c and renamed
3049 lto_debug_in_fun.
3050 (input_block): Moved to lto-section-in.h and renamed
3051 lto_input_block.
3052 (input_expr_operand): Fixed to allow lists with more than one
3053 element.
3054 * lto-section-in.h: New file.
3055 * lto-section-in.c: New file with changes from above.
3056 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
3057 (lto-section-in.o): New rule.
3058
30592007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3060
3061 * lto-read.c (input_expr_operand): Mark static and external
3062 VAR_DECLs as needed.
3063
30642007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3065
3066 * lto-read.c (input_integer): Use the correct shift amount.
3067
30682007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3069
3070 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
3071 (LANG_HOOKS_NAME): Define.
3072
30732007-12-27 Nathan Froyd <froydnj@codesourcery.com>
3074
3075 * lto.c (lto_find_integral_type): Define as a macro. Rename the
3076 original function to...
3077 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
3078 don't have a base type.
3079 (lto_read_enumeration_type_DIE): Examine the values of the
3080 enumeration to determine whether we can use an unsigned type for
3081 the base type of the enumeration.
3082
30832007-12-24 Nathan Froyd <froydnj@codesourcery.com>
3084
3085 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
3086 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
3087
30882007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3089
3090 * lto-lang.c (lto_types_compatible_p): New function.
3091 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
3092
30932007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3094 Kenneth Zadeck <zadeck@naturalbridge.com>
3095
3096 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
3097 (input_local_vars): Read in DECL_INITIAL and context for local
3098 statics that need to be put in unexpanded_vars_list.
3099
31002007-12-21 Nathan Froyd <froydnj@codesourcery.com>
3101
3102 * lto-read.c (input_real): Use a separate null-terminated buffer
3103 for calling real_from_string.
3104 (input_expr_operand): If we take the address of a FUNCTION_DECL,
3105 tell cgraph that it's needed.
3106
31072007-12-19 Doug Kwan <dougkwan@google.com>
3108
3109 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
3110
31112007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3112
3113 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
3114 (lto_file_read): Reset the members of 'context' every time we read
3115 a toplevel DIE, with special attention to last_param_type.
3116
31172007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3118
3119 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
3120 'declaration'. Set the assembler name for non-public functions.
3121
31222007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
3123
3124 * lto_read.c (data_in.unexpanded_indexes): New array.
3125 (input_local_var): Added code to read in unexpanded_var_list
3126 indexes for variables. Only read in DECL_CHAIN field for
3127 parameters.
3128 (input_local_vars): Added code to rebuild unexpanded_var_list in
3129 order using unexpanded_indexes.
3130 (input_function): Added code to set DECL_CONTEXT for functions.
3131
31322007-12-13 Doug Kwan <dougkwan@google.com>
3133
3134 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
3135 in pointer and reference types.
3136
31372007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3138
3139 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
3140 RESULT_DECL.
3141
31422007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3143
3144 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
3145 already read the DIE.
3146 (lto_get_body): New function, split out from...
3147 (lto_materialize_function): ...here. Call it.
3148 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
3149 determine DECL_EXTERNAL.
3150 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
3151 FUNCTION_DECLs when necessary. Use the type of the actual
3152 function definition if we are unable to easily merge types. Ignore
3153 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
3154 necessary.
3155
31562007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3157
3158 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
3159
31602007-12-12 Bill Maddox <maddox@google.com>
3161
3162 Revert
3163 2007-12-07 Bill Maddox <maddox@google.com>
3164
3165 * lto.c (lto_str_fd_init): New function.
3166 (lto_str_fd_close): New function.
3167 (lto_file_init): Call lto_str_fd_init.
3168 (lto_file_close): Call lto_str_fd_close.
3169 (lto_str_read): New function. Read debug string table.
3170 (lto_str_lookup): New function. Get string for debug
3171 string table offset.
3172 (lto_read_form): Recognize DW_FORM_strp.
3173 (lto_file_read): Invoke lto_str_read.
3174
3175 * lto-elf.c (lto_elf_file_open): Read raw section data
3176 for the .debug_str section, if present.
3177
3178 * lto.h (struct lto_str_fd_struct): New struct.
3179 (struct lto_file_struct): Added new field DEBUG_STR
3180 to hold the file descriptor for the debug string table.
3181
31822007-12-07 Bill Maddox <maddox@google.com>
3183
3184 * lto.c (lto_str_fd_init): New function.
3185 (lto_str_fd_close): New function.
3186 (lto_file_init): Call lto_str_fd_init.
3187 (lto_file_close): Call lto_str_fd_close.
3188 (lto_str_read): New function. Read debug string table.
3189 (lto_str_lookup): New function. Get string for debug
3190 string table offset.
3191 (lto_read_form): Recognize DW_FORM_strp.
3192 (lto_file_read): Invoke lto_str_read.
3193
3194 * lto-elf.c (lto_elf_file_open): Read raw section data
3195 for the .debug_str section, if present.
3196
3197 * lto.h (struct lto_str_fd_struct): New struct.
3198 (struct lto_file_struct): Added new field DEBUG_STR
3199 to hold the file descriptor for the debug string table.
3200
32012007-12-07 Nathan Froyd <froydnj@codesourcery.com>
3202
3203 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
3204 Grow the basic_block_info and label_to_block_map vectors if
3205 necessary. Read in the block chain.
3206
32072007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3208
3209 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
3210
32112007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3212
3213 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
3214
32152007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3216
3217 * lto-read.c (input_expr_operand): Don't check for MTAGs.
3218 (lto_read_body): Don't declare PROP_alias.
3219
32202007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3221
3222 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
3223 argument type information.
3224
32252007-12-03 Nathan Froyd <froydnj@codesourcery.com>
3226
3227 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3228 TREE_THIS_VOLATILE if the associated type is a volatile type.
3229 (lto_materialize_function): Remove call to init_ssa_operands.
3230 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
3231 variable when reading an SSA_NAME. Do the same when reading a
3232 RESULT_DECL, a RETURN_EXPR, or an MTAG.
3233 (input_cfg): Call init_ssa_operands.
3234 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
3235 Move call to init_tree_ssa...
3236 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
3237 add_referenced_var on any variables referenced from the body of the
3238 function. Inform the rest of the compiler we are in SSA form and
3239 inform later passes about the current properties.
3240
32412007-11-30 Nathan Froyd <froydnj@codesourcery.com>
3242
3243 * lto.c (lto_materialize_function): Add FIXME.
3244
32452007-11-29 Nathan Froyd <froydnj@codesourcery.com>
3246
3247 * lto-lang.c (enum built_in_attribute): New enum.
3248 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
3249 built_in_attributes): New variables.
3250 (def_builtin_1): New function.
3251 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
3252
32532007-11-28 Nathan Froyd <froydnj@codesourcery.com>
3254
3255 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3256 DECL_SOURCE_LOCATION for debugging purposes.
3257 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
3258 bitfield, use the type specified by the DIE for TREE_TYPE and defer
3259 laying out the decl until later.
3260 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
3261 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
3262 TREE_ADDRESSABLE.
3263 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
3264 operand of an ADDR_EXPR.
3265 * lto-lang.c (enum lto_builtin_type): New enum.
3266 (builtin_type): New typedef.
3267 (builtin_types, string_type_node, const_string_type_node,
3268 wint_type_node, intmax_type_node, uintmax_type_node,
3269 signed_size_type_node): New variables.
3270 (def_fn_type, builtin_type_for_size, lto_define_builtins,
3271 lto_build_c_type_nodes): New functions.
3272 (lto_init): Initialize builtin types.
3273 (lto_set_decl_assembler_name): Let the target machine mangle the
3274 name if the decl is TREE_PUBLIC, otherwise uniquify it.
3275
32762007-11-21 Nathan Froyd <froydnj@codesourcery.com>
3277
3278 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
3279 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
3280 the type is a constant type. Set the assembler name and inform
3281 the rest of the compiler about the new decl if the decl is not
3282 public.
3283 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
3284 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
3285 try to read in function bodies for functions that already have bodies.
3286 * lto-symtab.c (lto_same_type_p): Check for unbounded array
3287 equivalency.
3288 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
3289 Check for whether we matched a builtin function type before calling
3290 lto_same_type_p on the generated type. Permit cases where the
3291 declaration of an array is unbounded, but the definition is bounded.
3292 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
3293 DECL_SIZE_UNIT if necessary.
3294
32952007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3296
3297 * lto-read.c (input_expr_operand): Get types right
3298 for COMPLEX_CST.
3299
33002007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3301
3302 * lto-read.c (make_new_block, input_cfg): Properly set
3303 n_basic_blocks.
3304
33052007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3306
3307 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
3308 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
3309
33102007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3311
3312 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
3313 construct the integer type for bitfields.
3314
33152007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3316
3317 * lto-read.c (data_in.current_node_has_loc): Removed.
3318 (input_line_info): Returns true if node needs line set.
3319 (set_line_info): Always sets line if called.
3320 (clear_line_info): Removed reference to current_node_needs_loc.
3321 (input_expr_operand): Keeps track locally if current node needs a loc.
3322 (input_local_var): Added code to handle DECL_INITIAL for
3323 static local vars. Only set loc if necessary.
3324
33252007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3326
3327 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
3328 DECL_CONTEXT.
3329
33302007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3331
3332 * lto.c: Include langhooks.h.
3333 (lto_find_integral_type): Rework logic to handle the case where
3334 got_byte_size is true, but the bitsize requested and that of the
3335 base_type doesn't match.
3336 (lto_read_variable_formal_parameter_constant_DIE): Only check for
3337 asm_name if we are creating a VAR_DECL.
3338 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
3339 definition.
3340 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
3341 function reference and use the builtin's decl if so. Set the
3342 DECL_CONTEXT of the RESULT_DECL for the function.
3343 * lto-lang.c (registered_builtin_fndecls): New variable.
3344 (lto_getdecls): Return it.
3345 (lto_builtin_function): Chain the new decl onto
3346 registered_builtin_fndecls.
3347
33482007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
3349
3350 * lto-read.c (process_tree_flags, lto_static_init_local):
3351 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
3352 (input_line_info, clear_line_info): Fixed new line number code.
3353 (input_expr_operand): Added type to SWITCH_EXPR.
3354 (lto_read_body): Properly initialized data_in.
3355 Clear line info when leaving.
3356
33572007-11-13 Diego Novillo <dnovillo@google.com>
3358
3359 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3360 Initialize ARTIFICIAL.
3361 (lto_read_subroutine_type_subprogram_DIE): Initialize
3362 SAVED_SCOPE.
3363 * lto-read.c (set_line_info): Remove ; from calls to
3364 LINEMAP_POSITION_FOR_COLUMN.
3365
33662007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3367
3368 * lto-read.c (input_type_ref): Renamed from get_type_ref.
3369 (input_expr_operand, input_local_var): Renamed get_type_ref to
3370 input_type_ref.
3371 (input_expr_operand): Get the types correct for
3372 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
3373
33742007-11-13 Doug Kwan <dougkwan@google.com>
3375
3376 * lto-read.c (input_widest_uint_uleb128): New function.
3377 (input_tree_flags, process_tree_flags, input_line_info,
3378 input_expr_operand, input_local_var, input_phi, input_ssa_names):
3379 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
3380 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
3381 (lto_static_init_local): Add code to assert that lto_flags_type is
3382 wide enough.
3383
33842007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3385
3386 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
3387 (lto_read_subroutine_type_subprogram_DIE): Handle
3388 DW_AT_static_link and DW_AT_specification. Return the
3389 specification if present.
3390 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
3391
33922007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3393
3394 * lto-lang.c: Include target.h.
3395 (registered_builtin_types): New variable.
3396 (lto_type_for_mode): Increase number of modes handled.
3397 (lto_builtin_function): Fix argument list and return the decl.
3398 (lto_register_builtin_type): New function.
3399 (lto_init): Initialize target builtins and language-independent
3400 nodes.
3401 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
3402
34032007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3404
3405 * lto-read.c (input_expr_operand): Added code to properly handle
3406 index filed. Added new RANGE_EXPR case.
3407
34082007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3409
3410 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
3411 (data_in): Added current_node_has_loc field.
3412 (input_line_info, set_line_info, clear_line_info): Added a support
3413 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
3414 did not have on on the source side.
3415 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
3416 numbers too.
3417
34182007-11-09 Doug Kwan <dougkwan@google.com>
3419
3420 * lto-read.c (input_expr_operand): Change type of operand 2 of
3421 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
3422
34232007-11-09 Nathan Froyd <froydnj@codesourcery.com>
3424
3425 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
3426 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
3427 from a DW_AT_specification or DW_AT_abstract_origin attribute to
3428 the new decl we are creating. Move informing the middle end about
3429 the new decl to...
3430 (lto_main): ...here. Inform the middle end about global variables
3431 after we have read in all the input files.
3432 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
3433 variables with internal linkage, so delete the check for internal
3434 linkage. Combine TREE_PUBLIC flags.
3435
34362007-11-08 Nathan Froyd <froydnj@codesourcery.com>
3437
3438 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3439 DW_AT_decl_line.
3440 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
3441 builtin specially. Move check for attribute compatibility
3442 earlier.
3443
34442007-11-07 Nathan Froyd <froydnj@codesourcery.com>
3445
3446 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
3447 * config-lang.in (gtfiles): Add lto.h and lto.c.
3448 * lto-elf.c: Include ggc.h.
3449 (lto_elf_file_open): Allocate elf_file from GC memory.
3450 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
3451 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
3452 in GC memory.
3453 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
3454 (lto_file_close): Free file from GC memory.
3455 (lto_cache_store_DIE): Allocate the new entry in GC memory.
3456 (lto_read_member_DIE): Fix declaration.
3457 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
3458 in GC memory.
3459 (current_lto_file): New variable.
3460 (lto_main): Use it.
3461 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
3462 lto_die_cache_entry): Move to...
3463 * lto.h: ...here and add GTY markers as appropriate. Delete forward
3464 declarations accordingly.
3465 (struct lto_file_struct): Declare.
3466 (lto_file_vtable): Use it instead of lto_file.
3467
34682007-11-06 Alon Dayan <alond@il.ibm.com>
3469 Kenneth Zadeck <zadeck@naturalbridge.com>
3470
3471 * lto-read.c (process_flags, lto_static_init_local):
3472 read flags of VAR_DECL and FUNCTION_DECL of size>1.
3473 change global array num_flags_for_code to flags_length_for_code.
3474 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
3475
34762007-11-05 Nathan Froyd <froydnj@codesourcery.com>
3477
3478 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
3479 layout functions to compute information about the newly constructed
3480 type.
3481
34822007-11-02 Nathan Froyd <froydnj@codesourcery.com>
3483
3484 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
3485 case to use DECL_RESULT if necessary.
3486
34872007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3488
3489 * lto-read.c (input_tree_list): Removed.
3490 (input_tree_flags): Added parameter to force flags no matter what
3491 tree code.
3492 (input_expr_operand): Added parameter to input_tree_flags.
3493 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
3494 input_expr_operand rather than input_tree_lists.
3495 (input_local_var): Use input_expr_operand to read attributes
3496 rather then input_tree_list.
3497 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
3498
34992007-10-31 Nathan Froyd <froydnj@codesourcery.com>
3500
3501 * lto.c (lto_read_typedef_DIE): Fix comment typo.
3502 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
3503 TYPE_DECL for it.
3504 * lto-read.c (lto_read_body): Use correct sizes for calculating
3505 type_decls_offset and types_offset.
3506
35072007-10-30 Nathan Froyd <froydnj@codesourcery.com>
3508
3509 * lto-tree.h (union lang_tree_node): Change GTY description to chain
3510 with GENERIC_NEXT.
3511 * config-lang.in (gtfiles): Add lto-lang.c.
3512 * lto-lang.c: Include gt-lto-lto-lang.h.
3513 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
3514 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
3515 (lto/lto-read.o): Likewise.
3516
35172007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3518
3519 * lto-read.c (data_in): Added type_decls and current_col fields.
3520 (string_slot): New type to hold canonized file name.
3521 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
3522 input_line_info, set_line_info, clear_line_info): New functions.
3523 (file_name_hash_table): New hash table.
3524 (input_local_var, input_labels, input_local_vars_index,
3525 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
3526 (input_uleb128): Changed type of byte var.
3527 (input_expr_operand): Large number of changes to get line numbers
3528 correct. Added TYPE_DECL case.
3529 (input_globals): Added code to get TYPE_DECLs processed.
3530 (input_local_var): Added code to process line numbers and
3531 TREE_CHAIN and DECL_CONTEXT.
3532 (input_function, input_constructor): Added call to
3533 clear_line_number.
3534 (lto_static_init_local): Added code to get line numbers correct.
3535 (lto_read_body): Added code to get TYPE_DECLS read and to change
3536 parameters to the calls above that had their parms reorganized.
3537
3538
35392007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3540
3541 * lto.h (lto_resolve_typedecl_ref): Declare.
3542 * lto.c (lto_resolve_typedecl_ref): New function.
3543
35442007-10-29 Mark Mitchell <mark@codesourcery.com>
3545 Nathan Froyd <froydnj@codesourcery.com>
3546
3547 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
3548 DIEs even if we find an abstract origin for this DIE.
3549
35502007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3551
3552 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
3553 RESULT_DECL slightly earlier. Only remember the decl for later
3554 if we successfully merge declarations.
3555
35562007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
3557
3558 * lto-read.c (input_expr_operand): Give label_values the proper
3559 context and provide switch statements with a default type.
3560
35612007-10-23 Nathan Froyd <froydnj@codesourcery.com>
3562
3563 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
3564 * lto.c (lto_materialize_function): ...to here.
3565
35662007-10-22 Nathan Froyd <froydnj@codesourcery.com>
3567
3568 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
3569 * lto.c (lto_info_fd_init): Initialize it.
3570 (lto_info_fd_close): Free it.
3571 (lto_materialize_function): New function.
3572 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
3573 unmaterialized_fndecls.
3574 (lto_file_read): Read in all the function bodies after we have read
3575 all of the DWARF info.
3576 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
3577 reading a function body.
3578
35792007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
3580
3581 * lto-read.c (input_tree_flags): Renamed from input_flags to be
3582 semetric with output_tree_flags. Added call to log flags.
3583 (process_tree_flags): Renamed from process_flags. Fixed a lot of
3584 type issues to make everything consistent with flags being
3585 unsigned HOST_WIDE_INTS.
3586 (input_expr_operand): Added call to
3587 recompute_tree_invariant_for_addr_expr.
3588 (input_local_var): Added debugging for tree_chains. Now calls
3589 input_tree_flags.
3590 (input_phi): Made flags unsigned HOST_WIDE_INT.
3591 (input_ssa_names): Now calls input_tree_flags.
3592 (lto_read_body): Now sets cfun.
3593 (lto_read_function_body): Now sets current_function_pointer.
3594
35952007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3596
3597 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
3598 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
3599 inspecting fields within.
3600 (lto_read_DIE_at_ptr): Delete check for null result; let callers
3601 handle this appropriately.
3602
36032007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3604
3605 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
3606 DW_AT_abstract_origin properly. Ensure that we're not dealing with
3607 both DW_AT_abstract_origin and DW_AT_specification.
3608 (lto_read_subroutine_type_subprogram_DIE): Handle
3609 DW_AT_abstract_origin.
3610 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
3611 (lto_read_DIE_at_ptr): Define as static to match declaration.
3612 Lookup the PTR in the cache before reading it from the file.
3613 (lto_resolve_var_ref): Adjust accordingly.
3614 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
3615 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
3616
36172007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3618
3619 * lto.c (lto_read_DIE_at_ptr): New function.
3620 (lto_resolve_var_ref): Use it.
3621 (lto_resolve_fn_ref): Use it.
3622 (lto_resolve_field_ref): Use it.
3623 (lto_read_variable_formal_parameter_constant_DIE): Follow
3624 DW_AT_specification and return the associated decl when appropriate.
3625
36262007-10-18 Nathan Froyd <froydnj@codesourcery.com>
3627
3628 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
3629 Implement for scalar integer modes.
3630 (lto_init): Initialize size_type_node.
3631
36322007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
3633
3634 * lto-read.c (input_expr_operand): Remove ssa name asserts.
3635 (input_local_var): Add chaining for params.
3636 (input_ssa_names): Add cfun parameter.
3637 (input_function): Remove unnecessary else.
3638
36392007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3640
3641 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
3642 (lto_resolve_var_ref): Use proper types.
3643 (lto_resolve_fn_ref): Likewise.
3644 (lto_resolve_field_ref): Likewise.
3645
36462007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3647
3648 * lto-read.c (input_expr_operand): Remove case.
3649
36502007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3651
3652 * lto.c (lto_read_only_for_child_DIEs): New function.
3653 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
3654 * lto-elf.c (lto_elf_map_lto_section): Remove.
3655 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
3656 * lto-read.c (input_expr_operand): Assert that we never read a NULL
3657 SSA_NAME. Add missing case for mechanical codes.
3658 (input_cfg): Use basic_block_info_for_function instead of
3659 basic_block_info.
3660
36612007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3662
3663 * lto-read.c (input_sleb128, input_integer): Use proper casts.
3664 (input_list): Renamed input_tree_list and modified to follow same
3665 protocol as lto-function-out.c:output_tree_list.
3666 (input_expr_operand): Make asm operands use input_tree_list.
3667 (input_local_var): Now uses input_tree_list.
3668 (lto_read_body): Change placement for setting context of debug_labels.
3669
3670
36712007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3672
3673 * lto-read.c (input_real): Output debugging in proper order.
3674 (input_integer): Compute bit lengths properly.
3675 (input_list): Clean up declaration.
3676 (input_expr_operand): Change calls to input_real to match fix.
3677 Make reading of LTO_bit_field_ref1 match output.
3678 (input_local_var): Make reading of attributes match what is being
3679 written.
3680 (dump_debug_stream): Also print char in hex.
3681 (debug_out_fun): Fix signed unsigned mismatch.
3682
36832007-10-10 Nathan Froyd <froydnj@codesourcery.com>
3684
3685 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
3686 DW_AT_GNU_vector specially, as they are not contiguous with the
3687 specified set of attribute names. Use class_mask to check for
3688 errors at the end of the function
3689 (lto_resolve_var_ref): Read the DIE if it is not cached.
3690 (lto_resolve_fn_ref): Likewise.
3691 (lto_resolve_field_ref): Likewise.
3692
36932007-10-05 Nathan Froyd <froydnj@codesourcery.com>
3694
3695 * lto.c: Include dwarf2out.h.
3696 (lto_cache_store_DIE): Assert that we never change the value.
3697 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
3698 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
3699 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
3700 sensible type instead.
3701 (lto_read_structure_union_class_type_DIE): Store the newly
3702 created type prior to reading the members of the structure to
3703 avoid infinite recursion. Avoid computing types and alignments
3704 for structures whose sizes are unknown.
3705 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
3706 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
3707 DW_AT_const_value, and DW_AT_specification.
3708 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
3709 Return early if we have already constructed the function type.
3710 (lto_read_typedef_DIE): Check to see if the type has been cached
3711 already. Cache the type before reading any children.
3712 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
3713 (lto_read_DIE): Unset context->skip_non_parameters around reading
3714 the DIE.
3715 (lto_resolve_fn_ref): Delete trailing whitespace.
3716
37172007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3718
3719 * lto-read.c (input_expr_operand): Added type for STRING_CST.
3720
37212007-09-10 Nathan Froyd <froydnj@codesourcery.com>
3722
3723 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
3724
37252007-09-07 Nathan Froyd <froydnj@codesourcery.com>
3726
3727 * lto-lang.c (signed_and_unsigned_types): New variable.
3728 (lto_type_for_size): Consult signed_and_unsigned_types to find
3729 an approprite type, creating it if necessary.
3730 (lto_set_decl_assembler_name): Add actual method body.
3731
37322007-09-06 Jim Blandy <jimb@codesourcery.com>
3733
3734 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
3735 can't find a var init for this variable, leave its DECL_INITIAL.
3736 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
3737 lto_elf_map_fn_body.
3738 (lto_map_lto_section): New function.
3739 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
3740 bodies, and lto_elf_map_optional_lto_section for variable
3741 initializers.
3742 (lto_elf_find_section_data): Quietly return NULL if the section is
3743 missing.
3744 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
3745
3746 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
3747
3748 * lto-read.c (lto_read_body): Doc fix.
3749
37502007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3751
3752 * lto-read.c (fun_in): Renamed to data_in.
3753 (input_expr_operand, input_local_var, input_string_internal,
3754 input_string, input_real, input_list, get_label_decl,
3755 get_type_ref, input_expr_operand, input_globals, input_labels,
3756 input_local_vars_index, input_local_var, input_local_vars,
3757 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
3758 (input_constructor): New function.
3759 (lto_read_function_body): Renamed to lto_read_body and generalized
3760 to handle both functions and constructors.
3761 (lto_read_function_body, lto_read_var_init): New function.
3762
3763
37642007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3765
3766 * lto-read.c (input_expr_operand): Assert that there really is a
3767 FUNCTION_DECL.
3768 (input_globals): Removed checks on 0 section.
3769
37702007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3771
3772 * lto-read.c (fun_in): Added local_decls_index and
3773 local_decls_index_d.
3774 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
3775 (input_globals): Enabled code to handle FIELD_DECLs.
3776 (input_local_vars_index, input_local_vars): New function.
3777 (input_local_var): Changed to allow locals to be input randomly.
3778 (lto_read_function_body): Added code to input the
3779 local_decls_index and to free various structures.
3780
37812007-08-17 Jim Blandy <jimb@codesourcery.com>
3782
3783 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
3784 ATTRIBUTE_UNUSED from 'die' formal.
3785
3786 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
3787 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
3788 (input_list): Fix type of 'tag'.
3789 (input_expr_operand): Fix type of 'tag' argument. Update
3790 declaration. Fix type of 'ctag'. Add default case to switch,
3791 since the type of the switched value is now an enum.
3792 (input_local_vars): Fix type of 'tag'.
3793 (input_bb): Fix type of 'tag' argument.
3794 (input_function): Fix type of 'tag' argument.
3795
37962007-08-16 Jim Blandy <jimb@codesourcery.com>
3797
3798 * lto.c (lto_read_member_DIE): Record the tree we create in
3799 fd->die_cache. (Our 'die' argument is no longer unused.)
3800 (lto_resolve_field_ref): New function.
3801 * lto.h (lto_resolve_field_ref): New declaration.
3802
38032007-08-15 Jim Blandy <jimb@codesourcery.com>
3804
3805 * lto-read.c (lto_read_var_init): Mark arguments as unused.
3806
38072007-08-07 Jim Blandy <jimb@codesourcery.com>
3808
3809 * lto.c (lto_read_form): Complete attr_classes table.
3810 (DWARF2_form_data): Doc fix.
3811
38122007-08-05 Mark Mitchell <mark@codesourcery.com>
3813
3814 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
3815 and unmap_var_init.
3816 (lto_read_var_init): Declare.
3817 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
3818 interface for reading variable initializers.
3819 * lto-elf.c (lto_elf_read_var_init): Remove.
3820 (lto_elf_file_vtable): Update initializer.
3821 (lto_elf_read_var_init): Add comment about unused-ness.
3822 * lto-read.c (lto_read_var_init): New.
3823
3824 * lto.c (lto_read_form): Add entry for DW_AT_inline.
3825
38262007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
3827
3828 * lto-read.c (lto_read_function_body): Moved declaration of fn
3829 outside of ifdef.
3830
38312007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3832
3833 * lto-read.c (input_uleb128, input_string_internal, input_real,
3834 input_integer, input_record_start, input_list, get_type_ref,
3835 input_flags, input_expr_operand, input_expr_operand,
3836 input_expr_operand, input_local_vars, input_cfg, input_phi,
3837 input_ssa_names, input_bb, input_function): Added semicolons.
3838
3839
38402007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3841
3842 * lto-read.c (input_globals): Remove debugging.
3843 (input_function): Set DECL_ARGUMENTS.
3844
3845
38462007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3847
3848 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
3849 RETURN_EXPR, MODIFY_EXPR and processing of flags.
3850 (input_phi): Made work with operands other than SSA_NAMES and
3851 fixed processing of flags.
3852 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
3853 (input_flags): New function.
3854 * lto-lang.c (lto_init): Changed state of in_lto_p.
3855
3856
38572007-07-24 Mark Mitchell <mark@codesourcery.com>
3858
3859 * lto-tree.h (lto_varargs_cookie): Remove.
3860 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
3861 skip_non_parameters, skip_parameters.
3862 (lto_varargs_cookie): Remove.
3863 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
3864 parameter types.
3865 (lto_read_abbrev): New function.
3866 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
3867 child DIEs.
3868 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
3869 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
3870 (lto_file_read): Initialize new context fields.
3871 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
3872 (lto_unsigned_type): Remove.
3873 (lto_signed_type): Likewise.
3874 (lto_signed_or_unsigned_type): Likewise.
3875 (lto_init): Do not create lto_varargs_cookie.
3876 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
3877 (LANG_HOOKS_SIGNED_TYPE): Likewise.
3878 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
3879
38802007-07-19 Jan Hubicka <jh@suse.cz>
3881
3882 * lto-read.c (lto_read_function_body): Produce empty scope block
3883 to avoid crash.
3884
38852007-07-18 Mark Mitchell <mark@codesourcery.com>
3886
3887 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
3888 process local variables.
3889 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
3890
38912007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3892
3893 * lto-read.c (input_list, input_expr_operand): Added struct
3894 function parameter.
3895 (init_cfg, finalize_cfg): Removed function.
3896 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
3897 (input_labels, input_local_vars): Now takes input_block parameter rather than
3898 synthsyzing it.
3899 (input_cfg, input_phi, input_ssa_names): New functions.
3900 (input_bb): Now passes in input_blocks. Does not construct cfg
3901 and processes the list of phi functions.
3902 (input_function): Now builds both the cfg and ssa_names table.
3903 (lto_read_function_body): Processes new header fields to construct
3904 streams for the ssa_names and cfg and their debugging.
3905 * lto/lto-lang.c (lto_init): Set in_lto_p.
3906
3907
39082007-06-28 Mark Mitchell <mark@codesourcery.com>
3909
3910 * lto.h (lto_file_vtable): Add read_var_init.
3911 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
3912 initializers.
3913 (lto_main): Remove bogus asserts.
3914 * lto-elf.c (tm.h): Include it.
3915 (libiberty.y): Likewise.
3916 (lto_elf_file): Add strtab and symtab. Rename
3917 string_table_section_index to sec_strtab.
3918 (lto_elf_file_vtable): Add lto_elf_read_var_init.
3919 (lto_elf_get_shdr): New function.
3920 (lto_elf_free_shdr): Likewise.
3921 (lto_elf_find_section_data): Use them.
3922 (lto_elf_read_symtab): New function.
3923 (lto_elf_lookup_sym): Likewise.
3924 (lto_elf_free_sym): Likewise.
3925 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
3926 (lto_elf_built_init): New function.
3927 (lto_elf_read_var_init): Likewise.
3928 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
3929
39302007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
3931
3932 * lto-read (make_new_block): Initialize the stmt_list.
3933 (lto_static_init_local): Add debugging for missing codes.
3934
39352007-06-26 Mark Mitchell <mark@codesourcery.com>
3936
3937 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3938 unprototyped functions.
3939
39402007-06-23 Mark Mitchell <mark@codesourcery.com>
3941
3942 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3943 Handle DW_AT_MIPS_linkage_name.
3944 (lto_read_subroutine_type_subprogram): Likewise. Correct
3945 compilation errors.
3946 (lto_main): Remove incorrect assertions.
3947 * lto-symbtab.c: Build function types out of TREE_LISTs.
3948
3949 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
3950
3951 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
3952
39532007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
3954
3955 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
3956 dummy since ggc does not like empty structs.
3957 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
3958 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
3959 expr->common to expr->base.
3960 (make_new_block): Moved stmt_list to proper place.
3961
3962
39632007-03-14 Robert Kennedy <jimbob@google.com>
3964
3965 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
3966 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
3967 assembler name from DWARF.
3968 * lto-lang.c (lto_set_decl_assembler_name) New function.
3969
39702006-09-10 Mark Mitchell <mark@codesourcery.com>
3971
3972 * lto.h (lto_file_vtable): New structure.
3973 (lto_file): Add vtable pointer.
3974 (lto_file_init): Add vtable paramter.
3975 (lto_read_function_body): New function.
3976 (lto_symtab_merge_fn): New function.
3977 * lto.c (lto_file_init): Add vtable parameter.
3978 (lto_read_form): Fill in entries for DW_AT_prototyped,
3979 DW_AT_frame_base.
3980 (lto_read_subroutine_type_subprogram_DIE): New function.
3981 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
3982 DW_TAG_subprogram.
3983 * lto-elf.c (lto_elf_vile_vtable): New variable.
3984 (lto_elf_file_open): Pass it to lto_file_init.
3985 (lto_elf_map_fn_body): New function.
3986 (lto_elf_unmap_fn_body): Likewise.
3987 * lto-read.c: New file.
3988 * lto-symtab.c (lto_symtab_merge_fn): New function.
3989 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
3990 tree_rest_of_compilation.
3991 * Make-lang.in (LTO_OBJS): Add lto-read.o
3992 (lto-read.o): New target.
3993
39942006-09-03 Mark Mitchell <mark@codesourcery.com>
3995
3996 * lto.c (<inttypes.h>): Don't include it.
3997 (lto_context): Don't typedef it.
3998 (lto_resolve_reference): New function.
3999 (lto_read_form): Use it.
4000 (lto_resolve_type_ref): New function.
4001 (lto_resolve_var_ref): Likewise.
4002 (lto_resolve_fn_ref): Likewise.
4003 * lto.h (<inttypes.h>): Include it.
4004 (lto_context): New type.
4005 (lto_ref): New structure.
4006 (lto_resolve_type_ref): Declare.
4007 (lto_resolve_var_ref): Likewise.
4008 (lto_resolve_fn_ref): Likewise.
4009
40102006-08-18 Mark Mitchell <mark@codesourcery.com>
4011
4012 * lang-specs.h: New file.
4013
40142006-08-14 Mark Mitchell <mark@codesourcery.com>
4015
4016 * lto.c (lto_info_fd_init): Allocate the DIE cache.
4017 (lto_info_fd_close): Deallocate it.
4018 (lto_die_cache_entry): New structure.
4019 (lto_cache_hash): New function.
4020 (lto_cache_eq): Likewise.
4021 (lto_cache_store_DIE): Likewise.
4022 (lto_cache_lookup_DIE): Likewise.
4023 (lto_read_referenced_type_DIE): Use the cache.
4024 (lto_read_pointer_type_DIE): Robustify.
4025 (lto_read_DIE): Use the cache.
4026 * lto.h (hashtab.h): Include.
4027 (lto_info_fd): Add DIE cache.
4028 * Make-lang.in (LTO_H): New variable.
4029 (lto/lto-lang.o): Use LTO_H.
4030 (lto/lto-elf.o): Likewise.
4031 (lto/lto-symtab.o): Likewise.
4032
40332006-07-09 Mark Mitchell <mark@codesourcery.com>
4034
4035 * lto.c (lto_abi_mismatch_error): New function.
4036 (lto_abbrev_read): Initialize num_abbrevs.
4037 (lto_read_form): Specify allowed form classes for
4038 DW_AT_declaration. Adjust for change to lto_set_cu_context.
4039 (lto_read_variable_formal_parameter_constant_DIE): Handle
4040 DW_AT_declaration. Call lto_symtab_merge_var.
4041 (lto_read_pointer_type_DIE): New function.
4042 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
4043 not creat TYPE_DECLs for types that already have them.
4044 (lto_read_DIE): Add lto_read_pointer_type_DIE.
4045 (lto_set_cu_context): Make cu_start point to the header, not the
4046 first DIE.
4047 (lto_file_read): Adjust for change to lto_set_cu_context.
4048 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
4049 (lto/lto-symtab.o): New rule.
4050 * lto-tree.h (lang_identifier): Add decl field.
4051 (LANG_IDENTIFIER_CAST): New macro.
4052 (LTO_IDENTIFIER_DECL): Likewise.
4053 (lto_symtab_merge_var): Declare.
4054 * lto-symtab.c: New file.
4055
40562006-07-02 Daniel Berlin <dberlin@dberlin.org>
4057
4058 * lto.c (lto_context): Add current_cu and info_fd members.
4059 (DWARF2_CompUnit): New structure.
4060 (lto_read_DIE): Take lto_info_fd *.
4061 (lto_read_child_DIEs): Ditto.
4062 (lto_file_corrupt_error): Constify argument.
4063 (lto_set_cu_context): New function
4064 (lto_info_fd_init): Ditto.
4065 (lto_info_fd_close): Ditto.
4066 (lto_file_init): Use lto_info_fd_init.
4067 (lto_file_close): Use lto_info_fd_close.
4068 (lto_read_initial_length): Pass in pointer to header size.
4069 (lto_read_comp_unit_header): Correct cu_length to
4070 real length from beginning of header. Take lto_info_fd * as
4071 argument.
4072 (find_cu_for_offset): New function.
4073 (lto_read_form): Change first argument to lto_info_fd *.
4074 Add FORM_CONTEXT argument.
4075 Handle DW_FORM_ref_addr.
4076 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
4077 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
4078 Swap contexts if necessary for form.
4079 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
4080 lto_file_corrupt_error.
4081 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
4082 (lto_read_referenced_type_DIE): Change first argument to
4083 lto_info_fd *. Access lto_fd fields through base pointer.
4084 (lto_read_compile_unit_DIE): Change first argument to an
4085 lto_info_fd *.
4086 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
4087 (lto_read_base_type_DIE): Ditto.
4088 (lto_read_child_DIEs): Ditto.
4089 (lto_read_DIE): Ditto. Change type of function pointer.
4090 (lto_info_read): New function.
4091 (lto_set_cu_context): Ditto.
4092 (lto_file_read): Use lto_info_read, walk resulting CU's
4093 (lto_main): Update for lto_info_fd change.
4094 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
4095 necessary.
4096 * lto.h (DWARF2_CompUnit): New structure.
4097 (lto_info_fd): Ditto.
4098 (lto_file): Change debug_info to be an lto_info_fd.
4099
41002006-06-25 Mark Mitchell <mark@codesourcery.com>
4101
4102 * lto.c (toplev.h): Include it.
4103 (dwarf2.h): Likewise.
4104 (tree.h): Likewise.
4105 (tm.h): Likewise.
4106 (cgraph.h): Likewise.
4107 (ggc.h): Likewise.
4108 (inttypes.h): Likewise.
4109 (DWARF2_attr): New type.
4110 (DWARF2_abbrev): Likewise.
4111 (DWARF2_class): Likewise.
4112 (DWARF2_form_data): Likewise.
4113 (lto_context): Likewise.
4114 (lto_fd_init): New function.
4115 (lto_abbrev_fd_init): Likewise.
4116 (lto_abbrev_fd_close): Likewise.
4117 (lto_file_init): Use them.
4118 (lto_file_close): New function.
4119 (lto_file_corrupt_error): Likewise.
4120 (LTO_CHECK_INT_VAL): New macro.
4121 (lto_check_size_t_val): New function.
4122 (lto_check_int_val): Likewise.
4123 (LTO_READ_TYPE): New macro.
4124 (lto_read_ubyte): New function.
4125 (lto_read_uhalf): Likewise.
4126 (lto_read_uword): Likewise.
4127 (lto_read_uleb128): Likewise.
4128 (lto_read_initial_length): Likewise.
4129 (lto_abbrev_read_attrs): Likewise.
4130 (lto_abbrev_read): Likewise.
4131 (lto_abbrev_lookup): Likewise.
4132 (lto_read_section_offset): Likewise.
4133 (lto_read_comp_unit_header): Likewise.
4134 (lto_read_form): Likewise.
4135 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
4136 (LTO_BEGIN_READ_ATTRS): Likewise.
4137 (LTO_END_READ_ATTRS): Likewise.
4138 (lto_unsupported_attr_error): New function.
4139 (lto_get_identifier): Likewise.
4140 (lto_read_referenced_type_DIE): Likewise.
4141 (lto_read_compile_unit_DIE): Likewise.
4142 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
4143 (lto_read_base_type_DIE): Likewise.
4144 (lto_read_DIE): Likewise.
4145 (lto_read_child_DIEs): Likewise.
4146 (lto_file_read): Read DIEs.
4147 (lto_main): Ask middle end to emit entities.
4148 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
4149 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
4150 (lto_elf_file_close): Likewise.
4151 * lto.h (lto_file): Declare.
4152 (DWARF2_abbrev): Likewise.
4153 (lto_fd): New type.
4154 (lto_abbrev_fd): Likewise.
4155 (lto_file): Use new types.
4156 (lto_file_close): Declare.
4157 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
4158
41592006-06-18 Mark Mitchell <mark@codesourcery.com>
4160
4161 * lto.h: New file.
4162 * lto.c: New file.
4163 * lto-elf.c: New file.
4164 * lto-lang.c (flags.h): Include it.
4165 (lto.h): Likewise.
4166 (lto_init): New function.
4167 (lto_write_globals): Remove.
4168 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
4169 (LANG_HOOKS_INIT): Define.
4170 (LANG_HOOKS_PARSE_FILE): Likewise.
4171 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
4172 (LTO_EXE): Link with libelf.
4173 (lto/lto-lang.o): Update dependencies.
4174 (lto/lto.o): New target.
4175 (lto/lto-elf.o): Likewise.
4176
41772006-06-12 Mark Mitchell <mark@codesourcery.com>
4178
4179 * config-lang.in: New file.
4180 * Make-lang.in: Likewise.
4181 * lto-tree.h: Likewise.
4182 * lto-lang.c: Likewise.
4183