From: Jan Hubicka <hubicka@kam.mff.cuni.cz>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: gcc-patches@gcc.gnu.org, Artem Klimov <jakmobius@gmail.com>
Subject: Re: [PATCH] ipa-visibility: Optimize TLS access [PR99619]
Date: Wed, 25 May 2022 11:04:38 +0200 [thread overview]
Message-ID: <Yo3xJmDOoiGgGbs4@kam.mff.cuni.cz> (raw)
In-Reply-To: <2533523c-2fa4-806a-6eeb-bda9813912b9@ispras.ru>
> On Mon, 16 May 2022, Alexander Monakov wrote:
>
> > On Mon, 9 May 2022, Jan Hubicka wrote:
> >
> > > > On second thought, it might be better to keep the assert, and place the loop
> > > > under 'if (optimize)'?
> > >
> > > The problem is that at IPA level it does not make sense to check
> > > optimize flag as it is function specific. (shlib is OK to check it
> > > anywhere since it is global.)
> > >
> > > So I think we really want to run the code only at the WPA time
> > > (symtab_state>=IPA_SSA) and we want to see what is optimization flag of
> > > those function referring the variable since that is what decided codegen
> > > we will produce.
> >
> > Perhaps I misunderstood the issue. Are you saying that there might be no -O
> > option on lto1 command line, because lto1 is supposed to take optimization
> > level from function summaries, but during pass_ipa_whole_program_visibility
> > there's no "current function" so 'optimize' is at its default value (zero)?
> >
> > And the solution is to iterate over referring functions to see if at least
> > one of them satisfies 'opt_for_fn (decl, optimize) > 0'?
>
> Do you want to see a patch implementing the above solution?
Yes, I think it is correct solution here...
Thanks,
Honza
>
> Alexander
next prev parent reply other threads:[~2022-05-25 9:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-17 18:51 Artem Klimov
2022-05-02 8:51 ` Alexander Monakov
2022-05-02 16:04 ` Martin Jambor
2022-05-02 16:43 ` Alexander Monakov
2022-05-09 16:06 ` Alexander Monakov
2022-05-09 16:47 ` Jan Hubicka
2022-05-09 17:15 ` Alexander Monakov
2022-05-16 15:50 ` Alexander Monakov
2022-05-23 10:56 ` Alexander Monakov
2022-05-25 9:04 ` Jan Hubicka [this message]
2022-07-07 15:53 ` [PATCH v2] " Alexander Monakov
2022-07-20 13:04 ` Alexander Monakov
2022-08-05 14:03 ` Alexander Monakov
2022-08-23 15:27 ` Alexander Monakov
2022-08-26 11:32 ` Martin Jambor
2022-08-26 13:35 ` Alexander Monakov
2022-08-30 11:44 ` Martin Jambor
2022-08-30 13:19 ` Alexander Monakov
2022-08-30 14:03 ` Alexander Monakov
2022-09-05 10:39 ` Martin Jambor
2022-05-02 19:28 ` [PATCH] " Martin Liška
2022-05-05 10:50 ` Jan Hubicka
2022-05-05 11:50 ` Alexander Monakov
2022-05-05 11:56 ` Jan Hubicka
2022-05-05 14:41 ` Alexander Monakov
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=Yo3xJmDOoiGgGbs4@kam.mff.cuni.cz \
--to=hubicka@kam.mff.cuni.cz \
--cc=amonakov@ispras.ru \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakmobius@gmail.com \
/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).