From patchwork Mon Sep 9 19:32:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 273656 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A91BA2C0106 for ; Tue, 10 Sep 2013 05:33:02 +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:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=XEh15lqbtOIcSwaEA0sA2fqtsK6JAXIzt3byFPybs9DPX4Xz/auqN SwZjOt6Jva18epstmUrNHxzmdY3K/DUvzG/MINGa2/el01VEbipfSjq52znzrhHy YCnEAKzllDPLsHB9/hIbWA/mFGku1BD89bdnq9eM+QQz5WAJC2ymGU= 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:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=f6GQoWB9TVxKQ02vtcpsIF0gsAg=; b=e30iBPAd45C1matS1ozR 4vcEE5vasBQQ2ZIWOwU1UVjj4jAXJxKwjc+IREro7Jyg5JvCteIvTqBuxGjEOWkU AexcHLM6+FiO7r4YmHRTWbW3Xs7cEYLoP/H+67ArF2Nd1OyPEbVVp2E2i2gWs8Aw 3jq5qfs61T13j4RQFHj8p+4= Received: (qmail 20787 invoked by alias); 9 Sep 2013 19: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 20701 invoked by uid 89); 9 Sep 2013 19:32:44 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Sep 2013 19:32:44 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r89JWfWU029367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Sep 2013 15:32:42 -0400 Received: from surprise.bos.redhat.com ([10.18.25.132]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r89JWdRv029294; Mon, 9 Sep 2013 15:32:41 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: Jan Hubicka , David Malcolm Subject: [PATCH v2 3/6] Split symtab_node declarations onto multiple lines Date: Mon, 9 Sep 2013 15:32:17 -0400 Message-Id: <1378755140-5555-4-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1378755140-5555-1-git-send-email-dmalcolm@redhat.com> References: <20130820210104.GC16244@atrey.karlin.mff.cuni.cz> <1378755140-5555-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes Amongst other things, the rename_symtab.py script converts "symtab_node" to "symtab_node *". This will lead to broken code on declarations that declare more than one variable (only the first would get a "*"), so split up such declarations. gcc/ * cgraphunit.c (analyze_functions): Split symtab_node declarations onto multiple lines to make things easier for rename_symtab.py. * symtab.c (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_semantically_equivalent_p): Likewise. gcc/lto * lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node declarations onto multiple lines to make things easier for rename_symtab.py. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_symbols_1): Likewise. --- gcc/cgraphunit.c | 3 ++- gcc/lto/lto-symtab.c | 9 ++++++--- gcc/symtab.c | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 5a8909f..351291b 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -906,7 +906,8 @@ analyze_functions (void) struct varpool_node *first_handled_var = first_analyzed_var; struct pointer_set_t *reachable_call_targets = pointer_set_create (); - symtab_node node, next; + symtab_node node; + symtab_node next; int i; struct ipa_ref *ref; bool changed = true; diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 13646bb..ec42a93 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -361,7 +361,8 @@ lto_symtab_resolve_symbols (symtab_node first) static void lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p) { - symtab_node prevailing, e; + symtab_node prevailing; + symtab_node e; vec mismatches = vNULL; unsigned i; tree decl; @@ -413,7 +414,8 @@ lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p) static void lto_symtab_merge_decls_1 (symtab_node first) { - symtab_node e, prevailing; + symtab_node e; + symtab_node prevailing; bool diagnosed_p = false; if (cgraph_dump_file) @@ -536,7 +538,8 @@ lto_symtab_merge_decls (void) static void lto_symtab_merge_symbols_1 (symtab_node prevailing) { - symtab_node e, next; + symtab_node e; + symtab_node next; /* Replace the cgraph node of each entry with the prevailing one. */ for (e = prevailing->next_sharing_asm_name; e; diff --git a/gcc/symtab.c b/gcc/symtab.c index 8079854..2b612b3 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -441,7 +441,8 @@ symtab_add_to_same_comdat_group (symtab_node new_node, void symtab_dissolve_same_comdat_group_list (symtab_node node) { - symtab_node n = node, next; + symtab_node n = node; + symtab_node next; if (!node->same_comdat_group) return; @@ -1124,7 +1125,8 @@ symtab_semantically_equivalent_p (symtab_node a, symtab_node b) { enum availability avail; - symtab_node ba, bb; + symtab_node ba; + symtab_node bb; /* Equivalent functions are equivalent. */ if (a->decl == b->decl)