[Mlir-commits] [mlir] [MLIR][LLVM] Add bytecode support for several attributes (PR #162577)

Tobias Gysi llvmlistbot at llvm.org
Thu Oct 9 23:58:54 PDT 2025


================
@@ -0,0 +1,81 @@
+// RUN: mlir-opt -emit-bytecode %s | mlir-opt --mlir-print-debuginfo | FileCheck %s
----------------
gysit wrote:

```suggestion
// RUN: mlir-opt -verify-roundtrip %s 
```
It seems like we could use the roundtrip flag to check this. Looking at the implementation https://github.com/llvm/llvm-project/blob/66da680330b27be569eb6a93056e53f3769a2910/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp#L403 the flag seems to check both the bytecode and the textual roundtrip.

The benefit of using this flag is that we don't need the check lines. If there is an easy way to verify that flag indeed detects bytecode failures - for example by introducing a bug - then the roundtrip flag would be preferable. 



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


More information about the Mlir-commits mailing list