[flang-commits] [flang] b124c04 - [Flang][OpenMP] Remove omp.simd reduction block args (#111523)
via flang-commits
flang-commits at lists.llvm.org
Wed Oct 9 02:21:52 PDT 2024
Author: Sergio Afonso
Date: 2024-10-09T10:21:47+01:00
New Revision: b124c04597166cc93ca791d0ad07834c85de824d
URL: https://github.com/llvm/llvm-project/commit/b124c04597166cc93ca791d0ad07834c85de824d
DIFF: https://github.com/llvm/llvm-project/commit/b124c04597166cc93ca791d0ad07834c85de824d.diff
LOG: [Flang][OpenMP] Remove omp.simd reduction block args (#111523)
This patch reverts previous changes to create entry block arguments for
reduction variables attached to `simd` constructs.
This can't currently be done because reduction variables stored in the
corresponding clause structure are not added to the `omp.simd` operation
when created, as this is not supported yet. Adding block arguments for
non-existent reduction variables results in some tests from the Fujitsu
compiler testsuite breaking:
https://linaro.atlassian.net/browse/LLVM-1389.
Added:
Modified:
flang/lib/Lower/OpenMP/OpenMP.cpp
Removed:
################################################################################
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index b1a10960c8022e..1ce744457160b4 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2072,9 +2072,7 @@ static void genStandaloneSimd(lower::AbstractConverter &converter,
loopNestClauseOps, iv);
EntryBlockArgs simdArgs;
- // TODO: Add private syms and vars.
- simdArgs.reduction.syms = simdReductionSyms;
- simdArgs.reduction.vars = simdClauseOps.reductionVars;
+ // TODO: Add private, reduction syms and vars.
auto simdOp =
genWrapperOp<mlir::omp::SimdOp>(converter, loc, simdClauseOps, simdArgs);
@@ -2232,9 +2230,7 @@ static void genCompositeDistributeParallelDoSimd(
wsloopOp.setComposite(/*val=*/true);
EntryBlockArgs simdArgs;
- // TODO: Add private syms and vars.
- simdArgs.reduction.syms = simdReductionSyms;
- simdArgs.reduction.vars = simdClauseOps.reductionVars;
+ // TODO: Add private, reduction syms and vars.
auto simdOp =
genWrapperOp<mlir::omp::SimdOp>(converter, loc, simdClauseOps, simdArgs);
simdOp.setComposite(/*val=*/true);
@@ -2291,9 +2287,7 @@ static void genCompositeDistributeSimd(lower::AbstractConverter &converter,
distributeOp.setComposite(/*val=*/true);
EntryBlockArgs simdArgs;
- // TODO: Add private syms and vars.
- simdArgs.reduction.syms = simdReductionSyms;
- simdArgs.reduction.vars = simdClauseOps.reductionVars;
+ // TODO: Add private, reduction syms and vars.
auto simdOp =
genWrapperOp<mlir::omp::SimdOp>(converter, loc, simdClauseOps, simdArgs);
simdOp.setComposite(/*val=*/true);
@@ -2350,9 +2344,7 @@ static void genCompositeDoSimd(lower::AbstractConverter &converter,
wsloopOp.setComposite(/*val=*/true);
EntryBlockArgs simdArgs;
- // TODO: Add private syms and vars.
- simdArgs.reduction.syms = simdReductionSyms;
- simdArgs.reduction.vars = simdClauseOps.reductionVars;
+ // TODO: Add private, reduction syms and vars.
auto simdOp =
genWrapperOp<mlir::omp::SimdOp>(converter, loc, simdClauseOps, simdArgs);
simdOp.setComposite(/*val=*/true);
More information about the flang-commits
mailing list