aboutsummaryrefslogtreecommitdiff
path: root/gcc/ChangeLog.gomp
blob: 5aa77b0bd08b253cc1496c9547c961334c66222d (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
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
2017-05-01  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (verify_oacc_routine_clauses): Emit a warning when the
	user doesn't supply a gang, worker, vector or seq clause to an
	OpenACC routine construct.

2017-04-24  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_omp_target): Don't privatize firstprivate VLAs.

2017-04-19  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (convert_to_firstprivate_int): Handle pointer types.
	(convert_from_firstprivate_int): Likewise.  Create local storage for
	the values being pointed too.  Add new argument orig_type.
	(lower_omp_target): Allow pointer types with GOMP_MAP_FIRSTPRIVATE_INT.

2017-04-13  Chung-Lin Tang  <cltang@codesourcery.com>

	* gimplify.c (gimplify_oacc_declare_1): Remove GOMP_MAP_FORCE_* cases.

2017-04-07  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-core.h (enum omp_clause_default_kind): Add
	"OMP_CLAUSE_DEFAULT_PRESENT".
	* tree-pretty-print.c (dump_omp_clause): Handle it.
	* gimplify.c (enum gimplify_omp_var_data): Add
	"GOVD_MAP_FORCE_PRESENT".
	(gimplify_adjust_omp_clauses_1): Map it to
	"GOMP_MAP_FORCE_PRESENT".
	(omp_default_clause, oacc_default_clause): Handle
	"OMP_CLAUSE_DEFAULT_PRESENT".

	* gimplify.c (oacc_default_clause): Clarify.

2017-04-05  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (scan_sharing_clauses): Update handling of OpenACC declare
	create, copyin and deviceptr to have local lifetimes.
	(lower_omp_target): Handle GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.
	* tree-pretty-print.c (dump_omp_clause): Likewise.

2017-03-15  Cesar Philippidis  <cesar@codesourcery.com>

	Backport from trunk:
	2016-11-10  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (lower_omp_target): Fix up argument to is_reference.
	(expand_omp_ordered_sink): Handle TREE_PURPOSE of deps being
	TRUNC_DIV_EXPR.
	* gimplify.c (gimplify_scan_omp_clauses): Likewise.  Set
	ctx->target_map_scalars_firstprivate on OMP_TARGET even for Fortran.
	Remove omp_no_lastprivate callers.  Propagate lastprivate on combined
	teams distribute parallel for simd even to distribute and teams
	construct.  For OMP_CLAUSE_DEPEND add missing break at the end of
	OMP_CLAUSE_DEPEND_SINK case.
	(omp_notice_variable): Use lang_hooks.decls.omp_scalar_p.
	(omp_no_lastprivate): Removed.
	(gimplify_adjust_omp_clauses): Remove omp_no_lastprivate callers.
	(gimplify_omp_for): Likewise.
	(computable_teams_clause): Fail for automatic vars from current
	function not yet seen in bind expr.
	* langhooks.c (lhd_omp_scalar_p): New function.
	* langhooks.h (struct lang_hooks_for_decls): Add omp_scalar_p.
	* varpool.c (varpool_node::get_create): Set node->offloading
	even for DECL_EXTERNAL decls.
	* langhooks-def.h (lhd_omp_scalar_p): New prototype.
	(LANG_HOOKS_OMP_SCALAR_P): Define.
	(LANG_HOOKS_DECLS): Use it.

2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>

	Backport from trunk r245769:
	2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>

	* doc/optinfo.texi (Optimization groups): Fix option used for
	OPTGROUP_ALL.
	* doc/invoke.texi (-fopt-info): Document "omp".
	* dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
	(OPTGROUP_ALL): Add OPTGROUP_OMP.
	* hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
	* ipa-hsa.c (pass_data_ipa_hsa): Likewise.
	* omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.

	Backport from trunk r245768:
	2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>

	* dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
	all users.
	* dumpfile.c (optgroup_options): Instead of "openmp", associate
	OPTGROUP_OMP with "omp".

2017-02-27  Chung-Lin Tang  <cltang@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (gangprivate_shared_size): New global variable.
	(gangprivate_shared_align): Likewise.
	(gangprivate_shared_sym): Likewise.
	(gangprivate_shared_hmap): Likewise.
	(nvptx_option_override): Initialize gangprivate_shared_sym.
	(nvptx_file_end): Output gangprivate_shared_sym.
	(nvptx_goacc_expand_accel_var): New function.
	(nvptx_set_current_function): New function.
	(TARGET_SET_CURRENT_FUNCTION): Define hook.
	(TARGET_GOACC_EXPAND_ACCEL): Likewise.
	* doc/tm.texi (TARGET_GOACC_EXPAND_ACCEL_VAR): Document new hook.
	* doc/tm.texi.in (TARGET_GOACC_EXPAND_ACCEL_VAR): Likewise.
	* expr.c (expand_expr_real_1): Remap decls marked with the
	"oacc gangprivate" atttribute.
	* omp-low.c (scan_sharing_clauses): Strip out any "oacc gangprivate"
	attributes from acc loop private clauses.
	* target.def (expand_accel_var): New hook.

2017-02-23  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (inform_oacc_loop): New function.
	(execute_oacc_device_lower): Use it to display loop parallelism.

	Backport from trunk:
	2016-11-23  Martin Jambor  <mjambor@suse.cz>
		    Martin Liska  <mliska@suse.cz>

	* doc/optinfo.texi (Optimization groups): Document OPTGROUP_OPENMP.
	* dumpfile.c (optgroup_options): Added OPTGROUP_OPENMP.
	* dumpfile.h (OPTGROUP_OPENMP): Define.
	* omp-low.c (pass_data_expand_omp): Changed optinfo_flags to
	OPTGROUP_OPENMP.
	(pass_data_expand_omp_ssa): Likewise.
	(pass_data_omp_device_lower): Likewsie.
	(pass_data_lower_omp): Likewise.
	(pass_data_diagnose_omp_blocks): Likewise.
	(pass_data_oacc_device_lower): Likewise.
	(pass_data_omp_target_link): Likewise.

2017-02-10  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (convert_from_firstprivate_int): Remove unused variable.

2017-02-08  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_adjust_reduction_type): New function.
	(nvptx_goacc_reduction_setup): Use it to adjust the type of ref_to_res.
	(nvptx_goacc_reduction_fini): Likewise.
	(nvptx_goacc_reduction_teardown): Likewise.
	* omp-low.c (lower_oacc_reductions): Handle reduction decls mapped
	with GOMP_MAP_FIRSTPRIVATE_POINTER.
	* convert_to_firstprivate_pointer: Rename to ...
	* convert_to_firstprivate_int: ... this.
	* convert_from_firstprivate_pointer: Rename to ...
	* convert_from_firstprivate_int: ... this.
	(lower_omp_target): Update calls to convert_{to,from}_firstprivate_int.
	(default_goacc_reduction): Retype ref_to_res as necessary.

2017-02-01  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (convert_to_firstprivate_pointer): Use TYPE_SIZE instead
	of TYPE_PRECISION when determining if a firstprivate variable may be
	casted into a pointer.
	(convert_from_firstprivate_pointer): Likewise.
	(lower_omp_target): Likewise.

2017-01-27  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (demote_firstprivate_pointer): New function.
	(gimplify_scan_omp_clauses): Enable target_map_pointers_as_0len_arrays
	and target_map_scalars_firstprivate in OpenACC and gfortran.
	(gimplify_adjust_omp_clauses): Demote FIRSTPRIVATE_POINTERS for OpenACC
	retuction variables.
	* omp-low.c (lower_omp_target): Adjust receiver reference of decls for
	fortran dummy arguments.

2017-01-27  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (maybe_lookup_field_in_outer_ctx): New function.
	(convert_to_firstprivate_pointer): New function.
	(convert_from_firstprivate_pointer): New function.
	(lower_omp_target): Enable GOMP_MAP_FIRSTPRIVATE_INT in OpenACC.

2017-01-10  Thomas Schwinge  <thomas@codesourcery.com>

	* gimplify.c (gimplify_adjust_omp_clauses_1): Clean up.

	Backport from gcc-6-branch r244264:
	2017-01-10  Thomas Schwinge  <thomas@codesourcery.com>

	PR tree-optimization/78024
	* omp-low.c (oacc_loop_discovery): Call clear_bb_flags.

2017-01-10  Chung-Lin Tang  <cltang@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses): For dynamic array map kinds,
	make sure bias in each dimension are put into firstprivate variables.
	* tree-pretty-print.c (dump_omp_clauses): Add cases for printing
	GOMP_MAP_DYNAMIC_ARRAY map kinds.
	* omp-low.c (struct omp_context):
	Add 'hash_map<tree_operand_hash, tree> *dynamic_arrays' field, also
	added include of "tree-hash-traits.h".
	(append_field_to_record_type): New function.
	(create_dynamic_array_descr_type): Likewise.
	(create_dynamic_array_descr_init_code): Likewise.
	(new_omp_context): Add initialize of dynamic_arrays field.
	(delete_omp_context): Add delete of dynamic_arrays field.
	(scan_sharing_clauses): For dynamic array map kinds, check for
	supported dimension structure, and install dynamic array variable into
	current omp_context.
	(lower_omp_target): Add handling for dynamic array map kinds.
	(dynamic_array_lookup): New function.
	(dynamic_array_reference_start): Likewise.
	(scan_for_op): Likewise.
	(scan_for_reference): Likewise.
	(da_create_bias): Likewise.
	(da_dimension_peel): Likewise.
	(lower_omp_1): Add case to look for start of dynamic array reference,
	and handle bias adjustments for the code sequence.

2016-12-06  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (gimplify_adjust_omp_clauses_1): Link ACC new clauses
	with the old ones.

2016-11-10  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses): Remove
	OMP_CLAUSE_DEVICE_RESIDENT.
	(gimplify_adjust_omp_clauses): Likewise.
	* omp-low.c (scan_sharing_clauses): Likewise.
	* tree-core.h (enum omp_clause_code): Likewise.
	* tree-nested.c (convert_nonlocal_omp_clauses):
	(convert_local_omp_clauses):
	* tree-pretty-print.c (dump_omp_clause): Likewise.
	* tree.c (walk_tree_1): Likewise.

2016-11-10  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses): Update handling of ACC
	UPDATE variables.

2016-11-07  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (enum gimplify_omp_var_data): Remove stale
	GOVD_USE_DEVPTR.
	(gimplify_scan_omp_clauses): Likewise.
	(gimplify_adjust_omp_clauses_1): Likewise.

2016-10-28  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_single): Use a single predicate
	for loops partitioned across both worker and vector axes.

2016-10-19  Thomas Schwinge  <thomas@codesourcery.com>

	PR other/70945
	* targhooks.c (default_libc_has_function): Update comment.
	* target.def (libc_has_function): Likewise.
	* doc/tm.texi: Regenerate.
	* coretypes.h (enum function_class): Add
	function_glibc_finite_math.
	* config/darwin.c (darwin_libc_has_function): Handle it.
	* lto-streamer.h (enum lto_section_type): Rename
	LTO_section_offload_table to LTO_section_offload_data.  Adjust all
	users.
	* lto-cgraph.c (void output_offload_data): New function, split out
	of output_offload_tables.  Adjust all users.  Stream the target's
	function_glibc_finite_math property.
	(input_offload_data): New function, split out of
	input_offload_tables.  Adjust all users.  Handle mismatch between
	the target's and the offloading target's
	function_glibc_finite_math property.

2016-10-05  Nathan Sidwell  <nathan@codesourcery.com>

	* tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
	* tree.c (omp_clause_num_ops): Adjust TILE ops.
	* internal-fn.def (GOACC_TILE): New.
	* internal-gn.c (expand_GOACC_TILE): New.
	* gimplify.c (gomplify_adjust_omp_clauses): Don't delete TILE.
	(gimplify_omp_for): Deal with TILE.
	* omp-low.c (struct omp_for_data): Add tiling field.
	(struct oacc_loop): Add e_mask field.
	(enum oacc_loop_flags): Add OLF_TILE flag.
	(extract_omp_for_data): Deal with tiling.
	(lower_oacc_head_mark): Add OLF_TILE as appropriate, adjust levels
	calculation.
	(struct oacc_collaps): Add tile and outer fields.  */
	(expand_oacc_collaps_init): Add LOC paramter.  Initialize tile
	element fields.
	(expand_oacc_collaps_vars): Add INNER parm.  Adjust for tiling.
	(expand_oacc_for): Insert tile element loop as needed.  Adjust.
	(oacc_xform_tile): New.
	(new_oacc_loop_raw): Initialize e_mask.
	(oacc_loop_discover_walk): Remember GOACC_TILE fns.
	(oacc_loop_process): Adjust GOACC_LOOP processing.  Deal with
	GOACC_TILE fns.
	(oacc_loop_fixed_partitions): Deal with TILE.
	(oacc_loop_auto_partitions): Likewise.
	(execite_oacc_device_lower): Process GOACC_TILE fns.
	
2016-10-04  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (lower_oacc_head_mark): Don't determine default auto
	here ...
	(oacc_loop_fixed_partitions): ... do it here instead.

2016-10-03  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses): No special handling for
	OMP_CLAUSE_TILE.
	* omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
	(expand_oacc_for): Remove out of date note.  Fix whitespace.
	(oacc_dim_call): New.
	(oacc_thread_numbers): Use it.
	(oacc_loop_fixed_partitions): Dump partitioning.
	* tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
	* internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.

	* gimple-pretty-print.c (dump_gimple_call_args): Simplify "' "
	printing.

2016-10-02  Chung-Lin Tang  <cltang@codesourcery.com>

	PR fortran/77371
	* omp-low.c (lower_omp_target): Avoid reference-type processing
	on pointers for firstprivate clause.
	* gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
	when emitting error on private/firstprivate reductions.

2016-09-30  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_loop_auto_partition): Simplify logic.

2016-09-30  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (expand_oacc_collapse_vars): Avoid MOD for outermost
	collaps var.

2016-09-27  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (struct oacc_loop): Change 'ifns' to vector of call
	stmts.
	(new_oacc_loop_raw, finish_oacc_loop): Adjust.
	(oacc_loop_discover_walk): Append loop abstraction sites to list.
	(oacc_loop_xform_loop): Delete.
	(oacc_loop_process): Iterate over call list directly.
	(execute_oacc_device_lower): Ignore unknown unspecs.

2016-09-27  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.h (IFN_UNIQUE_CODES, IFN_GOACC_LOOP_CODES,
	IFN_GOACC_REDUCTION_CODES): New.
	(enum ifn_unique_kind, enum ifn_goacc_loop_kind, enum
	ifn_goacc_reduction_kind): Use them.
	* gimple-pretty-print.c (dump_gimple_call_args): Decode first arg
	of internal functions, when applicable.

2016-09-23  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (is_oacc_declared): New function.
	(oacc_default_clause): Use it to set default flags for acc declared
	variables inside parallel regions.
	(gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
	declared variables.
	(gimplify_oacc_declare): Gimplify the declare clauses.  Add the
	declare attribute to any decl as necessary.

2016-09-15  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (oacc_default_clause): Privatize fortran common blocks.
	(omp_notice_variable): Defer the expansion of DECL_VALUE_EXPR for
	common block decls.

2016-09-15  Chung-Lin Tang  <cltang@codesourcery.com>

	Backport from mainline
	2016-09-15  Chung-Lin Tang  <cltang@codesourcery.com>

	PR fortran/72743
	* ipa-icf.c (set_alias_uids): New function.
	(sem_variable::merge): Use set_alias_uids to set DECL_PT_UID of
	all the merged variable's referring aliases.

2016-08-31  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (cond_uni): New pattern.
	* config/nvptx/nvptx.c (nvptx_propagate_unified): New.
	(nvptx_split_blocks): Call it for cond_uni insn.
	(nvptx_expand_cond_uni): New.
	(enum nvptx_builtins): Add NVPTX_BUILTIN_COND_UNI.
	(nvptx_init_builtins): Initialize it.
	(nvptx_generate_vector_shuffle): Change integral SHIFT operand to
	tree BITS operand.
	(nvptx_vector_reduction): New.
	(nvptx_goacc_reduction_fini): Call it for vector.

2016-08-30  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_omp_target): Handle NULL-sized types for
	assumed-sized arrays.

2016-08-28  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Set to zero.

2016-08-26  Nathan Sidwell  <nathan@codesourcery.com>

	* ipa-inline-analysis.c (inline_write_summary): Only dump callee
	counts when dumping the function's body.

2016-08-26  Nathan Sidwell  <nathan@codesourcery.com>

	Merge from trunk:
	* ipa-inline-analysis.c (inline_write_summary): Remove unnecessary
	assignment inside if condition.

2016-08-24  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
	Emit insns for calls too.
	(nvptx_find_par): Always look for worker-level predecessor insn.
	(nvptx_propagate): Add is_call parm, return bool.  Copy frame for
	calls.
	(nvptx_vpropagate, nvptx_wpropagate): Adjust.
	(nvptx_process_pars): Propagate frames for calls.

2016-08-17  Cesar Philippidis  <cesar@codesourcery.com>

	PR middle-end/70828
	* gimplify.c (struct gimplify_omp_ctx): Add tree clauses member.
	(new_omp_context): Initialize clauses to NULL_TREE.
	(gimplify_scan_omp_clauses): Set clauses in the gimplify_omp_ctx.
	(omp_clause_matching_array_ref): New function.
	(gomp_needs_data_present): New function.
	(gimplify_adjust_omp_clauses_1): Use preset or pointer omp clause map
	kinds when creating implicit data clauses for OpenACC offloaded
	variables defined used an acc data region as necessary.

2016-08-17  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (verify_oacc_routine_clauses): Change formal
	parameters.  Add checking if already marked as an accelerator
	routine.  Adjust all users.

	* omp-low.c (build_oacc_routine_dims): Move some of its processing
	into...
	(verify_oacc_routine_clauses): ... this new function.
	* omp-low.h (verify_oacc_routine_clauses): New prototype.

2016-08-15  Chung-Lin Tang  <cltang@codesourcery.com>

	* omp-low.c (lower_oacc_reductions): Adjust variable lookup to use
	maybe_lookup_decl, to handle nested acc loop directives.

2016-08-03  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_declare_function_name): Round frame
	size to DImode boundary.
	(nvptx_propagate): Likewise.

2016-07-27  Cesar Philippidis  <cesar@codesourcery.com>

	* lto-cgraph.c (input_overwrite_node): Change the assertion to an
	error for missing symbols.

2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>

	Backport from trunk:
	* omp-low.c (lower_omp_target): Mark data clauses with
	GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
	zero-length subarrays.

2016-06-30  Thomas Schwinge  <thomas@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Only trigger
	the "avoid offloading" mechanism for -O2 and higher.

2016-06-10  James Norris  <jnorris@codesourcery.com>

	Backport from mainline r236098.
	2016-05-10  James Norris  <jnorris@codesourcery.com>

	PR driver/68463
	* config/rs6000/sysv4.h (CRTOFFLOADBEGIN): Define. Add crtoffloadbegin.o
	if offloading is enabled and -fopenacc or -fopenmp is specified.
	(CRTOFFLOADEND): Likewise.
	(STARTFILE_LINUX_SPEC): Add CRTOFFLOADBEGIN.
	(ENDFILE_LINUX_SPEC): Add CRTOFFLOADEND.

2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>

	PR middle-end/71373
	Backport from trunk r237291:
	* tree-nested.c (convert_nonlocal_omp_clauses)
	(convert_local_omp_clauses): Handle OMP_CLAUSE_ASYNC,
	OMP_CLAUSE_WAIT, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_AUTO,
	OMP_CLAUSE__CACHE_, OMP_CLAUSE_TILE.

	Backport from trunk r237291:
	* gimplify.c (gimplify_adjust_omp_clauses): Discard
	OMP_CLAUSE_TILE.
	* omp-low.c (scan_sharing_clauses): Don't expect OMP_CLAUSE_TILE.

	Backport from trunk r237290:
	* omp-low.c (scan_sharing_clauses): Don't expect
	OMP_CLAUSE__CACHE_.

2016-05-27  Cesar Philippidis  <cesar@codesourcery.com>

	Backport trunk r236678:
	2016-05-24  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (omp_notice_variable): Use zero-length arrays for data
	pointers inside OACC_DATA regions.
	(gimplify_scan_omp_clauses): Prune firstprivate clause associated
	with OACC_DATA, OACC_ENTER_DATA and OACC_EXIT data regions.
	(gimplify_adjust_omp_clauses): Fix typo in comment.

2016-05-27  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (oacc_loop_auto_partitions): Use boolean OR
	when comparing outer_assign and loop->inner.

2016-05-26  Nathan Sidwell  <nathan@acm.org>

	* config/nvptx/nvptx.c (nvptx_function_arg_boundary): New.
	(TARGET_FUNCTION_ARG_BOUNDARY): Override.

2016-05-23  Cesar Philippidis  <cesar@codesourcery.com>

	Backport trunk r236523:
	2016-05-20  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.md (sincossf3): New pattern.

2016-05-06  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (lower_oacc_head_mark): Ensure 2 levels for auto
	loops.
	(oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
	vector partitioning to outer loops.  Assign 2 partitions to loops
	when available.
	(oacc_loop_partition): Adjust oacc_loop_auto_partitions call.

2016-05-05  Nathan Sidwell  <nathan@codesourcery.com>

	* gimple.c (gimple_call_same_target_p): Unique functions are eq.
	* tree-ssa-tail-merge.c (same_succ::equal): Check pointer eq
	equality first.

2016-05-02  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (lower_oacc_head_tail): Assert there is at least one
	marker.
	(oacc_loop_process): Check mask for loop termination.
	(oacc_loop_auto_part): Remove code duplicated in merge.

2016-04-11  Cesar Philippidis  <cesar@codesourcery.com>

	PR tree-optimization/70357
	* gimplify.c (gimplify_scan_omp_clauses): Remove stale acc reduction
	code.
	(gimplify_adjust_omp_clauses): Add or adjust data clauses for acc
	parallel reductions as necessary.  Error on those that are private.
	(localize_reductions_r): Delete.
	(localize_reductions): Delete.
	(gimplify_omp_for): Don't call localize_reductions.
	(gimplify_omp_workshare): Likewise.
	* omp-low.c (build_outer_var_ref): Remove stale reduction-specific
	corner cases.
	(fixup_remapped_decl): Likewise.
	(scan_sharing_clauses):  Don't install variables which are used in
	acc parallel reductions.
	(check_omp_nesting_restrictions): Remove stale reduction-specific
	corner cases.
	(scan_omp_1_stmt): Clean up whitespace.
	(lower_rec_input_clauses): Remove stale reduction-specific corner
	cases.
	(lower_oacc_reductions): Update it to handle parallel, reference and
	nested reductions.
	(lower_omp_target): Don't remap variables appearing in acc parallel
	reductions.
	* tree-core.h (enum omp_clause_code): Remove stale comments about
	the fifth reduction clause operand.
	* tree.c (omp_clause_num_ops): Set the number of reduction clause
	operands to 5.
	(walk_tree_1): Update error checking for the reduction clause.
	* tree.h (OMP_CLAUSE_MAP_IN_REDUCTION): New macro.

2016-04-11  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Remove superfluous passes from kernels pass list.
	* tree-ssa-loop.c (pass_scev_cprop::clone, pass_tree_loop_init::clone)
	(pass_tree_loop_done::clone): Remove function.

2016-04-08  Thomas Schwinge  <thomas@codesourcery.com>

	* gimple.def: Remove GIMPLE_OMP_ENTRY_END.  Remove all uses.

2016-03-11  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_gen_shuffle): Add support for QImode
	and HImode registers.

2016-03-09  Nathan Sidwell  <nathan@acm.org>

	* config/nvptx/nvptx.c (nvptx_option_override): Don't kill debug level.

2016-02-24  Nathan Sidwell  <nathan@codesourcery.com>

	PR other/69916
	* omp-low.c (struct oacc_loop): Add ifns.
	(new_oacc_loop_raw): Initialize it.
	(finish_oacc_loop): Clear mask & flags if no ifns.
	(oacc_loop_discover_walk): Count IFN_GOACC_LOOP calls.
	(oacc_loop_xform_loop): Add ifns arg & adjust.
	(oacc_loop_process): Adjust oacc_loop_xform_loop call.

2016-02-03  James Norris  <jnorris@codesourcery.com

	Backport form trunk:
	2016-02-02  James Norris  <jnorris@codesourcery.com>
	* gimplify.c (omp_notice_variable): Add usage check.

2016-01-22  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (struct oacc_loop): Add 'inner' field.
	(new_oacc_loop_raw): Initialize it to zero.
	(oacc_loop_fixed_partitions): Initialize it.
	(oacc_loop_auto_partitions): Partition outermost loop to outermost
	available partitioning.

2016-01-21  Thomas Schwinge  <thomas@codesourcery.com>

	* common.opt: Add -foffload-force.
	* lto-wrapper.c (merge_and_complain, append_compiler_options):
	Handle it.
	* doc/invoke.texi: Document it.
	* config/nvptx/mkoffload.c (struct id_map): Add "flags" member.
	(record_id): Parse, and set it.
	(process): Use it.
	* config/nvptx/nvptx.c (nvptx_attribute_table): Add "omp avoid
	offloading".
	(nvptx_record_offload_symbol): Use it.
	(nvptx_goacc_validate_dims): Set it.

2016-01-20  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses):  Consider OACC_{DATA,
	PARALLEL, KERNELS} when processing firstprivate pointers and
	references, and setting target_kind_firstprivatize_array_bases.

2016-01-20  Tom de Vries  <tom@codesourcery.com>

	* gimplify.c (gimplify_omp_for): Remove reduction clauses in kernels
	region.

2016-01-15  Cesar Philippidis  <cesar@codesourcery.com>

	Backport from trunk:
	2016-01-15  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (oacc_default_clause): Decode reference and pointer
	types for both kernels and parallel regions.

2016-01-13  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/68977
	* omp-low.c (oacc_xform_loop): Handle seen_error () == true.

2016-01-11  Thomas Schwinge  <thomas@codesourcery.com>

	* config/nvptx/nvptx.h (ASM_SPEC): Define.
	* config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable
	conditionally.

2016-01-08  Cesar Philippidis  <cesar@codesourcery.com>

	* lto-cgraph.c (input_varpool_node): Reduce the assert for
	missing variables to an error.
	* omp-low.c (build_outer_var_ref): Recursively scan for decls
	in outer omp contexts.

2016-01-08  Nathan Sidwell  <nathan@acm.org>

	* omp-low.c (expand_omp_atomic_pipeline): Pay attention to
	LOOPS_HAVE_SIMPLE_LATCHES state.

2016-01-07  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_oacc_reductions): Handle explicitly private
	reduction varaibles.

2016-01-07  Nathan Sidwell  <nathan@acm.org>

	* omp-low.c (oacc_validate_dims): Allow non-unity defaults on
	kernel regions too.

2016-01-07  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_oacc_reductions): Properly handle reductions
	inside routines.

2016-01-06  Cesar Philippidis  <cesar@codesourcery.com>

	PR other/68813
	* omp-low.c (is_oacc_reduction_private): Delete.
	(build_outer_var_ref): Remove special handling for private reductions
	in openacc.
	(scan_sharing_clauses): Likewise.
	(lower_rec_input_clauses): Likewise.
	(lower_oacc_reductions): Update support for private reductions.

2016-01-06  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (new_oacc_loop_routine): Remove stale dims variable.

2016-01-05  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): New.
	(nvptx_goacc_validate_dims): Extend to handle global defaults.
	* doc/invoke.texi (fopenacc-dim): Document.
	* lto-wrapper.c (merge_and_complain): Add OPT_fopenacc_dim_ case.
	(append_compiler_options): Likewise.
	* omp-low.c (oacc_default_dims, oacc_min_dims): New.
	(oacc_parse_default_dims): New.
	(oacc_validate_dims): Add USED arg.  Emit warnings about strange
	partitioning choices.  Select non-unity default when possible.
	(oacc_loop_fixed_partitions): Return mask of used partitions.
	(oacc_loop_auto_partitions): Emit dump info.
	(oacc_loop_partition): Return mask of used partitions.
	(execute_oacc_device_lower): Parse default dimension arg.  Adjust
	loop partitioning and validation calls.

2016-01-05  Nathan Sidwell  <nathan@acm.org>

	Merge from mainline:
	2015-12-30  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx.c (nvptx_assemble_undefined_decl): Check
	it's not a constant pool object.

	2015-12-28  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx.c (nvptx_output_call_insn): Expect hard regs.
	* config/nvptx/nvptx.md (nvptx_reg_or_mem_operand): Rename to ...
	(nvptx_nonimmediate_operand): ... here.  Update all uses.
	(call_insn_operand): Use REG_P.
	(call_operation): Allow hard regs.

	2015-12-23  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx-protos.h
	(nvptx_maybe_convert_symbolic_operand): Delete prototype.
	* config/nvptx/nvptx.c (nvptx_maybe_convert_symbolic_operand): Delete.
	(nvptx_output_mov_insn): Record fnsym here.
	(nvptx_wpropagate): Don't create UNSPEC_TO_GENERIC unspec.
	* config/nvptx/nvptx.md (UNSPEC_TO_GENERIC): Delete.
	(symbolic_operand): Delete predicate.
	(nvptx_nonimmediate_operand): Delete predicate.
	(mov<mode>): Hard regs are perfectly ok here.
	(convaddr_<mode>): Delete.

	2015-12-18  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx.c (nvptx_maybe_convert_symbolic_operand):
	Remove UNSPEC_TO_GENERIC generation.
	(nvptx_output_mov_insn): Generate cvta for symbolic src.
	* config/nvptx/nvptx.md (nvptx_register_operand): Allow hard reg.
	(nvptx_reg_or_mem_operand): Likewise.
	(nvptx_nonmemory_operand): Likewise.
	(nvptx_general_operand): Delete.
	(*mov<mode>_insn): Use nonimmediate_operand, permit hardregs.
	(oacc_fork, oacc_join): Use general_operand.

	2015-12-18  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx.c (nvptx_option_override): Emit sorry for
	stabs debug.
	(nvptx_assemble_undefined_decl): Use nvptx_assemble_decl_end.

	2015-12-18  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx.c (worker_bcast_name, worker_red_name): Delete.
	(nvptx_option_override): Adjust worker symbol creation.
	(nvptx_gen_wcast): Wrap worker address in UNSPEC_TO_GENERIC.
	(write_worker_buffer): New.
	(nvptx_file_end): Call write_worker_buffer.
	* config/nvptx/nvptx.md (UNSPEC_SHARED_DATA): Delete.
	(worker_load<mode>, worker_store<mode>): Delete.

	2015-12-17  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx.h (NVPTX_RETURN_REGNUM, FRAME_POINTER_REGNUM,
	ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Renumber.
	(REGISTER_NAMES): Update and rename.
	(FIXED_REGISTERS, CALL_USED_REGISTERS): Update.
	(enum_reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Reformat.

	2015-12-16  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx.h (OUTGOING_STATIC_CHAIN_REGNUM): Remove.
	(REGISTER_NAMES): Adjust.
	* config/nvptx/nvptx.c (nvptx_pass_by_reference): Avoid long line.
	(nvptx_static_hain): Delete.
	(write_arg_mode): Don't emit initializer if argno < 0.
	(write_arg_type): Fix whitespace.
	(init_frame): Initialize reg to zero if frame is zero-sized.
	(nvptx_declare_function_name):  Use write_arg_type to emit chain
	decl.
	(nvptx_output_call_insn): Adjust static chain emission.
	(nvptx_goacc_reduction): Make static.
	(TARGET_STATIC_CHAIN): Don't override.

	2015-12-16  Nathan Sidwell  <nathan@acm.org>
	* config/nvptx/nvptx-protos.h (nvptx_hard_regno_mode_ok): Delete.
	* config/nvptx/nvptx.h (struct machine_function):
	Reimplement. Adjust all users.
	* config/nvptx/nvptx.c (nvptx_declare_function_name): Move stack
	and frame array generation earlier.
	(nvptx_call_args): Reimplement.
	(nvptx_expand_call): Adjust.
	(nvptx_hard_reno_mode_ok): Delete.
	(nvptx_reorg): Revert scan of hard regs.

2015-12-29  Nathan Sidwell  <nathan@acm.org>

	* omp-low.c (set_oacc_fn_attrib): Add IS_KERNEL arg, encode on
	TREE_PUBLIC.
	(oacc_fn_attrib_kernels_p): New.
	(oacc_fn_attrib_level): New.
	(expand_omp_target): Pass kernels_p to set_oacc_fn_attrib.
	(oacc_validate_dims): Add LEVEL arg, don't return it.
	(new_oacc_loop_routine): Use oacc_fn_attrib_level, not
	oacc_validate_dims.
	(execute_oacc_device_lower): Use oacc_fn_attrib_level, validate
	dimensions after discovering loops.  Add more dump info.
	* omp-low.h (set_oacc_fn_attrib): Add IS_KERNEL arg.
	(oacc_fn_attrib_kernels_p): Declare.
	* tree-parloops.c (create_parallel_loop): Adjust
	set_oacc_fn_attrib call.
	* tree-ssa-loop.c (gate_oacc_kernels): Use oacc_fn_attrib_kernels_p.

2015-12-28  Nathan Sidwell  <nathan@acm.org>

	* omp-low.c (maybe_discard_oacc_function): New simplification
	broken out of ...
	(execte_oacc_device_lower): ... here.  Call it.

2015-12-09  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	* gimplify.c (enum gimplify_omp_var_data): Add enum value
	GOVD_MAP_FORCE.
	(oacc_default_clause): Fix default for scalars in oacc kernels.
	(gimplify_adjust_omp_clauses_1): Handle GOVD_MAP_FORCE.

2015-12-09  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for_generic): Gimplify seq_loop loop start and
	limit.

2015-12-08  Thomas Schwinge  <thomas@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses)
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_BIND,
	OMP_CLAUSE_NOHOST.
	* tree-nested.c (convert_nonlocal_omp_clauses)
	(convert_local_omp_clauses): Likewise.
	* omp-low.c (scan_sharing_clauses): Likewise.
	(execute_oacc_device_lower) [ACCEL_COMPILER]: Handle OpenACC bind
	clauses.
	[!ACCEL_COMPILER]: Handle OpenACC nohost clauses.
	* tree-core.h (enum omp_clause_code) <OMP_CLAUSE_BIND>: Update
	description.

2015-12-05  Chung-Lin Tang  <cltang@codesourcery.com>

	* c-family/c-omp.c (c_finish_oacc_wait): Remove add_stmt() call.
	* c/c-parser.c (c_parser_oacc_wait): Add add_stmt() call.
	* cp/parser.c (cp_parser_oacc_wait): Add finish_expr_stmt() call.

