From patchwork Tue Nov 14 19:35:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 838005 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-466772-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="oJv8gSmN"; 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 3ybyQq3jjXz9rxm for ; Wed, 15 Nov 2017 06:35:31 +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=FJGQHsy1zOK9l7cHXYELY9BzQyImfhTN/eqfl26De7HLV7kVMCcHz LWA1sUCmChkvzesoBjtun/z+d87pjCin2X1ndTG2WV/iXLdDH4iRCgtbfKhQsced uTNttn89ihDCDMRg3bWOOxnQhYLYFfiT4nfrGRC/igK8J+KEQ/DKkU= 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=SkvAw/5uIduzhUAhbAR7YTYMtIo=; b=oJv8gSmNZsSc9ajPuny0 qk5u6mDIPe7QcDSTT5+j1d2dKY2vV2Jj1OJPYCmT07+j2fXuDsExBa4sV0RlvA2j CtSZVaIFfF/XU4aDXhCqRM2nhwX24CT2nI7k2WjVXxtJbTkuSt7WdpxCcYA48pHn 2BXz4rQ3roMKqr8pLLL0JKk= Received: (qmail 120812 invoked by alias); 14 Nov 2017 19:35:24 -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 120794 invoked by uid 89); 14 Nov 2017 19:35:23 -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=sk:path_in, sk:redirec, buckets, sk:ssa_fix 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 19:35:21 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id EC118547365; Tue, 14 Nov 2017 20:35:18 +0100 (CET) Date: Tue, 14 Nov 2017 20:35:18 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Remove computation of path_in_freq in tree-ssa-threadupdate Message-ID: <20171114193518.GA83799@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Hi, this patch removes now unused variable. Bootstrapped/regtested x86_64-linux, comitted. Honza * tree-ssa-threadupdate.c (compute_path_counts): Remove unused path_in_freq_ptr parameter. (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq Index: tree-ssa-threadupdate.c =================================================================== --- tree-ssa-threadupdate.c (revision 254719) +++ tree-ssa-threadupdate.c (working copy) @@ -691,8 +691,7 @@ static bool compute_path_counts (struct redirection_data *rd, ssa_local_info_t *local_info, profile_count *path_in_count_ptr, - profile_count *path_out_count_ptr, - int *path_in_freq_ptr) + profile_count *path_out_count_ptr) { edge e = rd->incoming_edges->e; vec *path = THREAD_PATH (e); @@ -700,7 +699,6 @@ compute_path_counts (struct redirection_ profile_count nonpath_count = profile_count::zero (); bool has_joiner = false; profile_count path_in_count = profile_count::zero (); - int path_in_freq = 0; /* Start by accumulating incoming edge counts to the path's first bb into a couple buckets: @@ -740,7 +738,6 @@ compute_path_counts (struct redirection_ source block. */ gcc_assert (ein_path->last ()->e == elast); path_in_count += ein->count (); - path_in_freq += EDGE_FREQUENCY (ein); } else if (!ein_path) { @@ -751,10 +748,6 @@ compute_path_counts (struct redirection_ } } - /* This is needed due to insane incoming frequencies. */ - if (path_in_freq > BB_FREQ_MAX) - path_in_freq = BB_FREQ_MAX; - /* Now compute the fraction of the total count coming into the first path bb that is from the current threading path. */ profile_count total_count = e->dest->count; @@ -843,7 +836,6 @@ compute_path_counts (struct redirection_ *path_in_count_ptr = path_in_count; *path_out_count_ptr = path_out_count; - *path_in_freq_ptr = path_in_freq; return has_joiner; } @@ -954,7 +946,6 @@ ssa_fix_duplicate_block_edges (struct re edge elast = path->last ()->e; profile_count path_in_count = profile_count::zero (); profile_count path_out_count = profile_count::zero (); - int path_in_freq = 0; /* First determine how much profile count to move from original path to the duplicate path. This is tricky in the presence of @@ -963,8 +954,7 @@ ssa_fix_duplicate_block_edges (struct re non-joiner case the path_in_count and path_out_count should be the same. */ bool has_joiner = compute_path_counts (rd, local_info, - &path_in_count, &path_out_count, - &path_in_freq); + &path_in_count, &path_out_count); for (unsigned int count = 0, i = 1; i < path->length (); i++) {