aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/ChangeLog
blob: 29fa8d9a3742438d949f2a7f1c0ca9fdf09afd51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
2008-05-13  Diego Novillo  <dnovillo@google.com>

	* lto-function-in.c (input_ssa_names): Call
	make_ssa_name_fn instead of make_ssa_name.

2008-05-12  Diego Novillo  <dnovillo@google.com>

	* lto-cgraph-in.c (overwrite_node): Update references to
	inline summary fields.
	* lto-function-in.c (input_expr_operand): Do not handle
	STRUCT_FIELD_TAG.

2008-05-09  Ollie Wild  <aaw@google.com>

	* lang.opt: New file.
	* lto-lang.c (lto_init_options): New function.
	(lto_handle_option): New function.
	(lto_init): Move initialization of flag_unit_at_a_time to
	lto_init_options.
	(LANG_HOOKS_INIT_OPTIONS): Define.
	(LANG_HOOKS_HANDLE_OPTION): Define.

2008-04-29  Ollie Wild  <aaw@google.com>

	* lto.c (lto_read_namespace_DIE): New function.
	(lto_read_DIE): Add lto_read_namespace_DIE callback.  Cache
	NAMESPACE_DECL DIE's.
	(lto_resolve_namespacedecl_ref): New function.
	* lto.h (lto_resolve_namespacedecl_ref): New function.
	* lto-section-in.c (lto_read_decls): Read namespace declarations.
	* lto-section-in.h (struct lto_file_decl_data): Add namespace_decls
	and num_namespace_decls.
	* lto-function-in.c (input_expr_operand): Add NAMESPACE_DECL case.
	* lto-lang.c (lto_init_ts): New function.
	(LANG_HOOKS_INIT_TS): Set as lto_init_ts.

2008-04-16  Ollie Wild  <aaw@google.com>

	* lto-function-in.c (input_type_ref): Updated function description.

2008-04-16  Ollie Wild  <aaw@google.com>

	* lto-function-in.c (input_type_ref_1): New function.
	(input_type_ref): Split into two functions.
	(input_function): Add support for type contexts.

2008-04-16  Ollie Wild  <aaw@google.com>

	* lto.c (lto_materialize_function): Use DECL_ASSEMBLER_NAME to compute
	section name

2008-04-16  Ollie Wild  <aaw@google.com>

	* lto.c (lto_read_compile_unit_DIE): Add DW_LANG_C_plus_plus to the
	list of supported languages.

2008-03-25  Kenneth Zadeck <zadeck@naturalbridge.com>

	Merge with mainline @133491.

2008-03-05  Kenneth Zadeck <zadeck@naturalbridge.com>
	    Jan Hubicka  <jh@suse.cz>

	* lto.c (lto_info_fd_init, lto_info_fd_close): Get rid of
	fd->unmaterialized_fndecls.
	(lto_get_file_name, lto_materialize_cgraph): New function.
	(lto_materialize_constructors_and_inits,
	lto_materialize_function): Read info directly from elf file.
	(lto_file_read): Made local and initialize dictionary so that
	other lto sections can be read without reprocessing the elf file.
	(lto_main): Read all functions after all files have been processed
	for their types, globals and cgraph.  
	* Make-lang.in (lto.o, lto-cgraph-in.c, lto-section-in): Changed
	dependencies.
	* lto-elf.c (lto_elf_file): Removed strtab, symtab fields.
	(hash_name, eq_name, lto_elf_build_section_table): New functions.
	(lto_elf_read_symtab): Removed function.
	(lto_elf_file_open): Removed call to lto_elf_read_symtab.
	* lto.h (lto_info_fd_struct): Removed unmaterialized_fndecls.
	(lto_file_read): Made local.
	(lto_get_file_name, lto_elf_build_section_table,
	lto_input_cgraph): 
	New function.
	* lto-section-in.c (lto_read_section_data, lto_get_section_data):
	New functions.
	(lto_read_decls): Get the file name.
	* lto-cgraph-in.c: New file.
	* lto-function-in.c (tag_to_expr): Stops at LTO_tree_last_tag.
	(input_expr_operand, lto_read_body): Set lto_debug_context.tag_names.
	(input_labels): Fixed latent sizeof issue.
	(input_function): Build stmt array to set call sites into cgraph
	edges.
	(lto_read_body): Reset cfun->curr_properties.
	* lto_section_in.h (lto_section_slot): New structure.
	(section_hash_table.lto_file_decl_data): New field.

	
2008-02-09  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto.c (lto_read_variable_formal_parameter_const): Remove code to
	reconstruct static initializers.
	(lto_get_body, lto_materialize_function): Add lto_section_type as
	a parameter.
	(lto_materialize_constructors_and_inits,
	lto_materialize_file_data): New function.
	(lto_materialize_function,
	lto_read_subroutine_type_subprogram_DIE): Renamed unmap_fn_body to
	unmap_section and map_fn_body to map_section.
	(lto_set_cu_context): Process functions and static inits
	differently.
	* Make-lang.in (LTO_H, lto/lto-function-in.o,
	lto/lto-section-in.o): Update dependencies.
	* lto/lto-elf.c (lto_elf_map_optional_lto_section): Add
	lto_section_type parameter.
	(lto_elf_unmap_fn_body): Renamed to lto_elf_unmap_section.
	* lto.h (lto_file_vtable_struct): Removed two of the fields and 
	renamed the other two so that there is only one map function and
	one unmap function and each takes a section type parameter.
	(lto_read_function_body): Renamed to lto_input_function_body and
	added file_data parameter.
	(lto_read_var_init): Removed.
	(lto_input_constructors_and_inits): New function.
	* lto-section-in.c (lto_read_decls): New function.
	* lto-function-in.c (data_in): Moved fields field_decls, fn_decls,
	var_decls, type_decls, types to lto_file_decl_data.
	(input_type_ref, input_expr_operand, lto_read_body): Get
	field_decls, fn_decls, var_decls, type_decls, types from different
	structure.
	(input_globals, input_constructor, lto_read_var_init): Removed.
	(input_constructors_or_inits): New function.
	(lto_read_function_body, lto_input_constructors_and_inits):
	Renamed to lto_input_function_body and takes file_data parameter.
	* lto-section-in.h (lto_file_decl_data): New structure.
	
2008-01-28  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-function-in.c (input_globals.c): Changed input type to
	lto_function_header.
	(input_bb): Removed code to deserialize the stmt number.
	(input_function): Renumber all stmts after they are input.
	(lto_read_body, lto_read_function_body, lto_read_var_init):
	Changed to used new header format and enum section_type.
	*lto-lang.c (success): Removed. 
	
