This is the mail archive of the
mailing list for the GCC project.
Re: question regarding regrename and failure of 950704-1.c on main
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: law at redhat dot com, gcc at gcc dot gnu dot org
- Date: Fri, 10 May 2002 14:52:28 -0400 (EDT)
- Subject: Re: question regarding regrename and failure of 950704-1.c on main
> On Fri, May 10, 2002 at 11:37:53AM -0400, John David Anglin wrote:
> > The problem comes in the register rename pass. The selection of di 22
> > in the reload pass is ok since di 23 is dead. Di 23 is copied initially
> > to di 2. However, the rename pass eliminates the copy and substitutes
> > di 23 into the insn setting di 22.
> So the problem as I understand it is that an argument register was
> in a pair that was not HARD_REGNO_MODE_OK. That definitely seems
> questionable at best.
> I suppose we can work around this wart by not recording registers
> that aren't valid. Give this a whirl.
OK, will try.
I have a mod to HARD_REGNO_MODE_OK that seems to fix the problem.
I have changed the sets of registers that are HARD_REGNO_MODE_OK
for DI and TI modes. Argument and return value pairs for DImode
are now HARD_REGNO_MODE_OK and we never have overlaps with the new
scheme. This seems to give better code. For example in 950704-1.c
at -O2, we don't need to copy the argument registers and a frame
doesn't need to be allocated.
The drawback to this approach is that fewer choices are available.
How hard would it be to handle arbitrary overlaps and do you think
there would be a benefit in doing it?
J. David Anglin firstname.lastname@example.org
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)