From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender4-pp-o90.zoho.com (sender4-pp-o90.zoho.com [136.143.188.90]) by sourceware.org (Postfix) with ESMTPS id E9F2738449F7; Thu, 23 Nov 2023 21:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9F2738449F7 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=zoho.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zoho.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E9F2738449F7 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=136.143.188.90 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700776769; cv=pass; b=sdLiqnTJpCBNeKNDJThyHJETg3zCpwpTbtlMoBYiBQShcY/lMvTztHuvzvWuHqqfUND9Aq/+2vOrXHVEb1v4jySwALpstEeBApXCScg/4+SMgd4kNufDcC9+2IsoE/aZT7mkVkTWoblShIhLwXAWzNaX3Oh23wN7TVBa/JRa9q0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1700776769; c=relaxed/simple; bh=Z2ozuyBgv0IKlu5LB4UnzaqnCVJAcC2xNcyC7Ywzn6s=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=FhHOwhpV43HDi6R1WlI1MCWAJxv+xT21D2PCsTmzcQkWqnJLsMvzzxhDc1KF/II+H2ajqu9tUIPn2MgKuCUcx7ieQ1E3KkhrJfdDva2ojOAncvoC4R5qbF+Pr5aT08/P+I0RzTjwMEJSkSrnCSoeDhu5EXqbJvZXFQ3DzzTUgPI= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1700776761; cv=none; d=zohomail.com; s=zohoarc; b=DuQgrX5ixv9DmMl55mRHUCW4s0YFGYZn6dWOc/scmrsxt6kesK+Aih38G34qa88uGUmwRZLYiQRF32L3zNq7u54wMpRK27meGYeDwKktxsI98cQiYNH51XtYfI8DkRu/F19YLwdo4T82J6rcWoUTy7I5VqvLxvcQZGxTNFWWQrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700776761; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=SgZKSEMIlzZoo56FZxoJ/nNKKbI+sss4rjDrkXA9LnY=; b=mrBHhI9Ck8FWh2zMUcVa6DEcCvKULZ0mlitD9yY+BUlGq/kSOsz7LKv17De/9+ZA67H+WNt3HzW4zSd7r7gnmLBQDEoLgjhH0GUsVpCGRRvjE26gDjBaK+Nqur7RRVDizu/BjtJYQZYdw7y1mt5nyQN6NUEdjq2cR5veKQfl1Vo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=bouanto@zoho.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1700776761; s=zm2022; d=zoho.com; i=bouanto@zoho.com; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Feedback-ID:Message-Id:Reply-To; bh=SgZKSEMIlzZoo56FZxoJ/nNKKbI+sss4rjDrkXA9LnY=; b=Aduhw76LbQNau+rJDLWiweIV3PfuvUc5PBbxEY5ElRlEh3Oeg5oluf96JtsQkZ2h 4no0Z0WDVFxERhH/3SqYaB23W5svDabEsxdSEkiO9WQqZd7UXxkIrr7lWnzZVhx3xIQ larb0ikKIewdNpnbsdqOeY5Cgv1ilRRDv9jT4dzw= Received: from [192.168.1.172] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1700776758921152.66650301604034; Thu, 23 Nov 2023 13:59:18 -0800 (PST) Message-ID: <77bb82eeebe99921773538e56b6c8baba12634a7.camel@zoho.com> Subject: Re: [PATCH] Add support for function attributes and variable attributes From: Antoni Boucher To: Guillaume Gomez Cc: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org, David Malcolm Date: Thu, 23 Nov 2023 16:59:17 -0500 In-Reply-To: References: Autocrypt: addr=bouanto@zoho.com; prefer-encrypt=mutual; keydata=mQENBFOSMLQBCADO5aw6Ys8thMQUNzrwAnfJX2wbgWiz0pQ01DjYj22eeIpChkoZn6LWdt4dieq30u2rFi/yQzJ02foHwI2+aL9rU6xz/x4TwqyRJQGMOqklNc3R+pdXmH4WDQkQDWmLxvc07vu+zb8Tx5A6pMDh4J2ncCEhLEUcH39Yq/yg4eBnFwUX6N7kakvHrnScGNqhnSFCacoJeMJUAR+1G7VBSBd++jmnHLnx3mj7QkRZVECJUw2zqiv1yReCC6GU4SvqLjdqm5ZGeoWOqD/NHjBRoEeOVjzp6M/qOjjWRbkJVqmvgfcD8UytSSqqboR35YFT4L+rZt2ri3T12MJb3i5syCAXABEBAAG0IUFudG9uaSBCb3VjaGVyIDxib3VhbnRvQHpvaG8uY29tPokBVgQTAQgAQAIbIwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAFiEEOELC4Uw1Jeb66YE6RVeGAwR4zcEFAlz4QM4FCRLMEZoACgkQRVeGAwR4zcFBQQf/afttJrA/puADQZhrDfkgr0MFvq6iB+GCy1b8BkXimk1TOXTPt87YLehSeijNu3JkYhl5eRc87BNfU9J87KfI/KIy6hZxqlDXk16FhW9bw/7wYEA0hpb3MUn7xLElXDT0ZHaD+KTe8Oun7qfzgx5RlL6r/WODf3CkSpO085R/rfeBqDEx9mVlhDWgq6Az3CZoD+3CqiCKVqmDuHTWz4kwrd9AM5eVcLvvLKnZIdoIp+G5Ao6BvaGlZyfenN1iOSjLy2NXNt4MnUt0lUYEP5KSIIRhHQ8xkUbj7eWUmaahkxhNb3fH3sAPwGnRZrPpb4rgYzNmSk63wWMh9M2xk+rLb7kBDQRTkjC0AQgAumZzsAV/UFWI+dpzebQfma36kKYZZFuseant5sq/HWP553XQ/U6ttJiKyN5MpCqtxvCAoRplf42YhlHuFqgf73WJxoJ6Y+sdyqoBSwlR+ gzAneAmsa8gmmY0wawH0Z2leazjKuS7mJjVEQZg0ZGsiCVRGeRnDqFGzDEzDc9ngWKSoTq0fKzlGy1X85OrtmUrvEbhSo6HP+FoeunHkIqrxu3w3vDoFEXxVQlKI6V3I4nCz5n6DB8WR3L7nsiiTnOiGirPw1ngvWFLW86kkA4FJpayc8Xl3va3SLY+2y4yuROboX2DVI4AC/Qeug/mDiBicPxkP6YfUartQRMe6obkEQARAQABiQE8BBgBCAAmAhsMFiEEOELC4Uw1Jeb66YE6RVeGAwR4zcEFAlz4QRsFCRLMEecACgkQRVeGAwR4zcE56ggAgTgrJInBKC+7552Dpccuo6Clh3wZfjlNLv9/6r5lKEbaNzaTrfhPiAP4WgnluIUmj8amOFLFJpj+BAVNOXpZ4D2R3o9ch8z7fot+fW4Yw+PKIxH4I2xEys8ndoEB3aiQwHjKcGIhkIU7uyMJFQr2aWjdTY0gmXw0YZueHOSLgo7uX4XKxB8fEO/yto/Tff2YBAAq+AtNwt+Gh5YS9rZw7rwUTWMi84yVOlc+zRE79E9NJkvdTwX7IJYo64VzIRNfgHsn7QNdVzuM1XIFHl+Glk6cIlI8s6BO7nEoCn3hTF104fQTAO3fEs+XXZOKXo2lk8faowEoPq5r58StrV0nyg== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 MIME-Version: 1.0 Feedback-ID: rr08011228d59aa52779b93302757df613000019647da9701ddd7fb0b073bfd8c2d34b7f3af54efea185d64745:zu080112265cfa8a9609b7b8d68447a41700001217b93deea3f3ca5c714f22ea115c9bf26536d10c1a14ab:rf08011232395216e994c0fcbe26e539b80000d7525cb4112462a7b87d0bb4291f530575d8e4c7fca98548ef5cf9a6f96ea67228a54fba:ZohoMail X-ZohoMailClient: External X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: David: I found back the comment you made. Here it is: I see you have patches to add function and variable attributes; I wonder if this would be cleaner internally if there was a recording::attribute class, rather than the std::pair currently in use (some attributes have int arguments rather than string, others have multiple args). =20 I also wondered if a "gcc_jit_attribute" type could be exposed to the user, e.g.: =20 attr1 =3D gcc_jit_context_new_attribute (ctxt, "noreturn"); attr2 =3D gcc_jit_context_new_attribute_with_string (ctxt, "alias", "__foo"); gcc_jit_function_add_attribute (ctxt, attr1); gcc_jit_function_add_attribute (ctxt, attr2); =20 or somesuch? But I think the API you currently have is OK.=20 =20 On Thu, 2023-11-23 at 22:52 +0100, Guillaume Gomez wrote: > Ping David. :) >=20 > Le mer. 15 nov. 2023 =C3=A0 17:56, Antoni Boucher a > =C3=A9crit : > >=20 > > David: another thing I remember you mentioned when you reviewed an > > earlier version of this patch is the usage of `std::pair`. > > I can't find where you said that, but I remember you mentioned that > > we > > should use a struct instead. > > Can you please elaborate again? > > Thanks. > >=20 > > On Wed, 2023-11-15 at 17:53 +0100, Guillaume Gomez wrote: > > > Hi, > > >=20 > > > This patch adds the (incomplete) support for function and > > > variable > > > attributes. The added attributes are the ones we're using in > > > rustc_codegen_gcc but all the groundwork is done to add more (and > > > we > > > will very likely add more as we didn't add all the ones we use in > > > rustc_codegen_gcc yet). > > >=20 > > > The only big question with this patch is about `inline`. We > > > currently > > > handle it as an attribute because it is more convenient for us > > > but is > > > it ok or should we create a separate function to mark a function > > > as > > > inlined? > > >=20 > > > Thanks in advance for the review. > >=20