File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,15 @@ def unsafe_run(self, mt: ir.Method) -> abc.RewriteResult:
5858 rewriter = walk .Walk (self .generate_rule (mt ))
5959 result = rewriter .rewrite (mt .code )
6060
61- result = walk .Walk (dce .DeadCodeElimination ()).rewrite (mt .code )
62- result = Fixpoint (walk .Walk (rule = cse .CommonSubexpressionElimination ())).rewrite (
63- mt .code
61+ result = walk .Walk (dce .DeadCodeElimination ()).rewrite (mt .code ).join (result )
62+ result = (
63+ Fixpoint (walk .Walk (rule = cse .CommonSubexpressionElimination ()))
64+ .rewrite (mt .code )
65+ .join (result )
6466 )
6567
6668 # do fold again to get proper hint for inserted const
67- result = Fold (mt .dialects )(mt )
69+ result = Fold (mt .dialects )(mt ). join ( result )
6870 return result
6971
7072
@@ -110,10 +112,12 @@ def unsafe_run(self, mt: ir.Method) -> abc.RewriteResult:
110112 rewriter = walk .Walk (self .generate_rule (mt ))
111113 result = rewriter .rewrite (mt .code )
112114
113- result = walk .Walk (dce .DeadCodeElimination ()).rewrite (mt .code )
114- result = Fixpoint (walk .Walk (rule = cse .CommonSubexpressionElimination ())).rewrite (
115- mt .code
115+ result = walk .Walk (dce .DeadCodeElimination ()).rewrite (mt .code ).join (result )
116+ result = (
117+ Fixpoint (walk .Walk (rule = cse .CommonSubexpressionElimination ()))
118+ .rewrite (mt .code )
119+ .join (result )
116120 )
117121 # do fold again to get proper hint
118- result = Fold (mt .dialects )(mt )
122+ result = Fold (mt .dialects )(mt ). join ( result )
119123 return result
You can’t perform that action at this time.
0 commit comments