diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-01-07 15:45:09 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-01-07 15:45:09 +0000 |
commit | 25d3de8a0ac4d65f2ac9820ba62a372414780649 (patch) | |
tree | 13f97a15bf466de00a4eb5cbd199d2bea69cd5fd /clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | |
parent | 27429d87860691defb47b8eb266d1d4832847787 (diff) | |
download | bcm5719-llvm-25d3de8a0ac4d65f2ac9820ba62a372414780649.tar.gz bcm5719-llvm-25d3de8a0ac4d65f2ac9820ba62a372414780649.zip |
[OPENMP][NVPTX]Reduce number of barriers in reductions.
After the fix for the syncthreads we don't need to generate extra
barriers for the parallel reductions.
llvm-svn: 350530
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp index 21911c96f36..403aefbef9a 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -3124,7 +3124,6 @@ static void emitReductionListCopy( /// sync /// if (I am the first warp) /// Copy smem[thread_id] to my local D -/// sync static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, ArrayRef<const Expr *> Privates, QualType ReductionArrayTy, @@ -3337,12 +3336,6 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, CGF.EmitBlock(W0MergeBB); - // While warp 0 copies values from transfer medium, all other warps must - // wait. - // kmpc_barrier. - CGM.getOpenMPRuntime().emitBarrierCall(CGF, Loc, OMPD_unknown, - /*EmitChecks=*/false, - /*ForceSimpleCall=*/true); if (NumIters > 1) { Cnt = Bld.CreateNSWAdd(Cnt, llvm::ConstantInt::get(CGM.IntTy, /*V=*/1)); CGF.EmitStoreOfScalar(Cnt, CntAddr, /*Volatile=*/false, C.IntTy); |