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: new register allocator and HARD_REGNO_CALL_PART_CLOBBERED


Michael Matz wrote:
> 
> Hi,
> 
> On Wed, 14 May 2003, Joern Rennecke wrote:
> 
> > >  2) this set can change for each call, i.e. depends on the actual call.
> >
> > It's not really the call that might be different, but if a different pseudo
> > is tracked across a different call, you have to consider the mode of that
> > other pseudo.
> 
> Sure sure.  I just wanted to know if the set of forbidden regs could
> possibly also depend on the call in question.  Looking at the definition
> of HARD_REGNO_CALL_PART_CLOBBERED() this is not possible.  So it's enough
> for a web to know its mode, and if it's live over a call.  I.e. basically
> it simply boiles down to a HARD_REG_SET of forbidden regs per machine
> mode, which are to be excluded for live-over-call webs.  So there's no
> need to fiddle with the web builder to exactly track over _which_ calls a
> web is live.  That was the initial reason why I asked.

It is still useful to have a tally of the number of calls crossed in order
to make the caller-save mechanism more intelligent.  This not only applies
to HARD_REGNO_CALL_PART_CLOBBERED registers, but also to ordinary call
clobbered registers.  It would be even better if we could figure out where
we can leave a register saved over multiple calls without needing to
restore & save it again.

> The usable_regs are intersected for merged webs.  If the resulting set
> would be too small (for instance empty) they aren't merged.  So simply
> limiting the usable_regs for the webs in question should already Just Work
> (modulo bugs ;-) )

Why would you consider registers that require caller saves as not usable at
all?  They are perfectly usable, but at a higher cost.
	
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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