public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/77443] Empty initializer on huge object array member slow down the compilation dramatically with -O1
       [not found] <bug-77443-4@http.gcc.gnu.org/bugzilla/>
@ 2021-05-07  7:38 ` xry111 at mengyan1223 dot wang
  2021-05-07  7:59 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-05-07  7:38 UTC (permalink / raw)
  To: gcc-bugs

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

Xi Ruoyao <xry111 at mengyan1223 dot wang> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xry111 at mengyan1223 dot wang

--- Comment #2 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
*** Bug 100466 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/77443] Empty initializer on huge object array member slow down the compilation dramatically with -O1
       [not found] <bug-77443-4@http.gcc.gnu.org/bugzilla/>
  2021-05-07  7:38 ` [Bug c++/77443] Empty initializer on huge object array member slow down the compilation dramatically with -O1 xry111 at mengyan1223 dot wang
@ 2021-05-07  7:59 ` rguenth at gcc dot gnu.org
  2021-05-07  8:31 ` jakub at gcc dot gnu.org
  2021-05-28  7:29 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-07  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-05-07
     Ever confirmed|0                           |1
      Known to fail|                            |12.0
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Re-confirmed.  I really wonder how difficult it is to emit a loop from the FE
...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/77443] Empty initializer on huge object array member slow down the compilation dramatically with -O1
       [not found] <bug-77443-4@http.gcc.gnu.org/bugzilla/>
  2021-05-07  7:38 ` [Bug c++/77443] Empty initializer on huge object array member slow down the compilation dramatically with -O1 xry111 at mengyan1223 dot wang
  2021-05-07  7:59 ` rguenth at gcc dot gnu.org
@ 2021-05-07  8:31 ` jakub at gcc dot gnu.org
  2021-05-28  7:29 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-07  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Various cases like that have been over the years solved with RANGE_EXPRs in the
initializers, which we during gimplification sometimes decide to emit using
loops.
I think a problem with that in this case is that we have
{TARGET_EXPR <D.62426, <<< Unknown tree: aggr_init_expr
  4
  __ct_comp
  D.62426
  (struct MyObject *) <<< Unknown tree: void_cst >>> >>>>, TARGET_EXPR
<D.62427, <<< Unknown tree: aggr_init_expr
  4
  __ct_comp
  D.62427
  (struct MyObject *) <<< Unknown tree: void_cst >>> >>>>, TARGET_EXPR
<D.62428, <<< Unknown tree: aggr_init_expr
  4
  __ct_comp
  D.62428
  (struct MyObject *) <<< Unknown tree: void_cst >>> >>>>, ... }
and using a RANGE_EXPR for that in the CONSTRUCTOR would mean we'd construct
once and bitwise copy to all the elements in the range.  That would be valid
for this particular testcase because the constructor does nothing, but not
generally valid for arbitrary constructors.
So, either we need a different syntax or say some flag on RANGE_EXPR that would
tell that rather than computing the value once and copying to every element in
the range we need to either initialize in a loop where we construct those
elements inside of the loop, or, if we decide not to emit a loop (e.g. because
it is just very few elts), duplicate the construction the way it is seen in the
above snippet.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/77443] Empty initializer on huge object array member slow down the compilation dramatically with -O1
       [not found] <bug-77443-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-05-07  8:31 ` jakub at gcc dot gnu.org
@ 2021-05-28  7:29 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-28  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a dup of bug 61592.

*** This bug has been marked as a duplicate of bug 61592 ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-28  7:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-77443-4@http.gcc.gnu.org/bugzilla/>
2021-05-07  7:38 ` [Bug c++/77443] Empty initializer on huge object array member slow down the compilation dramatically with -O1 xry111 at mengyan1223 dot wang
2021-05-07  7:59 ` rguenth at gcc dot gnu.org
2021-05-07  8:31 ` jakub at gcc dot gnu.org
2021-05-28  7:29 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).