[Bug c++/94960] extern template prevents inlining of standard library objects

2024-12-13 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960 --- Comment #10 from Jan Hubicka --- Note that passing function body to middle-end does not only enable inlining, but other optimizations too. Often ipa-modref is able to summarize side effects of the function and enables more optimization, since

[Bug c++/94960] extern template prevents inlining of standard library objects

2022-02-17 Thread erich.keane at intel dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960 --- Comment #9 from Erich Keane --- > But in C++20 every function is 'constexpr' now, so every function is inline > anyway, right? Even the large functions that aren't good candidates for > inlining (see also PR 93008). So The 'inline' keyword ha

[Bug c++/94960] extern template prevents inlining of standard library objects

2022-02-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960 --- Comment #8 from Jonathan Wakely --- (In reply to Erich Keane from comment #6) > (In reply to Jonathan Wakely from comment #5) > > And if we have to mark every single function as 'inline' then maybe the > > compiler shouldn't be using it as a

[Bug c++/94960] extern template prevents inlining of standard library objects

2022-02-17 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960 --- Comment #7 from Jason Merrill --- C++17 and below said, Except for inline functions and variables, declarations with types deduced from their initializer or return value (10.1.7.4), const variables of literal types, variables of reference t

[Bug c++/94960] extern template prevents inlining of standard library objects

2020-05-06 Thread erich.keane at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960 --- Comment #6 from Erich Keane --- (In reply to Jonathan Wakely from comment #5) > (In reply to Erich Keane from comment #3) > > As you know, "extern template" is a hint to the compiler that we don't need > > to emit the template as a way to sav

[Bug c++/94960] extern template prevents inlining of standard library objects

2020-05-06 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960 --- Comment #5 from Jonathan Wakely --- (In reply to Erich Keane from comment #3) > As you know, "extern template" is a hint to the compiler that we don't need > to emit the template as a way to save on compile time. > > Both GCC and clang will

[Bug c++/94960] extern template prevents inlining of standard library objects

2020-05-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960 Richard Biener changed: What|Removed |Added CC||hubicka at gcc dot gnu.org,