[all-commits] [llvm/llvm-project] dc43f7: Add basic Python bindings for the PassManager and ...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Nov 10 11:55:43 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dc43f78565491471604103715cc4329abfca0f6d
      https://github.com/llvm/llvm-project/commit/dc43f78565491471604103715cc4329abfca0f6d
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2020-11-10 (Tue, 10 Nov 2020)

  Changed paths:
    M mlir/lib/Bindings/Python/CMakeLists.txt
    M mlir/lib/Bindings/Python/MainModule.cpp
    A mlir/lib/Bindings/Python/Pass.cpp
    A mlir/lib/Bindings/Python/Pass.h
    A mlir/lib/Bindings/Python/Transforms/CMakeLists.txt
    A mlir/lib/Bindings/Python/Transforms/Transforms.cpp
    M mlir/lib/Bindings/Python/mlir/__init__.py
    A mlir/lib/Bindings/Python/mlir/passmanager.py
    A mlir/lib/Bindings/Python/mlir/transforms/__init__.py
    A mlir/test/Bindings/Python/pass_manager.py
    M mlir/test/CMakeLists.txt
    M mlir/tools/mlir-tblgen/PassCAPIGen.cpp

  Log Message:
  -----------
  Add basic Python bindings for the PassManager and bind libTransforms

This only exposes the ability to round-trip a textual pipeline at the
moment.
To exercise it, we also bind the libTransforms in a new Python extension. This
does not include any interesting bindings, but it includes all the
mechanism to add separate native extensions and load them dynamically.
As such passes in libTransforms are only registered after `import
mlir.transforms`.
To support this global registration, the TableGen backend is also
extended to bind to the C API the group registration for passes.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D90819




More information about the All-commits mailing list