Allow to predefine FORCE_INLINE macro.
authorAlex Deymo <deymo@google.com>
Fri, 28 Jul 2017 14:33:43 +0000 (16:33 +0200)
committerAlex Deymo <deymo@google.com>
Mon, 7 Aug 2017 08:34:33 +0000 (10:34 +0200)
commit76ef6d0ab0ea0937e8bb92c3a11a6445504d720f
treebce8cddddfe691fb961c86185a662e76ab317c2f
parent9a967030d7f049042a64cd095bd54ebd34f53780
Allow to predefine FORCE_INLINE macro.

FORCE_INLINE macro is defined based on the compiler used. When using
gcc, it will include "__attribute__((always_inline))" forcing gcc to
always inline all the functions marked as FORCE_INLINE. However, this
can cause a performance degradation of about 15%.

This patch allows to set the FORCE_INLINE macro from the compiler
command line to either "static" or "static inline" giving allowing it
to inline functions as needed when performing optimizations.
lib/lz4.c
lib/xxhash.c