@@ -0,0 +1,1183 @@
+//=== OpenMPClauses.td - OpenMP dialect clause definitions -*- tablegen
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/tblah approved this pull request.
LG. Thanks for the cleanup
https://github.com/llvm/llvm-project/pull/90108
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/tblah approved this pull request.
LGTM, thanks
https://github.com/llvm/llvm-project/pull/90090
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/tblah approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/90087
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah approved this pull request.
LGTM. I'm sorry this fell off my radar
https://github.com/llvm/llvm-project/pull/89211
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/tblah approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/89214
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah approved this pull request.
LGTM, thanks
https://github.com/llvm/llvm-project/pull/89212
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -1977,9 +1977,10 @@ LogicalResult OrderedRegionOp::verify() {
if (getSimd())
return failure();
- if (auto container = (*this)->getParentOfType()) {
-if (!container.getOrderedValAttr() ||
-container.getOrderedValAttr().getInt() != 0)
+ if (auto loopOp =
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/86982
Patch 1: https://github.com/llvm/llvm-project/pull/86978
Patch 2: https://github.com/llvm/llvm-project/pull/86979
>From 9f68c844b6f4c4a52002cd9d90cd158b10e64bf2 Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Tue,
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/86979
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/86979
The argument to the initialization region of reduction declarations was never
mapped. This meant that if this argument was accessed inside the initialization
region, that mlir operation would be translated to an
tblah wrote:
Sorry about the force push. Github wasn't showing the new commit (02550e1). It
is just a rebase onto the target branch.
https://github.com/llvm/llvm-project/pull/84955
___
llvm-branch-commits mailing list
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84955
>From 0b2f5fee61d170b0a2197fd5da92f0e84b3b14f4 Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Wed, 21 Feb 2024 14:22:39 +
Subject: [PATCH 1/3] [mlir][LLVM] erase call mappings in forgetMapping()
It looks like
@@ -92,10 +93,42 @@ std::string
ReductionProcessor::getReductionName(llvm::StringRef name,
if (isByRef)
byrefAddition = "_byref";
- return (llvm::Twine(name) +
- (ty.isIntOrIndex() ? llvm::Twine("_i_") : llvm::Twine("_f_")) +
-
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84958
>From bd668cd95d95d1e5b9c8436875c14878c98902ff Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Mon, 12 Feb 2024 14:03:00 +
Subject: [PATCH 1/5] [flang][OpenMP] lower simple array reductions
This has been
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84958
>From bd668cd95d95d1e5b9c8436875c14878c98902ff Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Mon, 12 Feb 2024 14:03:00 +
Subject: [PATCH 1/4] [flang][OpenMP] lower simple array reductions
This has been
@@ -92,10 +93,42 @@ std::string
ReductionProcessor::getReductionName(llvm::StringRef name,
if (isByRef)
byrefAddition = "_byref";
- return (llvm::Twine(name) +
- (ty.isIntOrIndex() ? llvm::Twine("_i_") : llvm::Twine("_f_")) +
-
@@ -0,0 +1,74 @@
+! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
+
+program reduce
+integer, dimension(3) :: i = 0
+
+!$omp parallel reduction(+:i)
+i(1) = 1
+i(2) = 2
+i(3) = 3
@@ -283,13 +316,166 @@ mlir::Value ReductionProcessor::createScalarCombiner(
return reductionOp;
}
+/// Create reduction combiner region for reduction variables which are boxed
+/// arrays
+static void genBoxCombiner(fir::FirOpBuilder , mlir::Location loc,
+
@@ -390,15 +559,35 @@ void ReductionProcessor::addReductionDecl(
// initial pass to collect all recuction vars so we can figure out if this
// should happen byref
+ fir::FirOpBuilder = converter.getFirOpBuilder();
for (const Fortran::parser::OmpObject :
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84955
>From c62b31262bc619145866a304e10925a35462f5bf Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Wed, 21 Feb 2024 14:22:39 +
Subject: [PATCH 1/2] [mlir][LLVM] erase call mappings in forgetMapping()
It looks like
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84954
>From f951d16cf6cb1ab221f47ca2e712020b9af0af87 Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Fri, 1 Mar 2024 16:59:09 +
Subject: [PATCH 1/5] [flang][CodeGen] Run PreCGRewrite on omp reduction
declare ops
tblah wrote:
> Wouldn't applying the patterns on the module in a single pass work here as
> well?
Yes that would work but we would loose parallelism. I wanted to keep that
because there was talk in the past about breaking up the existing Module passes
so that different functions (or other
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84954
>From f951d16cf6cb1ab221f47ca2e712020b9af0af87 Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Fri, 1 Mar 2024 16:59:09 +
Subject: [PATCH 1/4] [flang][CodeGen] Run PreCGRewrite on omp reduction
declare ops
tblah wrote:
> Wouldn't it be cleaner to expose the patterns via a
> `populateFirCfgConversionPatterns` function and reuse it in you extra pass
> instead of making two pass from the initial file?
>
> We did this recently for the FirToLLVM patterns. #83492
Thanks for taking a look at this. I
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84953
>From 192da3c05fd8c0759f280e0895ffc2f09b2203e4 Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Thu, 15 Feb 2024 12:12:29 +
Subject: [PATCH 1/2] [flang] run CFG conversion on omp reduction declare ops
Most FIR
@@ -319,6 +320,10 @@ class CodeGenRewrite : public
fir::impl::CodeGenRewriteBase {
runOn(func, func.getBody());
for (auto global : mod.getOps())
runOn(global, global.getRegion());
+for (auto omp : mod.getOps()) {
tblah wrote:
Good idea.
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/84954
>From f951d16cf6cb1ab221f47ca2e712020b9af0af87 Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Fri, 1 Mar 2024 16:59:09 +
Subject: [PATCH 1/3] [flang][CodeGen] Run PreCGRewrite on omp reduction
declare ops
https://github.com/tblah approved this pull request.
LGTM, thanks
https://github.com/llvm/llvm-project/pull/81627
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/tblah approved this pull request.
Thanks for explaining. LGTM
https://github.com/llvm/llvm-project/pull/81623
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -410,8 +410,15 @@ class FIROpConversion : public
mlir::ConvertOpToLLVMPattern {
mlir::ConversionPatternRewriter ) const {
auto thisPt = rewriter.saveInsertionPoint();
mlir::Operation *parentOp = rewriter.getInsertionBlock()->getParentOp();
-mlir::Block
@@ -181,45 +172,41 @@ genDependKindAttr(fir::FirOpBuilder ,
pbKind);
}
-static mlir::Value getIfClauseOperand(
-Fortran::lower::AbstractConverter ,
-const Fortran::parser::OmpClause::If *ifClause,
-
@@ -181,45 +172,41 @@ genDependKindAttr(fir::FirOpBuilder ,
pbKind);
}
-static mlir::Value getIfClauseOperand(
-Fortran::lower::AbstractConverter ,
-const Fortran::parser::OmpClause::If *ifClause,
-
@@ -87,50 +87,44 @@ getSimdModifier(const omp::clause::Schedule ) {
static void
genAllocateClause(Fortran::lower::AbstractConverter ,
- const Fortran::parser::OmpAllocateClause ,
+ const omp::clause::Allocate ,
https://github.com/tblah approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/81622
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/84958
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/84957
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/84955
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/84954
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/84953
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/84952
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/84958
This has been tested with arrays with compile-time constant bounds. Allocatable
arrays and arrays with non-constant bounds are not yet supported. User-defined
reduction functions are also not yet supported.
The
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/84957
Moving extractSequenceType to FIRType.h so that this can also be used from
OpenMP.
OpenMP array reductions 5/6
>From 2ff12fa0a580cb060f208d173d9af72bfa49d3b2 Mon Sep 17 00:00:00 2001
From: Tom Eccles
Date: Fri,
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/84955
It looks like the mappings for call instructions were forgotten here. This
fixes a bug in OpenMP when in-lining a region containing call operations
multiple times.
OpenMP array reductions 4/6
>From
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/84954
OpenMP reduction declare operations can contain FIR code which needs to be
lowered to LLVM. With array reductions, these regions can contain more
complicated operations which need PreCGRewriting. A similar extra
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/84953
Most FIR passes only look for FIR operations inside of functions (either
because they run only on func.func or they run on the module but iterate over
functions internally). But there can also be FIR operations
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/84952
Advise to place the alloca at the start of the first block of whichever region
(init or combiner) we are currently inside.
It probably isn't safe to put an alloca inside of a combiner region because
this will be
tblah wrote:
Next PR in the series https://github.com/llvm/llvm-project/pull/84304
https://github.com/llvm/llvm-project/pull/84305
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/84305
TBAA builder assumed that all loads/stores are inside of functions and hit an
assertion once it found loads and stores inside of an omp::ReductionDeclareOp.
For now just don't add TBAA tags to those loads and
tblah wrote:
co-authored with @Leporacanthicus (github seems to have taken the tag out of
the commit message but shows it in the UI)
https://github.com/llvm/llvm-project/pull/84304
___
llvm-branch-commits mailing list
https://github.com/tblah approved this pull request.
Thanks for the update!
https://github.com/llvm/llvm-project/pull/80019
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
@@ -398,11 +400,39 @@ struct ParallelOpLowering : public
OpRewritePattern {
// Replace the reduction operations contained in this loop. Must be done
// here rather than in a separate pattern to have access to the list of
// reduction variables.
+unsigned int
@@ -398,11 +400,39 @@ struct ParallelOpLowering : public
OpRewritePattern {
// Replace the reduction operations contained in this loop. Must be done
// here rather than in a separate pattern to have access to the list of
// reduction variables.
+unsigned int
tblah wrote:
Please could you update the documentation for reductions on line 442 - I
presume we don't want to encourage `omp.reduction` operations anymore
https://github.com/llvm/llvm-project/pull/80019
___
54 matches
Mail list logo