This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Faster compilation speed
Tim Hollebeek wrote:
> A simpler strategy is to just make every object with RC >= 2^n immortal.
> Something like:
>
> add: if (rc) rc++;
> subtract: if (rc) if (!--rc) delete;
If the goal is simply to encourage freeing of objects for rapid cache
reuse, then I suspect even 1 or 2 bits of reference count would be
enough. GGC can sort out the rest.
You still have to add ref/unref code all over the compiler though.
Perhaps that could be automated, by the compiler itself tracing pointers
and adding ref/unref code? (That would be useful for a lot of programs,
I suspect). If we see ref/unref as only an optimisation hint for GGC,
then it doesn't matter that the bootstrap compiler won't insert them.
-- Jamie