From patchwork Wed Apr 2 12:23:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 336330 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 A4AEB14008D for ; Wed, 2 Apr 2014 23:24:01 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=n1JjZ+949JpjCMZxBOs7OtmWvpYJkMGW8VpRnEbGfXPyM+r2lk Z9l+4NE6b/15qqY+mIHOTmVR/q1bHQLTYojL1uGQwGVqkTYHxj7aSMWk4W7qDW7U /+0SS9/wAsR6DIA22fnnBJj1/lodJJkzJPp8EgIlZXYdqEjUFE50gm8k4= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=CRMwv6xl3tAtbXBY8AzJn9eR500=; b=a6DEHirgo9/hpX9s2OhE QESZBxXQY8e9/Iexymmpp9IdUytbpIkmWb7gjdK/zVgW/ej76DNV4zBNVbcJKGKO 8vppi9S88GyUFBr2hL0g3PIezn8GyiEU+YuNBiB1WbBdgkfDr4Ac32rPsH0VCU4S gCjn29cQ0yVnETR5jD2yZJw= Received: (qmail 4297 invoked by alias); 2 Apr 2014 12:23:55 -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 4287 invoked by uid 89); 2 Apr 2014 12:23:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 02 Apr 2014 12:23:53 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 14810ACDE for ; Wed, 2 Apr 2014 12:23:50 +0000 (UTC) Date: Wed, 2 Apr 2014 14:23:49 +0200 From: Martin Jambor To: GCC Patches Cc: Richard Biener Subject: [PATCH] Simple enhancements to dumping in ipa.c and ipa-cp.c Message-ID: <20140402122349.GZ19304@virgil.suse> Mail-Followup-To: GCC Patches , Richard Biener MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hi, recently I've been looking into a number of bugs involving symtab_remove_unreachable_nodes in one way or another and I have always started by applying the hunk below. I did this because distinguishing different symbol nodes only according to their names is just so inconvenient, especially when compiling C++. The risk is minimal and therefore I'd like to propose it to trunk even at this late stage, although I can of course wait until the next stage1. The other hunk is something that I think is also useful when looking into all failures of ipcp_verify_propagated_values like e.g. PR 60727. I included the patch in a recent bootstrap and testing and it of course passes. OK for trunk now? Or later? Thanks, Martin 2014-04-01 Martin Jambor * ipa-cp.c (ipcp_verify_propagated_values): Also dump symtab and mention gcc_unreachable before failing. * ipa.c (symtab_remove_unreachable_nodes): Also print order of removed symbols. Index: src/gcc/ipa-cp.c =================================================================== --- src.orig/gcc/ipa-cp.c +++ src/gcc/ipa-cp.c @@ -884,8 +884,9 @@ ipcp_verify_propagated_values (void) { if (dump_file) { + dump_symtab (dump_file); fprintf (dump_file, "\nIPA lattices after constant " - "propagation:\n"); + "propagation, before gcc_unreachable:\n"); print_all_lattices (dump_file, true, false); } Index: src/gcc/ipa.c =================================================================== --- src.orig/gcc/ipa.c +++ src/gcc/ipa.c @@ -469,7 +469,7 @@ symtab_remove_unreachable_nodes (bool be if (!node->aux) { if (file) - fprintf (file, " %s", node->name ()); + fprintf (file, " %s/%i", node->name (), node->order); cgraph_remove_node (node); changed = true; } @@ -483,7 +483,7 @@ symtab_remove_unreachable_nodes (bool be if (node->definition) { if (file) - fprintf (file, " %s", node->name ()); + fprintf (file, " %s/%i", node->name (), node->order); node->body_removed = true; node->analyzed = false; node->definition = false; @@ -531,7 +531,7 @@ symtab_remove_unreachable_nodes (bool be && (!flag_ltrans || !DECL_EXTERNAL (vnode->decl))) { if (file) - fprintf (file, " %s", vnode->name ()); + fprintf (file, " %s/%i", vnode->name (), vnode->order); varpool_remove_node (vnode); changed = true; }