Export LookupLLVMIntrinsic for C++ users

Hi there,

Currently it seems that LookupLLVMIntrinsic or lookupIntrinsicID is not exposed to C++ users in tvm. But it is available from python side. Please correct me if I am wrong.

To utilize it in C++, I just put it in some header.
Please let me know if this sounds a reasonable request and where should I put it to export. And then I could create a PR for that.

Thanks.

To answer your specific question. We try to keep the public API minimum. LookupLLVMIntrinsic is a private API that we use inside the tvm project and maybe we should not expose it for now. Note that it is also part of LLVM API that you might be able to directly get by call into LLVM function.

Thanks for the reply. Totally understand your point.
But I believe there is a point to export LookupLLVMIntrinsic in C++, which could open the portal for fine grain control for users to directly call the llvm intrin they want, e.g. like avx2 related instructions. User could have more flexibility IMHO.
And besides, it is already exported in python if I am correct.

Thanks,
-W

Since tvm depends on llvm, perhaps one way to do so is to directly use the related function in LLVM. Alternatively, you can get the feature by getting the corresponding PackedFunc from the global registry and call from there