migration from @pcwalton 's stack-move optimization only focused on single BB cases.
original patch: https://reviews.llvm.org/D140089
functional patch: https://reviews.llvm.org/D153453
add the case to write on dest before memcpy.
need to specify the expected transformation in liveness property.
TODO: exhaustive mod/ref after copy
I think it's now worth to be review :)
We should have a test where the uses are not in the entry block (won't fold right now, but just to check it doesn't crash...)
to see multi-bb behavior