This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, SMS] Prevent the creation of reg-moves for definitions with MODE_CC


Richard Henderson <rth@redhat.com> writes:
> On 12/20/2011 09:47 AM, Richard Sandiford wrote:
>> Revital Eres <revital.eres@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.

OK, sorry for the noise.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]