From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 3056F3858C66; Thu, 30 Nov 2023 09:55:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3056F3858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3056F3858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::433 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701338152; cv=none; b=oyA6kdYNXjB9X6E5Yo4FQhXnw7anfpjSllFgFcX2WgQMUEdqv2tIQ/mwQSMHctQZ3/qGhTTeHN86upcr3i5PtMW+EAyGlhI5dmmlv9UyUkoN2L3E9v8uWaRnocgXOlnW9FyYZTc9nWM+2sisMYmiFLjHNRq6j+eFMvN0EVCUloY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701338152; c=relaxed/simple; bh=dl4itMzhDAZ31ME5C3WW7/GnsNWDozZOOT+IyizK5V8=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=pCk7yaS5OZEyu512RghROyjmNYkMf7qYQ5LcyWD07JKVdr9mEiuaMfZ3HkmsrmaNdOnEOP5CjTqOMk+L6P+BRrwLcbQpG86QOBDl2SNOEZZ5xihhW3pzLrL/R3yi+g+DbnsGqDHZn88dumK/etCci79WJ9GJY9B1wNKINW5gb8M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-332f4ad27d4so453304f8f.2; Thu, 30 Nov 2023 01:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701338149; x=1701942949; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1AyW70l8+WVCKu67L+nzAPZK6pVGOq3yf0K6pSO4EFo=; b=NFG8kZQ+xGLZLg7pBcy9CKSY8ctkbHooLYENL69Qdm8viAyouh/PeWGWQqK/Pr7yV5 jjm9BiKqjwCcnJ9YLc1kZsmuAI8ESJKDk4lsThbevo5LCkJRaM0boqD2lqDmUjJ74Xv7 jFH9KVV3PumQ538XJM/YIReGQK2eWLlUxUwCj04l57WYUIwQVMbmn3LZaHqibqw9MyYv H2vaJc/yMhXlKjqYlHzqbI9T5tPnW6Fic3VCZ1uJrIP9YuAHbmZx8Tcmcrzr9uFcWyXD 191b1T2LE1uBFmFq0IU3hzRR78584TuygaCQmXf56UbmArYqAkMTxQ8IS+RBFPQr77Em EpUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701338149; x=1701942949; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1AyW70l8+WVCKu67L+nzAPZK6pVGOq3yf0K6pSO4EFo=; b=PcH/4DEcSaxJktyMO19QzMlh4+0K1v0Q2l48NAG454GrocMGOjp4E8NiFei2Pqtqyx 68C6USXgj91GwUx++cqoFOw1DE5EA0rt1MjL+4Dq+tg0EGsLXsav2LJ97LLt/zpZ2b13 SXO/ynnYP6n+Ldme2oPTKJSAhEVdxJptBlwEYsNWhpOW1O3mV0XfEbjYQ0JIx25gbTQb Q/qBodkZGFtf6IDIacfKmDNXxIpxNl+g+YNinob4CIh6SGDz0M6v04vpSRZVOXLGoYm1 munjMn9opSH6Z6xOQbSxqjcjPZGEgU6hWooQUfWoRn/kKkfFbAV25Pdnlm38OdFFbuHe d0Uw== X-Gm-Message-State: AOJu0YyFlY3PqEbM2/5oF7jNyDxY3TAUWELa4U2pUd4VcZ4A+H3ELOm9 hvUQq8tB7ZHB42oeo48Mt8PYshv2yNL5ZF3tiVg= X-Google-Smtp-Source: AGHT+IFe9e6bJLxDjHMmvlAdVrcIOsTVPmkBzzEZrNFsftTGSYlHeOYAYbJtKA0ZtAyRUTA7VURbK0VP/H73q8wROps= X-Received: by 2002:a5d:4a4e:0:b0:332:e715:f0c3 with SMTP id v14-20020a5d4a4e000000b00332e715f0c3mr13472273wrs.60.1701338148652; Thu, 30 Nov 2023 01:55:48 -0800 (PST) MIME-Version: 1.0 References: <77bb82eeebe99921773538e56b6c8baba12634a7.camel@zoho.com> In-Reply-To: <77bb82eeebe99921773538e56b6c8baba12634a7.camel@zoho.com> From: Guillaume Gomez Date: Thu, 30 Nov 2023 10:55:36 +0100 Message-ID: Subject: Re: [PATCH] Add support for function attributes and variable attributes To: Antoni Boucher Cc: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org, David Malcolm Content-Type: multipart/alternative; boundary="000000000000fe4b0b060b5ba759" X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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: --000000000000fe4b0b060b5ba759 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ping David. :) Le jeu. 23 nov. 2023 =C3=A0 22:59, Antoni Boucher a =C3= =A9crit : > 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). > > I also wondered if a "gcc_jit_attribute" type could be exposed to > the > user, e.g.: > > 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); > > or somesuch? But I think the API you currently have is OK. > > On Thu, 2023-11-23 at 22:52 +0100, Guillaume Gomez wrote: > > Ping David. :) > > > > Le mer. 15 nov. 2023 =C3=A0 17:56, Antoni Boucher a > > =C3=A9crit : > > > > > > 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. > > > > > > On Wed, 2023-11-15 at 17:53 +0100, Guillaume Gomez wrote: > > > > Hi, > > > > > > > > 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). > > > > > > > > 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? > > > > > > > > Thanks in advance for the review. > > > > > --000000000000fe4b0b060b5ba759--