aboutsummaryrefslogtreecommitdiff
path: root/gcc/ChangeLog.alias
blob: 1c88f5c28332538535dfbd1b20ee9f70a68edfd9 (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
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
2009-04-03  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r145494.

2009-04-03  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r145490.

2009-04-02  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r145440.

2009-04-01  Richard Guenther  <rguenther@suse.de>

	* gimple.h (gimple_p): New typedef.  Define VEC of it.
	* tree-ssa-operands.c (struct scb_d, scb_t): Remove.
	(scb_stack): Make it a vector of gimple_p.
	(init_ssa_operands): Adjust.
	(fini_ssa_operands): Likewise.
	(mark_difference_for_renaming): Remove.
	(push_stmt_changes): Simplify and deprecate.
	(pop_stmt_changes): Likewise.
	(discard_stmt_changes): Likewise.
	* tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Properly
	update VOPs.
	* tree-ssa-dom.c (gimple_p): Remove typedef.
	* tree-ssa-propagate.c (update_call_from_tree): Properly
	update VOPs.

2009-03-31  Richard Guenther  <rguenther@suse.de>

	* Makefile.in (tree-ssa-structalias.o): Remove tree-ssa-structalias.h
	dependency.
	(tree-ssa-alias.o): Likewise.
	(GTFILES): Remove tree-ssa-structalias.h.
	* tree-ssa-alias.c: Do not include tree-ssa-structalias.h.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-structalias.h: Remove file.

2009-03-30  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r145297.

2009-03-30  Richard Guenther  <rguenther@suse.de>

	* tree-eh.c (cleanup_empty_eh): Do not leave stale SSA_NAMEs
	and immediate uses in statements.

2009-03-30  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r145282.

2009-03-29  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (eliminate): Do not remove stmts during elimination,
	instead queue and remove them afterwards.

	testsuite/
	* g++.dg/torture/20090329-1.C: New testcase.

2009-03-29  Richard Guenther  <rguenther@suse.de>

	* tree-inline.c (tree_function_versioning): Do not call update_ssa
	if we are not updating clones.  Simplify.

2009-03-28  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r145210.

2009-03-28  Richard Guenther  <rguenther@suse.de>

	testsuite/
	* gcc.c-torture/compile/20090328-1.c: New testcase.
	* gcc.dg/tree-ssa/ssa-fre-10.c: XFAIL.
	* gcc.dg/tree-ssa/ssa-pre-24.c: Likewise.
	* gcc.dg/uninit-B.c: Likewise.
	* gcc.dg/uninit-pr19430.c: Likewise.

2009-03-27  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (refs_may_alias_p_1): Split into ...
	(nonaliasing_component_refs_p): ... this, and ...
	(decl_refs_may_alias_p): ... this, and ...
	(indirect_ref_may_alias_decl_p): ... this, and ...
	(indirect_refs_may_alias_p): ... this.

2009-03-24  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r145028.

2009-03-23  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (struct ptr_info_def): Remove is_dereferenced member.
	* tree-ssa-alias.c (dump_points_to_info_for): Do not dump it.
	* tree-ssa-structalias.c (find_what_var_points_to): Adjust
	comment.  Take is_dereferenced parameter.
	(compute_points_to_sets): Compute whether a ptr is dereferenced
	in a local sbitmap.

	testsuite/
	* gcc.dg/torture/pr39074-2.c: Adjust.
	* gcc.dg/torture/pta-callused-1.c: Likewise.
	* gcc.dg/torture/pta-ptrarith-3.c: Likewise.
	* gcc.dg/torture/pta-structcopy-1.c: Likewise.
	* gcc.dg/torture/ssa-pta-fn-1.c: Likewise.
	* gcc.dg/tree-ssa/alias-19.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
	* gcc.dg/torture/pr39074.c: Likewise.

2009-03-20  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39506
	* tree-ssa-structalias.c (may_alias_p): Remove.
	(set_uids_in_ptset): Take the alias set to prune with as
	parameter.  Fold in the alias test of may_alias_p.
	(find_what_var_points_to): Decide upfront if we can prune.

2009-03-19  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (may_point_to_global_var): Rename to ...
	(ptr_deref_may_alias_global_p): ... this.
	(may_point_to_decl): Rename to ...
	(ptr_deref_may_alias_decl_p): ... this.
	(may_point_to_same_object): Rename to ...
	(ptr_derefs_may_alias_p): ... this.
	(refs_may_alias_p_1): Adjust.
	* tree-ssa-alias.h (may_point_to_global_var): Rename to ...
	(ptr_deref_may_alias_global_p): ... this.
	* tree-ssa-sink.c (is_hidden_global_store): Adjust.
	* tree-flow.h (struct ptr_info_def): Adjust comment.
	* tree-ssa-structalias.c (pt_solution_empty_p): Simplify.
	(pt_solution_includes_global): Likewise.
	(pt_solution_includes_1): Likewise.
	(pt_solutions_intersect_1): Likewise.
	(compute_points_to_sets): Clear ESCAPED in ESCAPED solution.

2009-03-18  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_possible_dead_store_p): Limit alias
	oracle use.  Look through PHI nodes into post-dominated
	regions.
	(tree_ssa_dse): Compute dominators.

	testsuite/
	* gcc.dg/tree-ssa/ssa-dce-5.c: New testcase.
	* gcc.dg/tree-ssa/ssa-dse-12.c: Likewise.

2009-03-16  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (do_sd_constraint): Simplify check
	for escaped_id.
	(solve_graph): Do not disable propagation from escaped
	completely.  Instead properly only propagate escaped_id.
	(pt_solution_includes_global): New function.
	* tree-ssa-alias.h (pt_solution_includes_global): Declare.
	* tree-ssa-alias.c (may_point_to_global_var): Use
	pt_solution_includes_global.

2009-03-15  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (walk_aliased_vdefs_1): Return an updated
	alias query counter.
	(walk_aliased_vdefs): Return the number of alias queries done.
	* tree-ssa-alias.h (walk_aliased_vdefs): Update prototype.
	* tree-ssa-dce.c (mark_operand_necessary): Assert the stmt
	is necessary if we visited it.
	(longest_chain, total_chain, chain_ovfl): New global statics.
	(mark_nonaliased_loads_necessary_1): Rename to ...
	(mark_aliased_reaching_defs_necessary_1): ... this.
	(mark_nonaliased_loads_necessary): Rename to ...
	(mark_aliased_reaching_defs_necessary): ... this.  Assert we
	are not called in simple mode, account the number of alias
	queries.
	(mark_aliased_loads_necessary_1): Rename to ...
	(mark_all_reaching_defs_necessary_1): ... this.  In simple
	mode skip already processed stmts and do not skip not aliased
	stores.
	(mark_aliased_loads_necessary): Rename to ...
	(mark_all_reaching_defs_necessary): ... this.
	(propagate_necessity): In simple mode simply call
	mark_all_reaching_defs_necessary.  Check alias query accounting
	and drop back to simple mode if it turns out to be too expensive.
	(perform_tree_ssa_dce): Initialize alias query accounting vars.

2009-03-14  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r144858.

2009-03-13  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (valid_in_sets): Check if the VUSE for
	a REFERENCE is available.

	testsuite/
	* gcc.c-torture/execute/20090113-3.c: New testcase.

2009-03-02  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r144538.

2009-03-01  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (process_constraint): Deal with
	&ANYTHING on the lhs, reject all other ADDRESSOF constraints
	on the lhs.
	(get_constraint_for_component_ref): Assert that we don't get
	ADDRESSOF constraints from the base of the reference.
	Properly generate UNKNOWN_OFFSET for DEREF if needed.
	(do_structure_copy): Remove special casings, treat &ANYTHING
	on the lhs like DEREF.

2009-02-28  Richard Guenther  <rguenther@suse.de>

	* gimple.h (struct gimple_statement_with_memory_ops_base):
	Mark vdef and vuse members with GTY((skip (""))).

2009-02-27  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (get_constraint_for_1): Note that
	we should handle TARGET_MEM_REF here.
	(do_structure_copy): Handle &ANYTHING fallback on the lhs.

2009-02-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39299
	* tree-ssa-structalias.c (struct variable_info): Remove collapsed_to
	member.
	(get_varinfo_fc): Remove.
	(new_var_info): Do not set collapsed_to.
	(dump_constraint): Do not follow cycles.
	(dump_constraint_graph): Likewise.
	(build_pred_graph): Likewise.
	(build_succ_graph): Likewise.
	(rewrite_constraints): Likewise.
	(do_simple_structure_copy): Remove.
	(do_rhs_deref_structure_copy): Remove.
	(do_lhs_deref_structure_copy): Remove.
	(collapse_rest_of_var): Remove.
	(do_structure_copy): Re-implement.

	testsuite/
	* gcc.dg/torture/pta-structcopy-1.c: New testcase.

2009-02-24  Richard Guenther  <rguenther@suse.de>

	* passes.c (execute_one_pass): Initialize dump-files before
	running the pre-pass todo.
	* tree-sra.c (todoflags): Remove.
	(tree_sra): Do not rebuild alias info.
	(tree_sra_early): Adjust.
	(pass_sra): Run TODO_update_address_taken before SRA.
	* tree-ssa-ccp.c (execute_fold_all_builtins): Do not rebuild alias info.
	* tree-ssa-pre.c (do_pre): Likewise.
	(pass_pre): Run TODO_rebuild_alias before PRE.

