gcse.c (struct reg_use): Remove unused struct.
* gcse.c (struct reg_use): Remove unused struct. (gcse_emit_move_after): Do not create REG_EQUAL notes that reference the SET_DEST of the instruction the note would be attached to. * cse.c (cse_main): Add the DF_NOTE problem. From-SVN: r194108
This commit is contained in:
parent
cef1bc586c
commit
dca3da7afc
@ -1,3 +1,10 @@
|
||||
2012-12-03 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* gcse.c (struct reg_use): Remove unused struct.
|
||||
(gcse_emit_move_after): Do not create REG_EQUAL notes that reference
|
||||
the SET_DEST of the instruction the note would be attached to.
|
||||
* cse.c (cse_main): Add the DF_NOTE problem.
|
||||
|
||||
2012-12-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sanitizer.def: Add Address Sanitizer builtins.
|
||||
|
@ -6520,6 +6520,7 @@ cse_main (rtx f ATTRIBUTE_UNUSED, int nregs)
|
||||
int i, n_blocks;
|
||||
|
||||
df_set_flags (DF_LR_RUN_DCE);
|
||||
df_note_add_problem ();
|
||||
df_analyze ();
|
||||
df_set_flags (DF_DEFER_INSN_RESCAN);
|
||||
|
||||
|
14
gcc/gcse.c
14
gcc/gcse.c
@ -255,8 +255,6 @@ int flag_rerun_cse_after_global_opts;
|
||||
/* An obstack for our working variables. */
|
||||
static struct obstack gcse_obstack;
|
||||
|
||||
struct reg_use {rtx reg_rtx; };
|
||||
|
||||
/* Hash table of expressions. */
|
||||
|
||||
struct expr
|
||||
@ -2491,23 +2489,27 @@ gcse_emit_move_after (rtx dest, rtx src, rtx insn)
|
||||
rtx new_rtx;
|
||||
rtx set = single_set (insn), set2;
|
||||
rtx note;
|
||||
rtx eqv;
|
||||
rtx eqv = NULL_RTX;
|
||||
|
||||
/* This should never fail since we're creating a reg->reg copy
|
||||
we've verified to be valid. */
|
||||
|
||||
new_rtx = emit_insn_after (gen_move_insn (dest, src), insn);
|
||||
|
||||
/* Note the equivalence for local CSE pass. */
|
||||
/* Note the equivalence for local CSE pass. Take the note from the old
|
||||
set if there was one. Otherwise record the SET_SRC from the old set
|
||||
unless DEST is also an operand of the SET_SRC. */
|
||||
set2 = single_set (new_rtx);
|
||||
if (!set2 || !rtx_equal_p (SET_DEST (set2), dest))
|
||||
return new_rtx;
|
||||
if ((note = find_reg_equal_equiv_note (insn)))
|
||||
eqv = XEXP (note, 0);
|
||||
else
|
||||
else if (! REG_P (dest)
|
||||
|| ! reg_mentioned_p (dest, SET_SRC (set)))
|
||||
eqv = SET_SRC (set);
|
||||
|
||||
set_unique_reg_note (new_rtx, REG_EQUAL, copy_insn_1 (eqv));
|
||||
if (eqv != NULL_RTX)
|
||||
set_unique_reg_note (new_rtx, REG_EQUAL, copy_insn_1 (eqv));
|
||||
|
||||
return new_rtx;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user