aboutsummaryrefslogtreecommitdiff
path: root/gcc/ChangeLog.lno
blob: 93d59c8ae42d476c0a14ae742eb3a21729152a0b (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
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2004-04-16  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	Merge from tree-ssa branch:

	2004-03-25  Diego Novillo  <dnovillo@redhat.com>
		* tree-ssa-alias.c (struct alias_info): Change type of field
		'num_references' to varray_type.  Update all users.

2004-04-15  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-into-ssa.c (struct mark_def_sites_global_data): Change type of
	names_to_rename to sbitmap.
	(insert_phi_nodes_for, insert_phi_nodes_1, insert_phi_nodes):
	Allocate worklist globally.
	(ssa_mark_def_sites_initialize_block, ssa_mark_phi_uses,
	ssa_mark_def_sites, ssa_rewrite_initialize_block,
	ssa_rewrite_phi_arguments, ssa_rewrite_stmt, rewrite_ssa_into_ssa):
	Use sbitmaps instead of bitmaps.

2004-04-15  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* tree-scalar-evolution.c (instantiate_parameters): Don't keep
	symbols after instantiation.  Fully instantiate parameters, 
	or fail on chrec_top.

2004-04-15  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* tree-fold-const.h (chrec_merge_types): Move it...
	* tree-chrec.c (multiply_int, divide_int, add_int, substract_int, 
	integer_divides_p, lcm, gcd, update_initial_condition_to_origin, 
	remove_initial_condition, ): Removed.
	(evolution_function_in_loop_num): Renamed into
	hide_evolution_in_other_loops_than_loop.
	(hide_evolution_in_loop, hide_evolution_in_other_loops_than_loop): New.
	(chrec_merge_types): ... here.
	(chrec_merge): Answer chrec_top on EXPONENTIAL_CHREC. 
	(ziv_subscript_p, siv_subscript_p, analyze_ziv_subscript, 
	analyze_siv_subscript, analyze_siv_subscript_cst_affine, 
	analyze_siv_subscript_affine_cst, analyze_siv_subscript_affine_affine, 
	chrec_steps_divide_constant_p, analyze_miv_subscript, 
	analyze_overlapping_iterations): Moved from here...
	* tree-chrec.h (evolution_function_in_loop_num): Rename declaration.
	(hide_evolution_in_other_loops_than_loop, hide_evolution_in_loop): New.
	(analyze_overlapping_iterations): No longer extern.

	* tree-data-ref.c (ziv_subscript_p, siv_subscript_p, 
	analyze_ziv_subscript, 
	analyze_siv_subscript, analyze_siv_subscript_cst_affine, 
	analyze_siv_subscript_affine_cst, analyze_siv_subscript_affine_affine, 
	chrec_steps_divide_constant_p, analyze_miv_subscript, 
	analyze_overlapping_iterations): ... there.
	(initialize_data_dependence_relation,
	access_functions_are_affine_or_constant_p): Moved down.
	(compute_all_dependences): Moved down.  Now is static.
	(build_classic_dir_vector): New.
	(build_classic_dist_vector): 
	(find_data_references): Renamed find_data_references_in_loop. 
	Now is static.
	(compute_data_dependences_for_loop): New.
	(analyze_all_data_dependences): Use compute_data_dependences_for_loop.
	* tree-data-ref.h (dd_info_available): Don't declare it extern.

	* tree-scalar-evolution.c (dd_info_available): Declare static.
	(select_outer_and_current_evolutions): Removed.
	(stats_*): Move the static variables in the chrec_stats structure.
	(chrec_stats): New structure.
	(first_iteration_non_satisfying_1): In the multivariate case, 
	don't forget that the outer loops can change the number of iterations.
	(cannot_analyze_loop_nb_iterations_yet): Removed.
	(follow_ssa_edge_inner_loop_phi): Refine the case where the
	evolution of the inner loop is symbolic.  
	(number_of_iterations_in_loop): Factor the end of the cases.

	* tree-dg.c (classic_dist, classic_dir): Declared static.
	(dg_delete_graph): Delete the classic_dist and classic_dir.
	(dg_create_graph): Adapt to use compute_data_dependences_for_loop.
	(gate_ddg, gate_delete_ddg, pass_ddg, pass_delete_ddg): Moved in 
	tree-scalar-evolution.c.
	* tree-dg.h (dg_create_graph): Pass in struct loops.

2004-04-15  Dorit Naishlos <dorit@il.ibm.com>

        * tree-data-ref.h (struct data_reference): New field "aux".
        * tree-vectorizer.h (aligned_access_p, unknown_alignment_for_access_p):
        New functions.
        (DR_MISLAIGNMENT): New macro, for accessing the new 'aux' field in
        data_reference.
        * tree-vectorizer.c: (vect_analyze_data_refs_alignment): New function.
        (vect_compute_data_refs_alignment): New function.
        (vect_compute_data_ref_alignment): New function.
        (vect_enhance_data_refs_alignment): New function.
        (vect_force_dr_alignment_p): New function.
        (vect_align_data_ref): Use new functions aligned_access_p and
        vect_force_dr_alignment_p.
        (vect_analyze_data_ref_access): Alignment related checks moved to new
        functions that deal with alignment.
        (vect_analyze_data_refs): Likewise.
        (vect_analyze_loop): Call vect_analyze_data_refs_alignment.
	
2004-04-15  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* loop-invariant.c (may_assign_reg_p): Prevent unused parameter
	warning.
	* tree-ssa-loop-manip.c (find_use_block, find_use_blocks,
	defined_inside_loop_p): Removed.
	(add_exit_phis_var, add_exit_phis, rewrite_into_loop_closed_ssa):
	Make more efficient.
	(find_uses_to_rename_use, find_uses_to_rename_stmt,
	find_uses_to_rename): New functions.

2004-04-15  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-flow.h (compute_global_livein): Declare.
	* tree-into-ssa.c (struct def_blocks_d): New field
	phi_blocks.
	(compute_global_livein): Export.
	(set_def_block): Record phi_blocks.
	(get_def_blocks_for): Allocate phi_blocks.
	(mark_def_sites): Changed due to set_def_block change.
	(ssa_mark_def_sites_initialize_block, ssa_mark_def_sites):
	Make virtual defs be kills.
	(insert_phi_nodes_for): Handle old phi nodes more efficiently.
	(def_blocks_free): XFREE the bitmaps.
	* tree-ssa-loop-manip.c (add_exit_phis_use, add_exit_phis_stmt):
	Removed.
	(get_loops_exits): Return bitmap.
	(add_exit_phis_var, find_use_block, find_use_blocks,
	defined_inside_loop_p): New functions.
	(add_exit_phis): Use add_exit_phis_var.
	(rewrite_into_loop_closed_ssa): Reorganize.
	* tree-ssa-loop.c (pass_loop): Add garbage collection.

2004-04-14  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-chrec.c (chrec_convert): Handle extending correctly.
	* tree-scalar-evolution.c (set_scev_keep_symbolic): Removed.
	(set_scalar_evolution): Do not use it.
	(get_scalar_evolution): Only handle ssa names and constants.
	(interpret_loop_phi): When interpreting subloop, compute the
	evolution in outer loop afterwards.
	(analyze_scalar_evolution_in_loop): New.
	* tree-scalar-evolution.h (analyze_scalar_evolution_in_loop): Declare.
	* tree-ssa-loop-ivopts.c: Include tree-fold-const.h, tree-chrec.h
	and tree-scalar-evolution.h.
	(tree_ssa_iv_optimize_init): Call scev_initialize.
	(determine_biv_step, find_bivs, mark_bivs,
	find_givs_in_stmt): Use scev analyzer.
	(find_givs_in_stmt_scev): New function.
	(find_induction_variables): Remove TODO comment.
	(force_var_cost): Test for TREE_INVARIANT, not for
	is_gimple_min_invariant.
	(find_optimal_iv_set): Update comment.
	(tree_ssa_iv_optimize_finalize): Call scev_finalize.

2004-04-13  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa.c (raise_value): Removed.
	(get_eq_name, check_phi_redundancy): New.
	(kill_redundant_phi_nodes): Use standard algorithm.

2004-04-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-manip.c (allocate_new_names): Use duplicate_ssa_name.
	Preserve SSA_NAME_OCCURS_IN_ABNORMAL_PHI flag.

2004-04-10  Daniel Berlin  <dberlin@dberlin.org>

	* lambda-code.c (lambda_loopnest_transform): Add comments.
	
2004-04-09  David Edelsohn  <edelsohn@gnu.org>

	Backport from mainline:
        * config/rs6000/t-linux64 (bispecs): Don't add -mlong-double-128 for
        32-bit builds when defaulting to 32-bit.

2004-04-09  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* loop-iv.c (iv_number_of_iterations): Sign extend the constant value
	appropriately for the target mode.
	* tree-fold-const.c (tree_fold_gcd): Make more efficient.
	* tree-ssa-loop-manip.c (add_exit_phis_use): Do not add unnecessary
	phis.
	(rewrite_into_loop_closed_ssa): Fix comment.

2004-04-09  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* cfgrtl.c (purge_dead_edges): Clean the EDGE_ABNORMAL_CALL flags.
	* loop-iv.c (iv_number_of_iterations): Handle the case when we prove
	that the loop does not roll.
	* opts.c (decode_options): Enable -floop-optimize2 and
	-ftree-loop-optimize by default.
	* tree-cfg.c (factored_computed_goto_label,
	factored_computed_goto): Removed.
	(factor_computed_gotos): Do not record them.
	(disband_implicit_edges): Do not unfactor computed jumps.
	* tree-ssa-loop-ivopts.c (force_gimple_operand): Give correct types
	to temporary variables.
	(idx_force_simple, create_iv, rewrite_use_nonlinear_expr,
	rewrite_use_address, rewrite_use_compare, rewrite_use_outer):
	Changed due to force_gimple_operand change.
	(find_bivs): Handle ill-typed assignments correctly.

2004-04-04  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* passes.c (rest_of_compilation): Enable rest_of_handle_loop2 by
	flag_loop_optimize2.
	* tree-scalar-evolution.c (scev_initialize): Find loop exits.

2004-04-02  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (rewrite_use_outer): Do not remove ssa names
	prematurely.

2004-04-01 Mostafa Hagog  <mustafa@il.ibm.com>
	   Dorit Naishlos <dorit@il.ibm.com>

        * config/rs6000/rs6000.md ("*ctrsi_internal1", "*ctrsi_internal2",
        "*ctrdi_internal1", "*ctrdi_internal2", "*ctrsi_internal3",
        "*ctrsi_internal4", "*ctrdi_internal3", "*ctrdi_internal4",
        "*ctrsi_internal5", "*ctrsi_internal6", "*ctrdi_internal5",
        "*ctrdi_internal6"): Replace register_operand with nonimmediate_operand

2004-03-31  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-into-ssa.c (ssa_rewrite_initialize_block): Update
	SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
	(ssa_rewrite_phi_arguments): Ditto.
	* tree-ssa.c (kill_redundant_phi_nodes): Prevent replacing
	ssa names that occur in abnormal phi nodes.
	* tree-ssa-loop-ivopts.c (get_var_def): Handle non-invariant
	non-ssa name operands.
	* java/decl.c (java_init_decl_processing): Initialize
	long_integer_type_node.

2004-03-31  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (idx_find_step): Prevent misscompilation
	in case the index overflows.

2004-03-31  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>,
	    Dorit Naishlos <DORIT@il.ibm.com>

	* tree-scalar-evolution.c (dump_chrecs_stats): Prevent format warning.

2004-03-30  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* lambda-code.c (gcc_loop_to_lambda_loop): Changed due to changes in
	scev.
	* tree-data-ref.c (analyze_array_indexes, analyze_array): Ditto.
	* tree-elim-check.c (try_eliminate_check): Ditto.
	* tree-vectorizer.c (vect_analyze_scalar_cycles): Ditto.
	* tree-chrec.c (chrec_fold_plus_1): Handle exponential + peeled chrec
	correctly.  Use correct types.
	(chrec_fold_negate): New.
	(chrec_merge):  Short-circuit the case when the merged values are
	identical.
	(no_evolution_in_loop_p): Handle chrec_top correctly.
	(chrec_convert): Handle polynomial and exponential chrecs corectly.
	(chrec_type): Use TREE_TYPE.
	* tree-chrec.h (chrec_fold_negate): Declare.
	* tree-phinodes.c (create_phi_node): Do not initialize PHI_MARKED.
	* tree-scalar-evolution.c: Handle evolutions analysed from different
	loops correctly.  Do not use PHI_MARKED.  Use correct types.
	* tree-scalar-evolution.h (analyze_scalar_evolution,
	instantiate_parameters): Declaration changed.
	(struct scev_info_str): Moved to tree-scalar-evolution.c.
	(MI_VAR, MI_INNER_LOOPS_CHREC, MI_OUTER_LOOPS_CHREC): Removed.
	(new_scev_info_str): Moved to tree-scalar-evolution.c.
	* tree-ssa-loop-manip.c (add_exit_phis_use): Just add exit phis for 
	superloops of the loop containing the definition.
	* tree.h (PHI_MARKED): Removed.
	(tree_phi_node): Field 'marked' removed.

2004-03-30  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* tree-chrec.c (chrec_contains_symbols): Factorize conditions,
	chrec_not_analyzed_yet is a NULL_TREE.
	* tree-chrec.h (prove_truth_value_{lt, le, ge, ne, gt, eq}.c):
	Removed.
	(evolution_function_is_multivariate, 
	evolution_function_is_peeled_affine_p): New.
	* tree-data-ref.c (analyze_all_data_dependences): Dump some 
	statistics on the data dependences.
	* tree-elim-check.c (not_code, prove_truth_value): New.
	(try_eliminate_check): Use prove_truth_value.
	* tree-fold-const.h (tree_is_ne): New.
	* tree-scalar-evolution.c (types_forbid_solutions_p, 
	first_iteration_non_satisfying_noev_noev, 
	first_iteration_non_satisfying_noev_ev, 
	first_iteration_non_satisfying_ev_noev, 
	first_iteration_non_satisfying_ev_ev, 
	first_iteration_non_satisfying_1, 
	first_iteration_non_satisfying, 
	gather_stats_on_scev_database): New functions.
	(nb_iterations_less, nb_iterations_eq, nb_iterations_ne): Removed.
	(set_nb_iterations_in_loop): Be more careful on overflow.
	(number_of_iterations_in_loop): Use first_iteration_non_satisfying.
	* tree-scalar-evolution.h (first_iteration_non_satisfying, 
	gather_stats_on_scev_database): Declared.

2004-03-30  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (iv_value): Use correct type.
	(may_eliminate_iv): Add a fixme comment.

2004-03-29  Devang Patel  <dpatel@apple.com>

	* tree-flow.h (tree_ssa_loop_version): Add new parameter, basic_block *.
	(update_lv_condition): New.
	* tree-ssa-loop-manip.c (copy_phi_nodes): nreverse copied phi nodes list
	to ensure that phi nodes remain in same order.
	(lv_update_pending_stmts): Do not nreverse pending list.
	(lv_adjust_loop_header_phi): Walk two phi nodes list in parallel.
	(tree_ssa_loop_version): Now condition_bb is input parameter. 
	(update_lv_condition): New.
	(test_loop_versioning): Use update_lv_condition.
	* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update function
	tree_ssa_loop_version () call by adding 4th parameter.
	
2004-03-29  Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>

	* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
	Fix unused vars warning with -disable-checking.
	* df.c (df_reg_def_chain_create, df_reg_use_chain_create): Ditto.

2004-03-27  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* cfghooks.c (split_edge): Update IRREDUCIBLE_LOOP flags.
	* tree-flow-inline.h (bsi_after_labels): New.
	* tree-flow.h (struct ssa_name_ann_d): Add need_phi_state field.
	(bsi_after_labels, rewrite_ssa_into_ssa, duplicate_ssa_name,
	tree_ssa_dce_no_cfg_changes, rewrite_into_loop_closed_ssa,
	verify_loop_closed_ssa, compute_phi_arg_on_exit): Declare.
	(tree_loop_optimizer_init): Declaration changed.
	* tree-into-ssa.c (struct mark_def_sites_global_data): Add
	names_to_rename and ssa_names fields.
	(insert_phi_nodes, get_value_for, set_value_for, set_def_block,
	set_livein_block, insert_phi_nodes_1, insert_phi_nodes_for,
	register_new_def, get_reaching_def, rewrite_into_ssa): Handle
	rewriting of ssa names.
	(get_phi_state, set_phi_state, ssa_mark_def_sites_initialize_block,
	ssa_mark_phi_uses, ssa_mark_def_sites, duplicate_ssa_name,
	ssa_rewrite_initialize_block, ssa_rewrite_phi_arguments,
	ssa_rewrite_finalize_block, ssa_rewrite_stmt, rewrite_ssa_into_ssa):
	New functions.
	* tree-scalar-evolution.c (scev_initialize): Changed due to
	tree_loop_optimizer_init change.
	* tree-ssa-dce.c (perform_tree_ssa_dce, perform_tree_ssa_dce,
	tree_ssa_cd_dce): Handle no cfg changes mode.
	(tree_ssa_dce_no_cfg_changes): Resurrect.
	* tree-ssa-loop-im.c (move_computations): Preserve loop closed ssa.
	* tree-ssa-loop-ivopts.c (struct version_info): Field outermost_usage
	removed.
	(update_outermost_usage, find_outermost_usage): Removed.
	(ip_normal_pos): Fix.
	(tree_ssa_iv_optimize_init): Do not call find_outermost_usage.
	(find_interesting_uses_stmt): Use loop closed ssa form.
	(find_interesting_uses_outside): New.
	(find_interesting_uses): Use it.
	(determine_iv_cost): Prefer IP_NORMAL to IP_END.
	(split_loop_exit_edge, protect_loop_closed_ssa_form_use,
	protect_loop_closed_ssa_form, compute_phi_arg_on_exit): New functions.
	(rewrite_use_outer): Preserve loop closed ssa form.
	(tree_ssa_iv_optimize): Verify loop closed ssa form.
	* tree-ssa-loop-manip.c (mfb_redirect_exit_edges): Removed.
	(free_new_names): Free old ssa names.
	(extend_exit_phi_nodes, add_exit_phis_edge,
	add_exit_phis_use, add_exit_phis_stmt, add_exit_phis,
	get_loops_exits, rewrite_into_loop_closed_ssa,
	check_loop_closed_ssa_use, check_loop_closed_ssa_stmt,
	verify_loop_closed_ssa): New functions.
	(tree_duplicate_loop_to_header_edge): Use loop closed ssa form.
	(tree_ssa_loop_version): Handle irreducible loops correctly.
	* tree-ssa-loop.c (tree_loop_optimizer_init): Create loop closed ssa
	form.
	(tree_ssa_loop_opt, copy_loop_headers): Changed due to
	tree_loop_optimizer_init change.

2004-03-25  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* tree-data-ref.c (subscript_dependence_tester): Removed.
	(build_classic_dist_vector): Implement the subscript tester:
	test for different distances carried by the same loop.

2004-03-23  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* tree-cfg.c (print_loop): Modify dump formatting.
	(debug_loop_ir): Renamed tree_debug_loops.
	(tree_debug_loop): New.
	* tree-chrec.c: Restructure for handling more carefully types.
	* tree-chre.h: Same.
	* tree-fold-const.h: Same.
	* tree-fold-const.c: Same.
	* tree-scalar-evolution.c: Same.
	* tree-scalar-evolution.h: Same.
	* tree-data-ref.c (dump_data_dependence_relation): Remove the 
	dump of the base_name because it produces too many conflicts in 
	the diffs of the testsuite.  
	(compute_all_dependences): Use pointers to the dependence_relations varray.
	(int_cst_value, build_classic_dist_vector): New.
	(find_data_references): Use pointers to datarefs varray.
	(analyze_all_data_dependences): Compute the classic distances.
	* tree-data-ref.h: Declare functions.
	* tree-dg.c (dg_create_graph): Update the uses of the data-ref functions.
	* tree-flow.h (debug_loop_ir): Renamed to tree_debug_loops.
	(tree_debug_loop): Declare.

2004-03-23  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-flow.h (tree_ssa_dce_no_cfg_changes): Declaration removed.
	* tree-ssa-dce.c (remove_dead_stmt): Invalidate dominators if we
	thread the edge.
	(tree_ssa_dce_no_cfg_changes): Removed.
	(perform_tree_ssa_dce, tree_ssa_dce, perform_tree_ssa_dce): Remove
	no cfg changes mode.
	* tree-ssa-loop-ivopts.c (force_gimple_operand): Handle overflowed
	constants.
	(find_interesting_uses_outer_or_nonlin): New.
	(find_interesting_uses_op, find_interesting_uses_outer): Use it.
	(find_interesting_uses_cond, idx_record_use,
	find_interesting_uses_stmt): Changed due to find_interesting_uses_op
	change.
	(create_new_iv, remove_statement, rewrite_use_nonlinear_expr,
	rewrite_use_outer, tree_ssa_iv_optimize): Handle direct removal of
	unused ivs.
	(remove_unused_ivs): New.
	(tree_ssa_iv_optimize_loop): Call it.

2004-03-23  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* Makefile.in (SCEV_H): New.
	(tree-ssa-loop-ivcanon.o, tree-ssa-loop-ivopts.o,
	tree-scalar-evolution.o, tree-data-ref.o, tree-dg.o,
	tree-elim-check.o, tree-vectorizer.o, tree-loop-linear.o,
	lambda-code.o): Use it.
	* tree-chrec.h (build_interval_chrec, build_polynomial_chrec,
	build_exponential_chrec, build_peeled_chrec): Give a type to the
	chrec node.
	* tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Preserve correct
	type.
	(analyze_evolution_in_loop): Fix test for edges from inside the loop.
	(scev_initialize): New.
	(scev_init): Use it.
	(scev_finalize): New.
	(scev_done): Use it.
	* tree-flow-inline.h (loop_of_stmt): Handle initialization statements
	without crash.
	* tree-scalar-evolution.h (scev_initialize, scev_finalize): Declare.

2004-03-23  Dorit Naishlos  <dorit@il.ibm.com>

        * tree-vectorizer.c: (vect_align_data_ref): Check for DECL_ALIGN
        instead of TYPE_ALIGN. Check for DECL_EXTERNAL.
        (vect_analyze_data_refs): Check for DECL_EXTERNAL. 

        Add documentation for functions.

2004-03-22  Dale Johannesen  <dalej@apple.com>

	* Makefile.in (OBJS-common):  Remove duplicate loop-iv.o.

2004-03-22  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c: Avoid usage of global variables.

2004-03-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-unswitch.o: New file.
	* Makefile.in (tree-ssa-loop-unswitch.o): Add.
	(tree-ssa-loop-im.o): Add flags.h dependency.
	* flags.h (flag_unswitch_loops): Declaration moved from ...
	* toplev.h (flag_unswitch_loops): ... here.
	* tree-flow.h (tree_ssa_loop_version): Declaration changed.
	(tree_ssa_unswitch_loops, estimate_loop_size): Declare.
	* tree-ssa-loop-im.c: Include flags.h.
	(movement_possibility, stmt_cost, move_computations_stmt):
	Handle unswitchable conditions.
	* tree-ssa-loop-ivcanon.c (estimate_loop_size): Export.
	* tree-ssa-loop-ivopts.c (find_interesting_uses_cond): Handle
	if (0) and if (1).
	* tree-ssa-loop-manip.c (tree_ssa_loop_version): Return the newly
	created loop.
	* tree-ssa-loop.c (tree_ssa_loop_opt): Call tree_ssa_unswitch_loops.

2004-03-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	Merge from tree-ssa branch (lno-merge-20040321).

2004-03-20  Dorit Naishlos <dorit@il.ibm.com>

        * tree-vectorizer.c: (vect_init_vector): New function.
        (vect_get_vec_def_for_operand): Support loop invariant uses.
        (vect_is_simple_use): Likewise.
        (vect_mark_stmts_to_be_vectorized): Likewise.
        (vect_analyze_scalar_cycles): Redundant check removed.

        (vect_analyze_operations): Don't fail for vdefs that have uses
        outside the loop.

        (vect_stmt_relevant_p): A call to get_stmt_operands removed (already
        performed at new_loop_vec_info).
        (vect_mark_stmts_to_be_vectorized): Likewise.

        (need_imm_uses_for): New Function.
        (vectorize_loops): Add call to compute_immediate_uses and free_df.

2004-03-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-chrec.c (chrec_fold_multiply_ival_cst): Handle negative
	constants correctly.
	* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
	Enable use of scev.

2004-03-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	PR optimization/14658
	* loop-invariant.c (move_invariant_reg): Handle assignments
	with nontrivial lhs correctly.

2004-03-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* df.c (df_reg_def_chain_create, df_reg_use_chain_create): Do not clean
	up the old information here.
	(df_reg_def_chain_clean, df_reg_use_chain_clean): New.
	(df_analyse_subcfg): Call them.

2003-03-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-flow.h (loop_commit_inserts): Declare.
	* tree-ssa-loop-im.c (commit_inserts): Rename to...
	(loop_commit_inserts): ... this.
	* move_computations (move_computations, determine_lsm): Use
	loop_commit_inserts.
	* tree-ssa-loop-ivopts.c (AVG_LOOP_NITER): New macro.
	(struct iv): New field use_id.
	(struct version_info): New field preserve_biv.
	(alloc_iv, record_use, free_loop_data): Initialize new fields.
	(enum use_type): Add USE_OUTER.
	(dump_use, find_interesting_uses_op, add_derived_ivs_candidates,
	determine_use_iv_cost, rewrite_use): Handle USE_OUTER.
	(dump_cand, find_interesting_uses_stmt, add_candidate_1,
	determine_use_iv_cost_condition, determine_iv_cost, set_cost,
	create_new_iv, rewrite_use_nonlinear_expr): Handle final value
	replacement.
	(find_interesting_uses_outer, add_iv_outer_candidates,
	may_replace_final_value, determine_use_iv_cost_outer,
	remove_statement, rewrite_use_outer): New functions.
	(var_at_use): Replaced by ...
	(var_at_stmt): ... this.
	(get_computation_at): Split from ...
	(get_computation): ... here.
	(get_computation_cost_at): Split from ...
	(get_computation_cost): ... here.
	(iv_value): Split from ...
	(cand_value_at): ... here.
	(may_eliminate_iv, rewrite_use_compare): Reflect these changes.
	(tree_ssa_iv_optimize_loop): Call loop_commit_inserts.
	* tree-ssanames.c (make_ssa_name): Handle NULL argument.

2003-03-18  Devang Patel  <dpatel@apple.com>

	* tree-ssa-live.c (new_tree_live_info): Set num_blocks to 
	last_basic_block instead of n_basic_blocks.
	(calculate_live_on_entry): Use last_basic_block instead of
	n_basic_blocks.
	(calculate_live_on_exit): Same.

2004-03-17  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-cfg.c (thread_jumps): Don't thread jumps over loop headers.
	* tree-flow.h (rewrite_into_ssa): Declaration changed.
	(kill_redundant_phi_nodes, tree_loop_optimizer_init): Declare.
	* tree-optimize.c (execute_todo): Do not free vars_to_rename.
	(execute_one_pass): Do not allocate vars_to_rename.
	(tree_rest_of_compilation): Allocate vars_to_rename.
	* tree-scalar-evolution.c (number_of_iterations_in_loop): Handle
	loops exited when condition is true.
	(initialize_scalar_evolutions_analyzer): Use tree_loop_optimizer_init.
	* tree-ssa-chrec.c (how_far_to_positive): Handle chrec_top correctly.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Changed due to
	rewrite_into_ssa change.
	* tree-ssa-loop-im.c (move_computations, determine_lsm): Ditto.
	* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
	Use scev analyser.
	* tree-ssa-loop-manip.c (allocate_new_names): Update name memory
	tags.
	* tree-ssa-loop.c (tree_loop_optimizer_init): New.
	(tree_ssa_loop_opt, copy_loop_headers): Use it.
	* tree-ssa.c (rewrite_into_ssa): Use argument to decide whether
	to rename all variables.
	(rewrite_all_into_ssa): New.
	(pass_build_ssa): Use it.
	(kill_redundant_phi_nodes): Export.

2004-03-15  Andrew Pinski  <pinskia@physics.uc.edu>

	* tree-ssa-return.c (tree_ssa_return):
	Move check for NULL return value above check
	for a modify expr.

2004-03-13  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-scalar-evolution.c (gate_scev_iv_canon): Do not check rtl
	level flags here.
	* tree-ssa-loop-ivcanon.c (get_base_for): Verfify that the argument
	of the phi node is a constant.
	(loop_niter_by_eval, create_canonical_iv, try_unroll_loop_completely,
	canonicalize_loop_induction_variables): Handle loops with more than
	one exit.
	(find_loop_niter_by_eval): New.
	(canonicalize_induction_variables): Check rtl level flags here.

2004-03-12  Andrew Pinski  <pinskia@physics.uc.edu>

	* tree-ssa-return.c (tree_ssa_return):
	Only do it when we have a modify expr.

	* tree-ssa-return.c (tree_ssa_return):
	Add new comments and fix some old ones.

2004-03-12  Falk Hueffner  <falk@debian.org>

	* tree-pass.h: Declare pass_return.

2004-03-11  Andrew Pinski  <apinski@apple.com>

	PR optimization/14135
	* tree-ssa-return.c: New file.
	* Makefile.in (tree-ssa-return.o): Add.
	* tree-optimize.c (init_tree_optimization_passes): Add
	pass_return.
	* timevar.def (TV_TREE_RETURN): New.

2004-03-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivcanon.o: New file.
	* Makefile.in (tree-ssa-loop-ivcanon.o): Add.
	* flags.h (flag_unroll_loops): Declare.
	* loop-invariant.c (record_use): Fix.
	* params.def (PARAM_MAX_COMPLETELY_PEELED_INSNS): Increment.
	* timevar.def (TV_TREE_LOOP_IVCANON): New.
	* toplev.h (flag_unroll_loops): Declaration moved to flags.h.
	* tree-flow.h (enum tree_ann_type): Remove MISC_ANN.
	(struct tree_ann_common_d): Add aux field.
	(struct misc_ann_d): Removed.
	(struct stmt_ann_d): Removed aux field.
	(union tree_ann_d): Removed misc field.
	(canonicalize_induction_variables): Declare.
	* tree-optimize.c (init_tree_optimization_passes): Add
	pass_scev_iv_canon.
	* tree-pass.h (pass_scev_iv_canon): Declare.
	* tree-scalar-evolution.c (scev_iv_canon, gate_scev_iv_canon,
	pass_scev_iv_canon): New.
	(scev_done): Run cfg cleanup.
	* tree-ssa-loop-im.c (LIM_DATA, determine_invariantness_stmt,
	move_computations_stmt, schedule_sm): Use aux field in common
	part of annotations.
	* tree-ssa-loop-manip.c (allocate_new_names, rename_op,
	free_new_names): Use common aux field.
	(tree_duplicate_loop_to_header_edge): Fix memory leak.
	* tree-ssa.c (mark_def_sites): Fix.
	* tree-vectorizer.h (set_stmt_info, vinfo_for_stmt): Use aux field in
	common part of annotations.
	* gcc.dg/tree-ssa/ivcanon-1.c: New test.

2004-03-11  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* Makefile.in (lambda-mat.o, lambda-trans.o, lambda-code.o): Add TM_H
	dependency.

2004-03-09  Olga Golovonevsky <olga@il.ibm.com>
            Dorit Naishlos <dorit@il.ibm.com>

        * tree-vectorizer.c: (vect_transform_binop): Removed.
        (vect_transform_op): New function instead of vect_transform_binop,
        to support both unary and binary operations.
        (vect_is_supportable_binop): Removed.
        (vect_is_supportable_op): New function instead of
        vect_is_supportable_binop to support additional codes.
        * tree-vectorizer.h: (operation_type): New enum type declared.
        * config/rs6000/altivec.md: (andvv16qi3, andv8hi3, one_cmplv16qi2,
        one_cmplv8hi2, one_cmplv4si2, iorv16qi3, iorv8hi3,): New modelling.
        (*movv4si_internal): Relax condition.
        (*movv8hi_internal1): Likewise.
        (*movv16qi_internal1): Likewise.
        (*movv4sf_internal1): Likewise.

2004-03-09  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* Makefile.in (df.o): Remove FIBHEAP_H dependency.
	(invariant.o): Add df.h dependency.
	* df.c: Do not include fibheap.h.
	(df_bb_table_realloc, df_analyse_subcfg, free_reg_ref_chain,
	prune_to_subcfg, df_bb_modify, df_find_def, dataflow_set_a_op_b,
	dataflow_set_copy): New functions.
	(df_bitmaps_alloc, df_reg_def_chain_create, df_reg_use_chain_create,
	df_refs_update, df_reg_table_realloc, df_ref_create,
	df_bb_reg_def_chain_create, df_bb_reg_use_chain_create,
	df_bb_rd_local_compute, df_bb_ru_local_compute, df_bb_lr_local_compute,
	df_analyse_1, df_insn_modify): Support analysing only a part of the cfg.
	(df_rd_transfer_function, df_ru_transfer_function,
	df_lr_transfer_function): Type of bitmaps changed to void *.
	(hybrid_search_bitmap, hybrid_search_sbitmap): Merge into ...
	(hybrid_search): ... new function.
	(iterative_dataflow_bitmap, iterative_dataflow_sbitmap): Merge into ...
	(iterative_dataflow): ... new function. Avoid use of fibheaps for
	a worklist.  Do not process basic blocks unnecessarily.
	* df.h (struct ref): Add data field.
	(DF_REF_DATA): New macro.
	(df_analyse_subcfg, df_find_def): Declare.
	(transfer_function_sbitmap, transfer_function_bitmap): Replaced by ...
	(transfer_function): ... declare.
	(iterative_dataflow_sbitmap, iterative_dataflow_bitmap): Replaced by ...
	(iterative_dataflow): ... declare.
	(enum set_representation, struct dataflow): New.
	* loop-invariant.c: Include df.h.
	(struct loop_data): Remove modified_regs field.
	(struct def): Remove redundant fields.
	(struct use): Add insn field.
	(defs, adef, last_def, m_reg_info, reg_info): Removed.
	(struct reg): Removed.
	(record_def, note_insn_stores, find_defs_insn, find_defs_bb,
	get_current_def, record_dependencies_fer, record_dependencies,
	move_actual_defs): Removed.
	(find_defs, find_invariants_insn, create_new_invariant,
	find_invariants_bb, find_invariants_body, find_invariants,
	find_invariants_to_move, move_invariant_reg,
	move_invariants, move_single_loop_invariants,
	move_loop_invariants): Use df.c.
	(init_inv_motion_data): Do not initialize removed structures.
	(free_inv_motion_data, free_loop_data): Do not cleanup removed
	structures.
	(check_dependencies, find_invariant_insn, record_uses): New.
	(record_use): Record the insn.
	(get_inv_cost): Update comments.

2004-03-09  Andreas Jaeger  <aj@suse.de>

	* common.opt: Put tree-loop-linear at right place.

2004-03-09  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in: Add lambda-mat.o, lambda-code.o, and tree-loop-linear.o.
	* common.opt: Add -ftree-loop-linear.
	* flags.h: Add flag_tree_loop_linear.
	* opts.c: Handle tree-loop-linear option.
	* timevar.def (TV_TREE_LINEAR_TRANSFORM): New.
	* tree-flow.h (linear_transform_loops): New prototype.
	* tree-optimize.c (pass_scev_linear_transform): New.
	* tree-pass.h (pass_scev_linear_transform): Ditto.
	* tree-scalar-evolution.c (scev_linear_transform): Ditto.
	(gate_scev): Add check for flag_tree_loop_linear.
	(gate_scev_linear_transform): New.
	* lambda-code.c: New file.
	* lambda-mat.c: New file.
	* lambda-trans.c: New file.
	* lambda.h: New file.
	* tree-loop-linear.c: New file.

2004-03-09  Andrew Pinski  <pinskia@physics.uc.edu>

	* tree-ssa-phiopt.c (conditional_replacement):
	Initialize new_var to NULL to prevent the
	uninitialized warning.

	* tree-ssa-phiopt.c (conditional_replacement):
	Disable the making a new variable for different
	types.

	* tree-ssa-phiopt.c (conditional_replacement):
	Disable the use of non-gimple of invert_truthvalue.

2004-03-08  Andrew Pinski  <apinski@apple.com>

	* tree-ssa-phiopt.c (make_temp): New function.
	(tree_ssa_phiopt): Use absolute_replacement
	and value_replacement.
	(conditional_replacement): Handle the case
	the conditional is not a variable and
	the types do not match.
	Handle the case where invert_truthvalue
	would create non-gimple.
	(absolute_replacement): New function.
	(value_replacement): New function.

2004-03-08  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* tree-scalar-evolution.c (set_scalar_evolution,
	set_scalar_evolution_outer_value): Compute the loop number
	instead of passing it as a parameter.

2004-03-04  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-live.c (coalesce_tpa_members): Update the root
	variable of the partition.

2004-03-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (enum iv_position): Add IP_ORIGINAL.
	(struct iv_cand): Add incremented_at.
	(dump_cand, add_candidate_1, add_candidate, add_old_iv_candidates,
	var_at_use, get_computation, get_computation_cost,
	cand_value_at, determine_iv_cost, find_best_candidate,
	create_new_iv): Handle IP_ORIGINAL.
	(stmt_after_ip_original_pos, stmt_after_increment): New functions.
	(find_givs_in_stmt): Cast the values to the result type.
	(record_invariant): Do not record virtual operands.

2004-03-03  Daniel Berlin  <dberlin@dberlin.org>

	* tree-scalar-evolution.c: Use pointers to varray instead of
	varrays for functions that insert in the scev database.

2004-03-03  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* Makefile.in (OBJS-common): Add tree-elim-check.o.
	(tree-chrec.o): Add dependence on tree-pass.h.     
	(tree-elim-check.o): New rule.                
	* tree-elim-check.c: New file.
	* basic-block.h (edge_source, edge_destination): New inlined
	functions.
	* cfgloop.h (loop_nb_iterations): Added a comment on the use
	of this accessor.
	* common.opt (ftree-elim-checks): New flag.
	* flags.h (flag_tree_elim_checks): Declared here.
	* opts.c (decode_options): Set flag_tree_elim_checks to zero.
	(common_handle_option): Add case OPT_ftree_elim_checks.
	* timevar.def (TV_TREE_ELIM_CHECKS): Defined.          
	* toplev.c (flag_tree_elim_checks): Defined. 
	* tree-cfg.c (print_pred_bbs, print_succ_bbs, print_loop):
	Modify the dumping style.  Print nb_iterations.           
	* tree-chrec.c, tree-chrec.h, tree-scalar-evolution.c,
	tree-scalar-evolution.h, tree-data-ref.c: New version of the 
	scalar evolution algorithm.  Don't use a schedule for 
	analyzing the scalar variables.
	* tree-fold-const.c (tree_fold_bezout): Define.
	* tree-fold-const.h (tree_fold_int_round_div,
	tree_fold_int_trunc_mod, tree_fold_int_ceil_mod,
	tree_fold_int_floor_mod, tree_fold_int_round_mod): Removed, because
	not used for the moment.                                           
	(chrec_merge_types): New function.
	* tree-optimize.c (pass_scev_elim_checks): Register the pass.
	* tree-pass.h (pass_scev_elim_checks): Declare the pass.    
	* tree-pretty-print.c (dump_generic_node): Print
	PEELED_CHREC.  Remove PERIODIC_CHREC.
	* tree-vectorizer.c: Modify the use of
	analyze_scalar_evolution.
	* tree.def (POLYNOMIAL_CHREC, EXPONENTIAL_CHREC): Store the            
	evolution loop in a third leaf instead of in TREE_TYPE.
	TREE_TYPE is then used in storing the type of the chrec.
	(PERIODIC_CHREC): Removed since it is not used for the moment.
	(PEELED_CHREC): New node.
	* doc/invoke.texi (fdump-tree-scev, fdump-tree-ddall): Correct
	the name of these flags.
	(ftree-elim-checks, fdump-tree-elck): Document.

2004-03-02  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (number_of_iterations_cond, cand_value_at):
	Cast the constants.

2004-03-01  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* Makefile.in (tree-ssa-loop-ivopts.o): Add HASHTAB_H dependency.
	* tree-ssa-loop-ivopts.c: Include hashtab.h.
	(old_highest_ssa_version): Rename to version_info_size.
	(struct tree_niter_desc): Split from ...
	(struct loop_data): ... here.
	(relevant): New variable.
	(tree_ssa_iv_optimize_init, set_iv, find_induction_variables,
	record_invariant, find_interesting_uses, add_old_ivs_candidates,
	determine_set_costs, free_loop_data, tree_ssa_iv_optimize_finalize):
	Use bitmap of relevant ssa names.
	(var_at_use): New function.
	(get_computation): Use it.
	(multiply_by_cost): Cache all results.
	(mbc_entry_hash, mbc_entry_eq): New functions.
	(number_of_iterations_cond): Split from ...
	(determine_number_of_iterations): ... here.
	(cand_value_at, may_eliminate_iv): New functions.
	(determine_use_iv_cost_condition, rewrite_use_compare): Implement iv
	elimination.

2004-03-01  Devang Patel  <dpatel@apple.com>

	* tree-dg.c (dg_delete_graph): Reset varrays.
	(gate_ddg) : Check current loops.

2004-02-27  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-cfg.c (cleanup_control_expr_graph): Prevent probability from
	overflowing.
	* loop-invariant.c (get_current_def): Fix.
	* tree-ssa-loop-im.c (move_computations): Only call rewrite_into_ssa
	if vars_to_rename is nonempty.
	* tree-ssa-loop-ivopts.c (outermost_usage, ivs): Removed.
	(struct version_info): New.
	(version_info, max_inv_id): New variables.
	(struct cost_pair): Added depends_on field.
	(struct iv_use): Removed fields choices, n_choices, min_cost and
	min_cost_cand.
	(enum iv_position, dump_cand, ip_end_pos, add_candidate_1,
	determine_iv_cost, create_new_iv): IP_START position disabled.
	(find_optimal_iv_set_1, min_remaining_cost, undo_changes,
	execute_removal, add_forbidden_ivs, try_candidate): Removed.
	(dump_use): Do not dump removed fields.
	(ver_info, name_info, update_outermost_usage, record_invariant,
	find_invariants_stmt, find_depends, try_improve_iv_set): New functions.
	(find_outermost_usage): Handle uses in phis.
	(divide): Update comment.
	(tree_ssa_iv_optimize_init): Initialize version_info instead of ivs
	and outermost_usage.
	(set_iv, get_iv, find_induction_variables, add_old_ivs_candidates): 
	Use version_info instead of ivs.
	(record_use): Do not initialize removed fields.
	(find_interesting_uses_op): Call record_use.
	(find_interesting_uses_stmt): Call find_invariants_stmt.
	(find_interesting_uses): Scan just the current loop.
	(set_use_iv_cost): Initialize depends_on field.
	(get_use_iv_cost): Return depends_on field.
	(get_computation): Handle special cases.
	(force_var_cost, split_address_cost, ptr_difference_cost,
	difference_cost, get_computation_cost, determine_use_iv_cost_generic,
	determine_use_iv_cost_address, determine_use_iv_cost_condition):
	Determine depends_on bitmap.
	(determine_use_iv_costs): Dump depends_on bitmap.
	(init_set_costs): Use information about invariants.
	(find_best_candidate, set_cost, get_initial_solution,
	find_optimal_iv_set): Take depends_on into account.
	(rewrite_uses): Use use->selected to select candidate.
	(free_loop_data, tree_ssa_iv_optimize_finalize): Cleanup version_info
	instead of ivs.  Free depends_on bitmaps.
	(tree_ssa_iv_optimize_loop): Do not pass iv_set to rewrite_uses.

2004-02-27  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* cfgloopmanip.c (loopify): Fix comment.
	* loop-iv.c (lowpart_byte, lowpart_subreg_p): Removed.
	(lowpart_subreg, simple_reg_p, iv_get_reaching_def, get_biv_step_1,
	iv_analyse_op, iv_analyse, get_iv_value): Use standard subreg
	manipulation functions.
	(simplify_using_assignment): Handle hardregs correctly.
	(canon_condition): Use swap_commutative_operands_p.
	(iv_number_of_iterations): Avoid overflow.
	* loop-unroll.c (unroll_loop_runtime_iterations): Pass additional
	argument to compare_and_jump_seq.
	* loop-unswitch.c (unswitch_loop, may_unswitch_on,
	unswitch_single_loop, compare_and_jump_seq): Handle comparisons of
	ccmode registers.
	* rtl.h (compare_and_jump_seq): Declaration changed.

2004-02-25  Dorit Naishlos <dorit@il.ibm.com>

        * tree-vectorizer.h (assignment_vec_info_type): New enum value for
        stmt_vec_info_type.
        * tree-vectorizer.c (vect_transform_assignment): New function.
        Support vectorization of assignment stmts.
        (vect_transform_stmt): Call vect_transform_assignment.
        (vect_is_supportable_assignment): New function.
        (vect_analyze_operations): Call vect_is_supportable_assignment.

        (vect_create_index_for_array_ref): Replace unsigned_intSI_type_node
        with size_type_node.
        (vect_transform_loop_bound): Likewise.

        (get_vectype_for_scalar_type): Avoid division by 0.

        (vect_analyze_operations): Apply check for no-out-of-loop-uses also
        to stmts that are marked irrelevant.

2004-02-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-flow.h (for_each_index): Declare.
	* tree-ssa-loop-im.c (struct lim_aux_data): Add always_executed_in
	and sm_done fields.
	(struct use): New.
	(max_uid): New static variable.
	(outermost_invariant_loop, commit_inserts, may_move_till,
	force_move_till, record_use, free_uses, single_reachable_address,
	rewrite_uses, schedule_sm, determine_lsm_reg,
	loop_suitable_for_sm, determine_lsm_loop, determine_lsm): New functions.
	(add_dependency): Use outermost_invariant_loop.
	(set_level): Add sanity checking.
	(determine_invariantness_stmt): Set always_executed_in field.
	(move_computations_stmt): Modified.
	(move_computations): Use commit_inserts.
	(fill_always_executed_in): Take possibility of an infinite loop into
	account.
	(tree_ssa_lim): Call determine_lsm.
	* tree-ssa-loop-ivopts.c (for_each_index): Export.
	(rewrite_use_address): Improve handling of memory tags.

	* tree-ssa-loop.c (do_while_loop_p): Readd.
	(copy_loop_headers): Readd check for do_while_loop_p.
	* tree-ssa-operands.c (add_stmt_operand): Modified.

2004-02-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	Merge from tree-ssa branch (lno-merge-20040221).

2004-02-20  Devang Patel  <dpatel@apple.com>

	* tree-vectorizer.c (vect_analyze_data_ref_dependence): Use
        ddg_direction_between_stmts ().

2004-02-20  Devang Patel  <dpatel@apple.com>

	* tree-data-ref.h (data_dependence_direction): Add new member 
	dir_independent.
        * tree-dg.h (tree-data-ref.h): Include.
        (ddg_direction_between_stmts, ddg_distance_between_stmts): New decls.
        * tree-dg.c (find_ddr_between_stmts, ddg_direction_between_stmts,
        ddg_distance_between_stmts): New functions.

2004-02-19  Devang Patel  <dpatel@apple.com>

	* tree-dg.c (dg_delete_edges, dg_delete_node, dg_delete_graph,
	dg_delete_edge, gate_delete_ddg): New functions.
	(pass_delete_ddg): New.
	* tree-dg.h (dg_delete_graph, dg_delete_edge): New extern decls.
	* tree-optimize.c (init_tree_optimization_passes): Add new pass
	pass_delete_ddg.
	* tree-pass.h (pass_delete_ddg): New extern.

2004-02-19  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-flow.h (create_iv): Declare.
	* tree-ssa-loop-ivopts.c (create_iv): New function.
	(create_new_iv): Use create_iv.

2004-02-19  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop.c (do_while_loop_p): New function.
	(copy_loop_headers): Do not peel do-while loops.

2004-02-19  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* loop-invariant.c: New file.
	* Makefile.in (loop-invariant.o): New.
	* cfgloop.h (init_set_costs, global_cost_for_size,
	move_loop_invariants): Declare.
	* toplev.c (rest_of_handle_loop2): Call move_loop_invariants.
	(lang_dependent_init): Call init_set_costs.
	* tree-ssa-loop-ivopts.c (avail_regs, res_regs, small_cost, pres_cost,
	spill_cost): Made static.
	(global_cost_for_size): Export.
	(ivopts_global_cost_for_size, init_set_costs): New functions.
	(determine_set_costs): Do not initialize set cost constants.
	Use ivopts_global_cost_for_size.
	(try_candidate, find_optimal_iv_set_1, set_cost): Use
	ivopts_global_cost_for_size.

	* cfgloop.c (fill_sons_in_loop): Fix typo in comment.

2004-02-17  Devang Patel  <dpatel@apple.com>

	* tree-vectorize.c (vect_create_data_ref): Set TREE_ADDRESSABLE bit.
	(vectorize_loops): Reset loop->aux.

2004-02-16  Devang Patel  <dpatel@apple.com>

        * Makefile.in (TREE_FLOW_H): Add tree-dg.h
        (OBJS-common): Add tree-dg.o
        (gtype-desc.o): Depend on tree-dg.h
        (tree-dg.o): New rule.
        (GTFILES): Add tree-data-ref.h, tree-data-ref.h 
        * common.opt (ftree-ddg): Add new option.
        * flags.h (flag_ddg): New extern.
        * gengtype.c (open_base_files): Add tree-dg.h and tree-data-ref.h in 
        the list.
        * opts.c (decode_option): Set flag_ddg to zero.
        (common_handle_option): Handle OPT_ftree_ddg.
        * timevar.def (TV_DEP_GRAPH): New.
        * toplev.c (flag_ddg): New flag.
        (lang_independent_options): Add entry for -ftree-ddg.
        * tree-data-ref.c (compute_all_dependences): Make externally visible.
        * tree-data-ref.h (data_reference, subscript, data_dependence_relation)
        Add GTY markers.
        (compute_all_dependences): Make externally visible.
        * tree-dg.c: New file.
        * tree-dg.h: New file.
        * tree-flow-inline.h (dg_node_for_stmt): New function.
        * tree-flow.h (tree-dg.h): Include.
        (stmt_ann_d): New member, dg_node.
        * tree-optimize.c (init_tree_optimization_passes): Add pass_ddg.
        * tree-pass.h (PROP_scev): Define.
        (tree_opt_pass pass_ddg): Extern decl.
        * tree-scalar-evolution.c (pass_scev_anal): Provide PROP_scev property.
        * varray.c (element[NUM_VARRAY_DATA]): Add new member for dependence
        graph.
        * varray.h (varray_data_enum): New member VARRAY_DATA_DG.
        (varray_data_tag): New member dg.
        (VARRAY_DG_INIT): New #define.
        (VARRAY_DG): New #define.
        (VARRAY_PUSH_DG): New #define.

2004-02-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-optimize.c (init_tree_optimization_passes): Move ch after
	the first dominator optimization pass.
	* tree-ssa-loop.c (should_duplicate_loop_header_p,
	copy_loop_headers): Work over ssa.
	(pass_ch): Require and update ssa form.
	(mark_defs_for_rewrite, duplicate_blocks): New.

2004-02-10  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (for_each_index, prepare_decl_rtl,
	peel_address): Handle RESULT_DECL.

2004-02-10  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* loop-doloop.c (doloop_optimize): Use get_simple_loop_desc.
	* loop-init.c (loop_optimizer_finalize): Free the simple loop
	descriptions.
	* loop-unroll.c (unroll_and_peel_loops): Do not free the simple loop
	descriptions.
	(decide_peel_once_rolling, decide_peel_completely,
	decide_unroll_stupid): Test assumptions.
	decide_unroll_constant_iterations, decide_unroll_runtime_iterations,
	decide_peel_simple, peel_loop_simple, unroll_loop_stupid): Update
	number of iterations info.
	(unroll_loop_constant_iterations, unroll_loop_runtime_iterations,
	(loop_exit_at_end_p): Use get_simple_loop_desc.

2004-02-08  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* cfgloop.h (struct niter_desc): Add first_special, extend,
	extend_mode, delta and mult fields.
	(get_iv_value): Declare.
	* expr.c (force_operand): Handle subregs of expressions.
	* loop-doloop.c (doloop_valid_p): Test desc->infinite properly.
	* loop-iv.c (dump_iv_info): Dump new fields.
	(lowpart_byte, lowpart_subreg_p, lowpart_subreg,
	iv_constant, iv_subreg, iv_extend, iv_neg, iv_add, iv_mult,
	get_biv_step_1, get_biv_step, shorten_into_mode,
	canonicalize_iv_subregs): New functions.
	(simple_reg_p, simple_set_p, iv_get_reaching_def, iv_analyse_biv,
	iv_analyse_op, iv_analyse, iv_number_of_iterations): Handle subregs.
	* loop-unswitch.c (may_unswitch_on): Handle subregs.

2004-02-04  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* Makefile.in (tree-ssa-loop-ivopts.o): Add RECOG_H and insn-config.h
	dependency.
	* loop-iv.c (iv_analysis_loop_init): Ensure we only care about
	increments that are done just once each iteration.
	* timevar.def (TV_TREE_LOOP_IVOPTS, TV_TREE_CH): New.
	* tree-ssa-loop-ivopts.c: Include insn-config.h and recog.h.
	(INFTY): Increase.
	(struct iv_use): Add choices, n_choices, min_cost_cand and selected
	fields.  Rename field best_cost to min_cost.
	(CONSIDER_ALL_CANDIDATES_BOUND): Decrease.
	(dump_use): Dump new fields.
	(dump_uses, cst_and_fits_in_hwi, int_cst_value, build_int_cst,
	divide, strip_offset, add_cost, multiply_by_cost, get_address_cost,
	force_var_cost, peel_address, ptr_difference_const,
	split_address_cost, ptr_difference_cost, difference_cost,
	get_computation_cost): New functions.
	(find_induction_variables): Formating changes.
	(record_use): Initialize new fields.
	(add_old_ivs_candidates): Do not add invariants.
	(set_use_iv_cost): Set min_cost.
	(get_use_iv_cost): Fix.
	(get_computation): Use less memory.
	(determine_use_iv_cost_generic, determine_use_iv_cost_address,
	determine_use_iv_cost_condition, determine_iv_cost): Use
	new cost estimation functions.
	(compute_iv_set_cost): Removed.
	(struct undo_record): New.
	(use_with_min_choices, min_remaining_cost, undo_changes,
	execute_removal, add_forbidden_ivs, try_candidate, set_cost,
	get_initial_solution): New functions.
	(find_optimal_iv_set_1, find_optimal_iv_set): Made more effective.
	(create_new_ivs, rewrite_use_nonlinear_expr, rewrite_use_address):
	Unshare created expressions.
	(free_loop_data): Free new structures.
	(tree_ssa_iv_optimize_loop): Remove garbage collection.
	(tree_ssa_iv_optimize): Use TV_TREE_LOOP_IVOPTS timevar.
	* tree-ssa-loop.c (pass_ch): Use TV_TREE_CH timevar.

2004-02-02  Steven Bosscher  <stevenb@suse.de>

	* common.opt: Re-order some options in ASCII collating order.

2004-01-30  Devang Patel  <dpatel@apple.com>

	* cfgloopmanip.c (loopify): Always redirect switch_bb's BRANCH_EDGE,
	however redirect FALLTHRU_EDGE only if asked.
	* tree-ssa-loop-manip.c (tree_ssa_loop_version): Update FALLTHRU_EDGE
	pending stmts.

2004-01-29  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (find_optimal_iv_set_1, compute_iv_set_cost):
	Fix memory leak, speed up.
	(tree_ssa_iv_optimize_finalize): Move reseting of DECL_RTL...
	(free_loop_data): ... here.

2004-01-29  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* basic-block.h (FOR_BB_INSNS, FOR_BB_INSNS_REVERSE): New macros.
	* cfgloop.c (num_loop_branches): New function.
	* cfgloop.h (struct loop_desc): Add field strange.
	(struct loop): Remove fields simple, desc, has_desc.
	(num_loop_branches, get_simple_loop_desc, free_simple_loop_desc):
	Declare.
	(simple_loop_desc): New inline function.
	* cfgloopanal.c (count_loop_iterations): Set field strange.
	(simple_loop_exit_p): Initialize postincr properly.
	* loop-iv.c (assign_luids, mark_sets, simplify_using_initial_values):
	Use FOR_BB_INSNS/FOR_BB_INSNS_REVERSE.
	(iv_number_of_iterations): Restrict the number of iterations to the
	actual mode.
	(find_simple_exit): Check results with the old simple loop analyser.
	(get_simple_loop_desc, free_simple_loop_desc): New functions.
	* loop-unroll.c (loop_exit_at_end_p): New function.
	(unroll_and_peel_loops, peel_loops_completely,
	decide_unrolling_and_peeling, decide_peel_once_rolling,
	decide_peel_completely, peel_loop_completely,
	decide_unroll_constant_iterations, unroll_loop_constant_iterations,
	decide_unroll_runtime_iterations, unroll_loop_runtime_iterations,
	decide_peel_simple, decide_unroll_stupid): Use new iv analysis.
	* predict.c (predict_loops): Use new iv analysis.

	* tree-ssa-loop.c (copy_loop_headers): Predict entry edge from
	copied loop header to be taken.

	* tree-cfg.c (tree_find_edge_insert_loc,
	bsi_insert_on_edge_immediate): Return the newly created block.
	(bsi_commit_edge_inserts_1): Add parameter to
	tree_find_edge_insert_loc call.
	* tree-flow.h (bsi_insert_on_edge_immediate): Declaration changed.
	* tree-ssa-loop-ivopts.c (create_new_iv): Update loop for newly
	created block.

	* cfg.c (unlink_block): Clean prev_bb and next_bb fields.

2004-01-29  Devang Patel  <dpatel@apple.com>

	* cfglayout.h (loopify): Add new bool parameter.
	* cfgloopmanip.c (loopify): Support new bool argument.
	* loop-unswitch.c (unswitch_loop): Supply additional argument 'true'
	to loopify.
	* tree-cfg.c (tree_block_label): Make externally visible.
	* tree-flow.h (tree_block_label, test_loop_versioning, tree_ssa_loop_version): New
	extern decls.
	* tree-ssa-loop-manip.c (lv_adjust_loop_entry_edge, lv_udate_pending_stmts,
	lv_adjust_loop_header_phi, tree_ssa_loop_version): New functions.
	* tree-ssa-loop.c (tree_ssa_loop_opt): Test loop versioning.
	
2004-01-29  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-scalar-evolution.c (scev_analyze_inner_loop_phi): Add ;.

2004-01-29  Sebastian Pop  <sebastian.pop@ensmp.fr>

	* Makefile.in (tree-ssa-dom.o): Depends on cfgloop.h.
	* tree-flow-inline.h (loop_of_stmt): New function.                 
	* tree-ssa-dom.c: Include cfgloop.h.
	(tree_ssa_dominator_optimize): Detect and finalize the natural
	loops structure.
	(simplify_rhs_and_lookup_avail_expr): Verify that the folded     
	operations belong to the same loop.

	* cfgloop.h (loop): Rewrite comments for the nb_iterations field.
	* tree-data-ref.c (analyze_all_data_dependences): Increase the size
	of the dependence graph when computing all the dependences.              
	* tree-optimize.c (init_tree_optimization_passes): Move the
	pass_scev after the pass_pre.
	* tree-scalar-evolution.h: Update comments.
	* tree-scalar-evolution.c (symbolically_analyze,
	scev_follow_ssa_edge_same_loop, scev_follow_ssa_edge_inner_loop,
	loop_is_strictly_included_in, scev_analyze_inner_loop_phi,
	draw_tree_cfg): New functions.
	(compute_value_on_exit_of_loop): Removed.
	(analyze_evolution): Mark phi nodes instead of looking into
	the already_visited array.
	(analyze_evolution_in_loop): Use scev_follow_ssa_edge_same_loop,
	scev_follow_ssa_edge_inner_loop.
	(scev_analyze_modify_expr): Refine the wrap-around case.
	(scev_follow_ssa_edge): Handle edges to the current and inner loops
	separately calling scev_follow_ssa_edge_same_loop or
	scev_follow_ssa_edge_inner_loop.
	(merge_branches_of_condition_phi_node): Restructure.
	(set_nb_iterations_in_loop): Add one to the number of iterations.
	When the loop copy headers is on, we always exit the loop after
	having executed once its body.
	(record_dependences_for_opnd): Do not record dependences on variables
	that are not in the current loop.
	(pass_scev_depend): Rename the pass from alldd to ddall.
	* tree-ssa-loop.c (gate_ch): New function.
	(pass_ch): Use gate_ch.
	* doc/invoke.texi (-ftree-ch, -fdump-tree-ch): Document flags.
	(fdump-tree-scev, fdump-tree-ddall): Update names, and comments.

	* common.opt (ftree-ch): Document.
	* flags.h (flag_tree_ch): Declare.
	* opts.c (flag_tree_ch): Set it on by default.
	(flag_scalar_evolutions, flag_all_data_deps): Turn off by default.
	(OPT_ftree_ch): Handle this case.
	* toplev.c (lang_independent_options): Register flag_tree_ch.

2004-01-28  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* cfghooks.c (split_block): Update probabilities.

	* cfgloopmanip.c (loopify): Always redirect branch edge to the new
	loop.
	* loop-iv.c (canon_condition, simplify_using_condition): Export.
	(check_simple_exit): Do not allow cc mode registers.
	* loop-unroll.c (unroll_loop_runtime_iterations): Use
	compare_and_jump_seq.
	* loop-unswitch.c (may_unswitch_on_p): Renamed to may_unswitch_on,
	returns the condition, use iv_analyse.
	(compare_and_jump_seq): New function.
	(unswitch_loops): Call iv_analysis_done.
	(unswitch_single_loop, unswitch_loop): Handle nontrivial invariants.
	* rtl.h (compare_and_jump_seq, canon_condition,
	simplify_using_condition): Declare.

2004-01-28  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* loop-iv.c: New.
	* loop-doloop.c: New.
	* Makefile.in (loop-doloop.o, loop-iv.o): Add.
	* alias.c (init_alias_analysis): Test flag_unroll_loops instead of
	flag_old_unroll_loops.
	* cfgloop.h (struct rtx_iv, struct niter_desc): New.
	(get_loop_level, iv_analysis_loop_init, iv_get_reaching_def,
	iv_analyse, find_simple_exit, iv_number_of_iterations,
	iv_analysis_done, doloop_optimize_loops): Declare.
	* cfgloopanal.c (get_loop_level): New.
	* common.opt (floop-optimize2): New.
	(fold-unroll-loops, fold-unroll-all-loops): Remove.
	* doloop.c (doloop_condition_get): Export.
	* flags.h (flag_old_unroll_loops, flag_old_unroll_all_loops):
	Declaration removed.
	* loop-unswitch.c (reversed_condition): Export.
	* loop.c (loop_invariant_p): Use flag_unroll_loops instead
	of flag_old_unroll_loops.
	* opts.c (common_handle_option): Handle -floop-optimize2,
	do not handle -fold-unroll-loops and -fold-unroll-all-loops.
	* params.def (PARAM_MAX_DOLOOP_INSNS): New.
	* rtl.h (get_mode_bounds, doloop_condition_get,
	reversed_condition): Declare.
	* stor-layout.c (get_mode_bounds): New function.
	* toplev.c (flag_old_unroll_loops, flag_old_unroll_all_loops):
	Remove.
	(flag_loop_optimize2): New.
	(rest_of_handle_loop_optimize): Use flag_unroll_loops instead
	of flag_old_unroll_loops.
	(rest_of_handle_loop2): Call doloop_optimize_loops.
	(rest_of_compilation): Use flag_loop_optimize2.
	(process_options): Remove flag_old_unroll_loops handling, add
	flag_loop_optimize2 handling.
	* toplev.h (flag_loop_optimize2): Declare.
	* unroll.c (unroll_loop): Use flag_unroll_all_loops instead of
	flag_old_unroll_all_loops.

2004-01-26  Dorit Naishlos <dorit@il.ibm.com>

	* Makefile.in: (tree-vectorizer.o): Remove dependency on real.h.
	* tree-vectorizer.c: (real.h): Remove included file.
        (vect_get_vec_def_for_operand): No need to explicitly use build_int_2
        and build_real.

        (vect_transform_loop_bound): Create loop IV update at loop exit
        block, following changes in loop control.

        (vectorize_loops): Remove debug printout.

        * config/rs6000/altivec.md: (*movv4si_internal): More complex 
        condition.
        (*movv8hi_internal1): Likewise.
        (*movv16qi_internal1): Likewise.
        (*movv4sf_internal1): Likewise.

2004-01-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c (determine_set_costs): Do not use
	GENERAL_REGNO_P.

2004-01-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-ivopts.c: New file.
	* Makefile.in (tree-ssa-loop-ivopts.o): Add.
	* expr.c (expand_expr_1): Handle expand_expr_1.
	* fold-const.c (invert_tree_comparison, invert_tree_comparison):
	Export.
	* tree-cfg.c (stmt_bsi): New function.
	* tree-flow.h (stmt_bsi, tree_ssa_dce_no_cfg_changes,
	tree_ssa_iv_optimize): Declare.
	* tree-simple.c (get_base_symbol): Handle INDIRECT_REF.
	* tree-ssa-dce.c (tree_ssa_dce_no_cfg_changes): Split from ...
	(tree_ssa_dce): ... here.
	* tree-ssa-loop.c (tree_ssa_loop_opt): Call tree_ssa_iv_optimize.
	* tree-ssanames.c (make_ssa_name): Allow creating ssa name without
	statement.
	* tree.h (invert_tree_comparison, swap_tree_comparison): Declare.

2004-01-25  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* doloop.c (doloop_optimize): Test for loop->top instead of
	loop->scan_start.

2004-01-22  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-alias-common.c (HAVE_BANSHEE): Do not define it.
	(create_alias_vars): Do not test HAVE_BANSHEE value.

2004-01-22  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-ssa-loop-manip.c: New file.
	* Makefile.in (tree-ssa-loop-manip.o): Add.
	* basic-block.h (struct reorder_block_def): New field copy_number.
	* cfghooks.c (split_block, make_forwarder_block): Update irreducible
	loop information.
	* cfgloopmanip.c (duplicate_loop_to_header_edge): Set copy_number.
	* tree-cfg.c (tree_duplicate_bb): Duplicate also virtual operands.
	* tree-flow.h (enum tree_ann_type): Add MISC_ANN.
	(struct misc_ann_d): New.
	(union tree_ann_d): Add misc field.
	(test_unrolling_and_peeling, tree_duplicate_loop_to_header_edge):
	Declare.
	* tree-ssa-loop.c (tree_ssa_loop_opt): Call
	test_unrolling_and_peeling.
	* tree-ssa-operands.c (copy_virtual_operands): New.
	* tree-ssa-operands.h (copy_virtual_operands): Declare.

	* dominance.c: Fix comment.

	* cfgloopanal.c (mark_irreducible_loops): Rewriten.
	(struct edge, struct vertex, struct graph): New.
	(dump_graph, new_graph, add_edge, dfs, check_irred, for_each_edge,
	free_graph): New functions.

2004-01-21  Sebastian Pop  <s.pop@laposte.net>

	* tree-scalar-evolution.c (pass_scev): Don't use a name.
	(pass_scev_anal): Named this pass "scev".

2004-01-21  Dorit Naishlos <dorit@il.ibm.com>

	* Makefile.in: (tree-vectorizer.o): Add dependency on real.h.
        * tree-vectorizer.c: (vect_is_simple_use): Allow constants.
        (real.h): Included to support constants vectorization.
        (vect_get_vec_def_for_operand): New function.
        (vect_transform_binop): Use above new function.
        (vect_transform_store): Likewise.
        (vect_transform_load): Likewise.

        (vect_get_new_vect_var): Allow more flexibility in naming scheme.
        (vect_create_index_for_array_ref): Call vect_get_new_vect_var with a
        name prefix instead of a variable.
        (vect_create_data_ref): Likewise.
        (vect_create_destination_var): Likewise.

        (vect_analyze_data_refs): Temporarily restrict vectorizable data refs
	to ARRYA_RES which base is a VAR_DECL.
        (vect_create_data_ref): Support only VAR_DECL array base. Mark all 
        vops for renaming. 

        (vect_get_array_first_index): New function.
        (vect_create_index_for_array_ref): Consider array_first_index.
        (vect_analyze_data_ref_access): Likewise.

        (vect_get_loop_niters): Use number_of_iterations_in_loop.
        (vect_analyze_loop_form): Don't attempt to vectorize if 
        number_of_iterations == 0.

        (vect_analyze_operations): Fix vectype analysis.

        (vect_create_index_for_array_ref): Fix code insertion in loop prolog.
        (vect_transform_loop_bound): Likewise.

2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>,
	    Devang Patel <dpatel@apple.com>

	* basic-block.h (struct reorder_block_def): Moved from cfglayout.h.
	(alloc_rbi_pool, initialize_bb_rbi, free_rbi_pool): Declare.
	* bb-reorder.c (copy_bb, copy_bb_p): Use duplicate_block hooks.
	* loop-unswitch.c (unswitch_loop): Ditto.
	* tracer.c (tail_duplicate): Ditto.
	* tree-ssa-loop.c (copy_loop_headers): Ditto.
	* cfg.c (rbi_pool): New.
	(alloc_rbi_pool, free_rbi_pool, initialize_bb_rbi): New functions.
	* cfghooks.c (can_duplicate_block_p, duplicate_block): New functions.
	* cfghooks.h (struct cfg_hooks): Add can_duplicate_block_p and
	duplicate_block hooks.
	(can_duplicate_block_p, duplicate_block): Declare.
	* cfglayout.c (cfg_layout_pool): Removed.
	(cfg_layout_initialize_rbi): Removed.
	(fixup_reorder_chain): Use initialize_bb_rbi.
	(cfg_layout_can_duplicate_bb_p, cfg_layout_duplicate_bb):
	Ir-independent parts moved to cfghooks.c.
	(cfg_layout_initialize): Use alloc_rbi_pool and initialize_bb_rbi.
	(cfg_layout_finalize): Use free_rbi_pool.
	(can_copy_bbs_p): Use can_duplicate_block_p.
	(copy_bbs): Use duplicate_block.
	* cfglayout.h (struct reorder_block_def): Moved to basic-block.h
	(cfg_layout_can_duplicate_bb_p, cfg_layout_duplicate_bb,
	cfg_layout_initialize_rbi): Declaration removed.
	* cfgrtl.c (cfg_layout_create_basic_block): Use initialize_bb_rbi.
	(cfg_layout_rtl_cfg_hooks): Add cfg_layout_can_duplicate_bb_p and
	cfg_layout_duplicate_bb.
	* tree-cfg.c (build_tree_cfg): Call alloc_rbi_pool.
	(create_bb): Call initialize_bb_rbi.
	(delete_tree_cfg): Call free_rbi_pool.
	(tree_duplicate_bb): Ir independent parts moved to cfghooks.c.
	(tree_cfg_hooks): Add tree_can_duplicate_bb_p and tree_duplicate_bb.
	* tree-flow.h (tree_duplicate_bb): Declaration removed.

2004-01-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* tree-alias-common.c (create_alias_vars): Don't use
	andersen_alias_ops when we don't HAVE_BANSHEE.

	* tree-ssa-loop.c (pass_ch): Remove TODO_verify_ssa.

2004-01-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	Merge from tree-ssa branch (lno-merge-20040120).

2004-01-18  Dorit Naishlos <dorit@il.ibm.com>

        * tree-scalar-evolution.c: (get_loop_exit_condition): Exposed to
        external usage.
        * tree-scalar-evolution.h: (get_loop_exit_condition): Exposed to
        external usage.
        * tree-vectorizer.c: (vect_is_simple_iv_evolution): Additional argument
        to control how strict this function would be.
        (vect_create_index_for_array_ref): Invoke vect_is_simple_iv_evolution
        with "strict" set to true.
        (vect_transform_loop_bound): More general loop bound transformation
        scheme, independent of the loop exit condition form.
        (vect_analyze_scalar_cycles): Invoke vect_is_simple_iv_evolution with
        "strict" set to false.
        (vect_get_loop_niters): Use monev utilities/precomputed info -
        loop->nb_iterations and get_loop_exit_condition.

2004-01-17  Dorit Naishlos  <dorit@il.ibm.com>

	* tree-vectorizer.c: (vect_get_name_for_new_var): Removed.
        (vect_get_new_vect_var): New function.  Replaces above function.
        (vect_create_index_for_array_ref): Call vect_get_new_vect_var
        instead of vect_get_name_for_new_var.
        (vect_create_data_ref): Likewise.
        (vect_create_destination_var): Likewise.
        * tree-vectorizer.h: (vect_var_kind): New enum type.

2004-01-15  Sebastian Pop  <s.pop@laposte.net>

	* tree-chrec.c (remove_initial_condition,
	add_expr_to_loop_evolution_1, add_expr_to_loop_evolution_2): New functions.
	(add_expr_to_loop_evolution): Use these functions.                        
	(build_polynomial_evolution_in_loop,              
	build_exponential_evolution_in_loop): Move from here...
	* tree-chrec.h (build_polynomial_evolution_in_loop,
	build_exponential_evolution_in_loop): Remove declarations.
	* tree-scalar-evolution.c (build_polynomial_evolution_in_loop,
	build_exponential_evolution_in_loop): ... to here.  Declare
	these functions static.
	(select_outer_and_current_evolutions): New function.
	(matched_an_increment, scev_analyze_modify_expr,    
	compute_overall_effect_of_inner_loop,           
	analyze_scalar_evolution): Use this function.
	(add_to_evolution, multiply_evolution): Construct canonical
	chains of recurrences.

2004-01-14  Dorit Naishlos <dorit@il.ibm.com>
            Sebastian Pop  <s.pop@laposte.net>

        * tree-vectorizer.c: (vect_is_simple_iv_evolution): Correctly use
        APIs of the new monev analyzer. Additional argument (loop_num).
        (vect_transform_loop_bound): Additional argument to
        vect_is_simple_iv_evolution.
        (vect_analyze_scalar_cycles): Likewise.
        (vect_analyze_data_ref_access): Likewise.
        (vect_get_loop_niters): Likewise.

2004-01-14  Dorit Naishlos <dorit@il.ibm.com>

        * tree-optimize.c: (optimize_function_tree): Cleanup.

        * tree-vectorizer.h: (DBG_VECT, DBG_VECT2): Removed.
        (vec_array_base_name_differ_p): Removed.
        (vec_analyze_array): Removed.
        (struct _stmt_vec_info): New field: loop.
        (STMT_VINFO_LOOP): New access function to above new field.
        (new_stmt_vec_info): Additional argument.

        * tree-vectorizer.c: (vect_is_simple_use): New function.
        (vect_is_supportable_binop): Added call to vect_is_simple_use().
        (vect_is_supportable_store): Added call to vect_is_simple_use().
        (vect_is_supportable_load): Added call to vect_is_simple_use().

        (vect_create_index_for_array_ref): Correct handling of accesses with
        an offset (e.g, a[i+OFF]).
        (vect_create_data_ref): Pass STMT as an argument to
        vect_create_index_for_array_ref, instead of an operand.
        (vect_transform_store): Handle accesses with an offset.
        (vect_transform_load): Handle accesses with an offset.

        (vect_create_data_ref): Set the mem_tag of the pointer used for the
        vector data-access to reflect correct may-alias info.

        (get_address_calculation_operands): Removed.
        (exist_non_indexing_operands_for_use_p): New function, in place of
        get_address_calculation_operands() to correctly handle induction (for
        now this means to detect and not attempt to vectorize computations
        like a[i]=i).
        (vect_analyze_scalar_cycles): call above new function instead of
        get_address_calculation_operands().
        (vect_mark_stmts_to_be_vectorized): Likewise.

        (get_vectype_for_scalar_type): Added test of VECTOR_MODE_SUPPORTED_P.

        (new_stmt_vec_info): Takes also LOOP as an argument and initializes
        new field STMT_VINFO_LOOP.
        (new_loop_vec_info): Pass additional argument to new_stmt_vec_info.

        (vect_stmt_relevant_p): Use flow_bb_inside_loop_p instead of comparing
        loop->depth's.
        (vect_analyze_operations): Likewise.

        (vect_align_data_ref): Removed stderr debug printouts, some of which
        replaced with code dumping dependending on TDF_DETAILS to dump_file.
        (vect_create_index_for_array_ref): Likewise.
        (vect_create_destination_var): Likewise.
        (vect_create_data_ref): Likewise.
        (vect_transform_binop): Likewise.
        (vect_transform_store): Likewise.
        (vect_transform_load): Likewise.
        (vect_transform_stmt): Likewise.
        (vect_transform_loop_bound): Likewise.
        (vect_transform_loop): Likewise.
        (vect_analyze_operations): Likewise.
        (vect_is_simple_iv_evolution): Likewise.
        (vect_analyze_scalar_cycles): Likewise.
        (vect_analyze_data_ref_dependences): Likewise.
        (vect_analyze_data_refs): Likewise.
        (vect_mark_relevant): Likewise.
        (vect_stmt_relevant_p): Likewise.
        (vect_mark_stmts_to_be_vectorized): Likewise.
        (vect_get_loop_niters): Likewise.
        (vectorize_loops): Likewise.

2004-01-13  Sebastian Pop  <s.pop@laposte.net>
            Daniel Berlin  <dberlin@dberlin.org>

	* tree-fold-const.h (tree_fold_int_plus, tree_fold_int_minus,
	tree_fold_int_multiply): Remove NON_LVALUE_EXPR from the
	answers of the folder.  Fixes bootstraps for powerpc.

2004-01-12  Sebastian Pop  <s.pop@laposte.net>

	* tree-chrec.c (chrec_fold_plus, chrec_fold_multiply): Verify
	that there is no chrecs nested in the operands before calling
	the folder.
	(evolution_function_in_loop_num): When there is no evolution
	in the loop, return the initial condition.
	(evolution_part_in_loop_num): When there is no evolution
	in the loop, return NULL_TREE.
	(chrec_eval_next_init_cond): Adapt the function for the
	multivariate case.
	(tree_contains_chrecs): Avoid the use of double negation.
	* tree-chrec.h (chrec_eval_next_init_cond): Add a parameter
	for the dimension in which to evaluate the variation.
	* tree-scalar-evolution.c (is_ssa_name_a_version_of_variable,
	expression_contains_variable_p, remove_variable_from_expression,
	analyze_non_gimple_initial_condition, matched_an_increment,
	matched_an_exponentiation, matched_a_wrap_around,
	matched_an_arithmetic_wrap_around,
	evolution_of_phi_already_analyzed_p): New static functions.
	(scev_analyze_modify_expr): Use these functions.  Refine the
	cases detected as wrap-around variables.
	(analyze_initial_condition): Don't erase the evolution in the
	previous dimensions when computing the initial condition for a
	new loop.
	(analyze_evolution_in_loop): Call the scev_analyze_modify_expr
	on the tree node, not on its evolution.
	(scev_follow_ssa_edge): In the case of an inner loop-phi-node,
	when the outer edge is a phi-node follow up the edge.
	(scev_follow_ssa_edge): Avoid the analysis of the inner loop
	when it has already been analyzed.
	(merge_evolutions): Refine the operation for zero, one, and
	more branches of evolutions.

2004-01-09  Sebastian Pop  <s.pop@laposte.net>

	* tree-scalar-evolution.c: New version of the analyzer.
	* tree-scalar-evolution.h: Same.                       
	* tree-chrec.c: Same.           
	* tree-data-ref.c: Same.
	* tree-chrec.h: Same.
	* tree-data-ref.h: Same.
	* tree-fold-const.h: Same.

	* tree-vectorizer.c (vect_transform_loop_bound,
	vect_analyze_scalar_cycles, vect_analyze_data_ref_access,
	vect_analyze_data_refs, vect_get_loop_niters): Use the new
	interface of the analyzer.
	* tree-optimize.c (optimize_function_tree): Same.

2004-01-08  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* cfgloop.h (loop_is_included_in): Declaration removed.
	* tree-scalar-evolution.c (stmt_is_in_loop, stmt_is_not_in_loop,
	loop_is_included_in): Use existing functions to implement
	them.

2004-01-06  Sebastian Pop  <s.pop@laposte.net>

	* cfgloop.h (loop_is_included_in, outer_loop, inner_loop,
	next_loop, loop_num, loop_depth, loop_header,
	loop_nb_iterations, loop_num_exits, loop_exit_edges,
	loop_exit_edge): New inline functions.
	(loop_is_included_in): Declare here.
	* tree-flow-inline.h (loop_of_stmt): New inline function.
	* tree-scalar-evolution.c (loop_is_included_in): Remove declaration.
	(stmt_is_in_loop, stmt_is_not_in_loop): New functions.
	(loop_is_included_in, loop_is_included_in_rec): Moved up in the same file.

2004-01-06  Dorit Naishlos  <dorit@il.ibm.com>

	* tree-vectorizer.c: Fix typos.

2004-01-05  Andreas Jaeger  <aj@suse.de>

	* tree-vectorizer.h: Follow coding standards, remove extra
	whitespace.
	* tree-vectorizer.c: Likewise.

	* tree-vectorizer.c (vectorize_loops): Output statistics to
	dump_file, fix printf string.
	(vect_transform_loop): Replace DBG_VECT code with code dumping
	dependend on TDF_DETAILS to dump_file.
	(vect_is_supportable_binop): Likewise.
	(vect_analyze_operations): Likewise.
	(get_address_calculation_operands): Likewise.
	(vect_analyze_scalar_cycles): Likewise.
	(vect_analyze_data_ref_dependence): Likewise.
	(vect_analyze_data_ref_access): Likewise.
	(vect_analyze_data_ref_accesses): Likewise.
	(vect_analyze_data_refs): Likewise.
	(vect_mark_relevant): Likewise.
	(vect_get_loop_niters): Likewise.
	(vect_mark_stmts_to_be_vectorized): Likewise.
	(vect_analyze_loop_form): Likewise.
	(vectorize_loops): Likewise.

	* tree-vectorizer.h (DBG_VEC): Remove.

2004-01-04  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* doloop.c (doloop_optimize): Update number of iterations for the
	loops entered at bottom.

2004-01-04  Andreas Jaeger  <aj@suse.de>

	* common.opt: Re-order some options in ASCII collating orders.

2004-01-03  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* cfghooks.h (struct cfg_hooks): New fields split_block_after_labels
	and move_block_after, type of cfgh_make_forwarder_block field changed.
	(HEADER_BLOCK, LATCH_EDGE): Moved to cfgloop.c.
	(split_block_after_labels, move_block_after): New macros.
	(make_forwarder_block): Changed.
	* cfgloop.c (HEADER_BLOCK, LATCH_EDGE): Moved from cfghooks.h.
	(update_latch_info, mfb_keep_just, mfb_keep_nonlatch,
	fill_sons_in_loop): New functions.
	(canonicalize_loop_headers): Changed due to changes in
	make_forwarder_block.
	* cfgloopmanip.c (split_loop_bb): Don't update dominators.
	(create_preheader): Use make_forwarder_block.
	(mfb_keep_just, mfb_update_loops): New.
	* cfgrtl.c (rtl_split_block_after_labels): New.
	(redirect_edge_with_latch_update): Removed.
	(rtl_make_forwarder_block): New sematics.
	(rtl_split_block): Update dominators.
	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks):
	Add rtl_split_block_after_labels.
	* tree-cfg.c (tree_make_forwarder_block): Changed semantics.
	(create_blocks_annotations): Removed.
	(build_tree_cfg): Don't call create_blocks_annotations.
	(create_bb): Create annotations for a new block.
	(tree_split_edge): Don't call create_block_annotation.
	Update irreducible loop information.
	(tree_loop_optimizer_finalize): Add loop structure check.
	(tree_redirect_edge_and_branch_1): Return the original edge if
	no redirecting is neccessary.
	(tree_split_block): Make the semantics same as for rtl_split_block.
	(tree_split_block_after_labels, tree_move_block_after): New.
	(tree_cfg_hooks): Add tree_split_block_after_labels and
	tree_move_block_after.

	* cfgloopanal.c (mark_irreducible_loops): Fix.
	* loop-unswitch.c (unswitch_loop): Fix.

	* Makefile.in (tree-ssa-loop.o): Add cfgloop.h and tree-inline.h
	dependency.
	* jump.c (next_nonnote_insn_in_loop, duplicate_loop_exit_test,
	copy_loop_headers): Removed.
	* rtl.h (copy_loop_headers): Declaration removed.
	* toplev.c (rest_of_compilation): Do not call loop header copying.
	* tree-dump.c (dump_files): Add .ch dump.
	* tree-flow.h (tree_duplicate_bb, copy_loop_headers): Declare.
	* tree-optimize.c (optimize_function_tree): Add loop header copying
	pass.
	* tree-ssa-loop.c: Include cfgloop.h and tree-inline.h.
	(dump_file, dump_flags): Renamed to loop_dump_file and
	loop_dump_flags.
	(call_expr_p, should_duplicate_loop_header_p, copy_loop_headers):
	New.
	* tree.h (enum tree_dump_index): Add ch dump.
	* doc/invoke.texi (-fdump-tree-copy-headers): Document.
	* testsuite/gcc.dg/tree-ssa/20030711-1.c: Update test outcome.
	* testsuite/gcc.dg/tree-ssa/20030714-2.c: Ditto.
	* testsuite/gcc.dg/tree-ssa/copy-headers.c: New test.
	* tree-cfg.c (tree_duplicate_bb): New function.

	* tree-ssa-loop-im.c: New file.
	* Makefile.in (tree-ssa-loop-im.o): Add.
	* params.def (PARAM_LIM_EXPENSIVE): New parameter.
	* tree-dump.c (dump_files): Move .loop dump.
	* cfgloop.h (superloop_at_depth, get_loop_body_in_dom_order): Declare.
	(loop_dump_file, loop_dump_flags): Declare variables.
	* cfgloop.c (superloop_at_depth, get_loop_body_in_dom_order): New
	functions.
	* tree-flow.h (struct stmt_ann_d): Add aux field.
	(bsi_commit_edge_inserts): Declaration changed.
	(tree_ssa_lim): Declare.
	* tree-mudflap.c (mf_xform_derefs_1): Use in_array_bounds_p.
	* tree-optimize.c (optimize_function_tree): Move loop optimization
	pass.
	* tree-sra.c (scalarize_structures): Modified due to
	bsi_commit_edge_inserts change.
	* tree-ssa-loop.c (tree_ssa_loop_opt): Call tree_ssa_lim.
	* tree-ssa.c (rewrite_trees, rewrite_vars_out_of_ssa): Modified due to
	bsi_commit_edge_inserts change.
	* tree.c (in_array_bounds_p): New function.
	* tree.h (in_array_bounds_p): Declare.
	(enum tree_dump_index): Move loop dump.
	* tree-cfg.c (bsi_commit_edge_inserts): Don't take update_annotations
	argument.

	* tree-ssa.c (rewrite_into_ssa, rewrite_out_of_ssa): Ensure that the
	closed files are not used.

	* tree-tailcall.c (find_tail_calls, eliminate_tail_call): Update
	phi nodes for vdefs of the eliminated call.

