This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/86590] Codegen is poor when passing std::string by value with _GLIBCXX_EXTERN_TEMPLATE undefined


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86590

--- Comment #30 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The thing is that even with the foo that doesn't contain all those
__builtin_constant_p 's after early inlining, we with -std=c++17 -O3 don't
inline for some reason _M_construct.constprop, while we do inline it with
-std=c++14.

With -std=c++14 -O3 we are considering inlining _M_construct.constprop 4 times,
into basic_string ctor twice and into foo twice, with -std=c++17 -O3 only 2
times, both into the ctor.
Richard or Honza, can you please find out why the inliner doesn't consider
inlining it into foo?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]