From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7006 invoked by alias); 12 Sep 2012 05:56:01 -0000 Received: (qmail 6995 invoked by uid 22791); 12 Sep 2012 05:56:00 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Sep 2012 05:55:47 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily Date: Wed, 12 Sep 2012 05:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-09/txt/msg00904.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54551 --- Comment #2 from Jakub Jelinek 2012-09-12 05:54:29 UTC --- If there is a death point of the pseudo that dominates bbs with uses in some debug insns, then I think best is to insert the debug temporary immediately before the death point. If the death point of the pseudo doesn't dominate the bb with debug uses, or if there are multiple death point in different branches, but if the setter of the pseudo dominates the bb with debug uses or if there is some bb where the pseudo is live, isn't changed afterwards and that spot dominates the debug uses, then the best spot to insert the debug temporary is probably before the conditional jump/whatever other control changing insn at the end of that bb. E.g. for: +---+ | |set| / \ +---+ +---++---+ | |set||set| / \ +---++---+ | | | | \ / \ / (1) | +-----+ (2) |death| / \ +-----+ | \ | +-----+ \ / \ |death| +-----+ | | +-----+ |death| | / \ | +-----+ | | | \ / | \ / | | | +------+ | +------+ |dbguse| | |dbguse| +------+ | +------+ I think we want to insert the debug temp at (1) resp. (2). If there is no such spot, I think we have to give up, trying to build (if_then_else (condition) D#1234 D#2345) would bloat the debug info too much. Still handling even the dominating cases would be better than what we have right now. Perhaps we could handle single setters first if DF has computed that already. Perhaps this handling could be keyed off some new DF flag which would only be set in the first cse pass.