https://github.com/alexey-bataev approved this pull request.
LG
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
https://github.com/alexey-bataev approved this pull request.
LG
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
https://github.com/alexey-bataev approved this pull request.
LG
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
alexey-bataev wrote:
Rebase? And commit after rebase, it is approved already
https://github.com/llvm/llvm-project/pull/121814
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1463,6 +1463,9 @@ static void InitializePredefinedMacros(const TargetInfo
&TI,
case 52:
Builder.defineMacro("_OPENMP", "202111");
break;
+case 60:
+ Builder.defineMacro("_OPENMP", "202411");
+ break;
alexey-bataev wrote:
Must
@@ -14205,6 +14212,15 @@ static void collectLoopStmts(Stmt *AStmt,
MutableArrayRef LoopStmts) {
"Expecting a loop statement for each affected loop");
}
+/// Build and return a DeclRefExpr for the floor induction variable using the
+/// SemaRef and the provided parame
@@ -14205,6 +14212,15 @@ static void collectLoopStmts(Stmt *AStmt,
MutableArrayRef LoopStmts) {
"Expecting a loop statement for each affected loop");
}
+/// Build and return a DeclRefExpr for the floor induction variable using the
+/// SemaRef and the provided parame
@@ -14342,22 +14358,21 @@ StmtResult
SemaOpenMP::ActOnOpenMPTileDirective(ArrayRef Clauses,
Stmt *LoopStmt = LoopStmts[I];
// Commonly used variables. One of the constraints of an AST is that every
-// node object must appear at most once, hence we define lamdas t
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/119891
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev commented:
Update OpenMPSupport.rst
https://github.com/llvm/llvm-project/pull/119891
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexey-bataev wrote:
> > Aldo, update OpenMPSupport page
>
> Question about this. I see that the table for `OpenMP 6.0 Implementation
> Details` chapter has an entry for `Loop transformation constructs`. Should
> the `#pragma omp stripe` be listed here as a bullet item? Do you have a
> prefer
https://github.com/alexey-bataev commented:
Need to change the caption and summary of PR, I assume
https://github.com/llvm/llvm-project/pull/122108
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
@@ -17153,11 +17155,25 @@ OMPClause
*SemaOpenMP::ActOnOpenMPVarListClause(OpenMPClauseKind Kind,
case OMPC_has_device_addr:
Res = ActOnOpenMPHasDeviceAddrClause(VarList, Locs);
break;
- case OMPC_allocate:
-Res = ActOnOpenMPAllocateClause(Data.DepModOrTailExpr,
@@ -4530,32 +4530,89 @@ static bool parseStepSize(Parser &P,
SemaOpenMP::OpenMPVarListDataTy &Data,
}
/// Parse 'allocate' clause modifiers.
-/// If allocator-modifier exists, return an expression for it and set
-/// Data field noting modifier was specified.
-///
+/// I
@@ -11824,10 +11824,14 @@ void OMPClauseReader::VisitOMPMapClause(OMPMapClause
*C) {
}
void OMPClauseReader::VisitOMPAllocateClause(OMPAllocateClause *C) {
- C->setAllocatorModifier(Record.readEnum());
+ C->setFirstAllocateModifier(
+ static_cast(Record.readInt()));
+
@@ -5965,6 +5967,269 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema
&SemaRef) {
return Checker.teamsLoopCanBeParallelFor();
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
+
+ Expr *SubExpr = Cond->IgnoreParenImpCasts();
+
+ if (auto *DeclRef = dy
alexey-bataev wrote:
> > #if dispatch transformed to
> > #pragma omp taskwait depend(out:x)
> > #pragma omp dispatch nocontext(c2)
> > foo(); --> with traits call to foo_variant_dispatch(i,j)
> > you should have 2 captured regions - one for taskwait and one for dispatch.
> > It does not mean, >y
@@ -1160,6 +1162,12 @@ class SemaOpenMP : public SemaBase {
SmallVector
AllocClauseModifiersLoc;
Expr *AllocateAlignment = nullptr;
+struct OpenMPReductionClauseModifiers {
+ int ExtraModifier;
+ int OriginalSharingModifier;
+ OpenMPReductionC
@@ -3854,6 +3890,7 @@ class OMPReductionClause final
/// region with this clause.
/// \param PostUpdate Expression that must be executed after exit from the
/// OpenMP region with this clause.
+ /// \pram IsPrivateVarReduction array for private variable reduction flags
-
@@ -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() &&
+
alexey-bataev wrote:
The codegen for each(virtual) directive should live on codegen. But(!) Sema
should emit separate (specific) CapturedStmts for each such virtual region.
Check, how the combined directives work. Sema defines multiple CapturedStmt for
each combined directive, and then codegen
@@ -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() &&
+
@@ -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
@@ -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
@@ -11721,6 +11721,12 @@ void
OMPClauseReader::VisitOMPReductionClause(OMPReductionClause *C) {
Vars.push_back(Record.readSubExpr());
C->setInscanCopyArrayElems(Vars);
}
+ unsigned NumFlags = Record.readInt();
+ SmallVector Flags;
+ Flags.reserve(NumFlags);
+ f
@@ -18933,12 +18945,34 @@ 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
https://github.com/alexey-bataev approved this pull request.
LG with a nit
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
@@ -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
@@ -8020,6 +8020,11 @@ void
OMPClauseWriter::VisitOMPReductionClause(OMPReductionClause *C) {
for (auto *E : C->copy_array_elems())
Record.AddStmt(E);
}
+ auto PrivateFlags = C->private_var_reduction_flags();
+ Record.push_back(std::distance(PrivateFlags.begin(),
alexey-bataev wrote:
> > The codegen for each(virtual) directive should live on codegen. But(!) Sema
> > should emit separate (specific) CapturedStmts for each such virtual region.
> > Check, how the combined directives work. Sema defines multiple CapturedStmt
> > for each combined directive,
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error<
"'%0' clause requires 'dispatch' context selector">;
def err_omp_append_args_with_varargs : Error<
"'append_args' is not allowed with varargs functions">;
+def warn_omp_dispatch_clause_novariant
@@ -4280,6 +4282,18 @@ getTargetRegionParams(Sema &SemaRef) {
return Params;
}
+static SmallVector
+getDispatchRegionParams(Sema &SemaRef) {
+ ASTContext &Context = SemaRef.getASTContext();
+ SmallVector Params;
+
+ // QualType VoidPtrTy = Context.VoidPtrTy.withConst().w
@@ -4899,6 +4899,151 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
+CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates,
+ArrayRef LHSExprs, ArrayRef RHSExprs,
+ArrayRef Reduct
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error<
"'%0' clause requires 'dispatch' context selector">;
def err_omp_append_args_with_varargs : Error<
"'append_args' is not allowed with varargs functions">;
+def warn_omp_dispatch_clause_novariant
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
+
+ Expr *SubExpr = Cond->IgnoreParenImpCasts();
+
+ if (auto *DeclRef = dyn_cast(SubExpr
@@ -4899,6 +4899,150 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
+CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates,
+ArrayRef LHSExprs, ArrayRef RHSExprs,
+ArrayRef Reduct
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error<
"'%0' clause requires 'dispatch' context selector">;
def err_omp_append_args_with_varargs : Error<
"'append_args' is not allowed with varargs functions">;
+def warn_omp_dispatch_clause_novariant
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
alexey-bataev wrote:
Why do you need it? CapturedExpr should be emitted a
@@ -537,6 +537,10 @@ Python Binding Changes
OpenMP Support
--
+- Added support for 'omp assume' directive.
+- Added support for 'omp scope' directive.
+- Added support for allocator-modifier in 'allocate' clause.
alexey-bataev wrote:
Unrelated to
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/131838
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
alexey-bataev wrote:
Why do you need to dig for the captured expr here?
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
alexey-bataev wrote:
It means, the context (capturedstmt) does not know a
@@ -4899,6 +4899,151 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
+CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates,
+ArrayRef LHSExprs, ArrayRef RHSExprs,
+ArrayRef Reduct
@@ -4899,6 +4899,151 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
+CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates,
+ArrayRef LHSExprs, ArrayRef RHSExprs,
+ArrayRef Reduct
@@ -4899,6 +4899,151 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
+CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates,
+ArrayRef LHSExprs, ArrayRef RHSExprs,
+ArrayRef Reduct
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
+
+ Expr *SubExpr = Cond->IgnoreParenImpCasts();
+
+ if (auto *DeclRef = dyn_cast(SubExpr
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error<
"'%0' clause requires 'dispatch' context selector">;
def err_omp_append_args_with_varargs : Error<
"'append_args' is not allowed with varargs functions">;
+def warn_omp_dispatch_clause_novariant
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
+
+ Expr *SubExpr = Cond->IgnoreParenImpCasts();
+
+ if (auto *DeclRef = dyn_cast(SubExpr
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
+
+ Expr *SubExpr = Cond->IgnoreParenImpCasts();
+
+ if (auto *DeclRef = dyn_cast(SubExpr
@@ -4529,6 +4529,117 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getCapturedExprFromImplicitCastExpr(Expr *Cond) {
+
+ Expr *SubExpr = Cond->IgnoreParenImpCasts();
+
+ if (auto *DeclRef = dyn_cast(Su
@@ -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
@@ -11899,6 +11899,9 @@ def err_omp_clause_requires_dispatch_construct : Error<
"'%0' clause requires 'dispatch' context selector">;
def err_omp_append_args_with_varargs : Error<
"'append_args' is not allowed with varargs functions">;
+def warn_omp_dispatch_clause_novariant
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) {
a = 2;
#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d)
if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc],
arr[:], ([argc][sizeof(T)])argv)
foo();
+#ifndef OMP60
-
@@ -3700,6 +3701,11 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF,
SourceLocation Loc,
if (NeedsCleanup)
Flags = Flags | DestructorsFlag;
}
+ if (const auto *Clause = D.getSingleClause()) {
alexey-bataev wrote:
Better to pass the flag as
@@ -3691,6 +3691,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF,
SourceLocation Loc,
DestructorsFlag = 0x8,
PriorityFlag = 0x20,
DetachableFlag = 0x40,
+PoolFlag = 0x80,
alexey-bataev wrote:
Is the runtime updated to handle this flag
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">;
def err_omp_missing_comma : Error< "missing ',' after %0">;
def err_omp_expected_context_selector
: Error<"expected valid context selector in %0">;
+def err_omp_unknown_clause
+: Error<"expe
@@ -2785,6 +2797,13 @@ StmtResult
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
return Directive;
}
}
+ if (CKind == OMPC_otherwise) {
+// Check for 'otherwise' keyword.
+if (Tok.is(tok::identifier) &&
+Tok.getIde
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl,
+ Expr *NewExpr) {
+ Expr *CurrentCa
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl,
+ Expr *NewExpr) {
+ Expr *CurrentCa
@@ -0,0 +1,364 @@
+// expected-no-diagnostics
alexey-bataev wrote:
The tests with classes and function members are required, as well as classes,
used in conditions
https://github.com/llvm/llvm-project/pull/131838
___
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl,
+ Expr *NewExpr) {
+ Expr *CurrentCa
@@ -10554,6 +10687,8 @@
SemaOpenMP::ActOnOpenMPDispatchDirective(ArrayRef Clauses,
return StmtError();
Stmt *S = cast(AStmt)->getCapturedStmt();
+ if (isa(S))
+S = cast(S)->getCapturedStmt();
alexey-bataev wrote:
```suggestion
if (auto *CS = dyn
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl,
+ Expr *NewExpr) {
+ Expr *CurrentCa
@@ -4280,6 +4282,15 @@ getTargetRegionParams(Sema &SemaRef) {
return Params;
}
+static SmallVector
+getDispatchRegionParams(Sema &SemaRef) {
+ ASTContext &Context = SemaRef.getASTContext();
+ SmallVector Params;
+
+ Params.push_back(std::make_pair(StringRef(), QualType())
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl,
+ Expr *NewExpr) {
+ Expr *CurrentCa
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl,
+ Expr *NewExpr) {
+ Expr *CurrentCa
https://github.com/alexey-bataev approved this pull request.
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
alexey-bataev wrote:
Missed a couple of things. Need to update OpenMPSupport.rst and ReleaseNotes
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/c
@@ -4899,6 +4899,150 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
+CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates,
+ArrayRef LHSExprs, ArrayRef RHSExprs,
+ArrayRef Reduct
@@ -4899,6 +4899,150 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
+CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates,
+ArrayRef LHSExprs, ArrayRef RHSExprs,
+ArrayRef Reduct
https://github.com/alexey-bataev approved this pull request.
https://github.com/llvm/llvm-project/pull/138179
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) {
a = 2;
#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d)
if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc],
arr[:], ([argc][sizeof(T)])argv)
foo();
+#ifndef OMP60
-
https://github.com/alexey-bataev commented:
Need to update OpenMPSupport.rst and release notes
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-
@@ -4899,6 +4899,238 @@ void
CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF,
}
}
+void CGOpenMPRuntime::emitPrivateReduction(
alexey-bataev wrote:
1. Add the comments, describing the logic of the function.
2. How does it differ from the
https://github.com/alexey-bataev 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
https://github.com/alexey-bataev commented:
Update OpenMPSupport.rst and release notes documents
https://github.com/llvm/llvm-project/pull/135807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) {
a = 2;
#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d)
if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc],
arr[:], ([argc][sizeof(T)])argv)
foo();
+#ifndef OMP60
-
@@ -3691,6 +3691,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF,
SourceLocation Loc,
DestructorsFlag = 0x8,
PriorityFlag = 0x20,
DetachableFlag = 0x40,
+PoolFlag = 0x80,
alexey-bataev wrote:
Still the runtime library should be updated
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) {
a = 2;
#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d)
if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc],
arr[:], ([argc][sizeof(T)])argv)
foo();
+#ifndef OMP60
-
@@ -2759,6 +2759,18 @@ StmtResult
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
OpenMPClauseKind CKind = Tok.isAnnotation()
? OMPC_unknown
: getOpenMPClauseKind(PP.getSpelling(Tok));
+ // C
@@ -2785,6 +2797,13 @@ StmtResult
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
return Directive;
}
}
+ if (CKind == OMPC_otherwise) {
+// Check for 'otherwise' keyword.
+if (Tok.is(tok::identifier) &&
+Tok.getIde
@@ -78,10 +78,7 @@ void foo(void) {
for (int i = 0; i < 16; i++)
;
-#pragma omp metadirective when(user = {condition(0)} \
- : parallel for) otherwise()
- for (int i=0; i<10; i++)
-;
+
alexey-bataev wrote:
Why moved t
@@ -2759,6 +2759,18 @@ StmtResult
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
OpenMPClauseKind CKind = Tok.isAnnotation()
? OMPC_unknown
: getOpenMPClauseKind(PP.getSpelling(Tok));
+ // C
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">;
def err_omp_missing_comma : Error< "missing ',' after %0">;
def err_omp_expected_context_selector
: Error<"expected valid context selector in %0">;
+def err_omp_unknown_clause
a
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">;
def err_omp_missing_comma : Error< "missing ',' after %0">;
def err_omp_expected_context_selector
: Error<"expected valid context selector in %0">;
+def err_omp_unknown_clause
a
https://github.com/alexey-bataev approved this pull request.
https://github.com/llvm/llvm-project/pull/135463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const
OMPMasterDirective &S) {
emitMaster(*this, S);
}
+static Expr *getInitialExprFromCapturedExpr(Expr *Cond) {
+
+ Expr *SubExpr = Cond->IgnoreParenImpCasts();
+
+ if (auto *DeclRef = dyn_cast(SubExpr
https://github.com/alexey-bataev commented:
Refer to target region codegen
https://github.com/llvm/llvm-project/pull/131838
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) {
a = 2;
#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d)
if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc],
arr[:], ([argc][sizeof(T)])argv)
foo();
+#ifndef OMP60
-
@@ -2,21 +2,50 @@
// RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -verify -fopenmp-simd -x c++
-std=c++14 -fexceptions -fcxx-exceptions %s
+// RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -verify=expected,omp52 -fopenmp
-fopenmp-version=52 -ferror-limit 100 -o - %s -Wuninitia
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">;
def err_omp_missing_comma : Error< "missing ',' after %0">;
def err_omp_expected_context_selector
: Error<"expected valid context selector in %0">;
+def err_omp_unknown_clause
+: Error<"expe
@@ -0,0 +1,198 @@
+// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux
-emit-llvm %s -o - | FileCheck %s
alexey-bataev wrote:
Add serialization/deserialization tests
https://github.com/llvm/llvm-project/pull/128640
__
@@ -117,9 +45,66 @@ void func3() {
// CHECK-NEXT:[[TMP1:%.*]] = load i32, ptr [[I]], align 4
// CHECK-NEXT:[[INC:%.*]] = add nsw i32 [[TMP1]], 1
// CHECK-NEXT:store i32 [[INC]], ptr [[I]], align 4
-// CHECK-NEXT:br label [[FOR_COND:%.*]]
+// CHECK-NEXT:br la
@@ -1,105 +1,33 @@
-// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux
-emit-llvm %s -o - | FileCheck %s
-// expected-no-diagnostics
-
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=52 -DOMP52 -triple
x86_64-unknown-unknown -emit-llvm %s -o - | FileCh
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">;
def err_omp_missing_comma : Error< "missing ',' after %0">;
def err_omp_expected_context_selector
: Error<"expected valid context selector in %0">;
+def err_omp_unknown_clause
+: Error<"expe
@@ -3691,6 +3691,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFunction &CGF,
SourceLocation Loc,
DestructorsFlag = 0x8,
PriorityFlag = 0x20,
DetachableFlag = 0x40,
+PoolFlag = 0x80,
alexey-bataev wrote:
The runtime change is better to implement i
@@ -2882,6 +2882,12 @@ StmtResult
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
/*ReadDirectiveWithinMetadirective=*/true);
break;
}
+// If no match is found and no otherwise clause is present, skip
+// OMP5.2 Chapter 7.4: If no otherwise cla
@@ -2882,6 +2882,12 @@ StmtResult
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
/*ReadDirectiveWithinMetadirective=*/true);
break;
}
+// If no match is found and no otherwise clause is present, skip
+// OMP5.2 Chapter 7.4: If no otherwise cla
@@ -2882,6 +2882,13 @@ StmtResult
Parser::ParseOpenMPDeclarativeOrExecutableDirective(
/*ReadDirectiveWithinMetadirective=*/true);
break;
}
+// If no match is found and no otherwise clause is present, skip
+// OMP5.2 Chapter 7.4: If no otherwise cla
2001 - 2100 of 2257 matches
Mail list logo