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