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 D1AD7398B865 for ; Thu, 8 Jul 2021 13:16:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D1AD7398B865 Authentication-Results: sourceware.org; dmarc=none (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 58D88282AD9; Thu, 8 Jul 2021 15:16:34 +0200 (CEST) Date: Thu, 8 Jul 2021 15:16:34 +0200 From: Jan Hubicka To: Martin Jambor Cc: GCC Patches Subject: Re: [PATCH] ipa-sra: Fix thinko when overriding safe_to_import_accesses (PR 101066) Message-ID: <20210708131634.GA52801@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=-8.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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, 08 Jul 2021 13:16:37 -0000 Hi, > 2021-06-16 Martin Jambor > > PR ipa/101066 > * ipa-sra.c (class isra_call_summary): New member > m_before_any_store, initialize it in the constructor. > (isra_call_summary::dump): Dump the new field. > (ipa_sra_call_summaries::duplicate): Copy it. > (process_scan_results): Set it. > (isra_write_edge_summary): Stream it. > (isra_read_edge_summary): Likewise. > (param_splitting_across_edge): Only override > safe_to_import_accesses if m_before_any_store is set. > > gcc/testsuite/ChangeLog: > > 2021-06-16 Martin Jambor > > PR ipa/101066 > * gcc.dg/ipa/pr101066.c: New test. OK, thanks! The analysis disabling transformation on any memory store is overly conservative. We have pointer (which is a parameter and comes from outer world) and no type infomration, however alias oracle will still be able to disambiguate when memory access is to non-escaping local memory or mallocated memory block etc. Honza