2008-01-28  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-elf.c (lto_elf_lookup_sym): Remove unused function.
	(lto_elf_free_sym): Likewise.

	* lto-elf.c (lto_elf_read_var_init): Remove unused function.
	(lto_elf_build_init): Likewise.

2008-01-14  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c: Renamed to lto-function-in.c.
	(input_1_unsigned): Moved to lto-section-in.c and renamed
	lto_input_1_unsigned.
	(input_uleb128): Moved to lto-section-in.c and renamed
	lto_input_uleb128.
	(input_widest_uint_uleb128): Moved to lto-section-in.c and renamed
	lto_input_widest_uint_uleb128.
	(input_sleb128): Moved to lto-section-in.c and renamed
	lto_input_sleb128.
	(input_integer): Moved to lto-section-in.c and renamed
	lto_input_integer.
	(debug_in_fun): Moved to lto-section-in.c and renamed
	lto_debug_in_fun.
	(input_block): Moved to lto-section-in.h and renamed
	lto_input_block.
	(input_expr_operand): Fixed to allow lists with more than one
	element.
	* lto-section-in.h: New file.
	* lto-section-in.c: New file with changes from above.
	* Make-lang.in (lto-read.o): Renamed lto-function-in.c.
	(lto-section-in.o): New rule.
	
2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_expr_operand): Mark static and external
	VAR_DECLs as needed.

2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_integer): Use the correct shift amount.

2007-12-29  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
	(LANG_HOOKS_NAME): Define.

2007-12-27  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_find_integral_type): Define as a macro.  Rename the
	original function to...
	(lto_find_integral_type_1): ...this.  Consult UNSIGNEDP if we
	don't have a base type.
	(lto_read_enumeration_type_DIE): Examine the values of the
	enumeration to determine whether we can use an unsigned type for
	the base type of the enumeration.

2007-12-24  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_structure_union_class_type_DIE): Set TYPE_MODE
	and TYPE_ALIGN on UNION_TYPEs as soon as possible.

2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-lang.c (lto_types_compatible_p): New function.
	(LANG_HOOKS_TYPES_COMPATIBLE_P): Define.

2007-12-22  Nathan Froyd  <froydnj@codesourcery.com>
	    Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_expr_operand): Fixed uninitialize var warning.
	(input_local_vars): Read in DECL_INITIAL and context for local
	statics that need to be put in unexpanded_vars_list.

2007-12-21  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_real): Use a separate null-terminated buffer
	for calling real_from_string.
	(input_expr_operand): If we take the address of a FUNCTION_DECL,
	tell cgraph that it's needed.

2007-12-19  Doug Kwan  <dougkwan@google.com>

	* lto.c (lto_read_base_type_DIE): Handle complex integer types.

2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_DIE): Call lto_read_only_for_child_DIEs instead.
	(lto_file_read): Reset the members of 'context' every time we read
	a toplevel DIE, with special attention to last_param_type.

2007-12-18  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_subroutine_type_subprogram_DIE): Initialize
	'declaration'.  Set the assembler name for non-public functions.

2007-12-17  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto_read.c (data_in.unexpanded_indexes): New array.
	(input_local_var): Added code to read in unexpanded_var_list
	indexes for variables.  Only read in DECL_CHAIN field for
	parameters.
	(input_local_vars): Added code to rebuild unexpanded_var_list in
	order using unexpanded_indexes.
	(input_function): Added code to set DECL_CONTEXT for functions.

2007-12-13  Doug Kwan  <dougkwan@google.com>

	* lto.c (lto_read_pointer_reference_type_DIE): Handle optional name
	in pointer and reference types.

2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_expr_operand): Use DECL_RESULT when reading a
	RESULT_DECL.

2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_array_type_DIE): Return the cached DIE if we've
	already read the DIE.
	(lto_get_body): New function, split out from...
	(lto_materialize_function): ...here.  Call it.
	(lto_read_subroutine_type_subprogram_DIE): Call lto_get_body to
	determine DECL_EXTERNAL.
	* lto-symtab.c (lto_symtab_merge_decl): Merge the DECL_RESULTs of
	FUNCTION_DECLs when necessary.  Use the type of the actual
	function definition if we are unable to easily merge types.  Ignore
	spurious DECL_MODE mismatches on VAR_DECLs.  Merge DECL_MODEs when
	necessary.

2007-12-13  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.

2007-12-12  Bill Maddox  <maddox@google.com>

	Revert
	2007-12-07  Bill Maddox  <maddox@google.com>

	* lto.c (lto_str_fd_init): New function.
	(lto_str_fd_close): New function.
	(lto_file_init): Call lto_str_fd_init.
	(lto_file_close): Call lto_str_fd_close.
	(lto_str_read): New function. Read debug string table.
	(lto_str_lookup): New function. Get string for debug
	string table offset.
	(lto_read_form): Recognize DW_FORM_strp.
	(lto_file_read): Invoke lto_str_read.

	* lto-elf.c (lto_elf_file_open): Read raw section data
	for the .debug_str section, if present.

	* lto.h (struct lto_str_fd_struct): New struct.
	(struct lto_file_struct): Added new field DEBUG_STR
	to hold the file descriptor for the debug string table.
	
2007-12-07  Bill Maddox  <maddox@google.com>

	* lto.c (lto_str_fd_init): New function.
	(lto_str_fd_close): New function.
	(lto_file_init): Call lto_str_fd_init.
	(lto_file_close): Call lto_str_fd_close.
	(lto_str_read): New function. Read debug string table.
	(lto_str_lookup): New function. Get string for debug
	string table offset.
	(lto_read_form): Recognize DW_FORM_strp.
	(lto_file_read): Invoke lto_str_read.

	* lto-elf.c (lto_elf_file_open): Read raw section data
	for the .debug_str section, if present.

	* lto.h (struct lto_str_fd_struct): New struct.
	(struct lto_file_struct): Added new field DEBUG_STR
	to hold the file descriptor for the debug string table.

2007-12-07  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_cfg): Call init_empty_tree_cfg_for_function.
	Grow the basic_block_info and label_to_block_map vectors if
	necessary.  Read in the block chain.

2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_DIE): Set TYPE_ALIAS_SET where necessary.

2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_form): Add DW_cl_address for DW_AT_const_value.

2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_expr_operand): Don't check for MTAGs.
	(lto_read_body): Don't declare PROP_alias.

2007-12-06  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-symtab.c (lto_symtab_merge_decl): Handle FUNCTION_DECLs without
	argument type information.

