[Mlir-commits] [mlir] MLIR: Enable importing inlineasm calls (PR #121624)

Tobias Gysi llvmlistbot at llvm.org
Sat Jan 4 02:15:43 PST 2025


================
@@ -319,9 +319,12 @@ class ModuleImport {
   /// Appends the converted result type and operands of `callInst` to the
   /// `types` and `operands` arrays. For indirect calls, the method additionally
   /// inserts the called function at the beginning of the `operands` array.
+  /// If `handleAsm` is set to false (the default), it will err if the handler
+  /// is an inline asm which isn't convertible to MLIR as a value.
   LogicalResult convertCallTypeAndOperands(llvm::CallBase *callInst,
                                            SmallVectorImpl<Type> &types,
-                                           SmallVectorImpl<Value> &operands);
+                                           SmallVectorImpl<Value> &operands,
+                                           bool handleAsm = false);
----------------
gysit wrote:

```suggestion
                                           bool allowInlineAsm = false);
```
ultra nit: I would use allow inline assembler since the function is not really handling it. It just does not return failure if the called operand is inline assembler?

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


More information about the Mlir-commits mailing list