[Bug libstdc++/110287] _M_check_len is expensive

2024-12-19 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 Jan Hubicka changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug libstdc++/110287] _M_check_len is expensive

2023-11-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 Bug 110287 depends on bug 112653, which changed state. Bug 112653 Summary: PTA should handle correctly escape information of values returned by a function https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112653 What|Removed

[Bug libstdc++/110287] _M_check_len is expensive

2023-11-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 Bug 110287 depends on bug 112706, which changed state. Bug 112706 Summary: missed simplification in FRE https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112706 What|Removed |Added --

[Bug libstdc++/110287] _M_check_len is expensive

2023-11-21 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 Bug 110287 depends on bug 110377, which changed state. Bug 110377 Summary: Early VRP and IPA-PROP should work out value ranges from __builtin_unreachable https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110377 What|Removed

[Bug libstdc++/110287] _M_check_len is expensive

2023-11-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #11 from CVS Commits --- The master branch has been updated by Jan Hubicka : https://gcc.gnu.org/g:1d82fc2e6824bf83159389729c31a942f7b91b04 commit r14-5679-g1d82fc2e6824bf83159389729c31a942f7b91b04 Author: Jan Hubicka Date: Tue

[Bug libstdc++/110287] _M_check_len is expensive

2023-11-21 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 Jan Hubicka changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug libstdc++/110287] _M_check_len is expensive

2023-11-19 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #9 from Jan Hubicka --- This is _M_realloc insert at release_ssa time: eleased 63 names, 165.79%, removed 63 holes void std::vector::_M_realloc_insert (struct vector * const this, struct iterator __position, const struct pair_t & __

[Bug libstdc++/110287] _M_check_len is expensive

2023-11-19 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #8 from Jan Hubicka --- With return value range propagation https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637265.html reduces --param max-inline-insns-auto needed for _M_realloc_insert to be inlined on my testcase from 39 t

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-23 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 Bug 110287 depends on bug 110289, which changed state. Bug 110289 Summary: Phiprop may be good idea in early opts https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110289 What|Removed |Added

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-19 Thread hubicka at ucw dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #7 from Jan Hubicka --- > > There is no guarantee that std::vector::max_size() is PTRDIFF_MAX. It > depends on the Allocator type, A. A user-defined allocator could have > max_size() == 100. If inliner we see path to the throw func

Re: [Bug libstdc++/110287] _M_check_len is expensive

2023-06-19 Thread Jan Hubicka via Gcc-bugs
> > There is no guarantee that std::vector::max_size() is PTRDIFF_MAX. It > depends on the Allocator type, A. A user-defined allocator could have > max_size() == 100. If inliner we see path to the throw functions, it will not determine _M_check_len as early inlinable. Perhaps we can __builtin_con

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #6 from Jonathan Wakely --- (In reply to Jan Hubicka from comment #5) > > Do you mean something like this? > I sent my own version, but yours looks nicer. > > > > diff --git a/libstdc++-v3/include/bits/stl_vector.h > > b/libstdc++-v

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-18 Thread hubicka at ucw dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #5 from Jan Hubicka --- > Do you mean something like this? I sent my own version, but yours looks nicer. > > diff --git a/libstdc++-v3/include/bits/stl_vector.h > b/libstdc++-v3/include/bits/stl_vector.h > index 70ced3d101f..a4dbfeb

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #3) > @@ -946,7 +945,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER >else > { > const size_type __len = > - _M_check_len(size_type(1),

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #3 from Jonathan Wakely --- Do you mean something like this? diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 70ced3d101f..a4dbfeb8b5b 100644 --- a/libstdc++-v3/include/bits/stl_vect

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-16 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #2 from Jan Hubicka --- With patch in PR110289 to optimize the std::max int MAX_EXPR and the throw commented out I get: size_type std::vector >::_M_check_len (const struct vector * const this, size_type __n, const char * __s) { co

[Bug libstdc++/110287] _M_check_len is expensive

2023-06-16 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110287 --- Comment #1 from Jan Hubicka --- Another problem is: D.27747 = _8; if (__n.3_2 > _8) goto ; [34.00%] else goto ; [66.00%] [local count: 364926196]: [local count: 1073312330]: # _18 = PHI <&D.27747(4), &__n(5)> _3 =