[Mlir-commits] [mlir] [mlir][Python] create MLIRPythonSupport (PR #171775)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 25 18:39:18 PST 2025


================
@@ -53,23 +55,29 @@ class PyPassManager {
   MlirPassManager passManager;
 };
 
-} // namespace
+enum PyMlirPassDisplayMode : std::underlying_type<MlirPassDisplayMode>::type {
+  MLIR_PASS_DISPLAY_MODE_LIST = MLIR_PASS_DISPLAY_MODE_LIST,
+  MLIR_PASS_DISPLAY_MODE_PIPELINE = MLIR_PASS_DISPLAY_MODE_PIPELINE
+};
----------------
PragmaTwice wrote:

```suggestion
enum class PyMlirPassDisplayMode : std::underlying_type<MlirPassDisplayMode>::type {
  List = MLIR_PASS_DISPLAY_MODE_LIST,
  Pipeline = MLIR_PASS_DISPLAY_MODE_PIPELINE
};
```

Maybe make it an enum class? just like mlir::PassDisplayMode

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


More information about the Mlir-commits mailing list