Skip to content

Commit

Permalink
order of passes
Browse files Browse the repository at this point in the history
  • Loading branch information
HodanPlodky committed Jan 3, 2025
1 parent 70454bc commit 997f6d8
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions vyper/venom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,19 @@ def _run_passes(fn: IRFunction, optimize: OptimizationLevel) -> None:
MakeSSA(ac, fn).run_pass()
SCCP(ac, fn).run_pass()

# quick temporary fix
# before I find if there
# is some equivalent order
for _ in range(2):
LoadElimination(ac, fn).run_pass()
SimplifyCFGPass(ac, fn).run_pass()
SCCP(ac, fn).run_pass()
StoreElimination(ac, fn).run_pass()
AlgebraicOptimizationPass(ac, fn).run_pass()
SimplifyCFGPass(ac, fn).run_pass()
StoreElimination(ac, fn).run_pass()
AlgebraicOptimizationPass(ac, fn).run_pass()
LoadElimination(ac, fn).run_pass()
SCCP(ac, fn).run_pass()
StoreElimination(ac, fn).run_pass()

MemMergePass(ac, fn).run_pass()
SimplifyCFGPass(ac, fn).run_pass()

LowerDloadPass(ac, fn).run_pass()
AlgebraicOptimizationPass(ac, fn).run_pass()
StoreElimination(ac, fn).run_pass()
SimplifyCFGPass(ac, fn).run_pass()
# NOTE: MakeSSA is after algebraic optimization it currently produces
# smaller code by adding some redundant phi nodes. This is not a
# problem for us, but we need to be aware of it, and should be
Expand Down

0 comments on commit 997f6d8

Please sign in to comment.