public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, Google] Notify df framework when removing an insn in simplify-got
@ 2015-06-09 23:58 Carrot Wei
  2015-06-10  0:25 ` Xinliang David Li
  2015-06-10  6:58 ` Richard Sandiford
  0 siblings, 2 replies; 4+ messages in thread
From: Carrot Wei @ 2015-06-09 23:58 UTC (permalink / raw)
  To: David Li, gcc-patches

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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, Google] Notify df framework when removing an insn in simplify-got
  2015-06-09 23:58 [PATCH, Google] Notify df framework when removing an insn in simplify-got Carrot Wei
@ 2015-06-10  0:25 ` Xinliang David Li
  2015-06-10  6:58 ` Richard Sandiford
  1 sibling, 0 replies; 4+ messages in thread
From: Xinliang David Li @ 2015-06-10  0:25 UTC (permalink / raw)
  To: Carrot Wei; +Cc: gcc-patches

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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, Google] Notify df framework when removing an insn in simplify-got
  2015-06-09 23:58 [PATCH, Google] Notify df framework when removing an insn in simplify-got Carrot Wei
  2015-06-10  0:25 ` Xinliang David Li
@ 2015-06-10  6:58 ` Richard Sandiford
  2015-06-10 22:18   ` Carrot Wei
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2015-06-10  6:58 UTC (permalink / raw)
  To: Carrot Wei; +Cc: David Li, gcc-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH, Google] Notify df framework when removing an insn in simplify-got
  2015-06-10  6:58 ` Richard Sandiford
@ 2015-06-10 22:18   ` Carrot Wei
  0 siblings, 0 replies; 4+ messages in thread
From: Carrot Wei @ 2015-06-10 22:18 UTC (permalink / raw)
  To: Carrot Wei, David Li, gcc-patches, richard.sandiford

On Tue, Jun 9, 2015 at 11:43 PM, Richard Sandiford
<richard.sandiford@arm.com> wrote:
> 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
>

Good suggestion, testing following patch,

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-10 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-09 23:58 [PATCH, Google] Notify df framework when removing an insn in simplify-got Carrot Wei
2015-06-10  0:25 ` Xinliang David Li
2015-06-10  6:58 ` Richard Sandiford
2015-06-10 22:18   ` Carrot Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).