This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Kill gen_sequence
- From: law at redhat dot com
- To: Jan Hubicka <jh at suse dot cz>
- Cc: "David S. Miller" <davem at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 07 Jun 2002 13:55:32 -0600
- Subject: Re: [RFC] Kill gen_sequence
- Reply-to: law at redhat dot com
In message <20020607191236.GE16820@atrey.karlin.mff.cuni.cz>, Jan Hubicka write
s:
> > refer to the same hard register -- but is it a requirement that each rtx
> > for a hard register be distinct? If we can share hard register rtxs of
> > the same mode, then we can eliminate a ton of calls to gen_rtx_REG and
> > ggc_alloc.
>
> We already do create shared instances of hard registers. Most notable
> ones are frame_pointer_rtx and friends. These also needs to remain
> unique, so we can't use simple hash table and unionize all hard
> registers with same code, but I don't think it is problem to avoid
> gen_rtx_REG and create shared instances.
True. But those have always been somewhat special.
And yes, it's always been the case that we have some shared, some unshared
references to hard regs after register allocation & reload have completed.
But those are rather different than wanting (for example) to have a
standard way to refer to a hard reg from the point where we first start
compiling a function. We do stuff like this an insane number of times:
gen_rtx_REG (gen_raw_REG (reg_raw_mode[X], X))
But the whole point behind gen_raw_REG is to generate an unshared version
of the object. So we need to think long and hard about the consequences
of sharing more hard reg objects.
jeff