[Mlir-commits] [mlir] [MLIR][LLVMIR] Import unregistered intrinsics via llvm.intrinsic_call (PR #128626)
Tobias Gysi
llvmlistbot at llvm.org
Tue Feb 25 23:21:22 PST 2025
================
@@ -367,6 +409,14 @@ static LogicalResult setIntelReqdSubGroupSizeAttr(Builder &builder,
return success();
}
+namespace mlir {
+// Generate llvm.call_intrinsic when no supporting dialect available.
+LogicalResult LLVMImportInterface::convertUnregisteredIntrinsic(
+ OpBuilder &builder, llvm::CallInst *inst,
+ LLVM::ModuleImport &moduleImport) const {
+ return convertUnregisteredIntrinsicImpl(builder, inst, moduleImport);
+}
+} // namespace mlir
----------------
gysit wrote:
```suggestion
LogicalResult mlir::LLVMImportInterface::convertUnregisteredIntrinsic(
OpBuilder &builder, llvm::CallInst *inst,
LLVM::ModuleImport &moduleImport) const {
return convertUnregisteredIntrinsicImpl(builder, inst, moduleImport);
}
```
nit: We usually prefix the function definition with the namespace in this case. The comment can be omitted since it is already in the header.
https://github.com/llvm/llvm-project/pull/128626
More information about the Mlir-commits
mailing list