Skip to content

Commit a49a961

Browse files
authored
Fix typo in inline pass (#422)
Technically a breaking change πŸ˜„
1 parent a9cf139 commit a49a961

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

β€Žsrc/kirin/passes/inline.pyβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ def aggresive(x: ir.IRNode) -> bool:
1313

1414
@dataclass
1515
class InlinePass(Pass):
16-
herustic: Callable[[ir.IRNode], bool] = field(default=aggresive)
16+
heuristic: Callable[[ir.IRNode], bool] = field(default=aggresive)
1717

1818
def unsafe_run(self, mt: ir.Method) -> RewriteResult:
1919

20-
result = Walk(Inline(heuristic=self.herustic)).rewrite(mt.code)
20+
result = Walk(Inline(heuristic=self.heuristic)).rewrite(mt.code)
2121
result = Walk(CFGCompactify()).rewrite(mt.code).join(result)
2222

2323
# dce

β€Žtest/passes/test_inline_pass.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main_inline_pass2(x: int):
3131
y = inline_func(x)
3232
return y + 1
3333

34-
inline = InlinePass(main_inline_pass2.dialects, herustic=lambda x: False)
34+
inline = InlinePass(main_inline_pass2.dialects, heuristic=lambda x: False)
3535
a = main_inline_pass2(1)
3636
main_inline_pass2.code.print()
3737
inline(main_inline_pass2)

0 commit comments

Comments
Β (0)