[PATCH] D99995: [OpenMP51] Initial support for marked directive and filter clause
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 7 05:54:36 PDT 2021
ABataev added a comment.
`marked`->`masked`
================
Comment at: clang/include/clang/AST/OpenMPClause.h:8244
+
+ /// Set condition.
+ void setThreadID(Expr *TID) { ThreadID = TID; }
----------------
condition?
================
Comment at: clang/include/clang/AST/OpenMPClause.h:8270-8272
+ /// Sets the location of '('.
+ void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
+
----------------
Make it private
================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:2955-2957
+ case OMPC_filter:
+ Clause = ParseOpenMPSingleExprClause(CKind, WrongDirective);
+ break;
----------------
Why you did not put it to the case with `num_threads` etc. clauses?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:4727-4728
// OpenMP [2.16, Nesting of Regions]
// A master region may not be closely nested inside a worksharing,
// atomic, or explicit task region.
NestingProhibited = isOpenMPWorksharingDirective(ParentRegion) ||
----------------
Update a reference/text here
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:4761-4778
+ NestingProhibited =
+ isOpenMPWorksharingDirective(ParentRegion) ||
+ isOpenMPTaskingDirective(ParentRegion) ||
+ ParentRegion == OMPD_master || ParentRegion == OMPD_masked ||
+ ParentRegion == OMPD_parallel_master ||
+ ParentRegion == OMPD_critical || ParentRegion == OMPD_ordered;
} else if (isOpenMPWorksharingDirective(CurrentRegion) &&
----------------
Sam, update text
================
Comment at: clang/test/OpenMP/masked_ast_print.cpp:26
+
+#pragma omp masked filter(1) filter(2)
+{
----------------
nonconst threadid tests?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99995/new/
https://reviews.llvm.org/D99995
More information about the llvm-commits
mailing list