2009-02-24  Richard Guenther  <rguenther@suse.de>

	* doc/tree-ssa.texi (Alias analysis): Update.

2009-02-21  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r144352.

2009-02-20  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-sccvn.h (get_ref_from_reference_ops): Declare.
	* tree-ssa-sccvn.c (get_ref_from_reference_ops): Export.
	* tree-ssa-pre.c (struct bb_bitmap_sets): Add expr_dies bitmap.
	(EXPR_DIES): New.
	(translate_vuse_through_block): Use the oracle.
	(phi_translate_1): Adjust.
	(value_dies_in_block_x): Use the oracle.  Cache the outcome
	in EXPR_DIES.

	testsuite/
	* gcc.c-torture/execute/20090113-1.c: New testcase.
	* gcc.c-torture/execute/20090113-2.c: Likewise.

2009-02-20  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (compute_avail): Do not make VOPs available.

	testsuite/
	* gcc.dg/tree-ssa/ssa-pre-24.c: Adjust pattern.

2009-02-19  Richard Guenther  <rguenther@suse.de>

	* ipa-reference.c (scan_stmt_for_static_refs): Open-code
	gimple_loaded_syms and gimple_stored_syms computation.
	* gimple-pretty-print.c (dump_symbols): Remove.
	(dump_gimple_mem_ops): Do not dump loaded or stored syms.
	* tree-ssa.c (delete_tree_ssa): Do not free the loaded and stored
	syms bitmaps
	* gimple.c (gimple_copy): Do not reset them.
	(gimple_set_stored_syms): Remove.
	(gimple_set_loaded_syms): Likewise.
	* gimple.h (struct gimple_statement_with_memory_ops_base): Remove
	stores and loads members.
	(gimple_loaded_syms): Remove.
	(gimple_stored_syms): Remove.
	* tree-ssa-operands.c (build_loads, build_stores): Remove.
	(init_ssa_operands): Do not init them.
	(fini_ssa_operands): Do not free them.
	(finalize_ssa_defs): Do not transfer them to stmts.
	(finalize_ssa_uses): Likewise.
	(cleanup_build_arrays): Do not clear them.
	(start_ssa_stmt_operands): Do not assert they are empty.
	(add_stmt_operand): Do not add to them.
	(free_stmt_operands): Do not reset stmt loaded and stored syms.

2009-02-16  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r144196.

2009-02-14  Richard Guenther  <rguenther@suse.de>

	testsuite/
	* gcc.dg/tree-ssa/ssa-dce-4.c: New testcase.

2009-02-12  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (walk_aliased_vdefs): Get visited bitmap.
	Only free it if we didn't get one.
	* tree-ssa-alias.h (walk_aliased_vdefs): Adjust prototype.
	* tree-ssa-dce.c (mark_nonaliased_loads_necessary): Pass NULL
	for the bitmap argument to walk_aliased_vdefs.
	(mark_aliased_loads_necessary): Pass locally cached bitmap.
	(visited): New global static.
	(perform_tree_ssa_dce): Free visited bitmap after propagating
	necessity.

2009-02-11  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r144098.

2009-02-10  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dce.c (propagate_necessity): Handle loads in
	asm input operands.

2009-02-09  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r144030.

2009-02-08  Richard Guenther  <rguenther@suse.de>
	Eric Botcazou  <ebotcazou@adacore.com>

	* tree-ssa-alias.c (walk_aliased_vdefs_1): New helper function.
	(walk_aliased_vdefs): New function.
	* tree-ssa-alias.h (walk_aliased_vdefs): Declare.
	* tree-ssa-dce.c (mark_operand_necessary): Dump something.
	(ref_may_be_aliased): New function.
	(mark_nonaliased_loads_necessary_1): New helper function.
	(mark_nonaliased_loads_necessary): Likewise.
	(mark_aliased_loads_necessary_1): Likewise.
	(mark_aliased_loads_necessary): Likewise.
	(propagate_necessity): Do not process virtual PHIs.  For
	non-aliased loads mark all reaching definitions as necessary.
	For aliased loads and stores mark the immediate dominating
	aliased clobbers as necessary.
	(remove_dead_phis): Perform simple dead virtual PHI removal.
	(remove_dead_stmt): Properly unlink virtual operands when
	removing stores.
	(eliminate_unnecessary_stmts): Schedule PHI removal after
	stmt removal.
	* passes.c (init_optimization_passes): Remove simple dse pass.
	* tree-pass.h (pass_simple_dse): Remove.
	* tree-ssa-dse.c (execute_simple_dse): Remove.
	(pass_simple_dse): Likewise.

	ada/
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_String_Literal_Subtype>:
	Set TYPE_NONALIASED_COMPONENT on the array type.

	testsuite/
	* gcc.c-torture/execute/20090207-1.c: New testcase.

2009-02-07  Richard Guenther  <rguenther@suse.de>

	* gimplify.c (mark_addressable): Export.
	* tree-flow.h (mark_addressable): Declare.
	* tree-ssa-loop-manip.c (create_iv): Mark the base addressable.
	* tree-ssa.c (verify_phi_args): Verify that address taken
	variables have TREE_ADDRESSABLE set.

2009-02-07  Richard Guenther  <rguenther@suse.de>

	* timevar.def (TV_ALIAS_STMT_WALK): New timevar.
	* tree-ssa-alias.c (walk_non_aliased_vuses): Account to
	TV_ALIAS_STMT_WALK.

2009-02-07  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c: Expand documentation.

2009-02-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39120
	* tree-ssa-structalias.c (handle_rhs_call): Fill out return
	constraints.
	(handle_lhs_call): Process return constraints.  Add escape
	constraints if necessary.
	(handle_const_call): Fill out return constraints.  Make nested
	case more precise.  Avoid consttmp if possible.
	(handle_pure_call): Fill out return constraints.  Avoid
	callused if possible.
	(find_func_aliases): Simplify call handling.  Manually build
	nonlocal constraints for asm outputs.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Add
	shortcut for const calls.  Properly use is_call_clobbered for
	non-const, non-pure calls.

	testsuite/
	* gcc.c-torture/execute/pr39120.c: New testcase.

2009-02-06  Richard Guenther  <rguenther@suse.de>

	* Makefile.in (toplev.o): Add tree-ssa-alias.h dependency.
	* toplev.c (dump_memory_report): Dump alias and pta stats.
	* tree-ssa-alias.c (alias_stats): New global variable.
	(dump_alias_stats): New function.
	(may_point_to_decl): Make static.
	(may_point_to_same_object): Likewise.
	(refs_may_alias_p): Make a wrapper for statistics, move body ...
	(refs_may_alias_p_1): ... here.
	(ref_maybe_used_by_call_p, ref_maybe_used_by_call_p_1): Likewise.
	(call_may_clobber_ref_p, call_may_clobber_ref_p_1): Likewise.
	* tree-ssa-alias.h (may_point_to_decl, may_point_to_same_object):
	Remove.
	(dump_alias_stats): Declare.
	(dump_pta_stats): Likewise.
	* tree-ssa-structalias.c (pta_stats): New global variable.
	(dump_pta_stats): New function.
	(pt_solution_includes): Make a wrapper for statistics, move body ...
	(pt_solution_includes_1): ... here.
	(pt_solutions_intersect, pt_solutions_intersect_1): Likewise.

2009-02-06  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39074
	* tree-ssa-structalias.c (storedanything_id, var_storedanything,
	storedanything_tree): New.
	(do_ds_constraint): Simplify ANYTHING shortcutting.  Update
	the STOREDANYTHING solution if the lhs solution contains
	ANYTHING.
	(build_pred_graph): Add edges from STOREDANYTHING to all
	non-direct nodes.
	(get_constraint_for_1): CONSTRUCTOR
	is a zero-initializer.  Generate &NOTHING for it.
	(init_base_vars): Initialize STOREDANYTHING.
	(compute_points_to_sets): Free substitution info after
	building the succ graph.
	(ipa_pta_execute): Likewise.

	testsuite/
	* gcc.dg/torture/pr39074.c: New testcase.
	* gcc.dg/torture/pr39074-2.c: Likewise.
	* gcc.dg/torture/pr39074-3.c: Likewise.

2009-02-05  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r143958.

2009-02-04  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (struct variable_info): Add may_have_pointers
	field.
	(do_ds_constraint): Do not add to special var or non-pointer
	field solutions.
	(type_could_have_pointers): Split out from ...
	(could_have_pointers): ... here.  For arrays use the element type.
	(create_variable_info_for): Initialize may_have_pointers.
	(new_var_info): Likewise.
	(handle_lhs_call): Make the HEAP variable unknown-sized.
	(intra_create_variable_infos): Use a type with pointers for
	PARM_NOALIAS, make it unknown-sized.

2009-02-04  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (find_what_var_points_to): CALLUSED
	shall not appear in poins-to solutions.
	(pt_solution_empty_p): Remove code dealing with CALLUSED
	in points-to solutions.
	(pt_solution_includes): Likewise.
	(pt_solutions_intersect): Likewise.
	(pt_solution_merge_into): Remove.
	(compute_points_to_sets): Do not merge escaped/callused solutions.
	(do_sd_constraint): Do not use CALLUSED as a representative.
	(solve_graph): Do propagate CALLUSED.
	(handle_pure_call): Use a scalar constraint from CALLUSED for
	the return value.
	(init_base_vars): Add CALLUSED = CALLUSED + UNKNOWN constraint.
	* tree-ssa-alias.c (dump_points_to_info_for): Do not dump
	callused flag.
	* tree-ssa-alias.h (struct pt_solution): Remove callused flag.

	testsuite/
	* gcc.dg/torture/pta-callused-1.c: New testcase.
	* gcc.dg/torture/ssa-pta-fn-1.c: Adjust.

