This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR50572] Tune loop alignment for Atom
On Wed, Oct 19, 2011 at 4:46 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Wed, Oct 19, 2011 at 2:26 PM, Sergey Ostanevich <sergos.gnu@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.gnu@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.gnu@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] =