11 Commits

Author SHA1 Message Date
Razvan Lupusoru
c0a1597029
[mlir][acc] Consistency between acc.loop and acc compute ops (#114549)
- GangPrivate and GangFirstPrivate renamed to just Private and
Firstprivate respectively. This is makes compute ops consistent with the
loop op (and also with the acc spec wording for the clause).
- Added getBody to all compute ops
- Verifier for firstprivate ops / recipes is enabled
2024-11-01 10:53:51 -07:00
Razvan Lupusoru
ac9ee61857
[acc] Improve LegalizeDataValues pass to handle data constructs (#112990)
Renames LegalizeData to LegalizeDataValues since this pass fixes up SSA
values. LegalizeData suggested that it fixed data mapping.

This change also adds support to fix up ssa values for data clause
operations. Effectively, compute regions within a data region use the
ssa values from data operations also. The ssa values within data regions
but not within compute regions are not updated.

This change is to support the requirement in the OpenACC spec which
notes that a visible data clause is not just one on the current compute
construct but on the lexically containing data construct or visible
declare directive.
2024-10-21 09:49:58 -07:00
khaki3
26d92826a5
[mlir][flang] Add an interface of OpenACC compute regions for further getAllocaBlock support (#100675)
This PR implements `ComputeRegionOpInterface` to define `getAllocaBlock`
of OpenACC loop and compute constructs (parallel/kernels/serial). The
primary objective here is to accommodate local variables in OpenACC
compute regions. The change in `fir::FirOpBuilder::getAllocaBlock`
allows local variable allocation inside loops and kernels.
2024-07-26 13:52:27 -07:00
Kareem Ergawy
d0413438ec
[flang][OpenMP] Handle omp.private in FirOpBuilder::getAllocaBlock() (#93927)
Fixes a crash uncovered by
[pr89651](https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/gomp/pr89651.f90)
in the test suite.

Fixes a crash caused by missing handling of `omp.private` ops in
`FirOpBuilder::getAllocaBlock()`.
2024-06-04 05:03:39 +02:00
Valentin Clement (バレンタイン クレメン)
4c9717c3be
[mlir][openacc] Add private/reduction in legalize data pass (#80882)
This is a follow up to #80351 and adds private and reduction operands
from acc.loop, acc.parallel and acc.serial operations.
2024-02-06 13:21:13 -08:00
Valentin Clement
0d091206dd
[mlir][openacc] Add legalize data pass for compute operation (#80351)
This patch adds a simple pass to replace the uses inside compute operation. It
replaces the `varPtr` values with their corresponding `accPtr` values gathered
through the dataClauseOperands.

private and reductions variables are not included in this pass since they will
normally be replace when they are materialized.

Reland with fix for dependencies
2024-02-05 13:40:41 -08:00
Valentin Clement
4b6062619a
Revert "[mlir][openacc] Add legalize data pass for compute operation (#80351)"
This reverts commit fa7d0d3e35f74486ccb0faa88ec706defe7dd2d2.
2024-02-05 12:57:54 -08:00
Valentin Clement
9ac6eb5bec
[mlir][openacc] Add MLIRSupport to MLIROpenACCTransforms 2024-02-05 12:42:47 -08:00
Valentin Clement
fa7d0d3e35
[mlir][openacc] Add legalize data pass for compute operation (#80351)
This patch adds a simple pass to replace the uses inside compute operation. It
replaces the `varPtr` values with their corresponding `accPtr` values gathered
through the dataClauseOperands.

private and reductions variables are not included in this pass since they will
normally be replace when they are materialized.
2024-02-05 12:34:38 -08:00
Valentin Clement (バレンタイン クレメン)
e2bb91b25c
Revert "[mlir][openacc] Add legalize data pass for compute operation" (#80710)
Reverts llvm/llvm-project#80351

Breaks some buildbot
2024-02-05 08:47:23 -08:00
Valentin Clement (バレンタイン クレメン)
29d47513b3
[mlir][openacc] Add legalize data pass for compute operation (#80351)
This patch adds a simple pass to replace the uses inside compute
operation. It replaces the `varPtr` values with their corresponding
`accPtr` values gathered through the dataClauseOperands.

private and reductions variables are not included in this pass since
they will normally be replace when they are materialized.

---------

Co-authored-by: Slava Zakharin <szakharin@nvidia.com>
2024-02-05 08:38:13 -08:00