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.129.124]) by sourceware.org (Postfix) with ESMTPS id 507223858D28 for ; Tue, 17 Jan 2023 11:14:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 507223858D28 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=1673954058; 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=uVV/VY6jtdpSNMmmEaQrvQRqMS4NfvvacxUNEYarUek=; b=PXkxWBAb2vTqMS7D5ZVfqhTHHp12f0NnNGSGgjm62MdrYya+EM/hPyTAEEILFfPJQIYvXh s3W4bZc34uT0Ma84+B5KlRxPq4fHOunTID8+9YK+qi/QxFPziFXBpLP/UmRB7pBSNBZ3YL rTHdNPy+144GNKTkO2z5Up1o6eEIz5I= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-329-UkgGvKdnPXyuL8dHx4bs2Q-1; Tue, 17 Jan 2023 06:14:16 -0500 X-MC-Unique: UkgGvKdnPXyuL8dHx4bs2Q-1 Received: by mail-wm1-f71.google.com with SMTP id fm17-20020a05600c0c1100b003d96f0a7f2eso19887819wmb.6 for ; Tue, 17 Jan 2023 03:14:16 -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=uVV/VY6jtdpSNMmmEaQrvQRqMS4NfvvacxUNEYarUek=; b=Y2fNaJccg4vxpY/gtXxa+syRgUvbFPrLCi3kln373e+68FWuc7xe9DQ8+C4nuwV2N3 Ix8ujWX3QefncPG3x+btvne46cBV+ZMtIenGOFy9ua5Tl6MIoIoPiVHuk2HoDkHBK0/S 6IOyreGGAagbswgERq89qJfOyaamMi/ye1oiNe7oEZvZ44ERf4VwTxcBRq6yf+mUDvA3 i+8+Q0bzKz5OFPExlpivi+pwNKTA2by+krrGdi/qw2coi/CPPlSal4W3IRwEIllYkHcr nin/3fxAZA7tao3twVzoxAFy1GbpAyKYHxKb+Nvvgeuf7DKjXjcmSD7HEPDtpx0UD1SJ uqBA== X-Gm-Message-State: AFqh2krOjcN+6bPa3B1aGML0n8oH8EKbB2zXYa2oTlSAbHK185ZYhyA+ it9O3FEdjo8ph7nMw5SARO6MbaPTm5jttxT2X5nJJ26opSNAGn7FqVle4PXRPTtDlXimX55j/uQ GfVMxm5LCQS8N8jZy0g== X-Received: by 2002:adf:f791:0:b0:29d:f817:42c1 with SMTP id q17-20020adff791000000b0029df81742c1mr2505184wrp.54.1673954055815; Tue, 17 Jan 2023 03:14:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdx+TdPHBTx6Zg3Ql+yRf/AFc+6RsqxV5Xm8j+n+QgD0fV5eOpy65JmfZq4gYFPi7NiXiY2Q== X-Received: by 2002:adf:f791:0:b0:29d:f817:42c1 with SMTP id q17-20020adff791000000b0029df81742c1mr2505174wrp.54.1673954055507; Tue, 17 Jan 2023 03:14:15 -0800 (PST) Received: from [192.168.1.201] ([139.47.32.75]) by smtp.gmail.com with ESMTPSA id w4-20020a5d4b44000000b002366dd0e030sm28344651wrs.68.2023.01.17.03.14.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Jan 2023 03:14:15 -0800 (PST) Message-ID: <675a8a92-74da-9633-ffe0-8f3ee7d6bf57@redhat.com> Date: Tue, 17 Jan 2023 12:14:14 +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: 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.5 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:09, Jakub Jelinek wrote: > On Tue, Jan 17, 2023 at 11:59:53AM +0100, Aldy Hernandez wrote: >> >> >> On 1/17/23 10:47, Jakub Jelinek wrote: >> >>> Aldy/Andrew, is the ranger query ok or should I use something different >>> when check_range_stmt is non-NULL and I know on which statement to ask? >> >> >> >>> + int_range_max r; >>> + if (!get_global_range_query ()->range_of_expr (r, rotcnt, >>> + check_range_stmt)) >>> + return false; >> >> range_of_expr will work with and without a statement. If no statement is >> provided, it will return the global range. So you can use the same >> range_of_expr call with a statement or without one if you don't know it. >> >> Note that get_global_range_query () will always return a global query object >> (think SSA_NAME_RANGE_INFO). It will never use an existing ranger (for >> example, if called within VRP or another pass that has an active ranger >> enabled). If simplify_rotate() may be used from some of these passes you >> *may* want to use get_range_query() which will pick up the active ranger, or >> a global query object if no ranger is active. > > This is always in the forwprop pass. > I think it doesn't have any active ranger instance, but I could be wrong. > > 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. Aldy