This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [x86, PATCH] operand reordering for commutative operations


Hi H.J.

Bug with reproducer was submitted:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64434


2014-12-29 16:53 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> On Mon, Dec 29, 2014 at 5:30 AM, Yuri Rumyantsev <ysrumyan@gmail.com> wrote:
>> Hi All,
>>
>> Here is a patch which fixed several performance degradation after
>> operand canonicalization (r216728). Very simple approach is used - if
>> operation is commutative and its second operand required more
>> operations (statements) for computation, swap operands.
>> Currently this is done under special option which is set-up to true
>> only for x86 32-bit targets ( we have not  seen any performance
>> improvements on 64-bit).
>
> Can you open a regression bug? Do you know how it improves
> performance in 32-bit?
>
>> Is it OK for trunk?
>>
>> 2014-12-26  Yuri Rumyantsev  <ysrumyan@gmail.com>
>>
>> * cfgexpand.c (count_num_stmt): New function.
>> (reorder_operands): Likewise.
>> (expand_gimple_basic_block): Insert call of reorder_operands.
>> * common.opt(flag_reorder_operands): Add new flag.
>> * config/i386/i386.c (ix86_option_override_internal): Add setup of
>> flag_reorder_operands for 32-bit target only.
>> * (doc/invoke.texi: Add new optimization option -freorder-operands.
>>
>> gcc/testsuite/ChangeLog
>> * gcc.target/i386/swap_opnd.c: New test.
>
>
>
> --
> H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]