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 BB0963858C3A for ; Tue, 18 Apr 2023 09:33:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB0963858C3A 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=1681810388; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=CpUVLaAde4VuOAkif2Ga5tEzcrFLY3DdwCPBF5N9/Ks=; b=MTHFG/FOc10son7fHq1vjr9CTYhUYUN6mu3siYQNcs1Jbut6nTU7S6RGLPAbowEv8bG4+z wixsAMkK07pdz1CT42+FELwDl5eO1J6Wm5iZ8Bna3WGNKib8VsDuuCub0nxVbkG5PWTWfX aMJYED5Jl67hKn7ZlUFk6KHtVAr6LK4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-oW3xzcWRPuGOeGOZwyn-7Q-1; Tue, 18 Apr 2023 05:33:07 -0400 X-MC-Unique: oW3xzcWRPuGOeGOZwyn-7Q-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1493D280A326; Tue, 18 Apr 2023 09:33:07 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA215403151; Tue, 18 Apr 2023 09:33:06 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 33I9X4BN111806 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 18 Apr 2023 11:33:04 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 33I9X3av111805; Tue, 18 Apr 2023 11:33:03 +0200 Date: Tue, 18 Apr 2023 11:33:03 +0200 From: Jakub Jelinek To: Aldy Hernandez Cc: GCC patches , Andrew MacLeod , Richard Biener Subject: Re: [PATCH] Add inchash support for vrange. Message-ID: Reply-To: Jakub Jelinek References: <20230418090637.253140-1-aldyh@redhat.com> <20230418090637.253140-2-aldyh@redhat.com> MIME-Version: 1.0 In-Reply-To: <20230418090637.253140-2-aldyh@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 Tue, Apr 18, 2023 at 11:06:38AM +0200, Aldy Hernandez via Gcc-patches wrote: > This patch provides inchash support for vrange. It is along the lines > of the streaming support I just posted and will be used for IPA > hashing of ranges. > > Thoughts? > > gcc/ChangeLog: > > * inchash.cc (hash::add_real_value): New. > * inchash.h (class hash): Add add_real_value. > * value-range.cc (add_vrange): New. > * value-range.h (inchash::add_vrange): New. > --- > gcc/inchash.cc | 20 +++++++++++++++++++ > gcc/inchash.h | 2 ++ > gcc/value-range.cc | 48 ++++++++++++++++++++++++++++++++++++++++++++++ > gcc/value-range.h | 6 ++++++ > 4 files changed, 76 insertions(+) > > diff --git a/gcc/inchash.cc b/gcc/inchash.cc > index a30662b97fe..914e3cc92cd 100644 > --- a/gcc/inchash.cc > +++ b/gcc/inchash.cc > @@ -24,3 +24,23 @@ along with GCC; see the file COPYING3. If not see > #endif > #include "system.h" > #include "coretypes.h" > +#include "real.h" > +#include "inchash.h" > + > +namespace inchash > +{ > + > +/* This is here instead of inchash.h to keep us from having to put > + real.h in coretypes.h. */ > +void > +hash::add_real_value (const real_value &v) > +{ > + add_int (v.sign); > + add_int (v.uexp); > + for (unsigned i = 0; i < SIGSZ; ++i) > + add_hwi (v.sig[i]); > + /* Ignore the rest of the flags, as sign, exponent, and > + significant bits should be enough. */ I don't think that's the case. At least cl, decimal and signalling are essential flags as well. Dunno about canonical. How do you otherwise differentiate between Inf and +0.0 or (canonical) qNaN or (canonical) sNaN? They have the same sign, uexp and sig. Jakub