[MLIR][Python] Add SCFIfOp Python binding
authorchhzh123 <hc676@cornell.edu>
Sun, 13 Mar 2022 05:24:00 +0000 (05:24 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 13 Mar 2022 05:24:10 +0000 (05:24 +0000)
commit036088fd6ea271c2b8fe8deffcb98509e9fd166d
treee695637acd939806af9f773fe82fef3b791966d1
parentfd4d584d6b5c8c1e8d4fd9cbf171247f72fa9b21
[MLIR][Python] Add SCFIfOp Python binding

Current generated Python binding for the SCF dialect does not allow
users to call IfOp to create if-else branches on their own.
This PR sets up the default binding generation for scf.if operation
to address this problem.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D121076
mlir/python/mlir/dialects/_scf_ops_ext.py
mlir/test/python/dialects/scf.py