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 8FF203858D1E for ; Wed, 17 May 2023 14:40:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FF203858D1E 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=1684334415; 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=uGqkOAesI2llndc2A0syWEs2wtXBZA+/EMijjoH6eMo=; b=FYDe4UaHHMqEBx73ZvybBZnU8u/CZlHNQuC8aWTynFXPSAxkBgO76Kb0dBIjJG+s+BBNkb XdDNL07u9JGCGX1Y5Hd2Z2C750JioF8a17IDUwNkZCr1YRJN9s58Mqc3F96Vx438N3u4L8 0uknhZ0qHdZZzgTxDdnUW1tuHl+fNpY= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-107-lra6djdkN3G4W218GscSjA-1; Wed, 17 May 2023 10:40:14 -0400 X-MC-Unique: lra6djdkN3G4W218GscSjA-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3063089cff4so533603f8f.0 for ; Wed, 17 May 2023 07:40:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684334412; x=1686926412; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uGqkOAesI2llndc2A0syWEs2wtXBZA+/EMijjoH6eMo=; b=I8kJBoA7yw/BRl+J3A9IepPyQwKM3/+urJdpnu2dBLrTpvjVyRIhSa0VCQa2eGOxnr f7ZiR4WeU7XHXJscwBZtIoTapN0H0yYdycOeocTRTsNt2G52uDXqJ90TtLKrKE/lWm4r kxA/mpDwbUO8Sx40JI7ER5oV3x1f25cG7KEOQt4ggXK12Gg2MnvmWDBoyQgmq8YQ+jY5 pLqMhJIl22iYRbwDPu66lHA3B8C4UTZbcEgrXvoSsKEPClpw4xiHGgPYBOB670Dy6ibW 7geTCeDPFaOp2TochpujjneJdJjfOsi4tRqzBECjYMiqWFWH5dGBkn0o48EQAjIWbG5+ qsqw== X-Gm-Message-State: AC+VfDzZCvO3Cz0cNg+yY5EQWF8DQYjFhJmRCRqSBTojnY10TMJYLZJU icKLXl7nF+bBH9s1iixS8UkO4qYOc1MkgTXk2E8wRI+5RnZRvz2WaLA6tAYsEkIGekYCCnpdq7r SGl1Bv9sP6Q+e3mFJbz/9Be4pGgLeomxCnODNbbsW+n8nUNv9eiltTslTSx3c/2/y+Gp7QgGRow == X-Received: by 2002:a05:6000:108f:b0:306:43a7:c2f0 with SMTP id y15-20020a056000108f00b0030643a7c2f0mr807842wrw.31.1684334412662; Wed, 17 May 2023 07:40:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KezFha6J1wsCvcNAGjnfXxF52B2rqbExdYjf2I+9VoQ038dsyZUq28qu3Hh7BnHHsPHt/nQ== X-Received: by 2002:a05:6000:108f:b0:306:43a7:c2f0 with SMTP id y15-20020a056000108f00b0030643a7c2f0mr807810wrw.31.1684334412052; Wed, 17 May 2023 07:40:12 -0700 (PDT) Received: from [192.168.1.201] ([139.47.42.170]) by smtp.gmail.com with ESMTPSA id k13-20020a05600c0b4d00b003f4e47c6504sm2434466wmr.21.2023.05.17.07.40.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 May 2023 07:40:11 -0700 (PDT) Message-ID: <677bae32-20be-09fd-b892-c832a2339c68@redhat.com> Date: Wed, 17 May 2023 16:40:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] Convert ipcp_vr_lattice to type agnostic framework. To: GCC patches Cc: Andrew MacLeod , Martin Jambor References: <20230517143030.465081-1-aldyh@redhat.com> From: Aldy Hernandez In-Reply-To: <20230517143030.465081-1-aldyh@redhat.com> 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.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 5/17/23 16:30, Aldy Hernandez wrote: > This converts the lattice to store ranges in Value_Range instead of > value_range (*) to make it type agnostic, and adjust all users > accordingly. > > I think it is a good example on converting from static ranges to more > general, type agnostic ones. > > I've been careful to make sure Value_Range never ends up on GC, since > it contains an int_range_max and can expand on-demand onto the heap. > Longer term storage for ranges should be done with vrange_storage, as > per the previous patch ("Provide an API for ipa_vr"). > > (*) I do know the Value_Range naming versus value_range is quite > annoying, but it was a judgement call last release for the eventual > migration to having "value_range" be a type agnostic range object. We > will ultimately rename Value_Range to value_range. I forgot to mention. This doesn't make IPA be type agnostic per se, just the range usage throughout. The IPA code is still guarded by stuff like: if (!param_type || (!INTEGRAL_TYPE_P (param_type) && !POINTER_TYPE_P (param_type))) return dest_lat->set_to_bottom (param_type); It is up to the maintainers to adjust their passes, as I'm liable to break everything in the process ;-). The above should probably become: if (!param_type || !Value_Range::supports_type_p (param_type)) ... This is the canonical way of querying whether a type is supported by Value_Range, the ranger temporary that can handle each supported type, and thus the ranger. This is documented here: // To query what types ranger and the entire ecosystem can support, // use Value_Range::supports_type_p(tree type). This is a static // method available independently of any vrange object. // // To query what a given vrange variant can support, use: // irange::supports_p () // frange::supports_p () // etc However, with the changes I have posted so far, ranges throughout have a much finer granularity and are no longer limited to the 2-sub-ranges in a value_range. If you look at IPA dumps now, you'll see the ranges are much more refined and are streamed for LTO accordingly. This is an improvement in and of itself. Aldy