2015-12-01  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (bb_region_map): Remove.  Adjust all users.

2015-11-30  Cesar Philippidis  <cesar@codesourcery.com>

	* tree-nested.c (convert_nonlocal_omp_clauses): Handle optional
	arguments for OMP_CLAUSE_{GANG,WORKER,VECTOR}.
	(convert_local_omp_clauses): Likewise

2015-11-30  Thomas Schwinge  <thomas@codesourcery.com>

	* passes.def: Use pass_ch instead of pass_ch_oacc_kernels.
	* tree-pass.h (make_pass_ch_oacc_kernels): Remove.
	* tree-ssa-loop-ch.c: Revert to trunk r230907 version.

2015-11-18  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c: Remove unneeded #includes. Backport
	comments and whitespace from trunk.
	(nvptx_print_operand): Remove 'R' case.
	(nvptx_find_sese): Backport dump file output from trunk.

2015-11-17  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_lockless_update): Remove complex
	double handling here ...
	(nvptx_lockfull_update): ... to this new function.
	(nvptx_reduction_update): New function.
	(nvptx_goacc_reduction_fini): Call it.

2015-11-16  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvtpx/nvptx.c (global_lock_var): New.
	(nvptx_global_lock_addr): New.
	(nvptx_lockless_update): Add support for complex.

2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_generate_vector_shuffle): Deal with
	complex types.

2015-11-12  Nathan Sidwell  <nathan@codesourcery.com>

	* langhooks-def.h (omp_mappable_type): Remove oacc arg.
	* langhooks.h (lhd_omp_mappable_type): Likewise.
	* langhooks.c (lhd_omp_mappable_type): Likswise.
	* gimplify.c (omp_notice_variable): Adjust omp_mappable_type call.

2015-11-11  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (enum gimplify_omp_var_data): Remove GOVD_FORCE_MAP.
	(omp_region_type): Use hex. Add OpenACC members.
	(omp_region_kind, acc_region_kind): Delete.
	(gimplify_omp_ctx): Remove region_kind & acc_region_kind fields.
	(new_omp_context): Adjust default_kind setting.  Don't
	reinitialize fiels.
	(gimple_add_tmp_var): Add ORT_ACC check.
	(gimplify_var_or_parm_decl): Likewise.
	(omp_firstprivatize_variable): Likewise.
	(omp_add_variable): Adjust OpenACC detection.
	(oacc_default_clause): Reimplement.
	(omp_notice_variable): Adjust OpenACC detection.
	(gimplify_scan_omp_clauses): Remove region_kind arg. Adjust.
	(gimplify_scan_omp_clause_1): Adjust OpenACC detection.
	(gimmplify_oacc_cache, gimplify_oacc_declare,
	gimplify_oacc_host_data, gimplify_omp_parallel): Adjust.
	(gimplify_omp_for, gimplify_omp_workshare,
	gimplify_omp_target_update): Adjust for OpenACC ORT flags.
	(gimplify_expr): Likewise.
	(gimplify_body): Simplify OpenACC declare handling.

2015-11-10  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (set_oacc_fn_attrib): Revert static storage specifier.

2015-11-10  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c: Backport whitespace & formatting changes from trunk.
	(is_atomic_compatible_p): Delete.
	(lower_reduction_clauses): Don't call it.
	(expand_omp_for_static_nochunk): Revert no-longer needed thread
	numbering expansion.
	(set_oacc_fn_attrib): Make static, fixup comment.
	(expand_omp_for_static_chunk): Likewise.
	(expand_omp_target): Adjust args initial size.
	(lower_omp_target): Rename label to oacc_firstprivate_map. Tweak
	assertions.

2015-11-09  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_xform_dim): Delete.
	(execute_oacc_device_lower): Remove IFN_GOACC_DIM_POS,
	IFN_GOACC_DIM_SIZE handling.

2015-11-09  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (release_first_vuse_in_edge_dest): Remove
	(expand_omp_target): Remove ssa support.

2015-11-09  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (pass_data_expand_omp): Add PROP_gimple_eomp to
	properties_provided.
	(pass_expand_omp::execute): Don't set PROP_gimple_eomp.

2015-11-09  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (pass_data_expand_omp_ssa): Remove TODO_remove_unused_locals
	from todo_flags_finish.

2015-11-09  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (pass_expand_omp_ssa::execute): Cleanup formatting.

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Remove superfluous pass_expand_omp_ssa.

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c: Remove omp-low.h include.

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (dominator_base::may_peel_loop_headers_p)
	(pass_dominator::may_peel_loop_headers_p)
	(pass_dominator_oacc_kernels::may_peel_loop_headers_p):: New function.
	(dominator_base::execute): Use may_peel_loop_headers_p.

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	revert:
	2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Add
	jump_threading_p parameters.
	(dom_opt_dom_walker::m_jump_threading_p): New private var.
	(pass_dominator::jump_threading_p): New protected virtual function.
	(pass_dominator::execute): Handle jump_threading_p.
	(dom_opt_dom_walker::before_dom_children)
	(dom_opt_dom_walker::after_dom_children): Handle m_jump_threading_p.

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Add pass_dce in oacc kernels pass group.
	* tree-parloops.c (dead_load_p): Remove.
	(ref_conflicts_with_region, oacc_entry_exit_ok_1): Remove handling of
	dead loads.

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (lower_omp_target): Remove insertion of IFN_GOACC_DIM_POS
	call in kernels region.
	* tree-parloops.c: Include gomp-constants.h.
	(oacc_entry_exit_single_gang): Remove gang_pos parameter.  Insert
	IFN_GOACC_DIM_POS call, if required.
	(oacc_entry_exit_ok): Remove gang_pos variable.

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c: Include tree-dfa.h.
	(get_omp_data_i_param): Simplify using ssa_default_def.

2015-11-07  Tom de Vries  <tom@codesourcery.com>

	revert:
	2015-10-08  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for_init_counts): Add inits for counters in
	zero_iter_bb.
	(expand_omp_for_generic): Remove TREE_NO_WARNING setttings on counters.

2015-11-07  Tom de Vries  <tom@codesourcery.com>

	* tree.c (no_overflow_tree_code): Remove.
	* tree.h (no_overflow_tree_code): Remove.

2015-11-07  Tom de Vries  <tom@codesourcery.com>

	* omp-builtins.def: Cleanup formatting.

2015-11-07  Tom de Vries  <tom@codesourcery.com>

	* cgraph.c (cgraph_node::release_body): Remove workaround.

2015-11-06  Tom de Vries  <tom@codesourcery.com>

	* builtin-attrs.def (DOT_DOT_DOT_r_r_r, DOT_DOT_DOT_DOT_r_r_r): Remove
	unused DEF_ATTR_FOR_STRING.
	(ATTR_FNSPEC_DOT_DOT_DOT_r_r_r_NOTHROW_LIST)
	(ATTR_FNSPEC_DOT_DOT_DOT_DOT_r_r_r_NOTHROW_LIST): Remove unused
	DEF_ATTR_TREE_LIST.

2015-11-06  Tom de Vries  <tom@codesourcery.com>

	Revert:
	2015-07-14  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (parallelize_loops): Use marked_independent flag in
	oacc kernels region.

	backport from trunk:
	2015-07-12  Aldy Hernandez  <aldyh@redhat.com>

	* tree-inline.c: Fix double word typos.

2015-11-06  Tom de Vries  <tom@codesourcery.com>

	revert:
	2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* domwalk.c (dom_walker::walk): Rename to ...
	(dom_walker::walk_until): ... this.  Add and handle until and
	until_inclusive parameters.
	(dom_walker::walk): Reimplement using dom_walker::walk_until.
	* domwalk.h (dom_walker::walk_until): Declare.

2015-11-06  Tom de Vries  <tom@codesourcery.com>

	* builtins.def (DEF_GOACC_BUILTIN_FNSPEC): Remove #undef and #define.
	* omp-builtins.def: Remove DEF_GOACC_BUILTIN_FNSPEC.

2015-11-06  Tom de Vries  <tom@codesourcery.com>

	revert:
	PR tree-optimization/65419
	2015-05-28  Tom de Vries  <tom@codesourcery.com>

	* cfgexpand.c (pass_data_expand): Add PROP_gimple_lompifn to
	properties_required field.
	* gimplify.c (gimplify_omp_workshare): Use IFN_GOACC_DATA_END_WITH_ARG
	instead of BUILT_IN_GOACC_DATA_END.  Clear PROP_gimple_lompifn in
	curr_properties.
	(gimplify_function_tree): Tentatively set PROP_gimple_lompifn in
	curr_properties.
	* internal-fn.c (expand_GOACC_DATA_END_WITH_ARG): New dummy function.
	* internal-fn.def (GOACC_DATA_END_WITH_ARG): New DEF_INTERNAL_FN.
	* omp-low.c (lower_omp_target): Set argument of GOACC_DATA_END_WITH_ARG.
	(pass_data_late_lower_omp): New pass_data.
	(pass_late_lower_omp): New pass.
	(pass_late_lower_omp::gate, pass_late_lower_omp::execute)
	(make_pass_late_lower_omp): New function.
	* passes.def: Add pass_late_lower_omp.
	* tree-inline.c (expand_call_inline): Handle PROP_gimple_lompifn.
	* tree-pass.h (PROP_gimple_lompifn): Add define.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (get_bbs_in_oacc_kernels_region):
	(loop_get_oacc_kernels_region_entry, get_oacc_kernels_region_exit)
	(oacc_kernels_region_entry_p): Remove.
	* omp-low.h: Same.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (gimple_stmt_omp_data_i_init_p, get_omp_data_i): Remove.
	* omp-low.h: Same.
	* tree-parloops.c (oacc_entry_exit_ok_1): Remove test on
	gimple_stmt_omp_data_i_init_p.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	revert:
	2015-04-21  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-copy.c (stmt_may_generate_copy): Handle .omp_data_i init
	conservatively.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	Revert:
	2015-04-21  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-ccp.c: Include omp-low.h.
	(surely_varying_stmt_p, ccp_visit_stmt): Handle .omp_data_i init
	conservatively.
	* tree-ssa-forwprop.c: Include omp-low.h.
	(pass_forwprop::execute): Handle .omp_data_i init conservatively.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	* omp-builtins.def (BUILT_IN_GOACC_KERNELS_INTERNAL): Remove
	DEF_GOACC_BUILTIN_FNSPEC.
	* omp-low.c (expand_omp_target): Remove handling of
	BUILT_IN_GOACC_KERNELS_INTERNAL.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_atomic_fetch_op):  Release defs of update stmt.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (set_oacc_fn_attrib): Remove static.
	* omp-low.h (set_oacc_fn_attrib): Declare.
	* tree-parloops.c (create_parallel_loop): Remove region_entry parameter.
	Remove handling of oacc kernels pragma and GOACC_kernels_internal call.
	Remove insertion of oacc parallel pragma.  Set oacc function attributes.
	(gen_parallel_loop): Remove region_entry parameter.
	(get_omp_data_i_param): New function.
	(try_create_reduction_list): Use get_omp_data_i_param instead of
	gimple_stmt_omp_data_i_init_p.
	(ref_conflicts_with_region): Handle GIMPLE_RETURN.
	(oacc_entry_exit_ok_1): Same.  Add missing is_gimple_call test before
	gimple_call_internal_p test.
	(oacc_entry_exit_ok): Remove region_entry parameter.  Use
	get_omp_data_i_param instead of get_omp_data_i.  Set region_bbs to all
	bbs in function.  Use function entry as region entry.
	(parallelize_loops): Allow oacc functions and parallelized function if
	oacc_kernels_p.  Remove	region_entry variable.
	(pass_parallelize_loops_oacc_kernels::execute): Clear PROP_gimple_eomp
	if a loop was parallelized.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	revert:
	2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (pass_dominator::jump_threading_p): Handle sese_mode_p.
	(pass_dominator::sese_mode_p, pass_dominator::get_sese): New protected
	virtual function.
	(pass_dominator::execute): Handle sese_mode_p.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	Revert:
	2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (dom_opt_dom_walker::set_skip_stmt): New function.
	(dom_opt_dom_walker::m_skip_stmt): New private var.
	(pass_dominator::get_sese): Add skip_stmt parameters.
	(pass_dominator::execute): Call set_skip_stmt with statement to skip for
	sese.
	(dom_opt_dom_walker::before_dom_children): Handle m_skip_stmt.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-loop.c: Include omp-low.h.
	(gate_oacc_kernels): Test for flag_tree_parallelize_loops.  Test for
	oacc function attribute.  Test for loop with in_oacc_kernels_region.

2015-11-05  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_target): Remove do_emit_library_call variable,
	assume true.  Remove do_splitoff variable, assume true.  Remove
	BUILT_IN_GOACC_KERNELS_INTERNAL handling.  Replace kernels region with a
	BUILT_IN_GOACC_PARALLEL call.

2015-11-04  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	PR tree-optimization/67742
	2015-11-04  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (struct fieldoff): Add restrict_pointed_type
	field.
	(push_fields_onto_fieldstack): Handle restrict_pointed_type field.
	(create_variable_info_for_1): Add and handle handle_param parameter.
	Add restrict handling.
	(create_variable_info_for): Call create_variable_info_for_1 with extra
	arg.
	(make_param_constraints): Drop restrict_name parameter.  Ignore
	vi->only_restrict_pointers.
	(intra_create_variable_infos): Call create_variable_info_for_1 with
	extra arg.  Remove restrict handling.  Call make_param_constraints with
	one less arg.

	* tree-ssa-structalias.c (create_variable_info_for_1): Use decl_type
	variable.

2015-11-04  Tom de Vries  <tom@codesourcery.com>

	revert:
	2015-10-03  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (struct fieldoff): Add restrict_var field.
	(push_fields_onto_fieldstack): Add and handle handle_param parameter.
	(create_variable_info_for_1): Add and handle
	handle_param parameter.  Add extra arg to call to
	push_fields_onto_fieldstack.  Handle restrict pointer fields.
	(create_variable_info_for): Call create_variable_info_for_1 with extra
	arg.
	(make_param_constraints): Drop restrict_name parameter.  Ignore
	vi->only_restrict_pointers.
	(intra_create_variable_infos): Call create_variable_info_for_1 with
	extra arg.  Remove restrict handling.  Call make_param_constraints with
	one less arg.

2015-11-03  Tom de Vries  <tom@codesourcery.com>

	* common.opt (foffload-alias): New option.
	* flag-types.h (enum offload_alias): New enum.
	* omp-low.c (install_var_field): Handle flag_offload_alias.
	* doc/invoke.texi (@item Code Generation Options): Add -foffload-alias.
	(@item -foffload-alias): New item.

2015-11-03  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-11-03  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (make_restrict_var_constraints): Rename to ...
	(make_param_constraints): ... this.  Add and handle restrict_name
	parameter.  Handle is_full_var case.
	(intra_create_variable_infos): Use make_param_constraints.

	* tree-ssa-structalias.c (make_restrict_var_constraints): Replace
	make_copy_constraint call with make_constraint_from call.

2015-11-03  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (oacc_entry_exit_ok_1): Remove shadowing declaration
	of ref.

2015-10-31  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-10-31  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (intra_create_variable_infos): Don't expect
	existing varinfo for arguments.

	* tree-ssa-structalias.c (ipa_pta_execute): Add extra arg to call to
	create_function_info_for.  Dump constraints generated during
	create_function_info_for. Move intra_create_variable_infos call and
	function-return-values-escape bit to ...
	(create_function_info_for): ... here, and merge
	intra_create_variable_infos call with argument loop.  Add and handle
	nonlocal_p parameter.

	* tree-ssa-structalias.c (create_function_info_for): Make sure prev_vi
	updating is alap, and seperated from preceding code.  Make sure
	insert_vi_for_tree is seperated from surrounding code.

	* tree-ssa-structalias.c (ipa_pta_execute): Use make_copy_constraint.

2015-10-30  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-10-30  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (ipa_pta_execute): Declare variable from as
	unsigned, and initialize, and use initial value instead of hardcoded
	constant.  Add generic constraints dumping section.  Don't dump global
	initializers constraints dumping section if empty.  Don't update
	variable from if unused.

	2015-10-28  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (intra_create_variable_infos): Remove
	superfluous code.

	* tree-ssa-structalias.c (intra_create_variable_infos): Don't iterate
	into vi_next of a full_var.

	* tree-ssa-structalias.c (new_var_info, make_heapvar)
	(make_constraint_from_restrict, make_constraint_from_global_restrict)
	(create_function_info_for, create_variable_info_for_1)
	(create_variable_info_for): Add and handle add_id parameter.
	(get_call_vi, new_scalar_tmp_constraint_exp, handle_rhs_call)
	(init_base_vars): Add extra argument to calls to new_var_info.
	(get_vi_for_tree): Add extra argument to call to
	create_variable_info_for.
	(process_constraint, do_deref, process_all_all_constraints): Add extra
	argument to calls to new_scalar_tmp_constraint_exp.
	(handle_lhs_call, find_func_aliases_for_builtin_call): Add extra
	argument to calls to make_heapvar.
	(make_restrict_var_constraints): Add extra argument to call to
	make_constraint_from_global_restrict.
	(intra_create_variable_infos): Add extra argument to call to
	create_variable_info_for_1.
	(ipa_pta_execute): Add extra argument to call to
	create_function_info_for.

	* gcc.dg/tree-ssa/pta-callused.c: Update to scan for CALLUSED(id).

	2015-10-27  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (push_fields_onto_fieldstack): Add and use var
	field_type.

	2015-10-26  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (make_restrict_var_constraints): New function,
	factored out of ...
	(intra_create_variable_infos): ... here.

	* tree-ssa-structalias.c (intra_create_variable_infos): Add
	restrict_pointer_p and recursive_restrict_p variables.

	* tree-ssa-structalias.c (intra_create_variable_infos): Inline
	get_vi_for_tree call.

	2015-10-23  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (intra_create_variable_infos): Use
	make_constraint_from.

	* tree-ssa-structalias.c (create_variable_info_for_1): Add missing
	setting of is_full_var in case of a single field.

2015-10-29  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (struct omp_context): Remove reductions field.
	(scan_sharing_clauses): Don't increment it.
	(lower_omp_target): Don't check it.  Move openacc dummy gang head
	& tail generation later & simplify.  Merge ifs.

2015-10-28  Nathan Sidwell  <nathan@codesourcery.com>

	* target.def (goacc.fork_join): Invert sense of result.
	* doc/tm.texi: Rebuilt.
	* config/nvptx/nvptx.md (nvptx_membar): Delete.
	* config/nvptx/nvptx.c: Update comments & formatting from trunk.
	(BARRIER_SHARED, BARRIER_GLOBAL, BARRIER_SYS): Delete.
	(worker_bcast_hwm): Rename to ...
	(worker_bcast_size): ... here.  Update users.
	(nvptx_emit_forking): Update SESE comment.
	(struct wcast_data_t): Document fields.
	(nvptx_print_operand): Remove 'B' handling.
	(propagator_fn): New typedef.
	(nvptx_propagate): Use it.
	(nvptx_goacc_fork_join): Invert result sense.
	* omp-low.c: Update comments and formatting from trunk.
	(scan_omp_target): Use flag_checking, not ENABLE_CHECKING.
	(struct oacc_collapse, expand_oacc_collapse_init,
	expand_oacc_collapse_vars): Move earlier.
	(default_goacc_fork_join): Use targetm, invert sense of result.
	(execute_oacc_device_lower): Adjust goacc.fork_join handling.

2015-10-26  Nathan Sidwell  <nathan@codesourcery.com>

	* doc/tm.texi: Rebuilt.
	* internal-fn.c (expand_GOACC_REDUCTION_SETUP,
	expand_GOACC_REDUCTION_INIT, expand_GOACC_REDUCTION_FINI,
	expand_GOACC_REDUCTION_TEADOWN): Replace with ...
	(expand_GOACC_REDUCTION): ... this.
	* internal-fn.def (GOACC_REDUCTION_SETUP,
	GOACC_REDUCTION_INIT, GOACC_REDUCTION_FINI,
	GOACC_REDUCTION_TEADOWN): Replace with ...
	(GOACC_REDUCTION): ... this.
	* internal-fn.h (enum ifn_goacc_reduction_kind): New.
	* omp-low.c (lower_rec_input_clauses): Adjust OpenACC comment.
	(lower_oacc_reductions): Remove RID & LID, calculate
	offset. Adjust for IFN_GOACC_REDUCTION change.
	(default_goacc_reduction): Don't return bool.  Adjust for argument
	shift.
	(execute_oacc_device_lower): Adjust for IFN_GOACC_REDUCTION
	change.
	* target.def (goacc_reduction): Adjust hook.
	* targhooks.h (default_goacc_reduction): Return void.
	* config/nvptx/nvptx.c (worker_red_hwm): Rename to ...
	(worker_red_size): ... here.
	(var_red_t, struct loop_red, loop_reds): Delete.
	(nvptx_reorg_reductions): Delete.
	(nvptx_reorg): Don't reorg reductoins.
	(nvptx_file_end): Adjust worker reduction size name.
	(nvptx_expand_worker_addr): Reimplement.
	(nvptx_init_builtins): Adjust WORKER_ADDR prototype.
	(nvptx_get_worker_red_addr): Reimplement.
	(nvptx_goacc_reduction_setup, nvptx_goacc_reduction_init,
	nvptx_goacc_reduction_fini, nvptx_goacc_reduction_teardown): Don't
	return bool.  Adjust for argument shift & worker offset
	processing.
	(nvptx_goacc_reduction): Adjust.

2015-10-26  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.c (expand_UNIQUE, expand_GOACC_DIM_SIZE,
	expand_GOACC_DIM_POS): Use targetm to discover and generate insns.
	* target-insns.def (oacc_dim_pos, oacc_dim_size, oacc_fork,
	oacc_join, unique): Define insns.

2015-10-26  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.c (expand_UNIQUE): Protect fork & join inside
	combined if defined.

2015-10-25  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.def (IFN_UNIQUE): Not a leaf.
	(IFN_UNIQUE, IFN_GOACC_LOOP): Move sub codes to ...
	* internal-fn.h (enum ifn_unique_kind, enum ifn_goacc_loop_kind):
	... here.  New enums.
	* internal-fn.c (expand_UNIQUE): Deal with data dependency var.
	* tree-cfg.c (gimple_call_initialize_ctrl_altering): Check for
	unique internal fn call.
	* config/nvptx/nvptx.md (oacc_fork, oacc_join): Deal with data
	dependency src & dest.
	* config/nvptx/nvptx.c (nvptx_xform_fork_join): Rename to ...
	(nvptx_goacc_fork_join): ... here.  Skip date dependency arg.
	* tracer.c (ignore_bb_p): Just look at last stmt for UNIQUE.
	* omp-low.c  (lower_oacc_head_mark): Take data dependency arg.
	Use quick_push.
	(lower_oacc_loop_marker): Take data dependency arg.
	(lower_oacc_head_tail): Insert data dependency var.
	(new_oacc_loop): Adjust arg numbering.
	(dump_oacc_loop_part): Cope with block-straddling sequences.
	(oacc_loop_discover_walk): Likewise.
	(oacc_loop_xform_head_tail): Likewise.
	(execute_oacc_device_lower): Use two bools for scanning &
	deletion.

2015-10-21  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (check_omp_nesting_restrictions): Correctly check
	OpenACC loop nesting.

2015-10-20  Nathan Sidwell  <nathan@codesourcery.com>

	* lto-cgraph.c (input_overwrite_node): Cleanup openacc diagnostic
	emission.

2015-10-20  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (expand_oacc_for): Use -1 for unspecified static
	chunking.  Remove unnecessary gimple forcing.
	(oacc_xform_loop): Adjust chunk size calculation.  Don't chunk on
	host.

2015-10-19  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (scan_omp_for): Combine OpenACC conditional.
	(expand_oacc_get_num_threads, expand_oacc_get_thread_num): Delete.
	(oacc_thread_numbers): New.
	(oacc_xform_loop): Correct comment, Use oacc_thread_numbers.

2015-10-19  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_loop_auto_partitions): New.
	(oacc_loop_partition): Call it.

2015-10-19  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (parallelize_loops): Do not parallelize loops in
	offloaded functions.

2015-10-19  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (struct omp_region): Remove gwv_this field.
	(struct omp_context): Remove gwv_this and gwv_belop fields.
	(struct oacc_loop): Add marker field.
	(enum oacc_loop): Adjust OLF_DIM_BASE initializer.
	(extract_oacc_loop_mask): Delete.
	(extrac_oacc_routine_gwv): Delete.
	(oacc_loop_or_target_p): Delete.
	(check_oacc_kernel_gwv): New.
	(scan_omp_for): Remove OpenACC gwv mask handling.  Check gang,
	worker, vector argments.
	(scan_omp_1_stmt): Remove OpenACC gwv mask checking.
	(lower_oacc_head_mask): Set OLF_AUTO whenever possible. Ensure 1
	level of headers.
	(find_omp_for_region_gwv): Delete.
	(find_omp_for_region_data): Remove gwv setting.  Only set
	independent field for kernels.
	(find_omp_target_region_data): Delete.
	(build_omp_regions_1): Set region kind here.
	(new_oacc_loop_raw): Initialize marker field.
	(new_oacc_loop): Likewise.  Don't set mask here.
	(new_oacc_loop_routine): Set marker field.
	(dump_oacc_loop): Dump marker.
	(oacc_loop_walk): Rename to ...
	(oacc_loop_discover_walk): ... here.  Adjust head & tail
	recording.
	(oacc_loop_sibling_nreverse): New.
	(oacc_loop_discovery): Reverse siblings.  Don't dump loops here.
	(oacc_loop_process): Adjust & remove asserts.
	(oacc_loop_fixed_partitions): New.
	(oacc_loop_partition): New.
	(execute_oacc_device_lower): Partition loops, neuter unused loop
	heads & tails.

2015-10-16  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (build_outer_var_ref): Just check for openacc function
	attrib.
	(pass_oacc_device_lower::execute): Don't inhibit if errors have
	happened.

2015-10-16  Tom de Vries  <tom@codesourcery.com>

	* tree-pretty-print.c (dump_omp_clause): Handle bind clause.

2015-10-16  Tom de Vries  <tom@codesourcery.com>

	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_NOHOST.  Fix
	infinite recursion in default label.

2015-10-16  Tom de Vries  <tom@codesourcery.com>

	* tree-pretty-print.c (dump_omp_clause): Handle device-resident
	and link map kinds.

2015-10-16  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (check_omp_nesting_restrictions): Check for oacc region in
	oacc routine.

2015-10-15  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (execute_oacc_device_lower): Move later in file.

	* omp-low.c (lower_oacc_reductions): Check outer context is a
	target before lookup.

2015-10-15  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (struct oacc_loop): Add chunk_size and head_end
	fields.
	(extract_omp_for_data): Don't extract OpenACC partitioning or
	chunk size here.
	(lower_oacc_head_mark): Substitute gang_static size.
	(expand_oacc_for): Don't specify parallel region chunking or
	partitioning here.
	(oacc_xform_loop): Stride a single worker partition.  Add
	conversions for chunk size.
	(new_oacc_loop_raw): Initialize new fields.
	(new_oacc_loop): Set chunk_size.
	(oacc_loop_walk): Set head_end.
	(oacc_loop_xform_loop): New.
	(oacc_loop_process): Call it.

2015-10-14  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (lower_reduction_clauses): Correct comment, remove
	unreachable code.

2015-10-14  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	PR tree-optimization/67476
	2015-10-13  Tom de Vries  <tom@codesourcery.com>

	* doc/invoke.texi (@item parloops-schedule): New item.
	* params.def (PARAM_PARLOOPS_SCHEDULE): New DEFPARAMENUM5.
	* tree-parloops.c: Include params-enum.h.
	(create_parallel_loop): Handle PARAM_PARLOOPS_SCHEDULE.

2015-10-14  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-10-13  Tom de Vries  <tom@codesourcery.com>

	* Makefile.in (PARAMS_H, PLUGIN_HEADERS): Add params-enum.h.
	* params-enum.h: New file.
	* opts.c (handle_param): Handle case that param arg is a string.
	* params-list.h: Handle DEFPARAMENUM5 in params.def.
	* params.c (find_param): New function, factored out of ...
	(set_param_value): ... here.
	(param_string_value_p): New function.
	* params.h (struct param_info): Add value_names field.
	(find_param, param_string_value_p): Declare.

2015-10-14  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	PR tree-optimization/67476
	2015-10-13  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for_generic): Handle original loop tree.

2015-10-14  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	PR tree-optimization/67476
	2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for_generic): Add missing phis.

2015-10-14  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	PR tree-optimization/67476
	2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for_generic): Handle simple latch.

2015-10-14  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (struct oacc_loop): Add more fields.
	(enum oacc_loop_flags): New.
	(lower_oacc_head_mark): New.
	(lower_oacc_loop_marker): Change meaning of 2nd parameter.
	(lower_oacc_head_tail): Call lower_oacc_head_mark, adjust.
	(new_oacc_loop_raw): Initialize new fields.
	(new_oacc_loop): Extract flags and mask from marker function.
	(new_oacc_loop_routine): New.
	(finish_oacc_loop): Remove tail parameter.
	(dump_oacc_loop_part, dump_oacc_loop): Adjust for new fields.
	(oacc_loop_walk): Collect markers for same loop into single loop
	structure.  Notice routines.
	(oacc_loop_transform): Rename to ...
	(oacc_loop_xform_head_tail): ... here.
	(oacc_loop_process): Assign partitioning levels to head & tail
	sequences.

2015-10-13  Tom de Vries  <tom@codesourcery.com>

	Revert:
	2015-04-21  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-sccvn.c: Include omp-low.h.
	(visit_use): Handle .omp_data_i init conservatively.

2015-10-13  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (pass_dominator_oacc_kernels::clone): New function.
	* passes.def: Move pass group pass_oacc_kernels to before pass_fre. Add
	pass_dominator_oacc_kernels twice in the pass_oacc_kernels pass group.

2015-10-13  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.def (IFN_UNIQUE_OACC_HEAD_MARK,
	IFN_UNIQUE_TAIL_MARK): New.
	* omp-low.c (struct oacc_loop): New.
	(lower_oacc_reductions): Change DIM argument to LEVEL.
	(lower_oacc_loop_marker): New.
	(lower_oacc_head_tail): Insert loop head and tail markers.
	(lower_omp_target): Adjust lower_oacc_reductions call.
	(new_oacc_loop_raw, new_oacc_loop_outer, new_oacc_loop,
	finish_oacc_loop, free_oacc_loop): New.
	(dump_oacc_loop_part, dump_oacc_loop, debug_oacc_loop): New.
	(oacc_loop_walk, oacc_loop_discovery): New.
	(oacc_loop_transform, oacc_loop_process): New.
	(execute_oacc_device_lower): Discover and process loops.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (is_oacc_kernels): New function.
	(lower_omp_target): Insert gang-pos at start of kernels region.
	(execute_oacc_device_lower): Handle IFN_GOACC_DIM_POS without result.
	* tree-parloops.c (create_parallel_loop): Don't expect
	single_pred_p (bb) if oacc_kernels_p.
	(oacc_entry_exit_ok_1): Add and handle reduction_stores parameter.
	(oacc_entry_exit_single_gang): New function.
	(oacc_entry_exit_ok): Call oacc_entry_exit_single_gang.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (lower_omp_for): Don't call lower_oacc_head_tail for oacc
	kernels regions.
	* tree-parloops.c (try_create_reduction_list): Initialize keep_res
	field.
	(dead_load_p, ref_conflicts_with_region, oacc_entry_exit_ok_1)
	(oacc_entry_exit_ok): New function.
	(parallelize_loops): Call oacc_entry_exit_ok.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (get_bbs_in_oacc_kernels_region): New function.
	* omp-low.h (get_bbs_in_oacc_kernels_region): Declare.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Add pass_dominator_oacc_kernels to pass group
	pass_oacc_kernels.
	Add pass_tree_loop_done before, and pass_tree_loop_init after.
	* tree-pass.h (make_pass_dominator_oacc_kernels): Declare.
	* tree-ssa-dom.c (class dominator_base): New class.  Factor out of ...
	(class pass_dominator): ... here.
	(pass_dominator_oacc_kernels): New pass.
	(make_pass_dominator_oacc_kernels): New function.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (get_oacc_kernels_region_exit, get_omp_data_i): New
	function.
	(oacc_kernels_region_entry_p): New function. Factor out of ...
	(gimple_stmt_omp_data_i_init_p): ... here.
	* omp-low.h (get_oacc_kernels_region_exit, oacc_kernels_region_entry_p)
	(get_omp_data_i): Declare.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (dom_opt_dom_walker::set_skip_stmt): New function.
	(dom_opt_dom_walker::m_skip_stmt): New private var.
	(pass_dominator::get_sese): Add skip_stmt parameters.
	(pass_dominator::execute): Call set_skip_stmt with statement to skip for
	sese.
	(dom_opt_dom_walker::before_dom_children): Handle m_skip_stmt.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (pass_dominator::jump_threading_p): Handle sese_mode_p.
	(pass_dominator::sese_mode_p, pass_dominator::get_sese): New protected
	virtual function.
	(pass_dominator::execute): Handle sese_mode_p.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* domwalk.c (dom_walker::walk): Rename to ...
	(dom_walker::walk_until): ... this.  Add and handle until and
	until_inclusive parameters.
	(dom_walker::walk): Reimplement using dom_walker::walk_until.
	* domwalk.h (dom_walker::walk_until): Declare.

2015-10-12  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Add
	jump_threading_p parameters.
	(dom_opt_dom_walker::m_jump_threading_p): New private var.
	(pass_dominator::jump_threading_p): New protected virtual function.
	(pass_dominator::execute): Handle jump_threading_p.
	(dom_opt_dom_walker::before_dom_children)
	(dom_opt_dom_walker::after_dom_children): Handle m_jump_threading_p.

2015-10-12  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (expand_omp_for_static_nochunk): Remove OpenACC
	pieces.
	(expand_omp_for_static_chunk): Likewise,
	(struct oacc_collapse): New.
	(expand_oacc_collapse_init, expand_oacc_collapse_vars): New.
	(expand_oacc_for): New.
	(expand_omp_for): Call expand_oacc_for for OpenACC loops.
	(oacc_xform_loop): New.
	(execute_oacc_device_lower): Call it.
	* internal-fn.def (GOACC_LOOP): New internal fn.
	(IFN_GOACC_LOOP_CHUNKS, IFN_GOACC_LOOP_STEP,
	IFN_GOACC_LOOP_OFFSET, IFN_GOACC_LOOP_BOUND): New.
	* internal-fn.c (expand_GOACC_LOOP): New.

2015-10-11  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.def (IFN_UNIQUE_UNSPEC, IFN_UNIQUE_OACC_FORK,
	IFN_UNIQUE_OACC_JOIN): Move to IFN_UNIQUE definition.
	* internal-fn.c (expand_GOACC_REDUCTION_*): Correct comments.

