eugenis created this revision. eugenis added reviewers: mclow.lists, EricWF. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Herald added a subscriber: aemerson.
ABI stability is not an issue when building for unstable ABI. Other than that, always_inline is mostly harmful: - it does not completely solve the ABI stability problem, because there is no guarantee that an always_inline function will be inlined. - it really harms -O0 where indiscriminate inlining results in huge stack frames. - check-libcxx becomes faster by 18% when always_inline is removed Repository: rL LLVM http://reviews.llvm.org/D13713 Files: include/__config Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -31,6 +31,13 @@ #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT #endif +#if defined(_LIBCPP_ABI_UNSTABLE) +// The only purpose of the always_inline thing is ABI stability. +// Disable it when building for unstable ABI. +#define _LIBCPP_INLINE_VISIBILITY +#define _LIBCPP_ALWAYS_INLINE +#endif + #define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y #define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y)
Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -31,6 +31,13 @@ #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT #endif +#if defined(_LIBCPP_ABI_UNSTABLE) +// The only purpose of the always_inline thing is ABI stability. +// Disable it when building for unstable ABI. +#define _LIBCPP_INLINE_VISIBILITY +#define _LIBCPP_ALWAYS_INLINE +#endif + #define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y #define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits