On 07/20/2013 03:02 AM, Alexey Makhalov wrote:
Hello!

If delete_unmarked_insns deletes some insn, DF state might be
out of date, and, regs_ever_live might contain unused registers till the end.

Fixed by forcing regs_ever_live update and rerunning df_analyze () at 
fini_dce().

I found this bug on my target (not included into main sources). But I can send 
everything you need to reproduce this bug.

Using gcc-4.8.1

2013-07-20  Alexey Makhalov  <makhal...@gmail.com  <mailto:makhal...@gmail.com>>

        * dce.c (fini_dce): Call df_analyze again just in case 
delete_unmarked_insns
        removed anything.
Presumably DCE is removing the last reference to one or more hard registers?

Do you really need the df_analyze call?

Note that the DF machinery tracks the number of references to each hard reg and thus if DCE were to delete the last reference, that counter should go to zero. That in turn should allow the call to df_compute_regs_ever_live to set regs_ever_live appropriately.

I'm guessing the call to df_analyze is there to ensure correct liveness is propagated so that you don't end up with an inconsistency between the life information and regs_ever_live? Is that correct?

The patch is probably OK, I just want to make sure I understand the state you're in at the end of dce and more about how that's causing problems.

jeff


Reply via email to