2015-10-09  James Norris  <jnorris@codesourcery.com>

	Backport from trunk:
	2015-10-09  James Norris  <jnorris@codesourcery.com>
	* config/rs6000/rs6000.c (rs6000_offload_options): New.
	(TARGET_OFFLOAD_OPTIONS): New.

2015-10-09  Nathan Sidwell  <nathan@acm.org>

	* config/nvptx/nvptx.c (nvptx_init_axis_predicate): Fix output
	formatting.

	PR 67861
	* gimple-fold.c (gimple_fold_builtin): Add break after
	BUILT_IN_PRINTF_CHK, BUILT_IN_VPRINTF_CHK folding.

2015-10-09 James Norris  <jnorris@codesourcery.com>

	Revert:
	2015-10-06 James Norris  <jnorris@codesourcery.com>

	* common.opt (OFFLOAD_ABI_PPC64): New enum.
	* config/nvptx/mkoffload.c (compile_native): Handle new enum.
	(main): Handle new option.
	* config/rs6000/rs6000.c (rs6000_offload_options): New hook.
	* gcc/coretypes.h (OFFLOAD_ABI_PPC64): New enum.

2015-10-08  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for_init_counts): Add inits for counters in
	zero_iter_bb.
	(expand_omp_for_generic): Remove TREE_NO_WARNING setttings on counters.

2015-10-07 James Norris  <jnorris@codesourcery.com>

	Backport from trunk:
	2015-10-07  James Norris  <jnorris@codesourcery.com>
	* testsuite/lib/atomic-dg.exp (atomic_link_flags): Move flag setting
	to atomic_init. (atomic_init): Restrict flags usage.

2015-10-06 James Norris  <jnorris@codesourcery.com>

	* common.opt (OFFLOAD_ABI_PPC64): New enum.
	* config/nvptx/mkoffload.c (compile_native): Handle new enum.
	(main): Handle new option.
	* config/rs6000/rs6000.c (rs6000_offload_options): New hook.
	* gcc/coretypes.h (OFFLOAD_ABI_PPC64): New enum.

2015-10-05  Thomas Schwinge  <thomas@codesourcery.com>

	* config/nvptx/mkoffload.c (main): Don't explicitly pass "-lgomp"
	to the offload compiler.

2015-10-01  Nathan Sidwell  <nathan@codesourcery.com>

	* builtins.c: Don't include gomp-constants.h.
	(fold_builtin_1): Don't fold acc_on_device here.
	* gimple-fold.c: Include gomp-constants.h.
	(gimple_fold_builtin_acc_on_device): New.
	(gimple_fold_builtin): Call it.

2015-10-01  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_validate_dims): Rename to ...
	(nvptx_goacc_validate_dims): ... here.
	(TARGET_GOACC_VALIDATE_DIMS): Update.
	* target.def (validate_dims): Expand documentation.
	* omp-low.c (default_goacc_validate_dims): Remove erroneous ARG_UNUSED.
	* doc/tm.texi: Rebuild.

2015-10-01  Thomas Schwinge  <thomas@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_xform_lock): Remove function.

2015-09-30  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-cfg.c (replace_ssa_name): Revert obsolete changes.

2015-09-30  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (release_dangling_ssa_names): Remove.
	(pass_omp_expand_ssa::execute): Remove call to
	release_dangling_ssa_names.

2015-09-30  Tom de Vries  <tom@codesourcery.com>

	Revert:
	2015-08-05  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (release_dangling_ssa_names): Release SSA_NAMEs with NULL
	def stmt.
	* tree-cfg.c (replace_ssa_name): Don't move default def nops.  Set def
	stmt of unused SSA_NAME to NULL.

2015-09-29  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (check_omp_nesting_restrictions): Update the error
	message for loops not affliated with acc compute regions.

2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	* passes.def: Rename pass_oacc_transform to pass_oacc_device_lower.
	* tree-pass.h (make_pass_oacc_transform): Rename to ...
	(make_pass_oacc_device_lower): ... here.
	* doc/invoke/texi (oaccdevlow): Document tree dump flag.
	* omp-low.c (execute_oacc_transform): Rename to ...
	(execute_oacc_device_lower): ... here.
	(pass_data pass_data_oacc_transform): Rename to ...
	(pass_data pass_data_oacc_device_lower): ... here. Adjust name.
	(class pass_oacc_transform): Rename to ...
	class pass_oacc_device_lower): ... here.
	(make_pass_oacc_transform): Rename to ...
	(make_pass_oacc_device_lower): ... here.

2015-09-29  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_xform_on_device): Delete.
	(oacc_xform_dim): Return bool.
	(execute_oacc_transform): Don't handle acc_on_device here.  Adjust
	rescan logic.
	* builtins.c (expand_builtin_acc_on_device): Delete.
	(expand_builtin): Do not call it.
	(fold_builtin_1): Fold acc_on_device.

2015-09-29  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (ctx_in_oacc_kernels_region): Make static.  Add missing
	function header comment.

2015-09-29  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for_generic): Only set address taken for
	istart0 and end0 unless necessary.

2015-09-29  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (ctx_in_oacc_kernels_region): New function.
	(scan_omp_for): Filter out reduction clauses in kernels region.

2015-09-28  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (check_omp_nesting_restrictions): Check for acc loops not
	associated with acc regions or routines.

2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>

	* target.def (GOACC_LOCK): Delete hook.
	* doc/tm.texi.in (TARGET_GOACC_LOCK): Delete.
	* doc/tm.texi: Rebuilt.
	* targhooks.h (default_goacc_lock): Delete.
	* internal-fn.def (GOACC_LOCK,  GOACC_UNLOCK, GOACC_LOCK_INIT): Delete.
	* internal-fn.c (expand_GOACC_LOCK, expand_GOACC_UNLOCK,
	expand_GOACC_LOCK_INIT): Delete.
	* omp-low.c (lower_oacc_reductions): Remove locking.
	(execute_oacc_transform): Remove lock transforming.
	(default_goacc_lock): Delete.
	
	* config/nvptx/nvptx-protos.h (nvptx_expand_oacc_lock): Delete.
	* config/nvptx/nvptx.md (oacc_lock, oacc_unlock, oacc_lock_init):
	Delete.
	(nvptx_spin_lock, nvptx_spin_reset): Delete.
	* config/nvptx/nvptx.c (LOCK_GLOBAL, LOCK_SHARED, LOCK_MAX): Delete.
	(lock_names, lock_space, lock_level, lock_used): Delete.
	(force_global_locks): Delete.
	(nvptx_option_override): Do not initialize lock syms.
	(nvptx_expand_oacc_lock): Delete.
	(nvptx_file_end): Do not finalize locks.
	(TARGET_GOACC_LOCK): Delete.

2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (atomic_compare_and_swap<mode>_1,
	atomic_exchange<mode>): Incoming values can be constants.
	* config/nvptx/nvptx.c (nvptx_expand_swap): Delete.
	(nvptx_expand_cmp_swap): Force operands into regs.
	(enum nvptx_builtins): Delete SWAP and SWAPLL.
	(nvptx_init_builtins): Likewise.
	(nvptx_expand_builtin): Likewise.
	(nvptx_xform_lock): Always return true.
	(nvptx_get_worker_red_addr): No need to deal with QI and HI modes.
	(nvptx_generate_vector_shuffle): Tweak.
	(nvptx_lockless_update): New.
	(nvptx_goacc_reduction_setup): Remove bitrotted description, add
	comments.
	(nvptx_goacc_reduction_teardown, nvptx_goacc_reduction_init): Likewise.
	(nvptx_goacc_reduction_fini): Likewise.  Call lockless update.

2015-09-26  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (mark_loops_in_oacc_kernels_region): Don't parallelize the
	kernels region if it contains more than one outer loop.

2015-09-25  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (parallelize_loops): Skip inner loops in oacc kernels
	region.

2015-09-24  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (struct builtin_description): Delete.
	(nvptx_expand_shuffle_down): Rename to ...
	(nvptx_expand_shuffle): ... here.  add additional arg for type of
	shuffle.
	(nvptx_expand_work_red_addr): Rename to ...
	(nvptx_expand_worker_addr): ... here.
	(nvptx_expand_swap): New.
	(nvptx_expand_cmp_swap): New.
	(enum nvptx_types): Delete.
	(enum nvptx_builtins): Rename builtins.  Remove float mode
	shuffles, add SWAP and CMP_SWAP.
	(builtins): Delete.
	(nvptx_init_builtins): Reimplement.
	(nvptx_expand_builtin): Likewise.
	(nvptx_get_worker_red_addr): Adjust.
	(nvptx_generate_vector_shuffle): Adjust.

2015-09-24  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_expand_work_red_addr): Args 0 & 1
	are size and alignment of allocation.
	(nvptx_types): Delete  NT_UINTPTR_UINT_UINT, NT_ULLPTR_UINT_UINT,
	NT_FLTPTR_UINT_UINT, NT_DBLPTR_UINT_UINT.  Add
	NT_PTR_UINT_UINT_UINT_UINT.
	(nvptx_builtins): Delete __builtin_nvptx_work_red_addrll,
	__builtin_nvptx_work_red_addrf,
	_builtin_nvptx_work_red_addrd. Adjust
	__builtin_nvptx_work_red_addr type.
	(nvptx_init_builtins): Adjust.
	(nvptx_get_worker_addr_fn): Rename to ...
	(nvptx_get_worker_red_addr): ... here.  Use single builtin and
	cast return type.
	(nvptx_goacc_reduction_setup, nvptx_goacc_reduction_fini,
	nvptx_goac_reduction_teardown): Adjust.

2015-09-23  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_omp_for): Don't remap OMP_CLAUSE_COLLAPSE
	because it always a constant value.

2015-09-23  Nathan Sidwell  <nathan@codesourcery.com>

	* target.def: GOACC hooks take gcall arg.
	* doc/tm.texi: Regenerate.
	* targhooks.h (default_goacc_reduction, default_goacc_fork_join,
	default_coacc_lock): Gimple is a gcall pointer.
	* omp-low.c (oacc_xform_on_device): Arg is a gcall.  Adjust.
	(oacc_xform_dim): Likewise.
	(execute_oacc_transform): Adjust to pass gcall pointer to worker
	functions.  Handle rescan immediately.
	(default_goacc_reduction, default_goacc_fork_join,
	default_coacc_lock): Gimple is a gcall pointer.
	*  config/nvptx/nvptx.c (nvptx_xform_fork_join,
	nvptx_xform_lock, nvptx_goacc_reduction_setup,
	nvptx_goacc_reduction_init, nvptx_goacc_reduction_fini, 
	nvptx_goacc_reduction_teardown, nvptx_goacc_reduction): Argument
	is a gcall, adjust.

2015-09-23  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_omp_for): Remap any variables present in
	OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR and
	OMP_CLAUSE_COLLAPSE becuase they will be used later by expand_omp_for.

2015-09-23  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_generate_vector_shuffle):
	Reimplement using integer builtins and VIEW_CONVERT_EXPR.
	(nvptx_goacc_reduction_fini): Pass location to
	nvptx_generate_vector_shuffle.

2015-09-23  Thomas Schwinge  <thomas@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_file_start): Don't print declaration
	of sdata.
	* omp-low.c (align_and_expand): Remove function.

2015-09-22  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (oacc_default_clause): Inspect pointer types when
	determining implicit data mappings.

2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_lid, oacc_gang_reduction_init,
	oacc_gang_reduction_fini): Delete.
	(lower_oacc_reductions): Reimplement to generate all 4 reduction
	functions in one go.
	(oacc_fake_gang_reduction): Delete.
	(lower_oacc_head_tail): New. Create both head and tail sequences
	in one go.
	(lower_oacc_loop_helper): Delete.
	(lower_reduction_clauses): Don't lower oacc reductions here.
	(lower_oacc_loop_enter_exit): Delete.
	(lower_omp_for): Update to use lower_oacc_head_tail.
	(lower_omp_target): Update for lower_oacc_reductions change.
	* gimplify.c (localize_reductions): Remove default arg, update
	callers.  Always localize reference reductions.l
	* config/nvptx/nvptx.c (nvptx_goacc_reduction_setup): Check for
	receiver object read for non-gang reductions.
	(nvptx_goacc_reduction_teardown): Likewise.
	(nvptx_goacc_reduction_init): Copy var for gang reductions lacking
	a receiver object.
	(nvptx_goacc_reduction_fini): Likewise.

2015-09-22  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-parloops.c (initialize_reductions): Remove local variable
	bvar.

2015-09-18  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.h (omp_reduction_init_op): Declare.
	* omp-low.c (omp_reduction_init_op): New, broken out of ...
	(omp_reduction_init): ... here.  Call it.
	* tree-parloops.c (initialize_reductions): Use
	omp_redutction_init_op.
	* config/nvptx/nvptx.c (nvptx_shuffle_reduction): Fold into only
	caller.
	(nvptx_goacc_reduction_setup, nvptx_goacc_reduction_init,
	nvptx_goacc_reduction_fini, goacc_reduction_teardown): Reimplement
	& simplify.

2015-09-18  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (default_goacc_reduction): Move to other default
	handlers, reimplement to simplify.
	(default_goacc_reduction_setup, default_goacc_reduction_teardown,
	default_goacc_reduction_init_fini): Remove.

2015-09-18  Thomas Schwinge  <thomas@codesourcery.com>

	* target.def <goacc> (validate_dims, dim_limit, fork_join, lock):
	Spell out the formal parameters' names.  Fix typos.
	* doc/tm.texi: Regenerate.

2015-09-16  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_validate_dims): New function, broken out of ...
	(execute_oacc_transform): ... here.  Call it.

2015-09-16  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (lower_oacc_reductions): Remove dead initialization
	and unreachable code.

2015-09-14  Nathan Sidwell  <nathan@codesourcery.com>

	* gimple.h (gimple_call_internal_unique_p): Make inline.
	* internal-fn.def (UNIQUE): New.
	(GOACC_FORK, GOACC_JOIN): Delete.
	(IFN_UNIQUE_UNSPEC, IFN_UNIQUE_OACC_FORK,
	IFN_UNIQUE_OACC_JOIN): Define.
	* internal-fn.c (gimple_call_internal_unique_p): Delete.
	(expand_UNIQUE): New.  Absorb ...
	(expand_GOACC_FORK, expand_GOACC_JOIN): ... these.  Delete.
	* omp-low.c (lower_oacc_loop_helper): Emit IFN_UNIQUE call.
	(lower_pacc_loop_enter_exit): Adjust.
	(execute_oacc_transform): Check IFN_UNIQUE for fork & join.
	* config/nvptx/nvptx.c (nvptx_xform_fork_join): Adjust arg
	position.

2015-09-14  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (lower_oacc_loop_enter_exit): Use separate loops for
	entry and for exit.

2015-09-14  James Norris  <jnorris@codesourcery.com>

	* varpool.c (make_offloadable): Handle link variable in routine.

2015-09-11  Nathan Sidwell  <nathan@codesourcery.com>

	Implement SESE block neutering optimization.
	* config/nvptx/nvptx.c (bb_pair_t, bb_pair_vec_t,
	pseudo_node_t): New typdefs.
	(struct bracket): New struct.
	(bracket_vec_t): New typedef.
	(struct bb_sese): New struct.
	(bb_sese:~bb_sese, bb_sese::append, bb_sese::remove): Member fns.
	(BB_SET_SESE, BB_GET_SESE): Local accessors.
	(nvptx_sese_number, nvptx_sese_pseudo, nvptx_sese_color): Worker
	fns for finding SESE regions.
	(nvptx_find_sese): SESE region finder.
	(nvptx_neuter_pars): Find & neuter SESE regions when optimizing.

2015-09-11  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (build_outer_var_ref): Don't scan for outer contexts
	when the current context represents an acc parallel region.

2015-09-11  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_emit_forking): Always emit fork.
	(bb_par_t, bb_par_vec_t): Delete.
	(nvptx_find_par): New recursive function. Broken out of ...
	(nvptx_discover_pars): ... here.  Call it.
	(nvptx_optimize_inner): Write to dump_file.

2015-09-11  James Norris  <jnorris@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_use_anchors_for_symbol): New
	(TARGET_USE_ANCHORS_FOR_SYMBOL_P): Override.

2015-09-10  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c: Move df.h include earlier.
	(nvptx_emit_forking, nvptx_emit_joining): Move earlier.
	(nvptx_expand_call): Restore to earlier position in file.
	(nvptx_reorg_subreg): Pass PATTERN to asm_noperands.
	(nvptx_reorg): Expand some comments.

2015-09-10  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_init_axis_predicate): New.
	(nvptx_declare_function_name): Initialize axis predicates.
	(nvptx_single): Use or init machine_function axis predicate.
	* config/nvptx/nvptx.h (struct machine_function): Add
	axis_predicate field.

2015-09-09  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (execute_oacc_transform): Use integer_zerop, not
	direct node comparison.

2015-09-09  Nathan Sidwell  <nathan@codesourcery.com>

	Port from trunk:
	* config/nvptx/nvptx.md (allocate_stack): Emit sorry.
	(atomic_compare_and_swap<mode>_1): Use sel_truesi.
	* config/nvptx/nvptx.c (nvptx_write_function_decl): Reformat.
	(nvptx_reorg_subreg): Pass insn pattern to asm_operands.
	(walk_args_for_param): Use arg_promotion for both split and
	non-split args.
	(nvptx_declare_function_name): Insert formatting tabs for
	consistency.  Look at crtl->stack_alignment_needed to determine
	alignment.
	(nvptx_get_drap_rtx): New.
	(TARGET_GET_DRAP_RTX): Override.
	* config/nvptx/nvptx.h (MAX_STACK_ALIGNMENT): Set.

2015-09-09  Chung-Lin Tang  <cltang@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_xform_lock): Correct typo
	of variable 'force_global_locks'.

2015-09-08  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (force_global_lock): New global variable.
	(nvptx_expand_oacc_lock): Use it to workaround a shared memory lock
	problem.
	(nvptx_xform_lock): Likewise.

2015-09-01  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_goacc_reduction_teardown): Allow
	lhs to be NULL for worker reductions too.
	* omp-low.c (lower_rec_input_clauses): Bail out on OpenACC reductions.
	(lower_oacc_reductions): Use maybe_lookup_decl for private reductions.
	Don't emit locks for fake private gang reductions.

2015-09-01  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (create_parallel_loop): Remove unused variable
	goacc_kernels_internal.

2015-09-01  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (align_and_expand): Mark as unused.

2015-09-01  Tom de Vries  <tom@codesourcery.com>

	* target.def: Fix unknown escape sequence 040 error in reduction
	DEFHOOK.
	* doc/tm.texi: Regenerate.

2015-09-01  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md: Use tabs and operand spacing consistently
	throughout.
	(nvptx_spin_lock): Use set.
	(nvptx_spin_reset): Likewise.

2015-08-31  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (expand_omp_target): Lose shared_size parameter.
	* omp-builtins.def (GOACC_KERNELS, GOACC_PARALLEL): Lose
	shared_size parameter.
	* builtin-types.def (DEF_FUNCTION_TYPE_VAR_6): Define.

	fortran/
	* f95-lang.c (DEF_FUNCTION_TYPE_VAR_6): Define.
	* types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_VAR): Declare.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_SIZE_VAR): Delete.

	lto/
	* lto-lang.c (DEF_FUNCTION_TYPE_VAR_6): Define.

	c-family/
	* c-common.c (DEF_FUNCTION_TYPE_VAR_6): Define.
	
2015-08-28  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (extract_oacc_routine_gwv): New function.
	(build_outer_var_ref): Handle refs inside acc routines.
	(scan_omp_for): Check nested parallelism inside acc routines.
	(scan_omp_1_stmt): Check for compatible parallelism when calling
	routines.
	(execute_oacc_transform): Remove dead variable.

2015-08-27  Cesar Philippidis  <cesar@codesourcery.com>

	* builtins.c (expand_oacc_ganglocal_ptr): Delete.
	(expand_builtin): Remove stale GOACC_GET_GANGLOCAL_PTR builtin.
	* config/nvptx/nvptx.md (ganglocal_ptr): Delete.
	* gimple.h (struct gimple_statement_omp_parallel_layout): Remove
	ganglocal_size member.
	(gimple_omp_target_ganglocal_size): Delete.
	(gimple_omp_target_set_ganglocal_size): Delete.
	* omp-builtins.def (BUILT_IN_GOACC_GET_GANGLOCAL_PTR): Delete.
	* omp-low.c (struct omp_context): Remove ganglocal_init, ganglocal_ptr,
	ganglocal_size, ganglocal_size_host, worker_var, worker_count and
	worker_sync_elt.
	(alloc_var_ganglocal): Delete.
	(install_var_ganglocal): Delete.
	(new_omp_context): Don't use ganglocal memory.
	(expand_omp_target): Likewise.
	(lower_omp_taskreg): Likewise.
	(lower_omp_target): Likewise.
	* tree-parloops.c (create_parallel_loop): Likewise.
	* tree-pretty-print.c (dump_omp_clause): Remove support for
	GOMP_MAP_FORCE_TO_GANGLOCAL

2015-08-26  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_oacc_reductions): Call GOACC_REDUCTION_INIT
	to initialize the gang and worker mutex.

2015-08-26  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (struct privatize_reduction): New struct.
	(localize_reductions_r): New function.
	(localize_reductions): New function.
	(gimplify_omp_for): Use it.
	(gimplify_omp_workshare): Likweise.
	* omp-low.c (struct omp_context): Remove reduction_map and
	oacc_reduction_set. Add 'int reductions'.
	(oacc_gang_reduction_init): New gimple_seq to contain initialization
	code for fake gang reductions.
	(oacc_gang_reduction_fini): Ditto, but for finalization code.
	(extract_oacc_loop_mask): New function.
	(is_oacc_reduction_private): New function.
	(lookup_oacc_reduction): Delete.
	(maybe_lookup_oacc_reduction): Delete.
	(new_omp_context): Remove stale references to reduction_map.
	(delete_omp_context): Likewise.
	(scan_sharing_clauses): Don't populate the oacc_reduction_set
	or create a special ganglocal mapping for reductoins. Increment
	reductions.
	(scan_omp_for): Filter out reductions when they are going to be
	executed by a single thread.
	(scan_omp_target): Remove references to reduction_map.
	(gen_oacc_fork): Delete.
	(gen_oacc_join): Delete.
	(lower_rec_input_clauses): Ignore on OpenACC reductions.
	(lower_oacc_reductions): New function.
	(oacc_fake_gang_reduction): New function.
	(lower_oacc_loop_helper): New function.
	(lower_reduction_clauses): Update to use lower_oacc_reductions for
	OpenACC.
	(expand_omp_for_static_nochunk): Don't call gen_oacc_{fork,join}.
	(expand_omp_for_static_chunk): Likewise.
	(lower_oacc_loop_enter_exit): New function.
	(lower_omp_for): Hanle OpenACC reductions and insert fork/joins.
	(lower_omp_target): Handle non-loop OpenACC reductions.
	* tree-core.h (enum omp_clause_code): Document the new
	OMP_CLUASE_REDUCTION_PRIVATE_DECL argument to OMP_CLAUSE_REDUCTION.
	* tree.c (omp_clause_num_ops): Increment the number of operands
	for OMP_CLUASE_REDUCTIONS.
	* tree.h (OMP_CLAUSE_REDUCTION_PRIVATE_DECL): Define.

2015-08-26  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (enum nvptx_builtins): New enum.
	(NVPTX_BUILTIN_MAX): Delete.
	(nvptx_get_worker_red_addr_fn): New function.
	(nvptx_generate_vector_shuffle): New function.
	(nvptx_shuffle_reduction): New function.
	(nvptx_goacc_reduction_setup): New function.
	(nvptx_goacc_reduction_init): New function.
	(nvptx_goacc_reduction_fini): New function.
	(nvptx_goacc_reduction_teardown): New function.
	(nvptx_goacc_reduction): New function.

2015-08-26  Cesar Philippidis  <cesar@codesourcery.com>

	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Add a placeholder for TARGET_GOACC_REDUCTION.
	* internal-fn.c (expand_GOACC_REDUCTION_SETUP): New function.
	(expand_GOACC_REDUCTION_INIT): New function.
	(expand_GOACC_REDUCTION_FINI): New function.
	(expand_GOACC_REDUCTION_TEARDOWN): New function.
	* internal-fn.def (DEF_INTERNAL_FN):
	* omp-low.c (GOACC_REDUCTION_SETUP, GOACC_REDUCTION_INIT,
	GOACC_REDUCTION_FINI, GOACC_REDUCTION_TEARDOWN): New internal
	functions.
	* omp-low.c (execute_oacc_transform): Expand those new internal
	functions.
	(make_pass_oacc_transform): Add TODO_cleanup_cfg to todo_flags_finish.
	(default_goacc_reduction_setup): New function.
	(default_goacc_reduction_init_fini): New function.
	(default_goacc_reduction_teardown): New function.
	(default_goacc_reduction): New function.
	* target.def (reduction): New goacc target hook.
	* targhooks.h (default_goacc_reduction): Declare

2015-08-25  Cesar Philippidis  <cesar@codesourcery.com>

	* tracer.c (ignore_bb_p): Change bb argument from const_basic_block
	to basic_block.  Check for non-clonable calls to internal functions.

2015-08-26  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.opt (moptimize): New flag.
	* config/nvptx/nvptx.c (nvptx_option_override): Default
	nvptx_optimize.
	(nvptx_optimmize_inner): New.
	(nvptx_process_pars): Call it.
	* doc/invoke.txi (Nvptx options): Document moptimize.

2015-08-25  Nathan Sidwell  <nathan@codesourcery.com>

	* targhooks.h (default_goacc_lock_unlock): Rename to ...
	(default_goacc_lock): ... here.  Adjust.
	* config/nvptx/nvptx.md (oacc_expand_lock, oacc_expand_unlock):
	Adjust call to lock expander.
	(oacc_expand_lock_init): New.
	(nvptx_spinlock, nvptx_spinunlock): Rename to ...
	(nvptx_spin_lock, nvtx_spin_reset): ... here.
	* config/nvptx/ntptx.c (nvptx_expand_oacc_lock_unlock): Rename to ...
	(nvptx_expand_oacc_lock): ... here.  Deal with init too.
	(nvptx_xform_lock_unlock): Rename to ...
	(nvptx_xform_lock): ... here.  Deal with init too.
	(TARGET_GOACC_LOCK_UNLOCK): Replace with ...
	(TARGET_GOACC_LOCK): ... this.
	* omp-low.c (exectute_oacc_transform): Deal with
	IFN_GOACC_LOCK_INIT.
	(default_goacc_lock_unlock): Rename to ...
	(default_goacc_lock): ... here.  Deal with init too.
	* internal-fn.c (expand_GOACC_LOCK_INIT): New.
	* internal-fn.def (GOACC_LOCK_INIT): New.
	* doc/tm.texi.in (TARGET_GOACC_LOCK_UNLOCK): Replace with ...
	(TARGET_GOACC_LOCK): ... this.
	* doc/tm.texi: Rebuilt.
	* target.def (goacc lock_unlock): Replace with ...
	(goacc lock): ... this.  Deal with init too.

2015-08-25  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_emit_forking): Add is_call argument,
	propagate it into mask.
	(nvptx_emit_joining): Likewise.
	(nvptx_expand_call): Move emit_forking call to later.  Add is_call
	argument.
	(nvptx_expand_oacc_fork, nvptx_expand_oacc_join): Asjust calls.
	(nvptx_discover_pars): Don't look for predecessor insn in call
	forks and joins.
	(nvptx_process_pars): Don't emit propagation code for a call.

2015-08-24  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.dg/goacc/routine-3.f90: New test.

2015-08-24  Cesar Philippidis  <cesar@codesourcery.com>

	* tree-nested.c (convert_nonlocal_omp_clauses): Handle
	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS and
	OMP_CLAUSE_VECTOR_LENGTH.
	(convert_local_omp_clauses): Likewise.

2015-08-24  Joseph Myers  <joseph@codesourcery.com>

	* gcc.c (driver_self_specs) [ENABLE_OFFLOADING]: Don't generate a
	-foffload option.
	(process_command): Call handle_foffload_option (OFFLOAD_TARGETS)
	if no offload target specified.

2015-08-22  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (build_oacc_routine_dims): Size non-partitioned
	levels to 1.
	* config/nvptx/nvptx.c (nvptx_expand_call): Move later, emit
	forking and joining instructions.
	(nvptx_process_pars): Cope with both Worker and Vector being set.

2015-08-21  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_validate_dims): Set vector length to
	32 always.

2015-08-21  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (oacc_fork, oacc_join): Adjust expand calls.
	* config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining): New.
	Broken out of ...
	(nvptx_expand_oacc_fork, nvptx_expand_oacc_join): ... here.
	Restore to take mode.

2015-08-21  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (call_operation): Remove partitioning
	handling.
	(oacc_fork, oacc_join): Adjust expand calls.
	* config/nvptx/nvptx.c (write_func_decl_from_isnsn): Remove
	partitioning handling.
	(nvptx_expand_call): Remove partitioning handling, generate mask
	instead.
	(nvptx_expand_oacc_fork, nvptx_expand_oacc_join): Take unsigned
	mask, not RTX and emit all necessary insns.
	(nvptx_output_call_insn): Remove partitioning handling.
	(struct parallel): Replace mode with mask.
	(nvptx_dump_pars): Adjust.
	(nvptx_discover_pars): Adjust for insns having mask not mode.
	(nvptx_process_pars): Adjust for parallel containing mask not
	mode.
	(nvptx_neuter_pars): Likewise.
	* config/nvptx/nvptx-protos.h (nvptx_expand_oacc_fork,
	nvptx_expand_oacc_join): Pass mask not rtx.

2015-08-20  Thomas Schwinge  <thomas@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* doc/invoke.texi (-ffixed-@var{reg}): Document conflict with
	Fortran options.
	* gcc.c (offload_targets): Update comment.
	(add_omp_infile_spec_func, spec_lang_mask_accept): New.
	(driver_self_specs) [ENABLE_OFFLOADING]: Add spec to use
	%:add-omp-infile().
	(static_spec_functions): Add add-omp-infile.
	(struct switchstr): Add lang_mask field.  Expand comment.
	(struct infile): Add lang_mask field.
	(add_infile, save_switch, do_spec): Add lang_mask argument.
	(driver_unknown_option_callback, driver_wrong_lang_callback)
	(driver_handle_option, process_command, do_self_spec)
	(driver::do_spec_on_infiles): All callers changed.
	(give_switch): Check languages of switch against
	spec_lang_mask_accept.
	(driver::maybe_putenv_OFFLOAD_TARGETS): Do not use intermediate
	targets variable.
	* gcc.h (do_spec): Update prototype.

2015-08-20  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (build_oacc_routine_dims): Expand comment.
	* config/nvptx/nvptx.md (call_operation): Skip optional
	partitioning information.
	* config/nvptx/nvptx.c (nvptx_expand_call): Insert target
	partitioning information, if present.
	(nvptx_output_call_insn): Skip partitioning info, if present.

2015-08-19  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_xform_on_device): Fix thinko in previous change.

2015-08-18  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_xform_on_device): Lose GSI parameter & adjust.
	(oacc_xform_dim): Likewise.
	(execute_oacc_transform): Adjust calls to oacc_xform_on_device and
	oacc_xform_dim.  Insert breaks.

2015-08-18  Nathan Sidwell  <nathan@codesourcery.com>

	* target.def  (GOACC_FORK_JOIN, GOACC_LOCK_UNLOCK): Remove GSI
	parameter. 
	* targhooks.h (default_goacc_fork_join,
	default_goacc_lock_unlock): Lose GSI parameter.
	* omp-low.c (execute_oacc_transform): Reformat to remove
	indentation. Adjust target hook calls.
	(default_goacc_fork_join, default_goacc_lock_unlock): Lose GSI
	parameter.
	* doc/tm.texi: Rebuilt.
	* config/nvptx/nvptx.c (nvptx_xform_fork_join,
	nvptx_xform_lock_unlock): Remove GSI parameter.

2015-08-18  James Norris  <jnorris@codesourcery.com>

	* gimplify.c (enum acc_region_kind): New enum.
	(gimplify_oacc_declare): New.
	(gimplify_omp_target_update): Remove handling of OACC_DECLARE.
	(gimplify_expr): Handle OACC_DECLARE.
	(gimplify_body): Handle ARK_DECLARE.
	* tree.def (OACC_DECLARE): Update.
	* tree.h (OACC_DECLARE_RETURN_CLAUSES): New.

2015-08-17  Nathan Sidwell  <nathan@codesourcery.com>

	* target.def (lock_unlock): New GOACC hook.
	* targhooks.h (default_goacc_lock_unlock): Declare.
	* doc/tm.texi.in (TARGET_GOACC_LOCK_UNLOCK): Add.
	* doc/tm.texi: Rebuilt.
	* internal-fn.def (GOACC_LOCK, GOACC_UNLOCK): New.
	* internal-fn.c (expand_GOACC_LOCK, expand_GOACC_UNLOCK): New.
	* omp-low.c (execute_oacc_transform): Add lock/unlock handling.
	(default_goacc_lock_unlock): New.
	* config/nvptx/nvptx-protos.h (nvptx_expand_oacc_lock_unlock): Declare.
	* config/nvptx/nvptx.md (UNSPECV_UNLOCK): Delete.
	(oacc_lock, oacc_unlock): New expanders.
	(nvptx_spinlock, nvptx_spinunlock): Use UNSPECV_LOCK.
	* config/nvptx/nvptx.c (nvptx_expand_oacc_lock_unlock): New.
	(nvptx_expand_lock_unlock): Delete.
	(nvptx_expand_lock, nvptx_expand_unlock): Delete.
	(nvptx_expand_work_red_addr): Fixup address generation.
	(enum nvptx_types): Delete NT_VOID_UINT.
	(builtins): Delete nvptx_lock and nvptx_unlock.
	(nvptx_init_builtins): Adjust.
	(nvptx_xform_lock_unlock): New.
	(TARGET_GOACC_LOCK_UNLOCK): Override.
	
2015-08-17  Nathan Sidwell  <nathan@codesourcery.com>

	* c-parser.c (c_finish_oacc_routine): Add is_defn arg and adjust
	all callers.  Detect duplicate, post-use or post-defn application.

