A few of the changes in this patch update the behaviour from "delete debug intrinsics" to "move dbg.assigns to a new block and set them to undef". There's an argument that we could just keep the existing behaviour in these cases and accept that occasionally we will lose some debug info accuracy, for the sake of fewer special cases in llvm. Furthermore, we can't / don't always perform the "move + undef", such as in the case of DeleteDeadBlocks. There we do indeed just delete them for the sake of practicality. I don't particularly like this inconsistency, but it might just be the kind of thing we need to decide on a case by case basis.
I'd be keen to hear what others think about this one as I don't have a strong gut feeling for what is best, overall.
This can (should!) be asserted; also, techncially can be peeled away from dbg.assign improvements if this also affects dbg.values?