2007-12-03  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
	TREE_THIS_VOLATILE if the associated type is a volatile type.
	(lto_materialize_function): Remove call to init_ssa_operands.
	* lto-read.c (input_expr_operand): Add SSA_NAME_VAR as a referenced
	variable when reading an SSA_NAME.  Do the same when reading a
	RESULT_DECL, a RETURN_EXPR, or an MTAG.
	(input_cfg): Call init_ssa_operands.
	(input_ssa_names): Set the default def of an SSA_NAME if necessary.
	Move call to init_tree_ssa...
	(lto_read_body): ...here.  Use push_cfun and pop_cfun.  Call
	add_referenced_var on any variables referenced from the body of the
	function.  Inform the rest of the compiler we are in SSA form and
	inform later passes about the current properties.

2007-11-30  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_materialize_function): Add FIXME.

2007-11-29  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-lang.c (enum built_in_attribute): New enum.
	(flag_no_builtin, flag_no_nonansi_builtin, flag_isoc94, flag_isoc99,
	built_in_attributes): New variables.
	(def_builtin_1): New function.
	(lto_define_builtins): #define DEF_BUILTIN and include builtins.def.

2007-11-28  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Set
	DECL_SOURCE_LOCATION for debugging purposes.
	(lto_read_member_DIE): Set DECL_SOURCE_LOCATION.  If we have read a
	bitfield, use the type specified by the DIE for TREE_TYPE and defer
	laying out the decl until later.
	(lto_read_subroutine_type_subprogram_DIE): Compare the function's
	name with DECL_ASSEMBLER_NAME.  Set DECL_SOURCE_LOCATION and
	TREE_ADDRESSABLE.
	* lto-read.c (input_expr_operand): Set TREE_ADDRESSABLE on the
	operand of an ADDR_EXPR.
	* lto-lang.c (enum lto_builtin_type): New enum.
	(builtin_type): New typedef.
	(builtin_types, string_type_node, const_string_type_node,
	wint_type_node, intmax_type_node, uintmax_type_node,
	signed_size_type_node): New variables.
	(def_fn_type, builtin_type_for_size, lto_define_builtins,
	lto_build_c_type_nodes): New functions.
	(lto_init): Initialize builtin types.
	(lto_set_decl_assembler_name): Let the target machine mangle the
	name if the decl is TREE_PUBLIC, otherwise uniquify it.

2007-11-21  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Don't
	set TREE_ADDRESSABLE.  Do set DECL_COMDAT.  Set TREE_READONLY if
	the type is a constant type.  Set the assembler name and inform
	the rest of the compiler about the new decl if the decl is not
	public.
	(lto_read_subroutine_type_subprogram_DIE): Don't check for equivalency
	of DECL_ASSEMBLER_NAME when determining if we have a builtin.  Don't
	try to read in function bodies for functions that already have bodies.
	* lto-symtab.c (lto_same_type_p): Check for unbounded array
	equivalency.
	(lto_symtab_merge_decl): Don't merge decls that aren't TREE_PUBLIC.
	Check for whether we matched a builtin function type before calling
	lto_same_type_p on the generated type.  Permit cases where the
	declaration of an array is unbounded, but the definition is bounded.
	Don't combine TREE_PUBLIC flags.  Copy over DECL_SIZE and
	DECL_SIZE_UNIT if necessary.

2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_expr_operand): Get types right 
	for COMPLEX_CST.

2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (make_new_block, input_cfg): Properly set
	n_basic_blocks.
	
2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_array_type_DIE): Handle DIEs with DW_AT_GNU_vector
	set properly by building a VECTOR_TYPE instead of an ARRAY_TYPE.

2007-11-16  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_base_type_DIE): Use make_bitfield_integer_type to
	construct the integer type for bitfields.

2007-11-16  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (data_in.current_node_has_loc): Removed.
	(input_line_info): Returns true if node needs line set.
	(set_line_info): Always sets line if called.
	(clear_line_info): Removed reference to current_node_needs_loc.
	(input_expr_operand): Keeps track locally if current node needs a loc.
	(input_local_var): Added code to handle DECL_INITIAL for
	static local vars. Only set loc if necessary.
	
2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_subroutine_type_subprogram_DIE): Fix thinko'd
	DECL_CONTEXT.

2007-11-15  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c: Include langhooks.h.
	(lto_find_integral_type): Rework logic to handle the case where
	got_byte_size is true, but the bitsize requested and that of the
	base_type doesn't match.
	(lto_read_variable_formal_parameter_constant_DIE): Only check for
	asm_name if we are creating a VAR_DECL.
	(lto_materialize_function): Set DECL_EXTERNAL if we can't find a
	definition.
	(lto_read_subroutine_type_subprogram_DIE): Check for a builtin
	function reference and use the builtin's decl if so.  Set the
	DECL_CONTEXT of the RESULT_DECL for the function.
	* lto-lang.c (registered_builtin_fndecls): New variable.
	(lto_getdecls): Return it.
	(lto_builtin_function): Chain the new decl onto
	registered_builtin_fndecls.

2007-11-15  Kenneth Zadeck <zadeck@naturalbridge.com>
	    
	* lto-read.c (process_tree_flags, lto_static_init_local):
	Renamed to ADD_CLASS_EXPR_FLAG. ADD_CLASS_DECL_FLAG New Macro.
	(input_line_info, clear_line_info): Fixed new line number code.
	(input_expr_operand): Added type to SWITCH_EXPR.
	(lto_read_body): Properly initialized data_in.
	Clear line info when leaving.
	
2007-11-13  Diego Novillo  <dnovillo@google.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE):
	Initialize ARTIFICIAL.
	(lto_read_subroutine_type_subprogram_DIE): Initialize
	SAVED_SCOPE.
	* lto-read.c (set_line_info): Remove ; from calls to
	LINEMAP_POSITION_FOR_COLUMN.

2007-11-13  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_type_ref): Renamed from get_type_ref.
	(input_expr_operand, input_local_var): Renamed get_type_ref to 
	input_type_ref.
	(input_expr_operand): Get the types correct for 
	vector-cst.  Get SSA_NAME_DEF_STMT correct for return_exprs.
	
2007-11-13  Doug Kwan  <dougkwan@google.com>

	* lto-read.c (input_widest_uint_uleb128): New function.
	(input_tree_flags, process_tree_flags, input_line_info,
	input_expr_operand, input_local_var, input_phi, input_ssa_names):
	Change to use lto_flags_type and BITS_PER_LTO_FLAGS_TYPES instead of
	unsigned HOST_WIDE_INT and HOST_BITS_PER_WIDE_INT.
	(lto_static_init_local): Add code to assert that lto_flags_type is
	wide enough.

2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_array_type_DIE): Handle DW_AT_GNU_vector.
	(lto_read_subroutine_type_subprogram_DIE): Handle
	DW_AT_static_link and DW_AT_specification.  Return the
	specification if present.
	(lto_read_base_type_DIE): Handle DW_ATE_complex_float.
	
