[all-commits] [llvm/llvm-project] 8e6c55: [mlir][python] Extend C/Python API to be usable fo...

Stella Laurenzo via All-commits all-commits at lists.llvm.org
Mon Aug 30 08:28:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e6c55c92c807ad77106298d9b7eaf453407d009
      https://github.com/llvm/llvm-project/commit/8e6c55c92c807ad77106298d9b7eaf453407d009
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2021-08-30 (Mon, 30 Aug 2021)

  Changed paths:
    M mlir/include/mlir-c/IR.h
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/lib/CAPI/IR/IR.cpp
    M mlir/test/CAPI/ir.c
    M mlir/test/mlir-tblgen/op-python-bindings.td
    A mlir/test/python/ir/blocks.py
    M mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list