aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-05-17 08:55:33 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-05-17 08:55:33 +0000
commit7ace49dff163a1694738ae969c4fc8492382b935 (patch)
tree236cf333c8595712e2798210889a34d8ee377b89 /clang/lib/CodeGen/CodeGenFunction.h
parent1aaf87e91de46f251193664f3eed180c8609e403 (diff)
downloadllvm-7ace49dff163a1694738ae969c4fc8492382b935.zip
llvm-7ace49dff163a1694738ae969c4fc8492382b935.tar.gz
llvm-7ace49dff163a1694738ae969c4fc8492382b935.tar.bz2
[OPENMP] Pass scalar firstprivate vars by value.
For better performance and to unify code with offloading part we pass scalar firstprivate values by value, instead of by reference. It will remove some extra copying operations. llvm-svn: 269751
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 3a3e54c..0100ac3 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -191,6 +191,8 @@ public:
CXXThisFieldDecl = *Field;
else if (I->capturesVariable())
CaptureFields[I->getCapturedVar()] = *Field;
+ else if (I->capturesVariableByCopy())
+ CaptureFields[I->getCapturedVar()] = *Field;
}
}
@@ -2229,8 +2231,7 @@ public:
llvm::Function *GenerateCapturedStmtFunction(const CapturedStmt &S);
Address GenerateCapturedStmtArgument(const CapturedStmt &S);
llvm::Function *GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S,
- QualType ReturnQTy);
- llvm::Function *GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S);
+ bool CastValToPtr = false);
void GenerateOpenMPCapturedVars(const CapturedStmt &S,
SmallVectorImpl<llvm::Value *> &CapturedVars);
void emitOMPSimpleStore(LValue LVal, RValue RVal, QualType RValTy,