From: Richard Biener <richard.guenther@gmail.com>
To: Gary Oblock <goblock@marvell.com>
Cc: Jan Hubicka <hubicka@ucw.cz>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: [EXT] Re: Option processing question
Date: Tue, 14 Jan 2020 10:29:00 -0000 [thread overview]
Message-ID: <CAFiYyc326-4j7aMMGLEMJN2U_n0P8b_G4OyDNDgX1eLo2mZTGQ@mail.gmail.com> (raw)
In-Reply-To: <BY5PR18MB34098A0AEE7D3C90BDA5985AB9350@BY5PR18MB3409.namprd18.prod.outlook.com>
On Mon, Jan 13, 2020 at 9:28 PM Gary Oblock <goblock@marvell.com> wrote:
>
> If I have an optimization set up to run in LTO (call it my_opt) and
> the flags -flto-partition=one, -flto options and -fmy-opt are set
> then the optimization might or might not be run depending of whether
> it can all fit in one partition.
>
> What I'm thinking is as long as it's a fatal error detectable anywhere
> upstream in the compilation to not specify -fmy-opt without -flto-partition=one
> then all will be well. So how do I detect it at all and where would I put the checking?
I guess you could always check the symbols used_from_other_partition
and/or in_other_partition flags? That is, it might be perfectly possible
for some corner-cases to do the transform independently with more than one
partition if the partitioning happens to isolate things perfectly?
Richard.
> Gary
> ________________________________
> From: Richard Biener <richard.guenther@gmail.com>
> Sent: Monday, January 13, 2020 2:30 AM
> To: Gary Oblock <goblock@marvell.com>; Jan Hubicka <hubicka@ucw.cz>
> Cc: gcc@gcc.gnu.org <gcc@gcc.gnu.org>
> Subject: [EXT] Re: Option processing question
>
> External Email
>
> ----------------------------------------------------------------------
> On Sat, Jan 11, 2020 at 4:47 AM Gary Oblock <goblock@marvell.com> wrote:
> >
> > I'm writing an LTO optimization that requires "-flto-partition=one" How can I make
> > sure that this is the case? I've spent hours greping the code and the Internals Doc is
> > worth less than nothing for something like this.
>
> That's of course because you shouldn't be doing this ;)
>
> > If you have an answer or even
> > I good idea of where to look please let me know. Note, for an normal "-fbalh" there's
> > a flag_blah that I could look at but for this there seems to be zip, nil, diddly squat, etc.
>
> At LTRANS time you indeed don't know.
>
> But there's -flto-partition=none (none, not one), that you can detect somehow
> (I think in_lto_p && !flag_ltrans && !flag_wpa).
>
> Richard.
>
> > Many thanks,
> >
> > Gary
next prev parent reply other threads:[~2020-01-14 8:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-11 3:47 Gary Oblock
2020-01-11 4:49 ` Prathamesh Kulkarni
2020-01-13 14:01 ` Richard Biener
2020-01-13 23:32 ` [EXT] " Gary Oblock
2020-01-14 10:29 ` Richard Biener [this message]
2020-01-14 10:34 ` 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=CAFiYyc326-4j7aMMGLEMJN2U_n0P8b_G4OyDNDgX1eLo2mZTGQ@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=goblock@marvell.com \
--cc=hubicka@ucw.cz \
/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).