This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] i386: Use the STC bb-reorder algorithm at -Os (PR67864)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ubizjak at gmail dot com
- Date: Fri, 6 Nov 2015 20:34:51 -0600
- Subject: Re: [PATCH] i386: Use the STC bb-reorder algorithm at -Os (PR67864)
- Authentication-results: sourceware.org; auth=none
- References: <7df58e7242a5b4b86f36beba93e4b10d31cbb18f dot 1444999379 dot git dot segher at kernel dot crashing dot org>
Adding x86 maintainer, ping?
On Fri, Oct 16, 2015 at 05:53:41AM -0700, Segher Boessenkool wrote:
> For x86, STC still gives better results for optimise-for-size than
> "simple" does. So use STC at -Os as well.
>
> Is this okay for trunk?
>
>
> Segher
>
>
> 2015-10-16 Segher Boessenkool <segher@kernel.crashing.org>
>
> PR rtl-optimization/67864
> * common/config/i386/i386-common.c (ix86_option_optimization_table)
> <OPT_freorder_blocks_algorithm_>: Use REORDER_BLOCKS_ALGORITHM_STC
> at -Os and up.
>
> ---
> gcc/common/config/i386/i386-common.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c
> index 79b2472..bb9f29c 100644
> --- a/gcc/common/config/i386/i386-common.c
> +++ b/gcc/common/config/i386/i386-common.c
> @@ -1011,6 +1011,9 @@ static const struct default_options ix86_option_optimization_table[] =
> { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
> /* Enable function splitting at -O2 and higher. */
> { OPT_LEVELS_2_PLUS, OPT_freorder_blocks_and_partition, NULL, 1 },
> + /* The STC algorithm produces the smallest code at -Os, for x86. */
> + { OPT_LEVELS_2_PLUS, OPT_freorder_blocks_algorithm_, NULL,
> + REORDER_BLOCKS_ALGORITHM_STC },
> /* Turn off -fschedule-insns by default. It tends to make the
> problem with not enough registers even worse. */
> { OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 },
> --
> 2.4.3