> Independently of that, what modern compilers have done with the
> traditional inline keyword is ridiculous.
Of course it isn't. I don't think you quite appreciate how difficult it is to get inlining right. Do too much and you blow the instruction cache or create too much register pressure. Do too little and you unnecessarily inhibit program transformation.
It's a very tricky balance, one that must be maintained differently not only based on target architecture but also on input language.
Compilers change inlining so frequently precisely because they get better and better at generating code.
Posted Aug 25, 2012 22:50 UTC (Sat) by lindahl (subscriber, #15266)
[Link]
Treatment of "inline" is the same as how compilers treat "register" declarations and loop-unrolling pragmas -- after a few years of cpu evolution and compiler improvements, these hints are always wrong.
And those pesky customers who care about performance expect the compiler to DTRT despite all the bogus "inline", "register" declarations, and loop-unrolling pragmas scattered all over their code.