Commit bfff9190 by Seongbae Park Committed by Seongbae Park

re PR middle-end/32321 (ICE in df_refs_verify with -fgcse-sm)

2007-06-18  Seongbae Park  <seongbae.park@gmail.com>

	PR rtl-optimization/32321
	* gcse.c (replace_store_insn): Update the note before
	calling emit_insn_after.

From-SVN: r125827
parent aacc93b5
2007-06-18 Seongbae Park <seongbae.park@gmail.com>
PR rtl-optimization/32321
* gcse.c (replace_store_insn): Update the note before
calling emit_insn_after.
2007-06-18 David Daney <ddaney@avtrex.com 2007-06-18 David Daney <ddaney@avtrex.com
Revert: Revert:
......
...@@ -6341,17 +6341,6 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr) ...@@ -6341,17 +6341,6 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
mem = smexpr->pattern; mem = smexpr->pattern;
insn = gen_move_insn (reg, SET_SRC (single_set (del))); insn = gen_move_insn (reg, SET_SRC (single_set (del)));
insn = emit_insn_after (insn, del);
if (dump_file)
{
fprintf (dump_file,
"STORE_MOTION delete insn in BB %d:\n ", bb->index);
print_inline_rtx (dump_file, del, 6);
fprintf (dump_file, "\nSTORE MOTION replaced with insn:\n ");
print_inline_rtx (dump_file, insn, 6);
fprintf (dump_file, "\n");
}
for (ptr = ANTIC_STORE_LIST (smexpr); ptr; ptr = XEXP (ptr, 1)) for (ptr = ANTIC_STORE_LIST (smexpr); ptr; ptr = XEXP (ptr, 1))
if (XEXP (ptr, 0) == del) if (XEXP (ptr, 0) == del)
...@@ -6379,6 +6368,20 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr) ...@@ -6379,6 +6368,20 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
XEXP (note, 0) = insn; XEXP (note, 0) = insn;
} }
/* Emit the insn AFTER all the notes are transferred.
This is cheaper since we avoid df rescanning for the note change. */
insn = emit_insn_after (insn, del);
if (dump_file)
{
fprintf (dump_file,
"STORE_MOTION delete insn in BB %d:\n ", bb->index);
print_inline_rtx (dump_file, del, 6);
fprintf (dump_file, "\nSTORE MOTION replaced with insn:\n ");
print_inline_rtx (dump_file, insn, 6);
fprintf (dump_file, "\n");
}
delete_insn (del); delete_insn (del);
/* Now we must handle REG_EQUAL notes whose contents is equal to the mem; /* Now we must handle REG_EQUAL notes whose contents is equal to the mem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment