compiler_types.h: Re-introduce CONFIG_OPTIMIZE_INLINING for U-Boot
authorTom Rini <trini@konsulko.com>
Thu, 14 May 2020 12:30:07 +0000 (08:30 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 1 Jul 2020 15:48:05 +0000 (11:48 -0400)
commit1f1a0f3db338cdcaad4f83153d1163aa18e08ed5
tree889b3304886199357b0bbd3a881a827c98774974
parent67f51b40cacc70da44779cef0edb845fa0f0505d
compiler_types.h: Re-introduce CONFIG_OPTIMIZE_INLINING for U-Boot

In the Linux kernel, support for forcing inline functions to be made
inline, rather than allowing the compiler to make its own choice has
been removed.  With respect to performance, modern GCC (and Clang) do a
good job at deciding when to, or not to, inline code and there are no
run-time requirements in Linux anymore.

There is one downside to this, which is final binary size.  On average
in U-Boot removing this support grows SPL by almost 1 kilobyte.  But
there are cases where it shrinks the binary by making better inline
choices than we had forced.

Start by re-introducing CONFIG_OPTIMIZE_INLINING as a global which
essentially reverts 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely")
from Linux.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Kconfig
include/linux/compiler_types.h