[Mlir-commits] [mlir] [MLIR][Python] Expose `PassManager::enableStatistics` to CAPI and Python (PR #162591)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 9 00:11:06 PDT 2025
================
@@ -92,6 +92,18 @@ mlirPassManagerEnableVerifier(MlirPassManager passManager, bool enable);
MLIR_CAPI_EXPORTED void
mlirPassManagerEnableTiming(MlirPassManager passManager);
+/// Enumerated type of pass display modes.
+/// Mainly used in mlirPassManagerEnableStatistics.
+typedef enum {
----------------
PragmaTwice wrote:
I think the answer is no if we don't change the C++ API. (see https://mlir.llvm.org/doxygen/classmlir_1_1PassManager.html)
In C++, the only public API for statistics is like `void enableStatistics (PassDisplayMode displayMode)` and internally it is assigned to a `std::optional<PassDisplayMode>`, and the `bool(optional)` can indicate if it is enabled.
https://github.com/llvm/llvm-project/pull/162591
More information about the Mlir-commits
mailing list