summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2018-03-14 14:17:45 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2018-03-14 14:17:45 +0000
commitd3dcf2f05d0b15a51ed3ca0021943b935c708142 (patch)
tree32761d1094457b58b3531f4f2bca846572de28bd /clang/lib/CodeGen/CodeGenFunction.cpp
parent81ccb97024bb5a05f1d27d352ec20d0e83d8e3e7 (diff)
downloadbcm5719-llvm-d3dcf2f05d0b15a51ed3ca0021943b935c708142.tar.gz
bcm5719-llvm-d3dcf2f05d0b15a51ed3ca0021943b935c708142.zip
[OpenMP] Add OpenMP data sharing infrastructure using global memory
Summary: This patch handles the Clang code generation phase for the OpenMP data sharing infrastructure. TODO: add a more detailed description. Reviewers: ABataev, carlo.bertolli, caomhin, hfinkel, Hahnfeld Reviewed By: ABataev Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D43660 llvm-svn: 327513
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 2f814a7165a..c5de16bc6eb 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -1067,6 +1067,11 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
EmitStartEHSpec(CurCodeDecl);
PrologueCleanupDepth = EHStack.stable_begin();
+
+ // Emit OpenMP specific initialization of the device functions.
+ if (getLangOpts().OpenMP && CurCodeDecl)
+ CGM.getOpenMPRuntime().emitFunctionProlog(*this, CurCodeDecl);
+
EmitFunctionProlog(*CurFnInfo, CurFn, Args);
if (D && isa<CXXMethodDecl>(D) && cast<CXXMethodDecl>(D)->isInstance()) {
OpenPOWER on IntegriCloud