Quotes of the week
Posted Aug 23, 2012 7:53 UTC (Thu) by
pbonzini (subscriber, #60935)
In reply to:
Quotes of the week by pr1268
Parent article:
Quotes of the week
In many cases, inline is ignored in the sense that the function is inlined anyway if it is small and/or called once. But there are some rare cases where you want to inline a large function, and that's where you still need the marker.
But as Andrew said, it might as well be __always_inline in that case, and GCC's bag of tricks is growing with each release so as to make the annotations unnecessary in more and more cases. For example, GCC is now also able to inline only the early part of the function if there is a "return" early enough, it detects how much code will be dead after replacing constant arguments into conditionals, and so on.
(
Log in to post comments)