From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id EE89F3858D28 for ; Tue, 17 Jan 2023 11:44:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE89F3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673955882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VoDJnI27u8PyywBD2sMnhGLlJydDkVk2mrFQ3VmgreA=; b=bhKEGE0EP83izwRMkxVIur6nzGkQN0LUJUZFzBecdtCfJm2XUkaHB8r3mEZbW6kNxXBRum v6aOMl+SjxRBdIGvhSC1mXlOpOHJuuTDDWlV/ig9NHVHqqfnA3S1wonopHxVpx2XJ+xCcD ufI4D2yNQqAvnMcluyY7flUo6lE1C0s= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-616-fS_PAnAGNaisk7ss9Se8LA-1; Tue, 17 Jan 2023 06:44:39 -0500 X-MC-Unique: fS_PAnAGNaisk7ss9Se8LA-1 Received: by mail-wm1-f70.google.com with SMTP id z22-20020a7bc7d6000000b003daf671f7b2so1364069wmk.9 for ; Tue, 17 Jan 2023 03:44:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VoDJnI27u8PyywBD2sMnhGLlJydDkVk2mrFQ3VmgreA=; b=gJDf6SmvZwPCmwxlf7YthkQKAmXkRh/KgoBwU4XGTlUkFuljY+o5AaROtuM70VVm0H SFSk4irlxjzj4SZzi2Fo7nzvuBXVuBKnNqZKVvDMhyCWE8LWoCszfQCyoLjqxMcrxWf2 GEfDoh5lO7Nif4KZS4ojaSFtlUGMH1YQD6nq+JH7hAt88X7m3UVeHClNdCF0t0GVYy1d DjooVVk+S+kIUf2JEmNRqOs8qy/NvCHjYgNA8ub3oKvvCklSDWu4BbXXwWPPmu5ZlEzo j8SbVgGvdqhd0yKeJ/Duur+QCYCHLObjIVKgCa6sfC+zJP3RZJejlUPIiITNTLXdwTu9 b2lA== X-Gm-Message-State: AFqh2krWjRTWIbz8aj/079wNac0qzg+2oaBlgSW++p9LnF4VttTnliF0 FVBWYoE79AB36c/IV2svUGtRlfikN/u/WJGxWEBskp0QSuJZcr9wW5y1iqqAqRGsQywmJpViI/g xzphbDGkvG4cDM9b88A== X-Received: by 2002:adf:ce90:0:b0:2bb:edc7:504 with SMTP id r16-20020adfce90000000b002bbedc70504mr2824922wrn.26.1673955878418; Tue, 17 Jan 2023 03:44:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXtCtmNSL9c9HcbJZ21SO3P7Ipbn8/nh4CcuSJGWM3Y/oWfLiWQrRUV345uY1OM8KVLz2BRgaA== X-Received: by 2002:adf:ce90:0:b0:2bb:edc7:504 with SMTP id r16-20020adfce90000000b002bbedc70504mr2824907wrn.26.1673955878199; Tue, 17 Jan 2023 03:44:38 -0800 (PST) Received: from [192.168.1.201] ([139.47.32.75]) by smtp.gmail.com with ESMTPSA id k2-20020a5d5182000000b00236545edc91sm29048359wrv.76.2023.01.17.03.44.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Jan 2023 03:44:37 -0800 (PST) Message-ID: Date: Tue, 17 Jan 2023 12:44:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523] To: Jakub Jelinek Cc: Richard Biener , Andrew MacLeod , gcc-patches@gcc.gnu.org References: <675a8a92-74da-9633-ffe0-8f3ee7d6bf57@redhat.com> From: Aldy Hernandez In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/17/23 12:33, Jakub Jelinek wrote: > On Tue, Jan 17, 2023 at 12:22:42PM +0100, Aldy Hernandez wrote: >> >> >> On 1/17/23 12:19, Jakub Jelinek wrote: >>> On Tue, Jan 17, 2023 at 12:14:14PM +0100, Aldy Hernandez wrote: >>>>> A question would be if it would be worth to activate it in this spot lazily >>>>> if it isn't active yet (and destruct at the end of the pass). >>>> >>>> That's what it was designed for :). If you're making sporadic requests, the >>>> on-demand mechanism should be fast enough. >>> >>> So what should be done to do the on-demand query rather than global one? >> >> gimple_ranger ranger; >> if (ranger.range_of_expr (r, .....)) >> // business as usual > > So not worth making the ranger somewhere in the pass (if it is really > sporadic like this one)? If you're going to call range_of_expr various times within a pass, creating a pass instance would be the way to go. // Early in your pass. enable_ranger (func); ... if (get_range_query->range_of_expr (....)) { stuff } // Late in your pass: disable_ranger (func); Note that get_range_query() would work even without enable_ranger...it would just pick up the global ranger (SSA_NAME_RANGE_INFO). Aldy > > Will test together with the removal of B from the range. > > Jakub >