]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto/ChangeLog
re PR c++/47003 (ice in stabilize_expr)
[thirdparty/gcc.git] / gcc / lto / ChangeLog
CommitLineData
6b7fb143
RG
12010-12-06 Richard Guenther <rguenther@suse.de>
2
3 PR lto/46796
4 * lto-lang.c (lto_init): Give names to basic types.
5
c59ffc41
JM
62010-11-30 Joseph Myers <joseph@codesourcery.com>
7
8 * lto-object.c: Don't include toplev.h.
9 * Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
10
7c475d11
JM
112010-11-30 Joseph Myers <joseph@codesourcery.com>
12
13 * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
14 $(TOPLEV_H).
15
71f3e391
JM
162010-11-29 Joseph Myers <joseph@codesourcery.com>
17
18 * lto-endian.h: Delete.
19 * lto-object.c: Don't include "libiberty.h".
20 (O_BINARY): Don't define.
21 * lto.c: Don't include "libiberty.h" or <sys/mman.h>.
22 (O_BINARY): Don't define.
23
9f1718b0
RG
242010-11-23 Richard Guenther <rguenther@suse.de>
25
26 * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.
27
39c4e298
RG
282010-11-23 Richard Guenther <rguenther@suse.de>
29
30 PR lto/46605
31 * lto.c (read_cgraph_and_symbols): Bail out after errors.
32
b37421c6
JM
332010-11-17 Joseph Myers <joseph@codesourcery.com>
34
35 * lto.c (lto_main): Take no arguments.
36 * lto.h (lto_main): Update prototype.
37
d82f74d3
ILT
382010-11-16 Ian Lance Taylor <iant@google.com>
39
40 * lto-object.c (lto_obj_file_open): Call
41 simple_object_attributes_merge rather than
42 simple_object_attributes_compare.
43
a4d8c676
JM
442010-11-12 Joseph Myers <joseph@codesourcery.com>
45
46 * Make-lang.in (lto/lto.o): Use $(OPTS_H).
47 * lto-lang.c (lto_handle_option): Take location_t parameter.
48
d8a07487
JM
492010-11-10 Joseph Myers <joseph@codesourcery.com>
50
51 * lto.c (lto_resolution_read): Start diagnostics with lowercase
52 letters and remove trailing '.'.
53 (lto_file_finalize): Start diagnostic with a lowercase letter.
54
6b3456d1
ILT
552010-11-02 Ian Lance Taylor <iant@google.com>
56
57 * lto-object.c: New file.
58 * lto-elf.c: Remove file.
59 * lto-macho.c: Remove file.
60 * lto-macho.h: Remove file.
61 * lto-coff.c: Remove file.
62 * lto-coff.h: Remove file.
63 * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to
64 lto/lto-object.o.
65 ($(LTO_EXE)): Remove $(LTO_USE_LIBELF)
66 (lto/lto-objfile.o): New target.
67 (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets.
68 (lto/lto.o): Remove $(LIBIBERTY_H).
69
030cd86c
JH
702010-10-22 Jan Hubicka <jh@suse.cz>
71
72 * lto.c (add_cgraph_node_to_partition,
73 add_varpool_node_to_partition): Add debug info.
74 (lto_1_to_1_map, lto_balanced_map): Do not re-add already
75 partitioned nodes.
76 (do_whole_program_analysis): Set function flags before dumping.
77
4490cae6
RG
782010-10-22 Richard Guenther <rguenther@suse.de>
79
80 * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via
81 the new gimple_register_canonical_type.
82
703cdce3
L
832010-10-20 H.J. Lu <hongjiu.lu@intel.com>
84
85 PR bootstrap/45954
86 * config-lang.in (boot_language): Set to $enable_lto.
87
1915c739
JJ
882010-10-18 Jakub Jelinek <jakub@redhat.com>
89
90 PR lto/45638
91 * Make-lang.in (check-lto): New dummy target.
92
82971de5
EB
932010-10-14 Eric Botcazou <ebotcazou@adacore.com>
94
95 * lto-elf.c (SHN_XINDEX): Define if not already defined.
96
a75bfaa6
JM
972010-10-08 Joseph Myers <joseph@codesourcery.com>
98
99 * lto-lang.c (lto_init_options): Change to
100 lto_init_options_struct. Update parameters.
101 (LANG_HOOKS_INIT_OPTIONS): Don't define.
102 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
103
937f7f69
JH
1042010-10-06 Jan Hubicka <jh@suse.cz>
105
106 * lto.c (lto_balanced_map): Fix accounting of program size.
107
2169830c
JH
1082010-10-06 Jan Hubicka <jh@suse.cz>
109
110 * lto.c (lto_balanced_map): Do not produce empty partitions.
111
6e9bd0f8
AK
1122010-10-06 Andi Kleen <ak@linux.intel.com>
113
114 * lto.c (lto_process_name): Add.
115 (lto_main): Call lto_process_name.
116
06ed016f
JH
1172010-10-06 Jan Hubicka <jh@suse.cz>
118
119 * lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle
120 COMDATs required by the linker.
121
ae718d66
ILT
1222010-10-05 Ian Lance Taylor <iant@google.com>
123
124 * lto.c (lto_section_with_id): Make s a const pointer.
125
852e4bd2
JH
1262010-10-05 Jan Hubicka <jh@suse.cz>
127
128 * lto.c: Include params.h.
129 (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do
130 refcounting in aux field.
131 (undo_partition, partition_cgraph_node_p, partition_varpool_node_p):
132 New functions.
133 (lto_1_to_1_map): Simplify.
134 (lto_balanced_map): New function.
135 (do_whole_program_analysis): Chose proper partitioning alg.
136 * Make-lang.in (lto.o): Add dependency on params.h
137
a90163e9
AK
1382010-10-04 Andi Kleen <ak@linux.intel.com>
139
140 * Make-lang.in (lto1): Add + to build rule.
141
f1e92a43
AK
1422010-10-03 Andi Kleen <ak@linux.intel.com>
143
144 * lto.c (lto_file_finalize): Replace gcc_assert for missing section
145 with fatal_error.
146
0d6e14fd
JH
1472010-09-28 Jan Hubicka <jh@suse.cz>
148
149 * lto-lang.c (handle_leaf_attribute): New function.
150 (lto_attribute_tables): Add leaf.
151
fb462383
JZ
1522010-09-25 Jie Zhang <jie@codesourcery.com>
153
154 * lto.c (lto_read_all_file_options): Start a new line after
155 printing out file names.
156
051f8cc6
JH
1572010-09-24 Jan Hubicka <jh@suse.cz>
158
159 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
160
64e0f5ff
JH
1612010-09-20 Jan Hubicka <jh@suse.cz>
162
163 PR tree-optimize/45605
164 * lto.c (lto_promote_cross_file_statics): Use const_value_known_p.
165
a929ec3d
GP
1662010-09-18 Gerald Pfeifer <gerald@pfeifer.com>
167
168 * lto-elf.c (lto_obj_file_open): Also provide filename when
169 elf_begin fails.
170
4c588abf
JH
1712010-09-17 Jan Hubicka <jh@suse.cz>
172
173 * lto.c (lto_promote_cross_file_statics): Use const_value_known.
174
c3224d6f
RG
1752010-09-17 Richard Guenther <rguenther@suse.de>
176
177 * lang.opt (flag_wpa): Also enable for the driver.
178
52b3b3c7
JH
1792010-09-16 Jan Hubicka <jh@suse.cz>
180
181 * lto.c (lto_materialize_function): Do not tamper with STATIC and
182 EXTERNAL flags.
183
969c37b7
LB
1842010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
185
186 * lto-tree.h (struct lang_type): Add variable_size GTY option.
187
098a4f50
JH
1882010-09-08 Jan Hubicka <jh@suse.cz>
189
190 * lto.c (real_file_count, real_file_decl_data): New static vars.
191 (read_cgraph_and_symbols): Use it.
192
0f443ad0
RG
1932010-09-08 Richard Guenther <rguenther@suse.de>
194
195 * lto.c (read_cgraph_and_symbols): Collect again after each
196 file.
197
ee187353
JH
1982010-09-07 Jan Hubicka <jh@suse.cz>
199
200 * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
201
b3ec52d0
RG
2022010-09-03 Richard Guenther <rguenther@suse.de>
203
204 * lto-elf.c (validate_file): Always error if validation fails.
205
f1395d4a
JH
2062010-08-20 Jan Hubicka <jh@suse.cz>
207
208 * lto.c (lto_1_to_1_map): Be prepared for node to have no file data.
209 (lto_wpa_write_files): Update comments.
210
2429bce3
L
2112010-08-20 H.J. Lu <hongjiu.lu@intel.com>
212
213 PR bootstrap/45357
214 * lto.c (lto_materialize_function): Replace has_analyzed_clone
215 with has_analyzed_clone_p.
216
e0f967db
JH
2172010-08-20 Jan Hubicka <jh@suse.cz>
218
219 * lto.c (has_analyzed_clone_p): New function
220 (lto_materialize_function): Use callgraph to determine if
221 body is needed.
222 (materialize_cgraph): Remove DECL_IS_BUILTIN check.
223
ac47786e
NF
2242010-08-20 Nathan Froyd <froydnj@codesourcery.com>
225
226 * lto.c: Use FOR_EACH_VEC_ELT.
227
d720b869
AK
2282010-07-27 Andi Kleen <ak@linux.intel.com>
229
230 * Make-lang.in (lto.o): Add dependency to splay-tree.h
231
5f20c657
JM
2322010-07-27 Joseph Myers <joseph@codesourcery.com>
233
234 * lto-lang.c (lto_handle_option): Update prototype and return
235 value type. Remove duplicate assignment to result.
236
7a9bf9a4
JM
2372010-07-27 Joseph Myers <joseph@codesourcery.com>
238
239 * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p):
240 New.
241 (lto_init_options): Update prototype.
242 (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P):
243 Define.
244
73ce4d1e
AK
2452010-07-10 Andi Kleen <ak@linux.intel.com>
246
247 PR lto/44992
248 * lto.c: Include splay-tree.h
249 (lto_resolution_read): Change to walk file_ids tree and parse
250 extra file_id in resolution file.
251 (lto_section_with_id): Add.
252 (create_subid_section_table): Add.
253 (lwstate): Add.
254 (lto_create_files_from_ids): Add.
255 (lto_file_read): Change to handle sub file ids and create list
256 of file_datas. Add output argument for count.
257 (get_section_data): Pass file_data to lto_get_section_name.
258 (lto_flatten_file): Add.
259 (read_cgraph_and_symbols): Handle linked lists of file_datas.
260
2994ee14
AK
2612010-07-10 Andi Kleen <ak@linux.intel.com>
262
263 * lto-coff.c (hash_name, eq_name): Move.
264 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
265 * lto-elf.c: (hash_name, eq_name): Move.
266 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
267 * lto-macho.c: (hash_name, eq_name): Move.
268 (lto_obj_build_section_table): Call lto_obj_create_section_hash_table.
269 * lto.c: (hash_name, eq_name): Move from lto-*.c
270 (lto_obj_create_section_hash_table): Add.
271 (free_with_string): Add.
272
718f9c0f
MLI
2732010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
274
275 * lto-coff.c: Include diagnostic-core.h in every file that
276 includes toplev.h.
277 * lto-elf.c: Likewise.
278 * lto-lang.c: Likewise.
279 * lto-macho.c: Likewise.
280
1b137837
JJ
2812010-07-07 Jakub Jelinek <jakub@redhat.com>
282
283 * lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
284 (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
285 objects.
286
92eb4438
JH
2872010-07-05 Jan Hubicka <jh@suse.cz>
288
289 * lto.c (add_cgraph_node_to_partition): Forward declare; walk also
290 nodes from same comdat group as well as all comdat functions referenced
291 here.
292 (add_varpool_node_to_partition, add_references_to_partition): New function.
293 (lto_1_1_map): Skip COMDAT fnctions/variables; use add_varpool_node_to_partition;
294 clear aux flags when done.
295 (lto_promote_cross_file_statics): Do not promote stuff that gets duplicated to
296 each ltrans.
297
a05541a9
JH
2982010-07-04 Jan Hubicka <jh@suse.cz>
299
300 * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
301
4a2ac96f
RG
3022010-06-13 Richard Guenther <rguenther@suse.de>
303
304 * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
305
1d536046
KT
3062010-06-09 Kai Tietz <kai.tietz@onevision.com>
307
308 * lto.c (lto_resolution_read): Pre-initialize local variable r.
309 * lto-coff.c (coff_write_object_file): Add braces to if.
310
a9429e29
LB
3112010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
312
313 * lto.c (lto_read_in_decl_state): Use typed GC allocation.
314 (lto_file_read): Likewise.
315 (new_partition): Likewise.
316 (read_cgraph_and_symbols): Likewise.
317
5498f011
JM
3182010-06-07 Joseph Myers <joseph@codesourcery.com>
319
320 * lto-lang.c (flag_no_builtin, flag_no_nonansi_builtin): Remove.
321 (lto_handle_option): Don't set flag_signed_char here.
322
d4c0c9f6
RG
3232010-06-04 Richard Guenther <rguenther@suse.de>
324
325 PR lto/41584
326 * lto.c (lto_1_to_1_map): Use the proper file_data for
327 varpool nodes.
328
0a5fa5a1
JH
3292010-05-30 Jan Hubicka <jh@suse.cz>
330
331 * lto.c (promote_var, promote_fn, lto_wpa_write_files): Dump
332 partitioning decisions.
333
9eec9488
JH
3342010-05-29 Jan Hubicka <jh@suse.cz>
335
336 * lto.c (bitmap vector): Remove.
337 (lto_cgraph_node_sets, lto_varpool_node_sets): Remove.
338 (ltrans_partition_def): New structure.
339 (ltrans_partition): New type and VECtor.
340 (new_partition): New function.
341 (add_cgraph_node_to_partition): New function.
342 (lto_1_to_1_map): Reorganize for partitions.
343 (lto_add_inline_clones): Remove.
344 (lto_add_all_inlinees): Remove.
345 (lto_promote_cross_file_statics): Use partitions.
346 (cmp_partitions): New function.
347 (lto_wpa_write_files): Do not call lto_add_all_inlinees;
348 use partitions; output files sorted by size.
349
3e097227
SB
3502010-05-29 Steven Bosscher <steven@gcc.gnu.org>
351
352 * Make-lang.in: Replace vec.h dependency with VEC_H.
353
7ca92787
JM
3542010-05-28 Joseph Myers <joseph@codesourcery.com>
355
356 * lto-coff.c (coff_errmsg): Remove.
357 (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in
358 errors instead of coff_errmsg (-1).
359 * lto-macho.c (mach_o_errmsg): Remove.
360 (lto_obj_begin_section, lto_obj_append_data): Use %m in errors
361 instead of mach_o_errmsg (-1).
362 * lto.c (read_cgraph_and_symbols): Use %m in errors instead of
363 xstrerror (errno).
364
b5611987
RG
3652010-05-28 Richard Guenther <rguenther@suse.de>
366
367 * lto.c (prefix_name_with_star): Removed.
368 (strip_extension): Likewise.
369 (get_filename_for_set): Likewise.
370 (lto_write_ltrans_list): Fold into ...
371 (lto_wpa_write_files): ... this. Name LTRANS units
372 by suffixing the ltrans output list filename.
373 (do_whole_program_analysis): Adjust.
374
1da2ed5f
JM
3752010-05-27 Joseph Myers <joseph@codesourcery.com>
376
377 * lto.c: Include diagnostic-core.h instead of diagnostic.h.
378 (read_cgraph_and_symbols, lto_main): Use seen_error.
379 * Make-lang.in (lto/lto.o): Update dependencies.
380
7951d88a
EB
3812010-05-27 Eric Botcazou <ebotcazou@adacore.com>
382
383 PR lto/44230
384 * lto.h (lto_eh_personality): New prototype.
385 * lto.c: Include debug.h.
386 (first_personality_decl): New static variable.
387 (lto_materialize_function): Set it to DECL_FUNCTION_PERSONALITY of the
388 first function for which it is non-null.
389 (lto_eh_personality_decl): New static variable.
390 (lto_eh_personality): New function.
391 * lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
392 * Make-lang.in (lto/lto.o): Add dependency on debug.h.
393
e12da9c2
SB
3942010-05-26 Steven Bosscher <steven@gcc.gnu.org>
395
396 * lto-lang.c: Do not include expr.h.
397
468194f4
RG
3982010-05-24 Richard Guenther <rguenther@suse.de>
399
400 * lto-elf.c (lto_obj_build_section_table): Work around
401 FreeBSD libelf issue.
402
bd9eb5da
RG
4032010-05-22 Richard Guenther <rguenther@suse.de>
404
405 * lto.c (read_cgraph_and_symbols): Do not collect.
406
66576e1b
JH
4072010-05-20 Jan Hubicka <jh@suse.cz>
408
409 * lto.c (promote_var, promote_fn): New functions.
410 (lto_promote_cross_file_statics): Compute correctly boundary including
411 static initializers of readonly vars.
412
36576655
JH
4132010-05-18 Jan Hubicka <jh@suse.cz>
414
66576e1b 415 * lto.c (lto_1_to_1_map): Partition non-inline clones.
36576655
JH
416 (lto_promote_cross_file_statics): Deal with non-inline clones.
417
28632d63
JH
4182010-05-18 Jan Hubicka <jh@suse.cz>
419
420 * lto.c (lto_materialize_function): Announce function when
421 reading body; allocate_struct_function only when reading body;
422 do not finalize local statics; ggc_collect after reading;
423 do not mark reachable node.
424 (materialize_cgraph): Do not announce function.
425
33e42d56
JH
4262010-05-11 Jan Hubicka <jh@suse.cz>
427
428 * lto.c (materialize_cgraph): Revert my previous patch.
429
f6430ea5
KT
4302010-05-11 Kai Tietz <kai.tietz@onevision.com>
431
432 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Rename to
433 IMAGE_FILE_MACHINE_AMD64.
434 * lto-coff.c (IMAGE_FILE_MACHINE_ADM64): Likewise.
435
0a0b07b7
JH
4362010-05-11 Jan Hubicka <jh@suse.cz>
437
438 * lto.c (lto_fixup_decls): Remove global var decls freeing here.
439 (materialize_cgraph): Add it here.
440
9a809897
JH
4412010-05-11 Jan Hubicka <jh@suse.cz>
442
443 * lto.c (lto_fixup_decls): Free no longer needed lto_global_var_decls
444 vector.
445
4462010-05-11 Jan Hubicka <jh@suse.cz>
447
448 * lto.c (lto_1_to_1_map): Remove some no longer needed checks.
449 (lto_promote_cross_file_statics): Never promote DECL_EXTERNAL;
450 use reachable_from_other_partition_p and
451 referenced_from_other_partition_p test.
452
94f64249
KT
4532010-05-11 Kai Tietz <kai.tietz@onevision.com>
454
455 * lto-coff.c (validate_file): Add x64-coff support.
456 * lto-coff.h (IMAGE_FILE_MACHINE_ADM64): New.
457 (COFF_KNOWN_MACHINES): Add IMAGE_FILE_MACHINE_ADM64.
458 * lto-lang.c (lto_build_c_type_nodes): Add check for
459 'long long unsigned int' for x64-windows.
460 (lto_init): Likewise.
461
462
c082f9f3
SB
4632010-05-07 Steven Bosscher <steven@gcc.gnu.org>
464
465 * lto.h (struct lto_file_struct): Document offset member.
466 * lto-endian.h: New file.
467 * lto-macho.h: New file.
468 * lto-macho.c: New file.
469 * Make-lang.in: Add rule for lto-macho.o.
470
5cd0e96b
RG
4712010-05-07 Richard Guenther <rguenther@suse.de>
472
473 PR lto/43857
474 PR lto/43371
475 * lang.opt (fresolution): Change to ...
476 (fresolution=): ... this.
477 * lto-lang.c (lto_handle_option): Adjust.
478
48cf395b
RB
4792010-05-07 Richard Guenther <rguenther@suse.de>
480
481 * lto.c (DUMPBASE_SUFFIX): Remove.
482 (lto_execute_ltrans): Move functionality to lto-wrapper.c.
483 Rename to ...
484 (lto_write_ltrans_list): ... only output the list of ltrans files.
485 (lto_maybe_unlink): Remove.
486 (do_whole_program_analysis): Do not execute LTRANS phase
487 from here.
488
afa83c15
L
4892010-05-06 H.J. Lu <hongjiu.lu@intel.com>
490
491 * lto-lang.c (lto_handle_option): Add argument kind.
492
369451ec
JH
4932010-05-05 Jan Hubicka <jh@suse.cz>
494
48cf395b
RB
495 * lto.c (lto_promote_cross_file_statics): Compute boundary based on
496 refs.
369451ec 497
2f41ecf5
JH
4982010-05-05 Jan Hubicka <jh@suse.cz>
499
500 * lto.c (lto_1_to_1_map): Partition only needed nodes.
501
ace72c88
JH
5022010-04-30 Jan Hubicka <jh@suse.cz>
503
504 * lto.c (get_filename_for_set): Look for cgraph node and if none found, use
505 default name.
506 (lto_wpa_write_files): Write any non-empty partition.
507
05575e07
JH
5082010-04-30 Jan Hubicka <jh@suse.cz>
509
510 * lto.c: Do not attempt to make constant pool references global.
511
49ba8180
JH
5122010-04-28 Jan Hubicka <jh@suse.cz>
513
514 * lto/lto.c (lto_read_in_decl_state): Use GGC.
515 (lto_wpa_write_files): Announce what we are writting.
516 (all_file_decl_data): New.
517 (read_cgraph_and_symbols): Use GGC; correct timevars.
518 (do_whole_program_analysis): Collect.
519 * lto/Make-lang.in (lto.o): Fix dependency.
520 * Makefile.in (GTFILES): Add lto-streamer.h.
521 * varpool.c (varpool_analyze_pending_decls): Use TV_VARPOOL.
522 (varpool_assemble_pending_decls): Use VAROUT.
523 * lto-streamer.h (lto_tree_ref_table): Annotate.
524 (lto_in_decl_state): Annotate.
525 (lto_file_decl_data): Annotate.
526
2942c502
JH
5272010-04-28 Jan Hubicka <jh@suse.cz>
528
529 * lto.c (lto_varpool_node_sets): New.
530 (lto_1_to_1_map): Partition varpool too.
531 (globalize_context_t, globalize_cross_file_statics,
532 lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node,
533 lto_scan_statics_in_remaining_global_vars): Remove.
534 (lto_promote_cross_file_statics): Rewrite.
535 (get_filename_for_set): Take vset argument.
536 (lto_wpa_write_files): Pass around vsets.
537
3bec79c5
DK
5382010-04-27 Dave Korn <dave.korn.cygwin@gmail.com>
539
540 PR lto/42776
541 * Make-lang.in (LTO_OBJS): Use LTO_BINARY_READER instead of
542 hardcoding 'lto-elf.o'.
543 ($(LTO_EXE)): Use LTO_USE_LIBELF instead of hardcoding '-lelf'.
544
545 * lto-coff.h: New file.
546 * lto-coff.c: Likewise.
547
21aac880
RG
5482010-04-26 Richard Guenther <rguenther@suse.de>
549
550 * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.
551
2cee0101
DK
5522010-04-26 Dave Korn <dave.korn.cygwin@gmail.com>
553
554 * lto.h (lto_elf_file_open): Rename prototype from this ...
555 (lto_obj_file_open): ... to this.
556 (lto_elf_file_close): Likewise ...
557 (lto_obj_file_close): ... and likewise.
558 (lto_elf_build_section_table): Likewise ...
559 (lto_obj_build_section_table): ... and likewise.
560 (lto_elf_begin_section): Likewise ...
561 (lto_obj_begin_section): ... and likewise.
562 (lto_elf_append_data): Likewise ...
563 (lto_obj_append_data): ... and likewise.
564 (lto_elf_end_section): Likewise ...
565 (lto_obj_end_section): ... and likewise.
566 * lto.c (lto_file_read): Update references to the above.
567 (lto_wpa_write_files): Likewise.
568 (lto_read_all_file_options): Likewise.
569 (read_cgraph_and_symbols): Likewise.
570 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Likewise.
571 (LANG_HOOKS_APPEND_DATA): Likewise.
572 (LANG_HOOKS_END_SECTION): Likewise.
573 * lto-elf.c (lto_elf_file_open): Rename from this ...
574 (lto_obj_file_open): ... to this, updating any references.
575 (lto_elf_file_close): Likewise ...
576 (lto_obj_file_close): ... and likewise.
577 (lto_elf_build_section_table): Likewise ...
578 (lto_obj_build_section_table): ... and likewise.
579 (lto_elf_begin_section): Likewise ...
580 (lto_obj_begin_section): ... and likewise.
581 (lto_elf_append_data): Likewise ...
582 (lto_obj_append_data): ... and likewise.
583 (lto_elf_end_section): Likewise ...
584 (lto_obj_end_section): ... and likewise.
585
bc58d7e1
JH
5862010-04-21 Jan Hubicka <jh@suse.cz>
587
588 * lto.c (lto_fixup_tree): Do not call wpa fixup.
589 (materialize_cgraph): Likewise.
590
e792884f
JH
5912010-04-21 Jan Hubicka <jh@suse.cz>
592
593 * lto.c (lto_wpa_write_files): Update.
594 (read_cgraph_and_symbols): Be more verbose.
595 (materialize_cgraph): Likewise.
596 (do_whole_program_analysis): Likewise.
597
c9945504
JH
5982010-04-21 Jan Hubicka <jh@suse.cz>
599
600 * lto.c (globalize_cross_file_statics): When function has address taken,
601 it needs to be public.
602
a837268b
JH
6032010-04-20 Jan Hubicka <jh@suse.cz>
604
605 * lto.c (lto_add_inline_clones): Do not track inlined_decls.
606 (lto_add_all_inlinees): Likewise.
607 (lto_wpa_write_files): Likewise.
608
3b9e5d95
EB
6092010-04-18 Eric Botcazou <ebotcazou@adacore.com>
610
611 * lto-lang.c (lto_init): Remove second argument in call to
612 build_common_tree_nodes.
613
8ccb78f2
RO
6142010-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
615
616 * lto-elf.c [!HAVE_ELF_GETSHDRSTRNDX] (elf_getshdrstrndx): New
617 function.
618
2f9b99e6
EB
6192010-03-09 Eric Botcazou <ebotcazou@adacore.com>
620
621 PR bootstrap/43276
622 * lto-elf.c: Define EM_* constants if not already defined.
623
bef7d288
EB
6242010-03-03 Eric Botcazou <ebotcazou@adacore.com>
625
626 * lto-elf.c (is_compatible_architecture): New static function.
627 (DEFINE_VALIDATE_EHDR): Use it to validate the architecture.
628
f68df07c
RG
6292010-02-11 Richard Guenther <rguenther@suse.de>
630
631 PR driver/43021
632 * lto-elf.c (lto_elf_file_open): Handle file@offset case more
633 appropriately.
634
3cdea2b4
AH
6352010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
636
637 * lto.c (O_BINARY): Define.
638 (lto_read_section_data): Open file in binary mode.
639 * lto-elf.c (O_BINARY): Define.
640 (lto_elf_file_open): Open file in binary mode.
641
c59449fa
RG
6422010-01-08 Richard Guenther <rguenther@suse.de>
643
644 PR lto/42528
645 * lto-lang.c (lto_handle_option): Handle -f[un]signed-char.
646 (lto_init): Do not init char_type_node in a standard way
647 but according to flag_signed_char.
648
d7fb0a6d
L
6492010-01-03 H.J. Lu <hongjiu.lu@intel.com>
650
651 PR lto/41564
652 * lto.c (DUMPBASE_SUFFIX): New.
653 (lto_execute_ltrans): Append a sequence number to -dumpbase
654 for LTRANS.
655
78ce4053
L
6562010-01-02 H.J. Lu <hongjiu.lu@intel.com>
657
658 PR lto/42580
659 * lto-elf.c (lto_elf_file_open): Stop if the command line
660 option file is missing.
661
2a71eb48
RG
6622009-12-15 Richard Guenther <rguenther@suse.de>
663
664 * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
665 (lto_post_options): Do not disable debuginfo.
666
a818bca1
DG
6672009-12-14 Dmitry Gorbachev <d.g.gorbachev@gmail.com>
668
669 * Make-lang.in ($(LTO_EXE)): Use $(LINKER).
670
e7d00517
RG
6712009-12-11 Richard Guenther <rguenther@suse.de>
672
673 PR lto/42037
674 * lto.c (lto_resolution_read): Properly grow the vector.
675
1ab53893
RG
6762009-12-11 Richard Guenther <rguenther@suse.de>
677
678 PR lto/41915
679 * lto-lang.c (lto_init_options): Initialize flag_complex_method
680 to the C99 default. Do not set flag_unit_at_a_time.
681
0f900dfa
JJ
6822009-11-28 Jakub Jelinek <jakub@redhat.com>
683
684 * lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
685 variable.
686
92fa7608
RAE
6872009-11-19 Rafael Avila de Espindola <espindola@google.com>
688
689 PR bootstrap/42096
690 * lto-elf.c (lto_elf_file_open): Use lto_parse_hex.
691 * lto.c (lto_parse_hex): New.
692 (lto_resolution_read): Use lto_parse_hex.
693 * lto.h (lto_parse_hex): New.
694
9870fe4f
RAE
6952009-11-17 Rafael Avila de Espindola <espindola@google.com>
696
697 * lto-elf.c (lto_file_init): Add offset argument.
698 (lto_elf_file_open): Record the offset.
699 * lto.c (lto_resolution_read): Change file_name into a lto_file
700 argument. Check offsets.
701 (lto_file_read): Update call to lto_resolution_read.
702 * lto.h (lto_file_struct): Add the offset field.
703
1b70729f
RAE
7042009-11-16 Rafael Avila de Espindola <espindola@google.com>
705
706 * lto-elf.c (lto_elf_file_open): Use strtoll to parse the offset.
707
0e3776db
JH
7082009-11-14 Jan Hubicka <jh@suse.cz>
709
710 * lto.c (read_cgraph_and_symbols): Set also ipa_transforms_to_apply.
711
06bd7f56
RAE
7122009-11-12 Rafael Avila de Espindola <espindola@google.com>
713
714 * lang.opt (fresolution): Renamed from resolution.
715 * lto-lang.c (lto_handle_option): Handle new option name.
716 * lto.c (lto_resolution_read): Add more checks. Discard rest of line.
717
7e9dc421
RG
7182009-11-04 Richard Guenther <rguenther@suse.de>
719 Rafael Avila de Espindola <espindola@google.com>
720
721 * lto-elf.c (lto_elf_build_section_table): Add the base offset.
722 (lto_elf_file_open): Handle offsets in arguments name@offest.
723
b207f900
RG
7242009-10-30 Richard Guenther <rguenther@suse.de>
725
726 PR lto/41858
727 * lto.c (lto_file_read): Do not set file_data->fd.
728 (lto_read_section_data): Use a single-entry file-descriptor cache.
729 Do not check the result of xmalloc.
730 (free_section_data): Do not use file_data->fd.
731 (lto_read_all_file_options): Likewise.
732
2c928155
RG
7332009-10-22 Richard Guenther <rguenther@suse.de>
734
735 * lto.c (lto_fixup_jump_functions): Remove.
736 (lto_fixup_decls): Do not fixup jump functions.
737 (read_cgraph_and_symbols): Schedule cgraph merging after
738 summary reading. Schedule type and decl fixup before
739 summary reading.
740
f9c91f8a
RB
7412009-10-22 Richard Guenther <rguenther@suse.de>
742
743 * lto.c (lto_fixup_data_t): Remove free_list member.
744 (lto_fixup_tree): Do not insert into free_list.
745 (free_decl): Remove.
746 (lto_fixup_decls): Remove free-list handling.
747
fb3f88cc
JH
7482009-10-22 Jan Hubicka <jh@suse.cz>
749
750 * lto.c (lto_fixup_jump_functions): New function.
751 (lto_fixup_decls): Use it.
752
35f1e9f4
RG
7532009-10-16 Richard Guenther <rguenther@suse.de>
754
755 PR lto/41715
756 * lto.c (lto_fixup_tree): Revert last change.
757
200c8750
RG
7582009-10-14 Richard Guenther <rguenther@suse.de>
759
760 * lto.c (lto_fixup_tree): In case the prevailing decl is not
761 compatible with the one we replace wrap it around a
762 VIEW_CONVERT_EXPR.
763
b1b07c92
RG
7642009-10-09 Richard Guenther <rguenther@suse.de>
765
766 PR lto/41635
767 PR lto/41636
768 * lto.c (read_cgraph_and_symbols): Do not assert we can open
769 a file.
770 * lto-elf.c (init_shdr##BITS): Fix i18n problems.
771 (init_ehdr##BITS): Likewise.
772
3c2e7d45
JM
7732009-10-08 Joseph Myers <joseph@codesourcery.com>
774
775 * lto-elf.c (init_shdr##BITS, lto_elf_begin_section_with_type,
776 init_ehdr##BITS, lto_elf_file_close): Remove trailing "." from
777 diagnostics.
778 * lto-lang.c (lto_post_options): Remove trailing "." from
779 diagnostics.
780
0d0bfe17
RG
7812009-10-08 Richard Guenther <rguenther@suse.de>
782
783 * lto.c (read_cgraph_and_symbols): Free the gimple type merging
784 hash tables.
785
4bedf19a
JM
7862009-10-07 Joseph Myers <joseph@codesourcery.com>
787
788 * lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
789
b20996ff
JH
7902009-10-07 Jan Hubicka <jh@suse.cz>
791
792 * lto.c (read_cgraph_and_symbols): Mark functions neccesary only at
793 ltrans stage; explain why this is needed and should not.
794
1a735925
RG
7952009-10-05 Richard Guenther <rguenther@suse.de>
796
797 PR lto/41552
798 PR lto/41487
799 * lto.c (lto_read_decls): Do not register deferred decls.
800 (read_cgraph_and_symbols): Delay symbol and cgraph merging
801 until after reading the IPA summaries.
802
d7f09764
DN
8032009-10-02 Rafael Avila de Espindola <espindola@google.com>
804
805 * Make-lang.in (lto/lto-lang.o): Don't depend on lto/common.h.
806 (lto-lang.c): Don't include lto/common.h.
807
8082009-10-02 Rafael Avila de Espindola <espindola@google.com>
809
810 * Make-lang.in (LTO_OBJS): Remove lto/common.o.
811 (lto/common.o): Remove.
812 * common.c: Remove.
813 * common.h (lto_kind_str): Remove.
814 (lto_visibility_str): Remove.
815 (lto_resolution_str): Make it static.
816
8172009-10-01 Diego Novillo <dnovillo@google.com>
818
819 * lto.c (lto_read_decls): Add comment.
820 Call internal_error instead of gcc_assert.
821 (lto_resolution_read): Likewise.
822 (lto_add_all_inlinees): Tidy.
823 * Make-lang.in: Fix copyright boilerplate.
824 (lto.pdf): New.
825 (lto.install-pdf): New.
826 * lto-tree.h: Fix copyright boilerplate.
827 * lang-specs.h: Likewise.
828 Remove ".lto" entry from compilers fragment.
829 * lto-elf.c: Move inclusion of gelf.h after config.h.
830 Tidy formatting everywhere.
831 * lto.h: Fix copyright boilerplate.
832 Tidy formatting everywhere.
833 * common.c: Likewise.
834 * config-lang.in: Likewise.
835 * common.h: Likewise.
836 * lto-lang.c: Likewise.
837
8382009-10-01 Richard Guenther <rguenther@suse.de>
839
840 * lto.c (lto_read_section_data): Use plain lseek/read.
841
8422009-10-01 Richard Guenther <rguenther@suse.de>
843
844 * lto.c (LTO_MMAP_IO): Define if we can mmap files and
845 use sysconf to query the system page size.
846 (lto_file_read): Implement fallback using stdio.
847 (free_section_data): Likewise.
848
8492009-09-29 Diego Novillo <dnovillo@google.com>
850
851 * lto-lang.c (lto_init): Really fix call to
852 build_common_builtin_nodes.
853
8542009-09-29 Diego Novillo <dnovillo@google.com>
855
856 * lto-lang.c (lto_init): Fix call to
857 build_common_builtin_nodes.
858
8592009-09-29 Richard Guenther <rguenther@suse.de>
860
861 PR lto/40754
862 * lto-elf.c (init_shdr##BITS): Properly specify alignment
863 in bytes.
864 (first_data_block): New static variable.
865 (lto_elf_append_data): Align the first data block in each
866 section.
867
8682009-09-28 Diego Novillo <dnovillo@google.com>
869
870 * lto-lang.c: Tidy. Remove stale FIXME lto markers.
871 * lto.c (strip_extension): New.
872 (get_filename_for_set): Call it. Do not call make_cwd_temp_file.
873 (lto_execute_ltrans): Tidy.
874 Do not pass -fwpa nor -fltrans-* to LTRANS.
875 * opts.c: Tidy formatting and remove stale FIXME lto markers.
876 * tree.c (need_assembler_name_p): Call
877 lang_hooks.decls.may_need_assembler_name_p if set.
878 * varasm.c (default_binds_local_p_1): Remove check for
879 flag_ltrans.
880 * varpool.c (decide_is_variable_needed): Do not test for
881 in_lto_p.
882
8832009-09-22 Richard Guenther <rguenther@suse.de>
884
885 PR lto/39276
886 * lto.c (lto_execute_ltrans): Perform ltrans phase manually.
887 * Make-lang.in: Remove ltrans-driver stuff.
888 * config-lang.in: Likewise.
889 * lang.opt (fltrans-driver): Remove.
890 * lto-lang.c (lto_init_options): Remove code initializing
891 ltrans_driver.
892 * ltrans-driver: Remove.
893
8942009-09-21 Diego Novillo <dnovillo@google.com>
895
896 * lto-lang.c (lto_define_builtins): Remove superfluous
897 calls to targetm.init_builtins and build_common_builtin_nodes.
898 (lto_init): Add targetm.arm_eabi_unwinder as parameter to
899 build_common_builtin_nodes.
900 * lto.c (lto_materialize_function): Do nothing if NODE is a
901 clone.
902
9032009-09-03 Diego Novillo <dnovillo@google.com>
904
905 * lto-elf.c (validate_file): Replace call to
906 elf_getshstrndx with call to elf_getshdrstrndx.
907
9082009-08-19 Richard Guenther <rguenther@suse.de>
909
910 * lto-lang.c (lto_init): Merge char_type_node with the
911 appropriately signed variant.
912
9132009-08-19 Richard Guenther <rguenther@suse.de>
914
915 PR lto/41071
916 * lto.c (lto_fixup_common): Re-build the pointer-to chain part one.
917 (lto_fixup_type): Re-build the pointer-to chain part two.
918
9192009-08-19 Richard Guenther <rguenther@suse.de>
920
921 PR lto/41071
922 * lto.c (lto_fixup_type): Re-build the type variant chain.
923
9242009-08-19 Richard Guenther <rguenther@suse.de>
925
926 PR lto/41071
927 * lto.c (lto_fixup_constructor): New function.
928 (lto_fixup_tree): Replace all types. Properly fixup
929 constructors and constants.
930
9312009-08-14 Richard Guenther <rguenther@suse.de>
932
933 * lto.c (read_cgraph_and_symbols): Exchange TREE_CHAIN use
934 for DECL_LANG_SPECIFIC.
935
9362009-08-13 Richard Guenther <rguenther@suse.de>
937
938 PR lto/41032
939 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define to NULL.
940
9412009-07-30 Richard Guenther <rguenther@suse.de>
942
943 PR lto/40903
944 * lto.c (read_cgraph_and_symbols): After fixing up decls choose
945 the largest decl for output and free TREE_CHAIN for further
946 use.
947
9482009-07-24 Diego Novillo <dnovillo@google.com>
949
950 * Make-lang.in: Add empty lto.install-plugin target.
951
9522009-07-13 Diego Novillo <dnovillo@google.com>
953
954 * lto.c (lto_fixup_tree): Handle IMPORTED_DECL.
955
9562009-07-11 Richard Guenther <rguenther@suse.de>
957
958 * lto-lang.c (lto_write_globals): Wrapup global decls.
959
9602009-07-10 Richard Guenther <rguenther@suse.de>
961
962 * lto-lang.c (lto_init): Allocate one more location to make
963 BUILTINS_LOCATION correct.
964
9652009-07-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
966
967 * lto.c (free_section_data): Cast computed_offset to caddr_t.
968
9692009-07-06 Diego Novillo <dnovillo@google.com>
970
971 * lto.c (lto_fixup_type): Fixup TYPE_SIZE and
972 TYPE_SIZE_UNIT.
973
9742009-07-06 Diego Novillo <dnovillo@google.com>
975
976 * lto.c (preload_common_nodes): Remove.
977 (lto_read_in_decl_state): Call lto_streamer_cache_get.
978 (lto_read_decls): Call lto_data_in_create and
979 lto_data_in_delete.
980 (free_decl): Do not call ggc_free.
981 (lto_main): Call lto_init_reader.
982 * lto-lang.c (lto_type_for_size): Handle intTI_type_node.
983 (lto_init): Initialize main_identifier_node if needed.
984 Make ptrdiff_type_node be integer_type_node.
985
9862009-06-19 Diego Novillo <dnovillo@google.com>
987
988 * lto.c: Remove code guarded by #ifdef LTO_STREAM_DEBUGGING.
989 Remove code guarded by #ifdef GLOBAL_STREAMER_TRACE.
990 Remove code guarded by #ifdef LOCAL_TRACE.
991
9922009-06-18 Diego Novillo <dnovillo@google.com>
993
994 * lto.c: Update license to GPLv3.
995 * lto-elf.c: Likewise.
996 * common.c: Likewise.
997 * lto-lang.c: Likewise.
998 * lto.h: Remove superfluous include files. Update all
999 users.
1000
10012009-06-17 Diego Novillo <dnovillo@google.com>
1002
1003 * lto.c (read_cgraph_and_symbols): Call input_cgraph.
1004
10052009-06-02 Diego Novillo <dnovillo@google.com>
1006
1007 * lto.c (lto_1_to_1_map): Ignore nodes that have not been
1008 read in.
1009 (materialize_cgraph): Only materialize nodes that have a
1010 representation on file.
1011
10122009-06-01 Diego Novillo <dnovillo@google.com>
1013
1014 * lto-lang.c (lto_handle_option): Hanlde OPT_Wabi.
1015
10162009-05-31 Diego Novillo <dnovillo@google.com>
1017
1018 * lto-lang.c (lto_type_for_mode): Handle all the modes
1019 handled in c_common_type_for_mode.
1020
10212009-05-21 Diego Novillo <dnovillo@google.com>
1022
1023 * lto-elf.c: Always include <gelf.h>.
1024 * config-lang.in (target_libs): Remove.
1025 (build_by_default): Set to no.
1026
10272009-05-15 Diego Novillo <dnovillo@google.com>
1028
1029 * lto.c (lto_materialize_function): Assert that DECL is
1030 not a builtin.
1031 (materialize_cgraph): Don't try to materialize builtin
1032 functions.
1033 * lto-section-out.c (write_symbol_vec): Do not write
1034 builtin functions.
1035
10362009-05-13 Diego Novillo <dnovillo@google.com>
1037
1038 * lto-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define.
1039
10402009-05-07 Diego Novillo <dnovillo@google.com>
1041
1042 * lto.c (lto_resolution_read): Add type casts for C++ warnings.
1043 (LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE): Define.
1044 (lto_fixup_type): Call it for TYPE_POINTER_TO,
1045 TYPE_REFERENCE_TO, TYPE_CONTEXT and TYPE_CANONICAL.
1046 (lto_fixup_tree): Call gimple_register_type when *TP is a
1047 type.
1048 (lto_main): Call bitmap_obstack_initialize.
1049
10502009-04-22 Diego Novillo <dnovillo@google.com>
1051
1052 * lto.c (free_section_data): Tidy.
1053 (lto_1_to_1_map): Tidy.
1054 (lto_add_all_inlinees): Tidy.
1055 (prefix_name_with_star): New.
1056 (get_filename_for_set): New.
1057 (lto_wpa_write_files): Call cgraph_node_set_needs_ltrans_p
1058 to determine what cgraph node sets to write.
1059 Call get_filename_for_set to compute temporary file
1060 names.
1061 (lto_execute_ltrans): Do not execute LTRANS on files with
1062 names that start with '*'.
1063 Move logic to execute LTRANS together so that LTRANS is
1064 invoked only if there are any files to compile.
1065 (do_whole_program_analysis): Only remove output files
1066 that do not start with '*'.
1067
10682009-04-06 Diego Novillo <dnovillo@google.com>
1069
1070 * lto-lang.c (lto_post_options): Set flag_excess_precision_cmdline.
1071 * lto.c (read_cgraph_and_symbols): Set cgraph_function_flags_ready.
1072 (lto_add_all_inlinees): Tidy.
1073
10742009-03-26 Diego Novillo <dnovillo@google.com>
1075
1076 * lto.c: Include gimple.h.
1077 (lto_read_in_decl_state): Call gimple_register_type for
1078 every type in every stream.
1079 (lto_fixup_common): Call gimple_register_type if T has a
1080 type.
1081 (do_whole_program_analysis): Call print_lto_report.
1082 (lto_main): Call print_lto_report after cgraph_optimize.
1083 * Make-lang.in (lto.o): Add dependency on GIMPLE_H.
1084
10852009-03-24 Diego Novillo <dnovillo@google.com>
1086
1087 * Make-lang.in (lto-lang.o): Add dependency on TARGET_H and EXPR_H.
1088 (lto.o): Add dependency on GIMPLE_H.
1089
10902009-03-10 Simon Baldwin <simonb@google.com>
1091
1092 * lto.c (lto_read_all_file_options): Close any open file descriptor
1093 contained in file_data before freeing.
1094
10952009-02-24 Rafael Avila de Espindola <espindola@google.com>
1096
1097 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1098 for a decl in the original bitmap, not a node.
1099 (lto_add_all_inlinees): Remove original nodes that are not needed.
1100 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1101
11022009-02-24 Diego Novillo <dnovillo@google.com>
1103
1104 * lto.c (lto_materialize_function): Update
1105 lto_stats.num_function_bodies.
1106 (get_section_data): Initialize *LEN to 0.
1107 (lto_1_to_1_map): Update lto_stats.num_cgraph_partitions.
1108 (lto_wpa_write_files): Update lto_stats.num_cgraph_nodes.
1109 Update lto_stats.num_output_files.
1110 (read_cgraph_and_symbols): Update lto_stats.num_input_files.
1111 (materialize_cgraph): Update lto_stats.num_input_cgraph_nodes.
1112 (lto_main): Initialize lto_stats.
1113 If flag_lto_report is set, call print_lto_report.
1114
11152009-02-19 Diego Novillo <dnovillo@google.com>
1116
1117 Revert
1118
1119 2009-02-19 Rafael Avila de Espindola <espindola@google.com>
1120
1121 * lto.c (lto_add_inline_clones): Don't add the
1122 master clone. Check for a decl in the original
1123 bitmap, not a node.
1124 (lto_add_all_inlinees): Remove original nodes
1125 that are not needed.
1126 (lto_scan_statics_in_cgraph_node): Don't care if
1127 the node is the master.
1128 (lto_promote_cross_file_statics): Use a new
1129 context.seen_node_decls for each set
1130
11312009-02-19 Rafael Avila de Espindola <espindola@google.com>
1132
1133 * lto.c (lto_add_inline_clones): Don't add the master clone. Check
1134 for a decl in the original bitmap, not a node.
1135 (lto_add_all_inlinees): Remove original nodes that are not needed.
1136 (lto_scan_statics_in_cgraph_node): Don't care if the node is the master.
1137 (lto_promote_cross_file_statics): Use a new context.seen_node_decls
1138 for each set
1139
11402009-02-18 Diego Novillo <dnovillo@google.com>
1141
1142 * lto.c (lto_wpa_write_files): Use timers TV_WHOPR_WPA
1143 and TV_WHOPR_WPA_IO.
1144 (lto_execute_ltrans): Use timer TV_WHOPR_WPA_LTRANS_EXEC.
1145 (read_cgraph_and_symbols): Use timer TV_IPA_LTO_DECL_IO.
1146 (materialize_cgraph): Use timer TV_IPA_LTO_GIMPLE_IO.
1147 Use timer TV_WHOPR_WPA or TV_WHOPR_LTRANS or TV_LTO
1148 depending on command line flags.
1149 (do_whole_program_analysis): Use timer TV_WHOPR_WPA.
1150 (lto_main): Remove timer uses.
1151
11522009-02-18 Rafael Avila de Espindola <espindola@google.com>
1153
1154 * lto.c (lto_materialize_function): Don't set DECL_EXTERN to 0.
1155 (lto_wpa_write_files): Update calls to renamed functions.
1156
11572009-02-17 Diego Novillo <dnovillo@google.com>
1158
1159 PR 39203
1160 * lto-lang.c (lto_post_options): Disable -fwhole-program
1161 when running LTRANS.
1162
11632009-02-10 Diego Novillo <dnovillo@google.com>
1164
1165 * lto.c (read_cgraph_and_symbols): Fix comment.
1166
11672009-02-10 Diego Novillo <dnovillo@google.com>
1168
1169 * lto.c (read_cgraph_and_symbols): Read options from all
1170 IL files.
1171
11722009-02-10 Diego Novillo <dnovillo@google.com>
1173
1174 * lto.c (read_cgraph_and_symbols): Factor out of lto_main.
1175 (materialize_cgraph): Likewise.
1176 (do_whole_program_analysis): Likewise.
1177 (lto_main): Call read_cgraph_and_symbols,
1178 materialize_cgraph and do_whole_program_analysis.
1179
11802009-02-10 Simon Baldwin <simonb@google.com>
1181
1182 * lto.c: Include lto-opts.h.
1183 * (lto_main): Clear file options at loop start, read any saved
1184 options from the first file handled, and re-issue options.
1185 * Makefile.in (lto.o): Add dependency on lto-opts.h.
1186
11872009-02-02 Diego Novillo <dnovillo@google.com>
1188
1189 * lto.c (lto_main): Stop LTO_TIMER and use
1190 TV_WHOPR_WPA_LTRANS_EXEC when launching LTRANS.
1191
11922009-01-30 H.J. Lu <hongjiu.lu@intel.com>
1193
1194 PR lto/38995
1195 * lto-elf.c (init_shdr##BITS): Set the sh_addralign field
1196 to POINTER_SIZE.
1197
11982009-01-29 Ramana Radhakrishnan <ramana.r@gmail.com>
1199
1200 * Make-lang.in (LTO_EXE): Link with all
1201 BACKENDLIBS and not only GMPLIBS
1202
12032009-01-28 H.J. Lu <hongjiu.lu@intel.com>
1204
1205 PR bootstrap/38992
1206 * lto-elf.c: Include gelf.h instead of libelf.h.
1207 (lto_elf_file_close): Replace elfx_update_shstrndx with
1208 gelf_getehdr, elf_getscn, gelf_getshdr, gelf_update_shdr and
1209 gelf_update_ehdr.
1210
12112009-01-28 H.J. Lu <hongjiu.lu@intel.com>
1212
1213 PR middle-end/38996
1214 * lto-elf.c (DEFINE_INIT_EHDR): Initialize e_version.
1215
12162009-01-26 Diego Novillo <dnovillo@google.com>
1217
1218 * lto-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Update.
1219
12202009-01-26 Diego Novillo <dnovillo@google.com>
1221
1222 * lto-lang.c (lto_types_compatible_p): Move to gimple.c
1223 and rename into gimple_types_compatible_p.
1224
12252009-01-12 Rafael Avila de Espindola <espindola@google.com>
1226
1227 * lto-lang.c (lang_hooks): Remove the const qualifier.
1228
12292009-01-06 Diego Novillo <dnovillo@google.com>
1230
1231 * ltrans-driver: Mark 'all' target as phony.
1232
12332008-12-31 Diego Novillo <dnovillo@google.com>
1234
1235 * ltrans-driver: Execute a NOP action for target 'all'.
1236
12372008-12-19 Diego Novillo <dnovillo@google.com>
1238
1239 * lto.c (lto_1_to_1_map): Tidy.
1240
12412008-12-19 Diego Novillo <dnovillo@google.com>
1242
1243 * lto-elf.c (lto_elf_file_open): When FILENAME cannot
1244 be opened, show its name.
1245 * ltrans-driver: If $verbose is set, do not use parallelism.
1246
12472008-12-17 Rafael Avila de Espindola <espindola@google.com>
1248
1249 * lto.c (lto_fixup_function): New.
1250 (lto_fixup_tree): Call lto_fixup_function.
1251
12522008-12-14 Doug Kwan <dougkwan@google.com>
1253
1254 * lto.c (lto_1_to_1_map): Create a cgraph node set for any global
1255 variables if there is no function.
1256
12572008-12-10 Simon Baldwin <simonb@google.com>
1258
1259 * ltrans-driver: Always run make in silent mode, to avoid make's
1260 trace on stdout interfering with lto-wrapper output.
1261
12622008-12-10 Doug Kwan <dougkwan@google.com>
1263
1264 * lto.c (lto_add_inline_clones): Do not force master clones of
1265 inlined functions already in SET to be static inline.
1266
12672008-12-04 Doug Kwan <dougkwan@google.com>
1268
1269 * lto.c (globalize_context_t): New type to store states in
1270 globalization of cross-file statics.
1271 (globalize_cross_file_statics): New.
1272 (lto_scan_statics_in_ref_table): Walk tree to look for reachable
1273 static decls that need to be fixed up.
1274 (lto_scan_statics_in_cgraph_node): Change call interface to use
1275 a globalize_context_t CONTEXT for all states used.
1276 (lto_scan_statics_in_remaining_global_vars): New.
1277 (lto_promote_cross_file_statics): Use new call interface of
1278 LTO_SCAN_STATICS_IN_CGRAPH_NODE. Handle remaining externally
1279 visible vars in the last set.
1280
12812008-12-03 Diego Novillo <dnovillo@google.com>
1282
1283 * lto.c (lto_fixup_tree): Do not emit an error when
1284 PREVAILING throw but T doesn't.
1285
12862008-12-02 Doug Kwan <dougkwan@google.com>
1287
1288 * lto.c (lto_scan_statics_in_ref_table): New function factored out
1289 from code in ...
1290 (lto_scan_statics_in_cgraph_node): Handle both file-scope static
1291 variables and functions.
1292 (lto_promote_cross_file_statics): Rename bitmaps to SEEN_DECLS
1293 and GLOBAL_DECLS from SEEN_VARS and GLOBAL_VARS.
1294
12952008-11-29 Diego Novillo <dnovillo@google.com>
1296
1297 * lto.c: Include timevar.h.
1298 (lto_materialize_function): Tidy. Add comments.
1299 (lto_wpa_write_files): Tidy.
1300 (lto_execute_ltrans): Tidy.
1301 (lto_main): Add local variable LTO_TIMER. Initialize it
1302 to one of TV_WHOPR_WPA, TV_WHOPR_LTRANS or TV_LTO.
1303 Start and stop the timer.
1304 Tidy comments.
1305 * Make-lang.in (lto.o): Add dependency on timevar.h.
1306 * ltrans-driver: React to -v and -save-temps.
1307 Use simple heuristic to determine how much parallelism to
1308 use when executing make.
1309
13102008-11-12 Doug Kwan <dougkwan@google.com>
1311
1312 * lto.c (lto_bitmap_obstack): Remove var.
1313 (lto_materialize_function): Do nothing instead of marking function
1314 body in file if flag_wpa is true.
1315 (lto_add_all_inlinees): Use bitmap functions in lto-utils.c.
1316 (lto_scan_statics_in_cgraph_node): New function.
1317 (lto_promote_cross_file_statics): Same.
1318 (lto_wpa_write_files): Call lto_promote_cross_file_statics.
1319 Use bitmap functions in lto-utils.c. Remove unsued label OUT.
1320 * Make-lang.in (lto/lto.o): Add lto-utils.h to dependency list.
1321
13222008-11-09 Diego Novillo <dnovillo@google.com>
1323
1324 * lto/lto.c (lto_fixup_tree): Change error message locus
1325 information to include location of mismatching
1326 declaration.
1327 Use TREE_NO_WARNING to avoid repeated messages.
1328 (lto_main): If lto_fixup_decls emitted any errors, exit.
1329 * lto/lto-lang.c: Don't include libfuncs.h and except.h
1330 (lto_init_options): Don't enable exceptions by default.
1331 (lto_eh_runtime_type): Move to lto-function-in.c
1332 (lto_init_eh): Likewise.
1333 (lto_init): Don't call lto_init_eh.
1334 * lto/Make-lang.in (lto-lang.o): Remove dependency on
1335 libfuncs.h and except.h.
1336
13372008-10-30 Diego Novillo <dnovillo@google.com>
1338
1339 * lto.c (lto_read_decls): Declare debug_main only if
1340 LTO_STREAM_DEBUGGING is enabled.
1341
13422008-10-30 Simon Baldwin <simonb@google.com>
1343
1344 * lto.c (lto_wpa_write_files): Create intermediate files with
1345 make_cwd_temp_file().
1346 (lto_maybe_unlink): New. Delete intermediate WPA files unless
1347 WPA_SAVE_LTRANS is set.
1348 (lto_main): Call lto_maybe_unlink() for intermediate WPA files.
1349 * ltrans-driver: Do not strip directory from output files.
1350
13512008-10-29 Doug Kwan <dougkwan@google.com>
1352
1353 * lto.c (free_decl): Call lto_symtab_clear_resolution when freeing
1354 DECL.
1355 * Make-lang.in (LTO_OBJS): Remove lto/lto-symtab.o
1356 (lto/lto-symtab.o): Remove rule.
1357 * lto-tree.h (struct lang_identifier): Remove LTO specific fields.
1358 (struct lang_decl): Remove RESOLUTION and add DUMMY in struct.
1359 (LANG_IDENTIFIER_CAST, LTO_IDENTIFIER_DECL, LTO_DECL_RESOLUTION):
1360 Remove macros.
1361 lto-symtab.c (File): Move up one level.
1362 lto-lang.c (cgraph.h): Remove include.
1363 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
1364 input_cgraph): Move to lto-cgraph.c in gcc directory above.
1365 (LANG_HOOKS_INPUT_CGRAPH): Remove use of macro.
1366
13672008-10-24 Rafael Espindola <espindola@google.com>
1368
1369 * lto-function-in.c (get_resolution): Return LDPR_PREEMPTED_IR for
1370 non prevailing weak symbols.
1371
13722008-10-24 Rafael Espindola <espindola@google.com>
1373
1374 * lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.
1375
13762008-10-24 Rafael Espindola <espindola@google.com>
1377
1378 * lto-lang.c (input_node): Avoid casts from pointers to ints of
1379 different types.
1380
13812008-10-23 Simon Baldwin <simonb@google.com>
1382
1383 * lto-lang.c (input_node): Save the node reference, rather than the
1384 node pointer, in node->inlined_to.
1385 (input_cgraph_1): Convert node references into node pointers.
1386
13872008-10-22 Diego Novillo <dnovillo@google.com>
1388 Rafael Espindola <espindola@google.com>
1389
1390 * lto.c (lto_resolution_read): Tidy.
1391 * lto-symtab.c (lto_symtab_prevailing_decl): Do not
1392 abort if RET is NULL.
1393
13942008-10-22 Doug Kwan <dougkwan@google.com>
1395
1396 * lto.c (lto_fixup_tree): Check for NOTHROW conflict only if
1397 exceptions flag is given.
1398 * lto-lang.c: (lto_init_options) Set default exceptions flag.
1399 (lto_init_eh): Remove exceptions flag initialization.
1400 (lto_init): Only call lto_init_eh if exceptions flag is set.
1401
14022008-10-21 Diego Novillo <dnovillo@google.com>
1403
1404 * lto.c: Tidy some formatting.
1405 * lto.h: Likewise.
1406
14072008-10-21 Simon Baldwin <simonb@google.com>
1408
1409 * lto-symtab.c: (lto_same_type_p): Types cannot be equal if one of
1410 them is NULL (but not the other).
1411
14122008-10-17 Diego Novillo <dnovillo@google.com>
1413
1414 * ltrans-driver: Divert output from make to a temporary file.
1415 Show it if the call to make failed.
1416
14172008-10-15 Diego Novillo <dnovillo@google.com>
1418
1419 * lto.c (lto_wpa_write_files): Reformat do-while loop.
1420 Do not print TEMP_FILENAME
1421 * ltrans-driver: Call make with -s.
1422
14232008-10-15 Diego Novillo <dnovillo@google.com>
1424
1425 * lto-symtab.c (lto_symtab_merge_decl): Do not force
1426 TREE_STATIC on global symbols.
1427
14282008-10-14 Ollie Wild <aaw@google.com>
1429
1430 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Remove.
1431 (LTRANS_DRIVER_EXE): Add.
1432 (lto.all.cross): Add LTRANS_DRIVER_EXE.
1433 (lto.all.encap): Add LTRANS_DRIVER_EXE.
1434 (lto.install.common): Remove ltrans-driver.
1435 (lto.mostlyclean): Add LTRANS_DRIVER_EXE.
1436 (LTRANS_DRIVER_EXE): New build rule.
1437 * config-lang.in (compilers): Add ltrans-driver.
1438
14392008-10-14 Diego Novillo <dnovillo@google.com>
1440
1441 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): Disable transformation
1442 of program name.
1443
14442008-10-13 Ollie Wild <aaw@google.com>
1445
1446 * lang-spec.h (@lto): Replace lto1_options with cc1_options.
1447 * lto.c (lto_execute_ltrans): Add "-fno-wpa -fltrans -xlto" to CFLAGS.
1448 * ltrans-driver (LTRANS_FLAGS): Remove.
1449
14502008-10-08 Doug Kwan <dougkwan@google.com>
1451
1452 * lto.c (lto_fixup_tree): Remove ATTRIBUTE_UNUSED from DATA.
1453 Handle new tree codes RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
1454 and TREE_BINFO. Also move code handling FUNCTION_DECL and VAR_DECL
1455 from lto_fixup_state to here.
1456 (lto_fixup_state): Take an lto_fixup_data_t object DATA instead of
1457 just a free-list. Fix up types also. Move decl merging code to
1458 lto_fixup_tree.
1459 (lto_fixup_state_aux): Change AUX to point to an lto_fixup_data_t
1460 object.
1461 (lto_fixup_decls): Use another pointer set to avoid multiple
1462 walking of nodes except for DECLs to be replaced. Pass an
1463 lto_fixup_data_t object to tree-walker.
1464
14652008-10-08 Rafael Espindola <espindola@google.com>
1466
1467 * lto-symtab.c (lto_symtab_set_resolution): New.
1468 (lto_symtab_merge_decl): Use lto_symtab_set_resolution and
1469 lto_symtab_get_resolution.
1470 (lto_symtab_prevailing_decl): Return decl for non public decls.
1471 (lto_symtab_get_resolution): New.
1472 * lto.c (lto_fixup_tree, lto_fixup_state): Remove unecessary checks.
1473
14742008-10-06 Rafael Espindola <espindola@google.com>
1475
1476 * lto-lang.c: Include cgraph.h.
1477 (input_overwrite_node, input_node, input_edge, input_cgraph_1,
1478 input_cgraph): Moved from lto-cgraph.c.
1479 (LANG_HOOKS_INPUT_CGRAPH): New.
1480
14812008-10-03 Rafael Espindola <espindola@google.com>
1482
1483 * lto.c (lto_fixup_tree, lto_fixup_state): Fix the FIXME.
1484
14852008-10-03 Rafael Espindola <espindola@google.com>
1486
1487 * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
1488 (lto_symtab_merge_decl): Update LTO_IDENTIFIER_DECL the reflect the
1489 prevailing definition. Don't mark TREE_NOTHROW differences.
1490 * lto.c (lto_fixup_tree): New.
1491 (lto_fixup_state): New.
1492 (lto_fixup_state_aux): New.
1493 (free_decl): New.
1494 (lto_fixup_decls): New.
1495 (lto_main): Call lto_fixup_decls.
1496
14972008-10-02 Ollie Wild <aaw@google.com>
1498
1499 * lang.opt (fltrans): Moved from common.opt. Remove RejectNegative
1500 and Init.
1501 (fwpa): Moved from common.opt. Remove RejectNegative and Init.
1502 * lto-lang.c (lto_post_options): Add validation and fixups for
1503 -fltrans and -fwpa.
1504
15052008-10-02 Rafael Espindola <espindola@google.com>
1506
1507 * lto-symtab.c (lto_symtab_merge_var, lto_symtab_merge_fn,
1508 lto_symtab_merge_decl): Return void.
1509 (lto_symtab_prevailing_decl): New.
1510
15112008-09-30 Rafael Espindola <espindola@google.com>
1512
1513 * lto-symtab.c (lto_symtab_compatible): Remove the check for already
1514 defined symbols.
1515 (lto_symtab_overwrite_decl): Copy LTO_DECL_RESOLUTION.
1516 (lto_symtab_merge_decl): Store symbol resolution in LTO_DECL_RESOLUTION.
1517 Check for already defined symbols.
1518 * lto-tree.h (lang_decl): Remove dummy and add resolution fields.
1519 (LTO_IDENTIFIER_RESOLUTION): Remove.
1520 (LTO_DECL_RESOLUTION): New.
1521
15222008-09-30 Rafael Espindola <espindola@google.com>
1523
1524 * lto.c (lto_read_decls): Use new input_tree signature.
1525
15262008-09-26 Doug Kwan <dougkwan@google.com>
1527
1528 * lto.c (lto_main): Call lto_fixup_nothrow_decls to fix up function
1529 bodies affected by exception attribute merging of DECLs.
1530 * lto-symtab.c (lto_symtab_merge_decl): Handle exception attribute
1531 merging.
1532
15332008-09-25 Rafael Espindola <espindola@google.com>
1534
1535 * Make-lang.in (PLUGIN_API_H, LTO_TREE_H): New.
1536 (lto/lto-lang.o, lto/lto.o, lto/lto-symtab.o) Use LTO_TREE_H.
1537 * lto-symtab.c (lto_symtab_compatible): New.
1538 (lto_symtab_overwrite_decl): New.
1539 (lto_symtab_merge_decl): Refactor to use the above functions
1540 and the resolution from lang_identifier.
1541 * lto-tree.h: Include plugin-api.h.
1542 (lang_identifier): Add resolution.
1543 (LTO_IDENTIFIER_RESOLUTION): New.
1544
15452008-09-25 Ollie Wild <aaw@google.com>
1546
1547 * lang.opt (fltrans-output-list=): New option.
1548 * lto.c (lto_execute_ltrans): Output file names to ltrans_output_list.
1549
15502008-09-25 Rafael Espindola <espindola@google.com>
1551
1552 * lto.c (lto_resolution_read): Initialize ret;
1553
15542008-09-24 Ollie Wild <aaw@google.com>
1555
1556 * lto.c (sys/mman.h): Move include.
1557 (lto_wpa_write_files): Return a list of written files.
1558 (lto_execute_ltrans): New function.
1559 (lto_main): Call lto_execute_ltrans.
1560 (ltrans-driver): New file.
1561 * lto-lang.c (DEFAULT_LTRANS_DRIVER): New macro.
1562 (DEAULT_LTRANS_DRIVER_LEN): New macro.
1563 (lto_init_options): Initialize ltrans_driver.
1564 (lto_handle_option): Fix incorrect default output value.
1565 * lang.opt (fltrans-driver=): New option.
1566 * Make-lang.in (LTRANS_DRIVER_INSTALL_NAME): New variable.
1567 (lto.install-common): Add lto/ltrans-driver.
1568
15692008-09-24 Rafael Espindola <espindola@google.com>
1570
1571 * Make-lang.in (LTO_OBJS): Add lto/common.o.
1572 (lto/lto.o): Depend on lto/common.h.
1573 (lto/common.o): New.
1574 * lang.opt (resolution): New.
1575 * lto-lang.c (resolution_file_name): New.
1576 (lto_handle_option): Handle OPT_resolution.
1577 * lto-symtab.c (lto_symtab_merge_decl): Add a resolution argument.
1578 (lto_symtab_merge_var,lto_symtab_merge_fn): Add a resolution argument.
1579 pass it to lto_symtab_merge_decl.
1580 * lto.c: Include common.h.
1581 (lto_read_decls): Add resolutions and resolutions_size arguments.
1582 Initialize data_in.globals_resolution and
1583 data_in.globals_resolution_size.
1584 (index_and_symbol_resolution): New.
1585 (lto_resolution_read): New.
1586 (lto_file_read): Add argument resolution_file.
1587 Read resolution.
1588 * lto.h (resolution_file_name): New.
1589
15902008-09-23 Rafael Espindola <espindola@google.com>
1591
1592 * common.c: Update description.
1593 * common.h: Update description.
1594
15952008-09-23 Rafael Espindola <espindola@google.com>
1596
1597 * common.c: Moved from lto-plugin.
1598 * common.h: Moved from lto-plugin.
1599
16002008-09-22 Doug Kwan <dougkwan@google.com>
1601
1602 * lto.c (VEC(bitmap,heap)): Declare.
1603 (lto_materialize_function): Handle WAP mode specially.
1604 (lto_add_inline_clones): New.
1605 (lto_add_all_inlinees): Changle algorithm and to use bitmaps. Also
1606 return a bitmap of inlined decls.
1607 (lto_wpa_write_files): Handle all DECLs brought in by inlining.
1608 (lto_main): Call reset_inline_failed to reset inlining states.
1609 Check call-graph after WPA inlining.
1610 * lto-lang.c (lto_init): Do not clear flag_generate_lto
1611 unconditionally.
1612
16132008-09-19 Doug Kwan <dougkwan@google.com>
1614
1615 lto.c (lto_main): Remove unsued wrapper code.
1616 lang-specs.h (@lto): Use lto1_options instead of cc1_options.
1617
16182008-09-19 Rafael Espindola <espindola@google.com>
1619
1620 * lto-symtab.c: Include lto-tree-in.h.
1621 * lto-tree.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove.
1622 * lto.h (lto_symtab_merge_var, lto_symtab_merge_fn): Remove
1623 * Make-lang.in (lto/lto-symtab.o): Add lto-tree-in.h.
1624
16252008-09-17 Paolo Bonzini <bonzini@gnu.org>
1626 Rafael Avila de Espindola <espindola@google.com>
1627
1628 * lto-lang.c (COMPOUND_LITERAL_EXPR_DECL_STMT,
1629 COMPOUND_LITERAL_EXPR_DECL): Remove.
1630 (emit_local_var): Remove.
1631 (lto_expand_expr): Remove.
1632 (lto_staticp): Remove.
1633 (LANG_HOOKS_EXPAND_EXPR): Remove.
1634 (LANG_HOOKS_STATICP): Remove.
1635
16362008-09-11 Diego Novillo <dnovillo@google.com>
1637
1638 * lto-lang.c: Include except.h and libfuncs.h.
1639 (lto_init_eh): New.
1640 (lto_init): Call it.
1641 Set flag_generate_lto to 0.
1642 * Make-lang.in (lto-lang.o): Add dependency on except.h
1643 and libfuncs.h.
1644
16452008-09-09 Bill Maddox <maddox@google.com>
1646
1647 * lto-lang.c: Include header file expr.h.
1648 (COMPOUND_LITERAL_EXPR_DECL_STMT,
1649 COMPOUND_LITERAL_EXPR_DECL): Copied from c-common.h.
1650 (emit_local_var): Copied from c-semantics.c.
1651 (lto_expand_expr, lto_staticp): Copied from c_expand_expr
1652 and c_staticp in c-common.c.
1653 (LANG_HOOKS_EXPAND_EXPR,LANG_HOOKS_STATICP): Redefined.
1654
16552008-09-08 Diego Novillo <dnovillo@google.com>
1656
1657 * lto-lang.c (lto_global_bindings_p): Return 1 during
1658 IPA passes.
1659
16602008-09-07 Diego Novillo <dnovillo@google.com>
1661
1662 * lto.c: Tidy formatting.
1663
16642008-08-04 Bill Maddox <maddox@google.com>
1665
1666 * lto-symtab.c (lto_symtab_merge_decl): Add comment.
1667
16682008-09-03 Doug Kwan <dougkwan@google.com>
1669
1670 lto.c (lto_add_all_inlinees): Reset FAILED_REASON of edges to
1671 CIF_OK instead of NULL.
1672
16732008-09-02 Diego Novillo <dnovillo@google.com>
1674 Simon Baldwin <simonb@google.com>
1675
1676 * lto-lang.c (lto_type_for_size): Rewrite. Adapt from
1677 c_common_type_for_size.
1678 (lto_type_for_mode): Remove ATTRIBUTE_UNUSED markers.
1679 (lto_init): Call linemap_add.
1680 (signed_and_unsigned_types): Remove.
1681
16822008-08-29 Diego Novillo <dnovillo@google.com>
1683
1684 * lto-lang.c (handle_noreturn_attribute): New local function.
1685 (handle_const_attribute): New local function.
1686 (handle_malloc_attribute): New local function.
1687 (handle_pure_attribute): New local function.
1688 (handle_novops_attribute): New local function.
1689 (handle_nonnull_attribute): New local function.
1690 (handle_nothrow_attribute): New local function.
1691 (handle_sentinel_attribute): New local function.
1692 (handle_type_generic_attribute): New local function.
1693 (handle_format_attribute): New local function.
1694 (handle_format_arg_attribute): New local function.
1695 (lto_attribute_table): Declare.
1696 (lto_format_attribute_table): Declare.
1697 (lto_init_attributes): New local function.
1698 (lto_define_builtins): Call it.
1699 Call targetm.init_builtins and build_common_builtin_nodes.
1700 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
1701 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
1702
17032008-08-28 Diego Novillo <dnovillo@google.com>
1704
1705 * Make-lang.in (lto-lang.o): Replace tree-gimple.h with
1706 $(GIMPLE_H).
1707 (lto-symtab.o): Add dependency on $(GIMPLE_H).
1708 * lto-lang.c: Include gimple.h instead of tree-gimple.h.
1709 * lto-symtab.c: Include gimple.h.
1710 * lto-tree.h (chain_next): Replace GENERIC_NEXT with
1711 TREE_CHAIN.
1712
17132008-08-27 Doug Kwan <dougkwan@google.com>
1714
1715 * lto.c (vec.h, bitmap.h, pointer-set.h, ipa-prop.h, ggc.h,
1716 gt-lto-lto.h): New includes.
1717 (lto_materialize_function): Do not read in function body in WPA mode.
1718 Format a line to fit in 80 columns.
1719 (lto_cgraph_node_sets): New garbage collected variable.
1720 (lto_1_to_1_map, lto_add_all_inlinees, lto_wpa_write_files):
1721 New functions.
1722 (lto_main): Initialize bitmap obstack. Add code to handle WPA mode.
1723 * Make-lang.in (LTO_H): Replace filename lto-section-in.h with
1724 variable LTO_SECTION_IN_H.
1725 (lto/lto.o): Include gt-lto-lto-c.h ggc.h ,VEC_H, BITMAP_H,
1726 pointer-set.h and IPA_PROP_H. Also replace filename lto-section-in.h
1727 with variable LTO_SECTION_IN_H.
1728 * config-lang.in (gtfiles): Add lto/lto.c.
1729 * lto-symtab.c (lto_symtab_merge_decl): Set DECL_CONTEXT of
1730 merged DECL_RESULT correctly.
1731
17322008-08-26 Bill Maddox <maddox@google.com>
1733
1734 * lto-lang.c Include tree-gimple.h.
1735 (lto_mark_addressable): Call mark_addressable rather than
1736 asserting.
1737 (lto_post_options): Suppress debug info generation.
1738 * Make-lang.in: Add dependency of lto-lang.o on tree-gimple.h.
1739
17402008-08-25 Bill Maddox <maddox@google.com>
1741
1742 * lto-symtab.c (lto_symtab_merge_decl): Remove a suspect
1743 assertion and leave an explanatory comment in its place.
1744
17452008-08-21 Doug Kwan <dougkwan@google.com>
1746
1747 * lto.c (preload_common_nodes): Call lto_get_common_nodes to get a list
1748 of common nodes instead of computing locallly.
1749 (lto_read_in_decl_state): New.
1750 (lto_read_decls): Change code for udpate in struct lto_decl_header.
1751 Read global and per-function in-decl states.
1752 * Make-lang.in (LTO_H): Update dependency.
1753 (lto/lto.o): Same.
1754 (lto-symtab.c): Merge (revision 139039)
1755 * lto-symtab.c (lto_symtab_merge_decl): Merge DECL_RESULT.
1756
17572008-08-21 Rafael Espindola <espindola@google.com>
1758
1759 * config-lang.in (target_libs): New.
1760
17612008-08-20 Bill Maddox <maddox@google.com>
1762
1763 * lto.c (current_lto_file): Remove GTY marker from static
1764 variable. Remove include of file gt-lto-lto.h.
1765 * Make-lang.in: Remove dependency of lto/lto.o on
1766 gt-lto-lto.h.
1767 * lto-elf.c (lto_file_close): Removed.
1768 (lto_elf_file_open): Use XCNEW instead of GGC_CNEW to
1769 allocate lto_elf_file object.
1770 (lto_elf_file_close): Free lto_elf_file object after close.
1771 * lto.h (struct lto_file_struct): Remove GTY marker.
1772 * config-lang.in: Remove lto/lto.h and lto/lto.c from
1773 gtfiles.
1774
17752008-08-20 Bill Maddox <maddox@google.com>
1776
1777 * lto.c (lto_read_decls): Provide dummy argument to input_tree
1778 to conform to its new signature.
1779 * lto-symtab.c (lto_symtab_merge_decl): Do not invoke ggc_free
1780 on discarded node here, now called in global_vector_fixup.
1781
17822008-08-09 Bill Maddox <maddox@google.com>
1783
1784 * lto.c (preload_common_nodes): Verify that fileptr_type_node
1785 has not been set to a front-end-specific value.
1786
17872008-08-05 Doug Kwan <dougkwan@google.com>
1788
1789 * Make-lang.in (lto-symtab.o): Add missing dependencies to fix
1790 build breakage.
1791
17922008-07-30 Bill Maddox <maddox@google.com>
1793
1794 * lto.c (lto_materialize_function): Call lto_original_decl_name.
1795 Remove obsolete comments.
1796 (lto_read_decls): Remove initialization of deleted field data_in.global.
1797 Tidy up comments.
1798 (lto_main): Remove redundant initialization of section_hash_table.
1799 * lto-elf.c: Removed obsolete comments.
1800 * lto.h: Tidy up comments.
1801 * lto-symtab.c (lto_least_common_multiple): New function.
1802 (lto_symtab_merge_decl): Merge variable alignments in some cases.
1803 Tidy up comments.
1804
18052008-07-25 Diego Novillo <dnovillo@google.com>
1806 Bill Maddox <maddox@google.com>
1807
1808 * lto.c: Re-order include files.
1809 Include lto-section-out.h.
1810 (preload_common_nodes): Add debugging output.
1811 Add new local INDEX_TABLE.
1812 Call preload_common_node.
1813 * Make-lang.in (lto.o): Add dependency on lto-section-out.h
1814
18152008-07-13 Bill Maddox <maddox@google.com>
1816
1817 * lto.c (lto_read_decls): Cast pointer to const char * to avoid
1818 unwanted scaling during pointer addition.
1819
18202008-07-11 Bill Maddox <maddox@google.com>
1821 Diego Novillo <dnovillo@google.com>
1822
1823 * lto.c (lto_read_decls): Fix C++ compatibility warnings.
1824 Make code const-correct.
1825 (lto_file_read): Fix C++ compatibility warnings.
1826 (lto_read_section_data): Fix C++ compatibility warnings.
1827 (lto_get_section_data): Use CONST_CAST to avoid warning when
1828 const pointer passed to free.
1829 * lto-elf.c (lto_elf_build_section_table): Fix C++
1830 compatibility warnings.
1831 (lto_elf_append_data): Fix C++ compatibility warnings. Use CONST_CAST
1832 to avoid warning assigning const pointer to d_buf field of Elf_Data.
1833 (lto_get_current_out_file): Fix C++ compatibility warnings.
1834
18352008-07-11 Diego Novillo <dnovillo@google.com>
1836
1837 * Make-lang.in (lto-warn): Define.
1838
18392008-07-03 Simon Baldwin <simonb@google.com>
1840
1841 * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
1842 LTO_STREAM_DEBUGGING.
1843
18442008-06-27 Ollie Wild <aaw@google.com>
1845
1846 * lto-elf.c (lto-section-out.h): New include.
1847 (struct lto_elf_file): Remove bits member. Add scn, shstrtab_stream,
1848 and data members.
1849 (cached_file_attrs): New static variable.
1850 (lto_elf_get_shdr, lto_elf_free_shdr): Remove elf_file parameter.
1851 Use cached_file_attrs for checking bits.
1852 (lto_elf_build_section_table): Remove elf_file argument from
1853 lto_elf_get_shdr and lto_elf_free_shdr calls.
1854 (DEFINE_INIT_SHDR): New macro.
1855 (init_shdr32, init_shdr64): New functions defined via the
1856 DEFINE_INIT_SHDR macro.
1857 (lto_elf_begin_section_with_type): New function.
1858 (lto_elf_begin_section): New function.
1859 (lto_elf_append_data): New function.
1860 (lto_elf_end_section): New function.
1861 (DEFINE_VALIDATE_EHDR): New macro.
1862 (validate_ehdr32, validate_ehdr64): New functions defined via the
1863 DEFINE_VALIDATE_EHDR macro.
1864 (validate_file): New function.
1865 (DEFINE_INIT_EHDR): New macro.
1866 (init_ehdr32, init_ehdr64): New functions defined via the
1867 DEFINE_INIT_EHDR macro.
1868 (init_ehdr): New function.
1869 (lto_elf_file_open): Add support for writable files. Move some
1870 validation logic to validate_file.
1871 (lto_elf_file_close): Add support for writable files. Write file data
1872 and free data blocks.
1873 (current_out_file): New static variable.
1874 (lto_set_current_out_file): New function.
1875 (lto_get_current_out_file): New function.
1876 * lto.c (lto_main): Add writable argument to lto_elf_file_open calls.
1877 Add temporary initialization for testing ELF serialization.
1878 * lto.h (lto-section-out.h): New include.
1879 (struct lto_file_struct): Slight modification to comment.
1880 (lto_elf_file_open): Add writable parameter.
1881 (lto_elf_begin_section): New function declaration.
1882 (lto_elf_append_data): New function declaration.
1883 (lto_elf_end_section): New function declaration.
1884 (lto_set_current_out_file, lto_get_current_out_file): New function
1885 declarations.
1886 * lto-lang.c (LANG_HOOKS_BEGIN_SECTION): Set as lto_elf_begin_section.
1887 (LANG_HOOKS_APPEND_DATA): Set as lto_elf_append_data.
1888 (LANG_HOOKS_END_SECTION): Set as lto_elf_end_section.
1889 * Make-lang.in (LTO_H): Add lto-section-out.h.
1890
18912008-06-12 Ollie Wild <aaw@google.com>
1892
1893 * lto.h (struct lto_file_vtable_struct): Remove.
1894 (struct lto_file_struct): Remove vtable member.
1895 * lto-elf.c (lto_file_init): Remove vtable argument.
1896 (lto_elf_map_optional_lto_section): Remove.
1897 (lto_elf_unmap_section): Remove.
1898 (lto_elf_file_vtable): Remove.
1899 (lto_elf_file_open): Remove lto_elf_file_vtable argument from
1900 lto_file_init call.
1901 (lto_elf_find_section_data): Remove.
1902
19032008-06-11 Ollie Wild <aaw@google.com>
1904
1905 * lto.c (lto_file_read): Add const qualifier to data variable.
1906
19072008-06-11 Diego Novillo <dnovillo@google.com>
1908
1909 Merge from lto-streamber sub-branch.
1910
1911 2008-06-04 Ollie Wild <aaw@google.com>
1912
1913 * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
1914 * Make-lang.in (lto.o): Remove dependency on dwarf2.h.
1915
1916 2008-05-28 Bill Maddox <maddox@google.com>
1917
1918 Replace the DWARF reader in the LTO front-end.
1919
1920 * lto.c: Include lto-tree-in.h, lto-tags.h.
1921 (enum DWARF2_class, DW_cl_constant, struct
1922 DWARF2_form_data, struct lto_context,
1923 lto_fd_init, lto_info_fd_init,
1924 lto_abbrev_fd_init, lto_info_fd_close,
1925 lto_file_init, lto_file_close,
1926 lto_file_corrupt_error, lto_abi_mismatch_error,
1927 LTO_CHECK_INT_VAL, LTO_READ_TYPE,
1928 lto_read_uleb128, lto_read_sleb128,
1929 lto_read_initial_length, lto_abbrev_read_attrs,
1930 lto_abbrev_read, lto_abbrev_read_lookup,
1931 lto_read_section_offset,
1932 lto_read_comp_unit_header, find_cu_for_offset,
1933 lto_get_file_name,
1934 lto_resolve_reference,lto_read_form,
1935 attribute_value_as_int,
1936 make_signed_host_wide_int,
1937 attribute_value_as_constant, lto_cache_hash,
1938 lto_cache_eq, lto_cache_store_DIE,
1939 lto_cache_lookup_DIE, lto_find_integral_type,
1940 lto_find_integral_type_1,
1941 LTO_BEGIN_READ_ATTRS_UNCHECKED,
1942 LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
1943 lto_unsupported_attr_error, lto_get_identifier,
1944 lto_read_referenced_type_DIE,
1945 lto_read_compile_unit_DIE,
1946 lto_read_array_type_DIE,
1947 lto_read_structure_union_class_type_DIE,
1948 lto_read_enumerator_DIE,
1949 lto_read_enumeration_type_DIE,
1950 lto_read_only_for_child_DIEs,
1951 lto_read_only_for_child_DIEs,
1952 lto_read_member_DIE, lto_read_abbrev,
1953 lto_read_variable_formal_parameter_constant_DIE,
1954 lto_get_body): Removed.
1955 (preload_common_nodes): New function.
1956 (lto_read_decls): Convert for new global streamer.
1957 (lto_materialze_file_data,
1958 lto_read_subroutine_type_subprogram_die,
1959 lto_read_unspecified_parameters_DIE,
1960 lto_read_typedef_DIE,
1961 lto_read_pointer_reference_type_DIE,
1962 lto_read_subrange_type_DIE,
1963 lto_read_base_type_DIE,
1964 lto_read_const_volatile_restrict_type_DIE,
1965 lto_read_namespace_DIE,
1966 lto_read_unspecified_type_DIE, lto_read_DIE,
1967 lto_read_child_DIEs, lto_collect_child_DIEs):
1968 Removed.
1969 (lto_info_read, lto_set_cu_context): Removed.
1970 (lto_file_read): Convert for new global streamer.
1971 (lto_resolve_type_ref, lto_read_DIE_at_ptr,
1972 lto_resolve_var_ref, lto_resolve_fn_ref,
1973 lto_resolve_field_ref, lto_resolve_typedecl_ref,
1974 lto_resolve_namespacedecl_ref): Removed.
1975 (lto_file_init, lto_file_close): Moved to lto-elf.c.
1976 * lto-tree.h (lto_symtab_merge_var,
1977 lto_symtab_mergee_fun): Declare here.
1978 * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
1979 (lto_elf_file_open): Removed code to read DWARF debug sections.
1980 * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
1981 DWARF2_CompUnit, lto_die_ptr,
1982 lto_die_cache_entry, lto_fd, lto_info_fd,
1983 lto_abbrev_fd): Removed.
1984 (lto_file): Removed debug_info and debug_abbrev fields.
1985 (lto_ref): Removed.
1986 (lto_file_init, lto_file_close,
1987 lto_resolve_type_ref, lto_resolve_var_ref,
1988 lto_resolve_fn_ref, lto_resolve_field_ref,
1989 lto_resolve_typedecl_ref,
1990 lto_resolve_namespacedecl_ref,
1991 lto_get_file_name): Removed declarations.
1992 (lto_symtab_merge_var, lto_symtab_merge_fn):
1993 Declarations moved to lto-tree.h.
1994 * lto-symtab.c (lto_compatible_attributes_p):
1995 Lobotomize this, as it barfs on "Hello, world!".
1996 * lto-section-out.c: Include lto-tree-out.h.
1997 (lto_hash_global_slot_node,
1998 lto_eq_global_slot_node, preload_common_nodes,
1999 write_global_stream, write_global_references):
2000 New functions.
2001 (produce_asm_for_decls): Convert for new global streamer.
2002 * lto-section-out.h (lto_hash_global_slot_node,
2003 lto_eq_global_slot_node): Declare.
2004
20052008-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2006 Jan Hubicka <jh@suse.cz>
2007
2008 * lto.c (sys/mman.h, tree-pass.h): New includes.
2009 (lto_materialize_constructors_and_inits,
2010 lto_materialize_function): Keeps length of section.
2011 (lto_materialize_cgraph): Removed.
2012 (lto_read_decls): Initialize fd field.
2013 (lto_file_read): Different return type and removed much code to
2014 lto_main.
2015 (page_mask): New variable.
2016 (lto_read_section_data, get_section_data, free_section_data): New
2017 functions.
2018 (lto_main): Now calls pass manager, sets the hooks so that the ipa
2019 passes can get the section data.
2020
20212008-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
2022
2023 * lto.h (lto_read_decls): Made local.
2024 (lto_input_function_body, lto_input_constructors_and_inits,
2025 lto_input_cgraph): Declarations moved to lto-section-in.h.
2026 * lto-section-in.c: Moved to .. .
2027 * lto-cgraph-in.c: Ditto.
2028 * lto-section-in.h: Ditto.
2029 * lto-function-in.c: Ditto.
2030 * lto-lang.c (lto_handle_option): Added ATTRIBUTE_UNUSED to parms.
2031 (lto_insert_block): Removed.
2032 (LANG_HOOKS_INSERT_BLOCK): Removed.
2033 * Make-lang.in (lto-cgraph-in.o, lto-function-in.o,
2034 lto-section-in.o): Rules moved to lto/Makefile.in.
2035
2036
20372008-05-16 Ollie Wild <aaw@google.com>
2038
2039 * lto-lang.c (tree-inline.h): Include.
2040 (lto_post_options): New function.
2041 (LANG_HOOKS_POST_OPTIONS): Define.
2042 * lto-cgraph-in.c (overwrite_node): Set node->global.insns.
2043 * lto-function-in.c (input_bb): Set TREE_BLOCK (stmt).
2044
20452008-05-13 Diego Novillo <dnovillo@google.com>
2046
2047 * lto-function-in.c (input_ssa_names): Call
2048 make_ssa_name_fn instead of make_ssa_name.
2049
20502008-05-12 Diego Novillo <dnovillo@google.com>
2051
2052 * lto-cgraph-in.c (overwrite_node): Update references to
2053 inline summary fields.
2054 * lto-function-in.c (input_expr_operand): Do not handle
2055 STRUCT_FIELD_TAG.
2056
20572008-05-09 Ollie Wild <aaw@google.com>
2058
2059 * lang.opt: New file.
2060 * lto-lang.c (lto_init_options): New function.
2061 (lto_handle_option): New function.
2062 (lto_init): Move initialization of flag_unit_at_a_time to
2063 lto_init_options.
2064 (LANG_HOOKS_INIT_OPTIONS): Define.
2065 (LANG_HOOKS_HANDLE_OPTION): Define.
2066
20672008-04-29 Ollie Wild <aaw@google.com>
2068
2069 * lto.c (lto_read_namespace_DIE): New function.
2070 (lto_read_DIE): Add lto_read_namespace_DIE callback. Cache
2071 NAMESPACE_DECL DIE's.
2072 (lto_resolve_namespacedecl_ref): New function.
2073 * lto.h (lto_resolve_namespacedecl_ref): New function.
2074 * lto-section-in.c (lto_read_decls): Read namespace declarations.
2075 * lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
2076 and num_namespace_decls.
2077 * lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
2078 * lto-lang.c (lto_init_ts): New function.
2079 (LANG_HOOKS_INIT_TS): Set as lto_init_ts.
2080
20812008-04-16 Ollie Wild <aaw@google.com>
2082
2083 * lto-function-in.c (input_type_ref): Updated function description.
2084
20852008-04-16 Ollie Wild <aaw@google.com>
2086
2087 * lto-function-in.c (input_type_ref_1): New function.
2088 (input_type_ref): Split into two functions.
2089 (input_function): Add support for type contexts.
2090
20912008-04-16 Ollie Wild <aaw@google.com>
2092
2093 * lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
2094 section name
2095
20962008-04-16 Ollie Wild <aaw@google.com>
2097
2098 * lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
2099 list of supported languages.
2100
21012008-03-25 Kenneth Zadeck <zadeck@naturalbridge.com>
2102
2103 Merge with mainline @133491.
2104
21052008-03-05 Kenneth Zadeck <zadeck@naturalbridge.com>
2106 Jan Hubicka <jh@suse.cz>
2107
2108 * lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
2109 fd->unmaterialized_fndecls.
2110 (lto_get_file_name, lto_materialize_cgraph): New function.
2111 (lto_materialize_constructors_and_inits,
2112 lto_materialize_function): Read info directly from elf file.
2113 (lto_file_read): Made local and initialize dictionary so that
2114 other lto sections can be read without reprocessing the elf file.
2115 (lto_main): Read all functions after all files have been processed
2116 for their types, globals and cgraph.
2117 * Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
2118 dependencies.
2119 * lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
2120 (hash_name, eq_name, lto_elf_build_section_table): New functions.
2121 (lto_elf_read_symtab): Removed function.
2122 (lto_elf_file_open): Removed call to lto_elf_read_symtab.
2123 * lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
2124 (lto_file_read): Made local.
2125 (lto_get_file_name, lto_elf_build_section_table,
2126 lto_input_cgraph):
2127 New function.
2128 * lto-section-in.c (lto_read_section_data, lto_get_section_data):
2129 New functions.
2130 (lto_read_decls): Get the file name.
2131 * lto-cgraph-in.c: New file.
2132 * lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
2133 (input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
2134 (input_labels): Fixed latent sizeof issue.
2135 (input_function): Build stmt array to set call sites into cgraph
2136 edges.
2137 (lto_read_body): Reset cfun->curr_properties.
2138 * lto_section_in.h (lto_section_slot): New structure.
2139 (section_hash_table.lto_file_decl_data): New field.
2140
2141
21422008-02-09 Kenneth Zadeck <zadeck@naturalbridge.com>
2143
2144 * lto.c (lto_read_variable_formal_parameter_const): Remove code to
2145 reconstruct static initializers.
2146 (lto_get_body, lto_materialize_function): Add lto_section_type as
2147 a parameter.
2148 (lto_materialize_constructors_and_inits,
2149 lto_materialize_file_data): New function.
2150 (lto_materialize_function,
2151 lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
2152 unmap_section and map_fn_body to map_section.
2153 (lto_set_cu_context): Process functions and static inits
2154 differently.
2155 * Make-lang.in (LTO_H, lto/lto-function-in.o,
2156 lto/lto-section-in.o): Update dependencies.
2157 * lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
2158 lto_section_type parameter.
2159 (lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
2160 * lto.h (lto_file_vtable_struct): Removed two of the fields and
2161 renamed the other two so that there is only one map function and
2162 one unmap function and each takes a section type parameter.
2163 (lto_read_function_body): Renamed to lto_input_function_body and
2164 added file_data parameter.
2165 (lto_read_var_init): Removed.
2166 (lto_input_constructors_and_inits): New function.
2167 * lto-section-in.c (lto_read_decls): New function.
2168 * lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
2169 var_decls, type_decls, types to lto_file_decl_data.
2170 (input_type_ref, input_expr_operand, lto_read_body): Get
2171 field_decls, fn_decls, var_decls, type_decls, types from different
2172 structure.
2173 (input_globals, input_constructor, lto_read_var_init): Removed.
2174 (input_constructors_or_inits): New function.
2175 (lto_read_function_body, lto_input_constructors_and_inits):
2176 Renamed to lto_input_function_body and takes file_data parameter.
2177 * lto-section-in.h (lto_file_decl_data): New structure.
2178
21792008-01-28 Kenneth Zadeck <zadeck@naturalbridge.com>
2180
2181 * lto-function-in.c (input_globals.c): Changed input type to
2182 lto_function_header.
2183 (input_bb): Removed code to deserialize the stmt number.
2184 (input_function): Renumber all stmts after they are input.
2185 (lto_read_body, lto_read_function_body, lto_read_var_init):
2186 Changed to used new header format and enum section_type.
2187 *lto-lang.c (success): Removed.
2188
21892008-01-28 Nathan Froyd <froydnj@codesourcery.com>
2190
2191 * lto-elf.c (lto_elf_lookup_sym): Remove unused function.
2192 (lto_elf_free_sym): Likewise.
2193
2194 * lto-elf.c (lto_elf_read_var_init): Remove unused function.
2195 (lto_elf_build_init): Likewise.
2196
21972008-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
2198
2199 * lto-read.c: Renamed to lto-function-in.c.
2200 (input_1_unsigned): Moved to lto-section-in.c and renamed
2201 lto_input_1_unsigned.
2202 (input_uleb128): Moved to lto-section-in.c and renamed
2203 lto_input_uleb128.
2204 (input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
2205 lto_input_widest_uint_uleb128.
2206 (input_sleb128): Moved to lto-section-in.c and renamed
2207 lto_input_sleb128.
2208 (input_integer): Moved to lto-section-in.c and renamed
2209 lto_input_integer.
2210 (debug_in_fun): Moved to lto-section-in.c and renamed
2211 lto_debug_in_fun.
2212 (input_block): Moved to lto-section-in.h and renamed
2213 lto_input_block.
2214 (input_expr_operand): Fixed to allow lists with more than one
2215 element.
2216 * lto-section-in.h: New file.
2217 * lto-section-in.c: New file with changes from above.
2218 * Make-lang.in (lto-read.o): Renamed lto-function-in.c.
2219 (lto-section-in.o): New rule.
2220
22212007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2222
2223 * lto-read.c (input_expr_operand): Mark static and external
2224 VAR_DECLs as needed.
2225
22262007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2227
2228 * lto-read.c (input_integer): Use the correct shift amount.
2229
22302007-12-29 Nathan Froyd <froydnj@codesourcery.com>
2231
2232 * lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
2233 (LANG_HOOKS_NAME): Define.
2234
22352007-12-27 Nathan Froyd <froydnj@codesourcery.com>
2236
2237 * lto.c (lto_find_integral_type): Define as a macro. Rename the
2238 original function to...
2239 (lto_find_integral_type_1): ...this. Consult UNSIGNEDP if we
2240 don't have a base type.
2241 (lto_read_enumeration_type_DIE): Examine the values of the
2242 enumeration to determine whether we can use an unsigned type for
2243 the base type of the enumeration.
2244
22452007-12-24 Nathan Froyd <froydnj@codesourcery.com>
2246
2247 * lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
2248 and TYPE_ALIGN on UNION_TYPEs as soon as possible.
2249
22502007-12-22 Nathan Froyd <froydnj@codesourcery.com>
2251
2252 * lto-lang.c (lto_types_compatible_p): New function.
2253 (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
2254
22552007-12-22 Nathan Froyd <froydnj@codesourcery.com>
2256 Kenneth Zadeck <zadeck@naturalbridge.com>
2257
2258 * lto-read.c (input_expr_operand): Fixed uninitialize var warning.
2259 (input_local_vars): Read in DECL_INITIAL and context for local
2260 statics that need to be put in unexpanded_vars_list.
2261
22622007-12-21 Nathan Froyd <froydnj@codesourcery.com>
2263
2264 * lto-read.c (input_real): Use a separate null-terminated buffer
2265 for calling real_from_string.
2266 (input_expr_operand): If we take the address of a FUNCTION_DECL,
2267 tell cgraph that it's needed.
2268
22692007-12-19 Doug Kwan <dougkwan@google.com>
2270
2271 * lto.c (lto_read_base_type_DIE): Handle complex integer types.
2272
22732007-12-18 Nathan Froyd <froydnj@codesourcery.com>
2274
2275 * lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
2276 (lto_file_read): Reset the members of 'context' every time we read
2277 a toplevel DIE, with special attention to last_param_type.
2278
22792007-12-18 Nathan Froyd <froydnj@codesourcery.com>
2280
2281 * lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
2282 'declaration'. Set the assembler name for non-public functions.
2283
22842007-12-17 Kenneth Zadeck <zadeck@naturalbridge.com>
2285
2286 * lto_read.c (data_in.unexpanded_indexes): New array.
2287 (input_local_var): Added code to read in unexpanded_var_list
2288 indexes for variables. Only read in DECL_CHAIN field for
2289 parameters.
2290 (input_local_vars): Added code to rebuild unexpanded_var_list in
2291 order using unexpanded_indexes.
2292 (input_function): Added code to set DECL_CONTEXT for functions.
2293
22942007-12-13 Doug Kwan <dougkwan@google.com>
2295
2296 * lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
2297 in pointer and reference types.
2298
22992007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2300
2301 * lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
2302 RESULT_DECL.
2303
23042007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2305
2306 * lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
2307 already read the DIE.
2308 (lto_get_body): New function, split out from...
2309 (lto_materialize_function): ...here. Call it.
2310 (lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
2311 determine DECL_EXTERNAL.
2312 * lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
2313 FUNCTION_DECLs when necessary. Use the type of the actual
2314 function definition if we are unable to easily merge types. Ignore
2315 spurious DECL_MODE mismatches on VAR_DECLs. Merge DECL_MODEs when
2316 necessary.
2317
23182007-12-13 Nathan Froyd <froydnj@codesourcery.com>
2319
2320 * lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
2321
23222007-12-12 Bill Maddox <maddox@google.com>
2323
2324 Revert
2325 2007-12-07 Bill Maddox <maddox@google.com>
2326
2327 * lto.c (lto_str_fd_init): New function.
2328 (lto_str_fd_close): New function.
2329 (lto_file_init): Call lto_str_fd_init.
2330 (lto_file_close): Call lto_str_fd_close.
2331 (lto_str_read): New function. Read debug string table.
2332 (lto_str_lookup): New function. Get string for debug
2333 string table offset.
2334 (lto_read_form): Recognize DW_FORM_strp.
2335 (lto_file_read): Invoke lto_str_read.
2336
2337 * lto-elf.c (lto_elf_file_open): Read raw section data
2338 for the .debug_str section, if present.
2339
2340 * lto.h (struct lto_str_fd_struct): New struct.
2341 (struct lto_file_struct): Added new field DEBUG_STR
2342 to hold the file descriptor for the debug string table.
2343
23442007-12-07 Bill Maddox <maddox@google.com>
2345
2346 * lto.c (lto_str_fd_init): New function.
2347 (lto_str_fd_close): New function.
2348 (lto_file_init): Call lto_str_fd_init.
2349 (lto_file_close): Call lto_str_fd_close.
2350 (lto_str_read): New function. Read debug string table.
2351 (lto_str_lookup): New function. Get string for debug
2352 string table offset.
2353 (lto_read_form): Recognize DW_FORM_strp.
2354 (lto_file_read): Invoke lto_str_read.
2355
2356 * lto-elf.c (lto_elf_file_open): Read raw section data
2357 for the .debug_str section, if present.
2358
2359 * lto.h (struct lto_str_fd_struct): New struct.
2360 (struct lto_file_struct): Added new field DEBUG_STR
2361 to hold the file descriptor for the debug string table.
2362
23632007-12-07 Nathan Froyd <froydnj@codesourcery.com>
2364
2365 * lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
2366 Grow the basic_block_info and label_to_block_map vectors if
2367 necessary. Read in the block chain.
2368
23692007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2370
2371 * lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.
2372
23732007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2374
2375 * lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.
2376
23772007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2378
2379 * lto-read.c (input_expr_operand): Don't check for MTAGs.
2380 (lto_read_body): Don't declare PROP_alias.
2381
23822007-12-06 Nathan Froyd <froydnj@codesourcery.com>
2383
2384 * lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
2385 argument type information.
2386
23872007-12-03 Nathan Froyd <froydnj@codesourcery.com>
2388
2389 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
2390 TREE_THIS_VOLATILE if the associated type is a volatile type.
2391 (lto_materialize_function): Remove call to init_ssa_operands.
2392 * lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
2393 variable when reading an SSA_NAME. Do the same when reading a
2394 RESULT_DECL, a RETURN_EXPR, or an MTAG.
2395 (input_cfg): Call init_ssa_operands.
2396 (input_ssa_names): Set the default def of an SSA_NAME if necessary.
2397 Move call to init_tree_ssa...
2398 (lto_read_body): ...here. Use push_cfun and pop_cfun. Call
2399 add_referenced_var on any variables referenced from the body of the
2400 function. Inform the rest of the compiler we are in SSA form and
2401 inform later passes about the current properties.
2402
24032007-11-30 Nathan Froyd <froydnj@codesourcery.com>
2404
2405 * lto.c (lto_materialize_function): Add FIXME.
2406
24072007-11-29 Nathan Froyd <froydnj@codesourcery.com>
2408
2409 * lto-lang.c (enum built_in_attribute): New enum.
2410 (flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
2411 built_in_attributes): New variables.
2412 (def_builtin_1): New function.
2413 (lto_define_builtins): #define DEF_BUILTIN and include builtins.def.
2414
24152007-11-28 Nathan Froyd <froydnj@codesourcery.com>
2416
2417 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
2418 DECL_SOURCE_LOCATION for debugging purposes.
2419 (lto_read_member_DIE): Set DECL_SOURCE_LOCATION. If we have read a
2420 bitfield, use the type specified by the DIE for TREE_TYPE and defer
2421 laying out the decl until later.
2422 (lto_read_subroutine_type_subprogram_DIE): Compare the function's
2423 name with DECL_ASSEMBLER_NAME. Set DECL_SOURCE_LOCATION and
2424 TREE_ADDRESSABLE.
2425 * lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
2426 operand of an ADDR_EXPR.
2427 * lto-lang.c (enum lto_builtin_type): New enum.
2428 (builtin_type): New typedef.
2429 (builtin_types, string_type_node, const_string_type_node,
2430 wint_type_node, intmax_type_node, uintmax_type_node,
2431 signed_size_type_node): New variables.
2432 (def_fn_type, builtin_type_for_size, lto_define_builtins,
2433 lto_build_c_type_nodes): New functions.
2434 (lto_init): Initialize builtin types.
2435 (lto_set_decl_assembler_name): Let the target machine mangle the
2436 name if the decl is TREE_PUBLIC, otherwise uniquify it.
2437
24382007-11-21 Nathan Froyd <froydnj@codesourcery.com>
2439
2440 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
2441 set TREE_ADDRESSABLE. Do set DECL_COMDAT. Set TREE_READONLY if
2442 the type is a constant type. Set the assembler name and inform
2443 the rest of the compiler about the new decl if the decl is not
2444 public.
2445 (lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
2446 of DECL_ASSEMBLER_NAME when determining if we have a builtin. Don't
2447 try to read in function bodies for functions that already have bodies.
2448 * lto-symtab.c (lto_same_type_p): Check for unbounded array
2449 equivalency.
2450 (lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
2451 Check for whether we matched a builtin function type before calling
2452 lto_same_type_p on the generated type. Permit cases where the
2453 declaration of an array is unbounded, but the definition is bounded.
2454 Don't combine TREE_PUBLIC flags. Copy over DECL_SIZE and
2455 DECL_SIZE_UNIT if necessary.
2456
24572007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2458
2459 * lto-read.c (input_expr_operand): Get types right
2460 for COMPLEX_CST.
2461
24622007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2463
2464 * lto-read.c (make_new_block, input_cfg): Properly set
2465 n_basic_blocks.
2466
24672007-11-16 Nathan Froyd <froydnj@codesourcery.com>
2468
2469 * lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
2470 set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.
2471
24722007-11-16 Nathan Froyd <froydnj@codesourcery.com>
2473
2474 * lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
2475 construct the integer type for bitfields.
2476
24772007-11-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2478
2479 * lto-read.c (data_in.current_node_has_loc): Removed.
2480 (input_line_info): Returns true if node needs line set.
2481 (set_line_info): Always sets line if called.
2482 (clear_line_info): Removed reference to current_node_needs_loc.
2483 (input_expr_operand): Keeps track locally if current node needs a loc.
2484 (input_local_var): Added code to handle DECL_INITIAL for
2485 static local vars. Only set loc if necessary.
2486
24872007-11-15 Nathan Froyd <froydnj@codesourcery.com>
2488
2489 * lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
2490 DECL_CONTEXT.
2491
24922007-11-15 Nathan Froyd <froydnj@codesourcery.com>
2493
2494 * lto.c: Include langhooks.h.
2495 (lto_find_integral_type): Rework logic to handle the case where
2496 got_byte_size is true, but the bitsize requested and that of the
2497 base_type doesn't match.
2498 (lto_read_variable_formal_parameter_constant_DIE): Only check for
2499 asm_name if we are creating a VAR_DECL.
2500 (lto_materialize_function): Set DECL_EXTERNAL if we can't find a
2501 definition.
2502 (lto_read_subroutine_type_subprogram_DIE): Check for a builtin
2503 function reference and use the builtin's decl if so. Set the
2504 DECL_CONTEXT of the RESULT_DECL for the function.
2505 * lto-lang.c (registered_builtin_fndecls): New variable.
2506 (lto_getdecls): Return it.
2507 (lto_builtin_function): Chain the new decl onto
2508 registered_builtin_fndecls.
2509
25102007-11-15 Kenneth Zadeck <zadeck@naturalbridge.com>
2511
2512 * lto-read.c (process_tree_flags, lto_static_init_local):
2513 Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
2514 (input_line_info, clear_line_info): Fixed new line number code.
2515 (input_expr_operand): Added type to SWITCH_EXPR.
2516 (lto_read_body): Properly initialized data_in.
2517 Clear line info when leaving.
2518
25192007-11-13 Diego Novillo <dnovillo@google.com>
2520
2521 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
2522 Initialize ARTIFICIAL.
2523 (lto_read_subroutine_type_subprogram_DIE): Initialize
2524 SAVED_SCOPE.
2525 * lto-read.c (set_line_info): Remove ; from calls to
2526 LINEMAP_POSITION_FOR_COLUMN.
2527
25282007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
2529
2530 * lto-read.c (input_type_ref): Renamed from get_type_ref.
2531 (input_expr_operand, input_local_var): Renamed get_type_ref to
2532 input_type_ref.
2533 (input_expr_operand): Get the types correct for
2534 vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
2535
25362007-11-13 Doug Kwan <dougkwan@google.com>
2537
2538 * lto-read.c (input_widest_uint_uleb128): New function.
2539 (input_tree_flags, process_tree_flags, input_line_info,
2540 input_expr_operand, input_local_var, input_phi, input_ssa_names):
2541 Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
2542 unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
2543 (lto_static_init_local): Add code to assert that lto_flags_type is
2544 wide enough.
2545
25462007-11-13 Nathan Froyd <froydnj@codesourcery.com>
2547
2548 * lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
2549 (lto_read_subroutine_type_subprogram_DIE): Handle
2550 DW_AT_static_link and DW_AT_specification. Return the
2551 specification if present.
2552 (lto_read_base_type_DIE): Handle DW_ATE_complex_float.
2553
25542007-11-13 Nathan Froyd <froydnj@codesourcery.com>
2555
2556 * lto-lang.c: Include target.h.
2557 (registered_builtin_types): New variable.
2558 (lto_type_for_mode): Increase number of modes handled.
2559 (lto_builtin_function): Fix argument list and return the decl.
2560 (lto_register_builtin_type): New function.
2561 (lto_init): Initialize target builtins and language-independent
2562 nodes.
2563 (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.
2564
25652007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
2566
2567 * lto-read.c (input_expr_operand): Added code to properly handle
2568 index filed. Added new RANGE_EXPR case.
2569
25702007-11-11 Kenneth Zadeck <zadeck@naturalbridge.com>
2571
2572 * lto-read.c (ADD_FUNC_FLAG): Deleted macro.
2573 (data_in): Added current_node_has_loc field.
2574 (input_line_info, set_line_info, clear_line_info): Added a support
2575 for USE_MAPPED_LOCATION and not adding line numbers to nodes that
2576 did not have on on the source side.
2577 (input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
2578 numbers too.
2579
25802007-11-09 Doug Kwan <dougkwan@google.com>
2581
2582 * lto-read.c (input_expr_operand): Change type of operand 2 of
2583 BIT_FIELD_REF expression to be bitsizetype instead of sizetype.
2584
25852007-11-09 Nathan Froyd <froydnj@codesourcery.com>
2586
2587 * lto.c: Include lto-tree.h. Effect small spaces->tabs cleanup.
2588 (lto_read_variable_formal_parameter_constant_DIE): Transfer bits
2589 from a DW_AT_specification or DW_AT_abstract_origin attribute to
2590 the new decl we are creating. Move informing the middle end about
2591 the new decl to...
2592 (lto_main): ...here. Inform the middle end about global variables
2593 after we have read in all the input files.
2594 * lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
2595 variables with internal linkage, so delete the check for internal
2596 linkage. Combine TREE_PUBLIC flags.
2597
25982007-11-08 Nathan Froyd <froydnj@codesourcery.com>
2599
2600 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
2601 DW_AT_decl_line.
2602 * lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
2603 builtin specially. Move check for attribute compatibility
2604 earlier.
2605
26062007-11-07 Nathan Froyd <froydnj@codesourcery.com>
2607
2608 * Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
2609 * config-lang.in (gtfiles): Add lto.h and lto.c.
2610 * lto-elf.c: Include ggc.h.
2611 (lto_elf_file_open): Allocate elf_file from GC memory.
2612 * lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
2613 (lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
2614 in GC memory.
2615 (lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
2616 (lto_file_close): Free file from GC memory.
2617 (lto_cache_store_DIE): Allocate the new entry in GC memory.
2618 (lto_read_member_DIE): Fix declaration.
2619 (lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
2620 in GC memory.
2621 (current_lto_file): New variable.
2622 (lto_main): Use it.
2623 (DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
2624 lto_die_cache_entry): Move to...
2625 * lto.h: ...here and add GTY markers as appropriate. Delete forward
2626 declarations accordingly.
2627 (struct lto_file_struct): Declare.
2628 (lto_file_vtable): Use it instead of lto_file.
2629
26302007-11-06 Alon Dayan <alond@il.ibm.com>
2631 Kenneth Zadeck <zadeck@naturalbridge.com>
2632
2633 * lto-read.c (process_flags, lto_static_init_local):
2634 read flags of VAR_DECL and FUNCTION_DECL of size>1.
2635 change global array num_flags_for_code to flags_length_for_code.
2636 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
2637
26382007-11-05 Nathan Froyd <froydnj@codesourcery.com>
2639
2640 * lto.c (lto_read_structure_union_class_type_DIE): Use proper record
2641 layout functions to compute information about the newly constructed
2642 type.
2643
26442007-11-02 Nathan Froyd <froydnj@codesourcery.com>
2645
2646 * lto-read.c (input_expr_operand): Change the LTO_return_expr1
2647 case to use DECL_RESULT if necessary.
2648
26492007-11-01 Kenneth Zadeck <zadeck@naturalbridge.com>
2650
2651 * lto-read.c (input_tree_list): Removed.
2652 (input_tree_flags): Added parameter to force flags no matter what
2653 tree code.
2654 (input_expr_operand): Added parameter to input_tree_flags.
2655 Added case for IDENTIFIER_NODE and TREE_LIST. Changed ASM to call
2656 input_expr_operand rather than input_tree_lists.
2657 (input_local_var): Use input_expr_operand to read attributes
2658 rather then input_tree_list.
2659 (input_phi, input_ssa_names): Added parameter to input_tree_flags.
2660
26612007-10-31 Nathan Froyd <froydnj@codesourcery.com>
2662
2663 * lto.c (lto_read_typedef_DIE): Fix comment typo.
2664 (lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
2665 TYPE_DECL for it.
2666 * lto-read.c (lto_read_body): Use correct sizes for calculating
2667 type_decls_offset and types_offset.
2668
26692007-10-30 Nathan Froyd <froydnj@codesourcery.com>
2670
2671 * lto-tree.h (union lang_tree_node): Change GTY description to chain
2672 with GENERIC_NEXT.
2673 * config-lang.in (gtfiles): Add lto-lang.c.
2674 * lto-lang.c: Include gt-lto-lto-lang.h.
2675 * Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
2676 (lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
2677 (lto/lto-read.o): Likewise.
2678
26792007-10-29 Kenneth Zadeck <zadeck@naturalbridge.com>
2680
2681 * lto-read.c (data_in): Added type_decls and current_col fields.
2682 (string_slot): New type to hold canonized file name.
2683 (hash_string_slot_node, eq_string_slot_node, canon_file_name,
2684 input_line_info, set_line_info, clear_line_info): New functions.
2685 (file_name_hash_table): New hash table.
2686 (input_local_var, input_labels, input_local_vars_index,
2687 input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
2688 (input_uleb128): Changed type of byte var.
2689 (input_expr_operand): Large number of changes to get line numbers
2690 correct. Added TYPE_DECL case.
2691 (input_globals): Added code to get TYPE_DECLs processed.
2692 (input_local_var): Added code to process line numbers and
2693 TREE_CHAIN and DECL_CONTEXT.
2694 (input_function, input_constructor): Added call to
2695 clear_line_number.
2696 (lto_static_init_local): Added code to get line numbers correct.
2697 (lto_read_body): Added code to get TYPE_DECLS read and to change
2698 parameters to the calls above that had their parms reorganized.
2699
2700
27012007-10-29 Nathan Froyd <froydnj@codesourcery.com>
2702
2703 * lto.h (lto_resolve_typedecl_ref): Declare.
2704 * lto.c (lto_resolve_typedecl_ref): New function.
2705
27062007-10-29 Mark Mitchell <mark@codesourcery.com>
2707 Nathan Froyd <froydnj@codesourcery.com>
2708
2709 * lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
2710 DIEs even if we find an abstract origin for this DIE.
2711
27122007-10-29 Nathan Froyd <froydnj@codesourcery.com>
2713
2714 * lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
2715 RESULT_DECL slightly earlier. Only remember the decl for later
2716 if we successfully merge declarations.
2717
27182007-10-24 Kenneth Zadeck <zadeck@naturalbridge.com>
2719
2720 * lto-read.c (input_expr_operand): Give label_values the proper
2721 context and provide switch statements with a default type.
2722
27232007-10-23 Nathan Froyd <froydnj@codesourcery.com>
2724
2725 * lto-read.c (lto_read_body): Move call to init_ssa_operands...
2726 * lto.c (lto_materialize_function): ...to here.
2727
27282007-10-22 Nathan Froyd <froydnj@codesourcery.com>
2729
2730 * lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
2731 * lto.c (lto_info_fd_init): Initialize it.
2732 (lto_info_fd_close): Free it.
2733 (lto_materialize_function): New function.
2734 (lto_read_subroutine_type_subprogram_DIE): Save the result decl on
2735 unmaterialized_fndecls.
2736 (lto_file_read): Read in all the function bodies after we have read
2737 all of the DWARF info.
2738 * lto-read.c (lto_read_body): Call init_ssa_operands if we are
2739 reading a function body.
2740
27412007-10-20 Kenneth Zadeck <zadeck@naturalbridge.com>
2742
2743 * lto-read.c (input_tree_flags): Renamed from input_flags to be
2744 semetric with output_tree_flags. Added call to log flags.
2745 (process_tree_flags): Renamed from process_flags. Fixed a lot of
2746 type issues to make everything consistent with flags being
2747 unsigned HOST_WIDE_INTS.
2748 (input_expr_operand): Added call to
2749 recompute_tree_invariant_for_addr_expr.
2750 (input_local_var): Added debugging for tree_chains. Now calls
2751 input_tree_flags.
2752 (input_phi): Made flags unsigned HOST_WIDE_INT.
2753 (input_ssa_names): Now calls input_tree_flags.
2754 (lto_read_body): Now sets cfun.
2755 (lto_read_function_body): Now sets current_function_pointer.
2756
27572007-10-19 Nathan Froyd <froydnj@codesourcery.com>
2758
2759 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
2760 definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
2761 inspecting fields within.
2762 (lto_read_DIE_at_ptr): Delete check for null result; let callers
2763 handle this appropriately.
2764
27652007-10-19 Nathan Froyd <froydnj@codesourcery.com>
2766
2767 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
2768 DW_AT_abstract_origin properly. Ensure that we're not dealing with
2769 both DW_AT_abstract_origin and DW_AT_specification.
2770 (lto_read_subroutine_type_subprogram_DIE): Handle
2771 DW_AT_abstract_origin.
2772 (lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
2773 (lto_read_DIE_at_ptr): Define as static to match declaration.
2774 Lookup the PTR in the cache before reading it from the file.
2775 (lto_resolve_var_ref): Adjust accordingly.
2776 (lto_resolve_fn_ref): Adjust accordingly. Tweak comment.
2777 (lto_resolve_field_ref): Adjust accordingly. Tweak comment.
2778
27792007-10-19 Nathan Froyd <froydnj@codesourcery.com>
2780
2781 * lto.c (lto_read_DIE_at_ptr): New function.
2782 (lto_resolve_var_ref): Use it.
2783 (lto_resolve_fn_ref): Use it.
2784 (lto_resolve_field_ref): Use it.
2785 (lto_read_variable_formal_parameter_constant_DIE): Follow
2786 DW_AT_specification and return the associated decl when appropriate.
2787
27882007-10-18 Nathan Froyd <froydnj@codesourcery.com>
2789
2790 * lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
2791 Implement for scalar integer modes.
2792 (lto_init): Initialize size_type_node.
2793
27942007-10-18 Kenneth Zadeck <zadeck@naturalbridge.com>
2795
2796 * lto-read.c (input_expr_operand): Remove ssa name asserts.
2797 (input_local_var): Add chaining for params.
2798 (input_ssa_names): Add cfun parameter.
2799 (input_function): Remove unnecessary else.
2800
28012007-10-17 Nathan Froyd <froydnj@codesourcery.com>
2802
2803 * lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
2804 (lto_resolve_var_ref): Use proper types.
2805 (lto_resolve_fn_ref): Likewise.
2806 (lto_resolve_field_ref): Likewise.
2807
28082007-10-17 Nathan Froyd <froydnj@codesourcery.com>
2809
2810 * lto-read.c (input_expr_operand): Remove case.
2811
28122007-10-17 Nathan Froyd <froydnj@codesourcery.com>
2813
2814 * lto.c (lto_read_only_for_child_DIEs): New function.
2815 (lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
2816 * lto-elf.c (lto_elf_map_lto_section): Remove.
2817 (lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
2818 * lto-read.c (input_expr_operand): Assert that we never read a NULL
2819 SSA_NAME. Add missing case for mechanical codes.
2820 (input_cfg): Use basic_block_info_for_function instead of
2821 basic_block_info.
2822
28232007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2824
2825 * lto-read.c (input_sleb128, input_integer): Use proper casts.
2826 (input_list): Renamed input_tree_list and modified to follow same
2827 protocol as lto-function-out.c:output_tree_list.
2828 (input_expr_operand): Make asm operands use input_tree_list.
2829 (input_local_var): Now uses input_tree_list.
2830 (lto_read_body): Change placement for setting context of debug_labels.
2831
2832
28332007-10-16 Kenneth Zadeck <zadeck@naturalbridge.com>
2834
2835 * lto-read.c (input_real): Output debugging in proper order.
2836 (input_integer): Compute bit lengths properly.
2837 (input_list): Clean up declaration.
2838 (input_expr_operand): Change calls to input_real to match fix.
2839 Make reading of LTO_bit_field_ref1 match output.
2840 (input_local_var): Make reading of attributes match what is being
2841 written.
2842 (dump_debug_stream): Also print char in hex.
2843 (debug_out_fun): Fix signed unsigned mismatch.
2844
28452007-10-10 Nathan Froyd <froydnj@codesourcery.com>
2846
2847 * lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
2848 DW_AT_GNU_vector specially, as they are not contiguous with the
2849 specified set of attribute names. Use class_mask to check for
2850 errors at the end of the function
2851 (lto_resolve_var_ref): Read the DIE if it is not cached.
2852 (lto_resolve_fn_ref): Likewise.
2853 (lto_resolve_field_ref): Likewise.
2854
28552007-10-05 Nathan Froyd <froydnj@codesourcery.com>
2856
2857 * lto.c: Include dwarf2out.h.
2858 (lto_cache_store_DIE): Assert that we never change the value.
2859 (LTO_BEGIN_READ_ATTRS): Print an informative error message.
2860 (lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
2861 (lto_read_array_type_DIE): Don't error on ndims == 0; build a
2862 sensible type instead.
2863 (lto_read_structure_union_class_type_DIE): Store the newly
2864 created type prior to reading the members of the structure to
2865 avoid infinite recursion. Avoid computing types and alignments
2866 for structures whose sizes are unknown.
2867 (lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
2868 and set DECL_ARTIFICIAL accordingly. Ignore DW_AT_abstract_origin,
2869 DW_AT_const_value, and DW_AT_specification.
2870 (lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
2871 Return early if we have already constructed the function type.
2872 (lto_read_typedef_DIE): Check to see if the type has been cached
2873 already. Cache the type before reading any children.
2874 (lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
2875 (lto_read_DIE): Unset context->skip_non_parameters around reading
2876 the DIE.
2877 (lto_resolve_fn_ref): Delete trailing whitespace.
2878
28792007-09-11 Kenneth Zadeck <zadeck@naturalbridge.com>
2880
2881 * lto-read.c (input_expr_operand): Added type for STRING_CST.
2882
28832007-09-10 Nathan Froyd <froydnj@codesourcery.com>
2884
2885 * lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.
2886
28872007-09-07 Nathan Froyd <froydnj@codesourcery.com>
2888
2889 * lto-lang.c (signed_and_unsigned_types): New variable.
2890 (lto_type_for_size): Consult signed_and_unsigned_types to find
2891 an approprite type, creating it if necessary.
2892 (lto_set_decl_assembler_name): Add actual method body.
2893
28942007-09-06 Jim Blandy <jimb@codesourcery.com>
2895
2896 * lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
2897 can't find a var init for this variable, leave its DECL_INITIAL.
2898 * lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
2899 lto_elf_map_fn_body.
2900 (lto_map_lto_section): New function.
2901 (lto_elf_file_vtable): Use lto_elf_map_lto_section for function
2902 bodies, and lto_elf_map_optional_lto_section for variable
2903 initializers.
2904 (lto_elf_find_section_data): Quietly return NULL if the section is
2905 missing.
2906 (lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.
2907
2908 * lto-elf.c (lto_elf_find_section_data): Remove dead code.
2909
2910 * lto-read.c (lto_read_body): Doc fix.
2911
29122007-08-29 Kenneth Zadeck <zadeck@naturalbridge.com>
2913
2914 * lto-read.c (fun_in): Renamed to data_in.
2915 (input_expr_operand, input_local_var, input_string_internal,
2916 input_string, input_real, input_list, get_label_decl,
2917 get_type_ref, input_expr_operand, input_globals, input_labels,
2918 input_local_vars_index, input_local_var, input_local_vars,
2919 input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
2920 (input_constructor): New function.
2921 (lto_read_function_body): Renamed to lto_read_body and generalized
2922 to handle both functions and constructors.
2923 (lto_read_function_body, lto_read_var_init): New function.
2924
2925
29262007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
2927
2928 * lto-read.c (input_expr_operand): Assert that there really is a
2929 FUNCTION_DECL.
2930 (input_globals): Removed checks on 0 section.
2931
29322007-08-28 Kenneth Zadeck <zadeck@naturalbridge.com>
2933
2934 * lto-read.c (fun_in): Added local_decls_index and
2935 local_decls_index_d.
2936 (input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
2937 (input_globals): Enabled code to handle FIELD_DECLs.
2938 (input_local_vars_index, input_local_vars): New function.
2939 (input_local_var): Changed to allow locals to be input randomly.
2940 (lto_read_function_body): Added code to input the
2941 local_decls_index and to free various structures.
2942
29432007-08-17 Jim Blandy <jimb@codesourcery.com>
2944
2945 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
2946 ATTRIBUTE_UNUSED from 'die' formal.
2947
2948 Use enum LTO_tags where appropriate, instead of 'unsigned int'.
2949 * lto-read.c (input_record_start): Fix return type, type of 'tag'.
2950 (input_list): Fix type of 'tag'.
2951 (input_expr_operand): Fix type of 'tag' argument. Update
2952 declaration. Fix type of 'ctag'. Add default case to switch,
2953 since the type of the switched value is now an enum.
2954 (input_local_vars): Fix type of 'tag'.
2955 (input_bb): Fix type of 'tag' argument.
2956 (input_function): Fix type of 'tag' argument.
2957
29582007-08-16 Jim Blandy <jimb@codesourcery.com>
2959
2960 * lto.c (lto_read_member_DIE): Record the tree we create in
2961 fd->die_cache. (Our 'die' argument is no longer unused.)
2962 (lto_resolve_field_ref): New function.
2963 * lto.h (lto_resolve_field_ref): New declaration.
2964
29652007-08-15 Jim Blandy <jimb@codesourcery.com>
2966
2967 * lto-read.c (lto_read_var_init): Mark arguments as unused.
2968
29692007-08-07 Jim Blandy <jimb@codesourcery.com>
2970
2971 * lto.c (lto_read_form): Complete attr_classes table.
2972 (DWARF2_form_data): Doc fix.
2973
29742007-08-05 Mark Mitchell <mark@codesourcery.com>
2975
2976 * lto.h (lto_file_vtable): Remove read_var_init. Add map_var_init
2977 and unmap_var_init.
2978 (lto_read_var_init): Declare.
2979 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
2980 interface for reading variable initializers.
2981 * lto-elf.c (lto_elf_read_var_init): Remove.
2982 (lto_elf_file_vtable): Update initializer.
2983 (lto_elf_read_var_init): Add comment about unused-ness.
2984 * lto-read.c (lto_read_var_init): New.
2985
2986 * lto.c (lto_read_form): Add entry for DW_AT_inline.
2987
29882007-08-02 Kenneth Zadeck <zadeck@naturalbridge.com>
2989
2990 * lto-read.c (lto_read_function_body): Moved declaration of fn
2991 outside of ifdef.
2992
29932007-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
2994
2995 * lto-read.c (input_uleb128, input_string_internal, input_real,
2996 input_integer, input_record_start, input_list, get_type_ref,
2997 input_flags, input_expr_operand, input_expr_operand,
2998 input_expr_operand, input_local_vars, input_cfg, input_phi,
2999 input_ssa_names, input_bb, input_function): Added semicolons.
3000
3001
30022007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3003
3004 * lto-read.c (input_globals): Remove debugging.
3005 (input_function): Set DECL_ARGUMENTS.
3006
3007
30082007-07-31 Kenneth Zadeck <zadeck@naturalbridge.com>
3009
3010 * lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
3011 RETURN_EXPR, MODIFY_EXPR and processing of flags.
3012 (input_phi): Made work with operands other than SSA_NAMES and
3013 fixed processing of flags.
3014 (input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
3015 (input_flags): New function.
3016 * lto-lang.c (lto_init): Changed state of in_lto_p.
3017
3018
30192007-07-24 Mark Mitchell <mark@codesourcery.com>
3020
3021 * lto-tree.h (lto_varargs_cookie): Remove.
3022 * lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
3023 skip_non_parameters, skip_parameters.
3024 (lto_varargs_cookie): Remove.
3025 (lto_read_variable_formal_parameter_constant_DIE): Keep track of
3026 parameter types.
3027 (lto_read_abbrev): New function.
3028 (lto_read_subroutine_type_subprogram_DIE): Make two passes over
3029 child DIEs.
3030 (lto_read_unspecified_parameters_DIE): Set context->varargs_p.
3031 (lto_read_DIE): Use lto_read_abbrev. Honor skip_* flags.
3032 (lto_file_read): Initialize new context fields.
3033 * lto-lang.c (lto_type_for_mode): Return NULL_TREE.
3034 (lto_unsigned_type): Remove.
3035 (lto_signed_type): Likewise.
3036 (lto_signed_or_unsigned_type): Likewise.
3037 (lto_init): Do not create lto_varargs_cookie.
3038 (LANG_HOOKS_UNSIGNED_TYPE): Do not define.
3039 (LANG_HOOKS_SIGNED_TYPE): Likewise.
3040 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.
3041
30422007-07-19 Jan Hubicka <jh@suse.cz>
3043
3044 * lto-read.c (lto_read_function_body): Produce empty scope block
3045 to avoid crash.
3046
30472007-07-18 Mark Mitchell <mark@codesourcery.com>
3048
3049 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
3050 process local variables.
3051 (lto_read_subroutine_type_subprogram_DIE): Read child DIEs.
3052
30532007-07-13 Kenneth Zadeck <zadeck@naturalbridge.com>
3054
3055 * lto-read.c (input_list, input_expr_operand): Added struct
3056 function parameter.
3057 (init_cfg, finalize_cfg): Removed function.
3058 (input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
3059 (input_labels, input_local_vars): Now takes input_block parameter rather than
3060 synthsyzing it.
3061 (input_cfg, input_phi, input_ssa_names): New functions.
3062 (input_bb): Now passes in input_blocks. Does not construct cfg
3063 and processes the list of phi functions.
3064 (input_function): Now builds both the cfg and ssa_names table.
3065 (lto_read_function_body): Processes new header fields to construct
3066 streams for the ssa_names and cfg and their debugging.
3067 * lto/lto-lang.c (lto_init): Set in_lto_p.
3068
3069
30702007-06-28 Mark Mitchell <mark@codesourcery.com>
3071
3072 * lto.h (lto_file_vtable): Add read_var_init.
3073 * lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
3074 initializers.
3075 (lto_main): Remove bogus asserts.
3076 * lto-elf.c (tm.h): Include it.
3077 (libiberty.y): Likewise.
3078 (lto_elf_file): Add strtab and symtab. Rename
3079 string_table_section_index to sec_strtab.
3080 (lto_elf_file_vtable): Add lto_elf_read_var_init.
3081 (lto_elf_get_shdr): New function.
3082 (lto_elf_free_shdr): Likewise.
3083 (lto_elf_find_section_data): Use them.
3084 (lto_elf_read_symtab): New function.
3085 (lto_elf_lookup_sym): Likewise.
3086 (lto_elf_free_sym): Likewise.
3087 (lto_elf_file_open): Tidy. Call lto_elf_read_symtab.
3088 (lto_elf_built_init): New function.
3089 (lto_elf_read_var_init): Likewise.
3090 * Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).
3091
30922007-06-26 Kenneth Zadeck <zadeck@naturalbridge.com>
3093
3094 * lto-read (make_new_block): Initialize the stmt_list.
3095 (lto_static_init_local): Add debugging for missing codes.
3096
30972007-06-26 Mark Mitchell <mark@codesourcery.com>
3098
3099 * lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
3100 unprototyped functions.
3101
31022007-06-23 Mark Mitchell <mark@codesourcery.com>
3103
3104 * lto.c (lto_read_variable_formal_parameter_constant_DIE):
3105 Handle DW_AT_MIPS_linkage_name.
3106 (lto_read_subroutine_type_subprogram): Likewise. Correct
3107 compilation errors.
3108 (lto_main): Remove incorrect assertions.
3109 * lto-symbtab.c: Build function types out of TREE_LISTs.
3110
3111 * lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
3112
3113 * Make-lang.in (LTO_OBJS): Depend on attribs.o.
3114
31152007-06-21 Kenneth Zadeck <zadeck@naturalbridge.com>
3116
3117 * lto/lto-tree.h (lang_decl, lang_type, language_function): Added
3118 dummy since ggc does not like empty structs.
3119 * lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
3120 * lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
3121 expr->common to expr->base.
3122 (make_new_block): Moved stmt_list to proper place.
3123
3124
31252007-03-14 Robert Kennedy <jimbob@google.com>
3126
3127 Eliminate use of lang_hooks.set_decl_assembler_name from LTO
3128 * lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
3129 assembler name from DWARF.
3130 * lto-lang.c (lto_set_decl_assembler_name) New function.
3131
31322006-09-10 Mark Mitchell <mark@codesourcery.com>
3133
3134 * lto.h (lto_file_vtable): New structure.
3135 (lto_file): Add vtable pointer.
3136 (lto_file_init): Add vtable paramter.
3137 (lto_read_function_body): New function.
3138 (lto_symtab_merge_fn): New function.
3139 * lto.c (lto_file_init): Add vtable parameter.
3140 (lto_read_form): Fill in entries for DW_AT_prototyped,
3141 DW_AT_frame_base.
3142 (lto_read_subroutine_type_subprogram_DIE): New function.
3143 (lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
3144 DW_TAG_subprogram.
3145 * lto-elf.c (lto_elf_vile_vtable): New variable.
3146 (lto_elf_file_open): Pass it to lto_file_init.
3147 (lto_elf_map_fn_body): New function.
3148 (lto_elf_unmap_fn_body): Likewise.
3149 * lto-read.c: New file.
3150 * lto-symtab.c (lto_symtab_merge_fn): New function.
3151 * lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
3152 tree_rest_of_compilation.
3153 * Make-lang.in (LTO_OBJS): Add lto-read.o
3154 (lto-read.o): New target.
3155
31562006-09-03 Mark Mitchell <mark@codesourcery.com>
3157
3158 * lto.c (<inttypes.h>): Don't include it.
3159 (lto_context): Don't typedef it.
3160 (lto_resolve_reference): New function.
3161 (lto_read_form): Use it.
3162 (lto_resolve_type_ref): New function.
3163 (lto_resolve_var_ref): Likewise.
3164 (lto_resolve_fn_ref): Likewise.
3165 * lto.h (<inttypes.h>): Include it.
3166 (lto_context): New type.
3167 (lto_ref): New structure.
3168 (lto_resolve_type_ref): Declare.
3169 (lto_resolve_var_ref): Likewise.
3170 (lto_resolve_fn_ref): Likewise.
3171
31722006-08-18 Mark Mitchell <mark@codesourcery.com>
3173
3174 * lang-specs.h: New file.
3175
31762006-08-14 Mark Mitchell <mark@codesourcery.com>
3177
3178 * lto.c (lto_info_fd_init): Allocate the DIE cache.
3179 (lto_info_fd_close): Deallocate it.
3180 (lto_die_cache_entry): New structure.
3181 (lto_cache_hash): New function.
3182 (lto_cache_eq): Likewise.
3183 (lto_cache_store_DIE): Likewise.
3184 (lto_cache_lookup_DIE): Likewise.
3185 (lto_read_referenced_type_DIE): Use the cache.
3186 (lto_read_pointer_type_DIE): Robustify.
3187 (lto_read_DIE): Use the cache.
3188 * lto.h (hashtab.h): Include.
3189 (lto_info_fd): Add DIE cache.
3190 * Make-lang.in (LTO_H): New variable.
3191 (lto/lto-lang.o): Use LTO_H.
3192 (lto/lto-elf.o): Likewise.
3193 (lto/lto-symtab.o): Likewise.
3194
31952006-07-09 Mark Mitchell <mark@codesourcery.com>
3196
3197 * lto.c (lto_abi_mismatch_error): New function.
3198 (lto_abbrev_read): Initialize num_abbrevs.
3199 (lto_read_form): Specify allowed form classes for
3200 DW_AT_declaration. Adjust for change to lto_set_cu_context.
3201 (lto_read_variable_formal_parameter_constant_DIE): Handle
3202 DW_AT_declaration. Call lto_symtab_merge_var.
3203 (lto_read_pointer_type_DIE): New function.
3204 (lto_read_base_type_DIE): Use build_nonstandard_integer_type. Do
3205 not creat TYPE_DECLs for types that already have them.
3206 (lto_read_DIE): Add lto_read_pointer_type_DIE.
3207 (lto_set_cu_context): Make cu_start point to the header, not the
3208 first DIE.
3209 (lto_file_read): Adjust for change to lto_set_cu_context.
3210 * Make-lang.in (LTO_OBJS): Add lto-symtab.o.
3211 (lto/lto-symtab.o): New rule.
3212 * lto-tree.h (lang_identifier): Add decl field.
3213 (LANG_IDENTIFIER_CAST): New macro.
3214 (LTO_IDENTIFIER_DECL): Likewise.
3215 (lto_symtab_merge_var): Declare.
3216 * lto-symtab.c: New file.
3217
32182006-07-02 Daniel Berlin <dberlin@dberlin.org>
3219
3220 * lto.c (lto_context): Add current_cu and info_fd members.
3221 (DWARF2_CompUnit): New structure.
3222 (lto_read_DIE): Take lto_info_fd *.
3223 (lto_read_child_DIEs): Ditto.
3224 (lto_file_corrupt_error): Constify argument.
3225 (lto_set_cu_context): New function
3226 (lto_info_fd_init): Ditto.
3227 (lto_info_fd_close): Ditto.
3228 (lto_file_init): Use lto_info_fd_init.
3229 (lto_file_close): Use lto_info_fd_close.
3230 (lto_read_initial_length): Pass in pointer to header size.
3231 (lto_read_comp_unit_header): Correct cu_length to
3232 real length from beginning of header. Take lto_info_fd * as
3233 argument.
3234 (find_cu_for_offset): New function.
3235 (lto_read_form): Change first argument to lto_info_fd *.
3236 Add FORM_CONTEXT argument.
3237 Handle DW_FORM_ref_addr.
3238 (lto_read_tag_DIE): Change first argument to lto_info_fd *.
3239 (LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
3240 Swap contexts if necessary for form.
3241 (LTO_BEGIN_READ_ATTRS): Cast fd to right type for
3242 lto_file_corrupt_error.
3243 (LTO_END_READ_ATTRS): Swap contexts back if it had changed.
3244 (lto_read_referenced_type_DIE): Change first argument to
3245 lto_info_fd *. Access lto_fd fields through base pointer.
3246 (lto_read_compile_unit_DIE): Change first argument to an
3247 lto_info_fd *.
3248 (lto_read_variable_formal_parameter_constant_DIE): Ditto.
3249 (lto_read_base_type_DIE): Ditto.
3250 (lto_read_child_DIEs): Ditto.
3251 (lto_read_DIE): Ditto. Change type of function pointer.
3252 (lto_info_read): New function.
3253 (lto_set_cu_context): Ditto.
3254 (lto_file_read): Use lto_info_read, walk resulting CU's
3255 (lto_main): Update for lto_info_fd change.
3256 * lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
3257 necessary.
3258 * lto.h (DWARF2_CompUnit): New structure.
3259 (lto_info_fd): Ditto.
3260 (lto_file): Change debug_info to be an lto_info_fd.
3261
32622006-06-25 Mark Mitchell <mark@codesourcery.com>
3263
3264 * lto.c (toplev.h): Include it.
3265 (dwarf2.h): Likewise.
3266 (tree.h): Likewise.
3267 (tm.h): Likewise.
3268 (cgraph.h): Likewise.
3269 (ggc.h): Likewise.
3270 (inttypes.h): Likewise.
3271 (DWARF2_attr): New type.
3272 (DWARF2_abbrev): Likewise.
3273 (DWARF2_class): Likewise.
3274 (DWARF2_form_data): Likewise.
3275 (lto_context): Likewise.
3276 (lto_fd_init): New function.
3277 (lto_abbrev_fd_init): Likewise.
3278 (lto_abbrev_fd_close): Likewise.
3279 (lto_file_init): Use them.
3280 (lto_file_close): New function.
3281 (lto_file_corrupt_error): Likewise.
3282 (LTO_CHECK_INT_VAL): New macro.
3283 (lto_check_size_t_val): New function.
3284 (lto_check_int_val): Likewise.
3285 (LTO_READ_TYPE): New macro.
3286 (lto_read_ubyte): New function.
3287 (lto_read_uhalf): Likewise.
3288 (lto_read_uword): Likewise.
3289 (lto_read_uleb128): Likewise.
3290 (lto_read_initial_length): Likewise.
3291 (lto_abbrev_read_attrs): Likewise.
3292 (lto_abbrev_read): Likewise.
3293 (lto_abbrev_lookup): Likewise.
3294 (lto_read_section_offset): Likewise.
3295 (lto_read_comp_unit_header): Likewise.
3296 (lto_read_form): Likewise.
3297 (LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
3298 (LTO_BEGIN_READ_ATTRS): Likewise.
3299 (LTO_END_READ_ATTRS): Likewise.
3300 (lto_unsupported_attr_error): New function.
3301 (lto_get_identifier): Likewise.
3302 (lto_read_referenced_type_DIE): Likewise.
3303 (lto_read_compile_unit_DIE): Likewise.
3304 (lto_read_variable_formal_parameter_constant_DIE): Likewise.
3305 (lto_read_base_type_DIE): Likewise.
3306 (lto_read_DIE): Likewise.
3307 (lto_read_child_DIEs): Likewise.
3308 (lto_file_read): Read DIEs.
3309 (lto_main): Ask middle end to emit entities.
3310 * lto-tree.h (lang_identifier): Inherit from tree_identifier.
3311 * lto-elf.c (lto_elf_file_open): Adjust for interface changes.
3312 (lto_elf_file_close): Likewise.
3313 * lto.h (lto_file): Declare.
3314 (DWARF2_abbrev): Likewise.
3315 (lto_fd): New type.
3316 (lto_abbrev_fd): Likewise.
3317 (lto_file): Use new types.
3318 (lto_file_close): Declare.
3319 * lto-lang.c (lto_init): Always use unit-at-a-time mode.
3320
33212006-06-18 Mark Mitchell <mark@codesourcery.com>
3322
3323 * lto.h: New file.
3324 * lto.c: New file.
3325 * lto-elf.c: New file.
3326 * lto-lang.c (flags.h): Include it.
3327 (lto.h): Likewise.
3328 (lto_init): New function.
3329 (lto_write_globals): Remove.
3330 (LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing.
3331 (LANG_HOOKS_INIT): Define.
3332 (LANG_HOOKS_PARSE_FILE): Likewise.
3333 * Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
3334 (LTO_EXE): Link with libelf.
3335 (lto/lto-lang.o): Update dependencies.
3336 (lto/lto.o): New target.
3337 (lto/lto-elf.o): Likewise.
3338
33392006-06-12 Mark Mitchell <mark@codesourcery.com>
3340
3341 * config-lang.in: New file.
3342 * Make-lang.in: Likewise.
3343 * lto-tree.h: Likewise.
3344 * lto-lang.c: Likewise.
3345