From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22338 invoked by alias); 26 Feb 2018 19:48:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22318 invoked by uid 89); 26 Feb 2018 19:48:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=protect X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Feb 2018 19:48:43 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D4DA81256; Mon, 26 Feb 2018 19:48:42 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-67.rdu2.redhat.com [10.10.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FEDB5D960; Mon, 26 Feb 2018 19:48:41 +0000 (UTC) Subject: Re: [PATCH][committed][PR tree-optimization/82123] 01/06 Do nothing in EVRP analyzer is not optimizing To: Richard Biener Cc: gcc-patches References: <8ab6de14-3e50-37bb-4c15-f25b788875d8@redhat.com> From: Jeff Law Message-ID: <05910f8f-97d2-99fa-5236-c0bc04843817@redhat.com> Date: Mon, 26 Feb 2018 19:48:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg01456.txt.bz2 On 02/26/2018 05:27 AM, Richard Biener wrote: > On Tue, Feb 20, 2018 at 7:49 PM, Jeff Law wrote: >> This is part #1 of the patches to fix 81592/82123. The changes aren't >> particularly large or invasive, but I already had them broken down >> internally into distinct chunks, so I'm going to send them out that way. >> >> This patch allows the EVRP range analyzer to be safely called even when >> not optimizing. It does no analysis in that case. This prevents >> problems if we were to ask for sprintf warnings but not have the >> optimizer enabled. > > I don't really understand the issue -- when called from sprintf warnings > the evrp analyzer shouldn't "optimize" anything, it only does analysis. > How is that ever a problem when not optimizing? When not optimizing we can have _DECL nodes showing in in places we don't expect them. We also don't consistently canonicalize conditions. There may be other issues as well, I didn't dig deeply into all of them. This causes all kinds of grief when we try to analyze statements. Ideally we'll fix this stuff in gcc-9. Until then it seems far better to have the analyzer protect itself from this cruft than forcing every consumer to guard calls into the analyzer. Jeff