From patchwork Sun Dec 8 14:03:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 1205678 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-515449-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="OCRxPojV"; dkim-atps=neutral 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 47W7Mk4wyxz9sP6 for ; Mon, 9 Dec 2019 01:03:28 +1100 (AEDT) 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=hewVVaJ8qrckjvr9JTcOmwN9LXUAMe7DLhBxBhtRYXuMzJC3qitPk mWXntTk72j9KvBrAunbDlrgoH6pOMxoWPDHbk9RBrmTiNY1UtlgaGkV7e4G8qTpb dQBnzjEJpnMbJQY5PHaxZwKjY1QvEUGls5pkndO+gknGKnWR7Iah/0= 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=QHYYYT1lqPq7JO5S47rWWzS8t9o=; b=OCRxPojVXjGxwH2roIT6 M6hbbV2BUolwR1NCzFH1CAtsjizeqnygg8Zk203lDUnvBI/tMEaEmr07rfwQXF77 zTS9vsptwjQ8HIZzQOlcpQZwWNqses563pFXLRGIEbriZpShuBMifq/uu4FNtH9J UVwEB4NXl1GxjaRxnzkXwJY= Received: (qmail 95235 invoked by alias); 8 Dec 2019 14:03:19 -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 95226 invoked by uid 89); 8 Dec 2019 14:03:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=overactive, HX-Languages-Length:1010, profiles X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Dec 2019 14:03:18 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id E52E02805EE; Sun, 8 Dec 2019 15:03:15 +0100 (CET) Date: Sun, 8 Dec 2019 15:03:15 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Silence overactive sanity check with -fpartial-profile-training Message-ID: <20191208140315.r3bbcsglxygpfcdy@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Hi, do_estimate_edge_time tests that cached and real values matches. This test is not working precisely for global profiles because of roundoff issues when profile of clones is subtracted from profile of offline body. This is checked by presence of ipa counter. This breaks with partial profile training because we turn IPA profiles to local when they drop to 0. Bootstrapped/regtested x86_64-linux, comitted. * ipa-inline-analysis.c (do_estimate_edge_time): Silence overactive sanity check. Index: ipa-inline-analysis.c =================================================================== --- ipa-inline-analysis.c (revision 279076) +++ ipa-inline-analysis.c (working copy) @@ -209,6 +209,7 @@ do_estimate_edge_time (struct cgraph_edg nonspec_time = e->entry.nonspec_time; hints = e->entry.hints; if (flag_checking + && !opt_for_fn (callee->decl, flag_profile_partial_training) && !callee->count.ipa_p ()) { sreal chk_time, chk_nonspec_time;