gcc optimization options and lto (detailed info)

Stefan Ring stefanrin@gmail.com
Tue May 17 08:54:03 GMT 2022

On Tue, May 17, 2022 at 8:56 AM muzungu--- via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
> * does every -f<xyz> have a -fno-<xyz>?

I think that’s the idea.

> * would I be able able to disable single optimizations activated via -O<x> using -fno-<xyz> after -O<x>?


> * When LTO is enabled, are the optimizations only effective at link time and not during the compilation into IR (GIMPLE)?

I would expect them to be recorded in the intermediate object file and
becoming effective during code generation, but I am not sure about

> * Since there is a rather long list of optimization options which would very likely exceed the command line length, what is the solution to activate a custom set of optimzations? I could not find a --configfile option or similar to replace the command line.

What do you think is your maximum command line length? This should not
be a problem on any sane OS.

More information about the Gcc-help mailing list