2015-08-15  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_reorg): Examine TREE_PURPOSE of
	dimensions.
	(nvptx_record_offload_symbol): Adjust.
	(nvptx_validate_dims): Adjust.
	* omp-low.c (replace_oacc_fn_attrib): Detect if we're the first
	attribute.
	(set_oacc_fn_attrub): Swap FN and CLAUSE parameters for
	consistency.
	(build_oacc_routine_dims): New.
	(expand_omp_target): Adjust set_oacc_fn_attrib call.
	(execute_oacc_transform): Deal with routine dimensions.
	(default_goacc_validate_dims): Add FN_LEVEL parameter.
	* omp-low.h (replace_oacc_fn_attrib, build_oacc_routine_dims): Declare.
	* target.def (validate_dims): Add FN_LEVEL arg.
	* targhooks.h (default_goacc_validate_dims): Adjust.
	* doc/tm.texi: Rebuilt.

2015-08-12  Nathan Sidwell  <nathan@codesourcery.com>

	* target.def (fork_join): Adjust prototype.
	* targhooks.h (default_foacc_fork_join): Adjust.
	* omp-low.c (oacc_xform_dim): Constify DIMS arg.
	(execute_oacc_transform): Defer setting defaulted unknown
	dimensions to 0. Adjust fork_join hook call.
	(default_goacc_fork_join): Adjust.
	* config/nvptx/nvptx.c: Include gimple.h
	(nvptx_xform_fork_join): New.
	(TARGET_GOACC_FORK_JOIN): Override.
	* doc/tm.texi: Rebuilt.
	* tree-vrp.c: Include omp-low.h & target.h.
	(extract_range_basic): Get range for IFN_GOACC_DIM_SIZE and
	IFN_GOACC_DIM_POS.

2015-08-12  Nathan Sidwell  <nathan@acm.org>

	* tree-vrp.c (simplify_min_or_max_using_ranges): New.
	(simplify_stmt_using_ranges): Simplify MIN and MAX exprs.

2015-08-12  Nathan Sidwell  <nathan@codesourcery.com>

	* target.def (validate_dims): Adjust API.
	* targhooks.h (default_goacc_validate_dims): Adjust.
	* omp-low.c (replace_oacc_fn_attrib): New function.
	(set_oacc_fn_attrib): Use it.
	(oacc_xform_dim): Dims is array of ints.
	(execute_oacc_transform): Create int array of dims, adjust uses.
	(default_goacc_validate_dims): Adjust API.  Force to w everywhere.
	* doc/tm.texi: Rebuild.
	* config/nvptx/nvptx.c (nvptx_validate_dims): Adjust API.

2015-08-10  Nathan Sidwell  <nathan@acm.org>

	* tree-ssa-phiopt.c (minmax_replacement): Create new ssa name if
	we're not the only contributor to target phi.

2015-08-11  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.c (expand_GOACC_FORK): Use ARG_UNUSED.  Rename
	varible sensibly. Assert we're never reached if there is no
	expansion.
	(expand_GOACC_JOIN, expand_GOACC_DIM_SIZE,
	expand_GOACC_DIM_POS): likewise.
	* targhooks.h (default_goacc_dim_limit): Declare.
	* target.def (validate_dims): Expand documentation.
	(dim_limit): New hook.
	* config/nvptx/nvptx.c (nvptx_reorg): Expect attribute to always
	have dimensions.
	(nvptx_record_offload_symbol): Likewise.
	(nvptx_validate_syms): Force dimension creation and adjust.
	(nvtpx_dim_limit): Define.
	(TARGET_GOACC_DIM_LIMIT): Override.
	* omp-low.c (expand_oacc_get_num_threads): Builtins return int not
	unsigned.
	(expand_oacc_get_thread_num, oacc_init_count_vars): Likewise.
	(oacc_xform_dim): Result is signed.
	(execute_oacc_transform): Expect dims to always be present.
	(default_goacc_validate_dims): Force dimension creation.
	(default_goacc_dim_limit): New.
	* doc/tm.texi.in (TARGET_GOACC_DIM_LIMIT): Add.
	* doc/tm.texi: Rebuilt.

2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>

	* internal-fn.c (expand_GOACC_DIM_SIZE) [!HAVE_oacc_dim_size]:
	Don't define and set variable val.
	(expand_GOACC_DIM_POS) [!HAVE_oacc_dim_pos]: Likewise.

2015-08-06  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_expand_lock_unlock): Pass an
	additional scratch register to gen_nvptx_spinlock.
	* config/nvptx/nvptx.md (nvptx_membar): Use %B for the address
	space operand.
	(nvptx_spinlock): Remove period prefix from atom.
	(nvptx_spinunlock): Take additional scratch register argument.
	Use atom.exch to update the lock.

2015-08-06  Nathan Sidwell  <nathan@codesourcery.com>

	* doc/tm.texi.in (TARGET_GOACC_FORK_JOIN): New.
	* doc/tm.texi: Regenerate.
	* omp-low.c (execute_oacc_transform): Forward fork and join to
	target hook.
	(default_goacc_fork_join): New.
	* target.def (fork_join): New OpenACC hook.
	* targhooks.h (default_goacc_fork_join): Declare.

2015-08-06  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_expand_lock_unlock): Create label.
	(nvptx_validate_dims): Check worker dimension is not too big.
	* config/nvptx/nvptx.mc (nvptx_spinlock): Take label.

2015-08-05  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (release_dangling_ssa_names): Release SSA_NAMEs with NULL
	def stmt.
	* tree-cfg.c (replace_ssa_name): Don't move default def nops.  Set def
	stmt of unused SSA_NAME to NULL.

2015-08-04  Nathan Sidwell  <nathan@codesourcery.com>

	* doc/tm.texi.in (TARGET_GOACC_VALIDATE_DIMS): Add hook.
	* doc/tm.texi: Regenerated.
	* target.def (TARGET_GOACC): New hook prefix.
	(validate_dims): New.
	* targhooks.h (default_goacc_validate_dims): Declare.
	* internal-fn.def: Add comments.
	(GOACC_DIM_POS): Make pure.
	* config/nvptx/nvptx.c (nvptx_validate_dims): New.
	(TARGET_GOACC_VALIDATE_DIMS): Override.
	* omp-low.h (set_oacc_fn_attrib): Leave default dims as NULL.
	(oacc_xform_dim): New.
	(execute_oacc_transform): Process launch dimensions. Optimize
	DIM_SIZE and DIM_POS.  Delete FORK & JOIN on host.
	(default_oacc_validate_dims): New.

2015-08-04  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (nvptx_shuffle<mode>): Adjust assembly.
	* config/nvptx/nvptx.c (nvptx_print_operand): Adjust 'S' case to
	print leading . for consistency.
	* config/nvptx/nvptx.h (struct nvptx_pseudo_info): Delete.
	(machine_function): Remove pseudos field.

2015-08-04  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (UNSPECV_MEMBAR): New.
	(nvptx_membar): New insn.
	* config/nvptx/nvptx.c (BARRIER_SHARED, BARRIER_GLOBAL,
	BARRIER_SYS): New.
	(lock_names, lock_space): Constify.
	(lock_level): New.
	(worker_red_hwm, worker_red_align, worker_red_name,
	worker_red_sym): New.
	(var_red_t, struct loop_red): New types.
	(loop_red): New.
	(nvptx_print_operand): Add 'B' case.
	(nvptx_reorg_reductions): New.
	(nvptx_reorg): Call it.
	(nvptx_file_end): Emit worker reduction array.
	(struct builtin_descriptor):  Remove builtin pointer from
	expander.
	(nvptx_expand_shuffle_down, nvptx_expand_lock_unlock,
	nvptx_expand_lock, nvptx_expand_unlock): Adjust.
	(nvptx_expand_lock_unlock): Emit barrier too.
	(nvptx_expand_work_red_addr): New.
	(NT_UINTPTR_UINT_UINT, NT_ULLPTR_UINT_UINT, NT_FLTPTR_UINT_UINT,
	NT_DBLPTR_UINT_UINT): New.
	(builtins): Add new builtins.
	(nvptx_init_builtins): Create new types.
	(nvptx_expand_builtin): Adjust expander call.

2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.def (GOACC_DIM_SIZE, GOACC_DFIM_POS): New.
	* internal-fn.c (expand_GOACC_DIM_SIZE, expand_GOACC_DIM_POS): New.
	* config/nvptx.md (UNSPEC_NID, UNSPEC_ID): Rename to ...
	(UNSPEC_DIM_SIZE, UNSPEC_DIM_POS): ... here.
	(oacc_nid, oacc_id): Rename to ...
	(oacc_dim_size, oacc_dim_pos): ... here. Adjust.
	* config/nvptx.c (nvptx_single): Adjust.
	* omp-low.c (expand_oacc_get_num_threads,
	expand_oacc_get_thread_num, oacc_init_count_vars): Use new
	internal builtins.
	* omp-builtins.def (BUILT_IN_GOACC_ID, BUILT_IN_GOACC_NID): Delete.
	* builtins.c (expand_oacc_id): Delete.
	(expand_builtin, is_simpe_biltin): Adjust.

2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Avoid printf formatting
	warning.

2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (GOVD_GANGLOCAL): Delete.
	(oacc_default_clause): Only derereference reference types. Mark
	firstprivate as GOVD_FIRSTPRIVATE.
	(gimplify_adjust_omp_clauses_1): Remove GANGLOCALL handling.
	(gimplify_omp_for): Remove bogus OpenACC outer context lookup.
	* omp-low.c (build_outer_var_ref): Simplify openacc outer ref
	lookup.
	(scan_sharing_clauses): Handle openacc firstprivate.
	(lower_omp_target): Handle openacc firstprivate.

2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_reorg): Check get_oacc_fn_attrib for
	launch dimensions and only do parallel processing when present.
	Check dimensions to determine neutering requirements.
	(nvptx_record_offload_symbol): Launch dimension attribute must be
	present on offloaded functions.

2015-08-03  Thomas Schwinge  <thomas@codesourcery.com>

	* builtins.c (expand_builtin_on_device): Don't expect to be
	expanded on host compiler.

	* gimplify.c (oacc_default_clause): Remove in_code formal
	parameter.  Adjust all users.

2015-08-02  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_xform_on_device): New function.
	(execute_oacc_transform): Use get_oacc_fn_attrib.  Call
	oacc_xform_on_device.
	* builtins.c (expand_builtin_on_device): Only expect to be
	expanded on host compiler.

2015-07-31  Thomas Schwinge  <thomas@codesourcery.com>

	PR libgomp/65742
	PR middle-end/66332
	* builtins.c (expand_builtin_acc_on_device) [ACCEL_COMPILER]: Emit
	open-coded sequence.

2015-07-30  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (UNSPECV_UNLOCK): New.
	(nvptx_shuffle<mode>): Add constraints.
	(nvptx_unpack<mode>, nvptx_pack<mode>): Likewise.
	(nvptx_spinlock, nvptx_spinunlock):  New.
	* config/nvptx/nvptx.c (LOCK_GLOBAL, LOCK_SHARED, LOCK_MAX): New
	defines.
	(lock_names, lock_regions, lock_space, lock_syms, loc_used): New.
	(nvptx_option_override): Set worker_bcast_align
	correctly. Initialize lock_sums.
	(nvptx_print_operand): Add 'R'.
	(nvptx_file_end): Emit lock vars if needed.
	(struct  builtin_description): Move earlier, add object pointer to
	callback.
	(nvptx_expand_shuffle_down): Adjust.
	(nvptx_expand_lock_unlock): New expander.
	(nvptx_expand_lock, nvptx_expand_unlock): New.
	(enum nvptx_types): Add NT_VOID_UINT.
	(builtins): Add lock/unlock builtins.
	(nvptx_init_bultins): Create new tupe.
	(nvptx_expand_builtin): Adjust.

2015-07-30  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (UNSPEC_BROADCAST, UNSPEC_SHFL_DOWN):
	Replace with ...
	(UNSPEC_SHUFFLE): ... this.
	(nvptx_broadcast<mode>): Replace with ...
	(nvptx_shuffle<mode>): ... this.
	(thread_shuffle_down<mode>,  thread_shiffle_downdi): Delete.
	* config/nvptx/nvptx.c (SHUFFLE_UP, SHUFFLE_DOWN, SHUFFLE_BFLY,
	SHUFFLE_IDX): New defines.
	(nvptx_gen_shuffle): Break out of nvptx_gen_vcast and generalize.
	(nvptx_gen_vcast): Use nvptx_gen_shuffle.
	(nvptx_print_operand): Add 'S' case.
	(nvptx_cannot_copy_insn_p): Adjust.
	(nvptx_expand_shuffle_down): New builtin expander for shuffles.
	(enum nvptx_types): Add NT_DBL_DBL_INT case.
	(struct builtin_descriptor): Use ptr to fn for expander.  Remove
	icode and num_args.
	(builtins): Adjust.
	(nvptx_init_builtins): Adjust.
	(nvptx_expand_builtin): Invoke builtin-specific expander function.

2015-07-29  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (oacc_default_clause): Outer scope searching moved to
	omp_notice_variable.
	(omp_notice_variable): For OpenACC search enclosing scopes before
	applying default.

2015-07-29  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Reimplement emission of ptx
	objects to set of arrays.

2015-07-29  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (expand_omp_target): Emit separate ASYNC and WAIT tags.

2015-07-28  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.h (enum oacc_loop_levels): Delete.
	(OACC_LOOP_MASK): Delete.
	* omp-low.c: Change all OACC_x to GOMP_DIM_x
	* config/nvptx/nvptx.c: Change all OACC_x to GOMP_DIM_x
	* builtins.c (expand_oacc_id): Change OACC_HWM to GOMP_DIM_MAX.

2015-07-28  Nathan Sidwell  <nathan@codesourcery.com>

	* tree.h (OMP_CLAUSE_EXPR): New.
	* omp-low.c (creste_omp_child_function): Do not set oacc function
	attribute here.
	(oacc_launch_pack): New.
	(OACC_FN_ATTRIB): New define.
	(set_oacc_fn_attrib): New.
	(get_oacc_fn_attrib): New.
	(expand_omp_target): Reimplement openacc launch parameters.
	* omp-low.h (get_oacc_fn_attrib): Declare.
	* omp-builtins.def (BUILT_IN_GOACC_KERNELS_INTERNAL): Change type.
	(BUILT_IN_GOACC_PARALLEL): Change type and target name.
	* builtin-types.def
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR): Replace with ...
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_SIZE_VAR): ... this.
	* tree-parloops.c (create_parallel_loop): Adjust index of
	shared_size arg.
	* except.c: Include omp-low.h
	(finish_eh_generation): Call get_oacc_fn_attrib.
	* config/nvptx/mkoffload.c (process): Accumulate compute grid
	dimensions and emit them.
	* config/nvptx/nvptx.c: Include gomp-constants.h
	(nvptx_record_offload_symbol): Emit compute grid dimensions.

2015-07-28  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (oacc_default_clause): Always set GOVD_MAP if found
	in outer scope.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Repeat pass_lim and pass_copy_prop in oacc kernels pass
	group.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Replace pass_fre with pass_copy_prop in oacc kernels pass
	group.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-28  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (reduc_stmt_res): New function.
	(initialize_reductions, add_field_for_reduction)
	(create_phi_for_local_result, create_loads_for_reductions)
	(create_stores_for_reduction, build_new_reduction): Handle case that
	reduc_stmt is a phi.
	(gather_scalar_reductions): Allow double_reduc reductions.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-27  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (gather_scalar_reductions): Simplify function
	structure.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	* graphite-sese-to-poly.c (is_reduction_operation_p): Allow operations
	that do not overflow.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	* tree.c (no_overflow_tree_code): New function.
	* tree.h (no_overflow_tree_code): Declare.
	* tree-vect-loop.c (vect_is_simple_reduction_1): Use
	no_overflow_tree_code.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/46193
	* omp-low.c (omp_reduction_init): Handle pointer type for min or max
	clause.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-24  Tom de Vries  <tom@codesourcery.com>

	* graphite-sese-to-poly.c (build_poly_scop): Always call
	rewrite_commutative_reductions_out_of_ssa.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-24  Tom de Vries  <tom@codesourcery.com>

	* graphite-sese-to-poly.c (is_reduction_operation_p): Limit
	flag_associative_math to FLOAT_TYPE_P.  Honour
	TYPE_OVERFLOW_WRAPS for INTEGRAL_TYPE_P. Don't allow any other types.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-24  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (gen_parallel_loop): Add debug print for alternative
	exit-first loop transform.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-23  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (gather_scalar_reductions): Add arg to call to
	vect_force_simple_reduction.
	* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Same.
	(vect_is_simple_reduction_1): Add and handle
	need_wrapping_integral_overflow parameter.
	(vect_is_simple_reduction, vect_force_simple_reduction): Add and pass
	need_wrapping_integral_overflow parameter.
	(vectorizable_reduction): Add arg to call to vect_is_simple_reduction.
	* tree-vectorizer.h (vect_force_simple_reduction): Add parameter to decl.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-16  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (create_parallel_loop): Handle case that exit phi does
	not have a corresponding loop header phi.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-16  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (create_loads_for_reductions): Handle case that
	reduction is unused.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-07-14  Tom de Vries  <tom@codesourcery.com>

	* gcc.c (greater_than_spec_func): Declare forward.
	(LINK_COMMAND_SPEC, GOMP_SELF_SPECS): Use gt to ignore
	-ftree-parallelize-loops={0,1}.
	(static_spec_functions): Add greater_than_spec_func function with name
	"gt".
	(greater_than_spec_func): New function.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/66846
	* omp-low.c (expand_omp_taskreg) [ENABLE_CHECKING]: Call
	verify_loop_structure for child_cfun if !LOOPS_NEED_FIXUP.
	(expand_omp_target) [ENABLE_CHECKING]: Same.
	(execute_expand_omp): Reinstate LOOPS_HAVE_SIMPLE_LATCHES if in ssa.
	[ENABLE_CHECKING]: Call verify_loop_structure for cfun if
	!LOOPS_NEED_FIXUP.
	(expand_omp_for_static_nochunk): Handle case that omp_for already has
	its own loop struct.
	* tree-parloops.c (create_parallel_loop): Add comment about breaking
	LOOPS_HAVE_SIMPLE_LATCHES.  Record new exit.
	(gen_parallel_loop): Remove call to cancel_loop_tree.
	(parallelize_loops): Skip loops that are inner loops of parallelized
	loops.
	(pass_parallelize_loops::execute): Clear LOOPS_HAVE_SIMPLE_LATCHES on
	loop state.
	[ENABLE_CHECKING]: Call verify_loop_structure.

2015-07-28  Tom de Vries  <tom@codesourcery.com>

	revert:
	2015-07-12  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (gen_parallel_loop): Add LOOPS_NEED_FIXUP to loop
	state.

2015-07-27  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (execute_oacc_transform): New function.
	(class pass_oacc_transform): New function.
	(make_pass_oacc_transform): New function.
	* passes.def: Add pass_oacc_transform to all_passes.
	* tree-pass.h (make_pass_oacc_transform): Declare.

2015-07-27  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Rename _2 functions to _ver.

2015-07-26  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (oacc_default_clause): Fallthrough to unspecified
	handling.  Propagate mapping from outer scope.

2015-07-24  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (device_resident_p): New function, broken out of
	omp_notice_variable.
	(oacc_default_clause): New function.  Reorganize flow for
	clarity.  Broken out of ...
	(omp_notice_variable): ... here.

2015-07-24  Nathan Sidwell  <nathan@codesourcery.com>

	* gimplify.c (omp_default_clause): New function.  Reorganize flow
	for clarity. Broken out of ...
	(omp_notice_variable): ... here.

2015-07-24  Cesar Philippidis  <cesar@codesourcery.com>

	* tree-cfg.c (struct replace_decls_d): New struct.
	(replace_block_vars_by_duplicates_1): New function.
	(replace_block_vars_by_duplicates): Use it to replace the decls
	in the value exprs by duplicates.
	* lto-cgraph.c (input_overwrite_node): Gracefully error on missing
	symbols with flag_openacc.
	* tree-nested.c (convert_nonlocal_omp_clauses): Handle OMP_CLAUSE_GANG,
	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_SEQ.
	(convert_local_omp_clauses): Likewise.

2015-07-24  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Replace
	GOMP_offload_register with GOMP_offload_register_2.

2015-07-22  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_for): Set loop->safelen to INT_MAX if
	marked_independent.

2015-07-22  Nathan Sidwell  <nathan@acm.org>

	* config/nvptx/nvptx.c (nvptx_option_override): Initialize worker
	buffer alignment here.
	(nvptx_wsync): Generate pattern, not emit instruction.
	(nvptx_single): Insert barrier after read.
	(nvptx_process_pars): Adjust nvptx_wsync use.
	(nvptx_file_end): No need to apply default alignment here.

2015-07-21  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Add destructor call.

2015-07-21  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-parloops.c (create_parallel_loop): Typo fix.

2015-07-20  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_builtins): Delete enum.
	(nvptx_types): New enum.
	(builtin_description): Add type and num_args fields.
	(builtins): New array describing builtins.
	(NVPTX_BUILTIN_MAX): Define.
	(def_builtin): Delete.
	(nvptx_init_builtins): Reimplement using builtins array.
	(nvptx_expand_binop_builtin): Delete.
	(bdesc_2arg): Delete.
	(nvptx_expand_builtin): Reimplement using builtins array.

2015-07-20  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (create_parallel_loop): Update comments for
	removal of GOACC_kernels.  Rename goacc_kernels variable into
	goacc_kernels_internal.

2015-07-19  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (expand_omp_target): Convert to
	BUILT_IN_GOACC_PARALLEL. Remove BUILT_IN_GOACC_KERNELS cases.
	* omp-builtins.def (BUILT_IN_GOACC_KERNELS): Delete.

2015-07-17  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Reformat some C code emission.

	* config/nvptx/mkoffload.c (process): Constify host data.
	* config/i386/intelmic-mkoffload.c (generate_target_descr_file):
	Constify host data.
	(generate_host_descr_file): Likewise.

2015-07-17  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Constify target data.
	* config/i386/intelmic-mkoffload.c (generate_target_descr_file):
	Constify target data.
	(generate_target_offloadend_file): Likewise.

2015-07-17  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_target): Fix location of insertion of if-clause
	handling code.

2015-07-17  Bernd Schmidt  <bernds@codesourcery.com>

	* config/nvptx/nvptx.c (enum nvptx_builtins,
	struct builtin_description): New.
	(nvptx_builtin_decls, bdesc_2arg): New static variables.
	(def_builtin): New macro.
	(nvptx_builtin_decl, nvptx_init_builtins, nvptx_expand_binop_builtin,
	nvptx_expand_builtin): New static functions.
	(TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN, TARGET_BUILTIN_DECL):
	Define.
	* config/nvptx/nvptx.md (UNSPECV_SHFL_DOWN): New constant.
	(thread_shuffle_down<mode>): New pattern.
	(thread_shuffle_downdi): New expander.

2015-07-17  Julian Brown  <julian@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses): Handle
	OMP_CLAUSE_DEVICE_TYPE.
	(gimplify_adjust_omp_clauses): Likewise.
	* omp-low.c (scan_sharing_clauses): Likewise.
	(expand_omp_target): Add "sorry" for device_type support.
	* tree-pretty-print.c (dump_omp_clause): Add device_type support.
	* tree.c (walk_tree_1): Likewise.

2015-07-16  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_gen_wcast): Fix typo accessing reg's
	mode for pointer increment.

2015-07-16  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-loop-ch.c (pass_ch::pass_ch (pass_data, gcc::context)): New
	constructor.
	(pass_ch_oacc_kernels): Derive from pass_ch.
	(pass_ch_oacc_kernels::pass_ch_oacc_kernels(gcc::context)): Call
	pass_ch constructor.
	(pass_ch_oacc_kernels::execute): Remove.
	(pass_ch_oacc_kernels::process_loop_p): Rewrite using
	pass_ch::process_loop_p.

2015-07-15  Thomas Schwinge  <thomas@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_gen_wcast): Mark unreachable code
	path.

2015-07-14  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (struct omp_region): Remove broadcast_array member.

2015-07-14  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (parallelize_loops): Use marked_independent flag in
	oacc kernels region.

2015-07-14  Chung-Lin Tang  <cltang@codesourcery.com>

	* cfgloop.h (struct loop): Add 'bool marked_independent' field.
	* gimplify.c (gimplify_scan_omp_clauses): Keep OMP_CLAUSE_INDEPENDENT.
	* omp-low.c (struct omp_region): Add 'int kind' and
	'bool independent' fields.
	(expand_omp_for): Set 'marked_independent' field for loop
	corresponding to region.
	(find_omp_for_region_data): New function.
	(find_omp_target_region_data): Set kind field.
	(build_omp_regions_1): Call find_omp_for_region_data() for
	GIMPLE_OMP_FOR statements.

2015-07-13  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/mkoffload.c (process): Constify mapping variables.
	Define target data struct and initialize it.

2015-07-12  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (build_receiver_ref): Mark *.omp_data_i as non-trapping.
	* tree-parloops.c (gen_parallel_loop): Add LOOPS_NEED_FIXUP to loop
	state.
	(parallelize_loops): Allow nested loops.

2015-07-11  Thomas Schwinge  <thomas@codesourcery.com>

	* internal-fn.c (expand_GOACC_FORK, expand_GOACC_JOIN)
	[!HAVE_oacc_fork]: Keep quiet.

	* df-core.c (df_analyze_1): Don't disable df_verify call.

2015-07-10  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_reorg): Move df problem setting, set
	dirty flags.

2015-07-10  Thomas Schwinge  <thomas@codesourcery.com>

	* df-core.c (df_analyze_1): Disable df_verify call.

2015-07-09  Nathan Sidwell  <nathan@codesourcery.com>

	Infrastructure:
	* gimple.h (gimple_call_internal_unique_p): Declare.
	* gimple.c (gimple_call_same_target_p): Add check for
	gimple_call_internal_unique_p.
	* internal-fn.c (gimple_call_internal_unique_p): New.
	* omp-low.h (OACC_LOOP_MASK): Define here...
	* omp-low.c (OACC_LOOP_MASK): ... not here.
	* tree-ssa-threadedge.c	(record_temporary_equivalences_from_stmts):
	Add check for gimple_call_internal_unique_p.
	* tree-ssa-tail-merge.c (same_succ_def::equal): Add EQ check for
	the gimple statements.

	Additions:
	* internal-fn.def (GOACC_FORK, GOACC_JOIN): New.
	* internal-fn.c (gimple_call_internal_unique_p): Add check for
	IFN_GOACC_FORK, IFN_GOACC_JOIN.
	(expand_GOACC_FORK, expand_GOACC_JOIN): New.
	* omp-low.c (gen_oacc_fork, gen_oacc_join): New.
	(expand_omp_for_static_nochunk): Add oacc loop fork & join calls.
	(expand_omp_for_static_chunk): Likewise.
	* config/nvptx/nvptx-protos.h (nvptx_expand_oacc_fork,
	nvptx_expand_oacc_join): Declare.
	* config/nvptx/nvptx.md (UNSPEC_BIT_CONV, UNSPEC_BROADCAST,
	UNSPEC_BR_UNIFIED): New unspecs.
	(UNSPECV_FORK, UNSPECV_FORKED, UNSPECV_JOINING, UNSPECV_JOIN): New.
	(BITS, BITD): New mode iterators.
	(br_true_uni, br_false_uni): New unified branches.
	(nvptx_fork, nvptx_forked, nvptx_joining, nvptx_join): New insns.
	(oacc_fork, oacc_join): New expand
	(nvptx_broadcast<mode>): New insn.
	(unpack<mode>si2, packsi<mode>2): New insns.
	(worker_load<mode>, worker_store<mode>): New insns.
	(nvptx_barsync): Renamed from ...
	(threadbarrier_insn): ... here.
	* config/nvptx/nvptx.c: Include hash-map,h, dominance.h, cfg.h &
	omp-low.h.
	(worker_bcast_hwm, worker_bcast_align, worker_bcast_name,
	worker_bcast_sym): New.
	(nvptx_option_override): Initialize worker_bcast_sym.
	(nvptx_expand_oacc_fork, nvptx_expand_oacc_join): New.
	(nvptx_gen_unpack, nvptx_gen_pack): New.
	(struct wcast_data_t, propagate_mask): New types.
	(nvptx_gen_vcast, nvptx_gen_wcast): New.
	(struct parallel): New structs.
	(parallel::parallel, parallel::~parallel): Ctor & dtor.
	(bb_insn_map_t): New map.
	(insn_bb_t, insn_bb_vec_t): New tuple & vector of.
	(nvptx_split_blocks, nvptx_discover_pre): New.
	(bb_par_t, bb_par_vec_t); New tuple & vector of.
	(nvptx_dump_pars,nvptx_discover_pars): New.
	(nvptx_propagate): New.
	(vprop_gen, nvptx_vpropagate)@ New.
	(wprop_gen, nvptx_wpropagate): New.
	(nvptx_wsync): New.
	(nvptx_single, nvptx_skip_par): New.
	(nvptx_process_pars): New.
	(nvptx_neuter_pars): New.
	(nvptx_reorg): Add liveness DF problem.  Call nvptx_split_blocks,
	nvptx_discover_pars, nvptx_process_pars & nvptx_neuter_pars.
	(nvptx_cannot_copy_insn): Check for broadcast, sync, fork & join insns.
	(nvptx_file_end): Output worker broadcast array definition.

	Deletions:
	* builtins.c (expand_oacc_thread_barrier): Delete.
	(expand_oacc_thread_broadcast): Delete.
	(expand_builtin): Adjust.
	* gimple.c (struct gimple_statement_omp_parallel_layout): Remove
	broadcast_array member.
	(gimple_omp_target_broadcast_array): Delete.
	(gimple_omp_target_set_broadcast_array): Delete.
	* omp-low.c (omp_region): Remove broadcast_array member.
	(oacc_broadcast): Delete.
	(build_oacc_threadbarrier): Delete.
	(oacc_loop_needs_threadbarrier_p): Delete.
	(oacc_alloc_broadcast_storage): Delete.
	(find_omp_target_region): Remove call to
	gimple_omp_target_broadcast_array.
	(enclosing_target_region, required_predication_mask,
	generate_vector_broadcast, generate_oacc_broadcast,
	make_predication_test, predicate_bb, find_predicatable_bbs,
	predicate_omp_regions): Delete.
	(use, gen, live_in): Delete.
	(populate_loop_live_in, oacc_populate_live_in_1,
	oacc_populate_live_in, populate_loop_use, oacc_broadcast_1,
	oacc_broadcast): Delete.
	(execute_expand_omp): Remove predicate_omp_regions call.
	(lower_omp_target): Remove oacc_alloc_broadcast_storage call.
	Remove gimple_omp_target_set_broadcast_array call.
	(make_gimple_omp_edges): Remove oacc_loop_needs_threadbarrier_p
	check.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Remove
	BUILT_IN_GOACC_THREADBARRIER.
	* omp-builtins.def (BUILT_IN_GOACC_THREAD_BROADCAST,
	BUILT_IN_GOACC_THREAD_BROADCAST_LL,
	BUILT_IN_GOACC_THREADBARRIER): Delete.
	* config/nvptx/nvptx.md (UNSPECV_WARPBCAST): Delete.
	(br_true, br_false): Remove U format specifier.
	(oacc_thread_broadcastsi, oacc_thread_broadcast_di): Delete.
	(oacc_threadbarrier): Delete.
	* config/.nvptx/nvptx.c (condition_unidirectional_p): Delete.
	(nvptx_print_operand):  Remove 'U' specifier.
	(nvptx_reorg_subreg): Remove unidirection checking.
	(nvptx_cannot_copy_insn): Remove broadcast and barrier insns.
	* config/nvptx/nvptx.h (machine_function): Remove
	warp_equal_pseudos.

2015-07-08  Tom de Vries  <tom@codesourcery.com>

	Backport from trunk:
	2015-07-07  Tom de Vries  <tom@codesourcery.com>
	* tree-cfg.c (get_virtual_phi): New function.
	* tree-cfg.h (get_virtual_phi): Declare.
	* tree-ssa-loop-manip.c (replace_uses_in_dominated_bbs)
	(rewrite_virtuals_into_loop_closed_ssa): New function.
	* tree-ssa-loop-manip.h (rewrite_virtuals_into_loop_closed_ssa):
	Declare.
	* tree-parloops.c (replace_uses_in_bbs_by): Remove.
	(transform_to_exit_first_loop_alt): Use
	rewrite_virtuals_into_loop_closed_ssa.

2015-07-08  Tom de Vries  <tom@codesourcery.com>

	Revert:
	2015-06-24  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-loop-manip.c (get_virtual_phi): Factor out of ...
	(rewrite_virtuals_into_loop_closed_ssa): ... here.

	* tree-ssa-loop-manip.c (replace_uses_in_dominated_bbs): Factor out
	of ...
	(rewrite_virtuals_into_loop_closed_ssa): ... here.

	* dominance.c (bitmap_get_dominated_by): New function.
	* dominance.h (bitmap_get_dominated_by): Declare.
	* tree-ssa-loop-manip.c (rewrite_virtuals_into_loop_closed_ssa): Use
	bitmap_get_dominated_by.

	* tree-parloops.c (replace_uses_in_bbs_by)
	(rewrite_virtuals_into_loop_closed_ssa): Move to ...
	* tree-ssa-loop-manip.c: here.
	* tree-ssa-loop-manip.h (rewrite_virtuals_into_loop_closed_ssa):
	Declare.

        2015-06-18  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (rewrite_virtuals_into_loop_closed_ssa): New function.
	(transform_to_exit_first_loop_alt): Use
	rewrite_virtuals_into_loop_closed_ssa.

2015-07-07  James Norris  <jnorris@codesourcery.com>

	* gimplify.c (enum gimplify_omp_var_data): Add new enum.
	(gimplify_adjust_omp_clauses_1): Handle deviceptr clause seen in
	outer context.

2015-07-01  James Norris  <jnorris@codesourcery.com>

	* c/c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parameter
	declarations to be used.
	* cp/parser.c (cp_parser_oacc_data_clause_deviceptr): Likewise.

2015-07-01  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/66716
	* tree-cfg.c (gimple_split_block_before_cond_jump): Split before
	cond_jump, instead of split after last nondebug insn before cond_jump.

2015-07-01  Chung-Lin Tang  <cltang@codesourcery.com>

	* gimplify.c (gimplify_omp_for): For acc loops inside OpenACC constructs,
	notice the use of the index variable in the surrounding gimplify_omp_ctx.

2015-07-01  James Norris  <jnorris@codesourcery.com>

	* c/c-parser.c (OACC_LOOP_CLAUSE_DEVICE_TYPE_MASK): Remove independent
	clause from mask.