2009-02-04  Richard Guenther  <rguenther@suse.de>

	Revert
	* tree-ssa-loop-niter.c (chain_of_csts_start): Use NULL_TREE.
	Simplify test for memory referencing statement.
	(get_val_for): Handle &a[i_1] by bailing out.
	(loop_niter_by_eval): Handle get_va_for bailing out.

	* tree-ssa-loop-niter.c (chain_of_csts_start): Use NULL_TREE.
	Simplify test for memory referencing statement.  Exclude
	non-invariant ADDR_EXPRs.

2009-02-04  Richard Guenther  <rguenther@suse.de>

	* gimple.h (struct gimple_statement_base): Replace
	references_memory_p member with padding.
	(gimple_references_memory_p): Alias to gimple_vuse.
	(gimple_set_references_memory): Remove.
	* tree-flow-inline.h (op_iter_init_phidef): Use NULL_DEF_OPERAND_P.
	(first_imm_use_stmt): Use NULL.
	* tree-ssa-loop-niter.c (chain_of_csts_start): Use NULL_TREE.
	Simplify test for memory referencing statement.
	(get_val_for): Handle &a[i_1] by bailing out.
	(loop_niter_by_eval): Handle get_va_for bailing out.
	* tree-ssa-operands.c (append_vdef): Add back var parameter.
	(append_vuse): Likewise.
	(add_virtual_operand): Adjust function comment.  Do not
	set references_memory.
	(gimple_add_to_addresses_taken): Adjust function comment.
	(get_indirect_ref_operands): Do not set references_memory.
	(get_tmr_operands): Likewise.
	(maybe_add_call_vops): Likewise.
	(build_ssa_operands): Likewise.
	* tree-ssa-operands.h (NULL_USE_OPERAND_P): Make of type use_operand_p.
	(NULL_DEF_OPERAND_P): Make of type def_operand_p.

2009-02-03  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38049
	* tree-ssa-structalias.c (struct constraint_expr): Make offset signed.
	(UNKNOWN_OFFSET): Define special value.
	(dump_constraint): Dump UNKNOWN_OFFSET as UNKNOWN.
	(solution_set_expand): New helper function split out from ...
	(do_sd_constraint): ... here.
	(solution_set_add): Handle UNKNOWN_OFFSET.  Handle negative offsets.
	(do_ds_constraint): Likewise.
	(do_sd_constraint): Likewise.  Do not special-case ESCAPED = *ESCAPED
	and CALLUSED = *CALLUSED.
	(set_union_with_increment): Make inc argument signed.
	(type_safe): Remove.
	(get_constraint_for_ptr_offset): Handle unknown and negative
	constant offsets.
	(first_vi_for_offset): Handle offsets before start.  Bail
	out early for offsets beyond the variable extent.
	(first_or_preceding_vi_for_offset): New function.
	(init_base_vars): Add ESCAPED = ESCAPED + UNKNOWN_OFFSET constraint.
	Together with ESCAPED = *ESCAPED this properly computes reachability.

	testsuite/
	* gcc.dg/torture/pta-ptrarith-3.c: New testcase.
	* gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
	* gcc.dg/vect/no-vfa-vect-43.c: Adjust.

2009-02-01  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r143837.

2009-02-01  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-coalesce.c (create_outofssa_var_map): Adjust
	virtual operands sanity check.

2009-02-01  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_possible_dead_store_p): Use
	ref_maybe_used_by_stmt_p.
	* tree-ssa-ccp.c (likely_value): Add comment, skip static-chain
	of call statements.
	* tree-ssa-alias.c (ref_may_used_by_call_p): Rename to ...
	(ref_maybe_used_by_call_p): ... this.
	(ref_may_used_by_stmt_p): Rename to ...
	(ref_maybe_used_by_stmt_p): ... this.  Adjust.
	(maybe_skip_until): Fix comment.
	* tree-ssa-alias.h (ref_may_used_by_stmt_p): Rename to ...
	(ref_maybe_used_by_stmt_p): ... this.
	* tree-ssa.c (verify_ssa): Fix typo.

2009-01-31  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (struct gimple_df): Remove vop_needs_renaming member.
	Add syms_to_rename member.
	(SYMS_TO_RENAME): New private accessor.
	(need_ssa_update_p): Adjust prototype to take function argument.
	* tree-ssanames.c (init_ssanames): Allocate SYMS_TO_RENAME.
	* tree-into-ssa.c (syms_to_rename): Remove.
	(need_to_update_vops_p): Likewise.
	(need_to_initialize_update_ssa_p): Rename to ...
	(update_ssa_initialized_fn): ... this.  Track function we are
	initialized for.
	(symbol_marked_for_renaming): Simplify.
	(add_new_name_mapping): Do not set need_to_update_vops_p.
	(dump_currdefs): Use SYMS_TO_RENAME.
	(rewrite_update_stmt): Always walk all uses/defs.
	(dump_update_ssa): Adjust.
	(init_update_ssa): Take function argument.  Track what we are
	initialized for.
	(delete_update_ssa): Reset SYMS_TO_RENAME and update_ssa_initialized_fn.
	(create_new_def_for): Initialize for cfun, assert we are initialized
	for cfun.
	(mark_sym_for_renaming): Simplify.
	(mark_set_for_renaming): Do not initialize update-ssa.
	(need_ssa_update_p): Simplify.  Take function argument.
	(name_mappings_registered_p): Assert we ask for the correct function.
	(name_registered_for_update_p): Likewise.
	(ssa_names_to_replace): Likewise.
	(release_ssa_name_after_update_ssa): Likewise.
	(update_ssa): Likewise.  Use SYMS_TO_RENAME.
	* passes.c (execute_function_todo): Adjust.
	(execute_todo): Likewise.
	* tree-cfg.c (gimple_duplicate_sese_region): Adjust.
	(gimple_duplicate_sese_tail): Likewise.
	* tree-inline.c (tree_function_versioning): Adjust.
	* tree-ssa-loop-im.c (move_computations): Adjust.
	* tree-ssa-structalias.c (compute_may_aliases): Adjust.
	* tree-ssa.c (verify_ssa): Adjust.
	* tree-vectorizer.c (slpeel_can_duplicate_loop_p): Adjust.

2009-01-30  Richard Guenther  <rguenther@suse.de>

	* gimple.h (gimple_loaded_syms): Revert comment adjustment.
	* tree-ssa-copy.c (may_propagate_copy): Re-structure virtual
	operand case.

2009-01-30  Richard Guenther  <rguenther@suse.de>

	* tree-ssa.c (verify_ssa): Verify that all stmts definitions
	have the stmt as SSA_NAME_DEF_STMT.
	* tree-inline.c (expand_call_inline): Unlink the virtual
	operands of the call statement.  Remove duplicate stmt updating.
	* ipa-struct-reorg.c (create_general_new_stmt): Clear vops.

2009-01-30  Richard Guenther  <rguenther@suse.de>

	* gimple.c (gimple_call_copy_skip_args): Copy the virtual operands
	and mark the new statement modified.
	* ipa-cp.c (ipcp_update_callgraph): Do not update SSA form.
	Adjust the SSA_NAME_DEF_STMT of a VDEF to the new statement.

2009-01-30  Richard Guenther  <rguenther@suse.de>

	* tree-inline.c (remap_gimple_stmt): Clear the copied vops.
	* tree-ssa-operands.c (finalize_ssa_defs): Always correctly
	remove defs.

2009-01-27  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (execute_simple_dse): Properly remove VOPs
	on removing empty stores.

2009-01-27  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r143679.

2009-01-26  Richard Guenther  <rguenther@suse.de>

	* gimple.c (gimple_copy): Delay updating the statement.

2009-01-21  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-sccvn.c (vn_nary_may_trap): Re-add.

2009-01-21  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r143541.

2009-01-20  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (OP_SIZE_1, OP_SIZE_2, OP_SIZE_3): Change
	unit to bytes.  Change values to do 1k, 4k and 16k allocations.
	(ssa_operand_alloc): Simplify, adjust according to the above change.
	(set_virtual_use_link): Remove.
	(finalize_ssa_defs): Release the SSA_NAME of removed VDEFs.

2009-01-20  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (same_type_for_tbaa): Never say that two
	array types are not equal - that is too unreliable.
	(refs_may_alias_p): Skip first component for path based
	type disambiguation.

