]> granicus.if.org Git - llvm/commitdiff
[NVVM] Rename __nvvm_bar0 builtin back to __syncthreads.
authorJustin Lebar <jlebar@google.com>
Thu, 7 Jul 2016 18:14:55 +0000 (18:14 +0000)
committerJustin Lebar <jlebar@google.com>
Thu, 7 Jul 2016 18:14:55 +0000 (18:14 +0000)
__syncthreads was renamed to __nvvm_bar0 in r274664.  But __syncthreads
is part of our user-facing API, so we need to keep the name.

This will momentarily break clang; we need a matching patch there.

Patch by Justin Bogner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274779 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/IntrinsicsNVVM.td

index 4f356fe3d9f5030cbf1af4efe5388ec4c4c1f190..30ee3ff96b8d4fbd2c8e0bf5f51e5b2c3331ab2e 100644 (file)
@@ -729,7 +729,10 @@ def llvm_anyi64ptr_ty     : LLVMAnyPointerType<llvm_i64_ty>;     // (space)i64*
                                       [IntrArgMemOnly, NoCapture<0>]>;
 
 // Bar.Sync
-  def int_nvvm_barrier0 : GCCBuiltin<"__nvvm_bar0">,
+
+  // The builtin for "bar.sync 0" is called __syncthreads.  Unlike most of the
+  // intrinsics in this file, this one is a user-facing API.
+  def int_nvvm_barrier0 : GCCBuiltin<"__syncthreads">,
       Intrinsic<[], [], [IntrConvergent]>;
   def int_nvvm_barrier0_popc : GCCBuiltin<"__nvvm_bar0_popc">,
       Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent]>;