Skip to content

Commit

Permalink
Implement python iteration over the operation/region/block hierarchy.
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
stellaraccident committed Sep 23, 2020
1 parent 7abb0ff commit 4cf754c
Show file tree
Hide file tree
Showing 6 changed files with 416 additions and 239 deletions.
6 changes: 6 additions & 0 deletions mlir/include/mlir-c/IR.h
Expand Up @@ -91,6 +91,12 @@ int mlirContextEqual(MlirContext ctx1, MlirContext ctx2);
/** Takes an MLIR context owned by the caller and destroys it. */
void mlirContextDestroy(MlirContext context);

/** Sets whether unregistered dialects are allowed in this context. */
void mlirContextSetAllowUnregisteredDialects(MlirContext context, int allow);

/** Returns whether the context allows unregistered dialects. */
int mlirContextGetAllowUnregisteredDialects(MlirContext context);

/*============================================================================*/
/* Location API. */
/*============================================================================*/
Expand Down

0 comments on commit 4cf754c

Please sign in to comment.