From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 7B87E385741D for ; Mon, 28 Mar 2022 13:29:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7B87E385741D Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id B32EE210E3; Mon, 28 Mar 2022 13:29:23 +0000 (UTC) Received: from murzim.suse.de (murzim.suse.de [10.160.4.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id ACA35A3B8A; Mon, 28 Mar 2022 13:29:23 +0000 (UTC) Date: Mon, 28 Mar 2022 15:29:23 +0200 (CEST) From: Richard Biener To: Jakub Jelinek cc: gcc-patches@gcc.gnu.org, msebor@redhat.com Subject: Re: [PATCH] tree-optimization/105080 - make sure SCEV is available for ranger In-Reply-To: <2orq11q-7817-95q3-2p9r-s3q5958q1r@fhfr.qr> Message-ID: <56r269p8-98p7-n2p4-o4o3-q12qpo670s7@fhfr.qr> References: <20220328131625.05BFC13215@imap2.suse-dmz.suse.de> <2orq11q-7817-95q3-2p9r-s3q5958q1r@fhfr.qr> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Mon, 28 Mar 2022 13:29:27 -0000 On Mon, 28 Mar 2022, Richard Biener wrote: > On Mon, 28 Mar 2022, Jakub Jelinek wrote: > > > On Mon, Mar 28, 2022 at 03:16:24PM +0200, Richard Biener wrote: > > > When doing format diagnostics at -O0 we should make sure to make > > > SCEV available to avoid false positives due to ranges we otherwise > > > can trivially compute. > > > > > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > > > > > OK if that succeeds? > > > > Doesn't this slow down -O0 compilation too much? > > Not if you do not enable the warning. If you enable it you > probably are set to pay for it. Are you specifically > concerned about the cases where SCEV / niter analysis take > a lot of time or are you concerned about the constant overhead > of enabling loops/SCEV? One concern might be that loop_optimizer_init (LOOPS_NORMAL) changes the IL but the early pass just emits diagnostics so when disabled/enabled (based purely on diagnostic options) generated code could change. Note SCEV currently has (undocumented) contraints on loops so just AVOID_CFG_MANIPULATIONS doens't work there without putting it extra safety checks to give up. Richard. > Richard. > > > > 2022-03-28 Richard Biener > > > > > > PR tree-optimization/105080 > > > * tree-ssa-strlen.cc (printf_strlen_execute): Always init > > > loops and SCEV. > > > > > > * gcc.dg/pr105080.c: New testcase. > > > > Jakub > > > > > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Ivo Totev; HRB 36809 (AG Nuernberg)