2015-06-30  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (oacc_get_reduction_array_id): Remove.
	(oacc_parallel_max_reduction_array_size): Remove.
	(install_array_var_ganglocal): Remove.
	(oacc_outermost_parallel_kernels_context): Remove.
	(oacc_inside_routine): Remove.
	(is_oacc_multithreaded): Remove.
	(oacc_needs_global_memory): Remove.
	(oacc_max_threads): Remove.
	(scan_sharing_clauses): Don't allocate an array for openacc reductions.
	(oacc_lower_reduction_var_helper): Remove.
	(lower_reduction_clauses): Handle all OpenACC reductions using atomics.
	(oacc_gimple_assign): Remove.
	(oacc_initialize_reduction_data): Remove.
	(oacc_serial_reduction): Remove.
	(oacc_finalize_reduction_data): Remove.
	(oacc_process_reduction_data_helper): Remove.
	(oacc_process_reduction_data): Remove.
	(lower_omp_target): Don't call oacc_process_reduction_data anymore.

2015-06-30  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (transform_to_exit_first_loop_alt): Insert new exit
	block only when needed.

2015-06-30  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (try_transform_to_exit_first_loop_alt): If not found,
	insert nit + 1 bound.

2015-06-30  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/66642
	* tree-parloops.c (transform_to_exit_first_loop_alt): Update function
	header comment.  Rename split_edge variable to edge_at_split.  Split
	exit edge to create new loop exit bb.  Insert loop exit phis in new loop
	exit bb.

2015-06-30  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-06-30  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/66652
	* tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
	max_loop_iterations to determine if nit + 1 overflows.

	2015-06-29  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (try_transform_to_exit_first_loop_alt): Simplify
	function structure.

	2015-06-22  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (transform_to_exit_first_loop_alt): Add update_stmt
	for cond_stmt.

2015-06-29  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (nvptx_reorg_subreg): New fn, broken out of ...
	(nvptx_reorg): Here.  Keep the non-subreg pieces.

2015-06-29  James Norris  <jnorris@codesourcery.com>

	* omp-low.c (expand_omp_target): Remove unnecessary conversion.

2015-06-26  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (UNSPEC_ID): Rename to ...
	(UNSPECV_ID): ... here.
	(oacc_id): Make volatile.
	* omp-builtins.def (BUILT_IN_GOACC_ID): Not a constant function.

2015-06-24  James Norris  <jnorris@codesourcery.com>

	* c/c-parser.c (finish_oacc_declare): Additional syntax checking
	and add restriction.
	* cp/decl.c (finish_oacc_declare): Handle null statement list and
	add restriction.
	* cp/parser.c (cp_parser_oacc_declare): Additional syntax checking.

2015-06-24  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-loop-manip.c (get_virtual_phi): Factor out of ...
	(rewrite_virtuals_into_loop_closed_ssa): ... here.

2015-06-24  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-loop-manip.c (replace_uses_in_dominated_bbs): Factor out
	of ...
	(rewrite_virtuals_into_loop_closed_ssa): ... here.

2015-06-24  Tom de Vries  <tom@codesourcery.com>

	* dominance.c (bitmap_get_dominated_by): New function.
	* dominance.h (bitmap_get_dominated_by): Declare.
	* tree-ssa-loop-manip.c (rewrite_virtuals_into_loop_closed_ssa): Use
	bitmap_get_dominated_by.

2015-06-24  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (replace_uses_in_bbs_by)
	(rewrite_virtuals_into_loop_closed_ssa): Move to ...
	* tree-ssa-loop-manip.c: here.
	* tree-ssa-loop-manip.h (rewrite_virtuals_into_loop_closed_ssa):
	Declare.

2015-06-23  Nathan Sidwell  <nathan@codesourcery.com>

	Port from trunk.
	* config/nvptx/nvptx.md (sel_true<mode>, sel_false<mode>): New
	conditional selects.
	(setcc_int<mode>, setcc_float<mode>): Reformat.

2015-06-22  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (expand_oacc_get_num_threads): Use OACC enum.
	(expand_oacc_get_thread_num, make_predication_test): Likewise.
	* builtins.c (expand_oacc_id): Use UINTVAL.

	* omp-builtins.def (BUILT_IN_GOACC_NTID, BUILTIN_NCTAID): Replace
	with ...
	(BUILT_IN_GOACC_NID): ... this.
	(BUILT_IN_GOACC_TID, BUILTIN_CTAID): Replace with ...
	(BUILT_IN_GOACC_ID): ... this.
	* builtins.c: Include omp-low.h.
	(expand_oacc_buoltin): Replace with ...
	(expand_oacc_id): ... this.
	(expand_builtin, is_simple_builtin): Adjust.oo
	* omp-low.h (enum oacc_loop_levels): New.
	* omp-low.c (MASK_GANG, MASK_WORKER, MASK_VECTOR): Replace with ...
	(OACC_LOOP_MASK): ... this.
	(scan_omp_for, scan_omp_target): Adjust.
	(expand_oacc_get_num_threads): Adjust and use a loop.
	(expand_oacc_get_thread_num): Likewise.
	(oacc_loop_needs_thread_barrier_p, find_omp_for_region_gwv,
	find_omp_taarget_region_data, required_predication_mask,
	generate_vector_broadcast, generate_oacc_broadcast): Adjust.
	(make_predication_test): Adjust and use a loop.
	(predicate_bb, oacc_broadcast, oacc_init_count_vars): Adjust.
	* config/nvptx/nvptx.md (UNSPEC_NTID, UNSPEC_TID, UNSPEC_NCTAID,
	UNSPEC_CTAID): Replace with ...
	(UNSPEC_NID, UNSPEC_ID): ... these.
	(*oacc_ntid_insn, oacc_ntid, *oacc_tid_insn, oacc_tid,
	*oacc_nctaid_insn, oacc_nctaid, *oacc_ctaid_insn,
	oacc_ctaid): Replace with ...
	(oacc_nid, oacc_id): ... these.
	* config/nvptx/nvptx.c (nvptx_print_operand [CASE 'd']): Remove.

2015-06-19  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (struct reduction_info): Add reduc_addr field.
	(create_call_for_reduction_1): Handle case that reduc_addr is non-NULL.
	(gen_parallel_loop): Init clsn_data for oacc_kernels_p case.
	(try_create_reduction_list): Add and handle oacc_kernels_p parameter.
	(parallelize_loops): Add argument to call to try_create_reduction_list.

2015-06-18  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Move pass_fre later in pass group pass_oacc_kernels,
	replacing pass_copy_prop.

2015-06-18  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (rewrite_virtuals_into_loop_closed_ssa): New function.
	(transform_to_exit_first_loop_alt): Use
	rewrite_virtuals_into_loop_closed_ssa.

2015-06-18  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (transform_to_exit_first_loop_alt): Add update_stmt
	for cond_stmt.
	(try_get_loop_niter): Declare forward.
	(try_transform_to_exit_first_loop_alt): Use try_get_loop_niter to get
	updated number of iterations.  Extract alt_bount, and instantiate it.

2015-06-17  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (extract_omp_for_data): Only use static_chunk
	scheduling for acc gang loops when a the gang clause contains
	a non-'*' static argument.

2015-06-16  Tom de Vries  <tom@codesourcery.com>

	* varpool.c (make_offloadable_1): Declare decl with ATTRIBUTE_UNUSED.

2015-06-16  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (lower_reduction_clauses): Remove unused variable call.

2015-06-16  Chung-Lin Tang  <cltang@codesourcery.com>

	* omp-low.c (struct omp_region): Add inside_kernels_p field.
	(expand_omp_for_generic): Adjust to generate a 'sequential' loop
	when GOMP builtin arguments are BUILT_IN_NONE.
	(expand_omp_for): Use expand_omp_for_generic() to generate a
	non-parallelized loop for OMP_FORs inside OpenACC kernels regions.
	(expand_omp): Mark inside_kernels_p field true for regions
	nested inside OpenACC kernels constructs.

2015-06-15  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (expand_omp_for_static_nochunk): Update entry_bb after
	calling oacc-boradcast.
	(expand_omp_for_static_chunk): Likewise.
	(generate_oacc_broadcast): Insert a barrier after reading from
	shared memory.
	(set<tree> live_in): New static set.
	(populate_loop_live_in): New function.
	(oacc_populate_live_in_1): New function.
	(oacc_populate_live_in): New function.
	(oacc_broadcast): Extract loop data from omp_regions instead of
	omp_for_data, populate live_in set, broadcast worker variables, and
	return updated entry_bb.

2015-06-15  Julian Brown  <julian@codesourcery.com>

	* omp-low.c (build_oacc_threadbarrier): New function.
	(oacc_loop_needs_threadbarrier_p): New function.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
	Insert threadbarrier after worker loops.
	(find_omp_for_region_data): Rename to...
	(find_omp_for_region_gwv): This. Return mask, rather than modifying
	REGION structure.
	(build_omp_regions_1): Move modification of REGION structure to
	here, after calling above function with new name.
	(generate_oacc_broadcast): Use new build_oacc_threadbarrier
	function.
	(make_gimple_omp_edges): Make edges out of OpenACC worker loop exit
	block abnormal.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Add
	BUILT_IN_GOACC_THREADBARRIER.

2015-06-15  Julian Brown  <julian@codesourcery.com>

	* omp-low.c (make_predication_test): Split false edge out of
	cond_bb, making latter part abnormal.
	(predicate_bb): Set EDGE_ABNORMAL on edges before broadcast
	operations.

2015-06-15  Julian Brown  <julian@codesourcery.com>

	* builtins.c (expand_oacc_builtin): Return const1_rtx for
	ntid/nctaid builtins when the associated patterns are not present.
	* omp-builtins.def (BUILT_IN_GOACC_GET_THREAD_NUM)
	(BUILT_IN_GOACC_GET_NUM_THREADS): Remove.
	* omp-low.c (struct omp_for_data): Remove gang, worker, vector
	fields.
	(extract_omp_for_data): Don't initialise deleted gang, worker,
	vector fields.
	(expand_oacc_get_num_threads, expand_oacc_get_thread_num): New
	functions.
	(lower_reduction_clauses): Use above functions.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_for_static_chunk): Likewise.

2015-06-11  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (extract_omp_for_data): Adjust the chunk_size
	based on the static argument of the gang clause.

2015-06-10  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (enclosing_target_ctx): Un-ifdef. Remove null checking
	assert.
	(scan_omp_for): Check for incompatible combination of acc loop clauses.

2015-06-09  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-06-09  Tom de Vries  <tom@codesourcery.com>

	* gimple-iterator.h (gimple_seq_nondebug_singleton_p): Don't
	always return false.

2015-06-08  James Norris  <jnorris@codesourcery.com>

	* builtin-types.def (BT_FN_VOID_PTR_INT_UINT): New type.
	* gimple-pretty-print.c (dump_gimple_omp_target): Handle declare
	directive.
	* gimple.h (gf_mask): Add enum.
	(is_gimple_omp_oacc): Add declare directive.
	* gimplify.c (omp_notice_variable): Handle device_resident.
	(gimplify_omp_target_update): Handle declare directive.
	(gimplify_expr): Handle declare directive.
	* omp-builtins.def (BUILT_IN_GOACC_STATIC, BUILT_IN_GOACC_DECLARE):
	New types.
	* omp-low.c (expand_omp_target): Handle declare directive.
	(build_omp_regions_1): Likewise.
	(lower_omp_target): Likewise.
	(make_gimple_omp_edges): Likewise.
	* varpool.c (gomp-constants.h): Add inclusion.
	(make_offloadable_1, make_offloadable): New functions.
	(get_create): Add calls to make_offloadable.

2015-06-08  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-06-08  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/66442
	* gimple-iterator.h (gimple_seq_nondebug_singleton_p): Add function.
	* tree-parloops.c (try_transform_to_exit_first_loop_alt): Return false
	if the loop latch is not a singleton.  Use
	gimple_seq_nondebug_singleton_p instead of gimple_seq_singleton_p.

2015-06-04  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (gimple_stmt_ssa_operand_references_var_p): Remove function.
	(gimple_stmt_omp_data_i_init_p): Rewrite without
	gimple_stmt_ssa_operand_references_var_p.

2015-06-04  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (release_dangling_ssa_names): Factor out of ...
	(pass_expand_omp_ssa::execute): ... here.

2015-06-04  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (release_first_vuse_in_edge_dest): Add missing comment.

2015-06-04  Tom de Vries  <tom@codesourcery.com>

	* cfgloop.h (struct loop): Add in_oacc_kernels_region field.
	* omp-low.c (mark_loops_in_oacc_kernels_region): New function.
	(loop_get_oacc_kernels_region_entry): New function.
	(expand_omp_target): Call mark_loops_in_oacc_kernels_region.
	(loop_in_oacc_kernels_region_p): Remove function.
	* omp-low.h (loop_in_oacc_kernels_region_p): Remove declaration.
	(loop_get_oacc_kernels_region_entry): Declare.
	* tree-parloops.c (parallelize_loops): Use in_oacc_kernels_region field and
	loop_get_oacc_kernels_region_entry.
	* tree-ssa-loop-ch.c (pass_ch_execute): Use in_oacc_kernels_region field.

2015-06-04  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_acc_on_device): Mark parameters
	with ATTRIBUTE_UNUSED.

2015-06-03  Cesar Philippidis  <cesar@codesourcery.com>

	* builtins.c (expand_builtin_oacc_thread_broadcast): Allow
	constant value operads.
	* omp-low.c (expand_omp_for_static_nochunk): Broadcast variables
	to openacc vector threads when necessary.
	(expand_omp_for_static_chunk): Likewise.
	(generate_vector_broadcast): Teach how to handle non-integral typed
	variables.
	(populate_loop_use): New function.
	(oacc_broadcast_1): New function.
	(oacc_broadcast): New function.

2015-06-02  Bernd Schmidt  <bernds@codesourcery.com>

	* omp-low.c (oacc_alloc_broadcast_storage): Remove unused parameter
	CLAUSES and unnecessary code.  All callers changed.
	(expand_omp_target): Only look for entry-end statement if offloaded.
	(predicate_bb): Extend code to also jump around atomic regions.

2015-06-01  Tom de Vries  <tom@codesourcery.com>

	Revert:
	2015-05-28  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Replace pass_copy_prop with pass_fre. Surround with
	pass_tree_loop_done and pass_tree_loop_init.

2015-06-01  Bernd Schmidt  <bernds@codesourcery.com>

	* gimple.h (struct gimple_statement_omp_parallel_layout): Add a
	broadcast_array field.
	(gimple_omp_target_broadcast_array,
	gimple_omp_target_set_broadcast_array): New inline functions.
	* omp-low.c (struct omp_region): Add a broadcast_array field.
	(find_omp_target_region_data): Initialize it.  Change STMT arg to
	be a gomp_target *.  All callers changed.
	(struct omp_context): Add worker_sync_elt field.
	(alloc_var_ganglocal): Properly handle a NULL underlying_var.
	(oacc_alloc_broadcast_storage): Likewise.
	(required_predication_mask): New function.
	(requires_vector_predicate): Remove.  All callers changed to use
	required_predication_mask.
	(generate_vector_broadcast): Return a statement suitable as a
	block splitting point.
	(generate_oacc_broadcast, make_predication_test): New static
	functions.
	(predicate_bb): New arg MASK.  All callers changed.  Use
	generate_oacc_braodcast and use the split point it returns.
	Handle WSVP regions by jumping across entire loops.  Use
	make_predication_test.  Correctly handle GIMPLE_OMP_RETURN.
	(lower_omp_target): Call oacc_alloc_broadcast_storage.  Call
	gimple_omp_target_set_broadcast_array on the stmt.

2015-06-01  Tom de Vries  <tom@codesourcery.com>

	* builtin-attrs.def (DOT_DOT_r_r_r): Remove DEF_ATTR_FOR_STRING.
	(DOT_DOT_DOT_DOT_r_r_r): Add DEF_ATTR_FOR_STRING.
	(ATTR_FNSPEC_DOT_DOT_r_r_r_NOTHROW_LIST): Remove DEF_ATTR_TREE_LIST.
	(ATTR_FNSPEC_DOT_DOT_DOT_DOT_r_r_r_NOTHROW_LIST): Add
	DEF_ATTR_TREE_LIST.
	* omp-builtins.def (BUILT_IN_GOACC_DATA_START)
	(BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_KERNELS_INTERNAL)
	(BUILT_IN_GOACC_UPDATE): Fix fnspec.

2015-06-01  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (expand_omp_target): Fix GIMPLE_OMP_ENTRY_END handling for
	ssa.

2015-05-29  Bernd Schmidt  <bernds@codesourcery.com>

	* omp-low.c (struct omp_context): Add worker_var and worker_count
	fields.
	(oacc_init_count_vars): New function.
	(lower_omp_target): Call it.

	* config/nvptx/nvptx.md (UNSPECV_BARSYNC): New constant.
	(oacc_threadbarrier): New expander.
	(threadbarrier_insn): New pattern.
	* config/nvptx/nvptx.c (nvptx_cannot_copy_insn_p):
	* omp-builtins.def (BUILT_IN_GOACC_THREADBARRIER): Define.
	* builtins.c (expand_oacc_threadbarrier): Expand it.
	(expand_builtin): Handle it.

	* gimple.def (GIMPLE_OMP_ENTRY_END): New code.
	* gimple.h (gimple_build_omp_entry_end): Declare.
	(CASE_GIMPLE_OMP): Add GIMPLE_OMP_ENTRY_END.
	* gimple.c (gimple_build_omp_entry_end): New function.
	* gimple-low.c (lower_stmt): Handle GIMPLE_OMP_ENTRY_END.
	* omp-low.c (expand_omp_target): Remove the entry end statement.
	(predicate_bb): Don't predicate a block ending with
	GIMPLE_OMP_ENTRY_END.
	(lower_omp_target): Append a GIMPLE_OMP_ENTRY_END after the
	ganglocal data allocation.
	(make_gimple_omp_edges): Handle GIMPLE_OMP_ENTRY_END.
	* gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.

2015-05-28  Tom de Vries  <tom@codesourcery.com>

	* passes.def: Replace pass_copy_prop with pass_fre. Surround with
	pass_tree_loop_done and pass_tree_loop_init.
	* tree-parloops.c (gen_parallel_loop): Bail out of parallelization if
	try_transform_to_exit_first_loop_alt fails.

2015-05-28  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65443
	* tree-parloops.c (replace_imm_uses, replace_uses_in_bb_by)
	(replace_uses_in_bbs_by, transform_to_exit_first_loop_alt)
	(try_transform_to_exit_first_loop_alt): New function.
	(transform_to_exit_first_loop): Use
	try_transform_to_exit_first_loop_alt.

2015-05-28  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65419
	* cfgexpand.c (pass_data_expand): Add PROP_gimple_lompifn to
	properties_required field.
	* gimplify.c (gimplify_omp_workshare): Use IFN_GOACC_DATA_END_WITH_ARG
	instead of BUILT_IN_GOACC_DATA_END.  Clear PROP_gimple_lompifn in
	curr_properties.
	(gimplify_function_tree): Tentatively set PROP_gimple_lompifn in
	curr_properties.
	* internal-fn.c (expand_GOACC_DATA_END_WITH_ARG): New dummy function.
	* internal-fn.def (GOACC_DATA_END_WITH_ARG): New DEF_INTERNAL_FN.
	* omp-low.c (lower_omp_target): Set argument of GOACC_DATA_END_WITH_ARG.
	(pass_data_late_lower_omp): New pass_data.
	(pass_late_lower_omp): New pass.
	(pass_late_lower_omp::gate, pass_late_lower_omp::execute)
	(make_pass_late_lower_omp): New function.
	* passes.def: Add pass_late_lower_omp.
	* tree-inline.c (expand_call_inline): Handle PROP_gimple_lompifn.
	* tree-pass.h (PROP_gimple_lompifn): Add define.

2015-05-28  Julian Brown  <julian@codesourcery.com>

	PR libgomp/65742

	* builtins.c (expand_builtin_acc_on_device): Don't use open-coded
	sequence for !ACCEL_COMPILER.

2015-05-27  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (parallelize_loops): Remove checks limiting type of
	loops allowed.

2015-05-21  Bernd Schmidt  <bernds@codesourcery.com>

	* omp-low.c (struct omp_region): Add a gwv_this field.
	(bb_region_map): New variable.
	(find_omp_for_region_data, find_omp_target_region_data): New static
	functions.
	(build_omp_regions_1): Call them.  Build the bb_region_map.
	(enclosing_target_region, requires_vector_predicate,
	generate_vector_broadcast, predicate_bb, find_predicatable_bbs,
	predicate_omp_regions): New static functions.
	(execute_expand_omp): Allocate and free bb_region_map.

2015-05-20  Bernd Schmidt  <bernds@codesourcery.com>

	* config/nvptx/nvptx.c: Include "dumpfile,h".
	(condition_unidirectional_p): New static function.
	(nvptx_print_operand): Use it for new 'U' handling.
	(nvptx_reorg): Compute warp_equal_pseudos.
	* config/nvptx/nvptx.h (struct machine_function): New field
	warp_equal_pseudos.
	* config/nvptx/nvptx.md (br_true, br_false): Add %U modifier.

2015-05-19  Bernd Schmidt  <bernds@codesourcery.com>

	* omp-builtins.def (GOACC_thread_broadcast,
	GOACC_thread_broadcast_ll): New builtins.
	* optabs.def (oacc_thread_broadcast_optab): New optab.
	* builtins.c (expand_builtin_oacc_thread_broadcast): New function.
	(expand_builtin): Use it.
	* config/nvptx/nvptx.c (nvptx_cannot_copy_insn_p): New function.
	(TARGET_CANNOT_COPY_INSN_P): Define.
	* config/nvptx/nvptx.md (UNSPECV_WARP_BCAST): New constant.
	(oacc_thread_broadcastsi): New pattern.
	(oacc_thread_broadcastdi): New expander.

2015-05-19  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (enclosing_target_ctx): Comment out.

2015-05-18  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65637
	* omp-low.c (expand_omp_for_static_chunk): Handle case that fin_bb has 2
	predecessors.

2015-05-18  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65637
	* omp-low.c (find_phi_with_arg_on_edge): New function.
	(expand_omp_for_static_chunk): Fix inner loop phi.

2015-05-18  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65637
	* omp-low.c (expand_omp_for_static_chunk): Fix gcc_assert for the case
	that head is NULL.

2015-05-15  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (scan_omp_for): Remove check for nested parallel and
	kernels regions.

2015-05-13  Bernd Schmidt  <bernds@codesourcery.com>

	* config/nvptx/nvptx-opts.h: New file.
	* config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
	* config/nvptx/nvptx.h: Include "nvptx-opts.h".
	(ASM_SPEC): Define.
	(TARGET_SM35): New macro.
	* config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
	correct predicate.
	* config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
	values.
	(misa=): New option.

2015-05-13  Cesar Philippidis  <cesar@codesourcery.com>

	* except.c (finish_eh_generation): Don't finalize exeception
	handlers for functions containing the "oacc function" attribute.
	* omp-low.c (create_omp_child_function): Add an "oacc function"
	attribute to acc regions.

	* langhooks-def.h (lhd_omp_mappable_type): Add bool argument.
	* langhooks.c (lhd_omp_mappable_type): Likewise, for the
	parameter.
	* langhooks.h (struct lang_hooks_for_types): Add bool oacc
	argument.
	* gimplify.c (omp_notice_variable): Use it when calling the
	omp_mappable_type langhook.

2015-05-13  Thomas Schwinge  <thomas@codesourcery.com>
	    Bernd Schmidt  <bernds@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    James Norris  <jnorris@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>
	    Tom de Vries  <tom@codesourcery.com>

	* builtin-types.def
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
	Remove.
	(BT_FN_INT_INT_INT_INT)
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR):
	New function types.
	* builtins.c (expand_oacc_builtin, expand_oacc_ganglocal_ptr): New
	functions.
	(expand_builtin, is_simple_builtin): Use them.
	* config/nvptx/mkoffload.c (process): Protect
	GOMP_offload_register prototype from C++ name mangling.
	* config/nvptx/nvptx.c (nvptx_file_start): Print declaration of
	sdata.
	* config/nvptx/nvptx.md (UNSPEC_NCTAID, UNSPEC_CTAID)
	(UNSPEC_SHARED_DATA): New constants.
	(oacc_nctaid_insn, oacc_nctaid, oacc_ctaid_insn, oacc_ctaid)
	(ganglocal_ptr<mode>, ganglocal_ptr): New patterns.
	* doc/md.texi (oacc_ntid, oacc_tid): Document.
	* gimple.h (gimple_statement_omp_parallel_layout): Add
	ganglocal_size member.
	(gimple_omp_target_ganglocal_size)
	(gimple_omp_target_set_ganglocal_size): New functions.
	* gimplify.c (gimplify_omp_var_data): Add GOVD_USE_DEVICE,
	GOVD_FORCE_MAP, GOVD_GANGLOCAL.
	(omp_region_type): Add ORT_HOST_DATA.
	(omp_region_kind, acc_region_kind): New enum types.
	(gimplify_omp_ctx): Add region_kind, acc_region_kind members.
	(new_omp_context, omp_add_variable, omp_notice_variable)
	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1): Update
	for OpenACC.
	(gimplify_scan_omp_clauses): Add region_kind formal parameter.
	Adjust all users.
	(gimplify_oacc_host_data_1, gimplify_oacc_host_data): New
	functions.
	(gimplify_expr): Update handling of OACC_HOST_DATA.
	* omp-builtins.def (BUILT_IN_GOACC_KERNELS_INTERNAL)
	(BUILT_IN_GOACC_KERNELS, BUILT_IN_GOACC_PARALLEL): Change type
	from BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR
	to
	BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR.
	Adjust all users.
	(BUILT_IN_GOACC_GET_THREAD_NUM, BUILT_IN_GOACC_GET_NUM_THREADS):
	Change type from from BT_FN_INT to BT_FN_INT_INT_INT_INT.  Adjust
	all users.
	(BUILT_IN_GOACC_NTID, BUILT_IN_GOACC_TID, BUILT_IN_GOACC_NCTAID)
	(BUILT_IN_GOACC_CTAID, BUILT_IN_GOACC_GET_GANGLOCAL_PTR)
	(BUILT_IN_GOACC_DEVICEPTR): New builtins.
	* omp-low.c (omp_context): Add oacc_reduction_set, ganglocal_init,
	ganglocal_ptr, ganglocal_size, ganglocal_size_host members.
	(new_omp_context, delete_omp_context): Initialize/deinitialize
	these, respectively.
	(omp_for_data): Add gang, worker, vector members.
	(extract_omp_for_data): Populate these.
	(oacc_max_threads, oacc_finalize_reduction_data): Rewrite
	functions.
	(is_oacc_parallel, oacc_parallel_max_reduction_array_size)
	(align_and_expand, alloc_var_ganglocal, install_var_ganglocal)
	(install_array_var_ganglocal)
	(oacc_outermost_parallel_kernels_context, oacc_inside_routine)
	(is_oacc_multithreaded, oacc_needs_global_memory)
	(is_atomic_compatible_reduction, oacc_serial_reduction)
	(oacc_process_reduction_data_helper): New functions.
	(build_outer_var_ref, fixup_remapped_decl, scan_sharing_clauses)
	(check_omp_nesting_restrictions, lower_rec_input_clauses)
	(lower_reduction_clauses, oacc_initialize_reduction_data)
	(oacc_process_reduction_data, lower_omp_target)
	(lower_omp_regimplify_p): Update for OpenACC.
	* tree-parloops.c (create_parallel_loop): For OpenACC, switch from
	vector to gang parallelism.
	* tree-pretty-print.c (dump_omp_clause): Handle
	GOMP_MAP_FORCE_TO_GANGLOCAL.

2015-05-13  Bernd Schmidt  <bernds@codesourcery.com>

	* config/nvptx/mkoffload.c (enum Kind, struct Token, enum Vis)
	(struct Stmt): Remove.
	(read_file, tokenize, write_token, write_tokens, alloc_stmt)
	(alloc_comment, append_stmt, rev_stmts, write_stmt, write_stmts)
	(parse_insn, parse_list_nosemi, parse_init, parse_file): Remove
	functions and macros.
	(decls, vars, fns): Remove variables.
	(maybe_unlink): Use save_temps rather than debug to keep files.
	(tool_cleanup): Unlink ptx_cfile_name and ptx_name.
	(read_file): Accept a pointer to a length and store into it.
	(process): Don't try to parse the input file, just write it out as a
	string, but looking for maps.  Also write out the length.
	(main): Don't use -S to compile ptx code.  Add -lgomp.  Add
	COLLECT_MKOFFLOAD_OPTIONS.  Scan for -fopenacc and produce an empty
	image if it is not set.  Scan for -save-temps.
	* gcc.c (mkoffload_options): New static variable.
	(display_help): Mention -Xoffload
	(driver_handle_option): Handle it.
	(add_mkoffload_option): New static function.
	(set_collect_gcc_options): If offloading, set
	COLLECT_MKOFFLOAD_OPTIONS.
	* doc/invoke.texi (-Xoffload): Document.
	* common.opt (Xoffload): New option.
	* gcc.c (process_command): Use spec_machine rather than
	spec_host_machine to build tooldir_prefix2.

2015-05-11  Thomas Schwinge  <thomas@codesourcery.com>
	    Bernd Schmidt  <bernds@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    James Norris  <jnorris@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>
	    Tom de Vries  <tom@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses)
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_TILE.
	(gimplify_expr): Don't verify OACC_KERNELS_COMBINED, and
	OACC_PARALLEL_COMBINED.
	* omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_BIND,
	OMP_CLAUSE_NOHOST, OMP_CLAUSE_TILE.
	(check_omp_nesting_restrictions): Support GIMPLE_OMP_ATOMIC_LOAD,
	GIMPLE_OMP_ATOMIC_STORE inside OpenACC contexts.
	* tree-core.h (omp_clause_code): Add OMP_CLAUSE_BIND,
	OMP_CLAUSE_NOHOST, OMP_CLAUSE_TILE, OMP_CLAUSE_DEVICE_TYPE.
	* tree.c (omp_clause_num_ops, omp_clause_code_name, walk_tree_1):
	Update for these.
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_TILE.
	* tree.h (OACC_KERNELS_COMBINED, OACC_PARALLEL_COMBINED): Remove
	macros.
	(OMP_CLAUSE_BIND_NAME, OMP_CLAUSE_TILE_LIST)
	(OMP_CLAUSE_DEVICE_TYPE_DEVICES, OMP_CLAUSE_DEVICE_TYPE_CLAUSES):
	Add macros.

2015-04-21  Tom de Vries  <tom@codesourcery.com>

	* builtin-attrs.def (DOT_DOT_r_r_r): Add DEF_ATTR_FOR_STRING.
	(ATTR_FNSPEC_DOT_DOT_r_r_r_NOTHROW_LIST): Add DEF_ATTR_TREE_LIST.
	* omp-builtins.def (BUILT_IN_GOACC_DATA_START)
	(BUILT_IN_GOACC_ENTER_EXIT_DATA, BUILT_IN_GOACC_UPDATE): Use
	DEF_GOACC_BUILTIN_FNSPEC instead of DEF_GOACC_BUILTIN.

	* passes.def: Add pass_fre after pass_ch_oacc_kernels.

	* passes.def: Add pass_scev_cprop to pass_oacc_kernels.
	* tree-ssa-loop.c (pass_scev_cprop::clone): New function.

	* passes.def: Add pass_parallelize_loops_oacc_kernels in pass group
	pass_oacc_kernels.
	* tree-parloops.c (create_parallel_loop, gen_parallel_loop): Add
	function parameters region_entry and bool oacc_kernels_p.  Handle
	oacc_kernels_p.
	Call create_parallel_loop with additional args.
	(parallelize_loops): Add function parameter oacc_kernels_p.  Calculate
	dominance info.  Skip loops that are not in a kernels region. Call
	gen_parallel_loop with additional args.
	(pass_parallelize_loops::execute): Call parallelize_loops with false
	argument.
	(pass_data_parallelize_loops_oacc_kernels): New pass_data.
	(class pass_parallelize_loops_oacc_kernels): New pass.
	(pass_parallelize_loops_oacc_kernels::execute)
	(make_pass_parallelize_loops_oacc_kernels): New function.
	* tree-pass.h (make_pass_parallelize_loops_oacc_kernels): Declare.

	* passes.def: Add pass_copy_prop to pass group pass_oacc_kernels.
	* tree-ssa-copy.c (stmt_may_generate_copy): Handle .omp_data_i init
	conservatively.

	* passes.def: Add pass_lim in pass group pass_ch_oacc_kernels.

	* passes.def: Run pass_tree_loop_init and pass_tree_loop_done in pass
	group pass_oacc_kernels.
	* tree-ssa-loop.c (pass_tree_loop_init::clone)
	(pass_tree_loop_done::clone): New function.

	* omp-low.c (loop_in_oacc_kernels_region_p): New function.
	* omp-low.h (loop_in_oacc_kernels_region_p): Declare.
	* passes.def: Add pass_ch_oacc_kernels to pass group pass_oacc_kernels.
	* tree-pass.h (make_pass_ch_oacc_kernels): Declare
	* tree-ssa-loop-ch.c: Include omp-low.h.
	(pass_ch_execute): Declare.
	(pass_ch::execute): Factor out ...
	(pass_ch_execute): ... this new function.  If handling oacc kernels,
	skip loops that are not in oacc kernels region.
	(pass_ch_oacc_kernels::execute):
	(pass_data_ch_oacc_kernels): New pass_data.
	(class pass_ch_oacc_kernels): New pass.
	(pass_ch_oacc_kernels::execute, make_pass_ch_oacc_kernels): New
	function.

	* passes.def: Add pass group pass_oacc_kernels.
	* tree-pass.h (make_pass_oacc_kernels): Declare.
	* tree-ssa-loop.c (gate_oacc_kernels): New static function.
	(pass_data_oacc_kernels): New pass_data.
	(class pass_oacc_kernels): New pass.
	(make_pass_oacc_kernels): New function.

	* omp-low.c: Include gimple-pretty-print.h.
	(release_first_vuse_in_edge_dest): New function.
	(expand_omp_target): When not in ssa, don't split off oacc kernels
	region, clear PROP_gimple_eomp in cfun->curr_properties to force later
	expanssion, and add GOACC_kernels_internal call.
	When in ssa, split off oacc kernels and convert GOACC_kernels_internal
	into GOACC_kernels call.  Handle ssa-code.
	(pass_data_expand_omp): Don't set PROP_gimple_eomp unconditionally in
	properties_provided field.
	(pass_expand_omp::execute): Set PROP_gimple_eomp in
	cfun->curr_properties tentatively.
	(pass_data_expand_omp_ssa): Add TODO_remove_unused_locals to
	todo_flags_finish field.
	(pass_expand_omp_ssa::execute): Release dangling SSA_NAMEs after calling
	execute_expand_omp.
	(gimple_stmt_ssa_operand_references_var_p)
	(gimple_stmt_omp_data_i_init_p): New function.
	* omp-low.h (gimple_stmt_omp_data_i_init_p): Declare.
	* passes.def: Add pass_expand_omp_ssa after pass_fre.  Add
	pass_expand_omp_ssa after pass_all_early_optimizations.
	* tree-ssa-ccp.c: Include omp-low.h.
	(surely_varying_stmt_p, ccp_visit_stmt): Handle .omp_data_i init
	conservatively.
	* tree-ssa-forwprop.c: Include omp-low.h.
	(pass_forwprop::execute): Handle .omp_data_i init conservatively.
	* tree-ssa-sccvn.c: Include omp-low.h.
	(visit_use): Handle .omp_data_i init conservatively.
	* cgraph.c (cgraph_node::release_body): Don't release offloadable
	functions.

	* builtin-attrs.def (DOT_DOT_DOT_r_r_r): Add DEF_ATTR_FOR_STRING.
	(ATTR_FNSPEC_DOT_DOT_DOT_r_r_r_NOTHROW_LIST): Add
	DEF_ATTR_TREE_LIST.
	* omp-builtins.def (BUILT_IN_GOACC_KERNELS_INTERNAL): Add
	DEF_GOACC_BUILTIN_FNSPEC.

	* builtins.def (DEF_GOACC_BUILTIN_FNSPEC): Define.

