[PATCH] D16941: [NVPTX] Mark nvvm synchronizing intrinsics as convergent.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 17:37:38 PST 2016
jlebar created this revision.
jlebar added reviewers: majnemer, jingyue.
jlebar added subscribers: tra, rnk, jhen, jingyue, jholewinski, llvm-commits.
This is the attribute purpose-made for e.g. __syncthreads. As I understand it,
NoDuplicate is not sufficient, as e.g. an instruction may be sunk even if it's
NoDuplicate.
I *think* we still want NoDuplicate, as it seems somewhat orthogonal
(particularly insofar as we allow calls to be duplicated via inlining).
http://reviews.llvm.org/D16941
Files:
include/llvm/IR/IntrinsicsNVVM.td
Index: include/llvm/IR/IntrinsicsNVVM.td
===================================================================
--- include/llvm/IR/IntrinsicsNVVM.td
+++ include/llvm/IR/IntrinsicsNVVM.td
@@ -730,15 +730,15 @@
// Bar.Sync
def int_cuda_syncthreads : GCCBuiltin<"__syncthreads">,
- Intrinsic<[], [], [IntrNoDuplicate]>;
+ Intrinsic<[], [], [IntrNoDuplicate, IntrConvergent]>;
def int_nvvm_barrier0 : GCCBuiltin<"__nvvm_bar0">,
- Intrinsic<[], [], [IntrNoDuplicate]>;
+ Intrinsic<[], [], [IntrNoDuplicate, IntrConvergent]>;
def int_nvvm_barrier0_popc : GCCBuiltin<"__nvvm_bar0_popc">,
- Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate]>;
+ Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>;
def int_nvvm_barrier0_and : GCCBuiltin<"__nvvm_bar0_and">,
- Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate]>;
+ Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>;
def int_nvvm_barrier0_or : GCCBuiltin<"__nvvm_bar0_or">,
- Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate]>;
+ Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>;
// Membar
def int_nvvm_membar_cta : GCCBuiltin<"__nvvm_membar_cta">,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16941.47069.patch
Type: text/x-patch
Size: 1260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160206/a311a082/attachment.bin>
More information about the llvm-commits
mailing list