In many programming languages, not all functions may be inlined. However, assuming that a language is designed in such a way that all functions may be inlined, what the disadvantages of inlining all functions, performing optimizations, and then reverse inlining what can be compacted?
If code is converted to a stack based intermediate representation, then reversing the inlining operation should be as simple as identifying repeating sequences of code using an algorithm such as a modified version of byte-pair encoding, followed by re-inlining functions that only occur once. Then the stack intermediate representation can be converted back into four address code.
Some problems that I might guess might be asymptotic worst case space and time complexity of the compiler and cases where very little can be reversed. However, other people might have other ideas.
A similar question is What are the disadvantages of automatically inlining all functions?. However, reverse inlining might decrease the pressure on the processor's instruction cache, and it might reduce spilling into the stack, and thus many of the responses to that question might apply significantly less.