[EXT] Re: Option processing question

Gary Oblock goblock@marvell.com
Mon Jan 13 23:32:00 GMT 2020

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?

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).


> Many thanks,
> Gary

More information about the Gcc mailing list