tkonolige commented on a change in pull request #9964:
URL: https://github.com/apache/tvm/pull/9964#discussion_r789225710



##########
File path: src/target/llvm/llvm_module.cc
##########
@@ -485,6 +485,11 @@ TVM_REGISTER_GLOBAL("target.llvm_lookup_intrinsic_id")
       return static_cast<int64_t>(llvm::Function::lookupIntrinsicID(name));
     });
 
+TVM_REGISTER_GLOBAL("target.llvm_get_intrinsic_name")
+    .set_body_typed([](int64_t id) -> String {
+      return 
std::string(llvm::Intrinsic::getName(static_cast<llvm::Intrinsic::ID>(id)));

Review comment:
       I've switched to using `getBaseName` when llvm >= 13. On lower versions 
of llvm I still use `getName`, but I use the overloaded types version. When 
provided with an empty array of types, this version will return the generic 
name which I think is what we want.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to