This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: new register allocator and HARD_REGNO_CALL_PART_CLOBBERED
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Joern Rennecke <joern dot rennecke at superh dot com>, Daniel Berlin <dberlin at dberlin dot org>, Herman ten Brugge <hermantenbrugge at home dot nl>, Dale Johannesen <dalej at apple dot com>, <gcc at gcc dot gnu dot org>
- Date: 15 May 2003 20:30:51 -0300
- Subject: Re: new register allocator and HARD_REGNO_CALL_PART_CLOBBERED
- Organization: GCC Team, Red Hat
- References: <Pine.LNX.4.44.0305152114420.15564-100000@wotan.suse.de>
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