NOTE: This is not a working patch. We need to revisit the ways we update the new PM callgraph, potentially the things we want to do are just not possible.
We did mix replacing a function and deleting the old one but that should
be two different operations so we can reuse them individually.
This is supposed to fix the creation of deep-wrappers which currently
delete the original function but it actually will cause a crash in the
way we update the new PM call graph.
Mail discussion: http://lists.llvm.org/pipermail/llvm-dev/2020-October/146117.html