2004-01-03  Sebastian Pop  <s.pop@laposte.net>

	* tree-optimize.c (optimize_function_tree): Move the closing brace of
	DCE2 to the right place.

2004-01-03  Sebastian Pop  <s.pop@laposte.net>

	* tree-vectorizer.c (vect_analyze_operations): Test vectorization_factor
	before computing modulo.

2004-01-02  Sebastian Pop  <s.pop@laposte.net>

	* tree-vectorizer.c (vect_is_supportable_binop): Returns false instead
	of NULL.

2004-01-02  Richard Henderson  <rth@redhat.com>

	* config/i386/i386.h (UNITS_PER_SIMD_WORD): New.

2004-01-02  Sebastian Pop  <s.pop@laposte.net>

	* tree-data-ref.c (vec_analyze_array, vec_array_base_name_differ_p, 
	array_base_name_differ_p): Removed for fixing the previous patch.

2004-01-02  Richard Henderson  <rth@redhat.com>

	* target.h (struct gcc_target): Remove vectype_for_scalar_type.
	* target-def.h (TARGET_VECTYPE_FOR_SCALAR_TYPE): Remove.
	* config/rs6000/rs6000.c (rs6000_vectype_for_scalar_type): Remove.
	(TARGET_VECTYPE_FOR_SCALAR_TYPE): Remove.

	* tree.c (build_vector_type_with_mode): Rename from make_vector,
	remove unsignedp argument, update callers.
	(build_vector_type): New.
	* tree.h (build_vector_type): Declare it.
	* tree-vectorizer.c (get_vectype_for_scalar_type): Use it.

