This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [EXT] Re: Option processing question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]