[all-commits] [llvm/llvm-project] afb2ed: [mlir][Python] Add a simple PyOpOperand iterator f...

Mike Urbach via All-commits all-commits at lists.llvm.org
Tue Dec 13 18:20:44 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afb2ed80cb1639236a3aa15f2c9ff96dbb45c3d0
      https://github.com/llvm/llvm-project/commit/afb2ed80cb1639236a3aa15f2c9ff96dbb45c3d0
  Author: Mike Urbach <mikeurbach at gmail.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/test/python/ir/value.py

  Log Message:
  -----------
  [mlir][Python] Add a simple PyOpOperand iterator for PyValue uses.

This adds a simple PyOpOperand based on MlirOpOperand, which can has
properties for the owner op and operation number.

This also adds a PyOpOperandIterator that defines methods for __iter__
and __next__ so PyOpOperands can be iterated over using the the
MlirOpOperand C API.

Finally, a uses psuedo-container is added to PyValue so the uses can
generically be iterated.

Depends on D139596

Reviewed By: stellaraccident, jdd

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




More information about the All-commits mailing list