This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: An almost working copying collector for gcc
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 12 Dec 2002 14:08:10 -0800
- Subject: Re: [PATCH]: An almost working copying collector for gcc
- References: <Pine.LNX.4.50.0212112224540.3116-100000@dberlin.org>
Daniel Berlin <dberlin@dberlin.org> writes:
> It copies (see below), but crashes because we have things we expect to
> still point to the same place, but don't. The things that point to
> them don't actually appear to be accessible from the root set, thus, we
> never forward them.
> It's possible they are only touched from the set of roots added by
> ggc_add_root, which need to be changed by hand to DTRT for a copying
> collector.
You really wanted to try this on the pch-branch, which doesn't have
ggc_add_root, and does have all the places that refer to GCed memory
properly marked (or at least all I can find). It also has much better
support for the generic updating-pointers problem in the form of the
gt_pch_p_* routines.
I'm sure you'll also discover the problem I recently hit with the C++
frontend, which depends on the ordering of certain pointers. I think
there might be a few other problems with hashtables that hash
pointers, too.
Thanks for trying this, though. Did you get any performance numbers
out of it? Would it be worth rewriting it to be fully working?
--
- Geoffrey Keating <geoffk@geoffk.org>