diff options
author | Dominik Adamski <dominik.adamski@amd.com> | 2022-10-20 12:29:57 +0300 |
---|---|---|
committer | Dominik Adamski <dominik.adamski@amd.com> | 2022-11-01 19:07:53 +0300 |
commit | 25243d717dc944bca1b6441686815be84ec8bbf0 (patch) | |
tree | 42ba13ce17ef808802fa8b3f3ca1448571ec1f96 /flang | |
parent | d4c61314420ca8794ad6d2588566c64109482505 (diff) |
[mlir][OpenMP] Add aligned clause definition to simd construct
simd aligned construct is represented as pair of variable which needs
to be aligned and corresponding alignment value.
Added parser, printer and verifier of aligned clause. MLIR tests were
updated to test correctness of MLIR definition of aligned clause.
Differential Revision: https://reviews.llvm.org/D135865
Reviewed By: kiranchandramohan
Diffstat (limited to 'flang')
-rw-r--r-- | flang/lib/Lower/OpenMP.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp index adada64e3cf4..4d47b95e00ee 100644 --- a/flang/lib/Lower/OpenMP.cpp +++ b/flang/lib/Lower/OpenMP.cpp @@ -1054,7 +1054,7 @@ static void genOMP(Fortran::lower::AbstractConverter &converter, fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder(); mlir::Location currentLocation = converter.getCurrentLocation(); llvm::SmallVector<mlir::Value> lowerBound, upperBound, step, linearVars, - linearStepVars, reductionVars; + linearStepVars, reductionVars, alignedVars; mlir::Value scheduleChunkClauseOperand, ifClauseOperand; mlir::Attribute scheduleClauseOperand, noWaitClauseOperand, orderedClauseOperand, orderClauseOperand; @@ -1213,8 +1213,8 @@ static void genOMP(Fortran::lower::AbstractConverter &converter, if (llvm::omp::OMPD_simd == ompDirective) { TypeRange resultType; auto SimdLoopOp = firOpBuilder.create<mlir::omp::SimdLoopOp>( - currentLocation, resultType, lowerBound, upperBound, step, - ifClauseOperand, simdlenClauseOperand, safelenClauseOperand, + currentLocation, resultType, lowerBound, upperBound, step, alignedVars, + nullptr, ifClauseOperand, simdlenClauseOperand, safelenClauseOperand, /*inclusive=*/firOpBuilder.getUnitAttr()); createBodyOfOp<omp::SimdLoopOp>(SimdLoopOp, converter, currentLocation, eval, &loopOpClauseList, iv); |