2007-11-13  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-lang.c: Include target.h.
	(registered_builtin_types): New variable.
	(lto_type_for_mode): Increase number of modes handled.
	(lto_builtin_function): Fix argument list and return the decl.
	(lto_register_builtin_type): New function.
	(lto_init): Initialize target builtins and language-independent
	nodes.
	(LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define.

2007-11-13  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_expr_operand): Added code to properly handle
	index filed. Added new RANGE_EXPR case.
	
2007-11-11  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (ADD_FUNC_FLAG): Deleted macro.
	(data_in): Added current_node_has_loc field.
	(input_line_info, set_line_info, clear_line_info): Added a support
	for USE_MAPPED_LOCATION and not adding line numbers to nodes that
	did not have on on the source side.
	(input_expr_operand): Make sure that GIMPLE_MODIFY_STMTS get line
	numbers too.

2007-11-09  Doug Kwan  <dougkwan@google.com>

	* lto-read.c (input_expr_operand): Change type of operand 2 of
	BIT_FIELD_REF expression to be bitsizetype instead of sizetype.

2007-11-09  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c: Include lto-tree.h.  Effect small spaces->tabs cleanup.
	(lto_read_variable_formal_parameter_constant_DIE): Transfer bits
	from a DW_AT_specification or DW_AT_abstract_origin attribute to
	the new decl we are creating.  Move informing the middle end about
	the new decl to...
	(lto_main): ...here.  Inform the middle end about global variables
	after we have read in all the input files.
	* lto-symtab.c (lto_symtab_merge_decl): We really do need to merge
	variables with internal linkage, so delete the check for internal
	linkage.  Combine TREE_PUBLIC flags.

2007-11-08  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
	DW_AT_decl_line.
	* lto-symtab.c (lto_symtab_merge_decl): Handle redefinition of a
	builtin specially.  Move check for attribute compatibility
	earlier.

2007-11-07  Nathan Froyd  <froydnj@codesourcery.com>

	* Make-lang.in (lto/lto.o): Depend on gt-lto-lto.h.
	* config-lang.in (gtfiles): Add lto.h and lto.c.
	* lto-elf.c: Include ggc.h.
	(lto_elf_file_open): Allocate elf_file from GC memory.
	* lto.c: Include tree-ssa-operands.h and gt-lto-lto.h
	(lto_info_fd_init): Allocate the die_cache and unmaterialized_fndecls
	in GC memory.
	(lto_info_fd_close): Free unmaterialized_fndecls from GC memory.
	(lto_file_close): Free file from GC memory.
	(lto_cache_store_DIE): Allocate the new entry in GC memory.
	(lto_read_member_DIE): Fix declaration.
	(lto_read_subroutine_type_subprogram_DIE): unmaterialized_fndecls lives
	in GC memory.
	(current_lto_file): New variable.
	(lto_main): Use it.
	(DWARF2_attr, DWARF2_abbrev, lto_die_ptr, DWARF2_CompUnit,
	lto_die_cache_entry): Move to...
	* lto.h: ...here and add GTY markers as appropriate.  Delete forward
	declarations accordingly.
	(struct lto_file_struct): Declare.
	(lto_file_vtable): Use it instead of lto_file.

2007-11-06 Alon Dayan  <alond@il.ibm.com>
	   Kenneth Zadeck <zadeck@naturalbridge.com>

	 * lto-read.c (process_flags, lto_static_init_local):
	 read flags of VAR_DECL and FUNCTION_DECL of size>1.
	 change global array num_flags_for_code to flags_length_for_code.
	 (set_line_info): Make decls work in USE_MAPPED_LOCATION mode.
	
2007-11-05  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_structure_union_class_type_DIE): Use proper record
	layout functions to compute information about the newly constructed
	type.

2007-11-02  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_expr_operand): Change the LTO_return_expr1
	case to use DECL_RESULT if necessary.

2007-11-01  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_tree_list): Removed.
	(input_tree_flags): Added parameter to force flags no matter what
	tree code.
	(input_expr_operand): Added parameter to input_tree_flags.
	Added case for IDENTIFIER_NODE and TREE_LIST.  Changed ASM to call
	input_expr_operand rather than input_tree_lists.
	(input_local_var): Use input_expr_operand to read attributes
	rather then input_tree_list.
	(input_phi, input_ssa_names): Added parameter to input_tree_flags.

2007-10-31  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_typedef_DIE): Fix comment typo.
	(lto_resolve_typedecl_ref): Fetch the referred-to type and build a fake
	TYPE_DECL for it.
	* lto-read.c (lto_read_body): Use correct sizes for calculating
	type_decls_offset and types_offset.

2007-10-30  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-tree.h (union lang_tree_node): Change GTY description to chain
	with GENERIC_NEXT.
	* config-lang.in (gtfiles): Add lto-lang.c.
	* lto-lang.c: Include gt-lto-lto-lang.h.
	* Make-lang.in (lto/lto-lang.o): Add dependency on gt-lto-lto-lang.h
	(lto/lto-symtab.o): Depend on LTO_H instead of TREE_H.
	(lto/lto-read.o): Likewise.

2007-10-29  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (data_in): Added type_decls and current_col fields.
	(string_slot): New type to hold canonized file name.
	(hash_string_slot_node, eq_string_slot_node, canon_file_name, 
	input_line_info, set_line_info, clear_line_info): New functions.
	(file_name_hash_table): New hash table.
	(input_local_var, input_labels, input_local_vars_index, 
	input_local_var, input_local_vars, input_ssa_names): Reorganized parameters.
	(input_uleb128): Changed type of byte var.
	(input_expr_operand): Large number of changes to get line numbers
	correct.  Added TYPE_DECL case.
	(input_globals): Added code to get TYPE_DECLs processed.
	(input_local_var): Added code to process line numbers and
	TREE_CHAIN and DECL_CONTEXT.
	(input_function, input_constructor): Added call to
	clear_line_number.
	(lto_static_init_local): Added code to get line numbers correct.
	(lto_read_body): Added code to get TYPE_DECLS read and to change
	parameters to the calls above that had their parms reorganized.

	
2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.h (lto_resolve_typedecl_ref): Declare.
	* lto.c (lto_resolve_typedecl_ref): New function.

2007-10-29  Mark Mitchell  <mark@codesourcery.com>
	    Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_subroutine_type_subprogram_DIE): Read the child
	DIEs even if we find an abstract origin for this DIE.

2007-10-29  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_subroutine_type_subprogram_DIE): Build the
	RESULT_DECL slightly earlier.  Only remember the decl for later
	if we successfully merge declarations.

2007-10-24  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_expr_operand): Give label_values the proper
	context and provide switch statements with a default type.
	
