From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 1F6D83858D38 for ; Fri, 10 Mar 2023 17:23:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F6D83858D38 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 63ED628A0E5; Fri, 10 Mar 2023 18:23:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1678469035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/If7g5a56tfIppPwnVcWIuwaoqI0qtOAm+7Fcs5Xy4s=; b=nb8GTX4WvvO1LvzyWAzqfHckx8NcWLhUksew3oAedrC+mL6Ya93e8tkHTAIuaMo2mtq7Jl 4lEdC06anw1x1bsZb9AB90QYwoa85xuw3g9GFRlxaYQ0WHue3+5tg+V8DIVrbzF6CRkAtt glOT4mhUf96k5idKHz7dosTjNgAtEPg= Date: Fri, 10 Mar 2023 18:23:55 +0100 From: Jan Hubicka To: Martin Jambor Cc: GCC Patches Subject: Re: [PATCH 1/2] ipa-cp: Fix various issues in update_specialized_profile (PR 107925) Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Hi, > > the patch below fixes various issues in function > update_specialized_profile. The main is removal of the assert which > is bogus in the case of recursive cloning. The division of > unexplained counts is guesswork, which then leads to updates of counts > of recursive edges, which then can be redirected to the new clone and > their count subtracted from the count and there simply may not be > enough left in the count of the original node - especially when we > clone a lot because of using --param ipa-cp-eval-threshold=1. > > The other issue was omission to drop the count of the original node to > ipa count. And when calculating the remainder, we should use > lenient_count_portion_handling to account for partial train runs. > Finally, the patch adds dumping of the original count which I think > is useful. > > Profiled-LTO-bootstrapped on its own and also normally bootstrapped and > tested together with the subsequent patch on an x86_64-linux. OK for > master and the 12 branch - assuming it is also affected? > > Thanks, > > Martin > > > gcc/ChangeLog: > > 2023-02-17 Martin Jambor > > PR ipa/107925 > * ipa-cp.cc (update_specialized_profile): Drop orig_node_count to > ipa count, remove assert, lenient_count_portion_handling, dump > also orig_node_count. OK, thanks! Honza