[Bug libstdc++/102221] Missed optimizations for algorithms over std::unique_ptr

2021-12-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102221 Andrew Pinski changed: What|Removed |Added Keywords||alias Severity|normal

[Bug libstdc++/102221] Missed optimizations for algorithms over std::unique_ptr

2021-12-09 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102221 --- Comment #6 from Giuseppe D'Angelo --- Hi, (Sorry for chiming in after all this time); given this might not entirely be libstdc++ related (cf. the latest testcase), would it be possible for someone on the optimizer to gave their opinion?

[Bug libstdc++/102221] Missed optimizations for algorithms over std::unique_ptr

2021-09-09 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102221 --- Comment #5 from Giuseppe D'Angelo --- Here's a further testcase that doesn't even use unique_ptr: #include #include using ptr = int *; using rawptr = int *; #ifndef RESTRICT #define RESTRICT #endif void swap(ptr & RESTRICT a, ptr & RE

[Bug libstdc++/102221] Missed optimizations for algorithms over std::unique_ptr

2021-09-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102221 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #1) > This comes from the construction of a local unique_ptr variable in: > > template > _GLIBCXX20_CONSTEXPR > void > __unguarded_linear_insert(_Ra

[Bug libstdc++/102221] Missed optimizations for algorithms over std::unique_ptr

2021-09-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102221 --- Comment #3 from Jonathan Wakely --- (In reply to Giuseppe D'Angelo from comment #2) > Hi, > > Thanks for the analysis! > > That basically allows me to reduce the testcase to something as simple as a > swap: Yes. The actual swaps done by s

[Bug libstdc++/102221] Missed optimizations for algorithms over std::unique_ptr

2021-09-08 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102221 --- Comment #2 from Giuseppe D'Angelo --- Hi, Thanks for the analysis! That basically allows me to reduce the testcase to something as simple as a swap: #include #include #if defined(SMART) using ptr = std::unique_ptr; #else using ptr = i

[Bug libstdc++/102221] Missed optimizations for algorithms over std::unique_ptr

2021-09-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102221 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|