[mlir][python] Provide more convenient constructors for std.CallOp
authorAlex Zinenko <zinenko@google.com>
Mon, 4 Oct 2021 09:39:19 +0000 (11:39 +0200)
committerAlex Zinenko <zinenko@google.com>
Mon, 4 Oct 2021 09:45:29 +0000 (11:45 +0200)
commit255a690971cb51c838623e8bb5b72b7415b454b5
tree613adf2f74001ffcd61852323a42344ea18515d1
parent3a3a09f65412dc38aba6b7370b93f9d2c7fd1c30
[mlir][python] Provide more convenient constructors for std.CallOp

The new constructor relies on type-based dynamic dispatch and allows one to
construct call operations given an object representing a FuncOp or its name as
a string, as opposed to requiring an explicitly constructed attribute.

Depends On D110947

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D110948
mlir/python/mlir/dialects/_builtin_ops_ext.py
mlir/python/mlir/dialects/_std_ops_ext.py
mlir/test/python/dialects/builtin.py
mlir/test/python/dialects/std.py