[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2023-05-29 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|11.4|11.5

--- Comment #8 from Jakub Jelinek  ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.

[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2022-10-12 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

Iain Buclaw  changed:

   What|Removed |Added

 CC||witold.baryluk+gcc at gmail 
dot co
   ||m

--- Comment #7 from Iain Buclaw  ---
*** Bug 107241 has been marked as a duplicate of this bug. ***

[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2022-08-09 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

--- Comment #6 from Iain Buclaw  ---
r13-2002 (and r12-8673) is a start that sows the seeds to make the codegen
option -fno-weak-templates the default.  Should just be a case of extending the
forced emission to all instantiations too.

[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2022-04-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|11.3|11.4

--- Comment #5 from Richard Biener  ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.

[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2022-01-31 Thread siarhei.siamashka at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

--- Comment #4 from Siarhei Siamashka  ---
First of all, it's my own fault for not just bisecting the GDC code from the
day one to figure out all the relevant details many months earlier. The code is
large and takes a lot of time to compile, so I was lazy. And I apologise for
this.

Now comments from 
https://forum.dlang.org/thread/sspkdp$1m4n$1...@digitalmars.com
provided some missing bits of important information. I may be still wrong, so
please correct me if necessary, but the root cause of this performance
regression appears to be an attempt to fix the actual problem PR104317 in GDC11
via some excessively invasive PR99914 that ended up evolving GDC in a wrong
direction.

Just imagine someone encountering something like the examples from
https://stackoverflow.com/questions/3691835/why-uninitialized-global-variable-is-weak-symbol
and then suddenly making a strange conclusion that all template functions
should be non-inlineable in a C++ compiler (unless LTO is enabled). Looks like
that's exactly what happened to GDC. The D language standard documentation is
incomplete and this isn't helping. But the developers of the other D compilers
seem to have an opinion that inlining template functions is okay (due to the
same or at least similar ODR rules as in C++).

[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2021-12-08 Thread siarhei.siamashka at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

--- Comment #3 from Siarhei Siamashka  ---
Thanks for the explanations. Is there a small example, which demonstrates
templates inlining causing a real practical problem for older versions of GDC?
A link to a bugtracker, commit message, post in a mailing list, forum or any
other source of information would be very much welcome. How is LDC able to
workaround this without sacrificing templates inlining and without enforcing
the use of LTO?

Also it's good to know about `-fno-weak-templates`. If it just reverts to the
old behaviour, then it's probably somewhat less risky than `-flto` for those,
who are just upgrading from the older versions of GDC and don't want any
unexpected surprises.

[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2021-11-05 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

--- Comment #2 from Iain Buclaw  ---
D semantics for template symbols is that they must be overridable - even by
normal global symbols.

So in version 11.1, the default linkage for templates was switched over to
weak, and with that, you can't safely inline them without violating ODR.

To revert to the old behaviour, use `-fno-weak-templates`.

[Bug d/102765] [11 Regression] GDC11 stopped inlining library functions and lambdas used by a binary search one-liner code

2021-11-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102765

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.3

--- Comment #1 from Richard Biener  ---
Inline heuristics were changed from 10 -> 11, I suspect trunk (GCC 12) is still
affected?