Commit 15d8576
authored
[Flang][OpenMP] Support lowering of simd reductions (llvm#112194)
This patch enables lowering to MLIR of the reduction clause of `simd`
constructs. Lowering from MLIR to LLVM IR remains unimplemented, so at
that stage it will result in errors being emitted rather than silently
ignoring it as it is currently done.
On composite `do simd` constructs, this lowering error will remain
untriggered, as the `omp.simd` operation in that case is currently
ignored. The MLIR representation, however, will now contain `reduction`
information.1 parent b5cc222 commit 15d8576
File tree
4 files changed
+57
-12
lines changed- flang
- lib/Lower/OpenMP
- test/Lower/OpenMP
- mlir/lib
- Dialect/OpenMP/IR
- Target/LLVMIR/Dialect/OpenMP
4 files changed
+57
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2070 | 2070 | | |
2071 | 2071 | | |
2072 | 2072 | | |
2073 | | - | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
2074 | 2076 | | |
2075 | 2077 | | |
2076 | 2078 | | |
| |||
2228 | 2230 | | |
2229 | 2231 | | |
2230 | 2232 | | |
2231 | | - | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
2232 | 2236 | | |
2233 | 2237 | | |
2234 | 2238 | | |
| |||
2285 | 2289 | | |
2286 | 2290 | | |
2287 | 2291 | | |
2288 | | - | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
2289 | 2295 | | |
2290 | 2296 | | |
2291 | 2297 | | |
| |||
2342 | 2348 | | |
2343 | 2349 | | |
2344 | 2350 | | |
2345 | | - | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
2346 | 2354 | | |
2347 | 2355 | | |
2348 | 2356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2012 | 2012 | | |
2013 | 2013 | | |
2014 | 2014 | | |
2015 | | - | |
| 2015 | + | |
2016 | 2016 | | |
2017 | 2017 | | |
2018 | 2018 | | |
2019 | 2019 | | |
2020 | 2020 | | |
2021 | | - | |
2022 | | - | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
2023 | 2025 | | |
2024 | 2026 | | |
2025 | 2027 | | |
| |||
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1785 | 1785 | | |
1786 | 1786 | | |
1787 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1788 | 1802 | | |
1789 | 1803 | | |
1790 | 1804 | | |
1791 | 1805 | | |
1792 | 1806 | | |
1793 | 1807 | | |
1794 | 1808 | | |
1795 | | - | |
1796 | | - | |
1797 | | - | |
1798 | | - | |
1799 | | - | |
| 1809 | + | |
| 1810 | + | |
1800 | 1811 | | |
1801 | 1812 | | |
1802 | 1813 | | |
| |||
0 commit comments