]> gcc.gnu.org Git - gcc.git/blame - gcc/lto/ChangeLog
compiler: Reject type switch using non-interface type.
[gcc.git] / gcc / lto / ChangeLog
CommitLineData
0229aee9
UB
12012-07-24 Uros Bizjak <ubizjak@gmail.com>
2
3 * lto-tree.h (lang_decl): Add variable_size GTY option.
4
7ee2468b
SB
52012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6
7 * lto.c: Do not include timevar.h.
8 * Make-lang.in: Fix dependencies.
9
a910399d
LC
102012-06-18 Lawrence Crowl <crowl@google.com>
11
12 * lto.c (do_whole_program_analysis): Rename use of TV_PHASE_CGRAPH to
13 TV_PHASE_OPT_GEN. Use new timevar TV_PHASE_STREAM_OUT around the call
14 to lto_wpa_write_files.
15 (lto_main): Rename use of TV_PHASE_CGRAPH to TV_PHASE_OPT_GEN. Move
16 start of TV_PHASE_OPT_GEN to include call to materialize_cgraph. Use
17 TV_PHASE_SETUP for the call to lto_init. Use new timevar
18 TV_PHASE_STREAM_IN around the call to read_cgraph_and_symbols.
19 Turn TV_PHASE_PARSING off then back on again, because LTO is pretending
20 to be a front end, but is not one.
21
877ab5e9
JH
222012-05-18 Jan Hubicka <jh@suse.cz>
23
24 * lto.c (lto_materialize_constructors_and_inits): Remove.
25 (read_cgraph_and_symbols): Remove handling of alias pairs.
26
6649df51
JH
272012-05-17 Jan Hubicka <jh@suse.cz>
28
29 * lto-partition.c (add_references_to_partition): Handle external vars.
30 (partition_varpool_node_p): Likewise.
31 (lto_promote_cross_file_statics): Do not promote externals.
32
d1ede5f4
BS
332012-05-14 Bernd Schmidt <bernds@codesourcery.com>
34
35 * lto-lang.c (handle_fnspec_attribute): New static function.
36 (lto_attribute_table): Add "fn spec".
37 (DEF_ATTR_STRING): Define and undefine along with the other macros.
38
0d6bf48c
JH
392012-05-04 Jan Hubicka <jh@suse.cz>
40
41 * lto.c (do_whole_program_analysis): Set timevars correctly.
42 (lto_main): Likewise.
d1ede5f4 43
1d67dde8
RB
442012-05-04 Richard Guenther <rguenther@suse.de>
45
46 * lang.opt (fwpa): Do not mark as Optimization.
47 (fltrans): Likewise.
48
65d630d4
JH
492012-04-30 Jan Hubicka <jh@suse.cz>
50
51 * lto.c (lto_main): Use compile ().
1d67dde8
RB
52 * lto-partition.c (partition_cgraph_node_p): Use
53 symtab_used_from_object_file_p.
65d630d4
JH
54 (partition_varpool_node_p): Likewise.
55
ead84f73
JH
562012-04-20 Jan Hubicka <jh@suse.cz>
57
58 * lto-partition.c (partition_cgraph_node_p): Use force_output.
59
5932a4d4
JH
602012-04-18 Jan Hubicka <jh@suse.cz>
61
62 * lto-partition.c (add_references_to_partition, lto_balanced_map):
63 Update for new ipa-ref API.
64
65c70e6b
JH
652012-04-16 Jan Hubicka <jh@suse.cz>
66
67 * lto.c (read_cgraph_and_symbols): Use FOR_EACH
68 walkers to walk cgraph and varpool.
69 (materialize_cgraph): Likewise.
70 * lto-partition.c (lto_1_to_1_map): Likewise.
71 (lto_balanced_map): Likewise.
72 (lto_promote_cross_file_statics): Likewise.
73
960bfb69
JH
742012-04-14 Jan Hubicka <jh@suse.cz>
75
76 * lto.c: Update field referenced for new cgraph/varpool layout.
77 * lto-partition.c: Likewise.
78
a66dc285
JH
792012-04-11 Jan Hubicka <jh@suse.cz>
80
81 * lto.c: Update copyright; remove params.h, ipa-inline.h
82 and ipa-utils.h inlines; inline lto-partition.h
83 (ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
84 add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
85 add_references_to_partition, add_cgraph_node_to_partition_1,
86 add_cgraph_node_to_partition, add_varpool_node_to_partition,
87 undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
88 lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
89 promote_var, promote_fn, lto_promote_cross_file_statics): move to...
90 * lto-partition.c: ... here; new file.
91 * lto-partition.h: New file.
92 * Make-lang.in (lto.o): Update dependencies.
93 (lto-partition.o): New.
94
f3b249e5
RG
952012-04-05 Richard Guenther <rguenther@suse.de>
96
97 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Remove
98 definition.
99
21fa2faf
RG
1002012-03-12 Richard Guenther <rguenther@suse.de>
101
102 * lto-lang.c (builtin_type_for_size): Use lto_type_for_size.
103
6bb485a3
RG
1042012-03-06 Richard Guenther <rguenther@suse.de>
105
106 PR lto/52097
107 * lto.c (uniquify_nodes): Merge TYPE_FIELDS of variant types.
108
95510497
RG
1092012-02-28 Richard Guenther <rguenther@suse.de>
110
111 PR lto/52400
112 * lto.c (lto_register_function_decl_in_symtab): Do not register
113 a reverse renamed decl mapping.
114
09228fef
JJ
1152012-01-06 Jakub Jelinek <jakub@redhat.com>
116
117 PR lto/51774
118 * lto-lang.c (handle_returns_twice_attribute): New function.
119 (lto_attribute_table): Add returns_twice attribute.
120
b03eda0d
RG
1212011-12-21 Richard Guenther <rguenther@suse.de>
122
123 * lto.c (GIMPLE_REGISTER_TYPE): New define.
124 (LTO_FIXUP_TREE): Use it.
125 (uniquify_nodes): Mark new non-prevailing types and avoid
126 calling gimple_register_type on others.
127 (lto_read_decls): Add comment.
128
4ad9a9de
EB
1292011-12-13 Eric Botcazou <ebotcazou@adacore.com>
130
131 * lto.h (lto_parse_hex): Delete.
132 * lto.c (lto_read_decls): Use 'int' for offsets.
133 (lto_parse_hex): Make static and return proper 64-bit host type.
134 (lto_resolution_read): Use proper 64-bit host type.
135
ea973bad
RG
1362011-12-13 Richard Guenther <rguenther@suse.de>
137
138 PR lto/48354
139 * lto.c (lto_ft_decl_non_common): When we merged DECL_ORIGINAL_TYPE
140 with the type of the TYPE_DECL clear DECL_ORIGINAL_TYPE.
141
c8218030
UB
1422011-12-01 Uros Bizjak <ubizjak@gmail.com>
143
144 * lto-lang.c (lto_attribute_table): Handle *tm regparm.
145 (ignore_attribute): New.
146
57ac2606
AH
1472011-11-21 Aldy Hernandez <aldyh@redhat.com>
148
149 * lto-lang.c (lto_attribute_table): Handle transaction_pure.
150 (handle_transaction_pure_attribute): New.
151
52a35ef7
RG
1522011-11-03 Richard Guenther <rguenther@suse.de>
153
154 PR lto/44965
155 * lto-lang.c (lto_post_options): Do not read file options.
156 * lto.c (lto_read_all_file_options): Remove.
157 (lto_init): Call lto_set_in_hooks here.
158
51973b1e
JH
1592011-10-09 Jan Hubicka <jh@suse.cz>
160
161 * lto.c (node_cmp, varpool_node_cmp): New functions.
162 (lto_balanced_map): Honnor -fno-toplevel-reorder of vars&functions.
163 (cmp_partitions): Rename to ...
164 (cmp_partitions_size): ... this one.
165 (cmp_partitions_order): New function.
166 (lto_wpa_write_files): Sort partitions by order when
167 -fno-toplevel-reorder is used.
168
5958009b
AK
1692011-10-09 Andi Kleen <ak@linux.intel.com>
170
171 * lto.c (lto_section_read): Call fatal_error on IO or mmap errors.
172
e79983f4
MM
1732011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
174
175 * lto-lang.c (def_builtin_1): Delete old interface with two
176 parallel arrays to hold standard builtin declarations, and replace
177 it with a function based interface that can support creating
178 builtins on the fly in the future. Change all uses, and poison
179 the old names. Make sure 0 is not a legitimate builtin index.
180
c17d253c
AK
1812011-10-02 Andi Kleen <ak@linux.intel.com>
182
183 * lto-object.c (lto_obj_add_section_data): Add list.
184 (lto_obj_add_section): Fill in list.
185 (ltoobj_build_section_table): Pass through list.
186 * lto.c (file_data_list): Declare.
187 (create_subid_section_table): Pass arguments directly.
188 Fill in list of file_datas.
189 (lwstate): Delete.
190 (lto_create_files_from_ids): Pass in direct arguments.
191 Don't maintain list.
192 (lto_file_read): Use explicit section and file data lists.
193 (lto_read_all_file_options): Pass in section_list.
194 * lto.h (lto_obj_build_section_table): Add list.
195 (lto_section_slot): Add next.
196 (lto_section_list): Declare.
197
ed0d2da0
JH
1982011-10-02 Jan Hubicka <jh@suse.cz>
199
200 PR lto/47247
201 * common.c (lto_resolution_str): Add new resolution.
202 * common.h (lto_resolution_str): Likewise.
203
ad7715f3
L
2042011-09-30 H.J. Lu <hongjiu.lu@intel.com>
205 Andi Kleen <ak@linux.intel.com>
206
207 PR lto/50568
208 * lto.c (lto_splay_tree_delete_id): New.
209 (lto_splay_tree_compare_ids): Likewise.
210 (lto_splay_tree_lookup): Likewise.
211 (lto_splay_tree_id_equal_p): Likewise.
212 (lto_splay_tree_insert): Likewise.
213 (lto_splay_tree_new): Likewise.
214 (lto_resolution_read): Change id to unsigned HOST_WIDE_INT.
215 Use lto_splay_tree_id_equal_p and lto_splay_tree_lookup.
216 (create_subid_section_table): Use lto_splay_tree_lookup and
217 lto_splay_tree_insert.
218 (lto_file_read): Use lto_splay_tree_new.
219
dde8b360
AK
2202011-09-26 Andi Kleen <ak@linux.intel.com>
221
222 * lto.c (lto_resolution_read): Remove id dumping.
223 (lto_section_with_id): Turn id HOST_WIDE_ID.
224 (create_subid_section_table): Dito.
225
892a371f
DS
2262011-08-28 Dodji Seketeli <dodji@redhat.com>
227
228 * lto-lang.c (lto_init): Likewise. Also, avoid calling
229 linemap_add twice.
230
f82d1a94
MJ
2312011-08-11 Martin Jambor <mjambor@suse.cz>
232
233 * lto.c (uniquify_nodes): Use main variant's BINFO too.
234
f0efc7aa
DN
2352011-08-08 Diego Novillo <dnovillo@google.com>
236
237 * Make-lang.in (lto/lto.o): Add TREE_STREAMER_H.
238 * lto.c: Include tree-streamer.h.
239
1a072294
RG
2402011-07-06 Richard Guenther <rguenther@suse.de>
241
242 * lto-lang.c (lto_init):
243 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
244
7496868d
JH
2452011-06-11 Jan Hubicka <jh@suse.cz>
246
10f13f22 247 PR lto/48246
7496868d
JH
248 * lto.c (lto_1_to_1_map): Don't create empty partitions.
249 (lto_balanced_map): Likewise.
250
39e2db00
JH
2512011-06-11 Jan Hubicka <jh@suse.cz>
252
253 * lto.c (add_cgraph_node_to_partition_1): Break out from ...
254 (add_cgraph_node_to_partition) ... here; walk aliases.
255 (lto_1_to_1_map): Remove same body alias code.
256 (promote_fn): Likewise.
257 (lto_promote_cross_file_statics): Update comment.
258
259
28628ea6
DN
2602011-06-07 Diego Novillo <dnovillo@google.com>
261
262 * lto.c (uniquify_nodes): Move code to register decls to
263 the loop that computes canonical types.
264
009db074
RG
2652011-06-07 Richard Guenther <rguenther@suse.de>
266
267 * lto-lang.c (lto_init): Do not set
268 size_type_node or call set_sizetype.
269
47c79d56
DN
2702011-06-04 Diego Novillo <dnovillo@google.com>
271
272 * lto.c (lto_init): New.
273 (lto_main): Call it.
274
d5828cc7
DN
2752011-06-03 Diego Novillo <dnovillo@google.com>
276
277 * lto.c (get_resolution): Move from lto-streamer-in.c.
278 (lto_register_var_decl_in_symtab): Likewise.
279 (lto_register_function_decl_in_symtab): Likewise.
280 (uniquify_nodes): Call lto_register_var_decl and
281 lto_register_function_decl_in_symtab after reading a new
282 VAR_DECL or FUNCTION_DECL.
283
6807da97
RG
2842011-06-01 Richard Guenther <rguenther@suse.de>
285
286 * lto-lang.c (lto_register_canonical_types): New function.
287 (lto_init): Register common nodes with the canonical type machinery.
288 Do not play tricks with char_type_node.
289
d74be317
RG
2902011-05-26 Richard Guenther <rguenther@suse.de>
291
292 * lto.c (uniquify_nodes): Fix bug in one of the previous changes.
293
d9f8303f
NF
2942011-05-25 Nathan Froyd <froydnj@codesourcery.com>
295
296 * lto.c (lto_ft_typed): New function.
297 (lto_ft_common): Call it.
298 (lto_ft_constructor): Likewise.
299 (lto_ft_expr): Likewise.
300 (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
301 TREE_CHAIN.
302
fb291a1e
RG
3032011-05-20 Richard Guenther <rguenther@suse.de>
304
305 * lto.c (lto_ft_common): Remove pointer-to chain teardown.
306 (lto_ft_type): Move main-variant and pointer-to chain building ...
307 (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here,
308 in a separate final loop.
309
31b3ca64
RG
3102011-05-19 Richard Guenther <rguenther@suse.de>
311
312 * lto.c (uniquify_nodes): First register all types before
313 fixing up the tree SCC.
314
35d828c5
JH
3152011-05-11 Jan Hubicka <jh@suse.cz>
316
317 PR lto/48952
318 * lto.c (do_whole_program_analysis): Do not register cgraph hooks.
319
51545682
NF
3202011-05-11 Nathan Froyd <froydnj@codesourcery.com>
321
322 * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
323 location of binfo field.
324 (lto_fixup_prevailing_decls): Likewise.
325
8242dd04
NF
3262011-05-10 Nathan Froyd <froydnj@codesourcery.com>
327
328 * lto-lang.c (def_fn_type): Don't call build_function_type, call
329 build_function_type_array or build_varargs_function_type_array
330 instead.
331
c99c0026
EB
3322011-05-07 Eric Botcazou <ebotcazou@adacore.com>
333
334 * lto-lang.c (global_bindings_p): Return bool.
335
c47d0034
JH
3362011-05-07 Jan Hubicka <jh@suse.cz>
337
a9bcb3f0
EB
338 * lto.c (lto_materialize_function): Use
339 cgraph_function_with_gimple_body_p.
340 (add_cgraph_node_to_partition): Do not re-add items to partition;
341 handle thunks.
c47d0034
JH
342 (add_varpool_node_to_partition): Do not re-add items to partition.
343
bb3398ca
JH
3442011-05-03 Jan Hubicka <jh@suse.cz>
345
346 * lto.c (free_ltrans_partitions): Fix accidental commit.
347
1cb1a99f
JH
3482011-05-03 Jan Hubicka <jh@suse.cz>
349
350 * lto.c (ltrans_partition_def): Remove GTY annotations.
351 (ltrans_partitions): Move to heap.
352 (new_partition): Update.
353 (free_ltrans_partitions): New function.
354 (lto_wpa_write_files): Use it.
355
af8bca3c
MJ
3562011-04-29 Martin Jambor <mjambor@suse.cz>
357
358 * lto.c: Include ipa-utils.h.
359 (lto_balanced_map): Update call to ipa_reverse_postorder.
360 * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies.
361
b823cdfe
MM
3622011-04-29 Michael Matz <matz@suse.de>
363
364 * lto.c (toplevel): Include tree-flow.h.
365 (lto_read_in_decl_state): Don't merge types here.
366 (tree_with_vars): New static hash table.
367 (remember_with_vars): New static functions.
368 (LTO_FIXUP_TYPE): New macro.
369 (lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
370 lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
371 lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
372 lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
373 (lto_read_decls): Uniquify while reading in trees.
374 (lto_fixup_data_t, LTO_FIXUP_SUBTREE,
375 LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
376 lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
377 lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
378 lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
379 lto_fixup_tree): Remove.
380 (lto_fixup_state): Remove data argument. Use
381 lto_symtab_prevailing_decl.
382 (LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
383 (lto_fixup_prevailing_decls): New function.
384 (lto_fixup_state_aux): Argument aux is unused.
385 (lto_fixup_decls): Don't allocate pointer sets, don't use
386 lto_fixup_tree, use lto_fixup_prevailing_decls.
387 (read_cgraph_and_symbols): Allocate and remove tree_with_vars.
388 * Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
389
b9843260
EB
3902011-04-16 Eric Botcazou <ebotcazou@adacore.com>
391
392 * lto.c (lto_balanced_map): Fix typos in head comment.
393 (lto_promote_cross_file_statics): Fix long lines and remove redundant
394 test.
395
e7f23018
JH
3962011-04-16 Jan Hubicka <jh@suse.cz>
397
398 * lto.c (lto_balanced_map): Update.
399
10a5dd5d
JH
4002011-04-14 Jan Hubicka <jh@suse.cz>
401
402 * lto.c: Include ipa-inline.h
b9843260
EB
403 (add_cgraph_node_to_partition, undo_partition): Use inline_summary
404 accessor.
10a5dd5d
JH
405 (ipa_node_duplication_hook): Fix declaration.
406 * Make-lang.in (lto.o): Update dependencies.
407
81f653d6
NF
4082011-04-12 Nathan Froyd <froydnj@codesourcery.com>
409
410 * lto-tree.h (union lang_tree_node): Check for TS_COMMON before
411 calling TREE_CHAIN.
412 * lto.c (lto_fixup_common): Likewise.
413
dcf0c47e
NF
4142011-04-08 Nathan Froyd <froydnj@codesourcery.com>
415
416 * lto-lang.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
417 (handle_type_generic_attribute): Likewise.
418
e89964e3
MM
4192011-04-03 Michael Matz <matz@suse.de>
420
421 * lto.c (lto_materialize_function): Don't read and then discard
422 sections in WPA mode.
423 (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get.
424
425 * lto-lang.c (registered_builtin_fndecls): Remove.
426 (lto_getdecls): Return NULL_TREE.
427 (lto_builtin_function): Don't remember in registered_builtin_fndecls.
428
d2b3fe18
RG
4292011-03-31 Richard Guenther <rguenther@suse.de>
430
431 PR lto/48246
432 * lto.c (lto_wpa_write_files): Disable assert for non-empty
433 partitions when checking is not enabled.
434
ba78087b
KT
4352011-03-25 Kai Tietz <ktietz@redhat.com>
436
437 * lto.c (lto_resolution_read): Use filename_cmp instead
438 of strcmp.
439 (lto_read_section_data): Likewise.
440
0edf1bb2
JL
4412011-03-25 Jeff Law <law@redhat.com>
442
443 * lto/lto-lang.c (def_fn_type): Add missing va_end.
444
62d784f7
KT
4452011-03-21 Kai Tietz <ktietz@redhat.com>
446
447 PR target/12171
448 * lto-lang.c (lto_attribute_table): Adjust table.
449
62dd9571
JJ
4502011-02-18 Jakub Jelinek <jakub@redhat.com>
451
452 PR bootstrap/47807
453 * Make-lang.in (lto/lto-lang.o): Depend on $(LTO_STREAMER_H) instead
454 of lto-streamer.h.
455
237d6259
RG
4562011-02-18 Richard Guenther <rguenther@suse.de>
457
458 PR lto/47798
459 * lto-tree.h (lto_global_var_decls): Do not declare here.
460 * lto-lang.c: Include lto-streamer.h.
461 * Make-lang.in (lto-lang.o): Adjust dependencies.
462
8ead2223
KT
4632011-02-10 Kai Tietz <kai.tietz@onevision.com>
464
465 PR lto/47241
466 * lto.c (lto_read_section_data): Free
467 fd_name in failure case.
468 For mingw targets don't hash file-descriptor.
469 (read_cgraph_and_symbols): Close current_lto_file
470 in failure case.
471
6e701822
JH
4722011-01-11 Jan Hubicka <jh@suse.cz>
473
474 PR lto/45721
475 PR lto/45375
b9843260
EB
476 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs
477 are not partitioned.
6e701822 478
f4da8dce
NF
4792010-12-22 Nathan Froyd <froydnj@codesourcery.com>
480
481 * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute):
482 Use prototype_p.
483
6b7fb143
RG
4842010-12-06 Richard Guenther <rguenther@suse.de>
485
486 PR lto/46796
487 * lto-lang.c (lto_init): Give names to basic types.
488
c59ffc41
JM
4892010-11-30 Joseph Myers <joseph@codesourcery.com>
490
491 * lto-object.c: Don't include toplev.h.
492 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
493
7c475d11
JM
4942010-11-30 Joseph Myers <joseph@codesourcery.com>
495
496 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
497 $(TOPLEV_H).
498
71f3e391
JM
4992010-11-29 Joseph Myers <joseph@codesourcery.com>
500
501 * lto-endian.h: Delete.
502 * lto-object.c: Don't include "libiberty.h".
503 (O_BINARY): Don't define.
504 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
505 (O_BINARY): Don't define.
506
9f1718b0
RG
5072010-11-23 Richard Guenther <rguenther@suse.de>
508
509 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
510
39c4e298
RG
5112010-11-23 Richard Guenther <rguenther@suse.de>
512
513 PR lto/46605
514 * lto.c (read_cgraph_and_symbols): Bail out after errors.
515
b37421c6
JM
5162010-11-17 Joseph Myers <joseph@codesourcery.com>
517
518 * lto.c (lto_main): Take no arguments.
519 * lto.h (lto_main): Update prototype.
520
d82f74d3
ILT
5212010-11-16 Ian Lance Taylor <iant@google.com>
522
523 * lto-object.c (lto_obj_file_open): Call
524 simple_object_attributes_merge rather than
525 simple_object_attributes_compare.
526
a4d8c676
JM
5272010-11-12 Joseph Myers <joseph@codesourcery.com>
528
529 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
530 * lto-lang.c (lto_handle_option): Take location_t parameter.
531
d8a07487
JM
5322010-11-10 Joseph Myers <joseph@codesourcery.com>
533
534 * lto.c (lto_resolution_read): Start diagnostics with lowercase
535 letters and remove trailing '.'.
536 (lto_file_finalize): Start diagnostic with a lowercase letter.
537
6b3456d1
ILT
5382010-11-02 Ian Lance Taylor <iant@google.com>
539
540 * lto-object.c: New file.
541 * lto-elf.c: Remove file.
542 * lto-macho.c: Remove file.
543 * lto-macho.h: Remove file.
544 * lto-coff.c: Remove file.
545 * lto-coff.h: Remove file.
546 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
547 lto/lto-object.o.
548 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
549 (lto/lto-objfile.o): New target.
550 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
551 (lto/lto.o): Remove $(LIBIBERTY_H).
552
030cd86c
JH
5532010-10-22 Jan Hubicka <jh@suse.cz>
554
555 * lto.c (add_cgraph_node_to_partition,
556 add_varpool_node_to_partition): Add debug info.
557 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
558 partitioned nodes.
559 (do_whole_program_analysis): Set function flags before dumping.
560
4490cae6
RG
5612010-10-22 Richard Guenther <rguenther@suse.de>
562
563 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
564 the new gimple_register_canonical_type.
565
703cdce3
L
5662010-10-20 H.J. Lu <hongjiu.lu@intel.com>
567
568 PR bootstrap/45954
569 * config-lang.in (boot_language): Set to $enable_lto.
570
1915c739
JJ
5712010-10-18 Jakub Jelinek <jakub@redhat.com>
572
573 PR lto/45638
574 * Make-lang.in (check-lto): New dummy target.
575
82971de5
EB
5762010-10-14 Eric Botcazou <ebotcazou@adacore.com>
577
578 * lto-elf.c (SHN_XINDEX): Define if not already defined.
579
a75bfaa6
JM
5802010-10-08 Joseph Myers <joseph@codesourcery.com>
581
582 * lto-lang.c (lto_init_options): Change to
583 lto_init_options_struct. Update parameters.
584 (LANG_HOOKS_INIT_OPTIONS): Don't define.
585 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
586
937f7f69
JH
5872010-10-06 Jan Hubicka <jh@suse.cz>
588
589 * lto.c (lto_balanced_map): Fix accounting of program size.
590
2169830c
JH
5912010-10-06 Jan Hubicka <jh@suse.cz>
592
593 * lto.c (lto_balanced_map): Do not produce empty partitions.
594
6e9bd0f8
AK
5952010-10-06 Andi Kleen <ak@linux.intel.com>
596
597 * lto.c (lto_process_name): Add.
598 (lto_main): Call lto_process_name.
599
06ed016f
JH
6002010-10-06 Jan Hubicka <jh@suse.cz>
601
602 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
603 COMDATs required by the linker.
604
ae718d66
ILT
6052010-10-05 Ian Lance Taylor <iant@google.com>
606
607 * lto.c (lto_section_with_id): Make s a const pointer.
608
852e4bd2
JH
6092010-10-05 Jan Hubicka <jh@suse.cz>
610
611 * lto.c: Include params.h.
612 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
613 refcounting in aux field.
614 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
615 New functions.
616 (lto_1_to_1_map): Simplify.
617 (lto_balanced_map): New function.
618 (do_whole_program_analysis): Chose proper partitioning alg.
619 * Make-lang.in (lto.o): Add dependency on params.h
620
a90163e9
AK
6212010-10-04 Andi Kleen <ak@linux.intel.com>
622
623 * Make-lang.in (lto1): Add + to build rule.
624
f1e92a43
AK
6252010-10-03 Andi Kleen <ak@linux.intel.com>
626
627 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
628 with fatal_error.
629
0d6e14fd
JH
6302010-09-28 Jan Hubicka <jh@suse.cz>
631
632 * lto-lang.c (handle_leaf_attribute): New function.
633 (lto_attribute_tables): Add leaf.
634
fb462383
JZ
6352010-09-25 Jie Zhang <jie@codesourcery.com>
636
637 * lto.c (lto_read_all_file_options): Start a new line after
638 printing out file names.
639
051f8cc6
JH
6402010-09-24 Jan Hubicka <jh@suse.cz>
641
642 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
643
64e0f5ff
JH
6442010-09-20 Jan Hubicka <jh@suse.cz>
645
646 PR tree-optimize/45605
647 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
648
a929ec3d
GP
6492010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
650
651 * lto-elf.c (lto_obj_file_open): Also provide filename when
652 elf_begin fails.
653
4c588abf
JH
6542010-09-17 Jan Hubicka <jh@suse.cz>
655
656 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
657
c3224d6f
RG
6582010-09-17 Richard Guenther <rguenther@suse.de>
659
660 * lang.opt (flag_wpa): Also enable for the driver.
661
52b3b3c7
JH
6622010-09-16 Jan Hubicka <jh@suse.cz>
663
664 * lto.c (lto_materialize_function): Do not tamper with STATIC and
665 EXTERNAL flags.
666
969c37b7
LB
6672010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
668
669 * lto-tree.h (struct lang_type): Add variable_size GTY option.
670
098a4f50
JH
6712010-09-08 Jan Hubicka <jh@suse.cz>
672
673 * lto.c (real_file_count, real_file_decl_data): New static vars.
674 (read_cgraph_and_symbols): Use it.
675
0f443ad0
RG
6762010-09-08 Richard Guenther <rguenther@suse.de>
677
678 * lto.c (read_cgraph_and_symbols): Collect again after each
679 file.
680
ee187353
JH
6812010-09-07 Jan Hubicka <jh@suse.cz>
682
683 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
684
b3ec52d0
RG
6852010-09-03 Richard Guenther <rguenther@suse.de>
686
687 * lto-elf.c (validate_file): Always error if validation fails.
688
f1395d4a
JH
6892010-08-20 Jan Hubicka <jh@suse.cz>
690
691 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
692 (lto_wpa_write_files): Update comments.
693
2429bce3
L
6942010-08-20 H.J. Lu <hongjiu.lu@intel.com>
695
696 PR bootstrap/45357
697 * lto.c (lto_materialize_function): Replace has_analyzed_clone
698 with has_analyzed_clone_p.
699
e0f967db
JH
7002010-08-20 Jan Hubicka <jh@suse.cz>
701
702 * lto.c (has_analyzed_clone_p): New function
703 (lto_materialize_function): Use callgraph to determine if
704 body is needed.
705 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
706
ac47786e
NF
7072010-08-20 Nathan Froyd <froydnj@codesourcery.com>
708
709 * lto.c: Use FOR_EACH_VEC_ELT.
710
d720b869
AK
7112010-07-27 Andi Kleen <ak@linux.intel.com>
712
713 * Make-lang.in (lto.o): Add dependency to splay-tree.h
714
5f20c657
JM
7152010-07-27 Joseph Myers <joseph@codesourcery.com>
716
717 * lto-lang.c (lto_handle_option): Update prototype and return
718 value type. Remove duplicate assignment to result.
719
7a9bf9a4
JM
7202010-07-27 Joseph Myers <joseph@codesourcery.com>
721
722 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
723 New.
724 (lto_init_options): Update prototype.
725 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
726 Define.
727
73ce4d1e
AK
7282010-07-10 Andi Kleen <ak@linux.intel.com>
729
730 PR lto/44992
731 * lto.c: Include splay-tree.h
732 (lto_resolution_read): Change to walk file_ids tree and parse
733 extra file_id in resolution file.
734 (lto_section_with_id): Add.
735 (create_subid_section_table): Add.
736 (lwstate): Add.
737 (lto_create_files_from_ids): Add.
738 (lto_file_read): Change to handle sub file ids and create list
739 of file_datas. Add output argument for count.
740 (get_section_data): Pass file_data to lto_get_section_name.
741 (lto_flatten_file): Add.
742 (read_cgraph_and_symbols): Handle linked lists of file_datas.
743
2994ee14
AK
7442010-07-10 Andi Kleen <ak@linux.intel.com>
745
746 * lto-coff.c (hash_name, eq_name): Move.
747 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
748 * lto-elf.c: (hash_name, eq_name): Move.
749 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
750 * lto-macho.c: (hash_name, eq_name): Move.
751 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
752 * lto.c: (hash_name, eq_name): Move from lto-*.c
753 (lto_obj_create_section_hash_table): Add.
754 (free_with_string): Add.
755
718f9c0f
MLI
7562010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
757
758 * lto-coff.c: Include diagnostic-core.h in every file that
759 includes toplev.h.
760 * lto-elf.c: Likewise.
761 * lto-lang.c: Likewise.
762 * lto-macho.c: Likewise.
763
1b137837
JJ
7642010-07-07 Jakub Jelinek <jakub@redhat.com>
765
766 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
767 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
768 objects.
769
92eb4438
JH
7702010-07-05 Jan Hubicka <jh@suse.cz>
771
772 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
773 nodes from same comdat group as well as all comdat functions referenced
774 here.
b9843260
EB
775 (add_varpool_node_to_partition, add_references_to_partition): New
776 function.
777 (lto_1_1_map): Skip COMDAT fnctions/variables; use
778 add_varpool_node_to_partition; clear aux flags when done.
779 (lto_promote_cross_file_statics): Do not promote stuff that gets
780 duplicated to each ltrans.
92eb4438 781
a05541a9
JH
7822010-07-04 Jan Hubicka <jh@suse.cz>
783
784 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
785
4a2ac96f
RG
7862010-06-13 Richard Guenther <rguenther@suse.de>
787
788 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
789
1d536046
KT
7902010-06-09 Kai Tietz <kai.tietz@onevision.com>
791
792 * lto.c (lto_resolution_read): Pre-initialize local variable r.
793 * lto-coff.c (coff_write_object_file): Add braces to if.
794
a9429e29
LB
7952010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
796
797 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
798 (lto_file_read): Likewise.
799 (new_partition): Likewise.
800 (read_cgraph_and_symbols): Likewise.
801
5498f011
JM
8022010-06-07 Joseph Myers <joseph@codesourcery.com>
803
804 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
805 (lto_handle_option): Don't set flag_signed_char here.
806
d4c0c9f6
RG
8072010-06-04 Richard Guenther <rguenther@suse.de>
808
809 PR lto/41584
810 * lto.c (lto_1_to_1_map): Use the proper file_data for
811 varpool nodes.
812
0a5fa5a1
JH
8132010-05-30 Jan Hubicka <jh@suse.cz>
814
815 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
816 partitioning decisions.
817
9eec9488
JH
8182010-05-29 Jan Hubicka <jh@suse.cz>
819
820 * lto.c (bitmap vector): Remove.
821 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
822 (ltrans_partition_def): New structure.
823 (ltrans_partition): New type and VECtor.
824 (new_partition): New function.
825 (add_cgraph_node_to_partition): New function.
826 (lto_1_to_1_map): Reorganize for partitions.
827 (lto_add_inline_clones): Remove.
828 (lto_add_all_inlinees): Remove.
829 (lto_promote_cross_file_statics): Use partitions.
830 (cmp_partitions): New function.
831 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
832 use partitions; output files sorted by size.
833
3e097227
SB
8342010-05-29 Steven Bosscher <steven@gcc.gnu.org>
835
836 * Make-lang.in: Replace vec.h dependency with VEC_H.
837
7ca92787
JM
8382010-05-28 Joseph Myers <joseph@codesourcery.com>
839
840 * lto-coff.c (coff_errmsg): Remove.
841 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
842 errors instead of coff_errmsg (-1).
843 * lto-macho.c (mach_o_errmsg): Remove.
844 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
845 instead of mach_o_errmsg (-1).
846 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
847 xstrerror (errno).
848
b5611987
RG
8492010-05-28 Richard Guenther <rguenther@suse.de>
850
851 * lto.c (prefix_name_with_star): Removed.
852 (strip_extension): Likewise.
853 (get_filename_for_set): Likewise.
854 (lto_write_ltrans_list): Fold into ...
855 (lto_wpa_write_files): ... this. Name LTRANS units
856 by suffixing the ltrans output list filename.
857 (do_whole_program_analysis): Adjust.
858
1da2ed5f
JM
8592010-05-27 Joseph Myers <joseph@codesourcery.com>
860
861 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
862 (read_cgraph_and_symbols, lto_main): Use seen_error.
863 * Make-lang.in (lto/lto.o): Update dependencies.
864
7951d88a
EB
8652010-05-27 Eric Botcazou <ebotcazou@adacore.com>
866
867 PR lto/44230
868 * lto.h (lto_eh_personality): New prototype.
869 * lto.c: Include debug.h.
870 (first_personality_decl): New static variable.
871 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
872 first function for which it is non-null.
873 (lto_eh_personality_decl): New static variable.
874 (lto_eh_personality): New function.
875 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
876 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
877
e12da9c2
SB
8782010-05-26 Steven Bosscher <steven@gcc.gnu.org>
879
880 * lto-lang.c: Do not include expr.h.
881
468194f4
RG
8822010-05-24 Richard Guenther <rguenther@suse.de>
883
884 * lto-elf.c (lto_obj_build_section_table): Work around
885 FreeBSD libelf issue.
886
bd9eb5da
RG
8872010-05-22 Richard Guenther <rguenther@suse.de>
888
889 * lto.c (read_cgraph_and_symbols): Do not collect.
890
66576e1b
JH
8912010-05-20 Jan Hubicka <jh@suse.cz>
892
893 * lto.c (promote_var, promote_fn): New functions.
894 (lto_promote_cross_file_statics): Compute correctly boundary including
895 static initializers of readonly vars.
896
36576655
JH
8972010-05-18 Jan Hubicka <jh@suse.cz>
898
66576e1b 899 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
900 (lto_promote_cross_file_statics): Deal with non-inline clones.
901
28632d63
JH
9022010-05-18 Jan Hubicka <jh@suse.cz>
903
904 * lto.c (lto_materialize_function): Announce function when
905 reading body; allocate_struct_function only when reading body;
906 do not finalize local statics; ggc_collect after reading;
907 do not mark reachable node.
908 (materialize_cgraph): Do not announce function.
909
33e42d56
JH
9102010-05-11 Jan Hubicka <jh@suse.cz>
911
912 * lto.c (materialize_cgraph): Revert my previous patch.
913
f6430ea5
KT
9142010-05-11 Kai Tietz <kai.tietz@onevision.com>
915
916 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
917 IMAGE_FILE_MACHINE_AMD64.
918 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
919
0a0b07b7
JH
9202010-05-11 Jan Hubicka <jh@suse.cz>
921
922 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
923 (materialize_cgraph): Add it here.
924
9a809897
JH
9252010-05-11 Jan Hubicka <jh@suse.cz>
926
927 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
928 vector.
929
9302010-05-11 Jan Hubicka <jh@suse.cz>
931
932 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
933 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
934 use reachable_from_other_partition_p and
935 referenced_from_other_partition_p test.
936
94f64249
KT
9372010-05-11 Kai Tietz <kai.tietz@onevision.com>
938
939 * lto-coff.c (validate_file): Add x64-coff support.
940 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
941 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
942 * lto-lang.c (lto_build_c_type_nodes): Add check for
943 'long long unsigned int' for x64-windows.
944 (lto_init): Likewise.
945
946
c082f9f3
SB
9472010-05-07 Steven Bosscher <steven@gcc.gnu.org>
948
949 * lto.h (struct lto_file_struct): Document offset member.
950 * lto-endian.h: New file.
951 * lto-macho.h: New file.
952 * lto-macho.c: New file.
953 * Make-lang.in: Add rule for lto-macho.o.
954
5cd0e96b
RG
9552010-05-07 Richard Guenther <rguenther@suse.de>
956
957 PR lto/43857
958 PR lto/43371
959 * lang.opt (fresolution): Change to ...
960 (fresolution=): ... this.
961 * lto-lang.c (lto_handle_option): Adjust.
962
48cf395b
RB
9632010-05-07 Richard Guenther <rguenther@suse.de>
964
965 * lto.c (DUMPBASE_SUFFIX): Remove.
966 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
967 Rename to ...
968 (lto_write_ltrans_list): ... only output the list of ltrans files.
969 (lto_maybe_unlink): Remove.
970 (do_whole_program_analysis): Do not execute LTRANS phase
971 from here.
972
afa83c15
L
9732010-05-06 H.J. Lu <hongjiu.lu@intel.com>
974
975 * lto-lang.c (lto_handle_option): Add argument kind.
976
369451ec
JH
9772010-05-05 Jan Hubicka <jh@suse.cz>
978
48cf395b
RB
979 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
980 refs.
369451ec 981
2f41ecf5
JH
9822010-05-05 Jan Hubicka <jh@suse.cz>
983
984 * lto.c (lto_1_to_1_map): Partition only needed nodes.
985
ace72c88
JH
9862010-04-30 Jan Hubicka <jh@suse.cz>
987
b9843260
EB
988 * lto.c (get_filename_for_set): Look for cgraph node and if none found,
989 use default name.
ace72c88
JH
990 (lto_wpa_write_files): Write any non-empty partition.
991
05575e07
JH
9922010-04-30 Jan Hubicka <jh@suse.cz>
993
994 * lto.c: Do not attempt to make constant pool references global.
995
49ba8180
JH
9962010-04-28 Jan Hubicka <jh@suse.cz>
997
998 * lto/lto.c (lto_read_in_decl_state): Use GGC.
999 (lto_wpa_write_files): Announce what we are writting.
1000 (all_file_decl_data): New.
1001 (read_cgraph_and_symbols): Use GGC; correct timevars.
1002 (do_whole_program_analysis): Collect.
1003 * lto/Make-lang.in (lto.o): Fix dependency.
1004 * Makefile.in (GTFILES): Add lto-streamer.h.
1005 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
1006 (varpool_assemble_pending_decls): Use VAROUT.
1007 * lto-streamer.h (lto_tree_ref_table): Annotate.
1008 (lto_in_decl_state): Annotate.
1009 (lto_file_decl_data): Annotate.
1010
2942c502
JH
10112010-04-28 Jan Hubicka <jh@suse.cz>
1012
1013 * lto.c (lto_varpool_node_sets): New.
1014 (lto_1_to_1_map): Partition varpool too.
1015 (globalize_context_t, globalize_cross_file_statics,
1016 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
1017 lto_scan_statics_in_remaining_global_vars): Remove.
1018 (lto_promote_cross_file_statics): Rewrite.
1019 (get_filename_for_set): Take vset argument.
1020 (lto_wpa_write_files): Pass around vsets.
1021
3bec79c5
DK
10222010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
1023
1024 PR lto/42776
1025 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
1026 hardcoding 'lto-elf.o'.
1027 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
1028
1029 * lto-coff.h: New file.
1030 * lto-coff.c: Likewise.
1031
21aac880
RG
10322010-04-26 Richard Guenther <rguenther@suse.de>
1033
1034 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
1035
2cee0101
DK
10362010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
1037
1038 * lto.h (lto_elf_file_open): Rename prototype from this ...
1039 (lto_obj_file_open): ... to this.
1040 (lto_elf_file_close): Likewise ...
1041 (lto_obj_file_close): ... and likewise.
1042 (lto_elf_build_section_table): Likewise ...
1043 (lto_obj_build_section_table): ... and likewise.
1044 (lto_elf_begin_section): Likewise ...
1045 (lto_obj_begin_section): ... and likewise.
1046 (lto_elf_append_data): Likewise ...
1047 (lto_obj_append_data): ... and likewise.
1048 (lto_elf_end_section): Likewise ...
1049 (lto_obj_end_section): ... and likewise.
1050 * lto.c (lto_file_read): Update references to the above.
1051 (lto_wpa_write_files): Likewise.
1052 (lto_read_all_file_options): Likewise.
1053 (read_cgraph_and_symbols): Likewise.
1054 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
1055 (LANG_HOOKS_APPEND_DATA): Likewise.
1056 (LANG_HOOKS_END_SECTION): Likewise.
1057 * lto-elf.c (lto_elf_file_open): Rename from this ...
1058 (lto_obj_file_open): ... to this, updating any references.
1059 (lto_elf_file_close): Likewise ...
1060 (lto_obj_file_close): ... and likewise.
1061 (lto_elf_build_section_table): Likewise ...
1062 (lto_obj_build_section_table): ... and likewise.
1063 (lto_elf_begin_section): Likewise ...
1064 (lto_obj_begin_section): ... and likewise.
1065 (lto_elf_append_data): Likewise ...
1066 (lto_obj_append_data): ... and likewise.
1067 (lto_elf_end_section): Likewise ...
1068 (lto_obj_end_section): ... and likewise.
1069
bc58d7e1
JH
10702010-04-21 Jan Hubicka <jh@suse.cz>
1071
1072 * lto.c (lto_fixup_tree): Do not call wpa fixup.
1073 (materialize_cgraph): Likewise.
1074
e792884f
JH
10752010-04-21 Jan Hubicka <jh@suse.cz>
1076
1077 * lto.c (lto_wpa_write_files): Update.
1078 (read_cgraph_and_symbols): Be more verbose.
1079 (materialize_cgraph): Likewise.
1080 (do_whole_program_analysis): Likewise.
1081
c9945504
JH
10822010-04-21 Jan Hubicka <jh@suse.cz>
1083
1084 * lto.c (globalize_cross_file_statics): When function has address taken,
1085 it needs to be public.
1086
a837268b
JH
10872010-04-20 Jan Hubicka <jh@suse.cz>
1088
1089 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
1090 (lto_add_all_inlinees): Likewise.
1091 (lto_wpa_write_files): Likewise.
1092
3b9e5d95
EB
10932010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1094
1095 * lto-lang.c (lto_init): Remove second argument in call to
1096 build_common_tree_nodes.
1097
8ccb78f2
RO
10982010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1099
1100 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
1101 function.
1102
2f9b99e6
EB
11032010-03-09 Eric Botcazou <ebotcazou@adacore.com>
1104
1105 PR bootstrap/43276
1106 * lto-elf.c: Define EM_* constants if not already defined.
1107
bef7d288
EB
11082010-03-03 Eric Botcazou <ebotcazou@adacore.com>
1109
1110 * lto-elf.c (is_compatible_architecture): New static function.
1111 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
1112
f68df07c
RG
11132010-02-11 Richard Guenther <rguenther@suse.de>
1114
1115 PR driver/43021
1116 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
1117 appropriately.
1118
3cdea2b4
AH
11192010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
1120
1121 * lto.c (O_BINARY): Define.
1122 (lto_read_section_data): Open file in binary mode.
1123 * lto-elf.c (O_BINARY): Define.
1124 (lto_elf_file_open): Open file in binary mode.
1125
c59449fa
RG
11262010-01-08 Richard Guenther <rguenther@suse.de>
1127
1128 PR lto/42528
1129 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
1130 (lto_init): Do not init char_type_node in a standard way
1131 but according to flag_signed_char.
1132
d7fb0a6d
L
11332010-01-03 H.J. Lu <hongjiu.lu@intel.com>
1134
1135 PR lto/41564
1136 * lto.c (DUMPBASE_SUFFIX): New.
1137 (lto_execute_ltrans): Append a sequence number to -dumpbase
1138 for LTRANS.
1139
78ce4053
L
11402010-01-02 H.J. Lu <hongjiu.lu@intel.com>
1141
1142 PR lto/42580
1143 * lto-elf.c (lto_elf_file_open): Stop if the command line
1144 option file is missing.
1145
2a71eb48
RG
11462009-12-15 Richard Guenther <rguenther@suse.de>
1147
1148 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
1149 (lto_post_options): Do not disable debuginfo.
1150
a818bca1
DG
11512009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
1152
1153 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
1154
e7d00517
RG
11552009-12-11 Richard Guenther <rguenther@suse.de>
1156
1157 PR lto/42037
1158 * lto.c (lto_resolution_read): Properly grow the vector.
1159
1ab53893
RG
11602009-12-11 Richard Guenther <rguenther@suse.de>
1161
1162 PR lto/41915
1163 * lto-lang.c (lto_init_options): Initialize flag_complex_method
1164 to the C99 default. Do not set flag_unit_at_a_time.
1165
0f900dfa
JJ
11662009-11-28 Jakub Jelinek <jakub@redhat.com>
1167
1168 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
1169 variable.
1170
92fa7608
RAE
11712009-11-19 Rafael Avila de Espindola <espindola@google.com>
1172
1173 PR bootstrap/42096
1174 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
1175 * lto.c (lto_parse_hex): New.
1176 (lto_resolution_read): Use lto_parse_hex.
1177 * lto.h (lto_parse_hex): New.
1178
9870fe4f
RAE
11792009-11-17 Rafael Avila de Espindola <espindola@google.com>
1180
1181 * lto-elf.c (lto_file_init): Add offset argument.
1182 (lto_elf_file_open): Record the offset.
1183 * lto.c (lto_resolution_read): Change file_name into a lto_file
1184 argument. Check offsets.
1185 (lto_file_read): Update call to lto_resolution_read.
1186 * lto.h (lto_file_struct): Add the offset field.
1187
1b70729f
RAE
11882009-11-16 Rafael Avila de Espindola <espindola@google.com>
1189
1190 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
1191
0e3776db
JH
11922009-11-14 Jan Hubicka <jh@suse.cz>
1193
1194 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
1195
06bd7f56
RAE
11962009-11-12 Rafael Avila de Espindola <espindola@google.com>
1197
1198 * lang.opt (fresolution): Renamed from resolution.
1199 * lto-lang.c (lto_handle_option): Handle new option name.
1200 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
1201
7e9dc421
RG
12022009-11-04 Richard Guenther <rguenther@suse.de>
1203 Rafael Avila de Espindola <espindola@google.com>
1204
1205 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
1206 (lto_elf_file_open): Handle offsets in arguments name@offest.
1207
b207f900
RG
12082009-10-30 Richard Guenther <rguenther@suse.de>
1209
1210 PR lto/41858
1211 * lto.c (lto_file_read): Do not set file_data->fd.
1212 (lto_read_section_data): Use a single-entry file-descriptor cache.
1213 Do not check the result of xmalloc.
1214 (free_section_data): Do not use file_data->fd.
1215 (lto_read_all_file_options): Likewise.
1216
2c928155
RG
12172009-10-22 Richard Guenther <rguenther@suse.de>
1218
1219 * lto.c (lto_fixup_jump_functions): Remove.
1220 (lto_fixup_decls): Do not fixup jump functions.
1221 (read_cgraph_and_symbols): Schedule cgraph merging after
1222 summary reading. Schedule type and decl fixup before
1223 summary reading.
1224
f9c91f8a
RB
12252009-10-22 Richard Guenther <rguenther@suse.de>
1226
1227 * lto.c (lto_fixup_data_t): Remove free_list member.
1228 (lto_fixup_tree): Do not insert into free_list.
1229 (free_decl): Remove.
1230 (lto_fixup_decls): Remove free-list handling.
1231
fb3f88cc
JH
12322009-10-22 Jan Hubicka <jh@suse.cz>
1233
1234 * lto.c (lto_fixup_jump_functions): New function.
1235 (lto_fixup_decls): Use it.
1236
35f1e9f4
RG
12372009-10-16 Richard Guenther <rguenther@suse.de>
1238
1239 PR lto/41715
1240 * lto.c (lto_fixup_tree): Revert last change.
1241
200c8750
RG
12422009-10-14 Richard Guenther <rguenther@suse.de>
1243
1244 * lto.c (lto_fixup_tree): In case the prevailing decl is not
1245 compatible with the one we replace wrap it around a
1246 VIEW_CONVERT_EXPR.
1247
b1b07c92
RG
12482009-10-09 Richard Guenther <rguenther@suse.de>
1249
1250 PR lto/41635
1251 PR lto/41636
1252 * lto.c (read_cgraph_and_symbols): Do not assert we can open
1253 a file.
1254 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
1255 (init_ehdr##BITS): Likewise.
1256
3c2e7d45
JM
12572009-10-08 Joseph Myers <joseph@codesourcery.com>
1258
1259 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
1260 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
1261 diagnostics.
1262 * lto-lang.c (lto_post_options): Remove trailing "." from
1263 diagnostics.
1264
0d0bfe17
RG
12652009-10-08 Richard Guenther <rguenther@suse.de>
1266
1267 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
1268 hash tables.
1269
4bedf19a
JM
12702009-10-07 Joseph Myers <joseph@codesourcery.com>
1271
1272 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
1273
b20996ff
JH
12742009-10-07 Jan Hubicka <jh@suse.cz>
1275
1276 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
1277 ltrans stage; explain why this is needed and should not.
1278
1a735925
RG
12792009-10-05 Richard Guenther <rguenther@suse.de>
1280
1281 PR lto/41552
1282 PR lto/41487
1283 * lto.c (lto_read_decls): Do not register deferred decls.
1284 (read_cgraph_and_symbols): Delay symbol and cgraph merging
1285 until after reading the IPA summaries.
1286
d7f09764
DN
12872009-10-02 Rafael Avila de Espindola <espindola@google.com>
1288
1289 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
1290 (lto-lang.c): Don't include lto/common.h.
1291
12922009-10-02 Rafael Avila de Espindola <espindola@google.com>
1293
1294 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
1295 (lto/common.o): Remove.
1296 * common.c: Remove.
1297 * common.h (lto_kind_str): Remove.
1298 (lto_visibility_str): Remove.
1299 (lto_resolution_str): Make it static.
1300
13012009-10-01 Diego Novillo <dnovillo@google.com>
1302
1303 * lto.c (lto_read_decls): Add comment.
1304 Call internal_error instead of gcc_assert.
1305 (lto_resolution_read): Likewise.
1306 (lto_add_all_inlinees): Tidy.
1307 * Make-lang.in: Fix copyright boilerplate.
1308 (lto.pdf): New.
1309 (lto.install-pdf): New.
1310 * lto-tree.h: Fix copyright boilerplate.
1311 * lang-specs.h: Likewise.
1312 Remove ".lto" entry from compilers fragment.
1313 * lto-elf.c: Move inclusion of gelf.h after config.h.
1314 Tidy formatting everywhere.
1315 * lto.h: Fix copyright boilerplate.
1316 Tidy formatting everywhere.
1317 * common.c: Likewise.
1318 * config-lang.in: Likewise.
1319 * common.h: Likewise.
1320 * lto-lang.c: Likewise.
1321
13222009-10-01 Richard Guenther <rguenther@suse.de>
1323
1324 * lto.c (lto_read_section_data): Use plain lseek/read.
1325
13262009-10-01 Richard Guenther <rguenther@suse.de>
1327
1328 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
1329 use sysconf to query the system page size.
1330 (lto_file_read): Implement fallback using stdio.
1331 (free_section_data): Likewise.
1332
13332009-09-29 Diego Novillo <dnovillo@google.com>
1334
1335 * lto-lang.c (lto_init): Really fix call to
1336 build_common_builtin_nodes.
1337
13382009-09-29 Diego Novillo <dnovillo@google.com>
1339
1340 * lto-lang.c (lto_init): Fix call to
1341 build_common_builtin_nodes.
1342
13432009-09-29 Richard Guenther <rguenther@suse.de>
1344
1345 PR lto/40754
1346 * lto-elf.c (init_shdr##BITS): Properly specify alignment
1347 in bytes.
1348 (first_data_block): New static variable.
1349 (lto_elf_append_data): Align the first data block in each
1350 section.
1351
13522009-09-28 Diego Novillo <dnovillo@google.com>
1353
1354 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
1355 * lto.c (strip_extension): New.
1356 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
1357 (lto_execute_ltrans): Tidy.
1358 Do not pass -fwpa nor -fltrans-* to LTRANS.
1359 * opts.c: Tidy formatting and remove stale FIXME lto markers.
1360 * tree.c (need_assembler_name_p): Call
1361 lang_hooks.decls.may_need_assembler_name_p if set.
1362 * varasm.c (default_binds_local_p_1): Remove check for
1363 flag_ltrans.
1364 * varpool.c (decide_is_variable_needed): Do not test for
1365 in_lto_p.
1366
13672009-09-22 Richard Guenther <rguenther@suse.de>
1368
1369 PR lto/39276
1370 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
1371 * Make-lang.in: Remove ltrans-driver stuff.
1372 * config-lang.in: Likewise.
1373 * lang.opt (fltrans-driver): Remove.
1374 * lto-lang.c (lto_init_options): Remove code initializing
1375 ltrans_driver.
1376 * ltrans-driver: Remove.
1377
13782009-09-21 Diego Novillo <dnovillo@google.com>
1379
1380 * lto-lang.c (lto_define_builtins): Remove superfluous
1381 calls to targetm.init_builtins and build_common_builtin_nodes.
1382 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
1383 build_common_builtin_nodes.
1384 * lto.c (lto_materialize_function): Do nothing if NODE is a
1385 clone.
1386
13872009-09-03 Diego Novillo <dnovillo@google.com>
1388
1389 * lto-elf.c (validate_file): Replace call to
1390 elf_getshstrndx with call to elf_getshdrstrndx.
1391
13922009-08-19 Richard Guenther <rguenther@suse.de>
1393
1394 * lto-lang.c (lto_init): Merge char_type_node with the
1395 appropriately signed variant.
1396
13972009-08-19 Richard Guenther <rguenther@suse.de>
1398
1399 PR lto/41071
1400 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
1401 (lto_fixup_type): Re-build the pointer-to chain part two.
1402
14032009-08-19 Richard Guenther <rguenther@suse.de>
1404
1405 PR lto/41071
1406 * lto.c (lto_fixup_type): Re-build the type variant chain.
1407
14082009-08-19 Richard Guenther <rguenther@suse.de>
1409
1410 PR lto/41071
1411 * lto.c (lto_fixup_constructor): New function.
1412 (lto_fixup_tree): Replace all types. Properly fixup
1413 constructors and constants.
1414
14152009-08-14 Richard Guenther <rguenther@suse.de>
1416
1417 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
1418 for DECL_LANG_SPECIFIC.
1419
14202009-08-13 Richard Guenther <rguenther@suse.de>
1421
1422 PR lto/41032
1423 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
1424
14252009-07-30 Richard Guenther <rguenther@suse.de>
1426
1427 PR lto/40903
1428 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
1429 the largest decl for output and free TREE_CHAIN for further
1430 use.
1431
14322009-07-24 Diego Novillo <dnovillo@google.com>
1433
1434 * Make-lang.in: Add empty lto.install-plugin target.
1435
14362009-07-13 Diego Novillo <dnovillo@google.com>
1437
1438 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
1439
14402009-07-11 Richard Guenther <rguenther@suse.de>
1441
1442 * lto-lang.c (lto_write_globals): Wrapup global decls.
1443
14442009-07-10 Richard Guenther <rguenther@suse.de>
1445
1446 * lto-lang.c (lto_init): Allocate one more location to make
1447 BUILTINS_LOCATION correct.
1448
14492009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1450
1451 * lto.c (free_section_data): Cast computed_offset to caddr_t.
1452
14532009-07-06 Diego Novillo <dnovillo@google.com>
1454
1455 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
1456 TYPE_SIZE_UNIT.
1457
14582009-07-06 Diego Novillo <dnovillo@google.com>
1459
1460 * lto.c (preload_common_nodes): Remove.
1461 (lto_read_in_decl_state): Call lto_streamer_cache_get.
1462 (lto_read_decls): Call lto_data_in_create and
1463 lto_data_in_delete.
1464 (free_decl): Do not call ggc_free.
1465 (lto_main): Call lto_init_reader.
1466 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
1467 (lto_init): Initialize main_identifier_node if needed.
1468 Make ptrdiff_type_node be integer_type_node.
1469
14702009-06-19 Diego Novillo <dnovillo@google.com>
1471
1472 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
1473 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
1474 Remove code guarded by #ifdef LOCAL_TRACE.
1475
14762009-06-18 Diego Novillo <dnovillo@google.com>
1477
1478 * lto.c: Update license to GPLv3.
1479 * lto-elf.c: Likewise.
1480 * common.c: Likewise.
1481 * lto-lang.c: Likewise.
1482 * lto.h: Remove superfluous include files. Update all
1483 users.
1484
14852009-06-17 Diego Novillo <dnovillo@google.com>
1486
1487 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
1488
14892009-06-02 Diego Novillo <dnovillo@google.com>
1490
1491 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
1492 read in.
1493 (materialize_cgraph): Only materialize nodes that have a
1494 representation on file.
1495
14962009-06-01 Diego Novillo <dnovillo@google.com>
1497
1498 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
1499
15002009-05-31 Diego Novillo <dnovillo@google.com>
1501
1502 * lto-lang.c (lto_type_for_mode): Handle all the modes
1503 handled in c_common_type_for_mode.
1504
15052009-05-21 Diego Novillo <dnovillo@google.com>
1506
1507 * lto-elf.c: Always include <gelf.h>.
1508 * config-lang.in (target_libs): Remove.
1509 (build_by_default): Set to no.
1510
15112009-05-15 Diego Novillo <dnovillo@google.com>
1512
1513 * lto.c (lto_materialize_function): Assert that DECL is
1514 not a builtin.
1515 (materialize_cgraph): Don't try to materialize builtin
1516 functions.
1517 * lto-section-out.c (write_symbol_vec): Do not write
1518 builtin functions.
1519
15202009-05-13 Diego Novillo <dnovillo@google.com>
1521
1522 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
1523
15242009-05-07 Diego Novillo <dnovillo@google.com>
1525
1526 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
1527 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
1528 (lto_fixup_type): Call it for TYPE_POINTER_TO,
1529 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
1530 (lto_fixup_tree): Call gimple_register_type when *TP is a
1531 type.
1532 (lto_main): Call bitmap_obstack_initialize.
1533
15342009-04-22 Diego Novillo <dnovillo@google.com>
1535
1536 * lto.c (free_section_data): Tidy.
1537 (lto_1_to_1_map): Tidy.
1538 (lto_add_all_inlinees): Tidy.
1539 (prefix_name_with_star): New.
1540 (get_filename_for_set): New.
1541 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
1542 to determine what cgraph node sets to write.
1543 Call get_filename_for_set to compute temporary file
1544 names.
1545 (lto_execute_ltrans): Do not execute LTRANS on files with
1546 names that start with '*'.
1547 Move logic to execute LTRANS together so that LTRANS is
1548 invoked only if there are any files to compile.
1549 (do_whole_program_analysis): Only remove output files
1550 that do not start with '*'.
1551
15522009-04-06 Diego Novillo <dnovillo@google.com>
1553
1554 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
1555 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
1556 (lto_add_all_inlinees): Tidy.
1557
15582009-03-26 Diego Novillo <dnovillo@google.com>
1559
1560 * lto.c: Include gimple.h.
1561 (lto_read_in_decl_state): Call gimple_register_type for
1562 every type in every stream.
1563 (lto_fixup_common): Call gimple_register_type if T has a
1564 type.
1565 (do_whole_program_analysis): Call print_lto_report.
1566 (lto_main): Call print_lto_report after cgraph_optimize.
1567 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
1568
15692009-03-24 Diego Novillo <dnovillo@google.com>
1570
1571 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
1572 (lto.o): Add dependency on GIMPLE_H.
1573
15742009-03-10 Simon Baldwin <simonb@google.com>
1575
1576 * lto.c (lto_read_all_file_options): Close any open file descriptor
1577 contained in file_data before freeing.
1578
15792009-02-24 Rafael Avila de Espindola <espindola@google.com>
1580
1581 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1582 for a decl in the original bitmap, not a node.
1583 (lto_add_all_inlinees): Remove original nodes that are not needed.
1584 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1585
15862009-02-24 Diego Novillo <dnovillo@google.com>
1587
1588 * lto.c (lto_materialize_function): Update
1589 lto_stats.num_function_bodies.
1590 (get_section_data): Initialize *LEN to 0.
1591 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
1592 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
1593 Update lto_stats.num_output_files.
1594 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
1595 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
1596 (lto_main): Initialize lto_stats.
1597 If flag_lto_report is set, call print_lto_report.
1598
15992009-02-19 Diego Novillo <dnovillo@google.com>
1600
1601 Revert
1602
1603 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
1604
1605 * lto.c (lto_add_inline_clones): Don't add the
1606 master clone. Check for a decl in the original
1607 bitmap, not a node.
1608 (lto_add_all_inlinees): Remove original nodes
1609 that are not needed.
1610 (lto_scan_statics_in_cgraph_node): Don't care if
1611 the node is the master.
1612 (lto_promote_cross_file_statics): Use a new
1613 context.seen_node_decls for each set
1614
16152009-02-19 Rafael Avila de Espindola <espindola@google.com>
1616
1617 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1618 for a decl in the original bitmap, not a node.
1619 (lto_add_all_inlinees): Remove original nodes that are not needed.
1620 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1621 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
1622 for each set
1623
16242009-02-18 Diego Novillo <dnovillo@google.com>
1625
1626 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
1627 and TV_WHOPR_WPA_IO.
1628 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
1629 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
1630 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
1631 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
1632 depending on command line flags.
1633 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
1634 (lto_main): Remove timer uses.
1635
16362009-02-18 Rafael Avila de Espindola <espindola@google.com>
1637
1638 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
1639 (lto_wpa_write_files): Update calls to renamed functions.
1640
16412009-02-17 Diego Novillo <dnovillo@google.com>
1642
1643 PR 39203
1644 * lto-lang.c (lto_post_options): Disable -fwhole-program
1645 when running LTRANS.
1646
16472009-02-10 Diego Novillo <dnovillo@google.com>
1648
1649 * lto.c (read_cgraph_and_symbols): Fix comment.
1650
16512009-02-10 Diego Novillo <dnovillo@google.com>
1652
1653 * lto.c (read_cgraph_and_symbols): Read options from all
1654 IL files.
1655
16562009-02-10 Diego Novillo <dnovillo@google.com>
1657
1658 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
1659 (materialize_cgraph): Likewise.
1660 (do_whole_program_analysis): Likewise.
1661 (lto_main): Call read_cgraph_and_symbols,
1662 materialize_cgraph and do_whole_program_analysis.
1663
16642009-02-10 Simon Baldwin <simonb@google.com>
1665
1666 * lto.c: Include lto-opts.h.
1667 * (lto_main): Clear file options at loop start, read any saved
1668 options from the first file handled, and re-issue options.
1669 * Makefile.in (lto.o): Add dependency on lto-opts.h.
1670
16712009-02-02 Diego Novillo <dnovillo@google.com>
1672
1673 * lto.c (lto_main): Stop LTO_TIMER and use
1674 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
1675
16762009-01-30 H.J. Lu <hongjiu.lu@intel.com>
1677
1678 PR lto/38995
1679 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
1680 to POINTER_SIZE.
1681
16822009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
1683
1684 * Make-lang.in (LTO_EXE): Link with all
1685 BACKENDLIBS and not only GMPLIBS
1686
16872009-01-28 H.J. Lu <hongjiu.lu@intel.com>
1688
1689 PR bootstrap/38992
1690 * lto-elf.c: Include gelf.h instead of libelf.h.
1691 (lto_elf_file_close): Replace elfx_update_shstrndx with
1692 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
1693 gelf_update_ehdr.
1694
16952009-01-28 H.J. Lu <hongjiu.lu@intel.com>
1696
1697 PR middle-end/38996
1698 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
1699
17002009-01-26 Diego Novillo <dnovillo@google.com>
1701
1702 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
1703
17042009-01-26 Diego Novillo <dnovillo@google.com>
1705
1706 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
1707 and rename into gimple_types_compatible_p.
1708
17092009-01-12 Rafael Avila de Espindola <espindola@google.com>
1710
1711 * lto-lang.c (lang_hooks): Remove the const qualifier.
1712
17132009-01-06 Diego Novillo <dnovillo@google.com>
1714
1715 * ltrans-driver: Mark 'all' target as phony.
1716
17172008-12-31 Diego Novillo <dnovillo@google.com>
1718
1719 * ltrans-driver: Execute a NOP action for target 'all'.
1720
17212008-12-19 Diego Novillo <dnovillo@google.com>
1722
1723 * lto.c (lto_1_to_1_map): Tidy.
1724
17252008-12-19 Diego Novillo <dnovillo@google.com>
1726
1727 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
1728 be opened, show its name.
1729 * ltrans-driver: If $verbose is set, do not use parallelism.
1730
17312008-12-17 Rafael Avila de Espindola <espindola@google.com>
1732
1733 * lto.c (lto_fixup_function): New.
1734 (lto_fixup_tree): Call lto_fixup_function.
1735
17362008-12-14 Doug Kwan <dougkwan@google.com>
1737
1738 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
1739 variables if there is no function.
1740
17412008-12-10 Simon Baldwin <simonb@google.com>
1742
1743 * ltrans-driver: Always run make in silent mode, to avoid make's
1744 trace on stdout interfering with lto-wrapper output.
1745
17462008-12-10 Doug Kwan <dougkwan@google.com>
1747
1748 * lto.c (lto_add_inline_clones): Do not force master clones of
1749 inlined functions already in SET to be static inline.
1750
17512008-12-04 Doug Kwan <dougkwan@google.com>
1752
1753 * lto.c (globalize_context_t): New type to store states in
1754 globalization of cross-file statics.
1755 (globalize_cross_file_statics): New.
1756 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
1757 static decls that need to be fixed up.
1758 (lto_scan_statics_in_cgraph_node): Change call interface to use
1759 a globalize_context_t CONTEXT for all states used.
1760 (lto_scan_statics_in_remaining_global_vars): New.
1761 (lto_promote_cross_file_statics): Use new call interface of
1762 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
1763 visible vars in the last set.
1764
17652008-12-03 Diego Novillo <dnovillo@google.com>
1766
1767 * lto.c (lto_fixup_tree): Do not emit an error when
1768 PREVAILING throw but T doesn't.
1769
17702008-12-02 Doug Kwan <dougkwan@google.com>
1771
1772 * lto.c (lto_scan_statics_in_ref_table): New function factored out
1773 from code in ...
1774 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
1775 variables and functions.
1776 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
1777 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
1778
17792008-11-29 Diego Novillo <dnovillo@google.com>
1780
1781 * lto.c: Include timevar.h.
1782 (lto_materialize_function): Tidy. Add comments.
1783 (lto_wpa_write_files): Tidy.
1784 (lto_execute_ltrans): Tidy.
1785 (lto_main): Add local variable LTO_TIMER. Initialize it
1786 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
1787 Start and stop the timer.
1788 Tidy comments.
1789 * Make-lang.in (lto.o): Add dependency on timevar.h.
1790 * ltrans-driver: React to -v and -save-temps.
1791 Use simple heuristic to determine how much parallelism to
1792 use when executing make.
1793
17942008-11-12 Doug Kwan <dougkwan@google.com>
1795
1796 * lto.c (lto_bitmap_obstack): Remove var.
1797 (lto_materialize_function): Do nothing instead of marking function
1798 body in file if flag_wpa is true.
1799 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
1800 (lto_scan_statics_in_cgraph_node): New function.
1801 (lto_promote_cross_file_statics): Same.
1802 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
1803 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
1804 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
1805
18062008-11-09 Diego Novillo <dnovillo@google.com>
1807
1808 * lto/lto.c (lto_fixup_tree): Change error message locus
1809 information to include location of mismatching
1810 declaration.
1811 Use TREE_NO_WARNING to avoid repeated messages.
1812 (lto_main): If lto_fixup_decls emitted any errors, exit.
1813 * lto/lto-lang.c: Don't include libfuncs.h and except.h
1814 (lto_init_options): Don't enable exceptions by default.
1815 (lto_eh_runtime_type): Move to lto-function-in.c
1816 (lto_init_eh): Likewise.
1817 (lto_init): Don't call lto_init_eh.
1818 * lto/Make-lang.in (lto-lang.o): Remove dependency on
1819 libfuncs.h and except.h.
1820
18212008-10-30 Diego Novillo <dnovillo@google.com>
1822
1823 * lto.c (lto_read_decls): Declare debug_main only if
1824 LTO_STREAM_DEBUGGING is enabled.
1825
18262008-10-30 Simon Baldwin <simonb@google.com>
1827
1828 * lto.c (lto_wpa_write_files): Create intermediate files with
1829 make_cwd_temp_file().
1830 (lto_maybe_unlink): New. Delete intermediate WPA files unless
1831 WPA_SAVE_LTRANS is set.
1832 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
1833 * ltrans-driver: Do not strip directory from output files.
1834
18352008-10-29 Doug Kwan <dougkwan@google.com>
1836
1837 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
1838 DECL.
1839 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
1840 (lto/lto-symtab.o): Remove rule.
1841 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
1842 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
1843 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
1844 Remove macros.
1845 lto-symtab.c (File): Move up one level.
1846 lto-lang.c (cgraph.h): Remove include.
1847 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
1848 input_cgraph): Move to lto-cgraph.c in gcc directory above.
1849 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
1850
18512008-10-24 Rafael Espindola <espindola@google.com>
1852
1853 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
1854 non prevailing weak symbols.
1855
18562008-10-24 Rafael Espindola <espindola@google.com>
1857
1858 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
1859
18602008-10-24 Rafael Espindola <espindola@google.com>
1861
1862 * lto-lang.c (input_node): Avoid casts from pointers to ints of
1863 different types.
1864
18652008-10-23 Simon Baldwin <simonb@google.com>
1866
1867 * lto-lang.c (input_node): Save the node reference, rather than the
1868 node pointer, in node->inlined_to.
1869 (input_cgraph_1): Convert node references into node pointers.
1870
18712008-10-22 Diego Novillo <dnovillo@google.com>
1872 Rafael Espindola <espindola@google.com>
1873
1874 * lto.c (lto_resolution_read): Tidy.
1875 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
1876 abort if RET is NULL.
1877
18782008-10-22 Doug Kwan <dougkwan@google.com>
1879
1880 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
1881 exceptions flag is given.
1882 * lto-lang.c: (lto_init_options) Set default exceptions flag.
1883 (lto_init_eh): Remove exceptions flag initialization.
1884 (lto_init): Only call lto_init_eh if exceptions flag is set.
1885
18862008-10-21 Diego Novillo <dnovillo@google.com>
1887
1888 * lto.c: Tidy some formatting.
1889 * lto.h: Likewise.
1890
18912008-10-21 Simon Baldwin <simonb@google.com>
1892
1893 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
1894 them is NULL (but not the other).
1895
18962008-10-17 Diego Novillo <dnovillo@google.com>
1897
1898 * ltrans-driver: Divert output from make to a temporary file.
1899 Show it if the call to make failed.
1900
19012008-10-15 Diego Novillo <dnovillo@google.com>
1902
1903 * lto.c (lto_wpa_write_files): Reformat do-while loop.
1904 Do not print TEMP_FILENAME
1905 * ltrans-driver: Call make with -s.
1906
19072008-10-15 Diego Novillo <dnovillo@google.com>
1908
1909 * lto-symtab.c (lto_symtab_merge_decl): Do not force
1910 TREE_STATIC on global symbols.
1911
19122008-10-14 Ollie Wild <aaw@google.com>
1913
1914 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
1915 (LTRANS_DRIVER_EXE): Add.
1916 (lto.all.cross): Add LTRANS_DRIVER_EXE.
1917 (lto.all.encap): Add LTRANS_DRIVER_EXE.
1918 (lto.install.common): Remove ltrans-driver.
1919 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
1920 (LTRANS_DRIVER_EXE): New build rule.
1921 * config-lang.in (compilers): Add ltrans-driver.
1922
19232008-10-14 Diego Novillo <dnovillo@google.com>
1924
1925 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
1926 of program name.
1927
19282008-10-13 Ollie Wild <aaw@google.com>
1929
1930 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
1931 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
1932 * ltrans-driver (LTRANS_FLAGS): Remove.
1933
19342008-10-08 Doug Kwan <dougkwan@google.com>
1935
1936 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
1937 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
1938 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
1939 from lto_fixup_state to here.
1940 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
1941 just a free-list. Fix up types also. Move decl merging code to
1942 lto_fixup_tree.
1943 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
1944 object.
1945 (lto_fixup_decls): Use another pointer set to avoid multiple
1946 walking of nodes except for DECLs to be replaced. Pass an
1947 lto_fixup_data_t object to tree-walker.
1948
19492008-10-08 Rafael Espindola <espindola@google.com>
1950
1951 * lto-symtab.c (lto_symtab_set_resolution): New.
1952 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
1953 lto_symtab_get_resolution.
1954 (lto_symtab_prevailing_decl): Return decl for non public decls.
1955 (lto_symtab_get_resolution): New.
1956 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
1957
19582008-10-06 Rafael Espindola <espindola@google.com>
1959
1960 * lto-lang.c: Include cgraph.h.
1961 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
1962 input_cgraph): Moved from lto-cgraph.c.
1963 (LANG_HOOKS_INPUT_CGRAPH): New.
1964
19652008-10-03 Rafael Espindola <espindola@google.com>
1966
1967 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
1968
19692008-10-03 Rafael Espindola <espindola@google.com>
1970
1971 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
1972 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
1973 prevailing definition. Don't mark TREE_NOTHROW differences.
1974 * lto.c (lto_fixup_tree): New.
1975 (lto_fixup_state): New.
1976 (lto_fixup_state_aux): New.
1977 (free_decl): New.
1978 (lto_fixup_decls): New.
1979 (lto_main): Call lto_fixup_decls.
1980
19812008-10-02 Ollie Wild <aaw@google.com>
1982
1983 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
1984 and Init.
1985 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
1986 * lto-lang.c (lto_post_options): Add validation and fixups for
1987 -fltrans and -fwpa.
1988
19892008-10-02 Rafael Espindola <espindola@google.com>
1990
1991 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
1992 lto_symtab_merge_decl): Return void.
1993 (lto_symtab_prevailing_decl): New.
1994
19952008-09-30 Rafael Espindola <espindola@google.com>
1996
1997 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
1998 defined symbols.
1999 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
2000 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
2001 Check for already defined symbols.
2002 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
2003 (LTO_IDENTIFIER_RESOLUTION): Remove.
2004 (LTO_DECL_RESOLUTION): New.
2005
20062008-09-30 Rafael Espindola <espindola@google.com>
2007
2008 * lto.c (lto_read_decls): Use new input_tree signature.
2009
20102008-09-26 Doug Kwan <dougkwan@google.com>
2011
2012 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
2013 bodies affected by exception attribute merging of DECLs.
2014 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
2015 merging.
2016
20172008-09-25 Rafael Espindola <espindola@google.com>
2018
2019 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
2020 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
2021 * lto-symtab.c (lto_symtab_compatible): New.
2022 (lto_symtab_overwrite_decl): New.
2023 (lto_symtab_merge_decl): Refactor to use the above functions
2024 and the resolution from lang_identifier.
2025 * lto-tree.h: Include plugin-api.h.
2026 (lang_identifier): Add resolution.
2027 (LTO_IDENTIFIER_RESOLUTION): New.
2028
20292008-09-25 Ollie Wild <aaw@google.com>
2030
2031 * lang.opt (fltrans-output-list=): New option.
2032 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
2033
20342008-09-25 Rafael Espindola <espindola@google.com>
2035
2036 * lto.c (lto_resolution_read): Initialize ret;
2037
20382008-09-24 Ollie Wild <aaw@google.com>
2039
2040 * lto.c (sys/mman.h): Move include.
2041 (lto_wpa_write_files): Return a list of written files.
2042 (lto_execute_ltrans): New function.
2043 (lto_main): Call lto_execute_ltrans.
2044 (ltrans-driver): New file.
2045 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
2046 (DEAULT_LTRANS_DRIVER_LEN): New macro.
2047 (lto_init_options): Initialize ltrans_driver.
2048 (lto_handle_option): Fix incorrect default output value.
2049 * lang.opt (fltrans-driver=): New option.
2050 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
2051 (lto.install-common): Add lto/ltrans-driver.
2052
20532008-09-24 Rafael Espindola <espindola@google.com>
2054
2055 * Make-lang.in (LTO_OBJS): Add lto/common.o.
2056 (lto/lto.o): Depend on lto/common.h.
2057 (lto/common.o): New.
2058 * lang.opt (resolution): New.
2059 * lto-lang.c (resolution_file_name): New.
2060 (lto_handle_option): Handle OPT_resolution.
2061 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
2062 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
2063 pass it to lto_symtab_merge_decl.
2064 * lto.c: Include common.h.
2065 (lto_read_decls): Add resolutions and resolutions_size arguments.
2066 Initialize data_in.globals_resolution and
2067 data_in.globals_resolution_size.
2068 (index_and_symbol_resolution): New.
2069 (lto_resolution_read): New.
2070 (lto_file_read): Add argument resolution_file.
2071 Read resolution.
2072 * lto.h (resolution_file_name): New.
2073
20742008-09-23 Rafael Espindola <espindola@google.com>
2075
2076 * common.c: Update description.
2077 * common.h: Update description.
2078
20792008-09-23 Rafael Espindola <espindola@google.com>
2080
2081 * common.c: Moved from lto-plugin.
2082 * common.h: Moved from lto-plugin.
2083
20842008-09-22 Doug Kwan <dougkwan@google.com>
2085
2086 * lto.c (VEC(bitmap,heap)): Declare.
2087 (lto_materialize_function): Handle WAP mode specially.
2088 (lto_add_inline_clones): New.
2089 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
2090 return a bitmap of inlined decls.
2091 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
2092 (lto_main): Call reset_inline_failed to reset inlining states.
2093 Check call-graph after WPA inlining.
2094 * lto-lang.c (lto_init): Do not clear flag_generate_lto
2095 unconditionally.
2096
20972008-09-19 Doug Kwan <dougkwan@google.com>
2098
2099 lto.c (lto_main): Remove unsued wrapper code.
2100 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
2101
21022008-09-19 Rafael Espindola <espindola@google.com>
2103
2104 * lto-symtab.c: Include lto-tree-in.h.
2105 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
2106 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
2107 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
2108
21092008-09-17 Paolo Bonzini <bonzini@gnu.org>
2110 Rafael Avila de Espindola <espindola@google.com>
2111
2112 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
2113 COMPOUND_LITERAL_EXPR_DECL): Remove.
2114 (emit_local_var): Remove.
2115 (lto_expand_expr): Remove.
2116 (lto_staticp): Remove.
2117 (LANG_HOOKS_EXPAND_EXPR): Remove.
2118 (LANG_HOOKS_STATICP): Remove.
2119
21202008-09-11 Diego Novillo <dnovillo@google.com>
2121
2122 * lto-lang.c: Include except.h and libfuncs.h.
2123 (lto_init_eh): New.
2124 (lto_init): Call it.
2125 Set flag_generate_lto to 0.
2126 * Make-lang.in (lto-lang.o): Add dependency on except.h
2127 and libfuncs.h.
2128
21292008-09-09 Bill Maddox <maddox@google.com>
2130
2131 * lto-lang.c: Include header file expr.h.
2132 (COMPOUND_LITERAL_EXPR_DECL_STMT,
2133 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
2134 (emit_local_var): Copied from c-semantics.c.
2135 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
2136 and c_staticp in c-common.c.
2137 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
2138
21392008-09-08 Diego Novillo <dnovillo@google.com>
2140
2141 * lto-lang.c (lto_global_bindings_p): Return 1 during
2142 IPA passes.
2143
21442008-09-07 Diego Novillo <dnovillo@google.com>
2145
2146 * lto.c: Tidy formatting.
2147
21482008-08-04 Bill Maddox <maddox@google.com>
2149
2150 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
2151
21522008-09-03 Doug Kwan <dougkwan@google.com>
2153
2154 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
2155 CIF_OK instead of NULL.
2156
21572008-09-02 Diego Novillo <dnovillo@google.com>
2158 Simon Baldwin <simonb@google.com>
2159
2160 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
2161 c_common_type_for_size.
2162 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
2163 (lto_init): Call linemap_add.
2164 (signed_and_unsigned_types): Remove.
2165
21662008-08-29 Diego Novillo <dnovillo@google.com>
2167
2168 * lto-lang.c (handle_noreturn_attribute): New local function.
2169 (handle_const_attribute): New local function.
2170 (handle_malloc_attribute): New local function.
2171 (handle_pure_attribute): New local function.
2172 (handle_novops_attribute): New local function.
2173 (handle_nonnull_attribute): New local function.
2174 (handle_nothrow_attribute): New local function.
2175 (handle_sentinel_attribute): New local function.
2176 (handle_type_generic_attribute): New local function.
2177 (handle_format_attribute): New local function.
2178 (handle_format_arg_attribute): New local function.
2179 (lto_attribute_table): Declare.
2180 (lto_format_attribute_table): Declare.
2181 (lto_init_attributes): New local function.
2182 (lto_define_builtins): Call it.
2183 Call targetm.init_builtins and build_common_builtin_nodes.
2184 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
2185 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
2186
21872008-08-28 Diego Novillo <dnovillo@google.com>
2188
2189 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
2190 $(GIMPLE_H).
2191 (lto-symtab.o): Add dependency on $(GIMPLE_H).
2192 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
2193 * lto-symtab.c: Include gimple.h.
2194 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
2195 TREE_CHAIN.
2196
21972008-08-27 Doug Kwan <dougkwan@google.com>
2198
2199 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
2200 gt-lto-lto.h): New includes.
2201 (lto_materialize_function): Do not read in function body in WPA mode.
2202 Format a line to fit in 80 columns.
2203 (lto_cgraph_node_sets): New garbage collected variable.
2204 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
2205 New functions.
2206 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
2207 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
2208 variable LTO_SECTION_IN_H.
2209 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
2210 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
2211 with variable LTO_SECTION_IN_H.
2212 * config-lang.in (gtfiles): Add lto/lto.c.
2213 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
2214 merged DECL_RESULT correctly.
2215
22162008-08-26 Bill Maddox <maddox@google.com>
2217
2218 * lto-lang.c Include tree-gimple.h.
2219 (lto_mark_addressable): Call mark_addressable rather than
2220 asserting.
2221 (lto_post_options): Suppress debug info generation.
2222 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
2223
22242008-08-25 Bill Maddox <maddox@google.com>
2225
2226 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
2227 assertion and leave an explanatory comment in its place.
2228
22292008-08-21 Doug Kwan <dougkwan@google.com>
2230
2231 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
2232 of common nodes instead of computing locallly.
2233 (lto_read_in_decl_state): New.
2234 (lto_read_decls): Change code for udpate in struct lto_decl_header.
2235 Read global and per-function in-decl states.
2236 * Make-lang.in (LTO_H): Update dependency.
2237 (lto/lto.o): Same.
2238 (lto-symtab.c): Merge (revision 139039)
2239 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
2240
22412008-08-21 Rafael Espindola <espindola@google.com>
2242
2243 * config-lang.in (target_libs): New.
2244
22452008-08-20 Bill Maddox <maddox@google.com>
2246
2247 * lto.c (current_lto_file): Remove GTY marker from static
2248 variable. Remove include of file gt-lto-lto.h.
2249 * Make-lang.in: Remove dependency of lto/lto.o on
2250 gt-lto-lto.h.
2251 * lto-elf.c (lto_file_close): Removed.
2252 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
2253 allocate lto_elf_file object.
2254 (lto_elf_file_close): Free lto_elf_file object after close.
2255 * lto.h (struct lto_file_struct): Remove GTY marker.
2256 * config-lang.in: Remove lto/lto.h and lto/lto.c from
2257 gtfiles.
2258
22592008-08-20 Bill Maddox <maddox@google.com>
2260
2261 * lto.c (lto_read_decls): Provide dummy argument to input_tree
2262 to conform to its new signature.
2263 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
2264 on discarded node here, now called in global_vector_fixup.
2265
22662008-08-09 Bill Maddox <maddox@google.com>
2267
2268 * lto.c (preload_common_nodes): Verify that fileptr_type_node
2269 has not been set to a front-end-specific value.
2270
22712008-08-05 Doug Kwan <dougkwan@google.com>
2272
2273 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
2274 build breakage.
2275
22762008-07-30 Bill Maddox <maddox@google.com>
2277
2278 * lto.c (lto_materialize_function): Call lto_original_decl_name.
2279 Remove obsolete comments.
2280 (lto_read_decls): Remove initialization of deleted field data_in.global.
2281 Tidy up comments.
2282 (lto_main): Remove redundant initialization of section_hash_table.
2283 * lto-elf.c: Removed obsolete comments.
2284 * lto.h: Tidy up comments.
2285 * lto-symtab.c (lto_least_common_multiple): New function.
2286 (lto_symtab_merge_decl): Merge variable alignments in some cases.
2287 Tidy up comments.
2288
22892008-07-25 Diego Novillo <dnovillo@google.com>
2290 Bill Maddox <maddox@google.com>
2291
2292 * lto.c: Re-order include files.
2293 Include lto-section-out.h.
2294 (preload_common_nodes): Add debugging output.
2295 Add new local INDEX_TABLE.
2296 Call preload_common_node.
2297 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
2298
22992008-07-13 Bill Maddox <maddox@google.com>
2300
2301 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
2302 unwanted scaling during pointer addition.
2303
23042008-07-11 Bill Maddox <maddox@google.com>
2305 Diego Novillo <dnovillo@google.com>
2306
2307 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
2308 Make code const-correct.
2309 (lto_file_read): Fix C++ compatibility warnings.
2310 (lto_read_section_data): Fix C++ compatibility warnings.
2311 (lto_get_section_data): Use CONST_CAST to avoid warning when
2312 const pointer passed to free.
2313 * lto-elf.c (lto_elf_build_section_table): Fix C++
2314 compatibility warnings.
2315 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
2316 to avoid warning assigning const pointer to d_buf field of Elf_Data.
2317 (lto_get_current_out_file): Fix C++ compatibility warnings.
2318
23192008-07-11 Diego Novillo <dnovillo@google.com>
2320
2321 * Make-lang.in (lto-warn): Define.
2322
23232008-07-03 Simon Baldwin <simonb@google.com>
2324
2325 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
2326 LTO_STREAM_DEBUGGING.
2327
23282008-06-27 Ollie Wild <aaw@google.com>
2329
2330 * lto-elf.c (lto-section-out.h): New include.
2331 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
2332 and data members.
2333 (cached_file_attrs): New static variable.
2334 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
2335 Use cached_file_attrs for checking bits.
2336 (lto_elf_build_section_table): Remove elf_file argument from
2337 lto_elf_get_shdr and lto_elf_free_shdr calls.
2338 (DEFINE_INIT_SHDR): New macro.
2339 (init_shdr32, init_shdr64): New functions defined via the
2340 DEFINE_INIT_SHDR macro.
2341 (lto_elf_begin_section_with_type): New function.
2342 (lto_elf_begin_section): New function.
2343 (lto_elf_append_data): New function.
2344 (lto_elf_end_section): New function.
2345 (DEFINE_VALIDATE_EHDR): New macro.
2346 (validate_ehdr32, validate_ehdr64): New functions defined via the
2347 DEFINE_VALIDATE_EHDR macro.
2348 (validate_file): New function.
2349 (DEFINE_INIT_EHDR): New macro.
2350 (init_ehdr32, init_ehdr64): New functions defined via the
2351 DEFINE_INIT_EHDR macro.
2352 (init_ehdr): New function.
2353 (lto_elf_file_open): Add support for writable files. Move some
2354 validation logic to validate_file.
2355 (lto_elf_file_close): Add support for writable files. Write file data
2356 and free data blocks.
2357 (current_out_file): New static variable.
2358 (lto_set_current_out_file): New function.
2359 (lto_get_current_out_file): New function.
2360 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
2361 Add temporary initialization for testing ELF serialization.
2362 * lto.h (lto-section-out.h): New include.
2363 (struct lto_file_struct): Slight modification to comment.
2364 (lto_elf_file_open): Add writable parameter.
2365 (lto_elf_begin_section): New function declaration.
2366 (lto_elf_append_data): New function declaration.
2367 (lto_elf_end_section): New function declaration.
2368 (lto_set_current_out_file, lto_get_current_out_file): New function
2369 declarations.
2370 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
2371 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
2372 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
2373 * Make-lang.in (LTO_H): Add lto-section-out.h.
2374
23752008-06-12 Ollie Wild <aaw@google.com>
2376
2377 * lto.h (struct lto_file_vtable_struct): Remove.
2378 (struct lto_file_struct): Remove vtable member.
2379 * lto-elf.c (lto_file_init): Remove vtable argument.
2380 (lto_elf_map_optional_lto_section): Remove.
2381 (lto_elf_unmap_section): Remove.
2382 (lto_elf_file_vtable): Remove.
2383 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
2384 lto_file_init call.
2385 (lto_elf_find_section_data): Remove.
2386
23872008-06-11 Ollie Wild <aaw@google.com>
2388
2389 * lto.c (lto_file_read): Add const qualifier to data variable.
2390
23912008-06-11 Diego Novillo <dnovillo@google.com>
2392
2393 Merge from lto-streamber sub-branch.
2394
2395 2008-06-04 Ollie Wild <aaw@google.com>
2396
2397 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
2398 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
2399
2400 2008-05-28 Bill Maddox <maddox@google.com>
2401
2402 Replace the DWARF reader in the LTO front-end.
2403
2404 * lto.c: Include lto-tree-in.h, lto-tags.h.
2405 (enum DWARF2_class, DW_cl_constant, struct
2406 DWARF2_form_data, struct lto_context,
2407 lto_fd_init, lto_info_fd_init,
2408 lto_abbrev_fd_init, lto_info_fd_close,
2409 lto_file_init, lto_file_close,
2410 lto_file_corrupt_error, lto_abi_mismatch_error,
2411 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
2412 lto_read_uleb128, lto_read_sleb128,
2413 lto_read_initial_length, lto_abbrev_read_attrs,
2414 lto_abbrev_read, lto_abbrev_read_lookup,
2415 lto_read_section_offset,
2416 lto_read_comp_unit_header, find_cu_for_offset,
2417 lto_get_file_name,
2418 lto_resolve_reference,lto_read_form,
2419 attribute_value_as_int,
2420 make_signed_host_wide_int,
2421 attribute_value_as_constant, lto_cache_hash,
2422 lto_cache_eq, lto_cache_store_DIE,
2423 lto_cache_lookup_DIE, lto_find_integral_type,
2424 lto_find_integral_type_1,
2425 LTO_BEGIN_READ_ATTRS_UNCHECKED,
2426 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
2427 lto_unsupported_attr_error, lto_get_identifier,
2428 lto_read_referenced_type_DIE,
2429 lto_read_compile_unit_DIE,
2430 lto_read_array_type_DIE,
2431 lto_read_structure_union_class_type_DIE,
2432 lto_read_enumerator_DIE,
2433 lto_read_enumeration_type_DIE,
2434 lto_read_only_for_child_DIEs,
2435 lto_read_only_for_child_DIEs,
2436 lto_read_member_DIE, lto_read_abbrev,
2437 lto_read_variable_formal_parameter_constant_DIE,
2438 lto_get_body): Removed.
2439 (preload_common_nodes): New function.
2440 (lto_read_decls): Convert for new global streamer.
2441 (lto_materialze_file_data,
2442 lto_read_subroutine_type_subprogram_die,
2443 lto_read_unspecified_parameters_DIE,
2444 lto_read_typedef_DIE,
2445 lto_read_pointer_reference_type_DIE,
2446 lto_read_subrange_type_DIE,
2447 lto_read_base_type_DIE,
2448 lto_read_const_volatile_restrict_type_DIE,
2449 lto_read_namespace_DIE,
2450 lto_read_unspecified_type_DIE, lto_read_DIE,
2451 lto_read_child_DIEs, lto_collect_child_DIEs):
2452 Removed.
2453 (lto_info_read, lto_set_cu_context): Removed.
2454 (lto_file_read): Convert for new global streamer.
2455 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
2456 lto_resolve_var_ref, lto_resolve_fn_ref,
2457 lto_resolve_field_ref, lto_resolve_typedecl_ref,
2458 lto_resolve_namespacedecl_ref): Removed.
2459 (lto_file_init, lto_file_close): Moved to lto-elf.c.
2460 * lto-tree.h (lto_symtab_merge_var,
2461 lto_symtab_mergee_fun): Declare here.
2462 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
2463 (lto_elf_file_open): Removed code to read DWARF debug sections.
2464 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
2465 DWARF2_CompUnit, lto_die_ptr,
2466 lto_die_cache_entry, lto_fd, lto_info_fd,
2467 lto_abbrev_fd): Removed.
2468 (lto_file): Removed debug_info and debug_abbrev fields.
2469 (lto_ref): Removed.
2470 (lto_file_init, lto_file_close,
2471 lto_resolve_type_ref, lto_resolve_var_ref,
2472 lto_resolve_fn_ref, lto_resolve_field_ref,
2473 lto_resolve_typedecl_ref,
2474 lto_resolve_namespacedecl_ref,
2475 lto_get_file_name): Removed declarations.
2476 (lto_symtab_merge_var, lto_symtab_merge_fn):
2477 Declarations moved to lto-tree.h.
2478 * lto-symtab.c (lto_compatible_attributes_p):
2479 Lobotomize this, as it barfs on "Hello, world!".
2480 * lto-section-out.c: Include lto-tree-out.h.
2481 (lto_hash_global_slot_node,
2482 lto_eq_global_slot_node, preload_common_nodes,
2483 write_global_stream, write_global_references):
2484 New functions.
2485 (produce_asm_for_decls): Convert for new global streamer.
2486 * lto-section-out.h (lto_hash_global_slot_node,
2487 lto_eq_global_slot_node): Declare.
2488
24892008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2490 Jan Hubicka <jh@suse.cz>
2491
2492 * lto.c (sys/mman.h, tree-pass.h): New includes.
2493 (lto_materialize_constructors_and_inits,
2494 lto_materialize_function): Keeps length of section.
2495 (lto_materialize_cgraph): Removed.
2496 (lto_read_decls): Initialize fd field.
2497 (lto_file_read): Different return type and removed much code to
2498 lto_main.
2499 (page_mask): New variable.
2500 (lto_read_section_data, get_section_data, free_section_data): New
2501 functions.
2502 (lto_main): Now calls pass manager, sets the hooks so that the ipa
2503 passes can get the section data.
2504
25052008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
2506
2507 * lto.h (lto_read_decls): Made local.
2508 (lto_input_function_body, lto_input_constructors_and_inits,
2509 lto_input_cgraph): Declarations moved to lto-section-in.h.
2510 * lto-section-in.c: Moved to .. .
2511 * lto-cgraph-in.c: Ditto.
2512 * lto-section-in.h: Ditto.
2513 * lto-function-in.c: Ditto.
2514 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
2515 (lto_insert_block): Removed.
2516 (LANG_HOOKS_INSERT_BLOCK): Removed.
2517 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
2518 lto-section-in.o): Rules moved to lto/Makefile.in.
2519
2520
25212008-05-16 Ollie Wild <aaw@google.com>
2522
2523 * lto-lang.c (tree-inline.h): Include.
2524 (lto_post_options): New function.
2525 (LANG_HOOKS_POST_OPTIONS): Define.
2526 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
2527 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
2528
25292008-05-13 Diego Novillo <dnovillo@google.com>
2530
2531 * lto-function-in.c (input_ssa_names): Call
2532 make_ssa_name_fn instead of make_ssa_name.
2533
25342008-05-12 Diego Novillo <dnovillo@google.com>
2535
2536 * lto-cgraph-in.c (overwrite_node): Update references to
2537 inline summary fields.
2538 * lto-function-in.c (input_expr_operand): Do not handle
2539 STRUCT_FIELD_TAG.
2540
25412008-05-09 Ollie Wild <aaw@google.com>
2542
2543 * lang.opt: New file.
2544 * lto-lang.c (lto_init_options): New function.
2545 (lto_handle_option): New function.
2546 (lto_init): Move initialization of flag_unit_at_a_time to
2547 lto_init_options.
2548 (LANG_HOOKS_INIT_OPTIONS): Define.
2549 (LANG_HOOKS_HANDLE_OPTION): Define.
2550
25512008-04-29 Ollie Wild <aaw@google.com>
2552
2553 * lto.c (lto_read_namespace_DIE): New function.
2554 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
2555 NAMESPACE_DECL DIE's.
2556 (lto_resolve_namespacedecl_ref): New function.
2557 * lto.h (lto_resolve_namespacedecl_ref): New function.
2558 * lto-section-in.c (lto_read_decls): Read namespace declarations.
2559 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
2560 and num_namespace_decls.
2561 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
2562 * lto-lang.c (lto_init_ts): New function.
2563 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
2564
25652008-04-16 Ollie Wild <aaw@google.com>
2566
2567 * lto-function-in.c (input_type_ref): Updated function description.
2568
25692008-04-16 Ollie Wild <aaw@google.com>
2570
2571 * lto-function-in.c (input_type_ref_1): New function.
2572 (input_type_ref): Split into two functions.
2573 (input_function): Add support for type contexts.
2574
25752008-04-16 Ollie Wild <aaw@google.com>
2576
2577 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
2578 section name
2579
25802008-04-16 Ollie Wild <aaw@google.com>
2581
2582 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
2583 list of supported languages.
2584
25852008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
2586
2587 Merge with mainline @133491.
2588
25892008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
2590 Jan Hubicka <jh@suse.cz>
2591
2592 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
2593 fd->unmaterialized_fndecls.
2594 (lto_get_file_name, lto_materialize_cgraph): New function.
2595 (lto_materialize_constructors_and_inits,
2596 lto_materialize_function): Read info directly from elf file.
2597 (lto_file_read): Made local and initialize dictionary so that
2598 other lto sections can be read without reprocessing the elf file.
2599 (lto_main): Read all functions after all files have been processed
2600 for their types, globals and cgraph.
2601 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
2602 dependencies.
2603 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
2604 (hash_name, eq_name, lto_elf_build_section_table): New functions.
2605 (lto_elf_read_symtab): Removed function.
2606 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
2607 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
2608 (lto_file_read): Made local.
2609 (lto_get_file_name, lto_elf_build_section_table,
2610 lto_input_cgraph):
2611 New function.
2612 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
2613 New functions.
2614 (lto_read_decls): Get the file name.
2615 * lto-cgraph-in.c: New file.
2616 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
2617 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
2618 (input_labels): Fixed latent sizeof issue.
2619 (input_function): Build stmt array to set call sites into cgraph
2620 edges.
2621 (lto_read_body): Reset cfun->curr_properties.
2622 * lto_section_in.h (lto_section_slot): New structure.
2623 (section_hash_table.lto_file_decl_data): New field.
2624
2625
26262008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
2627
2628 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
2629 reconstruct static initializers.
2630 (lto_get_body, lto_materialize_function): Add lto_section_type as
2631 a parameter.
2632 (lto_materialize_constructors_and_inits,
2633 lto_materialize_file_data): New function.
2634 (lto_materialize_function,
2635 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
2636 unmap_section and map_fn_body to map_section.
2637 (lto_set_cu_context): Process functions and static inits
2638 differently.
2639 * Make-lang.in (LTO_H, lto/lto-function-in.o,
2640 lto/lto-section-in.o): Update dependencies.
2641 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
2642 lto_section_type parameter.
2643 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
2644 * lto.h (lto_file_vtable_struct): Removed two of the fields and
2645 renamed the other two so that there is only one map function and
2646 one unmap function and each takes a section type parameter.
2647 (lto_read_function_body): Renamed to lto_input_function_body and
2648 added file_data parameter.
2649 (lto_read_var_init): Removed.
2650 (lto_input_constructors_and_inits): New function.
2651 * lto-section-in.c (lto_read_decls): New function.
2652 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
2653 var_decls, type_decls, types to lto_file_decl_data.
2654 (input_type_ref, input_expr_operand, lto_read_body): Get
2655 field_decls, fn_decls, var_decls, type_decls, types from different
2656 structure.
2657 (input_globals, input_constructor, lto_read_var_init): Removed.
2658 (input_constructors_or_inits): New function.
2659 (lto_read_function_body, lto_input_constructors_and_inits):
2660 Renamed to lto_input_function_body and takes file_data parameter.
2661 * lto-section-in.h (lto_file_decl_data): New structure.
2662
26632008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
2664
2665 * lto-function-in.c (input_globals.c): Changed input type to
2666 lto_function_header.
2667 (input_bb): Removed code to deserialize the stmt number.
2668 (input_function): Renumber all stmts after they are input.
2669 (lto_read_body, lto_read_function_body, lto_read_var_init):
2670 Changed to used new header format and enum section_type.
2671 *lto-lang.c (success): Removed.
2672
26732008-01-28 Nathan Froyd <froydnj@codesourcery.com>
2674
2675 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
2676 (lto_elf_free_sym): Likewise.
2677
2678 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
2679 (lto_elf_build_init): Likewise.
2680
26812008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
2682
2683 * lto-read.c: Renamed to lto-function-in.c.
2684 (input_1_unsigned): Moved to lto-section-in.c and renamed
2685 lto_input_1_unsigned.
2686 (input_uleb128): Moved to lto-section-in.c and renamed
2687 lto_input_uleb128.
2688 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
2689 lto_input_widest_uint_uleb128.
2690 (input_sleb128): Moved to lto-section-in.c and renamed
2691 lto_input_sleb128.
2692 (input_integer): Moved to lto-section-in.c and renamed
2693 lto_input_integer.
2694 (debug_in_fun): Moved to lto-section-in.c and renamed
2695 lto_debug_in_fun.
2696 (input_block): Moved to lto-section-in.h and renamed
2697 lto_input_block.
2698 (input_expr_operand): Fixed to allow lists with more than one
2699 element.
2700 * lto-section-in.h: New file.
2701 * lto-section-in.c: New file with changes from above.
2702 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
2703 (lto-section-in.o): New rule.
2704
27052007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2706
2707 * lto-read.c (input_expr_operand): Mark static and external
2708 VAR_DECLs as needed.
2709
27102007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2711
2712 * lto-read.c (input_integer): Use the correct shift amount.
2713
27142007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2715
2716 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
2717 (LANG_HOOKS_NAME): Define.
2718
27192007-12-27 Nathan Froyd <froydnj@codesourcery.com>
2720
2721 * lto.c (lto_find_integral_type): Define as a macro. Rename the
2722 original function to...
2723 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
2724 don't have a base type.
2725 (lto_read_enumeration_type_DIE): Examine the values of the
2726 enumeration to determine whether we can use an unsigned type for
2727 the base type of the enumeration.
2728
27292007-12-24 Nathan Froyd <froydnj@codesourcery.com>
2730
2731 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
2732 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
2733
27342007-12-22 Nathan Froyd <froydnj@codesourcery.com>
2735
2736 * lto-lang.c (lto_types_compatible_p): New function.
2737 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
2738
27392007-12-22 Nathan Froyd <froydnj@codesourcery.com>
2740 Kenneth Zadeck <zadeck@naturalbridge.com>
2741
2742 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
2743 (input_local_vars): Read in DECL_INITIAL and context for local
2744 statics that need to be put in unexpanded_vars_list.
2745
27462007-12-21 Nathan Froyd <froydnj@codesourcery.com>
2747
2748 * lto-read.c (input_real): Use a separate null-terminated buffer
2749 for calling real_from_string.
2750 (input_expr_operand): If we take the address of a FUNCTION_DECL,
2751 tell cgraph that it's needed.
2752
27532007-12-19 Doug Kwan <dougkwan@google.com>
2754
2755 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
2756
27572007-12-18 Nathan Froyd <froydnj@codesourcery.com>
2758
2759 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
2760 (lto_file_read): Reset the members of 'context' every time we read
2761 a toplevel DIE, with special attention to last_param_type.
2762
27632007-12-18 Nathan Froyd <froydnj@codesourcery.com>
2764
2765 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
2766 'declaration'. Set the assembler name for non-public functions.
2767
27682007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
2769
2770 * lto_read.c (data_in.unexpanded_indexes): New array.
2771 (input_local_var): Added code to read in unexpanded_var_list
2772 indexes for variables. Only read in DECL_CHAIN field for
2773 parameters.
2774 (input_local_vars): Added code to rebuild unexpanded_var_list in
2775 order using unexpanded_indexes.
2776 (input_function): Added code to set DECL_CONTEXT for functions.
2777
27782007-12-13 Doug Kwan <dougkwan@google.com>
2779
2780 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
2781 in pointer and reference types.
2782
27832007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2784
2785 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
2786 RESULT_DECL.
2787
27882007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2789
2790 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
2791 already read the DIE.
2792 (lto_get_body): New function, split out from...
2793 (lto_materialize_function): ...here. Call it.
2794 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
2795 determine DECL_EXTERNAL.
2796 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
2797 FUNCTION_DECLs when necessary. Use the type of the actual
2798 function definition if we are unable to easily merge types. Ignore
2799 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
2800 necessary.
2801
28022007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2803
2804 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
2805
28062007-12-12 Bill Maddox <maddox@google.com>
2807
2808 Revert
2809 2007-12-07 Bill Maddox <maddox@google.com>
2810
2811 * lto.c (lto_str_fd_init): New function.
2812 (lto_str_fd_close): New function.
2813 (lto_file_init): Call lto_str_fd_init.
2814 (lto_file_close): Call lto_str_fd_close.
2815 (lto_str_read): New function. Read debug string table.
2816 (lto_str_lookup): New function. Get string for debug
2817 string table offset.
2818 (lto_read_form): Recognize DW_FORM_strp.
2819 (lto_file_read): Invoke lto_str_read.
2820
2821 * lto-elf.c (lto_elf_file_open): Read raw section data
2822 for the .debug_str section, if present.
2823
2824 * lto.h (struct lto_str_fd_struct): New struct.
2825 (struct lto_file_struct): Added new field DEBUG_STR
2826 to hold the file descriptor for the debug string table.
2827
28282007-12-07 Bill Maddox <maddox@google.com>
2829
2830 * lto.c (lto_str_fd_init): New function.
2831 (lto_str_fd_close): New function.
2832 (lto_file_init): Call lto_str_fd_init.
2833 (lto_file_close): Call lto_str_fd_close.
2834 (lto_str_read): New function. Read debug string table.
2835 (lto_str_lookup): New function. Get string for debug
2836 string table offset.
2837 (lto_read_form): Recognize DW_FORM_strp.
2838 (lto_file_read): Invoke lto_str_read.
2839
2840 * lto-elf.c (lto_elf_file_open): Read raw section data
2841 for the .debug_str section, if present.
2842
2843 * lto.h (struct lto_str_fd_struct): New struct.
2844 (struct lto_file_struct): Added new field DEBUG_STR
2845 to hold the file descriptor for the debug string table.
2846
28472007-12-07 Nathan Froyd <froydnj@codesourcery.com>
2848
2849 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
2850 Grow the basic_block_info and label_to_block_map vectors if
2851 necessary. Read in the block chain.
2852
28532007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2854
2855 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
2856
28572007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2858
2859 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
2860
28612007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2862
2863 * lto-read.c (input_expr_operand): Don't check for MTAGs.
2864 (lto_read_body): Don't declare PROP_alias.
2865
28662007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2867
2868 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
2869 argument type information.
2870
28712007-12-03 Nathan Froyd <froydnj@codesourcery.com>
2872
2873 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
2874 TREE_THIS_VOLATILE if the associated type is a volatile type.
2875 (lto_materialize_function): Remove call to init_ssa_operands.
2876 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
2877 variable when reading an SSA_NAME. Do the same when reading a
2878 RESULT_DECL, a RETURN_EXPR, or an MTAG.
2879 (input_cfg): Call init_ssa_operands.
2880 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
2881 Move call to init_tree_ssa...
2882 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
2883 add_referenced_var on any variables referenced from the body of the
2884 function. Inform the rest of the compiler we are in SSA form and
2885 inform later passes about the current properties.
2886
28872007-11-30 Nathan Froyd <froydnj@codesourcery.com>
2888
2889 * lto.c (lto_materialize_function): Add FIXME.
2890
28912007-11-29 Nathan Froyd <froydnj@codesourcery.com>
2892
2893 * lto-lang.c (enum built_in_attribute): New enum.
2894 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
2895 built_in_attributes): New variables.
2896 (def_builtin_1): New function.
2897 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
2898
28992007-11-28 Nathan Froyd <froydnj@codesourcery.com>
2900
2901 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
2902 DECL_SOURCE_LOCATION for debugging purposes.
2903 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
2904 bitfield, use the type specified by the DIE for TREE_TYPE and defer
2905 laying out the decl until later.
2906 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
2907 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
2908 TREE_ADDRESSABLE.
2909 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
2910 operand of an ADDR_EXPR.
2911 * lto-lang.c (enum lto_builtin_type): New enum.
2912 (builtin_type): New typedef.
2913 (builtin_types, string_type_node, const_string_type_node,
2914 wint_type_node, intmax_type_node, uintmax_type_node,
2915 signed_size_type_node): New variables.
2916 (def_fn_type, builtin_type_for_size, lto_define_builtins,
2917 lto_build_c_type_nodes): New functions.
2918 (lto_init): Initialize builtin types.
2919 (lto_set_decl_assembler_name): Let the target machine mangle the
2920 name if the decl is TREE_PUBLIC, otherwise uniquify it.
2921
29222007-11-21 Nathan Froyd <froydnj@codesourcery.com>
2923
2924 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
2925 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
2926 the type is a constant type. Set the assembler name and inform
2927 the rest of the compiler about the new decl if the decl is not
2928 public.
2929 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
2930 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
2931 try to read in function bodies for functions that already have bodies.
2932 * lto-symtab.c (lto_same_type_p): Check for unbounded array
2933 equivalency.
2934 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
2935 Check for whether we matched a builtin function type before calling
2936 lto_same_type_p on the generated type. Permit cases where the
2937 declaration of an array is unbounded, but the definition is bounded.
2938 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
2939 DECL_SIZE_UNIT if necessary.
2940
29412007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2942
2943 * lto-read.c (input_expr_operand): Get types right
2944 for COMPLEX_CST.
2945
29462007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2947
2948 * lto-read.c (make_new_block, input_cfg): Properly set
2949 n_basic_blocks.
2950
29512007-11-16 Nathan Froyd <froydnj@codesourcery.com>
2952
2953 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
2954 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
2955
29562007-11-16 Nathan Froyd <froydnj@codesourcery.com>
2957
2958 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
2959 construct the integer type for bitfields.
2960
29612007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2962
2963 * lto-read.c (data_in.current_node_has_loc): Removed.
2964 (input_line_info): Returns true if node needs line set.
2965 (set_line_info): Always sets line if called.
2966 (clear_line_info): Removed reference to current_node_needs_loc.
2967 (input_expr_operand): Keeps track locally if current node needs a loc.
2968 (input_local_var): Added code to handle DECL_INITIAL for
2969 static local vars. Only set loc if necessary.
2970
29712007-11-15 Nathan Froyd <froydnj@codesourcery.com>
2972
2973 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
2974 DECL_CONTEXT.
2975
29762007-11-15 Nathan Froyd <froydnj@codesourcery.com>
2977
2978 * lto.c: Include langhooks.h.
2979 (lto_find_integral_type): Rework logic to handle the case where
2980 got_byte_size is true, but the bitsize requested and that of the
2981 base_type doesn't match.
2982 (lto_read_variable_formal_parameter_constant_DIE): Only check for
2983 asm_name if we are creating a VAR_DECL.
2984 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
2985 definition.
2986 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
2987 function reference and use the builtin's decl if so. Set the
2988 DECL_CONTEXT of the RESULT_DECL for the function.
2989 * lto-lang.c (registered_builtin_fndecls): New variable.
2990 (lto_getdecls): Return it.
2991 (lto_builtin_function): Chain the new decl onto
2992 registered_builtin_fndecls.
2993
29942007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
2995
2996 * lto-read.c (process_tree_flags, lto_static_init_local):
2997 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
2998 (input_line_info, clear_line_info): Fixed new line number code.
2999 (input_expr_operand): Added type to SWITCH_EXPR.
3000 (lto_read_body): Properly initialized data_in.
3001 Clear line info when leaving.
3002
30032007-11-13 Diego Novillo <dnovillo@google.com>
3004
3005 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3006 Initialize ARTIFICIAL.
3007 (lto_read_subroutine_type_subprogram_DIE): Initialize
3008 SAVED_SCOPE.
3009 * lto-read.c (set_line_info): Remove ; from calls to
3010 LINEMAP_POSITION_FOR_COLUMN.
3011
30122007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3013
3014 * lto-read.c (input_type_ref): Renamed from get_type_ref.
3015 (input_expr_operand, input_local_var): Renamed get_type_ref to
3016 input_type_ref.
3017 (input_expr_operand): Get the types correct for
3018 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
3019
30202007-11-13 Doug Kwan <dougkwan@google.com>
3021
3022 * lto-read.c (input_widest_uint_uleb128): New function.
3023 (input_tree_flags, process_tree_flags, input_line_info,
3024 input_expr_operand, input_local_var, input_phi, input_ssa_names):
3025 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
3026 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
3027 (lto_static_init_local): Add code to assert that lto_flags_type is
3028 wide enough.
3029
30302007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3031
3032 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
3033 (lto_read_subroutine_type_subprogram_DIE): Handle
3034 DW_AT_static_link and DW_AT_specification. Return the
3035 specification if present.
3036 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
3037
30382007-11-13 Nathan Froyd <froydnj@codesourcery.com>
3039
3040 * lto-lang.c: Include target.h.
3041 (registered_builtin_types): New variable.
3042 (lto_type_for_mode): Increase number of modes handled.
3043 (lto_builtin_function): Fix argument list and return the decl.
3044 (lto_register_builtin_type): New function.
3045 (lto_init): Initialize target builtins and language-independent
3046 nodes.
3047 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
3048
30492007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3050
3051 * lto-read.c (input_expr_operand): Added code to properly handle
3052 index filed. Added new RANGE_EXPR case.
3053
30542007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3055
3056 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
3057 (data_in): Added current_node_has_loc field.
3058 (input_line_info, set_line_info, clear_line_info): Added a support
3059 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
3060 did not have on on the source side.
3061 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
3062 numbers too.
3063
30642007-11-09 Doug Kwan <dougkwan@google.com>
3065
3066 * lto-read.c (input_expr_operand): Change type of operand 2 of
3067 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
3068
30692007-11-09 Nathan Froyd <froydnj@codesourcery.com>
3070
3071 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
3072 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
3073 from a DW_AT_specification or DW_AT_abstract_origin attribute to
3074 the new decl we are creating. Move informing the middle end about
3075 the new decl to...
3076 (lto_main): ...here. Inform the middle end about global variables
3077 after we have read in all the input files.
3078 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
3079 variables with internal linkage, so delete the check for internal
3080 linkage. Combine TREE_PUBLIC flags.
3081
30822007-11-08 Nathan Froyd <froydnj@codesourcery.com>
3083
3084 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3085 DW_AT_decl_line.
3086 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
3087 builtin specially. Move check for attribute compatibility
3088 earlier.
3089
30902007-11-07 Nathan Froyd <froydnj@codesourcery.com>
3091
3092 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
3093 * config-lang.in (gtfiles): Add lto.h and lto.c.
3094 * lto-elf.c: Include ggc.h.
3095 (lto_elf_file_open): Allocate elf_file from GC memory.
3096 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
3097 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
3098 in GC memory.
3099 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
3100 (lto_file_close): Free file from GC memory.
3101 (lto_cache_store_DIE): Allocate the new entry in GC memory.
3102 (lto_read_member_DIE): Fix declaration.
3103 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
3104 in GC memory.
3105 (current_lto_file): New variable.
3106 (lto_main): Use it.
3107 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
3108 lto_die_cache_entry): Move to...
3109 * lto.h: ...here and add GTY markers as appropriate. Delete forward
3110 declarations accordingly.
3111 (struct lto_file_struct): Declare.
3112 (lto_file_vtable): Use it instead of lto_file.
3113
31142007-11-06 Alon Dayan <alond@il.ibm.com>
3115 Kenneth Zadeck <zadeck@naturalbridge.com>
3116
3117 * lto-read.c (process_flags, lto_static_init_local):
3118 read flags of VAR_DECL and FUNCTION_DECL of size>1.
3119 change global array num_flags_for_code to flags_length_for_code.
3120 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
3121
31222007-11-05 Nathan Froyd <froydnj@codesourcery.com>
3123
3124 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
3125 layout functions to compute information about the newly constructed
3126 type.
3127
31282007-11-02 Nathan Froyd <froydnj@codesourcery.com>
3129
3130 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
3131 case to use DECL_RESULT if necessary.
3132
31332007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3134
3135 * lto-read.c (input_tree_list): Removed.
3136 (input_tree_flags): Added parameter to force flags no matter what
3137 tree code.
3138 (input_expr_operand): Added parameter to input_tree_flags.
3139 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
3140 input_expr_operand rather than input_tree_lists.
3141 (input_local_var): Use input_expr_operand to read attributes
3142 rather then input_tree_list.
3143 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
3144
31452007-10-31 Nathan Froyd <froydnj@codesourcery.com>
3146
3147 * lto.c (lto_read_typedef_DIE): Fix comment typo.
3148 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
3149 TYPE_DECL for it.
3150 * lto-read.c (lto_read_body): Use correct sizes for calculating
3151 type_decls_offset and types_offset.
3152
31532007-10-30 Nathan Froyd <froydnj@codesourcery.com>
3154
3155 * lto-tree.h (union lang_tree_node): Change GTY description to chain
3156 with GENERIC_NEXT.
3157 * config-lang.in (gtfiles): Add lto-lang.c.
3158 * lto-lang.c: Include gt-lto-lto-lang.h.
3159 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
3160 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
3161 (lto/lto-read.o): Likewise.
3162
31632007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3164
3165 * lto-read.c (data_in): Added type_decls and current_col fields.
3166 (string_slot): New type to hold canonized file name.
3167 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
3168 input_line_info, set_line_info, clear_line_info): New functions.
3169 (file_name_hash_table): New hash table.
3170 (input_local_var, input_labels, input_local_vars_index,
3171 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
3172 (input_uleb128): Changed type of byte var.
3173 (input_expr_operand): Large number of changes to get line numbers
3174 correct. Added TYPE_DECL case.
3175 (input_globals): Added code to get TYPE_DECLs processed.
3176 (input_local_var): Added code to process line numbers and
3177 TREE_CHAIN and DECL_CONTEXT.
3178 (input_function, input_constructor): Added call to
3179 clear_line_number.
3180 (lto_static_init_local): Added code to get line numbers correct.
3181 (lto_read_body): Added code to get TYPE_DECLS read and to change
3182 parameters to the calls above that had their parms reorganized.
3183
3184
31852007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3186
3187 * lto.h (lto_resolve_typedecl_ref): Declare.
3188 * lto.c (lto_resolve_typedecl_ref): New function.
3189
31902007-10-29 Mark Mitchell <mark@codesourcery.com>
3191 Nathan Froyd <froydnj@codesourcery.com>
3192
3193 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
3194 DIEs even if we find an abstract origin for this DIE.
3195
31962007-10-29 Nathan Froyd <froydnj@codesourcery.com>
3197
3198 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
3199 RESULT_DECL slightly earlier. Only remember the decl for later
3200 if we successfully merge declarations.
3201
32022007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
3203
3204 * lto-read.c (input_expr_operand): Give label_values the proper
3205 context and provide switch statements with a default type.
3206
32072007-10-23 Nathan Froyd <froydnj@codesourcery.com>
3208
3209 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
3210 * lto.c (lto_materialize_function): ...to here.
3211
32122007-10-22 Nathan Froyd <froydnj@codesourcery.com>
3213
3214 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
3215 * lto.c (lto_info_fd_init): Initialize it.
3216 (lto_info_fd_close): Free it.
3217 (lto_materialize_function): New function.
3218 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
3219 unmaterialized_fndecls.
3220 (lto_file_read): Read in all the function bodies after we have read
3221 all of the DWARF info.
3222 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
3223 reading a function body.
3224
32252007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
3226
3227 * lto-read.c (input_tree_flags): Renamed from input_flags to be
3228 semetric with output_tree_flags. Added call to log flags.
3229 (process_tree_flags): Renamed from process_flags. Fixed a lot of
3230 type issues to make everything consistent with flags being
3231 unsigned HOST_WIDE_INTS.
3232 (input_expr_operand): Added call to
3233 recompute_tree_invariant_for_addr_expr.
3234 (input_local_var): Added debugging for tree_chains. Now calls
3235 input_tree_flags.
3236 (input_phi): Made flags unsigned HOST_WIDE_INT.
3237 (input_ssa_names): Now calls input_tree_flags.
3238 (lto_read_body): Now sets cfun.
3239 (lto_read_function_body): Now sets current_function_pointer.
3240
32412007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3242
3243 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
3244 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
3245 inspecting fields within.
3246 (lto_read_DIE_at_ptr): Delete check for null result; let callers
3247 handle this appropriately.
3248
32492007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3250
3251 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
3252 DW_AT_abstract_origin properly. Ensure that we're not dealing with
3253 both DW_AT_abstract_origin and DW_AT_specification.
3254 (lto_read_subroutine_type_subprogram_DIE): Handle
3255 DW_AT_abstract_origin.
3256 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
3257 (lto_read_DIE_at_ptr): Define as static to match declaration.
3258 Lookup the PTR in the cache before reading it from the file.
3259 (lto_resolve_var_ref): Adjust accordingly.
3260 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
3261 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
3262
32632007-10-19 Nathan Froyd <froydnj@codesourcery.com>
3264
3265 * lto.c (lto_read_DIE_at_ptr): New function.
3266 (lto_resolve_var_ref): Use it.
3267 (lto_resolve_fn_ref): Use it.
3268 (lto_resolve_field_ref): Use it.
3269 (lto_read_variable_formal_parameter_constant_DIE): Follow
3270 DW_AT_specification and return the associated decl when appropriate.
3271
32722007-10-18 Nathan Froyd <froydnj@codesourcery.com>
3273
3274 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
3275 Implement for scalar integer modes.
3276 (lto_init): Initialize size_type_node.
3277
32782007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
3279
3280 * lto-read.c (input_expr_operand): Remove ssa name asserts.
3281 (input_local_var): Add chaining for params.
3282 (input_ssa_names): Add cfun parameter.
3283 (input_function): Remove unnecessary else.
3284
32852007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3286
3287 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
3288 (lto_resolve_var_ref): Use proper types.
3289 (lto_resolve_fn_ref): Likewise.
3290 (lto_resolve_field_ref): Likewise.
3291
32922007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3293
3294 * lto-read.c (input_expr_operand): Remove case.
3295
32962007-10-17 Nathan Froyd <froydnj@codesourcery.com>
3297
3298 * lto.c (lto_read_only_for_child_DIEs): New function.
3299 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
3300 * lto-elf.c (lto_elf_map_lto_section): Remove.
3301 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
3302 * lto-read.c (input_expr_operand): Assert that we never read a NULL
3303 SSA_NAME. Add missing case for mechanical codes.
3304 (input_cfg): Use basic_block_info_for_function instead of
3305 basic_block_info.
3306
33072007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3308
3309 * lto-read.c (input_sleb128, input_integer): Use proper casts.
3310 (input_list): Renamed input_tree_list and modified to follow same
3311 protocol as lto-function-out.c:output_tree_list.
3312 (input_expr_operand): Make asm operands use input_tree_list.
3313 (input_local_var): Now uses input_tree_list.
3314 (lto_read_body): Change placement for setting context of debug_labels.
3315
3316
33172007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
3318
3319 * lto-read.c (input_real): Output debugging in proper order.
3320 (input_integer): Compute bit lengths properly.
3321 (input_list): Clean up declaration.
3322 (input_expr_operand): Change calls to input_real to match fix.
3323 Make reading of LTO_bit_field_ref1 match output.
3324 (input_local_var): Make reading of attributes match what is being
3325 written.
3326 (dump_debug_stream): Also print char in hex.
3327 (debug_out_fun): Fix signed unsigned mismatch.
3328
33292007-10-10 Nathan Froyd <froydnj@codesourcery.com>
3330
3331 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
3332 DW_AT_GNU_vector specially, as they are not contiguous with the
3333 specified set of attribute names. Use class_mask to check for
3334 errors at the end of the function
3335 (lto_resolve_var_ref): Read the DIE if it is not cached.
3336 (lto_resolve_fn_ref): Likewise.
3337 (lto_resolve_field_ref): Likewise.
3338
33392007-10-05 Nathan Froyd <froydnj@codesourcery.com>
3340
3341 * lto.c: Include dwarf2out.h.
3342 (lto_cache_store_DIE): Assert that we never change the value.
3343 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
3344 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
3345 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
3346 sensible type instead.
3347 (lto_read_structure_union_class_type_DIE): Store the newly
3348 created type prior to reading the members of the structure to
3349 avoid infinite recursion. Avoid computing types and alignments
3350 for structures whose sizes are unknown.
3351 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
3352 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
3353 DW_AT_const_value, and DW_AT_specification.
3354 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
3355 Return early if we have already constructed the function type.
3356 (lto_read_typedef_DIE): Check to see if the type has been cached
3357 already. Cache the type before reading any children.
3358 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
3359 (lto_read_DIE): Unset context->skip_non_parameters around reading
3360 the DIE.
3361 (lto_resolve_fn_ref): Delete trailing whitespace.
3362
33632007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
3364
3365 * lto-read.c (input_expr_operand): Added type for STRING_CST.
3366
33672007-09-10 Nathan Froyd <froydnj@codesourcery.com>
3368
3369 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
3370
33712007-09-07 Nathan Froyd <froydnj@codesourcery.com>
3372
3373 * lto-lang.c (signed_and_unsigned_types): New variable.
3374 (lto_type_for_size): Consult signed_and_unsigned_types to find
3375 an approprite type, creating it if necessary.
3376 (lto_set_decl_assembler_name): Add actual method body.
3377
33782007-09-06 Jim Blandy <jimb@codesourcery.com>
3379
3380 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
3381 can't find a var init for this variable, leave its DECL_INITIAL.
3382 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
3383 lto_elf_map_fn_body.
3384 (lto_map_lto_section): New function.
3385 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
3386 bodies, and lto_elf_map_optional_lto_section for variable
3387 initializers.
3388 (lto_elf_find_section_data): Quietly return NULL if the section is
3389 missing.
3390 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
3391
3392 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
3393
3394 * lto-read.c (lto_read_body): Doc fix.
3395
33962007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
3397
3398 * lto-read.c (fun_in): Renamed to data_in.
3399 (input_expr_operand, input_local_var, input_string_internal,
3400 input_string, input_real, input_list, get_label_decl,
3401 get_type_ref, input_expr_operand, input_globals, input_labels,
3402 input_local_vars_index, input_local_var, input_local_vars,
3403 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
3404 (input_constructor): New function.
3405 (lto_read_function_body): Renamed to lto_read_body and generalized
3406 to handle both functions and constructors.
3407 (lto_read_function_body, lto_read_var_init): New function.
3408
3409
34102007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3411
3412 * lto-read.c (input_expr_operand): Assert that there really is a
3413 FUNCTION_DECL.
3414 (input_globals): Removed checks on 0 section.
3415
34162007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
3417
3418 * lto-read.c (fun_in): Added local_decls_index and
3419 local_decls_index_d.
3420 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
3421 (input_globals): Enabled code to handle FIELD_DECLs.
3422 (input_local_vars_index, input_local_vars): New function.
3423 (input_local_var): Changed to allow locals to be input randomly.
3424 (lto_read_function_body): Added code to input the
3425 local_decls_index and to free various structures.
3426
34272007-08-17 Jim Blandy <jimb@codesourcery.com>
3428
3429 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
3430 ATTRIBUTE_UNUSED from 'die' formal.
3431
3432 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
3433 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
3434 (input_list): Fix type of 'tag'.
3435 (input_expr_operand): Fix type of 'tag' argument. Update
3436 declaration. Fix type of 'ctag'. Add default case to switch,
3437 since the type of the switched value is now an enum.
3438 (input_local_vars): Fix type of 'tag'.
3439 (input_bb): Fix type of 'tag' argument.
3440 (input_function): Fix type of 'tag' argument.
3441
34422007-08-16 Jim Blandy <jimb@codesourcery.com>
3443
3444 * lto.c (lto_read_member_DIE): Record the tree we create in
3445 fd->die_cache. (Our 'die' argument is no longer unused.)
3446 (lto_resolve_field_ref): New function.
3447 * lto.h (lto_resolve_field_ref): New declaration.
3448
34492007-08-15 Jim Blandy <jimb@codesourcery.com>
3450
3451 * lto-read.c (lto_read_var_init): Mark arguments as unused.
3452
34532007-08-07 Jim Blandy <jimb@codesourcery.com>
3454
3455 * lto.c (lto_read_form): Complete attr_classes table.
3456 (DWARF2_form_data): Doc fix.
3457
34582007-08-05 Mark Mitchell <mark@codesourcery.com>
3459
3460 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
3461 and unmap_var_init.
3462 (lto_read_var_init): Declare.
3463 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
3464 interface for reading variable initializers.
3465 * lto-elf.c (lto_elf_read_var_init): Remove.
3466 (lto_elf_file_vtable): Update initializer.
3467 (lto_elf_read_var_init): Add comment about unused-ness.
3468 * lto-read.c (lto_read_var_init): New.
3469
3470 * lto.c (lto_read_form): Add entry for DW_AT_inline.
3471
34722007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
3473
3474 * lto-read.c (lto_read_function_body): Moved declaration of fn
3475 outside of ifdef.
3476
34772007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
3478
3479 * lto-read.c (input_uleb128, input_string_internal, input_real,
3480 input_integer, input_record_start, input_list, get_type_ref,
3481 input_flags, input_expr_operand, input_expr_operand,
3482 input_expr_operand, input_local_vars, input_cfg, input_phi,
3483 input_ssa_names, input_bb, input_function): Added semicolons.
3484
3485
34862007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3487
3488 * lto-read.c (input_globals): Remove debugging.
3489 (input_function): Set DECL_ARGUMENTS.
3490
3491
34922007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3493
3494 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
3495 RETURN_EXPR, MODIFY_EXPR and processing of flags.
3496 (input_phi): Made work with operands other than SSA_NAMES and
3497 fixed processing of flags.
3498 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
3499 (input_flags): New function.
3500 * lto-lang.c (lto_init): Changed state of in_lto_p.
3501
3502
35032007-07-24 Mark Mitchell <mark@codesourcery.com>
3504
3505 * lto-tree.h (lto_varargs_cookie): Remove.
3506 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
3507 skip_non_parameters, skip_parameters.
3508 (lto_varargs_cookie): Remove.
3509 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
3510 parameter types.
3511 (lto_read_abbrev): New function.
3512 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
3513 child DIEs.
3514 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
3515 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
3516 (lto_file_read): Initialize new context fields.
3517 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
3518 (lto_unsigned_type): Remove.
3519 (lto_signed_type): Likewise.
3520 (lto_signed_or_unsigned_type): Likewise.
3521 (lto_init): Do not create lto_varargs_cookie.
3522 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
3523 (LANG_HOOKS_SIGNED_TYPE): Likewise.
3524 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
3525
35262007-07-19 Jan Hubicka <jh@suse.cz>
3527
3528 * lto-read.c (lto_read_function_body): Produce empty scope block
3529 to avoid crash.
3530
35312007-07-18 Mark Mitchell <mark@codesourcery.com>
3532
3533 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
3534 process local variables.
3535 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
3536
35372007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3538
3539 * lto-read.c (input_list, input_expr_operand): Added struct
3540 function parameter.
3541 (init_cfg, finalize_cfg): Removed function.
3542 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
3543 (input_labels, input_local_vars): Now takes input_block parameter rather than
3544 synthsyzing it.
3545 (input_cfg, input_phi, input_ssa_names): New functions.
3546 (input_bb): Now passes in input_blocks. Does not construct cfg
3547 and processes the list of phi functions.
3548 (input_function): Now builds both the cfg and ssa_names table.
3549 (lto_read_function_body): Processes new header fields to construct
3550 streams for the ssa_names and cfg and their debugging.
3551 * lto/lto-lang.c (lto_init): Set in_lto_p.
3552
3553
35542007-06-28 Mark Mitchell <mark@codesourcery.com>
3555
3556 * lto.h (lto_file_vtable): Add read_var_init.
3557 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
3558 initializers.
3559 (lto_main): Remove bogus asserts.
3560 * lto-elf.c (tm.h): Include it.
3561 (libiberty.y): Likewise.
3562 (lto_elf_file): Add strtab and symtab. Rename
3563 string_table_section_index to sec_strtab.
3564 (lto_elf_file_vtable): Add lto_elf_read_var_init.
3565 (lto_elf_get_shdr): New function.
3566 (lto_elf_free_shdr): Likewise.
3567 (lto_elf_find_section_data): Use them.
3568 (lto_elf_read_symtab): New function.
3569 (lto_elf_lookup_sym): Likewise.
3570 (lto_elf_free_sym): Likewise.
3571 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
3572 (lto_elf_built_init): New function.
3573 (lto_elf_read_var_init): Likewise.
3574 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
3575
35762007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
3577
3578 * lto-read (make_new_block): Initialize the stmt_list.
3579 (lto_static_init_local): Add debugging for missing codes.
3580
35812007-06-26 Mark Mitchell <mark@codesourcery.com>
3582
3583 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3584 unprototyped functions.
3585
35862007-06-23 Mark Mitchell <mark@codesourcery.com>
3587
3588 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3589 Handle DW_AT_MIPS_linkage_name.
3590 (lto_read_subroutine_type_subprogram): Likewise. Correct
3591 compilation errors.
3592 (lto_main): Remove incorrect assertions.
3593 * lto-symbtab.c: Build function types out of TREE_LISTs.
3594
3595 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
3596
3597 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
3598
35992007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
3600
3601 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
3602 dummy since ggc does not like empty structs.
3603 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
3604 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
3605 expr->common to expr->base.
3606 (make_new_block): Moved stmt_list to proper place.
3607
3608
36092007-03-14 Robert Kennedy <jimbob@google.com>
3610
3611 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
3612 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
3613 assembler name from DWARF.
3614 * lto-lang.c (lto_set_decl_assembler_name) New function.
3615
36162006-09-10 Mark Mitchell <mark@codesourcery.com>
3617
3618 * lto.h (lto_file_vtable): New structure.
3619 (lto_file): Add vtable pointer.
3620 (lto_file_init): Add vtable paramter.
3621 (lto_read_function_body): New function.
3622 (lto_symtab_merge_fn): New function.
3623 * lto.c (lto_file_init): Add vtable parameter.
3624 (lto_read_form): Fill in entries for DW_AT_prototyped,
3625 DW_AT_frame_base.
3626 (lto_read_subroutine_type_subprogram_DIE): New function.
3627 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
3628 DW_TAG_subprogram.
3629 * lto-elf.c (lto_elf_vile_vtable): New variable.
3630 (lto_elf_file_open): Pass it to lto_file_init.
3631 (lto_elf_map_fn_body): New function.
3632 (lto_elf_unmap_fn_body): Likewise.
3633 * lto-read.c: New file.
3634 * lto-symtab.c (lto_symtab_merge_fn): New function.
3635 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
3636 tree_rest_of_compilation.
3637 * Make-lang.in (LTO_OBJS): Add lto-read.o
3638 (lto-read.o): New target.
3639
36402006-09-03 Mark Mitchell <mark@codesourcery.com>
3641
3642 * lto.c (<inttypes.h>): Don't include it.
3643 (lto_context): Don't typedef it.
3644 (lto_resolve_reference): New function.
3645 (lto_read_form): Use it.
3646 (lto_resolve_type_ref): New function.
3647 (lto_resolve_var_ref): Likewise.
3648 (lto_resolve_fn_ref): Likewise.
3649 * lto.h (<inttypes.h>): Include it.
3650 (lto_context): New type.
3651 (lto_ref): New structure.
3652 (lto_resolve_type_ref): Declare.
3653 (lto_resolve_var_ref): Likewise.
3654 (lto_resolve_fn_ref): Likewise.
3655
36562006-08-18 Mark Mitchell <mark@codesourcery.com>
3657
3658 * lang-specs.h: New file.
3659
36602006-08-14 Mark Mitchell <mark@codesourcery.com>
3661
3662 * lto.c (lto_info_fd_init): Allocate the DIE cache.
3663 (lto_info_fd_close): Deallocate it.
3664 (lto_die_cache_entry): New structure.
3665 (lto_cache_hash): New function.
3666 (lto_cache_eq): Likewise.
3667 (lto_cache_store_DIE): Likewise.
3668 (lto_cache_lookup_DIE): Likewise.
3669 (lto_read_referenced_type_DIE): Use the cache.
3670 (lto_read_pointer_type_DIE): Robustify.
3671 (lto_read_DIE): Use the cache.
3672 * lto.h (hashtab.h): Include.
3673 (lto_info_fd): Add DIE cache.
3674 * Make-lang.in (LTO_H): New variable.
3675 (lto/lto-lang.o): Use LTO_H.
3676 (lto/lto-elf.o): Likewise.
3677 (lto/lto-symtab.o): Likewise.
3678
36792006-07-09 Mark Mitchell <mark@codesourcery.com>
3680
3681 * lto.c (lto_abi_mismatch_error): New function.
3682 (lto_abbrev_read): Initialize num_abbrevs.
3683 (lto_read_form): Specify allowed form classes for
3684 DW_AT_declaration. Adjust for change to lto_set_cu_context.
3685 (lto_read_variable_formal_parameter_constant_DIE): Handle
3686 DW_AT_declaration. Call lto_symtab_merge_var.
3687 (lto_read_pointer_type_DIE): New function.
3688 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
3689 not creat TYPE_DECLs for types that already have them.
3690 (lto_read_DIE): Add lto_read_pointer_type_DIE.
3691 (lto_set_cu_context): Make cu_start point to the header, not the
3692 first DIE.
3693 (lto_file_read): Adjust for change to lto_set_cu_context.
3694 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
3695 (lto/lto-symtab.o): New rule.
3696 * lto-tree.h (lang_identifier): Add decl field.
3697 (LANG_IDENTIFIER_CAST): New macro.
3698 (LTO_IDENTIFIER_DECL): Likewise.
3699 (lto_symtab_merge_var): Declare.
3700 * lto-symtab.c: New file.
3701
37022006-07-02 Daniel Berlin <dberlin@dberlin.org>
3703
3704 * lto.c (lto_context): Add current_cu and info_fd members.
3705 (DWARF2_CompUnit): New structure.
3706 (lto_read_DIE): Take lto_info_fd *.
3707 (lto_read_child_DIEs): Ditto.
3708 (lto_file_corrupt_error): Constify argument.
3709 (lto_set_cu_context): New function
3710 (lto_info_fd_init): Ditto.
3711 (lto_info_fd_close): Ditto.
3712 (lto_file_init): Use lto_info_fd_init.
3713 (lto_file_close): Use lto_info_fd_close.
3714 (lto_read_initial_length): Pass in pointer to header size.
3715 (lto_read_comp_unit_header): Correct cu_length to
3716 real length from beginning of header. Take lto_info_fd * as
3717 argument.
3718 (find_cu_for_offset): New function.
3719 (lto_read_form): Change first argument to lto_info_fd *.
3720 Add FORM_CONTEXT argument.
3721 Handle DW_FORM_ref_addr.
3722 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
3723 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
3724 Swap contexts if necessary for form.
3725 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
3726 lto_file_corrupt_error.
3727 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
3728 (lto_read_referenced_type_DIE): Change first argument to
3729 lto_info_fd *. Access lto_fd fields through base pointer.
3730 (lto_read_compile_unit_DIE): Change first argument to an
3731 lto_info_fd *.
3732 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
3733 (lto_read_base_type_DIE): Ditto.
3734 (lto_read_child_DIEs): Ditto.
3735 (lto_read_DIE): Ditto. Change type of function pointer.
3736 (lto_info_read): New function.
3737 (lto_set_cu_context): Ditto.
3738 (lto_file_read): Use lto_info_read, walk resulting CU's
3739 (lto_main): Update for lto_info_fd change.
3740 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
3741 necessary.
3742 * lto.h (DWARF2_CompUnit): New structure.
3743 (lto_info_fd): Ditto.
3744 (lto_file): Change debug_info to be an lto_info_fd.
3745
37462006-06-25 Mark Mitchell <mark@codesourcery.com>
3747
3748 * lto.c (toplev.h): Include it.
3749 (dwarf2.h): Likewise.
3750 (tree.h): Likewise.
3751 (tm.h): Likewise.
3752 (cgraph.h): Likewise.
3753 (ggc.h): Likewise.
3754 (inttypes.h): Likewise.
3755 (DWARF2_attr): New type.
3756 (DWARF2_abbrev): Likewise.
3757 (DWARF2_class): Likewise.
3758 (DWARF2_form_data): Likewise.
3759 (lto_context): Likewise.
3760 (lto_fd_init): New function.
3761 (lto_abbrev_fd_init): Likewise.
3762 (lto_abbrev_fd_close): Likewise.
3763 (lto_file_init): Use them.
3764 (lto_file_close): New function.
3765 (lto_file_corrupt_error): Likewise.
3766 (LTO_CHECK_INT_VAL): New macro.
3767 (lto_check_size_t_val): New function.
3768 (lto_check_int_val): Likewise.
3769 (LTO_READ_TYPE): New macro.
3770 (lto_read_ubyte): New function.
3771 (lto_read_uhalf): Likewise.
3772 (lto_read_uword): Likewise.
3773 (lto_read_uleb128): Likewise.
3774 (lto_read_initial_length): Likewise.
3775 (lto_abbrev_read_attrs): Likewise.
3776 (lto_abbrev_read): Likewise.
3777 (lto_abbrev_lookup): Likewise.
3778 (lto_read_section_offset): Likewise.
3779 (lto_read_comp_unit_header): Likewise.
3780 (lto_read_form): Likewise.
3781 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
3782 (LTO_BEGIN_READ_ATTRS): Likewise.
3783 (LTO_END_READ_ATTRS): Likewise.
3784 (lto_unsupported_attr_error): New function.
3785 (lto_get_identifier): Likewise.
3786 (lto_read_referenced_type_DIE): Likewise.
3787 (lto_read_compile_unit_DIE): Likewise.
3788 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
3789 (lto_read_base_type_DIE): Likewise.
3790 (lto_read_DIE): Likewise.
3791 (lto_read_child_DIEs): Likewise.
3792 (lto_file_read): Read DIEs.
3793 (lto_main): Ask middle end to emit entities.
3794 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
3795 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
3796 (lto_elf_file_close): Likewise.
3797 * lto.h (lto_file): Declare.
3798 (DWARF2_abbrev): Likewise.
3799 (lto_fd): New type.
3800 (lto_abbrev_fd): Likewise.
3801 (lto_file): Use new types.
3802 (lto_file_close): Declare.
3803 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
3804
38052006-06-18 Mark Mitchell <mark@codesourcery.com>
3806
3807 * lto.h: New file.
3808 * lto.c: New file.
3809 * lto-elf.c: New file.
3810 * lto-lang.c (flags.h): Include it.
3811 (lto.h): Likewise.
3812 (lto_init): New function.
3813 (lto_write_globals): Remove.
3814 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
3815 (LANG_HOOKS_INIT): Define.
3816 (LANG_HOOKS_PARSE_FILE): Likewise.
3817 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
3818 (LTO_EXE): Link with libelf.
3819 (lto/lto-lang.o): Update dependencies.
3820 (lto/lto.o): New target.
3821 (lto/lto-elf.o): Likewise.
3822
38232006-06-12 Mark Mitchell <mark@codesourcery.com>
3824
3825 * config-lang.in: New file.
3826 * Make-lang.in: Likewise.
3827 * lto-tree.h: Likewise.
3828 * lto-lang.c: Likewise.
3829
This page took 1.625028 seconds and 5 git commands to generate.