From: akrl <akrl@sdf.org>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: dmalcolm@redhat.com, jit@gcc.gnu.org
Subject: Re: about header file parsing
Date: Tue, 01 Jan 2019 00:00:00 -0000 [thread overview]
Message-ID: <xjf4laheuuv.fsf@sdf.org> (raw)
In-Reply-To: <91ed8280-269a-c868-bfa4-d66607c3a3fd@starynkevitch.net> (message from Basile Starynkevitch on Wed, 9 Jan 2019 15:04:44 +0100)
Basile Starynkevitch <basile@starynkevitch.net> writes:
> I don't know of any GCC plugin within the GCC code base (except the test cases for plugins).
>
> And I am not sure it would be that easy. If I understand well,
> what you suggest would either fill some gcc_jit_context, or create it already filled with an API.
>
> But, AFAIK, there is no current way to query the content of some gcc_jit_context. In other words, it
> seems (but I could be wrong) that what is lacking is an API to e.g. *fetch* all the struct-ures and
> all the functions inside a gcc_jit_context, and we don't have that yet.
>
> Or perhaps, I have misundertood your idea.
>
> My feeling was that the GCC plugin would fill whatever data structure is used by the application using libgccjit.
> And that is application specific -so the GCC plugin has to be application specific too.
>
> Cheers
>
> PS. I could be very wrong, it is not clear in my head!
>
Sorry I try to explain it better.
I was thinking to a gcc plugin (or potentially something else) that
given a C file produce the libgccjit code necessary to fill a context
with what is in the source file.
Say you want then to use it to solve the code duplication we have seen for
structure definitions. You could use a two step compilation strategy:
- first with the plugin you create the libgccjit code you need to define
in the jitter the structures.
- second you include it in your codebase and you do your usual compilation.
As I sayid it could also potentially compile not just structs and unions
but also the whole C subset supported.
Bests
Andrea
--
akrl@sdf.org
next prev parent reply other threads:[~2019-01-09 15:03 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 0:00 akrl
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` akrl
2019-01-01 0:00 ` Basile Starynkevitch
2019-01-01 0:00 ` akrl [this message]
2019-01-01 0:00 ` Basile Starynkevitch
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` akrl
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` Basile Starynkevitch
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` akrl
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` Basile Starynkevitch
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` akrl
2019-01-01 0:00 ` David Malcolm
2019-01-01 0:00 ` akrl
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` akrl
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` akrl
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
2019-01-01 0:00 ` akrl
[not found] <df8944b7-1fbe-b56f-cc48-ab926d0cb5ad@starynkevitch.net>
2019-01-01 0:00 ` Basile Starynkevitch
2019-01-01 0:00 ` Marc Nieper-Wißkirchen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xjf4laheuuv.fsf@sdf.org \
--to=akrl@sdf.org \
--cc=basile@starynkevitch.net \
--cc=dmalcolm@redhat.com \
--cc=jit@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).