diff options
| author | Tom Eccles <tom.eccles@arm.com> | 2025-07-02 16:49:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-02 16:49:34 +0100 |
| commit | 16b75c819dde5670f3b086f3c664e6b9e75cb40b (patch) | |
| tree | 0e757e6770dc898de1ffe369b94b03c9139fa106 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp | |
| parent | 7931a8f102980185f51f251f808552764dbbfd99 (diff) | |
[mlir][OpenMP] implement SIMD reduction (#146671)
This replicates clang's implementation. Basically:
- A private copy of the reduction variable is created, initialized to
the reduction neutral value (using regions from the reduction
declaration op).
- The body of the loop is lowered as usual, with accesses to the
reduction variable mapped to the private copy.
- After the loop, we inline the reduction region from the declaration op
to combine the privatized variable into the original variable.
- As usual with the SIMD construct, attributes are added to encourage
vectorization of the loop and to assert that memory accesses in the loop
don't alias across iterations.
I have verified that simple scalar examples do vectorize at -O3 and the
tests I could find in the Fujitsu test suite produce correct results. I
tested on top of #146097 and this seemed to work for composite
constructs as well.
Fixes #144290
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.cpp')
0 files changed, 0 insertions, 0 deletions
