public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/109753] [13/14 Regression] pragma GCC target causes std::vector not to compile (always_inline on constructor)
Date: Thu, 11 Jan 2024 12:59:24 +0000	[thread overview]
Message-ID: <bug-109753-4-modPdpsmFv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109753-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #14 from Jan Hubicka <hubicka at ucw dot cz> ---
> I think the issue might be that whoever is creating
> __static_initialization_and_destruction_0 fails to honor the active
> target pragma.  Which means back to my suggestion to have multiple ones
> when different target options are on the individual CTORs and any of them
> have always-inline (with always-inline we can't rely on an out-of-line copy
> to exist).

If I remember right, __static_initialization_and_destruction_0 call all
static constructors of priority 0. So it has really no active pragma
since it may change across translation unit.

We also have similar code in IPA where we collect constructors
across whole program.  Motivation was to get them inlined and obtain
better code locality. Back then Firefox had iostram constructor in every
object file and those ctors made whole text segment to be loaded on
demand during startup.

Probably correct solution would be to group construtor into groups by
compatible optimization/target pgramas in the inliner's definition.
A quick hack would be to generate wrapper calls which will "eat" the
always inline...

  parent reply	other threads:[~2024-01-11 12:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 21:30 [Bug c++/109753] New: pragma GCC target stops std::vector from compiling magnus.hegdahl at gmail dot com
2023-05-05 21:36 ` [Bug target/109753] [13/14 Regression] " pinskia at gcc dot gnu.org
2023-05-05 21:43 ` pinskia at gcc dot gnu.org
2023-05-05 22:38 ` pinskia at gcc dot gnu.org
2023-05-05 22:44 ` mpolacek at gcc dot gnu.org
2023-05-05 22:48 ` pinskia at gcc dot gnu.org
2023-05-06  0:12 ` [Bug target/109753] [13/14 Regression] pragma GCC target causes std::vector not to compile (always_inline on constructor) pinskia at gcc dot gnu.org
2023-05-08  7:04 ` [Bug c++/109753] " rguenth at gcc dot gnu.org
2023-07-15 22:41 ` xry111 at gcc dot gnu.org
2023-07-15 22:43 ` xry111 at gcc dot gnu.org
2023-07-17  8:33 ` rguenth at gcc dot gnu.org
2023-07-27  9:26 ` rguenth at gcc dot gnu.org
2024-01-10 17:35 ` jamborm at gcc dot gnu.org
2024-01-10 19:02 ` hubicka at gcc dot gnu.org
2024-01-11  8:09 ` rguenth at gcc dot gnu.org
2024-01-11 12:59 ` hubicka at ucw dot cz [this message]
2024-02-14 22:13 ` jason at gcc dot gnu.org
2024-03-14 20:34 ` jason at gcc dot gnu.org
2024-05-08 13:46 ` [Bug c++/109753] [13/14/15 " jason at gcc dot gnu.org
2024-05-21  9:14 ` jakub at gcc dot gnu.org
2024-05-29 13:51 ` cvs-commit at gcc dot gnu.org
2024-05-29 13:55 ` [Bug c++/109753] [13/14 " jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109753-4-modPdpsmFv@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).