summaryrefslogtreecommitdiff
path: root/gcc/ChangeLog.omp
blob: 566643d62feff1e20b9545b7096f14aded3f268d (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
2023-04-13  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	Andre Vieira  <andre.simoesdiasvieira@arm.com>

	PR tree-optimization/108888
	* tree-if-conv.cc (predicate_statements): Fix gimple call check.

2023-04-03  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md (one_cmpl<mode>2<exec>): New.

2023-04-03  Thomas Schwinge  <thomas@codesourcery.com>

	* doc/invoke.texi (-foffload-memory=pinned): Document.

2023-03-31  Frederik Harwath  <frederik@codesourcery.com>

	* omp-transform-loops.cc (walk_omp_for_loops): Handle
	GIMPLE_OMP_METADIRECTIVE.

2023-03-27  Julian Brown  <julian@codesourcery.com>

	* omp-builtins.def (BUILT_IN_OMP_IS_INITIAL_DEVICE): New builtin.
	* tree.cc (get_file_function_name): Support names for on-target
	constructor/destructor functions.

2023-03-22  Andrew Jenner  <andrew@codesourcery.com>

	* config/gcn/gcn-protos.h (gcn_expand_dpp_swap_pairs_insn)
	(gcn_expand_dpp_distribute_even_insn)
	(gcn_expand_dpp_distribute_odd_insn): Declare.
	* config/gcn/gcn-valu.md (@dpp_swap_pairs<mode>)
	(@dpp_distribute_even<mode>, @dpp_distribute_odd<mode>)
	(cmul<conj_op><mode>3, cml<addsub_as><mode>4, vec_addsub<mode>3)
	(cadd<rot><mode>3, vec_fmaddsub<mode>4, vec_fmsubadd<mode>4)
	(fms<mode>4<exec>, fms<mode>4_negop2<exec>, fms<mode>4)
	(fms<mode>4_negop2): New patterns.
	* config/gcn/gcn.cc (gcn_expand_dpp_swap_pairs_insn)
	(gcn_expand_dpp_distribute_even_insn)
	(gcn_expand_dpp_distribute_odd_insn): New functions.
	* config/gcn/gcn.md: Add entries to unspec enum.

2023-03-17  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn.cc (gcn_class_max_nregs): Handle vectors in SGPRs.
	(move_callee_saved_registers): Detect the bug condition early.

2023-03-17  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	Richard Sandiford <richard.sandiford@arm.com>
	* tree-vect-data-refs.cc (vect_check_gather_scatter): Restrict
	early-out optimisation to SSA_NAMEs.

2023-03-17  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md (gather_load<mode><vndi>): New.
	(scatter_store<mode><vndi>): New.
	(mask_gather_load<mode><vndi>): New.
	(mask_scatter_store<mode><vndi>): New.

2023-03-17  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-protos.h (gcn_stepped_zero_int_parallel_p): New.
	* config/gcn/gcn-valu.md (V_1REG_ALT): New.
	(V_2REG_ALT): New.
	(vec_extract<V_1REG:mode><V_1REG_ALT:mode>_nop): New.
	(vec_extract<V_2REG:mode><V_2REG_ALT:mode>_nop): New.
	(vec_extract<V_ALL:mode><V_ALL_ALT:mode>): Use new patterns.
	* config/gcn/gcn.cc (gcn_stepped_zero_int_parallel_p): New.
	* config/gcn/predicates.md (ascending_zero_int_parallel): New.

2023-03-06  Paul-Antoine Arras <pa@codesourcery.com>

	Backported from master:
	2023-03-06  Paul-Antoine Arras <pa@codesourcery.com>

	* config/gcn/gcn-valu.md (<expander><mode>3_exec): Add patterns for
	{s|u}{max|min} in QI, HI and DI modes.
	(<expander><mode>3): Add pattern for {s|u}{max|min} in DI mode.
	(cond_<fexpander><mode>): Add pattern for cond_f{max|min}.
	(cond_<expander><mode>): Add pattern for cond_{s|u}{max|min}.
	* config/gcn/gcn.cc (gcn_spill_class): Allow the exec register to be
	saved in SGPRs.

2023-03-01  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2023-03-01  Tobias Burnus  <tobias@codesourcery.com>

	PR middle-end/108546
	* omp-low.cc (lower_omp_target): Remove optional handling
	on the receiver side, i.e. inside target (data), for
	use_device_ptr.

2023-02-23  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	PR tree-optimization/108888
	* tree-if-conv.cc (if_convertible_stmt_p): Set PLF_2 on
	calls to predicate.
	(predicate_statements): Only predicate calls with PLF_2.

2023-02-23  Andrew Stubbs  <ams@codesourcery.com>

	* internal-fn.cc (expand_MASK_CALL): New.
	* internal-fn.def (MASK_CALL): New.
	* internal-fn.h (expand_MASK_CALL): New prototype.
	* omp-simd-clone.cc (simd_clone_adjust_argument_types): Set vector_type
	for mask arguments also.
	* tree-if-conv.cc: Include cgraph.h.
	(if_convertible_stmt_p): Do if conversions for calls to SIMD calls.
	(predicate_statements): Convert functions to IFN_MASK_CALL.
	* tree-vect-loop.cc (vect_get_datarefs_in_loop): Recognise
	IFN_MASK_CALL as a SIMD function call.
	* tree-vect-stmts.cc (vectorizable_simd_clone_call): Handle
	IFN_MASK_CALL as an inbranch SIMD function call.
	Generate the mask vector arguments.

2023-02-22  Tobias Burnus  <tobias@codesourcery.com>

	* gimplify.cc (gimplify_scan_omp_clauses): Remove Fortran
	special case.

2023-02-16  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-builtins.def (DISPATCH_PTR): New built-in.
	* config/gcn/gcn.cc (gcn_init_machine_status): Disable global
	addressing.
	(gcn_expand_builtin_1): Implement GCN_BUILTIN_DISPATCH_PTR.

2023-02-09  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* gimplify.cc (omp_notice_variable): Apply GOVD_MAP_ALLOC_ONLY flag
	and defaultmap flags if the defaultmap has GOVD_MAP_FORCE_PRESENT flag
	set.
	(omp_target_reorder_clauses): Recognize maps with present modifier.
	Reorder present maps to come first.
	(gimplify_scan_omp_clauses): Set GOVD flags for present defaultmaps.
	(gimplify_adjust_omp_clauses_1): Set map kind for present defaultmaps.
	* omp-low.cc (scan_sharing_clauses): Handle 'always, present' map
	clauses.
	(lower_omp_target): Handle map clauses with 'present' modifier.
	Handle 'to' and 'from' clauses with 'present'.
	* tree-core.h (enum omp_clause_defaultmap_kind): Add
	OMP_CLAUSE_DEFAULTMAP_PRESENT defaultmap kind.
	(enum omp_clause_motion_modifier): New.
	(struct tree_omp_clause): Add motion_modifier field.
	* tree-pretty-print.cc (dump_omp_clause): Handle 'map', 'to' and
	'from' clauses with 'present' modifier.  Handle present defaultmap.
	* tree.h (OMP_CLAUSE_MOTION_MODIFIER): New.
	(OMP_CLAUSE_SET_MOTION_MODIFIER): New.

2023-02-06  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/mkoffload.cc (gcn_stack_size): New global variable.
	(process_asm): Create a constructor for GCN_STACK_SIZE.
	(main): Parse the -mstack-size option.

2023-02-06  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-run.cc: Include libgomp-gcn.h.
	(struct kernargs): Replace the common content with kernargs_abi.
	(struct heap): Delete.
	(main): Read GCN_STACK_SIZE envvar.
	Allocate space for the device stacks.
	Write the new kernargs fields.
	* config/gcn/gcn.cc (gcn_option_override): Remove stack_size_opt.
	(default_requested_args): Remove PRIVATE_SEGMENT_BUFFER_ARG and
	PRIVATE_SEGMENT_WAVE_OFFSET_ARG.
	(gcn_addr_space_convert): Mask the QUEUE_PTR_ARG content.
	(gcn_expand_prologue): Move the TARGET_PACKED_WORK_ITEMS to the top.
	Set up the stacks from the values in the kernargs, not private.
	(gcn_expand_builtin_1): Match the stack configuration in the prologue.
	(gcn_hsa_declare_function_name): Turn off the private segment.
	(gcn_conditional_register_usage): Ensure QUEUE_PTR is fixed.
	* config/gcn/gcn.h (FIXED_REGISTERS): Fix the QUEUE_PTR register.
	* config/gcn/gcn.opt (mstack-size): Change the description.

2023-02-02  Paul-Antoine Arras  <pa@codesourcery.com>

	Backported from master:
	2023-02-02  Paul-Antoine Arras  <pa@codesourcery.com>

	* config/gcn/gcn-valu.md (cond_<expander><mode>): Add
	cond_{ashl|ashr|lshr}

2023-02-02  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2023-02-02  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/108435
	* tree-nested.cc (convert_nonlocal_omp_clauses)
	<case OMP_CLAUSE_LASTPRIVATE>: If info->new_local_var_chain and *seq
	is not a GIMPLE_BIND, wrap the sequence into a new GIMPLE_BIND
	before calling declare_vars.
	(convert_nonlocal_omp_clauses) <case OMP_CLAUSE_LINEAR>: Merge
	with the OMP_CLAUSE_LASTPRIVATE handling except for whether
	seq is initialized to &OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (clause)
	or &OMP_CLAUSE_LINEAR_GIMPLE_SEQ (clause).

2023-01-26  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2023-01-23  Tobias Burnus  <tobias@codesourcery.com>

	* doc/install.texi (amdgcn, nvptx): Require newlib 4.3.0.

2023-01-20  Thomas Schwinge  <thomas@codesourcery.com>

	* collect2.cc (write_c_file_glob): Allow for
	'COLLECT2_MAIN_REFERENCE' override.
	* config.gcc <case ${target} in nvptx-*>: Set 'use_collect2=yes'.
	* config/nvptx/nvptx.h: Adjust.

	* config/nvptx/nvptx.cc (nvptx_assemble_undefined_decl): Notice
	'__nvptx_stacks', '__nvptx_uni' declarations.
	(nvptx_file_end): Don't emit duplicate declarations for those.

	* config/nvptx/nvptx.md (nvptx_uniform_warp_check): Make fit for
	non-full-warp execution.

2023-01-19  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2023-01-19  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/108459
	* omp-expand.cc (expand_omp_for_init_counts): Use fold_build1 rather
	than fold_unary for NEGATE_EXPR.

2023-01-03  Sandra Loosemore  <sandra@codesourcery.com>

	Backported from master:
	2023-01-03  Sandra Loosemore  <sandra@codesourcery.com>

	* cgraph.h (struct cgraph_node): Add gc_candidate bit, modify
	default constructor to initialize it.
	* cgraphunit.cc (expand_all_functions): Save gc_candidate functions
	for last and iterate to handle recursive calls.  Delete leftover
	candidates at the end.
	* omp-simd-clone.cc (simd_clone_create): Set gc_candidate bit
	on local clones.
	* tree-vect-stmts.cc (vectorizable_simd_clone_call): Clear
	gc_candidate bit when a clone is used.

2022-12-21  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2022-12-21  Chung-Lin Tang  <cltang@codesourcery.com>

	* config/nvptx/nvptx.cc (nvptx_print_operand): Add 'p' case, adjust
	comments.
	(enum nvptx_builtins): Add NVPTX_BUILTIN_BAR_RED_AND,
	NVPTX_BUILTIN_BAR_RED_OR, and NVPTX_BUILTIN_BAR_RED_POPC.
	(nvptx_expand_bar_red): New function.
	(nvptx_init_builtins):
	Add DEFs of __builtin_nvptx_bar_red_[and/or/popc].
	(nvptx_expand_builtin): Use nvptx_expand_bar_red to expand
	NVPTX_BUILTIN_BAR_RED_[AND/OR/POPC] cases.
	* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add
	UNSPECV_BARRED_AND, UNSPECV_BARRED_OR, and UNSPECV_BARRED_POPC.
	(BARRED): New int iterator.
	(barred_op,barred_mode,barred_ptxtype): New int attrs.
	(nvptx_barred_<barred_op>): New define_insn.

2022-12-06  Marcel Vollweiler  <marcel@codesourcery.com>

	Backported from master:
	2022-12-06  Marcel Vollweiler  <marcel@codesourcery.com>

	* gimplify.cc (optimize_target_teams): Set initial num_teams_upper
	to "-2" instead of "1" for non-existing num_teams clause in order to
	disambiguate from the case of an existing num_teams clause with value 1.

2022-12-06  Paul-Antoine Arras <pa@codesourcery.com>

	Backported from master:
	2022-12-01  Paul-Antoine Arras <pa@codesourcery.com>

	* config/gcn/gcn-opts.h (TARGET_FIJI): -march=fiji.
	(TARGET_VEGA10): -march=gfx900.
	(TARGET_VEGA20): -march=gfx906.
	(TARGET_GFX908): -march=gfx908.
	(TARGET_GFX90a): -march=gfx90a.
	* config/gcn/gcn.h (TARGET_CPU_CPP_BUILTINS): Define a builtin that
	uniquely maps to '-march'.

2022-11-30  Paul-Antoine Arras <pa@codesourcery.com>

	Backported from master:
	2022-11-30  Paul-Antoine Arras <pa@codesourcery.com>

	* config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa): Add gfx803.
	* config/gcn/t-omp-device: Add gfx803.

2022-11-28  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2022-11-28  Tobias Burnus  <tobias@codesourcery.com>

	* config/gcn/gcn.cc (gcn_expand_builtin_1): Work on s1 instead
	of s[0:1] and use USE to prevent removal of setting that register.
	* config/gcn/gcn.md (prologue_use_di): Remove.

