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 3BDEE3858288 for ; Tue, 10 Oct 2023 09:49:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BDEE3858288 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=1696931372; 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=NYGLo51F5AfGOhXZAF8IcAT9mFvKgFTcjrGcPysaiuE=; b=U58LMIag1OM2RvcGU/Q42Mt2mZsf4Yo78UTtofxNWTGmyF1bnblQcKRSPgUFBX2dmuD9NL sOjmpRr5k+P3ORUKb2rhUgG+1XP/m79f5CsVDF/OjTwdKTlLGCy+Twx+Ll6GM9bOnsS1Dh UplvfgaHyltWccN+swy0Q4idYkugvmY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-479-m9nKuRIuNeidxszult2nsg-1; Tue, 10 Oct 2023 05:49:29 -0400 X-MC-Unique: m9nKuRIuNeidxszult2nsg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1E0E580349A; Tue, 10 Oct 2023 09:49:29 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE62447AD4A; Tue, 10 Oct 2023 09:49:28 +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 39A9nPXC1112586 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 10 Oct 2023 11:49:26 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 39A9nOlQ1112585; Tue, 10 Oct 2023 11:49:24 +0200 Date: Tue, 10 Oct 2023 11:49:24 +0200 From: Jakub Jelinek To: Richard Biener Cc: Richard Sandiford , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] wide-int: Remove rwide_int, introduce dw_wide_int Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 Tue, Oct 10, 2023 at 09:30:31AM +0000, Richard Biener wrote: > On Mon, 9 Oct 2023, Jakub Jelinek wrote: > > > On Mon, Oct 09, 2023 at 12:55:02PM +0200, Jakub Jelinek wrote: > > > This makes wide_int unusable in GC structures, so for dwarf2out > > > which was the only place which needed it there is a new rwide_int type > > > (restricted wide_int) which supports only up to RWIDE_INT_MAX_ELTS limbs > > > inline and is trivially copyable (dwarf2out should never deal with large > > > _BitInt constants, those should have been lowered earlier). > > > > As discussed on IRC, the dwarf2out.{h,cc} needs are actually quite limited, > > it just needs to allocate new GC structures val_wide points to (constructed > > from some const wide_int_ref &) and needs to call operator==, > > get_precision, elt, get_len and get_val methods on it. > > Even trailing_wide_int would be overkill for that, the following just adds > > a new struct with precision/len and trailing val array members and > > implements the needed methods (only 2 of them using wide_int_ref constructed > > from those). > > > > Incremental patch, so far compile time tested only: > > LGTM, wonder if we can push this separately as prerequesite? The dwarf2out.{h,cc} changes sure, the wide-int.h changes obviously need to be merged into the main patch. Jakub