[Mlir-commits] [mlir] [MLIR][FuncToLLVM] Propagate no_inline attribute (PR #143809)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jun 12 13:33:00 PDT 2025
================
@@ -381,6 +382,11 @@ mlir::convertFuncOpToLLVMFuncOp(FunctionOpInterface funcOp,
newFuncOp.setMemoryEffectsAttr(memoryAttr);
}
+ // Propagate no_inline attributes
+ if (funcOp->hasAttr(noInlineAttr)) {
+ newFuncOp->setAttr(noInlineAttr, rewriter.getUnitAttr());
----------------
junfengd-nv wrote:
I got the error: "no member named 'getNoInline' in 'mlir::FunctionOpInterface'" It seems getNoInline() is not a member function of FunctionOpInterface - it's a specific API that only exists in concrete operation types like mlir::func::FuncOp or mlir::LLVM::LLVMFuncOp. two options: 1. type cast funcOp into func::FuncOp type. This will make it only work for func.func operation. 2. keep using hasAttr and the name. This will hard coded the name "no_inline", but ensures compatibility across different function operation types. I don't have strong preference. what is your idea?
https://github.com/llvm/llvm-project/pull/143809
More information about the Mlir-commits
mailing list