[Mlir-commits] [mlir] [mlir][func] Account for named attributes without a dialect prefix in `FuncToLLVM` lowering pass (PR #182987)
Mehdi Amini
llvmlistbot at llvm.org
Fri Feb 27 09:23:10 PST 2026
================
@@ -52,10 +52,15 @@ static constexpr StringRef varargsAttrName = "func.varargs";
static constexpr StringRef linkageAttrName = "llvm.linkage";
static constexpr StringRef barePtrAttrName = "llvm.bareptr";
+static constexpr StringRef varargsAttrNameNoPrefix = "varargs";
+static constexpr StringRef linkageAttrNameNoPrefix = "linkage";
+static constexpr StringRef barePtrAttrNameNoPrefix = "bareptr";
+
/// Return `true` if the `op` should use bare pointer calling convention.
static bool shouldUseBarePtrCallConv(Operation *op,
const LLVMTypeConverter *typeConverter) {
- return (op && op->hasAttr(barePtrAttrName)) ||
+ return (op && (op->hasAttr(barePtrAttrName) ||
+ op->hasAttr(barePtrAttrNameNoPrefix))) ||
----------------
joker-eph wrote:
> However, the filter removes it. So I wonder if passthrough be dialect-prefixed as well? That would have me go into the AsynctoAsyncRuntime pass and modify the [setting of the attribute](https://github.com/llvm/llvm-project/blob/620425a884388947ae691f3b80545e47c8687840/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp#L245).
Yes I think so
> But are expected in other passes
They shouldn't be: it's a bug.
> Do I have to modify dependent passes to work with dialect-prefixed attribute names?
> And should this be a thing accross MLIR passes in general?
I think so, but you may surface things that could prove me wrong.
https://github.com/llvm/llvm-project/pull/182987
More information about the Mlir-commits
mailing list