This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [gnat] reuse of ASTs already constructed
- From: oliver dot kellogg at t-online dot de (Oliver Kellogg)
- To: gcc at gcc dot gnu dot org
- Date: Tue, 14 Apr 2009 12:31:21 +0200
- Subject: Re: [gnat] reuse of ASTs already constructed
- References: <1239557374.7565.37.camel@tidbit.site>
- Reply-to: okellogg at users dot sourceforge dot net
Interim note:
Apparently, calling compile_file() more than once has not been done
before?
I am seeing many global variables in cgraphunit.c that need to
be reinitialized in this case.
Also, some static variables are defined locally in functions, e.g.
'first_analyzed' and 'first_analyzed_var' in cgraph_analyze_functions().
Those need to be pulled outside for reinitialization.
I am making the necessary changes and extending init_cgraph() as needed.
I hope my changes stand a chance for being integrated ;)
Oliver
On 2009-04-12 at 19:29 +0200, Oliver Kellogg wrote:
> Picking up an old thread,
> http://gcc.gnu.org/ml/gcc/2003-03/msg00281.html
>
>
> On Tue, 4 Mar 2003, Geert Bosch <bosch at gnat dot com> wrote:
> > [...]
> > Best would be to first post a design overview,
> > before doing a lot of work in order to prevent spending time
> > on implementing something that may turn out to have fundamental
> > problems.
>
> I've done a little experimenting to get a feel for this.
>
> I've looked at the work done toward the GCC compile server but
> decided that I want to concentrate on GNAT trees (whereas the
> compile server targets the GNU trees.)
>
> Also I am aiming somewhat lower - not making a separate compile
> server process but rather extending gnat1 to handle multiple
> files in a single invocation.
>
> The current GNAT code makes a strong assumption that there be
> only one main unit, and this Main_Unit be located at index 0 of
> Lib.Units.Table (see procedure Lib.Load.Load_Main_Source).
>
> I am currently looking at having each main unit supplied on
> the gnat1 command line overwrite the Main_Unit in the Units table.
>
> What do you think of this approach?
>
> The attached patch sets the stage for passing multiple source
> files to a single gnat1 invocation. (Beware, this is a rough cut.
> Best use "svn diff --diff-cmd diff -x -uw" after applying as
> there are many changes that only affect indentation.)
>
> Thanks,
>
> Oliver
>
>