From patchwork Tue Nov 14 09:13:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 837754 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-466704-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="uZxACUL2"; 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 3ybhdq0yj5z9s9Y for ; Tue, 14 Nov 2017 20:14:06 +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=QS0++ldB0H72RqrJipFE1v8ZKW2+EMwWXmbrac0o0HT/J6YK0hfOv 54m7QfAKpvR9mXNTI5e/MS348SDMfdvLUg7xqhmcYnLfqN4u3bHSwQe5M9b1BQfL 2Bx6Re+QFlx6R+x9gXryqj92fKPjiWVPcWTb5RST68GDHbq0R/rtKw= 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=yhU6+wJzQ/wWrhqfuXTcnqnggWU=; b=uZxACUL2In4gf4/nud6y 2Pedz9VBh3oHZfijBnw6FOBMirz0ST1Bru+IQIC0mPgcSvRKpUZtbNd9YjdaDAP0 QtZA6FWxFekF0Eiulx84+g4FM+NJQfg945Ij6T/n/0GUswBz5tMRPmZmf/g2s6Vs 4OZIJnTZEnJewZitZM4CUi0= Received: (qmail 27496 invoked by alias); 14 Nov 2017 09:13:57 -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 27480 invoked by uid 89); 14 Nov 2017 09:13:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KB_WAM_FROM_NAME_SINGLEWORD, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=estimates 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; Tue, 14 Nov 2017 09:13:56 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 1A153548B52; Tue, 14 Nov 2017 10:13:54 +0100 (CET) Date: Tue, 14 Nov 2017 10:13:54 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Cleanup ipa-inline inlined time estimates Message-ID: <20171114091353.GB70470@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Hi, there is no longer need to use counts because the path using frequencies does precisely the same. Bootstrapped/regtested x86_64-linux, comitted. * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time): always use frequencies. Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 254719) +++ ipa-inline.c (working copy) @@ -640,10 +640,6 @@ compute_uninlined_call_time (struct cgra ? edge->caller->global.inlined_to : edge->caller); - if (edge->count.ipa ().nonzero_p () - && caller->count.ipa ().nonzero_p ()) - uninlined_call_time *= (sreal)edge->count.ipa ().to_gcov_type () - / caller->count.ipa ().to_gcov_type (); sreal freq = edge->sreal_frequency (); if (freq != 0) uninlined_call_time *= freq; @@ -666,9 +662,6 @@ compute_inlined_call_time (struct cgraph : edge->caller); sreal caller_time = ipa_fn_summaries->get (caller)->time; - if (edge->count.ipa ().nonzero_p () - && caller->count.ipa ().nonzero_p ()) - time *= (sreal)edge->count.to_gcov_type () / caller->count.to_gcov_type (); sreal freq = edge->sreal_frequency (); if (freq != 0) time *= freq; @@ -1954,7 +1947,7 @@ inline_small_functions (void) ? gimple_lineno ((const gimple *) edge->call_stmt) : -1, badness.to_double (), - edge->frequency () / (double)CGRAPH_FREQ_BASE); + edge->sreal_frequency ().to_double ()); if (edge->count.ipa ().initialized_p ()) { fprintf (dump_file, " Called ");