2007-10-23  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (lto_read_body): Move call to init_ssa_operands...
	* lto.c (lto_materialize_function): ...to here.

2007-10-22  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.h (struct lto_info_fd): Add field unmaterialized_fndecls.
	* lto.c (lto_info_fd_init): Initialize it.
	(lto_info_fd_close): Free it.
	(lto_materialize_function): New function.
	(lto_read_subroutine_type_subprogram_DIE): Save the result decl on
	unmaterialized_fndecls.
	(lto_file_read): Read in all the function bodies after we have read
	all of the DWARF info.
	* lto-read.c (lto_read_body): Call init_ssa_operands if we are
	reading a function body.

2007-10-20  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_tree_flags): Renamed from input_flags to be
	semetric with output_tree_flags.  Added call to log flags.
	(process_tree_flags): Renamed from process_flags.  Fixed a lot of
	type issues to make everything consistent with flags being
	unsigned HOST_WIDE_INTS.
	(input_expr_operand): Added call to
	recompute_tree_invariant_for_addr_expr.
	(input_local_var): Added debugging for tree_chains.  Now calls
	input_tree_flags.
	(input_phi): Made flags unsigned HOST_WIDE_INT.
	(input_ssa_names): Now calls input_tree_flags.
	(lto_read_body): Now sets cfun.
	(lto_read_function_body): Now sets current_function_pointer.
	
2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Check
	definitively whether SPECIFICATION or ABSTRACT_ORIGIN exist before
	inspecting fields within.
	(lto_read_DIE_at_ptr): Delete check for null result; let callers
	handle this appropriately.

2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Handle
	DW_AT_abstract_origin properly.  Ensure that we're not dealing with
	both DW_AT_abstract_origin and DW_AT_specification.
	(lto_read_subroutine_type_subprogram_DIE): Handle
	DW_AT_abstract_origin.
	(lto_read_DIE): Use lto_read_only_for_child_DIEs for labels.
	(lto_read_DIE_at_ptr): Define as static to match declaration.
	Lookup the PTR in the cache before reading it from the file.
	(lto_resolve_var_ref): Adjust accordingly.
	(lto_resolve_fn_ref): Adjust accordingly.  Tweak comment.
	(lto_resolve_field_ref): Adjust accordingly.  Tweak comment.

2007-10-19  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_DIE_at_ptr): New function.
	(lto_resolve_var_ref): Use it.
	(lto_resolve_fn_ref): Use it.
	(lto_resolve_field_ref): Use it.
	(lto_read_variable_formal_parameter_constant_DIE): Follow
	DW_AT_specification and return the associated decl when appropriate.

2007-10-18  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-lang.c (lto_type_for_mode): Move after lto_type_for_size.
	Implement for scalar integer modes.
	(lto_init): Initialize size_type_node.

2007-10-18  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_expr_operand): Remove ssa name asserts.
	(input_local_var): Add chaining for params.
	(input_ssa_names): Add cfun parameter.
	(input_function): Remove unnecessary else.

2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_only_for_child_DIEs): Mark die parameter as unused.
	(lto_resolve_var_ref): Use proper types.
	(lto_resolve_fn_ref): Likewise.
	(lto_resolve_field_ref): Likewise.

2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (input_expr_operand): Remove case.

2007-10-17  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_only_for_child_DIEs): New function.
	(lto_read_DIE): Use it for lexical_block and inlined_subroutine DIEs.
	* lto-elf.c (lto_elf_map_lto_section): Remove.
	(lto_elf_file_vtable): Use lto_elf_map_optional_lto_section instead.
	* lto-read.c (input_expr_operand): Assert that we never read a NULL
	SSA_NAME.  Add missing case for mechanical codes.
	(input_cfg): Use basic_block_info_for_function instead of
	basic_block_info.

2007-10-16  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_sleb128, input_integer): Use proper casts.
	(input_list): Renamed input_tree_list and modified to follow same
	protocol as lto-function-out.c:output_tree_list.
	(input_expr_operand): Make asm operands use input_tree_list.
	(input_local_var): Now uses input_tree_list.
	(lto_read_body): Change placement for setting context of debug_labels.
	
	
2007-10-16  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_real): Output debugging in proper order.
	(input_integer): Compute bit lengths properly.
	(input_list): Clean up declaration.
	(input_expr_operand): Change calls to input_real to match fix.
	Make reading of LTO_bit_field_ref1 match output.
	(input_local_var): Make reading of attributes match what is being
	written.
	(dump_debug_stream): Also print char in hex.
	(debug_out_fun): Fix signed unsigned mismatch.
	
2007-10-10  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c (lto_read_form): Handle DW_AT_MIPS_linkage_name and
	DW_AT_GNU_vector specially, as they are not contiguous with the
	specified set of attribute names.  Use class_mask to check for
	errors at the end of the function
	(lto_resolve_var_ref): Read the DIE if it is not cached.
	(lto_resolve_fn_ref): Likewise.
	(lto_resolve_field_ref): Likewise.

2007-10-05  Nathan Froyd  <froydnj@codesourcery.com>

	* lto.c: Include dwarf2out.h.
	(lto_cache_store_DIE): Assert that we never change the value.
	(LTO_BEGIN_READ_ATTRS): Print an informative error message.
	(lto_read_compile_unit_DIE): Handle DW_AT_entry_pc.
	(lto_read_array_type_DIE): Don't error on ndims == 0; build a
	sensible type instead.
	(lto_read_structure_union_class_type_DIE): Store the newly
	created type prior to reading the members of the structure to
	avoid infinite recursion.  Avoid computing types and alignments
	for structures whose sizes are unknown.
	(lto_read_variable_formal_parameter_const): Handle DW_AT_artificial
	and set DECL_ARTIFICIAL accordingly.  Ignore DW_AT_abstract_origin,
	DW_AT_const_value, and DW_AT_specification.
	(lto_read_subroutine_type_subprogram_DIE): Handle DW_AT_declaration.
	Return early if we have already constructed the function type.
	(lto_read_typedef_DIE): Check to see if the type has been cached
	already.  Cache the type before reading any children.
	(lto_read_const_volatile_restrict_type_DIE): Handle DW_AT_name.
	(lto_read_DIE): Unset context->skip_non_parameters around reading
	the DIE.
	(lto_resolve_fn_ref): Delete trailing whitespace.

2007-09-11  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_expr_operand): Added type for STRING_CST.
	
2007-09-10  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-read.c (lto_read): Set the type of the newly created CALL_EXPR.

2007-09-07  Nathan Froyd  <froydnj@codesourcery.com>

	* lto-lang.c (signed_and_unsigned_types): New variable.
	(lto_type_for_size): Consult signed_and_unsigned_types to find
	an approprite type, creating it if necessary.
	(lto_set_decl_assembler_name): Add actual method body.

