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 0CDC63858D39 for ; Fri, 8 Dec 2023 00:57:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0CDC63858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0CDC63858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701997035; cv=none; b=cPmIiIm9Z17HU8kVVASo8iARt7+AwkjpRN0N3y41RKdx9Y6SUH9dGsA8UK3X3TT1yDupmXidvCN5dTKgA4nyIlW5TnPj88VS85mSlDR3U2I3VwfZhgN8/Vg3TxNZyPMZipDeA+vcMaJljulpEvi3JPVG1qMvUQOW3TtXtKyvuQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701997035; c=relaxed/simple; bh=9exHwoJnTmOTE8fqt5VhL+3l+XrjUqdAR9bmOnqO2So=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=UwJcvODlY+Vt6Qnn+iTjDViIDOJB8jkpXjOjR+wQFSWv6icPnG1UMbxW6N2SnFL4hYgREkCHcmjXLuRCdqR2kXPFkBoqbpPd5XuqLjNBPqN1Zo2gz45WVwaUSojix+mLsvErFwtw6SPBHl8l7io5zBJr25V4qJ7F60s4mBn9UIw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701997033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9exHwoJnTmOTE8fqt5VhL+3l+XrjUqdAR9bmOnqO2So=; b=faqqXSGid6Vw1OV6njpEMehBJMttl3PtgWQ4QtG8kEIqiQGUzWsbaBwG3B7Qxqmp3kHM2v JcCa83DSC/HddxtmOLHdmH9U6kEU7LMVDATBR7TMCtahBfiF/hW5vYNRHV5rtUAUqCUeWN Dvcvd00ZTlcbjdmlv0/ftiGyOHXldOs= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-0CRtitYsN1WNstoNIrbfLw-1; Thu, 07 Dec 2023 19:57:12 -0500 X-MC-Unique: 0CRtitYsN1WNstoNIrbfLw-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4258d02fbdaso14572611cf.2 for ; Thu, 07 Dec 2023 16:57:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701997031; x=1702601831; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=9exHwoJnTmOTE8fqt5VhL+3l+XrjUqdAR9bmOnqO2So=; b=IT0aUP45WHBPqO3QtaguetowKBrvuIJWzCAEuqw2RcamFQU7XRTNoAEQA8EqzRtX2Q 2UwlqQdQbVP2ZLhy81bqvXUwWfcvbV+yoO8EIqhhJkfyOXuKD23HLSzKXiH9VrujmW8K 5pXm1pJfiWNGsD2kRsDcM9UTl3pdfwpr+EE+IcipMxQC8rChgJ97P3Mp05gSMr0g+gZ6 bM8zItTWLM+wrQTEmUiJkM82Mjbe+VKHUb0y8vLdZRVsaIpbdcHzjuyijGyHayfVtvux 1T3LWYb93+SJDKnrJUqUdaEQ8V0T6MWqrcU4tRWdtlP/YlpJaLAVg8U8kNaQt7C+o2X9 r+zw== X-Gm-Message-State: AOJu0Yy0QXRs8fPAlJrDWdH6r9iQO9jhmuOYxdbKHgwVJ7+xeV/ekCCq /aEtme/JcNbNMlyUaCfkWiRiynVfTGgdtqHi9mYEptK3RCmllAPNIbIAZcTuA+T2AfALc/keGjc QqABTMeQ= X-Received: by 2002:a05:622a:1c5:b0:425:4043:29f3 with SMTP id t5-20020a05622a01c500b00425404329f3mr3927060qtw.110.1701997031692; Thu, 07 Dec 2023 16:57:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFllt+qyajRcQloruJgxXamToDAjK+WPLrJcOZcLdwCn7P+yAl60zl3owRvp1c/mYoaVPbi1g== X-Received: by 2002:a05:622a:1c5:b0:425:4043:29f3 with SMTP id t5-20020a05622a01c500b00425404329f3mr3927052qtw.110.1701997031376; Thu, 07 Dec 2023 16:57:11 -0800 (PST) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id ih8-20020a05622a6a8800b004259b46eb93sm308779qtb.4.2023.12.07.16.57.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 16:57:11 -0800 (PST) Message-ID: <77e49df168b29f0658bd4252671ca1b07e0a1f8a.camel@redhat.com> Subject: Re: [PATCH] libgccjit: Fix get_size of size_t From: David Malcolm To: Antoni Boucher , jit@gcc.gnu.org, gcc-patches@gcc.gnu.org Date: Thu, 07 Dec 2023 19:57:10 -0500 In-Reply-To: <295f32d194b7b26bd02ce540f8df75a86fc20982.camel@zoho.com> References: <295f32d194b7b26bd02ce540f8df75a86fc20982.camel@zoho.com> User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 Thu, 2023-12-07 at 17:26 -0500, Antoni Boucher wrote: > Hi. > This patch fixes getting the size of size_t (bug 112910). >=20 > There's one issue with this patch: like every other feature that > checks > for target-specific stuff, it requires a compilation before actually > fetching the size of the type. > Which means that getting the size before a compilation might be wrong > (and I actually believe is wrong on x86-64). >=20 > I was wondering if we should always implicitely do the first > compilation to gather the correct info: this would fix this issue and > all the others that we have due to that. > I'm not sure what would be the performance implication. Maybe introduce a new class target_info which contains all the information we might want to find via a compilation, and have the top- level recording::context have a pointer to it, which starts as nullptr, but can be populated on-demand the first time something needs it? >=20 > Another solution that I have been thinking about for a while now > would > be to have another frontend libgccaot (I don't like that name), which > is like libgccjit but removes the JIT part so that we get access to > the > target stuff directly and would remove the need for having a > seperation > between recording and playback as far as I understand. > That's a long-term solution, but I wanted to share the idea now and > gather your thoughts on that. FWIW the initial version of libgccjit didn't have a split between recording and playback; instead the client code had to pass in a callback to call into the various API functions (creating tree nodes). See: https://gcc.gnu.org/legacy-ml/gcc-patches/2013-10/msg00228.html Dave