[mlir][python] Fix issues with block argument slices
authorAlex Zinenko <zinenko@google.com>
Thu, 21 Jul 2022 14:00:37 +0000 (14:00 +0000)
committerAlex Zinenko <zinenko@google.com>
Thu, 21 Jul 2022 14:41:12 +0000 (14:41 +0000)
commitee168fb90e4f3321037dcc2c8cb82497a70db92e
tree68d3d8ac1c29bdf8cc8358c63f0f9ffdb3ade36a
parentceb6c23b708d4cae3fbb0a569c5ac14069524a63
[mlir][python] Fix issues with block argument slices

The type extraction helper function for block argument and op result
list objects was ignoring the slice entirely. So was the slice addition.
Both are caused by a misleading naming convention to implement slices
via CRTP. Make the convention more explicit and hide the helper
functions so users have harder time calling them directly.

Closes #56540.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D130271
mlir/lib/Bindings/Python/IRAffine.cpp
mlir/lib/Bindings/Python/IRCore.cpp
mlir/lib/Bindings/Python/PybindUtils.h
mlir/test/python/ir/operation.py