[PATCH] D47399: Add _LIBCPP_LARGE_CODEBASE

Tom Anderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 16:02:42 PDT 2018


thomasanderson added inline comments.


================
Comment at: include/__config:793
+#define _LIBCPP_TWEAK_ALWAYS_INLINE _LIBCPP_ALWAYS_INLINE
+#define _LIBCPP_TWEAK_NEVER_INLINE __attribute__ ((noinline))
+#else
----------------
EricWF wrote:
> I understand wanting to disable the forced inlining of functions, but I don't understand why you would want to explicitly disable inlining.
> It seems like if the function shouldn't be inlined for performance reasons, that should be controlled by an optimizer flag, and if the optimizer isn't producing ideal code, that seems like an optimizer bug.
I'm building Chromium on Linux with lld (without LTO) with -O2.  With the __attribute__((noinline))'s from this patch, the binary size is 194M, 203296816B.  Without the noinline's, it's 197M, 206227536B.

If I use -Os instead, the measurements are 191M, 200064384B and 192M, 200578400B.  Better, but still not perfect.

+pcc do you know why lld is having trouble noinlining these functions?


https://reviews.llvm.org/D47399





More information about the llvm-commits mailing list