diff options
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.h')
-rw-r--r-- | mlir/lib/Bindings/Python/IRModule.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h index b038a0c..8c34c11 100644 --- a/mlir/lib/Bindings/Python/IRModule.h +++ b/mlir/lib/Bindings/Python/IRModule.h @@ -218,6 +218,8 @@ public: /// This is useful for when some non-bindings code destroys the operation and /// the bindings need to made aware. For example, in the case when pass /// manager is run. + /// + /// Note that this does *NOT* clear the nested operations. void clearOperation(MlirOperation op); /// Clears all operations nested inside the given op using @@ -225,6 +227,10 @@ public: void clearOperationsInside(PyOperationBase &op); void clearOperationsInside(MlirOperation op); + /// Clears the operaiton _and_ all operations inside using + /// `clearOperation(MlirOperation)`. + void clearOperationAndInside(PyOperationBase &op); + /// Gets the count of live modules associated with this context. /// Used for testing. size_t getLiveModuleCount(); @@ -246,6 +252,7 @@ public: private: PyMlirContext(MlirContext context); + // Interns the mapping of live MlirContext::ptr to PyMlirContext instances, // preserving the relationship that an MlirContext maps to a single // PyMlirContext wrapper. This could be replaced in the future with an |