[all-commits] [llvm/llvm-project] 6981e5: [mlir][python] fix constructor generation for opti...

ftynse via All-commits all-commits at lists.llvm.org
Fri Nov 5 04:40:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6981e5ec91c98a23753d2dae590156107d857fda
      https://github.com/llvm/llvm-project/commit/6981e5ec91c98a23753d2dae590156107d857fda
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-11-05 (Fri, 05 Nov 2021)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/test/mlir-tblgen/op-python-bindings.td
    M mlir/test/python/dialects/vector.py
    M mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp

  Log Message:
  -----------
  [mlir][python] fix constructor generation for optional operands in presence of segment attribute

The ODS-based Python op bindings generator has been generating incorrect
specification of the operand segment in presence if both optional and variadic
operand groups: optional groups were treated as variadic whereas they require
separate treatement. Make sure it is the case. Also harden the tests around
generated op constructors as they could hitherto accept the code for both
optional and variadic arguments.

Reviewed By: nicolasvasilache

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




More information about the All-commits mailing list