2009-01-20  Richard Guenther  <rguenther@suse.de>

	* doc/invoke.texi (max-aliased-vops): Remove docs.
	(avg-aliased-vops): Likewise.
	* opts.c (decode_options): Do not adjust max-aliased-vops or
	avg-aliased-vops values.
	* params.def (PARAM_MAX_ALIASED_VOPS): Remove.
	(PARAM_AVG_ALIASED_VOPS): Likewise.
	* params.h (MAX_ALIASED_VOPS): Remove.
	(AVG_ALIASED_VOPS): Likewise.
	* timevar.def (TV_TREE_MAY_ALIAS): Remove.
	(TV_CALL_CLOBBER): Likewise.
	(TV_FLOW_SENSITIVE): Likewise.
	(TV_FLOW_INSENSITIVE): Likewise.
	(TV_MEMORY_PARTITIONING): Likewise.

	testsuite/
	* g++.dg/opt/pr36187.C: Remove no longer supported --param
	adjustments.
	* gcc.dg/pr19633-1.c: Likewise.
	* gcc.dg/torture/pr30375.c: Likewise.
	* gcc.dg/torture/pr33560.c: Likewise.
	* gcc.dg/torture/pr33563.c: Likewise.
	* gcc.dg/torture/pr33870.c: Likewise.
	* gcc.dg/tree-ssa/alias-16.c: Likewise.
	* gcc.dg/tree-ssa/alias-18.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-13.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-15.c: Likewise.

2009-01-19  Richard Guenther  <rguenther@suse.de>

	testsuite/
	* gcc.dg/tree-ssa/pr38895.c: Adjust testcase to test what it
	was supposed to test.

2009-01-19  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.h (struct vuse_element_d): Remove.
	(struct vuse_vec_d): Likewise.
	(VUSE_VECT_NUM_ELEM, VUSE_VECT_ELEMENT_NC, VUSE_ELEMENT_PTR_NC,
	VUSE_ELEMENT_VAR_NC, VUSE_VECT_ELEMENT, VUSE_ELEMENT_PTR,
	SET_VUSE_VECT_ELEMENT, SET_VUSE_ELEMENT_VAR, SET_VUSE_ELEMENT_PTR,
	VUSE_ELEMENT_VAR): Likewise.
	(struct voptype_d): Likewise.
	(NUM_VOP_FREE_BUCKETS): Likewise.
	(struct ssa_operands): Remove vop_free_buckets member.
	(struct stmt_operands_d): Remove.
	(VUSE_OP_PTR, VUSE_OP, SET_VUSE_OP, VUSE_NUM, VUSE_VECT,
	VDEF_RESULT_PTR, VDEF_RESULT, VDEF_OP_PTR, VDEF_OP, SET_VDEF_OP,
	VDEF_NUM, VDEF_VECT): Likewise.
	(copy_virtual_operands): Remove.
	(operand_build_cmp): Likewise.
	(create_ssa_artificial_load_stmt): Likewise.
	(enum ssa_op_iter_type): Remove ssa_op_iter_vdef.
	(struct ssa_operand_iterator_d): Remove vuses, vdefs, mayusesm
	vuse_index and mayuse_index members.  Pack and move done and iter_type
	members to the front.
	(SSA_OP_VMAYUSE): Remove.
	(SSA_OP_VIRTUAL_USES): Adjust.
	(FOR_EACH_SSA_VDEF_OPERAND): Remove.
	* tree-flow-inline.h (op_iter_next_use): Remove vuses and mayuses
	cases.
	(op_iter_next_def): Remove vdefs case.
	(op_iter_next_tree): Remove vuses, mayuses and vdefs cases.
	(clear_and_done_ssa_iter): Do not set removed fields.
	(op_iter_init): Likewise.  Skip vuse and/or vdef if requested.
	Assert we are not iterating over vuses or vdefs if not also
	iterating over uses or defs.
	(op_iter_init_use): Likewise.
	(op_iter_init_def): Likewise.
	(op_iter_next_vdef): Remove.
	(op_iter_next_mustdef): Likewise.
	(op_iter_init_vdef): Likewise.
	(compare_ssa_operands_equal): Likewise.
	(link_use_stmts_after): Handle vuse operand.
	* tree-flow.h (struct var_ann_d): Remove in_vuse_list and
	in_vdef_list members.
	* gimple.h (struct gimple_statement_with_memory_ops_base): Remove
	vdef_ops and vuse_ops members, add vuse and vdef members.
	(gimple_vuse_ops): Remove.
	(gimple_set_vuse_ops): Likewise.
	(gimple_vdef_ops): Likewise.
	(gimple_set_vdef_ops): Likewise.
	(gimple_vuse_op): New.
	(gimple_vdef_op): Likewise.
	(gimple_vuse): Simplify
	(gimple_vdef): Likewise.
	(gimple_vuse_ptr): New.
	(gimple_vdef_ptr): Likewise.
	(gimple_set_vuse): Likewise.
	(gimple_set_vdef): Likewise.
	* tree-ssa-operands.c (build_vdefs): Rename to ...
	(build_vdef): ... this.  Make it a tree.
	(build_vuses): Rename to ...
	(build_vuse): ... this.  Make it a tree.
	(operand_build_cmp): Remove.
	(operand_build_sort_virtual): Likewise.
	(vop_free_bucket_size): Likewise.
	(vop_free_bucket_index): Likewise.
	(init_vop_buckets): Likewise.
	(add_vop_to_freelist): Likewise.
	(init_ssa_operands): Zero build_vuse, build_vdef.
	Do not call init_vop_buckets.
	(fini_ssa_operands): Zero build_vuse, build_vdef.
	(ssa_operand_alloc): Use struct use_optype_d for size computations.
	(alloc_vop): Remove.
	(add_vop): Likewise.
	(add_vuse_op): Likewise.
	(add_vdef_op): Likewise.
	(finalize_ssa_defs): Fold in finalize_ssa_vdefs.
	(finalize_ssa_uses): Fold in finalize_ssa_vuses.
	(finalize_ssa_vdefs): Remove.
	(finalize_ssa_vuse_ops): Likewise.
	(finalize_ssa_vuses): Likewise.
	(cleanup_build_arrays): Do not clear in_vdef_list or in_vuse_list
	flags.  Zero build_vuse, build_vdef.
	(finalize_ssa_stmt_operands): Do not call finalize_ssa_vdefs
	or finalize_ssa_vuses.
	(start_ssa_stmt_operands): Assert build_vuse, build_vdef are NULL.
	(append_vdef): Assert we do not have different VOPs, add a VUSE.
	(append_vuse): Assert we do not have different VOPs.
	(build_ssa_operands): Do not sort virtual operands.
	(free_stmt_operands): Do not free virtual uses/defs.  Zero
	the VUSE and VDEF operands.
	(copy_virtual_operands): Remove.
	(create_ssa_artificial_load_stmt): Likewise.
	(push_stmt_changes): Adjust.
	(pop_stmt_changes): Likewise.

	* tree-vrp.c (stmt_interesting_for_vrp): Adjust.
	(vrp_visit_stmt): Likewise.
	* tree-into-ssa.c (rewrite_update_stmt): Adjust.
	* tree-ssa-loop-im.c (movement_possibility): Adjust.
	(determine_max_movement): Likewise.
	(gather_mem_refs_stmt): Likewise.
	* tree-complex.c (update_all_vops): Remove.
	(expand_complex_move): Adjust.
	* tree-loop-distribution.c (generate_memset_zero): Adjust.
	(rdg_flag_uses): Likewise.
	* tree-ssa-dse.c (dse_optimize_stmt): Adjust.
	* tree-ssa-ccp.c (surely_varying_stmt_p): Adjust.
	(gimplify_and_update_call_from_tree): Likewise.
	* tree-ssa-dom.c (eliminate_redundant_computations): Adjust.
	(record_equivalences_from_stmt): Likewise.
	(avail_expr_hash): Likewise.
	(avail_expr_eq): Likewise.
	* tree-ssa-propagate.c (update_call_from_tree): Adjust.
	(stmt_makes_single_load): Likewise.
	(stmt_makes_single_store): Likewise.
	* tree-ssa-sink.c (is_hidden_global_store): Adjust.
	(statement_sink_location): Likewise.
	* tree-ssa-loop-ivcanon.c (empty_loop_p): Adjust.
	* tree-ssa-ifcombine.c (bb_no_side_effects_p): Adjust.
	* gimple-pretty-print.c (dump_gimple_mem_ops): Adjust.
	* tree-data-ref.c (get_references_in_stmt): Adjust.
	(stores_from_loop): Likewise.
	* tree-vect-analyze.c (vect_stmt_relevant_p): Adjust.
	* tree-ssa-coalesce.c (create_outofssa_var_map): Adjust.
	* tree-dfa.c (collect_dfa_stats): Adjust.
	* graphite.c (rename_variables_in_stmt): Adjust.
	(graphite_copy_stmts_from_block): Likewise.
	(translate_clast): Likewise.
	* tree-sra.c (mark_all_v_defs_stmt): Remove.
	(mark_all_v_defs_seq): Adjust.
	(sra_replace): Likewise.
	(scalarize_use): Likewise.
	(scalarize_copy): Likewise.
	(scalarize_init): Likewise.
	(scalarize_ldst): Likewise.
	* tree-predcom.c (mark_virtual_ops_for_renaming): Adjust.
	(mark_virtual_ops_for_renaming_list): Remove.
	(initialize_root_vars): Adjust.
	(initialize_root_vars_lm): Likewise.
	(prepare_initializers_chain): Likewise.
	* tree-ssa-copy.c (propagate_tree_value_into_stmt): Adjust.
	(stmt_may_generate_copy): Likewise.
	* tree-ssa-ter.c (is_replaceable_p): Adjust.
	(process_replaceable): Likewise.
	(find_replaceable_in_bb): Likewise.
	* tree-ssa.c (verify_ssa): Verify new VUSE / VDEF properties.
	(delete_tree_ssa): Clear the VUSE, VDEF operands.
	(warn_uninitialized_var): Adjust.
	* tree-ssa-loop-prefetch.c (gather_memory_references): Adjust.
	* lambda-code.c (can_put_in_inner_loop): Adjust.
	(can_put_after_inner_loop): Likewise.
	(perfect_nestify): Likewise.
	* tree-ssa-phiprop.c (phivn_valid_p): Adjust.
	(propagate_with_phi): Likewise.
	* tree-vect-transform.c (vectorizable_call): Adjust.
	(vect_gen_widened_results_half): Likewise.
	(vectorizable_conversion): Likewise.
	(vect_create_mask_and_perm): Likewise.
	(vectorizable_load): Likewise.
	* gimple.c (gimple_copy): Also copy virtual operands.
	* tree-cfg.c (gimple_duplicate_bb): Adjust.
	* tree-ssa-reassoc.c (get_rank): Adjust.

