|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
f2b7f18e |
| 26-Jul-2022 |
Shraiysh Vaishay <[email protected]> |
Revert "[flang][OpenMP] Lowering support for default clause"
This reverts commit 05e6fce84fd39d150195b8928561f2c90c71e538.
|
| #
05e6fce8 |
| 26-Jul-2022 |
Nimish Mishra <[email protected]> |
[flang][OpenMP] Lowering support for default clause
This patch adds lowering support for default clause.
1. During symbol resolution in semantics, should the enclosing context have a default data s
[flang][OpenMP] Lowering support for default clause
This patch adds lowering support for default clause.
1. During symbol resolution in semantics, should the enclosing context have a default data sharing clause defined and a `parser::Name` is not attached to an explicit data sharing clause, the `semantics::Symbol::Flag::OmpPrivate` flag (in case of `default(private)`) and `semantics::Symbol::Flag::OmpFirstprivate` flag (in case of `default(firstprivate)`) is added to the symbol.
2. During lowering, all symbols having either `semantics::Symbol::Flag::OmpPrivate` or `semantics::Symbol::Flag::OmpFirstprivate` flag are collected and privatised appropriately.
Co-authored-by: Peixin Qiao <[email protected]>
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D123930
show more ...
|
| #
3356d72a |
| 26-Jul-2022 |
Kazu Hirata <[email protected]> |
[flang] Use value or * instead of getValue (NFC)
This patch replaces x.getValue() with *x if the reference is obviously protected by a presence check. Otherwise, it replaces x.getValue() with x.val
[flang] Use value or * instead of getValue (NFC)
This patch replaces x.getValue() with *x if the reference is obviously protected by a presence check. Otherwise, it replaces x.getValue() with x.value().
show more ...
|
| #
17d9bdf4 |
| 26-Jul-2022 |
Arnamoy Bhattacharyya <[email protected]> |
[Flang][OpenMP] Add support for lastprivate clause for worksharing loop.
This patch adds an initial support to the lastprivate clause for worksharing loop. The patch creates necessary control flow
[Flang][OpenMP] Add support for lastprivate clause for worksharing loop.
This patch adds an initial support to the lastprivate clause for worksharing loop. The patch creates necessary control flow to guarantee the store of the value from the logical last iteration of the workshare loop.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D130027
show more ...
|
| #
7bb1151b |
| 25-Jul-2022 |
Kiran Chandramohan <[email protected]> |
[Flang][OpenMP] Initial support for integer reduction in worksharing-loop
Lower the Flang parse-tree containing OpenMP reductions to the OpenMP dialect. The OpenMP dialect models reductions with, 1)
[Flang][OpenMP] Initial support for integer reduction in worksharing-loop
Lower the Flang parse-tree containing OpenMP reductions to the OpenMP dialect. The OpenMP dialect models reductions with, 1) A reduction declaration operation that specifies how to initialize, combine, and atomically combine private reduction variables. 2) The OpenMP operation (like wsloop) that supports reductions has an array of reduction accumulator variables (operands) and an array attribute of the same size that points to the reduction declaration to be used for the reduction accumulation. 3) The OpenMP reduction operation that takes a value and an accumulator. This operation replaces the original reduction operation in the source.
(1) is implemented by the `createReductionDecl` in OpenMP.cpp, (2) is implemented while creating the OpenMP operation, (3) is implemented by the `genOpenMPReduction` function in OpenMP.cpp, and called from Bridge.cpp. The implementation of (3) is not very robust.
NOTE 1: The patch currently supports only reductions for integer type addition. NOTE 2: Only supports reduction in the worksharing loop. NOTE 3: Does not generate atomic combination region. NOTE 4: Other options for creating the reduction operation include a) having the reduction operation as a construct containing an assignment and then handling it appropriately in the Bridge. b) we can modify `genAssignment` or `genFIR(AssignmentStmt)` in the Bridge to handle OpenMP reduction but so far we have tried not to mix OpenMP and non-OpenMP code and this will break that. I will try (b) in a separate patch. NOTE 5: OpenMP dialect gained support for reduction with the patches: D105358, D107343. See https://discourse.llvm.org/t/rfc-openmp-reduction-support/3367 for more details.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D130077
Co-authored-by: Peixin-Qiao <[email protected]>
show more ...
|
| #
d507e8b7 |
| 11-Jul-2022 |
Arnamoy Bhattacharyya <[email protected]> |
[flang][OpenMP] Fix firstprivate bug
In case where the bound(s) of a workshare loop use(s) firstprivate var(s), currently, that use is not updated with the created clone. It still uses the shared v
[flang][OpenMP] Fix firstprivate bug
In case where the bound(s) of a workshare loop use(s) firstprivate var(s), currently, that use is not updated with the created clone. It still uses the shared variable. This patch fixes that.
Reviewed By: peixin
Differential Revision: https://reviews.llvm.org/D127137
show more ...
|
| #
53804e42 |
| 07-Jul-2022 |
Valentin Clement <[email protected]> |
[flang][NFC] Make LEN parameters homogenous
This patch is part of the upstreaming effort from fir-dev branch. This is the last patch for the upstreaming effort.
Reviewed By: jeanPerier
Differentia
[flang][NFC] Make LEN parameters homogenous
This patch is part of the upstreaming effort from fir-dev branch. This is the last patch for the upstreaming effort.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D129187
Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
23c2bedf |
| 01-Jul-2022 |
Peter Klausler <[email protected]> |
[flang] Establish a single source of target information for semantics
Create a TargetCharacteristics class to centralize the few items of target specific information that are relevant to semantics.
[flang] Establish a single source of target information for semantics
Create a TargetCharacteristics class to centralize the few items of target specific information that are relevant to semantics. Use the new class for all target queries, including derived type component layout modeling.
Future work will initialize this class with target information provided or forwarded by the drivers, and use it to fold layout-dependent intrinsic functions like TRANSFER().
Differential Revision: https://reviews.llvm.org/D129018
Updates: Attempts to work around build issues on Windows.
show more ...
|
| #
0dd4fb04 |
| 01-Jul-2022 |
Valentin Clement <[email protected]> |
[flang] Fix for broken/degenerate forall case
Fix for broken/degenerate forall case where there is no assignment to an array under the explicit iteration space. While this is a multiple assignment,
[flang] Fix for broken/degenerate forall case
Fix for broken/degenerate forall case where there is no assignment to an array under the explicit iteration space. While this is a multiple assignment, semantics only raises a warning. The fix is to add a test that the explicit space has any sort of array to be updated, and if not then the do_loop nest will not require a terminator to forward array values to the next iteration.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D128973
Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
39377d52 |
| 01-Jul-2022 |
Valentin Clement <[email protected]> |
[flang] Fix APFloat conversion cases
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D128935
Co-author
[flang] Fix APFloat conversion cases
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D128935
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Peter Steinfeld <[email protected]>
show more ...
|
| #
a19c2132 |
| 30-Jun-2022 |
Valentin Clement <[email protected]> |
[flang][NFC] Fix warning
|
| #
1e55ec66 |
| 30-Jun-2022 |
Valentin Clement <[email protected]> |
[flang] SELECT CASE constructs with character selectors that require a temp
Here is a character SELECT CASE construct that requires a temp to hold the result of the TRIM intrinsic call:
``` module
[flang] SELECT CASE constructs with character selectors that require a temp
Here is a character SELECT CASE construct that requires a temp to hold the result of the TRIM intrinsic call:
``` module m character(len=6) :: s contains subroutine sc n = 0 if (lge(s,'00')) then select case(trim(s)) case('11') n = 1 case default continue case('22') n = 2 case('33') n = 3 case('44':'55','66':'77','88':) n = 4 end select end if print*, n end subroutine end module m ```
This SELECT CASE construct is implemented as an IF/ELSE-IF/ELSE comparison sequence. The temp must be retained until some comparison is successful. At that point the temp may be freed. Generalize statement context processing to allow multiple finalize calls to do this, such that the program always executes exactly one freemem call.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: klausler, vdonaldson
Differential Revision: https://reviews.llvm.org/D128852
Co-authored-by: V Donaldson <[email protected]>
show more ...
|
| #
3b7c3a65 |
| 25-Jun-2022 |
Kazu Hirata <[email protected]> |
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
|
| #
aa8feeef |
| 25-Jun-2022 |
Kazu Hirata <[email protected]> |
Don't use Optional::hasValue (NFC)
|
| #
27afb362 |
| 24-Jun-2022 |
Peixin-Qiao <[email protected]> |
[flang][OpenMP] Initial support the lowering of copyin clause
This supports the lowering of copyin clause initially. The pointer, allocatable, common block, polymorphic varaibles will be supported l
[flang][OpenMP] Initial support the lowering of copyin clause
This supports the lowering of copyin clause initially. The pointer, allocatable, common block, polymorphic varaibles will be supported later.
This also includes the following changes:
1. Resolve the COPYIN clause and make the entity as host associated.
2. Fix collectSymbolSet by adding one option to control collecting the symbol itself or ultimate symbol of it so that it can be used explicitly differentiate the host and associated variables in host-association.
3. Add one helper function `lookupOneLevelUpSymbol` to differentiate the usage of host and associated variables explicitly. The previous lowering of firstprivate depends on the order of `createHostAssociateVarClone` and `lookupSymbol` of host symbol. With this fix, this dependence is removed.
4. Reuse `copyHostAssociateVar` for copying operation of COPYIN clause.
Reviewed By: kiranchandramohan, NimishMishra
Differential Revision: https://reviews.llvm.org/D127468
show more ...
|
| #
ab89c132 |
| 23-Jun-2022 |
Valentin Clement <[email protected]> |
[flang] Add lowering TODO for separate module procedures
MODULE FUNCTION and MODULE SUBROUTINE currently cause lowering crash: "symbol is not mapped to any IR value" because special care is needed t
[flang] Add lowering TODO for separate module procedures
MODULE FUNCTION and MODULE SUBROUTINE currently cause lowering crash: "symbol is not mapped to any IR value" because special care is needed to handle their interface.
Add a TODO for now.
Example of program that crashed and will hit the TODO:
``` module mod interface module subroutine sub end subroutine end interface contains module subroutine sub x = 42 end subroutine end module ```
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D128412
Co-authored-by: Jean Perier <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
ed8fceaa |
| 21-Jun-2022 |
Kazu Hirata <[email protected]> |
Don't use Optional::getValue (NFC)
|
| #
5413bf1b |
| 20-Jun-2022 |
Kazu Hirata <[email protected]> |
Don't use Optional::hasValue (NFC)
|
| #
331145e6 |
| 20-Jun-2022 |
Valentin Clement <[email protected]> |
[flang][NFC] Unify todo messages
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D128186
Co-authored-by:
[flang][NFC] Unify todo messages
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D128186
Co-authored-by: Peter Steinfeld <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
84b9ae66 |
| 07-Jun-2022 |
Mats Petersson <[email protected]> |
[flang]Add support for do concurrent
[flang]Add support for do concurrent
Upstreaming from fir-dev on https://github.com/flang-compiler/f18-llvm-project
Support for concurrent execution in do-loop
[flang]Add support for do concurrent
[flang]Add support for do concurrent
Upstreaming from fir-dev on https://github.com/flang-compiler/f18-llvm-project
Support for concurrent execution in do-loops.
A selection of tests are also added.
Co-authored-by: V Donaldson <[email protected]>
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D127240
show more ...
|
| #
494cd9b6 |
| 10-Jun-2022 |
Andrzej Warzynski <[email protected]> |
[flang][lowering] Ignore compiler directives
This patch simply replaces a `TODO` with a warning.
This is part of the upstreaming effort from the `fir-dev` branch in [1].
[1] https://github.com/fla
[flang][lowering] Ignore compiler directives
This patch simply replaces a `TODO` with a warning.
This is part of the upstreaming effort from the `fir-dev` branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project
Co-authored-by: Eric Schweitz <[email protected]>
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D127415
show more ...
|
| #
5b66cc10 |
| 10-Jun-2022 |
Valentin Clement <[email protected]> |
[flang][NFC] Move Todo.h from Lower to Optimizer
Remove a backwards dependence from Optimizer -> Lower by moving Todo.h to the optimizer and out of lowering.
This patch is part of the upstreaming e
[flang][NFC] Move Todo.h from Lower to Optimizer
Remove a backwards dependence from Optimizer -> Lower by moving Todo.h to the optimizer and out of lowering.
This patch is part of the upstreaming effort from fir-dev branch.
Co-authored-by: Eric Schweitz <[email protected]>
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D127292
show more ...
|
| #
7eecfc07 |
| 07-Jun-2022 |
Kiran Chandramohan <[email protected]> |
[Flang] Add flag dependent code to execute the loop-body atleast once
Given the flag `--always-execute-loop-body` the compiler emits code to execute the body of the loop atleast once.
Note: This is
[Flang] Add flag dependent code to execute the loop-body atleast once
Given the flag `--always-execute-loop-body` the compiler emits code to execute the body of the loop atleast once.
Note: This is part of upstreaming from the fir-dev branch of https://github.com/flang-compiler/f18-llvm-project.
Reviewed By: awarzynski, schweitz
Differential Revision: https://reviews.llvm.org/D127128
Co-authored-by: Jean Perier <[email protected]> Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: V Donaldson <[email protected]> Co-authored-by: Valentin Clement <[email protected]> Co-authored-by: Sameeran Joshi <[email protected]>
show more ...
|
| #
411bd2d4 |
| 07-Jun-2022 |
Peixin-Qiao <[email protected]> |
[flang][OpenMP] Support lowering parse-tree to MLIR for threadprivate directive
This supports lowering parse-tree to MLIR for threadprivate directive following the OpenMP 5.1 [2.21.2] standard. Take
[flang][OpenMP] Support lowering parse-tree to MLIR for threadprivate directive
This supports lowering parse-tree to MLIR for threadprivate directive following the OpenMP 5.1 [2.21.2] standard. Take the following as an example:
``` program m integer, save :: i !$omp threadprivate(i) call sub(i) !$omp parallel call sub(i) !$omp end parallel end ``` ``` func.func @_QQmain() { %0 = fir.address_of(@_QFEi) : !fir.ref<i32> %1 = omp.threadprivate %0 : !fir.ref<i32> -> !fir.ref<i32> fir.call @_QPsub(%1) : (!fir.ref<i32>) -> () omp.parallel { %2 = omp.threadprivate %0 : !fir.ref<i32> -> !fir.ref<i32> fir.call @_QPsub(%2) : (!fir.ref<i32>) -> () omp.terminator } return } ```
A threadprivate operation (omp.threadprivate) is created for all references to a threadprivate variable. The runtime will appropriately return a threadprivate var (%1 as above) or its copy (%2 as above) depending on whether it is outside or inside a parallel region. For threadprivate access outside the parallel region, the threadprivate operation is created in instantiateVar. Inside the parallel region, it is created in createBodyOfOp.
One new utility function collectSymbolSet is created for collecting all the variables with a property within a evaluation, which may be one Fortran, or OpenMP, or OpenACC construct.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D124226
show more ...
|
| #
8c349d70 |
| 01-Jun-2022 |
Kiran Chandramohan <[email protected]> |
[Flang] Lower the infinite do loop
The basic infinite loop is lowered to a branch to the body of the loop, and the body containing a back edge as its terminator.
Note: This is part of upstreaming f
[Flang] Lower the infinite do loop
The basic infinite loop is lowered to a branch to the body of the loop, and the body containing a back edge as its terminator.
Note: This is part of upstreaming from the fir-dev branch of https://github.com/flang-compiler/f18-llvm-project.
Reviewed By: rovka
Differential Revision: https://reviews.llvm.org/D126697
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: V Donaldson <[email protected]>
show more ...
|