This is an archive of the discontinued LLVM Phabricator instance.

[mlir][python] Extend C/Python API to be usable for CFG construction.
ClosedPublic

Authored by stellaraccident on Aug 29 2021, 1:14 PM.

Details

Summary
  • 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 new blocks.py test to verify a plausible CFG construction case.

Diff Detail