2022-11-26  Sandra Loosemore  <sandra@codesourcery.com>

	Backported from master:
	2022-11-25  Sandra Loosemore  <sandra@codesourcery.com>
	
	* common.opt (fopenmp-target-simd-clone): New option.
	(target_simd_clone_device): New enum to go with it.
	* doc/invoke.texi (-fopenmp-target-simd-clone): Document.
	* flag-types.h (enum omp_target_simd_clone_device_kind): New.
	* omp-simd-clone.cc (auto_simd_fail): New function.
	(auto_simd_check_stmt): New function.
	(plausible_type_for_simd_clone): New function.
	(ok_for_auto_simd_clone): New function.
	(simd_clone_create): Add force_local argument, make the symbol
	have internal linkage if it is true.
	(expand_simd_clones): Also check for cloneable functions with
	"omp declare target".  Pass explicit_p argument to
	simd_clone.compute_vecsize_and_simdlen target hook.
	* opts.cc (default_options_table): Add -fopenmp-target-simd-clone.
	* target.def (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN):
	Add bool explicit_p argument.
	* doc/tm.texi: Regenerated.
	* config/aarch64/aarch64.cc
	(aarch64_simd_clone_compute_vecsize_and_simdlen): Update.
	* config/gcn/gcn.cc
	(gcn_simd_clone_compute_vecsize_and_simdlen): Update.
	* config/i386/i386.cc
	(ix86_simd_clone_compute_vecsize_and_simdlen): Update.

2022-11-23  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2022-11-22  Tobias Burnus  <tobias@codesourcery.com>
		    Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-builtins.def (FIRST_CALL_THIS_THREAD_P,
	GET_STACK_LIMIT): Add new builtins.
	* config/gcn/gcn.cc (gcn_expand_builtin_1): Expand them.
	* config/gcn/gcn.md (prologue_use): Add "register_operand" as
	arg to match_operand.
	(prologue_use_di): New; DI insn_and_split variant of the former.

2022-11-18  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2022-11-16  Tobias Burnus  <tobias@codesourcery.com>
		    Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-builtins.def (KERNARG_PTR): Add.
	* config/gcn/gcn.cc (gcn_init_builtin_types): Change siptr_type_node,
	sfptr_type_node and voidptr_type_node from FLAT to ADDR_SPACE_DEFAULT.
	(gcn_expand_builtin_1): Handle GCN_BUILTIN_KERNARG_PTR.
	(gcn_oacc_dim_size): Return in ADDR_SPACE_FLAT.

2022-11-16  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2022-11-16  Tobias Burnus  <tobias@codesourcery.com>

	* config/nvptx/mkoffload.cc (process): Recognize '$nohost$...'
	besides tailing '$nohost' as being for reverse offload.

2022-11-07  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* config/gcn/gcn.cc (gcn_expand_builtin_1): Expand first argument
	of GCN_BUILTIN_LDEXPV to V64DFmode.

