Skip to content

Commit c6afea5

Browse files
committed
Return empty dict list, do not mutate IR
1 parent 2ae4815 commit c6afea5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mlir/python/mlir/dialects/func.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ def add_entry_block(self, arg_locs: Optional[Sequence[Location]] = None):
106106
@property
107107
def arg_attrs(self):
108108
if ARGUMENT_ATTRIBUTE_NAME not in self.attributes:
109-
self.attributes[ARGUMENT_ATTRIBUTE_NAME] = ArrayAttr.get(
110-
[DictAttr.get({}) for _ in self.type.inputs]
111-
)
109+
return ArrayAttr.get([DictAttr.get({}) for _ in self.type.inputs])
112110
return ArrayAttr(self.attributes[ARGUMENT_ATTRIBUTE_NAME])
113111

114112
@arg_attrs.setter

0 commit comments

Comments
 (0)