This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Fixing instability of -fschedule-insns for x86
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Igor Zamyatin <izamyatin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, ysrumyan at gmail dot com
- Date: Tue, 14 Aug 2012 10:36:33 +0200
- Subject: Re: [PATCH][RFC] Fixing instability of -fschedule-insns for x86
- References: <CAKdSQZk5x3Bf6Mp3tbqrB3ogoE3LSuSqoOmBscJbF2bgh_Xx-Q@mail.gmail.com>
On Mon, Aug 13, 2012 at 9:39 PM, Igor Zamyatin <izamyatin@gmail.com> wrote:
> Patch aims to fix instability introduced by first scheduler on x86. In
> particular it targets following list:
>
> [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46843
> [2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46829
> [3] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680
> [4] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42295
>
> Main idea of this activity is mostly to provide user a possibility to
> safely turn on first scheduler for his codes. In some cases this could
> positively affect performance, especially for in-order Atom.
>
> It would be great to hear some feedback from the community about the change.
The 46829 failure is due to combine pass blindly propagating r8 into
divmod instruction. This is invalid for divmod, which expects ax
there.
This can be fixed by introducing "ax_register_operand" predicate, but
I think that combine shouldn't propagate hard registers. This blocks
register allocator, and we have many passes that handle propagation of
hard registers after IRA much more effectively.
Various "*_not_xmm0_*" predicates were introduced just to fight this
issue. They would be immediately obsolete with above combine change.
IMO, preventing combine to propagate hard regs will fix 90% of spill
failures on x86.
Uros.