This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Run peephole2 after sched2
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: "Moore, Catherine" <Catherine_Moore at mentor dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "rdsandiford at googlemail dot com" <rdsandiford at googlemail dot com>, "Rozycki, Maciej" <Maciej_Rozycki at mentor dot com>
- Date: Thu, 19 Jul 2012 18:01:39 +0200
- Subject: Re: [PATCH] Run peephole2 after sched2
- References: <FD3DCEAC5B03E9408544A1E416F1124211F9CBE9@NA-MBX-04.mgc.mentorg.com>
On Thu, Jul 19, 2012 at 4:50 PM, Moore, Catherine
<Catherine_Moore@mentor.com> wrote:
> Hi,
>
> The microMIPS port benefits from an additional peephole2 pass. Sched2 exposes some opportunities to recognize the movep instruction.
> Does this look okay to commit?
Not really. The purpose of peephole2 was to do peephole optimizations
before *final* scheduling. Maybe this patch works for MIPS, but you
could seriously ruin performance on machines where scheduling matters.
(And even on MIPS, how do you handle pipeline hazards?)
Ciao!
Steven