vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.85k stars 791 forks source link

feat[venom]: strip superfluous instructions from basic blocks #4043

Open harkal opened 4 months ago

harkal commented 4 months ago

What I did

This PR removes nops and instructions following revert from blocks

How I did it

How to verify it

Commit message

This commit removes `nop`s and instructions following `revert` from blocks

`SimplifyCFGPass` is a pass that gets to do the miscellaneous simplifications
of basic blocks. This commit strips instructions early to alleviate burden from later
more complex passes. It also removes in-block dead instructions that not only
help later passes with performance, but also is a prerequisite for proper operation
of some of them.

Description for the changelog

Cute Animal Picture

![Put a link to a cute animal picture inside the parenthesis-->]()