2007-09-06  Jim Blandy  <jimb@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): If we
	can't find a var init for this variable, leave its DECL_INITIAL.
	* lto-elf.c (lto_elf_map_optional_lto_section): Renamed from
	lto_elf_map_fn_body.
	(lto_map_lto_section): New function.
	(lto_elf_file_vtable): Use lto_elf_map_lto_section for function
	bodies, and lto_elf_map_optional_lto_section for variable
	initializers.
	(lto_elf_find_section_data): Quietly return NULL if the section is
	missing.
	(lto_elf_file_open): Check for a NULL from lto_elf_find_section_data.

	* lto-elf.c (lto_elf_find_section_data): Remove dead code.

	* lto-read.c (lto_read_body): Doc fix.

2007-08-29  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (fun_in): Renamed to data_in.
	(input_expr_operand, input_local_var, input_string_internal,
	input_string, input_real, input_list, get_label_decl, 
	get_type_ref, input_expr_operand, input_globals, input_labels,
	input_local_vars_index, input_local_var, input_local_vars, 
	input_cfg, input_phi, input_ssa_names, input_bb, ): Renamed fun_in to data_in.
	(input_constructor): New function.
	(lto_read_function_body): Renamed to lto_read_body and generalized
	to handle both functions and constructors.
	(lto_read_function_body, lto_read_var_init): New function.
	
	
2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>

        * lto-read.c (input_expr_operand): Assert that there really is a
	FUNCTION_DECL.
	(input_globals): Removed checks on 0 section.
	
2007-08-28  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (fun_in): Added local_decls_index and
	local_decls_index_d.  
	(input_expr_operand): Changed inputting of PARM_DECLs and VAR_DECLs.
	(input_globals): Enabled code to handle FIELD_DECLs.
	(input_local_vars_index, input_local_vars): New function.
	(input_local_var): Changed to allow locals to be input randomly.
	(lto_read_function_body): Added code to input the
	local_decls_index and to free various structures.
	
2007-08-17  Jim Blandy  <jimb@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Remove
	ATTRIBUTE_UNUSED from 'die' formal.

	Use enum LTO_tags where appropriate, instead of 'unsigned int'.
	* lto-read.c (input_record_start): Fix return type, type of 'tag'.
	(input_list): Fix type of 'tag'.
	(input_expr_operand): Fix type of 'tag' argument.  Update
	declaration.  Fix type of 'ctag'.  Add default case to switch,
	since the type of the switched value is now an enum.
	(input_local_vars): Fix type of 'tag'.
	(input_bb): Fix type of 'tag' argument.
	(input_function): Fix type of 'tag' argument.

2007-08-16  Jim Blandy  <jimb@codesourcery.com>

	* lto.c (lto_read_member_DIE): Record the tree we create in
	fd->die_cache.  (Our 'die' argument is no longer unused.)
	(lto_resolve_field_ref): New function.
	* lto.h (lto_resolve_field_ref): New declaration.

2007-08-15  Jim Blandy  <jimb@codesourcery.com>

	* lto-read.c (lto_read_var_init): Mark arguments as unused.

2007-08-07  Jim Blandy  <jimb@codesourcery.com>

	* lto.c (lto_read_form): Complete attr_classes table.
	(DWARF2_form_data): Doc fix.
	
2007-08-05  Mark Mitchell  <mark@codesourcery.com>

	* lto.h (lto_file_vtable): Remove read_var_init.  Add map_var_init
	and unmap_var_init.
	(lto_read_var_init): Declare.
	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Use new
	interface for reading variable initializers.
	* lto-elf.c (lto_elf_read_var_init): Remove.
	(lto_elf_file_vtable): Update initializer.
	(lto_elf_read_var_init): Add comment about unused-ness.
	* lto-read.c (lto_read_var_init): New.

	* lto.c (lto_read_form): Add entry for DW_AT_inline.

2007-08-02  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (lto_read_function_body): Moved declaration of fn
	outside of ifdef.
	
2007-08-01  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_uleb128, input_string_internal, input_real,
	input_integer, input_record_start, input_list, get_type_ref,
	input_flags, input_expr_operand, input_expr_operand,
	input_expr_operand, input_local_vars, input_cfg, input_phi,
	input_ssa_names, input_bb, input_function): Added semicolons.

	
2007-07-31  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_globals): Remove debugging.
	(input_function): Set DECL_ARGUMENTS.

	
2007-07-31  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_expr_operand): Fixed code for COND_EXEC,
	RETURN_EXPR, MODIFY_EXPR and processing of flags.
	(input_phi): Made work with operands other than SSA_NAMES and
	fixed processing of flags.
	(input_ssa_names): Initialize SSA_NAME_DEF_STMT to empty stmt.
	(input_flags): New function.
	* lto-lang.c (lto_init): Changed state of in_lto_p.
	
	