2015-03-21  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65460
	* omp-low.c (expand_omp_target): Set parallelized_function on
	cgraph_node for child_fn.

2015-03-21  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-03-21  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65458
	* cgraph.c (cgraph_node::dump): Handle parallelized_function field.
	* cgraph.h (cgraph_node): Add parallelized_function field.
	* lto-cgraph.c (lto_output_node): Write parallelized_function field.
	(input_overwrite_node): Read parallelized_function field.
	* omp-low.c (expand_omp_taskreg, finalize_task_copyfn): Set
	parallelized_function on cgraph_node for child_fn.
	* tree-parloops.c: Add include of plugin-api.h, ipa-ref.h and cgraph.h.
	Remove include of gt-tree-parloops.h.
	(parallelized_functions): Remove static variable.
	(parallelized_function_p): Rewrite using parallelized_function field of
	cgraph_node.
	(create_loop_fn): Remove adding to parallelized_functions.
	* Makefile.in (GTFILES): Remove tree-parloops.c

2015-03-21  Tom de Vries  <tom@codesourcery.com>

	backport from trunk:
	2015-03-18  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (parallelize_loops): Make static.
	* tree-parloops.h (parallelize_loops): Remove extern declaration.

2015-01-13  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-core.h: Don't include "gomp-constants.h".
	(struct tree_omp_clause): Change type of map_kind member from enum
	gomp_map_kind to unsigned char.
	* tree.h (OMP_CLAUSE_MAP_KIND): Cast it to enum gomp_map_kind.
	(OMP_CLAUSE_SET_MAP_KIND): New macro.
	* gimplify.c (gimplify_adjust_omp_clauses_1)
	(gimplify_adjust_omp_clauses): Use OMP_CLAUSE_SET_MAP_KIND.
	* omp-low.c (oacc_initialize_reduction_data): Likewise.
	* tree-nested.c (convert_nonlocal_reference_stmt)
	(convert_local_reference_stmt, convert_gimple_call): Likewise.
	* tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
	Likewise.

	* lto-streamer-out.c: Include "gomp-constants.h".
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.

2015-01-12  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-core.h (OMP_CLAUSE_MAP_ALLOC, OMP_CLAUSE_MAP_TO)
	(OMP_CLAUSE_MAP_FROM, OMP_CLAUSE_MAP_TOFROM)
	(OMP_CLAUSE_MAP_POINTER, OMP_CLAUSE_MAP_TO_PSET)
	(OMP_CLAUSE_MAP_FORCE_ALLOC, OMP_CLAUSE_MAP_FORCE_TO)
	(OMP_CLAUSE_MAP_FORCE_FROM, OMP_CLAUSE_MAP_FORCE_TOFROM)
	(OMP_CLAUSE_MAP_FORCE_PRESENT, OMP_CLAUSE_MAP_FORCE_DEALLOC)
	(OMP_CLAUSE_MAP_FORCE_DEVICEPTR, OMP_CLAUSE_MAP_LAST): Remove from
	enum omp_clause_map_kind.  Change all users to
	include/gomp-constants.h's enum gomp_map_kind.
	(enum omp_clause_map_kind): Remove.

2014-12-18  Thomas Schwinge  <thomas@codesourcery.com>

	* builtins.c (expand_builtin_acc_on_device): Fix logic error.

	* config/i386/intelmic-offload.h: New file.
	* config/nvptx/offload.h: Likewise.
	* config.gcc <*-intelmic-*, *-intelmicemul-*, nvptx-*>: Point to
	them via tm_file.

2014-12-18  Thomas Schwinge  <thomas@codesourcery.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* builtins.c (expand_builtin_acc_on_device): Use
	do_compare_rtx_and_jump instead of emit_cmp_and_jump_insns.

	* builtins.c (expand_builtin_acc_on_device): Make more RTXy.

2014-12-17  Thomas Schwinge  <thomas@codesourcery.com>
	    Bernd Schmidt  <bernds@codesourcery.com>

	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_AUTO, and
	OMP_CLAUSE_SEQ.
	* tree.c (omp_clause_num_ops, omp_clause_code_name, walk_tree_1):
	Update accordingly.
	* gimplify.c (gimplify_scan_omp_clauses)
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_AUTO,
	OMP_CLAUSE_GANG, OMP_CLAUSE_SEQ, OMP_CLAUSE_VECTOR, and
	OMP_CLAUSE_WORKER.
	* tree-pretty-print.c (dump_omp_clause): Likewise.
	* omp-low.c (scan_sharing_clauses): Likewise.
	(struct omp_context): Add gwv_below, and gwv_this members.
	(enclosing_target_ctx, oacc_loop_or_target_p): New functions.
	(scan_omp_for, scan_omp_target): Use those.

2014-12-17  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-nested.c (convert_nonlocal_reference_stmt)
	(convert_local_reference_stmt, convert_tramp_reference_stmt)
	(convert_gimple_call) <GIMPLE_OMP_TARGET>: Use
	is_gimple_omp_offloaded.

	* omp-low.c (lower_reduction_clauses): Simplify OpenACC handling.

	* gimple.h: Rename is_gimple_omp_oacc_specifically to
	is_gimple_omp_oacc.  Update all users.

	* gimplify.c (enum omp_region_type): Restore ORT_TARGET_DATA and
	ORT_TARGET.  Update all users.

	* doc/generic.texi (OpenMP): Move OpenACC stuff into...
	(OpenACC): ... this new subsection.

	* builtin-types.def: Remove BT_FN_VOID_INT_PTR_INT.

	* oacc-builtins.def: Merge into omp-builtins.def.  Update all users.

	* builtins.c (expand_builtin_acc_on_device): Use
	include/gomp-constants.h.
	* omp-low.c (expand_omp_target, oacc_process_reduction_data)
	(lower_omp_target): Likewise.
	* tree-core.h (enum omp_clause_map_kind): Likewise.

	* omp-low.c (build_omp_regions_1, make_gimple_omp_edges): Simplify
	multi-line if conditions.

2014-12-10  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (scan_omp_target): Remove taskreg_nesting_level and
	target_nesting_level assertions.
	(check_omp_nesting_restrictions): Rework OpenACC constructs
	handling.  Update and extend the relevant test cases.

2014-12-10  Thomas Schwinge  <thomas@codesourcery.com>
	    Bernd Schmidt  <bernds@codesourcery.com>

	* gimple.def (GIMPLE_OACC_KERNELS, GIMPLE_OACC_PARALLEL): Merge
	into GIMPLE_OMP_TARGET.  Update all users.

2014-12-10  Thomas Schwinge  <thomas@codesourcery.com>

	* cgraphbuild.c (pass_build_cgraph_edges::execute): Remove
	handling of GIMPLE_OACC_PARALLEL.
	* gimple-pretty-print.c (dump_gimple_omp_target): Dump a bit more
	data, pretty-printing.

	* omp-low.c (build_omp_regions_1, make_gimple_omp_edges)
	<GIMPLE_OMP_TARGET>: Handle
	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA the same as
	GF_OMP_TARGET_KIND_OACC_UPDATE.

2014-11-13  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (oacc_get_reduction_array_id): Fix whitespace.

2014-11-13  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (omp_get_id): Rename to...
	(oacc_get_reduction_array_id): ... this.
	(lookup_oacc_reduction): ... this.
	(lookup_reduction): Rename to...
	(maybe_lookup_reduction): Rename to...
	(maybe_lookup_oacc_reduction): ... this.
	(scan_sharing_clauses): Update calls to renamed fns.
	(lower_reduction_var_helper): Rename to...
	(oacc_lower_reduction_var_helper): ... this.
	(lower_reduction_clauses): Rename to...
	(oacc_lower_reduction_clauses): ... this.
	(omp_gimple_assign_with_ops): Rename to...
	(oacc_gimple_assign_with_ops): ... this.
	(initialize_reduction_data): Rename to ...
	(oacc_initialize_reduction_data): ... this.
	(finalize_reduction_data): Rename to...
	(oacc_finalize_reduction_data): ... this.
	(process_reduction_data): Rename to...
	(oacc_process_reduction_data): ... this.
	(lower_omp_target): Update calls to renamed fns.

2014-11-13  Thomas Schwinge  <thomas@codesourcery.com>

	* gimplify.c (gimplify_omp_workshare) <OACC_DATA, OACC_KERNELS,
	OACC_PARALLEL>: Don't request ORT_TARGET_MAP_FORCE.
	(enum gimplify_omp_var_data, enum omp_region_type): Remove
	GOVD_MAP_FORCE, and ORT_TARGET_MAP_FORCE, respectively.  Update
	all users.

	* omp-low.c (scan_sharing_clauses) <OMP_CLAUSE_MAP>: Revert
	earlier change.

2014-11-12  Cesar Philippidis  <cesar@codesourcery.com>

	* tree.c (omp_clause_code_name): Add missing comma
	after "_Cilk_for_count_".

2014-11-12  Thomas Schwinge  <thomas@codesourcery.com>

	* gimplify.c (gimplify_omp_for): Eliminate govd_private; always
	use GOVD_PRIVATE.

	* omp-low.c (scan_oacc_offload, expand_oacc_offload)
	(lower_oacc_offload): Merge into scan_omp_target,
	expand_omp_target, lower_omp_target, respectively.  Update all
	users.

2014-11-11  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (scan_sharing_clauses): Remove bogus assertion.

	* omp-low.c (delete_omp_context): Dispose of reduction_map.

	* omp-low.c (maybe_lookup_reduction): Don't require an OpenACC
	context.
	(lower_oacc_offload): Simplify use of maybe_lookup_reduction.

	* omp-low.c (lower_omp_target): Restore two gcc_asserts.

2014-11-06  Thomas Schwinge  <thomas@codesourcery.com>

	* gimple.h (is_gimple_omp_oacc_specifically): Return true for
	GIMPLE_OMP_TARGET's GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA.

	* omp-low.c (lower_reduction_clauses): Initialize tid.

2014-11-05  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-core.h (enum omp_clause_code): Remove OMP_CLAUSE_HOST and
	OMP_CLAUSE_OACC_DEVICE.  Update all users.

	* gimplify.c (gimplify_oacc_cache): New function.
	(gimplify_expr): Use it for OACC_CACHE.
	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
	OMP_CLAUSE__CACHE_.

	* tree-core.h (enum omp_clause_code): Move OMP_NO_CLAUSE_CACHE
	next to, and handle it like a data clause.  Rename it to
	OMP_CLAUSE__CACHE_.  Update all users.

	* invoke.texi: Update for OpenACC.
	* sourcebuild.texi: Likewise.

	* tree.def (OACC_WAIT): Remove.  Update all users.

	* omp-builtins.def (BUILT_IN_OMP_SET_NUM_THREADS): Remove.

2014-11-03  Cesar Philippidis  <cesar@codesourcery.com>

	* builtins.def (DEF_GOACC_BUILTIN): Revert erroneous checkin.

2014-11-03  Cesar Philippidis  <cesar@codesourcery.com>

	* oacc-builtins.def (BUILT_IN_GOACC_GET_NUM_THREADS): New built-in
	function.
	(BUILT_IN_ACC_GET_DEVICE_TYPE): Likewise.
	* omp-low.c (oacc_max_threads): New function.
	(lower_reduction_clauses): Use the GOACC thread builtin functions to
	determine the thread count. Handle multiple reduction variables.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_for_static_chunk): Likewise.
	(finalize_reduction_data): General cleanups.
	(process_reduction_data): Use acc_get_device_type to determine nthreads
	at runtime.

2014-11-03  Cesar Philippidis  <cesar@codesourcery.com>

	* gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA.
	* gimple-pretty-print.c (dump_gimple_omp_target): Handle it.
	* gimplify.c (gimplify_scan_omp_clauses): Remove switch stmt which
	declared OMP_CLAUSE_MAP_FORCE_DEALLOC as unimplemented.
	(gimplify_omp_target_update): Handle OACC_ENTER_DATA and
	OACC_EXIT_DATA.
	(gimplify_expr): Shuffle around OACC_ENTER_DATA, OACC_EXIT_DATA and
	OACC_WAIT.
	* oacc-builtins.def (BUILD_INT_GOACC_ENTER_EXIT_DATA): New built-in
	function.
	* omp-low.c (expand_omp_target): Handle
	GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA. Don't use quick_push when
	there is an unknown number of wait args.
	(lower_omp_target): Handle GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA.

2014-10-24  James Norris  <jnorris@codesourcery.com>

	* builtin-types.def (BT_FN_VOID_INT_INT_VAR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR,
	BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR): Add.
	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT): Remove.
	* c-family/c-common.c (enum c_builtin_type, c_define_builtins): Remove
	unused FUNCTION_TYPE_10. Add new FUNCTION_TYPE_VAR_8 and
	FUNCTION_TYPE_VAR_12.
	* c-family/c-pragma.c (oacc_pragmas): Add entry for wait directive.
	* c/c-parser.c (c_parser_omp_clause_name): Add handling of wait and
	async clauses.
	(c_parser_oacc_wait_list, c_parser_oacc_clause_async,
	c_parser_oacc_clause_wait): New.
	(c_parser_oacc_all_clauses): Handle async and wait clauses.
	(OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
	OACC_UPDATE_CLAUSE_MASK): Add async and wait clauses.
	(OACC_WAIT_CLAUSE_MASK): New.
	(c_parser_oacc_wait): New.
	(c_parser_omp_construct): Handle wait directive.
	* c/c-typeck.c (c_finish_omp_clauses): Handle async and wait clauses.
	* fortran/f95-lang.c (gfc_init_builtin_functions): Remove unused
	FUNCTION_TYPE_10. Add new FUNCTION_TYPE_VAR_2, FUNCTION_TYPE_VAR_8,
	and FUNCTION_TYPE_VAR_12.
	* fortran/types.def (BT_FN_VOID_INT_INT_VAR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR,
	BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR): Add.
	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT): Remove.
	* lto/lto-lang.c (enum lto_builtin_type, lto_define_builtins): Remove
	unsigned FUNCTION_TYPE_10. Add new FUNCTION_TYPE_VAR_8 and
	FUNCTION_TYPE_VAR_12.
	* oacc-builtins.def (BUILT_IN_GOACC_KERNELS BUILT_IN_GOACC_PARALLEL,
	BUILT_IN_GOACC_UPDATE, BUILT_IN_GOACC_WAIT): Change type.
	* omp-low.c (scan_sharing_clauses): Handle async and wait clauses.
	(expand_oacc_offload): Lower kernel directive and async and wait
	clauses.

2014-10-23  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (finalize_reduction_data): Don't skip the reduction
	variable's original value.

2014-10-20  Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses): Remove switch stmt which
	declared OMP_CLAUSE_MAP_FORCE_DEALLOC as unimplemented.
	(gimplify_expr): Remove OACC_WAIT, since it handled directly by the
	front ends.

2014-10-15  James Norris  <jnorris@codesourcery.com>

	* builtin-types.def (BT_FN_VOID_INT_PTR_INT): New type.
	* oacc-builtins.def (BUILT_IN_GOACC_WAIT): New builtin.

2014-10-09  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (process_reduction_data): Initialize variable inner.

2014-10-08  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (lower_reduction_clauses): Clarify comment.
	(process_reduction_data): Scan for nonempty bind statements at
	the beginning of parallel blocks.

2014-09-23  Thomas Schwinge  <thomas@codesourcery.com>

	* builtins.def (DEF_GOACC_BUILTIN_COMPILER): New macro.
	* oacc-builtins.def (BUILT_IN_GOACC_UPDATE): New builtin.
	* builtins.c (expand_builtin_acc_on_device): New function.
	(expand_builtin): Use it to handle BUILT_IN_ACC_ON_DEVICE.
	(is_inexpensive_builtin): Handle BUILT_IN_ACC_ON_DEVICE.

2014-09-08  Thomas Schwinge  <thomas@codesourcery.com>

	* configure.ac (offload_targets): Remove.
	* configure: Regenerate.

2014-09-05  Bernd Schmidt  <bernds@codesourcery.com>

	* configure.ac (enable-accelerator): Remove option.
	(enable_accelerator): Don't subst.
	* configure: Regenerate.

2014-09-03  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (expand_oacc_offload): Add child_fn to offload_funcs.

2014-08-19  Ilya Verbin  <ilya.verbin@intel.com>

	* Makefile.in (GTFILES): Add omp-low.h.
	* cgraphunit.c: Include omp-low.h.
	(init_offload_var_table): New function.
	(ipa_passes): Run ipa_write_summaries for target only when
	offload_funcs or offload_vars is not empty.
	* gengtype.c (ifiles): Add omp-low.h.
	* lto/lto.c (read_cgraph_and_symbols): Call input_offload_tables.
	* lto-cgraph.c: Include omp-low.h.
	(output_offload_tables): New function.
	(input_offload_tables): Likewise.
	* lto-section-in.c (lto_section_name): Add offload_table.
	* lto-streamer-out.c (lto_output): Call output_offload_tables.
	* lto-streamer.h: Declare output_offload_tables
	and input_offload_tables.
	(lto_section_type): Add LTO_section_offload_table.
	* omp-low.c: Define offload_funcs and offload_vars.
	(expand_omp_target): Add child_fn to offload_funcs.
	(omp_finish_file): Remove obsolete code.
	* omp-low.h: Declare offload_funcs and offload_vars.

2014-08-04  Bernd Schmidt  <bernds@codesourcery.com>

	* Makefile.in (tool_prefix): Remove.
	(unlibsubdir): Change depending on enable_as_accelerator.
	(GCC_TARGET_INSTALL_NAME): Revert previous change.
	(install_driver): Rework offloading changes.
	* configure.ac (tool_prefix): Remove.
	(enable-as-accelerator-for): Don't require --enable-as-accelerator.
	Update the program_transform_name.
	(offload_targets): Add 'g' modifier to sed script.
	* configure: Regenerate.

2014-07-28  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (get_base_type): New function.
	(scan_sharing_clauses): Replace TREE_TYPE with get_base_type.
	(lower_reduction_clauses): Use it.
	(initialize_reduction_data): Likewise.
	(finalize_reduction_data): Likewise. Remove new_var.

2014-07-28  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (process_reduction_data): Remove unused variables.

2014-07-24  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (extract_omp_for_data): Force OpenACC loop to use a
	chunk size of one.

	* omp-low.c (expand_omp_for_static_chunk): Merge changes
	previously applied to expand_omp_for_static_nochunk.

2014-07-14  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (extract_omp_for_data): Likewise.
	(expand_omp_for_static_nochunk): Likewise.

2014-07-14  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (process_reduction_data): Check for new
	binding level and skip for-loops which don't have a
	reduction clause.

2014-07-08  Cesar Philippidis  <cesar@codesourcery.com>
	    Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (omp_get_id): New function.
	(lookup_reduction): New function.
	(maybe_lookup_reduction): New function.
	(build_outer_var_ref): Remove openacc assert.
	(new_omp_context): Preserve ctx->reduction_map.
	(scan_sharing_clauses): Handle OMP_CLAUSE_REDUCTION.
	(scan_oacc_offload): Initialize ctx->reduction_map.
	(lower_reduction_clauses): Handle OpenACC reductions.
	(omp_gimple_assign_with_ops): New function.
	(initialize_reduction_data): New function.
	(finalize_reduction_data): New function.
	(process_reduction_data): New function.
	(lower_oacc_offload): Handle reductions.
	* gcc/omp-builtins.def (BUILT_IN_OMP_SET_NUM_THREADS): New.

2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
	    Ilmir Usmanov  <i.usmanov@samsung.com>

	* tree-pretty-print.c (dump_omp_clause): Instead of
	OMP_CLAUSE_DECL, use more specific accessors for some clauses.

2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (extract_omp_for_data, scan_sharing_clauses): For
	OpenACC directives, the collapse(1) clause is supported.

2014-06-13  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.c (scan_sharing_clauses): Preliminary support for
	OMP_CLAUSE_PRIVATE for OpenACC.

	* omp-low.c (scan_sharing_clauses): For clauses currently not
	supported with OpenACC directives, emit a sorry message instead of
	aborting.

2014-06-12  Thomas Schwinge  <thomas@codesourcery.com>
	    James Norris  <jnorris@codesourcery.com>

	* omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_IF.
	(expand_oacc_offload, expand_omp_target): Handle it.

2014-06-06  Thomas Schwinge  <thomas@codesourcery.com>
	    James Norris  <jnorris@codesourcery.com>

	* gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_UPDATE, and
	extend mask size, GF_OMP_TARGET_KIND_MASK.
	(is_gimple_omp_oacc_specifically): Handle
	GF_OMP_TARGET_KIND_OACC_UPDATE.
	* gimplify.c (gimplify_omp_target_update, gimplify_expr):
	Likewise.
	* gimple-pretty-print.c (dump_gimple_omp_target): Likewise.
	* omp-low.c (scan_omp_target, expand_omp_target)
	(build_omp_regions_1, lower_omp_target, lower_omp_1)
	(make_gimple_omp_edges): Likewise.
	* oacc-builtins.def (BUILT_IN_GOACC_UPDATE): New builtin.

2014-06-05  Thomas Schwinge  <thomas@codesourcery.com>

	* gimplify.c (gimplify_scan_omp_clauses)
	(gimplify_adjust_omp_clauses): Handle
	OMP_CLAUSE_MAP_FORCE_DEVICEPTR.
	* omp-low.c (scan_sharing_clauses, lower_oacc_offload)
	(lower_omp_target): Likewise.
	* tree-core.h (enum omp_clause_map_kind)
	<OMP_CLAUSE_MAP_FORCE_DEVICEPTR>: Update comment.

	* gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP>:
	Don't block OMP_CLAUSE_MAP_FORCE_PRESENT.

2014-06-04  Thomas Schwinge  <thomas@codesourcery.com>

	* cgraphunit.c (ipa_passes, compile): Handle flag_openacc next to
	flag_openmp.
	* ipa-inline-analysis.c (inline_generate_summary): Likewise.
	* lto-streamer.c (lto_streamer_init, gate_lto_out): Likewise.
	* passes.c (ipa_write_summaries): Likewise.

2014-05-12  Bernd Schmidt  <bernds@codesourcery.com>

	* lto-wrapper.c (ompbegin): New static variable.
	(find_ompbeginend): Renamed from find_ompend.  Also look for
	crtompbegin.o.
	(run_gcc): Also use ompbegin.

2014-05-08  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (get_offload_symbol_decl): Mark __OPENMP_TARGET__ as
	addressable.

2014-04-04  Bernd Schmidt  <bernds@codesourcery.com>

	* lto-wrapper.c (replace_special_characters): Remove functions and
	all calls to it.

	* lto-section-names.h (OFFLOAD_VAR_TABLE_SECTION_NAME,
	OFFLOAD_FUNC_TABLE_SECTION_NAME): Define.
	* lto-wrapper.c (OFFLOAD_FUNC_TABLE_SECTION_NAME): Don't define.
	(ompend): New static variable.
	(copy_file, find_ompend): New static functions.
	(run_gcc): Call find_ompend if we have offload images.  Add its
	return value to the output.
	* omp-low.c: Include "lto-section-names.h".
	(omp_finish_file): Initialize section names from macros defined there.

	* omp-low.c (offload_symbol_decl): New static variable.
	(get_offload_symbol_decl): New static function.
	(expand_oacc_offload, expand_omp_target): Use it.

2014-04-02  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (omp_finish_file): Use num_vars instead of num_funcs
	when recording offload symbols v_vars.

	* omp-low.c (expand_oacc_offload): Handle __OPENMP_TARGET__
	symbol.

2014-03-20  Bernd Schmidt  <bernds@codesourcery.com>

	Mostly by Michael Zolotukhin:
	* lto-wrapper.c (OFFLOAD_FUNC_TABLE_SECTION_NAME,
	OFFLOAD_TARGET_NAMES_ENV): New defines.
	(offload_names): New static variable.
	(free_array_of_ptrs, parse_env_var, access_check,
	prepare_target_image, replace_special_characters,
	compile_images_for_openmp_targets): New static functions.
	(run_gcc): Determine whether offload sections are present.  If so,
	run compile_images_for_openmp_targets and print the image names.

	* Makefile.in (COLLECT2_OBJS): Add collect-utils.o.
	(LTO_WRAPPER_OBJS): New variable.
	(lto-wrapper$(exeext)): Use it.
	* collect2.c: Include "collect-utils.h".
	(vflag, debug): Remove variables.  Rename all uses of vflag to
	verbose.
	(at_file_supplied): No longer static.
	(tool_name): New variable.
	(do_wait, fork_execute, maybe_unlink): Don't declare.
	(tool_cleanup): Renamed from collect_atexit.  New arg from_signal.
	(collect_atexit): New static function.
	(notice): Remove function.
	(handler): Just call tool_cleanup.
	(maybe_run_lto_and_relink, main, do_dsymutil): Add new arg to
	fork_execute calls.
	(collect_wait, do_wait, collect_execute): Remove functions.
	(maybe_unlink): No longer static.
	* collect2.h (vflag, debug): Don't declare.
	(at_file_supplied): Declare.
	* collect-utils.c (utils_cleanup): New arg from_signal.  All callers
	changed.
	(collect_execute): Replace with implementation from collect2, plus a
	new arg use_atfile.  All callers changed.
	(collect_wait): Replace with implementation from collect2.
	(maybe_unlink_file): Remove function.
	(fork_execute): Replace with implementation from collect2, plus a
	new arg use_atfile.  All callers changed.
	(do_wait): Add call to utils_cleanup to the error path.
	* collect-utils.h (collect_execute, fork_execute, utils_cleanup,
	tool_cleanup): Adjust declarations.
	* lto-wrapper.c (tool_cleanup): Add unused bool argument.
	* tlink.c: Include "collect-utils.h".
	(tlink_execute): New arg use_atfile.  All callers changed.
	(tlink_init, tlink_execute): Remove declarations.

	* Makefile.in (ALL_HOST_BACKEND_OBJS): Add collect-utils.o.
	(lto-wrapper$(exeext)): Link with collect-utils.o.
	* collect-utils.c: New file.
	* collect-utils.h: New file.
	* lto-wrapper.c: Include "collect-utils.h".
	(args_name): Delete variable.
	(tool_name): New variable.
	(tool_cleanup): New function.
	(maybe_unlink): Renamed from maybe_unlink_file.  All callers changed.
	(lto_wrapper_cleanup, fatal_signal, fatal, fatal_perror,
	collect_execute, collect_wait, fork_execute): Remove functions.

	Mostly by Michael Zolotukhin:
	* omp-low.c: Include "common/common-target.h".
	(expand_omp_target): Pass in address of __OPENMP_TARGET__.
	(add_decls_addresses_to_decl_constructor, omp_finish_file): New
	functions.
	* omp-low.h (omp_finish_file): Declare.
	* toplev.c: Include "omp-low.h".
	(compile_file): Call omp_finish_file.
	* target.def (record_offload_symbol): New hook.
	* doc/tm.texi.in (TARGET_RECORD_OFFLOAD_SYMBOL): Add.
	* doc/tm.texi: Regenerate.
	* configure.ac (ENABLE_OFFLOADING): Define if we have offload_targets.
	* configure: Regenerate.
	* config.in: Regenerate.

	* config/darwin.c: Include "lto-section-names.h".
	(LTO_SEGMENT_NAME): Don't define.
	* config/i386/winnt.c: Include "lto-section-names.h".
	* lto-streamer.c: Include "lto-section-names.h".
	* lto-streamer.h (LTO_SECTION_NAME_PREFIX, OMP_SECTION_NAME_PREFIX):
	Don't define.
	(section_name_prefix): Don't declare.
	* lto-wrapper.c: Include "lto-section-names.h".
	(LTO_SECTION_NAME_PREFIX): Don't define.
	* lto-section-names.h: New file.
	* cgraphunit.c: Include "lto-section-names.h".

	* configure.ac (real_target_noncanonical, tool_prefix,
	accel_dir_suffix, offload_targets): Compute new variables.
	(--enable-as-accelerator-for, --enable-as-accelerator,
	--enable-offload-targets): New options.
	* configure: Regenerate.
	* config.in: Regenerate.
	* Makefile.in (real_target_noncanonical, tool_prefix,
	accel_dir_suffix, enable_as_accelerator): New variables substituted
	by configure.
	(libsubdir, libexecsubdir, GCC_TARGET_INSTALL_NAME): Tweak for the
	possibility of being configured as an offload compiler.
	(install_driver): Likewise.
	(DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and
	ACCEL_DIR_SUFFIX.
	* gcc.c (spec_host_machine, accel_dir_suffix): New variables.
	(process_command): Tweak path construction for the possibility
	of being configured as an offload compiler.
	(main): Likewise. Look up specs in just_machine_suffix only if not
	ACCEL_COMPILER.  Construct OFFLOAD_TARGET_NAMES environment variable
	if we have OFFLOAD_TARGETS.

2014-03-20  Thomas Schwinge  <thomas@codesourcery.com>

	* gimple.h (enum gf_mask): Add GF_OMP_FOR_KIND_OACC_LOOP.
	(is_gimple_omp_oacc_specifically): Handle it.
	* gimple-pretty-print.c (dump_gimple_omp_for): Likewise.
	* gimple.def (GIMPLE_OMP_FOR): Update for OpenACC loop.
	* gimple.c (gimple_build_omp_for): Don't explicitly mention some
	clauses.
	(gimple_copy) <GIMPLE_OMP_FOR>: Handle GF_OMP_FOR_KIND_OACC_LOOP.
	* omp-low.c (extract_omp_for_data, scan_sharing_clauses)
	(check_omp_nesting_restrictions, lower_rec_input_clauses)
	(lower_lastprivate_clauses, lower_reduction_clauses)
	(expand_omp_for_generic, expand_omp_for_static_nochunk)
	(expand_omp_for_static_chunk, maybe_add_implicit_barrier_cancel)
	(lower_omp_for): Likewise.
	* tree-inline.c (remap_gimple_stmt): Likewise.
	* tree-nested.c (walk_gimple_omp_for)
	(convert_nonlocal_reference_stmt, convert_local_reference_stmt)
	(convert_gimple_call): Likewise.
	* doc/gimple.texi (GIMPLE_OMP_FOR): Don't explicitly mention some
	clauses.
	* gimplify.c (gimplify_omp_for, gimplify_expr): Handle OACC_LOOP.

	* tree.def (OACC_LOOP): Sort after OMP_DISTRIBUTE.
	* tree.h (OMP_LOOP_CHECK): Update accordingly.
	* gimplify.c (is_gimple_stmt): Sort OACC_LOOP after
	OMP_DISTRIBUTE.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* doc/generic.texi (OACC_LOOP): Sort after OACC_HOST_DATA.
	(OMP_FOR): Fix and extend for OACC_LOOP.

	* gimple.h (enum gf_mask): Add and use GF_OMP_FOR_SIMD.
	* omp-low.c: Update accordingly.

	* gimple.h (enum gf_mask): Rewrite "<< 0" shift expressions used
	for GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_KIND_FOR,
	GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_KIND_SIMD,
	GF_OMP_FOR_KIND_CILKSIMD, GF_OMP_TARGET_KIND_MASK,
	GF_OMP_TARGET_KIND_REGION, GF_OMP_TARGET_KIND_DATA,
	GF_OMP_TARGET_KIND_UPDATE, GF_OMP_TARGET_KIND_OACC_DATA.

	* omp-low.c (check_omp_nesting_restrictions): Allow nesting of
	OpenACC constructs inside of OpenACC data constructs.

2014-03-18  Ilmir Usmanov  <i.usmanov@samsung.com>

	* tree.def (OACC_LOOP): New tree code.
	* tree-pretty-print.c (dump_generic_node): Show it.
	* tree.h (OACC_KERNELS_COMBINED, OACC_PARALLEL_COMBINED): New macros.
	* doc/generic.texi: Document loop directive.
	* gimplify.c (is_gimple_stmt, gimplify_expr): Stub gimplification of 
	loop directive and combined directives.

2014-03-18  Thomas Schwinge  <thomas@codesourcery.com>

	* builtin-types.def
	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT): New type.
	* oacc-builtins.def (BUILT_IN_GOACC_KERNELS)
	(BUILT_IN_GOACC_PARALLEL): Switch to that one.
	* gimplify.c (gimplify_scan_omp_clauses)
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NUM_GANGS,
	OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH.
	* omp-low.c (scan_sharing_clauses, expand_oacc_offload): Likewise.

2014-03-13  Thomas Schwinge  <thomas@codesourcery.com>

	* tree.h (OMP_CLAUSE_VECTOR_EXPR): Check for OMP_CLAUSE_VECTOR
	instead of OMP_CLAUSE_VECTOR_LENGTH.
	(OMP_WAIT_EXPR): Rename to OMP_CLAUSE_WAIT_EXPR.  Change
	all users.

2014-03-13  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (create_omp_child_function): Use
	is_gimple_omp_offloaded when looking for offloaded regions.

2014-03-12  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (scan_sharing_clauses): Move offloaded logic into...
	* gimple.h (is_gimple_omp_offloaded): ... this new static inline
	function.

