Commit 30b0946
authored
[Flang][MLIR][OpenMP] Improve use_device_* handling (#137198)
This patch updates MLIR op verifiers for operations taking arguments
that must always be defined by an `omp.map.info` operation to check this
requirement.
It also modifies Flang lowering for `use_device_{addr, ptr}`, as well as
the custom MLIR printer and parser for these clauses, to support
initializing it to `OMP_MAP_RETURN_PARAM` and represent this in the MLIR
representation as `return_param`. This internal mapping flag is what
eventually is used for variables passed via these clauses into the
target region when translating to LLVM IR, so making it explicit in
Flang and MLIR removes an inconsistency in the current representation.1 parent 42ee758 commit 30b0946
File tree
6 files changed
+57
-21
lines changed- flang
- lib/Lower/OpenMP
- test
- Fir
- Lower/OpenMP
- mlir
- lib/Dialect/OpenMP/IR
- test/Dialect/OpenMP
6 files changed
+57
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1407 | 1407 | | |
1408 | 1408 | | |
1409 | 1409 | | |
1410 | | - | |
1411 | | - | |
| 1410 | + | |
1412 | 1411 | | |
1413 | 1412 | | |
1414 | 1413 | | |
| |||
1429 | 1428 | | |
1430 | 1429 | | |
1431 | 1430 | | |
1432 | | - | |
1433 | | - | |
| 1431 | + | |
1434 | 1432 | | |
1435 | 1433 | | |
1436 | 1434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
402 | | - | |
403 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
| 427 | + | |
427 | 428 | | |
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
432 | 433 | | |
433 | | - | |
| 434 | + | |
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1521 | 1521 | | |
1522 | 1522 | | |
1523 | 1523 | | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
1524 | 1527 | | |
1525 | 1528 | | |
1526 | 1529 | | |
| |||
1583 | 1586 | | |
1584 | 1587 | | |
1585 | 1588 | | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
1586 | 1595 | | |
1587 | 1596 | | |
1588 | 1597 | | |
| |||
1777 | 1786 | | |
1778 | 1787 | | |
1779 | 1788 | | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
1780 | 1800 | | |
1781 | 1801 | | |
1782 | 1802 | | |
1783 | 1803 | | |
1784 | 1804 | | |
1785 | 1805 | | |
1786 | 1806 | | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1787 | 1810 | | |
1788 | 1811 | | |
1789 | 1812 | | |
| |||
1805 | 1828 | | |
1806 | 1829 | | |
1807 | 1830 | | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
1808 | 1840 | | |
1809 | 1841 | | |
1810 | 1842 | | |
| |||
1889 | 1921 | | |
1890 | 1922 | | |
1891 | 1923 | | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
| 1924 | + | |
| 1925 | + | |
1897 | 1926 | | |
1898 | | - | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
1899 | 1930 | | |
1900 | | - | |
1901 | | - | |
| 1931 | + | |
| 1932 | + | |
1902 | 1933 | | |
1903 | 1934 | | |
1904 | 1935 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
805 | | - | |
806 | | - | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
807 | 809 | | |
808 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
809 | 813 | | |
810 | 814 | | |
811 | 815 | | |
| |||
0 commit comments