From c9b69ba2588ce02e591c0a7af0a7ae901f66d8a5 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 17 Sep 2007 23:41:36 +0000 Subject: [PATCH] df-scan.c (df_notes_rescan): Do nothing if the instruction does not yet have a basic block. gcc/ * df-scan.c (df_notes_rescan): Do nothing if the instruction does not yet have a basic block. * dse.c (find_shift_sequence): Don't set DF_NO_INSN_RESCAN. From-SVN: r128563 --- gcc/ChangeLog | 6 ++++++ gcc/df-scan.c | 4 ++++ gcc/dse.c | 2 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e8285f..64bdbe7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2007-09-18 Richard Sandiford + * df-scan.c (df_notes_rescan): Do nothing if the instruction does + not yet have a basic block. + * dse.c (find_shift_sequence): Don't set DF_NO_INSN_RESCAN. + +2007-09-18 Richard Sandiford + * config/mips/mips.c (mips_file_start): Add ".previous" directives to both ".section"s. diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 6c2c6fa..a1f71b0 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -2004,6 +2004,10 @@ df_notes_rescan (rtx insn) if (df->changeable_flags & DF_NO_INSN_RESCAN) return; + /* Do nothing if the insn hasn't been emitted yet. */ + if (!BLOCK_FOR_INSN (insn)) + return; + df_grow_bb_info (df_scan); df_grow_reg_info (); diff --git a/gcc/dse.c b/gcc/dse.c index 1aa1598..a957783 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -1428,10 +1428,8 @@ find_shift_sequence (rtx read_reg, /* In theory we could also check for an ashr. Ian Taylor knows of one dsp where the cost of these two was not the same. But this really is a rare case anyway. */ - df_set_flags (DF_NO_INSN_RESCAN); target = expand_binop (new_mode, lshr_optab, new_reg, GEN_INT (shift), new_reg, 1, OPTAB_DIRECT); - df_clear_flags (DF_NO_INSN_RESCAN); if (target == new_reg) { -- 2.7.4