As outlined in my proposal for how to get rid of debug intrinsics [0], we need to distinguish in optimisation passes when a pass /intends/ for move instructions to remain in their original order. It's the difference between moving a single instruction because we're hoisting it out of it's original position, and moving a single instruction as part of moving/copying an entire block from one place to another, all in order. This semantic difference has an effect on debug-info, and it needs to be accounted for when we remove debug intrinsics.
The patch just replaces a few calls to moveBefore with calls to moveBeforePreserving -- and the latter just calls the former, so it's all NFC right now. A future patch will add an implementation of moveBeforePreserving that takes action to correctly preserve debug-info, but that's tightly coupled with our non-instruction debug-info representation. This patch just shows how invasive the changes are.
There are, as it transpires, very few places where this makes a difference.
Not adding reviewers for now as I'd like to group all these changes, so that we talk about how they should be tested.
Could be worth adding a comment explaining the intended semantics?