From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16644 invoked by alias); 20 Jul 2013 09:29:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14411 invoked by uid 48); 20 Jul 2013 09:27:43 -0000 From: "makhaloff at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/57940] New: [PATCH] Rerun df_analyze after delete_unmarked_insns during DCE Date: Sat, 20 Jul 2013 09:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: makhaloff at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00911.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57940 Bug ID: 57940 Summary: [PATCH] Rerun df_analyze after delete_unmarked_insns during DCE Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: makhaloff at gmail dot com 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 * dce.c (fini_dce): Call df_analyze again just in case delete_unmarked_insns removed anything. --- dce.c (revision 361) +++ dce.c (working copy) @@ -745,6 +745,12 @@ bitmap_obstack_release (&dce_blocks_bitmap_obstack); bitmap_obstack_release (&dce_tmp_bitmap_obstack); } + + if (!df_in_progress) + { + df_compute_regs_ever_live (true); + df_analyze (); + } }