Commit 47ae3ea
authored
[MLIR][OpenMP] Add MLIR Lowering Support for dist_schedule (#152736)
`dist_schedule` was previously supported in Flang/Clang but was not
implemented in MLIR, instead a user would get a "not yet implemented"
error. This patch adds support for the `dist_schedule` clause to be
lowered to LLVM IR when used in an `omp.distribute` or `omp.wsloop`
section.
There has needed to be some rework required to ensure that MLIR/LLVM
emits the correct Schedule Type for the clause, as it uses a different
schedule type to other OpenMP directives/clauses in the runtime library.
This patch also ensures that when using dist_schedule or a chunked
schedule clause, the correct llvm loop parallel accesses details are
added.1 parent 0e5633f commit 47ae3ea
File tree
10 files changed
+464
-93
lines changed- flang/docs
- llvm
- include/llvm/Frontend/OpenMP
- lib/Frontend/OpenMP
- mlir
- lib
- Dialect/OpenMP/IR
- Target/LLVMIR/Dialect/OpenMP
- test
- Conversion/OpenMPToLLVM
- Target/LLVMIR
10 files changed
+464
-93
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
493 | | - | |
| 493 | + | |
| 494 | + | |
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
| |||
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
| 505 | + | |
504 | 506 | | |
505 | 507 | | |
506 | 508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1136 | 1140 | | |
1137 | 1141 | | |
1138 | 1142 | | |
1139 | 1143 | | |
1140 | | - | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1141 | 1147 | | |
1142 | 1148 | | |
1143 | 1149 | | |
| |||
1150 | 1156 | | |
1151 | 1157 | | |
1152 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1153 | 1166 | | |
1154 | 1167 | | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1160 | 1175 | | |
1161 | 1176 | | |
1162 | 1177 | | |
| |||
1235 | 1250 | | |
1236 | 1251 | | |
1237 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1238 | 1257 | | |
1239 | 1258 | | |
1240 | 1259 | | |
| |||
1246 | 1265 | | |
1247 | 1266 | | |
1248 | 1267 | | |
1249 | | - | |
| 1268 | + | |
| 1269 | + | |
1250 | 1270 | | |
1251 | 1271 | | |
1252 | 1272 | | |
| |||
0 commit comments