[Mlir-commits] [mlir] MLIR: Enable importing inlineasm calls (PR #121624)
Tobias Gysi
llvmlistbot at llvm.org
Sat Jan 4 02:15:43 PST 2025
================
@@ -1579,53 +1580,65 @@ LogicalResult ModuleImport::convertInstruction(llvm::Instruction *inst) {
SmallVector<Type> types;
SmallVector<Value> operands;
- if (failed(convertCallTypeAndOperands(callInst, types, operands)))
+ if (failed(convertCallTypeAndOperands(callInst, types, operands, true)))
return failure();
auto funcTy =
dyn_cast<LLVMFunctionType>(convertType(callInst->getFunctionType()));
if (!funcTy)
return failure();
- CallOp callOp;
-
- if (llvm::Function *callee = callInst->getCalledFunction()) {
- callOp = builder.create<CallOp>(
- loc, funcTy, SymbolRefAttr::get(context, callee->getName()),
- operands);
+ if (auto asmI = dyn_cast<llvm::InlineAsm>(callInst->getCalledOperand())) {
+ InlineAsmOp callOp = builder.create<InlineAsmOp>(
----------------
gysit wrote:
```suggestion
auto asmOp = builder.create<InlineAsmOp>(
```
nit:
https://github.com/llvm/llvm-project/pull/121624
More information about the Mlir-commits
mailing list