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


On May 15, 2003, Michael Matz <matz@suse.de> wrote:

> Yes, you have to define clobbering parts of hardregs.  Possibly by
> allowing clobbering of zero_extract's, or normal subregs.

And, again, why is it better to pollute every single call pattern with
a bunch of complex clobbers just because the register allocator
doesn't want to deal with a macro named
HARD_REGNO_CALL_PART_CLOBBERED, if at the end it will end up having to
collect the information back from call patterns and behave similarly?

> And I had designed this half-clobbering exactly like CALL_USED_REGISTERS,
> instead of creating the HARD_REGNO_CALL_PART_CLOBBERED macro which says
> for a mode to not be placable into these and those hardregs over calls.

It's easy enough to use HARD_REGNO_CALL_PART_CLOBBERED to construct a
map (regno,mode)->boolean, if you prefer it that way.  It's just a
different way to represent the data.  But defining in the machine
header file an array as big as CALL_USED_REGISTERS per mode sounds a
bad idea to me.

> I was also talking more about what you speculated about, namely that the
> set of partly clobbered regs changes per call instruction.  For that you
> anyway have to tack something to those insns, like already can be done
> with CALL_INSN_FUNCTION_USAGE.  It just has to be extended to the notion
> of partial hardregs.

Good point, I hadn't actually thought this through.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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