[Mlir-commits] [mlir] [mlir] fix Operation::getDiscardableAttrs in absence of properties (PR #76816)

Mehdi Amini llvmlistbot at llvm.org
Wed Jan 3 06:27:56 PST 2024


================
@@ -475,19 +475,33 @@ class alignas(8) Operation final
     return removeDiscardableAttr(StringAttr::get(getContext(), name));
   }
 
-  /// Return all of the discardable attributes on this operation.
-  ArrayRef<NamedAttribute> getDiscardableAttrs() { return attrs.getValue(); }
+  /// Return a range of all of discardable attributes on this operation. Note
+  /// that for unregistered operations, all attributes are considered
----------------
joker-eph wrote:

Actually only for unregistered operation that don't have their inherent attributes stored as properties.

https://github.com/llvm/llvm-project/pull/76816


More information about the Mlir-commits mailing list