This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 6394
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: geoffk at redhat dot com
- Cc: dje at watson dot ibm dot com, gcc at gcc dot gnu dot org
- Date: Tue, 30 Apr 2002 16:52:19 -0400 (EDT)
- Subject: Re: PR 6394
> > DImode is also allowed in FPRs on the PA. The class used by global_alloc
> > for the pseudo was GENERAL_OR_FP_REGS. This was the first class selected
> > for the psuedo and a register %fr22 was selected from this class.
>
> Hmmm. It should have been 'GENERAL_OR_FP_REGS, pref GENERAL_REGS',
> because although FP_REGS is OK, GENERAL_REGS is cheaper (there are
> fewer moves). Perhaps a cost macro needs tweaking?
Perhaps. REGISTER_MOVE_COST is 16 when one reg is a FP reg and the other
not, versus 2 otherwise. However, I am not sure this actually comes
into play in the initial register selection. The cost to load a DI mode
value is the same for a FPR as a GR. It's not until a bit further along
the code path that the compiler discovers that it needs a rather expensive
reload to get the result into a general register. Maybe the cause of
the problem is that there are two paths in which the psuedo can be set.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)