2004-01-02  Richard Henderson  <rth@redhat.com>

	* tree-scalar-evolution.c (finalize_scalar_evolutions_analyzer):
	Clear dump_file.

2004-01-02  Sebastian Pop  <s.pop@laposte.net>

	* tree-data-ref.c (vec_analyze_array): Renamed to analyze_array.
	(analyze_array): Removed.
	(find_data_references): Adapted to use the new analyze_array  
	function.
	(array_base_name_differ_p): Moved to tree-data-ref.h.
	(vec_array_base_name_differ_p): Removed.
	* tree-data-ref.h (array_base_name_differ_p): Moved here.
	* tree-vectorizer.c (vect_analyze_data_ref_dependence): Use
	array_base_name_differ_p instead of vec_array_base_name_differ_p.
	(vect_analyze_data_refs): Use analyze_array instead of
	vec_analyze_array.
	(vectorize_loops): Remove the initializers and finalizers of the
	scalar evolution analyzer.

2004-01-01  Dorit Naishlos <dorit@il.ibm.com>

        * tree-vectorizer.c: New file. Implements loop vectorization 
        pass.
        * tree-vectorizer.h: New file.
        * Makefile.in: (tree-vectorizer.c,tree-vectorizer.h): New files.
        * tree-dump.c: (dump_files): New dump file for the new
        vectorization pass.
        * tree.h: (TDI_vect): New dump index for the new vectorization 
        pass.
        * timevar.def (TV_TREE_VECTORIZATION): Support new
        vectorization pass.
        * opts.c: (flag_tree_vetorize): New flag to enable/disable the
        new vectorization pass.
        * flags.h: Same.
        * toplev.c: Same.
        * common.opt: (ftree-vectorize): Same.
        * doc/invoke.texi: Document above new options.
        * tree-optimize.c: (optimize_function_tree): Invoke the new
        vetorization pass.
        * tree-flow.h: (struct stmt_ann_d): New field (aux) to allow
        recording information per stmt.
        * tree-data-ref.c (vec_analyze_array): New function, exposing
        API to the vectorizer.
        (vec_array_base_name_differ_p): New function, exposing API to
        the vectorizer.
        * tree-data-ref.h: Same.
        * defaults.h: (UNITS_PER_SIMD_WORD): Define.
        * config/rs6000/rs6000.h: (UNITS_PER_SIMD_WORD): Same.
        * target-def.h (TARGET_VECTYPE_FOR_SCALAR_TYPE): Declare a new
        target hook for vectorization.
        * target.h (vectype_for_scalar_type): Same.
        * config/rs6000/rs6000.c: (rs6000_vectype_for_scalar_type):
        Implement the above new target hook.
 	
