diff mbox

[Google] Notify df framework when removing an insn in simplify-got

Message ID CAEe8uEAfG_z2kMjiS__ACReeA4kBZy9+Eq=EUm+UfnM5Zw=y4w@mail.gmail.com
State New
Headers show

Commit Message

Carrot Wei June 9, 2015, 11:46 p.m. UTC
Hi

I forgot to notify df framework when I removed an insn, it caused df
verification failure described in google bug b/16155462.

The following patch passed regression test on arm qemu in both thumb
and arm modes.
OK for google 4.9 branch?

Comments

Xinliang David Li June 9, 2015, 11:58 p.m. UTC | #1
ok.

David

On Tue, Jun 9, 2015 at 4:46 PM, Carrot Wei <carrot@google.com> wrote:
> Hi
>
> I forgot to notify df framework when I removed an insn, it caused df
> verification failure described in google bug b/16155462.
>
> The following patch passed regression test on arm qemu in both thumb
> and arm modes.
> OK for google 4.9 branch?
>
>
> Index: simplify-got.c
> ===================================================================
> --- simplify-got.c (revision 224174)
> +++ simplify-got.c (working copy)
> @@ -169,7 +169,10 @@
>
>    /* Since there is no usage of pic_reg now, we can remove it.  */
>    if (use)
> -    remove_insn (use);
> +    {
> +      df_insn_delete (use);
> +      remove_insn (use);
> +    }
>    targetm.got_access.clear_pic_reg ();
>    free (got_accesses);
>    htab_delete (var_table);
Richard Sandiford June 10, 2015, 6:43 a.m. UTC | #2
Carrot Wei <carrot@google.com> writes:
> Index: simplify-got.c
> ===================================================================
> --- simplify-got.c (revision 224174)
> +++ simplify-got.c (working copy)
> @@ -169,7 +169,10 @@
>
>    /* Since there is no usage of pic_reg now, we can remove it.  */
>    if (use)
> -    remove_insn (use);
> +    {
> +      df_insn_delete (use);
> +      remove_insn (use);
> +    }
>    targetm.got_access.clear_pic_reg ();
>    free (got_accesses);
>    htab_delete (var_table);

Why not just use delete_insn ()?

Thanks,
Richard
diff mbox

Patch

Index: simplify-got.c
===================================================================
--- simplify-got.c (revision 224174)
+++ simplify-got.c (working copy)
@@ -169,7 +169,10 @@ 

   /* Since there is no usage of pic_reg now, we can remove it.  */
   if (use)
-    remove_insn (use);
+    {
+      df_insn_delete (use);
+      remove_insn (use);
+    }
   targetm.got_access.clear_pic_reg ();
   free (got_accesses);
   htab_delete (var_table);