From patchwork Fri Sep 19 15:32:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 391341 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 D6B1514010C for ; Sat, 20 Sep 2014 01:32:53 +1000 (EST) 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:subject:content-type; q= dns; s=default; b=bgVjCwCz76Ww0TTjHCsJ6l4iPXjDtD6hyAQaLamI03qK9X g77kMmYXpilbLSL3ZfFpSDEADazTS42WkoP7UnGB2dlvDr+qV8v3bYYD4BgCV19x U7PxP4SzwUWC4W1JU8zPjmiG72XXC9LMsKheuVGLXRsr/zbmaITfWkjB4pjL4= 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:subject:content-type; s= default; bh=ngOoliCqT10WUER6XcNetUiuk08=; b=gdrEsDPWBpF7IzltI2SI uV/CMzpD7ggVKBXccJS57bfpJs4hhdotmSwldAvSCuZFd7NWHvEJNEE7Dgn1lTLV t7wRPUVVKwMnnO8xy+d9dDRYh/Se29qB61IcH02m6AMkgkpnRYJr9gfYzji2Gy0K Tj/e5bdp+4YM66nFsSMxa1E= Received: (qmail 19347 invoked by alias); 19 Sep 2014 15:32:45 -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 19331 invoked by uid 89); 19 Sep 2014 15:32:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Fri, 19 Sep 2014 15:32:43 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8JFWfQZ023493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Sep 2014 11:32:41 -0400 Received: from reynosa.quesejoda.com (vpn-53-12.rdu2.redhat.com [10.10.53.12]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8JFWeYC005862; Fri, 19 Sep 2014 11:32:40 -0400 Message-ID: <541C4C97.2010503@redhat.com> Date: Fri, 19 Sep 2014 09:32:39 -0600 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Michael Matz , gcc-patches Subject: [debug-early] Allow checking of DECL_ABSTRACT in decl_ultimate_origin Michael, I really don't understand the need for this change in your original patch. I don't know if this was a temporary testing change or what. For instance, you had the following commented out in your original patch: if (/*DECL_ABSTRACT (decl) &&*/ DECL_ABSTRACT_ORIGIN (decl) == decl) return NULL_TREE; but then you also had: tree origin = decl_ultimate_origin (decl); - if (origin != NULL) + if (origin != NULL && origin != decl) It seems to me that if origin is not null, then "origin != decl" will always be true, since with your change, decl_ultimate_origin() will always return NULL when DECL_ABSTRACT_ORIGIN (decl) == decl. I suppose your /*DECL_ABSTRACT (decl) &&*/ change could be used in other uses of decl_ultimate_origin() that don't have this "&& origin != decl" business. Anyway... I don't understand the need for it (actually, to be honest, I don't understand what you were trying to do). I'm going to remove it. If you feel strongly about it, please chime in, and perhaps provide an explanation so I can include a comment. I'm happy to report that with this and the last set of patches, both C and C++ guality tests have <= regressions than mainline. Yay. Committing to mainline. Thanks. Aldy commit 7254ec0893f9b56a0ba78de9eab8895c9582c24b Author: Aldy Hernandez Date: Thu Sep 18 16:54:39 2014 -0600 * dwarf2out.c (decl_ultimate_origin): Allow checking of DECL_ABSTRACT. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f6c7f4a..68b4650 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3683,7 +3683,7 @@ decl_ultimate_origin (const_tree decl) /* output_inline_function sets DECL_ABSTRACT_ORIGIN for all the nodes in the function to point to themselves; ignore that if we're trying to output the abstract instance of this function. */ - if (/*DECL_ABSTRACT (decl) &&*/ DECL_ABSTRACT_ORIGIN (decl) == decl) + if (DECL_ABSTRACT (decl) && DECL_ABSTRACT_ORIGIN (decl) == decl) return NULL_TREE; /* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the