[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2021-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #8 from Andrew Pinski --- (In reply to Marc Glisse from comment #3) > (In reply to M Welinder from comment #2) > > The destruction still stinks: the full destructor is inlined instead of > > the small-string-only version (i.e., a no-o

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 Martin Liška changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-04 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #2 from M Welinder --- Created attachment 44789 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44789&action=edit Proof-on-concept patch This proof-of-concept improves the situation dramatically. I don't know if it is actually

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-04 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #3 from Marc Glisse --- (In reply to M Welinder from comment #2) > The destruction still stinks: the full destructor is inlined instead of > the small-string-only version (i.e., a no-op). Evidently gcc cannot > see that the string re

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-05 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 Martin Liška changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment #4 fr

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-05 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #5 from Andrew Pinski --- The C++17 calling a function part of this issue is record as PR 86590 already. The rest is a different issue and should be looked into.

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-05 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #6 from M Welinder --- > const_cast(s)="some longer string so it needs proper deletion"; Is that really valid? This comes down to whether the temporary object creating with the function call is constant [in which case the above is U

[Bug libstdc++/87502] Poor code generation for std::string("c-style string")

2018-10-05 Thread terra at gnome dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87502 --- Comment #7 from M Welinder --- Actually, it's more like 50+ instructions for destructing the string that never (or almost never) needs destructing. 16 of those appear to need linker fixup. Sample for the C++14 mode: callZ3fo