Commit 134e3f6
[flang][OpenMP] Process
Fixes a bug introduced by
llvm#130078.
For non-BlockArgOpenMPOpInterface ops, we also want to map their entry
block arguments to their operands, if any. For the current support in
the OpenMP dialect, the table below lists all ops that have arguments
(SSA operands and/or attributes) and not target-related. Of all these
ops, we need to only process `omp.atomic.update` since it is the only op
that has SSA operands & an attached region. Therefore, the region's
entry block arguments must be mapped to the op's operands in case they
are referenced inside the region.
| op | operands? | region(s)? | parent is func? | processed? |
|--------------|-------------|------------|------------------|-------------|
| atomic.read | yes | no | yes | no |
| atomic.write | yes | no | yes | no |
| atomic.update | yes | yes | yes | yes |
| critical | no | no | yes | no |
| declare_mapper | no | yes | no | no |
| declare_reduction | no | yes | no | no |
| flush | yes | no | yes | no |
| private | no | yes | yes | no |
| threadprivate | yes | no | yes | no |
| yield | yes | no | yes | no |omp.atomic.update while translating scopes for target device (llvm#132165)1 parent 3b052d2 commit 134e3f6
File tree
2 files changed
+37
-1
lines changed- mlir
- lib/Target/LLVMIR/Dialect/OpenMP
- test/Target/LLVMIR
2 files changed
+37
-1
lines changedLines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5822 | 5822 | | |
5823 | 5823 | | |
5824 | 5824 | | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
| 5828 | + | |
| 5829 | + | |
| 5830 | + | |
| 5831 | + | |
| 5832 | + | |
| 5833 | + | |
| 5834 | + | |
| 5835 | + | |
| 5836 | + | |
| 5837 | + | |
| 5838 | + | |
5825 | 5839 | | |
5826 | 5840 | | |
5827 | 5841 | | |
| |||
5839 | 5853 | | |
5840 | 5854 | | |
5841 | 5855 | | |
| 5856 | + | |
5842 | 5857 | | |
5843 | 5858 | | |
5844 | | - | |
| 5859 | + | |
5845 | 5860 | | |
5846 | 5861 | | |
5847 | 5862 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
100 | 114 | | |
101 | 115 | | |
102 | 116 | | |
| |||
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
135 | 156 | | |
0 commit comments