[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #15 from Luke Dalessandro --- (In reply to Jonathan Wakely from comment #5) > > IMO the ideal solution is for GCC to stop using whether a function is inline > as an optimisation hint. Then we wouldn't need some extra GCC-specific

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-05-05 Thread elrodc at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #14 from Chris Elrod --- To me, an "inline" function is one that the compiler inlines. It just happens that the `inline` keyword also means both comdat semantics, and possibly hiding the symbol to make it internal

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-05-05 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #13 from Eric Gallager --- (In reply to Jonathan Wakely from comment #12) > There's nothing fake about them, they are definitely inline functions as far > as the language rules. But in some cases we don't want the compiler to use >

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-05-04 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #12 from Jonathan Wakely --- There's nothing fake about them, they are definitely inline functions as far as the language rules. But in some cases we don't want the compiler to use that fact as an optimisation hint.

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-05-04 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #11 from Eric Gallager --- (In reply to Jan Hubicka from comment #8) > Reading the discussion again, I don't think we have a way to make inline > keyword ignored by inliner. We can make not_really_inline attribute (better > name

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-04-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #10 from Jonathan Wakely --- N.B. If you're going to do any more profiling + optimizing of std::vector, please do it with -std=gnu++20 so that everything is constexpr. Otherwise you're only testing C++17 which is the last version

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-04-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #9 from Jonathan Wakely --- Another solution is just to use __builtin_expect or [[likely]] or [[unlikely]] at the call site. That wouldn't need any compiler changes.

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-04-22 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #8 from Jan Hubicka --- Note that cold attribute is also quite strong since it turns optimize_size codegen that is often a lot slower. Reading the discussion again, I don't think we have a way to make inline keyword ignored by

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-04-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #7 from Jonathan Wakely --- I think we might want to add __attribute__((cold)) to std::vector functions that are now implicitly inline due to the addition of `constexpr`. We probably don't want to use noinline as that's too strong.

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2021-11-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2020-11-08 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #6 from Jan Hubicka --- I just noticed this PR and wonder if there is anything to do on inliner side. It uses DECL_DECLARED_INLINE that was invented to distinguish between implicit inlines and explicit ones. So even if it would be

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2019-12-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #5 from Jonathan Wakely --- But it wouldn't be redundant for GCC, it would have a different, non-portable meaning. Does it say "inline constexpr" because the code was written by someone who likes redundancy for the sake of

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2019-12-21 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #4 from Eric Gallager --- (In reply to Jonathan Wakely from comment #3) > (In reply to Eric Gallager from comment #2) > > I would prefer this second approach. > > The downside of it is that it requires adding a keyword that the

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2019-12-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #3 from Jonathan Wakely --- (In reply to Eric Gallager from comment #2) > I would prefer this second approach. The downside of it is that it requires adding a keyword that the standard says is completely redundant, in order to get

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2019-12-21 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2019-12-19 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 Jakub Jelinek changed: What|Removed |Added CC||hubicka at gcc dot gnu.org,