[v3] Fix management of non empty hash functor

2012-12-13 Thread François Dumont
st. 2012-12-14 François Dumont * include/bits/hashtable_policy.h (_Local_iterator_base): Use _Hashtable_ebo_helper to embed necessary functors into the local_iterator. Pass information about functors involved in hash code by copy. * include/bits/hashtable.h (__cache_defau

Re: [v3] Fix management of non empty hash functor

2013-01-10 Thread François Dumont
some time changing typedef in using so I prefer to stick to this approach in this file, even if there are still some typedef left. Tested under linux x86_64 normal and debug modes. 2013-01-10 François Dumont * include/bits/hashtable_policy.h (_Local_iterator_base): Use _Hashtable_

Re: [v3] Fix management of non empty hash functor

2013-01-28 Thread François Dumont
Attached patch applied. 2013-01-28 François Dumont * include/bits/hashtable_policy.h (_Local_iterator_base): Use _Hashtable_ebo_helper to embed functors into the local_iterator when necessary. Pass information about functors involved in hash code by copy. * include/bits

Fwd: Re: Export _Prime_rehash_policy symbols

2013-02-01 Thread François Dumont
Test successful so attached patch applied. 2013-02-01 François Dumont * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt) (_Prime_rehash_policy::_M_need_rehash): Move definition... * src/c++11/hashtable_c++0x.cc: ... here. * src/shared/hashtable-aux.cc

hasher speed traits

