This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Converting the gcc backend to a library?


Per Bothner <per@bothner.com> writes:

> What you want to do is to write a front-end which transforms the
> source language into *tree nodes*, calls the backend to produce
> object code, and loads it.

Thanks.  Yes.

> One complication is that Gcc is chock-full of global variables,
> and thus a hypothetical Gcc library cannot be called re-entrantly.
> If your application has multiple threads, the Gcc back-end
> becomes a single resource suppisbly subject to contention.

I guess one could divide such a development into two phases:

1. Package the backend as a library.

2. Pack global variables into data structures and make the library
   re-entrant.

Is the gcc development team interested in one or two of these
developments if they were done right?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]