[PATCH] Add -Og optimization level - optimize for compile-time/debugging experience

Ian Lance Taylor iant@google.com
Tue Sep 18 17:29:00 GMT 2012


On Tue, Sep 18, 2012 at 4:23 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> 2012-09-18  Richard Guenther  <rguenther@suse.de>
>
>         PR other/53316
>         * common.opt (optimize_debug): New variable.
>         (Og): New optimization level.
>         * doc/invoke.texi (Og): Document.
>         * opts.c (maybe_default_option): Add debug parameter.
>         (maybe_default_options): Likewise.
>         (default_options_optimization): Handle -Og.
>         (common_handle_option): Likewise.
>         * passes.c (gate_all_optimizations): Do not run with -Og.
>         (gate_all_optimizations_g): New gate, run with -Og.
>         (pass_all_optimizations_g): New container pass, run with -Og.
>         (init_optimization_passes): Schedule pass_all_optimizations_g
>         alongside pass_all_optimizations.
>
>         * gcc/testsuite/lib/c-torture.exp: Add -Og -g to default
>         TORTURE_OPTIONS.

This looks good to me.

Thanks for working on it.

Ian



More information about the Gcc-patches mailing list