]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
re PR c++/60272 (atomic<>::compare_exchange_weak has spurious store and can cause...
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
1966fd99
RB
12014-02-14 Richard Biener <rguenther@suse.de>
2
3 PR lto/60179
4 * lto.c (compare_tree_sccs_1): Do not compare
5 DECL_FUNCTION_SPECIFIC_TARGET.
6 (lto_read_decls): Re-build DECL_FUNCTION_SPECIFIC_TARGET.
7
283416b3
RB
82014-02-12 Richard Biener <rguenther@suse.de>
9
10 PR lto/60060
11 * lto-lang.c (lto_write_globals): Do not call
12 wrapup_global_declarations or emit_debug_global_declarations
13 but emit debug info for non-function scope variables
14 directly.
15
b7e85694
JH
162014-02-06 Jan Hubicka <hubicka@ucw.cz>
17
18 * lto.c (unify_scc): Free CONSTRUCTOR_ELTS.
19
96451279
JH
202014-02-06 Jan Hubicka <hubicka@ucw.cz>
21
22 PR ipa/59469
23 * lto-partition.c (symbol_class): Move to cgraph.h
24 (get_symbol_class): Move to symtab.c
25 (add_references_to_partition, add_symbol_to_partition_1,
26 lto_max_map, lto_1_to_1_map, lto_balanced_map,
27 lto_promote_cross_file_statics): Update.
28
f300e7b8
JH
292014-02-05 Jan Hubicka <hubicka@ucw.cz>
30
31 * lto.c (lto_parallelism): New static var.
32 (do_stream_out, wait_for_child, stream_out): New static functions.
33 (lto_wpa_write_files): Add support for parallel streaming.
34 (do_whole_program_analysis): Set parallelism.
35 * lang.opt (fwpa): Add parameter.
36 * lto-lang.c (lto_handle_option): Handle flag_wpa.
37 (lto_init): Update use of flag_wpa.
38 * lto-streamer.h (asm_nodes_output): Declare.
39
f0f91770
RB
402014-02-05 Richard Biener <rguenther@suse.de>
41
42 * lto.h (lto_global_var_decls): Remove.
43 * lto-lang.c (lto_init): Do not allocate lto_global_var_decls.
44 (lto_write_globals): Do nothing in WPA stage, gather globals from
45 the varpool here ...
46 * lto.c (lto_main): ... not here.
47 (materialize_cgraph): Do not call rest_of_decl_compilation
48 on the empty lto_global_var_decls vector.
49 (lto_global_var_decls): Remove.
50
d665f8dd
JH
512014-02-04 Jan Hubicka <hubicka@ucw.cz>
52
53 * lto-partition.c (get_symbol_class): Only unforced DECL_ONE_ONLY
54 needs duplicating, not generic COMDAT.
55
c39276b8
RB
562014-02-04 Richard Biener <rguenther@suse.de>
57
58 PR lto/59723
59 * lto.c (mentions_vars_p): Handle NAMELIST_DECL.
60 (lto_fixup_prevailing_decls): Handle fixing up CONSTRUCTOR values.
61
5f876ae7
JH
622014-02-04 Jan Hubicka <hubicka@ucw.cz>
63 Markus Trippelsdorf
64
65 PR ipa/59469
66 * lto-symtab.c (lto_cgraph_replace_node, lto_varpool_replace_node):
67 merge force_output and forced_by_abi flags.
68
b72271b9
BI
692014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
70
71 * lto-lang.c (lto_init): Replaced flag_enable_cilkplus with
72 flag_cilkplus.
73
63124c48
RB
742014-01-09 Richard Biener <rguenther@suse.de>
75
76 * lto.c (gimple_canonical_types_compatible_p): Fix comment.
77
d05b9920
RB
782014-01-09 Richard Biener <rguenther@suse.de>
79
80 PR lto/45586
81 * lto.c (hash_canonical_type): Do not hash TREE_ADDRESSABLE,
82 TYPE_ALIGN, TYPE_RESTRICT or TYPE_REF_CAN_ALIAS_ALL.
83 (gimple_canonical_types_compatible_p): Do not compare them either.
84
23a5b65a
RS
852014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
86
87 Update copyright years
88
2c8326a5
OE
892013-12-06 Oleg Endo <olegendo@gcc.gnu.org>
90
91 * lto.c: Remove struct tags when referring to class varpool_node.
92 * lto-partition.c: Likewise.
93 * lto-symtab.c: Likewise.
94
e06f9964
JJ
952013-11-29 Jakub Jelinek <jakub@redhat.com>
96 Richard Biener <rguenther@suse.de>
97
98 PR lto/59326
99 * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE.
100
c193f58b
JJ
1012013-11-29 Jakub Jelinek <jakub@redhat.com>
102
103 PR lto/59326
104 * lto.c (mentions_vars_p_omp_clause): New function.
105 (mentions_vars_p): Call it for OMP_CLAUSE. Remove break;
106 after return stmts.
107
2fb9a547
AM
1082013-11-22 Andrew MacLeod <amacleod@redhat.com>
109
110 * lto.c: Add required include files from gimple.h.
111 * lto-lang.c: Likewise
112 * lto-object.c: Likewise
113 * lto-partition.c: Likewise
114 * lto-symtab.c: Likewise
115
fec39fa6
TS
1162013-11-18 Trevor Saunders <tsaunders@mozilla.com>
117
118 * lto-partition.c lto-symtab.c lto.c Adjust.
119
d8a2d370
DN
1202013-11-14 Diego Novillo <dnovillo@google.com>
121
122 * lto-lang.c: Include stringpool.h.
123 Include stor-layout.h.
124 * lto-partition.c: Include gcc-symtab.h.
125 * lto.c: Include stor-layout.h.
126
5e20cdc9
DM
1272013-10-31 David Malcolm <dmalcolm@redhat.com>
128
129 Automated part of renaming of symtab_node_base to symtab_node.
130
131 Patch autogenerated by rename_symtab.py from
132 https://github.com/davidmalcolm/gcc-refactoring-scripts
133 revision 58bb219cc090b2f4516a9297d868c245495ee622
134
135 * lto-partition.c (add_symbol_to_partition): Rename
136 symtab_node_base to symtab_node.
137 (get_symbol_class): Likewise.
138 (symbol_partitioned_p): Likewise.
139 (add_references_to_partition): Likewise.
140 (add_symbol_to_partition_1): Likewise.
141 (contained_in_symbol): Likewise.
142 (add_symbol_to_partition): Likewise.
143 (lto_1_to_1_map): Likewise.
144 (lto_max_map): Likewise.
145 (lto_balanced_map): Likewise.
146 (privatize_symbol_name): Likewise.
147 (promote_symbol): Likewise.
148 (may_need_named_section_p): Likewise.
149 (rename_statics): Likewise.
150 (lto_promote_statics_nonwpa): Likewise.
151 * lto-symtab.c (lto_symtab_merge): Likewise.
152 (lto_symtab_resolve_replaceable_p): Likewise.
153 (lto_symtab_symbol_p): Likewise.
154 (lto_symtab_resolve_can_prevail_p): Likewise.
155 (lto_symtab_resolve_symbols): Likewise.
156 (lto_symtab_merge_decls_2): Likewise.
157 (lto_symtab_merge_decls_1): Likewise.
158 (lto_symtab_merge_decls): Likewise.
159 (lto_symtab_merge_symbols_1): Likewise.
160 (lto_symtab_merge_symbols): Likewise.
161 (lto_symtab_prevailing_decl): Likewise.
162 * lto.c (lto_wpa_write_files): Likewise.
163 (read_cgraph_and_symbols): Likewise.
164 (do_whole_program_analysis): Likewise.
165
378cd6b1
DM
1662013-10-30 David Malcolm <dmalcolm@redhat.com>
167
168 * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
169 declarations onto multiple lines to make things easier for
170 rename_symtab.py.
171 (lto_symtab_merge_decls_1): Likewise.
172 (lto_symtab_merge_symbols_1): Likewise.
173
939b37da
BI
1742013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
175
176 * Make-lang.in (lto/lto-lang.o): Added cilk.h in dependency list.
177 * lto-lang.c (lto_init): Added a call to cilk_init_builtins if Cilk
178 Plus is enabled.
179
67348ccc
DM
1802013-10-29 David Malcolm <dmalcolm@redhat.com>
181
182 Patch autogenerated by refactor_symtab.py from
183 https://github.com/davidmalcolm/gcc-refactoring-scripts
184 revision 58bb219cc090b2f4516a9297d868c245495ee622
185
186 * lto-partition.c (lto_promote_cross_file_statics): Update for
187 conversion of symtab types to a true class hierarchy.
188 (rename_statics): Likewise.
189 (promote_symbol): Likewise.
190 (privatize_symbol_name): Likewise.
191 (lto_balanced_map): Likewise.
192 (varpool_node_cmp): Likewise.
193 (node_cmp): Likewise.
194 (lto_1_to_1_map): Likewise.
195 (undo_partition): Likewise.
196 (add_symbol_to_partition): Likewise.
197 (contained_in_symbol): Likewise.
198 (add_symbol_to_partition_1): Likewise.
199 (add_references_to_partition): Likewise.
200 (symbol_partitioned_p): Likewise.
201 (get_symbol_class): Likewise.
202 (lto_max_map): Likewise.
203 * lto-symtab.c (lto_symtab_prevailing_decl): Likewise.
204 (lto_symtab_merge_symbols): Likewise.
205 (lto_symtab_merge_symbols_1): Likewise.
206 (lto_symtab_merge_decls): Likewise.
207 (lto_symtab_merge_decls_1): Likewise.
208 (lto_symtab_merge_decls_2): Likewise.
209 (lto_symtab_resolve_symbols): Likewise.
210 (lto_symtab_resolve_can_prevail_p): Likewise.
211 (lto_symtab_symbol_p): Likewise.
212 (lto_symtab_resolve_replaceable_p): Likewise.
213 (lto_symtab_merge): Likewise.
214 (lto_varpool_replace_node): Likewise.
215 (lto_cgraph_replace_node): Likewise.
216 * lto.c (lto_main): Likewise.
217 (do_whole_program_analysis): Likewise.
218 (materialize_cgraph): Likewise.
219 (read_cgraph_and_symbols): Likewise.
220 (cmp_partitions_order): Likewise.
221 (lto_materialize_function): Likewise.
222 (has_analyzed_clone_p): Likewise.
223
8e9055ae
AM
2242013-10-29 Andrew MacLeod <amacleod@redhat.com>
225
226 * lto/lto-object.c: Add gimple.h to include list.
227 * lto/lto-partition.c: Likewise.
228
377d9792
AM
2292013-10-18 Andrew MacLeod <amacleod@redhat.com>
230
231 * lto.c: Remove tree-flow.h from include list.
232
fffda8d7
RB
2332013-10-15 Richard Biener <rguenther@suse.de>
234
235 * lto.c (hash_canonical_type): Split out from ...
236 (iterative_hash_canonical_type): ... here. Register types
237 we recurse to.
238 (gimple_canonical_type_hash): Adjust.
239 (gimple_register_canonical_type_1): Split out from ...
240 (gimple_register_canonical_type): ... here. Cache computed
241 hash value.
242 (lto_register_canonical_types): Split into two modes,
243 clearing and computing TYPE_CANONICAL.
244 (lto_read_decls): Adjust.
245 (read_cgraph_and_symbols): Do two passes over global trees,
246 first clearing then computing TYPE_CANONICAL.
247
1394237e
RB
2482013-10-14 Richard Biener <rguenther@suse.de>
249
250 * lto.c (gimple_canonical_types): Move out-of GC space.
251 (canonical_type_hash_cache): Make a pointer-map.
252 (num_canonical_type_hash_entries, num_canonical_type_hash_queries):
253 New counters.
254 (iterative_hash_canonical_type): Adjust.
255 (read_cgraph_and_symbols): Likewise.
256 (print_lto_report_1): Likewise.
257
0a387eca
RB
2582013-10-14 Richard Biener <rguenther@suse.de>
259
260 * lto.c (gimple_types, type_hash_cache, struct type_pair_d,
261 type_pair_cache, lookup_type_pair, struct sccs, next_dfs_num,
262 gtc_next_dfs_num, compare_type_names_p, gtc_visit,
263 gimple_types_compatible_p_1, gimple_types_compatible_p,
264 visit, iterative_hash_name, struct type_hash_pair,
265 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
266 gimple_type_eq, gimple_register_type, num_not_merged_types,
267 num_not_merged_types_in_same_scc, num_not_merged_types_trees,
268 num_not_merged_types_in_same_scc_trees): Remove old merging code
269 and statistics.
270 (lto_read_decls): Do not run old merging code in parallel.
271 (read_cgraph_and_symbols): Do not init/free old merging
272 data structures.
273 (print_lto_report_1): Do not report differences of old vs. new
274 merging code.
275
83fd5d11
RB
2762013-10-14 Richard Biener <rguenther@suse.de>
277
278 * lto-lang.c (lto_init): Do not re-init canonical types here.
279 (lto_register_canonical_types): Move to ...
280 * lto.c (lto_register_canonical_types): ... here.
281 (gimple_canonical_types, canonical_type_hash_cache,
282 iterative_hash_canonical_type, gimple_canonical_type_hash,
283 gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
284 gimple_register_canonical_type): Add canonical type merging machinery
285 moved from gimple.c.
286 (read_cgraph_and_symbols): Init and free canonical type tables
287 here.
288 (print_lto_report_1): Report canonical type table stats here.
289
acf0174b
JJ
2902013-10-11 Jakub Jelinek <jakub@redhat.com>
291
292 * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
293
7c6fedd2
TT
2942013-09-25 Tom Tromey <tromey@redhat.com>
295
296 * Make-lang.in (LTO_H, LINKER_PLUGIN_API_H, LTO_TREE_H)
297 (lto/lto-lang.o, lto/lto.o, lto/lto-partition.o)
298 (lto/lto-object.o): Remove.
299
35f32ad4
RB
3002013-09-06 Richard Biener <rguenther@suse.de>
301
302 * lto-symtab.c: Move from gcc/
303 * lto.h: Include vec.h.
304 (lto_global_var_decls): Declare.
305 * lto.c (lto_global_var_decls): Move definition here.
306 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
307 (lto-symtab.o): Add.
308 * config-lang.in (gtfiles): Add lto.h.
309
49322b12
JH
3102013-08-31 Jan Hubicka <jh@suse.cz>
311
312 * lto.c (mentions_vars_p_field_decl, lto_fixup_prevailing_decls):
313 DECL_FIELD_OFFSET can contain an reference to variable.
314
31f1f73b
JH
3152013-08-31 Jan Hubicka <jh@suse.cz>
316
317 * lto.c (tree_with_vars): Turn into vector.
318 (MAYBE_REMEMBER_WITH_VARS): Change to...
319 (CHECK_VAR): ... this one.
320 (CHECK_NO_VAR): New macro.
321 (maybe_remember_with_vars_typed): Turn to ...
322 (mentions_vars_p_typed): ... this one.
323 (maybe_remember_with_vars_common): Turn to ...
324 (mentions_vars_p_comon): ... this one.
325 (maybe_remember_with_vars_decl_minimal): Turn to ...
326 (mentions_vars_p_decl_minmal): ... this one.
327 (maybe_remember_with_vars_decl_common): Turn to ...
328 (mentions_vars_p_decl_common): ... this one.
329 (maybe_remember_with_vars_decl_with_vis): Turn to ...
330 (mentions_vars_p_decl_with_vis): ... this one.
331 (maybe_remember_with_vars_decl_non_common): Turn to ...
332 (mentions_vars_p_decl_non_common): ... this one.
333 (maybe_remember_with_vars_function): Turn to ...
334 (mentions_vars_p_function): ... this one.
335 (maybe_remember_with_vars_field_decl): Turn to ...
336 (mentions_vars_p_field_decl): ... this one.
337 (maybe_remember_with_vars_type): Turn to ...
338 (mentions_vars_p_type): ... this one.
339 (maybe_remember_with_vars_binfo): Turn to ...
340 (mentions_vars_p_binfo): ... this one.
341 (maybe_remember_with_vars_constructor): Turn to ...
342 (mentions_vars_p_constructor): ... this one.
343 (maybe_remember_with_vars_expr): Turn to ...
344 (mentions_vars_p_expr): ... this one.
345 (maybe_remember_with_vars): Turn to ...
346 (mentions_vars_p): ... this one.
347 (lto_read_decls): Update.
348 (LTO_SET_PREVAIL): Do not call function for internal decls.
349 (lto_fixup_prevailing_decls): Update to match mentions_vars_p;
350 check that something was updated.
351 (lto_fixup_state): Do not care about internal decls.
352 (lto_fixup_decls): Update.
353 (read_cgraph_and_symbols): Update.
354
256eefa9
JH
3552013-08-29 Jan Hubicka <jh@suse.cz>
356
357 * lto.c (read_cgraph_and_symbols): Free decl states.
358
0170f33c
JH
3592013-08-29 Jan Hubicka <jh@suse.cz>
360
361 * lto.c (compare_tree_sccs_1): Compare DECL_FINAL_P,
362 DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P and
363 TYPE_FINAL_P.
364
c01c111b
JH
3652013-08-28 Jan Hubicka <jh@suse.cz>
366
367 * lto.c (compare_tree_sccs_1): Drop DECL_ERROR_ISSUED,
368 DECL_DEFER_OUTPUT and DECL_IN_TEXT_SECTION.
369 (unify_scc): Do checking assert.
370
6a49f3c9
JH
3712013-08-06 Jan Hubicka <jh@suse.cz>
372 Martin Liska <marxin.liska@gmail.com>
373
374 * lto-partition.c (lto_balanced_map): Always base order on
375 source file order.
376
a2e2a668
JH
3772013-08-06 Jan Hubicka <jh@suse.cz>
378
379 * lto.c (lto_materialize_function): Do not read body anymore.
380
815effe1
JH
3812013-08-02 Jan Hubicka <jh@suse.cz>
382
383 * lto.c (lto_materialize_function): Do not push struct function.
384 * lto-partition.c (get_symbol_class): Handle abstracts correctly.
385 (may_need_named_section_p): Even abstract origins may need
386 named section.
387
315f8c0e
DM
3882013-07-30 David Malcolm <dmalcolm@redhat.com>
389
390 * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and
391 PASS_MANAGER_H.
392
393 * lto.c (do_whole_program_analysis): Update for move of
394 all_regular_ipa_passes from a global to a field of class
395 pass_manager.
396
1aa95df7
OB
3972013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
398
399 * lto-partition.c: Fix typos.
400
c525ba9a
JH
4012013-06-20 Jan Hubicka <jh@suse.cz>
402
403 * lto-partition.c (lto_balanced_map): Fix -fno-toplevel-reorder
404 partitioning of variables.
405
7a89ad00
JH
4062013-06-20 Jan Hubicka <jh@suse.cz>
407
408 * lto.c (read_cgraph_and_symbols): Set cgraph state.
409
6a6dac52
JH
4102013-06-19 Jan Hubicka <jh@suse.cz>
411
412 * lto-partition.c (add_references_to_partition): Use
413 ctor_for_folding.
414
ac0511f2
RB
4152013-06-18 Richard Biener <rguenther@suse.de>
416
417 * lto.c (lto_register_var_decl_in_symtab): Pass in cache index
418 and use it.
419 (lto_register_function_decl_in_symtab): Likewise.
420 (cmp_tree): New function.
421 (unify_scc): Instead of using the streamer cache map from entry
422 to cache index match up the two maps we have by sorting them.
423 Adjust calls to lto_register_var_decl_in_symtab and
424 lto_register_function_decl_in_symtab.
425
ee03e71d
RB
4262013-06-17 Richard Biener <rguenther@suse.de>
427
428 * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency.
429 * lto.c: Include data-streamer.h.
430 (lto_read_in_decl_state): Use streamer_tree_cache_get_tree.
431 (gimple_type_leader_entry_s, gimple_type_leader,
432 gimple_lookup_type_leader): Remove.
433 (gtc_visit): Simplify.
434 (gimple_types_compatible_p): Likewise.
435 (gimple_register_type_1): Likewise. Merge into ...
436 (gimple_register_type): ... this. Keep it as legacy for
437 statistics purposes for now.
438 (fixup_integer_cst): Remove.
439 (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and
440 rename to ...
441 (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars,
442 maybe_remember_with_vars_*): ... these.
443 (uniquify_nodes): Remove.
444 (lto_fixup_prevailing_type): New function.
445 (struct tree_scc, struct tree_scc_hasher): New type and hasher.
446 (tree_scc_hash, tree_scc_hash_obstack): New globals.
447 (num_merged_types, num_prevailing_types, num_not_merged_types,
448 num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read,
449 total_scc_size_merged, num_sccs_merged, num_scc_compares,
450 num_scc_compare_collisions): New global counters.
451 (compare_tree_sccs_1): New function.
452 (compare_tree_sccs): Likewise.
453 (unify_scc): Likewise.
454 (lto_read_decls): Stream in tree SCCs and unify them on the
455 way in. Finalize prevailing SCC tree members.
456 (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader.
457 Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother
458 to ggc-collect during merging.
459 (print_lto_report_1): Adjust for new merging code.
460
ca0f62a8
JH
4612013-06-12 Jan Hubicka <jh@suse.cz>
462
463 * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
464
bbf9ad07
JH
4652013-06-12 Jan Hubicka <jh@suse.cz>
466
467 * lto.c (register_resolution): Take lto_file_data argument.
468 (lto_register_var_decl_in_symtab,
469 lto_register_function_decl_in_symtab): Update.
470 (read_cgraph_and_symbols): Update resolution_map handling.
471
ecdbd01a 4722013-06-11 Jan Hubicka <jh@suse.cz>
08346abd
JH
473
474 * lto-partition.c (get_symbol_class): Simplify weakref handling.
475 (add_symbol_to_partition_1): Likewise.
476 (contained_in_symbol): Likewise.
477 (lto_balanced_map): Likewise.
478 (rename_statics): Drop weakref.
479
a367df53
RB
4802013-06-05 Richard Biener <rguenther@suse.de>
481
482 * lto.c (num_merged_types): New global variable.
483 (uniquify_nodes): Increase num_merged_types when merging a type.
484 (print_lto_report_1): Output the number of merged types.
485
40a7fe1e
JH
4862013-06-01 Jan Hubicka <jh@suse.cz>
487
488 * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace
489 lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols.
490 (do_whole_program_analysis): Update dumping.
491
e70670cf
JH
4922013-05-29 Jan Hubicka <jh@suse.cz>
493
494 * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab
495 flags.
496 * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise.
497
8ee05051
JH
4982013-05-15 Jan Hubicka <jh@suse.cz>
499
500 * lto-partition.c (privatize_symbol_name): Return true when
501 privatizing happened.
502 (rename_statics): Do not go into infinite loop when privatizing
503 is not needed.
504
427b248d
JM
5052013-05-16 Jason Merrill <jason@redhat.com>
506
507 * Make-lang.in ($(LTO_EXE)): Use link mutex.
508
9de04252
MJ
5092013-05-15 Martin Jambor <mjambor@suse.cz>
510
511 * lto-partition.c (lto_balanced_map): Print symbol order instead
512 of node uids.
513
2d6e4603
JH
5142013-05-15 Jan Hubicka <jh@suse.cz>
515
516 PR lto/57038
517 PR lto/47375
518 * lto-partition.c (get_symbol_class): Fix weakrefs.
519 (lto_balanced_map): Fix weakrefs.
520 (privatize_symbol_name): Remove unnecesary label.
521 (rename_statics): Handle weakrefs as statics.
522
64cfa6c0
JH
5232013-05-09 Jan Hubicka <jh@suse.cz>
524 Richard Biener <rguenther@suse.de>
525
526 * lto.c (lto_register_var_decl_in_symtab): Don't do renaming.
527 (lto_register_var_decl_in_symtab): Likewise.
528 (lto_main): Promote statics.
529 * lto-partition.c (privatize_symbol_name): New function.
530 (promote_symbol): Use it.
531 (may_need_named_section_p): New predicate.
532 (rename_statics): New functions.
533 (lto_promote_cross_file_statics): Simplify; do renaming.
534 (lto_promote_statics_nonwpa): New function.
535 * lto-partition.h (lto_promote_statics_nonwpa): New function.
536
e45cde98
RB
5372013-02-08 Richard Biener <rguenther@suse.de>
538
539 PR lto/56231
540 * lto-lang.c (lto_init): Do not enter a dummy file.
541
6edc3e32
UB
5422013-02-07 Uros Bizjak <ubizjak@gmail.com>
543
544 PR bootstrap/56227
545 * lto.c (lto_resolution_ready): Use %wx instead of
546 HOST_WIDE_INT_PRINT_HEX_PURE in the argument to internal_error.
547
ed73881e
RG
5482013-02-04 Richard Guenther <rguenther@suse.de>
549
550 PR lto/56168
551 * lto.c (read_cgraph_and_symbols): Do not call lto_symtab_merge_decls
552 or lto_fixup_decls at LTRANS time.
553
a19b1432
JH
5542013-01-09 Jan Hubicka <jh@suse.cz>
555
556 PR lto/45375
557 * lto.c (do_whole_program_analysis): Remove unreachable nodes after IPA.
558
49c01f87
L
5592012-12-10 H.J. Lu <hongjiu.lu@intel.com>
560
561 PR lto/55466
562 * lto.c (lto_register_var_decl_in_symtab): Don't record static
563 variables.
564 (lto_main): Record the global variables if WPA isn't enabled.
565
6e1aa848
DN
5662012-11-20 Diego Novillo <dnovillo@google.com>
567 Jakub Jelinek <jakub@redhat.com>
568
569 * lto.c: Replace all vec<T, A>() initializers with vNULL.
570
9771b263
DN
5712012-11-16 Diego Novillo <dnovillo@google.com>
572
573 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
574
575 * lto-lang.c: Use new vec API in vec.h.
576 * lto-partition.c: Likewise.
577 * lto-partition.h: Likewise.
578 * lto.c: Likewise.
579
24551b9c
LC
5802012-10-31 Lawrence Crowl <crowl@google.com>
581
582 * lto.c (lto_wpa_write_files): Change symtab checking to a checked
583 down-cast via dyn_cast.
584 * lto-partition.c (add_symbol_to_partition_1): Likewise.
585 (undo_partition): Likewise.
586 (lto_balanced_map): Likewise.
587 (get_symbol_class): Likewise and via is_a.
588 (lto_balanced_map): Change symtab checking to is_a.
589
aec06f6f
RB
5902012-10-12 Richard Biener <rguenther@suse.de>
591
592 PR lto/54898
593 * lto.c (gimple_types_compatible_p_1): Also compare
594 TYPE_MAIN_VARIANT.
595 (iterative_hash_gimple_type): Also hash TYPE_MAIN_VARIANT.
596
0b8c30f9
TB
5972012-10-09 Tobias Burnus <burnus@net-b.de>
598
599 * lto-lang.c (lto_register_builtin_type): Avoid useless
600 decl creation.
601 * lto-object.c (lto_obj_file_open, lto_obj_file_open): Free memory.
602
da3202a8
TB
6032012-10-08 Tobias Burnus <burnus@net-b.de>
604
605 * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
606 Free lto_file struct after closing the file.
607
2512a443
JH
6082012-10-08 Jan Hubicka <jh@suse.cz>
609
610 * lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
611 (fixup_integer_cst): New functoin.
612 (lto_ft_type): Fixup BASETYPE of methods and offsets.
613
e75f8f79
JH
6142012-10-07 Jan Hubicka <jh@suse.cz>
615
616 * lto.c (read_cgraph_and_symbols): Release type merging hash early;
617 release input encoders.
618 * lto-partition.c (new_partition): Update for new lto_symtab_encoder_new.
619
46591697
JH
6202012-10-06 Jan Hubicka <jh@suse.cz>
621
622 PR lto/54790
623 * lto.c (resolution_map): New static var.
624 (register_resolution): New function.
625 (lto_register_var_decl_in_symtab): Use it.
626 (read_cgraph_and_symbols): Copy resolutions into the symtab.
627
af16bc76
MJ
6282012-09-20 Martin Jambor <mjambor@suse.cz>
629
630 * lto.c (lto_materialize_function): Call push_struct_function and
631 pop_cfun.
632
5368224f
DC
6332012-09-19 Dehao Chen <dehao@google.com>
634
635 * lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.
636
b5493fb2
JH
6372012-09-19 Jan Hubicka <jh@suse.cz>
638
639 * lto.c (lto_materialize_function): Update confused comment.
640 (read_cgraph_and_symbols): Do not free symtab.
641
c3c445e1
JH
6422012-09-12 Jan Hubicka <jh@suse.cz>
643
644 * lto.c (do_whole_program_analysis): Care timevars, statistics and
645 AUX pointer cleaning. Add max partitioning.
646 * lto-partition.c (enum symbol_class): New.
647 (get_symbol_class): New function.
648 (symbol_partitioned_p): New function.
649 (add_references_to_partition): Remove.
650 (add_aliases_to_partition): Remove.
651 (add_cgraph_node_to_partition_1): Remove.
652 (add_cgraph_node_to_partition): Remove.
653 (add_symbol_to_partition): New function.
654 (add_symbol_to_partition_1): New function.
655 (contained_in_symbol): New function.
656 (partition_cgraph_node_p): Remove.
657 (partition_varpool_node_p): Remove.
658 (partition_symbol_p): Remove.
659 (lto_1_to_1_map): Cleanup.
660 (lto_max_map): New.
661 (lto_balanced_map): Update.
662 (lto_promote_cross_file_statics): Update.
663 * lto-partition.h (lto_max_map): Declare.
664 * timevar.def (TV_WHOPR_PARTITIONING): New timevar.
665
b5c7cdfb
JH
6662012-09-11 Jan Hubicka <jh@suse.cz>
667
668 PR lto/54312
669 * lto.c (uniquify_nodes): Remove quadratic loop checking if the
670 type is variant leader.
671
b29402f0
RG
6722012-09-11 Richard Guenther <rguenther@suse.de>
673
674 * lto.c (enum gtc_mode): Remove.
675 (struct type_pair_d): Adjust.
676 (lookup_type_pair): Likewise.
677 (gimple_type_leader): Do not mark as deletable.
678 (gimple_lookup_type_leader): Adjust.
679 (gtc_visit): Likewise.
680 (gimple_types_compatible_p_1): Likewise.
681 (gimple_types_compatible_p): Likewise.
682 (gimple_type_hash): Likewise.
683 (gimple_register_type): Likewise.
684 (read_cgraph_and_symbols): Manage lifetime of tables
685 here.
686
b8f4e58f
RG
6872012-09-11 Richard Guenther <rguenther@suse.de>
688
689 * lto.c (gimple_types, type_hash_cache, enum gtc_mode,
690 struct type_pair_d, lookup_type_pair, struct sccs,
691 next_dfs_num, gtc_next_dfs_num, struct gimple_type_leader_entry_s,
692 gimple_type_leader, gimple_lookup_type_leader, compare_type_names_p,
693 gtc_visit, gimple_types_compatible_p_1, gimple_types_compatible_p,
694 visit, iterative_hash_name, struct type_hash_pair,
695 type_hash_pair_compare, iterative_hash_gimple_type, gimple_type_hash,
696 gimple_type_eq, gimple_register_type_1, gimple_register_type):
697 Move here from gimple.c
698 (read_cgraph_and_symbols): Free hash tables here.
699 (print_lto_report_1): New function wrapping print_lto_report.
700 (do_whole_program_analysis): Call it.
701 (lto_main): Likewise.
702
1cdbb3f9
JH
7032012-09-10 Jan Hubicka <jh@suse.cz>
704
705 * lto-partition.c (partition_symbol_p): Forward declare.
706 (add_references_to_partition): Reimplement using partition_symbol_p.
707 (add_aliases_to_partition): Break out from add_references_to_partition;
708 reimplement using partition_symbol_p.
709 (add_cgraph_node_to_partition_1): Handle callees using partition_symbol_p;
710 add sanity checks.
711 (add_varpool_node_to_partition): Use add_aliases_to_partition.
712 (partition_varpool_node_p): Do not special case aliases.
713
b4661bfe
JH
7142012-08-12 Jan Hubicka <jh@suse.cz>
715
716 * lto.c (lto_wpa_write_files): Do not delete partition encoder;
717 it is deleted after streaming.
718 * lto-partition.c (partition_symbol_p): New function.
719 (promote_var, promote_fn): Remove.
720 (promote_symbol): New function.
721 (lto_promote_cross_file_statics): First compute boundaries; rewrite
722 to lookup the actual boundaries instead of computing them ad-hoc.
723
7b99cca4
JH
7242012-08-12 Jan Hubicka <jh@suse.cz>
725
726 Replace cgraph_node_set and varpool_node_set by symtab_node_encoder
727 in partitioning.
728 * lto-partition.h (ltrans_partition_def): Replace cgraph_set and varpool_set
729 by encoder.
730 * lto-partition.c (new_partition): Update.
731 * lto.c (cmp_partitions_order): Update.
732 (lto_wpa_write_files): Update.
733 (free_ltrans_partitions): Update.
734 (add_references_to_partition): Update.
735 (add_cgraph_node_to_partition_1): Update.
736 (add_cgraph_node_to_partition): Update.
737 (add_varpool_node_to_partition): Update.
738 (undo_partition): Update.
739 (lto_balanced_map): Update.
740 (set_referenced_from_other_partition_p, set_reachable_from_other_partition_p,
741 set_referenced_from_this_partition_p): Update.
742 (lto_promote_cross_file_statics): Update.
743
f27c1867
JH
7442012-08-12 Jan Hubicka <jh@suse.cz>
745
746 * lto-partition.c (set_referenced_from_other_partition_p,
747 set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
748 New functions.
749 (lto_promote_cross_file_statics): Use them.
750
ab96cc5b
JH
7512012-07-24 Jan Hubicka <jh@suse.cz>
752
753 * lto.c (read_cgraph_and_symbols): Use input_symtab.
754
0229aee9
UB
7552012-07-24 Uros Bizjak <ubizjak@gmail.com>
756
757 * lto-tree.h (lang_decl): Add variable_size GTY option.
758
7ee2468b
SB
7592012-07-16 Steven Bosscher <steven@gcc.gnu.org>
760
761 * lto.c: Do not include timevar.h.
762 * Make-lang.in: Fix dependencies.
763
a910399d
LC
7642012-06-18 Lawrence Crowl <crowl@google.com>
765
766 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
767 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
768 to lto_wpa_write_files.
769 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
770 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
771 TV_PHASE_SETUP for the call to lto_init. Use new timevar
772 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
773 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
774 to be a front end, but is not one.
775
877ab5e9
JH
7762012-05-18 Jan Hubicka <jh@suse.cz>
777
778 * lto.c (lto_materialize_constructors_and_inits): Remove.
779 (read_cgraph_and_symbols): Remove handling of alias pairs.
780
6649df51
JH
7812012-05-17 Jan Hubicka <jh@suse.cz>
782
783 * lto-partition.c (add_references_to_partition): Handle external vars.
784 (partition_varpool_node_p): Likewise.
785 (lto_promote_cross_file_statics): Do not promote externals.
786
d1ede5f4
BS
7872012-05-14 Bernd Schmidt <bernds@codesourcery.com>
788
789 * lto-lang.c (handle_fnspec_attribute): New static function.
790 (lto_attribute_table): Add "fn spec".
791 (DEF_ATTR_STRING): Define and undefine along with the other macros.
792
0d6bf48c
JH
7932012-05-04 Jan Hubicka <jh@suse.cz>
794
795 * lto.c (do_whole_program_analysis): Set timevars correctly.
796 (lto_main): Likewise.
d1ede5f4 797
1d67dde8
RB
7982012-05-04 Richard Guenther <rguenther@suse.de>
799
800 * lang.opt (fwpa): Do not mark as Optimization.
801 (fltrans): Likewise.
802
65d630d4
JH
8032012-04-30 Jan Hubicka <jh@suse.cz>
804
805 * lto.c (lto_main): Use compile ().
1d67dde8
RB
806 * lto-partition.c (partition_cgraph_node_p): Use
807 symtab_used_from_object_file_p.
65d630d4
JH
808 (partition_varpool_node_p): Likewise.
809
ead84f73
JH
8102012-04-20 Jan Hubicka <jh@suse.cz>
811
812 * lto-partition.c (partition_cgraph_node_p): Use force_output.
813
5932a4d4
JH
8142012-04-18 Jan Hubicka <jh@suse.cz>
815
816 * lto-partition.c (add_references_to_partition, lto_balanced_map):
817 Update for new ipa-ref API.
818
65c70e6b
JH
8192012-04-16 Jan Hubicka <jh@suse.cz>
820
821 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
822 walkers to walk cgraph and varpool.
823 (materialize_cgraph): Likewise.
824 * lto-partition.c (lto_1_to_1_map): Likewise.
825 (lto_balanced_map): Likewise.
826 (lto_promote_cross_file_statics): Likewise.
827
960bfb69
JH
8282012-04-14 Jan Hubicka <jh@suse.cz>
829
830 * lto.c: Update field referenced for new cgraph/varpool layout.
831 * lto-partition.c: Likewise.
832
a66dc285
JH
8332012-04-11 Jan Hubicka <jh@suse.cz>
834
835 * lto.c: Update copyright; remove params.h, ipa-inline.h
836 and ipa-utils.h inlines; inline lto-partition.h
837 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
838 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
839 add_references_to_partition, add_cgraph_node_to_partition_1,
840 add_cgraph_node_to_partition, add_varpool_node_to_partition,
841 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
842 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
843 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
844 * lto-partition.c: ... here; new file.
845 * lto-partition.h: New file.
846 * Make-lang.in (lto.o): Update dependencies.
847 (lto-partition.o): New.
848
f3b249e5
RG
8492012-04-05 Richard Guenther <rguenther@suse.de>
850
851 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
852 definition.
853
21fa2faf
RG
8542012-03-12 Richard Guenther <rguenther@suse.de>
855
856 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
857
6bb485a3
RG
8582012-03-06 Richard Guenther <rguenther@suse.de>
859
860 PR lto/52097
861 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
862
95510497
RG
8632012-02-28 Richard Guenther <rguenther@suse.de>
864
865 PR lto/52400
866 * lto.c (lto_register_function_decl_in_symtab): Do not register
867 a reverse renamed decl mapping.
868
09228fef
JJ
8692012-01-06 Jakub Jelinek <jakub@redhat.com>
870
871 PR lto/51774
872 * lto-lang.c (handle_returns_twice_attribute): New function.
873 (lto_attribute_table): Add returns_twice attribute.
874
b03eda0d
RG
8752011-12-21 Richard Guenther <rguenther@suse.de>
876
877 * lto.c (GIMPLE_REGISTER_TYPE): New define.
878 (LTO_FIXUP_TREE): Use it.
879 (uniquify_nodes): Mark new non-prevailing types and avoid
880 calling gimple_register_type on others.
881 (lto_read_decls): Add comment.
882
4ad9a9de
EB
8832011-12-13 Eric Botcazou <ebotcazou@adacore.com>
884
885 * lto.h (lto_parse_hex): Delete.
886 * lto.c (lto_read_decls): Use 'int' for offsets.
887 (lto_parse_hex): Make static and return proper 64-bit host type.
888 (lto_resolution_read): Use proper 64-bit host type.
889
ea973bad
RG
8902011-12-13 Richard Guenther <rguenther@suse.de>
891
892 PR lto/48354
893 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
894 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
895
c8218030
UB
8962011-12-01 Uros Bizjak <ubizjak@gmail.com>
897
898 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
899 (ignore_attribute): New.
900
57ac2606
AH
9012011-11-21 Aldy Hernandez <aldyh@redhat.com>
902
903 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
904 (handle_transaction_pure_attribute): New.
905
52a35ef7
RG
9062011-11-03 Richard Guenther <rguenther@suse.de>
907
908 PR lto/44965
909 * lto-lang.c (lto_post_options): Do not read file options.
910 * lto.c (lto_read_all_file_options): Remove.
911 (lto_init): Call lto_set_in_hooks here.
912
51973b1e
JH
9132011-10-09 Jan Hubicka <jh@suse.cz>
914
915 * lto.c (node_cmp, varpool_node_cmp): New functions.
916 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
917 (cmp_partitions): Rename to ...
918 (cmp_partitions_size): ... this one.
919 (cmp_partitions_order): New function.
920 (lto_wpa_write_files): Sort partitions by order when
921 -fno-toplevel-reorder is used.
922
5958009b
AK
9232011-10-09 Andi Kleen <ak@linux.intel.com>
924
925 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
926
e79983f4
MM
9272011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
928
929 * lto-lang.c (def_builtin_1): Delete old interface with two
930 parallel arrays to hold standard builtin declarations, and replace
931 it with a function based interface that can support creating
932 builtins on the fly in the future. Change all uses, and poison
933 the old names. Make sure 0 is not a legitimate builtin index.
934
ecdbd01a 9352011-10-02 Andi Kleen <ak@linux.intel.com>
c17d253c
AK
936
937 * lto-object.c (lto_obj_add_section_data): Add list.
938 (lto_obj_add_section): Fill in list.
939 (ltoobj_build_section_table): Pass through list.
940 * lto.c (file_data_list): Declare.
941 (create_subid_section_table): Pass arguments directly.
942 Fill in list of file_datas.
943 (lwstate): Delete.
944 (lto_create_files_from_ids): Pass in direct arguments.
945 Don't maintain list.
946 (lto_file_read): Use explicit section and file data lists.
947 (lto_read_all_file_options): Pass in section_list.
948 * lto.h (lto_obj_build_section_table): Add list.
949 (lto_section_slot): Add next.
950 (lto_section_list): Declare.
951
ed0d2da0
JH
9522011-10-02 Jan Hubicka <jh@suse.cz>
953
954 PR lto/47247
955 * common.c (lto_resolution_str): Add new resolution.
956 * common.h (lto_resolution_str): Likewise.
957
ad7715f3
L
9582011-09-30 H.J. Lu <hongjiu.lu@intel.com>
959 Andi Kleen <ak@linux.intel.com>
960
961 PR lto/50568
962 * lto.c (lto_splay_tree_delete_id): New.
963 (lto_splay_tree_compare_ids): Likewise.
964 (lto_splay_tree_lookup): Likewise.
965 (lto_splay_tree_id_equal_p): Likewise.
966 (lto_splay_tree_insert): Likewise.
967 (lto_splay_tree_new): Likewise.
968 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
969 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
970 (create_subid_section_table): Use lto_splay_tree_lookup and
971 lto_splay_tree_insert.
972 (lto_file_read): Use lto_splay_tree_new.
973
ecdbd01a 9742011-09-26 Andi Kleen <ak@linux.intel.com>
dde8b360
AK
975
976 * lto.c (lto_resolution_read): Remove id dumping.
977 (lto_section_with_id): Turn id HOST_WIDE_ID.
978 (create_subid_section_table): Dito.
979
892a371f
DS
9802011-08-28 Dodji Seketeli <dodji@redhat.com>
981
982 * lto-lang.c (lto_init): Likewise. Also, avoid calling
983 linemap_add twice.
984
f82d1a94
MJ
9852011-08-11 Martin Jambor <mjambor@suse.cz>
986
987 * lto.c (uniquify_nodes): Use main variant's BINFO too.
988
f0efc7aa
DN
9892011-08-08 Diego Novillo <dnovillo@google.com>
990
991 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
992 * lto.c: Include tree-streamer.h.
993
1a072294
RG
9942011-07-06 Richard Guenther <rguenther@suse.de>
995
996 * lto-lang.c (lto_init):
997 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
998
7496868d
JH
9992011-06-11 Jan Hubicka <jh@suse.cz>
1000
10f13f22 1001 PR lto/48246
7496868d
JH
1002 * lto.c (lto_1_to_1_map): Don't create empty partitions.
1003 (lto_balanced_map): Likewise.
1004
39e2db00
JH
10052011-06-11 Jan Hubicka <jh@suse.cz>
1006
1007 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
1008 (add_cgraph_node_to_partition) ... here; walk aliases.
1009 (lto_1_to_1_map): Remove same body alias code.
1010 (promote_fn): Likewise.
1011 (lto_promote_cross_file_statics): Update comment.
1012
1013
28628ea6
DN
10142011-06-07 Diego Novillo <dnovillo@google.com>
1015
1016 * lto.c (uniquify_nodes): Move code to register decls to
1017 the loop that computes canonical types.
1018
009db074
RG
10192011-06-07 Richard Guenther <rguenther@suse.de>
1020
1021 * lto-lang.c (lto_init): Do not set
1022 size_type_node or call set_sizetype.
1023
47c79d56
DN
10242011-06-04 Diego Novillo <dnovillo@google.com>
1025
1026 * lto.c (lto_init): New.
1027 (lto_main): Call it.
1028
d5828cc7
DN
10292011-06-03 Diego Novillo <dnovillo@google.com>
1030
1031 * lto.c (get_resolution): Move from lto-streamer-in.c.
1032 (lto_register_var_decl_in_symtab): Likewise.
1033 (lto_register_function_decl_in_symtab): Likewise.
1034 (uniquify_nodes): Call lto_register_var_decl and
1035 lto_register_function_decl_in_symtab after reading a new
1036 VAR_DECL or FUNCTION_DECL.
1037
6807da97
RG
10382011-06-01 Richard Guenther <rguenther@suse.de>
1039
1040 * lto-lang.c (lto_register_canonical_types): New function.
1041 (lto_init): Register common nodes with the canonical type machinery.
1042 Do not play tricks with char_type_node.
1043
d74be317
RG
10442011-05-26 Richard Guenther <rguenther@suse.de>
1045
1046 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
1047
d9f8303f
NF
10482011-05-25 Nathan Froyd <froydnj@codesourcery.com>
1049
1050 * lto.c (lto_ft_typed): New function.
1051 (lto_ft_common): Call it.
1052 (lto_ft_constructor): Likewise.
1053 (lto_ft_expr): Likewise.
1054 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
1055 TREE_CHAIN.
1056
fb291a1e
RG
10572011-05-20 Richard Guenther <rguenther@suse.de>
1058
1059 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
1060 (lto_ft_type): Move main-variant and pointer-to chain building ...
1061 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
1062 in a separate final loop.
1063
31b3ca64
RG
10642011-05-19 Richard Guenther <rguenther@suse.de>
1065
1066 * lto.c (uniquify_nodes): First register all types before
1067 fixing up the tree SCC.
1068
35d828c5
JH
10692011-05-11 Jan Hubicka <jh@suse.cz>
1070
1071 PR lto/48952
1072 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
1073
51545682
NF
10742011-05-11 Nathan Froyd <froydnj@codesourcery.com>
1075
1076 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
1077 location of binfo field.
1078 (lto_fixup_prevailing_decls): Likewise.
1079
8242dd04
NF
10802011-05-10 Nathan Froyd <froydnj@codesourcery.com>
1081
1082 * lto-lang.c (def_fn_type): Don't call build_function_type, call
1083 build_function_type_array or build_varargs_function_type_array
1084 instead.
1085
c99c0026
EB
10862011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1087
1088 * lto-lang.c (global_bindings_p): Return bool.
1089
c47d0034
JH
10902011-05-07 Jan Hubicka <jh@suse.cz>
1091
a9bcb3f0
EB
1092 * lto.c (lto_materialize_function): Use
1093 cgraph_function_with_gimple_body_p.
1094 (add_cgraph_node_to_partition): Do not re-add items to partition;
1095 handle thunks.
c47d0034
JH
1096 (add_varpool_node_to_partition): Do not re-add items to partition.
1097
bb3398ca
JH
10982011-05-03 Jan Hubicka <jh@suse.cz>
1099
1100 * lto.c (free_ltrans_partitions): Fix accidental commit.
1101
1cb1a99f
JH
11022011-05-03 Jan Hubicka <jh@suse.cz>
1103
1104 * lto.c (ltrans_partition_def): Remove GTY annotations.
1105 (ltrans_partitions): Move to heap.
1106 (new_partition): Update.
1107 (free_ltrans_partitions): New function.
1108 (lto_wpa_write_files): Use it.
1109
af8bca3c
MJ
11102011-04-29 Martin Jambor <mjambor@suse.cz>
1111
1112 * lto.c: Include ipa-utils.h.
1113 (lto_balanced_map): Update call to ipa_reverse_postorder.
1114 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
1115
b823cdfe
MM
11162011-04-29 Michael Matz <matz@suse.de>
1117
1118 * lto.c (toplevel): Include tree-flow.h.
1119 (lto_read_in_decl_state): Don't merge types here.
1120 (tree_with_vars): New static hash table.
1121 (remember_with_vars): New static functions.
1122 (LTO_FIXUP_TYPE): New macro.
1123 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
1124 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
1125 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
1126 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
1127 (lto_read_decls): Uniquify while reading in trees.
1128 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
1129 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
1130 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
1131 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
1132 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
1133 lto_fixup_tree): Remove.
1134 (lto_fixup_state): Remove data argument. Use
1135 lto_symtab_prevailing_decl.
1136 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
1137 (lto_fixup_prevailing_decls): New function.
1138 (lto_fixup_state_aux): Argument aux is unused.
1139 (lto_fixup_decls): Don't allocate pointer sets, don't use
1140 lto_fixup_tree, use lto_fixup_prevailing_decls.
1141 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
1142 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
1143
b9843260
EB
11442011-04-16 Eric Botcazou <ebotcazou@adacore.com>
1145
1146 * lto.c (lto_balanced_map): Fix typos in head comment.
1147 (lto_promote_cross_file_statics): Fix long lines and remove redundant
1148 test.
1149
e7f23018
JH
11502011-04-16 Jan Hubicka <jh@suse.cz>
1151
1152 * lto.c (lto_balanced_map): Update.
1153
10a5dd5d
JH
11542011-04-14 Jan Hubicka <jh@suse.cz>
1155
1156 * lto.c: Include ipa-inline.h
b9843260
EB
1157 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
1158 accessor.
10a5dd5d
JH
1159 (ipa_node_duplication_hook): Fix declaration.
1160 * Make-lang.in (lto.o): Update dependencies.
1161
81f653d6
NF
11622011-04-12 Nathan Froyd <froydnj@codesourcery.com>
1163
1164 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
1165 calling TREE_CHAIN.
1166 * lto.c (lto_fixup_common): Likewise.
1167
dcf0c47e
NF
11682011-04-08 Nathan Froyd <froydnj@codesourcery.com>
1169
1170 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
1171 (handle_type_generic_attribute): Likewise.
1172
e89964e3
MM
11732011-04-03 Michael Matz <matz@suse.de>
1174
1175 * lto.c (lto_materialize_function): Don't read and then discard
1176 sections in WPA mode.
1177 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
1178
1179 * lto-lang.c (registered_builtin_fndecls): Remove.
1180 (lto_getdecls): Return NULL_TREE.
1181 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
1182
d2b3fe18
RG
11832011-03-31 Richard Guenther <rguenther@suse.de>
1184
1185 PR lto/48246
1186 * lto.c (lto_wpa_write_files): Disable assert for non-empty
1187 partitions when checking is not enabled.
1188
ba78087b
KT
11892011-03-25 Kai Tietz <ktietz@redhat.com>
1190
1191 * lto.c (lto_resolution_read): Use filename_cmp instead
1192 of strcmp.
1193 (lto_read_section_data): Likewise.
1194
0edf1bb2
JL
11952011-03-25 Jeff Law <law@redhat.com>
1196
1197 * lto/lto-lang.c (def_fn_type): Add missing va_end.
1198
62d784f7
KT
11992011-03-21 Kai Tietz <ktietz@redhat.com>
1200
1201 PR target/12171
1202 * lto-lang.c (lto_attribute_table): Adjust table.
1203
62dd9571
JJ
12042011-02-18 Jakub Jelinek <jakub@redhat.com>
1205
1206 PR bootstrap/47807
1207 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
1208 of lto-streamer.h.
1209
237d6259
RG
12102011-02-18 Richard Guenther <rguenther@suse.de>
1211
1212 PR lto/47798
1213 * lto-tree.h (lto_global_var_decls): Do not declare here.
1214 * lto-lang.c: Include lto-streamer.h.
1215 * Make-lang.in (lto-lang.o): Adjust dependencies.
1216
8ead2223
KT
12172011-02-10 Kai Tietz <kai.tietz@onevision.com>
1218
1219 PR lto/47241
1220 * lto.c (lto_read_section_data): Free
1221 fd_name in failure case.
1222 For mingw targets don't hash file-descriptor.
1223 (read_cgraph_and_symbols): Close current_lto_file
1224 in failure case.
1225
6e701822
JH
12262011-01-11 Jan Hubicka <jh@suse.cz>
1227
1228 PR lto/45721
1229 PR lto/45375
b9843260
EB
1230 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
1231 are not partitioned.
6e701822 1232
f4da8dce
NF
12332010-12-22 Nathan Froyd <froydnj@codesourcery.com>
1234
1235 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
1236 Use prototype_p.
1237
6b7fb143
RG
12382010-12-06 Richard Guenther <rguenther@suse.de>
1239
1240 PR lto/46796
1241 * lto-lang.c (lto_init): Give names to basic types.
1242
c59ffc41
JM
12432010-11-30 Joseph Myers <joseph@codesourcery.com>
1244
1245 * lto-object.c: Don't include toplev.h.
1246 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
1247
7c475d11
JM
12482010-11-30 Joseph Myers <joseph@codesourcery.com>
1249
1250 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
1251 $(TOPLEV_H).
1252
71f3e391
JM
12532010-11-29 Joseph Myers <joseph@codesourcery.com>
1254
1255 * lto-endian.h: Delete.
1256 * lto-object.c: Don't include "libiberty.h".
1257 (O_BINARY): Don't define.
1258 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
1259 (O_BINARY): Don't define.
1260
9f1718b0
RG
12612010-11-23 Richard Guenther <rguenther@suse.de>
1262
1263 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
1264
39c4e298
RG
12652010-11-23 Richard Guenther <rguenther@suse.de>
1266
1267 PR lto/46605
1268 * lto.c (read_cgraph_and_symbols): Bail out after errors.
1269
b37421c6
JM
12702010-11-17 Joseph Myers <joseph@codesourcery.com>
1271
1272 * lto.c (lto_main): Take no arguments.
1273 * lto.h (lto_main): Update prototype.
1274
d82f74d3
ILT
12752010-11-16 Ian Lance Taylor <iant@google.com>
1276
1277 * lto-object.c (lto_obj_file_open): Call
1278 simple_object_attributes_merge rather than
1279 simple_object_attributes_compare.
1280
a4d8c676
JM
12812010-11-12 Joseph Myers <joseph@codesourcery.com>
1282
1283 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
1284 * lto-lang.c (lto_handle_option): Take location_t parameter.
1285
d8a07487
JM
12862010-11-10 Joseph Myers <joseph@codesourcery.com>
1287
1288 * lto.c (lto_resolution_read): Start diagnostics with lowercase
1289 letters and remove trailing '.'.
1290 (lto_file_finalize): Start diagnostic with a lowercase letter.
1291
6b3456d1
ILT
12922010-11-02 Ian Lance Taylor <iant@google.com>
1293
1294 * lto-object.c: New file.
1295 * lto-elf.c: Remove file.
1296 * lto-macho.c: Remove file.
1297 * lto-macho.h: Remove file.
1298 * lto-coff.c: Remove file.
1299 * lto-coff.h: Remove file.
1300 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
1301 lto/lto-object.o.
1302 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
1303 (lto/lto-objfile.o): New target.
1304 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
1305 (lto/lto.o): Remove $(LIBIBERTY_H).
1306
030cd86c
JH
13072010-10-22 Jan Hubicka <jh@suse.cz>
1308
1309 * lto.c (add_cgraph_node_to_partition,
1310 add_varpool_node_to_partition): Add debug info.
1311 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
1312 partitioned nodes.
1313 (do_whole_program_analysis): Set function flags before dumping.
1314
4490cae6
RG
13152010-10-22 Richard Guenther <rguenther@suse.de>
1316
1317 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
1318 the new gimple_register_canonical_type.
1319
703cdce3
L
13202010-10-20 H.J. Lu <hongjiu.lu@intel.com>
1321
1322 PR bootstrap/45954
1323 * config-lang.in (boot_language): Set to $enable_lto.
1324
1915c739
JJ
13252010-10-18 Jakub Jelinek <jakub@redhat.com>
1326
1327 PR lto/45638
1328 * Make-lang.in (check-lto): New dummy target.
1329
82971de5
EB
13302010-10-14 Eric Botcazou <ebotcazou@adacore.com>
1331
1332 * lto-elf.c (SHN_XINDEX): Define if not already defined.
1333
a75bfaa6
JM
13342010-10-08 Joseph Myers <joseph@codesourcery.com>
1335
1336 * lto-lang.c (lto_init_options): Change to
1337 lto_init_options_struct. Update parameters.
1338 (LANG_HOOKS_INIT_OPTIONS): Don't define.
1339 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
1340
937f7f69
JH
13412010-10-06 Jan Hubicka <jh@suse.cz>
1342
1343 * lto.c (lto_balanced_map): Fix accounting of program size.
1344
2169830c
JH
13452010-10-06 Jan Hubicka <jh@suse.cz>
1346
1347 * lto.c (lto_balanced_map): Do not produce empty partitions.
1348
ecdbd01a 13492010-10-06 Andi Kleen <ak@linux.intel.com>
6e9bd0f8
AK
1350
1351 * lto.c (lto_process_name): Add.
1352 (lto_main): Call lto_process_name.
1353
06ed016f
JH
13542010-10-06 Jan Hubicka <jh@suse.cz>
1355
1356 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
1357 COMDATs required by the linker.
1358
ae718d66
ILT
13592010-10-05 Ian Lance Taylor <iant@google.com>
1360
1361 * lto.c (lto_section_with_id): Make s a const pointer.
1362
852e4bd2
JH
13632010-10-05 Jan Hubicka <jh@suse.cz>
1364
1365 * lto.c: Include params.h.
1366 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
1367 refcounting in aux field.
1368 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
1369 New functions.
1370 (lto_1_to_1_map): Simplify.
1371 (lto_balanced_map): New function.
1372 (do_whole_program_analysis): Chose proper partitioning alg.
1373 * Make-lang.in (lto.o): Add dependency on params.h
1374
ecdbd01a 13752010-10-04 Andi Kleen <ak@linux.intel.com>
a90163e9
AK
1376
1377 * Make-lang.in (lto1): Add + to build rule.
1378
ecdbd01a 13792010-10-03 Andi Kleen <ak@linux.intel.com>
f1e92a43
AK
1380
1381 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
1382 with fatal_error.
1383
0d6e14fd
JH
13842010-09-28 Jan Hubicka <jh@suse.cz>
1385
1386 * lto-lang.c (handle_leaf_attribute): New function.
1387 (lto_attribute_tables): Add leaf.
1388
fb462383
JZ
13892010-09-25 Jie Zhang <jie@codesourcery.com>
1390
1391 * lto.c (lto_read_all_file_options): Start a new line after
1392 printing out file names.
1393
051f8cc6
JH
13942010-09-24 Jan Hubicka <jh@suse.cz>
1395
1396 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1397
64e0f5ff
JH
13982010-09-20 Jan Hubicka <jh@suse.cz>
1399
1400 PR tree-optimize/45605
1401 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
1402
a929ec3d
GP
14032010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
1404
1405 * lto-elf.c (lto_obj_file_open): Also provide filename when
1406 elf_begin fails.
1407
4c588abf
JH
14082010-09-17 Jan Hubicka <jh@suse.cz>
1409
1410 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
1411
c3224d6f
RG
14122010-09-17 Richard Guenther <rguenther@suse.de>
1413
1414 * lang.opt (flag_wpa): Also enable for the driver.
1415
52b3b3c7
JH
14162010-09-16 Jan Hubicka <jh@suse.cz>
1417
1418 * lto.c (lto_materialize_function): Do not tamper with STATIC and
1419 EXTERNAL flags.
1420
969c37b7
LB
14212010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1422
1423 * lto-tree.h (struct lang_type): Add variable_size GTY option.
1424
098a4f50
JH
14252010-09-08 Jan Hubicka <jh@suse.cz>
1426
1427 * lto.c (real_file_count, real_file_decl_data): New static vars.
1428 (read_cgraph_and_symbols): Use it.
1429
0f443ad0
RG
14302010-09-08 Richard Guenther <rguenther@suse.de>
1431
1432 * lto.c (read_cgraph_and_symbols): Collect again after each
1433 file.
1434
ee187353
JH
14352010-09-07 Jan Hubicka <jh@suse.cz>
1436
1437 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
1438
b3ec52d0
RG
14392010-09-03 Richard Guenther <rguenther@suse.de>
1440
1441 * lto-elf.c (validate_file): Always error if validation fails.
1442
f1395d4a
JH
14432010-08-20 Jan Hubicka <jh@suse.cz>
1444
1445 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
1446 (lto_wpa_write_files): Update comments.
1447
2429bce3
L
14482010-08-20 H.J. Lu <hongjiu.lu@intel.com>
1449
1450 PR bootstrap/45357
1451 * lto.c (lto_materialize_function): Replace has_analyzed_clone
1452 with has_analyzed_clone_p.
1453
e0f967db
JH
14542010-08-20 Jan Hubicka <jh@suse.cz>
1455
1456 * lto.c (has_analyzed_clone_p): New function
1457 (lto_materialize_function): Use callgraph to determine if
1458 body is needed.
1459 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
1460
ac47786e
NF
14612010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1462
1463 * lto.c: Use FOR_EACH_VEC_ELT.
1464
ecdbd01a 14652010-07-27 Andi Kleen <ak@linux.intel.com>
d720b869
AK
1466
1467 * Make-lang.in (lto.o): Add dependency to splay-tree.h
1468
5f20c657
JM
14692010-07-27 Joseph Myers <joseph@codesourcery.com>
1470
1471 * lto-lang.c (lto_handle_option): Update prototype and return
1472 value type. Remove duplicate assignment to result.
1473
7a9bf9a4
JM
14742010-07-27 Joseph Myers <joseph@codesourcery.com>
1475
1476 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
1477 New.
1478 (lto_init_options): Update prototype.
1479 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
1480 Define.
1481
ecdbd01a 14822010-07-10 Andi Kleen <ak@linux.intel.com>
73ce4d1e
AK
1483
1484 PR lto/44992
1485 * lto.c: Include splay-tree.h
1486 (lto_resolution_read): Change to walk file_ids tree and parse
1487 extra file_id in resolution file.
1488 (lto_section_with_id): Add.
1489 (create_subid_section_table): Add.
1490 (lwstate): Add.
1491 (lto_create_files_from_ids): Add.
1492 (lto_file_read): Change to handle sub file ids and create list
1493 of file_datas. Add output argument for count.
1494 (get_section_data): Pass file_data to lto_get_section_name.
1495 (lto_flatten_file): Add.
1496 (read_cgraph_and_symbols): Handle linked lists of file_datas.
1497
ecdbd01a 14982010-07-10 Andi Kleen <ak@linux.intel.com>
2994ee14
AK
1499
1500 * lto-coff.c (hash_name, eq_name): Move.
1501 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1502 * lto-elf.c: (hash_name, eq_name): Move.
1503 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1504 * lto-macho.c: (hash_name, eq_name): Move.
1505 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
1506 * lto.c: (hash_name, eq_name): Move from lto-*.c
1507 (lto_obj_create_section_hash_table): Add.
1508 (free_with_string): Add.
1509
718f9c0f
MLI
15102010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1511
1512 * lto-coff.c: Include diagnostic-core.h in every file that
1513 includes toplev.h.
1514 * lto-elf.c: Likewise.
1515 * lto-lang.c: Likewise.
1516 * lto-macho.c: Likewise.
1517
1b137837
JJ
15182010-07-07 Jakub Jelinek <jakub@redhat.com>
1519
1520 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
1521 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
1522 objects.
1523
92eb4438
JH
15242010-07-05 Jan Hubicka <jh@suse.cz>
1525
1526 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
1527 nodes from same comdat group as well as all comdat functions referenced
1528 here.
b9843260
EB
1529 (add_varpool_node_to_partition, add_references_to_partition): New
1530 function.
1531 (lto_1_1_map): Skip COMDAT fnctions/variables; use
1532 add_varpool_node_to_partition; clear aux flags when done.
1533 (lto_promote_cross_file_statics): Do not promote stuff that gets
1534 duplicated to each ltrans.
92eb4438 1535
a05541a9
JH
15362010-07-04 Jan Hubicka <jh@suse.cz>
1537
1538 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
1539
4a2ac96f
RG
15402010-06-13 Richard Guenther <rguenther@suse.de>
1541
1542 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
1543
1d536046
KT
15442010-06-09 Kai Tietz <kai.tietz@onevision.com>
1545
1546 * lto.c (lto_resolution_read): Pre-initialize local variable r.
1547 * lto-coff.c (coff_write_object_file): Add braces to if.
1548
a9429e29
LB
15492010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1550
1551 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
1552 (lto_file_read): Likewise.
1553 (new_partition): Likewise.
1554 (read_cgraph_and_symbols): Likewise.
1555
5498f011
JM
15562010-06-07 Joseph Myers <joseph@codesourcery.com>
1557
1558 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
1559 (lto_handle_option): Don't set flag_signed_char here.
1560
d4c0c9f6
RG
15612010-06-04 Richard Guenther <rguenther@suse.de>
1562
1563 PR lto/41584
1564 * lto.c (lto_1_to_1_map): Use the proper file_data for
1565 varpool nodes.
1566
0a5fa5a1
JH
15672010-05-30 Jan Hubicka <jh@suse.cz>
1568
1569 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
1570 partitioning decisions.
1571
9eec9488
JH
15722010-05-29 Jan Hubicka <jh@suse.cz>
1573
1574 * lto.c (bitmap vector): Remove.
1575 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
1576 (ltrans_partition_def): New structure.
1577 (ltrans_partition): New type and VECtor.
1578 (new_partition): New function.
1579 (add_cgraph_node_to_partition): New function.
1580 (lto_1_to_1_map): Reorganize for partitions.
1581 (lto_add_inline_clones): Remove.
1582 (lto_add_all_inlinees): Remove.
1583 (lto_promote_cross_file_statics): Use partitions.
1584 (cmp_partitions): New function.
1585 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
1586 use partitions; output files sorted by size.
1587
3e097227
SB
15882010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1589
1590 * Make-lang.in: Replace vec.h dependency with VEC_H.
1591
7ca92787
JM
15922010-05-28 Joseph Myers <joseph@codesourcery.com>
1593
1594 * lto-coff.c (coff_errmsg): Remove.
1595 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
1596 errors instead of coff_errmsg (-1).
1597 * lto-macho.c (mach_o_errmsg): Remove.
1598 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
1599 instead of mach_o_errmsg (-1).
1600 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
1601 xstrerror (errno).
1602
b5611987
RG
16032010-05-28 Richard Guenther <rguenther@suse.de>
1604
1605 * lto.c (prefix_name_with_star): Removed.
1606 (strip_extension): Likewise.
1607 (get_filename_for_set): Likewise.
1608 (lto_write_ltrans_list): Fold into ...
1609 (lto_wpa_write_files): ... this. Name LTRANS units
1610 by suffixing the ltrans output list filename.
1611 (do_whole_program_analysis): Adjust.
1612
1da2ed5f
JM
16132010-05-27 Joseph Myers <joseph@codesourcery.com>
1614
1615 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
1616 (read_cgraph_and_symbols, lto_main): Use seen_error.
1617 * Make-lang.in (lto/lto.o): Update dependencies.
1618
7951d88a
EB
16192010-05-27 Eric Botcazou <ebotcazou@adacore.com>
1620
1621 PR lto/44230
1622 * lto.h (lto_eh_personality): New prototype.
1623 * lto.c: Include debug.h.
1624 (first_personality_decl): New static variable.
1625 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
1626 first function for which it is non-null.
1627 (lto_eh_personality_decl): New static variable.
1628 (lto_eh_personality): New function.
1629 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
1630 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
1631
e12da9c2
SB
16322010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1633
1634 * lto-lang.c: Do not include expr.h.
1635
468194f4
RG
16362010-05-24 Richard Guenther <rguenther@suse.de>
1637
1638 * lto-elf.c (lto_obj_build_section_table): Work around
1639 FreeBSD libelf issue.
1640
bd9eb5da
RG
16412010-05-22 Richard Guenther <rguenther@suse.de>
1642
1643 * lto.c (read_cgraph_and_symbols): Do not collect.
1644
66576e1b
JH
16452010-05-20 Jan Hubicka <jh@suse.cz>
1646
1647 * lto.c (promote_var, promote_fn): New functions.
1648 (lto_promote_cross_file_statics): Compute correctly boundary including
1649 static initializers of readonly vars.
1650
36576655
JH
16512010-05-18 Jan Hubicka <jh@suse.cz>
1652
66576e1b 1653 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
1654 (lto_promote_cross_file_statics): Deal with non-inline clones.
1655
28632d63
JH
16562010-05-18 Jan Hubicka <jh@suse.cz>
1657
1658 * lto.c (lto_materialize_function): Announce function when
1659 reading body; allocate_struct_function only when reading body;
1660 do not finalize local statics; ggc_collect after reading;
1661 do not mark reachable node.
1662 (materialize_cgraph): Do not announce function.
1663
33e42d56
JH
16642010-05-11 Jan Hubicka <jh@suse.cz>
1665
1666 * lto.c (materialize_cgraph): Revert my previous patch.
1667
f6430ea5
KT
16682010-05-11 Kai Tietz <kai.tietz@onevision.com>
1669
1670 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
1671 IMAGE_FILE_MACHINE_AMD64.
1672 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
1673
0a0b07b7
JH
16742010-05-11 Jan Hubicka <jh@suse.cz>
1675
1676 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
1677 (materialize_cgraph): Add it here.
1678
9a809897
JH
16792010-05-11 Jan Hubicka <jh@suse.cz>
1680
1681 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
1682 vector.
1683
16842010-05-11 Jan Hubicka <jh@suse.cz>
1685
1686 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
1687 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
1688 use reachable_from_other_partition_p and
1689 referenced_from_other_partition_p test.
1690
94f64249
KT
16912010-05-11 Kai Tietz <kai.tietz@onevision.com>
1692
1693 * lto-coff.c (validate_file): Add x64-coff support.
1694 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
1695 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
1696 * lto-lang.c (lto_build_c_type_nodes): Add check for
1697 'long long unsigned int' for x64-windows.
1698 (lto_init): Likewise.
1699
1700
c082f9f3
SB
17012010-05-07 Steven Bosscher <steven@gcc.gnu.org>
1702
1703 * lto.h (struct lto_file_struct): Document offset member.
1704 * lto-endian.h: New file.
1705 * lto-macho.h: New file.
1706 * lto-macho.c: New file.
1707 * Make-lang.in: Add rule for lto-macho.o.
1708
5cd0e96b
RG
17092010-05-07 Richard Guenther <rguenther@suse.de>
1710
1711 PR lto/43857
1712 PR lto/43371
1713 * lang.opt (fresolution): Change to ...
1714 (fresolution=): ... this.
1715 * lto-lang.c (lto_handle_option): Adjust.
1716
48cf395b
RB
17172010-05-07 Richard Guenther <rguenther@suse.de>
1718
1719 * lto.c (DUMPBASE_SUFFIX): Remove.
1720 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
1721 Rename to ...
1722 (lto_write_ltrans_list): ... only output the list of ltrans files.
1723 (lto_maybe_unlink): Remove.
1724 (do_whole_program_analysis): Do not execute LTRANS phase
1725 from here.
1726
afa83c15
L
17272010-05-06 H.J. Lu <hongjiu.lu@intel.com>
1728
1729 * lto-lang.c (lto_handle_option): Add argument kind.
1730
369451ec
JH
17312010-05-05 Jan Hubicka <jh@suse.cz>
1732
48cf395b
RB
1733 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
1734 refs.
369451ec 1735
2f41ecf5
JH
17362010-05-05 Jan Hubicka <jh@suse.cz>
1737
1738 * lto.c (lto_1_to_1_map): Partition only needed nodes.
1739
ace72c88
JH
17402010-04-30 Jan Hubicka <jh@suse.cz>
1741
b9843260
EB
1742 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
1743 use default name.
ace72c88
JH
1744 (lto_wpa_write_files): Write any non-empty partition.
1745
05575e07
JH
17462010-04-30 Jan Hubicka <jh@suse.cz>
1747
1748 * lto.c: Do not attempt to make constant pool references global.
1749
49ba8180
JH
17502010-04-28 Jan Hubicka <jh@suse.cz>
1751
1752 * lto/lto.c (lto_read_in_decl_state): Use GGC.
1753 (lto_wpa_write_files): Announce what we are writting.
1754 (all_file_decl_data): New.
1755 (read_cgraph_and_symbols): Use GGC; correct timevars.
1756 (do_whole_program_analysis): Collect.
1757 * lto/Make-lang.in (lto.o): Fix dependency.
1758 * Makefile.in (GTFILES): Add lto-streamer.h.
1759 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
1760 (varpool_assemble_pending_decls): Use VAROUT.
1761 * lto-streamer.h (lto_tree_ref_table): Annotate.
1762 (lto_in_decl_state): Annotate.
1763 (lto_file_decl_data): Annotate.
1764
2942c502
JH
17652010-04-28 Jan Hubicka <jh@suse.cz>
1766
1767 * lto.c (lto_varpool_node_sets): New.
1768 (lto_1_to_1_map): Partition varpool too.
1769 (globalize_context_t, globalize_cross_file_statics,
1770 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
1771 lto_scan_statics_in_remaining_global_vars): Remove.
1772 (lto_promote_cross_file_statics): Rewrite.
1773 (get_filename_for_set): Take vset argument.
1774 (lto_wpa_write_files): Pass around vsets.
1775
3bec79c5
DK
17762010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
1777
1778 PR lto/42776
1779 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
1780 hardcoding 'lto-elf.o'.
1781 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
1782
1783 * lto-coff.h: New file.
1784 * lto-coff.c: Likewise.
1785
21aac880
RG
17862010-04-26 Richard Guenther <rguenther@suse.de>
1787
1788 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
1789
2cee0101
DK
17902010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
1791
1792 * lto.h (lto_elf_file_open): Rename prototype from this ...
1793 (lto_obj_file_open): ... to this.
1794 (lto_elf_file_close): Likewise ...
1795 (lto_obj_file_close): ... and likewise.
1796 (lto_elf_build_section_table): Likewise ...
1797 (lto_obj_build_section_table): ... and likewise.
1798 (lto_elf_begin_section): Likewise ...
1799 (lto_obj_begin_section): ... and likewise.
1800 (lto_elf_append_data): Likewise ...
1801 (lto_obj_append_data): ... and likewise.
1802 (lto_elf_end_section): Likewise ...
1803 (lto_obj_end_section): ... and likewise.
1804 * lto.c (lto_file_read): Update references to the above.
1805 (lto_wpa_write_files): Likewise.
1806 (lto_read_all_file_options): Likewise.
1807 (read_cgraph_and_symbols): Likewise.
1808 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
1809 (LANG_HOOKS_APPEND_DATA): Likewise.
1810 (LANG_HOOKS_END_SECTION): Likewise.
1811 * lto-elf.c (lto_elf_file_open): Rename from this ...
1812 (lto_obj_file_open): ... to this, updating any references.
1813 (lto_elf_file_close): Likewise ...
1814 (lto_obj_file_close): ... and likewise.
1815 (lto_elf_build_section_table): Likewise ...
1816 (lto_obj_build_section_table): ... and likewise.
1817 (lto_elf_begin_section): Likewise ...
1818 (lto_obj_begin_section): ... and likewise.
1819 (lto_elf_append_data): Likewise ...
1820 (lto_obj_append_data): ... and likewise.
1821 (lto_elf_end_section): Likewise ...
1822 (lto_obj_end_section): ... and likewise.
1823
bc58d7e1
JH
18242010-04-21 Jan Hubicka <jh@suse.cz>
1825
1826 * lto.c (lto_fixup_tree): Do not call wpa fixup.
1827 (materialize_cgraph): Likewise.
1828
e792884f
JH
18292010-04-21 Jan Hubicka <jh@suse.cz>
1830
1831 * lto.c (lto_wpa_write_files): Update.
1832 (read_cgraph_and_symbols): Be more verbose.
1833 (materialize_cgraph): Likewise.
1834 (do_whole_program_analysis): Likewise.
1835
c9945504
JH
18362010-04-21 Jan Hubicka <jh@suse.cz>
1837
1838 * lto.c (globalize_cross_file_statics): When function has address taken,
1839 it needs to be public.
1840
a837268b
JH
18412010-04-20 Jan Hubicka <jh@suse.cz>
1842
1843 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
1844 (lto_add_all_inlinees): Likewise.
1845 (lto_wpa_write_files): Likewise.
1846
3b9e5d95
EB
18472010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1848
1849 * lto-lang.c (lto_init): Remove second argument in call to
1850 build_common_tree_nodes.
1851
8ccb78f2
RO
18522010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1853
1854 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
1855 function.
1856
2f9b99e6
EB
18572010-03-09 Eric Botcazou <ebotcazou@adacore.com>
1858
1859 PR bootstrap/43276
1860 * lto-elf.c: Define EM_* constants if not already defined.
1861
bef7d288
EB
18622010-03-03 Eric Botcazou <ebotcazou@adacore.com>
1863
1864 * lto-elf.c (is_compatible_architecture): New static function.
1865 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
1866
f68df07c
RG
18672010-02-11 Richard Guenther <rguenther@suse.de>
1868
1869 PR driver/43021
1870 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
1871 appropriately.
1872
3cdea2b4
AH
18732010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
1874
1875 * lto.c (O_BINARY): Define.
1876 (lto_read_section_data): Open file in binary mode.
1877 * lto-elf.c (O_BINARY): Define.
1878 (lto_elf_file_open): Open file in binary mode.
1879
c59449fa
RG
18802010-01-08 Richard Guenther <rguenther@suse.de>
1881
1882 PR lto/42528
1883 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
1884 (lto_init): Do not init char_type_node in a standard way
1885 but according to flag_signed_char.
1886
d7fb0a6d
L
18872010-01-03 H.J. Lu <hongjiu.lu@intel.com>
1888
1889 PR lto/41564
1890 * lto.c (DUMPBASE_SUFFIX): New.
1891 (lto_execute_ltrans): Append a sequence number to -dumpbase
1892 for LTRANS.
1893
78ce4053
L
18942010-01-02 H.J. Lu <hongjiu.lu@intel.com>
1895
1896 PR lto/42580
1897 * lto-elf.c (lto_elf_file_open): Stop if the command line
1898 option file is missing.
1899
2a71eb48
RG
19002009-12-15 Richard Guenther <rguenther@suse.de>
1901
1902 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
1903 (lto_post_options): Do not disable debuginfo.
1904
a818bca1
DG
19052009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
1906
1907 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
1908
e7d00517
RG
19092009-12-11 Richard Guenther <rguenther@suse.de>
1910
1911 PR lto/42037
1912 * lto.c (lto_resolution_read): Properly grow the vector.
1913
1ab53893
RG
19142009-12-11 Richard Guenther <rguenther@suse.de>
1915
1916 PR lto/41915
1917 * lto-lang.c (lto_init_options): Initialize flag_complex_method
1918 to the C99 default. Do not set flag_unit_at_a_time.
1919
0f900dfa
JJ
19202009-11-28 Jakub Jelinek <jakub@redhat.com>
1921
1922 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
1923 variable.
1924
92fa7608
RAE
19252009-11-19 Rafael Avila de Espindola <espindola@google.com>
1926
1927 PR bootstrap/42096
1928 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
1929 * lto.c (lto_parse_hex): New.
1930 (lto_resolution_read): Use lto_parse_hex.
1931 * lto.h (lto_parse_hex): New.
1932
9870fe4f
RAE
19332009-11-17 Rafael Avila de Espindola <espindola@google.com>
1934
1935 * lto-elf.c (lto_file_init): Add offset argument.
1936 (lto_elf_file_open): Record the offset.
1937 * lto.c (lto_resolution_read): Change file_name into a lto_file
1938 argument. Check offsets.
1939 (lto_file_read): Update call to lto_resolution_read.
1940 * lto.h (lto_file_struct): Add the offset field.
1941
1b70729f
RAE
19422009-11-16 Rafael Avila de Espindola <espindola@google.com>
1943
1944 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
1945
0e3776db
JH
19462009-11-14 Jan Hubicka <jh@suse.cz>
1947
1948 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
1949
06bd7f56
RAE
19502009-11-12 Rafael Avila de Espindola <espindola@google.com>
1951
1952 * lang.opt (fresolution): Renamed from resolution.
1953 * lto-lang.c (lto_handle_option): Handle new option name.
1954 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
1955
7e9dc421
RG
19562009-11-04 Richard Guenther <rguenther@suse.de>
1957 Rafael Avila de Espindola <espindola@google.com>
1958
1959 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
1960 (lto_elf_file_open): Handle offsets in arguments name@offest.
1961
b207f900
RG
19622009-10-30 Richard Guenther <rguenther@suse.de>
1963
1964 PR lto/41858
1965 * lto.c (lto_file_read): Do not set file_data->fd.
1966 (lto_read_section_data): Use a single-entry file-descriptor cache.
1967 Do not check the result of xmalloc.
1968 (free_section_data): Do not use file_data->fd.
1969 (lto_read_all_file_options): Likewise.
1970
2c928155
RG
19712009-10-22 Richard Guenther <rguenther@suse.de>
1972
1973 * lto.c (lto_fixup_jump_functions): Remove.
1974 (lto_fixup_decls): Do not fixup jump functions.
1975 (read_cgraph_and_symbols): Schedule cgraph merging after
1976 summary reading. Schedule type and decl fixup before
1977 summary reading.
1978
f9c91f8a
RB
19792009-10-22 Richard Guenther <rguenther@suse.de>
1980
1981 * lto.c (lto_fixup_data_t): Remove free_list member.
1982 (lto_fixup_tree): Do not insert into free_list.
1983 (free_decl): Remove.
1984 (lto_fixup_decls): Remove free-list handling.
1985
fb3f88cc
JH
19862009-10-22 Jan Hubicka <jh@suse.cz>
1987
1988 * lto.c (lto_fixup_jump_functions): New function.
1989 (lto_fixup_decls): Use it.
1990
35f1e9f4
RG
19912009-10-16 Richard Guenther <rguenther@suse.de>
1992
1993 PR lto/41715
1994 * lto.c (lto_fixup_tree): Revert last change.
1995
200c8750
RG
19962009-10-14 Richard Guenther <rguenther@suse.de>
1997
1998 * lto.c (lto_fixup_tree): In case the prevailing decl is not
1999 compatible with the one we replace wrap it around a
2000 VIEW_CONVERT_EXPR.
2001
b1b07c92
RG
20022009-10-09 Richard Guenther <rguenther@suse.de>
2003
2004 PR lto/41635
2005 PR lto/41636
2006 * lto.c (read_cgraph_and_symbols): Do not assert we can open
2007 a file.
2008 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
2009 (init_ehdr##BITS): Likewise.
2010
3c2e7d45
JM
20112009-10-08 Joseph Myers <joseph@codesourcery.com>
2012
2013 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
2014 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
2015 diagnostics.
2016 * lto-lang.c (lto_post_options): Remove trailing "." from
2017 diagnostics.
2018
0d0bfe17
RG
20192009-10-08 Richard Guenther <rguenther@suse.de>
2020
2021 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
2022 hash tables.
2023
4bedf19a
JM
20242009-10-07 Joseph Myers <joseph@codesourcery.com>
2025
2026 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
2027
b20996ff
JH
20282009-10-07 Jan Hubicka <jh@suse.cz>
2029
2030 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
2031 ltrans stage; explain why this is needed and should not.
2032
1a735925
RG
20332009-10-05 Richard Guenther <rguenther@suse.de>
2034
2035 PR lto/41552
2036 PR lto/41487
2037 * lto.c (lto_read_decls): Do not register deferred decls.
2038 (read_cgraph_and_symbols): Delay symbol and cgraph merging
2039 until after reading the IPA summaries.
2040
d7f09764
DN
20412009-10-02 Rafael Avila de Espindola <espindola@google.com>
2042
2043 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
2044 (lto-lang.c): Don't include lto/common.h.
2045
20462009-10-02 Rafael Avila de Espindola <espindola@google.com>
2047
2048 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
2049 (lto/common.o): Remove.
2050 * common.c: Remove.
2051 * common.h (lto_kind_str): Remove.
2052 (lto_visibility_str): Remove.
2053 (lto_resolution_str): Make it static.
2054
20552009-10-01 Diego Novillo <dnovillo@google.com>
2056
2057 * lto.c (lto_read_decls): Add comment.
2058 Call internal_error instead of gcc_assert.
2059 (lto_resolution_read): Likewise.
2060 (lto_add_all_inlinees): Tidy.
2061 * Make-lang.in: Fix copyright boilerplate.
2062 (lto.pdf): New.
2063 (lto.install-pdf): New.
2064 * lto-tree.h: Fix copyright boilerplate.
2065 * lang-specs.h: Likewise.
2066 Remove ".lto" entry from compilers fragment.
2067 * lto-elf.c: Move inclusion of gelf.h after config.h.
2068 Tidy formatting everywhere.
2069 * lto.h: Fix copyright boilerplate.
2070 Tidy formatting everywhere.
2071 * common.c: Likewise.
2072 * config-lang.in: Likewise.
2073 * common.h: Likewise.
2074 * lto-lang.c: Likewise.
2075
20762009-10-01 Richard Guenther <rguenther@suse.de>
2077
2078 * lto.c (lto_read_section_data): Use plain lseek/read.
2079
20802009-10-01 Richard Guenther <rguenther@suse.de>
2081
2082 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
2083 use sysconf to query the system page size.
2084 (lto_file_read): Implement fallback using stdio.
2085 (free_section_data): Likewise.
2086
20872009-09-29 Diego Novillo <dnovillo@google.com>
2088
2089 * lto-lang.c (lto_init): Really fix call to
2090 build_common_builtin_nodes.
2091
20922009-09-29 Diego Novillo <dnovillo@google.com>
2093
2094 * lto-lang.c (lto_init): Fix call to
2095 build_common_builtin_nodes.
2096
20972009-09-29 Richard Guenther <rguenther@suse.de>
2098
2099 PR lto/40754
2100 * lto-elf.c (init_shdr##BITS): Properly specify alignment
2101 in bytes.
2102 (first_data_block): New static variable.
2103 (lto_elf_append_data): Align the first data block in each
2104 section.
2105
21062009-09-28 Diego Novillo <dnovillo@google.com>
2107
2108 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
2109 * lto.c (strip_extension): New.
2110 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
2111 (lto_execute_ltrans): Tidy.
2112 Do not pass -fwpa nor -fltrans-* to LTRANS.
2113 * opts.c: Tidy formatting and remove stale FIXME lto markers.
2114 * tree.c (need_assembler_name_p): Call
2115 lang_hooks.decls.may_need_assembler_name_p if set.
2116 * varasm.c (default_binds_local_p_1): Remove check for
2117 flag_ltrans.
2118 * varpool.c (decide_is_variable_needed): Do not test for
2119 in_lto_p.
2120
21212009-09-22 Richard Guenther <rguenther@suse.de>
2122
2123 PR lto/39276
2124 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
2125 * Make-lang.in: Remove ltrans-driver stuff.
2126 * config-lang.in: Likewise.
2127 * lang.opt (fltrans-driver): Remove.
2128 * lto-lang.c (lto_init_options): Remove code initializing
2129 ltrans_driver.
2130 * ltrans-driver: Remove.
2131
21322009-09-21 Diego Novillo <dnovillo@google.com>
2133
2134 * lto-lang.c (lto_define_builtins): Remove superfluous
2135 calls to targetm.init_builtins and build_common_builtin_nodes.
2136 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
2137 build_common_builtin_nodes.
2138 * lto.c (lto_materialize_function): Do nothing if NODE is a
2139 clone.
2140
21412009-09-03 Diego Novillo <dnovillo@google.com>
2142
2143 * lto-elf.c (validate_file): Replace call to
2144 elf_getshstrndx with call to elf_getshdrstrndx.
2145
21462009-08-19 Richard Guenther <rguenther@suse.de>
2147
2148 * lto-lang.c (lto_init): Merge char_type_node with the
2149 appropriately signed variant.
2150
21512009-08-19 Richard Guenther <rguenther@suse.de>
2152
2153 PR lto/41071
2154 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
2155 (lto_fixup_type): Re-build the pointer-to chain part two.
2156
21572009-08-19 Richard Guenther <rguenther@suse.de>
2158
2159 PR lto/41071
2160 * lto.c (lto_fixup_type): Re-build the type variant chain.
2161
21622009-08-19 Richard Guenther <rguenther@suse.de>
2163
2164 PR lto/41071
2165 * lto.c (lto_fixup_constructor): New function.
2166 (lto_fixup_tree): Replace all types. Properly fixup
2167 constructors and constants.
2168
21692009-08-14 Richard Guenther <rguenther@suse.de>
2170
2171 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
2172 for DECL_LANG_SPECIFIC.
2173
21742009-08-13 Richard Guenther <rguenther@suse.de>
2175
2176 PR lto/41032
2177 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
2178
21792009-07-30 Richard Guenther <rguenther@suse.de>
2180
2181 PR lto/40903
2182 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
2183 the largest decl for output and free TREE_CHAIN for further
2184 use.
2185
21862009-07-24 Diego Novillo <dnovillo@google.com>
2187
2188 * Make-lang.in: Add empty lto.install-plugin target.
2189
21902009-07-13 Diego Novillo <dnovillo@google.com>
2191
2192 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
2193
21942009-07-11 Richard Guenther <rguenther@suse.de>
2195
2196 * lto-lang.c (lto_write_globals): Wrapup global decls.
2197
21982009-07-10 Richard Guenther <rguenther@suse.de>
2199
2200 * lto-lang.c (lto_init): Allocate one more location to make
2201 BUILTINS_LOCATION correct.
2202
22032009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2204
2205 * lto.c (free_section_data): Cast computed_offset to caddr_t.
2206
22072009-07-06 Diego Novillo <dnovillo@google.com>
2208
2209 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
2210 TYPE_SIZE_UNIT.
2211
22122009-07-06 Diego Novillo <dnovillo@google.com>
2213
2214 * lto.c (preload_common_nodes): Remove.
2215 (lto_read_in_decl_state): Call lto_streamer_cache_get.
2216 (lto_read_decls): Call lto_data_in_create and
2217 lto_data_in_delete.
2218 (free_decl): Do not call ggc_free.
2219 (lto_main): Call lto_init_reader.
2220 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
2221 (lto_init): Initialize main_identifier_node if needed.
2222 Make ptrdiff_type_node be integer_type_node.
2223
22242009-06-19 Diego Novillo <dnovillo@google.com>
2225
2226 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
2227 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
2228 Remove code guarded by #ifdef LOCAL_TRACE.
2229
22302009-06-18 Diego Novillo <dnovillo@google.com>
2231
2232 * lto.c: Update license to GPLv3.
2233 * lto-elf.c: Likewise.
2234 * common.c: Likewise.
2235 * lto-lang.c: Likewise.
2236 * lto.h: Remove superfluous include files. Update all
2237 users.
2238
22392009-06-17 Diego Novillo <dnovillo@google.com>
2240
2241 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
2242
22432009-06-02 Diego Novillo <dnovillo@google.com>
2244
2245 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
2246 read in.
2247 (materialize_cgraph): Only materialize nodes that have a
2248 representation on file.
2249
22502009-06-01 Diego Novillo <dnovillo@google.com>
2251
2252 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
2253
22542009-05-31 Diego Novillo <dnovillo@google.com>
2255
2256 * lto-lang.c (lto_type_for_mode): Handle all the modes
2257 handled in c_common_type_for_mode.
2258
22592009-05-21 Diego Novillo <dnovillo@google.com>
2260
2261 * lto-elf.c: Always include <gelf.h>.
2262 * config-lang.in (target_libs): Remove.
2263 (build_by_default): Set to no.
2264
22652009-05-15 Diego Novillo <dnovillo@google.com>
2266
2267 * lto.c (lto_materialize_function): Assert that DECL is
2268 not a builtin.
2269 (materialize_cgraph): Don't try to materialize builtin
2270 functions.
2271 * lto-section-out.c (write_symbol_vec): Do not write
2272 builtin functions.
2273
22742009-05-13 Diego Novillo <dnovillo@google.com>
2275
2276 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
2277
22782009-05-07 Diego Novillo <dnovillo@google.com>
2279
2280 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
2281 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
2282 (lto_fixup_type): Call it for TYPE_POINTER_TO,
2283 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
2284 (lto_fixup_tree): Call gimple_register_type when *TP is a
2285 type.
2286 (lto_main): Call bitmap_obstack_initialize.
2287
22882009-04-22 Diego Novillo <dnovillo@google.com>
2289
2290 * lto.c (free_section_data): Tidy.
2291 (lto_1_to_1_map): Tidy.
2292 (lto_add_all_inlinees): Tidy.
2293 (prefix_name_with_star): New.
2294 (get_filename_for_set): New.
2295 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
2296 to determine what cgraph node sets to write.
2297 Call get_filename_for_set to compute temporary file
2298 names.
2299 (lto_execute_ltrans): Do not execute LTRANS on files with
2300 names that start with '*'.
2301 Move logic to execute LTRANS together so that LTRANS is
2302 invoked only if there are any files to compile.
2303 (do_whole_program_analysis): Only remove output files
2304 that do not start with '*'.
2305
23062009-04-06 Diego Novillo <dnovillo@google.com>
2307
2308 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
2309 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
2310 (lto_add_all_inlinees): Tidy.
2311
23122009-03-26 Diego Novillo <dnovillo@google.com>
2313
2314 * lto.c: Include gimple.h.
2315 (lto_read_in_decl_state): Call gimple_register_type for
2316 every type in every stream.
2317 (lto_fixup_common): Call gimple_register_type if T has a
2318 type.
2319 (do_whole_program_analysis): Call print_lto_report.
2320 (lto_main): Call print_lto_report after cgraph_optimize.
2321 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
2322
23232009-03-24 Diego Novillo <dnovillo@google.com>
2324
2325 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
2326 (lto.o): Add dependency on GIMPLE_H.
2327
23282009-03-10 Simon Baldwin <simonb@google.com>
2329
2330 * lto.c (lto_read_all_file_options): Close any open file descriptor
2331 contained in file_data before freeing.
2332
23332009-02-24 Rafael Avila de Espindola <espindola@google.com>
2334
2335 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2336 for a decl in the original bitmap, not a node.
2337 (lto_add_all_inlinees): Remove original nodes that are not needed.
2338 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2339
23402009-02-24 Diego Novillo <dnovillo@google.com>
2341
2342 * lto.c (lto_materialize_function): Update
2343 lto_stats.num_function_bodies.
2344 (get_section_data): Initialize *LEN to 0.
2345 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
2346 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
2347 Update lto_stats.num_output_files.
2348 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
2349 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
2350 (lto_main): Initialize lto_stats.
2351 If flag_lto_report is set, call print_lto_report.
2352
23532009-02-19 Diego Novillo <dnovillo@google.com>
2354
2355 Revert
2356
2357 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
2358
2359 * lto.c (lto_add_inline_clones): Don't add the
2360 master clone. Check for a decl in the original
2361 bitmap, not a node.
2362 (lto_add_all_inlinees): Remove original nodes
2363 that are not needed.
2364 (lto_scan_statics_in_cgraph_node): Don't care if
2365 the node is the master.
2366 (lto_promote_cross_file_statics): Use a new
2367 context.seen_node_decls for each set
2368
23692009-02-19 Rafael Avila de Espindola <espindola@google.com>
2370
2371 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
2372 for a decl in the original bitmap, not a node.
2373 (lto_add_all_inlinees): Remove original nodes that are not needed.
2374 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
2375 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
2376 for each set
2377
23782009-02-18 Diego Novillo <dnovillo@google.com>
2379
2380 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
2381 and TV_WHOPR_WPA_IO.
2382 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
2383 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
2384 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
2385 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
2386 depending on command line flags.
2387 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
2388 (lto_main): Remove timer uses.
2389
23902009-02-18 Rafael Avila de Espindola <espindola@google.com>
2391
2392 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
2393 (lto_wpa_write_files): Update calls to renamed functions.
2394
23952009-02-17 Diego Novillo <dnovillo@google.com>
2396
2397 PR 39203
2398 * lto-lang.c (lto_post_options): Disable -fwhole-program
2399 when running LTRANS.
2400
24012009-02-10 Diego Novillo <dnovillo@google.com>
2402
2403 * lto.c (read_cgraph_and_symbols): Fix comment.
2404
24052009-02-10 Diego Novillo <dnovillo@google.com>
2406
2407 * lto.c (read_cgraph_and_symbols): Read options from all
2408 IL files.
2409
24102009-02-10 Diego Novillo <dnovillo@google.com>
2411
2412 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
2413 (materialize_cgraph): Likewise.
2414 (do_whole_program_analysis): Likewise.
2415 (lto_main): Call read_cgraph_and_symbols,
2416 materialize_cgraph and do_whole_program_analysis.
2417
24182009-02-10 Simon Baldwin <simonb@google.com>
2419
2420 * lto.c: Include lto-opts.h.
2421 * (lto_main): Clear file options at loop start, read any saved
2422 options from the first file handled, and re-issue options.
2423 * Makefile.in (lto.o): Add dependency on lto-opts.h.
2424
24252009-02-02 Diego Novillo <dnovillo@google.com>
2426
2427 * lto.c (lto_main): Stop LTO_TIMER and use
2428 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
2429
24302009-01-30 H.J. Lu <hongjiu.lu@intel.com>
2431
2432 PR lto/38995
2433 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
2434 to POINTER_SIZE.
2435
24362009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
2437
2438 * Make-lang.in (LTO_EXE): Link with all
2439 BACKENDLIBS and not only GMPLIBS
2440
24412009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2442
2443 PR bootstrap/38992
2444 * lto-elf.c: Include gelf.h instead of libelf.h.
2445 (lto_elf_file_close): Replace elfx_update_shstrndx with
2446 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
2447 gelf_update_ehdr.
2448
24492009-01-28 H.J. Lu <hongjiu.lu@intel.com>
2450
2451 PR middle-end/38996
2452 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
2453
24542009-01-26 Diego Novillo <dnovillo@google.com>
2455
2456 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
2457
24582009-01-26 Diego Novillo <dnovillo@google.com>
2459
2460 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
2461 and rename into gimple_types_compatible_p.
2462
24632009-01-12 Rafael Avila de Espindola <espindola@google.com>
2464
2465 * lto-lang.c (lang_hooks): Remove the const qualifier.
2466
24672009-01-06 Diego Novillo <dnovillo@google.com>
2468
2469 * ltrans-driver: Mark 'all' target as phony.
2470
24712008-12-31 Diego Novillo <dnovillo@google.com>
2472
2473 * ltrans-driver: Execute a NOP action for target 'all'.
2474
24752008-12-19 Diego Novillo <dnovillo@google.com>
2476
2477 * lto.c (lto_1_to_1_map): Tidy.
2478
24792008-12-19 Diego Novillo <dnovillo@google.com>
2480
2481 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
2482 be opened, show its name.
2483 * ltrans-driver: If $verbose is set, do not use parallelism.
2484
24852008-12-17 Rafael Avila de Espindola <espindola@google.com>
2486
2487 * lto.c (lto_fixup_function): New.
2488 (lto_fixup_tree): Call lto_fixup_function.
2489
24902008-12-14 Doug Kwan <dougkwan@google.com>
2491
2492 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
2493 variables if there is no function.
2494
24952008-12-10 Simon Baldwin <simonb@google.com>
2496
2497 * ltrans-driver: Always run make in silent mode, to avoid make's
2498 trace on stdout interfering with lto-wrapper output.
2499
25002008-12-10 Doug Kwan <dougkwan@google.com>
2501
2502 * lto.c (lto_add_inline_clones): Do not force master clones of
2503 inlined functions already in SET to be static inline.
2504
25052008-12-04 Doug Kwan <dougkwan@google.com>
2506
2507 * lto.c (globalize_context_t): New type to store states in
2508 globalization of cross-file statics.
2509 (globalize_cross_file_statics): New.
2510 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
2511 static decls that need to be fixed up.
2512 (lto_scan_statics_in_cgraph_node): Change call interface to use
2513 a globalize_context_t CONTEXT for all states used.
2514 (lto_scan_statics_in_remaining_global_vars): New.
2515 (lto_promote_cross_file_statics): Use new call interface of
2516 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
2517 visible vars in the last set.
2518
25192008-12-03 Diego Novillo <dnovillo@google.com>
2520
2521 * lto.c (lto_fixup_tree): Do not emit an error when
2522 PREVAILING throw but T doesn't.
2523
25242008-12-02 Doug Kwan <dougkwan@google.com>
2525
2526 * lto.c (lto_scan_statics_in_ref_table): New function factored out
2527 from code in ...
2528 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
2529 variables and functions.
2530 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
2531 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
2532
25332008-11-29 Diego Novillo <dnovillo@google.com>
2534
2535 * lto.c: Include timevar.h.
2536 (lto_materialize_function): Tidy. Add comments.
2537 (lto_wpa_write_files): Tidy.
2538 (lto_execute_ltrans): Tidy.
2539 (lto_main): Add local variable LTO_TIMER. Initialize it
2540 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
2541 Start and stop the timer.
2542 Tidy comments.
2543 * Make-lang.in (lto.o): Add dependency on timevar.h.
2544 * ltrans-driver: React to -v and -save-temps.
2545 Use simple heuristic to determine how much parallelism to
2546 use when executing make.
2547
25482008-11-12 Doug Kwan <dougkwan@google.com>
2549
2550 * lto.c (lto_bitmap_obstack): Remove var.
2551 (lto_materialize_function): Do nothing instead of marking function
2552 body in file if flag_wpa is true.
2553 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
2554 (lto_scan_statics_in_cgraph_node): New function.
2555 (lto_promote_cross_file_statics): Same.
2556 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
2557 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
2558 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
2559
25602008-11-09 Diego Novillo <dnovillo@google.com>
2561
2562 * lto/lto.c (lto_fixup_tree): Change error message locus
2563 information to include location of mismatching
2564 declaration.
2565 Use TREE_NO_WARNING to avoid repeated messages.
2566 (lto_main): If lto_fixup_decls emitted any errors, exit.
2567 * lto/lto-lang.c: Don't include libfuncs.h and except.h
2568 (lto_init_options): Don't enable exceptions by default.
2569 (lto_eh_runtime_type): Move to lto-function-in.c
2570 (lto_init_eh): Likewise.
2571 (lto_init): Don't call lto_init_eh.
2572 * lto/Make-lang.in (lto-lang.o): Remove dependency on
2573 libfuncs.h and except.h.
2574
25752008-10-30 Diego Novillo <dnovillo@google.com>
2576
2577 * lto.c (lto_read_decls): Declare debug_main only if
2578 LTO_STREAM_DEBUGGING is enabled.
2579
25802008-10-30 Simon Baldwin <simonb@google.com>
2581
2582 * lto.c (lto_wpa_write_files): Create intermediate files with
2583 make_cwd_temp_file().
2584 (lto_maybe_unlink): New. Delete intermediate WPA files unless
2585 WPA_SAVE_LTRANS is set.
2586 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
2587 * ltrans-driver: Do not strip directory from output files.
2588
25892008-10-29 Doug Kwan <dougkwan@google.com>
2590
2591 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
2592 DECL.
2593 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
2594 (lto/lto-symtab.o): Remove rule.
2595 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
2596 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
2597 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
2598 Remove macros.
2599 lto-symtab.c (File): Move up one level.
2600 lto-lang.c (cgraph.h): Remove include.
2601 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2602 input_cgraph): Move to lto-cgraph.c in gcc directory above.
2603 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
2604
26052008-10-24 Rafael Espindola <espindola@google.com>
2606
2607 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
2608 non prevailing weak symbols.
2609
26102008-10-24 Rafael Espindola <espindola@google.com>
2611
2612 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
2613
26142008-10-24 Rafael Espindola <espindola@google.com>
2615
2616 * lto-lang.c (input_node): Avoid casts from pointers to ints of
2617 different types.
2618
26192008-10-23 Simon Baldwin <simonb@google.com>
2620
2621 * lto-lang.c (input_node): Save the node reference, rather than the
2622 node pointer, in node->inlined_to.
2623 (input_cgraph_1): Convert node references into node pointers.
2624
26252008-10-22 Diego Novillo <dnovillo@google.com>
2626 Rafael Espindola <espindola@google.com>
2627
2628 * lto.c (lto_resolution_read): Tidy.
2629 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
2630 abort if RET is NULL.
2631
26322008-10-22 Doug Kwan <dougkwan@google.com>
2633
2634 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
2635 exceptions flag is given.
2636 * lto-lang.c: (lto_init_options) Set default exceptions flag.
2637 (lto_init_eh): Remove exceptions flag initialization.
2638 (lto_init): Only call lto_init_eh if exceptions flag is set.
2639
26402008-10-21 Diego Novillo <dnovillo@google.com>
2641
2642 * lto.c: Tidy some formatting.
2643 * lto.h: Likewise.
2644
26452008-10-21 Simon Baldwin <simonb@google.com>
2646
2647 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
2648 them is NULL (but not the other).
2649
26502008-10-17 Diego Novillo <dnovillo@google.com>
2651
2652 * ltrans-driver: Divert output from make to a temporary file.
2653 Show it if the call to make failed.
2654
26552008-10-15 Diego Novillo <dnovillo@google.com>
2656
2657 * lto.c (lto_wpa_write_files): Reformat do-while loop.
2658 Do not print TEMP_FILENAME
2659 * ltrans-driver: Call make with -s.
2660
26612008-10-15 Diego Novillo <dnovillo@google.com>
2662
2663 * lto-symtab.c (lto_symtab_merge_decl): Do not force
2664 TREE_STATIC on global symbols.
2665
26662008-10-14 Ollie Wild <aaw@google.com>
2667
2668 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
2669 (LTRANS_DRIVER_EXE): Add.
2670 (lto.all.cross): Add LTRANS_DRIVER_EXE.
2671 (lto.all.encap): Add LTRANS_DRIVER_EXE.
2672 (lto.install.common): Remove ltrans-driver.
2673 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
2674 (LTRANS_DRIVER_EXE): New build rule.
2675 * config-lang.in (compilers): Add ltrans-driver.
2676
26772008-10-14 Diego Novillo <dnovillo@google.com>
2678
2679 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
2680 of program name.
2681
26822008-10-13 Ollie Wild <aaw@google.com>
2683
2684 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
2685 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
2686 * ltrans-driver (LTRANS_FLAGS): Remove.
2687
26882008-10-08 Doug Kwan <dougkwan@google.com>
2689
2690 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
2691 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
2692 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
2693 from lto_fixup_state to here.
2694 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
2695 just a free-list. Fix up types also. Move decl merging code to
2696 lto_fixup_tree.
2697 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
2698 object.
2699 (lto_fixup_decls): Use another pointer set to avoid multiple
2700 walking of nodes except for DECLs to be replaced. Pass an
2701 lto_fixup_data_t object to tree-walker.
2702
27032008-10-08 Rafael Espindola <espindola@google.com>
2704
2705 * lto-symtab.c (lto_symtab_set_resolution): New.
2706 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
2707 lto_symtab_get_resolution.
2708 (lto_symtab_prevailing_decl): Return decl for non public decls.
2709 (lto_symtab_get_resolution): New.
2710 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
2711
27122008-10-06 Rafael Espindola <espindola@google.com>
2713
2714 * lto-lang.c: Include cgraph.h.
2715 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
2716 input_cgraph): Moved from lto-cgraph.c.
2717 (LANG_HOOKS_INPUT_CGRAPH): New.
2718
27192008-10-03 Rafael Espindola <espindola@google.com>
2720
2721 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
2722
27232008-10-03 Rafael Espindola <espindola@google.com>
2724
2725 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
2726 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
2727 prevailing definition. Don't mark TREE_NOTHROW differences.
2728 * lto.c (lto_fixup_tree): New.
2729 (lto_fixup_state): New.
2730 (lto_fixup_state_aux): New.
2731 (free_decl): New.
2732 (lto_fixup_decls): New.
2733 (lto_main): Call lto_fixup_decls.
2734
27352008-10-02 Ollie Wild <aaw@google.com>
2736
2737 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
2738 and Init.
2739 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
2740 * lto-lang.c (lto_post_options): Add validation and fixups for
2741 -fltrans and -fwpa.
2742
27432008-10-02 Rafael Espindola <espindola@google.com>
2744
2745 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
2746 lto_symtab_merge_decl): Return void.
2747 (lto_symtab_prevailing_decl): New.
2748
27492008-09-30 Rafael Espindola <espindola@google.com>
2750
2751 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
2752 defined symbols.
2753 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
2754 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
2755 Check for already defined symbols.
2756 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
2757 (LTO_IDENTIFIER_RESOLUTION): Remove.
2758 (LTO_DECL_RESOLUTION): New.
2759
27602008-09-30 Rafael Espindola <espindola@google.com>
2761
2762 * lto.c (lto_read_decls): Use new input_tree signature.
2763
27642008-09-26 Doug Kwan <dougkwan@google.com>
2765
2766 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
2767 bodies affected by exception attribute merging of DECLs.
2768 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
2769 merging.
2770
27712008-09-25 Rafael Espindola <espindola@google.com>
2772
2773 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
2774 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
2775 * lto-symtab.c (lto_symtab_compatible): New.
2776 (lto_symtab_overwrite_decl): New.
2777 (lto_symtab_merge_decl): Refactor to use the above functions
2778 and the resolution from lang_identifier.
2779 * lto-tree.h: Include plugin-api.h.
2780 (lang_identifier): Add resolution.
2781 (LTO_IDENTIFIER_RESOLUTION): New.
2782
27832008-09-25 Ollie Wild <aaw@google.com>
2784
2785 * lang.opt (fltrans-output-list=): New option.
2786 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
2787
27882008-09-25 Rafael Espindola <espindola@google.com>
2789
2790 * lto.c (lto_resolution_read): Initialize ret;
2791
27922008-09-24 Ollie Wild <aaw@google.com>
2793
2794 * lto.c (sys/mman.h): Move include.
2795 (lto_wpa_write_files): Return a list of written files.
2796 (lto_execute_ltrans): New function.
2797 (lto_main): Call lto_execute_ltrans.
2798 (ltrans-driver): New file.
2799 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
2800 (DEAULT_LTRANS_DRIVER_LEN): New macro.
2801 (lto_init_options): Initialize ltrans_driver.
2802 (lto_handle_option): Fix incorrect default output value.
2803 * lang.opt (fltrans-driver=): New option.
2804 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
2805 (lto.install-common): Add lto/ltrans-driver.
2806
28072008-09-24 Rafael Espindola <espindola@google.com>
2808
2809 * Make-lang.in (LTO_OBJS): Add lto/common.o.
2810 (lto/lto.o): Depend on lto/common.h.
2811 (lto/common.o): New.
2812 * lang.opt (resolution): New.
2813 * lto-lang.c (resolution_file_name): New.
2814 (lto_handle_option): Handle OPT_resolution.
2815 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
2816 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
2817 pass it to lto_symtab_merge_decl.
2818 * lto.c: Include common.h.
2819 (lto_read_decls): Add resolutions and resolutions_size arguments.
2820 Initialize data_in.globals_resolution and
2821 data_in.globals_resolution_size.
2822 (index_and_symbol_resolution): New.
2823 (lto_resolution_read): New.
2824 (lto_file_read): Add argument resolution_file.
2825 Read resolution.
2826 * lto.h (resolution_file_name): New.
2827
28282008-09-23 Rafael Espindola <espindola@google.com>
2829
2830 * common.c: Update description.
2831 * common.h: Update description.
2832
28332008-09-23 Rafael Espindola <espindola@google.com>
2834
2835 * common.c: Moved from lto-plugin.
2836 * common.h: Moved from lto-plugin.
2837
28382008-09-22 Doug Kwan <dougkwan@google.com>
2839
2840 * lto.c (VEC(bitmap,heap)): Declare.
2841 (lto_materialize_function): Handle WAP mode specially.
2842 (lto_add_inline_clones): New.
2843 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
2844 return a bitmap of inlined decls.
2845 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
2846 (lto_main): Call reset_inline_failed to reset inlining states.
2847 Check call-graph after WPA inlining.
2848 * lto-lang.c (lto_init): Do not clear flag_generate_lto
2849 unconditionally.
2850
28512008-09-19 Doug Kwan <dougkwan@google.com>
2852
2853 lto.c (lto_main): Remove unsued wrapper code.
2854 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
2855
28562008-09-19 Rafael Espindola <espindola@google.com>
2857
2858 * lto-symtab.c: Include lto-tree-in.h.
2859 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
2860 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
2861 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
2862
28632008-09-17 Paolo Bonzini <bonzini@gnu.org>
2864 Rafael Avila de Espindola <espindola@google.com>
2865
2866 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
2867 COMPOUND_LITERAL_EXPR_DECL): Remove.
2868 (emit_local_var): Remove.
2869 (lto_expand_expr): Remove.
2870 (lto_staticp): Remove.
2871 (LANG_HOOKS_EXPAND_EXPR): Remove.
2872 (LANG_HOOKS_STATICP): Remove.
2873
28742008-09-11 Diego Novillo <dnovillo@google.com>
2875
2876 * lto-lang.c: Include except.h and libfuncs.h.
2877 (lto_init_eh): New.
2878 (lto_init): Call it.
2879 Set flag_generate_lto to 0.
2880 * Make-lang.in (lto-lang.o): Add dependency on except.h
2881 and libfuncs.h.
2882
28832008-09-09 Bill Maddox <maddox@google.com>
2884
2885 * lto-lang.c: Include header file expr.h.
2886 (COMPOUND_LITERAL_EXPR_DECL_STMT,
2887 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
2888 (emit_local_var): Copied from c-semantics.c.
2889 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
2890 and c_staticp in c-common.c.
2891 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
2892
28932008-09-08 Diego Novillo <dnovillo@google.com>
2894
2895 * lto-lang.c (lto_global_bindings_p): Return 1 during
2896 IPA passes.
2897
28982008-09-07 Diego Novillo <dnovillo@google.com>
2899
2900 * lto.c: Tidy formatting.
2901
29022008-08-04 Bill Maddox <maddox@google.com>
2903
2904 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
2905
29062008-09-03 Doug Kwan <dougkwan@google.com>
2907
2908 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
2909 CIF_OK instead of NULL.
2910
29112008-09-02 Diego Novillo <dnovillo@google.com>
2912 Simon Baldwin <simonb@google.com>
2913
2914 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
2915 c_common_type_for_size.
2916 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
2917 (lto_init): Call linemap_add.
2918 (signed_and_unsigned_types): Remove.
2919
29202008-08-29 Diego Novillo <dnovillo@google.com>
2921
2922 * lto-lang.c (handle_noreturn_attribute): New local function.
2923 (handle_const_attribute): New local function.
2924 (handle_malloc_attribute): New local function.
2925 (handle_pure_attribute): New local function.
2926 (handle_novops_attribute): New local function.
2927 (handle_nonnull_attribute): New local function.
2928 (handle_nothrow_attribute): New local function.
2929 (handle_sentinel_attribute): New local function.
2930 (handle_type_generic_attribute): New local function.
2931 (handle_format_attribute): New local function.
2932 (handle_format_arg_attribute): New local function.
2933 (lto_attribute_table): Declare.
2934 (lto_format_attribute_table): Declare.
2935 (lto_init_attributes): New local function.
2936 (lto_define_builtins): Call it.
2937 Call targetm.init_builtins and build_common_builtin_nodes.
2938 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
2939 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
2940
29412008-08-28 Diego Novillo <dnovillo@google.com>
2942
2943 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
2944 $(GIMPLE_H).
2945 (lto-symtab.o): Add dependency on $(GIMPLE_H).
2946 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
2947 * lto-symtab.c: Include gimple.h.
2948 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
2949 TREE_CHAIN.
2950
29512008-08-27 Doug Kwan <dougkwan@google.com>
2952
2953 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
2954 gt-lto-lto.h): New includes.
2955 (lto_materialize_function): Do not read in function body in WPA mode.
2956 Format a line to fit in 80 columns.
2957 (lto_cgraph_node_sets): New garbage collected variable.
2958 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
2959 New functions.
2960 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
2961 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
2962 variable LTO_SECTION_IN_H.
2963 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
2964 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
2965 with variable LTO_SECTION_IN_H.
2966 * config-lang.in (gtfiles): Add lto/lto.c.
2967 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
2968 merged DECL_RESULT correctly.
2969
29702008-08-26 Bill Maddox <maddox@google.com>
2971
2972 * lto-lang.c Include tree-gimple.h.
2973 (lto_mark_addressable): Call mark_addressable rather than
2974 asserting.
2975 (lto_post_options): Suppress debug info generation.
2976 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
2977
29782008-08-25 Bill Maddox <maddox@google.com>
2979
2980 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
2981 assertion and leave an explanatory comment in its place.
2982
29832008-08-21 Doug Kwan <dougkwan@google.com>
2984
2985 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
2986 of common nodes instead of computing locallly.
2987 (lto_read_in_decl_state): New.
2988 (lto_read_decls): Change code for udpate in struct lto_decl_header.
2989 Read global and per-function in-decl states.
2990 * Make-lang.in (LTO_H): Update dependency.
2991 (lto/lto.o): Same.
2992 (lto-symtab.c): Merge (revision 139039)
2993 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
2994
29952008-08-21 Rafael Espindola <espindola@google.com>
2996
2997 * config-lang.in (target_libs): New.
2998
29992008-08-20 Bill Maddox <maddox@google.com>
3000
3001 * lto.c (current_lto_file): Remove GTY marker from static
3002 variable. Remove include of file gt-lto-lto.h.
3003 * Make-lang.in: Remove dependency of lto/lto.o on
3004 gt-lto-lto.h.
3005 * lto-elf.c (lto_file_close): Removed.
3006 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
3007 allocate lto_elf_file object.
3008 (lto_elf_file_close): Free lto_elf_file object after close.
3009 * lto.h (struct lto_file_struct): Remove GTY marker.
3010 * config-lang.in: Remove lto/lto.h and lto/lto.c from
3011 gtfiles.
3012
30132008-08-20 Bill Maddox <maddox@google.com>
3014
3015 * lto.c (lto_read_decls): Provide dummy argument to input_tree
3016 to conform to its new signature.
3017 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
3018 on discarded node here, now called in global_vector_fixup.
3019
30202008-08-09 Bill Maddox <maddox@google.com>
3021
3022 * lto.c (preload_common_nodes): Verify that fileptr_type_node
3023 has not been set to a front-end-specific value.
3024
30252008-08-05 Doug Kwan <dougkwan@google.com>
3026
3027 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
3028 build breakage.
3029
30302008-07-30 Bill Maddox <maddox@google.com>
3031
3032 * lto.c (lto_materialize_function): Call lto_original_decl_name.
3033 Remove obsolete comments.
3034 (lto_read_decls): Remove initialization of deleted field data_in.global.
3035 Tidy up comments.
3036 (lto_main): Remove redundant initialization of section_hash_table.
3037 * lto-elf.c: Removed obsolete comments.
3038 * lto.h: Tidy up comments.
3039 * lto-symtab.c (lto_least_common_multiple): New function.
3040 (lto_symtab_merge_decl): Merge variable alignments in some cases.
3041 Tidy up comments.
3042
30432008-07-25 Diego Novillo <dnovillo@google.com>
3044 Bill Maddox <maddox@google.com>
3045
3046 * lto.c: Re-order include files.
3047 Include lto-section-out.h.
3048 (preload_common_nodes): Add debugging output.
3049 Add new local INDEX_TABLE.
3050 Call preload_common_node.
3051 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
3052
30532008-07-13 Bill Maddox <maddox@google.com>
3054
3055 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
3056 unwanted scaling during pointer addition.
3057
30582008-07-11 Bill Maddox <maddox@google.com>
3059 Diego Novillo <dnovillo@google.com>
3060
3061 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
3062 Make code const-correct.
3063 (lto_file_read): Fix C++ compatibility warnings.
3064 (lto_read_section_data): Fix C++ compatibility warnings.
3065 (lto_get_section_data): Use CONST_CAST to avoid warning when
3066 const pointer passed to free.
3067 * lto-elf.c (lto_elf_build_section_table): Fix C++
3068 compatibility warnings.
3069 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
3070 to avoid warning assigning const pointer to d_buf field of Elf_Data.
3071 (lto_get_current_out_file): Fix C++ compatibility warnings.
3072
30732008-07-11 Diego Novillo <dnovillo@google.com>
3074
3075 * Make-lang.in (lto-warn): Define.
3076
30772008-07-03 Simon Baldwin <simonb@google.com>
3078
3079 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
3080 LTO_STREAM_DEBUGGING.
3081
30822008-06-27 Ollie Wild <aaw@google.com>
3083
3084 * lto-elf.c (lto-section-out.h): New include.
3085 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
3086 and data members.
3087 (cached_file_attrs): New static variable.
3088 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
3089 Use cached_file_attrs for checking bits.
3090 (lto_elf_build_section_table): Remove elf_file argument from
3091 lto_elf_get_shdr and lto_elf_free_shdr calls.
3092 (DEFINE_INIT_SHDR): New macro.
3093 (init_shdr32, init_shdr64): New functions defined via the
3094 DEFINE_INIT_SHDR macro.
3095 (lto_elf_begin_section_with_type): New function.
3096 (lto_elf_begin_section): New function.
3097 (lto_elf_append_data): New function.
3098 (lto_elf_end_section): New function.
3099 (DEFINE_VALIDATE_EHDR): New macro.
3100 (validate_ehdr32, validate_ehdr64): New functions defined via the
3101 DEFINE_VALIDATE_EHDR macro.
3102 (validate_file): New function.
3103 (DEFINE_INIT_EHDR): New macro.
3104 (init_ehdr32, init_ehdr64): New functions defined via the
3105 DEFINE_INIT_EHDR macro.
3106 (init_ehdr): New function.
3107 (lto_elf_file_open): Add support for writable files. Move some
3108 validation logic to validate_file.
3109 (lto_elf_file_close): Add support for writable files. Write file data
3110 and free data blocks.
3111 (current_out_file): New static variable.
3112 (lto_set_current_out_file): New function.
3113 (lto_get_current_out_file): New function.
3114 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
3115 Add temporary initialization for testing ELF serialization.
3116 * lto.h (lto-section-out.h): New include.
3117 (struct lto_file_struct): Slight modification to comment.
3118 (lto_elf_file_open): Add writable parameter.
3119 (lto_elf_begin_section): New function declaration.
3120 (lto_elf_append_data): New function declaration.
3121 (lto_elf_end_section): New function declaration.
3122 (lto_set_current_out_file, lto_get_current_out_file): New function
3123 declarations.
3124 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
3125 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
3126 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
3127 * Make-lang.in (LTO_H): Add lto-section-out.h.
3128
31292008-06-12 Ollie Wild <aaw@google.com>
3130
3131 * lto.h (struct lto_file_vtable_struct): Remove.
3132 (struct lto_file_struct): Remove vtable member.
3133 * lto-elf.c (lto_file_init): Remove vtable argument.
3134 (lto_elf_map_optional_lto_section): Remove.
3135 (lto_elf_unmap_section): Remove.
3136 (lto_elf_file_vtable): Remove.
3137 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
3138 lto_file_init call.
3139 (lto_elf_find_section_data): Remove.
3140
31412008-06-11 Ollie Wild <aaw@google.com>
3142
3143 * lto.c (lto_file_read): Add const qualifier to data variable.
3144
31452008-06-11 Diego Novillo <dnovillo@google.com>
3146
3147 Merge from lto-streamber sub-branch.
3148
3149 2008-06-04 Ollie Wild <aaw@google.com>
3150
3151 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
3152 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
3153
3154 2008-05-28 Bill Maddox <maddox@google.com>
3155
3156 Replace the DWARF reader in the LTO front-end.
3157
3158 * lto.c: Include lto-tree-in.h, lto-tags.h.
3159 (enum DWARF2_class, DW_cl_constant, struct
3160 DWARF2_form_data, struct lto_context,
3161 lto_fd_init, lto_info_fd_init,
3162 lto_abbrev_fd_init, lto_info_fd_close,
3163 lto_file_init, lto_file_close,
3164 lto_file_corrupt_error, lto_abi_mismatch_error,
3165 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
3166 lto_read_uleb128, lto_read_sleb128,
3167 lto_read_initial_length, lto_abbrev_read_attrs,
3168 lto_abbrev_read, lto_abbrev_read_lookup,
3169 lto_read_section_offset,
3170 lto_read_comp_unit_header, find_cu_for_offset,
3171 lto_get_file_name,
3172 lto_resolve_reference,lto_read_form,
3173 attribute_value_as_int,
3174 make_signed_host_wide_int,
3175 attribute_value_as_constant, lto_cache_hash,
3176 lto_cache_eq, lto_cache_store_DIE,
3177 lto_cache_lookup_DIE, lto_find_integral_type,
3178 lto_find_integral_type_1,
3179 LTO_BEGIN_READ_ATTRS_UNCHECKED,
3180 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
3181 lto_unsupported_attr_error, lto_get_identifier,
3182 lto_read_referenced_type_DIE,
3183 lto_read_compile_unit_DIE,
3184 lto_read_array_type_DIE,
3185 lto_read_structure_union_class_type_DIE,
3186 lto_read_enumerator_DIE,
3187 lto_read_enumeration_type_DIE,
3188 lto_read_only_for_child_DIEs,
3189 lto_read_only_for_child_DIEs,
3190 lto_read_member_DIE, lto_read_abbrev,
3191 lto_read_variable_formal_parameter_constant_DIE,
3192 lto_get_body): Removed.
3193 (preload_common_nodes): New function.
3194 (lto_read_decls): Convert for new global streamer.
3195 (lto_materialze_file_data,
3196 lto_read_subroutine_type_subprogram_die,
3197 lto_read_unspecified_parameters_DIE,
3198 lto_read_typedef_DIE,
3199 lto_read_pointer_reference_type_DIE,
3200 lto_read_subrange_type_DIE,
3201 lto_read_base_type_DIE,
3202 lto_read_const_volatile_restrict_type_DIE,
3203 lto_read_namespace_DIE,
3204 lto_read_unspecified_type_DIE, lto_read_DIE,
3205 lto_read_child_DIEs, lto_collect_child_DIEs):
3206 Removed.
3207 (lto_info_read, lto_set_cu_context): Removed.
3208 (lto_file_read): Convert for new global streamer.
3209 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
3210 lto_resolve_var_ref, lto_resolve_fn_ref,
3211 lto_resolve_field_ref, lto_resolve_typedecl_ref,
3212 lto_resolve_namespacedecl_ref): Removed.
3213 (lto_file_init, lto_file_close): Moved to lto-elf.c.
3214 * lto-tree.h (lto_symtab_merge_var,
3215 lto_symtab_mergee_fun): Declare here.
3216 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
3217 (lto_elf_file_open): Removed code to read DWARF debug sections.
3218 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
3219 DWARF2_CompUnit, lto_die_ptr,
3220 lto_die_cache_entry, lto_fd, lto_info_fd,
3221 lto_abbrev_fd): Removed.
3222 (lto_file): Removed debug_info and debug_abbrev fields.
3223 (lto_ref): Removed.
3224 (lto_file_init, lto_file_close,
3225 lto_resolve_type_ref, lto_resolve_var_ref,
3226 lto_resolve_fn_ref, lto_resolve_field_ref,
3227 lto_resolve_typedecl_ref,
3228 lto_resolve_namespacedecl_ref,
3229 lto_get_file_name): Removed declarations.
3230 (lto_symtab_merge_var, lto_symtab_merge_fn):
3231 Declarations moved to lto-tree.h.
3232 * lto-symtab.c (lto_compatible_attributes_p):
3233 Lobotomize this, as it barfs on "Hello, world!".
3234 * lto-section-out.c: Include lto-tree-out.h.
3235 (lto_hash_global_slot_node,
3236 lto_eq_global_slot_node, preload_common_nodes,
3237 write_global_stream, write_global_references):
3238 New functions.
3239 (produce_asm_for_decls): Convert for new global streamer.
3240 * lto-section-out.h (lto_hash_global_slot_node,
3241 lto_eq_global_slot_node): Declare.
3242
32432008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
3244 Jan Hubicka <jh@suse.cz>
3245
3246 * lto.c (sys/mman.h, tree-pass.h): New includes.
3247 (lto_materialize_constructors_and_inits,
3248 lto_materialize_function): Keeps length of section.
3249 (lto_materialize_cgraph): Removed.
3250 (lto_read_decls): Initialize fd field.
3251 (lto_file_read): Different return type and removed much code to
3252 lto_main.
3253 (page_mask): New variable.
3254 (lto_read_section_data, get_section_data, free_section_data): New
3255 functions.
3256 (lto_main): Now calls pass manager, sets the hooks so that the ipa
3257 passes can get the section data.
3258
32592008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
3260
3261 * lto.h (lto_read_decls): Made local.
3262 (lto_input_function_body, lto_input_constructors_and_inits,
3263 lto_input_cgraph): Declarations moved to lto-section-in.h.
3264 * lto-section-in.c: Moved to .. .
3265 * lto-cgraph-in.c: Ditto.
3266 * lto-section-in.h: Ditto.
3267 * lto-function-in.c: Ditto.
3268 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
3269 (lto_insert_block): Removed.
3270 (LANG_HOOKS_INSERT_BLOCK): Removed.
3271 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
3272 lto-section-in.o): Rules moved to lto/Makefile.in.
3273
3274
32752008-05-16 Ollie Wild <aaw@google.com>
3276
3277 * lto-lang.c (tree-inline.h): Include.
3278 (lto_post_options): New function.
3279 (LANG_HOOKS_POST_OPTIONS): Define.
3280 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
3281 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
3282
32832008-05-13 Diego Novillo <dnovillo@google.com>
3284
3285 * lto-function-in.c (input_ssa_names): Call
3286 make_ssa_name_fn instead of make_ssa_name.
3287
32882008-05-12 Diego Novillo <dnovillo@google.com>
3289
3290 * lto-cgraph-in.c (overwrite_node): Update references to
3291 inline summary fields.
3292 * lto-function-in.c (input_expr_operand): Do not handle
3293 STRUCT_FIELD_TAG.
3294
32952008-05-09 Ollie Wild <aaw@google.com>
3296
3297 * lang.opt: New file.
3298 * lto-lang.c (lto_init_options): New function.
3299 (lto_handle_option): New function.
3300 (lto_init): Move initialization of flag_unit_at_a_time to
3301 lto_init_options.
3302 (LANG_HOOKS_INIT_OPTIONS): Define.
3303 (LANG_HOOKS_HANDLE_OPTION): Define.
3304
33052008-04-29 Ollie Wild <aaw@google.com>
3306
3307 * lto.c (lto_read_namespace_DIE): New function.
3308 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
3309 NAMESPACE_DECL DIE's.
3310 (lto_resolve_namespacedecl_ref): New function.
3311 * lto.h (lto_resolve_namespacedecl_ref): New function.
3312 * lto-section-in.c (lto_read_decls): Read namespace declarations.
3313 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
3314 and num_namespace_decls.
3315 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
3316 * lto-lang.c (lto_init_ts): New function.
3317 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
3318
33192008-04-16 Ollie Wild <aaw@google.com>
3320
3321 * lto-function-in.c (input_type_ref): Updated function description.
3322
33232008-04-16 Ollie Wild <aaw@google.com>
3324
3325 * lto-function-in.c (input_type_ref_1): New function.
3326 (input_type_ref): Split into two functions.
3327 (input_function): Add support for type contexts.
3328
33292008-04-16 Ollie Wild <aaw@google.com>
3330
3331 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
3332 section name
3333
33342008-04-16 Ollie Wild <aaw@google.com>
3335
3336 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
3337 list of supported languages.
3338
33392008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
3340
3341 Merge with mainline @133491.
3342
33432008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
3344 Jan Hubicka <jh@suse.cz>
3345
3346 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
3347 fd->unmaterialized_fndecls.
3348 (lto_get_file_name, lto_materialize_cgraph): New function.
3349 (lto_materialize_constructors_and_inits,
3350 lto_materialize_function): Read info directly from elf file.
3351 (lto_file_read): Made local and initialize dictionary so that
3352 other lto sections can be read without reprocessing the elf file.
3353 (lto_main): Read all functions after all files have been processed
3354 for their types, globals and cgraph.
3355 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
3356 dependencies.
3357 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
3358 (hash_name, eq_name, lto_elf_build_section_table): New functions.
3359 (lto_elf_read_symtab): Removed function.
3360 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
3361 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
3362 (lto_file_read): Made local.
3363 (lto_get_file_name, lto_elf_build_section_table,
3364 lto_input_cgraph):
3365 New function.
3366 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
3367 New functions.
3368 (lto_read_decls): Get the file name.
3369 * lto-cgraph-in.c: New file.
3370 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
3371 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
3372 (input_labels): Fixed latent sizeof issue.
3373 (input_function): Build stmt array to set call sites into cgraph
3374 edges.
3375 (lto_read_body): Reset cfun->curr_properties.
3376 * lto_section_in.h (lto_section_slot): New structure.
3377 (section_hash_table.lto_file_decl_data): New field.
3378
3379
33802008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
3381
3382 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
3383 reconstruct static initializers.
3384 (lto_get_body, lto_materialize_function): Add lto_section_type as
3385 a parameter.
3386 (lto_materialize_constructors_and_inits,
3387 lto_materialize_file_data): New function.
3388 (lto_materialize_function,
3389 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
3390 unmap_section and map_fn_body to map_section.
3391 (lto_set_cu_context): Process functions and static inits
3392 differently.
3393 * Make-lang.in (LTO_H, lto/lto-function-in.o,
3394 lto/lto-section-in.o): Update dependencies.
3395 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
3396 lto_section_type parameter.
3397 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
3398 * lto.h (lto_file_vtable_struct): Removed two of the fields and
3399 renamed the other two so that there is only one map function and
3400 one unmap function and each takes a section type parameter.
3401 (lto_read_function_body): Renamed to lto_input_function_body and
3402 added file_data parameter.
3403 (lto_read_var_init): Removed.
3404 (lto_input_constructors_and_inits): New function.
3405 * lto-section-in.c (lto_read_decls): New function.
3406 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
3407 var_decls, type_decls, types to lto_file_decl_data.
3408 (input_type_ref, input_expr_operand, lto_read_body): Get
3409 field_decls, fn_decls, var_decls, type_decls, types from different
3410 structure.
3411 (input_globals, input_constructor, lto_read_var_init): Removed.
3412 (input_constructors_or_inits): New function.
3413 (lto_read_function_body, lto_input_constructors_and_inits):
3414 Renamed to lto_input_function_body and takes file_data parameter.
3415 * lto-section-in.h (lto_file_decl_data): New structure.
3416
34172008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3418
3419 * lto-function-in.c (input_globals.c): Changed input type to
3420 lto_function_header.
3421 (input_bb): Removed code to deserialize the stmt number.
3422 (input_function): Renumber all stmts after they are input.
3423 (lto_read_body, lto_read_function_body, lto_read_var_init):
3424 Changed to used new header format and enum section_type.
3425 *lto-lang.c (success): Removed.
3426
34272008-01-28 Nathan Froyd <froydnj@codesourcery.com>
3428
3429 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
3430 (lto_elf_free_sym): Likewise.
3431
3432 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
3433 (lto_elf_build_init): Likewise.
3434
34352008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
3436
3437 * lto-read.c: Renamed to lto-function-in.c.
3438 (input_1_unsigned): Moved to lto-section-in.c and renamed
3439 lto_input_1_unsigned.
3440 (input_uleb128): Moved to lto-section-in.c and renamed
3441 lto_input_uleb128.
3442 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
3443 lto_input_widest_uint_uleb128.
3444 (input_sleb128): Moved to lto-section-in.c and renamed
3445 lto_input_sleb128.
3446 (input_integer): Moved to lto-section-in.c and renamed
3447 lto_input_integer.
3448 (debug_in_fun): Moved to lto-section-in.c and renamed
3449 lto_debug_in_fun.
3450 (input_block): Moved to lto-section-in.h and renamed
3451 lto_input_block.
3452 (input_expr_operand): Fixed to allow lists with more than one
3453 element.
3454 * lto-section-in.h: New file.
3455 * lto-section-in.c: New file with changes from above.
3456 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
3457 (lto-section-in.o): New rule.
3458
34592007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3460
3461 * lto-read.c (input_expr_operand): Mark static and external
3462 VAR_DECLs as needed.
3463
34642007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3465
3466 * lto-read.c (input_integer): Use the correct shift amount.
3467
34682007-12-29 Nathan Froyd <froydnj@codesourcery.com>
3469
3470 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
3471 (LANG_HOOKS_NAME): Define.
3472
34732007-12-27 Nathan Froyd <froydnj@codesourcery.com>
3474
3475 * lto.c (lto_find_integral_type): Define as a macro. Rename the
3476 original function to...
3477 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
3478 don't have a base type.
3479 (lto_read_enumeration_type_DIE): Examine the values of the
3480 enumeration to determine whether we can use an unsigned type for
3481 the base type of the enumeration.
3482
34832007-12-24 Nathan Froyd <froydnj@codesourcery.com>
3484
3485 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
3486 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
3487
34882007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3489
3490 * lto-lang.c (lto_types_compatible_p): New function.
3491 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
3492
34932007-12-22 Nathan Froyd <froydnj@codesourcery.com>
3494 Kenneth Zadeck <zadeck@naturalbridge.com>
3495
3496 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
3497 (input_local_vars): Read in DECL_INITIAL and context for local
3498 statics that need to be put in unexpanded_vars_list.
3499
35002007-12-21 Nathan Froyd <froydnj@codesourcery.com>
3501
3502 * lto-read.c (input_real): Use a separate null-terminated buffer
3503 for calling real_from_string.
3504 (input_expr_operand): If we take the address of a FUNCTION_DECL,
3505 tell cgraph that it's needed.
3506
35072007-12-19 Doug Kwan <dougkwan@google.com>
3508
3509 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
3510
35112007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3512
3513 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
3514 (lto_file_read): Reset the members of 'context' every time we read
3515 a toplevel DIE, with special attention to last_param_type.
3516
35172007-12-18 Nathan Froyd <froydnj@codesourcery.com>
3518
3519 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
3520 'declaration'. Set the assembler name for non-public functions.
3521
35222007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
3523
3524 * lto_read.c (data_in.unexpanded_indexes): New array.
3525 (input_local_var): Added code to read in unexpanded_var_list
3526 indexes for variables. Only read in DECL_CHAIN field for
3527 parameters.
3528 (input_local_vars): Added code to rebuild unexpanded_var_list in
3529 order using unexpanded_indexes.
3530 (input_function): Added code to set DECL_CONTEXT for functions.
3531
35322007-12-13 Doug Kwan <dougkwan@google.com>
3533
3534 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
3535 in pointer and reference types.
3536
35372007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3538
3539 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
3540 RESULT_DECL.
3541
35422007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3543
3544 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
3545 already read the DIE.
3546 (lto_get_body): New function, split out from...
3547 (lto_materialize_function): ...here. Call it.
3548 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
3549 determine DECL_EXTERNAL.
3550 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
3551 FUNCTION_DECLs when necessary. Use the type of the actual
3552 function definition if we are unable to easily merge types. Ignore
3553 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
3554 necessary.
3555
35562007-12-13 Nathan Froyd <froydnj@codesourcery.com>
3557
3558 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
3559
35602007-12-12 Bill Maddox <maddox@google.com>
3561
3562 Revert
3563 2007-12-07 Bill Maddox <maddox@google.com>
3564
3565 * lto.c (lto_str_fd_init): New function.
3566 (lto_str_fd_close): New function.
3567 (lto_file_init): Call lto_str_fd_init.
3568 (lto_file_close): Call lto_str_fd_close.
3569 (lto_str_read): New function. Read debug string table.
3570 (lto_str_lookup): New function. Get string for debug
3571 string table offset.
3572 (lto_read_form): Recognize DW_FORM_strp.
3573 (lto_file_read): Invoke lto_str_read.
3574
3575 * lto-elf.c (lto_elf_file_open): Read raw section data
3576 for the .debug_str section, if present.
3577
3578 * lto.h (struct lto_str_fd_struct): New struct.
3579 (struct lto_file_struct): Added new field DEBUG_STR
3580 to hold the file descriptor for the debug string table.
3581
35822007-12-07 Bill Maddox <maddox@google.com>
3583
3584 * lto.c (lto_str_fd_init): New function.
3585 (lto_str_fd_close): New function.
3586 (lto_file_init): Call lto_str_fd_init.
3587 (lto_file_close): Call lto_str_fd_close.
3588 (lto_str_read): New function. Read debug string table.
3589 (lto_str_lookup): New function. Get string for debug
3590 string table offset.
3591 (lto_read_form): Recognize DW_FORM_strp.
3592 (lto_file_read): Invoke lto_str_read.
3593
3594 * lto-elf.c (lto_elf_file_open): Read raw section data
3595 for the .debug_str section, if present.
3596
3597 * lto.h (struct lto_str_fd_struct): New struct.
3598 (struct lto_file_struct): Added new field DEBUG_STR
3599 to hold the file descriptor for the debug string table.
3600
36012007-12-07 Nathan Froyd <froydnj@codesourcery.com>
3602
3603 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
3604 Grow the basic_block_info and label_to_block_map vectors if
3605 necessary. Read in the block chain.
3606
36072007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3608
3609 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
3610
36112007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3612
3613 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
3614
36152007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3616
3617 * lto-read.c (input_expr_operand): Don't check for MTAGs.
3618 (lto_read_body): Don't declare PROP_alias.
3619
36202007-12-06 Nathan Froyd <froydnj@codesourcery.com>
3621
3622 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
3623 argument type information.
3624
36252007-12-03 Nathan Froyd <froydnj@codesourcery.com>
3626
3627 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3628 TREE_THIS_VOLATILE if the associated type is a volatile type.
3629 (lto_materialize_function): Remove call to init_ssa_operands.
3630 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
3631 variable when reading an SSA_NAME. Do the same when reading a
3632 RESULT_DECL, a RETURN_EXPR, or an MTAG.
3633 (input_cfg): Call init_ssa_operands.
3634 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
3635 Move call to init_tree_ssa...
3636 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
3637 add_referenced_var on any variables referenced from the body of the
3638 function. Inform the rest of the compiler we are in SSA form and
3639 inform later passes about the current properties.
3640
36412007-11-30 Nathan Froyd <froydnj@codesourcery.com>
3642
3643 * lto.c (lto_materialize_function): Add FIXME.
3644
36452007-11-29 Nathan Froyd <froydnj@codesourcery.com>
3646
3647 * lto-lang.c (enum built_in_attribute): New enum.
3648 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
3649 built_in_attributes): New variables.
3650 (def_builtin_1): New function.
3651 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
3652
36532007-11-28 Nathan Froyd <froydnj@codesourcery.com>
3654
3655 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
3656 DECL_SOURCE_LOCATION for debugging purposes.
3657 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
3658 bitfield, use the type specified by the DIE for TREE_TYPE and defer
3659 laying out the decl until later.
3660 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
3661 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
3662 TREE_ADDRESSABLE.
3663 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
3664 operand of an ADDR_EXPR.
3665 * lto-lang.c (enum lto_builtin_type): New enum.
3666 (builtin_type): New typedef.
3667 (builtin_types, string_type_node, const_string_type_node,
3668 wint_type_node, intmax_type_node, uintmax_type_node,
3669 signed_size_type_node): New variables.
3670 (def_fn_type, builtin_type_for_size, lto_define_builtins,
3671 lto_build_c_type_nodes): New functions.
3672 (lto_init): Initialize builtin types.
3673 (lto_set_decl_assembler_name): Let the target machine mangle the
3674 name if the decl is TREE_PUBLIC, otherwise uniquify it.
3675
36762007-11-21 Nathan Froyd <froydnj@codesourcery.com>
3677
3678 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
3679 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
3680 the type is a constant type. Set the assembler name and inform
3681 the rest of the compiler about the new decl if the decl is not
3682 public.
3683 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
3684 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
3685 try to read in function bodies for functions that already have bodies.
3686 * lto-symtab.c (lto_same_type_p): Check for unbounded array
3687 equivalency.
3688 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
3689 Check for whether we matched a builtin function type before calling
3690 lto_same_type_p on the generated type. Permit cases where the
3691 declaration of an array is unbounded, but the definition is bounded.
3692 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
3693 DECL_SIZE_UNIT if necessary.
3694
36952007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3696
3697 * lto-read.c (input_expr_operand): Get types right
3698 for COMPLEX_CST.
3699
37002007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3701
3702 * lto-read.c (make_new_block, input_cfg): Properly set
3703 n_basic_blocks.
3704
37052007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3706
3707 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
3708 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
3709
37102007-11-16 Nathan Froyd <froydnj@codesourcery.com>
3711
3712 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
3713 construct the integer type for bitfields.
3714
37152007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3716
3717 * lto-read.c (data_in.current_node_has_loc): Removed.
3718 (input_line_info): Returns true if node needs line set.
3719 (set_line_info): Always sets line if called.
3720 (clear_line_info): Removed reference to current_node_needs_loc.
3721 (input_expr_operand): Keeps track locally if current node needs a loc.
3722 (input_local_var): Added code to handle DECL_INITIAL for
3723 static local vars. Only set loc if necessary.
3724
37252007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3726
3727 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
3728 DECL_CONTEXT.
3729
37302007-11-15 Nathan Froyd <froydnj@codesourcery.com>
3731
3732 * lto.c: Include langhooks.h.
3733 (lto_find_integral_type): Rework logic to handle the case where
3734 got_byte_size is true, but the bitsize requested and that of the
3735 base_type doesn't match.
3736 (lto_read_variable_formal_parameter_constant_DIE): Only check for
3737 asm_name if we are creating a VAR_DECL.
3738 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
3739 definition.
3740 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
3741 function reference and use the builtin's decl if so. Set the
3742 DECL_CONTEXT of the RESULT_DECL for the function.
3743 * lto-lang.c (registered_builtin_fndecls): New variable.
3744 (lto_getdecls): Return it.
3745 (lto_builtin_function): Chain the new decl onto
3746 registered_builtin_fndecls.
3747
37482007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
3749
3750 * lto-read.c (process_tree_flags, lto_static_init_local):
3751 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
3752 (input_line_info, clear_line_info): Fixed new line number code.
3753 (input_expr_operand): Added type to SWITCH_EXPR.
3754 (lto_read_body): Properly initialized data_in.
3755 Clear line info when leaving.
3756
37572007-11-13 Diego Novillo <dnovillo@google.com>
3758
3759 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3760 Initialize ARTIFICIAL.
3761 (lto_read_subroutine_type_subprogram_DIE): Initialize
3762 SAVED_SCOPE.
3763 * lto-read.c (set_line_info): Remove ; from calls to
3764 LINEMAP_POSITION_FOR_COLUMN.
3765
37662007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3767
3768 * lto-read.c (input_type_ref): Renamed from get_type_ref.
3769 (input_expr_operand, input_local_var): Renamed get_type_ref to
3770 input_type_ref.
3771 (input_expr_operand): Get the types correct for
3772 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
3773
37742007-11-13 Doug Kwan <dougkwan@google.com>
3775
3776 * lto-read.c (input_widest_uint_uleb128): New function.
3777 (input_tree_flags, process_tree_flags, input_line_info,
3778 input_expr_operand, input_local_var, input_phi, input_ssa_names):
3779 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
3780 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
3781 (lto_static_init_local): Add code to assert that lto_flags_type is
3782 wide enough.
3783
37842007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3785
3786 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
3787 (lto_read_subroutine_type_subprogram_DIE): Handle
3788 DW_AT_static_link and DW_AT_specification. Return the
3789 specification if present.
3790 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
3791
37922007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3793
3794 * lto-lang.c: Include target.h.
3795 (registered_builtin_types): New variable.
3796 (lto_type_for_mode): Increase number of modes handled.
3797 (lto_builtin_function): Fix argument list and return the decl.
3798 (lto_register_builtin_type): New function.
3799 (lto_init): Initialize target builtins and language-independent
3800 nodes.
3801 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
3802
38032007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3804
3805 * lto-read.c (input_expr_operand): Added code to properly handle
3806 index filed. Added new RANGE_EXPR case.
3807
38082007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3809
3810 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
3811 (data_in): Added current_node_has_loc field.
3812 (input_line_info, set_line_info, clear_line_info): Added a support
3813 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
3814 did not have on on the source side.
3815 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
3816 numbers too.
3817
38182007-11-09 Doug Kwan <dougkwan@google.com>
3819
3820 * lto-read.c (input_expr_operand): Change type of operand 2 of
3821 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
3822
38232007-11-09 Nathan Froyd <froydnj@codesourcery.com>
3824
3825 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
3826 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
3827 from a DW_AT_specification or DW_AT_abstract_origin attribute to
3828 the new decl we are creating. Move informing the middle end about
3829 the new decl to...
3830 (lto_main): ...here. Inform the middle end about global variables
3831 after we have read in all the input files.
3832 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
3833 variables with internal linkage, so delete the check for internal
3834 linkage. Combine TREE_PUBLIC flags.
3835
38362007-11-08 Nathan Froyd <froydnj@codesourcery.com>
3837
3838 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3839 DW_AT_decl_line.
3840 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
3841 builtin specially. Move check for attribute compatibility
3842 earlier.
3843
38442007-11-07 Nathan Froyd <froydnj@codesourcery.com>
3845
3846 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
3847 * config-lang.in (gtfiles): Add lto.h and lto.c.
3848 * lto-elf.c: Include ggc.h.
3849 (lto_elf_file_open): Allocate elf_file from GC memory.
3850 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
3851 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
3852 in GC memory.
3853 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
3854 (lto_file_close): Free file from GC memory.
3855 (lto_cache_store_DIE): Allocate the new entry in GC memory.
3856 (lto_read_member_DIE): Fix declaration.
3857 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
3858 in GC memory.
3859 (current_lto_file): New variable.
3860 (lto_main): Use it.
3861 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
3862 lto_die_cache_entry): Move to...
3863 * lto.h: ...here and add GTY markers as appropriate. Delete forward
3864 declarations accordingly.
3865 (struct lto_file_struct): Declare.
3866 (lto_file_vtable): Use it instead of lto_file.
3867
38682007-11-06 Alon Dayan <alond@il.ibm.com>
3869 Kenneth Zadeck <zadeck@naturalbridge.com>
3870
3871 * lto-read.c (process_flags, lto_static_init_local):
3872 read flags of VAR_DECL and FUNCTION_DECL of size>1.
3873 change global array num_flags_for_code to flags_length_for_code.
3874 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
3875
38762007-11-05 Nathan Froyd <froydnj@codesourcery.com>
3877
3878 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
3879 layout functions to compute information about the newly constructed
3880 type.
3881
38822007-11-02 Nathan Froyd <froydnj@codesourcery.com>
3883
3884 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
3885 case to use DECL_RESULT if necessary.
3886
38872007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3888
3889 * lto-read.c (input_tree_list): Removed.
3890 (input_tree_flags): Added parameter to force flags no matter what
3891 tree code.
3892 (input_expr_operand): Added parameter to input_tree_flags.
3893 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
3894 input_expr_operand rather than input_tree_lists.
3895 (input_local_var): Use input_expr_operand to read attributes
3896 rather then input_tree_list.
3897 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
3898
38992007-10-31 Nathan Froyd <froydnj@codesourcery.com>
3900
3901 * lto.c (lto_read_typedef_DIE): Fix comment typo.
3902 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
3903 TYPE_DECL for it.
3904 * lto-read.c (lto_read_body): Use correct sizes for calculating
3905 type_decls_offset and types_offset.
3906
39072007-10-30 Nathan Froyd <froydnj@codesourcery.com>
3908
3909 * lto-tree.h (union lang_tree_node): Change GTY description to chain
3910 with GENERIC_NEXT.
3911 * config-lang.in (gtfiles): Add lto-lang.c.
3912 * lto-lang.c: Include gt-lto-lto-lang.h.
3913 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
3914 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
3915 (lto/lto-read.o): Likewise.
3916
39172007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3918
3919 * lto-read.c (data_in): Added type_decls and current_col fields.
3920 (string_slot): New type to hold canonized file name.
3921 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
3922 input_line_info, set_line_info, clear_line_info): New functions.
3923 (file_name_hash_table): New hash table.
3924 (input_local_var, input_labels, input_local_vars_index,
3925 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
3926 (input_uleb128): Changed type of byte var.
3927 (input_expr_operand): Large number of changes to get line numbers
3928 correct. Added TYPE_DECL case.
3929 (input_globals): Added code to get TYPE_DECLs processed.
3930 (input_local_var): Added code to process line numbers and
3931 TREE_CHAIN and DECL_CONTEXT.
3932 (input_function, input_constructor): Added call to
3933 clear_line_number.
3934 (lto_static_init_local): Added code to get line numbers correct.
3935 (lto_read_body): Added code to get TYPE_DECLS read and to change
3936 parameters to the calls above that had their parms reorganized.
3937
3938
39392007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3940
3941 * lto.h (lto_resolve_typedecl_ref): Declare.
3942 * lto.c (lto_resolve_typedecl_ref): New function.
3943
39442007-10-29 Mark Mitchell <mark@codesourcery.com>
3945 Nathan Froyd <froydnj@codesourcery.com>
3946
3947 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
3948 DIEs even if we find an abstract origin for this DIE.
3949
39502007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3951
3952 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
3953 RESULT_DECL slightly earlier. Only remember the decl for later
3954 if we successfully merge declarations.
3955
39562007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
3957
3958 * lto-read.c (input_expr_operand): Give label_values the proper
3959 context and provide switch statements with a default type.
3960
39612007-10-23 Nathan Froyd <froydnj@codesourcery.com>
3962
3963 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
3964 * lto.c (lto_materialize_function): ...to here.
3965
39662007-10-22 Nathan Froyd <froydnj@codesourcery.com>
3967
3968 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
3969 * lto.c (lto_info_fd_init): Initialize it.
3970 (lto_info_fd_close): Free it.
3971 (lto_materialize_function): New function.
3972 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
3973 unmaterialized_fndecls.
3974 (lto_file_read): Read in all the function bodies after we have read
3975 all of the DWARF info.
3976 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
3977 reading a function body.
3978
39792007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
3980
3981 * lto-read.c (input_tree_flags): Renamed from input_flags to be
3982 semetric with output_tree_flags. Added call to log flags.
3983 (process_tree_flags): Renamed from process_flags. Fixed a lot of
3984 type issues to make everything consistent with flags being
3985 unsigned HOST_WIDE_INTS.
3986 (input_expr_operand): Added call to
3987 recompute_tree_invariant_for_addr_expr.
3988 (input_local_var): Added debugging for tree_chains. Now calls
3989 input_tree_flags.
3990 (input_phi): Made flags unsigned HOST_WIDE_INT.
3991 (input_ssa_names): Now calls input_tree_flags.
3992 (lto_read_body): Now sets cfun.
3993 (lto_read_function_body): Now sets current_function_pointer.
3994
39952007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3996
3997 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
3998 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
3999 inspecting fields within.
4000 (lto_read_DIE_at_ptr): Delete check for null result; let callers
4001 handle this appropriately.
4002
40032007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4004
4005 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
4006 DW_AT_abstract_origin properly. Ensure that we're not dealing with
4007 both DW_AT_abstract_origin and DW_AT_specification.
4008 (lto_read_subroutine_type_subprogram_DIE): Handle
4009 DW_AT_abstract_origin.
4010 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
4011 (lto_read_DIE_at_ptr): Define as static to match declaration.
4012 Lookup the PTR in the cache before reading it from the file.
4013 (lto_resolve_var_ref): Adjust accordingly.
4014 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
4015 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
4016
40172007-10-19 Nathan Froyd <froydnj@codesourcery.com>
4018
4019 * lto.c (lto_read_DIE_at_ptr): New function.
4020 (lto_resolve_var_ref): Use it.
4021 (lto_resolve_fn_ref): Use it.
4022 (lto_resolve_field_ref): Use it.
4023 (lto_read_variable_formal_parameter_constant_DIE): Follow
4024 DW_AT_specification and return the associated decl when appropriate.
4025
40262007-10-18 Nathan Froyd <froydnj@codesourcery.com>
4027
4028 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
4029 Implement for scalar integer modes.
4030 (lto_init): Initialize size_type_node.
4031
40322007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
4033
4034 * lto-read.c (input_expr_operand): Remove ssa name asserts.
4035 (input_local_var): Add chaining for params.
4036 (input_ssa_names): Add cfun parameter.
4037 (input_function): Remove unnecessary else.
4038
40392007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4040
4041 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
4042 (lto_resolve_var_ref): Use proper types.
4043 (lto_resolve_fn_ref): Likewise.
4044 (lto_resolve_field_ref): Likewise.
4045
40462007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4047
4048 * lto-read.c (input_expr_operand): Remove case.
4049
40502007-10-17 Nathan Froyd <froydnj@codesourcery.com>
4051
4052 * lto.c (lto_read_only_for_child_DIEs): New function.
4053 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
4054 * lto-elf.c (lto_elf_map_lto_section): Remove.
4055 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
4056 * lto-read.c (input_expr_operand): Assert that we never read a NULL
4057 SSA_NAME. Add missing case for mechanical codes.
4058 (input_cfg): Use basic_block_info_for_function instead of
4059 basic_block_info.
4060
40612007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4062
4063 * lto-read.c (input_sleb128, input_integer): Use proper casts.
4064 (input_list): Renamed input_tree_list and modified to follow same
4065 protocol as lto-function-out.c:output_tree_list.
4066 (input_expr_operand): Make asm operands use input_tree_list.
4067 (input_local_var): Now uses input_tree_list.
4068 (lto_read_body): Change placement for setting context of debug_labels.
4069
4070
40712007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
4072
4073 * lto-read.c (input_real): Output debugging in proper order.
4074 (input_integer): Compute bit lengths properly.
4075 (input_list): Clean up declaration.
4076 (input_expr_operand): Change calls to input_real to match fix.
4077 Make reading of LTO_bit_field_ref1 match output.
4078 (input_local_var): Make reading of attributes match what is being
4079 written.
4080 (dump_debug_stream): Also print char in hex.
4081 (debug_out_fun): Fix signed unsigned mismatch.
4082
40832007-10-10 Nathan Froyd <froydnj@codesourcery.com>
4084
4085 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
4086 DW_AT_GNU_vector specially, as they are not contiguous with the
4087 specified set of attribute names. Use class_mask to check for
4088 errors at the end of the function
4089 (lto_resolve_var_ref): Read the DIE if it is not cached.
4090 (lto_resolve_fn_ref): Likewise.
4091 (lto_resolve_field_ref): Likewise.
4092
40932007-10-05 Nathan Froyd <froydnj@codesourcery.com>
4094
4095 * lto.c: Include dwarf2out.h.
4096 (lto_cache_store_DIE): Assert that we never change the value.
4097 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
4098 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
4099 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
4100 sensible type instead.
4101 (lto_read_structure_union_class_type_DIE): Store the newly
4102 created type prior to reading the members of the structure to
4103 avoid infinite recursion. Avoid computing types and alignments
4104 for structures whose sizes are unknown.
4105 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
4106 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
4107 DW_AT_const_value, and DW_AT_specification.
4108 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
4109 Return early if we have already constructed the function type.
4110 (lto_read_typedef_DIE): Check to see if the type has been cached
4111 already. Cache the type before reading any children.
4112 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
4113 (lto_read_DIE): Unset context->skip_non_parameters around reading
4114 the DIE.
4115 (lto_resolve_fn_ref): Delete trailing whitespace.
4116
41172007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
4118
4119 * lto-read.c (input_expr_operand): Added type for STRING_CST.
4120
41212007-09-10 Nathan Froyd <froydnj@codesourcery.com>
4122
4123 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
4124
41252007-09-07 Nathan Froyd <froydnj@codesourcery.com>
4126
4127 * lto-lang.c (signed_and_unsigned_types): New variable.
4128 (lto_type_for_size): Consult signed_and_unsigned_types to find
4129 an approprite type, creating it if necessary.
4130 (lto_set_decl_assembler_name): Add actual method body.
4131
41322007-09-06 Jim Blandy <jimb@codesourcery.com>
4133
4134 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
4135 can't find a var init for this variable, leave its DECL_INITIAL.
4136 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
4137 lto_elf_map_fn_body.
4138 (lto_map_lto_section): New function.
4139 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
4140 bodies, and lto_elf_map_optional_lto_section for variable
4141 initializers.
4142 (lto_elf_find_section_data): Quietly return NULL if the section is
4143 missing.
4144 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
4145
4146 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
4147
4148 * lto-read.c (lto_read_body): Doc fix.
4149
41502007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
4151
4152 * lto-read.c (fun_in): Renamed to data_in.
4153 (input_expr_operand, input_local_var, input_string_internal,
4154 input_string, input_real, input_list, get_label_decl,
4155 get_type_ref, input_expr_operand, input_globals, input_labels,
4156 input_local_vars_index, input_local_var, input_local_vars,
4157 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
4158 (input_constructor): New function.
4159 (lto_read_function_body): Renamed to lto_read_body and generalized
4160 to handle both functions and constructors.
4161 (lto_read_function_body, lto_read_var_init): New function.
4162
4163
41642007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4165
4166 * lto-read.c (input_expr_operand): Assert that there really is a
4167 FUNCTION_DECL.
4168 (input_globals): Removed checks on 0 section.
4169
41702007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
4171
4172 * lto-read.c (fun_in): Added local_decls_index and
4173 local_decls_index_d.
4174 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
4175 (input_globals): Enabled code to handle FIELD_DECLs.
4176 (input_local_vars_index, input_local_vars): New function.
4177 (input_local_var): Changed to allow locals to be input randomly.
4178 (lto_read_function_body): Added code to input the
4179 local_decls_index and to free various structures.
4180
41812007-08-17 Jim Blandy <jimb@codesourcery.com>
4182
4183 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
4184 ATTRIBUTE_UNUSED from 'die' formal.
4185
4186 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
4187 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
4188 (input_list): Fix type of 'tag'.
4189 (input_expr_operand): Fix type of 'tag' argument. Update
4190 declaration. Fix type of 'ctag'. Add default case to switch,
4191 since the type of the switched value is now an enum.
4192 (input_local_vars): Fix type of 'tag'.
4193 (input_bb): Fix type of 'tag' argument.
4194 (input_function): Fix type of 'tag' argument.
4195
41962007-08-16 Jim Blandy <jimb@codesourcery.com>
4197
4198 * lto.c (lto_read_member_DIE): Record the tree we create in
4199 fd->die_cache. (Our 'die' argument is no longer unused.)
4200 (lto_resolve_field_ref): New function.
4201 * lto.h (lto_resolve_field_ref): New declaration.
4202
42032007-08-15 Jim Blandy <jimb@codesourcery.com>
4204
4205 * lto-read.c (lto_read_var_init): Mark arguments as unused.
4206
42072007-08-07 Jim Blandy <jimb@codesourcery.com>
4208
4209 * lto.c (lto_read_form): Complete attr_classes table.
4210 (DWARF2_form_data): Doc fix.
4211
42122007-08-05 Mark Mitchell <mark@codesourcery.com>
4213
4214 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
4215 and unmap_var_init.
4216 (lto_read_var_init): Declare.
4217 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
4218 interface for reading variable initializers.
4219 * lto-elf.c (lto_elf_read_var_init): Remove.
4220 (lto_elf_file_vtable): Update initializer.
4221 (lto_elf_read_var_init): Add comment about unused-ness.
4222 * lto-read.c (lto_read_var_init): New.
4223
4224 * lto.c (lto_read_form): Add entry for DW_AT_inline.
4225
42262007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
4227
4228 * lto-read.c (lto_read_function_body): Moved declaration of fn
4229 outside of ifdef.
4230
42312007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
4232
4233 * lto-read.c (input_uleb128, input_string_internal, input_real,
4234 input_integer, input_record_start, input_list, get_type_ref,
4235 input_flags, input_expr_operand, input_expr_operand,
4236 input_expr_operand, input_local_vars, input_cfg, input_phi,
4237 input_ssa_names, input_bb, input_function): Added semicolons.
4238
4239
42402007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4241
4242 * lto-read.c (input_globals): Remove debugging.
4243 (input_function): Set DECL_ARGUMENTS.
4244
4245
42462007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
4247
4248 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
4249 RETURN_EXPR, MODIFY_EXPR and processing of flags.
4250 (input_phi): Made work with operands other than SSA_NAMES and
4251 fixed processing of flags.
4252 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
4253 (input_flags): New function.
4254 * lto-lang.c (lto_init): Changed state of in_lto_p.
4255
4256
42572007-07-24 Mark Mitchell <mark@codesourcery.com>
4258
4259 * lto-tree.h (lto_varargs_cookie): Remove.
4260 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
4261 skip_non_parameters, skip_parameters.
4262 (lto_varargs_cookie): Remove.
4263 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
4264 parameter types.
4265 (lto_read_abbrev): New function.
4266 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
4267 child DIEs.
4268 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
4269 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
4270 (lto_file_read): Initialize new context fields.
4271 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
4272 (lto_unsigned_type): Remove.
4273 (lto_signed_type): Likewise.
4274 (lto_signed_or_unsigned_type): Likewise.
4275 (lto_init): Do not create lto_varargs_cookie.
4276 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
4277 (LANG_HOOKS_SIGNED_TYPE): Likewise.
4278 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
4279
42802007-07-19 Jan Hubicka <jh@suse.cz>
4281
4282 * lto-read.c (lto_read_function_body): Produce empty scope block
4283 to avoid crash.
4284
42852007-07-18 Mark Mitchell <mark@codesourcery.com>
4286
4287 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
4288 process local variables.
4289 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
4290
42912007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
4292
4293 * lto-read.c (input_list, input_expr_operand): Added struct
4294 function parameter.
4295 (init_cfg, finalize_cfg): Removed function.
4296 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
4297 (input_labels, input_local_vars): Now takes input_block parameter rather than
4298 synthsyzing it.
4299 (input_cfg, input_phi, input_ssa_names): New functions.
4300 (input_bb): Now passes in input_blocks. Does not construct cfg
4301 and processes the list of phi functions.
4302 (input_function): Now builds both the cfg and ssa_names table.
4303 (lto_read_function_body): Processes new header fields to construct
4304 streams for the ssa_names and cfg and their debugging.
4305 * lto/lto-lang.c (lto_init): Set in_lto_p.
4306
4307
43082007-06-28 Mark Mitchell <mark@codesourcery.com>
4309
4310 * lto.h (lto_file_vtable): Add read_var_init.
4311 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
4312 initializers.
4313 (lto_main): Remove bogus asserts.
4314 * lto-elf.c (tm.h): Include it.
4315 (libiberty.y): Likewise.
4316 (lto_elf_file): Add strtab and symtab. Rename
4317 string_table_section_index to sec_strtab.
4318 (lto_elf_file_vtable): Add lto_elf_read_var_init.
4319 (lto_elf_get_shdr): New function.
4320 (lto_elf_free_shdr): Likewise.
4321 (lto_elf_find_section_data): Use them.
4322 (lto_elf_read_symtab): New function.
4323 (lto_elf_lookup_sym): Likewise.
4324 (lto_elf_free_sym): Likewise.
4325 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
4326 (lto_elf_built_init): New function.
4327 (lto_elf_read_var_init): Likewise.
4328 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
4329
43302007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
4331
4332 * lto-read (make_new_block): Initialize the stmt_list.
4333 (lto_static_init_local): Add debugging for missing codes.
4334
43352007-06-26 Mark Mitchell <mark@codesourcery.com>
4336
4337 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
4338 unprototyped functions.
4339
43402007-06-23 Mark Mitchell <mark@codesourcery.com>
4341
4342 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
4343 Handle DW_AT_MIPS_linkage_name.
4344 (lto_read_subroutine_type_subprogram): Likewise. Correct
4345 compilation errors.
4346 (lto_main): Remove incorrect assertions.
4347 * lto-symbtab.c: Build function types out of TREE_LISTs.
4348
4349 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
4350
4351 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
4352
43532007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
4354
4355 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
4356 dummy since ggc does not like empty structs.
4357 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
4358 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
4359 expr->common to expr->base.
4360 (make_new_block): Moved stmt_list to proper place.
4361
4362
43632007-03-14 Robert Kennedy <jimbob@google.com>
4364
4365 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
4366 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
4367 assembler name from DWARF.
4368 * lto-lang.c (lto_set_decl_assembler_name) New function.
4369
43702006-09-10 Mark Mitchell <mark@codesourcery.com>
4371
4372 * lto.h (lto_file_vtable): New structure.
4373 (lto_file): Add vtable pointer.
4374 (lto_file_init): Add vtable paramter.
4375 (lto_read_function_body): New function.
4376 (lto_symtab_merge_fn): New function.
4377 * lto.c (lto_file_init): Add vtable parameter.
4378 (lto_read_form): Fill in entries for DW_AT_prototyped,
4379 DW_AT_frame_base.
4380 (lto_read_subroutine_type_subprogram_DIE): New function.
4381 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
4382 DW_TAG_subprogram.
4383 * lto-elf.c (lto_elf_vile_vtable): New variable.
4384 (lto_elf_file_open): Pass it to lto_file_init.
4385 (lto_elf_map_fn_body): New function.
4386 (lto_elf_unmap_fn_body): Likewise.
4387 * lto-read.c: New file.
4388 * lto-symtab.c (lto_symtab_merge_fn): New function.
4389 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
4390 tree_rest_of_compilation.
4391 * Make-lang.in (LTO_OBJS): Add lto-read.o
4392 (lto-read.o): New target.
4393
43942006-09-03 Mark Mitchell <mark@codesourcery.com>
4395
4396 * lto.c (<inttypes.h>): Don't include it.
4397 (lto_context): Don't typedef it.
4398 (lto_resolve_reference): New function.
4399 (lto_read_form): Use it.
4400 (lto_resolve_type_ref): New function.
4401 (lto_resolve_var_ref): Likewise.
4402 (lto_resolve_fn_ref): Likewise.
4403 * lto.h (<inttypes.h>): Include it.
4404 (lto_context): New type.
4405 (lto_ref): New structure.
4406 (lto_resolve_type_ref): Declare.
4407 (lto_resolve_var_ref): Likewise.
4408 (lto_resolve_fn_ref): Likewise.
4409
44102006-08-18 Mark Mitchell <mark@codesourcery.com>
4411
4412 * lang-specs.h: New file.
4413
44142006-08-14 Mark Mitchell <mark@codesourcery.com>
4415
4416 * lto.c (lto_info_fd_init): Allocate the DIE cache.
4417 (lto_info_fd_close): Deallocate it.
4418 (lto_die_cache_entry): New structure.
4419 (lto_cache_hash): New function.
4420 (lto_cache_eq): Likewise.
4421 (lto_cache_store_DIE): Likewise.
4422 (lto_cache_lookup_DIE): Likewise.
4423 (lto_read_referenced_type_DIE): Use the cache.
4424 (lto_read_pointer_type_DIE): Robustify.
4425 (lto_read_DIE): Use the cache.
4426 * lto.h (hashtab.h): Include.
4427 (lto_info_fd): Add DIE cache.
4428 * Make-lang.in (LTO_H): New variable.
4429 (lto/lto-lang.o): Use LTO_H.
4430 (lto/lto-elf.o): Likewise.
4431 (lto/lto-symtab.o): Likewise.
4432
44332006-07-09 Mark Mitchell <mark@codesourcery.com>
4434
4435 * lto.c (lto_abi_mismatch_error): New function.
4436 (lto_abbrev_read): Initialize num_abbrevs.
4437 (lto_read_form): Specify allowed form classes for
4438 DW_AT_declaration. Adjust for change to lto_set_cu_context.
4439 (lto_read_variable_formal_parameter_constant_DIE): Handle
4440 DW_AT_declaration. Call lto_symtab_merge_var.
4441 (lto_read_pointer_type_DIE): New function.
4442 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
4443 not creat TYPE_DECLs for types that already have them.
4444 (lto_read_DIE): Add lto_read_pointer_type_DIE.
4445 (lto_set_cu_context): Make cu_start point to the header, not the
4446 first DIE.
4447 (lto_file_read): Adjust for change to lto_set_cu_context.
4448 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
4449 (lto/lto-symtab.o): New rule.
4450 * lto-tree.h (lang_identifier): Add decl field.
4451 (LANG_IDENTIFIER_CAST): New macro.
4452 (LTO_IDENTIFIER_DECL): Likewise.
4453 (lto_symtab_merge_var): Declare.
4454 * lto-symtab.c: New file.
4455
44562006-07-02 Daniel Berlin <dberlin@dberlin.org>
4457
4458 * lto.c (lto_context): Add current_cu and info_fd members.
4459 (DWARF2_CompUnit): New structure.
4460 (lto_read_DIE): Take lto_info_fd *.
4461 (lto_read_child_DIEs): Ditto.
4462 (lto_file_corrupt_error): Constify argument.
4463 (lto_set_cu_context): New function
4464 (lto_info_fd_init): Ditto.
4465 (lto_info_fd_close): Ditto.
4466 (lto_file_init): Use lto_info_fd_init.
4467 (lto_file_close): Use lto_info_fd_close.
4468 (lto_read_initial_length): Pass in pointer to header size.
4469 (lto_read_comp_unit_header): Correct cu_length to
4470 real length from beginning of header. Take lto_info_fd * as
4471 argument.
4472 (find_cu_for_offset): New function.
4473 (lto_read_form): Change first argument to lto_info_fd *.
4474 Add FORM_CONTEXT argument.
4475 Handle DW_FORM_ref_addr.
4476 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
4477 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
4478 Swap contexts if necessary for form.
4479 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
4480 lto_file_corrupt_error.
4481 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
4482 (lto_read_referenced_type_DIE): Change first argument to
4483 lto_info_fd *. Access lto_fd fields through base pointer.
4484 (lto_read_compile_unit_DIE): Change first argument to an
4485 lto_info_fd *.
4486 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
4487 (lto_read_base_type_DIE): Ditto.
4488 (lto_read_child_DIEs): Ditto.
4489 (lto_read_DIE): Ditto. Change type of function pointer.
4490 (lto_info_read): New function.
4491 (lto_set_cu_context): Ditto.
4492 (lto_file_read): Use lto_info_read, walk resulting CU's
4493 (lto_main): Update for lto_info_fd change.
4494 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
4495 necessary.
4496 * lto.h (DWARF2_CompUnit): New structure.
4497 (lto_info_fd): Ditto.
4498 (lto_file): Change debug_info to be an lto_info_fd.
4499
45002006-06-25 Mark Mitchell <mark@codesourcery.com>
4501
4502 * lto.c (toplev.h): Include it.
4503 (dwarf2.h): Likewise.
4504 (tree.h): Likewise.
4505 (tm.h): Likewise.
4506 (cgraph.h): Likewise.
4507 (ggc.h): Likewise.
4508 (inttypes.h): Likewise.
4509 (DWARF2_attr): New type.
4510 (DWARF2_abbrev): Likewise.
4511 (DWARF2_class): Likewise.
4512 (DWARF2_form_data): Likewise.
4513 (lto_context): Likewise.
4514 (lto_fd_init): New function.
4515 (lto_abbrev_fd_init): Likewise.
4516 (lto_abbrev_fd_close): Likewise.
4517 (lto_file_init): Use them.
4518 (lto_file_close): New function.
4519 (lto_file_corrupt_error): Likewise.
4520 (LTO_CHECK_INT_VAL): New macro.
4521 (lto_check_size_t_val): New function.
4522 (lto_check_int_val): Likewise.
4523 (LTO_READ_TYPE): New macro.
4524 (lto_read_ubyte): New function.
4525 (lto_read_uhalf): Likewise.
4526 (lto_read_uword): Likewise.
4527 (lto_read_uleb128): Likewise.
4528 (lto_read_initial_length): Likewise.
4529 (lto_abbrev_read_attrs): Likewise.
4530 (lto_abbrev_read): Likewise.
4531 (lto_abbrev_lookup): Likewise.
4532 (lto_read_section_offset): Likewise.
4533 (lto_read_comp_unit_header): Likewise.
4534 (lto_read_form): Likewise.
4535 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
4536 (LTO_BEGIN_READ_ATTRS): Likewise.
4537 (LTO_END_READ_ATTRS): Likewise.
4538 (lto_unsupported_attr_error): New function.
4539 (lto_get_identifier): Likewise.
4540 (lto_read_referenced_type_DIE): Likewise.
4541 (lto_read_compile_unit_DIE): Likewise.
4542 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
4543 (lto_read_base_type_DIE): Likewise.
4544 (lto_read_DIE): Likewise.
4545 (lto_read_child_DIEs): Likewise.
4546 (lto_file_read): Read DIEs.
4547 (lto_main): Ask middle end to emit entities.
4548 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
4549 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
4550 (lto_elf_file_close): Likewise.
4551 * lto.h (lto_file): Declare.
4552 (DWARF2_abbrev): Likewise.
4553 (lto_fd): New type.
4554 (lto_abbrev_fd): Likewise.
4555 (lto_file): Use new types.
4556 (lto_file_close): Declare.
4557 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
4558
45592006-06-18 Mark Mitchell <mark@codesourcery.com>
4560
4561 * lto.h: New file.
4562 * lto.c: New file.
4563 * lto-elf.c: New file.
4564 * lto-lang.c (flags.h): Include it.
4565 (lto.h): Likewise.
4566 (lto_init): New function.
4567 (lto_write_globals): Remove.
4568 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
4569 (LANG_HOOKS_INIT): Define.
4570 (LANG_HOOKS_PARSE_FILE): Likewise.
4571 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
4572 (LTO_EXE): Link with libelf.
4573 (lto/lto-lang.o): Update dependencies.
4574 (lto/lto.o): New target.
4575 (lto/lto-elf.o): Likewise.
4576
45772006-06-12 Mark Mitchell <mark@codesourcery.com>
4578
4579 * config-lang.in: New file.
4580 * Make-lang.in: Likewise.
4581 * lto-tree.h: Likewise.
4582 * lto-lang.c: Likewise.
4583
This page took 2.418412 seconds and 5 git commands to generate.