This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Faster compilation speed
torvalds@transmeta.com (Linus Torvalds) wrote on 10.08.02 in <Pine.LNX.4.44.0208101102380.2197-100000@home.transmeta.com>:
> On Sat, 10 Aug 2002, Richard Kenner wrote:
> > It also assumes that certain other RTL is *not* shared, so that it can
> > be changed without affecting any others insns.
> So my claim is that if you _were_ to have real rtx memory management, you
> wouldn't need any of the ad-hoc rules. You could just mark the RTX as
> being shared (the same way you can mark a file mapping as being shared),
> and then that tells the copy-on-write routines that no copy is needed,
> exactly because everybody wants one single shared object. But even when it
> is shared, you still need to have a reference count - to know when there
> are no people interested in it any more.
Or, the other way around, when you *need* to be the sole owner, you can
make sure of that by looking at that very same reference count, and doing
a copy exactly when it is not 1. (Assuming your reference count isn't
inflated by internal pointers. Design again.)
MfG Kai