2022-11-01  Kwok Cheung Yeung  <kcy@codesourcery.com>
	    Paul-Antoine Arras  <pa@codesourcery.com>

	* builtins.cc (mathfn_built_in_explicit): New.
	* config/gcn/gcn.cc: Include case-cfn-macros.h.
	(mathfn_built_in_explicit): Add prototype.
	(gcn_vectorize_builtin_vectorized_function): New.
	(gcn_libc_has_function): New.
	(TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Define.
	(TARGET_LIBC_HAS_FUNCTION): Define.

2022-11-01  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* config/gcn/gcn-builtins.def (FLOORVF): New builtin.
	(FLOORV): New builtin.
	* config/gcn/gcn.cc (gcn_expand_builtin_1): Expand GCN_BUILTIN_FLOORVF
	and GCN_BUILTIN_FLOORV.

2022-11-01  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* config/gcn/gcn.cc (gcn_expand_builtin_1): Fix expansion of
	GCN_BUILTIN_FABSV.

2022-11-01  Marcel Vollweiler  <marcel@codesourcery.com>

	* omp-expand-metadirective.cc (omp_expand_metadirective): Add already
	processed labels to "labels" (the list of labels not to be deleted).

2022-11-01  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-31  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md (fminmaxop): New iterator.
	(<fexpander><mode>3): New define_expand.
	(<fexpander><mode>3<exec>): Likewise.
	(reduc_<fexpander>_scal_<mode>): Likewise.
	* config/gcn/gcn.md (fexpander): New attribute.

2022-11-01  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-31  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md (V64_SI): Delete iterator.
	(V64_DI): Likewise.
	(V64_1REG): Likewise.
	(V64_INT_1REG): Likewise.
	(V64_2REG): Likewise.
	(V64_ALL): Likewise.
	(V64_FP): Likewise.
	(reduc_<reduc_op>_scal_<mode>): Use V_ALL. Use gen_vec_extract.
	(fold_left_plus_<mode>): Use V_FP.
	(*<reduc_op>_dpp_shr_<mode>): Use V_1REG.
	(*<reduc_op>_dpp_shr_<mode>): Use V_DI.
	(*plus_carry_dpp_shr_<mode>): Use V_INT_1REG.
	(*plus_carry_in_dpp_shr_<mode>): Use V_SI.
	(*plus_carry_dpp_shr_<mode>): Use V_DI.
	(mov_from_lane63_<mode>): Delete.
	(mov_from_lane63_<mode>): Delete.
	* config/gcn/gcn.cc (gcn_expand_reduc_scalar): Support partial vectors.
	* config/gcn/gcn.md (unspec): Remove UNSPEC_MOV_FROM_LANE63.

2022-10-28  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-low.cc (oacc_privatization_candidate_p) <DECL_ARTIFICIAL>:
	Restrict to 'block's.

	* omp-low.cc (lower_rec_simd_input_clauses): For 'ordered_max',
	cast 'omp_max_simt_vf ()', 'omp_max_simd_vf ()' to 'unsigned'.

2022-10-25  Abid Qadeer  <abidh@codesourcery.com>

	* omp-low.cc (usm_transform): Handle operator new with alignment.

2022-10-25  Marcel Vollweiler  <marcel@codesourcery.com>

	* omp-offload.cc (oacc_loop_auto_partitions): Removed OLF reduction
	handling.

2022-10-24  Andrew Stubbs  <ams@codesourcery.com>

	* tree-vect-data-refs.cc (vect_analyze_data_refs): Workaround an
	address-space bug.

2022-10-24  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn.cc (gcn_init_cumulative_args): Disallow gfx908.

2022-10-24  Andrew Stubbs  <ams@codesourcery.com>

	* plugin/plugin-gcn.c (HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED): New.
	(HSA_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT): New.
	(HSA_AMD_SVM_ATTRIB_GLOBAL_FLAG): New.
	(HSA_AMD_SVM_GLOBAL_FLAG_COARSE_GRAINED): New.
	(hsa_amd_svm_attribute_pair_t): New.
	(struct hsa_runtime_fn_info): Add hsa_amd_svm_attributes_set_fn.
	(dump_hsa_system_info): Dump HSA_AMD_SYSTEM_INFO_SVM_SUPPORTED and
	HSA_SYSTEM_INFO_SVM_ACCESSIBLE_BY_DEFAULT.
	(DLSYM_OPT_FN): New.
	(init_hsa_runtime_functions): Add hsa_amd_svm_attributes_set.
	(GOMP_OFFLOAD_usm_alloc): Use malloc and hsa_amd_svm_attributes_set.
	(GOMP_OFFLOAD_usm_free): Use regular free.
	* testsuite/libgomp.c/usm-1.c: Add -mxnack=on for amdgcn.
	* testsuite/libgomp.c/usm-2.c: Likewise.
	* testsuite/libgomp.c/usm-3.c: Likewise.
	* testsuite/libgomp.c/usm-4.c: Likewise.

2022-10-24  Tobias Burnus  <tobias@codesourcery.com>

	Backported from master:
	2022-10-24  Tobias Burnus  <tobias@codesourcery.com>

	PR middle-end/107236
	* omp-expand.cc (expand_omp_target): Set calls_declare_variant_alt
	in DECL_CONTEXT and not to cfun->decl.
	* cgraphclones.cc (cgraph_node::create_clone): Copy also the
	node's calls_declare_variant_alt value.

2022-10-21  Tobias Burnus  <tobias@codesourcery.com>

	* omp-oacc-kernels-decompose.cc (top_level_omp_for_in_stmt,
	decompose_kernels_region_body): Handle GIMPLE_DEBUG like
	simple assignment.

2022-10-19  Tobias Burnus  <tobias@codesourcery.com>

	* omp-expand.cc (expand_omp_target): Fix OpenACC in case there
	are more than 3 arguments to the builtin function.

2022-10-17  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2022-10-17  Thomas Schwinge  <thomas@codesourcery.com>

	* config/gcn/gcn.cc (VnMODE): Use 'case E_QImode:' instead of
	'case QImode:', etc.

2022-10-14  Julian Brown  <julian@codesourcery.com>

	* omp-low.cc (oacc_privatization_candidate_p): Artificial vars are not
	privatization candidates.

2022-10-14  Julian Brown  <julian@codesourcery.com>

	* config/gcn/gcn.cc (gcn_detect_incoming_pointer_arg): Any pointer
	argument forces FLAT addressing mode, not just
	pointer-to-non-aggregate.

2022-10-12  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn.cc (gcn_expand_builtin_1): Change gcn_full_exec_reg
	to get_exec.

2022-10-12  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-11  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md (neg<mode>2): New define_expand.

2022-10-12  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-11  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md (vec_init<V_ALL:mode><V_ALL_ALT:mode>): New.
	* config/gcn/gcn.cc (GEN_VN): Add andvNsi3, subvNsi3.
	(GEN_VNM): Add gathervNm_expr.
	(GEN_VN_NOEXEC): Add vec_seriesvNsi.
	(gcn_expand_vector_init): Add initialization of vectors from smaller
	vectors.

2022-10-12  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-11  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-protos.h (get_exec): Add prototypes for two variants.
	* config/gcn/gcn-valu.md
	(vec_extract<V_ALL:mode><V_ALL_ALT:mode>): New define_expand.
	* config/gcn/gcn.cc (get_exec): Export the existing function. Add a
	new overload variant.

2022-10-12  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-11  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md
	(<cvt_name><VCVT_MODE:mode><VCVT_FMODE:mode>2<exec>): Use MODE_VF.
	(<cvt_name><VCVT_FMODE:mode><VCVT_IMODE:mode>2<exec>): Likewise.
	* config/gcn/gcn.h (MODE_VF): New macro.

2022-10-12  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-11  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-modes.def (VECTOR_MODE): Add new modes
	V32QI, V32HI, V32SI, V32DI, V32TI, V32HF, V32SF, V32DF,
	V16QI, V16HI, V16SI, V16DI, V16TI, V16HF, V16SF, V16DF,
	V8QI, V8HI, V8SI, V8DI, V8TI, V8HF, V8SF, V8DF,
	V4QI, V4HI, V4SI, V4DI, V4TI, V4HF, V4SF, V4DF,
	V2QI, V2HI, V2SI, V2DI, V2TI, V2HF, V2SF, V2DF.
	(ADJUST_ALIGNMENT): Likewise.
	* config/gcn/gcn-protos.h (gcn_full_exec): Delete.
	(gcn_full_exec_reg): Delete.
	(gcn_scalar_exec): Delete.
	(gcn_scalar_exec_reg): Delete.
	(vgpr_1reg_mode_p): Use inner mode to identify vector registers.
	(vgpr_2reg_mode_p): Likewise.
	(vgpr_vector_mode_p): Use VECTOR_MODE_P.
	* config/gcn/gcn-valu.md (V_QI, V_HI, V_HF, V_SI, V_SF, V_DI, V_DF,
	V_QIHI, V_1REG, V_INT_1REG, V_INT_1REG_ALT, V_FP_1REG, V_2REG, V_noQI,
	V_noHI, V_INT_noQI, V_INT_noHI, V_ALL, V_ALL_ALT, V_INT, V_FP):
	Add additional vector modes.
	(V64_SI, V64_DI, V64_ALL, V64_FP): New iterators.
	(scalar_mode, SCALAR_MODE, vnsi, VnSI, vndi, VnDI, sdwa):
	Add additional vector mode mappings.
	(mov<mode>): Implement vector length conversions.
	(ldexp<mode>3<exec>): Use VnSI.
	(frexp<mode>_exp2<exec>): Likewise.
	(VCVT_MODE, VCVT_FMODE, VCVT_IMODE): Add additional vector modes.
	(reduc_<reduc_op>_scal_<mode>): Use V64_ALL.
	(fold_left_plus_<mode>): Use V64_FP.
	(*<reduc_op>_dpp_shr_<mode>): Use V64_1REG.
	(*<reduc_op>_dpp_shr_<mode>): Use V64_DI.
	(*plus_carry_dpp_shr_<mode>): Use V64_INT_1REG.
	(*plus_carry_in_dpp_shr_<mode>): Use V64_SI.
	(*plus_carry_dpp_shr_<mode>): Use V64_DI.
	(mov_from_lane63_<mode>): Use V64_2REG.
	* config/gcn/gcn.cc (VnMODE): New function.
	(gcn_can_change_mode_class): Support multiple vector sizes.
	(gcn_modes_tieable_p): Likewise.
	(gcn_operand_part): Likewise.
	(gcn_scalar_exec): Delete function.
	(gcn_scalar_exec_reg): Delete function.
	(gcn_full_exec): Delete function.
	(gcn_full_exec_reg): Delete function.
	(gcn_inline_fp_constant_p): Support multiple vector sizes.
	(gcn_fp_constant_p): Likewise.
	(A): New macro.
	(GEN_VN_NOEXEC): New macro.
	(GEN_VNM_NOEXEC): New macro.
	(GEN_VN): New macro.
	(GEN_VNM): New macro.
	(GET_VN_FN): New macro.
	(CODE_FOR): New macro.
	(CODE_FOR_OP): New macro.
	(gen_mov_with_exec): Delete function.
	(gen_duplicate_load): Delete function.
	(gcn_expand_vector_init): Support multiple vector sizes.
	(strided_constant): Likewise.
	(gcn_addr_space_legitimize_address): Likewise.
	(gcn_expand_scalar_to_vector_address): Likewise.
	(gcn_expand_scaled_offsets): Likewise.
	(gcn_secondary_reload): Likewise.
	(gcn_valid_cvt_p): Likewise.
	(gcn_expand_builtin_1): Likewise.
	(gcn_make_vec_perm_address): Likewise.
	(gcn_vectorize_vec_perm_const): Likewise.
	(gcn_vector_mode_supported_p): Likewise.
	(gcn_autovectorize_vector_modes): New hook.
	(gcn_related_vector_mode): Support multiple vector sizes.
	(gcn_expand_dpp_shr_insn): Add FIXME comment.
	(gcn_md_reorg): Support multiple vector sizes.
	(print_reg): Likewise.
	(print_operand): Likewise.
	(TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES): New hook.

2022-10-12  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-10-03  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-valu.md (while_ultsidi): Limit mask length using
	operand 3.
	* doc/md.texi (while_ult): Document new operand 3 usage.
	* internal-fn.cc (expand_while_optab_fn): Set operand 3 when lhs_type
	maps to a non-vector mode.

2022-10-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-10-04  Tobias Burnus  <tobias@codesourcery.com>

	* doc/invoke.texi (-fopenmp): Mention C++ attribut syntax.
	(-fopenmp-simd): Likewise; update permitted directives.

2022-10-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-10-04  Tobias Burnus  <tobias@codesourcery.com>

	* doc/install.texi (Specific): Add missing items to bullet list.
	(amdgcn): Update LLVM requirements, use version not date for newlib.
	(nvptx): Use version not git hash for newlib.

2022-09-27  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* config/gcn/gcn-builtins.def (FABSV): New builtin.
	* config/gcn/gcn.cc (gcn_expand_builtin_1): Generate
	builtin for GCN_BUILTIN_FABSV.

2022-09-27  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* config/gcn/gcn-valu.md (math_unop_insn): New attribute.
	(<math_unop><mode>2, <math_unop><mode>2<exec>, <math_unop><mode>2,
	<math_unop><mode>2<exec>, *<math_unop><mode>2_insn,
	*<math_unop><mode>2<exec>_insn): Use math_unop_insn to generate
	assembler output.

2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	* config.gcc (with_arch) [nvptx]: Allow '--with-arch' to override
	the default.
	* config/nvptx/gen-multilib-matches.sh: New.
	* config/nvptx/t-nvptx (MULTILIB_OPTIONS, MULTILIB_MATCHES)
	(MULTILIB_EXCEPTIONS): Handle this.
	* doc/install.texi (Specific) <nvptx-*-none>: Document this.
	* doc/invoke.texi (Nvidia PTX Options): Likewise.

2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	* config.gcc (TM_MULTILIB_CONFIG) [nvptx]: Set to '$with_arch'.
	* config/nvptx/t-nvptx (MULTILIB_OPTIONS, MULTILIB_MATCHES)
	(MULTILIB_EXCEPTIONS): Handle it.

2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	* config.gcc (with_arch) [nvptx]: Set to 'sm_30'.
	* config/nvptx/nvptx.cc (nvptx_option_override): Assert that
	'-misa' appeared.
	* config/nvptx/nvptx.h (OPTION_DEFAULT_SPECS): Define.
	* config/nvptx/nvptx.opt (misa=): Remove 'Init'.

2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	Backported from master:
	2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>

	* config/nvptx/nvptx.h (ASM_SPEC): Define.

2022-09-24  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-24  Jakub Jelinek  <jakub@redhat.com>

	PR c/107001
	* omp-low.cc (lower_omp_taskgroup): Don't add GOMP_RETURN statement
	at the end.
	* omp-expand.cc (build_omp_regions_1): Clarify GF_OMP_TARGET_KIND_DATA
	is not stand-alone directive.  For GIMPLE_OMP_TASKGROUP, also don't
	update parent.
	(omp_make_gimple_edges) <case GIMPLE_OMP_TASKGROUP>: Reset
	cur_region back after new_omp_region.

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

	Backport from master branch:
	2022-05-09  Martin Liska  <mliska@suse.cz>

	* system.h (LIKELY): Define.
	(UNLIKELY): Likewise.

2022-09-12  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-12  Tobias Burnus  <tobias@codesourcery.com>

	* config/nvptx/mkoffload.cc (process): Replace a fatal_error by
	a warning + not enabling offloading if -misa=sm_30 prevents
	reverse offload.
	(main): Use tool_name as progname for diagnostic.
	* config/gcn/mkoffload.cc (main): Likewise.

2022-09-12  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-09  Tobias Burnus  <tobias@codesourcery.com>

	* config/nvptx/mkoffload.cc (struct id_map): Add 'dim' member.
	(record_id): Store func name without quotes, store dim separately.
	(process): For GOMP_REQUIRES_REVERSE_OFFLOAD, check that -march is
	at least sm_35, create '$offload_func_table' global array and init
	with reverse-offload function addresses.
	* config/nvptx/nvptx.cc (write_fn_proto_1, write_fn_proto): New
	force_public attribute to force .visible.
	(nvptx_declare_function_name): For "omp target
	device_ancestor_nohost" attribut, force .visible/TREE_PUBLIC.

2022-09-12  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-09  Tobias Burnus  <tobias@codesourcery.com>

	* config/gcn/mkoffload.cc (process_asm): Create .offload_func_table,
	similar to pre-existing .offload_var_table.

2022-09-09  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-09  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* config/gcn/gcn-builtins.def (FABSVF, LDEXPVF, LDEXPV, FREXPVF_EXP,
	FREXPVF_MANT, FREXPV_EXP, FREXPV_MANT): Add new builtins.
	* config/gcn/gcn-protos.h (gcn_dconst1over2pi): New prototype.
	* config/gcn/gcn-valu.md (MATH_UNOP_1OR2REG, MATH_UNOP_1REG,
	MATH_UNOP_TRIG): New iterators.
	(math_unop): New attributes.
	(<math_unop><mode>2, <math_unop><mode>2<exec>,
	<math_unop><mode>2, <math_unop><mode>2<exec>,
	*<math_unop><mode>2_insn, *<math_unop><mode>2<exec>_insn,
	ldexp<mode>3, ldexp<mode>3<exec>,
	frexp<mode>_exp2, frexp<mode>_mant2,
	frexp<mode>_exp2<exec>, frexp<mode>_mant2<exec>): New instructions.
	(<math_unop><mode>2, <math_unop><mode>2<exec>): New expanders.
	* config/gcn/gcn.cc (init_ext_gcn_constants): Update definition of
	dconst1over2pi.
	(gcn_dconst1over2pi): New.
	(gcn_builtin_type_index): Add entry for v64df type.
	(v64df_type_node): New.
	(gcn_init_builtin_types): Initialize v64df_type_node.
	(gcn_expand_builtin_1): Expand new builtins to instructions.
	(print_operand): Fix assembler output for 1/(2*PI) constant.
	* config/gcn/gcn.md (unspec): Add new entries.

2022-09-08  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-13  Richard Biener  <rguenther@suse.de>

	* omp-expand.cc (expand_omp_atomic_cas): Do not short-cut
	computation of the new value.

2022-09-08  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-08  Jakub Jelinek  <jakub@redhat.com>

	* omp-expand.cc (expand_omp_ordered_sink): Add CONT_BB argument.
	Add doacross(sink:omp_cur_iteration-1) support.
	(expand_omp_ordered_source_sink): Clear counts[fd->ordered + 1].
	Adjust expand_omp_ordered_sink caller.
	(expand_omp_for_ordered_loops): If counts[fd->ordered + 1] is
	non-NULL, set that variable to true at the start of outermost
	non-collapsed loop and set it to false at the end of innermost
	ordered loop.
	(expand_omp_for_generic): If fd->ordered, allocate
	1 + (fd->ordered - fd->collapse) further elements in counts array.
	Copy to counts + 2 + fd->ordered the counts of fd->collapse ..
	fd->ordered - 1 loop if any.

2022-09-08  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-06  Jakub Jelinek  <jakub@redhat.com>

	* gimple.h (enum gf_mask): Add GF_OMP_ORDERED_STANDALONE enumerator.
	(gimple_omp_subcode):  Use GIMPLE_OMP_ORDERED instead of
	GIMPLE_OMP_TEAMS as upper bound.
	(gimple_omp_ordered_standalone_p, gimple_omp_ordered_standalone): New
	inline functions.
	* gimplify.cc (find_standalone_omp_ordered): Look for OMP_ORDERED with
	NULL OMP_ORDERED_BODY rather than with OMP_DOACROSS clause.
	(gimplify_expr): Call gimple_omp_ordered_standalone for OMP_ORDERED
	with NULL OMP_ORDERED_BODY.
	* omp-low.cc (check_omp_nesting_restrictions): Use
	gimple_omp_ordered_standalone_p test instead of
	omp_find_clause (..., OMP_CLAUSE_DOACROSS).
	(lower_omp_ordered): Likewise.
	* omp-expand.cc (expand_omp, build_omp_regions_1,
	omp_make_gimple_edges): Likewise.

2022-09-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-30  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	* config/nvptx/nvptx.h (ASM_OUTPUT_DEF): Reference macro arguments.

2022-09-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-09-03  Jakub Jelinek  <jakub@redhat.com>

	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_DOACROSS.
	(enum omp_clause_depend_kind): Remove OMP_CLAUSE_DEPEND_SOURCE
	and OMP_CLAUSE_DEPEND_SINK, add OMP_CLAUSE_DEPEND_INVALID.
	(enum omp_clause_doacross_kind): New type.
	(struct tree_omp_clause): Add subcode.doacross_kind member.
	* tree.h (OMP_CLAUSE_DEPEND_SINK_NEGATIVE): Remove.
	(OMP_CLAUSE_DOACROSS_KIND): Define.
	(OMP_CLAUSE_DOACROSS_SINK_NEGATIVE): Define.
	(OMP_CLAUSE_DOACROSS_DEPEND): Define.
	(OMP_CLAUSE_ORDERED_DOACROSS): Define.
	* tree.cc (omp_clause_num_ops, omp_clause_code_name): Add
	OMP_CLAUSE_DOACROSS entries.
	* tree-nested.cc (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
	* tree-pretty-print.cc (dump_omp_clause): Don't handle
	OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.  Handle
	OMP_CLAUSE_DOACROSS.
	* gimplify.cc (gimplify_omp_depend): Don't handle
	OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
	(gimplify_scan_omp_clauses): Likewise.  Handle OMP_CLAUSE_DOACROSS.
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
	(find_standalone_omp_ordered): New function.
	(gimplify_omp_for): When OMP_CLAUSE_ORDERED is present, search
	body for OMP_ORDERED with OMP_CLAUSE_DOACROSS and if found,
	set OMP_CLAUSE_ORDERED_DOACROSS.
	(gimplify_omp_ordered): Don't handle OMP_CLAUSE_DEPEND_SINK or
	OMP_CLAUSE_DEPEND_SOURCE, instead check OMP_CLAUSE_DOACROSS, adjust
	diagnostics that presence or absence of ordered clause parameter
	is irrelevant.  Handle doacross(sink:omp_cur_iteration-1).  Use
	actual user name of the clause - doacross or depend - in diagnostics.
	* omp-general.cc (omp_extract_for_data): Don't set fd->ordered
	if !OMP_CLAUSE_ORDERED_DOACROSS (t).  If
	OMP_CLAUSE_ORDERED_DOACROSS (t) but !OMP_CLAUSE_ORDERED_EXPR (t),
	set fd->ordered to -1 and set it after the loop in that case to
	fd->collapse.
	* omp-low.cc (check_omp_nesting_restrictions): Don't handle
	OMP_CLAUSE_DEPEND_SOURCE nor OMP_CLAUSE_DEPEND_SINK, instead check
	OMP_CLAUSE_DOACROSS.  Use actual user name of the clause - doacross
	or depend - in diagnostics.  Diagnose mixing of stand-alone and
	block associated ordered constructs binding to the same loop.
	(lower_omp_ordered_clauses): Don't handle OMP_CLAUSE_DEPEND_SINK,
	instead handle OMP_CLAUSE_DOACROSS.
	(lower_omp_ordered): Look for OMP_CLAUSE_DOACROSS instead of
	OMP_CLAUSE_DEPEND.
	(lower_depend_clauses): Don't handle OMP_CLAUSE_DEPEND_SOURCE and
	OMP_CLAUSE_DEPEND_SINK.
	* omp-expand.cc (expand_omp_ordered_sink): Emit a sorry for
	doacross(sink:omp_cur_iteration-1).
	(expand_omp_ordered_source_sink): Use
	OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
	OMP_CLAUSE_DEPEND_SINK_NEGATIVE.  Use actual user name of the clause
	- doacross or depend - in diagnostics.
	(expand_omp): Look for OMP_CLAUSE_DOACROSS clause instead of
	OMP_CLAUSE_DEPEND.
	(build_omp_regions_1): Likewise.
	(omp_make_gimple_edges): Likewise.
	* lto-streamer-out.cc (hash_tree): Handle OMP_CLAUSE_DOACROSS.
	* tree-streamer-in.cc (unpack_ts_omp_clause_value_fields): Likewise.
	* tree-streamer-out.cc (pack_ts_omp_clause_value_fields): Likewise.
	gcc/c-family/
	* c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
	* c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
	clause and diagnose it.  Don't handle OMP_CLAUSE_DEPEND_SOURCE and
	OMP_CLAUSE_DEPEND_SINK.  Assert kind is not OMP_CLAUSE_DEPEND_INVALID.

2022-09-01  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	* config/gcn/gcn.cc (gcn_simd_clone_compute_vecsize_and_simdlen): New.
	(gcn_simd_clone_adjust): New.
	(gcn_simd_clone_usable): New.
	(TARGET_SIMD_CLONE_ADJUST): New.
	(TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN): New.
	(TARGET_SIMD_CLONE_USABLE): New.

2022-09-01  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-08-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
		    Jakub Jelinek  <jakub@redhat.com>

	* omp-simd-clone.cc (simd_clone_adjust_return_type,
	simd_clone_adjust_argument_types): Use known_eq (veclen, 0U)
	instead of known_eq (veclen, 0) to avoid -Wsign-compare warnings.

2022-09-01  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	* doc/tm.texi: Regenerate.
	* omp-simd-clone.cc (simd_clone_adjust_return_type): Allow zero
	vecsize.
	(simd_clone_adjust_argument_types): Likewise.
	* target.def (compute_vecsize_and_simdlen): Document the new
	vecsize_int and vecsize_float semantics.

2022-09-01  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	* config/gcn/gcn.cc (gcn_function_value): Allow vector return values.
	(num_arg_regs): Allow vector arguments.
	(gcn_function_arg): Likewise.
	(gcn_function_arg_advance): Likewise.
	(gcn_arg_partial_bytes): Likewise.
	(gcn_return_in_memory): Likewise.
	(gcn_expand_epilogue): Get return value from v8.
	* config/gcn/gcn.h (RETURN_VALUE_REG): Set to v8.
	(FIRST_PARM_REG): USE FIRST_SGPR_REG for clarity.
	(FIRST_VPARM_REG): New.
	(FUNCTION_ARG_REGNO_P): Allow vector parameters.
	(struct gcn_args): Add vnum field.
	(LIBCALL_VALUE): All vector return values.
	* config/gcn/gcn.md (gcn_call_value): Add vector constraints.
	(gcn_call_value_indirect): Likewise.

2022-08-31  Tobias Burnus  <tobias@codesourcery.com>

	Revert:
	2022-06-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* dwarf2cfi.cc (get_cfa_from_loc_descr): Check op against DW_OP_bregx.

	2020-07-27  Andrew Stubbs  <ams@codesourcery.com>

	* dwarf2cfi.cc (get_cfa_from_loc_descr): Support register spans
	with DW_OP_piece and DW_OP_LLVM_piece_end.
	* dwarf2out.cc (build_cfa_loc): Support register spans.

2022-08-30  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-08-26  Tobias Burnus  <tobias@codesourcery.com>

	* internal-fn.cc (expand_GOMP_TARGET_REV): New.
	* internal-fn.def (GOMP_TARGET_REV): New.
	* lto-cgraph.cc (lto_output_node, verify_node_partition): Mark
	'omp target device_ancestor_host' as in_other_partition and don't
	error if absent.
	* omp-low.cc (create_omp_child_function): Mark as 'noclone'.
	* omp-expand.cc (expand_omp_target): For reverse offload, remove
	sorry, use device = GOMP_DEVICE_HOST_FALLBACK and create
	empty-body nohost function.
	* omp-offload.cc (execute_omp_device_lower): Handle
	IFN_GOMP_TARGET_REV.
	(pass_omp_target_link::execute): For ACCEL_COMPILER, don't
	nullify fn argument for reverse offload

2022-08-22  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-08-22  Tobias Burnus  <tobias@codesourcery.com>

	PR lto/106686
	* lto-wrapper.cc (free_array_of_ptrs): Move before tool_cleanup.
	(tool_cleanup): Unlink offload_names.
	(compile_offload_image): Take filename argument to set it early.
	(compile_images_for_offload_targets): Update call; set
	offload_names to NULL after freeing the array.

2022-08-19  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-08-19  Tobias Burnus  <tobias@codesourcery.com>

	* config/gcn/mkoffload.cc (main): Add omp_requires_file and dbgobj to
	files_to_cleanup.
	* config/i386/intelmic-mkoffload.cc (prepare_target_image): Add
	omp_requires_file to temp_files.
	* config/nvptx/mkoffload.cc (omp_requires_file): New global static var.
	(main): Remove local omp_requires_file var.
	(tool_cleanup): Handle omp_requires_file.

2022-08-17  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-08-17  Tobias Burnus  <tobias@codesourcery.com>

	* lto-cgraph.cc (input_offload_tables): Improve requires diagnostic
	when filenames come out identically.

2022-08-17  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-08-17  Tobias Burnus  <tobias@codesourcery.com>
		    Chung-Lin Tang  <cltang@codesourcery.com>

	PR c++/104493
	* gimplify.cc (omp_notice_variable): Call omp_mappable_type
	instead of removed langhook.
	* omp-general.h (omp_mappable_type): New prototype.
	* omp-general.cc (omp_mappable_type):  New; moved from ...
	* langhooks.cc (lhd_omp_mappable_type): ... here.
	* langhooks-def.h (lhd_omp_mappable_type,
	LANG_HOOKS_OMP_MAPPABLE_TYPE): Remove.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Remote the latter.
	* langhooks.h (struct lang_hooks_for_types): Remove
	omp_mappable_type.

2022-08-02  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	* omp-simd-clone.cc (simd_clone_adjust): Convert shift_cnt to match
	the mask type.

2022-08-02  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	* config/gcn/gcn-valu.md (V_INT_noHI): New iterator.
	(<expander><mode>3<exec>): Use V_INT_noHI.
	(v<expander><mode>3<exec>): Likewise.

2022-08-02  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	* config/gcn/gcn.md (one_cmpldi2): New.

2022-08-01  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-08-01  Jakub Jelinek  <jakub@redhat.com>

	* omp-expand.cc (expand_omp_for_init_counts, expand_omp_for_init_vars,
	extract_omp_for_update_vars, expand_omp_for_ordered_loops,
	expand_omp_simd): Don't fold_convert second argument to
	fold_build_pointer_plus to sizetype.

2022-07-12  Andrew Stubbs  <ams@codesourcery.com>

	* gimple-loop-versioning.cc (loop_versioning::loop_versioning): Add
	comment.
	* omp-general.cc (omp_max_simd_vf): New function.
	* omp-general.h (omp_max_simd_vf): New prototype.
	* omp-low.cc (lower_rec_simd_input_clauses): Select largest from
	  omp_max_vf, omp_max_simt_vf, and omp_max_simd_vf.

2022-07-08  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-07-08  Thomas Schwinge  <thomas@codesourcery.com>

	* lto-cgraph.cc (input_offload_tables) <LTO_symtab_edge>: Correct
	'fn2' computation.

2022-07-07  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-07-07  Thomas Schwinge  <thomas@codesourcery.com>

	* config/i386/intelmic-mkoffload.cc (generate_host_descr_file)
	(prepare_target_image, main): Handle OpenMP 'requires'.
	(generate_host_descr_file): Switch to 'GOMP_offload_register_ver',
	'GOMP_offload_unregister_ver'.

2022-07-07  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-07-06  Thomas Schwinge  <thomas@codesourcery.com>

	* config/gcn/mkoffload.cc (process_obj): Clarify 'target_data' ->
	'[...]_data'.
	* config/nvptx/mkoffload.cc (process): Likewise.

2022-07-07  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-07-06  Thomas Schwinge  <thomas@codesourcery.com>

	* omp-general.h (enum omp_requires): Use 'GOMP_REQUIRES_[...]'.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-07-04  Tobias Burnus  <tobias@codesourcery.com>
		    Chung-Lin Tang  <cltang@codesourcery.com>
		    Thomas Schwinge  <thomas@codesourcery.com>

	* config/gcn/mkoffload.cc (process_asm): Write '#include <stdint.h>'.
	(process_obj): Pass omp_requires_mask to GOMP_offload_register_ver.
	(main): Ask lto1 to obtain omp_requires_mask and pass it on.
	* config/nvptx/mkoffload.cc (process, main): Likewise.
	* lto-cgraph.cc (omp_requires_to_name): New.
	(input_offload_tables): Save omp_requires_mask.
	(output_offload_tables): Read it, check for consistency,
	save value for mkoffload.
	* omp-low.cc (lower_omp_target): Force output_offloadtables
	call for OMP_REQUIRES_TARGET_USED.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Reverted:
	2021-02-02  Chung-Lin Tang  <cltang@codesourcery.com>

	* omp-offload.cc (omp_finish_file): Add code to create OpenMP requires
	mask variable in .gnu.gomp_requires section if needed.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-07-01  Tobias Burnus  <tobias@codesourcery.com>

	* config/gcn/gcn-protos.h (print_operand_address): Remove register
	keyword on 'rtx addr' argument.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-06-27  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn.md (*movbi): Remove assembler bug workarounds.
	(jump): Likewise.
	(movdi_symbol_save_scc): Likewise.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-06-13  Jakub Jelinek  <jakub@redhat.com>

	* omp-expand.cc (expand_omp_target): Remap user provided
	device clause arguments, -1 to -2 and -2 to -3, either
	at compile time if constant, or at runtime.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-06-09  Jakub Jelinek  <jakub@redhat.com>

	* omp-offload.cc (omp_discover_declare_target_tgt_fn_r,
	omp_discover_declare_target_fn_r): Don't walk reverse-offload
	target regions.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-06-07  Jakub Jelinek  <jakub@redhat.com>

	* tree.h (OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER): Define.
	* tree-pretty-print.cc (dump_omp_clause) <case OMP_CLAUSE_LINEAR>:
	Adjust clause printing style depending on
	OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-06-06  Andrew Stubbs  <ams@codesourcery.com>

	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Reinstate HAVE_GAS_ARM_EXTENDED_ARCH test.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-31  Jakub Jelinek  <jakub@redhat.com>

	* omp-low.cc (build_outer_var_ref): For code == OMP_CLAUSE_ALLOCATE
	allow var to be private in the outer context.
	(lower_private_allocate): Pass OMP_CLAUSE_ALLOCATE as last argument
	to build_outer_var_ref.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-27  Jakub Jelinek  <jakub@redhat.com>

	* tree-core.h (enum omp_clause_code): Rename OMP_CLAUSE_TO_DECLARE
	to OMP_CLAUSE_ENTER.
	* tree.h (OMP_CLAUSE_ENTER_TO): Define.
	* tree.cc (omp_clause_num_ops, omp_clause_code_name): Rename
	OMP_CLAUSE_TO_DECLARE to OMP_CLAUSE_ENTER.
	* tree-pretty-print.cc (dump_omp_clause): Handle OMP_CLAUSE_ENTER
	instead of OMP_CLAUSE_TO_DECLARE, if OMP_CLAUSE_ENTER_TO, print
	"to" instead of "enter".
	* tree-nested.cc (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_ENTER instead of
	OMP_CLAUSE_TO_DECLARE.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-25  Tobias Burnus  <tobias@codesourcery.com>

	* doc/invoke.texi (AMD GCN Options): Add gfx908/gfx90a.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-24  Jakub Jelinek  <jakub@redhat.com>

	PR c/105378
	* omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND_NOWAIT): New
	builtin.
	* gimplify.cc (gimplify_omp_task): Diagnose taskwait with nowait
	clause but no depend clauses.
	* omp-expand.cc (expand_taskwait_call): Use
	BUILT_IN_GOMP_TASKWAIT_DEPEND_NOWAIT rather than
	BUILT_IN_GOMP_TASKWAIT_DEPEND if nowait clause is present.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-20  Marcel Vollweiler  <marcel@codesourcery.com>

	* omp-low.cc (omp_runtime_api_call): Added target_memcpy_async and
	target_memcpy_rect_async to omp_runtime_apis array.

2022-07-05  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-17  Tobias Burnus  <tobias@codesourcery.com>

	* omp-low.cc (check_omp_nesting_restrictions): Skip warning for
	target inside target if inner is reverse offload.

2022-07-04  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-17  Tobias Burnus  <tobias@codesourcery.com>

	PR target/105602
	* config/gcn/t-omp-device (arch): Add 'amdgcn' besides existing 'gcn'.
	* config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa): Likewise.

2022-07-04  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-17  Jakub Jelinek  <jakub@redhat.com>

	* tree-core.h (enum omp_clause_depend_kind): Add
	OMP_CLAUSE_DEPEND_INOUTSET.
	* tree-pretty-print.cc (dump_omp_clause): Handle
	OMP_CLAUSE_DEPEND_INOUTSET.
	* gimplify.cc (gimplify_omp_depend): Likewise.
	* omp-low.cc (lower_depend_clauses): Likewise.

2022-06-17  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn.c (unified_shared_memory_enabled): New variable.
	(gcn_init_cumulative_args): Handle attribute "omp unified memory".
	(gcn_hsa_declare_function_name): Emit "MKOFFLOAD OPTIONS: USM+".
	* config/gcn/mkoffload.c (TEST_XNACK_OFF): New macro.
	(process_asm): Detect "MKOFFLOAD OPTIONS: USM+".
	Emit configure_xnack constructor, as required.
	* omp-low.c (create_omp_child_function): Add attribute "omp unified
	memory".

2022-06-10  Andrew Stubbs  <ams@codesourcery.com>

	* config/gcn/gcn-hsa.h (XNACKOPT): New macro.
	(ASM_SPEC): Use XNACKOPT.
	* config/gcn/gcn-opts.h (enum sram_ecc_type): Rename to ...
	(enum hsaco_attr_type): ... this, and generalize the names.
	(TARGET_XNACK): New macro.
	* config/gcn/gcn-valu.md (gather<mode>_insn_1offset<exec>):
	Add xnack compatible alternatives.
	(gather<mode>_insn_2offsets<exec>): Likewise.
	* config/gcn/gcn.c (gcn_option_override): Permit -mxnack for devices
	other than Fiji.
	(gcn_expand_epilogue): Remove early-clobber problems.
	(output_file_start): Emit xnack attributes.
	(gcn_hsa_declare_function_name): Obey -mxnack setting.
	* config/gcn/gcn.md (xnack): New attribute.
	(enabled): Rework to include "xnack" attribute.
	(*movbi): Add xnack compatible alternatives.
	(*mov<mode>_insn): Likewise.
	(*mov<mode>_insn): Likewise.
	(*mov<mode>_insn): Likewise.
	(*movti_insn): Likewise.
	* config/gcn/gcn.opt (-mxnack): Add the "on/off/any" syntax.
	(sram_ecc_type): Rename to ...
	(hsaco_attr_type: ... this.)
	* config/gcn/mkoffload.c (SET_XNACK_ANY): New macro.
	(TEST_XNACK): Delete.
	(TEST_XNACK_ANY): New macro.
	(TEST_XNACK_ON): New macro.
	(main): Support the new -mxnack=on/off/any syntax.

2022-06-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* dwarf2cfi.cc (get_cfa_from_loc_descr): Check op against DW_OP_bregx.

2022-06-30  Tobias Burnus  <tobias@codesourcery.com>

	* graphite-isl-ast-to-gimple.cc (graphite_oacc_analyze_scop): Update
	arguments of dump_printf.

2022-06-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-offload.cc (oacc_loop_warn_if_false_independent): Remove extra
	'.' at end of message.

2022-06-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-low.cc (usm_transform): Remove unused function argument.

2022-06-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-offload.cc (oacc_loop_get_cfg_loop): Cast tail_mark to
	gimple* for dump_printf.
	* tree-scalar-evolution.cc (oacc_ifn_call_extract): Remove
	unused variable 'call'.

2022-06-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* gimplify.cc (gimplify_scan_omp_clauses): Remove extra
	'%<..%>' pair in format string.

2022-06-30  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-data-optimize.cc (omp_data_optimize_add_candidate): Suppress
	format checking.
	(omp_data_optimize_can_be_private): Likewise.
	(omp_data_optimize_can_be_private): Likewise.

2022-05-13  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-expand.cc (expand_omp_target): Gimplify launch dimensions used
	in function call.

2022-04-14  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* graphite-oacc.cc (find_oacc_tail_marks): Check that data_dep is
	non-NULL before testing it.
	(reduction_use_in_outer_loop_p): Likewise.

2022-05-12  Jakub Jelinek  <jakub@redhat.com>

	Backport from mainline:
	2022-05-12  Jakub Jelinek  <jakub@redhat.com>

	* gimplify.cc (gimplify_omp_depend): Don't build_fold_addr_expr
	if null_pointer_node.
	(gimplify_scan_omp_clauses): Likewise.
	* tree-pretty-print.cc (dump_omp_clause): Print null_pointer_node
	as omp_all_memory.

2022-04-06  Thomas Schwinge  <thomas@codesourcery.com>

	Backport from mainline:
	2022-04-06  Thomas Schwinge  <thomas@codesourcery.com>

	* doc/install.texi: Don't document '--with-hsa-runtime',
	'--with-hsa-runtime-include', '--with-hsa-runtime-lib'.

2022-05-06  Marcel Vollweiler  <marcel@codesourcery.com>

	Backport from mainline:
	2022-05-06  Marcel Vollweiler  <marcel@codesourcery.com>

	* omp-low.cc (omp_runtime_api_call): Added target_is_accessible to
	omp_runtime_apis array.

2022-05-05  Sandra Loosemore  <sandra@codesourcery.com>

	Backport from mainline:
	2022-05-05  Sandra Loosemore  <sandra@codesourcery.com>

	* gimplify.cc (gimplify_omp_for): Update messages for SCHEDULED
	and ORDERED clause conflict errors.  Add check for GRAINSIZE and
	NUM_TASKS on TASKLOOP.

2022-05-02  Marcel Vollweiler  <marcel@codesourcery.com>

	Backport from mainline:
	2022-05-02  Marcel Vollweiler  <marcel@codesourcery.com>

	* omp-low.cc (omp_runtime_api_call): Added get_mapped_ptr to
	omp_runtime_apis array.

2022-06-17  Chung-Lin Tang  <cltang@codesourcery.com>

	Backport from mainline:
	2022-06-17  Chung-Lin Tang  <cltang@codesourcery.com>

	* builtin-types.def (BT_FN_VOID_PTRMODE): Define.
	(BT_FN_PTRMODE_PTRMODE_INT_PTR): Define.
	* omp-builtins.def (BUILT_IN_OMP_INIT_ALLOCATOR): Define.
	(BUILT_IN_OMP_DESTROY_ALLOCATOR): Define.
	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_USES_ALLOCATORS.
	* tree-pretty-print.cc (dump_omp_clause): Handle OMP_CLAUSE_USES_ALLOCATORS.
	* tree.h (OMP_CLAUSE_USES_ALLOCATORS_ALLOCATOR): New macro.
	(OMP_CLAUSE_USES_ALLOCATORS_MEMSPACE): New macro.
	(OMP_CLAUSE_USES_ALLOCATORS_TRAITS): New macro.
	* tree.cc (omp_clause_num_ops): Add OMP_CLAUSE_USES_ALLOCATORS.
	(omp_clause_code_name): Add "uses_allocators".
	(walk_tree_1): Add OMP_CLAUSE_USES_ALLOCATORS case.

	* gimplify.cc (gimplify_scan_omp_clauses): Add checking of OpenMP target
	region allocate clauses, to require a uses_allocators clause to exist
	for allocators.
	(gimplify_omp_workshare): Add handling of OMP_CLAUSE_USES_ALLOCATORS
	for OpenMP target regions; create calls of omp_init/destroy_allocator
	around target region body.
	* omp-low.cc (lower_private_allocate): Adjust receiving of allocator.
	(lower_rec_input_clauses): Likewise.
	(create_task_copyfn): Add dereference for allocator if needed.

	* system.h (startswith): New function.

2022-02-24  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-02-24  Andrew Stubbs  <ams@codesourcery.com>

	* config.gcc (amdgcn): Accept --with-arch=gfx908 and gfx90a.
	* config/gcn/gcn-opts.h (enum gcn_isa): New.
	(TARGET_GCN3): Use enum gcn_isa.
	(TARGET_GCN3_PLUS): Likewise.
	(TARGET_GCN5): Likewise.
	(TARGET_GCN5_PLUS): Likewise.
	(TARGET_CDNA1): New.
	(TARGET_CDNA1_PLUS): New.
	(TARGET_CDNA2): New.
	(TARGET_CDNA2_PLUS): New.
	(TARGET_M0_LDS_LIMIT): New.
	(TARGET_PACKED_WORK_ITEMS): New.
	* config/gcn/gcn.cc (gcn_isa): Change to enum gcn_isa.
	(gcn_option_override): Recognise CDNA ISA variants.
	(gcn_omp_device_kind_arch_isa): Support gfx90a.
	(gcn_expand_prologue): Make m0 init optional.
	Add support for packed work items.
	(output_file_start): Support gfx90a.
	(gcn_hsa_declare_function_name): Support gfx90a metadata.
	* config/gcn/gcn.h (TARGET_CPU_CPP_BUILTINS):Add __CDNA1__ and
	__CDNA2__.
	* config/gcn/gcn.md (<su>mulsi3_highpart): Use TARGET_GCN5_PLUS.
	(<su>mulsi3_highpart_imm): Likewise.
	(<su>mulsidi3): Likewise.
	(<su>mulsidi3_imm): Likewise.
	* config/gcn/gcn.opt (gpu_type): Add gfx90a.
	* config/gcn/mkoffload.cc (EF_AMDGPU_MACH_AMDGCN_GFX90a): New.
	(main): Support gfx90a.
	* config/gcn/t-gcn-hsa: Add gfx90a multilib.
	* config/gcn/t-omp-device: Add gfx90a isa.

2022-02-15  Andrew Stubbs  <ams@codesourcery.com>

	Backport from mainline:
	2022-02-15  Andrew Stubbs  <ams@codesourcery.com>

	* config.in: Regenerate.
	* config/gcn/gcn-hsa.h (X_FIJI): Delete.
	(X_900): Delete.
	(X_906): Delete.
	(X_908): Delete.
	(S_FIJI): Delete.
	(S_900): Delete.
	(S_906): Delete.
	(S_908): Delete.
	(NO_XNACK): New macro.
	(NO_SRAM_ECC): New macro.
	(SRAMOPT): Keep only v4 variant.
	(HSACO3_SELECT_OPT): Delete.
	(DRIVER_SELF_SPECS): Delete.
	(ASM_SPEC): Remove LLVM 9 support.
	* config/gcn/gcn-valu.md
	(gather<mode>_insn_2offsets<exec>): Remove assembler bug workaround.
	(scatter<mode>_insn_2offsets<exec_scatter>): Likewise.
	* config/gcn/gcn.cc (output_file_start): Remove LLVM 9 support.
	(print_operand_address): Remove assembler bug workaround.
	* config/gcn/mkoffload.cc (EF_AMDGPU_XNACK_V3): Delete.
	(EF_AMDGPU_SRAM_ECC_V3): Delete.
	(SET_XNACK_ON): Delete v3 variants.
	(SET_XNACK_OFF): Delete v3 variants.
	(TEST_XNACK): Delete v3 variants.
	(SET_SRAM_ECC_ON): Delete v3 variants.
	(SET_SRAM_ECC_ANY): Delete v3 variants.
	(SET_SRAM_ECC_OFF): Delete v3 variants.
	(SET_SRAM_ECC_UNSUPPORTED): Delete v3 variants.
	(TEST_SRAM_ECC_ANY): Delete v3 variants.
	(TEST_SRAM_ECC_ON): Delete v3 variants.
	(copy_early_debug_info): Remove v3 support.
	(main): Remove v3 support.
	* configure: Regenerate.
	* configure.ac: Replace all GCN feature checks with a version check.

2022-05-23  Tobias Burnus  <tobias@codesourcery.com>

	Backport from mainline:
	2022-05-23  Tobias Burnus  <tobias@codesourcery.com>

	* langhooks-def.h (lhd_omp_array_size): New.
	(LANG_HOOKS_OMP_ARRAY_SIZE): Define.
	(LANG_HOOKS_DECLS): Add it.
	* langhooks.cc (lhd_omp_array_size): New.
	* langhooks.h (struct lang_hooks_for_decls): Add hook.
	* omp-low.cc (scan_sharing_clauses, lower_omp_target):
	Handle GOMP_MAP_FIRSTPRIVATE for array descriptors.

2022-05-09  Kwok Cheung Yeung  <kcy@codesourcery.com>

	Backport from master:
	2022-05-04  Tobias Burnus  <tobias@codesourcery.com>

	* omp-low.cc (lower_omp_target): Fix use_device_{addr,ptr} with list
	item that is in an outer data-sharing clause.

2022-04-20  Andrew Stubbs  <ams@codesourcery.com>

	* omp-low.cc: Do USM transformations for "unified_address".

2022-04-02  Andrew Stubbs  <ams@codesourcery.com>

	* omp-low.cc (usm_transform): Transform omp_target_alloc and
	omp_target_free.

2022-03-31  Abid Qadeer  <abidh@codesourcery.com>

	* omp-low.cc (lower_omp_allocate): Move allocate declaration
	inside loop.  Set it to false at the end of condition.

2022-03-30  Andrew Stubbs  <ams@codesourcery.com>

	* omp-builtins.def (BUILT_IN_GOMP_ENABLE_PINNED_MODE): New.
	* omp-low.cc (omp_enable_pinned_mode): Use
	BUILT_IN_GOMP_ENABLE_PINNED_MODE.

2022-03-11  Andrew Stubbs <ams@codesourcery.com>

	Backport of the patch posted at
	https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591354.html

	* omp-low.cc (omp_enable_pinned_mode): New function.
	(execute_lower_omp): Call omp_enable_pinned_mode.

2022-03-11  Abid Qadeer  <abidh@codesourcery.com>

	Backport of a patch posted at
	https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591353.html

	* omp-low.cc (usm_transform): New function.
	(make_pass_usm_transform): Likewise.
	(class pass_usm_transform): New.
	* passes.def: Add pass_usm_transform.
	* tree-pass.h (make_pass_usm_transform): New declaration.

2022-03-10  Andrew Stubbs <ams@codesourcery.com>

	Backport of the patch posted at
	https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591350.html

	* common.opt: Add -foffload-memory and its enum values.
	* coretypes.h (enum offload_memory): New.
	* doc/invoke.texi: Document -foffload-memory.

2022-03-09  Abid Qadeer  <abidh@codesourcery.com>

	Backport of a patch posted at
	https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588372.html

	* omp-low.cc (scan_sharing_clauses): Handle OMP_CLAUSE_ALLOCATOR.
	(scan_omp_allocate): New.
	(scan_omp_1_stmt): Call it.
	(lower_omp_allocate): New function.
	(lower_omp_1): Call it.

2022-03-09  Abid Qadeer  <abidh@codesourcery.com>

	Backport of a patch posted at
	https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588371.html

	* doc/gimple.texi: Describe GIMPLE_OMP_ALLOCATE.
	* gimple-pretty-print.cc (dump_gimple_omp_allocate): New function.
	(pp_gimple_stmt_1): Call it.
	* gimple.cc (gimple_build_omp_allocate): New function.
	* gimple.def (GIMPLE_OMP_ALLOCATE): New node.
	* gimple.h (enum gf_mask): Add GF_OMP_ALLOCATE_KIND_MASK,
	GF_OMP_ALLOCATE_KIND_ALLOCATE and GF_OMP_ALLOCATE_KIND_FREE.
	(struct gomp_allocate): New.
	(is_a_helper <gomp_allocate *>::test): New.
	(is_a_helper <const gomp_allocate *>::test): New.
	(gimple_build_omp_allocate): Declare.
	(gimple_omp_subcode): Replace GIMPLE_OMP_TEAMS with
	GIMPLE_OMP_ALLOCATE.
	(gimple_omp_allocate_set_clauses): New.
	(gimple_omp_allocate_set_kind): Likewise.
	(gimple_omp_allocate_clauses): Likewise.
	(gimple_omp_allocate_kind): Likewise.
	(CASE_GIMPLE_OMP): Add GIMPLE_OMP_ALLOCATE.
	* gimplify.cc (gimplify_omp_allocate): New.
	(gimplify_expr): Call it.
	* gsstruct.def (GSS_OMP_ALLOCATE): Define.

2022-03-09  Abid Qadeer  <abidh@codesourcery.com>

	Backport of a patch posted at
	https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588370.html

	* tree-core.h (struct tree_base): Add comments.
	* tree-pretty-print.cc (dump_generic_node): Handle allocate directive
	kind.
	* tree.h (OMP_ALLOCATE_KIND_ALLOCATE): New define.
	(OMP_ALLOCATE_KIND_FREE): Likewise.

2022-03-09  Abid Qadeer  <abidh@codesourcery.com>

	Backport of a patch posted at
	https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588369.html

	* tree-pretty-print.cc (dump_omp_clause): Handle OMP_CLAUSE_ALLOCATOR.
	(dump_generic_node): Handle OMP_ALLOCATE.
	* tree.def (OMP_ALLOCATE): New.
	* tree.h (OMP_ALLOCATE_CLAUSES): Likewise.
	(OMP_ALLOCATE_DECL): Likewise.
	(OMP_ALLOCATE_ALLOCATOR): Likewise.
	* tree.cc (omp_clause_num_ops): Add entry for OMP_CLAUSE_ALLOCATOR.

2022-03-08  Abid Qadeer  <abidh@codesourcery.com>

	* omp-low.cc (omp_maybe_offloaded_ctx): New prototype.
	(scan_sharing_clauses):  Check a restriction on allocate clause.

2022-03-01  Tobias Burnus  <tobias@codesourcery.com>

	* langhooks-def.h (lhd_omp_deep_mapping_p,
	lhd_omp_deep_mapping_cnt, lhd_omp_deep_mapping): New.
	(LANG_HOOKS_OMP_DEEP_MAPPING_P, LANG_HOOKS_OMP_DEEP_MAPPING_CNT,
	LANG_HOOKS_OMP_DEEP_MAPPING): Define.
	(LANG_HOOKS_DECLS): Use it.
	* langhooks.cc (lhd_omp_deep_mapping_p, lhd_omp_deep_mapping_cnt,
	lhd_omp_deep_mapping): New stubs.
	* langhooks.h (struct lang_hooks_for_decls): Add new hooks
	* omp-expand.cc (expand_omp_target): Handle dynamic-size
	addr/sizes/kinds arrays.
	* omp-low.cc (build_sender_ref, fixup_child_record_type,
	scan_sharing_clauses, lower_omp_target): Update to handle
	new hooks and dynamic-size addr/sizes/kinds arrays.

2022-02-24  Chung-Lin Tang  <cltang@codesourcery.com>

	* gimplify.cc (gimplify_scan_omp_clauses): Add case for
	attach/detach map kind for ARRAY_REF of POINTER_TYPE.

2022-02-11  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-general.cc (DELAY_METADIRECTIVES_AFTER_LTO): Check that cfun is
	non-null before derefencing.

2022-01-28  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* gimplify.cc (gimplify_omp_metadirective): Mark offloadable functions
	containing metadirectives with 'construct={target}' in the selector.
	* omp-general.cc (omp_has_target_constructor_p): New.
	* omp-general.h (omp_has_target_constructor_p): New prototype.
	* omp-low.cc (lower_omp_1): Emit warning if marked functions called
	outside of a target context.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* builtin-types.def (BT_FN_BOOL_INT_CONST_PTR_CONST_PTR_CONST_PTR): New
	type.
	* omp-builtins.def (BUILT_IN_GOMP_EVALUATE_TARGET_DEVICE): New builtin.
	* omp-general.cc (omp_context_selector_matches): Handle 'target_device'
	selector set.
	(omp_dynamic_cond): Generate expression tree for 'target_device'
	selector set.
	(omp_context_compute_score): Handle selectors in 'target_device' set.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-general.cc (omp_dynamic_cond): Do not return user condition if
	constant.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-general.cc (omp_check_context_selector): Revert string length
	check.
	(omp_context_name_list_prop): Likewise.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* Makefile.in (OBJS): Add omp-expand-metadirective.o.
	* gimple-streamer-in.cc (input_gimple_stmt): Add case for
	GIMPLE_OMP_METADIRECTIVE.  Handle metadirective labels.
	* gimple-streamer-out.cc (output_gimple_stmt): Likewise.
	* omp-expand-metadirective.cc: New.
	* passes.def: Add pass_omp_expand_metadirective.
	* tree-pass.h (make_pass_omp_expand_metadirective): New prototype.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* gimplify.cc (expand_omp_metadirective): New.
	* omp-general.cc: Include tree-pretty-print.h.
	(DELAY_METADIRECTIVES_AFTER_LTO): New macro.
	(omp_context_selector_matches): Delay resolution of selectors.  Allow
	non-constant expressions.
	(omp_dynamic_cond): New.
	(omp_dynamic_selector_p): New.
	(sort_variant): New.
	(omp_get_dynamic_candidates): New.
	(omp_resolve_metadirective): New.
	(omp_resolve_metadirective): New.
	* omp-general.h (struct omp_metadirective_variant): New.
	(omp_resolve_metadirective): New prototype.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* gimple-low.cc (lower_omp_metadirective): New.
	(lower_stmt): Handle GIMPLE_OMP_METADIRECTIVE.
	* gimple-pretty-print.cc (dump_gimple_omp_metadirective): New.
	(pp_gimple_stmt_1): Handle GIMPLE_OMP_METADIRECTIVE.
	* gimple-walk.cc (walk_gimple_op): Handle GIMPLE_OMP_METADIRECTIVE.
	(walk_gimple_stmt): Likewise.
	* gimple.cc (gimple_alloc_omp_metadirective): New.
	(gimple_build_omp_metadirective): New.
	(gimple_build_omp_metadirective_variant): New.
	* gimple.def (GIMPLE_OMP_METADIRECTIVE): New.
	(GIMPLE_OMP_METADIRECTIVE_VARIANT): New.
	* gimple.h (gomp_metadirective_variant): New.
	(gomp_metadirective): New.
	(is_a_helper <gomp_metadirective *>::test): New.
	(is_a_helper <gomp_metadirective_variant *>::test): New.
	(is_a_helper <const gomp_metadirective *>::test): New.
	(is_a_helper <const gomp_metadirective_variant *>::test): New.
	(gimple_alloc_omp_metadirective): New prototype.
	(gimple_build_omp_metadirective): New prototype.
	(gimple_build_omp_metadirective_variant): New prototype.
	(gimple_has_substatements): Add GIMPLE_OMP_METADIRECTIVE case.
	(gimple_has_ops): Add GIMPLE_OMP_METADIRECTIVE.
	(gimple_omp_metadirective_label): New.
	(gimple_omp_metadirective_set_label): New.
	(gimple_omp_metadirective_variants): New.
	(gimple_omp_metadirective_set_variants): New.
	(CASE_GIMPLE_OMP): Add GIMPLE_OMP_METADIRECTIVE.
	* gimplify.cc (is_gimple_stmt): Add OMP_METADIRECTIVE.
	(expand_omp_metadirective): New.
	(gimplify_omp_metadirective): New.
	(gimplify_expr): Add case for OMP_METADIRECTIVE.
	* gsstruct.def (GSS_OMP_METADIRECTIVE): New.
	(GSS_OMP_METADIRECTIVE_VARIANT): New.
	* omp-expand.cc (build_omp_regions_1): Handle GIMPLE_OMP_METADIRECTIVE.
	(omp_make_gimple_edges): Likewise.
	* omp-low.cc (struct omp_context): Add next_clone field.
	(new_omp_context): Initialize next_clone field.
	(clone_omp_context): New.
	(delete_omp_context): Delete clone contexts.
	(scan_omp_metadirective): New.
	(scan_omp_1_stmt): Handle GIMPLE_OMP_METADIRECTIVE.
	(lower_omp_metadirective): New.
	(lower_omp_1): Handle GIMPLE_OMP_METADIRECTIVE.
	* tree-cfg.cc (cleanup_dead_labels): Handle GIMPLE_OMP_METADIRECTIVE.
	(gimple_redirect_edge_and_branch): Likewise.
	* tree-inline.cc (remap_gimple_stmt): Handle GIMPLE_OMP_METADIRECTIVE.
	(estimate_num_insns): Likewise.
	* tree-pretty-print.cc (dump_generic_node): Handle OMP_METADIRECTIVE.
	* tree-ssa-operands.cc (parse_ssa_operands): Handle
	GIMPLE_OMP_METADIRECTIVE.

2022-01-25  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-general.cc (omp_context_selector_matches): Add extra argument.
	(omp_resolve_metadirective): New stub function.
	* omp-general.h (struct omp_metadirective_variant): New.
	(omp_context_selector_matches): Add extra argument.
	(omp_resolve_metadirective): New prototype.
	* tree.def (OMP_METADIRECTIVE): New.
	* tree.h (OMP_METADIRECTIVE_CLAUSES): New macro.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* graphite-scop-detection.cc (scop_detection::harmful_loop_in_region):
	Remove check for loops without data references.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* graphite-scop-detection.cc (scop_context_loop): New function.
	(build_alias_set): Use scop_context_loop instead of find_common_loop.
	* graphite-isl-ast-to-gimple.cc (graphite_regenerate_ast_isl): Likewise.
	* graphite.h (scop_context_loop): New declaration.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* graphite-optimize-isl.cc (optimize_isl): Adjust
	param_max_isl_operations value for OpenACC functions and add
	special warnings if value gets exceeded.

	* graphite-scop-detection.cc (build_scops): Likewise for
	param_graphite_max_arrays_per_scop.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* tree-ssa-pre.cc (insert): Skip any insertions in OpenACC
	functions that might be processed by Graphite.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* passes.def: Set restrict_oacc_hoisting to true for the early
	pass_lim instance.
	* tree-ssa-loop-im.cc (movement_possibility): Add
	restrict_oacc_hoisting flag to function; restrict movement if set.
	(compute_invariantness): Add restrict_oacc_hoisting flag and pass it on.
	(gather_mem_refs_stmt): Skip IFN_GOACC_LOOP and IFN_UNIQUE
	calls.
	(loop_invariant_motion_in_fun): Add restrict_oacc_hoisting flag and
	pass it on.
	(pass_lim::execute): Pass on new flags.
	* tree-ssa-loop-manip.h (loop_invariant_motion_in_fun): Adjust declaration.
	* gimple-loop-interchange.cc (pass_linterchange::execute): Adjust call to
	loop_invariant_motion_in_fun.

2021-11-16  Andrew Stubbs  <ams@codesourcery.com>

	* common.opt: Add flag Wopenacc-false-independent.
	* omp-offload.cc (oacc_loop_warn_if_false_independent): New function.
	(oacc_loop_fixed_partitions): Call from here.

2021-11-16  Andrew Stubbs  <ams@codesourcery.com>

	* graphite-isl-ast-to-gimple.cc: Include internal-fn.h.
	(graphite_oacc_analyze_scop): Implement runtime alias checks.
	* omp-expand.cc (expand_oacc_for): Add an additional "noalias" parameter
	to GOACC_LOOP internal calls, and initialise it to integer_one_node.
	* omp-offload.cc (oacc_xform_loop): Integrate the runtime alias check
	into the GOACC_LOOP expansion.

2021-11-16  Andrew Stubbs  <ams@codesourcery.com>
	    Thomas Schwinge  <thomas@codesourcery.com>

	* Makefile.in: Add pass.
	* doc/gimple.texi: TODO.
	* gimple-walk.cc (walk_gimple_seq_mod): Adjust for backward walking.
	* gimple-walk.h (struct walk_stmt_info): Add field.
	* passes.def: Add new pass.
	* tree-pass.h (make_pass_omp_data_optimize): New declaration.
	* omp-data-optimize.cc: New file.

2021-11-16  Frederik Harwath <frederik@codesourcery.com>

	* tree-pretty-print.cc (print_omp_clause_to_str): Add new function.
	* tree-pretty-print.h (print_omp_clause_to_str): Add declaration.

2021-11-16  Frederik Harwath <frederik@codesourcery.com>

	* omp-offload.cc (oacc_remove_unused_partitioning): New function
	for removing partitioning that is not used by any loop.
	(oacc_validate_dims): Call oacc_remove_unused_partitioning and
	enable warnings about unused partitioning.

2021-11-16  Frederik Harwath <frederik@codesourcery.com>

	* graph.cc (oacc_get_fn_attrib): New declaration.
	(find_loop_location): New declaration.
	(draw_cfg_nodes_for_loop): Print value of the
	can_be_parallel flag at the top of loops in OpenACC
	functions.

2021-11-16  Frederik Harwath <frederik@codesourcery.com>
	    Thomas Schwinge <thomas@codesourcery.com>

            * Makefile.in: Add graphite-oacc.o
            * cfgloop.cc (alloc_loop): Set can_be_parallel_valid_p to false.
            * cfgloop.h: Add can_be_parallel_valid_p field.
            * cfgloopmanip.cc (copy_loop_info): Add assert.
            * config/nvptx/nvptx.cc (nvptx_goacc_reduction_setup):
            * doc/invoke.texi: Adjust param openacc-kernels description.
            * doc/passes.texi: Adjust pass_ipa_oacc_kernels description.
            * flag-types.h (enum openacc_kernels):Add
            OPENACC_KERNELS_DECOMPOSE_PARLOOPS.
            * gimple-pretty-print.cc (dump_gimple_omp_target): Handle
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GRAPHITE.
            * gimple.h (enum gf_mask): Add
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GRAPHITE and
            widen GF_OMP_TARGET_KIND_MASK.
            (is_gimple_omp_oacc): Handle
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GRAPHITE.
            (is_gimple_omp_offloaded): Likewise.
            * gimplify.cc (gimplify_omp_for): Enable reduction localization
            for "kernels" regions.
            (gimplify_omp_workshare): Likewise.
            * graphite-dependences.cc (scop_get_reads_and_writes): Handle
            "kills" and "reduction" PDRs.
            (apply_schedule_on_deps): Add dump output for intermediate
            steps of the dependence computation to enable understanding
            of unexpected dependences.
            (carries_deps): Likewise.
            (scop_get_dependences): Handle "kill" operations and add dump
            output.
            * graphite-isl-ast-to-gimple.cc (visit_schedule_loop_node): New function.
            (graphite_oacc_analyze_scop): New function.
            * graphite-optimize-isl.cc (optimize_isl): Remove "static" and
            add argument to identify OpenACC use; don't fail on unchanged
            schedule in this case.
            * graphite-poly.cc (new_poly_dr): Handle "kills".
            (print_pdr): Likewise.
            (new_gimple_poly_bb): Likewise.
            (free_gimple_poly_bb): Likewise.
            (new_scop): Handle "reduction", "private", and "firstprivate"
            hash sets.
            (free_scop): Likewise.
            (print_isl_space): New function.
            (debug_isl_space): New function.
            * graphite-scop-detection.cc (scop_detection::can_represent_loop):
            Don't fail if niter is 0 in OpenACC functions.
            (scop_detection::add_scop): Don't reject regions with only one
            loop in OpenACC functions.
            (ignored_oacc_internal_call_p): New function.
            (scan_tree_for_params): Handle VIEW_CONVERT_EXPR.
            (stmt_has_side_effects): Ignore internal OpenACC function calls.
            (add_write): Likewise.
            (add_read): Likewise.
            (add_kill): New function.
            (add_kills): New function.
            (add_oacc_kills): New function.
            (try_generate_gimple_bb): Kill false dependences for OpenACC
            "private"/"firstprivate" vars.
            (gather_bbs::gather_bbs): Determin OpenACC
            "private"/"firstprivate" vars in region.
            (gather_bbs::before_dom_children): Add assert.
            (determine_openacc_reductions): New function.
            (build_scops): Determine OpenACC "reduction" vars in SCoP.
            * graphite-sese-to-poly.cc (oacc_ifn_call_extract): New declaration.
            (oacc_internal_call_p): New function.
            (build_poly_dr): Ignore internal OpenACC function calls,
            handle "reduction" refs.
            (build_poly_sr): Likewise; handle "kill" operations.
            * graphite.cc (graphite_transform_loops): Accept functions with
            only a single loop.
            (oacc_enable_graphite_p): New function.
            (gate_graphite_transforms): Enable pass on OpenACC functions.
            * graphite.h (enum poly_dr_type): Add PDR_KILL.
            (struct poly_dr): Add "is_reduction" field.
            (new_poly_dr): Add argument to declaration.
            (pdr_kill_p): New function.
            (print_isl_space): New declaration.
            (debug_isl_space): New declaration.
            (struct scop): Add fields "reductions_vars",
            "oacc_firstprivate_vars", and "oacc_private_scalars".
            (optimize_isl): New declaration.
            (graphite_oacc_analyze_scop): New declaration.
            * internal-fn.cc (expand_UNIQUE): Handle
            IFN_UNIQUE_OACC_PRIVATE_SCALAR and IFN_UNIQUE_OACC_FIRSTPRIVATE
            * internal-fn.h: Add OACC_PRIVATE_SCALAR and OACC_FIRSTPRIVATE
            * omp-expand.cc (struct omp_region): Adjust comment.
            (expand_omp_taskloop_for_inner):
            (expand_omp_for): Add asserts about expected "kernels" region types.
            (mark_loops_in_oacc_kernels_region): Likewise.
            (expand_omp_target): Likewise; handle
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GRAPHITE.
            (build_omp_regions_1): Handle
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GRAPHITE.
            Likewise.
            (omp_make_gimple_edges): Likewise.
            * omp-general.cc (oacc_get_kernels_attrib): New function.
            (oacc_get_fn_dim_size): Allow argument to be NULL.
            * omp-general.h (oacc_get_kernels_attrib): New declaration.
            * omp-low.cc (struct omp_context): Add fields
            "oacc_firstprivate_vars" and "oacc_private_scalars".
            (was_originally_oacc_kernels): New function.
            (is_oacc_kernels):
            (is_oacc_kernels_decomposed_graphite_part): New function.
            (new_omp_context): Allocate "oacc_first_private_vars" and
            "oacc_private_scalars" ...
            (delete_omp_context): ... and free from here.
            (oacc_record_firstprivate_var_clauses): New function.
            (oacc_record_private_scalars): New function.
            (scan_sharing_clauses): Call functions to record "private"
            scalars and "firstprivate" variables.
            (check_oacc_kernel_gwv): Add assert.
            (ctx_in_oacc_kernels_region): Handle
            GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GRAPHITE.
            (scan_omp_for): Likewise.
            (check_omp_nesting_restrictions): Likewise.
            (lower_oacc_head_mark): Likewise.
            (lower_omp_for): Likewise.
            (lower_omp_target): Create "private" and "firstprivate" marker
            call statements.
            (lower_oacc_head_tail): Adjust "private" and "firstprivate"
            marker calls.
            (lower_oacc_reductions): Emit "private" and "firstprivate"
             marker call statements.
            (make_oacc_firstprivate_vars_marker): New function.
            (make_oacc_private_scalars_marker): New function.
            * omp-oacc-kernels-decompose.cc (adjust_region_code_walk_stmt_fn):
            Assign GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GRAPHITE to
            region using the new "kernels" handling.
            (make_region_seq): Adjust default region type for new
            "kernels" handling; no more exceptions, let Graphite handle everything.
            (make_region_loop_nest): Likewise; add dump output and assert.
            (adjust_nested_loop_clauses): Stop creating "auto" clauses if
            loop has "independent", "gang" etc.
            (transform_kernels_loop_clauses): Likewise.
            * omp-offload.cc (oacc_extract_loop_call): New function.
            (oacc_loop_get_cfg_loop): New function.
            (can_be_parallel_str): New function.
            (oacc_loop_can_be_parallel_p): New function.
            (oacc_parallel_kernels_graphite_fun_p): New function.
            (oacc_parallel_fun_p): New function.
            (oacc_loop_transform_auto_into_independent): New function, ...
            (oacc_loop_fixed_partitions): ... called from here to transfer
            the result of Graphite's analysis to the loop.
            (execute_oacc_loop_designation): Handle "oacc
            functions with "parallel_kernels_graphite" attribute.
            (execute_oacc_device_lower): Handle
            IFN_UNIQUE_OACC_PRIVATE_SCALAR and IFN_UNIQUE_OACC_FIRSTPRIVATE.
            * omp-offload.h (oacc_extract_loop_call): Add declaration.
            * params.opt: Add "param=openacc-kernels" value "decompose-parloops".
            * sese.cc (scalar_evolution_in_region): "Redirect" SCEV
            analysis to outer loop for IFN_GOACC_LOOP calls.
            * sese.h: Add field "kill_scalar_refs".
            * tree-chrec.cc (chrec_fold_plus_1): Handle VIEW_CONVERT_EXPR
            like CASE_CONVERT.
            * tree-data-ref.cc (dump_data_reference): Include
            DR_BASE_ADDRESS and DR_OFFSET in dump output.
            (get_references_in_stmt): Don't reject OpenACC internal function
            calls.
            (graphite_find_data_references_in_stmt): Remove unused variable.
            * tree-parloops.cc (pass_parallelize_loops::execute): Disable
            pass with the new kernels handling, enable if requested explicitly.
            * tree-scalar-evolution.cc (set_scev_analyze_openacc_calls):
            Set flag to enable the analysis of internal OpenACC function
            calls (use for Graphite only).
            (oacc_call_analyzable_p): New function.
            (oacc_ifn_call_extract): New function.
            (oacc_simplify): New function.
            (add_to_evolution): Simplify OpenACC internal function calls
            if applicable.
            (follow_ssa_edge_binary): Likewise.
            (follow_ssa_edge_expr): Likewise.
            (follow_copies_to_constant): Likewise.
            (analyze_initial_condition): Likewise.
            (interpret_loop_phi): Likewise.
            (interpret_gimple_call): New function.
            (interpret_rhs_expr): Likewise.
            (instantiate_scev_name): Likewise.
            (analyze_scalar_evolution_1): Handle GIMPLE_CALL, handle default definitions.
            (expression_expensive_p): Consider internal OpenACC calls to
            be cheap.
            * tree-scalar-evolution.h (set_scev_analyze_openacc_calls):
            New declaration.
            (oacc_call_analyzable_p): New declaration.
            * tree-ssa-dce.cc (mark_stmt_if_obviously_necessary): Mark
            lhs of internal OpenACC function calls necessary.
            * tree-ssa-ifcombine.c (recognize_if_then_else):
            * tree-ssa-loop-niter.cc (oacc_call_analyzable_p):
            (oacc_ifn_call_extract): New declaration.
            (interpret_gimple_call): New delcaration.
            (expand_simple_operations): Handle internal OpenACC function calls.
            * tree-ssa-loop.cc (gate_oacc_kernels): Disable for new
            "kernels" handling.
            * graphite-oacc.cc: New file.
            * graphite-oacc.h: New file.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* common.opt: Add fgraphite-runtime-alias-checks.
	* graphite-isl-ast-to-gimple.cc
	(generate_alias_cond): New function.
	(graphite_regenerate_ast_isl): Use from here.
	* graphite-poly.cc (new_scop): Create unhandled_alias_ddrs vec ...
	(free_scop): and release here.
	* graphite-scop-detection.cc (dr_defs_outside_region): New function.
	(dr_well_analyzed_for_runtime_alias_check_p): New function.
	(graphite_runtime_alias_check_p): New function.
	(build_alias_set): Record unhandled alias ddrs for later alias check
	creation if flag_graphite_runtime_alias_checks is true instead
	of failing.
	* graphite.h (struct scop): Add field unhandled_alias_ddrs.
	* sese.h (has_operands_from_region_p): New function.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* tree-loop-distribution.cc (data_ref_segment_size): Remove function.
	(latch_dominated_by_data_ref): Likewise.
	(compute_alias_check_pairs): Likewise.

	* tree-data-ref.cc (data_ref_segment_size): New function,
	copied from tree-loop-distribution.c
	(compute_alias_check_pairs): Likewise.
	(latch_dominated_by_data_ref): Likewise.

	* tree-data-ref.h (compute_alias_check_pairs): New declaration.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* predict.cc (pass_profile::execute): Fix dump message.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* graphite-sese-to-poly.cc (build_poly_sr_1): Fix a typo and
	a reference to a variable which does not exist.
	* graphite-isl-ast-to-gimple.cc (gsi_insert_earliest): Fix typo
	in comment.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* graphite-sese-to-poly.cc (isl_id_for_ssa_name): Rename to ...
	(isl_id_for_parameter): ... this new function name.
	(build_scop_context): Adjust function use.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* graphite-scop-detection.cc (scop_detection::can_represent_loop):
	Output reason for failure to dump file.
	(scop_detection::harmful_loop_in_region): Likewise.
	(scop_detection::graphite_can_represent_expr): Likewise.
	(scop_detection::stmt_has_simple_data_refs_p): Likewise.
	(scop_detection::stmt_simple_for_scop_p): Likewise.
	(print_sese_loop_numbers): New function.
	(scop_detection::add_scop): Use from here to print loops in
	rejected SCoP.

2021-11-16  Frederik Harwath <frederik@codesourcery.com>
	    Thomas Schwinge <thomas@codesourcery.com>

	* omp-general.cc (oacc_get_fn_dim_size): Return 0 on
	missing "dims".
	* omp-offload.cc (pass_oacc_loop_designation::clone): New
	member function.
	(pass_oacc_gimple_workers::clone): Likewise.
	(pass_oacc_gimple_device_lower::clone): Likewise.
	* passes.cc (pass_data_no_loop_optimizations): New pass_data.
	(class pass_no_loop_optimizations): New pass.
	(make_pass_no_loop_optimizations): New function.
	* passes.def: Move pass_oacc_{loop_designation,
	gimple_workers, device_lower} into tree_loop, and add
	copies to pass_tree_no_loop and to new
	pass_no_loop_optimizations.  Add copies of passes pass_ccp,
	pass_ipa_warn, pass_complete_unrolli, pass_backprop,
	pass_phiprop, pass_fix_loops after the OpenACC passes
	in pass_tree_loop.
	* tree-ssa-loop-ivcanon.cc (pass_complete_unroll::clone):
	New member function.
	(pass_complete_unrolli::clone): Likewise.
	* tree-ssa-loop.cc (pass_fix_loops::clone): Likewise.
	(pass_tree_loop_init::clone): Likewise.
	(pass_tree_loop_done::clone): Likewise.
	* tree-ssa-phiprop.cc (pass_phiprop::clone): Likewise.

2021-11-16  Sandra Loosemore <sandra@codesourcery.com>
	    Tobias Burnus  <tobias@codesourcery.com>

	* expr.cc (get_inner_reference): Handle NOP_EXPR like
	VIEW_CONVERT_EXPR.

2021-11-16  Frederik Harwath  <frederik@codesourcery.com>

	* tree-cfg.h (gimple_debug_cfg): Change argument type from int
	to dump_flags_t.

2021-06-03  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (extract_base_bit_offset): Don't look through ARRAY_REFs or
	INDIRECT_REFs here.
	(build_struct_group): Reinstate previous behaviour for handling
	ARRAY_REFs/INDIRECT_REFs.

2021-06-02  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (extract_base_bit_offset): Add BASE_IND and OPENMP
	parameters.  Handle pointer-typed indirect references for OpenACC
	alongside reference-typed ones.
	(strip_components_and_deref, aggregate_base_p): New functions.
	(build_struct_group): Add pointer type indirect ref handling,
	including chained references, for OpenACC.  Also handle references to
	structs for OpenACC.  Conditionalise bits for OpenMP only where
	appropriate.
	(gimplify_scan_omp_clauses): Rework pointer-type indirect structure
	access handling to work more like the reference-typed handling for
	OpenACC only.
	* omp-low.cc (scan_sharing_clauses): Handle pointer-type indirect struct
	references, and references to pointers to structs also.

2021-06-02  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (insert_struct_comp_map): Refactor function into...
	(build_struct_comp_nodes): This new function.  Remove list handling
	and improve self-documentation.
	(insert_node_after, move_node_after, move_nodes_after,
	move_concat_nodes_after): New helper functions.
	(build_struct_group): New function to build up GOMP_MAP_STRUCT node
	groups to map struct components. Outlined from...
	(gimplify_scan_omp_clauses): Here.  Call above function.

2021-06-02  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (extract_base_bit_offset): Unify ARRAY_REF/INDIRECT_REF
	stripping code in first call/subsequent call cases.

2021-06-02  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (gimplify_scan_omp_clauses): Simplify condition
	for changing GOMP_MAP_ATTACH_DETACH to GOMP_MAP_ATTACH or
	GOMP_MAP_DETACH.

2021-04-07  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-low.cc (is_oacc_parallel_or_serial): Handle
	GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_PARALLELIZED and
	GF_OMP_TARGET_KIND_OACC_PARALLEL_KERNELS_GANG_SINGLE.

2021-03-04  Andrew Stubbs <ams@codesourcery.com>

	* dwarf2out.cc (notional_parents_list): New file variable.
	(gen_subprogram_die): Record offload kernel functions in
	notional_parents_list.
	(fixup_notional_parents): New function.
	(dwarf2out_finish): Call fixup_notional_parents.
	(dwarf2out_c_finalize): Reset notional_parents_list.

2021-03-01  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* omp-expand.cc (expand_oacc_for): Convert .tile variable to
	diff_type before multiplying.
	* omp-general.cc (omp_extract_for_data): Use accumulated precision
	of all collapsed for-loops as precision of iteration variable, up
	to the precision of a long long.

2021-02-26  Andrew Stubbs  <ams@codesourcery.com>

	* dwarf2out.cc (gen_subprogram_die): Replace existing low/high PC
	attributes, rather than ICE.

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

	* omp-offload.cc (omp_finish_file): Add code to create OpenMP requires
	mask variable in .gnu.gomp_requires section if needed.

2021-02-01  Chung-Lin Tang  <cltang@codesourcery.com>

	* omp-low.cc (install_var_field): Add new 'tree key_expr = NULL_TREE'
	default parameter. Set splay-tree lookup key to key_expr instead of
	var if key_expr is non-NULL. Adjust call to install_parm_decl.
	Update comments.
	(scan_sharing_clauses): Use clause tree expression as splay-tree key
	for map/to/from and OpenACC firstprivate cases when installing the
	variable field into the send/receive record type.
	(maybe_lookup_field_in_outer_ctx): Add code to search through
	construct clauses instead of entirely based on splay-tree lookup.
	(lower_oacc_reductions): Adjust to find map-clause of reduction
	variable, then create receiver-ref.
	(lower_omp_target): Adjust to lookup var field using clause expression.

2021-01-16  Andrew Stubbs  <ams@codesourcery.com>

	* dwarf2out.cc (gen_subprogram_die): Check offload attributes only.

2021-01-15  Andrew Stubbs  <ams@codesourcery.com>

	* dwarf2out.cc (add_location_or_const_value_attribute): Set
	DW_AT_address_class, if appropriate.

2020-12-06  Andrew Stubbs  <ams@codesourcery.com>

	* dwarf2out.cc (gen_subprogram_die): Add high/low_pc attributes for
	parents of offload kernels.

2021-01-13  Julian Brown  <julian@codesourcery.com>

	* doc/tm.texi.in (TARGET_VECTORIZE_PREFER_GATHER_SCATTER): Add
	documentation hook.
	* doc/tm.texi: Regenerate.
	* target.def (prefer_gather_scatter): Add target hook under vectorizer.
	* tree-vect-stmts.cc (get_group_load_store_type): Optionally prefer
	gather/scatter instructions to scalar/elementwise fallback.
	* config/gcn/gcn.cc (TARGET_VECTORIZE_PREFER_GATHER_SCATTER): Define
	hook.

2021-01-13  Julian Brown  <julian@codesourcery.com>

	* omp-offload.cc (oacc_thread_numbers): Add VF_BY_VECTORIZER parameter.
	Add overloaded wrapper for previous arguments & behaviour.
	(oacc_xform_loop): Lower vector loops to iterate a multiple of
	omp_max_vf times over contiguous steps on non-SIMT targets.

2020-07-27  Andrew Stubbs  <ams@codesourcery.com>

	* dwarf2cfi.cc (get_cfa_from_loc_descr): Support register spans
	with DW_OP_piece and DW_OP_LLVM_piece_end.
	* dwarf2out.cc (build_cfa_loc): Support register spans.

2020-08-19  Sandra Loosemore  <sandra@codesourcery.com>

	Add a "combined" flag for "acc kernels loop" etc directives.

	* tree.h (OACC_LOOP_COMBINED): New.

2020-06-03  Tobias Burnus  <tobias@codesourcery.com>

	* gimplify.cc (localize_reductions): Do not create local
	variable for privatized arrays.

2020-03-27  Sandra Loosemore  <sandra@codesourcery.com>

	* doc/invoke.texi (Option Summary): Add entries for
	-Wopenacc-kernels-annotate-loops and
	-fno-openacc-kernels-annotate-loops.
	(Warning Options): Document -Wopenacc-kernels-annotate-loops.
	(Optimization Options): Document -fno-openacc-kernels-annotate-loops.

2020-02-06  Tobias Burnus  <tobias@codesourcery.com>

	* omp-low.c (convert_from_firstprivate_int):
	Use VIEW_CONVERT also for vectors.

2020-02-19  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (gimplify_scan_omp_clauses): Handle
	GOMP_MAP_DECLARE_ALLOCATE and GOMP_MAP_DECLARE_DEALLOCATE.

2018-10-04  Cesar Philippidis  <cesar@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	* omp-low.c (scan_sharing_clauses): Update handling of OpenACC declare
	create, declare copyin and declare deviceptr to have local lifetimes.
	(convert_to_firstprivate_int): Handle pointer types.
	(convert_from_firstprivate_int): Likewise.  Create local storage for
	the values being pointed to.  Add new orig_type argument.
	(lower_omp_target): Handle GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.
	Add orig_type argument to convert_from_firstprivate_int call.
	Allow pointer types with GOMP_MAP_FIRSTPRIVATE_INT.  Don't privatize
	firstprivate VLAs.
	* tree-pretty-print.c (dump_omp_clause): Handle
	GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.

2019-09-20  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (localize_reductions): Rewrite references for
	OMP_CLAUSE_PRIVATE also.

2019-09-17  Tobias Burnus  <tobias@codesourcery.com>

	* gimplify.cc (gomp_oacc_needs_data_present): Remove unused variable.

2019-09-06  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (gimplify_omp_for): Use for_stmt in call to
	localize_reductions.

2019-09-06  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (gimplify_omp_workshare): Use OMP_CLAUSES, OMP_BODY
	instead of OMP_TARGET_CLAUSES, OMP_TARGET_BODY.

2019-09-05  Cesar Philippidis  <cesar@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (privatize_reduction): New struct.
	(localize_reductions_r, localize_reductions): New functions.
	(gimplify_omp_for): Call localize_reductions.
	(gimplify_omp_workshare): Likewise.
	* omp-low.cc (lower_oacc_reductions): Handle localized reductions.
	Create fewer temp vars.
	* tree-core.h (omp_clause_code): Add OMP_CLAUSE_REDUCTION_PRIVATE_DECL
	documentation.
	* tree.cc (omp_clause_num_ops): Bump number of ops for
	OMP_CLAUSE_REDUCTION to 6.
	(walk_tree_1): Adjust accordingly.
	* tree.h (OMP_CLAUSE_REDUCTION_PRIVATE_DECL): Add macro.

2019-07-10  Cesar Philippidis  <cesar@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (gimplify_adjust_omp_clauses_1): Raise error for
	assumed-size arrays in map clauses for Fortran/OpenMP.
	* omp-low.cc (lower_omp_target): Set the size of assumed-size Fortran
	arrays to one to allow use of data already mapped on the offload device.

2019-05-20  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (gimplify_adjust_omp_clauses_1): Support implied no_alloc
	and optional arguments based on mappings in enclosing data regions.

2019-05-19  Julian Brown  <julian@codesourcery.com>

	* gimplify.cc (oacc_array_mapping_info): Add REF field.
	(gimplify_scan_omp_clauses): Initialise above field for data blocks
	passed by reference.
	(gomp_oacc_needs_data_present): Handle references.
	(gimplify_adjust_omp_clauses_1): Handle references and optional
	arguments for variables declared in lexically-enclosing OpenACC data
	region.

2019-01-23  Thomas Schwinge  <thomas@codesourcery.com>

	* params.opt (openacc_kernels): Default to decompose.

2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>

	* gimplify.cc (omp_add_variable): Enable firstprivate reduction
	variables.

2018-09-20  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-low.cc (lower_oacc_head_mark): Don't mark OpenACC auto
	loops as independent inside acc parallel regions.

2018-12-22  Cesar Philippidis  <cesar@codesourcery.com>
            Julian Brown  <julian@codesourcery.com>
            Tobias Burnus  <tobias@codesourcery.com>

	* omp-low.cc (maybe_lookup_field_in_outer_ctx): New function.
	(convert_to_firstprivate_int): New function.
	(convert_from_firstprivate_int): New function.
	(lower_omp_target): Enable GOMP_MAP_FIRSTPRIVATE_INT in OpenACC.
	Remove unused variable.

2018-08-28  Julian Brown  <julian@codesourcery.com>
            Cesar Philippidis  <cesar@codesourcery.com>

	* gimplify.cc (oacc_array_mapping_info): New struct.
	(gimplify_omp_ctx): Add decl_data_clause hash map.
	(new_omp_context): Zero-initialise above.
	(delete_omp_context): Delete above if allocated.
	(gimplify_scan_omp_clauses): Scan for array mappings on data constructs,
	and record in above map.
	(gomp_oacc_needs_data_present): New function.
	(gimplify_adjust_omp_clauses_1): Handle data mappings (e.g. array
	slices) declared in lexically-enclosing data constructs.
	* omp-low.cc (lower_omp_target): Allow decl for bias not to be present
	in OpenACC context.

2018-10-05  Nathan Sidwell  <nathan@acm.org>
	    Tom de Vries  <tdevries@suse.de>
	    Thomas Schwinge  <thomas@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	* doc/invoke.texi (fopenacc-dim): Update.
	* omp-offload.cc (oacc_parse_default_dims): Update.

2019-09-20  Chung-Lin Tang <cltang@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	* omp-expand.cc (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.

2018-09-20  Cesar Philippidis  <cesar@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	* omp-low.c (install_var_field): New base_pointer_restrict
	argument.
	(scan_sharing_clauses): Update call to install_var_field.
	(omp_target_base_pointers_restrict_p): New function.
	(scan_omp_target): Update call to install_var_field.

2018-10-30  Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.cc (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_expand_builtin):
	(nvptx_generate_vector_shuffle): Change integral SHIFT operand to
	tree BITS operand.
	(nvptx_vector_reduction): New.
	(nvptx_adjust_reduction_type): New.
	(nvptx_goacc_reduction_setup): Use it to adjust the type of ref_to_res.
	(nvptx_goacc_reduction_init): Don't update LHS if it doesn't exist.
	(nvptx_goacc_reduction_fini): Call nvptx_vector_reduction for vector.
	Use it to adjust the type of ref_to_res.
	(nvptx_goacc_reduction_teardown):
	* config/nvptx/nvptx.md (cond_uni): New pattern.

2018-06-29  Cesar Philippidis  <cesar@codesourcery.com>
	    James Norris  <jnorris@codesourcery.com>

	* gimplify.cc (enum gimplify_omp_var_data): Add GOVD_DEVICETPR.
	(omp_notice_variable): Add GOVD_DEVICEPTR attribute when appropriate.
	(gimplify_scan_omp_clauses): Add GOVD_DEVICEPTR attribute when
	appropriate.
	(gimplify_adjust_omp_clauses_1): Set GOMP_MAP_FORCE_DEVICEPTR for
	implicit deviceptr mappings.

2020-04-19  Chung-Lin Tang  <cltang@codesourcery.com>

	PR other/76739

	* builtin-types.def (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_VAR): New type.
	* omp-builtins.def (BUILT_IN_GOACC_DATA_START): Adjust function type
	to new BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_VAR.
	* gimplify.cc (gimplify_scan_omp_clauses): Skip gimplification of
	OMP_CLAUSE_SIZE of non-contiguous array maps (which is a TREE_LIST).
	* omp-expand.cc (expand_omp_target): Add non-contiguous array descriptor
	pointers to variadic arguments.
	* omp-low.cc (append_field_to_record_type): New function.
	(create_noncontig_array_descr_type): Likewise.
	(create_noncontig_array_descr_init_code): Likewise.
	(scan_sharing_clauses): For non-contiguous array map kinds, check for
	supported dimension structure, and install non-contiguous array
	variable into current omp_context.
	(reorder_noncontig_array_clauses): New function.
	(scan_omp_target): Call reorder_noncontig_array_clauses to place
	non-contiguous array map clauses at beginning of clause sequence.
	(lower_omp_target): Add handling for non-contiguous array map kinds,
	add all created non-contiguous array descriptors to
	gimple_omp_target_data_arg.

2022-06-20  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* Makefile.in (REVISION_s): Change default message.