This patch introduces an API to identify instructions that modify the
function stack state. The name here may not be accurate enough, but the
idea is to use a common API for transforms that move instructions (see
updated transforms).
This is also used in an upcoming change in InstCombine.
clang-format: please reformat the code