2009-01-17  Richard Guenther  <rguenther@suse.de>

	PR middle-end/13146
	PR tree-optimization/38895
	* tree-ssa-alias.c (same_type_for_tbaa): New helper function.
	(refs_may_alias_p): Use it.  Extend access path based disambiguation.

	testsuite/
	* gcc.dg/tree-ssa/pr13146.c: New testcase.
	* gcc.dg/tree-ssa/pr38895.c: Likewise.
	* g++.dg/tree-ssa/pr13146.C: Likewise.

2009-01-16  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (refs_may_alias_p): Move ...
	* tree-ssa-alias.c (refs_may_alias_p): ... here.
	* tree-ssa-alias.h: Adjust.
	* tree-ssa-pre.c (print_pre_expr): Print the VOP as well,
	always print <>s.

2009-01-15  Richard Guenther  <rguenther@suse.de>

	testsuite/
	* gcc.dg/tree-ssa/alias-20.c: Correct testcase.

2009-01-14  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (do_regular_insertion): Use the value number
	of edoubleprime for the value number of the expr.
	* tree-ssa-sccvn.c (vn_reference_lookup_pieces): Do not start
	walking if we found an expression, even if its value number
	is NULL.
	* tree-ssa-structalias.c (set_uids_in_ptset): Expect a pointer
	decl.
	(find_what_var_points_to): Always pass a decl to set_uids_in_ptset.

	testsuite/
	* gcc.c-torture/compile/20090114-1.c: New testcase.

2009-01-13  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r143334.

2009-01-12  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): Do
	not mark symbols for renaming.
	(forward_propagate_addr_expr): Match up push/pop_stmt_changes
	with the same statement, make sure to update the new pointed-to one.
	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not copy
	call statements, do not mark symbols for renaming.
	* tree-ssa-operands.c (finalize_ssa_vdefs): Do not mark the VOP
	for renaming if a VDEF is removed but instead unlink that from
	the IL.

2009-01-11  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (ref_may_used_by_call_p): Use 
	ipa_reference_get_not_read_global to disambiguate against
	global statics.
	(call_may_clobber_ref_p): Same with
	ipa_reference_get_not_written_global.

2009-01-11  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (refs_may_alias_p): Simplify structure.  Generalize
	pointer vs. decl disambiguation based on strict-aliasing rules.

2009-01-11  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (set_uids_in_ptset): Use get_deref_alias_set.
	* alias.c (get_deref_alias_set_1): Split out from
	(get_deref_alias_set): Fall back to access type alias-set here.
	(get_alias_set): Use get_deref_alias_set_1.

	testsuite/
	* gcc.dg/tree-ssa/alias-20.c: New testcase.

2009-01-11  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.h (unlink_stmt_vdef): Declare.
	* tree-ssa-dse.c (dse_optimize_stmt): Use it.
	(execute_simple_dse): Likewise.  Make sure to update virtual
	SSA form if we changed a call.
	* tree-ssa-operands.c (add_stmt_operand): For defs do not
	update the bitmap of loaded syms.
	(unlink_stmt_vdef): New function.

2009-01-11  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (finalize_ssa_vuse_ops): Really only rename
	the virtual operand if a VUSE was added.

2009-01-10  Richard Guenther  <rguenther@suse.de>

	* Makefile.in (GTFILES): Add tree-ssa-alias.h.
	* ipa-struct-reorg.c (finalize_var_creation): Do not mark vars
	call-clobbered.
	* tree-dfa.c (dump_variable): Do not dump escape reason.  Dump
	call-used state.
	(add_referenced_var): Remove call-clobber related code.
	(remove_referenced_var): Likewise.
	* tree-flow-inline.h (gimple_call_clobbered_vars): Remove.
	(gimple_call_used_vars): Likewise.
	(may_be_aliased): Take a const_tree argument.
	(is_call_clobbered): Query the escaped solution if the variable
	may be aliased.
	(is_call_used): Query the callused solution if the variable may
	be aliased.
	(mark_call_clobbered): Remove.
	(clear_call_clobbered): Likewise.
	* tree-flow.h (struct gimple_df): Remove call_clobbered_vars and
	call_used_vars, add escaped and callused solutions.
	(struct var_ann): Remove escape_mask.
	* tree-outof-ssa.c (create_temp): Do not fiddle with call-clobber
	state.
	* tree-ssa-alias.c (may_point_to_decl): Use pt_solution_includes.
	(may_point_to_same_object): Use pt_solutions_intersect.
	(get_ptr_info): Use pt_solution_reset.
	(dump_points_to_info): Dump pt_callused state.
	* tree-ssa-alias.h (struct pt_solution): Move here from tree-flow.h.
	Add callused flag.
	(pt_solution_includes): Declare.
	(pt_solution_reset): Likewise.
	(pt_solutions_intersect): Likewise.
	* tree-ssa-structalias.c (handle_lhs_call): Use a scalar
	NONLOCAL constraint for the return value.
	(make_copy_constraint): New function.
	(create_variable_info_for): Globals point to what NONLOCAL
	points to.
	(find_what_var_points_to): Properly separate NONLOCAL, ESCAPED,
	and CALLUSED.
	(clobber_what_escaped): Remove.
	(compute_call_used_vars): Likewise.
	(pt_solution_reset): New function.
	(pt_solution_empty_p): Likewise.
	(pt_solution_includes): Likewise.
	(pt_solutions_intersect): Likewise.
	(pt_solution_merge_into): Likewise.
	(init_base_vars): Use a pointer type for the artificial variables.
	Add a NONLOCAL = &NONLOCAL constraint.  Add *ESCAPED = NONLOCAL
	constraint.  Remove *ESCAPED = &ESCAPED and *ESCAPED = &NONLOCAL
	constraints.
	(compute_points_to_sets): Build the ESCAPED and CALLUSED solutions.
	(compute_call_clobbered): Remove.
	(compute_may_aliases): Do not call compute_call_clobbered.
	* tree-ssa.c (verify_call_clobbering): Remove.
	(verify_alias_info): Likewise.
	(verify_ssa): Do not call verify_alias_info.
	(init_tree_ssa): Reset the escaped and callused solutions.
	(delete_tree_ssa): Likewise.
	(execute_update_addresses_taken): Do not clear call-clobber state.

	testsuite/
	* gcc.dg/torture/ssa-pta-fn-1.c: New testcase.

2009-01-09  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (get_continuation_for_phi): Add visited param,
	adjust maybe_skip_until calls.
	(maybe_skip_until): Likewise.  All multiply visited PHI nodes
	finish the walking.
	(walk_non_aliased_vuses): Adjust get_continuation_for_phi calls.
	Free visited bitmap.

	testsuite/
	* gcc.dg/tree-ssa/ssa-fre-20.c: New testcase.

2009-01-09  Richard Guenther  <rguenther@suse.de>

	* tree-flow-inline.h (gimple_addressable_vars): Remove.
	(is_global_var): Adjust documentation.
	(may_be_aliased): Rely on TREE_ADDRESSABLE, do not use
	is_global_var.
	* tree-flow.h (struct gimple_df): Remove addressable_vars.
	* tree-ssa-structalias.c (compute_call_used_vars): Iterate
	over addressable variables with FOR_EACH_REFERENCED_VAR.
	(compute_call_clobbered): Likewise.
	* tree-ssa.c (init_tree_ssa): Do not initialize addressable_vars.
	(delete_tree_ssa): Do not free it.
	(execute_update_addresses_taken): Use a local bitmap.

	* gimple.h (gimple_add_to_addresses_taken): Remove.
	* tree-ssa-operands.c (add_to_addressable_set): Make static.
	(gimple_add_to_addresses_taken): Likewise.
	* tree-ssa-operands.h (add_to_addressable_set): Remove.

