Kill hack in java disabling unit-at-a-time
Andrew Haley
aph@redhat.com
Mon Aug 15 12:30:00 GMT 2005
Jan Hubicka writes:
> > Jan Hubicka writes:
> > > > Jan Hubicka writes:
> > > > > > bodies.
> > > > >
> > > > > Can I have testcase for at lest one of them? Since Java pass
> > > > > all the bodies at once to backend, the memory should not grow
> > > > > after all...
> > > >
> > > > I don't understand. I thought unit-at-a-time kept all the bodies
> > > > until all the source had been parsed, and then generated code.
> > >
> > > Yes, however at least my understanding of Java is that it does the same
> > > (ie I was told several times that Java always has been unit-at-a-time
> > > internally), but I might be mistaken of course.
> >
> > No, java parses one class file, generates code for it, and then
> > nukes the bodies. Then it reads the next class file, etc.
>
> I see. There is interface for this partly too. Once you are done with
> one class, you might consider calling cgraph_finalize_compilation_unit
> that would build cgraph and nuke unnecesary bits
Sounds good.
> (but I am unsure how many of such unnecesary things Java have, for
> C++ these are mostly unreachable template instantiations and such).
> In general we really want to make IPA scalable to whole programs,
> so we will have to address this issue and if Java can provide real
> world testcase, it would be nice.
Right. Scalable IPA would make the most fantastic improvement to gcj
performance, so I am very enthusiastic about it.
> We might not be quite there and it might make sense to provide some
> sort of alternative, such as allowing unit-at-a-time going trought
> multiple code generation cycles that can be less painful than
> current non-unit-at-a-time...
Yes, I see.
Andrew.
More information about the Gcc-patches
mailing list