From patchwork Wed Mar 27 14:05:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 231698 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 "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id AA7AA2C009F for ; Thu, 28 Mar 2013 01:06:39 +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:subject:message-id:mime-version:content-type; q=dns; s= default; b=boa2hsOl08WGl12hSv63RMXmgPL/OE+NZ2CqB6gPmfaSCW1edElWC +voJ3ACQlnSEOInuSQKRRp50RvE+g3jGSPji4k1rd7NcnjjfCVmF7vPZ1ykaR7Lk pA5m9Q33gqoKm3l/arGhpJrIkKM8K3qIrXnwQgg0ohcBD8ikvlXc0I= 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:subject:message-id:mime-version:content-type; s= default; bh=ItcNmKiftgNDucKcXdg0qLGrMww=; b=DVk6R67mw9pNIGL/Zc1b EMp2puEsezsYvgjtTl0OskXJtMSpdRR/fITvVnTf0TNFih07nT6wAcYQqdJNbzre b2GXxItmvfY76Hu9qacm+OrvKlZXvDBjEp3N/wY/qH+zcAFCRE1LlQWcGMDNLD7O Fzms2eDxk3wvLEPr4fwyW0o= Received: (qmail 24042 invoked by alias); 27 Mar 2013 14:06:27 -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 23995 invoked by uid 89); 27 Mar 2013 14:06:19 -0000 X-Spam-SWARE-Status: No, score=-6.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 27 Mar 2013 14:06:02 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EBC6BA5207 for ; Wed, 27 Mar 2013 15:05:59 +0100 (CET) Date: Wed, 27 Mar 2013 15:05:59 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PTA dumping ICEs Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 This fixes ICEs when dumping PTA pass details (I'm pretty sure it will not fix PR56716, but this issue is reported there, too). Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2013-03-27 Richard Biener PR tree-optimization/56716 * tree-ssa-structalias.c (perform_var_substitution): Adjust dumping for ref nodes. Index: gcc/tree-ssa-structalias.c =================================================================== --- gcc/tree-ssa-structalias.c (revision 197158) +++ gcc/tree-ssa-structalias.c (working copy) @@ -2292,18 +2292,37 @@ perform_var_substitution (constraint_gra { unsigned j = si->node_mapping[i]; if (j != i) - fprintf (dump_file, "%s node id %d (%s) mapped to SCC leader " - "node id %d (%s)\n", - bitmap_bit_p (graph->direct_nodes, i) - ? "Direct" : "Indirect", i, get_varinfo (i)->name, - j, get_varinfo (j)->name); + { + fprintf (dump_file, "%s node id %d ", + bitmap_bit_p (graph->direct_nodes, i) + ? "Direct" : "Indirect", i); + if (i < FIRST_REF_NODE) + fprintf (dump_file, "\"%s\"", get_varinfo (i)->name); + else + fprintf (dump_file, "\"*%s\"", + get_varinfo (i - FIRST_REF_NODE)->name); + fprintf (dump_file, " mapped to SCC leader node id %d ", j); + if (j < FIRST_REF_NODE) + fprintf (dump_file, "\"%s\"\n", get_varinfo (j)->name); + else + fprintf (dump_file, "\"*%s\"\n", + get_varinfo (j - FIRST_REF_NODE)->name); + } else - fprintf (dump_file, - "Equivalence classes for %s node id %d (%s): pointer %d" - ", location %d\n", - bitmap_bit_p (graph->direct_nodes, i) - ? "direct" : "indirect", i, get_varinfo (i)->name, - graph->pointer_label[i], graph->loc_label[i]); + { + fprintf (dump_file, + "Equivalence classes for %s node id %d ", + bitmap_bit_p (graph->direct_nodes, i) + ? "direct" : "indirect", i); + if (i < FIRST_REF_NODE) + fprintf (dump_file, "\"%s\"", get_varinfo (i)->name); + else + fprintf (dump_file, "\"*%s\"", + get_varinfo (i - FIRST_REF_NODE)->name); + fprintf (dump_file, + ": pointer %d, location %d\n", + graph->pointer_label[i], graph->loc_label[i]); + } } /* Quickly eliminate our non-pointer variables. */