[all-commits] [llvm/llvm-project] 1d9947: [mlir] Add Complex Type, Vector Type and Tuple Typ...

zhanghb97 via All-commits all-commits at lists.llvm.org
Tue Sep 1 22:46:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d99472875100b230bac2d9ea70b5cd4b45e788b
      https://github.com/llvm/llvm-project/commit/1d99472875100b230bac2d9ea70b5cd4b45e788b
  Author: ZHANG Hongbin <zhanghb97 at 126.com>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

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

  Log Message:
  -----------
  [mlir] Add Complex Type, Vector Type and Tuple Type subclasses to python bindings

Based on the PyType and PyConcreteType classes, this patch implements the bindings of Complex Type, Vector Type and Tuple Type subclasses.
For the convenience of type checking, this patch defines a `mlirTypeIsAIntegerOrFloat` function to check whether the given type is an integer or float type.
These three subclasses in this patch have similar binding strategy:
- The function pointer `isaFunction` points to `mlirTypeIsA***`.
- The `mlir***TypeGet` C API is bound with the `get_***` method in the python side.
- The Complex Type and Vector Type check whether the given type is an integer or float type.

Reviewed By: mehdi_amini

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




More information about the All-commits mailing list