]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
f300e7b8
JH
12014-02-05 Jan Hubicka <hubicka@ucw.cz>
2
3 * lto.c (lto_parallelism): New static var.
4 (do_stream_out, wait_for_child, stream_out): New static functions.
5 (lto_wpa_write_files): Add support for parallel streaming.
6 (do_whole_program_analysis): Set parallelism.
7 * lang.opt (fwpa): Add parameter.
8 * lto-lang.c (lto_handle_option): Handle flag_wpa.
9 (lto_init): Update use of flag_wpa.
10 * lto-streamer.h (asm_nodes_output): Declare.
11
f0f91770
RB
122014-02-05 Richard Biener <rguenther@suse.de>
13
14 * lto.h (lto_global_var_decls): Remove.
15 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
16 (lto_write_globals): Do nothing in WPA stage, gather globals from
17 the varpool here ...
18 * lto.c (lto_main): ... not here.
19 (materialize_cgraph): Do not call rest_of_decl_compilation
20 on the empty lto_global_var_decls vector.
21 (lto_global_var_decls): Remove.
22
d665f8dd
JH
232014-02-04 Jan Hubicka <hubicka@ucw.cz>
24
25 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
26 needs duplicating, not generic COMDAT.
27
c39276b8
RB
282014-02-04 Richard Biener <rguenther@suse.de>
29
30 PR lto/59723
31 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
32 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
33
5f876ae7
JH
342014-02-04 Jan Hubicka <hubicka@ucw.cz>
35 Markus Trippelsdorf
36
37 PR ipa/59469
38 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
39 merge force_output and forced_by_abi flags.
40
b72271b9
BI
412014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
42
43 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
44 flag_cilkplus.
45
63124c48
RB
462014-01-09 Richard Biener <rguenther@suse.de>
47
48 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
49
d05b9920
RB
502014-01-09 Richard Biener <rguenther@suse.de>
51
52 PR lto/45586
53 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
54 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
55 (gimple_canonical_types_compatible_p): Do not compare them either.
56
23a5b65a
RS
572014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
58
59 Update copyright years
60
2c8326a5
OE
612013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
62
63 * lto.c: Remove struct tags when referring to class varpool_node.
64 * lto-partition.c: Likewise.
65 * lto-symtab.c: Likewise.
66
e06f9964
JJ
672013-11-29 Jakub Jelinek <jakub@redhat.com>
68 Richard Biener <rguenther@suse.de>
69
70 PR lto/59326
71 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
72
c193f58b
JJ
732013-11-29 Jakub Jelinek <jakub@redhat.com>
74
75 PR lto/59326
76 * lto.c (mentions_vars_p_omp_clause): New function.
77 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
78 after return stmts.
79
2fb9a547
AM
802013-11-22 Andrew MacLeod <amacleod@redhat.com>
81
82 * lto.c: Add required include files from gimple.h.
83 * lto-lang.c: Likewise
84 * lto-object.c: Likewise
85 * lto-partition.c: Likewise
86 * lto-symtab.c: Likewise
87
fec39fa6
TS
882013-11-18 Trevor Saunders <tsaunders@mozilla.com>
89
90 * lto-partition.c lto-symtab.c lto.c Adjust.
91
d8a2d370
DN
922013-11-14 Diego Novillo <dnovillo@google.com>
93
94 * lto-lang.c: Include stringpool.h.
95 Include stor-layout.h.
96 * lto-partition.c: Include gcc-symtab.h.
97 * lto.c: Include stor-layout.h.
98
5e20cdc9
DM
992013-10-31 David Malcolm <dmalcolm@redhat.com>
100
101 Automated part of renaming of symtab_node_base to symtab_node.
102
103 Patch autogenerated by rename_symtab.py from
104 https://github.com/davidmalcolm/gcc-refactoring-scripts
105 revision 58bb219cc090b2f4516a9297d868c245495ee622
106
107 * lto-partition.c (add_symbol_to_partition): Rename
108 symtab_node_base to symtab_node.
109 (get_symbol_class): Likewise.
110 (symbol_partitioned_p): Likewise.
111 (add_references_to_partition): Likewise.
112 (add_symbol_to_partition_1): Likewise.
113 (contained_in_symbol): Likewise.
114 (add_symbol_to_partition): Likewise.
115 (lto_1_to_1_map): Likewise.
116 (lto_max_map): Likewise.
117 (lto_balanced_map): Likewise.
118 (privatize_symbol_name): Likewise.
119 (promote_symbol): Likewise.
120 (may_need_named_section_p): Likewise.
121 (rename_statics): Likewise.
122 (lto_promote_statics_nonwpa): Likewise.
123 * lto-symtab.c (lto_symtab_merge): Likewise.
124 (lto_symtab_resolve_replaceable_p): Likewise.
125 (lto_symtab_symbol_p): Likewise.
126 (lto_symtab_resolve_can_prevail_p): Likewise.
127 (lto_symtab_resolve_symbols): Likewise.
128 (lto_symtab_merge_decls_2): Likewise.
129 (lto_symtab_merge_decls_1): Likewise.
130 (lto_symtab_merge_decls): Likewise.
131 (lto_symtab_merge_symbols_1): Likewise.
132 (lto_symtab_merge_symbols): Likewise.
133 (lto_symtab_prevailing_decl): Likewise.
134 * lto.c (lto_wpa_write_files): Likewise.
135 (read_cgraph_and_symbols): Likewise.
136 (do_whole_program_analysis): Likewise.
137
378cd6b1
DM
1382013-10-30 David Malcolm <dmalcolm@redhat.com>
139
140 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
141 declarations onto multiple lines to make things easier for
142 rename_symtab.py.
143 (lto_symtab_merge_decls_1): Likewise.
144 (lto_symtab_merge_symbols_1): Likewise.
145
939b37da
BI
1462013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
147
148 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
149 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
150 Plus is enabled.
151
67348ccc
DM
1522013-10-29 David Malcolm <dmalcolm@redhat.com>
153
154 Patch autogenerated by refactor_symtab.py from
155 https://github.com/davidmalcolm/gcc-refactoring-scripts
156 revision 58bb219cc090b2f4516a9297d868c245495ee622
157
158 * lto-partition.c (lto_promote_cross_file_statics): Update for
159 conversion of symtab types to a true class hierarchy.
160 (rename_statics): Likewise.
161 (promote_symbol): Likewise.
162 (privatize_symbol_name): Likewise.
163 (lto_balanced_map): Likewise.
164 (varpool_node_cmp): Likewise.
165 (node_cmp): Likewise.
166 (lto_1_to_1_map): Likewise.
167 (undo_partition): Likewise.
168 (add_symbol_to_partition): Likewise.
169 (contained_in_symbol): Likewise.
170 (add_symbol_to_partition_1): Likewise.
171 (add_references_to_partition): Likewise.
172 (symbol_partitioned_p): Likewise.
173 (get_symbol_class): Likewise.
174 (lto_max_map): Likewise.
175 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
176 (lto_symtab_merge_symbols): Likewise.
177 (lto_symtab_merge_symbols_1): Likewise.
178 (lto_symtab_merge_decls): Likewise.
179 (lto_symtab_merge_decls_1): Likewise.
180 (lto_symtab_merge_decls_2): Likewise.
181 (lto_symtab_resolve_symbols): Likewise.
182 (lto_symtab_resolve_can_prevail_p): Likewise.
183 (lto_symtab_symbol_p): Likewise.
184 (lto_symtab_resolve_replaceable_p): Likewise.
185 (lto_symtab_merge): Likewise.
186 (lto_varpool_replace_node): Likewise.
187 (lto_cgraph_replace_node): Likewise.
188 * lto.c (lto_main): Likewise.
189 (do_whole_program_analysis): Likewise.
190 (materialize_cgraph): Likewise.
191 (read_cgraph_and_symbols): Likewise.
192 (cmp_partitions_order): Likewise.
193 (lto_materialize_function): Likewise.
194 (has_analyzed_clone_p): Likewise.
195
8e9055ae
AM
1962013-10-29 Andrew MacLeod <amacleod@redhat.com>
197
198 * lto/lto-object.c: Add gimple.h to include list.
199 * lto/lto-partition.c: Likewise.
200
377d9792
AM
2012013-10-18 Andrew MacLeod <amacleod@redhat.com>
202
203 * lto.c: Remove tree-flow.h from include list.
204
fffda8d7
RB
2052013-10-15 Richard Biener <rguenther@suse.de>
206
207 * lto.c (hash_canonical_type): Split out from ...
208 (iterative_hash_canonical_type): ... here. Register types
209 we recurse to.
210 (gimple_canonical_type_hash): Adjust.
211 (gimple_register_canonical_type_1): Split out from ...
212 (gimple_register_canonical_type): ... here. Cache computed
213 hash value.
214 (lto_register_canonical_types): Split into two modes,
215 clearing and computing TYPE_CANONICAL.
216 (lto_read_decls): Adjust.
217 (read_cgraph_and_symbols): Do two passes over global trees,
218 first clearing then computing TYPE_CANONICAL.
219
1394237e
RB
2202013-10-14 Richard Biener <rguenther@suse.de>
221
222 * lto.c (gimple_canonical_types): Move out-of GC space.
223 (canonical_type_hash_cache): Make a pointer-map.
224 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
225 New counters.
226 (iterative_hash_canonical_type): Adjust.
227 (read_cgraph_and_symbols): Likewise.
228 (print_lto_report_1): Likewise.
229
0a387eca
RB
2302013-10-14 Richard Biener <rguenther@suse.de>
231
232 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
233 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
234 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
235 gimple_types_compatible_p_1, gimple_types_compatible_p,
236 visit, iterative_hash_name, struct type_hash_pair,
237 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
238 gimple_type_eq, gimple_register_type, num_not_merged_types,
239 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
240 num_not_merged_types_in_same_scc_trees): Remove old merging code
241 and statistics.
242 (lto_read_decls): Do not run old merging code in parallel.
243 (read_cgraph_and_symbols): Do not init/free old merging
244 data structures.
245 (print_lto_report_1): Do not report differences of old vs. new
246 merging code.
247
83fd5d11
RB
2482013-10-14 Richard Biener <rguenther@suse.de>
249
250 * lto-lang.c (lto_init): Do not re-init canonical types here.
251 (lto_register_canonical_types): Move to ...
252 * lto.c (lto_register_canonical_types): ... here.
253 (gimple_canonical_types, canonical_type_hash_cache,
254 iterative_hash_canonical_type, gimple_canonical_type_hash,
255 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
256 gimple_register_canonical_type): Add canonical type merging machinery
257 moved from gimple.c.
258 (read_cgraph_and_symbols): Init and free canonical type tables
259 here.
260 (print_lto_report_1): Report canonical type table stats here.
261
acf0174b
JJ
2622013-10-11 Jakub Jelinek <jakub@redhat.com>
263
264 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
265
7c6fedd2
TT
2662013-09-25 Tom Tromey <tromey@redhat.com>
267
268 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
269 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
270 (lto/lto-object.o): Remove.
271
35f32ad4
RB
2722013-09-06 Richard Biener <rguenther@suse.de>
273
274 * lto-symtab.c: Move from gcc/
275 * lto.h: Include vec.h.
276 (lto_global_var_decls): Declare.
277 * lto.c (lto_global_var_decls): Move definition here.
278 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
279 (lto-symtab.o): Add.
280 * config-lang.in (gtfiles): Add lto.h.
281
49322b12
JH
2822013-08-31 Jan Hubicka <jh@suse.cz>
283
284 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
285 DECL_FIELD_OFFSET can contain an reference to variable.
286
31f1f73b
JH
2872013-08-31 Jan Hubicka <jh@suse.cz>
288
289 * lto.c (tree_with_vars): Turn into vector.
290 (MAYBE_REMEMBER_WITH_VARS): Change to...
291 (CHECK_VAR): ... this one.
292 (CHECK_NO_VAR): New macro.
293 (maybe_remember_with_vars_typed): Turn to ...
294 (mentions_vars_p_typed): ... this one.
295 (maybe_remember_with_vars_common): Turn to ...
296 (mentions_vars_p_comon): ... this one.
297 (maybe_remember_with_vars_decl_minimal): Turn to ...
298 (mentions_vars_p_decl_minmal): ... this one.
299 (maybe_remember_with_vars_decl_common): Turn to ...
300 (mentions_vars_p_decl_common): ... this one.
301 (maybe_remember_with_vars_decl_with_vis): Turn to ...
302 (mentions_vars_p_decl_with_vis): ... this one.
303 (maybe_remember_with_vars_decl_non_common): Turn to ...
304 (mentions_vars_p_decl_non_common): ... this one.
305 (maybe_remember_with_vars_function): Turn to ...
306 (mentions_vars_p_function): ... this one.
307 (maybe_remember_with_vars_field_decl): Turn to ...
308 (mentions_vars_p_field_decl): ... this one.
309 (maybe_remember_with_vars_type): Turn to ...
310 (mentions_vars_p_type): ... this one.
311 (maybe_remember_with_vars_binfo): Turn to ...
312 (mentions_vars_p_binfo): ... this one.
313 (maybe_remember_with_vars_constructor): Turn to ...
314 (mentions_vars_p_constructor): ... this one.
315 (maybe_remember_with_vars_expr): Turn to ...
316 (mentions_vars_p_expr): ... this one.
317 (maybe_remember_with_vars): Turn to ...
318 (mentions_vars_p): ... this one.
319 (lto_read_decls): Update.
320 (LTO_SET_PREVAIL): Do not call function for internal decls.
321 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
322 check that something was updated.
323 (lto_fixup_state): Do not care about internal decls.
324 (lto_fixup_decls): Update.
325 (read_cgraph_and_symbols): Update.
326
256eefa9
JH
3272013-08-29 Jan Hubicka <jh@suse.cz>
328
329 * lto.c (read_cgraph_and_symbols): Free decl states.
330
0170f33c
JH
3312013-08-29 Jan Hubicka <jh@suse.cz>
332
333 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
334 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
335 TYPE_FINAL_P.
336
c01c111b
JH
3372013-08-28 Jan Hubicka <jh@suse.cz>
338
339 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
340 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
341 (unify_scc): Do checking assert.
342
6a49f3c9
JH
3432013-08-06 Jan Hubicka <jh@suse.cz>
344 Martin Liska <marxin.liska@gmail.com>
345
346 * lto-partition.c (lto_balanced_map): Always base order on
347 source file order.
348
a2e2a668
JH
3492013-08-06 Jan Hubicka <jh@suse.cz>
350
351 * lto.c (lto_materialize_function): Do not read body anymore.
352
815effe1
JH
3532013-08-02 Jan Hubicka <jh@suse.cz>
354
355 * lto.c (lto_materialize_function): Do not push struct function.
356 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
357 (may_need_named_section_p): Even abstract origins may need
358 named section.
359
315f8c0e
DM
3602013-07-30 David Malcolm <dmalcolm@redhat.com>
361
362 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
363 PASS_MANAGER_H.
364
365 * lto.c (do_whole_program_analysis): Update for move of
366 all_regular_ipa_passes from a global to a field of class
367 pass_manager.
368
1aa95df7
OB
3692013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
370
371 * lto-partition.c: Fix typos.
372
c525ba9a
JH
3732013-06-20 Jan Hubicka <jh@suse.cz>
374
375 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
376 partitioning of variables.
377
7a89ad00
JH
3782013-06-20 Jan Hubicka <jh@suse.cz>
379
380 * lto.c (read_cgraph_and_symbols): Set cgraph state.
381
6a6dac52
JH
3822013-06-19 Jan Hubicka <jh@suse.cz>
383
384 * lto-partition.c (add_references_to_partition): Use
385 ctor_for_folding.
386
ac0511f2
RB
3872013-06-18 Richard Biener <rguenther@suse.de>
388
389 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
390 and use it.
391 (lto_register_function_decl_in_symtab): Likewise.
392 (cmp_tree): New function.
393 (unify_scc): Instead of using the streamer cache map from entry
394 to cache index match up the two maps we have by sorting them.
395 Adjust calls to lto_register_var_decl_in_symtab and
396 lto_register_function_decl_in_symtab.
397
ee03e71d
RB
3982013-06-17 Richard Biener <rguenther@suse.de>
399
400 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
401 * lto.c: Include data-streamer.h.
402 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
403 (gimple_type_leader_entry_s, gimple_type_leader,
404 gimple_lookup_type_leader): Remove.
405 (gtc_visit): Simplify.
406 (gimple_types_compatible_p): Likewise.
407 (gimple_register_type_1): Likewise. Merge into ...
408 (gimple_register_type): ... this. Keep it as legacy for
409 statistics purposes for now.
410 (fixup_integer_cst): Remove.
411 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
412 rename to ...
413 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
414 maybe_remember_with_vars_*): ... these.
415 (uniquify_nodes): Remove.
416 (lto_fixup_prevailing_type): New function.
417 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
418 (tree_scc_hash, tree_scc_hash_obstack): New globals.
419 (num_merged_types, num_prevailing_types, num_not_merged_types,
420 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
421 total_scc_size_merged, num_sccs_merged, num_scc_compares,
422 num_scc_compare_collisions): New global counters.
423 (compare_tree_sccs_1): New function.
424 (compare_tree_sccs): Likewise.
425 (unify_scc): Likewise.
426 (lto_read_decls): Stream in tree SCCs and unify them on the
427 way in. Finalize prevailing SCC tree members.
428 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
429 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
430 to ggc-collect during merging.
431 (print_lto_report_1): Adjust for new merging code.
432
ca0f62a8
JH
4332013-06-12 Jan Hubicka <jh@suse.cz>
434
435 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
436
bbf9ad07
JH
4372013-06-12 Jan Hubicka <jh@suse.cz>
438
439 * lto.c (register_resolution): Take lto_file_data argument.
440 (lto_register_var_decl_in_symtab,
441 lto_register_function_decl_in_symtab): Update.
442 (read_cgraph_and_symbols): Update resolution_map handling.
443
ecdbd01a 4442013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
445
446 * lto-partition.c (get_symbol_class): Simplify weakref handling.
447 (add_symbol_to_partition_1): Likewise.
448 (contained_in_symbol): Likewise.
449 (lto_balanced_map): Likewise.
450 (rename_statics): Drop weakref.
451
a367df53
RB
4522013-06-05 Richard Biener <rguenther@suse.de>
453
454 * lto.c (num_merged_types): New global variable.
455 (uniquify_nodes): Increase num_merged_types when merging a type.
456 (print_lto_report_1): Output the number of merged types.
457
40a7fe1e
JH
4582013-06-01 Jan Hubicka <jh@suse.cz>
459
460 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
461 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
462 (do_whole_program_analysis): Update dumping.
463
e70670cf
JH
4642013-05-29 Jan Hubicka <jh@suse.cz>
465
466 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
467 flags.
468 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
469
8ee05051
JH
4702013-05-15 Jan Hubicka <jh@suse.cz>
471
472 * lto-partition.c (privatize_symbol_name): Return true when
473 privatizing happened.
474 (rename_statics): Do not go into infinite loop when privatizing
475 is not needed.
476
427b248d
JM
4772013-05-16 Jason Merrill <jason@redhat.com>
478
479 * Make-lang.in ($(LTO_EXE)): Use link mutex.
480
9de04252
MJ
4812013-05-15 Martin Jambor <mjambor@suse.cz>
482
483 * lto-partition.c (lto_balanced_map): Print symbol order instead
484 of node uids.
485
2d6e4603
JH
4862013-05-15 Jan Hubicka <jh@suse.cz>
487
488 PR lto/57038
489 PR lto/47375
490 * lto-partition.c (get_symbol_class): Fix weakrefs.
491 (lto_balanced_map): Fix weakrefs.
492 (privatize_symbol_name): Remove unnecesary label.
493 (rename_statics): Handle weakrefs as statics.
494
64cfa6c0
JH
4952013-05-09 Jan Hubicka <jh@suse.cz>
496 Richard Biener <rguenther@suse.de>
497
498 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
499 (lto_register_var_decl_in_symtab): Likewise.
500 (lto_main): Promote statics.
501 * lto-partition.c (privatize_symbol_name): New function.
502 (promote_symbol): Use it.
503 (may_need_named_section_p): New predicate.
504 (rename_statics): New functions.
505 (lto_promote_cross_file_statics): Simplify; do renaming.
506 (lto_promote_statics_nonwpa): New function.
507 * lto-partition.h (lto_promote_statics_nonwpa): New function.
508
e45cde98
RB
5092013-02-08 Richard Biener <rguenther@suse.de>
510
511 PR lto/56231
512 * lto-lang.c (lto_init): Do not enter a dummy file.
513
6edc3e32
UB
5142013-02-07 Uros Bizjak <ubizjak@gmail.com>
515
516 PR bootstrap/56227
517 * lto.c (lto_resolution_ready): Use %wx instead of
518 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
519
ed73881e
RG
5202013-02-04 Richard Guenther <rguenther@suse.de>
521
522 PR lto/56168
523 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
524 or lto_fixup_decls at LTRANS time.
525
a19b1432
JH
5262013-01-09 Jan Hubicka <jh@suse.cz>
527
528 PR lto/45375
529 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
530
49c01f87
L
5312012-12-10 H.J. Lu <hongjiu.lu@intel.com>
532
533 PR lto/55466
534 * lto.c (lto_register_var_decl_in_symtab): Don't record static
535 variables.
536 (lto_main): Record the global variables if WPA isn't enabled.
537
6e1aa848
DN
5382012-11-20 Diego Novillo <dnovillo@google.com>
539 Jakub Jelinek <jakub@redhat.com>
540
541 * lto.c: Replace all vec<T, A>() initializers with vNULL.
542
9771b263
DN
5432012-11-16 Diego Novillo <dnovillo@google.com>
544
545 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
546
547 * lto-lang.c: Use new vec API in vec.h.
548 * lto-partition.c: Likewise.
549 * lto-partition.h: Likewise.
550 * lto.c: Likewise.
551
24551b9c
LC
5522012-10-31 Lawrence Crowl <crowl@google.com>
553
554 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
555 down-cast via dyn_cast.
556 * lto-partition.c (add_symbol_to_partition_1): Likewise.
557 (undo_partition): Likewise.
558 (lto_balanced_map): Likewise.
559 (get_symbol_class): Likewise and via is_a.
560 (lto_balanced_map): Change symtab checking to is_a.
561
aec06f6f
RB
5622012-10-12 Richard Biener <rguenther@suse.de>
563
564 PR lto/54898
565 * lto.c (gimple_types_compatible_p_1): Also compare
566 TYPE_MAIN_VARIANT.
567 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
568
0b8c30f9
TB
5692012-10-09 Tobias Burnus <burnus@net-b.de>
570
571 * lto-lang.c (lto_register_builtin_type): Avoid useless
572 decl creation.
573 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
574
da3202a8
TB
5752012-10-08 Tobias Burnus <burnus@net-b.de>
576
577 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
578 Free lto_file struct after closing the file.
579
2512a443
JH
5802012-10-08 Jan Hubicka <jh@suse.cz>
581
582 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
583 (fixup_integer_cst): New functoin.
584 (lto_ft_type): Fixup BASETYPE of methods and offsets.
585
e75f8f79
JH
5862012-10-07 Jan Hubicka <jh@suse.cz>
587
588 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
589 release input encoders.
590 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
591
46591697
JH
5922012-10-06 Jan Hubicka <jh@suse.cz>
593
594 PR lto/54790
595 * lto.c (resolution_map): New static var.
596 (register_resolution): New function.
597 (lto_register_var_decl_in_symtab): Use it.
598 (read_cgraph_and_symbols): Copy resolutions into the symtab.
599
af16bc76
MJ
6002012-09-20 Martin Jambor <mjambor@suse.cz>
601
602 * lto.c (lto_materialize_function): Call push_struct_function and
603 pop_cfun.
604
5368224f
DC
6052012-09-19 Dehao Chen <dehao@google.com>
606
607 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
608
b5493fb2
JH
6092012-09-19 Jan Hubicka <jh@suse.cz>
610
611 * lto.c (lto_materialize_function): Update confused comment.
612 (read_cgraph_and_symbols): Do not free symtab.
613
c3c445e1
JH
6142012-09-12 Jan Hubicka <jh@suse.cz>
615
616 * lto.c (do_whole_program_analysis): Care timevars, statistics and
617 AUX pointer cleaning. Add max partitioning.
618 * lto-partition.c (enum symbol_class): New.
619 (get_symbol_class): New function.
620 (symbol_partitioned_p): New function.
621 (add_references_to_partition): Remove.
622 (add_aliases_to_partition): Remove.
623 (add_cgraph_node_to_partition_1): Remove.
624 (add_cgraph_node_to_partition): Remove.
625 (add_symbol_to_partition): New function.
626 (add_symbol_to_partition_1): New function.
627 (contained_in_symbol): New function.
628 (partition_cgraph_node_p): Remove.
629 (partition_varpool_node_p): Remove.
630 (partition_symbol_p): Remove.
631 (lto_1_to_1_map): Cleanup.
632 (lto_max_map): New.
633 (lto_balanced_map): Update.
634 (lto_promote_cross_file_statics): Update.
635 * lto-partition.h (lto_max_map): Declare.
636 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
637
b5c7cdfb
JH
6382012-09-11 Jan Hubicka <jh@suse.cz>
639
640 PR lto/54312
641 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
642 type is variant leader.
643
b29402f0
RG
6442012-09-11 Richard Guenther <rguenther@suse.de>
645
646 * lto.c (enum gtc_mode): Remove.
647 (struct type_pair_d): Adjust.
648 (lookup_type_pair): Likewise.
649 (gimple_type_leader): Do not mark as deletable.
650 (gimple_lookup_type_leader): Adjust.
651 (gtc_visit): Likewise.
652 (gimple_types_compatible_p_1): Likewise.
653 (gimple_types_compatible_p): Likewise.
654 (gimple_type_hash): Likewise.
655 (gimple_register_type): Likewise.
656 (read_cgraph_and_symbols): Manage lifetime of tables
657 here.
658
b8f4e58f
RG
6592012-09-11 Richard Guenther <rguenther@suse.de>
660
661 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
662 struct type_pair_d, lookup_type_pair, struct sccs,
663 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
664 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
665 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
666 visit, iterative_hash_name, struct type_hash_pair,
667 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
668 gimple_type_eq, gimple_register_type_1, gimple_register_type):
669 Move here from gimple.c
670 (read_cgraph_and_symbols): Free hash tables here.
671 (print_lto_report_1): New function wrapping print_lto_report.
672 (do_whole_program_analysis): Call it.
673 (lto_main): Likewise.
674
1cdbb3f9
JH
6752012-09-10 Jan Hubicka <jh@suse.cz>
676
677 * lto-partition.c (partition_symbol_p): Forward declare.
678 (add_references_to_partition): Reimplement using partition_symbol_p.
679 (add_aliases_to_partition): Break out from add_references_to_partition;
680 reimplement using partition_symbol_p.
681 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
682 add sanity checks.
683 (add_varpool_node_to_partition): Use add_aliases_to_partition.
684 (partition_varpool_node_p): Do not special case aliases.
685
b4661bfe
JH
6862012-08-12 Jan Hubicka <jh@suse.cz>
687
688 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
689 it is deleted after streaming.
690 * lto-partition.c (partition_symbol_p): New function.
691 (promote_var, promote_fn): Remove.
692 (promote_symbol): New function.
693 (lto_promote_cross_file_statics): First compute boundaries; rewrite
694 to lookup the actual boundaries instead of computing them ad-hoc.
695
7b99cca4
JH
6962012-08-12 Jan Hubicka <jh@suse.cz>
697
698 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
699 in partitioning.
700 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
701 by encoder.
702 * lto-partition.c (new_partition): Update.
703 * lto.c (cmp_partitions_order): Update.
704 (lto_wpa_write_files): Update.
705 (free_ltrans_partitions): Update.
706 (add_references_to_partition): Update.
707 (add_cgraph_node_to_partition_1): Update.
708 (add_cgraph_node_to_partition): Update.
709 (add_varpool_node_to_partition): Update.
710 (undo_partition): Update.
711 (lto_balanced_map): Update.
712 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
713 set_referenced_from_this_partition_p): Update.
714 (lto_promote_cross_file_statics): Update.
715
f27c1867
JH
7162012-08-12 Jan Hubicka <jh@suse.cz>
717
718 * lto-partition.c (set_referenced_from_other_partition_p,
719 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
720 New functions.
721 (lto_promote_cross_file_statics): Use them.
722
ab96cc5b
JH
7232012-07-24 Jan Hubicka <jh@suse.cz>
724
725 * lto.c (read_cgraph_and_symbols): Use input_symtab.
726
0229aee9
UB
7272012-07-24 Uros Bizjak <ubizjak@gmail.com>
728
729 * lto-tree.h (lang_decl): Add variable_size GTY option.
730
7ee2468b
SB
7312012-07-16 Steven Bosscher <steven@gcc.gnu.org>
732
733 * lto.c: Do not include timevar.h.
734 * Make-lang.in: Fix dependencies.
735
a910399d
LC
7362012-06-18 Lawrence Crowl <crowl@google.com>
737
738 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
739 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
740 to lto_wpa_write_files.
741 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
742 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
743 TV_PHASE_SETUP for the call to lto_init. Use new timevar
744 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
745 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
746 to be a front end, but is not one.
747
877ab5e9
JH
7482012-05-18 Jan Hubicka <jh@suse.cz>
749
750 * lto.c (lto_materialize_constructors_and_inits): Remove.
751 (read_cgraph_and_symbols): Remove handling of alias pairs.
752
6649df51
JH
7532012-05-17 Jan Hubicka <jh@suse.cz>
754
755 * lto-partition.c (add_references_to_partition): Handle external vars.
756 (partition_varpool_node_p): Likewise.
757 (lto_promote_cross_file_statics): Do not promote externals.
758
d1ede5f4
BS
7592012-05-14 Bernd Schmidt <bernds@codesourcery.com>
760
761 * lto-lang.c (handle_fnspec_attribute): New static function.
762 (lto_attribute_table): Add "fn spec".
763 (DEF_ATTR_STRING): Define and undefine along with the other macros.
764
0d6bf48c
JH
7652012-05-04 Jan Hubicka <jh@suse.cz>
766
767 * lto.c (do_whole_program_analysis): Set timevars correctly.
768 (lto_main): Likewise.
d1ede5f4 769
1d67dde8
RB
7702012-05-04 Richard Guenther <rguenther@suse.de>
771
772 * lang.opt (fwpa): Do not mark as Optimization.
773 (fltrans): Likewise.
774
65d630d4
JH
7752012-04-30 Jan Hubicka <jh@suse.cz>
776
777 * lto.c (lto_main): Use compile ().
1d67dde8
RB
778 * lto-partition.c (partition_cgraph_node_p): Use
779 symtab_used_from_object_file_p.
65d630d4
JH
780 (partition_varpool_node_p): Likewise.
781
ead84f73
JH
7822012-04-20 Jan Hubicka <jh@suse.cz>
783
784 * lto-partition.c (partition_cgraph_node_p): Use force_output.
785
5932a4d4
JH
7862012-04-18 Jan Hubicka <jh@suse.cz>
787
788 * lto-partition.c (add_references_to_partition, lto_balanced_map):
789 Update for new ipa-ref API.
790
65c70e6b
JH
7912012-04-16 Jan Hubicka <jh@suse.cz>
792
793 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
794 walkers to walk cgraph and varpool.
795 (materialize_cgraph): Likewise.
796 * lto-partition.c (lto_1_to_1_map): Likewise.
797 (lto_balanced_map): Likewise.
798 (lto_promote_cross_file_statics): Likewise.
799
960bfb69
JH
8002012-04-14 Jan Hubicka <jh@suse.cz>
801
802 * lto.c: Update field referenced for new cgraph/varpool layout.
803 * lto-partition.c: Likewise.
804
a66dc285
JH
8052012-04-11 Jan Hubicka <jh@suse.cz>
806
807 * lto.c: Update copyright; remove params.h, ipa-inline.h
808 and ipa-utils.h inlines; inline lto-partition.h
809 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
810 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
811 add_references_to_partition, add_cgraph_node_to_partition_1,
812 add_cgraph_node_to_partition, add_varpool_node_to_partition,
813 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
814 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
815 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
816 * lto-partition.c: ... here; new file.
817 * lto-partition.h: New file.
818 * Make-lang.in (lto.o): Update dependencies.
819 (lto-partition.o): New.
820
f3b249e5
RG
8212012-04-05 Richard Guenther <rguenther@suse.de>
822
823 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
824 definition.
825
21fa2faf
RG
8262012-03-12 Richard Guenther <rguenther@suse.de>
827
828 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
829
6bb485a3
RG
8302012-03-06 Richard Guenther <rguenther@suse.de>
831
832 PR lto/52097
833 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
834
95510497
RG
8352012-02-28 Richard Guenther <rguenther@suse.de>
836
837 PR lto/52400
838 * lto.c (lto_register_function_decl_in_symtab): Do not register
839 a reverse renamed decl mapping.
840
09228fef
JJ
8412012-01-06 Jakub Jelinek <jakub@redhat.com>
842
843 PR lto/51774
844 * lto-lang.c (handle_returns_twice_attribute): New function.
845 (lto_attribute_table): Add returns_twice attribute.
846
b03eda0d
RG
8472011-12-21 Richard Guenther <rguenther@suse.de>
848
849 * lto.c (GIMPLE_REGISTER_TYPE): New define.
850 (LTO_FIXUP_TREE): Use it.
851 (uniquify_nodes): Mark new non-prevailing types and avoid
852 calling gimple_register_type on others.
853 (lto_read_decls): Add comment.
854
4ad9a9de
EB
8552011-12-13 Eric Botcazou <ebotcazou@adacore.com>
856
857 * lto.h (lto_parse_hex): Delete.
858 * lto.c (lto_read_decls): Use 'int' for offsets.
859 (lto_parse_hex): Make static and return proper 64-bit host type.
860 (lto_resolution_read): Use proper 64-bit host type.
861
ea973bad
RG
8622011-12-13 Richard Guenther <rguenther@suse.de>
863
864 PR lto/48354
865 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
866 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
867
c8218030
UB
8682011-12-01 Uros Bizjak <ubizjak@gmail.com>
869
870 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
871 (ignore_attribute): New.
872
57ac2606
AH
8732011-11-21 Aldy Hernandez <aldyh@redhat.com>
874
875 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
876 (handle_transaction_pure_attribute): New.
877
52a35ef7
RG
8782011-11-03 Richard Guenther <rguenther@suse.de>
879
880 PR lto/44965
881 * lto-lang.c (lto_post_options): Do not read file options.
882 * lto.c (lto_read_all_file_options): Remove.
883 (lto_init): Call lto_set_in_hooks here.
884
51973b1e
JH
8852011-10-09 Jan Hubicka <jh@suse.cz>
886
887 * lto.c (node_cmp, varpool_node_cmp): New functions.
888 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
889 (cmp_partitions): Rename to ...
890 (cmp_partitions_size): ... this one.
891 (cmp_partitions_order): New function.
892 (lto_wpa_write_files): Sort partitions by order when
893 -fno-toplevel-reorder is used.
894
5958009b
AK
8952011-10-09 Andi Kleen <ak@linux.intel.com>
896
897 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
898
e79983f4
MM
8992011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
900
901 * lto-lang.c (def_builtin_1): Delete old interface with two
902 parallel arrays to hold standard builtin declarations, and replace
903 it with a function based interface that can support creating
904 builtins on the fly in the future. Change all uses, and poison
905 the old names. Make sure 0 is not a legitimate builtin index.
906
ecdbd01a 9072011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
908
909 * lto-object.c (lto_obj_add_section_data): Add list.
910 (lto_obj_add_section): Fill in list.
911 (ltoobj_build_section_table): Pass through list.
912 * lto.c (file_data_list): Declare.
913 (create_subid_section_table): Pass arguments directly.
914 Fill in list of file_datas.
915 (lwstate): Delete.
916 (lto_create_files_from_ids): Pass in direct arguments.
917 Don't maintain list.
918 (lto_file_read): Use explicit section and file data lists.
919 (lto_read_all_file_options): Pass in section_list.
920 * lto.h (lto_obj_build_section_table): Add list.
921 (lto_section_slot): Add next.
922 (lto_section_list): Declare.
923
ed0d2da0
JH
9242011-10-02 Jan Hubicka <jh@suse.cz>
925
926 PR lto/47247
927 * common.c (lto_resolution_str): Add new resolution.
928 * common.h (lto_resolution_str): Likewise.
929
ad7715f3
L
9302011-09-30 H.J. Lu <hongjiu.lu@intel.com>
931 Andi Kleen <ak@linux.intel.com>
932
933 PR lto/50568
934 * lto.c (lto_splay_tree_delete_id): New.
935 (lto_splay_tree_compare_ids): Likewise.
936 (lto_splay_tree_lookup): Likewise.
937 (lto_splay_tree_id_equal_p): Likewise.
938 (lto_splay_tree_insert): Likewise.
939 (lto_splay_tree_new): Likewise.
940 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
941 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
942 (create_subid_section_table): Use lto_splay_tree_lookup and
943 lto_splay_tree_insert.
944 (lto_file_read): Use lto_splay_tree_new.
945
ecdbd01a 9462011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
947
948 * lto.c (lto_resolution_read): Remove id dumping.
949 (lto_section_with_id): Turn id HOST_WIDE_ID.
950 (create_subid_section_table): Dito.
951
892a371f
DS
9522011-08-28 Dodji Seketeli <dodji@redhat.com>
953
954 * lto-lang.c (lto_init): Likewise. Also, avoid calling
955 linemap_add twice.
956
f82d1a94
MJ
9572011-08-11 Martin Jambor <mjambor@suse.cz>
958
959 * lto.c (uniquify_nodes): Use main variant's BINFO too.
960
f0efc7aa
DN
9612011-08-08 Diego Novillo <dnovillo@google.com>
962
963 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
964 * lto.c: Include tree-streamer.h.
965
1a072294
RG
9662011-07-06 Richard Guenther <rguenther@suse.de>
967
968 * lto-lang.c (lto_init):
969 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
970
7496868d
JH
9712011-06-11 Jan Hubicka <jh@suse.cz>
972
10f13f22 973 PR lto/48246
7496868d
JH
974 * lto.c (lto_1_to_1_map): Don't create empty partitions.
975 (lto_balanced_map): Likewise.
976
39e2db00
JH
9772011-06-11 Jan Hubicka <jh@suse.cz>
978
979 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
980 (add_cgraph_node_to_partition) ... here; walk aliases.
981 (lto_1_to_1_map): Remove same body alias code.
982 (promote_fn): Likewise.
983 (lto_promote_cross_file_statics): Update comment.
984
985
28628ea6
DN
9862011-06-07 Diego Novillo <dnovillo@google.com>
987
988 * lto.c (uniquify_nodes): Move code to register decls to
989 the loop that computes canonical types.
990
009db074
RG
9912011-06-07 Richard Guenther <rguenther@suse.de>
992
993 * lto-lang.c (lto_init): Do not set
994 size_type_node or call set_sizetype.
995
47c79d56
DN
9962011-06-04 Diego Novillo <dnovillo@google.com>
997
998 * lto.c (lto_init): New.
999 (lto_main): Call it.
1000
d5828cc7
DN
10012011-06-03 Diego Novillo <dnovillo@google.com>
1002
1003 * lto.c (get_resolution): Move from lto-streamer-in.c.
1004 (lto_register_var_decl_in_symtab): Likewise.
1005 (lto_register_function_decl_in_symtab): Likewise.
1006 (uniquify_nodes): Call lto_register_var_decl and
1007 lto_register_function_decl_in_symtab after reading a new
1008 VAR_DECL or FUNCTION_DECL.
1009
6807da97
RG
10102011-06-01 Richard Guenther <rguenther@suse.de>
1011
1012 * lto-lang.c (lto_register_canonical_types): New function.
1013 (lto_init): Register common nodes with the canonical type machinery.
1014 Do not play tricks with char_type_node.
1015
d74be317
RG
10162011-05-26 Richard Guenther <rguenther@suse.de>
1017
1018 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1019
d9f8303f
NF
10202011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1021
1022 * lto.c (lto_ft_typed): New function.
1023 (lto_ft_common): Call it.
1024 (lto_ft_constructor): Likewise.
1025 (lto_ft_expr): Likewise.
1026 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1027 TREE_CHAIN.
1028
fb291a1e
RG
10292011-05-20 Richard Guenther <rguenther@suse.de>
1030
1031 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1032 (lto_ft_type): Move main-variant and pointer-to chain building ...
1033 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1034 in a separate final loop.
1035
31b3ca64
RG
10362011-05-19 Richard Guenther <rguenther@suse.de>
1037
1038 * lto.c (uniquify_nodes): First register all types before
1039 fixing up the tree SCC.
1040
35d828c5
JH
10412011-05-11 Jan Hubicka <jh@suse.cz>
1042
1043 PR lto/48952
1044 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1045
51545682
NF
10462011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1047
1048 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1049 location of binfo field.
1050 (lto_fixup_prevailing_decls): Likewise.
1051
8242dd04
NF
10522011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1053
1054 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1055 build_function_type_array or build_varargs_function_type_array
1056 instead.
1057
c99c0026
EB
10582011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1059
1060 * lto-lang.c (global_bindings_p): Return bool.
1061
c47d0034
JH
10622011-05-07 Jan Hubicka <jh@suse.cz>
1063
a9bcb3f0
EB
1064 * lto.c (lto_materialize_function): Use
1065 cgraph_function_with_gimple_body_p.
1066 (add_cgraph_node_to_partition): Do not re-add items to partition;
1067 handle thunks.
c47d0034
JH
1068 (add_varpool_node_to_partition): Do not re-add items to partition.
1069
bb3398ca
JH
10702011-05-03 Jan Hubicka <jh@suse.cz>
1071
1072 * lto.c (free_ltrans_partitions): Fix accidental commit.
1073
1cb1a99f
JH
10742011-05-03 Jan Hubicka <jh@suse.cz>
1075
1076 * lto.c (ltrans_partition_def): Remove GTY annotations.
1077 (ltrans_partitions): Move to heap.
1078 (new_partition): Update.
1079 (free_ltrans_partitions): New function.
1080 (lto_wpa_write_files): Use it.
1081
af8bca3c
MJ
10822011-04-29 Martin Jambor <mjambor@suse.cz>
1083
1084 * lto.c: Include ipa-utils.h.
1085 (lto_balanced_map): Update call to ipa_reverse_postorder.
1086 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1087
b823cdfe
MM
10882011-04-29 Michael Matz <matz@suse.de>
1089
1090 * lto.c (toplevel): Include tree-flow.h.
1091 (lto_read_in_decl_state): Don't merge types here.
1092 (tree_with_vars): New static hash table.
1093 (remember_with_vars): New static functions.
1094 (LTO_FIXUP_TYPE): New macro.
1095 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1096 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1097 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1098 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1099 (lto_read_decls): Uniquify while reading in trees.
1100 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1101 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1102 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1103 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1104 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1105 lto_fixup_tree): Remove.
1106 (lto_fixup_state): Remove data argument. Use
1107 lto_symtab_prevailing_decl.
1108 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1109 (lto_fixup_prevailing_decls): New function.
1110 (lto_fixup_state_aux): Argument aux is unused.
1111 (lto_fixup_decls): Don't allocate pointer sets, don't use
1112 lto_fixup_tree, use lto_fixup_prevailing_decls.
1113 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1114 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1115
b9843260
EB
11162011-04-16 Eric Botcazou <ebotcazou@adacore.com>
1117
1118 * lto.c (lto_balanced_map): Fix typos in head comment.
1119 (lto_promote_cross_file_statics): Fix long lines and remove redundant
1120 test.
1121
e7f23018
JH
11222011-04-16 Jan Hubicka <jh@suse.cz>
1123
1124 * lto.c (lto_balanced_map): Update.
1125
10a5dd5d
JH
11262011-04-14 Jan Hubicka <jh@suse.cz>
1127
1128 * lto.c: Include ipa-inline.h
b9843260
EB
1129 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
1130 accessor.
10a5dd5d
JH
1131 (ipa_node_duplication_hook): Fix declaration.
1132 * Make-lang.in (lto.o): Update dependencies.
1133
81f653d6
NF
11342011-04-12 Nathan Froyd <froydnj@codesourcery.com>
1135
1136 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
1137 calling TREE_CHAIN.
1138 * lto.c (lto_fixup_common): Likewise.
1139
dcf0c47e
NF
11402011-04-08 Nathan Froyd <froydnj@codesourcery.com>
1141
1142 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
1143 (handle_type_generic_attribute): Likewise.
1144
e89964e3
MM
11452011-04-03 Michael Matz <matz@suse.de>
1146
1147 * lto.c (lto_materialize_function): Don't read and then discard
1148 sections in WPA mode.
1149 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
1150
1151 * lto-lang.c (registered_builtin_fndecls): Remove.
1152 (lto_getdecls): Return NULL_TREE.
1153 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
1154
d2b3fe18
RG
11552011-03-31 Richard Guenther <rguenther@suse.de>
1156
1157 PR lto/48246
1158 * lto.c (lto_wpa_write_files): Disable assert for non-empty
1159 partitions when checking is not enabled.
1160
ba78087b
KT
11612011-03-25 Kai Tietz <ktietz@redhat.com>
1162
1163 * lto.c (lto_resolution_read): Use filename_cmp instead
1164 of strcmp.
1165 (lto_read_section_data): Likewise.
1166
0edf1bb2
JL
11672011-03-25 Jeff Law <law@redhat.com>
1168
1169 * lto/lto-lang.c (def_fn_type): Add missing va_end.
1170
62d784f7
KT
11712011-03-21 Kai Tietz <ktietz@redhat.com>
1172
1173 PR target/12171
1174 * lto-lang.c (lto_attribute_table): Adjust table.
1175
62dd9571
JJ
11762011-02-18 Jakub Jelinek <jakub@redhat.com>
1177
1178 PR bootstrap/47807
1179 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
1180 of lto-streamer.h.
1181
237d6259
RG
11822011-02-18 Richard Guenther <rguenther@suse.de>
1183
1184 PR lto/47798
1185 * lto-tree.h (lto_global_var_decls): Do not declare here.
1186 * lto-lang.c: Include lto-streamer.h.
1187 * Make-lang.in (lto-lang.o): Adjust dependencies.
1188
8ead2223
KT
11892011-02-10 Kai Tietz <kai.tietz@onevision.com>
1190
1191 PR lto/47241
1192 * lto.c (lto_read_section_data): Free
1193 fd_name in failure case.
1194 For mingw targets don't hash file-descriptor.
1195 (read_cgraph_and_symbols): Close current_lto_file
1196 in failure case.
1197
6e701822
JH
11982011-01-11 Jan Hubicka <jh@suse.cz>
1199
1200 PR lto/45721
1201 PR lto/45375
b9843260
EB
1202 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
1203 are not partitioned.
6e701822 1204
f4da8dce
NF
12052010-12-22 Nathan Froyd <froydnj@codesourcery.com>
1206
1207 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
1208 Use prototype_p.
1209
6b7fb143
RG
12102010-12-06 Richard Guenther <rguenther@suse.de>
1211
1212 PR lto/46796
1213 * lto-lang.c (lto_init): Give names to basic types.
1214
c59ffc41
JM
12152010-11-30 Joseph Myers <joseph@codesourcery.com>
1216
1217 * lto-object.c: Don't include toplev.h.
1218 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
1219
7c475d11
JM
12202010-11-30 Joseph Myers <joseph@codesourcery.com>
1221
1222 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
1223 $(TOPLEV_H).
1224
71f3e391
JM
12252010-11-29 Joseph Myers <joseph@codesourcery.com>
1226
1227 * lto-endian.h: Delete.
1228 * lto-object.c: Don't include "libiberty.h".
1229 (O_BINARY): Don't define.
1230 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
1231 (O_BINARY): Don't define.
1232
9f1718b0
RG
12332010-11-23 Richard Guenther <rguenther@suse.de>
1234
1235 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
1236
39c4e298
RG
12372010-11-23 Richard Guenther <rguenther@suse.de>
1238
1239 PR lto/46605
1240 * lto.c (read_cgraph_and_symbols): Bail out after errors.
1241
b37421c6
JM
12422010-11-17 Joseph Myers <joseph@codesourcery.com>
1243
1244 * lto.c (lto_main): Take no arguments.
1245 * lto.h (lto_main): Update prototype.
1246
d82f74d3
ILT
12472010-11-16 Ian Lance Taylor <iant@google.com>
1248
1249 * lto-object.c (lto_obj_file_open): Call
1250 simple_object_attributes_merge rather than
1251 simple_object_attributes_compare.
1252
a4d8c676
JM
12532010-11-12 Joseph Myers <joseph@codesourcery.com>
1254
1255 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
1256 * lto-lang.c (lto_handle_option): Take location_t parameter.
1257
d8a07487
JM
12582010-11-10 Joseph Myers <joseph@codesourcery.com>
1259
1260 * lto.c (lto_resolution_read): Start diagnostics with lowercase
1261 letters and remove trailing '.'.
1262 (lto_file_finalize): Start diagnostic with a lowercase letter.
1263
6b3456d1
ILT
12642010-11-02 Ian Lance Taylor <iant@google.com>
1265
1266 * lto-object.c: New file.
1267 * lto-elf.c: Remove file.
1268 * lto-macho.c: Remove file.
1269 * lto-macho.h: Remove file.
1270 * lto-coff.c: Remove file.
1271 * lto-coff.h: Remove file.
1272 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
1273 lto/lto-object.o.
1274 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
1275 (lto/lto-objfile.o): New target.
1276 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
1277 (lto/lto.o): Remove $(LIBIBERTY_H).
1278
030cd86c
JH
12792010-10-22 Jan Hubicka <jh@suse.cz>
1280
1281 * lto.c (add_cgraph_node_to_partition,
1282 add_varpool_node_to_partition): Add debug info.
1283 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
1284 partitioned nodes.
1285 (do_whole_program_analysis): Set function flags before dumping.
1286
4490cae6
RG
12872010-10-22 Richard Guenther <rguenther@suse.de>
1288
1289 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
1290 the new gimple_register_canonical_type.
1291
703cdce3
L
12922010-10-20 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 PR bootstrap/45954
1295 * config-lang.in (boot_language): Set to $enable_lto.
1296
1915c739
JJ
12972010-10-18 Jakub Jelinek <jakub@redhat.com>
1298
1299 PR lto/45638
1300 * Make-lang.in (check-lto): New dummy target.
1301
82971de5
EB
13022010-10-14 Eric Botcazou <ebotcazou@adacore.com>
1303
1304 * lto-elf.c (SHN_XINDEX): Define if not already defined.
1305
a75bfaa6
JM
13062010-10-08 Joseph Myers <joseph@codesourcery.com>
1307
1308 * lto-lang.c (lto_init_options): Change to
1309 lto_init_options_struct. Update parameters.
1310 (LANG_HOOKS_INIT_OPTIONS): Don't define.
1311 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
1312
937f7f69
JH
13132010-10-06 Jan Hubicka <jh@suse.cz>
1314
1315 * lto.c (lto_balanced_map): Fix accounting of program size.
1316
2169830c
JH
13172010-10-06 Jan Hubicka <jh@suse.cz>
1318
1319 * lto.c (lto_balanced_map): Do not produce empty partitions.
1320
ecdbd01a 13212010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
1322
1323 * lto.c (lto_process_name): Add.
1324 (lto_main): Call lto_process_name.
1325
06ed016f
JH
13262010-10-06 Jan Hubicka <jh@suse.cz>
1327
1328 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
1329 COMDATs required by the linker.
1330
ae718d66
ILT
13312010-10-05 Ian Lance Taylor <iant@google.com>
1332
1333 * lto.c (lto_section_with_id): Make s a const pointer.
1334
852e4bd2
JH
13352010-10-05 Jan Hubicka <jh@suse.cz>
1336
1337 * lto.c: Include params.h.
1338 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
1339 refcounting in aux field.
1340 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
1341 New functions.
1342 (lto_1_to_1_map): Simplify.
1343 (lto_balanced_map): New function.
1344 (do_whole_program_analysis): Chose proper partitioning alg.
1345 * Make-lang.in (lto.o): Add dependency on params.h
1346
ecdbd01a 13472010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
1348
1349 * Make-lang.in (lto1): Add + to build rule.
1350
ecdbd01a 13512010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
1352
1353 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
1354 with fatal_error.
1355
0d6e14fd
JH
13562010-09-28 Jan Hubicka <jh@suse.cz>
1357
1358 * lto-lang.c (handle_leaf_attribute): New function.
1359 (lto_attribute_tables): Add leaf.
1360
fb462383
JZ
13612010-09-25 Jie Zhang <jie@codesourcery.com>
1362
1363 * lto.c (lto_read_all_file_options): Start a new line after
1364 printing out file names.
1365
051f8cc6
JH
13662010-09-24 Jan Hubicka <jh@suse.cz>
1367
1368 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1369
64e0f5ff
JH
13702010-09-20 Jan Hubicka <jh@suse.cz>
1371
1372 PR tree-optimize/45605
1373 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1374
a929ec3d
GP
13752010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
1376
1377 * lto-elf.c (lto_obj_file_open): Also provide filename when
1378 elf_begin fails.
1379
4c588abf
JH
13802010-09-17 Jan Hubicka <jh@suse.cz>
1381
1382 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
1383
c3224d6f
RG
13842010-09-17 Richard Guenther <rguenther@suse.de>
1385
1386 * lang.opt (flag_wpa): Also enable for the driver.
1387
52b3b3c7
JH
13882010-09-16 Jan Hubicka <jh@suse.cz>
1389
1390 * lto.c (lto_materialize_function): Do not tamper with STATIC and
1391 EXTERNAL flags.
1392
969c37b7
LB
13932010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1394
1395 * lto-tree.h (struct lang_type): Add variable_size GTY option.
1396
098a4f50
JH
13972010-09-08 Jan Hubicka <jh@suse.cz>
1398
1399 * lto.c (real_file_count, real_file_decl_data): New static vars.
1400 (read_cgraph_and_symbols): Use it.
1401
0f443ad0
RG
14022010-09-08 Richard Guenther <rguenther@suse.de>
1403
1404 * lto.c (read_cgraph_and_symbols): Collect again after each
1405 file.
1406
ee187353
JH
14072010-09-07 Jan Hubicka <jh@suse.cz>
1408
1409 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
1410
b3ec52d0
RG
14112010-09-03 Richard Guenther <rguenther@suse.de>
1412
1413 * lto-elf.c (validate_file): Always error if validation fails.
1414
f1395d4a
JH
14152010-08-20 Jan Hubicka <jh@suse.cz>
1416
1417 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
1418 (lto_wpa_write_files): Update comments.
1419
2429bce3
L
14202010-08-20 H.J. Lu <hongjiu.lu@intel.com>
1421
1422 PR bootstrap/45357
1423 * lto.c (lto_materialize_function): Replace has_analyzed_clone
1424 with has_analyzed_clone_p.
1425
e0f967db
JH
14262010-08-20 Jan Hubicka <jh@suse.cz>
1427
1428 * lto.c (has_analyzed_clone_p): New function
1429 (lto_materialize_function): Use callgraph to determine if
1430 body is needed.
1431 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
1432
ac47786e
NF
14332010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1434
1435 * lto.c: Use FOR_EACH_VEC_ELT.
1436
ecdbd01a 14372010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
1438
1439 * Make-lang.in (lto.o): Add dependency to splay-tree.h
1440
5f20c657
JM
14412010-07-27 Joseph Myers <joseph@codesourcery.com>
1442
1443 * lto-lang.c (lto_handle_option): Update prototype and return
1444 value type. Remove duplicate assignment to result.
1445
7a9bf9a4
JM
14462010-07-27 Joseph Myers <joseph@codesourcery.com>
1447
1448 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
1449 New.
1450 (lto_init_options): Update prototype.
1451 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
1452 Define.
1453
ecdbd01a 14542010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
1455
1456 PR lto/44992
1457 * lto.c: Include splay-tree.h
1458 (lto_resolution_read): Change to walk file_ids tree and parse
1459 extra file_id in resolution file.
1460 (lto_section_with_id): Add.
1461 (create_subid_section_table): Add.
1462 (lwstate): Add.
1463 (lto_create_files_from_ids): Add.
1464 (lto_file_read): Change to handle sub file ids and create list
1465 of file_datas. Add output argument for count.
1466 (get_section_data): Pass file_data to lto_get_section_name.
1467 (lto_flatten_file): Add.
1468 (read_cgraph_and_symbols): Handle linked lists of file_datas.
1469
ecdbd01a 14702010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
1471
1472 * lto-coff.c (hash_name, eq_name): Move.
1473 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1474 * lto-elf.c: (hash_name, eq_name): Move.
1475 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1476 * lto-macho.c: (hash_name, eq_name): Move.
1477 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1478 * lto.c: (hash_name, eq_name): Move from lto-*.c
1479 (lto_obj_create_section_hash_table): Add.
1480 (free_with_string): Add.
1481
718f9c0f
MLI
14822010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1483
1484 * lto-coff.c: Include diagnostic-core.h in every file that
1485 includes toplev.h.
1486 * lto-elf.c: Likewise.
1487 * lto-lang.c: Likewise.
1488 * lto-macho.c: Likewise.
1489
1b137837
JJ
14902010-07-07 Jakub Jelinek <jakub@redhat.com>
1491
1492 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
1493 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
1494 objects.
1495
92eb4438
JH
14962010-07-05 Jan Hubicka <jh@suse.cz>
1497
1498 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
1499 nodes from same comdat group as well as all comdat functions referenced
1500 here.
b9843260
EB
1501 (add_varpool_node_to_partition, add_references_to_partition): New
1502 function.
1503 (lto_1_1_map): Skip COMDAT fnctions/variables; use
1504 add_varpool_node_to_partition; clear aux flags when done.
1505 (lto_promote_cross_file_statics): Do not promote stuff that gets
1506 duplicated to each ltrans.
92eb4438 1507
a05541a9
JH
15082010-07-04 Jan Hubicka <jh@suse.cz>
1509
1510 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
1511
4a2ac96f
RG
15122010-06-13 Richard Guenther <rguenther@suse.de>
1513
1514 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
1515
1d536046
KT
15162010-06-09 Kai Tietz <kai.tietz@onevision.com>
1517
1518 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1519 * lto-coff.c (coff_write_object_file): Add braces to if.
1520
a9429e29
LB
15212010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1522
1523 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
1524 (lto_file_read): Likewise.
1525 (new_partition): Likewise.
1526 (read_cgraph_and_symbols): Likewise.
1527
5498f011
JM
15282010-06-07 Joseph Myers <joseph@codesourcery.com>
1529
1530 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
1531 (lto_handle_option): Don't set flag_signed_char here.
1532
d4c0c9f6
RG
15332010-06-04 Richard Guenther <rguenther@suse.de>
1534
1535 PR lto/41584
1536 * lto.c (lto_1_to_1_map): Use the proper file_data for
1537 varpool nodes.
1538
0a5fa5a1
JH
15392010-05-30 Jan Hubicka <jh@suse.cz>
1540
1541 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
1542 partitioning decisions.
1543
9eec9488
JH
15442010-05-29 Jan Hubicka <jh@suse.cz>
1545
1546 * lto.c (bitmap vector): Remove.
1547 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
1548 (ltrans_partition_def): New structure.
1549 (ltrans_partition): New type and VECtor.
1550 (new_partition): New function.
1551 (add_cgraph_node_to_partition): New function.
1552 (lto_1_to_1_map): Reorganize for partitions.
1553 (lto_add_inline_clones): Remove.
1554 (lto_add_all_inlinees): Remove.
1555 (lto_promote_cross_file_statics): Use partitions.
1556 (cmp_partitions): New function.
1557 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
1558 use partitions; output files sorted by size.
1559
3e097227
SB
15602010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1561
1562 * Make-lang.in: Replace vec.h dependency with VEC_H.
1563
7ca92787
JM
15642010-05-28 Joseph Myers <joseph@codesourcery.com>
1565
1566 * lto-coff.c (coff_errmsg): Remove.
1567 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
1568 errors instead of coff_errmsg (-1).
1569 * lto-macho.c (mach_o_errmsg): Remove.
1570 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
1571 instead of mach_o_errmsg (-1).
1572 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
1573 xstrerror (errno).
1574
b5611987
RG
15752010-05-28 Richard Guenther <rguenther@suse.de>
1576
1577 * lto.c (prefix_name_with_star): Removed.
1578 (strip_extension): Likewise.
1579 (get_filename_for_set): Likewise.
1580 (lto_write_ltrans_list): Fold into ...
1581 (lto_wpa_write_files): ... this. Name LTRANS units
1582 by suffixing the ltrans output list filename.
1583 (do_whole_program_analysis): Adjust.
1584
1da2ed5f
JM
15852010-05-27 Joseph Myers <joseph@codesourcery.com>
1586
1587 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
1588 (read_cgraph_and_symbols, lto_main): Use seen_error.
1589 * Make-lang.in (lto/lto.o): Update dependencies.
1590
7951d88a
EB
15912010-05-27 Eric Botcazou <ebotcazou@adacore.com>
1592
1593 PR lto/44230
1594 * lto.h (lto_eh_personality): New prototype.
1595 * lto.c: Include debug.h.
1596 (first_personality_decl): New static variable.
1597 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
1598 first function for which it is non-null.
1599 (lto_eh_personality_decl): New static variable.
1600 (lto_eh_personality): New function.
1601 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
1602 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
1603
e12da9c2
SB
16042010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1605
1606 * lto-lang.c: Do not include expr.h.
1607
468194f4
RG
16082010-05-24 Richard Guenther <rguenther@suse.de>
1609
1610 * lto-elf.c (lto_obj_build_section_table): Work around
1611 FreeBSD libelf issue.
1612
bd9eb5da
RG
16132010-05-22 Richard Guenther <rguenther@suse.de>
1614
1615 * lto.c (read_cgraph_and_symbols): Do not collect.
1616
66576e1b
JH
16172010-05-20 Jan Hubicka <jh@suse.cz>
1618
1619 * lto.c (promote_var, promote_fn): New functions.
1620 (lto_promote_cross_file_statics): Compute correctly boundary including
1621 static initializers of readonly vars.
1622
36576655
JH
16232010-05-18 Jan Hubicka <jh@suse.cz>
1624
66576e1b 1625 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
1626 (lto_promote_cross_file_statics): Deal with non-inline clones.
1627
28632d63
JH
16282010-05-18 Jan Hubicka <jh@suse.cz>
1629
1630 * lto.c (lto_materialize_function): Announce function when
1631 reading body; allocate_struct_function only when reading body;
1632 do not finalize local statics; ggc_collect after reading;
1633 do not mark reachable node.
1634 (materialize_cgraph): Do not announce function.
1635
33e42d56
JH
16362010-05-11 Jan Hubicka <jh@suse.cz>
1637
1638 * lto.c (materialize_cgraph): Revert my previous patch.
1639
f6430ea5
KT
16402010-05-11 Kai Tietz <kai.tietz@onevision.com>
1641
1642 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
1643 IMAGE_FILE_MACHINE_AMD64.
1644 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
1645
0a0b07b7
JH
16462010-05-11 Jan Hubicka <jh@suse.cz>
1647
1648 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
1649 (materialize_cgraph): Add it here.
1650
9a809897
JH
16512010-05-11 Jan Hubicka <jh@suse.cz>
1652
1653 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
1654 vector.
1655
16562010-05-11 Jan Hubicka <jh@suse.cz>
1657
1658 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
1659 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
1660 use reachable_from_other_partition_p and
1661 referenced_from_other_partition_p test.
1662
94f64249
KT
16632010-05-11 Kai Tietz <kai.tietz@onevision.com>
1664
1665 * lto-coff.c (validate_file): Add x64-coff support.
1666 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
1667 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
1668 * lto-lang.c (lto_build_c_type_nodes): Add check for
1669 'long long unsigned int' for x64-windows.
1670 (lto_init): Likewise.
1671
1672
c082f9f3
SB
16732010-05-07 Steven Bosscher <steven@gcc.gnu.org>
1674
1675 * lto.h (struct lto_file_struct): Document offset member.
1676 * lto-endian.h: New file.
1677 * lto-macho.h: New file.
1678 * lto-macho.c: New file.
1679 * Make-lang.in: Add rule for lto-macho.o.
1680
5cd0e96b
RG
16812010-05-07 Richard Guenther <rguenther@suse.de>
1682
1683 PR lto/43857
1684 PR lto/43371
1685 * lang.opt (fresolution): Change to ...
1686 (fresolution=): ... this.
1687 * lto-lang.c (lto_handle_option): Adjust.
1688
48cf395b
RB
16892010-05-07 Richard Guenther <rguenther@suse.de>
1690
1691 * lto.c (DUMPBASE_SUFFIX): Remove.
1692 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
1693 Rename to ...
1694 (lto_write_ltrans_list): ... only output the list of ltrans files.
1695 (lto_maybe_unlink): Remove.
1696 (do_whole_program_analysis): Do not execute LTRANS phase
1697 from here.
1698
afa83c15
L
16992010-05-06 H.J. Lu <hongjiu.lu@intel.com>
1700
1701 * lto-lang.c (lto_handle_option): Add argument kind.
1702
369451ec
JH
17032010-05-05 Jan Hubicka <jh@suse.cz>
1704
48cf395b
RB
1705 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
1706 refs.
369451ec 1707
2f41ecf5
JH
17082010-05-05 Jan Hubicka <jh@suse.cz>
1709
1710 * lto.c (lto_1_to_1_map): Partition only needed nodes.
1711
ace72c88
JH
17122010-04-30 Jan Hubicka <jh@suse.cz>
1713
b9843260
EB
1714 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
1715 use default name.
ace72c88
JH
1716 (lto_wpa_write_files): Write any non-empty partition.
1717
05575e07
JH
17182010-04-30 Jan Hubicka <jh@suse.cz>
1719
1720 * lto.c: Do not attempt to make constant pool references global.
1721
49ba8180
JH
17222010-04-28 Jan Hubicka <jh@suse.cz>
1723
1724 * lto/lto.c (lto_read_in_decl_state): Use GGC.
1725 (lto_wpa_write_files): Announce what we are writting.
1726 (all_file_decl_data): New.
1727 (read_cgraph_and_symbols): Use GGC; correct timevars.
1728 (do_whole_program_analysis): Collect.
1729 * lto/Make-lang.in (lto.o): Fix dependency.
1730 * Makefile.in (GTFILES): Add lto-streamer.h.
1731 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
1732 (varpool_assemble_pending_decls): Use VAROUT.
1733 * lto-streamer.h (lto_tree_ref_table): Annotate.
1734 (lto_in_decl_state): Annotate.
1735 (lto_file_decl_data): Annotate.
1736
2942c502
JH
17372010-04-28 Jan Hubicka <jh@suse.cz>
1738
1739 * lto.c (lto_varpool_node_sets): New.
1740 (lto_1_to_1_map): Partition varpool too.
1741 (globalize_context_t, globalize_cross_file_statics,
1742 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
1743 lto_scan_statics_in_remaining_global_vars): Remove.
1744 (lto_promote_cross_file_statics): Rewrite.
1745 (get_filename_for_set): Take vset argument.
1746 (lto_wpa_write_files): Pass around vsets.
1747
3bec79c5
DK
17482010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
1749
1750 PR lto/42776
1751 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
1752 hardcoding 'lto-elf.o'.
1753 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
1754
1755 * lto-coff.h: New file.
1756 * lto-coff.c: Likewise.
1757
21aac880
RG
17582010-04-26 Richard Guenther <rguenther@suse.de>
1759
1760 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
1761
2cee0101
DK
17622010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
1763
1764 * lto.h (lto_elf_file_open): Rename prototype from this ...
1765 (lto_obj_file_open): ... to this.
1766 (lto_elf_file_close): Likewise ...
1767 (lto_obj_file_close): ... and likewise.
1768 (lto_elf_build_section_table): Likewise ...
1769 (lto_obj_build_section_table): ... and likewise.
1770 (lto_elf_begin_section): Likewise ...
1771 (lto_obj_begin_section): ... and likewise.
1772 (lto_elf_append_data): Likewise ...
1773 (lto_obj_append_data): ... and likewise.
1774 (lto_elf_end_section): Likewise ...
1775 (lto_obj_end_section): ... and likewise.
1776 * lto.c (lto_file_read): Update references to the above.
1777 (lto_wpa_write_files): Likewise.
1778 (lto_read_all_file_options): Likewise.
1779 (read_cgraph_and_symbols): Likewise.
1780 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
1781 (LANG_HOOKS_APPEND_DATA): Likewise.
1782 (LANG_HOOKS_END_SECTION): Likewise.
1783 * lto-elf.c (lto_elf_file_open): Rename from this ...
1784 (lto_obj_file_open): ... to this, updating any references.
1785 (lto_elf_file_close): Likewise ...
1786 (lto_obj_file_close): ... and likewise.
1787 (lto_elf_build_section_table): Likewise ...
1788 (lto_obj_build_section_table): ... and likewise.
1789 (lto_elf_begin_section): Likewise ...
1790 (lto_obj_begin_section): ... and likewise.
1791 (lto_elf_append_data): Likewise ...
1792 (lto_obj_append_data): ... and likewise.
1793 (lto_elf_end_section): Likewise ...
1794 (lto_obj_end_section): ... and likewise.
1795
bc58d7e1
JH
17962010-04-21 Jan Hubicka <jh@suse.cz>
1797
1798 * lto.c (lto_fixup_tree): Do not call wpa fixup.
1799 (materialize_cgraph): Likewise.
1800
e792884f
JH
18012010-04-21 Jan Hubicka <jh@suse.cz>
1802
1803 * lto.c (lto_wpa_write_files): Update.
1804 (read_cgraph_and_symbols): Be more verbose.
1805 (materialize_cgraph): Likewise.
1806 (do_whole_program_analysis): Likewise.
1807
c9945504
JH
18082010-04-21 Jan Hubicka <jh@suse.cz>
1809
1810 * lto.c (globalize_cross_file_statics): When function has address taken,
1811 it needs to be public.
1812
a837268b
JH
18132010-04-20 Jan Hubicka <jh@suse.cz>
1814
1815 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
1816 (lto_add_all_inlinees): Likewise.
1817 (lto_wpa_write_files): Likewise.
1818
3b9e5d95
EB
18192010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1820
1821 * lto-lang.c (lto_init): Remove second argument in call to
1822 build_common_tree_nodes.
1823
8ccb78f2
RO
18242010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1825
1826 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
1827 function.
1828
2f9b99e6
EB
18292010-03-09 Eric Botcazou <ebotcazou@adacore.com>
1830
1831 PR bootstrap/43276
1832 * lto-elf.c: Define EM_* constants if not already defined.
1833
bef7d288
EB
18342010-03-03 Eric Botcazou <ebotcazou@adacore.com>
1835
1836 * lto-elf.c (is_compatible_architecture): New static function.
1837 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
1838
f68df07c
RG
18392010-02-11 Richard Guenther <rguenther@suse.de>
1840
1841 PR driver/43021
1842 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
1843 appropriately.
1844
3cdea2b4
AH
18452010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
1846
1847 * lto.c (O_BINARY): Define.
1848 (lto_read_section_data): Open file in binary mode.
1849 * lto-elf.c (O_BINARY): Define.
1850 (lto_elf_file_open): Open file in binary mode.
1851
c59449fa
RG
18522010-01-08 Richard Guenther <rguenther@suse.de>
1853
1854 PR lto/42528
1855 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
1856 (lto_init): Do not init char_type_node in a standard way
1857 but according to flag_signed_char.
1858
d7fb0a6d
L
18592010-01-03 H.J. Lu <hongjiu.lu@intel.com>
1860
1861 PR lto/41564
1862 * lto.c (DUMPBASE_SUFFIX): New.
1863 (lto_execute_ltrans): Append a sequence number to -dumpbase
1864 for LTRANS.
1865
78ce4053
L
18662010-01-02 H.J. Lu <hongjiu.lu@intel.com>
1867
1868 PR lto/42580
1869 * lto-elf.c (lto_elf_file_open): Stop if the command line
1870 option file is missing.
1871
2a71eb48
RG
18722009-12-15 Richard Guenther <rguenther@suse.de>
1873
1874 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
1875 (lto_post_options): Do not disable debuginfo.
1876
a818bca1
DG
18772009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
1878
1879 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
1880
e7d00517
RG
18812009-12-11 Richard Guenther <rguenther@suse.de>
1882
1883 PR lto/42037
1884 * lto.c (lto_resolution_read): Properly grow the vector.
1885
1ab53893
RG
18862009-12-11 Richard Guenther <rguenther@suse.de>
1887
1888 PR lto/41915
1889 * lto-lang.c (lto_init_options): Initialize flag_complex_method
1890 to the C99 default. Do not set flag_unit_at_a_time.
1891
0f900dfa
JJ
18922009-11-28 Jakub Jelinek <jakub@redhat.com>
1893
1894 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
1895 variable.
1896
92fa7608
RAE
18972009-11-19 Rafael Avila de Espindola <espindola@google.com>
1898
1899 PR bootstrap/42096
1900 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
1901 * lto.c (lto_parse_hex): New.
1902 (lto_resolution_read): Use lto_parse_hex.
1903 * lto.h (lto_parse_hex): New.
1904
9870fe4f
RAE
19052009-11-17 Rafael Avila de Espindola <espindola@google.com>
1906
1907 * lto-elf.c (lto_file_init): Add offset argument.
1908 (lto_elf_file_open): Record the offset.
1909 * lto.c (lto_resolution_read): Change file_name into a lto_file
1910 argument. Check offsets.
1911 (lto_file_read): Update call to lto_resolution_read.
1912 * lto.h (lto_file_struct): Add the offset field.
1913
1b70729f
RAE
19142009-11-16 Rafael Avila de Espindola <espindola@google.com>
1915
1916 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
1917
0e3776db
JH
19182009-11-14 Jan Hubicka <jh@suse.cz>
1919
1920 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
1921
06bd7f56
RAE
19222009-11-12 Rafael Avila de Espindola <espindola@google.com>
1923
1924 * lang.opt (fresolution): Renamed from resolution.
1925 * lto-lang.c (lto_handle_option): Handle new option name.
1926 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
1927
7e9dc421
RG
19282009-11-04 Richard Guenther <rguenther@suse.de>
1929 Rafael Avila de Espindola <espindola@google.com>
1930
1931 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
1932 (lto_elf_file_open): Handle offsets in arguments name@offest.
1933
b207f900
RG
19342009-10-30 Richard Guenther <rguenther@suse.de>
1935
1936 PR lto/41858
1937 * lto.c (lto_file_read): Do not set file_data->fd.
1938 (lto_read_section_data): Use a single-entry file-descriptor cache.
1939 Do not check the result of xmalloc.
1940 (free_section_data): Do not use file_data->fd.
1941 (lto_read_all_file_options): Likewise.
1942
2c928155
RG
19432009-10-22 Richard Guenther <rguenther@suse.de>
1944
1945 * lto.c (lto_fixup_jump_functions): Remove.
1946 (lto_fixup_decls): Do not fixup jump functions.
1947 (read_cgraph_and_symbols): Schedule cgraph merging after
1948 summary reading. Schedule type and decl fixup before
1949 summary reading.
1950
f9c91f8a
RB
19512009-10-22 Richard Guenther <rguenther@suse.de>
1952
1953 * lto.c (lto_fixup_data_t): Remove free_list member.
1954 (lto_fixup_tree): Do not insert into free_list.
1955 (free_decl): Remove.
1956 (lto_fixup_decls): Remove free-list handling.
1957
fb3f88cc
JH
19582009-10-22 Jan Hubicka <jh@suse.cz>
1959
1960 * lto.c (lto_fixup_jump_functions): New function.
1961 (lto_fixup_decls): Use it.
1962
35f1e9f4
RG
19632009-10-16 Richard Guenther <rguenther@suse.de>
1964
1965 PR lto/41715
1966 * lto.c (lto_fixup_tree): Revert last change.
1967
200c8750
RG
19682009-10-14 Richard Guenther <rguenther@suse.de>
1969
1970 * lto.c (lto_fixup_tree): In case the prevailing decl is not
1971 compatible with the one we replace wrap it around a
1972 VIEW_CONVERT_EXPR.
1973
b1b07c92
RG
19742009-10-09 Richard Guenther <rguenther@suse.de>
1975
1976 PR lto/41635
1977 PR lto/41636
1978 * lto.c (read_cgraph_and_symbols): Do not assert we can open
1979 a file.
1980 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
1981 (init_ehdr##BITS): Likewise.
1982
3c2e7d45
JM
19832009-10-08 Joseph Myers <joseph@codesourcery.com>
1984
1985 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
1986 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
1987 diagnostics.
1988 * lto-lang.c (lto_post_options): Remove trailing "." from
1989 diagnostics.
1990
0d0bfe17
RG
19912009-10-08 Richard Guenther <rguenther@suse.de>
1992
1993 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
1994 hash tables.
1995
4bedf19a
JM
19962009-10-07 Joseph Myers <joseph@codesourcery.com>
1997
1998 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
1999
b20996ff
JH
20002009-10-07 Jan Hubicka <jh@suse.cz>
2001
2002 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2003 ltrans stage; explain why this is needed and should not.
2004
1a735925
RG
20052009-10-05 Richard Guenther <rguenther@suse.de>
2006
2007 PR lto/41552
2008 PR lto/41487
2009 * lto.c (lto_read_decls): Do not register deferred decls.
2010 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2011 until after reading the IPA summaries.
2012
d7f09764
DN
20132009-10-02 Rafael Avila de Espindola <espindola@google.com>
2014
2015 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2016 (lto-lang.c): Don't include lto/common.h.
2017
20182009-10-02 Rafael Avila de Espindola <espindola@google.com>
2019
2020 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2021 (lto/common.o): Remove.
2022 * common.c: Remove.
2023 * common.h (lto_kind_str): Remove.
2024 (lto_visibility_str): Remove.
2025 (lto_resolution_str): Make it static.
2026
20272009-10-01 Diego Novillo <dnovillo@google.com>
2028
2029 * lto.c (lto_read_decls): Add comment.
2030 Call internal_error instead of gcc_assert.
2031 (lto_resolution_read): Likewise.
2032 (lto_add_all_inlinees): Tidy.
2033 * Make-lang.in: Fix copyright boilerplate.
2034 (lto.pdf): New.
2035 (lto.install-pdf): New.
2036 * lto-tree.h: Fix copyright boilerplate.
2037 * lang-specs.h: Likewise.
2038 Remove ".lto" entry from compilers fragment.
2039 * lto-elf.c: Move inclusion of gelf.h after config.h.
2040 Tidy formatting everywhere.
2041 * lto.h: Fix copyright boilerplate.
2042 Tidy formatting everywhere.
2043 * common.c: Likewise.
2044 * config-lang.in: Likewise.
2045 * common.h: Likewise.
2046 * lto-lang.c: Likewise.
2047
20482009-10-01 Richard Guenther <rguenther@suse.de>
2049
2050 * lto.c (lto_read_section_data): Use plain lseek/read.
2051
20522009-10-01 Richard Guenther <rguenther@suse.de>
2053
2054 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2055 use sysconf to query the system page size.
2056 (lto_file_read): Implement fallback using stdio.
2057 (free_section_data): Likewise.
2058
20592009-09-29 Diego Novillo <dnovillo@google.com>
2060
2061 * lto-lang.c (lto_init): Really fix call to
2062 build_common_builtin_nodes.
2063
20642009-09-29 Diego Novillo <dnovillo@google.com>
2065
2066 * lto-lang.c (lto_init): Fix call to
2067 build_common_builtin_nodes.
2068
20692009-09-29 Richard Guenther <rguenther@suse.de>
2070
2071 PR lto/40754
2072 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2073 in bytes.
2074 (first_data_block): New static variable.
2075 (lto_elf_append_data): Align the first data block in each
2076 section.
2077
20782009-09-28 Diego Novillo <dnovillo@google.com>
2079
2080 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2081 * lto.c (strip_extension): New.
2082 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2083 (lto_execute_ltrans): Tidy.
2084 Do not pass -fwpa nor -fltrans-* to LTRANS.
2085 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2086 * tree.c (need_assembler_name_p): Call
2087 lang_hooks.decls.may_need_assembler_name_p if set.
2088 * varasm.c (default_binds_local_p_1): Remove check for
2089 flag_ltrans.
2090 * varpool.c (decide_is_variable_needed): Do not test for
2091 in_lto_p.
2092
20932009-09-22 Richard Guenther <rguenther@suse.de>
2094
2095 PR lto/39276
2096 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2097 * Make-lang.in: Remove ltrans-driver stuff.
2098 * config-lang.in: Likewise.
2099 * lang.opt (fltrans-driver): Remove.
2100 * lto-lang.c (lto_init_options): Remove code initializing
2101 ltrans_driver.
2102 * ltrans-driver: Remove.
2103
21042009-09-21 Diego Novillo <dnovillo@google.com>
2105
2106 * lto-lang.c (lto_define_builtins): Remove superfluous
2107 calls to targetm.init_builtins and build_common_builtin_nodes.
2108 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2109 build_common_builtin_nodes.
2110 * lto.c (lto_materialize_function): Do nothing if NODE is a
2111 clone.
2112
21132009-09-03 Diego Novillo <dnovillo@google.com>
2114
2115 * lto-elf.c (validate_file): Replace call to
2116 elf_getshstrndx with call to elf_getshdrstrndx.
2117
21182009-08-19 Richard Guenther <rguenther@suse.de>
2119
2120 * lto-lang.c (lto_init): Merge char_type_node with the
2121 appropriately signed variant.
2122
21232009-08-19 Richard Guenther <rguenther@suse.de>
2124
2125 PR lto/41071
2126 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
2127 (lto_fixup_type): Re-build the pointer-to chain part two.
2128
21292009-08-19 Richard Guenther <rguenther@suse.de>
2130
2131 PR lto/41071
2132 * lto.c (lto_fixup_type): Re-build the type variant chain.
2133
21342009-08-19 Richard Guenther <rguenther@suse.de>
2135
2136 PR lto/41071
2137 * lto.c (lto_fixup_constructor): New function.
2138 (lto_fixup_tree): Replace all types. Properly fixup
2139 constructors and constants.
2140
21412009-08-14 Richard Guenther <rguenther@suse.de>
2142
2143 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
2144 for DECL_LANG_SPECIFIC.
2145
21462009-08-13 Richard Guenther <rguenther@suse.de>
2147
2148 PR lto/41032
2149 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
2150
21512009-07-30 Richard Guenther <rguenther@suse.de>
2152
2153 PR lto/40903
2154 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
2155 the largest decl for output and free TREE_CHAIN for further
2156 use.
2157
21582009-07-24 Diego Novillo <dnovillo@google.com>
2159
2160 * Make-lang.in: Add empty lto.install-plugin target.
2161
21622009-07-13 Diego Novillo <dnovillo@google.com>
2163
2164 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
2165
21662009-07-11 Richard Guenther <rguenther@suse.de>
2167
2168 * lto-lang.c (lto_write_globals): Wrapup global decls.
2169
21702009-07-10 Richard Guenther <rguenther@suse.de>
2171
2172 * lto-lang.c (lto_init): Allocate one more location to make
2173 BUILTINS_LOCATION correct.
2174
21752009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2176
2177 * lto.c (free_section_data): Cast computed_offset to caddr_t.
2178
21792009-07-06 Diego Novillo <dnovillo@google.com>
2180
2181 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
2182 TYPE_SIZE_UNIT.
2183
21842009-07-06 Diego Novillo <dnovillo@google.com>
2185
2186 * lto.c (preload_common_nodes): Remove.
2187 (lto_read_in_decl_state): Call lto_streamer_cache_get.
2188 (lto_read_decls): Call lto_data_in_create and
2189 lto_data_in_delete.
2190 (free_decl): Do not call ggc_free.
2191 (lto_main): Call lto_init_reader.
2192 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
2193 (lto_init): Initialize main_identifier_node if needed.
2194 Make ptrdiff_type_node be integer_type_node.
2195
21962009-06-19 Diego Novillo <dnovillo@google.com>
2197
2198 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
2199 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
2200 Remove code guarded by #ifdef LOCAL_TRACE.
2201
22022009-06-18 Diego Novillo <dnovillo@google.com>
2203
2204 * lto.c: Update license to GPLv3.
2205 * lto-elf.c: Likewise.
2206 * common.c: Likewise.
2207 * lto-lang.c: Likewise.
2208 * lto.h: Remove superfluous include files. Update all
2209 users.
2210
22112009-06-17 Diego Novillo <dnovillo@google.com>
2212
2213 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
2214
22152009-06-02 Diego Novillo <dnovillo@google.com>
2216
2217 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
2218 read in.
2219 (materialize_cgraph): Only materialize nodes that have a
2220 representation on file.
2221
22222009-06-01 Diego Novillo <dnovillo@google.com>
2223
2224 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
2225
22262009-05-31 Diego Novillo <dnovillo@google.com>
2227
2228 * lto-lang.c (lto_type_for_mode): Handle all the modes
2229 handled in c_common_type_for_mode.
2230
22312009-05-21 Diego Novillo <dnovillo@google.com>
2232
2233 * lto-elf.c: Always include <gelf.h>.
2234 * config-lang.in (target_libs): Remove.
2235 (build_by_default): Set to no.
2236
22372009-05-15 Diego Novillo <dnovillo@google.com>
2238
2239 * lto.c (lto_materialize_function): Assert that DECL is
2240 not a builtin.
2241 (materialize_cgraph): Don't try to materialize builtin
2242 functions.
2243 * lto-section-out.c (write_symbol_vec): Do not write
2244 builtin functions.
2245
22462009-05-13 Diego Novillo <dnovillo@google.com>
2247
2248 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
2249
22502009-05-07 Diego Novillo <dnovillo@google.com>
2251
2252 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
2253 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
2254 (lto_fixup_type): Call it for TYPE_POINTER_TO,
2255 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
2256 (lto_fixup_tree): Call gimple_register_type when *TP is a
2257 type.
2258 (lto_main): Call bitmap_obstack_initialize.
2259
22602009-04-22 Diego Novillo <dnovillo@google.com>
2261
2262 * lto.c (free_section_data): Tidy.
2263 (lto_1_to_1_map): Tidy.
2264 (lto_add_all_inlinees): Tidy.
2265 (prefix_name_with_star): New.
2266 (get_filename_for_set): New.
2267 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
2268 to determine what cgraph node sets to write.
2269 Call get_filename_for_set to compute temporary file
2270 names.
2271 (lto_execute_ltrans): Do not execute LTRANS on files with
2272 names that start with '*'.
2273 Move logic to execute LTRANS together so that LTRANS is
2274 invoked only if there are any files to compile.
2275 (do_whole_program_analysis): Only remove output files
2276 that do not start with '*'.
2277
22782009-04-06 Diego Novillo <dnovillo@google.com>
2279
2280 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
2281 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
2282 (lto_add_all_inlinees): Tidy.
2283
22842009-03-26 Diego Novillo <dnovillo@google.com>
2285
2286 * lto.c: Include gimple.h.
2287 (lto_read_in_decl_state): Call gimple_register_type for
2288 every type in every stream.
2289 (lto_fixup_common): Call gimple_register_type if T has a
2290 type.
2291 (do_whole_program_analysis): Call print_lto_report.
2292 (lto_main): Call print_lto_report after cgraph_optimize.
2293 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
2294
22952009-03-24 Diego Novillo <dnovillo@google.com>
2296
2297 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
2298 (lto.o): Add dependency on GIMPLE_H.
2299
23002009-03-10 Simon Baldwin <simonb@google.com>
2301
2302 * lto.c (lto_read_all_file_options): Close any open file descriptor
2303 contained in file_data before freeing.
2304
23052009-02-24 Rafael Avila de Espindola <espindola@google.com>
2306
2307 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2308 for a decl in the original bitmap, not a node.
2309 (lto_add_all_inlinees): Remove original nodes that are not needed.
2310 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2311
23122009-02-24 Diego Novillo <dnovillo@google.com>
2313
2314 * lto.c (lto_materialize_function): Update
2315 lto_stats.num_function_bodies.
2316 (get_section_data): Initialize *LEN to 0.
2317 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
2318 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
2319 Update lto_stats.num_output_files.
2320 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
2321 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
2322 (lto_main): Initialize lto_stats.
2323 If flag_lto_report is set, call print_lto_report.
2324
23252009-02-19 Diego Novillo <dnovillo@google.com>
2326
2327 Revert
2328
2329 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
2330
2331 * lto.c (lto_add_inline_clones): Don't add the
2332 master clone. Check for a decl in the original
2333 bitmap, not a node.
2334 (lto_add_all_inlinees): Remove original nodes
2335 that are not needed.
2336 (lto_scan_statics_in_cgraph_node): Don't care if
2337 the node is the master.
2338 (lto_promote_cross_file_statics): Use a new
2339 context.seen_node_decls for each set
2340
23412009-02-19 Rafael Avila de Espindola <espindola@google.com>
2342
2343 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2344 for a decl in the original bitmap, not a node.
2345 (lto_add_all_inlinees): Remove original nodes that are not needed.
2346 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2347 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
2348 for each set
2349
23502009-02-18 Diego Novillo <dnovillo@google.com>
2351
2352 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
2353 and TV_WHOPR_WPA_IO.
2354 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
2355 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
2356 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
2357 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
2358 depending on command line flags.
2359 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
2360 (lto_main): Remove timer uses.
2361
23622009-02-18 Rafael Avila de Espindola <espindola@google.com>
2363
2364 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
2365 (lto_wpa_write_files): Update calls to renamed functions.
2366
23672009-02-17 Diego Novillo <dnovillo@google.com>
2368
2369 PR 39203
2370 * lto-lang.c (lto_post_options): Disable -fwhole-program
2371 when running LTRANS.
2372
23732009-02-10 Diego Novillo <dnovillo@google.com>
2374
2375 * lto.c (read_cgraph_and_symbols): Fix comment.
2376
23772009-02-10 Diego Novillo <dnovillo@google.com>
2378
2379 * lto.c (read_cgraph_and_symbols): Read options from all
2380 IL files.
2381
23822009-02-10 Diego Novillo <dnovillo@google.com>
2383
2384 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
2385 (materialize_cgraph): Likewise.
2386 (do_whole_program_analysis): Likewise.
2387 (lto_main): Call read_cgraph_and_symbols,
2388 materialize_cgraph and do_whole_program_analysis.
2389
23902009-02-10 Simon Baldwin <simonb@google.com>
2391
2392 * lto.c: Include lto-opts.h.
2393 * (lto_main): Clear file options at loop start, read any saved
2394 options from the first file handled, and re-issue options.
2395 * Makefile.in (lto.o): Add dependency on lto-opts.h.
2396
23972009-02-02 Diego Novillo <dnovillo@google.com>
2398
2399 * lto.c (lto_main): Stop LTO_TIMER and use
2400 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
2401
24022009-01-30 H.J. Lu <hongjiu.lu@intel.com>
2403
2404 PR lto/38995
2405 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
2406 to POINTER_SIZE.
2407
24082009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
2409
2410 * Make-lang.in (LTO_EXE): Link with all
2411 BACKENDLIBS and not only GMPLIBS
2412
24132009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2414
2415 PR bootstrap/38992
2416 * lto-elf.c: Include gelf.h instead of libelf.h.
2417 (lto_elf_file_close): Replace elfx_update_shstrndx with
2418 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
2419 gelf_update_ehdr.
2420
24212009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2422
2423 PR middle-end/38996
2424 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
2425
24262009-01-26 Diego Novillo <dnovillo@google.com>
2427
2428 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
2429
24302009-01-26 Diego Novillo <dnovillo@google.com>
2431
2432 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
2433 and rename into gimple_types_compatible_p.
2434
24352009-01-12 Rafael Avila de Espindola <espindola@google.com>
2436
2437 * lto-lang.c (lang_hooks): Remove the const qualifier.
2438
24392009-01-06 Diego Novillo <dnovillo@google.com>
2440
2441 * ltrans-driver: Mark 'all' target as phony.
2442
24432008-12-31 Diego Novillo <dnovillo@google.com>
2444
2445 * ltrans-driver: Execute a NOP action for target 'all'.
2446
24472008-12-19 Diego Novillo <dnovillo@google.com>
2448
2449 * lto.c (lto_1_to_1_map): Tidy.
2450
24512008-12-19 Diego Novillo <dnovillo@google.com>
2452
2453 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
2454 be opened, show its name.
2455 * ltrans-driver: If $verbose is set, do not use parallelism.
2456
24572008-12-17 Rafael Avila de Espindola <espindola@google.com>
2458
2459 * lto.c (lto_fixup_function): New.
2460 (lto_fixup_tree): Call lto_fixup_function.
2461
24622008-12-14 Doug Kwan <dougkwan@google.com>
2463
2464 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
2465 variables if there is no function.
2466
24672008-12-10 Simon Baldwin <simonb@google.com>
2468
2469 * ltrans-driver: Always run make in silent mode, to avoid make's
2470 trace on stdout interfering with lto-wrapper output.
2471
24722008-12-10 Doug Kwan <dougkwan@google.com>
2473
2474 * lto.c (lto_add_inline_clones): Do not force master clones of
2475 inlined functions already in SET to be static inline.
2476
24772008-12-04 Doug Kwan <dougkwan@google.com>
2478
2479 * lto.c (globalize_context_t): New type to store states in
2480 globalization of cross-file statics.
2481 (globalize_cross_file_statics): New.
2482 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
2483 static decls that need to be fixed up.
2484 (lto_scan_statics_in_cgraph_node): Change call interface to use
2485 a globalize_context_t CONTEXT for all states used.
2486 (lto_scan_statics_in_remaining_global_vars): New.
2487 (lto_promote_cross_file_statics): Use new call interface of
2488 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
2489 visible vars in the last set.
2490
24912008-12-03 Diego Novillo <dnovillo@google.com>
2492
2493 * lto.c (lto_fixup_tree): Do not emit an error when
2494 PREVAILING throw but T doesn't.
2495
24962008-12-02 Doug Kwan <dougkwan@google.com>
2497
2498 * lto.c (lto_scan_statics_in_ref_table): New function factored out
2499 from code in ...
2500 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
2501 variables and functions.
2502 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
2503 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
2504
25052008-11-29 Diego Novillo <dnovillo@google.com>
2506
2507 * lto.c: Include timevar.h.
2508 (lto_materialize_function): Tidy. Add comments.
2509 (lto_wpa_write_files): Tidy.
2510 (lto_execute_ltrans): Tidy.
2511 (lto_main): Add local variable LTO_TIMER. Initialize it
2512 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
2513 Start and stop the timer.
2514 Tidy comments.
2515 * Make-lang.in (lto.o): Add dependency on timevar.h.
2516 * ltrans-driver: React to -v and -save-temps.
2517 Use simple heuristic to determine how much parallelism to
2518 use when executing make.
2519
25202008-11-12 Doug Kwan <dougkwan@google.com>
2521
2522 * lto.c (lto_bitmap_obstack): Remove var.
2523 (lto_materialize_function): Do nothing instead of marking function
2524 body in file if flag_wpa is true.
2525 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
2526 (lto_scan_statics_in_cgraph_node): New function.
2527 (lto_promote_cross_file_statics): Same.
2528 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
2529 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
2530 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
2531
25322008-11-09 Diego Novillo <dnovillo@google.com>
2533
2534 * lto/lto.c (lto_fixup_tree): Change error message locus
2535 information to include location of mismatching
2536 declaration.
2537 Use TREE_NO_WARNING to avoid repeated messages.
2538 (lto_main): If lto_fixup_decls emitted any errors, exit.
2539 * lto/lto-lang.c: Don't include libfuncs.h and except.h
2540 (lto_init_options): Don't enable exceptions by default.
2541 (lto_eh_runtime_type): Move to lto-function-in.c
2542 (lto_init_eh): Likewise.
2543 (lto_init): Don't call lto_init_eh.
2544 * lto/Make-lang.in (lto-lang.o): Remove dependency on
2545 libfuncs.h and except.h.
2546
25472008-10-30 Diego Novillo <dnovillo@google.com>
2548
2549 * lto.c (lto_read_decls): Declare debug_main only if
2550 LTO_STREAM_DEBUGGING is enabled.
2551
25522008-10-30 Simon Baldwin <simonb@google.com>
2553
2554 * lto.c (lto_wpa_write_files): Create intermediate files with
2555 make_cwd_temp_file().
2556 (lto_maybe_unlink): New. Delete intermediate WPA files unless
2557 WPA_SAVE_LTRANS is set.
2558 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
2559 * ltrans-driver: Do not strip directory from output files.
2560
25612008-10-29 Doug Kwan <dougkwan@google.com>
2562
2563 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
2564 DECL.
2565 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
2566 (lto/lto-symtab.o): Remove rule.
2567 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
2568 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
2569 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
2570 Remove macros.
2571 lto-symtab.c (File): Move up one level.
2572 lto-lang.c (cgraph.h): Remove include.
2573 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2574 input_cgraph): Move to lto-cgraph.c in gcc directory above.
2575 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
2576
25772008-10-24 Rafael Espindola <espindola@google.com>
2578
2579 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
2580 non prevailing weak symbols.
2581
25822008-10-24 Rafael Espindola <espindola@google.com>
2583
2584 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
2585
25862008-10-24 Rafael Espindola <espindola@google.com>
2587
2588 * lto-lang.c (input_node): Avoid casts from pointers to ints of
2589 different types.
2590
25912008-10-23 Simon Baldwin <simonb@google.com>
2592
2593 * lto-lang.c (input_node): Save the node reference, rather than the
2594 node pointer, in node->inlined_to.
2595 (input_cgraph_1): Convert node references into node pointers.
2596
25972008-10-22 Diego Novillo <dnovillo@google.com>
2598 Rafael Espindola <espindola@google.com>
2599
2600 * lto.c (lto_resolution_read): Tidy.
2601 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
2602 abort if RET is NULL.
2603
26042008-10-22 Doug Kwan <dougkwan@google.com>
2605
2606 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
2607 exceptions flag is given.
2608 * lto-lang.c: (lto_init_options) Set default exceptions flag.
2609 (lto_init_eh): Remove exceptions flag initialization.
2610 (lto_init): Only call lto_init_eh if exceptions flag is set.
2611
26122008-10-21 Diego Novillo <dnovillo@google.com>
2613
2614 * lto.c: Tidy some formatting.
2615 * lto.h: Likewise.
2616
26172008-10-21 Simon Baldwin <simonb@google.com>
2618
2619 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
2620 them is NULL (but not the other).
2621
26222008-10-17 Diego Novillo <dnovillo@google.com>
2623
2624 * ltrans-driver: Divert output from make to a temporary file.
2625 Show it if the call to make failed.
2626
26272008-10-15 Diego Novillo <dnovillo@google.com>
2628
2629 * lto.c (lto_wpa_write_files): Reformat do-while loop.
2630 Do not print TEMP_FILENAME
2631 * ltrans-driver: Call make with -s.
2632
26332008-10-15 Diego Novillo <dnovillo@google.com>
2634
2635 * lto-symtab.c (lto_symtab_merge_decl): Do not force
2636 TREE_STATIC on global symbols.
2637
26382008-10-14 Ollie Wild <aaw@google.com>
2639
2640 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
2641 (LTRANS_DRIVER_EXE): Add.
2642 (lto.all.cross): Add LTRANS_DRIVER_EXE.
2643 (lto.all.encap): Add LTRANS_DRIVER_EXE.
2644 (lto.install.common): Remove ltrans-driver.
2645 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
2646 (LTRANS_DRIVER_EXE): New build rule.
2647 * config-lang.in (compilers): Add ltrans-driver.
2648
26492008-10-14 Diego Novillo <dnovillo@google.com>
2650
2651 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
2652 of program name.
2653
26542008-10-13 Ollie Wild <aaw@google.com>
2655
2656 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
2657 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
2658 * ltrans-driver (LTRANS_FLAGS): Remove.
2659
26602008-10-08 Doug Kwan <dougkwan@google.com>
2661
2662 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
2663 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
2664 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
2665 from lto_fixup_state to here.
2666 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
2667 just a free-list. Fix up types also. Move decl merging code to
2668 lto_fixup_tree.
2669 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
2670 object.
2671 (lto_fixup_decls): Use another pointer set to avoid multiple
2672 walking of nodes except for DECLs to be replaced. Pass an
2673 lto_fixup_data_t object to tree-walker.
2674
26752008-10-08 Rafael Espindola <espindola@google.com>
2676
2677 * lto-symtab.c (lto_symtab_set_resolution): New.
2678 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
2679 lto_symtab_get_resolution.
2680 (lto_symtab_prevailing_decl): Return decl for non public decls.
2681 (lto_symtab_get_resolution): New.
2682 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
2683
26842008-10-06 Rafael Espindola <espindola@google.com>
2685
2686 * lto-lang.c: Include cgraph.h.
2687 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2688 input_cgraph): Moved from lto-cgraph.c.
2689 (LANG_HOOKS_INPUT_CGRAPH): New.
2690
26912008-10-03 Rafael Espindola <espindola@google.com>
2692
2693 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
2694
26952008-10-03 Rafael Espindola <espindola@google.com>
2696
2697 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
2698 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
2699 prevailing definition. Don't mark TREE_NOTHROW differences.
2700 * lto.c (lto_fixup_tree): New.
2701 (lto_fixup_state): New.
2702 (lto_fixup_state_aux): New.
2703 (free_decl): New.
2704 (lto_fixup_decls): New.
2705 (lto_main): Call lto_fixup_decls.
2706
27072008-10-02 Ollie Wild <aaw@google.com>
2708
2709 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
2710 and Init.
2711 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
2712 * lto-lang.c (lto_post_options): Add validation and fixups for
2713 -fltrans and -fwpa.
2714
27152008-10-02 Rafael Espindola <espindola@google.com>
2716
2717 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
2718 lto_symtab_merge_decl): Return void.
2719 (lto_symtab_prevailing_decl): New.
2720
27212008-09-30 Rafael Espindola <espindola@google.com>
2722
2723 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
2724 defined symbols.
2725 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
2726 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
2727 Check for already defined symbols.
2728 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
2729 (LTO_IDENTIFIER_RESOLUTION): Remove.
2730 (LTO_DECL_RESOLUTION): New.
2731
27322008-09-30 Rafael Espindola <espindola@google.com>
2733
2734 * lto.c (lto_read_decls): Use new input_tree signature.
2735
27362008-09-26 Doug Kwan <dougkwan@google.com>
2737
2738 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
2739 bodies affected by exception attribute merging of DECLs.
2740 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
2741 merging.
2742
27432008-09-25 Rafael Espindola <espindola@google.com>
2744
2745 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
2746 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
2747 * lto-symtab.c (lto_symtab_compatible): New.
2748 (lto_symtab_overwrite_decl): New.
2749 (lto_symtab_merge_decl): Refactor to use the above functions
2750 and the resolution from lang_identifier.
2751 * lto-tree.h: Include plugin-api.h.
2752 (lang_identifier): Add resolution.
2753 (LTO_IDENTIFIER_RESOLUTION): New.
2754
27552008-09-25 Ollie Wild <aaw@google.com>
2756
2757 * lang.opt (fltrans-output-list=): New option.
2758 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
2759
27602008-09-25 Rafael Espindola <espindola@google.com>
2761
2762 * lto.c (lto_resolution_read): Initialize ret;
2763
27642008-09-24 Ollie Wild <aaw@google.com>
2765
2766 * lto.c (sys/mman.h): Move include.
2767 (lto_wpa_write_files): Return a list of written files.
2768 (lto_execute_ltrans): New function.
2769 (lto_main): Call lto_execute_ltrans.
2770 (ltrans-driver): New file.
2771 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
2772 (DEAULT_LTRANS_DRIVER_LEN): New macro.
2773 (lto_init_options): Initialize ltrans_driver.
2774 (lto_handle_option): Fix incorrect default output value.
2775 * lang.opt (fltrans-driver=): New option.
2776 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
2777 (lto.install-common): Add lto/ltrans-driver.
2778
27792008-09-24 Rafael Espindola <espindola@google.com>
2780
2781 * Make-lang.in (LTO_OBJS): Add lto/common.o.
2782 (lto/lto.o): Depend on lto/common.h.
2783 (lto/common.o): New.
2784 * lang.opt (resolution): New.
2785 * lto-lang.c (resolution_file_name): New.
2786 (lto_handle_option): Handle OPT_resolution.
2787 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
2788 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
2789 pass it to lto_symtab_merge_decl.
2790 * lto.c: Include common.h.
2791 (lto_read_decls): Add resolutions and resolutions_size arguments.
2792 Initialize data_in.globals_resolution and
2793 data_in.globals_resolution_size.
2794 (index_and_symbol_resolution): New.
2795 (lto_resolution_read): New.
2796 (lto_file_read): Add argument resolution_file.
2797 Read resolution.
2798 * lto.h (resolution_file_name): New.
2799
28002008-09-23 Rafael Espindola <espindola@google.com>
2801
2802 * common.c: Update description.
2803 * common.h: Update description.
2804
28052008-09-23 Rafael Espindola <espindola@google.com>
2806
2807 * common.c: Moved from lto-plugin.
2808 * common.h: Moved from lto-plugin.
2809
28102008-09-22 Doug Kwan <dougkwan@google.com>
2811
2812 * lto.c (VEC(bitmap,heap)): Declare.
2813 (lto_materialize_function): Handle WAP mode specially.
2814 (lto_add_inline_clones): New.
2815 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
2816 return a bitmap of inlined decls.
2817 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
2818 (lto_main): Call reset_inline_failed to reset inlining states.
2819 Check call-graph after WPA inlining.
2820 * lto-lang.c (lto_init): Do not clear flag_generate_lto
2821 unconditionally.
2822
28232008-09-19 Doug Kwan <dougkwan@google.com>
2824
2825 lto.c (lto_main): Remove unsued wrapper code.
2826 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
2827
28282008-09-19 Rafael Espindola <espindola@google.com>
2829
2830 * lto-symtab.c: Include lto-tree-in.h.
2831 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
2832 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
2833 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
2834
28352008-09-17 Paolo Bonzini <bonzini@gnu.org>
2836 Rafael Avila de Espindola <espindola@google.com>
2837
2838 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
2839 COMPOUND_LITERAL_EXPR_DECL): Remove.
2840 (emit_local_var): Remove.
2841 (lto_expand_expr): Remove.
2842 (lto_staticp): Remove.
2843 (LANG_HOOKS_EXPAND_EXPR): Remove.
2844 (LANG_HOOKS_STATICP): Remove.
2845
28462008-09-11 Diego Novillo <dnovillo@google.com>
2847
2848 * lto-lang.c: Include except.h and libfuncs.h.
2849 (lto_init_eh): New.
2850 (lto_init): Call it.
2851 Set flag_generate_lto to 0.
2852 * Make-lang.in (lto-lang.o): Add dependency on except.h
2853 and libfuncs.h.
2854
28552008-09-09 Bill Maddox <maddox@google.com>
2856
2857 * lto-lang.c: Include header file expr.h.
2858 (COMPOUND_LITERAL_EXPR_DECL_STMT,
2859 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
2860 (emit_local_var): Copied from c-semantics.c.
2861 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
2862 and c_staticp in c-common.c.
2863 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
2864
28652008-09-08 Diego Novillo <dnovillo@google.com>
2866
2867 * lto-lang.c (lto_global_bindings_p): Return 1 during
2868 IPA passes.
2869
28702008-09-07 Diego Novillo <dnovillo@google.com>
2871
2872 * lto.c: Tidy formatting.
2873
28742008-08-04 Bill Maddox <maddox@google.com>
2875
2876 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
2877
28782008-09-03 Doug Kwan <dougkwan@google.com>
2879
2880 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
2881 CIF_OK instead of NULL.
2882
28832008-09-02 Diego Novillo <dnovillo@google.com>
2884 Simon Baldwin <simonb@google.com>
2885
2886 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
2887 c_common_type_for_size.
2888 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
2889 (lto_init): Call linemap_add.
2890 (signed_and_unsigned_types): Remove.
2891
28922008-08-29 Diego Novillo <dnovillo@google.com>
2893
2894 * lto-lang.c (handle_noreturn_attribute): New local function.
2895 (handle_const_attribute): New local function.
2896 (handle_malloc_attribute): New local function.
2897 (handle_pure_attribute): New local function.
2898 (handle_novops_attribute): New local function.
2899 (handle_nonnull_attribute): New local function.
2900 (handle_nothrow_attribute): New local function.
2901 (handle_sentinel_attribute): New local function.
2902 (handle_type_generic_attribute): New local function.
2903 (handle_format_attribute): New local function.
2904 (handle_format_arg_attribute): New local function.
2905 (lto_attribute_table): Declare.
2906 (lto_format_attribute_table): Declare.
2907 (lto_init_attributes): New local function.
2908 (lto_define_builtins): Call it.
2909 Call targetm.init_builtins and build_common_builtin_nodes.
2910 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
2911 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
2912
29132008-08-28 Diego Novillo <dnovillo@google.com>
2914
2915 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
2916 $(GIMPLE_H).
2917 (lto-symtab.o): Add dependency on $(GIMPLE_H).
2918 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
2919 * lto-symtab.c: Include gimple.h.
2920 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
2921 TREE_CHAIN.
2922
29232008-08-27 Doug Kwan <dougkwan@google.com>
2924
2925 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
2926 gt-lto-lto.h): New includes.
2927 (lto_materialize_function): Do not read in function body in WPA mode.
2928 Format a line to fit in 80 columns.
2929 (lto_cgraph_node_sets): New garbage collected variable.
2930 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
2931 New functions.
2932 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
2933 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
2934 variable LTO_SECTION_IN_H.
2935 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
2936 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
2937 with variable LTO_SECTION_IN_H.
2938 * config-lang.in (gtfiles): Add lto/lto.c.
2939 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
2940 merged DECL_RESULT correctly.
2941
29422008-08-26 Bill Maddox <maddox@google.com>
2943
2944 * lto-lang.c Include tree-gimple.h.
2945 (lto_mark_addressable): Call mark_addressable rather than
2946 asserting.
2947 (lto_post_options): Suppress debug info generation.
2948 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
2949
29502008-08-25 Bill Maddox <maddox@google.com>
2951
2952 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
2953 assertion and leave an explanatory comment in its place.
2954
29552008-08-21 Doug Kwan <dougkwan@google.com>
2956
2957 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
2958 of common nodes instead of computing locallly.
2959 (lto_read_in_decl_state): New.
2960 (lto_read_decls): Change code for udpate in struct lto_decl_header.
2961 Read global and per-function in-decl states.
2962 * Make-lang.in (LTO_H): Update dependency.
2963 (lto/lto.o): Same.
2964 (lto-symtab.c): Merge (revision 139039)
2965 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
2966
29672008-08-21 Rafael Espindola <espindola@google.com>
2968
2969 * config-lang.in (target_libs): New.
2970
29712008-08-20 Bill Maddox <maddox@google.com>
2972
2973 * lto.c (current_lto_file): Remove GTY marker from static
2974 variable. Remove include of file gt-lto-lto.h.
2975 * Make-lang.in: Remove dependency of lto/lto.o on
2976 gt-lto-lto.h.
2977 * lto-elf.c (lto_file_close): Removed.
2978 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
2979 allocate lto_elf_file object.
2980 (lto_elf_file_close): Free lto_elf_file object after close.
2981 * lto.h (struct lto_file_struct): Remove GTY marker.
2982 * config-lang.in: Remove lto/lto.h and lto/lto.c from
2983 gtfiles.
2984
29852008-08-20 Bill Maddox <maddox@google.com>
2986
2987 * lto.c (lto_read_decls): Provide dummy argument to input_tree
2988 to conform to its new signature.
2989 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
2990 on discarded node here, now called in global_vector_fixup.
2991
29922008-08-09 Bill Maddox <maddox@google.com>
2993
2994 * lto.c (preload_common_nodes): Verify that fileptr_type_node
2995 has not been set to a front-end-specific value.
2996
29972008-08-05 Doug Kwan <dougkwan@google.com>
2998
2999 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3000 build breakage.
3001
30022008-07-30 Bill Maddox <maddox@google.com>
3003
3004 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3005 Remove obsolete comments.
3006 (lto_read_decls): Remove initialization of deleted field data_in.global.
3007 Tidy up comments.
3008 (lto_main): Remove redundant initialization of section_hash_table.
3009 * lto-elf.c: Removed obsolete comments.
3010 * lto.h: Tidy up comments.
3011 * lto-symtab.c (lto_least_common_multiple): New function.
3012 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3013 Tidy up comments.
3014
30152008-07-25 Diego Novillo <dnovillo@google.com>
3016 Bill Maddox <maddox@google.com>
3017
3018 * lto.c: Re-order include files.
3019 Include lto-section-out.h.
3020 (preload_common_nodes): Add debugging output.
3021 Add new local INDEX_TABLE.
3022 Call preload_common_node.
3023 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3024
30252008-07-13 Bill Maddox <maddox@google.com>
3026
3027 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3028 unwanted scaling during pointer addition.
3029
30302008-07-11 Bill Maddox <maddox@google.com>
3031 Diego Novillo <dnovillo@google.com>
3032
3033 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3034 Make code const-correct.
3035 (lto_file_read): Fix C++ compatibility warnings.
3036 (lto_read_section_data): Fix C++ compatibility warnings.
3037 (lto_get_section_data): Use CONST_CAST to avoid warning when
3038 const pointer passed to free.
3039 * lto-elf.c (lto_elf_build_section_table): Fix C++
3040 compatibility warnings.
3041 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3042 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3043 (lto_get_current_out_file): Fix C++ compatibility warnings.
3044
30452008-07-11 Diego Novillo <dnovillo@google.com>
3046
3047 * Make-lang.in (lto-warn): Define.
3048
30492008-07-03 Simon Baldwin <simonb@google.com>
3050
3051 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3052 LTO_STREAM_DEBUGGING.
3053
30542008-06-27 Ollie Wild <aaw@google.com>
3055
3056 * lto-elf.c (lto-section-out.h): New include.
3057 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3058 and data members.
3059 (cached_file_attrs): New static variable.
3060 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3061 Use cached_file_attrs for checking bits.
3062 (lto_elf_build_section_table): Remove elf_file argument from
3063 lto_elf_get_shdr and lto_elf_free_shdr calls.
3064 (DEFINE_INIT_SHDR): New macro.
3065 (init_shdr32, init_shdr64): New functions defined via the
3066 DEFINE_INIT_SHDR macro.
3067 (lto_elf_begin_section_with_type): New function.
3068 (lto_elf_begin_section): New function.
3069 (lto_elf_append_data): New function.
3070 (lto_elf_end_section): New function.
3071 (DEFINE_VALIDATE_EHDR): New macro.
3072 (validate_ehdr32, validate_ehdr64): New functions defined via the
3073 DEFINE_VALIDATE_EHDR macro.
3074 (validate_file): New function.
3075 (DEFINE_INIT_EHDR): New macro.
3076 (init_ehdr32, init_ehdr64): New functions defined via the
3077 DEFINE_INIT_EHDR macro.
3078 (init_ehdr): New function.
3079 (lto_elf_file_open): Add support for writable files. Move some
3080 validation logic to validate_file.
3081 (lto_elf_file_close): Add support for writable files. Write file data
3082 and free data blocks.
3083 (current_out_file): New static variable.
3084 (lto_set_current_out_file): New function.
3085 (lto_get_current_out_file): New function.
3086 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3087 Add temporary initialization for testing ELF serialization.
3088 * lto.h (lto-section-out.h): New include.
3089 (struct lto_file_struct): Slight modification to comment.
3090 (lto_elf_file_open): Add writable parameter.
3091 (lto_elf_begin_section): New function declaration.
3092 (lto_elf_append_data): New function declaration.
3093 (lto_elf_end_section): New function declaration.
3094 (lto_set_current_out_file, lto_get_current_out_file): New function
3095 declarations.
3096 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3097 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3098 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3099 * Make-lang.in (LTO_H): Add lto-section-out.h.
3100
31012008-06-12 Ollie Wild <aaw@google.com>
3102
3103 * lto.h (struct lto_file_vtable_struct): Remove.
3104 (struct lto_file_struct): Remove vtable member.
3105 * lto-elf.c (lto_file_init): Remove vtable argument.
3106 (lto_elf_map_optional_lto_section): Remove.
3107 (lto_elf_unmap_section): Remove.
3108 (lto_elf_file_vtable): Remove.
3109 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3110 lto_file_init call.
3111 (lto_elf_find_section_data): Remove.
3112
31132008-06-11 Ollie Wild <aaw@google.com>
3114
3115 * lto.c (lto_file_read): Add const qualifier to data variable.
3116
31172008-06-11 Diego Novillo <dnovillo@google.com>
3118
3119 Merge from lto-streamber sub-branch.
3120
3121 2008-06-04 Ollie Wild <aaw@google.com>
3122
3123 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
3124 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
3125
3126 2008-05-28 Bill Maddox <maddox@google.com>
3127
3128 Replace the DWARF reader in the LTO front-end.
3129
3130 * lto.c: Include lto-tree-in.h, lto-tags.h.
3131 (enum DWARF2_class, DW_cl_constant, struct
3132 DWARF2_form_data, struct lto_context,
3133 lto_fd_init, lto_info_fd_init,
3134 lto_abbrev_fd_init, lto_info_fd_close,
3135 lto_file_init, lto_file_close,
3136 lto_file_corrupt_error, lto_abi_mismatch_error,
3137 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
3138 lto_read_uleb128, lto_read_sleb128,
3139 lto_read_initial_length, lto_abbrev_read_attrs,
3140 lto_abbrev_read, lto_abbrev_read_lookup,
3141 lto_read_section_offset,
3142 lto_read_comp_unit_header, find_cu_for_offset,
3143 lto_get_file_name,
3144 lto_resolve_reference,lto_read_form,
3145 attribute_value_as_int,
3146 make_signed_host_wide_int,
3147 attribute_value_as_constant, lto_cache_hash,
3148 lto_cache_eq, lto_cache_store_DIE,
3149 lto_cache_lookup_DIE, lto_find_integral_type,
3150 lto_find_integral_type_1,
3151 LTO_BEGIN_READ_ATTRS_UNCHECKED,
3152 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
3153 lto_unsupported_attr_error, lto_get_identifier,
3154 lto_read_referenced_type_DIE,
3155 lto_read_compile_unit_DIE,
3156 lto_read_array_type_DIE,
3157 lto_read_structure_union_class_type_DIE,
3158 lto_read_enumerator_DIE,
3159 lto_read_enumeration_type_DIE,
3160 lto_read_only_for_child_DIEs,
3161 lto_read_only_for_child_DIEs,
3162 lto_read_member_DIE, lto_read_abbrev,
3163 lto_read_variable_formal_parameter_constant_DIE,
3164 lto_get_body): Removed.
3165 (preload_common_nodes): New function.
3166 (lto_read_decls): Convert for new global streamer.
3167 (lto_materialze_file_data,
3168 lto_read_subroutine_type_subprogram_die,
3169 lto_read_unspecified_parameters_DIE,
3170 lto_read_typedef_DIE,
3171 lto_read_pointer_reference_type_DIE,
3172 lto_read_subrange_type_DIE,
3173 lto_read_base_type_DIE,
3174 lto_read_const_volatile_restrict_type_DIE,
3175 lto_read_namespace_DIE,
3176 lto_read_unspecified_type_DIE, lto_read_DIE,
3177 lto_read_child_DIEs, lto_collect_child_DIEs):
3178 Removed.
3179 (lto_info_read, lto_set_cu_context): Removed.
3180 (lto_file_read): Convert for new global streamer.
3181 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
3182 lto_resolve_var_ref, lto_resolve_fn_ref,
3183 lto_resolve_field_ref, lto_resolve_typedecl_ref,
3184 lto_resolve_namespacedecl_ref): Removed.
3185 (lto_file_init, lto_file_close): Moved to lto-elf.c.
3186 * lto-tree.h (lto_symtab_merge_var,
3187 lto_symtab_mergee_fun): Declare here.
3188 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
3189 (lto_elf_file_open): Removed code to read DWARF debug sections.
3190 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
3191 DWARF2_CompUnit, lto_die_ptr,
3192 lto_die_cache_entry, lto_fd, lto_info_fd,
3193 lto_abbrev_fd): Removed.
3194 (lto_file): Removed debug_info and debug_abbrev fields.
3195 (lto_ref): Removed.
3196 (lto_file_init, lto_file_close,
3197 lto_resolve_type_ref, lto_resolve_var_ref,
3198 lto_resolve_fn_ref, lto_resolve_field_ref,
3199 lto_resolve_typedecl_ref,
3200 lto_resolve_namespacedecl_ref,
3201 lto_get_file_name): Removed declarations.
3202 (lto_symtab_merge_var, lto_symtab_merge_fn):
3203 Declarations moved to lto-tree.h.
3204 * lto-symtab.c (lto_compatible_attributes_p):
3205 Lobotomize this, as it barfs on "Hello, world!".
3206 * lto-section-out.c: Include lto-tree-out.h.
3207 (lto_hash_global_slot_node,
3208 lto_eq_global_slot_node, preload_common_nodes,
3209 write_global_stream, write_global_references):
3210 New functions.
3211 (produce_asm_for_decls): Convert for new global streamer.
3212 * lto-section-out.h (lto_hash_global_slot_node,
3213 lto_eq_global_slot_node): Declare.
3214
32152008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
3216 Jan Hubicka <jh@suse.cz>
3217
3218 * lto.c (sys/mman.h, tree-pass.h): New includes.
3219 (lto_materialize_constructors_and_inits,
3220 lto_materialize_function): Keeps length of section.
3221 (lto_materialize_cgraph): Removed.
3222 (lto_read_decls): Initialize fd field.
3223 (lto_file_read): Different return type and removed much code to
3224 lto_main.
3225 (page_mask): New variable.
3226 (lto_read_section_data, get_section_data, free_section_data): New
3227 functions.
3228 (lto_main): Now calls pass manager, sets the hooks so that the ipa
3229 passes can get the section data.
3230
32312008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
3232
3233 * lto.h (lto_read_decls): Made local.
3234 (lto_input_function_body, lto_input_constructors_and_inits,
3235 lto_input_cgraph): Declarations moved to lto-section-in.h.
3236 * lto-section-in.c: Moved to .. .
3237 * lto-cgraph-in.c: Ditto.
3238 * lto-section-in.h: Ditto.
3239 * lto-function-in.c: Ditto.
3240 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
3241 (lto_insert_block): Removed.
3242 (LANG_HOOKS_INSERT_BLOCK): Removed.
3243 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
3244 lto-section-in.o): Rules moved to lto/Makefile.in.
3245
3246
32472008-05-16 Ollie Wild <aaw@google.com>
3248
3249 * lto-lang.c (tree-inline.h): Include.
3250 (lto_post_options): New function.
3251 (LANG_HOOKS_POST_OPTIONS): Define.
3252 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
3253 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
3254
32552008-05-13 Diego Novillo <dnovillo@google.com>
3256
3257 * lto-function-in.c (input_ssa_names): Call
3258 make_ssa_name_fn instead of make_ssa_name.
3259
32602008-05-12 Diego Novillo <dnovillo@google.com>
3261
3262 * lto-cgraph-in.c (overwrite_node): Update references to
3263 inline summary fields.
3264 * lto-function-in.c (input_expr_operand): Do not handle
3265 STRUCT_FIELD_TAG.
3266
32672008-05-09 Ollie Wild <aaw@google.com>
3268
3269 * lang.opt: New file.
3270 * lto-lang.c (lto_init_options): New function.
3271 (lto_handle_option): New function.
3272 (lto_init): Move initialization of flag_unit_at_a_time to
3273 lto_init_options.
3274 (LANG_HOOKS_INIT_OPTIONS): Define.
3275 (LANG_HOOKS_HANDLE_OPTION): Define.
3276
32772008-04-29 Ollie Wild <aaw@google.com>
3278
3279 * lto.c (lto_read_namespace_DIE): New function.
3280 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
3281 NAMESPACE_DECL DIE's.
3282 (lto_resolve_namespacedecl_ref): New function.
3283 * lto.h (lto_resolve_namespacedecl_ref): New function.
3284 * lto-section-in.c (lto_read_decls): Read namespace declarations.
3285 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
3286 and num_namespace_decls.
3287 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
3288 * lto-lang.c (lto_init_ts): New function.
3289 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
3290
32912008-04-16 Ollie Wild <aaw@google.com>
3292
3293 * lto-function-in.c (input_type_ref): Updated function description.
3294
32952008-04-16 Ollie Wild <aaw@google.com>
3296
3297 * lto-function-in.c (input_type_ref_1): New function.
3298 (input_type_ref): Split into two functions.
3299 (input_function): Add support for type contexts.
3300
33012008-04-16 Ollie Wild <aaw@google.com>
3302
3303 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
3304 section name
3305
33062008-04-16 Ollie Wild <aaw@google.com>
3307
3308 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
3309 list of supported languages.
3310
33112008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
3312
3313 Merge with mainline @133491.
3314
33152008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
3316 Jan Hubicka <jh@suse.cz>
3317
3318 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
3319 fd->unmaterialized_fndecls.
3320 (lto_get_file_name, lto_materialize_cgraph): New function.
3321 (lto_materialize_constructors_and_inits,
3322 lto_materialize_function): Read info directly from elf file.
3323 (lto_file_read): Made local and initialize dictionary so that
3324 other lto sections can be read without reprocessing the elf file.
3325 (lto_main): Read all functions after all files have been processed
3326 for their types, globals and cgraph.
3327 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
3328 dependencies.
3329 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
3330 (hash_name, eq_name, lto_elf_build_section_table): New functions.
3331 (lto_elf_read_symtab): Removed function.
3332 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
3333 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
3334 (lto_file_read): Made local.
3335 (lto_get_file_name, lto_elf_build_section_table,
3336 lto_input_cgraph):
3337 New function.
3338 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
3339 New functions.
3340 (lto_read_decls): Get the file name.
3341 * lto-cgraph-in.c: New file.
3342 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
3343 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
3344 (input_labels): Fixed latent sizeof issue.
3345 (input_function): Build stmt array to set call sites into cgraph
3346 edges.
3347 (lto_read_body): Reset cfun->curr_properties.
3348 * lto_section_in.h (lto_section_slot): New structure.
3349 (section_hash_table.lto_file_decl_data): New field.
3350
3351
33522008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
3353
3354 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
3355 reconstruct static initializers.
3356 (lto_get_body, lto_materialize_function): Add lto_section_type as
3357 a parameter.
3358 (lto_materialize_constructors_and_inits,
3359 lto_materialize_file_data): New function.
3360 (lto_materialize_function,
3361 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
3362 unmap_section and map_fn_body to map_section.
3363 (lto_set_cu_context): Process functions and static inits
3364 differently.
3365 * Make-lang.in (LTO_H, lto/lto-function-in.o,
3366 lto/lto-section-in.o): Update dependencies.
3367 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
3368 lto_section_type parameter.
3369 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
3370 * lto.h (lto_file_vtable_struct): Removed two of the fields and
3371 renamed the other two so that there is only one map function and
3372 one unmap function and each takes a section type parameter.
3373 (lto_read_function_body): Renamed to lto_input_function_body and
3374 added file_data parameter.
3375 (lto_read_var_init): Removed.
3376 (lto_input_constructors_and_inits): New function.
3377 * lto-section-in.c (lto_read_decls): New function.
3378 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
3379 var_decls, type_decls, types to lto_file_decl_data.
3380 (input_type_ref, input_expr_operand, lto_read_body): Get
3381 field_decls, fn_decls, var_decls, type_decls, types from different
3382 structure.
3383 (input_globals, input_constructor, lto_read_var_init): Removed.
3384 (input_constructors_or_inits): New function.
3385 (lto_read_function_body, lto_input_constructors_and_inits):
3386 Renamed to lto_input_function_body and takes file_data parameter.
3387 * lto-section-in.h (lto_file_decl_data): New structure.
3388
33892008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3390
3391 * lto-function-in.c (input_globals.c): Changed input type to
3392 lto_function_header.
3393 (input_bb): Removed code to deserialize the stmt number.
3394 (input_function): Renumber all stmts after they are input.
3395 (lto_read_body, lto_read_function_body, lto_read_var_init):
3396 Changed to used new header format and enum section_type.
3397 *lto-lang.c (success): Removed.
3398
33992008-01-28 Nathan Froyd <froydnj@codesourcery.com>
3400
3401 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
3402 (lto_elf_free_sym): Likewise.
3403
3404 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
3405 (lto_elf_build_init): Likewise.
3406
34072008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
3408
3409 * lto-read.c: Renamed to lto-function-in.c.
3410 (input_1_unsigned): Moved to lto-section-in.c and renamed
3411 lto_input_1_unsigned.
3412 (input_uleb128): Moved to lto-section-in.c and renamed
3413 lto_input_uleb128.
3414 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
3415 lto_input_widest_uint_uleb128.
3416 (input_sleb128): Moved to lto-section-in.c and renamed
3417 lto_input_sleb128.
3418 (input_integer): Moved to lto-section-in.c and renamed
3419 lto_input_integer.
3420 (debug_in_fun): Moved to lto-section-in.c and renamed
3421 lto_debug_in_fun.
3422 (input_block): Moved to lto-section-in.h and renamed
3423 lto_input_block.
3424 (input_expr_operand): Fixed to allow lists with more than one
3425 element.
3426 * lto-section-in.h: New file.
3427 * lto-section-in.c: New file with changes from above.
3428 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
3429 (lto-section-in.o): New rule.
3430
34312007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3432
3433 * lto-read.c (input_expr_operand): Mark static and external
3434 VAR_DECLs as needed.
3435
34362007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3437
3438 * lto-read.c (input_integer): Use the correct shift amount.
3439
34402007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3441
3442 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
3443 (LANG_HOOKS_NAME): Define.
3444
34452007-12-27 Nathan Froyd <froydnj@codesourcery.com>
3446
3447 * lto.c (lto_find_integral_type): Define as a macro. Rename the
3448 original function to...
3449 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
3450 don't have a base type.
3451 (lto_read_enumeration_type_DIE): Examine the values of the
3452 enumeration to determine whether we can use an unsigned type for
3453 the base type of the enumeration.
3454
34552007-12-24 Nathan Froyd <froydnj@codesourcery.com>
3456
3457 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
3458 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
3459
34602007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3461
3462 * lto-lang.c (lto_types_compatible_p): New function.
3463 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
3464
34652007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3466 Kenneth Zadeck <zadeck@naturalbridge.com>
3467
3468 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
3469 (input_local_vars): Read in DECL_INITIAL and context for local
3470 statics that need to be put in unexpanded_vars_list.
3471
34722007-12-21 Nathan Froyd <froydnj@codesourcery.com>
3473
3474 * lto-read.c (input_real): Use a separate null-terminated buffer
3475 for calling real_from_string.
3476 (input_expr_operand): If we take the address of a FUNCTION_DECL,
3477 tell cgraph that it's needed.
3478
34792007-12-19 Doug Kwan <dougkwan@google.com>
3480
3481 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
3482
34832007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3484
3485 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
3486 (lto_file_read): Reset the members of 'context' every time we read
3487 a toplevel DIE, with special attention to last_param_type.
3488
34892007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3490
3491 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
3492 'declaration'. Set the assembler name for non-public functions.
3493
34942007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
3495
3496 * lto_read.c (data_in.unexpanded_indexes): New array.
3497 (input_local_var): Added code to read in unexpanded_var_list
3498 indexes for variables. Only read in DECL_CHAIN field for
3499 parameters.
3500 (input_local_vars): Added code to rebuild unexpanded_var_list in
3501 order using unexpanded_indexes.
3502 (input_function): Added code to set DECL_CONTEXT for functions.
3503
35042007-12-13 Doug Kwan <dougkwan@google.com>
3505
3506 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
3507 in pointer and reference types.
3508
35092007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3510
3511 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
3512 RESULT_DECL.
3513
35142007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3515
3516 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
3517 already read the DIE.
3518 (lto_get_body): New function, split out from...
3519 (lto_materialize_function): ...here. Call it.
3520 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
3521 determine DECL_EXTERNAL.
3522 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
3523 FUNCTION_DECLs when necessary. Use the type of the actual
3524 function definition if we are unable to easily merge types. Ignore
3525 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
3526 necessary.
3527
35282007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3529
3530 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
3531
35322007-12-12 Bill Maddox <maddox@google.com>
3533
3534 Revert
3535 2007-12-07 Bill Maddox <maddox@google.com>
3536
3537 * lto.c (lto_str_fd_init): New function.
3538 (lto_str_fd_close): New function.
3539 (lto_file_init): Call lto_str_fd_init.
3540 (lto_file_close): Call lto_str_fd_close.
3541 (lto_str_read): New function. Read debug string table.
3542 (lto_str_lookup): New function. Get string for debug
3543 string table offset.
3544 (lto_read_form): Recognize DW_FORM_strp.
3545 (lto_file_read): Invoke lto_str_read.
3546
3547 * lto-elf.c (lto_elf_file_open): Read raw section data
3548 for the .debug_str section, if present.
3549
3550 * lto.h (struct lto_str_fd_struct): New struct.
3551 (struct lto_file_struct): Added new field DEBUG_STR
3552 to hold the file descriptor for the debug string table.
3553
35542007-12-07 Bill Maddox <maddox@google.com>
3555
3556 * lto.c (lto_str_fd_init): New function.
3557 (lto_str_fd_close): New function.
3558 (lto_file_init): Call lto_str_fd_init.
3559 (lto_file_close): Call lto_str_fd_close.
3560 (lto_str_read): New function. Read debug string table.
3561 (lto_str_lookup): New function. Get string for debug
3562 string table offset.
3563 (lto_read_form): Recognize DW_FORM_strp.
3564 (lto_file_read): Invoke lto_str_read.
3565
3566 * lto-elf.c (lto_elf_file_open): Read raw section data
3567 for the .debug_str section, if present.
3568
3569 * lto.h (struct lto_str_fd_struct): New struct.
3570 (struct lto_file_struct): Added new field DEBUG_STR
3571 to hold the file descriptor for the debug string table.
3572
35732007-12-07 Nathan Froyd <froydnj@codesourcery.com>
3574
3575 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
3576 Grow the basic_block_info and label_to_block_map vectors if
3577 necessary. Read in the block chain.
3578
35792007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3580
3581 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
3582
35832007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3584
3585 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
3586
35872007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3588
3589 * lto-read.c (input_expr_operand): Don't check for MTAGs.
3590 (lto_read_body): Don't declare PROP_alias.
3591
35922007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3593
3594 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
3595 argument type information.
3596
35972007-12-03 Nathan Froyd <froydnj@codesourcery.com>
3598
3599 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3600 TREE_THIS_VOLATILE if the associated type is a volatile type.
3601 (lto_materialize_function): Remove call to init_ssa_operands.
3602 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
3603 variable when reading an SSA_NAME. Do the same when reading a
3604 RESULT_DECL, a RETURN_EXPR, or an MTAG.
3605 (input_cfg): Call init_ssa_operands.
3606 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
3607 Move call to init_tree_ssa...
3608 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
3609 add_referenced_var on any variables referenced from the body of the
3610 function. Inform the rest of the compiler we are in SSA form and
3611 inform later passes about the current properties.
3612
36132007-11-30 Nathan Froyd <froydnj@codesourcery.com>
3614
3615 * lto.c (lto_materialize_function): Add FIXME.
3616
36172007-11-29 Nathan Froyd <froydnj@codesourcery.com>
3618
3619 * lto-lang.c (enum built_in_attribute): New enum.
3620 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
3621 built_in_attributes): New variables.
3622 (def_builtin_1): New function.
3623 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
3624
36252007-11-28 Nathan Froyd <froydnj@codesourcery.com>
3626
3627 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3628 DECL_SOURCE_LOCATION for debugging purposes.
3629 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
3630 bitfield, use the type specified by the DIE for TREE_TYPE and defer
3631 laying out the decl until later.
3632 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
3633 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
3634 TREE_ADDRESSABLE.
3635 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
3636 operand of an ADDR_EXPR.
3637 * lto-lang.c (enum lto_builtin_type): New enum.
3638 (builtin_type): New typedef.
3639 (builtin_types, string_type_node, const_string_type_node,
3640 wint_type_node, intmax_type_node, uintmax_type_node,
3641 signed_size_type_node): New variables.
3642 (def_fn_type, builtin_type_for_size, lto_define_builtins,
3643 lto_build_c_type_nodes): New functions.
3644 (lto_init): Initialize builtin types.
3645 (lto_set_decl_assembler_name): Let the target machine mangle the
3646 name if the decl is TREE_PUBLIC, otherwise uniquify it.
3647
36482007-11-21 Nathan Froyd <froydnj@codesourcery.com>
3649
3650 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
3651 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
3652 the type is a constant type. Set the assembler name and inform
3653 the rest of the compiler about the new decl if the decl is not
3654 public.
3655 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
3656 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
3657 try to read in function bodies for functions that already have bodies.
3658 * lto-symtab.c (lto_same_type_p): Check for unbounded array
3659 equivalency.
3660 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
3661 Check for whether we matched a builtin function type before calling
3662 lto_same_type_p on the generated type. Permit cases where the
3663 declaration of an array is unbounded, but the definition is bounded.
3664 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
3665 DECL_SIZE_UNIT if necessary.
3666
36672007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3668
3669 * lto-read.c (input_expr_operand): Get types right
3670 for COMPLEX_CST.
3671
36722007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3673
3674 * lto-read.c (make_new_block, input_cfg): Properly set
3675 n_basic_blocks.
3676
36772007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3678
3679 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
3680 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
3681
36822007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3683
3684 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
3685 construct the integer type for bitfields.
3686
36872007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3688
3689 * lto-read.c (data_in.current_node_has_loc): Removed.
3690 (input_line_info): Returns true if node needs line set.
3691 (set_line_info): Always sets line if called.
3692 (clear_line_info): Removed reference to current_node_needs_loc.
3693 (input_expr_operand): Keeps track locally if current node needs a loc.
3694 (input_local_var): Added code to handle DECL_INITIAL for
3695 static local vars. Only set loc if necessary.
3696
36972007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3698
3699 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
3700 DECL_CONTEXT.
3701
37022007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3703
3704 * lto.c: Include langhooks.h.
3705 (lto_find_integral_type): Rework logic to handle the case where
3706 got_byte_size is true, but the bitsize requested and that of the
3707 base_type doesn't match.
3708 (lto_read_variable_formal_parameter_constant_DIE): Only check for
3709 asm_name if we are creating a VAR_DECL.
3710 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
3711 definition.
3712 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
3713 function reference and use the builtin's decl if so. Set the
3714 DECL_CONTEXT of the RESULT_DECL for the function.
3715 * lto-lang.c (registered_builtin_fndecls): New variable.
3716 (lto_getdecls): Return it.
3717 (lto_builtin_function): Chain the new decl onto
3718 registered_builtin_fndecls.
3719
37202007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
3721
3722 * lto-read.c (process_tree_flags, lto_static_init_local):
3723 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
3724 (input_line_info, clear_line_info): Fixed new line number code.
3725 (input_expr_operand): Added type to SWITCH_EXPR.
3726 (lto_read_body): Properly initialized data_in.
3727 Clear line info when leaving.
3728
37292007-11-13 Diego Novillo <dnovillo@google.com>
3730
3731 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3732 Initialize ARTIFICIAL.
3733 (lto_read_subroutine_type_subprogram_DIE): Initialize
3734 SAVED_SCOPE.
3735 * lto-read.c (set_line_info): Remove ; from calls to
3736 LINEMAP_POSITION_FOR_COLUMN.
3737
37382007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3739
3740 * lto-read.c (input_type_ref): Renamed from get_type_ref.
3741 (input_expr_operand, input_local_var): Renamed get_type_ref to
3742 input_type_ref.
3743 (input_expr_operand): Get the types correct for
3744 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
3745
37462007-11-13 Doug Kwan <dougkwan@google.com>
3747
3748 * lto-read.c (input_widest_uint_uleb128): New function.
3749 (input_tree_flags, process_tree_flags, input_line_info,
3750 input_expr_operand, input_local_var, input_phi, input_ssa_names):
3751 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
3752 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
3753 (lto_static_init_local): Add code to assert that lto_flags_type is
3754 wide enough.
3755
37562007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3757
3758 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
3759 (lto_read_subroutine_type_subprogram_DIE): Handle
3760 DW_AT_static_link and DW_AT_specification. Return the
3761 specification if present.
3762 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
3763
37642007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3765
3766 * lto-lang.c: Include target.h.
3767 (registered_builtin_types): New variable.
3768 (lto_type_for_mode): Increase number of modes handled.
3769 (lto_builtin_function): Fix argument list and return the decl.
3770 (lto_register_builtin_type): New function.
3771 (lto_init): Initialize target builtins and language-independent
3772 nodes.
3773 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
3774
37752007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3776
3777 * lto-read.c (input_expr_operand): Added code to properly handle
3778 index filed. Added new RANGE_EXPR case.
3779
37802007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3781
3782 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
3783 (data_in): Added current_node_has_loc field.
3784 (input_line_info, set_line_info, clear_line_info): Added a support
3785 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
3786 did not have on on the source side.
3787 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
3788 numbers too.
3789
37902007-11-09 Doug Kwan <dougkwan@google.com>
3791
3792 * lto-read.c (input_expr_operand): Change type of operand 2 of
3793 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
3794
37952007-11-09 Nathan Froyd <froydnj@codesourcery.com>
3796
3797 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
3798 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
3799 from a DW_AT_specification or DW_AT_abstract_origin attribute to
3800 the new decl we are creating. Move informing the middle end about
3801 the new decl to...
3802 (lto_main): ...here. Inform the middle end about global variables
3803 after we have read in all the input files.
3804 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
3805 variables with internal linkage, so delete the check for internal
3806 linkage. Combine TREE_PUBLIC flags.
3807
38082007-11-08 Nathan Froyd <froydnj@codesourcery.com>
3809
3810 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3811 DW_AT_decl_line.
3812 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
3813 builtin specially. Move check for attribute compatibility
3814 earlier.
3815
38162007-11-07 Nathan Froyd <froydnj@codesourcery.com>
3817
3818 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
3819 * config-lang.in (gtfiles): Add lto.h and lto.c.
3820 * lto-elf.c: Include ggc.h.
3821 (lto_elf_file_open): Allocate elf_file from GC memory.
3822 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
3823 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
3824 in GC memory.
3825 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
3826 (lto_file_close): Free file from GC memory.
3827 (lto_cache_store_DIE): Allocate the new entry in GC memory.
3828 (lto_read_member_DIE): Fix declaration.
3829 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
3830 in GC memory.
3831 (current_lto_file): New variable.
3832 (lto_main): Use it.
3833 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
3834 lto_die_cache_entry): Move to...
3835 * lto.h: ...here and add GTY markers as appropriate. Delete forward
3836 declarations accordingly.
3837 (struct lto_file_struct): Declare.
3838 (lto_file_vtable): Use it instead of lto_file.
3839
38402007-11-06 Alon Dayan <alond@il.ibm.com>
3841 Kenneth Zadeck <zadeck@naturalbridge.com>
3842
3843 * lto-read.c (process_flags, lto_static_init_local):
3844 read flags of VAR_DECL and FUNCTION_DECL of size>1.
3845 change global array num_flags_for_code to flags_length_for_code.
3846 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
3847
38482007-11-05 Nathan Froyd <froydnj@codesourcery.com>
3849
3850 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
3851 layout functions to compute information about the newly constructed
3852 type.
3853
38542007-11-02 Nathan Froyd <froydnj@codesourcery.com>
3855
3856 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
3857 case to use DECL_RESULT if necessary.
3858
38592007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3860
3861 * lto-read.c (input_tree_list): Removed.
3862 (input_tree_flags): Added parameter to force flags no matter what
3863 tree code.
3864 (input_expr_operand): Added parameter to input_tree_flags.
3865 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
3866 input_expr_operand rather than input_tree_lists.
3867 (input_local_var): Use input_expr_operand to read attributes
3868 rather then input_tree_list.
3869 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
3870
38712007-10-31 Nathan Froyd <froydnj@codesourcery.com>
3872
3873 * lto.c (lto_read_typedef_DIE): Fix comment typo.
3874 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
3875 TYPE_DECL for it.
3876 * lto-read.c (lto_read_body): Use correct sizes for calculating
3877 type_decls_offset and types_offset.
3878
38792007-10-30 Nathan Froyd <froydnj@codesourcery.com>
3880
3881 * lto-tree.h (union lang_tree_node): Change GTY description to chain
3882 with GENERIC_NEXT.
3883 * config-lang.in (gtfiles): Add lto-lang.c.
3884 * lto-lang.c: Include gt-lto-lto-lang.h.
3885 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
3886 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
3887 (lto/lto-read.o): Likewise.
3888
38892007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3890
3891 * lto-read.c (data_in): Added type_decls and current_col fields.
3892 (string_slot): New type to hold canonized file name.
3893 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
3894 input_line_info, set_line_info, clear_line_info): New functions.
3895 (file_name_hash_table): New hash table.
3896 (input_local_var, input_labels, input_local_vars_index,
3897 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
3898 (input_uleb128): Changed type of byte var.
3899 (input_expr_operand): Large number of changes to get line numbers
3900 correct. Added TYPE_DECL case.
3901 (input_globals): Added code to get TYPE_DECLs processed.
3902 (input_local_var): Added code to process line numbers and
3903 TREE_CHAIN and DECL_CONTEXT.
3904 (input_function, input_constructor): Added call to
3905 clear_line_number.
3906 (lto_static_init_local): Added code to get line numbers correct.
3907 (lto_read_body): Added code to get TYPE_DECLS read and to change
3908 parameters to the calls above that had their parms reorganized.
3909
3910
39112007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3912
3913 * lto.h (lto_resolve_typedecl_ref): Declare.
3914 * lto.c (lto_resolve_typedecl_ref): New function.
3915
39162007-10-29 Mark Mitchell <mark@codesourcery.com>
3917 Nathan Froyd <froydnj@codesourcery.com>
3918
3919 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
3920 DIEs even if we find an abstract origin for this DIE.
3921
39222007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3923
3924 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
3925 RESULT_DECL slightly earlier. Only remember the decl for later
3926 if we successfully merge declarations.
3927
39282007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
3929
3930 * lto-read.c (input_expr_operand): Give label_values the proper
3931 context and provide switch statements with a default type.
3932
39332007-10-23 Nathan Froyd <froydnj@codesourcery.com>
3934
3935 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
3936 * lto.c (lto_materialize_function): ...to here.
3937
39382007-10-22 Nathan Froyd <froydnj@codesourcery.com>
3939
3940 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
3941 * lto.c (lto_info_fd_init): Initialize it.
3942 (lto_info_fd_close): Free it.
3943 (lto_materialize_function): New function.
3944 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
3945 unmaterialized_fndecls.
3946 (lto_file_read): Read in all the function bodies after we have read
3947 all of the DWARF info.
3948 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
3949 reading a function body.
3950
39512007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
3952
3953 * lto-read.c (input_tree_flags): Renamed from input_flags to be
3954 semetric with output_tree_flags. Added call to log flags.
3955 (process_tree_flags): Renamed from process_flags. Fixed a lot of
3956 type issues to make everything consistent with flags being
3957 unsigned HOST_WIDE_INTS.
3958 (input_expr_operand): Added call to
3959 recompute_tree_invariant_for_addr_expr.
3960 (input_local_var): Added debugging for tree_chains. Now calls
3961 input_tree_flags.
3962 (input_phi): Made flags unsigned HOST_WIDE_INT.
3963 (input_ssa_names): Now calls input_tree_flags.
3964 (lto_read_body): Now sets cfun.
3965 (lto_read_function_body): Now sets current_function_pointer.
3966
39672007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3968
3969 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
3970 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
3971 inspecting fields within.
3972 (lto_read_DIE_at_ptr): Delete check for null result; let callers
3973 handle this appropriately.
3974
39752007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3976
3977 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
3978 DW_AT_abstract_origin properly. Ensure that we're not dealing with
3979 both DW_AT_abstract_origin and DW_AT_specification.
3980 (lto_read_subroutine_type_subprogram_DIE): Handle
3981 DW_AT_abstract_origin.
3982 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
3983 (lto_read_DIE_at_ptr): Define as static to match declaration.
3984 Lookup the PTR in the cache before reading it from the file.
3985 (lto_resolve_var_ref): Adjust accordingly.
3986 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
3987 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
3988
39892007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3990
3991 * lto.c (lto_read_DIE_at_ptr): New function.
3992 (lto_resolve_var_ref): Use it.
3993 (lto_resolve_fn_ref): Use it.
3994 (lto_resolve_field_ref): Use it.
3995 (lto_read_variable_formal_parameter_constant_DIE): Follow
3996 DW_AT_specification and return the associated decl when appropriate.
3997
39982007-10-18 Nathan Froyd <froydnj@codesourcery.com>
3999
4000 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4001 Implement for scalar integer modes.
4002 (lto_init): Initialize size_type_node.
4003
40042007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4005
4006 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4007 (input_local_var): Add chaining for params.
4008 (input_ssa_names): Add cfun parameter.
4009 (input_function): Remove unnecessary else.
4010
40112007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4012
4013 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4014 (lto_resolve_var_ref): Use proper types.
4015 (lto_resolve_fn_ref): Likewise.
4016 (lto_resolve_field_ref): Likewise.
4017
40182007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4019
4020 * lto-read.c (input_expr_operand): Remove case.
4021
40222007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4023
4024 * lto.c (lto_read_only_for_child_DIEs): New function.
4025 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4026 * lto-elf.c (lto_elf_map_lto_section): Remove.
4027 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4028 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4029 SSA_NAME. Add missing case for mechanical codes.
4030 (input_cfg): Use basic_block_info_for_function instead of
4031 basic_block_info.
4032
40332007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4034
4035 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4036 (input_list): Renamed input_tree_list and modified to follow same
4037 protocol as lto-function-out.c:output_tree_list.
4038 (input_expr_operand): Make asm operands use input_tree_list.
4039 (input_local_var): Now uses input_tree_list.
4040 (lto_read_body): Change placement for setting context of debug_labels.
4041
4042
40432007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4044
4045 * lto-read.c (input_real): Output debugging in proper order.
4046 (input_integer): Compute bit lengths properly.
4047 (input_list): Clean up declaration.
4048 (input_expr_operand): Change calls to input_real to match fix.
4049 Make reading of LTO_bit_field_ref1 match output.
4050 (input_local_var): Make reading of attributes match what is being
4051 written.
4052 (dump_debug_stream): Also print char in hex.
4053 (debug_out_fun): Fix signed unsigned mismatch.
4054
40552007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4056
4057 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4058 DW_AT_GNU_vector specially, as they are not contiguous with the
4059 specified set of attribute names. Use class_mask to check for
4060 errors at the end of the function
4061 (lto_resolve_var_ref): Read the DIE if it is not cached.
4062 (lto_resolve_fn_ref): Likewise.
4063 (lto_resolve_field_ref): Likewise.
4064
40652007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4066
4067 * lto.c: Include dwarf2out.h.
4068 (lto_cache_store_DIE): Assert that we never change the value.
4069 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4070 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4071 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4072 sensible type instead.
4073 (lto_read_structure_union_class_type_DIE): Store the newly
4074 created type prior to reading the members of the structure to
4075 avoid infinite recursion. Avoid computing types and alignments
4076 for structures whose sizes are unknown.
4077 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4078 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4079 DW_AT_const_value, and DW_AT_specification.
4080 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4081 Return early if we have already constructed the function type.
4082 (lto_read_typedef_DIE): Check to see if the type has been cached
4083 already. Cache the type before reading any children.
4084 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4085 (lto_read_DIE): Unset context->skip_non_parameters around reading
4086 the DIE.
4087 (lto_resolve_fn_ref): Delete trailing whitespace.
4088
40892007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4090
4091 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4092
40932007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4094
4095 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4096
40972007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4098
4099 * lto-lang.c (signed_and_unsigned_types): New variable.
4100 (lto_type_for_size): Consult signed_and_unsigned_types to find
4101 an approprite type, creating it if necessary.
4102 (lto_set_decl_assembler_name): Add actual method body.
4103
41042007-09-06 Jim Blandy <jimb@codesourcery.com>
4105
4106 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4107 can't find a var init for this variable, leave its DECL_INITIAL.
4108 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4109 lto_elf_map_fn_body.
4110 (lto_map_lto_section): New function.
4111 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4112 bodies, and lto_elf_map_optional_lto_section for variable
4113 initializers.
4114 (lto_elf_find_section_data): Quietly return NULL if the section is
4115 missing.
4116 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4117
4118 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
4119
4120 * lto-read.c (lto_read_body): Doc fix.
4121
41222007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4123
4124 * lto-read.c (fun_in): Renamed to data_in.
4125 (input_expr_operand, input_local_var, input_string_internal,
4126 input_string, input_real, input_list, get_label_decl,
4127 get_type_ref, input_expr_operand, input_globals, input_labels,
4128 input_local_vars_index, input_local_var, input_local_vars,
4129 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
4130 (input_constructor): New function.
4131 (lto_read_function_body): Renamed to lto_read_body and generalized
4132 to handle both functions and constructors.
4133 (lto_read_function_body, lto_read_var_init): New function.
4134
4135
41362007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4137
4138 * lto-read.c (input_expr_operand): Assert that there really is a
4139 FUNCTION_DECL.
4140 (input_globals): Removed checks on 0 section.
4141
41422007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4143
4144 * lto-read.c (fun_in): Added local_decls_index and
4145 local_decls_index_d.
4146 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
4147 (input_globals): Enabled code to handle FIELD_DECLs.
4148 (input_local_vars_index, input_local_vars): New function.
4149 (input_local_var): Changed to allow locals to be input randomly.
4150 (lto_read_function_body): Added code to input the
4151 local_decls_index and to free various structures.
4152
41532007-08-17 Jim Blandy <jimb@codesourcery.com>
4154
4155 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
4156 ATTRIBUTE_UNUSED from 'die' formal.
4157
4158 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
4159 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
4160 (input_list): Fix type of 'tag'.
4161 (input_expr_operand): Fix type of 'tag' argument. Update
4162 declaration. Fix type of 'ctag'. Add default case to switch,
4163 since the type of the switched value is now an enum.
4164 (input_local_vars): Fix type of 'tag'.
4165 (input_bb): Fix type of 'tag' argument.
4166 (input_function): Fix type of 'tag' argument.
4167
41682007-08-16 Jim Blandy <jimb@codesourcery.com>
4169
4170 * lto.c (lto_read_member_DIE): Record the tree we create in
4171 fd->die_cache. (Our 'die' argument is no longer unused.)
4172 (lto_resolve_field_ref): New function.
4173 * lto.h (lto_resolve_field_ref): New declaration.
4174
41752007-08-15 Jim Blandy <jimb@codesourcery.com>
4176
4177 * lto-read.c (lto_read_var_init): Mark arguments as unused.
4178
41792007-08-07 Jim Blandy <jimb@codesourcery.com>
4180
4181 * lto.c (lto_read_form): Complete attr_classes table.
4182 (DWARF2_form_data): Doc fix.
4183
41842007-08-05 Mark Mitchell <mark@codesourcery.com>
4185
4186 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
4187 and unmap_var_init.
4188 (lto_read_var_init): Declare.
4189 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
4190 interface for reading variable initializers.
4191 * lto-elf.c (lto_elf_read_var_init): Remove.
4192 (lto_elf_file_vtable): Update initializer.
4193 (lto_elf_read_var_init): Add comment about unused-ness.
4194 * lto-read.c (lto_read_var_init): New.
4195
4196 * lto.c (lto_read_form): Add entry for DW_AT_inline.
4197
41982007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
4199
4200 * lto-read.c (lto_read_function_body): Moved declaration of fn
4201 outside of ifdef.
4202
42032007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4204
4205 * lto-read.c (input_uleb128, input_string_internal, input_real,
4206 input_integer, input_record_start, input_list, get_type_ref,
4207 input_flags, input_expr_operand, input_expr_operand,
4208 input_expr_operand, input_local_vars, input_cfg, input_phi,
4209 input_ssa_names, input_bb, input_function): Added semicolons.
4210
4211
42122007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4213
4214 * lto-read.c (input_globals): Remove debugging.
4215 (input_function): Set DECL_ARGUMENTS.
4216
4217
42182007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4219
4220 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
4221 RETURN_EXPR, MODIFY_EXPR and processing of flags.
4222 (input_phi): Made work with operands other than SSA_NAMES and
4223 fixed processing of flags.
4224 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
4225 (input_flags): New function.
4226 * lto-lang.c (lto_init): Changed state of in_lto_p.
4227
4228
42292007-07-24 Mark Mitchell <mark@codesourcery.com>
4230
4231 * lto-tree.h (lto_varargs_cookie): Remove.
4232 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
4233 skip_non_parameters, skip_parameters.
4234 (lto_varargs_cookie): Remove.
4235 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
4236 parameter types.
4237 (lto_read_abbrev): New function.
4238 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
4239 child DIEs.
4240 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
4241 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
4242 (lto_file_read): Initialize new context fields.
4243 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
4244 (lto_unsigned_type): Remove.
4245 (lto_signed_type): Likewise.
4246 (lto_signed_or_unsigned_type): Likewise.
4247 (lto_init): Do not create lto_varargs_cookie.
4248 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
4249 (LANG_HOOKS_SIGNED_TYPE): Likewise.
4250 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
4251
42522007-07-19 Jan Hubicka <jh@suse.cz>
4253
4254 * lto-read.c (lto_read_function_body): Produce empty scope block
4255 to avoid crash.
4256
42572007-07-18 Mark Mitchell <mark@codesourcery.com>
4258
4259 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
4260 process local variables.
4261 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
4262
42632007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4264
4265 * lto-read.c (input_list, input_expr_operand): Added struct
4266 function parameter.
4267 (init_cfg, finalize_cfg): Removed function.
4268 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
4269 (input_labels, input_local_vars): Now takes input_block parameter rather than
4270 synthsyzing it.
4271 (input_cfg, input_phi, input_ssa_names): New functions.
4272 (input_bb): Now passes in input_blocks. Does not construct cfg
4273 and processes the list of phi functions.
4274 (input_function): Now builds both the cfg and ssa_names table.
4275 (lto_read_function_body): Processes new header fields to construct
4276 streams for the ssa_names and cfg and their debugging.
4277 * lto/lto-lang.c (lto_init): Set in_lto_p.
4278
4279
42802007-06-28 Mark Mitchell <mark@codesourcery.com>
4281
4282 * lto.h (lto_file_vtable): Add read_var_init.
4283 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
4284 initializers.
4285 (lto_main): Remove bogus asserts.
4286 * lto-elf.c (tm.h): Include it.
4287 (libiberty.y): Likewise.
4288 (lto_elf_file): Add strtab and symtab. Rename
4289 string_table_section_index to sec_strtab.
4290 (lto_elf_file_vtable): Add lto_elf_read_var_init.
4291 (lto_elf_get_shdr): New function.
4292 (lto_elf_free_shdr): Likewise.
4293 (lto_elf_find_section_data): Use them.
4294 (lto_elf_read_symtab): New function.
4295 (lto_elf_lookup_sym): Likewise.
4296 (lto_elf_free_sym): Likewise.
4297 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
4298 (lto_elf_built_init): New function.
4299 (lto_elf_read_var_init): Likewise.
4300 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
4301
43022007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
4303
4304 * lto-read (make_new_block): Initialize the stmt_list.
4305 (lto_static_init_local): Add debugging for missing codes.
4306
43072007-06-26 Mark Mitchell <mark@codesourcery.com>
4308
4309 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4310 unprototyped functions.
4311
43122007-06-23 Mark Mitchell <mark@codesourcery.com>
4313
4314 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4315 Handle DW_AT_MIPS_linkage_name.
4316 (lto_read_subroutine_type_subprogram): Likewise. Correct
4317 compilation errors.
4318 (lto_main): Remove incorrect assertions.
4319 * lto-symbtab.c: Build function types out of TREE_LISTs.
4320
4321 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
4322
4323 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
4324
43252007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
4326
4327 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
4328 dummy since ggc does not like empty structs.
4329 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
4330 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
4331 expr->common to expr->base.
4332 (make_new_block): Moved stmt_list to proper place.
4333
4334
43352007-03-14 Robert Kennedy <jimbob@google.com>
4336
4337 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
4338 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
4339 assembler name from DWARF.
4340 * lto-lang.c (lto_set_decl_assembler_name) New function.
4341
43422006-09-10 Mark Mitchell <mark@codesourcery.com>
4343
4344 * lto.h (lto_file_vtable): New structure.
4345 (lto_file): Add vtable pointer.
4346 (lto_file_init): Add vtable paramter.
4347 (lto_read_function_body): New function.
4348 (lto_symtab_merge_fn): New function.
4349 * lto.c (lto_file_init): Add vtable parameter.
4350 (lto_read_form): Fill in entries for DW_AT_prototyped,
4351 DW_AT_frame_base.
4352 (lto_read_subroutine_type_subprogram_DIE): New function.
4353 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
4354 DW_TAG_subprogram.
4355 * lto-elf.c (lto_elf_vile_vtable): New variable.
4356 (lto_elf_file_open): Pass it to lto_file_init.
4357 (lto_elf_map_fn_body): New function.
4358 (lto_elf_unmap_fn_body): Likewise.
4359 * lto-read.c: New file.
4360 * lto-symtab.c (lto_symtab_merge_fn): New function.
4361 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
4362 tree_rest_of_compilation.
4363 * Make-lang.in (LTO_OBJS): Add lto-read.o
4364 (lto-read.o): New target.
4365
43662006-09-03 Mark Mitchell <mark@codesourcery.com>
4367
4368 * lto.c (<inttypes.h>): Don't include it.
4369 (lto_context): Don't typedef it.
4370 (lto_resolve_reference): New function.
4371 (lto_read_form): Use it.
4372 (lto_resolve_type_ref): New function.
4373 (lto_resolve_var_ref): Likewise.
4374 (lto_resolve_fn_ref): Likewise.
4375 * lto.h (<inttypes.h>): Include it.
4376 (lto_context): New type.
4377 (lto_ref): New structure.
4378 (lto_resolve_type_ref): Declare.
4379 (lto_resolve_var_ref): Likewise.
4380 (lto_resolve_fn_ref): Likewise.
4381
43822006-08-18 Mark Mitchell <mark@codesourcery.com>
4383
4384 * lang-specs.h: New file.
4385
43862006-08-14 Mark Mitchell <mark@codesourcery.com>
4387
4388 * lto.c (lto_info_fd_init): Allocate the DIE cache.
4389 (lto_info_fd_close): Deallocate it.
4390 (lto_die_cache_entry): New structure.
4391 (lto_cache_hash): New function.
4392 (lto_cache_eq): Likewise.
4393 (lto_cache_store_DIE): Likewise.
4394 (lto_cache_lookup_DIE): Likewise.
4395 (lto_read_referenced_type_DIE): Use the cache.
4396 (lto_read_pointer_type_DIE): Robustify.
4397 (lto_read_DIE): Use the cache.
4398 * lto.h (hashtab.h): Include.
4399 (lto_info_fd): Add DIE cache.
4400 * Make-lang.in (LTO_H): New variable.
4401 (lto/lto-lang.o): Use LTO_H.
4402 (lto/lto-elf.o): Likewise.
4403 (lto/lto-symtab.o): Likewise.
4404
44052006-07-09 Mark Mitchell <mark@codesourcery.com>
4406
4407 * lto.c (lto_abi_mismatch_error): New function.
4408 (lto_abbrev_read): Initialize num_abbrevs.
4409 (lto_read_form): Specify allowed form classes for
4410 DW_AT_declaration. Adjust for change to lto_set_cu_context.
4411 (lto_read_variable_formal_parameter_constant_DIE): Handle
4412 DW_AT_declaration. Call lto_symtab_merge_var.
4413 (lto_read_pointer_type_DIE): New function.
4414 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
4415 not creat TYPE_DECLs for types that already have them.
4416 (lto_read_DIE): Add lto_read_pointer_type_DIE.
4417 (lto_set_cu_context): Make cu_start point to the header, not the
4418 first DIE.
4419 (lto_file_read): Adjust for change to lto_set_cu_context.
4420 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
4421 (lto/lto-symtab.o): New rule.
4422 * lto-tree.h (lang_identifier): Add decl field.
4423 (LANG_IDENTIFIER_CAST): New macro.
4424 (LTO_IDENTIFIER_DECL): Likewise.
4425 (lto_symtab_merge_var): Declare.
4426 * lto-symtab.c: New file.
4427
44282006-07-02 Daniel Berlin <dberlin@dberlin.org>
4429
4430 * lto.c (lto_context): Add current_cu and info_fd members.
4431 (DWARF2_CompUnit): New structure.
4432 (lto_read_DIE): Take lto_info_fd *.
4433 (lto_read_child_DIEs): Ditto.
4434 (lto_file_corrupt_error): Constify argument.
4435 (lto_set_cu_context): New function
4436 (lto_info_fd_init): Ditto.
4437 (lto_info_fd_close): Ditto.
4438 (lto_file_init): Use lto_info_fd_init.
4439 (lto_file_close): Use lto_info_fd_close.
4440 (lto_read_initial_length): Pass in pointer to header size.
4441 (lto_read_comp_unit_header): Correct cu_length to
4442 real length from beginning of header. Take lto_info_fd * as
4443 argument.
4444 (find_cu_for_offset): New function.
4445 (lto_read_form): Change first argument to lto_info_fd *.
4446 Add FORM_CONTEXT argument.
4447 Handle DW_FORM_ref_addr.
4448 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
4449 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
4450 Swap contexts if necessary for form.
4451 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
4452 lto_file_corrupt_error.
4453 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
4454 (lto_read_referenced_type_DIE): Change first argument to
4455 lto_info_fd *. Access lto_fd fields through base pointer.
4456 (lto_read_compile_unit_DIE): Change first argument to an
4457 lto_info_fd *.
4458 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
4459 (lto_read_base_type_DIE): Ditto.
4460 (lto_read_child_DIEs): Ditto.
4461 (lto_read_DIE): Ditto. Change type of function pointer.
4462 (lto_info_read): New function.
4463 (lto_set_cu_context): Ditto.
4464 (lto_file_read): Use lto_info_read, walk resulting CU's
4465 (lto_main): Update for lto_info_fd change.
4466 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
4467 necessary.
4468 * lto.h (DWARF2_CompUnit): New structure.
4469 (lto_info_fd): Ditto.
4470 (lto_file): Change debug_info to be an lto_info_fd.
4471
44722006-06-25 Mark Mitchell <mark@codesourcery.com>
4473
4474 * lto.c (toplev.h): Include it.
4475 (dwarf2.h): Likewise.
4476 (tree.h): Likewise.
4477 (tm.h): Likewise.
4478 (cgraph.h): Likewise.
4479 (ggc.h): Likewise.
4480 (inttypes.h): Likewise.
4481 (DWARF2_attr): New type.
4482 (DWARF2_abbrev): Likewise.
4483 (DWARF2_class): Likewise.
4484 (DWARF2_form_data): Likewise.
4485 (lto_context): Likewise.
4486 (lto_fd_init): New function.
4487 (lto_abbrev_fd_init): Likewise.
4488 (lto_abbrev_fd_close): Likewise.
4489 (lto_file_init): Use them.
4490 (lto_file_close): New function.
4491 (lto_file_corrupt_error): Likewise.
4492 (LTO_CHECK_INT_VAL): New macro.
4493 (lto_check_size_t_val): New function.
4494 (lto_check_int_val): Likewise.
4495 (LTO_READ_TYPE): New macro.
4496 (lto_read_ubyte): New function.
4497 (lto_read_uhalf): Likewise.
4498 (lto_read_uword): Likewise.
4499 (lto_read_uleb128): Likewise.
4500 (lto_read_initial_length): Likewise.
4501 (lto_abbrev_read_attrs): Likewise.
4502 (lto_abbrev_read): Likewise.
4503 (lto_abbrev_lookup): Likewise.
4504 (lto_read_section_offset): Likewise.
4505 (lto_read_comp_unit_header): Likewise.
4506 (lto_read_form): Likewise.
4507 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
4508 (LTO_BEGIN_READ_ATTRS): Likewise.
4509 (LTO_END_READ_ATTRS): Likewise.
4510 (lto_unsupported_attr_error): New function.
4511 (lto_get_identifier): Likewise.
4512 (lto_read_referenced_type_DIE): Likewise.
4513 (lto_read_compile_unit_DIE): Likewise.
4514 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
4515 (lto_read_base_type_DIE): Likewise.
4516 (lto_read_DIE): Likewise.
4517 (lto_read_child_DIEs): Likewise.
4518 (lto_file_read): Read DIEs.
4519 (lto_main): Ask middle end to emit entities.
4520 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
4521 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
4522 (lto_elf_file_close): Likewise.
4523 * lto.h (lto_file): Declare.
4524 (DWARF2_abbrev): Likewise.
4525 (lto_fd): New type.
4526 (lto_abbrev_fd): Likewise.
4527 (lto_file): Use new types.
4528 (lto_file_close): Declare.
4529 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
4530
45312006-06-18 Mark Mitchell <mark@codesourcery.com>
4532
4533 * lto.h: New file.
4534 * lto.c: New file.
4535 * lto-elf.c: New file.
4536 * lto-lang.c (flags.h): Include it.
4537 (lto.h): Likewise.
4538 (lto_init): New function.
4539 (lto_write_globals): Remove.
4540 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
4541 (LANG_HOOKS_INIT): Define.
4542 (LANG_HOOKS_PARSE_FILE): Likewise.
4543 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
4544 (LTO_EXE): Link with libelf.
4545 (lto/lto-lang.o): Update dependencies.
4546 (lto/lto.o): New target.
4547 (lto/lto-elf.o): Likewise.
4548
45492006-06-12 Mark Mitchell <mark@codesourcery.com>
4550
4551 * config-lang.in: New file.
4552 * Make-lang.in: Likewise.
4553 * lto-tree.h: Likewise.
4554 * lto-lang.c: Likewise.
4555