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?

Gary
________________________________
From: Richard Biener <richard.guent...@gmail.com>
Sent: Monday, January 13, 2020 2:30 AM
To: Gary Oblock <gobl...@marvell.com>; Jan Hubicka <hubi...@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 <gobl...@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

Reply via email to