Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
#
8557a57c |
| 07-Jan-2025 |
Tom Eccles <tom.eccles@arm.com> |
[flang][OpenMP][NFC] Move reduction init and cleanup region gen to helper (#120761)
This will allow code sharing between reduction and privatization after
my (still WIP) changes to `omp.private` to
[flang][OpenMP][NFC] Move reduction init and cleanup region gen to helper (#120761)
This will allow code sharing between reduction and privatization after
my (still WIP) changes to `omp.private` to use an `alloc` region similar
to the one used for reduction declarations.
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
8bb21ae6 |
| 19-Nov-2024 |
Ivan R. Ivanov <ivanov.i.aa@m.titech.ac.jp> |
[flang] Introduce custom loop nest generation for loops in workshare construct (#101445)
This alternative loop nest generation is used to generate an OpenMP loop nest instead of fir loops to facilit
[flang] Introduce custom loop nest generation for loops in workshare construct (#101445)
This alternative loop nest generation is used to generate an OpenMP loop nest instead of fir loops to facilitate parallelizing statements in an OpenMP `workshare` construct.
show more ...
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2 |
|
#
88478a89 |
| 07-Oct-2024 |
Sergio Afonso <safonsof@amd.com> |
[Flang][OpenMP] Improve entry block argument creation and binding (#110267)
The main purpose of this patch is to centralize the logic for creating
MLIR operation entry blocks and for binding them t
[Flang][OpenMP] Improve entry block argument creation and binding (#110267)
The main purpose of this patch is to centralize the logic for creating
MLIR operation entry blocks and for binding them to the corresponding
symbols. This minimizes the chances of mixing arguments up for
operations having multiple entry block argument-generating clauses and
prevents divergence while binding arguments.
Some changes implemented to this end are:
- Split into two functions the creation of the entry block, and the
binding of its arguments and the corresponding Fortran symbol. This
enabled a significant simplification of the lowering of composite
constructs, where it's no longer necessary to manually ensure the lists
of arguments and symbols refer to the same variables in the same order
and also match the expected order by the `BlockArgOpenMPOpInterface`.
- Removed redundant and error-prone passing of types and locations from
`ClauseProcessor` methods. Instead, these are obtained from the values
in the appropriate clause operands structure. This also simplifies
argument lists of several lowering functions.
- Access block arguments of already created MLIR operations through the
`BlockArgOpenMPOpInterface` instead of directly indexing the argument
list of the operation, which is not scalable as more entry block
argument-generating clauses are added to an operation.
- Simplified the implementation of `genParallelOp` to no longer need to
define different callbacks depending on whether delayed privatization is
enabled.
show more ...
|
#
c4204c0b |
| 03-Oct-2024 |
jeanPerier <jperier@nvidia.com> |
[flang] replace fir.complex usages with mlir complex (#110850)
Core patch of
https://discourse.llvm.org/t/rfc-flang-replace-usages-of-fir-complex-by-mlir-complex-type/82292.
After that, the last s
[flang] replace fir.complex usages with mlir complex (#110850)
Core patch of
https://discourse.llvm.org/t/rfc-flang-replace-usages-of-fir-complex-by-mlir-complex-type/82292.
After that, the last step is to remove fir.complex from FIR types.
show more ...
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
#
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 |
|
#
1002c08c |
| 20-Jun-2024 |
Tom Eccles <tom.eccles@arm.com> |
[flang][OpenMP] support more reduction types for procedure designators (#96057)
This re-uses reduction declarations from intrinsic operators to add
support for reductions of allocatables, pointers,
[flang][OpenMP] support more reduction types for procedure designators (#96057)
This re-uses reduction declarations from intrinsic operators to add
support for reductions of allocatables, pointers, and arrays with
procedure designators (e.g. min/max).
I have split this into two commits to make it easier to review. The
first one makes the functional change. The second cleans things up now
that we can share much more code between intrinsic operators and
procedure designators.
show more ...
|
Revision tags: llvmorg-18.1.8 |
|
#
b6b0f975 |
| 14-Jun-2024 |
Tom Eccles <tom.eccles@arm.com> |
[flang][OpenMP] Support reduction of POINTER variables (#95148)
Just treat them the same as ALLOCATABLE. gfortran doesn't allow POINTER
objects in a REDUCTION clause, but so far as I can tell the s
[flang][OpenMP] Support reduction of POINTER variables (#95148)
Just treat them the same as ALLOCATABLE. gfortran doesn't allow POINTER
objects in a REDUCTION clause, but so far as I can tell the standard
explicitly allows it (openmp5.2 section 5.5.5).
show more ...
|
Revision tags: llvmorg-18.1.7 |
|
#
8b18f2fe |
| 05-Jun-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[flang][OpenMP] Add `sym()` member function to omp::Object (#94493)
The object identity requires more than just `Symbol`. Don't use `id()`
to get the Symbol associated with the object, becase the r
[flang][OpenMP] Add `sym()` member function to omp::Object (#94493)
The object identity requires more than just `Symbol`. Don't use `id()`
to get the Symbol associated with the object, becase the return value
will need to change. Instead use `sym()` which is added for that reason.
show more ...
|
Revision tags: llvmorg-18.1.6 |
|
#
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 ...
|
#
7a66e420 |
| 16-May-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[flang][OpenMP] Remove unnecessary `Fortran::` qualification, NFC (#92298)
The `Fortran::` namespace is redundant for all parts of the code in this
PR, except for names of functions in their defini
[flang][OpenMP] Remove unnecessary `Fortran::` qualification, NFC (#92298)
The `Fortran::` namespace is redundant for all parts of the code in this
PR, except for names of functions in their definitions.
show more ...
|
Revision tags: llvmorg-18.1.5 |
|
#
5ada3289 |
| 30-Apr-2024 |
Tom Eccles <tom.eccles@arm.com> |
[flang][OpenMP] ensure we hit the TODO for intrinsic array reduction (#90593)
Before this patch we crashed lowering intrinsic array reductions.
I think this lost during a rebase. I've added a tes
[flang][OpenMP] ensure we hit the TODO for intrinsic array reduction (#90593)
Before this patch we crashed lowering intrinsic array reductions.
I think this lost during a rebase. I've added a test to make sure it
doesn't break again.
Also fixed the TODO message to be more accurate.
show more ...
|
#
fac349a1 |
| 28-Apr-2024 |
Christian Sigg <chsigg@users.noreply.github.com> |
Reapply "[mlir] Mark `isa/dyn_cast/cast/...` member functions depreca… (#90406)
…ted. (#89998)" (#90250)
This partially reverts commit 7aedd7dc754c74a49fe84ed2640e269c25414087.
This change rem
Reapply "[mlir] Mark `isa/dyn_cast/cast/...` member functions depreca… (#90406)
…ted. (#89998)" (#90250)
This partially reverts commit 7aedd7dc754c74a49fe84ed2640e269c25414087.
This change removes calls to the deprecated member functions. It does
not mark the functions deprecated yet and does not disable the
deprecation warning in TypeSwitch. This seems to cause problems with
MSVC.
show more ...
|
#
7aedd7dc |
| 26-Apr-2024 |
dyung <douglas.yung@sony.com> |
Revert "[mlir] Mark `isa/dyn_cast/cast/...` member functions deprecated. (#89998)" (#90250)
This reverts commit 950b7ce0b88318f9099e9a7c9817d224ebdc6337.
This change is causing build failures on
Revert "[mlir] Mark `isa/dyn_cast/cast/...` member functions deprecated. (#89998)" (#90250)
This reverts commit 950b7ce0b88318f9099e9a7c9817d224ebdc6337.
This change is causing build failures on a bot
https://lab.llvm.org/buildbot/#/builders/216/builds/38157
show more ...
|
#
950b7ce0 |
| 26-Apr-2024 |
Christian Sigg <chsigg@users.noreply.github.com> |
[mlir] Mark `isa/dyn_cast/cast/...` member functions deprecated. (#89998)
See https://mlir.llvm.org/deprecation and
https://discourse.llvm.org/t/preferred-casting-style-going-forward.
|
#
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 ...
|
#
0c455ee3 |
| 19-Apr-2024 |
Jan Leyonberg <jan_sjodin@yahoo.com> |
[flang][OpenMP] Use maxnum/minnum for lowering of max/min reduction operators (#89258)
This patch changes the lowering of max and min to be lowered to
arith::MaxNumFop and arith::MinNumFOp instead
[flang][OpenMP] Use maxnum/minnum for lowering of max/min reduction operators (#89258)
This patch changes the lowering of max and min to be lowered to
arith::MaxNumFop and arith::MinNumFOp instead of using arith::MaximumFOp
and arith::MinimumFOp. The arith::MaximumFOp and arith::MinimumFOp map
to the corresponding intrinsics llvm.maximum.* and llvm.minimum.*
intrinsics which conform to the semantics specified in the draft of IEEE
754-2019, which is not supported by all hardware. Instead using
arith::MaximumFOp and arith::MinimumFOp will allow code generation for
more targets and match the code generated by clang OpenMP.
fixes #87955
show more ...
|
#
9dbf3e23 |
| 19-Apr-2024 |
Sergio Afonso <safonsof@amd.com> |
[Flang][OpenMP] NFC: Simplify handling of insertion points (#89221)
This patch replaces some `saveInsertionPoint`, `restoreInsertionPoint`
call pairs for an `InsertionGuard` instance where it makes
[Flang][OpenMP] NFC: Simplify handling of insertion points (#89221)
This patch replaces some `saveInsertionPoint`, `restoreInsertionPoint`
call pairs for an `InsertionGuard` instance where it makes sense within
Flang OpenMP lowering to make further modifications less error-prone.
show more ...
|
Revision tags: llvmorg-18.1.4 |
|
#
17cb8a53 |
| 15-Apr-2024 |
Kiran Chandramohan <kiran.chandramohan@arm.com> |
[Flang][OpenMP] Accept the reduction modifier (#86492)
Accept the reduction modifier in the Flang parser. Issue a TODO message
during lowering.
OpenMP 5.0 introduced the reduction modifier. Deta
[Flang][OpenMP] Accept the reduction modifier (#86492)
Accept the reduction modifier in the Flang parser. Issue a TODO message
during lowering.
OpenMP 5.0 introduced the reduction modifier. Details can be seen in
2.19.5.4 reductionClause.
OpenMP 5.2 relevant section is 5.5.8reductionClause.
This will help remove some of the parser errors highlighted in the
following post and also bring it to a well defined behaviour (produce
TODO errors for unsupported features, do not crash).
https://discourse.llvm.org/t/proposal-rename-flang-new-to-flang/69462/60
show more ...
|
#
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 ...
|
#
221f438a |
| 08-Apr-2024 |
Mats Petersson <mats.petersson@arm.com> |
[flang][OpenMP] Add support for complex reductions (#87488)
This adds support for complex type to the OpenMP reductions.
Note that some more work would be needed to give decent error messages wh
[flang][OpenMP] Add support for complex reductions (#87488)
This adds support for complex type to the OpenMP reductions.
Note that some more work would be needed to give decent error messages when complex
is used in ways that need client supplied functions (e.g. MAX or MIN). It does fail these with
a not so user friendly message at present.
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
|
#
698bf3da |
| 04-Apr-2024 |
Sourabh Singh Tomar <sourabhsingh.tomar@amd.com> |
[flang][OpenMP] Fix for #86393 (#87452)
|
Revision tags: llvmorg-18.1.3 |
|
#
148a5579 |
| 26-Mar-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[flang][OpenMP] Make OpenMP clause representation language-agnostic (#86289)
The clause templates defined in ClauseT.h were originally based on
flang's parse tree nodes. Since those representations
[flang][OpenMP] Make OpenMP clause representation language-agnostic (#86289)
The clause templates defined in ClauseT.h were originally based on
flang's parse tree nodes. Since those representations are going to be
reused for clang (together with the clause splitting code), it makes
sense to separate them from flang, and instead have them based on the
actual OpenMP spec (v5.2).
The member names in the templates follow the naming presented in the
spec, and the representation (e.g. members) is derived from the clause
definitions as described in the spec.
Since the representations of some clauses has changed (while preserving
the information), the current code using the clauses (especially the
code converting parser::OmpClause to omp::Clause) needs to be adjusted.
This patch does not make any functional changes.
show more ...
|
#
3deaa77f |
| 20-Mar-2024 |
Tom Eccles <tom.eccles@arm.com> |
[flang][OpenMP] simplify getReductionName (#85666)
Re-use fir::getTypeAsString instead of creating something new here. This
spells integer names like i32 instead of i_32 so there is a lot of test
[flang][OpenMP] simplify getReductionName (#85666)
Re-use fir::getTypeAsString instead of creating something new here. This
spells integer names like i32 instead of i_32 so there is a lot of test
churn.
show more ...
|