From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id C61C63858D28 for ; Mon, 4 Mar 2024 08:05:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C61C63858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C61C63858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709539515; cv=none; b=fBUvCGLWLiUf5szHsmZ0PaknTZrEnJrtQvXqHgSoexPVSRQ1/V1mHtiE1lDvoZzzOYPuAhQnHaY8Z9hV3/pzc3AzvvApBEIOTNX3PO5tYtx8aZg9SopR+PjPxRomqugi5YjY3QJVIHRbU/7mCAQSvfZQkd6CqEANsl84bLeSRpg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709539515; c=relaxed/simple; bh=RtKVVYUbUqSPDu6lOcqJpkYebQ7QueQCrbJTm5WgKQ4=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:Message-ID:MIME-Version; b=ZUHYCtNNy89y02oomSwkaPm3K5w4IFyKwUsUowoDhMoaAtcJFfYBGywA+Bu4WAUb5m+H2eAvuzTDkdZbhclvSVYpJvxP30AQt/fnmfSbgpGRYd27YF34K+Tb/bjyudI82xp7CCT00FY2cwMC0CQS1snZ5GGsAEJQkXhhuZYUTpc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.168.4.150] (unknown [10.168.4.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A17394DCAD; Mon, 4 Mar 2024 08:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709539512; h=from:from:reply-to: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=JXOspu/JsqNBAwRkF7Eqn0JZ8zw4qiAqT+sH+xWClZQ=; b=jn0D0fBq+ZuoQUcKKcJfeeclKLo5Yz/BHimq/nzM2VljXYLZySlQKWX5M4Z1R9WTLUy6Ez xY0cs2ctTVWaoGjCemEaKIPI3mjoMt6DeEQJ8YUgn+Ot97VuePBESFqpXc6IkaU/uczftv aBsB4A6yLcYZMy38neE3UAB8d5DqOmY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709539512; h=from:from:reply-to: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=JXOspu/JsqNBAwRkF7Eqn0JZ8zw4qiAqT+sH+xWClZQ=; b=RdYQjGx79e4NJG9AP18tx5xKX7p1zvlBWGNIOzFZLw+OGN/ERoUBCVxOJ9zSNaU52TPaFv gzlQ/I1iUCw61iAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709539512; h=from:from:reply-to: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=JXOspu/JsqNBAwRkF7Eqn0JZ8zw4qiAqT+sH+xWClZQ=; b=jn0D0fBq+ZuoQUcKKcJfeeclKLo5Yz/BHimq/nzM2VljXYLZySlQKWX5M4Z1R9WTLUy6Ez xY0cs2ctTVWaoGjCemEaKIPI3mjoMt6DeEQJ8YUgn+Ot97VuePBESFqpXc6IkaU/uczftv aBsB4A6yLcYZMy38neE3UAB8d5DqOmY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709539512; h=from:from:reply-to: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=JXOspu/JsqNBAwRkF7Eqn0JZ8zw4qiAqT+sH+xWClZQ=; b=RdYQjGx79e4NJG9AP18tx5xKX7p1zvlBWGNIOzFZLw+OGN/ERoUBCVxOJ9zSNaU52TPaFv gzlQ/I1iUCw61iAg== Date: Mon, 4 Mar 2024 09:05:12 +0100 (CET) From: Richard Biener To: Jeff Law cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] rtl-optimization/113597 - recover base term for argument pointers In-Reply-To: <5f80b3aa-6add-4b64-89f3-75001d92d8b6@gmail.com> Message-ID: References: <65c5fdce.5d0a0220.b4fa7.11a6SMTPIN_ADDED_MISSING@mx.google.com> <5f80b3aa-6add-4b64-89f3-75001d92d8b6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-0.11 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; BAYES_HAM(-0.01)[50.84%] X-Spam-Level: X-Spam-Score: -0.11 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, 3 Mar 2024, Jeff Law wrote: > > > On 2/9/24 03:26, Richard Biener wrote: > > The following allows a base term to be derived from an existing > > MEM_EXPR, notably the points-to set of a MEM_REF base. For the > > testcase in the PR this helps RTL DSE elide stores to a stack > > temporary. This covers pointers to NONLOCAL which can be mapped > > to arg_base_value, helping to disambiguate against other special > > bases (ADDRESS) as well as PARM_DECL accesses. > I like it and as you note later, it's extendable. > > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > > > This is an attempt to recover some of the losses from dumbing down > > find_base_{term,value}. I did give my ideas how to properly do > > this during stage1 a start, I will post a short incomplete RFC series > > later today. > I saw those, but set them aside for gcc-15. > > > > > OK for trunk? > > > > I've included all languages in testing and also tested with -m32 but > > details of RTL alias analysis might escape me ... > > > > Thanks, > > Richard. > > > > PR rtl-optimization/113597 > > * alias.cc (find_base_term): Add argument for the whole mem > > and derive a base term from its MEM_EXPR. > > (true_dependence_1): Pass down the MEMs to find_base_term. > > (write_dependence_p): Likewise. > > (may_alias_p): Likewise. > I'd lean ever so slightly against including this. Not because I see anything > wrong, more so because we don't have a lot of time for this to shake out if > there are any problems. But I wouldn't go as far as to say I object to > including it. > > So OK for the trunk if you want to go forward now. Or defer if you want to > take the somewhat safer route of waiting to gcc-15 to tackle this. There was fallout (arm bootstrap fail) reported, so I defer it to 15 for which I posted another RFC series. I do admit that I can't promise to finish anything here. The reported fallout was not too bad luckily, or maybe just nobody noticed yet. Richard.