Thanks for opening PR on this. One thing I was planning to look into soon is to make progress at least reversible - i.e. find way to declare the fact that function is part of another in GCC and make inliner to produce the problem block tree after inlining them back together. I wonder what the representation should be?
Honza