2014-02-28  Thomas Schwinge  <thomas@codesourcery.com>

	* gimple.def (GIMPLE_OACC_KERNELS): New code.
	* doc/gimple.texi: Document it.
	* gimple.h (gimple_has_substatements, CASE_GIMPLE_OMP)
	(is_gimple_omp_oacc_specifically): Handle it.
	(gimple_statement_oacc_kernels): New struct.
	(gimple_build_oacc_kernels): New prototype.
	(gimple_oacc_kernels_clauses, gimple_oacc_kernels_clauses_ptr)
	(gimple_oacc_kernels_set_clauses, gimple_oacc_kernels_child_fn)
	(gimple_oacc_kernels_child_fn_ptr)
	(gimple_oacc_kernels_set_child_fn, gimple_oacc_kernels_data_arg)
	(gimple_oacc_kernels_data_arg_ptr)
	(gimple_oacc_kernels_set_data_arg): New inline functions.
	* gimple.c (gimple_build_oacc_kernels): New function.
	(gimple_copy): Handle GIMPLE_OACC_KERNELS.
	* gimple-low.c (lower_stmt): Likewise.
	* gimple-walk.c (walk_gimple_op, walk_gimple_stmt): Likewise.
	* gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
	(dump_gimple_oacc_parallel): Rename to dump_gimple_oacc_offload.
	Also handle GIMPLE_OACC_KERNELS.  Update all callers.
	* gimplify.c (gimplify_omp_workshare, gimplify_expr): Handle
	OACC_KERNELS.
	* oacc-builtins.def (BUILT_IN_GOACC_KERNELS): New builtin.
	* omp-low.c (scan_oacc_parallel, expand_oacc_parallel)
	(lower_oacc_parallel): Rename to scan_oacc_offload,
	expand_oacc_offload, and lower_oacc_offload.  Also handle
	GIMPLE_OACC_KERNELS.  Update all callers.
	(scan_sharing_clauses, scan_omp_1_stmt, expand_omp, lower_omp_1)
	(diagnose_sb_0, diagnose_sb_1, diagnose_sb_2)
	(make_gimple_omp_edges): Handle GIMPLE_OACC_KERNELS.
	* tree-inline.c (remap_gimple_stmt, estimate_num_insns): Likewise.
	* tree-nested.c (convert_nonlocal_reference_stmt)
	(convert_local_reference_stmt, convert_tramp_reference_stmt)
	(convert_gimple_call): Likewise.

2014-02-27  Thomas Schwinge  <thomas@codesourcery.com>

	* gimplify.c (gimplify_oacc_parallel): Merge into
	gimplify_omp_workshare.  Update all callers.

2014-02-27  Ilmir Usmanov  <i.usmanov@samsung.com>

	Fix OpenACC ASYNC clause: it cannot contain integer-expression-list.

	gcc/
	* tree.h (OMP_CLAUSE_ASYNC_EXPR): Reorder.
	* tree.c (omp_clause_num_ops, omp_clause_code_name): Reorder clauses.
	* tree-core.h (enum omp_clause_code): Likewise.
	* omp-low.c (scan_sharing_clauses): Likewise.
	* gimplify.c (gimplify_scan_omp_clauses): Likewise.

2014-02-21  Thomas Schwinge  <thomas@codesourcery.com>

	* gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_DATA.
	(is_gimple_omp_oacc_specifically): Handle it.
	* gimple-pretty-print.c (dump_gimple_omp_target): Likewise.
	* gimplify.c (gimplify_omp_workshare, gimplify_expr): Likewise.
	* omp-low.c (scan_sharing_clauses, scan_omp_target)
	(expand_omp_target, lower_omp_target, lower_omp_1): Likewise.
	* gimple.def (GIMPLE_OMP_TARGET): Update comment.
	* gimple.c (gimple_build_omp_target): Likewise.
	(gimple_copy): Catch unimplemented case.
	* tree-inline.c (remap_gimple_stmt): Likewise.
	* tree-nested.c (convert_nonlocal_reference_stmt)
	(convert_local_reference_stmt, convert_gimple_call): Likewise.
	* oacc-builtins.def (BUILT_IN_GOACC_DATA_START)
	(BUILT_IN_GOACC_DATA_END): New builtins.

	* omp-low.c (scan_sharing_clauses): Catch unexpected occurrences
	of OMP_CLAUSE_TO, OMP_CLAUSE_FROM, OMP_CLAUSE_MAP.

	* gimplify.c (enum omp_region_type): Make ORT_TARGET_OFFLOAD a
	flag for ORT_TARGET, in its negation replacing ORT_TARGET_DATA.
	Update all users.

	* omp-low.c (gimple_code_is_oacc): Move to...
	* gimple.h (is_gimple_omp_oacc_specifically): ... here.  Update
	users, and also use it in more places where currently we've only
	been checking for GIMPLE_OACC_PARALLEL.

2014-02-18  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (diagnose_sb_0, diagnose_sb_1, diagnose_sb_2): Handle
	GIMPLE_OACC_PARALLEL.
	* gimplify.c (gimplify_case_label_expr): Update comment.

	* omp-low.c (diagnose_sb_0): Generalize detection which kind of
	structured block we're in.

2014-02-17  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-core.h (omp_clause_code) <map>: Mention pcopy, pcopyin,
	pcopyout, pcreate OpenACC clauses.

2014-02-14  Ilmir Usmanov  <i.usmanov@samsung.com>
	    Dmitry Bocharnikov  <dmitry.b@samsung.com>
	    Evgeny Gavrin  <e.gavrin@samsung.com>

	Add OpenACC 1.0 support to GENERIC, except loop directive and subarrays.

	gcc/
	* gimplify.c (is_gimple_stmt, gimplify_scan_omp_clauses,
	implify_adjust_omp_clauses, gimplify_expr): Stub OpenACC directives
	and clauses.
	* omp-low.c (scan_sharing_clauses): Likewise.
	(gimple_code_is_oacc): New helper function.
	(scan_sharing_clauses): Use it.
	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_HOST,
	OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT,
	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_GANG, OMP_CLAUSE_WAIT,
	OMP_NO_CLAUSE_CACHE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_ASYNC,
	OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_NUM_GANGS,
	OMP_CLAUSE_NUM_WORKERS and OMP_CLAUSE_VECTOR_LENGTH clauses.
	* tree-pretty-print.c (dump_omp_clause): Print OpenACC clause.
	(dump_generic_node): Print OpenACC directives and its clauses.
	* tree.c (omp_clause_num_ops, omp_clause_code_name,
	walk_tree_1): Add OpenACC clauses.
	* tree.def (OACC_KERNELS, OACC_DATA, OACC_HOST_DATA, OACC_DECLARE,
	OACC_UPDATE, OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_WAIT,
	OACC_CACHE): New tree node.
	* tree.h (OACC_KERNELS_BODY, OACC_KERNELS_CLAUSES,
	OACC_CLAUSE_NUM_GANGS_EXPR, OMP_CLAUSE_NUM_WORKERS_EXPR,
	OMP_CLAUSE_VECTOR_LENGTH_EXPR, OMP_CLAUSE_VECTOR_EXPR,
	OMP_CLAUSE_WORKER_EXPR, OMP_CLAUSE_GANG_EXPR, OMP_CLAUSE_ASYNC_EXPR,
	OMP_WAIT_EXPR, OACC_DATA_BODY, OACC_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
	OACC_UPDATE_CLAUSES, OACC_WAIT_CLAUSES, OACC_CACHE_CLAUSES,
	OACC_HOST_DATA_BODY, OACC_HOST_DATA_CLAUSES): New macros.
	gcc/doc/
	* generic.texi: Document OACC_KERNELS, OACC_DATA, OACC_HOST_DATA,
	OACC_DECLARE, OACC_UPDATE, OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_WAIT,
	OACC_CACHE.

2014-02-07  Ilya Tocar  <ilya.tocar@intel.com>

	* ipa-inline-analysis.c (inline_free_summary): Always remove
	hooks.

2014-01-28  Thomas Schwinge  <thomas@codesourcery.com>

	* tree-core.h (omp_clause_code): Update description for
	OMP_CLAUSE_MAP.

	* tree-core.h (omp_clause_map_kind): Add OMP_CLAUSE_MAP_FORCE,
	OMP_CLAUSE_MAP_FORCE_ALLOC, OMP_CLAUSE_MAP_FORCE_TO,
	OMP_CLAUSE_MAP_FORCE_FROM, OMP_CLAUSE_MAP_FORCE_TOFROM,
	OMP_CLAUSE_MAP_FORCE_PRESENT, OMP_CLAUSE_MAP_FORCE_DEALLOC, and
	OMP_CLAUSE_MAP_FORCE_DEVICEPTR.
	* tree-pretty-print.c (dump_omp_clause): Handle these.
	* gimplify.c (gimplify_omp_var_data): Add GOVD_MAP_FORCE.
	(omp_region_type): Add ORT_TARGET_MAP_FORCE.
	(omp_add_variable, omp_notice_threadprivate_variable)
	(omp_notice_variable, gimplify_scan_omp_clauses)
	(gimplify_adjust_omp_clauses_1): Extend accordingly.
	(gimplify_oacc_parallel): Add ORT_TARGET_MAP_FORCE to ORT_TARGET
	usage.
	* omp-low.c (install_var_field, scan_sharing_clauses)
	(lower_oacc_parallel, lower_omp_target): Extend accordingly.

	* tree-core.h (omp_clause_map_kind): Make the identifiers' bit
	patterns more obvious.  Add comments.
	* omp-low.c (lower_oacc_parallel, lower_omp_target): Test for
	omp_clause_map_kind flags set instead of for values.

	* gimplify.c (gimplify_call_expr, gimplify_modify_expr)
	(omp_firstprivatize_variable, omp_notice_threadprivate_variable)
	(omp_notice_variable, gimplify_adjust_omp_clauses)
	(gimplify_omp_workshare): Treat ORT_TARGET as a flag, not as a
	value.

2013-12-18  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.c (lower_oacc_parallel): Switch kinds array to unsigned
	short, and shift alignment description to begin at bit 8.

2013-12-04  Thomas Schwinge  <thomas@codesourcery.com>

	* gimple.h (is_a_helper): Handle GIMPLE_OACC_PARALLEL.

2013-11-30  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
	Removed a carriage return from the warning string.

