summaryrefslogtreecommitdiffstats
path: root/lib/Basic
diff options
context:
space:
mode:
authorAlexander Musman <alexander.musman@gmail.com>2014-09-23 09:33:00 +0000
committerAlexander Musman <alexander.musman@gmail.com>2014-09-23 09:33:00 +0000
commit03bf4c157be08d994b0d8773c5673cd9b69df00b (patch)
tree8ea6527faa019e9d7e6e74d89d49f260a0f7e1b7 /lib/Basic
parentd9e14d290d7a1931694b0af4ffbb30b7cd8deb2d (diff)
[OPENMP] Parsing/Sema of directive omp parallel for simd
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/OpenMPKinds.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/lib/Basic/OpenMPKinds.cpp b/lib/Basic/OpenMPKinds.cpp
index 7394d0bbb1..d4e07e876c 100644
--- a/lib/Basic/OpenMPKinds.cpp
+++ b/lib/Basic/OpenMPKinds.cpp
@@ -261,6 +261,16 @@ bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind,
break;
}
break;
+ case OMPD_parallel_for_simd:
+ switch (CKind) {
+#define OPENMP_PARALLEL_FOR_SIMD_CLAUSE(Name) \
+ case OMPC_##Name: \
+ return true;
+#include "clang/Basic/OpenMPKinds.def"
+ default:
+ break;
+ }
+ break;
case OMPD_parallel_sections:
switch (CKind) {
#define OPENMP_PARALLEL_SECTIONS_CLAUSE(Name) \
@@ -319,26 +329,28 @@ bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind,
}
bool clang::isOpenMPLoopDirective(OpenMPDirectiveKind DKind) {
- return DKind == OMPD_simd || DKind == OMPD_for ||
+ return DKind == OMPD_simd || DKind == OMPD_for || DKind == OMPD_for_simd ||
DKind == OMPD_parallel_for ||
- DKind == OMPD_for_simd; // TODO add next directives.
+ DKind == OMPD_parallel_for_simd; // TODO add next directives.
}
bool clang::isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind) {
- return DKind == OMPD_for || DKind == OMPD_sections || DKind == OMPD_section ||
+ return DKind == OMPD_for || DKind == OMPD_for_simd ||
+ DKind == OMPD_sections || DKind == OMPD_section ||
DKind == OMPD_single || DKind == OMPD_parallel_for ||
- DKind == OMPD_parallel_sections ||
- DKind == OMPD_for_simd; // TODO add next directives.
+ DKind == OMPD_parallel_for_simd ||
+ DKind == OMPD_parallel_sections; // TODO add next directives.
}
bool clang::isOpenMPParallelDirective(OpenMPDirectiveKind DKind) {
return DKind == OMPD_parallel || DKind == OMPD_parallel_for ||
+ DKind == OMPD_parallel_for_simd ||
DKind == OMPD_parallel_sections; // TODO add next directives.
}
bool clang::isOpenMPSimdDirective(OpenMPDirectiveKind DKind) {
- return DKind == OMPD_simd ||
- DKind == OMPD_for_simd; // TODO add next directives.
+ return DKind == OMPD_simd || DKind == OMPD_for_simd ||
+ DKind == OMPD_parallel_for_simd; // TODO add next directives.
}
bool clang::isOpenMPPrivate(OpenMPClauseKind Kind) {