From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id A0FEC39DC4C1 for ; Thu, 22 Jul 2021 23:38:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0FEC39DC4C1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 16MNaZxB002788; Thu, 22 Jul 2021 18:36:35 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 16MNaYa7002787; Thu, 22 Jul 2021 18:36:34 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 22 Jul 2021 18:36:34 -0500 From: Segher Boessenkool To: Richard Biener Cc: "Bin.Cheng" , Eric Botcazou , Jeff Law , "bin.cheng" , GCC Patches Subject: Re: 0001-Don-t-skip-prologue-instructions-as-it-could-affect-.patch Message-ID: <20210722233634.GN1583@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2021 23:38:40 -0000 Hi! On Thu, Jul 22, 2021 at 03:04:32PM +0200, Richard Biener wrote: > On Thu, Jul 22, 2021 at 9:02 AM Bin.Cheng via Gcc-patches > wrote: > > > > Gentle ping. Any suggestions would be appreciated. Bin: I never received your messages. And my replies to you @alibaba are refused by the mail system there as well. I'll dig things up from the ML archives. > So just to say something - does the existing code mean that any use of > the alias info on prologue/epilogue insns is wrong? We have > > /* The prologue/epilogue insns are not threaded onto the > insn chain until after reload has completed. Thus, > there is no sense wasting time checking if INSN is in > the prologue/epilogue until after reload has completed. */ > bool could_be_prologue_epilogue = ((targetm.have_prologue () > || targetm.have_epilogue ()) > && reload_completed); > > so when !could_be_prologue_epilogue then passes shouldn't run into > them if the comment is correct. But else even epilogue stmts could appear > anywhere (like scheduled around)? So why's skipping those OK? > > Are passes supposed to check whether they are dealing with pro/epilogue > insns and not touch them? CCing people that might know. *logue isns should not exist until pass pro_and_epilogue. This pass is later than reload. All such stack accesses use gen_frame_mem(), which does set_mem_alias_set (mem, get_frame_alias_set ()); so what is going wrong here? Segher