[OPENMP 4.0] Support for 'uniform' clause in 'declare simd' directive.
OpenMP 4.0 defines clause 'uniform' in 'declare simd' directive:
'uniform' '(' <argument-list> ')'
The uniform clause declares one or more arguments to have an invariant value for all concurrent invocations of the function in the execution of a single SIMD loop.
The special this pointer can be used as if was one of the arguments to the function in any of the linear, aligned, or uniform clauses.
llvm-svn: 266041
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index 07a410f..0a36b95 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -55,6 +55,7 @@
return llvm::StringSwitch<OpenMPClauseKind>(Str)
#define OPENMP_CLAUSE(Name, Class) .Case(#Name, OMPC_##Name)
#include "clang/Basic/OpenMPKinds.def"
+ .Case("uniform", OMPC_uniform)
.Default(OMPC_unknown);
}
@@ -67,6 +68,8 @@
case OMPC_##Name: \
return #Name;
#include "clang/Basic/OpenMPKinds.def"
+ case OMPC_uniform:
+ return "uniform";
case OMPC_threadprivate:
return "threadprivate or thread local";
}
@@ -158,6 +161,7 @@
case OMPC_nogroup:
case OMPC_num_tasks:
case OMPC_hint:
+ case OMPC_uniform:
break;
}
llvm_unreachable("Invalid OpenMP simple clause kind");
@@ -292,6 +296,7 @@
case OMPC_nogroup:
case OMPC_num_tasks:
case OMPC_hint:
+ case OMPC_uniform:
break;
}
llvm_unreachable("Invalid OpenMP simple clause kind");