From eaf23fc3d56f6aa63e24fe2951fc5ec76b39cbc6 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 2 Sep 2012 10:36:27 +0000 Subject: re PR rtl-optimization/54369 (delayed-branch pass removes too many instructions) PR rtl-optimization/54369 * config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before calling dbr_schedule. * config/sparc/sparc.c (sparc_reorg): Likewise. From-SVN: r190858 --- gcc/ChangeLog | 7 +++++++ gcc/config/mips/mips.c | 5 ++++- gcc/config/sparc/sparc.c | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9790e8..19c3645 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-09-02 Eric Botcazou + + PR rtl-optimization/54369 + * config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before + calling dbr_schedule. + * config/sparc/sparc.c (sparc_reorg): Likewise. + 2012-09-01 Jakub Jelinek PR target/54436 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 7721a7c..06b2ff4 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -15729,7 +15729,10 @@ mips_reorg (void) } if (optimize > 0 && flag_delayed_branch) - dbr_schedule (get_insns ()); + { + cleanup_barriers (); + dbr_schedule (get_insns ()); + } mips_reorg_process_insns (); if (!TARGET_MIPS16 && TARGET_EXPLICIT_RELOCS diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 59ce3d01..140332e 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -10691,7 +10691,10 @@ sparc_reorg (void) /* We need to have the (essentially) final form of the insn stream in order to properly detect the various hazards. Run delay slot scheduling. */ if (optimize > 0 && flag_delayed_branch) - dbr_schedule (get_insns ()); + { + cleanup_barriers (); + dbr_schedule (get_insns ()); + } /* Now look for specific patterns in the insn stream. */ for (insn = get_insns (); insn; insn = next) -- cgit v1.1