On Wed, Oct 19, 2011 at 4:46 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Wed, Oct 19, 2011 at 2:26 PM, Sergey Ostanevich <sergos....@gmail.com> > wrote: > >>> You can just change the default in processor_target_table. >>> >>> Uros. >>> >> >> Will it be applicable during optimizations for size? It will hurt, >> although not much (see PR). > > Looking at the code, I'd say that we don't handle -Os in different way. > >> New patch is below. Ok for trunk as obvious? >> >> Sergos >> >> 2011-10-19 Sergey Ostanevich <sergos....@gmail.com> >> >> * gcc/config/i386/i386.c (ix86_option_override_internal): use loop >> align by 16 bytes for Atom platform > > Please update ChangeLog, like: > > * gcc/config/i386/i386.c (processor_target_table): Change Atom > align_loop_max_skip to 15. > >> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c >> index 2c53423..8c60086 100644 >> --- a/gcc/config/i386/i386.c >> +++ b/gcc/config/i386/i386.c >> @@ -2596,7 +2596,7 @@ static const struct ptt >> processor_target_table[PROCESSOR_max] = >> {&bdver1_cost, 32, 24, 32, 7, 32}, >> {&bdver2_cost, 32, 24, 32, 7, 32}, >> {&btver1_cost, 32, 24, 32, 7, 32}, >> - {&atom_cost, 16, 7, 16, 7, 16} >> + {&atom_cost, 16, 15, 16, 7, 16} >> }; > > > OK. > > Thanks, > Uros. >
Thanks for comments! I double checked: for -Os there's no .p2align appeared. For -O2 I see ".p2align 4,,15" instead of ".p2align 4,,7", as expected. Can someone commit it please? Regards, Sergos 2011-10-18 Sergey Ostanevich <sergos....@gmail.com> * gcc/config/i386/i386.c (processor_target_table): Change Atom align_loops_max_skip to 15. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2c53423..8c60086 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2596,7 +2596,7 @@ static const struct ptt processor_target_table[PROCESSOR_max] = {&bdver1_cost, 32, 24, 32, 7, 32}, {&bdver2_cost, 32, 24, 32, 7, 32}, {&btver1_cost, 32, 24, 32, 7, 32}, - {&atom_cost, 16, 7, 16, 7, 16} + {&atom_cost, 16, 15, 16, 7, 16} }; static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =