Skip to content

Commit

Permalink
fix region_adder (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental authored Jan 16, 2024
1 parent d270ac6 commit 9ba3723
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mlir/extras/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ def bb(*preds: Tuple[Union[Successor, OpView]]):
def region_adder(terminator=None):
def wrapper(op_region_adder):
def region_adder_decorator(op, *args, **kwargs):
if isinstance(op, Value):
op = op.owner.opview
region = op_region_adder(op, *args, **kwargs)

return op_region_builder(op, region, terminator)
Expand Down

0 comments on commit 9ba3723

Please sign in to comment.