diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-06-18 13:40:03 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-06-18 13:40:03 +0000 |
commit | 7f210c6dabd89141e60d77124099a069054cfbe6 (patch) | |
tree | 919642200ec1d082fc7a6d0e475b9558f61218e4 /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | f14eec8d782e87e210a1b38ea9f043d6c2c75234 (diff) | |
download | bcm5719-llvm-7f210c6dabd89141e60d77124099a069054cfbe6.tar.gz bcm5719-llvm-7f210c6dabd89141e60d77124099a069054cfbe6.zip |
[OPENMP] Codegen for 'proc_bind' clause (4.0).
Adds emission of the code for 'proc_bind(master|close|spread)' clause:
call void @__kmpc_push_proc_bind(<loc>, i32 thread_id, i32 4|3|2)
llvm-svn: 240018
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 2bad038407a..5e94d56feb5 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -464,6 +464,12 @@ static void emitCommonOMPParallelDirective(CodeGenFunction &CGF, CGF.CGM.getOpenMPRuntime().emitNumThreadsClause( CGF, NumThreads, NumThreadsClause->getLocStart()); } + if (auto *C = S.getSingleClause(OMPC_proc_bind)) { + CodeGenFunction::RunCleanupsScope NumThreadsScope(CGF); + auto *ProcBindClause = cast<OMPProcBindClause>(C); + CGF.CGM.getOpenMPRuntime().emitProcBindClause( + CGF, ProcBindClause->getProcBindKind(), ProcBindClause->getLocStart()); + } const Expr *IfCond = nullptr; if (auto C = S.getSingleClause(OMPC_if)) { IfCond = cast<OMPIfClause>(C)->getCondition(); |