This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: new-regalloc vs alpha
On Tue, Jan 30, 2001 at 12:23:06PM -0500, Daniel Berlin wrote:
> I was trying to decide whether to do it the way your patch does,
> or insert them as precolored nodes and make them interefere with
> everything.
The later may be better. I found a case where a pseudo was
coelesed with a fixed register, which is bad. I hacked around
the problem like so.
> Weird. We should't be giving a register to something that isn't compatible
> with that register. We use HARD_REGNO_MODE_OK to verify the register can
> hold something of the mode of the thing we want to put in it.
No, no, you misunderstand. An FP register _can_ hold a DImode value.
In fact, it is required to in order for fp<->int conversion to work.
It's just that if you write
(set (reg:DI foo) (mem:DI (reg:DI $f10)))
Ie use an FP register as a base reg for a memory, then this insn
will not be recognized.
r~
Index: new-regalloc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/new-regalloc.c,v
retrieving revision 1.1.2.6
diff -c -p -d -r1.1.2.6 new-regalloc.c
*** new-regalloc.c 2001/01/30 04:52:49 1.1.2.6
--- new-regalloc.c 2001/01/30 13:14:36
*************** void coalesce()
*** 1099,1106 ****
{
/* We are going to compute the adjacent sets on the fly, so
we don't do it here */
! if ((conservative( lhs, rhs) && ! TEST_BIT(precolored, lhs)) ||
! (TEST_BIT(precolored, lhs) && OK(rhs, lhs)))
{
/* Coalesce lhs and rhs conservatively */
hset_insert(coalescedMoves, as);
--- 1099,1107 ----
{
/* We are going to compute the adjacent sets on the fly, so
we don't do it here */
! if (! fixed_regs[rhs] && ! fixed_regs[lhs]
! && ((conservative( lhs, rhs) && ! TEST_BIT(precolored, lhs))
! || (TEST_BIT(precolored, lhs) && OK(rhs, lhs))))
{
/* Coalesce lhs and rhs conservatively */
hset_insert(coalescedMoves, as);