[PATCH] D137154: Adding nvvm_reflect clang builtin

Andrew Savonichev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 1 06:01:01 PDT 2022


asavonic added inline comments.


================
Comment at: llvm/include/llvm/IR/IntrinsicsNVVM.td:1581
 def int_nvvm_reflect :
-  Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty], [IntrNoMem], "llvm.nvvm.reflect">;
+  Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem], "llvm.nvvm.reflect">,
+  ClangBuiltin<"__nvvm_reflect">;
----------------
What is there a reason to change the intrinsic?


================
Comment at: llvm/lib/Target/NVPTX/NVVMReflect.cpp:123
     if (!Callee || (Callee->getName() != NVVM_REFLECT_FUNCTION &&
+                    Callee->getName() != NVVM_REFLECT_LLVM_INTRINSIC_NAME &&
                     Callee->getIntrinsicID() != Intrinsic::nvvm_reflect))
----------------
This seems to be equivalent to `Callee->getIntrinsicID()` call below. Is there a case where the intrinsic is not recognized by `getIntrinsicID`?


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