This is hard to make scalable. All of the code in an intermediate representation needs to be available to the analysis and some summary needs to be in memory. Code can also be huge.
- Any part of the program may affect other parts
- Getting it into memory, loading the IR for 10MLOC is not happening
- Anything more expensive than linear time is a problem
GCC
gcc got better at this by:
- Putting closely-related functions together
- Approximating functions
- Some other things
- This gives around 3-5% performance improvements (which is apparently good)
- Develops can then shift attention from manual refactoring to letting the compiler do it