[all-commits] [llvm/llvm-project] b9c353: [mlir] Use PyValue instead of PyOpResult in Python...

ftynse via All-commits all-commits at lists.llvm.org
Fri Nov 6 10:02:57 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b9c353fabb3276c9ec1c202f28559d37c8092739
      https://github.com/llvm/llvm-project/commit/b9c353fabb3276c9ec1c202f28559d37c8092739
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-11-06 (Fri, 06 Nov 2020)

  Changed paths:
    M mlir/lib/Bindings/Python/IRModules.cpp
    M mlir/test/Bindings/Python/ir_operation.py

  Log Message:
  -----------
  [mlir] Use PyValue instead of PyOpResult in Python operand container

The PyOpOperands container was erroneously constructing objects for
individual operands as PyOpResult. Operands in fact are just values,
which may or may not be results of another operation. The code would
eventually crash if the operand was a block argument. Add a test that
exercises the behavior that previously led to crashes.

Reviewed By: stellaraccident

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




More information about the All-commits mailing list