diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-10 12:21:02 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-10 12:21:02 +0000 |
commit | 1e1e286a6b376d23114923c53cc462601d198c6f (patch) | |
tree | a95e99526fbef5abd4c72224e39e164a045f6b4b /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | 2640454d1ccdaf5ad788ffb0ee9f359fcaa84e74 (diff) | |
download | bcm5719-llvm-1e1e286a6b376d23114923c53cc462601d198c6f.tar.gz bcm5719-llvm-1e1e286a6b376d23114923c53cc462601d198c6f.zip |
[OPENMP 4.5] Initial codegen for 'priority' clause in task-based
directives.
OpenMP 4.5 supports clause 'priority' in task-based directives. Patch
adds initial codegen support for this clause in codegen.
llvm-svn: 269050
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 322e8ff593f..5cf0cae161b 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -2337,6 +2337,13 @@ void CodeGenFunction::EmitOMPTaskBasedDirective(const OMPExecutableDirective &S, // By default the task is not final. Data.Final.setInt(/*IntVal=*/false); } + // Check if the task has 'priority' clause. + if (const auto *Clause = S.getSingleClause<OMPPriorityClause>()) { + // Runtime currently does not support codegen for priority clause argument. + // TODO: Add codegen for priority clause arg when runtime lib support it. + auto *Prio = Clause->getPriority(); + Data.Priority.setInt(Prio); + } // The first function argument for tasks is a thread id, the second one is a // part id (0 for tied tasks, >=0 for untied task). llvm::DenseSet<const VarDecl *> EmittedAsPrivate; |