From patchwork Wed Feb 25 17:02:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 443523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 63E6514008F for ; Thu, 26 Feb 2015 04:02:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=PlV9Xpmo; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=brC4vkrDaHqWpusRk sO6TZ7w7Q7veyYoA9xPOlDyzqVHXSCRxUdKfQ/7ILCgUhX/RxyRGYfz8L9pKTOWu pIhLLcZWeJri6J5n5ptS1aHPXck7EuC4wBYPNx50tMhZiCbdRFQyjyHWVjN812M7 r+OGn/u6rL7Y+sAhcNPHonZK3M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=dnR1mRoA/mz/2gTsQ7Ti8/J fQAA=; b=PlV9XpmotBnjttRaNNxzTzxi29K+h95i/X/WzZWr88zgkrINcnHfw3a cllKdn1FRvkdKATKJ7Ac1UKqH8KVuR4yNbzcsRABhRnWxMbzGcNC5vW2m6BtQohn lOujk5rIn0QGdHUUIq+oZo6nPn009RvLkvd/Epa1B2nDzwraY+9k= Received: (qmail 13278 invoked by alias); 25 Feb 2015 17:02:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 13269 invoked by uid 89); 25 Feb 2015 17:02:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 25 Feb 2015 17:02:44 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1PH2gxL006695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 25 Feb 2015 12:02:43 -0500 Received: from reynosa.quesejoda.com (vpn-62-4.rdu2.redhat.com [10.10.62.4]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1PH2fno013165; Wed, 25 Feb 2015 12:02:42 -0500 Message-ID: <54EE0031.8010504@redhat.com> Date: Wed, 25 Feb 2015 09:02:41 -0800 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Jason Merrill , Jakub Jelinek CC: gcc-patches Subject: Re: [patch] PR debug/46102 Disable -feliminate-dwarf2-dups when reading a PCH References: <54E6129C.5060706@redhat.com> <54E61314.9070805@redhat.com> <20150219165052.GK1746@tucnak.redhat.com> <54EDF147.6070405@redhat.com> In-Reply-To: <54EDF147.6070405@redhat.com> On 02/25/2015 07:59 AM, Jason Merrill wrote: > On 02/19/2015 11:50 AM, Jakub Jelinek wrote: >> Wouldn't it be better to disable PCH reading if -feliminate-dwarf2-dups >> is used? > > In the abstract, perhaps, but given > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53118 > > I'd prefer to disable the useless thing. :) Patch attached. > > We might actually disable -feliminate-dwarf2-dups entirely until that > bug is fixed. Well technically, this bug is a subset of 53118. I would like to mark it as a duplicate, and can tackle it as part of my early debug work. After all, we're going to get a lot more DIEs that will get streamed early on, which PCH will have to deal with. So, this will all get fixed. Also, can we downgrade 53118, perhaps to a P4? As Ian mentions here: https://gcc.gnu.org/ml/gcc-help/2010-09/msg00083.html There are better ways of optimizing this at link time for dwarf4, and the fact that this has been broken since GCC 4.0 would hint that this may not be of P2 importance? OK for mainline pending tests? commit 512b997ad55f45898fce2704c0289d472d08cab1 Author: Aldy Hernandez Date: Wed Feb 25 08:49:59 2015 -0800 PR debug/46102 * dwarf2out.c (dwarf2out_init): Disable -feliminate-dwarf2-dups. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index ebf41c8..3f2837b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -22621,6 +22621,13 @@ output_macinfo (void) static void dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) { + /* This option is currently broken, see (PR53118 and PR46102). */ + if (flag_eliminate_dwarf2_dups) + { + warning (0, "ignoring unimplemented option -feliminate-dwarf2-dups"); + flag_eliminate_dwarf2_dups = 0; + } + /* Allocate the file_table. */ file_table = hash_table::create_ggc (50); diff --git a/gcc/testsuite/g++.dg/debug/dwarf2-1.C b/gcc/testsuite/g++.dg/debug/dwarf2-1.C index e90d510..913bfe5 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2-1.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2-1.C @@ -20,3 +20,5 @@ namespace N } N::Derived thing; + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/g++.dg/debug/dwarf2-2.C b/gcc/testsuite/g++.dg/debug/dwarf2-2.C index 9e6dbd2..214bbb1 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2-2.C @@ -15,3 +15,5 @@ void A::foo () { using namespace N; } + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C index d9d058c..17ffafa 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef5.C @@ -8,3 +8,5 @@ typedef struct } A; A a; + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/g++.dg/debug/pr46123.C b/gcc/testsuite/g++.dg/debug/pr46123.C index 9e115cd..f5e5f9f 100644 --- a/gcc/testsuite/g++.dg/debug/pr46123.C +++ b/gcc/testsuite/g++.dg/debug/pr46123.C @@ -45,3 +45,5 @@ int main () return 1; return 0; } + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2-3.c index f0c129c..e649dfa 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2-3.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2-3.c @@ -11,3 +11,5 @@ int main() p.x = 0; p.y = 0; } + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */ diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c index d9c01d0..4d3a9e8 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c @@ -1,8 +1,10 @@ /* Test that these two options can work together. */ /* { dg-options "-gdwarf-4 -dA -feliminate-dwarf2-dups -fdebug-types-section" } */ -/* { dg-final { scan-assembler "DW.dups_types\.h\[^)\]*. DW_TAG_typedef" } } */ +/* { dg-final { scan-assembler "DW.dups_types\.h\[^)\]*. DW_TAG_typedef" { xfail *-*-* } } } */ /* { dg-final { scan-assembler "DW_TAG_type_unit" } } */ #include "dups-types.h" A2 a; + +/* { dg-bogus "ignoring unimplemented option -feliminate-dwarf2-dups" "unimplemented" { xfail *-*-* } 1 } */