2007-07-24  Mark Mitchell  <mark@codesourcery.com>

	* lto-tree.h (lto_varargs_cookie): Remove.
	* lto.c (lto_context): Add last_parm_type, varargs_p, skip_all,
	skip_non_parameters, skip_parameters.
	(lto_varargs_cookie): Remove.
	(lto_read_variable_formal_parameter_constant_DIE): Keep track of
	parameter types.
	(lto_read_abbrev): New function.
	(lto_read_subroutine_type_subprogram_DIE): Make two passes over
	child DIEs.
	(lto_read_unspecified_parameters_DIE): Set context->varargs_p.
	(lto_read_DIE): Use lto_read_abbrev.  Honor skip_* flags.
	(lto_file_read): Initialize new context fields.
	* lto-lang.c (lto_type_for_mode): Return NULL_TREE.
	(lto_unsigned_type): Remove.
	(lto_signed_type): Likewise.
	(lto_signed_or_unsigned_type): Likewise.
	(lto_init): Do not create lto_varargs_cookie.
	(LANG_HOOKS_UNSIGNED_TYPE): Do not define.
	(LANG_HOOKS_SIGNED_TYPE): Likewise.
	(LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Likewise.

2007-07-19  Jan Hubicka  <jh@suse.cz>

	* lto-read.c (lto_read_function_body): Produce empty scope block
	to avoid crash.

2007-07-18  Mark Mitchell  <mark@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Do not
	process local variables.
	(lto_read_subroutine_type_subprogram_DIE): Read child DIEs.

2007-07-13  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read.c (input_list, input_expr_operand): Added struct
	function parameter.
	(init_cfg, finalize_cfg): Removed function.
	(input_expr_operand): Added SSA_NAME and GIMPLE_MODIFY_STMT cases.
	(input_labels, input_local_vars): Now takes input_block parameter rather than
	synthsyzing it.
	(input_cfg, input_phi, input_ssa_names): New functions.
	(input_bb): Now passes in input_blocks.  Does not construct cfg
	and processes the list of phi functions.
	(input_function): Now builds both the cfg and ssa_names table.
	(lto_read_function_body): Processes new header fields to construct
	streams for the ssa_names and cfg and their debugging.
	* lto/lto-lang.c (lto_init): Set in_lto_p.
	
	
2007-06-28  Mark Mitchell  <mark@codesourcery.com>

	* lto.h (lto_file_vtable): Add read_var_init.
	* lto.c (lto_read_variable_formal_parameter_constant_DIE): Read
	initializers.
	(lto_main): Remove bogus asserts.
	* lto-elf.c (tm.h): Include it.
	(libiberty.y): Likewise.
	(lto_elf_file): Add strtab and symtab.  Rename
	string_table_section_index to sec_strtab.
	(lto_elf_file_vtable): Add lto_elf_read_var_init.
	(lto_elf_get_shdr): New function.
	(lto_elf_free_shdr): Likewise.
	(lto_elf_find_section_data): Use them.
	(lto_elf_read_symtab): New function.
	(lto_elf_lookup_sym): Likewise.
	(lto_elf_free_sym): Likewise.
	(lto_elf_file_open): Tidy.  Call lto_elf_read_symtab.
	(lto_elf_built_init): New function.
	(lto_elf_read_var_init): Likewise.
	* Make-lang.in (lto/lto-elf.o): Depend on $(TM_H).

2007-06-26  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto-read (make_new_block): Initialize the stmt_list.
	(lto_static_init_local): Add debugging for missing codes.
	
2007-06-26  Mark Mitchell  <mark@codesourcery.com>

	* lto.c (lto_read_subroutine_type_subprogram_DIE): Handle
	unprototyped functions. 

2007-06-23  Mark Mitchell  <mark@codesourcery.com>

	* lto.c (lto_read_variable_formal_parameter_constant_DIE):
	Handle DW_AT_MIPS_linkage_name.
	(lto_read_subroutine_type_subprogram): Likewise.  Correct
	compilation errors.
	(lto_main): Remove incorrect assertions.
	* lto-symbtab.c: Build function types out of TREE_LISTs.

	* lto-elf.c (<libelf>): Check for HAVE_LIBELF_H.
	
	* Make-lang.in (LTO_OBJS): Depend on attribs.o.
	
2007-06-21  Kenneth Zadeck <zadeck@naturalbridge.com>

	* lto/lto-tree.h (lang_decl, lang_type, language_function): Added
	dummy since ggc does not like empty structs.
	* lto/lto-elf.c (libelf.h): Changed to libelf/libelf.h.
	* lto/lto-read.c (ADD_CLASS_FLAG, ADD_EXPR_FLAG): Changed
	expr->common to expr->base.
	(make_new_block): Moved stmt_list to proper place.


2007-03-14 Robert Kennedy  <jimbob@google.com>

	Eliminate use of lang_hooks.set_decl_assembler_name from LTO
	* lto.c (lto_read_subroutine_type_subprogram_DIE) Get DECL
	assembler name from DWARF.
	* lto-lang.c (lto_set_decl_assembler_name) New function.

2006-09-10  Mark Mitchell  <mark@codesourcery.com>

	* lto.h (lto_file_vtable): New structure.
	(lto_file): Add vtable pointer.
	(lto_file_init): Add vtable paramter.
	(lto_read_function_body): New function.
	(lto_symtab_merge_fn): New function.
	* lto.c (lto_file_init): Add vtable parameter.
	(lto_read_form): Fill in entries for DW_AT_prototyped,
	DW_AT_frame_base.
	(lto_read_subroutine_type_subprogram_DIE): New function.
	(lto_read_DIE): Fill in entries for DW_TAG_subroutine_type and
	DW_TAG_subprogram.
	* lto-elf.c (lto_elf_vile_vtable): New variable.
	(lto_elf_file_open): Pass it to lto_file_init.
	(lto_elf_map_fn_body): New function.
	(lto_elf_unmap_fn_body): Likewise.
	* lto-read.c: New file.
	* lto-symtab.c (lto_symtab_merge_fn): New function.
	* lto-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define to
	tree_rest_of_compilation.
	* Make-lang.in (LTO_OBJS): Add lto-read.o
	(lto-read.o): New target.

2006-09-03  Mark Mitchell  <mark@codesourcery.com>

	* lto.c (<inttypes.h>): Don't include it.
	(lto_context): Don't typedef it.
	(lto_resolve_reference): New function.
	(lto_read_form): Use it.
	(lto_resolve_type_ref): New function.
	(lto_resolve_var_ref): Likewise.
	(lto_resolve_fn_ref): Likewise.
	* lto.h (<inttypes.h>): Include it.
	(lto_context): New type.
	(lto_ref): New structure.
	(lto_resolve_type_ref): Declare.
	(lto_resolve_var_ref): Likewise.
	(lto_resolve_fn_ref): Likewise.

2006-08-18  Mark Mitchell  <mark@codesourcery.com>

	* lang-specs.h: New file.

2006-08-14  Mark Mitchell  <mark@codesourcery.com>

	* lto.c (lto_info_fd_init): Allocate the DIE cache.
	(lto_info_fd_close): Deallocate it.
	(lto_die_cache_entry): New structure.
	(lto_cache_hash): New function.
	(lto_cache_eq): Likewise.
	(lto_cache_store_DIE): Likewise.
	(lto_cache_lookup_DIE): Likewise.
	(lto_read_referenced_type_DIE): Use the cache.
	(lto_read_pointer_type_DIE): Robustify.
	(lto_read_DIE): Use the cache.
	* lto.h (hashtab.h): Include.
	(lto_info_fd): Add DIE cache.
	* Make-lang.in (LTO_H): New variable.
	(lto/lto-lang.o): Use LTO_H.
	(lto/lto-elf.o): Likewise.
	(lto/lto-symtab.o): Likewise.

2006-07-09  Mark Mitchell  <mark@codesourcery.com>

	* lto.c (lto_abi_mismatch_error): New function.
	(lto_abbrev_read): Initialize num_abbrevs.
	(lto_read_form): Specify allowed form classes for
	DW_AT_declaration.  Adjust for change to lto_set_cu_context.
	(lto_read_variable_formal_parameter_constant_DIE): Handle
	DW_AT_declaration.  Call lto_symtab_merge_var.
	(lto_read_pointer_type_DIE): New function.
	(lto_read_base_type_DIE): Use build_nonstandard_integer_type.  Do
	not creat TYPE_DECLs for types that already have them.
	(lto_read_DIE): Add lto_read_pointer_type_DIE.
	(lto_set_cu_context): Make cu_start point to the header, not the
	first DIE.
	(lto_file_read): Adjust for change to lto_set_cu_context.
	* Make-lang.in (LTO_OBJS): Add lto-symtab.o.
	(lto/lto-symtab.o): New rule.
	* lto-tree.h (lang_identifier): Add decl field.
	(LANG_IDENTIFIER_CAST): New macro.
	(LTO_IDENTIFIER_DECL): Likewise.
	(lto_symtab_merge_var): Declare.
	* lto-symtab.c: New file.

2006-07-02  Daniel Berlin  <dberlin@dberlin.org>

	* lto.c (lto_context): Add current_cu and info_fd members.
	(DWARF2_CompUnit): New structure.
	(lto_read_DIE): Take lto_info_fd *.
	(lto_read_child_DIEs): Ditto.
	(lto_file_corrupt_error): Constify argument.
	(lto_set_cu_context): New function
	(lto_info_fd_init): Ditto.
	(lto_info_fd_close): Ditto.
	(lto_file_init): Use lto_info_fd_init.
	(lto_file_close): Use lto_info_fd_close.
	(lto_read_initial_length): Pass in pointer to header size.
	(lto_read_comp_unit_header): Correct cu_length to
	real length from beginning of header.  Take lto_info_fd * as
	argument.
	(find_cu_for_offset): New function.
	(lto_read_form): Change first argument to lto_info_fd *.
	Add FORM_CONTEXT argument.
	Handle DW_FORM_ref_addr.
	(lto_read_tag_DIE): Change first argument to lto_info_fd *.	
	(LTO_BEGIN_READ_ATTRS_UNCHECKED): Save old context.
	Swap contexts if necessary for form.
	(LTO_BEGIN_READ_ATTRS): Cast fd to right type for
	lto_file_corrupt_error.
	(LTO_END_READ_ATTRS): Swap contexts back if it had changed.
	(lto_read_referenced_type_DIE): Change first argument to
	lto_info_fd *.  Access lto_fd fields through base pointer.
	(lto_read_compile_unit_DIE): Change first argument to an
	lto_info_fd *.
	(lto_read_variable_formal_parameter_constant_DIE): Ditto.
	(lto_read_base_type_DIE): Ditto.
	(lto_read_child_DIEs): Ditto.
	(lto_read_DIE): Ditto.  Change type of function pointer.
	(lto_info_read): New function.
	(lto_set_cu_context): Ditto.
	(lto_file_read): Use lto_info_read, walk resulting CU's
	(lto_main): Update for lto_info_fd change.
	* lto-elf.c (lto_elf_file_open): Cast lto_info_fd to lto_fd where
	necessary.
	* lto.h (DWARF2_CompUnit): New structure.
	(lto_info_fd): Ditto.
	(lto_file): Change debug_info to be an lto_info_fd.
	
2006-06-25  Mark Mitchell  <mark@codesourcery.com>

	* lto.c (toplev.h): Include it.
	(dwarf2.h): Likewise.
	(tree.h): Likewise.
	(tm.h): Likewise.
	(cgraph.h): Likewise.
	(ggc.h): Likewise.
	(inttypes.h): Likewise.
	(DWARF2_attr): New type.
	(DWARF2_abbrev): Likewise.
	(DWARF2_class): Likewise.
	(DWARF2_form_data): Likewise.
	(lto_context): Likewise.
	(lto_fd_init): New function.
	(lto_abbrev_fd_init): Likewise.
	(lto_abbrev_fd_close): Likewise.
	(lto_file_init): Use them.
	(lto_file_close): New function.
	(lto_file_corrupt_error): Likewise.
	(LTO_CHECK_INT_VAL): New macro.
	(lto_check_size_t_val): New function.
	(lto_check_int_val): Likewise.
	(LTO_READ_TYPE): New macro.
	(lto_read_ubyte): New function.
	(lto_read_uhalf): Likewise.
	(lto_read_uword): Likewise.
	(lto_read_uleb128): Likewise.
	(lto_read_initial_length): Likewise.
	(lto_abbrev_read_attrs): Likewise.
	(lto_abbrev_read): Likewise.
	(lto_abbrev_lookup): Likewise.
	(lto_read_section_offset): Likewise.
	(lto_read_comp_unit_header): Likewise.
	(lto_read_form): Likewise.
	(LTO_BEGIN_READ_ATTRS_UNCHECKED): New macro.
	(LTO_BEGIN_READ_ATTRS): Likewise.
	(LTO_END_READ_ATTRS): Likewise.
	(lto_unsupported_attr_error): New function.
	(lto_get_identifier): Likewise.
	(lto_read_referenced_type_DIE): Likewise.
	(lto_read_compile_unit_DIE): Likewise.
	(lto_read_variable_formal_parameter_constant_DIE): Likewise.
	(lto_read_base_type_DIE): Likewise.
	(lto_read_DIE): Likewise.
	(lto_read_child_DIEs): Likewise.
	(lto_file_read): Read DIEs.
	(lto_main): Ask middle end to emit entities.
	* lto-tree.h (lang_identifier): Inherit from tree_identifier.
	* lto-elf.c (lto_elf_file_open): Adjust for interface changes.
	(lto_elf_file_close): Likewise.
	* lto.h (lto_file): Declare.
	(DWARF2_abbrev): Likewise.
	(lto_fd): New type.
	(lto_abbrev_fd): Likewise.
	(lto_file): Use new types.
	(lto_file_close): Declare.
	* lto-lang.c (lto_init): Always use unit-at-a-time mode.
	
2006-06-18  Mark Mitchell  <mark@codesourcery.com>

	* lto.h: New file.
	* lto.c: New file.
	* lto-elf.c: New file.
	* lto-lang.c (flags.h): Include it.
	(lto.h): Likewise.
	(lto_init): New function.
	(lto_write_globals): Remove.
	(LANG_HOOKS_WRITE_GLOBALS): Define to lhd_do_nothing. 
	(LANG_HOOKS_INIT): Define.
	(LANG_HOOKS_PARSE_FILE): Likewise.
	* Make-lang.in (LTO_OBJS): Add lto.o and lto-elf.o.
	(LTO_EXE): Link with libelf.
	(lto/lto-lang.o): Update dependencies.
	(lto/lto.o): New target.
	(lto/lto-elf.o): Likewise.

2006-06-12  Mark Mitchell  <mark@codesourcery.com>

	* config-lang.in: New file.
	* Make-lang.in: Likewise.
	* lto-tree.h: Likewise.
	* lto-lang.c: Likewise.