This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: regclass register preferencing patch
- To: Jim Wilson <wilson at cygnus dot com>
- Subject: Re: regclass register preferencing patch
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Fri, 23 Oct 1998 02:02:30 -0400
- Cc: Jeffrey Law <law at cygnus dot com>, egcs-patches at cygnus dot com
>>>>> Jim Wilson writes:
Jim> I'd suggest one additional change, we either need to move the setting of
Jim> classes[i] = NO_REGS above the matching constraints code, or else we need
Jim> to move the constraints[i]=p;/continue after the following close brace.
Jim> I know I said earlier that I thought the continue was in the right place,
Jim> but looking at it again, I think you were right.
It does look odd, but the earlier two if/else branches
specifically set "win" or "alt_fail" which only make sense if the rest of
the code is processed. Also, unlike the last else which says that it is
in place of the ordinary cost computation and advances to the next
constraint letter, the earlier two rely on the later code to advance to
the next constraint.
I do not think that moving the update of constraints[i]=p to where
you suggest is correct. I do, however, think that classes[i]=NO_REGS
should be moved before the special matching-constraint code so the setting
of classes[i] is not overridden when it performs the regular cost
calculation.
David