This is a fix for PR27796, inlining of empty/small variadic
While the general problem of inlining variadic functions is difficult, it is quite easy to inline variadic functions if they do not use va_start, because in those cases we can simply ignore arguments passed against '...'. That use pattern, though seemingly wasteful, is actually quite useful for writing functions for trace messages, with bodies that are removed via conditional compilation in production builds. This is done with the expectation that the compiler will inline these essentially empty functions and optimize out entire tracing overhead.
That is the purpose of this proposed change.
The determination of whether a the called function if using va_start is done at the time of inlining by scanning the code of the called function. However, in order to avoid the cost of this extra scan, we limit this scan to 'small' function; the definition of 'small' being that it must have a single block of no more that 20 instructions. Larger callees are rejected without full scan. That is sufficient for our use cases of mostly empty functions. The choice of 20 for number of instructions is somewhat arbitrary.
nit: wrong naming convention for variable...