On 12/20/2011 09:47 AM, Richard Sandiford wrote:
> Revital Eres <revital.e...@linaro.org> writes:
>> +/* Return true if one of the definitions in INSN has MODE_CC.  Otherwise
>> +   return false.  */
>> +static bool
>> +def_has_ccmode_p (rtx insn)
>> +{
>> +  df_ref *def;
>> +
>> +  for (def = DF_INSN_DEFS (insn); *def; def++)
>> +    {
>> +      enum machine_mode mode = GET_MODE (DF_REF_REG (*def));
>> +
>> +      if (GET_MODE_CLASS (mode) == MODE_CC)
>> +       return true;
>> +    }
>> +
>> +  return false;
>> +}
> 
> FWIW, an alternative might be to test have_regs_of_mode[(int) mode].
> That says whether there are any allocatable (non-fixed) registers
> of the given mode.

While true, I doubt either PPC or MIPS really benefit from moving around 
registers of CCmode.  Certainly MIPS has no way of easily moving CCmode 
registers around.  It's a rather complicated reload, that.

I'd be very tempted to simply go with the original patch.


r~

Reply via email to