From: Jan Hubicka <hubicka@ucw.cz>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] tree-optimization/109304 - properly handle instrumented aliases
Date: Tue, 18 Apr 2023 18:18:56 +0200 [thread overview]
Message-ID: <ZD7C8Jk5bBztfHZH@kam.mff.cuni.cz> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2304170631500.4466@jbgna.fhfr.qr>
> >
> > I do not think LTO is of any help here. You can allways call non-LTO
> > const function from outer-world and that function can will end up
> > calling back to instrumented const function in your unit which
> > effectively makes the extenral const function non-const.
>
> Hmm, true.
>
> > >
> > > That said, when there's a definition of say strlen in a TU and
> > > that's instrumented we do want to drop pure from calls but if
> > > not then we shouldn't worry.
> > >
> > > Without LTO we'd still run into coverage issues but at least
> > > with LTO we shouldn't ICE?
> >
> > I am not sure I see your point here...
> > We could avoid demoting builtins to avoid ICEs and have coverage
> > mismathces, but how LTO makes difference?
>
> At least we get more functions local, but yes, we can still trigger
> the issue.
>
> So what's the solution? All functions that are not leaf or possibly
> instrumented have to be called as if they were not pure/const,
> including builtins? As we've said we're going to ICE quite a bit
> when const/pure builtins suddenly are no longer const/pure.
Yep, I can't think of any easier solution than handling all functions as
not pure/const as soon as something instrumented is ever inlined to a
given function. For builtins this is fun indeed. We can special case
those that are always expanded inline at least...
Honza
>
> Richard.
next prev parent reply other threads:[~2023-04-18 16:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 7:20 Richard Biener
2023-04-03 23:21 ` Jan Hubicka
2023-04-04 8:26 ` Jakub Jelinek
2023-04-04 10:14 ` Jan Hubicka
2023-04-11 8:21 ` Richard Biener
2023-04-11 8:15 ` Richard Biener
2023-04-14 19:12 ` Jan Hubicka
2023-04-17 6:35 ` Richard Biener
2023-04-18 16:18 ` Jan Hubicka [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-28 8:06 Richard Biener
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=ZD7C8Jk5bBztfHZH@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--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).