From 723ef5a937dbab5e7a35761fd7f0ff0c76849340 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 12 Sep 2022 11:31:11 +0200 Subject: libstdc++: Outline the overlapping case of string _M_replace into a separate function [PR105329] The following patch is partially a workaround for bogus warnings when the compiler isn't able to fold _M_disjunct call into constant false, but also an optimization attempt - assuming _M_disjunct (__s) is rare, the patch should shrink code size for the common case and use library or for non-standard instantiations an out of line function to handle the rare case. 2022-09-12 Jakub Jelinek PR tree-optimization/105329 * acinclude.m4 (libtool_VERSION): Change to 6:31:0. * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Don't export std::basic_string methods with name length of 15. (GLIBCXX_3.4.31): Export std::basic_string::_M_replace_cold. * testsuite/util/testsuite_abi.cc (check_version): Handle GLIBCXX_3.4.31. * include/bits/basic_string.h (std::basic_string::_M_replace_cold): Declare. * include/bits/basic_string.tcc (std::basic_string::_M_replace_cold): Define and export even for C++20. (std::basic_string::_M_replace): Use __builtin_expect, outline the overlapping case to _M_replace_cold. * configure: Regenerated. --- libstdc++-v3/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libstdc++-v3/configure') diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 1772eef..07916d1 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -69034,7 +69034,7 @@ $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;} fi # For libtool versioning info, format is CURRENT:REVISION:AGE -libtool_VERSION=6:30:0 +libtool_VERSION=6:31:0 # Everything parsed; figure out what files and settings to use. case $enable_symvers in -- cgit v1.1