diff options
author | Alexander Musman <alexander.musman@gmail.com> | 2014-09-23 09:33:00 +0000 |
---|---|---|
committer | Alexander Musman <alexander.musman@gmail.com> | 2014-09-23 09:33:00 +0000 |
commit | e4e893bb360f823b73597b5a4e9ff917b883ba3e (patch) | |
tree | ff2692c871bc2287ba29769f6d72c72040c93465 /clang/lib/Basic/OpenMPKinds.cpp | |
parent | caf534ef968e99f51d7066c0940645044a19d06a (diff) | |
download | bcm5719-llvm-e4e893bb360f823b73597b5a4e9ff917b883ba3e.tar.gz bcm5719-llvm-e4e893bb360f823b73597b5a4e9ff917b883ba3e.zip |
[OPENMP] Parsing/Sema of directive omp parallel for simd
llvm-svn: 218299
Diffstat (limited to 'clang/lib/Basic/OpenMPKinds.cpp')
-rw-r--r-- | clang/lib/Basic/OpenMPKinds.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp index 7394d0bbb18..d4e07e876cf 100644 --- a/clang/lib/Basic/OpenMPKinds.cpp +++ b/clang/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) { |