From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80076 invoked by alias); 9 Dec 2018 06:40:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 80027 invoked by uid 89); 9 Dec 2018 06:40:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Bin, Hx-languages-length:1642 X-HELO: mail-io1-f66.google.com Received: from mail-io1-f66.google.com (HELO mail-io1-f66.google.com) (209.85.166.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 09 Dec 2018 06:40:27 +0000 Received: by mail-io1-f66.google.com with SMTP id l14so6416214ioj.5 for ; Sat, 08 Dec 2018 22:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JeDnmGBXOfInk6VqQe2tcDo+dkYwHJA/7IXjS6T40QM=; b=eeuAYiXSyH+OUoQdfefkIkg4UQzKYQFfkdRbeJgpJFHRFah2CipuifDoZmj/hfkIFg konOAaV0LpM/5D4WsQaVW1/niu/jcG+tTHcgOVyNRJAdBAYFseYdd2+VuFYdZ7qt7X6/ 1Go85Gi5CQUt+dh64QoUhvUMzn5HLSumyJAQxHf92pSr/9ZM96jRp+DOJWQqHfYoN+4w Bs0nEIf1WmxYeIps5/fxwZpmdbdUBoWbcLyEMLN3XrfuX4hW8qbQApVQrMswwiO6C8LU hCeU/8AIDUhdbJLtNrKKSHVNJb1alVi9VZdewykFcXkMrpwRdL0sFz+yCzRDHYoOQsf8 E6hA== MIME-Version: 1.0 References: <7f153787-f390-4661-92aa-06d47cefbbf5.bin.cheng@linux.alibaba.com> <20181105141206.4ncu3s2v2jxv6o54@kam.mff.cuni.cz> <20181128162042.4vlsfxv643alnq57@kam.mff.cuni.cz> <20181207165706.sfgkycytc4l7rzoh@kam.mff.cuni.cz> In-Reply-To: <20181207165706.sfgkycytc4l7rzoh@kam.mff.cuni.cz> From: "Bin.Cheng" Date: Sun, 09 Dec 2018 06:40:00 -0000 Message-ID: Subject: Re: [PATCH AutoFDO/2]Treat ZERO as common profile probability/count To: Jan Hubicka Cc: bin.cheng@linux.alibaba.com, Richard Guenther , gcc-patches List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00530.txt.bz2 On Sat, Dec 8, 2018 at 12:57 AM Jan Hubicka wrote: > > > Hi Honza, > > I have committed the typo fix as revision 266885. > > Also I followed your suggestion (IIUC) by calling > > profile_count::adjust_for_ipa_scaling for zero den in function > > update_profiling_info. It works and does make more sense than > > changing the global zero check logic. > > Patch tested as before, is it ok? > > Thanks, patch is OK. > What is situation with AutoFDO now? It would be very nice to get it > fixed for the release :) Jeff already approved the major patch, I just need to do minor updates. I will post two more small patches soon. Thanks, bin > > Honza > > > > Thanks, > > bin > > > > diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c > > index 4471bae11c7..5074ef63da1 100644 > > --- a/gcc/ipa-cp.c > > +++ b/gcc/ipa-cp.c > > @@ -3715,9 +3715,11 @@ update_profiling_info (struct cgraph_node *orig_node, > > new_sum = orig_node_count.combine_with_ipa_count (new_sum); > > orig_node->count = remainder; > > > > + profile_count::adjust_for_ipa_scaling (&new_sum, &orig_node_count); > > for (cs = new_node->callees; cs; cs = cs->next_callee) > > cs->count = cs->count.apply_scale (new_sum, orig_node_count); > > > > + profile_count::adjust_for_ipa_scaling (&remainder, &orig_node_count); > > for (cs = orig_node->callees; cs; cs = cs->next_callee) > > cs->count = cs->count.apply_scale (remainder, orig_node_count); > > > > 2018-12-07 Bin Cheng > > > > * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for > > zero profile count.