Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 937cbce1 22-Jan-2025 Kareem Ergawy <kareem.ergawy@amd.com>

Revert "[flang][OpenMP] Enable delayed privatization by default `omp.wsloop` (#122471)" (#123324)

This seems to have caused some regressions in Fujitsu's test-suite:
https://linaro.atlassian.net/br

Revert "[flang][OpenMP] Enable delayed privatization by default `omp.wsloop` (#122471)" (#123324)

This seems to have caused some regressions in Fujitsu's test-suite:
https://linaro.atlassian.net/browse/LLVM-1521

This reverts commit 6f82408bb53f57a859953d8f1114f1634a5d3ee9.

show more ...


# 6f82408b 16-Jan-2025 Kareem Ergawy <kareem.ergawy@amd.com>

[flang][OpenMP] Enable delayed privatization by default `omp.wsloop` (#122471)

This enable delayed privatization by default for `omp.wsloop` ops, with
one caveat! I had to workaround the "impure" a

[flang][OpenMP] Enable delayed privatization by default `omp.wsloop` (#122471)

This enable delayed privatization by default for `omp.wsloop` ops, with
one caveat! I had to workaround the "impure" alloc region issue that
being resolved at the moment. The workaround detects whether the alloc
region's argument is used in the region and at the same time defined in
block that does not dominate the chosen alloca insertion point. If so,
we move the alloca insertion point below the defining instruction of the
alloc region argument. This basically reverts to the
non-delayed-privatizaiton behavior.

show more ...


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3
# 0a17bdfc 15-Oct-2024 Sergio Afonso <safonsof@amd.com>

[MLIR][OpenMP] Remove terminators from loop wrappers (#112229)

This patch simplifies the representation of OpenMP loop wrapper
operations by introducing the `NoTerminator` trait and updating
accor

[MLIR][OpenMP] Remove terminators from loop wrappers (#112229)

This patch simplifies the representation of OpenMP loop wrapper
operations by introducing the `NoTerminator` trait and updating
accordingly the verifier for the `LoopWrapperInterface`.

Since loop wrappers are already limited to having exactly one region
containing exactly one block, and this block can only hold a single
`omp.loop_nest` or loop wrapper and an `omp.terminator` that does not
return any values, it makes sense to simplify the representation of loop
wrappers by removing the terminator.

There is an extensive list of Lit tests that needed updating to remove
the `omp.terminator`s adding some noise to this patch, but actual
changes are limited to the definition of the `omp.wsloop`, `omp.simd`,
`omp.distribute` and `omp.taskloop` loop wrapper ops, Flang lowering for
those, `LoopWrapperInterface::verifyImpl()`, SCF to OpenMP conversion
and OpenMP dialect documentation.

show more ...


Revision tags: llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4
# 0f206b19 29-Aug-2024 Sergio Afonso <safonsof@amd.com>

[Flang][OpenMP] Move loop privatization out of dispatch (#106066)

This patch moves the creation of `DataSharingProcessor` instances for
loop constructs out of `genOMPDispatch()` and into their corr

[Flang][OpenMP] Move loop privatization out of dispatch (#106066)

This patch moves the creation of `DataSharingProcessor` instances for
loop constructs out of `genOMPDispatch()` and into their corresponding
codegen functions. This is a necessary first step to enable a proper
handling of privatization on composite constructs.

Some tests are updated due to a change of order between clause
processing and privatization.

show more ...


# f2027a93 22-Aug-2024 Tom Eccles <tom.eccles@arm.com>

[flang][OpenMP] use reduction alloc region (#102525)

I removed the `*-hlfir*` tests because they are duplicate now that the
other tests have been updated to use the HLFIR lowering.

3/3
Part 1:

[flang][OpenMP] use reduction alloc region (#102525)

I removed the `*-hlfir*` tests because they are duplicate now that the
other tests have been updated to use the HLFIR lowering.

3/3
Part 1: https://github.com/llvm/llvm-project/pull/102522
Part 2: https://github.com/llvm/llvm-project/pull/102524

show more ...


Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 2b56005f 09-Jul-2024 Sergio Afonso <safonsof@amd.com>

[Flang][OpenMP] Refactor loop-related lowering for composite support (#97566)

This patch splits the lowering for `omp.loop_nest` into its own function
and updates lowering for all supported loop wr

[Flang][OpenMP] Refactor loop-related lowering for composite support (#97566)

This patch splits the lowering for `omp.loop_nest` into its own function
and updates lowering for all supported loop wrappers to stop creating
this operation themselves.

Lowering functions for loop constructs are split into "wrapper" and
"standalone" variants, where the "wrapper" version only creates the
specific operation with nothing inside of it and the "standalone"
version calls the former and also handles clause processing and creates
the nested `omp.loop_nest`.

"Wrapper" lowering functions can be used by "composite" lowering
functions in follow-up patches, minimizing code duplication.

Tests broken as a result of reordering between the processing of the
loop wrapper's and the nested `omp.loop_nest`'s clauses are also
updated.

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# 6af4118f 27-May-2024 Kareem Ergawy <kareem.ergawy@amd.com>

Reapply #91116 with fix (#93160)

This PR contains 2 commits:
1. A commit to reapply changes introduced #91116 (was reverted earlier
due to test suite failures)
2. A commit containing a possible s

Reapply #91116 with fix (#93160)

This PR contains 2 commits:
1. A commit to reapply changes introduced #91116 (was reverted earlier
due to test suite failures)
2. A commit containing a possible solution for the issue causing the
test suite failures. In particular, it introduces a simple symbol
visitor class to keep track of the current active OMP construct and
marking this active construct as the scope defining the symbol being
visisted.

show more ...


# 85e11240 21-May-2024 Muhammad Omair Javaid <omair.javaid@linaro.org>

Revert "[flang][OpenMP] Try to unify induction var privatization for OMP regions. (#91116)"

This reverts commit 2a97b507dc643b7ee3bc651b3f21b754cfba433c.

It has broken LLVM testsuite on various bot

Revert "[flang][OpenMP] Try to unify induction var privatization for OMP regions. (#91116)"

This reverts commit 2a97b507dc643b7ee3bc651b3f21b754cfba433c.

It has broken LLVM testsuite on various bots
https://lab.llvm.org/buildbot/#/builders/184/builds/12760
https://lab.llvm.org/buildbot/#/builders/197/builds/14376
https://lab.llvm.org/buildbot/#/builders/179/builds/10176

show more ...


Revision tags: llvmorg-18.1.6
# 2a97b507 18-May-2024 Kareem Ergawy <kareem.ergawy@amd.com>

[flang][OpenMP] Try to unify induction var privatization for OMP regions. (#91116)


# 74a87548 16-May-2024 Tom Eccles <tom.eccles@arm.com>

[flang][MLIR][OpenMP] make reduction by-ref toggled per variable (#92244)

Fixes #88935

Toggling reduction by-ref broke when multiple reduction clauses were
used. Decisions made for the by-ref st

[flang][MLIR][OpenMP] make reduction by-ref toggled per variable (#92244)

Fixes #88935

Toggling reduction by-ref broke when multiple reduction clauses were
used. Decisions made for the by-ref status for later clauses could then
invalidate decisions for earlier clauses. For example,

```
reduction(+:scalar,scalar2) reduction(+:array)
```

The first clause would choose by value reduction and generate by-value
reduction regions, but then after this the second clause would force
by-ref to support the array argument. But by the time the second clause
is processed, the first clause has already had the wrong kind of
reduction regions generated.

This is solved by toggling whether a variable should be reduced by
reference per variable. In the above example, this allows only `array`
to be reduced by ref.

show more ...


# 1710c8cf 08-May-2024 Slava Zakharin <szakharin@nvidia.com>

[flang] Lowering changes for assigning dummy_scope to hlfir.declare. (#90989)

The lowering produces fir.dummy_scope operation if the current
function has dummy arguments. Each hlfir.declare generat

[flang] Lowering changes for assigning dummy_scope to hlfir.declare. (#90989)

The lowering produces fir.dummy_scope operation if the current
function has dummy arguments. Each hlfir.declare generated
for a dummy argument is then using the result of fir.dummy_scope
as its dummy_scope operand. This is only done for HLFIR.

I was not able to find a reliable way to identify dummy symbols
in `genDeclareSymbol`, so I added a set of registered dummy symbols
that is alive during the variables instantiation for the current
function. The set is initialized during the mapping of the dummy
argument symbols to their MLIR values. It is reset right after
all variables are instantiated - this is done to avoid generating
hlfir.declare operations with dummy_scope for the clones of
the dummy symbols (e.g. this happens with OpenMP privatization).

If this can be done in a cleaner way, please advise.

show more ...


Revision tags: llvmorg-18.1.5
# ca4dbc27 24-Apr-2024 Sergio Afonso <safonsof@amd.com>

[Flang][OpenMP][Lower] Update workshare-loop lowering (5/5) (#89215)

This patch updates lowering from PFT to MLIR of workshare loops to
follow the loop wrapper approach. Unit tests impacted by this

[Flang][OpenMP][Lower] Update workshare-loop lowering (5/5) (#89215)

This patch updates lowering from PFT to MLIR of workshare loops to
follow the loop wrapper approach. Unit tests impacted by this change are
also updated.

As the last patch of the stack, this should compile and pass unit tests.

show more ...


# 18bf0c3c 24-Apr-2024 Tom Eccles <tom.eccles@arm.com>

[flang][OpenMP] fix reduction of arrays with non-default lower bounds (#89611)

It turned out that `hlfir::genVariableBox` didn't add lower bounds to
the boxes it created. Using a shapeshift instead

[flang][OpenMP] fix reduction of arrays with non-default lower bounds (#89611)

It turned out that `hlfir::genVariableBox` didn't add lower bounds to
the boxes it created. Using a shapeshift instead of only a shape adds
the lower bounds information to the thread-local copy of the box.

Fixes #89259

show more ...


# 8cc34fad 23-Apr-2024 Tom Eccles <tom.eccles@arm.com>

[flang][OpenMP] Support reduction of allocatable variables (#88392)

Both arrays and trivial scalars are supported. Both cases must use
by-ref reductions because both are boxed.

My understanding

[flang][OpenMP] Support reduction of allocatable variables (#88392)

Both arrays and trivial scalars are supported. Both cases must use
by-ref reductions because both are boxed.

My understanding of the standards are that OpenMP says that this should
follow the rules of the intrinsic reduction operators in fortran, and
fortran says that unallocated allocatable variables can only be
referenced to allocate them or test if they are already allocated.
Therefore we do not need a null pointer check in the combiner region.

show more ...


Revision tags: llvmorg-18.1.4
# 6f068b9c 11-Apr-2024 Tom Eccles <tom.eccles@arm.com>

[flang][OpenMP] Allocate array reduction variables on the heap (#87773)

Following up on a review comment:
https://github.com/llvm/llvm-project/pull/84958#discussion_r1527627848

Reductions might

[flang][OpenMP] Allocate array reduction variables on the heap (#87773)

Following up on a review comment:
https://github.com/llvm/llvm-project/pull/84958#discussion_r1527627848

Reductions might be inlined inside of a loop so stack allocations are
not safe.

Normally flang allocates arrays on the stack. Allocatable arrays have a
different type: fir.box<fir.heap<fir.array<...>>> instead of
fir.box<fir.array<...>>. This patch will allocate all arrays on the
heap.

Reductions on allocatable arrays still aren't supported (but I will get
to this soon).

show more ...


# dbd6eb67 04-Apr-2024 Tom Eccles <tom.eccles@arm.com>

[flang][OpenMP] lower reductions of assumed shape arrays (#86982)

Patch 1: https://github.com/llvm/llvm-project/pull/86978
Patch 2: https://github.com/llvm/llvm-project/pull/86979