From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30861 invoked by alias); 22 Oct 2012 14:56:00 -0000 Received: (qmail 30712 invoked by uid 48); 22 Oct 2012 14:55:37 -0000 From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/54971] SRA pessimizes debug info by not creating debug stmts for fields without replacements Date: Mon, 22 Oct 2012 14: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: jamborm 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-10/txt/msg01979.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54971 --- Comment #4 from Martin Jambor 2012-10-22 14:55:35 UTC --- Unfortunately, the patch causes -fcompare-debug issues. The problem is that with it we create some declarations only when producing debug info which can affect UIDs which then changes other stuff. I tried producing DEBUG_EXPR_DECLs instead of regular decls but SET_DECL_DEBUG_EXPR does not accept DEBUG_EXPR_DECLs as an argument, it insists on VAR_DECLs. I tried removing the checking restriction but it turned out that using DEBUG_EXPR_DECLs does not fix the testcase. Jakub, do you think that can be fixed or are DEBUG_EXPR_DECLs a completely different thing that principally canno be used for this purpose? Another alternative is to build full-fledged replacement decls even when not producing debug info, even though we'd never use it. That seems slightly wasteful but can be done. (Some reworking of replacement building would be probably required so that we get rid of lazy replacement building which is no longer necessary).