More peephole optimisation rules

This issue lists optimisations that we can do in peephole optimisations.

  • a jump-to-ret can be replaced with ret directly (this would happen often for leaf functions)