2009-01-09  Richard Guenther  <rguenther@suse.de>

	* fold-const.c (build_fold_addr_expr_with_type_1): Rename back to ...
	(build_fold_addr_expr_with_type): ... this.  Remove in_fold handling.
	Do not mark decls TREE_ADDRESSABLE.
	(build_fold_addr_expr): Adjust.
	(fold_addr_expr): Remove.
	(fold_unary): Use build_fold_addr_expr.
	(fold_comparison): Likewise.
	(split_address_to_core_and_offset): Likewise.
	* coverage.c (tree_coverage_counter_addr): Mark the array decl
	TREE_ADDRESSABLE.
	* gimplify.c (mark_addressable): Do not exclude RESULT_DECLs.
	(gimplify_modify_expr_to_memcpy): Mark source and destination
	addressable.
	* omp-low.c (create_omp_child_function): Mark the object decl
	TREE_ADDRESSABLE.
	(lower_rec_input_clauses): Mark the var we take the address of
	TREE_ADDRESSABLE.
	(lower_omp_taskreg): Mark the sender decl TREE_ADDRESSABLE.

	fortran/
	* trans-array.c (gfc_conv_descriptor_data_addr): Use
	gfc_build_addr_expr instead of build_fold_addr_expr.
	(gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
	gfc_trans_constant_array_constructor, gfc_conv_array_data,
	gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
	* trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
	gfc_conv_function_val, gfc_conv_operator_assign,
	gfc_conv_subref_array_arg, gfc_conv_function_call,
	gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_exponent,
	gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
	gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
	gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
	gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
	gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
	gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
	* trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
	gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
	build_filepos, gfc_trans_inquire, gfc_trans_wait,
	nml_get_addr_expr, transfer_namelist_element, build_dt,
	gfc_trans_dt_end, transfer_array_component, transfer_expr,
	transfer_array_desc, gfc_trans_transfer): Likewise.
	* trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
	* trans.c (gfc_build_addr_expr): Mark the base of the address
	TREE_ADDRESSABLE.

2009-01-09  Richard Guenther  <rguenther@suse.de>

	Revert
	2009-01-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38721
	* tree-into-ssa.c (pass_build_ssa): Add TODO_update_address_taken.
	* tree-ssa-loop.c (tree_ssa_loop_ivopts): Update address-taken.
	* tree-cfg.c (verify_expr): Verify that stmt addresses-taken and
	function addressable-vars are conservatively correct.
	(verify_stmt): Initialize gsi of walk data.
	* tree-inline.c (optimize_inline_calls): Execute
	TODO_update_address_taken.
	(tree_function_versioning): Call execute_update_addresses_taken.
	* passes.c (init_optimization_passes): Remove redundant
	update-address-taken pass after final inlining.
	* tree-parloops.c (parallelize_loops): Call
	execute_update_addresses_taken.
	* tree-vectorizer.c (vectorize_loops): Likewise.

2009-01-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38721
	* tree-into-ssa.c (pass_build_ssa): Add TODO_update_address_taken.
	* tree-pass.h (TODO_update_address_taken): New flag.
	* tree-ssa-loop.c (tree_ssa_loop_ivopts): Update address-taken.
	* tree-ssa.c (execute_update_addresses_taken): Optimize only when
	optimizing.
	(pass_update_address_taken): Just use TODO_update_address_taken.
	* tree-flow.h (execute_update_addresses_taken): Update prototype.
	* tree-cfg.c (verify_expr): Verify that stmt addresses-taken and
	function addressable-vars are conservatively correct.
	(verify_stmt): Initialize gsi of walk data.
	* tree-inline.c (optimize_inline_calls): Execute
	TODO_update_address_taken.
	(tree_function_versioning): Call execute_update_addresses_taken.
	* passes.c (execute_function_todo): Handle TODO_update_address_taken.
	(init_optimization_passes): Remove redundant update-address-taken pass
	after final inlining.
	* tree-parloops.c (parallelize_loops): Call
	execute_update_addresses_taken.
	* tree-vectorizer.c (vectorize_loops): Likewise.

2009-01-07  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38301
	* alias.c (get_deref_alias_set): New function split out from ...
	(get_alias_set): ... here.
	* alias.h (get_deref_alias_set): Declare.
	* tree-vect-transform.c (vect_create_data_ref_ptr): Remove unused
	type parameter.  Remove restrict pointer handling.  Create a
	ref-all pointer in case type-based alias sets do not conflict.
	(vectorizable_store): Re-instantiate TBAA assert.
	(vectorizable_load): Likewise.

2009-01-05  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r143059.

2009-01-04  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38723
	* tree-ssa-alias.c (maybe_skip_until): Use get_continuation_for_phi.
	* tree-ssa-pre.c (compute_avail): Add all default definitions to
	the entry block.

2009-01-04  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (refs_may_alias_p): Disambiguate using alias
	sets of the bases.
	* tree-ssa-operands.c (create_ssa_artificial_load_stmt): Add
	the virtual operand in SSA form.
  
2009-01-04  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (intra_create_variable_infos): Add
	constraints for a result decl that is passed by hidden reference.
	* tree-ssa-alias.c (may_point_to_same_object): Make two identical
	pointer always conflict.

2009-01-03  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r143032.

2009-01-03  Richard Guenther  <rguenther@suse.de>

	* tree-flow-inline.h (may_be_aliased): Query the addressable
	vars bitmap in addition to checking TREE_ADDRESSABLE.
	* tree-ssa-structalias.c (get_constraint_for_ptr_offset):
	For field-sensitive analysis also handle variable offsets
	on addresses of variables that did not get decomposed.
	(find_func_aliases): Fix constraint generation for asm statements.
	(find_what_var_points_to): Do not set pt_nonlocal for heap
	variables.
	* tree-dfa.c (refs_may_alias_p): Disambiguate two indirect
	references with PTA information.
	* tree-ssa-alias.h (may_point_to_same_object): Declare.
	* tree-ssa-alias.c (may_point_to_same_object): New function.
	(ref_may_used_by_call_p): Fix handling of indirect references.

2009-01-03  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c
	(get_single_incoming_phi_arg_for_maybe_loop_invariant_ref): Remove.
	(maybe_skip_until): New helper function.
	(get_continuation_for_phi): Likewise.
	(walk_non_aliased_vuses): Use get_continuation_for_phi instead of
	get_single_incoming_phi_arg_for_maybe_loop_invariant_ref.

2009-01-02  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (struct count_ptr_d, count_ptr_derefs,
	count_uses_and_derefs): Move ...
	* gimple.c: ... here.
	* gimple.h (count_uses_and_derefs): Declare.
	* passes.c (init_optimization_passes): Remove reset_cc_flags pass.
	* tree-pass.h (pass_reset_cc_flags): Remove.
	* tree-flow-inline.h (may_be_aliased): New function, moved from ...
	* tree-ssa-alias.c (may_be_aliased): ... here.
	* tree-flow.h (enum escape_type): Move ...
	* tree-ssa-alias.h: ... here.
	* tree-flow.h (struct ptr_info_def): Remove escape_mask and
	value_escapes_p members.
	* tree-flow.h: Move declarations around to correct places.
	* tree-ssa-alias.c: Rewrite overall documentation.
	(struct alias_stats_d, alias_stats, dump_alias_stats,
	reset_alias_info, reset_cc_flags, pass_reset_cc_flags): Remove.
	(compute_call_clobbered, compute_may_aliases, may_alias_p,
	pass_build_alias): Move ...
	* tree-ssa-structalias.c: ... here.
	(may_alias_p): Simplify, make static.
	(clobber_what_escaped, compute_call_used_vars, compute_points_to_sets,
	init_alias_heapvars): Make static.
	(compute_points_to_sets): Reset is_dereferenced flags.
	* tree-ssa-structalias.h (is_escape_site): Move to tree-ssa-alias.h.
	(compute_points_to_sets, delete_points_to_sets): Remove.

2009-01-02  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (ref_may_used_by_call_p): New function.
	(ref_may_used_by_stmt_p): Likewise.
	(call_may_clobber_ref_p): Handle more cases.
	(stmt_may_clobber_ref_p): Export.
	* tree-ssa-alias.h (ref_may_used_by_stmt_p): Declare.
	(stmt_may_clobber_ref_p): Likewise.
	* tree-ssa-dse.c (struct address_walk_data): Remove.
	(memory_ssa_name_same): Likewise.
	(memory_address_same): Likewise.
	(get_kill_of_stmt_lhs): Likewise.
	(dse_possible_dead_store_p): Simplify, use the oracle.  Handle
	unused stores.
	(dse_optimize_stmt): Simplify.  Properly remove stores.

	testsuite/
	* gcc.dg/noncompile/920507-1.c: Fix invalid dead array access.

2009-01-02  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (do_sd_constraint): Do not shortcut
	computing the transitive closure.

2009-01-01  Richard Guenther  <rguenther@suse.de>

	testsuite/
	* gcc.dg/tree-ssa/alias-15.c: Remove.
	* gcc.dg/tree-ssa/alias-19.c: Adjust.
	* gcc.dg/tree-ssa/pr23382.c: Likewise.
	* gcc.dg/tree-ssa/pr26421.c: Likewise.

2009-01-01  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (dump_referenced_vars): Tidy.
	(get_ref_base_and_extent): Allow bare decls.
	(refs_may_alias_p): Unconditionally initialize size/max_size.
	Handle register/constant bases.  Handle mixed the pointer/decl
	case with both offset and PTA disambiguation.
	* tree-flow.h (struct ptr_info_def): Remove pt_global_mem, factor
	the points-to solution part into a pt_solution sub-structure.
	Add nonlocal, escaped and vars_contains_global flags.
	(dump_points_to_info): Remove.
	(debug_points_to_info): Likewise.
	(find_what_p_points_to): Likewise.
	* tree-into-ssa.c (dump_decl_set): Do not print a newline.
	(debug_decl_set): Do it here.
	(dump_update_ssa): And here.
	* tree-ssa-alias.c (compute_flow_sensitive_aliasing): Remove.
	(set_pt_anything): Likewise.
	(compute_may_aliases): Do not call compute_flow_sensitive_aliasing,
	dump_points_to_info.
	(reset_alias_info): Cleanup, initialize a correct points-to solution.
	(may_point_to_global_var): Adjust.
	(may_point_to_decl): New function.
	(dump_alias_info): Clean.
	(get_ptr_info): Initialize a correct points-to solution.
	(dump_points_to_info_for): Adjust.
	(dump_points_to_info): Remove.
	(debug_points_to_info): Likewise.
	* tree-ssanames.c (duplicate_ssa_name_ptr_info): No need to copy
	the shared bitmaps.
	* tree-ssa-alias.h (may_point_to_decl): Declare.
	* tree-ssa-structalias.c (set_uids_in_ptset): Take a points-to
	solution struct.
	(find_what_var_points_to): Split out generic parts from ...
	(find_what_p_points_to): ... here.
	(compute_points_to_sets): Do what compute_flow_sensitive_aliasing
	did as well.

