[PATCH] D19074: [CUDA] removed unneeded __nvvm_reflect_anchor()

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 14:06:37 PDT 2016


tra created this revision.
tra added reviewers: jlebar, majnemer.
tra added a subscriber: cfe-commits.

Since r265060 LLVM infers correct __nvvm_reflect attributes.



http://reviews.llvm.org/D19074

Files:
  lib/Headers/__clang_cuda_runtime_wrapper.h

Index: lib/Headers/__clang_cuda_runtime_wrapper.h
===================================================================
--- lib/Headers/__clang_cuda_runtime_wrapper.h
+++ lib/Headers/__clang_cuda_runtime_wrapper.h
@@ -216,16 +216,6 @@
 #undef __CUDABE__
 #define __CUDACC__
 
-#if defined(__CUDA_ARCH__)
-// We need to emit IR declaration for non-existing __nvvm_reflect() to
-// let backend know that it should be treated as const nothrow
-// function which is what NVVMReflect pass expects to see.
-extern "C" __device__ __attribute__((const)) int __nvvm_reflect(const void *);
-static __device__ __attribute__((used)) int __nvvm_reflect_anchor() {
-  return __nvvm_reflect("NONE");
-}
-#endif
-
 extern "C" {
 // Device-side CUDA system calls.
 // http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19074.53618.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160413/3258ec90/attachment.bin>


More information about the cfe-commits mailing list