[Mlir-commits] [mlir] [MLIR][LLVM] Improve inline asm importer (PR #139989)
Bruno Cardoso Lopes
llvmlistbot at llvm.org
Thu May 15 10:37:28 PDT 2025
================
@@ -2073,6 +2073,42 @@ LogicalResult ModuleImport::convertIntrinsic(llvm::CallInst *inst) {
return emitError(loc) << "unhandled intrinsic: " << diag(*inst);
}
+ArrayAttr
+ModuleImport::convertAsmInlineOperandAttrs(const llvm::CallBase &llvmCall) {
+ const llvm::InlineAsm *ia =
+ cast<llvm::InlineAsm>(llvmCall.getCalledOperand());
+ unsigned argIdx = 0;
+ SmallVector<mlir::Attribute> opAttrs;
+ bool hasIndirect = false;
+
+ for (const llvm::InlineAsm::ConstraintInfo &ci : ia->ParseConstraints()) {
+ if (ci.Type == llvm::InlineAsm::isLabel)
+ continue;
+
+ // Only deal with constraints that correspond to call arguments.
+ if (!ci.hasArg())
+ continue;
+
+ if (ci.isIndirect) {
----------------
bcardosolopes wrote:
Right, done!
https://github.com/llvm/llvm-project/pull/139989
More information about the Mlir-commits
mailing list