[Mlir-commits] [mlir] Reapply [MLIR][LLVMIR] Import unregistered intrinsics via llvm.intrin… (PR #129174)
Tobias Gysi
llvmlistbot at llvm.org
Thu Feb 27 23:19:54 PST 2025
================
@@ -1642,6 +1642,46 @@ FlatSymbolRefAttr ModuleImport::convertCalleeName(llvm::CallBase *callInst) {
return {};
}
+LogicalResult mlir::LLVMImportInterface::convertUnregisteredIntrinsic(
----------------
gysit wrote:
Can you move the function to the ModuleImport class if we put the implementation in this file since this file is not meant to implement the translation interface functions. Also note that the function is not dialect specific so it makes sense to move the function to the ModuleImport class.
An even cleaner option would probably be to avoid the call back to ModuleImport at all by letting the translation interface translate all intrinsics it can and then let the module import translate all unregistered intrinsics on its own. But that can be a follow up.
It looks like you could optionally use the builder of the Module import class directly since convertIntrinsic does not seem to modify the insertion point.
https://github.com/llvm/llvm-project/pull/129174
More information about the Mlir-commits
mailing list