[Mlir-commits] [mlir] [mlir] [transform dialect] NamedSequenceOp build: honor arg_attrs when building (PR #168101)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Nov 21 22:17:30 PST 2025
================
@@ -2571,6 +2571,11 @@ void transform::NamedSequenceOp::build(OpBuilder &builder,
TypeAttr::get(FunctionType::get(builder.getContext(),
rootType, resultTypes)));
state.attributes.append(attrs.begin(), attrs.end());
+ if (!argAttrs.empty()) {
+ SmallVector<Attribute> argAttrsVec(argAttrs.begin(), argAttrs.end());
----------------
colawithsauce wrote:
Thanks for the suggestion. However, I explicitly need a SmallVector<Attribute> here because ArrayAttr::get() expects an ArrayRef<Attribute>.
Using llvm::to_vector would infer the type as SmallVector<DictionaryAttr>, which doesn't implicitly convert to ArrayRef<Attribute>. The explicit constructor handles the necessary upcast
https://github.com/llvm/llvm-project/pull/168101
More information about the Mlir-commits
mailing list