[Mlir-commits] [mlir] [mlir] Clone attrs of unregistered dialect ops (PR #151847)
Boyana Norris
llvmlistbot at llvm.org
Mon Aug 4 07:23:31 PDT 2025
================
@@ -734,6 +734,12 @@ Operation *Operation::clone(IRMapping &mapper, CloneOptions options) {
// Create the new operation.
auto *newOp = create(getLoc(), getName(), getResultTypes(), operands, attrs,
getPropertiesStorage(), successors, getNumRegions());
+
+ // The builder overwrites the opaque properties with the attributes; hence,
+ // copy them after building the operation.
+ if (!isRegistered())
----------------
brnorris03 wrote:
Because, to my understanding, attributes are treated differently for registered ops (for unregistered, they are stored as opaque properties vs attributes.
https://github.com/llvm/llvm-project/pull/151847
More information about the Mlir-commits
mailing list