This requires teaching the LazyCallGraph how to replace functions in the
graph in-place, but otherwise is a fairly direct port of the existing
logic.
The one interesting thing is that LCG can handle much more directly
making this update which allows us to just skip the hooks in the core
argument promotion logic used by the old PM. This is largely a function
of not tracking call instructions and instead tracking the actual edges
in the graph at an abstract level.
Note that this isn't quite ready to submit yet. It exposes a crash in the
inliner that I'm still investigating. But the code seems reasonable enough and
I have both unittesting for the LCG change and direct testing of argpromote.
s/tranfsormations/transformations/