2008-12-31  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (set_uids_in_ptset): Fix pruned accounting.
	(compute_points_to_sets): Initialize the SSA_NAME pointer info
	dereferenced field.
 
2008-12-11  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r142671.

2008-12-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38458
	* tree-ssa-copy.c (copy_prop_visit_phi_node): For the first
	argument use the arguments copy-of value.

2008-12-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38207
	* tree-flow.h: Include tree-ssa-alias.h.
	(get_single_def_stmt, get_single_def_stmt_from_phi,
	get_single_def_stmt_with_phi): Remove.
	(refs_may_alias_p): Move ...
	* tree-ssa-alias.h: ... here.  New file.
	* tree-dfa.c (refs_may_alias_p): Handle non-aliased locals.
	(get_single_def_stmt, get_single_def_stmt_from_phi,
	get_single_def_stmt_with_phi): Remove.
	* tree-ssa-alias.c: Include tree-ssa-alias.h.
	(call_may_clobber_ref_p): New function.
	(stmt_may_clobber_ref_p): Likewise.
	(get_single_incoming_phi_arg_for_maybe_loop_invariant_ref): Likewise.
	(walk_non_aliased_vuses): Likewise.
	* Makefile.in (TREE_FLOW_H): Add tree-ssa-alias.h.
	* tree-ssa-sccvn.c (SSA_VAL): Revert handling NULL arguments.
	(get_def_ref_stmt_vuse): Remove.
	(vn_reference_lookup_2): New function.
	(vn_reference_lookup_pieces): Use walk_non_aliased_vuses for
	walking equivalent vuses.
	(vn_reference_lookup): Likewise.

	testsuite/
	* gcc.dg/tree-ssa/ssa-fre-18.c: New testcase.
	* gcc.dg/tree-ssa/ssa-fre-19.c: Likewise.
	* gcc.dg/tree-ssa/ssa-lim-3.c: Run at -O to disable PRE.
	* gcc.dg/tree-ssa/ssa-pre-23.c: New testcase.
	* gcc.dg/tree-ssa/ssa-pre-24.c: Likewise.

2008-12-10  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (get_asm_expr_operands): Add proper
	virtual operands for memory clobbers.
	* tree-dfa.c (refs_may_alias_p): Disable TBAA disambiguation
	if one reference is a TARGET_MEM_REF.

2008-12-10  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_optimize_stmt): Fix typo in last change.

2008-12-09  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_optimize_stmt): Properly query if the rhs
	aliases the lhs in a copy stmt.

2008-12-08  Richard Guenther  <rguenther@suse.de>

	* gimple.h (gimple_vuse): New function.
	(gimple_vdef): Likewise.
	* tree-ssa-sccvn.c (SSA_VAL): Check for NULL.
	(vn_constant_eq): Bail out if hashes are different.
	(vn_reference_compute_hash): Simplify.
	(vn_reference_eq): Likewise.
	(vuses_to_vec, copy_vuses_from_stmt, vdefs_to_vec,
	copy_vdefs_from_stmt, shared_lookup_vops, shared_vuses_from_stmt,
	valueize_vuses): Remove.
	(get_def_ref_stmt_vuses): Simplify.  Rename to ...
	(get_def_ref_stmt_vuse): ... this.
	(vn_reference_lookup_pieces): Simplify.
	(vn_reference_lookup): Likewise.
	(vn_reference_insert): Likewise.
	(vn_reference_insert_pieces): Likewise.
	(vn_nary_op_eq): Bail out if hashes are different.
	(vn_phi_eq): Likewise.
	(set_ssa_val_to): Do not use SSA_VAL as lvalue.
	(visit_reference_op_call): Simplify.
	(visit_reference_op_load): Likewise.
	(visit_reference_op_store): Likewise.
	(init_scc_vn): Remove shared_lookup_vuses initialization.
	(free_scc_vn): Remove shared_lookup_vuses freeing.
	(run_scc_vn): Do not use SSA_VAL as lvalue.
	(sort_vuses, sort_vuses_heap): Remove.
	* tree-ssa-sccvn.h (struct vn_reference_s): Replace vuses
	vector with single vuse pointer.
	(vn_reference_lookup_pieces, vn_reference_lookup,
	vn_reference_insert, vn_reference_insert_pieces): Adjust prototypes.
	(shared_vuses_from_stmt): Remove.
	* tree-dfa.c (get_single_def_stmt): Simplify.
	(get_single_def_stmt_with_phi): Likewise.
	* tree-ssa-pre.c (translate_vuses_through_block): Simplify.  Rename to
	(translate_vuse_through_block): ... this.
	(phi_translate_1): Simplify.
	(value_dies_in_block_x): Likewise.
	(compute_avail): Simplify.

2008-11-27  Richard Guenther  <rguenther@suse.de>

	* passes.c (init_optimization_passes): Remove pass_update_address_taken
	before initial PTA pass again.
	(execute_function_todo): For TODO_rebuild_alias run
	update_address_taken before compute_may_aliases.
	* tree-flow.h (execute_update_addresses_taken): Declare.
	* tree-ssa.c (execute_update_addresses_taken): Export.  Update SSA
	manually.
	(pass_update_address_taken): Remove TODO_update_ssa, add
	TODO_dump_func.

2008-11-26  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (intra_create_variable_infos): Make
	a constraint for the static chain parameter.

