From patchwork Tue Nov 19 19:09:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 1197596 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-514065-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="f/sl4tR+"; 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 47Hb3R0pWbz9sPL for ; Wed, 20 Nov 2019 06:09:22 +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=gPo5jenHd1pP0EWF15WF021qOSWLEs0Bc0BWeoD7SPKIInTsA214/ aveYTqYlsr+HHw/EYcT+Rj23kAkTEgnD/qtrVW8vcfc06j5ys+EG/uEvzXNIh4UP PMrAF/jvtZYjEKf5Kyfq4jEe9B7aUed+xjeMV0eoErILTub71zBeLY= 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=XzKVA9t6cI1d8lUkef5/HdOi4/k=; b=f/sl4tR+5+4PkS+/RpOz dFajjF32qFudky59/Egr/307kW0OdNC+mE4NVzWVUQXi3fUv/XxF/kbulkt9XBR/ Izl0xJVhLbnGBGbK4LfJHWxPnBWc6KSNo2+kvy1GBJwqyZ/b54T5aAeU1ZXhS9Lo nftMu6NLON10aoVNPgMDItw= Received: (qmail 70660 invoked by alias); 19 Nov 2019 19:09:15 -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 70652 invoked by uid 89); 19 Nov 2019 19:09:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1878, *time 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, 19 Nov 2019 19:09:14 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id D609C283298; Tue, 19 Nov 2019 20:09:10 +0100 (CET) Date: Tue, 19 Nov 2019 20:09:10 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Remove unused parameter to estimate_edge_size_and_time Message-ID: <20191119190910.tvtx7s2wohit5f7a@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Hi, this patch removes unused argument of estimate_edge_size_and_time. Bootstrapped/regtested x86_64-linux, comitted. * ipa-fnsummary.c (estimate_edge_size_and_time): Drop parameter PROP. (estimate_calls_size_and_time): Update. Index: ipa-fnsummary.c =================================================================== --- ipa-fnsummary.c (revision 278441) +++ ipa-fnsummary.c (working copy) @@ -2950,7 +2950,6 @@ estimate_edge_devirt_benefit (struct cgr static inline void estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *min_size, sreal *time, - int prob, vec known_vals, vec known_contexts, vec known_aggs, @@ -2960,6 +2959,7 @@ estimate_edge_size_and_time (struct cgra int call_size = es->call_stmt_size; int call_time = es->call_stmt_time; int cur_size; + if (!e->callee && hints && e->maybe_hot_p () && estimate_edge_devirt_benefit (e, &call_size, &call_time, known_vals, known_contexts, known_aggs)) @@ -2968,12 +2968,8 @@ estimate_edge_size_and_time (struct cgra *size += cur_size; if (min_size) *min_size += cur_size; - if (!time) - ; - else if (prob == REG_BR_PROB_BASE) + if (time) *time += ((sreal)call_time) * e->sreal_frequency (); - else - *time += ((sreal)call_time * prob) * e->sreal_frequency (); } @@ -3019,7 +3015,7 @@ estimate_calls_size_and_time (struct cgr sowe do not need to compute probabilities. */ estimate_edge_size_and_time (e, size, es->predicate ? NULL : min_size, - time, REG_BR_PROB_BASE, + time, known_vals, known_contexts, known_aggs, hints); } @@ -3031,7 +3027,7 @@ estimate_calls_size_and_time (struct cgr || es->predicate->evaluate (possible_truths)) estimate_edge_size_and_time (e, size, es->predicate ? NULL : min_size, - time, REG_BR_PROB_BASE, + time, known_vals, known_contexts, known_aggs, hints); }