* [PATCH] Run peephole2 after sched2
@ 2012-07-19 14:50 Moore, Catherine
2012-07-19 16:02 ` Steven Bosscher
0 siblings, 1 reply; 2+ messages in thread
From: Moore, Catherine @ 2012-07-19 14:50 UTC (permalink / raw)
To: gcc-patches; +Cc: Moore, Catherine, rdsandiford, Rozycki, Maciej
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?
Thanks,
Catherine
2012-07-19 Catherine Moore <clm@codesourcery.com>
Chao-ying Fu <fu@mips.com>
* passes.c (init_optimization_passes): Run peephole2 after sched2.
Index: passes.c
===================================================================
--- passes.c (revision 189440)
+++ passes.c (working copy)
@@ -1589,6 +1589,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_leaf_regs);
NEXT_PASS (pass_split_before_sched2);
NEXT_PASS (pass_sched2);
+ NEXT_PASS (pass_peephole2);
NEXT_PASS (pass_stack_regs);
{
struct opt_pass **p = &pass_stack_regs.pass.sub;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Run peephole2 after sched2
2012-07-19 14:50 [PATCH] Run peephole2 after sched2 Moore, Catherine
@ 2012-07-19 16:02 ` Steven Bosscher
0 siblings, 0 replies; 2+ messages in thread
From: Steven Bosscher @ 2012-07-19 16:02 UTC (permalink / raw)
To: Moore, Catherine; +Cc: gcc-patches, rdsandiford, Rozycki, Maciej
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-19 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19 14:50 [PATCH] Run peephole2 after sched2 Moore, Catherine
2012-07-19 16:02 ` Steven Bosscher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).