[Mlir-commits] [mlir] [mlir][XeVM] Stop using `getAttrs()`: explicitly preserve properties when cloning operations (PR #226420)

Mehdi Amini llvmlistbot at llvm.org
Fri Sep 25 02:49:26 PDT 2026


https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/226420

Pass raw attributes and serialized properties separately through OperationState when cloning an operation.

Part of #155475

Assisted-by: Codex

>From ff4a36c4b6e6f60ab0e4b7f1f7b8db5ea11bddfc Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Fri, 25 Sep 2026 02:19:10 -0700
Subject: [PATCH] [mlir][XeVM] Preserve properties when cloning operations

Pass raw attributes and serialized properties separately through
OperationState when cloning an operation.

Assisted-by: Codex
---
 mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp b/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
index ab3d4750c06d2..f3bf1a5fc7866 100644
--- a/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
+++ b/mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
@@ -1772,7 +1772,8 @@ static Operation *cloneOpWithOperandsAndTypes(RewriterBase &rewriter,
                                               ArrayRef<Value> operands,
                                               ArrayRef<Type> resultTypes) {
   OperationState state(loc, op->getName().getStringRef(), operands, resultTypes,
-                       op->getAttrs());
+                       op->getRawDictionaryAttrs().getValue());
+  state.propertiesAttr = op->getPropertiesAsAttribute();
   return rewriter.create(state);
 }
 



More information about the Mlir-commits mailing list