From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id D45283858D28 for ; Tue, 23 Nov 2021 15:37:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D45283858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gotplt.org Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]:46444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpXqz-0004oy-1a for gcc-patches@gcc.gnu.org; Tue, 23 Nov 2021 10:37:07 -0500 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2C4BA3213E2; Tue, 23 Nov 2021 15:36:56 +0000 (UTC) Received: from pdx1-sub0-mail-a306.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A95903212A0; Tue, 23 Nov 2021 15:36:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a306.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.116.149.50 (trex/6.4.3); Tue, 23 Nov 2021 15:36:56 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Keen-Zesty: 233f40293324903b_1637681815988_3302878395 X-MC-Loop-Signature: 1637681815988:780355991 X-MC-Ingress-Time: 1637681815988 Received: from [192.168.1.174] (unknown [1.186.224.140]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a306.dreamhost.com (Postfix) with ESMTPSA id 4Hz7Y1723Qz2x; Tue, 23 Nov 2021 07:36:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gotplt.org; s=gotplt.org; t=1637681814; bh=Lw0Unavq10tZrm4ASeCedlFOe74=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=Lnvc7ki04MLk3hjT6b5Zwl1RHFV3GIkURXY/Kw2wVi21w4rojCweypT+gePFeooDT mdDExfv79NS8tWBCC+5mnYWVez7c4plm1t0HGBOtSX7pu5aa+n7JxtOMiuWhm7p0a9 v99k77l8bX22o6imWV4B4TOmUx/9kM1gGM+R9sbA= Message-ID: <773d3a85-b78c-c67e-c190-b9b128d3738b@gotplt.org> Date: Tue, 23 Nov 2021 21:06:49 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions Content-Language: en-US To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org References: <20211109190137.1107736-1-siddhesh@gotplt.org> <20211109190137.1107736-7-siddhesh@gotplt.org> <20211123151252.GZ2646553@tucnak> From: Siddhesh Poyarekar In-Reply-To: <20211123151252.GZ2646553@tucnak> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=23.83.212.47; envelope-from=siddhesh@gotplt.org; helo=cyan.elm.relay.mailchannels.net X-Spam_score_int: -55 X-Spam_score: -5.6 X-Spam_bar: ----- X-Spam_report: (-5.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-3.515, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-3032.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, SPF_FAIL, SPF_HELO_PASS, 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: Tue, 23 Nov 2021 15:37:10 -0000 On 11/23/21 20:42, Jakub Jelinek wrote: > On Wed, Nov 10, 2021 at 12:31:32AM +0530, Siddhesh Poyarekar wrote: >> (object_sizes_execute): Don't insert min/max for dynamic sizes. > > I'm worried about this. > I'd say what we might want to do is in the early pass for __bdos > compute actually __bos (i.e. the static one) and add MIN_EXPR/MAX_EXPR > for the result of the __bdos call from the second pass with the > statically computed value. > > The reason for the MIN_EXPR/MAX_EXPR stuff is that GIMPLE optimizations > can remove exact ADDR_EXPRs with detailed COMPONENT_REF etc. access paths > in it, so during the late objsz2 pass the subobject modes don't work > reliably anymore. But the subobject knowledge should be the same between > the static and dynamic evaluation... So in the dynamic case we almost always end up with the right expression in objsz1, except in cases where late optimizations make available information that wasn't available earlier. How about putting in a MIN_EXPR/MAX_EXPR if we *fail* to get the subobject size instead? Siddhesh