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 CB6F63858D33; Fri, 28 Jul 2023 08:01:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB6F63858D33 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id AD4A62828DF; Fri, 28 Jul 2023 10:01:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1690531264; 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=Ihf9ncdHvDoxbcw43Ue+IShu9wQ6HThEVv+/1GVEBwc=; b=Um6iI7kRdemNboqqpQ9hmDqe1IFp287oTvMTZCA1M2Uy+2J2m6I2ktvXB4dO5dazaT4+bj v30fLV7hI860/o42VcLHQj+zbnVGLkis1UP+yT5VjeNjfQEE0oQclUaWRFHmzZ5M67Nesu MR/GeZlScqjifvGiSBebyRk/Z00GPUQ= Date: Fri, 28 Jul 2023 10:01:04 +0200 From: Jan Hubicka To: rguenther at suse dot de Cc: gcc-bugs@gcc.gnu.org Subject: Re: [Bug tree-optimization/106293] [13/14 Regression] 456.hmmer at -Ofast -march=native regressed by 19% on zen2 and zen3 in July 2022 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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: > This heuristic wants to catch > > > if (foo) abort (); > > > and avoid sinking "too far" across a path with "similar enough" > execution count (I think the original motivation was to fix some > spilling / register pressure issue). The loop depth test > should be !(bb_loop_depth (best_bb) < bb_loop_depth (early_bb)) I am still concenred that loop_depth (bb1) < loop_depth (bb2) does not really imply that bb1 is not in different loop nest with loop with significantly higher iteration count than bb2... > so we shouldn't limit sinking to a more outer nest. As we rule > out > before this becomes ==. > > It looks tempting to sink to the earliest place with the same > execution count rather than the latest but the above doesn't > really achive that (it doesn't look "upwards" but simply fails). > With a guessed profile it's also going to be hard. Statistically guessed profile works quite well for things like placement of splills in IRA (not perfectly of course) and this looks like kind of similar thing. So perhaps it could work reasoably well... > > And it in no way implements register pressure / spilling sensitivity > (see also Ajits attempts at producing a patch that avoids sinking > across a call). All these are ultimatively doomed unless we at least > consider a group of stmts together. hmm, life is hard :) Honza