[all-commits] [llvm/llvm-project] 18cf1c: [mlir] Add PDL C & Python usage (#94714)

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Tue Jun 11 07:45:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18cf1cd92b554ba0b870c6a2223ea4d0d3c6dd21
      https://github.com/llvm/llvm-project/commit/18cf1cd92b554ba0b870c6a2223ea4d0d3c6dd21
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2024-06-11 (Tue, 11 Jun 2024)

  Changed paths:
    M mlir/include/mlir-c/Bindings/Python/Interop.h
    A mlir/include/mlir-c/Rewrite.h
    M mlir/include/mlir/Bindings/Python/PybindAdaptors.h
    M mlir/lib/Bindings/Python/IRModule.h
    M mlir/lib/Bindings/Python/MainModule.cpp
    A mlir/lib/Bindings/Python/Rewrite.cpp
    A mlir/lib/Bindings/Python/Rewrite.h
    M mlir/lib/CAPI/Transforms/CMakeLists.txt
    A mlir/lib/CAPI/Transforms/Rewrite.cpp
    M mlir/python/CMakeLists.txt
    M mlir/python/mlir/dialects/pdl.py
    A mlir/python/mlir/rewrite.py
    A mlir/test/python/integration/dialects/pdl.py
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
    M utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel

  Log Message:
  -----------
  [mlir] Add PDL C & Python usage (#94714)

Following a rather direct approach to expose PDL usage from C and then
Python. This doesn't yes plumb through adding support for custom
matchers through this interface, so constrained to basics initially.

This also exposes greedy rewrite driver. Only way currently to define
patterns is via PDL (just to keep small). The creation of the PDL
pattern module could be improved to avoid folks potentially accessing
the module used to construct it post construction. No ergonomic work
done yet.

---------

Signed-off-by: Jacques Pienaar <jpienaar at google.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list