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 B017B3858C56; Thu, 7 Dec 2023 17:13:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B017B3858C56 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 B017B3858C56 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=1701969206; cv=pass; b=I7rL3GoElv3yRrEKeCIgzbztgUH0vywF6QqRJ5diu5FM4tCetSeYQ2AJeQsMQlkgYyp2hrKxphqRDMJpGJCzz2efQsxJ7oX/kywjancQJT9gVafaR8fl8dlpSYli6oJLyLYTFuNscFYCNfDMidpdu8XWaKOt4TPSh47DOi/6Aac= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1701969206; c=relaxed/simple; bh=vZ1loD1PjpOuC08cLRRaWBNUnHVC5xMyOrSpMJXh7fs=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=ebrT8ailuY4WFWu26kzOowr+rOfjwI4YS2UcuzD3HX2o7VajLQvTOHE8sKKKWMWGus6N5+xw6kyc6f5DSJPme+NUWCVr7I/1xXqct6+/2500kIzJktvawjFoEUy0v6LT1zE9Dw6ZIItmIVqv/enpm7TJC+lCklfP4fNrziJRTI4= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1701969199; cv=none; d=zohomail.com; s=zohoarc; b=OBAcml+/0HO9W6/Qhtg5Yoxhev6j5bCOcpdcDvLK++uYMJgYNPN7uBHnxR0KaYp9hdXkVLYyHYervl2LHxWTUcjmcAdcrjUioUM/9LlPEWDNiDjKnAiVW5V5eyojS4/Pm9pQCuIeDrBE0SeNW01SkGsLDGLuYKPhnnpb790s2tA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701969199; 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=vZ1loD1PjpOuC08cLRRaWBNUnHVC5xMyOrSpMJXh7fs=; b=eSj4E0zNMFTypV2SfuUV8jcZlG4zfIYYVDMwBLamnRZ+NCiDiPK3Z07etE/vJlNdzo/Bq7E9en1oW1vBLDugSqVXsRzDpuOC8wD7wJ4kESHllqPbbCGvW7cR63PF/+oN4kOEPaPjEuFUoSIKlCLwG4kWWw47mcwfRBjA8VERFaE= 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=1701969199; 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=vZ1loD1PjpOuC08cLRRaWBNUnHVC5xMyOrSpMJXh7fs=; b=bZDdd4bHZw89j/KbsfTn3NMyGD0ZNKpYT65n5oRKwQt6IcZuiqn0EGFV9DEhRCbw m9nT1Nk/ko3DaVGHCj4WbeyoZQKWY5ik45NKpZa5fEM9AuPAusJVcOCnMr35yjGYuAE UrxdxfsVqFJaPIRSLpls86wLAw2XUA2fifmjvims= Received: from [192.168.1.172] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1701969197564477.42765744585006; Thu, 7 Dec 2023 09:13:17 -0800 (PST) Message-ID: <159640ff4a004359945ca9e8a81f6209f17fd39e.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, 07 Dec 2023 12:13:15 -0500 In-Reply-To: References: <77bb82eeebe99921773538e56b6c8baba12634a7.camel@zoho.com> 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.2 MIME-Version: 1.0 Feedback-ID: rr08011228e61c66977b76775b17e39ff80000e0561517e13cfa2fce7068fa2cf730909d82f031c38606d75ce6:zu080112264f794dd6dfb565a698c5e6ff0000589ef1133a65e0f7ff061ef980efaaf4dcd127c34b3a3e19:rf0801123242c793a0b38d97338798e48f0000a7850b4509a1fe4fe86d6b3479b4169e07c7a0c0290a8f6ba85ce08374bf5e71aaa176b2: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: It seems like you forgot to prefix the commit message with "libgccjit: ". On Thu, 2023-11-30 at 10:55 +0100, Guillaume Gomez wrote: > Ping David. :) >=20 > Le=C2=A0jeu. 23 nov. 2023 =C3=A0=C2=A022:59, Antoni Boucher a > =C3=A9crit=C2=A0: > > David: I found back the comment you made. Here it is: > >=20 > > =C2=A0 =C2=A0I see you have patches to add function and variable attrib= utes; > > I > > =C2=A0 =C2=A0wonder if this would be cleaner internally if there was a > > =C2=A0 =C2=A0recording::attribute class, rather than the std::pair curr= ently > > in > > =C2=A0 =C2=A0use > > =C2=A0 =C2=A0(some attributes have int arguments rather than string, ot= hers > > have > > =C2=A0 =C2=A0multiple args). > >=20 > > =C2=A0 =C2=A0I also wondered if a "gcc_jit_attribute" type could be exp= osed > > to > > =C2=A0 =C2=A0the > > =C2=A0 =C2=A0user, e.g.: > >=20 > > =C2=A0 =C2=A0 =C2=A0attr1 =3D gcc_jit_context_new_attribute (ctxt, "nor= eturn"); > > =C2=A0 =C2=A0 =C2=A0attr2 =3D gcc_jit_context_new_attribute_with_string= (ctxt, > > "alias", > > =C2=A0 =C2=A0"__foo"); > > =C2=A0 =C2=A0 =C2=A0gcc_jit_function_add_attribute (ctxt, attr1); > > =C2=A0 =C2=A0 =C2=A0gcc_jit_function_add_attribute (ctxt, attr2); > >=20 > > =C2=A0 =C2=A0or somesuch?=C2=A0 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 > >=20