[PATCH] D13713: [libc++] Stop marking interface symbols always_inline + hidden when building for unstable ABI

Evgeniy Stepanov via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 18:20:19 PDT 2015


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)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13713.37309.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151014/c48e1cc0/attachment.bin>


More information about the cfe-commits mailing list