summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmtOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-08-04 19:10:54 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-08-04 19:10:54 +0000
commit2c7eee5b849d80d804764de602b0c08d05d38ab9 (patch)
tree0d75e587614224ea14e8000c776a830d9b5804b3 /clang/lib/CodeGen/CGStmtOpenMP.cpp
parent44200125e9d71fc6491b68b8337b64a5f11c34ea (diff)
downloadbcm5719-llvm-2c7eee5b849d80d804764de602b0c08d05d38ab9.tar.gz
bcm5719-llvm-2c7eee5b849d80d804764de602b0c08d05d38ab9.zip
[OPENMP] Unify generation of outlined function calls.
llvm-svn: 310098
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmtOpenMP.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 57259a9912c..436a04fbeb1 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -328,7 +328,7 @@ static std::pair<llvm::Function *, bool> emitOutlinedFunctionPrologue(
FO.FunctionName, &CGM.getModule());
CGM.SetInternalFunctionAttributes(CD, F, FuncInfo);
if (CD->isNothrow())
- F->addFnAttr(llvm::Attribute::NoUnwind);
+ F->setDoesNotThrow();
// Generate the function.
CGF.StartFunction(CD, Ctx.VoidTy, F, FuncInfo, Args, CD->getLocation(),
@@ -482,7 +482,7 @@ CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S) {
}
CallArgs.emplace_back(CallArg);
}
- WrapperCGF.Builder.CreateCall(F, CallArgs);
+ CGM.getOpenMPRuntime().emitOutlinedFunctionCall(WrapperCGF, F, CallArgs);
WrapperCGF.FinishFunction();
return WrapperF;
}
@@ -3151,7 +3151,8 @@ void CodeGenFunction::EmitOMPOrderedDirective(const OMPOrderedDirective &S) {
llvm::SmallVector<llvm::Value *, 16> CapturedVars;
CGF.GenerateOpenMPCapturedVars(*CS, CapturedVars);
auto *OutlinedFn = emitOutlinedOrderedFunction(CGM, CS);
- CGF.EmitNounwindRuntimeCall(OutlinedFn, CapturedVars);
+ CGM.getOpenMPRuntime().emitOutlinedFunctionCall(CGF, OutlinedFn,
+ CapturedVars);
} else {
Action.Enter(CGF);
CGF.EmitStmt(
OpenPOWER on IntegriCloud