Optimizer stops before fixpoint in some cases
Description
In !519 (merged) I have added contracts/dip.mtz
smart contract. As you can see in our golden tests, this contract is optimized, but not fully, the optimized contracts still has adjacent DIP
s that can be optimized.
Steps to reproduce
- Run
morley optimize --contract dip.mtz -o tmp
. - Run
morley optimize --contract tmp -o tmp2
.
Prerequisites:
contracts/dip.mtz
contract added in !519 (merged).
Expected behaviour
tmp
and tmp2
don't differ because the optimizer should be idempotent. It should optimize as much as possible in one launch.
Actual behaviour
tmp2
is shorter than tmp
.
Environment
- archlinux, manually built
- I am testing it in !519 (merged) MR, it should be reproducible in the commit where !519 (merged) will be merged (it's not merged yet).
Edited by Ivan Gromakovskii