diff mbox

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

Message ID CAEe8uEDu1svJaBVOyCgGKRDiyq19DVoE-1NcrkL5HF4xSnQGLg@mail.gmail.com
State New
Headers show

Commit Message

Carrot Wei June 10, 2015, 10:15 p.m. UTC
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,
diff mbox

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