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 4FBCF3857C47 for ; Thu, 11 Nov 2021 13:25:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4FBCF3857C47 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 224722827E7; Thu, 11 Nov 2021 14:25:34 +0100 (CET) Date: Thu, 11 Nov 2021 14:25:34 +0100 From: Jan Hubicka To: Richard Biener Cc: GCC Patches Subject: Re: Use modref summary to DSE calls to non-pure functions Message-ID: <20211111132534.GD17431@kam.mff.cuni.cz> References: <20211110124316.GF97553@kam.mff.cuni.cz> <20211111120715.GC47134@kam.mff.cuni.cz> <20211111124243.GA17431@kam.mff.cuni.cz> 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.6 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-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, 11 Nov 2021 13:25:37 -0000 > > Hmm, I could try to do this, but possibly incrementally? > > You mean handle a &decl argument specially for unknown param offset? > Yeah, I guess so. I think it is also pointer that was allocated and is going to be freed... > > > Basically I want to have > > > > foo (&decl) > > decl = {} > > > > To be matched since even if I do not know the offset I know it is dead > > after end of lifetime of the decl. I am not quite sure PTA will give me > > that? > > for this case PTA should tell you the alias is to 'decl' only but then I'm > not sure if stmt_kills_ref_p is up to the task to determine that 'decl = {}', > from a quick look it doesn't. So indeed the only interesting case will > be a &decl based parameter which we can special-case. Yep, i do not think it understands this. I will look into it - I guess it is common enough to care about. Honza