summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-06-18 17:11:45 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-06-18 17:11:45 +0000
commit7b55d2d5542545755ffd99069c98d0dc36495b04 (patch)
treef24a52d1e01a69b9b636abf225c4af46da3d736d /clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
parenta88281d8ae3a6bb0c4da126910b9b30fe068ad55 (diff)
downloadbcm5719-llvm-7b55d2d5542545755ffd99069c98d0dc36495b04.tar.gz
bcm5719-llvm-7b55d2d5542545755ffd99069c98d0dc36495b04.zip
[OPENMP, NVPTX] Emit simple reduction if requested.
If simple reduction is requested, use the simple reduction instead of the runtime functions calls. llvm-svn: 334962
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp')
-rw-r--r--clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
index 785ed567606..9452bdea4c7 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
@@ -3163,6 +3163,12 @@ void CGOpenMPRuntimeNVPTX::emitReduction(
assert((TeamsReduction || ParallelReduction || SimdReduction) &&
"Invalid reduction selection in emitReduction.");
+ if (Options.SimpleReduction) {
+ CGOpenMPRuntime::emitReduction(CGF, Loc, Privates, LHSExprs, RHSExprs,
+ ReductionOps, Options);
+ return;
+ }
+
ASTContext &C = CGM.getContext();
// 1. Build a list of reduction variables.
OpenPOWER on IntegriCloud