[llvm] [mlir] [MLIR][LLVM][Intrinsics] Add new MLIR and LLVM APIs to automatically resolve overload types (PR #168188)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 08:50:17 PST 2025


================
@@ -898,6 +898,21 @@ llvm::CallInst *mlir::LLVM::detail::createIntrinsicCall(
   return builder.CreateCall(fn, args);
 }
 
+llvm::CallInst *mlir::LLVM::detail::createIntrinsicCall(
+    llvm::IRBuilderBase &builder, llvm::Intrinsic::ID intrinsic,
+    llvm::Type *retTy, ArrayRef<llvm::Value *> args) {
+  llvm::Module *module = builder.GetInsertBlock()->getModule();
+
+  SmallVector<llvm::Type *> argTys;
----------------
jurahul wrote:

Is it fair to say that in the current state, this PR is moving the overrload type resolution logic from IRBuilder::CreateIntrinsic() to Intrinsic::getOrInsertDeclaration()? In that case, I'd think most external folks should be using IRBuilder API to create intrinsic calls, so there this change is not visible to them. In which case, what is the motivation?

https://github.com/llvm/llvm-project/pull/168188


More information about the llvm-commits mailing list