[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-23 Thread CHANDRA GHALE via cfe-commits
@@ -5748,7 +5752,8 @@ void CodeGenFunction::EmitOMPScanDirective(const OMPScanDirective &S) { } CGM.getOpenMPRuntime().emitReduction( *this, ParentDir.getEndLoc(), Privates, LHSs, RHSs, ReductionOps, - {/*WithNowait=*/true, /*SimpleReduction=*/tr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-23 Thread CHANDRA GHALE via cfe-commits
@@ -3943,7 +3946,8 @@ static void emitScanBasedDirective( PrivScope.Privatize(); CGF.CGM.getOpenMPRuntime().emitReduction( CGF, S.getEndLoc(), Privates, LHSs, RHSs, ReductionOps, - {/*WithNowait=*/true, /*SimpleReduction=*/true, OMPD_unknown}); +

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-21 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-21 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-21 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-21 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,274 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-21 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-21 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-21 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-20 Thread CHANDRA GHALE via cfe-commits
@@ -1481,6 +1482,8 @@ void CodeGenFunction::EmitOMPReductionClauseFinal( Privates.append(C->privates().begin(), C->privates().end()); LHSExprs.append(C->lhs_exprs().begin(), C->lhs_exprs().end()); RHSExprs.append(C->rhs_exprs().begin(), C->rhs_exprs().end()); +I

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-20 Thread CHANDRA GHALE via cfe-commits
@@ -5748,7 +5754,7 @@ void CodeGenFunction::EmitOMPScanDirective(const OMPScanDirective &S) { } CGM.getOpenMPRuntime().emitReduction( *this, ParentDir.getEndLoc(), Privates, LHSs, RHSs, ReductionOps, - {/*WithNowait=*/true, /*SimpleReduction=*/tr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-20 Thread CHANDRA GHALE via cfe-commits
@@ -3943,7 +3948,8 @@ static void emitScanBasedDirective( PrivScope.Privatize(); CGF.CGM.getOpenMPRuntime().emitReduction( CGF, S.getEndLoc(), Privates, LHSs, RHSs, ReductionOps, - {/*WithNowait=*/true, /*SimpleReduction=*/true, OMPD_unknown}); +

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-19 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: ping @alexey-bataev https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-16 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,273 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-16 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-16 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,274 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-16 Thread CHANDRA GHALE via cfe-commits
@@ -4898,6 +4898,274 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, const Expr *Privates, +const Expr *LHSExprs, const Expr *RHSExprs, const Expr

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-15 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Addressed release-note rebase problem. @alexey-bataev https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-15 Thread CHANDRA GHALE via cfe-commits
@@ -937,15 +937,7 @@ OpenMP Support - Added support 'no_openmp_constructs' assumption clause. - Added support for 'self_maps' in map and requirement clause. - Added support for 'omp stripe' directive. -- Fixed a crashing bug with ``omp unroll partial`` if the argument to - ``p

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-14 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: @alexey-bataev updated few more test with complex. Any more feedback. https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-12 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
@@ -530,6 +530,12 @@ OpenMP Support - Added support 'no_openmp_constructs' assumption clause. - Added support for 'self_maps' in map and requirement clause. - Added support for 'omp stripe' directive. +- Fixed a crashing bug with ``omp unroll partial`` if the argument to + ``p

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
@@ -0,0 +1,93 @@ +//RUN: %libomp-cxx-compile -fopenmp-version=60 && %libomp-run +#include +#include +#include "omp_testsuite.h" + +#define N 10 +class Sum { + int val; + +public: + Sum(int v = 0) : val(v) {} + Sum operator+(const Sum &rhs) const { return Sum(val + rhs.val);

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
@@ -0,0 +1,93 @@ +//RUN: %libomp-cxx-compile -fopenmp-version=60 && %libomp-run +#include +#include +#include "omp_testsuite.h" + +#define N 10 +class Sum { + int val; + +public: + Sum(int v = 0) : val(v) {} + Sum operator+(const Sum &rhs) const { return Sum(val + rhs.val);

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
@@ -0,0 +1,93 @@ +//RUN: %libomp-cxx-compile -fopenmp-version=60 && %libomp-run +#include +#include +#include "omp_testsuite.h" + +#define N 10 +class Sum { + int val; + +public: + Sum(int v = 0) : val(v) {} + Sum operator+(const Sum &rhs) const { return Sum(val + rhs.val);

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: > Can you add a few runtime tests, some with UDR with classes, several > reduction items with the different types, to check that functional part works > correctly? You can add it to the libomp right in this patch. Just want to be > sure we do not miss anything here Sure !!

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-08 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-07 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-07 Thread CHANDRA GHALE via cfe-commits
@@ -0,0 +1,538 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --include-generated-funcs --prefix-filecheck-ir-name _ --version 5 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -fopenmp-version=60 -x c

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-07 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,238 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( chandraghale wrote: - Updated the code with comments and clarified the logic - Updated OpenMPSupport.rst and th

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-07 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-07 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-07 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,234 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-06 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,150 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-05 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: @alexey-bataev . Reworked on UDR. Will be helpful if you will be able to review further. https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-05 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-05 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/8] Codegen for Reduction over private variables with reduc

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-05-01 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/128640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-05-01 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Committing to main, as already PR is approved. https://github.com/llvm/llvm-project/pull/128640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-01 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/7] Codegen for Reduction over private variables with reduc

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-01 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/6] Codegen for Reduction over private variables with reduc

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-01 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Refactored code to look up the expression and handle UDR, emitting it as is. updated the lit test. https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-01 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/5] Codegen for Reduction over private variables with reduc

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-10 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/2] Codegen for Reduction over private variables with reduc

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-10 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale edited https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-10 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-10 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/4] Codegen for Reduction over private variables with reduc

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale edited https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/3] Codegen for Reduction over private variables with reduc

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-08 Thread CHANDRA GHALE via cfe-commits
@@ -5201,6 +5345,9 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc, CGF.EmitBranch(DefaultBB); CGF.EmitBlock(DefaultBB, /*IsFinished=*/true); + if (Options.IsPrivateVarReduction) { +emitPrivateReduction(CGF, Loc, Privates, LHSExprs, RH

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-08 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,150 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-08 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,150 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-08 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,150 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-08 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale edited https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale edited https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/134709 Codegen support for reduction over private variable with reduction clause. Section 7.6.10 in in OpenMP 6.0 spec. - An internal shared copy is initialized with an initializer value. - The shared copy is upda

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-27 Thread CHANDRA GHALE via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang] Minor unused variable error for sanitizer builds (PR #132372)

2025-03-21 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/132372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Minor unused variable error for sanitizer builds (PR #132372)

2025-03-21 Thread CHANDRA GHALE via cfe-commits
@@ -11761,7 +11761,7 @@ void OMPClauseReader::VisitOMPReductionClause(OMPReductionClause *C) { unsigned NumFlags = Record.readInt(); SmallVector Flags; Flags.reserve(NumFlags); - for (unsigned I : llvm::seq(NumFlags)) + for ([[maybe_unused]] unsigned I : llvm::seq(NumF

[clang] Minor unused variable error for sanitizer builds (PR #132372)

2025-03-21 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/132372 Fix to issue [https://github.com/llvm/llvm-project/issues/132371 ](https://github.com/llvm/llvm-project/issues/132371 ) Minor error , sanitizer builds are failing for unused variable. sanitizer-aarch64-l

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-21 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/129938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-20 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Thank you for the review. https://github.com/llvm/llvm-project/pull/129938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread CHANDRA GHALE via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread CHANDRA GHALE via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread CHANDRA GHALE via cfe-commits
@@ -3757,6 +3768,31 @@ class OMPReductionClause final /// reduction copies. void setRHSExprs(ArrayRef RHSExprs); + /// Set the list private reduction flags + void setPrivateVariableReductionFlags(ArrayRef Flags) { +assert(Flags.size() == varlist_size() && +

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-18 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: 1. Used tail-allocated storage for extra members added in OMPreductionClause. 2. Modified assertion to diagnostic in parsing logic. 3. Reduction clause modifiers reduction-modifier and original-sharingmodifier packed into existing structure. 4. Added additional lit test ca

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-11 Thread CHANDRA GHALE via cfe-commits
@@ -4668,6 +4668,34 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, assert(Tok.is(tok::comma) && "Expected comma."); (void)ConsumeToken(); } +// Handle original(private / shared) Modifier +if (Kind == OMPC_reduction && getLangOpts().OpenMP

[clang] Inital support for privavate variable reduction (PR #127740)

2025-03-05 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/127740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #125648)

2025-02-21 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/125648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #125648)

2025-02-21 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Merging as already approved !! https://github.com/llvm/llvm-project/pull/125648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Inital support for privavate variable reduction (PR #127740)

2025-02-18 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/127740 None >From cf392f05f9499fd0621ffec91a3b852d4b91820b Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Tue, 18 Feb 2025 21:24:22 -0600 Subject: [PATCH] Inital support for privavate variable reduction ---

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop simd. (PR #121746)

2025-01-14 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/121746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop simd. (PR #121746)

2025-01-13 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/121746 >From 81f9c8f7eb18c0469b3c42db5150384cb57baef8 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 6 Jan 2025 04:25:49 -0600 Subject: [PATCH] codegen support for masked combined construct parallel maske

[clang] [OpenMP] codegen support for masked combined construct masked taskloop (PR #121914)

2025-01-12 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/121914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] codegen support for masked combined construct masked taskloop (PR #121914)

2025-01-12 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/121914 >From a15cfb56691aae4fb9b34d33c462fafab7ee4123 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Tue, 7 Jan 2025 04:51:54 -0600 Subject: [PATCH 1/2] codegen support for masked combined construct masked_ta

[clang] [OpenMP] codegen support for masked combined construct masked taskloop simd (PR #121916)

2025-01-12 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/121916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] codegen support for masked combined construct masked taskloop simd (PR #121916)

2025-01-12 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/121916 >From 7d03bd61553690f22c03b52ef2bda8a09938e7a1 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Tue, 7 Jan 2025 05:09:21 -0600 Subject: [PATCH] codegen support for masked combined construct masked taskloo

[clang] [OpenMP] codegen support for masked combined construct masked taskloop simd (PR #121916)

2025-01-10 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: @alexey-bataev Can you approve this and rest of splitted PRs [121914](https://github.com/llvm/llvm-project/pull/121914) and [121746](https://github.com/llvm/llvm-project/pull/121746 ) is the part of combined masked construct [PR-121741](https://github.com/llvm/llvm-pro

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop (PR #121741)

2025-01-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/121741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop (PR #121741)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/121741 >From 0c790fc2768d58634e0455adf9f797a2456a7335 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 6 Jan 2025 03:35:46 -0600 Subject: [PATCH 1/3] codegen support for masked combined construct parallel

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop (PR #121741)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: > Also update ReleaseNotes.rst here and in other patches @alexey-bataev release notes updated. Updated for other patches as well in this PR. https://github.com/llvm/llvm-project/pull/121741 ___ cfe-commits mailing list cfe-commi

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop (PR #121741)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/121741 >From 0c790fc2768d58634e0455adf9f797a2456a7335 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 6 Jan 2025 03:35:46 -0600 Subject: [PATCH 1/3] codegen support for masked combined construct parallel

[clang] [OpenMP] codegen support for masked combined construct masked taskloop simd (PR #121916)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Note : OpenMPSupport.rst is updated in PR : https://github.com/llvm/llvm-project/pull/121741 https://github.com/llvm/llvm-project/pull/121916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [OpenMP] codegen support for masked combined construct masked taskloop (PR #121914)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: Note : OpenMPSupport.rst is updated in PR : https://github.com/llvm/llvm-project/pull/121741 https://github.com/llvm/llvm-project/pull/121914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop simd. (PR #121746)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: > Please update OpenMPSupport.rst Updated the doc in this PR : https://github.com/llvm/llvm-project/pull/121741 https://github.com/llvm/llvm-project/pull/121746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop (PR #121741)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: > Update OpenMPSupport.rst Updated OpenMPSupport.rst . Updated the doc for all the related split-ed PRs ( [PR-121746](https://github.com/llvm/llvm-project/pull/121746) , [121914](https://github.com/llvm/llvm-project/pull/121914) , [121916](https://github.com/llvm/llvm-pro

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop (PR #121741)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/121741 >From 0c790fc2768d58634e0455adf9f797a2456a7335 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 6 Jan 2025 03:35:46 -0600 Subject: [PATCH 1/2] codegen support for masked combined construct parallel

[clang] [OpenMP] codegen support for masked combined construct masked taskloop simd (PR #121916)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/121916 Added codegen support for combined masked constructs `masked taskloop simd`. Added implementation for `EmitOMPMaskedTaskLoopSimdDirective`. >From 7d03bd61553690f22c03b52ef2bda8a09938e7a1 Mon Sep 17 00:00:00

[clang] [OpenMP] codegen support for masked combined construct masked taskloop (PR #121914)

2025-01-07 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/121914 Added codegen support for combined masked constructs `masked taskloop.` Added implementation for `EmitOMPMaskedTaskLoopDirective`. >From a15cfb56691aae4fb9b34d33c462fafab7ee4123 Mon Sep 17 00:00:00 2001 Fro

[clang] [OpenMP] Codegen support for masked combined construct (PR #120520)

2025-01-06 Thread CHANDRA GHALE via cfe-commits
chandraghale wrote: closing this PR . Splitting into separate patches for each directives. https://github.com/llvm/llvm-project/pull/120520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [OpenMP] Codegen support for masked combined construct (PR #120520)

2025-01-06 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/120520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop simd. (PR #121746)

2025-01-06 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/121746 Added codegen support for combined masked constructs `Parallel masked taskloop simd`. Added implementation for `EmitOMPParallelMaskedTaskLoopSimdDirective`. >From 81f9c8f7eb18c0469b3c42db5150384cb57baef8 M

[clang] [OpenMP] codegen support for masked combined construct parallel masked taskloop (PR #121741)

2025-01-06 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/121741 Added codegen support for combined masked constructs Parallel masked taskloop. Added implementation for EmitOMPParallelMaskedTaskLoopDirective. >From 0c790fc2768d58634e0455adf9f797a2456a7335 Mon Sep 17 00:

  1   2   >