]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/32321 (ICE in df_refs_verify with -fgcse-sm)
authorSeongbae Park <seongbae.park@gmail.com>
Mon, 18 Jun 2007 20:49:23 +0000 (20:49 +0000)
committerSeongbae Park <spark@gcc.gnu.org>
Mon, 18 Jun 2007 20:49:23 +0000 (20:49 +0000)
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

gcc/ChangeLog
gcc/gcse.c

index 191d3474eb26e26648582469f5d81ca351c49353..6cc09bd22f236c0b5157dc2217e5d92b785c4dd5 100644 (file)
@@ -1,3 +1,9 @@
+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
 
        Revert:
index 828ee6b32543860085a85e5d3d099771bdc6324d..8278714cefea420fa329fac315b222bf4aa0f2c4 100644 (file)
@@ -6341,17 +6341,6 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
 
   mem = smexpr->pattern;
   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))
     if (XEXP (ptr, 0) == del)
@@ -6379,6 +6368,20 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
       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);
 
   /* Now we must handle REG_EQUAL notes whose contents is equal to the mem;
This page took 0.076971 seconds and 5 git commands to generate.