[all-commits] [llvm/llvm-project] 5a600c: [mlir][python] Expose `PyInsertionPoint`'s referen...

Tomás Longeri via All-commits all-commits at lists.llvm.org
Wed Oct 18 07:53:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a600c23f9e01f58bac09a8fad096e194fc90ae2
      https://github.com/llvm/llvm-project/commit/5a600c23f9e01f58bac09a8fad096e194fc90ae2
  Author: Tomás Longeri <tlongeri at google.com>
  Date:   2023-10-18 (Wed, 18 Oct 2023)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/lib/Bindings/Python/IRModule.h
    M mlir/python/mlir/_mlir_libs/_mlir/ir.pyi
    M mlir/test/python/ir/insertion_point.py

  Log Message:
  -----------
  [mlir][python] Expose `PyInsertionPoint`'s reference operation (#69082)

The reason I want this is that I am writing my own Python bindings and
would like to use the insertion point from
`PyThreadContextEntry::getDefaultInsertionPoint()` to call C++ functions
that take an `OpBuilder` (I don't need to expose it in Python but it
also seems appropriate). AFAICT, there is currently no way to translate
a `PyInsertionPoint` into an `OpBuilder` because the operation is
inaccessible.




More information about the All-commits mailing list