2013-11-21  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.c (ix86_cilkplus_default_vecsize_mangle,
	ix86_cilkplus_vecsize_for_mangle): Remove.
	(ix86_simd_clone_compute_vecsize_and_simdlen,
	ix86_simd_clone_adjust, ix86_simd_clone_usable): New functions.
	(TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE,
	TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): Remove.
	(TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Define.
	* omp-low.c (class argno_map): Remove.
	(argno_map::argno_map): Remove.
	(simd_clone_vector_of_formal_parm_types): New function.
	(simd_clone_struct_alloc): Use struct cgraph_simd_clone
	instead of struct simd_clone and struct cgraph_simd_clone_arg
	instead of struct simd_clone_arg.
	(simd_clone_struct_copy): Likewise.
	(simd_clone_clauses_extract): Likewise.  Return struct
	cgraph_simd_clone *, don't change anything in node.
	Use simd_clone_vector_of_formal_parm_types instead of argno_map.
	Fail if ignoring linear step.
	(vecsize_mangle): Remove.
	(simd_clone_compute_base_data_type): Add clone_info argument.
	Use simd_clone_vector_of_formal_parm_types instead of argno_map.
	(simd_clone_compute_vecsize_and_simdlen): Remove.
	(simd_clone_mangle): Remove new_node argument, add clone_info
	argument, return the identifier rather than changing anything in
	node.  If mangled name doesn't already exist among simd clones,
	fail.
	(simd_clone_create): Handle !old_node->definition case, don't
	ICE if cgraph_function_versioning fails.
	(simd_clone_adjust_return_type): Handle simdlens larger than
	what can be returned or passed in hw register.  Handle
	!node->definition.
	(simd_clone_adjust_argument_types): Likewise.  Use
	ipa_get_vector_of_formal_parms or
	simd_clone_vector_of_formal_parm_types instead of argno_map.
	(simd_clone_init_simd_arrays): Handle simdlens larger than
	what can be passed in hw register.
	(ipa_simd_modify_function_body): Likewise.  Call walk_gimple_op
	also on GIMPLE_RETURN.
	(simd_clone_adjust): Call targetm.simd_clone.adjust.  Create
	PHI for the iter, rather than waiting for into ssa.  Handle
	aligned clause on uniform pointer arguments.  Handle linear
	arguments properly.
	(expand_simd_clones): Don't do anything if noclone attribute
	is present.  Ignore non-prototype C declarations.  Rewritten to
	only clone if it is possible and desirable to create the simd clone.
	Use new target simd_clone hooks to drive the process, allow
	creating more than two clones.  Handle !node->definition cloning.
	(ipa_omp_simd_clone): Use FOR_EACH_FUNCTION instead of
	FOR_EACH_DEFINED_FUNCTION.
	(pass_omp_simd_clone::gate): Return true also for flag_openmp_simd.
	* ipa-cp.c (determine_versionability): Use simd_clones field instead
	of has_simd_clones.  Also fail if node->simdclone is non-NULL.
	(initialize_node_lattices): Set disable = true for simd clones.
	* cgraph.c (get_simd_clone): Remove.
	* ipa.c (symtab_remove_unreachable_nodes): If node with simd clones
	is kept, keep also the simd clones.
	* ipa-prop.h (ipa_get_vector_of_formal_parm_types): New prototype.
	* ipa-prop.c (get_vector_of_formal_parm_types): Renamed to ...
	(ipa_get_vector_of_formal_parm_types): ... this.  No longer static.
	(ipa_modify_formal_parameters): Adjust caller.
	* target.def (TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE,
	TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): Remove.
	(TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): New target
	hooks.
	* tree-vect-data-refs.c (vect_analyze_data_refs): Use simd_clones
	field instead of has_simd_clones.
	* target.h (struct cgraph_node, struct cgraph_simd_node): Declare.
	* doc/tm.texi.in (TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE,
	TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): Remove.
	(TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Add.
	* doc/tm.texi: Regenerated.
	* cgraph.h (enum simd_clone_arg_type): Rename to ...
	(enum cgraph_simd_clone_arg_type): ... this.  Add
	SIMD_CLONE_ARG_TYPE_MASK.
	(struct simd_clone_arg): Rename to ...
	(struct cgraph_simd_clone_arg): ... this.  Add orig_type and
	vector_type fields.  Adjust arg_type field's type.
	(struct simd_clone): Rename to ...
	(struct cgraph_simd_clone): ... this.  Remove hw_vector_size
	field.  Add vecsize_int, vecsize_float, prev_clone, next_clone
	and origin fields.  Adjust args field's type.
	(struct cgraph_node): Adjust simdclone field's type.  Remove
	simdclone_of and has_simd_clones fields.  Add simd_clones field.
	(get_simd_clone): Remove prototype.
	* tree-vect-stmts.c (vectorizable_simd_clone_call): Use simd_clones
	field instead of has_simd_clones, improve walking of simd clones,
	handle arguments and/or return types larger than corresponding
	ISA hw vector size, use targetm.simd_clone.usable hook.

2013-11-21  Ilya Tocar  <ilya.tocar@intel.com>

	* cgraph.h (symtab_node): Add need_dump.
	* cgraphunit.c (ipa_passes): Run ipa_write_summaries for omp.
	(compile): Intialize streamer for omp.
	* ipa-inline-analysis.c (inline_generate_summary): Add flag_openmp.
	* lto-cgraph.c (lto_set_symtab_encoder_in_partition): Respect
	need_dump flag.
	(select_what_to_dump): New.
	* lto-streamer.c (section_name_prefix): New.
	(lto_get_section_name): Use section_name_prefix.
	(lto_streamer_init): Add flag_openmp.
	* lto-streamer.h (OMP_SECTION_NAME_PREFIX): New.
	(section_name_prefix): Ditto.
	(select_what_to_dump): Ditto.
	* lto/lto-partition.c (add_symbol_to_partition_1): Set need_dump.
	(lto_promote_cross_file_statics): Dump everyhtinh.
	* passes.c (ipa_write_summaries): Add parameter,
	call select_what_to_dump.
	* tree-pass.h (void ipa_write_summaries): Add parameter.

2013-11-15  Jakub Jelinek  <jakub@redhat.com>

	* tree-vect-stmts.c (vectorizable_simd_clone_call): Avoid
	-Wsign-compare warning.

2013-11-12  Aldy Hernandez  <aldyh@redhat.com>

	* ipa-prop.h (enum ipa_parm_op): Adjust comment to IPA_PARM_OP_NEW
	entry.

2013-11-12  Aldy Hernandez  <aldyh@redhat.com>

	* ipa-prop.c (ipa_modify_expr): Pass expr by address.
	(ipa_get_adjustment_candidate): Add another level of indirection
	to expr.  Adjust comment.
	(ipa_get_adjustment_candidate): Add another level of indirection
	to first argument.

2013-11-11  Aldy Hernandez  <aldyh@redhat.com>

	* ipa-prop.c (get_ssa_base_param): New.
	* ipa-prop.h (ipa_modify_expr): Rename from ipa_sra_modify_expr.
	Remove ipa_sra_modify_function_body.
	(ipa_get_adjustment_candidate): Rename from
	sra_ipa_get_adjustment_candidate.
	* omp-low.c (ipa_simd_modify_stmt_ops): Rename
	sra_ipa_get_adjustment_candidate to ipa_get_adjustment_candidate.
	* tree-sra.c (get_ssa_base_param): Remove default_def argument.
	(create_access): Remove lass argument to get_ssa_base_param.
	(disqualify_base_of_expr): Same.
	(sra_ipa_get_adjustment_candidate): Rename to
	ipa_get_adjustment_candidate and move to ipa-prop.c.
	(sra_ipa_modify_expr): Rename to ipa_modify_expr and move to
	ipa-prop.c.
	(sra_ipa_modify_assign): Rename sra_ipa_modify_expr to
	ipa_modify_expr.
	(ipa_sra_modify_function_body): Same.

2013-11-11  Jakub Jelinek  <jakub@redhat.com>

	* tree-vect-data-refs.c (vect_analyze_data_refs): Check loop->safelen
	rather than loop->simdlen.
	* tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.

2013-11-08  Aldy Hernandez  <aldyh@redhat.com>

	* ipa-prop.c (ipa_modify_formal_parameters): Remove
	synth_parm_prefix argument.
	Use operator enum instead of bit fields.
	Add assert for properly handling vector of references.
	(ipa_modify_call_arguments): Use operator enum instead of bit
	fields.
	(ipa_combine_adjustments): Same.
	Assert that IPA_PARM_OP_NEW is not used.
	(ipa_dump_param_adjustments): Rename reduction to new_decl.
	Use operator enum instead of bit fields.
	* ipa-prop.h (enum ipa_parm_op): New.
	(struct ipa_parm_adjustment): New field op.
	Rename reduction to new_decl.
	Rename new_arg_prefix to arg_prefix.
	Remove new_param, remove_param, copy_param.
	(ipa_modify_formal_parameters): Remove argument.
	* omp-low.c (simd_clone_adjust_argument_types):	Set arg_prefix.
	Use operator enum instead of bit fields.
	(simd_clone_adjust_argument_types): Use operator enum instead of
	bit fields.
	Remove last argument to ipa_modify_formal_parameters call.
	(simd_clone_init_simd_arrays): Use operator enum.
	(ipa_simd_modify_stmt_ops): Rename reduction to new_decl.
	(ipa_simd_modify_function_body): Same.
	* tree-sra.c (turn_representatives_into_adjustments): Use operator
	enum.  Set arg_prefix.
	(get_adjustment_for_base): Use operator enum.
	(sra_ipa_get_adjustment_candidate): Same.
	(sra_ipa_modify_expr): Rename reduction to new_decl.
	(sra_ipa_reset_debug_stmts): Use operator enum.
	(modify_function): Do not pass prefix argument.

2013-11-07  Jakub Jelinek  <jakub@redhat.com>

	* tree-vectorizer.h (enum stmt_vec_info_type): Add
	call_simd_clone_vec_info_type.
	* expr.c (store_constructor): Allow CONSTRUCTOR with VECTOR_TYPE
	(same sized) elements even if the type of the CONSTRUCTOR has
	vector mode and target is a REG.
	* tree-vect-data-refs.c: Include cgraph.h.
	(vect_analyze_data_refs): Inline by hand find_data_references_in_loop
	and find_data_references_in_bb, if find_data_references_in_stmt
	fails, still allow calls to #pragma omp declare simd functions
	in #pragma omp simd loops unless they contain data references among
	the call arguments or in lhs.
	* tree-vect-loop.c (vect_determine_vectorization_factor): If a call
	doesn't have lhs, set STMT_VINFO_VECTYPE to vector type corresponding
	to any of the argument types and exclude it from adjustments of the
	vectorization factor.
	* tree-vect-stmts.c: Include tree-ssa-loop.h and
	tree-scalar-evolution.h.
	(vectorizable_function): Don't handle functions with simd clones here.
	(vectorizable_call): Nor here.  Return early if call doesn't have lhs.
	(struct simd_call_arg_info): New type.
	(vectorizable_simd_clone_call): New function.
	(vect_analyze_stmt, vect_transform_stmt): Call it.

2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>

	* gimple.def (GIMPLE_OACC_PARALLEL): New code.
	* doc/gimple.texi: Document it.
	* gimple.h (gimple_build_oacc_parallel): New declaration.
	(gimple_oacc_parallel_clauses, gimple_oacc_parallel_clauses_ptr)
	(gimple_oacc_parallel_set_clauses, gimple_oacc_parallel_child_fn)
	(gimple_oacc_parallel_child_fn_ptr)
	(gimple_oacc_parallel_set_child_fn, gimple_oacc_parallel_data_arg)
	(gimple_oacc_parallel_data_arg_ptr)
	(gimple_oacc_parallel_set_data_arg): New inline functions.
	(CASE_GIMPLE_OMP): Add GIMPLE_OACC_PARALLEL.
	* gimple.c (gimple_build_oacc_parallel): New function.
	(walk_gimple_op, walk_gimple_stmt, gimple_copy): Handle
	GIMPLE_OACC_PARALLEL.
	* gimplify.c (is_gimple_stmt): Handle GIMPLE_OACC_PARALLEL.
	(gimplify_oacc_parallel): New function.
	(gimplify_expr): Handle OACC_PARALLEL.
	* cgraphbuild.c (build_cgraph_edges): Handle GIMPLE_OACC_PARALLEL.
	* gimple-low.c (lower_stmt): Likewise.
	* gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
	(dump_gimple_oacc_parallel): New function.
	* oacc-builtins.def (BUILT_IN_GOACC_PARALLEL): New macro.
	* omp-low.c (scan_oacc_parallel, expand_oacc_parallel)
	(lower_oacc_parallel): New functions.
	(use_pointer_for_field, build_outer_var_ref, scan_sharing_clauses)
	(create_omp_child_function, check_omp_nesting_restrictions)
	(scan_omp_1_stmt, lower_rec_simd_input_clauses)
	(lower_lastprivate_clauses, lower_reduction_clauses)
	(lower_copyprivate_clauses, lower_send_clauses)
	(lower_send_shared_vars, expand_omp)
	(maybe_add_implicit_barrier_cancel, create_task_copyfn)
	(lower_omp_1, make_gimple_omp_edges): Handle GIMPLE_OACC_PARALLEL,
	or catch it.
	* tree-inline.c (remap_gimple_stmt): Likewise.
	* tree-nested.c (convert_nonlocal_reference_stmt)
	(convert_local_reference_stmt, convert_tramp_reference_stmt)
	(convert_gimple_call): Likewise.

	* tree.def (OACC_PARALLEL): New code.
	* doc/generic.texi (OpenMP): Document it.
	* tree.h (OMP_BODY, OMP_CLAUSES): Include it.
	(OACC_PARALLEL_BODY, OACC_PARALLEL_CLAUSES): New macros.
	* tree-pretty-print.c (dump_generic_node): Handle OACC_PARALLEL.

	* doc/invoke.texi (-fopenacc): Update.

	* gimplify.c (gimplify_body): Consider flag_openacc additionally
	to flag_openmp.
	* omp-low.c (execute_expand_omp, execute_lower_omp)
	(gate_diagnose_omp_blocks): Likewise.

	* oacc-builtins.def: New file.
	* Makefile.in (BUILTINS_DEF): Add oacc-builtins.def.
	* builtins.def (DEF_GOACC_BUILTIN): New macro.
	Include "oacc-builtins.def".

	* gcc.c (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): For -fopenacc, link
	to libgomp and its dependencies.
	* config/arc/arc.h (LINK_COMMAND_SPEC): Likewise.
	* config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
	* config/i386/mingw32.h (GOMP_SELF_SPECS): Likewise.
	* config/ia64/hpux.h (LIB_SPEC): Likewise.
	* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
	* config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
	* doc/invoke.texi (-fopenacc): Update.

	* doc/invoke.texi (-fopenacc): Document it.
	* doc/sourcebuild.texi (fopenacc): Document it.

	Backport from trunk, r204517:

	* config/arc/arc.h (LINK_COMMAND_SPEC): For
	-ftree-parallelize-loops=*, link to libgomp and its dependencies.
	* config/ia64/hpux.h (LIB_SPEC): Likewise.
	* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
	* config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
	* gcc.c (GOMP_SELF_SPECS): Update comment about libgomp's
	dependencies.

2013-11-07  Aldy Hernandez  <aldyh@redhat.com>

	* omp-low.c (ipa_simd_modify_function_body): Avoid
	regimplification of GIMPLE_RETURNs.

2013-11-06  Aldy Hernandez  <aldyh@redhat.com>

	* ipa-prop.h (sra_ipa_get_adjustment_candidate): Protoize.
	* omp-low.c (struct modify_stmt_info): New.
	(ipa_simd_modify_function_body_ops_1): Remove.
	(ipa_simd_modify_stmt_ops): New.
	(ipa_simd_modify_function_body_ops): Remove.
	(ipa_simd_modify_function_body): Set new callback info.
	Remove special casing.  Handle all operators with walk_gimple_op.
	* tree-sra.c (get_ssa_base_param): Add new argument.  Use it.
	(disqualify_base_of_expr): Pass new argument to
	get_ssa_base_param.
	(sra_ipa_modify_expr): Abstract candidate search into...
	(sra_ipa_get_adjustment_candidate): ...here.

2013-11-06  Aldy Hernandez  <aldyh@redhat.com>

	* omp-low.c (simd_clone_mangle): Linear step of 1 is mangled as
	'l'.

2013-11-04  Aldy Hernandez  <aldyh@redhat.com>

	* omp-low.c (ipa_simd_modify_function_body): Adjust tree operands
	on the LHS of an assign.
	(ipa_simd_modify_function_body_ops_1): New.
	(ipa_simd_modify_function_body_ops): New.

2013-11-02  Aldy Hernandez  <aldyh@redhat.com>

	* omp-low.c (ipa_simd_modify_function_body): Handle empty returns.

2013-11-01  Jakub Jelinek  <jakub@redhat.com>

	* cgraph.h (enum linear_stride_type): Remove.
	(enum simd_clone_arg_type): New.
	(struct simd_clone_arg): Remove linear_stride, linear_stride_num
	and uniform fields.  Add arg_type and linear_step.
	* omp-low.c (simd_clone_struct_copy): Formatting.
	(simd_clone_struct_alloc): Likewise.  Use size_t.
	(simd_clone_clauses_extract, simd_clone_compute_base_data_type,
	simd_clone_adjust_argument_types): Adjust for struct simd_clone_arg
	changes.
	(simd_clone_mangle): Likewise.  Handle negative linear step.

2013-11-01  Aldy Hernandez  <aldyh@redhat.com>

	* tree-vect-stmts.c: Include cgraph.h.
	(vectorizable_call): Allow > 3 arguments when a SIMD clone may be
	available.
	(vectorizable_function): Use SIMD clone if available.
	* ipa-cp.c (determine_versionability): Nodes with SIMD clones are
	not versionable.
	* ggc.h (ggc_alloc_cleared_simd_clone_stat): New.
	* cgraph.h (enum linear_stride_type): New.
	(struct simd_clone_arg): New.
	(struct simd_clone): New.
	(struct cgraph_node): Add simdclone and simdclone_of fields.
	(get_simd_clone): Protoize.
	* cgraph.c (get_simd_clone): New.
	Add `has_simd_clones' field.
	* ipa-cp.c (determine_versionability): Disallow functions with
	simd clones.
	* ipa-prop.h (ipa_sra_modify_function_body): Protoize.
	(sra_ipa_modify_expr): Same.
	(struct ipa_parm_adjustment): Add new_arg_prefix and new_param
	fields.  Document their use.
	* ipa-prop.c (ipa_modify_formal_parameters): Handle creating brand
	new parameters and minor cleanups.
	* omp-low.c: Add new pass_omp_simd_clone support code.
	(make_pass_omp_simd_clone): New.
	(pass_data_omp_simd_clone): Declare.
	(class pass_omp_simd_clone): Declare.
	(vecsize_mangle): New.
	(ipa_omp_simd_clone): New.
	(simd_clone_clauses_extract): New.
	(simd_clone_compute_base_data_type): New.
	(simd_clone_compute_vecsize_and_simdlen): New.
	(simd_clone_create): New.
	(simd_clone_adjust_return_type): New.
	(simd_clone_adjust_return_types): New.
	(simd_clone_adjust): New.
	(simd_clone_init_simd_arrays): New.
	(ipa_simd_modify_function_body): New.
	(simd_clone_mangle): New.
	(simd_clone_struct_alloc): New.
	(simd_clone_struct_copy): New.
	(class argno_map): New.
	(argno_map::argno_map(tree)): New.
	(argno_map::~argno_map): New.
	(argno_map::operator []): New.
	(argno_map::length): New.
	(expand_simd_clones): New.
	(create_tmp_simd_array): New.
	* tree.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): New.
	* tree-core.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Document.
	* tree-pass.h (make_pass_omp_simd_clone): New.
	* passes.def (pass_omp_simd_clone): New.
	* target.def: Define new hook prefix "TARGET_CILKPLUS_".
	(default_vecsize_mangle): New.
	(vecsize_for_mangle): New.
	* doc/tm.texi.in: Add placeholder for
	TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE and
	TARGET_CILKPLUS_VECSIZE_FOR_MANGLE.
	* tree-sra.c (sra_ipa_modify_expr): Remove static modifier.
	(ipa_sra_modify_function_body): Same.
	* tree.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Define.
	* doc/tm.texi: Regenerate.
	* config/i386/i386.c (ix86_cilkplus_default_vecsize_mangle): New.
	(ix86_cilkplus_vecsize_for_mangle): New.
	(TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE): New.
	(TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): New.

2013-10-10  Jakub Jelinek  <jakub@redhat.com>

	* tree.c (omp_remove_redundant_declare_simd_attrs): Adjust
	for the clauses being stored into TREE_VALUE of an extra TREE_LIST
	pointed out by TREE_VALUE of the attribute.

2013-10-04  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (expand_omp_target): When handling IF clause on
	#pragma omp target, split new_bb rather than entry_bb.  If
	not GF_OMP_TARGET_KIND_REGION, split new_bb right before
	the GOMP_TARGET stmt, rather than after labels.

2013-09-26  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (expand_task_call): If there are depend clauses,
	pass bit 8 in 7th argument and pass pointer to depend array
	as 8th argument.
	(lower_depend_clauses): New function.
	(lower_omp_taskreg): Handle depend clauses.
	* omp-builtins.def (BUILT_IN_GOMP_TASK): Use
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR
	instead of BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT.
	* builtin-types.def
	(BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
	(BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.

2013-09-25  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (lower_omp_sections, lower_omp_for, lower_omp_taskreg):
	Emit ctx->cancel_label before destructors.

	* gimple-pretty-print.c (dump_gimple_omp_block,
	pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
	* tree-nested.c (convert_nonlocal_reference_stmt,
	convert_local_reference_stmt, convert_gimple_call): Likewise.
	* tree-cfg.c (make_edges): Likewise.
	* gimple.h (gimple_build_omp_taskgroup): New prototype.
	(gimple_has_substatement): Handle GIMPLE_OMP_TASKGROUP.
	(CASE_GIMPLE_OMP): Likewise.
	* gimplify.c (is_gimple_stmt, gimplify_expr): Handle OMP_TASKGROUP.
	* omp-low.c (check_omp_nesting_restrictions): Warn if #pragma omp
	cancel is used in nowait loop or sections construct.
	(scan_omp_1_stmt, expand_omp_synch, expand_omp, lower_omp_1): Handle
	GIMPLE_OMP_TASKGROUP.
	(diagnose_sb_1, diagnose_sb_2): Likewise.  Handle GIMPLE_OMP_TARGET
	and GIMPLE_OMP_TEAMS.
	(lower_omp_taskgroup): New function.
	* tree-inline.c (remap_gimple_stmt, estimate_num_insns): Handle
	GIMPLE_OMP_TASKGROUP.
	* gimple-low.c (lower_stmt): Likewise.
	* tree.h (OMP_TASKGROUP_BODY): Define.
	* tree.def (OMP_TASKGROUP): New tree.
	* tree-pretty-print.c (dump_generic_node): Handle OMP_TASKGROUP.
	* gimple.c (gimple_build_omp_taskgroup): New function.
	(walk_gimple_stmt, gimple_copy): Handle GIMPLE_OMP_TASKGROUP.
	* gimple.def (GIMPLE_OMP_TASKGROUP): New GIMPLE code.

2013-09-19  Jakub Jelinek  <jakub@redhat.com>

	* omp-builtins.def (BUILT_IN_GOMP_TARGET_DATA,
	BUILT_IN_GOMP_TARGET_UPDATE): Use BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR
	rather than BT_FN_VOID_INT_SIZE_PTR_PTR_PTR.
	* builtin-types.def (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR): Remove.
	(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR): New.
	* omp-low.c (expand_omp_target): Remove fnname argument from
	GOMP_target, add openmp_target argument to GOMP_target,
	GOMP_target_data and GOMP_target_update calls.

2013-09-18  Jakub Jelinek  <jakub@redhat.com>

	* tree.h (OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Define.
	* tree-core.h (OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Document.
	* omp-low.c (lower_rec_simd_input_clauses): Don't set DECL_VALUE_EXPR
	on new_var if it is not a DECL_P.
	(lower_rec_input_clauses): Don't force max_vf = 1
	if OMP_CLAUSE_REDUCTION_PLACEHOLDER.  Add barrier also if any
	OMP_CLAUSE_REDUCTION_OMP_ORIG_REF is seen.  For OMP_CLAUSE_PRIVATE
	in simd, fix last argument to omp_clause_default_ctor langhook.
	Handle OMP_CLAUSE_REDUCTION_PLACEHOLDER in simd loops, if
	OMP_CLAUSE_REDUCTION_GIMPLE_INIT is NULL, emit omp_clause_default_ctor
	if any and emit omp_clause_dtor if any.  Handle C++ references in
	OMP_CLAUSE_REDUCTION clauses.
	(lower_reduction_clauses): Adjust comment for UDRs.  Handle
	C++ references in OMP_CLAUSE_REDUCTION clauses.
	(lower_omp_taskreg): Emit reduction merges before destructors.
	* tree-pretty-print.c (dump_omp_clause): Don't emit any reduction
	operator name if OMP_CLAUSE_REDUCTION_CODE is ERROR_MARK.
	* gimplify.c (omp_add_variable): Ignore GOVD_LOCAL decls for which
	privatize_by_reference returns true.

	* tree-core.h (OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
	OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND):
	Move definitions...
	* tree.h (OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
	OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND):
	... here.

2013-09-16  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (install_var_field): Use (mask & 4) to request double
	indirection.
	(scan_sharing_clauses): For OMP_CLAUSE_MAP_POINTER arrays pass
	7 instead of 3 to install_var_field.
	(lower_omp_target): For OMP_CLAUSE_MAP_POINTER arrays add extra
	indirection.

2013-09-06  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (scan_sharing_clauses): Handle VLAs in
	OMP_CLAUSE_{MAP,TO,FROM}.  Set DECL_ALIGN (field) before
	calling insert_field_into_struct.
	(scan_omp_target): Reverse TYPE_FIELDS, verify that
	all field alignments are the same.
	(lower_omp_target): Use maybe_lookup_field instead of
	lookup_sfield to check if field is present.  Handle VLAs.
	* tree-pretty-print.c (dump_omp_clause): Only check
	OMP_CLAUSE_MAP_KIND on OMP_CLAUSE_MAP clauses.
	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_TO_ONLY.
	(omp_firstprivatize_variable, omp_add_variable,
	gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Handle
	VLAs in OMP_CLAUSE_{MAP,TO,FROM}.

2013-09-05  Jakub Jelinek  <jakub@redhat.com>

	* gimplify.c (gimplify_call_expr): Don't call fold_stmt
	inside of #pragma omp target construct.
	(gimplify_modify_expr): Likewise.
	* omp-low.c (target_nesting_level): New variable.
	(lower_omp_target): Increase/restore target_nesting_level
	around lowering #pragma omp target body.  Use TYPE_SIZE_UNIT
	instead of TYPE_SIZE if OMP_CLAUSE_SIZE is missing.
	Or log2 of needed alignment into high 5 bits of kind.
	(lower_omp): Call fold_stmt on all stmts inside of
	#pragma omp target construct.

	* tree-cfg.c (make_edges): For GIMPLE_OMP_TARGET
	with GF_OMP_TARGET_KIND_UPDATE, don't look for
	GIMPLE_OMP_RETURN and immediately restore previous
	region.
	* langhooks.c (lhd_omp_mappable_type): New function.
	* omp-low.c (scan_sharing_clauses): Ignore OMP_CLAUSE_SHARED
	in GIMPLE_OMP_TEAMS constructs.  Handle OMP_CLAUSE_NUM_TEAMS,
	OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP,
	OMP_CLAUSE_TO and OMP_CLAUSE_FROM.
	(create_omp_child_function): If current function has
	"omp declare target" attribute or if current region
	is OMP_TARGET or lexically nested in it, add that
	attribute to the omp child function.
	(scan_omp_target, scan_omp_teams): New functions.
	(check_omp_nesting_restrictions): Fix a typo in TEAMS nesting
	check.
	(scan_omp_1_stmt): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	(lower_rec_input_clauses): Ignore OMP_CLAUSE_SHARED
	in GIMPLE_OMP_TEAMS constructs.
	(expand_omp_synch): Handle GIMPLE_OMP_TEAMS.
	(expand_omp_target): New function.
	(expand_omp): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	(build_omp_regions_1): For GIMPLE_OMP_TARGET with
	GF_OMP_TARGET_KIND_UPDATE, don't look for GIMPLE_OMP_RETURN and
	immediately restore previous region.
	(lower_omp_single): Emit a CLOBBER stmt after GIMPLE_OMP_RETURN.
	(lower_omp_taskreg): Likewise.
	(lower_omp_target, lower_omp_teams): New functions.
	(lower_omp_1): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* tree.h (enum omp_clause_map_kind): Improve description of
	OMP_CLAUSE_MAP_POINTER.
	(OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION): Define.
	* gimple.def (GIMPLE_OMP_TARGET): Use GSS_OMP_PARALLEL instead
	of GSS_OMP_SINGLE.
	* langhooks.h (struct lang_hooks_for_types): Add
	omp_mappable_type hook.
	* langhooks-def.h (lhd_omp_mappable_type): New prototype.
	(LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
	* gimple.h (gimple_omp_target_clauses, gimple_omp_target_clauses_ptr,
	gimple_omp_target_set_clauses): Use gimple_omp_parallel
	instead of gimple_omp_single.
	(gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr,
	gimple_omp_target_set_child_fn, gimple_omp_target_data_arg,
	gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg): New
	inlines.
	* omp-builtins.def (BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA,
	BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE,
	BUILT_IN_GOMP_TEAMS): New builtins.
	* gimple-pretty-print.c (dump_gimple_omp_target): Print child_fn
	for #pragma omp target.
	* gimplify.c (omp_notice_variable): Diagnose if implicitly mapped
	decl doesn't have mappable type.
	(gimplify_scan_omp_clauses): For OMP_CLAUSE_MAP don't clear
	notice_outer.
	(gimplify_adjust_omp_clauses_1): Add OMP_CLAUSE_MAP even if the same
	decl is already referenced in target data construct surrounding it.
	(gimplify_adjust_omp_clauses): Likewise.  Handle
	OMP_CLAUSE_THREAD_LIMIT.
	(gimplify_omp_workshare): Fix up gimplification of target or target
	data construct body.  For target data add GOMP_target_end_data
	call in a try/finally cleanup.
	* builtin-types.def (BT_FN_VOID_UINT_UINT,
	BT_FN_VOID_INT_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR): New.

2013-07-14  Jakub Jelinek  <jakub@redhat.com>

	* tree.h (omp_declare_simd_clauses_equal): Remove prototype.
	(omp_remove_redundant_declare_simd_attrs): New prototype.
	* tree.c (omp_declare_simd_clauses_equal): Make static.
	(omp_remove_redundant_declare_simd_attrs): New function.

2013-07-09  Jakub Jelinek  <jakub@redhat.com>

	* gimple-pretty-print.c (dump_gimple_omp_return): Print
	gimple_omp_return_lhs if non-NULL.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
	call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_BARRIER_CANCEL,
	BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL.
	* gimple.h (gimple_omp_return_set_lhs, gimple_omp_return_lhs,
	gimple_omp_return_lhs_ptr): New inlines.
	* gimple.def (GIMPLE_OMP_RETURN): Use GSS_OMP_ATOMIC_STORE
	instead of GSS_BASE.
	* gimple.c (walk_gimple_op) <case GIMPLE_OMP_RETURN>: Walk lhs.
	* builtin-types.def (BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL): New.
	* omp-builtins.def (BUILT_IN_GOMP_CANCELLATION_POINT): Use
	ATTR_NOTHROW_LEAF_LIST instead of ATTR_NULL.  Return type is now
	bool.
	(BUILT_IN_GOMP_CANCEL): Likewise.  Add second argument with bool type.
	(BUILT_IN_BARRIER_CANCEL, BUILT_IN_GOMP_LOOP_END_CANCEL,
	BUILT_IN_GOMP_SECTIONS_END_CANCEL): New builtins.
	* omp-low.c (struct omp_context): Add cancel_label and cancellable
	fields.
	(extract_omp_for_data): Set have_nowait even for simd implicitly.
	(check_omp_nesting_restrictions): Verify nesting restrictions for
	#pragma omp cancel and #pragma omp cancellation point.
	Set ctx->cancellable for regions that can be cancelled or also
	for any task region that contains #pragma omp cancellation point.
	(scan_omp_1_stmt): Check nesting restrictions even if ctx == NULL.
	(build_omp_barrier): Return gimple instead of tree, add lhs argument,
	if non-NULL, build GOMP_barrier_cancel builtin instead and set its 
	call lhs to lhs.
	(lower_rec_input_clauses): Adjust build_omp_barrier caller.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk,
	expand_omp_single): Likewise.  If OMP_RETURN has lhs, pass it to
	build_omp_barrier.
	(expand_omp_for_generic): If OMP_RETURN has lhs, use
	GOMP_loop_end_cancel libcall instead of GOMP_loop_end and set its
	lhs from OMP_RETURN's lhs.
	(expand_omp_sections): If OMP_RETURN has lhs, use
	GOMP_sections_end_cancel libcall instead of GOMP_sections_end and set
	its lhs from OMP_RETURN's lhs.
	(maybe_add_implicit_barrier_cancel): New function.
	(lower_omp_sections): If ctx->cancellable, emit cancel_label before
	OMP_RETURN.  Call maybe_add_implicit_barrier_cancel.
	(lower_omp_for): Likewise.
	(lower_omp_single): Call maybe_add_implicit_barrier_cancel.
	(lower_omp_taskreg): If ctx->cancellable, emit cancel_label before
	OMP_RETURN.
	(lower_omp_1): If ctx->cancellable, create ctx->cancel_label.
	Adjust GOMP_barrier libcalls to GOMP_barrier_cancel plus conditional
	branch in cancellable regions, adjust GOMP_cancel and
	GOMP_cancellation_point in cancellable regions or remove
	GOMP_cancellation_point in non-cancellable regions.

2013-07-03  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (expand_omp_single): Don't force barrier for
	copyprivate.

2013-06-28  Jakub Jelinek  <jakub@redhat.com>
	    Aldy Hernandez  <aldyh@redhat.com>

	* internal-fn.def (GOMP_SIMD_LANE, GOMP_SIMD_VF,
	GOMP_SIMD_LAST_LANE): New internal functions.
	* omp-low.c (omp_max_vf, lower_rec_simd_input_clauses): New
	functions.
	(lower_rec_input_clauses): Add fd argument.  Enforce max_vf = 1
	if any data sharing clauses mention VLAs or for array reductions.
	Handle OMP_CLAUSE__LOOPTEMP_ clause.  For
	OMP_CLAUSE_{{FIRST,LAST,}PRIVATE,LINEAR,REDUCTION} on SIMD
	constructs use "omp simd array" temporaries.  For OMP_CLAUSE_LINEAR
	adjust initial value in combined constructs.  Don't emit any
	barriers for #pragma omp distribute.  If max_vf is lower than
	current safelen, prepend an OMP_CLAUSE_SAFELEN clause.
	(lower_lastprivate_clauses): Handle "omp simd array" temporaries.
	(lower_reduction_clauses): Exit early for #pragma omp simd.
	(expand_omp_simd): Set loop->simduid from OMP_CLAUSE__SIMDUID_
	and cfun->has_simduid_loops if set.
	If OMP_CLAUSE_SAFELEN (1) is present, don't set loop->safelen
	nor loop->force_vect.
	(lower_omp_sections, lower_omp_single, lower_omp_taskreg): Adjust
	lower_rec_input_clauses callers.
	(lower_omp_for_lastprivate): Unshare vinit.
	(lower_omp_for): Add OMP_CLAUSE__LOOPTEMP_ clauses before calling
	lower_rec_input_clauses.  Adjust lower_rec_input_clauses caller.
	Always call lower_omp_for_lastprivate at the same place, even for
	#pragma omp simd.
	* tree.h (enum clause_code): Add OMP_CLAUSE__SIMDUID_.
	(OMP_CLAUSE__SIMDUID__DECL): Define.
	* tree-vectorizer.c: Include hash-table.h and tree-ssa-propagate.h.
	(simduid_to_vf, decl_to_simduid): New classes.
	(simduid_to_vf::hash, simduid_to_vf::equal, decl_to_simduid::hash,
	decl_to_simduid::equal): New methods.
	(note_simd_array_uses_struct): New struct.
	(adjust_simduid_builtins, note_simd_array_uses_cb,
	note_simd_array_uses): New functions.
	(vectorize_loops): Adjust "omp simd array" temporary array sizes
	and fold GOMP_SIMD_{LANE,VF,LAST_LANE} builtins.
	* tree-vectorizer.h (struct _stmt_vec_info): Add simd_lane_access_p
	field.
	(STMT_VINFO_SIMD_LANE_ACCESS_P): Define.
	* tree-data-ref.c (get_references_in_stmt): Allow GOMP_SIMD_LANE
	builtins in their own loops.
	* tree-inline.c (copy_cfg_body): Propagate has_force_vect_loops
	and has_simduid_loops.
	* function.h (struct function): Add has_simduid_loops field.
	* tree-ssa-ccp.c (likely_value): For GOMP_SIMD_{LANE,LAST_LANE,VF}
	builtins ignore the undefined magic argument.
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__SIMDUID_
	clause.
	* cfgloop.h (struct loop): Add simduid field.
	* Makefile.in (tree-vectorizer.o): Depend on $(HASH_TABLE_H)
	and tree-ssa-propagate.h.
	* tree-vect-data-refs.c (vect_analyze_data_refs): Check for SIMD
	lane access.
	* gimplify.c (omp_add_variable): Handle combination of aligned
	clause and some data sharing clause for the same decl.
	(gimplify_omp_for): For collapse (2) and above simd loops
	predetermine loop iteration vars as lastprivate instead of
	linear.
	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add
	entries for OMP_CLAUSE__SIMDUID_.
	(walk_tree_1): Handle OMP_CLAUSE__SIMDUID_.
	* tree-vect-loop.c (vectorizable_live_operation): Handle live
	GOMP_SIMD_LANE result.
	* tree-vect-stmts.c (vectorizable_call): Vectorize GOMP_SIMD_LANE
	builtin.
	(vectorizable_store, vectorizable_load): Handle
	STMT_VINFO_SIMD_LANE_ACCESS_P.
	* internal-fn.c (expand_GOMP_SIMD_LANE, expand_GOMP_SIMD_VF,
	expand_GOMP_SIMD_LAST_LANE): New functions.

2013-06-21  Jakub Jelinek  <jakub@redhat.com>

	* gimple.h (enum gf_mask): Adjust GF_OMP_FOR_COMBINED
	value representation, add GF_OMP_FOR_COMBINED_INTO.
	(gimple_omp_for_combined_into_p,
	gimple_omp_for_set_combined_into_p): New inlines.
	* gimplify.c (enum omp_region_type): Remove outdated
	ORT_SIMD comment.
	(struct gimplify_omp_ctx): Add combined_loop field.
	(gimplify_omp_for): Call gimple_omp_for_set_combined_into_p
	for inner for/simd constructs combined with an outer
	loop construct (for or distribute).
	* tree.c (omp_clause_num_ops): Add OMP_CLAUSE__LOOPTEMP_
	entry.
	(omp_clause_code_name): Likewise.
	(walk_tree_1): Handle OMP_CLAUSE__LOOPTEMP_.
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__LOOPTEMP_.
	* tree.h (enum omp_clause_code): Add OMP_CLAUSE__LOOPTEMP_.
	(OMP_CLAUSE_DECL): Allow also on OMP_CLAUSE__LOOPTEMP_.
	* omp-low.c (extract_omp_for_data): Rename non_ws to simd.  Don't set
	fd->chunk_size for non-chunk OMP_CLAUSE_SCHEDULE_STATIC, unless
	fd->have_ordered.  For OMP_CLAUSE_SCHEDULE_STATIC non-ordered loops
	compute fd->iter_type the same as for simd.
	(get_ws_args_for): Add par_stmt argument, if
	gimple_omp_for_combined_into_p, use first two _looptemp_ clauses
	temporaries instead of fd->loop.n{1,2}.
	(determine_parallel_type): Adjust caller.
	(scan_sharing_clauses): Handle OMP_CLAUSE__LOOPTEMP_.
	(find_combined_for): New function.
	(scan_omp_parallel): If gimple_omp_parallel_combined_p and
	it is combined with gimple_omp_for_combined_into_p OMP_FOR,
	add OMP_CLAUSE__LOOPTEMP_ clauses to the parallel.
	(check_omp_nesting_restrictions): Don't insist that the only construct
	nested in OMP_DISTRIBUTE must be OMP_PARALLEL.
	(lower_rec_input_clauses, lower_send_clauses): Handle
	OMP_CLAUSE__LOOPTEMP_.
	(expand_omp_for_init_counts, expand_omp_for_init_vars,
	extract_omp_for_update_vars): New functions.
	(expand_omp_for_generic): Add inner_stmt argument.  Use
	expand_omp_for_{init,update}* helper functions.  Handle combined loop
	constructs.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
	Likewise.  Handle fd->collapse > 1 and broken_loop cases.
	(expand_omp_simd): Use expand_omp_for_init* helper functions.  Handle
	combined loop constructs.
	(expand_omp_for): Add inner_stmt argument.  Pass it through to
	expand_omp_for_{generic,static_{,no}chunk}.  Use
	expand_omp_for_static* even for fd->collapse > 1 and/or broken_loop
	cases, just not when fd->have_ordered.
	(expand_omp): Adjust expand_omp_for caller.
	(lower_omp_for): If gimple_omp_parallel_combined_p, add
	OMP_CLAUSE__LOOPTEMP_ clauses to the GIMPLE_FOR stmt.

2013-06-14  Jakub Jelinek  <jakub@redhat.com>

	* gimple-pretty-print.c (dump_gimple_omp_for): Don't handle
	GF_OMP_FOR_KIND_FOR_SIMD.
	* gimple.h (GF_OMP_FOR_KIND_FOR_SIMD): Remove.
	(GF_OMP_FOR_COMBINED): New.
	(gimple_omp_for_combined_p, gimple_omp_for_set_combined_p): New
	inline functions.
	* gimplify.c (is_gimple_stmt): Don't handle OMP_FOR_SIMD.
	(find_combined_omp_for): New function.
	(gimplify_omp_for): Handle combined OMP_DISTRIBUTE and OMP_FOR
	loops.
	* Makefile.in (c-family/c-omp.o): Depend on $(C_PRAGMA_H).
	* omp-low.c (build_outer_var_ref): Fix up simd handling.
	(check_omp_nesting_restrictions): Don't handle
	GF_OMP_FOR_KIND_FOR_SIMD.
	* tree.def (OMP_FOR_SIMD): Remove.
	* tree-pretty-print.c (dump_generic_node): Don't handle OMP_FOR_SIMD.
	Handle NULL OMP_FOR_INIT.

2013-06-12  Jakub Jelinek  <jakub@redhat.com>

	* gimplify.c (gimplify_scan_omp_clauses): Handle
	OMP_CLAUSE_THREAD_LIMIT.
	* tree-pretty-print.c (dump_omp_clause): Likewise.
	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add entries for
	OMP_CLAUSE_THREAD_LIMIT.
	* tree.h (enum omp_clause_code): Add OMP_CLAUSE_THREAD_LIMIT.
	(OMP_CLAUSE_THREAD_LIMIT_EXPR): Define.

2013-06-04  Jakub Jelinek  <jakub@redhat.com>

	* gimplify.c (gimplify_scan_omp_clauses): Handle array
	sections on OMP_CLAUSE_{MAP,TO,FROM} clauses, handle
	OMP_CLAUSE_DEPEND clause.
	(gimplify_adjust_omp_clauses): Handle array sections on
	OMP_CLAUSE_MAP, handle OMP_CLAUSE_DEPEND clause.
	* tree.c (omp_clause_num_ops): OMP_CLAUSE_{MAP,TO,FROM}
	now have 2 arguments, move OMP_CLAUSE_UNIFORM before these
	3.
	(omp_clause_code_name): Adjust for OMP_CLAUSE_UNIFORM movement.
	(walk_tree_1): Adjust to handle 2 arguments of
	OMP_CLAUSE_{MAP,TO,FROM}.
	* tree-pretty-print.c (dump_omp_clause): For OMP_CLAUSE_{MAP,TO,FROM}
	print OMP_CLAUSE_SIZE, and for OMP_CLAUSE_MAP handle
	OMP_CLAUSE_MAP_POINTER.
	* tree.h (enum omp_clause_code): Move OMP_CLAUSE_UNIFORM before
	OMP_CLAUSE_{MAP,TO,FROM}.
	(OMP_CLAUSE_SIZE): Define.
	(enum omp_clause_map_kind): Add OMP_CLAUSE_MAP_POINTER.
	* omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_DEPEND.

2013-05-29  Jakub Jelinek  <jakub@redhat.com>

	* omp-builtins.def (BUILT_IN_OMP_GET_TEAM_NUM,
	BUILT_IN_OMP_GET_NUM_TEAMS): New built-ins.
	* omp-low.c (extract_omp_for_data, expand_omp_for_static_nochunk,
	expand_omp_for_static_chunk): Handle #pragma omp distribute.
	(expand_omp_for): Add assertion for non-finished distribute collapse
	> 1 support.
	(check_omp_nesting_restrictions): Allow orphaned distribute construct.

	* omp-low.c (check_omp_nesting_restrictions): Add some
	accelerator related nesting restrictions.
	(scan_omp_1_stmt): Call check_omp_nesting_restrictions
	even for GOMP_taskgroup_{start,end}.
	* gimplify.c (omp_notice_threadprivate_variable): Fix a typo.
	(gimplify_body): For functions with "omp declare target" attribute
	add ORT_TARGET region around the body.

2013-05-27  Jakub Jelinek  <jakub@redhat.com>

	* tree.def (OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET,
	OMP_TARGET_UPDATE): New tree codes.
	* tree-cfg.c (make_edges): Handle GIMPLE_OMP_TARGET
	and GIMPLE_OMP_TEAMS.
	* omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_DIST_SCHEDULE.
	* gimple-low.c (lower_stmt): Handle GIMPLE_OMP_TARGET
	and GIMPLE_OMP_TEAMS.
	* tree.h (OMP_TEAMS_BODY, OMP_TEAMS_CLAUSES, OMP_TARGET_DATA_BODY,
	OMP_TARGET_DATA_CLAUSES, OMP_TARGET_BODY, OMP_TARGET_CLAUSES,
	OMP_TARGET_UPDATE_CLAUSES): Define.
 	* tree-nested.c (convert_nonlocal_reference_stmt,
	convert_local_reference_stmt, convert_gimple_call): Handle
	GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* tree-inline.c (estimate_num_insns): Likewise.
	(remap_gimple_stmt): Likewise.  Adjust gimple_build_omp_for
	caller.
	* gimple.def: Adjust comments describing OMP_CLAUSEs.
	(GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS): New GIMPLE stmts.
	* tree-parloops.c (create_parallel_loop): Adjust gimple_build_omp_for
	caller.
	* tree-pretty-print.c (dump_generic_node): Handle OMP_TEAMS,
	OMP_TARGET, OMP_TARGET_DATA and OMP_TARGET_UPDATE.
	* gimple.h (GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION,
	GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE): New.
	(gimple_build_omp_for): Add kind argument to prototype.
	(gimple_build_omp_target, gimple_build_omp_teams): New prototypes.
	(gimple_has_substatements): Handle GIMPLE_OMP_TARGET and
	GIMPLE_OMP_TEAMS.
	(gimple_omp_subcode): Change GIMPLE_OMP_SINGLE to GIMPLE_OMP_TEAMS.
	(gimple_omp_target_clauses, gimple_omp_target_clauses_ptr,
	gimple_omp_target_set_clauses, gimple_omp_target_kind,
	gimple_omp_target_set_kind, gimple_omp_teams_clauses,
	gimple_omp_teams_clauses_ptr, gimple_omp_teams_set_clauses): New
	inline functions.
	(gimple_return_set_retval): Handle GIMPLE_OMP_TARGET and
	GIMPLE_OMP_TEAMS.
	* gimple.c (gimple_build_omp_for): Add kind argument, call
	gimple_omp_for_set_kind.
	(gimple_build_omp_target, gimple_build_omp_teams): New functions.
	(walk_gimple_op, walk_gimple_stmt, gimple_copy): Handle
	GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* gimple-pretty-print.c (dump_gimple_omp_target,
	dump_gimple_omp_teams): New functions.
	(pp_gimple_stmt_1): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP.
	(enum omp_region_type): Add ORT_TEAMS, ORT_TARGET and ORT_TARGET_DATA.
	(omp_add_variable): Add temporary assertions.
	(omp_notice_threadprivate_variable): Complain if threadprivate vars
	appear in target region.
	(omp_notice_variable): ORT_TARGET, ORT_TARGET_DATA and ORT_TEAMS
	handling.
	(omp_check_private): Ignore ORT_TARGET and ORT_TARGET_DATA regions.
	(gimplify_scan_omp_clauses): Handle OMP_CLAUSE_MAP, OMP_CLAUSE_TO,
	OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_DIST_SCHEDULE
	and OMP_CLAUSE_DEVICE.
	(gimplify_adjust_omp_clauses): Likewise.
	(gimplify_adjust_omp_clauses_1): Handle GOVD_MAP.  Fix up
	check for privatization by also testing for GOVD_LINEAR.
	(gimplify_omp_for): Adjust gimple_build_omp_for caller.
	Clear *expr_p.
	(gimplify_omp_workshare): Handle also OMP_TARGET, OMP_TARGET_DATA
	and OMP_TEAMS.  Clear *expr_p.
	(gimplify_omp_target_update): New function.
	(gimplify_expr): Handle OMP_TARGET, OMP_TARGET_DATA, OMP_TARGET_UPDATE
	and OMP_TEAMS.

2013-05-20  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.c (expand_omp_simd): For collapse > 1 loops,
	if some loop condition might be not true initially, add runtime
	test and skip the whole loop.

2013-05-14  Jakub Jelinek  <jakub@redhat.com>

	* cfgloop.h (struct loop): Add safelen and force_vect fields.
	* function.h (struct function): Add has_force_vect_loops field.
	* omp-low.c (expand_omp_simd): If !broken_loop, create loop for
	the simd region and set safelen and force_vect fields in it.
	* tree-vectorizer.c (vectorize_loops): If loop has force_vect set,
	vectorize it even if flag_vectorize isn't set.  Clear loop->force_vect
	after vectorization.
	* tree-ssa-loop.c (gate_tree_vectorize): Return true even
	cfun->has_force_vect_loops.
	* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Don't
	unroll loops with loop->force_vect.
	* tree-vect-data-refs.c (vect_analyze_data_ref_dependence): For
	unknown or bad data dependency, if loop->safelen is non-zero, just
	decrease *max_vf to loop->safelen if needed and return false.
	* tree-if-conv.c (main_tree_if_conversion): If-convert also loops with
	loop->force_vect.
	(gate_tree_if_conversion): Return true even if
	cfun->has_force_vect_loops.

2013-05-09  Jakub Jelinek  <jakub@redhat.com>

	* tree.c (omp_declare_simd_clauses_equal): New function.
	(attribute_value_equal): Call it for -fopenmp if
	TREE_VALUE of the attributes are both OMP_CLAUSEs.
	* tree.h (omp_declare_simd_clauses_equal): Declare.

2013-04-30  Jakub Jelinek  <jakub@redhat.com>

	* gimple-pretty-print.c (dump_gimple_omp_atomic_load,
	dump_gimple_omp_atomic_store): Handle gimple_omp_atomic_seq_cst_p.
	* gimple.h (enum gf_mask): Add GF_OMP_ATOMIC_SEQ_CST.
	(gimple_omp_atomic_set_seq_cst, gimple_omp_atomic_seq_cst_p): New
	inline functions.
	* omp-low.c (expand_omp_atomic_load, expand_omp_atomic_store,
	expand_omp_atomic_fetch_op): If gimple_omp_atomic_seq_cst_p,
	pass MEMMODEL_SEQ_CST instead of MEMMODEL_RELAXED to the builtin.
	* gimplify.c (gimplify_omp_atomic): Handle OMP_ATOMIC_SEQ_CST.
	* tree-pretty-print.c (dump_generic_node): Handle OMP_ATOMIC_SEQ_CST.
	* tree.def (OMP_ATOMIC): Add comment that OMP_ATOMIC* must stay
	consecutive.
	* tree.h (OMP_ATOMIC_SEQ_CST): Define.

	* omp-low.c (check_omp_nesting_restrictions): Diagnose
	OpenMP constructs nested inside simd region.  Don't treat
	#pragma omp simd as work-sharing region.  Disallow work-sharing
	constructs inside of critical region.  Complain if ordered
	region is nested inside of parallel region without loop
	region in between.
	(scan_omp_1_stmt): Call check_omp_nesting_restrictions even
	for GOMP_{cancel{,lation_point},taskyield,taskwait} calls.

2013-04-23  Jakub Jelinek  <jakub@redhat.com>

	* Makefile.in (omp-low.o): Depend on $(TARGET_H).
	* gimplify.c (gimplify_adjust_omp_clauses): For linear clauses
	if outer_context is non-NULL, but not ORT_COMBINED_PARALLEL,
	call omp_notice_variable.  Remove aligned clauses that can't
	be handled yet.
	* omp-low.c: Include target.h.
	(scan_sharing_clauses): For aligned clauses with global arrays
	register local replacement.
	(omp_clause_aligned_alignment): New function.
	(lower_rec_input_clauses): For aligned clauses for global
	arrays or automatic pointers emit __builtin_assume_aligned
	before the loop if possible.
	(expand_omp_regimplify_p, expand_omp_build_assign): New functions.
	(expand_omp_simd): Use them.  Handle pointer iterators and broken
	loops.
	(lower_omp_for): Call lower_omp on gimple_omp_body_ptr after
	calling lower_rec_input_clauses, not before it.

2013-04-19  Jakub Jelinek  <jakub@redhat.com>

	* tree.h (OMP_CLAUSE_LINEAR_NO_COPYIN,
	OMP_CLAUSE_LINEAR_NO_COPYOUT): Define.
	* omp-low.c (extract_omp_for_data): Handle #pragma omp simd.
	(build_outer_var_ref): For #pragma omp simd allow linear etc.
	clauses to bind even to private vars.
	(scan_sharing_clauses): Handle OMP_CLAUSE_LINEAR, OMP_CLAUSE_ALIGNED
	and OMP_CLAUSE_SAFELEN.
	(lower_rec_input_clauses): Handle OMP_CLAUSE_LINEAR.  Don't emit
	a GOMP_barrier call for firstprivate/lastprivate in #pragma omp simd.
	(lower_lastprivate_clauses): Handle also OMP_CLAUSE_LINEAR.
	(expand_omp_simd): New function.
	(expand_omp_for): Handle #pragma omp simd.
	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_LINEAR and
	GOVD_ALIGNED, add GOVD_LINEAR into GOVD_DATA_SHARE_CLASS.
	(enum omp_region_type): Add ORT_SIMD.
	(gimple_add_tmp_var, gimplify_var_or_parm_decl, omp_check_private,
	omp_firstprivatize_variable, omp_notice_variable): Handle ORT_SIMD
	like ORT_WORKSHARE.
	(omp_is_private): Likewise.  Add SIMD argument, tweak diagnostics
	and add extra errors in simd constructs.
	(gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
	OMP_CLAUSE_LINEAR, OMP_CLAUSE_ALIGNED and OMP_CLAUSE_SAFELEN.
	(gimplify_adjust_omp_clauses_1): Handle GOVD_LASTPRIVATE and
	GOVD_ALIGNED.
	(gimplify_omp_for): Handle #pragma omp simd.

2013-04-10  Jakub Jelinek  <jakub@redhat.com>

	* builtin-types.def (DEF_FUNCTION_TYPE_8): Document.
	(BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): Remove.
	(BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT): New.
	* gimplify.c (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses):
	Handle OMP_CLAUSE_PROC_BIND.
	* omp-builtins.def (BUILT_IN_GOMP_TASKGROUP_START,
	BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME, BUILT_IN_GOMP_PARALLEL,
	BUILT_IN_GOMP_PARALLEL_SECTIONS): New built-ins.
	(BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
	BUILT_IN_GOMP_PARALLEL_SECTIONS_START): Remove.
	* omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_PROC_BIND.
	(expand_parallel_call): Expand #pragma omp parallel* as
	calls to the new GOMP_parallel_* APIs without _start at the end,
	instead of GOMP_parallel_*_start followed by fn.omp_fn.N call,
	followed by GOMP_parallel_end.  Handle OMP_CLAUSE_PROC_BIND.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
	call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_TASKGROUP_END
	instead of BUILT_IN_GOMP_PARALLEL_END.

2013-03-27  Jakub Jelinek  <jakub@redhat.com>

	* gimple-pretty-print.c (dump_gimple_omp_for): Handle different
	GIMPLE_OMP_FOR kinds.
	* tree.def (OMP_SIMD, OMP_FOR_SIMD, OMP_DISTRIBUTE): New tree codes.
	* gimple.h (enum gf_mask): Add GF_OMP_FOR_KIND_MASK,
	GF_OMP_FOR_KIND_FOR, GF_OMP_FOR_KIND_SIMD, GF_OMP_FOR_KIND_FOR_SIMD
	and GF_OMP_FOR_KIND_DISTRIBUTE.
	(gimple_omp_for_kind, gimple_omp_for_set_kind): New inline functions.
	* gimplify.c (is_gimple_stmt, gimplify_omp_for, gimplify_expr): Handle
	OMP_SIMD, OMP_FOR_SIMD and OMP_DISTRIBUTE.
	* tree.c (omp_clause_num_ops, omp_clause_code_name, walk_tree_1):
	Handle new OpenMP 4.0 clauses.
	* tree-pretty-print.c (dump_omp_clause): Likewise.
	(dump_generic_node): Handle OMP_SIMD, OMP_FOR_SIMD and OMP_DISTRIBUTE.
	* tree.h (enum omp_clause_code): Add OMP_CLAUSE_LINEAR,
	OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_FROM, OMP_CLAUSE_TO,
	OMP_CLAUSE_UNIFORM, OMP_CLAUSE_MAP, OMP_CLAUSE_DEVICE,
	OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_NOTINBRANCH,
	OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN,
	OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_FOR, OMP_CLAUSE_PARALLEL,
	OMP_CLAUSE_SECTIONS and OMP_CLAUSE_TASKGROUP.
	(OMP_LOOP_CHECK): Define.
	(OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND,
	OMP_FOR_INCR, OMP_FOR_PRE_BODY): Use OMP_LOOP_CHECK instead of
	OMP_FOR_CHECK.
	(OMP_CLAUSE_DECL): Extend check range up to OMP_CLAUSE_MAP.
	(OMP_CLAUSE_LINEAR_STEP, OMP_CLAUSE_ALIGNED_ALIGNMENT,
	OMP_CLAUSE_NUM_TEAMS_EXPR, OMP_CLAUSE_DEVICE_ID,
	OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SAFELEN_EXPR,
	OMP_CLAUSE_SIMDLEN_EXPR): Define.
	(enum omp_clause_depend_kind, enum omp_clause_map_kind,
	enum omp_clause_proc_bind_kind): New enums.
	(OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
	OMP_CLAUSE_PROC_BIND_KIND): Define.
	(struct tree_omp_clause): Add subcode.depend_kind, subcode.map_kind
	and subcode.proc_bind_kind.
	(find_omp_clause): New prototype.
	* omp-builtins.def (BUILT_IN_GOMP_CANCEL,
	BUILT_IN_GOMP_CANCELLATION_POINT): New built-ins.
	* tree-flow.h (find_omp_clause): Remove prototype.

Copyright (C) 2013-2016 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

Local Variables:
mode: change-log
change-log-default-name: "ChangeLog.gomp"
End: