This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Reload work in progress
- To: law at cygnus dot com
- Subject: Re: Reload work in progress
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: 13 Sep 2000 22:54:26 -0700
- CC: Bernd Schmidt <bernds at cygnus dot co dot uk>, gcc at gcc dot gnu dot org
- References: <2583.968898204@upchuck>
One other thing which would help to make reload easier to use in a new
port would be to reduce or eliminate the SECONDARY_* macros.
All the information needed to eliminate these macros is already
available in the constraints in every port that doesn't have
reload_{in,out}* patterns. For instance, for rs6000 movsi, we have:
"=r,r,r,m,r,r,r,r, r,*q,*c*l,*h"
" r,U,m,r,I,L,n,R,*h, r, r, 0"
(I've added spaces to make the constraints line up.)
so suppose reload wants to move from a class 'c' register into memory.
It sees that there is no 'c' -> 'm' move, but there is a 'c' -> 'r'
and 'r' -> 'm', so it knows it needs a secondary reload of the class
of registers that matches 'r' (which happens to be GENERAL_REGS).
Likewise, for movdf we have:
"=!r,??r,m,!r,!r,!r,f,f,m"
" r, m,r, G, H, F,f,m,f"
and reload ought to be able to deduce from that the way to copy
between registers of classes 'f' and 'r' is to create a temporary of
class 'm'.
Of course, it should precompute all this once at the start of
compilation, for speed.
--
- Geoffrey Keating <geoffk@cygnus.com>