2003-12-31  Sebastian Pop  <s.pop@laposte.net>

	* version.c (version_string): Change the identifier for the
	sub-branch.

2003-12-31  Sebastian Pop  <s.pop@laposte.net>
            Daniel Berlin  <dberlin@dberlin.org>

	* tree-phinodes.c (create_phi_node): Initialise PHI_MARKED to 0.
	* tree-scalar-evolution.c (already_visited,
	node_already_visited_by_ssa_path): Removed.
	(analyze_evolution): Remove initialisation of already_visited.
	(construct_schedule): idem.
	(monev_follow_ssa_edge): use PHI_MARKED for deciding whether
	to analyze the phi-node.
	(follow_ssa_edge_and_record_dependences_rec): idem.
	* tree.h (PHI_MARKED): New macro.
	(tree_phi_node): Add a field marked.

2003-12-27  Sebastian Pop  <s.pop@laposte.net>

	* Makefile.in (OBJS-common): Added tree-chrec.o
	tree-scalar-evolution.o, tree-data-ref.o, tree-fold-const.o.
	(tree-optimize.o): Add dependencies on tree-fold-const.h
	tree-chrec.h tree-scalar-evolution.h tree-data-ref.h
	(tree-chrec.o, tree-scalar-evolution.o, tree-data-ref.o,
	tree-fold-const.o): New rules.
	* cfgloop.h (loop): New field nb_iterations.
	(loop_from_num): New function.
	* common.opt (fscalar-evolutions, fall-data-deps): Added.
	* flags.h (flag_scalar_evolutions, flag_all_data_deps): Declared.
	* opts.c (decode_options, common_handle_option): Initialize
        flag_scalar_evolutions and flag_all_data_deps. 
	* timevar.def (TV_SCALAR_EVOLUTIONS, TV_ALL_DATA_DEPS): New.
	* toplev.c (flag_scalar_evolutions, flag_all_data_deps): Defined.
	(lang_independent_options): Add flag_scalar_evolutions and 
	flag_all_data_deps.
	* tree-dump.c (scev, alldd): New extensions.
	* tree.h (tree_dump_index): Added TDI_scev and TDI_alldd.
	* tree-optimize.c (tree-fold-const.h, tree-chrec.h, 
	tree-scalar-evolution.h, tree-data-ref.h): Included.
	(optimize_function_tree): Added the entry point for the analysis of 
	scalar evolutions and data dependences.
	* tree-pretty-print.c (tree-fold-const.h, tree-chrec.h): Included.
	(dump_generic_node): Added code for dumping POLYNOMIAL_CHREC, 
	EXPONENTIAL_CHREC, PERIODIC_CHREC, and INTERVAL_CHREC.
	* tree.def (INTERVAL_CHREC, POLYNOMIAL_CHREC, EXPONENTIAL_CHREC, 
	PERIODIC_CHREC): New tree nodes.
	* varray.h (index_in_varray_tree, tree_is_in_varray_tree_p, 
	index_in_varray_int, int_is_in_varray_int_p): New inlined functions.
	* tree-chrec.c, tree-chrec.h, tree-data-ref.c, tree-data-ref.h, 
	tree-fold-const.c, tree-fold-const.h, tree-scalar-evolution.c, 
	tree-scalar-evolution.h: New files.
	* doc/invoke.texi (-fdump-scalar-evolutions, -fdump-all-data-deps): 
	Documented.
	* testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-[01..50].c : New testcases.
	* testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-[01..50].c.scev: Expected 
	outputs for the scalar evolution analyzer.  
	* testsuite/gcc.dg/tree-ssa-chrec/ssa-chrec-{10, 30, 31, 32, 33, 34, 
	35, 36}.c.alldd: Expected outputs for the data dependence analyzer.
	* testsuite/gcc.dg/tree-ssa-chrec/tree-ssa-scev.exp: New file.
	* testsuite/lib/scantree.exp (diff-tree-dumps): New procedure.
	* ChangeLog.lno: New file.