public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor
       [not found] <bug-84411-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-25 12:16 ` pinskia at gcc dot gnu.org
  2024-03-16 23:18 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-25 12:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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

* [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor
       [not found] <bug-84411-4@http.gcc.gnu.org/bugzilla/>
  2021-12-25 12:16 ` [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor pinskia at gcc dot gnu.org
@ 2024-03-16 23:18 ` pinskia at gcc dot gnu.org
  2024-03-16 23:18 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-16 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |19661
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-03-16
     Ever confirmed|0                           |1
                 CC|                            |pinskia at gcc dot gnu.org

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This depends on PR 19661.

But then we still need to remove:
  <bb 2> [local count: 1073741824]:
  _1 = __atomic_load_1 (&_ZGVZ8get_basevE1d, 2);
  if (_1 == 0)
    goto <bb 4>; [33.00%]
  else
    goto <bb 3>; [67.00%]
  <bb 3> [local count: 956811341]:
  goto <bb 6>; [100.00%]

  <bb 4> [local count: 354334800]:
  _2 = __cxa_guard_acquire (&_ZGVZ8get_basevE1d);
  if (_2 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 3>; [67.00%]

  <bb 5> [local count: 116930483]:
  __cxa_guard_release (&_ZGVZ8get_basevE1d);


Note clang/LLVM does not remove the use of the guard here either, even though
it does remove the __cxa_atexit.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19661
[Bug 19661] unnecessary atexit calls emitted for static objects with empty
destructors

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

* [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor
       [not found] <bug-84411-4@http.gcc.gnu.org/bugzilla/>
  2021-12-25 12:16 ` [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor pinskia at gcc dot gnu.org
  2024-03-16 23:18 ` pinskia at gcc dot gnu.org
@ 2024-03-16 23:18 ` pinskia at gcc dot gnu.org
  2024-03-17  0:05 ` pinskia at gcc dot gnu.org
  2024-05-07 21:47 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-16 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |barry.revzin at gmail dot com

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 109268 has been marked as a duplicate of this bug. ***

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

* [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor
       [not found] <bug-84411-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2024-03-16 23:18 ` pinskia at gcc dot gnu.org
@ 2024-03-17  0:05 ` pinskia at gcc dot gnu.org
  2024-05-07 21:47 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-17  0:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |antoshkka at gmail dot com

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 87831 has been marked as a duplicate of this bug. ***

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

* [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor
       [not found] <bug-84411-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2024-03-17  0:05 ` pinskia at gcc dot gnu.org
@ 2024-05-07 21:47 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-07 21:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84411
Bug 84411 depends on bug 19661, which changed state.

Bug 19661 Summary: unnecessary atexit calls emitted for static objects with empty destructors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19661

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

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

end of thread, other threads:[~2024-05-07 21:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-84411-4@http.gcc.gnu.org/bugzilla/>
2021-12-25 12:16 ` [Bug c++/84411] Missed optimization: static guard variable generated for empty virtual destructor pinskia at gcc dot gnu.org
2024-03-16 23:18 ` pinskia at gcc dot gnu.org
2024-03-16 23:18 ` pinskia at gcc dot gnu.org
2024-03-17  0:05 ` pinskia at gcc dot gnu.org
2024-05-07 21:47 ` 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).