From patchwork Sun Dec 8 16:58:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 1205711 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-515458-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="XtSdLPBZ"; 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 47WCFd6mfjz9sP6 for ; Mon, 9 Dec 2019 03:58:27 +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=oChDx7D7TVxfW3DihgTwoFAKPwP6o1AKRBLHLW39g88NfxF1ngwb6 BJgAEORP1UCIxs0kbolGDxgpRRycwJLcanXbWVfti7zNsVPLAMF2+zGgDLhLxAJS 2MPFJ74K9AuNjIVrsV3Z+DFIZOnOZQpiBXwFmgNO0bCR/cpmsyF50E= 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=5AVt30zEJS60MgpN8X5aK4gt3SE=; b=XtSdLPBZz9xOli6y6VI+ /Th7K9rWbqo4qmTvc6LNn1jivv+CeIxRMjdkpo1PRygT7vfVwBRFhzYg5aqNX+y5 y53rPDHjDlQGiZZFxsQ1JWuQ9OiXcQgxzfBU9QAsXZXYZEnCZVFrKdJO3e0VELGg A22mrEheiDcd3EW41aB1VsI= Received: (qmail 66595 invoked by alias); 8 Dec 2019 16:58:20 -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 66583 invoked by uid 89); 8 Dec 2019 16:58:20 -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= 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 16:58:18 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 81B682805EE; Sun, 8 Dec 2019 17:58:16 +0100 (CET) Date: Sun, 8 Dec 2019 17:58:16 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix tp_first_run update in split_function Message-ID: <20191208165816.rnnldowytoa3xafs@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Hi, the value 0 in tp_first_run is special meaing that profile is unknown. We should not set it to 1. Bootstrapped/regtested x86_64-linux, comitted. * ipa-split.c (split_function): Preserve 0 tp_first_run. Index: ipa-split.c =================================================================== --- ipa-split.c (revision 279076) +++ ipa-split.c (working copy) @@ -1369,7 +1369,8 @@ split_function (basic_block return_bb, c /* Let's take a time profile for splitted function. */ - node->tp_first_run = cur_node->tp_first_run + 1; + if (cur_node->tp_first_run) + node->tp_first_run = cur_node->tp_first_run + 1; /* For usual cloning it is enough to clear builtin only when signature changes. For partial inlining we however cannot expect the part