about header file parsing
Basile Starynkevitch
basile@starynkevitch.net
Tue Jan 1 00:00:00 GMT 2019
On 1/9/19 12:12 PM, akrl wrote:
>
> I think the idea of having something like a gcc plugin that once is parsed
> compiles the subset of supported C to the necessary libgccjit code would be
> useful to have for this cases but also educative for learning how to use the
> library.
>
> Would be this something that is upstreamable in some form?
>
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!
--
Basile STARYNKEVITCH == http://starynkevitch.net/Basile
opinions are mine only - les opinions sont seulement miennes
Bourg La Reine, France
More information about the Jit
mailing list