[PATCH] D137154: Adding nvvm_reflect clang builtin

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 3 13:41:45 PDT 2022


tra added inline comments.


================
Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:827
 
+BUILTIN(__nvvm_reflect, "icC*", "nc")
+
----------------
Do we actually need this patch at all.

`extern "C" int __nvvm_reflect(const char *);` appears to work just fine already:
https://godbolt.org/z/caGenxn1e




================
Comment at: clang/test/CodeGenCUDA/nvvm-reflect.cu:15
+// RUN:    sm_50 -S -o /dev/null %s -mllvm -print-after-all 2>&1 \
+// RUN:    | FileCheck %s --check-prefix=ARCH_REFLECT_1
+// RUN: %clang_cc1 -fcuda-is-device -triple nvptx64-nvidia-cuda -target-cpu \
----------------
Nit. I'd use the suffix matching the GPU variant we're targeting.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137154/new/

https://reviews.llvm.org/D137154



More information about the cfe-commits mailing list