Originally Posted by Mrs Beanbag
yes, indeed, LINK/UNLK are quite unneccessary instructions, but in one of the examples in the above link we see even "LINK A5,#0" which is positively certifiable!
it looks like in some cases it is deliberately moving things around for optimisation, but is achieving exactly the opposite of that.
Popt will do as many passes as needed and this moving around usually allow further optimizations to happen. Peephole optimizers are a common stage in compilers and work surprisingly well, test it and you will be surprised.