This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Kill gen_sequence


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]