diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-06-18 17:11:45 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-06-18 17:11:45 +0000 |
commit | 7b55d2d5542545755ffd99069c98d0dc36495b04 (patch) | |
tree | f24a52d1e01a69b9b636abf225c4af46da3d736d /clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | |
parent | a88281d8ae3a6bb0c4da126910b9b30fe068ad55 (diff) | |
download | bcm5719-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.cpp | 6 |
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. |