Skip to content

Commit 126b0e5

Browse files
committed
fixing potential issue with unroll pass
1 parent a2564d5 commit 126b0e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bloqade/rewrite/passes/aggressive_unroll.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def unsafe_run(self, mt: Method) -> RewriteResult:
3838
InlineGetField(),
3939
InlineGetItem(),
4040
ilist.rewrite.InlineGetItem(),
41+
ilist.rewrite.FlattenAdd(),
4142
ilist.rewrite.HintLen(),
4243
)
4344
result = Fixpoint(Walk(rule)).rewrite(mt.code).join(result)
@@ -68,7 +69,7 @@ def unsafe_run(self, mt: Method) -> RewriteResult:
6869
.rewrite(mt.code)
6970
.join(result)
7071
)
71-
result = self.typeinfer.unsafe_run(mt).join(result)
72+
self.typeinfer.unsafe_run(mt)
7273
result = self.fold.unsafe_run(mt).join(result)
7374
result = Walk(Inline(self.inline_heuristic)).rewrite(mt.code).join(result)
7475
result = Walk(Fixpoint(CFGCompactify())).rewrite(mt.code).join(result)

0 commit comments

Comments
 (0)