Skip to content

Commit 4cf754c

Browse files
Implement python iteration over the operation/region/block hierarchy.
* Removes the half-completed prior attempt at region/block mutation in favor of new approach to ownership. * Will re-add mutation more correctly in a follow-on. * Eliminates the detached state on blocks and regions, simplifying the ownership hierarchy. * Adds both iterator and index based access at each level. Differential Revision: https://reviews.llvm.org/D87982
1 parent 7abb0ff commit 4cf754c

File tree

6 files changed

+416
-239
lines changed

6 files changed

+416
-239
lines changed

mlir/include/mlir-c/IR.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ int mlirContextEqual(MlirContext ctx1, MlirContext ctx2);
9191
/** Takes an MLIR context owned by the caller and destroys it. */
9292
void mlirContextDestroy(MlirContext context);
9393

94+
/** Sets whether unregistered dialects are allowed in this context. */
95+
void mlirContextSetAllowUnregisteredDialects(MlirContext context, int allow);
96+
97+
/** Returns whether the context allows unregistered dialects. */
98+
int mlirContextGetAllowUnregisteredDialects(MlirContext context);
99+
94100
/*============================================================================*/
95101
/* Location API. */
96102
/*============================================================================*/

0 commit comments

Comments
 (0)