From patchwork Thu Aug 1 10:06:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 263954 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 AFD022C0095 for ; Thu, 1 Aug 2013 20:07:06 +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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=geOhWmOKRazvxdZut YCt/rHWPNl06iQBw3rDZnElBEVaF+QN9iXZKQf5Ux5NPX5rczCiuvl5xe3RbNS7t FjTBDH5FwZE38SSGgGl49LpVuqB/PWZFFo9BJfahhWO4LF9GQz2JhwyFV5ymPHCf BDrE/NEEwi1IPa4ayMBhrEbBqg= 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:references:mime-version :content-type:in-reply-to; s=default; bh=a5e1q+keJiTZhDnwsmIKDP8 vh+8=; b=YvuBL+XL6AAToLRzi048NFKcN7tQ7xNzM4OaWBerJy3wVAuAMiB3QLy IzqrCGgm4uHGctUucOOL2FMAhNL+a+xsiSZNOhF7GJX41OMJP8kjbEN9OesnTCOg nbo5h/FaH/atWXAXCrZfFQpekFEfY4OE+LMGBuIyU6mgdHF396zE= Received: (qmail 13555 invoked by alias); 1 Aug 2013 10:06:59 -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 13529 invoked by uid 89); 1 Aug 2013 10:06:59 -0000 X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL, BAYES_50, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_NO, RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 01 Aug 2013 10:06:58 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id F03525431AA; Thu, 1 Aug 2013 12:06:49 +0200 (CEST) Date: Thu, 1 Aug 2013 12:06:49 +0200 From: Jan Hubicka To: David Edelsohn Cc: Jan Hubicka , GCC Patches Subject: Re: Fix ICE when profiles are mismatched Message-ID: <20130801100649.GB3861@kam.mff.cuni.cz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) > Honza, > > After this patch, I see new testsuite failures on PowerPC related to profiling. > > FAIL: gcc.dg/tree-prof/ic-misattribution-1.c scan-ipa-dump profile > "hist->count 1 hist->all 1" > FAIL: gcc.dg/tree-prof/indir-call-prof.c scan-ipa-dump profile > "Indirect call -> direct call.* a1 transformation on insn" Oops, thanks! This silly bug took us quite a some time with Martin. Depending on memory allocator it depends if aact_count[8] is non-NULL. Index: ChangeLog =================================================================== --- ChangeLog (revision 201400) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2013-08-01 Jan Hubicka + + * profile.c (compute_value_histograms): Fix thinko. + 2013-08-01 Sofiane Naci * config.gcc (aarch64*-*-*): Add aarch-common.o to extra_objs. Add Index: profile.c =================================================================== --- profile.c (revision 201367) +++ profile.c (working copy) @@ -891,7 +891,7 @@ compute_value_histograms (histogram_valu gimple_add_histogram_value (cfun, stmt, hist); hist->hvalue.counters = XNEWVEC (gcov_type, hist->n_counters); for (j = 0; j < hist->n_counters; j++) - if (aact_count[t]) + if (aact_count) hist->hvalue.counters[j] = aact_count[j]; else hist->hvalue.counters[j] = 0;