[all-commits] [llvm/llvm-project] 78f2da: [mlir][python] Provide some methods and properties...
ftynse via All-commits
all-commits at lists.llvm.org
Wed Oct 13 05:31:10 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 78f2dae00d32504d1f645f74c67bf4340ebcda82
https://github.com/llvm/llvm-project/commit/78f2dae00d32504d1f645f74c67bf4340ebcda82
Author: Alex Zinenko <zinenko at google.com>
Date: 2021-10-13 (Wed, 13 Oct 2021)
Changed paths:
M mlir/docs/Bindings/Python.md
M mlir/lib/Bindings/Python/IRAffine.cpp
M mlir/lib/Bindings/Python/IRCore.cpp
M mlir/lib/Bindings/Python/IRModule.h
M mlir/test/python/ir/affine_expr.py
M mlir/test/python/ir/attributes.py
M mlir/test/python/ir/blocks.py
M mlir/test/python/ir/operation.py
M mlir/test/python/ir/value.py
Log Message:
-----------
[mlir][python] Provide some methods and properties for API completeness
When writing the user-facing documentation, I noticed several inconsistencies
and asymmetries in the Python API we provide. Fix them by adding:
- the `owner` property to regions, similarly to blocks;
- the `isinstance` method to any class derived from `PyConcreteAttr`,
`PyConcreteValue` and `PyConreteAffineExpr`, similar to `PyConcreteType` to
enable `isa`-like calls without having to handle exceptions;
- a mechanism to create the first block in the region as we could only create
blocks relative to other blocks, with is impossible in an empty region.
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D111556
More information about the All-commits
mailing list