regclass register preferencing patch

David Edelsohn dje@watson.ibm.com
Thu Oct 22 23:35:00 GMT 1998


>>>>> 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



More information about the Gcc-patches mailing list