Le Fri, Dec 08, 2006 at 07:09:23PM -0500, Daniel Berlin écrivait/wrote:
> 
> Uh, well, you see, there are points in between these two extremes.
> Most commercial compilers are not garbage collected, they rely on
> allocation pools (ie multiple heap) to get  sane performance and
> lifetime management.

I know about some compilers or static analyzers coded in SML, Ocaml,
Java which are commercially sold (or open source, and used in
commercial products). At some point in the past, the PolySpace
analysers http://www.polyspace.com/ which are quite expensive, where
rumored to be coded in SML. And ASTREE
http://www.di.ens.fr/~cousot/projets/ASTREE/ is coded in Ocaml. But
reliable information about the internals of these tools are hard to
get. I did work on some proprietary static analyser prototype, and we
needed to add a garbage collector inside it. For the algorithms
considered, coding without any automatic memory managment would be a
nightmare, and I won't even dare trying.


I'm working within (and I am paid by) the GlobalGCC project
http://gcc.gnu.org/ml/gcc/2006-10/msg00676.html which aims at adding
global static analyis which is expected to be very expensive (probably
compilation times ten or more times slower).

> You see, we currently waste a lot of memory to avoid the fact that our
> GC is very slow.
> We still take it on the chin when it comes to locality.  Previous
> things such as moving basic blocks from alloc_pools (which are
> contiguous) to gc'd space cost us 2-3% compilation time alone, because
> of how bad our GC places objects.

Even 25% of current GCC compilation time is a noise level to me. If I
achieve 1000% of current GCC -O3 compilation time, I will be very
proud of me. So I really do not care about 3%, and I thought that my
proposal won't cost a lot if it is not used (because if they are no
finalized object, GCC won't run much slower...).

> 
> This just isn't that big a problem.  If you want to associate these
> things with trees, put them in annotations, mark them GTY ((skip)) and
> explicitly manage their lifetime.  It is highly unlikely that they are
> going to live for some indeterminate amount of time.

So basically you are suggesting me to add some kind of specific
garbage collection machinery within my pass. Could be ok, but painful.



-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 
8, rue de la Faïencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to