[mlir][python] Extend C/Python API to be usable for CFG construction.
* It is pretty clear that no one has tried this yet since it was both incomplete and broken. * Fixes a symbol hiding issues keeping even the generic builder from constructing an operation with successors. * Adds ODS support for successors. * Adds CAPI `mlirBlockGetParentRegion`, `mlirRegionEqual` + tests (and missing test for `mlirBlockGetParentOperation`). * Adds Python property: `Block.region`. * Adds Python methods: `Block.create_before` and `Block.create_after`. * Adds Python property: `InsertionPoint.block`. * Adds new blocks.py test to verify a plausible CFG construction case. Differential Revision: https://reviews.llvm.org/D108898
Loading
Please sign in to comment