1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
|
2023-01-07 LIU Hao <lh_mouse@126.com>
PR middle-end/108300
* jit-w32.h: Define `WIN32_LEAN_AND_MEAN` before <windows.h>.
2022-12-21 Martin Liska <mliska@suse.cz>
* jit-playback.h: Use unused attribute.
2022-12-14 Antoni Boucher <bouanto@zoho.com>
Guillaume Gomez <guillaume1.gomez@gmail.com>
PR jit/108078
* jit-recording.h: Add vector_type::is_same_type_as method
2022-12-07 Antoni Boucher <bouanto@zoho.com>
Guillaume Gomez <guillaume1.gomez@gmail.com>
PR jit/107770
* jit-playback.cc: Fix vector float comparison
* jit-playback.h: Update comparison function signature
* jit-recording.cc: Update call for "new_comparison" function
* jit-recording.h: Fix vector float comparison
2022-11-20 Jeff Law <jlaw@ventanamicro.com>
PR other/104044
* jit-playback.cc (playback::lvale::mark_addressable): Remove
extraeous semicolon
2022-11-19 Jonathan Wakely <jwakely@redhat.com>
LIU Hao <lh_mouse@126.com>
* jit-playback.cc (playback::context::scoped_lock): Define RAII
lock type.
(playback::context::compile): Use scoped_lock to acquire mutex
for the active playback context.
(jit_mutex): Change to std::mutex.
(playback::context::acquire_mutex): Rename to ...
(playback::context::lock): ... this.
(playback::context::release_mutex): Rename to ...
(playback::context::unlock): ... this.
* jit-playback.h (playback::context): Rename members and declare
scoped_lock.
* jit-recording.cc (INCLUDE_PTHREAD_H): Remove unused define.
* libgccjit.cc (version_mutex): Change to std::mutex.
(struct jit_version_info): Use std::lock_guard to acquire and
release mutex.
2022-11-14 Martin Liska <mliska@suse.cz>
Revert:
2022-11-09 Martin Liska <mliska@suse.cz>
* Make-lang.in:
* docs/cp/index.rst: Moved to...
* doc/cp/index.rst: ...here.
* docs/cp/intro/index.rst: Moved to...
* doc/cp/intro/index.rst: ...here.
* docs/cp/intro/tutorial01.rst: Moved to...
* doc/cp/intro/tutorial01.rst: ...here.
* docs/cp/intro/tutorial02.rst: Moved to...
* doc/cp/intro/tutorial02.rst: ...here.
* docs/cp/intro/tutorial03.rst: Moved to...
* doc/cp/intro/tutorial03.rst: ...here.
* docs/cp/intro/tutorial04.rst: Moved to...
* doc/cp/intro/tutorial04.rst: ...here.
* docs/cp/topics/asm.rst: Moved to...
* doc/cp/topics/asm.rst: ...here.
* docs/cp/topics/compilation.rst: Moved to...
* doc/cp/topics/compilation.rst: ...here.
* docs/cp/topics/contexts.rst: Moved to...
* doc/cp/topics/contexts.rst: ...here.
* docs/cp/topics/expressions.rst: Moved to...
* doc/cp/topics/expressions.rst: ...here.
* docs/cp/topics/functions.rst: Moved to...
* doc/cp/topics/functions.rst: ...here.
* docs/cp/topics/index.rst: Moved to...
* doc/cp/topics/index.rst: ...here.
* docs/cp/topics/locations.rst: Moved to...
* doc/cp/topics/locations.rst: ...here.
* docs/cp/topics/objects.rst: Moved to...
* doc/cp/topics/objects.rst: ...here.
* docs/cp/topics/types.rst: Moved to...
* doc/cp/topics/types.rst: ...here.
* docs/examples/emit-alphabet.bf: Moved to...
* doc/examples/emit-alphabet.bf: ...here.
* docs/examples/tut01-hello-world.c: Moved to...
* doc/examples/tut01-hello-world.c: ...here.
* docs/examples/tut01-hello-world.cc: Moved to...
* doc/examples/tut01-hello-world.cc: ...here.
* docs/examples/tut02-square.c: Moved to...
* doc/examples/tut02-square.c: ...here.
* docs/examples/tut02-square.cc: Moved to...
* doc/examples/tut02-square.cc: ...here.
* docs/examples/tut03-sum-of-squares.c: Moved to...
* doc/examples/tut03-sum-of-squares.c: ...here.
* docs/examples/tut03-sum-of-squares.cc: Moved to...
* doc/examples/tut03-sum-of-squares.cc: ...here.
* docs/examples/tut04-toyvm/Makefile: Moved to...
* doc/examples/tut04-toyvm/Makefile: ...here.
* docs/examples/tut04-toyvm/factorial.toy: Moved to...
* doc/examples/tut04-toyvm/factorial.toy: ...here.
* docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
* doc/examples/tut04-toyvm/fibonacci.toy: ...here.
* docs/examples/tut04-toyvm/toyvm.c: Moved to...
* doc/examples/tut04-toyvm/toyvm.c: ...here.
* docs/examples/tut04-toyvm/toyvm.cc: Moved to...
* doc/examples/tut04-toyvm/toyvm.cc: ...here.
* docs/examples/tut05-bf.c: Moved to...
* doc/examples/tut05-bf.c: ...here.
* docs/index.rst: Moved to...
* doc/index.rst: ...here.
* docs/internals/index.rst: Moved to...
* doc/internals/index.rst: ...here.
* docs/internals/test-hello-world.exe.log.txt: Moved to...
* doc/internals/test-hello-world.exe.log.txt: ...here.
* docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
* doc/intro/factorial.png: ...here.
* docs/intro/index.rst: Moved to...
* doc/intro/index.rst: ...here.
* docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
* doc/intro/sum-of-squares.png: ...here.
* docs/intro/tutorial01.rst: Moved to...
* doc/intro/tutorial01.rst: ...here.
* docs/intro/tutorial02.rst: Moved to...
* doc/intro/tutorial02.rst: ...here.
* docs/intro/tutorial03.rst: Moved to...
* doc/intro/tutorial03.rst: ...here.
* docs/intro/tutorial04.rst: Moved to...
* doc/intro/tutorial04.rst: ...here.
* docs/intro/tutorial05.rst: Moved to...
* doc/intro/tutorial05.rst: ...here.
* docs/topics/asm.rst: Moved to...
* doc/topics/asm.rst: ...here.
* docs/topics/compatibility.rst: Moved to...
* doc/topics/compatibility.rst: ...here.
* docs/topics/compilation.rst: Moved to...
* doc/topics/compilation.rst: ...here.
* docs/topics/contexts.rst: Moved to...
* doc/topics/contexts.rst: ...here.
* docs/topics/expressions.rst: Moved to...
* doc/topics/expressions.rst: ...here.
* docs/topics/function-pointers.rst: Moved to...
* doc/topics/function-pointers.rst: ...here.
* docs/topics/functions.rst: Moved to...
* doc/topics/functions.rst: ...here.
* docs/topics/index.rst: Moved to...
* doc/topics/index.rst: ...here.
* docs/topics/locations.rst: Moved to...
* doc/topics/locations.rst: ...here.
* docs/topics/objects.rst: Moved to...
* doc/topics/objects.rst: ...here.
* docs/topics/performance.rst: Moved to...
* doc/topics/performance.rst: ...here.
* docs/topics/types.rst: Moved to...
* doc/topics/types.rst: ...here.
* docs/Makefile: Removed.
* docs/_build/texinfo/Makefile: Removed.
* docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
* docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
* docs/_build/texinfo/libgccjit.texi: Removed.
* docs/conf.py: Removed.
* docs/intro/factorial.png: Removed.
* docs/intro/sum-of-squares.png: Removed.
* doc/conf.py: New file.
2022-11-14 Martin Liska <mliska@suse.cz>
Revert:
2022-11-14 Martin Liska <mliska@suse.cz>
* Make-lang.in: Support --with-sphinx-build.
2022-11-14 Martin Liska <mliska@suse.cz>
Revert:
2022-11-14 Martin Liska <mliska@suse.cz>
* doc/internals/index.rst: Fix cross manual refs.
* doc/topics/contexts.rst: Likewise.
2022-11-14 Martin Liska <mliska@suse.cz>
Revert:
2022-11-14 Martin Liska <mliska@suse.cz>
* Make-lang.in:
Support installation if sphinx-build is missing.
2022-11-14 Martin Liska <mliska@suse.cz>
Revert:
2022-11-14 Martin Liska <mliska@suse.cz>
* doc/cp/index.rst: Remove trailing .rst in toctree.
* doc/cp/intro/index.rst: Likewise.
* doc/cp/topics/index.rst: Likewise.
* doc/index.rst: Likewise.
* doc/intro/index.rst: Likewise.
* doc/topics/index.rst: Likewise.
* doc/indices-and-tables.rst: New file.
2022-11-11 Martin Liska <mliska@suse.cz>
* doc/cp/index.rst: Remove trailing .rst in toctree.
* doc/cp/intro/index.rst: Likewise.
* doc/cp/topics/index.rst: Likewise.
* doc/index.rst: Likewise.
* doc/intro/index.rst: Likewise.
* doc/topics/index.rst: Likewise.
* doc/indices-and-tables.rst: New file.
2022-11-09 Martin Liska <mliska@suse.cz>
* Make-lang.in:
Support installation if sphinx-build is missing.
2022-11-09 Martin Liska <mliska@suse.cz>
* doc/internals/index.rst: Fix cross manual refs.
* doc/topics/contexts.rst: Likewise.
2022-11-09 Martin Liska <mliska@suse.cz>
* Make-lang.in: Support --with-sphinx-build.
2022-11-09 Martin Liska <mliska@suse.cz>
* Make-lang.in:
* docs/cp/index.rst: Moved to...
* doc/cp/index.rst: ...here.
* docs/cp/intro/index.rst: Moved to...
* doc/cp/intro/index.rst: ...here.
* docs/cp/intro/tutorial01.rst: Moved to...
* doc/cp/intro/tutorial01.rst: ...here.
* docs/cp/intro/tutorial02.rst: Moved to...
* doc/cp/intro/tutorial02.rst: ...here.
* docs/cp/intro/tutorial03.rst: Moved to...
* doc/cp/intro/tutorial03.rst: ...here.
* docs/cp/intro/tutorial04.rst: Moved to...
* doc/cp/intro/tutorial04.rst: ...here.
* docs/cp/topics/asm.rst: Moved to...
* doc/cp/topics/asm.rst: ...here.
* docs/cp/topics/compilation.rst: Moved to...
* doc/cp/topics/compilation.rst: ...here.
* docs/cp/topics/contexts.rst: Moved to...
* doc/cp/topics/contexts.rst: ...here.
* docs/cp/topics/expressions.rst: Moved to...
* doc/cp/topics/expressions.rst: ...here.
* docs/cp/topics/functions.rst: Moved to...
* doc/cp/topics/functions.rst: ...here.
* docs/cp/topics/index.rst: Moved to...
* doc/cp/topics/index.rst: ...here.
* docs/cp/topics/locations.rst: Moved to...
* doc/cp/topics/locations.rst: ...here.
* docs/cp/topics/objects.rst: Moved to...
* doc/cp/topics/objects.rst: ...here.
* docs/cp/topics/types.rst: Moved to...
* doc/cp/topics/types.rst: ...here.
* docs/examples/emit-alphabet.bf: Moved to...
* doc/examples/emit-alphabet.bf: ...here.
* docs/examples/tut01-hello-world.c: Moved to...
* doc/examples/tut01-hello-world.c: ...here.
* docs/examples/tut01-hello-world.cc: Moved to...
* doc/examples/tut01-hello-world.cc: ...here.
* docs/examples/tut02-square.c: Moved to...
* doc/examples/tut02-square.c: ...here.
* docs/examples/tut02-square.cc: Moved to...
* doc/examples/tut02-square.cc: ...here.
* docs/examples/tut03-sum-of-squares.c: Moved to...
* doc/examples/tut03-sum-of-squares.c: ...here.
* docs/examples/tut03-sum-of-squares.cc: Moved to...
* doc/examples/tut03-sum-of-squares.cc: ...here.
* docs/examples/tut04-toyvm/Makefile: Moved to...
* doc/examples/tut04-toyvm/Makefile: ...here.
* docs/examples/tut04-toyvm/factorial.toy: Moved to...
* doc/examples/tut04-toyvm/factorial.toy: ...here.
* docs/examples/tut04-toyvm/fibonacci.toy: Moved to...
* doc/examples/tut04-toyvm/fibonacci.toy: ...here.
* docs/examples/tut04-toyvm/toyvm.c: Moved to...
* doc/examples/tut04-toyvm/toyvm.c: ...here.
* docs/examples/tut04-toyvm/toyvm.cc: Moved to...
* doc/examples/tut04-toyvm/toyvm.cc: ...here.
* docs/examples/tut05-bf.c: Moved to...
* doc/examples/tut05-bf.c: ...here.
* docs/index.rst: Moved to...
* doc/index.rst: ...here.
* docs/internals/index.rst: Moved to...
* doc/internals/index.rst: ...here.
* docs/internals/test-hello-world.exe.log.txt: Moved to...
* doc/internals/test-hello-world.exe.log.txt: ...here.
* docs/_build/texinfo/libgccjit-figures/factorial.png: Moved to...
* doc/intro/factorial.png: ...here.
* docs/intro/index.rst: Moved to...
* doc/intro/index.rst: ...here.
* docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: Moved to...
* doc/intro/sum-of-squares.png: ...here.
* docs/intro/tutorial01.rst: Moved to...
* doc/intro/tutorial01.rst: ...here.
* docs/intro/tutorial02.rst: Moved to...
* doc/intro/tutorial02.rst: ...here.
* docs/intro/tutorial03.rst: Moved to...
* doc/intro/tutorial03.rst: ...here.
* docs/intro/tutorial04.rst: Moved to...
* doc/intro/tutorial04.rst: ...here.
* docs/intro/tutorial05.rst: Moved to...
* doc/intro/tutorial05.rst: ...here.
* docs/topics/asm.rst: Moved to...
* doc/topics/asm.rst: ...here.
* docs/topics/compatibility.rst: Moved to...
* doc/topics/compatibility.rst: ...here.
* docs/topics/compilation.rst: Moved to...
* doc/topics/compilation.rst: ...here.
* docs/topics/contexts.rst: Moved to...
* doc/topics/contexts.rst: ...here.
* docs/topics/expressions.rst: Moved to...
* doc/topics/expressions.rst: ...here.
* docs/topics/function-pointers.rst: Moved to...
* doc/topics/function-pointers.rst: ...here.
* docs/topics/functions.rst: Moved to...
* doc/topics/functions.rst: ...here.
* docs/topics/index.rst: Moved to...
* doc/topics/index.rst: ...here.
* docs/topics/locations.rst: Moved to...
* doc/topics/locations.rst: ...here.
* docs/topics/objects.rst: Moved to...
* doc/topics/objects.rst: ...here.
* docs/topics/performance.rst: Moved to...
* doc/topics/performance.rst: ...here.
* docs/topics/types.rst: Moved to...
* doc/topics/types.rst: ...here.
* docs/Makefile: Removed.
* docs/_build/texinfo/Makefile: Removed.
* docs/_build/texinfo/libgccjit-figures/factorial1.png: Removed.
* docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: Removed.
* docs/_build/texinfo/libgccjit.texi: Removed.
* docs/conf.py: Removed.
* docs/intro/factorial.png: Removed.
* docs/intro/sum-of-squares.png: Removed.
* doc/conf.py: New file.
2022-09-15 Richard Biener <rguenther@suse.de>
* dummy-frontend.cc (jit_langhook_init): Do not initialize
void_list_node.
2022-08-09 Vibhav Pant <vibhavp@gmail.com>
* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast): Move
definition out of comment.
2022-07-28 David Malcolm <dmalcolm@redhat.com>
* docs/internals/index.rst: Remove reference to ".c" extensions
of source files.
2022-07-28 Martin Liška <mliska@suse.cz>
* docs/cp/intro/tutorial02.rst:
Shorten the assembly example so that there is not slider.
* docs/cp/intro/tutorial04.rst: Likewise.
* docs/intro/tutorial02.rst: Likewise.
* docs/intro/tutorial04.rst: Likewise.
* docs/topics/contexts.rst: Likewise.
2022-07-28 marxin <mliska@suse.cz>
* docs/index.rst: Remove reference to module index
as we don't emit any.
2022-07-28 marxin <mliska@suse.cz>
* docs/cp/intro/tutorial02.rst: Use :expr:`type *` for pointers to a type
* docs/cp/topics/asm.rst: Likewise.
* docs/cp/topics/contexts.rst: Likewise.
* docs/cp/topics/expressions.rst: Likewise.
* docs/cp/topics/functions.rst: Likewise.
* docs/cp/topics/objects.rst: Likewise.
* docs/intro/tutorial02.rst: Likewise.
* docs/intro/tutorial03.rst: Likewise.
* docs/intro/tutorial04.rst: Likewise.
* docs/intro/tutorial05.rst: Likewise.
* docs/topics/compilation.rst: Likewise.
* docs/topics/contexts.rst: Likewise.
* docs/topics/objects.rst: Likewise.
2022-07-28 marxin <mliska@suse.cz>
* docs/cp/intro/tutorial04.rst: Use list-table.
* docs/intro/tutorial04.rst: Likewise.
* docs/intro/tutorial05.rst: Likewise.
* docs/topics/compilation.rst: Likewise.
* docs/topics/expressions.rst: Likewise.
* docs/topics/types.rst: Likewise.
2022-07-28 marxin <mliska@suse.cz>
* docs/cp/topics/expressions.rst: Compact so that the generated
output is also more compact.
2022-07-28 marxin <mliska@suse.cz>
* docs/cp/intro/tutorial02.rst: Use proper reference.
* docs/cp/topics/contexts.rst: Likewise.
* docs/cp/topics/functions.rst: Put `class` directive before a
function as it is not allowed declaring a class in a fn.
* docs/cp/topics/types.rst: Add template keyword.
* docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
Add removed comment used for code snippet ending detection.
* docs/intro/tutorial04.rst: Fix to match the real comment.
2022-07-28 marxin <mliska@suse.cz>
* docs/cp/topics/expressions.rst: Use :expr: for basic types.
* docs/topics/compilation.rst: Likewise.
* docs/topics/expressions.rst: Likewise.
* docs/topics/function-pointers.rst: Likewise.
2022-07-28 marxin <mliska@suse.cz>
* docs/conf.py: Add needs_sphinx = '3.0' where c:type was added.
* docs/index.rst: Remove note about it.
* docs/topics/compilation.rst: Use enum directive and reference.
* docs/topics/contexts.rst: Likewise.
* docs/topics/expressions.rst: Likewise.
* docs/topics/functions.rst: Likewise.
2022-07-14 Jonathan Wakely <jwakely@redhat.com>
* jit-recording.h (recording::memento): Define copy constructor
and copy assignment operator as deleted.
(recording::string): Likewise.
(recording::string::c_str): Add const qualifier.
2022-06-29 Antoni Boucher <bouanto@zoho.com>
PR jit/105812
* jit-playback.cc: Use the correct return type when folding in
as_truth_value.
2022-06-29 Sergei Trofimovich <siarheit@google.com>
PR c++/106102
* jit-playback.cc: Include <pthread.h> via "system.h" to avoid calloc()
poisoning.
* jit-recording.cc: Ditto.
* libgccjit.cc: Ditto.
2022-06-10 Antoni Boucher <bouanto@zoho.com>
PR jit/105829
* libgccjit.cc: Add support for floating-point types in
gcc_jit_type_get_size.
2022-06-08 Yang Yujie <yangyujie@loongson.cn>
* Make-lang.in: only link objects from $(EXTRA_GCC_OBJS)
that's not in $(EXTRA_OBJS) into libgccjit.
2022-05-23 David Malcolm <dmalcolm@redhat.com>
* jit-recording.h: Add "final" and "override" to all vfunc
implementations that were missing them, as appropriate.
2022-05-20 David Malcolm <dmalcolm@redhat.com>
* jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with
"final" and "override".
* jit-recording.cc: Likewise.
* jit-recording.h: Likewise.
2022-05-16 Martin Liska <mliska@suse.cz>
* jit-builtins.cc (find_builtin_by_name): Use ARRAY_SIZE.
(get_string_for_type_id): Likewise.
* jit-recording.cc (recording::context::context): Likewise.
2022-04-14 Iain Sandoe <iain@sandoe.co.uk>
* jit-playback.cc (new_bitcast): Cast values returned by tree_to_uhwi
to 'long' to match the print format.
2022-04-12 Antoni Boucher <bouanto@zoho.com>
PR jit/104293
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_24): New ABI tag.
* docs/topics/expressions.rst: Add documentation for the
functions gcc_jit_lvalue_set_alignment and
gcc_jit_lvalue_get_alignment.
* jit-playback.h: New function (set_alignment).
* jit-recording.cc: New function (set_alignment).
* jit-recording.h: New functions (set_alignment, get_alignment)
and new field (m_alignment).
* libgccjit.cc: New functions (gcc_jit_lvalue_get_alignment,
gcc_jit_lvalue_set_alignment)
* libgccjit.h: New functions (gcc_jit_lvalue_get_alignment,
gcc_jit_lvalue_set_alignment)
* libgccjit.map (LIBGCCJIT_ABI_24): New ABI tag.
2022-04-12 Antoni Boucher <bouanto@zoho.com>
PR jit/104073
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_23): New ABI tag.
* docs/topics/contexts.rst: Add documentation for the new
function gcc_jit_context_set_bool_print_errors_to_stderr.
* jit-common.h: New enum value
(INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR).
* jit-recording.cc: Handle the new option
INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR.
* libgccjit.cc: New function
(gcc_jit_context_set_bool_print_errors_to_stderr).
* libgccjit.h: New function
(gcc_jit_context_set_bool_print_errors_to_stderr).
* libgccjit.map (LIBGCCJIT_ABI_23): New ABI tag.
2022-04-12 Antoni Boucher <bouanto@zoho.com>
PR jit/104072
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_22): New ABI tag.
* docs/topics/expressions.rst: Add documentation for the
function gcc_jit_lvalue_set_register_name.
* jit-playback.h: New function (set_register_name).
* jit-recording.cc: New function (set_register_name) and add
support for register variables.
* jit-recording.h: New field (m_reg_name) and new function
(set_register_name).
* libgccjit.cc: New function (gcc_jit_lvalue_set_register_name).
* libgccjit.h: New function (gcc_jit_lvalue_set_register_name).
* libgccjit.map (LIBGCCJIT_ABI_22): New ABI tag.
2022-04-12 Antoni Boucher <bouanto@zoho.com>
PR jit/104071
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_21): New ABI tag.
* docs/topics/expressions.rst: Add documentation for the
function gcc_jit_context_new_bitcast.
* jit-playback.cc: New function (new_bitcast).
* jit-playback.h: New function (new_bitcast).
* jit-recording.cc: New functions (new_bitcast,
bitcast::replay_into, bitcast::visit_children,
bitcast::make_debug_string, bitcast::write_reproducer).
* jit-recording.h: New class (bitcast) and new function
(new_bitcast, bitcast::replay_into, bitcast::visit_children,
bitcast::make_debug_string, bitcast::write_reproducer,
bitcast::get_precedence).
* libgccjit.cc: New function (gcc_jit_context_new_bitcast)
* libgccjit.h: New function (gcc_jit_context_new_bitcast)
* libgccjit.map (LIBGCCJIT_ABI_21): New ABI tag.
2022-04-12 Antoni Boucher <bouanto@zoho.com>
PR target/95325
* docs/_build/texinfo/libgccjit.texi: Regenerate
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_20): New ABI tag.
* docs/topics/types.rst: Add documentation for the new types
GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T,
GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T and
new functions (gcc_jit_compatible_types, gcc_jit_type_get_size).
* jit-builtins.cc: Add support for BT_UINT128.
* jit-common.h: Update the value of NUM_GCC_JIT_TYPES.
* jit-playback.cc: Add support for the sized integer types.
* jit-recording.cc: Add support for the sized integer types.
* jit-recording.h: Add support for comparing integer types
and new function (is_signed).
* libgccjit.cc (gcc_jit_compatible_types): New.
(gcc_jit_type_get_size) New.
* libgccjit.h: New enum variants for gcc_jit_types
(GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T,
GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T,
GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T) and new functions
(gcc_jit_compatible_types, gcc_jit_type_get_size).
* libgccjit.map (LIBGCCJIT_ABI_20): New ABI tag.
2022-04-06 David Malcolm <dmalcolm@redhat.com>
PR jit/102824
* docs/_build/texinfo/factorial.png: Move to...
* docs/_build/texinfo/libgccjit-figures/factorial.png: ...here.
* docs/_build/texinfo/factorial1.png: Move to...
* docs/_build/texinfo/libgccjit-figures/factorial1.png: ...here.
* docs/_build/texinfo/sum-of-squares.png: Move to...
* docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: ...here.
* docs/_build/texinfo/sum-of-squares1.png: Move to...
* docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: ...here.
2022-04-01 David Malcolm <dmalcolm@redhat.com>
* docs/topics/expressions.rst: Fix formatting.
* docs/topics/types.rst: Likewise.
* docs/_build/texinfo/libgccjit.texi: Regenerate
2022-04-01 Petter Tomner <tomner@kth.se>
* docs/topics/compatibility.rst: Add 19 tag
* docs/topics/compilation.rst: Linking
* docs/topics/contexts.rst: Linking example
* docs/topics/expressions.rst: Fix formatting and dropped 's'
2022-03-07 Jakub Jelinek <jakub@redhat.com>
* libgccjit.h: Fix up duplicated word issue in a comment.
2022-01-17 Martin Liska <mliska@suse.cz>
* config-lang.in: Rename .c names to .cc.
* docs/_build/texinfo/libgccjit.texi: Likewise.
* docs/internals/index.rst: Likewise.
* jit-builtins.cc (builtins_manager::make_builtin_function): Likewise.
* jit-playback.cc (fold_const_var): Likewise.
(playback::context::~context): Likewise.
(new_field): Likewise.
(new_bitfield): Likewise.
(new_compound_type): Likewise.
(playback::compound_type::set_fields): Likewise.
(global_set_init_rvalue): Likewise.
(load_blob_in_ctor): Likewise.
(new_global_initialized): Likewise.
(double>): Likewise.
(new_string_literal): Likewise.
(as_truth_value): Likewise.
(build_call): Likewise.
(playback::context::build_cast): Likewise.
(new_array_access): Likewise.
(new_field_access): Likewise.
(dereference): Likewise.
(postprocess): Likewise.
(add_jump): Likewise.
(add_switch): Likewise.
(build_goto_operands): Likewise.
(playback::context::read_dump_file): Likewise.
(init_types): Likewise.
* jit-recording.cc (recording::context::get_int_type): Likewise.
* jit-recording.h: Likewise.
* libgccjit.cc (compatible_types): Likewise.
(gcc_jit_context_acquire): Likewise.
(gcc_jit_context_release): Likewise.
(gcc_jit_context_new_child_context): Likewise.
(gcc_jit_type_as_object): Likewise.
(gcc_jit_context_get_type): Likewise.
(gcc_jit_context_get_int_type): Likewise.
(gcc_jit_type_get_pointer): Likewise.
(gcc_jit_type_get_const): Likewise.
(gcc_jit_type_get_volatile): Likewise.
(gcc_jit_type_dyncast_array): Likewise.
(gcc_jit_type_is_bool): Likewise.
(gcc_jit_type_is_pointer): Likewise.
(gcc_jit_type_is_integral): Likewise.
(gcc_jit_type_dyncast_vector): Likewise.
(gcc_jit_type_is_struct): Likewise.
(gcc_jit_vector_type_get_num_units): Likewise.
(gcc_jit_vector_type_get_element_type): Likewise.
(gcc_jit_type_unqualified): Likewise.
(gcc_jit_type_dyncast_function_ptr_type): Likewise.
(gcc_jit_function_type_get_return_type): Likewise.
(gcc_jit_function_type_get_param_count): Likewise.
(gcc_jit_function_type_get_param_type): Likewise.
(gcc_jit_context_new_array_type): Likewise.
(gcc_jit_context_new_field): Likewise.
(gcc_jit_field_as_object): Likewise.
(gcc_jit_context_new_struct_type): Likewise.
(gcc_jit_struct_as_type): Likewise.
(gcc_jit_struct_set_fields): Likewise.
(gcc_jit_struct_get_field_count): Likewise.
(gcc_jit_context_new_union_type): Likewise.
(gcc_jit_context_new_function_ptr_type): Likewise.
(gcc_jit_param_as_rvalue): Likewise.
(gcc_jit_context_new_function): Likewise.
(gcc_jit_function_get_return_type): Likewise.
(gcc_jit_function_dump_to_dot): Likewise.
(gcc_jit_block_get_function): Likewise.
(gcc_jit_global_set_initializer_rvalue): Likewise.
(gcc_jit_rvalue_get_type): Likewise.
(gcc_jit_context_new_rvalue_from_int): Likewise.
(gcc_jit_context_one): Likewise.
(gcc_jit_context_new_rvalue_from_double): Likewise.
(gcc_jit_context_null): Likewise.
(gcc_jit_context_new_string_literal): Likewise.
(valid_binary_op_p): Likewise.
(gcc_jit_context_new_binary_op): Likewise.
(gcc_jit_context_new_comparison): Likewise.
(gcc_jit_context_new_call): Likewise.
(is_valid_cast): Likewise.
(gcc_jit_context_new_cast): Likewise.
(gcc_jit_object_get_context): Likewise.
(gcc_jit_object_get_debug_string): Likewise.
(gcc_jit_lvalue_access_field): Likewise.
(gcc_jit_rvalue_access_field): Likewise.
(gcc_jit_rvalue_dereference_field): Likewise.
(gcc_jit_rvalue_dereference): Likewise.
(gcc_jit_lvalue_get_address): Likewise.
(gcc_jit_lvalue_set_tls_model): Likewise.
(gcc_jit_lvalue_set_link_section): Likewise.
(gcc_jit_function_new_local): Likewise.
(gcc_jit_block_add_eval): Likewise.
(gcc_jit_block_add_assignment): Likewise.
(is_bool): Likewise.
(gcc_jit_block_end_with_conditional): Likewise.
(gcc_jit_block_add_comment): Likewise.
(gcc_jit_block_end_with_jump): Likewise.
(gcc_jit_block_end_with_return): Likewise.
(gcc_jit_block_end_with_void_return): Likewise.
(case_range_validator::case_range_validator): Likewise.
(case_range_validator::validate): Likewise.
(case_range_validator::get_wide_int): Likewise.
(gcc_jit_block_end_with_switch): Likewise.
(gcc_jit_context_set_str_option): Likewise.
(gcc_jit_context_set_int_option): Likewise.
(gcc_jit_context_set_bool_option): Likewise.
(gcc_jit_context_set_bool_allow_unreachable_blocks): Likewise.
(gcc_jit_context_set_bool_use_external_driver): Likewise.
(gcc_jit_context_add_command_line_option): Likewise.
(gcc_jit_context_add_driver_option): Likewise.
(gcc_jit_context_enable_dump): Likewise.
(gcc_jit_context_compile): Likewise.
(gcc_jit_context_compile_to_file): Likewise.
(gcc_jit_context_set_logfile): Likewise.
(gcc_jit_context_dump_reproducer_to_file): Likewise.
(gcc_jit_context_get_first_error): Likewise.
(gcc_jit_context_get_last_error): Likewise.
(gcc_jit_result_get_code): Likewise.
(gcc_jit_result_get_global): Likewise.
(gcc_jit_rvalue_set_bool_require_tail_call): Likewise.
(gcc_jit_type_get_aligned): Likewise.
(gcc_jit_type_get_vector): Likewise.
(gcc_jit_function_get_address): Likewise.
(gcc_jit_version_patchlevel): Likewise.
(gcc_jit_block_add_extended_asm): Likewise.
(gcc_jit_extended_asm_as_object): Likewise.
(gcc_jit_extended_asm_set_volatile_flag): Likewise.
(gcc_jit_extended_asm_set_inline_flag): Likewise.
(gcc_jit_extended_asm_add_output_operand): Likewise.
(gcc_jit_extended_asm_add_input_operand): Likewise.
(gcc_jit_extended_asm_add_clobber): Likewise.
* notes.txt: Likewise.
2022-01-17 Martin Liska <mliska@suse.cz>
* dummy-frontend.c: Moved to...
* dummy-frontend.cc: ...here.
* jit-builtins.c: Moved to...
* jit-builtins.cc: ...here.
* jit-logging.c: Moved to...
* jit-logging.cc: ...here.
* jit-playback.c: Moved to...
* jit-playback.cc: ...here.
* jit-recording.c: Moved to...
* jit-recording.cc: ...here.
* jit-result.c: Moved to...
* jit-result.cc: ...here.
* jit-spec.c: Moved to...
* jit-spec.cc: ...here.
* jit-tempdir.c: Moved to...
* jit-tempdir.cc: ...here.
* jit-w32.c: Moved to...
* jit-w32.cc: ...here.
* libgccjit.c: Moved to...
* libgccjit.cc: ...here.
2021-12-28 Martin Liska <mliska@suse.cz>
* docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
* docs/cp/index.rst: Likewise.
* docs/cp/intro/index.rst: Likewise.
* docs/cp/intro/tutorial01.rst: Likewise.
* docs/cp/intro/tutorial02.rst: Likewise.
* docs/cp/intro/tutorial03.rst: Likewise.
* docs/cp/intro/tutorial04.rst: Likewise.
* docs/cp/topics/asm.rst: Likewise.
* docs/cp/topics/compilation.rst: Likewise.
* docs/cp/topics/contexts.rst: Likewise.
* docs/cp/topics/expressions.rst: Likewise.
* docs/cp/topics/functions.rst: Likewise.
* docs/cp/topics/index.rst: Likewise.
* docs/cp/topics/locations.rst: Likewise.
* docs/cp/topics/objects.rst: Likewise.
* docs/cp/topics/types.rst: Likewise.
* docs/index.rst: Likewise.
* docs/internals/index.rst: Likewise.
* docs/intro/index.rst: Likewise.
* docs/intro/tutorial01.rst: Likewise.
* docs/intro/tutorial02.rst: Likewise.
* docs/intro/tutorial03.rst: Likewise.
* docs/intro/tutorial04.rst: Likewise.
* docs/intro/tutorial05.rst: Likewise.
* docs/topics/asm.rst: Likewise.
* docs/topics/compatibility.rst: Likewise.
* docs/topics/compilation.rst: Likewise.
* docs/topics/contexts.rst: Likewise.
* docs/topics/expressions.rst: Likewise.
* docs/topics/function-pointers.rst: Likewise.
* docs/topics/functions.rst: Likewise.
* docs/topics/index.rst: Likewise.
* docs/topics/locations.rst: Likewise.
* docs/topics/objects.rst: Likewise.
* docs/topics/performance.rst: Likewise.
* docs/topics/types.rst: Likewise.
2021-12-20 Martin Liska <mliska@suse.cz>
* libgccjit.c (struct version_info): Rename to jit_version_info.
(struct jit_version_info): Likewise.
(gcc_jit_version_major): Likewise.
(gcc_jit_version_minor): Likewise.
(gcc_jit_version_patchlevel): Likewise.
2021-12-14 Petter Tomner <tomner@kth.se>
* jit-common.h: New enum
* jit-playback.c : Folding an setting intitial
(global_new_decl) : Handle const global generation
(new_global) : New flag
(global_set_init_rvalue) : New
(new_ctor) : New
(new_global_initialized) : Flag
(as_truth_value) : Fold
(new_unary_op) : Fold
(new_binary_op) : Fold
(new_comparison) : Fold
(new_array_access) : Fold
(new_dereference) : Fold
(get_address) : Fold
* jit-playback.h :
(global_set_init_rvalue) : New
(new_ctor) : New
* jit-recording.c :
* jit-recording.h :
(new_global_init_rvalue) : New
(new_ctor) : New
(ctor) : New, inherits rvalue
(global_init_rvalue) : New, inherits memento
(type::is_union) : New
* libgccjit++.h : New entrypoints, see C-header
* libgccjit.c : See .h
* libgccjit.h : New entrypoints
(gcc_jit_context_new_array_constructor) : New
(gcc_jit_context_new_struct_constructor) : New
(gcc_jit_context_new_union_constructor) : New
(gcc_jit_global_set_initializer_rvalue) : New
(LIBGCCJIT_HAVE_CTORS) : New feuture macro
* libgccjit.map : New entrypoints added to ABI 19
* docs/topics/expressions.rst : Updated docs
2021-12-12 Antoni Boucher <bouanto@zoho.com>
PR target/100688
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
tag.
* docs/topics/expressions.rst: Add documentation for the
function gcc_jit_lvalue_set_link_section.
* jit-playback.h: New function (set_link_section).
* jit-recording.c: New function (set_link_section) and
support for setting the link section.
* jit-recording.h: New function (set_link_section) and new
field m_link_section.
* libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
* libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
* libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.
2021-12-12 Antoni Boucher <bouanto@zoho.com>
PR target/95415
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI
tag.
* docs/topics/expressions.rst: Add document for the function
gcc_jit_lvalue_set_tls_model.
* jit-playback.h: New function (set_tls_model).
* jit-recording.c: New function (set_tls_model), new
variables (tls_models and tls_model_enum_strings) and support
for setting the tls model.
* jit-recording.h: New function (set_tls_model) and new
field m_tls_model.
* libgccjit.c: New function (gcc_jit_lvalue_set_tls_model).
* libgccjit.h: New function (gcc_jit_lvalue_set_tls_model)
and new enum (gcc_jit_tls_model).
* libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag.
2021-12-11 Antoni Boucher <bouanto@zoho.com>
PR target/96066
PR target/96067
* jit-builtins.c: Implement missing types for builtins.
* jit-recording.c:: Allow sending a volatile const void * as
argument.
* jit-recording.h: New functions (is_volatile, is_const) and
allow comparing qualified types.
2021-12-10 David Malcolm <dmalcolm@redhat.com>
PR jit/103562
* jit-playback.c (gcc::jit::playback::context::new_function): Set
DECL_CONTEXT of the result_decl.
2021-11-27 Petter Tomner <tomner@kth.se>
* libgccjit.c: %ld -> %zu
2021-11-24 Martin Liska <mliska@suse.cz>
* jit-playback.c (function): Initialize m_blocks vector.
2021-11-20 Antoni Boucher <bouanto@zoho.com>
PR target/96889
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_16): New ABI tag.
* docs/topics/functions.rst: Add documentation for the
functions gcc_jit_function_get_return_type and
gcc_jit_function_get_param_count
* docs/topics/types.rst: Add documentation for the functions
gcc_jit_function_type_get_return_type,
gcc_jit_function_type_get_param_count,
gcc_jit_function_type_get_param_type,
gcc_jit_type_unqualified, gcc_jit_type_dyncast_array,
gcc_jit_type_is_bool,
gcc_jit_type_dyncast_function_ptr_type,
gcc_jit_type_is_integral, gcc_jit_type_is_pointer,
gcc_jit_type_dyncast_vector,
gcc_jit_vector_type_get_element_type,
gcc_jit_vector_type_get_num_units,
gcc_jit_struct_get_field, gcc_jit_type_is_struct,
and gcc_jit_struct_get_field_count
* libgccjit.c:
(gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
gcc_jit_function_type_get_return_type,
gcc_jit_function_type_get_param_count,
gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
gcc_jit_vector_type_get_element_type,
gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
functions.
(struct gcc_jit_function_type, struct gcc_jit_vector_type):
New types.
* libgccjit.h:
(gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
gcc_jit_function_type_get_return_type,
gcc_jit_function_type_get_param_count,
gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
gcc_jit_vector_type_get_element_type,
gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
function declarations.
(struct gcc_jit_function_type, struct gcc_jit_vector_type):
New types.
* jit-recording.h: New functions (is_struct and is_vector)
* libgccjit.map (LIBGCCJIT_ABI_16): New ABI tag.
2021-11-12 David Malcolm <dmalcolm@redhat.com>
PR jit/103199
* docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
Increase size of buffer.
* docs/examples/tut04-toyvm/toyvm.cc
(compilation_state::create_function): Likewise.
2021-09-10 Petter Tomner <tomner@kth.se>
* jit-playback.c: Moved global var processing to after loc handling.
Setting TYPE_NAME for fundamental types.
Using common functions for finalizing globals.
* jit-playback.h: New method init_types().
Changed get_tree_node_for_type() to method.
2021-08-19 Iain Sandoe <iain@sandoe.co.uk>
* docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
* docs/examples/tut04-toyvm/toyvm.cc: Likewise.
* jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
patched for this application.
2021-08-18 Iain Sandoe <iain@sandoe.co.uk>
PR jit/100613
* Make-lang.in: Provide clauses for Darwin hosts.
2021-07-18 Antoni Boucher <bouanto@zoho.com>
PR target/95498
* jit-playback.c (convert): Add support to handle truncation and
extension in the convert function.
2021-05-19 Martin Liska <mliska@suse.cz>
PR testsuite/100658
* libgccjit.c (gcc_jit_context_new_function): Fix typos.
2021-03-24 Matthias Klose <doko@ubuntu.com>
* Make-lang.in (jit.sphinx.html, jit.sphinx.pdf): Use $(mkinstalldirs),
(jit.install-headers): Depend on installdirs.
2021-02-19 David Malcolm <dmalcolm@redhat.com>
PR jit/99126
* jit-builtins.c
(gcc::jit::builtins_manager::get_builtin_function_by_id):
Update assertion to reject BUILT_IN_NONE.
(gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
New.
* jit-builtins.h
(gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
New decl.
* jit-playback.c (gcc::jit::playback::context::replay): Call it.
Remove redundant conditional on bm.
2021-01-14 David Malcolm <dmalcolm@redhat.com>
* docs/cp/index.rst: Remove "Alpha" warning.
* docs/index.rst: Likewise.
* docs/_build/texinfo/libgccjit.texi: Regenerate
2020-11-25 Martin Sebor <msebor@redhat.com>
PR bootstrap/94982
* jit-recording.c (recording::function::dump_to_dot): Avoid
-Wformat-diag.
(recording::block::dump_to_dot): Same.
2020-11-20 Jakub Jelinek <jakub@redhat.com>
PR other/97911
* Make-lang.in (jit.serial): Change from goal to a
variable.
(.PHONY): Drop jit.serial and jit.prev.
($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
jit.serial.
2020-11-18 Jakub Jelinek <jakub@redhat.com>
* Make-lang.in (jit.serial): New goal.
(.PHONY): Add jit.serial jit.prev.
($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS.
2020-11-12 David Malcolm <dmalcolm@redhat.com>
PR jit/87291
* docs/cp/topics/asm.rst: New file.
* docs/cp/topics/index.rst (Topic Reference): Add it.
* docs/topics/asm.rst: New file.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_15): New.
* docs/topics/functions.rst (Statements): Add link to extended
asm.
* docs/topics/index.rst (Topic Reference): Add asm.rst.
* docs/topics/objects.rst: Add gcc_jit_extended_asm to ASCII art.
* docs/_build/texinfo/Makefile: Regenerate.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (gcc::jit::recording::extended_asm): New forward
decl.
(gcc::jit::recording::top_level_asm): Likewise.
* jit-playback.c: Include "stmt.h".
(build_string): New.
(gcc::jit::playback::context::new_string_literal): Disambiguate
build_string call.
(gcc::jit::playback::context::add_top_level_asm): New.
(build_operand_chain): New.
(build_clobbers): New.
(build_goto_operands): New.
(gcc::jit::playback::block::add_extended_asm): New.
* jit-playback.h (gcc::jit::playback::context::add_top_level_asm):
New decl.
(struct gcc::jit::playback::asm_operand): New struct.
(gcc::jit::playback::block::add_extended_asm): New decl.
* jit-recording.c (gcc::jit::recording::context::dump_to_file):
Dump top-level asms.
(gcc::jit::recording::context::add_top_level_asm): New.
(gcc::jit::recording::block::add_extended_asm): New.
(gcc::jit::recording::block::end_with_extended_asm_goto): New.
(gcc::jit::recording::asm_operand::asm_operand): New.
(gcc::jit::recording::asm_operand::print): New.
(gcc::jit::recording::asm_operand::make_debug_string): New.
(gcc::jit::recording::output_asm_operand::write_reproducer): New.
(gcc::jit::recording::output_asm_operand::print): New.
(gcc::jit::recording::input_asm_operand::write_reproducer): New.
(gcc::jit::recording::input_asm_operand::print): New.
(gcc::jit::recording::extended_asm::add_output_operand): New.
(gcc::jit::recording::extended_asm::add_input_operand): New.
(gcc::jit::recording::extended_asm::add_clobber): New.
(gcc::jit::recording::extended_asm::replay_into): New.
(gcc::jit::recording::extended_asm::make_debug_string): New.
(gcc::jit::recording::extended_asm::write_flags): New.
(gcc::jit::recording::extended_asm::write_clobbers): New.
(gcc::jit::recording::extended_asm_simple::write_reproducer): New.
(gcc::jit::recording::extended_asm::maybe_populate_playback_blocks):
New.
(gcc::jit::recording::extended_asm_goto::extended_asm_goto): New.
(gcc::jit::recording::extended_asm_goto::replay_into): New.
(gcc::jit::recording::extended_asm_goto::write_reproducer): New.
(gcc::jit::recording::extended_asm_goto::get_successor_blocks):
New.
(gcc::jit::recording::extended_asm_goto::maybe_print_gotos): New.
(gcc::jit::recording::extended_asm_goto::maybe_populate_playback_blocks):
New.
(gcc::jit::recording::top_level_asm::top_level_asm): New.
(gcc::jit::recording::top_level_asm::replay_into): New.
(gcc::jit::recording::top_level_asm::make_debug_string): New.
(gcc::jit::recording::top_level_asm::write_to_dump): New.
(gcc::jit::recording::top_level_asm::write_reproducer): New.
* jit-recording.h
(gcc::jit::recording::context::add_top_level_asm): New decl.
(gcc::jit::recording::context::m_top_level_asms): New field.
(gcc::jit::recording::block::add_extended_asm): New decl.
(gcc::jit::recording::block::end_with_extended_asm_goto): New
decl.
(gcc::jit::recording::asm_operand): New class.
(gcc::jit::recording::output_asm_operand): New class.
(gcc::jit::recording::input_asm_operand): New class.
(gcc::jit::recording::extended_asm): New class.
(gcc::jit::recording::extended_asm_simple): New class.
(gcc::jit::recording::extended_asm_goto): New class.
(gcc::jit::recording::top_level_asm): New class.
* libgccjit++.h (gccjit::extended_asm): New forward decl.
(gccjit::context::add_top_level_asm): New.
(gccjit::block::add_extended_asm): New.
(gccjit::block::end_with_extended_asm_goto): New.
(gccjit::extended_asm): New class.
(gccjit::extended_asm::extended_asm): New ctors.
(gccjit::extended_asm::set_volatile_flag): New.
(gccjit::extended_asm::set_inline_flag): New.
(gccjit::extended_asm::add_output_operand): New.
(gccjit::extended_asm::add_input_operand): New.
(gccjit::extended_asm::add_clobber): New.
(gccjit::extended_asm::get_inner_extended_asm): New.
* libgccjit.c (struct gcc_jit_extended_asm): New.
(jit_error): Make "loc" param take a gcc::jit::recording::location *
rather than a gcc_jit_location *.
(gcc_jit_block_add_extended_asm): New entrypoint.
(gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
(gcc_jit_extended_asm_as_object): New entrypoint.
(gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
(gcc_jit_extended_asm_set_inline_flag): New entrypoint.
(gcc_jit_extended_asm_add_output_operand): New entrypoint.
(gcc_jit_extended_asm_add_clobber): New entrypoint.
(gcc_jit_context_add_top_level_asm): New entrypoint.
* libgccjit.h: Add gcc_jit_extended_asm to ASCII art.
(gcc_jit_extended_asm): New typedef.
(LIBGCCJIT_HAVE_ASM_STATEMENTS): New define.
(gcc_jit_block_add_extended_asm): New entrypoint.
(gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
(gcc_jit_extended_asm_as_object): New entrypoint.
(gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
(gcc_jit_extended_asm_set_inline_flag): New entrypoint.
(gcc_jit_extended_asm_add_output_operand): New entrypoint.
(gcc_jit_extended_asm_add_input_operand): New entrypoint.
(gcc_jit_extended_asm_add_clobber): New entrypoint.
(gcc_jit_context_add_top_level_asm): New entrypoint.
* libgccjit.map (LIBGCCJIT_ABI_15): New.
2020-11-12 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c (recording::context::new_string): Add "escaped"
param and use it when creating the new recording::string instance.
(recording::string::string): Add "escaped" param and use it to
initialize m_escaped.
(recording::string::make_debug_string): Replace check that first
char is double-quote with use of m_escaped. Fix escaping of
'\t' and '\n'. Set "escaped" on the result.
* jit-recording.h (recording::context::new_string): Add "escaped"
param.
(recording::string::string): Add "escaped" param.
(recording::string::m_escaped): New field.
2020-11-12 David Malcolm <dmalcolm@redhat.com>
* libgccjit.h: Fix typo in comment.
2020-09-14 Andrea Corallo <andrea.corallo@arm.com>
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2020-09-11 Andrea Corallo <andrea.corallo@arm.com>
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_14): New ABI tag.
* docs/topics/expressions.rst (gcc_jit_global_set_initializer):
Document new entry point in section 'Global variables'.
* jit-playback.c (global_new_decl, global_finalize_lvalue): New
method.
(playback::context::new_global): Make use of global_new_decl,
global_finalize_lvalue.
(load_blob_in_ctor): New template function in use by the
following.
(playback::context::new_global_initialized): New method.
* jit-playback.h (class context): Decl 'new_global_initialized',
'global_new_decl', 'global_finalize_lvalue'.
(lvalue::set_initializer): Add implementation.
* jit-recording.c (recording::memento_of_get_pointer::get_size)
(recording::memento_of_get_type::get_size): Add implementation.
(recording::global::write_initializer_reproducer): New function in
use by 'recording::global::write_reproducer'.
(recording::global::replay_into)
(recording::global::write_to_dump)
(recording::global::write_reproducer): Handle
initialized case.
* jit-recording.h (class type): Decl 'get_size' and
'num_elements'.
* libgccjit++.h (class lvalue): Declare new 'set_initializer'
method.
(class lvalue): Decl 'is_global' and 'set_initializer'.
(class global) Decl 'write_initializer_reproducer'. Add
'm_initializer', 'm_initializer_num_bytes' fields. Implement
'set_initializer'. Add a destructor to free 'm_initializer'.
* libgccjit.c (gcc_jit_global_set_initializer): New function.
* libgccjit.h (gcc_jit_global_set_initializer): New function
declaration.
* libgccjit.map (LIBGCCJIT_ABI_14): New ABI tag.
2020-08-28 Martin Sebor <msebor@redhat.com>
* jit-recording.c (recording::switch_::make_debug_string): Add argument
to a call.
2020-08-22 Andrea Corallo <andrea.corallo@arm.com>
* libgccjit.c:
(gcc_jit_context_new_rvalue_from_int)
(gcc_jit_context_new_rvalue_from_long)
(gcc_jit_context_new_rvalue_from_double)
(gcc_jit_context_new_rvalue_from_ptr): Update function heading
comments.
2020-06-16 Nicolas Bértolo <nicolasbertolo@gmail.com>
* Make-lang.in: Always define version, minor and release
numbers. Create the Windows shared library as
libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
2020-06-03 David Malcolm <dmalcolm@redhat.com>
PR jit/95306
* jit-builtins.c (builtins_manager::make_primitive_type):
Implement BT_CONST_VOLATILE_PTR.
2020-06-02 David Malcolm <dmalcolm@redhat.com>
PR jit/95426
* dummy-frontend.c: Include "options.h", "stringpool.h", and
"attribs.h".
(ATTR_EXCL): New, copied from lto/lto-lang.c.
(attr_noreturn_exclusions): Likewise.
(attr_returns_twice_exclusions): Likewise.
(attr_const_pure_exclusions): Likewise.
(jit_attribute_table): Likewise, copied from lto_attribute_table.
(jit_format_attribute_table): Likewise, copied from
lto_format_attribute_table.
(handle_noreturn_attribute): New, copied from lto/lto-lang.c.
(handle_leaf_attribute): Likewise.
(handle_const_attribute): Likewise.
(handle_malloc_attribute): Likewise.
(handle_pure_attribute): Likewise.
(handle_novops_attribute): Likewise.
(get_nonnull_operand): Likewise.
(handle_nonnull_attribute): Likewise.
(handle_nothrow_attribute): Likewise.
(handle_sentinel_attribute): Likewise.
(handle_type_generic_attribute): Likewise.
(handle_transaction_pure_attribute): Likewise.
(handle_returns_twice_attribute): Likewise.
(handle_patchable_function_entry_attribute): Likewise.
(ignore_attribute): Likewise.
(handle_format_attribute): Likewise.
(handle_format_arg_attribute): Likewise.
(handle_fnspec_attribute): Likewise.
(LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
(LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
* Make-lang.in: Remove extra slash. Build libgccjit.dll and its
import library in Windows.
* config-lang.in: Update comment about --enable-host-shared.
* jit-w32.h: New file.
* jit-w32.c: New file.
(print_last_error): New function that prints the error
string corresponding to GetLastError().
(get_TOKEN_USER_current_user): Helper function used for getting
the SID belonging to the current user.
(create_directory_for_current_user): Helper function to create
a directory with permissions such that only the current user can
access it.
(win_mkdtemp): Create a temporary directory using Windows APIs.
* jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
FreeLibrary and GetProcAddress instead of libdl.
* jit-result.h, jit-result.c: Introduce result::handle_t to
abstract over the types used for dynamic library handles.
* jit-tempdir.c: Do not use mkdtemp() in Windows, use
win_mkdtemp().
2020-05-27 David Malcolm <dmalcolm@redhat.com>
PR jit/95314
* dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
* jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
TREE_VISITED.
2020-05-27 Tom Tromey <tromey@gcc.gnu.org>
PR jit/91330
* docs/conf.py (texinfo_documents): Set description.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2020-05-26 David Malcolm <dmalcolm@redhat.com>
PR jit/95306
* docs/topics/functions.rst
(gcc_jit_context_get_builtin_function): Document.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* dummy-frontend.c (jit_langhook_global_bindings_p): Remove
gcc_unreachable.
* jit-builtins.c (type_names): New array.
(get_string_for_type_id): New function.
(gcc::jit::builtins_manager::make_primitive_type): Show name of
type in error messages. Update cases to reflect the order in
builtin-types.def. Implement cases for BT_INT8, BT_INT16,
BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
2020-05-26 David Malcolm <dmalcolm@redhat.com>
* docs/topics/compatibility.rst: Fix underline.
Fix missing labels.
* docs/topics/types.rst: Fix missing blank line.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2020-05-26 David Malcolm <dmalcolm@redhat.com>
PR jit/95296
* docs/topics/expressions.rst (Unary Operations): Document that
result_type of gcc_jit_context_new_unary_op must be a numeric type.
(Binary Operations): Likewise for gcc_jit_context_new_binary_op.
(Global variables): Document that "type" of
gcc_jit_context_new_global must be non-`void`.
* docs/topics/function-pointers.rst
(gcc_jit_context_new_function_ptr_type): Document that the
param_types must be non-void, but that return_type may be.
* docs/topics/functions.rst (Params): Document that
gcc_jit_context_new_param's type must be non-void.
(Functions): Likewise for gcc_jit_function_new_local.
* docs/topics/types.rst (gcc_jit_context_new_array_type): Document
that the type must be non-void.
(gcc_jit_context_new_field): Likewise.
* docs/_build/texinfo/Makefile: Regenerate.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* libgccjit.c (gcc_jit_context_new_array_type): Fail if
element_type is void.
(gcc_jit_context_new_field): Likewise for "type".
(gcc_jit_context_new_function_ptr_type): Likewise for each
element of param_types.
(gcc_jit_context_new_param): Likewise for "type".
(gcc_jit_context_new_global): Likewise.
(gcc_jit_function_new_local): Likewise.
(gcc_jit_type_get_aligned): Likewise.
2020-03-31 Andrea Corallo <andrea.corallo@arm.com>
David Malcolm <dmalcolm@redhat.com>
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
plus add version paragraph.
* libgccjit++.h (namespace gccjit::version): Add new namespace.
* libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
(gcc_jit_version_patchlevel): New functions.
* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
(gcc_jit_version_major, gcc_jit_version_minor)
(gcc_jit_version_patchlevel): New functions.
* libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
2020-03-23 Andrea Corallo <andrea.corallo@arm.com>
* jit-playback.h
(gcc::jit::playback::context m_recording_ctxt): Remove
m_char_array_type_node field.
* jit-playback.c
(playback::context::context) Remove m_char_array_type_node from member
initializer list.
(playback::context::new_string_literal) Fix logic to handle string
length > 200.
2020-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2019-11-29 Julian Brown <julian@codesourcery.com>
* jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
Remove commented-out cases.
2019-11-20 David Malcolm <dmalcolm@redhat.com>
PR jit/92483
* jit-playback.c (gcc::jit::playback::context::make_fake_args):
Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/91421
* jit-playback.c (new_function): Use set_decl_built_in_function.
2019-07-22 Andrea Corallo <andrea.corallo@arm.com>
* jit-recording.c (unary_op_reproducer_strings): Make it extern.
(binary_op_reproducer_strings): Likewise.
* jit-recording.h (unary_op_reproducer_strings): Likewise.
(binary_op_reproducer_strings): Likewise.
* libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
numeric type.
* libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
* libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
numeric type.
2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
* docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
* jit-common.h (namespace recording): Add class bitfield.
* jit-playback.c:
(DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
(playback::context::new_bitfield): New method.
(playback::compound_type::set_fields): Add bitfield support.
(playback::lvalue::mark_addressable): Was jit_mark_addressable make this
a method of lvalue plus return a bool to communicate success.
(playback::lvalue::get_address): Check for jit_mark_addressable return
value.
* jit-playback.h (new_bitfield): New method.
(class bitfield): New class.
(class lvalue): Add jit_mark_addressable method.
* jit-recording.c (recording::context::new_bitfield): New method.
(recording::bitfield::replay_into): New method.
(recording::bitfield::write_to_dump): Likewise.
(recording::bitfield::make_debug_string): Likewise.
(recording::bitfield::write_reproducer): Likewise.
* jit-recording.h (class context): Add new_bitfield method.
(class field): Make it derivable by class bitfield.
(class bitfield): Add new class.
* libgccjit++.h (class context): Add new_bitfield method.
* libgccjit.c (struct gcc_jit_bitfield): New structure.
(gcc_jit_context_new_bitfield): New function.
* libgccjit.h
(LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
(gcc_jit_context_new_bitfield): New function.
* libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
2019-03-21 Jakub Jelinek <jakub@redhat.com>
* jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
in hash_set template param.
2019-02-05 Andrea Corallo <andrea.corallo@arm.com>
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
* docs/topics/contexts.rst (Additional driver options): New
section.
* jit-playback.c (invoke_driver): Add call to append_driver_options.
* jit-recording.c: Within namespace gcc::jit...
(recording::context::~context): Free the optnames within
m_driver_options.
(recording::context::add_driver_option): New method.
(recording::context::append_driver_options): New method.
(recording::context::dump_reproducer_to_file): Add driver
options.
* jit-recording.h: Within namespace gcc::jit...
(recording::context::add_driver_option): New method.
(recording::context::append_driver_options): New method.
(recording::context::m_driver_options): New field.
* libgccjit++.h (gccjit::context::add_driver_option): New
method.
* libgccjit.c (gcc_jit_context_add_driver_option): New API
entrypoint.
* libgccjit.h (gcc_jit_context_add_driver_option): New API
entrypoint.
(LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
macro.
* libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
2019-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2018-11-15 David Malcolm <dmalcolm@redhat.com>
PR other/19165
* dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
2018-11-13 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c: Replace "source_location" with "location_t".
2018-10-17 David Malcolm <dmalcolm@redhat.com>
* Make-lang.in (selftest-jit): New.
2018-06-28 Martin Liska <mliska@suse.cz>
* jit-playback.c: Include opt-suggestions.h.
2018-06-28 Martin Liska <mliska@suse.cz>
* jit-playback.c (class auto_argvec): Moved to vec.h.
(auto_argvec::~auto_argvec): Likewise.
(compile): Use the renamed name.
(invoke_driver): Likewise.
2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR jit/84288
* Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
2018-03-09 David Malcolm <dmalcolm@redhat.com>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR jit/64089
PR jit/84288
* Make-lang.in (COMMA): New.
(LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
(LIBGCCJIT_SONAME_OPTION): New.
(jit): Move --version-script and -soname linker options to the
above.
2018-01-25 David Malcolm <dmalcolm@redhat.com>
PR jit/81672
* jit-recording.h (gcc::jit::recording::union_): Remove fields
"m_loc" and "m_name".
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2017-12-19 Jakub Jelinek <jakub@redhat.com>
* jit-playback.c (get_type, playback::compile_to_file::copy_file,
playback::context::acquire_mutex): Replace Yoda conditions with
typical order conditions.
* libgccjit.c (gcc_jit_context_new_struct_type,
gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
* jit-builtins.c (matches_builtin): Likewise.
* jit-recording.c (recording::compound_type::set_fields,
recording::fields::write_reproducer, recording::rvalue::set_scope,
recording::function::validate): Likewise.
* jit-logging.c (logger::decref): Likewise.
2017-11-30 Jakub Jelinek <jakub@redhat.com>
* jit-recording.c
(recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
Use ; instead of ;;.
2017-11-28 Jakub Jelinek <jakub@redhat.com>
* jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
of build3. Formatting fixes. Adjust funciton comment.
2017-11-23 Tom de Vries <tom@codesourcery.com>
* libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
JIT_{BEGIN,END}_STMT.
2017-10-31 David Malcolm <dmalcolm@redhat.com>
* docs/internals/index.rst (Running the test suite): Document
PRESERVE_EXECUTABLES.
(Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2017-10-04 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/expressions.rst (Vector expressions): New
section.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
* docs/topics/expressions.rst (Vector expressions): New section.
* docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
gcc_jit_context_new_rvalue_from_vector.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (gcc::jit:recording::vector_type): New forward
decl.
* jit-playback.c
(gcc::jit::playback::context::new_rvalue_from_vector): New method.
* jit-playback.h
(gcc::jit::playback::context::new_rvalue_from_vector): New method.
* jit-recording.c: In namespace gcc::jit::
(class comma_separated_string): New class.
(comma_separated_string::comma_separated_string): New ctor,
adapted from recording::call::make_debug_string.
(comma_separated_string::~comma_separated_string): New dtor.
In namespace gcc::jit::recording::
(context::new_rvalue_from_vector): New method.
(type::get_vector): Update for renaming of memento_of_get_vector.
(class memento_of_get_vector): Rename to...
(class vector_type): ..this.
(memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
New ctor.
(memento_of_new_rvalue_from_vector::replay_into): New method.
(memento_of_new_rvalue_from_vector::visit_children): New method.
(memento_of_new_rvalue_from_vector::make_debug_string): New
method.
(memento_of_new_rvalue_from_vector::write_reproducer): New method.
(call::make_debug_string): Split out arg-printing code into ctor
for comma_separated_string.
* jit-recording.h: In namespace gcc::jit::recording::
(context::new_rvalue_from_vector): New method.
(type::dyn_cast_vector_type): New virtual function.
(class memento_of_get_vector): Rename to...
(class vector_type): ...this.
(vector_type::unqualified): Remove this vfunc override in favor
of...
(vector_type::get_element_type): ...this new method.
(vector_type::get_num_units): New method.
(vector_type::dyn_cast_vector_type): New vfunc override.
(class memento_of_new_rvalue_from_vector): New class.
* libgccjit++.h (gccjit::context::new_rvalue): Add overload for
vector of rvalue.
* libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
qualifications when checking that both operands have same type.
(gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
* libgccjit.h
(LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
macro.
(gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
* libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
2017-09-28 David Malcolm <dmalcolm@redhat.com>
* docs/topics/expressions.rst (Function calls): Add link to
gcc_jit_context_new_function_ptr_type.
(Function pointers): Convert to cross-references to
function-pointers.rst, moving material there.
* docs/topics/function-pointers.rst: New page.
* docs/topics/index.rst: Add function-pointers.rst.
* docs/topics/types.rst (Function pointer types): New section.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2017-09-28 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c
(gcc::jit::recording::function_type::is_same_type_as): New function.
* jit-recording.h: In namespace gcc::jit::recording::
(type::accepts_writes_from): Use is_same_type_as rather than pointer
equality.
(type::is_same_type_as): New virtual function.
(function_type::is_same_type_as): New override.
2017-09-27 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/expressions.rst (Function pointers): New section.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
* docs/topics/expressions.rst (Function pointers): New section.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (class gcc::jit::recording::function_pointer): New
forward decl.
* jit-playback.c (gcc::jit::playback::function::get_address): New
method.
* jit-playback.h (gcc::jit::playback::function::get_address): New
method decl.
* jit-recording.c: Within namespace gcc::jit::recording...
(function::function): Initialize new field "m_fn_ptr_type".
(function::get_address): New method.
(function_pointer::replay_into): New method.
(function_pointer::visit_children): New method.
(function_pointer::make_debug_string): New method.
(function_pointer::write_reproducer): New method.
* jit-recording.h: Within namespace gcc::jit::recording...
(function::get_address): New method.
(function): Add field "m_fn_ptr_type".
(class function_pointer): New subclass of rvalue.
* libgccjit++.h (gccjit::function::get_address): New method.
* libgccjit.c (gcc_jit_function_get_address): New function.
* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
macro.
(gcc_jit_function_get_address): New API entrypoint.
* libgccjit.map (LIBGCCJIT_ABI_9): New tag.
2017-09-14 David Malcolm <dmalcolm@redhat.com>
PR jit/82174
* jit-builtins.c (matches_builtin): Ignore entries with a NULL
name.
2017-08-18 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/46805
* dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
2017-08-18 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c (class gcc::jit::reproducer): Rename field
"m_identifiers" to "m_map_memento_to_identifier". Add field
"m_set_identifiers" and struct hash_traits for it.
(gcc::jit::reproducer::reproducer): Update for above.
(convert_to_identifier): New function.
(gcc::jit::reproducer::ensure_identifier_is_unique): New method.
(gcc::jit::reproducer::make_identifier): Avoid appending the %p
unless necessary for uniqueness. Update for field renaming.
(gcc::jit::reproducer::get_identifier): Update for field renaming.
2017-08-09 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/types.rst (Vector types): New section.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
* docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
example.
(Vector types): New section.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-playback.c (gcc::jit::playback::type::get_vector): New
method.
* jit-playback.h (gcc::jit::playback::type::get_vector): New
method.
* jit-recording.c: In namespace gcc::jit::recording::
(type::get_vector): New method.
(memento_of_get_aligned::write_reproducer): Fix typo
in leading comment.
(memento_of_get_vector::replay_into): New method.
(memento_of_get_vector::make_debug_string): New method.
(memento_of_get_vector::write_reproducer): New method.
* jit-recording.h: In namespace gcc::jit::recording::
(type::get_vector): New
method.
(class memento_of_get_vector): New class.
* libgccjit++.h (gccjit::type::get_vector): New method.
* libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
define.
(gcc_jit_type_get_vector): New decl.
* libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
"machine_mode".
2017-04-24 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/types.rst (gccjit::type::get_const): Remove
comment.
(gccjit::type::get_aligned): Add.
* docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
* docs/topics/types.rst: Add gcc_jit_type_get_aligned.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-playback.c (gcc::jit::playback::type::get_aligned): New
method.
* jit-playback.h (gcc::jit::playback::type::get_aligned): New
method.
* jit-recording.c: Within namespace gcc::jit::recording...
(type::get_aligned): New method.
(memento_of_get_aligned::replay_into): New method.
(memento_of_get_aligned::make_debug_string): New method.
(memento_of_get_aligned::write_reproducer): New method.
* jit-recording.h: Within namespace gcc::jit::recording...
(type::get_aligned): New method.
(type::accepts_writes_from): Strip off qualifications from
this when comparing pointer equality.
(decorated_type): New subclass of type, subsuming the
commonality between memento_of_get_const and
memento_of_get_volatile.
(memento_of_get_const): Make a subclass of decorated_type,
rather than type.
(memento_of_get_volatile): Likewise.
(memento_of_get_aligned): Likewise.
* libgccjit++.h: Within namespace gccjit...
(type::get_const): New method.
(type::get_aligned): New method.
* libgccjit.c (gcc_jit_type_get_aligned): New function.
* libgccjit.h (gcc_jit_type_get_aligned): New decl.
* libgccjit.map (LIBGCCJIT_ABI_7): New
(gcc_jit_type_get_aligned): Add.
2017-01-19 David Malcolm <dmalcolm@redhat.com>
* dummy-frontend.c (jit_langhook_type_for_size): Delete.
(LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
2017-01-18 David Malcolm <dmalcolm@redhat.com>
* dummy-frontend.c (jit_langhook_type_for_size): Implement, using
lto's lto_type_for_size.
2017-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2016-05-20 David Malcolm <dmalcolm@redhat.com>
* docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
* docs/topics/expressions.rst (Function calls): Add documentation
of gcc_jit_rvalue_set_bool_require_tail_call.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (gcc::jit::recording::base_call): Add forward decl.
* jit-playback.c: Within namespace gcc::jit::playback...
(context::build_call) Add "require_tail_call" param and use it
to set CALL_EXPR_MUST_TAIL_CALL.
(context::new_call): Add "require_tail_call" param.
(context::new_call_through_ptr): Likewise.
* jit-playback.h: Within namespace gcc::jit::playback...
(context::new_call: Add "require_tail_call" param.
(context::new_call_through_ptr): Likewise.
(context::build_call): Likewise.
* jit-recording.c: Within namespace gcc::jit::recording...
(base_call::base_call): New constructor.
(base_call::write_reproducer_tail_call): New method.
(call::call): Update for inheritance from base_call.
(call::replay_into): Provide m_require_tail_call to call
to new_call.
(call::write_reproducer): Call write_reproducer_tail_call.
(call_through_ptr::call_through_ptr): Update for inheritance from
base_call.
(call_through_ptr::replay_into): Provide m_require_tail_call to call
to new_call_through_ptr.
(recording::call_through_ptr::write_reproducer): Call
write_reproducer_tail_call.
* jit-recording.h: Within namespace gcc::jit::recording...
(rvalue::dyn_cast_base_call): New virtual function.
(class base_call): New subclass of class rvalue.
(class call): Inherit from base_call rather than directly from
rvalue, moving get_precedence and m_args to base_call.
(class call_through_ptr): Likewise.
* libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
function.
* libgccjit.h
(LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
macro.
(gcc_jit_rvalue_set_bool_require_tail_call): New function.
* libgccjit.map (LIBGCCJIT_ABI_6): New.
(gcc_jit_rvalue_set_bool_require_tail_call): Add.
2016-05-17 David Malcolm <dmalcolm@redhat.com>
* dummy-frontend.c: Include diagnostic.h.
(jit_begin_diagnostic): New function.
(jit_end_diagnostic): New function.
(jit_langhook_init): Register jit_begin_diagnostic
and jit_end_diagnostic with the global_dc.
* jit-playback.c: Include diagnostic.h.
(gcc::jit::playback::context::add_diagnostic): New method.
* jit-playback.h (struct diagnostic_context): Add forward
declaration.
(gcc::jit::playback::context::add_diagnostic): New method.
2016-05-17 David Malcolm <dmalcolm@redhat.com>
* docs/topics/expressions.rst (Function calls): Document
gcc_jit_context_new_call_through_ptr.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2016-05-13 David Malcolm <dmalcolm@redhat.com>
* jit-playback.h: Within namespace gcc:jit::playback...
(compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
(compile_to_file::postprocess): Likewise.
(function::finalizer): Likewise.
(block::finalizer): Likewise.
(source_file::finalizer): Likewise.
(source_line::finalizer): Likewise.
* jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
* jit-recording.h: Within namespace gcc::jit::recording...
(string::replay_into): Mark with FINAL OVERRIDE.
(string::make_debug_string): Likewise.
(string::write_reproducer): Likewise.
(location::replay_into): Likewise.
(location::dyn_cast_location): Likewise.
(location::make_debug_string): Likewise.
(location::write_reproducer): Likewise.
(memento_of_get_type::dereference): Likewise.
(memento_of_get_type::accepts_writes_from): Likewise.
(memento_of_get_type::is_int): Likewise.
(memento_of_get_type::is_float): Likewise.
(memento_of_get_type::is_bool): Likewise.
(memento_of_get_type::is_pointer): Likewise.
(memento_of_get_type::is_array): Likewise.
(memento_of_get_type::is_void): Likewise.
(memento_of_get_type::replay_into): Likewise.
(memento_of_get_type::make_debug_string): Likewise.
(memento_of_get_type::write_reproducer): Likewise.
(memento_of_get_pointer::dereference): Likewise.
(memento_of_get_pointer::accepts_writes_from): Likewise.
(memento_of_get_pointer::replay_into): Likewise.
(memento_of_get_pointer::is_int): Likewise.
(memento_of_get_pointer::is_float): Likewise.
(memento_of_get_pointer::is_bool): Likewise.
(memento_of_get_pointer::is_pointer): Likewise.
(memento_of_get_pointer::is_array): Likewise.
(memento_of_get_pointer::make_debug_string): Likewise.
(memento_of_get_pointer::write_reproducer): Likewise.
(memento_of_get_const::dereference): Likewise.
(memento_of_get_const::accepts_writes_from): Likewise.
(memento_of_get_const::unqualified): Likewise.
(memento_of_get_const::is_int): Likewise.
(memento_of_get_const::is_float): Likewise.
(memento_of_get_const::is_bool): Likewise.
(memento_of_get_const::is_pointer): Likewise.
(memento_of_get_const::is_array): Likewise.
(memento_of_get_const::void replay_into): Likewise;
(memento_of_get_const::make_debug_string): Likewise.
(memento_of_get_const::write_reproducer): Likewise.
(memento_of_get_volatile::dereference): Likewise.
(memento_of_get_volatile::unqualified): Likewise.
(memento_of_get_volatile::is_int): Likewise.
(memento_of_get_volatile::is_float): Likewise.
(memento_of_get_volatile::is_bool): Likewise.
(memento_of_get_volatile::is_pointer): Likewise.
(memento_of_get_volatile::is_array): Likewise.
(memento_of_get_volatile::replay_into): Likewise;
(memento_of_get_volatile::make_debug_string): Likewise.
(memento_of_get_volatile::write_reproducer): Likewise.
(array_type::dereference): Likewise.
(array_type::is_int): Likewise.
(array_type::is_float): Likewise.
(array_type::is_bool): Likewise.
(array_type::is_pointer): Likewise.
(array_type::is_array): Likewise.
(array_type::replay_into): Likewise;
(array_type::make_debug_string): Likewise.
(array_type::write_reproducer): Likewise.
(function_type::dereference): Likewise.
(function_type::function_dyn_cast_function_type): Likewise.
(function_type::function_as_a_function_type): Likewise.
(function_type::is_int): Likewise.
(function_type::is_float): Likewise.
(function_type::is_bool): Likewise.
(function_type::is_pointer): Likewise.
(function_type::is_array): Likewise.
(function_type::replay_into): Likewise;
(function_type::make_debug_string): Likewise.
(function_type::write_reproducer): Likewise.
(field::replay_into): Likewise;
(field::write_to_dump): Likewise.
(field::make_debug_string): Likewise.
(field::write_reproducer): Likewise.
(compound_type::dereference): Likewise.
(compound_type::is_int): Likewise.
(compound_type::is_float): Likewise.
(compound_type::is_bool): Likewise.
(compound_type::is_pointer): Likewise.
(compound_type::is_array): Likewise.
(compound_type::has_known_size): Likewise.
(struct_::dyn_cast_struct): Likewise.
(struct_::replay_into): Likewise.
(struct_::access_as_type): Likewise.
(struct_::make_debug_string): Likewise.
(struct_::write_reproducer): Likewise.
(fields::replay_into): Likewise.
(fields::write_to_dump): Likewise.
(fields::make_debug_string): Likewise.
(fields::write_reproducer): Likewise.
(union_::replay_into): Likewise.
(union_::make_debug_string): Likewise.
(union_::write_reproducer): Likewise.
(lvalue::access_as_rvalue): Mark with OVERRIDE.
(param::replay_into): Mark with FINAL OVERRIDE.
(param::visit_children): Likewise.
(param::dyn_cast_param): Likewise.
(param::access_as_rvalue): Likewise.
(param::access_as_lvalue): Likewise.
(param::make_debug_string): Likewise.
(param::write_reproducer): Likewise.
(param::get_precedence): Likewise.
(function::replay_into): Likewise.
(function::write_to_dump): Likewise.
(function::make_debug_string): Likewise.
(function::write_reproducer): Likewise.
(block::write_to_dump): Likewise.
(block::make_debug_string): Likewise.
(block::write_reproducer): Likewise.
(block::replay_into): Likewise.
(global::replay_into): Likewise;
(global::visit_children): Likewise.
(global::write_to_dump): Likewise.
(global::make_debug_string): Likewise.
(global::write_reproducer): Likewise.
(global::get_precedence): Likewise.
(memento_of_new_rvalue_from_const::replay_into): Likewise.
(memento_of_new_rvalue_from_const::visit_children): Likewise.
(memento_of_new_rvalue_from_const::is_constant): Likewise.
(memento_of_new_rvalue_from_const::get_wide_int): Likewise.
(memento_of_new_rvalue_from_const::make_debug_string): Likewise.
(memento_of_new_rvalue_from_const::write_reproducer): Likewise.
(memento_of_new_rvalue_from_const::get_precedence): Likewise.
(memento_of_new_string_literal::replay_into): Likewise.
(memento_of_new_string_literal::visit_children): Likewise.
(memento_of_new_string_literal::make_debug_string): Likewise.
(memento_of_new_string_literal::write_reproducer): Likewise.
(memento_of_new_string_literal::get_precedence): Likewise.
(unary_op::replay_into): Likewise.
(unary_op::visit_children): Likewise.
(unary_op::make_debug_string): Likewise.
(unary_op::write_reproducer): Likewise.
(unary_op::get_precedence): Likewise.
(binary_op::replay_into): Likewise.
(binary_op::visit_children): Likewise.
(binary_op::make_debug_string): Likewise.
(binary_op::write_reproducer): Likewise.
(binary_op::get_precedence): Likewise.
(comparison::replay_into): Likewise.
(comparison::visit_children): Likewise.
(comparison::make_debug_string): Likewise.
(comparison::write_reproducer): Likewise.
(comparison::get_precedence): Likewise.
(cast::replay_into): Likewise.
(cast::visit_children): Likewise.
(cast::make_debug_string): Likewise.
(cast::write_reproducer): Likewise.
(cast::get_precedence): Likewise.
(call::replay_into): Likewise.
(call::visit_children): Likewise.
(call::make_debug_string): Likewise.
(call::write_reproducer): Likewise.
(call::get_precedence): Likewise.
(call_through_ptr::replay_into): Likewise.
(call_through_ptr::visit_children): Likewise.
(call_through_ptr::make_debug_string): Likewise.
(call_through_ptr::write_reproducer): Likewise.
(call_through_ptr::get_precedence): Likewise.
(array_access::replay_into): Likewise.
(array_access::visit_children): Likewise.
(array_access::make_debug_string): Likewise.
(array_access::write_reproducer): Likewise.
(array_access::get_precedence): Likewise.
(access_field_of_lvalue::replay_into): Likewise.
(access_field_of_lvalue::visit_children): Likewise.
(access_field_of_lvalue::make_debug_string): Likewise.
(access_field_of_lvalue::write_reproducer): Likewise.
(access_field_of_lvalue::get_precedence): Likewise.
(access_field_rvalue::replay_into): Likewise.
(access_field_rvalue::visit_children): Likewise.
(access_field_rvalue::make_debug_string): Likewise.
(access_field_rvalue::write_reproducer): Likewise.
(access_field_rvalue::get_precedence): Likewise.
(dereference_field_rvalue::replay_into): Likewise.
(dereference_field_rvalue::visit_children): Likewise.
(dereference_field_rvalue::make_debug_string): Likewise.
(dereference_field_rvalue::write_reproducer): Likewise.
(dereference_field_rvalue::get_precedence): Likewise.
(dereference_rvalue::replay_into): Likewise.
(dereference_rvalue::visit_children): Likewise.
(dereference_rvalue::make_debug_string): Likewise.
(dereference_rvalue::write_reproducer): Likewise.
(dereference_rvalue::get_precedence): Likewise.
(get_address_of_lvalue::replay_into): Likewise.
(get_address_of_lvalue::visit_children): Likewise.
(get_address_of_lvalue::make_debug_string): Likewise.
(get_address_of_lvalue::write_reproducer): Likewise.
(get_address_of_lvalue::get_precedence): Likewise.
(local::replay_into): Likewise.
(local::visit_children): Likewise.
(local::write_to_dump): Likewise.
(local::make_debug_string): Likewise.
(local::write_reproducer): Likewise.
(local::get_precedence): Likewise.
(statement::write_to_dump): Likewise.
(eval::replay_into): Likewise.
(eval::make_debug_string): Likewise.
(eval::write_reproducer): Likewise.
(assignment::replay_into): Likewise.
(assignment::make_debug_string): Likewise.
(assignment::write_reproducer): Likewise.
(assignment_op::replay_into): Likewise.
(assignment_op::make_debug_string): Likewise.
(assignment_op::write_reproducer): Likewise.
(comment::replay_into): Likewise.
(comment::make_debug_string): Likewise.
(comment::write_reproducer): Likewise.
(conditional::replay_into): Likewise.
(conditional::get_successor_blocks): Likewise.
(conditional::make_debug_string): Likewise.
(conditional::write_reproducer): Likewise.
(jump::replay_into): Likewise.
(jump::get_successor_blocks): Likewise.
(jump::make_debug_string): Likewise.
(jump::write_reproducer): Likewise.
(return_::replay_into): Likewise.
(return_::get_successor_blocks): Likewise.
(return_::make_debug_string): Likewise.
(return_::write_reproducer): Likewise.
(case_::replay_into): Likewise.
(case_::write_reproducer): Likewise.
(case_::make_debug_string): Likewise.
(switch_::replay_into): Likewise.
(switch_::get_successor_blocks): Likewise.
(switch_::make_debug_string): Likewise.
(switch_::write_reproducer): Likewise.
2016-02-08 David Malcolm <dmalcolm@redhat.com>
* dummy-frontend.c (jit_langhook_init): Remove
second argument to build_common_tree_nodes to
track r233218.
2016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
* jit-playback.c: Include pthread.h.
2016-01-19 David Malcolm <dmalcolm@redhat.com>
PR jit/69144
* jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
Potentially add the temporary artifact to the tempdir's list of
tempfiles needing additional cleanup.
(gcc::jit::playback::context::extract_any_requested_dumps): Likewise
for the dumpfile.
* jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
tempfiles.
* jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
(gcc::jit::tempdir::m_tempfiles): New field.
* docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
* docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
New.
(toyvm_function::compile): Change return type from function ptr
to a compilation_result.
(toyvm_function::get_function_name): New accessor.
(toyvm_function::m_funcname): New field.
(get_function_name): Convert to...
(toyvm_function::make_function_name): ...this new method.
(toyvm_function::parse): Call make_function_name.
(toyvm_function::compile): Convert return type from function ptr
to a compilation_result. Use get_function_name.
(compilation_state::compile): Convert return type from
gcc_jit_result * to a compilation_result.
(test_script): Update for above changes, extracting the code from
the compilation_result.
(main): Likewise.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2015-11-11 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Remove unused header files.
* jit-builtins.c: Likewise.
* jit-playback.c: Likewise.
* jit-recording.c: Likewise.
* jit-spec.c: Likewise.
* libgccjit.c: Likewise.
2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
* jit-builtins.c: Don't undef DEF_BUILTIN.
2015-10-29 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Reorder #include's and remove duplicates.
* jit-builtins.c: Likewise.
* jit-playback.c: Likewise.
* jit-recording.c: Likewise.
* libgccjit.c: Likewise.
2015-10-13 Jakub Jelinek <jakub@redhat.com>
* jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
DEF_FUNCTION_TYPE_11): Define.
* jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
DEF_FUNCTION_TYPE_11): Define.
2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
Ulrich Drepper <drepper@gmail.com>
* jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
2015-09-30 Matthias Klose <doko@ubuntu.com>
* jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
remove DEF_FUNCTION_TYPE_VAR_11.
* jit-builtins.c (builtins_manager::make_type): Define and handle
DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
2015-08-25 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/contexts.rst
(gccjit::context::set_bool_use_external_driver): New.
* docs/internals/test-hello-world.exe.log.txt: Update.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
* docs/topics/contexts.rst
(gcc_jit_context_set_bool_use_external_driver): New.
* jit-common.h (enum inner_bool_option): Add
INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
* jit-playback.c (gcc_driver_name): New global.
(gcc:jit::playback::context::invoke_driver): Split out second
half into...
(gcc::jit::playback::context::invoke_embedded_driver): ...this new
function, and...
(gcc::jit::playback::context::invoke_external_driver): ...this new
function.
* jit-playback.h
(gcc::jit::playback::context::get_inner_bool_option): New.
(gcc::jit::playback::context::invoke_embedded_driver): New.
(gcc::jit::playback::context::invoke_external_driver): New.
* jit-recording.c (inner_bool_option_reproducer_strings):
Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
* libgccjit++.h
(gccjit::context::set_bool_use_external_driver): New.
* libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
* libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
(LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
New.
* libgccjit.map (LIBGCCJIT_ABI_5): New.
* notes.txt: Show invocation of embedded copy of driver.
* docs/internals/test-hello-world.exe.log.txt: Update
2015-08-13 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (invoke_driver): On OS X, add
"-Wl,-undefined,dynamic_lookup" to the driver arguments.
2015-08-03 David Malcolm <dmalcolm@redhat.com>
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
* docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
We no longer show a profile.
* docs/topics/index.rst (Topic Reference): Add performance.rst.
* docs/topics/performance.rst: New file.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-playback.c (gcc::jit::playback::context::compile): Add timer
param when constructing the "toplev" instance.
(gcc::jit::playback::context::acquire_mutex): Add timer param when
constructing auto_timevar instance.
(gcc::jit::playback::context::make_fake_args): If we have a timer,
add "-ftime-report".
(gcc::jit::playback::context::invoke_driver): Add timer param when
constructing auto_timevar instance.
(gcc::jit::playback::context::dlopen_built_dso): Likewise.
* jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
* jit-recording.c: Include timevar.h.
(gcc::jit::recording::context::context): Initialize field "m_timer".
* jit-recording.h: Add forward declaration of class timer.
(gcc::jit::recording::context::set_timer): New method.
(gcc::jit::recording::context::get_timer): New method.
(gcc::jit::recording::context::m_timer): New field.
* libgccjit++.h (gccjit::timer): New class.
(gccjit::auto_time): New class.
(gccjit::context::set_timer): New method.
(gccjit::context::get_timer): New.
(gccjit::timer::timer): New.
(gccjit::timer::push): New.
(gccjit::timer::pop): New.
(timer::print): New.
(timer::get_inner_timer): New.
(timer::release): New.
(auto_time::auto_time): New.
(auto_time::~auto_time): New.
* libgccjit.c: Include timevar.h.
(struct gcc_jit_timer): New.
(gcc_jit_timer_new): New function.
(gcc_jit_timer_release): New function.
(gcc_jit_context_set_timer): New function.
(gcc_jit_context_get_timer): New function.
(gcc_jit_timer_push): New function.
(gcc_jit_timer_pop): New function.
(gcc_jit_timer_print): New function.
* libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
(gcc_jit_timer): New typedef.
(gcc_jit_timer_new): New function.
(gcc_jit_timer_release): New function.
(gcc_jit_context_set_timer): New function.
(gcc_jit_context_get_timer): New function.
(gcc_jit_timer_push): New function.
(gcc_jit_timer_pop): New function.
(gcc_jit_timer_print): New function.
* libgccjit.map (LIBGCCJIT_ABI_4): New.
(gcc_jit_timer_new): New function.
(gcc_jit_timer_release): New function.
(gcc_jit_context_set_timer): New function.
(gcc_jit_context_get_timer): New function.
(gcc_jit_timer_push): New function.
(gcc_jit_timer_pop): New function.
(gcc_jit_timer_print): New function.
2015-07-23 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (invoke_driver): Convert local "argvec"
to an auto_argvec, so that it owns copies of the strings,
rather than borrows them, updating ADD_ARG to use xstrdup
and special-casing the NULL terminator to avoid
xstrdup (NULL). Call add_multilib_driver_arguments at the front
of the arguments.
(MULTILIB_DEFAULTS): Provide a default definition.
(multilib_defaults_raw): New constant array.
(gcc::jit::playback::context::add_multilib_driver_arguments): New
method.
* jit-playback.h
(gcc::jit::playback::context::add_multilib_driver_arguments): New
method.
* docs/internals/test-hello-world.exe.log.txt: Update.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-07-16 David Malcolm <dmalcolm@redhat.com>
* docs/internals/index.rst (Overview of code structure): Add note
that the implementation is in C++, despite the .c extension.
(Submitting patches): New subsection.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-07-09 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Adjust includes for flags.h changes.
* jit-common.h: Likewise.
* jit-playback.c: Likewise.
2015-07-08 David Malcolm <dmalcolm@redhat.com>
PR jit/66783
* libgccjit.c (gcc_jit_context_new_field): Show name of field in
"unknown size" error message.
(gcc_jit_struct_set_fields): Show name of struct in error message.
(gcc_jit_context_new_global): Show name of global in
"unknown size" error message.
(gcc_jit_function_new_local): Likewise for local.
2015-07-07 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Adjust includes.
* jit-common.h: Likewise.
* jit-playback.c: Likewise.
2015-07-07 David Malcolm <dmalcolm@redhat.com>
PR jit/66783
* jit-recording.h: Within namespace gcc:jit::recording...
(type::has_known_size): New virtual function.
(struct_has_known_size): New function.
* libgccjit.c (gcc_jit_context_new_field): Verify that the type
has a known size.
(gcc_jit_context_new_global): Likewise.
(gcc_jit_function_new_local): Likewise.
2015-07-07 David Malcolm <dmalcolm@redhat.com>
PR jit/66779
* dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
handle modes QI, HI, SI, DI, TI.
2015-07-01 David Malcolm <dmalcolm@redhat.com>
PR jit/66700
* jit-playback.c (jit_mark_addressable): New function.
(gcc::jit::playback::lvalue::get_address): Call
jit_mark_addressable on the underlying tree.
2015-07-01 David Malcolm <dmalcolm@redhat.com>
* docs/topics/types.rst (gcc_jit_context_new_union_type): Add
documentation.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-07-01 David Malcolm <dmalcolm@redhat.com>
* docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
Clarify lack of lifetime requirements on (const char *) parameter.
* docs/topics/expressions.rst
(gcc_jit_context_new_string_literal): Likewise.
(gcc_jit_context_new_global): Likewise.
* docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
(gcc_jit_context_new_function): Likewise.
(gcc_jit_function_new_block): Likewise.
(gcc_jit_block_add_comment): Likewise.
* docs/topics/locations.rst (gcc_jit_context_new_location):
Likewise.
* docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
(gcc_jit_context_new_struct_type): Likewise.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-06-30 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/functions.rst (Blocks): Add switch statements to
list of ways to terminate a block.
(gccjit::block::end_with_switch): Add function description.
(gccjit::case_): Add class.
(gccjit::context::new_case): Add function description.
* docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
* docs/topics/functions.rst (Blocks): Add switch statements to
list of ways to terminate a block.
(gcc_jit_block_end_with_switch): Add function description.
(gcc_jit_case): Add type.
(gcc_jit_context_new_case): Add function description.
(gcc_jit_case_as_object): Add function description.
* docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (gcc::jit::recording::case_): Add forward decl.
(gcc::jit::playback::case_): Add forward decl.
* jit-playback.c (add_case): New function.
(gcc::jit::playback::block::add_switch): New function.
* jit-playback.h (gcc::jit::playback::case_): New struct.
(gcc::jit::playback::block::get_function): New method.
(gcc::jit::playback::block::add_switch): New method.
* jit-recording.c: Within namespace gcc::jit...
(recording::context::new_case): New method.
(recording::function::validate): Update for change to
get_successor_blocks.
(recording::block::end_with_switch): New method.
(recording::block::get_successor_blocks): Update to support an
arbitrary number of successor blocks.
(recording::block::dump_edges_to_dot): Likewise.
(memento_of_new_rvalue_from_const <int>::get_wide_int): New.
(memento_of_new_rvalue_from_const <long>::get_wide_int): New.
(memento_of_new_rvalue_from_const <double>::get_wide_int): New.
(memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
(recording::statement::get_successor_blocks): Update to support an
arbitrary number of successor blocks.
(recording::conditional::get_successor_blocks): Likewise.
(recording::jump::get_successor_blocks): Likewise.
(recording::return_::get_successor_blocks): Likewise.
(recording::case_::write_reproducer): New.
(recording::case_::make_debug_string): New.
(recording::switch_::switch_): New.
(recording::switch_::replay_into): New.
(recording::switch_::get_successor_blocks): New.
(recording::switch_::make_debug_string): New.
(recording::switch_::write_reproducer): New.
* jit-recording.h: Within namespace gcc::jit::recording...
(context::new_case): New.
(rvalue::is_constant): New.
(rvalue::get_wide_int): New.
(block::end_with_switch): New.
(block::get_successor_blocks): Update to support an arbitrary
number of successor blocks.
(memento_of_new_rvalue_from_const::is_constant): New.
(memento_of_new_rvalue_from_const::get_wide_int): New.
(statement::get_successor_blocks): Update to support an arbitrary
number of successor blocks.
(conditional::get_successor_blocks): Likewise.
(jump::get_successor_blocks): Likewise.
(return_::get_successor_blocks): Likewise.
(case_): New subclass of memento.
(switch_): New subclass of statement.
* libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
(gccjit::context::new_case): New method.
(gccjit::block::end_with_switch): New method.
(gccjit::case_::case): New ctors.
(gccjit::case_::get_inner_case): New method.
* libgccjit.c: Include "typed-splay-tree.h"
(struct gcc_jit_case): New.
(gcc_jit_context_new_case): New function.
(gcc_jit_case_as_object): New function.
(valid_dest_for_switch): New function.
(valid_case_for_switch): New function.
(class api_call_validator): New class.
(class case_range_validator): New class.
(case_range_validator::case_range_validator): New.
(case_range_validator::validate): New.
(case_range_validator::case_compare): New.
(case_range_validator::get_wide_int): new.
(gcc_jit_block_end_with_switch): New.
* libgccjit.h: Add gcc_jit_case to class hierarchy comment.
(gcc_jit_case): New typedef.
(gcc_jit_context_new_case): New function.
(gcc_jit_case_as_object): New function.
(gcc_jit_block_end_with_switch): New function.
(LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
* libgccjit.map: Add gcc_jit_block_end_with_switch,
gcc_jit_case_as_object and gcc_jit_context_new_case.
2015-06-30 David Malcolm <dmalcolm@redhat.com>
PR jit/66546
* docs/cp/topics/contexts.rst
(gccjit::context::set_bool_allow_unreachable_blocks): New.
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
* docs/topics/contexts.rst (Options): Add notes discussing the
transition from enums to entrypoints for new options.
(gcc_jit_context_set_bool_allow_unreachable_blocks): New.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (gcc::jit::inner_bool_option): New enum.
* jit-recording.c: Within namespace gcc::jit...
(recording::context::context): Handle m_inner_bool_options.
(recording::context::set_inner_bool_option): New.
(inner_bool_option_reproducer_strings): New.
(recording::context::log_all_options): Log the "inner" bool
options.
(recording::context::log_inner_bool_option): New.
(recording::context::dump_reproducer_to_file): Write initializers
for "inner" bool options.
(recording::function::validate): Don't check for block
reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
* jit-recording.h: Within namespace gcc::jit...
(recording::context::set_inner_bool_option): New.
(recording::context::get_inner_bool_option): New.
(recording::context::log_inner_bool_option): New.
(recording::context::m_inner_bool_options): New.
* libgccjit++.h
(gccjit::context::set_bool_allow_unreachable_blocks): New.
* libgccjit.c
(gcc_jit_context_set_bool_allow_unreachable_blocks): New.
* libgccjit.h: Add note about options present in the
initial release of libgccjit.
(gcc_jit_context_set_bool_allow_unreachable_blocks): New API
entrypoint.
(LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
New macro.
* libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
(gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
entrypoint.
2015-06-30 David Malcolm <dmalcolm@redhat.com>
PR jit/66628
* docs/cp/topics/contexts.rst (Additional command-line options):
New section.
* docs/topics/compatibility.rst: New file.
* docs/topics/contexts.rst (Additional command-line options): New
section.
* docs/topics/index.rst: Add compatibility.rst.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-playback.c (make_fake_args): Add call to
append_command_line_options.
* jit-recording.c: Within namespace gcc::jit...
(recording::context::~context): Free the optnames within
m_command_line_options.
(recording::context::set_bool_option): Likewise.
(recording::context::add_command_line_option): New method.
(recording::context::append_command_line_options): New method.
(recording::context::dump_reproducer_to_file): Add command-line
options.
* jit-recording.h: Within namespace gcc::jit...
(recording::context::add_command_line_option): New method.
(recording::context::append_command_line_options): New method.
(recording::context::m_command_line_options): New field.
* libgccjit++.h (gccjit::context::add_command_line_option): New
method.
* libgccjit.c (gcc_jit_context_add_command_line_option): New API
entrypoint.
* libgccjit.h (gcc_jit_context_add_command_line_option): New API
entrypoint.
(LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
macro.
* libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
2015-06-30 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c
(gcc::jit::recording::context::dump_reproducer_to_file):
Add pragma to generated reproducers to disable -Wunused-variable.
Fix handling of NULL string options.
2015-06-30 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/expressions.rst: Remove stray semicolon.
* docs/cp/topics/functions.rst: Remove stray backslash.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
* jit-playback.c: Likewise.
2015-06-25 Andrew Macleod <amacleod@redhat.com>
* jit-common.h: Don't include alias.h.
2015-06-17 David Malcolm <dmalcolm@redhat.com>
* libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
is for the correct struct.
(gcc_jit_rvalue_access_field): Likewise.
2015-06-17 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
* jit-common.h: Likewise.
* jit-playback.c: Likewise.
2015-06-16 David Malcolm <dmalcolm@redhat.com>
PR jit/66539
* jit-recording.c: Within namespace gcc::jit::recording::
(rvalue::get_debug_string_parens): New function.
(binary_op::make_debug_string): Update to mimic C precedence
rules.
(binary_op_precedence): New array.
(binary_op::get_precedence): New function.
(comparison::make_debug_string): Update to mimic C precedence
rules.
(comparison_precedence): New array.
(comparison::get_precedence): New function.
(cast::make_debug_string): Update to mimic C precedence rules.
(call::make_debug_string): Likewise.
(call_through_ptr::make_debug_string): Likewise.
(array_access::make_debug_string): Likewise.
(access_field_of_lvalue::make_debug_string): Likewise.
(access_field_rvalue::make_debug_string): Likewise.
(dereference_field_rvalue::make_debug_string): Likewise.
(dereference_rvalue::make_debug_string): Likewise.
(get_address_of_lvalue::make_debug_string): Likewise.
* jit-recording.h: Within namespace gcc::jit::recording::
(precedence): New enum.
(rvalue::rvalue): Initialize field "m_parenthesized_string".
(rvalue::get_debug_string_parens): New method.
(rvalue::get_precedence): New pure virtual function.
(rvalue::m_parenthesized_string): New field.
(param::get_precedence): New function.
(global::get_precedence): New function.
(memento_of_new_rvalue_from_const::get_precedence): New function.
(memento_of_new_string_literal::get_precedence): New function.
(unary_op::get_precedence): New function.
(binary_op::get_precedence): New function.
(comparison::get_precedence): New function.
(cast::get_precedence): New function.
(call::get_precedence): New function.
(call_through_ptr::get_precedence): New function.
(array_access::get_precedence): New function.
(access_field_of_lvalue::get_precedence): New function.
(access_field_rvalue::get_precedence): New function.
(dereference_field_rvalue::get_precedence): New function.
(dereference_rvalue::get_precedence): New function.
(get_address_of_lvalue::get_precedence): New function.
(local::get_precedence): New function.
2015-06-09 Matthias Klose <doko@ubuntu.com>
* Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
2015-06-08 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c : Adjust include files.
* jit-common.h : Likewise.
* jit-playback.c : Likewise.
2015-06-05 David Malcolm <dmalcolm@redhat.com>
* dummy-frontend.c
(jit_langhook_post_compilation_parsing_cleanups): Remove.
(LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
* jit-playback.c (gcc::jit::playback::context::new_global): Add
call to varpool_node::finalize_decl.
(gcc::jit::playback::context::finalize_global_decls): Remove.
* jit-playback.h
(gcc::jit::playback::context::finalize_global_decls): Remove.
2015-06-05 David Malcolm <dmalcolm@redhat.com>
* dummy-frontend.c (jit_langhook_write_globals): Rename to...
(jit_langhook_post_compilation_parsing_cleanups): ...this, and
eliminate calls to finalize_compilation_unit and
write_global_decls_2.
(LANG_HOOKS_WRITE_GLOBALS): Rename to...
(LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
redirect from jit_langhook_write_globals to
jit_langhook_post_compilation_parsing_cleanups.
* jit-playback.c
(gcc::jit::playback::context::write_global_decls_1): Rename to...
(gcc::jit::playback::context::finalize_global_decls): ...this.
(gcc::jit::playback::context::write_global_decls_1): Delete.
* jit-playback.h
(gcc::jit::playback::context::write_global_decls_1): Rename to...
(gcc::jit::playback::context::finalize_global_decls): ...this.
(gcc::jit::playback::context::write_global_decls_1): Delete.
2015-06-04 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Adjust includes for restructured coretypes.h.
* jit-common.h: Likewise.
* jit-playback.c: Likewise.
2015-05-12 David Malcolm <dmalcolm@redhat.com>
* jit-builtins.c: Include vec.h before target.h.
2015-04-27 Jim Wilson <jim.wilson@linaro.org>
* Make-lang.in (jit.mostlyclean): Remove shared libraries and object
files.
2015-04-09 David Malcolm <dmalcolm@redhat.com>
PR jit/65691
* docs/cp/topics/expressions.rst (Simple expressions): Fix copy
and paste error in description of gccjit::context::one.
* docs/topics/expressions.rst (Simple expressions): Likewise in
description of gcc_jit_context_one.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-03-13 Uros Bizjak <ubizjak@gmail.com>
* jit-recording.c (dump::write): Also check vasprintf return value.
(recording::context::add_error_va): Ditto.
(recording::string::from_printf): Ditto.
2015-03-13 David Malcolm <dmalcolm@redhat.com>
* docs/internals/index.rst (Packaging notes): New section.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-03-05 David Malcolm <dmalcolm@redhat.com>
* docs/cp/intro/tutorial03.rst: Add missing arguments to
gccjit::block::end_with_conditional call. Add on_true/on_false
comments. Tweak the wording.
* docs/intro/tutorial03.rst: Add missing arguments to
gcc_jit_block_end_with_conditional call. Add some clarifying
comments.
* docs/topics/compilation.rst: Tweak the wording to avoid an
ambiguous use of "this".
* docs/topics/contexts.rst: Fix a typo.
* docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
a stray backtick.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
PR libgomp/64625
* jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
(DEF_FUNCTION_TYPE_VAR_12): Remove macros.
(DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
* jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
(DEF_FUNCTION_TYPE_VAR_12): Remove macros.
(DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2015-02-04 David Malcolm <dmalcolm@redhat.com>
PR jit/64257
* docs/conf.py (html_theme): Change from 'pyramid'
to 'sphinxdoc'.
2015-02-04 David Malcolm <dmalcolm@redhat.com>
* docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
typo.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-02-03 David Malcolm <dmalcolm@redhat.com>
* jit-logging.h (gcc::jit::log_user::log): Make const.
* jit-recording.c (gcc::jit::recording::context::set_str_option):
Log the new value of the option.
(gcc::jit::recording::context::set_int_option): Likewise.
(gcc::jit::recording::context::set_bool_option): Likewise.
(gcc::jit::recording::context::compile): Log the value of all
options.
(gcc::jit::recording::context::compile_to_file): Likewise.
(gcc::jit::recording::context::log_all_options): New function.
(gcc::jit::recording::context::log_str_option): New function.
(gcc::jit::recording::context::log_int_option): New function.
(gcc::jit::recording::context::log_bool_option): New function.
* jit-recording.h (gcc::jit::recording::context::log_all_options):
New function.
(gcc::jit::recording::context::log_str_option): New function.
(gcc::jit::recording::context::log_int_option): New function.
(gcc::jit::recording::context::log_bool_option): New function.
* docs/internals/test-hello-world.exe.log.txt: Update for above
changes.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-02-03 David Malcolm <dmalcolm@redhat.com>
PR jit/64810
* Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
(LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
* jit-playback.c: Include gcc.h.
(gcc::jit::playback::context::compile): Move mutex acquisition
to before the call to make_fake_args.
(append_arg_from_driver): New function.
(gcc::jit::playback::context::make_fake_args): On the first call,
call into driver_get_configure_time_options to get configure-time
default options and cache them. Add them to the args for
toplev::main.
* jit-spec.c: New source file.
* docs/internals/test-hello-world.exe.log.txt: Update to reflect
above changes.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-02-02 David Malcolm <dmalcolm@redhat.com>
PR jit/64810
* dummy-frontend.c (jit_langhook_type_for_mode): Support
TYPE_MODE (long_long_integer_type_node).
2015-01-27 David Malcolm <dmalcolm@redhat.com>
* docs/internals/test-hello-world.exe.log.txt: Add example version
lines.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (gcc::jit::dump::get_file): New accessor.
* jit-logging.c: Include toplev.h.
(gcc::jit::logger::logger): Log the GCC version.
* jit-recording.c: Include toplev.h.
(gcc:jit::recording::context::dump_reproducer_to_file): Log the
GCC version.
2015-01-26 David Malcolm <dmalcolm@redhat.com>
* docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
* docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
error buffer is only valid until the next call to the context.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* libgccjit.h (gcc_jit_context_get_first_error): Reword the
comment to omit mention of compiling.
(gcc_jit_context_get_last_error): The error buffer is only valid
until the next call to the context.
2015-01-26 David Malcolm <dmalcolm@redhat.com>
PR jit/64708
* config-lang.in (compilers): Drop "libgccjit.so".
2015-01-23 David Malcolm <dmalcolm@redhat.com>
PR jit/64721
* jit-playback.c (gcc::jit::playback::context::compile): Construct
toplev instances with init_signals=false.
2015-01-19 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/results.rst: Rename to...
* docs/cp/topics/compilation.rst: ...this, and add section on
ahead-of-time compilation.
* docs/cp/topics/index.rst: Update for renaming of results.rst
to compilation.rst.
* docs/examples/emit-alphabet.bf: New file, a sample "brainf"
script.
* docs/examples/tut05-bf.c: New file, implementing a compiler
for "brainf".
* docs/internals/test-hello-world.exe.log.txt: Update to reflect
changes to logger output.
* docs/intro/index.rst: Add tutorial05.rst
* docs/intro/tutorial05.rst: New file.
* docs/topics/results.rst: Rename to...
* docs/topics/compilation.rst: ...this, and add section on
ahead-of-time compilation.
* docs/topics/index.rst: Update for renaming of results.rst to
compilation.rst.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-playback.c (gcc::jit::playback::context::compile): Convert
return type from result * to void. Move the code to convert to
dso and dlopen the result to a new pure virtual "postprocess"
method.
(gcc::jit::playback::compile_to_memory::compile_to_memory): New
function.
(gcc::jit::playback::compile_to_memory::postprocess): New
function, based on playback::context::compile.
(gcc::jit::playback::compile_to_file::compile_to_file): New
function.
(gcc::jit::playback::compile_to_file::postprocess): New function.
(gcc::jit::playback::compile_to_file::copy_file): New function.
(gcc::jit::playback::context::convert_to_dso): Move internals
to...
(gcc::jit::playback::context::invoke_driver): New method. Add
"-shared" and "-c" options to driver's argv as needed.
* jit-playback.h: Include "timevar.h".
(gcc::jit::playback::context::compile): Convert return type from
result * to void.
(gcc::jit::playback::context::postprocess): New pure virtual
function, making this an abstract base class.
(gcc::jit::playback::context::get_tempdir): New accessor.
(gcc::jit::playback::context::invoke_driver): New function.
(class gcc::jit::playback::compile_to_memory): New subclass of
playback::context.
(class gcc::jit::playback::compile_to_file): Likewise.
* jit-recording.c (gcc::jit::recording::context::compile): Use a
playback::compile_to_memory, and extract its result.
(gcc::jit::recording::context::compile_to_file): New function.
* jit-recording.h (gcc::jit::recording::context::compile_to_file):
New function.
* libgccjit++.h (gccjit::context::compile_to_file): New method.
* libgccjit.c (gcc_jit_context_compile): Update log message to
clarify that this is an in-memory compile.
(gcc_jit_context_compile_to_file): New function.
* libgccjit.h (gcc_jit_context): Clarify that you can compile
a context more than once, and that you can compile to a file
as well as to memory.
(gcc_jit_result): Clarify that this is the result of an
in-memory compilation.
(gcc_jit_context_compile): Clarify that you can compile, and that
this is an in-memory compilation.
(enum gcc_jit_output_kind): New enum.
(gcc_jit_context_compile_to_file): New function.
(gcc_jit_context_enable_dump): Clarify comment to cover both forms
of compilation.
* libgccjit.map (gcc_jit_context_compile_to_file): New API
entrypoint.
* notes.txt: Update to show the playback::context::postprocess
virtual function.
2015-01-19 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c
(gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
Add missing format string.
2015-01-16 David Malcolm <dmalcolm@redhat.com>
* Make-lang.in (lang_checks_parallelized): Add "check-jit".
(check_jit_parallelize): Set this to an arbitrary value (10).
2015-01-16 Jakub Jelinek <jakub@redhat.com>
* jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
last argument.
(DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
undef afterwards.
* jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
Likewise.
2015-01-15 Richard Sandiford <richard.sandiford@arm.com>
Update copyright years in docs/.
2015-01-15 David Malcolm <dmalcolm@redhat.com>
* libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
lvalue and the rvalue are of compatible type.
2015-01-13 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/contexts.rst (Debugging): Add
gccjit::context::dump_reproducer_to_file.
* docs/internals/index.rst (Design notes): New section,
discussing input validation and
gcc_jit_context_dump_reproducer_to_file.
* docs/topics/contexts.rst (Debugging): Add
gcc_jit_context_dump_reproducer_to_file.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-common.h (gcc::jit::dump::get_context): New accessor.
* jit-recording.c: Include "hash-map.h".
Within namespace ::gcc::jit...
(dump::write): Flush each line.
(dump::make_location): Pass false for new param "created_by_user".
(class allocator): New class.
(allocator::~allocator): New function.
(allocator::xstrdup_printf): New function.
(allocator::xstrdup_printf_va): New function.
(class reproducer): New subclass of dump.
(reproducer::reproducer): New function.
(reproducer::write_params): New function.
(reproducer::write_args): New function.
(reproducer::make_identifier): New function.
(reproducer::make_tmp_identifier): New function.
(reproducer::get_identifier): New pair of functions.
(reproducer::get_identifier_as_rvalue): New function.
(reproducer::get_identifier_as_lvalue): New function.
(reproducer::get_identifier_as_type): New function.
(reproducer::xstrdup_printf): New function.
(recording::context::context): Initialize m_toplevel_ctxt.
(recording::context::new_location): Add param created_by_user.
(str_option_reproducer_strings): New table of strings.
(int_option_reproducer_strings): Likewise.
(bool_option_reproducer_strings): Likewise.
(get_type_enum_strings): Likewise.
(names_of_function_kinds): Likewise.
(global_kind_reproducer_strings): Likewise.
(unary_op_reproducer_strings): Likewise.
(binary_op_reproducer_strings): Likewise.
(comparison_reproducer_strings): Likewise.
Within namespace ::gcc::jit::recording::...
(context::dump_reproducer_to_file): New function.
(string::write_reproducer): Likewise.
(location::write_reproducer): Likewise.
(type::access_as_type): Likewise.
(memento_of_get_type::write_reproducer): Likewise.
(memento_of_get_pointer::write_reproducer): Likewise.
(memento_of_get_const::write_reproducer): Likewise.
(memento_of_get_volatile::write_reproducer): Likewise.
(array_type::write_reproducer): Likewise.
(function_type::write_reproducer): Likewise.
(function_type::write_deferred_reproducer): Likewise.
(field::write_reproducer): Likewise.
(struct_::access_as_type): Likewise.
(struct_::write_reproducer): Likewise.
(union_::write_reproducer): Likewise.
(fields::write_reproducer): Likewise.
(rvalue::access_as_rvalue): Likewise.
(lvalue::access_as_rvalue): Likewise.
(lvalue::access_as_lvalue): Likewise.
(param::access_as_rvalue): Likewise.
(param::access_as_lvalue): Likewise.
(param::write_reproducer): Likewise.
(function::write_reproducer): Likewise.
(block::write_reproducer): Likewise.
(global::write_reproducer): Likewise.
(memento_of_new_rvalue_from_const <int>::write_reproducer):
Likewise.
(memento_of_new_rvalue_from_const <long>::write_reproducer):
Likewise.
(memento_of_new_rvalue_from_const <double>::write_reproducer):
Likewise.
(memento_of_new_rvalue_from_const <void *>::write_reproducer):
Likewise.
(memento_of_new_string_literal::write_reproducer): Likewise.
(unary_op::write_reproducer): Likewise.
(binary_op::write_reproducer): Likewise.
(comparison::write_reproducer): Likewise.
(cast::write_reproducer): Likewise.
(call::write_reproducer): Likewise.
(call_through_ptr::write_reproducer): Likewise.
(array_access::write_reproducer): Likewise.
(access_field_of_lvalue::write_reproducer): Likewise.
(access_field_rvalue::write_reproducer): Likewise.
(dereference_field_rvalue::write_reproducer): Likewise.
(dereference_rvalue::write_reproducer): Likewise.
(get_address_of_lvalue::write_reproducer): Likewise.
(local::write_reproducer): Likewise.
(eval::write_reproducer): Likewise.
(assignment::write_reproducer): Likewise.
(assignment_op::write_reproducer): Likewise.
(comment::write_reproducer): Likewise.
(conditional::write_reproducer): Likewise.
(jump::write_reproducer): Likewise.
(return_::write_reproducer): Likewise.
* jit-recording.h (gcc::jit::reproducer): New forward declararion.
Within namespace ::gcc::jit::recording::...
(context::new_location): Add "created_by_user" param.
(context::dump_reproducer_to_file): New method.
(context::m_toplevel_ctxt): New field.
(memento::write_reproducer): New pure virtual function.
(memento::dyn_cast_location): New virtual function.
(string::write_reproducer):
(location::location): Add "created_by_user" param.
(location::dyn_cast_location): New function.
(location::created_by_user): New accessor.
(location::write_reproducer): New function.
(location::m_created_by_user): New field.
(type::access_as_type): New virtual function.
(location::write_reproducer): Likewise.
(type::access_as_type): Likewise.
(memento_of_get_type::write_reproducer): Likewise.
(memento_of_get_pointer::write_reproducer): Likewise.
(memento_of_get_const::write_reproducer): Likewise.
(memento_of_get_volatile::write_reproducer): Likewise.
(array_type::write_reproducer): Likewise.
(function_type::write_reproducer): Likewise.
(function_type::write_deferred_reproducer): Likewise.
(field::write_reproducer): Likewise.
(struct_::access_as_type): Likewise.
(struct_::write_reproducer): Likewise.
(union_::write_reproducer): Likewise.
(union_::m_fields): Remove stray unused field.
(fields::length): New accessor.
(fields::get_field): New accessor.
(fields::write_reproducer): New function.
(rvalue::access_as_rvalue): Likewise.
(lvalue::access_as_rvalue): Likewise.
(lvalue::access_as_lvalue): Likewise.
(param::access_as_rvalue): Likewise.
(param::access_as_lvalue): Likewise.
(param::write_reproducer): Likewise.
(function::write_reproducer): Likewise.
(block::write_reproducer): Likewise.
(global::write_reproducer): Likewise.
(memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
Likewise.
(memento_of_new_string_literal::write_reproducer): Likewise.
(unary_op::write_reproducer): Likewise.
(binary_op::write_reproducer): Likewise.
(comparison::write_reproducer): Likewise.
(cast::write_reproducer): Likewise.
(call::write_reproducer): Likewise.
(call_through_ptr::write_reproducer): Likewise.
(array_access::write_reproducer): Likewise.
(access_field_of_lvalue::write_reproducer): Likewise.
(access_field_rvalue::write_reproducer): Likewise.
(dereference_field_rvalue::write_reproducer): Likewise.
(dereference_rvalue::write_reproducer): Likewise.
(get_address_of_lvalue::write_reproducer): Likewise.
(local::write_reproducer): Likewise.
(eval::write_reproducer): Likewise.
(assignment::write_reproducer): Likewise.
(assignment_op::write_reproducer): Likewise.
(comment::write_reproducer): Likewise.
(conditional::write_reproducer): Likewise.
(jump::write_reproducer): Likewise.
(return_::write_reproducer): Likewise.
* libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
* libgccjit.c (gcc_jit_context_new_location): Pass "true" as
param "created_by_user".
(gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
* libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
entrypoint.
* libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
entrypoint.
2015-01-12 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
(gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
ctor.
(gcc::jit::rvalue_usage_validator::visit): New function.
(gcc::jit::recording::rvalue::verify_valid_within_stmt): New
function.
(gcc::jit::recording::rvalue::set_scope): New function.
(gcc::jit::recording::function::function): Call set_scope on each
param, issuing errors for any params that already have a function.
(gcc::jit::recording::block::add_eval): Return the new statement;
update the comment given that some error-checking now happens after
this returns.
(gcc::jit::recording::block::add_assignment): Likewise.
(gcc::jit::recording::block::add_assignment_op): Likewise.
(gcc::jit::recording::block::add_comment): Likewise.
(gcc::jit::recording::block::end_with_conditional): Likewise.
(gcc::jit::recording::block::end_with_jump): Likewise.
(gcc::jit::recording::block::end_with_return): Likewise.
(gcc::jit::recording::block::validate): Add a comment.
(gcc::jit::recording::unary_op::visit_children): New function.
(gcc::jit::recording::binary_op::visit_children): New function.
(gcc::jit::recording::comparison::visit_children): New function.
(gcc::jit::recording::cast::visit_children): New function.
(gcc::jit::recording::call::visit_children): New function.
(gcc::jit::recording::call_through_ptr::visit_children): New function.
(gcc::jit::recording::array_access::visit_children): New function.
(gcc::jit::recording::access_field_of_lvalue::visit_children): New
function.
(gcc::jit::recording::access_field_rvalue::visit_children): New
function.
(gcc::jit::recording::dereference_field_rvalue::visit_children):
New function.
(gcc::jit::recording::dereference_rvalue::visit_children): New
function.
(gcc::jit::recording::get_address_of_lvalue::visit_children): New
function.
* jit-recording.h: Within namespace gcc::jit::recording...
(class rvalue_visitor): New.
(rvalue::rvalue): Initialize m_scope.
(rvalue::get_loc): New accessor.
(rvalue::verify_valid_within_stmt): New function.
(rvalue::visit_children): New pure virtual function.
(rvalue::set_scope): New function.
(rvalue::get_scope): New function.
(rvalue::dyn_cast_param): New function.
(rvalue::m_scope): New field.
(param::visit_children): New empty function.
(param::dyn_cast_param): New function.
(function::get_loc): New function.
(block::add_eval): Return the new statement.
(block::add_assignment): Likewise.
(block::add_assignment_op): Likewise.
(block::add_comment): Likewise.
(block::end_with_conditional): Likewise.
(block::end_with_jump): Likewise.
(block::end_with_return): Likewise.
(global::visit_children): New function.
(memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
New function.
(memento_of_new_string_literal::visit_children): New function.
(unary_op::visit_children): New function.
(binary_op::visit_children): New function.
(comparison::visit_children): New function.
(cast::visit_children): New function.
(call::visit_children): New function.
(call_through_ptr::visit_children): New function.
(array_access::visit_children): New function.
(access_field_of_lvalue::visit_children): New function.
(access_field_rvalue::visit_children): New function.
(dereference_field_rvalue::visit_children): New function.
(dereference_rvalue::visit_children): New function.
(get_address_of_lvalue::visit_children): New function.
(local::local): Call set_scope.
(local::visit_children): New function.
(statement::get_block): Make public.
* libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
(RETURN_NULL_IF_FAIL_PRINTF5): New macro.
(gcc_jit_context_new_function): Verify that each param has
not yet been used for creating another function.
(gcc_jit_block_add_eval): After creating the stmt, verify
that the rvalue expression tree is valid to use within it.
(gcc_jit_block_add_assignment): Likewise for the lvalue and
rvalue expression trees.
(gcc_jit_block_add_assignment_op): Likewise.
(gcc_jit_block_end_with_conditional): Likewise for the boolval
expression tree.
(gcc_jit_block_end_with_return): Likewise for the rvalue
expression tree.
(gcc_jit_block_end_with_void_return): Remove return of "void",
now that block::end_with_return is now non-void.
2015-01-12 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (gcc::jit::playback::context::read_dump_file):
Add missing fclose on error-handling path.
2015-01-12 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/expressions.rst (Global variables): Add
enum gcc_jit_global_kind param to gccjit::context::new_global.
* docs/topics/expressions.rst (Global variables): Likewise.
Document the new enum.
* docs/topics/results.rst (Compilation results): Document
globals-handling.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* dummy-frontend.c (jit_langhook_write_globals): Call into the
playback context's write_global_decls_1 and write_global_decls_2
before and after calling symtab->finalize_compilation_unit ().
* jit-playback.c: Include "debug.h".
(gcc::jit::playback::context::new_global): Add "kind" param and
use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
underlying VAR_DECL. Call varpool_node::get_create on the
VAR_DECL, and add it to m_globals.
(gcc::jit::playback::context::write_global_decls_1): New function.
(gcc::jit::playback::context::write_global_decls_2): New function.
* jit-playback.h (gcc::jit::playback::context::context): Call
create on m_globals.
(gcc::jit::playback::context::new_global): Add "kind" param.
(gcc::jit::playback::context::write_global_decls_1): New function.
(gcc::jit::playback::context::write_global_decls_2): New function.
(gcc::jit::playback::context::m_globals): New field.
* jit-recording.c (gcc::jit::recording::context::context):
Initialize m_globals.
(gcc::jit::recording::context::new_global): Add param "kind".
Add the new global to m_globals.
(gcc::jit::recording::context::dump_to_file): Dump the globals.
(gcc::jit::recording::global::replay_into): Add field m_kind.
(gcc::jit::recording::global::write_to_dump): New override.
* jit-recording.h (gcc::jit::recording::context::new_global): Add
param "kind".
(gcc::jit::recording::context::m_globals): New field.
(gcc::jit::recording::global::global): Add param kind.
(gcc::jit::recording::global::write_to_dump): New override.
(gcc::jit::recording::global::m_kind): New field.
* jit-result.c (gcc::jit::result::get_global): New function.
* jit-result.h (gcc::jit::result::get_global): New function.
* libgccjit++.h (gccjit::context::new_global): Add "kind" param.
* libgccjit.c (gcc_jit_context_new_global): Likewise.
(gcc_jit_result_get_global): New API entrypoint.
* libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
(enum gcc_jit_global_kind): New enum.
(gcc_jit_context_new_global): API change: add "kind" param.
* libgccjit.map (gcc_jit_result_get_global): New symbol.
2015-01-09 David Malcolm <dmalcolm@redhat.com>
* dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
"symtab.h", "inchash.h". Move include of "hash-set.h" much
earlier.
* jit-builtins.c: Remove redundant includes of "opts.h" and
"tree.h".
* jit-common.h: Include "hash-set.h", "input.h", "vec.h",
"double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
* jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
"statistics.h", "vec.h", "double-int.h", "real.h",
"fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
"inchash.h", "fold-const.h". Move include of "hash-set.h" to
earlier.
* jit-recording.c: Remove redundant includes of "opts.h" and
"tree.h".
2015-01-09 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/expressions.rst (Simple expressions): Use
":c:type:" for C types. Document new overload of
gcc::jit::context::new_rvalue.
* docs/topics/expressions.rst (Simple expressions): Use
":c:type:" for C types. Document new entrypoint
gcc_jit_context_new_rvalue_from_long.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-playback.c: Within namespace gcc::jit::playback...
(context::new_rvalue_from_int): Eliminate in favor of...
(context::new_rvalue_from_const <int>): ...this.
(context::new_rvalue_from_double): Eliminate in favor of...
(context::new_rvalue_from_const <double>): ...this.
(context::new_rvalue_from_const <long>): New.
(context::new_rvalue_from_ptr): Eliminate in favor of...
(context::new_rvalue_from_const <void *>): ...this.
* jit-playback.h: Within namespace gcc::jit::playback...
(context::new_rvalue_from_int): Eliminate in favor of...
(context::new_rvalue_from_const <HOST_TYPE>): ...this.
(context::new_rvalue_from_double): Likewise.
(context::new_rvalue_from_ptr): Likewise.
* jit-recording.c: Within namespace gcc::jit::recording...
(context::new_rvalue_from_int): Eliminate.
(context::new_rvalue_from_double): Likewise.
(context::new_rvalue_from_ptr): Likewise.
(class memento_of_new_rvalue_from_const <int>):
Add explicit specialization.
(class memento_of_new_rvalue_from_const <long>):
Likewise.
(class memento_of_new_rvalue_from_const <double>):
Likewise.
(class memento_of_new_rvalue_from_const <void *>):
Likewise.
(memento_of_new_rvalue_from_int::replay_into):
Generalize into...
(memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
...this...
(memento_of_new_rvalue_from_double::replay_into):
...allowing this...
(memento_of_new_rvalue_from_ptr::replay_into):
...and this to be deleted.
(memento_of_new_rvalue_from_int::make_debug_string):
Convert to...
(memento_of_new_rvalue_from_const <int>::make_debug_string):
...this.
(memento_of_new_rvalue_from_double::make_debug_string):
Convert to...
(memento_of_new_rvalue_from_const <double>::make_debug_string):
...this.
(memento_of_new_rvalue_from_ptr::make_debug_string)
Convert to...
(memento_of_new_rvalue_from_const <void *>::make_debug_string):
...this.
(memento_of_new_rvalue_from_const <long>::make_debug_string):
New function.
* jit-recording.h: Within namespace gcc::jit::recording...
(context::new_rvalue_from_int): Eliminate.
(context::new_rvalue_from_double): Likewise.
(context::new_rvalue_from_ptr): Likewise, all in favor of...
(context::new_rvalue_from_const <HOST_TYPE>): New family of
methods.
(class memento_of_new_rvalue_from_int): Eliminate.
(class memento_of_new_rvalue_from_double): Likewise.
(class memento_of_new_rvalue_from_ptr): Likewise.
(class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
of rvalue subclasses.
* libgccjit++.h (gccjit::context::new_rvalue): New overload, for
"long".
* libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
rewriting of recording::context::new_rvalue_from_int to
recording::context::new_rvalue_from_const <int>.
(gcc_jit_context_new_rvalue_from_long): New API entrypoint.
(gcc_jit_context_new_rvalue_from_double): Update for
rewriting of recording::context::new_rvalue_from_double to
recording::context::new_rvalue_from_const <double>.
(gcc_jit_context_new_rvalue_from_ptr): Update for
rewriting of recording::context::new_rvalue_from_ptr to
recording::context::new_rvalue_from_const <void *>.
* libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
entrypoint.
* libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
2015-01-09 David Malcolm <dmalcolm@redhat.com>
PR jit/64206
* docs/internals/test-hello-world.exe.log.txt: Update, the log now
shows tempdir creation/cleanup.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
to the list of subclasses in the comment.
* jit-playback.c (gcc::jit::playback::context::context): Add a
comment clarifying when the tempdir gets cleaned up.
(gcc::jit::playback::context::compile): Pass the context's logger,
if any, to the tempdir.
(gcc::jit::playback::context::dlopen_built_dso): When creating the
gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
over ownership of the tempdir to it.
* jit-result.c: Include "jit-tempdir.h".
(gcc::jit::result::result): Add tempdir param, saving it as
m_tempdir.
(gcc::jit::result::~result): Delete m_tempdir.
* jit-result.h (gcc::jit::result::result): Add tempdir param.
(gcc::jit::result::m_tempdir): New field.
* jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
add JIT_LOG_SCOPE.
(gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
and log m_path_template and m_path_tempdir.
(gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
entry/exit, and log the unlink and rmdir calls.
* jit-tempdir.h: Include "jit-logging.h".
(class gcc::jit::tempdir): Make this be a subclass of log_user.
(gcc::jit::tempdir::tempdir): Add logger param.
* notes.txt: Update to show the two possible places where the
tempdir can be cleaned up.
2015-01-08 David Malcolm <dmalcolm@redhat.com>
* libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
comment.
2015-01-08 David Malcolm <dmalcolm@redhat.com>
* docs/topics/contexts.rst (Error-handling): Document new
entrypoint gcc_jit_context_get_last_error.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-recording.c (gcc::jit::recording::context::context):
Initialize new fields "m_last_error_str" and
"m_owns_last_error_str".
(gcc::jit::recording::context::~context): Clean up
m_last_error_str, if needed.
(gcc::jit::recording::context::add_error_va): Update
m_last_error_str and m_owns_last_error_str, freeing the old
value if appropriate.
(gcc::jit::recording::context::get_last_error): New function.
* jit-recording.h (gcc::jit::recording::context::get_last_error):
New function.
(gcc::jit::recording::context): New fields m_last_error_str and
m_owns_last_error_str.
* libgccjit.c (gcc_jit_context_get_last_error): New function.
* libgccjit.h (gcc_jit_context_get_last_error): New declaration.
* libgccjit.map (gcc_jit_context_get_last_error): New function.
2015-01-08 David Malcolm <dmalcolm@redhat.com>
* Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
* docs/internals/index.rst (Overview of code structure): Mention
gcc_jit_context_set_logfile, and embed the example logfile.
* docs/internals/test-hello-world.exe.log.txt: New file: example
of a logfile.
* docs/topics/contexts.rst (Debugging): Add documentation
for gcc_jit_context_set_logfile.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* dummy-frontend.c: Include "jit-logging.h".
(jit_langhook_init): Assert that there is an active playback
context. If it has a logger, log entry/exit to this function.
(jit_langhook_write_globals): Likewise.
* jit-common.h (gcc::jit::logger): New forward declaration.
* jit-logging.c: New file.
* jit-logging.h: New file.
* jit-playback.c: Include "jit-logging.h".
(gcc::jit::playback::context::context): Initialize the log_user
base class from the recording context's logger (if any). Use
JIT_LOG_SCOPE to log entry/exit from the function body.
(gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
log entry/exit from the function body.
(gcc::jit::playback::build_stmt_list): Likewise.
(gcc::jit::playback::function::postprocess): Likewise.
(gcc::jit::playback::context::compile): Likewise. Log the
entry/exit to toplev::main and toplev::finalize. Log the
fake argv passed to toplev::main.
(gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
log entry/exit from the function body.
(gcc::jit::playback::context::release_mutex): Likewise.
(gcc::jit::playback::context::make_fake_args): Likewise.
(gcc::jit::playback::context::extract_any_requested_dumps):
Likewise.
(gcc::jit::playback::context::convert_to_dso): Likewise. Also,
log the arguments that the driver is invoked with.
(gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
the logger to the result object.
(gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
log entry/exit from the function body.
(gcc::jit::playback::context::dump_generated_code): Likewise.
(gcc::jit::playback::context::handle_locations): Likewise.
* jit-playback.h (gcc::jit::playback::context): Make this be
a subclass of gcc::jit::log_user.
* jit-recording.c: Include "jit-logging.h".
(gcc::jit::recording::context::context: Initialize the logger to
NULL for root contexts, or to the parent's logger for child
contexts.
(gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
log entry/exit from the function body.
(gcc::jit::recording::context::replay_into): Likewise.
(gcc::jit::recording::context::disassociate_from_playback):
Likewise.
(gcc::jit::recording::context::compile): Likewise.
(recording::context::add_error_va): Likewise. Also, log the
error.
(gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
log entry/exit from the function body.
* jit-recording.h: Include "jit-logging.h".
(gcc::jit::recording::context): Make this be a subclass of
gcc::jit::log_user.
* jit-result.c: Include "jit-common.h" and "jit-logging.h".
(gcc::jit::result::result): Add logger param, recording it.
Use JIT_LOG_SCOPE to log entry/exit from the function body.
(gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
log entry/exit from the function body.
(gcc::jit::result::get_code): Likewise.
* jit-result.h (gcc::jit::result): Make this be a subclass of
gcc::jit::log_user.
(gcc::jit::result::result): Add logger parameter.
* libgccjit++.h (gccjit::context::set_logfile): New function.
* libgccjit.c: Include "jit-logging.h".
(gcc_jit_context_acquire): Log the context.
(gcc_jit_context_release): Use JIT_LOG_FUNC to
log entry/exit from the function body, and log the context.
(gcc_jit_context_new_child_context): Likewise, logging both
contexts.
(gcc_jit_context_new_location): Use JIT_LOG_FUNC to
log entry/exit from the function body.
(gcc_jit_context_get_type): Likewise.
(gcc_jit_context_get_int_type): Likewise.
(gcc_jit_context_new_array_type): Likewise.
(gcc_jit_context_new_field): Likewise.
(gcc_jit_context_new_struct_type): Likewise.
(gcc_jit_context_new_opaque_struct): Likewise.
(gcc_jit_struct_set_fields): Likewise.
(gcc_jit_context_new_union_type): Likewise.
(gcc_jit_context_new_function_ptr_type): Likewise.
(gcc_jit_context_new_param): Likewise.
(gcc_jit_context_new_function): Likewise.
(gcc_jit_context_get_builtin_function): Likewise.
(gcc_jit_function_get_param): Likewise.
(gcc_jit_function_dump_to_dot): Likewise.
(gcc_jit_function_new_block): Likewise.
(gcc_jit_context_new_global): Likewise.
(gcc_jit_context_new_rvalue_from_int): Likewise.
(gcc_jit_context_zero): Likewise.
(gcc_jit_context_one): Likewise.
(gcc_jit_context_new_rvalue_from_double): Likewise.
(gcc_jit_context_new_rvalue_from_ptr): Likewise.
(gcc_jit_context_null): Likewise.
(gcc_jit_context_new_string_literal): Likewise.
(gcc_jit_context_new_unary_op): Likewise.
(gcc_jit_context_new_binary_op): Likewise.
(gcc_jit_context_new_comparison): Likewise.
(gcc_jit_context_new_call): Likewise.
(gcc_jit_context_new_call_through_ptr): Likewise.
(gcc_jit_context_new_cast): Likewise.
(gcc_jit_context_new_array_access): Likewise.
(gcc_jit_lvalue_access_field): Likewise.
(gcc_jit_rvalue_access_field): Likewise.
(gcc_jit_rvalue_dereference_field): Likewise.
(gcc_jit_rvalue_dereference): Likewise.
(gcc_jit_lvalue_get_address): Likewise.
(gcc_jit_function_new_local): Likewise.
(gcc_jit_block_add_eval): Likewise.
(gcc_jit_block_add_assignment): Likewise.
(gcc_jit_block_add_assignment_op): Likewise.
(gcc_jit_block_end_with_conditional): Likewise.
(gcc_jit_block_add_comment): Likewise.
(gcc_jit_block_end_with_jump): Likewise.
(gcc_jit_block_end_with_return): Likewise.
(gcc_jit_block_end_with_void_return): Likewise.
(gcc_jit_context_set_str_option): Likewise.
(gcc_jit_context_set_int_option): Likewise.
(gcc_jit_context_set_bool_option): Likewise.
(gcc_jit_context_enable_dump): Likewise.
(gcc_jit_context_compile): Likewise. Also log the context,
and the result.
(gcc_jit_context_dump_to_file): Likewise.
(gcc_jit_context_set_logfile): New function.
(gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
log entry/exit from the function body.
(gcc_jit_result_get_code): Likewise. Also log the fnname)
and the ptr to be returned.
(gcc_jit_result_release): Likewise. Also log the result.
* libgccjit.h: Include <stdio.h>, since we need FILE *.
(gcc_jit_context_set_logfile): New declaration.
* libgccjit.map (gcc_jit_context_set_logfile): New.
2015-01-07 David Malcolm <dmalcolm@redhat.com>
* jit-recording.h (gcc::jit::recording::type::is_void): New
virtual function.
(gcc::jit::recording::memento_of_get_type::is_void): New
function, overriding default implementation.
* libgccjit.c (gcc_jit_rvalue_dereference): Verify that
the underlying type is not "void".
2015-01-07 David Malcolm <dmalcolm@redhat.com>
* docs/topics/expressions.rst (Unary Operations): Add
GCC_JIT_UNARY_OP_ABS.
* jit-playback.c (gcc::jit::playback::context::new_unary_op):
Likewise.
* jit-recording.c (unary_op_strings): Likewise.
* libgccjit.c (gcc_jit_context_new_unary_op): Update checking
of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
* libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-01-07 David Malcolm <dmalcolm@redhat.com>
* jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
typo in comment.
2015-01-07 David Malcolm <dmalcolm@redhat.com>
* TODO.rst (Test suite): Remove item about running C++ testcases.
* docs/internals/index.rst (Working on the JIT library): Add
"c++" to the enabled languages in the suggested "configure"
invocation, and add a description of why this is necessary.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-01-07 David Malcolm <dmalcolm@redhat.com>
* docs/internals/index.rst: Update to reflect that built
testcases are now test-foo.c.exe, rather than test-foo.exe.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2015-01-05 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2014-12-19 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (gcc::jit::playback::context::build_cast): In
case BOOLEAN_TYPE, don't assume that the source expression is
of type "int".
2014-12-19 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c (gcc::jit::recording::context::context): When
copying string options from a parent context, take a copy of the
underlying buffers, rather than simply copying the pointer.
2014-12-19 David Malcolm <dmalcolm@redhat.com>
* jit-recording.c (gcc::jit::recording::context::set_str_option):
Handle NULL.
2014-12-11 David Malcolm <dmalcolm@redhat.com>
* docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
Document new function.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2014-12-10 Ulrich Drepper <drepper@gmail.com>
Minor interface cleanups of libgccjit
* jit-playback.c (convert_to_dso): Use auto_vec instead
of automatic array to build up command line.
* jit-recording.c (recording::context::set_str_option):
Make copy of the string.
(recording::context::~context): Free string options.
* jit-recording.h (recording::context): Adjust type
of m_str_options member.
* libgccjit.h: Adjust comment about
gcc_jit_context_set_str_option parameter being used after
the call.
Update comment now that all interfaces are copy strings
if necessary.
* libgccjit++.h (gccjit::context): Add set_str_option
member function.
2014-12-10 David Malcolm <dmalcolm@redhat.com>
* docs/cp/index.rst: New file.
* docs/cp/intro/index.rst: New file.
* docs/cp/intro/tutorial01.rst: New file.
* docs/cp/intro/tutorial02.rst: New file.
* docs/cp/intro/tutorial03.rst: New file.
* docs/cp/intro/tutorial04.rst: New file.
* docs/cp/topics/contexts.rst: New file.
* docs/cp/topics/expressions.rst: New file.
* docs/cp/topics/functions.rst: New file.
* docs/cp/topics/index.rst: New file.
* docs/cp/topics/locations.rst: New file.
* docs/cp/topics/objects.rst: New file.
* docs/cp/topics/results.rst: New file.
* docs/cp/topics/types.rst: New file.
* docs/examples/tut01-hello-world.cc: New file.
* docs/examples/tut02-square.c: Fix missing newline in output.
* docs/examples/tut02-square.cc: New file.
* docs/examples/tut03-sum-of-squares.cc: New file.
* docs/examples/tut04-toyvm/toyvm.cc: New file.
* docs/index.rst: Move summary to above the table of contents.
Add text about the C vs C++ APIs.
* docs/topics/contexts.rst: Fix a typo.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* docs/_build/texinfo/factorial1.png: New file.
* docs/_build/texinfo/sum-of-squares1.png: New file.
2014-12-09 David Malcolm <dmalcolm@redhat.com>
* docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
logic for determine "funcname" to new function...
(get_function_name): ...here, adding logic to skip any leading
path from the filename.
(toyvm_function_parse): Use the filename for fn_filename, rather
than "name", so that the debugger can locate the source .toy
file.
(toyvm_function_parse): Don't fclose a NULL FILE *.
2014-12-09 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* docs/internals/index.rst (Running under valgrind): New
subsection.
(docs/_build/texinfo/libgccjit.texi): Regenerate.
2014-12-09 David Malcolm <dmalcolm@redhat.com>
PR jit/64206
* Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
* jit-common.h (gcc::jit::tempdir): New forward decl.
* jit-playback.c: Include jit-tempdir.h.
(gcc::jit::playback::context::context): Initialize m_tempdir.
(gcc::jit::playback::context::~context): Move tempdir
cleanup to new file jit-tempdir.c
(make_tempdir_path_template): Move to new file jit-tempdir.c.
(gcc::jit::playback::context::compile): Move tempdir creation
to new tempdir object in new file jit-tempdir.c.
(gcc::jit::playback::context::make_fake_args): Get path from
tempdir object rather than from member data.
(gcc::jit::playback::context::convert_to_dso): Likewise.
(gcc::jit::playback::context::dlopen_built_dso): Likewise.
(gcc::jit::playback::context::dump_generated_code): Likewise.
(gcc::jit::playback::context::get_path_c_file): New function.
(gcc::jit::playback::context::get_path_s_file): New function.
(gcc::jit::playback::context::get_path_so_file): New function.
* jit-playback.h (gcc::jit::playback::context::get_path_c_file):
New function.
(gcc::jit::playback::context::get_path_s_file): New function.
(gcc::jit::playback::context::get_path_so_file): New function.
(gcc::jit::playback::context): Move fields "m_path_template",
"m_path_tempdir", "m_path_c_file", "m_path_s_file",
"m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
* jit-tempdir.c: New file.
* jit-tempdir.h: New file.
2014-12-09 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (gcc::jit::playback::context::compile): Acquire the
mutex here, immediately before using toplev, and release it here, on
each exit path after acquisition.
(jit_mutex): Move this variable here, from jit-recording.c.
(gcc::jit::playback::context::acquire_mutex): New function, based on
code in jit-recording.c.
(gcc::jit::playback::context::release_mutex): Likewise.
* jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
function.
(gcc::jit::playback::context::release_mutex): New function.
* jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
(gcc::jit::recording::context::compile): Move mutex-handling from
here into jit-playback.c's gcc::jit::playback::context::compile.
* notes.txt: Update to show the new locations of ACQUIRE_MUTEX
and RELEASE_MUTEX.
2014-12-09 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (gcc::jit::playback::context::compile): Move the
dlopen code into...
(gcc::jit::playback::context::dlopen_built_dso): ...this new
function.
* jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
New function.
2014-12-09 David Malcolm <dmalcolm@redhat.com>
PR jit/64166
* docs/topics/contexts.rst (Debugging): Add description of
gcc_jit_context_enable_dump.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-playback.c: Include context.h.
(class auto_argvec): New class.
(auto_argvec::~auto_argvec): New function.
(gcc::jit::playback::context::compile): Convert fake_args to be
an auto_argvec, so that it can contain dynamically-allocated
strings. Construct a vec of all requested dumps, and pass it to
make_fake_args. Extract requested dumps between the calls to
toplev::main and toplev::finalize.
(gcc::jit::playback::context::make_fake_args): Convert param
"argvec" to be a vec <char *>, and gain a "requested_dumps"
param. Convert to dynamically-allocated arg strings by converting
ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
for args that are already a copy. Add args for all requested dumps.
(gcc::jit::playback::context::extract_any_requested_dumps): New
function.
(gcc::jit::playback::context::read_dump_file): New function.
* jit-playback.h (gcc::jit::playback::context::make_fake_args):
Convert param "argvec" to be a vec <char *>, and gain a
"requested_dumps" param.
(gcc::jit::playback::context::extract_any_requested_dumps): New
function.
(gcc::jit::playback::context::read_dump_file): New function.
* jit-recording.c (gcc::jit::recording::context::enable_dump): New
function.
(gcc::jit::recording::context::get_all_requested_dumps): New
function.
* jit-recording.h (gcc::jit::recording::requested_dump): New
struct.
(gcc::jit::recording::context::enable_dump): New function.
(gcc::jit::recording::context::get_all_requested_dumps): New
function.
(gcc::jit::recording::context::m_requested_dumps): New field.
* libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
* libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
* libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
2014-12-08 David Malcolm <dmalcolm@redhat.com>
* libgccjit++.h: Indent the forward declarations of the classes to
show the inheritance hierarchy.
2014-12-08 David Malcolm <dmalcolm@redhat.com>
* notes.txt: Show the beginning and ending of
recording::context::compile vs playback::context::compile. Show
the creation and unlinking of the tempdir. Show toplev::finalize.
Move "RELEASE MUTEX" to the correct location. Show
gcc_jit_result_release, and indicate where the
dlopen/dlsym/dlclose occur.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
* docs/examples/tut02-square.c (main): Release the context
earlier, to show that this is possible. Update error-handling
to avoid a double-release of the context, and to avoid
releasing a NULL result.
* docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
* docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
* docs/topics/results.rst (gcc_jit_result): Mention that this
controls the lifetimes of machine code functions.
(gcc_jit_result_get_code): Spell out the requirements for this
to succeed, and the lifetime of the result.
(gcc_jit_result_release): Mention that this invalidates any code
that was obtained from the result.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
PR jit/64018
* docs/intro/tutorial02.rst: Spell out lifetime of generated code.
Add description of error-handling, taken in part from...
* docs/topics/contexts.rst (Error-handling): Expand, and move some
content to tutorial02.rst.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
PR jit/64020
* docs/topics/types.rst (Standard types) Add new enum values to
the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
Widen the left-hand column so that
GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* jit-builtins.c: Include stringpool.h and jit-playback.h.
Move everything out of the gcc::jit::recording namespace into
just gcc::jit.
(struct builtin_data): Add fields "fnclass", "attr", and
"implicit_p".
(DEF_BUILTIN): Update macro so populate the new fields.
(builtins_manager::builtins_manager): Update for move out of
recording namespace. Initialize the m_attributes array.
(builtins_manager::get_builtin_function): Likewise.
(builtins_manager::get_builtin_function_by_id): New function.
(builtins_manager::make_builtin_function): Update for move out of
recording namespace. Add fix for PR jit/64020 by detecting
specific builtin ids and having them ensure that builtins for
other ids are created as necessary.
(builtins_manager::get_type): Update for move out of recording
namespace.
(builtins_manager::make_type): Likewise. Add some missing
#undefs.
(builtins_manager::make_primitive_type): Update for move out of
recording namespace. Implement the three BT_COMPLEX_ cases and
BT_DOUBLE_PTR.
(builtins_manager::make_fn_type): Update for move out of recording
namespace.
(builtins_manager::make_ptr_type): Likewise.
(builtins_manager::finish_playback): New function.
(builtins_manager::get_class): New function.
(builtins_manager::implicit_p): New function.
(builtins_manager::get_attrs_tree): Two new functions.
(builtins_manager::make_attrs_tree): New function.
* jit-builtins.h: Move everything out of the gcc::jit::recording
namespace into just gcc::jit.
(enum built_in_attribute): New.
(builtins_manager::builtins_manager): Update decl for namespace
change.
(builtins_manager::get_builtin_function): Likewise.
(builtins_manager::get_class): New.
(builtins_manager::implicit_p): New.
(builtins_manager::get_attrs_tree): Two new functions.
(builtins_manager::make_attrs_tree): New function.
(builtins_manager::finish_playback): New.
(builtins_manager::get_builtin_function_by_id): New.
(builtins_manager::make_builtin_function): Update decl for
namespace change.
(builtins_manager::get_type): Likewise.
(builtins_manager::make_type): Likewise.
(builtins_manager::make_primitive_type): Likewise.
(builtins_manager::make_fn_type): Likewise.
(builtins_manager::make_ptr_type): Likewise.
(builtins_manager): Likewise for fields. Add new field
"m_attributes".
* jit-common.h (NUM_GCC_JIT_TYPES): Update.
(builtins_manager): Update forward decl to reflect namespace
change.
* jit-playback.c: Include attribs.h and jit-builtins.h.
(gcc::jit::playback::context::get_tree_node_for_type): Add cases
for the new COMPLEX_ types.
(gcc::jit::playback::context::new_function): If creating a
builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
and call set_builtin_decl.
(gcc::jit::playback::context::replay): If we have a
builtins_manager, call its finish_playback method when we're done.
* jit-playback.h:
(gcc::jit::playback::context::get_builtins_manager): New function.
* jit-recording.c
(gcc::jit::recording::context::get_builtins_manager): New function.
(gcc::jit::recording::get_builtin_function): Use
get_builtins_manager, in case we're a child context.
(gcc::jit::recording::memento_of_get_type::dereference): Add the
COMPLEX_ types.
(gcc::jit::recording::memento_of_get_type::is_int): Likewise.
(gcc::jit::recording::memento_of_get_type::is_float): Likewise.
(gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
(get_type_strings): Likewise.
* jit-recording.h
(gcc::jit::recording::context::get_builtins_manager): New.
* libgccjit.h (enum gcc_jit_types): Add
GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
* jit-builtins.c
(gcc::jit::recording::builtins_manager::get_builtin_function):
Check for NULL return from make_builtin_function.
(gcc::jit::recording::builtins_manager::make_builtin_function):
Check for NULL return from get_type.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (gcc::jit::playback::context::compile): Move DSO
creation code into...
(gcc::jit::playback::context::convert_to_dso): New function.
* jit-playback.h (gcc::jit::playback::context::convert_to_dso):
New function.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
* jit-playback.c (gcc::jit::playback::context::compile): Use an
auto_vec<const char *> rather than a const char *[20] for the
top-level argv, and move the logic to build it to...
(gcc::jit::playback::context::make_fake_args): New function.
* jit-playback.h (gcc::jit::playback::context::make_fake_args):
New function.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
* Make-lang.in (jit_OBJS): Add jit/jit-result.o.
* jit-playback.c: Include new header jit-result.h.
(gcc::jit::result::result): Move to new file jit-result.c.
(gcc::jit::result::~result): Likewise.
(gcc::jit::playback::result): Likewise.
* jit-recording.h (class gcc::jit::result): Move to new
header jit-result.h.
* jit-result.c: New file, to contain...
(gcc::jit::result::result): Move here from jit-playback.c,
removing erroneous "playback" namespace from comment.
(gcc::jit::result::~result): Likewise.
(gcc::jit::playback::result): Likewise.
* jit-result.h: New file, to contain...
(class gcc::jit::result): Move from jit-recording.h.
* libgccjit.c: Include jit-result.h.
(gcc_jit_result_get_code): Update comment to reflect move
of implementation.
(gcc_jit_result_release): Likewise.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* docs/examples/tut04-toyvm/toyvm.c
(toyvm_compiled_function): New typedef.
(toyvm_compiled_func) Rename to...
(toyvm_compiled_code) ...this.
(struct toyvm_compiled_function): New struct.
(toyvm_function_compile): Return a toyvm_compiled_function *
rather than a toyvm_compiled_func, so that the caller can fully
clean things up. Free "funcname".
(test_script): Update for change to toyvm_function_compile.
Clean up the toyvm_compiled_function.
(main): Likewise.
(docs/intro/tutorial04.rst): Update to reflect the above changes,
and to better spell out the lifetime of the compiled code.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* jit-builtins.c
(gcc::jit::recording::builtins_manager::make_fn_type): Call the
context's new_function_type method, rather than directly creating
a function_type instance.
* jit-recording.c
(gcc::jit::recording::context::new_function_type): New method,
adapted from part of...
(gcc::jit::recording::context::new_function_ptr_type): ...this.
Update to call new_function_type.
* jit-recording.h
(gcc::jit::recording::context::new_function_type): New method.
2014-12-01 David Malcolm <dmalcolm@redhat.com>
PR jit/63969
* jit-playback.c: Ensure that ctxt_progname is non-NULL.
2014-11-19 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* jit-playback.c (gcc::jit::playback::compound_type::set_fields):
Convert param from const vec<playback::field *> & to
const auto_vec<playback::field *> *.
(gcc::jit::playback::context::new_function_type): Convert param
"param_types" from vec<type *> * to const auto_vec<type *> *.
(gcc::jit::playback::context::new_function): Convert param
"params" from vec<param *> * to const auto_vec<param *> *.
(gcc::jit::playback::context::build_call): Convert param "args"
from vec<rvalue *> to const auto_vec<rvalue *> *.
(gcc::jit::playback::context::new_call): Likewise.
(gcc::jit::playback::context::new_call_through_ptr): Likewise.
(wrapper_finalizer): New function.
(gcc::jit::playback::wrapper::operator new): Call the finalizer
variant of ggc_internal_cleared_alloc, supplying
wrapper_finalizer.
(gcc::jit::playback::function::finalizer): New.
(gcc::jit::playback::block::finalizer): New.
(gcc::jit::playback::source_file::finalizer): New.
(gcc::jit::playback::source_line::finalizer): New.
* jit-playback.h
(gcc::jit::playback::context::new_function_type): Convert param
"param_types" from vec<type *> * to const auto_vec<type *> *.
(gcc::jit::playback::context::new_function): Convert param
"params" from vec<param *> * to const auto_vec<param *> *.
(gcc::jit::playback::context::new_call): Convert param
"args" from vec<rvalue *> to const auto_vec<rvalue *> *.
(gcc::jit::playback::context::new_call_through_ptr): Likewise.
(gcc::jit::playback::context::build_call): Likewise.
(gcc::jit::playback::context): Convert fields "m_functions",
"m_source_files", "m_cached_locations" from vec to auto_vec.
(gcc::jit::playback::wrapper::finalizer): New virtual function.
(gcc::jit::playback::compound_type::set_fields): Convert param fro
const vec<playback::field *> & to
const auto_vec<playback::field *> *.
(gcc::jit::playback::function::finalizer): New.
(gcc::jit::playback::block::finalizer): New.
(gcc::jit::playback::source_file::finalizer): New.
(gcc::jit::playback::source_line::finalizer): New.
* jit-recording.c
(gcc::jit::recording::function_type::replay_into): Convert local
from a vec into an auto_vec.
(gcc::jit::recording::fields::replay_into): Likewise.
(gcc::jit::recording::function::replay_into): Likewise.
(gcc::jit::recording::call::replay_into): Likewise.
(gcc::jit::recording::call_through_ptr::replay_into): Likewise.
* jit-recording.h (gcc::jit::recording::context): Convert fields
"m_mementos", "m_compound_types", "m_functions" from vec<> to
auto_vec <>.
(gcc::jit::recording::function_type::get_param_types): Convert
return type from vec<type *> to const vec<type *> &.
(gcc::jit::recording::function_type): Convert field
"m_param_types" from a vec<> to an auto_vec<>.
(gcc::jit::recording::fields): Likewise for field "m_fields".
(gcc::jit::recording::function::get_params): Convert return type
from vec <param *> to const vec<param *> &.
(gcc::jit::recording::function): Convert fields "m_params",
"m_locals", "m_blocks" from vec<> to auto_vec<>.
(gcc::jit::recording::block): Likewise for field "m_statements".
vec<> to auto_vec<>.
(gcc::jit::recording::call): Likewise for field "m_args".
(gcc::jit::recording::call_through_ptr): Likewise.
2014-11-19 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* jit-recording.c (recording::function::validate): Convert
"worklist" from vec<> to autovec<> to fix a leak.
2014-11-11 David Malcolm <dmalcolm@redhat.com>
* ChangeLog.jit: New.
* ChangeLog: New.
* Make-lang.in: New.
* TODO.rst: New.
* config-lang.in: New.
* docs/Makefile: New.
* docs/_build/texinfo/Makefile: New.
* docs/_build/texinfo/factorial.png: New.
* docs/_build/texinfo/libgccjit.texi: New.
* docs/_build/texinfo/sum-of-squares.png: New.
* docs/conf.py: New.
* docs/examples/tut01-hello-world.c: New.
* docs/examples/tut02-square.c: New.
* docs/examples/tut03-sum-of-squares.c: New.
* docs/examples/tut04-toyvm/Makefile: New.
* docs/examples/tut04-toyvm/factorial.toy: New.
* docs/examples/tut04-toyvm/fibonacci.toy: New.
* docs/examples/tut04-toyvm/toyvm.c: New.
* docs/index.rst: New.
* docs/internals/index.rst: New.
* docs/intro/factorial.png: New.
* docs/intro/index.rst: New.
* docs/intro/sum-of-squares.png: New.
* docs/intro/tutorial01.rst: New.
* docs/intro/tutorial02.rst: New.
* docs/intro/tutorial03.rst: New.
* docs/intro/tutorial04.rst: New.
* docs/topics/contexts.rst: New.
* docs/topics/expressions.rst: New.
* docs/topics/functions.rst: New.
* docs/topics/index.rst: New.
* docs/topics/locations.rst: New.
* docs/topics/objects.rst: New.
* docs/topics/results.rst: New.
* docs/topics/types.rst: New.
* dummy-frontend.c: New.
* jit-builtins.c: New.
* jit-builtins.h: New.
* jit-common.h: New.
* jit-playback.c: New.
* jit-playback.h: New.
* jit-recording.c: New.
* jit-recording.h: New.
* libgccjit++.h: New.
* libgccjit.c: New.
* libgccjit.h: New.
* libgccjit.map: New.
* notes.txt: New.
2013-07-26 David Malcolm <dmalcolm@redhat.com>
* Initial creation
Copyright (C) 2013-2023 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
|