2013-02-02 Thread François Dumont
std::unordered_set default cache: second insert 3r3u0s 640mem0pf 41975.cc std::unordered_set default cache: erase from key 4r3u0s -640mem 0pf 2013-02-02 François Dumont * include/bits/functional_hash.h (std

Re: [PATCH, PR] Crash of Bessel functions at x==0!

2013-02-09 Thread François Dumont
Attached patch applied then. 2013-02-09 François Dumont * include/tr1/bessel_function.tcc (__cyl_bessel_ij_series): Code simplification. On 02/08/2013 08:46 PM, Paolo Carlini wrote: On 02/08/2013 07:08 PM, François Dumont wrote: Just a small remark, in bessel_function.tcc, the

Re: unordered containers doc

2013-02-11 Thread François Dumont
That's crystal clear. I think I can recognize one or two words from my original proposal like 'The' or 'in' :-) François On 02/11/2013 01:24 AM, Jonathan Wakely wrote: On 7 February 2013 21:01, François Dumont wrote: Thanks for taking care of it. Here is another

Re: [patch] fix libstdc++/56278

2013-02-13 Thread François Dumont
Committed then. 2013-02-13 François Dumont * include/bits/hashtable_policy.h (_Hash_code_base): Restore default constructor protected. * include/bits/hashtable.h: static assert that _Hash_code_base has a default constructor available through inheritance. On 02/13/2013 12:36

std::pair copy and move constructor

2013-02-15 Thread François Dumont
Hi I had a problem with the result of std::is_copy_assignable>::type which used to be true_type. So here is a patch to fix that. 2013-02-15 François Dumont * include/bits/stl_pair.h (pair): Use default implementation for copy and move constructors. * testsuite/20_u

Re: Enhance performance test

2011-11-06 Thread François Dumont
Attached patch applied. 2011-11-06 François Dumont * testsuite/performance/23_containers/insert_erase/41975.cc: Add tests to check performance with or without cache of hash code and with string type that has a costlier hash functor than int type. François On 11/05

Re: Value type of map need not be default copyable

2012-08-08 Thread François Dumont
On 08/08/2012 09:34 AM, Marc Glisse wrote: On Tue, 7 Aug 2012, Richard Smith wrote: I've attached a patch for unordered_map which solves the rvalue reference problem. For efficiency, I've created a new _M_emplace_bucket method rather than call emplace directly. I've verified all libstdc++ tes

Re: Value type of map need not be default copyable

2012-08-08 Thread François Dumont
On 08/08/2012 03:39 PM, Paolo Carlini wrote: On 08/08/2012 03:15 PM, François Dumont wrote: I have also introduce a special std::pair constructor for container usage so that we do not have to include the whole tuple stuff just for associative container implementations. To be clear: sorry

Re: Value type of map need not be default copyable

2012-08-09 Thread François Dumont
On 08/09/2012 10:35 AM, Paolo Carlini wrote: Hi, On 08/09/2012 09:14 AM, Marc Glisse wrote: On Wed, 8 Aug 2012, François Dumont wrote: On 08/08/2012 03:39 PM, Paolo Carlini wrote: On 08/08/2012 03:15 PM, François Dumont wrote: I have also introduce a special std::pair constructor for

Re: Value type of map need not be default copyable

2012-08-11 Thread François Dumont
ld make this header less dependent on , should I do so ? 2012-08-09 François Dumont Ollie Wild * include/bits/hashtable.h (_Hashtable<>_M_insert_multi_node(hash_code, node_type*)): New. (_Hashtable<>_M_insert(_Args&&, false_type)): Use latter. (_H

Re: Value type of map need not be default copyable

2012-08-12 Thread François Dumont
On 08/11/2012 03:47 PM, Marc Glisse wrote: On Sat, 11 Aug 2012, François Dumont wrote: Your remark on using std::move rather than std::forward Marc made sens but didn't work. I don't understand why but the new test is showing that std::forward works. If anyone can explain why

Re: Value type of map need not be default copyable

2012-08-13 Thread François Dumont
On 08/13/2012 02:10 PM, Paolo Carlini wrote: On 08/12/2012 10:00 PM, François Dumont wrote: Ok for trunk ? Ok, thanks! Paolo. PS: you may want to remove the trailing blank line of testsuite_counter_type.h Attached patch applied. 2012-08-13 François Dumont Ollie Wild

[v3] libstdc++/54296

2012-08-28 Thread François Dumont
_Hashtable implementation but finally preferred not to do so because it would imply re-computing hash code and add useless checks. 2012-08-28 François Dumont PR libstdc++/54296 * include/bits/hashtable.h (_M_erase(size_type, __node_base*, __node_type*)): New. (erase(const_iterator)):

Re: [v3] libstdc++/54296

2012-09-05 Thread François Dumont
On 09/05/2012 11:58 AM, Paolo Carlini wrote: Hi, On 09/04/2012 10:08 PM, François Dumont wrote: Hi I managed to do the test with Valgrind and so confirm the fix with the attached patch (unmodified since last proposal). Patch is Ok, thanks for your patience and thanks again for all your

PR 44436 Associative containers emplace/emplace_hint

2012-09-14 Thread François Dumont
value type to be default constructible. The C++11 status table was not signaling that those methods were missing so I didn't had to update it. 2012-09-14 François Dumont PR libstdc++/44436 * include/bits/stl_tree.h (_Rb_tree<>::_M_insert_): Take _Base_ptr

Fix code regression

2012-09-23 Thread François Dumont
, __ummap_hashtable. (unordered_map): Derive from __umap_hashtable. (unordered_multimap): Derive from __ummap_hashtable. * include/bits/unordered_set.h (__unordered_set): Remove. (__unordered_multiset): Remove. ... 2012-09-19 François Dumont * testsuite/performance

Re: PR 54075 Fix hashtable::reserve

2012-07-25 Thread François Dumont
Attached patch applied to trunk. I am building 4.7 branch to also apply the patch to this branch. 2012-07-25 François Dumont PR libstdc++/54075 * include/bits/hashtable.h (_Hashtable<>::_Hashtable(_InputIterator, _InputIterator, size_type, ...): Remo

Re: PR 54075 Fix hashtable::reserve

2012-07-26 Thread François Dumont
Attached patch applied on 4.7 branch. Tested under Linux x86_64. I will fix this small english issue in trunk ChangeLog. François On 07/26/2012 11:11 AM, Jonathan Wakely wrote: On 25 July 2012 21:29, François Dumont wrote: (_Hashtable<>::rehash): Likewise. Set _M_prev_resiz

Re: PR 54075 Restore 4.6 growth factor

2012-07-29 Thread François Dumont
Patch applied. I usually CC to gcc-patches when I signal that it has been applied. Should I send it all my patch proposals ? François On 07/28/2012 11:18 PM, Jonathan Wakely wrote: Please remember to CC gcc-patches too. On 28 July 2012 21:49, François Dumont wrote: Hi Here is the

_GLIBCXX_END_NAMESPACE_* invalid closure order

2012-07-30 Thread François Dumont
Even if it doesn't make any difference after preprocessing the attached patch fix the closure order in definition of _GLIBCXX_END_NAMESPACE_* macros. 2012-07-30 François Dumont * include/bits/c++config (_GLIBCXX_END_NAMESPACE_CONTAINER): Fix order of clo

Remove redundant comparison in debug mode

2012-08-01 Thread François Dumont
Verifying number of comparisons invoked in different algos and different modes I remarked this small performance issue. 2012-08-01 François Dumont * include/debug/functions.h (__check_partition_lower_aux): Remove redundant comparison with pivot value

Re: PR 53115

2012-05-01 Thread François Dumont
progress on this subject in the future. However I will have a try with Valgrind. I can only add comment in bugzilla so I let you set this issue as resolved. François I will have a run with Valgrind 2012-05-01 François Dumont PR libstdc++/53115 * include/bits/hashtable.h

Re: PR 53115

2012-05-02 Thread François Dumont
On 05/02/2012 06:23 PM, H.J. Lu wrote: On Tue, May 1, 2012 at 1:23 PM, François Dumont wrote: unordered_multilmap test added, attached patch applied to 4.7 branch and trunk. This bug was not so difficult to fix. It would even have been quite easy to detect with a good test coverage tool

Re: [v3] fix libstdc++/53263

2012-05-11 Thread François Dumont
Attached patch applied to trunk. 2012-05-11 François Dumont PR libstdc++/53263 * include/debug/safe_iterator.h (__gnu_debug::__base): Move... * include/debug/functions.h: ... Here. Add debug function overloads to perform checks on normal iterators when possible. * include

Re: Fix stable_sort to work on iterators returning rvalue

2012-05-29 Thread François Dumont
Attached patch applied then. 2012-05-29 François Dumont * include/bits/stl_tempbuf.h (__uninitialized_construct_buf) (__uninitialized_construct_buf_dispatch<>::__ucr): Fix to work with iterator returning rvalue. * testsuite/25_algorithms/stable_sort/3.cc: New. Françoi

Re: hashtable exception safety patch

2011-09-14 Thread François Dumont
. Thanks for your patience. Paolo Attached patch applied. 2011-09-14 François Dumont Paolo Carlini * include/bits/hashtable.h (_Hashtable<>::_M_rehash): Take and restore hash policy _M_prev_resize on exception. (_Hashtable<>::_M_insert_bucket):

Re: hash policy patch

2011-09-17 Thread François Dumont
o reduce the number of buckets... I should find the time to check C++11 about this. I'll let you know my opinion ASAP. Attached patch applied. 2011-09-17 François Dumont * include/bits/hashtable.h (_Hashtable<>::__rehash_policy(const _RehashPolicy&)): Commit the

Re: [v3] PR libstdc++/50529

2011-10-01 Thread François Dumont
On 09/29/2011 10:59 PM, Paolo Carlini wrote: Ok to commit ? Ok. These patches are going also to 4_6-branch. Paolo Attached patch applied, thanks Paolo for applying it to 4.6 branch. 2011-10-01 François Dumont * include/debug/vector (vector<>::erase(iterator, iterator):

Re: [v3] fix libstdc++/52476

2012-03-16 Thread François Dumont
Attached patch applied. 2012-03-16 François Dumont PR libstdc++/52476 * include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Add. (_Hashtable<>::_M_rehash): Use the latter. * testsuite/23_containers/unordered_multimap/insert/5

Re: [v3] fix libstdc++/52476

2012-04-09 Thread François Dumont
Attached patch applied to 4_7-branch. 2012-04-09 François Dumont PR libstdc++/52476 * include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Add. (_Hashtable<>::_M_rehash): Use the latter. * testsuite/23_containers/unordered_multimap/insert/5

Fwd: Re: hashtable cleanup + new testsuite files

2011-11-28 Thread François Dumont
Attached patch applied. 2011-11-29 François Dumont * include/bits/hashtable.h (_Hashtable<>::_M_rehash): Remove code useless now that the hashtable implementation put the hash code in cache if the hash functor throws. * testsuite/23_containers/unorder

Re: PR 51386

2011-12-07 Thread François Dumont
Attached patch applied: 2011-12-07 François Dumont PR libstdc++/51386 * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt): Fix computation of _M_prev_resize so that hashtable do not keep on being rehashed when _M_max_load_factor is lower

Re: unordered containers emplace

2011-12-09 Thread François Dumont
Attached patch applied. 2011-12-09 François Dumont * include/bits/hashtable.h (_Hashtable<>::emplace, _Hashtable<>::emplace_hint): Add. * include/debug/unordered_set (unordered_set<>::emplace, unordered_set<>::emplace_hint, unord

Re: profile mode patch

2011-12-10 Thread François Dumont
Attached patch applied. 2011-12-12 François Dumont * include/profile/unordered_set: Minor formatting changes. (unordered_set<>::_M_profile_destruct, unordered_multiset<>::_M_profile_destruct): Fix implementation to not rely on normal implementa

Re: RE :Re: RE :Re: hashtable local iterator

2012-01-03 Thread François Dumont
Attached patch applied. 2012-01-03 François Dumont * include/bits/hashtable_policy.h (_Ebo_helper<>): Rename to the more specific _Hashtable_ebo_helper. Hide this implementation detail thanks to private inheritance. I was about to roll the ChangeLog but I sa

Re: [PATCH] hashtable insert enhancement

2012-01-13 Thread François Dumont
Attached patch applied. 2012-01-13 François Dumont * include/bits/hashtable_policy.h (_Hash_node_base): New, use it as base class of ... (_Hash_node, _Hash_node): ... those. * include/bits/hashtable.h (_Hashtable): Replace _M_begin_bucket_index by

Re: libstdc++/51866 too, sorry

2012-01-18 Thread François Dumont
Attached patch applied. 2012-01-18 François Dumont Roman Kononov PR libstdc++/51866 * include/bits/hashtable.h (_Hashtable<>::_M_insert(_Arg, false_type)): Do not keep a reference to a potentially moved instance. * testsuite/23_cont

[wwwdocs] libstdcxx_so_7-2-branch branch creation

2012-02-01 Thread François Dumont
Hello I have created yesterday the libstdcxx_so_7-2-branch in the gcc repo that only contains the libstdc++-v3 folder. This branch will contain all the abi breaking changes that are plan to be moved to trunk as soon as the decision to break the abi will have been taken. Paolo Carlini advi

Re: debug safe iterator patch

2012-02-06 Thread François Dumont
Attached patch applied 2012-02-06 François Dumont * include/debug/safe_iterator.h (_Safe_iterator::_M_before_dereferenceable): Avoid the expensive creation of a _Safe_iterator instance to do the check. François On 02/05/2012 06:30 PM, Paolo Carlini wrote: On 02/05

Re: [wwwdocs] libstdcxx_so_7-2-branch branch creation

2012-02-13 Thread François Dumont
++-v3) patches that break its abi. It will be merged into the trunk as soon as the decision to move to abi version 7 will have been taken. It is maintained by François Dumont and the official libstdc++-v3 maintainers Paolo Carlini, Benjamin Kosnik and Jonathan Wakely. I prefer to avoid the te

Re: [wwwdocs] libstdcxx_so_7-2-branch branch creation

2012-02-26 Thread François Dumont
to move to abi version 7 will have been taken. It is maintained by > mailto:frs.dum...@gmail.com";>François Dumont and the official > libstdc++-v3 maintainers Paolo Carlini, Benjamin Kosnik and Jonathan Wakely. > Patches will be marked with the tag [so_7-2] in the subject

Re: [so_7-2] DR 13631 patch

2012-03-01 Thread François Dumont
Here is what I have finally commited to libstdcxx_so_7-2 branch. 2012-03-01 François Dumont DR libstdc++/13631 * config/locale/gnu/messages_member.h, messages_member.cc: Prefer dgettext usage to gettext to allow usage of several catalogs at the same time. Add

Re: cleanup patch

2011-06-29 Thread François Dumont
Attached patch applied 2011-06-29 François Dumont * include/debug/set.h, unordered_map, multiset.h, forward_list, unordered_set, vector, deque, string, list, multimap.h: Remove base class default constructor calls. * include/debug/map.h: Likewise and cleanup

Re: safe unordered local iterators

2011-07-21 Thread François Dumont
Attached patch applied: 2011-07-21 François Dumont * include/debug/safe_unordered_sequence.h, safe_unordered_sequence.tcc: Rename respectively in... * include/debug/safe_unordered_container.h, safe_unordered_container.tcc: ...those. _Safe_unordered_sequence

Re: hash policy patch

2011-07-24 Thread François Dumont
On 07/24/2011 01:31 AM, Paolo Carlini wrote: On 07/23/2011 10:31 PM, François Dumont wrote: Hi While working on DR 41975 I realized a small issue in current rehash implementation that sometimes lead to load_factor being greater than max_load_factor. Here is a patch to fix that: Ok, good

Re: libstdc++.exp patch

2011-04-22 Thread François Dumont
Attached patch applied. 2011-04-21 François Dumont * testsuite/lib/libstdc++.exp (check_v3_target_time): Discard unused compilation result thanks to /dev/null. * testsuite/lib/libstdc++.exp (check_v3_target_debug_mode check_v3_target_profile_mode

Re: pb_ds debug mode patch

2011-05-11 Thread François Dumont
Attached patch applied. 2011-05-11 François Dumont * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY. * include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp

[PATCH] Fix const constraint in std::stable_sort and std::inplace_merge

2024-09-25 Thread François Dumont
Hi Once https://gcc.gnu.org/pipermail/libstdc++/2024-September/059568.html will be accepted we will be able fix this long lasting issue that std::stable_sort and std::inplace_merge are forcing the functor to take const& parameters even when iterators used in range are not const ones. This pa

[PATCH] Move std::search into algobase.h

2023-05-31 Thread François Dumont via Gcc-patches
libstdc++: Reduce inclusion to Move the std::search definition from stl_algo.h to stl_algobase.h and use the later in . For consistency also move std::__parallel::search and associated helpers from to so that std::__parallel::search is accessible along with std::search. libstdc++-v3/Cha

Re: [PATCH] Move std::search into algobase.h

2023-06-01 Thread François Dumont via Gcc-patches
On Thu, 1 Jun 2023 at 12:52, Rainer Orth > wrote: > >> Jonathan Wakely via Gcc-patches writes: >> >> > On Wed, 31 May 2023 at 18:39, François Dumont via Libstdc++ < >> > libstd...@gcc.gnu.org> wrote: >> > >> >> libstdc++: Reduce in

Re: [PATCH] Move std::search into algobase.h

2023-06-01 Thread François Dumont via Gcc-patches
P and try to rebuild lib to reproduce the failure. To be continued tomorrow... On 01/06/2023 14:05, Jonathan Wakely wrote: On Thu, 1 Jun 2023 at 12:52, Rainer Orth wrote: Jonathan Wakely via Gcc-patches writes: > On Wed, 31 May 2023 at 18:39, François Dumont via Libstdc++ <

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread François Dumont via Gcc-patches
de.cc:     Add { dg-require-effective-target omp }.     * testsuite/17_intro/headers/c++2014/parallel_mode.cc: Likewise.     * testsuite/17_intro/headers/c++2017/parallel_mode.cc: Likewise. Ok to commit ? On 01/06/2023 23:57, Jonathan Wakely wrote: On Thu, 1 Jun 2023, 21:37 Fra

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread François Dumont via Gcc-patches
Ok, push done. Even after full rebuild those tests are still UNRESOLVED on my system. Yes, I also noticed that I could remove this check. I'll propose it later. François On 02/06/2023 09:43, Jonathan Wakely wrote: On Fri, 2 Jun 2023 at 08:33, François Dumont wrote: I haven't

Re: [committed] libstdc++: Update list of known symbol versions for abi-check

2023-06-06 Thread François Dumont via Gcc-patches
On 06/06/2023 17:59, Jonathan Wakely via Libstdc++ wrote: Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. -- >8 -- Add the recently added CXXABI_1.3.15 version. Also remove two "frozen" versions from the latestp list, as no more symbols should be added to those now. libstdc++-v3/

Re: [PATCH v4 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-06-12 Thread François Dumont via Gcc-patches
Same remark for all your alike patches. On 11/06/2023 04:43, Ken Matsui via Libstdc++ wrote: This patch gets std::is_reference to dispatch to new built-in trait __is_reference. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait.

Re: [PATCH v5 6/6] libstdc++: make std::is_object dispatch to new built-in traits

2023-06-13 Thread François Dumont via Gcc-patches
On 13/06/2023 00:22, Ken Matsui via Libstdc++ wrote: This patch gets std::is_object to dispatch to new built-in traits, __is_function, __is_reference, and __is_void. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use new built-in traits, __is_function, __is_refe

[PATCH] Reimplement __gnu_cxx::__ops operators

2023-06-14 Thread François Dumont via Gcc-patches
I think we all agree that __gnu_cxx::__ops needed to be reimplemented, here it is. Note that I kept the usage of std::ref in , and .     libstdc++: Reimplement __gnu_cxx::__ops operators     Replace functors using iterators as input to adopt functors that     are matching the same Standard ex

Re: [PATCH 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-11 Thread François Dumont via Gcc-patches
On 10/07/2023 07:23, Ken Matsui via Libstdc++ wrote: This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likew

Re: [PATCH v2 1/3] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-07-16 Thread François Dumont via Gcc-patches
On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_valu

Re: [PATCH v2 2/3] libstdc++: Optimize is_arithmetic performance by __is_arithmetic built-in

2023-07-16 Thread François Dumont via Gcc-patches
On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_arithmetic): Use __is_arithmetic built-in trait.

Re: [PATCH v2 3/3] libstdc++: Optimize is_fundamental performance by __is_arithmetic built-in

2023-07-16 Thread François Dumont via Gcc-patches
On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_fundamental_v): Use __is_arithmetic built-in tr

Re: [PATCH v2 2/3] libstdc++: Optimize is_arithmetic performance by __is_arithmetic built-in

2023-07-22 Thread François Dumont via Gcc-patches
On 17/07/2023 06:48, Ken Matsui wrote: On Sun, Jul 16, 2023 at 5:32 AM François Dumont wrote: On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3

Re: [PATCH v2 3/3] libstdc++: Optimize is_fundamental performance by __is_arithmetic built-in

2023-07-22 Thread François Dumont via Gcc-patches
at 9:49 PM Ken Matsui wrote: On Sun, Jul 16, 2023 at 5:41 AM François Dumont wrote: On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog:

Re: [PATCH v3 1/3] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-07-22 Thread François Dumont via Gcc-patches
On 18/07/2023 08:27, Ken Matsui via Libstdc++ wrote: This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_valu

[PATCH][Hashtable] Performance optimization through use of insertion hint

2023-07-24 Thread François Dumont via Gcc-patches
    libstdc++: [_Hashtable] Make more use of insertion hint     When inserting an element into an empty bucket we currently insert the new node     after the before-begin node so in first position. The drawback of doing this is     that we are forced to update the bucket that was containing th

[committed] Fix several preprocessor directives

2023-07-30 Thread François Dumont via Gcc-patches
Committed as obvious.     libstdc++: Fix several preprocessor directives     A wrong usage of #define in place of a #error seems to have been replicated     at different places in source files.     libstdc++-v3/ChangeLog:     * src/c++11/compatibility-ldbl-facets-aliases.h: Replace

[committed] libstdc++: Remove obsolete comment in

2022-07-09 Thread François Dumont via Gcc-patches
   libstdc++: Remove obsolete comment in header     The comment is obsolete because char_traits.h do not include stl_algobase.h     anymore and stl_algobase.h is included directly from a few lines     below.     libstdc++-v3/ChangeLog:     * include/std/string: Remove obsolete comm

[PATCH] Complete __gnu_debug::basic_string Standard conformity

2022-07-10 Thread François Dumont via Gcc-patches
Here is a first patch to complete __gnu_debug::basic_string Standard conformity. I prefer to submit this before checking for more missing stuff to check that my proposal of having a testsuite_string.h header is ok. I also noticed some problems with _GLIBCXX_DEBUG_PEDANTIC.     libstdc++: Com

[PATCH] Add _GLIBCXX_DEBUG backtrace generation

2022-07-13 Thread François Dumont via Gcc-patches
libstdc++: [_GLIBCXX_DEBUG] Add backtrace generation on demand Add _GLIBCXX_DEBUG_BACKTRACE macro to activate backtrace generation on _GLIBCXX_DEBUG assertions. Prerequisite is to have configure the lib with: --enable-libstdcxx-backtrace=yes libstdc++-v3/ChangeLog: * include/debug/f

Re: [PATCH] Simplify branching in algos

2022-07-18 Thread François Dumont via Gcc-patches
Hi     I just noticed that I still had this nice enhancement in my local branches.     Ok to commit ? François On 21/11/21 21:34, François Dumont wrote: A recent thread on this mailing list made me remember that this proposal is still open. I've updated it just to add a missin

Re: [PATCH] Complete __gnu_debug::basic_string Standard conformity

2022-07-19 Thread François Dumont via Gcc-patches
On 19/07/22 12:42, Jonathan Wakely wrote: On Sun, 10 Jul 2022 at 14:57, François Dumont via Libstdc++ wrote: Here is a first patch to complete __gnu_debug::basic_string Standard conformity. I prefer to submit this before checking for more missing stuff to check that my proposal of having a

Re: [PATCH] Add _GLIBCXX_DEBUG backtrace generation

2022-08-04 Thread François Dumont via Gcc-patches
Gentle reminder. On 13/07/22 19:26, François Dumont wrote: libstdc++: [_GLIBCXX_DEBUG] Add backtrace generation on demand   Add _GLIBCXX_DEBUG_BACKTRACE macro to activate backtrace generation on _GLIBCXX_DEBUG assertions. Prerequisite is to have configure the lib with:   --enable-libstdcxx

[PATCH][_GLIBCXX_DEBUG] Refine singular iterator state

2022-08-04 Thread François Dumont via Gcc-patches
This an old patch I had prepared a long time ago, I don't think I ever submitted it.     libstdc++: [_GLIBCXX_DEBUG] Do not consider detached iterators as value-initialized     An attach iterator has its _M_version set to something != 0. This value shall be preserved     when detaching it so

Re: [PATCH][_GLIBCXX_DEBUG] Refine singular iterator state

2022-08-07 Thread François Dumont via Gcc-patches
Another version of this patch with just a new test case showing what wrong code was unnoticed previously by the _GLIBCXX_DEBUG mode. On 04/08/22 22:56, François Dumont wrote: This an old patch I had prepared a long time ago, I don't think I ever submitted it.     libstdc++: [_GLIBCXX_

Re: [PATCH][_GLIBCXX_DEBUG] Refine singular iterator state

2022-08-08 Thread François Dumont via Gcc-patches
On 08/08/22 15:19, Jonathan Wakely wrote: On Mon, 8 Aug 2022 at 06:07, François Dumont via Libstdc++ wrote: Another version of this patch with just a new test case showing what wrong code was unnoticed previously by the _GLIBCXX_DEBUG mode. On 04/08/22 22:56, François Dumont wrote: This an

Re: [PATCH] Add _GLIBCXX_DEBUG backtrace generation

2022-08-09 Thread François Dumont via Gcc-patches
On 08/08/22 15:29, Jonathan Wakely wrote: On Wed, 13 Jul 2022 at 18:28, François Dumont via Libstdc++ wrote: libstdc++: [_GLIBCXX_DEBUG] Add backtrace generation on demand Add _GLIBCXX_DEBUG_BACKTRACE macro to activate backtrace generation on _GLIBCXX_DEBUG assertions. Prerequisite is to

[PATCH] Complete __gnu_test::basic_string<>::compare support

2022-08-10 Thread François Dumont via Gcc-patches
Here is another patch to complete __gnu_debug::basic_string<> Standard conformity. This one is adding the missing compare overloads. I also would like to propose to change how __gnu_debug::basic_string<> is tested. I considered activating checks when _GLIBCXX_ASSERTIONS is defined but it turn

[committed][_GLIBCXX_INLINE_VERSION] Add __cxa_call_terminate symbol export

2023-08-06 Thread François Dumont via Gcc-patches
libstdc++: [_GLIBCXX_INLINE_VERSION] Add __cxa_call_terminate symbol export libstdc++-v3/ChangeLog:     * config/abi/pre/gnu-versioned-namespace.ver: Add __cxa_call_terminate     symbol export. diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu

[PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-09 Thread François Dumont via Gcc-patches
Hi I've eventually completed this work. This evolution will allow to build libstdc++ without dual abi and using cxx11 abi. For the moment such a config is only accessible through the --enable-symvers=gnu-versioned-namespace configuration.     libstdc++: [_GLIBCXX_INLINE_VERSION] Use cxx11 ab

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-10 Thread François Dumont via Gcc-patches
I hadn't tested the most basic default configuration and it is failing, I need some more time yet. François On 10/08/2023 07:13, François Dumont wrote: Hi I've eventually completed this work. This evolution will allow to build libstdc++ without dual abi and using cxx11 abi. For

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-13 Thread François Dumont via Gcc-patches
onst string&): Remove.     [_GLIBCXX_USE_CXX11_ABI](range_error(const string&): Remove.     [_GLIBCXX_USE_CXX11_ABI](overflow_error(const string&): Remove.     [_GLIBCXX_USE_CXX11_ABI](underflow_error(const string&): Remove. Ok to commit ? François On 11/

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-13 Thread François Dumont via Gcc-patches
Here is another version with enhanced sizeof/alignof static_assert in string-inst.cc for the std::__cow_string definition from . The assertions in cow-stdexcept.cc are now checking the definition which is in the same file. On 13/08/2023 15:27, François Dumont wrote: Here is the fixed patch

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-17 Thread François Dumont via Gcc-patches
Another fix to define __cow_string(const std::string&) in cxx11-stdexcept.cc even if ! _GLIBCXX_USE_DUAL_ABI. On 13/08/2023 21:51, François Dumont wrote: Here is another version with enhanced sizeof/alignof static_assert in string-inst.cc for the std::__cow_string definition from .

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-17 Thread François Dumont via Gcc-patches
On 17/08/2023 19:22, Jonathan Wakely wrote: On Sun, 13 Aug 2023 at 14:27, François Dumont via Libstdc++ wrote: Here is the fixed patch tested in all 3 modes: - _GLIBCXX_USE_DUAL_ABI - !_GLIBCXX_USE_DUAL_ABI && !_GLIBCXX_USE_CXX11_ABI - !_GLIBCXX_USE_DUAL_ABI && _GLIBCXX_

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-19 Thread François Dumont via Gcc-patches
: On Thu, 17 Aug 2023 at 20:37, Jonathan Wakely wrote: On Thu, 17 Aug 2023 at 19:59, Jonathan Wakely wrote: On Thu, 17 Aug 2023 at 18:40, François Dumont wrote: On 17/08/2023 19:22, Jonathan Wakely wrote: On Sun, 13 Aug 2023 at 14:27, François Dumont via Libstdc++ wrote: Here is the fixed

[PATCH] Fix tests sensitive to internal library allocations

2023-08-21 Thread François Dumont via Gcc-patches
Hi Here is a propocal to fix tests sensitive to libstdc++ internal allocations. Tested by restoring allocation in tzdb.cc. As announced I'm also adding a test to detect such allocations. If it is ok let me know if you prefer to see it in a different place.     libstdc++: Fix tests relying on

Re: [PATCH] Fix tests sensitive to internal library allocations

2023-08-21 Thread François Dumont via Gcc-patches
Here is the updated and tested patch. On 21/08/2023 20:07, Jonathan Wakely wrote: On Mon, 21 Aug 2023 at 18:05, François Dumont via Libstdc++ wrote: Hi Here is a propocal to fix tests sensitive to libstdc++ internal allocations. Surely the enter() and exit() calls should be a constructor

Re: [PATCH] [libstdc++] ensure mutex_pool survives _Safe_sequence_base

2023-02-17 Thread François Dumont via Gcc-patches
On 17/02/23 09:01, Alexandre Oliva via Libstdc++ wrote: On Feb 17, 2023, Alexandre Oliva wrote: On vxworks, after destroying the semaphore used to implement a mutex, __gthread_mutex_lock fails and __gnu_cxx::__mutex::lock calls __throw_concurrence_lock_error. Nothing ensures the mutex_pool mu

[PATCH] libstdc++: Limit allocations in _Rb_tree 1/2

2023-02-21 Thread François Dumont via Gcc-patches
Here is eventually a working proposal. Compared to the unordered container approach we need to find out what type is going to be used to call the comparer. Otherwise we might reinstantiate a temporary each time we call the comparer. For example in case of const char* insertion with a less comp

[PATCH] libstdc++: Limit allocations in _Rb_tree 2/2

2023-02-21 Thread François Dumont via Gcc-patches
This one is a refinement for multimap/multiset. It allows to have share the same key if managed with ref counting like the cow string.     libstdc++: [_Rb_tree] Limit allocations on equal insertions [PR 96088]     When inserting the same key several times prefer to insert the new entry using

[PATCH] Fix std::unordered_map key range insertion

2023-02-23 Thread François Dumont via Gcc-patches
Hi Based on my work on PR 96088 for std::map I imagine this use case of inserting a range of keys into an associative container. It behaves as operator[] by inserting a default value for each key. I wonder if the Standard says that it should work. Or maybe we want to support it ? I haven't

Re: [PATCH] Fix std::unordered_map key range insertion

2023-02-26 Thread François Dumont via Gcc-patches
Replying to my own questions. This use case is not valid from a Standard point of view. So not a bug and no need to deal with that before next stage 1. The question left is either we want to support it ? François On 23/02/23 22:14, François Dumont wrote: Hi Based on my work on PR 96088

Re: [PATCH] libstdc++: Limit allocations in _Rb_tree 2/2

2023-03-01 Thread François Dumont via Gcc-patches
Just forget about this patch, bad idea. The key_type might have additional data not used for the comparison. This data would not be preserved if we were inserting the already stored equivalent key instead of the user provided. On 22/02/23 07:08, François Dumont wrote: This one is a

[PATCH] _Hashtable implementation cleanup

2023-05-09 Thread François Dumont via Gcc-patches
Hi Rather than providing a series of patches for _Hashtable I prefer to submit them one by one. It will maximize the chances to have some of them in gcc 14. I'm starting with this simple patch to do some cleanup in the current implementation to ease compiler optimizations by making some meth

[PATCH] Replace __gnu_cxx::__ops::__negate with std::not_fn

2023-05-22 Thread François Dumont via Gcc-patches
I was thinking that it might be nice to get rid of predefined_ops.h content. So here is a start with __negate. Drawback is that stl_algo.h has to include . For now I just get rid of stl_algo.h include in to rather use stl_algobase.h. But maybe it would be better to also isolate std::not_fn in

Re: [PATCH] Replace __gnu_cxx::__ops::__negate with std::not_fn

2023-05-23 Thread François Dumont via Gcc-patches
On 22/05/2023 22:55, Jonathan Wakely wrote: On Mon, 22 May 2023 at 21:51, François Dumont via Libstdc++ mailto:libstdc%2b...@gcc.gnu.org>> wrote: I was thinking that it might be nice to get rid of predefined_ops.h content. So here is a start with __negate. Drawback i

<    3   4   5   6   7   8   9   10   11   >