[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2021-10-05 Thread nisse at lysator dot liu.se via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #11 from Niels Möller --- Here's a bit more docs on using std::unique_ptr [[clang::trivial_abi]] with clang and its C++ library. https://libcxx.llvm.org//DesignDocs/UniquePtrTrivialAbi.html As for "No, it needs co-operation between

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-11-05 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #10 from Niels Möller --- I was just made aware of this paper: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1863r0.pdf arguing that C++ standards community and implementers ought to decide on how to prioritize C++ perfor

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #9 from Marc Glisse --- (In reply to Jonathan Wakely from comment #8) > you'd still need a change to the Itanium ABI. Or an attribute like [[clang::trivial_abi]], or the one that p1029 is trying to standardize. But since we would nee

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #8 from Jonathan Wakely --- Yes, when configured with --enable-symvers=gnu-versioned-namespace But that's just for the library, you'd still need a change to the Itanium ABI.

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #7 from Marc Glisse --- (In reply to Jonathan Wakely from comment #6) > libstdc++ would not take > advantage of it because it would break the library's stable ABI. There is always this mode (is it _GLIBCXX_INLINE_VERSION? I thought I

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #6 from Jonathan Wakely --- No, it needs co-operation between G++ and all other compilers using the same ABI, which makes it out of scope for GCC's bugzilla. G++ cannot unilaterally change the ABI here, and even if we could, libstdc++

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #5 from Niels Möller --- (In reply to Jonathan Wakely from comment #4) > Why wouldn't you take unique_ptr&& instead of passing by value? Because passing unique_ptr (and other move-only types) by value seems to be the mainstream idiom

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #3 from Marc Glisse --- (In reply to Niels Möller from comment #2) > (In reply to Jonathan Wakely from comment #1) > > The ABI dictates the calling conventions and there's certainly nothing that > > libstdc++ can do about it. > > My

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-06 Thread nisse at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #2 from Niels Möller --- (In reply to Jonathan Wakely from comment #1) > The ABI dictates the calling conventions and there's certainly nothing that > libstdc++ can do about it. My impression was that C++ ABI is under the control of

[Bug libstdc++/91356] Poor optimization of calls involving std::unique_ptr

2019-08-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91356 --- Comment #1 from Jonathan Wakely --- The ABI dictates the calling conventions and there's certainly nothing that libstdc++ can do about it. In any case, how common is it to have a pointless non-inline baz function which does nothing but forwa