From: Jakub Jelinek <jakub@redhat.com>
To: Jan Hubicka <hubicka@kam.mff.cuni.cz>
Cc: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] cgraph: Don't verify semantic_interposition flag for aliases [PR105399]
Date: Thu, 28 Apr 2022 13:57:37 +0200 [thread overview]
Message-ID: <YmqBMeAcn/Duty6t@tucnak> (raw)
In-Reply-To: <YmqAi9Qz3jlKAoB+@kam.mff.cuni.cz>
On Thu, Apr 28, 2022 at 01:54:51PM +0200, Jan Hubicka wrote:
> > --- gcc/cgraph.cc.jj 2022-04-20 09:24:12.194579146 +0200
> > +++ gcc/cgraph.cc 2022-04-27 11:53:52.102173154 +0200
> > @@ -3488,7 +3488,9 @@ cgraph_node::verify_node (void)
> > "returns a pointer");
> > error_found = true;
> > }
> > - if (definition && externally_visible
> > + if (definition
> > + && externally_visible
> > + && (!alias || thunk || !in_lto_p)
>
> The alias check seems OK to me.
> Why we need thunk? Here thunk may eventually gain a gimple body and we
> will be interested in its opt_for_fn flags. So if we do not set
> DECL_FUNCTION_SPECIFIC_OPTIMIZATION we may get unexpected surprises
> (such as blocked inlining).
I've added || thunk because free_lang_data sets DECL_FUNCTION_SPECIFIC_OPTIMIZATION
for thunks, the guarding condition is:
if (gimple_has_body_p (decl) || (node && node->thunk))
I wasn't sure if node->alias and node->thunk can be both set or not.
If they can't, I can take it out.
Jakub
next prev parent reply other threads:[~2022-04-28 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 5:46 Jakub Jelinek
2022-04-28 7:27 ` Richard Biener
2022-04-28 11:54 ` Jan Hubicka
2022-04-28 11:57 ` Jakub Jelinek [this message]
2022-04-28 12:00 ` Jan Hubicka
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=YmqBMeAcn/Duty6t@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@kam.mff.cuni.cz \
--cc=rguenther@suse.de \
/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).