2008-11-26  Richard Guenther  <rguenther@suse.de>

	* gimple.c (is_gimple_reg): Do not handle memory tags.
	* ipa-cp.c (ipcp_update_callgraph): Fix typo.
	* passes.c (init_optimization_passes): Schedule
	update_address_taken pass before points-to analysis.
	* tree-data-ref.c (dr_analyze_alias): Ignore vops and SMTs.
	(free_data_ref): Likewise.
	(create_data_ref): Likewise.
	(dr_may_alias_p): Likewise.
	(analyze_all_data_dependences): Likewise.
	* tree-dfa.c (dump_variable): Do not dump SMTs, memory stats,
	may-aliases or partitions.
	(remove_referenced_var): Do not clear mpt or symbol_mem_tag.
	* tree-dump.c (dequeue_and_dump): Do not handle SYMBOL_MEMORY_TAG
	or NAME_MEMORY_TAG.
	* tree-flow-inline.h (gimple_aliases_computed_p): Remove.
	(gimple_global_var): Likewise.
	(may_aliases): Likewise.
	(is_global_var): Remove MTAG code.
	(unmodifiable_var_p): Likewise.
	(memory_partition): Remove.
	(factoring_name_p): Likewise.
	(symbol_mem_tag): Likewise.
	(set_symbol_mem_tag): Likewise.
	(gimple_mem_ref_stats): Likewise.
	* tree-flow.h (struct mem_sym_stats_d): Remove.
	(struct mem_ref_stats_d): Likewise.
	(struct gimple_df): Remove global_var, aliases_computed_p and
	mem_ref_stats fields.
	(struct ptr_info_def): Remove memory_tag_needed and name_mem_tag
	fields.
	(struct var_ann_d): Remove call_clobbered, mpt and symbol_mem_tag
	fields.
	* tree-into-ssa (mark_sym_for_renaming): Remove memory paritioning
	code.
	(update_ssa): Likewise.
	* tree-outof-ssa.c (create_temp): Do not set SMT.
	* tree-predcom.c (set_alias_info): Remove.
	(prepare_initializers_chain): Do not call it.
	* tree-pretty-print.c (dump_generic_node): Do not handle memory tags.
	* tree-sra.c (sra_walk_function): Use gimple_references_memory_p.
	* tree-ssa-alias.c (struct alias_info): Remove.
	(get_mem_sym_stats_for, mem_sym_stats, set_memory_partition,
	mark_non_addressable, sort_tags_by_id, init_transitive_clobber_worklist,
	add_to_worklist, mark_aliases_call_clobbered, compute_tag_properties):
	Remove.
	(set_initial_properties): Rename to compute_call_clobbered.
	(dump_memory_partitions, debug_memory_partitions, need_to_partition_p,
	mem_sym_score, count_mem_refs, dump_mem_ref_stats, debug_mem_ref_stats,
	dump_mem_sym_stats, debug_mem_sym_stats, dump_mem_sym_stats_for_var,
	dump_all_mem_sym_stats, debug_all_mem_sym_stats, dump_mp_info,
	debug_mp_info, update_mem_sym_stats_from_stmt, compare_mp_info_entries,
	mp_info_cmp, sort_mp_info, get_mpt_for, find_partition_for,
	rewrite_alias_set_for, estimate_vop_reduction, update_reference_counts,
	build_mp_info, compute_memory_partitions): Remove.
	(compute_may_aliases): Remove all but points-to analysis code.
	(reset_alias_info): Likewise.
	(init_alias_info): Likewise.
	(compute_flow_sensitive_aliasing): Likewise.
	(delete_mem_ref_stats, init_mem_ref_stats, delete_alias_info,
	eq_ptr_info, ptr_info_hash, create_name_tags, union_alias_set_into,
	have_common_aliases_p, compute_flow_insensitive_aliasing,
	create_alias_map_for, update_alias_info_1, update_alias_info,
	setup_pointers_and_addressables, maybe_create_global_var): Remove.
	(may_alias_p): Remove SMT code.
	(may_point_to_global_var): Adjust.
	(add_may_alias): Remove.
	(set_pt_anything): Adjust.
	(create_tag_raw, create_memory_tag, get_nmt_for, get_smt_for,
	create_global_var): Remove.
	(dump_alias_info): Adjust.
	(dump_points_to_info_for): Likewise.
	(dump_may_aliases_for, debug_may_aliases_for, add_may_alias_for_new_tag,
	new_type_alias): Remove.
	* tree-ssa-ccp.c (get_symbol_constant_value): Remove memory-tag
	related code.
	* tree-ssa-copy.c (may_propagate_copy): Likewise.
	(may_propagate_copy_into_stmt): Likewise.
	(merge_alias_info): Do nothing for now.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
	memory-tag related code.
	* tree-ssa-live.c (remove_unused_locals): Likewise.
	* tree-ssa-loop-ivopts.c (get_ref_tag): Remove.
	(copy_ref_info): Remove memory-tag related code.
	* tree-ssa-operands.c (init_ssa_operands): Likewise.
	(fini_ssa_operands): Likewise.
	(get_expr_operands): Likewise.
	* tree-ssa-operands.h (struct ssa_operands): Remove mpt_table field.
	* tree-ssa-phiprop.c (propagate_with_phi): Remove memory-tag related
	code.
	* tree-ssa-structalias.c (find_func_aliases): Do not mark stmts
	modified.
	(var_can_have_subvars): Remove memory-tag related code.   
	(set_uids_in_ptset): Mark pointer-info as pt_global_mem if the set
	contains a global variable.
	(delete_alias_heapvars): Allow unconditional call.
	* tree-ssa-structalias.h (update_mem_sym_stats_from_stmt): Remove.
	* tree-ssa.c (verify_flow_insensitive_alias_info): Remove.
	(verify_flow_sensitive_alias_info): Likewise.
	(verify_call_clobbering): Adjust.
	(verify_memory_partitions): Remove.
	(verify_alias_info): Adjust.
	(verify_ssa): Likewise.
	(delete_tree_ssa): Remove memory-tag related code.
	(warn_uninitialized_var): Aliases are always available.
	(execute_update_addresses_taken): Update gimple_addressable_vars.
	Update call-clobber state.
	* tree-tailcall.c (suitable_for_tail_opt_p): Remove memory-tag
	related code.
	(find_tail_calls): Use gimple_references_memory_p.
	* tree-vect-transform.c (vect_create_data_ref_ptr): Remove memory-tag
	related code.
	* tree.c (init_ttree): Likewise.
	(tree_code_size): Likewise.
	(tree_node_structure): Likewise.
	(build7_stat): Re-write to be build6_stat.
	* tree.h (MTAG_P, TREE_MEMORY_TAG_CHECK, TMR_TAG): Remove.
	(SSA_VAR_P): Adjust.
	(struct tree_memory_tag): Remove.
	(struct tree_memory_partition_tag): Likewise.
	(union tree_node): Adjust.
	(build7): Re-write to be build6.
	* treestruct.def (TS_MEMORY_TAG, TS_MEMORY_PARTITION_TAG): Remove.
	* tree-ssa-alias-warnings.c (build_reference_table): Remove
	memory-tag related code.
	(ffan_walker): Likewise.
	(detect_strict_aliasing_named): Likewise.
	* tree-data-ref.h (struct dr_alias): Remove symbol_tag field.
	(DR_SYMBOL_TAG, DR_VOPS): Remove.
	* tree-ssa-address.c (create_mem_ref_raw): Use build6.
	(get_address_description): Remove memory-tag related code.
	* tree-vect-analyze.c (vect_analyze_data_refs): Likewise.
	* tree.def (NAME_MEMORY_TAG, SYMBOL_MEMORY_TAG, MEMORY_PARTITION_TAG):
	Remove.
	(TARGET_MEM_REF): Remove TMR_TAG operand.

	* tree-dfa.c (add_referenced_var): Initialize call-clobber state.
	* tree-flow-inline.h (is_call_used): Use is_call_clobbered.
	(is_call_clobbered): Global variables are always call clobbered,
	query the call-clobbers bitmap.
	(mark_call_clobbered): Ignore global variables.
	(clear_call_clobbered): Likewise.
	* tree-ssa-alias.c (reset_cc_flags): Do not clear all
	call-clobber flags.  Verify initial state instead.
	* tree-ssa.c (verify_call_clobbering): Adjust.

2008-11-26  Richard Guenther  <rguenther@suse.de>

	Revert
	* tree-ssa-structalias.c (struct variable_info): Add
	is_nonpointer_var flag.
	(new_var_info): Clear it.
	(perform_var_substitution): Set it.
	(find_what_p_points_to): Use it.

	Merge from trunk r142215.

2008-11-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/38180
	* tree-ssa-ccp.c (get_default_value): Simplify.
	(likely_value): Likewise.
	(surely_varying_stmt_p): Properly handle VOP case.
	(ccp_initialize): Likewise.
	(ccp_fold): Handle propagating through *&.
	(fold_const_aggregate_ref): Also handle decls.

	testsuite/
	* gcc.dg/tree-ssa/ssa-ccp-24.c: New testcase.

2008-11-25  Richard Guenther  <rguenther@suse.de>

	* tree-data-ref.c (dr_may_alias_p): Use the alias-oracle.

	* tree-tailcall.c (tree_optimize_tail_calls_1): Also split the
	edge from the entry block if we have degenerate PHI nodes in
	the first basic block.

	* gimple.c (gimple_set_bb): Fix off-by-one error.
	* tree-cfg.c (move_block_to_fn): Likewise.

	PR tree-optimization/37869
	* tree-ssa-structalias.c (struct variable_info): Add
	is_nonpointer_var flag.
	(new_var_info): Clear it.
	(perform_var_substitution): Set it.
	(find_what_p_points_to): Use it.

2008-11-24  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (struct gimple_df): Add vop_needs_renaming flag.
	* tree-into-ssa.c (symbol_marked_for_renaming): Adjust for
	vop_needs_renaming flag.
	(is_old_name): Likewise.
	(is_new_name): Likewise.
	(pass_build_ssa): Run TODO_update_ssa_only_virtuals.
	(dump_update_ssa): Dump vop_needs_renaming.
	(delete_update_ssa): Clear delete_update_ssa.
	(mark_sym_for_renaming): Adjust for vop_needs_renaming flag.
	(need_ssa_update_p): Likewise.
	(release_ssa_name_after_update_ssa): Likewise.
	(update_ssa): Likewise.
	* ipa-cp.c (ipcp_update_callgraph): Update SSA form.
	* tree-ssa-alias.c (create_vop_var): Remove.
	(compute_may_aliases): Do not call it here.
	(may_point_to_global_var): Handle pointer constants.
	* tree-inline.c (expand_call_inline): Mark the VOP for renaming.
	* gimple.h (gimple_loaded_syms): Note that we should fix this
	interface.
	* tree-ssa-operands.c (create_vop_var): Move here.
	(init_ssa_operands): Call it.
	(fini_ssa_operands): Clear gimple_df->vop.
	(finalize_ssa_vdefs): Mark the VOP for renaming on changes.
	(finalize_ssa_vuse_ops): Likewise.
	(append_vdef): Simplify.
	(append_vuse): Likewise.
	(access_can_touch_variable): Remove.
	(add_virtual_operand): Simplify.
	(get_addr_dereference_operands): Remove.
	(get_indirect_ref_operands): Simplify.
	(get_tmr_operands): Likewise.
	(add_call_clobber_ops): Remove.
	(add_call_read_ops): Likewise.
	(maybe_add_call_clobbered_vops): Rename to ...
	(maybe_add_call_vops): ... this.  Inline remanents of the
	removed functions.
	(get_expr_operands): Simplify.
	(create_ssa_artificial_load_stmt): Likewise.
	* tree-call-cdce.c (tree_call_cdce): Rename the VOP.
	* tree-cfg.c (mark_virtual_ops_in_region): Remove.
	(move_sese_region_to_fn): Do not call it.
	* omp-low.c (expand_omp_taskreg): Update SSA form.
	* tree-ssa.c (execute_update_addresses_taken): Update for
	single VOP.

2008-11-23  Richard Guenther  <rguenther@suse.de>

	Merge from trunk r142135.

2008-09-19  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (struct gimple_df): New member vop.
	* tree-flow-inline.h (gimple_vop): New function.
	* tree-ssa-alias.c (create_vop_var): New function.
	(compute_may_aliases): Call it.
	* tree-ssa-operands.c (append_vdef): Always append
	the single gimple vop.
	(append_vuse): Likewise.
	* tree-ssa.c (verify_ssa_name): Verify all VOPs are
	based on the single gimple vop.