This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Commit 18dd299
[Flang][MLIR][OpenMP] Host-evaluation of omp.loop bounds (llvm#133908)
This patch updates Flang lowering and kernel flags identification in
MLIR so that loop bounds on `target teams loop` constructs are evaluated
on the host, making the trip count available to the corresponding
`__tgt_target_kernel` call emitted for the target region.
This is necessary in order to properly execute these constructs as
`target teams distribute parallel do`.
Co-authored-by: Kareem Ergawy <[email protected]>1 parent 7145ead commit 18dd299
File tree
5 files changed
+64
-16
lines changed- flang
- lib/Lower/OpenMP
- test/Lower/OpenMP
- mlir
- lib/Dialect/OpenMP/IR
- test/Dialect/OpenMP
5 files changed
+64
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
561 | 560 | | |
562 | 561 | | |
563 | 562 | | |
| |||
575 | 574 | | |
576 | 575 | | |
577 | 576 | | |
578 | | - | |
579 | | - | |
580 | 577 | | |
581 | 578 | | |
582 | 579 | | |
583 | 580 | | |
584 | 581 | | |
585 | | - | |
586 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
587 | 585 | | |
588 | 586 | | |
589 | | - | |
590 | 587 | | |
591 | 588 | | |
592 | 589 | | |
| |||
597 | 594 | | |
598 | 595 | | |
599 | 596 | | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
600 | 607 | | |
601 | 608 | | |
602 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 32 | + | |
| 33 | + | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
| |||
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| 50 | + | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2058 | 2058 | | |
2059 | 2059 | | |
2060 | 2060 | | |
| 2061 | + | |
2061 | 2062 | | |
2062 | | - | |
| 2063 | + | |
2063 | 2064 | | |
2064 | 2065 | | |
2065 | 2066 | | |
2066 | 2067 | | |
2067 | 2068 | | |
2068 | 2069 | | |
2069 | 2070 | | |
2070 | | - | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
2071 | 2074 | | |
2072 | 2075 | | |
2073 | 2076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2879 | 2879 | | |
2880 | 2880 | | |
2881 | 2881 | | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
2882 | 2898 | | |
2883 | 2899 | | |
2884 | 2900 | | |
| |||
0 commit comments