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 5F8A7385843F; Thu, 28 Oct 2021 12:34:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F8A7385843F Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 4364D280941; Thu, 28 Oct 2021 14:34:32 +0200 (CEST) Date: Thu, 28 Oct 2021 14:34:32 +0200 From: Jan Hubicka To: "rguenth at gcc dot gnu.org" Cc: gcc-bugs@gcc.gnu.org, mliska@suse.cz Subject: Re: [Bug ipa/102982] [12 Regression] Dead Code Elimination Regression at -O3 (trunk vs 11.2.0) Message-ID: <20211028123432.GA52780@kam.mff.cuni.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2021 12:34:34 -0000 > > fixup_cfg already removes write-only stores so that seems fit for that > purpose. > > Btw, > > static int x = 1; > > int main() > { > x = 1; > } > > should ideally be handled as well as maybe the more common(?) > > static int x[128]; > > int main() > { > memset (x, 0, 128*4); > } > > so we'd like to store a (constant) RHS for the stores in the summaries? > (I suppose we cannot selectively stream in a single stmt ;)) Yep, what we want is to have way to attach summaries to particular IPA_REF_load/store/addr just like we annotate call sites... It would be nice to extend symbol-summary.h for that. Martin, would you be interested to look into it? Honza